From owner-svn-src-head@freebsd.org Sun Nov 12 00:00:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D16D5E509DC; Sun, 12 Nov 2017 00:00:39 +0000 (UTC) (envelope-from will@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E8A5741D8; Sun, 12 Nov 2017 00:00:39 +0000 (UTC) (envelope-from will@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAC00cNq089961; Sun, 12 Nov 2017 00:00:38 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAC00cVc089960; Sun, 12 Nov 2017 00:00:38 GMT (envelope-from will@FreeBSD.org) Message-Id: <201711120000.vAC00cVc089960@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Sun, 12 Nov 2017 00:00:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325729 - head/lib/libkvm X-SVN-Group: head X-SVN-Commit-Author: will X-SVN-Commit-Paths: head/lib/libkvm X-SVN-Commit-Revision: 325729 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2017 00:00:39 -0000 Author: will Date: Sun Nov 12 00:00:38 2017 New Revision: 325729 URL: https://svnweb.freebsd.org/changeset/base/325729 Log: libkvm: fix 'index' shadowing. Modified: head/lib/libkvm/kvm_private.c Modified: head/lib/libkvm/kvm_private.c ============================================================================== --- head/lib/libkvm/kvm_private.c Sat Nov 11 23:30:58 2017 (r325728) +++ head/lib/libkvm/kvm_private.c Sun Nov 12 00:00:38 2017 (r325729) @@ -261,9 +261,9 @@ popcount_bytes(uint64_t *addr, uint32_t bit0, uint32_t } void * -_kvm_pmap_get(kvm_t *kd, u_long index, size_t len) +_kvm_pmap_get(kvm_t *kd, u_long idx, size_t len) { - off_t off = index * len; + off_t off = idx * len; if (off >= kd->pt_sparse_off) return (NULL); @@ -699,10 +699,10 @@ again: } int -_kvm_bitmap_init(struct kvm_bitmap *bm, u_long bitmapsize, u_long *index) +_kvm_bitmap_init(struct kvm_bitmap *bm, u_long bitmapsize, u_long *idx) { - *index = ULONG_MAX; + *idx = ULONG_MAX; bm->map = calloc(bitmapsize, sizeof *bm->map); if (bm->map == NULL) return (0); @@ -720,23 +720,23 @@ _kvm_bitmap_set(struct kvm_bitmap *bm, u_long pa, unsi } int -_kvm_bitmap_next(struct kvm_bitmap *bm, u_long *index) +_kvm_bitmap_next(struct kvm_bitmap *bm, u_long *idx) { u_long first_invalid = bm->size * CHAR_BIT; - if (*index == ULONG_MAX) - *index = 0; + if (*idx == ULONG_MAX) + *idx = 0; else - (*index)++; + (*idx)++; - /* Find the next valid index. */ - for (; *index < first_invalid; (*index)++) { - unsigned int mask = *index % CHAR_BIT; - if ((bm->map[*index * CHAR_BIT] & mask) == 0) + /* Find the next valid idx. */ + for (; *idx < first_invalid; (*idx)++) { + unsigned int mask = *idx % CHAR_BIT; + if ((bm->map[*idx * CHAR_BIT] & mask) == 0) break; } - return (*index < first_invalid); + return (*idx < first_invalid); } void From owner-svn-src-head@freebsd.org Sun Nov 12 01:36:50 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8D2CE534F3; Sun, 12 Nov 2017 01:36:50 +0000 (UTC) (envelope-from will@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 80DB576F3E; Sun, 12 Nov 2017 01:36:50 +0000 (UTC) (envelope-from will@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAC1ansq032304; Sun, 12 Nov 2017 01:36:49 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAC1amkK032294; Sun, 12 Nov 2017 01:36:48 GMT (envelope-from will@FreeBSD.org) Message-Id: <201711120136.vAC1amkK032294@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Sun, 12 Nov 2017 01:36:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325732 - head/lib/libkvm X-SVN-Group: head X-SVN-Commit-Author: will X-SVN-Commit-Paths: head/lib/libkvm X-SVN-Commit-Revision: 325732 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2017 01:36:50 -0000 Author: will Date: Sun Nov 12 01:36:48 2017 New Revision: 325732 URL: https://svnweb.freebsd.org/changeset/base/325732 Log: libkvm: fix build failures Modified: head/lib/libkvm/kvm.h head/lib/libkvm/kvm_aarch64.h head/lib/libkvm/kvm_amd64.c head/lib/libkvm/kvm_amd64.h head/lib/libkvm/kvm_minidump_aarch64.c head/lib/libkvm/kvm_minidump_amd64.c head/lib/libkvm/kvm_minidump_arm.c head/lib/libkvm/kvm_minidump_i386.c head/lib/libkvm/kvm_minidump_mips.c head/lib/libkvm/kvm_private.c Modified: head/lib/libkvm/kvm.h ============================================================================== --- head/lib/libkvm/kvm.h Sun Nov 12 01:28:20 2017 (r325731) +++ head/lib/libkvm/kvm.h Sun Nov 12 01:36:48 2017 (r325732) @@ -36,7 +36,14 @@ #include #include #include -#include + +/* + * Including vm/vm.h causes namespace pollution issues. For the + * most part, only things using kvm_walk_pages() need to #include it. + */ +#ifndef VM_H +typedef u_char vm_prot_t; +#endif /* Default version symbol. */ #define VRS_SYM "_version" Modified: head/lib/libkvm/kvm_aarch64.h ============================================================================== --- head/lib/libkvm/kvm_aarch64.h Sun Nov 12 01:28:20 2017 (r325731) +++ head/lib/libkvm/kvm_aarch64.h Sun Nov 12 01:36:48 2017 (r325732) @@ -42,8 +42,8 @@ typedef uint64_t aarch64_pte_t; /* Source: arm64/include/pte.h */ #define AARCH64_ATTR_MASK 0xfff0000000000fff -#define AARCH64_ATTR_UXN (1UL << 54) -#define AARCH64_ATTR_PXN (1UL << 53) +#define AARCH64_ATTR_UXN (1ULL << 54) +#define AARCH64_ATTR_PXN (1ULL << 53) #define AARCH64_ATTR_XN (AARCH64_ATTR_PXN | AARCH64_ATTR_UXN) #define AARCH64_ATTR_AP(x) ((x) << 6) #define AARCH64_ATTR_AP_RO (1 << 1) Modified: head/lib/libkvm/kvm_amd64.c ============================================================================== --- head/lib/libkvm/kvm_amd64.c Sun Nov 12 01:28:20 2017 (r325731) +++ head/lib/libkvm/kvm_amd64.c Sun Nov 12 01:36:48 2017 (r325732) @@ -51,6 +51,7 @@ static char sccsid[] = "@(#)kvm_hp300.c 8.1 (Berkeley) #include #include #include +#include #include #include Modified: head/lib/libkvm/kvm_amd64.h ============================================================================== --- head/lib/libkvm/kvm_amd64.h Sun Nov 12 01:28:20 2017 (r325731) +++ head/lib/libkvm/kvm_amd64.h Sun Nov 12 01:36:48 2017 (r325732) @@ -55,7 +55,9 @@ typedef uint64_t amd64_pml4e_t; #define AMD64_NPML4EPG (AMD64_PAGE_SIZE / sizeof(amd64_pml4e_t)) #define AMD64_PML4SHIFT 39 +#define AMD64_PG_NX (1ULL << 63) #define AMD64_PG_V 0x001 +#define AMD64_PG_RW 0x002 #define AMD64_PG_PS 0x080 #define AMD64_PG_FRAME (0x000ffffffffff000) #define AMD64_PG_PS_FRAME (0x000fffffffe00000) Modified: head/lib/libkvm/kvm_minidump_aarch64.c ============================================================================== --- head/lib/libkvm/kvm_minidump_aarch64.c Sun Nov 12 01:28:20 2017 (r325731) +++ head/lib/libkvm/kvm_minidump_aarch64.c Sun Nov 12 01:36:48 2017 (r325732) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "../../sys/arm64/include/minidump.h" Modified: head/lib/libkvm/kvm_minidump_amd64.c ============================================================================== --- head/lib/libkvm/kvm_minidump_amd64.c Sun Nov 12 01:28:20 2017 (r325731) +++ head/lib/libkvm/kvm_minidump_amd64.c Sun Nov 12 01:36:48 2017 (r325732) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "../../sys/amd64/include/minidump.h" @@ -59,9 +60,9 @@ _amd64_entry_to_prot(uint64_t entry) { vm_prot_t prot = VM_PROT_READ; - if ((entry & PG_RW) != 0) + if ((entry & AMD64_PG_RW) != 0) prot |= VM_PROT_WRITE; - if ((entry & PG_NX) == 0) + if ((entry & AMD64_PG_NX) == 0) prot |= VM_PROT_EXECUTE; return prot; } @@ -351,12 +352,12 @@ _amd64_minidump_walk_pages(kvm_t *kd, kvm_walk_pages_c return (0); for (pdeindex = 0; pdeindex < npdes; pdeindex++) { - pd_entry_t pde = _amd64_pde_get(kd, pdeindex); - pt_entry_t *ptes; + amd64_pde_t pde = _amd64_pde_get(kd, pdeindex); + amd64_pte_t *ptes; u_long i; va = vm->hdr.kernbase + (pdeindex << AMD64_PDRSHIFT); - if ((pde & PG_V) == 0) + if ((pde & AMD64_PG_V) == 0) continue; if ((pde & AMD64_PG_PS) != 0) { @@ -366,7 +367,7 @@ _amd64_minidump_walk_pages(kvm_t *kd, kvm_walk_pages_c * that every page here uses the same PDE to * generate permissions. */ - pa = pde & AMD64_PG_PS_FRAME + + pa = (pde & AMD64_PG_PS_FRAME) + ((va & AMD64_PDRMASK) ^ VA_OFF(vm, va)); dva = vm->hdr.dmapbase + pa; _kvm_bitmap_set(&bm, pa, AMD64_PAGE_SIZE); @@ -383,12 +384,12 @@ _amd64_minidump_walk_pages(kvm_t *kd, kvm_walk_pages_c if (ptes == NULL) continue; - for (i = 0; i < NPTEPG; i++) { - pt_entry_t pte = (u_long)ptes[i]; + for (i = 0; i < AMD64_NPTEPG; i++) { + amd64_pte_t pte = (u_long)ptes[i]; pa = pte & AMD64_PG_FRAME; dva = vm->hdr.dmapbase + pa; - if ((pte & PG_V) != 0) { + if ((pte & AMD64_PG_V) != 0) { _kvm_bitmap_set(&bm, pa, AMD64_PAGE_SIZE); if (!_kvm_visit_cb(kd, cb, arg, pa, va, dva, _amd64_entry_to_prot(pte), pgsz, 0)) { Modified: head/lib/libkvm/kvm_minidump_arm.c ============================================================================== --- head/lib/libkvm/kvm_minidump_arm.c Sun Nov 12 01:28:20 2017 (r325731) +++ head/lib/libkvm/kvm_minidump_arm.c Sun Nov 12 01:36:48 2017 (r325732) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include Modified: head/lib/libkvm/kvm_minidump_i386.c ============================================================================== --- head/lib/libkvm/kvm_minidump_i386.c Sun Nov 12 01:28:20 2017 (r325731) +++ head/lib/libkvm/kvm_minidump_i386.c Sun Nov 12 01:36:48 2017 (r325732) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "../../sys/i386/include/minidump.h" @@ -285,6 +286,10 @@ _i386_iterator_next(struct i386_iter *it, u_long *pa, int found = 0; *dva = 0; + *pa = 0; + *va = 0; + *dva = 0; + *prot = 0; for (; it->pteindex < it->nptes && found == 0; it->pteindex++) { if (vm->hdr.paemode) { pte64 = _i386_pte_pae_get(it->kd, it->pteindex); Modified: head/lib/libkvm/kvm_minidump_mips.c ============================================================================== --- head/lib/libkvm/kvm_minidump_mips.c Sun Nov 12 01:28:20 2017 (r325731) +++ head/lib/libkvm/kvm_minidump_mips.c Sun Nov 12 01:36:48 2017 (r325732) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); */ #include +#include #include #include #include @@ -296,6 +297,8 @@ _mips_iterator_next(struct mips_iter *it, u_long *pa, * pages are R|X at least. */ *prot = VM_PROT_READ | VM_PROT_EXECUTE; + *pa = 0; + *va = 0; *dva = 0; for (;it->pteindex < it->nptes && found == 0; it->pteindex++) { if (vm->pte_size == 64) { Modified: head/lib/libkvm/kvm_private.c ============================================================================== --- head/lib/libkvm/kvm_private.c Sun Nov 12 01:28:20 2017 (r325731) +++ head/lib/libkvm/kvm_private.c Sun Nov 12 01:36:48 2017 (r325732) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -263,9 +264,9 @@ popcount_bytes(uint64_t *addr, uint32_t bit0, uint32_t void * _kvm_pmap_get(kvm_t *kd, u_long idx, size_t len) { - off_t off = idx * len; + uintptr_t off = idx * len; - if (off >= kd->pt_sparse_off) + if ((off_t)off >= kd->pt_sparse_off) return (NULL); return (void *)((uintptr_t)kd->page_map + off); } @@ -362,9 +363,9 @@ _kvm_pt_init(kvm_t *kd, size_t map_len, off_t map_off, MAP_PRIVATE, kd->pmfd, kd->pt_sparse_off); if (kd->sparse_map == MAP_FAILED) { _kvm_err(kd, kd->program, "cannot map %" PRIu64 - " bytes from fd %d offset %ld for sparse map: %s", + " bytes from fd %d offset %jd for sparse map: %s", kd->pt_sparse_size, kd->pmfd, - kd->pt_sparse_off, strerror(errno)); + (intmax_t)kd->pt_sparse_off, strerror(errno)); return (-1); } return (0); @@ -385,7 +386,7 @@ _kvm_pmap_init(kvm_t *kd, uint32_t pmap_size, off_t pm } if (pread(kd->pmfd, kd->page_map, pmap_size, pmap_off) != exp_len) { _kvm_err(kd, kd->program, "cannot read %d bytes from " - "offset %ld for page map", pmap_size, pmap_off); + "offset %jd for page map", pmap_size, (intmax_t)pmap_off); return (-1); } return (0); From owner-svn-src-head@freebsd.org Sun Nov 12 02:34:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2ADE1E65F25; Sun, 12 Nov 2017 02:34:35 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB8197890A; Sun, 12 Nov 2017 02:34:34 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAC2YYrl056816; Sun, 12 Nov 2017 02:34:34 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAC2YYgr056815; Sun, 12 Nov 2017 02:34:34 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201711120234.vAC2YYgr056815@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 12 Nov 2017 02:34:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325733 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 325733 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2017 02:34:35 -0000 Author: mjg Date: Sun Nov 12 02:34:33 2017 New Revision: 325733 URL: https://svnweb.freebsd.org/changeset/base/325733 Log: Use passed thread pointer instead of curthread in sys_sched_yield No functional changes. Modified: head/sys/kern/p1003_1b.c Modified: head/sys/kern/p1003_1b.c ============================================================================== --- head/sys/kern/p1003_1b.c Sun Nov 12 01:36:48 2017 (r325732) +++ head/sys/kern/p1003_1b.c Sun Nov 12 02:34:33 2017 (r325733) @@ -292,8 +292,8 @@ int sys_sched_yield(struct thread *td, struct sched_yield_args *uap) { - sched_relinquish(curthread); - return 0; + sched_relinquish(td); + return (0); } int From owner-svn-src-head@freebsd.org Sun Nov 12 02:45:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A49FE66194; Sun, 12 Nov 2017 02:45:08 +0000 (UTC) (envelope-from matt.joras@gmail.com) Received: from mail-pf0-f194.google.com (mail-pf0-f194.google.com [209.85.192.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 DA70878D3F; Sun, 12 Nov 2017 02:45:07 +0000 (UTC) (envelope-from matt.joras@gmail.com) Received: by mail-pf0-f194.google.com with SMTP id b6so9177922pff.10; Sat, 11 Nov 2017 18:45:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=mM3wKbnvdAKrna9Y0HL3VE3ahRGDTZVNmJWOZhOOAoQ=; b=oemvwYNzfiUfepDUIfwnT4ZPnKma6vV+uZZ/z0iXwbg6LsurOC9vC28jqpkmfvf0PU AXD3cozkkx8x+u+Ub5hOFZg9VmKmB0CXf0Tnqa2JDZhci2r5/b3Ema2Te+j3BvbPK5cG G9gF26BCdr3Q4W+RqHyBZjjD7b824/tWXPXEBy4YXI8ahmLb87B/RMOV/iJgqSf/p1j5 yH5O/LWLbQNpfm3afQRFD/v6uP1u8/SbN5Xzglp8fxVNZTt/JjLfVFWEGzuq9oOBd1RZ 5tqWZKyopS8zQslsRnc8urQoUB2TzkDE950Gir1v/PJ/ThbT7AezdBUSjcyIa6ATzkq1 RWMg== X-Gm-Message-State: AJaThX5aT6nuyXpa+WzwqyxCXIwEGXiD9ccPfMg4hbgrXtgY48aEqL55 vrxRYh3o0Uxn/mfxIyeyY+bTw7G4 X-Google-Smtp-Source: AGs4zMbLUa2+hF85rjpuNRJN0ICnQ8rwlrMW+L5mCUJ/ugtC7Tjl8518dXH8GcQz/qRLNn6mAs6Lkg== X-Received: by 10.159.244.136 with SMTP id y8mr4708475plr.251.1510444412273; Sat, 11 Nov 2017 15:53:32 -0800 (PST) Received: from [192.168.2.122] (174-24-242-218.tukw.qwest.net. [174.24.242.218]) by smtp.gmail.com with ESMTPSA id y20sm594508pgc.52.2017.11.11.15.53.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 Nov 2017 15:53:31 -0800 (PST) Subject: Re: svn commit: r325728 - head/lib/libkvm To: Will Andrews , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201711112330.vABNUwXC077395@repo.freebsd.org> From: Matt Joras Message-ID: <7b61c948-7b54-7590-e633-bd0e29291c27@FreeBSD.org> Date: Sat, 11 Nov 2017 15:53:30 -0800 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <201711112330.vABNUwXC077395@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2017 02:45:08 -0000 On 11/11/2017 15:30, Will Andrews wrote: > Author: will > Date: Sat Nov 11 23:30:58 2017 > New Revision: 325728 > URL: https://svnweb.freebsd.org/changeset/base/325728 > > Log: > libkvm: add kvm_walk_pages API. > > This API allows callers to enumerate all known pages, including any > direct map & kernel map virtual addresses, physical addresses, size, > offset into the core, & protection configured. > > For architectures that support direct map addresses, also generate pages > for any direct map only addresses that are not associated with kernel > map addresses. > > Fix page size portability issue left behind from previous kvm page table > lookup interface. > > Reviewed by: jhb > Sponsored by: Backtrace I/O > Differential Revision: https://reviews.freebsd.org/D12279 This broke powerpc, riscv64, sparc64: *23:36:15* /usr/src/lib/libkvm/kvm_private.c: In function '_kvm_bitmap_init': *23:36:15* /usr/src/lib/libkvm/kvm_private.c:702: warning: declaration of 'index' shadows a global declaration *23:36:15* /usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/strings.h:60: warning: shadowed declaration is here *23:36:15* /usr/src/lib/libkvm/kvm_private.c: In function '_kvm_bitmap_next': *23:36:15* /usr/src/lib/libkvm/kvm_private.c:723: warning: declaration of 'index' shadows a global declaration *23:36:15* /usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/strings.h:60: warning: shadowed declaration is here *23:36:15* *** [kvm_private.o] Error code 1 From owner-svn-src-head@freebsd.org Sun Nov 12 03:13:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D7C7E66ACC; Sun, 12 Nov 2017 03:13:02 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68ECC79D0C; Sun, 12 Nov 2017 03:13:02 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAC3D124074274; Sun, 12 Nov 2017 03:13:01 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAC3D1o4074273; Sun, 12 Nov 2017 03:13:01 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201711120313.vAC3D1o4074273@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 12 Nov 2017 03:13:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325734 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 325734 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2017 03:13:02 -0000 Author: mjg Date: Sun Nov 12 03:13:01 2017 New Revision: 325734 URL: https://svnweb.freebsd.org/changeset/base/325734 Log: amd64: stop nesting preemption counter in spinlock_enter Discussed with: jhb Modified: head/sys/amd64/amd64/machdep.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Sun Nov 12 02:34:33 2017 (r325733) +++ head/sys/amd64/amd64/machdep.c Sun Nov 12 03:13:01 2017 (r325734) @@ -1853,9 +1853,9 @@ spinlock_enter(void) flags = intr_disable(); td->td_md.md_spinlock_count = 1; td->td_md.md_saved_flags = flags; + critical_enter(); } else td->td_md.md_spinlock_count++; - critical_enter(); } void @@ -1865,11 +1865,12 @@ spinlock_exit(void) register_t flags; td = curthread; - critical_exit(); flags = td->td_md.md_saved_flags; td->td_md.md_spinlock_count--; - if (td->td_md.md_spinlock_count == 0) + if (td->td_md.md_spinlock_count == 0) { + critical_exit(); intr_restore(flags); + } } /* From owner-svn-src-head@freebsd.org Sun Nov 12 03:28:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52CF9E66F65; Sun, 12 Nov 2017 03:28:48 +0000 (UTC) (envelope-from will@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 203277A282; Sun, 12 Nov 2017 03:28:48 +0000 (UTC) (envelope-from will@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAC3SlJf078687; Sun, 12 Nov 2017 03:28:47 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAC3SlSW078686; Sun, 12 Nov 2017 03:28:47 GMT (envelope-from will@FreeBSD.org) Message-Id: <201711120328.vAC3SlSW078686@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Sun, 12 Nov 2017 03:28:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325735 - head/lib/libkvm X-SVN-Group: head X-SVN-Commit-Author: will X-SVN-Commit-Paths: head/lib/libkvm X-SVN-Commit-Revision: 325735 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2017 03:28:48 -0000 Author: will Date: Sun Nov 12 03:28:47 2017 New Revision: 325735 URL: https://svnweb.freebsd.org/changeset/base/325735 Log: libkvm: fix lib32 build. Modified: head/lib/libkvm/kvm_i386.c Modified: head/lib/libkvm/kvm_i386.c ============================================================================== --- head/lib/libkvm/kvm_i386.c Sun Nov 12 03:13:01 2017 (r325734) +++ head/lib/libkvm/kvm_i386.c Sun Nov 12 03:28:47 2017 (r325735) @@ -51,6 +51,7 @@ static char sccsid[] = "@(#)kvm_hp300.c 8.1 (Berkeley) #include #include #include +#include #include #ifdef __i386__ From owner-svn-src-head@freebsd.org Sun Nov 12 03:32:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8F32E6715D; Sun, 12 Nov 2017 03:32:48 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pf0-x230.google.com (mail-pf0-x230.google.com [IPv6:2607:f8b0:400e:c00::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 B5FA07A631; Sun, 12 Nov 2017 03:32:48 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-pf0-x230.google.com with SMTP id b79so9483328pfk.5; Sat, 11 Nov 2017 19:32:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=dClzf8riQOQgFYJDcTW3N1P2hv1XuotCV9bxNg7rBBU=; b=L+KGRNAkT1AL39tXZ7Wz17usolFXPkuUwhTdYGhLgYS7acQgTXr5i6zBMAY7FLA7Vs ACiE1TSEcZwmlVonasdnYz4UJsM6NTXmT6Aa2rf6HsG9adbWeuqkOtc5zI8nTOFTIciC vmuBKn7X6em59Iwwg2NOAa+4hA//Q4ErkmaiGKKbB6V1NQrFn28lq4Cb0Gk08vxuhKLN /LlfBNO8HyXcsZALfzznp27Ms3c8w/SM/VHHPw7GuaDd8G3g/tBt4pLF2DjfiBgITHnb EtZT4DBv/eIJ/aY4vBEB/wjVbGgzqUaS5eOffFxoQ7fLGGb9nh6DAJ9cr72uRj2nRajS bbGQ== 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=dClzf8riQOQgFYJDcTW3N1P2hv1XuotCV9bxNg7rBBU=; b=op2JNMgduh7cSseq0NnQ6izz61p0r8aLfH3N1DCuFyZgQ+I1bPb0yuXS4RlVZgUVkT JW4mo739xGXYxIcSJHefq3T+rUWaDpgCsP5cWZZ/zM8AiYzar3oYC4W3biLgSWdJ7Pqa iJr96gPPbdBAzfVqwhwr3cYWLpOjtm8QFFL6ohwOU2/9a+QQMuPVCG8SOjlxcojIqRMp Pq19YvZMK7kHAcVHnuEFgTkd0QDRIW5gNY3Tf4E7Lzq1jLe6tg0T64en3401gUnDgBYw 4H/SpAc1CCvCMuFDsr8ICgm3pdi1nCFhzisLa8s3pGLCTonoV7eBzh9sjpRJ0tJ+IkOR JAng== X-Gm-Message-State: AJaThX6r0EZvGssXLc+mZdKd49gwcMwXFk5OGqMcG2vs6pDnA+4ogmH1 5SO6QVP81KOCAkb63nx0M68eJQ== X-Google-Smtp-Source: AGs4zMYfAnHrnOKaR4XE/w9RQ4FypQ2GwUXsvunVrKTkrbuotEQsNQh1rnXJz5nbN6Mx304uZdcC2A== X-Received: by 10.84.210.237 with SMTP id a100mr5021818pli.177.1510457567726; Sat, 11 Nov 2017 19:32:47 -0800 (PST) Received: from bish (59-125-183-239.HINET-IP.hinet.net. [59.125.183.239]) by smtp.gmail.com with ESMTPSA id b16sm26239266pfe.58.2017.11.11.19.32.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 Nov 2017 19:32:46 -0800 (PST) Sender: Mark Johnston Date: Sat, 11 Nov 2017 23:32:44 -0500 From: Mark Johnston To: Mateusz Guzik Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r325721 - in head/sys: kern sys Message-ID: <20171112043244.GA1266@bish> References: <201711111804.vABI4e6H038060@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201711111804.vABI4e6H038060@repo.freebsd.org> User-Agent: Mutt/1.8.3 (2017-05-23) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2017 03:32:49 -0000 On Sat, Nov 11, 2017 at 06:04:40PM +0000, Mateusz Guzik wrote: > Author: mjg > Date: Sat Nov 11 18:04:39 2017 > New Revision: 325721 > URL: https://svnweb.freebsd.org/changeset/base/325721 > > Log: > Add pfind_any > > It looks for both regular and zombie processes. This avoids allproc relocking > previously seen with pfind -> zpfind calls. > > Modified: > head/sys/kern/kern_event.c > head/sys/kern/kern_proc.c > head/sys/kern/kern_sig.c > head/sys/sys/proc.h > > Modified: head/sys/kern/kern_proc.c > ============================================================================== > --- head/sys/kern/kern_proc.c Sat Nov 11 18:03:26 2017 (r325720) > +++ head/sys/kern/kern_proc.c Sat Nov 11 18:04:39 2017 (r325721) > @@ -353,6 +353,23 @@ pfind(pid_t pid) > return (p); > } > > +/* > + * Same as pfind but allow zombies. > + */ > +struct proc * > +pfind_any(pid_t pid) > +{ > + struct proc *p; > + > + sx_slock(&allproc_lock); > + p = pfind_locked(pid); > + if (p == NULL) > + p = zpfind_locked(pid); > + sx_sunlock(&allproc_lock); > + > + return (p); > +} Can't this be written as pget(pid, 0, &p)? From owner-svn-src-head@freebsd.org Sun Nov 12 03:36:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D465E6726B; Sun, 12 Nov 2017 03:36:23 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-qt0-x243.google.com (mail-qt0-x243.google.com [IPv6:2607:f8b0:400d:c0d::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BA5037A7D1; Sun, 12 Nov 2017 03:36:22 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-qt0-x243.google.com with SMTP id u43so485257qtb.2; Sat, 11 Nov 2017 19:36:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=UI59GyobMzsH8foYfCgF6m631Q5hQMlC6nN9h/T94W4=; b=qKhbELq+uoLtDIZynBhr83lqfQMMpm2AQ0AJHPeaqnhi1Jzz0PyjnRRJdfXViorCey rH6cutDO8iYwMEnT8LDEFwLLKSl4Fv/T7X6i9HxkyFcpDVioh2tpO1TcLAv+7QjxclCk +PTXmUBLUkb1zNac9mgRKhlIPf2Mk8h736suOn2sKtujjAtEYm5apIP9mT5cMQ9x1waZ nB2ybUGQZYeqRTvlMx1EKUmQSB8wFEmhsKTb8vbbWDbVwyqBztmoaCDdhF5c+hnYOvQ2 I8WLULrqwxQn3GFGLU0clU+nAYNHFWaJxxeL7LavNzB3fnPhQaoltSIuP9yrioE2ilHk 88JQ== 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=UI59GyobMzsH8foYfCgF6m631Q5hQMlC6nN9h/T94W4=; b=O2sPXLm/NVfGXf4s2lJQJT9WB87ogQYMqHDg2e24fC7Sfe6BZXC88QVDyFGwIvXyUj dePY27C9gG5fBv3afb7Xx0waUALvKq7kETzcDOGxRCEaRj4Ke3a2zYPpfZdUQTmRIBxs a0IinL/cCgAKBMllUU1ZjoYYAEoHOfZdciJspp5C20atSKj6bigUwBPi3l47dL4ZIn4N 5YVdTO6IFeYZ4X//aUET2f7Cc4k5qC8yizlzRssecPfC6DDFzX4KF3WnpnZJB6/ejBJh XNJ7zGFmbwI4W4CnE+q/MHvVZFIYBKEEMR+5mMsZpeGhOxeP0MVewq4VjmPrSehNp/0R 5p7w== X-Gm-Message-State: AJaThX54r69W9WfCPkMHK6MmJhuEaq71q3kGtkN/KswbOlK3PJUbSl0L uIGOjs1O3QX8HklKn9nn+1vrmmkfSUiOyGT4ITs= X-Google-Smtp-Source: AGs4zMZjhs2G0U0WqVk9k/7/hqpZo5hwrjlF/jOBAeuV98JuWL+sEh7qdWGmCNVWGTIByqQfgrcsoWEwbw/AX2g5dRo= X-Received: by 10.237.33.186 with SMTP id l55mr8488765qtc.71.1510457781915; Sat, 11 Nov 2017 19:36:21 -0800 (PST) MIME-Version: 1.0 Received: by 10.237.52.198 with HTTP; Sat, 11 Nov 2017 19:36:21 -0800 (PST) In-Reply-To: <20171112043244.GA1266@bish> References: <201711111804.vABI4e6H038060@repo.freebsd.org> <20171112043244.GA1266@bish> From: Mateusz Guzik Date: Sun, 12 Nov 2017 04:36:21 +0100 Message-ID: Subject: Re: svn commit: r325721 - in head/sys: kern sys To: Mark Johnston Cc: 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.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2017 03:36:23 -0000 On Sun, Nov 12, 2017 at 5:32 AM, Mark Johnston wrote: > On Sat, Nov 11, 2017 at 06:04:40PM +0000, Mateusz Guzik wrote: > > Author: mjg > > Date: Sat Nov 11 18:04:39 2017 > > New Revision: 325721 > > URL: https://svnweb.freebsd.org/changeset/base/325721 > > > > Log: > > Add pfind_any > > > > It looks for both regular and zombie processes. This avoids allproc > relocking > > previously seen with pfind -> zpfind calls. > > > > +/* > > + * Same as pfind but allow zombies. > > + */ > > +struct proc * > > +pfind_any(pid_t pid) > > +{ > > + struct proc *p; > > + > > + sx_slock(&allproc_lock); > > + p = pfind_locked(pid); > > + if (p == NULL) > > + p = zpfind_locked(pid); > > + sx_sunlock(&allproc_lock); > > + > > + return (p); > > +} > > Can't this be written as pget(pid, 0, &p)? > It can, but at the expense of avoidable branch-fest. pget is rarely called in comparison anyway. -- Mateusz Guzik From owner-svn-src-head@freebsd.org Sun Nov 12 06:48:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7016E6A5BE; Sun, 12 Nov 2017 06:48:47 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 20FCD7E8A6; Sun, 12 Nov 2017 06:48:47 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 337C01049217; Sun, 12 Nov 2017 17:48:38 +1100 (AEDT) Date: Sun, 12 Nov 2017 17:48:33 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Mateusz Guzik cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r325734 - head/sys/amd64/amd64 In-Reply-To: <201711120313.vAC3D1o4074273@repo.freebsd.org> Message-ID: <20171112151145.Q1144@besplex.bde.org> References: <201711120313.vAC3D1o4074273@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=cK6QihWN c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=4XHJDQAroa2FB1xilKcA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2017 06:48:47 -0000 On Sun, 12 Nov 2017, Mateusz Guzik wrote: > Log: > amd64: stop nesting preemption counter in spinlock_enter > > Discussed with: jhb This seems to break it. i386 still has the old code. It also moves the critical section a little, so that it is inconsistent for enter/exit. I think the critical section placement was harmlessly wrong, and moving it further fixes the new bugs too. > Modified: head/sys/amd64/amd64/machdep.c > ============================================================================== > --- head/sys/amd64/amd64/machdep.c Sun Nov 12 02:34:33 2017 (r325733) > +++ head/sys/amd64/amd64/machdep.c Sun Nov 12 03:13:01 2017 (r325734) > @@ -1853,9 +1853,9 @@ spinlock_enter(void) > flags = intr_disable(); > td->td_md.md_spinlock_count = 1; > td->td_md.md_saved_flags = flags; > + critical_enter(); > } else > td->td_md.md_spinlock_count++; > - critical_enter(); > } > > void The main broken case is: - both levels initially 0 - disable interrupts - raise spinlock count to 1 - bad race window until critical_enter() is called. Disabling hardware interrupts doesn't prevent exceptions like debugger traps or NMIs. Debuuger trap handlers shouldn't use critical sections or (spin) mutexes, but NMI handlers might. When an exception handler calls spinlock_enter(), this no longer gives a critical section and bad things like context switches occur if the handler calls critical_enter/ exit(). The main old race is: - as above, except the race is not so bad (I think it is harmless). Nested calls to spinlock_enter() can still occur, but at all levels, spinlock_enter() never returns without entering a critical section, so callers aren't affected. I think the worst that happens is a when nested spinlock_exit() lowers the critical level to 0, context switches may occur. This isn't a large problem since higher spinlock_ enter() levels are still entering -- they have disabled interrupts, but nothing depends on this. See r214835 for larger bugs related to the old race. Exceptions cannot be prevented, and r214835 defends against them only for the spinlock context. Defending against preemption is even easier. Just move the critical_enter() to before disabling interrupts. > @@ -1865,11 +1865,12 @@ spinlock_exit(void) > register_t flags; > > td = curthread; > - critical_exit(); > flags = td->td_md.md_saved_flags; > td->td_md.md_spinlock_count--; > - if (td->td_md.md_spinlock_count == 0) > + if (td->td_md.md_spinlock_count == 0) { > + critical_exit(); > intr_restore(flags); > + } > } > > /* This used to call critical_exit() at the beginning. This corresponds to calling critical_enter() at the end of spinlock_enter(), and gives the same race. Now it calls critical_exit() after lowering the spinlock count. This closes only half of the old race window. After moving the call to critical_enter() earlier, moving the call to critical_exit() later to match closes all of the old race window. The new bug only affects spinlock entry. For exit, there is just the old race with a reduced window. I don't like this change. The nested counting is easier to understand, and the nested case is very rare and the critical section part of it is very efficient (then critical_exit() is just lowering the level). Old versions of these functions were written to try to reduce branches and other bad scheduling for the usual non-nested case. Perhaps this isn't done right. It is intentionally not obfuscated with __predict_*(). spinlock_exit() ended up without the optimization(?) of avoiding the decrement in the usual case, where spinlock_enter() uses special 0/1 logic for the usual case and needs extra code for the increment in the unusual case. Since the slow parts are probably the critical_*() function calls and the flags changes, perhaps those should be optimized instead. The old version tried to do this for the function calls by doing them unconditionally. This should have worked best for the call in critical_exit() since the call is first (but should be last). The order is critical, and the flags changes use volatile asms which force the order more than elsewhere. I think the nested case is only for recursive spinlocks. So NMI handlers should not use any spinlocks and the new bug is small (NMI handlers should not use non-recursive spinlocks since they would deadlock, and should not use recursive spinlocks since they don't work). NMI handlers aren't that careful. They call printf(), and even the message buffer has been broken to use non-recursive spinlocks. Bruce From owner-svn-src-head@freebsd.org Sun Nov 12 07:16:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ECD48E6ACEC; Sun, 12 Nov 2017 07:16:23 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id BBCCD7F435; Sun, 12 Nov 2017 07:16:22 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 8CF841042A9; Sun, 12 Nov 2017 18:16:15 +1100 (AEDT) Date: Sun, 12 Nov 2017 18:16:11 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bruce Evans cc: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r325734 - head/sys/amd64/amd64 In-Reply-To: <20171112151145.Q1144@besplex.bde.org> Message-ID: <20171112175214.X1521@besplex.bde.org> References: <201711120313.vAC3D1o4074273@repo.freebsd.org> <20171112151145.Q1144@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=KeqiiUQD c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=tmvYXxwOFt-jAsbioBsA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2017 07:16:24 -0000 On Sun, 12 Nov 2017, Bruce Evans wrote: > On Sun, 12 Nov 2017, Mateusz Guzik wrote: > >> Log: >> amd64: stop nesting preemption counter in spinlock_enter >> >> Discussed with: jhb > > This seems to break it. i386 still has the old code. > ... > The main broken case is: > - both levels initially 0 > - disable interrupts > - raise spinlock count to 1 > - bad race window until critical_enter() is called. Disabling hardware > interrupts doesn't prevent exceptions like debugger traps or NMIs. > Debuuger trap handlers shouldn't use critical sections or (spin) > mutexes, but NMI handlers might. When an exception handler calls > spinlock_enter(), this no longer gives a critical section and bad > things like context switches occur if the handler calls critical_enter/ > exit(). > ... > I don't like this change. The nested counting is easier to understand, > and the nested case is very rare and the critical section part of it is > very efficient (then critical_exit() is just lowering the level). Old > ... > I think the nested case is only for recursive spinlocks. So NMI handlers > should not use any spinlocks and the new bug is small (NMI handlers should > not use non-recursive spinlocks since they would deadlock, and should not > use recursive spinlocks since they don't work). NMI handlers aren't that > careful. They call printf(), and even the message buffer has been broken > to use non-recursive spinlocks. Actually, it is valid for NMI handlers to use spinlocks via mtx_trylock_spin() in the non-kdb non-panic case, and that is what my fixes for printf() do. I had confused "nesting preemption counter" (td_critnest) with interrupt nesting (the bogus td_intr_nesting_level). td_critnest was incremented for every concurrently held spinlock, so it could grow quite large without any interrupt/exception recursion. So the micro-optimization of td_critnest is useful if it is faster and fixed to work. Bruce From owner-svn-src-head@freebsd.org Sun Nov 12 07:18:12 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E8B0E6AE5C; Sun, 12 Nov 2017 07:18: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 282567F64F; Sun, 12 Nov 2017 07:18: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 vAC7IBaC073438; Sun, 12 Nov 2017 07:18:11 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAC7IB3A073436; Sun, 12 Nov 2017 07:18:11 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201711120718.vAC7IB3A073436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Sun, 12 Nov 2017 07:18:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325736 - in head: lib/libcasper/libcasper sbin/ping X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: in head: lib/libcasper/libcasper sbin/ping X-SVN-Commit-Revision: 325736 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2017 07:18:12 -0000 Author: oshogbo Date: Sun Nov 12 07:18:10 2017 New Revision: 325736 URL: https://svnweb.freebsd.org/changeset/base/325736 Log: We return a pointer when we are using cap_init() or cap_service_open() function, so check if cap_chanel_t is NULL is not enough. Casper with a normal libc will still fail in capability mote so let's not enter capability mode without casper support when we need to resolve DNS. Reviewed by: cem Differential Revision: https://reviews.freebsd.org/D12823 Modified: head/lib/libcasper/libcasper/libcasper.h head/sbin/ping/ping.c Modified: head/lib/libcasper/libcasper/libcasper.h ============================================================================== --- head/lib/libcasper/libcasper/libcasper.h Sun Nov 12 03:28:47 2017 (r325735) +++ head/lib/libcasper/libcasper/libcasper.h Sun Nov 12 07:18:10 2017 (r325736) @@ -56,11 +56,13 @@ typedef struct nvlist nvlist_t; struct cap_channel; typedef struct cap_channel cap_channel_t; +#define CASPER_SUPPORT (1) #else struct cap_channel { int cch_fd; }; typedef struct cap_channel cap_channel_t; +#define CASPER_SUPPORT (0) #endif /* ! WITH_CASPER */ #endif /* ! _CAP_CHANNEL_T_DECLARED */ Modified: head/sbin/ping/ping.c ============================================================================== --- head/sbin/ping/ping.c Sun Nov 12 03:28:47 2017 (r325735) +++ head/sbin/ping/ping.c Sun Nov 12 07:18:10 2017 (r325736) @@ -709,7 +709,7 @@ main(int argc, char *const *argv) if (options & F_NUMERIC) cansandbox = true; else if (capdns != NULL) - cansandbox = true; + cansandbox = CASPER_SUPPORT; else cansandbox = false; From owner-svn-src-head@freebsd.org Sun Nov 12 08:00:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA301E6BA31; Sun, 12 Nov 2017 08:00:58 +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 877EE8041A; Sun, 12 Nov 2017 08:00:58 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAC80vf8090001; Sun, 12 Nov 2017 08:00:57 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAC80v6U090000; Sun, 12 Nov 2017 08:00:57 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201711120800.vAC80v6U090000@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 12 Nov 2017 08:00:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325737 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 325737 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2017 08:00:59 -0000 Author: bapt Date: Sun Nov 12 08:00:57 2017 New Revision: 325737 URL: https://svnweb.freebsd.org/changeset/base/325737 Log: Update to 2017.10.21 MFC after: 3 days Modified: head/share/misc/pci_vendors Modified: head/share/misc/pci_vendors ============================================================================== --- head/share/misc/pci_vendors Sun Nov 12 07:18:10 2017 (r325736) +++ head/share/misc/pci_vendors Sun Nov 12 08:00:57 2017 (r325737) @@ -3,8 +3,8 @@ # # List of PCI ID's # -# Version: 2017.09.01 -# Date: 2017-09-01 03:15:02 +# Version: 2017.10.21 +# Date: 2017-10-21 03:15:01 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at http://pci-ids.ucw.cz/. @@ -79,18 +79,18 @@ 0b0b Rhino Equipment Corp. 0105 R1T1 0205 R4FXO - 0206 RCB4FXO 4-channel FXO analog telphony card + 0206 RCB4FXO 4-channel FXO analog telephony card 0305 R4T1 0405 R8FXX - 0406 RCB8FXX 8-channel modular analog telphony card + 0406 RCB8FXX 8-channel modular analog telephony card 0505 R24FXX - 0506 RCB24FXS 24-Channel FXS analog telphony card + 0506 RCB24FXS 24-Channel FXS analog telephony card 0605 R2T1 0705 R24FXS - 0706 RCB24FXO 24-Channel FXO analog telphony card + 0706 RCB24FXO 24-Channel FXO analog telephony card 0905 R1T3 Single T3 Digital Telephony Card - 0906 RCB24FXX 24-channel modular analog telphony card - 0a06 RCB672FXX 672-channel modular analog telphony card + 0906 RCB24FXX 24-channel modular analog telephony card + 0a06 RCB672FXX 672-channel modular analog telephony card 0e11 Compaq Computer Corporation 0001 PCI to EISA Bridge 0002 PCI to ISA Bridge @@ -251,6 +251,9 @@ 1028 1fd4 PERC H745P MX 1d49 0602 ThinkSystem RAID 930-16i 4GB Flash PCIe 12Gb Adapter 1d49 0604 ThinkSystem RAID 930-8e 4GB Flash PCIe 12Gb Adapter + 8086 352d Integrated RAID Module RMSP3AD160F + 8086 9460 RAID Controller RSP3TD160F + 8086 9480 RAID Controller RSP3MD088F 0015 MegaRAID Tri-Mode SAS3416 0016 MegaRAID Tri-Mode SAS3508 1028 1fc9 PERC H840 Adapter @@ -260,9 +263,15 @@ 1d49 0601 ThinkSystem RAID 930-8i 2GB Flash PCIe 12Gb Adapter 1d49 0603 ThinkSystem RAID 930-24i 4GB Flash PCIe 12Gb Adapter 1d49 0604 ThinkSystem RAID 930-8e 4GB Flash PCIe 12Gb Adapter + 8086 352e Integrated RAID Module RMSP3CD080F + 8086 352f Integrated RAID Module RMSP3HD080E + 8086 9461 RAID Controller RSP3DD080F 0017 MegaRAID Tri-Mode SAS3408 1d49 0500 ThinkSystem RAID 530-8i PCIe 12Gb Adapter 1d49 0502 ThinkSystem RAID 530-8i Dense Adapter + 8086 3528 Integrated RAID RMSP3LD060 + 8086 3529 Integrated RAID RMSP3LD060 + 8086 9441 RAID Controller RSP3WD080E 001b MegaRAID Tri-Mode SAS3504 1d49 0605 ThinkSystem RAID 930-4i 2GB Flash Flex Adapter 001c MegaRAID Tri-Mode SAS3404 @@ -586,9 +595,12 @@ 1028 1fd3 HBA330 MMZ 1bd4 0011 Inspur 12Gb 8i-3008 IT SAS HBA 00ab SAS3516 Fusion-MPT Tri-Mode RAID On Chip (ROC) + 8086 3530 Integrated RAID Module RMSP3JD160J 00ac SAS3416 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) 1d49 0201 ThinkSystem 430-16i SAS/SATA 12Gb HBA 1d49 0203 ThinkSystem 430-16e SAS/SATA 12Gb HBA + 8086 3000 RAID Controller RSP3QD160J + 8086 3020 RAID Controller RSP3GD016J 00ae SAS3508 Fusion-MPT Tri-Mode RAID On Chip (ROC) 00af SAS3408 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) 1d49 0200 ThinkSystem 430-8i SAS/SATA 12Gb HBA @@ -614,6 +626,9 @@ 00d0 SAS3716 Fusion-MPT Tri-Mode RAID Controller Chip (ROC) 00d1 SAS3616 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) 00d3 MegaRAID Tri-Mode SAS3716W + 02b0 Virtual Endpoint on PCIe Switch + 1d49 0001 ThinkSystem 1610-4P NVMe Switch Adapter + 1d49 0002 ThinkSystem 810-4P NVMe Switch Adapter 0407 MegaRAID 1000 0530 MegaRAID 530 SCSI 320-0X RAID Controller 1000 0531 MegaRAID 531 SCSI 320-4X RAID Controller @@ -904,6 +919,7 @@ 1043 836c M4A785TD Motherboard 1043 8410 M4A89GTD PRO/USB3 Motherboard 1043 841b M5A88-V EVO + 105b 0e13 N15235/A74MX mainboard / AMD SB700 1179 ff50 Satellite P305D-S8995E 1458 a022 GA-MA770-DS3rev2.0 Motherboard 17f2 5000 KI690-AM2 Motherboard @@ -914,6 +930,7 @@ 103c 280a DC5750 Microtower 1043 82ef M3A78-EH Motherboard 1043 8389 M4A785TD Motherboard + 105b 0e13 N15235/A74MX mainboard / AMD SB700 1179 ff50 Satellite P305D-S8995E 1458 4385 GA-MA770-DS3rev2.0 Motherboard 1462 7368 K9AG Neo2 @@ -965,14 +982,17 @@ 4390 SB7x0/SB8x0/SB9x0 SATA Controller [IDE mode] 1043 82ef M3A78-EH Motherboard 1043 8389 M4A785TD Motherboard + 105b 0e13 N15235/A74MX mainboard / AMD SB700 1458 b002 GA-MA770-DS3rev2.0 Motherboard 1849 4390 Motherboard (one of many) 4391 SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode] 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO + 105b 0e13 N15235/A74MX mainboard / AMD SB700 174b 1001 PURE Fusion Mini 4392 SB7x0/SB8x0/SB9x0 SATA Controller [Non-RAID5 mode] + 105b 0e13 N15235/A74MX mainboard / AMD SB700 4393 SB7x0/SB8x0/SB9x0 SATA Controller [RAID5 mode] 4394 SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode] 4395 SB8x0/SB9x0 SATA Controller [Storage mode] @@ -981,6 +1001,7 @@ 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO + 105b 0e13 N15235/A74MX mainboard / AMD SB700 15d9 a811 H8DGU 174b 1001 PURE Fusion Mini 4397 SB7x0/SB8x0/SB9x0 USB OHCI0 Controller @@ -988,25 +1009,30 @@ 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO + 105b 0e13 N15235/A74MX mainboard / AMD SB700 15d9 a811 H8DGU 174b 1001 PURE Fusion Mini 4398 SB7x0 USB OHCI1 Controller 1019 2120 A785GM-M 1043 82ef M3A78-EH Motherboard + 105b 0e13 N15235/A74MX mainboard / AMD SB700 15d9 a811 H8DGU 4399 SB7x0/SB8x0/SB9x0 USB OHCI2 Controller 1019 2120 A785GM-M 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO + 105b 0e13 N15235/A74MX mainboard / AMD SB700 174b 1001 PURE Fusion Mini 439c SB7x0/SB8x0/SB9x0 IDE Controller 1019 2120 A785GM-M 1043 82ef M3A78-EH Motherboard + 105b 0e13 N15235/A74MX mainboard / AMD SB700 439d SB7x0/SB8x0/SB9x0 LPC host controller 1019 2120 A785GM-M 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO + 105b 0e13 N15235/A74MX mainboard / AMD SB700 174b 1001 PURE Fusion Mini 43a0 SB700/SB800/SB900 PCI to PCI bridge (PCIE port 0) 43a1 SB700/SB800/SB900 PCI to PCI bridge (PCIE port 1) @@ -1574,6 +1600,7 @@ 103c 8006 FirePro M4170 17aa 3643 Radeon R7 A360 6605 Opal PRO [Radeon R7 M260] + 103c 2259 FirePro M4150 6606 Mars XTX [Radeon HD 8790M] 1028 0684 FirePro W4170M 6607 Mars LE [Radeon HD 8530M / R5 M240] @@ -1637,12 +1664,13 @@ 1462 2938 Radeon R9 360 OEM 1462 3271 Radeon R9 360 OEM 1682 7360 Radeon R7 360 - 6660 Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430] + 6660 Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430 / R7 M520] 1028 05ea Radeon HD 8670M 1028 06bf Radeon R5 M335 103c 1970 Radeon HD 8670M 103c 80be Radeon R5 M330 103c 8136 Radeon R5 M330 + 103c 8329 Radeon R7 M520 17aa 3804 Radeon R5 M330 17aa 3809 Radeon R5 M330 17aa 381a Radeon R5 M430 @@ -2164,6 +2192,7 @@ # GV-R928XOC-3GD 1458 3001 Tahiti XTL [Radeon R9 280X OC] 1462 2774 MSI R7970 TF 3GD5/OC BE + 1682 3001 Tahiti XTL [Radeon R9 280X] 1682 3211 Double D HD 7970 Black Edition # FX-797A-TNBC 1682 3213 HD 7970 Black Edition @@ -2271,7 +2300,13 @@ 67e8 Baffin [Polaris11] 67e9 Baffin [Polaris11] 67eb Baffin [Polaris11] - 67ef Baffin [Radeon RX 460] + 67ef Baffin [Radeon RX 460/560D / Pro 450/455/460/560] + 106b 0160 Radeon Pro 460 + 106b 0166 Radeon Pro 455 + 106b 0167 Radeon Pro 450 + 106b 0179 Radeon Pro 560 + 1642 1727 Polaris 21 XL [Radeon RX 560D] + 1682 956d Polaris 21 XL [Radeon RX 560D] 67ff Baffin [Radeon RX 560] 6800 Wimbledon XT [Radeon HD 7970M] 1002 0124 Radeon HD 7970M @@ -3120,8 +3155,9 @@ 7910 RS690 Host Bridge 1179 ff50 Satellite P305D-S8995E 17f2 5000 KI690-AM2 Motherboard - 7911 RS690 Host Bridge - 7912 RS690 PCI to PCI Bridge (Internal gfx) + 7911 RS690/RS740 Host Bridge + 1002 7910 RS690/RS740 Host Bridge + 7912 RS690/RS740 PCI to PCI Bridge (Internal gfx) 7913 RS690 PCI to PCI Bridge (PCI Express Graphics Port 0) 7915 RS690 PCI to PCI Bridge (PCI Express Port 1) 7916 RS690 PCI to PCI Bridge (PCI Express Port 2) @@ -3146,6 +3182,7 @@ 7941 RS600 [Radeon Xpress 1250] 7942 RS600M [Radeon Xpress 1250] 796e RS740 [Radeon 2100] + 105b 0e13 N15235/A74MX mainboard 9400 R600 [Radeon HD 2900 PRO/XT] 1002 2552 Radeon HD 2900 XT 1002 3000 Radeon HD 2900 PRO @@ -3363,6 +3400,7 @@ 9840 Kabini HDMI/DP Audio 9850 Mullins [Radeon R3 Graphics] 9851 Mullins [Radeon R4/R5 Graphics] + 1179 f928 Beema [Radeon R5 Graphics] 9852 Mullins [Radeon R2 Graphics] 9853 Mullins [Radeon R2 Graphics] 9854 Mullins [Radeon R3E Graphics] @@ -4004,8 +4042,23 @@ 1437 Liverpool I/O Memory Management Unit 1438 Liverpool Processor Root Port 1439 Family 16h Processor Functions 5:1 + 1450 Family 17h (Models 00h-0fh) Root Complex + 1451 Family 17h (Models 00h-0fh) I/O Memory Management Unit + 1452 Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge + 1454 Family 17h (Models 00h-0fh) Internal PCIe GPP Bridge 0 to Bus B + 1456 Family 17h (Models 00h-0fh) Platform Security Processor + 1457 Family 17h (Models 00h-0fh) HD Audio Controller 145b Zeppelin Non-Transparent Bridge - 145c USB3 Host Controller + 145c Family 17h (Models 00h-0fh) USB 3.0 Host Controller + 145f USB 3.0 Host controller + 1460 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 0 + 1461 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 1 + 1462 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 2 + 1463 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 3 + 1464 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 4 + 1465 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 5 + 1466 Family 17h (Models 00h-0fh) Data Fabric Device 18h Function 6 + 1467 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 7 1510 Family 14h Processor Root Complex 174b 1001 PURE Fusion Mini 1512 Family 14h Processor Root Port @@ -4090,7 +4143,9 @@ 43a1 Hudson PCI to PCI bridge (PCIE port 1) 43a2 Hudson PCI to PCI bridge (PCIE port 2) 43a3 Hudson PCI to PCI bridge (PCIE port 3) - 43bb USB 3.1 XHCI Controller + 43b4 300 Series Chipset PCIe Port + 43b7 300 Series Chipset SATA Controller + 43bb 300 Series Chipset USB 3.1 xHCI Controller 7006 AMD-751 [Irongate] System Controller 7007 AMD-751 [Irongate] AGP Bridge 700a AMD-IGR4 AGP Host to PCI Bridge @@ -4545,6 +4600,7 @@ 0533 MGA G200EH 103c 3381 iLO4 0534 G200eR2 + 0536 Integrated Matrox G200eW3 Graphics Controller 0538 G200eH 1590 00e4 iLO5 VGA 0540 M91XX @@ -4585,7 +4641,7 @@ 102b 0f84 Millennium G550 Dual Head DDR 32Mb 102b 1e41 Millennium G550 102b 2300 Millennium G550 LP PCIE - 2537 Millenium P650/P750 + 2537 Millennium P650/P750 102b 1820 Millennium P750 64MB 102b 1830 Millennium P650 64MB 102b 1850 RAD2mp @@ -4593,7 +4649,7 @@ 102b 1880 Sono S10 102b 1c10 QID 128MB 102b 2811 Millennium P650 Low-profile PCI 64MB - 102b 2821 Millenium P650 Low-profile PCI + 102b 2821 Millennium P650 Low-profile PCI 102b 2841 RAD PCI 102b 2851 Spectrum PCI 102b 2871 EpicA TC2 @@ -4607,7 +4663,7 @@ 102b 3051 RG-400SL 102b 3061 Extio F1420 102b 3081 Extio F1240 - 2538 Millenium P650 PCIe + 2538 Millennium P650 PCIe 102b 0847 RAD PCIe 102b 08c7 Millennium P650 PCIe 128MB 102b 0907 Millennium P650 PCIe 64MB @@ -4615,23 +4671,23 @@ 102b 0987 ATC PCIe 4MP 102b 1047 Millennium P650 LP PCIe 128MB 102b 1087 Millennium P650 LP PCIe 64MB - 102b 1801 Millenium P650 PCIe x1 + 102b 1801 Millennium P650 PCIe x1 102b 2538 Parhelia APVe 102b 3007 QID Low-profile PCIe 102b 3087 Aurora VX3mp 102b 30c7 QID LP PCIe 2539 Millennium P690 - 102b 0040 Millenium P690 PCIe x16 + 102b 0040 Millennium P690 PCIe x16 102b 0042 ONYX 102b 0043 SPECTRA - 102b 0080 Millenium P690 Plus LP PCIe x16 - 102b 0081 Millenium P690 LP PCIe x16 + 102b 0080 Millennium P690 Plus LP PCIe x16 + 102b 0081 Millennium P690 LP PCIe x16 102b 0082 RAD LPX PCIe x16 - 102b 00c0 Millenium P690 Plus LP PCI - 102b 00c2 Millenium P690 LP PCI + 102b 00c0 Millennium P690 Plus LP PCI + 102b 00c2 Millennium P690 LP PCI 102b 00c3 RAD LPX PCI - 102b 0101 Millenium P690 PCI - 102b 0140 Millenium P690 LP PCIe x1 + 102b 0101 Millennium P690 PCI + 102b 0140 Millennium P690 LP PCIe x1 102b 0180 Display Wall IP Decode 128 MB 4164 Morphis QxT frame grabber 43b4 Morphis Qxt encoding engine @@ -5146,11 +5202,9 @@ 3308 Integrated Lights-Out Standard MS Watchdog Timer 103c 330e iLO3 103c 3381 iLO4 - 402f PCIe Root Port 4030 zx2 System Bus Adapter 4031 zx2 I/O Controller 4037 PCIe Local Bus Adapter - 403b PCIe Root Port 103e Solliday Engineering 103f Synopsys/Logic Modeling Group 1040 Accelgraphics Inc. @@ -5167,7 +5221,6 @@ 0675 1704 ISDN Adapter (PCI Bus, D, C) 0675 1707 ISDN Adapter (PCI Bus, DV, W) 10cf 105e ISDN Adapter (PCI Bus, DV, W) - 13a0 Transformer Book T101HA-GR030R # Should be 1022:9602 9602 AMD RS780/RS880 PCI to PCI bridge (int gfx) 1043 83a2 M4A785TD Motherboard @@ -6132,6 +6185,7 @@ 1077 015e QLE2564 PCI Express to 8Gb FC Quad Channel 1077 0167 QME2572 Dual Port FC8 HBA Mezzanine 1590 00fc StoreFabric 84Q 8Gb Quad Port Fibre Channel Host Bus Adapter + 2971 ISP2684 3022 ISP4022-based Ethernet NIC 3032 ISP4032-based Ethernet IPv6 NIC 4010 ISP4010-based iSCSI TOE HBA @@ -9234,19 +9288,19 @@ 0533 C67 [GeForce 7000M / nForce 610M] 053a C68 [GeForce 7050 PV / nForce 630a] 053b C68 [GeForce 7050 PV / nForce 630a] - 1043 8308 M2N68-AM Motherbord + 1043 8308 M2N68-AM Motherboard 053e C68 [GeForce 7025 / nForce 630a] 0541 MCP67 Memory Controller 0542 MCP67 SMBus - 1043 8308 M2N68-AM Motherbord + 1043 8308 M2N68-AM Motherboard 0543 MCP67 Co-processor 0547 MCP67 Memory Controller - 1043 8308 M2N68-AM Motherbord + 1043 8308 M2N68-AM Motherboard 1849 0547 ALiveNF7G-HDready 0548 MCP67 ISA Bridge 1043 8308 M2N68-AM Motherboard 054c MCP67 Ethernet - 1043 8308 M2N68-AM Motherbord + 1043 8308 M2N68-AM Motherboard 1849 054c ALiveNF7G-HDready, MCP67 Gigabit Ethernet 054d MCP67 Ethernet 054e MCP67 Ethernet @@ -9936,7 +9990,7 @@ 0dc0 GF106 [GeForce GT 440] 0dc4 GF106 [GeForce GTS 450] 0dc5 GF106 [GeForce GTS 450 OEM] - 0dc6 GF106 [GeForce GTS 450] + 0dc6 GF106 [GeForce GTS 450 OEM] 0dcd GF106M [GeForce GT 555M] 0dce GF106M [GeForce GT 555M] 0dd1 GF106M [GeForce GTX 460M] @@ -9956,7 +10010,7 @@ 0de5 GF108 [GeForce GT 530] 0de7 GF108 [GeForce GT 610] 0de8 GF108M [GeForce GT 620M] - 0de9 GF108M [GeForce GT 630M] + 0de9 GF108M [GeForce GT 620M/630M/635M/640M LE] 1025 0692 GeForce GT 620M 1025 0725 GeForce GT 620M 1025 0728 GeForce GT 620M @@ -10177,7 +10231,7 @@ 1086 GF110 [GeForce GTX 570 Rev. 2] 1087 GF110 [GeForce GTX 560 Ti 448 Cores] 1088 GF110 [GeForce GTX 590] - 1089 GF110 [GeForce GTX 580] + 1089 GF110 [GeForce GTX 580 Rev. 2] 108b GF110 [GeForce GTX 580] 108e GF110GL [Tesla C2090] 1091 GF110GL [Tesla M2090] @@ -10301,12 +10355,31 @@ 1028 065e GeForce 820M 1028 0662 GeForce 820M 1028 068d GeForce 820M + 1028 06ad GeForce 820M + 1028 06ae GeForce 820M + 1028 06af GeForce 820M + 1028 06b0 GeForce 820M + 1028 06c0 GeForce 820M 1028 06c1 GeForce 820M 103c 18ef GeForce GT 630M 103c 18f9 GeForce GT 630M 103c 18fb GeForce GT 630M 103c 18fd GeForce GT 630M 103c 18ff GeForce GT 630M + 103c 218a GeForce 820M + 103c 21bb GeForce 820M + 103c 21bc GeForce 820M + 103c 220e GeForce 820M + 103c 2210 GeForce 820M + 103c 2212 GeForce 820M + 103c 2214 GeForce 820M + 103c 2218 GeForce 820M + 103c 225b GeForce 820M + 103c 225d GeForce 820M + 103c 226d GeForce 820M + 103c 226f GeForce 820M + 103c 22d2 GeForce 820M + 103c 22d9 GeForce 820M 103c 2335 GeForce 820M 103c 2337 GeForce 820M 103c 2aef GeForce GT 720A @@ -10344,6 +10417,7 @@ 1043 228a GeForce 820M 1043 232a GeForce 820M 1043 233a GeForce 820M + 1043 235a GeForce 820M 1043 236a GeForce 820M 1043 238a GeForce 820M 1043 8595 GeForce GT 720M @@ -10359,6 +10433,8 @@ 1043 8643 GeForce 820M 1043 864c GeForce 820M 1043 8652 GeForce 820M + 1043 8660 GeForce 820M + 1043 8661 GeForce 820M 105b 0dac GeForce GT 720M 105b 0dad GeForce GT 720M 105b 0ef3 GeForce GT 720M @@ -10433,8 +10509,10 @@ 17aa 309c GeForce GT 720A 17aa 30b4 GeForce 820A 17aa 30b7 GeForce 720A + 17aa 30e4 GeForce 820A 17aa 361b GeForce 820A 17aa 361c GeForce 820A + 17aa 361d GeForce 820A 17aa 3656 GeForce GT 620M 17aa 365a GeForce 705M 17aa 365e GeForce 800M @@ -10644,10 +10722,10 @@ 1282 GK208 [GeForce GT 640 Rev. 2] 1284 GK208 [GeForce GT 630 Rev. 2] 1286 GK208 [GeForce GT 720] - 1287 GK208 [GeForce GT 730] - 1288 GK208 [GeForce GT 720] + 1287 GK208B [GeForce GT 730] + 1288 GK208B [GeForce GT 720] 1289 GK208 [GeForce GT 710] - 128b GK208 [GeForce GT 710B] + 128b GK208B [GeForce GT 710] 1290 GK208M [GeForce GT 730M] 103c 2afa GeForce GT 730A 103c 2b04 GeForce GT 730A @@ -10671,11 +10749,12 @@ 17aa 367c GeForce 710A 1296 GK208M [GeForce 825M] 1298 GK208M [GeForce GT 720M] - 1299 GK208M [GeForce 920M] + 1299 GK208BM [GeForce 920M] 17aa 30bb GeForce 920A + 17aa 30df GeForce 920A 17aa 36a7 GeForce 920A 17aa 36af GeForce 920M - 129a GK208M [GeForce 910M] + 129a GK208BM [GeForce 910M] 12a0 GK208 12b9 GK208GLM [Quadro K610M] 12ba GK208GLM [Quadro K510M] @@ -10692,6 +10771,7 @@ 1349 GM108M [GeForce 930M] 134b GM108M [GeForce 940MX] 134d GM108M [GeForce 940MX] + 17aa 2248 ThinkPad T570 134e GM108M [GeForce 930MX] 134f GM108M [GeForce 920MX] 137a GM108GLM [Quadro K620M / Quadro M500M] @@ -10741,7 +10821,7 @@ 13d7 GM204M [GeForce GTX 980M] 13d8 GM204M [GeForce GTX 970M] 13d9 GM204M [GeForce GTX 965M] - 13da GM204M [GeForce GTX 980] + 13da GM204M [GeForce GTX 980 Mobile] 13e7 GM204 [GeForce GTX 980 Engineering Sample] 13f0 GM204GL [Quadro M5000] 13f1 GM204GL [Quadro M4000] @@ -10754,7 +10834,7 @@ 13fb GM204GLM [Quadro M5500] 1401 GM206 [GeForce GTX 960] 1402 GM206 [GeForce GTX 950] - 1406 GM206 [GeForce GTX 960] + 1406 GM206 [GeForce GTX 960 OEM] 1407 GM206 [GeForce GTX 750 v2] 1427 GM206M [GeForce GTX 965M] 1430 GM206GL [Quadro M2000] @@ -10764,7 +10844,7 @@ 15f1 GP100GL 15f7 GP100GL [Tesla P100 PCIe 12GB] 15f8 GP100GL [Tesla P100 PCIe 16GB] - 15f9 GP100GL [Tesla P100 SMX2 16GB] + 15f9 GP100GL [Tesla P100 SXM2 16GB] 1617 GM204M [GeForce GTX 980M] 1618 GM204M [GeForce GTX 970M] 1619 GM204M [GeForce GTX 965M] @@ -10794,14 +10874,23 @@ 1b87 GP104 [P104-100] 1ba0 GP104M [GeForce GTX 1080 Mobile] 1ba1 GP104M [GeForce GTX 1070 Mobile] + 1458 1651 GeForce GTX 1070 Max-Q + 1462 11e8 GeForce GTX 1070 Max-Q + 1462 11e9 GeForce GTX 1070 Max-Q + 1558 9501 GeForce GTX 1070 Max-Q + 1bad GP104 [GeForce GTX 1070 Engineering Sample] 1bb0 GP104GL [Quadro P5000] 1bb1 GP104GL [Quadro P4000] 1bb3 GP104GL [Tesla P4] 1bb4 GP104GL + 1bb5 GP104GLM [Quadro P5200 Mobile] 1bb6 GP104GLM [Quadro P5000 Mobile] 1bb7 GP104GLM [Quadro P4000 Mobile] + 1462 11e9 Quadro P4000 Max-Q 1bb8 GP104GLM [Quadro P3000 Mobile] 1be0 GP104M [GeForce GTX 1080 Mobile] + 1028 07c0 GeForce GTX 1080 Max-Q + 1458 355b GeForce GTX 1080 Max-Q 1be1 GP104M [GeForce GTX 1070 Mobile] 1c00 GP106 1c01 GP106 @@ -10810,9 +10899,13 @@ 1c07 GP106 [P106-100] 1c09 GP106 [P106-090] 1c20 GP106M [GeForce GTX 1060 Mobile] + 17aa 39b9 GeForce GTX 1060 Max-Q 3GB + 1c21 GP106M [GeForce GTX 1050 Ti Mobile] + 1c22 GP106M [GeForce GTX 1050 Mobile] 1c30 GP106GL [Quadro P2000] 1c35 GP106 - 1c60 GP106M [GeForce GTX 1060 Mobile] + 1c60 GP106M [GeForce GTX 1060 Mobile 6GB] + 103c 8390 GeForce GTX 1060 Max-Q 6GB 1c61 GP106M [GeForce GTX 1050 Ti Mobile] 1c62 GP106M [GeForce GTX 1050 Mobile] 1c70 GP106GL @@ -10831,6 +10924,8 @@ 1d01 GP108 [GeForce GT 1030] 1d10 GP108M [GeForce MX150] 1d81 GV100 + 1db1 GV100 [Tesla V100 SXM2] + 1db4 GV100 [Tesla V100 PCIe] 10df Emulex Corporation 0720 OneConnect NIC (Skyhawk) 103c 1934 FlexFabric 20Gb 2-port 650M Adapter @@ -10888,6 +10983,9 @@ f111 Saturn-X LightPulse Fibre Channel Host Adapter f112 Saturn-X LightPulse Fibre Channel Host Adapter f180 LPSe12002 EmulexSecure Fibre Channel Adapter + f400 LPe36000 Fibre Channel Host Adapter [Prism] + 10df f401 LPe35000 Fibre Channel Host Adapter [Prism] + 10df f402 LPe35000 Fibre Channel Host Adapter [Prism] f700 LP7000 Fibre Channel Host Adapter f701 LP7000 Fibre Channel Host Adapter Alternate ID (JX1:2-3, JX2:1-2) f800 LP8000 Fibre Channel Host Adapter @@ -11026,8 +11124,8 @@ 8129 RTL-8129 10ec 8129 RT8129 Fast Ethernet Adapter 11ec 8129 RTL8111/8168 PCIe Gigabit Ethernet (misconfigured) - 8136 RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller - 103c 1985 Pavilion 17-e163sg Notebook PC + 8136 RTL8101/2/6E PCI Express Fast Ethernet controller + 103c 1985 RTL8106E on Pavilion 17-e163sg Notebook PC 103c 2a8c Compaq 500B Microtower 103c 2ab1 Pavilion p6774 103c 30cc Pavilion dv6700 @@ -11087,6 +11185,7 @@ 8e2e 7100 KF-230TX/2 a0a0 0007 ALN-325C 8167 RTL-8110SC/8169SC Gigabit Ethernet + 105b 0e10 RTL-8110SC-GR on a N15235/A74MX mainboard 1458 e000 GA-MA69G-S3H Motherboard 1462 235c P965 Neo MS-7235 mainboard 1462 236c 945P Neo3-F motherboard @@ -14864,6 +14963,7 @@ 12d7 Biotronic SRL 12d8 Pericom Semiconductor 01a7 7C21P100 2-port PCI-X to PCI-X Bridge + 2608 PI7C9X2G608GP PCIe2 6-Port/8-Lane Packet Switch 400a PI7C9X442SL PCI Express Bridge Port 400e PI7C9X442SL USB OHCI Controller 400f PI7C9X442SL USB EHCI Controller @@ -15218,7 +15318,7 @@ 0040 QSC-200/300 0050 ESC-100D 0060 ESC-100M - 00f0 MPAC-100 Syncronous Serial Card (Zilog 85230) + 00f0 MPAC-100 Synchronous Serial Card (Zilog 85230) 0170 QSCLP-100 0180 DSCLP-100 0190 SSCLP-100 @@ -15687,6 +15787,7 @@ 1043 838e Virtuoso 66 (Xonar DS) 1043 8428 Virtuoso 100 (Xonar Xense) 1043 8467 CMI8786 (Xonar DG) + 1043 8521 CMI8786 (Xonar DGX) 1043 85f4 Virtuoso 100 (Xonar Essence STX II) 13f6 8782 PCI 2.0 HD Audio 13f6 ffff CMI8787-HG2PCI @@ -16176,6 +16277,13 @@ 50a2 T580-50A2 Unified Wire Ethernet Controller 50a3 T580-50A3 Unified Wire Ethernet Controller 50a4 T540-50A4 Unified Wire Ethernet Controller + 50a5 T522-50A5 Unified Wire Ethernet Controller + 50a6 T522-50A6 Unified Wire Ethernet Controller + 50a7 T580-50A7 Unified Wire Ethernet Controller + 50a8 T580-50A8 Unified Wire Ethernet Controller + 50a9 T580-50A9 Unified Wire Ethernet Controller + 50aa T580-50AA Unified Wire Ethernet Controller + 50ab T520-50AB Unified Wire Ethernet Controller 5401 T520-CR Unified Wire Ethernet Controller 5402 T522-CR Unified Wire Ethernet Controller 5403 T540-CR Unified Wire Ethernet Controller @@ -16231,6 +16339,13 @@ 54a2 T580-50A2 Unified Wire Ethernet Controller 54a3 T580-50A3 Unified Wire Ethernet Controller 54a4 T540-50A4 Unified Wire Ethernet Controller + 54a5 T522-50A5 Unified Wire Ethernet Controller + 54a6 T522-50A6 Unified Wire Ethernet Controller + 54a7 T580-50A7 Unified Wire Ethernet Controller + 54a8 T580-50A8 Unified Wire Ethernet Controller + 54a9 T580-50A9 Unified Wire Ethernet Controller + 54aa T580-50AA Unified Wire Ethernet Controller + 54ab T520-50AB Unified Wire Ethernet Controller 5501 T520-CR Unified Wire Storage Controller 5502 T522-CR Unified Wire Storage Controller 5503 T540-CR Unified Wire Storage Controller @@ -16286,6 +16401,11 @@ 55a2 T580-50A2 Unified Wire Storage Controller 55a3 T580-50A3 Unified Wire Storage Controller 55a4 T540-50A4 Unified Wire Storage Controller + 55a5 T522-50A5 Unified Wire Storage Controller + 55a6 T522-50A6 Unified Wire Storage Controller + 55a7 T580-50A7 Unified Wire Storage Controller + 55a8 T580-50A8 Unified Wire Storage Controller + 55a9 T580-50A9 Unified Wire Storage Controller 5601 T520-CR Unified Wire Storage Controller 5602 T522-CR Unified Wire Storage Controller 5603 T540-CR Unified Wire Storage Controller @@ -16341,6 +16461,13 @@ 56a2 T580-50A2 Unified Wire Storage Controller 56a3 T580-50A3 Unified Wire Storage Controller 56a4 T540-50A4 Unified Wire Storage Controller + 56a5 T522-50A5 Unified Wire Storage Controller + 56a6 T522-50A6 Unified Wire Storage Controller + 56a7 T580-50A7 Unified Wire Storage Controller + 56a8 T580-50A8 Unified Wire Storage Controller + 56a9 T580-50A9 Unified Wire Storage Controller + 56aa T580-50AA Unified Wire Storage Controller + 56ab T520-50AB Unified Wire Storage Controller 5701 T520-CR Unified Wire Ethernet Controller 5702 T522-CR Unified Wire Ethernet Controller 5703 T540-CR Unified Wire Ethernet Controller @@ -16435,6 +16562,13 @@ 58a2 T580-50A2 Unified Wire Ethernet Controller [VF] 58a3 T580-50A3 Unified Wire Ethernet Controller [VF] 58a4 T540-50A4 Unified Wire Ethernet Controller [VF] + 58a5 T522-50A5 Unified Wire Ethernet Controller [VF] + 58a6 T522-50A6 Unified Wire Ethernet Controller [VF] + 58a7 T580-50A7 Unified Wire Ethernet Controller [VF] + 58a8 T580-50A8 Unified Wire Ethernet Controller [VF] + 58a9 T580-50A9 Unified Wire Ethernet Controller [VF] + 58aa T580-50AA Unified Wire Ethernet Controller [VF] + 58ab T520-50AB Unified Wire Ethernet Controller [VF] 6001 T6225-CR Unified Wire Ethernet Controller 6002 T6225-SO-CR Unified Wire Ethernet Controller 6003 T6425-CR Unified Wire Ethernet Controller @@ -16453,6 +16587,7 @@ 6082 T6225-6082 Unified Wire Ethernet Controller 6083 T62100-6083 Unified Wire Ethernet Controller 6084 T64100-6084 Unified Wire Ethernet Controller + 6085 T6240-6085 Unified Wire Ethernet Controller 6401 T6225-CR Unified Wire Ethernet Controller 6402 T6225-SO-CR Unified Wire Ethernet Controller 6403 T6425-CR Unified Wire Ethernet Controller @@ -16471,6 +16606,7 @@ 6482 T6225-6082 Unified Wire Ethernet Controller 6483 T62100-6083 Unified Wire Ethernet Controller 6484 T64100-6084 Unified Wire Ethernet Controller + 6485 T6240-6085 Unified Wire Ethernet Controller 6501 T6225-CR Unified Wire Storage Controller 6502 T6225-SO-CR Unified Wire Storage Controller 6503 T6425-CR Unified Wire Storage Controller @@ -16489,6 +16625,7 @@ 6582 T6225-6082 Unified Wire Storage Controller 6583 T62100-6083 Unified Wire Storage Controller 6584 T64100-6084 Unified Wire Storage Controller + 6585 T6240-6085 Unified Wire Storage Controller 6601 T6225-CR Unified Wire Storage Controller 6602 T6225-SO-CR Unified Wire Storage Controller 6603 T6425-CR Unified Wire Storage Controller @@ -16507,6 +16644,7 @@ 6682 T6225-6082 Unified Wire Storage Controller 6683 T62100-6083 Unified Wire Storage Controller 6684 T64100-6084 Unified Wire Storage Controller + 6685 T6240-6085 Unified Wire Storage Controller 6801 T6225-CR Unified Wire Ethernet Controller [VF] 6802 T6225-SO-CR Unified Wire Ethernet Controller [VF] 6803 T6425-CR Unified Wire Ethernet Controller [VF] @@ -16525,6 +16663,7 @@ 6882 T6225-6082 Unified Wire Ethernet Controller [VF] 6883 T62100-6083 Unified Wire Ethernet Controller [VF] 6884 T64100-6084 Unified Wire Ethernet Controller [VF] + 6885 T6240-6085 Unified Wire Ethernet Controller [VF] a000 PE10K Unified Wire Ethernet Controller 1426 Storage Technology Corp. 1427 Better On-Line Solutions @@ -17496,6 +17635,7 @@ 106b 0093 AirPort Extreme 106b 00d1 AirPort Extreme 106b 00e9 AirPort Extreme + 14e4 04d8 Pegatron UPWL6024 4357 BCM43225 802.11b/g/n 105b e021 T77H103.00 Wireless Half-size Mini PCIe Card 4358 BCM43227 802.11b/g/n @@ -18283,6 +18423,7 @@ 117c 0091 FastFrame NQ42 117c 0092 FastFrame NQ11 117c 0093 FastFrame NQ12 + 15b3 0006 Mellanox Technologies ConnectX-3 Pro Stand-up dual-port 40GbE MCX314A-BCCT 15b3 0078 ConnectX-3 Pro 10 GbE Dual Port KR Mezzanine Card 15b3 0079 ConnectX-3 Pro 40 GbE Dual Port QSFP+ Adapter 15b3 0080 ConnectX-3 Pro 10 GbE Dual Port SFP+ Adapter @@ -18297,6 +18438,8 @@ 1011 MT27600 [Connect-IB] 1012 MT27600 Family [Connect-IB Virtual Function] 1013 MT27700 Family [ConnectX-4] + 15b3 0003 Mellanox Technologies ConnectX-4 Stand-up single-port 40GbE MCX413A-BCAT + 15b3 0005 Mellanox Technologies ConnectX-4 Stand-up single-port 40GbE MCX415A-BCAT 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 @@ -18304,6 +18447,7 @@ 15b3 0050 ConnectX-4 100 GbE Dual Port QSFP28 Adapter 1014 MT27700 Family [ConnectX-4 Virtual Function] 1015 MT27710 Family [ConnectX-4 Lx] + 15b3 0005 Mellanox Technologies ConnectX-4 Lx Stand-up single-port 40GbE MCX4131A-BCAT 15b3 0016 ConnectX-4 Lx 25 GbE Dual Port SFP28 Adapter 15b3 0020 MCX4411A-ACQN, ConnectX-4 Lx EN OCP, 1x25Gb 15b3 0021 MCX4421A-ACQN ConnectX-4 Lx EN OCP,2x25G @@ -19037,12 +19181,14 @@ 7016 AP470 48-Channel TTL Level Digital Input/Output Module 7017 AP323 16-bit, 20 or 40 Channel Analog Input Module 7018 AP408: 32-Channel Digital I/O Module + 7019 AP341 14-bit, 16-Channel Simultaneous Conversion Analog Input Module 701a AP220-16 12-Bit, 16-Channel Analog Output Module 701b AP231-16 16-Bit, 16-Channel Analog Output Module 7021 APA7-201 Reconfigurable Artix-7 FPGA module 48 TTL channels 7022 APA7-202 Reconfigurable Artix-7 FPGA module 24 RS485 channels 7023 APA7-203 Reconfigurable Artix-7 FPGA module 24 TTL & 12 RS485 channels 7024 APA7-204 Reconfigurable Artix-7 FPGA module 24 LVDS channels + 7027 AP418 16-Channel High Voltage Digital Input/Output Module 7042 AP482 Counter Timer Module with TTL Level Input/Output 7043 AP483 Counter Timer Module with TTL Level and RS422 Input/Output 7044 AP484 Counter Timer Module with RS422 Input/Output @@ -19451,6 +19597,7 @@ 1803 ProdaSafe GmbH 1805 Euresys S.A. 1809 Lumanate, Inc. +180c IEI Integration Corp 1813 Ambient Technologies Inc 4000 HaM controllerless modem 16be 0001 V9x HAM Data Fax Modem @@ -19892,11 +20039,12 @@ 1924 8012 SFN8522-R1 8000 Series 10G Adapter 1924 8013 SFN8042-R1 8000 Series 10/40G Adapter 1924 8014 SFN8542-R1 8000 Series 10/40G Adapter - 1924 8016 SFN8022-R2 8000 Series 10G Adapte + 1924 8016 SFN8022-R2 8000 Series 10G Adapter 1924 8017 SFN8522-R2 8000 Series 10G Adapter 1924 8018 SFN8042-R2 8000 Series 10/40G Adapter 1924 8019 SFN8542-R2 8000 Series 10/40G Adapter 1924 801a SFN8722-R1 8000 Series OCP 10G Adapter + 1924 801b SFN8522-R3 8000 Series 10G Adapter 1803 SFC9020 10G Ethernet Controller (Virtual Function) 1813 SFL9021 10GBASE-T Ethernet Controller (Virtual Function) 1903 SFC9120 10G Ethernet Controller (Virtual Function) @@ -20082,6 +20230,7 @@ # E2200, E2201, E2205 e091 Killer E220x Gigabit Ethernet Controller e0a1 Killer E2400 Gigabit Ethernet Controller + e0b1 Killer E2500 Gigabit Ethernet Controller 196a Sensory Networks Inc. 0101 NodalCore C-1000 Content Classification Accelerator 0102 NodalCore C-2000 Content Classification Accelerator @@ -20365,7 +20514,7 @@ 3003 ioMemory Mezzanine 1aee Caustic Graphics Inc. # nee Qumranet, Inc. -1af4 Red Hat, Inc +1af4 Red Hat, Inc. 1000 Virtio network device 1001 Virtio block device 1002 Virtio memory balloon @@ -20642,6 +20791,8 @@ 1cc7 Radian Memory Systems Inc. 0200 RMS-200 0250 RMS-250 +1ccf Zoom Corporation + 0001 TAC-2 Thunderbolt Audio Converter 1cd2 SesKion GmbH 0301 Simulyzer-RT CompactPCI Serial DIO-1 card 0302 Simulyzer-RT CompactPCI Serial PSI5-ECU-1 card @@ -20659,6 +20810,7 @@ 0005 ExaNIC X40 0006 ExaNIC X10-HPT 0007 ExaNIC X40 + 0008 ExaNIC V5P 1cf7 Subspace Dynamics 1d00 Pure Storage 1d0f Amazon.com, Inc. @@ -20774,6 +20926,9 @@ 2020 DC-390 690c 690c dc29 DC290 +1de5 Eideticom, Inc + 1000 IO Memory Controller + 2000 NoLoad Hardware Development Kit # nee Tumsan Oy 1fc0 Ascom (Finland) Oy 0300 E2200 Dual E1/Rawpipe Card @@ -20808,6 +20963,7 @@ 0000 3014 10-Giga TOE Dual Port CX4 Low Profile SmartNIC 4010 TN4010 Clean SROM 4020 TN9030 10GbE CX4 Ethernet Adapter + 180c 2040 Mustang-200 10GbE Ethernet Adapter 4022 TN9310 10GbE SFP+ Ethernet Adapter 1043 8709 XG-C100F 10GbE SFP+ Ethernet Adapter 1186 4d00 DXE-810S 10GbE SFP+ Ethernet Adapter @@ -21616,6 +21772,7 @@ 17aa 21cf ThinkPad T520 0150 Xeon E3-1200 v2/3rd Gen Core processor DRAM Controller 1043 84ca P8 series motherboard + 1458 d000 Ivy Bridge GT1 [HD Graphics] 15d9 0624 X9SCM-F Motherboard 1849 0150 Motherboard 0151 Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port @@ -22123,6 +22280,7 @@ 0960 80960RP (i960RP) Microprocessor/Bridge 0962 80960RM (i960RM) Bridge 0964 80960RP (i960RP) Microprocessor/Bridge + 0a03 Haswell-ULT Thermal Subsystem 0a04 Haswell-ULT DRAM Controller 17aa 2214 ThinkPad X240 0a06 Haswell-ULT Integrated Graphics Controller @@ -22135,6 +22293,17 @@ 0a2a Haswell-ULT Integrated Graphics Controller 0a2e Haswell-ULT Integrated Graphics Controller 0a53 DC P3520 SSD + 0a54 Express Flash NVMe P4500 + 1028 1fe1 Express Flash NVMe 1TB 2.5" U.2 (P4500) + 1028 1fe2 Express Flash NVMe 2TB 2.5" U.2 (P4500) + 1028 1fe3 Express Flash NVMe 4TB 2.5" U.2 (P4500) + 1028 1fe4 Express Flash NVMe 4TB HHHL AIC (P4500) + 0a55 Express Flash NVMe P4600 + 1028 1fe5 Express Flash NVMe 1.6TB 2.5" U.2 (P4600) + 1028 1fe6 Express Flash NVMe 2TB 2.5" U.2 (P4600) + 1028 1fe7 Express Flash NVMe 3.2TB 2.5" U.2 (P4600) + 1028 1fe8 Express Flash NVMe 2.0TB HHHL AIC (P4600) + 1028 1fe9 Express Flash NVMe 4.0TB HHHL AIC (P4600) 0be0 Atom Processor D2xxx/N2xxx Integrated Graphics Controller 0be1 Atom Processor D2xxx/N2xxx Integrated Graphics Controller 105b 0d7c D270S/D250S Motherboard @@ -23269,7 +23438,7 @@ 8086 011a Ethernet Converged Network Adapter X520-4 8086 011b Ethernet Converged Network Adapter X520-4 8086 011c Ethernet Converged Network Adapter X520-4 - 154c XL710/X710 Virtual Function + 154c Ethernet Virtual Function 700 Series 154d Ethernet 10G 2P X520 Adapter 8086 7b11 10GbE 2P X520 Adapter 1557 82599 10 Gigabit Network Connection @@ -23312,7 +23481,7 @@ 156d DSL5520 Thunderbolt 2 Bridge [Falcon Ridge 4C 2013] 156f Ethernet Connection I219-LM 1570 Ethernet Connection I219-V - 1571 XL710/X710 Virtual Function + 1571 Ethernet Virtual Function 700 Series 1572 Ethernet Controller X710 for 10GbE SFP+ 1028 0000 Ethernet 10G X710 rNDC 1028 1f99 Ethernet 10G 4P X710/I350 rNDC @@ -23403,6 +23572,7 @@ 8086 00a0 Ethernet Converged Network Adapter X710-T4 8086 1003 Ethernet Converged Network Adapter X710-T 158a Ethernet Controller XXV710 for 25GbE backplane + 8086 000a Ethernet 25G 2P XXV710 Mezz 158b Ethernet Controller XXV710 for 25GbE SFP28 8086 0000 Ethernet Network Adapter XXV710 8086 0001 Ethernet Network Adapter XXV710-2 @@ -23413,6 +23583,7 @@ 8086 0006 Ethernet Network Adapter OCP XXV710-2 8086 0007 Ethernet Network Adapter OCP XXV710-1 8086 0008 Ethernet Network Adapter OCP XXV710-1 + 8086 0009 Ethernet 25G 2P XXV710 Adapter 8086 4001 Ethernet Network Adapter XXV710-2 15a0 Ethernet Connection (2) I218-LM 15a1 Ethernet Connection (2) I218-V @@ -23464,6 +23635,7 @@ 15d6 Ethernet Connection (5) I219-V 15d7 Ethernet Connection (4) I219-LM 15d8 Ethernet Connection (4) I219-V + 17aa 2247 ThinkPad T570 17aa 224f ThinkPad X1 Carbon 5th Gen 15d9 JHL6340 Thunderbolt 3 NHI (C step) [Alpine Ridge 2C 2016] 15da JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] @@ -23529,9 +23701,10 @@ 190f Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers 1910 Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers 1911 Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model + 17aa 2247 ThinkPad T570 17aa 224f ThinkPad X1 Carbon 5th Gen 1912 HD Graphics 530 - 1916 HD Graphics 520 + 1916 Skylake GT2 [HD Graphics 520] 1028 06f3 Latitude 3570 1918 Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers 1919 Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Imaging Unit @@ -24017,6 +24190,7 @@ 2018 Sky Lake-E M2PCI Registers 201a Sky Lake-E Non-Transparent Bridge Registers 201c Sky Lake-E Non-Transparent Bridge Registers + 2020 Sky Lake-E DMI3 Registers 2021 Sky Lake-E CBDMA Registers 2024 Sky Lake-E MM/Vt-d Configuration Registers 2030 Sky Lake-E PCI Express Root Port A @@ -24662,7 +24836,7 @@ 8086 a000 D865PERL mainboard 8086 e000 D865PERL mainboard 8086 e001 Desktop Board D865GBF - 8086 e002 SoundMax Intergrated Digital Audio + 8086 e002 SoundMax Integrated Digital Audio 24d6 82801EB/ER (ICH5/ICH5R) AC'97 Modem Controller 103c 006a NX9500 24d7 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #3 @@ -25659,7 +25833,7 @@ 2822 SATA Controller [RAID mode] 1028 020d Inspiron 530 103c 2a6f Asus IPIBL-LB Motherboard - 1043 8277 P5K PRO Motherboard + 1043 8277 P5K PRO Motherboard: 82801IR [ICH9R] 2823 C610/X99 series chipset sSATA Controller [RAID mode] 2824 82801HB (ICH8) 4 port SATA Controller [AHCI mode] 1043 81ec P5B @@ -25834,7 +26008,7 @@ 284b 82801H (ICH8 Family) HD Audio Controller 1025 011f Realtek ALC268 audio codec 1025 0121 Aspire 5920G - 1025 0145 Realtek ALC889 (Aspire 8920G w. Dolby Theather) + 1025 0145 Realtek ALC889 (Aspire 8920G w. Dolby Theater) 1028 01da OptiPlex 745 1028 01f3 Inspiron 1420 1028 01f9 Latitude D630 @@ -25889,14 +26063,14 @@ 1028 0210 PowerEdge T300 onboard SATA Controller 1028 0211 Optiplex 755 1028 023c PowerEdge R200 onboard SATA Controller - 1043 8277 P5K PRO Motherboard *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Sun Nov 12 08:16:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45CCAE6C0B5 for ; Sun, 12 Nov 2017 08:16:54 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yw0-x22a.google.com (mail-yw0-x22a.google.com [IPv6:2607:f8b0:4002:c05::22a]) (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 0878080D75 for ; Sun, 12 Nov 2017 08:16:53 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yw0-x22a.google.com with SMTP id x20so4271780ywg.4 for ; Sun, 12 Nov 2017 00:16:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=o8DjvpujzZa2QmMj0LjlOF9GVHQ5zr4z1AWV7VveM+I=; b=MY+dmWfe4FkhZvWlBMh1jBtGzni6TF70DMmIX0V75QW29nbGyKpF8tTXB3AbcA/MvA NuzQnwVWSLD/6i3rXSFUqBuulZcRhcVc+DX65QZcdD1Gd0gq9CkmKJFvNZn6OYybMqRl dDbNxS52MJSQslgSWrOrX1wjeHCdX9UICr73o= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=o8DjvpujzZa2QmMj0LjlOF9GVHQ5zr4z1AWV7VveM+I=; b=0c90E8pWQsHGGqJfVNfbuKvAXq3dkJmyMcmfj3tLhiC5zx8duwxdLkqlVcz7yoa8/3 jagjJ7CVnOKnX5X3yKtCJUjuVqW5+U2UdQRZWknYCv5d5SJM9mmGJDKlTiCzYsI1TTXs yOAyIVDsLlf0qS8I4wIRgU0eqvovCA4kUI61OiVc0s+Lb77nLnx/ubsRLUjhB6f1CxMY Tl1uvdBN6l9DM9t7Ckit0uGJkvgM6Q9+gxxHf9JS0I/qYErIdoMlfFyCd6qLNbyLT97l nyk7x5qdv9iySs9mPzGXr6n61JaXYOn4QFbA7HeLmWPoZQh4LDB+pwlOC6mHyeROmepY 3iWQ== 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=o8DjvpujzZa2QmMj0LjlOF9GVHQ5zr4z1AWV7VveM+I=; b=d6AxMtY3L09RnEHRz/MrCKw91/QOIIIInU3liBC6mOgqcI4OWFjbBEvBHhkSZBFJYr 8bhdyHNizsjEYUBuWaMckazrq9ldF2T4uUewB7Q+JAnFG6cO929QFWJTrfpvcg5VQLGx IL7W+fgSDBRpOQA4x5RFU7hHX7FcUc5a5TxGWsmqrKy3K0213MUIsckQ2HEGUAlW+TCH PQJlGC8lmDib0mJA5Sb8/4Nlvpn2dgMhw1sVg/vF3/sBP2i0BYDGO5Hd70KxV2y1U+Gh X3nYlng+W/R+B/K5FaV2H2ZyxGi5XspHz7Z+R/U22zyKXTLph+aItt2kA/b8nCEear0I jY2Q== X-Gm-Message-State: AJaThX7J9LUjwGHMYxSaCc7PiGHnMpy64g9C7hSLL25T5xYC97frqq6X MgA9oVQTa3EMzXFduB+9aDOSI15LQWDTdZe/1Llmjw== X-Google-Smtp-Source: AGs4zMZsTl309bucsxqAyG5DmrWFuXzcgnWJknR6lseY58iW5kedue224fQypnoISOauR06u4Jw6qjInoU295saWHKk= X-Received: by 10.129.158.71 with SMTP id v68mr4041773ywg.201.1510474613111; Sun, 12 Nov 2017 00:16:53 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.37.56.66 with HTTP; Sun, 12 Nov 2017 00:16:22 -0800 (PST) In-Reply-To: <201711111921.vABJLPtL035442@pdx.rh.CN85.dnsmgr.net> References: <201711110700.vAB70e9P052013@repo.freebsd.org> <201711111921.vABJLPtL035442@pdx.rh.CN85.dnsmgr.net> From: Eitan Adler Date: Sun, 12 Nov 2017 00:16:22 -0800 X-Google-Sender-Auth: 5CnPK9H7ih2tf7pLXAIxxXdMvVY Message-ID: Subject: Re: svn commit: r325702 - in head: . share/man/man5 share/man/man7 usr.bin/mail To: rgrimes@freebsd.org Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2017 08:16:54 -0000 On 11 November 2017 at 11:21, Rodney W. Grimes wrote: >> Author: eadler >> Date: Sat Nov 11 07:00:40 2017 >> New Revision: 325702 >> URL: https://svnweb.freebsd.org/changeset/base/325702 >> >> Log: >> mailaddr(7): wave goodbye >> >> The information here is somewhere between ancient to obsolete. > > 20% of the information here is somewhat obsolete, 80% of it is > valid, can you please tell me what part of the following main > body of the page are either ancient or obsolete: Yes, there was some technically correct information in the man page. If someone is new to mail addresses they are unlikely to be learning about from a man page. If you're looking for information on the technical requirements for a domain or mail address, you'll be reading the RFC. If you're looking for "how to use my mail client" you'll be looking at that application's documentation. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@freebsd.org Sun Nov 12 08:31:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 074BDE6C29A; Sun, 12 Nov 2017 08:31:19 +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 BE3AA81209; Sun, 12 Nov 2017 08:31:18 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAC8VHRo002539; Sun, 12 Nov 2017 08:31:17 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAC8VHfQ002538; Sun, 12 Nov 2017 08:31:17 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201711120831.vAC8VHfQ002538@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 12 Nov 2017 08:31:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325738 - in head: . share/misc X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: in head: . share/misc X-SVN-Commit-Revision: 325738 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2017 08:31:19 -0000 Author: bapt Date: Sun Nov 12 08:31:17 2017 New Revision: 325738 URL: https://svnweb.freebsd.org/changeset/base/325738 Log: Remove the special character definitions files for eqn(1) This files hasn't been used since groff(1) was introduced in base 23 years ago. Deleted: head/share/misc/eqnchar Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Nov 12 08:00:57 2017 (r325737) +++ head/ObsoleteFiles.inc Sun Nov 12 08:31:17 2017 (r325738) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20171112: Removal of eqnchar definition +OLD_FILES+=usr/share/misc/eqnchar # 20171110: Removal of mailaddr man page OLD_FILES+=usr/share/man/man7/mailaddr.7.gz # 20171108: badsect(8) removal From owner-svn-src-head@freebsd.org Sun Nov 12 08:34:27 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4256E6C451; Sun, 12 Nov 2017 08:34:27 +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 673CA81545; Sun, 12 Nov 2017 08:34:27 +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 vAC8YQrT006617; Sun, 12 Nov 2017 08:34:26 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAC8YQUq006611; Sun, 12 Nov 2017 08:34:26 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201711120834.vAC8YQUq006611@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Sun, 12 Nov 2017 08:34:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325739 - in head: lib/libcasper/services lib/libcasper/services/cap_syslog share/mk X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: in head: lib/libcasper/services lib/libcasper/services/cap_syslog share/mk X-SVN-Commit-Revision: 325739 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2017 08:34:27 -0000 Author: oshogbo Date: Sun Nov 12 08:34:25 2017 New Revision: 325739 URL: https://svnweb.freebsd.org/changeset/base/325739 Log: Introduce syslog service for Casper. syslog in libc secretly reconnects to the daemon. Another issue is that we don't have any information from openlog(3) if we succeeded to open log or not so we don't know if we are ready to enter cabability mode. Because all of that we decided we need a syslog service for Caspser. Reviewed by: bapt@ Differential Revision: https://reviews.freebsd.org/D12824 Added: head/lib/libcasper/services/cap_syslog/ head/lib/libcasper/services/cap_syslog/Makefile (contents, props changed) head/lib/libcasper/services/cap_syslog/cap_syslog.c (contents, props changed) head/lib/libcasper/services/cap_syslog/cap_syslog.h (contents, props changed) Modified: head/lib/libcasper/services/Makefile head/share/mk/bsd.libnames.mk head/share/mk/src.libnames.mk Modified: head/lib/libcasper/services/Makefile ============================================================================== --- head/lib/libcasper/services/Makefile Sun Nov 12 08:31:17 2017 (r325738) +++ head/lib/libcasper/services/Makefile Sun Nov 12 08:34:25 2017 (r325739) @@ -7,6 +7,7 @@ SUBDIR+= cap_grp SUBDIR+= cap_pwd SUBDIR+= cap_random SUBDIR+= cap_sysctl +SUBDIR+= cap_syslog SUBDIR.${MK_TESTS}+= tests Added: head/lib/libcasper/services/cap_syslog/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libcasper/services/cap_syslog/Makefile Sun Nov 12 08:34:25 2017 (r325739) @@ -0,0 +1,24 @@ +# $FreeBSD$ + +SHLIBDIR?= /lib/casper + +.include + +PACKAGE=libcasper + +SHLIB_MAJOR= 0 +INCSDIR?= ${INCLUDEDIR}/casper + +.if ${MK_CASPER} != "no" +SHLIB= cap_syslog + +SRCS= cap_syslog.c +.endif + +INCS= cap_syslog.h + +LIBADD= nv + +CFLAGS+=-I${.CURDIR} + +.include Added: head/lib/libcasper/services/cap_syslog/cap_syslog.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libcasper/services/cap_syslog/cap_syslog.c Sun Nov 12 08:34:25 2017 (r325739) @@ -0,0 +1,199 @@ +/*- + * Copyright (c) 2017 Mariusz Zaborski + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "cap_syslog.h" + +#define CAP_SYSLOG_LIMIT 2048 + +void +cap_syslog(cap_channel_t *chan, int pri, const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + cap_vsyslog(chan, pri, fmt, ap); + va_end(ap); +} + +void +cap_vsyslog(cap_channel_t *chan, int priority, const char *fmt, va_list ap) +{ + nvlist_t *nvl; + char message[CAP_SYSLOG_LIMIT]; + + (void)vsnprintf(message, sizeof(message), fmt, ap); + + nvl = nvlist_create(0); + nvlist_add_string(nvl, "cmd", "vsyslog"); + nvlist_add_number(nvl, "priority", priority); + nvlist_add_string(nvl, "message", message); + nvl = cap_xfer_nvlist(chan, nvl, 0); + if (nvl == NULL) { + return; + } + nvlist_destroy(nvl); +} + +void +cap_openlog(cap_channel_t *chan, const char *ident, int logopt, int facility) +{ + nvlist_t *nvl; + + nvl = nvlist_create(0); + nvlist_add_string(nvl, "cmd", "openlog"); + if (ident != NULL) { + nvlist_add_string(nvl, "ident", ident); + } + nvlist_add_number(nvl, "logopt", logopt); + nvlist_add_number(nvl, "facility", facility); + nvl = cap_xfer_nvlist(chan, nvl, 0); + if (nvl == NULL) { + return; + } + nvlist_destroy(nvl); +} + +void +cap_closelog(cap_channel_t *chan) +{ + nvlist_t *nvl; + + nvl = nvlist_create(0); + nvlist_add_string(nvl, "cmd", "closelog"); + nvl = cap_xfer_nvlist(chan, nvl, 0); + if (nvl == NULL) { + return; + } + nvlist_destroy(nvl); +} + +int +cap_setlogmask(cap_channel_t *chan, int maskpri) +{ + nvlist_t *nvl; + int omask; + + nvl = nvlist_create(0); + nvlist_add_string(nvl, "cmd", "setlogmask"); + nvlist_add_number(nvl, "maskpri", maskpri); + nvl = cap_xfer_nvlist(chan, nvl, 0); + omask = nvlist_get_number(nvl, "omask"); + + nvlist_destroy(nvl); + + return (omask); +} + +/* + * Service functions. + */ + +static char *LogTag; + +static void +slog_vsyslog(const nvlist_t *limits __unused, const nvlist_t *nvlin, + nvlist_t *nvlout __unused) +{ + + syslog(nvlist_get_number(nvlin, "priority"), "%s", + nvlist_get_string(nvlin, "message")); +} + +static void +slog_openlog(const nvlist_t *limits __unused, const nvlist_t *nvlin, + nvlist_t *nvlout __unused) +{ + const char *ident; + + ident = dnvlist_get_string(nvlin, "ident", NULL); + if (ident != NULL) { + free(LogTag); + LogTag = strdup(ident); + } + + openlog(LogTag, nvlist_get_number(nvlin, "logopt"), + nvlist_get_number(nvlin, "facility")); +} + +static void +slog_closelog(const nvlist_t *limits __unused, const nvlist_t *nvlin __unused, + nvlist_t *nvlout __unused) +{ + + closelog(); + + free(LogTag); + LogTag = NULL; +} + +static void +slog_setlogmask(const nvlist_t *limits __unused, const nvlist_t *nvlin, + nvlist_t *nvlout) +{ + int omask; + + omask = setlogmask(nvlist_get_number(nvlin, "maskpri")); + nvlist_add_number(nvlout, "omask", omask); +} + +static int +syslog_command(const char *cmd, const nvlist_t *limits, nvlist_t *nvlin, + nvlist_t *nvlout) +{ + + if (strcmp(cmd, "vsyslog") == 0) { + slog_vsyslog(limits, nvlin, nvlout); + } else if (strcmp(cmd, "openlog") == 0) { + slog_openlog(limits, nvlin, nvlout); + } else if (strcmp(cmd, "closelog") == 0) { + slog_closelog(limits, nvlin, nvlout); + } else if (strcmp(cmd, "setlogmask") == 0) { + slog_setlogmask(limits, nvlin, nvlout); + } else { + return (EINVAL); + } + + return (0); +} + +CREATE_SERVICE("system.syslog", NULL, syslog_command, 0); Added: head/lib/libcasper/services/cap_syslog/cap_syslog.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libcasper/services/cap_syslog/cap_syslog.h Sun Nov 12 08:34:25 2017 (r325739) @@ -0,0 +1,54 @@ +/*- + * Copyright (c) 2017 Mariusz Zaborski + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _CAP_SYSLOG_H_ +#define _CAP_SYSLOG_H_ + +#ifdef WITH_CASPER +void cap_syslog(cap_channel_t *chan, int pri, + const char *fmt, ...) __printflike(3, 4); +void cap_vsyslog(cap_channel_t *chan, int priority, const char *fmt, + va_list ap) __printflike(3, 0); + +void cap_openlog(cap_channel_t *chan, const char *ident, int logopt, + int facility); +void cap_closelog(cap_channel_t *chan); + +int cap_setlogmask(cap_channel_t *chan, int maskpri); +#else +#define cap_syslog(chan, pri, ...) syslog(pri, __VA_ARGS__) +#define cap_vsyslog(chan, pri, fmt, ap) vsyslog(pri, fmt, ap) + +#define cap_openlog(chan, ident, logopt, facility) \ + openlog(ident, logopt, facility) +#define cap_closelog(chan) closelog() + +#define cap_setlogmask(chan, maskpri) setlogmask(maskpri) +#endif /* !WITH_CASPER */ + +#endif /* !_CAP_SYSLOG_H_ */ Modified: head/share/mk/bsd.libnames.mk ============================================================================== --- head/share/mk/bsd.libnames.mk Sun Nov 12 08:31:17 2017 (r325738) +++ head/share/mk/bsd.libnames.mk Sun Nov 12 08:34:25 2017 (r325739) @@ -38,6 +38,7 @@ LIBCAP_GRP?= ${LIBDESTDIR}${LIBDIR_BASE}/libcap_grp.a LIBCAP_PWD?= ${LIBDESTDIR}${LIBDIR_BASE}/libcap_pwd.a LIBCAP_RANDOM?= ${LIBDESTDIR}${LIBDIR_BASE}/libcap_random.a LIBCAP_SYSCTL?= ${LIBDESTDIR}${LIBDIR_BASE}/libcap_sysctl.a +LIBCAP_SYSLOG?= ${LIBDESTDIR}${LIBDIR_BASE}/libcap_syslog.a LIBCASPER?= ${LIBDESTDIR}${LIBDIR_BASE}/libcasper.a LIBCOMPAT?= ${LIBDESTDIR}${LIBDIR_BASE}/libcompat.a LIBCOMPILER_RT?=${LIBDESTDIR}${LIBDIR_BASE}/libcompiler_rt.a Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Sun Nov 12 08:31:17 2017 (r325738) +++ head/share/mk/src.libnames.mk Sun Nov 12 08:34:25 2017 (r325739) @@ -78,6 +78,7 @@ _LIBRARIES= \ cap_pwd \ cap_random \ cap_sysctl \ + cap_syslog \ com_err \ compiler_rt \ crypt \ @@ -239,6 +240,7 @@ _DP_cap_grp= nv _DP_cap_pwd= nv _DP_cap_random= nv _DP_cap_sysctl= nv +_DP_cap_syslog= nv _DP_pjdlog= util _DP_opie= md _DP_usb= pthread @@ -530,6 +532,7 @@ LIBCAP_GRPDIR= ${OBJTOP}/lib/libcasper/services/cap_gr LIBCAP_PWDDIR= ${OBJTOP}/lib/libcasper/services/cap_pwd LIBCAP_RANDOMDIR= ${OBJTOP}/lib/libcasper/services/cap_random LIBCAP_SYSCTLDIR= ${OBJTOP}/lib/libcasper/services/cap_sysctl +LIBCAP_SYSLOGDIR= ${OBJTOP}/lib/libcasper/services/cap_syslog LIBBSDXMLDIR= ${OBJTOP}/lib/libexpat LIBKVMDIR= ${OBJTOP}/lib/libkvm LIBPTHREADDIR= ${OBJTOP}/lib/libthr From owner-svn-src-head@freebsd.org Sun Nov 12 08:42:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7AA66E6C68F; Sun, 12 Nov 2017 08:42: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 54B5981965; Sun, 12 Nov 2017 08:42: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 vAC8giYx010781; Sun, 12 Nov 2017 08:42:44 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAC8giCL010776; Sun, 12 Nov 2017 08:42:44 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201711120842.vAC8giCL010776@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Sun, 12 Nov 2017 08:42:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325740 - head/sbin/dhclient X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/sbin/dhclient X-SVN-Commit-Revision: 325740 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2017 08:42:45 -0000 Author: oshogbo Date: Sun Nov 12 08:42:43 2017 New Revision: 325740 URL: https://svnweb.freebsd.org/changeset/base/325740 Log: Use syslog service in dhclient(8). dhclient(8) is failing during boot to connect to the syslog service, because syslog daemon is started after dhclient(8). This can be reproduced by stooping syslog daemon and ktrace the dhclient or use kern.trap_enotcap sysctl and boot the machine. Using the Casper syslog service fix the problem. Reviewed by: bapt@ Differential Revision: https://reviews.freebsd.org/D12825 Modified: head/sbin/dhclient/Makefile head/sbin/dhclient/dhclient.c head/sbin/dhclient/dhcpd.h head/sbin/dhclient/dispatch.c head/sbin/dhclient/errwarn.c Modified: head/sbin/dhclient/Makefile ============================================================================== --- head/sbin/dhclient/Makefile Sun Nov 12 08:34:25 2017 (r325739) +++ head/sbin/dhclient/Makefile Sun Nov 12 08:42:43 2017 (r325740) @@ -44,6 +44,12 @@ MAN= dhclient.8 dhclient.conf.5 dhclient.leases.5 dhcp dhclient-script.8 LIBADD= util +.if ${MK_CASPER} != "no" && !defined(RESCUE) +LIBADD+= casper +LIBADD+= cap_syslog +CFLAGS+=-DWITH_CASPER +.endif + WARNS?= 2 HAS_TESTS= Modified: head/sbin/dhclient/dhclient.c ============================================================================== --- head/sbin/dhclient/dhclient.c Sun Nov 12 08:34:25 2017 (r325739) +++ head/sbin/dhclient/dhclient.c Sun Nov 12 08:42:43 2017 (r325740) @@ -84,6 +84,8 @@ __FBSDID("$FreeBSD$"); #define CLIENT_PATH "PATH=/usr/bin:/usr/sbin:/bin:/sbin" +cap_channel_t *capsyslog; + time_t cur_time; time_t default_lease_time = 43200; /* 12 hours... */ @@ -345,6 +347,21 @@ die: exit(1); } +static void +init_casper(void) +{ + cap_channel_t *casper; + + casper = cap_init(); + if (casper == NULL) + error("unable to start casper"); + + capsyslog = cap_service_open(casper, "system.syslog"); + cap_close(casper); + if (capsyslog == NULL) + error("unable to open system.syslog service"); +} + int main(int argc, char *argv[]) { @@ -356,9 +373,11 @@ main(int argc, char *argv[]) pid_t otherpid; cap_rights_t rights; + init_casper(); + /* Initially, log errors to stderr as well as to syslogd. */ - openlog(__progname, LOG_PID | LOG_NDELAY, DHCPD_LOG_FACILITY); - setlogmask(LOG_UPTO(LOG_DEBUG)); + cap_openlog(capsyslog, __progname, LOG_PID | LOG_NDELAY, DHCPD_LOG_FACILITY); + cap_setlogmask(capsyslog, LOG_UPTO(LOG_DEBUG)); while ((ch = getopt(argc, argv, "bc:dl:p:qu")) != -1) switch (ch) { @@ -518,7 +537,7 @@ main(int argc, char *argv[]) setproctitle("%s", ifi->name); - if (cap_enter() < 0 && errno != ENOSYS) + if (CASPER_SUPPORT && cap_enter() < 0 && errno != ENOSYS) error("can't enter capability mode: %m"); if (immediate_daemon) Modified: head/sbin/dhclient/dhcpd.h ============================================================================== --- head/sbin/dhclient/dhcpd.h Sun Nov 12 08:34:25 2017 (r325739) +++ head/sbin/dhclient/dhcpd.h Sun Nov 12 08:42:43 2017 (r325740) @@ -73,6 +73,9 @@ #include #include +#include +#include + #include "dhcp.h" #include "tree.h" @@ -352,6 +355,7 @@ int addr_eq(struct iaddr, struct iaddr); char *piaddr(struct iaddr); /* dhclient.c */ +extern cap_channel_t *capsyslog; extern char *path_dhclient_conf; extern char *path_dhclient_db; extern time_t cur_time; Modified: head/sbin/dhclient/dispatch.c ============================================================================== --- head/sbin/dhclient/dispatch.c Sun Nov 12 08:34:25 2017 (r325739) +++ head/sbin/dhclient/dispatch.c Sun Nov 12 08:42:43 2017 (r325740) @@ -298,7 +298,8 @@ interface_status(struct interface_info *ifinfo) memset(&ifr, 0, sizeof(ifr)); strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); if (ioctl(ifsock, SIOCGIFFLAGS, &ifr) < 0) { - syslog(LOG_ERR, "ioctl(SIOCGIFFLAGS) on %s: %m", ifname); + cap_syslog(capsyslog, LOG_ERR, "ioctl(SIOCGIFFLAGS) on %s: %m", + ifname); goto inactive; } @@ -316,9 +317,8 @@ interface_status(struct interface_info *ifinfo) strlcpy(ifmr.ifm_name, ifname, sizeof(ifmr.ifm_name)); if (ioctl(ifsock, SIOCGIFMEDIA, (caddr_t)&ifmr) < 0) { if (errno != EINVAL) { - syslog(LOG_DEBUG, "ioctl(SIOCGIFMEDIA) on %s: %m", - ifname); - + cap_syslog(capsyslog, LOG_DEBUG, + "ioctl(SIOCGIFMEDIA) on %s: %m", ifname); ifinfo->noifmedia = 1; goto active; } @@ -479,8 +479,8 @@ interface_link_status(char *ifname) if (ioctl(sock, SIOCGIFMEDIA, (caddr_t)&ifmr) == -1) { /* EINVAL -> link state unknown. treat as active */ if (errno != EINVAL) - syslog(LOG_DEBUG, "ioctl(SIOCGIFMEDIA) on %s: %m", - ifname); + cap_syslog(capsyslog, LOG_DEBUG, + "ioctl(SIOCGIFMEDIA) on %s: %m", ifname); close(sock); return (1); } Modified: head/sbin/dhclient/errwarn.c ============================================================================== --- head/sbin/dhclient/errwarn.c Sun Nov 12 08:34:25 2017 (r325739) +++ head/sbin/dhclient/errwarn.c Sun Nov 12 08:42:43 2017 (r325740) @@ -69,7 +69,7 @@ error(char *fmt, ...) va_end(list); #ifndef DEBUG - syslog(log_priority | LOG_ERR, "%s", mbuf); + cap_syslog(capsyslog, log_priority | LOG_ERR, "%s", mbuf); #endif /* Also log it to stderr? */ @@ -78,7 +78,7 @@ error(char *fmt, ...) write(2, "\n", 1); } - syslog(LOG_CRIT, "exiting."); + cap_syslog(capsyslog, LOG_CRIT, "exiting."); if (log_perror) { fprintf(stderr, "exiting.\n"); fflush(stderr); @@ -103,7 +103,7 @@ warning(char *fmt, ...) va_end(list); #ifndef DEBUG - syslog(log_priority | LOG_ERR, "%s", mbuf); + cap_syslog(capsyslog, log_priority | LOG_ERR, "%s", mbuf); #endif if (log_perror) { @@ -129,7 +129,7 @@ note(char *fmt, ...) va_end(list); #ifndef DEBUG - syslog(log_priority | LOG_INFO, "%s", mbuf); + cap_syslog(capsyslog, log_priority | LOG_INFO, "%s", mbuf); #endif if (log_perror) { @@ -155,7 +155,7 @@ debug(char *fmt, ...) va_end(list); #ifndef DEBUG - syslog(log_priority | LOG_DEBUG, "%s", mbuf); + cap_syslog(capsyslog, log_priority | LOG_DEBUG, "%s", mbuf); #endif if (log_perror) { @@ -217,10 +217,10 @@ parse_warn(char *fmt, ...) va_end(list); #ifndef DEBUG - syslog(log_priority | LOG_ERR, "%s", mbuf); - syslog(log_priority | LOG_ERR, "%s", token_line); + cap_syslog(capsyslog, log_priority | LOG_ERR, "%s", mbuf); + cap_syslog(capsyslog, log_priority | LOG_ERR, "%s", token_line); if (lexline < 81) - syslog(log_priority | LOG_ERR, + cap_syslog(capsyslog, log_priority | LOG_ERR, "%s^", &spaces[sizeof(spaces) - lexchar]); #endif From owner-svn-src-head@freebsd.org Sun Nov 12 08:54:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED517E6CA55; Sun, 12 Nov 2017 08:54: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 BA48081E45; Sun, 12 Nov 2017 08:54: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 vAC8sNnT015112; Sun, 12 Nov 2017 08:54:23 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAC8sN5n015111; Sun, 12 Nov 2017 08:54:23 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201711120854.vAC8sN5n015111@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Sun, 12 Nov 2017 08:54:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325741 - head/sbin/dhclient X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/sbin/dhclient X-SVN-Commit-Revision: 325741 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2017 08:54:25 -0000 Author: oshogbo Date: Sun Nov 12 08:54:23 2017 New Revision: 325741 URL: https://svnweb.freebsd.org/changeset/base/325741 Log: dhclient(8) should not close stdio using daemon(3) function. dhclient(8) is chrooted so opening /dev/null always will fail. In capability world this is also annoying because we getting error that open(2) is not permitted in Capsicum. dhclient(8) is closing stdio by precaching fd to /dev/null before chroot. This is done few lines below daemon(3) function so let's not try to do that in daemon(3) function. Reviewed by: cem@ Differential Revision: https://reviews.freebsd.org/D12826 Modified: head/sbin/dhclient/dhclient.c Modified: head/sbin/dhclient/dhclient.c ============================================================================== --- head/sbin/dhclient/dhclient.c Sun Nov 12 08:42:43 2017 (r325740) +++ head/sbin/dhclient/dhclient.c Sun Nov 12 08:54:23 2017 (r325741) @@ -2423,7 +2423,7 @@ go_daemon(void) /* Stop logging to stderr... */ log_perror = 0; - if (daemon(1, 0) == -1) + if (daemon(1, 1) == -1) error("daemon"); cap_rights_init(&rights); From owner-svn-src-head@freebsd.org Sun Nov 12 08:55:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A310FE6CADB; Sun, 12 Nov 2017 08:55:21 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33D8781F99; Sun, 12 Nov 2017 08:55:21 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id vAC8tEoo081570 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 12 Nov 2017 10:55:15 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua vAC8tEoo081570 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id vAC8tEXw081563; Sun, 12 Nov 2017 10:55:14 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 12 Nov 2017 10:55:14 +0200 From: Konstantin Belousov To: Eitan Adler Cc: rgrimes@freebsd.org, "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r325702 - in head: . share/man/man5 share/man/man7 usr.bin/mail Message-ID: <20171112085514.GL4550@kib.kiev.ua> References: <201711110700.vAB70e9P052013@repo.freebsd.org> <201711111921.vABJLPtL035442@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2017 08:55:21 -0000 On Sun, Nov 12, 2017 at 12:16:22AM -0800, Eitan Adler wrote: > On 11 November 2017 at 11:21, Rodney W. Grimes > wrote: > >> Author: eadler > >> Date: Sat Nov 11 07:00:40 2017 > >> New Revision: 325702 > >> URL: https://svnweb.freebsd.org/changeset/base/325702 > >> > >> Log: > >> mailaddr(7): wave goodbye > >> > >> The information here is somewhere between ancient to obsolete. > > > > 20% of the information here is somewhat obsolete, 80% of it is > > valid, can you please tell me what part of the following main > > body of the page are either ancient or obsolete: > > Yes, there was some technically correct information in the man page. > If someone is new to mail addresses they are unlikely to be learning > about from a man page. > > If you're looking for information on the technical requirements for a > domain or mail address, you'll be reading the RFC. If you're looking > for "how to use my mail client" you'll be looking at that > application's documentation. Following your words, most of this content can be usefully moved into mail(1). From owner-svn-src-head@freebsd.org Sun Nov 12 09:21:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60D60E6D686; Sun, 12 Nov 2017 09:21:26 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D5A58212D; Sun, 12 Nov 2017 09:21:25 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from thor.intern.walstatt.dynvpn.de ([78.55.69.172]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MRCCJ-1ee3FK2HLb-00UbDn; Sun, 12 Nov 2017 10:21:17 +0100 Date: Sun, 12 Nov 2017 10:21:11 +0100 From: "O. Hartmann" To: Baptiste Daroussin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r325738 - in head: . share/misc Message-ID: <20171112102111.4efdd8df@thor.intern.walstatt.dynvpn.de> In-Reply-To: <201711120831.vAC8VHfQ002538@repo.freebsd.org> References: <201711120831.vAC8VHfQ002538@repo.freebsd.org> Organization: WALSTATT User-Agent: OutScare 3.1415926 X-Operating-System: ImNotAnOperatingSystem 3.141592527 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/+0qlMilxpbkZ.bCtTx=g05n"; protocol="application/pgp-signature" X-Provags-ID: V03:K0:mhlX9+wtp9r+Nc3KLuZaqMLfG8iymEzKloje054eI5DGkrDqNkc 7lXsCl1rTjjU5bIkwV/ebWdFqfZxXioGjb5M1qE/QJe3SJgcB2oHmCCkdj+5PkFgC56Zbtd Owiez7KvjQIfRxSLYS/8ts4WqjcaX7MJvsCCx4rsAnvVL2xg3N5XovL8MXssUn3SdR175uA 8TGIBzDzw3JjPitCcFpDg== X-UI-Out-Filterresults: notjunk:1;V01:K0:PT0q8YT1g84=:ddVayCdQN95YtgqfbPiTmj P3VjwmpcO7CPlDV/EQuoTLdJj162SxhT5ju+EcAXh1DEeI/Lipt1vABMg3FlY09bn0dYEyRG7 BsjaF7Gj4er2iw6tu6tJTCfDXefbHVJLuzvumvT83IAtENl5mQAEXu5zlTtp0Ce5cXSOM7Rxk BXfiA4nFM3q9Uj13++vjmdA4giAZPFtU0xPIq5Ihos6OGtECy6aDblNYvTzhvCqMxw71Mwguy xpNBIUzg+m0QeggrbDi2szXc6+gBbC5A3cBO9Ra4blPZUtQecZVZ5lpNxb5Mty69J7FRaRPCc Yj98p6R76syl7FzTQmLb3JS4CEhh+fDNw7IG1dz3sY59UeByv5eXTgLVZhdgBV+87jKMt4LHk Ge50D2yxIADfPGm9l8aTdHsaN6RVQUZLF+Es72abG6/QlhB6vfjYsehWXh5XbYgvqXrE9wvXU FO9S5EMUuz1yna0qdyL7Lrk2IrrxGla0jU7AhfGiIKvZR04zOFcB/gd8XnoiV/PKQvCcVffQZ Na1u4DPdrwDktUTFEpHGXTcj9Sdg0wf/bjckrKQGA24OUaglTxORT5kXBtkeYWLLYR94lraFb 2Q/3OSxjjnAl2y9uXoggCgmWOUgYUcshDRWALhgsdc5CQ8Afq2OHkTegph8V0z74mRqCGZAY0 pjWVeR3nt8OgFHXZKaMMdj025sttExYKEGePhHvBUGiL8X4milE5ugiYNAd2j5kVBjpdqA0a9 LxbkMih5YSZHG41qlnQbLU9zqWKhhJU2ifiWhZ6TeOc82Lu4IiOLUOqyG68rBZoPlhDcRDuug 2Bpi22QB2iH2KT7b0Tri6PJASfsKA== X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2017 09:21:26 -0000 --Sig_/+0qlMilxpbkZ.bCtTx=g05n Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Am Sun, 12 Nov 2017 08:31:17 +0000 (UTC) Baptiste Daroussin schrieb: > Author: bapt > Date: Sun Nov 12 08:31:17 2017 > New Revision: 325738 > URL: https://svnweb.freebsd.org/changeset/base/325738 >=20 > Log: > Remove the special character definitions files for eqn(1) > =20 > This files hasn't been used since groff(1) was introduced in base 23 ye= ars ago. >=20 > Deleted: > head/share/misc/eqnchar > Modified: > head/ObsoleteFiles.inc >=20 > Modified: head/ObsoleteFiles.inc > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/ObsoleteFiles.inc Sun Nov 12 08:00:57 2017 (r325737) > +++ head/ObsoleteFiles.inc Sun Nov 12 08:31:17 2017 (r325738) > @@ -38,6 +38,8 @@ > # xargs -n1 | sort | uniq -d; > # done > =20 > +# 20171112: Removal of eqnchar definition > +OLD_FILES+=3Dusr/share/misc/eqnchar > # 20171110: Removal of mailaddr man page > OLD_FILES+=3Dusr/share/man/man7/mailaddr.7.gz > # 20171108: badsect(8) removal > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" A buildworld/buildkernel fails after this commit: [...] --- all_subdir_share --- make[4]: make[4]: don't know how to make eqnchar. Stop make[4]: stopped in /usr/src/share/misc .ERROR_TARGET=3D'eqnchar' .ERROR_META_FILE=3D'' .MAKE.LEVEL=3D'4' MAKEFILE=3D'' .MAKE.MODE=3D'meta missing-filemon=3Dyes missing-meta=3Dyes silent=3Dyes ve= rbose' _ERROR_CMD=3D'.PHONY' .CURDIR=3D'/usr/src/share/misc' .MAKE=3D'make' .OBJDIR=3D'/usr/obj/usr/src/amd64.amd64/share/misc' .TARGETS=3D'all' DESTDIR=3D'/usr/obj/usr/src/amd64.amd64/tmp' LD_LIBRARY_PATH=3D'' MACHINE=3D'amd64' MACHINE_ARCH=3D'amd64' MAKEOBJDIRPREFIX=3D'' MAKESYSPATH=3D'/usr/src/share/mk' MAKE_VERSION=3D'20171028' PATH=3D'/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin:/usr/obj/usr/src/a= md64.amd64/tmp/legacy/usr/bin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/bin:/= usr/obj/usr/src/amd64.amd64/tmp/usr/sbin:/usr/obj/usr/src/amd64.amd64/tmp/u= sr/bin:/sbin:/bin:/usr/sbin:/usr/bin' SRCTOP=3D'/usr/src' OBJTOP=3D'/usr/obj/usr/src/amd64.amd64' .MAKE.MAKEFILES=3D'/usr/src/share/mk/sys.mk /usr/src/share/mk/local.sys.env= .mk /usr/src/share/mk/src.sys.env.mk /etc/src-env.conf /usr/src/share/mk/sr= c.sys.obj.mk /usr/src/share/mk/bsd.mkopt.mk /usr/src/share/mk/bsd.mkopt.mk = /usr/src/share/mk/auto.obj.mk /usr/src/share/mk/bsd.suffixes.mk /etc/make.c= onf /usr/local/etc/ports.conf /usr/src/share/mk/local.sys.mk /usr/src/share= /mk/src.sys.mk /etc/src.conf /usr/src/share/misc/Makefile /usr/src/share/mk= /src.opts.mk /usr/src/share/mk/bsd.own.mk /usr/src/share/mk/bsd.opts.mk /us= r/src/share/mk/bsd.cpu.mk /usr/src/share/mk/bsd.compiler.mk /usr/src/share/= mk/bsd.linker.mk /usr/src/share/mk/bsd.prog.mk /usr/src/share/mk/bsd.init.m= k /usr/src/share/mk/local.init.mk /usr/src/share/mk/src.init.mk /usr/src/sh= are/misc/../Makefile.inc /usr/src/share/mk/bsd.libnames.mk /usr/src/share/m= k/src.libnames.mk /usr/src/share/mk/bsd.nls.mk /usr/src/share/mk/bsd.confs.= mk /usr/src/share/mk/bsd.files.mk /usr/src/share/mk/bsd.incs.mk /usr/src/sh= are/mk/bsd.links.mk /usr/src/share/mk/bsd.man.mk /usr/src/share/mk/bsd.dep.= mk /usr/src/share/mk/bsd.clang-analyze.mk /usr/src/share/mk/bsd.obj.mk /usr= /src/share/mk/bsd.subdir.mk /usr/src/share/mk/bsd.sys.mk' .PATH=3D'. /usr/src/share/misc /usr/src/share/misc/../../sys/dev/usb' *** [all_subdir_share/misc] Error code 2 --=20 O. Hartmann Ich widerspreche der Nutzung oder =C3=9Cbermittlung meiner Daten f=C3=BCr Werbezwecke oder f=C3=BCr die Markt- oder Meinungsforschung (=C2=A7 28 Abs.= 4 BDSG). --Sig_/+0qlMilxpbkZ.bCtTx=g05n Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCWggShwAKCRDS528fyFhY lCVlAf9YfKgwHwIG151m12gn6I7Tljs7HBYehjtX0AZ3wayjIC7bIBFlVvA6DMpY KOpZ//wh31pdKwyfKRUb5CrQTXNaAf4+86YxCg8vd2zdRMwiuGqIA/1OQOS5daaH WOW3brlPy7E5dqf2ovA5Hmbk/jVql1I8Qxv3Tqw/E2I+1rkMpSy2 =W+ey -----END PGP SIGNATURE----- --Sig_/+0qlMilxpbkZ.bCtTx=g05n-- From owner-svn-src-head@freebsd.org Sun Nov 12 09:42:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C187CE6DCA1; Sun, 12 Nov 2017 09:42: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 8EE5E2CD9; Sun, 12 Nov 2017 09:42: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 vAC9ggi0036404; Sun, 12 Nov 2017 09:42:42 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAC9ggKK036403; Sun, 12 Nov 2017 09:42:42 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201711120942.vAC9ggKK036403@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 12 Nov 2017 09:42:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325742 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 325742 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2017 09:42:43 -0000 Author: bapt Date: Sun Nov 12 09:42:42 2017 New Revision: 325742 URL: https://svnweb.freebsd.org/changeset/base/325742 Log: Stop installing eqnchar which has been removed Pointyhat to: bapt Modified: head/share/misc/Makefile Modified: head/share/misc/Makefile ============================================================================== --- head/share/misc/Makefile Sun Nov 12 08:54:23 2017 (r325741) +++ head/share/misc/Makefile Sun Nov 12 09:42:42 2017 (r325742) @@ -6,7 +6,7 @@ .PATH: ${.CURDIR}/../../sys/dev/usb FILES= ascii birthtoken bsd-family-tree committers-doc.dot committers-ports.dot \ - committers-src.dot eqnchar flowers init.ee \ + committers-src.dot flowers init.ee \ iso3166 iso639 latin1 mdoc.template operator pci_vendors \ scsi_modes \ organization.dot From owner-svn-src-head@freebsd.org Sun Nov 12 10:22:00 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D768CE6E717; Sun, 12 Nov 2017 10:22:00 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lf0-f66.google.com (mail-lf0-f66.google.com [209.85.215.66]) (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 685FE3DAF; Sun, 12 Nov 2017 10:21:59 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lf0-f66.google.com with SMTP id o66so7092570lfg.0; Sun, 12 Nov 2017 02:21:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=2uJ+/BdghWB3k3EZDiZNZQyEG6tb9CHsi+maMhf5cuQ=; b=Q8NigiipcWCbr+jYbPNl7xmI/XxL5RRic1m903RDUdB3FMeYAa6u2SawkRqXQcgVSY HlyrvOC37PIkGSFx49Ddpg9ZzuOpU8xjA1crF523SS6eE0eyZQm/PBazLUQQEcwkGmuW IgB+0iEO08o2UUgheYdxWqyIn19uXEV8God3wl0idtdbJLIdYNVZqYS6Q+f2z6geLAd0 DloVyUvqSuppNEz/NtcrXWqdPRby4Tt3l5FIjNXSozfIRasPll+1HGPDTcFzizkuaigu ff1mcPHthQelVaetYQt3zFGJwKcglF04bIyeuYjhoFvUkmOZan7z/NssTk997cxfaBed BrEg== X-Gm-Message-State: AJaThX4rTRU0+cP/iIgiNn9daV80LF6LKQl37AtsQMmADWu35pJ1MfAp 0hLmlFRe7Qox+7UzFU8+bQ6oN/4h X-Google-Smtp-Source: AGs4zMYZOY4A4K7cygm0b5LLsk4iLF3WeQAzIRgCEldWWeWmQ+l5tBT8xNdAPxyzwcJksu/aV2fTMg== X-Received: by 10.25.199.201 with SMTP id x192mr1774297lff.199.1510481738410; Sun, 12 Nov 2017 02:15:38 -0800 (PST) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id r125sm2386730lfr.46.2017.11.12.02.15.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Nov 2017 02:15:37 -0800 (PST) Subject: Re: svn commit: r324619 - in head/usr.bin/procstat: . tests To: Brooks Davis , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201710141838.v9EIcaOQ047300@repo.freebsd.org> From: Andriy Gapon Message-ID: <81c30f82-268e-ce59-4326-5a2f14ca62e5@FreeBSD.org> Date: Sun, 12 Nov 2017 12:15:35 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <201710141838.v9EIcaOQ047300@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2017 10:22:00 -0000 On 14/10/2017 21:38, Brooks Davis wrote: > Author: brooks > Date: Sat Oct 14 18:38:36 2017 > New Revision: 324619 > URL: https://svnweb.freebsd.org/changeset/base/324619 > > Log: > Switch procstat from subcommand flags to verbs > > - Use an enumerated value instead of separate flags for commands > - Look for a verb if no command flag is set > - Lookup the "xocontainer" value based on the command > - Document the new command verbs in the man-page > > Submitted by: kdrakehp@zoho.com > Differential Revision: https://reviews.freebsd.org/D10916 What's the new way of doing procstat -kk -a ? procstat -kk -a now crashes because cmd is NULL when 'k' option is processed. procstat kstack and procstat kstack -v just produce the usage message without telling any specific usage error. procstat kstack -a says that 'a' is an illegal option. -- Andriy Gapon From owner-svn-src-head@freebsd.org Sun Nov 12 14:26:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33E48E72D8A; Sun, 12 Nov 2017 14:26:23 +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 CD72C69838; Sun, 12 Nov 2017 14:26:22 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id DtDAeUi1n8LPZDtDDeDlX2; Sun, 12 Nov 2017 07:26:16 -0700 X-Authority-Analysis: v=2.2 cv=e552ceh/ c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=sC3jslCIGhcA:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=yaAG3qJ-AAAA:8 a=6azmR-cSAAAA:8 a=WGb3iPcmAAAA:8 a=-Vy2OzQZFe8N4X7HosAA:9 a=DjkGPDPG-g7wXDhE:21 a=-joWIwtk7dXldF-o:21 a=XTsj52VrgMFMBEql:21 a=QEXdDO2ut3YA:10 a=Ytm8v_FqGBcA:10 a=415uMnwt9euyry44hZUA:9 a=KDBns9zPkFtASjw6:21 a=MMzhBxgxhSv6LlOE:21 a=jwLYlFnmYNwfE1nq:21 a=_W_S_7VecoQA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=oLVlbjkABFOu4cUI0CGI:22 a=iGTr5Po_PWzzNro3Gps8:22 a=9JPlHzl_CvN4BZy81pxD:22 Received: from [25.84.90.114] (unknown [24.114.23.48]) by spqr.komquats.com (Postfix) with ESMTPSA id 3E88FBCC; Sun, 12 Nov 2017 06:26:11 -0800 (PST) MIME-Version: 1.0 From: Cy Schubert Subject: RE: svn commit: r324696 - in head/contrib/wpa: src/ap src/common src/rsn_supp wpa_supplicant Date: Sun, 12 Nov 2017 07:26:14 -0700 To: Gordon Tetlow , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <20171112142611.3E88FBCC@spqr.komquats.com> X-CMAE-Envelope: MS4wfNUI5KUdKMTLtk4n1urcyRuuJIwdcUexca0Xu1PL5+4pAvxMziqYvR/sbyTNRjy9mlaee0y2WVt4k8bi9uGm6JfYuHOrtenH5zrGcNXeHB1GL7z3ioug r4C+kJFcXh1PV+k481YHtJHv2cva02dpeoKxf+/l3MyDh8V6mJbgXUjLpfBK4KAzGlaTv9Q9V4YyL56RAkK6SLv9rzDOARDzv4bMkNdAXZgTy73+ryAMiE5K 2fmjXLDQiPp5ODzLmzzQAAhvsDfiy/bkE74M0GPs93fAIDqz32nSxhStlsLxkwWX Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2017 14:26:23 -0000 This managed to get stuck in the outbox on my phone. Better late than never= . I think we need to start planning to upgrade to 2.6 (and 2.7 when it comes = out), or at least thinking about it, especially with 10.x being badly out o= f date. Also possibly remove hostapd, instead relying on the port for that. --- Sent using a tiny phone keyboard. Apologies for any typos and autocorrect. Cy Schubert or -----Original Message----- From: Gordon Tetlow Sent: 17/10/2017 10:22 To: src-committers@freebsd.org; svn-src-all@freebsd.org; svn-src-head@freeb= sd.org Subject: svn commit: r324696 - in head/contrib/wpa: src/ap src/common src/r= sn_supp wpa_supplicant Author: gordon Date: Tue Oct 17 17:22:36 2017 New Revision: 324696 URL: https://svnweb.freebsd.org/changeset/base/324696 Log: Update wpa_supplicant/hostapd for 2017-01 vulnerability release. =20 hostapd: Avoid key reinstallation in FT handshake Prevent reinstallation of an already in-use group key Extend protection of GTK/IGTK reinstallation of WNM-Sleep Mode cases Fix TK configuration to the driver in EAPOL-Key 3/4 retry case Prevent installation of an all-zero TK Fix PTK rekeying to generate a new ANonce TDLS: Reject TPK-TK reconfiguration WNM: Ignore Key Data in WNM Sleep Mode Response frame if no PMF in use WNM: Ignore WNM-Sleep Mode Response if WNM-Sleep Mode has not been used WNM: Ignore WNM-Sleep Mode Response without pending request FT: Do not allow multiple Reassociation Response frames TDLS: Ignore incoming TDLS Setup Response retries =20 Submitted by: jhb Obtained from: https://w1.fi/security/2017-01/ (against later version) Security: FreeBSD-SA-17:07 Security: CERT VU#228519 Security: CVE-2017-13077 Security: CVE-2017-13078 Security: CVE-2017-13079 Security: CVE-2017-13080 Security: CVE-2017-13081 Security: CVE-2017-13082 Security: CVE-2017-13086 Security: CVE-2017-13087 Security: CVE-2017-13088 Differential Revision: https://reviews.freebsd.org/D12693 Modified: head/contrib/wpa/src/ap/wpa_auth.c head/contrib/wpa/src/ap/wpa_auth.h head/contrib/wpa/src/ap/wpa_auth_ft.c head/contrib/wpa/src/ap/wpa_auth_i.h head/contrib/wpa/src/common/wpa_common.h head/contrib/wpa/src/rsn_supp/tdls.c head/contrib/wpa/src/rsn_supp/wpa.c head/contrib/wpa/src/rsn_supp/wpa_ft.c head/contrib/wpa/src/rsn_supp/wpa_i.h head/contrib/wpa/wpa_supplicant/ctrl_iface.c head/contrib/wpa/wpa_supplicant/events.c head/contrib/wpa/wpa_supplicant/wnm_sta.c head/contrib/wpa/wpa_supplicant/wpa_supplicant_i.h Modified: head/contrib/wpa/src/ap/wpa_auth.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/contrib/wpa/src/ap/wpa_auth.c Tue Oct 17 16:29:50 2017 (r324695) +++ head/contrib/wpa/src/ap/wpa_auth.c Tue Oct 17 17:22:36 2017 (r324696) @@ -1893,6 +1893,21 @@ SM_STATE(WPA_PTK, AUTHENTICATION2) } =20 =20 +static int wpa_auth_sm_ptk_update(struct wpa_state_machine *sm) +{ + if (random_get_bytes(sm->ANonce, WPA_NONCE_LEN)) { + wpa_printf(MSG_ERROR, + "WPA: Failed to get random data for ANonce"); + sm->Disconnect =3D TRUE; + return -1; + } + wpa_hexdump(MSG_DEBUG, "WPA: Assign new ANonce", sm->ANonce, + WPA_NONCE_LEN); + sm->TimeoutCtr =3D 0; + return 0; +} + + SM_STATE(WPA_PTK, INITPMK) { u8 msk[2 * PMK_LEN]; @@ -2414,9 +2429,12 @@ SM_STEP(WPA_PTK) SM_ENTER(WPA_PTK, AUTHENTICATION); else if (sm->ReAuthenticationRequest) SM_ENTER(WPA_PTK, AUTHENTICATION2); - else if (sm->PTKRequest) - SM_ENTER(WPA_PTK, PTKSTART); - else switch (sm->wpa_ptk_state) { + else if (sm->PTKRequest) { + if (wpa_auth_sm_ptk_update(sm) < 0) + SM_ENTER(WPA_PTK, DISCONNECTED); + else + SM_ENTER(WPA_PTK, PTKSTART); + } else switch (sm->wpa_ptk_state) { case WPA_PTK_INITIALIZE: break; case WPA_PTK_DISCONNECT: @@ -3206,6 +3224,14 @@ int wpa_auth_sta_wpa_version(struct wpa_state_machin= e=20 if (sm =3D=3D NULL) return 0; return sm->wpa; +} + + +int wpa_auth_sta_ft_tk_already_set(struct wpa_state_machine *sm) +{ + if (!sm || !wpa_key_mgmt_ft(sm->wpa_key_mgmt)) + return 0; + return sm->tk_already_set; } =20 =20 Modified: head/contrib/wpa/src/ap/wpa_auth.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/contrib/wpa/src/ap/wpa_auth.h Tue Oct 17 16:29:50 2017 (r324695) +++ head/contrib/wpa/src/ap/wpa_auth.h Tue Oct 17 17:22:36 2017 (r324696) @@ -271,6 +271,7 @@ int wpa_auth_pairwise_set(struct wpa_state_machine *sm int wpa_auth_get_pairwise(struct wpa_state_machine *sm); int wpa_auth_sta_key_mgmt(struct wpa_state_machine *sm); int wpa_auth_sta_wpa_version(struct wpa_state_machine *sm); +int wpa_auth_sta_ft_tk_already_set(struct wpa_state_machine *sm); int wpa_auth_sta_clear_pmksa(struct wpa_state_machine *sm, struct rsn_pmksa_cache_entry *entry); struct rsn_pmksa_cache_entry * Modified: head/contrib/wpa/src/ap/wpa_auth_ft.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/contrib/wpa/src/ap/wpa_auth_ft.c Tue Oct 17 16:29:50 2017 (r324695= ) +++ head/contrib/wpa/src/ap/wpa_auth_ft.c Tue Oct 17 17:22:36 2017 (r324696= ) @@ -780,6 +780,14 @@ void wpa_ft_install_ptk(struct wpa_state_machine *sm) return; } =20 + if (sm->tk_already_set) { + /* Must avoid TK reconfiguration to prevent clearing of TX/RX + * PN in the driver */ + wpa_printf(MSG_DEBUG, + "FT: Do not re-install same PTK to the driver"); + return; + } + /* FIX: add STA entry to kernel/driver here? The set_key will fail * most likely without this.. At the moment, STA entry is added only * after association has been completed. This function will be called @@ -792,6 +800,7 @@ void wpa_ft_install_ptk(struct wpa_state_machine *sm) =20 /* FIX: MLME-SetProtection.Request(TA, Tx_Rx) */ sm->pairwise_set =3D TRUE; + sm->tk_already_set =3D TRUE; } =20 =20 @@ -898,6 +907,7 @@ static int wpa_ft_process_auth_req(struct wpa_state_ma =20 sm->pairwise =3D pairwise; sm->PTK_valid =3D TRUE; + sm->tk_already_set =3D FALSE; wpa_ft_install_ptk(sm); =20 buflen =3D 2 + sizeof(struct rsn_mdie) + 2 + sizeof(struct rsn_ftie) + Modified: head/contrib/wpa/src/ap/wpa_auth_i.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/contrib/wpa/src/ap/wpa_auth_i.h Tue Oct 17 16:29:50 2017 (r324695) +++ head/contrib/wpa/src/ap/wpa_auth_i.h Tue Oct 17 17:22:36 2017 (r324696) @@ -64,6 +64,7 @@ struct wpa_state_machine { struct wpa_ptk PTK; Boolean PTK_valid; Boolean pairwise_set; + Boolean tk_already_set; int keycount; Boolean Pair; struct wpa_key_replay_counter { Modified: head/contrib/wpa/src/common/wpa_common.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/contrib/wpa/src/common/wpa_common.h Tue Oct 17 16:29:50 2017 (r324= 695) +++ head/contrib/wpa/src/common/wpa_common.h Tue Oct 17 17:22:36 2017 (r324= 696) @@ -213,8 +213,20 @@ struct wpa_ptk { size_t kck_len; size_t kek_len; size_t tk_len; + int installed; /* 1 if key has already been installed to driver */ }; =20 +struct wpa_gtk { + u8 gtk[WPA_GTK_MAX_LEN]; + size_t gtk_len; +}; + +#ifdef CONFIG_IEEE80211W +struct wpa_igtk { + u8 igtk[WPA_IGTK_MAX_LEN]; + size_t igtk_len; +}; +#endif /* CONFIG_IEEE80211W */ =20 /* WPA IE version 1 * 00-50-f2:1 (OUI:OUI type) Modified: head/contrib/wpa/src/rsn_supp/tdls.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/contrib/wpa/src/rsn_supp/tdls.c Tue Oct 17 16:29:50 2017 (r324695) +++ head/contrib/wpa/src/rsn_supp/tdls.c Tue Oct 17 17:22:36 2017 (r324696) @@ -112,6 +112,7 @@ struct wpa_tdls_peer { u8 tk[16]; /* TPK-TK; assuming only CCMP will be used */ } tpk; int tpk_set; + int tk_set; /* TPK-TK configured to the driver */ int tpk_success; int tpk_in_progress; =20 @@ -192,6 +193,20 @@ static int wpa_tdls_set_key(struct wpa_sm *sm, struct= =20 u8 rsc[6]; enum wpa_alg alg; =20 + if (peer->tk_set) { + /* + * This same TPK-TK has already been configured to the driver + * and this new configuration attempt (likely due to an + * unexpected retransmitted frame) would result in clearing + * the TX/RX sequence number which can break security, so must + * not allow that to happen. + */ + wpa_printf(MSG_INFO, "TDLS: TPK-TK for the peer " MACSTR + " has already been configured to the driver - do not reconfigure", + MAC2STR(peer->addr)); + return -1; + } + os_memset(rsc, 0, 6); =20 switch (peer->cipher) { @@ -209,12 +224,15 @@ static int wpa_tdls_set_key(struct wpa_sm *sm, struct= =20 return -1; } =20 + wpa_printf(MSG_DEBUG, "TDLS: Configure pairwise key for peer " MACSTR, + MAC2STR(peer->addr)); if (wpa_sm_set_key(sm, alg, peer->addr, -1, 1, rsc, sizeof(rsc), peer->tpk.tk, key_len) < 0) { wpa_printf(MSG_WARNING, "TDLS: Failed to set TPK to the " "driver"); return -1; } + peer->tk_set =3D 1; return 0; } =20 @@ -690,7 +708,7 @@ static void wpa_tdls_peer_clear(struct wpa_sm *sm, str peer->cipher =3D 0; peer->qos_info =3D 0; peer->wmm_capable =3D 0; - peer->tpk_set =3D peer->tpk_success =3D 0; + peer->tk_set =3D peer->tpk_set =3D peer->tpk_success =3D 0; peer->chan_switch_enabled =3D 0; os_memset(&peer->tpk, 0, sizeof(peer->tpk)); os_memset(peer->inonce, 0, WPA_NONCE_LEN); @@ -1153,6 +1171,7 @@ skip_rsnie: wpa_tdls_peer_free(sm, peer); return -1; } + peer->tk_set =3D 0; /* A new nonce results in a new TK */ wpa_hexdump(MSG_DEBUG, "TDLS: Initiator Nonce for TPK handshake", peer->inonce, WPA_NONCE_LEN); os_memcpy(ftie->Snonce, peer->inonce, WPA_NONCE_LEN); @@ -1745,6 +1764,19 @@ static int wpa_tdls_addset_peer(struct wpa_sm *sm, s= tr } =20 =20 +static int tdls_nonce_set(const u8 *nonce) +{ + int i; + + for (i =3D 0; i < WPA_NONCE_LEN; i++) { + if (nonce[i]) + return 1; + } + + return 0; +} + + static int wpa_tdls_process_tpk_m1(struct wpa_sm *sm, const u8 *src_addr, const u8 *buf, size_t len) { @@ -1998,7 +2030,8 @@ skip_rsn: peer->rsnie_i_len =3D kde.rsn_ie_len; peer->cipher =3D cipher; =20 - if (os_memcmp(peer->inonce, ftie->Snonce, WPA_NONCE_LEN) !=3D 0) { + if (os_memcmp(peer->inonce, ftie->Snonce, WPA_NONCE_LEN) !=3D 0 || + !tdls_nonce_set(peer->inonce)) { /* * There is no point in updating the RNonce for every obtained * TPK M1 frame (e.g., retransmission due to timeout) with the @@ -2014,6 +2047,7 @@ skip_rsn: "TDLS: Failed to get random data for responder nonce"); goto error; } + peer->tk_set =3D 0; /* A new nonce results in a new TK */ } =20 #if 0 @@ -2170,6 +2204,14 @@ static int wpa_tdls_process_tpk_m2(struct wpa_sm *sm= ,=20 "ignore TPK M2 from " MACSTR, MAC2STR(src_addr)); return -1; } + + if (peer->tpk_success) { + wpa_printf(MSG_INFO, "TDLS: Ignore incoming TPK M2 retry, from " + MACSTR " as TPK M3 was already sent", + MAC2STR(src_addr)); + return 0; + } + wpa_tdls_tpk_retry_timeout_cancel(sm, peer, WLAN_TDLS_SETUP_REQUEST); =20 if (len < 3 + 2 + 1) { Modified: head/contrib/wpa/src/rsn_supp/wpa.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/contrib/wpa/src/rsn_supp/wpa.c Tue Oct 17 16:29:50 2017 (r324695) +++ head/contrib/wpa/src/rsn_supp/wpa.c Tue Oct 17 17:22:36 2017 (r324696) @@ -605,6 +605,12 @@ static int wpa_supplicant_install_ptk(struct wpa_sm *s const u8 *key_rsc; u8 null_rsc[8] =3D { 0, 0, 0, 0, 0, 0, 0, 0 }; =20 + if (sm->ptk.installed) { + wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, + "WPA: Do not re-install same PTK to the driver"); + return 0; + } + wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, "WPA: Installing PTK to the driver"); =20 @@ -643,6 +649,7 @@ static int wpa_supplicant_install_ptk(struct wpa_sm *s =20 /* TK is not needed anymore in supplicant */ os_memset(sm->ptk.tk, 0, WPA_TK_MAX_LEN); + sm->ptk.installed =3D 1; =20 if (sm->wpa_ptk_rekey) { eloop_cancel_timeout(wpa_sm_rekey_ptk, sm, NULL); @@ -692,11 +699,23 @@ struct wpa_gtk_data { =20 static int wpa_supplicant_install_gtk(struct wpa_sm *sm, const struct wpa_gtk_data *gd, - const u8 *key_rsc) + const u8 *key_rsc, int wnm_sleep) { const u8 *_gtk =3D gd->gtk; u8 gtk_buf[32]; =20 + /* Detect possible key reinstallation */ + if ((sm->gtk.gtk_len =3D=3D (size_t) gd->gtk_len && + os_memcmp(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len) =3D=3D 0) || + (sm->gtk_wnm_sleep.gtk_len =3D=3D (size_t) gd->gtk_len && + os_memcmp(sm->gtk_wnm_sleep.gtk, gd->gtk, + sm->gtk_wnm_sleep.gtk_len) =3D=3D 0)) { + wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, + "WPA: Not reinstalling already in-use GTK to the driver (keyidx=3D%d tx= =3D%d len=3D%d)", + gd->keyidx, gd->tx, gd->gtk_len); + return 0; + } + wpa_hexdump_key(MSG_DEBUG, "WPA: Group Key", gd->gtk, gd->gtk_len); wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, "WPA: Installing GTK to the driver (keyidx=3D%d tx=3D%d len=3D%d)", @@ -731,6 +750,15 @@ static int wpa_supplicant_install_gtk(struct wpa_sm *s } os_memset(gtk_buf, 0, sizeof(gtk_buf)); =20 + if (wnm_sleep) { + sm->gtk_wnm_sleep.gtk_len =3D gd->gtk_len; + os_memcpy(sm->gtk_wnm_sleep.gtk, gd->gtk, + sm->gtk_wnm_sleep.gtk_len); + } else { + sm->gtk.gtk_len =3D gd->gtk_len; + os_memcpy(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len); + } + return 0; } =20 @@ -788,7 +816,7 @@ static int wpa_supplicant_pairwise_gtk(struct wpa_sm * (wpa_supplicant_check_group_cipher(sm, sm->group_cipher, gtk_len, gtk_len, &gd.key_rsc_len, &gd.alg) || - wpa_supplicant_install_gtk(sm, &gd, key->key_rsc))) { + wpa_supplicant_install_gtk(sm, &gd, key->key_rsc, 0))) { wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, "RSN: Failed to install GTK"); os_memset(&gd, 0, sizeof(gd)); @@ -802,6 +830,58 @@ static int wpa_supplicant_pairwise_gtk(struct wpa_sm * } =20 =20 +#ifdef CONFIG_IEEE80211W +static int wpa_supplicant_install_igtk(struct wpa_sm *sm, + const struct wpa_igtk_kde *igtk, + int wnm_sleep) +{ + size_t len =3D wpa_cipher_key_len(sm->mgmt_group_cipher); + u16 keyidx =3D WPA_GET_LE16(igtk->keyid); + + /* Detect possible key reinstallation */ + if ((sm->igtk.igtk_len =3D=3D len && + os_memcmp(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len) =3D=3D 0) || + (sm->igtk_wnm_sleep.igtk_len =3D=3D len && + os_memcmp(sm->igtk_wnm_sleep.igtk, igtk->igtk, + sm->igtk_wnm_sleep.igtk_len) =3D=3D 0)) { + wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, + "WPA: Not reinstalling already in-use IGTK to the driver (keyidx=3D%d)"= , + keyidx); + return 0; + } + + wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, + "WPA: IGTK keyid %d pn %02x%02x%02x%02x%02x%02x", + keyidx, MAC2STR(igtk->pn)); + wpa_hexdump_key(MSG_DEBUG, "WPA: IGTK", igtk->igtk, len); + if (keyidx > 4095) { + wpa_msg(sm->ctx->msg_ctx, MSG_WARNING, + "WPA: Invalid IGTK KeyID %d", keyidx); + return -1; + } + if (wpa_sm_set_key(sm, wpa_cipher_to_alg(sm->mgmt_group_cipher), + broadcast_ether_addr, + keyidx, 0, igtk->pn, sizeof(igtk->pn), + igtk->igtk, len) < 0) { + wpa_msg(sm->ctx->msg_ctx, MSG_WARNING, + "WPA: Failed to configure IGTK to the driver"); + return -1; + } + + if (wnm_sleep) { + sm->igtk_wnm_sleep.igtk_len =3D len; + os_memcpy(sm->igtk_wnm_sleep.igtk, igtk->igtk, + sm->igtk_wnm_sleep.igtk_len); + } else { + sm->igtk.igtk_len =3D len; + os_memcpy(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len); + } + + return 0; +} +#endif /* CONFIG_IEEE80211W */ + + static int ieee80211w_set_keys(struct wpa_sm *sm, struct wpa_eapol_ie_parse *ie) { @@ -812,30 +892,14 @@ static int ieee80211w_set_keys(struct wpa_sm *sm, if (ie->igtk) { size_t len; const struct wpa_igtk_kde *igtk; - u16 keyidx; + len =3D wpa_cipher_key_len(sm->mgmt_group_cipher); if (ie->igtk_len !=3D WPA_IGTK_KDE_PREFIX_LEN + len) return -1; + igtk =3D (const struct wpa_igtk_kde *) ie->igtk; - keyidx =3D WPA_GET_LE16(igtk->keyid); - wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, "WPA: IGTK keyid %d " - "pn %02x%02x%02x%02x%02x%02x", - keyidx, MAC2STR(igtk->pn)); - wpa_hexdump_key(MSG_DEBUG, "WPA: IGTK", - igtk->igtk, len); - if (keyidx > 4095) { - wpa_msg(sm->ctx->msg_ctx, MSG_WARNING, - "WPA: Invalid IGTK KeyID %d", keyidx); + if (wpa_supplicant_install_igtk(sm, igtk, 0) < 0) return -1; - } - if (wpa_sm_set_key(sm, wpa_cipher_to_alg(sm->mgmt_group_cipher), - broadcast_ether_addr, - keyidx, 0, igtk->pn, sizeof(igtk->pn), - igtk->igtk, len) < 0) { - wpa_msg(sm->ctx->msg_ctx, MSG_WARNING, - "WPA: Failed to configure IGTK to the driver"); - return -1; - } } =20 return 0; @@ -1483,7 +1547,7 @@ static void wpa_supplicant_process_1_of_2(struct wpa_= s if (ret) goto failed; =20 - if (wpa_supplicant_install_gtk(sm, &gd, key->key_rsc) || + if (wpa_supplicant_install_gtk(sm, &gd, key->key_rsc, 0) || wpa_supplicant_send_2_of_2(sm, key, ver, key_info)) goto failed; os_memset(&gd, 0, sizeof(gd)); @@ -2251,7 +2315,7 @@ void wpa_sm_deinit(struct wpa_sm *sm) */ void wpa_sm_notify_assoc(struct wpa_sm *sm, const u8 *bssid) { - int clear_ptk =3D 1; + int clear_keys =3D 1; =20 if (sm =3D=3D NULL) return; @@ -2277,11 +2341,11 @@ void wpa_sm_notify_assoc(struct wpa_sm *sm, const u= 8 * /* Prepare for the next transition */ wpa_ft_prepare_auth_request(sm, NULL); =20 - clear_ptk =3D 0; + clear_keys =3D 0; } #endif /* CONFIG_IEEE80211R */ =20 - if (clear_ptk) { + if (clear_keys) { /* * IEEE 802.11, 8.4.10: Delete PTK SA on (re)association if * this is not part of a Fast BSS Transition. @@ -2291,6 +2355,12 @@ void wpa_sm_notify_assoc(struct wpa_sm *sm, const u8= * os_memset(&sm->ptk, 0, sizeof(sm->ptk)); sm->tptk_set =3D 0; os_memset(&sm->tptk, 0, sizeof(sm->tptk)); + os_memset(&sm->gtk, 0, sizeof(sm->gtk)); + os_memset(&sm->gtk_wnm_sleep, 0, sizeof(sm->gtk_wnm_sleep)); +#ifdef CONFIG_IEEE80211W + os_memset(&sm->igtk, 0, sizeof(sm->igtk)); + os_memset(&sm->igtk_wnm_sleep, 0, sizeof(sm->igtk_wnm_sleep)); +#endif /* CONFIG_IEEE80211W */ } =20 #ifdef CONFIG_TDLS @@ -2322,6 +2392,9 @@ void wpa_sm_notify_disassoc(struct wpa_sm *sm) #ifdef CONFIG_TDLS wpa_tdls_disassoc(sm); #endif /* CONFIG_TDLS */ +#ifdef CONFIG_IEEE80211R + sm->ft_reassoc_completed =3D 0; +#endif /* CONFIG_IEEE80211R */ =20 /* Keys are not needed in the WPA state machine anymore */ wpa_sm_drop_sa(sm); @@ -2807,6 +2880,12 @@ void wpa_sm_drop_sa(struct wpa_sm *sm) os_memset(sm->pmk, 0, sizeof(sm->pmk)); os_memset(&sm->ptk, 0, sizeof(sm->ptk)); os_memset(&sm->tptk, 0, sizeof(sm->tptk)); + os_memset(&sm->gtk, 0, sizeof(sm->gtk)); + os_memset(&sm->gtk_wnm_sleep, 0, sizeof(sm->gtk_wnm_sleep)); +#ifdef CONFIG_IEEE80211W + os_memset(&sm->igtk, 0, sizeof(sm->igtk)); + os_memset(&sm->igtk_wnm_sleep, 0, sizeof(sm->igtk_wnm_sleep)); +#endif /* CONFIG_IEEE80211W */ #ifdef CONFIG_IEEE80211R os_memset(sm->xxkey, 0, sizeof(sm->xxkey)); os_memset(sm->pmk_r0, 0, sizeof(sm->pmk_r0)); @@ -2870,7 +2949,7 @@ int wpa_wnmsleep_install_key(struct wpa_sm *sm, u8 su= b =20 wpa_hexdump_key(MSG_DEBUG, "Install GTK (WNM SLEEP)", gd.gtk, gd.gtk_len); - if (wpa_supplicant_install_gtk(sm, &gd, key_rsc)) { + if (wpa_supplicant_install_gtk(sm, &gd, key_rsc, 1)) { os_memset(&gd, 0, sizeof(gd)); wpa_printf(MSG_DEBUG, "Failed to install the GTK in " "WNM mode"); @@ -2879,29 +2958,11 @@ int wpa_wnmsleep_install_key(struct wpa_sm *sm, u8 = sub os_memset(&gd, 0, sizeof(gd)); #ifdef CONFIG_IEEE80211W } else if (subelem_id =3D=3D WNM_SLEEP_SUBELEM_IGTK) { - struct wpa_igtk_kde igd; - u16 keyidx; + const struct wpa_igtk_kde *igtk; =20 - os_memset(&igd, 0, sizeof(igd)); - keylen =3D wpa_cipher_key_len(sm->mgmt_group_cipher); - os_memcpy(igd.keyid, buf + 2, 2); - os_memcpy(igd.pn, buf + 4, 6); - - keyidx =3D WPA_GET_LE16(igd.keyid); - os_memcpy(igd.igtk, buf + 10, keylen); - - wpa_hexdump_key(MSG_DEBUG, "Install IGTK (WNM SLEEP)", - igd.igtk, keylen); - if (wpa_sm_set_key(sm, wpa_cipher_to_alg(sm->mgmt_group_cipher), - broadcast_ether_addr, - keyidx, 0, igd.pn, sizeof(igd.pn), - igd.igtk, keylen) < 0) { - wpa_printf(MSG_DEBUG, "Failed to install the IGTK in " - "WNM mode"); - os_memset(&igd, 0, sizeof(igd)); + igtk =3D (const struct wpa_igtk_kde *) (buf + 2); + if (wpa_supplicant_install_igtk(sm, igtk, 1) < 0) return -1; - } - os_memset(&igd, 0, sizeof(igd)); #endif /* CONFIG_IEEE80211W */ } else { wpa_printf(MSG_DEBUG, "Unknown element id"); Modified: head/contrib/wpa/src/rsn_supp/wpa_ft.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/contrib/wpa/src/rsn_supp/wpa_ft.c Tue Oct 17 16:29:50 2017 (r32469= 5 [The entire original message is not included.]= From owner-svn-src-head@freebsd.org Sun Nov 12 14:32:11 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 290D9E7300B; Sun, 12 Nov 2017 14:32:11 +0000 (UTC) (envelope-from bapt@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 08D1269E4A; Sun, 12 Nov 2017 14:32:11 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by freefall.freebsd.org (Postfix, from userid 1235) id 59DB51AD38; Sun, 12 Nov 2017 14:32:10 +0000 (UTC) Date: Sun, 12 Nov 2017 15:32:10 +0100 From: Baptiste Daroussin To: "O. Hartmann" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r325738 - in head: . share/misc Message-ID: <20171112143209.qxxhozykse6wv3vt@ivaldir.net> References: <201711120831.vAC8VHfQ002538@repo.freebsd.org> <20171112102111.4efdd8df@thor.intern.walstatt.dynvpn.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="zcg2mlhiwx3yvjmm" Content-Disposition: inline In-Reply-To: <20171112102111.4efdd8df@thor.intern.walstatt.dynvpn.de> User-Agent: NeoMutt/20171027 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2017 14:32:11 -0000 --zcg2mlhiwx3yvjmm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 12, 2017 at 10:21:11AM +0100, O. Hartmann wrote: > Am Sun, 12 Nov 2017 08:31:17 +0000 (UTC) > Baptiste Daroussin schrieb: >=20 > > Author: bapt > > Date: Sun Nov 12 08:31:17 2017 > > New Revision: 325738 > > URL: https://svnweb.freebsd.org/changeset/base/325738 > >=20 > > Log: > > Remove the special character definitions files for eqn(1) > > =20 > > This files hasn't been used since groff(1) was introduced in base 23 = years ago. > >=20 Should be fixed Bapt --zcg2mlhiwx3yvjmm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAloIW2YACgkQY4mL3PG3 PlrXVA//RxelXSUJqVM6gy1LnU18kVRXU+NKHzBNOfqbuMHdIU53yjJqd/PlI9nz P2b6693K1nlu5SaDSDiPmWzlKyhFGbAqkbZDO86gaBPNfQBuoxRH+yoTBCEQuQY1 1IONpqzv6fd5qMJHU7fQCeZ70Mu5zu2VlYlYTogutj2E4qVuKV5Qi3pMLRZafBkO mNicU8y5aj0D+C0gDp//chDfVmkFwyoyL4dhijnpzJlUJN2132awajXqXPvsAr1n z6jGaqnBO0Stw2ZiZgqVmahfe+TfZ3TWwa4qUDk0DXlg0sMq7hEnPDoNBD92iV6r 9wTtf6XzNhfQBXflnzoMFvdCZ1ekFsvPbCUDkrJ/ozgn1cfNlsAB+OH8jC4Nym2Q 1gj0WtJTn4xAWQlov0I1A9NALbqbaY8sjCojUjVcqig/WnPD+NSS+V2XJqx06iHg ibPlaBe8Zx6lewQ9t8lB0Aw+G/Du/nromqaM6Xez/gfbXC30zjSAmeX1zLlQWLRv s5Ad2sZfkK7EDJbilOadU3fAZeIW+RDZZ0rnjC/KWfvz7eTtahxi66iUxgjvVIxm zvsi3FB+NMdD47xbQ+7Qnp7piTeVZFtjL1SJOZ8vywNfRpTlEzv4RkR3X27q7xOs R48s5QMi4T80+4CiiDcZxD7FRm3fRoeeGQOcgD5YAolSr7tCCXI= =w8I2 -----END PGP SIGNATURE----- --zcg2mlhiwx3yvjmm-- From owner-svn-src-head@freebsd.org Sun Nov 12 17:10:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 957DCC31109; Sun, 12 Nov 2017 17:10:58 +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 62B836DF77; Sun, 12 Nov 2017 17:10:58 +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 vACHAv0r025651; Sun, 12 Nov 2017 17:10:57 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vACHAvYu025650; Sun, 12 Nov 2017 17:10:57 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201711121710.vACHAvYu025650@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 12 Nov 2017 17:10:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325743 - head/sys/boot/forth X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/boot/forth X-SVN-Commit-Revision: 325743 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2017 17:10:58 -0000 Author: imp Date: Sun Nov 12 17:10:57 2017 New Revision: 325743 URL: https://svnweb.freebsd.org/changeset/base/325743 Log: Make sure the proper loader.rc gets installed. There were two things wrong. First, the wrong path was listed in .PATH statement. Second, BOOTSRC wasn't yet defined for the .PATH, so it didn't properly add it. Third, even if these were right, . was in the path before, so it wouldn't have worked. Replace this with a simple loop so the proper loader.rc gets selected. Noticed by: dhw@ (menus stopped working on boot) Sponsored by: Netflix Modified: head/sys/boot/forth/Makefile Modified: head/sys/boot/forth/Makefile ============================================================================== --- head/sys/boot/forth/Makefile Sun Nov 12 09:42:42 2017 (r325742) +++ head/sys/boot/forth/Makefile Sun Nov 12 17:10:57 2017 (r325743) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + MAN+= beastie.4th.8 \ brand.4th.8 \ check-password.4th.8 \ @@ -36,8 +38,13 @@ FILES+= support.4th FILES+= version.4th FILESDIR_loader.conf= /boot/defaults -# Everybody has these, but you can override -.PATH: ${BOOTSRC}/${MACHINE:C/amd64/i386/}/common ${BOOTSRC}/forth -FILES+= loader.rc menu.rc +# Allow machine specific loader.rc to be installed. +.for f in loader.rc menu.rc +.if exists(${BOOTSRC}/${MACHINE:C/amd64/i386/}/loader/${f}) +FILES+= ${BOOTSRC}/${MACHINE:C/amd64/i386/}/loader/${f} +.else +FILES+= ${f} +.endif +.endfor .include From owner-svn-src-head@freebsd.org Sun Nov 12 17:15:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26983C31354; Sun, 12 Nov 2017 17:15: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 E75E16E2FB; Sun, 12 Nov 2017 17:15:55 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vACHFt2v028842; Sun, 12 Nov 2017 17:15:55 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vACHFtsD028841; Sun, 12 Nov 2017 17:15:55 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201711121715.vACHFtsD028841@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 12 Nov 2017 17:15:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325744 - head/sys/boot/efi/boot1 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/boot/efi/boot1 X-SVN-Commit-Revision: 325744 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2017 17:15:56 -0000 Author: emaste Date: Sun Nov 12 17:15:54 2017 New Revision: 325744 URL: https://svnweb.freebsd.org/changeset/base/325744 Log: boot1: also check for NULL device r325681 fixed a NULL pointer dereference on RPi3 caused by a lack of functionality in uboot's EFI implementation. That rev checked the boot1 load path for NULL but not the load device. In practice if the former works the latter will as well, but improve correctness by checking each separately. Submitted by: Keith White Reported by: jhb MFC after: 5 days MFC with: r325681 Sponsored by: The FreeBSD Foundation Modified: head/sys/boot/efi/boot1/boot1.c Modified: head/sys/boot/efi/boot1/boot1.c ============================================================================== --- head/sys/boot/efi/boot1/boot1.c Sun Nov 12 17:10:57 2017 (r325743) +++ head/sys/boot/efi/boot1/boot1.c Sun Nov 12 17:15:54 2017 (r325744) @@ -464,14 +464,16 @@ efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE *Xsystab) printf(" Load Path: %S\n", text); efi_setenv_freebsd_wcs("Boot1Path", text); efi_free_devpath_name(text); + } - status = BS->HandleProtocol(img->DeviceHandle, - &DevicePathGUID, (void **)&imgpath); - if (status != EFI_SUCCESS) { - DPRINTF("Failed to get image DevicePath (%lu)\n", - EFI_ERROR_CODE(status)); - } else { - text = efi_devpath_name(imgpath); + status = BS->HandleProtocol(img->DeviceHandle, &DevicePathGUID, + (void **)&imgpath); + if (status != EFI_SUCCESS) { + DPRINTF("Failed to get image DevicePath (%lu)\n", + EFI_ERROR_CODE(status)); + } else { + text = efi_devpath_name(imgpath); + if (text != NULL) { printf(" Load Device: %S\n", text); efi_setenv_freebsd_wcs("Boot1Dev", text); efi_free_devpath_name(text); From owner-svn-src-head@freebsd.org Sun Nov 12 21:43:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF459C7D537; Sun, 12 Nov 2017 21:43:34 +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 7D32A76465; Sun, 12 Nov 2017 21:43:34 +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 vACLhXxZ045522; Sun, 12 Nov 2017 21:43:33 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vACLhXJ5045521; Sun, 12 Nov 2017 21:43:33 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201711122143.vACLhXJ5045521@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 12 Nov 2017 21:43:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325746 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 325746 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2017 21:43:35 -0000 Author: tuexen Date: Sun Nov 12 21:43:33 2017 New Revision: 325746 URL: https://svnweb.freebsd.org/changeset/base/325746 Log: Cleanup the handling of control chunks. While there fix some minor bug related to clearing the assoc retransmit counter and the dup TSN handling of NR-SACK chunks. MFC after: 3 days Modified: head/sys/netinet/sctp_input.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Sun Nov 12 18:06:43 2017 (r325745) +++ head/sys/netinet/sctp_input.c Sun Nov 12 21:43:33 2017 (r325746) @@ -633,6 +633,14 @@ sctp_handle_heartbeat_ack(struct sctp_heartbeat_chunk r_net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_4); sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, r_net); } + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_THRESHOLD_LOGGING) { + sctp_misc_ints(SCTP_THRESHOLD_CLEAR, + stcb->asoc.overall_error_count, + 0, + SCTP_FROM_SCTP_INPUT, + __LINE__); + } + stcb->asoc.overall_error_count = 0; old_error_counter = r_net->error_count; r_net->error_count = 0; r_net->hb_responded = 1; @@ -2925,7 +2933,14 @@ sctp_handle_cookie_ack(struct sctp_cookie_ack_chunk *c return; } asoc = &stcb->asoc; - + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_THRESHOLD_LOGGING) { + sctp_misc_ints(SCTP_THRESHOLD_CLEAR, + asoc->overall_error_count, + 0, + SCTP_FROM_SCTP_INPUT, + __LINE__); + } + asoc->overall_error_count = 0; sctp_stop_all_cookie_timers(stcb); /* process according to association state */ if (SCTP_GET_STATE(asoc) == SCTP_STATE_COOKIE_ECHOED) { @@ -4718,14 +4733,6 @@ sctp_process_control(struct mbuf *m, int iphlen, int * (ch->chunk_type == SCTP_HEARTBEAT_REQUEST)) && (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_COOKIE_ECHOED)) { /* implied cookie-ack.. we must have lost the ack */ - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_THRESHOLD_LOGGING) { - sctp_misc_ints(SCTP_THRESHOLD_CLEAR, - stcb->asoc.overall_error_count, - 0, - SCTP_FROM_SCTP_INPUT, - __LINE__); - } - stcb->asoc.overall_error_count = 0; sctp_handle_cookie_ack((struct sctp_cookie_ack_chunk *)ch, stcb, *netp); } @@ -4859,7 +4866,7 @@ process_control_chunks: case SCTP_PAD_CHUNK: break; case SCTP_INITIATION_ACK: - SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_INIT-ACK\n"); + SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_INIT_ACK\n"); if (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) { /* We are not interested anymore */ if ((stcb != NULL) && (stcb->asoc.total_output_queue_size)) { @@ -4890,7 +4897,7 @@ process_control_chunks: *offset = length; return (stcb); } - if ((netp) && (*netp)) { + if ((netp != NULL) && (*netp != NULL)) { ret = sctp_handle_init_ack(m, iphlen, *offset, src, dst, sh, (struct sctp_init_ack_chunk *)ch, @@ -4915,23 +4922,35 @@ process_control_chunks: return (stcb); break; case SCTP_SELECTIVE_ACK: + case SCTP_NR_SELECTIVE_ACK: { - struct sctp_sack_chunk *sack; int abort_now = 0; uint32_t a_rwnd, cum_ack; - uint16_t num_seg, num_dup; + uint16_t num_seg, num_nr_seg, num_dup; uint8_t flags; int offset_seg, offset_dup; - SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_SACK\n"); + SCTPDBG(SCTP_DEBUG_INPUT3, "%s\n", + ch->chunk_type == SCTP_SELECTIVE_ACK ? "SCTP_SACK" : "SCTP_NR_SACK"); SCTP_STAT_INCR(sctps_recvsacks); if (stcb == NULL) { - SCTPDBG(SCTP_DEBUG_INDATA1, "No stcb when processing SACK chunk\n"); + SCTPDBG(SCTP_DEBUG_INDATA1, "No stcb when processing %s chunk\n", + (ch->chunk_type == SCTP_SELECTIVE_ACK) ? "SCTP_SACK" : "SCTP_NR_SACK"); break; } - if (chk_length < sizeof(struct sctp_sack_chunk)) { - SCTPDBG(SCTP_DEBUG_INDATA1, "Bad size on SACK chunk, too small\n"); - break; + if (ch->chunk_type == SCTP_SELECTIVE_ACK) { + if (chk_length < sizeof(struct sctp_sack_chunk)) { + SCTPDBG(SCTP_DEBUG_INDATA1, "Bad size on SACK chunk, too small\n"); + break; + } + } else { + if (stcb->asoc.nrsack_supported == 0) { + goto unknown_chunk; + } + if (chk_length < sizeof(struct sctp_nr_sack_chunk)) { + SCTPDBG(SCTP_DEBUG_INDATA1, "Bad size on NR_SACK chunk, too small\n"); + break; + } } if (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_SHUTDOWN_ACK_SENT) { /*- @@ -4941,108 +4960,44 @@ process_control_chunks: */ break; } - sack = (struct sctp_sack_chunk *)ch; flags = ch->chunk_flags; - cum_ack = ntohl(sack->sack.cum_tsn_ack); - num_seg = ntohs(sack->sack.num_gap_ack_blks); - num_dup = ntohs(sack->sack.num_dup_tsns); - a_rwnd = (uint32_t)ntohl(sack->sack.a_rwnd); - if (sizeof(struct sctp_sack_chunk) + - num_seg * sizeof(struct sctp_gap_ack_block) + - num_dup * sizeof(uint32_t) != chk_length) { - SCTPDBG(SCTP_DEBUG_INDATA1, "Bad size of SACK chunk\n"); - break; - } - offset_seg = *offset + sizeof(struct sctp_sack_chunk); - offset_dup = offset_seg + num_seg * sizeof(struct sctp_gap_ack_block); - SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_SACK process cum_ack:%x num_seg:%d a_rwnd:%d\n", - cum_ack, num_seg, a_rwnd); - stcb->asoc.seen_a_sack_this_pkt = 1; - if ((stcb->asoc.pr_sctp_cnt == 0) && - (num_seg == 0) && - SCTP_TSN_GE(cum_ack, stcb->asoc.last_acked_seq) && - (stcb->asoc.saw_sack_with_frags == 0) && - (stcb->asoc.saw_sack_with_nr_frags == 0) && - (!TAILQ_EMPTY(&stcb->asoc.sent_queue)) - ) { - /* - * We have a SIMPLE sack having no - * prior segments and data on sent - * queue to be acked.. Use the - * faster path sack processing. We - * also allow window update sacks - * with no missing segments to go - * this way too. - */ - sctp_express_handle_sack(stcb, cum_ack, a_rwnd, &abort_now, ecne_seen); + if (ch->chunk_type == SCTP_SELECTIVE_ACK) { + struct sctp_sack_chunk *sack; + + sack = (struct sctp_sack_chunk *)ch; + cum_ack = ntohl(sack->sack.cum_tsn_ack); + num_seg = ntohs(sack->sack.num_gap_ack_blks); + num_nr_seg = 0; + num_dup = ntohs(sack->sack.num_dup_tsns); + a_rwnd = ntohl(sack->sack.a_rwnd); + if (sizeof(struct sctp_sack_chunk) + + num_seg * sizeof(struct sctp_gap_ack_block) + + num_dup * sizeof(uint32_t) != chk_length) { + SCTPDBG(SCTP_DEBUG_INDATA1, "Bad size of SACK chunk\n"); + break; + } + offset_seg = *offset + sizeof(struct sctp_sack_chunk); + offset_dup = offset_seg + num_seg * sizeof(struct sctp_gap_ack_block); } else { - if (netp && *netp) - sctp_handle_sack(m, offset_seg, offset_dup, stcb, - num_seg, 0, num_dup, &abort_now, flags, - cum_ack, a_rwnd, ecne_seen); - } - if (abort_now) { - /* ABORT signal from sack processing */ - *offset = length; - return (NULL); - } - if (TAILQ_EMPTY(&stcb->asoc.send_queue) && - TAILQ_EMPTY(&stcb->asoc.sent_queue) && - (stcb->asoc.stream_queue_cnt == 0)) { - sctp_ulp_notify(SCTP_NOTIFY_SENDER_DRY, stcb, 0, NULL, SCTP_SO_NOT_LOCKED); - } - } - break; - /* - * EY - nr_sack: If the received chunk is an - * nr_sack chunk - */ - case SCTP_NR_SELECTIVE_ACK: - { - struct sctp_nr_sack_chunk *nr_sack; - int abort_now = 0; - uint32_t a_rwnd, cum_ack; - uint16_t num_seg, num_nr_seg, num_dup; - uint8_t flags; - int offset_seg, offset_dup; + struct sctp_nr_sack_chunk *nr_sack; - SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_NR_SACK\n"); - SCTP_STAT_INCR(sctps_recvsacks); - if (stcb == NULL) { - SCTPDBG(SCTP_DEBUG_INDATA1, "No stcb when processing NR-SACK chunk\n"); - break; + nr_sack = (struct sctp_nr_sack_chunk *)ch; + cum_ack = ntohl(nr_sack->nr_sack.cum_tsn_ack); + num_seg = ntohs(nr_sack->nr_sack.num_gap_ack_blks); + num_nr_seg = ntohs(nr_sack->nr_sack.num_nr_gap_ack_blks); + num_dup = ntohs(nr_sack->nr_sack.num_dup_tsns); + a_rwnd = ntohl(nr_sack->nr_sack.a_rwnd); + if (sizeof(struct sctp_nr_sack_chunk) + + (num_seg + num_nr_seg) * sizeof(struct sctp_gap_ack_block) + + num_dup * sizeof(uint32_t) != chk_length) { + SCTPDBG(SCTP_DEBUG_INDATA1, "Bad size of NR_SACK chunk\n"); + break; + } + offset_seg = *offset + sizeof(struct sctp_nr_sack_chunk); + offset_dup = offset_seg + (num_seg + num_nr_seg) * sizeof(struct sctp_gap_ack_block); } - if (stcb->asoc.nrsack_supported == 0) { - goto unknown_chunk; - } - if (chk_length < sizeof(struct sctp_nr_sack_chunk)) { - SCTPDBG(SCTP_DEBUG_INDATA1, "Bad size on NR-SACK chunk, too small\n"); - break; - } - if (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_SHUTDOWN_ACK_SENT) { - /*- - * If we have sent a shutdown-ack, we will pay no - * attention to a sack sent in to us since - * we don't care anymore. - */ - break; - } - nr_sack = (struct sctp_nr_sack_chunk *)ch; - flags = ch->chunk_flags; - cum_ack = ntohl(nr_sack->nr_sack.cum_tsn_ack); - num_seg = ntohs(nr_sack->nr_sack.num_gap_ack_blks); - num_nr_seg = ntohs(nr_sack->nr_sack.num_nr_gap_ack_blks); - num_dup = ntohs(nr_sack->nr_sack.num_dup_tsns); - a_rwnd = (uint32_t)ntohl(nr_sack->nr_sack.a_rwnd); - if (sizeof(struct sctp_nr_sack_chunk) + - (num_seg + num_nr_seg) * sizeof(struct sctp_gap_ack_block) + - num_dup * sizeof(uint32_t) != chk_length) { - SCTPDBG(SCTP_DEBUG_INDATA1, "Bad size of NR_SACK chunk\n"); - break; - } - offset_seg = *offset + sizeof(struct sctp_nr_sack_chunk); - offset_dup = offset_seg + num_seg * sizeof(struct sctp_gap_ack_block); - SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_NR_SACK process cum_ack:%x num_seg:%d a_rwnd:%d\n", + SCTPDBG(SCTP_DEBUG_INPUT3, "%s process cum_ack:%x num_seg:%d a_rwnd:%d\n", + (ch->chunk_type == SCTP_SELECTIVE_ACK) ? "SCTP_SACK" : "SCTP_NR_SACK", cum_ack, num_seg, a_rwnd); stcb->asoc.seen_a_sack_this_pkt = 1; if ((stcb->asoc.pr_sctp_cnt == 0) && @@ -5063,10 +5018,11 @@ process_control_chunks: sctp_express_handle_sack(stcb, cum_ack, a_rwnd, &abort_now, ecne_seen); } else { - if (netp && *netp) + if ((netp != NULL) && (*netp != NULL)) { sctp_handle_sack(m, offset_seg, offset_dup, stcb, num_seg, num_nr_seg, num_dup, &abort_now, flags, cum_ack, a_rwnd, ecne_seen); + } } if (abort_now) { /* ABORT signal from sack processing */ @@ -5078,47 +5034,28 @@ process_control_chunks: (stcb->asoc.stream_queue_cnt == 0)) { sctp_ulp_notify(SCTP_NOTIFY_SENDER_DRY, stcb, 0, NULL, SCTP_SO_NOT_LOCKED); } + break; } - break; - case SCTP_HEARTBEAT_REQUEST: SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_HEARTBEAT\n"); - if ((stcb) && netp && *netp) { + if ((stcb != NULL) && (netp != NULL) && (*netp != NULL)) { SCTP_STAT_INCR(sctps_recvheartbeat); sctp_send_heartbeat_ack(stcb, m, *offset, chk_length, *netp); - - /* He's alive so give him credit */ - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_THRESHOLD_LOGGING) { - sctp_misc_ints(SCTP_THRESHOLD_CLEAR, - stcb->asoc.overall_error_count, - 0, - SCTP_FROM_SCTP_INPUT, - __LINE__); - } - stcb->asoc.overall_error_count = 0; } break; case SCTP_HEARTBEAT_ACK: - SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_HEARTBEAT-ACK\n"); + SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_HEARTBEAT_ACK\n"); if ((stcb == NULL) || (chk_length != sizeof(struct sctp_heartbeat_chunk))) { /* Its not ours */ *offset = length; return (stcb); } - /* He's alive so give him credit */ - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_THRESHOLD_LOGGING) { - sctp_misc_ints(SCTP_THRESHOLD_CLEAR, - stcb->asoc.overall_error_count, - 0, - SCTP_FROM_SCTP_INPUT, - __LINE__); - } - stcb->asoc.overall_error_count = 0; SCTP_STAT_INCR(sctps_recvheartbeatack); - if (netp && *netp) + if ((netp != NULL) && (*netp != NULL)) { sctp_handle_heartbeat_ack((struct sctp_heartbeat_chunk *)ch, stcb, *netp); + } break; case SCTP_ABORT_ASSOCIATION: SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_ABORT, stcb %p\n", @@ -5141,7 +5078,7 @@ process_control_chunks: *offset = length; return (stcb); } - if (netp && *netp) { + if ((netp != NULL) && (*netp != NULL)) { int abort_flag = 0; sctp_handle_shutdown((struct sctp_shutdown_chunk *)ch, @@ -5153,24 +5090,25 @@ process_control_chunks: } break; case SCTP_SHUTDOWN_ACK: - SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_SHUTDOWN-ACK, stcb %p\n", (void *)stcb); - if ((stcb) && (netp) && (*netp)) + SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_SHUTDOWN_ACK, stcb %p\n", (void *)stcb); + if ((stcb != NULL) && (netp != NULL) && (*netp != NULL)) { sctp_handle_shutdown_ack((struct sctp_shutdown_ack_chunk *)ch, stcb, *netp); + } *offset = length; return (NULL); break; - case SCTP_OPERATION_ERROR: - SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_OP-ERR\n"); - if ((stcb) && netp && *netp && sctp_handle_error(ch, stcb, *netp) < 0) { + SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_OP_ERR\n"); + if ((stcb != NULL) && (netp != NULL) && (*netp != NULL) && + sctp_handle_error(ch, stcb, *netp) < 0) { *offset = length; return (NULL); } break; case SCTP_COOKIE_ECHO: SCTPDBG(SCTP_DEBUG_INPUT3, - "SCTP_COOKIE-ECHO, stcb %p\n", (void *)stcb); - if ((stcb) && (stcb->asoc.total_output_queue_size)) { + "SCTP_COOKIE_ECHO, stcb %p\n", (void *)stcb); + if ((stcb != NULL) && (stcb->asoc.total_output_queue_size > 0)) { ; } else { if (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) { @@ -5224,7 +5162,7 @@ process_control_chunks: linp = inp; } - if (linp) { + if (linp != NULL) { SCTP_ASOC_CREATE_LOCK(linp); if ((inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) || (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE)) { @@ -5232,7 +5170,7 @@ process_control_chunks: goto abend; } } - if (netp) { + if (netp != NULL) { struct sctp_tcb *locked_stcb; locked_stcb = stcb; @@ -5260,7 +5198,7 @@ process_control_chunks: } else { ret_buf = NULL; } - if (linp) { + if (linp != NULL) { SCTP_ASOC_CREATE_UNLOCK(linp); } if (ret_buf == NULL) { @@ -5290,7 +5228,7 @@ process_control_chunks: } break; case SCTP_COOKIE_ACK: - SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_COOKIE-ACK, stcb %p\n", (void *)stcb); + SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_COOKIE_ACK, stcb %p\n", (void *)stcb); if ((stcb == NULL) || chk_length != sizeof(struct sctp_cookie_ack_chunk)) { return (stcb); } @@ -5316,75 +5254,43 @@ process_control_chunks: return (NULL); } } - /* He's alive so give him credit */ - if ((stcb) && netp && *netp) { - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_THRESHOLD_LOGGING) { - sctp_misc_ints(SCTP_THRESHOLD_CLEAR, - stcb->asoc.overall_error_count, - 0, - SCTP_FROM_SCTP_INPUT, - __LINE__); - } - stcb->asoc.overall_error_count = 0; + if ((netp != NULL) && (*netp != NULL)) { sctp_handle_cookie_ack((struct sctp_cookie_ack_chunk *)ch, stcb, *netp); } break; case SCTP_ECN_ECHO: - SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_ECN-ECHO\n"); - /* He's alive so give him credit */ + SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_ECN_ECHO\n"); if ((stcb == NULL) || (chk_length != sizeof(struct sctp_ecne_chunk))) { /* Its not ours */ *offset = length; return (stcb); } - if (stcb) { - if (stcb->asoc.ecn_supported == 0) { - goto unknown_chunk; - } - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_THRESHOLD_LOGGING) { - sctp_misc_ints(SCTP_THRESHOLD_CLEAR, - stcb->asoc.overall_error_count, - 0, - SCTP_FROM_SCTP_INPUT, - __LINE__); - } - stcb->asoc.overall_error_count = 0; - sctp_handle_ecn_echo((struct sctp_ecne_chunk *)ch, - stcb); - ecne_seen = 1; + if (stcb->asoc.ecn_supported == 0) { + goto unknown_chunk; } + sctp_handle_ecn_echo((struct sctp_ecne_chunk *)ch, stcb); + ecne_seen = 1; break; case SCTP_ECN_CWR: - SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_ECN-CWR\n"); - /* He's alive so give him credit */ + SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_ECN_CWR\n"); if ((stcb == NULL) || (chk_length != sizeof(struct sctp_cwr_chunk))) { *offset = length; return (stcb); } - if (stcb) { - if (stcb->asoc.ecn_supported == 0) { - goto unknown_chunk; - } - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_THRESHOLD_LOGGING) { - sctp_misc_ints(SCTP_THRESHOLD_CLEAR, - stcb->asoc.overall_error_count, - 0, - SCTP_FROM_SCTP_INPUT, - __LINE__); - } - stcb->asoc.overall_error_count = 0; - sctp_handle_ecn_cwr((struct sctp_cwr_chunk *)ch, stcb, *netp); + if (stcb->asoc.ecn_supported == 0) { + goto unknown_chunk; } + sctp_handle_ecn_cwr((struct sctp_cwr_chunk *)ch, stcb, *netp); break; case SCTP_SHUTDOWN_COMPLETE: - SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_SHUTDOWN-COMPLETE, stcb %p\n", (void *)stcb); + SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_SHUTDOWN_COMPLETE, stcb %p\n", (void *)stcb); /* must be first and only chunk */ if ((num_chunks > 1) || (length - *offset > (int)SCTP_SIZE32(chk_length))) { *offset = length; return (stcb); } - if ((stcb) && netp && *netp) { + if ((stcb != NULL) && (netp != NULL) && (*netp != NULL)) { sctp_handle_shutdown_complete((struct sctp_shutdown_complete_chunk *)ch, stcb, *netp); } @@ -5393,32 +5299,23 @@ process_control_chunks: break; case SCTP_ASCONF: SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_ASCONF\n"); - /* He's alive so give him credit */ - if (stcb) { + if (stcb != NULL) { if (stcb->asoc.asconf_supported == 0) { goto unknown_chunk; } - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_THRESHOLD_LOGGING) { - sctp_misc_ints(SCTP_THRESHOLD_CLEAR, - stcb->asoc.overall_error_count, - 0, - SCTP_FROM_SCTP_INPUT, - __LINE__); - } - stcb->asoc.overall_error_count = 0; sctp_handle_asconf(m, *offset, src, (struct sctp_asconf_chunk *)ch, stcb, asconf_cnt == 0); asconf_cnt++; } break; case SCTP_ASCONF_ACK: - SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_ASCONF-ACK\n"); + SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_ASCONF_ACK\n"); if (chk_length < sizeof(struct sctp_asconf_ack_chunk)) { /* Its not ours */ *offset = length; return (stcb); } - if ((stcb) && netp && *netp) { + if ((stcb != NULL) && (netp != NULL) && (*netp != NULL)) { if (stcb->asoc.asconf_supported == 0) { goto unknown_chunk; } @@ -5439,27 +5336,18 @@ process_control_chunks: break; case SCTP_FORWARD_CUM_TSN: case SCTP_IFORWARD_CUM_TSN: - SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_FWD-TSN\n"); + SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_FWD_TSN\n"); if (chk_length < sizeof(struct sctp_forward_tsn_chunk)) { /* Its not ours */ *offset = length; return (stcb); } - /* He's alive so give him credit */ - if (stcb) { + if (stcb != NULL) { int abort_flag = 0; if (stcb->asoc.prsctp_supported == 0) { goto unknown_chunk; } - stcb->asoc.overall_error_count = 0; - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_THRESHOLD_LOGGING) { - sctp_misc_ints(SCTP_THRESHOLD_CLEAR, - stcb->asoc.overall_error_count, - 0, - SCTP_FROM_SCTP_INPUT, - __LINE__); - } *fwd_tsn_seen = 1; if (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) { /* We are not interested anymore */ @@ -5489,17 +5377,7 @@ process_control_chunks: if (abort_flag) { *offset = length; return (NULL); - } else { - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_THRESHOLD_LOGGING) { - sctp_misc_ints(SCTP_THRESHOLD_CLEAR, - stcb->asoc.overall_error_count, - 0, - SCTP_FROM_SCTP_INPUT, - __LINE__); - } - stcb->asoc.overall_error_count = 0; } - } break; case SCTP_STREAM_RESET: @@ -5526,7 +5404,7 @@ process_control_chunks: *offset = length; return (stcb); } - if (ch && (stcb) && netp && (*netp)) { + if ((ch != NULL) && (stcb != NULL) && (netp != NULL) && (*netp != NULL)) { if (stcb->asoc.pktdrop_supported == 0) { goto unknown_chunk; } @@ -5625,7 +5503,7 @@ next_chunk: } } /* while */ - if (asconf_cnt > 0 && stcb != NULL) { + if ((asconf_cnt > 0) && (stcb != NULL)) { sctp_send_asconf_ack(stcb); } return (stcb); @@ -5903,14 +5781,6 @@ sctp_common_input_processing(struct mbuf **mm, int iph * shows us the cookie-ack was lost. Imply it was * there. */ - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_THRESHOLD_LOGGING) { - sctp_misc_ints(SCTP_THRESHOLD_CLEAR, - stcb->asoc.overall_error_count, - 0, - SCTP_FROM_SCTP_INPUT, - __LINE__); - } - stcb->asoc.overall_error_count = 0; sctp_handle_cookie_ack((struct sctp_cookie_ack_chunk *)ch, stcb, net); break; case SCTP_STATE_COOKIE_WAIT: From owner-svn-src-head@freebsd.org Sun Nov 12 23:13:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CB12C7ED05; Sun, 12 Nov 2017 23:13:06 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA87E78B4B; Sun, 12 Nov 2017 23:13:05 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vACND5xA083987; Sun, 12 Nov 2017 23:13:05 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vACND5vD083986; Sun, 12 Nov 2017 23:13:05 GMT (envelope-from br@FreeBSD.org) Message-Id: <201711122313.vACND5vD083986@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Sun, 12 Nov 2017 23:13:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325747 - head/sys/x86/include X-SVN-Group: head X-SVN-Commit-Author: br X-SVN-Commit-Paths: head/sys/x86/include X-SVN-Commit-Revision: 325747 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2017 23:13:06 -0000 Author: br Date: Sun Nov 12 23:13:04 2017 New Revision: 325747 URL: https://svnweb.freebsd.org/changeset/base/325747 Log: Add Intel Processor Trace (PT) MSRs. Sponsored by: DARPA, AFRL Modified: head/sys/x86/include/specialreg.h Modified: head/sys/x86/include/specialreg.h ============================================================================== --- head/sys/x86/include/specialreg.h Sun Nov 12 21:43:33 2017 (r325746) +++ head/sys/x86/include/specialreg.h Sun Nov 12 23:13:04 2017 (r325747) @@ -547,6 +547,62 @@ #define MSR_IA32_XSS 0xda0 /* + * Intel Processor Trace (PT) MSRs. + */ +#define MSR_IA32_RTIT_OUTPUT_BASE 0x560 /* Trace Output Base Register (R/W) */ +#define MSR_IA32_RTIT_OUTPUT_MASK_PTRS 0x561 /* Trace Output Mask Pointers Register (R/W) */ +#define MSR_IA32_RTIT_CTL 0x570 /* Trace Control Register (R/W) */ +#define RTIT_CTL_TRACEEN (1 << 0) +#define RTIT_CTL_CYCEN (1 << 1) +#define RTIT_CTL_OS (1 << 2) +#define RTIT_CTL_USER (1 << 3) +#define RTIT_CTL_PWREVTEN (1 << 4) +#define RTIT_CTL_FUPONPTW (1 << 5) +#define RTIT_CTL_FABRICEN (1 << 6) +#define RTIT_CTL_CR3FILTER (1 << 7) +#define RTIT_CTL_TOPA (1 << 8) +#define RTIT_CTL_MTCEN (1 << 9) +#define RTIT_CTL_TSCEN (1 << 10) +#define RTIT_CTL_DISRETC (1 << 11) +#define RTIT_CTL_PTWEN (1 << 12) +#define RTIT_CTL_BRANCHEN (1 << 13) +#define RTIT_CTL_MTC_FREQ_S 14 +#define RTIT_CTL_MTC_FREQ(n) ((n) << RTIT_CTL_MTC_FREQ_S) +#define RTIT_CTL_MTC_FREQ_M (0xf << RTIT_CTL_MTC_FREQ_S) +#define RTIT_CTL_CYC_THRESH_S 19 +#define RTIT_CTL_CYC_THRESH_M (0xf << RTIT_CTL_CYC_THRESH_S) +#define RTIT_CTL_PSB_FREQ_S 24 +#define RTIT_CTL_PSB_FREQ_M (0xf << RTIT_CTL_PSB_FREQ_S) +#define RTIT_CTL_ADDR_CFG_S(n) (32 + (n) * 4) +#define RTIT_CTL_ADDR0_CFG_S 32 +#define RTIT_CTL_ADDR0_CFG_M (0xfULL << RTIT_CTL_ADDR0_CFG_S) +#define RTIT_CTL_ADDR1_CFG_S 36 +#define RTIT_CTL_ADDR1_CFG_M (0xfULL << RTIT_CTL_ADDR1_CFG_S) +#define RTIT_CTL_ADDR2_CFG_S 40 +#define RTIT_CTL_ADDR2_CFG_M (0xfULL << RTIT_CTL_ADDR2_CFG_S) +#define RTIT_CTL_ADDR3_CFG_S 44 +#define RTIT_CTL_ADDR3_CFG_M (0xfULL << RTIT_CTL_ADDR3_CFG_S) +#define MSR_IA32_RTIT_STATUS 0x571 /* Tracing Status Register (R/W) */ +#define RTIT_STATUS_FILTEREN (1 << 0) +#define RTIT_STATUS_CONTEXTEN (1 << 1) +#define RTIT_STATUS_TRIGGEREN (1 << 2) +#define RTIT_STATUS_ERROR (1 << 4) +#define RTIT_STATUS_STOPPED (1 << 5) +#define RTIT_STATUS_PACKETBYTECNT_S 32 +#define RTIT_STATUS_PACKETBYTECNT_M (0x1ffffULL << RTIT_STATUS_PACKETBYTECNT_S) +#define MSR_IA32_RTIT_CR3_MATCH 0x572 /* Trace Filter CR3 Match Register (R/W) */ +#define MSR_IA32_RTIT_ADDR_A(n) (0x580 + (n) * 2) +#define MSR_IA32_RTIT_ADDR_B(n) (0x581 + (n) * 2) +#define MSR_IA32_RTIT_ADDR0_A 0x580 /* Region 0 Start Address (R/W) */ +#define MSR_IA32_RTIT_ADDR0_B 0x581 /* Region 0 End Address (R/W) */ +#define MSR_IA32_RTIT_ADDR1_A 0x582 /* Region 1 Start Address (R/W) */ +#define MSR_IA32_RTIT_ADDR1_B 0x583 /* Region 1 End Address (R/W) */ +#define MSR_IA32_RTIT_ADDR2_A 0x584 /* Region 2 Start Address (R/W) */ +#define MSR_IA32_RTIT_ADDR2_B 0x585 /* Region 2 End Address (R/W) */ +#define MSR_IA32_RTIT_ADDR3_A 0x586 /* Region 3 Start Address (R/W) */ +#define MSR_IA32_RTIT_ADDR3_B 0x587 /* Region 3 End Address (R/W) */ + +/* * Constants related to MSR's. */ #define APICBASE_RESERVED 0x000002ff From owner-svn-src-head@freebsd.org Mon Nov 13 00:30:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D99AC7FF86; Mon, 13 Nov 2017 00:30:40 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE1197A421; Mon, 13 Nov 2017 00:30:39 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAD0UdKX013553; Mon, 13 Nov 2017 00:30:39 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAD0Udrn013552; Mon, 13 Nov 2017 00:30:39 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201711130030.vAD0Udrn013552@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 13 Nov 2017 00:30:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325748 - head/sys/boot/userboot/test X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/boot/userboot/test X-SVN-Commit-Revision: 325748 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2017 00:30:40 -0000 Author: imp Date: Mon Nov 13 00:30:38 2017 New Revision: 325748 URL: https://svnweb.freebsd.org/changeset/base/325748 Log: Use proper include file. While works, it only works because we have -Isys on the command line. We also have -Isys/boot/userboot on the command line, so bring it in directly with . No functional change, but it removes one hard to see dependency on the boot loader's location in sys/boot. Sponsored by: Netflix Modified: head/sys/boot/userboot/test/test.c Modified: head/sys/boot/userboot/test/test.c ============================================================================== --- head/sys/boot/userboot/test/test.c Sun Nov 12 23:13:04 2017 (r325747) +++ head/sys/boot/userboot/test/test.c Mon Nov 13 00:30:38 2017 (r325748) @@ -44,7 +44,7 @@ #include #include -#include +#include char *host_base = NULL; struct termios term, oldterm; From owner-svn-src-head@freebsd.org Mon Nov 13 00:32:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1C86CA11DF; Mon, 13 Nov 2017 00: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 B1E9E7A7D4; Mon, 13 Nov 2017 00: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 vAD0WiYT017301; Mon, 13 Nov 2017 00:32:44 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAD0WiZ0017300; Mon, 13 Nov 2017 00:32:44 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201711130032.vAD0WiZ0017300@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 13 Nov 2017 00:32:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325749 - head/share/man/man7 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/share/man/man7 X-SVN-Commit-Revision: 325749 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2017 00:32:46 -0000 Author: imp Date: Mon Nov 13 00:32:44 2017 New Revision: 325749 URL: https://svnweb.freebsd.org/changeset/base/325749 Log: Document MACHINE, MACHINE_ARCH, CPUTYPE, TARGET and TARGET_ARCH historical use and general philosphy. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D12981 Modified: head/share/man/man7/arch.7 Modified: head/share/man/man7/arch.7 ============================================================================== --- head/share/man/man7/arch.7 Mon Nov 13 00:30:38 2017 (r325748) +++ head/share/man/man7/arch.7 Mon Nov 13 00:32:44 2017 (r325749) @@ -340,6 +340,90 @@ Architecture-specific macros: .It riscv64sf Ta Dv __riscv, Dv __riscv_xlen == 64 .It sparc64 Ta Dv __sparc64__ .El +.Ss Important Xr make 1 variables +Most of the externally settable variables are defined in the +.Xr build 7 +man page. +These variables are not otherwise documented and are used extensively +in the build system. +.Bl -column -offset indent "Sy Variable" "Sy Meaning and usage" +.It Dv MACHINE Represent the hardware platform. +This is the same as the native platform's +.Xr uname 1 +.Fl m +output. +It defines both the userland / kernel interface, as well as the +bootloader / kernel interface. +It should only be used in these contexts. +Each CPU architecture may have multiple hardware platforms it supports +where +.Dv MACHINE +differs among them. +It is used to collect together all the files from +.Xr config 8 +to build the kernel. +It is often the same as +.Dv MACHINE_ARCH +just as one CPU architecture can be implemented by many different +hardware platforms, one hardware platform may support multiple CPU +architecture family members, though with different binaries. +For example, +.Dv MACHINE +of i386 supported the IBM-AT hardware platform while the +.Dv MACHINE +of pc98 supported the Japanese company NEC's PC-9801 and PC-9821 +hardware platforms. +Both of these hardware platforms supported only the +.Dv MACHINE_ARCH +of i386 where they shared a common ABI, except for certain kernel / +userland interfaces relating to underlying hardware platform +differences in bus architecture, device enumeration and boot interface. +.It Dv MACHINE_ARCH Represents the CPU processor architecture. +This is the same as the native platforms +.Xr uname 1 +.Fl p +output. +It defines the CPU instruction family supported. +It may also encode a variation in the byte ordering of multi-byte +integers (endian). +It may also encode a variation in the size of the integer or pointer. +It may also encode a ISA revision. +It may also encode hard versus soft floating point ABI and usage. +It may also encode a variant ABI when there other factors don't +uniquely define the ABI (eg, MIPS' n32 ABI). +It, along with +.Dv MACHINE, define the ABI used by the system. +For example, the MIPS CPU processor family supports 9 different +combinations encoding pointer size, endian and hard vs soft float (for +8 combinations) as well as N32 (which only ever had one variation of +all these). +Generally, the plain CPU name specifies the most common (or at least +first) variant of the CPU. +This is why mips and mips64 imply 'big endian' while 'arm' and 'armv7' +imply little endian. +If we ever were to support the so-called x32 ABI (using 32-bit +pointers on the amd64 architecture), it would most likely be encoded +as amd64-x32. +It is unfortunate that amd64 speifies the 64-bit evolution of the x86 +platform (it matches the 'first rule') as everybody else uses x86_64. +There is no standard name for the processor: each OS selects its own +conventions. +.It Dv CPUTYPE Sets the flavor of +.Dv MACHINE_ARCH +to build. +It is used to optimize the build for a specific CPU / core that the +binaries run on. +Generally, this doesn't change the ABI, though it can be a fine line +between optimization for specific cases. +.It Dv TARGET Used to set Dv MACHINE in the top level Makefile for cross building. +Unused outside of that scope. +It is not passed down to the rest of the build. +Makefiles outside of the top level shouldn't use it at all (though +some have their own private copy for hysterical raisons). +.It Dv TARGET_ARCH Used to set Dv MACHINE_ARCH by Fx's top level Makefile for cross building. +Like +.Dv TARGET , it is unused outside of that scope. +.El .Sh SEE ALSO .Xr src.conf 5 , .Xr build 7 From owner-svn-src-head@freebsd.org Mon Nov 13 01:35:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53C06CA29C6; Mon, 13 Nov 2017 01:35:48 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 31F117C2F0; Mon, 13 Nov 2017 01:35:47 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 9E3FB5A9F12; Mon, 13 Nov 2017 01:35:46 +0000 (UTC) Date: Mon, 13 Nov 2017 01:35:46 +0000 From: Brooks Davis To: Mariusz Zaborski Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r325741 - head/sbin/dhclient Message-ID: <20171113013546.GD76223@spindle.one-eyed-alien.net> References: <201711120854.vAC8sN5n015111@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PPYy/fEw/8QCHSq3" Content-Disposition: inline In-Reply-To: <201711120854.vAC8sN5n015111@repo.freebsd.org> User-Agent: Mutt/1.9.1 (2017-09-22) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2017 01:35:48 -0000 --PPYy/fEw/8QCHSq3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 12, 2017 at 08:54:23AM +0000, Mariusz Zaborski wrote: > Author: oshogbo > Date: Sun Nov 12 08:54:23 2017 > New Revision: 325741 > URL: https://svnweb.freebsd.org/changeset/base/325741 >=20 > Log: > dhclient(8) should not close stdio using daemon(3) function. > =20 > dhclient(8) is chrooted so opening /dev/null always will fail. > In capability world this is also annoying because we getting error that > open(2) is not permitted in Capsicum. dhclient(8) is closing stdio by > precaching fd to /dev/null before chroot. > This is done few lines below daemon(3) function so let's not try to do = that > in daemon(3) function. This makes me wonder if there would be some sense in a syscall that just creates a file descriptor morally equivalant to opening /dev/null. A slightly crazy option would be to extend dup2 to treat some invalid descriptor (-2?) as that. -- Brooks --PPYy/fEw/8QCHSq3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJaCPbxAAoJEKzQXbSebgfAIp8H/jXQmG8VKBVLgKo2bWIVPzwn o0t367yyRk/9jy5CvUiXDxvHs7ho4xm9cv+wn0gU/bgDH4uP0QXPNLv9c/GiW1di zMoTcap7jld75fy1QJYQpmPopvrmkjIzQFqPA5ldIAO1xQ/0JyOMqjgfzKCHbEWy IkFm+C2ItsjB5xzAhlrhTR+H5rHqmKk2ziYGCqS8FgHX8uUt0IotCDw6NsDB7w+B 6yW/wzya69UoKPA6dGQJqxKl+XPcE+g8Fmqmw4Q/JXWrMDlsq0OvihnWz1mSn2Qb km1Fuc9qUOUVbwLWWSUdAY0WzM0xOnmTjVpd0W0LjmNPqusEA7F7VYVSNk4BfTw= =urCK -----END PGP SIGNATURE----- --PPYy/fEw/8QCHSq3-- From owner-svn-src-head@freebsd.org Mon Nov 13 02:00:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2594BCFC0B4; Mon, 13 Nov 2017 02:00:18 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 03CA37CC0E; Mon, 13 Nov 2017 02:00:17 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id BCEC15A9F12; Mon, 13 Nov 2017 02:00:16 +0000 (UTC) Date: Mon, 13 Nov 2017 02:00:16 +0000 From: Brooks Davis To: Andriy Gapon Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, kdrakehp@zoho.com Subject: Re: svn commit: r324619 - in head/usr.bin/procstat: . tests Message-ID: <20171113020016.GF76223@spindle.one-eyed-alien.net> References: <201710141838.v9EIcaOQ047300@repo.freebsd.org> <81c30f82-268e-ce59-4326-5a2f14ca62e5@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Uu2n37VG4rOBDVuR" Content-Disposition: inline In-Reply-To: <81c30f82-268e-ce59-4326-5a2f14ca62e5@FreeBSD.org> User-Agent: Mutt/1.9.1 (2017-09-22) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2017 02:00:18 -0000 --Uu2n37VG4rOBDVuR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 12, 2017 at 12:15:35PM +0200, Andriy Gapon wrote: > On 14/10/2017 21:38, Brooks Davis wrote: > > Author: brooks > > Date: Sat Oct 14 18:38:36 2017 > > New Revision: 324619 > > URL: https://svnweb.freebsd.org/changeset/base/324619 > >=20 > > Log: > > Switch procstat from subcommand flags to verbs > > =20 > > - Use an enumerated value instead of separate flags for commands > > - Look for a verb if no command flag is set > > - Lookup the "xocontainer" value based on the command > > - Document the new command verbs in the man-page > > =20 > > Submitted by: kdrakehp@zoho.com > > Differential Revision: https://reviews.freebsd.org/D10916 >=20 > What's the new way of doing procstat -kk -a ? >=20 > procstat -kk -a now crashes because cmd is NULL when 'k' option is proces= sed. > procstat kstack and procstat kstack -v just produce the usage message wit= hout > telling any specific usage error. > procstat kstack -a says that 'a' is an illegal option. =46rom the reading the manpage it should be: procstat -a kstack -v The crash is a regression. Please file a bugreport. -- Brooks --Uu2n37VG4rOBDVuR Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJaCPyvAAoJEKzQXbSebgfAFOIIAIqKB/sv+NO7FPIXtuwPGxCT s+Hfh695iRigN4s9Puksvkws5q84o2hPFIoYZC8XkjhIhOvqqQTDtoi/Q3WCZZhb e6jvbQeeMuYnrCQp3707Le+3maJRTt1TAVvtrBImVZEGN1SI5vE7KJReBHLvyU7N Mc6YDTBi3/V2HJ8y5X5sBCdnkYZBw42f79WfsX2aoi1grcloymWcSfxptZwzqemq t4IpghVtrb2RlO912aU8wtq7EpfdaLEaP/NbPPuykcSBntBfyVdFeXQNbE7CN4nz K0HDtsnQWK6QJe7eyh8EP6pptSqzQ1Oe9TbLrQFiZbX/tau9y8L+xo+opSkQe2c= =Pi0j -----END PGP SIGNATURE----- --Uu2n37VG4rOBDVuR-- From owner-svn-src-head@freebsd.org Mon Nov 13 07:38:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98015D7C614; Mon, 13 Nov 2017 07:38:20 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lf0-f65.google.com (mail-lf0-f65.google.com [209.85.215.65]) (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 26CE3644EE; Mon, 13 Nov 2017 07:38:19 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lf0-f65.google.com with SMTP id a132so17194581lfa.7; Sun, 12 Nov 2017 23:38:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=rJLsQ/u9Iw/R2Byfi6hsqdrcQHifVu9/q6vLcoazFTI=; b=AXx2utHziUDbxPC29/CO6Rp++0wtcNOA87zUcbfDLygE0FvhusUj0YbnpE0z2+032F Y1lOwdMcpCZNA2/zRvlIcQpPrIxyyBo8Z5YMPEZJwrcsDt0rb+9JyqrZzrt+S4VcSI83 eq5xWAMUNLAtsE/bgX3fXu7cQ29riGanyoHfpREQbRsBO4bcWpAq3qsHBVNfN+M2RN+8 x07VSavrsqWfAwrchMWnHTe2a5tJxE+abbwEM19wZq5djCOl1wtCwPRFGLqKZGmT8O2j CotSMOfKUQnqnFpLtYsGrJYhsthnMSzmveUVZ7HaHoocOVjOoy1ymDuwYm9MwYVgyWdY fNMA== X-Gm-Message-State: AJaThX6ZlWq9W8y73ifZPC9ArtC5KJTwGJOy32ZxzQMtY2XfrVFFPwWB UyOtxXNUnXvohH48JM1ni9Q= X-Google-Smtp-Source: AGs4zMZhEneD5XExb+j0PcESHj1b7R/FYdSLdX6zvcroxVUKv+qSCCXDajaXMwlCu6yp1eJG+1rD9g== X-Received: by 10.46.25.216 with SMTP id 85mr1932560ljz.145.1510558692230; Sun, 12 Nov 2017 23:38:12 -0800 (PST) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id r26sm1388006lfd.15.2017.11.12.23.38.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Nov 2017 23:38:11 -0800 (PST) Subject: Re: svn commit: r324619 - in head/usr.bin/procstat: . tests To: Brooks Davis Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, kdrakehp@zoho.com References: <201710141838.v9EIcaOQ047300@repo.freebsd.org> <81c30f82-268e-ce59-4326-5a2f14ca62e5@FreeBSD.org> <20171113020016.GF76223@spindle.one-eyed-alien.net> From: Andriy Gapon Message-ID: <65f847b0-b730-ee35-ca74-2a77cecde9a3@FreeBSD.org> Date: Mon, 13 Nov 2017 09:38:09 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171113020016.GF76223@spindle.one-eyed-alien.net> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2017 07:38:20 -0000 On 13/11/2017 04:00, Brooks Davis wrote: > On Sun, Nov 12, 2017 at 12:15:35PM +0200, Andriy Gapon wrote: >> On 14/10/2017 21:38, Brooks Davis wrote: >>> Author: brooks >>> Date: Sat Oct 14 18:38:36 2017 >>> New Revision: 324619 >>> URL: https://svnweb.freebsd.org/changeset/base/324619 >>> >>> Log: >>> Switch procstat from subcommand flags to verbs >>> >>> - Use an enumerated value instead of separate flags for commands >>> - Look for a verb if no command flag is set >>> - Lookup the "xocontainer" value based on the command >>> - Document the new command verbs in the man-page >>> >>> Submitted by: kdrakehp@zoho.com >>> Differential Revision: https://reviews.freebsd.org/D10916 >> >> What's the new way of doing procstat -kk -a ? >> >> procstat -kk -a now crashes because cmd is NULL when 'k' option is processed. >> procstat kstack and procstat kstack -v just produce the usage message without >> telling any specific usage error. >> procstat kstack -a says that 'a' is an illegal option. > > From the reading the manpage it should be: procstat -a kstack -v This works, thank you. > The crash is a regression. Please file a bugreport. This one line patch seems to fix the crash and procstat -kk -a is usable again. Does it look okay to you? --- a/usr.bin/procstat/procstat.c +++ b/usr.bin/procstat/procstat.c @@ -296,7 +296,7 @@ main(int argc, char *argv[]) cmd = getcmd("tsignals"); break; case 'k': - if (cmd->cmd == procstat_kstack) { + if (cmd != NULL && cmd->cmd == procstat_kstack) { if ((procstat_opts & PS_OPT_VERBOSE) != 0) usage(); procstat_opts |= PS_OPT_VERBOSE; -- Andriy Gapon From owner-svn-src-head@freebsd.org Mon Nov 13 07:47:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E63D6D7CA6C; Mon, 13 Nov 2017 07:47:44 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B0C5364A02; Mon, 13 Nov 2017 07:47:44 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAD7lhH4098904; Mon, 13 Nov 2017 07:47:43 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAD7lhHn098903; Mon, 13 Nov 2017 07:47:43 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201711130747.vAD7lhHn098903@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 13 Nov 2017 07:47:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325755 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 325755 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2017 07:47:45 -0000 Author: delphij Date: Mon Nov 13 07:47:43 2017 New Revision: 325755 URL: https://svnweb.freebsd.org/changeset/base/325755 Log: Be more careful when doing calculation with request from userland. MFC after: 2 weeks Modified: head/sys/kern/kern_proc.c Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Mon Nov 13 03:41:50 2017 (r325754) +++ head/sys/kern/kern_proc.c Mon Nov 13 07:47:43 2017 (r325755) @@ -1956,7 +1956,7 @@ sysctl_kern_proc_args(SYSCTL_HANDLER_ARGS) if (error != 0 || req->newptr == NULL) return (error); - if (req->newlen + sizeof(struct pargs) > ps_arg_cache_limit) + if (req->newlen > ps_arg_cache_limit - sizeof(struct pargs)) return (ENOMEM); newpa = pargs_alloc(req->newlen); error = SYSCTL_IN(req, newpa->ar_args, req->newlen); From owner-svn-src-head@freebsd.org Mon Nov 13 10:43:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E288ED7FCB8; Mon, 13 Nov 2017 10:43:32 +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 ACDB5691B9; Mon, 13 Nov 2017 10:43:32 +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 vADAhV88074194; Mon, 13 Nov 2017 10:43:31 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vADAhV9B074193; Mon, 13 Nov 2017 10:43:31 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201711131043.vADAhV9B074193@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 13 Nov 2017 10:43:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325758 - head/sys/dev/hwpmc X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/dev/hwpmc X-SVN-Commit-Revision: 325758 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2017 10:43:33 -0000 Author: kib Date: Mon Nov 13 10:43:31 2017 New Revision: 325758 URL: https://svnweb.freebsd.org/changeset/base/325758 Log: Style bug. Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/sys/dev/hwpmc/hwpmc_logging.c Modified: head/sys/dev/hwpmc/hwpmc_logging.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_logging.c Mon Nov 13 09:10:17 2017 (r325757) +++ head/sys/dev/hwpmc/hwpmc_logging.c Mon Nov 13 10:43:31 2017 (r325758) @@ -735,7 +735,7 @@ pmclog_deconfigure_log(struct pmc_owner *po) /* drop a reference to the fd */ if (po->po_file != NULL) { error = fdrop(po->po_file, curthread); - po->po_file = NULL; + po->po_file = NULL; } else error = 0; po->po_error = 0; From owner-svn-src-head@freebsd.org Mon Nov 13 10:45:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67D35D7FD40; Mon, 13 Nov 2017 10:45:32 +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 32A2769329; Mon, 13 Nov 2017 10:45:32 +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 vADAjVjF074340; Mon, 13 Nov 2017 10:45:31 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vADAjV1u074339; Mon, 13 Nov 2017 10:45:31 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201711131045.vADAjV1u074339@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 13 Nov 2017 10:45:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325759 - head/sys/dev/hwpmc X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/dev/hwpmc X-SVN-Commit-Revision: 325759 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2017 10:45:32 -0000 Author: kib Date: Mon Nov 13 10:45:31 2017 New Revision: 325759 URL: https://svnweb.freebsd.org/changeset/base/325759 Log: Do not leak PMC_PO_OWNS_LOGFILE on error. Note that PMCLOG_RESERVE_WITH_ERROR() macro contains goto error; statement and executed after the flag is set. Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/dev/hwpmc/hwpmc_logging.c Modified: head/sys/dev/hwpmc/hwpmc_logging.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_logging.c Mon Nov 13 10:43:31 2017 (r325758) +++ head/sys/dev/hwpmc/hwpmc_logging.c Mon Nov 13 10:45:31 2017 (r325759) @@ -683,6 +683,7 @@ pmclog_configure_log(struct pmc_mdep *md, struct pmc_o (void) fdrop(po->po_file, curthread); po->po_file = NULL; /* clear file and error state */ po->po_error = 0; + po->po_flags &= ~PMC_PO_OWNS_LOGFILE; return (error); } From owner-svn-src-head@freebsd.org Mon Nov 13 16:53:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB28DDBF0E1; Mon, 13 Nov 2017 16:53:37 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8054374C8A; Mon, 13 Nov 2017 16:53:37 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vADGraOe031293; Mon, 13 Nov 2017 16:53:36 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vADGramm031292; Mon, 13 Nov 2017 16:53:36 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201711131653.vADGramm031292@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Mon, 13 Nov 2017 16:53:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325764 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: vangyzen X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 325764 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2017 16:53:37 -0000 Author: vangyzen Date: Mon Nov 13 16:53:36 2017 New Revision: 325764 URL: https://svnweb.freebsd.org/changeset/base/325764 Log: Add __BEGIN_DECLS and __END_DECLS to This allows C++ programs to call _umtx_op(). MFC after: 3 days Sponsored by: Dell EMC Modified: head/sys/sys/umtx.h Modified: head/sys/sys/umtx.h ============================================================================== --- head/sys/sys/umtx.h Mon Nov 13 12:36:36 2017 (r325763) +++ head/sys/sys/umtx.h Mon Nov 13 16:53:36 2017 (r325764) @@ -122,7 +122,11 @@ struct umtx_robust_lists_params { #ifndef _KERNEL +__BEGIN_DECLS + int _umtx_op(void *obj, int op, u_long val, void *uaddr, void *uaddr2); + +__END_DECLS #else From owner-svn-src-head@freebsd.org Mon Nov 13 17:04:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11BC8DBF738; Mon, 13 Nov 2017 17:04:46 +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 D2F3675563; Mon, 13 Nov 2017 17:04: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 vADH4iAX035815; Mon, 13 Nov 2017 17:04:44 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vADH4iZ9035812; Mon, 13 Nov 2017 17:04:44 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201711131704.vADH4iZ9035812@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 13 Nov 2017 17:04:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325765 - head/lib/libc/string X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/lib/libc/string X-SVN-Commit-Revision: 325765 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2017 17:04:46 -0000 Author: imp Date: Mon Nov 13 17:04:44 2017 New Revision: 325765 URL: https://svnweb.freebsd.org/changeset/base/325765 Log: Add notes about overlapping copies. Add notes to each of these that specifically state that results are undefined if the strings overlap. In the case of memcpy, we document the overlapping behavior on FreeBSD (pre-existing). For str*, it is left unspecified, however, since the default (and x86) implementations do not handle overlapping strings properly. PR: 223653 Sponsored by: Netflix Modified: head/lib/libc/string/memcpy.3 head/lib/libc/string/strcat.3 head/lib/libc/string/strcpy.3 Modified: head/lib/libc/string/memcpy.3 ============================================================================== --- head/lib/libc/string/memcpy.3 Mon Nov 13 16:53:36 2017 (r325764) +++ head/lib/libc/string/memcpy.3 Mon Nov 13 17:04:44 2017 (r325765) @@ -54,6 +54,11 @@ bytes from string .Fa src to string .Fa dst . +If +.Fa src +and +.Fa dst +overlap, the results are not defined. .Sh RETURN VALUES The .Fn memcpy Modified: head/lib/libc/string/strcat.3 ============================================================================== --- head/lib/libc/string/strcat.3 Mon Nov 13 16:53:36 2017 (r325764) +++ head/lib/libc/string/strcat.3 Mon Nov 13 17:04:44 2017 (r325765) @@ -62,6 +62,11 @@ then add a terminating The string .Fa s must have sufficient space to hold the result. +If +.Fa s +and +.Fa append +overlap, the results are undefined. .Pp The .Fn strncat @@ -72,6 +77,11 @@ characters from .Fa append , and then adds a terminating .Ql \e0 . +If +.Fa s +and +.Fa append +overlap, the results are undefined. .Sh RETURN VALUES The .Fn strcat Modified: head/lib/libc/string/strcpy.3 ============================================================================== --- head/lib/libc/string/strcpy.3 Mon Nov 13 16:53:36 2017 (r325764) +++ head/lib/libc/string/strcpy.3 Mon Nov 13 17:04:44 2017 (r325765) @@ -63,6 +63,11 @@ to (including the terminating .Ql \e0 character.) +If +.Fa src +and +.Fa dst +overlap, the results are undefined. .Pp The .Fn stpncpy @@ -89,6 +94,11 @@ Otherwise, is .Em not terminated. +If +.Fa src +and +.Fa dst +overlap, the results are undefined. .Sh RETURN VALUES The .Fn strcpy From owner-svn-src-head@freebsd.org Mon Nov 13 17:46:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11A29DC04B0; Mon, 13 Nov 2017 17:46:40 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF6D576A5C; Mon, 13 Nov 2017 17:46:39 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vADHkclT052599; Mon, 13 Nov 2017 17:46:38 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vADHkcdY052598; Mon, 13 Nov 2017 17:46:38 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201711131746.vADHkcdY052598@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Mon, 13 Nov 2017 17:46:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325766 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: vangyzen X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 325766 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2017 17:46:40 -0000 Author: vangyzen Date: Mon Nov 13 17:46:38 2017 New Revision: 325766 URL: https://svnweb.freebsd.org/changeset/base/325766 Log: Fix formatting of _umtx_op(2) Do not use macros in the -width of a .Bl, since mandoc does not support them. Fix issues reported by igor and mandoc -Tlint. Use a .Bl for list of clock IDs instead of a comma list. MFC after: 3 days Sponsored by: Dell EMC Modified: head/lib/libc/sys/_umtx_op.2 Modified: head/lib/libc/sys/_umtx_op.2 ============================================================================== --- head/lib/libc/sys/_umtx_op.2 Mon Nov 13 17:04:44 2017 (r325765) +++ head/lib/libc/sys/_umtx_op.2 Mon Nov 13 17:46:38 2017 (r325766) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 23, 2017 +.Dd November 13, 2017 .Dt _UMTX_OP 2 .Os .Sh NAME @@ -61,7 +61,7 @@ All objects require ABI-mandated alignment, but this i enforced consistently on all architectures. .Pp The following flags are defined for flag fields of all structures: -.Bl -tag -width "Dv USYNC_PROCESS_SHARED" +.Bl -tag -width indent .It Dv USYNC_PROCESS_SHARED Allow selection of the process-shared sleep queue for the thread sleep container, when the lock ownership cannot be granted immediately, @@ -77,7 +77,6 @@ See the .Sx SLEEP QUEUES subsection below for more details on sleep queues. .El -.Pp .Bl -hang -offset indent .It Sy Mutex .Bd -literal @@ -96,7 +95,7 @@ It contains either the thread identifier of the lock o locked state, or zero when the lock is unowned. The highest bit set indicates that there is contention on the lock. The constants are defined for special values: -.Bl -tag -width "Dv UMUTEX_RB_OWNERDEAD" +.Bl -tag -width indent .It Dv UMUTEX_UNOWNED Zero, the value stored in the unowned lock. .It Dv UMUTEX_CONTESTED @@ -113,7 +112,7 @@ The .Dv m_flags field may contain the following umutex-specific flags, in addition to the common flags: -.Bl -tag -width "Dv UMUTEX_NONCONSISTENT" +.Bl -tag -width indent .It Dv UMUTEX_PRIO_INHERIT Mutex implements .Em Priority Inheritance @@ -136,8 +135,9 @@ In the manual page, mutexes not having and .Dv UMUTEX_PRIO_PROTECT flags set, are called normal mutexes. -Each type of mutex, i.e. normal mutexes, priority-inherited mutexes, -and priority-protected mutexes, have a separate sleep queue associated +Each type of mutex +.Pq normal, priority-inherited, and priority-protected +has a separate sleep queue associated with the given key. .Pp For priority protected mutexes, the @@ -182,8 +182,8 @@ request. The .Dv c_flags field contains flags. -Only the common flags, i.e. -.Dv USYNC_PROCESS_SHARED , +Only the common flags +.Pq Dv USYNC_PROCESS_SHARED are defined for ucond. .Pp The @@ -193,23 +193,34 @@ member provides the clock identifier to use for timeou request has both the .Dv CVWAIT_CLOCKID flag and the timeout specified. -Valid clock identifiers are subset of the valid clock ids for the -.Xr clock_gettime 2 -syscall, namely, -.Dv CLOCK_REALTIME , -.Dv CLOCK_VIRTUAL , -.Dv CLOCK_PROF , -.Dv CLOCK_MONOTONIC , -.Dv CLOCK_UPTIME , -.Dv CLOCK_UPTIME_PRECISE , -.Dv CLOCK_UPTIME_FAST , -.Dv CLOCK_REALTIME_PRECISE , -.Dv CLOCK_REALTIME_FAST , -.Dv CLOCK_MONOTONIC_PRECISE , -.Dv CLOCK_MONOTONIC_FAST , -and +Valid clock identifiers are a subset of those for +.Xr clock_gettime 2 : +.Bl -bullet -compact +.It +.Dv CLOCK_MONOTONIC +.It +.Dv CLOCK_MONOTONIC_FAST +.It +.Dv CLOCK_MONOTONIC_PRECISE +.It +.Dv CLOCK_PROF +.It +.Dv CLOCK_REALTIME +.It +.Dv CLOCK_REALTIME_FAST +.It +.Dv CLOCK_REALTIME_PRECISE +.It .Dv CLOCK_SECOND -are allowed. +.It +.Dv CLOCK_UPTIME +.It +.Dv CLOCK_UPTIME_FAST +.It +.Dv CLOCK_UPTIME_PRECISE +.It +.Dv CLOCK_VIRTUAL +.El .It Sy Reader/writer lock .Bd -literal struct urwlock { @@ -228,7 +239,7 @@ granted. Names of the .Dv rw_state bits are following: -.Bl -tag -width "Dv URWLOCK_WRITE_WAITERS" +.Bl -tag -width indent .It Dv URWLOCK_WRITE_OWNER Write lock was granted. .It Dv URWLOCK_WRITE_WAITERS @@ -253,7 +264,7 @@ The following flags for the member of .Vt struct urwlock are defined, in addition to the common flags: -.Bl -tag -width "Dv URWLOCK_PREFER_READER" +.Bl -tag -width indent .It Dv URWLOCK_PREFER_READER If specified, immediately grant read lock requests when .Dv urwlock @@ -302,7 +313,7 @@ The .Dv USEM_COUNT() macro, applied to the .Dv _count -word, returns the current semaphore counter, i.e. the number of posts +word, returns the current semaphore counter, which is the number of posts issued on the semaphore. .Pp The following bits for the @@ -310,7 +321,7 @@ The following bits for the member of .Vt struct _usem2 are defined, in addition to the common flags: -.Bl -tag -width "Dv USEM_NAMED" +.Bl -tag -width indent .It Dv USEM_NAMED Flag is ignored by kernel. .El @@ -359,7 +370,7 @@ Interval counting is always performed by the monotonic The .Dv _flags argument allows the following flags to further define the timeout behaviour: -.Bl -tag -width "It Dv UMTX_ABSTIME" +.Bl -tag -width indent .It Dv UMTX_ABSTIME The .Dv _timeout @@ -374,7 +385,6 @@ start. .El .El .Ss SLEEP QUEUES -.Pp When a locking request cannot be immediately satisfied, the thread is typically put to .Em sleep , @@ -416,7 +426,7 @@ regardless of the kind of backing memory. .Pp Only the address of the start byte of the variable specified as key is important for determining corresponding sleep queue. -The size of the variable does not matter, so e.g. sleep on the same +The size of the variable does not matter, so, for example, sleep on the same address interpeted as .Vt uint32_t and @@ -505,11 +515,11 @@ error for lock attempts, without granting the lock. The following operations, requested by the .Fa op argument to the function, are implemented: -.Bl -tag -width "It Dv UMTX_OP_WAIT_UINT_PRIVATE" +.Bl -tag -width indent .It Dv UMTX_OP_WAIT Wait. The arguments for the request are: -.Bl -tag -width "It Fa obj" +.Bl -tag -width "obj" .It Fa obj Pointer to a variable of type .Vt long . @@ -558,7 +568,7 @@ Optionally, a timeout for the request may be specified Wake the threads possibly sleeping due to .Dv UMTX_OP_WAIT . The arguments for the request are: -.Bl -tag -width "It Fa obj" +.Bl -tag -width "obj" .It Fa obj Pointer to a variable, used as a key to find sleeping threads. .It Fa val @@ -572,7 +582,7 @@ to wake up all waiters. .It Dv UMTX_OP_MUTEX_TRYLOCK Try to lock umutex. The arguments to the request are: -.Bl -tag -width "It Fa obj" +.Bl -tag -width "obj" .It Fa obj Pointer to the umutex. .El @@ -585,7 +595,7 @@ instead of sleeping if the lock cannot be obtained imm .It Dv UMTX_OP_MUTEX_LOCK Lock umutex. The arguments to the request are: -.Bl -tag -width "It Fa obj" +.Bl -tag -width "obj" .It Fa obj Pointer to the umutex. .El @@ -624,7 +634,7 @@ from a signal handler. .It Dv UMTX_OP_MUTEX_UNLOCK Unlock umutex. The arguments to the request are: -.Bl -tag -width "It Fa obj" +.Bl -tag -width "obj" .It Fa obj Pointer to the umutex. .El @@ -661,7 +671,7 @@ priority protected protocol mutex. .It Dv UMTX_OP_SET_CEILING Set ceiling for the priority protected umutex. The arguments to the request are: -.Bl -tag -width "It Fa obj" +.Bl -tag -width "uaddr" .It Fa obj Pointer to the umutex. .It Fa val @@ -696,7 +706,7 @@ interface. .It Dv UMTX_OP_CV_WAIT Wait for a condition. The arguments to the request are: -.Bl -tag -width "It Fa uaddr2" +.Bl -tag -width "uaddr2" .It Fa obj Pointer to the .Vt struct ucond . @@ -743,7 +753,7 @@ After wakeup, the umutex is not relocked. .Pp The following flags are defined: -.Bl -tag -width "Dv CVWAIT_CLOCKID" +.Bl -tag -width "CVWAIT_CLOCKID" .It Dv CVWAIT_ABSTIME Timeout is absolute. .It Dv CVWAIT_CLOCKID @@ -782,7 +792,7 @@ error. .It Dv UMTX_OP_CV_SIGNAL Wake up one condition waiter. The arguments to the request are: -.Bl -tag -width "It Fa obj" +.Bl -tag -width "obj" .It Fa obj Pointer to .Vt struct ucond . @@ -800,7 +810,7 @@ is cleared. .It Dv UMTX_OP_CV_BROADCAST Wake up all condition waiters. The arguments to the request are: -.Bl -tag -width "It Fa obj" +.Bl -tag -width "obj" .It Fa obj Pointer to .Vt struct ucond . @@ -820,14 +830,14 @@ Same as but the type of the variable pointed to by .Fa obj is -.Vt u_int , -i.e. 32-bit integer. +.Vt u_int +.Pq a 32-bit integer . .It Dv UMTX_OP_RW_RDLOCK Read-lock a .Vt struct rwlock lock. The arguments to the request are: -.Bl -tag -width "It Fa obj" +.Bl -tag -width "obj" .It Fa obj Pointer to the lock (of type .Vt struct rwlock ) @@ -837,7 +847,7 @@ Additional flags to augment locking behaviour. The valid flags in the .Fa val argument are: -.Bl -tag -width "It Dv URWLOCK_PREFER_READER" +.Bl -tag -width indent .It Dv URWLOCK_PREFER_READER .El .El @@ -889,7 +899,7 @@ Write-lock a .Vt struct rwlock lock. The arguments to the request are: -.Bl -tag -width "It Fa obj" +.Bl -tag -width "obj" .It Fa obj Pointer to the lock (of type .Vt struct rwlock ) @@ -925,7 +935,7 @@ error. .It Dv UMTX_OP_RW_UNLOCK Unlock rwlock. The arguments to the request are: -.Bl -tag -width "It Fa obj" +.Bl -tag -width "obj" .It Fa obj Pointer to the lock (of type .Vt struct rwlock ) @@ -967,7 +977,7 @@ but unconditionally select the process-private sleep q .It Dv UMTX_OP_MUTEX_WAIT Wait for mutex availability. The arguments to the request are: -.Bl -tag -width "It Fa obj" +.Bl -tag -width "obj" .It Fa obj Address of the mutex. .El @@ -991,7 +1001,6 @@ priority inherited protocol mutexes. .Pp Optionally, a timeout for the request may be specified. .Pp -.Pp A request with a timeout specified is not restartable. An unblocked signal delivered during the wait always results in sleep interruption and @@ -1007,7 +1016,7 @@ member .It Dv UMTX_OP_NWAKE_PRIVATE Wake up a batch of sleeping threads. The arguments to the request are: -.Bl -tag -width "It Fa obj" +.Bl -tag -width "obj" .It Fa obj Pointer to the array of pointers. .It Fa val @@ -1024,7 +1033,7 @@ being the byte addressed by the array element. .It Dv UMTX_OP_MUTEX_WAKE Check if a normal umutex is unlocked and wake up a waiter. The arguments for the request are: -.Bl -tag -width "It Fa obj" +.Bl -tag -width "obj" .It Fa obj Pointer to the umutex. .El @@ -1058,7 +1067,7 @@ bit may then modify freed memory. .It Dv UMTX_OP_MUTEX_WAKE2 Check if a umutex is unlocked and wake up a waiter. The arguments for the request are: -.Bl -tag -width "It Fa obj" +.Bl -tag -width "obj" .It Fa obj Pointer to the umutex. .It Fa val @@ -1088,11 +1097,12 @@ word of the .It Dv UMTX_OP_SEM2_WAIT Wait until semaphore is available. The arguments to the request are: -.Bl -tag -width "It Fa obj" +.Bl -tag -width "obj" .It Fa obj Pointer to the semaphore (of type .Vt struct _usem2 ) . .El +.Pp Put the requesting thread onto a sleep queue if the semaphore counter is zero. If the thread is put to sleep, the @@ -1117,7 +1127,7 @@ error. .It Dv UMTX_OP_SEM2_WAKE Wake up waiters on semaphore lock. The arguments to the request are: -.Bl -tag -width "It Fa obj" +.Bl -tag -width "obj" .It Fa obj Pointer to the semaphore (of type .Vt struct _usem2 ) . @@ -1145,7 +1155,7 @@ The argument specifies the sub-request of the .Dv UMTX_OP_SHM request: -.Bl -tag -width "Dv UMTX_SHM_DESTROY" +.Bl -tag -width indent .It Dv UMTX_SHM_CREAT Creates the anonymous shared memory object, which can be looked up with the specified key @@ -1191,7 +1201,7 @@ creation or lookup. .It Dv UMTX_OP_ROBUST_LISTS Register the list heads for the current thread's robust mutex lists. The arguments to the request are: -.Bl -tag -width "It Fa obj" +.Bl -tag -width "uaddr" .It Fa val Size of the structure passed in the .Fa uaddr @@ -1261,8 +1271,8 @@ variable is set to indicate the error. .Sh ERRORS The .Fn _umtx_op -operations will return the following errors: -.Bl -tag -width "Bq Er ENOTRECOVERABLE" +operations can fail with the following errors: +.Bl -tag -width "[ETIMEDOUT]" .It Bq Er EFAULT One of the arguments point to invalid memory. .It Bq Er EINVAL From owner-svn-src-head@freebsd.org Mon Nov 13 18:16:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 176C3DC0D0C; Mon, 13 Nov 2017 18:16:28 +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 E5AB6777C0; Mon, 13 Nov 2017 18:16:27 +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 vADIGRGt065288; Mon, 13 Nov 2017 18:16:27 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vADIGRUD065287; Mon, 13 Nov 2017 18:16:27 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201711131816.vADIGRUD065287@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 13 Nov 2017 18:16:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325767 - head/sys/compat/linuxkpi/common/src X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/src X-SVN-Commit-Revision: 325767 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2017 18:16:28 -0000 Author: hselasky Date: Mon Nov 13 18:16:26 2017 New Revision: 325767 URL: https://svnweb.freebsd.org/changeset/base/325767 Log: Properly handle the case where the linux_cdev_handle_insert() function in the LinuxKPI returns NULL. This happens when the VM area's private data handle already exists and could cause a so-called NULL pointer dereferencing issue prior to this fix. Found by: greg@unrelenting.technology MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Mon Nov 13 17:46:38 2017 (r325766) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Mon Nov 13 18:16:26 2017 (r325767) @@ -607,24 +607,6 @@ linux_cdev_handle_free(struct vm_area_struct *vmap) kfree(vmap); } -static struct vm_area_struct * -linux_cdev_handle_insert(void *handle, struct vm_area_struct *vmap) -{ - struct vm_area_struct *ptr; - - rw_wlock(&linux_vma_lock); - TAILQ_FOREACH(ptr, &linux_vma_head, vm_entry) { - if (ptr->vm_private_data == handle) { - rw_wunlock(&linux_vma_lock); - linux_cdev_handle_free(vmap); - return (NULL); - } - } - TAILQ_INSERT_TAIL(&linux_vma_head, vmap, vm_entry); - rw_wunlock(&linux_vma_lock); - return (vmap); -} - static void linux_cdev_handle_remove(struct vm_area_struct *vmap) { @@ -1318,20 +1300,55 @@ linux_dev_mmap_single(struct cdev *dev, vm_ooffset_t * attr = pgprot2cachemode(vmap->vm_page_prot); if (vmap->vm_ops != NULL) { + struct vm_area_struct *ptr; void *vm_private_data; + bool vm_no_fault; if (vmap->vm_ops->open == NULL || vmap->vm_ops->close == NULL || vmap->vm_private_data == NULL) { + /* free allocated VM area struct */ linux_cdev_handle_free(vmap); return (EINVAL); } vm_private_data = vmap->vm_private_data; - vmap = linux_cdev_handle_insert(vm_private_data, vmap); + rw_wlock(&linux_vma_lock); + TAILQ_FOREACH(ptr, &linux_vma_head, vm_entry) { + if (ptr->vm_private_data == vm_private_data) + break; + } + /* check if there is an existing VM area struct */ + if (ptr != NULL) { + /* check if the VM area structure is invalid */ + if (ptr->vm_ops == NULL || + ptr->vm_ops->open == NULL || + ptr->vm_ops->close == NULL) { + error = ESTALE; + vm_no_fault = 1; + } else { + error = EEXIST; + vm_no_fault = (ptr->vm_ops->fault == NULL); + } + } else { + /* insert VM area structure into list */ + TAILQ_INSERT_TAIL(&linux_vma_head, vmap, vm_entry); + error = 0; + vm_no_fault = (vmap->vm_ops->fault == NULL); + } + rw_wunlock(&linux_vma_lock); - if (vmap->vm_ops->fault == NULL) { + if (error != 0) { + /* free allocated VM area struct */ + linux_cdev_handle_free(vmap); + /* check for stale VM area struct */ + if (error != EEXIST) + return (error); + } + + /* check if there is no fault handler */ + if (vm_no_fault) { *object = cdev_pager_allocate(vm_private_data, OBJT_DEVICE, &linux_cdev_pager_ops[1], size, nprot, *offset, curthread->td_ucred); @@ -1341,9 +1358,14 @@ linux_dev_mmap_single(struct cdev *dev, vm_ooffset_t * curthread->td_ucred); } + /* check if allocating the VM object failed */ if (*object == NULL) { - linux_cdev_handle_remove(vmap); - linux_cdev_handle_free(vmap); + if (error == 0) { + /* remove VM area struct from list */ + linux_cdev_handle_remove(vmap); + /* free allocated VM area struct */ + linux_cdev_handle_free(vmap); + } return (EINVAL); } } else { From owner-svn-src-head@freebsd.org Mon Nov 13 18:53:42 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D79BDC1663; Mon, 13 Nov 2017 18:53:42 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 24E42789B9; Mon, 13 Nov 2017 18:53:42 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vADIrffl081870; Mon, 13 Nov 2017 18:53:41 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vADIrfvm081869; Mon, 13 Nov 2017 18:53:41 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201711131853.vADIrfvm081869@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Mon, 13 Nov 2017 18:53:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325768 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/broadcom/bcm2835 X-SVN-Commit-Revision: 325768 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2017 18:53:42 -0000 Author: manu Date: Mon Nov 13 18:53:41 2017 New Revision: 325768 URL: https://svnweb.freebsd.org/changeset/base/325768 Log: arm: rpi2: Fix cpufreq(4) Since r324184 the root node compatible for rpi2 is "brcm,bcm2836", add it to the compatible list of bcm2835_cpufreq. Tested On: RPI2 v1.1 RPI2 v1.2 Reported by: many on freebsd-arm@ Modified: head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Mon Nov 13 18:16:26 2017 (r325767) +++ head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Mon Nov 13 18:53:41 2017 (r325768) @@ -126,6 +126,7 @@ static struct ofw_compat_data compat_data[] = { { "broadcom,bcm2835-vc", 1 }, { "broadcom,bcm2708-vc", 1 }, { "brcm,bcm2709", 1 }, + { "brcm,bcm2836", 1 }, { NULL, 0 } }; From owner-svn-src-head@freebsd.org Mon Nov 13 19:31:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B31D0DC9226; Mon, 13 Nov 2017 19:31:52 +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 809E179D69; Mon, 13 Nov 2017 19:31:52 +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 vADJVpZX097575; Mon, 13 Nov 2017 19:31:51 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vADJVpsw097572; Mon, 13 Nov 2017 19:31:51 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201711131931.vADJVpsw097572@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 13 Nov 2017 19:31:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325769 - in head/release: . arm X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in head/release: . arm X-SVN-Commit-Revision: 325769 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2017 19:31:52 -0000 Author: gjb Date: Mon Nov 13 19:31:51 2017 New Revision: 325769 URL: https://svnweb.freebsd.org/changeset/base/325769 Log: Update the GUMSTIX image build to use arm/arm TARGET/TARGET_ARCH. Update the TARGET/TARGET_ARCH matching in release/release.sh and release/Makefile.mirrors for simplification. Discussed with: mmel MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile.mirrors head/release/arm/GUMSTIX.conf head/release/release.sh Modified: head/release/Makefile.mirrors ============================================================================== --- head/release/Makefile.mirrors Mon Nov 13 18:53:41 2017 (r325768) +++ head/release/Makefile.mirrors Mon Nov 13 19:31:51 2017 (r325769) @@ -57,7 +57,7 @@ TLD?= ${FTPDIR}/releases .endif .if defined(EMBEDDED) && !empty(EMBEDDED) -. if ${TARGET:Marm*} != "" && (${TARGET_ARCH:Marmv[67]} != "" || ${TARGET_ARCH} == "aarch64") +. if ${TARGET:Marm*} != "" && (${TARGET_ARCH:Marm*} != "" || ${TARGET_ARCH} == "aarch64") . if !defined(BOARDNAME) && empty(BOARDNAME) BOARDNAME:= ${KERNCONF} . else Modified: head/release/arm/GUMSTIX.conf ============================================================================== --- head/release/arm/GUMSTIX.conf Mon Nov 13 18:53:41 2017 (r325768) +++ head/release/arm/GUMSTIX.conf Mon Nov 13 19:31:51 2017 (r325769) @@ -5,7 +5,7 @@ EMBEDDEDBUILD=1 EMBEDDED_TARGET="arm" -EMBEDDED_TARGET_ARCH="armv6" +EMBEDDED_TARGET_ARCH="arm" EMBEDDEDPORTS="sysutils/u-boot-duovero" KERNEL="GUMSTIX" IMAGE_SIZE="3072M" Modified: head/release/release.sh ============================================================================== --- head/release/release.sh Mon Nov 13 18:53:41 2017 (r325768) +++ head/release/release.sh Mon Nov 13 19:31:51 2017 (r325769) @@ -148,7 +148,7 @@ env_check() { WITH_COMPRESSED_IMAGES= NODOC=yes case ${EMBEDDED_TARGET}:${EMBEDDED_TARGET_ARCH} in - arm:armv6|arm:armv7|arm64:aarch64) + arm:arm*|arm64:aarch64) chroot_build_release_cmd="chroot_arm_build_release" ;; *) From owner-svn-src-head@freebsd.org Mon Nov 13 19:44:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3E88DC9B1B; Mon, 13 Nov 2017 19:44:34 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A0DB77B2CA; Mon, 13 Nov 2017 19:44:34 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vADJiXSa005808; Mon, 13 Nov 2017 19:44:33 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vADJiXUG005807; Mon, 13 Nov 2017 19:44:33 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <201711131944.vADJiXUG005807@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Mon, 13 Nov 2017 19:44:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325770 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 325770 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2017 19:44:34 -0000 Author: arichardson Date: Mon Nov 13 19:44:33 2017 New Revision: 325770 URL: https://svnweb.freebsd.org/changeset/base/325770 Log: Remove -fuse-ld= when creating _LDFLAGS from LDFLAGS The -fuse-ld flag is only meant to be passed to the compiler driver so direct linker invocations should not include it. Reviewed by: emaste, jhb Approved by: jhb (mentor) Differential Revision: https://reviews.freebsd.org/D12910 Modified: head/share/mk/sys.mk Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Mon Nov 13 19:31:51 2017 (r325769) +++ head/share/mk/sys.mk Mon Nov 13 19:44:33 2017 (r325770) @@ -243,7 +243,7 @@ LFLAGS ?= # compiler driver flags (e.g. -mabi=*) that conflict with flags to LD. LD ?= ld LDFLAGS ?= -_LDFLAGS = ${LDFLAGS:S/-Wl,//g:N-mabi=*} +_LDFLAGS = ${LDFLAGS:S/-Wl,//g:N-mabi=*:N-fuse-ld=*} LINT ?= lint LINTFLAGS ?= -cghapbx From owner-svn-src-head@freebsd.org Mon Nov 13 19:58:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B20DEDD40A1; Mon, 13 Nov 2017 19:58: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 8BA947BAA0; Mon, 13 Nov 2017 19:58: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 vADJwwIk010197; Mon, 13 Nov 2017 19:58:58 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vADJwwgV010196; Mon, 13 Nov 2017 19:58:58 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201711131958.vADJwwgV010196@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 13 Nov 2017 19:58:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325771 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 325771 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2017 19:58:59 -0000 Author: jhb Date: Mon Nov 13 19:58:58 2017 New Revision: 325771 URL: https://svnweb.freebsd.org/changeset/base/325771 Log: Only clear a pending thread event if one is pending. This fixes a panic when attaching to an already-stopped process after r325028. While here, clean up a few other things in the control flow of the 'sendsig' section: - Only check for P_STOPPED_TRACE rather than either of P_STOPPED_SIG or P_STOPPED_TRACE for most ptrace requests. The signal handling code in kern_sig.c never sets just P_STOPPED_SIG for a traced process, so if P_STOPPED_SIG is stopped, P_STOPPED_TRACE should be set anyway. Remove a related debug printf. Assuming P_STOPPED_TRACE permits simplifications in the 'sendsig:' block. - Move the block to clear the pending thread state up into a new block conditional on P_STOPPED_TRACE and handle delivering pending signals to the reporting thread and clearing the reporting thread's state in this block. - Consolidate case to send a signal to the process in a single case for PT_ATTACH. The only case that could have been in the else before was a PT_ATTACH where P_STOPPED_SIG was not set, so both instances of kern_psignal() collapse down to just PT_ATTACH. Reported by: pho, mmel Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D12837 Modified: head/sys/kern/sys_process.c Modified: head/sys/kern/sys_process.c ============================================================================== --- head/sys/kern/sys_process.c Mon Nov 13 19:44:33 2017 (r325770) +++ head/sys/kern/sys_process.c Mon Nov 13 19:58:58 2017 (r325771) @@ -869,19 +869,13 @@ kern_ptrace(struct thread *td, int req, pid_t pid, voi } /* not currently stopped */ - if ((p->p_flag & (P_STOPPED_SIG | P_STOPPED_TRACE)) == 0 || + if ((p->p_flag & P_STOPPED_TRACE) == 0 || p->p_suspcount != p->p_numthreads || (p->p_flag & P_WAITED) == 0) { error = EBUSY; goto fail; } - if ((p->p_flag & P_STOPPED_TRACE) == 0) { - static int count = 0; - if (count++ == 0) - printf("P_STOPPED_TRACE not set.\n"); - } - /* OK */ break; } @@ -1130,24 +1124,32 @@ kern_ptrace(struct thread *td, int req, pid_t pid, voi } sendsig: - /* + /* proctree_locked is true for all but PT_KILL. */ + if (proctree_locked) { + sx_xunlock(&proctree_lock); + proctree_locked = 0; + } + + /* * Clear the pending event for the thread that just * reported its event (p_xthread). This may not be * the thread passed to PT_CONTINUE, PT_STEP, etc. if * the debugger is resuming a different thread. + * + * Deliver any pending signal via the reporting thread. */ - td2 = p->p_xthread; - if (proctree_locked) { - sx_xunlock(&proctree_lock); - proctree_locked = 0; + if ((p->p_flag & P_STOPPED_TRACE) != 0) { + MPASS(p->p_xthread != NULL); + p->p_xthread->td_dbgflags &= ~TDB_XSIG; + p->p_xthread->td_xsig = data; + p->p_xthread = NULL; + p->p_xsig = data; + } else { + MPASS(p->p_xthread == NULL); + MPASS(req == PT_ATTACH); } - p->p_xsig = data; - p->p_xthread = NULL; - if ((p->p_flag & (P_STOPPED_SIG | P_STOPPED_TRACE)) != 0) { - /* deliver or queue signal */ - td2->td_dbgflags &= ~TDB_XSIG; - td2->td_xsig = data; + if ((p->p_flag & (P_STOPPED_SIG | P_STOPPED_TRACE)) != 0) { /* * P_WKILLED is insurance that a PT_KILL/SIGKILL always * works immediately, even if another thread is @@ -1162,21 +1164,28 @@ kern_ptrace(struct thread *td, int req, pid_t pid, voi FOREACH_THREAD_IN_PROC(p, td3) td3->td_dbgflags &= ~TDB_SUSPEND; } + /* - * unsuspend all threads, to not let a thread run, - * you should use PT_SUSPEND to suspend it before - * continuing process. + * Unsuspend all threads. To leave a thread + * suspended, use PT_SUSPEND to suspend it + * before continuing the process. */ PROC_SLOCK(p); p->p_flag &= ~(P_STOPPED_TRACE|P_STOPPED_SIG|P_WAITED); thread_unsuspend(p); PROC_SUNLOCK(p); - if (req == PT_ATTACH) - kern_psignal(p, data); - } else { - if (data) - kern_psignal(p, data); } + + /* + * For requests other than PT_ATTACH, P_STOPPED_TRACE + * was set, so any pending signal in 'data' is + * delivered via the reporting thread (p_xthread). + * For PT_ATTACH the process is not yet stopped for + * tracing, so P_STOPPED_TRACE cannot be set and the + * SIGSTOP must be delivered to the process. + */ + if (req == PT_ATTACH) + kern_psignal(p, data); break; case PT_WRITE_I: From owner-svn-src-head@freebsd.org Mon Nov 13 20:07:09 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A47BBDD43C8; Mon, 13 Nov 2017 20:07:09 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7121E7BFB6; Mon, 13 Nov 2017 20:07:09 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vADK786d014677; Mon, 13 Nov 2017 20:07:08 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vADK78Fw014676; Mon, 13 Nov 2017 20:07:08 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <201711132007.vADK78Fw014676@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Mon, 13 Nov 2017 20:07:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325772 - head X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 325772 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2017 20:07:09 -0000 Author: arichardson Date: Mon Nov 13 20:07:08 2017 New Revision: 325772 URL: https://svnweb.freebsd.org/changeset/base/325772 Log: Only build the libmagic build-tools if MK_FILE != no Before this patch libmagic was always built in the build-tools phase even if -DWITHOUT_FILE was specified. Reviewed by: emaste, jhb Approved by: jhb (mentor) Differential Revision: https://reviews.freebsd.org/D12925 Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Mon Nov 13 19:58:58 2017 (r325771) +++ head/Makefile.inc1 Mon Nov 13 20:07:08 2017 (r325772) @@ -1986,6 +1986,9 @@ _rescue=rescue/rescue .if ${MK_TCSH} != "no" _tcsh=bin/csh .endif +.if ${MK_FILE} != "no" +_libmagic=lib/libmagic +.endif # kernel-toolchain skips _cleanobj, so handle cleaning up previous # build-tools directories if needed. @@ -2002,7 +2005,7 @@ _bt_clean= ${CLEANDIR} ${_rescue} \ ${_share} \ usr.bin/awk \ - lib/libmagic \ + ${_libmagic} \ usr.bin/mkesdb_static \ usr.bin/mkcsmapper_static \ usr.bin/vi/catalog \ From owner-svn-src-head@freebsd.org Mon Nov 13 20:39:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D13CBDD50EB; Mon, 13 Nov 2017 20:39:44 +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 84FAA7D178; Mon, 13 Nov 2017 20:39:44 +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 vADKdhVO027510; Mon, 13 Nov 2017 20:39:43 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vADKdh6c027508; Mon, 13 Nov 2017 20:39:43 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201711132039.vADKdh6c027508@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 13 Nov 2017 20:39:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325775 - in head/sys/boot: arm/loader arm/uboot forth X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys/boot: arm/loader arm/uboot forth X-SVN-Commit-Revision: 325775 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2017 20:39:44 -0000 Author: imp Date: Mon Nov 13 20:39:43 2017 New Revision: 325775 URL: https://svnweb.freebsd.org/changeset/base/325775 Log: Add loader.conf to the list of files that are MD. loader.conf is also different between machines. On arm it's a minimal one that's not quite compatible with the default one. On arm it's minimal for speed, which is good, but there's also extra things in it relative to the default on which break loading FDT which is bad. This doesn't address that issue, but instead ensures the minimal one for arm is used. A similar issue for mips exists, but since we can have a beri variant of /boot/loader and a uboot variant, I'm leaving that mess alone for the moment. Sponsored by: Netflix Added: head/sys/boot/arm/loader/ head/sys/boot/arm/loader/loader.conf (contents, props changed) - copied, changed from r325765, head/sys/boot/arm/uboot/loader.conf Deleted: head/sys/boot/arm/uboot/loader.conf Modified: head/sys/boot/forth/Makefile Copied and modified: head/sys/boot/arm/loader/loader.conf (from r325765, head/sys/boot/arm/uboot/loader.conf) ============================================================================== Modified: head/sys/boot/forth/Makefile ============================================================================== --- head/sys/boot/forth/Makefile Mon Nov 13 20:16:33 2017 (r325774) +++ head/sys/boot/forth/Makefile Mon Nov 13 20:39:43 2017 (r325775) @@ -22,7 +22,6 @@ FILES+= delay.4th FILES+= efi.4th FILES+= frames.4th FILES+= loader.4th -FILES+= loader.conf FILES+= logo-beastie.4th FILES+= logo-beastiebw.4th FILES+= logo-fbsdbw.4th @@ -39,7 +38,7 @@ FILES+= version.4th FILESDIR_loader.conf= /boot/defaults # Allow machine specific loader.rc to be installed. -.for f in loader.rc menu.rc +.for f in loader.rc menu.rc loader.conf .if exists(${BOOTSRC}/${MACHINE:C/amd64/i386/}/loader/${f}) FILES+= ${BOOTSRC}/${MACHINE:C/amd64/i386/}/loader/${f} .else From owner-svn-src-head@freebsd.org Mon Nov 13 20:49:09 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6523DD54EA; Mon, 13 Nov 2017 20:49:09 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89E107D81C; Mon, 13 Nov 2017 20:49:09 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vADKn8F6032067; Mon, 13 Nov 2017 20:49:08 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vADKn8UI032065; Mon, 13 Nov 2017 20:49:08 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201711132049.vADKn8UI032065@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 13 Nov 2017 20:49:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325776 - in head: . sys/conf X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: in head: . sys/conf X-SVN-Commit-Revision: 325776 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2017 20:49:09 -0000 Author: bdrewery Date: Mon Nov 13 20:49:08 2017 New Revision: 325776 URL: https://svnweb.freebsd.org/changeset/base/325776 Log: Rework r325568 so all 'make LINT' targets work. Reported by: ngie Sponsored by: Dell EMC Isilon Modified: head/Makefile head/sys/conf/makeLINT.mk Modified: head/Makefile ============================================================================== --- head/Makefile Mon Nov 13 20:39:43 2017 (r325775) +++ head/Makefile Mon Nov 13 20:49:08 2017 (r325776) @@ -598,7 +598,7 @@ universe_${target}_kernels: universe_${target}_worlds universe_${target}_kernels: universe_${target}_prologue .MAKE .PHONY .if exists(${KERNSRCDIR}/${target}/conf/NOTES) @(cd ${KERNSRCDIR}/${target}/conf && env __MAKE_CONF=/dev/null \ - ${SUB_MAKE} -DNO_OBJ LINT \ + ${SUB_MAKE} LINT \ > ${.CURDIR}/_.${target}.makeLINT 2>&1 || \ (echo "${target} 'make LINT' failed," \ "check _.${target}.makeLINT for details"| ${MAKEFAIL})) Modified: head/sys/conf/makeLINT.mk ============================================================================== --- head/sys/conf/makeLINT.mk Mon Nov 13 20:39:43 2017 (r325775) +++ head/sys/conf/makeLINT.mk Mon Nov 13 20:49:08 2017 (r325776) @@ -1,5 +1,8 @@ # $FreeBSD$ +# The LINT files need to end up in the kernel source directory. +.OBJDIR: ${.CURDIR} + all: @echo "make LINT only" @@ -9,9 +12,10 @@ clean: rm -f LINT-NOINET LINT-NOINET6 LINT-NOIP .endif -NOTES= ../../conf/NOTES NOTES -LINT: ${NOTES} ../../conf/makeLINT.sed - cat ${NOTES} | sed -E -n -f ../../conf/makeLINT.sed > ${.TARGET} +NOTES= ${.CURDIR}/../../conf/NOTES ${.CURDIR}/NOTES +MAKELINT_SED= ${.CURDIR}/../../conf/makeLINT.sed +LINT: ${NOTES} ${MAKELINT_SED} + cat ${NOTES} | sed -E -n -f ${MAKELINT_SED} > ${.TARGET} .if ${TARGET} == "amd64" || ${TARGET} == "i386" echo "include ${.TARGET}" > ${.TARGET}-NOINET echo "ident ${.TARGET}-NOINET" >> ${.TARGET}-NOINET From owner-svn-src-head@freebsd.org Mon Nov 13 21:09:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14B6ADD5DEC; Mon, 13 Nov 2017 21:09:10 +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 E33A57E4C8; Mon, 13 Nov 2017 21:09:09 +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 vADL99ps040432; Mon, 13 Nov 2017 21:09:09 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vADL99GU040431; Mon, 13 Nov 2017 21:09:09 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201711132109.vADL99GU040431@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 13 Nov 2017 21:09:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325777 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 325777 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2017 21:09:10 -0000 Author: jhb Date: Mon Nov 13 21:09:08 2017 New Revision: 325777 URL: https://svnweb.freebsd.org/changeset/base/325777 Log: Pull the PT_ATTACH case out of the 'sendsig:' block. Most of the conditionals in the 'sendsig:' block are now only different for PT_ATTACH vs other continue requests. Pull the PT_ATTACH-specific logic up into the PT_ATTACH case and simplify the 'sendsig:' block. This also permits moving the unlock of proctree_lock above the sendsig: label since PT_KILL doesn't hold the lock and and the other cases all fall through to the label. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D13073 Modified: head/sys/kern/sys_process.c Modified: head/sys/kern/sys_process.c ============================================================================== --- head/sys/kern/sys_process.c Mon Nov 13 20:49:08 2017 (r325776) +++ head/sys/kern/sys_process.c Mon Nov 13 21:09:08 2017 (r325777) @@ -920,11 +920,28 @@ kern_ptrace(struct thread *td, int req, pid_t pid, voi if (p->p_pptr != td->td_proc) { proc_reparent(p, td->td_proc); } - data = SIGSTOP; CTR2(KTR_PTRACE, "PT_ATTACH: pid %d, oppid %d", p->p_pid, p->p_oppid); - goto sendsig; /* in PT_CONTINUE below */ + sx_xunlock(&proctree_lock); + proctree_locked = 0; + MPASS(p->p_xthread == NULL); + MPASS((p->p_flag & P_STOPPED_TRACE) == 0); + + /* + * If already stopped due to a stop signal, clear the + * existing stop before triggering a traced SIGSTOP. + */ + if ((p->p_flag & P_STOPPED_SIG) != 0) { + PROC_SLOCK(p); + p->p_flag &= ~(P_STOPPED_SIG | P_WAITED); + thread_unsuspend(p); + PROC_SUNLOCK(p); + } + + kern_psignal(p, SIGSTOP); + break; + case PT_CLEARSTEP: CTR2(KTR_PTRACE, "PT_CLEARSTEP: tid %d (pid %d)", td2->td_tid, p->p_pid); @@ -1123,12 +1140,11 @@ kern_ptrace(struct thread *td, int req, pid_t pid, voi break; } + sx_xunlock(&proctree_lock); + proctree_locked = 0; + sendsig: - /* proctree_locked is true for all but PT_KILL. */ - if (proctree_locked) { - sx_xunlock(&proctree_lock); - proctree_locked = 0; - } + MPASS(proctree_locked == 0); /* * Clear the pending event for the thread that just @@ -1138,54 +1154,36 @@ kern_ptrace(struct thread *td, int req, pid_t pid, voi * * Deliver any pending signal via the reporting thread. */ - if ((p->p_flag & P_STOPPED_TRACE) != 0) { - MPASS(p->p_xthread != NULL); - p->p_xthread->td_dbgflags &= ~TDB_XSIG; - p->p_xthread->td_xsig = data; - p->p_xthread = NULL; - p->p_xsig = data; - } else { - MPASS(p->p_xthread == NULL); - MPASS(req == PT_ATTACH); - } + MPASS(p->p_xthread != NULL); + p->p_xthread->td_dbgflags &= ~TDB_XSIG; + p->p_xthread->td_xsig = data; + p->p_xthread = NULL; + p->p_xsig = data; - if ((p->p_flag & (P_STOPPED_SIG | P_STOPPED_TRACE)) != 0) { - /* - * P_WKILLED is insurance that a PT_KILL/SIGKILL always - * works immediately, even if another thread is - * unsuspended first and attempts to handle a different - * signal or if the POSIX.1b style signal queue cannot - * accommodate any new signals. - */ - if (data == SIGKILL) - p->p_flag |= P_WKILLED; + /* + * P_WKILLED is insurance that a PT_KILL/SIGKILL + * always works immediately, even if another thread is + * unsuspended first and attempts to handle a + * different signal or if the POSIX.1b style signal + * queue cannot accommodate any new signals. + */ + if (data == SIGKILL) + p->p_flag |= P_WKILLED; - if (req == PT_DETACH) { - FOREACH_THREAD_IN_PROC(p, td3) - td3->td_dbgflags &= ~TDB_SUSPEND; - } - - /* - * Unsuspend all threads. To leave a thread - * suspended, use PT_SUSPEND to suspend it - * before continuing the process. - */ - PROC_SLOCK(p); - p->p_flag &= ~(P_STOPPED_TRACE|P_STOPPED_SIG|P_WAITED); - thread_unsuspend(p); - PROC_SUNLOCK(p); + if (req == PT_DETACH) { + FOREACH_THREAD_IN_PROC(p, td3) + td3->td_dbgflags &= ~TDB_SUSPEND; } /* - * For requests other than PT_ATTACH, P_STOPPED_TRACE - * was set, so any pending signal in 'data' is - * delivered via the reporting thread (p_xthread). - * For PT_ATTACH the process is not yet stopped for - * tracing, so P_STOPPED_TRACE cannot be set and the - * SIGSTOP must be delivered to the process. + * Unsuspend all threads. To leave a thread + * suspended, use PT_SUSPEND to suspend it before + * continuing the process. */ - if (req == PT_ATTACH) - kern_psignal(p, data); + PROC_SLOCK(p); + p->p_flag &= ~(P_STOPPED_TRACE | P_STOPPED_SIG | P_WAITED); + thread_unsuspend(p); + PROC_SUNLOCK(p); break; case PT_WRITE_I: From owner-svn-src-head@freebsd.org Mon Nov 13 21:22:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A798DD7383; Mon, 13 Nov 2017 21:22: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 672A57ED44; Mon, 13 Nov 2017 21:22: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 vADLMXu9048868; Mon, 13 Nov 2017 21:22:33 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vADLMXeE048867; Mon, 13 Nov 2017 21:22:33 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201711132122.vADLMXeE048867@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 13 Nov 2017 21:22:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325778 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 325778 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2017 21:22:34 -0000 Author: jhb Date: Mon Nov 13 21:22:33 2017 New Revision: 325778 URL: https://svnweb.freebsd.org/changeset/base/325778 Log: Move loop to clear TDB_SUSPEND into PT_DETACH case. The PT_DETACH case above the sendsig: label already looped over all threads clearing flags in td_dbgflags. Reuse this loop to clear TDB_SUSPEND and move the logic out of the sendsig: block. Modified: head/sys/kern/sys_process.c Modified: head/sys/kern/sys_process.c ============================================================================== --- head/sys/kern/sys_process.c Mon Nov 13 21:09:08 2017 (r325777) +++ head/sys/kern/sys_process.c Mon Nov 13 21:22:33 2017 (r325778) @@ -1128,8 +1128,10 @@ kern_ptrace(struct thread *td, int req, pid_t pid, voi sigqueue_delete(&td3->td_sigqueue, SIGSTOP); } - td3->td_dbgflags &= ~(TDB_XSIG | TDB_FSTP); + td3->td_dbgflags &= ~(TDB_XSIG | TDB_FSTP | + TDB_SUSPEND); } + if ((p->p_flag2 & P2_PTRACE_FSTP) != 0) { sigqueue_delete(&p->p_sigqueue, SIGSTOP); p->p_flag2 &= ~P2_PTRACE_FSTP; @@ -1169,11 +1171,6 @@ kern_ptrace(struct thread *td, int req, pid_t pid, voi */ if (data == SIGKILL) p->p_flag |= P_WKILLED; - - if (req == PT_DETACH) { - FOREACH_THREAD_IN_PROC(p, td3) - td3->td_dbgflags &= ~TDB_SUSPEND; - } /* * Unsuspend all threads. To leave a thread From owner-svn-src-head@freebsd.org Mon Nov 13 21:23:27 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D430BDD7405; Mon, 13 Nov 2017 21:23:27 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A1A947EE98; Mon, 13 Nov 2017 21:23:27 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vADLNQxT048950; Mon, 13 Nov 2017 21:23:26 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vADLNQoq048949; Mon, 13 Nov 2017 21:23:26 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201711132123.vADLNQoq048949@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 13 Nov 2017 21:23:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325779 - head/sys/boot/forth X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/boot/forth X-SVN-Commit-Revision: 325779 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2017 21:23:27 -0000 Author: imp Date: Mon Nov 13 21:23:26 2017 New Revision: 325779 URL: https://svnweb.freebsd.org/changeset/base/325779 Log: Add /boot/dts to the list of default modules. The minimal arm and mips loader.conf for uboot have this in the list, but the default one didn't. Since there's no harm and it's a failsafe, add it to the list. Sponsored by: Netflix Modified: head/sys/boot/forth/loader.conf Modified: head/sys/boot/forth/loader.conf ============================================================================== --- head/sys/boot/forth/loader.conf Mon Nov 13 21:22:33 2017 (r325778) +++ head/sys/boot/forth/loader.conf Mon Nov 13 21:23:26 2017 (r325779) @@ -97,7 +97,7 @@ bootenv_autolist="YES" # Auto populate the list of ZF #comconsole_speed="9600" # Set the current serial console speed #console="vidconsole" # A comma separated list of console(s) #currdev="disk1s1a" # Set the current device -module_path="/boot/modules" # Set the module search path +module_path="/boot/modules;/boot/dts" # Set the module search path #prompt="\\${interpret}" # Set the command prompt #root_disk_unit="0" # Force the root disk unit number #rootdev="disk1s1a" # Set the root filesystem From owner-svn-src-head@freebsd.org Mon Nov 13 21:25:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D192DD74E6; Mon, 13 Nov 2017 21:25:58 +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 4A47A7F044; Mon, 13 Nov 2017 21:25:58 +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 vADLPvPQ049100; Mon, 13 Nov 2017 21:25:57 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vADLPvPv049099; Mon, 13 Nov 2017 21:25:57 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201711132125.vADLPvPv049099@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 13 Nov 2017 21:25:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325780 - head/sys/boot/forth X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/boot/forth X-SVN-Commit-Revision: 325780 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2017 21:25:58 -0000 Author: imp Date: Mon Nov 13 21:25:57 2017 New Revision: 325780 URL: https://svnweb.freebsd.org/changeset/base/325780 Log: Don't add /boot/dt*s* but /boot/dt*b*. Stupid think-o. /boot/dtb was what was tested... Modified: head/sys/boot/forth/loader.conf Modified: head/sys/boot/forth/loader.conf ============================================================================== --- head/sys/boot/forth/loader.conf Mon Nov 13 21:23:26 2017 (r325779) +++ head/sys/boot/forth/loader.conf Mon Nov 13 21:25:57 2017 (r325780) @@ -97,7 +97,7 @@ bootenv_autolist="YES" # Auto populate the list of ZF #comconsole_speed="9600" # Set the current serial console speed #console="vidconsole" # A comma separated list of console(s) #currdev="disk1s1a" # Set the current device -module_path="/boot/modules;/boot/dts" # Set the module search path +module_path="/boot/modules;/boot/dtb" # Set the module search path #prompt="\\${interpret}" # Set the command prompt #root_disk_unit="0" # Force the root disk unit number #rootdev="disk1s1a" # Set the root filesystem From owner-svn-src-head@freebsd.org Mon Nov 13 21:55:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C697BDD8117; Mon, 13 Nov 2017 21:55:38 +0000 (UTC) (envelope-from feld@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92DBD7FFAD; Mon, 13 Nov 2017 21:55:38 +0000 (UTC) (envelope-from feld@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vADLtbNk061905; Mon, 13 Nov 2017 21:55:37 GMT (envelope-from feld@FreeBSD.org) Received: (from feld@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vADLtYNR061903; Mon, 13 Nov 2017 21:55:34 GMT (envelope-from feld@FreeBSD.org) Message-Id: <201711132155.vADLtYNR061903@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: feld set sender to feld@FreeBSD.org using -f From: Mark Felder Date: Mon, 13 Nov 2017 21:55:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325781 - head/usr.bin/fortune/datfiles X-SVN-Group: head X-SVN-Commit-Author: feld X-SVN-Commit-Paths: head/usr.bin/fortune/datfiles X-SVN-Commit-Revision: 325781 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2017 21:55:38 -0000 Author: feld (ports committer) Date: Mon Nov 13 21:55:34 2017 New Revision: 325781 URL: https://svnweb.freebsd.org/changeset/base/325781 Log: Remove fortune quotes attributed to or providing admiration of Adolf Hitler MFC after: 1 week Modified: head/usr.bin/fortune/datfiles/fortunes Modified: head/usr.bin/fortune/datfiles/fortunes ============================================================================== --- head/usr.bin/fortune/datfiles/fortunes Mon Nov 13 21:25:57 2017 (r325780) +++ head/usr.bin/fortune/datfiles/fortunes Mon Nov 13 21:55:34 2017 (r325781) @@ -6678,10 +6678,6 @@ her cluckings, and are regularly brooded at night bene % A hermit is a deserter from the army of humanity. % -A highly intelligent man should take a primitive woman. Imagine if on top -of everything else, I had a woman who interfered with my work. - -- Adolf Hitler -% A holding company is a thing where you hand an accomplice the goods while the policeman searches you. % @@ -7998,10 +7994,6 @@ A woman may very well form a friendship with a man, bu it must be assisted by a little physical antipathy. -- Friedrich Nietzsche % -A woman must be a cute, cuddly, naive little thing -- tender, sweet, -and stupid. - -- Adolf Hitler -% A woman physician has made the statement that smoking is neither physically defective nor morally degrading, and that nicotine, even when indulged to in excess, is less harmful than excessive petting." @@ -16428,10 +16420,6 @@ question." [actually, the term "bug" had even earlier usage in regard to problems with radio hardware. Ed.] % -Everlasting peace will come to the world when the last man has slain -the last but one. - -- Adolf Hitler -% Every absurdity has a champion who will defend it. % Every cloud engenders not a storm. @@ -19769,15 +19757,6 @@ Good-bye. I am leaving because I am bored. % Goodbye, cool world. % -Goose pimples rose all over me, my hair stood on end, my eyes filled with -tears of love and gratitude for this greatest of all conquerors of human -misery and shame, and my breath came in little gasps. If I had not known -that the Leader would have scorned such adulation, I might have fallen to -my knees in unashamed worship, but instead I drew myself to attention, raised -my arm in the eternal salute of the ancient Roman Legions and repeated the -holy words, "Heil Hitler!" - -- George Lincoln Rockwell -% Gordon's first law: If a research project is not worth doing, it is not worth doing well. @@ -21466,11 +21445,6 @@ Hitchcock's Staple Principle: The stapler runs out of staples only while you are trying to staple something. % -Hitler used methods against white men in Europe, which by tacit -agreement between the cultural European nations were only to be -used against the coloured. - -- Poul Henningsen (1894-1967) -% Hlade's Law: If you have a difficult task, give it to a lazy person -- they will find an easier way to do it. @@ -22776,9 +22750,6 @@ I give you the man who -- the man who -- uh, I forgets I go on working for the same reason a hen goes on laying eggs. -- H. L. Mencken % -I go the way that Providence dictates. - -- Adolf Hitler -% I got my driver's license photo taken out of focus on purpose. Now when I get pulled over the cop looks at it (moving it nearer and farther, trying to see it clearly)... and says, "Here, you can go." @@ -23823,12 +23794,6 @@ a little girl who won't eat her dinner or a great big in his veins. -- Sigmund Freud, in a letter to his fiancee % -I shall give a propagandist reason for starting the war, no matter whether -it is plausible or not. The victor will not be asked afterwards whether -he told the truth or not. When starting and waging war it is not right -that matters, but victory. - -- Adolf Hitler -% I shot an arrow in to the air, and it stuck. -- graffito in Los Angeles @@ -25291,10 +25256,6 @@ I would send a barrel or so to my other generals. If I love you, what business is it of yours? -- Johann Wolfgang von Goethe % -If I made peace with Russia today, I'd only attack her again tomorrow. I -just couldn't help myself. - -- Adolf Hitler -% If I promised you the moon and the stars, would you believe it? -- Alan Parsons Project % @@ -26960,10 +26921,6 @@ usual way. This happens to us all the time with compu thinks of complaining. -- Jeff Raskin, interviewed in Doctor Dobb's Journal % -Imagine me going around with a pot belly. -It would mean political ruin. - -- Adolf Hitler -% Imagine that Cray computer decides to make a personal computer. It has a 150 MHz processor, 200 megabytes of RAM, 1500 megabytes of disk storage, a screen resolution of 4096 x 4096 pixels, relies entirely on @@ -42643,9 +42600,6 @@ made of things. % Success is something I will dress for when I get there, and not until. % -Success is the sole earthly judge of right and wrong. - -- Adolf Hitler, "Mein Kampf" -% Succumb to natural tendencies. Be hateful and boring. % Such a fine first dream! @@ -43293,9 +43247,6 @@ Text processing has made it possible to right-justify one which cannot be justified on any other grounds. -- J. Finnegan, USC % -Thank God I've always avoided persecuting my enemies. - -- Adolf Hitler -% Thank goodness modern convenience is a thing of the remote future. -- Pogo, by Walt Kelly % @@ -43920,10 +43871,6 @@ The Briggs - Chase Law of Program Development: % The British are coming! The British are coming! % -The broad mass of a nation... will more easily -fall victim to a big lie than to a small one. - -- Adolf Hitler, "Mein Kampf" -% The brotherhood of man is not a mere poet's dream; it is a most depressing and humiliating reality. -- Oscar Wilde @@ -44606,10 +44553,6 @@ The fact that boys are allowed to exist at all is evid remarkable Christian forbearance among men. -- Ambrose Bierce % -The fact that Hitler was a political genius unmasks the nature of politics -in general as no other can. - -- Wilhelm Reich -% The fact that it works is immaterial. -- L. Ogborn % @@ -48257,10 +48200,6 @@ The verdict of a jury is the a priori opinion of that the worst cigars. -- H. L. Mencken % -The very first essential for success is a perpetually -constant and regular employment of violence. - -- Adolf Hitler, "Mein Kampf" -% The very ink with which all history is written is merely fluid prejudice. -- Mark Twain @@ -49181,11 +49120,6 @@ wooden toilet seats. It's called the Birch John Society. % -There is a road to freedom. Its milestones are Obedience, Endeavor, Honesty, -Order, Cleanliness, Sobriety, Truthfulness, Sacrifice, and love of the -Fatherland. - -- Adolf Hitler -% There is a theory which states that if ever anyone discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and @@ -52431,11 +52365,6 @@ Vini, vidi, vici. [I came, I saw, I conquered]. -- Gaius Julius Caesar % -"Violence accomplishes nothing." What a contemptible lie! Raw, naked -violence has settled more issues throughout history than any other method -ever employed. Perhaps the city fathers of Carthage could debate the -issue, with Hitler and Alexander as judges? -% Violence is a sword that has no handle -- you have to hold the blade. % Violence is molding. @@ -54156,9 +54085,6 @@ What kind of sordid business are you on now? I mean, goest thou? Whither goest thou, America, in thy shiny car in the night? -- Jack Kerouac % -What luck for the rulers that men do not think. - -- Adolf Hitler -% What makes the Universe so hard to comprehend is that there's nothing to compare it with. % @@ -56690,11 +56616,6 @@ Would you care to drift aimlessly in my direction? Would you care to view the ruins of my good intentions? % Would you people stop playing these stupid games?!?!?!!!! -% -Would you please have another look at my nose and put in that cocaine -stuff ... - -- Adolf Hitler, quoted by Dr. Giesing in Nuremberg - trial testimony, 1947 % Would you *really* want to get on a non-stop flight? -- George Carlin From owner-svn-src-head@freebsd.org Mon Nov 13 22:16:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54F8CDD86C1; Mon, 13 Nov 2017 22:16:48 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 21C1C8094E; Mon, 13 Nov 2017 22:16:48 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vADMGl5H070267; Mon, 13 Nov 2017 22:16:47 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vADMGl9p070266; Mon, 13 Nov 2017 22:16:47 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201711132216.vADMGl9p070266@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 13 Nov 2017 22:16:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325782 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 325782 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2017 22:16:48 -0000 Author: glebius Date: Mon Nov 13 22:16:47 2017 New Revision: 325782 URL: https://svnweb.freebsd.org/changeset/base/325782 Log: Style r320614: don't initialize at declaration, new line after declarations, shorten variable name to avoid extra long lines. No functional changes. Modified: head/sys/netinet/tcp_output.c Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Mon Nov 13 21:55:34 2017 (r325781) +++ head/sys/netinet/tcp_output.c Mon Nov 13 22:16:47 2017 (r325782) @@ -523,12 +523,12 @@ after_sack_rexmit: * XXXGL: should there be used sbused() or sbavail()? */ if (V_tcp_do_autosndbuf && so->so_snd.sb_flags & SB_AUTOSIZE) { - int autosndbuf_mod = 0; - if (V_tcp_sendbuf_auto_lowat) - autosndbuf_mod = so->so_snd.sb_lowat; + int lowat; - if ((tp->snd_wnd / 4 * 5) >= so->so_snd.sb_hiwat - autosndbuf_mod && - sbused(&so->so_snd) >= (so->so_snd.sb_hiwat / 8 * 7) - autosndbuf_mod && + lowat = V_tcp_sendbuf_auto_lowat ? so->so_snd.sb_lowat : 0; + if ((tp->snd_wnd / 4 * 5) >= so->so_snd.sb_hiwat - lowat && + sbused(&so->so_snd) >= + (so->so_snd.sb_hiwat / 8 * 7) - lowat && sbused(&so->so_snd) < V_tcp_autosndbuf_max && sendwin >= (sbused(&so->so_snd) - (tp->snd_nxt - tp->snd_una))) { From owner-svn-src-head@freebsd.org Mon Nov 13 23:14:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B074FDD9B0D for ; Mon, 13 Nov 2017 23:14:58 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-wm0-x236.google.com (mail-wm0-x236.google.com [IPv6:2a00:1450:400c:c09::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E26FA2CBA for ; Mon, 13 Nov 2017 23:14:57 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-wm0-x236.google.com with SMTP id g141so18395044wmg.2 for ; Mon, 13 Nov 2017 15:14:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=o9VhmFJP6oHZxTpyazuAsTGh9egq4EMy+S925pwOPqo=; b=qabiDR99II3Qr36UiQmIxLG+r3tf8IKsk9tXj9GFAI0rK22wbY3lYOs+u1AXuwRMdY KugiT20gKGgoAOSALdvTdQ3f87e/PVB3Gxw6sOqxgn84VmrmSvrOKSxY3vXHq+5+AGUd GqZeVA3EBkbZd050JtTzq4aHm2L1v1+uSjz5YpseiIOVBVf7Rf1OLb/GvClfODtellDZ Q69tbZ2uhncKYhxR4nwf6q/I//ioW5OIHqpvYrVCmcvuRsvDZ+VPdjJ7iamNLIugwgQn 2EiM4Kx6q4Ic2IaFmhHe2hjwRUobl3q1txkvtZWm+w97BiyykbMM8w+TvmdTUZfLLxaA D34A== 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=o9VhmFJP6oHZxTpyazuAsTGh9egq4EMy+S925pwOPqo=; b=dGXF865c+W3OLtVCpMRJgJikeVMGOF3tWVJ/fFxsqVLiORQJY+r/n7FxC2CLnQGG8f NMpsXDOF0qpJTdEAL3bFd9EsBlmW1PwVGKsW+GjunTPcU/6NIE8d4KidBpx8O6xpjCyT Rn8IuLaOjTAjcSxhH3esxOrHg6QUww+FyBwzCuxvwRovjCKEoQY+LT004WlI/HdkyXG+ peDqlVjY8xpOaSp8YTOGBoNXvw1HmQVOwNKHyCuSOSAyvkjg405wHnDygWpmXNI9Ff62 +aDmvt05z3u5XbAZ3+jjxH66N6V1AZe16rv2ySBn+tdMAGx36EkgBxFPkEeqXBtZeTKq YBeA== X-Gm-Message-State: AJaThX5rw7apFbrqjbX6sb+l/GRyD3seH16TFTHGtEm9E4VyrbnRNWUp oJp496KUuOHo1sfG/xymVjwFSTNjIbExSl/wYPTrUA== X-Google-Smtp-Source: AGs4zMaPknMJD6S77BxcCPiGSFyjUNNKAfK72X9J93u5WzHwTEEo+uS2/D1KaZ6iJ7T5VIU6JkOFcwfhZjudjwl/shE= X-Received: by 10.80.181.71 with SMTP id z7mr14822615edd.201.1510614895335; Mon, 13 Nov 2017 15:14:55 -0800 (PST) MIME-Version: 1.0 Received: by 10.80.166.217 with HTTP; Mon, 13 Nov 2017 15:14:54 -0800 (PST) In-Reply-To: <201710141838.v9EIcaOQ047300@repo.freebsd.org> References: <201710141838.v9EIcaOQ047300@repo.freebsd.org> From: Oliver Pinter Date: Tue, 14 Nov 2017 00:14:54 +0100 Message-ID: Subject: Re: svn commit: r324619 - in head/usr.bin/procstat: . tests To: Brooks Davis Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2017 23:14:58 -0000 On Saturday, October 14, 2017, Brooks Davis wrote: > Author: brooks > Date: Sat Oct 14 18:38:36 2017 > New Revision: 324619 > URL: https://svnweb.freebsd.org/changeset/base/324619 > > Log: > Switch procstat from subcommand flags to verbs > > - Use an enumerated value instead of separate flags for commands > - Look for a verb if no command flag is set > - Lookup the "xocontainer" value based on the command > - Document the new command verbs in the man-page > > Submitted by: kdrakehp@zoho.com > Differential Revision: https://reviews.freebsd.org/D10916 += Release notes? > > Modified: > head/usr.bin/procstat/procstat.1 > head/usr.bin/procstat/procstat.c > head/usr.bin/procstat/procstat.h > head/usr.bin/procstat/procstat_args.c > head/usr.bin/procstat/procstat_auxv.c > head/usr.bin/procstat/procstat_basic.c > head/usr.bin/procstat/procstat_bin.c > head/usr.bin/procstat/procstat_cred.c > head/usr.bin/procstat/procstat_cs.c > head/usr.bin/procstat/procstat_files.c > head/usr.bin/procstat/procstat_kstack.c > head/usr.bin/procstat/procstat_ptlwpinfo.c > head/usr.bin/procstat/procstat_rlimit.c > head/usr.bin/procstat/procstat_rusage.c > head/usr.bin/procstat/procstat_sigs.c > head/usr.bin/procstat/procstat_threads.c > head/usr.bin/procstat/procstat_vm.c > head/usr.bin/procstat/tests/procstat_test.sh > > Modified: head/usr.bin/procstat/procstat.1 > ============================================================ > ================== > --- head/usr.bin/procstat/procstat.1 Sat Oct 14 17:51:25 2017 > (r324618) > +++ head/usr.bin/procstat/procstat.1 Sat Oct 14 18:38:36 2017 > (r324619) > @@ -25,7 +25,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd October 3, 2017 > +.Dd October 14, 2017 > .Dt PROCSTAT 1 > .Os > .Sh NAME > @@ -34,14 +34,75 @@ > .Sh SYNOPSIS > .Nm > .Op Fl -libxo > -.Op Fl CHhn > +.Op Fl h > .Op Fl M Ar core > .Op Fl N Ar system > .Op Fl w Ar interval > -.Op Fl b | c | e | f | i | j | k | l | L | r | s | S | t | v | x > -.Op Fl a | Ar pid | Ar core ... > +.Ar command > +.Op Ar pid ... | Ar core ... > +.Nm > +.Op Fl -libxo > +.Fl a > +.Op Fl h > +.Op Fl M Ar core > +.Op Fl N Ar system > +.Op Fl w Ar interval > +.Ar command > +.Nm > +.Op Fl -libxo > +.Op Fl h > +.Op Fl M Ar core > +.Op Fl N Ar system > +.Op Fl w Ar interval > +.Oo > +.Fl b | > +.Fl c | > +.Fl e | > +.Fl f Oo Fl C Oc | > +.Fl i Oo Fl n Oc | > +.Fl j Oo Fl n Oc | > +.Fl k Oo Fl k Oc | > +.Fl l | > +.Fl r Oo Fl H Oc | > +.Fl s | > +.Fl S | > +.Fl t | > +.Fl v | > +.Fl x > +.Oc > +.Op Ar pid ... | Ar core ... > +.Nm > +.Op Fl -libxo > +.Fl a > +.Op Fl h > +.Op Fl M Ar core > +.Op Fl N Ar system > +.Op Fl w Ar interval > +.Oo > +.Fl b | > +.Fl c | > +.Fl e | > +.Fl f Oo Fl C Oc | > +.Fl i Oo Fl n Oc | > +.Fl j Oo Fl n Oc | > +.Fl k Oo Fl k Oc | > +.Fl l | > +.Fl r Oo Fl H Oc | > +.Fl s | > +.Fl S | > +.Fl t | > +.Fl v | > +.Fl x > +.Oc > +.Nm > +.Op Fl -libxo > +.Fl L > +.Op Fl h > +.Op Fl M Ar core > +.Op Fl N Ar system > +.Op Fl w Ar interval > +.Ar core ... > .Sh DESCRIPTION > -The > .Nm > utility displays detailed information about the processes identified by > the > .Ar pid > @@ -51,49 +112,89 @@ flag is used, all processes. > It can also display information extracted from a process core file, if > the core file is specified as the argument. > .Pp > -By default, basic process statistics are printed; one of the following > -options may be specified in order to select more detailed process > information > -for printing: > -.Bl -tag -width indent > -.It Fl -libxo > -Generate output via > +If the > +.Fl -libxo > +flag is specified the output is generated via > .Xr libxo 3 > in a selection of different human and machine readable formats. > See > .Xr xo_parse_args 3 > for details on command line arguments. > -.It Fl b > +.Pp > +The following commands are available: > +.Bl -tag -width indent > +.It Ar basic > +Print basic process statistics (this is the default). > +.It Ar binary | Fl b > Display binary information for the process. > -.It Fl c > +.Pp > +Substring commands are accepted. > +.It Ar argument(s) | Fl c > Display command line arguments for the process. > -.It Fl e > +.Pp > +Substring commands are accepted. > +.It Ar environment | Fl e > Display environment variables for the process. > -.It Fl f > +.Pp > +Substring commands are accepted. > +.It Ar file(s) | Ar fd(s) | Fl f > Display file descriptor information for the process. > -.It Fl i > +.Pp > +If the > +.Fl C > +subcommand flag is used then additional capability information is printed. > +.It Ar signal(s) | Fl i > Display signal pending and disposition information for the process. > -.It Fl j > +.Pp > +If the > +.Fl n > +subcommand option is used, the signal numbers are shown instead of signal > +names. > +.Pp > +Substring commands are accepted. > +.It Ar tsignal(s) | Fl j > Display signal pending and blocked information for the process's threads. > -.It Fl k > +.Pp > +If the > +.Fl n > +subcommand option is used, the signal numbers are shown instead of signal > +names. > +.Pp > +Substring commands are accepted. > +.It Ar kstack | Fl k > Display the stacks of kernel threads in the process, excluding stacks of > threads currently running on a CPU and threads with stacks swapped to > disk. > -If the flag is repeated, function offsets as well as function names are > -printed. > -.It Fl l > +.Pp > +If the > +.Fl v > +subcommand option is used (or the command flag is repeated), function > +offsets as well as function names are printed. > +.It Ar rlimit | Fl l > Display resource limits for the process. > -.It Fl L > +.It Ar ptlwpinfo | Fl L > Display LWP info for the process pertaining to its signal driven exit. > -.It Fl r > +.It Ar rusage | Fl r > Display resource usage information for the process. > -.It Fl s > +.Pp > +If the > +.Fl v > +.Pq or Fl H > +subcommand flag > +is used then per-thread statistics are printed, rather than per-process > +statistics. > +The second field in the table will list the thread ID to which the row of > +information corresponds. > +.It Ar credential(s) | Fl s > Display security credential information for the process. > -.It Fl S > +.Pp > +Substring commands are accepted. > +.It Ar cpuset | Ar cs | Fl S > Display the cpuset information for the thread. > -.It Fl t > +.It Ar thread(s) | Fl t > Display thread information for the process. > -.It Fl v > +.It Ar vm | Fl v > Display virtual memory mappings for the process. > -.It Fl x > +.It Ar auxv | Fl x > Display ELF auxiliary vector for the process. > .El > .Pp > @@ -110,23 +211,6 @@ of the requested process information. > If the > .Fl w > flag is not specified, the output will not repeat. > -.Pp > -The > -.Fl C > -flag requests the printing of additional capability information in the > file > -descriptor view. > -.Pp > -The > -.Fl H > -flag may be used to request per-thread statistics rather than per-process > -statistics for some options. > -For those options, the second field in the table will list the thread ID > -to which the row of information corresponds. > -The > -.Fl H > -flag is implied for the > -.Fl S > -mode. > .Pp > Information for VM, file descriptor, and cpuset options is available > only to the owner of a process or the superuser. > > Modified: head/usr.bin/procstat/procstat.c > ============================================================ > ================== > --- head/usr.bin/procstat/procstat.c Sat Oct 14 17:51:25 2017 > (r324618) > +++ head/usr.bin/procstat/procstat.c Sat Oct 14 18:38:36 2017 > (r324619) > @@ -42,37 +42,111 @@ > > #include "procstat.h" > > -static int aflag, bflag, cflag, eflag, fflag, iflag, jflag, kflag; > -static int lflag, Lflag, rflag, sflag, tflag, vflag, xflag, Sflag; > -int hflag, nflag, Cflag, Hflag; > +enum { > + PS_CMP_NORMAL = 0x00, > + PS_CMP_PLURAL = 0x01, > + PS_CMP_SUBSTR = 0x02 > +}; > > +struct procstat_cmd { > + const char *command; > + const char *xocontainer; > + const char *usage; > + void (*cmd)(struct procstat *, struct kinfo_proc *); > + void (*opt)(int, char * const *); > + int cmp; > +}; > + > +int procstat_opts = 0; > + > +static void cmdopt_none(int argc, char * const argv[]); > +static void cmdopt_verbose(int argc, char * const argv[]); > +static void cmdopt_signals(int argc, char * const argv[]); > +static void cmdopt_rusage(int argc, char * const argv[]); > +static void cmdopt_files(int argc, char * const argv[]); > +static void cmdopt_cpuset(int argc, char * const argv[]); > + > +static const struct procstat_cmd cmd_table[] = { > + { "argument", "arguments", NULL, &procstat_args, &cmdopt_none, > + PS_CMP_PLURAL | PS_CMP_SUBSTR }, > + { "auxv", "auxv", NULL, &procstat_auxv, &cmdopt_none, > PS_CMP_NORMAL }, > + { "basic", "basic", NULL, &procstat_basic, &cmdopt_none, > + PS_CMP_NORMAL }, > + { "binary", "binary", NULL, &procstat_bin, &cmdopt_none, > + PS_CMP_SUBSTR }, > + { "cpuset", "cs", NULL, &procstat_cs, &cmdopt_cpuset, > PS_CMP_NORMAL }, > + { "cs", "cs", NULL, &procstat_cs, &cmdopt_cpuset, PS_CMP_NORMAL }, > + { "credential", "credentials", NULL, &procstat_cred, &cmdopt_none, > + PS_CMP_PLURAL | PS_CMP_SUBSTR }, > + { "environment", "environment", NULL, &procstat_env, &cmdopt_none, > + PS_CMP_SUBSTR }, > + { "fd", "files", "[-C]", &procstat_files, &cmdopt_files, > + PS_CMP_PLURAL }, > + { "file", "files", "[-C]", &procstat_files, &cmdopt_files, > + PS_CMP_PLURAL }, > + { "kstack", "kstack", "[-v]", &procstat_kstack, &cmdopt_verbose, > + PS_CMP_NORMAL }, > + { "ptlwpinfo", "ptlwpinfo", NULL, &procstat_ptlwpinfo, > &cmdopt_none, > + PS_CMP_NORMAL }, > + { "rlimit", "rlimit", NULL, &procstat_rlimit, &cmdopt_none, > + PS_CMP_NORMAL }, > + { "rusage", "rusage", "[-Ht]", &procstat_rusage, &cmdopt_rusage, > + PS_CMP_NORMAL }, > + { "signal", "signals", "[-n]", &procstat_sigs, &cmdopt_signals, > + PS_CMP_PLURAL | PS_CMP_SUBSTR }, > + { "thread", "threads", NULL, &procstat_threads, &cmdopt_none, > + PS_CMP_PLURAL }, > + { "tsignal", "thread_signals", "[-n]", &procstat_threads_sigs, > + &cmdopt_signals, PS_CMP_PLURAL | PS_CMP_SUBSTR }, > + { "vm", "vm", NULL, &procstat_vm, &cmdopt_none, PS_CMP_NORMAL } > +}; > + > static void > usage(void) > { > + size_t i, l; > + int multi; > > - xo_error( > - "usage: procstat [--libxo] [-Hhn] [-M core] " > - "[-N system] [-w interval]\n" > - " [-S | -b | -c | -e | -i | -j | -k | -kk | " > - "-l | -r | -s | \n" > - " -t | -v | -x]\n" > - " [-a | pid ... | core ...]\n" > - " procstat [--libxo] -Cf [-hn] [-M core] " > - "[-N system] [-a | pid ... | core ...]\n" > - " [-S | -b | -c | -e | -i | -j | -k | -kk | " > - "-l | -r | -s | \n" > - " procstat [--libxo] -L [-hn] [-M core] " > - "[-N system] [-w interval]\n" > - " [-S | -b | -c | -e | -i | -j | -k | -kk | " > - "-l | -r | -s | \n" > - " -t | -v | -x]\n" > - " [core ...]\n"); > + xo_error("usage: procstat [--libxo] [-h] [-M core] [-N system]" > + " [-w interval] command\n" > + " [pid ... | core ...]\n" > + " procstat [--libxo] -a [-h] [-M core] [-N system] " > + " [-w interval] command\n" > + " procstat [--libxo] [-h] [-M core] [-N system]" > + " [-w interval]\n" > + " [-S | -b | -c | -e | -f [-C] | -i [-n] | " > + "-j [-n] | -k [-k] |\n" > + " -l | -r [-H] | -s | -t | -v | -x] " > + "[pid ... | core ...]\n" > + " procstat [--libxo] -a [-h] [-M core] [-N system]" > + " [-w interval]\n" > + " [-S | -b | -c | -e | -f [-C] | -i [-n] | " > + "-j [-n] | -k [-k] |\n" > + " -l | -r [-H] | -s | -t | -v | -x]\n" > + " procstat [--libxo] -L [-h] [-M core] [-N system] core > ...\n" > + "Available commands:\n"); > + for (i = 0, l = nitems(cmd_table); i < l; i++) { > + multi = i + 1 < l && cmd_table[i].cmd == cmd_table[i + > 1].cmd; > + xo_error(" %s%s%s", multi ? "[" : "", > + cmd_table[i].command, (cmd_table[i].cmp & > PS_CMP_PLURAL) ? > + "(s)" : ""); > + for (; i + 1 < l && cmd_table[i].cmd == cmd_table[i + > 1].cmd; > + i++) > + xo_error(" | %s%s", cmd_table[i + 1].command, > + (cmd_table[i].cmp & PS_CMP_PLURAL) ? "(s)" : > ""); > + if (multi) > + xo_error("]"); > + if (cmd_table[i].usage != NULL) > + xo_error(" %s", cmd_table[i].usage); > + xo_error("\n"); > + } > xo_finish(); > exit(EX_USAGE); > } > > static void > -procstat(struct procstat *prstat, struct kinfo_proc *kipp) > +procstat(const struct procstat_cmd *cmd, struct procstat *prstat, > + struct kinfo_proc *kipp) > { > char *pidstr = NULL; > > @@ -80,40 +154,7 @@ procstat(struct procstat *prstat, struct kinfo_proc *k > if (pidstr == NULL) > xo_errc(1, ENOMEM, "Failed to allocate memory in > procstat()"); > xo_open_container(pidstr); > - > - if (bflag) > - procstat_bin(prstat, kipp); > - else if (cflag) > - procstat_args(prstat, kipp); > - else if (eflag) > - procstat_env(prstat, kipp); > - else if (fflag) > - procstat_files(prstat, kipp); > - else if (iflag) > - procstat_sigs(prstat, kipp); > - else if (jflag) > - procstat_threads_sigs(prstat, kipp); > - else if (kflag) > - procstat_kstack(prstat, kipp, kflag); > - else if (lflag) > - procstat_rlimit(prstat, kipp); > - else if (Lflag) > - procstat_ptlwpinfo(prstat); > - else if (rflag) > - procstat_rusage(prstat, kipp); > - else if (sflag) > - procstat_cred(prstat, kipp); > - else if (tflag) > - procstat_threads(prstat, kipp); > - else if (vflag) > - procstat_vm(prstat, kipp); > - else if (xflag) > - procstat_auxv(prstat, kipp); > - else if (Sflag) > - procstat_cs(prstat, kipp); > - else > - procstat_basic(kipp); > - > + cmd->cmd(prstat, kipp); > xo_close_container(pidstr); > free(pidstr); > } > @@ -157,122 +198,158 @@ kinfo_proc_thread_name(const struct kinfo_proc > *kipp) > return (name); > } > > +static const struct procstat_cmd * > +getcmd(const char *str) > +{ > + const struct procstat_cmd *cmd; > + size_t i, l; > + int cmp, s; > + > + if (str == NULL) > + return (NULL); > + cmd = NULL; > + if ((l = strlen(str)) == 0) > + return (getcmd("basic")); > + s = l > 1 && strcasecmp(str + l - 1, "s") == 0; > + for (i = 0; i < nitems(cmd_table); i++) { > + /* > + * After the first match substring matches are disabled, > + * allowing subsequent full matches to take precedence. > + */ > + if (cmd == NULL && (cmd_table[i].cmp & PS_CMP_SUBSTR)) > + cmp = strncasecmp(str, cmd_table[i].command, l - > + ((cmd_table[i].cmp & PS_CMP_PLURAL) && s ? 1 : > 0)); > + else if ((cmd_table[i].cmp & PS_CMP_PLURAL) && s && > + l == strlen(cmd_table[i].command) + 1) > + cmp = strncasecmp(str, cmd_table[i].command, l - > 1); > + else > + cmp = strcasecmp(str, cmd_table[i].command); > + if (cmp == 0) > + cmd = &cmd_table[i]; > + } > + return (cmd); > +} > + > int > main(int argc, char *argv[]) > { > - int ch, interval, tmp; > + int ch, interval; > int i; > struct kinfo_proc *p; > + const struct procstat_cmd *cmd; > struct procstat *prstat, *cprstat; > long l; > pid_t pid; > char *dummy; > char *nlistf, *memf; > - const char *xocontainer; > + int aflag; > int cnt; > > interval = 0; > + cmd = NULL; > memf = nlistf = NULL; > + aflag = 0; > argc = xo_parse_args(argc, argv); > - xocontainer = "basic"; > > while ((ch = getopt(argc, argv, "abCcefHhijkLlM:N:nrSstvw:x")) != > -1) { > switch (ch) { > - case 'C': > - Cflag++; > - break; > - > - case 'H': > - Hflag++; > - break; > - > - case 'M': > - memf = optarg; > - break; > - case 'N': > - nlistf = optarg; > - break; > - case 'S': > - Sflag++; > - xocontainer = "cs"; > - break; > case 'a': > aflag++; > break; > - > case 'b': > - bflag++; > - xocontainer = "binary"; > + if (cmd != NULL) > + usage(); > + cmd = getcmd("binary"); > break; > - > + case 'C': > + procstat_opts |= PS_OPT_CAPABILITIES; > + break; > case 'c': > - cflag++; > - xocontainer = "arguments"; > + if (cmd != NULL) > + usage(); > + cmd = getcmd("arguments"); > break; > - > case 'e': > - eflag++; > - xocontainer = "environment"; > + if (cmd != NULL) > + usage(); > + cmd = getcmd("environment"); > break; > - > case 'f': > - fflag++; > - xocontainer = "files"; > + if (cmd != NULL) > + usage(); > + cmd = getcmd("files"); > break; > - > + case 'H': > + procstat_opts |= PS_OPT_PERTHREAD; > + break; > + case 'h': > + procstat_opts |= PS_OPT_NOHEADER; > + break; > case 'i': > - iflag++; > - xocontainer = "signals"; > + if (cmd != NULL) > + usage(); > + cmd = getcmd("signals"); > break; > - > case 'j': > - jflag++; > - xocontainer = "thread_signals"; > + if (cmd != NULL) > + usage(); > + cmd = getcmd("tsignals"); > break; > - > case 'k': > - kflag++; > - xocontainer = "kstack"; > + if (cmd->cmd == procstat_kstack) { > + if ((procstat_opts & PS_OPT_VERBOSE) != 0) > + usage(); > + procstat_opts |= PS_OPT_VERBOSE; > + } else { > + if (cmd != NULL) > + usage(); > + cmd = getcmd("kstack"); > + } > break; > - > + case 'L': > + if (cmd != NULL) > + usage(); > + cmd = getcmd("ptlwpinfo"); > + break; > case 'l': > - lflag++; > - xocontainer = "rlimit"; > + if (cmd != NULL) > + usage(); > + cmd = getcmd("rlimit"); > break; > - > - case 'L': > - Lflag++; > - xocontainer = "ptlwpinfo"; > + case 'M': > + memf = optarg; > break; > - > + case 'N': > + nlistf = optarg; > + break; > case 'n': > - nflag++; > + procstat_opts |= PS_OPT_SIGNUM; > break; > - > - case 'h': > - hflag++; > - break; > - > case 'r': > - rflag++; > - xocontainer = "rusage"; > + if (cmd != NULL) > + usage(); > + cmd = getcmd("rusage"); > break; > - > + case 'S': > + if (cmd != NULL) > + usage(); > + cmd = getcmd("cpuset"); > + break; > case 's': > - sflag++; > - xocontainer = "credentials"; > + if (cmd != NULL) > + usage(); > + cmd = getcmd("credentials"); > break; > - > case 't': > - tflag++; > - xocontainer = "threads"; > + if (cmd != NULL) > + usage(); > + cmd = getcmd("threads"); > break; > - > case 'v': > - vflag++; > - xocontainer = "vm"; > + if (cmd != NULL) > + usage(); > + cmd = getcmd("vm"); > break; > - > case 'w': > l = strtol(optarg, &dummy, 10); > if (*dummy != '\0') > @@ -281,12 +358,11 @@ main(int argc, char *argv[]) > usage(); > interval = l; > break; > - > case 'x': > - xflag++; > - xocontainer = "auxv"; > + if (cmd != NULL) > + usage(); > + cmd = getcmd("auxv"); > break; > - > case '?': > default: > usage(); > @@ -296,24 +372,31 @@ main(int argc, char *argv[]) > argc -= optind; > argv += optind; > > - /* We require that either 0 or 1 mode flags be set. */ > - tmp = bflag + cflag + eflag + fflag + iflag + jflag + (kflag ? 1 : > 0) + > - lflag + rflag + sflag + tflag + vflag + xflag + Sflag; > - if (!(tmp == 0 || tmp == 1)) > - usage(); > + if (cmd == NULL && argv[0] != NULL && (cmd = getcmd(argv[0])) != > NULL) { > + if ((procstat_opts & PS_SUBCOMMAND_OPTS) != 0) > + usage(); > + if (cmd->opt != NULL) { > + optreset = 1; > + optind = 1; > + cmd->opt(argc, argv); > + argc -= optind; > + argv += optind; > + } else { > + argc -= 1; > + argv += 1; > + } > + } else { > + if (cmd == NULL) > + cmd = getcmd("basic"); > + if (cmd->cmd != procstat_files && > + (procstat_opts & PS_OPT_CAPABILITIES) != 0) > + usage(); > + } > > - /* We allow -k to be specified up to twice, but not more. */ > - if (kflag > 2) > - usage(); > - > /* Must specify either the -a flag or a list of pids. */ > if (!(aflag == 1 && argc == 0) && !(aflag == 0 && argc > 0)) > usage(); > > - /* Only allow -C with -f. */ > - if (Cflag && !fflag) > - usage(); > - > if (memf != NULL) > prstat = procstat_open_kvm(nlistf, memf); > else > @@ -323,7 +406,7 @@ main(int argc, char *argv[]) > do { > xo_set_version(PROCSTAT_XO_VERSION); > xo_open_container("procstat"); > - xo_open_container(xocontainer); > + xo_open_container(cmd->xocontainer); > > if (aflag) { > p = procstat_getprocs(prstat, KERN_PROC_PROC, 0, > &cnt); > @@ -331,10 +414,10 @@ main(int argc, char *argv[]) > xo_errx(1, "procstat_getprocs()"); > kinfo_proc_sort(p, cnt); > for (i = 0; i < cnt; i++) { > - procstat(prstat, &p[i]); > + procstat(cmd, prstat, &p[i]); > > /* Suppress header after first process. */ > - hflag = 1; > + procstat_opts |= PS_OPT_NOHEADER; > xo_flush(); > } > procstat_freeprocs(prstat, p); > @@ -351,7 +434,7 @@ main(int argc, char *argv[]) > if (p == NULL) > xo_errx(1, "procstat_getprocs()"); > if (cnt != 0) > - procstat(prstat, p); > + procstat(cmd, prstat, p); > procstat_freeprocs(prstat, p); > } else { > cprstat = procstat_open_core(argv[i]); > @@ -364,15 +447,15 @@ main(int argc, char *argv[]) > if (p == NULL) > xo_errx(1, "procstat_getprocs()"); > if (cnt != 0) > - procstat(cprstat, p); > + procstat(cmd, cprstat, p); > procstat_freeprocs(cprstat, p); > procstat_close(cprstat); > } > /* Suppress header after first process. */ > - hflag = 1; > + procstat_opts |= PS_OPT_NOHEADER; > } > > - xo_close_container(xocontainer); > + xo_close_container(cmd->xocontainer); > xo_close_container("procstat"); > xo_finish(); > if (interval) > @@ -382,4 +465,96 @@ main(int argc, char *argv[]) > procstat_close(prstat); > > exit(0); > +} > + > +void > +cmdopt_none(int argc, char * const argv[]) > +{ > + int ch; > + > + while ((ch = getopt(argc, argv, "")) != -1) { > + switch (ch) { > + case '?': > + default: > + usage(); > + } > + } > +} > + > +void > +cmdopt_verbose(int argc, char * const argv[]) > +{ > + int ch; > + > + while ((ch = getopt(argc, argv, "v")) != -1) { > + switch (ch) { > + case 'v': > + procstat_opts |= PS_OPT_VERBOSE; > + break; > + case '?': > + default: > + usage(); > + } > + } > +} > + > +void > +cmdopt_signals(int argc, char * const argv[]) > +{ > + int ch; > + > + while ((ch = getopt(argc, argv, "n")) != -1) { > + switch (ch) { > + case 'n': > + procstat_opts |= PS_OPT_SIGNUM; > + break; > + case '?': > + default: > + usage(); > + } > + } > +} > + > +void > +cmdopt_rusage(int argc, char * const argv[]) > +{ > + int ch; > + > + while ((ch = getopt(argc, argv, "Ht")) != -1) { > + switch (ch) { > + case 'H': > + /* FALLTHROUGH */ > + case 't': > + procstat_opts |= PS_OPT_PERTHREAD; > + break; > + case '?': > + default: > + usage(); > + } > + } > +} > + > +void > +cmdopt_files(int argc, char * const argv[]) > +{ > + int ch; > + > + while ((ch = getopt(argc, argv, "C")) != -1) { > + switch (ch) { > + case 'C': > + procstat_opts |= PS_OPT_CAPABILITIES; > + break; > + case '?': > + default: > + usage(); > + } > + } > +} > + > +void > +cmdopt_cpuset(int argc, char * const argv[]) > +{ > + > + procstat_opts |= PS_OPT_PERTHREAD; > + cmdopt_none(argc, argv); > } > > Modified: head/usr.bin/procstat/procstat.h > ============================================================ > ================== > --- head/usr.bin/procstat/procstat.h Sat Oct 14 17:51:25 2017 > (r324618) > +++ head/usr.bin/procstat/procstat.h Sat Oct 14 18:38:36 2017 > (r324619) > @@ -35,23 +35,34 @@ > > #define PROCSTAT_XO_VERSION "1" > > -extern int hflag, nflag, Cflag, Hflag; > +enum { > + PS_OPT_CAPABILITIES = 0x01, > + PS_OPT_NOHEADER = 0x02, > + PS_OPT_PERTHREAD = 0x04, > + PS_OPT_SIGNUM = 0x08, > + PS_OPT_VERBOSE = 0x10 > +}; > > +#define PS_SUBCOMMAND_OPTS \ > + (PS_OPT_CAPABILITIES | PS_OPT_SIGNUM | \ > + PS_OPT_PERTHREAD | PS_OPT_VERBOSE) > + > +extern int procstat_opts; > + > struct kinfo_proc; > void kinfo_proc_sort(struct kinfo_proc *kipp, int count); > const char * kinfo_proc_thread_name(const struct kinfo_proc *kipp); > > void procstat_args(struct procstat *prstat, struct kinfo_proc *kipp); > void procstat_auxv(struct procstat *prstat, struct kinfo_proc *kipp); > -void procstat_basic(struct kinfo_proc *kipp); > +void procstat_basic(struct procstat *prstat, struct kinfo_proc *kipp); > void procstat_bin(struct procstat *prstat, struct kinfo_proc *kipp); > void procstat_cred(struct procstat *prstat, struct kinfo_proc *kipp); > void procstat_cs(struct procstat *prstat, struct kinfo_proc *kipp); > void procstat_env(struct procstat *prstat, struct kinfo_proc *kipp); > void procstat_files(struct procstat *prstat, struct kinfo_proc *kipp); > -void procstat_kstack(struct procstat *prstat, struct kinfo_proc *kipp, > - int kflag); > -void procstat_ptlwpinfo(struct procstat *prstat); > +void procstat_kstack(struct procstat *prstat, struct kinfo_proc *kipp); > +void procstat_ptlwpinfo(struct procstat *prstat, struct kinfo_proc > *kipp); > void procstat_rlimit(struct procstat *prstat, struct kinfo_proc *kipp); > void procstat_rusage(struct procstat *prstat, struct kinfo_proc *kipp); > void procstat_sigs(struct procstat *prstat, struct kinfo_proc *kipp); > > Modified: head/usr.bin/procstat/procstat_args.c > ============================================================ > ================== > --- head/usr.bin/procstat/procstat_args.c Sat Oct 14 17:51:25 2017 > (r324618) > +++ head/usr.bin/procstat/procstat_args.c Sat Oct 14 18:38:36 2017 > (r324619) > @@ -47,7 +47,7 @@ procstat_args(struct procstat *procstat, struct kinfo_ > int i; > char **args; > > - if (!hflag) { > + if ((procstat_opts & PS_OPT_NOHEADER) == 0) { > xo_emit("{T:/%5s %-16s %-53s}\n", "PID", "COMM", "ARGS"); > } > > @@ -74,7 +74,7 @@ procstat_env(struct procstat *procstat, struct kinfo_p > int i; > char **envs; > > - if (!hflag) { > + if ((procstat_opts & PS_OPT_NOHEADER) == 0) { > xo_emit("{T:/%5s %-16s %-53s}\n", "PID", "COMM", > "ENVIRONMENT"); > } > > > Modified: head/usr.bin/procstat/procstat_auxv.c > ============================================================ > ================== > --- head/usr.bin/procstat/procstat_auxv.c Sat Oct 14 17:51:25 2017 > (r324618) > +++ head/usr.bin/procstat/procstat_auxv.c Sat Oct 14 18:38:36 2017 > (r324619) > @@ -51,7 +51,7 @@ procstat_auxv(struct procstat *procstat, struct kinfo_ > u_int count, i; > static char prefix[256]; > > - if (!hflag) > + if ((procstat_opts & PS_OPT_NOHEADER) == 0) > xo_emit("{T:/%5s %-16s %-16s %-16s}\n", "PID", "COMM", > "AUXV", > "VALUE"); > > > Modified: head/usr.bin/procstat/procstat_basic.c > ============================================================ > ================== > --- head/usr.bin/procstat/procstat_basic.c Sat Oct 14 17:51:25 2017 > (r324618) > +++ head/usr.bin/procstat/procstat_basic.c Sat Oct 14 18:38:36 2017 > (r324619) > @@ -39,10 +39,10 @@ > #include "procstat.h" > > void > -procstat_basic(struct kinfo_proc *kipp) > +procstat_basic(struct procstat *procstat __unused, struct kinfo_proc > *kipp) > { > > - if (!hflag) > + if ((procstat_opts & PS_OPT_NOHEADER) == 0) > xo_emit("{T:/%5s %5s %5s %5s %5s %3s %-8s %-9s %-13s > %-12s}\n", > "PID", "PPID", "PGID", "SID", "TSID", "THR", "LOGIN", > "WCHAN", "EMUL", "COMM"); > > Modified: head/usr.bin/procstat/procstat_bin.c > ============================================================ > ================== > --- head/usr.bin/procstat/procstat_bin.c Sat Oct 14 17:51:25 2017 > (r324618) > +++ head/usr.bin/procstat/procstat_bin.c Sat Oct 14 18:38:36 2017 > (r324619) > @@ -46,7 +46,7 @@ procstat_bin(struct procstat *prstat, struct kinfo_pro > int osrel; > static char pathname[PATH_MAX]; > > - if (!hflag) > + if ((procstat_opts & PS_OPT_NOHEADER) == 0) > xo_emit("{T:/%5s %-16s %8s %s}\n", "PID", "COMM", "OSREL", > "PATH"); > > > Modified: head/usr.bin/procstat/procstat_cred.c > ============================================================ > ================== > --- head/usr.bin/procstat/procstat_cred.c Sat Oct 14 17:51:25 2017 > (r324618) > +++ head/usr.bin/procstat/procstat_cred.c Sat Oct 14 18:38:36 2017 > (r324619) > @@ -48,7 +48,7 @@ procstat_cred(struct procstat *procstat, struct kinfo_ > unsigned int i, ngroups; > gid_t *groups; > > - if (!hflag) > + if ((procstat_opts & PS_OPT_NOHEADER) == 0) > xo_emit("{T:/%5s %-16s %5s %5s %5s %5s %5s %5s %5s %5s > %-15s}\n", > "PID", "COMM", "EUID", "RUID", "SVUID", "EGID", "RGID", > "SVGID", "UMASK", "FLAGS", "GROUPS"); > > Modified: head/usr.bin/procstat/procstat_cs.c > ============================================================ > ================== > --- head/usr.bin/procstat/procstat_cs.c Sat Oct 14 17:51:25 2017 > (r324618) > +++ head/usr.bin/procstat/procstat_cs.c Sat Oct 14 18:38:36 2017 > (r324619) > @@ -52,7 +52,7 @@ procstat_cs(struct procstat *procstat, struct kinfo_pr > unsigned int count, i; > int once, twice, lastcpu, cpu; > > - if (!hflag) > + if ((procstat_opts & PS_OPT_NOHEADER) == 0) > xo_emit("{T:/%5s %6s %-19s %-19s %2s %4s %-7s}\n", "PID", > "TID", "COMM", "TDNAME", "CPU", "CSID", "CPU MASK"); > > > Modified: head/usr.bin/procstat/procstat_files.c > ============================================================ > ================== > --- head/usr.bin/procstat/procstat_files.c Sat Oct 14 17:51:25 2017 > (r324618) > +++ head/usr.bin/procstat/procstat_files.c Sat Oct 14 18:38:36 2017 > (r324619) > @@ -303,7 +303,8 @@ procstat_files(struct procstat *procstat, struct kinfo > */ > capwidth = 0; > head = procstat_getfiles(procstat, kipp, 0); > - if (head != NULL && Cflag) { > + if (head != NULL && > + (procstat_opts & PS_OPT_CAPABILITIES) != 0) { > STAILQ_FOREACH(fst, head, next) { > width = width_capability(&fst->fs_cap_rights); > if (width > capwidth) > @@ -313,8 +314,8 @@ procstat_files(struct procstat *procstat, struct kinfo > capwidth = strlen("CAPABILITIES"); > } > > - if (!hflag) { > - if (Cflag) > + if ((procstat_opts & PS_OPT_NOHEADER) == 0) { > + if ((procstat_opts & PS_OPT_CAPABILITIES) != 0) > xo_emit("{T:/%5s %-16s %5s %1s %-8s %-*s " > "%-3s %-12s}\n", "PID", "COMM", "FD", "T", > "FLAGS", capwidth, "CAPABILITIES", "PRO", > @@ -417,7 +418,7 @@ procstat_files(struct procstat *procstat, struct kinfo > break; > } > xo_emit("{d:fd_type/%1s/%s} ", str); > - if (!Cflag) { > + if ((procstat_opts & PS_OPT_CAPABILITIES) == 0) { > str = "-"; > if (fst->fs_type == PS_FST_TYPE_VNODE) { > error = procstat_get_vnode_info(procstat, > fst, > @@ -514,7 +515,7 @@ procstat_files(struct procstat *procstat, struct kinfo > xo_emit("{elq:fd_flags/lock_held}"); > xo_close_list("fd_flags"); > > - if (!Cflag) { > + if ((procstat_opts & PS_OPT_CAPABILITIES) == 0) { > if (fst->fs_ref_count > -1) > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org > " > From owner-svn-src-head@freebsd.org Tue Nov 14 00:29:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25538C08170; Tue, 14 Nov 2017 00:29:16 +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 C0F1E63CE6; Tue, 14 Nov 2017 00:29:15 +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 vAE0TEFt024996; Tue, 14 Nov 2017 00:29:14 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAE0TEVO024994; Tue, 14 Nov 2017 00:29:14 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201711140029.vAE0TEVO024994@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 14 Nov 2017 00:29:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325785 - in head: sys/kern tools/tools/sysdoc X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: sys/kern tools/tools/sysdoc X-SVN-Commit-Revision: 325785 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 00:29:16 -0000 Author: imp Date: Tue Nov 14 00:29:14 2017 New Revision: 325785 URL: https://svnweb.freebsd.org/changeset/base/325785 Log: Add two new tunables / sysctls to controll reboot after panic: kern.poweroff_on_panic which, when enabled, instructs a system to power off on a panic instead of a reboot. kern.powercyle_on_panic which, when enabled, instructs a system to power cycle, if possible, on a panic instead of a reboot. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D13042 Modified: head/sys/kern/kern_shutdown.c head/tools/tools/sysdoc/tunables.mdoc Modified: head/sys/kern/kern_shutdown.c ============================================================================== --- head/sys/kern/kern_shutdown.c Mon Nov 13 23:33:07 2017 (r325784) +++ head/sys/kern/kern_shutdown.c Tue Nov 14 00:29:14 2017 (r325785) @@ -134,6 +134,14 @@ static int sync_on_panic = 0; SYSCTL_INT(_kern, OID_AUTO, sync_on_panic, CTLFLAG_RWTUN, &sync_on_panic, 0, "Do a sync before rebooting from a panic"); +static bool poweroff_on_panic = 0; +SYSCTL_BOOL(_kern, OID_AUTO, poweroff_on_panic, CTLFLAG_RWTUN, + &poweroff_on_panic, 0, "Do a power off instead of a reboot on a panic"); + +static bool powercycle_on_panic = 0; +SYSCTL_BOOL(_kern, OID_AUTO, powercycle_on_panic, CTLFLAG_RWTUN, + &powercycle_on_panic, 0, "Do a power cycle instead of a reboot on a panic"); + static SYSCTL_NODE(_kern, OID_AUTO, shutdown, CTLFLAG_RW, 0, "Shutdown environment"); @@ -797,6 +805,10 @@ vpanic(const char *fmt, va_list ap) /* thread_unlock(td); */ if (!sync_on_panic) bootopt |= RB_NOSYNC; + if (poweroff_on_panic) + bootopt |= RB_POWEROFF; + if (powercycle_on_panic) + bootopt |= RB_POWERCYCLE; kern_reboot(bootopt); } Modified: head/tools/tools/sysdoc/tunables.mdoc ============================================================================== --- head/tools/tools/sysdoc/tunables.mdoc Mon Nov 13 23:33:07 2017 (r325784) +++ head/tools/tools/sysdoc/tunables.mdoc Tue Nov 14 00:29:14 2017 (r325785) @@ -1035,6 +1035,20 @@ is attempting to comply with. This is a read-only variable. --- +kern.powercycle_on_panic +bool + +In the event of a panic, this variable controls whether or not the +system should try to power cycle instead of rebooting. + +--- +kern.poweroff_on_panic +bool + +In the event of a panic, this variable controls whether or not the +system should try to power off instead of rebooting. + +--- kern.proc.all --- From owner-svn-src-head@freebsd.org Tue Nov 14 01:48:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA0F8C7C65B; Tue, 14 Nov 2017 01:48:25 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B4F846705C; Tue, 14 Nov 2017 01:48:25 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAE1mOcH057969; Tue, 14 Nov 2017 01:48:24 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAE1mOq6057968; Tue, 14 Nov 2017 01:48:24 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201711140148.vAE1mOq6057968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Tue, 14 Nov 2017 01:48:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325786 - head/etc X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: head/etc X-SVN-Commit-Revision: 325786 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 01:48:26 -0000 Author: brd (doc,ports committer) Date: Tue Nov 14 01:48:24 2017 New Revision: 325786 URL: https://svnweb.freebsd.org/changeset/base/325786 Log: Remove an unused variable. Approved by: bdrewery Modified: head/etc/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Tue Nov 14 00:29:14 2017 (r325785) +++ head/etc/Makefile Tue Nov 14 01:48:24 2017 (r325786) @@ -152,8 +152,6 @@ BIN1+= regdomain.xml # -rwxr-xr-x root:wheel, for the new cron root:wheel BIN2= netstart pccard_ether rc.suspend rc.resume -PPPCNF= ppp.conf - .if ${MK_SENDMAIL} == "no" ETCMAIL=mailer.conf aliases .else From owner-svn-src-head@freebsd.org Tue Nov 14 01:57:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18884C7D3B9; Tue, 14 Nov 2017 01:57:56 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6A1967A7D; Tue, 14 Nov 2017 01:57:55 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAE1vs0P062268; Tue, 14 Nov 2017 01:57:54 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAE1vscF062266; Tue, 14 Nov 2017 01:57:54 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201711140157.vAE1vscF062266@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Tue, 14 Nov 2017 01:57:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325787 - in head/sys/dev/usb: net quirk X-SVN-Group: head X-SVN-Commit-Author: kevlo X-SVN-Commit-Paths: in head/sys/dev/usb: net quirk X-SVN-Commit-Revision: 325787 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 01:57:56 -0000 Author: kevlo Date: Tue Nov 14 01:57:54 2017 New Revision: 325787 URL: https://svnweb.freebsd.org/changeset/base/325787 Log: Add TP-LINK UE300. Submitted by: Kris G Modified: head/sys/dev/usb/net/if_ure.c head/sys/dev/usb/quirk/usb_quirk.c Modified: head/sys/dev/usb/net/if_ure.c ============================================================================== --- head/sys/dev/usb/net/if_ure.c Tue Nov 14 01:48:24 2017 (r325786) +++ head/sys/dev/usb/net/if_ure.c Tue Nov 14 01:57:54 2017 (r325787) @@ -70,6 +70,7 @@ static const STRUCT_USB_HOST_ID ure_devs[] = { URE_DEV(LENOVO, RTL8153, 0), URE_DEV(REALTEK, RTL8152, URE_FLAG_8152), URE_DEV(REALTEK, RTL8153, 0), + URE_DEV(TPLINK, RTL8153, 0), #undef URE_DEV }; Modified: head/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- head/sys/dev/usb/quirk/usb_quirk.c Tue Nov 14 01:48:24 2017 (r325786) +++ head/sys/dev/usb/quirk/usb_quirk.c Tue Nov 14 01:57:54 2017 (r325787) @@ -95,7 +95,6 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRK USB_QUIRK(SILICONPORTALS, YAPPHONE, 0x100, 0x100, UQ_AU_INP_ASYNC), USB_QUIRK(LOGITECH, UN53B, 0x0000, 0xffff, UQ_NO_STRINGS), USB_QUIRK(REALTEK, RTL8196EU, 0x0000, 0xffff, UQ_CFG_INDEX_1), - USB_QUIRK(TPLINK, RTL8153, 0x0000, 0xffff, UQ_CFG_INDEX_1), USB_QUIRK(ELSA, MODEM1, 0x0000, 0xffff, UQ_CFG_INDEX_1), USB_QUIRK(PLANEX2, MZKUE150N, 0x0000, 0xffff, UQ_CFG_INDEX_1), USB_QUIRK(CISCOLINKSYS, USB3GIGV1, 0x0000, 0xffff, UQ_CFG_INDEX_1), From owner-svn-src-head@freebsd.org Tue Nov 14 02:30:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF5AFC7FCC8; Tue, 14 Nov 2017 02:30:22 +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 A16A66949F; Tue, 14 Nov 2017 02:30:22 +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 vAE2ULCx074975; Tue, 14 Nov 2017 02:30:21 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAE2ULo0074974; Tue, 14 Nov 2017 02:30:21 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201711140230.vAE2ULo0074974@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 14 Nov 2017 02:30:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325788 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 325788 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 02:30:23 -0000 Author: tuexen Date: Tue Nov 14 02:30:21 2017 New Revision: 325788 URL: https://svnweb.freebsd.org/changeset/base/325788 Log: Simply the code and use the full buffer for contigous chunk representation. 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 Nov 14 01:57:54 2017 (r325787) +++ head/sys/netinet/sctp_input.c Tue Nov 14 02:30:21 2017 (r325788) @@ -4524,7 +4524,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int * char msg[SCTP_DIAG_INFO_LEN]; uint32_t vtag_in; int num_chunks = 0; /* number of control chunks processed */ - uint32_t chk_length; + uint32_t chk_length, contiguous; int ret; int abort_no_unlock = 0; int ecne_seen = 0; @@ -4750,58 +4750,30 @@ process_control_chunks: } SCTP_STAT_INCR_COUNTER64(sctps_incontrolchunks); /* - * INIT-ACK only gets the init ack "header" portion only - * because we don't have to process the peer's COOKIE. All - * others get a complete chunk. + * INIT and INIT-ACK only gets the init ack "header" portion + * only because we don't have to process the peer's COOKIE. + * All others get a complete chunk. */ - if ((ch->chunk_type == SCTP_INITIATION_ACK) || - (ch->chunk_type == SCTP_INITIATION)) { - /* get an init-ack chunk */ - ch = (struct sctp_chunkhdr *)sctp_m_getptr(m, *offset, - sizeof(struct sctp_init_ack_chunk), chunk_buf); - if (ch == NULL) { - *offset = length; - if (stcb != NULL) { - SCTP_TCB_UNLOCK(stcb); - } - return (NULL); + switch (ch->chunk_type) { + case SCTP_INITIATION: + contiguous = sizeof(struct sctp_init_chunk); + break; + case SCTP_INITIATION_ACK: + contiguous = sizeof(struct sctp_init_ack_chunk); + break; + default: + contiguous = min(chk_length, sizeof(chunk_buf)); + break; + } + ch = (struct sctp_chunkhdr *)sctp_m_getptr(m, *offset, + contiguous, + chunk_buf); + if (ch == NULL) { + *offset = length; + if (stcb != NULL) { + SCTP_TCB_UNLOCK(stcb); } - } else { - /* For cookies and all other chunks. */ - if (chk_length > sizeof(chunk_buf)) { - /* - * use just the size of the chunk buffer so - * the front part of our chunks fit in - * contiguous space up to the chunk buffer - * size (508 bytes). For chunks that need to - * get more than that they must use the - * sctp_m_getptr() function or other means - * (e.g. know how to parse mbuf chains). - * Cookies do this already. - */ - ch = (struct sctp_chunkhdr *)sctp_m_getptr(m, *offset, - (sizeof(chunk_buf) - 4), - chunk_buf); - if (ch == NULL) { - *offset = length; - if (stcb != NULL) { - SCTP_TCB_UNLOCK(stcb); - } - return (NULL); - } - } else { - /* We can fit it all */ - ch = (struct sctp_chunkhdr *)sctp_m_getptr(m, *offset, - chk_length, chunk_buf); - if (ch == NULL) { - SCTP_PRINTF("sctp_process_control: Can't get the all data....\n"); - *offset = length; - if (stcb != NULL) { - SCTP_TCB_UNLOCK(stcb); - } - return (NULL); - } - } + return (NULL); } num_chunks++; /* Save off the last place we got a control from */ @@ -5410,7 +5382,7 @@ process_control_chunks: } sctp_handle_packet_dropped((struct sctp_pktdrop_chunk *)ch, stcb, *netp, - min(chk_length, (sizeof(chunk_buf) - 4))); + min(chk_length, contiguous)); } break; case SCTP_AUTHENTICATION: From owner-svn-src-head@freebsd.org Tue Nov 14 03:21:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C15CCFD0B9; Tue, 14 Nov 2017 03:21:41 +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 25A956B9F0; Tue, 14 Nov 2017 03:21:40 +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 vAE3LeIt096983; Tue, 14 Nov 2017 03:21:40 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAE3Ld28096981; Tue, 14 Nov 2017 03:21:39 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201711140321.vAE3Ld28096981@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 14 Nov 2017 03:21:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325789 - head/sys/contrib/octeon-sdk X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/contrib/octeon-sdk X-SVN-Commit-Revision: 325789 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 03:21:41 -0000 Author: jhibbits Date: Tue Nov 14 03:21:39 2017 New Revision: 325789 URL: https://svnweb.freebsd.org/changeset/base/325789 Log: Use the correct board name for the Ubiquiti Unifi Security Gateway Modified: head/sys/contrib/octeon-sdk/cvmx-app-init.h head/sys/contrib/octeon-sdk/cvmx-helper-board.c Modified: head/sys/contrib/octeon-sdk/cvmx-app-init.h ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-app-init.h Tue Nov 14 02:30:21 2017 (r325788) +++ head/sys/contrib/octeon-sdk/cvmx-app-init.h Tue Nov 14 03:21:39 2017 (r325789) @@ -311,7 +311,7 @@ enum cvmx_board_types_enum { #endif #if defined(OCTEON_VENDOR_UBIQUITI) CVMX_BOARD_TYPE_CUST_UBIQUITI_E100=20002, - CVMX_BOARD_TYPE_CUST_UBIQUITI_USG= 20004, + CVMX_BOARD_TYPE_CUST_UBIQUITI_E110= 20004, #endif #if defined(OCTEON_VENDOR_RADISYS) CVMX_BOARD_TYPE_CUST_RADISYS_RSYS4GBE=20002, @@ -458,7 +458,7 @@ static inline const char *cvmx_board_type_to_string(en #endif #if defined(OCTEON_VENDOR_UBIQUITI) ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_UBIQUITI_E100) - ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_UBIQUITI_USG) + ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_UBIQUITI_E110) #endif #if defined(OCTEON_VENDOR_RADISYS) ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_RADISYS_RSYS4GBE) Modified: head/sys/contrib/octeon-sdk/cvmx-helper-board.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-helper-board.c Tue Nov 14 02:30:21 2017 (r325788) +++ head/sys/contrib/octeon-sdk/cvmx-helper-board.c Tue Nov 14 03:21:39 2017 (r325789) @@ -598,7 +598,7 @@ int cvmx_helper_board_get_mii_address(int ipd_port) #endif #if defined(OCTEON_VENDOR_UBIQUITI) case CVMX_BOARD_TYPE_CUST_UBIQUITI_E100: - case CVMX_BOARD_TYPE_CUST_UBIQUITI_USG: + case CVMX_BOARD_TYPE_CUST_UBIQUITI_E110: if (ipd_port > 2) return -1; return (7 - ipd_port); @@ -1501,7 +1501,7 @@ int __cvmx_helper_board_hardware_enable(int interface) } #if defined(OCTEON_VENDOR_UBIQUITI) else if (cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_CUST_UBIQUITI_E100 || - cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_CUST_UBIQUITI_USG) + cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_CUST_UBIQUITI_E110) { /* Configure ASX cloks for all ports on interface 0. */ if (interface == 0) @@ -1592,7 +1592,7 @@ cvmx_helper_board_usb_clock_types_t __cvmx_helper_boar #endif #if defined(OCTEON_VENDOR_UBIQUITI) case CVMX_BOARD_TYPE_CUST_UBIQUITI_E100: - case CVMX_BOARD_TYPE_CUST_UBIQUITI_USG: + case CVMX_BOARD_TYPE_CUST_UBIQUITI_E110: #endif #if defined(OCTEON_BOARD_CAPK_0100ND) case CVMX_BOARD_TYPE_CN3010_EVB_HS5: From owner-svn-src-head@freebsd.org Tue Nov 14 03:23:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9660CFD36D; Tue, 14 Nov 2017 03:23:47 +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 842A96BC4D; Tue, 14 Nov 2017 03:23:47 +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 vAE3NkYY000249; Tue, 14 Nov 2017 03:23:46 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAE3NkCP000248; Tue, 14 Nov 2017 03:23:46 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201711140323.vAE3NkCP000248@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 14 Nov 2017 03:23:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325790 - head/sys/mips/beri X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/mips/beri X-SVN-Commit-Revision: 325790 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 03:23:48 -0000 Author: jhibbits Date: Tue Nov 14 03:23:46 2017 New Revision: 325790 URL: https://svnweb.freebsd.org/changeset/base/325790 Log: Convert BERI to use ofw_parse_bootargs() Summary: ofw_parse_bootargs() was added in r306065 as an attempt to unify the various copies of the same code. This simply migrates BERI to use it. Reviewed By: brooks Differential Revision: https://reviews.freebsd.org/D12962 Modified: head/sys/mips/beri/beri_machdep.c Modified: head/sys/mips/beri/beri_machdep.c ============================================================================== --- head/sys/mips/beri/beri_machdep.c Tue Nov 14 03:21:39 2017 (r325789) +++ head/sys/mips/beri/beri_machdep.c Tue Nov 14 03:23:46 2017 (r325790) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #ifdef FDT #include #include +#include #endif #include @@ -161,46 +162,6 @@ platform_reset(void) __asm__ __volatile("wait"); } -#ifdef FDT -/* Parse cmd line args as env - copied from xlp_machdep. */ -/* XXX-BZ this should really be centrally provided for all (boot) code. */ -static void -_parse_bootargs(char *cmdline) -{ - char *n, *v; - - while ((v = strsep(&cmdline, " \n")) != NULL) { - if (*v == '\0') - continue; - if (*v == '-') { - while (*v != '\0') { - v++; - switch (*v) { - case 'a': boothowto |= RB_ASKNAME; break; - /* Someone should simulate that ;-) */ - case 'C': boothowto |= RB_CDROM; break; - case 'd': boothowto |= RB_KDB; break; - case 'D': boothowto |= RB_MULTIPLE; break; - case 'm': boothowto |= RB_MUTE; break; - case 'g': boothowto |= RB_GDB; break; - case 'h': boothowto |= RB_SERIAL; break; - case 'p': boothowto |= RB_PAUSE; break; - case 'r': boothowto |= RB_DFLTROOT; break; - case 's': boothowto |= RB_SINGLE; break; - case 'v': boothowto |= RB_VERBOSE; break; - } - } - } else { - n = strsep(&v, "="); - if (v == NULL) - kern_setenv(n, "1"); - else - kern_setenv(n, v); - } - } -} -#endif - void platform_start(__register_t a0, __register_t a1, __register_t a2, __register_t a3) @@ -279,9 +240,7 @@ platform_start(__register_t a0, __register_t a1, __re /* * Get bootargs from FDT if specified. */ - chosen = OF_finddevice("/chosen"); - if (OF_getprop(chosen, "bootargs", buf, sizeof(buf)) != -1) - _parse_bootargs(buf); + ofw_parse_bootargs(); #endif /* From owner-svn-src-head@freebsd.org Tue Nov 14 03:53:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42626CFE25C; Tue, 14 Nov 2017 03:53:16 +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 190D76CC90; Tue, 14 Nov 2017 03:53:16 +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 vAE3rFpw012726; Tue, 14 Nov 2017 03:53:15 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAE3rF8g012725; Tue, 14 Nov 2017 03:53:15 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201711140353.vAE3rF8g012725@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 14 Nov 2017 03:53:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325791 - head/sys/powerpc/mpc85xx X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/mpc85xx X-SVN-Commit-Revision: 325791 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 03:53:16 -0000 Author: jhibbits Date: Tue Nov 14 03:53:15 2017 New Revision: 325791 URL: https://svnweb.freebsd.org/changeset/base/325791 Log: Expand the Freescale PCIe root complex driver with the ofw_pcib_pci The interrupt map wasn't being allocated properly, preventing IRQs from being allocated to children of the PCIe bus. Fix this by cloning the ofw_pcib_pci code, which handles all cases -- device tree and probed. In the future this may become a subclass of the ofw_pcib_pci driver, but as that's not an exported class, it's cloned for now. MFC after: 3 weeks Modified: head/sys/powerpc/mpc85xx/pci_mpc85xx_pcib.c Modified: head/sys/powerpc/mpc85xx/pci_mpc85xx_pcib.c ============================================================================== --- head/sys/powerpc/mpc85xx/pci_mpc85xx_pcib.c Tue Nov 14 03:23:46 2017 (r325790) +++ head/sys/powerpc/mpc85xx/pci_mpc85xx_pcib.c Tue Nov 14 03:53:15 2017 (r325791) @@ -50,12 +50,30 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include +#include +#include + #include #include #include +#include + #include "pcib_if.h" +struct fsl_pcib_softc { + /* + * This is here so that we can use pci bridge methods, too - the + * generic routines only need the dev, secbus and subbus members + * filled. + */ + struct pcib_softc ops_pcib_sc; + phandle_t ops_node; + struct ofw_bus_iinfo ops_iinfo; +}; + static int fsl_pcib_rc_probe(device_t dev) { @@ -72,13 +90,89 @@ fsl_pcib_rc_probe(device_t dev) return (BUS_PROBE_DEFAULT); } +static int +fsl_pcib_rc_attach(device_t dev) +{ + struct fsl_pcib_softc *sc; + + sc = device_get_softc(dev); + sc->ops_pcib_sc.dev = dev; + sc->ops_node = ofw_bus_get_node(dev); + + ofw_bus_setup_iinfo(sc->ops_node, &sc->ops_iinfo, + sizeof(cell_t)); + + pcib_attach_common(dev); + return (pcib_attach_child(dev)); +} + +static phandle_t +fsl_pcib_rc_get_node(device_t bridge, device_t dev) +{ + /* We have only one child, the PCI bus, so pass it our node */ + + return (ofw_bus_get_node(bridge)); +} + +static int +fsl_pcib_rc_route_interrupt(device_t bridge, device_t dev, int intpin) +{ + struct fsl_pcib_softc *sc; + struct ofw_bus_iinfo *ii; + struct ofw_pci_register reg; + cell_t pintr, mintr[2]; + int intrcells; + phandle_t iparent; + + sc = device_get_softc(bridge); + ii = &sc->ops_iinfo; + if (ii->opi_imapsz > 0) { + pintr = intpin; + + /* Fabricate imap information if this isn't an OFW device */ + bzero(®, sizeof(reg)); + reg.phys_hi = (pci_get_bus(dev) << OFW_PCI_PHYS_HI_BUSSHIFT) | + (pci_get_slot(dev) << OFW_PCI_PHYS_HI_DEVICESHIFT) | + (pci_get_function(dev) << OFW_PCI_PHYS_HI_FUNCTIONSHIFT); + + intrcells = ofw_bus_lookup_imap(ofw_bus_get_node(dev), ii, ®, + sizeof(reg), &pintr, sizeof(pintr), mintr, sizeof(mintr), + &iparent); + if (intrcells) { + /* + * If we've found a mapping, return it and don't map + * it again on higher levels - that causes problems + * in some cases, and never seems to be required. + */ + mintr[0] = ofw_bus_map_intr(dev, iparent, intrcells, + mintr); + return (mintr[0]); + } + } else if (intpin >= 1 && intpin <= 4) { + /* + * When an interrupt map is missing, we need to do the + * standard PCI swizzle and continue mapping at the parent. + */ + return (pcib_route_interrupt(bridge, dev, intpin)); + } + return (PCIB_ROUTE_INTERRUPT(device_get_parent(device_get_parent( + bridge)), bridge, intpin)); +} + static device_method_t fsl_pcib_rc_methods[] = { DEVMETHOD(device_probe, fsl_pcib_rc_probe), + DEVMETHOD(device_attach, fsl_pcib_rc_attach), + + /* pcib interface */ + DEVMETHOD(pcib_route_interrupt, fsl_pcib_rc_route_interrupt), + DEVMETHOD(pcib_request_feature, pcib_request_feature_allow), + + /* ofw_bus interface */ + DEVMETHOD(ofw_bus_get_node, fsl_pcib_rc_get_node), DEVMETHOD_END }; static devclass_t fsl_pcib_rc_devclass; DEFINE_CLASS_1(pcib, fsl_pcib_rc_driver, fsl_pcib_rc_methods, - sizeof(struct pcib_softc), pcib_driver); + sizeof(struct fsl_pcib_softc), pcib_driver); DRIVER_MODULE(rcpcib, pci, fsl_pcib_rc_driver, fsl_pcib_rc_devclass, 0, 0); - From owner-svn-src-head@freebsd.org Tue Nov 14 05:03:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9235D1F2A0; Tue, 14 Nov 2017 05:03:39 +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 84ADF6ECA0; Tue, 14 Nov 2017 05:03:39 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAE53cvK042459; Tue, 14 Nov 2017 05:03:38 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAE53cvm042457; Tue, 14 Nov 2017 05:03:38 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201711140503.vAE53cvm042457@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 14 Nov 2017 05:03:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325792 - in head: contrib/zstd lib/libzstd sys/contrib/zstd usr.bin/zstd X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: contrib/zstd lib/libzstd sys/contrib/zstd usr.bin/zstd X-SVN-Commit-Revision: 325792 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 05:03:39 -0000 Author: imp Date: Tue Nov 14 05:03:38 2017 New Revision: 325792 URL: https://svnweb.freebsd.org/changeset/base/325792 Log: Move zstd from contrib to sys/contrib so it can be used in the kernel. Adjust the Makefiles that referenced it to the new path. Sponsored by: Netflix OK'd by: cem@ and AllanJude@ Added: head/sys/contrib/zstd/ - copied from r325791, head/contrib/zstd/ Deleted: head/contrib/zstd/ Modified: head/lib/libzstd/Makefile head/usr.bin/zstd/Makefile Modified: head/lib/libzstd/Makefile ============================================================================== --- head/lib/libzstd/Makefile Tue Nov 14 03:53:15 2017 (r325791) +++ head/lib/libzstd/Makefile Tue Nov 14 05:03:38 2017 (r325792) @@ -33,7 +33,7 @@ LIBADD= pthread PRIVATELIB= yes -ZSTDDIR= ${SRCTOP}/contrib/zstd +ZSTDDIR= ${SRCTOP}/sys/contrib/zstd .PATH: ${ZSTDDIR}/lib/common ${ZSTDDIR}/lib/compress \ ${ZSTDDIR}/lib/decompress ${ZSTDDIR}/lib/deprecated \ ${ZSTDDIR}/lib/dictBuilder ${ZSTDDIR}/lib Modified: head/usr.bin/zstd/Makefile ============================================================================== --- head/usr.bin/zstd/Makefile Tue Nov 14 03:53:15 2017 (r325791) +++ head/usr.bin/zstd/Makefile Tue Nov 14 05:03:38 2017 (r325792) @@ -7,11 +7,11 @@ SRCS= bench.c \ fileio.c \ zstdcli.c -CFLAGS+= -I${SRCTOP}/contrib/zstd/programs \ - -I${SRCTOP}/contrib/zstd/lib/common \ - -I${SRCTOP}/contrib/zstd/lib/compress \ - -I${SRCTOP}/contrib/zstd/lib/dictBuilder \ - -I${SRCTOP}/contrib/zstd/lib \ +CFLAGS+= -I${SRCTOP}/sys/contrib/zstd/programs \ + -I${SRCTOP}/sys/contrib/zstd/lib/common \ + -I${SRCTOP}/sys/contrib/zstd/lib/compress \ + -I${SRCTOP}/sys/contrib/zstd/lib/dictBuilder \ + -I${SRCTOP}/sys/contrib/zstd/lib \ -DXXH_NAMESPACE=ZSTD_ \ -DHAVE_THREAD=1 \ -DZSTD_MULTITHREAD=1 @@ -25,6 +25,6 @@ MLINKS= zstd.1 unzstd.1 \ WARNS= 2 LIBADD= zstd -.PATH: ${SRCTOP}/contrib/zstd/programs +.PATH: ${SRCTOP}/sys/contrib/zstd/programs .include From owner-svn-src-head@freebsd.org Tue Nov 14 05:05:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AAD9DD1F354; Tue, 14 Nov 2017 05:05:06 +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 77FC46EE0A; Tue, 14 Nov 2017 05:05:06 +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 vAE555Db042555; Tue, 14 Nov 2017 05:05:05 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAE555QF042553; Tue, 14 Nov 2017 05:05:05 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201711140505.vAE555QF042553@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 14 Nov 2017 05:05:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325793 - head/sys/dev/pci X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/pci X-SVN-Commit-Revision: 325793 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 05:05:06 -0000 Author: imp Date: Tue Nov 14 05:05:05 2017 New Revision: 325793 URL: https://svnweb.freebsd.org/changeset/base/325793 Log: Provide pcie_link_status and pcie_link_cap convenience functions. Sponsored by: Netflix Modified: head/sys/dev/pci/pci.c head/sys/dev/pci/pcivar.h Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Tue Nov 14 05:03:38 2017 (r325792) +++ head/sys/dev/pci/pci.c Tue Nov 14 05:05:05 2017 (r325793) @@ -6115,3 +6115,31 @@ pcie_flr(device_t dev, u_int max_delay, bool force) pci_printf(&dinfo->cfg, "Transactions pending after FLR!\n"); return (true); } + +uint16_t +pcie_link_status(device_t dev) +{ + struct pci_devinfo *dinfo; + struct pcicfg_pcie *cfg; + int pos; + + dinfo = device_get_ivars(dev); + cfg = &dinfo->cfg.pcie; + pos = cfg->pcie_location; + + return pci_read_config(dev, pos + PCIER_LINK_STA, 2); +} + +uint16_t +pcie_link_caps(device_t dev) +{ + struct pci_devinfo *dinfo; + struct pcicfg_pcie *cfg; + int pos; + + dinfo = device_get_ivars(dev); + cfg = &dinfo->cfg.pcie; + pos = cfg->pcie_location; + + return pci_read_config(dev, pos + PCIER_LINK_CAP, 2); +} Modified: head/sys/dev/pci/pcivar.h ============================================================================== --- head/sys/dev/pci/pcivar.h Tue Nov 14 05:03:38 2017 (r325792) +++ head/sys/dev/pci/pcivar.h Tue Nov 14 05:05:05 2017 (r325793) @@ -598,6 +598,8 @@ uint32_t pcie_adjust_config(device_t dev, int reg, uin bool pcie_flr(device_t dev, u_int max_delay, bool force); int pcie_get_max_completion_timeout(device_t dev); bool pcie_wait_for_pending_transactions(device_t dev, u_int max_delay); +uint16_t pcie_link_status(device_t dev); +uint16_t pcie_link_caps(device_t dev); #ifdef BUS_SPACE_MAXADDR #if (BUS_SPACE_MAXADDR > 0xFFFFFFFF) From owner-svn-src-head@freebsd.org Tue Nov 14 05:05:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71462D1F3C6; Tue, 14 Nov 2017 05:05:18 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C570D6EF3E; Tue, 14 Nov 2017 05:05:17 +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 vAE55G86042613; Tue, 14 Nov 2017 05:05:16 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAE55Gjl042608; Tue, 14 Nov 2017 05:05:16 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201711140505.vAE55Gjl042608@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 14 Nov 2017 05:05:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325794 - in head/sys: cam cam/nvme dev/nvme X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys: cam cam/nvme dev/nvme X-SVN-Commit-Revision: 325794 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 05:05:18 -0000 Author: imp Date: Tue Nov 14 05:05:16 2017 New Revision: 325794 URL: https://svnweb.freebsd.org/changeset/base/325794 Log: Provide link speed data in XPT_GET_TRAN_SETTINGS. Provide full version information for that and XPT_PATH_INQ. Provide macros to encode/decode major/minor versions. Read the link speed and lane count to compute the base_transfer_speed for XPT_PATH_INQ. Sponsored by: Netflix Modified: head/sys/cam/cam_ccb.h head/sys/cam/nvme/nvme_all.h head/sys/cam/nvme/nvme_xpt.c head/sys/dev/nvme/nvme.h head/sys/dev/nvme/nvme_sim.c Modified: head/sys/cam/cam_ccb.h ============================================================================== --- head/sys/cam/cam_ccb.h Tue Nov 14 05:05:05 2017 (r325793) +++ head/sys/cam/cam_ccb.h Tue Nov 14 05:05:16 2017 (r325794) @@ -1016,11 +1016,14 @@ struct ccb_trans_settings_nvme u_int valid; /* Which fields to honor */ #define CTS_NVME_VALID_SPEC 0x01 #define CTS_NVME_VALID_CAPS 0x02 - u_int spec_major; /* Major version of spec supported */ - u_int spec_minor; /* Minor verison of spec supported */ - u_int spec_tiny; /* Tiny version of spec supported */ - u_int max_xfer; /* Max transfer size (0 -> unlimited */ - u_int caps; +#define CTS_NVME_VALID_LINK 0x04 + uint32_t spec; /* NVMe spec implemented -- same as vs register */ + uint32_t max_xfer; /* Max transfer size (0 -> unlimited */ + uint32_t caps; + uint8_t lanes; /* Number of PCIe lanes */ + uint8_t speed; /* PCIe generation for each lane */ + uint8_t max_lanes; /* Number of PCIe lanes */ + uint8_t max_speed; /* PCIe generation for each lane */ }; #include Modified: head/sys/cam/nvme/nvme_all.h ============================================================================== --- head/sys/cam/nvme/nvme_all.h Tue Nov 14 05:05:05 2017 (r325793) +++ head/sys/cam/nvme/nvme_all.h Tue Nov 14 05:05:16 2017 (r325794) @@ -33,8 +33,6 @@ struct ccb_nvmeio; -#define NVME_REV_1 1 /* Supports NVMe 1.2 or earlier */ - void nvme_ns_cmd(struct ccb_nvmeio *nvmeio, uint8_t cmd, uint32_t nsid, uint32_t cdw10, uint32_t cdw11, uint32_t cdw12, uint32_t cdw13, uint32_t cdw14, uint32_t cdw15); Modified: head/sys/cam/nvme/nvme_xpt.c ============================================================================== --- head/sys/cam/nvme/nvme_xpt.c Tue Nov 14 05:05:05 2017 (r325793) +++ head/sys/cam/nvme/nvme_xpt.c Tue Nov 14 05:05:16 2017 (r325794) @@ -639,12 +639,14 @@ nvme_announce_periph(struct cam_periph *periph) static void nvme_proto_announce(struct cam_ed *device) { + nvme_print_ident(device->nvme_cdata, device->nvme_data); } static void nvme_proto_denounce(struct cam_ed *device) { + nvme_print_ident(device->nvme_cdata, device->nvme_data); } Modified: head/sys/dev/nvme/nvme.h ============================================================================== --- head/sys/dev/nvme/nvme.h Tue Nov 14 05:05:05 2017 (r325793) +++ head/sys/dev/nvme/nvme.h Tue Nov 14 05:05:16 2017 (r325794) @@ -42,6 +42,13 @@ #define NVME_BIO_TEST _IOWR('n', 101, struct nvme_io_test) /* + * Macros to deal with NVME revisions, as defined VS register + */ +#define NVME_REV(x, y) (((x) << 16) | ((y) << 8)) +#define NVME_MAJOR(r) (((r) >> 16) & 0xffff) +#define NVME_MINOR(r) (((r) >> 8) & 0xff) + +/* * Use to mark a command to apply to all namespaces, or to retrieve global * log pages. */ Modified: head/sys/dev/nvme/nvme_sim.c ============================================================================== --- head/sys/dev/nvme/nvme_sim.c Tue Nov 14 05:05:05 2017 (r325793) +++ head/sys/dev/nvme/nvme_sim.c Tue Nov 14 05:05:16 2017 (r325794) @@ -44,6 +44,9 @@ __FBSDID("$FreeBSD$"); #include // Yes, this is wrong. #include +#include +#include + #include "nvme_private.h" #define ccb_accb_ptr spriv_ptr0 @@ -122,6 +125,22 @@ nvme_sim_nvmeio(struct cam_sim *sim, union ccb *ccb) ccb->ccb_h.status |= CAM_SIM_QUEUED; } +static uint32_t +nvme_link_kBps(struct nvme_controller *ctrlr) +{ + uint32_t speed, lanes, link[] = { 1, 250000, 500000, 985000, 1970000 }; + + speed = pcie_link_status(ctrlr->dev) & PCIEM_LINK_STA_SPEED; + lanes = (pcie_link_status(ctrlr->dev) & PCIEM_LINK_STA_WIDTH) >> 4; + /* + * Failsafe on link speed indicator. If it is insane report the number of + * lanes as the speed. Not 100% accurate, but may be diagnostic. + */ + if (speed >= nitems(link)) + speed = 0; + return link[speed] * lanes; +} + static void nvme_sim_action(struct cam_sim *sim, union ccb *ccb) { @@ -179,15 +198,15 @@ nvme_sim_action(struct cam_sim *sim, union ccb *ccb) cpi->maxio = nvme_ns_get_max_io_xfer_size(ns); cpi->initiator_id = 0; cpi->bus_id = cam_sim_bus(sim); - cpi->base_transfer_speed = 4000000; /* 4 GB/s 4 lanes pcie 3 */ + cpi->base_transfer_speed = nvme_link_kBps(ctrlr); strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); strlcpy(cpi->hba_vid, "NVMe", HBA_IDLEN); strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->transport = XPORT_NVME; /* XXX XPORT_PCIE ? */ - cpi->transport_version = 1; /* XXX Get PCIe spec ? */ + cpi->transport_version = nvme_mmio_read_4(ctrlr, vs); cpi->protocol = PROTO_NVME; - cpi->protocol_version = NVME_REV_1; /* Groks all 1.x NVMe cards */ + cpi->protocol_version = nvme_mmio_read_4(ctrlr, vs); cpi->xport_specific.nvme.nsid = ns->id; cpi->ccb_h.status = CAM_REQ_CMP; break; @@ -197,20 +216,24 @@ nvme_sim_action(struct cam_sim *sim, union ccb *ccb) struct ccb_trans_settings *cts; struct ccb_trans_settings_nvme *nvmep; struct ccb_trans_settings_nvme *nvmex; + device_t dev; + dev = ctrlr->dev; cts = &ccb->cts; nvmex = &cts->xport_specific.nvme; nvmep = &cts->proto_specific.nvme; - nvmex->valid = CTS_NVME_VALID_SPEC; - nvmex->spec_major = 1; /* XXX read from card */ - nvmex->spec_minor = 2; - nvmex->spec_tiny = 0; + nvmex->valid = CTS_NVME_VALID_SPEC | CTS_NVME_VALID_LINK; + nvmex->spec = nvme_mmio_read_4(ctrlr, vs); + nvmex->speed = pcie_link_status(dev) & PCIEM_LINK_STA_SPEED; + nvmex->lanes = (pcie_link_status(dev) & PCIEM_LINK_STA_WIDTH) >> 4; + nvmex->max_speed = pcie_link_caps(dev) & PCIEM_LINK_CAP_MAX_SPEED; + nvmex->max_lanes = (pcie_link_caps(dev) & PCIEM_LINK_CAP_MAX_WIDTH) >> 4; - nvmep->valid = CTS_NVME_VALID_SPEC; - nvmep->spec_major = 1; /* XXX read from card */ - nvmep->spec_minor = 2; - nvmep->spec_tiny = 0; + /* XXX these should be something else maybe ? */ + nvmep->valid = 1; + nvmep->spec = nvmex->spec; + cts->transport = XPORT_NVME; cts->protocol = PROTO_NVME; cts->ccb_h.status = CAM_REQ_CMP; From owner-svn-src-head@freebsd.org Tue Nov 14 05:05:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0ADBAD1F3F9; Tue, 14 Nov 2017 05:05:23 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CBE026EF5D; Tue, 14 Nov 2017 05:05:22 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAE55L3R042668; Tue, 14 Nov 2017 05:05:21 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAE55LC3042667; Tue, 14 Nov 2017 05:05:21 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201711140505.vAE55LC3042667@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 14 Nov 2017 05:05:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325795 - head/sys/modules/nvme X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/modules/nvme X-SVN-Commit-Revision: 325795 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 05:05:23 -0000 Author: imp Date: Tue Nov 14 05:05:21 2017 New Revision: 325795 URL: https://svnweb.freebsd.org/changeset/base/325795 Log: Belatedly add opt_nvme.h to fix building nvme.ko outside of a kernel build. Sponsored by: Netflix Modified: head/sys/modules/nvme/Makefile Modified: head/sys/modules/nvme/Makefile ============================================================================== --- head/sys/modules/nvme/Makefile Tue Nov 14 05:05:16 2017 (r325794) +++ head/sys/modules/nvme/Makefile Tue Nov 14 05:05:21 2017 (r325795) @@ -18,6 +18,7 @@ SRCS = nvme.c \ bus_if.h \ device_if.h \ opt_cam.h \ + opt_nvme.h \ pci_if.h .include From owner-svn-src-head@freebsd.org Tue Nov 14 05:05:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5FE15D1F43B; Tue, 14 Nov 2017 05:05:29 +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 4C0D66F023; Tue, 14 Nov 2017 05:05:27 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAE55Qxs042729; Tue, 14 Nov 2017 05:05:26 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAE55Qaw042726; Tue, 14 Nov 2017 05:05:26 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201711140505.vAE55Qaw042726@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 14 Nov 2017 05:05:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325796 - head/sys/cam/nvme X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam/nvme X-SVN-Commit-Revision: 325796 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 05:05:31 -0000 Author: imp Date: Tue Nov 14 05:05:26 2017 New Revision: 325796 URL: https://svnweb.freebsd.org/changeset/base/325796 Log: Properly decode NVMe state of the drive and print out the information in the attach to more closely match what SCSI and ATA attached storage provides. Sponsored by: Netflix Modified: head/sys/cam/nvme/nvme_all.c head/sys/cam/nvme/nvme_all.h head/sys/cam/nvme/nvme_xpt.c Modified: head/sys/cam/nvme/nvme_all.c ============================================================================== --- head/sys/cam/nvme/nvme_all.c Tue Nov 14 05:05:21 2017 (r325795) +++ head/sys/cam/nvme/nvme_all.c Tue Nov 14 05:05:26 2017 (r325796) @@ -87,9 +87,16 @@ nvme_identify_match(caddr_t identbuffer, caddr_t table void nvme_print_ident(const struct nvme_controller_data *cdata, - const struct nvme_namespace_data *data) + const struct nvme_namespace_data *data, struct sbuf *sb) { - printf("I'm a pretty NVME drive\n"); + + sbuf_printf(sb, "<"); + cam_strvis_sbuf(sb, cdata->mn, sizeof(cdata->mn), 0); + sbuf_printf(sb, " "); + cam_strvis_sbuf(sb, cdata->fr, sizeof(cdata->fr), 0); + sbuf_printf(sb, " "); + cam_strvis_sbuf(sb, cdata->sn, sizeof(cdata->sn), 0); + sbuf_printf(sb, ">\n"); } /* XXX need to do nvme admin opcodes too, but those aren't used yet by nda */ Modified: head/sys/cam/nvme/nvme_all.h ============================================================================== --- head/sys/cam/nvme/nvme_all.h Tue Nov 14 05:05:21 2017 (r325795) +++ head/sys/cam/nvme/nvme_all.h Tue Nov 14 05:05:26 2017 (r325796) @@ -39,7 +39,8 @@ void nvme_ns_cmd(struct ccb_nvmeio *nvmeio, uint8_t cm int nvme_identify_match(caddr_t identbuffer, caddr_t table_entry); -void nvme_print_ident(const struct nvme_controller_data *, const struct nvme_namespace_data *); +struct sbuf; +void nvme_print_ident(const struct nvme_controller_data *, const struct nvme_namespace_data *, struct sbuf *); const char *nvme_op_string(const struct nvme_command *); const char *nvme_cmd_string(const struct nvme_command *, char *, size_t); const void *nvme_get_identify_cntrl(struct cam_periph *); Modified: head/sys/cam/nvme/nvme_xpt.c ============================================================================== --- head/sys/cam/nvme/nvme_xpt.c Tue Nov 14 05:05:21 2017 (r325795) +++ head/sys/cam/nvme/nvme_xpt.c Tue Nov 14 05:05:26 2017 (r325796) @@ -619,35 +619,49 @@ nvme_announce_periph(struct cam_periph *periph) struct ccb_pathinq cpi; struct ccb_trans_settings cts; struct cam_path *path = periph->path; + struct ccb_trans_settings_nvme *nvmex; cam_periph_assert(periph, MA_OWNED); + /* Ask the SIM for connection details */ xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL); cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; cts.type = CTS_TYPE_CURRENT_SETTINGS; xpt_action((union ccb*)&cts); if ((cts.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) return; + nvmex = &cts.xport_specific.nvme; + /* Ask the SIM for its base transfer speed */ xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NORMAL); cpi.ccb_h.func_code = XPT_PATH_INQ; xpt_action((union ccb *)&cpi); - /* XXX NVME STUFF HERE */ + printf("%s%d: nvme version %d.%d x%d (max x%d) lanes PCIe Gen%d (max Gen%d) link", + periph->periph_name, periph->unit_number, + NVME_MAJOR(nvmex->spec), + NVME_MINOR(nvmex->spec), + nvmex->lanes, nvmex->max_lanes, + nvmex->speed, nvmex->max_speed); printf("\n"); } static void nvme_proto_announce(struct cam_ed *device) { + struct sbuf sb; + char buffer[120]; - nvme_print_ident(device->nvme_cdata, device->nvme_data); + sbuf_new(&sb, buffer, sizeof(buffer), SBUF_FIXEDLEN); + nvme_print_ident(device->nvme_cdata, device->nvme_data, &sb); + sbuf_finish(&sb); + sbuf_putbuf(&sb); } static void nvme_proto_denounce(struct cam_ed *device) { - nvme_print_ident(device->nvme_cdata, device->nvme_data); + nvme_proto_announce(device); } static void From owner-svn-src-head@freebsd.org Tue Nov 14 06:36:00 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D164DD7D90B; Tue, 14 Nov 2017 06:36:00 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from pv33p00im-asmtp002.me.com (pv33p00im-asmtp002.me.com [17.142.194.251]) (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 B34AD718E7; Tue, 14 Nov 2017 06:36:00 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from process-dkim-sign-daemon.pv33p00im-asmtp002.me.com by pv33p00im-asmtp002.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) id <0OZE00J005X22500@pv33p00im-asmtp002.me.com>; Tue, 14 Nov 2017 05:35:53 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mac.com; s=04042017; t=1510637753; bh=qAKqUMsVOI0sf96P3F9VKdHE4oHIyLPxFea5J97xkBc=; h=Date:Subject:From:To:Message-id:MIME-version:Content-type; b=h7yvnFr/bDUJoN0E6FGVGTDwdupFmEzU4aH7EwC//gAGACl/V+sx7eMW4VtqA0FAJ V3Sh/B16HqopSI+7dyAGkOOPm1CrjEX7DAc2mH14Xt0JYZ7bercoz8OU/MB6QNplcz DJw1WkBR+ZMT/tV66uKtuoOe/d5sElIMBtvFVF/DWrWwkl3MYjSZnYaQMBWGhn3HHR 4T82dXKX4MmNDbfdhrVo/gCBG+RShIALrVcA8S8M99d470FgC6g8fy02Xp7pUzCFFz 3bepbZsANn48fIOzomUUCuY73XBKpqN3FbHpNxh7kiRW7S2lX2e8GXrPVht3ASgbtV V1MoYX9NkcRYQ== Received: from icloud.com ([127.0.0.1]) by pv33p00im-asmtp002.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) with ESMTPSA id <0OZE009IW7JRC230@pv33p00im-asmtp002.me.com>; Tue, 14 Nov 2017 05:35:53 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-11-14_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1015 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1711140076 User-Agent: Microsoft-MacOutlook/f.27.0.171010 Date: Mon, 13 Nov 2017 21:35:50 -0800 Subject: Re: svn commit: r325796 - head/sys/cam/nvme From: Ravi Pokala To: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-id: <50ACB3CA-9F18-4033-8D0F-F02363BA5B37@mac.com> Thread-topic: svn commit: r325796 - head/sys/cam/nvme References: <201711140505.vAE55Qaw042726@repo.freebsd.org> In-reply-to: <201711140505.vAE55Qaw042726@repo.freebsd.org> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 06:36:00 -0000 In r325794, you set speed/max_speed to a KBps value; here, you're reporting those values as PCI Generation. That's... not right. -Ravi (rpokala@) -----Original Message----- From: on behalf of Warner Losh Date: 2017-11-13, Monday at 21:05 To: , , Subject: svn commit: r325796 - head/sys/cam/nvme Author: imp Date: Tue Nov 14 05:05:26 2017 New Revision: 325796 URL: https://svnweb.freebsd.org/changeset/base/325796 Log: Properly decode NVMe state of the drive and print out the information in the attach to more closely match what SCSI and ATA attached storage provides. Sponsored by: Netflix Modified: head/sys/cam/nvme/nvme_all.c head/sys/cam/nvme/nvme_all.h head/sys/cam/nvme/nvme_xpt.c Modified: head/sys/cam/nvme/nvme_all.c ============================================================================== --- head/sys/cam/nvme/nvme_all.c Tue Nov 14 05:05:21 2017 (r325795) +++ head/sys/cam/nvme/nvme_all.c Tue Nov 14 05:05:26 2017 (r325796) @@ -87,9 +87,16 @@ nvme_identify_match(caddr_t identbuffer, caddr_t table void nvme_print_ident(const struct nvme_controller_data *cdata, - const struct nvme_namespace_data *data) + const struct nvme_namespace_data *data, struct sbuf *sb) { - printf("I'm a pretty NVME drive\n"); + + sbuf_printf(sb, "<"); + cam_strvis_sbuf(sb, cdata->mn, sizeof(cdata->mn), 0); + sbuf_printf(sb, " "); + cam_strvis_sbuf(sb, cdata->fr, sizeof(cdata->fr), 0); + sbuf_printf(sb, " "); + cam_strvis_sbuf(sb, cdata->sn, sizeof(cdata->sn), 0); + sbuf_printf(sb, ">\n"); } /* XXX need to do nvme admin opcodes too, but those aren't used yet by nda */ Modified: head/sys/cam/nvme/nvme_all.h ============================================================================== --- head/sys/cam/nvme/nvme_all.h Tue Nov 14 05:05:21 2017 (r325795) +++ head/sys/cam/nvme/nvme_all.h Tue Nov 14 05:05:26 2017 (r325796) @@ -39,7 +39,8 @@ void nvme_ns_cmd(struct ccb_nvmeio *nvmeio, uint8_t cm int nvme_identify_match(caddr_t identbuffer, caddr_t table_entry); -void nvme_print_ident(const struct nvme_controller_data *, const struct nvme_namespace_data *); +struct sbuf; +void nvme_print_ident(const struct nvme_controller_data *, const struct nvme_namespace_data *, struct sbuf *); const char *nvme_op_string(const struct nvme_command *); const char *nvme_cmd_string(const struct nvme_command *, char *, size_t); const void *nvme_get_identify_cntrl(struct cam_periph *); Modified: head/sys/cam/nvme/nvme_xpt.c ============================================================================== --- head/sys/cam/nvme/nvme_xpt.c Tue Nov 14 05:05:21 2017 (r325795) +++ head/sys/cam/nvme/nvme_xpt.c Tue Nov 14 05:05:26 2017 (r325796) @@ -619,35 +619,49 @@ nvme_announce_periph(struct cam_periph *periph) struct ccb_pathinq cpi; struct ccb_trans_settings cts; struct cam_path *path = periph->path; + struct ccb_trans_settings_nvme *nvmex; cam_periph_assert(periph, MA_OWNED); + /* Ask the SIM for connection details */ xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL); cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; cts.type = CTS_TYPE_CURRENT_SETTINGS; xpt_action((union ccb*)&cts); if ((cts.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) return; + nvmex = &cts.xport_specific.nvme; + /* Ask the SIM for its base transfer speed */ xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NORMAL); cpi.ccb_h.func_code = XPT_PATH_INQ; xpt_action((union ccb *)&cpi); - /* XXX NVME STUFF HERE */ + printf("%s%d: nvme version %d.%d x%d (max x%d) lanes PCIe Gen%d (max Gen%d) link", + periph->periph_name, periph->unit_number, + NVME_MAJOR(nvmex->spec), + NVME_MINOR(nvmex->spec), + nvmex->lanes, nvmex->max_lanes, + nvmex->speed, nvmex->max_speed); printf("\n"); } static void nvme_proto_announce(struct cam_ed *device) { + struct sbuf sb; + char buffer[120]; - nvme_print_ident(device->nvme_cdata, device->nvme_data); + sbuf_new(&sb, buffer, sizeof(buffer), SBUF_FIXEDLEN); + nvme_print_ident(device->nvme_cdata, device->nvme_data, &sb); + sbuf_finish(&sb); + sbuf_putbuf(&sb); } static void nvme_proto_denounce(struct cam_ed *device) { - nvme_print_ident(device->nvme_cdata, device->nvme_data); + nvme_proto_announce(device); } static void From owner-svn-src-head@freebsd.org Tue Nov 14 10:15:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0E58DBA19F; Tue, 14 Nov 2017 10:15:18 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C9B857858F; Tue, 14 Nov 2017 10:15:18 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAEAFHAe072068; Tue, 14 Nov 2017 10:15:17 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAEAFH5f072066; Tue, 14 Nov 2017 10:15:17 GMT (envelope-from des@FreeBSD.org) Message-Id: <201711141015.vAEAFH5f072066@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Tue, 14 Nov 2017 10:15:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325800 - head/bin/freebsd-version X-SVN-Group: head X-SVN-Commit-Author: des X-SVN-Commit-Paths: head/bin/freebsd-version X-SVN-Commit-Revision: 325800 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 10:15:19 -0000 Author: des Date: Tue Nov 14 10:15:17 2017 New Revision: 325800 URL: https://svnweb.freebsd.org/changeset/base/325800 Log: Add a -r option to print the running kernel version. MFC after: 1 week Modified: head/bin/freebsd-version/freebsd-version.1 head/bin/freebsd-version/freebsd-version.sh.in Modified: head/bin/freebsd-version/freebsd-version.1 ============================================================================== --- head/bin/freebsd-version/freebsd-version.1 Tue Nov 14 09:31:56 2017 (r325799) +++ head/bin/freebsd-version/freebsd-version.1 Tue Nov 14 10:15:17 2017 (r325800) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 5, 2013 +.Dd November 14, 2017 .Dt FREEBSD-VERSION 1 .Os .Sh NAME @@ -33,7 +33,7 @@ .Nd print the version and patch level of the installed system .Sh SYNOPSIS .Nm -.Op Fl ku +.Op Fl kru .Sh DESCRIPTION The .Nm @@ -50,6 +50,11 @@ if a new kernel has been installed but the system has rebooted, .Nm will print the version and patch level of the new kernel. +.It Fl r +Print the version and patch level of the running kernel. +Unlike +.Xr uname 1 , +this is unaffected by environment variables. .It Fl u Print the version and patch level of the installed userland. These are hardcoded into @@ -57,14 +62,10 @@ These are hardcoded into during the build. .El .Pp -If both -.Fl k -and -.Fl u -are specified, +If several of the above options are specified, .Nm -will print the kernel version first, then the userland version, on -separate lines. +will print the installed kernel version first, then the running kernel +version, and finally the userland version, on separate lines. If neither is specified, it will print the userland version only. .Sh IMPLEMENTATION NOTES The Modified: head/bin/freebsd-version/freebsd-version.sh.in ============================================================================== --- head/bin/freebsd-version/freebsd-version.sh.in Tue Nov 14 09:31:56 2017 (r325799) +++ head/bin/freebsd-version/freebsd-version.sh.in Tue Nov 14 10:15:17 2017 (r325800) @@ -38,7 +38,7 @@ LOADER_RE1='^\([A-Z_a-z][0-9A-Z_a-z]*=[-./0-9A-Z_a-z]\ LOADER_RE2='^\([A-Z_a-z][0-9A-Z_a-z]*="[-./0-9A-Z_a-z]\{1,\}"\).*$' KERNEL_RE='^@@TYPE@@ \([-.0-9A-Za-z]\{1,\}\) .*$' -progname=$(basename $0) +progname=${0##*/} # # Print an error message and exit. @@ -71,6 +71,13 @@ kernel_version() { } # +# Print the version of the currently running kernel. +# +running_version() { + sysctl -n kern.osrelease +} + +# # Print the hardcoded userland version. # userland_version() { @@ -81,7 +88,7 @@ userland_version() { # Print a usage string and exit. # usage() { - echo "usage: $progname [-ku]" >&2 + echo "usage: $progname [-kru]" >&2 exit 1 } @@ -90,11 +97,14 @@ usage() { # main() { # parse command-line arguments - while getopts "ku" option ; do + while getopts "kru" option ; do case $option in k) opt_k=1 ;; + r) + opt_r=1 + ;; u) opt_u=1 ;; @@ -108,13 +118,18 @@ main() { fi # default is -u - if [ $((opt_k + opt_u)) -eq 0 ] ; then + if [ $((opt_k + opt_r + opt_u)) -eq 0 ] ; then opt_u=1 fi - # print kernel version + # print installed kernel version if [ $opt_k ] ; then kernel_version + fi + + # print running kernel version + if [ $opt_r ] ; then + running_version fi # print userland version From owner-svn-src-head@freebsd.org Tue Nov 14 12:41:50 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6039BDBDC99; Tue, 14 Nov 2017 12:41:50 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id 091777CE69; Tue, 14 Nov 2017 12:41:49 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.103] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id C7DF0D4B812; Tue, 14 Nov 2017 23:41:39 +1100 (AEDT) Date: Tue, 14 Nov 2017 23:41:38 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Warner Losh cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r325765 - head/lib/libc/string In-Reply-To: <201711131704.vADH4iZ9035812@repo.freebsd.org> Message-ID: <20171114215948.L913@besplex.bde.org> References: <201711131704.vADH4iZ9035812@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=bc8baKHB c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=OAhgb-yOOZJLc_R5b7kA:9 a=bldleDCuXbjKj1ng:21 a=KViBCGeXcoHtX_6B:21 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 12:41:50 -0000 On Mon, 13 Nov 2017, Warner Losh wrote: > Add notes about overlapping copies. > > Add notes to each of these that specifically state that results are > undefined if the strings overlap. In the case of memcpy, we document > the overlapping behavior on FreeBSD (pre-existing). For str*, it is > left unspecified, however, since the default (and x86) implementations > do not handle overlapping strings properly. > > PR: 223653 > Sponsored by: Netflix > > Modified: > head/lib/libc/string/memcpy.3 > head/lib/libc/string/strcat.3 > head/lib/libc/string/strcpy.3 C standards and POSIX have much better wording. > Modified: head/lib/libc/string/memcpy.3 > ============================================================================== > --- head/lib/libc/string/memcpy.3 Mon Nov 13 16:53:36 2017 (r325764) > +++ head/lib/libc/string/memcpy.3 Mon Nov 13 17:04:44 2017 (r325765) > @@ -54,6 +54,11 @@ bytes from string > .Fa src > to string > .Fa dst . > +If > +.Fa src > +and > +.Fa dst > +overlap, the results are not defined. > .Sh RETURN VALUES > The > .Fn memcpy The bugs here are: - src and dst are pointers. Overlap for pointers makes no sense except for pointers to single objects but the pointers here are not for that. Standards use the correct description "objects that overlap". - style bug: verboseness in the nonsense, by naming the non-objects and then having to mark up their names. A full description would be much longer, especially for non-counted copies. For strcpy(), the relevant obects are the array of char beginning at .Fa src and ending at its terminating NUL, and the array of char beginning at .Fa dst with the same number of elements as the source array. Standards omit all details and say simple "objects". memcpy() only has a count so it is simpler. strncpy() has a count in addition to the NUL terminators, so it is more complicated. - use of the wrong term "results". The correct term is "behavior". Results are are worst implementation-defined in Standards, since it is almost impossible for a result to be undefined without the whole behaviour also being undefined. These functions have only 1 result. In Standard wording, function results are return values, not the whole behavior of the function. - use of the non-technical term "not defined". Standards use the technical term "undefined". The Standards wording is "If copying takes place between objects that overlap, the behaviour is undefined". > Modified: head/lib/libc/string/strcat.3 > Modified: head/lib/libc/string/strcpy.3 - as above, except "undefined" is spelled correctly Grepping for "overlap" in draft C99 shows the following other functions with overlap giving undefined behavior: snprintf, sprintf, sscanf, vsnprintf, vsprintf, mbstowcs, wcstombs, strxfrm, strftime. all functions in where overlap might occur, except when explicitly specified (seems to be only explicitly specified for wmemmove) The term "overlap" occurs in 193 section 3 man pages in -current (counting links as 1 each). It isi still never used for any of the above functions. It is used in the following related man pages: - bcmp.3. This use is nonsense. Overlap doesn't cause any problems for bcmp(). - bcopy.3 and memmove.3. This use is not nonsense, but its wording is much worse than in Standards. It says "The .Fn function copies .Fa len bytes from string .Fa src to string .Fa dst. The two strings may overlap.". But these functions don't even copy strings, and "may overlap" gives no details. Standards say "The .Fn function copies .Fn n characters from the object pointed to be .Fa s2 into the object pointed to by .Fa s1. [Complicated 5-line sentence saying that the copying acts as if it is done through a temporary object that doesn't overlap.]". I think standards say somewhere, but man pages say nowhere, that copying between non-overlapping objects has the defined behaviour of copying the bytes (u_char's) it is done by assignment of bytes or a function like memmove() (copying of general objects is more complicated since it may skip padding or otherwise fail to preserve the representation). This is needed so that the 5-line sentence doesn't need to be much longer. - memcpy.3. It was already documented in the BUGS section that memcpy() is implemented as bcopy() and therefore the "strings" "may overlap" [then portability considerations due to this]. This is buggier than before: - old bug: only the MI implementation of memcpy() clearly implements memcpy() as bcopy(). The amd64, i386 and arm MD implementations do the same. mips is backwards for bcopy() and implements it as memmove(). mips has 2 separate memcpy*.S files, one for plain arm and one for xscale. The plain arm one is smaller than memmove.S, so presumably doesn't support overlapped copies. The xscale one is much larger, so has space for overlapped copies and many optimizations that no longer work. I don't know what it does. (The i386 and amd64 ones have a few small optimizations that stopped working 25 years ago. At least they are short.) - new bug: the addition is inconsistent with the BUGS section. - strlcpy.c. This uses a combination of the C99 wording for strcpy() and buggy wording involving the pointer names (for both lcat and lcpy): If the .Fa src and .Fa dst strings overlap, the behavior is undefined. Now it is even better to not give the details about the objects, since at least for dst, the object isn't the string pointed to by dst -- it is the char array of length MIN(dstsize, strlen(dst) + 1). Similarly for old strncat() and strncpy() and not so old snprintf(). For the standard 'n' functions, the object is clearly limited by the dstsize arg and there is no problem in theory or practice if the dst string overlaps beyond the part that is written to, so it is just a bug in the specification = man page of the 'l' functions to have a stricter limit on overlap. Grepping for "overlap" in draft POSIX.1-2001 shows the following additional functions with overlap giving undefined behavior: bcopy: POSIX duplicates the C99 wording for memcpy, but for bcopy it has much the same bugs as this change: it uses "the area pointed to be .Fa s1", etc. memccpy, swab independent details for functions in (but POSIX combines the details for at least sprintf() and snprintf()). Bruce From owner-svn-src-head@freebsd.org Tue Nov 14 14:31:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24E96DC044E; Tue, 14 Nov 2017 14:31:04 +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 DD9E18078E; Tue, 14 Nov 2017 14:31:03 +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 vAEEV3K2076131; Tue, 14 Nov 2017 14:31:03 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAEEV2hk076130; Tue, 14 Nov 2017 14:31:02 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201711141431.vAEEV2hk076130@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 14 Nov 2017 14:31:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325804 - head/release/arm64 X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/release/arm64 X-SVN-Commit-Revision: 325804 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 14:31:04 -0000 Author: gjb Date: Tue Nov 14 14:31:02 2017 New Revision: 325804 URL: https://svnweb.freebsd.org/changeset/base/325804 Log: Correct the path to the md(4)-backed UFS filesystem for pine64 images. Boot-tested by: lidl Sponsored by: The FreeBSD Foundation Modified: head/release/arm64/PINE64.conf Modified: head/release/arm64/PINE64.conf ============================================================================== --- head/release/arm64/PINE64.conf Tue Nov 14 11:02:46 2017 (r325803) +++ head/release/arm64/PINE64.conf Tue Nov 14 14:31:02 2017 (r325804) @@ -26,7 +26,7 @@ arm_install_uboot() { of=/dev/${mddev} bs=1k seek=8 conv=sync chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}" chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT} - chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${UFSMOUNT} + chroot ${CHROOTDIR} mount /dev/${mddev}s2 ${UFSMOUNT} BOOTFILES="$(chroot ${CHROOTDIR} \ env TARGET=${EMBEDDED_TARGET} TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \ From owner-svn-src-head@freebsd.org Tue Nov 14 14:39:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61FF9DC08A3; Tue, 14 Nov 2017 14:39:39 +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 2EB8F80F01; Tue, 14 Nov 2017 14:39:39 +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 vAEEdcX1081254; Tue, 14 Nov 2017 14:39:38 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAEEdcxT081253; Tue, 14 Nov 2017 14:39:38 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201711141439.vAEEdcxT081253@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 14 Nov 2017 14:39:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325805 - head/sys/contrib/rdma/krping X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/contrib/rdma/krping X-SVN-Commit-Revision: 325805 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 14:39:39 -0000 Author: hselasky Date: Tue Nov 14 14:39:37 2017 New Revision: 325805 URL: https://svnweb.freebsd.org/changeset/base/325805 Log: Set the default VNET in krping before calling ifunit_ref(). Else using IPv6 link-local addresses when VIMAGE is enabled will cause a so-called NULL pointer dereferencing issue. Sponsored by: Mellanox Technologies MFC after: 1 week Modified: head/sys/contrib/rdma/krping/krping.c Modified: head/sys/contrib/rdma/krping/krping.c ============================================================================== --- head/sys/contrib/rdma/krping/krping.c Tue Nov 14 14:31:02 2017 (r325804) +++ head/sys/contrib/rdma/krping/krping.c Tue Nov 14 14:39:37 2017 (r325805) @@ -3185,7 +3185,9 @@ krping_get_ipv6_scope_id(char *name) if (name == NULL) return (0); + CURVNET_SET_QUIET(TD_TO_VNET(curthread)); ifp = ifunit_ref(name); + CURVNET_RESTORE(); if (ifp == NULL) return (0); retval = ifp->if_index; From owner-svn-src-head@freebsd.org Tue Nov 14 14:43:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9DF1DC0CAC; Tue, 14 Nov 2017 14:43: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 B687E1629; Tue, 14 Nov 2017 14:43: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 vAEEhZGB085800; Tue, 14 Nov 2017 14:43:35 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAEEhZTo085799; Tue, 14 Nov 2017 14:43:35 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201711141443.vAEEhZTo085799@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 14 Nov 2017 14:43:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325806 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 325806 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 14:43:37 -0000 Author: hselasky Date: Tue Nov 14 14:43:35 2017 New Revision: 325806 URL: https://svnweb.freebsd.org/changeset/base/325806 Log: Make sure a valid VNET is set before trying to access the V_ip6_v6only variable. Access the variable directly instead of going through the sysctl() interface in the kernel. Sponsored by: Mellanox Technologies MFC after: 1 week Modified: head/sys/ofed/drivers/infiniband/core/cma.c Modified: head/sys/ofed/drivers/infiniband/core/cma.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/cma.c Tue Nov 14 14:39:37 2017 (r325805) +++ head/sys/ofed/drivers/infiniband/core/cma.c Tue Nov 14 14:43:35 2017 (r325806) @@ -2752,10 +2752,6 @@ int rdma_bind_addr(struct rdma_cm_id *id, struct socka { struct rdma_id_private *id_priv; int ret; -#if defined(INET6) - int ipv6only; - size_t var_size = sizeof(int); -#endif if (addr->sa_family != AF_INET && addr->sa_family != AF_INET6) return -EAFNOSUPPORT; @@ -2783,9 +2779,11 @@ int rdma_bind_addr(struct rdma_cm_id *id, struct socka if (addr->sa_family == AF_INET) id_priv->afonly = 1; #if defined(INET6) - else if (addr->sa_family == AF_INET6) - id_priv->afonly = kernel_sysctlbyname(&thread0, "net.inet6.ip6.v6only", - &ipv6only, &var_size, NULL, 0, NULL, 0); + else if (addr->sa_family == AF_INET6) { + CURVNET_SET_QUIET(&init_net); + id_priv->afonly = V_ip6_v6only; + CURVNET_RESTORE(); + } #endif } ret = cma_get_port(id_priv); From owner-svn-src-head@freebsd.org Tue Nov 14 14:51:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49E85DC0F15; Tue, 14 Nov 2017 14:51:39 +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 F0D231942; Tue, 14 Nov 2017 14:51:38 +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 vAEEpcZE086816; Tue, 14 Nov 2017 14:51:38 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAEEpbxc086813; Tue, 14 Nov 2017 14:51:37 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201711141451.vAEEpbxc086813@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 14 Nov 2017 14:51:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325807 - in head/sys: dev/mlx5/mlx5_ib ofed/drivers/infiniband/hw/mthca ofed/include/rdma X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys: dev/mlx5/mlx5_ib ofed/drivers/infiniband/hw/mthca ofed/include/rdma X-SVN-Commit-Revision: 325807 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 14:51:39 -0000 Author: hselasky Date: Tue Nov 14 14:51:37 2017 New Revision: 325807 URL: https://svnweb.freebsd.org/changeset/base/325807 Log: Make sure the ib_wr_opcode enum is signed by adding a negative dummy element. Different compilers may optimise the enum type in different ways. This ensures coherency when range checking the value of enums in ibcore. Sponsored by: Mellanox Technologies MFC after: 1 week Modified: head/sys/dev/mlx5/mlx5_ib/mlx5_ib_qp.c head/sys/ofed/drivers/infiniband/hw/mthca/mthca_qp.c head/sys/ofed/include/rdma/ib_verbs.h Modified: head/sys/dev/mlx5/mlx5_ib/mlx5_ib_qp.c ============================================================================== --- head/sys/dev/mlx5/mlx5_ib/mlx5_ib_qp.c Tue Nov 14 14:43:35 2017 (r325806) +++ head/sys/dev/mlx5/mlx5_ib/mlx5_ib_qp.c Tue Nov 14 14:51:37 2017 (r325807) @@ -2497,7 +2497,7 @@ int mlx5_ib_post_send(struct ib_qp *ibqp, struct ib_se } for (nreq = 0; wr; nreq++, wr = wr->next) { - if (unlikely(wr->opcode >= ARRAY_SIZE(mlx5_ib_opcode))) { + if (unlikely(wr->opcode < 0 || wr->opcode >= ARRAY_SIZE(mlx5_ib_opcode))) { mlx5_ib_warn(dev, "Invalid opcode 0x%x\n", wr->opcode); err = -EINVAL; *bad_wr = wr; Modified: head/sys/ofed/drivers/infiniband/hw/mthca/mthca_qp.c ============================================================================== --- head/sys/ofed/drivers/infiniband/hw/mthca/mthca_qp.c Tue Nov 14 14:43:35 2017 (r325806) +++ head/sys/ofed/drivers/infiniband/hw/mthca/mthca_qp.c Tue Nov 14 14:51:37 2017 (r325807) @@ -1765,7 +1765,7 @@ int mthca_tavor_post_send(struct ib_qp *ibqp, struct i qp->wrid[ind] = wr->wr_id; - if (wr->opcode >= ARRAY_SIZE(mthca_opcode)) { + if (wr->opcode < 0 || wr->opcode >= ARRAY_SIZE(mthca_opcode)) { mthca_err(dev, "opcode invalid\n"); err = -EINVAL; *bad_wr = wr; Modified: head/sys/ofed/include/rdma/ib_verbs.h ============================================================================== --- head/sys/ofed/include/rdma/ib_verbs.h Tue Nov 14 14:43:35 2017 (r325806) +++ head/sys/ofed/include/rdma/ib_verbs.h Tue Nov 14 14:51:37 2017 (r325807) @@ -1136,6 +1136,8 @@ enum ib_wr_opcode { IB_WR_RESERVED8, IB_WR_RESERVED9, IB_WR_RESERVED10, + + IB_WR_DUMMY = -1, /* force enum type signed */ }; enum ib_send_flags { From owner-svn-src-head@freebsd.org Tue Nov 14 15:58:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3AF0DD49A4; Tue, 14 Nov 2017 15:58:06 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8112B6368A; Tue, 14 Nov 2017 15:58:06 +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 7986510A8BA; Tue, 14 Nov 2017 10:58:04 -0500 (EST) From: John Baldwin To: Warner Losh Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r325793 - head/sys/dev/pci Date: Tue, 14 Nov 2017 07:47:33 -0800 Message-ID: <1911777.0IZEGYVEAQ@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <201711140505.vAE555QF042553@repo.freebsd.org> References: <201711140505.vAE555QF042553@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Tue, 14 Nov 2017 10:58:04 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 15:58:06 -0000 On Tuesday, November 14, 2017 05:05:05 AM Warner Losh wrote: > Author: imp > Date: Tue Nov 14 05:05:05 2017 > New Revision: 325793 > URL: https://svnweb.freebsd.org/changeset/base/325793 > > Log: > Provide pcie_link_status and pcie_link_cap convenience functions. > > Sponsored by: Netflix Note that we already have pcie_read_config() (documented in the manpage). With pcie_read_config() these would be one liners: pcie_link_status() -> pcie_read_config(dev, PCIER_LINK_STA, 2); This is what the existing hotplug code uses rather than having dedicated functions for each PCI-e register. New functions should be documented in pci.9. -- John Baldwin From owner-svn-src-head@freebsd.org Tue Nov 14 16:31:13 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B6B6DD5D2F; Tue, 14 Nov 2017 16:31:13 +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 EA48A64CA6; Tue, 14 Nov 2017 16:31:12 +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 vAEGVBCs032830; Tue, 14 Nov 2017 16:31:12 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAEGVBGL032829; Tue, 14 Nov 2017 16:31:11 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201711141631.vAEGVBGL032829@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 14 Nov 2017 16:31:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325811 - head/sys/dev/vnic X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/dev/vnic X-SVN-Commit-Revision: 325811 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 16:31:13 -0000 Author: emaste Date: Tue Nov 14 16:31:11 2017 New Revision: 325811 URL: https://svnweb.freebsd.org/changeset/base/325811 Log: vnic: report that the driver supports multicast The driver is currently hardcoded to force promiscuous mode, so all of the MAC filtering code is presently unused and multicast should "just work." Report to the higher layers that multicast is supported. PR: 223573 Reported by: bz Sponsored by: The FreeBSD Foundation, Packet.net (hardware) Modified: head/sys/dev/vnic/nicvf_main.c Modified: head/sys/dev/vnic/nicvf_main.c ============================================================================== --- head/sys/dev/vnic/nicvf_main.c Tue Nov 14 16:03:07 2017 (r325810) +++ head/sys/dev/vnic/nicvf_main.c Tue Nov 14 16:31:11 2017 (r325811) @@ -350,7 +350,7 @@ nicvf_setup_ifnet(struct nicvf *nic) if_setsoftc(ifp, nic); if_initname(ifp, device_get_name(nic->dev), device_get_unit(nic->dev)); - if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX); + if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); if_settransmitfn(ifp, nicvf_if_transmit); if_setqflushfn(ifp, nicvf_if_qflush); From owner-svn-src-head@freebsd.org Tue Nov 14 16:32:42 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B2A9DD5DF7; Tue, 14 Nov 2017 16:32:42 +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 EA4EE65025; Tue, 14 Nov 2017 16:32:41 +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 vAEGWfkk035093; Tue, 14 Nov 2017 16:32:41 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAEGWeMV035092; Tue, 14 Nov 2017 16:32:40 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201711141632.vAEGWeMV035092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 14 Nov 2017 16:32:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325812 - head/etc X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/etc X-SVN-Commit-Revision: 325812 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 16:32:42 -0000 Author: asomers Date: Tue Nov 14 16:32:40 2017 New Revision: 325812 URL: https://svnweb.freebsd.org/changeset/base/325812 Log: devd.conf: add mps and mpr to the scsi controllers regex MFC after: 3 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D12744 Modified: head/etc/devd.conf Modified: head/etc/devd.conf ============================================================================== --- head/etc/devd.conf Tue Nov 14 16:31:11 2017 (r325811) +++ head/etc/devd.conf Tue Nov 14 16:32:40 2017 (r325812) @@ -20,7 +20,8 @@ options { #XXX Yes, these are gross -- imp set scsi-controller-regex "(aac|adv|adw|aha|ahc|ahd|aic|amr|bt|ciss|dpt|\ - esp|ida|iir|ips|isp|mlx|mly|mpt|ncr|ncv|nsp|stg|sym|trm)\ + esp|ida|iir|ips|isp|mlx|mly|mpr|mps|mpt|ncr|ncv|nsp|stg|sym|\ + trm)\ [0-9]+"; set wifi-driver-regex "(ath|bwi|bwn|ipw|iwi|iwm|iwn|malo|mwl|ral|rsu|rtwn|rum|run|\ From owner-svn-src-head@freebsd.org Tue Nov 14 16:47:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39D54DD7137; Tue, 14 Nov 2017 16:47:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA9C4655E0; Tue, 14 Nov 2017 16:47:06 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAEGl5EZ039472; Tue, 14 Nov 2017 16:47:05 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAEGl5wc039471; Tue, 14 Nov 2017 16:47:05 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201711141647.vAEGl5wc039471@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Tue, 14 Nov 2017 16:47:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325813 - head/sys/dev/vnic X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/dev/vnic X-SVN-Commit-Revision: 325813 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 16:47:07 -0000 Author: bz Date: Tue Nov 14 16:47:05 2017 New Revision: 325813 URL: https://svnweb.freebsd.org/changeset/base/325813 Log: Unbreak IPv6. No longer return ENXIO when trying to send an IPv6 packet in nicvf_sq_add_hdr_subdesc(). Restructure the code so that the upper layer protocol parts are agnostic of the L3 protocol (and no longer specific to IPv4). With this basic IPv6 packets go through. We are still seeing weird behaviour which needs further diagnosis. PR: 223669 In collaboration with: emaste MFC after: 3 days Modified: head/sys/dev/vnic/nicvf_queues.c Modified: head/sys/dev/vnic/nicvf_queues.c ============================================================================== --- head/sys/dev/vnic/nicvf_queues.c Tue Nov 14 16:32:40 2017 (r325812) +++ head/sys/dev/vnic/nicvf_queues.c Tue Nov 14 16:47:05 2017 (r325813) @@ -78,6 +78,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include #include @@ -1752,7 +1754,7 @@ nicvf_sq_add_hdr_subdesc(struct snd_queue *sq, int qen struct tcphdr *th; #endif uint16_t etype; - int ehdrlen, iphlen, poff; + int ehdrlen, iphlen, poff, proto; nic = sq->nic; @@ -1776,13 +1778,21 @@ nicvf_sq_add_hdr_subdesc(struct snd_queue *sq, int qen etype = ntohs(eh->evl_encap_proto); } + poff = proto = -1; switch (etype) { #ifdef INET6 case ETHERTYPE_IPV6: - /* ARM64TODO: Add support for IPv6 */ - hdr->csum_l3 = 0; - sq->snd_buff[qentry].mbuf = NULL; - return (ENXIO); + if (mbuf->m_len < ehdrlen + sizeof(struct ip6_hdr)) { + mbuf = m_pullup(mbuf, ehdrlen +sizeof(struct ip6_hdr)); + sq->snd_buff[qentry].mbuf = NULL; + if (mbuf == NULL) + return (ENOBUFS); + } + poff = ip6_lasthdr(mbuf, ehdrlen, IPPROTO_IPV6, &proto); + if (poff < 0) + return (ENOBUFS); + poff += ehdrlen; + break; #endif #ifdef INET case ETHERTYPE_IP: @@ -1796,71 +1806,70 @@ nicvf_sq_add_hdr_subdesc(struct snd_queue *sq, int qen ip = (struct ip *)(mbuf->m_data + ehdrlen); iphlen = ip->ip_hl << 2; poff = ehdrlen + iphlen; + proto = ip->ip_p; + break; +#endif + default: + hdr->csum_l3 = 0; + } - if (mbuf->m_pkthdr.csum_flags != 0) { - hdr->csum_l3 = 1; /* Enable IP csum calculation */ - switch (ip->ip_p) { - case IPPROTO_TCP: - if ((mbuf->m_pkthdr.csum_flags & CSUM_TCP) == 0) - break; - - if (mbuf->m_len < (poff + sizeof(struct tcphdr))) { - mbuf = m_pullup(mbuf, poff + sizeof(struct tcphdr)); - sq->snd_buff[qentry].mbuf = mbuf; - if (mbuf == NULL) - return (ENOBUFS); - } - hdr->csum_l4 = SEND_L4_CSUM_TCP; +#if defined(INET6) || defined(INET) + if (poff > 0 && mbuf->m_pkthdr.csum_flags != 0) { + hdr->csum_l3 = 1; /* Enable IP csum calculation */ + switch (proto) { + case IPPROTO_TCP: + if ((mbuf->m_pkthdr.csum_flags & CSUM_TCP) == 0) break; - case IPPROTO_UDP: - if ((mbuf->m_pkthdr.csum_flags & CSUM_UDP) == 0) - break; - if (mbuf->m_len < (poff + sizeof(struct udphdr))) { - mbuf = m_pullup(mbuf, poff + sizeof(struct udphdr)); - sq->snd_buff[qentry].mbuf = mbuf; - if (mbuf == NULL) - return (ENOBUFS); - } - hdr->csum_l4 = SEND_L4_CSUM_UDP; + if (mbuf->m_len < (poff + sizeof(struct tcphdr))) { + mbuf = m_pullup(mbuf, poff + sizeof(struct tcphdr)); + sq->snd_buff[qentry].mbuf = mbuf; + if (mbuf == NULL) + return (ENOBUFS); + } + hdr->csum_l4 = SEND_L4_CSUM_TCP; + break; + case IPPROTO_UDP: + if ((mbuf->m_pkthdr.csum_flags & CSUM_UDP) == 0) break; - case IPPROTO_SCTP: - if ((mbuf->m_pkthdr.csum_flags & CSUM_SCTP) == 0) - break; - if (mbuf->m_len < (poff + sizeof(struct sctphdr))) { - mbuf = m_pullup(mbuf, poff + sizeof(struct sctphdr)); - sq->snd_buff[qentry].mbuf = mbuf; - if (mbuf == NULL) - return (ENOBUFS); - } - hdr->csum_l4 = SEND_L4_CSUM_SCTP; + if (mbuf->m_len < (poff + sizeof(struct udphdr))) { + mbuf = m_pullup(mbuf, poff + sizeof(struct udphdr)); + sq->snd_buff[qentry].mbuf = mbuf; + if (mbuf == NULL) + return (ENOBUFS); + } + hdr->csum_l4 = SEND_L4_CSUM_UDP; + break; + case IPPROTO_SCTP: + if ((mbuf->m_pkthdr.csum_flags & CSUM_SCTP) == 0) break; - default: - break; + + if (mbuf->m_len < (poff + sizeof(struct sctphdr))) { + mbuf = m_pullup(mbuf, poff + sizeof(struct sctphdr)); + sq->snd_buff[qentry].mbuf = mbuf; + if (mbuf == NULL) + return (ENOBUFS); } - hdr->l3_offset = ehdrlen; - hdr->l4_offset = ehdrlen + iphlen; + hdr->csum_l4 = SEND_L4_CSUM_SCTP; + break; + default: + break; } + hdr->l3_offset = ehdrlen; + hdr->l4_offset = poff; + } - if ((mbuf->m_pkthdr.tso_segsz != 0) && nic->hw_tso) { - /* - * Extract ip again as m_data could have been modified. - */ - ip = (struct ip *)(mbuf->m_data + ehdrlen); - th = (struct tcphdr *)((caddr_t)ip + iphlen); + if ((mbuf->m_pkthdr.tso_segsz != 0) && nic->hw_tso) { + th = (struct tcphdr *)((caddr_t)(mbuf->m_data + poff)); - hdr->tso = 1; - hdr->tso_start = ehdrlen + iphlen + (th->th_off * 4); - hdr->tso_max_paysize = mbuf->m_pkthdr.tso_segsz; - hdr->inner_l3_offset = ehdrlen - 2; - nic->drv_stats.tx_tso++; - } - break; -#endif - default: - hdr->csum_l3 = 0; + hdr->tso = 1; + hdr->tso_start = poff + (th->th_off * 4); + hdr->tso_max_paysize = mbuf->m_pkthdr.tso_segsz; + hdr->inner_l3_offset = ehdrlen - 2; + nic->drv_stats.tx_tso++; } +#endif return (0); } From owner-svn-src-head@freebsd.org Tue Nov 14 17:00:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F7D3DD7507 for ; Tue, 14 Nov 2017 17:00:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x234.google.com (mail-io0-x234.google.com [IPv6:2607:f8b0:4001:c06::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 D6BEE65B8B for ; Tue, 14 Nov 2017 17:00:55 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x234.google.com with SMTP id 189so25074806iow.10 for ; Tue, 14 Nov 2017 09:00:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=aVZVkTsimYXL2kdaGxVqYOKqaLvLtNgK6Xn3dI6Qbs8=; b=V0mJWS73JvO1CvqrrfvqMctH5CXIUiWVCCJWhMgeNhMZQRfbeBP+9tiJz5LtW5oi+y up6OuZDpU26vW5aV/RVfWoNufM7Dzev0HKaqKa5PPk73RRnSBHXOTjzAF8FfZyugw64f GNqjDX1hHZnUkW7+3jO9t60zyeb3PgdyTQhQhuY2/o2uSxYOp6kA2vNOMPGiD6rWDV0R lfwo1fZwjKjK/tvrsb4t/xUr7EdKCUtPz14XEL1F+50Rs6euafml87nVgtV/a71Y0WWX xoX2TITEPWZBQoS0I0VzuKICzN9Oo6JgupXD9yiDQ8atrGNDlFpR1i9lQScsYegLim+u dK/w== 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=aVZVkTsimYXL2kdaGxVqYOKqaLvLtNgK6Xn3dI6Qbs8=; b=HEk0/UZDG3eLjG6KBN79rerMj+Qgu8Ut6JfgWEViq3+DVVAkNMJnnOckEVoseF0b62 3jpP9nxgfTco7sPxAiZKXLeOtWF5yurCGTxctbLRYyweJZyQa6a5m8zY3zu5lGKKV75u PH43HMMAVCerj3O+XH4s7OH6qqdRq4D0OdrRC1MwyJ/KiRUmONTNQaG2CIE1a6Q/84rh jaWZbdIjVb/L4A2jPsouWzjjRux5LWGLhKzaWrheNO0OULxNZEwVNiFcPvsgpKSXHe6M qjhLY5eapTTYwMe2vQd+mzaot9i6EGg4y/0g0rq2gIqgo+228chVSPAJvYvhsRAeWWjT Y07A== X-Gm-Message-State: AJaThX4apFICTQFp+PuYYSs1YwLMQJednLoctde0wZ/iXGyICtKcg3F0 tf63HQxWh2Z0t+X72LHBb+1iox+CkbC4NH/7VozfNg== X-Google-Smtp-Source: AGs4zMbcDIUy/JcLtgT/S4RfkSwajxHgLunBFvjEjQkfQAEIrUTHoAq+bEwKwIk9QOKMBq/GAzsNpDAAttTs4RX5OIg= X-Received: by 10.107.48.195 with SMTP id w186mr180705iow.301.1510678854755; Tue, 14 Nov 2017 09:00:54 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Tue, 14 Nov 2017 09:00:54 -0800 (PST) X-Originating-IP: [50.253.109.65] In-Reply-To: <1911777.0IZEGYVEAQ@ralph.baldwin.cx> References: <201711140505.vAE555QF042553@repo.freebsd.org> <1911777.0IZEGYVEAQ@ralph.baldwin.cx> From: Warner Losh Date: Tue, 14 Nov 2017 10:00:54 -0700 X-Google-Sender-Auth: U9pHCW7YgS_h4zWAOpxuWTdiAwI Message-ID: Subject: Re: svn commit: r325793 - head/sys/dev/pci To: John Baldwin Cc: Warner Losh , 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.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 17:00:56 -0000 On Tue, Nov 14, 2017 at 8:47 AM, John Baldwin wrote: > On Tuesday, November 14, 2017 05:05:05 AM Warner Losh wrote: > > Author: imp > > Date: Tue Nov 14 05:05:05 2017 > > New Revision: 325793 > > URL: https://svnweb.freebsd.org/changeset/base/325793 > > > > Log: > > Provide pcie_link_status and pcie_link_cap convenience functions. > > > > Sponsored by: Netflix > > Note that we already have pcie_read_config() (documented in the manpage). > With pcie_read_config() these would be one liners: > > pcie_link_status() -> pcie_read_config(dev, PCIER_LINK_STA, 2); > > This is what the existing hotplug code uses rather than having dedicated > functions for each PCI-e register. > > New functions should be documented in pci.9. > Thanks for the reminders. I'll either transition to the one liner you talked about, or document the new functions. Warner From owner-svn-src-head@freebsd.org Tue Nov 14 17:16:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D25CDD802C; Tue, 14 Nov 2017 17:16:05 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D7F97669CD; Tue, 14 Nov 2017 17:16:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAEHG3So052161; Tue, 14 Nov 2017 17:16:03 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAEHG3vG052160; Tue, 14 Nov 2017 17:16:03 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201711141716.vAEHG3vG052160@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 14 Nov 2017 17:16:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325816 - head/libexec/rtld-elf/mips X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/libexec/rtld-elf/mips X-SVN-Commit-Revision: 325816 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 17:16:05 -0000 Author: jhb Date: Tue Nov 14 17:16:03 2017 New Revision: 325816 URL: https://svnweb.freebsd.org/changeset/base/325816 Log: Appease old GCC by disabling .cfi_sections for GCC 4.x. Modified: head/libexec/rtld-elf/mips/rtld_start.S Modified: head/libexec/rtld-elf/mips/rtld_start.S ============================================================================== --- head/libexec/rtld-elf/mips/rtld_start.S Tue Nov 14 17:05:34 2017 (r325815) +++ head/libexec/rtld-elf/mips/rtld_start.S Tue Nov 14 17:16:03 2017 (r325816) @@ -32,7 +32,9 @@ #include +#if defined(__clang__) || (defined(__GNUC__) && __GNUC__ > 4) .cfi_sections .debug_frame +#endif .globl _C_LABEL(_rtld_relocate_nonplt_self) .globl _C_LABEL(_rtld) From owner-svn-src-head@freebsd.org Tue Nov 14 17:46:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2226DD90B2; Tue, 14 Nov 2017 17:46:38 +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 B356767DC6; Tue, 14 Nov 2017 17:46:38 +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 vAEHkbZ0064688; Tue, 14 Nov 2017 17:46:37 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAEHkbVb064686; Tue, 14 Nov 2017 17:46:37 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201711141746.vAEHkbVb064686@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 14 Nov 2017 17:46:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325817 - head/tests/sys/aio X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/tests/sys/aio X-SVN-Commit-Revision: 325817 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 17:46:39 -0000 Author: asomers Date: Tue Nov 14 17:46:37 2017 New Revision: 325817 URL: https://svnweb.freebsd.org/changeset/base/325817 Log: AIO tests: increase limits tests/sys/aio/aio_kqueue_test.c Instead of using a hard-coded queue depth, use vfs.aio.max_aio_queue_per_proc tests/sys/aio/lio_kqueue_test.c The old, small limit on lio_listio's operation count was lifted by change 324941. Raise the operation count as high as possible without exceeding the process's operation limit. MFC after: 3 weeks Sponsored by: Spectra Logic Corp Modified: head/tests/sys/aio/aio_kqueue_test.c head/tests/sys/aio/lio_kqueue_test.c Modified: head/tests/sys/aio/aio_kqueue_test.c ============================================================================== --- head/tests/sys/aio/aio_kqueue_test.c Tue Nov 14 17:16:03 2017 (r325816) +++ head/tests/sys/aio/aio_kqueue_test.c Tue Nov 14 17:46:37 2017 (r325817) @@ -51,28 +51,37 @@ #define PATH_TEMPLATE "aio.XXXXXXXXXX" -#define MAX_IOCBS 128 #define MAX_RUNS 300 /* #define DEBUG */ int main (int argc, char *argv[]) { - struct aiocb *iocb[MAX_IOCBS], *kq_iocb; + struct aiocb **iocb, *kq_iocb; char *file, pathname[sizeof(PATH_TEMPLATE)+1]; struct kevent ke, kq_returned; struct timespec ts; char buffer[32768]; + int max_queue_per_proc; + size_t max_queue_per_proc_size; #ifdef DEBUG int cancel, error; #endif int failed = 0, fd, kq, pending, result, run; int tmp_file = 0; - unsigned i, j; + int i, j; PLAIN_REQUIRE_KERNEL_MODULE("aio", 0); PLAIN_REQUIRE_UNSAFE_AIO(0); + max_queue_per_proc_size = sizeof(max_queue_per_proc); + if (sysctlbyname("vfs.aio.max_aio_queue_per_proc", + &max_queue_per_proc, &max_queue_per_proc_size, NULL, 0) != 0) + err(1, "sysctlbyname"); + iocb = calloc(max_queue_per_proc, sizeof(struct aiocb*)); + if (iocb == NULL) + err(1, "calloc"); + kq = kqueue(); if (kq < 0) { perror("No kqeueue\n"); @@ -95,7 +104,7 @@ main (int argc, char *argv[]) #ifdef DEBUG printf("Run %d\n", run); #endif - for (i = 0; i < nitems(iocb); i++) { + for (i = 0; i < max_queue_per_proc; i++) { iocb[i] = (struct aiocb *)calloc(1, sizeof(struct aiocb)); if (iocb[i] == NULL) @@ -103,7 +112,7 @@ main (int argc, char *argv[]) } pending = 0; - for (i = 0; i < nitems(iocb); i++) { + for (i = 0; i < max_queue_per_proc; i++) { pending++; iocb[i]->aio_nbytes = sizeof(buffer); iocb[i]->aio_buf = buffer; @@ -139,7 +148,7 @@ main (int argc, char *argv[]) } } #ifdef DEBUG - cancel = nitems(iocb) - pending; + cancel = max_queue_per_proc - pending; #endif i = 0; @@ -173,11 +182,11 @@ main (int argc, char *argv[]) break; #ifdef DEBUG printf("Try again left %d out of %lu %d\n", - pending, nitems(iocb), cancel); + pending, max_queue_per_proc, cancel); #endif } - for (j = 0; j < nitems(iocb) && iocb[j] != kq_iocb; + for (j = 0; j < max_queue_per_proc && iocb[j] != kq_iocb; j++) ; #ifdef DEBUG printf("kq_iocb %p\n", kq_iocb); @@ -204,7 +213,7 @@ main (int argc, char *argv[]) i++; } - for (i = 0; i < nitems(iocb); i++) + for (i = 0; i < max_queue_per_proc; i++) free(iocb[i]); } Modified: head/tests/sys/aio/lio_kqueue_test.c ============================================================================== --- head/tests/sys/aio/lio_kqueue_test.c Tue Nov 14 17:16:03 2017 (r325816) +++ head/tests/sys/aio/lio_kqueue_test.c Tue Nov 14 17:46:37 2017 (r325817) @@ -27,14 +27,7 @@ /* * Note: it is a good idea to run this against a physical drive to - * exercise the physio fast path (ie. lio_kqueue /dev/) - * This will ensure op's counting is correct. It is currently broken. - * - * Also note that LIO & kqueue is not implemented in FreeBSD yet, LIO - * is also broken with respect to op's and some paths. - * - * A patch to make this work is at: - * http://www.ambrisko.com/doug/listio_kqueue/listio_kqueue.patch + * exercise the physio fast path (ie. lio_kqueue_test /dev/) */ #include @@ -54,9 +47,10 @@ #define PATH_TEMPLATE "aio.XXXXXXXXXX" +#define DEBUG #define LIO_MAX 5 -#define IOCBS_PER_LIO 16 -#define MAX_IOCBS (LIO_MAX * IOCBS_PER_LIO) +#define MAX_IOCBS_PER_LIO 64 +#define MAX_IOCBS (LIO_MAX * MAX_IOCBS_PER_LIO) #define MAX_RUNS 300 int @@ -65,7 +59,9 @@ main(int argc, char *argv[]) int fd; struct aiocb *iocb[MAX_IOCBS]; struct aiocb **lio[LIO_MAX], **kq_lio; - int i, result, run, error, j, k; + int i, result, run, error, j, k, max_queue_per_proc; + int max_iocbs, iocbs_per_lio; + size_t max_queue_per_proc_size; char buffer[32768]; int kq; struct kevent ke, kq_returned; @@ -78,6 +74,13 @@ main(int argc, char *argv[]) PLAIN_REQUIRE_KERNEL_MODULE("aio", 0); PLAIN_REQUIRE_UNSAFE_AIO(0); + max_queue_per_proc_size = sizeof(max_queue_per_proc); + if (sysctlbyname("vfs.aio.max_aio_queue_per_proc", + &max_queue_per_proc, &max_queue_per_proc_size, NULL, 0) != 0) + err(1, "sysctlbyname"); + iocbs_per_lio = max_queue_per_proc / LIO_MAX; + max_iocbs = LIO_MAX * iocbs_per_lio; + kq = kqueue(); if (kq < 0) err(1, "kqeueue(2) failed"); @@ -104,9 +107,9 @@ main(int argc, char *argv[]) #endif for (j = 0; j < LIO_MAX; j++) { lio[j] = - malloc(sizeof(struct aiocb *) * IOCBS_PER_LIO); - for (i = 0; i < IOCBS_PER_LIO; i++) { - k = (IOCBS_PER_LIO * j) + i; + malloc(sizeof(struct aiocb *) * iocbs_per_lio); + for (i = 0; i < iocbs_per_lio; i++) { + k = (iocbs_per_lio * j) + i; lio[j][i] = iocb[k] = calloc(1, sizeof(struct aiocb)); iocb[k]->aio_nbytes = sizeof(buffer); @@ -126,7 +129,7 @@ main(int argc, char *argv[]) sig.sigev_notify = SIGEV_KEVENT; time(&time1); result = lio_listio(LIO_NOWAIT, lio[j], - IOCBS_PER_LIO, &sig); + iocbs_per_lio, &sig); error = errno; time(&time2); #ifdef DEBUG @@ -202,10 +205,10 @@ main(int argc, char *argv[]) failed++; } else printf("PASS: run %d, operation %d result %d \n", run, LIO_MAX - i -1, result); - for (k = 0; k < MAX_IOCBS / LIO_MAX; k++) { + for (k = 0; k < max_iocbs / LIO_MAX; k++) { result = aio_return(kq_lio[k]); #ifdef DEBUG - printf("Return Resulto for %d %d is %d\n", j, k, result); + printf("Return Result for %d %d is %d\n", j, k, result); #endif if (result != sizeof(buffer)) { printf("FAIL: run %d, operation %d sub-opt %d result %d (errno=%d) should be %zu\n", @@ -219,7 +222,7 @@ main(int argc, char *argv[]) printf("\n"); #endif - for (k = 0; k < MAX_IOCBS / LIO_MAX; k++) + for (k = 0; k < max_iocbs / LIO_MAX; k++) free(lio[j][k]); free(lio[j]); lio[j] = NULL; From owner-svn-src-head@freebsd.org Tue Nov 14 18:18:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CB69DDA08E; Tue, 14 Nov 2017 18:18:19 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69B9469A6F; Tue, 14 Nov 2017 18:18:19 +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 vAEIIIOi078188; Tue, 14 Nov 2017 18:18:18 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAEIIILV078187; Tue, 14 Nov 2017 18:18:18 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201711141818.vAEIIILV078187@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 14 Nov 2017 18:18:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325825 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 325825 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 18:18:19 -0000 Author: emaste Date: Tue Nov 14 18:18:18 2017 New Revision: 325825 URL: https://svnweb.freebsd.org/changeset/base/325825 Log: disallow clock_settime too far in the future to avoid panic clock_ts_to_ct has a KASSERT that the converted year fits into four digits. By default (sysctl debug.allow_insane_settime is 0) the kernel disallows a time too far in the future, using a value of 9999 366-day years. However, clock_settime is epoch-relative and the assertion will fail with a tv_sec corresponding to some 8030 years. Avoid trying to be too clever, and just use a limit of 8000 365-day years past the epoch. Submitted by: Heqing Yan Reported by: Syzkaller (https://github.com/google/syzkaller) MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/kern_time.c Modified: head/sys/kern/kern_time.c ============================================================================== --- head/sys/kern/kern_time.c Tue Nov 14 18:17:23 2017 (r325824) +++ head/sys/kern/kern_time.c Tue Nov 14 18:18:18 2017 (r325825) @@ -408,7 +408,7 @@ kern_clock_settime(struct thread *td, clockid_t clock_ if (ats->tv_nsec < 0 || ats->tv_nsec >= 1000000000 || ats->tv_sec < 0) return (EINVAL); - if (!allow_insane_settime && ats->tv_sec > 9999ULL * 366 * 24 * 60 * 60) + if (!allow_insane_settime && ats->tv_sec > 8000ULL * 365 * 24 * 60 * 60) return (EINVAL); /* XXX Don't convert nsec->usec and back */ TIMESPEC_TO_TIMEVAL(&atv, ats); From owner-svn-src-head@freebsd.org Tue Nov 14 18:26:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 484DADDA469; Tue, 14 Nov 2017 18:26:33 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf0-x22a.google.com (mail-lf0-x22a.google.com [IPv6:2a00:1450:4010:c07::22a]) (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 BF04F69F6A; Tue, 14 Nov 2017 18:26:32 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf0-x22a.google.com with SMTP id 73so9065662lfu.10; Tue, 14 Nov 2017 10:26:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=P3hXWwaYd5EvFlcePIGF5COOWXO5f71hGMLHgTNH8W0=; b=m/eY6DyYS+q3KCdgDwABMwq4aUeNxw5d02GTLnHr6QmgjTeIKI7/im1aphCD0H0mh6 2NohYKMhKJa6CP8+6RQfxNopo8wlLKnBl1Di1zlBy3o/DGuh+5cFP8bqB+7RezvYUU9e SRPjyAmgNsA1WKABUR/ypaqqLbHoPx69yx+kv/Z226Y93Yq4dSfMgnLUFyhHzmclVeiT AGwVPv3made8Ji8C1/BBVnfjIDrs2c/GbMqdx8Y/y4NCGiE48a3WAzcKno0B2EMDbWgw d2K7DKJBaMXO3mazTGbwzX1Bag1CW3My3qcIzLnkndzOAhJBhB69uZOeg9FiuN3FpYYQ bNNg== 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:content-transfer-encoding; bh=P3hXWwaYd5EvFlcePIGF5COOWXO5f71hGMLHgTNH8W0=; b=d3XlijhrPsfflCB4ENmAqolbwUZYiBz9Gq5E+K4/ht8QllB7DeOXdcy163N5t/a9ig esp3oibZqh3UnFHH9nUmFaKfEyTI1CTySi2RKONURvSUsPMklVmIlhADn3d/N5XLSeD1 VJtTdGvluVaZjQg4/h7geAvJS+02LsrvkzIr8o9vKW+otPq5pxYqgSAVhfzl+WUjjSig 2Ak4D3bYCLUeQIUrAvUezlz8Tr5fHvUhD9CF1woXy9xv3bTr0yU93pwkYoOBZRe63zeY FiH/ssq1U5vDBBSOhTPJncFwcq7cqO2pZHCzL4qjPvT39neHQkpwucMDJ/f6Sb1L6Fqd 8L2g== X-Gm-Message-State: AJaThX7s3PuDee0n6+m6BiDK8G3j4b0iq4ymV+wUp6pKW9oxRvEvMYmA GG4S1v22Ry0wG3MEcviIHLs7THBjLrLDJM38K2AaAw== X-Google-Smtp-Source: AGs4zMYZczRfMsIMrWSKmvOXj/7FCuwPV5vZaO+1L6hfP1Zxe7MhVlYBAe8/4Ue0a6fU4bcmAjT0RE9N1wBTU/Fa164= X-Received: by 10.25.29.78 with SMTP id d75mr3761621lfd.39.1510683990541; Tue, 14 Nov 2017 10:26:30 -0800 (PST) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.179.93.24 with HTTP; Tue, 14 Nov 2017 10:26:29 -0800 (PST) In-Reply-To: <582427C7.5020007@omnilan.de> References: <201611021513.uA2FDPk6062463@repo.freebsd.org> <581C5249.2060104@omnilan.de> <161EBBC5-F642-4A05-9361-179B74CDA50A@samsco.org> <582427C7.5020007@omnilan.de> From: Alan Somers Date: Tue, 14 Nov 2017 11:26:29 -0700 X-Google-Sender-Auth: _towBn4zAFmZChrMT2WHgcjwFBg Message-ID: Subject: Re: svn commit: r308217 - in head/sys/dev: mpr mps To: Harry Schmalzbauer Cc: Scott Long , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 18:26:33 -0000 On Thu, Nov 10, 2016 at 12:54 AM, Harry Schmalzbauer w= rote: > Bez=C3=BCglich Scott Long's Nachricht vom 09.11.2016 17:06 (localtime): >> >>> On Nov 4, 2016, at 3:18 AM, Harry Schmalzbauer wro= te: > =E2=80=A6 >>> If it's really mps(4) who decides to store driveserial-targetID >>> numbering in the /"persitent non-manufacturing config pages/" of the >>> controller, mpsutil(8) should be able to reset. Otherwise replacing >>> failed drives, or - even mor confusing - rearranging drive/zpool layout= s >>> is very unsatisfying. >>> >>> Maybe "-1" should be mentioned with sysctl decription, otherwise this i= s >>> another very hard to find/influence behaviour. >>> >>> >> >> Thanks for the feedback. For the record, this problem happens on a >> Supermicro X10SDV-7TP4F motherboard. It appears that the support >> logic around the LSI controller is mis-configured to show the SAS ports >> being part of an enclosure with 0 slots, instead of 8. This confuses >> the device mapper logic in the driver that activates if the controller N= VRAM >> doesn=E2=80=99t specify a pre-existing mapping. Typically this is not t= he default, >> the NVRAM persistent mappings are the default and are used by the driver= , >> so I considered this problem to be unique to our deployment. Maybe it= =E2=80=99s >> more of a problem than I estimated? Anyways, sounds like this new > > I haven't had too much diversity regarding Fusion-MPT and this mapping > problem has never hit me yet, so I can't help estimating the severity of > that specific problem. > > But I think I haven't described clearly that I'm having da(4)-numbering > problems which are not directly enclosure-mapping related (at least not > related to the nvram mapping page), but which hopefully could be worked > arround the same way: > > I frequently had problems replacing drives due to the eternal targetID > assigning (every drive with a new/unknown serial gets a consecutive > targetID regardless of the enclosure-slot or the number of attached drive= s). > I guess this is stored in a completely different NVRAM page than the > enclosure-mapping page. > Your patch is intended to solve problems with invalid/absent > enclosure-mapping page, but I guess I'll sooner or later need to try the > "hw.mpr.use_phy_num=3D-1" sysctl > to hopefully overwrite the targetID++ assigning, which causes "wholes" > every time a drive gets replaced. > In that case it's just a cosmetic problem, but when rearranging old and > new drives on the same controller, it can cause severe confusion for the > admins =E2=80=93 leading to fatal mistakes. And migrating disks to new > controller/chassis is even more problematic if the host had hard wired > da(4) assignins via device.hints. > > I couldn't search the driver to find out if the "save eternal targetID > in nvram page N" is really present and not firmware-only induced, but > since I saw a different behaviour on windows, I guess it is. > I could circumvent the problem by simply using IR firmware since it is > only active when mps(4) runs IT firmware. > > But having a way to disable "save eternal targetID in nvram page N" for > mps(4)-IT (via sysctl, and possibly for mpr/mpt also) would be very welco= me. > > Top on my wishlist was extending mpsutil(8) to be able to list and > selectively delete single serial-targetID mappings, but I haven't even > found a way to do that with any vendor provided tool, not even with > LSIUtil =E2=80=93 where I can at least erase _all_ mappings. > > >> functionality should be properly documented in the driver. > > Thanks for your continuous supprt/help/improvements! > > -Harry We've run into a situation where we had to use this fallback logic too. In our case, it happened when upgrading mpr HBA firmware from 14.0.0.0 to 15.0.0.0, which corrupted the internal mapping tables. I fixed the resulting panic in r325363, but that exposed a problem with the fallback logic. Since the fallback logic uses the phy number as the target ID, it doesn't work on SAS busses with more than one expander. In that case, multiple drives can get the same target ID, and only the first is usable. In our codebase, I fixed this by setting the id to ((config_page.EnclosureHandle - 1) << 7) | config_page.Slot; . That formula will work for enclosures of up to 128 slots and 8 enclosures. However, it will obviously fail if the enclosure assigns the same Slot to multiple drives. That sounds like the case for Scott. Are there any alternatives I'm missing that would satisfy everyone? -Alan From owner-svn-src-head@freebsd.org Tue Nov 14 19:06:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 677A9DDB37C; Tue, 14 Nov 2017 19:06:31 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.92]) (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 2FA3C6B88B; Tue, 14 Nov 2017 19:06:30 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smtp.greenhost.nl ([213.108.104.138]) by smarthost1.greenhost.nl with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1eEgIB-00005O-JN; Tue, 14 Nov 2017 19:50:39 +0100 Content-Type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, "Warner Losh" Subject: Re: svn commit: r325785 - in head: sys/kern tools/tools/sysdoc References: <201711140029.vAE0TEVO024994@repo.freebsd.org> Date: Tue, 14 Nov 2017 19:50:33 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Ronald Klop" Message-ID: In-Reply-To: <201711140029.vAE0TEVO024994@repo.freebsd.org> User-Agent: Opera Mail/1.0 (Win32) X-Authenticated-As-Hash: bdb49c4ff80bd276e321aade33e76e02752072e2 X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: / X-Spam-Score: -0.2 X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 autolearn=disabled version=3.4.0 X-Scan-Signature: 22b714be0c51703cd3047a81d17f7b3c X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 19:06:31 -0000 Just out of curiosity. What happens if you enable both? Regards, Ronald. On Tue, 14 Nov 2017 01:29:14 +0100, Warner Losh wrote: > Author: imp > Date: Tue Nov 14 00:29:14 2017 > New Revision: 325785 > URL: https://svnweb.freebsd.org/changeset/base/325785 > > Log: > Add two new tunables / sysctls to controll reboot after panic: > kern.poweroff_on_panic which, when enabled, instructs a system to > power off on a panic instead of a reboot. > kern.powercyle_on_panic which, when enabled, instructs a system to > power cycle, if possible, on a panic instead of a reboot. > Sponsored by: Netflix > Differential Revision: https://reviews.freebsd.org/D13042 > > Modified: > head/sys/kern/kern_shutdown.c > head/tools/tools/sysdoc/tunables.mdoc > > Modified: head/sys/kern/kern_shutdown.c > ============================================================================== > --- head/sys/kern/kern_shutdown.c Mon Nov 13 23:33:07 2017 (r325784) > +++ head/sys/kern/kern_shutdown.c Tue Nov 14 00:29:14 2017 (r325785) > @@ -134,6 +134,14 @@ static int sync_on_panic = 0; > SYSCTL_INT(_kern, OID_AUTO, sync_on_panic, CTLFLAG_RWTUN, > &sync_on_panic, 0, "Do a sync before rebooting from a panic"); > +static bool poweroff_on_panic = 0; > +SYSCTL_BOOL(_kern, OID_AUTO, poweroff_on_panic, CTLFLAG_RWTUN, > + &poweroff_on_panic, 0, "Do a power off instead of a reboot on a > panic"); > + > +static bool powercycle_on_panic = 0; > +SYSCTL_BOOL(_kern, OID_AUTO, powercycle_on_panic, CTLFLAG_RWTUN, > + &powercycle_on_panic, 0, "Do a power cycle instead of a reboot on a > panic"); > + > static SYSCTL_NODE(_kern, OID_AUTO, shutdown, CTLFLAG_RW, 0, > "Shutdown environment"); > @@ -797,6 +805,10 @@ vpanic(const char *fmt, va_list ap) > /* thread_unlock(td); */ > if (!sync_on_panic) > bootopt |= RB_NOSYNC; > + if (poweroff_on_panic) > + bootopt |= RB_POWEROFF; > + if (powercycle_on_panic) > + bootopt |= RB_POWERCYCLE; > kern_reboot(bootopt); > } > > Modified: head/tools/tools/sysdoc/tunables.mdoc > ============================================================================== > --- head/tools/tools/sysdoc/tunables.mdoc Mon Nov 13 23:33:07 > 2017 (r325784) > +++ head/tools/tools/sysdoc/tunables.mdoc Tue Nov 14 00:29:14 > 2017 (r325785) > @@ -1035,6 +1035,20 @@ is attempting to comply with. > This is a read-only variable. > --- > +kern.powercycle_on_panic > +bool > + > +In the event of a panic, this variable controls whether or not the > +system should try to power cycle instead of rebooting. > + > +--- > +kern.poweroff_on_panic > +bool > + > +In the event of a panic, this variable controls whether or not the > +system should try to power off instead of rebooting. > + > +--- > kern.proc.all > --- > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@freebsd.org Tue Nov 14 19:18:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B41F6DDB695 for ; Tue, 14 Nov 2017 19:18:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22a.google.com (mail-it0-x22a.google.com [IPv6:2607:f8b0:4001:c0b::22a]) (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 76A416BE94 for ; Tue, 14 Nov 2017 19:18:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22a.google.com with SMTP id m191so14964917itg.2 for ; Tue, 14 Nov 2017 11:18:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=unL8XMZmBL/dXpXkMAcvFUSnBZQ9B9eiMZkzag43SKg=; b=SFzr2RHr9J/NvTjJcbjQpx6rW7/fpbnW4WF0TNAhQ8vBg8oPYfX38H3kwTgOAkdUkO rsMnEPqK5PvjGO8xPMdC10IoAPLjVYblxxpcUz+2FeS6yatIW2yyZ76vej8aBXZI1B28 emHrEWjT0nplnLkcES9yN1Vem/0XZBPuvTUbUrLZl8PgeQVW4TLlMf4rSc9zYDOTDGOd K1Twn0XEumnBUikba8MMMbcE61xS9X4/RPNjYcSv+nJtoK+qVk9A5sJncBt3R/gDvmCG NNaRTYbW5aWOhRb4NnAEkCNASrq9a18JZVpDigJgNRP0lR3o3ZNp/UbslSYaWNOQi0J7 JyKg== 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=unL8XMZmBL/dXpXkMAcvFUSnBZQ9B9eiMZkzag43SKg=; b=ARigCWqcyNCzYxtGIf1cFHaGe7mVnxmtluUFdoV3m8Yy6iOC12LFMrddFCryFVd/k0 6jbV52qnZoOBQtPm+lyvri/WAXpMWCKQGBr4VXtPXmKj5GmSC4nH++ViNGIHpvirrhsC 3gJuBrkXNj+JAC/V7CZUr0MLun2IAYx3bVd3kYHO2HCuEPDSaGFiiJaZKmj2JF+jdBgw qz+Rw2loFTYV6b7gRWe6sGTuhkNSFFwGa6uYTkpOEvBYz31hWnNCfvGnsc5Q4EBYKNi3 4HtFGBlJ0nWhFPYm8SZxWNY1pzXF5TVYx4ze3SiljK5wnoLFfXaVY9XSv0G/Mn9StsX6 jVwg== X-Gm-Message-State: AJaThX7zI6OwXnFqrWfrBjcy08BL73fRAXTyHbOj9O7GrDurkiVLi8qs 4k7wZbGZV5pvn5sDg6DUieoWmi4m6EStyAotJytuKA== X-Google-Smtp-Source: AGs4zMbw4xhz9teXp9UR7Rg+CCS4SaH+JjVtKF5ScO+xuyRTWc71kdy5vlbU7ntOMB94vI4Xl+pXbFw+8zKL/FNm1j4= X-Received: by 10.36.184.5 with SMTP id m5mr17198688ite.69.1510687098352; Tue, 14 Nov 2017 11:18:18 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Tue, 14 Nov 2017 11:18:17 -0800 (PST) X-Originating-IP: [50.253.109.65] In-Reply-To: References: <201711140029.vAE0TEVO024994@repo.freebsd.org> From: Warner Losh Date: Tue, 14 Nov 2017 12:18:17 -0700 X-Google-Sender-Auth: y6bIJWW2GkE9J8t4oTRBFqO0MJ4 Message-ID: Subject: Re: svn commit: r325785 - in head: sys/kern tools/tools/sysdoc To: Ronald Klop Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Warner Losh Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 19:18:19 -0000 As implemented today, the power cycle shutdown handler has a higher priority than the power off handlers. So, if you have IPMI enabled, the power cylce will take precedence and that will happen. If not (or the IPMI fails to power off within the timeout period), then the power off will happen. Warner On Tue, Nov 14, 2017 at 11:50 AM, Ronald Klop wrote: > Just out of curiosity. What happens if you enable both? > > Regards, > Ronald. > > > > On Tue, 14 Nov 2017 01:29:14 +0100, Warner Losh wrote: > > Author: imp >> Date: Tue Nov 14 00:29:14 2017 >> New Revision: 325785 >> URL: https://svnweb.freebsd.org/changeset/base/325785 >> >> Log: >> Add two new tunables / sysctls to controll reboot after panic: >> kern.poweroff_on_panic which, when enabled, instructs a system to >> power off on a panic instead of a reboot. >> kern.powercyle_on_panic which, when enabled, instructs a system to >> power cycle, if possible, on a panic instead of a reboot. >> Sponsored by: Netflix >> Differential Revision: https://reviews.freebsd.org/D13042 >> >> Modified: >> head/sys/kern/kern_shutdown.c >> head/tools/tools/sysdoc/tunables.mdoc >> >> Modified: head/sys/kern/kern_shutdown.c >> ============================================================ >> ================== >> --- head/sys/kern/kern_shutdown.c Mon Nov 13 23:33:07 2017 >> (r325784) >> +++ head/sys/kern/kern_shutdown.c Tue Nov 14 00:29:14 2017 >> (r325785) >> @@ -134,6 +134,14 @@ static int sync_on_panic = 0; >> SYSCTL_INT(_kern, OID_AUTO, sync_on_panic, CTLFLAG_RWTUN, >> &sync_on_panic, 0, "Do a sync before rebooting from a panic"); >> +static bool poweroff_on_panic = 0; >> +SYSCTL_BOOL(_kern, OID_AUTO, poweroff_on_panic, CTLFLAG_RWTUN, >> + &poweroff_on_panic, 0, "Do a power off instead of a reboot on a >> panic"); >> + >> +static bool powercycle_on_panic = 0; >> +SYSCTL_BOOL(_kern, OID_AUTO, powercycle_on_panic, CTLFLAG_RWTUN, >> + &powercycle_on_panic, 0, "Do a power cycle instead of a reboot on >> a panic"); >> + >> static SYSCTL_NODE(_kern, OID_AUTO, shutdown, CTLFLAG_RW, 0, >> "Shutdown environment"); >> @@ -797,6 +805,10 @@ vpanic(const char *fmt, va_list ap) >> /* thread_unlock(td); */ >> if (!sync_on_panic) >> bootopt |= RB_NOSYNC; >> + if (poweroff_on_panic) >> + bootopt |= RB_POWEROFF; >> + if (powercycle_on_panic) >> + bootopt |= RB_POWERCYCLE; >> kern_reboot(bootopt); >> } >> >> Modified: head/tools/tools/sysdoc/tunables.mdoc >> ============================================================ >> ================== >> --- head/tools/tools/sysdoc/tunables.mdoc Mon Nov 13 23:33:07 >> 2017 (r325784) >> +++ head/tools/tools/sysdoc/tunables.mdoc Tue Nov 14 00:29:14 >> 2017 (r325785) >> @@ -1035,6 +1035,20 @@ is attempting to comply with. >> This is a read-only variable. >> --- >> +kern.powercycle_on_panic >> +bool >> + >> +In the event of a panic, this variable controls whether or not the >> +system should try to power cycle instead of rebooting. >> + >> +--- >> +kern.poweroff_on_panic >> +bool >> + >> +In the event of a panic, this variable controls whether or not the >> +system should try to power off instead of rebooting. >> + >> +--- >> kern.proc.all >> --- >> _______________________________________________ >> svn-src-all@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/svn-src-all >> To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" >> > From owner-svn-src-head@freebsd.org Tue Nov 14 20:00:09 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B892DDC55B; Tue, 14 Nov 2017 20:00:09 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 365046D195; Tue, 14 Nov 2017 20:00:08 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id BA3725A9F27; Tue, 14 Nov 2017 20:00:02 +0000 (UTC) Date: Tue, 14 Nov 2017 20:00:02 +0000 From: Brooks Davis To: Andriy Gapon Cc: Brooks Davis , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, kdrakehp@zoho.com Subject: Re: svn commit: r324619 - in head/usr.bin/procstat: . tests Message-ID: <20171114200002.GC88203@spindle.one-eyed-alien.net> References: <201710141838.v9EIcaOQ047300@repo.freebsd.org> <81c30f82-268e-ce59-4326-5a2f14ca62e5@FreeBSD.org> <20171113020016.GF76223@spindle.one-eyed-alien.net> <65f847b0-b730-ee35-ca74-2a77cecde9a3@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="eJnRUKwClWJh1Khz" Content-Disposition: inline In-Reply-To: <65f847b0-b730-ee35-ca74-2a77cecde9a3@FreeBSD.org> User-Agent: Mutt/1.9.1 (2017-09-22) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 20:00:09 -0000 --eJnRUKwClWJh1Khz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 13, 2017 at 09:38:09AM +0200, Andriy Gapon wrote: > On 13/11/2017 04:00, Brooks Davis wrote: > > On Sun, Nov 12, 2017 at 12:15:35PM +0200, Andriy Gapon wrote: > >> On 14/10/2017 21:38, Brooks Davis wrote: > >>> Author: brooks > >>> Date: Sat Oct 14 18:38:36 2017 > >>> New Revision: 324619 > >>> URL: https://svnweb.freebsd.org/changeset/base/324619 > >>> > >>> Log: > >>> Switch procstat from subcommand flags to verbs > >>> =20 > >>> - Use an enumerated value instead of separate flags for commands > >>> - Look for a verb if no command flag is set > >>> - Lookup the "xocontainer" value based on the command > >>> - Document the new command verbs in the man-page > >>> =20 > >>> Submitted by: kdrakehp@zoho.com > >>> Differential Revision: https://reviews.freebsd.org/D10916 > >> > >> What's the new way of doing procstat -kk -a ? > >> > >> procstat -kk -a now crashes because cmd is NULL when 'k' option is pro= cessed. > >> procstat kstack and procstat kstack -v just produce the usage message = without > >> telling any specific usage error. > >> procstat kstack -a says that 'a' is an illegal option. > >=20 > > From the reading the manpage it should be: procstat -a kstack -v >=20 > This works, thank you. >=20 > > The crash is a regression. Please file a bugreport. >=20 > This one line patch seems to fix the crash and procstat -kk -a is usable = again. > Does it look okay to you? >=20 > --- a/usr.bin/procstat/procstat.c > +++ b/usr.bin/procstat/procstat.c > @@ -296,7 +296,7 @@ main(int argc, char *argv[]) > cmd =3D getcmd("tsignals"); > break; > case 'k': > - if (cmd->cmd =3D=3D procstat_kstack) { > + if (cmd !=3D NULL && cmd->cmd =3D=3D procstat_kstack) { > if ((procstat_opts & PS_OPT_VERBOSE) !=3D 0) > usage(); > procstat_opts |=3D PS_OPT_VERBOSE; Looks good to me. -- Brooks --eJnRUKwClWJh1Khz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJaC0tCAAoJEKzQXbSebgfAMkcH/3H7rFdP75qP2rOrxq8iHqxM erHpMBbMq9hu+XllYd9UwB7a7n9QqZiIOSUif8dG8bOJHROMKB0x8NbnfEnA/eWv O3dDw5QF0ulU/DTljBgUpMa3I8JLUd17OT71qOefZXXzwlIdywMFki88bFtOUsD5 oQ+i3KLAhChI/eXqPX8jdf3kmgDvr34fCSY/74PQd4G6bwrHWVwu4DTbrFssIOzx ttwopghOCqE7BT3M+yoOc5iHpkZhyPFdwPbMNIFE3lgBDVyjjHrk3Av4yFrwmciB dHfwzc+1wPzx1BXmC/y8Hf9VA+dtv3SgvZjR/QViXn94ZckAECq3dkz8/Ezh2KQ= =oOUM -----END PGP SIGNATURE----- --eJnRUKwClWJh1Khz-- From owner-svn-src-head@freebsd.org Tue Nov 14 20:00:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EAD24DDC5FA; Tue, 14 Nov 2017 20:00:37 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7A976D306; Tue, 14 Nov 2017 20:00:37 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id DEE925A9F2A; Tue, 14 Nov 2017 20:00:36 +0000 (UTC) Date: Tue, 14 Nov 2017 20:00:36 +0000 From: Brooks Davis To: Oliver Pinter Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r324619 - in head/usr.bin/procstat: . tests Message-ID: <20171114200036.GD88203@spindle.one-eyed-alien.net> References: <201710141838.v9EIcaOQ047300@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2JFBq9zoW8cOFH7v" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 20:00:38 -0000 --2JFBq9zoW8cOFH7v Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 14, 2017 at 12:14:54AM +0100, Oliver Pinter wrote: > On Saturday, October 14, 2017, Brooks Davis wrote: >=20 > > Author: brooks > > Date: Sat Oct 14 18:38:36 2017 > > New Revision: 324619 > > URL: https://svnweb.freebsd.org/changeset/base/324619 > > > > Log: > > Switch procstat from subcommand flags to verbs > > > > - Use an enumerated value instead of separate flags for commands > > - Look for a verb if no command flag is set > > - Lookup the "xocontainer" value based on the command > > - Document the new command verbs in the man-page > > > > Submitted by: kdrakehp@zoho.com > > Differential Revision: https://reviews.freebsd.org/D10916 >=20 >=20 > +=3D Release notes? Yeah, it should have been. -- Brooks --2JFBq9zoW8cOFH7v Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJaC0tkAAoJEKzQXbSebgfAP5AH/09kNUm8SiCaEoZIY8MpVoCv PwGEkDOQVAqWoCBKN4BPLrJAhKzs2F8+AfNXXaGsei7CHKSMU2GEIyMPVI7QixEA ASS4J5nlTArmbyrL3xkfTRS8/G4bXgcEdOBdLnmfCqwWoJrpE5DmcIs63nkPdxlV q5VnUAr3kY2jA6zeTMDU0uzqLJ/knfchCF0EYFGV0Zp4gIsQqjyp30fuX2emsBdQ BkH2l8wlEN/TsvvJspMmmc5njtF7ocVBQL+URfHJ8CjhSYFkH7aqdC8oB/XEKHhq DULqp32XHIwuieVJh64kRGI7dDQSW5s6lmKXakwqhYBzhAyqEJIJx+MObYNl46w= =7iqq -----END PGP SIGNATURE----- --2JFBq9zoW8cOFH7v-- From owner-svn-src-head@freebsd.org Tue Nov 14 20:38:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E606BDDD144 for ; Tue, 14 Nov 2017 20:38:03 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x236.google.com (mail-io0-x236.google.com [IPv6:2607:f8b0:4001:c06::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9C8AD6E43B for ; Tue, 14 Nov 2017 20:38:03 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x236.google.com with SMTP id i38so11275077iod.2 for ; Tue, 14 Nov 2017 12:38:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=BuBI8Y3F7HWSvAw2prJwRI/Ah8MIJd5YbvdfFmGV+OA=; b=rZKxDpWWv9HBZRGpZDuJP0vR82vwuLAnUKmu9Da3C4Gwa0G27MuatyTx3FhpLJrmxi jGrLxKiBF/Zp53oKAYOWQc6ADk8g0BSHCQuouLNi584RVh8VKek1ahGJnJNLbqpl33/y +PnHxf8fyeOi0kxTPps34qPTVFDR0lE/gKU43C/m5p1eG3IhPY95WpJKZaH3zQ3ZuhL5 BmkN9IHrB1a75yUXYhAysETIDVJLl4k+v+RuQsY5RJzVBUf6qTj+VDwa0wqE1JlcPkF0 MJB3G0KZPaWXCww24aedtA82S5ds6nMch/qTPsVL5HyZD37YSAkItPQ+2x3TqyBEBkfZ etUQ== 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=BuBI8Y3F7HWSvAw2prJwRI/Ah8MIJd5YbvdfFmGV+OA=; b=Mt4zKsEjBcVflxdwTkRtod/w4u4xejMxrG+S6dtLRWDEca63xKGrkwvXdix1SACLWq VPGxoEeZc9M6hPMzPNO719cljvi6/mNzeC+CNb0YSTxSOjLsqE8lPUT1K/igyzIL8sP8 kI+vzOvB/koZCjykySIuTFGCkpBV7IIRptJUZmraSy3SNOzLqUfLtH5gIx6ZIofmZjDN Tb4SykOYvbALVVTJg0hxmVBKVR9SQy66Rl9kiQz6lMJrwsL1wXVw239Ifa/2VOIIEVzV XfQ+mlZlxeITd4DrJgTqBif8J89NSt3A0+8GJVoDq/arwkUjgN+wOioFkiDN82DIwYaW NeZw== X-Gm-Message-State: AJaThX5TlYbrLWSImL6CzQBuwnUVoa6OHiRqTsiRGutP6HltAd8Z+kNy /KerbRO2eBLyrM6i2Kyjr8AERgalCUBxCcekAkZlvw== X-Google-Smtp-Source: AGs4zMbqYJYqaq9ZURIU0Te2D4FugucQx+IXmJiADtKjx1vQmIGhhFlVjV+/9iWY2O0dSomsade97SOWVsBnTiJR8+M= X-Received: by 10.107.46.216 with SMTP id u85mr14324328iou.136.1510691882672; Tue, 14 Nov 2017 12:38:02 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Tue, 14 Nov 2017 12:38:01 -0800 (PST) X-Originating-IP: [50.253.109.65] In-Reply-To: <50ACB3CA-9F18-4033-8D0F-F02363BA5B37@mac.com> References: <201711140505.vAE55Qaw042726@repo.freebsd.org> <50ACB3CA-9F18-4033-8D0F-F02363BA5B37@mac.com> From: Warner Losh Date: Tue, 14 Nov 2017 13:38:01 -0700 X-Google-Sender-Auth: PyfDtk0eY1QIdBQO7BAJRFP_mms Message-ID: Subject: Re: svn commit: r325796 - head/sys/cam/nvme To: Ravi Pokala Cc: Warner Losh , 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.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 20:38:04 -0000 On Mon, Nov 13, 2017 at 10:35 PM, Ravi Pokala wrote: > In r325794, you set speed/max_speed to a KBps value; here, you're > reporting those values as PCI Generation. That's... not right. > Two different CCBs. The PATH_INQ one returns a general KB/s number. The GET_TRANSPORT one returns the raw numbers. Warner > -Ravi (rpokala@) > > -----Original Message----- > From: on behalf of Warner Losh > > Date: 2017-11-13, Monday at 21:05 > To: , , < > svn-src-head@freebsd.org> > Subject: svn commit: r325796 - head/sys/cam/nvme > > Author: imp > Date: Tue Nov 14 05:05:26 2017 > New Revision: 325796 > URL: https://svnweb.freebsd.org/changeset/base/325796 > > Log: > Properly decode NVMe state of the drive and print out the information > in the attach to more closely match what SCSI and ATA attached > storage provides. > > Sponsored by: Netflix > > Modified: > head/sys/cam/nvme/nvme_all.c > head/sys/cam/nvme/nvme_all.h > head/sys/cam/nvme/nvme_xpt.c > > Modified: head/sys/cam/nvme/nvme_all.c > ============================================================ > ================== > --- head/sys/cam/nvme/nvme_all.c Tue Nov 14 05:05:21 2017 > (r325795) > +++ head/sys/cam/nvme/nvme_all.c Tue Nov 14 05:05:26 2017 > (r325796) > @@ -87,9 +87,16 @@ nvme_identify_match(caddr_t identbuffer, caddr_t table > > void > nvme_print_ident(const struct nvme_controller_data *cdata, > - const struct nvme_namespace_data *data) > + const struct nvme_namespace_data *data, struct sbuf *sb) > { > - printf("I'm a pretty NVME drive\n"); > + > + sbuf_printf(sb, "<"); > + cam_strvis_sbuf(sb, cdata->mn, sizeof(cdata->mn), 0); > + sbuf_printf(sb, " "); > + cam_strvis_sbuf(sb, cdata->fr, sizeof(cdata->fr), 0); > + sbuf_printf(sb, " "); > + cam_strvis_sbuf(sb, cdata->sn, sizeof(cdata->sn), 0); > + sbuf_printf(sb, ">\n"); > } > > /* XXX need to do nvme admin opcodes too, but those aren't used yet by > nda */ > > Modified: head/sys/cam/nvme/nvme_all.h > ============================================================ > ================== > --- head/sys/cam/nvme/nvme_all.h Tue Nov 14 05:05:21 2017 > (r325795) > +++ head/sys/cam/nvme/nvme_all.h Tue Nov 14 05:05:26 2017 > (r325796) > @@ -39,7 +39,8 @@ void nvme_ns_cmd(struct ccb_nvmeio *nvmeio, uint8_t cm > > int nvme_identify_match(caddr_t identbuffer, caddr_t table_entry); > > -void nvme_print_ident(const struct nvme_controller_data *, const struct > nvme_namespace_data *); > +struct sbuf; > +void nvme_print_ident(const struct nvme_controller_data *, const struct > nvme_namespace_data *, struct sbuf *); > const char *nvme_op_string(const struct nvme_command *); > const char *nvme_cmd_string(const struct nvme_command *, char *, size_t); > const void *nvme_get_identify_cntrl(struct cam_periph *); > > Modified: head/sys/cam/nvme/nvme_xpt.c > ============================================================ > ================== > --- head/sys/cam/nvme/nvme_xpt.c Tue Nov 14 05:05:21 2017 > (r325795) > +++ head/sys/cam/nvme/nvme_xpt.c Tue Nov 14 05:05:26 2017 > (r325796) > @@ -619,35 +619,49 @@ nvme_announce_periph(struct cam_periph *periph) > struct ccb_pathinq cpi; > struct ccb_trans_settings cts; > struct cam_path *path = periph->path; > + struct ccb_trans_settings_nvme *nvmex; > > cam_periph_assert(periph, MA_OWNED); > > + /* Ask the SIM for connection details */ > xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL); > cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; > cts.type = CTS_TYPE_CURRENT_SETTINGS; > xpt_action((union ccb*)&cts); > if ((cts.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) > return; > + nvmex = &cts.xport_specific.nvme; > + > /* Ask the SIM for its base transfer speed */ > xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NORMAL); > cpi.ccb_h.func_code = XPT_PATH_INQ; > xpt_action((union ccb *)&cpi); > - /* XXX NVME STUFF HERE */ > + printf("%s%d: nvme version %d.%d x%d (max x%d) lanes PCIe Gen%d > (max Gen%d) link", > + periph->periph_name, periph->unit_number, > + NVME_MAJOR(nvmex->spec), > + NVME_MINOR(nvmex->spec), > + nvmex->lanes, nvmex->max_lanes, > + nvmex->speed, nvmex->max_speed); > printf("\n"); > } > > static void > nvme_proto_announce(struct cam_ed *device) > { > + struct sbuf sb; > + char buffer[120]; > > - nvme_print_ident(device->nvme_cdata, device->nvme_data); > + sbuf_new(&sb, buffer, sizeof(buffer), SBUF_FIXEDLEN); > + nvme_print_ident(device->nvme_cdata, device->nvme_data, &sb); > + sbuf_finish(&sb); > + sbuf_putbuf(&sb); > } > > static void > nvme_proto_denounce(struct cam_ed *device) > { > > - nvme_print_ident(device->nvme_cdata, device->nvme_data); > + nvme_proto_announce(device); > } > > static void > > > > > From owner-svn-src-head@freebsd.org Tue Nov 14 20:39:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2599DDD1D4; Tue, 14 Nov 2017 20:39:56 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from mr11p00im-asmtp004.me.com (mr11p00im-asmtp004.me.com [17.110.69.135]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5D446E5A9; Tue, 14 Nov 2017 20:39:56 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from process-dkim-sign-daemon.mr11p00im-asmtp004.me.com by mr11p00im-asmtp004.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) id <0OZF00C00CAKAZ00@mr11p00im-asmtp004.me.com>; Tue, 14 Nov 2017 20:39:56 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mac.com; s=04042017; t=1510691996; bh=bDpjHuB2iCfpfVeI53JxGclimqDtTXRAMZIQ2qt+O+Q=; h=Date:Subject:From:To:Message-id:MIME-version:Content-type; b=vI2IdKYAqdDzFP0GOZRQQc/2dVnwycuuG0FDM/PZBNM8dSCB6g44KTSx2VC1GFlcf vPcvnMCtis0QyR76Ca9nAzQubtnP8Rq4uQZKyihIEhkaJaml/Kn18yyb1lWOSGo8MA rELazxbJkOfcU9LVpy3lM4R9ZhScStybkHeaqP76wIJPz+mxmMauFzdxiKsn3qBR9l EDLPy4++4HuovEgMxLHr/L1RHxvPr7saWKKIzBYmtm2CKUVDatZHRxe1KDD3hDDcCi aH46CJ/HrkKdUBgWezF3ED8/QcGt/Lm2vjXgk03k44sLyJvoBe+eJFuS1Udhp1rjmd FyQhZLhP+2Dzg== Received: from icloud.com ([127.0.0.1]) by mr11p00im-asmtp004.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) with ESMTPSA id <0OZF00KIMDEGI710@mr11p00im-asmtp004.me.com>; Tue, 14 Nov 2017 20:39:53 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-11-14_10:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1015 suspectscore=2 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1711140274 User-Agent: Microsoft-MacOutlook/f.27.0.171010 Date: Tue, 14 Nov 2017 12:39:52 -0800 Subject: Re: svn commit: r325817 - head/tests/sys/aio From: Ravi Pokala To: Alan Somers , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-id: <77969AC2-58E9-4A00-A173-10C690ACE249@mac.com> Thread-topic: svn commit: r325817 - head/tests/sys/aio References: <201711141746.vAEHkbVb064686@repo.freebsd.org> In-reply-to: <201711141746.vAEHkbVb064686@repo.freebsd.org> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 20:39:57 -0000 Hi Alan, This appears to blow up most ARM worlds (and maybe other things too? My `make tinderbox' is still working through the ARMs): _.arm.arm.buildworld: --- all_subdir_tests/sys/aio --- /usr/home/rpokala/freebsd/clean/base/head/tests/sys/aio/lio_kqueue_test.c:123:12: error: format specifies type 'long' but the argument has type 'off_t' (aka 'lo ng long') [-Werror,-Wformat] iocb[k]->aio_offset); ^~~~~~~~~~~~~~~~~~~ /usr/home/rpokala/freebsd/clean/base/head/tests/sys/aio/lio_kqueue_test.c:137:8: error: format specifies type 'long' but the argument has type 'time_t' (aka 'lo ng long') [-Werror,-Wformat] time1, time2, time2-time1, result); ^~~~~ /usr/home/rpokala/freebsd/clean/base/head/tests/sys/aio/lio_kqueue_test.c:137:15: error: format specifies type 'long' but the argument has type 'time_t' (aka 'l ong long') [-Werror,-Wformat] time1, time2, time2-time1, result); ^~~~~ /usr/home/rpokala/freebsd/clean/base/head/tests/sys/aio/lio_kqueue_test.c:137:22: error: format specifies type 'long' but the argument has type 'long long' [-We rror,-Wformat] time1, time2, time2-time1, result); ^~~~~~~~~~~ Thanks, Ravi (rpokala@) -----Original Message----- From: on behalf of Alan Somers Date: 2017-11-14, Tuesday at 09:46 To: , , Subject: svn commit: r325817 - head/tests/sys/aio Author: asomers Date: Tue Nov 14 17:46:37 2017 New Revision: 325817 URL: https://svnweb.freebsd.org/changeset/base/325817 Log: AIO tests: increase limits tests/sys/aio/aio_kqueue_test.c Instead of using a hard-coded queue depth, use vfs.aio.max_aio_queue_per_proc tests/sys/aio/lio_kqueue_test.c The old, small limit on lio_listio's operation count was lifted by change 324941. Raise the operation count as high as possible without exceeding the process's operation limit. MFC after: 3 weeks Sponsored by: Spectra Logic Corp Modified: head/tests/sys/aio/aio_kqueue_test.c head/tests/sys/aio/lio_kqueue_test.c Modified: head/tests/sys/aio/aio_kqueue_test.c ============================================================================== --- head/tests/sys/aio/aio_kqueue_test.c Tue Nov 14 17:16:03 2017 (r325816) +++ head/tests/sys/aio/aio_kqueue_test.c Tue Nov 14 17:46:37 2017 (r325817) @@ -51,28 +51,37 @@ #define PATH_TEMPLATE "aio.XXXXXXXXXX" -#define MAX_IOCBS 128 #define MAX_RUNS 300 /* #define DEBUG */ int main (int argc, char *argv[]) { - struct aiocb *iocb[MAX_IOCBS], *kq_iocb; + struct aiocb **iocb, *kq_iocb; char *file, pathname[sizeof(PATH_TEMPLATE)+1]; struct kevent ke, kq_returned; struct timespec ts; char buffer[32768]; + int max_queue_per_proc; + size_t max_queue_per_proc_size; #ifdef DEBUG int cancel, error; #endif int failed = 0, fd, kq, pending, result, run; int tmp_file = 0; - unsigned i, j; + int i, j; PLAIN_REQUIRE_KERNEL_MODULE("aio", 0); PLAIN_REQUIRE_UNSAFE_AIO(0); + max_queue_per_proc_size = sizeof(max_queue_per_proc); + if (sysctlbyname("vfs.aio.max_aio_queue_per_proc", + &max_queue_per_proc, &max_queue_per_proc_size, NULL, 0) != 0) + err(1, "sysctlbyname"); + iocb = calloc(max_queue_per_proc, sizeof(struct aiocb*)); + if (iocb == NULL) + err(1, "calloc"); + kq = kqueue(); if (kq < 0) { perror("No kqeueue\n"); @@ -95,7 +104,7 @@ main (int argc, char *argv[]) #ifdef DEBUG printf("Run %d\n", run); #endif - for (i = 0; i < nitems(iocb); i++) { + for (i = 0; i < max_queue_per_proc; i++) { iocb[i] = (struct aiocb *)calloc(1, sizeof(struct aiocb)); if (iocb[i] == NULL) @@ -103,7 +112,7 @@ main (int argc, char *argv[]) } pending = 0; - for (i = 0; i < nitems(iocb); i++) { + for (i = 0; i < max_queue_per_proc; i++) { pending++; iocb[i]->aio_nbytes = sizeof(buffer); iocb[i]->aio_buf = buffer; @@ -139,7 +148,7 @@ main (int argc, char *argv[]) } } #ifdef DEBUG - cancel = nitems(iocb) - pending; + cancel = max_queue_per_proc - pending; #endif i = 0; @@ -173,11 +182,11 @@ main (int argc, char *argv[]) break; #ifdef DEBUG printf("Try again left %d out of %lu %d\n", - pending, nitems(iocb), cancel); + pending, max_queue_per_proc, cancel); #endif } - for (j = 0; j < nitems(iocb) && iocb[j] != kq_iocb; + for (j = 0; j < max_queue_per_proc && iocb[j] != kq_iocb; j++) ; #ifdef DEBUG printf("kq_iocb %p\n", kq_iocb); @@ -204,7 +213,7 @@ main (int argc, char *argv[]) i++; } - for (i = 0; i < nitems(iocb); i++) + for (i = 0; i < max_queue_per_proc; i++) free(iocb[i]); } Modified: head/tests/sys/aio/lio_kqueue_test.c ============================================================================== --- head/tests/sys/aio/lio_kqueue_test.c Tue Nov 14 17:16:03 2017 (r325816) +++ head/tests/sys/aio/lio_kqueue_test.c Tue Nov 14 17:46:37 2017 (r325817) @@ -27,14 +27,7 @@ /* * Note: it is a good idea to run this against a physical drive to - * exercise the physio fast path (ie. lio_kqueue /dev/) - * This will ensure op's counting is correct. It is currently broken. - * - * Also note that LIO & kqueue is not implemented in FreeBSD yet, LIO - * is also broken with respect to op's and some paths. - * - * A patch to make this work is at: - * http://www.ambrisko.com/doug/listio_kqueue/listio_kqueue.patch + * exercise the physio fast path (ie. lio_kqueue_test /dev/) */ #include @@ -54,9 +47,10 @@ #define PATH_TEMPLATE "aio.XXXXXXXXXX" +#define DEBUG #define LIO_MAX 5 -#define IOCBS_PER_LIO 16 -#define MAX_IOCBS (LIO_MAX * IOCBS_PER_LIO) +#define MAX_IOCBS_PER_LIO 64 +#define MAX_IOCBS (LIO_MAX * MAX_IOCBS_PER_LIO) #define MAX_RUNS 300 int @@ -65,7 +59,9 @@ main(int argc, char *argv[]) int fd; struct aiocb *iocb[MAX_IOCBS]; struct aiocb **lio[LIO_MAX], **kq_lio; - int i, result, run, error, j, k; + int i, result, run, error, j, k, max_queue_per_proc; + int max_iocbs, iocbs_per_lio; + size_t max_queue_per_proc_size; char buffer[32768]; int kq; struct kevent ke, kq_returned; @@ -78,6 +74,13 @@ main(int argc, char *argv[]) PLAIN_REQUIRE_KERNEL_MODULE("aio", 0); PLAIN_REQUIRE_UNSAFE_AIO(0); + max_queue_per_proc_size = sizeof(max_queue_per_proc); + if (sysctlbyname("vfs.aio.max_aio_queue_per_proc", + &max_queue_per_proc, &max_queue_per_proc_size, NULL, 0) != 0) + err(1, "sysctlbyname"); + iocbs_per_lio = max_queue_per_proc / LIO_MAX; + max_iocbs = LIO_MAX * iocbs_per_lio; + kq = kqueue(); if (kq < 0) err(1, "kqeueue(2) failed"); @@ -104,9 +107,9 @@ main(int argc, char *argv[]) #endif for (j = 0; j < LIO_MAX; j++) { lio[j] = - malloc(sizeof(struct aiocb *) * IOCBS_PER_LIO); - for (i = 0; i < IOCBS_PER_LIO; i++) { - k = (IOCBS_PER_LIO * j) + i; + malloc(sizeof(struct aiocb *) * iocbs_per_lio); + for (i = 0; i < iocbs_per_lio; i++) { + k = (iocbs_per_lio * j) + i; lio[j][i] = iocb[k] = calloc(1, sizeof(struct aiocb)); iocb[k]->aio_nbytes = sizeof(buffer); @@ -126,7 +129,7 @@ main(int argc, char *argv[]) sig.sigev_notify = SIGEV_KEVENT; time(&time1); result = lio_listio(LIO_NOWAIT, lio[j], - IOCBS_PER_LIO, &sig); + iocbs_per_lio, &sig); error = errno; time(&time2); #ifdef DEBUG @@ -202,10 +205,10 @@ main(int argc, char *argv[]) failed++; } else printf("PASS: run %d, operation %d result %d \n", run, LIO_MAX - i -1, result); - for (k = 0; k < MAX_IOCBS / LIO_MAX; k++) { + for (k = 0; k < max_iocbs / LIO_MAX; k++) { result = aio_return(kq_lio[k]); #ifdef DEBUG - printf("Return Resulto for %d %d is %d\n", j, k, result); + printf("Return Result for %d %d is %d\n", j, k, result); #endif if (result != sizeof(buffer)) { printf("FAIL: run %d, operation %d sub-opt %d result %d (errno=%d) should be %zu\n", @@ -219,7 +222,7 @@ main(int argc, char *argv[]) printf("\n"); #endif - for (k = 0; k < MAX_IOCBS / LIO_MAX; k++) + for (k = 0; k < max_iocbs / LIO_MAX; k++) free(lio[j][k]); free(lio[j]); lio[j] = NULL; From owner-svn-src-head@freebsd.org Tue Nov 14 20:41:12 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 608DADDD44E; Tue, 14 Nov 2017 20:41:12 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from mr11p00im-asmtp003.me.com (mr11p00im-asmtp003.me.com [17.110.69.254]) (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 42E0A6E9BD; Tue, 14 Nov 2017 20:41:12 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from process-dkim-sign-daemon.mr11p00im-asmtp003.me.com by mr11p00im-asmtp003.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) id <0OZF00F00CAH0X00@mr11p00im-asmtp003.me.com>; Tue, 14 Nov 2017 20:41:06 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mac.com; s=04042017; t=1510692066; bh=DC/jhoer2z5mUExk1CziC44WyLWkVE27m5uSbssYXk8=; h=Date:Subject:From:To:Message-id:MIME-version:Content-type; b=fF3qxRvQOuyHYCK9LyxscAjUX4gccoafBWLk6r7K/SnxILhi++leJfc4Q6EuIqqik G40jOgMdkSbvcULRsBIrfJbD6EZJ8JldTyZWqmR+d+Tmpu+kCGeIGUfYiVaeagJf95 bmBPWcHdQ5ZK9lco8ghzv+v5mvWajcEcKAv5oMKiBywuWZ50nfwJ5mcBS7Y53Osh5x jrTpcr2Wz9JDdUKG90OhPL/pyvpTn4SSnb9XM7aYvpI32awgshusgJG5XLEOd3AyTn vUadvCyBoZBkQCMORsXgff8EBme1ogKjazmqHBcacbUdXgDu7c69lXyhSzesmluNIS A1GqtsZgdDiXA== Received: from icloud.com ([127.0.0.1]) by mr11p00im-asmtp003.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) with ESMTPSA id <0OZF0073DDGFC130@mr11p00im-asmtp003.me.com>; Tue, 14 Nov 2017 20:41:04 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-11-14_10:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1015 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1711140274 User-Agent: Microsoft-MacOutlook/f.27.0.171010 Date: Tue, 14 Nov 2017 12:41:02 -0800 Subject: Re: svn commit: r325796 - head/sys/cam/nvme From: Ravi Pokala To: Warner Losh Cc: Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-id: <9AAC3E2D-851F-4382-A803-3B4C4C6D12C9@mac.com> Thread-topic: svn commit: r325796 - head/sys/cam/nvme References: <201711140505.vAE55Qaw042726@repo.freebsd.org> <50ACB3CA-9F18-4033-8D0F-F02363BA5B37@mac.com> In-reply-to: MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 20:41:12 -0000 Well that's wonderfully ambiguous... :-p Okay, thanks for clearing that up. -Ravi (rpokala@) -----Original Message----- From: on behalf of Warner Losh Date: 2017-11-14, Tuesday at 12:38 To: Ravi Pokala Cc: Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r325796 - head/sys/cam/nvme On Mon, Nov 13, 2017 at 10:35 PM, Ravi Pokala wrote: In r325794, you set speed/max_speed to a KBps value; here, you're reporting those values as PCI Generation. That's... not right. Two different CCBs. The PATH_INQ one returns a general KB/s number. The GET_TRANSPORT one returns the raw numbers. Warner -Ravi (rpokala@) -----Original Message----- From: on behalf of Warner Losh Date: 2017-11-13, Monday at 21:05 To: , , Subject: svn commit: r325796 - head/sys/cam/nvme Author: imp Date: Tue Nov 14 05:05:26 2017 New Revision: 325796 URL: https://svnweb.freebsd.org/changeset/base/325796 Log: Properly decode NVMe state of the drive and print out the information in the attach to more closely match what SCSI and ATA attached storage provides. Sponsored by: Netflix Modified: head/sys/cam/nvme/nvme_all.c head/sys/cam/nvme/nvme_all.h head/sys/cam/nvme/nvme_xpt.c Modified: head/sys/cam/nvme/nvme_all.c ============================================================================== --- head/sys/cam/nvme/nvme_all.c Tue Nov 14 05:05:21 2017 (r325795) +++ head/sys/cam/nvme/nvme_all.c Tue Nov 14 05:05:26 2017 (r325796) @@ -87,9 +87,16 @@ nvme_identify_match(caddr_t identbuffer, caddr_t table void nvme_print_ident(const struct nvme_controller_data *cdata, - const struct nvme_namespace_data *data) + const struct nvme_namespace_data *data, struct sbuf *sb) { - printf("I'm a pretty NVME drive\n"); + + sbuf_printf(sb, "<"); + cam_strvis_sbuf(sb, cdata->mn, sizeof(cdata->mn), 0); + sbuf_printf(sb, " "); + cam_strvis_sbuf(sb, cdata->fr, sizeof(cdata->fr), 0); + sbuf_printf(sb, " "); + cam_strvis_sbuf(sb, cdata->sn, sizeof(cdata->sn), 0); + sbuf_printf(sb, ">\n"); } /* XXX need to do nvme admin opcodes too, but those aren't used yet by nda */ Modified: head/sys/cam/nvme/nvme_all.h ============================================================================== --- head/sys/cam/nvme/nvme_all.h Tue Nov 14 05:05:21 2017 (r325795) +++ head/sys/cam/nvme/nvme_all.h Tue Nov 14 05:05:26 2017 (r325796) @@ -39,7 +39,8 @@ void nvme_ns_cmd(struct ccb_nvmeio *nvmeio, uint8_t cm int nvme_identify_match(caddr_t identbuffer, caddr_t table_entry); -void nvme_print_ident(const struct nvme_controller_data *, const struct nvme_namespace_data *); +struct sbuf; +void nvme_print_ident(const struct nvme_controller_data *, const struct nvme_namespace_data *, struct sbuf *); const char *nvme_op_string(const struct nvme_command *); const char *nvme_cmd_string(const struct nvme_command *, char *, size_t); const void *nvme_get_identify_cntrl(struct cam_periph *); Modified: head/sys/cam/nvme/nvme_xpt.c ============================================================================== --- head/sys/cam/nvme/nvme_xpt.c Tue Nov 14 05:05:21 2017 (r325795) +++ head/sys/cam/nvme/nvme_xpt.c Tue Nov 14 05:05:26 2017 (r325796) @@ -619,35 +619,49 @@ nvme_announce_periph(struct cam_periph *periph) struct ccb_pathinq cpi; struct ccb_trans_settings cts; struct cam_path *path = periph->path; + struct ccb_trans_settings_nvme *nvmex; cam_periph_assert(periph, MA_OWNED); + /* Ask the SIM for connection details */ xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL); cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; cts.type = CTS_TYPE_CURRENT_SETTINGS; xpt_action((union ccb*)&cts); if ((cts.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) return; + nvmex = &cts.xport_specific.nvme; + /* Ask the SIM for its base transfer speed */ xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NORMAL); cpi.ccb_h.func_code = XPT_PATH_INQ; xpt_action((union ccb *)&cpi); - /* XXX NVME STUFF HERE */ + printf("%s%d: nvme version %d.%d x%d (max x%d) lanes PCIe Gen%d (max Gen%d) link", + periph->periph_name, periph->unit_number, + NVME_MAJOR(nvmex->spec), + NVME_MINOR(nvmex->spec), + nvmex->lanes, nvmex->max_lanes, + nvmex->speed, nvmex->max_speed); printf("\n"); } static void nvme_proto_announce(struct cam_ed *device) { + struct sbuf sb; + char buffer[120]; - nvme_print_ident(device->nvme_cdata, device->nvme_data); + sbuf_new(&sb, buffer, sizeof(buffer), SBUF_FIXEDLEN); + nvme_print_ident(device->nvme_cdata, device->nvme_data, &sb); + sbuf_finish(&sb); + sbuf_putbuf(&sb); } static void nvme_proto_denounce(struct cam_ed *device) { - nvme_print_ident(device->nvme_cdata, device->nvme_data); + nvme_proto_announce(device); } static void From owner-svn-src-head@freebsd.org Tue Nov 14 20:57:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3CD86DDDC99; Tue, 14 Nov 2017 20:57:38 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf0-x230.google.com (mail-lf0-x230.google.com [IPv6:2a00:1450:4010:c07::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 C7CB36F21F; Tue, 14 Nov 2017 20:57:37 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf0-x230.google.com with SMTP id k66so11778515lfg.3; Tue, 14 Nov 2017 12:57:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Q9FMDS7E8NiYtUaIHy9BELdGO1h8fDCcT91rmy+9sB4=; b=n5rm3CUTixHDrOf6CC0jcxmtWvvZTR2SHwzt3Q/3m8IKyZBYaAPZuYFVC0r4+dr2zA RRgYJByo/wkW/InHaJIOcKtUltUTjI2PCQFQToQhukTZj4UFS/AbLnLdBhBVUzrvqRwz 6BTuUfDFzGRJ2No5ldZohVNePkeHR30LXlfqU4lCYIcAxgIhCgS/NdQUglf8FS+WrQ5t sgZvBOPSvb9Sxn/F2h4XH00jlS6BrECgEqWjDuyjVD6k9a6TAGWOypeCehaRe1WdpL6g EDsb0itv2IPpDEVTY6aDC2lQawmGynBKhd+TGMsiSsTpeFhJHw2doptbKPicsARQ3TGa oJqw== 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=Q9FMDS7E8NiYtUaIHy9BELdGO1h8fDCcT91rmy+9sB4=; b=WtdATkX3DbCF7ncHaQ5QwXS2YLyNmy7xNLybOYr+AmFpi7vyyVylhIM9yO4BDsuKkv OkWPbgFS5E7N6DOMP6sc/shDuswQxImw4UBAqM87RceJqSLHwp+ZZJ1SKnJ2yV3wfrQ2 OAdiKV+CEV2FBi+kaqzJftfm0Dcd5f3VAynSWeuh8XOyHJq34idYXvmpjfY1FfBhRjmC PMF56prrLREKG+clAkz/VelR7K3y/5nyIU/qYO5zL1cMkmdF/0Dbg+/GN8VbRyx2jSwd w2wQwtLYcG1khAWFT9aDA0RT6dbEMMl7OhCvBNV3K5OgAYn4vBl1pUz2HCCED81kF6OB CheQ== X-Gm-Message-State: AJaThX6vlx1wQO7hHB2XUnhxrBEDSEGVkgsOGagcx6ze7VJm7WDPY0He 1iPGvQsvLTtDOL9XU8ZHVyP2LfmgFQ8dJs4uXU8= X-Google-Smtp-Source: AGs4zMYAq5zpKk+/f+wXZZvFQpz/tdw211MQdKNSNwTkfOg87RvSYpKbfrWycRH/sO/JG3ttVb11UmgNITBFdxZOE84= X-Received: by 10.25.87.143 with SMTP id l137mr4641255lfb.193.1510693055698; Tue, 14 Nov 2017 12:57:35 -0800 (PST) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.179.93.24 with HTTP; Tue, 14 Nov 2017 12:57:34 -0800 (PST) In-Reply-To: <77969AC2-58E9-4A00-A173-10C690ACE249@mac.com> References: <201711141746.vAEHkbVb064686@repo.freebsd.org> <77969AC2-58E9-4A00-A173-10C690ACE249@mac.com> From: Alan Somers Date: Tue, 14 Nov 2017 13:57:34 -0700 X-Google-Sender-Auth: 785QG9SEJoXXQbfGAH5kPlLaWFo Message-ID: Subject: Re: svn commit: r325817 - head/tests/sys/aio To: Ravi Pokala 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-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 20:57:38 -0000 Sorry for the breakage. A fix is on the way, but I need to build an arm world first. On Tue, Nov 14, 2017 at 1:39 PM, Ravi Pokala wrote: > Hi Alan, > > This appears to blow up most ARM worlds (and maybe other things too? My `make tinderbox' is still working through the ARMs): > > _.arm.arm.buildworld: > --- all_subdir_tests/sys/aio --- > /usr/home/rpokala/freebsd/clean/base/head/tests/sys/aio/lio_kqueue_test.c:123:12: error: format specifies type 'long' but the argument has type 'off_t' (aka 'lo > ng long') [-Werror,-Wformat] > iocb[k]->aio_offset); > ^~~~~~~~~~~~~~~~~~~ > /usr/home/rpokala/freebsd/clean/base/head/tests/sys/aio/lio_kqueue_test.c:137:8: error: format specifies type 'long' but the argument has type 'time_t' (aka 'lo > ng long') [-Werror,-Wformat] > time1, time2, time2-time1, result); > ^~~~~ > /usr/home/rpokala/freebsd/clean/base/head/tests/sys/aio/lio_kqueue_test.c:137:15: error: format specifies type 'long' but the argument has type 'time_t' (aka 'l > ong long') [-Werror,-Wformat] > time1, time2, time2-time1, result); > ^~~~~ > /usr/home/rpokala/freebsd/clean/base/head/tests/sys/aio/lio_kqueue_test.c:137:22: error: format specifies type 'long' but the argument has type 'long long' [-We > rror,-Wformat] > time1, time2, time2-time1, result); > ^~~~~~~~~~~ > > Thanks, > > Ravi (rpokala@) > > -----Original Message----- > From: on behalf of Alan Somers > Date: 2017-11-14, Tuesday at 09:46 > To: , , > Subject: svn commit: r325817 - head/tests/sys/aio > > Author: asomers > Date: Tue Nov 14 17:46:37 2017 > New Revision: 325817 > URL: https://svnweb.freebsd.org/changeset/base/325817 > > Log: > AIO tests: increase limits > > tests/sys/aio/aio_kqueue_test.c > Instead of using a hard-coded queue depth, use > vfs.aio.max_aio_queue_per_proc > > tests/sys/aio/lio_kqueue_test.c > The old, small limit on lio_listio's operation count was lifted by > change 324941. Raise the operation count as high as possible without > exceeding the process's operation limit. > > MFC after: 3 weeks > Sponsored by: Spectra Logic Corp > > Modified: > head/tests/sys/aio/aio_kqueue_test.c > head/tests/sys/aio/lio_kqueue_test.c From owner-svn-src-head@freebsd.org Tue Nov 14 21:04:11 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE5A2DDDEB9; Tue, 14 Nov 2017 21:04:11 +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 5689D6F67F; Tue, 14 Nov 2017 21:04:11 +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 vAEL4AhT052560; Tue, 14 Nov 2017 21:04:10 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAEL3w1h052425; Tue, 14 Nov 2017 21:03:58 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201711142103.vAEL3w1h052425@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 14 Nov 2017 21:03:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325826 - in head: share/man/man4 sys/boot/fdt/dts sys/boot/fdt/dts/arm sys/boot/fdt/dts/arm64 sys/boot/fdt/dts/mips sys/boot/fdt/dts/powerpc sys/conf sys/dts sys/dts/arm sys/dts/arm64 ... X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: share/man/man4 sys/boot/fdt/dts sys/boot/fdt/dts/arm sys/boot/fdt/dts/arm64 sys/boot/fdt/dts/mips sys/boot/fdt/dts/powerpc sys/conf sys/dts sys/dts/arm sys/dts/arm64 sys/dts/mips sys/dts/powe... X-SVN-Commit-Revision: 325826 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 21:04:11 -0000 Author: imp Date: Tue Nov 14 21:03:57 2017 New Revision: 325826 URL: https://svnweb.freebsd.org/changeset/base/325826 Log: Move sys/boot/fdt/dts to sys/dts and adjust scripts. Sponsored by: Netflix Added: head/sys/dts/ head/sys/dts/Makefile (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/Makefile head/sys/dts/Makefile.inc (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/Makefile.inc head/sys/dts/arm/ head/sys/dts/arm/Makefile (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/Makefile head/sys/dts/arm/a83t.dtsi (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/a83t.dtsi head/sys/dts/arm/annapurna-alpine.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/annapurna-alpine.dts head/sys/dts/arm/apalis-imx6.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/apalis-imx6.dts head/sys/dts/arm/armada-380.dtsi (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/armada-380.dtsi head/sys/dts/arm/armada-385-db-ap.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/armada-385-db-ap.dts head/sys/dts/arm/armada-385.dtsi (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/armada-385.dtsi head/sys/dts/arm/armada-388-clearfog.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/armada-388-clearfog.dts head/sys/dts/arm/armada-388-gp.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/armada-388-gp.dts head/sys/dts/arm/armada-388.dtsi (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/armada-388.dtsi head/sys/dts/arm/armada-38x-solidrun-microsom.dtsi (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/armada-38x-solidrun-microsom.dtsi head/sys/dts/arm/armada-38x.dtsi (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/armada-38x.dtsi head/sys/dts/arm/bcm2835.dtsi (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/bcm2835.dtsi head/sys/dts/arm/bcm2836.dtsi (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/bcm2836.dtsi head/sys/dts/arm/db78100.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/db78100.dts head/sys/dts/arm/db78460.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/db78460.dts head/sys/dts/arm/db88f5182.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/db88f5182.dts head/sys/dts/arm/db88f5281.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/db88f5281.dts head/sys/dts/arm/db88f6281.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/db88f6281.dts head/sys/dts/arm/digi-ccwmx53.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/digi-ccwmx53.dts head/sys/dts/arm/dockstar.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/dockstar.dts head/sys/dts/arm/dreamplug-1001.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/dreamplug-1001.dts head/sys/dts/arm/dreamplug-1001N.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/dreamplug-1001N.dts head/sys/dts/arm/ea3250.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/ea3250.dts head/sys/dts/arm/efikamx.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/efikamx.dts head/sys/dts/arm/exynos5.dtsi (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/exynos5.dtsi head/sys/dts/arm/exynos5250-arndale.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/exynos5250-arndale.dts head/sys/dts/arm/exynos5250-snow.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/exynos5250-snow.dts head/sys/dts/arm/exynos5250-spring.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/exynos5250-spring.dts head/sys/dts/arm/exynos5250.dtsi (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/exynos5250.dtsi head/sys/dts/arm/exynos5420-arndale-octa.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/exynos5420-arndale-octa.dts head/sys/dts/arm/exynos5420-peach-pit.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/exynos5420-peach-pit.dts head/sys/dts/arm/exynos5420.dtsi (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/exynos5420.dtsi head/sys/dts/arm/h3.dtsi (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/h3.dtsi head/sys/dts/arm/hl201.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/hl201.dts head/sys/dts/arm/imx51x.dtsi (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/imx51x.dtsi head/sys/dts/arm/imx53x.dtsi (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/imx53x.dtsi head/sys/dts/arm/imx6.dtsi (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/imx6.dtsi head/sys/dts/arm/meson3.dtsi (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/meson3.dtsi head/sys/dts/arm/meson8b.dtsi (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/meson8b.dtsi head/sys/dts/arm/nanopi-neo.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/nanopi-neo.dts head/sys/dts/arm/odroidc1.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/odroidc1.dts head/sys/dts/arm/orangepi-plus-2e.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/orangepi-plus-2e.dts head/sys/dts/arm/pandaboard-common.dtsi (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/pandaboard-common.dtsi head/sys/dts/arm/pandaboard-es.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/pandaboard-es.dts head/sys/dts/arm/pandaboard.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/pandaboard.dts head/sys/dts/arm/rk3188-radxa-lite.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/rk3188-radxa-lite.dts head/sys/dts/arm/rk3188-radxa.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/rk3188-radxa.dts head/sys/dts/arm/rk3188.dtsi (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/rk3188.dtsi head/sys/dts/arm/rpi.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/rpi.dts head/sys/dts/arm/rpi2.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/rpi2.dts head/sys/dts/arm/rt1310a.dtsi (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/rt1310a.dtsi head/sys/dts/arm/sam9260ek.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/sam9260ek.dts head/sys/dts/arm/sheevaplug.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/sheevaplug.dts head/sys/dts/arm/sinovoip-bpi-m3.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/sinovoip-bpi-m3.dts head/sys/dts/arm/socfpga_arria10_socdk_sdmmc.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/socfpga_arria10_socdk_sdmmc.dts head/sys/dts/arm/socfpga_cyclone5_sockit_beri_sdmmc.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/socfpga_cyclone5_sockit_beri_sdmmc.dts head/sys/dts/arm/socfpga_cyclone5_sockit_sdmmc.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/socfpga_cyclone5_sockit_sdmmc.dts head/sys/dts/arm/sun7i-a20-hdmi.dtsi (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/sun7i-a20-hdmi.dtsi head/sys/dts/arm/sun8i-a83t-sinovoip-bpi-m3.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/sun8i-a83t-sinovoip-bpi-m3.dts head/sys/dts/arm/sun8i-a83t.dtsi (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/sun8i-a83t.dtsi head/sys/dts/arm/sun8i-h3-nanopi-neo.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/sun8i-h3-nanopi-neo.dts head/sys/dts/arm/tegra124-jetson-tk1-fbsd.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/tegra124-jetson-tk1-fbsd.dts head/sys/dts/arm/tegra20-paz00.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/tegra20-paz00.dts head/sys/dts/arm/tegra20.dtsi (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/tegra20.dtsi head/sys/dts/arm/trimslice.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/trimslice.dts head/sys/dts/arm/ts7800.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/ts7800.dts head/sys/dts/arm/ufw.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/ufw.dts head/sys/dts/arm/versatilepb.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/versatilepb.dts head/sys/dts/arm/vsatv102-m6.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/vsatv102-m6.dts head/sys/dts/arm/vybrid-colibri-vf50.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/vybrid-colibri-vf50.dts head/sys/dts/arm/vybrid-cosmic.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/vybrid-cosmic.dts head/sys/dts/arm/vybrid-quartz.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/vybrid-quartz.dts head/sys/dts/arm/vybrid.dtsi (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/vybrid.dtsi head/sys/dts/arm/wandboard-dual.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/wandboard-dual.dts head/sys/dts/arm/wandboard-quad.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/wandboard-quad.dts head/sys/dts/arm/wandboard-solo.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/wandboard-solo.dts head/sys/dts/arm/wzr2-g300n.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/wzr2-g300n.dts head/sys/dts/arm/xpowers-axp209.dtsi (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/xpowers-axp209.dtsi head/sys/dts/arm/yyhd18-m3.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/yyhd18-m3.dts head/sys/dts/arm/zedboard.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/zedboard.dts head/sys/dts/arm/zybo.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/zybo.dts head/sys/dts/arm/zynq-7000.dtsi (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm/zynq-7000.dtsi head/sys/dts/arm64/ head/sys/dts/arm64/Makefile (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm64/Makefile head/sys/dts/arm64/a64.dtsi (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm64/a64.dtsi head/sys/dts/arm64/pine64_plus.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm64/pine64_plus.dts head/sys/dts/arm64/sun50i-a64-pine64-common.dtsi (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm64/sun50i-a64-pine64-common.dtsi head/sys/dts/arm64/sun50i-a64-pine64-plus.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm64/sun50i-a64-pine64-plus.dts head/sys/dts/arm64/sun50i-a64-pine64.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm64/sun50i-a64-pine64.dts head/sys/dts/arm64/sun50i-a64.dtsi (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/arm64/sun50i-a64.dtsi head/sys/dts/bindings-gpio.txt (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/bindings-gpio.txt head/sys/dts/bindings-localbus.txt (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/bindings-localbus.txt head/sys/dts/bindings-mpp.txt (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/bindings-mpp.txt head/sys/dts/mips/ head/sys/dts/mips/Makefile (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/mips/Makefile head/sys/dts/mips/beri-netfpga.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/mips/beri-netfpga.dts head/sys/dts/mips/beri-sim.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/mips/beri-sim.dts head/sys/dts/mips/beripad-de4.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/mips/beripad-de4.dts head/sys/dts/mips/beripad-sockit.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/mips/beripad-sockit.dts head/sys/dts/mips/fbsd-mt7620a.dtsi (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/mips/fbsd-mt7620a.dtsi head/sys/dts/mips/fbsd-mt7621.dtsi (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/mips/fbsd-mt7621.dtsi head/sys/dts/mips/fbsd-mt7628an.dtsi (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/mips/fbsd-mt7628an.dtsi head/sys/dts/mips/fbsd-rt3883.dtsi (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/mips/fbsd-rt3883.dtsi head/sys/dts/mips/xlp-basic.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/mips/xlp-basic.dts head/sys/dts/powerpc/ head/sys/dts/powerpc/Makefile (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/powerpc/Makefile head/sys/dts/powerpc/mpc8555cds.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/powerpc/mpc8555cds.dts head/sys/dts/powerpc/mpc8572ds.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/powerpc/mpc8572ds.dts head/sys/dts/powerpc/p1020rdb.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/powerpc/p1020rdb.dts head/sys/dts/powerpc/p2020ds.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/powerpc/p2020ds.dts head/sys/dts/powerpc/p2041rdb.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/powerpc/p2041rdb.dts head/sys/dts/powerpc/p2041si.dtsi (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/powerpc/p2041si.dtsi head/sys/dts/powerpc/p3041ds.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/powerpc/p3041ds.dts head/sys/dts/powerpc/p3041si.dtsi (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/powerpc/p3041si.dtsi head/sys/dts/powerpc/p5020ds.dts (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/powerpc/p5020ds.dts head/sys/dts/powerpc/p5020si.dtsi (contents, props changed) - copied, changed from r325825, head/sys/boot/fdt/dts/powerpc/p5020si.dtsi Deleted: head/sys/boot/fdt/dts/Makefile head/sys/boot/fdt/dts/Makefile.inc head/sys/boot/fdt/dts/arm/Makefile head/sys/boot/fdt/dts/arm/a83t.dtsi head/sys/boot/fdt/dts/arm/annapurna-alpine.dts head/sys/boot/fdt/dts/arm/apalis-imx6.dts head/sys/boot/fdt/dts/arm/armada-380.dtsi head/sys/boot/fdt/dts/arm/armada-385-db-ap.dts head/sys/boot/fdt/dts/arm/armada-385.dtsi head/sys/boot/fdt/dts/arm/armada-388-clearfog.dts head/sys/boot/fdt/dts/arm/armada-388-gp.dts head/sys/boot/fdt/dts/arm/armada-388.dtsi head/sys/boot/fdt/dts/arm/armada-38x-solidrun-microsom.dtsi head/sys/boot/fdt/dts/arm/armada-38x.dtsi head/sys/boot/fdt/dts/arm/bcm2835.dtsi head/sys/boot/fdt/dts/arm/bcm2836.dtsi head/sys/boot/fdt/dts/arm/db78100.dts head/sys/boot/fdt/dts/arm/db78460.dts head/sys/boot/fdt/dts/arm/db88f5182.dts head/sys/boot/fdt/dts/arm/db88f5281.dts head/sys/boot/fdt/dts/arm/db88f6281.dts head/sys/boot/fdt/dts/arm/digi-ccwmx53.dts head/sys/boot/fdt/dts/arm/dockstar.dts head/sys/boot/fdt/dts/arm/dreamplug-1001.dts head/sys/boot/fdt/dts/arm/dreamplug-1001N.dts head/sys/boot/fdt/dts/arm/ea3250.dts head/sys/boot/fdt/dts/arm/efikamx.dts head/sys/boot/fdt/dts/arm/exynos5.dtsi head/sys/boot/fdt/dts/arm/exynos5250-arndale.dts head/sys/boot/fdt/dts/arm/exynos5250-snow.dts head/sys/boot/fdt/dts/arm/exynos5250-spring.dts head/sys/boot/fdt/dts/arm/exynos5250.dtsi head/sys/boot/fdt/dts/arm/exynos5420-arndale-octa.dts head/sys/boot/fdt/dts/arm/exynos5420-peach-pit.dts head/sys/boot/fdt/dts/arm/exynos5420.dtsi head/sys/boot/fdt/dts/arm/h3.dtsi head/sys/boot/fdt/dts/arm/hl201.dts head/sys/boot/fdt/dts/arm/imx51x.dtsi head/sys/boot/fdt/dts/arm/imx53x.dtsi head/sys/boot/fdt/dts/arm/imx6.dtsi head/sys/boot/fdt/dts/arm/meson3.dtsi head/sys/boot/fdt/dts/arm/meson8b.dtsi head/sys/boot/fdt/dts/arm/nanopi-neo.dts head/sys/boot/fdt/dts/arm/odroidc1.dts head/sys/boot/fdt/dts/arm/orangepi-plus-2e.dts head/sys/boot/fdt/dts/arm/pandaboard-common.dtsi head/sys/boot/fdt/dts/arm/pandaboard-es.dts head/sys/boot/fdt/dts/arm/pandaboard.dts head/sys/boot/fdt/dts/arm/rk3188-radxa-lite.dts head/sys/boot/fdt/dts/arm/rk3188-radxa.dts head/sys/boot/fdt/dts/arm/rk3188.dtsi head/sys/boot/fdt/dts/arm/rpi.dts head/sys/boot/fdt/dts/arm/rpi2.dts head/sys/boot/fdt/dts/arm/rt1310a.dtsi head/sys/boot/fdt/dts/arm/sam9260ek.dts head/sys/boot/fdt/dts/arm/sheevaplug.dts head/sys/boot/fdt/dts/arm/sinovoip-bpi-m3.dts head/sys/boot/fdt/dts/arm/socfpga_arria10_socdk_sdmmc.dts head/sys/boot/fdt/dts/arm/socfpga_cyclone5_sockit_beri_sdmmc.dts head/sys/boot/fdt/dts/arm/socfpga_cyclone5_sockit_sdmmc.dts head/sys/boot/fdt/dts/arm/sun7i-a20-hdmi.dtsi head/sys/boot/fdt/dts/arm/sun8i-a83t-sinovoip-bpi-m3.dts head/sys/boot/fdt/dts/arm/sun8i-a83t.dtsi head/sys/boot/fdt/dts/arm/sun8i-h3-nanopi-neo.dts head/sys/boot/fdt/dts/arm/tegra124-jetson-tk1-fbsd.dts head/sys/boot/fdt/dts/arm/tegra20-paz00.dts head/sys/boot/fdt/dts/arm/tegra20.dtsi head/sys/boot/fdt/dts/arm/trimslice.dts head/sys/boot/fdt/dts/arm/ts7800.dts head/sys/boot/fdt/dts/arm/ufw.dts head/sys/boot/fdt/dts/arm/versatilepb.dts head/sys/boot/fdt/dts/arm/vsatv102-m6.dts head/sys/boot/fdt/dts/arm/vybrid-colibri-vf50.dts head/sys/boot/fdt/dts/arm/vybrid-cosmic.dts head/sys/boot/fdt/dts/arm/vybrid-quartz.dts head/sys/boot/fdt/dts/arm/vybrid.dtsi head/sys/boot/fdt/dts/arm/wandboard-dual.dts head/sys/boot/fdt/dts/arm/wandboard-quad.dts head/sys/boot/fdt/dts/arm/wandboard-solo.dts head/sys/boot/fdt/dts/arm/wzr2-g300n.dts head/sys/boot/fdt/dts/arm/xpowers-axp209.dtsi head/sys/boot/fdt/dts/arm/yyhd18-m3.dts head/sys/boot/fdt/dts/arm/zedboard.dts head/sys/boot/fdt/dts/arm/zybo.dts head/sys/boot/fdt/dts/arm/zynq-7000.dtsi head/sys/boot/fdt/dts/arm64/Makefile head/sys/boot/fdt/dts/arm64/a64.dtsi head/sys/boot/fdt/dts/arm64/pine64_plus.dts head/sys/boot/fdt/dts/arm64/sun50i-a64-pine64-common.dtsi head/sys/boot/fdt/dts/arm64/sun50i-a64-pine64-plus.dts head/sys/boot/fdt/dts/arm64/sun50i-a64-pine64.dts head/sys/boot/fdt/dts/arm64/sun50i-a64.dtsi head/sys/boot/fdt/dts/bindings-gpio.txt head/sys/boot/fdt/dts/bindings-localbus.txt head/sys/boot/fdt/dts/bindings-mpp.txt head/sys/boot/fdt/dts/mips/Makefile head/sys/boot/fdt/dts/mips/beri-netfpga.dts head/sys/boot/fdt/dts/mips/beri-sim.dts head/sys/boot/fdt/dts/mips/beripad-de4.dts head/sys/boot/fdt/dts/mips/beripad-sockit.dts head/sys/boot/fdt/dts/mips/fbsd-mt7620a.dtsi head/sys/boot/fdt/dts/mips/fbsd-mt7621.dtsi head/sys/boot/fdt/dts/mips/fbsd-mt7628an.dtsi head/sys/boot/fdt/dts/mips/fbsd-rt3883.dtsi head/sys/boot/fdt/dts/mips/xlp-basic.dts head/sys/boot/fdt/dts/powerpc/Makefile head/sys/boot/fdt/dts/powerpc/mpc8555cds.dts head/sys/boot/fdt/dts/powerpc/mpc8572ds.dts head/sys/boot/fdt/dts/powerpc/p1020rdb.dts head/sys/boot/fdt/dts/powerpc/p2020ds.dts head/sys/boot/fdt/dts/powerpc/p2041rdb.dts head/sys/boot/fdt/dts/powerpc/p2041si.dtsi head/sys/boot/fdt/dts/powerpc/p3041ds.dts head/sys/boot/fdt/dts/powerpc/p3041si.dtsi head/sys/boot/fdt/dts/powerpc/p5020ds.dts head/sys/boot/fdt/dts/powerpc/p5020si.dtsi Modified: head/share/man/man4/fdt.4 head/share/man/man4/gpioiic.4 head/share/man/man4/gpioled.4 head/share/man/man4/owc.4 head/sys/conf/dtb.mk head/sys/tools/fdt/make_dtb.sh Modified: head/share/man/man4/fdt.4 ============================================================================== --- head/share/man/man4/fdt.4 Tue Nov 14 18:18:18 2017 (r325825) +++ head/share/man/man4/fdt.4 Tue Nov 14 21:03:57 2017 (r325826) @@ -95,7 +95,7 @@ computer system in a human-readable form, with certain The default location for DTS files in the .Fx source repository is -.Pa sys/boot/fdt/dts +.Pa sys/dts directory. .It Va Device tree blob (DTB) The textual device tree description (DTS file) is first converted (compiled) @@ -156,7 +156,7 @@ kernel. The indicated DTS file will be converted (compiled) into a binary form along with building the kernel itself. The DTS file name is relative to the default location of DTS sources i.e. -.Pa sys/boot/fdt/dts . +.Pa sys/dts . This makeoption is not mandatory unless FDT_DTB_STATIC is also defined (see below). .It Va options FDT_DTB_STATIC Modified: head/share/man/man4/gpioiic.4 ============================================================================== --- head/share/man/man4/gpioiic.4 Tue Nov 14 18:18:18 2017 (r325825) +++ head/share/man/man4/gpioiic.4 Tue Nov 14 21:03:57 2017 (r325826) @@ -137,7 +137,7 @@ on the GPIO IIC bit-banging bus. For more details about the .Va gpios property, please consult -.Pa /usr/src/sys/boot/fdt/dts/bindings-gpio.txt . +.Pa /usr/src/sys/dts/bindings-gpio.txt . .It Va scl The .Va scl Modified: head/share/man/man4/gpioled.4 ============================================================================== --- head/share/man/man4/gpioled.4 Tue Nov 14 18:18:18 2017 (r325825) +++ head/share/man/man4/gpioled.4 Tue Nov 14 21:03:57 2017 (r325826) @@ -134,7 +134,7 @@ The only restriction is that a GPIO pin cannot be mapp For more details about the .Va gpios property, please consult -.Pa /usr/src/sys/boot/fdt/dts/bindings-gpio.txt . +.Pa /usr/src/sys/dts/bindings-gpio.txt . .Pp The property .Va name Modified: head/share/man/man4/owc.4 ============================================================================== --- head/share/man/man4/owc.4 Tue Nov 14 18:18:18 2017 (r325825) +++ head/share/man/man4/owc.4 Tue Nov 14 21:03:57 2017 (r325826) @@ -68,7 +68,7 @@ to. For more details about the .Va gpios property, please consult -.Pa /usr/src/sys/boot/fdt/dts/bindings-gpio.txt . +.Pa /usr/src/sys/dts/bindings-gpio.txt . .Sh SEE ALSO .Xr gpiobus 4 , .Xr ow 4 , Modified: head/sys/conf/dtb.mk ============================================================================== --- head/sys/conf/dtb.mk Tue Nov 14 18:18:18 2017 (r325825) +++ head/sys/conf/dtb.mk Tue Nov 14 21:03:57 2017 (r325826) @@ -47,7 +47,7 @@ SYSDIR= ${_dir:tA} .SUFFIXES: .dtb .dts -.PATH: ${SYSDIR}/gnu/dts/${MACHINE} ${SYSDIR}/boot/fdt/dts/${MACHINE} +.PATH: ${SYSDIR}/gnu/dts/${MACHINE} ${SYSDIR}/dts/${MACHINE} DTB=${DTS:R:S/$/.dtb/} Copied and modified: head/sys/dts/Makefile (from r325825, head/sys/boot/fdt/dts/Makefile) ============================================================================== Copied and modified: head/sys/dts/Makefile.inc (from r325825, head/sys/boot/fdt/dts/Makefile.inc) ============================================================================== Copied and modified: head/sys/dts/arm/Makefile (from r325825, head/sys/boot/fdt/dts/arm/Makefile) ============================================================================== Copied and modified: head/sys/dts/arm/a83t.dtsi (from r325825, head/sys/boot/fdt/dts/arm/a83t.dtsi) ============================================================================== Copied and modified: head/sys/dts/arm/annapurna-alpine.dts (from r325825, head/sys/boot/fdt/dts/arm/annapurna-alpine.dts) ============================================================================== Copied and modified: head/sys/dts/arm/apalis-imx6.dts (from r325825, head/sys/boot/fdt/dts/arm/apalis-imx6.dts) ============================================================================== Copied and modified: head/sys/dts/arm/armada-380.dtsi (from r325825, head/sys/boot/fdt/dts/arm/armada-380.dtsi) ============================================================================== Copied and modified: head/sys/dts/arm/armada-385-db-ap.dts (from r325825, head/sys/boot/fdt/dts/arm/armada-385-db-ap.dts) ============================================================================== Copied and modified: head/sys/dts/arm/armada-385.dtsi (from r325825, head/sys/boot/fdt/dts/arm/armada-385.dtsi) ============================================================================== Copied and modified: head/sys/dts/arm/armada-388-clearfog.dts (from r325825, head/sys/boot/fdt/dts/arm/armada-388-clearfog.dts) ============================================================================== Copied and modified: head/sys/dts/arm/armada-388-gp.dts (from r325825, head/sys/boot/fdt/dts/arm/armada-388-gp.dts) ============================================================================== Copied and modified: head/sys/dts/arm/armada-388.dtsi (from r325825, head/sys/boot/fdt/dts/arm/armada-388.dtsi) ============================================================================== Copied and modified: head/sys/dts/arm/armada-38x-solidrun-microsom.dtsi (from r325825, head/sys/boot/fdt/dts/arm/armada-38x-solidrun-microsom.dtsi) ============================================================================== Copied and modified: head/sys/dts/arm/armada-38x.dtsi (from r325825, head/sys/boot/fdt/dts/arm/armada-38x.dtsi) ============================================================================== Copied and modified: head/sys/dts/arm/bcm2835.dtsi (from r325825, head/sys/boot/fdt/dts/arm/bcm2835.dtsi) ============================================================================== Copied and modified: head/sys/dts/arm/bcm2836.dtsi (from r325825, head/sys/boot/fdt/dts/arm/bcm2836.dtsi) ============================================================================== Copied and modified: head/sys/dts/arm/db78100.dts (from r325825, head/sys/boot/fdt/dts/arm/db78100.dts) ============================================================================== Copied and modified: head/sys/dts/arm/db78460.dts (from r325825, head/sys/boot/fdt/dts/arm/db78460.dts) ============================================================================== Copied and modified: head/sys/dts/arm/db88f5182.dts (from r325825, head/sys/boot/fdt/dts/arm/db88f5182.dts) ============================================================================== Copied and modified: head/sys/dts/arm/db88f5281.dts (from r325825, head/sys/boot/fdt/dts/arm/db88f5281.dts) ============================================================================== Copied and modified: head/sys/dts/arm/db88f6281.dts (from r325825, head/sys/boot/fdt/dts/arm/db88f6281.dts) ============================================================================== Copied and modified: head/sys/dts/arm/digi-ccwmx53.dts (from r325825, head/sys/boot/fdt/dts/arm/digi-ccwmx53.dts) ============================================================================== Copied and modified: head/sys/dts/arm/dockstar.dts (from r325825, head/sys/boot/fdt/dts/arm/dockstar.dts) ============================================================================== Copied and modified: head/sys/dts/arm/dreamplug-1001.dts (from r325825, head/sys/boot/fdt/dts/arm/dreamplug-1001.dts) ============================================================================== Copied and modified: head/sys/dts/arm/dreamplug-1001N.dts (from r325825, head/sys/boot/fdt/dts/arm/dreamplug-1001N.dts) ============================================================================== Copied and modified: head/sys/dts/arm/ea3250.dts (from r325825, head/sys/boot/fdt/dts/arm/ea3250.dts) ============================================================================== Copied and modified: head/sys/dts/arm/efikamx.dts (from r325825, head/sys/boot/fdt/dts/arm/efikamx.dts) ============================================================================== Copied and modified: head/sys/dts/arm/exynos5.dtsi (from r325825, head/sys/boot/fdt/dts/arm/exynos5.dtsi) ============================================================================== Copied and modified: head/sys/dts/arm/exynos5250-arndale.dts (from r325825, head/sys/boot/fdt/dts/arm/exynos5250-arndale.dts) ============================================================================== Copied and modified: head/sys/dts/arm/exynos5250-snow.dts (from r325825, head/sys/boot/fdt/dts/arm/exynos5250-snow.dts) ============================================================================== Copied and modified: head/sys/dts/arm/exynos5250-spring.dts (from r325825, head/sys/boot/fdt/dts/arm/exynos5250-spring.dts) ============================================================================== Copied and modified: head/sys/dts/arm/exynos5250.dtsi (from r325825, head/sys/boot/fdt/dts/arm/exynos5250.dtsi) ============================================================================== Copied and modified: head/sys/dts/arm/exynos5420-arndale-octa.dts (from r325825, head/sys/boot/fdt/dts/arm/exynos5420-arndale-octa.dts) ============================================================================== Copied and modified: head/sys/dts/arm/exynos5420-peach-pit.dts (from r325825, head/sys/boot/fdt/dts/arm/exynos5420-peach-pit.dts) ============================================================================== Copied and modified: head/sys/dts/arm/exynos5420.dtsi (from r325825, head/sys/boot/fdt/dts/arm/exynos5420.dtsi) ============================================================================== Copied and modified: head/sys/dts/arm/h3.dtsi (from r325825, head/sys/boot/fdt/dts/arm/h3.dtsi) ============================================================================== Copied and modified: head/sys/dts/arm/hl201.dts (from r325825, head/sys/boot/fdt/dts/arm/hl201.dts) ============================================================================== Copied and modified: head/sys/dts/arm/imx51x.dtsi (from r325825, head/sys/boot/fdt/dts/arm/imx51x.dtsi) ============================================================================== Copied and modified: head/sys/dts/arm/imx53x.dtsi (from r325825, head/sys/boot/fdt/dts/arm/imx53x.dtsi) ============================================================================== Copied and modified: head/sys/dts/arm/imx6.dtsi (from r325825, head/sys/boot/fdt/dts/arm/imx6.dtsi) ============================================================================== Copied and modified: head/sys/dts/arm/meson3.dtsi (from r325825, head/sys/boot/fdt/dts/arm/meson3.dtsi) ============================================================================== Copied and modified: head/sys/dts/arm/meson8b.dtsi (from r325825, head/sys/boot/fdt/dts/arm/meson8b.dtsi) ============================================================================== Copied and modified: head/sys/dts/arm/nanopi-neo.dts (from r325825, head/sys/boot/fdt/dts/arm/nanopi-neo.dts) ============================================================================== Copied and modified: head/sys/dts/arm/odroidc1.dts (from r325825, head/sys/boot/fdt/dts/arm/odroidc1.dts) ============================================================================== Copied and modified: head/sys/dts/arm/orangepi-plus-2e.dts (from r325825, head/sys/boot/fdt/dts/arm/orangepi-plus-2e.dts) ============================================================================== Copied and modified: head/sys/dts/arm/pandaboard-common.dtsi (from r325825, head/sys/boot/fdt/dts/arm/pandaboard-common.dtsi) ============================================================================== Copied and modified: head/sys/dts/arm/pandaboard-es.dts (from r325825, head/sys/boot/fdt/dts/arm/pandaboard-es.dts) ============================================================================== Copied and modified: head/sys/dts/arm/pandaboard.dts (from r325825, head/sys/boot/fdt/dts/arm/pandaboard.dts) ============================================================================== Copied and modified: head/sys/dts/arm/rk3188-radxa-lite.dts (from r325825, head/sys/boot/fdt/dts/arm/rk3188-radxa-lite.dts) ============================================================================== Copied and modified: head/sys/dts/arm/rk3188-radxa.dts (from r325825, head/sys/boot/fdt/dts/arm/rk3188-radxa.dts) ============================================================================== Copied and modified: head/sys/dts/arm/rk3188.dtsi (from r325825, head/sys/boot/fdt/dts/arm/rk3188.dtsi) ============================================================================== Copied and modified: head/sys/dts/arm/rpi.dts (from r325825, head/sys/boot/fdt/dts/arm/rpi.dts) ============================================================================== Copied and modified: head/sys/dts/arm/rpi2.dts (from r325825, head/sys/boot/fdt/dts/arm/rpi2.dts) ============================================================================== Copied and modified: head/sys/dts/arm/rt1310a.dtsi (from r325825, head/sys/boot/fdt/dts/arm/rt1310a.dtsi) ============================================================================== Copied and modified: head/sys/dts/arm/sam9260ek.dts (from r325825, head/sys/boot/fdt/dts/arm/sam9260ek.dts) ============================================================================== Copied and modified: head/sys/dts/arm/sheevaplug.dts (from r325825, head/sys/boot/fdt/dts/arm/sheevaplug.dts) ============================================================================== Copied and modified: head/sys/dts/arm/sinovoip-bpi-m3.dts (from r325825, head/sys/boot/fdt/dts/arm/sinovoip-bpi-m3.dts) ============================================================================== Copied and modified: head/sys/dts/arm/socfpga_arria10_socdk_sdmmc.dts (from r325825, head/sys/boot/fdt/dts/arm/socfpga_arria10_socdk_sdmmc.dts) ============================================================================== Copied and modified: head/sys/dts/arm/socfpga_cyclone5_sockit_beri_sdmmc.dts (from r325825, head/sys/boot/fdt/dts/arm/socfpga_cyclone5_sockit_beri_sdmmc.dts) ============================================================================== Copied and modified: head/sys/dts/arm/socfpga_cyclone5_sockit_sdmmc.dts (from r325825, head/sys/boot/fdt/dts/arm/socfpga_cyclone5_sockit_sdmmc.dts) ============================================================================== Copied and modified: head/sys/dts/arm/sun7i-a20-hdmi.dtsi (from r325825, head/sys/boot/fdt/dts/arm/sun7i-a20-hdmi.dtsi) ============================================================================== Copied and modified: head/sys/dts/arm/sun8i-a83t-sinovoip-bpi-m3.dts (from r325825, head/sys/boot/fdt/dts/arm/sun8i-a83t-sinovoip-bpi-m3.dts) ============================================================================== Copied and modified: head/sys/dts/arm/sun8i-a83t.dtsi (from r325825, head/sys/boot/fdt/dts/arm/sun8i-a83t.dtsi) ============================================================================== Copied and modified: head/sys/dts/arm/sun8i-h3-nanopi-neo.dts (from r325825, head/sys/boot/fdt/dts/arm/sun8i-h3-nanopi-neo.dts) ============================================================================== Copied and modified: head/sys/dts/arm/tegra124-jetson-tk1-fbsd.dts (from r325825, head/sys/boot/fdt/dts/arm/tegra124-jetson-tk1-fbsd.dts) ============================================================================== Copied and modified: head/sys/dts/arm/tegra20-paz00.dts (from r325825, head/sys/boot/fdt/dts/arm/tegra20-paz00.dts) ============================================================================== Copied and modified: head/sys/dts/arm/tegra20.dtsi (from r325825, head/sys/boot/fdt/dts/arm/tegra20.dtsi) ============================================================================== Copied and modified: head/sys/dts/arm/trimslice.dts (from r325825, head/sys/boot/fdt/dts/arm/trimslice.dts) ============================================================================== Copied and modified: head/sys/dts/arm/ts7800.dts (from r325825, head/sys/boot/fdt/dts/arm/ts7800.dts) ============================================================================== Copied and modified: head/sys/dts/arm/ufw.dts (from r325825, head/sys/boot/fdt/dts/arm/ufw.dts) ============================================================================== Copied and modified: head/sys/dts/arm/versatilepb.dts (from r325825, head/sys/boot/fdt/dts/arm/versatilepb.dts) ============================================================================== Copied and modified: head/sys/dts/arm/vsatv102-m6.dts (from r325825, head/sys/boot/fdt/dts/arm/vsatv102-m6.dts) ============================================================================== Copied and modified: head/sys/dts/arm/vybrid-colibri-vf50.dts (from r325825, head/sys/boot/fdt/dts/arm/vybrid-colibri-vf50.dts) ============================================================================== Copied and modified: head/sys/dts/arm/vybrid-cosmic.dts (from r325825, head/sys/boot/fdt/dts/arm/vybrid-cosmic.dts) ============================================================================== Copied and modified: head/sys/dts/arm/vybrid-quartz.dts (from r325825, head/sys/boot/fdt/dts/arm/vybrid-quartz.dts) ============================================================================== Copied and modified: head/sys/dts/arm/vybrid.dtsi (from r325825, head/sys/boot/fdt/dts/arm/vybrid.dtsi) ============================================================================== Copied and modified: head/sys/dts/arm/wandboard-dual.dts (from r325825, head/sys/boot/fdt/dts/arm/wandboard-dual.dts) ============================================================================== Copied and modified: head/sys/dts/arm/wandboard-quad.dts (from r325825, head/sys/boot/fdt/dts/arm/wandboard-quad.dts) ============================================================================== Copied and modified: head/sys/dts/arm/wandboard-solo.dts (from r325825, head/sys/boot/fdt/dts/arm/wandboard-solo.dts) ============================================================================== Copied and modified: head/sys/dts/arm/wzr2-g300n.dts (from r325825, head/sys/boot/fdt/dts/arm/wzr2-g300n.dts) ============================================================================== Copied and modified: head/sys/dts/arm/xpowers-axp209.dtsi (from r325825, head/sys/boot/fdt/dts/arm/xpowers-axp209.dtsi) ============================================================================== Copied and modified: head/sys/dts/arm/yyhd18-m3.dts (from r325825, head/sys/boot/fdt/dts/arm/yyhd18-m3.dts) ============================================================================== Copied and modified: head/sys/dts/arm/zedboard.dts (from r325825, head/sys/boot/fdt/dts/arm/zedboard.dts) ============================================================================== Copied and modified: head/sys/dts/arm/zybo.dts (from r325825, head/sys/boot/fdt/dts/arm/zybo.dts) ============================================================================== Copied and modified: head/sys/dts/arm/zynq-7000.dtsi (from r325825, head/sys/boot/fdt/dts/arm/zynq-7000.dtsi) ============================================================================== Copied and modified: head/sys/dts/arm64/Makefile (from r325825, head/sys/boot/fdt/dts/arm64/Makefile) ============================================================================== Copied and modified: head/sys/dts/arm64/a64.dtsi (from r325825, head/sys/boot/fdt/dts/arm64/a64.dtsi) ============================================================================== Copied and modified: head/sys/dts/arm64/pine64_plus.dts (from r325825, head/sys/boot/fdt/dts/arm64/pine64_plus.dts) ============================================================================== Copied and modified: head/sys/dts/arm64/sun50i-a64-pine64-common.dtsi (from r325825, head/sys/boot/fdt/dts/arm64/sun50i-a64-pine64-common.dtsi) ============================================================================== Copied and modified: head/sys/dts/arm64/sun50i-a64-pine64-plus.dts (from r325825, head/sys/boot/fdt/dts/arm64/sun50i-a64-pine64-plus.dts) ============================================================================== Copied and modified: head/sys/dts/arm64/sun50i-a64-pine64.dts (from r325825, head/sys/boot/fdt/dts/arm64/sun50i-a64-pine64.dts) ============================================================================== Copied and modified: head/sys/dts/arm64/sun50i-a64.dtsi (from r325825, head/sys/boot/fdt/dts/arm64/sun50i-a64.dtsi) ============================================================================== Copied and modified: head/sys/dts/bindings-gpio.txt (from r325825, head/sys/boot/fdt/dts/bindings-gpio.txt) ============================================================================== Copied and modified: head/sys/dts/bindings-localbus.txt (from r325825, head/sys/boot/fdt/dts/bindings-localbus.txt) ============================================================================== Copied and modified: head/sys/dts/bindings-mpp.txt (from r325825, head/sys/boot/fdt/dts/bindings-mpp.txt) ============================================================================== Copied and modified: head/sys/dts/mips/Makefile (from r325825, head/sys/boot/fdt/dts/mips/Makefile) ============================================================================== Copied and modified: head/sys/dts/mips/beri-netfpga.dts (from r325825, head/sys/boot/fdt/dts/mips/beri-netfpga.dts) ============================================================================== Copied and modified: head/sys/dts/mips/beri-sim.dts (from r325825, head/sys/boot/fdt/dts/mips/beri-sim.dts) ============================================================================== Copied and modified: head/sys/dts/mips/beripad-de4.dts (from r325825, head/sys/boot/fdt/dts/mips/beripad-de4.dts) ============================================================================== Copied and modified: head/sys/dts/mips/beripad-sockit.dts (from r325825, head/sys/boot/fdt/dts/mips/beripad-sockit.dts) ============================================================================== Copied and modified: head/sys/dts/mips/fbsd-mt7620a.dtsi (from r325825, head/sys/boot/fdt/dts/mips/fbsd-mt7620a.dtsi) ============================================================================== Copied and modified: head/sys/dts/mips/fbsd-mt7621.dtsi (from r325825, head/sys/boot/fdt/dts/mips/fbsd-mt7621.dtsi) ============================================================================== Copied and modified: head/sys/dts/mips/fbsd-mt7628an.dtsi (from r325825, head/sys/boot/fdt/dts/mips/fbsd-mt7628an.dtsi) ============================================================================== Copied and modified: head/sys/dts/mips/fbsd-rt3883.dtsi (from r325825, head/sys/boot/fdt/dts/mips/fbsd-rt3883.dtsi) ============================================================================== Copied and modified: head/sys/dts/mips/xlp-basic.dts (from r325825, head/sys/boot/fdt/dts/mips/xlp-basic.dts) ============================================================================== Copied and modified: head/sys/dts/powerpc/Makefile (from r325825, head/sys/boot/fdt/dts/powerpc/Makefile) ============================================================================== Copied and modified: head/sys/dts/powerpc/mpc8555cds.dts (from r325825, head/sys/boot/fdt/dts/powerpc/mpc8555cds.dts) ============================================================================== Copied and modified: head/sys/dts/powerpc/mpc8572ds.dts (from r325825, head/sys/boot/fdt/dts/powerpc/mpc8572ds.dts) ============================================================================== Copied and modified: head/sys/dts/powerpc/p1020rdb.dts (from r325825, head/sys/boot/fdt/dts/powerpc/p1020rdb.dts) ============================================================================== Copied and modified: head/sys/dts/powerpc/p2020ds.dts (from r325825, head/sys/boot/fdt/dts/powerpc/p2020ds.dts) ============================================================================== Copied and modified: head/sys/dts/powerpc/p2041rdb.dts (from r325825, head/sys/boot/fdt/dts/powerpc/p2041rdb.dts) ============================================================================== Copied and modified: head/sys/dts/powerpc/p2041si.dtsi (from r325825, head/sys/boot/fdt/dts/powerpc/p2041si.dtsi) ============================================================================== Copied and modified: head/sys/dts/powerpc/p3041ds.dts (from r325825, head/sys/boot/fdt/dts/powerpc/p3041ds.dts) ============================================================================== Copied and modified: head/sys/dts/powerpc/p3041si.dtsi (from r325825, head/sys/boot/fdt/dts/powerpc/p3041si.dtsi) ============================================================================== Copied and modified: head/sys/dts/powerpc/p5020ds.dts (from r325825, head/sys/boot/fdt/dts/powerpc/p5020ds.dts) ============================================================================== Copied and modified: head/sys/dts/powerpc/p5020si.dtsi (from r325825, head/sys/boot/fdt/dts/powerpc/p5020si.dtsi) ============================================================================== Modified: head/sys/tools/fdt/make_dtb.sh ============================================================================== --- head/sys/tools/fdt/make_dtb.sh Tue Nov 14 18:18:18 2017 (r325825) +++ head/sys/tools/fdt/make_dtb.sh Tue Nov 14 21:03:57 2017 (r325826) @@ -21,6 +21,6 @@ fi for d in ${dts}; do dtb=${dtb_path}/`basename $d .dts`.dtb echo "converting $d -> $dtb" - cpp -P -x assembler-with-cpp -I $S/gnu/dts/include -I $S/boot/fdt/dts/${MACHINE} -I $S/gnu/dts/${MACHINE} -include $d /dev/null | - ${DTC} -@ -O dtb -o $dtb -b 0 -p 1024 -i $S/boot/fdt/dts/${MACHINE} -i $S/gnu/dts/${MACHINE} + cpp -P -x assembler-with-cpp -I $S/gnu/dts/include -I $S/dts/${MACHINE} -I $S/gnu/dts/${MACHINE} -include $d /dev/null | + ${DTC} -@ -O dtb -o $dtb -b 0 -p 1024 -i $S/dts/${MACHINE} -i $S/gnu/dts/${MACHINE} done From owner-svn-src-head@freebsd.org Tue Nov 14 21:11:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C244DDE39C; Tue, 14 Nov 2017 21:11:56 +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 66C8F6FB73; Tue, 14 Nov 2017 21:11:56 +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 vAELBtFL054712; Tue, 14 Nov 2017 21:11:55 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAELBtce054711; Tue, 14 Nov 2017 21:11:55 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201711142111.vAELBtce054711@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 14 Nov 2017 21:11:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325827 - head/tests/sys/aio X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/tests/sys/aio X-SVN-Commit-Revision: 325827 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 21:11:56 -0000 Author: asomers Date: Tue Nov 14 21:11:55 2017 New Revision: 325827 URL: https://svnweb.freebsd.org/changeset/base/325827 Log: Fix build on arm after r325817 Reported by: rpokala MFC after: 3 weeks X-MFC-With: 325817 Sponsored by: Spectra Logic Corp Modified: head/tests/sys/aio/lio_kqueue_test.c Modified: head/tests/sys/aio/lio_kqueue_test.c ============================================================================== --- head/tests/sys/aio/lio_kqueue_test.c Tue Nov 14 21:03:57 2017 (r325826) +++ head/tests/sys/aio/lio_kqueue_test.c Tue Nov 14 21:11:55 2017 (r325827) @@ -47,7 +47,6 @@ #define PATH_TEMPLATE "aio.XXXXXXXXXX" -#define DEBUG #define LIO_MAX 5 #define MAX_IOCBS_PER_LIO 64 #define MAX_IOCBS (LIO_MAX * MAX_IOCBS_PER_LIO) @@ -119,8 +118,8 @@ main(int argc, char *argv[]) = iocb[k]->aio_nbytes * k * (run + 1); #ifdef DEBUG - printf("hello iocb[k] %ld\n", - iocb[k]->aio_offset); + printf("hello iocb[k] %jd\n", + (intmax_t)iocb[k]->aio_offset); #endif iocb[k]->aio_lio_opcode = LIO_WRITE; } @@ -133,8 +132,9 @@ main(int argc, char *argv[]) error = errno; time(&time2); #ifdef DEBUG - printf("Time %ld %ld %ld result -> %d\n", - time1, time2, time2-time1, result); + printf("Time %jd %jd %jd result -> %d\n", + (intmax_t)time1, (intmax_t)time2, + (intmax_t)time2-time1, result); #endif if (result != 0) { errno = error; From owner-svn-src-head@freebsd.org Tue Nov 14 21:18:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5C1BDDE649; Tue, 14 Nov 2017 21:18:31 +0000 (UTC) (envelope-from benno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8FAF770110; Tue, 14 Nov 2017 21:18:31 +0000 (UTC) (envelope-from benno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAELIUOu057151; Tue, 14 Nov 2017 21:18:30 GMT (envelope-from benno@FreeBSD.org) Received: (from benno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAELIUoi057150; Tue, 14 Nov 2017 21:18:30 GMT (envelope-from benno@FreeBSD.org) Message-Id: <201711142118.vAELIUoi057150@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: benno set sender to benno@FreeBSD.org using -f From: Benno Rice Date: Tue, 14 Nov 2017 21:18:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325828 - head/usr.bin/fortune/datfiles X-SVN-Group: head X-SVN-Commit-Author: benno X-SVN-Commit-Paths: head/usr.bin/fortune/datfiles X-SVN-Commit-Revision: 325828 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 21:18:31 -0000 Author: benno Date: Tue Nov 14 21:18:30 2017 New Revision: 325828 URL: https://svnweb.freebsd.org/changeset/base/325828 Log: Remove all fortune datfiles except freebsd-tips. Humour is a funny thing. What is funny to one person is not funny to all people. What is insightful to one person is similarly not universal. The fortune datfiles have been around a long time and have undoubtedly amused people but it's time to acknowledge their subjective, and in some cases at least potentially offensive, nature and stop distributing them with the imprimatur of the FreeBSD project. If anyone wishes to distribute these via other mechanisms they are welcome to check them out of history and do so. MFC after: 2 days Deleted: head/usr.bin/fortune/datfiles/fortunes head/usr.bin/fortune/datfiles/fortunes.sp.ok head/usr.bin/fortune/datfiles/gerrold.limerick head/usr.bin/fortune/datfiles/limerick head/usr.bin/fortune/datfiles/limerick.sp.ok head/usr.bin/fortune/datfiles/murphy head/usr.bin/fortune/datfiles/murphy-o head/usr.bin/fortune/datfiles/murphy.sp.ok head/usr.bin/fortune/datfiles/startrek head/usr.bin/fortune/datfiles/startrek.sp.ok head/usr.bin/fortune/datfiles/zippy head/usr.bin/fortune/datfiles/zippy.sp.ok Modified: head/usr.bin/fortune/datfiles/Makefile Modified: head/usr.bin/fortune/datfiles/Makefile ============================================================================== --- head/usr.bin/fortune/datfiles/Makefile Tue Nov 14 21:11:55 2017 (r325827) +++ head/usr.bin/fortune/datfiles/Makefile Tue Nov 14 21:18:30 2017 (r325828) @@ -1,11 +1,7 @@ # @(#)Makefile 8.2 (Berkeley) 4/19/94 # $FreeBSD$ -DB= fortunes freebsd-tips murphy startrek zippy - -# TO AVOID INSTALLING THE POTENTIALLY OFFENSIVE FORTUNES, COMMENT OUT THE -# NEXT LINE. -DB+= limerick murphy-o gerrold.limerick +DB= freebsd-tips BLDS= ${DB:S/$/.dat/} FILES= ${DB} ${BLDS} From owner-svn-src-head@freebsd.org Tue Nov 14 21:31:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD775DDE9C2; Tue, 14 Nov 2017 21:31:31 +0000 (UTC) (envelope-from benno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 788CA708E1; Tue, 14 Nov 2017 21:31:31 +0000 (UTC) (envelope-from benno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAELVUs0064681; Tue, 14 Nov 2017 21:31:30 GMT (envelope-from benno@FreeBSD.org) Received: (from benno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAELVU7X064680; Tue, 14 Nov 2017 21:31:30 GMT (envelope-from benno@FreeBSD.org) Message-Id: <201711142131.vAELVU7X064680@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: benno set sender to benno@FreeBSD.org using -f From: Benno Rice Date: Tue, 14 Nov 2017 21:31:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325829 - head X-SVN-Group: head X-SVN-Commit-Author: benno X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 325829 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 21:31:31 -0000 Author: benno Date: Tue Nov 14 21:31:30 2017 New Revision: 325829 URL: https://svnweb.freebsd.org/changeset/base/325829 Log: Add fortune datfiles that are no longer distributed. MFC after: 2 days Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Nov 14 21:18:30 2017 (r325828) +++ head/ObsoleteFiles.inc Tue Nov 14 21:31:30 2017 (r325829) @@ -38,6 +38,21 @@ # xargs -n1 | sort | uniq -d; # done +# 20171114: Removal of all fortune datfiles other than freebsd-tips +OLD_FILES+=usr/share/games/fortune/fortunes +OLD_FILES+=usr/share/games/fortune/fortunes.dat +OLD_FILES+=usr/share/games/fortune/gerrold.limerick +OLD_FILES+=usr/share/games/fortune/gerrold.limerick.dat +OLD_FILES+=usr/share/games/fortune/limerick +OLD_FILES+=usr/share/games/fortune/limerick.dat +OLD_FILES+=usr/share/games/fortune/murphy +OLD_FILES+=usr/share/games/fortune/murphy-o +OLD_FILES+=usr/share/games/fortune/murphy-o.dat +OLD_FILES+=usr/share/games/fortune/murphy.dat +OLD_FILES+=usr/share/games/fortune/startrek +OLD_FILES+=usr/share/games/fortune/startrek.dat +OLD_FILES+=usr/share/games/fortune/zippy +OLD_FILES+=usr/share/games/fortune/zippy.dat # 20171112: Removal of eqnchar definition OLD_FILES+=usr/share/misc/eqnchar # 20171110: Removal of mailaddr man page From owner-svn-src-head@freebsd.org Tue Nov 14 23:02:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9925FDB833C; Tue, 14 Nov 2017 23:02:24 +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 4F3E1739D4; Tue, 14 Nov 2017 23:02:24 +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 vAEN2N8j004731; Tue, 14 Nov 2017 23:02:23 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAEN2JC5004695; Tue, 14 Nov 2017 23:02:19 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201711142302.vAEN2JC5004695@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 14 Nov 2017 23:02:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325834 - in head: . lib/libefivar release/arm64 release/powerpc release/tools share/examples/bootforth share/examples/etc share/man/man5 share/man/man8 stand stand/efi/boot1 stand/efi/... X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: . lib/libefivar release/arm64 release/powerpc release/tools share/examples/bootforth share/examples/etc share/man/man5 share/man/man8 stand stand/efi/boot1 stand/efi/loader stand/forth stand/... X-SVN-Commit-Revision: 325834 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 23:02:24 -0000 Author: imp Date: Tue Nov 14 23:02:19 2017 New Revision: 325834 URL: https://svnweb.freebsd.org/changeset/base/325834 Log: Move sys/boot to stand. Fix all references to new location Sponsored by: Netflix Added: head/stand/ - copied from r325833, head/sys/boot/ Deleted: head/sys/boot/ Modified: head/MAINTAINERS head/Makefile.inc1 head/lib/libefivar/Makefile head/release/arm64/PINE64.conf head/release/arm64/RPI3.conf head/release/powerpc/generate-hfs.sh head/release/tools/vmimage.subr head/share/examples/bootforth/README head/share/examples/etc/make.conf head/share/man/man5/make.conf.5 head/share/man/man8/diskless.8 head/stand/defs.mk head/stand/efi/boot1/Makefile.depend head/stand/efi/loader/Makefile.depend head/stand/forth/pnp.4th head/stand/forth/support.4th head/stand/i386/Makefile.inc head/stand/i386/boot2/Makefile.depend head/stand/i386/gptboot/Makefile.depend head/stand/i386/gptzfsboot/Makefile.depend head/stand/i386/loader/Makefile.depend head/stand/i386/pxeldr/Makefile.depend head/stand/i386/zfsboot/Makefile.depend head/stand/i386/zfsloader/Makefile.depend head/stand/userboot/userboot/Makefile.depend head/sys/Makefile head/sys/contrib/dev/acpica/acpica_prep.sh head/targets/pseudo/userland/lib/Makefile.depend head/targets/pseudo/userland/misc/Makefile.depend head/targets/pseudo/userland/share/Makefile.depend head/tools/boot/universe.sh head/tools/tools/bootparttest/Makefile head/tools/tools/zfsboottest/Makefile head/usr.sbin/bhyveload/Makefile head/usr.sbin/efivar/Makefile Modified: head/MAINTAINERS ============================================================================== --- head/MAINTAINERS Tue Nov 14 22:30:48 2017 (r325833) +++ head/MAINTAINERS Tue Nov 14 23:02:19 2017 (r325834) @@ -86,7 +86,7 @@ sh(1) jilles Pre-commit review requested. This also compiled in as builtins. share/mk imp, bapt, bdrewery, emaste, sjg Make is hard. share/mk/*.test.mk freebsd-testing,ngie (same list as share/mk too) Pre-commit review requested. -sys/boot/forth dteske Pre-commit review requested. +stand/forth dteske Pre-commit review requested. sys/compat/linuxkpi hselasky If in doubt, ask. sys/dev/e1000 erj Pre-commit phabricator review requested. sys/dev/ixgbe erj Pre-commit phabricator review requested. Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Nov 14 22:30:48 2017 (r325833) +++ head/Makefile.inc1 Tue Nov 14 23:02:19 2017 (r325834) @@ -251,6 +251,9 @@ SUBDIR+=secure .if !defined(NO_SHARE) SUBDIR+=share .endif +.if ${MK_BOOT} != "no" +SUBDIR+=stand +.endif SUBDIR+=sys usr.bin usr.sbin .if ${MK_TESTS} != "no" SUBDIR+= tests @@ -2082,7 +2085,7 @@ _clang_libs= lib/clang _gcc= gnu/usr.bin/cc .endif .if ${MK_USB} != "no" -_usb_tools= sys/boot/usb/tools +_usb_tools= stand/usb/tools .endif cross-tools: .MAKE .PHONY Modified: head/lib/libefivar/Makefile ============================================================================== --- head/lib/libefivar/Makefile Tue Nov 14 22:30:48 2017 (r325833) +++ head/lib/libefivar/Makefile Tue Nov 14 23:02:19 2017 (r325834) @@ -26,7 +26,7 @@ .include -EFIBOOT=${SRCTOP}/sys/boot/efi +EFIBOOT=${SRCTOP}/stand/efi EDK2INC=${SRCTOP}/sys/contrib/edk2/Include .PATH: ${EFIBOOT}/libefi Modified: head/release/arm64/PINE64.conf ============================================================================== --- head/release/arm64/PINE64.conf Tue Nov 14 22:30:48 2017 (r325833) +++ head/release/arm64/PINE64.conf Tue Nov 14 23:02:19 2017 (r325834) @@ -31,7 +31,7 @@ arm_install_uboot() { BOOTFILES="$(chroot ${CHROOTDIR} \ env TARGET=${EMBEDDED_TARGET} TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \ WITH_UNIFIED_OBJDIR=yes \ - make -C ${WORLDDIR}/sys/boot -V .OBJDIR)" + make -C ${WORLDDIR}/stand -V .OBJDIR)" BOOTFILES="$(realpath ${BOOTFILES})" chroot ${CHROOTDIR} mkdir -p ${FATMOUNT}/EFI/BOOT Modified: head/release/arm64/RPI3.conf ============================================================================== --- head/release/arm64/RPI3.conf Tue Nov 14 22:30:48 2017 (r325833) +++ head/release/arm64/RPI3.conf Tue Nov 14 23:02:19 2017 (r325834) @@ -45,7 +45,7 @@ arm_install_uboot() { BOOTFILES="$(chroot ${CHROOTDIR} \ env TARGET=${EMBEDDED_TARGET} TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \ WITH_UNIFIED_OBJDIR=yes \ - make -C ${WORLDDIR}/sys/boot -V .OBJDIR)" + make -C ${WORLDDIR}/stand -V .OBJDIR)" BOOTFILES="$(realpath ${BOOTFILES})" chroot ${CHROOTDIR} mkdir -p ${FATMOUNT}/EFI/BOOT Modified: head/release/powerpc/generate-hfs.sh ============================================================================== --- head/release/powerpc/generate-hfs.sh Tue Nov 14 22:30:48 2017 (r325833) +++ head/release/powerpc/generate-hfs.sh Tue Nov 14 23:02:19 2017 (r325834) @@ -32,7 +32,7 @@ cat > bootinfo.txt << EOF FreeBSD/powerpc bootloader FreeBSD - $FreeBSD: head/sys/boot/powerpc/boot1.chrp/bootinfo.txt 184490 2008-10 + $FreeBSD: head/stand/powerpc/boot1.chrp/bootinfo.txt 184490 2008-10 -31 00:52:31Z nwhitehorn $ Modified: head/release/tools/vmimage.subr ============================================================================== --- head/release/tools/vmimage.subr Tue Nov 14 22:30:48 2017 (r325833) +++ head/release/tools/vmimage.subr Tue Nov 14 23:02:19 2017 (r325834) @@ -16,7 +16,7 @@ write_partition_layout() { BOOTFILES="$(env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ WITH_UNIFIED_OBJDIR=yes \ - make -C ${WORLDDIR}/sys/boot -V .OBJDIR)" + make -C ${WORLDDIR}/stand -V .OBJDIR)" BOOTFILES="$(realpath ${BOOTFILES})" case "${TARGET}:${TARGET_ARCH}" in Modified: head/share/examples/bootforth/README ============================================================================== --- head/share/examples/bootforth/README Tue Nov 14 22:30:48 2017 (r325833) +++ head/share/examples/bootforth/README Tue Nov 14 23:02:19 2017 (r325834) @@ -1,6 +1,6 @@ Here you can find some simple examples how to use BootFORTH (part of the new bootloader) together with terminal emulation code (available when -compiling /sys/boot/i386/libi386 with -DTERM_EMU). +compiling /stand/i386/libi386 with -DTERM_EMU). Normally, you can place the files in /boot as they are here, and they will be automatically loaded by /boot/loader. You must choose between boot.4th or Modified: head/share/examples/etc/make.conf ============================================================================== --- head/share/examples/etc/make.conf Tue Nov 14 22:30:48 2017 (r325833) +++ head/share/examples/etc/make.conf Tue Nov 14 23:02:19 2017 (r325834) @@ -171,7 +171,7 @@ #BOOT_COMCONSOLE_SPEED= 115200 # # By default the 'pxeboot' loader retrieves the kernel via NFS. Defining -# this and recompiling /usr/src/sys/boot will cause it to retrieve the kernel +# this and recompiling /usr/src/stand will cause it to retrieve the kernel # via TFTP. This allows pxeboot to load a custom BOOTP diskless kernel yet # still mount the server's '/' (i.e. rather than load the server's kernel). # Modified: head/share/man/man5/make.conf.5 ============================================================================== --- head/share/man/man5/make.conf.5 Tue Nov 14 22:30:48 2017 (r325833) +++ head/share/man/man5/make.conf.5 Tue Nov 14 23:02:19 2017 (r325834) @@ -374,7 +374,7 @@ By default the .Xr pxeboot 8 loader retrieves the kernel via NFS. Defining this and recompiling -.Pa /usr/src/sys/boot +.Pa /usr/src/stand will cause it to retrieve the kernel via TFTP. This allows .Xr pxeboot 8 @@ -385,7 +385,7 @@ rather than load the server's kernel. .It Va LOADER_FIREWIRE_SUPPORT .Pq Vt bool Defining this and recompiling -.Pa /usr/src/sys/boot/i386 +.Pa /usr/src/stand/i386 will add .Xr dcons 4 console driver to Modified: head/share/man/man8/diskless.8 ============================================================================== --- head/share/man/man8/diskless.8 Tue Nov 14 22:30:48 2017 (r325833) +++ head/share/man/man8/diskless.8 Tue Nov 14 23:02:19 2017 (r325834) @@ -124,7 +124,7 @@ the .Nm machine, which may not be what you want to have happen. .Bd -literal -offset indent -cd /usr/src/sys/boot/i386 +cd /usr/src/stand/i386 make clean; make; make install cp /boot/pxeboot /tftpdir/ .Ed Modified: head/stand/defs.mk ============================================================================== --- head/sys/boot/defs.mk Tue Nov 14 22:30:48 2017 (r325833) +++ head/stand/defs.mk Tue Nov 14 23:02:19 2017 (r325834) @@ -5,7 +5,7 @@ .if !defined(__BOOT_DEFS_MK__) __BOOT_DEFS_MK__=${MFILE} -BOOTSRC= ${SRCTOP}/sys/boot +BOOTSRC= ${SRCTOP}/stand EFISRC= ${BOOTSRC}/efi EFIINC= ${EFISRC}/include EFIINCMD= ${EFIINC}/${MACHINE} @@ -17,7 +17,7 @@ SYSDIR= ${SRCTOP}/sys UBOOTSRC= ${BOOTSRC}/uboot ZFSSRC= ${BOOTSRC}/zfs -BOOTOBJ= ${OBJTOP}/sys/boot +BOOTOBJ= ${OBJTOP}/stand # BINDIR is where we install BINDIR?= /boot Modified: head/stand/efi/boot1/Makefile.depend ============================================================================== --- head/sys/boot/efi/boot1/Makefile.depend Tue Nov 14 22:30:48 2017 (r325833) +++ head/stand/efi/boot1/Makefile.depend Tue Nov 14 23:02:19 2017 (r325834) @@ -5,9 +5,9 @@ DIRDEPS = \ include \ include/xlocale \ lib/libmd \ - sys/boot/efi/libefi \ - sys/boot/libsa \ - sys/boot/zfs \ + stand/efi/libefi \ + stand/libsa \ + stand/zfs \ .include Modified: head/stand/efi/loader/Makefile.depend ============================================================================== --- head/sys/boot/efi/loader/Makefile.depend Tue Nov 14 22:30:48 2017 (r325833) +++ head/stand/efi/loader/Makefile.depend Tue Nov 14 23:02:19 2017 (r325834) @@ -4,10 +4,10 @@ DIRDEPS = \ include \ include/xlocale \ - sys/boot/efi/libefi \ - sys/boot/ficl \ - sys/boot/libsa \ - sys/boot/zfs \ + stand/efi/libefi \ + stand/ficl \ + stand/libsa \ + stand/zfs \ .include Modified: head/stand/forth/pnp.4th ============================================================================== --- head/sys/boot/forth/pnp.4th Tue Nov 14 22:30:48 2017 (r325833) +++ head/stand/forth/pnp.4th Tue Nov 14 23:02:19 2017 (r325834) @@ -45,7 +45,7 @@ structure: pnpident sizeof STAILQ_ENTRY cells member: pnpid.link \ pnpident ;structure -structure: pnpinfo \ sync with sys/boot/config/bootstrap.h +structure: pnpinfo \ sync with stand/common/bootstrap.h ptr pnpi.desc int pnpi.revision ptr pnpi.module \ (char*) module args Modified: head/stand/forth/support.4th ============================================================================== --- head/sys/boot/forth/support.4th Tue Nov 14 22:30:48 2017 (r325833) +++ head/stand/forth/support.4th Tue Nov 14 23:02:19 2017 (r325834) @@ -130,7 +130,7 @@ structure: module ;structure \ Internal loader structures (preloaded_file, kernel_module, file_metadata) -\ must be in sync with the C struct in sys/boot/common/bootstrap.h +\ must be in sync with the C struct in stand/common/bootstrap.h structure: preloaded_file ptr pf.name ptr pf.type Modified: head/stand/i386/Makefile.inc ============================================================================== --- head/sys/boot/i386/Makefile.inc Tue Nov 14 22:30:48 2017 (r325833) +++ head/stand/i386/Makefile.inc Tue Nov 14 23:02:19 2017 (r325834) @@ -1,4 +1,4 @@ -# Common defines for all of /sys/boot/i386/ +# Common defines for all of stand/i386/ # # $FreeBSD$ Modified: head/stand/i386/boot2/Makefile.depend ============================================================================== --- head/sys/boot/i386/boot2/Makefile.depend Tue Nov 14 22:30:48 2017 (r325833) +++ head/stand/i386/boot2/Makefile.depend Tue Nov 14 23:02:19 2017 (r325834) @@ -3,8 +3,8 @@ DIRDEPS = \ include \ - sys/boot/i386/btx/btx \ - sys/boot/i386/btx/lib \ + stand/i386/btx/btx \ + stand/i386/btx/lib \ .include Modified: head/stand/i386/gptboot/Makefile.depend ============================================================================== --- head/sys/boot/i386/gptboot/Makefile.depend Tue Nov 14 22:30:48 2017 (r325833) +++ head/stand/i386/gptboot/Makefile.depend Tue Nov 14 23:02:19 2017 (r325834) @@ -5,10 +5,10 @@ DIRDEPS = \ include \ include/xlocale \ lib/libmd \ - sys/boot/geli \ - sys/boot/i386/btx/btx \ - sys/boot/i386/btx/lib \ - sys/boot/libsa32 \ + stand/geli \ + stand/i386/btx/btx \ + stand/i386/btx/lib \ + stand/libsa32 \ .include Modified: head/stand/i386/gptzfsboot/Makefile.depend ============================================================================== --- head/sys/boot/i386/gptzfsboot/Makefile.depend Tue Nov 14 22:30:48 2017 (r325833) +++ head/stand/i386/gptzfsboot/Makefile.depend Tue Nov 14 23:02:19 2017 (r325834) @@ -5,11 +5,11 @@ DIRDEPS = \ include \ include/xlocale \ lib/libmd \ - sys/boot/geli \ - sys/boot/i386/btx/btx \ - sys/boot/i386/btx/lib \ - sys/boot/libsa32 \ - sys/boot/zfs32 \ + stand/geli \ + stand/i386/btx/btx \ + stand/i386/btx/lib \ + stand/libsa32 \ + stand/zfs32 \ .include Modified: head/stand/i386/loader/Makefile.depend ============================================================================== --- head/sys/boot/i386/loader/Makefile.depend Tue Nov 14 22:30:48 2017 (r325833) +++ head/stand/i386/loader/Makefile.depend Tue Nov 14 23:02:19 2017 (r325834) @@ -4,13 +4,13 @@ DIRDEPS = \ include \ include/xlocale \ - sys/boot/ficl32 \ - sys/boot/geli \ - sys/boot/i386/btx/btx \ - sys/boot/i386/btx/btxldr \ - sys/boot/i386/btx/lib \ - sys/boot/i386/libi386 \ - sys/boot/libsa32 \ + stand/ficl32 \ + stand/geli \ + stand/i386/btx/btx \ + stand/i386/btx/btxldr \ + stand/i386/btx/lib \ + stand/i386/libi386 \ + stand/libsa32 \ .include Modified: head/stand/i386/pxeldr/Makefile.depend ============================================================================== --- head/sys/boot/i386/pxeldr/Makefile.depend Tue Nov 14 22:30:48 2017 (r325833) +++ head/stand/i386/pxeldr/Makefile.depend Tue Nov 14 23:02:19 2017 (r325834) @@ -3,9 +3,9 @@ DIRDEPS = \ include \ - sys/boot/i386/btx/btx \ - sys/boot/i386/btx/btxldr \ - sys/boot/i386/loader \ + stand/i386/btx/btx \ + stand/i386/btx/btxldr \ + stand/i386/loader \ .include Modified: head/stand/i386/zfsboot/Makefile.depend ============================================================================== --- head/sys/boot/i386/zfsboot/Makefile.depend Tue Nov 14 22:30:48 2017 (r325833) +++ head/stand/i386/zfsboot/Makefile.depend Tue Nov 14 23:02:19 2017 (r325834) @@ -5,10 +5,10 @@ DIRDEPS = \ include \ include/xlocale \ lib/libmd \ - sys/boot/i386/btx/btx \ - sys/boot/i386/btx/lib \ - sys/boot/libsa32 \ - sys/boot/zfs32 \ + stand/i386/btx/btx \ + stand/i386/btx/lib \ + stand/libsa32 \ + stand/zfs32 \ .include Modified: head/stand/i386/zfsloader/Makefile.depend ============================================================================== --- head/sys/boot/i386/zfsloader/Makefile.depend Tue Nov 14 22:30:48 2017 (r325833) +++ head/stand/i386/zfsloader/Makefile.depend Tue Nov 14 23:02:19 2017 (r325834) @@ -4,14 +4,14 @@ DIRDEPS = \ include \ include/xlocale \ - sys/boot/ficl32 \ - sys/boot/geli \ - sys/boot/i386/btx/btx \ - sys/boot/i386/btx/btxldr \ - sys/boot/i386/btx/lib \ - sys/boot/i386/libi386 \ - sys/boot/libsa32 \ - sys/boot/zfs32 \ + stand/ficl32 \ + stand/geli \ + stand/i386/btx/btx \ + stand/i386/btx/btxldr \ + stand/i386/btx/lib \ + stand/i386/libi386 \ + stand/libsa32 \ + stand/zfs32 \ .include Modified: head/stand/userboot/userboot/Makefile.depend ============================================================================== --- head/sys/boot/userboot/userboot/Makefile.depend Tue Nov 14 22:30:48 2017 (r325833) +++ head/stand/userboot/userboot/Makefile.depend Tue Nov 14 23:02:19 2017 (r325834) @@ -4,9 +4,9 @@ DIRDEPS = \ include \ include/xlocale \ - sys/boot/ficl \ - sys/boot/libsa \ - sys/boot/zfs \ + stand/ficl \ + stand/libsa \ + stand/zfs \ .include Modified: head/sys/Makefile ============================================================================== --- head/sys/Makefile Tue Nov 14 22:30:48 2017 (r325833) +++ head/sys/Makefile Tue Nov 14 23:02:19 2017 (r325834) @@ -1,7 +1,7 @@ # $FreeBSD$ # Directories to include in cscope name file and TAGS. -CSCOPEDIRS= boot bsm cam cddl compat conf contrib crypto ddb dev fs gdb \ +CSCOPEDIRS= bsm cam cddl compat conf contrib crypto ddb dev fs gdb \ geom gnu isa kern libkern modules net net80211 \ netgraph netinet netinet6 netipsec netpfil \ netsmb nfs nfsclient nfsserver nlm ofed opencrypto \ @@ -61,11 +61,6 @@ TAGS ${.CURDIR}/TAGS: ${.CURDIR}/cscope.files .if !(make(cscope) || make(cscope-clean) || make(cscope-hook) || make(TAGS)) .include - -# The boot loader -.if ${MK_BOOT} != "no" -SUBDIR= boot -.endif # Loadable kernel modules Modified: head/sys/contrib/dev/acpica/acpica_prep.sh ============================================================================== --- head/sys/contrib/dev/acpica/acpica_prep.sh Tue Nov 14 22:30:48 2017 (r325833) +++ head/sys/contrib/dev/acpica/acpica_prep.sh Tue Nov 14 23:02:19 2017 (r325834) @@ -90,4 +90,4 @@ echo "Directories you may want to 'svn diff':" echo " sys/contrib/dev/acpica sys/dev/acpica \\" echo " sys/amd64/acpica sys/arm64/acpica sys/i386/acpica sys/x86/acpica \\" echo " sys/amd64/include sys/arm64/include sys/i386/include include \\" -echo " sys/boot sys/conf sys/modules/acpi usr.sbin/acpi" +echo " stand sys/conf sys/modules/acpi usr.sbin/acpi" Modified: head/targets/pseudo/userland/lib/Makefile.depend ============================================================================== --- head/targets/pseudo/userland/lib/Makefile.depend Tue Nov 14 22:30:48 2017 (r325833) +++ head/targets/pseudo/userland/lib/Makefile.depend Tue Nov 14 23:02:19 2017 (r325834) @@ -196,7 +196,7 @@ DIRDEPS+= \ .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" || \ ${MACHINE_CPUARCH} == "powerpc" -DIRDEPS+= sys/boot/libsa32 +DIRDEPS+= stand/libsa32 .endif .if defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mfilter} Modified: head/targets/pseudo/userland/misc/Makefile.depend ============================================================================== --- head/targets/pseudo/userland/misc/Makefile.depend Tue Nov 14 22:30:48 2017 (r325833) +++ head/targets/pseudo/userland/misc/Makefile.depend Tue Nov 14 23:02:19 2017 (r325834) @@ -6,12 +6,12 @@ .include .endif -_sys_boot_efi= sys/boot/efi/loader sys/boot/efi/boot1 +_sys_boot_efi= stand/efi/loader stand/efi/boot1 .if ${MK_FDT} != "no" -_sys_boot_fdt= sys/boot/fdt sys/boot/efi/fdt +_sys_boot_fdt= stand/fdt stand/efi/fdt .endif .if ${MK_ZFS} != "no" -_sys_boot_zfs= sys/boot/zfs +_sys_boot_zfs= stand/zfs .endif DIRDEPS = \ @@ -22,40 +22,40 @@ DIRDEPS = \ rescue/rescue \ .if ${MK_BOOT} != "no" -DIRDEPS+= sys/boot/common +DIRDEPS+= stand/common .if ${MK_FORTH} != "no" DIRDEPS+= \ - sys/boot/ficl \ - sys/boot/forth \ + stand/ficl \ + stand/forth \ .endif DIRDEPS.x86sys= \ - sys/boot/efi/libefi \ - sys/boot/geli \ - sys/boot/i386/boot0 \ - sys/boot/i386/boot0sio \ - sys/boot/i386/boot2 \ - sys/boot/i386/btx/btx \ - sys/boot/i386/btx/btxldr \ - sys/boot/i386/btx/lib \ - sys/boot/i386/cdboot \ - sys/boot/i386/gptboot \ - sys/boot/i386/libfirewire \ - sys/boot/i386/libi386 \ - sys/boot/i386/loader \ - sys/boot/i386/mbr \ - sys/boot/i386/pmbr \ - sys/boot/i386/pxeldr \ - sys/boot/libsa32 \ + stand/efi/libefi \ + stand/geli \ + stand/i386/boot0 \ + stand/i386/boot0sio \ + stand/i386/boot2 \ + stand/i386/btx/btx \ + stand/i386/btx/btxldr \ + stand/i386/btx/lib \ + stand/i386/cdboot \ + stand/i386/gptboot \ + stand/i386/libfirewire \ + stand/i386/libi386 \ + stand/i386/loader \ + stand/i386/mbr \ + stand/i386/pmbr \ + stand/i386/pxeldr \ + stand/libsa32 \ ${_sys_boot_zfs} \ .if ${MK_ZFS} != "no" DIRDEPS.x86sys+= \ - sys/boot/i386/gptzfsboot \ - sys/boot/i386/zfsboot \ - sys/boot/i386/zfsloader \ + stand/i386/gptzfsboot \ + stand/i386/zfsboot \ + stand/i386/zfsloader \ DIRDEPS+= \ sbin/zfsbootcfg \ @@ -65,13 +65,13 @@ DIRDEPS+= \ DIRDEPS.amd64= \ ${DIRDEPS.x86sys} \ ${_sys_boot_efi} \ - sys/boot/ficl32 \ - sys/boot/userboot/test \ - sys/boot/userboot/userboot \ + stand/ficl32 \ + stand/userboot/test \ + stand/userboot/userboot \ .if ${MK_ZFS} != "no" DIRDEPS.amd64+= \ - sys/boot/zfs32 \ + stand/zfs32 \ .endif @@ -83,9 +83,9 @@ DIRDEPS+= \ DIRDEPS.arm= ${_sys_boot_fdt} ${_sys_boot_efi} DIRDEPS.arm64= ${_sys_boot_fdt} ${_sys_boot_efi} -DIRDEPS.i386= ${DIRDEPS.x86sys} ${_sys_boot_efi} sys/boot/i386/kgzldr -DIRDEPS.powerpc= ${_sys_boot_fdt} sys/boot/libsa32 sys/boot/ofw sys/boot/uboot -DIRDEPS.sparc64= sys/boot/ofw ${_sys_boot_zfs} +DIRDEPS.i386= ${DIRDEPS.x86sys} ${_sys_boot_efi} stand/i386/kgzldr +DIRDEPS.powerpc= ${_sys_boot_fdt} stand/libsa32 stand/ofw stand/uboot +DIRDEPS.sparc64= stand/ofw ${_sys_boot_zfs} .endif DIRDEPS+= ${DIRDEPS.${MACHINE}:U} Modified: head/targets/pseudo/userland/share/Makefile.depend ============================================================================== --- head/targets/pseudo/userland/share/Makefile.depend Tue Nov 14 22:30:48 2017 (r325833) +++ head/targets/pseudo/userland/share/Makefile.depend Tue Nov 14 23:02:19 2017 (r325834) @@ -91,7 +91,7 @@ DIRDEPS = \ share/xml/atf \ share/xsl/atf \ share/zoneinfo \ - sys/boot/man \ + stand/man \ .include Modified: head/tools/boot/universe.sh ============================================================================== --- head/tools/boot/universe.sh Tue Nov 14 22:30:48 2017 (r325833) +++ head/tools/boot/universe.sh Tue Nov 14 23:02:19 2017 (r325834) @@ -11,8 +11,8 @@ # powerpc/powerpc powerpc/powerpc64 powerpc/powerpcspe \ # riscv/riscv64 riscv/riscv64sf # -# This script is expected to be run in sys/boot (though you could run it anywhere -# in the tree). It does a full clean build. For sys/boot you can do all the archs in +# This script is expected to be run in stand (though you could run it anywhere +# in the tree). It does a full clean build. For stand you can do all the archs in # about a minute or two on a fast machine. It's also possible that you need a full # make universe for this to work completely. # @@ -40,7 +40,7 @@ dobuild() } top=$(make -V SRCTOP) -cd $top/sys/boot +cd $top/stand # Default build for a goodly selection of architectures for i in \ Modified: head/tools/tools/bootparttest/Makefile ============================================================================== --- head/tools/tools/bootparttest/Makefile Tue Nov 14 22:30:48 2017 (r325833) +++ head/tools/tools/bootparttest/Makefile Tue Nov 14 23:02:19 2017 (r325834) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${SRCTOP}/sys/boot/common +.PATH: ${SRCTOP}/stand/common BINDIR?= /usr/bin @@ -9,7 +9,7 @@ MAN= SRCS= bootparttest.c crc32.c stub.c part.c disk.c -CFLAGS= -I${SRCTOP}/sys/boot/common \ +CFLAGS= -I${SRCTOP}/stand/common \ -DLOADER_GPT_SUPPORT -DLOADER_MBR_SUPPORT -DPART_DEBUG \ -DDISK_DEBUG Modified: head/tools/tools/zfsboottest/Makefile ============================================================================== --- head/tools/tools/zfsboottest/Makefile Tue Nov 14 22:30:48 2017 (r325833) +++ head/tools/tools/zfsboottest/Makefile Tue Nov 14 23:02:19 2017 (r325834) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${SRCTOP}/sys/boot/zfs ${SRCTOP}/sys/cddl/boot/zfs +.PATH: ${SRCTOP}/stand/zfs ${SRCTOP}/sys/cddl/boot/zfs BINDIR?= /usr/bin SCRIPTSDIR?= /usr/bin @@ -11,7 +11,7 @@ SCRIPTSNAME= zfsboottest.sh MAN= CFLAGS= -O1 \ - -I${SRCTOP}/sys/boot/zfs \ + -I${SRCTOP}/stand/zfs \ -I${SRCTOP}/sys/cddl/boot/zfs \ -I. \ -fdiagnostics-show-option \ Modified: head/usr.sbin/bhyveload/Makefile ============================================================================== --- head/usr.sbin/bhyveload/Makefile Tue Nov 14 22:30:48 2017 (r325833) +++ head/usr.sbin/bhyveload/Makefile Tue Nov 14 23:02:19 2017 (r325834) @@ -9,6 +9,6 @@ LIBADD= vmmapi WARNS?= 3 -CFLAGS+=-I${SRCTOP}/sys/boot/userboot +CFLAGS+=-I${SRCTOP}/stand/userboot .include Modified: head/usr.sbin/efivar/Makefile ============================================================================== --- head/usr.sbin/efivar/Makefile Tue Nov 14 22:30:48 2017 (r325833) +++ head/usr.sbin/efivar/Makefile Tue Nov 14 23:02:19 2017 (r325834) @@ -7,7 +7,7 @@ LIBADD= efivar SRCS= efivar.c efiutil.c -EFIBOOT=${SRCTOP}/sys/boot/efi +EFIBOOT=${SRCTOP}/stand/efi CFLAGS+= -I${EFIBOOT}/include .include From owner-svn-src-head@freebsd.org Tue Nov 14 23:50:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28FAFDB97C8; Tue, 14 Nov 2017 23:50:32 +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 EA5A37567A; Tue, 14 Nov 2017 23:50:31 +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 vAENoVWj022103; Tue, 14 Nov 2017 23:50:31 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAENoUig022101; Tue, 14 Nov 2017 23:50:30 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201711142350.vAENoUig022101@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 14 Nov 2017 23:50:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325835 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 325835 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 23:50:32 -0000 Author: jhb Date: Tue Nov 14 23:50:30 2017 New Revision: 325835 URL: https://svnweb.freebsd.org/changeset/base/325835 Log: Use #if instead of #ifdef for __BSD_VISIBLE tests. __BSD_VISIBLE is always defined and it's value instead needs to be tested via #if to determine if FreeBSD-specific APIs should be exposed. PR: 196226, 223481 (exp-run) Submitted by: pluknet MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D12977 Modified: head/sys/sys/aio.h head/sys/sys/shm.h Modified: head/sys/sys/aio.h ============================================================================== --- head/sys/sys/aio.h Tue Nov 14 23:02:19 2017 (r325834) +++ head/sys/sys/aio.h Tue Nov 14 23:50:30 2017 (r325835) @@ -252,7 +252,7 @@ int aio_suspend(const struct aiocb * const[], int, con */ int aio_mlock(struct aiocb *); -#ifdef __BSD_VISIBLE +#if __BSD_VISIBLE ssize_t aio_waitcomplete(struct aiocb **, struct timespec *); #endif Modified: head/sys/sys/shm.h ============================================================================== --- head/sys/sys/shm.h Tue Nov 14 23:02:19 2017 (r325834) +++ head/sys/sys/shm.h Tue Nov 14 23:50:30 2017 (r325835) @@ -159,7 +159,7 @@ typedef __size_t size_t; #endif __BEGIN_DECLS -#ifdef __BSD_VISIBLE +#if __BSD_VISIBLE int shmsys(int, ...); #endif void *shmat(int, const void *, int); From owner-svn-src-head@freebsd.org Wed Nov 15 00:06:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 532E6DB9DEC; Wed, 15 Nov 2017 00:06:19 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20A3675EC7; Wed, 15 Nov 2017 00:06:19 +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 vAF06ISU030390; Wed, 15 Nov 2017 00:06:18 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAF06INu030389; Wed, 15 Nov 2017 00:06:18 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201711150006.vAF06INu030389@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 15 Nov 2017 00:06:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325836 - head/share/man/man7 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/share/man/man7 X-SVN-Commit-Revision: 325836 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 00:06:19 -0000 Author: imp Date: Wed Nov 15 00:06:18 2017 New Revision: 325836 URL: https://svnweb.freebsd.org/changeset/base/325836 Log: Add note about where to use MACHINE (just src/stand and src/sys and a few others). Add note aboute MACHINE_CPUARCH. Sponsored by: Netflix Modified: head/share/man/man7/arch.7 Modified: head/share/man/man7/arch.7 ============================================================================== --- head/share/man/man7/arch.7 Tue Nov 14 23:50:30 2017 (r325835) +++ head/share/man/man7/arch.7 Wed Nov 15 00:06:18 2017 (r325836) @@ -378,6 +378,10 @@ Both of these hardware platforms supported only the of i386 where they shared a common ABI, except for certain kernel / userland interfaces relating to underlying hardware platform differences in bus architecture, device enumeration and boot interface. +Generally, +.Dv MACHINE +should only be used in src/sys and src/stand or in system imagers or +installers. .It Dv MACHINE_ARCH Represents the CPU processor architecture. This is the same as the native platforms .Xr uname 1 @@ -408,6 +412,15 @@ It is unfortunate that amd64 speifies the 64-bit evolu platform (it matches the 'first rule') as everybody else uses x86_64. There is no standard name for the processor: each OS selects its own conventions. +.It Dv MACHINE_CPUARCH Represents the source location for a given +.Dv MACHINE_ARCH . +For example, +.Dv MACHINE_CPUARCH +is defined to be mips for all the flavors of mips that we support +since we support them all with a shared set of sources. +One might thing that it should be x86 for both amd64 and i386. +However, since we don't support these two architectures with the same +source base, that's not done despite it's logical appeal. .It Dv CPUTYPE Sets the flavor of .Dv MACHINE_ARCH to build. From owner-svn-src-head@freebsd.org Wed Nov 15 01:29:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9FF4DBB70E; Wed, 15 Nov 2017 01:29:47 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99630784C5; Wed, 15 Nov 2017 01:29:47 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vAF1Tc3C049323; Tue, 14 Nov 2017 17:29:38 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vAF1Tc7o049322; Tue, 14 Nov 2017 17:29:38 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201711150129.vAF1Tc7o049322@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r325828 - head/usr.bin/fortune/datfiles In-Reply-To: <201711142118.vAELIUoi057150@repo.freebsd.org> To: Benno Rice Date: Tue, 14 Nov 2017 17:29:38 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 01:29:47 -0000 > Author: benno > Date: Tue Nov 14 21:18:30 2017 > New Revision: 325828 > URL: https://svnweb.freebsd.org/changeset/base/325828 > > Log: > Remove all fortune datfiles except freebsd-tips. > > Humour is a funny thing. What is funny to one person is not funny to all > people. What is insightful to one person is similarly not universal. The > fortune datfiles have been around a long time and have undoubtedly amused > people but it's time to acknowledge their subjective, and in some cases > at least potentially offensive, nature and stop distributing them with the > imprimatur of the FreeBSD project. > > If anyone wishes to distribute these via other mechanisms they are welcome to > check them out of history and do so. > > MFC after: 2 days You need to follow the deprication procedures in the handbook... Including a relnotes Y would of at least been a start... *sigh* -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Wed Nov 15 02:24:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E41E0DBCE0A; Wed, 15 Nov 2017 02:24:48 +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 BD92579F68; Wed, 15 Nov 2017 02:24:48 +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 vAF2OlSE088189; Wed, 15 Nov 2017 02:24:47 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAF2Ole2088186; Wed, 15 Nov 2017 02:24:47 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201711150224.vAF2Ole2088186@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 15 Nov 2017 02:24:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325838 - in head/sys/dev: nvme pci X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys/dev: nvme pci X-SVN-Commit-Revision: 325838 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 02:24:49 -0000 Author: imp Date: Wed Nov 15 02:24:47 2017 New Revision: 325838 URL: https://svnweb.freebsd.org/changeset/base/325838 Log: Inline pcie_link_{status,caps} where needed. Remove them as they aren't really needed and I don't want to document them. Suggested by: jhb@ Sponsored by: Netflix Modified: head/sys/dev/nvme/nvme_sim.c head/sys/dev/pci/pci.c head/sys/dev/pci/pcivar.h Modified: head/sys/dev/nvme/nvme_sim.c ============================================================================== --- head/sys/dev/nvme/nvme_sim.c Wed Nov 15 02:03:38 2017 (r325837) +++ head/sys/dev/nvme/nvme_sim.c Wed Nov 15 02:24:47 2017 (r325838) @@ -129,9 +129,11 @@ static uint32_t nvme_link_kBps(struct nvme_controller *ctrlr) { uint32_t speed, lanes, link[] = { 1, 250000, 500000, 985000, 1970000 }; + uint32_t status; - speed = pcie_link_status(ctrlr->dev) & PCIEM_LINK_STA_SPEED; - lanes = (pcie_link_status(ctrlr->dev) & PCIEM_LINK_STA_WIDTH) >> 4; + status = pcie_read_config(ctrlr->dev, PCIER_LINK_STA, 2); + speed = status & PCIEM_LINK_STA_SPEED; + lanes = (status & PCIEM_LINK_STA_WIDTH) >> 4; /* * Failsafe on link speed indicator. If it is insane report the number of * lanes as the speed. Not 100% accurate, but may be diagnostic. @@ -217,18 +219,21 @@ nvme_sim_action(struct cam_sim *sim, union ccb *ccb) struct ccb_trans_settings_nvme *nvmep; struct ccb_trans_settings_nvme *nvmex; device_t dev; + uint32_t status, caps; dev = ctrlr->dev; cts = &ccb->cts; nvmex = &cts->xport_specific.nvme; nvmep = &cts->proto_specific.nvme; + status = pcie_read_config(dev, PCIER_LINK_STA, 2); + caps = pcie_read_config(dev, PCIER_LINK_CAP, 2); nvmex->valid = CTS_NVME_VALID_SPEC | CTS_NVME_VALID_LINK; nvmex->spec = nvme_mmio_read_4(ctrlr, vs); - nvmex->speed = pcie_link_status(dev) & PCIEM_LINK_STA_SPEED; - nvmex->lanes = (pcie_link_status(dev) & PCIEM_LINK_STA_WIDTH) >> 4; - nvmex->max_speed = pcie_link_caps(dev) & PCIEM_LINK_CAP_MAX_SPEED; - nvmex->max_lanes = (pcie_link_caps(dev) & PCIEM_LINK_CAP_MAX_WIDTH) >> 4; + nvmex->speed = status & PCIEM_LINK_STA_SPEED; + nvmex->lanes = (status & PCIEM_LINK_STA_WIDTH) >> 4; + nvmex->max_speed = caps & PCIEM_LINK_CAP_MAX_SPEED; + nvmex->max_lanes = (caps & PCIEM_LINK_CAP_MAX_WIDTH) >> 4; /* XXX these should be something else maybe ? */ nvmep->valid = 1; Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Wed Nov 15 02:03:38 2017 (r325837) +++ head/sys/dev/pci/pci.c Wed Nov 15 02:24:47 2017 (r325838) @@ -6115,31 +6115,3 @@ pcie_flr(device_t dev, u_int max_delay, bool force) pci_printf(&dinfo->cfg, "Transactions pending after FLR!\n"); return (true); } - -uint16_t -pcie_link_status(device_t dev) -{ - struct pci_devinfo *dinfo; - struct pcicfg_pcie *cfg; - int pos; - - dinfo = device_get_ivars(dev); - cfg = &dinfo->cfg.pcie; - pos = cfg->pcie_location; - - return pci_read_config(dev, pos + PCIER_LINK_STA, 2); -} - -uint16_t -pcie_link_caps(device_t dev) -{ - struct pci_devinfo *dinfo; - struct pcicfg_pcie *cfg; - int pos; - - dinfo = device_get_ivars(dev); - cfg = &dinfo->cfg.pcie; - pos = cfg->pcie_location; - - return pci_read_config(dev, pos + PCIER_LINK_CAP, 2); -} Modified: head/sys/dev/pci/pcivar.h ============================================================================== --- head/sys/dev/pci/pcivar.h Wed Nov 15 02:03:38 2017 (r325837) +++ head/sys/dev/pci/pcivar.h Wed Nov 15 02:24:47 2017 (r325838) @@ -598,8 +598,6 @@ uint32_t pcie_adjust_config(device_t dev, int reg, uin bool pcie_flr(device_t dev, u_int max_delay, bool force); int pcie_get_max_completion_timeout(device_t dev); bool pcie_wait_for_pending_transactions(device_t dev, u_int max_delay); -uint16_t pcie_link_status(device_t dev); -uint16_t pcie_link_caps(device_t dev); #ifdef BUS_SPACE_MAXADDR #if (BUS_SPACE_MAXADDR > 0xFFFFFFFF) From owner-svn-src-head@freebsd.org Wed Nov 15 02:25:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D8A0DBCE50 for ; Wed, 15 Nov 2017 02:25:01 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22c.google.com (mail-it0-x22c.google.com [IPv6:2607:f8b0:4001:c0b::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9A97F7A09A for ; Wed, 15 Nov 2017 02:25:00 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22c.google.com with SMTP id n134so13762499itg.0 for ; Tue, 14 Nov 2017 18:25:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=kvHzIPVnbzqFZEcsKxuTjJ8PmoQ832270RHDNv5kVYU=; b=I3hJNFJFEcDc8gIKOriU9GKslbgvaBV++XK/4EhGY4pJ0IUCRn8p3geJU+FIHrNhhC TtBtyzOh412plI0J+vRdYH7sJu7DuNjDHkPJXEXLw6bYL2L4wTGoLn9P8m9e29yoCGGm Lt73gQp3bADwhmWKcaSzr00cteExeTIknq89JTFcQRCQyixx8gP9Wev5pcLYF4S5oPfU wynEi3o17ZfR7B0DrTnJnnLUJ4f7qe/kh3wwAWrptnghzipmnY/Z7+2Nu/eZHlQgaEs9 MBajni5zK/aZmnivZzsAVOVXEJxNptSGbRgRcglWdxCh6tXpJQHvNntHhipTZbcbUeGE Tyuw== 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=kvHzIPVnbzqFZEcsKxuTjJ8PmoQ832270RHDNv5kVYU=; b=MNP4XD4vIqbtLhYfGVFD8NmkJMUIxMSGjEY3b4bhqQeuX94dq6Uqtufww++HRSBSQx fFmAYWzKxYgwb7hEPTNWJX/m52ICBLo/xradeWpigfofQHsldXerIU6OoGfUCjW91o/T 30qDRrFnMFzrHuJkLjVt1XyIZc55V+V7IA4VUuKVVTVgF1E0+FY7oPR2tvNxB/uTm7zo LGPXhPJ3oxlnz42Zd9CGWqwPWtsV6UOyrLqCMWfu5l4CZJHpW41VBeQT4YiheRShouHB kaH7J8QCH5TM6AkqLqqDaeR6RtO9BlxLE81pukhbF/7yNtrnpXR4FKwWdXevwBKJNUPM nqng== X-Gm-Message-State: AJaThX4t6PBpLdTzeTnCaI5wyCqFuwVbQqYyq15xUU4ScIobl1BTfsDC Ow+Ro1/BrBlbxN07qo7k9ebL+amPXTSkvGKthCc4FQ== X-Google-Smtp-Source: AGs4zMbJJhco7UGCOqhxqLa0c01C1cdysoEYpNOyrJpsfv0pivZD4+SFd/PCj/W4g+YJvYCfDpRCi/mtoMePdTS+qWw= X-Received: by 10.36.184.5 with SMTP id m5mr18766193ite.69.1510712699446; Tue, 14 Nov 2017 18:24:59 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Tue, 14 Nov 2017 18:24:58 -0800 (PST) X-Originating-IP: [2603:300b:6:5100:9151:cca:5a07:fd20] In-Reply-To: References: <201711140505.vAE555QF042553@repo.freebsd.org> <1911777.0IZEGYVEAQ@ralph.baldwin.cx> From: Warner Losh Date: Tue, 14 Nov 2017 19:24:58 -0700 X-Google-Sender-Auth: eMowI8OCsVgLUzajbJZkfzMywM0 Message-ID: Subject: Re: svn commit: r325793 - head/sys/dev/pci To: John Baldwin Cc: Warner Losh , 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.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 02:25:01 -0000 On Tue, Nov 14, 2017 at 10:00 AM, Warner Losh wrote: > > > On Tue, Nov 14, 2017 at 8:47 AM, John Baldwin wrote: > >> On Tuesday, November 14, 2017 05:05:05 AM Warner Losh wrote: >> > Author: imp >> > Date: Tue Nov 14 05:05:05 2017 >> > New Revision: 325793 >> > URL: https://svnweb.freebsd.org/changeset/base/325793 >> > >> > Log: >> > Provide pcie_link_status and pcie_link_cap convenience functions. >> > >> > Sponsored by: Netflix >> >> Note that we already have pcie_read_config() (documented in the manpage). >> With pcie_read_config() these would be one liners: >> >> pcie_link_status() -> pcie_read_config(dev, PCIER_LINK_STA, 2); >> >> This is what the existing hotplug code uses rather than having dedicated >> functions for each PCI-e register. >> >> New functions should be documented in pci.9. >> > > Thanks for the reminders. I'll either transition to the one liner you > talked about, or document the new functions. > Good suggestion. I've implemented this instead in r325838 Warner From owner-svn-src-head@freebsd.org Wed Nov 15 03:47:00 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF718DBE2D5; Wed, 15 Nov 2017 03:47:00 +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 79B837C3C9; Wed, 15 Nov 2017 03:47:00 +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 vAF3kxjX022116; Wed, 15 Nov 2017 03:46:59 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAF3kxZb022115; Wed, 15 Nov 2017 03:46:59 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201711150346.vAF3kxZb022115@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 15 Nov 2017 03:46:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325839 - head/sys/dts X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dts X-SVN-Commit-Revision: 325839 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 03:47:00 -0000 Author: imp Date: Wed Nov 15 03:46:59 2017 New Revision: 325839 URL: https://svnweb.freebsd.org/changeset/base/325839 Log: Fix SYSDIR path. After the move, we need to chop off a couple ../ from the prior definition. But a safer definition is SRCTOP/sys, so use that. Sponsored by: Netflix Modified: head/sys/dts/Makefile.inc Modified: head/sys/dts/Makefile.inc ============================================================================== --- head/sys/dts/Makefile.inc Wed Nov 15 02:24:47 2017 (r325838) +++ head/sys/dts/Makefile.inc Wed Nov 15 03:46:59 2017 (r325839) @@ -1,6 +1,6 @@ # $FreeBSD$ -SYSDIR?=${.CURDIR}/../../../.. +SYSDIR?=${SRCTOP}/sys test-dts: .for dts in ${DTS} From owner-svn-src-head@freebsd.org Wed Nov 15 06:45:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B8D3DC133E; Wed, 15 Nov 2017 06:45:34 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 560B7801F5; Wed, 15 Nov 2017 06:45:34 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAF6jXUn096878; Wed, 15 Nov 2017 06:45:33 GMT (envelope-from wma@FreeBSD.org) Received: (from wma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAF6jXdS096877; Wed, 15 Nov 2017 06:45:33 GMT (envelope-from wma@FreeBSD.org) Message-Id: <201711150645.vAF6jXdS096877@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wma set sender to wma@FreeBSD.org using -f From: Wojciech Macek Date: Wed, 15 Nov 2017 06:45:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325840 - head/sys/dev/cxgbe X-SVN-Group: head X-SVN-Commit-Author: wma X-SVN-Commit-Paths: head/sys/dev/cxgbe X-SVN-Commit-Revision: 325840 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 06:45:34 -0000 Author: wma Date: Wed Nov 15 06:45:33 2017 New Revision: 325840 URL: https://svnweb.freebsd.org/changeset/base/325840 Log: CXGBE: fix big-endian behaviour The setbit/clearbit pair casts the bitfield pointer to uint8_t* which effectively treats its contents as little-endian variable. The ffs() function accepts int as the parameter, which is big-endian. Use uint8_t here to avoid mismatch, as we have only 4 doorbells. Submitted by: Wojciech Macek Reviewed by: np Obtained from: Semihalf Sponsored by: QCM Technologies Differential revision: https://reviews.freebsd.org/D13084 Modified: head/sys/dev/cxgbe/adapter.h Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Wed Nov 15 03:46:59 2017 (r325839) +++ head/sys/dev/cxgbe/adapter.h Wed Nov 15 06:45:33 2017 (r325840) @@ -424,7 +424,7 @@ struct sge_eq { struct mtx eq_lock; struct tx_desc *desc; /* KVA of descriptor ring */ - uint16_t doorbells; + uint8_t doorbells; volatile uint32_t *udb; /* KVA of doorbell (lies within BAR2) */ u_int udb_qid; /* relative qid within the doorbell page */ uint16_t sidx; /* index of the entry with the status page */ @@ -695,7 +695,7 @@ struct sge_nm_txq { uint16_t equiqidx; /* EQUIQ last requested at this pidx */ uint16_t equeqidx; /* EQUEQ last requested at this pidx */ uint16_t dbidx; /* pidx of the most recent doorbell */ - uint16_t doorbells; + uint8_t doorbells; volatile uint32_t *udb; u_int udb_qid; u_int cntxt_id; @@ -807,7 +807,7 @@ struct adapter { struct l2t_data *l2t; /* L2 table */ struct tid_info tids; - uint16_t doorbells; + uint8_t doorbells; int offload_map; /* ports with IFCAP_TOE enabled */ int active_ulds; /* ULDs activated on this adapter */ int flags; From owner-svn-src-head@freebsd.org Wed Nov 15 10:57:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AEF58DD937E; Wed, 15 Nov 2017 10:57:59 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 439476618D; Wed, 15 Nov 2017 10:57:58 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.103] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 7CD4B3C5CD7; Wed, 15 Nov 2017 21:23:49 +1100 (AEDT) Date: Wed, 15 Nov 2017 21:23:49 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Ed Maste cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r325825 - head/sys/kern In-Reply-To: <201711141818.vAEIIILV078187@repo.freebsd.org> Message-ID: <20171115171430.P1572@besplex.bde.org> References: <201711141818.vAEIIILV078187@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=KeqiiUQD c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=pGLkceISAAAA:8 a=NEAV23lmAAAA:8 a=gItIPT6LeQ0ia8_EdOcA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 10:57:59 -0000 On Tue, 14 Nov 2017, Ed Maste wrote: > Log: > disallow clock_settime too far in the future to avoid panic > > clock_ts_to_ct has a KASSERT that the converted year fits into four > digits. By default (sysctl debug.allow_insane_settime is 0) the kernel > disallows a time too far in the future, using a value of 9999 366-day > years. However, clock_settime is epoch-relative and the assertion will > fail with a tv_sec corresponding to some 8030 years. > > Avoid trying to be too clever, and just use a limit of 8000 365-day > years past the epoch. > > Submitted by: Heqing Yan > Reported by: Syzkaller (https://github.com/google/syzkaller) > MFC after: 1 week > Sponsored by: The FreeBSD Foundation I reported this panic and several others in reply to previous attempted fixes. > Modified: head/sys/kern/kern_time.c > ============================================================================== > --- head/sys/kern/kern_time.c Tue Nov 14 18:17:23 2017 (r325824) > +++ head/sys/kern/kern_time.c Tue Nov 14 18:18:18 2017 (r325825) > @@ -408,7 +408,7 @@ kern_clock_settime(struct thread *td, clockid_t clock_ > if (ats->tv_nsec < 0 || ats->tv_nsec >= 1000000000 || > ats->tv_sec < 0) > return (EINVAL); > - if (!allow_insane_settime && ats->tv_sec > 9999ULL * 366 * 24 * 60 * 60) > + if (!allow_insane_settime && ats->tv_sec > 8000ULL * 365 * 24 * 60 * 60) > return (EINVAL); > /* XXX Don't convert nsec->usec and back */ > TIMESPEC_TO_TIMEVAL(&atv, ats); Panics still occur when year 10K is reached via: tv_sec = 8000ULL * 365 * 24 * 60 * 60 - 1 (approx. 7994.5 years) POSIX Epoch offset = 1970 years utc_offset() <= (approx. 7994.5 + 1970) - 100000 = approx. -36.5 years (utc_offset() in seconds is the combined timezone offset 60 * tz.tz_minuteswest + (wall_cmos_clock ? adjkerntz : 0).) A utc_offset() of -36.5 years is preposterous but easy to reach without overflow (utc_offset() has blind overflow at approx. +-69 years). For 32-bit time_t, both of the above abominable ULL checks are vacuously false, but panics still occurs for all widths of time_t with non- preposterous values near the Epoch: tv_sec = 0 (Epoch in UTC) utc_offset() = 10 * 60 (garbage or panic in RTC; should be 1969) Wthout INVARIANTS, this writes the RTC with the garbage time 70/01/01 00:5c:05, where at least the 5c is from a buffer overrun. With INVARIANTS, garbage produced by clock_tv_to_ct() is detected there. tv_sec = INT_MAX (2038 in UTC) utc_offset() = -1 (garbage or panic in RTC; should be EINVAL) This takes 32-bit time_t. Then tv_sec - utc_offset() blindly overflows to INT_MIN on supported arches. The resulting garbage or panic in the RTC is not much worse than for any other negative value of tv_sec - utc_offset(). The settime() level doesn't know about utc_offset() (except for the historical mistake of setting the timezone using settimeofday()), and this is correct. Only the RTC level uses utc_offset() (or the timezone). The correct error handling is to not KASSERT() anything, but avoid overflow and just don't continue after overflow or set the RTC to a preposterous or unportable value. Bruce From owner-svn-src-head@freebsd.org Wed Nov 15 11:14:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6AC09DD9919; Wed, 15 Nov 2017 11:14:41 +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 1BD65669E9; Wed, 15 Nov 2017 11:14:41 +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 vAFBEeah015035; Wed, 15 Nov 2017 11:14:40 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAFBEeUb015030; Wed, 15 Nov 2017 11:14:40 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201711151114.vAFBEeUb015030@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 15 Nov 2017 11:14:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325841 - in head/sys: conf dev/mlx4 dev/mlx4/mlx4_core dev/mlx4/mlx4_en dev/mlx4/mlx4_ib modules/mlx4 X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys: conf dev/mlx4 dev/mlx4/mlx4_core dev/mlx4/mlx4_en dev/mlx4/mlx4_ib modules/mlx4 X-SVN-Commit-Revision: 325841 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 11:14:41 -0000 Author: hselasky Date: Wed Nov 15 11:14:39 2017 New Revision: 325841 URL: https://svnweb.freebsd.org/changeset/base/325841 Log: Update the mlx4 core and mlx4en(4) modules towards Linux v4.9. Background: The coming ibcore update forces an update of mlx4ib(4) which in turn requires an updated mlx4 core module. This also affects the mlx4en(4) module because commonly used APIs are updated. This commit is a middle step updating the mlx4 modules towards the new ibcore. This change contains no major new features. Changes in mlx4: a) Improved error handling when mlx4 PCI devices are detached inside VMs. b) Major update of codebase towards Linux 4.9. Changes in mlx4ib(4): a) Minimal changes needed in order to compile using the updated mlx4 core APIs. Changes in mlx4en(4): a) Update flow steering code in mlx4en to use new APIs for registering MAC addresses and IP addresses. b) Update all statistics counters to be 64-bit. c) Minimal changes needed in order to compile using the updated mlx4 core APIs. Sponsored by: Mellanox Technologies MFC after: 1 week Added: head/sys/dev/mlx4/mlx4_core/fw_qos.h (contents, props changed) head/sys/dev/mlx4/mlx4_core/mlx4_fw_qos.c (contents, props changed) Deleted: head/sys/dev/mlx4/mlx4_core/mlx4_sys_tune.c Modified: head/sys/conf/files head/sys/dev/mlx4/cmd.h head/sys/dev/mlx4/cq.h head/sys/dev/mlx4/device.h head/sys/dev/mlx4/driver.h head/sys/dev/mlx4/mlx4_core/fw.h head/sys/dev/mlx4/mlx4_core/icm.h head/sys/dev/mlx4/mlx4_core/mlx4.h head/sys/dev/mlx4/mlx4_core/mlx4_alloc.c head/sys/dev/mlx4/mlx4_core/mlx4_catas.c head/sys/dev/mlx4/mlx4_core/mlx4_cmd.c head/sys/dev/mlx4/mlx4_core/mlx4_cq.c head/sys/dev/mlx4/mlx4_core/mlx4_eq.c head/sys/dev/mlx4/mlx4_core/mlx4_fw.c head/sys/dev/mlx4/mlx4_core/mlx4_icm.c head/sys/dev/mlx4/mlx4_core/mlx4_intf.c head/sys/dev/mlx4/mlx4_core/mlx4_main.c head/sys/dev/mlx4/mlx4_core/mlx4_mcg.c head/sys/dev/mlx4/mlx4_core/mlx4_mr.c head/sys/dev/mlx4/mlx4_core/mlx4_pd.c head/sys/dev/mlx4/mlx4_core/mlx4_port.c head/sys/dev/mlx4/mlx4_core/mlx4_profile.c head/sys/dev/mlx4/mlx4_core/mlx4_qp.c head/sys/dev/mlx4/mlx4_core/mlx4_reset.c head/sys/dev/mlx4/mlx4_core/mlx4_resource_tracker.c head/sys/dev/mlx4/mlx4_core/mlx4_sense.c head/sys/dev/mlx4/mlx4_core/mlx4_srq.c head/sys/dev/mlx4/mlx4_en/en.h head/sys/dev/mlx4/mlx4_en/en_port.h head/sys/dev/mlx4/mlx4_en/mlx4_en_cq.c head/sys/dev/mlx4/mlx4_en/mlx4_en_main.c head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c head/sys/dev/mlx4/mlx4_en/mlx4_en_port.c head/sys/dev/mlx4/mlx4_en/mlx4_en_resources.c head/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c head/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c head/sys/dev/mlx4/mlx4_ib/mlx4_ib.h head/sys/dev/mlx4/mlx4_ib/mlx4_ib_cq.c head/sys/dev/mlx4/mlx4_ib/mlx4_ib_mad.c head/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c head/sys/dev/mlx4/mlx4_ib/mlx4_ib_mr.c head/sys/dev/mlx4/mlx4_ib/mlx4_ib_qp.c head/sys/dev/mlx4/mlx4_ib/mlx4_ib_srq.c head/sys/dev/mlx4/mlx4_ib/mlx4_ib_sysfs.c head/sys/dev/mlx4/qp.h head/sys/dev/mlx4/stats.h head/sys/modules/mlx4/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Nov 15 06:45:33 2017 (r325840) +++ head/sys/conf/files Wed Nov 15 11:14:39 2017 (r325841) @@ -4569,6 +4569,8 @@ dev/mlx4/mlx4_core/mlx4_eq.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_fw.c optional mlx4 pci \ compile-with "${OFED_C}" +dev/mlx4/mlx4_core/mlx4_fw_qos.c optional mlx4 pci \ + compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_icm.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_intf.c optional mlx4 pci \ @@ -4594,8 +4596,6 @@ dev/mlx4/mlx4_core/mlx4_sense.c optional mlx4 pci \ dev/mlx4/mlx4_core/mlx4_srq.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_resource_tracker.c optional mlx4 pci \ - compile-with "${OFED_C}" -dev/mlx4/mlx4_core/mlx4_sys_tune.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_en/mlx4_en_cq.c optional mlx4en pci inet inet6 \ Modified: head/sys/dev/mlx4/cmd.h ============================================================================== --- head/sys/dev/mlx4/cmd.h Wed Nov 15 06:45:33 2017 (r325840) +++ head/sys/dev/mlx4/cmd.h Wed Nov 15 11:14:39 2017 (r325841) @@ -36,6 +36,8 @@ #include #include +struct mlx4_counter; + enum { /* initialization and general commands */ MLX4_CMD_SYS_EN = 0x1, @@ -67,8 +69,13 @@ enum { MLX4_CMD_MAP_ICM_AUX = 0xffc, MLX4_CMD_UNMAP_ICM_AUX = 0xffb, MLX4_CMD_SET_ICM_SIZE = 0xffd, + MLX4_CMD_ACCESS_REG = 0x3b, + MLX4_CMD_ALLOCATE_VPP = 0x80, + MLX4_CMD_SET_VPORT_QOS = 0x81, + /*master notify fw on finish for slave's flr*/ MLX4_CMD_INFORM_FLR_DONE = 0x5b, + MLX4_CMD_VIRT_PORT_MAP = 0x5c, MLX4_CMD_GET_OP_REQ = 0x59, /* TPT commands */ @@ -116,6 +123,7 @@ enum { /* special QP and management commands */ MLX4_CMD_CONF_SPECIAL_QP = 0x23, MLX4_CMD_MAD_IFC = 0x24, + MLX4_CMD_MAD_DEMUX = 0x203, /* multicast commands */ MLX4_CMD_READ_MCG = 0x25, @@ -125,6 +133,7 @@ enum { /* miscellaneous commands */ MLX4_CMD_DIAG_RPRT = 0x30, MLX4_CMD_NOP = 0x31, + MLX4_CMD_CONFIG_DEV = 0x3a, MLX4_CMD_ACCESS_MEM = 0x2e, MLX4_CMD_SET_VEP = 0x52, @@ -158,6 +167,9 @@ enum { MLX4_QP_FLOW_STEERING_ATTACH = 0x65, MLX4_QP_FLOW_STEERING_DETACH = 0x66, MLX4_FLOW_STEERING_IB_UC_QP_RANGE = 0x64, + + /* Update and read QCN parameters */ + MLX4_CMD_CONGESTION_CTRL_OPCODE = 0x68, }; enum { @@ -167,27 +179,85 @@ enum { }; enum { + /* virtual to physical port mapping opcode modifiers */ + MLX4_GET_PORT_VIRT2PHY = 0x0, + MLX4_SET_PORT_VIRT2PHY = 0x1, +}; + +enum { MLX4_MAILBOX_SIZE = 4096, MLX4_ACCESS_MEM_ALIGN = 256, }; enum { - /* set port opcode modifiers */ - MLX4_SET_PORT_GENERAL = 0x0, - MLX4_SET_PORT_RQP_CALC = 0x1, - MLX4_SET_PORT_MAC_TABLE = 0x2, - MLX4_SET_PORT_VLAN_TABLE = 0x3, - MLX4_SET_PORT_PRIO_MAP = 0x4, - MLX4_SET_PORT_GID_TABLE = 0x5, - MLX4_SET_PORT_PRIO2TC = 0x8, - MLX4_SET_PORT_SCHEDULER = 0x9 + /* Set port opcode modifiers */ + MLX4_SET_PORT_IB_OPCODE = 0x0, + MLX4_SET_PORT_ETH_OPCODE = 0x1, + MLX4_SET_PORT_BEACON_OPCODE = 0x4, }; enum { + /* Set port Ethernet input modifiers */ + MLX4_SET_PORT_GENERAL = 0x0, + MLX4_SET_PORT_RQP_CALC = 0x1, + MLX4_SET_PORT_MAC_TABLE = 0x2, + MLX4_SET_PORT_VLAN_TABLE = 0x3, + MLX4_SET_PORT_PRIO_MAP = 0x4, + MLX4_SET_PORT_GID_TABLE = 0x5, + MLX4_SET_PORT_PRIO2TC = 0x8, + MLX4_SET_PORT_SCHEDULER = 0x9, + MLX4_SET_PORT_VXLAN = 0xB, + MLX4_SET_PORT_ROCE_ADDR = 0xD +}; + +enum { + MLX4_CMD_MAD_DEMUX_CONFIG = 0, + MLX4_CMD_MAD_DEMUX_QUERY_STATE = 1, + MLX4_CMD_MAD_DEMUX_QUERY_RESTR = 2, /* Query mad demux restrictions */ +}; + +enum { MLX4_CMD_WRAPPED, MLX4_CMD_NATIVE }; +/* + * MLX4_RX_CSUM_MODE_VAL_NON_TCP_UDP - + * Receive checksum value is reported in CQE also for non TCP/UDP packets. + * + * MLX4_RX_CSUM_MODE_L4 - + * L4_CSUM bit in CQE, which indicates whether or not L4 checksum + * was validated correctly, is supported. + * + * MLX4_RX_CSUM_MODE_IP_OK_IP_NON_TCP_UDP - + * IP_OK CQE's field is supported also for non TCP/UDP IP packets. + * + * MLX4_RX_CSUM_MODE_MULTI_VLAN - + * Receive Checksum offload is supported for packets with more than 2 vlan headers. + */ +enum mlx4_rx_csum_mode { + MLX4_RX_CSUM_MODE_VAL_NON_TCP_UDP = 1UL << 0, + MLX4_RX_CSUM_MODE_L4 = 1UL << 1, + MLX4_RX_CSUM_MODE_IP_OK_IP_NON_TCP_UDP = 1UL << 2, + MLX4_RX_CSUM_MODE_MULTI_VLAN = 1UL << 3 +}; + +struct mlx4_config_dev_params { + u16 vxlan_udp_dport; + u8 rx_csum_flags_port_1; + u8 rx_csum_flags_port_2; +}; + +enum mlx4_en_congestion_control_algorithm { + MLX4_CTRL_ALGO_802_1_QAU_REACTION_POINT = 0, +}; + +enum mlx4_en_congestion_control_opmod { + MLX4_CONGESTION_CONTROL_GET_PARAMS, + MLX4_CONGESTION_CONTROL_GET_STATISTICS, + MLX4_CONGESTION_CONTROL_SET_PARAMS = 4, +}; + struct mlx4_dev; struct mlx4_cmd_mailbox { @@ -233,26 +303,28 @@ static inline int mlx4_cmd_imm(struct mlx4_dev *dev, u struct mlx4_cmd_mailbox *mlx4_alloc_cmd_mailbox(struct mlx4_dev *dev); void mlx4_free_cmd_mailbox(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox); +int mlx4_get_counter_stats(struct mlx4_dev *dev, int counter_index, + struct mlx4_counter *counter_stats, int reset); u32 mlx4_comm_get_version(void); -int mlx4_set_vf_mac(struct mlx4_dev *dev, int port, int vf, u8 *mac); -int mlx4_set_vf_vlan(struct mlx4_dev *dev, int port, int vf, u16 vlan, u8 qos); +int mlx4_set_vf_mac(struct mlx4_dev *dev, int port, int vf, u64 mac); +int mlx4_set_vf_vlan(struct mlx4_dev *dev, int port, int vf, u16 vlan, + u8 qos, __be16 proto); +int mlx4_set_vf_rate(struct mlx4_dev *dev, int port, int vf, int min_tx_rate, + int max_tx_rate); int mlx4_set_vf_spoofchk(struct mlx4_dev *dev, int port, int vf, bool setting); -int mlx4_set_vf_link_state(struct mlx4_dev *dev, int port, int vf, int link_state); -int mlx4_get_vf_link_state(struct mlx4_dev *dev, int port, int vf); +int mlx4_config_dev_retrieval(struct mlx4_dev *dev, + struct mlx4_config_dev_params *params); +void mlx4_cmd_wake_completions(struct mlx4_dev *dev); +void mlx4_report_internal_err_comm_event(struct mlx4_dev *dev); /* * mlx4_get_slave_default_vlan - - * retrun true if VST ( default vlan) - * if VST will fill vlan & qos (if not NULL) + * return true if VST ( default vlan) + * if VST, will return vlan & qos (if not NULL) */ -bool mlx4_get_slave_default_vlan(struct mlx4_dev *dev, int port, int slave, u16 *vlan, u8 *qos); +bool mlx4_get_slave_default_vlan(struct mlx4_dev *dev, int port, int slave, + u16 *vlan, u8 *qos); -enum { - IFLA_VF_LINK_STATE_AUTO, /* link state of the uplink */ - IFLA_VF_LINK_STATE_ENABLE, /* link always up */ - IFLA_VF_LINK_STATE_DISABLE, /* link always down */ - __IFLA_VF_LINK_STATE_MAX, -}; - #define MLX4_COMM_GET_IF_REV(cmd_chan_ver) (u8)((cmd_chan_ver) >> 8) +#define COMM_CHAN_EVENT_INTERNAL_ERR (1 << 17) #endif /* MLX4_CMD_H */ Modified: head/sys/dev/mlx4/cq.h ============================================================================== --- head/sys/dev/mlx4/cq.h Wed Nov 15 06:45:33 2017 (r325840) +++ head/sys/dev/mlx4/cq.h Wed Nov 15 11:14:39 2017 (r325841) @@ -42,31 +42,22 @@ struct mlx4_cqe { __be32 vlan_my_qpn; __be32 immed_rss_invalid; __be32 g_mlpath_rqpn; + __be16 sl_vid; union { struct { - union { - struct { - __be16 sl_vid; - __be16 rlid; - }; - __be32 timestamp_16_47; - }; + __be16 rlid; __be16 status; u8 ipv6_ext_mask; u8 badfcs_enc; }; - struct { - __be16 reserved1; - u8 smac[6]; - }; + u8 smac[ETH_ALEN]; }; __be32 byte_cnt; __be16 wqe_index; __be16 checksum; - u8 reserved2[1]; - __be16 timestamp_0_15; + u8 reserved[3]; u8 owner_sr_opcode; -} __packed; +}; struct mlx4_err_cqe { __be32 my_qpn; @@ -95,7 +86,13 @@ struct mlx4_ts_cqe { } __packed; enum { - MLX4_CQE_VLAN_PRESENT_MASK = 1 << 29, + MLX4_CQE_L2_TUNNEL_IPOK = 1 << 31, + MLX4_CQE_CVLAN_PRESENT_MASK = 1 << 29, + MLX4_CQE_SVLAN_PRESENT_MASK = 1 << 30, + MLX4_CQE_L2_TUNNEL = 1 << 27, + MLX4_CQE_L2_TUNNEL_CSUM = 1 << 26, + MLX4_CQE_L2_TUNNEL_IPV4 = 1 << 25, + MLX4_CQE_QPN_MASK = 0xffffff, MLX4_CQE_VID_MASK = 0xfff, }; @@ -177,5 +174,5 @@ int mlx4_cq_modify(struct mlx4_dev *dev, struct mlx4_c u16 count, u16 period); int mlx4_cq_resize(struct mlx4_dev *dev, struct mlx4_cq *cq, int entries, struct mlx4_mtt *mtt); -int mlx4_cq_ignore_overrun(struct mlx4_dev *dev, struct mlx4_cq *cq); + #endif /* MLX4_CQ_H */ Modified: head/sys/dev/mlx4/device.h ============================================================================== --- head/sys/dev/mlx4/device.h Wed Nov 15 06:45:33 2017 (r325840) +++ head/sys/dev/mlx4/device.h Wed Nov 15 11:14:39 2017 (r325841) @@ -39,20 +39,21 @@ #include #include #include +#include +#include + #include #include +#define DEFAULT_UAR_PAGE_SHIFT 12 + #define MAX_MSIX_P_PORT 17 #define MAX_MSIX 64 -#define MSIX_LEGACY_SZ 4 #define MIN_MSIX_P_PORT 5 +#define MLX4_IS_LEGACY_EQ_MODE(dev_cap) ((dev_cap).num_comp_vectors < \ + (dev_cap).num_ports * MIN_MSIX_P_PORT) -#define MLX4_ROCE_MAX_GIDS 128 -#define MLX4_ROCE_PF_GIDS 16 - -#define MLX4_NUM_UP 8 -#define MLX4_NUM_TC 8 #define MLX4_MAX_100M_UNITS_VAL 255 /* * work around: can't set values * greater then this value when @@ -62,6 +63,9 @@ #define MLX4_RATELIMIT_1G_UNITS 4 /* 1 Gbps */ #define MLX4_RATELIMIT_DEFAULT 0x00ff +#define MLX4_ROCE_MAX_GIDS 128 +#define MLX4_ROCE_PF_GIDS 16 + #define CORE_CLOCK_MASK 0xffffffffffffULL enum { @@ -70,8 +74,9 @@ enum { MLX4_FLAG_MASTER = 1 << 2, MLX4_FLAG_SLAVE = 1 << 3, MLX4_FLAG_SRIOV = 1 << 4, - MLX4_FLAG_DEV_NUM_STR = 1 << 5, - MLX4_FLAG_OLD_REG_MAC = 1 << 6, + MLX4_FLAG_OLD_REG_MAC = 1 << 6, + MLX4_FLAG_BONDED = 1 << 7, + MLX4_FLAG_SECURE_HOST = 1 << 8, }; enum { @@ -81,7 +86,8 @@ enum { enum { MLX4_MAX_PORTS = 2, - MLX4_MAX_PORT_PKEYS = 128 + MLX4_MAX_PORT_PKEYS = 128, + MLX4_MAX_PORT_GIDS = 128 }; /* base qkey for use in sriov tunnel-qp/proxy-qp communication. @@ -92,14 +98,14 @@ enum { #define MLX4_RESERVED_QKEY_MASK (0xFFFF0000) enum { - MLX4_BOARD_ID_LEN = 64, - MLX4_VSD_LEN = 208 + MLX4_BOARD_ID_LEN = 64 }; enum { MLX4_MAX_NUM_PF = 16, - MLX4_MAX_NUM_VF = 64, - MLX4_MFUNC_MAX = 80, + MLX4_MAX_NUM_VF = 126, + MLX4_MAX_NUM_VF_P_PORT = 64, + MLX4_MFUNC_MAX = 128, MLX4_MAX_EQ_NUM = 1024, MLX4_MFUNC_EQ_NUM = 4, MLX4_MFUNC_MAX_EQES = 8, @@ -119,6 +125,14 @@ enum { MLX4_STEERING_MODE_DEVICE_MANAGED }; +enum { + MLX4_STEERING_DMFS_A0_DEFAULT, + MLX4_STEERING_DMFS_A0_DYNAMIC, + MLX4_STEERING_DMFS_A0_STATIC, + MLX4_STEERING_DMFS_A0_DISABLE, + MLX4_STEERING_DMFS_A0_NOT_SUPPORTED +}; + static inline const char *mlx4_steering_mode_str(int steering_mode) { switch (steering_mode) { @@ -137,6 +151,11 @@ static inline const char *mlx4_steering_mode_str(int s } enum { + MLX4_TUNNEL_OFFLOAD_MODE_NONE, + MLX4_TUNNEL_OFFLOAD_MODE_VXLAN +}; + +enum { MLX4_DEV_CAP_FLAG_RC = 1LL << 0, MLX4_DEV_CAP_FLAG_UC = 1LL << 1, MLX4_DEV_CAP_FLAG_UD = 1LL << 2, @@ -161,12 +180,10 @@ enum { MLX4_DEV_CAP_FLAG_UDP_RSS = 1LL << 40, MLX4_DEV_CAP_FLAG_VEP_UC_STEER = 1LL << 41, MLX4_DEV_CAP_FLAG_VEP_MC_STEER = 1LL << 42, - MLX4_DEV_CAP_FLAG_CROSS_CHANNEL = 1LL << 44, MLX4_DEV_CAP_FLAG_COUNTERS = 1LL << 48, - MLX4_DEV_CAP_FLAG_COUNTERS_EXT = 1LL << 49, - MLX4_DEV_CAP_FLAG_SET_PORT_ETH_SCHED = 1LL << 53, + MLX4_DEV_CAP_FLAG_RSS_IP_FRAG = 1LL << 52, + MLX4_DEV_CAP_FLAG_SET_ETH_SCHED = 1LL << 53, MLX4_DEV_CAP_FLAG_SENSE_SUPPORT = 1LL << 55, - MLX4_DEV_CAP_FLAG_FAST_DROP = 1LL << 57, MLX4_DEV_CAP_FLAG_PORT_MNG_CHG_EV = 1LL << 59, MLX4_DEV_CAP_FLAG_64B_EQE = 1LL << 61, MLX4_DEV_CAP_FLAG_64B_CQE = 1LL << 62 @@ -177,51 +194,51 @@ enum { MLX4_DEV_CAP_FLAG2_RSS_TOP = 1LL << 1, MLX4_DEV_CAP_FLAG2_RSS_XOR = 1LL << 2, MLX4_DEV_CAP_FLAG2_FS_EN = 1LL << 3, - MLX4_DEV_CAP_FLAG2_FSM = 1LL << 4, - MLX4_DEV_CAP_FLAG2_VLAN_CONTROL = 1LL << 5, - MLX4_DEV_CAP_FLAG2_UPDATE_QP = 1LL << 6, - MLX4_DEV_CAP_FLAG2_LB_SRC_CHK = 1LL << 7, - MLX4_DEV_CAP_FLAG2_DMFS_IPOIB = 1LL << 8, - MLX4_DEV_CAP_FLAG2_ETS_CFG = 1LL << 9, - MLX4_DEV_CAP_FLAG2_ETH_BACKPL_AN_REP = 1LL << 10, - MLX4_DEV_CAP_FLAG2_FLOWSTATS_EN = 1LL << 11, - MLX4_DEV_CAP_FLAG2_RECOVERABLE_ERROR_EVENT = 1LL << 12, - MLX4_DEV_CAP_FLAG2_TS = 1LL << 13, - MLX4_DEV_CAP_FLAG2_DRIVER_VERSION_TO_FW = 1LL << 14, - MLX4_DEV_CAP_FLAG2_REASSIGN_MAC_EN = 1LL << 15, - MLX4_DEV_CAP_FLAG2_VXLAN_OFFLOADS = 1LL << 16, - MLX4_DEV_CAP_FLAG2_FS_EN_NCSI = 1LL << 17, + MLX4_DEV_CAP_FLAG2_REASSIGN_MAC_EN = 1LL << 4, + MLX4_DEV_CAP_FLAG2_TS = 1LL << 5, + MLX4_DEV_CAP_FLAG2_VLAN_CONTROL = 1LL << 6, + MLX4_DEV_CAP_FLAG2_FSM = 1LL << 7, + MLX4_DEV_CAP_FLAG2_UPDATE_QP = 1LL << 8, + MLX4_DEV_CAP_FLAG2_DMFS_IPOIB = 1LL << 9, + MLX4_DEV_CAP_FLAG2_VXLAN_OFFLOADS = 1LL << 10, + MLX4_DEV_CAP_FLAG2_MAD_DEMUX = 1LL << 11, + MLX4_DEV_CAP_FLAG2_CQE_STRIDE = 1LL << 12, + MLX4_DEV_CAP_FLAG2_EQE_STRIDE = 1LL << 13, + MLX4_DEV_CAP_FLAG2_ETH_PROT_CTRL = 1LL << 14, + MLX4_DEV_CAP_FLAG2_ETH_BACKPL_AN_REP = 1LL << 15, + MLX4_DEV_CAP_FLAG2_CONFIG_DEV = 1LL << 16, + MLX4_DEV_CAP_FLAG2_SYS_EQS = 1LL << 17, MLX4_DEV_CAP_FLAG2_80_VFS = 1LL << 18, - MLX4_DEV_CAP_FLAG2_DMFS_TAG_MODE = 1LL << 19, - MLX4_DEV_CAP_FLAG2_ROCEV2 = 1LL << 20, - MLX4_DEV_CAP_FLAG2_ETH_PROT_CTRL = 1LL << 21, - MLX4_DEV_CAP_FLAG2_CQE_STRIDE = 1LL << 22, - MLX4_DEV_CAP_FLAG2_EQE_STRIDE = 1LL << 23, - MLX4_DEV_CAP_FLAG2_UPDATE_QP_SRC_CHECK_LB = 1LL << 24, - MLX4_DEV_CAP_FLAG2_RX_CSUM_MODE = 1LL << 25, - MLX4_DEV_CAP_FLAG2_SYS_EQS = 1LL << 26, + MLX4_DEV_CAP_FLAG2_FS_A0 = 1LL << 19, + MLX4_DEV_CAP_FLAG2_RECOVERABLE_ERROR_EVENT = 1LL << 20, + MLX4_DEV_CAP_FLAG2_PORT_REMAP = 1LL << 21, + MLX4_DEV_CAP_FLAG2_QCN = 1LL << 22, + MLX4_DEV_CAP_FLAG2_QP_RATE_LIMIT = 1LL << 23, + MLX4_DEV_CAP_FLAG2_FLOWSTATS_EN = 1LL << 24, + MLX4_DEV_CAP_FLAG2_QOS_VPP = 1LL << 25, + MLX4_DEV_CAP_FLAG2_ETS_CFG = 1LL << 26, + MLX4_DEV_CAP_FLAG2_PORT_BEACON = 1LL << 27, + MLX4_DEV_CAP_FLAG2_IGNORE_FCS = 1LL << 28, + MLX4_DEV_CAP_FLAG2_PHV_EN = 1LL << 29, + MLX4_DEV_CAP_FLAG2_SKIP_OUTER_VLAN = 1LL << 30, + MLX4_DEV_CAP_FLAG2_UPDATE_QP_SRC_CHECK_LB = 1ULL << 31, + MLX4_DEV_CAP_FLAG2_LB_SRC_CHK = 1ULL << 32, + MLX4_DEV_CAP_FLAG2_ROCE_V1_V2 = 1ULL << 33, + MLX4_DEV_CAP_FLAG2_DMFS_UC_MC_SNIFFER = 1ULL << 34, + MLX4_DEV_CAP_FLAG2_DIAG_PER_PORT = 1ULL << 35, + MLX4_DEV_CAP_FLAG2_SVLAN_BY_QP = 1ULL << 36, + MLX4_DEV_CAP_FLAG2_SL_TO_VL_CHANGE_EVENT = 1ULL << 37, }; -/* bit enums for an 8-bit flags field indicating special use - * QPs which require special handling in qp_reserve_range. - * Currently, this only includes QPs used by the ETH interface, - * where we expect to use blueflame. These QPs must not have - * bits 6 and 7 set in their qp number. - * - * This enum may use only bits 0..7. - */ enum { - MLX4_RESERVE_BF_QP = 1 << 7, + MLX4_QUERY_FUNC_FLAGS_BF_RES_QP = 1LL << 0, + MLX4_QUERY_FUNC_FLAGS_A0_RES_QP = 1LL << 1 }; enum { - MLX4_DEV_CAP_CQ_FLAG_IO = 1 << 0 + MLX4_VF_CAP_FLAG_RESET = 1 << 0 }; -enum { - MLX4_QUERY_FUNC_FLAGS_BF_RES_QP = 1LL << 0 -}; - /* bit enums for an 8-bit flags field indicating special use * QPs which require special handling in qp_reserve_range. * Currently, this only includes QPs used by the ETH interface, @@ -231,35 +248,47 @@ enum { * This enum may use only bits 0..7. */ enum { - MLX4_RESERVE_ETH_BF_QP = 1 << 7, + MLX4_RESERVE_A0_QP = 1 << 6, + MLX4_RESERVE_ETH_BF_QP = 1 << 7, }; - enum { MLX4_DEV_CAP_64B_EQE_ENABLED = 1LL << 0, - MLX4_DEV_CAP_64B_CQE_ENABLED = 1LL << 1 + MLX4_DEV_CAP_64B_CQE_ENABLED = 1LL << 1, + MLX4_DEV_CAP_CQE_STRIDE_ENABLED = 1LL << 2, + MLX4_DEV_CAP_EQE_STRIDE_ENABLED = 1LL << 3 }; enum { - MLX4_USER_DEV_CAP_64B_CQE = 1L << 0 + MLX4_USER_DEV_CAP_LARGE_CQE = 1L << 0 }; enum { - MLX4_FUNC_CAP_64B_EQE_CQE = 1L << 0 + MLX4_FUNC_CAP_64B_EQE_CQE = 1L << 0, + MLX4_FUNC_CAP_EQE_CQE_STRIDE = 1L << 1, + MLX4_FUNC_CAP_DMFS_A0_STATIC = 1L << 2 }; #define MLX4_ATTR_EXTENDED_PORT_INFO cpu_to_be16(0xff90) enum { - MLX4_BMME_FLAG_WIN_TYPE_2B = 1 << 1, + MLX4_BMME_FLAG_WIN_TYPE_2B = 1 << 1, MLX4_BMME_FLAG_LOCAL_INV = 1 << 6, MLX4_BMME_FLAG_REMOTE_INV = 1 << 7, MLX4_BMME_FLAG_TYPE_2_WIN = 1 << 9, MLX4_BMME_FLAG_RESERVED_LKEY = 1 << 10, MLX4_BMME_FLAG_FAST_REG_WR = 1 << 11, + MLX4_BMME_FLAG_ROCE_V1_V2 = 1 << 19, + MLX4_BMME_FLAG_PORT_REMAP = 1 << 24, + MLX4_BMME_FLAG_VSD_INIT2RTR = 1 << 28, }; +enum { + MLX4_FLAG_PORT_REMAP = MLX4_BMME_FLAG_PORT_REMAP, + MLX4_FLAG_ROCE_V1_V2 = MLX4_BMME_FLAG_ROCE_V1_V2 +}; + enum mlx4_event { MLX4_EVENT_TYPE_COMP = 0x00, MLX4_EVENT_TYPE_PATH_MIG = 0x01, @@ -329,6 +358,7 @@ enum { MLX4_PERM_REMOTE_WRITE = 1 << 13, MLX4_PERM_ATOMIC = 1 << 14, MLX4_PERM_BIND_MW = 1 << 15, + MLX4_PERM_MASK = 0xFC00 }; enum { @@ -373,12 +403,10 @@ enum { MLX4_MTT_FLAG_PRESENT = 1 }; -enum { - MLX4_MAX_MTT_SHIFT = 31 -}; - enum mlx4_qp_region { MLX4_QP_REGION_FW = 0, + MLX4_QP_REGION_RSS_RAW_ETH, + MLX4_QP_REGION_BOTTOM = MLX4_QP_REGION_RSS_RAW_ETH, MLX4_QP_REGION_ETH_ADDR, MLX4_QP_REGION_FC_ADDR, MLX4_QP_REGION_FC_EXCH, @@ -389,8 +417,7 @@ enum mlx4_port_type { MLX4_PORT_TYPE_NONE = 0, MLX4_PORT_TYPE_IB = 1, MLX4_PORT_TYPE_ETH = 2, - MLX4_PORT_TYPE_AUTO = 3, - MLX4_PORT_TYPE_NA = 4 + MLX4_PORT_TYPE_AUTO = 3 }; enum mlx4_special_vlan_idx { @@ -414,9 +441,21 @@ enum { }; enum { + /* + * Max wqe size for rdma read is 512 bytes, so this + * limits our max_sge_rd as the wqe needs to fit: + * - ctrl segment (16 bytes) + * - rdma segment (16 bytes) + * - scatter elements (16 bytes each) + */ + MLX4_MAX_SGE_RD = (512 - 16 - 16) / 16 +}; + +enum { MLX4_DEV_PMC_SUBTYPE_GUID_INFO = 0x14, MLX4_DEV_PMC_SUBTYPE_PORT_INFO = 0x15, MLX4_DEV_PMC_SUBTYPE_PKEY_TABLE = 0x16, + MLX4_DEV_PMC_SUBTYPE_SL_TO_VL_MAP = 0x17, }; /* Port mgmt change event handling */ @@ -428,16 +467,46 @@ enum { MLX4_EQ_PORT_INFO_MSTR_SM_SL_CHANGE_MASK = 1 << 4, }; +union sl2vl_tbl_to_u64 { + u8 sl8[8]; + u64 sl64; +}; + +enum { + MLX4_DEVICE_STATE_UP = 1 << 0, + MLX4_DEVICE_STATE_INTERNAL_ERROR = 1 << 1, +}; + +enum { + MLX4_INTERFACE_STATE_UP = 1 << 0, + MLX4_INTERFACE_STATE_DELETION = 1 << 1, +}; + #define MSTR_SM_CHANGE_MASK (MLX4_EQ_PORT_INFO_MSTR_SM_SL_CHANGE_MASK | \ MLX4_EQ_PORT_INFO_MSTR_SM_LID_CHANGE_MASK) enum mlx4_module_id { - MLX4_MODULE_ID_SFP = 0x3, - MLX4_MODULE_ID_QSFP = 0xC, - MLX4_MODULE_ID_QSFP_PLUS = 0xD, - MLX4_MODULE_ID_QSFP28 = 0x11, + MLX4_MODULE_ID_SFP = 0x3, + MLX4_MODULE_ID_QSFP = 0xC, + MLX4_MODULE_ID_QSFP_PLUS = 0xD, + MLX4_MODULE_ID_QSFP28 = 0x11, }; +enum { /* rl */ + MLX4_QP_RATE_LIMIT_NONE = 0, + MLX4_QP_RATE_LIMIT_KBS = 1, + MLX4_QP_RATE_LIMIT_MBS = 2, + MLX4_QP_RATE_LIMIT_GBS = 3 +}; + +struct mlx4_rate_limit_caps { + u16 num_rates; /* Number of different rates */ + u8 min_unit; + u16 min_val; + u8 max_unit; + u16 max_val; +}; + static inline u64 mlx4_fw_ver(u64 major, u64 minor, u64 subminor) { return (major << 32) | (minor << 16) | subminor; @@ -480,6 +549,8 @@ struct mlx4_caps { int max_rq_desc_sz; int max_qp_init_rdma; int max_qp_dest_rdma; + int max_tc_eth; + u32 *qp0_qkey; u32 *qp0_proxy; u32 *qp1_proxy; u32 *qp0_tunnel; @@ -495,10 +566,9 @@ struct mlx4_caps { int num_eqs; int reserved_eqs; int num_comp_vectors; - int comp_pool; int num_mpts; int max_fmr_maps; - u64 num_mtts; + int num_mtts; int fmr_reserved_mtts; int reserved_mtts; int reserved_mrws; @@ -508,6 +578,8 @@ struct mlx4_caps { int reserved_mcgs; int num_qp_per_mgm; int steering_mode; + int dmfs_high_steer_mode; + int fs_log_max_ucast_qp_range_size; int num_pds; int reserved_pds; int max_xrcds; @@ -520,7 +592,6 @@ struct mlx4_caps { u32 bmme_flags; u32 reserved_lkey; u16 stat_rate_support; - u8 cq_timestamp; u8 port_width_cap[MLX4_MAX_PORTS + 1]; int max_gso_sz; int max_rss_tbl_sz; @@ -538,19 +609,21 @@ struct mlx4_caps { u32 max_counters; u8 port_ib_mtu[MLX4_MAX_PORTS + 1]; u16 sqp_demux; - u32 sync_qp; - u32 cq_flags; u32 eqe_size; u32 cqe_size; u8 eqe_factor; - u32 userspace_caps; /* userspace must be aware to */ - u32 function_caps; /* functions must be aware to */ - u8 fast_drop; + u32 userspace_caps; /* userspace must be aware of these */ + u32 function_caps; /* VFs must be aware of these */ u16 hca_core_clock; - u32 max_basic_counters; - u32 max_extended_counters; - u8 def_counter_index[MLX4_MAX_PORTS + 1]; + u64 phys_port_id[MLX4_MAX_PORTS + 1]; + int tunnel_offload_mode; + u8 rx_checksum_flags_port[MLX4_MAX_PORTS + 1]; + u8 phv_bit[MLX4_MAX_PORTS + 1]; u8 alloc_res_qp_mask; + u32 dmfs_high_rate_qpn_base; + u32 dmfs_high_rate_qpn_range; + u32 vf_caps; + struct mlx4_rate_limit_caps rl_caps; }; struct mlx4_buf_list { @@ -647,7 +720,7 @@ struct mlx4_uar { }; struct mlx4_bf { - unsigned long offset; + unsigned int offset; int buf_size; struct mlx4_uar *uar; void __iomem *reg; @@ -661,6 +734,7 @@ struct mlx4_cq { u32 cons_index; + u16 irq; __be32 *set_ci_db; __be32 *arm_db; int arm_sn; @@ -670,8 +744,8 @@ struct mlx4_cq { atomic_t refcount; struct completion free; - int eqn; - u16 irq; + int reset_notify_added; + struct list_head reset_notify; }; struct mlx4_qp { @@ -720,9 +794,9 @@ struct mlx4_eth_av { __be32 sl_tclass_flowlabel; u8 dgid[16]; u8 s_mac[6]; - u8 reserved4[2]; + u8 reserved4[2]; __be16 vlan; - u8 mac[6]; + u8 mac[ETH_ALEN]; }; union mlx4_ext_av { @@ -730,66 +804,17 @@ union mlx4_ext_av { struct mlx4_eth_av eth; }; -struct mlx4_if_stat_control { - u8 reserved1[3]; - /* Extended counters enabled */ - u8 cnt_mode; - /* Number of interfaces */ - __be32 num_of_if; - __be32 reserved[2]; +struct mlx4_counter { + u8 reserved1[3]; + u8 counter_mode; + __be32 num_ifc; + u32 reserved2[2]; + __be64 rx_frames; + __be64 rx_bytes; + __be64 tx_frames; + __be64 tx_bytes; }; -struct mlx4_if_stat_basic { - struct mlx4_if_stat_control control; - struct { - __be64 IfRxFrames; - __be64 IfRxOctets; - __be64 IfTxFrames; - __be64 IfTxOctets; - } counters[]; -}; -#define MLX4_IF_STAT_BSC_SZ(ports)(sizeof(struct mlx4_if_stat_extended) +\ - sizeof(((struct mlx4_if_stat_extended *)0)->\ - counters[0]) * ports) - -struct mlx4_if_stat_extended { - struct mlx4_if_stat_control control; - struct { - __be64 IfRxUnicastFrames; - __be64 IfRxUnicastOctets; - __be64 IfRxMulticastFrames; - __be64 IfRxMulticastOctets; - __be64 IfRxBroadcastFrames; - __be64 IfRxBroadcastOctets; - __be64 IfRxNoBufferFrames; - __be64 IfRxNoBufferOctets; - __be64 IfRxErrorFrames; - __be64 IfRxErrorOctets; - __be32 reserved[39]; - __be64 IfTxUnicastFrames; - __be64 IfTxUnicastOctets; - __be64 IfTxMulticastFrames; - __be64 IfTxMulticastOctets; - __be64 IfTxBroadcastFrames; - __be64 IfTxBroadcastOctets; - __be64 IfTxDroppedFrames; - __be64 IfTxDroppedOctets; - __be64 IfTxRequestedFramesSent; - __be64 IfTxGeneratedFramesSent; - __be64 IfTxTsoOctets; - } __packed counters[]; -}; -#define MLX4_IF_STAT_EXT_SZ(ports) (sizeof(struct mlx4_if_stat_extended) +\ - sizeof(((struct mlx4_if_stat_extended *)\ - 0)->counters[0]) * ports) - -union mlx4_counter { - struct mlx4_if_stat_control control; - struct mlx4_if_stat_basic basic; - struct mlx4_if_stat_extended ext; -}; -#define MLX4_IF_STAT_SZ(ports) MLX4_IF_STAT_EXT_SZ(ports) - struct mlx4_quotas { int qp; int cq; @@ -800,8 +825,35 @@ struct mlx4_quotas { int xrcd; }; -struct mlx4_dev { +struct mlx4_vf_dev { + u8 min_port; + u8 n_ports; +}; + +enum mlx4_pci_status { + MLX4_PCI_STATUS_DISABLED, + MLX4_PCI_STATUS_ENABLED, +}; + +struct mlx4_dev_persistent { struct pci_dev *pdev; + struct mlx4_dev *dev; + int nvfs[MLX4_MAX_PORTS + 1]; + int num_vfs; + enum mlx4_port_type curr_port_type[MLX4_MAX_PORTS + 1]; + enum mlx4_port_type curr_port_poss_type[MLX4_MAX_PORTS + 1]; + struct work_struct catas_work; + struct workqueue_struct *catas_wq; + struct mutex device_state_mutex; /* protect HW state */ + u8 state; + struct mutex interface_state_mutex; /* protect SW state */ + u8 interface_state; + struct mutex pci_status_mutex; /* sync pci state */ + enum mlx4_pci_status pci_status; +}; + +struct mlx4_dev { + struct mlx4_dev_persistent *persist; unsigned long flags; unsigned long num_slaves; struct mlx4_caps caps; @@ -809,14 +861,14 @@ struct mlx4_dev { struct mlx4_quotas quotas; struct radix_tree_root qp_table_tree; u8 rev_id; + u8 port_random_macs; char board_id[MLX4_BOARD_ID_LEN]; - u16 vsd_vendor_id; - char vsd[MLX4_VSD_LEN]; - int num_vfs; int numa_node; int oper_log_mgm_entry_size; u64 regid_promisc_array[MLX4_MAX_PORTS + 1]; u64 regid_allmulti_array[MLX4_MAX_PORTS + 1]; + struct mlx4_vf_dev *dev_vfs; + u8 uar_page_shift; }; struct mlx4_clock_params { @@ -892,6 +944,9 @@ struct mlx4_eqe { __be32 block_ptr; __be32 tbl_entries_mask; } __packed tbl_change_info; + struct { + u8 sl2vl_table[8]; + } __packed sl2vl_tbl_change_info; } params; } __packed port_mgmt_change; struct { @@ -922,40 +977,36 @@ struct mlx4_init_port_param { #define MAD_IFC_DATA_SZ 192 /* MAD IFC Mailbox */ struct mlx4_mad_ifc { - u8 base_version; - u8 mgmt_class; - u8 class_version; - u8 method; - __be16 status; - __be16 class_specific; - __be64 tid; - __be16 attr_id; - __be16 resv; - __be32 attr_mod; - __be64 mkey; - __be16 dr_slid; - __be16 dr_dlid; - u8 reserved[28]; - u8 data[MAD_IFC_DATA_SZ]; + u8 base_version; + u8 mgmt_class; + u8 class_version; + u8 method; + __be16 status; + __be16 class_specific; + __be64 tid; + __be16 attr_id; + __be16 resv; + __be32 attr_mod; + __be64 mkey; + __be16 dr_slid; + __be16 dr_dlid; + u8 reserved[28]; + u8 data[MAD_IFC_DATA_SZ]; } __packed; #define mlx4_foreach_port(port, dev, type) \ for ((port) = 1; (port) <= (dev)->caps.num_ports; (port)++) \ if ((type) == (dev)->caps.port_mask[(port)]) -#define mlx4_foreach_non_ib_transport_port(port, dev) \ - for ((port) = 1; (port) <= (dev)->caps.num_ports; (port)++) \ - if (((dev)->caps.port_mask[port] != MLX4_PORT_TYPE_IB)) - #define mlx4_foreach_ib_transport_port(port, dev) \ - for ((port) = 1; (port) <= (dev)->caps.num_ports; (port)++) \ + for ((port) = 1; (port) <= (dev)->caps.num_ports; (port)++) \ if (((dev)->caps.port_mask[port] == MLX4_PORT_TYPE_IB) || \ - ((dev)->caps.flags & MLX4_DEV_CAP_FLAG_IBOE)) + ((dev)->caps.flags & MLX4_DEV_CAP_FLAG_IBOE) || \ + ((dev)->caps.flags2 & MLX4_DEV_CAP_FLAG2_ROCE_V1_V2)) #define MLX4_INVALID_SLAVE_ID 0xFF +#define MLX4_SINK_COUNTER_INDEX(dev) (dev->caps.max_counters - 1) -#define MLX4_SINK_COUNTER_INDEX 0xff - void handle_port_mgmt_change_event(struct work_struct *work); static inline int mlx4_master_func_num(struct mlx4_dev *dev) @@ -977,7 +1028,9 @@ static inline int mlx4_num_reserved_sqps(struct mlx4_d static inline int mlx4_is_qp_reserved(struct mlx4_dev *dev, u32 qpn) { return (qpn < dev->phys_caps.base_sqpn + 8 + - 16 * MLX4_MFUNC_MAX * !!mlx4_is_master(dev)); + 16 * MLX4_MFUNC_MAX * !!mlx4_is_master(dev) && + qpn >= dev->phys_caps.base_sqpn) || + (qpn < dev->caps.reserved_qps_cnt[MLX4_QP_REGION_FW]); } static inline int mlx4_is_guest_proxy(struct mlx4_dev *dev, int slave, u32 qpn) @@ -1000,8 +1053,13 @@ static inline int mlx4_is_slave(struct mlx4_dev *dev) return dev->flags & MLX4_FLAG_SLAVE; } +static inline int mlx4_is_eth(struct mlx4_dev *dev, int port) +{ + return dev->caps.port_type[port] == MLX4_PORT_TYPE_IB ? 0 : 1; +} + int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct, - struct mlx4_buf *buf); + struct mlx4_buf *buf, gfp_t gfp); void mlx4_buf_free(struct mlx4_dev *dev, int size, struct mlx4_buf *buf); static inline void *mlx4_buf_offset(struct mlx4_buf *buf, int offset) { @@ -1038,9 +1096,10 @@ int mlx4_mw_enable(struct mlx4_dev *dev, struct mlx4_m int mlx4_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt, int start_index, int npages, u64 *page_list); int mlx4_buf_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt, - struct mlx4_buf *buf); + struct mlx4_buf *buf, gfp_t gfp); -int mlx4_db_alloc(struct mlx4_dev *dev, struct mlx4_db *db, int order); +int mlx4_db_alloc(struct mlx4_dev *dev, struct mlx4_db *db, int order, + gfp_t gfp); void mlx4_db_free(struct mlx4_dev *dev, struct mlx4_db *db); int mlx4_alloc_hwq_res(struct mlx4_dev *dev, struct mlx4_hwq_resources *wqres, @@ -1052,12 +1111,12 @@ int mlx4_cq_alloc(struct mlx4_dev *dev, int nent, stru struct mlx4_uar *uar, u64 db_rec, struct mlx4_cq *cq, unsigned vector, int collapsed, int timestamp_en); void mlx4_cq_free(struct mlx4_dev *dev, struct mlx4_cq *cq); - int mlx4_qp_reserve_range(struct mlx4_dev *dev, int cnt, int align, int *base, u8 flags); void mlx4_qp_release_range(struct mlx4_dev *dev, int base_qpn, int cnt); -int mlx4_qp_alloc(struct mlx4_dev *dev, int qpn, struct mlx4_qp *qp); +int mlx4_qp_alloc(struct mlx4_dev *dev, int qpn, struct mlx4_qp *qp, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Wed Nov 15 12:27:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B23DADDBCF4; Wed, 15 Nov 2017 12:27:03 +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 7D10D692B7; Wed, 15 Nov 2017 12:27:03 +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 vAFCR243044534; Wed, 15 Nov 2017 12:27:02 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAFCR2im044533; Wed, 15 Nov 2017 12:27:02 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201711151227.vAFCR2im044533@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Wed, 15 Nov 2017 12:27:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325850 - head/sbin/pfctl X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/sbin/pfctl X-SVN-Commit-Revision: 325850 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 12:27:03 -0000 Author: kp Date: Wed Nov 15 12:27:02 2017 New Revision: 325850 URL: https://svnweb.freebsd.org/changeset/base/325850 Log: pfctl: teach route-to to deal with interfaces with multiple addresses The route_host parsing code set the interface name, but only for the first node_host in the list. If that one happened to be the inet6 address and the rule wanted an inet address it'd get removed by remove_invalid_hosts() later on, and we'd have no interface name. We must set the interface name for all node_host entries in the list, not just the first one. PR: 223208 MFC after: 2 weeks Modified: head/sbin/pfctl/parse.y Modified: head/sbin/pfctl/parse.y ============================================================================== --- head/sbin/pfctl/parse.y Wed Nov 15 12:23:01 2017 (r325849) +++ head/sbin/pfctl/parse.y Wed Nov 15 12:27:02 2017 (r325850) @@ -4390,8 +4390,11 @@ route_host : STRING { $$->tail = $$; } | '(' STRING host ')' { + struct node_host *n; + $$ = $3; - $$->ifname = $2; + for (n = $3; n != NULL; n = n->next) + n->ifname = $2; } ; From owner-svn-src-head@freebsd.org Wed Nov 15 12:48:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0EBE7DDC2F1; Wed, 15 Nov 2017 12:48:38 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C1CFE69D90; Wed, 15 Nov 2017 12:48:37 +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 vAFCmarn053115; Wed, 15 Nov 2017 12:48:36 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAFCmaRJ053114; Wed, 15 Nov 2017 12:48:36 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201711151248.vAFCmaRJ053114@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 15 Nov 2017 12:48:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325851 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 325851 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 12:48:38 -0000 Author: bapt Date: Wed Nov 15 12:48:36 2017 New Revision: 325851 URL: https://svnweb.freebsd.org/changeset/base/325851 Log: remove the poor emulation of the IllumOS needfree global variable to prevent the ARC reclaim thread running longer than needed. Update the arc::needfree dtrace probe triggered in arc_lowmem() to also report the value we may want to free. Submitted by: Nikita Kozlov Reviewed by: avg Approved by: avg MFC after: 3 weeks Sponsored by: blade Differential Revision: https://reviews.freebsd.org/D12163 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Nov 15 12:27:02 2017 (r325850) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Nov 15 12:48:36 2017 (r325851) @@ -4199,8 +4199,6 @@ arc_shrink(int64_t to_free) } } -static long needfree = 0; - typedef enum free_memory_reason_t { FMR_UNKNOWN, FMR_NEEDFREE, @@ -4238,14 +4236,6 @@ arc_available_memory(void) free_memory_reason_t r = FMR_UNKNOWN; #ifdef _KERNEL - if (needfree > 0) { - n = PAGESIZE * (-needfree); - if (n < lowest) { - lowest = n; - r = FMR_NEEDFREE; - } - } - /* * Cooperate with pagedaemon when it's time for it to scan * and reclaim some pages. @@ -4510,9 +4500,6 @@ arc_reclaim_thread(void *dummy __unused) int64_t to_free = (arc_c >> arc_shrink_shift) - free_memory; if (to_free > 0) { -#ifdef _KERNEL - to_free = MAX(to_free, ptob(needfree)); -#endif arc_shrink(to_free); } } else if (free_memory < arc_c >> arc_no_grow_shift) { @@ -4533,9 +4520,6 @@ arc_reclaim_thread(void *dummy __unused) * infinite loop. */ if (arc_size <= arc_c || evicted == 0) { -#ifdef _KERNEL - needfree = 0; -#endif /* * We're either no longer overflowing, or we * can't evict anything more, so we should wake @@ -6310,9 +6294,7 @@ arc_lowmem(void *arg __unused, int howto __unused) { mutex_enter(&arc_reclaim_lock); - /* XXX: Memory deficit should be passed as argument. */ - needfree = btoc(arc_c >> arc_shrink_shift); - DTRACE_PROBE(arc__needfree); + DTRACE_PROBE1(arc__needfree, int64_t, ((int64_t)freemem - zfs_arc_free_target) * PAGESIZE); cv_signal(&arc_reclaim_thread_cv); /* From owner-svn-src-head@freebsd.org Wed Nov 15 13:41:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E49D6DDD427; Wed, 15 Nov 2017 13:41: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 270296B95C; Wed, 15 Nov 2017 13:41: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 vAFDf4DN075039; Wed, 15 Nov 2017 13:41:04 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAFDf4tF075035; Wed, 15 Nov 2017 13:41:04 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201711151341.vAFDf4tF075035@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 15 Nov 2017 13:41:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325852 - in head/sys: sys vm X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: sys vm X-SVN-Commit-Revision: 325852 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 13:41:07 -0000 Author: kib Date: Wed Nov 15 13:41:03 2017 New Revision: 325852 URL: https://svnweb.freebsd.org/changeset/base/325852 Log: vmtotal: extend memory counters to accomodate for current and future hardware sizes. 32bit counters already overflow on approachable virtual memory page counts, and soon would overflow on the physical pages counts as well. Bump sizes to 64bit types. Bump __FreeBSD_version. It is impossible to provide perfect backward ABI compat for this change. If a program requests an old structure, it can be detected by size. But if it queries the size first by passing NULL old req pointer, there is almost nothing we can do to detect the desired ABI. As a partial solution, check p_osrel of the quering process when selecting the size to report. Submitted by: Pawel Biernacki Differential revision: https://reviews.freebsd.org/D13018 Modified: head/sys/sys/param.h head/sys/sys/vmmeter.h head/sys/vm/vm_meter.c Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Wed Nov 15 12:48:36 2017 (r325851) +++ head/sys/sys/param.h Wed Nov 15 13:41:03 2017 (r325852) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1200053 /* Master, propagated to newvers */ +#define __FreeBSD_version 1200054 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, @@ -84,6 +84,7 @@ #define P_OSREL_SHUTDOWN_ENOTCONN 1100077 #define P_OSREL_MAP_GUARD 1200035 #define P_OSREL_WRFSBASE 1200041 +#define P_OSREL_VMTOTAL64 1200054 #define P_OSREL_MAJOR(x) ((x) / 100000) #endif Modified: head/sys/sys/vmmeter.h ============================================================================== --- head/sys/sys/vmmeter.h Wed Nov 15 12:48:36 2017 (r325851) +++ head/sys/sys/vmmeter.h Wed Nov 15 13:41:03 2017 (r325852) @@ -41,20 +41,23 @@ /* Systemwide totals computed every five seconds. */ struct vmtotal { - int16_t t_rq; /* length of the run queue */ - int16_t t_dw; /* jobs in ``disk wait'' (neg priority) */ - int16_t t_pw; /* jobs in page wait */ - int16_t t_sl; /* jobs sleeping in core */ - int16_t t_sw; /* swapped out runnable/short block jobs */ - int32_t t_vm; /* total virtual memory */ - int32_t t_avm; /* active virtual memory */ - int32_t t_rm; /* total real memory in use */ - int32_t t_arm; /* active real memory */ - int32_t t_vmshr; /* shared virtual memory */ - int32_t t_avmshr; /* active shared virtual memory */ - int32_t t_rmshr; /* shared real memory */ - int32_t t_armshr; /* active shared real memory */ - int32_t t_free; /* free memory pages */ + uint64_t t_vm; /* total virtual memory */ + uint64_t t_avm; /* active virtual memory */ + uint64_t t_rm; /* total real memory in use */ + uint64_t t_arm; /* active real memory */ + uint64_t t_vmshr; /* shared virtual memory */ + uint64_t t_avmshr; /* active shared virtual memory */ + uint64_t t_rmshr; /* shared real memory */ + uint64_t t_armshr; /* active shared real memory */ + uint64_t t_free; /* free memory pages */ + int16_t t_rq; /* length of the run queue */ + int16_t t_dw; /* jobs in ``disk wait'' (neg + priority) */ + int16_t t_pw; /* jobs in page wait */ + int16_t t_sl; /* jobs sleeping in core */ + int16_t t_sw; /* swapped out runnable/short + block jobs */ + uint16_t t_pad[3]; }; #if defined(_KERNEL) || defined(_WANT_VMMETER) Modified: head/sys/vm/vm_meter.c ============================================================================== --- head/sys/vm/vm_meter.c Wed Nov 15 12:48:36 2017 (r325851) +++ head/sys/vm/vm_meter.c Wed Nov 15 13:41:03 2017 (r325852) @@ -152,14 +152,43 @@ is_object_active(vm_object_t obj) return (obj->ref_count > obj->shadow_count); } +#if defined(COMPAT_FREEBSD11) +struct vmtotal11 { + int16_t t_rq; + int16_t t_dw; + int16_t t_pw; + int16_t t_sl; + int16_t t_sw; + int32_t t_vm; + int32_t t_avm; + int32_t t_rm; + int32_t t_arm; + int32_t t_vmshr; + int32_t t_avmshr; + int32_t t_rmshr; + int32_t t_armshr; + int32_t t_free; +}; +#endif + static int vmtotal(SYSCTL_HANDLER_ARGS) { struct vmtotal total; +#if defined(COMPAT_FREEBSD11) + struct vmtotal11 total11; +#endif vm_object_t object; struct proc *p; struct thread *td; + if (req->oldptr == NULL) { +#if defined(COMPAT_FREEBSD11) + if (curproc->p_osrel < P_OSREL_VMTOTAL64) + return (SYSCTL_OUT(req, NULL, sizeof(total11))); +#endif + return (SYSCTL_OUT(req, NULL, sizeof(total))); + } bzero(&total, sizeof(total)); /* @@ -253,11 +282,33 @@ vmtotal(SYSCTL_HANDLER_ARGS) } mtx_unlock(&vm_object_list_mtx); total.t_free = vm_cnt.v_free_count; - return (sysctl_handle_opaque(oidp, &total, sizeof(total), req)); +#if defined(COMPAT_FREEBSD11) + /* sysctl(8) allocates twice as much memory as reported by sysctl(3) */ + if (curproc->p_osrel < P_OSREL_VMTOTAL64 && (req->oldlen == + sizeof(total11) || req->oldlen == 2 * sizeof(total11))) { + bzero(&total11, sizeof(total11)); + total11.t_rq = total.t_rq; + total11.t_dw = total.t_dw; + total11.t_pw = total.t_pw; + total11.t_sl = total.t_sl; + total11.t_sw = total.t_sw; + total11.t_vm = total.t_vm; /* truncate */ + total11.t_avm = total.t_avm; /* truncate */ + total11.t_rm = total.t_rm; /* truncate */ + total11.t_arm = total.t_arm; /* truncate */ + total11.t_vmshr = total.t_vmshr; /* truncate */ + total11.t_avmshr = total.t_avmshr; /* truncate */ + total11.t_rmshr = total.t_rmshr; /* truncate */ + total11.t_armshr = total.t_armshr; /* truncate */ + total11.t_free = total.t_free; /* truncate */ + return (SYSCTL_OUT(req, &total11, sizeof(total11))); + } +#endif + return (SYSCTL_OUT(req, &total, sizeof(total))); } -SYSCTL_PROC(_vm, VM_TOTAL, vmtotal, CTLTYPE_OPAQUE|CTLFLAG_RD|CTLFLAG_MPSAFE, - 0, sizeof(struct vmtotal), vmtotal, "S,vmtotal", +SYSCTL_PROC(_vm, VM_TOTAL, vmtotal, CTLTYPE_OPAQUE | CTLFLAG_RD | + CTLFLAG_MPSAFE, NULL, 0, vmtotal, "S,vmtotal", "System virtual memory statistics"); SYSCTL_NODE(_vm, OID_AUTO, stats, CTLFLAG_RW, 0, "VM meter stats"); static SYSCTL_NODE(_vm_stats, OID_AUTO, sys, CTLFLAG_RW, 0, From owner-svn-src-head@freebsd.org Wed Nov 15 14:54:17 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42EA7DDF054; Wed, 15 Nov 2017 14:54:17 +0000 (UTC) (envelope-from jlehen@gmail.com) Received: from mail-qt0-x244.google.com (mail-qt0-x244.google.com [IPv6:2607:f8b0:400d:c0d::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F08366DF29; Wed, 15 Nov 2017 14:54:16 +0000 (UTC) (envelope-from jlehen@gmail.com) Received: by mail-qt0-x244.google.com with SMTP id r58so10943332qtc.0; Wed, 15 Nov 2017 06:54:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=jNi5CZPfKDtQZAU1pVhLTjzBGvTgpEuc/eK+ilS6cik=; b=Z1pBqDzN0oav9SrlysHFQoofwbkbfqFxX3/KRWAOr+yYwXhiiOvt6ZM/WSkdfRr/2A 1o0iGU3MMfi9nkg9oPwQcGdhMA8JDuYTpIR5Fb9Y0NRg6Vlj0h2Dyqk+ebjb+hNpNPJa 3P2KnYgiivl0SfeRl6xUym9SXLmqxcdvcSlzTaRn92C54IDIsviXuRqu81fUonUs62Yo So8t5vuHKEfCoTvpI/cisoMtdggnue9WyMRofjnxdSJvMUAiE/FCuoz1bcKZBs6yfMrZ tpyIAI70Iu2nI68sBj6HvVFCxWclONevd64PJlyBOv69LLl4AqTPExfcbSt2ZmJqbBYy SNzQ== 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=jNi5CZPfKDtQZAU1pVhLTjzBGvTgpEuc/eK+ilS6cik=; b=WZQcXEDSSAt+I1hlhURw/Z0v3BzjHzdKDcrwwu7XgtIubpwkVEgykI4yiReVEa9+n1 hn1zHdyewUO2gL6F3CsccGZiaLs4h20d38z8Kj+A7YgFhN6M8HpPN/Exdfl0npuA/0jF U6rToiqJ1CRiGYttx33fbj8x6num5syRCCy+6bIqowp2d5dZV+r83Sna6dwr3WaW4YbS Vy4pX8fR2ZwNbXoFcMylZyvqK8VYWZ5wAC/qpNHY83oDw3aqtXB48Bvsjpx7gySihW4J mS+knZDoe5rQqgNRnCVKn1wvTjg2zSv57RwiPXQ5gF83hM/TGGf/jKS8QE4BW61IdxJ1 slCg== X-Gm-Message-State: AJaThX4PkT2R60PaNU6Qu0qV3AvWe1yhW6YpJi11jsKrC7lE/JYXEFLc TmY4YK+nb0/yS+j0vibnPIcwZRuXFmpA/VEDf+4ukQ== X-Google-Smtp-Source: AGs4zMajnyfs2EZnhZ6g7awsDEge28jvZ2Gok5J/XIUeTu1ebNqxY8PRZwC1IlEFiAzpuEvTUOP9NTd6f2mQq1SBUR4= X-Received: by 10.200.17.1 with SMTP id c1mr23863901qtj.252.1510757655890; Wed, 15 Nov 2017 06:54:15 -0800 (PST) MIME-Version: 1.0 Sender: jlehen@gmail.com Received: by 10.12.146.245 with HTTP; Wed, 15 Nov 2017 06:54:15 -0800 (PST) In-Reply-To: <201711142118.vAELIUoi057150@repo.freebsd.org> References: <201711142118.vAELIUoi057150@repo.freebsd.org> From: Jeremie Le Hen Date: Wed, 15 Nov 2017 15:54:15 +0100 X-Google-Sender-Auth: Ln2ovjWWbEdtVjnKxdWWcOYKXGM Message-ID: Subject: Re: svn commit: r325828 - head/usr.bin/fortune/datfiles To: Benno Rice Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 14:54:17 -0000 Hi Benno, On Tue, Nov 14, 2017 at 10:18 PM, Benno Rice wrote: > Author: benno > Date: Tue Nov 14 21:18:30 2017 > New Revision: 325828 > URL: https://svnweb.freebsd.org/changeset/base/325828 > > Log: > Remove all fortune datfiles except freebsd-tips. > > Humour is a funny thing. What is funny to one person is not funny to all > people. What is insightful to one person is similarly not universal. The > fortune datfiles have been around a long time and have undoubtedly amused > people but it's time to acknowledge their subjective, and in some cases > at least potentially offensive, nature and stop distributing them with the > imprimatur of the FreeBSD project. Sorry to ask, I'm only loosely following the project, but was this discussed somewhere? > If anyone wishes to distribute these via other mechanisms they are welcome to > check them out of history and do so. I don't think there's any rule saying that, but I know people are usually happy to have a replacing port. As you removed them, can I please ask you do this? Thanks. -- Jeremie > MFC after: 2 days > > Deleted: > head/usr.bin/fortune/datfiles/fortunes > head/usr.bin/fortune/datfiles/fortunes.sp.ok > head/usr.bin/fortune/datfiles/gerrold.limerick > head/usr.bin/fortune/datfiles/limerick > head/usr.bin/fortune/datfiles/limerick.sp.ok > head/usr.bin/fortune/datfiles/murphy > head/usr.bin/fortune/datfiles/murphy-o > head/usr.bin/fortune/datfiles/murphy.sp.ok > head/usr.bin/fortune/datfiles/startrek > head/usr.bin/fortune/datfiles/startrek.sp.ok > head/usr.bin/fortune/datfiles/zippy > head/usr.bin/fortune/datfiles/zippy.sp.ok > Modified: > head/usr.bin/fortune/datfiles/Makefile > > Modified: head/usr.bin/fortune/datfiles/Makefile > ============================================================================== > --- head/usr.bin/fortune/datfiles/Makefile Tue Nov 14 21:11:55 2017 (r325827) > +++ head/usr.bin/fortune/datfiles/Makefile Tue Nov 14 21:18:30 2017 (r325828) > @@ -1,11 +1,7 @@ > # @(#)Makefile 8.2 (Berkeley) 4/19/94 > # $FreeBSD$ > > -DB= fortunes freebsd-tips murphy startrek zippy > - > -# TO AVOID INSTALLING THE POTENTIALLY OFFENSIVE FORTUNES, COMMENT OUT THE > -# NEXT LINE. > -DB+= limerick murphy-o gerrold.limerick > +DB= freebsd-tips > > BLDS= ${DB:S/$/.dat/} > FILES= ${DB} ${BLDS} > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" -- Jeremie Le Hen jlh@FreeBSD.org From owner-svn-src-head@freebsd.org Wed Nov 15 15:00:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 521C9DDF322; Wed, 15 Nov 2017 15:00:04 +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 1F8A26E1E7; Wed, 15 Nov 2017 15:00:04 +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 vAFF03FX009528; Wed, 15 Nov 2017 15:00:03 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAFF038v009527; Wed, 15 Nov 2017 15:00:03 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201711151500.vAFF038v009527@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 15 Nov 2017 15:00:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325854 - head/share/man/man7 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/share/man/man7 X-SVN-Commit-Revision: 325854 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 15:00:04 -0000 Author: imp Date: Wed Nov 15 15:00:02 2017 New Revision: 325854 URL: https://svnweb.freebsd.org/changeset/base/325854 Log: Reword a bit for clarity. Sponsored by: Netflix Modified: head/share/man/man7/arch.7 Modified: head/share/man/man7/arch.7 ============================================================================== --- head/share/man/man7/arch.7 Wed Nov 15 14:35:42 2017 (r325853) +++ head/share/man/man7/arch.7 Wed Nov 15 15:00:02 2017 (r325854) @@ -418,9 +418,12 @@ For example, .Dv MACHINE_CPUARCH is defined to be mips for all the flavors of mips that we support since we support them all with a shared set of sources. -One might thing that it should be x86 for both amd64 and i386. -However, since we don't support these two architectures with the same -source base, that's not done despite it's logical appeal. +While amd64 and i386 are closely related, MACHINE_CPUARCH is not x86 +for them. +The FreeBSD source base supports amd64 and i386 with two +distinct source bases living in subdirectories named amd64 and i386 +(though behind the scenes there's some sharing that fits into this +framework). .It Dv CPUTYPE Sets the flavor of .Dv MACHINE_ARCH to build. @@ -433,7 +436,8 @@ Unused outside of that scope. It is not passed down to the rest of the build. Makefiles outside of the top level shouldn't use it at all (though some have their own private copy for hysterical raisons). -.It Dv TARGET_ARCH Used to set Dv MACHINE_ARCH by Fx's top level Makefile for cross building. +.It Dv TARGET_ARCH Used to set +.Dv MACHINE_ARCH by Fx's top level Makefile for cross building. Like .Dv TARGET , it is unused outside of that scope. .El From owner-svn-src-head@freebsd.org Wed Nov 15 15:02:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E6B0DDF519; Wed, 15 Nov 2017 15:02:46 +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 4BAD06E5C0; Wed, 15 Nov 2017 15:02:46 +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 vAFF2jW9013410; Wed, 15 Nov 2017 15:02:45 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAFF2jcn013409; Wed, 15 Nov 2017 15:02:45 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201711151502.vAFF2jcn013409@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 15 Nov 2017 15:02:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325855 - head/share/man/man7 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/share/man/man7 X-SVN-Commit-Revision: 325855 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 15:02:46 -0000 Author: imp Date: Wed Nov 15 15:02:45 2017 New Revision: 325855 URL: https://svnweb.freebsd.org/changeset/base/325855 Log: Replace Fx's with 'the' since expanding FreeBSD here didn't seem quite right. Sponsored by: Netflix Modified: head/share/man/man7/arch.7 Modified: head/share/man/man7/arch.7 ============================================================================== --- head/share/man/man7/arch.7 Wed Nov 15 15:00:02 2017 (r325854) +++ head/share/man/man7/arch.7 Wed Nov 15 15:02:45 2017 (r325855) @@ -437,7 +437,7 @@ It is not passed down to the rest of the build. Makefiles outside of the top level shouldn't use it at all (though some have their own private copy for hysterical raisons). .It Dv TARGET_ARCH Used to set -.Dv MACHINE_ARCH by Fx's top level Makefile for cross building. +.Dv MACHINE_ARCH by the top level Makefile for cross building. Like .Dv TARGET , it is unused outside of that scope. .El From owner-svn-src-head@freebsd.org Wed Nov 15 15:52:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04B16DE0B61; Wed, 15 Nov 2017 15:52:08 +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 C33F97008A; Wed, 15 Nov 2017 15:52:07 +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 vAFFq6d8033719; Wed, 15 Nov 2017 15:52:06 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAFFq6vW033718; Wed, 15 Nov 2017 15:52:06 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201711151552.vAFFq6vW033718@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 15 Nov 2017 15:52:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325857 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 325857 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 15:52:08 -0000 Author: asomers Date: Wed Nov 15 15:52:06 2017 New Revision: 325857 URL: https://svnweb.freebsd.org/changeset/base/325857 Log: Remove a double free(9) in xpt_bus_register In xpt_bus_register(), remove superfluous call to free(). This was mostly benign since free(9) checks for NULL before doing anything, and xpt_create_path() is nice enough to NULL out the pointer on failure. However, it could've segfaulted if malloc(9) failed during xpt_create_path(). Submitted by: gibbs MFC after: 3 weeks Sponsored by: Spectra Logic Corp Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Wed Nov 15 15:24:28 2017 (r325856) +++ head/sys/cam/cam_xpt.c Wed Nov 15 15:52:06 2017 (r325857) @@ -4049,7 +4049,6 @@ xpt_bus_register(struct cam_sim *sim, device_t parent, CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD); if (status != CAM_REQ_CMP) { xpt_release_bus(new_bus); - free(path, M_CAMXPT); return (CAM_RESRC_UNAVAIL); } From owner-svn-src-head@freebsd.org Wed Nov 15 16:58:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D0143DE1E24; Wed, 15 Nov 2017 16:58:10 +0000 (UTC) (envelope-from benno@FreeBSD.org) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A364671DE1; Wed, 15 Nov 2017 16:58:10 +0000 (UTC) (envelope-from benno@FreeBSD.org) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 5208220C69; Wed, 15 Nov 2017 11:58:09 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Wed, 15 Nov 2017 11:58:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=nxEBpIv5Fn0PXh2edeZlYvcO9d6dn w68X9Uue+KYOKI=; b=Xt34XAwrcaiCm9GwdDXIMBb08NYq4hxCK3TvLx0jJiBSy l/1t5pY986gOXeHj6oMMVF1posRzrv5wlH2BfSPYrqUhiUcNSFGfyXWgJzcku6fV WNjpBvmZdc3IQpfkZCRFZFqHMGJfjPajlCTWNBK/7oITYu10d1AxOwFPPKhDQVe1 XJC8HB0sSheS8r1sJHHCzRKIY/irOYkvoaQ1HLEuFDoh6HtGxW+RE6xPNvVSMqEd 3K7EbSOvwb1ifogPnhbAAihvndp/t0AeeNsCqf8ZJr/sAtnbZDmP+GR3cSiUo04d dqgmjjsqjqsTzA7fQpTlDp/yAvkKapWghv5HCDaXg== X-ME-Sender: Received: from mittlerweile.west.isilon.com (c-76-104-203-143.hsd1.wa.comcast.net [76.104.203.143]) by mail.messagingengine.com (Postfix) with ESMTPA id 92A16246D5; Wed, 15 Nov 2017 11:58:08 -0500 (EST) From: Benno Rice Message-Id: Mime-Version: 1.0 (Mac OS X Mail 11.1 \(3445.4.7\)) Subject: Re: svn commit: r325828 - head/usr.bin/fortune/datfiles Date: Wed, 15 Nov 2017 08:57:53 -0800 In-Reply-To: Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Jeremie Le Hen References: <201711142118.vAELIUoi057150@repo.freebsd.org> X-Mailer: Apple Mail (2.3445.4.7) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 16:58:10 -0000 > On Nov 15, 2017, at 06:54, Jeremie Le Hen wrote: >=20 > Hi Benno, >=20 > On Tue, Nov 14, 2017 at 10:18 PM, Benno Rice > wrote: >> Author: benno >> Date: Tue Nov 14 21:18:30 2017 >> New Revision: 325828 >> URL: https://svnweb.freebsd.org/changeset/base/325828 >>=20 >> Log: >> Remove all fortune datfiles except freebsd-tips. >>=20 >> Humour is a funny thing. What is funny to one person is not funny to = all >> people. What is insightful to one person is similarly not universal. = The >> fortune datfiles have been around a long time and have undoubtedly = amused >> people but it's time to acknowledge their subjective, and in some = cases >> at least potentially offensive, nature and stop distributing them = with the >> imprimatur of the FreeBSD project. >=20 > Sorry to ask, I'm only loosely following the project, but was this > discussed somewhere? It was raised to core but I decided to take unilateral action. That=E2=80=99= s not an indication of any disagreement in core per se, I just made the = call that in the light of finding Hitler quotes in the file, and the = fact that there were still files clearly marked as offensive in the = Makefile, that trying to be the editors of humour is not something = we=E2=80=99re really cut out for and that we should get out of the game. = I put the MFC timer on it so that if anyone wants to mount an argument = as to why they should stay they can. >> If anyone wishes to distribute these via other mechanisms they are = welcome to >> check them out of history and do so. >=20 > I don't think there's any rule saying that, but I know people are > usually happy to have a replacing port. As you removed them, can I > please ask you do this? Personally I feel that this is the kind of thing that doesn=E2=80=99t = need to live on. I won=E2=80=99t be making a port of it. If someone else = wants to distribute these then they can. Thanks, Benno. From owner-svn-src-head@freebsd.org Wed Nov 15 18:03:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F22DDE31A5; Wed, 15 Nov 2017 18:03:32 +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 7522773F7F; Wed, 15 Nov 2017 18:03:32 +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 vAFI3VwK089074; Wed, 15 Nov 2017 18:03:31 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAFI3VTo089073; Wed, 15 Nov 2017 18:03:31 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201711151803.vAFI3VTo089073@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 15 Nov 2017 18:03:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325859 - head X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 325859 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 18:03:32 -0000 Author: emaste Date: Wed Nov 15 18:03:31 2017 New Revision: 325859 URL: https://svnweb.freebsd.org/changeset/base/325859 Log: Sort pkgbase mtree metadata, for reproducible builds Packaged base packages are created by running the stageworld and stagekernel targets with -DNO_ROOT, and converting the resulting mtree file into a set of pkg plists. If stage* is run with multiple processes the order of entries in the mtree file may be nondeterministic, and the resulting package tbz also had nondeterministic file ordering. The mtree file generated by -DNO_ROOT builds consists of one line per file, with the filename starting in the first column, so is easily sorted. There's one exception: the first line of the mtree file is a comment, but the # character sorts before the filenames anyhow and needs no special treatment. PR: 223673 Reviewed by: bapt, gjb Sponsored by: The Linux Foundation, Core Infrastructure Initiative Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D13103 Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Nov 15 15:56:08 2017 (r325858) +++ head/Makefile.inc1 Wed Nov 15 18:03:31 2017 (r325859) @@ -1613,8 +1613,8 @@ create-packages: .PHONY create-packages-world create-p create-world-packages: _pkgbootstrap .PHONY @rm -f ${WSTAGEDIR}/*.plist 2>/dev/null || : @cd ${WSTAGEDIR} ; \ - awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \ - ${WSTAGEDIR}/METALOG + env -i LC_COLLATE=C sort ${WSTAGEDIR}/METALOG | \ + awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk @for plist in ${WSTAGEDIR}/*.plist; do \ plist=$${plist##*/} ; \ pkgname=$${plist%.plist} ; \ @@ -1658,9 +1658,9 @@ _debug=-debug create-kernel-packages: create-kernel-packages-flavor${flavor:C,^""$,${_default_flavor},} create-kernel-packages-flavor${flavor:C,^""$,${_default_flavor},}: _pkgbootstrap .PHONY @cd ${KSTAGEDIR}/${DISTDIR} ; \ + env -i LC_COLLATE=C sort ${KSTAGEDIR}/kernel.meta | \ awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \ - -v kernel=yes -v _kernconf=${INSTALLKERNEL} \ - ${KSTAGEDIR}/kernel.meta ; \ + -v kernel=yes -v _kernconf=${INSTALLKERNEL} ; \ cap_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VCAP_MKDB_ENDIAN` ; \ pwd_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VPWD_MKDB_ENDIAN` ; \ sed -e "s/%VERSION%/${PKG_VERSION}/" \ @@ -1693,9 +1693,9 @@ _debug=-debug create-kernel-packages: create-kernel-packages-extra-flavor${flavor:C,^""$,${_default_flavor},}-${_kernel} create-kernel-packages-extra-flavor${flavor:C,^""$,${_default_flavor},}-${_kernel}: _pkgbootstrap .PHONY @cd ${KSTAGEDIR}/kernel.${_kernel} ; \ + env -i LC_COLLATE=C sort ${KSTAGEDIR}/kernel.${_kernel}.meta | \ awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \ - -v kernel=yes -v _kernconf=${_kernel} \ - ${KSTAGEDIR}/kernel.${_kernel}.meta ; \ + -v kernel=yes -v _kernconf=${_kernel} ; \ cap_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VCAP_MKDB_ENDIAN` ; \ pwd_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VPWD_MKDB_ENDIAN` ; \ sed -e "s/%VERSION%/${PKG_VERSION}/" \ From owner-svn-src-head@freebsd.org Wed Nov 15 18:40:42 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2CD2EDE3E2F; Wed, 15 Nov 2017 18:40:42 +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 EE04475280; Wed, 15 Nov 2017 18:40:41 +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 vAFIef3g002186; Wed, 15 Nov 2017 18:40:41 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAFIefKV002185; Wed, 15 Nov 2017 18:40:41 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201711151840.vAFIefKV002185@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 15 Nov 2017 18:40:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325860 - head/sbin/newfs X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sbin/newfs X-SVN-Commit-Revision: 325860 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 18:40:42 -0000 Author: emaste Date: Wed Nov 15 18:40:40 2017 New Revision: 325860 URL: https://svnweb.freebsd.org/changeset/base/325860 Log: newfs: warn if newer than kernel Creating a UFS filesystem with a newfs newer than the running kernel, and then mounting that filesystem, can lead to interesting failures. Add a safety belt to explicitly warn when newfs is newer than the running kernel. Reviewed by: gjb, jhb, mckusick Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D12765 Modified: head/sbin/newfs/newfs.c Modified: head/sbin/newfs/newfs.c ============================================================================== --- head/sbin/newfs/newfs.c Wed Nov 15 18:03:31 2017 (r325859) +++ head/sbin/newfs/newfs.c Wed Nov 15 18:40:40 2017 (r325860) @@ -398,6 +398,10 @@ main(int argc, char *argv[]) if (pp != NULL) pp->p_size *= secperblk; } + if (getosreldate() < __FreeBSD_version) { + warnx("%s is newer than the running kernel and may not be compatible", + getprogname()); + } mkfs(pp, special); ufs_disk_close(&disk); if (!jflag) From owner-svn-src-head@freebsd.org Wed Nov 15 18:47:17 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF74DDE404C; Wed, 15 Nov 2017 18:47:17 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A68D57567A; Wed, 15 Nov 2017 18:47:17 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vAFIlGJ2052510; Wed, 15 Nov 2017 10:47:16 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vAFIlGD9052509; Wed, 15 Nov 2017 10:47:16 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201711151847.vAFIlGD9052509@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r325860 - head/sbin/newfs In-Reply-To: <201711151840.vAFIefKV002185@repo.freebsd.org> To: Ed Maste Date: Wed, 15 Nov 2017 10:47:16 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 18:47:17 -0000 > Author: emaste > Date: Wed Nov 15 18:40:40 2017 > New Revision: 325860 > URL: https://svnweb.freebsd.org/changeset/base/325860 > > Log: > newfs: warn if newer than kernel > > Creating a UFS filesystem with a newfs newer than the running kernel, > and then mounting that filesystem, can lead to interesting failures. > > Add a safety belt to explicitly warn when newfs is newer than the > running kernel. You should probably make the warning if (newer || older) as either is likely to have interesting side effects, as are mounting ufs file systems on different versions. *Sigh* why did not UFS grow a version number of its own when things started to change other than UFS1 vs UFS2. > Reviewed by: gjb, jhb, mckusick > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D12765 > > Modified: > head/sbin/newfs/newfs.c > > Modified: head/sbin/newfs/newfs.c > ============================================================================== > --- head/sbin/newfs/newfs.c Wed Nov 15 18:03:31 2017 (r325859) > +++ head/sbin/newfs/newfs.c Wed Nov 15 18:40:40 2017 (r325860) > @@ -398,6 +398,10 @@ main(int argc, char *argv[]) > if (pp != NULL) > pp->p_size *= secperblk; > } > + if (getosreldate() < __FreeBSD_version) { > + warnx("%s is newer than the running kernel and may not be compatible", > + getprogname()); > + } > mkfs(pp, special); > ufs_disk_close(&disk); > if (!jflag) > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Wed Nov 15 19:03:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40988DE463A; Wed, 15 Nov 2017 19:03:07 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D42F76466; Wed, 15 Nov 2017 19:03:06 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAFJ36AB015424; Wed, 15 Nov 2017 19:03:06 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAFJ36vx015423; Wed, 15 Nov 2017 19:03:06 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201711151903.vAFJ36vx015423@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 15 Nov 2017 19:03:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325861 - head/release/arm X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/release/arm X-SVN-Commit-Revision: 325861 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 19:03:07 -0000 Author: manu Date: Wed Nov 15 19:03:06 2017 New Revision: 325861 URL: https://svnweb.freebsd.org/changeset/base/325861 Log: release: Update u-boot and firmware file for RPI-B target THe u-boot port for RPI-B was updated to use u-boot-master, this cause an update in u-boot version to v2017.09 and changing the filename. The various firmware files for the RPI* are now in a common ports sysutils/rpi-firmware as they are shared on all the RPI version. Update the release files to copy the right files from the right location. Reviewed by: gjb MFC after: 3 days Modified: head/release/arm/RPI-B.conf Modified: head/release/arm/RPI-B.conf ============================================================================== --- head/release/arm/RPI-B.conf Wed Nov 15 18:40:40 2017 (r325860) +++ head/release/arm/RPI-B.conf Wed Nov 15 19:03:06 2017 (r325861) @@ -6,7 +6,7 @@ EMBEDDEDBUILD=1 EMBEDDED_TARGET="arm" EMBEDDED_TARGET_ARCH="armv6" -EMBEDDEDPORTS="sysutils/u-boot-rpi" +EMBEDDEDPORTS="sysutils/u-boot-rpi sysutils/rpi-firmware" KERNEL="RPI-B" IMAGE_SIZE="3072M" PART_SCHEME="MBR" @@ -17,8 +17,11 @@ NODOC=1 arm_install_uboot() { UBOOT_DIR="/usr/local/share/u-boot/u-boot-rpi" - UBOOT_FILES="bootcode.bin config.txt fixup.dat fixup_cd.dat \ - start.elf start_cd.elf u-boot.img" + RPI_FIRMWARE_DIR="/usr/local/share/rpi-firmware" + UBOOT_FILES="u-boot.bin" + RPI_FIRMWARE_FILES="bootcode.bin config.txt \ + fixup.dat fixup_cd.dat fixup_db.dat fixup_x.dat \ + start.elf start_cd.elf start_db.elf start_x.elf" FATMOUNT="${DESTDIR%${KERNEL}}/fat" UFSMOUNT="${DESTDIR%${KERNEL}}/ufs" chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}" @@ -26,6 +29,10 @@ arm_install_uboot() { chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${UFSMOUNT} for _UF in ${UBOOT_FILES}; do chroot ${CHROOTDIR} cp -p ${UBOOT_DIR}/${_UF} \ + ${FATMOUNT}/${_UF} + done + for _UF in ${RPI_FIRMWARE_FILES}; do + chroot ${CHROOTDIR} cp -p ${RPI_FIRMWARE_DIR}/${_UF} \ ${FATMOUNT}/${_UF} done chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr.bin \ From owner-svn-src-head@freebsd.org Wed Nov 15 19:04:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C6A3DE46EF; Wed, 15 Nov 2017 19:04:25 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE084765CF; Wed, 15 Nov 2017 19:04:24 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAFJ4NGX015505; Wed, 15 Nov 2017 19:04:23 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAFJ4N1b015504; Wed, 15 Nov 2017 19:04:23 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201711151904.vAFJ4N1b015504@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 15 Nov 2017 19:04:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325862 - head/release/arm X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/release/arm X-SVN-Commit-Revision: 325862 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 19:04:25 -0000 Author: manu Date: Wed Nov 15 19:04:23 2017 New Revision: 325862 URL: https://svnweb.freebsd.org/changeset/base/325862 Log: release: Update u-boot and firmware file for RPI2 target The u-boot port for RPI-2 was updated to use u-boot-master, this cause an update in u-boot version to v2017.09 and changing the filename. The various firmware files for the RPI* are now in a common ports sysutils/rpi-firmware as they are shared on all the RPI version. Update the release files to copy the right files from the right location. Reviewed by: gjb MFC after: 3 days Modified: head/release/arm/RPI2.conf Modified: head/release/arm/RPI2.conf ============================================================================== --- head/release/arm/RPI2.conf Wed Nov 15 19:03:06 2017 (r325861) +++ head/release/arm/RPI2.conf Wed Nov 15 19:04:23 2017 (r325862) @@ -6,7 +6,7 @@ EMBEDDEDBUILD=1 EMBEDDED_TARGET="arm" EMBEDDED_TARGET_ARCH="armv7" -EMBEDDEDPORTS="sysutils/u-boot-rpi2" +EMBEDDEDPORTS="sysutils/u-boot-rpi2 sysutils/rpi-firmware" KERNEL="GENERIC" IMAGE_SIZE="3072M" PART_SCHEME="MBR" @@ -18,8 +18,11 @@ export BOARDNAME="RPI2" arm_install_uboot() { UBOOT_DIR="/usr/local/share/u-boot/u-boot-rpi2" - UBOOT_FILES="bootcode.bin config.txt fixup.dat fixup_cd.dat \ - fixup_x.dat start.elf start_cd.elf start_x.elf u-boot.bin" + RPI_FIRMWARE_DIR="/usr/local/share/rpi-firmware" + UBOOT_FILES="u-boot.bin" + RPI_FIRMWARE_FILES="bootcode.bin config.txt \ + fixup.dat fixup_cd.dat fixup_db.dat fixup_x.dat \ + start.elf start_cd.elf start_db.elf start_x.elf" FATMOUNT="${DESTDIR%${KERNEL}}/fat" UFSMOUNT="${DESTDIR%${KERNEL}}/ufs" chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}" @@ -27,6 +30,10 @@ arm_install_uboot() { chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${UFSMOUNT} for _UF in ${UBOOT_FILES}; do chroot ${CHROOTDIR} cp -p ${UBOOT_DIR}/${_UF} \ + ${FATMOUNT}/${_UF} + done + for _UF in ${RPI_FIRMWARE_FILES}; do + chroot ${CHROOTDIR} cp -p ${RPI_FIRMWARE_DIR}/${_UF} \ ${FATMOUNT}/${_UF} done chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr.bin \ From owner-svn-src-head@freebsd.org Wed Nov 15 19:14:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D27EDE49BA; Wed, 15 Nov 2017 19:14: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 DE98D76C51; Wed, 15 Nov 2017 19:14:45 +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 vAFJEjNX019742; Wed, 15 Nov 2017 19:14:45 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAFJEjZx019741; Wed, 15 Nov 2017 19:14:45 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201711151914.vAFJEjZx019741@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 15 Nov 2017 19:14:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325863 - head/release X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/release X-SVN-Commit-Revision: 325863 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 19:14:46 -0000 Author: gjb Date: Wed Nov 15 19:14:44 2017 New Revision: 325863 URL: https://svnweb.freebsd.org/changeset/base/325863 Log: Only copy /etc/resolv.conf to ${CHROOTDIR} if /etc/resolv.conf does not already exist within ${CHROOTDIR}. This allows re-using a build chroot with CHROOTBUILD_SKIP set to a non-empty value and CHROOTDIR set to '/' in release.conf. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/release.sh Modified: head/release/release.sh ============================================================================== --- head/release/release.sh Wed Nov 15 19:04:23 2017 (r325862) +++ head/release/release.sh Wed Nov 15 19:14:44 2017 (r325863) @@ -252,8 +252,8 @@ chroot_setup() { extra_chroot_setup() { mkdir -p ${CHROOTDIR}/dev mount -t devfs devfs ${CHROOTDIR}/dev - [ -e /etc/resolv.conf ] && cp /etc/resolv.conf \ - ${CHROOTDIR}/etc/resolv.conf + [ -e /etc/resolv.conf -a ! -e ${CHROOTDIR}/etc/resolv.conf ] && \ + cp /etc/resolv.conf ${CHROOTDIR}/etc/resolv.conf # Run ldconfig(8) in the chroot directory so /var/run/ld-elf*.so.hints # is created. This is needed by ports-mgmt/pkg. eval chroot ${CHROOTDIR} /etc/rc.d/ldconfig forcerestart From owner-svn-src-head@freebsd.org Wed Nov 15 19:39:17 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 058F0DE5144; Wed, 15 Nov 2017 19:39:17 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (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 90DC8776C8; Wed, 15 Nov 2017 19:39:16 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id F3WheBDIpss4TF3WieiGR9; Wed, 15 Nov 2017 12:39:14 -0700 X-Authority-Analysis: v=2.2 cv=JuuBlIwC c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=sC3jslCIGhcA:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=ghCMsGqu1Re7tgU2mp4A:9 a=QEXdDO2ut3YA:10 a=eTeS-WSJqRoRYljW_LMA:9 a=ld09iq1loR9lGL95:21 a=_W_S_7VecoQA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 Received: from [25.172.23.131] (unknown [24.114.41.222]) by spqr.komquats.com (Postfix) with ESMTPSA id 657C829A; Wed, 15 Nov 2017 11:39:10 -0800 (PST) MIME-Version: 1.0 From: Cy Schubert Subject: RE: svn commit: r325828 - head/usr.bin/fortune/datfiles Date: Wed, 15 Nov 2017 11:39:10 -0800 To: Benno Rice , Jeremie Le Hen CC: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <20171115193910.657C829A@spqr.komquats.com> X-CMAE-Envelope: MS4wfHkfEPz2wvSUk/8L/BhlMTxf5zG9XtbYesigTbMIq1jiEYtAxvWOuTS9Ctidrg5zApx0oUHSV5DGbX6/bRsofSrar+TwKVMbmq7XgHaFGOp6VD+w2r4S AlOmsCxYL1fTqOCU+UH6t5rcjbI885rc3PDil03lLaGpZi3ajvk8RFHGgIOkdTFR5jr/gnb2A5w26xokn8WeY7GcyQ572S0pykyPoJxGII8UzeJv8FiD8tz3 +09KDzwSDRd9oMN6G/y8M1aO3uU0LTVlNMFfrwrE0YMJuaRb9v6UEPOmuwr/wt2lCcBtKZTSjuI6ikga6R7MYw== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 19:39:17 -0000 Tips become stale and can be themselves contentious. Just consider our bike= sheds. Besides, people should read the handbook anyway. Let's simply remov= e fortune altogether. --- Sent using a tiny phone keyboard. Apologies for any typos and autocorrect. Cy Schubert or --- -----Original Message----- From: Benno Rice Sent: 15/11/2017 08:58 To: Jeremie Le Hen Cc: src-committers; svn-src-all@freebsd.org; svn-src-head@freebsd.org Subject: Re: svn commit: r325828 - head/usr.bin/fortune/datfiles On Nov 15, 2017, at 06:54, Jeremie Le Hen wrote: Hi Benno, On Tue, Nov 14, 2017 at 10:18 PM, Benno Rice wrote: Author: benno Date: Tue Nov 14 21:18:30 2017 New Revision: 325828 URL: https://svnweb.freebsd.org/changeset/base/325828 Log: Remove all fortune datfiles except freebsd-tips. Humour is a funny thing. What is funny to one person is not funny to all people. What is insightful to one person is similarly not universal. The fortune datfiles have been around a long time and have undoubtedly amused people but it's time to acknowledge their subjective, and in some cases at least potentially offensive, nature and stop distributing them with the imprimatur of the FreeBSD project. Sorry to ask, I'm only loosely following the project, but was this discussed somewhere? It was raised to core but I decided to take unilateral action. That=E2=80= =99s not an indication of any disagreement in core per se, I just made the = call that in the light of finding Hitler quotes in the file, and the fact t= hat there were still files clearly marked as offensive in the Makefile, tha= t trying to be the editors of humour is not something we=E2=80=99re really = cut out for and that we should get out of the game. I put the MFC timer on = it so that if anyone wants to mount an argument as to why they should stay = they can. If anyone wishes to distribute these via other mechanisms they are welcome= to check them out of history and do so. I don't think there's any rule saying that, but I know people are usually happy to have a replacing port. As you removed them, can I please ask you do this? Personally I feel that this is the kind of thing that doesn=E2=80=99t need = to live on. I won=E2=80=99t be making a port of it. If someone else wants t= o distribute these then they can. Thanks, Benno.= From owner-svn-src-head@freebsd.org Wed Nov 15 20:27:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 508B5DE67A7 for ; Wed, 15 Nov 2017 20:27:20 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22f.google.com (mail-it0-x22f.google.com [IPv6:2607:f8b0:4001:c0b::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 165A57A5D9 for ; Wed, 15 Nov 2017 20:27:20 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22f.google.com with SMTP id m191so3277419itg.2 for ; Wed, 15 Nov 2017 12:27:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=eiqGsDTWTxDb8FaW8tXDObvaBmm1efukq8Pkme4qf1I=; b=wPU2s3rlKkPG4sRsBzqsvMwWIfxdm0l5ZzvgnQGJcm8+FM3xwhjNl6DeoogB9lH4it N4Vo9Suy7nUau/kUhfDMhDf0iw7qbdAlvZZgN220dICIG+z6QoPOFm6va35k9wAI2oRC m19z74MWAXjD6pm4MV/wHR9IclQnxRqzh5U+oUaeW0gnBjgpYgLbhor6DGQMoKks+kGD uafhHAuaZXtin2Fdlu0OUpGMJkvvrC5Y+F2mn2R+/6isvlHDNYxxYBWProN6JU2uAJay v2sS8pl0dmqgo7bQ0TyYZ7664I1sfWscQ9qglt34V2g1+O9HLW9NHKzUE4Zyvj8HKTM8 4D6A== 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=eiqGsDTWTxDb8FaW8tXDObvaBmm1efukq8Pkme4qf1I=; b=pTGuls7lpFpJ+Erv5CNdDI8usb5cJuciJcbFoSpGUoYE9TZe9Ttch1vk58eGYRC+pm 2ldW42oi41zCmYOCoMZDhU5uB30TQbi3qhofLuFD9yBEoqH+I+KQO20x1pPBkq3V3lBb 2BbW9lc4p9hducAELF3cHduJ6JDN/+7/sxe6J3zuVfqI9go/GwsTdoBV4SX+LineMSbr TUrSjYpJCu+xxzgvnAyaAqnwlTVnQ2M1vUQeDxLiR0cfIOnUAyO9c400ZocuaxW9w7nH Qprd2S3QzYynCWXs8N3U8DJR9RsBbuoY6IzRllCzK8nKLXhIQ2OAEiCwXFQDJVCwkIRP 4kCQ== X-Gm-Message-State: AJaThX5iikTG8H5znzcwTdrcuUvlnrGxMZajUzsdyRijV/J7les0clC9 mHlts4Flj8q/QVyMuQ41eW/L8N6SWZ+GbXSf91M+hQ== X-Google-Smtp-Source: AGs4zMYBl8l1zHb5uDne33YR8eUXKVrgGuI6GvN2m8EIbzSLOVfZ6fEtFPPa7/PjRGb7sxSR0H81+/ubPnNtnd1M3uw= X-Received: by 10.36.184.5 with SMTP id m5mr22757581ite.69.1510777639395; Wed, 15 Nov 2017 12:27:19 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Wed, 15 Nov 2017 12:27:18 -0800 (PST) X-Originating-IP: [2607:fb90:6cbb:3482:ed95:2e8b:8936:7768] Received: by 10.79.108.204 with HTTP; Wed, 15 Nov 2017 12:27:18 -0800 (PST) In-Reply-To: <201711151847.vAFIlGD9052509@pdx.rh.CN85.dnsmgr.net> References: <201711151840.vAFIefKV002185@repo.freebsd.org> <201711151847.vAFIlGD9052509@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Wed, 15 Nov 2017 13:27:18 -0700 X-Google-Sender-Auth: TBoylCBsGooAslPDBRKqOdV7sug Message-ID: Subject: Re: svn commit: r325860 - head/sbin/newfs To: "Rodney W. Grimes" Cc: Ed Maste , 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.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 20:27:20 -0000 On Nov 15, 2017 11:47 AM, "Rodney W. Grimes" wrote: > Author: emaste > Date: Wed Nov 15 18:40:40 2017 > New Revision: 325860 > URL: https://svnweb.freebsd.org/changeset/base/325860 > > Log: > newfs: warn if newer than kernel > > Creating a UFS filesystem with a newfs newer than the running kernel, > and then mounting that filesystem, can lead to interesting failures. > > Add a safety belt to explicitly warn when newfs is newer than the > running kernel. You should probably make the warning if (newer || older) as either is likely to have interesting side effects, as are mounting ufs file systems on different versions. Not really. The cg stuff is really only a hassle for the case ed is testing for. *Sigh* why did not UFS grow a version number of its own when things started to change other than UFS1 vs UFS2. This isn't anything like those changes.. Warner > Reviewed by: gjb, jhb, mckusick > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D12765 > > Modified: > head/sbin/newfs/newfs.c > > Modified: head/sbin/newfs/newfs.c > ============================================================ ================== > --- head/sbin/newfs/newfs.c Wed Nov 15 18:03:31 2017 (r325859) > +++ head/sbin/newfs/newfs.c Wed Nov 15 18:40:40 2017 (r325860) > @@ -398,6 +398,10 @@ main(int argc, char *argv[]) > if (pp != NULL) > pp->p_size *= secperblk; > } > + if (getosreldate() < __FreeBSD_version) { > + warnx("%s is newer than the running kernel and may not be compatible", > + getprogname()); > + } > mkfs(pp, special); > ufs_disk_close(&disk); > if (!jflag) > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Wed Nov 15 20:51:09 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8073DE6F5D; Wed, 15 Nov 2017 20:51:09 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B0DC07B357; Wed, 15 Nov 2017 20:51:09 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vAFKp6mv052999; Wed, 15 Nov 2017 12:51:06 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vAFKp6Is052998; Wed, 15 Nov 2017 12:51:06 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201711152051.vAFKp6Is052998@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r325860 - head/sbin/newfs In-Reply-To: To: Warner Losh Date: Wed, 15 Nov 2017 12:51:05 -0800 (PST) CC: "Rodney W. Grimes" , Ed Maste , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 20:51:09 -0000 [ Charset UTF-8 unsupported, converting... ] > On Nov 15, 2017 11:47 AM, "Rodney W. Grimes" > wrote: > > > Author: emaste > > Date: Wed Nov 15 18:40:40 2017 > > New Revision: 325860 > > URL: https://svnweb.freebsd.org/changeset/base/325860 > > > > Log: > > newfs: warn if newer than kernel > > > > Creating a UFS filesystem with a newfs newer than the running kernel, > > and then mounting that filesystem, can lead to interesting failures. > > > > Add a safety belt to explicitly warn when newfs is newer than the > > running kernel. > > You should probably make the warning if (newer || older) as > either is likely to have interesting side effects, as are > mounting ufs file systems on different versions. > > > Not really. The cg stuff is really only a hassle for the case ed is testing > for. Its too late now, but if you take a newer ufs with the cg stuff in them and mount it on an old system it politly well corrupt the data that the newer kernel needs. So your right, doing this check in newfs wont do anything, but I can tell you this tiny little chain has been a PITA for people that move HD around.... > *Sigh* why did not UFS grow a version number of its own > when things started to change other than UFS1 vs UFS2. > > > This isn't anything like those changes.. UFS changed in a way that makes it difficult to move UFS drives accross systems that are at differing versions. That IS bad no mater how you slice it. I now have to make sure I fsck a drive when moving it from an old to new system to get the cg checksum stuff fixed. > Warner > > > Reviewed by: gjb, jhb, mckusick > > Sponsored by: The FreeBSD Foundation > > Differential Revision: https://reviews.freebsd.org/D12765 > > > > Modified: > > head/sbin/newfs/newfs.c > > > > Modified: head/sbin/newfs/newfs.c > > ============================================================ > ================== > > --- head/sbin/newfs/newfs.c Wed Nov 15 18:03:31 2017 (r325859) > > +++ head/sbin/newfs/newfs.c Wed Nov 15 18:40:40 2017 (r325860) > > @@ -398,6 +398,10 @@ main(int argc, char *argv[]) > > if (pp != NULL) > > pp->p_size *= secperblk; > > } > > + if (getosreldate() < __FreeBSD_version) { > > + warnx("%s is newer than the running kernel and may not be > compatible", > > + getprogname()); > > + } > > mkfs(pp, special); > > ufs_disk_close(&disk); > > if (!jflag) > > > > > > -- > Rod Grimes > rgrimes@freebsd.org -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Wed Nov 15 20:58:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D53D2DE72DA for ; Wed, 15 Nov 2017 20:58:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22b.google.com (mail-io0-x22b.google.com [IPv6:2607:f8b0:4001:c06::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 966D87BA75 for ; Wed, 15 Nov 2017 20:58:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22b.google.com with SMTP id x63so2974767ioe.6 for ; Wed, 15 Nov 2017 12:58:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=V8eVkdelRKju1wZCxyZ0ofYU+ibpPHEHqMuEddkBK24=; b=k3vCsLQmblP/QhrN7+rvLjnVY4WHy2Jdx4Arwxbh+9+ozrAIuitvnUGRVkm38RzZ9n UwQ8TbI9vf6rSPrKmmDORDOEmXeQXPhU1K1d8E/0oXET8KX553QH7T7eq5XQ2v16X08D db806DiwYNRWPr95/NMvaZ7Aq9tGauQaDP8Yc0aG8sn/nw2QrpiHdhg6hc0zwa3BBGDe 8mvYLyHdBlYXqS1SIiybiAIcm7ayjDBGEZ7P6ZbqVRSp6LfIAruIr/mEC7PX9N1ro3uy JIfvmUdR8TkWfTfdeGSe9HxwbzOAE5ko1yqWQ5JP7v/Ekr/v6GnhTGOjwQvDuK2vyVba 6knA== 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=V8eVkdelRKju1wZCxyZ0ofYU+ibpPHEHqMuEddkBK24=; b=Vs3ghqX+t7mljh2r4gKH1bTCruxUrzE/6PuuDn5VyElntvqQNTwogPnNJZgdeSK92h Kt7WZUVL5/xALeQb5uxxrnXPlNoZHVuTvUglrGdpFcyZIhdSGIEQKr5/afYQ/Obzrq3c hp5LoOoC2tZMm+MGBO3QnK7QuQXDdwHeJDP8i//VUQG6cD78O4v8XP3ugCYMCNTjJXgZ qfUBWErRGx1vozPyA2Ag2PDeYdh/a5TaQjHODr+3rYZl5iQe/oM7sbaFjCdRGzp0uU7t LYyizPYUSsJ8CZqvHECumGnIySmjTO+SP1lU5q4aZt2GqEmjMjVJ8VQB5txSCN4PJY4B mWxQ== X-Gm-Message-State: AJaThX4bkQ0Wfv8bwKCCQ0VJOMseCmxkyq3TZwGeylWvyeRsrTB2qMo5 gxJJaAGdqSdGLZYzN6OackT1ArTr0J5aTxLMQOAYIA== X-Google-Smtp-Source: AGs4zMa/IMag2ZMewKiYp6modJWGrsTqqQIUWgnEGshirt4XJ+Gvb+VXVKVOkwOpets5Q2Bw64l8eY5+0Uqhh8lJp2c= X-Received: by 10.107.30.73 with SMTP id e70mr19446757ioe.130.1510779497490; Wed, 15 Nov 2017 12:58:17 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Wed, 15 Nov 2017 12:58:16 -0800 (PST) X-Originating-IP: [2607:fb90:6cbb:3482:ed95:2e8b:8936:7768] Received: by 10.79.108.204 with HTTP; Wed, 15 Nov 2017 12:58:16 -0800 (PST) In-Reply-To: <201711152051.vAFKp6Is052998@pdx.rh.CN85.dnsmgr.net> References: <201711152051.vAFKp6Is052998@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Wed, 15 Nov 2017 13:58:16 -0700 X-Google-Sender-Auth: 0jr1LXkwWI8tUVnXwLAhXejhJSc Message-ID: Subject: Re: svn commit: r325860 - head/sbin/newfs To: "Rodney W. Grimes" Cc: Ed Maste , 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.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 20:58:19 -0000 On Nov 15, 2017 1:51 PM, "Rodney W. Grimes" wrote: [ Charset UTF-8 unsupported, converting... ] > On Nov 15, 2017 11:47 AM, "Rodney W. Grimes" > wrote: > > > Author: emaste > > Date: Wed Nov 15 18:40:40 2017 > > New Revision: 325860 > > URL: https://svnweb.freebsd.org/changeset/base/325860 > > > > Log: > > newfs: warn if newer than kernel > > > > Creating a UFS filesystem with a newfs newer than the running kernel, > > and then mounting that filesystem, can lead to interesting failures. > > > > Add a safety belt to explicitly warn when newfs is newer than the > > running kernel. > > You should probably make the warning if (newer || older) as > either is likely to have interesting side effects, as are > mounting ufs file systems on different versions. > > > Not really. The cg stuff is really only a hassle for the case ed is testing > for. Its too late now, but if you take a newer ufs with the cg stuff in them and mount it on an old system it politly well corrupt the data that the newer kernel needs. So your right, doing this check in newfs wont do anything, but I can tell you this tiny little chain has been a PITA for people that move HD around.... Fsck automatically fixes issues like that. It recomputes the checksums. > *Sigh* why did not UFS grow a version number of its own > when things started to change other than UFS1 vs UFS2. > > > This isn't anything like those changes.. UFS changed in a way that makes it difficult to move UFS drives accross systems that are at differing versions. That IS bad no mater how you slice it. I now have to make sure I fsck a drive when moving it from an old to new system to get the cg checksum stuff fixed. Except it isn't as bad as you say. Warner > Warner > > > Reviewed by: gjb, jhb, mckusick > > Sponsored by: The FreeBSD Foundation > > Differential Revision: https://reviews.freebsd.org/D12765 > > > > Modified: > > head/sbin/newfs/newfs.c > > > > Modified: head/sbin/newfs/newfs.c > > ============================================================ > ================== > > --- head/sbin/newfs/newfs.c Wed Nov 15 18:03:31 2017 (r325859) > > +++ head/sbin/newfs/newfs.c Wed Nov 15 18:40:40 2017 (r325860) > > @@ -398,6 +398,10 @@ main(int argc, char *argv[]) > > if (pp != NULL) > > pp->p_size *= secperblk; > > } > > + if (getosreldate() < __FreeBSD_version) { > > + warnx("%s is newer than the running kernel and may not be > compatible", > > + getprogname()); > > + } > > mkfs(pp, special); > > ufs_disk_close(&disk); > > if (!jflag) > > > > > > -- > Rod Grimes > rgrimes@freebsd.org -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Wed Nov 15 21:13:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2CE4DE774E; Wed, 15 Nov 2017 21:13:41 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 76A367C23E; Wed, 15 Nov 2017 21:13:40 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vAFLDc0Z053120; Wed, 15 Nov 2017 13:13:38 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vAFLDcSJ053119; Wed, 15 Nov 2017 13:13:38 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201711152113.vAFLDcSJ053119@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r325860 - head/sbin/newfs In-Reply-To: To: Warner Losh Date: Wed, 15 Nov 2017 13:13:38 -0800 (PST) CC: "Rodney W. Grimes" , Ed Maste , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 21:13:41 -0000 [ Charset UTF-8 unsupported, converting... ] > On Nov 15, 2017 1:51 PM, "Rodney W. Grimes" > wrote: > > [ Charset UTF-8 unsupported, converting... ] > > On Nov 15, 2017 11:47 AM, "Rodney W. Grimes" net> > > wrote: > > > > > Author: emaste > > > Date: Wed Nov 15 18:40:40 2017 > > > New Revision: 325860 > > > URL: https://svnweb.freebsd.org/changeset/base/325860 > > > > > > Log: > > > newfs: warn if newer than kernel > > > > > > Creating a UFS filesystem with a newfs newer than the running kernel, > > > and then mounting that filesystem, can lead to interesting failures. > > > > > > Add a safety belt to explicitly warn when newfs is newer than the > > > running kernel. > > > > You should probably make the warning if (newer || older) as > > either is likely to have interesting side effects, as are > > mounting ufs file systems on different versions. > > > > > > Not really. The cg stuff is really only a hassle for the case ed is > testing > > for. > > Its too late now, but if you take a newer ufs with the cg > stuff in them and mount it on an old system it politly well > corrupt the data that the newer kernel needs. So your right, > doing this check in newfs wont do anything, but I can tell > you this tiny little chain has been a PITA for people that > move HD around.... > > > Fsck automatically fixes issues like that. It recomputes the checksums. Yes, but you do not know that this is needed until AFTER you have mounted the "Clean" file system and started using it, and then you get some nasty messages (though they are a little better now than the original ones). So then you have to manually fire off a fsck on the volume... > > > *Sigh* why did not UFS grow a version number of its own > > when things started to change other than UFS1 vs UFS2. > > > > > > This isn't anything like those changes.. > > UFS changed in a way that makes it difficult to move > UFS drives accross systems that are at differing versions. > That IS bad no mater how you slice it. I now have to make > sure I fsck a drive when moving it from an old to new > system to get the cg checksum stuff fixed. > > > Except it isn't as bad as you say. It is a distracting PITA, you probably dont move a UFS formatted flash drive around between as many differing systems as I do. Oh, and can you please get a mail client that does proper quoting? > Rod Grimes > rgrimes@freebsd.org -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Wed Nov 15 21:23:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09114DE7AE4 for ; Wed, 15 Nov 2017 21:23:33 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x231.google.com (mail-io0-x231.google.com [IPv6:2607:f8b0:4001:c06::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BAE3E7C7E1 for ; Wed, 15 Nov 2017 21:23:32 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x231.google.com with SMTP id q101so3072142ioi.1 for ; Wed, 15 Nov 2017 13:23:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=6Q5Tg0hhyq82WQ+H9Q6MGb4rzyrvvNAmMNVrjNyHIr0=; b=XSHnf+jUaSFHPfPTL1ZAsm2ZaMCRtJ7DtWuLwpS7DZXAmWvv5BLv8SLRao1MtNohkT lM7/ifmLuALsvftsg8np94iWxpHCt6bAvGUBuvEqQoKe9xx3mWx4xrrMuK79UD3WS0t7 dlhqKB1PrIBgsnmjUZns9fWTPbdFc7rfT2ET29jQ7QaVDHpfGkyCiWKaZYsvJyvK3HSa /kshCGpYm+jRUSpT6D1XzV2sxHGu86DKcXhiramb6MQEKFLeDIxSEB0XsX+ijhbH7xbC NHVsbCHFr9YRsqq+RqD8ObLRS1D2rwFeVgrhWjjwM1ZmokskzIYCNcOAHz9IA+RQTStz 8ZDA== 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=6Q5Tg0hhyq82WQ+H9Q6MGb4rzyrvvNAmMNVrjNyHIr0=; b=DmwHum3gpsz4nlbEDjeZbvuGk9p9QmlydMoS1wDeCuCrdCI5TCLbcxIPSraFnj5qT7 sK0oarhSc0mjU6bHkAhXMqqG0HLT757ChwTW47rd6/2qNltTxfH/+IRMm+qOBIM89QsE 6r3GT0RIGAJwCFRDP6lOhwG39FmOhtUJjcWVbd9OHYwVAqzRlQgqwyp2C47WtRQ6n65W +mo+cLNLtAzR5cTC09rtWkOiQMzgEhFfwz2sx2Rq1gAy7Cho9NHRRqhx6prtwAC0hpBy 3CTaT56TJPeZktyeSt6DsyyG99rdieV4nvlvdhAa1ZU+ORH8/xo2jYHpZHf2DJ7/MAN3 1RMA== X-Gm-Message-State: AJaThX6yUg05pwyxXbwB6OhRSQ6rHjzJA3DUSvQRlUlDg0mY761iO9fe LhSJ97mvpcNjZJv5WX9K8cKvAtzjEAybcFkWQ3IvPA== X-Google-Smtp-Source: AGs4zMbzbNfSS3EJGLNtu7bnkJelC4OQNyT9UKuQLbesTKK9226+K0AeyobpizEetYMuVv4jN1Mt7v98vhjjZ7KQDzY= X-Received: by 10.107.48.195 with SMTP id w186mr5977338iow.301.1510781011872; Wed, 15 Nov 2017 13:23:31 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Wed, 15 Nov 2017 13:23:30 -0800 (PST) X-Originating-IP: [2607:fb90:6cbb:3482:ed95:2e8b:8936:7768] Received: by 10.79.108.204 with HTTP; Wed, 15 Nov 2017 13:23:30 -0800 (PST) In-Reply-To: <201711152113.vAFLDcSJ053119@pdx.rh.CN85.dnsmgr.net> References: <201711152113.vAFLDcSJ053119@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Wed, 15 Nov 2017 14:23:30 -0700 X-Google-Sender-Auth: suaXxrpuqLV2zcu4h4C0et8sQgw Message-ID: Subject: Re: svn commit: r325860 - head/sbin/newfs To: "Rodney W. Grimes" Cc: Ed Maste , 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.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 21:23:33 -0000 On Nov 15, 2017 2:13 PM, "Rodney W. Grimes" wrote: [ Charset UTF-8 unsupported, converting... ] > On Nov 15, 2017 1:51 PM, "Rodney W. Grimes" > wrote: > > [ Charset UTF-8 unsupported, converting... ] > > On Nov 15, 2017 11:47 AM, "Rodney W. Grimes" net> > > wrote: > > > > > Author: emaste > > > Date: Wed Nov 15 18:40:40 2017 > > > New Revision: 325860 > > > URL: https://svnweb.freebsd.org/changeset/base/325860 > > > > > > Log: > > > newfs: warn if newer than kernel > > > > > > Creating a UFS filesystem with a newfs newer than the running kernel, > > > and then mounting that filesystem, can lead to interesting failures. > > > > > > Add a safety belt to explicitly warn when newfs is newer than the > > > running kernel. > > > > You should probably make the warning if (newer || older) as > > either is likely to have interesting side effects, as are > > mounting ufs file systems on different versions. > > > > > > Not really. The cg stuff is really only a hassle for the case ed is > testing > > for. > > Its too late now, but if you take a newer ufs with the cg > stuff in them and mount it on an old system it politly well > corrupt the data that the newer kernel needs. So your right, > doing this check in newfs wont do anything, but I can tell > you this tiny little chain has been a PITA for people that > move HD around.... > > > Fsck automatically fixes issues like that. It recomputes the checksums. Yes, but you do not know that this is needed until AFTER you have mounted the "Clean" file system and started using it, and then you get some nasty messages (though they are a little better now than the original ones). So then you have to manually fire off a fsck on the volume... It's just a minor annoyance.... no data is lost. > > > *Sigh* why did not UFS grow a version number of its own > > when things started to change other than UFS1 vs UFS2. > > > > > > This isn't anything like those changes.. > > UFS changed in a way that makes it difficult to move > UFS drives accross systems that are at differing versions. > That IS bad no mater how you slice it. I now have to make > sure I fsck a drive when moving it from an old to new > system to get the cg checksum stuff fixed. > > > Except it isn't as bad as you say. It is a distracting PITA, you probably dont move a UFS formatted flash drive around between as many differing systems as I do. I've been dealing with false positives for these messages at work... Oh, and can you please get a mail client that does proper quoting? It's just gmail. And there's really no alternative :( Warner > Rod Grimes > rgrimes@freebsd.org -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Wed Nov 15 21:28:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC23BDE7D17; Wed, 15 Nov 2017 21:28:48 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f181.google.com (mail-io0-f181.google.com [209.85.223.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9B05B7CAFE; Wed, 15 Nov 2017 21:28:48 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f181.google.com with SMTP id u42so3066890ioi.9; Wed, 15 Nov 2017 13:28:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=HGZMU0TWVnzU8+mlf9yS0frGlCXZEH7Prv8Jlz8itac=; b=pxEkW5EHqeOXpB7cJ18dFevlktuIosaYkPpe+w72GPujlwiFCf8OCjPQdtsbNU5G4B Sh8Q5for53jx3SA15LdlPoNQ3cbKFed1K5QSCJUAxpE8PzgoK/schzlAQGPSO+H2TgMl 0Ws3MlWoGcClvj+KCs5dJiGhUivRnaNeuz3wMhHyNjJ8SzWly5Op2BT3E9Zty+Qc5gRD rjhWnZCCJ8aSFA2XOUR79ElRyUOKkRcT0lv3fd6eOiVDKq6LIHjXRxa4odPVB5kkjyrr 0kDGE5h/QdQG6Ir9s27g/MC0yrfXD6qqzlPacf28Kkz0PXk5nvSfEn84AhnzrL/FJMr7 VlUg== X-Gm-Message-State: AJaThX7a0aFuWz6m6aKMn4ZjpvEiJLPr1xVQUK1GVeQOoTf+xYqPUfea qkhvmAYVKMm+67iAdsbyGal5mH/4eFY= X-Google-Smtp-Source: AGs4zManvnU02vIwkMwiGDl7NXiGrVX1QyzIsY8MsKni0MVHNCV7zxpMHeT/GhPf+zoh1UalXmUE8g== X-Received: by 10.107.83.10 with SMTP id h10mr22263308iob.242.1510781322027; Wed, 15 Nov 2017 13:28:42 -0800 (PST) Received: from mail-io0-f178.google.com (mail-io0-f178.google.com. [209.85.223.178]) by smtp.gmail.com with ESMTPSA id s19sm9794143ioa.62.2017.11.15.13.28.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Nov 2017 13:28:41 -0800 (PST) Received: by mail-io0-f178.google.com with SMTP id u42so3066860ioi.9; Wed, 15 Nov 2017 13:28:41 -0800 (PST) X-Received: by 10.107.158.75 with SMTP id h72mr20835457ioe.256.1510781321486; Wed, 15 Nov 2017 13:28:41 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.165.150 with HTTP; Wed, 15 Nov 2017 13:28:41 -0800 (PST) In-Reply-To: References: <201711152113.vAFLDcSJ053119@pdx.rh.CN85.dnsmgr.net> From: Conrad Meyer Date: Wed, 15 Nov 2017 13:28:41 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r325860 - head/sbin/newfs To: Warner Losh Cc: "Rodney W. Grimes" , Ed Maste , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 21:28:48 -0000 On Wed, Nov 15, 2017 at 1:23 PM, Warner Losh wrote: > On Nov 15, 2017 2:13 PM, "Rodney W. Grimes" > wrote: > Oh, and can you please get a mail client that does > proper quoting? > > > It's just gmail. And there's really no alternative :( > > Warner Hi, Gmail does quoting just fine. I'm using it right now. Not sure what you're doing wrong, but there is a way to use gmail and quote replies. I don't do anything special when I hit "reply" on an email. Best, Conrad From owner-svn-src-head@freebsd.org Wed Nov 15 22:13:11 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69CE3DE8D04; Wed, 15 Nov 2017 22:13:11 +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 413C07E159; Wed, 15 Nov 2017 22:13:11 +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 vAFMDAbx097327; Wed, 15 Nov 2017 22:13:10 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAFMDAF1097326; Wed, 15 Nov 2017 22:13:10 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201711152213.vAFMDAF1097326@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 15 Nov 2017 22:13:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325864 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 325864 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 22:13:11 -0000 Author: tuexen Date: Wed Nov 15 22:13:10 2017 New Revision: 325864 URL: https://svnweb.freebsd.org/changeset/base/325864 Log: Fix the handling of ERROR chunks which a lot of error causes. While there, clean up the code. Thanks to Felix Weinrank who found the bug by using fuzz-testing the SCTP 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 Wed Nov 15 19:14:44 2017 (r325863) +++ head/sys/netinet/sctp_input.c Wed Nov 15 22:13:10 2017 (r325864) @@ -1098,19 +1098,11 @@ sctp_handle_shutdown_ack(struct sctp_shutdown_ack_chun #endif } -/* - * Skip past the param header and then we will find the chunk that caused the - * problem. There are two possibilities ASCONF or FWD-TSN other than that and - * our peer must be broken. - */ static void -sctp_process_unrecog_chunk(struct sctp_tcb *stcb, struct sctp_paramhdr *phdr, +sctp_process_unrecog_chunk(struct sctp_tcb *stcb, uint8_t chunk_type, struct sctp_nets *net) { - struct sctp_chunkhdr *chk; - - chk = (struct sctp_chunkhdr *)((caddr_t)phdr + sizeof(*phdr)); - switch (chk->chunk_type) { + switch (chunk_type) { case SCTP_ASCONF_ACK: case SCTP_ASCONF: sctp_asconf_cleanup(stcb, net); @@ -1121,8 +1113,8 @@ sctp_process_unrecog_chunk(struct sctp_tcb *stcb, stru break; default: SCTPDBG(SCTP_DEBUG_INPUT2, - "Peer does not support chunk type %d(%x)??\n", - chk->chunk_type, (uint32_t)chk->chunk_type); + "Peer does not support chunk type %d (0x%x).\n", + chunk_type, chunk_type); break; } } @@ -1134,12 +1126,9 @@ sctp_process_unrecog_chunk(struct sctp_tcb *stcb, stru * XXX: Is this the right thing to do? */ static void -sctp_process_unrecog_param(struct sctp_tcb *stcb, struct sctp_paramhdr *phdr) +sctp_process_unrecog_param(struct sctp_tcb *stcb, uint16_t parameter_type) { - struct sctp_paramhdr *pbad; - - pbad = phdr + 1; - switch (ntohs(pbad->param_type)) { + switch (parameter_type) { /* pr-sctp draft */ case SCTP_PRSCTP_SUPPORTED: stcb->asoc.prsctp_supported = 0; @@ -1164,63 +1153,69 @@ sctp_process_unrecog_param(struct sctp_tcb *stcb, stru break; default: SCTPDBG(SCTP_DEBUG_INPUT2, - "Peer does not support param type %d(%x)??\n", - pbad->param_type, (uint32_t)pbad->param_type); + "Peer does not support param type %d (0x%x)??\n", + parameter_type, parameter_type); break; } } static int sctp_handle_error(struct sctp_chunkhdr *ch, - struct sctp_tcb *stcb, struct sctp_nets *net) + struct sctp_tcb *stcb, struct sctp_nets *net, uint32_t limit) { - int chklen; - struct sctp_paramhdr *phdr; - uint16_t error, error_type; - uint16_t error_len; + struct sctp_error_cause *cause; struct sctp_association *asoc; - int adjust; + uint32_t remaining_length, adjust; + uint16_t code, cause_code, cause_length; #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so; #endif /* parse through all of the errors and process */ asoc = &stcb->asoc; - phdr = (struct sctp_paramhdr *)((caddr_t)ch + + cause = (struct sctp_error_cause *)((caddr_t)ch + sizeof(struct sctp_chunkhdr)); - chklen = ntohs(ch->chunk_length) - sizeof(struct sctp_chunkhdr); - error = 0; - while ((size_t)chklen >= sizeof(struct sctp_paramhdr)) { + remaining_length = ntohs(ch->chunk_length); + if (remaining_length > limit) { + remaining_length = limit; + } + if (remaining_length >= sizeof(struct sctp_chunkhdr)) { + remaining_length -= sizeof(struct sctp_chunkhdr); + } else { + remaining_length = 0; + } + code = 0; + while (remaining_length >= sizeof(struct sctp_error_cause)) { /* Process an Error Cause */ - error_type = ntohs(phdr->param_type); - error_len = ntohs(phdr->param_length); - if ((error_len > chklen) || (error_len == 0)) { - /* invalid param length for this param */ - SCTPDBG(SCTP_DEBUG_INPUT1, "Bogus length in error param- chunk left:%d errorlen:%d\n", - chklen, error_len); + cause_code = ntohs(cause->code); + cause_length = ntohs(cause->length); + if ((cause_length > remaining_length) || (cause_length == 0)) { + /* Invalid cause length, possibly due to truncation. */ + SCTPDBG(SCTP_DEBUG_INPUT1, "Bogus length in cause - bytes left: %u cause length: %u\n", + remaining_length, cause_length); return (0); } - if (error == 0) { + if (code == 0) { /* report the first error cause */ - error = error_type; + code = cause_code; } - switch (error_type) { + switch (cause_code) { case SCTP_CAUSE_INVALID_STREAM: case SCTP_CAUSE_MISSING_PARAM: case SCTP_CAUSE_INVALID_PARAM: case SCTP_CAUSE_NO_USER_DATA: - SCTPDBG(SCTP_DEBUG_INPUT1, "Software error we got a %d back? We have a bug :/ (or do they?)\n", - error_type); + SCTPDBG(SCTP_DEBUG_INPUT1, "Software error we got a %u back? We have a bug :/ (or do they?)\n", + cause_code); break; case SCTP_CAUSE_NAT_COLLIDING_STATE: - SCTPDBG(SCTP_DEBUG_INPUT2, "Received Colliding state abort flags:%x\n", + SCTPDBG(SCTP_DEBUG_INPUT2, "Received Colliding state abort flags: %x\n", ch->chunk_flags); if (sctp_handle_nat_colliding_state(stcb)) { return (0); } break; case SCTP_CAUSE_NAT_MISSING_STATE: - SCTPDBG(SCTP_DEBUG_INPUT2, "Received missing state abort flags:%x\n", + SCTPDBG(SCTP_DEBUG_INPUT2, "Received missing state abort flags: %x\n", ch->chunk_flags); if (sctp_handle_nat_missing_state(stcb, net)) { return (0); @@ -1231,12 +1226,18 @@ sctp_handle_error(struct sctp_chunkhdr *ch, * We only act if we have echoed a cookie and are * waiting. */ - if (SCTP_GET_STATE(asoc) == SCTP_STATE_COOKIE_ECHOED) { - int *p; + if ((cause_length >= sizeof(struct sctp_error_stale_cookie)) && + (SCTP_GET_STATE(asoc) == SCTP_STATE_COOKIE_ECHOED)) { + struct sctp_error_stale_cookie *stale_cookie; - p = (int *)((caddr_t)phdr + sizeof(*phdr)); - /* Save the time doubled */ - asoc->cookie_preserve_req = ntohl(*p) << 1; + stale_cookie = (struct sctp_error_stale_cookie *)cause; + asoc->cookie_preserve_req = ntohl(stale_cookie->stale_time); + /* Double it to be more robust on RTX */ + if (asoc->cookie_preserve_req <= UINT32_MAX / 2) { + asoc->cookie_preserve_req *= 2; + } else { + asoc->cookie_preserve_req = UINT32_MAX; + } asoc->stale_cookie_count++; if (asoc->stale_cookie_count > asoc->max_init_times) { @@ -1279,10 +1280,21 @@ sctp_handle_error(struct sctp_chunkhdr *ch, */ break; case SCTP_CAUSE_UNRECOG_CHUNK: - sctp_process_unrecog_chunk(stcb, phdr, net); + if (cause_length >= sizeof(struct sctp_error_unrecognized_chunk)) { + struct sctp_error_unrecognized_chunk *unrec_chunk; + + unrec_chunk = (struct sctp_error_unrecognized_chunk *)cause; + sctp_process_unrecog_chunk(stcb, unrec_chunk->ch.chunk_type, net); + } break; case SCTP_CAUSE_UNRECOG_PARAM: - sctp_process_unrecog_param(stcb, phdr); + /* XXX: We only consider the first parameter */ + if (cause_length >= sizeof(struct sctp_error_cause) + sizeof(struct sctp_paramhdr)) { + struct sctp_paramhdr *unrec_parameter; + + unrec_parameter = (struct sctp_paramhdr *)(cause + 1); + sctp_process_unrecog_param(stcb, ntohs(unrec_parameter->param_type)); + } break; case SCTP_CAUSE_COOKIE_IN_SHUTDOWN: /* @@ -1299,8 +1311,8 @@ sctp_handle_error(struct sctp_chunkhdr *ch, * We should NOT get these here, but in a * ASCONF-ACK. */ - SCTPDBG(SCTP_DEBUG_INPUT2, "Peer sends ASCONF errors in a Operational Error?<%d>?\n", - error_type); + SCTPDBG(SCTP_DEBUG_INPUT2, "Peer sends ASCONF errors in a error cause with code %u.\n", + cause_code); break; case SCTP_CAUSE_OUT_OF_RESC: /* @@ -1312,15 +1324,19 @@ sctp_handle_error(struct sctp_chunkhdr *ch, */ break; default: - SCTPDBG(SCTP_DEBUG_INPUT1, "sctp_handle_error: unknown error type = 0x%xh\n", - error_type); + SCTPDBG(SCTP_DEBUG_INPUT1, "sctp_handle_error: unknown code 0x%x\n", + cause_code); break; } - adjust = SCTP_SIZE32(error_len); - chklen -= adjust; - phdr = (struct sctp_paramhdr *)((caddr_t)phdr + adjust); + adjust = SCTP_SIZE32(cause_length); + if (remaining_length >= adjust) { + remaining_length -= adjust; + } else { + remaining_length = 0; + } + cause = (struct sctp_error_cause *)((caddr_t)cause + adjust); } - sctp_ulp_notify(SCTP_NOTIFY_REMOTE_ERROR, stcb, error, ch, SCTP_SO_NOT_LOCKED); + sctp_ulp_notify(SCTP_NOTIFY_REMOTE_ERROR, stcb, code, ch, SCTP_SO_NOT_LOCKED); return (0); } @@ -5072,7 +5088,7 @@ process_control_chunks: case SCTP_OPERATION_ERROR: SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_OP_ERR\n"); if ((stcb != NULL) && (netp != NULL) && (*netp != NULL) && - sctp_handle_error(ch, stcb, *netp) < 0) { + sctp_handle_error(ch, stcb, *netp, contiguous) < 0) { *offset = length; return (NULL); } From owner-svn-src-head@freebsd.org Wed Nov 15 22:30:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B1CBDE90FD; Wed, 15 Nov 2017 22:30:22 +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 250937E766; Wed, 15 Nov 2017 22:30:22 +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 vAFMUL1N001846; Wed, 15 Nov 2017 22:30:21 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAFMULUg001844; Wed, 15 Nov 2017 22:30:21 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201711152230.vAFMULUg001844@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Wed, 15 Nov 2017 22:30:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325865 - in head/sys: compat/freebsd32 kern X-SVN-Group: head X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: in head/sys: compat/freebsd32 kern X-SVN-Commit-Revision: 325865 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 22:30:22 -0000 Author: gordon Date: Wed Nov 15 22:30:21 2017 New Revision: 325865 URL: https://svnweb.freebsd.org/changeset/base/325865 Log: Properly bzero kldstat structure to prevent kernel information leak. Submitted by: kib Reported by: TJ Corley Security: CVE-2017-1088 Modified: head/sys/compat/freebsd32/freebsd32_misc.c head/sys/kern/kern_linker.c Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Wed Nov 15 22:13:10 2017 (r325864) +++ head/sys/compat/freebsd32/freebsd32_misc.c Wed Nov 15 22:30:21 2017 (r325865) @@ -3331,8 +3331,8 @@ freebsd32_copyout_strings(struct image_params *imgp) int freebsd32_kldstat(struct thread *td, struct freebsd32_kldstat_args *uap) { - struct kld_file_stat stat; - struct kld32_file_stat stat32; + struct kld_file_stat *stat; + struct kld32_file_stat *stat32; int error, version; if ((error = copyin(&uap->stat->version, &version, sizeof(version))) @@ -3342,17 +3342,22 @@ freebsd32_kldstat(struct thread *td, struct freebsd32_ version != sizeof(struct kld32_file_stat)) return (EINVAL); - error = kern_kldstat(td, uap->fileid, &stat); - if (error != 0) - return (error); - - bcopy(&stat.name[0], &stat32.name[0], sizeof(stat.name)); - CP(stat, stat32, refs); - CP(stat, stat32, id); - PTROUT_CP(stat, stat32, address); - CP(stat, stat32, size); - bcopy(&stat.pathname[0], &stat32.pathname[0], sizeof(stat.pathname)); - return (copyout(&stat32, uap->stat, version)); + stat = malloc(sizeof(*stat), M_TEMP, M_WAITOK | M_ZERO); + stat32 = malloc(sizeof(*stat32), M_TEMP, M_WAITOK | M_ZERO); + error = kern_kldstat(td, uap->fileid, stat); + if (error == 0) { + bcopy(&stat->name[0], &stat32->name[0], sizeof(stat->name)); + CP(*stat, *stat32, refs); + CP(*stat, *stat32, id); + PTROUT_CP(*stat, *stat32, address); + CP(*stat, *stat32, size); + bcopy(&stat->pathname[0], &stat32->pathname[0], + sizeof(stat->pathname)); + error = copyout(stat32, uap->stat, version); + } + free(stat, M_TEMP); + free(stat32, M_TEMP); + return (error); } int Modified: head/sys/kern/kern_linker.c ============================================================================== --- head/sys/kern/kern_linker.c Wed Nov 15 22:13:10 2017 (r325864) +++ head/sys/kern/kern_linker.c Wed Nov 15 22:30:21 2017 (r325865) @@ -1229,7 +1229,7 @@ out: int sys_kldstat(struct thread *td, struct kldstat_args *uap) { - struct kld_file_stat stat; + struct kld_file_stat *stat; int error, version; /* @@ -1242,10 +1242,12 @@ sys_kldstat(struct thread *td, struct kldstat_args *ua version != sizeof(struct kld_file_stat)) return (EINVAL); - error = kern_kldstat(td, uap->fileid, &stat); - if (error != 0) - return (error); - return (copyout(&stat, uap->stat, version)); + stat = malloc(sizeof(*stat), M_TEMP, M_WAITOK | M_ZERO); + error = kern_kldstat(td, uap->fileid, stat); + if (error == 0) + error = copyout(stat, uap->stat, version); + free(stat, M_TEMP); + return (error); } int From owner-svn-src-head@freebsd.org Wed Nov 15 22:42:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01C4EDE9773; Wed, 15 Nov 2017 22:42: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 C37817F5E2; Wed, 15 Nov 2017 22:42:21 +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 vAFMgKo8010294; Wed, 15 Nov 2017 22:42:20 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAFMgKGW010293; Wed, 15 Nov 2017 22:42:20 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201711152242.vAFMgKGW010293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 15 Nov 2017 22:42:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325872 - head/sys/netipsec X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/netipsec X-SVN-Commit-Revision: 325872 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 22:42:22 -0000 Author: cem Date: Wed Nov 15 22:42:20 2017 New Revision: 325872 URL: https://svnweb.freebsd.org/changeset/base/325872 Log: ipsec: Use the same keysize values for HMAC as prior to r324017 The HMAC construction natively permits any key size between 0 and the input block length. Before r324017, the auth_hash 'keysize' member was the hash output length, which was used by ipsec for key sizes. (Non-ipsec consumers need the ability to use other keysizes, hence, r324017.) The ipsec SADB code blindly uses the auth_hash 'keysize' member for both minimum and maximum key size, which is wrong (from an HMAC perspective). For now, just switch it to 'hashsize', which matches the existing expectations. Instead it should probably use the range [0, keysize]. But there may be other broken code in ipsec that rejects hashes with too small a minimum key size. Reported by: olivier@ Reviewed by: olivier, no objection from ae Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D12770 Modified: head/sys/netipsec/key.c Modified: head/sys/netipsec/key.c ============================================================================== --- head/sys/netipsec/key.c Wed Nov 15 22:40:46 2017 (r325871) +++ head/sys/netipsec/key.c Wed Nov 15 22:42:20 2017 (r325872) @@ -6263,7 +6263,7 @@ key_getsizes_ah(const struct auth_hash *ah, int alg, u u_int16_t* max) { - *min = *max = ah->keysize; + *min = *max = ah->hashsize; if (ah->keysize == 0) { /* * Transform takes arbitrary key size but algorithm From owner-svn-src-head@freebsd.org Wed Nov 15 23:48:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67013DEEC52; Wed, 15 Nov 2017 23:48:04 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C69C3F1B; Wed, 15 Nov 2017 23:48:04 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAFNm3fY035784; Wed, 15 Nov 2017 23:48:03 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAFNm2gP035779; Wed, 15 Nov 2017 23:48:02 GMT (envelope-from np@FreeBSD.org) Message-Id: <201711152348.vAFNm2gP035779@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 15 Nov 2017 23:48:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325880 - in head: share/man/man4 sys/dev/cxgbe X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: in head: share/man/man4 sys/dev/cxgbe X-SVN-Commit-Revision: 325880 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 23:48:04 -0000 Author: np Date: Wed Nov 15 23:48:02 2017 New Revision: 325880 URL: https://svnweb.freebsd.org/changeset/base/325880 Log: cxgbe(4): Combine all _10g and _1g tunables and drop the suffix from their names. The finer-grained knobs weren't practically useful. Sponsored by: Chelsio Communications Modified: head/share/man/man4/cxgbe.4 head/share/man/man4/cxgbev.4 head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/t4_vf.c Modified: head/share/man/man4/cxgbe.4 ============================================================================== --- head/share/man/man4/cxgbe.4 Wed Nov 15 23:29:32 2017 (r325879) +++ head/share/man/man4/cxgbe.4 Wed Nov 15 23:48:02 2017 (r325880) @@ -172,37 +172,22 @@ types. A negative value for such a tunable instructs the driver to create up to that many queues if there are enough CPU cores available. .Bl -tag -width indent -.It Va hw.cxgbe.ntxq10g -Number of tx queues used for a 10Gb or higher-speed port. +.It Va hw.cxgbe.ntxq +Number of NIC tx queues used for a port. The default is 16 or the number of CPU cores in the system, whichever is less. -.It Va hw.cxgbe.nrxq10g -Number of rx queues used for a 10Gb or higher-speed port. +.It Va hw.cxgbe.nrxq +Number of NIC rx queues used for a port. The default is 8 or the number of CPU cores in the system, whichever is less. -.It Va hw.cxgbe.ntxq1g -Number of tx queues used for a 1Gb port. -The default is 4 or the number -of CPU cores in the system, whichever is less. -.It Va hw.cxgbe.nrxq1g -Number of rx queues used for a 1Gb port. -The default is 2 or the number -of CPU cores in the system, whichever is less. -.It Va hw.cxgbe.nofldtxq10g -Number of TOE tx queues used for a 10Gb or higher-speed port. +.It Va hw.cxgbe.nofldtxq +Number of TOE tx queues used for a port. The default is 8 or the number of CPU cores in the system, whichever is less. -.It Va hw.cxgbe.nofldrxq10g -Number of TOE rx queues used for a 10Gb or higher-speed port. +.It Va hw.cxgbe.nofldrxq +Number of TOE rx queues used for a port. The default is 2 or the number of CPU cores in the system, whichever is less. -.It Va hw.cxgbe.nofldtxq1g -Number of TOE tx queues used for a 1Gb port. -The default is 2 or the -number of CPU cores in the system, whichever is less. -.It Va hw.cxgbe.nofldrxq1g -Number of TOE rx queues used for a 1Gb port. -The default is 1. .It Va hw.cxgbe.num_vis Number of virtual interfaces (VIs) created for each port. Each virtual interface creates a separate network interface. @@ -213,8 +198,7 @@ name from the table above. Additional virtual interfaces use a single pair of queues for rx and tx as well an additional pair of queues for TOE rx and tx. The default is 1. -.It Va hw.cxgbe.holdoff_timer_idx_10G -.It Va hw.cxgbe.holdoff_timer_idx_1G +.It Va hw.cxgbe.holdoff_timer_idx .It Va hw.cxgbe.holdoff_timer_idx_ofld Timer index value used to delay interrupts. The holdoff timer list has the values 1, 5, 10, 50, 100, and 200 @@ -224,8 +208,7 @@ holdoff_timer_idx_ofld applies to queues used for TOE The default value is 1 which means the timer value is 5us. Different interfaces can be assigned different values at any time via the dev..X.holdoff_tmr_idx and dev..X.holdoff_tmr_idx_ofld sysctls. -.It Va hw.cxgbe.holdoff_pktc_idx_10G -.It Va hw.cxgbe.holdoff_pktc_idx_1G +.It Va hw.cxgbe.holdoff_pktc_idx .It Va hw.cxgbe.holdoff_pktc_idx_ofld Packet-count index value used to delay interrupts. The packet-count list has the values 1, 8, 16, and 32 by default, Modified: head/share/man/man4/cxgbev.4 ============================================================================== --- head/share/man/man4/cxgbev.4 Wed Nov 15 23:29:32 2017 (r325879) +++ head/share/man/man4/cxgbev.4 Wed Nov 15 23:48:02 2017 (r325880) @@ -172,24 +172,15 @@ Tunables can be set at the prompt before booting the kernel or stored in .Xr loader.conf 5 . .Bl -tag -width indent -.It Va hw.cxgbe.ntxq10g -Number of tx queues used for a 10Gb or higher-speed port. +.It Va hw.cxgbe.ntxq +Number of tx queues used for a port. The default is 16 or the number of CPU cores in the system, whichever is less. -.It Va hw.cxgbe.nrxq10g -Number of rx queues used for a 10Gb or higher-speed port. +.It Va hw.cxgbe.nrxq +Number of rx queues used for a port. The default is 8 or the number of CPU cores in the system, whichever is less. -.It Va hw.cxgbe.ntxq1g -Number of tx queues used for a 1Gb port. -The default is 4 or the number -of CPU cores in the system, whichever is less. -.It Va hw.cxgbe.nrxq1g -Number of rx queues used for a 1Gb port. -The default is 2 or the number -of CPU cores in the system, whichever is less. -.It Va hw.cxgbe.holdoff_timer_idx_10G -.It Va hw.cxgbe.holdoff_timer_idx_1G +.It Va hw.cxgbe.holdoff_timer_idx Timer index value used to delay interrupts. The holdoff timer list has the values 1, 5, 10, 50, 100, and 200 by default (all values are in microseconds) and the index selects a @@ -197,8 +188,7 @@ value from this list. The default value is 1 which means the timer value is 5us. Different interfaces can be assigned different values at any time via the dev..X.holdoff_tmr_idx sysctl. -.It Va hw.cxgbe.holdoff_pktc_idx_10G -.It Va hw.cxgbe.holdoff_pktc_idx_1G +.It Va hw.cxgbe.holdoff_pktc_idx Packet-count index value used to delay interrupts. The packet-count list has the values 1, 8, 16, and 32 by default, and the index selects a value from this list. Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Wed Nov 15 23:29:32 2017 (r325879) +++ head/sys/dev/cxgbe/adapter.h Wed Nov 15 23:48:02 2017 (r325880) @@ -1114,15 +1114,11 @@ t4_use_ldst(struct adapter *sc) } /* t4_main.c */ -extern int t4_ntxq10g; -extern int t4_nrxq10g; -extern int t4_ntxq1g; -extern int t4_nrxq1g; +extern int t4_ntxq; +extern int t4_nrxq; extern int t4_intr_types; -extern int t4_tmr_idx_10g; -extern int t4_pktc_idx_10g; -extern int t4_tmr_idx_1g; -extern int t4_pktc_idx_1g; +extern int t4_tmr_idx; +extern int t4_pktc_idx; extern unsigned int t4_qsize_rxq; extern unsigned int t4_qsize_txq; extern device_method_t cxgbe_methods[]; Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Wed Nov 15 23:29:32 2017 (r325879) +++ head/sys/dev/cxgbe/t4_main.c Wed Nov 15 23:48:02 2017 (r325880) @@ -241,24 +241,18 @@ SLIST_HEAD(, uld_info) t4_uld_list; */ /* - * Number of queues for tx and rx, 10G and 1G, NIC and offload. + * Number of queues for tx and rx, NIC and offload. */ -#define NTXQ_10G 16 -int t4_ntxq10g = -NTXQ_10G; -TUNABLE_INT("hw.cxgbe.ntxq10g", &t4_ntxq10g); +#define NTXQ 16 +int t4_ntxq = -NTXQ; +TUNABLE_INT("hw.cxgbe.ntxq", &t4_ntxq); +TUNABLE_INT("hw.cxgbe.ntxq10g", &t4_ntxq); /* Old name, undocumented */ -#define NRXQ_10G 8 -int t4_nrxq10g = -NRXQ_10G; -TUNABLE_INT("hw.cxgbe.nrxq10g", &t4_nrxq10g); +#define NRXQ 8 +int t4_nrxq = -NRXQ; +TUNABLE_INT("hw.cxgbe.nrxq", &t4_nrxq); +TUNABLE_INT("hw.cxgbe.nrxq10g", &t4_nrxq); /* Old name, undocumented */ -#define NTXQ_1G 4 -int t4_ntxq1g = -NTXQ_1G; -TUNABLE_INT("hw.cxgbe.ntxq1g", &t4_ntxq1g); - -#define NRXQ_1G 2 -int t4_nrxq1g = -NRXQ_1G; -TUNABLE_INT("hw.cxgbe.nrxq1g", &t4_nrxq1g); - #define NTXQ_VI 1 static int t4_ntxq_vi = -NTXQ_VI; TUNABLE_INT("hw.cxgbe.ntxq_vi", &t4_ntxq_vi); @@ -271,22 +265,14 @@ static int t4_rsrv_noflowq = 0; TUNABLE_INT("hw.cxgbe.rsrv_noflowq", &t4_rsrv_noflowq); #ifdef TCP_OFFLOAD -#define NOFLDTXQ_10G 8 -static int t4_nofldtxq10g = -NOFLDTXQ_10G; -TUNABLE_INT("hw.cxgbe.nofldtxq10g", &t4_nofldtxq10g); +#define NOFLDTXQ 8 +static int t4_nofldtxq = -NOFLDTXQ; +TUNABLE_INT("hw.cxgbe.nofldtxq", &t4_nofldtxq); -#define NOFLDRXQ_10G 2 -static int t4_nofldrxq10g = -NOFLDRXQ_10G; -TUNABLE_INT("hw.cxgbe.nofldrxq10g", &t4_nofldrxq10g); +#define NOFLDRXQ 2 +static int t4_nofldrxq = -NOFLDRXQ; +TUNABLE_INT("hw.cxgbe.nofldrxq", &t4_nofldrxq); -#define NOFLDTXQ_1G 2 -static int t4_nofldtxq1g = -NOFLDTXQ_1G; -TUNABLE_INT("hw.cxgbe.nofldtxq1g", &t4_nofldtxq1g); - -#define NOFLDRXQ_1G 1 -static int t4_nofldrxq1g = -NOFLDRXQ_1G; -TUNABLE_INT("hw.cxgbe.nofldrxq1g", &t4_nofldrxq1g); - #define NOFLDTXQ_VI 1 static int t4_nofldtxq_vi = -NOFLDTXQ_VI; TUNABLE_INT("hw.cxgbe.nofldtxq_vi", &t4_nofldtxq_vi); @@ -360,24 +346,16 @@ TUNABLE_INT("hw.cxgbe.nnmrxq_vi", &t4_nnmrxq_vi); #endif /* - * Holdoff parameters for 10G and 1G ports. + * Holdoff parameters for ports. */ -#define TMR_IDX_10G 1 -int t4_tmr_idx_10g = TMR_IDX_10G; -TUNABLE_INT("hw.cxgbe.holdoff_timer_idx_10G", &t4_tmr_idx_10g); +#define TMR_IDX 1 +int t4_tmr_idx = TMR_IDX; +TUNABLE_INT("hw.cxgbe.holdoff_timer_idx", &t4_tmr_idx); -#define PKTC_IDX_10G (-1) -int t4_pktc_idx_10g = PKTC_IDX_10G; -TUNABLE_INT("hw.cxgbe.holdoff_pktc_idx_10G", &t4_pktc_idx_10g); +#define PKTC_IDX (-1) +int t4_pktc_idx = PKTC_IDX; +TUNABLE_INT("hw.cxgbe.holdoff_pktc_idx", &t4_pktc_idx); -#define TMR_IDX_1G 1 -int t4_tmr_idx_1g = TMR_IDX_1G; -TUNABLE_INT("hw.cxgbe.holdoff_timer_idx_1G", &t4_tmr_idx_1g); - -#define PKTC_IDX_1G (-1) -int t4_pktc_idx_1g = PKTC_IDX_1G; -TUNABLE_INT("hw.cxgbe.holdoff_pktc_idx_1G", &t4_pktc_idx_1g); - /* * Size (# of entries) of each tx and rx queue. */ @@ -489,17 +467,12 @@ static int vi_mac_funcs[] = { struct intrs_and_queues { uint16_t intr_type; /* INTx, MSI, or MSI-X */ uint16_t nirq; /* Total # of vectors */ - uint16_t intr_flags_10g;/* Interrupt flags for each 10G port */ - uint16_t intr_flags_1g; /* Interrupt flags for each 1G port */ - uint16_t ntxq10g; /* # of NIC txq's for each 10G port */ - uint16_t nrxq10g; /* # of NIC rxq's for each 10G port */ - uint16_t ntxq1g; /* # of NIC txq's for each 1G port */ - uint16_t nrxq1g; /* # of NIC rxq's for each 1G port */ + uint16_t intr_flags; /* Interrupt flags for each port */ + uint16_t ntxq; /* # of NIC txq's for each port */ + uint16_t nrxq; /* # of NIC rxq's for each port */ uint16_t rsrv_noflowq; /* Flag whether to reserve queue 0 */ - uint16_t nofldtxq10g; /* # of TOE txq's for each 10G port */ - uint16_t nofldrxq10g; /* # of TOE rxq's for each 10G port */ - uint16_t nofldtxq1g; /* # of TOE txq's for each 1G port */ - uint16_t nofldrxq1g; /* # of TOE rxq's for each 1G port */ + uint16_t nofldtxq; /* # of TOE txq's for each port */ + uint16_t nofldrxq; /* # of TOE rxq's for each port */ /* The vcxgbe/vcxl interfaces use these and not the ones above. */ uint16_t ntxq_vi; /* # of NIC txq's */ @@ -532,7 +505,7 @@ static int fwmtype_to_hwmtype(int); static int validate_mt_off_len(struct adapter *, int, uint32_t, int, uint32_t *); static int fixup_devlog_params(struct adapter *); -static int cfg_itype_and_nqueues(struct adapter *, int, int, int, +static int cfg_itype_and_nqueues(struct adapter *, int, int, struct intrs_and_queues *); static int prep_firmware(struct adapter *); static int partition_resources(struct adapter *, const struct firmware *, @@ -857,7 +830,7 @@ static int t4_attach(device_t dev) { struct adapter *sc; - int rc = 0, i, j, n10g, n1g, rqidx, tqidx; + int rc = 0, i, j, rqidx, tqidx, nports; struct make_dev_args mda; struct intrs_and_queues iaq; struct sge *s; @@ -1011,11 +984,8 @@ t4_attach(device_t dev) /* * First pass over all the ports - allocate VIs and initialize some - * basic parameters like mac address, port type, etc. We also figure - * out whether a port is 10G or 1G and use that information when - * calculating how many interrupts to attempt to allocate. + * basic parameters like mac address, port type, etc. */ - n10g = n1g = 0; for_each_port(sc, i) { struct port_info *pi; @@ -1051,12 +1021,6 @@ t4_attach(device_t dev) mtx_init(&pi->pi_lock, pi->lockname, 0, MTX_DEF); sc->chan_map[pi->tx_chan] = i; - if (port_top_speed(pi) >= 10) { - n10g++; - } else { - n1g++; - } - /* All VIs on this port share this media. */ ifmedia_init(&pi->media, IFM_IMASK, cxgbe_media_change, cxgbe_media_status); @@ -1075,7 +1039,8 @@ t4_attach(device_t dev) /* * Interrupt type, # of interrupts, # of rx/tx queues, etc. */ - rc = cfg_itype_and_nqueues(sc, n10g, n1g, num_vis, &iaq); + nports = sc->params.nports; + rc = cfg_itype_and_nqueues(sc, nports, num_vis, &iaq); if (rc != 0) goto done; /* error message displayed already */ if (iaq.nrxq_vi + iaq.nofldrxq_vi + iaq.nnmrxq_vi == 0) @@ -1085,24 +1050,22 @@ t4_attach(device_t dev) sc->intr_count = iaq.nirq; s = &sc->sge; - s->nrxq = n10g * iaq.nrxq10g + n1g * iaq.nrxq1g; - s->ntxq = n10g * iaq.ntxq10g + n1g * iaq.ntxq1g; + s->nrxq = nports * iaq.nrxq; + s->ntxq = nports * iaq.ntxq; if (num_vis > 1) { - s->nrxq += (n10g + n1g) * (num_vis - 1) * iaq.nrxq_vi; - s->ntxq += (n10g + n1g) * (num_vis - 1) * iaq.ntxq_vi; + s->nrxq += nports * (num_vis - 1) * iaq.nrxq_vi; + s->ntxq += nports * (num_vis - 1) * iaq.ntxq_vi; } s->neq = s->ntxq + s->nrxq; /* the free list in an rxq is an eq */ - s->neq += sc->params.nports + 1;/* ctrl queues: 1 per port + 1 mgmt */ + s->neq += nports + 1;/* ctrl queues: 1 per port + 1 mgmt */ s->niq = s->nrxq + 1; /* 1 extra for firmware event queue */ #ifdef TCP_OFFLOAD if (is_offload(sc)) { - s->nofldrxq = n10g * iaq.nofldrxq10g + n1g * iaq.nofldrxq1g; - s->nofldtxq = n10g * iaq.nofldtxq10g + n1g * iaq.nofldtxq1g; + s->nofldrxq = nports * iaq.nofldrxq; + s->nofldtxq = nports * iaq.nofldtxq; if (num_vis > 1) { - s->nofldrxq += (n10g + n1g) * (num_vis - 1) * - iaq.nofldrxq_vi; - s->nofldtxq += (n10g + n1g) * (num_vis - 1) * - iaq.nofldtxq_vi; + s->nofldrxq += nports * (num_vis - 1) * iaq.nofldrxq_vi; + s->nofldtxq += nports * (num_vis - 1) * iaq.nofldtxq_vi; } s->neq += s->nofldtxq + s->nofldrxq; s->niq += s->nofldrxq; @@ -1115,8 +1078,8 @@ t4_attach(device_t dev) #endif #ifdef DEV_NETMAP if (num_vis > 1) { - s->nnmrxq = (n10g + n1g) * (num_vis - 1) * iaq.nnmrxq_vi; - s->nnmtxq = (n10g + n1g) * (num_vis - 1) * iaq.nnmtxq_vi; + s->nnmrxq = nports * (num_vis - 1) * iaq.nnmrxq_vi; + s->nnmtxq = nports * (num_vis - 1) * iaq.nnmtxq_vi; } s->neq += s->nnmtxq + s->nnmrxq; s->niq += s->nnmrxq; @@ -1127,7 +1090,7 @@ t4_attach(device_t dev) M_CXGBE, M_ZERO | M_WAITOK); #endif - s->ctrlq = malloc(sc->params.nports * sizeof(struct sge_wrq), M_CXGBE, + s->ctrlq = malloc(nports * sizeof(struct sge_wrq), M_CXGBE, M_ZERO | M_WAITOK); s->rxq = malloc(s->nrxq * sizeof(struct sge_rxq), M_CXGBE, M_ZERO | M_WAITOK); @@ -1170,19 +1133,12 @@ t4_attach(device_t dev) vi->first_rxq = rqidx; vi->first_txq = tqidx; - if (port_top_speed(pi) >= 10) { - vi->tmr_idx = t4_tmr_idx_10g; - vi->pktc_idx = t4_pktc_idx_10g; - vi->flags |= iaq.intr_flags_10g & INTR_RXQ; - vi->nrxq = j == 0 ? iaq.nrxq10g : iaq.nrxq_vi; - vi->ntxq = j == 0 ? iaq.ntxq10g : iaq.ntxq_vi; - } else { - vi->tmr_idx = t4_tmr_idx_1g; - vi->pktc_idx = t4_pktc_idx_1g; - vi->flags |= iaq.intr_flags_1g & INTR_RXQ; - vi->nrxq = j == 0 ? iaq.nrxq1g : iaq.nrxq_vi; - vi->ntxq = j == 0 ? iaq.ntxq1g : iaq.ntxq_vi; - } + vi->tmr_idx = t4_tmr_idx; + vi->pktc_idx = t4_pktc_idx; + vi->flags |= iaq.intr_flags & INTR_RXQ; + vi->nrxq = j == 0 ? iaq.nrxq : iaq.nrxq_vi; + vi->ntxq = j == 0 ? iaq.ntxq : iaq.ntxq_vi; + rqidx += vi->nrxq; tqidx += vi->ntxq; @@ -1196,19 +1152,10 @@ t4_attach(device_t dev) vi->ofld_pktc_idx = t4_pktc_idx_ofld; vi->first_ofld_rxq = ofld_rqidx; vi->first_ofld_txq = ofld_tqidx; - if (port_top_speed(pi) >= 10) { - vi->flags |= iaq.intr_flags_10g & INTR_OFLD_RXQ; - vi->nofldrxq = j == 0 ? iaq.nofldrxq10g : - iaq.nofldrxq_vi; - vi->nofldtxq = j == 0 ? iaq.nofldtxq10g : - iaq.nofldtxq_vi; - } else { - vi->flags |= iaq.intr_flags_1g & INTR_OFLD_RXQ; - vi->nofldrxq = j == 0 ? iaq.nofldrxq1g : - iaq.nofldrxq_vi; - vi->nofldtxq = j == 0 ? iaq.nofldtxq1g : - iaq.nofldtxq_vi; - } + vi->flags |= iaq.intr_flags & INTR_OFLD_RXQ; + vi->nofldrxq = j == 0 ? iaq.nofldrxq : iaq.nofldrxq_vi; + vi->nofldtxq = j == 0 ? iaq.nofldtxq : iaq.nofldtxq_vi; + ofld_rqidx += vi->nofldrxq; ofld_tqidx += vi->nofldtxq; #endif @@ -2715,28 +2662,25 @@ fixup_devlog_params(struct adapter *sc) } static int -cfg_itype_and_nqueues(struct adapter *sc, int n10g, int n1g, int num_vis, +cfg_itype_and_nqueues(struct adapter *sc, int nports, int num_vis, struct intrs_and_queues *iaq) { - int rc, itype, navail, nrxq10g, nrxq1g, n; - int nofldrxq10g = 0, nofldrxq1g = 0; + int rc, itype, navail, nrxq, n; + int nofldrxq = 0; - bzero(iaq, sizeof(*iaq)); + MPASS(nports > 0); - iaq->ntxq10g = t4_ntxq10g; - iaq->ntxq1g = t4_ntxq1g; + bzero(iaq, sizeof(*iaq)); + iaq->ntxq = t4_ntxq; iaq->ntxq_vi = t4_ntxq_vi; - iaq->nrxq10g = nrxq10g = t4_nrxq10g; - iaq->nrxq1g = nrxq1g = t4_nrxq1g; + iaq->nrxq = nrxq = t4_nrxq; iaq->nrxq_vi = t4_nrxq_vi; iaq->rsrv_noflowq = t4_rsrv_noflowq; #ifdef TCP_OFFLOAD if (is_offload(sc)) { - iaq->nofldtxq10g = t4_nofldtxq10g; - iaq->nofldtxq1g = t4_nofldtxq1g; + iaq->nofldtxq = t4_nofldtxq; iaq->nofldtxq_vi = t4_nofldtxq_vi; - iaq->nofldrxq10g = nofldrxq10g = t4_nofldrxq10g; - iaq->nofldrxq1g = nofldrxq1g = t4_nofldrxq1g; + iaq->nofldrxq = nofldrxq = t4_nofldrxq; iaq->nofldrxq_vi = t4_nofldrxq_vi; } #endif @@ -2761,8 +2705,7 @@ restart: continue; iaq->intr_type = itype; - iaq->intr_flags_10g = 0; - iaq->intr_flags_1g = 0; + iaq->intr_flags = 0; /* * Best option: an interrupt vector for errors, one for the @@ -2772,15 +2715,13 @@ restart: * because only one set of queues is active at a time. */ iaq->nirq = T4_EXTRA_INTR; - iaq->nirq += n10g * (nrxq10g + nofldrxq10g); - iaq->nirq += n1g * (nrxq1g + nofldrxq1g); - iaq->nirq += (n10g + n1g) * (num_vis - 1) * + iaq->nirq += nports * (nrxq + nofldrxq); + iaq->nirq += nports * (num_vis - 1) * max(iaq->nrxq_vi, iaq->nnmrxq_vi); /* See comment above. */ - iaq->nirq += (n10g + n1g) * (num_vis - 1) * iaq->nofldrxq_vi; + iaq->nirq += nports * (num_vis - 1) * iaq->nofldrxq_vi; if (iaq->nirq <= navail && (itype != INTR_MSI || powerof2(iaq->nirq))) { - iaq->intr_flags_10g = INTR_ALL; - iaq->intr_flags_1g = INTR_ALL; + iaq->intr_flags = INTR_ALL; goto allocate; } @@ -2788,13 +2729,11 @@ restart: if (num_vis > 1) { device_printf(sc->dev, "virtual interfaces disabled " "because num_vis=%u with current settings " - "(nrxq10g=%u, nrxq1g=%u, nofldrxq10g=%u, " - "nofldrxq1g=%u, nrxq_vi=%u nofldrxq_vi=%u, " + "(nrxq=%u, nofldrxq=%u, nrxq_vi=%u nofldrxq_vi=%u, " "nnmrxq_vi=%u) would need %u interrupts but " - "only %u are available.\n", num_vis, nrxq10g, - nrxq1g, nofldrxq10g, nofldrxq1g, iaq->nrxq_vi, - iaq->nofldrxq_vi, iaq->nnmrxq_vi, iaq->nirq, - navail); + "only %u are available.\n", num_vis, nrxq, + nofldrxq, iaq->nrxq_vi, iaq->nofldrxq_vi, + iaq->nnmrxq_vi, iaq->nirq, navail); num_vis = 1; iaq->ntxq_vi = iaq->nrxq_vi = 0; iaq->nofldtxq_vi = iaq->nofldrxq_vi = 0; @@ -2809,20 +2748,13 @@ restart: * will forward their interrupts to those that do. */ iaq->nirq = T4_EXTRA_INTR; - if (nrxq10g >= nofldrxq10g) { - iaq->intr_flags_10g = INTR_RXQ; - iaq->nirq += n10g * nrxq10g; + if (nrxq >= nofldrxq) { + iaq->intr_flags = INTR_RXQ; + iaq->nirq += nports * nrxq; } else { - iaq->intr_flags_10g = INTR_OFLD_RXQ; - iaq->nirq += n10g * nofldrxq10g; + iaq->intr_flags = INTR_OFLD_RXQ; + iaq->nirq += nports * nofldrxq; } - if (nrxq1g >= nofldrxq1g) { - iaq->intr_flags_1g = INTR_RXQ; - iaq->nirq += n1g * nrxq1g; - } else { - iaq->intr_flags_1g = INTR_OFLD_RXQ; - iaq->nirq += n1g * nofldrxq1g; - } if (iaq->nirq <= navail && (itype != INTR_MSI || powerof2(iaq->nirq))) goto allocate; @@ -2834,45 +2766,24 @@ restart: * fit what's available to us. */ iaq->nirq = T4_EXTRA_INTR; - iaq->nirq += n10g + n1g; + iaq->nirq += nports; if (iaq->nirq <= navail) { int leftover = navail - iaq->nirq; + int target = max(nrxq, nofldrxq); - if (n10g > 0) { - int target = max(nrxq10g, nofldrxq10g); + iaq->intr_flags = nrxq >= nofldrxq ? + INTR_RXQ : INTR_OFLD_RXQ; - iaq->intr_flags_10g = nrxq10g >= nofldrxq10g ? - INTR_RXQ : INTR_OFLD_RXQ; - - n = 1; - while (n < target && leftover >= n10g) { - leftover -= n10g; - iaq->nirq += n10g; - n++; - } - iaq->nrxq10g = min(n, nrxq10g); -#ifdef TCP_OFFLOAD - iaq->nofldrxq10g = min(n, nofldrxq10g); -#endif + n = 1; + while (n < target && leftover >= nports) { + leftover -= nports; + iaq->nirq += nports; + n++; } - - if (n1g > 0) { - int target = max(nrxq1g, nofldrxq1g); - - iaq->intr_flags_1g = nrxq1g >= nofldrxq1g ? - INTR_RXQ : INTR_OFLD_RXQ; - - n = 1; - while (n < target && leftover >= n1g) { - leftover -= n1g; - iaq->nirq += n1g; - n++; - } - iaq->nrxq1g = min(n, nrxq1g); + iaq->nrxq = min(n, nrxq); #ifdef TCP_OFFLOAD - iaq->nofldrxq1g = min(n, nofldrxq1g); + iaq->nofldrxq = min(n, nofldrxq); #endif - } if (itype != INTR_MSI || powerof2(iaq->nirq)) goto allocate; @@ -2881,11 +2792,11 @@ restart: /* * Least desirable option: one interrupt vector for everything. */ - iaq->nirq = iaq->nrxq10g = iaq->nrxq1g = 1; - iaq->intr_flags_10g = iaq->intr_flags_1g = 0; + iaq->nirq = iaq->nrxq = 1; + iaq->intr_flags = 0; #ifdef TCP_OFFLOAD if (is_offload(sc)) - iaq->nofldrxq10g = iaq->nofldrxq1g = 1; + iaq->nofldrxq = 1; #endif allocate: navail = iaq->nirq; @@ -9941,50 +9852,30 @@ tweak_tunables(void) { int nc = mp_ncpus; /* our snapshot of the number of CPUs */ - if (t4_ntxq10g < 1) { + if (t4_ntxq < 1) { #ifdef RSS - t4_ntxq10g = rss_getnumbuckets(); + t4_ntxq = rss_getnumbuckets(); #else - calculate_nqueues(&t4_ntxq10g, nc, NTXQ_10G); + calculate_nqueues(&t4_ntxq, nc, NTXQ); #endif } - if (t4_ntxq1g < 1) { -#ifdef RSS - /* XXX: way too many for 1GbE? */ - t4_ntxq1g = rss_getnumbuckets(); -#else - calculate_nqueues(&t4_ntxq1g, nc, NTXQ_1G); -#endif - } - calculate_nqueues(&t4_ntxq_vi, nc, NTXQ_VI); - if (t4_nrxq10g < 1) { + if (t4_nrxq < 1) { #ifdef RSS - t4_nrxq10g = rss_getnumbuckets(); + t4_nrxq = rss_getnumbuckets(); #else - calculate_nqueues(&t4_nrxq10g, nc, NRXQ_10G); + calculate_nqueues(&t4_nrxq, nc, NRXQ); #endif } - if (t4_nrxq1g < 1) { -#ifdef RSS - /* XXX: way too many for 1GbE? */ - t4_nrxq1g = rss_getnumbuckets(); -#else - calculate_nqueues(&t4_nrxq1g, nc, NRXQ_1G); -#endif - } - calculate_nqueues(&t4_nrxq_vi, nc, NRXQ_VI); #ifdef TCP_OFFLOAD - calculate_nqueues(&t4_nofldtxq10g, nc, NOFLDTXQ_10G); - calculate_nqueues(&t4_nofldtxq1g, nc, NOFLDTXQ_1G); + calculate_nqueues(&t4_nofldtxq, nc, NOFLDTXQ); calculate_nqueues(&t4_nofldtxq_vi, nc, NOFLDTXQ_VI); - calculate_nqueues(&t4_nofldrxq10g, nc, NOFLDRXQ_10G); - calculate_nqueues(&t4_nofldrxq1g, nc, NOFLDRXQ_1G); + calculate_nqueues(&t4_nofldrxq, nc, NOFLDRXQ); calculate_nqueues(&t4_nofldrxq_vi, nc, NOFLDRXQ_VI); if (t4_toecaps_allowed == -1) @@ -10022,17 +9913,11 @@ tweak_tunables(void) calculate_nqueues(&t4_nnmrxq_vi, nc, NNMRXQ_VI); #endif - if (t4_tmr_idx_10g < 0 || t4_tmr_idx_10g >= SGE_NTIMERS) - t4_tmr_idx_10g = TMR_IDX_10G; + if (t4_tmr_idx < 0 || t4_tmr_idx >= SGE_NTIMERS) + t4_tmr_idx = TMR_IDX; - if (t4_pktc_idx_10g < -1 || t4_pktc_idx_10g >= SGE_NCOUNTERS) - t4_pktc_idx_10g = PKTC_IDX_10G; - - if (t4_tmr_idx_1g < 0 || t4_tmr_idx_1g >= SGE_NTIMERS) - t4_tmr_idx_1g = TMR_IDX_1G; - - if (t4_pktc_idx_1g < -1 || t4_pktc_idx_1g >= SGE_NCOUNTERS) - t4_pktc_idx_1g = PKTC_IDX_1G; + if (t4_pktc_idx < -1 || t4_pktc_idx >= SGE_NCOUNTERS) + t4_pktc_idx = PKTC_IDX; if (t4_qsize_txq < 128) t4_qsize_txq = 128; Modified: head/sys/dev/cxgbe/t4_vf.c ============================================================================== --- head/sys/dev/cxgbe/t4_vf.c Wed Nov 15 23:29:32 2017 (r325879) +++ head/sys/dev/cxgbe/t4_vf.c Wed Nov 15 23:48:02 2017 (r325880) @@ -62,12 +62,9 @@ __FBSDID("$FreeBSD$"); struct intrs_and_queues { uint16_t intr_type; /* MSI, or MSI-X */ uint16_t nirq; /* Total # of vectors */ - uint16_t intr_flags_10g;/* Interrupt flags for each 10G port */ - uint16_t intr_flags_1g; /* Interrupt flags for each 1G port */ - uint16_t ntxq10g; /* # of NIC txq's for each 10G port */ - uint16_t nrxq10g; /* # of NIC rxq's for each 10G port */ - uint16_t ntxq1g; /* # of NIC txq's for each 1G port */ - uint16_t nrxq1g; /* # of NIC rxq's for each 1G port */ + uint16_t intr_flags; /* Interrupt flags for each port */ + uint16_t ntxq; /* # of NIC txq's for each port */ + uint16_t nrxq; /* # of NIC rxq's for each port */ }; struct { @@ -306,12 +303,10 @@ set_params__post_init(struct adapter *sc) #undef FW_PARAM_DEV static int -cfg_itype_and_nqueues(struct adapter *sc, int n10g, int n1g, - struct intrs_and_queues *iaq) +cfg_itype_and_nqueues(struct adapter *sc, struct intrs_and_queues *iaq) { struct vf_resources *vfres; - int nrxq10g, nrxq1g, nrxq; - int ntxq10g, ntxq1g, ntxq; + int nrxq, ntxq, nports; int itype, iq_avail, navail, rc; /* @@ -319,6 +314,7 @@ cfg_itype_and_nqueues(struct adapter *sc, int n10g, in * we can allocate enough interrupts for our layout. */ vfres = &sc->params.vfres; + nports = sc->params.nports; bzero(iaq, sizeof(*iaq)); for (itype = INTR_MSIX; itype != 0; itype >>= 1) { @@ -334,8 +330,7 @@ cfg_itype_and_nqueues(struct adapter *sc, int n10g, in continue; iaq->intr_type = itype; - iaq->intr_flags_10g = 0; - iaq->intr_flags_1g = 0; + iaq->intr_flags = 0; /* * XXX: The Linux driver reserves an Ingress Queue for @@ -358,10 +353,10 @@ cfg_itype_and_nqueues(struct adapter *sc, int n10g, in * limit on ingress queues. */ iq_avail = vfres->niqflint - iaq->nirq; - if (iq_avail < n10g + n1g) { + if (iq_avail < nports) { device_printf(sc->dev, "Not enough ingress queues (%d) for %d ports\n", - vfres->niqflint, n10g + n1g); + vfres->niqflint, nports); return (ENXIO); } @@ -371,26 +366,17 @@ cfg_itype_and_nqueues(struct adapter *sc, int n10g, in * port, then don't bother, we will just forward all * interrupts to one interrupt in that case. */ - if (iaq->nirq + n10g + n1g <= navail) { + if (iaq->nirq + nports <= navail) { if (iq_avail > navail - iaq->nirq) iq_avail = navail - iaq->nirq; } - nrxq10g = t4_nrxq10g; - nrxq1g = t4_nrxq1g; - nrxq = n10g * nrxq10g + n1g * nrxq1g; - if (nrxq > iq_avail && nrxq1g > 1) { - /* Too many ingress queues. Try just 1 for 1G. */ - nrxq1g = 1; - nrxq = n10g * nrxq10g + n1g * nrxq1g; - } + nrxq = nports * t4_nrxq; if (nrxq > iq_avail) { /* - * Still too many ingress queues. Use what we - * can for each 10G port. + * Too many ingress queues. Use what we can. */ - nrxq10g = (iq_avail - n1g) / n10g; - nrxq = n10g * nrxq10g + n1g * nrxq1g; + nrxq = (iq_avail / nports) * nports; } KASSERT(nrxq <= iq_avail, ("too many ingress queues")); @@ -398,45 +384,34 @@ cfg_itype_and_nqueues(struct adapter *sc, int n10g, in * Next, determine the upper bound on txqs from the limit * on ETH queues. */ - if (vfres->nethctrl < n10g + n1g) { + if (vfres->nethctrl < nports) { device_printf(sc->dev, "Not enough ETH queues (%d) for %d ports\n", - vfres->nethctrl, n10g + n1g); + vfres->nethctrl, nports); return (ENXIO); } - ntxq10g = t4_ntxq10g; - ntxq1g = t4_ntxq1g; - ntxq = n10g * ntxq10g + n1g * ntxq1g; + ntxq = nports * t4_ntxq; if (ntxq > vfres->nethctrl) { - /* Too many ETH queues. Try just 1 for 1G. */ - ntxq1g = 1; - ntxq = n10g * ntxq10g + n1g * ntxq1g; - } - if (ntxq > vfres->nethctrl) { /* - * Still too many ETH queues. Use what we - * can for each 10G port. + * Too many ETH queues. Use what we can. */ - ntxq10g = (vfres->nethctrl - n1g) / n10g; - ntxq = n10g * ntxq10g + n1g * ntxq1g; + ntxq = (vfres->nethctrl / nports) * nports; } KASSERT(ntxq <= vfres->nethctrl, ("too many ETH queues")); /* * Finally, ensure we have enough egress queues. */ - if (vfres->neq < (n10g + n1g) * 2) { + if (vfres->neq < nports * 2) { device_printf(sc->dev, "Not enough egress queues (%d) for %d ports\n", - vfres->neq, n10g + n1g); + vfres->neq, nports); return (ENXIO); } if (nrxq + ntxq > vfres->neq) { /* Just punt and use 1 for everything. */ - nrxq1g = ntxq1g = nrxq10g = ntxq10g = 1; - nrxq = n10g * nrxq10g + n1g * nrxq1g; - ntxq = n10g * ntxq10g + n1g * ntxq1g; + nrxq = ntxq = nports; } KASSERT(nrxq <= iq_avail, ("too many ingress queues")); KASSERT(ntxq <= vfres->nethctrl, ("too many ETH queues")); @@ -447,10 +422,8 @@ cfg_itype_and_nqueues(struct adapter *sc, int n10g, in * have to be a power of 2 as well. */ iaq->nirq += nrxq; - iaq->ntxq10g = ntxq10g; - iaq->ntxq1g = ntxq1g; - iaq->nrxq10g = nrxq10g; - iaq->nrxq1g = nrxq1g; + iaq->ntxq = ntxq; + iaq->nrxq = nrxq; if (iaq->nirq <= navail && (itype != INTR_MSI || powerof2(iaq->nirq))) { navail = iaq->nirq; @@ -465,8 +438,7 @@ cfg_itype_and_nqueues(struct adapter *sc, int n10g, in return (rc); } if (navail == iaq->nirq) { - iaq->intr_flags_10g = INTR_RXQ; - iaq->intr_flags_1g = INTR_RXQ; + iaq->intr_flags = INTR_RXQ; return (0); } pci_release_msi(sc->dev); @@ -483,8 +455,7 @@ cfg_itype_and_nqueues(struct adapter *sc, int n10g, in device_printf(sc->dev, "failed to allocate vectors:%d, type=%d, req=%d, rcvd=%d\n", itype, rc, iaq->nirq, navail); - iaq->intr_flags_10g = 0; - iaq->intr_flags_1g = 0; + iaq->intr_flags = 0; return (rc); } @@ -500,7 +471,7 @@ static int t4vf_attach(device_t dev) { struct adapter *sc; - int rc = 0, i, j, n10g, n1g, rqidx, tqidx; + int rc = 0, i, j, rqidx, tqidx; struct make_dev_args mda; struct intrs_and_queues iaq; struct sge *s; @@ -634,11 +605,8 @@ t4vf_attach(device_t dev) /* * First pass over all the ports - allocate VIs and initialize some - * basic parameters like mac address, port type, etc. We also figure - * out whether a port is 10G or 1G and use that information when - * calculating how many interrupts to attempt to allocate. + * basic parameters like mac address, port type, etc. */ - n10g = n1g = 0; for_each_port(sc, i) { struct port_info *pi; @@ -673,12 +641,6 @@ t4vf_attach(device_t dev) mtx_init(&pi->pi_lock, pi->lockname, 0, MTX_DEF); sc->chan_map[pi->tx_chan] = i; - if (port_top_speed(pi) >= 10) { - n10g++; - } else { - n1g++; - } - pi->dev = device_add_child(dev, sc->names->vf_ifnet_name, -1); if (pi->dev == NULL) { device_printf(dev, @@ -693,7 +655,7 @@ t4vf_attach(device_t dev) /* * Interrupt type, # of interrupts, # of rx/tx queues, etc. */ - rc = cfg_itype_and_nqueues(sc, n10g, n1g, &iaq); + rc = cfg_itype_and_nqueues(sc, &iaq); if (rc != 0) goto done; /* error message displayed already */ @@ -701,8 +663,8 @@ t4vf_attach(device_t dev) sc->intr_count = iaq.nirq; s = &sc->sge; - s->nrxq = n10g * iaq.nrxq10g + n1g * iaq.nrxq1g; - s->ntxq = n10g * iaq.ntxq10g + n1g * iaq.ntxq1g; + s->nrxq = sc->params.nports * iaq.nrxq; + s->ntxq = sc->params.nports * iaq.ntxq; s->neq = s->ntxq + s->nrxq; /* the free list in an rxq is an eq */ s->neq += sc->params.nports + 1;/* ctrl queues: 1 per port + 1 mgmt */ s->niq = s->nrxq + 1; /* 1 extra for firmware event queue */ @@ -738,19 +700,12 @@ t4vf_attach(device_t dev) vi->first_rxq = rqidx; vi->first_txq = tqidx; - if (port_top_speed(pi) >= 10) { - vi->tmr_idx = t4_tmr_idx_10g; - vi->pktc_idx = t4_pktc_idx_10g; - vi->flags |= iaq.intr_flags_10g & INTR_RXQ; - vi->nrxq = j == 0 ? iaq.nrxq10g : 1; - vi->ntxq = j == 0 ? iaq.ntxq10g : 1; - } else { - vi->tmr_idx = t4_tmr_idx_1g; - vi->pktc_idx = t4_pktc_idx_1g; - vi->flags |= iaq.intr_flags_1g & INTR_RXQ; - vi->nrxq = j == 0 ? iaq.nrxq1g : 1; - vi->ntxq = j == 0 ? iaq.ntxq1g : 1; - } + vi->tmr_idx = t4_tmr_idx; + vi->pktc_idx = t4_pktc_idx; + vi->flags |= iaq.intr_flags & INTR_RXQ; + vi->nrxq = j == 0 ? iaq.nrxq: 1; + vi->ntxq = j == 0 ? iaq.ntxq: 1; + rqidx += vi->nrxq; tqidx += vi->ntxq; From owner-svn-src-head@freebsd.org Wed Nov 15 23:51:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51BC8DEED1D; Wed, 15 Nov 2017 23:51:18 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C1B4633C7; Wed, 15 Nov 2017 23:51:18 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAFNpH25038874; Wed, 15 Nov 2017 23:51:17 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAFNpHrG038873; Wed, 15 Nov 2017 23:51:17 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201711152351.vAFNpHrG038873@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 15 Nov 2017 23:51:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325881 - head/share/man/man7 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/share/man/man7 X-SVN-Commit-Revision: 325881 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 23:51:18 -0000 Author: imp Date: Wed Nov 15 23:51:17 2017 New Revision: 325881 URL: https://svnweb.freebsd.org/changeset/base/325881 Log: Fix some formatting issues, bump .Dd to today's date, don't use contractions, and make igor almost happy with this (two issues are false positives, and I'm not sure a synopsis makes sense). Sponsored by: Netflix Modified: head/share/man/man7/arch.7 Modified: head/share/man/man7/arch.7 ============================================================================== --- head/share/man/man7/arch.7 Wed Nov 15 23:48:02 2017 (r325880) +++ head/share/man/man7/arch.7 Wed Nov 15 23:51:17 2017 (r325881) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 16, 2017 +.Dd November 15, 2017 .Dt ARCH 7 .Os .Sh NAME @@ -68,7 +68,7 @@ and .Vt ptrdiff_t should be avoided. .Pp -On some architectures, e.g. +On some architectures, e.g., .Dv sparc64 , .Dv powerpc and AIM variants of @@ -367,7 +367,7 @@ It is often the same as just as one CPU architecture can be implemented by many different hardware platforms, one hardware platform may support multiple CPU architecture family members, though with different binaries. -For example, +For example, .Dv MACHINE of i386 supported the IBM-AT hardware platform while the .Dv MACHINE @@ -393,12 +393,12 @@ integers (endian). It may also encode a variation in the size of the integer or pointer. It may also encode a ISA revision. It may also encode hard versus soft floating point ABI and usage. -It may also encode a variant ABI when there other factors don't +It may also encode a variant ABI when there other factors do not uniquely define the ABI (eg, MIPS' n32 ABI). It, along with .Dv MACHINE, define the ABI used by the system. For example, the MIPS CPU processor family supports 9 different -combinations encoding pointer size, endian and hard vs soft float (for +combinations encoding pointer size, endian and hard versus soft float (for 8 combinations) as well as N32 (which only ever had one variation of all these). Generally, the plain CPU name specifies the most common (or at least @@ -429,15 +429,18 @@ framework). to build. It is used to optimize the build for a specific CPU / core that the binaries run on. -Generally, this doesn't change the ABI, though it can be a fine line +Generally, this does not change the ABI, though it can be a fine line between optimization for specific cases. -.It Dv TARGET Used to set Dv MACHINE in the top level Makefile for cross building. +.It Dv TARGET Used to set +.Dv MACHINE +in the top level Makefile for cross building. Unused outside of that scope. It is not passed down to the rest of the build. -Makefiles outside of the top level shouldn't use it at all (though +Makefiles outside of the top level should not use it at all (though some have their own private copy for hysterical raisons). .It Dv TARGET_ARCH Used to set -.Dv MACHINE_ARCH by the top level Makefile for cross building. +.Dv MACHINE_ARCH +by the top level Makefile for cross building. Like .Dv TARGET , it is unused outside of that scope. .El From owner-svn-src-head@freebsd.org Wed Nov 15 23:52:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5EEFEDEEEEC for ; Wed, 15 Nov 2017 23:52:40 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-136.reflexion.net [208.70.210.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 219A16372C for ; Wed, 15 Nov 2017 23:52:39 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 10194 invoked from network); 15 Nov 2017 23:52:33 -0000 Received: from unknown (HELO mail-cs-02.app.dca.reflexion.local) (10.81.19.2) by 0 (rfx-qmail) with SMTP; 15 Nov 2017 23:52:33 -0000 Received: by mail-cs-02.app.dca.reflexion.local (Reflexion email security v8.40.3) with SMTP; Wed, 15 Nov 2017 18:52:33 -0500 (EST) Received: (qmail 24745 invoked from network); 15 Nov 2017 23:52:33 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 15 Nov 2017 23:52:33 -0000 Received: from [192.168.1.25] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id F1E5CEC9518; Wed, 15 Nov 2017 15:52:32 -0800 (PST) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r325765 - head/lib/libc/string Message-Id: <37F2AD18-1B69-4559-8BD3-B92E01A067BF@dsl-only.net> Date: Wed, 15 Nov 2017 15:52:32 -0800 To: Bruce Evans , svn-src-head@freebsd.org X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 23:52:40 -0000 Bruce Evans brde at optusnet.com.au wrote on Tue Nov 14 12:41:50 UTC 2017 : > - memcpy.3. It was already documented in the BUGS section that = memcpy() is > implemented as bcopy() and therefore the "strings" "may overlap" = [then > portability considerations due to this]. This is buggier than = before: > - old bug: only the MI implementation of memcpy() clearly = implements > memcpy() as bcopy(). The amd64, i386 and arm MD implementations > do the same. head/sys/arm/arm/support.S ( -r283366 ) has 394 ENTRY(bcopy) 395 /* switch the source and destination registers */ 396 eor r0, r1, r0 397 eor r1, r0, r1 398 eor r0, r1, r0 399 EENTRY(memmove) 400 /* Do the buffers overlap? */ 401 cmp r0, r1 402 RETeq /* Bail now if src/dst are the same */ 403 subcc r3, r0, r1 /* if (dst > src) r3 =3D dst - = src */ 404 subcs r3, r1, r0 /* if (src > dsr) r3 =3D src - = dst */ 405 cmp r3, r2 /* if (r3 < len) we have an = overlap */ 406 bcc PIC_SYM(_C_LABEL(memcpy), PLT) . . . head/lib/libc/arm/string/memmove.S ( -r288373 ) has: 37 #ifndef _BCOPY 38 /* LINTSTUB: Func: void *memmove(void *, const void *, size_t) = */ 39 ENTRY(memmove) 40 #else 41 /* bcopy =3D memcpy/memmove with arguments reversed. */ 42 /* LINTSTUB: Func: void bcopy(void *, void *, size_t) */ 43 ENTRY(bcopy) 44 /* switch the source and destination registers */ 45 eor r0, r1, r0=20 46 eor r1, r0, r1=20 47 eor r0, r1, r0=20 48 #endif 49 /* Do the buffers overlap? */ 50 cmp r0, r1 51 it eq 52 RETeq /* Bail now if src/dst are the same */ 53 ite cc 54 subcc r3, r0, r1 /* if (dst > src) r3 =3D dst - = src */ 55 subcs r3, r1, r0 /* if (src > dsr) r3 =3D src - = dst */ 56 cmp r3, r2 /* if (r3 < len) we have an = overlap */ 57 bcc PIC_SYM(_C_LABEL(memcpy), PLT) . . . It looks to me like bcopy and memmove call memcpy under some conditions, not the other way around. I did not notice any code in memcpy going back to bcopy (or memmove) in either area. (That might have lead to recursion as things are.) Also netbsd "fixed" the above code for picking when to use memcpy a few years ago (without making the comments accurately track the details as I remember). By my understanding the new netbsd code was the correct variant but others commenting for bugzilla 217065 disagreed. (My comments for 217065 were clearly as I was figuring things out for unfamiliar material. So they are not simple/clean. But I still reach the same conclusions as I eventually did there.) Another issue is if compilers (clang, gcc) are well controlled for code substitutions to preserve supposed FreeBSD rules about where overlaps are well defined. The library code might not be all there is to it as far as behavior goes for compiled C/C++ source code. head/sys/arm64/arm64/ is similar for bcopy/memmove calling memcpy (but head/lib/libc/amd64/string/ is not): head/sys/arm64/arm64/memmove.S ( -r307909 ) has: 87 ENTRY(bcopy) 88 /* Switch the input pointers when called as bcopy */ 89 mov x3, x1 90 mov x1, x0 91 mov x0, x3 92 EENTRY(memmove) 93 sub tmp1, dstin, src 94 cmp count, 96 95 ccmp tmp1, count, 2, hi 96 b.hs memcpy . . . head/lib/libc/amd64/string/bcopy.S has: 44 #ifdef MEMCOPY 45 ENTRY(memcpy) 46 #else 47 #ifdef MEMMOVE 48 ENTRY(memmove) 49 #else 50 ENTRY(bcopy) 51 #endif 52 #endif 53 #if defined(MEMCOPY) || defined(MEMMOVE) 54 movq %rdi,%rax /* return dst */ 55 #else 56 xchgq %rdi,%rsi 57 #endif . . . (the rest being the same for the 3 routines) . . . > mips is backwards for bcopy() and implements it as > memmove(). mips has 2 separate memcpy*.S files, one for plain = arm > and one for xscale. The plain arm one is smaller than memmove.S, > so presumably doesn't support overlapped copies. The xscale one > is much larger, so has space for overlapped copies and many = optimizations > that no longer work. I don't know what it does. The mix of "mips" and "arm"/"xscale" above confused me. Looking around this seems to be referencing head/lib/libc/arm/string/ materials instead of head/lib/libc/mips/string/ or head/sys/mips/mips/ materials. =3D=3D=3D Mark Millard markmi at dsl-only.net From owner-svn-src-head@freebsd.org Thu Nov 16 00:05:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D942DEF4E4; Thu, 16 Nov 2017 00:05:33 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it0-x233.google.com (mail-it0-x233.google.com [IPv6:2607:f8b0:4001:c0b::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E327863BEC; Thu, 16 Nov 2017 00:05:32 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it0-x233.google.com with SMTP id n134so3882983itg.3; Wed, 15 Nov 2017 16:05:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=9FsdC53cWwFdjmccAWSaLCmYwhQ7YaNUY5RuBbcKHVA=; b=Wu0gUI8I+bjtO0nQKztvu4QMl8NHXBn5jaXAyMMcCXWbLhrHtDb4zDd2A4SmKkG6Ae CygXNhw4zi/tNp4D0irESWdwixwYmo7KleafdEhJP1b0BG9jKBpHrB7JCveo0332EPkH K/EhERdJI6W1uAekjiVpwplD3RHSXI0FSgafz9nx4DK7oWZvPWGQaFSpBQpTM/cs+Af+ Q6OCPb9NqJr7IoRYnUIfcyo+8ASY8+Xo6+5wSP8lhXFjUsGLw4bGOQ6zUu5mFz4pZRXg sGmb2HAG9cqu2BTxQ3ehxCT+CsiAx08OA7AtBBsRjdJWKexiLd8f2w03FvUsH7M8Z4cn vovA== 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=9FsdC53cWwFdjmccAWSaLCmYwhQ7YaNUY5RuBbcKHVA=; b=A3FKGa5EbebVv8N/OdvSy55GFB0XPnjLfUTqPQKpK3bj4Y90UKVmoF6vbcgNOd7RvJ lZW+Lm8yZ4HlvwKKwQWJ8wXJ+fMEk+FaYm4RPdDLclXUVZ7Ndfl4hHY+jSghqtn36ezd 1wJiNNtuk5UqH2tiVmUFb8woOuEN5hUPLCFPfM3ZwY/C3nBlV9OcwYEQYxVloQVKMmS6 Czym21UVPKKKoAZVVjkPxazFLMLBEs/8o6/C12n5coozQfkteFegtqv0H4RsZ2dCDqSj tY37NcVKbgvIjGx0FYKK7DIGx8pNZwZN1d/n1pFctNarBV1MPTfyTdG7aYuSwi1Q+Hhi L2aQ== X-Gm-Message-State: AJaThX7nYA4usLHqUbZg79s7pSodOCDSN5XLPfsHYA33+EmxLMuiXvNY N8YJ1AyysiQ7H9e8OavArrODIcBMDcyR6kv1a1suYw== X-Google-Smtp-Source: AGs4zMZWtW9JaIoxHx/I0ewyeG2IHIIT6M04ZMksWefZLzV0h7tM2CctQR3sUHDfJ+D4kYyKqUpDVycRkhc+AMBz2ZI= X-Received: by 10.36.58.3 with SMTP id m3mr212929itm.81.1510790731992; Wed, 15 Nov 2017 16:05:31 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.14.208 with HTTP; Wed, 15 Nov 2017 16:05:11 -0800 (PST) In-Reply-To: <201711151847.vAFIlGD9052509@pdx.rh.CN85.dnsmgr.net> References: <201711151840.vAFIefKV002185@repo.freebsd.org> <201711151847.vAFIlGD9052509@pdx.rh.CN85.dnsmgr.net> From: Ed Maste Date: Wed, 15 Nov 2017 19:05:11 -0500 X-Google-Sender-Auth: ZYmY2KvxLJqHDEJpeutSJoLSMrw Message-ID: Subject: Re: svn commit: r325860 - head/sbin/newfs To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 00:05:33 -0000 On 15 November 2017 at 13:47, Rodney W. Grimes wrote: >> Author: emaste >> Date: Wed Nov 15 18:40:40 2017 >> New Revision: 325860 >> URL: https://svnweb.freebsd.org/changeset/base/325860 >> >> Log: >> newfs: warn if newer than kernel >> >> Creating a UFS filesystem with a newfs newer than the running kernel, >> and then mounting that filesystem, can lead to interesting failures. >> >> Add a safety belt to explicitly warn when newfs is newer than the >> running kernel. > > You should probably make the warning if (newer || older) as > either is likely to have interesting side effects, as are > mounting ufs file systems on different versions. Why would an older newfs cause trouble? Forward compatibility should be fine. From owner-svn-src-head@freebsd.org Thu Nov 16 00:19:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06920DEFB8A; Thu, 16 Nov 2017 00:19:46 +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 C7E41643AD; Thu, 16 Nov 2017 00:19: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 vAG0Jiue048600; Thu, 16 Nov 2017 00:19:44 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAG0Ji0s048599; Thu, 16 Nov 2017 00:19:44 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201711160019.vAG0Ji0s048599@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 16 Nov 2017 00:19:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325882 - head/share/man/man7 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/share/man/man7 X-SVN-Commit-Revision: 325882 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 00:19:46 -0000 Author: imp Date: Thu Nov 16 00:19:44 2017 New Revision: 325882 URL: https://svnweb.freebsd.org/changeset/base/325882 Log: Use better wording: change there to the and define to defines. Also fix a run-a-way macro invocation of Dv. Noticed by: matteo@ Modified: head/share/man/man7/arch.7 Modified: head/share/man/man7/arch.7 ============================================================================== --- head/share/man/man7/arch.7 Wed Nov 15 23:51:17 2017 (r325881) +++ head/share/man/man7/arch.7 Thu Nov 16 00:19:44 2017 (r325882) @@ -393,10 +393,11 @@ integers (endian). It may also encode a variation in the size of the integer or pointer. It may also encode a ISA revision. It may also encode hard versus soft floating point ABI and usage. -It may also encode a variant ABI when there other factors do not -uniquely define the ABI (eg, MIPS' n32 ABI). +It may also encode a variant ABI when the other factors do not +uniquely define the ABI (e.g., MIPS' n32 ABI). It, along with -.Dv MACHINE, define the ABI used by the system. +.Dv MACHINE , +defines the ABI used by the system. For example, the MIPS CPU processor family supports 9 different combinations encoding pointer size, endian and hard versus soft float (for 8 combinations) as well as N32 (which only ever had one variation of From owner-svn-src-head@freebsd.org Thu Nov 16 00:36:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C33DDEFFC5 for ; Thu, 16 Nov 2017 00:36:24 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x235.google.com (mail-io0-x235.google.com [IPv6:2607:f8b0:4001:c06::235]) (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 E3E3264BF1 for ; Thu, 16 Nov 2017 00:36:23 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x235.google.com with SMTP id h205so2748052iof.5 for ; Wed, 15 Nov 2017 16:36:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=34l5XLYo28ts21m6mRnO5E4l/uPa/2CEs6dbIHYKYSs=; b=IxcD3MjfusC0OY9SlwE6yajWv/fqhX2RjaU5NggiN2NfWF+TC9ojovkiM/dEg66CpY +MKR2RK9uewHS4vGGVx4eAaf/7kFRBJq1QQ6TH7Ai28F/u52awAA0qwbFLswMO47KKAE RY7emVmR7zRCcORqgN0ajBAlpHOIMsaVqGvVn1LUzuY8h0Lg9U14oewbxZRc7jQBtgwp y8u4hs4AIjYkCU5GrOTyzFM0Y+QHsFnXP8YrKOJtnqJJkc/SCH2e8Tz5+r1Xoo+tEaAO 547Z2/ySfs7NhqX/0/r+oI64tXWVCrIzyTFZsDCas1oB7Z00AqnMHbAcDQwxvb83meuf V3aQ== 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=34l5XLYo28ts21m6mRnO5E4l/uPa/2CEs6dbIHYKYSs=; b=nDyw5H5xDA5+hn2jhCSTcWKaMLb8KT5YAuhCoZYFU6yN0MITE22kvJwnN3K4p14Qdb DXQWqyIX8/kVtcLa8s8XE6WLypENVS/RswdqINmCLWqU2o+4rHYjuUgmXzydG9nskw9o +k/SAY+cj5PB3oBECqqfDIykBYi7VGXlrg8fgS+ya81H7YwDSnLc4RmWD2hIuZv/ho7g YAa+bpJCTi6u/1BHSS9r/P39Byp7g735fmjiqtpZBfjzrjTeY4nKux95a8Zz+V/dZSxG Nzipl2W+u0amu4m4fxAmoa0dW7EfGqGKdBILG6BBQC+5dnYmhtsNKlAdQU0FTCHqjrzg bwgg== X-Gm-Message-State: AJaThX6W7NyNC8PhSJUYe3xMItqjC2xCDz3EovAbtYYIGKZxzFhjrBRo 4etbgSFchJDU/iKxce4U2RhnW0rBNCsAvojwcHlswg== X-Google-Smtp-Source: AGs4zMb6cVPC99IK2Q3CI1tZksHxzALd9DgilGsDrupCr5kagbAlKQV0+GWD64RdF4PywjvuFnLzqLXsj7Bhb+yi7Ro= X-Received: by 10.107.48.195 with SMTP id w186mr6540201iow.301.1510792582821; Wed, 15 Nov 2017 16:36:22 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Wed, 15 Nov 2017 16:36:22 -0800 (PST) X-Originating-IP: [2603:300b:6:5100:9151:cca:5a07:fd20] In-Reply-To: References: <201711151840.vAFIefKV002185@repo.freebsd.org> <201711151847.vAFIlGD9052509@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Wed, 15 Nov 2017 17:36:22 -0700 X-Google-Sender-Auth: LAfCrngUGOI2tfayqxF1sAvjaoE Message-ID: Subject: Re: svn commit: r325860 - head/sbin/newfs To: Ed Maste Cc: "Rodney W. Grimes" , 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.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 00:36:24 -0000 On Wed, Nov 15, 2017 at 5:05 PM, Ed Maste wrote: > On 15 November 2017 at 13:47, Rodney W. Grimes > wrote: > >> Author: emaste > >> Date: Wed Nov 15 18:40:40 2017 > >> New Revision: 325860 > >> URL: https://svnweb.freebsd.org/changeset/base/325860 > >> > >> Log: > >> newfs: warn if newer than kernel > >> > >> Creating a UFS filesystem with a newfs newer than the running kernel, > >> and then mounting that filesystem, can lead to interesting failures. > >> > >> Add a safety belt to explicitly warn when newfs is newer than the > >> running kernel. > > > > You should probably make the warning if (newer || older) as > > either is likely to have interesting side effects, as are > > mounting ufs file systems on different versions. > > Why would an older newfs cause trouble? Forward compatibility should be > fine > The only scenario that 'old' would cause problems is that if you did a newfs with a new binary on a new kernel, mounted the file system, wrote files to it, then rebooted with an old kernel, mounted the filesystem there, writing new files to it, and then unmounting and running with a new kernel. At that point, the new kernel will start printing cg mismatch errors and will limit its allocation to CGs that weren't modified when it was mounted under the old kernel (since those CGs will have changed their checksum, but no new checksum will have been computed). The root cause here is that the old kernel doesn't know that the CK_CYLGRP tags the cg as having the proper hash metadata associated with them. It sounds like this is exactly what Rod does on a regular basis as he's taking a disk from one system to another and back again, maybe for file transport on a USB stick. It's not a crazy scenario. At this point, there's the annoyance of the messages, but that will be fixed with an fsck. The scenario where I have a newer kernel and an old newfs will be a nop: the old newfs won't set CK_CYLGRP, so the kernel won't checksum, so there won't be any mismatch possible. I'm not sure that the new safety belt is reasonable. Today it's fine, but over time it will start producing false-positive warnings since the real issue is just before/after the cg change, not old/new in general. I'd be tempted to make a check against newfs being >= 1200046 while the kernel is < 1200046. There wasn't a specific bump for this change to sys/param.h, but this version was bumped within a few hours of Kirk's change. Warner From owner-svn-src-head@freebsd.org Thu Nov 16 00:38:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57A76DF0069 for ; Thu, 16 Nov 2017 00:38:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22b.google.com (mail-it0-x22b.google.com [IPv6:2607:f8b0:4001:c0b::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 18F8464D9B for ; Thu, 16 Nov 2017 00:38:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22b.google.com with SMTP id l196so3910565itl.4 for ; Wed, 15 Nov 2017 16:38:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=OKakn2ZNvbPPgieCh3kzE6Z0//yig7W48hn2pJlY1yM=; b=wWVAHYaZjjpLEPGC9b/NNQrbSUx0apEJlZqf4QWTMzd1DtvxrIrI8vrIp2ZvT3sE+K rCBIXkqUf9YWzv9wgF+BbxuTGo+25r5ffV5o+xxN2oadgZYXuZG0KY52PO8/AqjpHjob NedzsCy7TdWN8+0nsI0fCxcFw7bZM5EKv1OqmwHCeYC3ZzR7x02wS+Mmr8vEQ2wVXURW ddvd3fmaidS/DOej4W7Jh+SpxG7otwfuR/SETkLBYm8BCh53x6OCH9sDSxCDcHPKmzwc KysxSxLGctUxMtM/K7/3ezMY2p/+UUzWCurzQNYnxHzYUP98V4JBX4DbycuqZ4gqOK0y /oVA== 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=OKakn2ZNvbPPgieCh3kzE6Z0//yig7W48hn2pJlY1yM=; b=pmufFnxNbI5sN7q7O9agBb5v+2TyQMJOaglpc0IEPAjncGSOX4DizGRcbNs4Yys/hH 30/6dLrblF5ZODoAWh17Jc8Y2kB0GEOiW1FoN1nxBjoNvAjsijX7G9HP1MvfJgrYosha w2MglfrofoiEbOdW9VesRcBsrPIu/CCKM3iWlxBOOy7cQFcqrCdasOuMwptcPzDpCqXa lEgq2zXbcdZmNWgwZRgoSOOuxWzCBwzR0qkBgqArCPR7f0Mik+5ukWvjIz8E0ybLJ9++ /8kHrTDMZghhOk4QkY2n3Ud9X0pu7rx8xBbcjcVF2yWt7E/dm9eE0psC5JOWJ3q5El+Z UVyQ== X-Gm-Message-State: AJaThX5E29bzCkd4KWl1FUtfYkbQ5ESeTDBeiEHNgnwbBpz1b26gIxOr r8qjl9yv81YILb9MiqLtA/VpQ9MMiVCx52+R05wu0g== X-Google-Smtp-Source: AGs4zMbIs3PdjchoPSpJCx1PI1t5L1DUcClUxcum+6oSDs4Oim03a9081REV8XvsJM1puoTb76ccm5EYEb8SjD8BDVw= X-Received: by 10.36.184.5 with SMTP id m5mr343277ite.69.1510792698489; Wed, 15 Nov 2017 16:38:18 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Wed, 15 Nov 2017 16:38:17 -0800 (PST) X-Originating-IP: [2603:300b:6:5100:9151:cca:5a07:fd20] In-Reply-To: References: <201711152113.vAFLDcSJ053119@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Wed, 15 Nov 2017 17:38:17 -0700 X-Google-Sender-Auth: -vPXJDelQdPp9CsGL96G3nfKjfI Message-ID: Subject: Re: svn commit: r325860 - head/sbin/newfs To: "Conrad E. Meyer" Cc: "Rodney W. Grimes" , Ed Maste , 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.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 00:38:19 -0000 On Wed, Nov 15, 2017 at 2:28 PM, Conrad Meyer wrote: > On Wed, Nov 15, 2017 at 1:23 PM, Warner Losh wrote: > > On Nov 15, 2017 2:13 PM, "Rodney W. Grimes" net> > > wrote: > > Oh, and can you please get a mail client that does > > proper quoting? > > > > > > It's just gmail. And there's really no alternative :( > > > > Warner > > Hi, > > Gmail does quoting just fine. I'm using it right now. Not sure what > you're doing wrong, but there is a way to use gmail and quote replies. > I don't do anything special when I hit "reply" on an email. > I usually don't either, but some of my messages today were from my phone. Maybe that's the client I should avoid. Warner From owner-svn-src-head@freebsd.org Thu Nov 16 01:33:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 280C4DF0F2A; Thu, 16 Nov 2017 01:33:55 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F0F7666455; Thu, 16 Nov 2017 01:33:54 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAG1XrDB081341; Thu, 16 Nov 2017 01:33:53 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAG1Xruh081340; Thu, 16 Nov 2017 01:33:53 GMT (envelope-from np@FreeBSD.org) Message-Id: <201711160133.vAG1Xruh081340@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 16 Nov 2017 01:33:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325883 - head/sys/dev/cxgbe X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/sys/dev/cxgbe X-SVN-Commit-Revision: 325883 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 01:33:55 -0000 Author: np Date: Thu Nov 16 01:33:53 2017 New Revision: 325883 URL: https://svnweb.freebsd.org/changeset/base/325883 Log: cxgbe(4): Sanitize t4_num_vis during MOD_LOAD like all other t4_* tunables. Add num_vis to the intrs_and_queues structure as it affects the number of interrupts requested and queues created. In future cfg_itype_and_nqueues might lower it incrementally instead of going straight to 1 when enough interrupts aren't available. Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Thu Nov 16 00:19:44 2017 (r325882) +++ head/sys/dev/cxgbe/t4_main.c Thu Nov 16 01:33:53 2017 (r325883) @@ -466,6 +466,7 @@ static int vi_mac_funcs[] = { struct intrs_and_queues { uint16_t intr_type; /* INTx, MSI, or MSI-X */ + uint16_t num_vis; /* number of VIs for each port */ uint16_t nirq; /* Total # of vectors */ uint16_t intr_flags; /* Interrupt flags for each port */ uint16_t ntxq; /* # of NIC txq's for each port */ @@ -505,8 +506,7 @@ static int fwmtype_to_hwmtype(int); static int validate_mt_off_len(struct adapter *, int, uint32_t, int, uint32_t *); static int fixup_devlog_params(struct adapter *); -static int cfg_itype_and_nqueues(struct adapter *, int, int, - struct intrs_and_queues *); +static int cfg_itype_and_nqueues(struct adapter *, struct intrs_and_queues *); static int prep_firmware(struct adapter *); static int partition_resources(struct adapter *, const struct firmware *, const char *); @@ -965,24 +965,6 @@ t4_attach(device_t dev) goto done; /* error message displayed already */ /* - * Number of VIs to create per-port. The first VI is the "main" regular - * VI for the port. The rest are additional virtual interfaces on the - * same physical port. Note that the main VI does not have native - * netmap support but the extra VIs do. - * - * Limit the number of VIs per port to the number of available - * MAC addresses per port. - */ - if (t4_num_vis >= 1) - num_vis = t4_num_vis; - else - num_vis = 1; - if (num_vis > nitems(vi_mac_funcs)) { - num_vis = nitems(vi_mac_funcs); - device_printf(dev, "Number of VIs limited to %d\n", num_vis); - } - - /* * First pass over all the ports - allocate VIs and initialize some * basic parameters like mac address, port type, etc. */ @@ -999,7 +981,7 @@ t4_attach(device_t dev) * XXX: vi[0] is special so we can't delay this allocation until * pi->nvi's final value is known. */ - pi->vi = malloc(sizeof(struct vi_info) * num_vis, M_CXGBE, + pi->vi = malloc(sizeof(struct vi_info) * t4_num_vis, M_CXGBE, M_ZERO | M_WAITOK); /* @@ -1040,12 +1022,11 @@ t4_attach(device_t dev) * Interrupt type, # of interrupts, # of rx/tx queues, etc. */ nports = sc->params.nports; - rc = cfg_itype_and_nqueues(sc, nports, num_vis, &iaq); + rc = cfg_itype_and_nqueues(sc, &iaq); if (rc != 0) goto done; /* error message displayed already */ - if (iaq.nrxq_vi + iaq.nofldrxq_vi + iaq.nnmrxq_vi == 0) - num_vis = 1; + num_vis = iaq.num_vis; sc->intr_type = iaq.intr_type; sc->intr_count = iaq.nirq; @@ -2662,15 +2643,16 @@ fixup_devlog_params(struct adapter *sc) } static int -cfg_itype_and_nqueues(struct adapter *sc, int nports, int num_vis, - struct intrs_and_queues *iaq) +cfg_itype_and_nqueues(struct adapter *sc, struct intrs_and_queues *iaq) { - int rc, itype, navail, nrxq, n; + int rc, itype, navail, nrxq, nports, n; int nofldrxq = 0; + nports = sc->params.nports; MPASS(nports > 0); bzero(iaq, sizeof(*iaq)); + iaq->num_vis = t4_num_vis; iaq->ntxq = t4_ntxq; iaq->ntxq_vi = t4_ntxq_vi; iaq->nrxq = nrxq = t4_nrxq; @@ -2716,9 +2698,9 @@ restart: */ iaq->nirq = T4_EXTRA_INTR; iaq->nirq += nports * (nrxq + nofldrxq); - iaq->nirq += nports * (num_vis - 1) * + iaq->nirq += nports * (iaq->num_vis - 1) * max(iaq->nrxq_vi, iaq->nnmrxq_vi); /* See comment above. */ - iaq->nirq += nports * (num_vis - 1) * iaq->nofldrxq_vi; + iaq->nirq += nports * (iaq->num_vis - 1) * iaq->nofldrxq_vi; if (iaq->nirq <= navail && (itype != INTR_MSI || powerof2(iaq->nirq))) { iaq->intr_flags = INTR_ALL; @@ -2726,15 +2708,15 @@ restart: } /* Disable the VIs (and netmap) if there aren't enough intrs */ - if (num_vis > 1) { + if (iaq->num_vis > 1) { device_printf(sc->dev, "virtual interfaces disabled " "because num_vis=%u with current settings " "(nrxq=%u, nofldrxq=%u, nrxq_vi=%u nofldrxq_vi=%u, " "nnmrxq_vi=%u) would need %u interrupts but " - "only %u are available.\n", num_vis, nrxq, + "only %u are available.\n", iaq->num_vis, nrxq, nofldrxq, iaq->nrxq_vi, iaq->nofldrxq_vi, iaq->nnmrxq_vi, iaq->nirq, navail); - num_vis = 1; + iaq->num_vis = 1; iaq->ntxq_vi = iaq->nrxq_vi = 0; iaq->nofldtxq_vi = iaq->nofldrxq_vi = 0; iaq->nnmtxq_vi = iaq->nnmrxq_vi = 0; @@ -9928,6 +9910,22 @@ tweak_tunables(void) t4_qsize_rxq++; t4_intr_types &= INTR_MSIX | INTR_MSI | INTR_INTX; + + /* + * Number of VIs to create per-port. The first VI is the "main" regular + * VI for the port. The rest are additional virtual interfaces on the + * same physical port. Note that the main VI does not have native + * netmap support but the extra VIs do. + * + * Limit the number of VIs per port to the number of available + * MAC addresses per port. + */ + if (t4_num_vis < 1) + t4_num_vis = 1; + if (t4_num_vis > nitems(vi_mac_funcs)) { + t4_num_vis = nitems(vi_mac_funcs); + printf("cxgbe: number of VIs limited to %d\n", t4_num_vis); + } } #ifdef DDB From owner-svn-src-head@freebsd.org Thu Nov 16 01:46:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9FEE7DF16BC; Thu, 16 Nov 2017 01:46:57 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it0-x231.google.com (mail-it0-x231.google.com [IPv6:2607:f8b0:4001:c0b::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 605CC66AD4; Thu, 16 Nov 2017 01:46:57 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it0-x231.google.com with SMTP id n134so4060934itg.1; Wed, 15 Nov 2017 17:46:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=G6e9U27kCUHkwk5XctpXi04ZWbahidFSWV7aGEem7nM=; b=k8I17PES1VXBD4mDX6j+u1NUYvF3lNBCQ64iRVQSxcAoS4ufTvle0A+JPPUwJHwTDf Q1DsAzbToZZXI6H98bhjBdm8+mr8OAxzm2C5nGvaVVY0NOddBt5WAIht7wFAOFWMT+5n RLZHaYcSmPjeZQuc2aZ3qWTkkZ+hIbBszLXWQFsVpWXdi9CxmEEI7wJVm4XdqbG9qiao dGMHiDLiC+it7BdWx+G3d1hC3kJEx1VsY4kykhpeGaOA+QyebvLnGQnvE4csIPbe99zM TIFrGIpM1xxH3imf2yTaFAYFK5H+VaqE5De9exntUz79bO13X5xWxu3lcCZmemcsjlIu PoZg== 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=G6e9U27kCUHkwk5XctpXi04ZWbahidFSWV7aGEem7nM=; b=sB4KqXtJfknqeKIrXx0Dr1HuJknkFuBHQgRTpUmEdnWACZ5KvvdTKn3XpBZ2uGE8yp VOtPvBaecUF9c6KpimlmcE5DoevCvimRtIbAl4MeVW/tB8XnkLqH+ODGh+OJsyBZcdqi poeSUBR4DWDEuLREIBp5kr26ONsQ3aJciC0AKbq1wrRtKxZKLikJyXFiz53q5KvVuI+2 DHCvzoolDxLGwanwZkC5iUc0IC9TDodxNAjANEIpP40QFqhkun0e3bx6VCXq0dSyVvpH Pwv3ACpDAYOTtLmShPvEKoqctaA5m3Y43IG8oINhqzOgaWOmO0QwIqO+00vcIM7YVzcG FD1g== X-Gm-Message-State: AJaThX76cn3/ZEnTXZo73trJ04m4fiAcO6xXKr7hi1RQa4FRUcad8GSV DBZxafWpgvBfol79rC675aXgfrWz2gd6p6ahpZgTPg== X-Google-Smtp-Source: AGs4zMYneMa09skqTwYOLQCUErwrLON7XJUW64x37SVXzuav7ZvJm2QKEWGXRKKO9fP3RrhP4hDktgUsiFIw+iMFrG8= X-Received: by 10.36.22.13 with SMTP id a13mr545445ita.69.1510796816614; Wed, 15 Nov 2017 17:46:56 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.14.208 with HTTP; Wed, 15 Nov 2017 17:46:36 -0800 (PST) In-Reply-To: References: <201711151840.vAFIefKV002185@repo.freebsd.org> <201711151847.vAFIlGD9052509@pdx.rh.CN85.dnsmgr.net> From: Ed Maste Date: Wed, 15 Nov 2017 20:46:36 -0500 X-Google-Sender-Auth: elfaNec_QUdqDJBGDzWooPB_zRE Message-ID: Subject: Re: svn commit: r325860 - head/sbin/newfs To: Warner Losh Cc: "Rodney W. Grimes" , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 01:46:57 -0000 On 15 November 2017 at 19:36, Warner Losh wrote: > > On Wed, Nov 15, 2017 at 5:05 PM, Ed Maste wrote: >> >> On 15 November 2017 at 13:47, Rodney W. Grimes >> wrote: >> >> Author: emaste >> >> Date: Wed Nov 15 18:40:40 2017 >> >> New Revision: 325860 >> >> URL: https://svnweb.freebsd.org/changeset/base/325860 >> >> >> >> Log: >> >> newfs: warn if newer than kernel >> >> >> >> Creating a UFS filesystem with a newfs newer than the running kernel, >> >> and then mounting that filesystem, can lead to interesting failures. >> >> >> >> Add a safety belt to explicitly warn when newfs is newer than the >> >> running kernel. >> > >> > You should probably make the warning if (newer || older) as >> > either is likely to have interesting side effects, as are >> > mounting ufs file systems on different versions. >> >> Why would an older newfs cause trouble? Forward compatibility should be >> fine > > The only scenario that 'old' would cause problems is that if you did a newfs > with a new binary on a new kernel, mounted the file system, wrote files to > it, then rebooted with an old kernel, mounted the filesystem there, writing > new files to it, and then unmounting and running with a new kernel. Right, but that's not older newfs. AFAICT there's no reason at all for a (newer || older) warning. > I'm not sure that the new safety belt is reasonable. Today it's fine, but > over time it will start producing false-positive warnings since the real > issue is just before/after the cg change, not old/new in general. I'd be > tempted to make a check against newfs being >= 1200046 while the kernel is < > 1200046. There wasn't a specific bump for this change to sys/param.h, but > this version was bumped within a few hours of Kirk's change. Well, we don't in general support using a userland newer than the running kernel, other than on a best-effort basis to facilitate upgrades and development. This one is only a warning so I don't see much harm in leaving it in place, and it would catch any new cases of a similar nature. If such a warning was already in place we might have avoided the issue where our snapshots produced checksum mismatch messages. But I don't have a strong objection to a hardcoded version check. From owner-svn-src-head@freebsd.org Thu Nov 16 02:42:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79183DB9A00; Thu, 16 Nov 2017 02:42:38 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4642C6897D; Thu, 16 Nov 2017 02:42:38 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAG2gbap010308; Thu, 16 Nov 2017 02:42:37 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAG2gbDt010307; Thu, 16 Nov 2017 02:42:37 GMT (envelope-from np@FreeBSD.org) Message-Id: <201711160242.vAG2gbDt010307@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 16 Nov 2017 02:42:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325884 - head/sys/dev/cxgbe X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/sys/dev/cxgbe X-SVN-Commit-Revision: 325884 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 02:42:38 -0000 Author: np Date: Thu Nov 16 02:42:37 2017 New Revision: 325884 URL: https://svnweb.freebsd.org/changeset/base/325884 Log: cxgbe(4): Remove rsrv_noflowq from intrs_and_queues structure as it does not influence or get affected by the number of interrupts or queues. Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Thu Nov 16 01:33:53 2017 (r325883) +++ head/sys/dev/cxgbe/t4_main.c Thu Nov 16 02:42:37 2017 (r325884) @@ -471,7 +471,6 @@ struct intrs_and_queues { uint16_t intr_flags; /* Interrupt flags for each port */ uint16_t ntxq; /* # of NIC txq's for each port */ uint16_t nrxq; /* # of NIC rxq's for each port */ - uint16_t rsrv_noflowq; /* Flag whether to reserve queue 0 */ uint16_t nofldtxq; /* # of TOE txq's for each port */ uint16_t nofldrxq; /* # of TOE rxq's for each port */ @@ -1124,7 +1123,7 @@ t4_attach(device_t dev) tqidx += vi->ntxq; if (j == 0 && vi->ntxq > 1) - vi->rsrv_noflowq = iaq.rsrv_noflowq ? 1 : 0; + vi->rsrv_noflowq = t4_rsrv_noflowq ? 1 : 0; else vi->rsrv_noflowq = 0; @@ -2657,7 +2656,6 @@ cfg_itype_and_nqueues(struct adapter *sc, struct intrs iaq->ntxq_vi = t4_ntxq_vi; iaq->nrxq = nrxq = t4_nrxq; iaq->nrxq_vi = t4_nrxq_vi; - iaq->rsrv_noflowq = t4_rsrv_noflowq; #ifdef TCP_OFFLOAD if (is_offload(sc)) { iaq->nofldtxq = t4_nofldtxq; From owner-svn-src-head@freebsd.org Thu Nov 16 04:41:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E965EDBC57A; Thu, 16 Nov 2017 04:41:15 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f43.google.com (mail-it0-f43.google.com [209.85.214.43]) (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 812176BD38; Thu, 16 Nov 2017 04:41:15 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f43.google.com with SMTP id l196so4396227itl.4; Wed, 15 Nov 2017 20:41:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=ZRDiJ2M+I8PPqaSWpvUnsEtOi+A13Vw7pvSou6zWd0k=; b=iTOaaynmXzmdhwIPDMGOUa72eQ9CkSdfMk9QB/3l/v4/9IIcc1oj+nSkiZTrWwtQna Bc2z8dfGnBn00QvEVifyDNfCSwugb398+aUIe10m11Yw5VR6KXYibq3MPkIGD4VE6vnv TJdB0ITFT9vong/Vrh/704mEIniGxsiN8pV9RLBG4gaIotbl+qbGW7Kg5aPKoMh/Cmau PkhCK+UMGg1VOxy+gWoj2kGtjnxVtulJVlGkK1MNXtzWYnHf28keRbxcFa+fAOqF9wz+ mw8ut0hMstvmeUyziPwF102GbNrqe0T+yLFROG+YI+xT5XfQ950lCMIEdWYKzpzKQJHu 1icg== X-Gm-Message-State: AJaThX7mkIc4LQRpmmmi5/OQTovKRTGMEQpkeWHatlZ6zykzCTnR1uUe +RCILTpZaMo5xzVjf311Vt7/nW67 X-Google-Smtp-Source: AGs4zMZMX72Rlg/b1Vz4/E0Dm4aoWJpMdK6L5vgWwTmSsY7iCQYWkGVoJrjogegvIxfwU/GlBg0U4g== X-Received: by 10.36.65.91 with SMTP id x88mr821372ita.82.1510803494635; Wed, 15 Nov 2017 19:38:14 -0800 (PST) Received: from mail-it0-f50.google.com (mail-it0-f50.google.com. [209.85.214.50]) by smtp.gmail.com with ESMTPSA id u188sm276053itb.2.2017.11.15.19.38.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Nov 2017 19:38:14 -0800 (PST) Received: by mail-it0-f50.google.com with SMTP id f187so4328086itb.1; Wed, 15 Nov 2017 19:38:14 -0800 (PST) X-Received: by 10.36.192.2 with SMTP id u2mr741567itf.119.1510803494229; Wed, 15 Nov 2017 19:38:14 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.165.150 with HTTP; Wed, 15 Nov 2017 19:38:13 -0800 (PST) In-Reply-To: <201704152015.v3FKFiwZ006836@repo.freebsd.org> References: <201704152015.v3FKFiwZ006836@repo.freebsd.org> From: Conrad Meyer Date: Wed, 15 Nov 2017 19:38:13 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r316980 - head/contrib/zstd/programs To: Baptiste Daroussin Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Allan Jude Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 04:41:16 -0000 Please revert this change. First, it introduces the POLA-violating behavior that zstdcat deletes its source files. This is not how zcat/bzcat behaves. Second, it introduces a needless behavioral difference between FreeBSD zstd and the rest of the world's zstd. The zstd documentation we ship continues to claim that zstd preserves source files by default, yet this change makes that documentation exactly backwards. While we can change FreeBSD's documentation to accommodate the change, we can't change Google results. Thanks, Conrad On Sat, Apr 15, 2017 at 1:15 PM, Baptiste Daroussin wrote: > Author: bapt > Date: Sat Apr 15 20:15:44 2017 > New Revision: 316980 > URL: https://svnweb.freebsd.org/changeset/base/316980 > > Log: > Change some default to make zstd a dropin replacement for gzip,bzip etc > in most cases > > Changes ares: > - quiet by default > - remove the source files one compression completion by default > > Modified: > head/contrib/zstd/programs/fileio.c > head/contrib/zstd/programs/zstdcli.c > > Modified: head/contrib/zstd/programs/fileio.c > ============================================================================== > --- head/contrib/zstd/programs/fileio.c Sat Apr 15 20:06:24 2017 (r316979) > +++ head/contrib/zstd/programs/fileio.c Sat Apr 15 20:15:44 2017 (r316980) > @@ -138,7 +138,7 @@ static U32 g_dictIDFlag = 1; > void FIO_setDictIDFlag(unsigned dictIDFlag) { g_dictIDFlag = dictIDFlag; } > static U32 g_checksumFlag = 1; > void FIO_setChecksumFlag(unsigned checksumFlag) { g_checksumFlag = checksumFlag; } > -static U32 g_removeSrcFile = 0; > +static U32 g_removeSrcFile = 1; > void FIO_setRemoveSrcFile(unsigned flag) { g_removeSrcFile = (flag>0); } > static U32 g_memLimit = 0; > void FIO_setMemLimit(unsigned memLimit) { g_memLimit = memLimit; } > > Modified: head/contrib/zstd/programs/zstdcli.c > ============================================================================== > --- head/contrib/zstd/programs/zstdcli.c Sat Apr 15 20:06:24 2017 (r316979) > +++ head/contrib/zstd/programs/zstdcli.c Sat Apr 15 20:15:44 2017 (r316980) > @@ -61,7 +61,7 @@ > #define MB *(1 <<20) > #define GB *(1U<<30) > > -#define DEFAULT_DISPLAY_LEVEL 2 > +#define DEFAULT_DISPLAY_LEVEL 1 > > static const char* g_defaultDictName = "dictionary"; > static const unsigned g_defaultMaxDictSize = 110 KB; > From owner-svn-src-head@freebsd.org Thu Nov 16 05:17:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E27FDBD2DF for ; Thu, 16 Nov 2017 05:17:29 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x233.google.com (mail-io0-x233.google.com [IPv6:2607:f8b0:4001:c06::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 50ECB6CBE5 for ; Thu, 16 Nov 2017 05:17:29 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x233.google.com with SMTP id 189so3978223iow.10 for ; Wed, 15 Nov 2017 21:17:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=tYVGM4sqi0vWPWm1+v1l470wYLzN3Lz3mRnJYcbey/o=; b=ifY+cHEaLeGTq+L9tYSEN7VZ7QPntXA5BUDMt73MxXIjPSwZ7EJsb/zBNPp0LqVFyU 6TyS7MbNQW9xULZPcvzNDjA5jFkchNMDYZdqqn/MLvug59SzHN5ky0SFrH0UG921UDV0 f4fwVuncI56DqZ0JLsLh+PeFnUJW6DyH2iBmirggC49Z1RkdyJz+dVy30CmLrV+JnI8m e5nlEpXssB67mYKJW9ParPeaS/7HV28TVoldAhhkeCapRnAebYsfhHvxLcmpVvZt4BxL vXmGaS5o5kSujNZWVghRYXmBO9hiVSW9tfmPSj4QhlR6CzLqhbFP8kWSCRvmc094s9+a 2AyA== 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=tYVGM4sqi0vWPWm1+v1l470wYLzN3Lz3mRnJYcbey/o=; b=URU4Xw21x8z6tUdlY15uya5RvUB04aXNlro2+rj44QaThdOsfr46kLWOgU5mKoK9Wi T9Y8NRh36A3hId7bPwroEXWAM6F2Ht9qvp3Gilybsj1u9f9nmJui8pEAjbe6sfrsBsra 6USSiX7C3yMOjlv+oZQ4BFHm+X/KFlEeO3jdSXedT/roc9mghBSAWrGweWwLxeuyCH3U O9ilFcAjJjNfXO9OOintG0tUgQ/5bn73opnN/zOOqvHleSzXUtwhfgG3dJZhR9OWdZGn YZhUI2jOQq34R/JWpGSU71yq4Kb5icZRn6oc8AcenAgJKyLsRfv1IhJqOgHLzHw1bYl8 JPrA== X-Gm-Message-State: AJaThX7Xsf3xPgK5jYimDc0gFdRjqVtmRDDmhDvASJsYdOBzNjIc/4cj 1FDVJEU0B02cCGW66Kg3Z8vAjq8nklrl9a6FYPr4jw== X-Google-Smtp-Source: AGs4zMbgfFL2zKJ+cF5JHzucOIbj0An7nX+94NgEBVjq+Xcb2s+iE/hElQjMbLw5gkJ762jxkCPEkQ0Gq/D+ywFiMnM= X-Received: by 10.107.81.24 with SMTP id f24mr439920iob.63.1510809448407; Wed, 15 Nov 2017 21:17:28 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Wed, 15 Nov 2017 21:17:27 -0800 (PST) X-Originating-IP: [2603:300b:6:5100:9151:cca:5a07:fd20] In-Reply-To: References: <201711151840.vAFIefKV002185@repo.freebsd.org> <201711151847.vAFIlGD9052509@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Wed, 15 Nov 2017 22:17:27 -0700 X-Google-Sender-Auth: Pue6Oxix7r4GYasxBh0ASjLZraY Message-ID: Subject: Re: svn commit: r325860 - head/sbin/newfs To: Ed Maste Cc: "Rodney W. Grimes" , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Kirk McKusick Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 05:17:29 -0000 On Wed, Nov 15, 2017 at 6:46 PM, Ed Maste wrote: > On 15 November 2017 at 19:36, Warner Losh wrote: > > > > On Wed, Nov 15, 2017 at 5:05 PM, Ed Maste wrote: > >> > >> On 15 November 2017 at 13:47, Rodney W. Grimes > >> wrote: > >> >> Author: emaste > >> >> Date: Wed Nov 15 18:40:40 2017 > >> >> New Revision: 325860 > >> >> URL: https://svnweb.freebsd.org/changeset/base/325860 > >> >> > >> >> Log: > >> >> newfs: warn if newer than kernel > >> >> > >> >> Creating a UFS filesystem with a newfs newer than the running > kernel, > >> >> and then mounting that filesystem, can lead to interesting > failures. > >> >> > >> >> Add a safety belt to explicitly warn when newfs is newer than the > >> >> running kernel. > >> > > >> > You should probably make the warning if (newer || older) as > >> > either is likely to have interesting side effects, as are > >> > mounting ufs file systems on different versions. > >> > >> Why would an older newfs cause trouble? Forward compatibility should be > >> fine > > > > The only scenario that 'old' would cause problems is that if you did a > newfs > > with a new binary on a new kernel, mounted the file system, wrote files > to > > it, then rebooted with an old kernel, mounted the filesystem there, > writing > > new files to it, and then unmounting and running with a new kernel. > > Right, but that's not older newfs. AFAICT there's no reason at all for > a (newer || older) warning. I concur. > I'm not sure that the new safety belt is reasonable. Today it's fine, but > > over time it will start producing false-positive warnings since the real > > issue is just before/after the cg change, not old/new in general. I'd be > > tempted to make a check against newfs being >= 1200046 while the kernel > is < > > 1200046. There wasn't a specific bump for this change to sys/param.h, but > > this version was bumped within a few hours of Kirk's change. > > Well, we don't in general support using a userland newer than the > running kernel, other than on a best-effort basis to facilitate > upgrades and development. This one is only a warning so I don't see > much harm in leaving it in place, and it would catch any new cases of > a similar nature. If such a warning was already in place we might have > avoided the issue where our snapshots produced checksum mismatch > messages. But I don't have a strong objection to a hardcoded version > check. > What would have fixed the snapshot isn't a warning that nobody will notice. But rather something like the following: diff --git a/sbin/fsck_ffs/pass5.c b/sbin/fsck_ffs/pass5.c index 16c46bece00..06e1838a7f1 100644 --- a/sbin/fsck_ffs/pass5.c +++ b/sbin/fsck_ffs/pass5.c @@ -73,6 +73,7 @@ pass5(void) 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 && + getosreldate() >= 1200046 && reply("ADD CYLINDER GROUP CHECKSUM PROTECTION") != 0) { fs->fs_metackhash |= CK_CYLGRP; rewritecg = 1; diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c index f68c42ec6b3..0e7ee539265 100644 --- a/sbin/newfs/mkfs.c +++ b/sbin/newfs/mkfs.c @@ -495,7 +495,7 @@ restart: /* * Set flags for metadata that is being check-hashed. */ - if (Oflag > 1) + if (Oflag > 1 && getosreldate() >= 1200046) sblock.fs_metackhash = CK_CYLGRP; /* which would avoid setting the flag on a problematical kernel. Here forward compat is easy, and the consequences are scary messages, so I think we should do something more like the above. I don't think we need some kind of "do it anyway" override flag. since that doesn't fit well with the rest of UFS "works by default where we can figure it out" philosophy. I'll cleanup the above with a #define for 1200046. I've cc'd Kirk to see what he thinks of the idea. It generally fits with what we've done in the past for forward compat that's easy but protects the user from harshness. Warner From owner-svn-src-head@freebsd.org Thu Nov 16 05:37:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4228DBDC46 for ; Thu, 16 Nov 2017 05:37:26 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x230.google.com (mail-it0-x230.google.com [IPv6:2607:f8b0:4001:c0b::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 621706D55C for ; Thu, 16 Nov 2017 05:37:26 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x230.google.com with SMTP id u132so4557063ita.0 for ; Wed, 15 Nov 2017 21:37:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=ps2jruL5xBHv6v+vi0PG2UtYtKAsbZfN8lgAvVzMOco=; b=rM0t5hdA/clgjQCpLppwiA4JqOxJAxY3KUZDcTvwCQWfIWTXAtfwobCoOh1CqxJgoX F7OZkGi9Zj9Fi+FC6YHAF3Bvro9L7JnFmClxVZMw0GaA3DL4oXXhJg6MDWCE9WDNJ1AF /YHm0/58qJVIalCtIvHQS6KsHYoX/Hi+TDpxqyGMeV31qGffODFJARqqUt5Oj+AD/wSI p6R+D1sHXB5Q2l5zTpS50n3VTlXN01a2BmBz1oIkV5Ektb2WQRtP1gjiKSH7AScpIi7J YaPSIOo3Y+s09stSJeiYmwVmzIn8RqswnOCayI91zQ9mHfbNGvthb7L7bLZ8++qKTqn8 CxOQ== 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=ps2jruL5xBHv6v+vi0PG2UtYtKAsbZfN8lgAvVzMOco=; b=MBunGwqPDvidDD01+doSpccMO32AIeyd2Pc5cAxb2zO++2+pCn4nQWO/DW+fGP5q/2 DmptsYjPQZ9HeY43kO3lNIYwPJjaKxEjV7PbYbPXqhN7fXMGmEKDhwQRaxVEcPZZodRK wLzuHVnWD1mB8GNhcXcHDOQY4a+uj3FdZl+kL5vBJsXYMQDGYtyJidew70jpQvwr2VZL nttW87sy0n+bAxls7FKxyCIHCZaW+zHyNafcU+BCtui1/sd5mCui6rTjNhXSmWXLTx6i 4vAZdjSJdzgIpj6NcTJFn7UO4EG5SDn9vRTlx6uzfCFefl1ALKc/mu10NrhBNW0netBg h4hw== X-Gm-Message-State: AJaThX4yLIYZOf07IvgyoMg8X5dCdWPXY2eNtGb33EXSOmeclt/ogv+l XpoOGvuZgraH9skGBLcrIH1FnbYV/wH3tOfY3KLoXw== X-Google-Smtp-Source: AGs4zMbrFL8L38MnCIS5CMHQ46wx+sliK/89MQ+WNbLzooti90q8DJ6fYTEkh25yZk4Yfr3HdY7IGBAAs1D2sa8PbPM= X-Received: by 10.36.101.207 with SMTP id u198mr1039315itb.50.1510810645633; Wed, 15 Nov 2017 21:37:25 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Wed, 15 Nov 2017 21:37:24 -0800 (PST) X-Originating-IP: [2603:300b:6:5100:9151:cca:5a07:fd20] In-Reply-To: References: <201711151840.vAFIefKV002185@repo.freebsd.org> <201711151847.vAFIlGD9052509@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Wed, 15 Nov 2017 22:37:24 -0700 X-Google-Sender-Auth: iTPOztqcmiuLoYSvKRmXhjOSc2A Message-ID: Subject: Re: svn commit: r325860 - head/sbin/newfs To: Ed Maste Cc: "Rodney W. Grimes" , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Kirk McKusick Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 05:37:26 -0000 On Wed, Nov 15, 2017 at 10:17 PM, Warner Losh wrote: > > > On Wed, Nov 15, 2017 at 6:46 PM, Ed Maste wrote: > >> On 15 November 2017 at 19:36, Warner Losh wrote: >> > >> > On Wed, Nov 15, 2017 at 5:05 PM, Ed Maste wrote: >> >> >> >> On 15 November 2017 at 13:47, Rodney W. Grimes >> >> wrote: >> >> >> Author: emaste >> >> >> Date: Wed Nov 15 18:40:40 2017 >> >> >> New Revision: 325860 >> >> >> URL: https://svnweb.freebsd.org/changeset/base/325860 >> >> >> >> >> >> Log: >> >> >> newfs: warn if newer than kernel >> >> >> >> >> >> Creating a UFS filesystem with a newfs newer than the running >> kernel, >> >> >> and then mounting that filesystem, can lead to interesting >> failures. >> >> >> >> >> >> Add a safety belt to explicitly warn when newfs is newer than the >> >> >> running kernel. >> >> > >> >> > You should probably make the warning if (newer || older) as >> >> > either is likely to have interesting side effects, as are >> >> > mounting ufs file systems on different versions. >> >> >> >> Why would an older newfs cause trouble? Forward compatibility should be >> >> fine >> > >> > The only scenario that 'old' would cause problems is that if you did a >> newfs >> > with a new binary on a new kernel, mounted the file system, wrote files >> to >> > it, then rebooted with an old kernel, mounted the filesystem there, >> writing >> > new files to it, and then unmounting and running with a new kernel. >> >> Right, but that's not older newfs. AFAICT there's no reason at all for >> a (newer || older) warning. > > > I concur. > > > I'm not sure that the new safety belt is reasonable. Today it's fine, but >> > over time it will start producing false-positive warnings since the real >> > issue is just before/after the cg change, not old/new in general. I'd be >> > tempted to make a check against newfs being >= 1200046 while the kernel >> is < >> > 1200046. There wasn't a specific bump for this change to sys/param.h, >> but >> > this version was bumped within a few hours of Kirk's change. >> >> Well, we don't in general support using a userland newer than the >> running kernel, other than on a best-effort basis to facilitate >> upgrades and development. This one is only a warning so I don't see >> much harm in leaving it in place, and it would catch any new cases of >> a similar nature. If such a warning was already in place we might have >> avoided the issue where our snapshots produced checksum mismatch >> messages. But I don't have a strong objection to a hardcoded version >> check. >> > > What would have fixed the snapshot isn't a warning that nobody will > notice. But rather something like the following: > > diff --git a/sbin/fsck_ffs/pass5.c b/sbin/fsck_ffs/pass5.c > index 16c46bece00..06e1838a7f1 100644 > --- a/sbin/fsck_ffs/pass5.c > +++ b/sbin/fsck_ffs/pass5.c > @@ -73,6 +73,7 @@ pass5(void) > 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 && > + getosreldate() >= 1200046 && > reply("ADD CYLINDER GROUP CHECKSUM PROTECTION") != 0) { > fs->fs_metackhash |= CK_CYLGRP; > rewritecg = 1; > diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c > index f68c42ec6b3..0e7ee539265 100644 > --- a/sbin/newfs/mkfs.c > +++ b/sbin/newfs/mkfs.c > @@ -495,7 +495,7 @@ restart: > /* > * Set flags for metadata that is being check-hashed. > */ > - if (Oflag > 1) > + if (Oflag > 1 && getosreldate() >= 1200046) > sblock.fs_metackhash = CK_CYLGRP; > > /* > > which would avoid setting the flag on a problematical kernel. Here forward > compat is easy, and the consequences are scary messages, so I think we > should do something more like the above. I don't think we need some kind of > "do it anyway" override flag. since that doesn't fit well with the rest of > UFS "works by default where we can figure it out" philosophy. > > I'll cleanup the above with a #define for 1200046. I've cc'd Kirk to see > what he thinks of the idea. It generally fits with what we've done in the > past for forward compat that's easy but protects the user from harshness. > I've gone ahead and tidied it up in https://reviews.freebsd.org/D13114 for anybody that's interested. Warner From owner-svn-src-head@freebsd.org Thu Nov 16 06:31:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 534E3DBF3A9; Thu, 16 Nov 2017 06:31:06 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 161A06EAF5; Thu, 16 Nov 2017 06:31:05 +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 0F3F110A7DB; Thu, 16 Nov 2017 01:31:04 -0500 (EST) From: John Baldwin To: Warner Losh Cc: Ed Maste , "Rodney W. Grimes" , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Kirk McKusick Subject: Re: svn commit: r325860 - head/sbin/newfs Date: Wed, 15 Nov 2017 22:29:11 -0800 Message-ID: <6247771.UqFN5CEdG4@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: References: <201711151840.vAFIefKV002185@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Thu, 16 Nov 2017 01:31:04 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 06:31:06 -0000 On Wednesday, November 15, 2017 10:17:27 PM Warner Losh wrote: > On Wed, Nov 15, 2017 at 6:46 PM, Ed Maste wrote: > > > On 15 November 2017 at 19:36, Warner Losh wrote: > > > > > > On Wed, Nov 15, 2017 at 5:05 PM, Ed Maste wrote: > > >> > > >> On 15 November 2017 at 13:47, Rodney W. Grimes > > >> wrote: > > >> >> Author: emaste > > >> >> Date: Wed Nov 15 18:40:40 2017 > > >> >> New Revision: 325860 > > >> >> URL: https://svnweb.freebsd.org/changeset/base/325860 > > >> >> > > >> >> Log: > > >> >> newfs: warn if newer than kernel > > >> >> > > >> >> Creating a UFS filesystem with a newfs newer than the running > > kernel, > > >> >> and then mounting that filesystem, can lead to interesting > > failures. > > >> >> > > >> >> Add a safety belt to explicitly warn when newfs is newer than the > > >> >> running kernel. > > >> > > > >> > You should probably make the warning if (newer || older) as > > >> > either is likely to have interesting side effects, as are > > >> > mounting ufs file systems on different versions. > > >> > > >> Why would an older newfs cause trouble? Forward compatibility should be > > >> fine > > > > > > The only scenario that 'old' would cause problems is that if you did a > > newfs > > > with a new binary on a new kernel, mounted the file system, wrote files > > to > > > it, then rebooted with an old kernel, mounted the filesystem there, > > writing > > > new files to it, and then unmounting and running with a new kernel. > > > > Right, but that's not older newfs. AFAICT there's no reason at all for > > a (newer || older) warning. > > > I concur. > > > I'm not sure that the new safety belt is reasonable. Today it's fine, but > > > over time it will start producing false-positive warnings since the real > > > issue is just before/after the cg change, not old/new in general. I'd be > > > tempted to make a check against newfs being >= 1200046 while the kernel > > is < > > > 1200046. There wasn't a specific bump for this change to sys/param.h, but > > > this version was bumped within a few hours of Kirk's change. > > > > Well, we don't in general support using a userland newer than the > > running kernel, other than on a best-effort basis to facilitate > > upgrades and development. This one is only a warning so I don't see > > much harm in leaving it in place, and it would catch any new cases of > > a similar nature. If such a warning was already in place we might have > > avoided the issue where our snapshots produced checksum mismatch > > messages. But I don't have a strong objection to a hardcoded version > > check. > > > > What would have fixed the snapshot isn't a warning that nobody will notice. > But rather something like the following: No, what would really fix the snapshot is using makefs or the host newfs instead of the target newfs during the build. That part of the release process is still fundamentally broken and fixing that wouldn't require various one-off fixes for future changes that happen to introduce compatability but would fix the entire class of issues. -- John Baldwin From owner-svn-src-head@freebsd.org Thu Nov 16 07:14:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC3DEDC0BE7; Thu, 16 Nov 2017 07:14:30 +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 762E07030D; Thu, 16 Nov 2017 07:14:30 +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 vAG7ETaJ025835; Thu, 16 Nov 2017 07:14:29 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAG7ETkZ025834; Thu, 16 Nov 2017 07:14:29 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201711160714.vAG7ETkZ025834@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 16 Nov 2017 07:14:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325886 - head/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Commit-Revision: 325886 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 07:14:30 -0000 Author: markj Date: Thu Nov 16 07:14:29 2017 New Revision: 325886 URL: https://svnweb.freebsd.org/changeset/base/325886 Log: Take r313504 into account when recomputing the string table length. When we encounter a USDT probe in a weak symbol, we emit an alias for the probe function symbol. Such aliases are named differently from the aliases we emit for probes in local functions, so make sure to take that difference into account when resizing the output object file's string table. Otherwise, we underrun the string table buffer. PR: 223680 Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Thu Nov 16 06:55:57 2017 (r325885) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Thu Nov 16 07:14:29 2017 (r325886) @@ -1416,8 +1416,15 @@ process_obj(dtrace_hdl_t *dtp, const char *obj, int *e "expected %s to be of type function", s)); } - len = snprintf(NULL, 0, dt_symfmt, dt_symprefix, - objkey, s) + 1; + /* + * Aliases of weak symbols don't get a uniquifier. + */ + if (GELF_ST_BIND(fsym.st_info) == STB_WEAK) + len = snprintf(NULL, 0, dt_weaksymfmt, + dt_symprefix, s) + 1; + else + len = snprintf(NULL, 0, dt_symfmt, dt_symprefix, + objkey, s) + 1; if ((p = dt_alloc(dtp, len)) == NULL) { dt_strtab_destroy(strtab); goto err; From owner-svn-src-head@freebsd.org Thu Nov 16 07:15:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44960DC0CDE for ; Thu, 16 Nov 2017 07:15:48 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id CA3F070495 for ; Thu, 16 Nov 2017 07:15:47 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.103] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id BA9FA1A1BE3; Thu, 16 Nov 2017 18:15:39 +1100 (AEDT) Date: Thu, 16 Nov 2017 18:15:36 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Mark Millard cc: svn-src-head@freebsd.org Subject: Re: svn commit: r325765 - head/lib/libc/string In-Reply-To: <37F2AD18-1B69-4559-8BD3-B92E01A067BF@dsl-only.net> Message-ID: <20171116171111.D1034@besplex.bde.org> References: <37F2AD18-1B69-4559-8BD3-B92E01A067BF@dsl-only.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=KeqiiUQD c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=8ezO6BSHHXrXaAvICcMA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 07:15:48 -0000 On Wed, 15 Nov 2017, Mark Millard wrote: > Bruce Evans brde at optusnet.com.au wrote on > Tue Nov 14 12:41:50 UTC 2017 : > >> - memcpy.3. It was already documented in the BUGS section that memcpy() is >> implemented as bcopy() and therefore the "strings" "may overlap" [then >> portability considerations due to this]. This is buggier than before: >> - old bug: only the MI implementation of memcpy() clearly implements >> memcpy() as bcopy(). The amd64, i386 and arm MD implementations >> do the same. I was confused between arm and mips and only fixed this in some places. It is mips that does the same as amd64 and i386. arm has different MD code, and the others have no md code. > head/sys/arm/arm/support.S ( -r283366 ) has > > 394 ENTRY(bcopy) > 395 /* switch the source and destination registers */ > 396 eor r0, r1, r0 > 397 eor r1, r0, r1 > 398 eor r0, r1, r0 > 399 EENTRY(memmove) > 400 /* Do the buffers overlap? */ > 401 cmp r0, r1 > 402 RETeq /* Bail now if src/dst are the same */ > 403 subcc r3, r0, r1 /* if (dst > src) r3 = dst - src */ > 404 subcs r3, r1, r0 /* if (src > dsr) r3 = src - dst */ > 405 cmp r3, r2 /* if (r3 < len) we have an overlap */ > 406 bcc PIC_SYM(_C_LABEL(memcpy), PLT) > . . . I didn't look closely at the arm code, and just noticed more bugs in it. Falling through like that breaks at least profiling. Only ENTRY() does _PROF_PROLOGUE, so profiling of memmove() seems to be broken. A less worse way to use EENTRY() is ENTRY() then 1 more more EENTRY()'s with no code in between. Then the names are just aliases. Profiling can't distinguish the aliases, but at least all entries get counted. amd64 and i386 use ALTENTRY() which handles this as well as possible (not very well -- like a tail call -- too much gets charged to the tail function. sparc64 also has ALTENTRY() but not the complications needed for it to work only as badly as a tail call. It is a style bug for memmove() to exist in the kernel. Especially an MD version of it. It is bad enough that libkern has an MI memmove(). This is not the same as the libc/string one (another style bug), but just implements memmove() by calling bcopy(). Profiling works right for this unless it the function is over-optimized to a tail call when it works like ALTENTRY(). > head/lib/libc/arm/string/memmove.S ( -r288373 ) has: > > 37 #ifndef _BCOPY > 38 /* LINTSTUB: Func: void *memmove(void *, const void *, size_t) */ > 39 ENTRY(memmove) > 40 #else > 41 /* bcopy = memcpy/memmove with arguments reversed. */ > 42 /* LINTSTUB: Func: void bcopy(void *, void *, size_t) */ > 43 ENTRY(bcopy) > 44 /* switch the source and destination registers */ > 45 eor r0, r1, r0 > 46 eor r1, r0, r1 > 47 eor r0, r1, r0 > 48 #endif This is the correct way to do it -- separate object files with duplication in source files avoided using ifdefs. > 49 /* Do the buffers overlap? */ > 50 cmp r0, r1 > 51 it eq > 52 RETeq /* Bail now if src/dst are the same */ > 53 ite cc > 54 subcc r3, r0, r1 /* if (dst > src) r3 = dst - src */ > 55 subcs r3, r1, r0 /* if (src > dsr) r3 = src - dst */ > 56 cmp r3, r2 /* if (r3 < len) we have an overlap */ > 57 bcc PIC_SYM(_C_LABEL(memcpy), PLT) > . . . > > It looks to me like bcopy and memmove call memcpy under > some conditions, not the other way around. I did not > notice any code in memcpy going back to bcopy (or > memmove) in either area. (That might have lead to > recursion as things are.) The above only shows memmove() calling bcopy(), only in the kernel. This would be invalid in userland since memmove() is Standard but bcopy() is supposed to be usable by applications (unless __BSD_VISIBLE). The separate object files in userland make this not a problem. Otherwise, bcopy and memmove in the same object file would cause namespace problems even if bcopy is implemented as a [tail] call or fall-through to memmove. > ... > Another issue is if compilers (clang, gcc) are well > controlled for code substitutions to preserve > supposed FreeBSD rules about where overlaps > are well defined. The library code might not be all > there is to it as far as behavior goes for > compiled C/C++ source code. Do you mean the namespace stuff? > head/sys/arm64/arm64/ is similar for bcopy/memmove > calling memcpy (but head/lib/libc/amd64/string/ is > not): It is reasonable, and possibly best, to implement the usual non-overlapping case by a call to memcpy() and not try hard to optimize the overlapping case (or jump far away to it to keep caches cleaner for the usual case). > head/sys/arm64/arm64/memmove.S ( -r307909 ) has: > ... > head/lib/libc/amd64/string/bcopy.S has: > ... Same organisation as for plain arm, so good for libc and not so good fot the kernel. >> mips is backwards for bcopy() and implements it as >> memmove(). mips has 2 separate memcpy*.S files, one for plain arm >> and one for xscale. The plain arm one is smaller than memmove.S, >> so presumably doesn't support overlapped copies. The xscale one >> is much larger, so has space for overlapped copies and many optimizations >> that no longer work. I don't know what it does. > > The mix of "mips" and "arm"/"xscale" above confused me. Looking > around this seems to be referencing head/lib/libc/arm/string/ > materials instead of head/lib/libc/mips/string/ or > head/sys/mips/mips/ materials. I meant arm here. mips does have some MI string instructions in libc which I missed or got confused before. Also, aarch64 has some which I missed because the they are obfuscated by putting them in contrib instead of under libc. mips implements all of bcopy, memcpy and memmove in bcopy.S, and seems to be indeed like amd64 and i386 -- none of these arches bothers to optimize memcpy by not supporting overlapping copies in it, exactly as documented. However, the documentation is still incorrect. Without -ffreestanding, compilers can and do often implement memcpy inline. Then overlapping copies are not supported. The BUGS section in memcpy.3 should just be deleted. Bruce From owner-svn-src-head@freebsd.org Thu Nov 16 07:25:13 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0DA6DC1014; Thu, 16 Nov 2017 07:25: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 A94F770883; Thu, 16 Nov 2017 07:25: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 vAG7PCUZ029897; Thu, 16 Nov 2017 07:25:12 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAG7PCZd029895; Thu, 16 Nov 2017 07:25:12 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201711160725.vAG7PCZd029895@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 16 Nov 2017 07:25:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325887 - in head/sys/cddl: compat/opensolaris/kern contrib/opensolaris/uts/intel/dtrace X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/sys/cddl: compat/opensolaris/kern contrib/opensolaris/uts/intel/dtrace X-SVN-Commit-Revision: 325887 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 07:25:14 -0000 Author: markj Date: Thu Nov 16 07:25:12 2017 New Revision: 325887 URL: https://svnweb.freebsd.org/changeset/base/325887 Log: Avoid holding the process in uread() and uwrite(). In general, higher-level code will atomically verify that the process is not exiting and hold the process. In one case, we were using uwrite() to copy a probed instruction to a per-thread scratch space block, but copyout() can be used for this purpose instead; this change effectively reverts r227291. MFC after: 1 week Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_proc.c head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_proc.c ============================================================================== --- head/sys/cddl/compat/opensolaris/kern/opensolaris_proc.c Thu Nov 16 07:14:29 2017 (r325886) +++ head/sys/cddl/compat/opensolaris/kern/opensolaris_proc.c Thu Nov 16 07:25:12 2017 (r325887) @@ -35,9 +35,7 @@ uread(proc_t *p, void *kaddr, size_t len, uintptr_t ua { ssize_t n; - PHOLD(p); n = proc_readmem(curthread, p, uaddr, kaddr, len); - PRELE(p); if (n != len) return (ENOMEM); return (0); @@ -48,9 +46,7 @@ uwrite(proc_t *p, void *kaddr, size_t len, uintptr_t u { ssize_t n; - PHOLD(p); n = proc_writemem(curthread, p, uaddr, kaddr, len); - PRELE(p); if (n != len) return (ENOMEM); return (0); Modified: head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Thu Nov 16 07:14:29 2017 (r325886) +++ head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Thu Nov 16 07:25:12 2017 (r325887) @@ -1715,11 +1715,7 @@ fasttrap_pid_probe(struct reg *rp) ASSERT(i <= sizeof (scratch)); -#ifdef illumos if (fasttrap_copyout(scratch, (char *)addr, i)) { -#else - if (uwrite(p, scratch, i, addr)) { -#endif fasttrap_sigtrap(p, curthread, pc); new_pc = pc; break; From owner-svn-src-head@freebsd.org Thu Nov 16 09:04:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B343DD59A1; Thu, 16 Nov 2017 09:04:48 +0000 (UTC) (envelope-from bapt@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 0B4FE73000; Thu, 16 Nov 2017 09:04:48 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1235) id 669CF1F2A7; Thu, 16 Nov 2017 09:04:47 +0000 (UTC) Date: Thu, 16 Nov 2017 10:04:47 +0100 From: Baptiste Daroussin To: Conrad Meyer Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Allan Jude Subject: Re: svn commit: r316980 - head/contrib/zstd/programs Message-ID: <20171116090447.sjwtzrwgyuarh7kv@ivaldir.net> References: <201704152015.v3FKFiwZ006836@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="sgncchjjlsrijyau" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171027 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 09:04:48 -0000 --sgncchjjlsrijyau Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 15, 2017 at 07:38:13PM -0800, Conrad Meyer wrote: > Please revert this change. >=20 > First, it introduces the POLA-violating behavior that zstdcat deletes > its source files. This is not how zcat/bzcat behaves. This is not a POLA-violating behavior, this is a bug! that I introduced. >=20 > Second, it introduces a needless behavioral difference between FreeBSD > zstd and the rest of the world's zstd. The zstd documentation we ship > continues to claim that zstd preserves source files by default, yet > this change makes that documentation exactly backwards. While we can > change FreeBSD's documentation to accommodate the change, we can't > change Google results. >=20 The difference has been made so that zstd follow by default the same behavi= our has gzip/bzip2/xz so it can be a dropped in replacement. The argument about the documentation is however a good one. Let me do first= some tests to ensure restoring the initial behaviour does not break existing usa= ge in base Best regards, Bapt --sgncchjjlsrijyau Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAloNVKwACgkQY4mL3PG3 PlqJOxAA2AXl/BmzunHf+ptGhDVz1dSLpUNatOCBfzW5cq5FOIhMXs/OLMwBF+Go tOA2HNmtXUlDfR56dIV8vger55DtO/X3cdSDxGP8h9KX6wrxxGSvLqaTcmzUcIyY rViG0rDbKT958IqrV2VdLVGOy27uch8Vv7DMJvjbYCq0RSQED9BayDbgjlhp4T3x PiRz6DctY1qsnPKRc6oOG6L2Tj8C/VhwLos7e6CZES/P7uwZrbW+lC4mRu1t4ktl Y3yTrYw+bl8vh9XLHUnYQKGwQpr0ynJ5wSYyNjeTLSc3ZP60nVG+HMhQ5EkJXq96 0DiM+gNSHVDkmTTfycB9DGEXO8a8vV+6ZP9dcL1grE7BYdSsPtmL2gRIZKeDwttA YfyZKkathq51ei+ID1TujRaK+IKIwoxCFnvGvA6c5+wdJCn/ufTRDCJ3VlOBoa9F vcdZNEdYW9E39sMT6ilEsXtP3/zWKway2+X6VcmC/f6fBBj7rdeAhFnOcVKxqruI Avzb4Tx3EKgo0rUa0tyaSVJ2fxz1KcyOUqajNVrrzkOa+Eef4LYaDb/h/mf6a0a6 XO3rqP/pln2wfCJf4jYwo7FG5YoiKBVDvRAAKAF9k0FiBax/dPYVNs4/VqqZGawj KwHiM0fOrVsobSIy6aMvV5Uwjz6hSEBlBFpwNgXE4JpZC1wRdAA= =+P0A -----END PGP SIGNATURE----- --sgncchjjlsrijyau-- From owner-svn-src-head@freebsd.org Thu Nov 16 09:20:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56C59DD5E1C for ; Thu, 16 Nov 2017 09:20:03 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-139.reflexion.net [208.70.210.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C5B673557 for ; Thu, 16 Nov 2017 09:20:02 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 21630 invoked from network); 16 Nov 2017 09:19:55 -0000 Received: from unknown (HELO mail-cs-02.app.dca.reflexion.local) (10.81.19.2) by 0 (rfx-qmail) with SMTP; 16 Nov 2017 09:19:55 -0000 Received: by mail-cs-02.app.dca.reflexion.local (Reflexion email security v8.40.3) with SMTP; Thu, 16 Nov 2017 04:19:55 -0500 (EST) Received: (qmail 26537 invoked from network); 16 Nov 2017 09:19:54 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 16 Nov 2017 09:19:54 -0000 Received: from [192.168.1.25] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 58C68EC9411; Thu, 16 Nov 2017 01:19:54 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r325765 - head/lib/libc/string From: Mark Millard In-Reply-To: <20171116171111.D1034@besplex.bde.org> Date: Thu, 16 Nov 2017 01:19:53 -0800 Cc: svn-src-head@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: <118E01FA-340B-4A1B-95F2-F8ABD582114B@dsl-only.net> References: <37F2AD18-1B69-4559-8BD3-B92E01A067BF@dsl-only.net> <20171116171111.D1034@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 09:20:03 -0000 On 2017-Nov-15, at 11:15 PM, Bruce Evans wrote: > On Wed, 15 Nov 2017, Mark Millard wrote: > >> Bruce Evans brde at optusnet.com.au wrote on >> Tue Nov 14 12:41:50 UTC 2017 : >> >>> . . . > >> head/sys/arm/arm/support.S ( -r283366 ) has >> >> 394 ENTRY(bcopy) >> 395 /* switch the source and destination registers */ >> 396 eor r0, r1, r0 >> 397 eor r1, r0, r1 >> 398 eor r0, r1, r0 >> 399 EENTRY(memmove) >> 400 /* Do the buffers overlap? */ >> 401 cmp r0, r1 >> 402 RETeq /* Bail now if src/dst are the same */ >> 403 subcc r3, r0, r1 /* if (dst > src) r3 = dst - src */ >> 404 subcs r3, r1, r0 /* if (src > dsr) r3 = src - dst */ >> 405 cmp r3, r2 /* if (r3 < len) we have an overlap */ >> 406 bcc PIC_SYM(_C_LABEL(memcpy), PLT) >> . . . > > . . . > >> head/lib/libc/arm/string/memmove.S ( -r288373 ) has: >> >> 37 #ifndef _BCOPY >> 38 /* LINTSTUB: Func: void *memmove(void *, const void *, size_t) */ >> 39 ENTRY(memmove) >> 40 #else >> 41 /* bcopy = memcpy/memmove with arguments reversed. */ >> 42 /* LINTSTUB: Func: void bcopy(void *, void *, size_t) */ >> 43 ENTRY(bcopy) >> 44 /* switch the source and destination registers */ >> 45 eor r0, r1, r0 >> 46 eor r1, r0, r1 >> 47 eor r0, r1, r0 >> 48 #endif > > . . . > >> 49 /* Do the buffers overlap? */ >> 50 cmp r0, r1 >> 51 it eq >> 52 RETeq /* Bail now if src/dst are the same */ >> 53 ite cc >> 54 subcc r3, r0, r1 /* if (dst > src) r3 = dst - src */ >> 55 subcs r3, r1, r0 /* if (src > dsr) r3 = src - dst */ >> 56 cmp r3, r2 /* if (r3 < len) we have an overlap */ >> 57 bcc PIC_SYM(_C_LABEL(memcpy), PLT) >> . . . >> >> . . . > > The above only shows memmove() calling bcopy(), only in the kernel. > . . . I was referring to the "bcc PIC_SYM(_C_LABEL(memcpy), PLT)", which jumps to memcpy, not to bcopy. In both bcopy and memcopy there is the conditional jump to memcpy, in both libc/arm/string/memmove.S and sys/arm/arm/support.S . (I claim that the selection code is wrong and should follow the later netbsd update. Netbsd used to have code like the above for those details. But that is not the primary point here. Also: This note is from my memory of the issue, not a recent recheck.) >> ... >> Another issue is if compilers (clang, gcc) are well >> controlled for code substitutions to preserve >> supposed FreeBSD rules about where overlaps >> are well defined. The library code might not be all >> there is to it as far as behavior goes for >> compiled C/C++ source code. > > Do you mean the namespace stuff? No, I meant what you later referred to with: QUOTE Without -ffreestanding, compilers can and do often implement memcpy inline. Then overlapping copies are not supported. The BUGS section in memcpy.3 should just be deleted. END QUOTE Sufficient memcpy behavior documentation for C/C++/. . . has to consider compiler code generation as well, not just what the library code does if called. >> head/sys/arm64/arm64/ is similar for bcopy/memmove >> calling memcpy (but head/lib/libc/amd64/string/ is >> not): > > It is reasonable, and possibly best, to implement the usual > non-overlapping case by a call to memcpy() and not try hard to > optimize the overlapping case (or jump far away to it to keep > caches cleaner for the usual case). arm (32-bit) has code attempting to pick when to do a "bcc PIC_SYM(_C_LABEL(memcpy), PLT)" from memmove and from bcopy. >> head/sys/arm64/arm64/memmove.S ( -r307909 ) has: >> ... >> head/lib/libc/amd64/string/bcopy.S has: >> ... My switch to looking at libc/amd64/'s bcopy.S was unintentional. I was thinking of arm64 when looking at amd64 --even though there was a libc/aarch64/ right there to see as well. head/contrib/cortex-strings/src/aarch64/memmove.S's code has memmove use memcpy for backwards copies with overlapping objects and for forward copies with small-enough overlapping objects. (head/contrib/cortex-strings/src/aarch64/memcpy.S handles overlaps in small-enough objects by reading the object in completely before writing any of it back out. memmove depends on such details.) The details here are different from the 32-bit arm handling of memmove and memcpy. === Mark Millard markmi at dsl-only.net From owner-svn-src-head@freebsd.org Thu Nov 16 10:15:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D812DD85BC; Thu, 16 Nov 2017 10:15:19 +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 37FCB74EDE; Thu, 16 Nov 2017 10:15:19 +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 vAGAFIT1000339; Thu, 16 Nov 2017 10:15:18 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAGAFIJq000337; Thu, 16 Nov 2017 10:15:18 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201711161015.vAGAFIJq000337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 16 Nov 2017 10:15:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325888 - in head/sys/cam: ata scsi X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: in head/sys/cam: ata scsi X-SVN-Commit-Revision: 325888 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 10:15:19 -0000 Author: bapt Date: Thu Nov 16 10:15:17 2017 New Revision: 325888 URL: https://svnweb.freebsd.org/changeset/base/325888 Log: Add some 4k quirks for Samsung pm863a SSDs Submitted by: Nikita Kozlov MFC after: 3 days Sponsored by: blade Differential Revision: https://reviews.freebsd.org/D13093 Modified: head/sys/cam/ata/ata_da.c head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Thu Nov 16 07:25:12 2017 (r325887) +++ head/sys/cam/ata/ata_da.c Thu Nov 16 10:15:17 2017 (r325888) @@ -696,6 +696,14 @@ static struct ada_quirk_entry ada_quirk_table[] = }, { /* + * Same as for SAMSUNG MZ7* but enable the quirks for SSD + * starting with MZ7* too + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "MZ7*", "*" }, + /*quirks*/ADA_Q_4K | ADA_Q_NCQ_TRIM_BROKEN + }, + { + /* * Samsung PM851 Series SSDs Dell OEM * device model "SAMSUNG SSD PM851 mSATA 256GB" * 4k optimised, NCQ broken Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Thu Nov 16 07:25:12 2017 (r325887) +++ head/sys/cam/scsi/scsi_da.c Thu Nov 16 10:15:17 2017 (r325888) @@ -1311,6 +1311,14 @@ static struct da_quirk_entry da_quirk_table[] = }, { /* + * Same as for SAMSUNG MZ7* but enable the quirks for SSD + * starting with MZ7* too + */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "MZ7*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* * SuperTalent TeraDrive CT SSDs * 4k optimised & trim only works in 4k requests + 4k aligned */ From owner-svn-src-head@freebsd.org Thu Nov 16 14:27:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C47DDDF190; Thu, 16 Nov 2017 14:27: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 E4A7F7C8FD; Thu, 16 Nov 2017 14:27:03 +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 vAGER3px039320; Thu, 16 Nov 2017 14:27:03 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAGER2xj039311; Thu, 16 Nov 2017 14:27:02 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201711161427.vAGER2xj039311@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 16 Nov 2017 14:27:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325892 - in head/sys: conf i386/conf i386/i386 i386/include i386/pci i386/xbox isa x86/x86 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: conf i386/conf i386/i386 i386/include i386/pci i386/xbox isa x86/x86 X-SVN-Commit-Revision: 325892 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 14:27:04 -0000 Author: kib Date: Thu Nov 16 14:27:02 2017 New Revision: 325892 URL: https://svnweb.freebsd.org/changeset/base/325892 Log: Remove i386 XBOX support. It is for console presented at 2001 and featuring Pentium III processor. Even if any of them are still alive and run FreeBSD, we do not have any sign of life from their users. While removing another dozens of #ifdefs from the i386 sources reduces the aversion from looking at the code and improves the platform vitality. Reviewed by: cem, pfg, rink (XBOX support author) Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D13016 Deleted: head/sys/i386/conf/XBOX head/sys/i386/include/xbox.h head/sys/i386/xbox/ Modified: head/sys/conf/files.i386 head/sys/conf/options head/sys/i386/conf/NOTES head/sys/i386/i386/machdep.c head/sys/i386/i386/pmap.c head/sys/i386/i386/vm_machdep.c head/sys/i386/pci/pci_cfgreg.c head/sys/isa/syscons_isa.c head/sys/x86/x86/cpu_machdep.c Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Thu Nov 16 13:28:00 2017 (r325891) +++ head/sys/conf/files.i386 Thu Nov 16 14:27:02 2017 (r325892) @@ -549,10 +549,6 @@ libkern/ucmpdi2.c standard libkern/udivdi3.c standard libkern/umoddi3.c standard libkern/x86/crc32_sse42.c standard -i386/xbox/xbox.c optional xbox -i386/xbox/xboxfb.c optional xboxfb -dev/fb/boot_font.c optional xboxfb -i386/xbox/pic16l.s optional xbox # # x86 real mode BIOS support, required by dpms/pci/vesa # Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Thu Nov 16 13:28:00 2017 (r325891) +++ head/sys/conf/options Thu Nov 16 14:27:02 2017 (r325892) @@ -892,9 +892,6 @@ HWPMC_DEBUG opt_global.h HWPMC_HOOKS HWPMC_MIPS_BACKTRACE opt_hwpmc_hooks.h -# XBOX options for FreeBSD/i386, but some files are MI -XBOX opt_xbox.h - # Interrupt filtering INTR_FILTER Modified: head/sys/i386/conf/NOTES ============================================================================== --- head/sys/i386/conf/NOTES Thu Nov 16 13:28:00 2017 (r325891) +++ head/sys/i386/conf/NOTES Thu Nov 16 14:27:02 2017 (r325892) @@ -221,23 +221,6 @@ options NPX_DEBUG # enable npx debugging # options PERFMON -# -# XBOX causes the kernel to be bootable on the Microsoft XBox console system. -# The resulting kernel will auto-detect whether it is being booted on a XBox, -# so kernels compiled with this option will also work on an ordinary PC. -# This option require I686_CPU. -# -# xboxfb includes support for the XBox frame buffer device. It is fully USB- -# keyboard aware, and will only be used if an xbox is detected. This option -# (obviously) requires XBOX support in your kernel. -# -# NOTE: xboxfb currently conflicts with syscons(4); if you have an XBOX and -# include both in your kernel; you will not get any video output. Ordinary -# PC's do not suffer from this. -# -options XBOX -device xboxfb - ##################################################################### # NETWORKING OPTIONS Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Thu Nov 16 13:28:00 2017 (r325891) +++ head/sys/i386/i386/machdep.c Thu Nov 16 14:27:02 2017 (r325892) @@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include "opt_mp_watchdog.h" #include "opt_perfmon.h" #include "opt_platform.h" -#include "opt_xbox.h" #include #include @@ -148,13 +147,6 @@ __FBSDID("$FreeBSD$"); #include #endif -#ifdef XBOX -#include - -int arch_i386_is_xbox = 0; -uint32_t arch_i386_xbox_memsize = 0; -#endif - /* Sanity check for __curthread() */ CTASSERT(offsetof(struct pcpu, pc_curthread) == 0); @@ -1780,18 +1772,6 @@ getmemsize(int first) caddr_t kmdp; has_smap = 0; -#ifdef XBOX - if (arch_i386_is_xbox) { - /* - * We queried the memory size before, so chop off 4MB for - * the framebuffer and inform the OS of this. - */ - physmap[0] = 0; - physmap[1] = (arch_i386_xbox_memsize * 1024 * 1024) - XBOX_FB_SIZE; - physmap_idx = 0; - goto physmap_done; - } -#endif bzero(&vmf, sizeof(vmf)); bzero(physmap, sizeof(physmap)); basemem = 0; @@ -2299,28 +2279,6 @@ init386(int first) r_idt.rd_limit = sizeof(idt0) - 1; r_idt.rd_base = (int) idt; lidt(&r_idt); - -#ifdef XBOX - /* - * The following code queries the PCI ID of 0:0:0. For the XBOX, - * This should be 0x10de / 0x02a5. - * - * This is exactly what Linux does. - */ - outl(0xcf8, 0x80000000); - if (inl(0xcfc) == 0x02a510de) { - arch_i386_is_xbox = 1; - pic16l_setled(XBOX_LED_GREEN); - - /* - * We are an XBOX, but we may have either 64MB or 128MB of - * memory. The PCI host bridge should be programmed for this, - * so we just query it. - */ - outl(0xcf8, 0x80000084); - arch_i386_xbox_memsize = (inl(0xcfc) == 0x7FFFFFF) ? 128 : 64; - } -#endif /* XBOX */ /* * Initialize the clock before the console so that console Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Thu Nov 16 13:28:00 2017 (r325891) +++ head/sys/i386/i386/pmap.c Thu Nov 16 14:27:02 2017 (r325892) @@ -101,7 +101,6 @@ __FBSDID("$FreeBSD$"); #include "opt_pmap.h" #include "opt_smp.h" #include "opt_vm.h" -#include "opt_xbox.h" #include #include @@ -149,10 +148,6 @@ __FBSDID("$FreeBSD$"); #include #endif -#ifdef XBOX -#include -#endif - #ifndef PMAP_SHPGPERPROC #define PMAP_SHPGPERPROC 200 #endif @@ -501,12 +496,6 @@ pmap_bootstrap(vm_paddr_t firstaddr) * physical memory region that is used by the ACPI wakeup code. This * mapping must not have PG_G set. */ -#ifdef XBOX - /* FIXME: This is gross, but needed for the XBOX. Since we are in such - * an early stadium, we cannot yet neatly map video memory ... :-( - * Better fixes are very welcome! */ - if (!arch_i386_is_xbox) -#endif for (i = 1; i < NKPT; i++) PTD[i] = 0; Modified: head/sys/i386/i386/vm_machdep.c ============================================================================== --- head/sys/i386/i386/vm_machdep.c Thu Nov 16 13:28:00 2017 (r325891) +++ head/sys/i386/i386/vm_machdep.c Thu Nov 16 14:27:02 2017 (r325892) @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include "opt_npx.h" #include "opt_reset.h" #include "opt_cpu.h" -#include "opt_xbox.h" #include #include @@ -91,10 +90,6 @@ __FBSDID("$FreeBSD$"); #include -#ifdef XBOX -#include -#endif - #ifndef NSFBUFS #define NSFBUFS (512 + maxusers * 16) #endif @@ -600,14 +595,6 @@ cpu_reset_proxy() void cpu_reset() { -#ifdef XBOX - if (arch_i386_is_xbox) { - /* Kick the PIC16L, it can reboot the box */ - pic16l_reboot(); - for (;;); - } -#endif - #ifdef SMP cpuset_t map; u_int cnt; Modified: head/sys/i386/pci/pci_cfgreg.c ============================================================================== --- head/sys/i386/pci/pci_cfgreg.c Thu Nov 16 13:28:00 2017 (r325891) +++ head/sys/i386/pci/pci_cfgreg.c Thu Nov 16 14:27:02 2017 (r325892) @@ -30,8 +30,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_xbox.h" - #include #include #include @@ -52,10 +50,6 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef XBOX -#include -#endif - #define PRVERB(a) do { \ if (bootverbose) \ printf a ; \ @@ -252,39 +246,6 @@ static int pci_cfgenable(unsigned bus, unsigned slot, unsigned func, int reg, int bytes) { int dataport = 0; - -#ifdef XBOX - if (arch_i386_is_xbox) { - /* - * The Xbox MCPX chipset is a derivative of the nForce 1 - * chipset. It almost has the same bus layout; some devices - * cannot be used, because they have been removed. - */ - - /* - * Devices 00:00.1 and 00:00.2 used to be memory controllers on - * the nForce chipset, but on the Xbox, using them will lockup - * the chipset. - */ - if (bus == 0 && slot == 0 && (func == 1 || func == 2)) - return dataport; - - /* - * Bus 1 only contains a VGA controller at 01:00.0. When you try - * to probe beyond that device, you only get garbage, which - * could cause lockups. - */ - if (bus == 1 && (slot != 0 || func != 0)) - return dataport; - - /* - * Bus 2 used to contain the AGP controller, but the Xbox MCPX - * doesn't have one. Probing it can cause lockups. - */ - if (bus >= 2) - return dataport; - } -#endif if (bus <= PCI_BUSMAX && slot < devmax Modified: head/sys/isa/syscons_isa.c ============================================================================== --- head/sys/isa/syscons_isa.c Thu Nov 16 13:28:00 2017 (r325891) +++ head/sys/isa/syscons_isa.c Thu Nov 16 14:27:02 2017 (r325892) @@ -60,12 +60,6 @@ __FBSDID("$FreeBSD$"); #include -#include "opt_xbox.h" - -#ifdef XBOX -#include -#endif - static devclass_t sc_devclass; static sc_softc_t main_softc; @@ -157,19 +151,6 @@ sc_get_cons_priority(int *unit, int *flags) { const char *at; int f, u; - -#ifdef XBOX - /* - * The XBox Loader does not support hints, which makes our initial - * console probe fail. Therefore, if an XBox is found, we hardcode the - * existence of the console, as it is always there anyway. - */ - if (arch_i386_is_xbox) { - *unit = 0; - *flags = SC_KERNEL_CONSOLE; - return (CN_INTERNAL); - } -#endif *unit = -1; for (u = 0; u < 16; u++) { Modified: head/sys/x86/x86/cpu_machdep.c ============================================================================== --- head/sys/x86/x86/cpu_machdep.c Thu Nov 16 13:28:00 2017 (r325891) +++ head/sys/x86/x86/cpu_machdep.c Thu Nov 16 14:27:02 2017 (r325892) @@ -54,7 +54,6 @@ __FBSDID("$FreeBSD$"); #include "opt_platform.h" #ifdef __i386__ #include "opt_apic.h" -#include "opt_xbox.h" #endif #include From owner-svn-src-head@freebsd.org Thu Nov 16 14:37:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81371DDF673; Thu, 16 Nov 2017 14:37:20 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D75C7CF71; Thu, 16 Nov 2017 14:37:20 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAGEbJme043921; Thu, 16 Nov 2017 14:37:19 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAGEbIvj043914; Thu, 16 Nov 2017 14:37:18 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201711161437.vAGEbIvj043914@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 16 Nov 2017 14:37:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325893 - in head: . etc/mtree share/man/man7 share/man/man9 targets/pseudo/hosttools targets/pseudo/userland usr.bin usr.bin/xlint X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head: . etc/mtree share/man/man7 share/man/man9 targets/pseudo/hosttools targets/pseudo/userland usr.bin usr.bin/xlint X-SVN-Commit-Revision: 325893 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 14:37:20 -0000 Author: kib Date: Thu Nov 16 14:37:18 2017 New Revision: 325893 URL: https://svnweb.freebsd.org/changeset/base/325893 Log: Remove xlint(1). xlint is currently a fossil. We have much more useful and alive tools to do now what xlint did twenty years ago. I did not cleared some stuff which makes lint operational, in sys/x86/include and sys/sys, but I might do it as followup. The x86/include/ucontext.h and _types.h hacks made to please lint was the main reason for my initial proposal to classify xlint as obsolete and to remove it. Also I do not intend to clear sccs ids. Reviewed by: bapt, brooks, emaste, jhb, pfg Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D13015 Deleted: head/usr.bin/xlint/ Modified: head/ObsoleteFiles.inc head/etc/mtree/BSD.usr.dist head/share/man/man7/hier.7 head/share/man/man9/style.9 head/targets/pseudo/hosttools/Makefile.depend.host head/targets/pseudo/userland/Makefile.depend head/usr.bin/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Nov 16 14:27:02 2017 (r325892) +++ head/ObsoleteFiles.inc Thu Nov 16 14:37:18 2017 (r325893) @@ -38,6 +38,15 @@ # xargs -n1 | sort | uniq -d; # done +# 20171116: lint(1) removal +OLD_FILES+=usr/bin/lint +OLD_FILES+=usr/libexec/lint1 +OLD_FILES+=usr/libexec/lint2 +OLD_FILES+=usr/libdata/lint/llib-lposix.ln +OLD_FILES+=usr/libdata/lint/llib-lstdc.ln +OLD_FILES+=usr/share/man/man1/lint.1.gz +OLD_FILES+=usr/share/man/man7/lint.7.gz +OLD_DIRS+=usr/libdata/lint # 20171114: Removal of all fortune datfiles other than freebsd-tips OLD_FILES+=usr/share/games/fortune/fortunes OLD_FILES+=usr/share/games/fortune/fortunes.dat Modified: head/etc/mtree/BSD.usr.dist ============================================================================== --- head/etc/mtree/BSD.usr.dist Thu Nov 16 14:27:02 2017 (r325892) +++ head/etc/mtree/BSD.usr.dist Thu Nov 16 14:37:18 2017 (r325893) @@ -56,8 +56,6 @@ .. ldscripts .. - lint - .. pkgconfig .. .. Modified: head/share/man/man7/hier.7 ============================================================================== --- head/share/man/man7/hier.7 Thu Nov 16 14:27:02 2017 (r325892) +++ head/share/man/man7/hier.7 Thu Nov 16 14:37:18 2017 (r325893) @@ -364,10 +364,6 @@ configuration data linker scripts; see .Xr ld 1 -.It Pa lint/ -various prebuilt lint libraries; -see -.Xr lint 1 .El .Pp .It Pa libexec/ Modified: head/share/man/man9/style.9 ============================================================================== --- head/share/man/man9/style.9 Thu Nov 16 14:27:02 2017 (r325892) +++ head/share/man/man9/style.9 Thu Nov 16 14:37:18 2017 (r325893) @@ -867,14 +867,11 @@ KNF compliant in the repository must not diverge from compliance. .Pp Whenever possible, code should be run through a code checker -(e.g., -.Xr lint 1 -or +(e.g., various static analyzers or .Nm cc Fl Wall ) and produce minimal warnings. .Sh SEE ALSO .Xr indent 1 , -.Xr lint 1 , .Xr err 3 , .Xr warn 3 , .Xr style.Makefile 5 Modified: head/targets/pseudo/hosttools/Makefile.depend.host ============================================================================== --- head/targets/pseudo/hosttools/Makefile.depend.host Thu Nov 16 14:27:02 2017 (r325892) +++ head/targets/pseudo/hosttools/Makefile.depend.host Thu Nov 16 14:37:18 2017 (r325893) @@ -15,7 +15,6 @@ DIRDEPS = \ usr.bin/mkcsmapper_static \ usr.bin/mkesdb_static \ usr.bin/xinstall \ - usr.bin/xlint/xlint \ usr.bin/yacc \ usr.sbin/config \ usr.sbin/crunch/crunchgen \ Modified: head/targets/pseudo/userland/Makefile.depend ============================================================================== --- head/targets/pseudo/userland/Makefile.depend Thu Nov 16 14:27:02 2017 (r325892) +++ head/targets/pseudo/userland/Makefile.depend Thu Nov 16 14:37:18 2017 (r325893) @@ -416,10 +416,6 @@ DIRDEPS+= \ usr.bin/write \ usr.bin/xargs \ usr.bin/xinstall \ - usr.bin/xlint/lint1 \ - usr.bin/xlint/lint2 \ - usr.bin/xlint/llib \ - usr.bin/xlint/xlint \ usr.bin/xo \ usr.bin/xstr \ usr.bin/xz \ Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Thu Nov 16 14:27:02 2017 (r325892) +++ head/usr.bin/Makefile Thu Nov 16 14:37:18 2017 (r325893) @@ -278,9 +278,6 @@ SUBDIR.${MK_TOOLCHAIN}+= rpcgen SUBDIR.${MK_TOOLCHAIN}+= unifdef SUBDIR.${MK_TOOLCHAIN}+= size SUBDIR.${MK_TOOLCHAIN}+= strings -.if ${MACHINE_ARCH} != "aarch64" # ARM64TODO xlint does not build -SUBDIR.${MK_TOOLCHAIN}+= xlint -.endif SUBDIR.${MK_TOOLCHAIN}+= xstr SUBDIR.${MK_TOOLCHAIN}+= yacc SUBDIR.${MK_VI}+= vi From owner-svn-src-head@freebsd.org Thu Nov 16 15:26:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B87AEDE111B; Thu, 16 Nov 2017 15:26:40 +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 9028C7E8FD; Thu, 16 Nov 2017 15:26:40 +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 vAGFQdEs064442; Thu, 16 Nov 2017 15:26:39 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAGFQdLO064441; Thu, 16 Nov 2017 15:26:39 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201711161526.vAGFQdLO064441@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 16 Nov 2017 15:26:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325897 - head/tools X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/tools X-SVN-Commit-Revision: 325897 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 15:26:40 -0000 Author: hselasky Date: Thu Nov 16 15:26:39 2017 New Revision: 325897 URL: https://svnweb.freebsd.org/changeset/base/325897 Log: Improve the library dependencies helper script in src/tools. Implement double pass of the relevant Makefiles. First make a list of library names and directories and then scan for all the dependencies. Spaces in directories in the source tree are not supported. This avoids using hardcoded mappings between the library name and the directory containing the library Makefile. Add support for scanning contrib/ofed . Bail out on any errors. Sponsored by: Mellanox Technologies MFC after: 1 week Modified: head/tools/make_libdeps.sh Modified: head/tools/make_libdeps.sh ============================================================================== --- head/tools/make_libdeps.sh Thu Nov 16 15:18:36 2017 (r325896) +++ head/tools/make_libdeps.sh Thu Nov 16 15:26:39 2017 (r325897) @@ -28,9 +28,12 @@ export PATH=/bin:/usr/bin +set -e + LC_ALL=C # make sort deterministic FS=': ' # internal field separator LIBDEPENDS=./_libdeps # intermediate output file +LIBDIRS=./_libdirs # intermediate output file USRSRC=${1:-/usr/src} # source root LIBS=" lib @@ -39,44 +42,74 @@ LIBS=" secure/lib usr.bin/lex/lib cddl/lib + contrib/ofed " # where to scan for libraries -# This sed(1) filter is used to convert -lfoo to path/to/libfoo. -# -SED_FILTER=" -sed -E - -e's; ;! ;g' - -e's;$;!;' - -e's;-lbsdxml!;lib/libexpat;g' - -e's;-lpthread!;lib/libthr;g' - -e's;-lm!;lib/msun;g' - -e's;-l(ncurses|termcap)!;lib/ncurses/ncurses;g' - -e's;-l(gcc)!;gnu/lib/lib\1;g' - -e's;-lssp_nonshared!;gnu/lib/libssp/libssp_nonshared;g' - -e's;-l(asn1|hdb|kdc|heimbase|heimntlm|heimsqlite|hx509|krb5|roken|wind)!;kerberos5/lib/lib\1;g' - -e's;-l(crypto|ssh|ssl)!;secure/lib/lib\1;g' - -e's;-l([^!]+)!;lib/lib\1;g' -" +# convert -lfoo to foo +convert() +{ + sed -e "s/\-l//g" -e "s/pthread/thr/g" -e "s/ncurses.*/ncurses/g" +} + +# find library build directory given library name +findlibdir() +{ + while read NAME && read DIR + do + if [ "$NAME" = "$1" ]; then + echo "$DIR" + exit + fi + done + + # Should not happen + echo lib_not_found/lib$1 +} + +# find library build directories given one or more library names +resolvelibdirs() +{ + while read LIBNAME + do + cat $LIBDIRS | tr ' ' '\n' | findlibdir "$LIBNAME" + done +} + # Generate interdependencies between libraries. # genlibdepends() { ( + # Reset file + echo -n > $LIBDIRS + + # First pass - generate list of directories cd ${USRSRC} - find -s ${LIBS} -mindepth 1 -name Makefile | + find -s ${LIBS} -name Makefile | xargs grep -l 'bsd\.lib\.mk' | while read makefile; do libdir=$(dirname ${makefile}) + libname=$( + cd ${libdir} + make -m ${USRSRC}/share/mk WITH_OFED=YES -V LIB + ) + if [ "${libname}" ]; then + echo "${libname} ${libdir}" >> $LIBDIRS + fi + done + + # Second pass - generate dependencies + find -s ${LIBS} -name Makefile | + xargs grep -l 'bsd\.lib\.mk' | + while read makefile; do + libdir=$(dirname ${makefile}) deps=$( cd ${libdir} - make -m ${USRSRC}/share/mk -V LDADD + make -m ${USRSRC}/share/mk WITH_OFED=YES -V LDADD ) if [ "${deps}" ]; then - echo ${libdir}"${FS}"$( - echo ${deps} | - eval ${SED_FILTER} - ) + echo ${libdir}"${FS}"$(echo ${deps} | tr ' ' '\n' | convert | resolvelibdirs) fi done ) From owner-svn-src-head@freebsd.org Thu Nov 16 15:27:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C449DE11F5 for ; Thu, 16 Nov 2017 15:27:46 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x232.google.com (mail-io0-x232.google.com [IPv6:2607:f8b0:4001:c06::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 1CFF67EA6E for ; Thu, 16 Nov 2017 15:27:46 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x232.google.com with SMTP id x63so5578866ioe.6 for ; Thu, 16 Nov 2017 07:27:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=t9jtwmyTprbi+k/iPeeB6OVOrHvrKRUIC+l6bkLzSfQ=; b=IwnNgC4OPot8a3botIAxs7zUFrML9sThuLZR9BKS7X+9HL91a1twSJz7lCGFDPCMce gT3JXE22FcQQW/N6aJXf/eUSRAzC5/RiK8tTKhmz8C/kcO0lj4Uh0weNPH44JCcOjW2U qDCPDKi0fBwlbwlQfEvIbOe9YN85gP1Z9/E6udrymiEZuWPypFRrCUxMGEHdmJAItqWH w7ajz3y7boNl8M+sIK+INFdCnNW92NViuvj0rybPgiWlU2/JNBNTsCYllCkTt+p8OJH8 8kTNQV+DPwOIcexzLUL17nPRSlaARRwO1qZ8DUiicnIcNoaxZItVC4gpUtyV6iFHyw0I lRwA== 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=t9jtwmyTprbi+k/iPeeB6OVOrHvrKRUIC+l6bkLzSfQ=; b=Z9ueOpn7iLSbn4DKqc0ZKJAvtxrRpEbPcTmRL4woPSUBQ0KG8/PiHERYhjFWD8nWON Og9wt3wuwei3acARpQW3GI/WUaZ4vQCHE21ndd2SKcRUJZCGVvxNWx8n80cnLO7AEMZ+ E+WOyIlR9F918gE2dSv1WZTSaD0ogVwgbIUN6Jb6spYRapL4/ILNiT0mM0dVT27zmfPq Gq7tbGHJN95nly2cbcu+PkpDH2Irqh+8SIv29rqC4W0kj+eTTSwHWeXHYQ0eIdkGtuDu rgowFzLYryr/zjtuqVqpt+lWZ3kjCpCf6Bi276Zgxsyj3x6sJDcGQbXQBQLWcRZ2Sg7+ W1zQ== X-Gm-Message-State: AJaThX4mFXYg7e5uOR8n28HJvDJaZDq1AaDZV3+uYaRfmIj+91RJ5cYh lwOcz2cYCd0KYUdACQk07qCxaJLgM2hEZPHfn6X6PQ== X-Google-Smtp-Source: AGs4zMavvfO96TiwwejITrNVLN2Tl8XM63Py22U+knPyn2Rsu7gyU6hQ00xqIU2Y75hGywQaCpGTaRYb2aozEmqFFPE= X-Received: by 10.107.52.80 with SMTP id b77mr2141513ioa.291.1510846063367; Thu, 16 Nov 2017 07:27:43 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Thu, 16 Nov 2017 07:27:42 -0800 (PST) X-Originating-IP: [63.225.28.164] In-Reply-To: <6247771.UqFN5CEdG4@ralph.baldwin.cx> References: <201711151840.vAFIefKV002185@repo.freebsd.org> <6247771.UqFN5CEdG4@ralph.baldwin.cx> From: Warner Losh Date: Thu, 16 Nov 2017 08:27:42 -0700 X-Google-Sender-Auth: u5PMRgrUKw-JD41l4ZdzFOxpCGw Message-ID: Subject: Re: svn commit: r325860 - head/sbin/newfs To: John Baldwin Cc: Ed Maste , "Rodney W. Grimes" , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Kirk McKusick Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 15:27:46 -0000 On Wed, Nov 15, 2017 at 11:29 PM, John Baldwin wrote: > On Wednesday, November 15, 2017 10:17:27 PM Warner Losh wrote: > > On Wed, Nov 15, 2017 at 6:46 PM, Ed Maste wrote: > > > > > On 15 November 2017 at 19:36, Warner Losh wrote: > > > > > > > > On Wed, Nov 15, 2017 at 5:05 PM, Ed Maste > wrote: > > > >> > > > >> On 15 November 2017 at 13:47, Rodney W. Grimes > > > >> wrote: > > > >> >> Author: emaste > > > >> >> Date: Wed Nov 15 18:40:40 2017 > > > >> >> New Revision: 325860 > > > >> >> URL: https://svnweb.freebsd.org/changeset/base/325860 > > > >> >> > > > >> >> Log: > > > >> >> newfs: warn if newer than kernel > > > >> >> > > > >> >> Creating a UFS filesystem with a newfs newer than the running > > > kernel, > > > >> >> and then mounting that filesystem, can lead to interesting > > > failures. > > > >> >> > > > >> >> Add a safety belt to explicitly warn when newfs is newer than > the > > > >> >> running kernel. > > > >> > > > > >> > You should probably make the warning if (newer || older) as > > > >> > either is likely to have interesting side effects, as are > > > >> > mounting ufs file systems on different versions. > > > >> > > > >> Why would an older newfs cause trouble? Forward compatibility > should be > > > >> fine > > > > > > > > The only scenario that 'old' would cause problems is that if you did > a > > > newfs > > > > with a new binary on a new kernel, mounted the file system, wrote > files > > > to > > > > it, then rebooted with an old kernel, mounted the filesystem there, > > > writing > > > > new files to it, and then unmounting and running with a new kernel. > > > > > > Right, but that's not older newfs. AFAICT there's no reason at all for > > > a (newer || older) warning. > > > > > > I concur. > > > > > I'm not sure that the new safety belt is reasonable. Today it's fine, > but > > > > over time it will start producing false-positive warnings since the > real > > > > issue is just before/after the cg change, not old/new in general. > I'd be > > > > tempted to make a check against newfs being >= 1200046 while the > kernel > > > is < > > > > 1200046. There wasn't a specific bump for this change to > sys/param.h, but > > > > this version was bumped within a few hours of Kirk's change. > > > > > > Well, we don't in general support using a userland newer than the > > > running kernel, other than on a best-effort basis to facilitate > > > upgrades and development. This one is only a warning so I don't see > > > much harm in leaving it in place, and it would catch any new cases of > > > a similar nature. If such a warning was already in place we might have > > > avoided the issue where our snapshots produced checksum mismatch > > > messages. But I don't have a strong objection to a hardcoded version > > > check. > > > > > > > What would have fixed the snapshot isn't a warning that nobody will > notice. > > But rather something like the following: > > No, what would really fix the snapshot is using makefs or the host newfs > instead of the target newfs during the build. That part of the release > process is still fundamentally broken and fixing that wouldn't require > various > one-off fixes for future changes that happen to introduce compatability but > would fix the entire class of issues. > I agree with that. However, more than just FreeBSD's release process uses the newly built tools to do things, so those tools shouldn't do dangerous things when it's trivial to know not to. They are orthogonal issues, imho. Netflix's upgrade process, for example, uses the new newfs on an old kernel, mounts the filesystem and then splats new content into the filesystem. The issue is larger than our somewhat imperfect (but working) release building process. Warmer From owner-svn-src-head@freebsd.org Thu Nov 16 16:04:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B86E6DE1EFD; Thu, 16 Nov 2017 16:04:29 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 57A927FF2E; Thu, 16 Nov 2017 16:04:29 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [10.1.1.2] (Seawolf.HML3.ScaleEngine.net [209.51.186.28]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id BE7F8EE1D; Thu, 16 Nov 2017 15:56:31 +0000 (UTC) Subject: Re: svn commit: r316980 - head/contrib/zstd/programs To: Baptiste Daroussin , Conrad Meyer Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201704152015.v3FKFiwZ006836@repo.freebsd.org> <20171116090447.sjwtzrwgyuarh7kv@ivaldir.net> From: Allan Jude Message-ID: <4fe304eb-eb98-2fcb-f8aa-4f0b433d2209@freebsd.org> Date: Thu, 16 Nov 2017 10:56:24 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171116090447.sjwtzrwgyuarh7kv@ivaldir.net> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="l5dcWr240hjmPr8r3X35MvwqPHDFxCehu" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 16:04:29 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --l5dcWr240hjmPr8r3X35MvwqPHDFxCehu Content-Type: multipart/mixed; boundary="ji1S7R5KVWLFqa4QRDfTSowAaNdnpRwO3"; protected-headers="v1" From: Allan Jude To: Baptiste Daroussin , Conrad Meyer Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <4fe304eb-eb98-2fcb-f8aa-4f0b433d2209@freebsd.org> Subject: Re: svn commit: r316980 - head/contrib/zstd/programs References: <201704152015.v3FKFiwZ006836@repo.freebsd.org> <20171116090447.sjwtzrwgyuarh7kv@ivaldir.net> In-Reply-To: <20171116090447.sjwtzrwgyuarh7kv@ivaldir.net> --ji1S7R5KVWLFqa4QRDfTSowAaNdnpRwO3 Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 2017-11-16 04:04, Baptiste Daroussin wrote: > On Wed, Nov 15, 2017 at 07:38:13PM -0800, Conrad Meyer wrote: >> Please revert this change. >> >> First, it introduces the POLA-violating behavior that zstdcat deletes >> its source files. This is not how zcat/bzcat behaves. >=20 > This is not a POLA-violating behavior, this is a bug! that I introduced= =2E >> >> Second, it introduces a needless behavioral difference between FreeBSD= >> zstd and the rest of the world's zstd. The zstd documentation we ship= >> continues to claim that zstd preserves source files by default, yet >> this change makes that documentation exactly backwards. While we can >> change FreeBSD's documentation to accommodate the change, we can't >> change Google results. >> >=20 > The difference has been made so that zstd follow by default the same be= haviour > has gzip/bzip2/xz so it can be a dropped in replacement. >=20 > The argument about the documentation is however a good one. Let me do f= irst some > tests to ensure restoring the initial behaviour does not break existing= usage in > base >=20 > Best regards, > Bapt >=20 I think in this case, it is safer to surprise the user by NOT deleting a file, than to surprise a user by DELETING a file. If you really want to modify the behaviour (I suggest we don't, and stick closer to upstream zstd), then you'll want to set the 'delete' flag for the specific invocation cases inside zstdcli.c, rather than modifying the default as was done in this commit. I think we can deal with changing the default verbosity level. I think if we want to compromise, we make 2 additional hard links, zzip and zunzip that maintain the gzip like behaviour, since those will not conflict with the documentation that exists in the rest of the world for zstd(1) --=20 Allan Jude --ji1S7R5KVWLFqa4QRDfTSowAaNdnpRwO3-- --l5dcWr240hjmPr8r3X35MvwqPHDFxCehu Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iQIcBAEBAgAGBQJaDbUuAAoJEBmVNT4SmAt+pkQP/0GFptJp8xFsvcxp6I/yRdWd 5fbIp7O/dsldglnlB89FhO/TO0P1QWk8vwsRRkTojXw+cx0FTekouNg6/q9NvLMh GLZB1z8ulKV02NbnxF1SJR8ZHadUnkbymhCEhAW1WiiQeJ2O66DKPC+0mlhYbVWF GcrRXDqCZ19WovipuoJ/GmFEW0+L2r4r44UekVJ5iY65y0n7mwGu7WKrsgqyfQGp Lb1U4MBnMGJh0S0dUNNRjsklPeoGkHjSIAbL5easrPXGkjp7kXVj5BqRv4VDT26f 71k5CQRcJEsQhPFzvqNOfT314zZlutCQJ84O628I9qZefQhpmod6Y8ThnWmaJai1 HmQpfnaqgSpRwwzCr/wuYazW7CmQnrjRgre9wXSNT7TVglDOCG53ZcaxJVIU/7Lm FtfCDJK6MQvGmsBNviKfWm8qp6UFq3vhUQM+sUiUVE7Fg53AmVOuBmCWSF3afM4c 6ezEVoOFP4ZnwBSkDaH956ZUvNgiKnspAvn8vZN6U/w7dh96v8kR8L3CCZykc3an 6yXyJ1v30cV59ytimu9hJrS1SW4cq6uzSrp3tiVC/A61NJB78syEk2hV40ws1ChK Nl3SRWPCJ/WfNumKQpei3AheptsCJFUabjmK/2IqXGFxTp3C5bnRDIqpbVnu5Eb3 9h2xxZFMk4Ipr0sDDjmF =o/mq -----END PGP SIGNATURE----- --l5dcWr240hjmPr8r3X35MvwqPHDFxCehu-- From owner-svn-src-head@freebsd.org Thu Nov 16 16:58:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C409DE2E9B; Thu, 16 Nov 2017 16:58:30 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CAFA1A25; Thu, 16 Nov 2017 16:58:29 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vAGGwLs1056684; Thu, 16 Nov 2017 08:58:21 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vAGGwLab056683; Thu, 16 Nov 2017 08:58:21 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201711161658.vAGGwLab056683@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r325893 - in head: . etc/mtree share/man/man7 share/man/man9 targets/pseudo/hosttools targets/pseudo/userland usr.bin usr.bin/xlint In-Reply-To: <201711161437.vAGEbIvj043914@repo.freebsd.org> To: Konstantin Belousov Date: Thu, 16 Nov 2017 08:58:21 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 16:58:30 -0000 > Author: kib > Date: Thu Nov 16 14:37:18 2017 > New Revision: 325893 > URL: https://svnweb.freebsd.org/changeset/base/325893 > > Log: > Remove xlint(1). > > xlint is currently a fossil. We have much more useful and alive tools > to do now what xlint did twenty years ago. > > I did not cleared some stuff which makes lint operational, in > sys/x86/include and sys/sys, but I might do it as followup. The > x86/include/ucontext.h and _types.h hacks made to please lint was the > main reason for my initial proposal to classify xlint as obsolete and > to remove it. > > Also I do not intend to clear sccs ids. > > Reviewed by: bapt, brooks, emaste, jhb, pfg > Sponsored by: The FreeBSD Foundation > Differential revision: https://reviews.freebsd.org/D13015 > > Deleted: > head/usr.bin/xlint/ > Modified: > head/ObsoleteFiles.inc > head/etc/mtree/BSD.usr.dist > head/share/man/man7/hier.7 > head/share/man/man9/style.9 > head/targets/pseudo/hosttools/Makefile.depend.host > head/targets/pseudo/userland/Makefile.depend > head/usr.bin/Makefile Relnotes: Y, And deprication procedures need to be followed. > Modified: head/ObsoleteFiles.inc > ============================================================================== > --- head/ObsoleteFiles.inc Thu Nov 16 14:27:02 2017 (r325892) > +++ head/ObsoleteFiles.inc Thu Nov 16 14:37:18 2017 (r325893) > @@ -38,6 +38,15 @@ > # xargs -n1 | sort | uniq -d; > # done > > +# 20171116: lint(1) removal > +OLD_FILES+=usr/bin/lint > +OLD_FILES+=usr/libexec/lint1 > +OLD_FILES+=usr/libexec/lint2 > +OLD_FILES+=usr/libdata/lint/llib-lposix.ln > +OLD_FILES+=usr/libdata/lint/llib-lstdc.ln > +OLD_FILES+=usr/share/man/man1/lint.1.gz > +OLD_FILES+=usr/share/man/man7/lint.7.gz > +OLD_DIRS+=usr/libdata/lint > # 20171114: Removal of all fortune datfiles other than freebsd-tips > OLD_FILES+=usr/share/games/fortune/fortunes > OLD_FILES+=usr/share/games/fortune/fortunes.dat > > Modified: head/etc/mtree/BSD.usr.dist > ============================================================================== > --- head/etc/mtree/BSD.usr.dist Thu Nov 16 14:27:02 2017 (r325892) > +++ head/etc/mtree/BSD.usr.dist Thu Nov 16 14:37:18 2017 (r325893) > @@ -56,8 +56,6 @@ > .. > ldscripts > .. > - lint > - .. > pkgconfig > .. > .. > > Modified: head/share/man/man7/hier.7 > ============================================================================== > --- head/share/man/man7/hier.7 Thu Nov 16 14:27:02 2017 (r325892) > +++ head/share/man/man7/hier.7 Thu Nov 16 14:37:18 2017 (r325893) > @@ -364,10 +364,6 @@ configuration data > linker scripts; > see > .Xr ld 1 > -.It Pa lint/ > -various prebuilt lint libraries; > -see > -.Xr lint 1 > .El > .Pp > .It Pa libexec/ > > Modified: head/share/man/man9/style.9 > ============================================================================== > --- head/share/man/man9/style.9 Thu Nov 16 14:27:02 2017 (r325892) > +++ head/share/man/man9/style.9 Thu Nov 16 14:37:18 2017 (r325893) > @@ -867,14 +867,11 @@ KNF > compliant in the repository must not diverge from compliance. > .Pp > Whenever possible, code should be run through a code checker > -(e.g., > -.Xr lint 1 > -or > +(e.g., various static analyzers or > .Nm cc Fl Wall ) > and produce minimal warnings. > .Sh SEE ALSO > .Xr indent 1 , > -.Xr lint 1 , > .Xr err 3 , > .Xr warn 3 , > .Xr style.Makefile 5 > > Modified: head/targets/pseudo/hosttools/Makefile.depend.host > ============================================================================== > --- head/targets/pseudo/hosttools/Makefile.depend.host Thu Nov 16 14:27:02 2017 (r325892) > +++ head/targets/pseudo/hosttools/Makefile.depend.host Thu Nov 16 14:37:18 2017 (r325893) > @@ -15,7 +15,6 @@ DIRDEPS = \ > usr.bin/mkcsmapper_static \ > usr.bin/mkesdb_static \ > usr.bin/xinstall \ > - usr.bin/xlint/xlint \ > usr.bin/yacc \ > usr.sbin/config \ > usr.sbin/crunch/crunchgen \ > > Modified: head/targets/pseudo/userland/Makefile.depend > ============================================================================== > --- head/targets/pseudo/userland/Makefile.depend Thu Nov 16 14:27:02 2017 (r325892) > +++ head/targets/pseudo/userland/Makefile.depend Thu Nov 16 14:37:18 2017 (r325893) > @@ -416,10 +416,6 @@ DIRDEPS+= \ > usr.bin/write \ > usr.bin/xargs \ > usr.bin/xinstall \ > - usr.bin/xlint/lint1 \ > - usr.bin/xlint/lint2 \ > - usr.bin/xlint/llib \ > - usr.bin/xlint/xlint \ > usr.bin/xo \ > usr.bin/xstr \ > usr.bin/xz \ > > Modified: head/usr.bin/Makefile > ============================================================================== > --- head/usr.bin/Makefile Thu Nov 16 14:27:02 2017 (r325892) > +++ head/usr.bin/Makefile Thu Nov 16 14:37:18 2017 (r325893) > @@ -278,9 +278,6 @@ SUBDIR.${MK_TOOLCHAIN}+= rpcgen > SUBDIR.${MK_TOOLCHAIN}+= unifdef > SUBDIR.${MK_TOOLCHAIN}+= size > SUBDIR.${MK_TOOLCHAIN}+= strings > -.if ${MACHINE_ARCH} != "aarch64" # ARM64TODO xlint does not build > -SUBDIR.${MK_TOOLCHAIN}+= xlint > -.endif > SUBDIR.${MK_TOOLCHAIN}+= xstr > SUBDIR.${MK_TOOLCHAIN}+= yacc > SUBDIR.${MK_VI}+= vi > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Thu Nov 16 18:53:00 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A494DE5E8C; Thu, 16 Nov 2017 18:53:00 +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 E903565A91; Thu, 16 Nov 2017 18:52:59 +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 vAGIqxln054839; Thu, 16 Nov 2017 18:52:59 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAGIqxQ7054838; Thu, 16 Nov 2017 18:52:59 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201711161852.vAGIqxQ7054838@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Thu, 16 Nov 2017 18:52:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325901 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 325901 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 18:53:00 -0000 Author: shurd Date: Thu Nov 16 18:52:58 2017 New Revision: 325901 URL: https://svnweb.freebsd.org/changeset/base/325901 Log: Fix default numbers of iflib queue sets The intent appears to be having one RX/TX queue set per core, but since scctx->isc_n[tr]xqsets is set to max before calling iflib_msix_init(), both end up being set to total number of cores. Use ctx->ifc_sysctl_n[rt]xqs as the selected value and scctx->isc_n[rt]xqsets as the max. This should result in what appears to be the intended behaviour Reviewed by: sbruno Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D13096 Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Thu Nov 16 18:22:03 2017 (r325900) +++ head/sys/net/iflib.c Thu Nov 16 18:52:58 2017 (r325901) @@ -5312,11 +5312,11 @@ iflib_msix_init(if_ctx_t ctx) int iflib_num_tx_queues, iflib_num_rx_queues; int err, admincnt, bar; - iflib_num_tx_queues = scctx->isc_ntxqsets; - iflib_num_rx_queues = scctx->isc_nrxqsets; + iflib_num_tx_queues = ctx->ifc_sysctl_ntxqs; + iflib_num_rx_queues = ctx->ifc_sysctl_nrxqs; - device_printf(dev, "msix_init qsets capped at %d\n", iflib_num_tx_queues); - + device_printf(dev, "msix_init qsets capped at %d\n", imax(scctx->isc_ntxqsets, scctx->isc_nrxqsets)); + bar = ctx->ifc_softc_ctx.isc_msix_bar; admincnt = sctx->isc_admin_intrcnt; /* Override by global tuneable */ @@ -5414,6 +5414,10 @@ iflib_msix_init(if_ctx_t ctx) rx_queues = iflib_num_rx_queues; else rx_queues = queues; + + if (rx_queues > scctx->isc_nrxqsets) + rx_queues = scctx->isc_nrxqsets; + /* * We want this to be all logical CPUs by default */ @@ -5421,6 +5425,9 @@ iflib_msix_init(if_ctx_t ctx) tx_queues = iflib_num_tx_queues; else tx_queues = mp_ncpus; + + if (tx_queues > scctx->isc_ntxqsets) + tx_queues = scctx->isc_ntxqsets; if (ctx->ifc_sysctl_qs_eq_override == 0) { #ifdef INVARIANTS From owner-svn-src-head@freebsd.org Thu Nov 16 21:28:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02391DE9C9E; Thu, 16 Nov 2017 21:28:16 +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 D07896B236; Thu, 16 Nov 2017 21:28:15 +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 vAGLSEcU019178; Thu, 16 Nov 2017 21:28:14 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAGLSEpZ019174; Thu, 16 Nov 2017 21:28:14 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201711162128.vAGLSEpZ019174@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 16 Nov 2017 21:28:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325903 - in head: sbin/fsck_ffs sbin/newfs sys/sys X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: sbin/fsck_ffs sbin/newfs sys/sys X-SVN-Commit-Revision: 325903 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 21:28:16 -0000 Author: imp Date: Thu Nov 16 21:28:14 2017 New Revision: 325903 URL: https://svnweb.freebsd.org/changeset/base/325903 Log: Only try to enable CK_CLYGRP if we're running on kernel newer than 1200046, the first version that supports this feature. If we set it, then use an old kernel, we'll break the 'contract' of having checksummed cylinder groups this flag signifies. To avoid creating something with an inconsistent state, don't turn the flag on in these cases. The first full fsck with a new kernel will turn this on. Spnsored by: Netflix Differential Revision: https://reviews.freebsd.org/D13114 Modified: head/sbin/fsck_ffs/pass5.c head/sbin/newfs/mkfs.c head/sbin/newfs/newfs.c head/sys/sys/param.h Modified: head/sbin/fsck_ffs/pass5.c ============================================================================== --- head/sbin/fsck_ffs/pass5.c Thu Nov 16 19:07:19 2017 (r325902) +++ head/sbin/fsck_ffs/pass5.c Thu Nov 16 21:28:14 2017 (r325903) @@ -35,6 +35,7 @@ static const char sccsid[] = "@(#)pass5.c 8.9 (Berkele #include __FBSDID("$FreeBSD$"); +#define IN_RTLD /* So we pickup the P_OSREL defines */ #include #include @@ -73,6 +74,7 @@ pass5(void) 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 && + getosreldate() >= P_OSREL_CK_CLYGRP && reply("ADD CYLINDER GROUP CHECKSUM PROTECTION") != 0) { fs->fs_metackhash |= CK_CYLGRP; rewritecg = 1; Modified: head/sbin/newfs/mkfs.c ============================================================================== --- head/sbin/newfs/mkfs.c Thu Nov 16 19:07:19 2017 (r325902) +++ head/sbin/newfs/mkfs.c Thu Nov 16 21:28:14 2017 (r325903) @@ -44,6 +44,7 @@ static char sccsid[] = "@(#)mkfs.c 8.11 (Berkeley) 5/3 #include __FBSDID("$FreeBSD$"); +#define IN_RTLD /* So we pickup the P_OSREL defines */ #include #include #include @@ -495,7 +496,7 @@ restart: /* * Set flags for metadata that is being check-hashed. */ - if (Oflag > 1) + if (Oflag > 1 && getosreldate() >= P_OSREL_CK_CLYGRP) sblock.fs_metackhash = CK_CYLGRP; /* Modified: head/sbin/newfs/newfs.c ============================================================================== --- head/sbin/newfs/newfs.c Thu Nov 16 19:07:19 2017 (r325902) +++ head/sbin/newfs/newfs.c Thu Nov 16 21:28:14 2017 (r325903) @@ -398,10 +398,6 @@ main(int argc, char *argv[]) if (pp != NULL) pp->p_size *= secperblk; } - if (getosreldate() < __FreeBSD_version) { - warnx("%s is newer than the running kernel and may not be compatible", - getprogname()); - } mkfs(pp, special); ufs_disk_close(&disk); if (!jflag) Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Thu Nov 16 19:07:19 2017 (r325902) +++ head/sys/sys/param.h Thu Nov 16 21:28:14 2017 (r325903) @@ -84,6 +84,7 @@ #define P_OSREL_SHUTDOWN_ENOTCONN 1100077 #define P_OSREL_MAP_GUARD 1200035 #define P_OSREL_WRFSBASE 1200041 +#define P_OSREL_CK_CLYGRP 1200046 #define P_OSREL_VMTOTAL64 1200054 #define P_OSREL_MAJOR(x) ((x) / 100000) From owner-svn-src-head@freebsd.org Thu Nov 16 22:14:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02608DEB3DF; Thu, 16 Nov 2017 22:14: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 C2F1C6D47D; Thu, 16 Nov 2017 22:14: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 vAGMEnJI041229; Thu, 16 Nov 2017 22:14:49 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAGMEn3P041228; Thu, 16 Nov 2017 22:14:49 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201711162214.vAGMEn3P041228@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 16 Nov 2017 22:14:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325906 - head/usr.bin/procstat X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/usr.bin/procstat X-SVN-Commit-Revision: 325906 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 22:14:51 -0000 Author: avg Date: Thu Nov 16 22:14:49 2017 New Revision: 325906 URL: https://svnweb.freebsd.org/changeset/base/325906 Log: procstat: fix a crash with -k -a options The traditional / legacy usage should still be supported. This fixes a regression in r324619 that introduced a nicer, verb based interface. Reviewed by: brooks X-MFC with: r324619 Modified: head/usr.bin/procstat/procstat.c Modified: head/usr.bin/procstat/procstat.c ============================================================================== --- head/usr.bin/procstat/procstat.c Thu Nov 16 21:47:41 2017 (r325905) +++ head/usr.bin/procstat/procstat.c Thu Nov 16 22:14:49 2017 (r325906) @@ -296,7 +296,7 @@ main(int argc, char *argv[]) cmd = getcmd("tsignals"); break; case 'k': - if (cmd->cmd == procstat_kstack) { + if (cmd != NULL && cmd->cmd == procstat_kstack) { if ((procstat_opts & PS_OPT_VERBOSE) != 0) usage(); procstat_opts |= PS_OPT_VERBOSE; From owner-svn-src-head@freebsd.org Thu Nov 16 23:24:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FC45DED434; Thu, 16 Nov 2017 23:24:25 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0EF4970782; Thu, 16 Nov 2017 23:24:24 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vAGNONjf058060; Thu, 16 Nov 2017 15:24:23 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vAGNONIg058059; Thu, 16 Nov 2017 15:24:23 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201711162324.vAGNONIg058059@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r325903 - in head: sbin/fsck_ffs sbin/newfs sys/sys In-Reply-To: <201711162128.vAGLSEpZ019174@repo.freebsd.org> To: Warner Losh Date: Thu, 16 Nov 2017 15:24:23 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 23:24:25 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: imp > Date: Thu Nov 16 21:28:14 2017 > New Revision: 325903 > URL: https://svnweb.freebsd.org/changeset/base/325903 > > Log: > Only try to enable CK_CLYGRP if we're running on kernel newer than > 1200046, the first version that supports this feature. If we set it, > then use an old kernel, we'll break the 'contract' of having > checksummed cylinder groups this flag signifies. To avoid creating > something with an inconsistent state, don't turn the flag on in these > cases. The first full fsck with a new kernel will turn this on. I would much rather have to force this flag on, then my problem would for the most part just go away, I can move file systems back and forth between kernels without any problems. Having fsck just turn it on without even a message let alone a way to stop it being turned on increases the pain factor. > Spnsored by: Netflix > Differential Revision: https://reviews.freebsd.org/D13114 > > Modified: > head/sbin/fsck_ffs/pass5.c > head/sbin/newfs/mkfs.c > head/sbin/newfs/newfs.c > head/sys/sys/param.h > > Modified: head/sbin/fsck_ffs/pass5.c > ============================================================================== > --- head/sbin/fsck_ffs/pass5.c Thu Nov 16 19:07:19 2017 (r325902) > +++ head/sbin/fsck_ffs/pass5.c Thu Nov 16 21:28:14 2017 (r325903) > @@ -35,6 +35,7 @@ static const char sccsid[] = "@(#)pass5.c 8.9 (Berkele > #include > __FBSDID("$FreeBSD$"); > > +#define IN_RTLD /* So we pickup the P_OSREL defines */ > #include > #include > > @@ -73,6 +74,7 @@ pass5(void) > 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 && > + getosreldate() >= P_OSREL_CK_CLYGRP && > reply("ADD CYLINDER GROUP CHECKSUM PROTECTION") != 0) { > fs->fs_metackhash |= CK_CYLGRP; > rewritecg = 1; > > Modified: head/sbin/newfs/mkfs.c > ============================================================================== > --- head/sbin/newfs/mkfs.c Thu Nov 16 19:07:19 2017 (r325902) > +++ head/sbin/newfs/mkfs.c Thu Nov 16 21:28:14 2017 (r325903) > @@ -44,6 +44,7 @@ static char sccsid[] = "@(#)mkfs.c 8.11 (Berkeley) 5/3 > #include > __FBSDID("$FreeBSD$"); > > +#define IN_RTLD /* So we pickup the P_OSREL defines */ > #include > #include > #include > @@ -495,7 +496,7 @@ restart: > /* > * Set flags for metadata that is being check-hashed. > */ > - if (Oflag > 1) > + if (Oflag > 1 && getosreldate() >= P_OSREL_CK_CLYGRP) > sblock.fs_metackhash = CK_CYLGRP; > > /* > > Modified: head/sbin/newfs/newfs.c > ============================================================================== > --- head/sbin/newfs/newfs.c Thu Nov 16 19:07:19 2017 (r325902) > +++ head/sbin/newfs/newfs.c Thu Nov 16 21:28:14 2017 (r325903) > @@ -398,10 +398,6 @@ main(int argc, char *argv[]) > if (pp != NULL) > pp->p_size *= secperblk; > } > - if (getosreldate() < __FreeBSD_version) { > - warnx("%s is newer than the running kernel and may not be compatible", > - getprogname()); > - } > mkfs(pp, special); > ufs_disk_close(&disk); > if (!jflag) > > Modified: head/sys/sys/param.h > ============================================================================== > --- head/sys/sys/param.h Thu Nov 16 19:07:19 2017 (r325902) > +++ head/sys/sys/param.h Thu Nov 16 21:28:14 2017 (r325903) > @@ -84,6 +84,7 @@ > #define P_OSREL_SHUTDOWN_ENOTCONN 1100077 > #define P_OSREL_MAP_GUARD 1200035 > #define P_OSREL_WRFSBASE 1200041 > +#define P_OSREL_CK_CLYGRP 1200046 > #define P_OSREL_VMTOTAL64 1200054 > > #define P_OSREL_MAJOR(x) ((x) / 100000) > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Fri Nov 17 01:00:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD0B3DEF4BD for ; Fri, 17 Nov 2017 01:00:05 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x231.google.com (mail-it0-x231.google.com [IPv6:2607:f8b0:4001:c0b::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6B97473223 for ; Fri, 17 Nov 2017 01:00:05 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x231.google.com with SMTP id x28so2239585ita.0 for ; Thu, 16 Nov 2017 17:00:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=ccro9Dd086CB2ZYec2y8I+NUUz0UXhtmZTxGeOF4e7Q=; b=nwL82dA8YQSdX+X1piAfDiaMgzIhpfajHTWyDlBiDUAcyLbOvN5jqEydLrPfr/otRP StV6JCSGlxlkowmYFesL0SbcwvC2gGbxx9rQjZeIrPhBuAmk5jbfNT3thEcEu9VohSq5 P8p5voudgf+ggD7XNOA//b/ImnXjeVAvnL+Rfox8Ljvsp8MNcJ0AMSSr7IrVvFZJCzHN mADIdYCgbWp3g+D5m8RxjXHRh47pGD3bfGtCKR4YR50F35iAc+7kygVhwTkFbZyjU004 5RJzekgq/MOO+e/jwZf0iwh06zL1mpR4rC6XlfIFZERNeTjpNuzAqRpehzJdyayPanaw MroQ== 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=ccro9Dd086CB2ZYec2y8I+NUUz0UXhtmZTxGeOF4e7Q=; b=IgAb5SSsIojBAGD6ugd734PJKYzzd22CO8GFJlArUUK6fLX5PWHYKGD9Dqjli6mWS0 3KKx3hprlr9z31lcvVrZaylp0SPQyBB1+Wqe1IYSoi3B5TL9YX9JfW0ijJ4lyA3P4z9j QmYBzdFVo8fq95H2YsGg1b9BJD8QlztnEewIqy85cusrRlBhbrIwv5OQ1f5hYBo5a5ov KFFNsmPJO8DUkKBYsylKLScN/isLKVEIOA/DN9atzHR3GlVJwc1QHo9ftoZpv/aHT/iR LivKN1VcdPYNb/mxgxMIHYfEarCoctP/iLstcNZNfQ00iS9G8BcKdAbEi0kO/eebJICY UIfw== X-Gm-Message-State: AJaThX4kwKMBt/BbUBCezjQjUJ1qH6ehQkeqdAzueOVBbvL5hiB/VR/W +CazA4RKXTSUsRH0TgqwzSQQgcw9uXwkmIr7Hsksug== X-Google-Smtp-Source: AGs4zMYPiO3LRCN5FQXaLrOQB8BRcA9UONhz/TjRl4JrBPFXzky8WQJ3DZY1zTcQVyJa11U/WqTT/rlQn290BP5fEzA= X-Received: by 10.36.131.200 with SMTP id d191mr4532620ite.97.1510880404666; Thu, 16 Nov 2017 17:00:04 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Thu, 16 Nov 2017 17:00:03 -0800 (PST) X-Originating-IP: [2607:fb90:6f58:7260:61d4:94db:35c5:eb2a] Received: by 10.79.108.204 with HTTP; Thu, 16 Nov 2017 17:00:03 -0800 (PST) In-Reply-To: <201711162324.vAGNONIg058059@pdx.rh.CN85.dnsmgr.net> References: <201711162128.vAGLSEpZ019174@repo.freebsd.org> <201711162324.vAGNONIg058059@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Thu, 16 Nov 2017 18:00:03 -0700 X-Google-Sender-Auth: Mz1O13NZkgVUUJfkAyQ7vj7nojQ Message-ID: Subject: Re: svn commit: r325903 - in head: sbin/fsck_ffs sbin/newfs sys/sys To: "Rodney W. Grimes" Cc: Warner Losh , 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.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 01:00:05 -0000 On Nov 16, 2017 4:24 PM, "Rodney W. Grimes" wrote: [ Charset UTF-8 unsupported, converting... ] > Author: imp > Date: Thu Nov 16 21:28:14 2017 > New Revision: 325903 > URL: https://svnweb.freebsd.org/changeset/base/325903 > > Log: > Only try to enable CK_CLYGRP if we're running on kernel newer than > 1200046, the first version that supports this feature. If we set it, > then use an old kernel, we'll break the 'contract' of having > checksummed cylinder groups this flag signifies. To avoid creating > something with an inconsistent state, don't turn the flag on in these > cases. The first full fsck with a new kernel will turn this on. I would much rather have to force this flag on, then my problem would for the most part just go away, I can move file systems back and forth between kernels without any problems. Having fsck just turn it on without even a message let alone a way to stop it being turned on increases the pain factor. That's a request for Kirk. I'm not changing his design for this detail. If it helps, it is only with some options it is turned on.... it only does this for non preen -p, non -y runs. Warner > Spnsored by: Netflix > Differential Revision: https://reviews.freebsd.org/D13114 > > Modified: > head/sbin/fsck_ffs/pass5.c > head/sbin/newfs/mkfs.c > head/sbin/newfs/newfs.c > head/sys/sys/param.h > > Modified: head/sbin/fsck_ffs/pass5.c > ============================================================ ================== > --- head/sbin/fsck_ffs/pass5.c Thu Nov 16 19:07:19 2017 (r325902) > +++ head/sbin/fsck_ffs/pass5.c Thu Nov 16 21:28:14 2017 (r325903) > @@ -35,6 +35,7 @@ static const char sccsid[] = "@(#)pass5.c 8.9 (Berkele > #include > __FBSDID("$FreeBSD$"); > > +#define IN_RTLD /* So we pickup the P_OSREL defines */ > #include > #include > > @@ -73,6 +74,7 @@ pass5(void) > 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 && > + getosreldate() >= P_OSREL_CK_CLYGRP && > reply("ADD CYLINDER GROUP CHECKSUM PROTECTION") != 0) { > fs->fs_metackhash |= CK_CYLGRP; > rewritecg = 1; > > Modified: head/sbin/newfs/mkfs.c > ============================================================ ================== > --- head/sbin/newfs/mkfs.c Thu Nov 16 19:07:19 2017 (r325902) > +++ head/sbin/newfs/mkfs.c Thu Nov 16 21:28:14 2017 (r325903) > @@ -44,6 +44,7 @@ static char sccsid[] = "@(#)mkfs.c 8.11 (Berkeley) 5/3 > #include > __FBSDID("$FreeBSD$"); > > +#define IN_RTLD /* So we pickup the P_OSREL defines */ > #include > #include > #include > @@ -495,7 +496,7 @@ restart: > /* > * Set flags for metadata that is being check-hashed. > */ > - if (Oflag > 1) > + if (Oflag > 1 && getosreldate() >= P_OSREL_CK_CLYGRP) > sblock.fs_metackhash = CK_CYLGRP; > > /* > > Modified: head/sbin/newfs/newfs.c > ============================================================ ================== > --- head/sbin/newfs/newfs.c Thu Nov 16 19:07:19 2017 (r325902) > +++ head/sbin/newfs/newfs.c Thu Nov 16 21:28:14 2017 (r325903) > @@ -398,10 +398,6 @@ main(int argc, char *argv[]) > if (pp != NULL) > pp->p_size *= secperblk; > } > - if (getosreldate() < __FreeBSD_version) { > - warnx("%s is newer than the running kernel and may not be compatible", > - getprogname()); > - } > mkfs(pp, special); > ufs_disk_close(&disk); > if (!jflag) > > Modified: head/sys/sys/param.h > ============================================================ ================== > --- head/sys/sys/param.h Thu Nov 16 19:07:19 2017 (r325902) > +++ head/sys/sys/param.h Thu Nov 16 21:28:14 2017 (r325903) > @@ -84,6 +84,7 @@ > #define P_OSREL_SHUTDOWN_ENOTCONN 1100077 > #define P_OSREL_MAP_GUARD 1200035 > #define P_OSREL_WRFSBASE 1200041 > +#define P_OSREL_CK_CLYGRP 1200046 > #define P_OSREL_VMTOTAL64 1200054 > > #define P_OSREL_MAJOR(x) ((x) / 100000) > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Fri Nov 17 02:21:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F8ACDF0E81; Fri, 17 Nov 2017 02:21:08 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56A8E751C2; Fri, 17 Nov 2017 02:21:08 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAH2L7nS042795; Fri, 17 Nov 2017 02:21:07 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAH2L7Uq042794; Fri, 17 Nov 2017 02:21:07 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201711170221.vAH2L7Uq042794@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 17 Nov 2017 02:21:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325917 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 325917 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 02:21:08 -0000 Author: mjg Date: Fri Nov 17 02:21:07 2017 New Revision: 325917 URL: https://svnweb.freebsd.org/changeset/base/325917 Log: sx: avoid branches if in the slow path if lockstat is disabled Modified: head/sys/kern/kern_sx.c Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Fri Nov 17 00:38:00 2017 (r325916) +++ head/sys/kern/kern_sx.c Fri Nov 17 02:21:07 2017 (r325917) @@ -88,8 +88,9 @@ PMC_SOFT_DECLARE( , , lock, failed); int _giantcnt = 0; \ WITNESS_SAVE_DECL(Giant) \ -#define GIANT_SAVE() do { \ +#define GIANT_SAVE(work) do { \ if (mtx_owned(&Giant)) { \ + work++; \ WITNESS_SAVE(&Giant.lock_object, Giant); \ while (mtx_owned(&Giant)) { \ _giantcnt++; \ @@ -513,11 +514,14 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, uintptr_t t struct lock_delay_arg lda; #endif #ifdef KDTRACE_HOOKS - uintptr_t state; u_int sleep_cnt = 0; int64_t sleep_time = 0; int64_t all_time = 0; #endif +#if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING) + uintptr_t state; + int extra_work; +#endif if (SCHEDULER_STOPPED()) return (0); @@ -547,10 +551,17 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, uintptr_t t CTR5(KTR_LOCK, "%s: %s contested (lock=%p) at %s:%d", __func__, sx->lock_object.lo_name, (void *)sx->sx_lock, file, line); -#ifdef KDTRACE_HOOKS - all_time -= lockstat_nsecs(&sx->lock_object); +#ifdef LOCK_PROFILING + extra_work = 1; state = x; +#elif defined(KDTRACE_HOOKS) + extra_work = lockstat_enabled; + if (__predict_false(extra_work)) { + all_time -= lockstat_nsecs(&sx->lock_object); + state = x; + } #endif + for (;;) { if (x == SX_LOCK_UNLOCKED) { if (atomic_fcmpset_acq_ptr(&sx->sx_lock, &x, tid)) @@ -583,7 +594,7 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, uintptr_t t sched_tdname(curthread), "spinning", "lockname:\"%s\"", sx->lock_object.lo_name); - GIANT_SAVE(); + GIANT_SAVE(extra_work); do { lock_delay(&lda); x = SX_READ_VALUE(sx); @@ -598,7 +609,7 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, uintptr_t t KTR_STATE1(KTR_SCHED, "thread", sched_tdname(curthread), "spinning", "lockname:\"%s\"", sx->lock_object.lo_name); - GIANT_SAVE(); + GIANT_SAVE(extra_work); spintries++; for (i = 0; i < asx_loops; i += n) { if (LOCK_LOG_TEST(&sx->lock_object, 0)) @@ -705,7 +716,7 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, uintptr_t t #ifdef KDTRACE_HOOKS sleep_time -= lockstat_nsecs(&sx->lock_object); #endif - GIANT_SAVE(); + GIANT_SAVE(extra_work); sleepq_add(&sx->lock_object, NULL, sx->lock_object.lo_name, SLEEPQ_SX | ((opts & SX_INTERRUPTIBLE) ? SLEEPQ_INTERRUPTIBLE : 0), SQ_EXCLUSIVE_QUEUE); @@ -729,6 +740,10 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, uintptr_t t __func__, sx); x = SX_READ_VALUE(sx); } +#if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING) + if (__predict_true(!extra_work)) + return (error); +#endif #ifdef KDTRACE_HOOKS all_time += lockstat_nsecs(&sx->lock_object); if (sleep_time) @@ -856,11 +871,14 @@ _sx_slock_hard(struct sx *sx, int opts, const char *fi struct lock_delay_arg lda; #endif #ifdef KDTRACE_HOOKS - uintptr_t state; u_int sleep_cnt = 0; int64_t sleep_time = 0; int64_t all_time = 0; #endif +#if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING) + uintptr_t state; + int extra_work; +#endif if (SCHEDULER_STOPPED()) return (0); @@ -870,9 +888,16 @@ _sx_slock_hard(struct sx *sx, int opts, const char *fi #elif defined(KDTRACE_HOOKS) lock_delay_arg_init(&lda, NULL); #endif -#ifdef KDTRACE_HOOKS - all_time -= lockstat_nsecs(&sx->lock_object); + +#ifdef LOCK_PROFILING + extra_work = 1; state = x; +#elif defined(KDTRACE_HOOKS) + extra_work = lockstat_enabled; + if (__predict_false(extra_work)) { + all_time -= lockstat_nsecs(&sx->lock_object); + state = x; + } #endif /* @@ -908,7 +933,7 @@ _sx_slock_hard(struct sx *sx, int opts, const char *fi KTR_STATE1(KTR_SCHED, "thread", sched_tdname(curthread), "spinning", "lockname:\"%s\"", sx->lock_object.lo_name); - GIANT_SAVE(); + GIANT_SAVE(extra_work); do { lock_delay(&lda); x = SX_READ_VALUE(sx); @@ -982,7 +1007,7 @@ _sx_slock_hard(struct sx *sx, int opts, const char *fi #ifdef KDTRACE_HOOKS sleep_time -= lockstat_nsecs(&sx->lock_object); #endif - GIANT_SAVE(); + GIANT_SAVE(extra_work); sleepq_add(&sx->lock_object, NULL, sx->lock_object.lo_name, SLEEPQ_SX | ((opts & SX_INTERRUPTIBLE) ? SLEEPQ_INTERRUPTIBLE : 0), SQ_SHARED_QUEUE); @@ -1006,6 +1031,10 @@ _sx_slock_hard(struct sx *sx, int opts, const char *fi __func__, sx); x = SX_READ_VALUE(sx); } +#if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING) + if (__predict_true(!extra_work)) + return (error); +#endif #ifdef KDTRACE_HOOKS all_time += lockstat_nsecs(&sx->lock_object); if (sleep_time) From owner-svn-src-head@freebsd.org Fri Nov 17 02:21:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37D1ADF0EB1; Fri, 17 Nov 2017 02:21:29 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2709E75307; Fri, 17 Nov 2017 02:21:27 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAH2LO5t042851; Fri, 17 Nov 2017 02:21:24 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAH2LOR0042850; Fri, 17 Nov 2017 02:21:24 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201711170221.vAH2LOR0042850@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 17 Nov 2017 02:21:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325918 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 325918 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 02:21:29 -0000 Author: mjg Date: Fri Nov 17 02:21:24 2017 New Revision: 325918 URL: https://svnweb.freebsd.org/changeset/base/325918 Log: rwlock: avoid branches in the slow path if lockstat is disabled Modified: head/sys/kern/kern_rwlock.c Modified: head/sys/kern/kern_rwlock.c ============================================================================== --- head/sys/kern/kern_rwlock.c Fri Nov 17 02:21:07 2017 (r325917) +++ head/sys/kern/kern_rwlock.c Fri Nov 17 02:21:24 2017 (r325918) @@ -424,11 +424,14 @@ __rw_rlock_hard(volatile uintptr_t *c, struct thread * struct lock_delay_arg lda; #endif #ifdef KDTRACE_HOOKS - uintptr_t state; u_int sleep_cnt = 0; int64_t sleep_time = 0; int64_t all_time = 0; #endif +#if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING) + uintptr_t state; + int doing_lockprof; +#endif if (SCHEDULER_STOPPED()) return; @@ -440,12 +443,17 @@ __rw_rlock_hard(volatile uintptr_t *c, struct thread * #endif rw = rwlock2rw(c); -#ifdef KDTRACE_HOOKS - all_time -= lockstat_nsecs(&rw->lock_object); -#endif -#ifdef KDTRACE_HOOKS +#ifdef LOCK_PROFILING + doing_lockprof = 1; state = v; +#elif defined(KDTRACE_HOOKS) + doing_lockprof = lockstat_enabled; + if (__predict_false(doing_lockprof)) { + all_time -= lockstat_nsecs(&rw->lock_object); + state = v; + } #endif + for (;;) { if (__rw_rlock_try(rw, td, &v, file, line)) break; @@ -583,6 +591,10 @@ __rw_rlock_hard(volatile uintptr_t *c, struct thread * __func__, rw); v = RW_READ_VALUE(rw); } +#if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING) + if (__predict_true(!doing_lockprof)) + return; +#endif #ifdef KDTRACE_HOOKS all_time += lockstat_nsecs(&rw->lock_object); if (sleep_time) From owner-svn-src-head@freebsd.org Fri Nov 17 02:22:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AFE65DF1089; Fri, 17 Nov 2017 02:22:52 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6ECCD7564D; Fri, 17 Nov 2017 02:22:52 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAH2MpOp046761; Fri, 17 Nov 2017 02:22:51 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAH2Mpjx046759; Fri, 17 Nov 2017 02:22:51 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201711170222.vAH2Mpjx046759@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 17 Nov 2017 02:22:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325919 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 325919 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 02:22:52 -0000 Author: mjg Date: Fri Nov 17 02:22:51 2017 New Revision: 325919 URL: https://svnweb.freebsd.org/changeset/base/325919 Log: locks: pull up PMC_SOFT_CALLs out of slow path loops Modified: head/sys/kern/kern_rwlock.c head/sys/kern/kern_sx.c Modified: head/sys/kern/kern_rwlock.c ============================================================================== --- head/sys/kern/kern_rwlock.c Fri Nov 17 02:21:24 2017 (r325918) +++ head/sys/kern/kern_rwlock.c Fri Nov 17 02:22:51 2017 (r325919) @@ -443,6 +443,12 @@ __rw_rlock_hard(volatile uintptr_t *c, struct thread * #endif rw = rwlock2rw(c); +#ifdef HWPMC_HOOKS + PMC_SOFT_CALL( , , lock, failed); +#endif + lock_profile_obtain_lock_failed(&rw->lock_object, + &contested, &waittime); + #ifdef LOCK_PROFILING doing_lockprof = 1; state = v; @@ -460,11 +466,6 @@ __rw_rlock_hard(volatile uintptr_t *c, struct thread * #ifdef KDTRACE_HOOKS lda.spin_cnt++; #endif -#ifdef HWPMC_HOOKS - PMC_SOFT_CALL( , , lock, failed); -#endif - lock_profile_obtain_lock_failed(&rw->lock_object, - &contested, &waittime); #ifdef ADAPTIVE_RWLOCKS /* @@ -890,6 +891,12 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v, ui CTR5(KTR_LOCK, "%s: %s contested (lock=%p) at %s:%d", __func__, rw->lock_object.lo_name, (void *)rw->rw_lock, file, line); +#ifdef HWPMC_HOOKS + PMC_SOFT_CALL( , , lock, failed); +#endif + lock_profile_obtain_lock_failed(&rw->lock_object, + &contested, &waittime); + #ifdef LOCK_PROFILING doing_lockprof = 1; state = v; @@ -910,11 +917,7 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v, ui #ifdef KDTRACE_HOOKS lda.spin_cnt++; #endif -#ifdef HWPMC_HOOKS - PMC_SOFT_CALL( , , lock, failed); -#endif - lock_profile_obtain_lock_failed(&rw->lock_object, - &contested, &waittime); + #ifdef ADAPTIVE_RWLOCKS /* * If the lock is write locked and the owner is Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Fri Nov 17 02:21:24 2017 (r325918) +++ head/sys/kern/kern_sx.c Fri Nov 17 02:22:51 2017 (r325919) @@ -551,6 +551,12 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, uintptr_t t CTR5(KTR_LOCK, "%s: %s contested (lock=%p) at %s:%d", __func__, sx->lock_object.lo_name, (void *)sx->sx_lock, file, line); +#ifdef HWPMC_HOOKS + PMC_SOFT_CALL( , , lock, failed); +#endif + lock_profile_obtain_lock_failed(&sx->lock_object, &contested, + &waittime); + #ifdef LOCK_PROFILING extra_work = 1; state = x; @@ -571,11 +577,6 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, uintptr_t t #ifdef KDTRACE_HOOKS lda.spin_cnt++; #endif -#ifdef HWPMC_HOOKS - PMC_SOFT_CALL( , , lock, failed); -#endif - lock_profile_obtain_lock_failed(&sx->lock_object, &contested, - &waittime); #ifdef ADAPTIVE_SX /* * If the lock is write locked and the owner is @@ -889,6 +890,12 @@ _sx_slock_hard(struct sx *sx, int opts, const char *fi lock_delay_arg_init(&lda, NULL); #endif +#ifdef HWPMC_HOOKS + PMC_SOFT_CALL( , , lock, failed); +#endif + lock_profile_obtain_lock_failed(&sx->lock_object, &contested, + &waittime); + #ifdef LOCK_PROFILING extra_work = 1; state = x; @@ -910,12 +917,6 @@ _sx_slock_hard(struct sx *sx, int opts, const char *fi #ifdef KDTRACE_HOOKS lda.spin_cnt++; #endif - -#ifdef HWPMC_HOOKS - PMC_SOFT_CALL( , , lock, failed); -#endif - lock_profile_obtain_lock_failed(&sx->lock_object, &contested, - &waittime); #ifdef ADAPTIVE_SX /* From owner-svn-src-head@freebsd.org Fri Nov 17 02:25:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44E98DF11F8; Fri, 17 Nov 2017 02:25:05 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E225757E8; Fri, 17 Nov 2017 02:25:04 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAH2P4mE046886; Fri, 17 Nov 2017 02:25:04 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAH2P4jY046885; Fri, 17 Nov 2017 02:25:04 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201711170225.vAH2P4jY046885@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 17 Nov 2017 02:25:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325920 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 325920 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 02:25:05 -0000 Author: mjg Date: Fri Nov 17 02:25:04 2017 New Revision: 325920 URL: https://svnweb.freebsd.org/changeset/base/325920 Log: mtx: unlock before traversing threads to wake up This shortens the lock hold time while not affecting corretness. All the woken up threads end up competing can lose the race against a completely unrelated thread getting the lock anyway. Modified: head/sys/kern/kern_mutex.c Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Fri Nov 17 02:22:51 2017 (r325919) +++ head/sys/kern/kern_mutex.c Fri Nov 17 02:25:04 2017 (r325920) @@ -629,7 +629,8 @@ __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v) #ifdef KDTRACE_HOOKS sleep_time -= lockstat_nsecs(&m->lock_object); #endif - turnstile_wait(ts, mtx_owner(m), TS_EXCLUSIVE_QUEUE); + MPASS(owner == mtx_owner(m)); + turnstile_wait(ts, owner, TS_EXCLUSIVE_QUEUE); #ifdef KDTRACE_HOOKS sleep_time += lockstat_nsecs(&m->lock_object); sleep_cnt++; @@ -1002,7 +1003,7 @@ __mtx_unlock_sleep(volatile uintptr_t *c) { struct mtx *m; struct turnstile *ts; - uintptr_t tid, v; + uintptr_t tid; if (SCHEDULER_STOPPED()) return; @@ -1028,12 +1029,12 @@ __mtx_unlock_sleep(volatile uintptr_t *c) * can be removed from the hash list if it is empty. */ turnstile_chain_lock(&m->lock_object); + _mtx_release_lock_quick(m); ts = turnstile_lookup(&m->lock_object); + MPASS(ts != NULL); if (LOCK_LOG_TEST(&m->lock_object, opts)) CTR1(KTR_LOCK, "_mtx_unlock_sleep: %p contested", m); - MPASS(ts != NULL); turnstile_broadcast(ts, TS_EXCLUSIVE_QUEUE); - _mtx_release_lock_quick(m); /* * This turnstile is now no longer associated with the mutex. We can From owner-svn-src-head@freebsd.org Fri Nov 17 02:26:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3889DF12A0; Fri, 17 Nov 2017 02:26:16 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A10C17593C; Fri, 17 Nov 2017 02:26:16 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAH2QFTA046966; Fri, 17 Nov 2017 02:26:15 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAH2QFwq046965; Fri, 17 Nov 2017 02:26:15 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201711170226.vAH2QFwq046965@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 17 Nov 2017 02:26:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325921 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 325921 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 02:26:16 -0000 Author: mjg Date: Fri Nov 17 02:26:15 2017 New Revision: 325921 URL: https://svnweb.freebsd.org/changeset/base/325921 Log: rwlock: unlock before traversing threads to wake up While here perform a minor cleanup of the unlock path. Modified: head/sys/kern/kern_rwlock.c Modified: head/sys/kern/kern_rwlock.c ============================================================================== --- head/sys/kern/kern_rwlock.c Fri Nov 17 02:25:04 2017 (r325920) +++ head/sys/kern/kern_rwlock.c Fri Nov 17 02:26:15 2017 (r325921) @@ -1081,7 +1081,7 @@ __rw_wunlock_hard(volatile uintptr_t *c, uintptr_t tid { struct rwlock *rw; struct turnstile *ts; - uintptr_t v; + uintptr_t v, setv; int queue; if (SCHEDULER_STOPPED()) @@ -1108,8 +1108,6 @@ __rw_wunlock_hard(volatile uintptr_t *c, uintptr_t tid CTR2(KTR_LOCK, "%s: %p contested", __func__, rw); turnstile_chain_lock(&rw->lock_object); - ts = turnstile_lookup(&rw->lock_object); - MPASS(ts != NULL); /* * Use the same algo as sx locks for now. Prefer waking up shared @@ -1127,19 +1125,23 @@ __rw_wunlock_hard(volatile uintptr_t *c, uintptr_t tid * there that could be worked around either by waking both queues * of waiters or doing some complicated lock handoff gymnastics. */ - v = RW_UNLOCKED; - if (rw->rw_lock & RW_LOCK_WRITE_WAITERS) { + setv = RW_UNLOCKED; + v = RW_READ_VALUE(rw); + queue = TS_SHARED_QUEUE; + if (v & RW_LOCK_WRITE_WAITERS) { queue = TS_EXCLUSIVE_QUEUE; - v |= (rw->rw_lock & RW_LOCK_READ_WAITERS); - } else - queue = TS_SHARED_QUEUE; + setv |= (v & RW_LOCK_READ_WAITERS); + } + atomic_store_rel_ptr(&rw->rw_lock, setv); /* Wake up all waiters for the specific queue. */ if (LOCK_LOG_TEST(&rw->lock_object, 0)) CTR3(KTR_LOCK, "%s: %p waking up %s waiters", __func__, rw, queue == TS_SHARED_QUEUE ? "read" : "write"); + + ts = turnstile_lookup(&rw->lock_object); + MPASS(ts != NULL); turnstile_broadcast(ts, queue); - atomic_store_rel_ptr(&rw->rw_lock, v); turnstile_unpend(ts, TS_EXCLUSIVE_LOCK); turnstile_chain_unlock(&rw->lock_object); } From owner-svn-src-head@freebsd.org Fri Nov 17 02:27:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E26FDF132E; Fri, 17 Nov 2017 02:27:06 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4A5175A8C; Fri, 17 Nov 2017 02:27:05 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAH2R4VC047035; Fri, 17 Nov 2017 02:27:04 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAH2R43C047034; Fri, 17 Nov 2017 02:27:04 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201711170227.vAH2R43C047034@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 17 Nov 2017 02:27:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325922 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 325922 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 02:27:06 -0000 Author: mjg Date: Fri Nov 17 02:27:04 2017 New Revision: 325922 URL: https://svnweb.freebsd.org/changeset/base/325922 Log: sx: perform a minor cleanup of the unlock slowpath No functional changes. Modified: head/sys/kern/kern_sx.c Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Fri Nov 17 02:26:15 2017 (r325921) +++ head/sys/kern/kern_sx.c Fri Nov 17 02:27:04 2017 (r325922) @@ -772,7 +772,7 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, uintptr_t t void _sx_xunlock_hard(struct sx *sx, uintptr_t tid, const char *file, int line) { - uintptr_t x; + uintptr_t x, setx; int queue, wakeup_swapper; if (SCHEDULER_STOPPED()) @@ -801,7 +801,7 @@ _sx_xunlock_hard(struct sx *sx, uintptr_t tid, const c CTR2(KTR_LOCK, "%s: %p contested", __func__, sx); sleepq_lock(&sx->lock_object); - x = SX_LOCK_UNLOCKED; + x = SX_READ_VALUE(sx); /* * The wake up algorithm here is quite simple and probably not @@ -812,19 +812,21 @@ _sx_xunlock_hard(struct sx *sx, uintptr_t tid, const c * starvation for the threads sleeping on the exclusive queue by giving * them precedence and cleaning up the shared waiters bit anyway. */ - if ((sx->sx_lock & SX_LOCK_SHARED_WAITERS) != 0 && + setx = SX_LOCK_UNLOCKED; + queue = SQ_EXCLUSIVE_QUEUE; + if ((x & SX_LOCK_SHARED_WAITERS) != 0 && sleepq_sleepcnt(&sx->lock_object, SQ_SHARED_QUEUE) != 0) { queue = SQ_SHARED_QUEUE; - x |= (sx->sx_lock & SX_LOCK_EXCLUSIVE_WAITERS); - } else - queue = SQ_EXCLUSIVE_QUEUE; + setx |= (x & SX_LOCK_EXCLUSIVE_WAITERS); + } + atomic_store_rel_ptr(&sx->sx_lock, setx); /* Wake up all the waiters for the specific queue. */ if (LOCK_LOG_TEST(&sx->lock_object, 0)) CTR3(KTR_LOCK, "%s: %p waking up all threads on %s queue", __func__, sx, queue == SQ_SHARED_QUEUE ? "shared" : "exclusive"); - atomic_store_rel_ptr(&sx->sx_lock, x); + wakeup_swapper = sleepq_broadcast(&sx->lock_object, SLEEPQ_SX, 0, queue); sleepq_release(&sx->lock_object); From owner-svn-src-head@freebsd.org Fri Nov 17 02:29:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4E76DF14BF; Fri, 17 Nov 2017 02:29:07 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8234475C55; Fri, 17 Nov 2017 02:29:07 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAH2T6Xd047147; Fri, 17 Nov 2017 02:29:06 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAH2T6lH047146; Fri, 17 Nov 2017 02:29:06 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201711170229.vAH2T6lH047146@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 17 Nov 2017 02:29:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325923 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 325923 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 02:29:07 -0000 Author: mjg Date: Fri Nov 17 02:29:06 2017 New Revision: 325923 URL: https://svnweb.freebsd.org/changeset/base/325923 Log: Check for PRS_NEW without locking the proc in sysctl_kern_proc Modified: head/sys/kern/kern_proc.c Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Fri Nov 17 02:27:04 2017 (r325922) +++ head/sys/kern/kern_proc.c Fri Nov 17 02:29:06 2017 (r325923) @@ -1479,11 +1479,9 @@ sysctl_kern_proc(SYSCTL_HANDLER_ARGS) /* * Skip embryonic processes. */ - PROC_LOCK(p); - if (p->p_state == PRS_NEW) { - PROC_UNLOCK(p); + if (p->p_state == PRS_NEW) continue; - } + PROC_LOCK(p); KASSERT(p->p_ucred != NULL, ("process credential is NULL for non-NEW proc")); /* From owner-svn-src-head@freebsd.org Fri Nov 17 02:45:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EDBD6DF1C64; Fri, 17 Nov 2017 02:45:39 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB73D7648E; Fri, 17 Nov 2017 02:45:39 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAH2jc1g055360; Fri, 17 Nov 2017 02:45:38 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAH2jceC055359; Fri, 17 Nov 2017 02:45:38 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201711170245.vAH2jceC055359@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 17 Nov 2017 02:45:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325924 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 325924 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 02:45:40 -0000 Author: mjg Date: Fri Nov 17 02:45:38 2017 New Revision: 325924 URL: https://svnweb.freebsd.org/changeset/base/325924 Log: sched: move panic handling code out of choosethread This avoids jumps in the common case of the kernel not being panicked. Modified: head/sys/kern/kern_switch.c Modified: head/sys/kern/kern_switch.c ============================================================================== --- head/sys/kern/kern_switch.c Fri Nov 17 02:29:06 2017 (r325923) +++ head/sys/kern/kern_switch.c Fri Nov 17 02:45:38 2017 (r325924) @@ -150,24 +150,37 @@ SYSCTL_PROC(_kern_sched_stats, OID_AUTO, reset, CTLTYP /* * Select the thread that will be run next. */ -struct thread * -choosethread(void) + +static __noinline struct thread * +choosethread_panic(struct thread *td) { - struct thread *td; -retry: - td = sched_choose(); - /* * If we are in panic, only allow system threads, * plus the one we are running in, to be run. */ - if (panicstr && ((td->td_proc->p_flag & P_SYSTEM) == 0 && +retry: + if (((td->td_proc->p_flag & P_SYSTEM) == 0 && (td->td_flags & TDF_INPANIC) == 0)) { /* note that it is no longer on the run queue */ TD_SET_CAN_RUN(td); + td = sched_choose(); goto retry; } + + TD_SET_RUNNING(td); + return (td); +} + +struct thread * +choosethread(void) +{ + struct thread *td; + + td = sched_choose(); + + if (__predict_false(panicstr != NULL)) + return (choosethread_panic(td)); TD_SET_RUNNING(td); return (td); From owner-svn-src-head@freebsd.org Fri Nov 17 02:59:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80159DB810C; Fri, 17 Nov 2017 02:59:29 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C5E876B1A; Fri, 17 Nov 2017 02:59:29 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAH2xS9V059563; Fri, 17 Nov 2017 02:59:28 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAH2xS2I059562; Fri, 17 Nov 2017 02:59:28 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201711170259.vAH2xS2I059562@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 17 Nov 2017 02:59:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325925 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 325925 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 02:59:29 -0000 Author: mjg Date: Fri Nov 17 02:59:28 2017 New Revision: 325925 URL: https://svnweb.freebsd.org/changeset/base/325925 Log: mtx: add missing parts of the diff in r325920 Fixes build breakage. Modified: head/sys/kern/kern_mutex.c Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Fri Nov 17 02:45:38 2017 (r325924) +++ head/sys/kern/kern_mutex.c Fri Nov 17 02:59:28 2017 (r325925) @@ -463,7 +463,7 @@ __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v) struct turnstile *ts; uintptr_t tid; #ifdef ADAPTIVE_MUTEXES - volatile struct thread *owner; + struct thread *owner; #endif #ifdef KTR int cont_logged = 0; @@ -1003,7 +1003,7 @@ __mtx_unlock_sleep(volatile uintptr_t *c) { struct mtx *m; struct turnstile *ts; - uintptr_t tid; + uintptr_t tid, v; if (SCHEDULER_STOPPED()) return; From owner-svn-src-head@freebsd.org Fri Nov 17 04:10:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A96FDB989D; Fri, 17 Nov 2017 04:10:54 +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 1792678F0F; Fri, 17 Nov 2017 04:10:54 +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 vAH4Arur089451; Fri, 17 Nov 2017 04:10:53 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAH4Arba089450; Fri, 17 Nov 2017 04:10:53 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201711170410.vAH4Arba089450@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 17 Nov 2017 04:10:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325926 - head/sys/powerpc/ofw X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/ofw X-SVN-Commit-Revision: 325926 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 04:10:54 -0000 Author: jhibbits Date: Fri Nov 17 04:10:52 2017 New Revision: 325926 URL: https://svnweb.freebsd.org/changeset/base/325926 Log: Stop special casing 32-bit AIM in memory parsing There's no need to special case 32-bit AIM to short circuit processing. Some AIM CPUs can handle 36 bit addresses, and 64-bit CPUs can run 32-bit OSes, so this will allow us to expand for that in the future if we desire. Modified: head/sys/powerpc/ofw/ofw_machdep.c Modified: head/sys/powerpc/ofw/ofw_machdep.c ============================================================================== --- head/sys/powerpc/ofw/ofw_machdep.c Fri Nov 17 02:59:28 2017 (r325925) +++ head/sys/powerpc/ofw/ofw_machdep.c Fri Nov 17 04:10:52 2017 (r325926) @@ -184,14 +184,6 @@ parse_ofw_memory(phandle_t node, const char *prop, str i = 0; j = 0; while (i < sz/sizeof(cell_t)) { - #if !defined(__powerpc64__) && !defined(BOOKE) - /* On 32-bit PPC (OEA), ignore regions starting above 4 GB */ - if (address_cells > 1 && OFmem[i] > 0) { - i += address_cells + size_cells; - continue; - } - #endif - output[j].mr_start = OFmem[i++]; if (address_cells == 2) { output[j].mr_start <<= 32; @@ -204,19 +196,20 @@ parse_ofw_memory(phandle_t node, const char *prop, str output[j].mr_size += OFmem[i++]; } - #if !defined(__powerpc64__) && !defined(BOOKE) - /* Book-E can support 36-bit addresses. */ + if (output[j].mr_start > BUS_SPACE_MAXADDR) + continue; + /* - * Check for memory regions extending above 32-bit - * memory space, and restrict them to stay there. + * Constrain memory to that which we can access. + * 32-bit AIM can only reference 32 bits of address currently, + * but Book-E can access 36 bits. */ if (((uint64_t)output[j].mr_start + - (uint64_t)output[j].mr_size) > - BUS_SPACE_MAXADDR_32BIT) { - output[j].mr_size = BUS_SPACE_MAXADDR_32BIT - - output[j].mr_start; + (uint64_t)output[j].mr_size - 1) > + BUS_SPACE_MAXADDR) { + output[j].mr_size = BUS_SPACE_MAXADDR - + output[j].mr_start + 1; } - #endif j++; } From owner-svn-src-head@freebsd.org Fri Nov 17 04:29:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1086BDB9DEE; Fri, 17 Nov 2017 04:29:34 +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 D0F6979775; Fri, 17 Nov 2017 04:29:33 +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 vAH4TW8T097918; Fri, 17 Nov 2017 04:29:32 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAH4TWDS097917; Fri, 17 Nov 2017 04:29:32 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201711170429.vAH4TWDS097917@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 17 Nov 2017 04:29:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325927 - head/sys/dev/dpaa X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/dev/dpaa X-SVN-Commit-Revision: 325927 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 04:29:34 -0000 Author: jhibbits Date: Fri Nov 17 04:29:32 2017 New Revision: 325927 URL: https://svnweb.freebsd.org/changeset/base/325927 Log: Add jumbo frame support to dtsec(4) MFC after: 2 weeks Modified: head/sys/dev/dpaa/if_dtsec.c Modified: head/sys/dev/dpaa/if_dtsec.c ============================================================================== --- head/sys/dev/dpaa/if_dtsec.c Fri Nov 17 04:10:52 2017 (r325926) +++ head/sys/dev/dpaa/if_dtsec.c Fri Nov 17 04:29:32 2017 (r325927) @@ -67,7 +67,11 @@ __FBSDID("$FreeBSD$"); #include "if_dtsec_im.h" #include "if_dtsec_rm.h" +#define DTSEC_MIN_FRAME_SIZE 64 +#define DTSEC_MAX_FRAME_SIZE 9600 +#define DTSEC_REG_MAXFRM 0x110 + /** * @group dTSEC private defines. * @{ @@ -321,6 +325,22 @@ dtsec_fm_port_free_both(struct dtsec_softc *sc) * @{ */ static int +dtsec_set_mtu(struct dtsec_softc *sc, unsigned int mtu) +{ + + mtu += ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN + ETHER_CRC_LEN; + + DTSEC_LOCK_ASSERT(sc); + + if (mtu >= DTSEC_MIN_FRAME_SIZE && mtu <= DTSEC_MAX_FRAME_SIZE) { + bus_write_4(sc->sc_mem, DTSEC_REG_MAXFRM, mtu); + return (mtu); + } + + return (0); +} + +static int dtsec_if_enable_locked(struct dtsec_softc *sc) { int error; @@ -384,6 +404,14 @@ dtsec_if_ioctl(struct ifnet *ifp, u_long command, cadd /* Basic functionality to achieve media status reports */ switch (command) { + case SIOCSIFMTU: + DTSEC_LOCK(sc); + if (dtsec_set_mtu(sc, ifr->ifr_mtu)) + ifp->if_mtu = ifr->ifr_mtu; + else + error = EINVAL; + DTSEC_UNLOCK(sc); + break; case SIOCSIFFLAGS: DTSEC_LOCK(sc); @@ -678,7 +706,7 @@ dtsec_attach(device_t dev) ifp->if_snd.ifq_drv_maxlen = TSEC_TX_NUM_DESC - 1; IFQ_SET_READY(&ifp->if_snd); #endif - ifp->if_capabilities = 0; /* TODO: Check */ + ifp->if_capabilities = IFCAP_JUMBO_MTU; /* TODO: HWCSUM */ ifp->if_capenable = ifp->if_capabilities; /* Attach PHY(s) */ From owner-svn-src-head@freebsd.org Fri Nov 17 07:21:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF969DBCB33; Fri, 17 Nov 2017 07:21:24 +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 CD32D7D6D3; Fri, 17 Nov 2017 07:21:23 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id FaxjeKsA5ss4TFaxkeoLCd; Fri, 17 Nov 2017 00:21:21 -0700 X-Authority-Analysis: v=2.2 cv=JuuBlIwC c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=xqWC_Br6kY4A:10 a=sC3jslCIGhcA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=-k1MnDBs4M9npbFtEioA: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 1D9FEFD; Thu, 16 Nov 2017 23:21:19 -0800 (PST) Received: from slippy (localhost [IPv6:0:0:0:0:0:0:0:1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id vAH7LIfW004556; Thu, 16 Nov 2017 23:21:18 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201711170721.vAH7LIfW004556@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: Mateusz Guzik cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r325920 - head/sys/kern In-Reply-To: Message from Mateusz Guzik of "Fri, 17 Nov 2017 02:25:04 +0000." <201711170225.vAH2P4jY046885@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 16 Nov 2017 23:21:18 -0800 X-CMAE-Envelope: MS4wfPlXmWRISvoeK6uF8EAKgG7n9uuya3mXoY8CSzGq9cUEZj6zMrI5yUySMeUJVcanSrl1u4t0XGonhCXODHohv+ER9N0PkgDLPndD2rmhxiM0dQl0UMHP ap96YxJNQ7XBdcyws1ZgD9DYZynt+2VwO53iGEDWv9T1/3wR34fnS0qmkUHDjvjZVvF7xWPYOqxyWXT1MrOerVNvDXWB814McDKdz68MAR+xVyD0eDQSuul0 M+/DGrPLOZ3rHCLwAFVPoh8ieGlpBpyAIxyIf7cbA6LIUDw2DKvzkcwkLnnzvZtL X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 07:21:24 -0000 In message <201711170225.vAH2P4jY046885@repo.freebsd.org>, Mateusz Guzik writes : > Author: mjg > Date: Fri Nov 17 02:25:04 2017 > New Revision: 325920 > URL: https://svnweb.freebsd.org/changeset/base/325920 > > Log: > mtx: unlock before traversing threads to wake up > > This shortens the lock hold time while not affecting corretness. > All the woken up threads end up competing can lose the race against > a completely unrelated thread getting the lock anyway. > > Modified: > head/sys/kern/kern_mutex.c > > Modified: head/sys/kern/kern_mutex.c > ============================================================================= > = > --- head/sys/kern/kern_mutex.c Fri Nov 17 02:22:51 2017 (r32591 > 9) > +++ head/sys/kern/kern_mutex.c Fri Nov 17 02:25:04 2017 (r32592 > 0) > @@ -629,7 +629,8 @@ __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v) > #ifdef KDTRACE_HOOKS > sleep_time -= lockstat_nsecs(&m->lock_object); > #endif > - turnstile_wait(ts, mtx_owner(m), TS_EXCLUSIVE_QUEUE); > + MPASS(owner == mtx_owner(m)); Should this be conditional when ADAPTIVE_MUTEXES is defined? Otherwise it fails to build. > + turnstile_wait(ts, owner, TS_EXCLUSIVE_QUEUE); > #ifdef KDTRACE_HOOKS > sleep_time += lockstat_nsecs(&m->lock_object); > sleep_cnt++; > @@ -1002,7 +1003,7 @@ __mtx_unlock_sleep(volatile uintptr_t *c) > { > struct mtx *m; > struct turnstile *ts; > - uintptr_t tid, v; > + uintptr_t tid; > > if (SCHEDULER_STOPPED()) > return; > @@ -1028,12 +1029,12 @@ __mtx_unlock_sleep(volatile uintptr_t *c) > * can be removed from the hash list if it is empty. > */ > turnstile_chain_lock(&m->lock_object); > + _mtx_release_lock_quick(m); > ts = turnstile_lookup(&m->lock_object); > + MPASS(ts != NULL); > if (LOCK_LOG_TEST(&m->lock_object, opts)) > CTR1(KTR_LOCK, "_mtx_unlock_sleep: %p contested", m); > - MPASS(ts != NULL); > turnstile_broadcast(ts, TS_EXCLUSIVE_QUEUE); > - _mtx_release_lock_quick(m); > > /* > * This turnstile is now no longer associated with the mutex. We can > -- 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-head@freebsd.org Fri Nov 17 09:29:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3148FDBF5EC; Fri, 17 Nov 2017 09:29:28 +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 E9E7580B86; Fri, 17 Nov 2017 09:29:27 +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 vAH9TQtr023464; Fri, 17 Nov 2017 09:29:26 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAH9TQmI023463; Fri, 17 Nov 2017 09:29:26 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201711170929.vAH9TQmI023463@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 17 Nov 2017 09:29:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325929 - head/sys/contrib/zstd/programs X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/sys/contrib/zstd/programs X-SVN-Commit-Revision: 325929 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 09:29:28 -0000 Author: bapt Date: Fri Nov 17 09:29:26 2017 New Revision: 325929 URL: https://svnweb.freebsd.org/changeset/base/325929 Log: Do not remove the sources when zstd is called as zstdcat Modified: head/sys/contrib/zstd/programs/zstdcli.c Modified: head/sys/contrib/zstd/programs/zstdcli.c ============================================================================== --- head/sys/contrib/zstd/programs/zstdcli.c Fri Nov 17 09:14:18 2017 (r325928) +++ head/sys/contrib/zstd/programs/zstdcli.c Fri Nov 17 09:29:26 2017 (r325929) @@ -421,7 +421,7 @@ int main(int argCount, const char* argv[]) /* preset behaviors */ if (exeNameMatch(programName, ZSTD_ZSTDMT)) nbThreads=0; if (exeNameMatch(programName, ZSTD_UNZSTD)) operation=zom_decompress; - if (exeNameMatch(programName, ZSTD_CAT)) { operation=zom_decompress; forceStdout=1; FIO_overwriteMode(); outFileName=stdoutmark; g_displayLevel=1; } + if (exeNameMatch(programName, ZSTD_CAT)) { operation=zom_decompress; forceStdout=1; FIO_overwriteMode(); outFileName=stdoutmark; g_displayLevel=1; g_removeSrcFile=0; } if (exeNameMatch(programName, ZSTD_GZ)) { suffix = GZ_EXTENSION; FIO_setCompressionType(FIO_gzipCompression); FIO_setRemoveSrcFile(1); } /* behave like gzip */ if (exeNameMatch(programName, ZSTD_GUNZIP)) { operation=zom_decompress; FIO_setRemoveSrcFile(1); } /* behave like gunzip */ if (exeNameMatch(programName, ZSTD_GZCAT)) { operation=zom_decompress; forceStdout=1; FIO_overwriteMode(); outFileName=stdoutmark; g_displayLevel=1; } /* behave like gzcat */ From owner-svn-src-head@freebsd.org Fri Nov 17 09:33:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ECA19DBF815; Fri, 17 Nov 2017 09:33:30 +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 B6CA580F8A; Fri, 17 Nov 2017 09:33:30 +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 vAH9XT0A027534; Fri, 17 Nov 2017 09:33:29 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAH9XTsl027533; Fri, 17 Nov 2017 09:33:29 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201711170933.vAH9XTsl027533@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 17 Nov 2017 09:33:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325930 - head/sys/contrib/zstd/programs X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/sys/contrib/zstd/programs X-SVN-Commit-Revision: 325930 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 09:33:31 -0000 Author: bapt Date: Fri Nov 17 09:33:29 2017 New Revision: 325930 URL: https://svnweb.freebsd.org/changeset/base/325930 Log: Actually commit the right patch for r325929 Modified: head/sys/contrib/zstd/programs/zstdcli.c Modified: head/sys/contrib/zstd/programs/zstdcli.c ============================================================================== --- head/sys/contrib/zstd/programs/zstdcli.c Fri Nov 17 09:29:26 2017 (r325929) +++ head/sys/contrib/zstd/programs/zstdcli.c Fri Nov 17 09:33:29 2017 (r325930) @@ -421,7 +421,7 @@ int main(int argCount, const char* argv[]) /* preset behaviors */ if (exeNameMatch(programName, ZSTD_ZSTDMT)) nbThreads=0; if (exeNameMatch(programName, ZSTD_UNZSTD)) operation=zom_decompress; - if (exeNameMatch(programName, ZSTD_CAT)) { operation=zom_decompress; forceStdout=1; FIO_overwriteMode(); outFileName=stdoutmark; g_displayLevel=1; g_removeSrcFile=0; } + if (exeNameMatch(programName, ZSTD_CAT)) { operation=zom_decompress; forceStdout=1; FIO_overwriteMode(); outFileName=stdoutmark; g_displayLevel=1; FIO_setRemoveSrcFile(0); } if (exeNameMatch(programName, ZSTD_GZ)) { suffix = GZ_EXTENSION; FIO_setCompressionType(FIO_gzipCompression); FIO_setRemoveSrcFile(1); } /* behave like gzip */ if (exeNameMatch(programName, ZSTD_GUNZIP)) { operation=zom_decompress; FIO_setRemoveSrcFile(1); } /* behave like gunzip */ if (exeNameMatch(programName, ZSTD_GZCAT)) { operation=zom_decompress; forceStdout=1; FIO_overwriteMode(); outFileName=stdoutmark; g_displayLevel=1; } /* behave like gzcat */ From owner-svn-src-head@freebsd.org Fri Nov 17 09:34:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AFE1ADBF894; Fri, 17 Nov 2017 09:34:37 +0000 (UTC) (envelope-from bapt@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 8FC1F10F5; Fri, 17 Nov 2017 09:34:37 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1235) id EBF111287A; Fri, 17 Nov 2017 09:34:36 +0000 (UTC) Date: Fri, 17 Nov 2017 10:34:36 +0100 From: Baptiste Daroussin To: Conrad Meyer Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Allan Jude Subject: Re: svn commit: r316980 - head/contrib/zstd/programs Message-ID: <20171117093436.6wsrynphvcm6re4h@ivaldir.net> References: <201704152015.v3FKFiwZ006836@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="tqby3eqn6fp5yyeg" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171027 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 09:34:37 -0000 --tqby3eqn6fp5yyeg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 15, 2017 at 07:38:13PM -0800, Conrad Meyer wrote: > Please revert this change. >=20 > First, it introduces the POLA-violating behavior that zstdcat deletes > its source files. This is not how zcat/bzcat behaves. I have modified zstdcat to behave like zcat/bzcat. The commit you stated is exactly to ensure the zstd(1) command is behaving = like xz, gzip, etc (to the exception of zstdcat which was buggy) this commit is needed to have those tools a drop-in replacement for other compression prog= rams. (which is necessary for example to have newsyslog being able to use zstd.) I committed a change needed in base and I will start a discussion with upst= ream Best regards, Bapt --tqby3eqn6fp5yyeg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAloOrSoACgkQY4mL3PG3 PlqzoRAAzQ9gbqSqe4YPbcdjhdKYUN2WpHlPhVkszwkwvn6QwAij+tA72S97A4f1 59OFRHN7DZ7vvphCWKS6BKgAkLKLeRTatz5/22BCZTQkLXSaW99UtvVjF7TBW/sx ko7Sb0QLmqEgoRJwIjANdXB4DR8yq2tgQwmSzZBXlqU4irr+55M0cLZI9K10VWf3 BfWJcHXkQNYmOO1bZv5F33rGhRrb3hillq2UNJgd/VR+ioXWk5pdqD6LPmXpLUtr E2u3sSFEGRuE0EiJS92WVqdBEUmXESl6J76uYY6pX32TOoZzOx9zM8sDYY1CemMn OKjca51DwTe8jA8EsgTToMkDyMqaofehlZau8oCNijlpBZ/BzAOMFlNMExT19feF c9QmH9jdz0N5kEGwh8tcBQ1LNZKBD2kQru8+62yLGspO5ooOYyr8V1czSYRmQ9Td NI7QP3E1bHHg6/DUFhcvRkOfqksJ7y13YGJ9buHkwuy/zfa4eG8iQETj2KI8+JGu cnAnHCY0Uvr6jZJgN/IMSgFWMpFGiFZBbIK8y+WLDl9n97rRKHb6HGIFFEmiJfar qV+L0xzHAUJiT4uHO6ByF9RAakbrzF+LITd5ScS1VUul+M+FPlFaUBxlOuQz7cjf 7bEmFJjUQJbLFl0sSiIcTVCKzXY/c0YOW4str9XN7zrwcRTDZw4= =q0aJ -----END PGP SIGNATURE----- --tqby3eqn6fp5yyeg-- From owner-svn-src-head@freebsd.org Fri Nov 17 13:12:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1AE21DD9F9E; Fri, 17 Nov 2017 13:12:22 +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 DBAC966724; Fri, 17 Nov 2017 13:12:21 +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 vAHDCKl4018780; Fri, 17 Nov 2017 13:12:20 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAHDCK34018777; Fri, 17 Nov 2017 13:12:20 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201711171312.vAHDCK34018777@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Fri, 17 Nov 2017 13:12:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325934 - in head: sbin/fsck_ffs sbin/newfs sys/sys X-SVN-Group: head X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: in head: sbin/fsck_ffs sbin/newfs sys/sys X-SVN-Commit-Revision: 325934 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 13:12:22 -0000 Author: scottl Date: Fri Nov 17 13:12:20 2017 New Revision: 325934 URL: https://svnweb.freebsd.org/changeset/base/325934 Log: Rename P_OSREL_CK_CLYGRP to P_OSREL_CK_CYLGRP Modified: head/sbin/fsck_ffs/pass5.c head/sbin/newfs/mkfs.c head/sys/sys/param.h Modified: head/sbin/fsck_ffs/pass5.c ============================================================================== --- head/sbin/fsck_ffs/pass5.c Fri Nov 17 13:01:56 2017 (r325933) +++ head/sbin/fsck_ffs/pass5.c Fri Nov 17 13:12:20 2017 (r325934) @@ -74,7 +74,7 @@ pass5(void) 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 && - getosreldate() >= P_OSREL_CK_CLYGRP && + getosreldate() >= P_OSREL_CK_CYLGRP && reply("ADD CYLINDER GROUP CHECKSUM PROTECTION") != 0) { fs->fs_metackhash |= CK_CYLGRP; rewritecg = 1; Modified: head/sbin/newfs/mkfs.c ============================================================================== --- head/sbin/newfs/mkfs.c Fri Nov 17 13:01:56 2017 (r325933) +++ head/sbin/newfs/mkfs.c Fri Nov 17 13:12:20 2017 (r325934) @@ -496,7 +496,7 @@ restart: /* * Set flags for metadata that is being check-hashed. */ - if (Oflag > 1 && getosreldate() >= P_OSREL_CK_CLYGRP) + if (Oflag > 1 && getosreldate() >= P_OSREL_CK_CYLGRP) sblock.fs_metackhash = CK_CYLGRP; /* Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Fri Nov 17 13:01:56 2017 (r325933) +++ head/sys/sys/param.h Fri Nov 17 13:12:20 2017 (r325934) @@ -84,7 +84,7 @@ #define P_OSREL_SHUTDOWN_ENOTCONN 1100077 #define P_OSREL_MAP_GUARD 1200035 #define P_OSREL_WRFSBASE 1200041 -#define P_OSREL_CK_CLYGRP 1200046 +#define P_OSREL_CK_CYLGRP 1200046 #define P_OSREL_VMTOTAL64 1200054 #define P_OSREL_MAJOR(x) ((x) / 100000) From owner-svn-src-head@freebsd.org Fri Nov 17 15:46:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A25F6DDD3D6; Fri, 17 Nov 2017 15:46:20 +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 6F7436B268; Fri, 17 Nov 2017 15:46:20 +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 vAHFkJ0d083163; Fri, 17 Nov 2017 15:46:19 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAHFkJkC083162; Fri, 17 Nov 2017 15:46:19 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201711171546.vAHFkJkC083162@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Fri, 17 Nov 2017 15:46:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325942 - head X-SVN-Group: head X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 325942 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 15:46:20 -0000 Author: gordon Date: Fri Nov 17 15:46:19 2017 New Revision: 325942 URL: https://svnweb.freebsd.org/changeset/base/325942 Log: Correct grammar nit. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Fri Nov 17 15:45:35 2017 (r325941) +++ head/UPDATING Fri Nov 17 15:46:19 2017 (r325942) @@ -66,7 +66,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: 20171102: Building in a FreeBSD src checkout will automatically create object directories now rather than store files in the current directory if - 'make obj' was not ran. Calling 'make obj' is no longer necesarry. + 'make obj' was not ran. Calling 'make obj' is no longer necessary. This feature can be disabled by setting WITHOUT_AUTO_OBJ=yes in /etc/src-env.conf (not /etc/src.conf), or passing the option in the environment. From owner-svn-src-head@freebsd.org Fri Nov 17 16:04:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 690D4DDDAE8; Fri, 17 Nov 2017 16:04:38 +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 317BF6BF26; Fri, 17 Nov 2017 16:04:38 +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 vAHG4b9N091516; Fri, 17 Nov 2017 16:04:37 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAHG4b6i091515; Fri, 17 Nov 2017 16:04:37 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201711171604.vAHG4b6i091515@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 17 Nov 2017 16:04:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325946 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 325946 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 16:04:38 -0000 Author: asomers Date: Fri Nov 17 16:04:37 2017 New Revision: 325946 URL: https://svnweb.freebsd.org/changeset/base/325946 Log: VOP_LOOKUP.9: update locking info The old description has been inaccurate since at least 243271, if not before. Submitted by: will Reviewed by: kib MFC after: 3 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D13108 Modified: head/share/man/man9/VOP_LOOKUP.9 Modified: head/share/man/man9/VOP_LOOKUP.9 ============================================================================== --- head/share/man/man9/VOP_LOOKUP.9 Fri Nov 17 15:49:01 2017 (r325945) +++ head/share/man/man9/VOP_LOOKUP.9 Fri Nov 17 16:04:37 2017 (r325946) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 27, 2017 +.Dd November 17, 2017 .Dt VOP_LOOKUP 9 .Os .Sh NAME @@ -121,19 +121,9 @@ If not at end, add name to cache; if at end and neithe nor deleting, add name to cache. .Ed .Sh LOCKS -The directory, +The directory .Fa dvp -should be locked on entry. -If an error (note: the return value -.Er EJUSTRETURN -is not considered an error) -is detected, it will be returned locked. -Otherwise, it will be unlocked unless both -.Dv LOCKPARENT -and -.Dv ISLASTCN -are specified in -.Fa cnp->cn_flags . +should be locked on entry and exit, regardless of error condition. If an entry is found in the directory, it will be returned locked. .Sh RETURN VALUES Zero is returned with From owner-svn-src-head@freebsd.org Fri Nov 17 16:44:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90495DDE5CD; Fri, 17 Nov 2017 16:44:24 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: from mail-wr0-x22a.google.com (mail-wr0-x22a.google.com [IPv6:2a00:1450:400c:c0c::22a]) (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 413476CFE9; Fri, 17 Nov 2017 16:44:24 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: by mail-wr0-x22a.google.com with SMTP id z75so1279497wrc.5; Fri, 17 Nov 2017 08:44:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=kQBSkw3KCXlEvx7PRkAMP/DaJaUGifIyrDPOZF108Lc=; b=U7SaElxgj4GfYmYE1E13YI2gDtgItYuj2kTa/15QM994+GMzj7vAtO6ZamIfM9I/oe a7pWYHwx2ffRC2uX4GgGIYR073Z0xHkhv1MtozVn9BTz/Ogjjlcmaemtb0td7vo3dxT6 wTgPnPp3+8Lgy0fnSRYOZgFGu85MbRs7w55cWvkLwRIFHDeapqWy0KrdgfMTgYg6bZIl yDKZh2nI1Mq/iFGiFbOTltrGVwknOAa9rAXfN0RCl7b7pYRFsyhpkb9RlD/woqXkhKxk wuUmjfXzUiJyszr9LuAI7THvQ2kQjqj99r/znnWbh93lE1oZNUEFvISVSXxk0RiSIXnq N3Fg== 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=kQBSkw3KCXlEvx7PRkAMP/DaJaUGifIyrDPOZF108Lc=; b=AIE+xryJqJeiEO8rraLriq8+kEkKTyjSDvTm/i1LHfg2HU5ermUpbh0aX8blYNiIhw E9UL4xbWypUw/senjl4jpkNXLsuRCfVugWfxoahCX4gEg2eqm5yyhWVCGlikrSgZeABm Ty941kk+9JbLDMMNecz/C3lTpG67UR5vj6Q9z8XGqrorgtH5XvbiQ54Cns961vl19Xtg sHKlRxzMUPj98vRmZ32mrHcW6HHyLNIWAKDG0eh2+83d/iDB4T647sL3QfQBztpyPNR+ 3cssVUQ1zMLFDBnXSQkYMom+zalbBlSgroaqFBMPsfZRlClTpWhYaA9KbNtbzwETAMKS y7tQ== X-Gm-Message-State: AJaThX5qaCkFkyWdfbVbTLxlFK6BeSDjEM50+WOatXMHlcxLqGuCpVzJ 55Px87ameXp9sK3FJsAuEMVl/w== X-Google-Smtp-Source: AGs4zMasrc7lM9BpiHOl3/hsQ09XI/y5b3bpp4ATqI7GNq+qylw1Vqp4zVEeJnEAiP4k8t4le2W7vQ== X-Received: by 10.223.173.67 with SMTP id p61mr4678201wrc.226.1510937061731; Fri, 17 Nov 2017 08:44:21 -0800 (PST) Received: from ernst.home (p578E0E39.dip0.t-ipconnect.de. [87.142.14.57]) by smtp.gmail.com with ESMTPSA id e6sm1629484wra.83.2017.11.17.08.44.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Nov 2017 08:44:20 -0800 (PST) Date: Fri, 17 Nov 2017 17:44:18 +0100 From: Gary Jennejohn To: Gordon Tetlow Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r325942 - head Message-ID: <20171117174418.0540c824@ernst.home> In-Reply-To: <201711171546.vAHFkJkC083162@repo.freebsd.org> References: <201711171546.vAHFkJkC083162@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-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 16:44:24 -0000 On Fri, 17 Nov 2017 15:46:19 +0000 (UTC) Gordon Tetlow wrote: > Author: gordon > Date: Fri Nov 17 15:46:19 2017 > New Revision: 325942 > URL: https://svnweb.freebsd.org/changeset/base/325942 > > Log: > Correct grammar nit. > > Modified: > head/UPDATING > > Modified: head/UPDATING > ============================================================================== > --- head/UPDATING Fri Nov 17 15:45:35 2017 (r325941) > +++ head/UPDATING Fri Nov 17 15:46:19 2017 (r325942) > @@ -66,7 +66,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: > 20171102: > Building in a FreeBSD src checkout will automatically create object > directories now rather than store files in the current directory if > - 'make obj' was not ran. Calling 'make obj' is no longer necesarry. > + 'make obj' was not ran. Calling 'make obj' is no longer necessary. > This feature can be disabled by setting WITHOUT_AUTO_OBJ=yes in > /etc/src-env.conf (not /etc/src.conf), or passing the option in the > environment. > "not ran" is bad english. "not run" is correct. -- Gary Jennejohn From owner-svn-src-head@freebsd.org Fri Nov 17 17:13:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74135DDED81; Fri, 17 Nov 2017 17:13: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 3FC7D6DC27; Fri, 17 Nov 2017 17:13: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 vAHHD0n3020556; Fri, 17 Nov 2017 17:13:00 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAHHD0sB020555; Fri, 17 Nov 2017 17:13:00 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201711171713.vAHHD0sB020555@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 17 Nov 2017 17:13:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325947 - head/sys/cam/scsi X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/sys/cam/scsi X-SVN-Commit-Revision: 325947 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 17:13:01 -0000 Author: asomers Date: Fri Nov 17 17:13:00 2017 New Revision: 325947 URL: https://svnweb.freebsd.org/changeset/base/325947 Log: Fix potential NULL pointer dereference of device physical path In scsi_dev_advinfo(), if the physical path is being stored and there is a malloc failure (malloc(9) is called with M_NOWAIT), we could wind up in a situation where the device's physpath_len is set to the length the user provided, but the physpath itself is NULL. If another context then comes in to fetch the physical path value, we would wind up trying to memcpy a NULL pointer into the caller's buffer. So, set the physpath_len to 0 when we free the physpath on entry into the store case for the physical path. Reset the length to a non-zero value only after we've successfully malloced a buffer to hold it. Submitted by: ken Reviewed by: asomers MFC after: 3 weeks Sponsored by: Spectra Logic Corp Modified: head/sys/cam/scsi/scsi_xpt.c Modified: head/sys/cam/scsi/scsi_xpt.c ============================================================================== --- head/sys/cam/scsi/scsi_xpt.c Fri Nov 17 16:04:37 2017 (r325946) +++ head/sys/cam/scsi/scsi_xpt.c Fri Nov 17 17:13:00 2017 (r325947) @@ -2549,8 +2549,8 @@ scsi_dev_advinfo(union ccb *start_ccb) if (device->physpath != NULL) { free(device->physpath, M_CAMXPT); device->physpath = NULL; + device->physpath_len = 0; } - device->physpath_len = cdai->bufsiz; /* Clear existing buffer if zero length */ if (cdai->bufsiz == 0) break; @@ -2559,6 +2559,7 @@ scsi_dev_advinfo(union ccb *start_ccb) start_ccb->ccb_h.status = CAM_REQ_ABORTED; return; } + device->physpath_len = cdai->bufsiz; memcpy(device->physpath, cdai->buf, cdai->bufsiz); } else { cdai->provsiz = device->physpath_len; From owner-svn-src-head@freebsd.org Fri Nov 17 17:25:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5153DDF17B; Fri, 17 Nov 2017 17:25:55 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay115.isp.belgacom.be (mailrelay115.isp.belgacom.be [195.238.20.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "relay.skynet.be", Issuer "GlobalSign Organization Validation CA - SHA256 - G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 798946E18E; Fri, 17 Nov 2017 17:25:53 +0000 (UTC) (envelope-from tijl@freebsd.org) X-Belgacom-Dynamic: yes IronPort-PHdr: =?us-ascii?q?9a23=3AXixo2RciYP+JFHhhLu/aHIe1lGMj4u6mDksu8pMi?= =?us-ascii?q?zoh2WeGdxc26YxyN2/xhgRfzUJnB7Loc0qyN4vCmATRIyK3CmUhKSIZLWR4BhJ?= =?us-ascii?q?detC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+?= =?us-ascii?q?KPjrFY7OlcS30P2594HObwlSijewZbB/IA+qoQnNq8IbnZZsJqEtxxXTv3BGYf?= =?us-ascii?q?5WxWRmJVKSmxbz+MK994N9/ipTpvws6ddOXb31cKokQ7NYCi8mM30u683wqRbD?= =?us-ascii?q?VwqP6WACXWgQjxFFHhLK7BD+Xpf2ryv6qu9w0zSUMMHqUbw5Xymp4qF2QxHqlS?= =?us-ascii?q?gHLSY0/m/XhMJukaxVoxCupxJwzIHIb4+YL+Z+c6HBcd8GWWZNQthdWipcCY28?= =?us-ascii?q?dYsPCO8BMP5GoYn8pVsOqQa1CBerBOPo0T9HmHr20rc80+Q6DArL2xAgH9MMsH?= =?us-ascii?q?TQt9j7NL0SXv6rw6TV0DvNYela2TDn6IjHax0sp+yHU7x3ccrU00YvFgXFg02K?= =?us-ascii?q?qYP7OzOZzP4Ns2+D4+puT+KglXAopBpqojey3MssjZPJho0NxlDc8SV53Jw5Ks?= =?us-ascii?q?CiR05ne9GpFoZbuSKCN4ZuQc4uXntktDg1x7AGo5K3YSoHxZA9yxPeafGKdZWD?= =?us-ascii?q?7Aj5W+aLOzh4gWpoeLe4hxmv70et0vb8Vsyo0FZSqSpFj8XMumgN1xPN7siHTe?= =?us-ascii?q?Nw/kS71jaL1gDT7/9LIVozlabBN54hw7wwlp4JvUvfGS/2n172g7GTdko+/Oio?= =?us-ascii?q?8P7rYrL8pp+TL4N0iwf+PboymsGnAuk0LxICU3aU9Om8zrHv4E/0TbFQgvA3kK?= =?us-ascii?q?TVqJXaKt4apq69DQ9VyIEj6xOnAje60dQYn30HIUlLeBKdkYfmJUrBIOvlAvul?= =?us-ascii?q?hFSsijhry+jcPrL9GpXNMmTDkLD5cLZ+6k5T0xE+zd5F551KFL4OO+nzVVLruN?= =?us-ascii?q?zfFB85PBS+w/z7B9VlyoMeRWWPD7eHP6PXq1CI/f4vLPeXaY8bojbyNeYq6OX1?= =?us-ascii?q?jXAkg1MderOp3ZQPYnCiAvtmO1mZYWbrgtoZCmcKoAw+QPXxiF2YTTFffnayUL?= =?us-ascii?q?wm6T4mE4+mA53DSZ6zj7Oaxye0A4daZmdcClCDCX3obZmLW+8QaCKOJc9siicE?= =?us-ascii?q?VaanS4M4zhGurhP1x6N9IerQ/i0Vrpzj1MJr6OLNjh4y7iF7A96a02GXQGF+hn?= =?us-ascii?q?kISCMu3KBjvUx9zU+O0bNig/NEDNBc+/RJUgI/NZ7d0+x6F879WhjaftqSRlam?= =?us-ascii?q?WMupDi8qQdIq3tACeUF9G8+tjhrbxSqlH6cVl6CXBJwz6q/TwnnxJ8NmxnbIzq?= =?us-ascii?q?kukUcpTdBUNWK7nKJ/8BLTB4Ga23mewoqrcKUAxj+F3WGP12uF9BVUUQtYf7/I?= =?us-ascii?q?UFokSg3Rt9uvtW3YSLr7NbUlNkNqzsmZJ65DbMah2UlHRvPLFs7TbkiKtyG3Hx?= =?us-ascii?q?neleDEV5bjZ2hIhHaVM0MDiQ1GpXs=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2AvCAAuGg9a/0Oz9VFbGwEBAQEDAQEBC?= =?us-ascii?q?QEBAYMOLkQQEG4UE48SjjEBAYF8NAGYPi2FGAKEZkQUAQEBAQEBAQEBAWoogjg?= =?us-ascii?q?igkUBBTocIxALDgYECSUPKh4GE4opDKxEin0BAQEBAQEBAwEBAQEBAQEhgzSFR?= =?us-ascii?q?AGDK4UbhXgFii6HRoFyjliHco0NgQCBI2KQVIo1gj2KejYigXRVMghJgmQJglA?= =?us-ascii?q?CHYFoQDaKVgEBAQ?= X-IPAS-Result: =?us-ascii?q?A2AvCAAuGg9a/0Oz9VFbGwEBAQEDAQEBCQEBAYMOLkQQEG4?= =?us-ascii?q?UE48SjjEBAYF8NAGYPi2FGAKEZkQUAQEBAQEBAQEBAWoogjgigkUBBTocIxALD?= =?us-ascii?q?gYECSUPKh4GE4opDKxEin0BAQEBAQEBAwEBAQEBAQEhgzSFRAGDK4UbhXgFii6?= =?us-ascii?q?HRoFyjliHco0NgQCBI2KQVIo1gj2KejYigXRVMghJgmQJglACHYFoQDaKVgEBA?= =?us-ascii?q?Q?= Received: from 67.179-245-81.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([81.245.179.67]) by relay.skynet.be with ESMTP; 17 Nov 2017 18:24:40 +0100 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.15.2/8.15.2) with ESMTP id vAHHOdT2031644; Fri, 17 Nov 2017 18:24:39 +0100 (CET) (envelope-from tijl@FreeBSD.org) Date: Fri, 17 Nov 2017 18:24:38 +0100 From: Tijl Coosemans To: Dimitry Andric Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, emaste@freebsd.org, kib@FreeBSD.org Subject: Re: svn commit: r324938 - head/contrib/jemalloc/include/jemalloc/internal Message-ID: <20171117182438.4c81ae3c@kalimero.tijl.coosemans.org> In-Reply-To: <201710232131.v9NLV4Rb068825@repo.freebsd.org> References: <201710232131.v9NLV4Rb068825@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 17:25:55 -0000 On Mon, 23 Oct 2017 21:31:04 +0000 (UTC) Dimitry Andric wrote: > Author: dim > Date: Mon Oct 23 21:31:04 2017 > New Revision: 324938 > URL: https://svnweb.freebsd.org/changeset/base/324938 > > Log: > After jemalloc was updated to version 5.0.0 in r319971, i386 executables > linked with AddressSanitizer (even those linked on earlier versions of > FreeBSD, or with external versions of clang) started failing with errors > similar to: > > ==14688==AddressSanitizer CHECK failed: > /usr/src/contrib/compiler-rt/lib/asan/asan_poisoning.cc:36 > "((AddrIsAlignedByGranularity(addr))) != (0)" (0x0, 0x0) > > This is because AddressSanitizer expects all the TLS data in the program > to be aligned to at least 8 bytes. > > Before the jemalloc 5.0.0 update, all the TLS data in the i386 version > of libc.so added up to 80 bytes (a multiple of 8), but 5.0.0 made this > grow to 2404 bytes (not a multiple of 8). This is due to added caching > data in jemalloc's internal struct tsd_s. > > To fix AddressSanitizer, ensure this struct is aligned to at least 16 > bytes, which can be done unconditionally for all architectures. (An > earlier version of the fix aligned the struct to 8 bytes, but only for > ILP32 architectures. This was deemed unnecessarily complicated.) > > PR: 221337 > X-MFC-With: r319971 > > Modified: > head/contrib/jemalloc/include/jemalloc/internal/tsd.h > > Modified: head/contrib/jemalloc/include/jemalloc/internal/tsd.h > ============================================================================== > --- head/contrib/jemalloc/include/jemalloc/internal/tsd.h Mon Oct 23 20:50:08 2017 (r324937) > +++ head/contrib/jemalloc/include/jemalloc/internal/tsd.h Mon Oct 23 21:31:04 2017 (r324938) > @@ -120,7 +120,8 @@ struct tsd_s { > t use_a_getter_or_setter_instead_##n; > MALLOC_TSD > #undef O > -}; > +/* AddressSanitizer requires TLS data to be aligned to at least 8 bytes. */ > +} JEMALLOC_ALIGNED(16); > > /* > * Wrapper around tsd_t that makes it possible to avoid implicit conversion > On amd64 this commit causes kded4 to crash in libnvidia-tls.so.1 (from x11/nvidia-driver-304) during KDE startup. Lowering to 8 byte alignment fixes the crash. Note that in libc the TLS segment alignment is 16 now but the memory size isn't a multiple of 16. Does rtld handle this correctly? Application: KDE Daemon (kded4), signal: Segmentation fault [KCrash Handler] #8 0x000000081cea3761 in _nv024tls () from /usr/local/lib/libnvidia-tls.so.1 #9 0x000000081c7a698c in ?? () from /usr/local/lib/libGL-NVIDIA.so.1 #10 0x000000081c78915d in ?? () from /usr/local/lib/libGL-NVIDIA.so.1 #11 0x000000081c78966a in ?? () from /usr/local/lib/libGL-NVIDIA.so.1 #12 0x0000000800616c08 in objlist_call_init (list=0x7fffffffd100, lockstate=0x7fffffffd098) at /usr/src/libexec/rtld-elf/rtld.c:2670 #13 0x000000080061cae2 in dlopen_object (name=0x801fd0c98 "/usr/local/lib/kde4/kded_powerdevil.so", fd=-1, refobj=0x80063b000, lo_flags=2, mode=1, lockstate=0x7fffffffd098) at /usr/src/libexec/rtld-elf/rtld.c:3389 #14 0x0000000800617fba in rtld_dlopen (name=0x801fd0c98 "/usr/local/lib/kde4/kded_powerdevil.so", fd=-1, mode=1) at /usr/src/libexec/rtld-elf/rtld.c:3264 #15 0x0000000800617e52 in dlopen (name=0x801fd0c98 "/usr/local/lib/kde4/kded_powerdevil.so", mode=1) at /usr/src/libexec/rtld-elf/rtld.c:3231 #16 0x0000000802190ddf in ?? () from /usr/local/lib/qt4/libQtCore.so.4 #17 0x000000080218959b in ?? () from /usr/local/lib/qt4/libQtCore.so.4 #18 0x0000000801898d47 in KPluginLoader::load() () from /usr/local/lib/libkdecore.so.5 #19 0x0000000801898b37 in KPluginLoader::factory() () from /usr/local/lib/libkdecore.so.5 #20 0x000000080c31b473 in ?? () from /usr/local/lib/libkdeinit4_kded4.so #21 0x000000080c31ab29 in ?? () from /usr/local/lib/libkdeinit4_kded4.so ..... % readelf -l /usr/local/lib/libnvidia-tls.so Elf file type is DYN (Shared object file) Entry point 0x640 There are 6 program headers, starting at offset 64 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align LOAD 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000af0 0x0000000000000af0 R E 0x200000 LOAD 0x0000000000000af0 0x0000000000200af0 0x0000000000200af0 0x00000000000001fc 0x0000000000000260 RW 0x200000 DYNAMIC 0x0000000000000af8 0x0000000000200af8 0x0000000000200af8 0x0000000000000190 0x0000000000000190 RW 0x8 NOTE 0x0000000000000ad0 0x0000000000000ad0 0x0000000000000ad0 0x0000000000000020 0x0000000000000020 R 0x4 TLS 0x0000000000000af0 0x0000000000200af0 0x0000000000200af0 0x0000000000000000 0x0000000000000030 R 0x8 GNU_STACK 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000 RW 0x8 Section to Segment mapping: Segment Sections... 00 .hash .dynsym .dynstr .gnu.version .gnu.version_r .rela.dyn .rela.plt .plt .text .rodata .eh_frame .note.ABI-tag .shstrtab 01 .tbss .data.rel.ro .dynamic .got .got.plt .data .bss 02 .dynamic 03 .note.ABI-tag 04 .tbss .data.rel.ro 05 % readelf -l /lib/libc.so.7 Elf file type is DYN (Shared object file) Entry point 0x3d8f0 There are 6 program headers, starting at offset 64 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align LOAD 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x00000000001b0894 0x00000000001b0894 R E 0x200000 LOAD 0x00000000001b1000 0x00000000003b1000 0x00000000003b1000 0x000000000000e770 0x0000000000234bc0 RW 0x200000 DYNAMIC 0x00000000001b9240 0x00000000003b9240 0x00000000003b9240 0x00000000000001a0 0x00000000000001a0 RW 0x8 TLS 0x00000000001b1000 0x00000000003b1000 0x00000000003b1000 0x00000000000017e0 0x0000000000001818 R 0x10 GNU_EH_FRAME 0x0000000000188eb0 0x0000000000188eb0 0x0000000000188eb0 0x000000000000715c 0x000000000000715c R 0x4 GNU_STACK 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000 RW 0x8 Section to Segment mapping: Segment Sections... 00 .hash .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_d .rela.dyn .rela.plt .init .plt .text .fini .rodata .eh_frame_hdr .eh_frame .comment .gnu.warning.tmpnam .gnu.warning.tempnam .gnu.warning.gets .gnu.warning.mktemp .gnu.warning.f_prealloc .shstrtab .symtab .strtab 01 .tdata .tbss .ctors .dtors .jcr .data.rel.ro .dynamic .got .got.plt .data .bss 02 .dynamic 03 .tdata .tbss .ctors .dtors 04 .eh_frame_hdr 05 From owner-svn-src-head@freebsd.org Fri Nov 17 17:33:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CBC1FDDF3F5; Fri, 17 Nov 2017 17:33:07 +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 9385C6E607; Fri, 17 Nov 2017 17:33:07 +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 vAHHX6CC028758; Fri, 17 Nov 2017 17:33:06 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAHHX6eV028755; Fri, 17 Nov 2017 17:33:06 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201711171733.vAHHX6eV028755@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 17 Nov 2017 17:33:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325948 - head/release/arm64 X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/release/arm64 X-SVN-Commit-Revision: 325948 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 17:33:07 -0000 Author: gjb Date: Fri Nov 17 17:33:06 2017 New Revision: 325948 URL: https://svnweb.freebsd.org/changeset/base/325948 Log: Remove stray SRCBRANCH included by mistake. Sponsored by: The FreeBSD Foundation Modified: head/release/arm64/PINE64.conf head/release/arm64/RPI3.conf Modified: head/release/arm64/PINE64.conf ============================================================================== --- head/release/arm64/PINE64.conf Fri Nov 17 17:13:00 2017 (r325947) +++ head/release/arm64/PINE64.conf Fri Nov 17 17:33:06 2017 (r325948) @@ -3,7 +3,6 @@ # $FreeBSD$ # -SRCBRANCH="base/head@rHEAD" EMBEDDEDBUILD=1 EMBEDDED_TARGET="arm64" EMBEDDED_TARGET_ARCH="aarch64" Modified: head/release/arm64/RPI3.conf ============================================================================== --- head/release/arm64/RPI3.conf Fri Nov 17 17:13:00 2017 (r325947) +++ head/release/arm64/RPI3.conf Fri Nov 17 17:33:06 2017 (r325948) @@ -3,7 +3,6 @@ # $FreeBSD$ # -SRCBRANCH="base/head@rHEAD" EMBEDDEDBUILD=1 EMBEDDED_TARGET="arm64" EMBEDDED_TARGET_ARCH="aarch64" From owner-svn-src-head@freebsd.org Fri Nov 17 17:34:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 337FFDDF4ED; Fri, 17 Nov 2017 17:34:54 +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 000D66E816; Fri, 17 Nov 2017 17:34:53 +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 vAHHYriA028869; Fri, 17 Nov 2017 17:34:53 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAHHYq9i028867; Fri, 17 Nov 2017 17:34:52 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201711171734.vAHHYq9i028867@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 17 Nov 2017 17:34:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325949 - head/release/arm64 X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/release/arm64 X-SVN-Commit-Revision: 325949 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 17:34:54 -0000 Author: gjb Date: Fri Nov 17 17:34:52 2017 New Revision: 325949 URL: https://svnweb.freebsd.org/changeset/base/325949 Log: Sort variables in arm64 SoC configurations. Remove an unneeded UBLDR_LOADADDR from RPI3.conf. Sponsored by: The FreeBSD Foundation Modified: head/release/arm64/PINE64.conf head/release/arm64/RPI3.conf Modified: head/release/arm64/PINE64.conf ============================================================================== --- head/release/arm64/PINE64.conf Fri Nov 17 17:33:06 2017 (r325948) +++ head/release/arm64/PINE64.conf Fri Nov 17 17:34:52 2017 (r325949) @@ -3,17 +3,17 @@ # $FreeBSD$ # -EMBEDDEDBUILD=1 -EMBEDDED_TARGET="arm64" EMBEDDED_TARGET_ARCH="aarch64" +EMBEDDED_TARGET="arm64" +EMBEDDEDBUILD=1 EMBEDDEDPORTS="sysutils/u-boot-pine64" -KERNEL="GENERIC" -IMAGE_SIZE="2560M" -PART_SCHEME="MBR" FAT_SIZE="54m -b 1m" FAT_TYPE="16" +IMAGE_SIZE="2560M" +KERNEL="GENERIC" MD_ARGS="-x 16384 -y 255" NODOC=1 +PART_SCHEME="MBR" export BOARDNAME="PINE64" arm_install_uboot() { Modified: head/release/arm64/RPI3.conf ============================================================================== --- head/release/arm64/RPI3.conf Fri Nov 17 17:33:06 2017 (r325948) +++ head/release/arm64/RPI3.conf Fri Nov 17 17:34:52 2017 (r325949) @@ -3,21 +3,20 @@ # $FreeBSD$ # -EMBEDDEDBUILD=1 -EMBEDDED_TARGET="arm64" +DTB_REPO="https://github.com/raspberrypi/firmware/blob/master/boot" +DTB="bcm2710-rpi-3-b.dtb" EMBEDDED_TARGET_ARCH="aarch64" +EMBEDDED_TARGET="arm64" +EMBEDDEDBUILD=1 EMBEDDEDPORTS="sysutils/u-boot-rpi3 security/ca_root_nss" -KERNEL="GENERIC" -WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x42000000" -IMAGE_SIZE="2560M" -PART_SCHEME="MBR" FAT_SIZE="50m -b 1m" FAT_TYPE="16" +IMAGE_SIZE="2560M" +KERNEL="GENERIC" MD_ARGS="-x 63 -y 255" NODOC=1 -DTB_REPO="https://github.com/raspberrypi/firmware/blob/master/boot" -DTB="bcm2710-rpi-3-b.dtb" OVERLAYS="mmc.dtbo pi3-disable-bt.dtbo" +PART_SCHEME="MBR" export BOARDNAME="RPI3" arm_install_uboot() { From owner-svn-src-head@freebsd.org Fri Nov 17 17:36:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B597DDDF5A6; Fri, 17 Nov 2017 17:36:47 +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 8EDFD6E9BC; Fri, 17 Nov 2017 17:36:47 +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 vAHHakOD028989; Fri, 17 Nov 2017 17:36:46 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAHHaj27028979; Fri, 17 Nov 2017 17:36:45 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201711171736.vAHHaj27028979@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 17 Nov 2017 17:36:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325950 - head/release/arm X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/release/arm X-SVN-Commit-Revision: 325950 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 17:36:47 -0000 Author: gjb Date: Fri Nov 17 17:36:45 2017 New Revision: 325950 URL: https://svnweb.freebsd.org/changeset/base/325950 Log: Sort variables for consistency. Sponsored by: The FreeBSD Foundation Modified: head/release/arm/BANANAPI.conf head/release/arm/BEAGLEBONE.conf head/release/arm/CUBIEBOARD.conf head/release/arm/CUBIEBOARD2.conf head/release/arm/CUBOX-HUMMINGBOARD.conf head/release/arm/GUMSTIX.conf head/release/arm/PANDABOARD.conf head/release/arm/RPI-B.conf head/release/arm/RPI2.conf head/release/arm/WANDBOARD.conf Modified: head/release/arm/BANANAPI.conf ============================================================================== --- head/release/arm/BANANAPI.conf Fri Nov 17 17:34:52 2017 (r325949) +++ head/release/arm/BANANAPI.conf Fri Nov 17 17:36:45 2017 (r325950) @@ -3,17 +3,17 @@ # $FreeBSD$ # -EMBEDDEDBUILD=1 -EMBEDDED_TARGET="arm" EMBEDDED_TARGET_ARCH="armv7" +EMBEDDED_TARGET="arm" +EMBEDDEDBUILD=1 EMBEDDEDPORTS="sysutils/u-boot-bananapi" -KERNEL="GENERIC" -IMAGE_SIZE="3072M" -PART_SCHEME="MBR" FAT_SIZE="32m -b 1m" FAT_TYPE="16" +IMAGE_SIZE="3072M" +KERNEL="GENERIC" MD_ARGS="-x 63 -y 255" NODOC=1 +PART_SCHEME="MBR" export BOARDNAME="BANANAPI" arm_install_uboot() { Modified: head/release/arm/BEAGLEBONE.conf ============================================================================== --- head/release/arm/BEAGLEBONE.conf Fri Nov 17 17:34:52 2017 (r325949) +++ head/release/arm/BEAGLEBONE.conf Fri Nov 17 17:36:45 2017 (r325950) @@ -3,17 +3,17 @@ # $FreeBSD$ # -EMBEDDEDBUILD=1 -EMBEDDED_TARGET="arm" EMBEDDED_TARGET_ARCH="armv7" +EMBEDDED_TARGET="arm" +EMBEDDEDBUILD=1 EMBEDDEDPORTS="sysutils/u-boot-beaglebone" -KERNEL="GENERIC" -IMAGE_SIZE="3072M" -PART_SCHEME="MBR" FAT_SIZE="2m" FAT_TYPE="12" +IMAGE_SIZE="3072M" +KERNEL="GENERIC" MD_ARGS="-x 63 -y 255" NODOC=1 +PART_SCHEME="MBR" export BOARDNAME="BEAGLEBONE" arm_install_uboot() { Modified: head/release/arm/CUBIEBOARD.conf ============================================================================== --- head/release/arm/CUBIEBOARD.conf Fri Nov 17 17:34:52 2017 (r325949) +++ head/release/arm/CUBIEBOARD.conf Fri Nov 17 17:36:45 2017 (r325950) @@ -3,17 +3,17 @@ # $FreeBSD$ # -EMBEDDEDBUILD=1 -EMBEDDED_TARGET="arm" EMBEDDED_TARGET_ARCH="armv7" +EMBEDDED_TARGET="arm" +EMBEDDEDBUILD=1 EMBEDDEDPORTS="sysutils/u-boot-cubieboard" -KERNEL="GENERIC" -IMAGE_SIZE="3072M" -PART_SCHEME="MBR" FAT_SIZE="32m -b 1m" FAT_TYPE="16" +IMAGE_SIZE="3072M" +KERNEL="GENERIC" MD_ARGS="-x 63 -y 255" NODOC=1 +PART_SCHEME="MBR" export BOARDNAME="CUBIEBOARD" arm_install_uboot() { Modified: head/release/arm/CUBIEBOARD2.conf ============================================================================== --- head/release/arm/CUBIEBOARD2.conf Fri Nov 17 17:34:52 2017 (r325949) +++ head/release/arm/CUBIEBOARD2.conf Fri Nov 17 17:36:45 2017 (r325950) @@ -3,17 +3,17 @@ # $FreeBSD$ # -EMBEDDEDBUILD=1 -EMBEDDED_TARGET="arm" EMBEDDED_TARGET_ARCH="armv7" +EMBEDDED_TARGET="arm" +EMBEDDEDBUILD=1 EMBEDDEDPORTS="sysutils/u-boot-cubieboard2" -KERNEL="GENERIC" -IMAGE_SIZE="3072M" -PART_SCHEME="MBR" FAT_SIZE="32m -b 1m" FAT_TYPE="16" +IMAGE_SIZE="3072M" +KERNEL="GENERIC" MD_ARGS="-x 63 -y 255" NODOC=1 +PART_SCHEME="MBR" export BOARDNAME="CUBIEBOARD2" arm_install_uboot() { Modified: head/release/arm/CUBOX-HUMMINGBOARD.conf ============================================================================== --- head/release/arm/CUBOX-HUMMINGBOARD.conf Fri Nov 17 17:34:52 2017 (r325949) +++ head/release/arm/CUBOX-HUMMINGBOARD.conf Fri Nov 17 17:36:45 2017 (r325950) @@ -3,17 +3,17 @@ # $FreeBSD$ # -EMBEDDEDBUILD=1 -EMBEDDED_TARGET="arm" EMBEDDED_TARGET_ARCH="armv7" +EMBEDDED_TARGET="arm" +EMBEDDEDBUILD=1 EMBEDDEDPORTS="sysutils/u-boot-cubox-hummingboard" -KERNEL="IMX6" -IMAGE_SIZE="3072M" -PART_SCHEME="MBR" FAT_SIZE="50m -b 16384" FAT_TYPE="16" +IMAGE_SIZE="3072M" +KERNEL="IMX6" MD_ARGS="-x 63 -y 255" NODOC=1 +PART_SCHEME="MBR" export BOARDNAME="CUBOX-HUMMINGBOARD" arm_install_uboot() { Modified: head/release/arm/GUMSTIX.conf ============================================================================== --- head/release/arm/GUMSTIX.conf Fri Nov 17 17:34:52 2017 (r325949) +++ head/release/arm/GUMSTIX.conf Fri Nov 17 17:36:45 2017 (r325950) @@ -3,17 +3,17 @@ # $FreeBSD$ # -EMBEDDEDBUILD=1 -EMBEDDED_TARGET="arm" EMBEDDED_TARGET_ARCH="arm" +EMBEDDED_TARGET="arm" +EMBEDDEDBUILD=1 EMBEDDEDPORTS="sysutils/u-boot-duovero" -KERNEL="GUMSTIX" -IMAGE_SIZE="3072M" -PART_SCHEME="MBR" FAT_SIZE="2m" FAT_TYPE="12" +IMAGE_SIZE="3072M" +KERNEL="GUMSTIX" MD_ARGS="-x 63 -y 255" NODOC=1 +PART_SCHEME="MBR" arm_install_uboot() { UBOOT_DIR="/usr/local/share/u-boot/u-boot-duovero" Modified: head/release/arm/PANDABOARD.conf ============================================================================== --- head/release/arm/PANDABOARD.conf Fri Nov 17 17:34:52 2017 (r325949) +++ head/release/arm/PANDABOARD.conf Fri Nov 17 17:36:45 2017 (r325950) @@ -3,17 +3,17 @@ # $FreeBSD$ # -EMBEDDEDBUILD=1 -EMBEDDED_TARGET="arm" EMBEDDED_TARGET_ARCH="armv7" +EMBEDDED_TARGET="arm" +EMBEDDEDBUILD=1 EMBEDDEDPORTS="sysutils/u-boot-pandaboard" -KERNEL="GENERIC" -IMAGE_SIZE="3072M" -PART_SCHEME="MBR" FAT_SIZE="2m" FAT_TYPE="12" +IMAGE_SIZE="3072M" +KERNEL="GENERIC" MD_ARGS="-x 63 -y 255" NODOC=1 +PART_SCHEME="MBR" export BOARDNAME="PANDABOARD" arm_install_uboot() { Modified: head/release/arm/RPI-B.conf ============================================================================== --- head/release/arm/RPI-B.conf Fri Nov 17 17:34:52 2017 (r325949) +++ head/release/arm/RPI-B.conf Fri Nov 17 17:36:45 2017 (r325950) @@ -3,17 +3,17 @@ # $FreeBSD$ # -EMBEDDEDBUILD=1 -EMBEDDED_TARGET="arm" EMBEDDED_TARGET_ARCH="armv6" +EMBEDDED_TARGET="arm" +EMBEDDEDBUILD=1 EMBEDDEDPORTS="sysutils/u-boot-rpi sysutils/rpi-firmware" -KERNEL="RPI-B" -IMAGE_SIZE="3072M" -PART_SCHEME="MBR" FAT_SIZE="17m" FAT_TYPE="16" +IMAGE_SIZE="3072M" +KERNEL="RPI-B" MD_ARGS="-x 63 -y 255" NODOC=1 +PART_SCHEME="MBR" arm_install_uboot() { UBOOT_DIR="/usr/local/share/u-boot/u-boot-rpi" Modified: head/release/arm/RPI2.conf ============================================================================== --- head/release/arm/RPI2.conf Fri Nov 17 17:34:52 2017 (r325949) +++ head/release/arm/RPI2.conf Fri Nov 17 17:36:45 2017 (r325950) @@ -3,17 +3,17 @@ # $FreeBSD$ # -EMBEDDEDBUILD=1 -EMBEDDED_TARGET="arm" EMBEDDED_TARGET_ARCH="armv7" +EMBEDDED_TARGET="arm" +EMBEDDEDBUILD=1 EMBEDDEDPORTS="sysutils/u-boot-rpi2 sysutils/rpi-firmware" -KERNEL="GENERIC" -IMAGE_SIZE="3072M" -PART_SCHEME="MBR" FAT_SIZE="50m" FAT_TYPE="16" +IMAGE_SIZE="3072M" +KERNEL="GENERIC" MD_ARGS="-x 63 -y 255" NODOC=1 +PART_SCHEME="MBR" export BOARDNAME="RPI2" arm_install_uboot() { Modified: head/release/arm/WANDBOARD.conf ============================================================================== --- head/release/arm/WANDBOARD.conf Fri Nov 17 17:34:52 2017 (r325949) +++ head/release/arm/WANDBOARD.conf Fri Nov 17 17:36:45 2017 (r325950) @@ -3,17 +3,17 @@ # $FreeBSD$ # -EMBEDDEDBUILD=1 -EMBEDDED_TARGET="arm" EMBEDDED_TARGET_ARCH="armv7" +EMBEDDED_TARGET="arm" +EMBEDDEDBUILD=1 EMBEDDEDPORTS="sysutils/u-boot-wandboard" -KERNEL="IMX6" -IMAGE_SIZE="3072M" -PART_SCHEME="MBR" FAT_SIZE="50m -b 16384" FAT_TYPE="16" +IMAGE_SIZE="3072M" +KERNEL="IMX6" MD_ARGS="-x 63 -y 255" NODOC=1 +PART_SCHEME="MBR" export BOARDNAME="WANDBOARD" arm_install_uboot() { From owner-svn-src-head@freebsd.org Fri Nov 17 17:40:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 662ABDDF68D; Fri, 17 Nov 2017 17:40:54 +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 32D906EBB4; Fri, 17 Nov 2017 17:40:54 +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 vAHHer54031350; Fri, 17 Nov 2017 17:40:53 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAHHer0H031349; Fri, 17 Nov 2017 17:40:53 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201711171740.vAHHer0H031349@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 17 Nov 2017 17:40:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325951 - head/release/arm64 X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/release/arm64 X-SVN-Commit-Revision: 325951 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 17:40:54 -0000 Author: gjb Date: Fri Nov 17 17:40:53 2017 New Revision: 325951 URL: https://svnweb.freebsd.org/changeset/base/325951 Log: Fix indentation. Sponsored by: The FreeBSD Foundation Modified: head/release/arm64/RPI3.conf Modified: head/release/arm64/RPI3.conf ============================================================================== --- head/release/arm64/RPI3.conf Fri Nov 17 17:36:45 2017 (r325950) +++ head/release/arm64/RPI3.conf Fri Nov 17 17:40:53 2017 (r325951) @@ -41,9 +41,9 @@ arm_install_uboot() { done BOOTFILES="$(chroot ${CHROOTDIR} \ - env TARGET=${EMBEDDED_TARGET} TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \ - WITH_UNIFIED_OBJDIR=yes \ - make -C ${WORLDDIR}/stand -V .OBJDIR)" + env TARGET=${EMBEDDED_TARGET} TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \ + WITH_UNIFIED_OBJDIR=yes \ + make -C ${WORLDDIR}/stand -V .OBJDIR)" BOOTFILES="$(realpath ${BOOTFILES})" chroot ${CHROOTDIR} mkdir -p ${FATMOUNT}/EFI/BOOT From owner-svn-src-head@freebsd.org Fri Nov 17 17:54:11 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA3E9DDFC4D; Fri, 17 Nov 2017 17:54:11 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 842BD6F41F; Fri, 17 Nov 2017 17:54:11 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAHHsAtd037428; Fri, 17 Nov 2017 17:54:10 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAHHsATu037427; Fri, 17 Nov 2017 17:54:10 GMT (envelope-from br@FreeBSD.org) Message-Id: <201711171754.vAHHsATu037427@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Fri, 17 Nov 2017 17:54:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325952 - head/sys/x86/include X-SVN-Group: head X-SVN-Commit-Author: br X-SVN-Commit-Paths: head/sys/x86/include X-SVN-Commit-Revision: 325952 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 17:54:11 -0000 Author: br Date: Fri Nov 17 17:54:10 2017 New Revision: 325952 URL: https://svnweb.freebsd.org/changeset/base/325952 Log: Add Intel Processor Trace registers for: - CPUID - Table of Physical Addresses (ToPA). Sponsored by: DARPA, AFRL Modified: head/sys/x86/include/specialreg.h Modified: head/sys/x86/include/specialreg.h ============================================================================== --- head/sys/x86/include/specialreg.h Fri Nov 17 17:40:53 2017 (r325951) +++ head/sys/x86/include/specialreg.h Fri Nov 17 17:54:10 2017 (r325952) @@ -188,6 +188,35 @@ #define CPUTPM1_ARAT 0x00000004 #define CPUTPM2_EFFREQ 0x00000001 +/* Intel Processor Trace CPUID. */ + +/* Leaf 0 ebx. */ +#define CPUPT_CR3 (1 << 0) /* CR3 Filtering Support */ +#define CPUPT_PSB (1 << 1) /* Configurable PSB and Cycle-Accurate Mode Supported */ +#define CPUPT_IPF (1 << 2) /* IP Filtering and TraceStop supported */ +#define CPUPT_MTC (1 << 3) /* MTC Supported */ +#define CPUPT_PRW (1 << 4) /* PTWRITE Supported */ +#define CPUPT_PWR (1 << 5) /* Power Event Trace Supported */ + +/* Leaf 0 ecx. */ +#define CPUPT_TOPA (1 << 0) /* ToPA Output Supported */ +#define CPUPT_TOPA_MULTI (1 << 1) /* ToPA Tables Allow Multiple Output Entries */ +#define CPUPT_SINGLE (1 << 2) /* Single-Range Output Supported */ +#define CPUPT_TT_OUT (1 << 3) /* Output to Trace Transport Subsystem Supported */ +#define CPUPT_LINEAR_IP (1 << 31) /* IP Payloads are Linear IP, otherwise IP is effective */ + +/* Leaf 1 eax. */ +#define CPUPT_NADDR_S 0 /* Number of Address Ranges */ +#define CPUPT_NADDR_M (0x7 << CPUPT_NADDR_S) +#define CPUPT_MTC_BITMAP_S 16 /* Bitmap of supported MTC Period Encodings */ +#define CPUPT_MTC_BITMAP_M (0xffff << CPUPT_MTC_BITMAP_S) + +/* Leaf 1 ebx. */ +#define CPUPT_CT_BITMAP_S 0 /* Bitmap of supported Cycle Threshold values */ +#define CPUPT_CT_BITMAP_M (0xffff << CPUPT_CT_BITMAP_S) +#define CPUPT_PFE_BITMAP_S 16 /* Bitmap of supported Configurable PSB Frequency encoding */ +#define CPUPT_PFE_BITMAP_M (0xffff << CPUPT_PFE_BITMAP_S) + /* * Important bits in the AMD extended cpuid flags */ @@ -601,6 +630,29 @@ #define MSR_IA32_RTIT_ADDR2_B 0x585 /* Region 2 End Address (R/W) */ #define MSR_IA32_RTIT_ADDR3_A 0x586 /* Region 3 Start Address (R/W) */ #define MSR_IA32_RTIT_ADDR3_B 0x587 /* Region 3 End Address (R/W) */ + +/* Intel Processor Trace Table of Physical Addresses (ToPA). */ +#define TOPA_SIZE_S 6 +#define TOPA_SIZE_M (0xf << TOPA_SIZE_S) +#define TOPA_SIZE_4K (0 << TOPA_SIZE_S) +#define TOPA_SIZE_8K (1 << TOPA_SIZE_S) +#define TOPA_SIZE_16K (2 << TOPA_SIZE_S) +#define TOPA_SIZE_32K (3 << TOPA_SIZE_S) +#define TOPA_SIZE_64K (4 << TOPA_SIZE_S) +#define TOPA_SIZE_128K (5 << TOPA_SIZE_S) +#define TOPA_SIZE_256K (6 << TOPA_SIZE_S) +#define TOPA_SIZE_512K (7 << TOPA_SIZE_S) +#define TOPA_SIZE_1M (8 << TOPA_SIZE_S) +#define TOPA_SIZE_2M (9 << TOPA_SIZE_S) +#define TOPA_SIZE_4M (10 << TOPA_SIZE_S) +#define TOPA_SIZE_8M (11 << TOPA_SIZE_S) +#define TOPA_SIZE_16M (12 << TOPA_SIZE_S) +#define TOPA_SIZE_32M (13 << TOPA_SIZE_S) +#define TOPA_SIZE_64M (14 << TOPA_SIZE_S) +#define TOPA_SIZE_128M (15 << TOPA_SIZE_S) +#define TOPA_STOP (1 << 4) +#define TOPA_INT (1 << 2) +#define TOPA_END (1 << 0) /* * Constants related to MSR's. From owner-svn-src-head@freebsd.org Fri Nov 17 18:00:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2372DDFDF0; Fri, 17 Nov 2017 18:00:54 +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 73ED76F73D; Fri, 17 Nov 2017 18:00:54 +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 vAHI0rxO038529; Fri, 17 Nov 2017 18:00:53 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAHI0q2k038522; Fri, 17 Nov 2017 18:00:52 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201711171800.vAHI0q2k038522@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 17 Nov 2017 18:00:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325953 - in head/release: amd64 arm64 i386 powerpc sparc64 X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in head/release: amd64 arm64 i386 powerpc sparc64 X-SVN-Commit-Revision: 325953 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 18:00:54 -0000 Author: gjb Date: Fri Nov 17 18:00:52 2017 New Revision: 325953 URL: https://svnweb.freebsd.org/changeset/base/325953 Log: Add general configuration files used by release/release.sh for big-iron installation images. MFC after: 3 days MFC with: r325948, r325949, r325950, r325951 Sponsored by: The FreeBSD Foundation Added: head/release/amd64/amd64.conf (contents, props changed) head/release/arm64/aarch64.conf (contents, props changed) head/release/i386/i386.conf (contents, props changed) head/release/powerpc/powerpc.conf (contents, props changed) head/release/powerpc/powerpc64.conf (contents, props changed) head/release/powerpc/powerpcspe.conf (contents, props changed) head/release/sparc64/sparc64.conf (contents, props changed) Added: head/release/amd64/amd64.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/amd64/amd64.conf Fri Nov 17 18:00:52 2017 (r325953) @@ -0,0 +1,10 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# Configuration file for release/release.sh to build amd64/amd64. + +TARGET="amd64" +TARGET_ARCH="amd64" +KERNEL="GENERIC" Added: head/release/arm64/aarch64.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/arm64/aarch64.conf Fri Nov 17 18:00:52 2017 (r325953) @@ -0,0 +1,11 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# Configuration file for release/release.sh to build arm64/aarch64 +# big-iron installation images (not system-on-chip (SoC) images). + +TARGET="arm64" +TARGET_ARCH="aarch64" +KERNEL="GENERIC" Added: head/release/i386/i386.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/i386/i386.conf Fri Nov 17 18:00:52 2017 (r325953) @@ -0,0 +1,12 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# Configuration file for release/release.sh to build i386/i386. +# Note: CHROOT_MAKEENV assumes the build host is amd64. + +TARGET="i386" +TARGET_ARCH="i386" +KERNEL="GENERIC" +CHROOT_MAKEENV="TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH}" Added: head/release/powerpc/powerpc.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/powerpc/powerpc.conf Fri Nov 17 18:00:52 2017 (r325953) @@ -0,0 +1,10 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# Configuration file for release/release.sh to build powerpc/powerpc. + +TARGET="powerpc" +TARGET_ARCH="powerpc" +KERNEL="GENERIC" Added: head/release/powerpc/powerpc64.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/powerpc/powerpc64.conf Fri Nov 17 18:00:52 2017 (r325953) @@ -0,0 +1,10 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# Configuration file for release/release.sh to build powerpc/powerpc64. + +TARGET="powerpc" +TARGET_ARCH="powerpc64" +KERNEL="GENERIC64" Added: head/release/powerpc/powerpcspe.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/powerpc/powerpcspe.conf Fri Nov 17 18:00:52 2017 (r325953) @@ -0,0 +1,10 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# Configuration file for release/release.sh to build powerpc/powerpcspe. + +TARGET="powerpc" +TARGET_ARCH="powerpcspe" +KERNEL="MPC85XXSPE" Added: head/release/sparc64/sparc64.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/sparc64/sparc64.conf Fri Nov 17 18:00:52 2017 (r325953) @@ -0,0 +1,10 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# Configuration file for release/release.sh to build sparc64/sparc64. + +TARGET="sparc64" +TARGET_ARCH="sparc64" +KERNEL="GENERIC" From owner-svn-src-head@freebsd.org Fri Nov 17 18:16:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5F32DE0302; Fri, 17 Nov 2017 18:16:48 +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 550FB6FF7E; Fri, 17 Nov 2017 18:16:48 +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 vAHIGlDA045599; Fri, 17 Nov 2017 18:16:47 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAHIGkRZ045584; Fri, 17 Nov 2017 18:16:46 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201711171816.vAHIGkRZ045584@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 17 Nov 2017 18:16:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325954 - in head: . share/mk sys/conf usr.sbin/config X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: . share/mk sys/conf usr.sbin/config X-SVN-Commit-Revision: 325954 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 18:16:48 -0000 Author: imp Date: Fri Nov 17 18:16:46 2017 New Revision: 325954 URL: https://svnweb.freebsd.org/changeset/base/325954 Log: Remove build system support for lint. Differential Revision: https://reviews.freebsd.org/D13124 Modified: head/Makefile head/share/mk/bsd.README head/share/mk/bsd.lib.mk head/share/mk/bsd.own.mk head/share/mk/bsd.prog.mk head/share/mk/bsd.subdir.mk head/share/mk/bsd.suffixes.mk head/share/mk/sys.mk head/sys/conf/kern.mk head/sys/conf/kern.post.mk head/sys/conf/kern.pre.mk head/sys/conf/kmod.mk head/usr.sbin/config/mkmakefile.c Modified: head/Makefile ============================================================================== --- head/Makefile Fri Nov 17 18:00:52 2017 (r325953) +++ head/Makefile Fri Nov 17 18:16:46 2017 (r325954) @@ -129,7 +129,7 @@ TGTS= all all-man buildenv buildenvvars buildkernel bu everything hier hierarchy install installcheck installkernel \ installkernel.debug packagekernel packageworld \ reinstallkernel reinstallkernel.debug \ - installworld kernel-toolchain libraries lint maninstall \ + installworld kernel-toolchain libraries maninstall \ obj objlink showconfig tags toolchain update \ _worldtmp _legacy _bootstrap-tools _cleanobj _obj \ _build-tools _build-metadata _cross-tools _includes _libraries \ Modified: head/share/mk/bsd.README ============================================================================== --- head/share/mk/bsd.README Fri Nov 17 18:00:52 2017 (r325953) +++ head/share/mk/bsd.README Fri Nov 17 18:16:46 2017 (r325954) @@ -250,8 +250,6 @@ It has seven targets: beforeinstall and afterinstall may also be used to cause actions immediately before and after the install target is executed. - lint: - run lint on the source files tags: create a tags file for the source files. @@ -488,18 +486,17 @@ ${MOD}_oid.h A header which programmatically describes The include file contains the default targets for building subdirectories. It has the same seven targets as : all, clean, -cleandir, depend, install, lint, and tags. For all of the directories -listed in the variable SUBDIRS, the specified directory will be visited -and the target made. There is also a default target which allows the -command "make subdir" where subdir is any directory listed in the variable -SUBDIRS. +cleandir, depend, install, and tags. For all of the directories listed in the +variable SUBDIRS, the specified directory will be visited and the target made. +There is also a default target which allows the command "make subdir" where +subdir is any directory listed in the variable SUBDIRS. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -The include file has support for building libraries. It has -the same seven targets as : all, clean, cleandir, depend, -install, lint, and tags. It has a limited number of suffixes, consistent -with the current needs of the BSD tree. +The include file has support for building libraries. It has the +same seven targets as : all, clean, cleandir, depend, install, and +tags. It has a limited number of suffixes, consistent with the current needs of +the BSD tree. It sets/uses the following variables: @@ -530,8 +527,6 @@ LIB_CXX The name of the library to build. It also cau will be built. NO_PIC can be set to only build a static library. -LINTLIBDIR Target directory for lint libraries. - MAN The manual pages to be installed. See bsd.man.mk for more details. @@ -588,8 +583,6 @@ It has seven targets: targets beforeinstall and afterinstall may also be used to cause actions immediately before and after the install target is executed. - lint: - run lint on the source files. tags: create a tags file for the source files. Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Fri Nov 17 18:00:52 2017 (r325953) +++ head/share/mk/bsd.lib.mk Fri Nov 17 18:16:46 2017 (r325954) @@ -285,18 +285,6 @@ lib${LIB_PRIVATE}${LIB}_pic.a: ${SOBJS} ${RANLIB} ${RANLIBFLAGS} ${.TARGET} .endif -.if defined(WANT_LINT) && !defined(NO_LINT) && defined(LIB) && !empty(LIB) -LINTLIB= llib-l${LIB}.ln -_LIBS+= ${LINTLIB} -LINTOBJS+= ${SRCS:M*.c:.c=.ln} -CLEANFILES+= ${LINTOBJS} - -${LINTLIB}: ${LINTOBJS} - @${ECHO} building lint library ${.TARGET} - @rm -f ${.TARGET} - ${LINT} ${LINTLIBFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC} -.endif - .endif # !defined(INTERNALLIB) .if defined(_SKIP_BUILD) @@ -403,10 +391,6 @@ _libinstall: ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ ${_INSTALLFLAGS} lib${LIB}_pic.a ${DESTDIR}${_LIBDIR}/ .endif -.if defined(WANT_LINT) && !defined(NO_LINT) && defined(LIB) && !empty(LIB) - ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ - ${_INSTALLFLAGS} ${LINTLIB} ${DESTDIR}${LINTLIBDIR}/ -.endif .endif # !defined(INTERNALLIB) .if !defined(LIBRARIES_ONLY) @@ -423,11 +407,6 @@ realinstall: maninstall .ORDER: beforeinstall maninstall .endif -.endif - -.if !target(lint) -lint: ${SRCS:M*.c} - ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC} .endif .if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY) Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Fri Nov 17 18:00:52 2017 (r325953) +++ head/share/mk/bsd.own.mk Fri Nov 17 18:16:46 2017 (r325954) @@ -32,8 +32,6 @@ # # LIBEXECDIR Base path for system daemons and utilities. [/usr/libexec] # -# LINTLIBDIR Base path for lint libraries. [/usr/libdata/lint] -# # SHLIBDIR Base path for shared libraries. [${LIBDIR}] # # LIBOWN Library owner. [${BINOWN}] @@ -162,7 +160,6 @@ LIBDIR?= ${LIBDIR_BASE} LIBCOMPATDIR?= /usr/lib/compat LIBDATADIR?= /usr/libdata LIBEXECDIR?= /usr/libexec -LINTLIBDIR?= /usr/libdata/lint SHLIBDIR?= ${LIBDIR} LIBOWN?= ${BINOWN} LIBGRP?= ${BINGRP} Modified: head/share/mk/bsd.prog.mk ============================================================================== --- head/share/mk/bsd.prog.mk Fri Nov 17 18:00:52 2017 (r325953) +++ head/share/mk/bsd.prog.mk Fri Nov 17 18:16:46 2017 (r325954) @@ -294,13 +294,6 @@ realinstall: maninstall .endif # !target(install) -.if !target(lint) -lint: ${SRCS:M*.c} -.if defined(PROG) - ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC} -.endif -.endif - .if ${MK_MAN} != "no" .include .endif Modified: head/share/mk/bsd.subdir.mk ============================================================================== --- head/share/mk/bsd.subdir.mk Fri Nov 17 18:00:52 2017 (r325953) +++ head/share/mk/bsd.subdir.mk Fri Nov 17 18:16:46 2017 (r325954) @@ -46,7 +46,7 @@ SUBDIR_TARGETS+= \ all all-man analyze buildconfig buildfiles buildincludes \ checkdpadd clean cleandepend cleandir cleanilinks \ cleanobj depend distribute files includes installconfig \ - installfiles installincludes print-dir realinstall lint \ + installfiles installincludes print-dir realinstall \ maninstall manlint ${_obj} objlink tags \ # Described above. Modified: head/share/mk/bsd.suffixes.mk ============================================================================== --- head/share/mk/bsd.suffixes.mk Fri Nov 17 18:00:52 2017 (r325953) +++ head/share/mk/bsd.suffixes.mk Fri Nov 17 18:16:46 2017 (r325954) @@ -4,14 +4,6 @@ cp -f ${.IMPSRC} ${.TARGET} chmod a+x ${.TARGET} -.c.ln: - ${LINT} ${LINTOBJFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC} || \ - touch ${.TARGET} - -.cc.ln .C.ln .cpp.ln .cxx.ln: - ${LINT} ${LINTOBJFLAGS} ${CXXFLAGS:M-[DIU]*} ${.IMPSRC} || \ - touch ${.TARGET} - .c: ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} ${CTFCONVERT_CMD} Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Fri Nov 17 18:00:52 2017 (r325953) +++ head/share/mk/sys.mk Fri Nov 17 18:16:46 2017 (r325954) @@ -142,7 +142,7 @@ NO_META_IGNORE_HOST_HEADERS= 1 .if defined(%POSIX) .SUFFIXES: .o .c .y .l .a .sh .f .else -.SUFFIXES: .out .a .ln .o .bco .llo .c .cc .cpp .cxx .C .m .F .f .e .r .y .l .S .asm .s .cl .p .h .sh +.SUFFIXES: .out .a .o .bco .llo .c .cc .cpp .cxx .C .m .F .f .e .r .y .l .S .asm .s .cl .p .h .sh .endif AR ?= ar @@ -244,13 +244,6 @@ LFLAGS ?= LD ?= ld LDFLAGS ?= _LDFLAGS = ${LDFLAGS:S/-Wl,//g:N-mabi=*:N-fuse-ld=*} - -LINT ?= lint -LINTFLAGS ?= -cghapbx -LINTKERNFLAGS ?= ${LINTFLAGS} -LINTOBJFLAGS ?= -cghapbxu -i -LINTOBJKERNFLAGS?= ${LINTOBJFLAGS} -LINTLIBFLAGS ?= -cghapbxu -C ${LIB} MAKE ?= make Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Fri Nov 17 18:00:52 2017 (r325953) +++ head/sys/conf/kern.mk Fri Nov 17 18:16:46 2017 (r325954) @@ -228,7 +228,7 @@ PHONY_NOTMAIN = afterdepend afterinstall all beforedep beforelinking build build-tools buildfiles buildincludes \ checkdpadd clean cleandepend cleandir cleanobj configure \ depend distclean distribute exe \ - html includes install installfiles installincludes lint \ + html includes install installfiles installincludes \ obj objlink objs objwarn \ realinstall regress \ tags whereobj Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Fri Nov 17 18:00:52 2017 (r325953) +++ head/sys/conf/kern.post.mk Fri Nov 17 18:16:46 2017 (r325954) @@ -153,7 +153,6 @@ ${FULLKERNEL}: ${SYSTEM_DEP} vers.o OBJS_DEPEND_GUESS+= assym.s vnode_if.h ${BEFORE_DEPEND:M*.h} \ ${MFILES:T:S/.m$/.h/} -LNFILES= ${CFILES:T:S/.c$/.ln/} .for mfile in ${MFILES} # XXX the low quality .m.o rules gnerated by config are normally used @@ -167,15 +166,11 @@ ${mfile:T:S/.m$/.h/}: ${mfile} kernel-clean: rm -f *.o *.so *.pico *.ko *.s eddep errs \ ${FULLKERNEL} ${KERNEL_KO} ${KERNEL_KO}.debug \ - linterrs tags vers.c \ + tags vers.c \ vnode_if.c vnode_if.h vnode_if_newproto.h vnode_if_typedef.h \ ${MFILES:T:S/.m$/.c/} ${MFILES:T:S/.m$/.h/} \ ${CLEAN} -lint: ${LNFILES} - ${LINT} ${LINTKERNFLAGS} ${CFLAGS:M-[DILU]*} ${.ALLSRC} 2>&1 | \ - tee -a linterrs - # This is a hack. BFD "optimizes" away dynamic mode if there are no # dynamic references. We could probably do a '-Bforcedynamic' mode like # in the a.out ld. For now, this works. @@ -364,9 +359,6 @@ kernel-reinstall: config.o env.o hints.o vers.o vnode_if.o: ${NORMAL_C} ${NORMAL_CTFCONVERT} - -config.ln env.ln hints.ln vers.ln vnode_if.ln: - ${NORMAL_LINT} .if ${MK_REPRODUCIBLE_BUILD} != "no" REPRO_FLAG="-r" Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Fri Nov 17 18:00:52 2017 (r325953) +++ head/sys/conf/kern.pre.mk Fri Nov 17 18:16:46 2017 (r325954) @@ -46,7 +46,6 @@ M= ${MACHINE} AWK?= awk CP?= cp -LINT?= lint NM?= nm OBJCOPY?= objcopy SIZE?= size @@ -121,9 +120,6 @@ CFLAGS+= ${CONF_CFLAGS} LDFLAGS+= -Wl,--build-id=sha1 .endif -# Optional linting. This can be overridden in /etc/make.conf. -LINTFLAGS= ${LINTOBJKERNFLAGS} - NORMAL_C= ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.IMPSRC} NORMAL_S= ${CC:N${CCACHE_BIN}} -c ${ASM_CFLAGS} ${WERROR} ${.IMPSRC} PROFILE_C= ${CC} -c ${CFLAGS} ${WERROR} ${.IMPSRC} @@ -175,8 +171,6 @@ NORMAL_CTFCONVERT= .else NORMAL_CTFCONVERT= @: .endif - -NORMAL_LINT= ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC} # Linux Kernel Programming Interface C-flags LINUXKPI_INCLUDES= -I$S/compat/linuxkpi/common/include Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Fri Nov 17 18:00:52 2017 (r325953) +++ head/sys/conf/kmod.mk Fri Nov 17 18:16:46 2017 (r325954) @@ -469,9 +469,6 @@ genassym.o: ${SRCS:Mopt_*.h} ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c .endif -lint: ${SRCS} - ${LINT} ${LINTKERNFLAGS} ${CFLAGS:M-[DILU]*} ${.ALLSRC:M*.c} - .if defined(KERNBUILDDIR) ${OBJS}: opt_global.h .endif Modified: head/usr.sbin/config/mkmakefile.c ============================================================================== --- head/usr.sbin/config/mkmakefile.c Fri Nov 17 18:00:52 2017 (r325953) +++ head/usr.sbin/config/mkmakefile.c Fri Nov 17 18:16:46 2017 (r325954) @@ -690,18 +690,11 @@ do_rules(FILE *f) continue; } if (ftp->f_depends) { - fprintf(f, "%s%sln: $S/%s%c %s\n", - ftp->f_objprefix, tail(np), np, och, - ftp->f_depends); - fprintf(f, "\t${NORMAL_LINT}\n\n"); fprintf(f, "%s%so: $S/%s%c %s\n", ftp->f_objprefix, tail(np), np, och, ftp->f_depends); } else { - fprintf(f, "%s%sln: $S/%s%c\n", - ftp->f_objprefix, tail(np), np, och); - fprintf(f, "\t${NORMAL_LINT}\n\n"); fprintf(f, "%s%so: $S/%s%c\n", ftp->f_objprefix, tail(np), np, och); } From owner-svn-src-head@freebsd.org Fri Nov 17 18:31:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5CDA9DE07EE; Fri, 17 Nov 2017 18:31:49 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 355E87078E; Fri, 17 Nov 2017 18:31:48 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vAHIVf4F062457; Fri, 17 Nov 2017 10:31:41 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vAHIVf3a062456; Fri, 17 Nov 2017 10:31:41 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201711171831.vAHIVf3a062456@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r325954 - in head: . share/mk sys/conf usr.sbin/config In-Reply-To: <201711171816.vAHIGkRZ045584@repo.freebsd.org> To: Warner Losh Date: Fri, 17 Nov 2017 10:31:41 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 18:31:49 -0000 TOP post,sorry.... Someone needs to follow up with proper deprication procedures on lint. > Author: imp > Date: Fri Nov 17 18:16:46 2017 > New Revision: 325954 > URL: https://svnweb.freebsd.org/changeset/base/325954 > > Log: > Remove build system support for lint. > > Differential Revision: https://reviews.freebsd.org/D13124 > > Modified: > head/Makefile > head/share/mk/bsd.README > head/share/mk/bsd.lib.mk > head/share/mk/bsd.own.mk > head/share/mk/bsd.prog.mk > head/share/mk/bsd.subdir.mk > head/share/mk/bsd.suffixes.mk > head/share/mk/sys.mk > head/sys/conf/kern.mk > head/sys/conf/kern.post.mk > head/sys/conf/kern.pre.mk > head/sys/conf/kmod.mk > head/usr.sbin/config/mkmakefile.c > > Modified: head/Makefile > ============================================================================== > --- head/Makefile Fri Nov 17 18:00:52 2017 (r325953) > +++ head/Makefile Fri Nov 17 18:16:46 2017 (r325954) > @@ -129,7 +129,7 @@ TGTS= all all-man buildenv buildenvvars buildkernel bu > everything hier hierarchy install installcheck installkernel \ > installkernel.debug packagekernel packageworld \ > reinstallkernel reinstallkernel.debug \ > - installworld kernel-toolchain libraries lint maninstall \ > + installworld kernel-toolchain libraries maninstall \ > obj objlink showconfig tags toolchain update \ > _worldtmp _legacy _bootstrap-tools _cleanobj _obj \ > _build-tools _build-metadata _cross-tools _includes _libraries \ > > Modified: head/share/mk/bsd.README > ============================================================================== > --- head/share/mk/bsd.README Fri Nov 17 18:00:52 2017 (r325953) > +++ head/share/mk/bsd.README Fri Nov 17 18:16:46 2017 (r325954) > @@ -250,8 +250,6 @@ It has seven targets: > beforeinstall and afterinstall may also be used to cause > actions immediately before and after the install target > is executed. > - lint: > - run lint on the source files > tags: > create a tags file for the source files. > > @@ -488,18 +486,17 @@ ${MOD}_oid.h A header which programmatically describes > > The include file contains the default targets for building > subdirectories. It has the same seven targets as : all, clean, > -cleandir, depend, install, lint, and tags. For all of the directories > -listed in the variable SUBDIRS, the specified directory will be visited > -and the target made. There is also a default target which allows the > -command "make subdir" where subdir is any directory listed in the variable > -SUBDIRS. > +cleandir, depend, install, and tags. For all of the directories listed in the > +variable SUBDIRS, the specified directory will be visited and the target made. > +There is also a default target which allows the command "make subdir" where > +subdir is any directory listed in the variable SUBDIRS. > > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > > -The include file has support for building libraries. It has > -the same seven targets as : all, clean, cleandir, depend, > -install, lint, and tags. It has a limited number of suffixes, consistent > -with the current needs of the BSD tree. > +The include file has support for building libraries. It has the > +same seven targets as : all, clean, cleandir, depend, install, and > +tags. It has a limited number of suffixes, consistent with the current needs of > +the BSD tree. > > It sets/uses the following variables: > > @@ -530,8 +527,6 @@ LIB_CXX The name of the library to build. It also cau > will be built. NO_PIC can be set to only build a static > library. > > -LINTLIBDIR Target directory for lint libraries. > - > MAN The manual pages to be installed. See bsd.man.mk for more > details. > > @@ -588,8 +583,6 @@ It has seven targets: > targets beforeinstall and afterinstall may also be used > to cause actions immediately before and after the > install target is executed. > - lint: > - run lint on the source files. > tags: > create a tags file for the source files. > > > Modified: head/share/mk/bsd.lib.mk > ============================================================================== > --- head/share/mk/bsd.lib.mk Fri Nov 17 18:00:52 2017 (r325953) > +++ head/share/mk/bsd.lib.mk Fri Nov 17 18:16:46 2017 (r325954) > @@ -285,18 +285,6 @@ lib${LIB_PRIVATE}${LIB}_pic.a: ${SOBJS} > ${RANLIB} ${RANLIBFLAGS} ${.TARGET} > .endif > > -.if defined(WANT_LINT) && !defined(NO_LINT) && defined(LIB) && !empty(LIB) > -LINTLIB= llib-l${LIB}.ln > -_LIBS+= ${LINTLIB} > -LINTOBJS+= ${SRCS:M*.c:.c=.ln} > -CLEANFILES+= ${LINTOBJS} > - > -${LINTLIB}: ${LINTOBJS} > - @${ECHO} building lint library ${.TARGET} > - @rm -f ${.TARGET} > - ${LINT} ${LINTLIBFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC} > -.endif > - > .endif # !defined(INTERNALLIB) > > .if defined(_SKIP_BUILD) > @@ -403,10 +391,6 @@ _libinstall: > ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ > ${_INSTALLFLAGS} lib${LIB}_pic.a ${DESTDIR}${_LIBDIR}/ > .endif > -.if defined(WANT_LINT) && !defined(NO_LINT) && defined(LIB) && !empty(LIB) > - ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ > - ${_INSTALLFLAGS} ${LINTLIB} ${DESTDIR}${LINTLIBDIR}/ > -.endif > .endif # !defined(INTERNALLIB) > > .if !defined(LIBRARIES_ONLY) > @@ -423,11 +407,6 @@ realinstall: maninstall > .ORDER: beforeinstall maninstall > .endif > > -.endif > - > -.if !target(lint) > -lint: ${SRCS:M*.c} > - ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC} > .endif > > .if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY) > > Modified: head/share/mk/bsd.own.mk > ============================================================================== > --- head/share/mk/bsd.own.mk Fri Nov 17 18:00:52 2017 (r325953) > +++ head/share/mk/bsd.own.mk Fri Nov 17 18:16:46 2017 (r325954) > @@ -32,8 +32,6 @@ > # > # LIBEXECDIR Base path for system daemons and utilities. [/usr/libexec] > # > -# LINTLIBDIR Base path for lint libraries. [/usr/libdata/lint] > -# > # SHLIBDIR Base path for shared libraries. [${LIBDIR}] > # > # LIBOWN Library owner. [${BINOWN}] > @@ -162,7 +160,6 @@ LIBDIR?= ${LIBDIR_BASE} > LIBCOMPATDIR?= /usr/lib/compat > LIBDATADIR?= /usr/libdata > LIBEXECDIR?= /usr/libexec > -LINTLIBDIR?= /usr/libdata/lint > SHLIBDIR?= ${LIBDIR} > LIBOWN?= ${BINOWN} > LIBGRP?= ${BINGRP} > > Modified: head/share/mk/bsd.prog.mk > ============================================================================== > --- head/share/mk/bsd.prog.mk Fri Nov 17 18:00:52 2017 (r325953) > +++ head/share/mk/bsd.prog.mk Fri Nov 17 18:16:46 2017 (r325954) > @@ -294,13 +294,6 @@ realinstall: maninstall > > .endif # !target(install) > > -.if !target(lint) > -lint: ${SRCS:M*.c} > -.if defined(PROG) > - ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC} > -.endif > -.endif > - > .if ${MK_MAN} != "no" > .include > .endif > > Modified: head/share/mk/bsd.subdir.mk > ============================================================================== > --- head/share/mk/bsd.subdir.mk Fri Nov 17 18:00:52 2017 (r325953) > +++ head/share/mk/bsd.subdir.mk Fri Nov 17 18:16:46 2017 (r325954) > @@ -46,7 +46,7 @@ SUBDIR_TARGETS+= \ > all all-man analyze buildconfig buildfiles buildincludes \ > checkdpadd clean cleandepend cleandir cleanilinks \ > cleanobj depend distribute files includes installconfig \ > - installfiles installincludes print-dir realinstall lint \ > + installfiles installincludes print-dir realinstall \ > maninstall manlint ${_obj} objlink tags \ > > # Described above. > > Modified: head/share/mk/bsd.suffixes.mk > ============================================================================== > --- head/share/mk/bsd.suffixes.mk Fri Nov 17 18:00:52 2017 (r325953) > +++ head/share/mk/bsd.suffixes.mk Fri Nov 17 18:16:46 2017 (r325954) > @@ -4,14 +4,6 @@ > cp -f ${.IMPSRC} ${.TARGET} > chmod a+x ${.TARGET} > > -.c.ln: > - ${LINT} ${LINTOBJFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC} || \ > - touch ${.TARGET} > - > -.cc.ln .C.ln .cpp.ln .cxx.ln: > - ${LINT} ${LINTOBJFLAGS} ${CXXFLAGS:M-[DIU]*} ${.IMPSRC} || \ > - touch ${.TARGET} > - > .c: > ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} > ${CTFCONVERT_CMD} > > Modified: head/share/mk/sys.mk > ============================================================================== > --- head/share/mk/sys.mk Fri Nov 17 18:00:52 2017 (r325953) > +++ head/share/mk/sys.mk Fri Nov 17 18:16:46 2017 (r325954) > @@ -142,7 +142,7 @@ NO_META_IGNORE_HOST_HEADERS= 1 > .if defined(%POSIX) > .SUFFIXES: .o .c .y .l .a .sh .f > .else > -.SUFFIXES: .out .a .ln .o .bco .llo .c .cc .cpp .cxx .C .m .F .f .e .r .y .l .S .asm .s .cl .p .h .sh > +.SUFFIXES: .out .a .o .bco .llo .c .cc .cpp .cxx .C .m .F .f .e .r .y .l .S .asm .s .cl .p .h .sh > .endif > > AR ?= ar > @@ -244,13 +244,6 @@ LFLAGS ?= > LD ?= ld > LDFLAGS ?= > _LDFLAGS = ${LDFLAGS:S/-Wl,//g:N-mabi=*:N-fuse-ld=*} > - > -LINT ?= lint > -LINTFLAGS ?= -cghapbx > -LINTKERNFLAGS ?= ${LINTFLAGS} > -LINTOBJFLAGS ?= -cghapbxu -i > -LINTOBJKERNFLAGS?= ${LINTOBJFLAGS} > -LINTLIBFLAGS ?= -cghapbxu -C ${LIB} > > MAKE ?= make > > > Modified: head/sys/conf/kern.mk > ============================================================================== > --- head/sys/conf/kern.mk Fri Nov 17 18:00:52 2017 (r325953) > +++ head/sys/conf/kern.mk Fri Nov 17 18:16:46 2017 (r325954) > @@ -228,7 +228,7 @@ PHONY_NOTMAIN = afterdepend afterinstall all beforedep > beforelinking build build-tools buildfiles buildincludes \ > checkdpadd clean cleandepend cleandir cleanobj configure \ > depend distclean distribute exe \ > - html includes install installfiles installincludes lint \ > + html includes install installfiles installincludes \ > obj objlink objs objwarn \ > realinstall regress \ > tags whereobj > > Modified: head/sys/conf/kern.post.mk > ============================================================================== > --- head/sys/conf/kern.post.mk Fri Nov 17 18:00:52 2017 (r325953) > +++ head/sys/conf/kern.post.mk Fri Nov 17 18:16:46 2017 (r325954) > @@ -153,7 +153,6 @@ ${FULLKERNEL}: ${SYSTEM_DEP} vers.o > > OBJS_DEPEND_GUESS+= assym.s vnode_if.h ${BEFORE_DEPEND:M*.h} \ > ${MFILES:T:S/.m$/.h/} > -LNFILES= ${CFILES:T:S/.c$/.ln/} > > .for mfile in ${MFILES} > # XXX the low quality .m.o rules gnerated by config are normally used > @@ -167,15 +166,11 @@ ${mfile:T:S/.m$/.h/}: ${mfile} > kernel-clean: > rm -f *.o *.so *.pico *.ko *.s eddep errs \ > ${FULLKERNEL} ${KERNEL_KO} ${KERNEL_KO}.debug \ > - linterrs tags vers.c \ > + tags vers.c \ > vnode_if.c vnode_if.h vnode_if_newproto.h vnode_if_typedef.h \ > ${MFILES:T:S/.m$/.c/} ${MFILES:T:S/.m$/.h/} \ > ${CLEAN} > > -lint: ${LNFILES} > - ${LINT} ${LINTKERNFLAGS} ${CFLAGS:M-[DILU]*} ${.ALLSRC} 2>&1 | \ > - tee -a linterrs > - > # This is a hack. BFD "optimizes" away dynamic mode if there are no > # dynamic references. We could probably do a '-Bforcedynamic' mode like > # in the a.out ld. For now, this works. > @@ -364,9 +359,6 @@ kernel-reinstall: > config.o env.o hints.o vers.o vnode_if.o: > ${NORMAL_C} > ${NORMAL_CTFCONVERT} > - > -config.ln env.ln hints.ln vers.ln vnode_if.ln: > - ${NORMAL_LINT} > > .if ${MK_REPRODUCIBLE_BUILD} != "no" > REPRO_FLAG="-r" > > Modified: head/sys/conf/kern.pre.mk > ============================================================================== > --- head/sys/conf/kern.pre.mk Fri Nov 17 18:00:52 2017 (r325953) > +++ head/sys/conf/kern.pre.mk Fri Nov 17 18:16:46 2017 (r325954) > @@ -46,7 +46,6 @@ M= ${MACHINE} > > AWK?= awk > CP?= cp > -LINT?= lint > NM?= nm > OBJCOPY?= objcopy > SIZE?= size > @@ -121,9 +120,6 @@ CFLAGS+= ${CONF_CFLAGS} > LDFLAGS+= -Wl,--build-id=sha1 > .endif > > -# Optional linting. This can be overridden in /etc/make.conf. > -LINTFLAGS= ${LINTOBJKERNFLAGS} > - > NORMAL_C= ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.IMPSRC} > NORMAL_S= ${CC:N${CCACHE_BIN}} -c ${ASM_CFLAGS} ${WERROR} ${.IMPSRC} > PROFILE_C= ${CC} -c ${CFLAGS} ${WERROR} ${.IMPSRC} > @@ -175,8 +171,6 @@ NORMAL_CTFCONVERT= > .else > NORMAL_CTFCONVERT= @: > .endif > - > -NORMAL_LINT= ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC} > > # Linux Kernel Programming Interface C-flags > LINUXKPI_INCLUDES= -I$S/compat/linuxkpi/common/include > > Modified: head/sys/conf/kmod.mk > ============================================================================== > --- head/sys/conf/kmod.mk Fri Nov 17 18:00:52 2017 (r325953) > +++ head/sys/conf/kmod.mk Fri Nov 17 18:16:46 2017 (r325954) > @@ -469,9 +469,6 @@ genassym.o: ${SRCS:Mopt_*.h} > ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c > .endif > > -lint: ${SRCS} > - ${LINT} ${LINTKERNFLAGS} ${CFLAGS:M-[DILU]*} ${.ALLSRC:M*.c} > - > .if defined(KERNBUILDDIR) > ${OBJS}: opt_global.h > .endif > > Modified: head/usr.sbin/config/mkmakefile.c > ============================================================================== > --- head/usr.sbin/config/mkmakefile.c Fri Nov 17 18:00:52 2017 (r325953) > +++ head/usr.sbin/config/mkmakefile.c Fri Nov 17 18:16:46 2017 (r325954) > @@ -690,18 +690,11 @@ do_rules(FILE *f) > continue; > } > if (ftp->f_depends) { > - fprintf(f, "%s%sln: $S/%s%c %s\n", > - ftp->f_objprefix, tail(np), np, och, > - ftp->f_depends); > - fprintf(f, "\t${NORMAL_LINT}\n\n"); > fprintf(f, "%s%so: $S/%s%c %s\n", > ftp->f_objprefix, tail(np), np, och, > ftp->f_depends); > } > else { > - fprintf(f, "%s%sln: $S/%s%c\n", > - ftp->f_objprefix, tail(np), np, och); > - fprintf(f, "\t${NORMAL_LINT}\n\n"); > fprintf(f, "%s%so: $S/%s%c\n", > ftp->f_objprefix, tail(np), np, och); > } > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Fri Nov 17 18:34:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 167F3DE08EF; Fri, 17 Nov 2017 18:34:16 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E3E85709BB; Fri, 17 Nov 2017 18:34:15 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAHIYFDn054002; Fri, 17 Nov 2017 18:34:15 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAHIYEXV053999; Fri, 17 Nov 2017 18:34:14 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201711171834.vAHIYEXV053999@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 17 Nov 2017 18:34:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325955 - head/usr.sbin/config X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/usr.sbin/config X-SVN-Commit-Revision: 325955 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 18:34:16 -0000 Author: bdrewery Date: Fri Nov 17 18:34:14 2017 New Revision: 325955 URL: https://svnweb.freebsd.org/changeset/base/325955 Log: Fix 'local' to not look in the source tree for the file. Usually 'local' is used along with other rules such as 'no-implicit-rule' or 'dependency' which avoids this problem. It's possible to need to use 'local' while relying on the default rules though for a file which is not in the source tree nor generated in the kernel. Sponsored by: Dell Differential Revision: https://reviews.freebsd.org/D13125 Modified: head/usr.sbin/config/config.h head/usr.sbin/config/configvers.h head/usr.sbin/config/mkmakefile.c Modified: head/usr.sbin/config/config.h ============================================================================== --- head/usr.sbin/config/config.h Fri Nov 17 18:16:46 2017 (r325954) +++ head/usr.sbin/config/config.h Fri Nov 17 18:34:14 2017 (r325955) @@ -54,6 +54,7 @@ struct file_list { char *f_clean; /* File list to add to clean rule */ char *f_warn; /* warning message */ const char *f_objprefix; /* prefix string for object name */ + const char *f_srcprefix; /* source prefix such as $S/ */ }; struct files_name { Modified: head/usr.sbin/config/configvers.h ============================================================================== --- head/usr.sbin/config/configvers.h Fri Nov 17 18:16:46 2017 (r325954) +++ head/usr.sbin/config/configvers.h Fri Nov 17 18:34:14 2017 (r325955) @@ -49,5 +49,5 @@ * * $FreeBSD$ */ -#define CONFIGVERS 600014 +#define CONFIGVERS 600015 #define MAJOR_VERS(x) ((x) / 100000) Modified: head/usr.sbin/config/mkmakefile.c ============================================================================== --- head/usr.sbin/config/mkmakefile.c Fri Nov 17 18:16:46 2017 (r325954) +++ head/usr.sbin/config/mkmakefile.c Fri Nov 17 18:34:14 2017 (r325955) @@ -496,6 +496,10 @@ nextparam:; tp = new_fent(); tp->f_fn = this; tp->f_type = filetype; + if (filetype == LOCAL) + tp->f_srcprefix = ""; + else + tp->f_srcprefix = "$S/"; if (imp_rule) tp->f_flags |= NO_IMPLCT_RULE; if (no_obj) @@ -571,7 +575,8 @@ do_before_depend(FILE *fp) if (tp->f_flags & NO_IMPLCT_RULE) fprintf(fp, "%s ", tp->f_fn); else - fprintf(fp, "$S/%s ", tp->f_fn); + fprintf(fp, "%s%s ", tp->f_srcprefix, + tp->f_fn); lpos += len + 1; } if (lpos != 8) @@ -636,10 +641,7 @@ do_xxfiles(char *tag, FILE *fp) lpos = 8; fputs("\\\n\t", fp); } - if (tp->f_type != LOCAL) - fprintf(fp, "$S/%s ", tp->f_fn); - else - fprintf(fp, "%s ", tp->f_fn); + fprintf(fp, "%s%s ", tp->f_srcprefix, tp->f_fn); lpos += len + 1; } free(suff); @@ -685,18 +687,21 @@ do_rules(FILE *f) else { *cp = '\0'; if (och == 'o') { - fprintf(f, "%s%so:\n\t-cp $S/%so .\n\n", - ftp->f_objprefix, tail(np), np); + fprintf(f, "%s%so:\n\t-cp %s%so .\n\n", + ftp->f_objprefix, tail(np), + ftp->f_srcprefix, np); continue; } if (ftp->f_depends) { - fprintf(f, "%s%so: $S/%s%c %s\n", - ftp->f_objprefix, tail(np), np, och, + fprintf(f, "%s%so: %s%s%c %s\n", + ftp->f_objprefix, tail(np), + ftp->f_srcprefix, np, och, ftp->f_depends); } else { - fprintf(f, "%s%so: $S/%s%c\n", - ftp->f_objprefix, tail(np), np, och); + fprintf(f, "%s%so: %s%s%c\n", + ftp->f_objprefix, tail(np), + ftp->f_srcprefix, np, och); } } compilewith = ftp->f_compilewith; @@ -725,7 +730,8 @@ do_rules(FILE *f) } *cp = och; if (strlen(ftp->f_objprefix)) - fprintf(f, "\t%s $S/%s\n", compilewith, np); + fprintf(f, "\t%s %s%s\n", compilewith, + ftp->f_srcprefix, np); else fprintf(f, "\t%s\n", compilewith); From owner-svn-src-head@freebsd.org Fri Nov 17 18:37:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84BE1DE0991; Fri, 17 Nov 2017 18:37:54 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-qt0-x22f.google.com (mail-qt0-x22f.google.com [IPv6:2607:f8b0:400d:c0d::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 461F270B8C; Fri, 17 Nov 2017 18:37:54 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: by mail-qt0-x22f.google.com with SMTP id f8so7977070qta.5; Fri, 17 Nov 2017 10:37:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=sYXfscAlf31xF8UrhF49JcHKkxb0mzTYwZxBslqOS1E=; b=uLROO2JRIbzFQJQDAq0B4vgVFb5tlen5pZi+tMyoe3J683W6CsGq9O3vhzJQ91/BIC 9bd543czJUyLLRE5RXuJfajTbKbI2heudQRIJPnKlBFctWqDqtr7SyfUs8VI0uZvF045 g7mNE4r5Qfm0jRKaJt28WeekBr+cRtFAtCw+zZOZiAZEDXXIn6CkiFmYpVST21dBD6g7 aOkOeAk+lLoafr6PI2teF1jNd66FUMJz1o4J9JMaOKyYQ+W0orBukuW80JcHMsritbGb 44A7EWkAz2CCW+jgsPjqju80rZ24FUABw0UuABJN8+aOQ629AplEFi8h/7B1Q/krMuT+ pUkg== 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=sYXfscAlf31xF8UrhF49JcHKkxb0mzTYwZxBslqOS1E=; b=dkkL+KxEiAukzcETEC3TURcvr3LV+ic8qfdVgpDAKPbYRTbF5sqSYD2uhbLQaXOU6H OX+T9Krwv+WpCuiuN4deey/zgl1GnDB68gw8kihutXovB5ySpNhLQrGkrl0a7Unza7FG DL2yGLy2DDWDTvyqeaOgofMrvQUsCdw7JLCTQ+4kugv9H4uc0sbBHDMJkiOqa9k6D6F6 MjjTdY2iCXfhez+MSWt1CPa8GKjNeaB2S0ca4dCJPqN0wVpiglV1SQZ90g1DtzukRKvf 4s+FHgNCBiR6hv86YqOIjtZ0j5nVhK8v/bU2S/TYU74dfxjKFjfWv73ahn8FyS1PICjY 25jw== X-Gm-Message-State: AJaThX49JgfdjvnVWfsrvhWsG8jZ514bcMQ13WUWh0de8gvSzRgnXjIx TRn6d893jaPIH8FE3/VsIwdDoFojhiPo9cPlcgs= X-Google-Smtp-Source: AGs4zMb+LRXxqfSFvqbwWzG6gIzP2sWC/joSbeiXbIgoU5vSiq0Osme/GKHEKixnC5RruVpSBI5B3VGQ+AMv/Uusa2Q= X-Received: by 10.200.10.75 with SMTP id f11mr9310417qti.272.1510943873063; Fri, 17 Nov 2017 10:37:53 -0800 (PST) MIME-Version: 1.0 Received: by 10.237.39.211 with HTTP; Fri, 17 Nov 2017 10:37:52 -0800 (PST) In-Reply-To: <201707251438.v6PEcUAC026283@repo.freebsd.org> References: <201707251438.v6PEcUAC026283@repo.freebsd.org> From: Ryan Stone Date: Fri, 17 Nov 2017 13:37:52 -0500 Message-ID: Subject: Re: svn commit: r321476 - head/sys/dev/ixgbe To: Sean Bruno 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-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 18:37:54 -0000 On Tue, Jul 25, 2017 at 10:38 AM, Sean Bruno wrote: > Author: sbruno > Date: Tue Jul 25 14:38:30 2017 > New Revision: 321476 > URL: https://svnweb.freebsd.org/changeset/base/321476 > > Log: > Drop ixgbe RX lock during TCP_LRO processing. This eliminates a "storm" > of LOR detection and a bit of lock release/acquire collision when using LRO. Without the lock held how do we guarantee that multiple threads can't be processing LRO at the same time? From owner-svn-src-head@freebsd.org Fri Nov 17 19:10:12 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62352DE12EC; Fri, 17 Nov 2017 19:10:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C51571B5C; Fri, 17 Nov 2017 19:10:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAHJABum066867; Fri, 17 Nov 2017 19:10:11 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAHJABpa066865; Fri, 17 Nov 2017 19:10:11 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201711171910.vAHJABpa066865@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 17 Nov 2017 19:10:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325956 - in head/share/man: man7 man9 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/share/man: man7 man9 X-SVN-Commit-Revision: 325956 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 19:10:12 -0000 Author: kib Date: Fri Nov 17 19:10:10 2017 New Revision: 325956 URL: https://svnweb.freebsd.org/changeset/base/325956 Log: Bump dates after lint removal. Noted by: wblock Sponsored by: The FreeBSD Foundation Modified: head/share/man/man7/hier.7 head/share/man/man9/style.9 Modified: head/share/man/man7/hier.7 ============================================================================== --- head/share/man/man7/hier.7 Fri Nov 17 18:34:14 2017 (r325955) +++ head/share/man/man7/hier.7 Fri Nov 17 19:10:10 2017 (r325956) @@ -28,7 +28,7 @@ .\" @(#)hier.7 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd June 10, 2017 +.Dd November 16, 2017 .Dt HIER 7 .Os .Sh NAME Modified: head/share/man/man9/style.9 ============================================================================== --- head/share/man/man9/style.9 Fri Nov 17 18:34:14 2017 (r325955) +++ head/share/man/man9/style.9 Fri Nov 17 19:10:10 2017 (r325956) @@ -26,7 +26,7 @@ .\" From: @(#)style 1.14 (Berkeley) 4/28/95 .\" $FreeBSD$ .\" -.Dd October 5, 2016 +.Dd November 16, 2017 .Dt STYLE 9 .Os .Sh NAME From owner-svn-src-head@freebsd.org Fri Nov 17 19:16:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 488CBDE14DE; Fri, 17 Nov 2017 19:16:55 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f52.google.com (mail-it0-f52.google.com [209.85.214.52]) (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 94B4A71F7A; Fri, 17 Nov 2017 19:16:54 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f52.google.com with SMTP id b5so5272236itc.3; Fri, 17 Nov 2017 11:16:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=Dj2tr9LEH4dewnPxaH57zP/rba6lCAFk6D9cFrUvUb4=; b=EixWeEzfcFn6xzuseAa/1rWuu6q1W2E+lCXY8lXVUeNIieJ0rE62L8bp15VJMIhVd6 8C9vsmi8fQCvnjUjM1Eskdlp8ywxAsoLWrPdvrYGQI1a5jKentkC0L9ZzqPzrxwSs5Ib 8Pf1y9Ea6ahzjXn0W7rFpBBj7ibTBg54z0KxD3Rc2bYCCamE0mWdUP7kBX2LZEG+TShj UJAVMcfjLbpfpMrhCdpJLPuW1oWXD/78JzA/YwAh2K5jJ7WCTtvYkTmo4JE2OoBk3BdH 7V/zW+956uVI2tYgvuPuqf17g7y0w3GVulbC/DOOggsIa4N52NiEV8LeeFtpXxFitJTn mrYA== X-Gm-Message-State: AJaThX7gIpLcclZr4Pzq4XPZ6QvWoW6xiInF5NH6jpiIjMB+CaNEqlKz /SpuoHMWruoVt7z6me0mHXFri1fm X-Google-Smtp-Source: AGs4zMasbTdww+DlZ0jY0kMG8nsm7SVoVZ28vNs3ToWm1+jnwKLxcuaWLo7OEK34c6T+1/9YP2WYwA== X-Received: by 10.36.209.2 with SMTP id w2mr8202364itg.130.1510945713598; Fri, 17 Nov 2017 11:08:33 -0800 (PST) Received: from mail-io0-f175.google.com (mail-io0-f175.google.com. [209.85.223.175]) by smtp.gmail.com with ESMTPSA id p17sm1477263iod.15.2017.11.17.11.08.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Nov 2017 11:08:33 -0800 (PST) Received: by mail-io0-f175.google.com with SMTP id i184so2370976ioa.0; Fri, 17 Nov 2017 11:08:33 -0800 (PST) X-Received: by 10.107.156.209 with SMTP id f200mr3764846ioe.226.1510945713354; Fri, 17 Nov 2017 11:08:33 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.165.150 with HTTP; Fri, 17 Nov 2017 11:08:32 -0800 (PST) In-Reply-To: <20171117093436.6wsrynphvcm6re4h@ivaldir.net> References: <201704152015.v3FKFiwZ006836@repo.freebsd.org> <20171117093436.6wsrynphvcm6re4h@ivaldir.net> From: Conrad Meyer Date: Fri, 17 Nov 2017 11:08:32 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r316980 - head/contrib/zstd/programs To: Baptiste Daroussin Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Allan Jude Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 19:16:55 -0000 On Fri, Nov 17, 2017 at 1:34 AM, Baptiste Daroussin wrot= e: > On Wed, Nov 15, 2017 at 07:38:13PM -0800, Conrad Meyer wrote: >> Please revert this change. >> >> First, it introduces the POLA-violating behavior that zstdcat deletes >> its source files. This is not how zcat/bzcat behaves. > > I have modified zstdcat to behave like zcat/bzcat. > > The commit you stated is exactly to ensure the zstd(1) command is behavin= g like > xz, gzip, etc (to the exception of zstdcat which was buggy) this commit i= s > needed to have those tools a drop-in replacement for other compression pr= ograms. > (which is necessary for example to have newsyslog being able to use zstd.= ) > > I committed a change needed in base and I will start a discussion with up= stream > > Best regards, > Bapt Hi Bapt, I don't think that's a good enough reason to differ from upstream. Furthermore, the change isn't documented. For compatibility with gzip/xz, you could simply add a new FreeBSD-specific zstd frontend with the behavior you want =E2=80=94 instead= of changing every other frontend. That way the behavior and documentation would match both the documentation we ship and the upstream documentation and behavior. No surprises for anyone. I really want to emphasize that *deleting user files when we claim we will not* is an awful design choice to make. I think this change should be reverted until at minimum our documentation is updated to inform users we do not --keep by default. (I think we should stay with upstream regardless, but if we're going to make a major change like this it MUST be documented.) Best, Conrad From owner-svn-src-head@freebsd.org Fri Nov 17 19:25:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CECBDE18A8; Fri, 17 Nov 2017 19:25:41 +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 4388472654; Fri, 17 Nov 2017 19:25:41 +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 vAHJPeOU074949; Fri, 17 Nov 2017 19:25:40 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAHJPeuN074946; Fri, 17 Nov 2017 19:25:40 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201711171925.vAHJPeuN074946@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Fri, 17 Nov 2017 19:25:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325957 - in head: sys/kern tests/sys/vfs X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head: sys/kern tests/sys/vfs X-SVN-Commit-Revision: 325957 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 19:25:41 -0000 Author: cem Date: Fri Nov 17 19:25:39 2017 New Revision: 325957 URL: https://svnweb.freebsd.org/changeset/base/325957 Log: vfs_lookup: Allow PATH_MAX-1 symlinks Previously, symlinks in FreeBSD were artificially limited to PATH_MAX-2. Add a short test case to verify the change. Submitted by: Gaurav Gangalwar Reviewed by: kib Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D12589 Added: head/tests/sys/vfs/lookup_test.sh (contents, props changed) Modified: head/sys/kern/vfs_lookup.c head/tests/sys/vfs/Makefile Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Fri Nov 17 19:10:10 2017 (r325956) +++ head/sys/kern/vfs_lookup.c Fri Nov 17 19:25:39 2017 (r325957) @@ -499,7 +499,7 @@ namei(struct nameidata *ndp) error = ENOENT; break; } - if (linklen + ndp->ni_pathlen >= MAXPATHLEN) { + if (linklen + ndp->ni_pathlen > MAXPATHLEN) { if (ndp->ni_pathlen > 1) uma_zfree(namei_zone, cp); error = ENAMETOOLONG; Modified: head/tests/sys/vfs/Makefile ============================================================================== --- head/tests/sys/vfs/Makefile Fri Nov 17 19:10:10 2017 (r325956) +++ head/tests/sys/vfs/Makefile Fri Nov 17 19:25:39 2017 (r325957) @@ -7,6 +7,8 @@ TESTSDIR= ${TESTSBASE}/sys/vfs ATF_TESTS_C+= lookup_cap_dotdot CFLAGS.lookup_cap_dotdot.c+= -I${SRCTOP}/tests +#ATF_TESTS_SH+= lookup_test + TAP_TESTS_SH+= trailing_slash .include Added: head/tests/sys/vfs/lookup_test.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/vfs/lookup_test.sh Fri Nov 17 19:25:39 2017 (r325957) @@ -0,0 +1,17 @@ +# $FreeBSD$ + +long_symlink_head() +{ + atf_set "descr" "Test for 1023 (PATH_MAX-1) symlink support" +} +long_symlink_body() +{ + atf_check -s exit:0 ln -s aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa sym_long + # was: "stat: sym_long: stat: File name too long"; exit 1 + atf_check -s exit:0 -o ignore stat -L sym_long +} + +atf_init_test_cases() +{ + atf_add_test_case long_symlink +} From owner-svn-src-head@freebsd.org Fri Nov 17 19:28:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72577DE1942; Fri, 17 Nov 2017 19:28:54 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f174.google.com (mail-io0-f174.google.com [209.85.223.174]) (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 8F0D5727F7; Fri, 17 Nov 2017 19:28:53 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f174.google.com with SMTP id v21so9855331ioi.4; Fri, 17 Nov 2017 11:28:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=ZPyraKOVCXPs7UnJFqT/oMcjbRbgGIdRkT+kWCoHymQ=; b=Jc52E2Bm5CumByyTrR2a5QgGSqMyZjI7L33M/DAeL/tqzgqAeb5rxOAzBb5pmsa0t5 eFOzC/ARlYObvLL1y9dC6AbLzeAvld9cYb+5c7PFNNzXPtm882vwS5v/XuQ8n7soGORw zU2UPnffiLiBGsjVH9r0LO1fj38y2Q33s6Lno7JzDisrNj7FRDxKf6/ZhkswMONqJCsV 9e/k18EpnGzsWV9MdPooxCuenH6gjhG3fBjNPhnYPOMy5zU+g0wMbB4TIShHlwnqjAMo JwzBuGQIWEENZOvDXeFFFCuUFob6apPoKnkRsuUUSeZIMd6CFr3bPplN+Qy28xDGg7k+ SMpQ== X-Gm-Message-State: AJaThX5GSskJpGkF+46RvcsSQy7wiTDWt7Q/T+m25dgNC72BPrNLCgOM ZMvxn+RlvFp+QngoODl3Vok2LoxT X-Google-Smtp-Source: AGs4zMbYysNjZkjOL/OcbQ46My492x9dnME5hkn0/x4UOvGaXvFtYPdL/cKdehKq1Gnr66rdb/kZZQ== X-Received: by 10.107.114.19 with SMTP id n19mr2205907ioc.224.1510945172192; Fri, 17 Nov 2017 10:59:32 -0800 (PST) Received: from mail-it0-f42.google.com (mail-it0-f42.google.com. [209.85.214.42]) by smtp.gmail.com with ESMTPSA id 70sm1916969iok.77.2017.11.17.10.59.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Nov 2017 10:59:31 -0800 (PST) Received: by mail-it0-f42.google.com with SMTP id x28so5232783ita.0; Fri, 17 Nov 2017 10:59:31 -0800 (PST) X-Received: by 10.36.192.2 with SMTP id u2mr7793080itf.119.1510945170924; Fri, 17 Nov 2017 10:59:30 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.165.150 with HTTP; Fri, 17 Nov 2017 10:59:30 -0800 (PST) In-Reply-To: <201711170933.vAH9XTsl027533@repo.freebsd.org> References: <201711170933.vAH9XTsl027533@repo.freebsd.org> From: Conrad Meyer Date: Fri, 17 Nov 2017 10:59:30 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r325930 - head/sys/contrib/zstd/programs To: Baptiste Daroussin Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 19:28:54 -0000 Hi Bapt, I don't think this is a sufficient fix. Our zstd is still deleting source files, differing from upstream for no reason. Best, Conrad On Fri, Nov 17, 2017 at 1:33 AM, Baptiste Daroussin wrote: > Author: bapt > Date: Fri Nov 17 09:33:29 2017 > New Revision: 325930 > URL: https://svnweb.freebsd.org/changeset/base/325930 > > Log: > Actually commit the right patch for r325929 > > Modified: > head/sys/contrib/zstd/programs/zstdcli.c > > Modified: head/sys/contrib/zstd/programs/zstdcli.c > ============================================================================== > --- head/sys/contrib/zstd/programs/zstdcli.c Fri Nov 17 09:29:26 2017 (r325929) > +++ head/sys/contrib/zstd/programs/zstdcli.c Fri Nov 17 09:33:29 2017 (r325930) > @@ -421,7 +421,7 @@ int main(int argCount, const char* argv[]) > /* preset behaviors */ > if (exeNameMatch(programName, ZSTD_ZSTDMT)) nbThreads=0; > if (exeNameMatch(programName, ZSTD_UNZSTD)) operation=zom_decompress; > - if (exeNameMatch(programName, ZSTD_CAT)) { operation=zom_decompress; forceStdout=1; FIO_overwriteMode(); outFileName=stdoutmark; g_displayLevel=1; g_removeSrcFile=0; } > + if (exeNameMatch(programName, ZSTD_CAT)) { operation=zom_decompress; forceStdout=1; FIO_overwriteMode(); outFileName=stdoutmark; g_displayLevel=1; FIO_setRemoveSrcFile(0); } > if (exeNameMatch(programName, ZSTD_GZ)) { suffix = GZ_EXTENSION; FIO_setCompressionType(FIO_gzipCompression); FIO_setRemoveSrcFile(1); } /* behave like gzip */ > if (exeNameMatch(programName, ZSTD_GUNZIP)) { operation=zom_decompress; FIO_setRemoveSrcFile(1); } /* behave like gunzip */ > if (exeNameMatch(programName, ZSTD_GZCAT)) { operation=zom_decompress; forceStdout=1; FIO_overwriteMode(); outFileName=stdoutmark; g_displayLevel=1; } /* behave like gzcat */ > From owner-svn-src-head@freebsd.org Fri Nov 17 19:51:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87205DE2066; Fri, 17 Nov 2017 19:51:30 +0000 (UTC) (envelope-from rysto32@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 418B5734CA; Fri, 17 Nov 2017 19:51:30 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: by mail-qt0-x232.google.com with SMTP id 31so8210854qtz.9; Fri, 17 Nov 2017 11:51:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Ap6DPMYQjnZIiTHMDgKzVh5HoIMICIDtVVdbrR4X+wQ=; b=YBy/YfaHtUpl6iRLhCgLDrs+O548HJuCwHJ5aQ54tDI8d5hdqY3yOg/njcRQ1xHTII xKX2APCPcUhiaVKWewq3Gvyhr0Ew+ZBNr4Hw1cxACuVArwgL79lnY0H6ZescKscxj/p1 UpNQwPic8qVepl0MnYoqTPK9qGsXTtj5mmqTIZdHdEY8WRLTSyeGdEQ4EoOTlp+SB4zZ KCMPdOEAOYYTzyfMqat6T6cHws68FgmgihggtEWIwAUn7rO+/7o3yxlqOqxkXyrv0PDV AmUZLwCDIkUQGQMXoyXs5DzJK4yASP/ynViDnt6kgjvXfpAODt068/FDJ6X3NMst+GEc 4B7g== 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=Ap6DPMYQjnZIiTHMDgKzVh5HoIMICIDtVVdbrR4X+wQ=; b=CdqyP4ZQeuafmg/w9F0MLwPCeNHCVY6RS8sntODmHnELuJaBoaDjWam4fnqcicxeuF dH4lFnkcKT94NXZM5/BvHnIVkpkcDO7OQU6wJdOkRe9z0qruKStKkcXV4P0/abVl2axI jXYxek4Ssantm55drXGfod9KpfeC0APwaQR6of7a8GmyH5gvzeq40jlVLNt6N24MgBZM QPyIW2onBVDqTZitDj80vtiL3k1Qm6lnAkrE9J4INacN++JMHEYm0c71fw+VMv8Kuzz/ 9kwX3/bCkFiBerWExGqjiHM+ah1gqHglqmok+11Am6mci5CY9cg8Y3xKGB55rI67Q7zT Ca1g== X-Gm-Message-State: AJaThX6fZDjmVhiNUEsfILtTYN3bc5rgEHQ1/EOqh80anM2qDmd+Zw8k 0EMPhcxMWB4/e6sO2j5eA1yiMeayhPK0S0IMcDJw6A== X-Google-Smtp-Source: AGs4zMbi2FWbgHf/poO+Kcg+VoY9CTJ+E9yykGMC9QcH6arcAyLZJSH6M/JW5kJ1t9lh6Dm2R1r71fcmKZKguDeDxqg= X-Received: by 10.200.58.231 with SMTP id x94mr10063741qte.24.1510948289202; Fri, 17 Nov 2017 11:51:29 -0800 (PST) MIME-Version: 1.0 Received: by 10.237.39.211 with HTTP; Fri, 17 Nov 2017 11:51:28 -0800 (PST) In-Reply-To: <201707251441.v6PEfocM030334@repo.freebsd.org> References: <201707251441.v6PEfocM030334@repo.freebsd.org> From: Ryan Stone Date: Fri, 17 Nov 2017 14:51:28 -0500 Message-ID: Subject: Re: svn commit: r321477 - head/sys/net To: Sean Bruno 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-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 19:51:30 -0000 On Tue, Jul 25, 2017 at 10:41 AM, Sean Bruno wrote: > Author: sbruno > Date: Tue Jul 25 14:41:50 2017 > New Revision: 321477 > URL: https://svnweb.freebsd.org/changeset/base/321477 > > Log: > Don't hold the RM lock during lagg_proto_addport() to avoid an LOR. Can lagg_proto_addport() really be safely called without a lock held? That seems extremely dubious to me. From owner-svn-src-head@freebsd.org Fri Nov 17 20:30:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FA4CDE2A65 for ; Fri, 17 Nov 2017 20:30:15 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-wm0-x22d.google.com (mail-wm0-x22d.google.com [IPv6:2a00:1450:400c:c09::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B15367488E for ; Fri, 17 Nov 2017 20:30:14 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-wm0-x22d.google.com with SMTP id y80so8703571wmd.0 for ; Fri, 17 Nov 2017 12:30:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=fU4Aa2rAXXPcSj63jJm8ibF6bJqKP218j2iGa8HuWHw=; b=JsjX+BtCyHjmAnNmbP3jVe3gDKqAJTiAeQFa/jTYZNzRD9l/Uciv5NA12CKEZ03h8F 3WG4DAAYKfJXRY3p1KR823X52582fijTdgL9mnNraf566tK8YHDXt4c2EUbmlEB8oz8b 9JRagGVXLUlfqxo9aHY79NWl+axFBd0iAof9L6AB6K2QzTwxl9F/bbQT/4BiLeICBlpB 2WZ/E3dOFN15nUBQrPr+43OWwCwCMzZn8dxXMvc6LaqPFElZLw/3aGZWbobGHhGiWaVL M+HllbPcEacnU5qKmwhtexvyAttDy//72UahoH7wjU89Z55Zuabc97TWNk9SamROCv3i THGA== 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=fU4Aa2rAXXPcSj63jJm8ibF6bJqKP218j2iGa8HuWHw=; b=oroFUQ7Jny5Qz2blem3mW1w2dIMix/zdUEkX1w8De7QfSU7oaYh517qGgWYr60uwSa S4e9YBMKzOMt1ywestHFaPxkKpJV1hKR+ALoykpoegFkj1g+FHuIsBgrSBuLYE5HqVMm pORCUmmgdQU0mu1KHzDrVULr/fvW0b6ppHMcA7sa2aKtOCqdZbeAtqFdRyYTzjeBlK7h f/7Qo0ZjwxzIMB8W717Dg2oAf8N05GJ1oJ5fHaV/NCrmqkgB8+6P9ki4o21HBNL8jtt7 5agN/WESyVuEAaaGQgFn5w3Y525YnOIydva9VZre1Gb7DXJaEidp/dF7/bS0TqUd+6NC sdrg== X-Gm-Message-State: AJaThX5nQUQkOlpUnIsGUNsBMmUrvc6u5L/1pWKV4JhaE35XIRvvyE3p Jx8ZlpidSfWUc/XNY+YwsolioxVnMyO/2RtaYmdI4g== X-Google-Smtp-Source: AGs4zMblklPC8vXtaEilBVV1YO+L156A/9GLVEsrodcZ1E4p13wnamL+Zo0Zo7uv+sQgbsdIbhlGF2HOawVQKNrV1kI= X-Received: by 10.80.142.88 with SMTP id 24mr9340419edx.153.1510950612626; Fri, 17 Nov 2017 12:30:12 -0800 (PST) MIME-Version: 1.0 Received: by 10.80.149.174 with HTTP; Fri, 17 Nov 2017 12:30:12 -0800 (PST) In-Reply-To: <201711171925.vAHJPeuN074946@repo.freebsd.org> References: <201711171925.vAHJPeuN074946@repo.freebsd.org> From: Oliver Pinter Date: Fri, 17 Nov 2017 21:30:12 +0100 Message-ID: Subject: Re: svn commit: r325957 - in head: sys/kern tests/sys/vfs To: Conrad Meyer Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 20:30:15 -0000 On Friday, November 17, 2017, Conrad Meyer wrote: > Author: cem > Date: Fri Nov 17 19:25:39 2017 > New Revision: 325957 > URL: https://svnweb.freebsd.org/changeset/base/325957 > > Log: > vfs_lookup: Allow PATH_MAX-1 symlinks > > Previously, symlinks in FreeBSD were artificially limited to PATH_MAX-2. > > Add a short test case to verify the change. > > Submitted by: Gaurav Gangalwar > Reviewed by: kib > Sponsored by: Dell EMC Isilon > Differential Revision: https://reviews.freebsd.org/D12589 > > Added: > head/tests/sys/vfs/lookup_test.sh (contents, props changed) > Modified: > head/sys/kern/vfs_lookup.c > head/tests/sys/vfs/Makefile > > Modified: head/sys/kern/vfs_lookup.c > ============================================================ > ================== > --- head/sys/kern/vfs_lookup.c Fri Nov 17 19:10:10 2017 (r325956) > +++ head/sys/kern/vfs_lookup.c Fri Nov 17 19:25:39 2017 (r325957) > @@ -499,7 +499,7 @@ namei(struct nameidata *ndp) > error = ENOENT; > break; > } > - if (linklen + ndp->ni_pathlen >= MAXPATHLEN) { > + if (linklen + ndp->ni_pathlen > MAXPATHLEN) { > if (ndp->ni_pathlen > 1) > uma_zfree(namei_zone, cp); > error = ENAMETOOLONG; > > Modified: head/tests/sys/vfs/Makefile > ============================================================ > ================== > --- head/tests/sys/vfs/Makefile Fri Nov 17 19:10:10 2017 (r325956) > +++ head/tests/sys/vfs/Makefile Fri Nov 17 19:25:39 2017 (r325957) > @@ -7,6 +7,8 @@ TESTSDIR= ${TESTSBASE}/sys/vfs > ATF_TESTS_C+= lookup_cap_dotdot > CFLAGS.lookup_cap_dotdot.c+= -I${SRCTOP}/tests > > +#ATF_TESTS_SH+= lookup_test This commented out line is intended? > + > TAP_TESTS_SH+= trailing_slash > > .include > > Added: head/tests/sys/vfs/lookup_test.sh > ============================================================ > ================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/tests/sys/vfs/lookup_test.sh Fri Nov 17 19:25:39 2017 > (r325957) > @@ -0,0 +1,17 @@ > +# $FreeBSD$ > + > +long_symlink_head() > +{ > + atf_set "descr" "Test for 1023 (PATH_MAX-1) symlink support" > +} > +long_symlink_body() > +{ > + atf_check -s exit:0 ln -s aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa > aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa > aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa > aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa > aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ > aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa > aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa > aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa > aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa > aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa > aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa > aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa > aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa > aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ > aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa > aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa > aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa > aaaaaaaaaaaaaaaaaaaaaa > aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa sym_long > + # was: "stat: sym_long: stat: File name too long"; exit 1 > + atf_check -s exit:0 -o ignore stat -L sym_long > +} > + > +atf_init_test_cases() > +{ > + atf_add_test_case long_symlink > +} > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org > " > From owner-svn-src-head@freebsd.org Fri Nov 17 20:41:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56D64DE2D93; Fri, 17 Nov 2017 20:41:19 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3085174EE6; Fri, 17 Nov 2017 20:41:19 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAHKfIk1006247; Fri, 17 Nov 2017 20:41:18 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAHKfImC006244; Fri, 17 Nov 2017 20:41:18 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201711172041.vAHKfImC006244@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 17 Nov 2017 20:41:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325958 - in head: share/man/man9 sys/conf sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head: share/man/man9 sys/conf sys/kern X-SVN-Commit-Revision: 325958 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 20:41:19 -0000 Author: mjg Date: Fri Nov 17 20:41:17 2017 New Revision: 325958 URL: https://svnweb.freebsd.org/changeset/base/325958 Log: lockmgr: remove the ADAPTIVE_LOCKMGRS option The code was never enabled and is very heavy weight. A revamped adaptive spinning may show up at a later time. Discussed with: kib Modified: head/share/man/man9/lock.9 head/sys/conf/options head/sys/kern/kern_lock.c Modified: head/share/man/man9/lock.9 ============================================================================== --- head/share/man/man9/lock.9 Fri Nov 17 19:25:39 2017 (r325957) +++ head/share/man/man9/lock.9 Fri Nov 17 20:41:17 2017 (r325958) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 2, 2014 +.Dd November 17, 2017 .Dt LOCK 9 .Os .Sh NAME @@ -93,9 +93,6 @@ The timeout value passed to .It Fa flags The flags the lock is to be initialized with: .Bl -tag -width ".Dv LK_CANRECURSE" -.It Dv LK_ADAPTIVE -Enable adaptive spinning for this lock if the kernel is compiled with the -ADAPTIVE_LOCKMGRS option. .It Dv LK_CANRECURSE Allow recursive exclusive locks. .It Dv LK_NOPROFILE Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Fri Nov 17 19:25:39 2017 (r325957) +++ head/sys/conf/options Fri Nov 17 20:41:17 2017 (r325958) @@ -69,7 +69,6 @@ TEXTDUMP_VERBOSE opt_ddb.h NUM_CORE_FILES opt_global.h # Miscellaneous options. -ADAPTIVE_LOCKMGRS ALQ ALTERA_SDCARD_FAST_SIM opt_altera_sdcard.h ATSE_CFI_HACK opt_cfi.h Modified: head/sys/kern/kern_lock.c ============================================================================== --- head/sys/kern/kern_lock.c Fri Nov 17 19:25:39 2017 (r325957) +++ head/sys/kern/kern_lock.c Fri Nov 17 20:41:17 2017 (r325958) @@ -26,7 +26,6 @@ * DAMAGE. */ -#include "opt_adaptive_lockmgrs.h" #include "opt_ddb.h" #include "opt_hwpmc_hooks.h" @@ -159,15 +158,6 @@ struct lock_class lock_class_lockmgr = { #endif }; -#ifdef ADAPTIVE_LOCKMGRS -static u_int alk_retries = 10; -static u_int alk_loops = 10000; -static SYSCTL_NODE(_debug, OID_AUTO, lockmgr, CTLFLAG_RD, NULL, - "lockmgr debugging"); -SYSCTL_UINT(_debug_lockmgr, OID_AUTO, retries, CTLFLAG_RW, &alk_retries, 0, ""); -SYSCTL_UINT(_debug_lockmgr, OID_AUTO, loops, CTLFLAG_RW, &alk_loops, 0, ""); -#endif - static bool __always_inline lockmgr_slock_try(struct lock *lk, uintptr_t *xp, int flags); static bool __always_inline lockmgr_sunlock_try(struct lock *lk, uintptr_t x); @@ -661,10 +651,6 @@ __lockmgr_args(struct lock *lk, u_int flags, struct lo uint64_t waittime = 0; int contested = 0; #endif -#ifdef ADAPTIVE_LOCKMGRS - volatile struct thread *owner; - u_int i, spintries = 0; -#endif error = 0; tid = (uintptr_t)curthread; @@ -748,76 +734,7 @@ __lockmgr_args(struct lock *lk, u_int flags, struct lo break; } -#ifdef ADAPTIVE_LOCKMGRS /* - * If the owner is running on another CPU, spin until - * the owner stops running or the state of the lock - * changes. We need a double-state handle here - * because for a failed acquisition the lock can be - * either held in exclusive mode or shared mode - * (for the writer starvation avoidance technique). - */ - if (LK_CAN_ADAPT(lk, flags) && (x & LK_SHARE) == 0 && - LK_HOLDER(x) != LK_KERNPROC) { - owner = (struct thread *)LK_HOLDER(x); - if (LOCK_LOG_TEST(&lk->lock_object, 0)) - CTR3(KTR_LOCK, - "%s: spinning on %p held by %p", - __func__, lk, owner); - KTR_STATE1(KTR_SCHED, "thread", - sched_tdname(td), "spinning", - "lockname:\"%s\"", lk->lock_object.lo_name); - - /* - * If we are holding also an interlock drop it - * in order to avoid a deadlock if the lockmgr - * owner is adaptively spinning on the - * interlock itself. - */ - if (flags & LK_INTERLOCK) { - class->lc_unlock(ilk); - flags &= ~LK_INTERLOCK; - } - GIANT_SAVE(); - while (LK_HOLDER(lk->lk_lock) == - (uintptr_t)owner && TD_IS_RUNNING(owner)) - cpu_spinwait(); - KTR_STATE0(KTR_SCHED, "thread", - sched_tdname(td), "running"); - GIANT_RESTORE(); - continue; - } else if (LK_CAN_ADAPT(lk, flags) && - (x & LK_SHARE) != 0 && LK_SHARERS(x) && - spintries < alk_retries) { - KTR_STATE1(KTR_SCHED, "thread", - sched_tdname(td), "spinning", - "lockname:\"%s\"", lk->lock_object.lo_name); - if (flags & LK_INTERLOCK) { - class->lc_unlock(ilk); - flags &= ~LK_INTERLOCK; - } - GIANT_SAVE(); - spintries++; - for (i = 0; i < alk_loops; i++) { - if (LOCK_LOG_TEST(&lk->lock_object, 0)) - CTR4(KTR_LOCK, - "%s: shared spinning on %p with %u and %u", - __func__, lk, spintries, i); - x = lk->lk_lock; - if ((x & LK_SHARE) == 0 || - LK_CAN_SHARE(x, flags) != 0) - break; - cpu_spinwait(); - } - KTR_STATE0(KTR_SCHED, "thread", - sched_tdname(td), "running"); - GIANT_RESTORE(); - if (i != alk_loops) - continue; - } -#endif - - /* * Acquire the sleepqueue chain lock because we * probabilly will need to manipulate waiters flags. */ @@ -833,25 +750,7 @@ __lockmgr_args(struct lock *lk, u_int flags, struct lo continue; } -#ifdef ADAPTIVE_LOCKMGRS /* - * The current lock owner might have started executing - * on another CPU (or the lock could have changed - * owner) while we were waiting on the turnstile - * chain lock. If so, drop the turnstile lock and try - * again. - */ - if (LK_CAN_ADAPT(lk, flags) && (x & LK_SHARE) == 0 && - LK_HOLDER(x) != LK_KERNPROC) { - owner = (struct thread *)LK_HOLDER(x); - if (TD_IS_RUNNING(owner)) { - sleepq_release(&lk->lock_object); - continue; - } - } -#endif - - /* * Try to set the LK_SHARED_WAITERS flag. If we fail, * loop back and retry. */ @@ -992,77 +891,7 @@ __lockmgr_args(struct lock *lk, u_int flags, struct lo break; } -#ifdef ADAPTIVE_LOCKMGRS /* - * If the owner is running on another CPU, spin until - * the owner stops running or the state of the lock - * changes. - */ - x = lk->lk_lock; - if (LK_CAN_ADAPT(lk, flags) && (x & LK_SHARE) == 0 && - LK_HOLDER(x) != LK_KERNPROC) { - owner = (struct thread *)LK_HOLDER(x); - if (LOCK_LOG_TEST(&lk->lock_object, 0)) - CTR3(KTR_LOCK, - "%s: spinning on %p held by %p", - __func__, lk, owner); - KTR_STATE1(KTR_SCHED, "thread", - sched_tdname(td), "spinning", - "lockname:\"%s\"", lk->lock_object.lo_name); - - /* - * If we are holding also an interlock drop it - * in order to avoid a deadlock if the lockmgr - * owner is adaptively spinning on the - * interlock itself. - */ - if (flags & LK_INTERLOCK) { - class->lc_unlock(ilk); - flags &= ~LK_INTERLOCK; - } - GIANT_SAVE(); - while (LK_HOLDER(lk->lk_lock) == - (uintptr_t)owner && TD_IS_RUNNING(owner)) - cpu_spinwait(); - KTR_STATE0(KTR_SCHED, "thread", - sched_tdname(td), "running"); - GIANT_RESTORE(); - continue; - } else if (LK_CAN_ADAPT(lk, flags) && - (x & LK_SHARE) != 0 && LK_SHARERS(x) && - spintries < alk_retries) { - if ((x & LK_EXCLUSIVE_SPINNERS) == 0 && - !atomic_cmpset_ptr(&lk->lk_lock, x, - x | LK_EXCLUSIVE_SPINNERS)) - continue; - KTR_STATE1(KTR_SCHED, "thread", - sched_tdname(td), "spinning", - "lockname:\"%s\"", lk->lock_object.lo_name); - if (flags & LK_INTERLOCK) { - class->lc_unlock(ilk); - flags &= ~LK_INTERLOCK; - } - GIANT_SAVE(); - spintries++; - for (i = 0; i < alk_loops; i++) { - if (LOCK_LOG_TEST(&lk->lock_object, 0)) - CTR4(KTR_LOCK, - "%s: shared spinning on %p with %u and %u", - __func__, lk, spintries, i); - if ((lk->lk_lock & - LK_EXCLUSIVE_SPINNERS) == 0) - break; - cpu_spinwait(); - } - KTR_STATE0(KTR_SCHED, "thread", - sched_tdname(td), "running"); - GIANT_RESTORE(); - if (i != alk_loops) - continue; - } -#endif - - /* * Acquire the sleepqueue chain lock because we * probabilly will need to manipulate waiters flags. */ @@ -1077,24 +906,6 @@ __lockmgr_args(struct lock *lk, u_int flags, struct lo sleepq_release(&lk->lock_object); continue; } - -#ifdef ADAPTIVE_LOCKMGRS - /* - * The current lock owner might have started executing - * on another CPU (or the lock could have changed - * owner) while we were waiting on the turnstile - * chain lock. If so, drop the turnstile lock and try - * again. - */ - if (LK_CAN_ADAPT(lk, flags) && (x & LK_SHARE) == 0 && - LK_HOLDER(x) != LK_KERNPROC) { - owner = (struct thread *)LK_HOLDER(x); - if (TD_IS_RUNNING(owner)) { - sleepq_release(&lk->lock_object); - continue; - } - } -#endif /* * The lock can be in the state where there is a From owner-svn-src-head@freebsd.org Fri Nov 17 20:53:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1AE08DE3337; Fri, 17 Nov 2017 20:53:54 +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 DB155757BF; Fri, 17 Nov 2017 20:53:53 +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 vAHKrqjj013263; Fri, 17 Nov 2017 20:53:52 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAHKrqJb013262; Fri, 17 Nov 2017 20:53:52 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201711172053.vAHKrqJb013262@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 17 Nov 2017 20:53:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325959 - head/sys/cam/scsi X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/sys/cam/scsi X-SVN-Commit-Revision: 325959 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 20:53:54 -0000 Author: asomers Date: Fri Nov 17 20:53:52 2017 New Revision: 325959 URL: https://svnweb.freebsd.org/changeset/base/325959 Log: Add assertion in probedone() that we're holding the device lock. Submitted by: ken Reviewed by: asomers MFC after: 3 weeks Sponsored by: Spectra Logic Corp Modified: head/sys/cam/scsi/scsi_xpt.c Modified: head/sys/cam/scsi/scsi_xpt.c ============================================================================== --- head/sys/cam/scsi/scsi_xpt.c Fri Nov 17 20:41:17 2017 (r325958) +++ head/sys/cam/scsi/scsi_xpt.c Fri Nov 17 20:53:52 2017 (r325959) @@ -1171,6 +1171,7 @@ probedone(struct cam_periph *periph, union ccb *done_c softc = (probe_softc *)periph->softc; path = done_ccb->ccb_h.path; priority = done_ccb->ccb_h.pinfo.priority; + cam_periph_assert(periph, MA_OWNED); switch (softc->action) { case PROBE_TUR: From owner-svn-src-head@freebsd.org Fri Nov 17 21:49:14 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E872EDE3E5F; Fri, 17 Nov 2017 21:49:14 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f49.google.com (mail-it0-f49.google.com [209.85.214.49]) (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 AC51976BE5; Fri, 17 Nov 2017 21:49:14 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f49.google.com with SMTP id y15so5716872ita.4; Fri, 17 Nov 2017 13:49:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ySu+2FpV7qeModrHj4ulrfxSxtqWz+693pe6CpOh5Tk=; b=MXiGj6ZIGemHMPlKRGRePqRVp9VtU9D4Nu9Iax/yQLFNpUPEQhOYfgoMnEGoLnVIyR Vy7GOyQoFjtGG/n6UIPWvzHh5zlKntSNXBXT8qOB8iFq5hdct/NhT1QZBQPZEl1bl0Eu hrlUWwyped4vEfOEp7wvRwQopuKxrvXVpv++Sl6C1pv1Iu6sjE1wzugHBgYNQbRTnMJ3 zCfInGnqWaKel9MJdM5luzqBrzfkjpr9ZaVmLDY67I+zdt5Qisw40NivpmixYS8C/EKs 4c06fAJWx058OD16+RHeNizslcmdTxRh7a4by9uGb5TpGGU2wmGlL7FGBU3u4VbLsgRn 5pHQ== X-Gm-Message-State: AJaThX6w3twkhTYpfn4F0r5RKA0U2sJqxnQi/dwBECiwniulhAny+nSC HpXllS4WPdLBRGSl8tDQHlGCZmsK X-Google-Smtp-Source: AGs4zMatmnxmVqrBr7rutfUxAdJetPT+LRp9BBi+zmlFj5ExXKXvHRfo1PsVeSlgj0cqqWSLVnI6Ig== X-Received: by 10.36.0.209 with SMTP id 200mr8724805ita.55.1510955347969; Fri, 17 Nov 2017 13:49:07 -0800 (PST) Received: from mail-it0-f54.google.com (mail-it0-f54.google.com. [209.85.214.54]) by smtp.gmail.com with ESMTPSA id b66sm2446785itb.28.2017.11.17.13.49.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Nov 2017 13:49:07 -0800 (PST) Received: by mail-it0-f54.google.com with SMTP id l196so5731304itl.4; Fri, 17 Nov 2017 13:49:06 -0800 (PST) X-Received: by 10.36.53.15 with SMTP id k15mr8988916ita.75.1510955346293; Fri, 17 Nov 2017 13:49:06 -0800 (PST) MIME-Version: 1.0 References: <201711171925.vAHJPeuN074946@repo.freebsd.org> In-Reply-To: From: Conrad Meyer Date: Fri, 17 Nov 2017 21:48:55 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r325957 - in head: sys/kern tests/sys/vfs To: Oliver Pinter Cc: Conrad Meyer , "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.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 21:49:15 -0000 Yes. On Fri, Nov 17, 2017 at 12:30 PM Oliver Pinter < oliver.pinter@hardenedbsd.org> wrote: > > > On Friday, November 17, 2017, Conrad Meyer wrote: > >> Author: cem >> Date: Fri Nov 17 19:25:39 2017 >> New Revision: 325957 >> URL: https://svnweb.freebsd.org/changeset/base/325957 >> >> Log: >> vfs_lookup: Allow PATH_MAX-1 symlinks >> >> Previously, symlinks in FreeBSD were artificially limited to PATH_MAX-= 2. >> >> Add a short test case to verify the change. >> >> Submitted by: Gaurav Gangalwar >> Reviewed by: kib >> Sponsored by: Dell EMC Isilon >> Differential Revision: https://reviews.freebsd.org/D12589 >> >> Added: >> head/tests/sys/vfs/lookup_test.sh (contents, props changed) >> Modified: >> head/sys/kern/vfs_lookup.c >> head/tests/sys/vfs/Makefile >> >> Modified: head/sys/kern/vfs_lookup.c >> >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/kern/vfs_lookup.c Fri Nov 17 19:10:10 2017 (r325956= ) >> +++ head/sys/kern/vfs_lookup.c Fri Nov 17 19:25:39 2017 (r325957= ) >> @@ -499,7 +499,7 @@ namei(struct nameidata *ndp) >> error =3D ENOENT; >> break; >> } >> - if (linklen + ndp->ni_pathlen >=3D MAXPATHLEN) { >> + if (linklen + ndp->ni_pathlen > MAXPATHLEN) { >> if (ndp->ni_pathlen > 1) >> uma_zfree(namei_zone, cp); >> error =3D ENAMETOOLONG; >> >> Modified: head/tests/sys/vfs/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/tests/sys/vfs/Makefile Fri Nov 17 19:10:10 2017 (r325956= ) >> +++ head/tests/sys/vfs/Makefile Fri Nov 17 19:25:39 2017 (r325957= ) >> @@ -7,6 +7,8 @@ TESTSDIR=3D ${TESTSBASE}/sys/vfs >> ATF_TESTS_C+=3D lookup_cap_dotdot >> CFLAGS.lookup_cap_dotdot.c+=3D -I${SRCTOP}/tests >> >> +#ATF_TESTS_SH+=3D lookup_test > > > This commented out line is intended? > > >> + >> TAP_TESTS_SH+=3D trailing_slash >> >> .include >> >> Added: head/tests/sys/vfs/lookup_test.sh >> >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- /dev/null 00:00:00 1970 (empty, because file is newly added) >> +++ head/tests/sys/vfs/lookup_test.sh Fri Nov 17 19:25:39 2017 >> (r325957) >> @@ -0,0 +1,17 @@ >> +# $FreeBSD$ >> + >> +long_symlink_head() >> +{ >> + atf_set "descr" "Test for 1023 (PATH_MAX-1) symlink support" >> +} >> +long_symlink_body() >> +{ >> + atf_check -s exit:0 ln -s >> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa= aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa= aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa= aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa= aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa= aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa= aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/aaaaaaaaaa= aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa= aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa= aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa= aaaaaaaaaaaaaaaaaaaa/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa= aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa= aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa >> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa sym_long >> + # was: "stat: sym_long: stat: File name too long"; exit 1 >> + atf_check -s exit:0 -o ignore stat -L sym_long >> +} >> + >> +atf_init_test_cases() >> +{ >> + atf_add_test_case long_symlink >> +} >> > _______________________________________________ >> svn-src-head@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/svn-src-head >> To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" >> > From owner-svn-src-head@freebsd.org Fri Nov 17 22:40:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 996FBDE4B50; Fri, 17 Nov 2017 22:40:03 +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 5B8307829A; Fri, 17 Nov 2017 22:40:03 +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 vAHMe2c8055847; Fri, 17 Nov 2017 22:40:02 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAHMe2Xu055845; Fri, 17 Nov 2017 22:40:02 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201711172240.vAHMe2Xu055845@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 17 Nov 2017 22:40:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325960 - in head/sys: modules/ipfw netpfil/ipfw X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: in head/sys: modules/ipfw netpfil/ipfw X-SVN-Commit-Revision: 325960 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 22:40:03 -0000 Author: ae Date: Fri Nov 17 22:40:02 2017 New Revision: 325960 URL: https://svnweb.freebsd.org/changeset/base/325960 Log: Unconditionally enable support for O_IPSEC opcode. IPsec support can be loaded as kernel module, thus do not depend from kernel option IPSEC and always build O_IPSEC opcode implementation as enabled. Obtained from: Yandex LLC MFC after: 1 week Sponsored by: Yandex LLC Modified: head/sys/modules/ipfw/Makefile head/sys/netpfil/ipfw/ip_fw2.c Modified: head/sys/modules/ipfw/Makefile ============================================================================== --- head/sys/modules/ipfw/Makefile Fri Nov 17 20:53:52 2017 (r325959) +++ head/sys/modules/ipfw/Makefile Fri Nov 17 22:40:02 2017 (r325960) @@ -7,7 +7,7 @@ SRCS= ip_fw2.c ip_fw_pfil.c ip_fw_bpf.c SRCS+= ip_fw_dynamic.c ip_fw_log.c ip_fw_eaction.c SRCS+= ip_fw_sockopt.c ip_fw_table.c ip_fw_table_algo.c ip_fw_iface.c SRCS+= ip_fw_table_value.c -SRCS+= opt_inet.h opt_inet6.h opt_ipdivert.h opt_ipfw.h opt_ipsec.h +SRCS+= opt_inet.h opt_inet6.h opt_ipdivert.h opt_ipfw.h CFLAGS+= -DIPFIREWALL # Modified: head/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw2.c Fri Nov 17 20:53:52 2017 (r325959) +++ head/sys/netpfil/ipfw/ip_fw2.c Fri Nov 17 22:40:02 2017 (r325960) @@ -37,7 +37,6 @@ __FBSDID("$FreeBSD$"); #error "IPFIREWALL requires INET" #endif /* INET */ #include "opt_inet6.h" -#include "opt_ipsec.h" #include #include @@ -1945,10 +1944,8 @@ do { \ break; case O_IPSEC: -#ifdef IPSEC match = (m_tag_find(m, PACKET_TAG_IPSEC_IN_DONE, NULL) != NULL); -#endif /* otherwise no match */ break; @@ -2563,7 +2560,7 @@ do { \ case O_NAT: l = 0; /* exit inner loop */ done = 1; /* exit outer loop */ - if (!IPFW_NAT_LOADED) { + if (!is_ipv4 || !IPFW_NAT_LOADED) { retval = IP_FW_DENY; break; } From owner-svn-src-head@freebsd.org Fri Nov 17 23:02:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7118DE514B for ; Fri, 17 Nov 2017 23:02:26 +0000 (UTC) (envelope-from wlosh@bsdimp.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 91D1F78F55 for ; Fri, 17 Nov 2017 23:02:26 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x230.google.com with SMTP id 79so2778972ioi.3 for ; Fri, 17 Nov 2017 15:02:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=vsETBzPBDLoCIaD2R/0y8S95qU4fgv0PmwiaEDxp8As=; b=Jxx8mDynkaNhOIlv2QMIUdVqE+L50tgAfGd7jvXvsm7C8mPzmE0OCu1kfkv5ov1xsl aW8pxII8hDdfxm67uiBg6cASNMFsIdU/6bqlpl99nc5eBdKe27L8fCnKu8nLkuiABhfH Jl4bFmwBrOKekta9JHWc/weaxuU6mGDLFFR9yrcgQpuQsayj8D+JcOKZD90MosSHlw/e vBYN8hhtuRX3vniHDfUpvdughbRWxO4OiMyW+BxkSPOC+WDuK7s8FwASKq8tbgZaEOiP FNbGjB5ug0npsPaKUr7cgtVRT1S8Hp6K5kVLVA2RiAatk2phA8JtdmWYYbZqD220QkmY yzrQ== 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=vsETBzPBDLoCIaD2R/0y8S95qU4fgv0PmwiaEDxp8As=; b=NJFz+YfvRTkEtUjVsM903+VdgMdU75bLj/aONh0IsOtzfP0q6jtYh35CZSx9nrokj2 2ouhNUKTtfOQl1ULVQsa7Z10Bax88DIWpvw3t2W58ZM7kbGpS8gz6ciE2YJAdNx4qLqC 9htp5fehJJq11ZtRXlvE+lb/pN3R66pl+HrQ6x7A/O/YmaHjgE4otmXwTL1INkwO327O MDIekDGkZbbif2pbF5rvC3zS3E3RM1l/JpQtNdI+TUNd7oQCTtJyFf1uiFv+aS55AAQU LjFPc0yjeCJFKWDQ57cuRLci9GCVDH4CqFpqt/rBZ5+LK6CPY+NXGV4ynNfdys+RD5qQ wSUg== X-Gm-Message-State: AJaThX60dUoRbBenupzThAR9SUFivoYw8RmlTL/67rzw6QCrxPlqCbjO WAkw+oI/+E0aGunxxmzuwUJIWAMpdK9ndjp1hWLuM7T5 X-Google-Smtp-Source: AGs4zMbAiXRhJCacno659bK/EV6D5X5IisByTgUY2iaPuGmZk/4x0u1sWHPzEFUnoxnMUEm6q98zUCdOMrI0hY/rKLU= X-Received: by 10.107.104.18 with SMTP id d18mr4426945ioc.136.1510959745655; Fri, 17 Nov 2017 15:02:25 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Fri, 17 Nov 2017 15:02:24 -0800 (PST) X-Originating-IP: [2603:300b:6:5100:d59a:59a:dd99:c18d] In-Reply-To: <201711171831.vAHIVf3a062456@pdx.rh.CN85.dnsmgr.net> References: <201711171816.vAHIGkRZ045584@repo.freebsd.org> <201711171831.vAHIVf3a062456@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Fri, 17 Nov 2017 16:02:24 -0700 X-Google-Sender-Auth: ZWlXv2R36Fa9pvbnkBGAloRzqP8 Message-ID: Subject: Re: svn commit: r325954 - in head: . share/mk sys/conf usr.sbin/config To: "Rodney W. Grimes" Cc: Warner Losh , 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.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 23:02:26 -0000 Kib@ posted to arch that we were removing it, nobody objected, we removed it. If it was a working feature that might have a few users, that's one thing. But I don't think make lint has actually worked in at least a decade. When I try it today, I get dozens of warnings, and several syntax errors: types.h(289): syntax error [249] nvme.h(79): syntax error [249] nvme.h(105): syntax error [249] nvme.h(137): syntax error [249] nvme.h(160): syntax error [249] nvme.h(160): cannot recover from previous errors [224] since it flags all c99 and newer usages as syntax errors. We've been using c99 for the kernel since about 8.x, and in the base longer than that. xlint hasn't been useful since we started doing this. The types.h change went in: c217b5c12e71 ( mdf 2011-12-12 18:44:17 +0000 289)typedef _Bool bool; which as far as I can make out was between 8.x being branched and 9.x being branched. This feature has therefore been broken for 3 major releases without any announcement, or even any bug reports coming in. Not exactly a feature that has an audience that needs to be informed of anything... While I generally agree one should try to follow proper deprecation process, this has been de-facto removed from the source tree for at least 6 years, and likely broken a lot longer than that. At most this deserves a one-liner in the release notes. At most. So is this about my forgetting to include a "Release Notes: Yes" line in the commit, or something larger? Warner On Fri, Nov 17, 2017 at 11:31 AM, Rodney W. Grimes < freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > TOP post,sorry.... > > > Someone needs to follow up with proper deprication procedures on lint. > > > > Author: imp > > Date: Fri Nov 17 18:16:46 2017 > > New Revision: 325954 > > URL: https://svnweb.freebsd.org/changeset/base/325954 > > > > Log: > > Remove build system support for lint. > > > > Differential Revision: https://reviews.freebsd.org/D13124 > > > > Modified: > > head/Makefile > > head/share/mk/bsd.README > > head/share/mk/bsd.lib.mk > > head/share/mk/bsd.own.mk > > head/share/mk/bsd.prog.mk > > head/share/mk/bsd.subdir.mk > > head/share/mk/bsd.suffixes.mk > > head/share/mk/sys.mk > > head/sys/conf/kern.mk > > head/sys/conf/kern.post.mk > > head/sys/conf/kern.pre.mk > > head/sys/conf/kmod.mk > > head/usr.sbin/config/mkmakefile.c > > > > Modified: head/Makefile > > ============================================================ > ================== > > --- head/Makefile Fri Nov 17 18:00:52 2017 (r325953) > > +++ head/Makefile Fri Nov 17 18:16:46 2017 (r325954) > > @@ -129,7 +129,7 @@ TGTS= all all-man buildenv buildenvvars > buildkernel bu > > everything hier hierarchy install installcheck installkernel \ > > installkernel.debug packagekernel packageworld \ > > reinstallkernel reinstallkernel.debug \ > > - installworld kernel-toolchain libraries lint maninstall \ > > + installworld kernel-toolchain libraries maninstall \ > > obj objlink showconfig tags toolchain update \ > > _worldtmp _legacy _bootstrap-tools _cleanobj _obj \ > > _build-tools _build-metadata _cross-tools _includes _libraries \ > > > > Modified: head/share/mk/bsd.README > > ============================================================ > ================== > > --- head/share/mk/bsd.README Fri Nov 17 18:00:52 2017 (r325953) > > +++ head/share/mk/bsd.README Fri Nov 17 18:16:46 2017 (r325954) > > @@ -250,8 +250,6 @@ It has seven targets: > > beforeinstall and afterinstall may also be used to cause > > actions immediately before and after the install target > > is executed. > > - lint: > > - run lint on the source files > > tags: > > create a tags file for the source files. > > > > @@ -488,18 +486,17 @@ ${MOD}_oid.h A header which programmatically > describes > > > > The include file contains the default targets for > building > > subdirectories. It has the same seven targets as : all, > clean, > > -cleandir, depend, install, lint, and tags. For all of the directories > > -listed in the variable SUBDIRS, the specified directory will be visited > > -and the target made. There is also a default target which allows the > > -command "make subdir" where subdir is any directory listed in the > variable > > -SUBDIRS. > > +cleandir, depend, install, and tags. For all of the directories listed > in the > > +variable SUBDIRS, the specified directory will be visited and the > target made. > > +There is also a default target which allows the command "make subdir" > where > > +subdir is any directory listed in the variable SUBDIRS. > > > > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > =-=-=-=-=-=-= > > > > -The include file has support for building libraries. It > has > > -the same seven targets as : all, clean, cleandir, depend, > > -install, lint, and tags. It has a limited number of suffixes, > consistent > > -with the current needs of the BSD tree. > > +The include file has support for building libraries. It > has the > > +same seven targets as : all, clean, cleandir, depend, > install, and > > +tags. It has a limited number of suffixes, consistent with the current > needs of > > +the BSD tree. > > > > It sets/uses the following variables: > > > > @@ -530,8 +527,6 @@ LIB_CXX The name of the library to build. > It also cau > > will be built. NO_PIC can be set to only build a static > > library. > > > > -LINTLIBDIR Target directory for lint libraries. > > - > > MAN The manual pages to be installed. See bsd.man.mk for more > > details. > > > > @@ -588,8 +583,6 @@ It has seven targets: > > targets beforeinstall and afterinstall may also be used > > to cause actions immediately before and after the > > install target is executed. > > - lint: > > - run lint on the source files. > > tags: > > create a tags file for the source files. > > > > > > Modified: head/share/mk/bsd.lib.mk > > ============================================================ > ================== > > --- head/share/mk/bsd.lib.mk Fri Nov 17 18:00:52 2017 (r325953) > > +++ head/share/mk/bsd.lib.mk Fri Nov 17 18:16:46 2017 (r325954) > > @@ -285,18 +285,6 @@ lib${LIB_PRIVATE}${LIB}_pic.a: ${SOBJS} > > ${RANLIB} ${RANLIBFLAGS} ${.TARGET} > > .endif > > > > -.if defined(WANT_LINT) && !defined(NO_LINT) && defined(LIB) && > !empty(LIB) > > -LINTLIB= llib-l${LIB}.ln > > -_LIBS+= ${LINTLIB} > > -LINTOBJS+= ${SRCS:M*.c:.c=.ln} > > -CLEANFILES+= ${LINTOBJS} > > - > > -${LINTLIB}: ${LINTOBJS} > > - @${ECHO} building lint library ${.TARGET} > > - @rm -f ${.TARGET} > > - ${LINT} ${LINTLIBFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC} > > -.endif > > - > > .endif # !defined(INTERNALLIB) > > > > .if defined(_SKIP_BUILD) > > @@ -403,10 +391,6 @@ _libinstall: > > ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -o ${LIBOWN} -g > ${LIBGRP} -m ${LIBMODE} \ > > ${_INSTALLFLAGS} lib${LIB}_pic.a ${DESTDIR}${_LIBDIR}/ > > .endif > > -.if defined(WANT_LINT) && !defined(NO_LINT) && defined(LIB) && > !empty(LIB) > > - ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -o ${LIBOWN} -g > ${LIBGRP} -m ${LIBMODE} \ > > - ${_INSTALLFLAGS} ${LINTLIB} ${DESTDIR}${LINTLIBDIR}/ > > -.endif > > .endif # !defined(INTERNALLIB) > > > > .if !defined(LIBRARIES_ONLY) > > @@ -423,11 +407,6 @@ realinstall: maninstall > > .ORDER: beforeinstall maninstall > > .endif > > > > -.endif > > - > > -.if !target(lint) > > -lint: ${SRCS:M*.c} > > - ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC} > > .endif > > > > .if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY) > > > > Modified: head/share/mk/bsd.own.mk > > ============================================================ > ================== > > --- head/share/mk/bsd.own.mk Fri Nov 17 18:00:52 2017 (r325953) > > +++ head/share/mk/bsd.own.mk Fri Nov 17 18:16:46 2017 (r325954) > > @@ -32,8 +32,6 @@ > > # > > # LIBEXECDIR Base path for system daemons and utilities. [/usr/libexec] > > # > > -# LINTLIBDIR Base path for lint libraries. [/usr/libdata/lint] > > -# > > # SHLIBDIR Base path for shared libraries. [${LIBDIR}] > > # > > # LIBOWN Library owner. [${BINOWN}] > > @@ -162,7 +160,6 @@ LIBDIR?= ${LIBDIR_BASE} > > LIBCOMPATDIR?= /usr/lib/compat > > LIBDATADIR?= /usr/libdata > > LIBEXECDIR?= /usr/libexec > > -LINTLIBDIR?= /usr/libdata/lint > > SHLIBDIR?= ${LIBDIR} > > LIBOWN?= ${BINOWN} > > LIBGRP?= ${BINGRP} > > > > Modified: head/share/mk/bsd.prog.mk > > ============================================================ > ================== > > --- head/share/mk/bsd.prog.mk Fri Nov 17 18:00:52 2017 (r325953) > > +++ head/share/mk/bsd.prog.mk Fri Nov 17 18:16:46 2017 (r325954) > > @@ -294,13 +294,6 @@ realinstall: maninstall > > > > .endif # !target(install) > > > > -.if !target(lint) > > -lint: ${SRCS:M*.c} > > -.if defined(PROG) > > - ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC} > > -.endif > > -.endif > > - > > .if ${MK_MAN} != "no" > > .include > > .endif > > > > Modified: head/share/mk/bsd.subdir.mk > > ============================================================ > ================== > > --- head/share/mk/bsd.subdir.mk Fri Nov 17 18:00:52 2017 > (r325953) > > +++ head/share/mk/bsd.subdir.mk Fri Nov 17 18:16:46 2017 > (r325954) > > @@ -46,7 +46,7 @@ SUBDIR_TARGETS+= \ > > all all-man analyze buildconfig buildfiles buildincludes \ > > checkdpadd clean cleandepend cleandir cleanilinks \ > > cleanobj depend distribute files includes installconfig \ > > - installfiles installincludes print-dir realinstall lint \ > > + installfiles installincludes print-dir realinstall \ > > maninstall manlint ${_obj} objlink tags \ > > > > # Described above. > > > > Modified: head/share/mk/bsd.suffixes.mk > > ============================================================ > ================== > > --- head/share/mk/bsd.suffixes.mk Fri Nov 17 18:00:52 2017 > (r325953) > > +++ head/share/mk/bsd.suffixes.mk Fri Nov 17 18:16:46 2017 > (r325954) > > @@ -4,14 +4,6 @@ > > cp -f ${.IMPSRC} ${.TARGET} > > chmod a+x ${.TARGET} > > > > -.c.ln: > > - ${LINT} ${LINTOBJFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC} || \ > > - touch ${.TARGET} > > - > > -.cc.ln .C.ln .cpp.ln .cxx.ln: > > - ${LINT} ${LINTOBJFLAGS} ${CXXFLAGS:M-[DIU]*} ${.IMPSRC} || \ > > - touch ${.TARGET} > > - > > .c: > > ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} > > ${CTFCONVERT_CMD} > > > > Modified: head/share/mk/sys.mk > > ============================================================ > ================== > > --- head/share/mk/sys.mk Fri Nov 17 18:00:52 2017 (r325953) > > +++ head/share/mk/sys.mk Fri Nov 17 18:16:46 2017 (r325954) > > @@ -142,7 +142,7 @@ NO_META_IGNORE_HOST_HEADERS= 1 > > .if defined(%POSIX) > > .SUFFIXES: .o .c .y .l .a .sh .f > > .else > > -.SUFFIXES: .out .a .ln .o .bco .llo .c .cc .cpp .cxx .C .m .F .f .e > .r .y .l .S .asm .s .cl .p .h .sh > > +.SUFFIXES: .out .a .o .bco .llo .c .cc .cpp .cxx .C .m .F .f .e .r .y > .l .S .asm .s .cl .p .h .sh > > .endif > > > > AR ?= ar > > @@ -244,13 +244,6 @@ LFLAGS ?= > > LD ?= ld > > LDFLAGS ?= > > _LDFLAGS = ${LDFLAGS:S/-Wl,//g:N-mabi=*:N-fuse-ld=*} > > - > > -LINT ?= lint > > -LINTFLAGS ?= -cghapbx > > -LINTKERNFLAGS ?= ${LINTFLAGS} > > -LINTOBJFLAGS ?= -cghapbxu -i > > -LINTOBJKERNFLAGS?= ${LINTOBJFLAGS} > > -LINTLIBFLAGS ?= -cghapbxu -C ${LIB} > > > > MAKE ?= make > > > > > > Modified: head/sys/conf/kern.mk > > ============================================================ > ================== > > --- head/sys/conf/kern.mk Fri Nov 17 18:00:52 2017 (r325953) > > +++ head/sys/conf/kern.mk Fri Nov 17 18:16:46 2017 (r325954) > > @@ -228,7 +228,7 @@ PHONY_NOTMAIN = afterdepend afterinstall all > beforedep > > beforelinking build build-tools buildfiles buildincludes \ > > checkdpadd clean cleandepend cleandir cleanobj configure \ > > depend distclean distribute exe \ > > - html includes install installfiles installincludes lint \ > > + html includes install installfiles installincludes \ > > obj objlink objs objwarn \ > > realinstall regress \ > > tags whereobj > > > > Modified: head/sys/conf/kern.post.mk > > ============================================================ > ================== > > --- head/sys/conf/kern.post.mk Fri Nov 17 18:00:52 2017 > (r325953) > > +++ head/sys/conf/kern.post.mk Fri Nov 17 18:16:46 2017 > (r325954) > > @@ -153,7 +153,6 @@ ${FULLKERNEL}: ${SYSTEM_DEP} vers.o > > > > OBJS_DEPEND_GUESS+= assym.s vnode_if.h ${BEFORE_DEPEND:M*.h} \ > > ${MFILES:T:S/.m$/.h/} > > -LNFILES= ${CFILES:T:S/.c$/.ln/} > > > > .for mfile in ${MFILES} > > # XXX the low quality .m.o rules gnerated by config are normally used > > @@ -167,15 +166,11 @@ ${mfile:T:S/.m$/.h/}: ${mfile} > > kernel-clean: > > rm -f *.o *.so *.pico *.ko *.s eddep errs \ > > ${FULLKERNEL} ${KERNEL_KO} ${KERNEL_KO}.debug \ > > - linterrs tags vers.c \ > > + tags vers.c \ > > vnode_if.c vnode_if.h vnode_if_newproto.h vnode_if_typedef.h \ > > ${MFILES:T:S/.m$/.c/} ${MFILES:T:S/.m$/.h/} \ > > ${CLEAN} > > > > -lint: ${LNFILES} > > - ${LINT} ${LINTKERNFLAGS} ${CFLAGS:M-[DILU]*} ${.ALLSRC} 2>&1 | \ > > - tee -a linterrs > > - > > # This is a hack. BFD "optimizes" away dynamic mode if there are no > > # dynamic references. We could probably do a '-Bforcedynamic' mode like > > # in the a.out ld. For now, this works. > > @@ -364,9 +359,6 @@ kernel-reinstall: > > config.o env.o hints.o vers.o vnode_if.o: > > ${NORMAL_C} > > ${NORMAL_CTFCONVERT} > > - > > -config.ln env.ln hints.ln vers.ln vnode_if.ln: > > - ${NORMAL_LINT} > > > > .if ${MK_REPRODUCIBLE_BUILD} != "no" > > REPRO_FLAG="-r" > > > > Modified: head/sys/conf/kern.pre.mk > > ============================================================ > ================== > > --- head/sys/conf/kern.pre.mk Fri Nov 17 18:00:52 2017 (r325953) > > +++ head/sys/conf/kern.pre.mk Fri Nov 17 18:16:46 2017 (r325954) > > @@ -46,7 +46,6 @@ M= ${MACHINE} > > > > AWK?= awk > > CP?= cp > > -LINT?= lint > > NM?= nm > > OBJCOPY?= objcopy > > SIZE?= size > > @@ -121,9 +120,6 @@ CFLAGS+= ${CONF_CFLAGS} > > LDFLAGS+= -Wl,--build-id=sha1 > > .endif > > > > -# Optional linting. This can be overridden in /etc/make.conf. > > -LINTFLAGS= ${LINTOBJKERNFLAGS} > > - > > NORMAL_C= ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.IMPSRC} > > NORMAL_S= ${CC:N${CCACHE_BIN}} -c ${ASM_CFLAGS} ${WERROR} ${.IMPSRC} > > PROFILE_C= ${CC} -c ${CFLAGS} ${WERROR} ${.IMPSRC} > > @@ -175,8 +171,6 @@ NORMAL_CTFCONVERT= > > .else > > NORMAL_CTFCONVERT= @: > > .endif > > - > > -NORMAL_LINT= ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC} > > > > # Linux Kernel Programming Interface C-flags > > LINUXKPI_INCLUDES= -I$S/compat/linuxkpi/common/include > > > > Modified: head/sys/conf/kmod.mk > > ============================================================ > ================== > > --- head/sys/conf/kmod.mk Fri Nov 17 18:00:52 2017 (r325953) > > +++ head/sys/conf/kmod.mk Fri Nov 17 18:16:46 2017 (r325954) > > @@ -469,9 +469,6 @@ genassym.o: ${SRCS:Mopt_*.h} > > ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c > > .endif > > > > -lint: ${SRCS} > > - ${LINT} ${LINTKERNFLAGS} ${CFLAGS:M-[DILU]*} ${.ALLSRC:M*.c} > > - > > .if defined(KERNBUILDDIR) > > ${OBJS}: opt_global.h > > .endif > > > > Modified: head/usr.sbin/config/mkmakefile.c > > ============================================================ > ================== > > --- head/usr.sbin/config/mkmakefile.c Fri Nov 17 18:00:52 2017 > (r325953) > > +++ head/usr.sbin/config/mkmakefile.c Fri Nov 17 18:16:46 2017 > (r325954) > > @@ -690,18 +690,11 @@ do_rules(FILE *f) > > continue; > > } > > if (ftp->f_depends) { > > - fprintf(f, "%s%sln: $S/%s%c %s\n", > > - ftp->f_objprefix, tail(np), np, > och, > > - ftp->f_depends); > > - fprintf(f, "\t${NORMAL_LINT}\n\n"); > > fprintf(f, "%s%so: $S/%s%c %s\n", > > ftp->f_objprefix, tail(np), np, > och, > > ftp->f_depends); > > } > > else { > > - fprintf(f, "%s%sln: $S/%s%c\n", > > - ftp->f_objprefix, tail(np), np, > och); > > - fprintf(f, "\t${NORMAL_LINT}\n\n"); > > fprintf(f, "%s%so: $S/%s%c\n", > > ftp->f_objprefix, tail(np), np, > och); > > } > > > > > > -- > Rod Grimes > rgrimes@freebsd.org > From owner-svn-src-head@freebsd.org Fri Nov 17 23:22:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB310DE5885; Fri, 17 Nov 2017 23:22:40 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 983AC79939; Fri, 17 Nov 2017 23:22:40 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAHNMd63077223; Fri, 17 Nov 2017 23:22:39 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAHNMd1S077220; Fri, 17 Nov 2017 23:22:39 GMT (envelope-from np@FreeBSD.org) Message-Id: <201711172322.vAHNMd1S077220@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 17 Nov 2017 23:22:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325961 - in head/sys/dev/cxgbe: . common X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: in head/sys/dev/cxgbe: . common X-SVN-Commit-Revision: 325961 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 23:22:40 -0000 Author: np Date: Fri Nov 17 23:22:39 2017 New Revision: 325961 URL: https://svnweb.freebsd.org/changeset/base/325961 Log: cxgbe(4): Add core Vdd to the sysctl MIB. Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/common/common.h head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/common/common.h ============================================================================== --- head/sys/dev/cxgbe/common/common.h Fri Nov 17 22:40:02 2017 (r325960) +++ head/sys/dev/cxgbe/common/common.h Fri Nov 17 23:22:39 2017 (r325961) @@ -332,6 +332,7 @@ struct adapter_params { struct devlog_params devlog; /* PF-only */ struct rss_params rss; /* VF-only */ struct vf_resources vfres; /* VF-only */ + unsigned int core_vdd; unsigned int sf_size; /* serial flash size in bytes */ unsigned int sf_nsec; /* # of flash sectors */ Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Fri Nov 17 22:40:02 2017 (r325960) +++ head/sys/dev/cxgbe/t4_main.c Fri Nov 17 23:22:39 2017 (r325961) @@ -3435,7 +3435,10 @@ get_params__post_init(struct adapter *sc) param[3] = FW_PARAM_PFVF(FILTER_END); param[4] = FW_PARAM_PFVF(L2T_START); param[5] = FW_PARAM_PFVF(L2T_END); - rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 6, param, val); + param[6] = V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DEV) | + V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DEV_DIAG) | + V_FW_PARAMS_PARAM_Y(FW_PARAM_DEV_DIAG_VDD); + rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 7, param, val); if (rc != 0) { device_printf(sc->dev, "failed to query parameters (post_init): %d.\n", rc); @@ -3453,6 +3456,7 @@ get_params__post_init(struct adapter *sc) KASSERT(sc->vres.l2t.size <= L2T_SIZE, ("%s: L2 table size (%u) larger than expected (%u)", __func__, sc->vres.l2t.size, L2T_SIZE)); + sc->params.core_vdd = val[6]; /* * MPSBGMAP is queried separately because only recent firmwares support @@ -5159,6 +5163,9 @@ t4_sysctls(struct adapter *sc) SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "temperature", CTLTYPE_INT | CTLFLAG_RD, sc, 0, sysctl_temperature, "I", "chip temperature (in Celsius)"); + + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "core_vdd", CTLFLAG_RD, + &sc->params.core_vdd, 0, "core Vdd (in mV)"); #ifdef SBUF_DRAIN /* From owner-svn-src-head@freebsd.org Fri Nov 17 23:25:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BAA3ADE5933; Fri, 17 Nov 2017 23:25:07 +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 87A4F79AB1; Fri, 17 Nov 2017 23:25:07 +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 vAHNP6iW077433; Fri, 17 Nov 2017 23:25:06 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAHNP6IL077432; Fri, 17 Nov 2017 23:25:06 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201711172325.vAHNP6IL077432@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 17 Nov 2017 23:25:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325962 - 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: 325962 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 23:25:07 -0000 Author: ae Date: Fri Nov 17 23:25:06 2017 New Revision: 325962 URL: https://svnweb.freebsd.org/changeset/base/325962 Log: Add comment for accidentally committed unrelated change in r325960. Do not invoke IPv4 NAT handler for non IPv4 packets. Libalias expects a packet is IPv4. And in case when it is IPv6, it just translates them as IPv4. This leads to corruption and in some cases to panics. In particular a panic can happen when value of ip6_plen modified to something that leads to IP fragmentation, but actual packet length does not match the IP length. Packets that are not IPv4 will be dropped by NAT rule. Reported by: Viktor Dukhovni 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 Fri Nov 17 23:22:39 2017 (r325961) +++ head/sys/netpfil/ipfw/ip_fw2.c Fri Nov 17 23:25:06 2017 (r325962) @@ -2560,6 +2560,10 @@ do { \ case O_NAT: l = 0; /* exit inner loop */ done = 1; /* exit outer loop */ + /* + * Ensure that we do not invoke NAT handler for + * non IPv4 packets. Libalias expects only IPv4. + */ if (!is_ipv4 || !IPFW_NAT_LOADED) { retval = IP_FW_DENY; break; From owner-svn-src-head@freebsd.org Fri Nov 17 23:27:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD7A3DE59D8; Fri, 17 Nov 2017 23:27:07 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A7E179C1D; Fri, 17 Nov 2017 23:27:07 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAHNR6Ld077602; Fri, 17 Nov 2017 23:27:06 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAHNR65d077600; Fri, 17 Nov 2017 23:27:06 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201711172327.vAHNR65d077600@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 17 Nov 2017 23:27:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325963 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 325963 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 23:27:07 -0000 Author: mjg Date: Fri Nov 17 23:27:06 2017 New Revision: 325963 URL: https://svnweb.freebsd.org/changeset/base/325963 Log: locks: fix compilation issues without SMP or KDTRACE_HOOKS Modified: head/sys/kern/kern_mutex.c head/sys/kern/kern_sx.c Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Fri Nov 17 23:25:06 2017 (r325962) +++ head/sys/kern/kern_mutex.c Fri Nov 17 23:27:06 2017 (r325963) @@ -462,9 +462,7 @@ __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v) struct mtx *m; struct turnstile *ts; uintptr_t tid; -#ifdef ADAPTIVE_MUTEXES struct thread *owner; -#endif #ifdef KTR int cont_logged = 0; #endif @@ -628,6 +626,9 @@ __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v) */ #ifdef KDTRACE_HOOKS sleep_time -= lockstat_nsecs(&m->lock_object); +#endif +#ifndef ADAPTIVE_MUTEXES + owner = mtx_owner(m); #endif MPASS(owner == mtx_owner(m)); turnstile_wait(ts, owner, TS_EXCLUSIVE_QUEUE); Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Fri Nov 17 23:25:06 2017 (r325962) +++ head/sys/kern/kern_sx.c Fri Nov 17 23:27:06 2017 (r325963) @@ -520,8 +520,8 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, uintptr_t t #endif #if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING) uintptr_t state; - int extra_work; #endif + int extra_work = 0; if (SCHEDULER_STOPPED()) return (0); @@ -880,8 +880,8 @@ _sx_slock_hard(struct sx *sx, int opts, const char *fi #endif #if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING) uintptr_t state; - int extra_work; #endif + int extra_work = 0; if (SCHEDULER_STOPPED()) return (0); From owner-svn-src-head@freebsd.org Sat Nov 18 01:34:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B47C8DE84D5; Sat, 18 Nov 2017 01:34:07 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 890597D6A4; Sat, 18 Nov 2017 01:34:07 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vAI1Y3Fb064139; Fri, 17 Nov 2017 17:34:03 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vAI1Y2ks064138; Fri, 17 Nov 2017 17:34:02 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201711180134.vAI1Y2ks064138@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r325954 - in head: . share/mk sys/conf usr.sbin/config In-Reply-To: To: Warner Losh Date: Fri, 17 Nov 2017 17:34:02 -0800 (PST) CC: "Rodney W. Grimes" , Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 01:34:07 -0000 [ Charset UTF-8 unsupported, converting... ] > Kib@ posted to arch that we were removing it, nobody objected, we removed > it. If it was a working feature that might have a few users, that's one > thing. But I don't think make lint has actually worked in at least a decade. Thats a sad state of affairs. > > When I try it today, I get dozens of warnings, and several syntax errors: > > types.h(289): syntax error [249] > nvme.h(79): syntax error [249] > nvme.h(105): syntax error [249] > nvme.h(137): syntax error [249] > nvme.h(160): syntax error [249] > nvme.h(160): cannot recover from previous errors [224] > > since it flags all c99 and newer usages as syntax errors. We've been using > c99 for the kernel since about 8.x, and in the base longer than that. xlint > hasn't been useful since we started doing this. The types.h change went in: > c217b5c12e71 ( mdf 2011-12-12 18:44:17 +0000 289)typedef _Bool bool; > which as far as I can make out was between 8.x being branched and 9.x being > branched. This feature has therefore been broken for 3 major releases > without any announcement, or even any bug reports coming in. Not exactly a > feature that has an audience that needs to be informed of anything... While > I generally agree one should try to follow proper deprecation process, this > has been de-facto removed from the source tree for at least 6 years, and > likely broken a lot longer than that. At most this deserves a one-liner in > the release notes. At most. > > So is this about my forgetting to include a "Release Notes: Yes" line in > the commit, or something larger? Something larger. Just because the src tree use of lint is failing does not meant that someone out there is not using lint in some other capacity. The depreication policy is there to notify them that lint well be removed as a program in the next release. Just because FreeBSD's internal use of lint is broken should in no way relieve us of that obligation and stated policy. People seem to be axing stuff without following this policy, and without even bothering to do a release notes Y. > Warner > > On Fri, Nov 17, 2017 at 11:31 AM, Rodney W. Grimes < > freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > > > TOP post,sorry.... > > > > > > Someone needs to follow up with proper deprication procedures on lint. > > > > > > > Author: imp > > > Date: Fri Nov 17 18:16:46 2017 > > > New Revision: 325954 > > > URL: https://svnweb.freebsd.org/changeset/base/325954 > > > > > > Log: > > > Remove build system support for lint. > > > > > > Differential Revision: https://reviews.freebsd.org/D13124 > > > > > > Modified: > > > head/Makefile > > > head/share/mk/bsd.README > > > head/share/mk/bsd.lib.mk > > > head/share/mk/bsd.own.mk > > > head/share/mk/bsd.prog.mk > > > head/share/mk/bsd.subdir.mk > > > head/share/mk/bsd.suffixes.mk > > > head/share/mk/sys.mk > > > head/sys/conf/kern.mk > > > head/sys/conf/kern.post.mk > > > head/sys/conf/kern.pre.mk > > > head/sys/conf/kmod.mk > > > head/usr.sbin/config/mkmakefile.c > > > > > > Modified: head/Makefile > > > ============================================================ > > ================== > > > --- head/Makefile Fri Nov 17 18:00:52 2017 (r325953) > > > +++ head/Makefile Fri Nov 17 18:16:46 2017 (r325954) > > > @@ -129,7 +129,7 @@ TGTS= all all-man buildenv buildenvvars > > buildkernel bu > > > everything hier hierarchy install installcheck installkernel \ > > > installkernel.debug packagekernel packageworld \ > > > reinstallkernel reinstallkernel.debug \ > > > - installworld kernel-toolchain libraries lint maninstall \ > > > + installworld kernel-toolchain libraries maninstall \ > > > obj objlink showconfig tags toolchain update \ > > > _worldtmp _legacy _bootstrap-tools _cleanobj _obj \ > > > _build-tools _build-metadata _cross-tools _includes _libraries \ > > > > > > Modified: head/share/mk/bsd.README > > > ============================================================ > > ================== > > > --- head/share/mk/bsd.README Fri Nov 17 18:00:52 2017 (r325953) > > > +++ head/share/mk/bsd.README Fri Nov 17 18:16:46 2017 (r325954) > > > @@ -250,8 +250,6 @@ It has seven targets: > > > beforeinstall and afterinstall may also be used to cause > > > actions immediately before and after the install target > > > is executed. > > > - lint: > > > - run lint on the source files > > > tags: > > > create a tags file for the source files. > > > > > > @@ -488,18 +486,17 @@ ${MOD}_oid.h A header which programmatically > > describes > > > > > > The include file contains the default targets for > > building > > > subdirectories. It has the same seven targets as : all, > > clean, > > > -cleandir, depend, install, lint, and tags. For all of the directories > > > -listed in the variable SUBDIRS, the specified directory will be visited > > > -and the target made. There is also a default target which allows the > > > -command "make subdir" where subdir is any directory listed in the > > variable > > > -SUBDIRS. > > > +cleandir, depend, install, and tags. For all of the directories listed > > in the > > > +variable SUBDIRS, the specified directory will be visited and the > > target made. > > > +There is also a default target which allows the command "make subdir" > > where > > > +subdir is any directory listed in the variable SUBDIRS. > > > > > > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > > =-=-=-=-=-=-= > > > > > > -The include file has support for building libraries. It > > has > > > -the same seven targets as : all, clean, cleandir, depend, > > > -install, lint, and tags. It has a limited number of suffixes, > > consistent > > > -with the current needs of the BSD tree. > > > +The include file has support for building libraries. It > > has the > > > +same seven targets as : all, clean, cleandir, depend, > > install, and > > > +tags. It has a limited number of suffixes, consistent with the current > > needs of > > > +the BSD tree. > > > > > > It sets/uses the following variables: > > > > > > @@ -530,8 +527,6 @@ LIB_CXX The name of the library to build. > > It also cau > > > will be built. NO_PIC can be set to only build a static > > > library. > > > > > > -LINTLIBDIR Target directory for lint libraries. > > > - > > > MAN The manual pages to be installed. See bsd.man.mk for more > > > details. > > > > > > @@ -588,8 +583,6 @@ It has seven targets: > > > targets beforeinstall and afterinstall may also be used > > > to cause actions immediately before and after the > > > install target is executed. > > > - lint: > > > - run lint on the source files. > > > tags: > > > create a tags file for the source files. > > > > > > > > > Modified: head/share/mk/bsd.lib.mk > > > ============================================================ > > ================== > > > --- head/share/mk/bsd.lib.mk Fri Nov 17 18:00:52 2017 (r325953) > > > +++ head/share/mk/bsd.lib.mk Fri Nov 17 18:16:46 2017 (r325954) > > > @@ -285,18 +285,6 @@ lib${LIB_PRIVATE}${LIB}_pic.a: ${SOBJS} > > > ${RANLIB} ${RANLIBFLAGS} ${.TARGET} > > > .endif > > > > > > -.if defined(WANT_LINT) && !defined(NO_LINT) && defined(LIB) && > > !empty(LIB) > > > -LINTLIB= llib-l${LIB}.ln > > > -_LIBS+= ${LINTLIB} > > > -LINTOBJS+= ${SRCS:M*.c:.c=.ln} > > > -CLEANFILES+= ${LINTOBJS} > > > - > > > -${LINTLIB}: ${LINTOBJS} > > > - @${ECHO} building lint library ${.TARGET} > > > - @rm -f ${.TARGET} > > > - ${LINT} ${LINTLIBFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC} > > > -.endif > > > - > > > .endif # !defined(INTERNALLIB) > > > > > > .if defined(_SKIP_BUILD) > > > @@ -403,10 +391,6 @@ _libinstall: > > > ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -o ${LIBOWN} -g > > ${LIBGRP} -m ${LIBMODE} \ > > > ${_INSTALLFLAGS} lib${LIB}_pic.a ${DESTDIR}${_LIBDIR}/ > > > .endif > > > -.if defined(WANT_LINT) && !defined(NO_LINT) && defined(LIB) && > > !empty(LIB) > > > - ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -o ${LIBOWN} -g > > ${LIBGRP} -m ${LIBMODE} \ > > > - ${_INSTALLFLAGS} ${LINTLIB} ${DESTDIR}${LINTLIBDIR}/ > > > -.endif > > > .endif # !defined(INTERNALLIB) > > > > > > .if !defined(LIBRARIES_ONLY) > > > @@ -423,11 +407,6 @@ realinstall: maninstall > > > .ORDER: beforeinstall maninstall > > > .endif > > > > > > -.endif > > > - > > > -.if !target(lint) > > > -lint: ${SRCS:M*.c} > > > - ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC} > > > .endif > > > > > > .if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY) > > > > > > Modified: head/share/mk/bsd.own.mk > > > ============================================================ > > ================== > > > --- head/share/mk/bsd.own.mk Fri Nov 17 18:00:52 2017 (r325953) > > > +++ head/share/mk/bsd.own.mk Fri Nov 17 18:16:46 2017 (r325954) > > > @@ -32,8 +32,6 @@ > > > # > > > # LIBEXECDIR Base path for system daemons and utilities. [/usr/libexec] > > > # > > > -# LINTLIBDIR Base path for lint libraries. [/usr/libdata/lint] > > > -# > > > # SHLIBDIR Base path for shared libraries. [${LIBDIR}] > > > # > > > # LIBOWN Library owner. [${BINOWN}] > > > @@ -162,7 +160,6 @@ LIBDIR?= ${LIBDIR_BASE} > > > LIBCOMPATDIR?= /usr/lib/compat > > > LIBDATADIR?= /usr/libdata > > > LIBEXECDIR?= /usr/libexec > > > -LINTLIBDIR?= /usr/libdata/lint > > > SHLIBDIR?= ${LIBDIR} > > > LIBOWN?= ${BINOWN} > > > LIBGRP?= ${BINGRP} > > > > > > Modified: head/share/mk/bsd.prog.mk > > > ============================================================ > > ================== > > > --- head/share/mk/bsd.prog.mk Fri Nov 17 18:00:52 2017 (r325953) > > > +++ head/share/mk/bsd.prog.mk Fri Nov 17 18:16:46 2017 (r325954) > > > @@ -294,13 +294,6 @@ realinstall: maninstall > > > > > > .endif # !target(install) > > > > > > -.if !target(lint) > > > -lint: ${SRCS:M*.c} > > > -.if defined(PROG) > > > - ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC} > > > -.endif > > > -.endif > > > - > > > .if ${MK_MAN} != "no" > > > .include > > > .endif > > > > > > Modified: head/share/mk/bsd.subdir.mk > > > ============================================================ > > ================== > > > --- head/share/mk/bsd.subdir.mk Fri Nov 17 18:00:52 2017 > > (r325953) > > > +++ head/share/mk/bsd.subdir.mk Fri Nov 17 18:16:46 2017 > > (r325954) > > > @@ -46,7 +46,7 @@ SUBDIR_TARGETS+= \ > > > all all-man analyze buildconfig buildfiles buildincludes \ > > > checkdpadd clean cleandepend cleandir cleanilinks \ > > > cleanobj depend distribute files includes installconfig \ > > > - installfiles installincludes print-dir realinstall lint \ > > > + installfiles installincludes print-dir realinstall \ > > > maninstall manlint ${_obj} objlink tags \ > > > > > > # Described above. > > > > > > Modified: head/share/mk/bsd.suffixes.mk > > > ============================================================ > > ================== > > > --- head/share/mk/bsd.suffixes.mk Fri Nov 17 18:00:52 2017 > > (r325953) > > > +++ head/share/mk/bsd.suffixes.mk Fri Nov 17 18:16:46 2017 > > (r325954) > > > @@ -4,14 +4,6 @@ > > > cp -f ${.IMPSRC} ${.TARGET} > > > chmod a+x ${.TARGET} > > > > > > -.c.ln: > > > - ${LINT} ${LINTOBJFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC} || \ > > > - touch ${.TARGET} > > > - > > > -.cc.ln .C.ln .cpp.ln .cxx.ln: > > > - ${LINT} ${LINTOBJFLAGS} ${CXXFLAGS:M-[DIU]*} ${.IMPSRC} || \ > > > - touch ${.TARGET} > > > - > > > .c: > > > ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} > > > ${CTFCONVERT_CMD} > > > > > > Modified: head/share/mk/sys.mk > > > ============================================================ > > ================== > > > --- head/share/mk/sys.mk Fri Nov 17 18:00:52 2017 (r325953) > > > +++ head/share/mk/sys.mk Fri Nov 17 18:16:46 2017 (r325954) > > > @@ -142,7 +142,7 @@ NO_META_IGNORE_HOST_HEADERS= 1 > > > .if defined(%POSIX) > > > .SUFFIXES: .o .c .y .l .a .sh .f > > > .else > > > -.SUFFIXES: .out .a .ln .o .bco .llo .c .cc .cpp .cxx .C .m .F .f .e > > .r .y .l .S .asm .s .cl .p .h .sh > > > +.SUFFIXES: .out .a .o .bco .llo .c .cc .cpp .cxx .C .m .F .f .e .r .y > > .l .S .asm .s .cl .p .h .sh > > > .endif > > > > > > AR ?= ar > > > @@ -244,13 +244,6 @@ LFLAGS ?= > > > LD ?= ld > > > LDFLAGS ?= > > > _LDFLAGS = ${LDFLAGS:S/-Wl,//g:N-mabi=*:N-fuse-ld=*} > > > - > > > -LINT ?= lint > > > -LINTFLAGS ?= -cghapbx > > > -LINTKERNFLAGS ?= ${LINTFLAGS} > > > -LINTOBJFLAGS ?= -cghapbxu -i > > > -LINTOBJKERNFLAGS?= ${LINTOBJFLAGS} > > > -LINTLIBFLAGS ?= -cghapbxu -C ${LIB} > > > > > > MAKE ?= make > > > > > > > > > Modified: head/sys/conf/kern.mk > > > ============================================================ > > ================== > > > --- head/sys/conf/kern.mk Fri Nov 17 18:00:52 2017 (r325953) > > > +++ head/sys/conf/kern.mk Fri Nov 17 18:16:46 2017 (r325954) > > > @@ -228,7 +228,7 @@ PHONY_NOTMAIN = afterdepend afterinstall all > > beforedep > > > beforelinking build build-tools buildfiles buildincludes \ > > > checkdpadd clean cleandepend cleandir cleanobj configure \ > > > depend distclean distribute exe \ > > > - html includes install installfiles installincludes lint \ > > > + html includes install installfiles installincludes \ > > > obj objlink objs objwarn \ > > > realinstall regress \ > > > tags whereobj > > > > > > Modified: head/sys/conf/kern.post.mk > > > ============================================================ > > ================== > > > --- head/sys/conf/kern.post.mk Fri Nov 17 18:00:52 2017 > > (r325953) > > > +++ head/sys/conf/kern.post.mk Fri Nov 17 18:16:46 2017 > > (r325954) > > > @@ -153,7 +153,6 @@ ${FULLKERNEL}: ${SYSTEM_DEP} vers.o > > > > > > OBJS_DEPEND_GUESS+= assym.s vnode_if.h ${BEFORE_DEPEND:M*.h} \ > > > ${MFILES:T:S/.m$/.h/} > > > -LNFILES= ${CFILES:T:S/.c$/.ln/} > > > > > > .for mfile in ${MFILES} > > > # XXX the low quality .m.o rules gnerated by config are normally used > > > @@ -167,15 +166,11 @@ ${mfile:T:S/.m$/.h/}: ${mfile} > > > kernel-clean: > > > rm -f *.o *.so *.pico *.ko *.s eddep errs \ > > > ${FULLKERNEL} ${KERNEL_KO} ${KERNEL_KO}.debug \ > > > - linterrs tags vers.c \ > > > + tags vers.c \ > > > vnode_if.c vnode_if.h vnode_if_newproto.h vnode_if_typedef.h \ > > > ${MFILES:T:S/.m$/.c/} ${MFILES:T:S/.m$/.h/} \ > > > ${CLEAN} > > > > > > -lint: ${LNFILES} > > > - ${LINT} ${LINTKERNFLAGS} ${CFLAGS:M-[DILU]*} ${.ALLSRC} 2>&1 | \ > > > - tee -a linterrs > > > - > > > # This is a hack. BFD "optimizes" away dynamic mode if there are no > > > # dynamic references. We could probably do a '-Bforcedynamic' mode like > > > # in the a.out ld. For now, this works. > > > @@ -364,9 +359,6 @@ kernel-reinstall: > > > config.o env.o hints.o vers.o vnode_if.o: > > > ${NORMAL_C} > > > ${NORMAL_CTFCONVERT} > > > - > > > -config.ln env.ln hints.ln vers.ln vnode_if.ln: > > > - ${NORMAL_LINT} > > > > > > .if ${MK_REPRODUCIBLE_BUILD} != "no" > > > REPRO_FLAG="-r" > > > > > > Modified: head/sys/conf/kern.pre.mk > > > ============================================================ > > ================== > > > --- head/sys/conf/kern.pre.mk Fri Nov 17 18:00:52 2017 (r325953) > > > +++ head/sys/conf/kern.pre.mk Fri Nov 17 18:16:46 2017 (r325954) > > > @@ -46,7 +46,6 @@ M= ${MACHINE} > > > > > > AWK?= awk > > > CP?= cp > > > -LINT?= lint > > > NM?= nm > > > OBJCOPY?= objcopy > > > SIZE?= size > > > @@ -121,9 +120,6 @@ CFLAGS+= ${CONF_CFLAGS} > > > LDFLAGS+= -Wl,--build-id=sha1 > > > .endif > > > > > > -# Optional linting. This can be overridden in /etc/make.conf. > > > -LINTFLAGS= ${LINTOBJKERNFLAGS} > > > - > > > NORMAL_C= ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.IMPSRC} > > > NORMAL_S= ${CC:N${CCACHE_BIN}} -c ${ASM_CFLAGS} ${WERROR} ${.IMPSRC} > > > PROFILE_C= ${CC} -c ${CFLAGS} ${WERROR} ${.IMPSRC} > > > @@ -175,8 +171,6 @@ NORMAL_CTFCONVERT= > > > .else > > > NORMAL_CTFCONVERT= @: > > > .endif > > > - > > > -NORMAL_LINT= ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC} > > > > > > # Linux Kernel Programming Interface C-flags > > > LINUXKPI_INCLUDES= -I$S/compat/linuxkpi/common/include > > > > > > Modified: head/sys/conf/kmod.mk > > > ============================================================ > > ================== > > > --- head/sys/conf/kmod.mk Fri Nov 17 18:00:52 2017 (r325953) > > > +++ head/sys/conf/kmod.mk Fri Nov 17 18:16:46 2017 (r325954) > > > @@ -469,9 +469,6 @@ genassym.o: ${SRCS:Mopt_*.h} > > > ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c > > > .endif > > > > > > -lint: ${SRCS} > > > - ${LINT} ${LINTKERNFLAGS} ${CFLAGS:M-[DILU]*} ${.ALLSRC:M*.c} > > > - > > > .if defined(KERNBUILDDIR) > > > ${OBJS}: opt_global.h > > > .endif > > > > > > Modified: head/usr.sbin/config/mkmakefile.c > > > ============================================================ > > ================== > > > --- head/usr.sbin/config/mkmakefile.c Fri Nov 17 18:00:52 2017 > > (r325953) > > > +++ head/usr.sbin/config/mkmakefile.c Fri Nov 17 18:16:46 2017 > > (r325954) > > > @@ -690,18 +690,11 @@ do_rules(FILE *f) > > > continue; > > > } > > > if (ftp->f_depends) { > > > - fprintf(f, "%s%sln: $S/%s%c %s\n", > > > - ftp->f_objprefix, tail(np), np, > > och, > > > - ftp->f_depends); > > > - fprintf(f, "\t${NORMAL_LINT}\n\n"); > > > fprintf(f, "%s%so: $S/%s%c %s\n", > > > ftp->f_objprefix, tail(np), np, > > och, > > > ftp->f_depends); > > > } > > > else { > > > - fprintf(f, "%s%sln: $S/%s%c\n", > > > - ftp->f_objprefix, tail(np), np, > > och); > > > - fprintf(f, "\t${NORMAL_LINT}\n\n"); > > > fprintf(f, "%s%so: $S/%s%c\n", > > > ftp->f_objprefix, tail(np), np, > > och); > > > } > > > > > > > > > > -- > > Rod Grimes > > rgrimes@freebsd.org > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sat Nov 18 02:31:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3764BDEAEAB for ; Sat, 18 Nov 2017 02:31:16 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1.freebsd.org (Postfix) with SMTP id 1718A7F520 for ; Sat, 18 Nov 2017 02:31:15 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: (qmail 41562 invoked by uid 99); 18 Nov 2017 02:31:14 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Nov 2017 02:31:14 +0000 Received: from [192.168.0.8] (unknown [186.80.205.98]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 614351A0198; Sat, 18 Nov 2017 02:31:11 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r325954 - in head: . share/mk sys/conf usr.sbin/config From: Pedro Giffuni In-Reply-To: <201711180134.vAI1Y2ks064138@pdx.rh.CN85.dnsmgr.net> Date: Fri, 17 Nov 2017 21:31:06 -0500 Cc: Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <29499AF9-FC0A-4CDA-9657-B092B3F9A0D0@FreeBSD.org> References: <201711180134.vAI1Y2ks064138@pdx.rh.CN85.dnsmgr.net> To: rgrimes@freebsd.org X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 02:31:16 -0000 > On Nov 17, 2017, at 20:34, Rodney W. Grimes = wrote: >=20 > [ Charset UTF-8 unsupported, converting... ] >> Kib@ posted to arch that we were removing it, nobody objected, we = removed >> it. If it was a working feature that might have a few users, that's = one >> thing. But I don't think make lint has actually worked in at least a = decade. >=20 > Thats a sad state of affairs. >=20 t=E2=80=99s not sad, just the way things are, modern compilers are doing = much of the checking older tools like lint used to do.. OpenBSD and = DragonflyBSD both killed lint ages ago. OTOH, we should probably consider other tools, like sparse: https://sparse.wiki.kernel.org/index.php/Main_Page =20 The license is fine and it plays nice with the compiler. >>=20 >> When I try it today, I get dozens of warnings, and several syntax = errors: >>=20 >> types.h(289): syntax error [249] >> nvme.h(79): syntax error [249] >> nvme.h(105): syntax error [249] >> nvme.h(137): syntax error [249] >> nvme.h(160): syntax error [249] >> nvme.h(160): cannot recover from previous errors [224] >>=20 >> since it flags all c99 and newer usages as syntax errors. We've been = using >> c99 for the kernel since about 8.x, and in the base longer than that. = xlint >> hasn't been useful since we started doing this. The types.h change = went in: >> c217b5c12e71 ( mdf 2011-12-12 18:44:17 +0000 289)typedef _Bool = bool; >> which as far as I can make out was between 8.x being branched and 9.x = being >> branched. This feature has therefore been broken for 3 major releases >> without any announcement, or even any bug reports coming in. Not = exactly a >> feature that has an audience that needs to be informed of anything... = While >> I generally agree one should try to follow proper deprecation = process, this >> has been de-facto removed from the source tree for at least 6 years, = and >> likely broken a lot longer than that. At most this deserves a = one-liner in >> the release notes. At most. >>=20 >> So is this about my forgetting to include a "Release Notes: Yes" line = in >> the commit, or something larger? >=20 > Something larger. Just because the src tree use of lint is failing > does not meant that someone out there is not using lint in some > other capacity. The depreication policy is there to notify them > that lint well be removed as a program in the next release. >=20 Where is this policy written? If we have to, my guess is we can announce = the deprecation in 11.2. A policy that would force us to ship xlint in = 12.0 would just be a bad policy. "xlint" is/was an internal development tool not a utility of any = usefulness for non-developers. I would compare it to the disappearance = of the C Preprocessor when we moved to clang, with the significant = difference that the lack of C a preprocessor broke some ports. > Just because FreeBSD's internal use of lint is broken should in > no way relieve us of that obligation and stated policy. >=20 If someone needs it the/she may submit it in the ports tree, like we did = with other stuff that has been deprecated. > People seem to be axing stuff without following this policy, > and without even bothering to do a release notes Y. >=20 So =E2=80=A6 can we remove ctm(1) ? Pedro. >=20 >> Warner >>=20 >> On Fri, Nov 17, 2017 at 11:31 AM, Rodney W. Grimes < >> freebsd@pdx.rh.cn85.dnsmgr.net> wrote: >>=20 >>> TOP post,sorry.... >>>=20 >>>=20 >>> Someone needs to follow up with proper deprication procedures on = lint. >>>=20 >>>=20 >>>> Author: imp >>>> Date: Fri Nov 17 18:16:46 2017 >>>> New Revision: 325954 >>>> URL: https://svnweb.freebsd.org/changeset/base/325954 >>>>=20 >>>> Log: >>>> Remove build system support for lint. >>>>=20 >>>> Differential Revision: https://reviews.freebsd.org/D13124 >>>>=20 >>>> Modified: >>>> head/Makefile >>>> head/share/mk/bsd.README >>>> head/share/mk/bsd.lib.mk >>>> head/share/mk/bsd.own.mk >>>> head/share/mk/bsd.prog.mk >>>> head/share/mk/bsd.subdir.mk >>>> head/share/mk/bsd.suffixes.mk >>>> head/share/mk/sys.mk >>>> head/sys/conf/kern.mk >>>> head/sys/conf/kern.post.mk >>>> head/sys/conf/kern.pre.mk >>>> head/sys/conf/kmod.mk >>>> head/usr.sbin/config/mkmakefile.c >>>>=20 >>>> Modified: head/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/Makefile Fri Nov 17 18:00:52 2017 (r325953) >>>> +++ head/Makefile Fri Nov 17 18:16:46 2017 (r325954) >>>> @@ -129,7 +129,7 @@ TGTS=3D all all-man buildenv buildenvvars >>> buildkernel bu >>>> everything hier hierarchy install installcheck installkernel \ >>>> installkernel.debug packagekernel packageworld \ >>>> reinstallkernel reinstallkernel.debug \ >>>> - installworld kernel-toolchain libraries lint maninstall \ >>>> + installworld kernel-toolchain libraries maninstall \ >>>> obj objlink showconfig tags toolchain update \ >>>> _worldtmp _legacy _bootstrap-tools _cleanobj _obj \ >>>> _build-tools _build-metadata _cross-tools _includes _libraries = \ >>>>=20 >>>> Modified: head/share/mk/bsd.README >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>> --- head/share/mk/bsd.README Fri Nov 17 18:00:52 2017 = (r325953) >>>> +++ head/share/mk/bsd.README Fri Nov 17 18:16:46 2017 = (r325954) >>>> @@ -250,8 +250,6 @@ It has seven targets: >>>> beforeinstall and afterinstall may also be used to = cause >>>> actions immediately before and after the install = target >>>> is executed. >>>> - lint: >>>> - run lint on the source files >>>> tags: >>>> create a tags file for the source files. >>>>=20 >>>> @@ -488,18 +486,17 @@ ${MOD}_oid.h A header which = programmatically >>> describes >>>>=20 >>>> The include file contains the default targets for >>> building >>>> subdirectories. It has the same seven targets as : = all, >>> clean, >>>> -cleandir, depend, install, lint, and tags. For all of the = directories >>>> -listed in the variable SUBDIRS, the specified directory will be = visited >>>> -and the target made. There is also a default target which allows = the >>>> -command "make subdir" where subdir is any directory listed in the >>> variable >>>> -SUBDIRS. >>>> +cleandir, depend, install, and tags. For all of the directories = listed >>> in the >>>> +variable SUBDIRS, the specified directory will be visited and the >>> target made. >>>> +There is also a default target which allows the command "make = subdir" >>> where >>>> +subdir is any directory listed in the variable SUBDIRS. >>>>=20 >>>> =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D= -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- >>> =3D-=3D-=3D-=3D-=3D-=3D-=3D >>>>=20 >>>> -The include file has support for building libraries. = It >>> has >>>> -the same seven targets as : all, clean, cleandir, = depend, >>>> -install, lint, and tags. It has a limited number of suffixes, >>> consistent >>>> -with the current needs of the BSD tree. >>>> +The include file has support for building libraries. = It >>> has the >>>> +same seven targets as : all, clean, cleandir, depend, >>> install, and >>>> +tags. It has a limited number of suffixes, consistent with the = current >>> needs of >>>> +the BSD tree. >>>>=20 >>>> It sets/uses the following variables: >>>>=20 >>>> @@ -530,8 +527,6 @@ LIB_CXX The name of the library to = build. >>> It also cau >>>> will be built. NO_PIC can be set to only build a = static >>>> library. >>>>=20 >>>> -LINTLIBDIR Target directory for lint libraries. >>>> - >>>> MAN The manual pages to be installed. See bsd.man.mk for = more >>>> details. >>>>=20 >>>> @@ -588,8 +583,6 @@ It has seven targets: >>>> targets beforeinstall and afterinstall may also be = used >>>> to cause actions immediately before and after the >>>> install target is executed. >>>> - lint: >>>> - run lint on the source files. >>>> tags: >>>> create a tags file for the source files. >>>>=20 >>>>=20 >>>> Modified: head/share/mk/bsd.lib.mk >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>> --- head/share/mk/bsd.lib.mk Fri Nov 17 18:00:52 2017 = (r325953) >>>> +++ head/share/mk/bsd.lib.mk Fri Nov 17 18:16:46 2017 = (r325954) >>>> @@ -285,18 +285,6 @@ lib${LIB_PRIVATE}${LIB}_pic.a: ${SOBJS} >>>> ${RANLIB} ${RANLIBFLAGS} ${.TARGET} >>>> .endif >>>>=20 >>>> -.if defined(WANT_LINT) && !defined(NO_LINT) && defined(LIB) && >>> !empty(LIB) >>>> -LINTLIB=3D llib-l${LIB}.ln >>>> -_LIBS+=3D ${LINTLIB} >>>> -LINTOBJS+=3D ${SRCS:M*.c:.c=3D.ln} >>>> -CLEANFILES+=3D ${LINTOBJS} >>>> - >>>> -${LINTLIB}: ${LINTOBJS} >>>> - @${ECHO} building lint library ${.TARGET} >>>> - @rm -f ${.TARGET} >>>> - ${LINT} ${LINTLIBFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC} >>>> -.endif >>>> - >>>> .endif # !defined(INTERNALLIB) >>>>=20 >>>> .if defined(_SKIP_BUILD) >>>> @@ -403,10 +391,6 @@ _libinstall: >>>> ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -o ${LIBOWN} = -g >>> ${LIBGRP} -m ${LIBMODE} \ >>>> ${_INSTALLFLAGS} lib${LIB}_pic.a ${DESTDIR}${_LIBDIR}/ >>>> .endif >>>> -.if defined(WANT_LINT) && !defined(NO_LINT) && defined(LIB) && >>> !empty(LIB) >>>> - ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -o ${LIBOWN} = -g >>> ${LIBGRP} -m ${LIBMODE} \ >>>> - ${_INSTALLFLAGS} ${LINTLIB} ${DESTDIR}${LINTLIBDIR}/ >>>> -.endif >>>> .endif # !defined(INTERNALLIB) >>>>=20 >>>> .if !defined(LIBRARIES_ONLY) >>>> @@ -423,11 +407,6 @@ realinstall: maninstall >>>> .ORDER: beforeinstall maninstall >>>> .endif >>>>=20 >>>> -.endif >>>> - >>>> -.if !target(lint) >>>> -lint: ${SRCS:M*.c} >>>> - ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC} >>>> .endif >>>>=20 >>>> .if ${MK_MAN} !=3D "no" && !defined(LIBRARIES_ONLY) >>>>=20 >>>> Modified: head/share/mk/bsd.own.mk >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>> --- head/share/mk/bsd.own.mk Fri Nov 17 18:00:52 2017 = (r325953) >>>> +++ head/share/mk/bsd.own.mk Fri Nov 17 18:16:46 2017 = (r325954) >>>> @@ -32,8 +32,6 @@ >>>> # >>>> # LIBEXECDIR Base path for system daemons and utilities. = [/usr/libexec] >>>> # >>>> -# LINTLIBDIR Base path for lint libraries. [/usr/libdata/lint] >>>> -# >>>> # SHLIBDIR Base path for shared libraries. [${LIBDIR}] >>>> # >>>> # LIBOWN Library owner. [${BINOWN}] >>>> @@ -162,7 +160,6 @@ LIBDIR?=3D ${LIBDIR_BASE} >>>> LIBCOMPATDIR?=3D /usr/lib/compat >>>> LIBDATADIR?=3D /usr/libdata >>>> LIBEXECDIR?=3D /usr/libexec >>>> -LINTLIBDIR?=3D /usr/libdata/lint >>>> SHLIBDIR?=3D ${LIBDIR} >>>> LIBOWN?=3D ${BINOWN} >>>> LIBGRP?=3D ${BINGRP} >>>>=20 >>>> Modified: head/share/mk/bsd.prog.mk >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>> --- head/share/mk/bsd.prog.mk Fri Nov 17 18:00:52 2017 = (r325953) >>>> +++ head/share/mk/bsd.prog.mk Fri Nov 17 18:16:46 2017 = (r325954) >>>> @@ -294,13 +294,6 @@ realinstall: maninstall >>>>=20 >>>> .endif # !target(install) >>>>=20 >>>> -.if !target(lint) >>>> -lint: ${SRCS:M*.c} >>>> -.if defined(PROG) >>>> - ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC} >>>> -.endif >>>> -.endif >>>> - >>>> .if ${MK_MAN} !=3D "no" >>>> .include >>>> .endif >>>>=20 >>>> Modified: head/share/mk/bsd.subdir.mk >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>> --- head/share/mk/bsd.subdir.mk Fri Nov 17 18:00:52 2017 >>> (r325953) >>>> +++ head/share/mk/bsd.subdir.mk Fri Nov 17 18:16:46 2017 >>> (r325954) >>>> @@ -46,7 +46,7 @@ SUBDIR_TARGETS+=3D \ >>>> all all-man analyze buildconfig buildfiles = buildincludes \ >>>> checkdpadd clean cleandepend cleandir cleanilinks \ >>>> cleanobj depend distribute files includes = installconfig \ >>>> - installfiles installincludes print-dir realinstall = lint \ >>>> + installfiles installincludes print-dir realinstall \ >>>> maninstall manlint ${_obj} objlink tags \ >>>>=20 >>>> # Described above. >>>>=20 >>>> Modified: head/share/mk/bsd.suffixes.mk >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>> --- head/share/mk/bsd.suffixes.mk Fri Nov 17 18:00:52 2017 >>> (r325953) >>>> +++ head/share/mk/bsd.suffixes.mk Fri Nov 17 18:16:46 2017 >>> (r325954) >>>> @@ -4,14 +4,6 @@ >>>> cp -f ${.IMPSRC} ${.TARGET} >>>> chmod a+x ${.TARGET} >>>>=20 >>>> -.c.ln: >>>> - ${LINT} ${LINTOBJFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC} || \ >>>> - touch ${.TARGET} >>>> - >>>> -.cc.ln .C.ln .cpp.ln .cxx.ln: >>>> - ${LINT} ${LINTOBJFLAGS} ${CXXFLAGS:M-[DIU]*} ${.IMPSRC} || \ >>>> - touch ${.TARGET} >>>> - >>>> .c: >>>> ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} >>>> ${CTFCONVERT_CMD} >>>>=20 >>>> Modified: head/share/mk/sys.mk >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>> --- head/share/mk/sys.mk Fri Nov 17 18:00:52 2017 = (r325953) >>>> +++ head/share/mk/sys.mk Fri Nov 17 18:16:46 2017 = (r325954) >>>> @@ -142,7 +142,7 @@ NO_META_IGNORE_HOST_HEADERS=3D 1 >>>> .if defined(%POSIX) >>>> .SUFFIXES: .o .c .y .l .a .sh .f >>>> .else >>>> -.SUFFIXES: .out .a .ln .o .bco .llo .c .cc .cpp .cxx .C .m .F .f = .e >>> .r .y .l .S .asm .s .cl .p .h .sh >>>> +.SUFFIXES: .out .a .o .bco .llo .c .cc .cpp .cxx .C .m .F .f .e = .r .y >>> .l .S .asm .s .cl .p .h .sh >>>> .endif >>>>=20 >>>> AR ?=3D ar >>>> @@ -244,13 +244,6 @@ LFLAGS ?=3D >>>> LD ?=3D ld >>>> LDFLAGS ?=3D >>>> _LDFLAGS =3D ${LDFLAGS:S/-Wl,//g:N-mabi=3D*:N-fuse-ld=3D*} >>>> - >>>> -LINT ?=3D lint >>>> -LINTFLAGS ?=3D -cghapbx >>>> -LINTKERNFLAGS ?=3D ${LINTFLAGS} >>>> -LINTOBJFLAGS ?=3D -cghapbxu -i >>>> -LINTOBJKERNFLAGS?=3D ${LINTOBJFLAGS} >>>> -LINTLIBFLAGS ?=3D -cghapbxu -C ${LIB} >>>>=20 >>>> MAKE ?=3D make >>>>=20 >>>>=20 >>>> Modified: head/sys/conf/kern.mk >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>> --- head/sys/conf/kern.mk Fri Nov 17 18:00:52 2017 = (r325953) >>>> +++ head/sys/conf/kern.mk Fri Nov 17 18:16:46 2017 = (r325954) >>>> @@ -228,7 +228,7 @@ PHONY_NOTMAIN =3D afterdepend afterinstall all >>> beforedep >>>> beforelinking build build-tools buildfiles = buildincludes \ >>>> checkdpadd clean cleandepend cleandir cleanobj = configure \ >>>> depend distclean distribute exe \ >>>> - html includes install installfiles installincludes = lint \ >>>> + html includes install installfiles installincludes \ >>>> obj objlink objs objwarn \ >>>> realinstall regress \ >>>> tags whereobj >>>>=20 >>>> Modified: head/sys/conf/kern.post.mk >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>> --- head/sys/conf/kern.post.mk Fri Nov 17 18:00:52 2017 >>> (r325953) >>>> +++ head/sys/conf/kern.post.mk Fri Nov 17 18:16:46 2017 >>> (r325954) >>>> @@ -153,7 +153,6 @@ ${FULLKERNEL}: ${SYSTEM_DEP} vers.o >>>>=20 >>>> OBJS_DEPEND_GUESS+=3D assym.s vnode_if.h ${BEFORE_DEPEND:M*.h} \ >>>> ${MFILES:T:S/.m$/.h/} >>>> -LNFILES=3D ${CFILES:T:S/.c$/.ln/} >>>>=20 >>>> .for mfile in ${MFILES} >>>> # XXX the low quality .m.o rules gnerated by config are normally = used >>>> @@ -167,15 +166,11 @@ ${mfile:T:S/.m$/.h/}: ${mfile} >>>> kernel-clean: >>>> rm -f *.o *.so *.pico *.ko *.s eddep errs \ >>>> ${FULLKERNEL} ${KERNEL_KO} ${KERNEL_KO}.debug \ >>>> - linterrs tags vers.c \ >>>> + tags vers.c \ >>>> vnode_if.c vnode_if.h vnode_if_newproto.h = vnode_if_typedef.h \ >>>> ${MFILES:T:S/.m$/.c/} ${MFILES:T:S/.m$/.h/} \ >>>> ${CLEAN} >>>>=20 >>>> -lint: ${LNFILES} >>>> - ${LINT} ${LINTKERNFLAGS} ${CFLAGS:M-[DILU]*} ${.ALLSRC} 2>&1 = | \ >>>> - tee -a linterrs >>>> - >>>> # This is a hack. BFD "optimizes" away dynamic mode if there are = no >>>> # dynamic references. We could probably do a '-Bforcedynamic' mode = like >>>> # in the a.out ld. For now, this works. >>>> @@ -364,9 +359,6 @@ kernel-reinstall: >>>> config.o env.o hints.o vers.o vnode_if.o: >>>> ${NORMAL_C} >>>> ${NORMAL_CTFCONVERT} >>>> - >>>> -config.ln env.ln hints.ln vers.ln vnode_if.ln: >>>> - ${NORMAL_LINT} >>>>=20 >>>> .if ${MK_REPRODUCIBLE_BUILD} !=3D "no" >>>> REPRO_FLAG=3D"-r" >>>>=20 >>>> Modified: head/sys/conf/kern.pre.mk >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>> --- head/sys/conf/kern.pre.mk Fri Nov 17 18:00:52 2017 = (r325953) >>>> +++ head/sys/conf/kern.pre.mk Fri Nov 17 18:16:46 2017 = (r325954) >>>> @@ -46,7 +46,6 @@ M=3D ${MACHINE} >>>>=20 >>>> AWK?=3D awk >>>> CP?=3D cp >>>> -LINT?=3D lint >>>> NM?=3D nm >>>> OBJCOPY?=3D objcopy >>>> SIZE?=3D size >>>> @@ -121,9 +120,6 @@ CFLAGS+=3D ${CONF_CFLAGS} >>>> LDFLAGS+=3D -Wl,--build-id=3Dsha1 >>>> .endif >>>>=20 >>>> -# Optional linting. This can be overridden in /etc/make.conf. >>>> -LINTFLAGS=3D ${LINTOBJKERNFLAGS} >>>> - >>>> NORMAL_C=3D ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.IMPSRC} >>>> NORMAL_S=3D ${CC:N${CCACHE_BIN}} -c ${ASM_CFLAGS} ${WERROR} = ${.IMPSRC} >>>> PROFILE_C=3D ${CC} -c ${CFLAGS} ${WERROR} ${.IMPSRC} >>>> @@ -175,8 +171,6 @@ NORMAL_CTFCONVERT=3D >>>> .else >>>> NORMAL_CTFCONVERT=3D @: >>>> .endif >>>> - >>>> -NORMAL_LINT=3D ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC} >>>>=20 >>>> # Linux Kernel Programming Interface C-flags >>>> LINUXKPI_INCLUDES=3D -I$S/compat/linuxkpi/common/include >>>>=20 >>>> Modified: head/sys/conf/kmod.mk >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>> --- head/sys/conf/kmod.mk Fri Nov 17 18:00:52 2017 = (r325953) >>>> +++ head/sys/conf/kmod.mk Fri Nov 17 18:16:46 2017 = (r325954) >>>> @@ -469,9 +469,6 @@ genassym.o: ${SRCS:Mopt_*.h} >>>> ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c >>>> .endif >>>>=20 >>>> -lint: ${SRCS} >>>> - ${LINT} ${LINTKERNFLAGS} ${CFLAGS:M-[DILU]*} ${.ALLSRC:M*.c} >>>> - >>>> .if defined(KERNBUILDDIR) >>>> ${OBJS}: opt_global.h >>>> .endif >>>>=20 >>>> Modified: head/usr.sbin/config/mkmakefile.c >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>> --- head/usr.sbin/config/mkmakefile.c Fri Nov 17 18:00:52 2017 >>> (r325953) >>>> +++ head/usr.sbin/config/mkmakefile.c Fri Nov 17 18:16:46 2017 >>> (r325954) >>>> @@ -690,18 +690,11 @@ do_rules(FILE *f) >>>> continue; >>>> } >>>> if (ftp->f_depends) { >>>> - fprintf(f, "%s%sln: $S/%s%c %s\n", >>>> - ftp->f_objprefix, tail(np), = np, >>> och, >>>> - ftp->f_depends); >>>> - fprintf(f, "\t${NORMAL_LINT}\n\n"); >>>> fprintf(f, "%s%so: $S/%s%c %s\n", >>>> ftp->f_objprefix, tail(np), = np, >>> och, >>>> ftp->f_depends); >>>> } >>>> else { >>>> - fprintf(f, "%s%sln: $S/%s%c\n", >>>> - ftp->f_objprefix, tail(np), = np, >>> och); >>>> - fprintf(f, "\t${NORMAL_LINT}\n\n"); >>>> fprintf(f, "%s%so: $S/%s%c\n", >>>> ftp->f_objprefix, tail(np), = np, >>> och); >>>> } >>>>=20 >>>>=20 >>>=20 >>> -- >>> Rod Grimes >>> rgrimes@freebsd.org >>>=20 >=20 > --=20 > Rod Grimes = rgrimes@freebsd.org >=20 From owner-svn-src-head@freebsd.org Sat Nov 18 04:37:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E3C0DEDAAA for ; Sat, 18 Nov 2017 04:37:38 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-123.reflexion.net [208.70.210.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E816631EB for ; Sat, 18 Nov 2017 04:37:37 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 11813 invoked from network); 18 Nov 2017 04:30:50 -0000 Received: from unknown (HELO mail-cs-01.app.dca.reflexion.local) (10.81.19.1) by 0 (rfx-qmail) with SMTP; 18 Nov 2017 04:30:50 -0000 Received: by mail-cs-01.app.dca.reflexion.local (Reflexion email security v8.40.3) with SMTP; Fri, 17 Nov 2017 23:30:50 -0500 (EST) Received: (qmail 16066 invoked from network); 18 Nov 2017 04:30:50 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 18 Nov 2017 04:30:50 -0000 Received: from [192.168.1.25] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 6A8FBEC8014 for ; Fri, 17 Nov 2017 20:30:49 -0800 (PST) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r325954 - in head: . share/mk sys/conf usr.sbin/config Message-Id: <8A0025DA-D555-428D-87E0-322E03F0FA4D@dsl-only.net> Date: Fri, 17 Nov 2017 20:30:48 -0800 To: svn-src-head@freebsd.org X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 04:37:38 -0000 Pedro Giffuni pfg at FreeBSD.org wrote on Sat Nov 18 02:31:16 UTC 2017 : . . . > I would compare it to the disappearance of the C Preprocessor when we = moved to clang, with the significant difference that the lack of C a = preprocessor broke some ports. . . . Bad example? # ls -lT /usr/bin/cc /usr/bin/c++ /usr/bin/cpp -r-xr-xr-x 6 root wheel 61565232 Nov 10 17:53:16 2017 /usr/bin/c++ -r-xr-xr-x 6 root wheel 61565232 Nov 10 17:53:16 2017 /usr/bin/cc -r-xr-xr-x 6 root wheel 61565232 Nov 10 17:53:16 2017 /usr/bin/cpp # ls -lT /usr/bin/clang* -r-xr-xr-x 6 root wheel 61565232 Nov 10 17:53:16 2017 /usr/bin/clang -r-xr-xr-x 6 root wheel 61565232 Nov 10 17:53:16 2017 = /usr/bin/clang++ -r-xr-xr-x 6 root wheel 61565232 Nov 10 17:53:16 2017 = /usr/bin/clang-cpp -r-xr-xr-x 1 root wheel 1857624 Nov 10 17:53:18 2017 = /usr/bin/clang-format -r-xr-xr-x 1 root wheel 928016 Nov 10 17:53:15 2017 = /usr/bin/clang-tblgen # cpp --version FreeBSD clang version 5.0.0 (tags/RELEASE_500/final 312559) (based on = LLVM 5.0.0svn) Target: x86_64-unknown-freebsd12.0 Thread model: posix InstalledDir: /usr/bin # uname -apKU FreeBSD FreeBSDx64OPC 12.0-CURRENT FreeBSD 12.0-CURRENT r325700M amd64 = amd64 1200053 1200053 =3D=3D=3D Mark Millard markmi at sl-only.net From owner-svn-src-head@freebsd.org Sat Nov 18 05:48:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58A45DEF72C for ; Sat, 18 Nov 2017 05:48:46 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x234.google.com (mail-io0-x234.google.com [IPv6:2607:f8b0:4001:c06::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 11D2C64315 for ; Sat, 18 Nov 2017 05:48:46 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x234.google.com with SMTP id x63so10859239ioe.6 for ; Fri, 17 Nov 2017 21:48:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=0RnXSO7cworHQfBVqz+Ciowdlm/neN9iJSXS3z+5LQc=; b=Zd0BP8keu28s7s513Vxx85/X+en1BZUaojPso9ypsZVnSPYrhpMfRCz5DFwLEegmt8 OzLoAmUyyX3qZCixlKSmxtGXQfcqBYbZA2ijLuBPe9tPSv3jNcm/tYipthNzv8F9dT6c 0qLwYV8+Xfc26bUphx0t2BYqCJpckFK7l3L3U12hn+QJrOm3GvPMixKgKHJ34/+WaecC DxxYVfKwoHx8V6pvZoycpa4aL9jHlQQ5b1boaton6CG9qZnexrna8zv7DqGhESUAIgp2 Mki2fjfm39OrSBKbaGqThyy5Qsgf0R6Gc4D09a26ZGrmcwVBWw1cDFrpyTe+HNYUnbCD nkrg== 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=0RnXSO7cworHQfBVqz+Ciowdlm/neN9iJSXS3z+5LQc=; b=dkdG+s8iQ+hF//vk6QvUJtRU7QZ7vIc3kN+YwLoWgRItyJTIRCEliLumvW/rzSs0NE J5AEzOIYKYttrfqOXKnwos4lcGcfrKgJUgLvjbJ7m1nap+1Ig1D7z3KbAp5w5FaQg78v 8o+93n+iWQZT3icMQdgF+/oNB0dazSCVtt8LOXoiCHA4iuD6ukaWob/FbJ6rLLgDJ2/7 TiFLHGn7iQhkuqVHIzSej/jB6DfpVqGqp2D25NoR1YdJ0eUdOqTdpYmmqohswk6o6l+B dZ9tQVJfBHeWe6fIXbCe1/ez/CAxOCQV/bcEosKtNtqc3An6N7rbiQKtcmIfOqLYdYSk fRnQ== X-Gm-Message-State: AJaThX5hqXaL53pGjlfVHnSTeSuYSCIxiHyPtiLegUBGU1qM9M0/zz1Z VZnRDCBHhG66HxsLR8VQLLmvw/cUt9aC7inmCzKtvA== X-Google-Smtp-Source: AGs4zMbsRkiwVmxESpD2LiYWKhHwIMS+pf7Atlr0ryp+YzYSIdWjXsMIRRfra29xalrpIyKtcbs6QnyLgqFC7/msEoE= X-Received: by 10.107.52.80 with SMTP id b77mr6036347ioa.291.1510984125155; Fri, 17 Nov 2017 21:48:45 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Fri, 17 Nov 2017 21:48:44 -0800 (PST) X-Originating-IP: [2603:300b:6:5100:d59a:59a:dd99:c18d] In-Reply-To: <201711180134.vAI1Y2ks064138@pdx.rh.CN85.dnsmgr.net> References: <201711180134.vAI1Y2ks064138@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Fri, 17 Nov 2017 22:48:44 -0700 X-Google-Sender-Auth: Ligsh4AAw8WoMWKv-E80QtLbmKA Message-ID: Subject: Re: svn commit: r325954 - in head: . share/mk sys/conf usr.sbin/config To: "Rodney W. Grimes" Cc: Warner Losh , 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.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 05:48:46 -0000 On Fri, Nov 17, 2017 at 6:34 PM, Rodney W. Grimes < freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > [ Charset UTF-8 unsupported, converting... ] > > Kib@ posted to arch that we were removing it, nobody objected, we > removed > > it. If it was a working feature that might have a few users, that's one > > thing. But I don't think make lint has actually worked in at least a > decade. > > Thats a sad state of affairs. Indeed. > When I try it today, I get dozens of warnings, and several syntax errors: > > > > types.h(289): syntax error [249] > > nvme.h(79): syntax error [249] > > nvme.h(105): syntax error [249] > > nvme.h(137): syntax error [249] > > nvme.h(160): syntax error [249] > > nvme.h(160): cannot recover from previous errors [224] > > > > since it flags all c99 and newer usages as syntax errors. We've been > using > > c99 for the kernel since about 8.x, and in the base longer than that. > xlint > > hasn't been useful since we started doing this. The types.h change went > in: > > c217b5c12e71 ( mdf 2011-12-12 18:44:17 +0000 289)typedef _Bool > bool; > > which as far as I can make out was between 8.x being branched and 9.x > being > > branched. This feature has therefore been broken for 3 major releases > > without any announcement, or even any bug reports coming in. Not exactly > a > > feature that has an audience that needs to be informed of anything... > While > > I generally agree one should try to follow proper deprecation process, > this > > has been de-facto removed from the source tree for at least 6 years, and > > likely broken a lot longer than that. At most this deserves a one-liner > in > > the release notes. At most. > > > > So is this about my forgetting to include a "Release Notes: Yes" line in > > the commit, or something larger? > > Something larger. Just because the src tree use of lint is failing > does not meant that someone out there is not using lint in some > other capacity. The depreication policy is there to notify them > that lint well be removed as a program in the next release. > Without a working sys/types.h, nothing non-trivial will work. > Just because FreeBSD's internal use of lint is broken should in > no way relieve us of that obligation and stated policy. > The policy exists to help our users. I'm under no obligation to blindly follow a policy that produces no benefit. > People seem to be axing stuff without following this policy, > and without even bothering to do a release notes Y. Lint is totally totally broken. It's a rotting corpse that needs to be just gone. Since it has been totally broken for several major releases, I see no benefit from doing anything more than moving forward with removal of the parts that died years ago. Were this a feature that was still working, or even barely working, I might feel differently. But even if lint was still working, it is no longer relevant, and hasn't been in a very long time. Taken together, I fail to see any value in doing more than removing it. Warner > > Warner > > > > On Fri, Nov 17, 2017 at 11:31 AM, Rodney W. Grimes < > > freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > > > > > TOP post,sorry.... > > > > > > > > > Someone needs to follow up with proper deprication procedures on lint. > > > > > > > > > > Author: imp > > > > Date: Fri Nov 17 18:16:46 2017 > > > > New Revision: 325954 > > > > URL: https://svnweb.freebsd.org/changeset/base/325954 > > > > > > > > Log: > > > > Remove build system support for lint. > > > > > > > > Differential Revision: https://reviews.freebsd.org/D13124 > > > > > > > > Modified: > > > > head/Makefile > > > > head/share/mk/bsd.README > > > > head/share/mk/bsd.lib.mk > > > > head/share/mk/bsd.own.mk > > > > head/share/mk/bsd.prog.mk > > > > head/share/mk/bsd.subdir.mk > > > > head/share/mk/bsd.suffixes.mk > > > > head/share/mk/sys.mk > > > > head/sys/conf/kern.mk > > > > head/sys/conf/kern.post.mk > > > > head/sys/conf/kern.pre.mk > > > > head/sys/conf/kmod.mk > > > > head/usr.sbin/config/mkmakefile.c > > > > > > > > Modified: head/Makefile > > > > ============================================================ > > > ================== > > > > --- head/Makefile Fri Nov 17 18:00:52 2017 (r325953) > > > > +++ head/Makefile Fri Nov 17 18:16:46 2017 (r325954) > > > > @@ -129,7 +129,7 @@ TGTS= all all-man buildenv buildenvvars > > > buildkernel bu > > > > everything hier hierarchy install installcheck installkernel \ > > > > installkernel.debug packagekernel packageworld \ > > > > reinstallkernel reinstallkernel.debug \ > > > > - installworld kernel-toolchain libraries lint maninstall \ > > > > + installworld kernel-toolchain libraries maninstall \ > > > > obj objlink showconfig tags toolchain update \ > > > > _worldtmp _legacy _bootstrap-tools _cleanobj _obj \ > > > > _build-tools _build-metadata _cross-tools _includes _libraries > \ > > > > > > > > Modified: head/share/mk/bsd.README > > > > ============================================================ > > > ================== > > > > --- head/share/mk/bsd.README Fri Nov 17 18:00:52 2017 > (r325953) > > > > +++ head/share/mk/bsd.README Fri Nov 17 18:16:46 2017 > (r325954) > > > > @@ -250,8 +250,6 @@ It has seven targets: > > > > beforeinstall and afterinstall may also be used to > cause > > > > actions immediately before and after the install target > > > > is executed. > > > > - lint: > > > > - run lint on the source files > > > > tags: > > > > create a tags file for the source files. > > > > > > > > @@ -488,18 +486,17 @@ ${MOD}_oid.h A header which programmatically > > > describes > > > > > > > > The include file contains the default targets for > > > building > > > > subdirectories. It has the same seven targets as : > all, > > > clean, > > > > -cleandir, depend, install, lint, and tags. For all of the > directories > > > > -listed in the variable SUBDIRS, the specified directory will be > visited > > > > -and the target made. There is also a default target which allows > the > > > > -command "make subdir" where subdir is any directory listed in the > > > variable > > > > -SUBDIRS. > > > > +cleandir, depend, install, and tags. For all of the directories > listed > > > in the > > > > +variable SUBDIRS, the specified directory will be visited and the > > > target made. > > > > +There is also a default target which allows the command "make > subdir" > > > where > > > > +subdir is any directory listed in the variable SUBDIRS. > > > > > > > > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > > > =-=-=-=-=-=-= > > > > > > > > -The include file has support for building libraries. > It > > > has > > > > -the same seven targets as : all, clean, cleandir, > depend, > > > > -install, lint, and tags. It has a limited number of suffixes, > > > consistent > > > > -with the current needs of the BSD tree. > > > > +The include file has support for building libraries. > It > > > has the > > > > +same seven targets as : all, clean, cleandir, depend, > > > install, and > > > > +tags. It has a limited number of suffixes, consistent with the > current > > > needs of > > > > +the BSD tree. > > > > > > > > It sets/uses the following variables: > > > > > > > > @@ -530,8 +527,6 @@ LIB_CXX The name of the library to > build. > > > It also cau > > > > will be built. NO_PIC can be set to only build a > static > > > > library. > > > > > > > > -LINTLIBDIR Target directory for lint libraries. > > > > - > > > > MAN The manual pages to be installed. See bsd.man.mk for > more > > > > details. > > > > > > > > @@ -588,8 +583,6 @@ It has seven targets: > > > > targets beforeinstall and afterinstall may also be > used > > > > to cause actions immediately before and after the > > > > install target is executed. > > > > - lint: > > > > - run lint on the source files. > > > > tags: > > > > create a tags file for the source files. > > > > > > > > > > > > Modified: head/share/mk/bsd.lib.mk > > > > ============================================================ > > > ================== > > > > --- head/share/mk/bsd.lib.mk Fri Nov 17 18:00:52 2017 > (r325953) > > > > +++ head/share/mk/bsd.lib.mk Fri Nov 17 18:16:46 2017 > (r325954) > > > > @@ -285,18 +285,6 @@ lib${LIB_PRIVATE}${LIB}_pic.a: ${SOBJS} > > > > ${RANLIB} ${RANLIBFLAGS} ${.TARGET} > > > > .endif > > > > > > > > -.if defined(WANT_LINT) && !defined(NO_LINT) && defined(LIB) && > > > !empty(LIB) > > > > -LINTLIB= llib-l${LIB}.ln > > > > -_LIBS+= ${LINTLIB} > > > > -LINTOBJS+= ${SRCS:M*.c:.c=.ln} > > > > -CLEANFILES+= ${LINTOBJS} > > > > - > > > > -${LINTLIB}: ${LINTOBJS} > > > > - @${ECHO} building lint library ${.TARGET} > > > > - @rm -f ${.TARGET} > > > > - ${LINT} ${LINTLIBFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC} > > > > -.endif > > > > - > > > > .endif # !defined(INTERNALLIB) > > > > > > > > .if defined(_SKIP_BUILD) > > > > @@ -403,10 +391,6 @@ _libinstall: > > > > ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -o ${LIBOWN} > -g > > > ${LIBGRP} -m ${LIBMODE} \ > > > > ${_INSTALLFLAGS} lib${LIB}_pic.a ${DESTDIR}${_LIBDIR}/ > > > > .endif > > > > -.if defined(WANT_LINT) && !defined(NO_LINT) && defined(LIB) && > > > !empty(LIB) > > > > - ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -o ${LIBOWN} > -g > > > ${LIBGRP} -m ${LIBMODE} \ > > > > - ${_INSTALLFLAGS} ${LINTLIB} ${DESTDIR}${LINTLIBDIR}/ > > > > -.endif > > > > .endif # !defined(INTERNALLIB) > > > > > > > > .if !defined(LIBRARIES_ONLY) > > > > @@ -423,11 +407,6 @@ realinstall: maninstall > > > > .ORDER: beforeinstall maninstall > > > > .endif > > > > > > > > -.endif > > > > - > > > > -.if !target(lint) > > > > -lint: ${SRCS:M*.c} > > > > - ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC} > > > > .endif > > > > > > > > .if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY) > > > > > > > > Modified: head/share/mk/bsd.own.mk > > > > ============================================================ > > > ================== > > > > --- head/share/mk/bsd.own.mk Fri Nov 17 18:00:52 2017 > (r325953) > > > > +++ head/share/mk/bsd.own.mk Fri Nov 17 18:16:46 2017 > (r325954) > > > > @@ -32,8 +32,6 @@ > > > > # > > > > # LIBEXECDIR Base path for system daemons and utilities. > [/usr/libexec] > > > > # > > > > -# LINTLIBDIR Base path for lint libraries. [/usr/libdata/lint] > > > > -# > > > > # SHLIBDIR Base path for shared libraries. [${LIBDIR}] > > > > # > > > > # LIBOWN Library owner. [${BINOWN}] > > > > @@ -162,7 +160,6 @@ LIBDIR?= ${LIBDIR_BASE} > > > > LIBCOMPATDIR?= /usr/lib/compat > > > > LIBDATADIR?= /usr/libdata > > > > LIBEXECDIR?= /usr/libexec > > > > -LINTLIBDIR?= /usr/libdata/lint > > > > SHLIBDIR?= ${LIBDIR} > > > > LIBOWN?= ${BINOWN} > > > > LIBGRP?= ${BINGRP} > > > > > > > > Modified: head/share/mk/bsd.prog.mk > > > > ============================================================ > > > ================== > > > > --- head/share/mk/bsd.prog.mk Fri Nov 17 18:00:52 2017 > (r325953) > > > > +++ head/share/mk/bsd.prog.mk Fri Nov 17 18:16:46 2017 > (r325954) > > > > @@ -294,13 +294,6 @@ realinstall: maninstall > > > > > > > > .endif # !target(install) > > > > > > > > -.if !target(lint) > > > > -lint: ${SRCS:M*.c} > > > > -.if defined(PROG) > > > > - ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC} > > > > -.endif > > > > -.endif > > > > - > > > > .if ${MK_MAN} != "no" > > > > .include > > > > .endif > > > > > > > > Modified: head/share/mk/bsd.subdir.mk > > > > ============================================================ > > > ================== > > > > --- head/share/mk/bsd.subdir.mk Fri Nov 17 18:00:52 2017 > > > (r325953) > > > > +++ head/share/mk/bsd.subdir.mk Fri Nov 17 18:16:46 2017 > > > (r325954) > > > > @@ -46,7 +46,7 @@ SUBDIR_TARGETS+= \ > > > > all all-man analyze buildconfig buildfiles > buildincludes \ > > > > checkdpadd clean cleandepend cleandir cleanilinks \ > > > > cleanobj depend distribute files includes > installconfig \ > > > > - installfiles installincludes print-dir realinstall > lint \ > > > > + installfiles installincludes print-dir realinstall \ > > > > maninstall manlint ${_obj} objlink tags \ > > > > > > > > # Described above. > > > > > > > > Modified: head/share/mk/bsd.suffixes.mk > > > > ============================================================ > > > ================== > > > > --- head/share/mk/bsd.suffixes.mk Fri Nov 17 18:00:52 2017 > > > (r325953) > > > > +++ head/share/mk/bsd.suffixes.mk Fri Nov 17 18:16:46 2017 > > > (r325954) > > > > @@ -4,14 +4,6 @@ > > > > cp -f ${.IMPSRC} ${.TARGET} > > > > chmod a+x ${.TARGET} > > > > > > > > -.c.ln: > > > > - ${LINT} ${LINTOBJFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC} || \ > > > > - touch ${.TARGET} > > > > - > > > > -.cc.ln .C.ln .cpp.ln .cxx.ln: > > > > - ${LINT} ${LINTOBJFLAGS} ${CXXFLAGS:M-[DIU]*} ${.IMPSRC} || \ > > > > - touch ${.TARGET} > > > > - > > > > .c: > > > > ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} > > > > ${CTFCONVERT_CMD} > > > > > > > > Modified: head/share/mk/sys.mk > > > > ============================================================ > > > ================== > > > > --- head/share/mk/sys.mk Fri Nov 17 18:00:52 2017 > (r325953) > > > > +++ head/share/mk/sys.mk Fri Nov 17 18:16:46 2017 > (r325954) > > > > @@ -142,7 +142,7 @@ NO_META_IGNORE_HOST_HEADERS= 1 > > > > .if defined(%POSIX) > > > > .SUFFIXES: .o .c .y .l .a .sh .f > > > > .else > > > > -.SUFFIXES: .out .a .ln .o .bco .llo .c .cc .cpp .cxx .C .m .F .f > .e > > > .r .y .l .S .asm .s .cl .p .h .sh > > > > +.SUFFIXES: .out .a .o .bco .llo .c .cc .cpp .cxx .C .m .F .f .e > .r .y > > > .l .S .asm .s .cl .p .h .sh > > > > .endif > > > > > > > > AR ?= ar > > > > @@ -244,13 +244,6 @@ LFLAGS ?= > > > > LD ?= ld > > > > LDFLAGS ?= > > > > _LDFLAGS = ${LDFLAGS:S/-Wl,//g:N-mabi=*:N-fuse-ld=*} > > > > - > > > > -LINT ?= lint > > > > -LINTFLAGS ?= -cghapbx > > > > -LINTKERNFLAGS ?= ${LINTFLAGS} > > > > -LINTOBJFLAGS ?= -cghapbxu -i > > > > -LINTOBJKERNFLAGS?= ${LINTOBJFLAGS} > > > > -LINTLIBFLAGS ?= -cghapbxu -C ${LIB} > > > > > > > > MAKE ?= make > > > > > > > > > > > > Modified: head/sys/conf/kern.mk > > > > ============================================================ > > > ================== > > > > --- head/sys/conf/kern.mk Fri Nov 17 18:00:52 2017 > (r325953) > > > > +++ head/sys/conf/kern.mk Fri Nov 17 18:16:46 2017 > (r325954) > > > > @@ -228,7 +228,7 @@ PHONY_NOTMAIN = afterdepend afterinstall all > > > beforedep > > > > beforelinking build build-tools buildfiles > buildincludes \ > > > > checkdpadd clean cleandepend cleandir cleanobj > configure \ > > > > depend distclean distribute exe \ > > > > - html includes install installfiles installincludes > lint \ > > > > + html includes install installfiles installincludes \ > > > > obj objlink objs objwarn \ > > > > realinstall regress \ > > > > tags whereobj > > > > > > > > Modified: head/sys/conf/kern.post.mk > > > > ============================================================ > > > ================== > > > > --- head/sys/conf/kern.post.mk Fri Nov 17 18:00:52 2017 > > > (r325953) > > > > +++ head/sys/conf/kern.post.mk Fri Nov 17 18:16:46 2017 > > > (r325954) > > > > @@ -153,7 +153,6 @@ ${FULLKERNEL}: ${SYSTEM_DEP} vers.o > > > > > > > > OBJS_DEPEND_GUESS+= assym.s vnode_if.h ${BEFORE_DEPEND:M*.h} \ > > > > ${MFILES:T:S/.m$/.h/} > > > > -LNFILES= ${CFILES:T:S/.c$/.ln/} > > > > > > > > .for mfile in ${MFILES} > > > > # XXX the low quality .m.o rules gnerated by config are normally > used > > > > @@ -167,15 +166,11 @@ ${mfile:T:S/.m$/.h/}: ${mfile} > > > > kernel-clean: > > > > rm -f *.o *.so *.pico *.ko *.s eddep errs \ > > > > ${FULLKERNEL} ${KERNEL_KO} ${KERNEL_KO}.debug \ > > > > - linterrs tags vers.c \ > > > > + tags vers.c \ > > > > vnode_if.c vnode_if.h vnode_if_newproto.h > vnode_if_typedef.h \ > > > > ${MFILES:T:S/.m$/.c/} ${MFILES:T:S/.m$/.h/} \ > > > > ${CLEAN} > > > > > > > > -lint: ${LNFILES} > > > > - ${LINT} ${LINTKERNFLAGS} ${CFLAGS:M-[DILU]*} ${.ALLSRC} 2>&1 | > \ > > > > - tee -a linterrs > > > > - > > > > # This is a hack. BFD "optimizes" away dynamic mode if there are no > > > > # dynamic references. We could probably do a '-Bforcedynamic' mode > like > > > > # in the a.out ld. For now, this works. > > > > @@ -364,9 +359,6 @@ kernel-reinstall: > > > > config.o env.o hints.o vers.o vnode_if.o: > > > > ${NORMAL_C} > > > > ${NORMAL_CTFCONVERT} > > > > - > > > > -config.ln env.ln hints.ln vers.ln vnode_if.ln: > > > > - ${NORMAL_LINT} > > > > > > > > .if ${MK_REPRODUCIBLE_BUILD} != "no" > > > > REPRO_FLAG="-r" > > > > > > > > Modified: head/sys/conf/kern.pre.mk > > > > ============================================================ > > > ================== > > > > --- head/sys/conf/kern.pre.mk Fri Nov 17 18:00:52 2017 > (r325953) > > > > +++ head/sys/conf/kern.pre.mk Fri Nov 17 18:16:46 2017 > (r325954) > > > > @@ -46,7 +46,6 @@ M= ${MACHINE} > > > > > > > > AWK?= awk > > > > CP?= cp > > > > -LINT?= lint > > > > NM?= nm > > > > OBJCOPY?= objcopy > > > > SIZE?= size > > > > @@ -121,9 +120,6 @@ CFLAGS+= ${CONF_CFLAGS} > > > > LDFLAGS+= -Wl,--build-id=sha1 > > > > .endif > > > > > > > > -# Optional linting. This can be overridden in /etc/make.conf. > > > > -LINTFLAGS= ${LINTOBJKERNFLAGS} > > > > - > > > > NORMAL_C= ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.IMPSRC} > > > > NORMAL_S= ${CC:N${CCACHE_BIN}} -c ${ASM_CFLAGS} ${WERROR} ${.IMPSRC} > > > > PROFILE_C= ${CC} -c ${CFLAGS} ${WERROR} ${.IMPSRC} > > > > @@ -175,8 +171,6 @@ NORMAL_CTFCONVERT= > > > > .else > > > > NORMAL_CTFCONVERT= @: > > > > .endif > > > > - > > > > -NORMAL_LINT= ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC} > > > > > > > > # Linux Kernel Programming Interface C-flags > > > > LINUXKPI_INCLUDES= -I$S/compat/linuxkpi/common/include > > > > > > > > Modified: head/sys/conf/kmod.mk > > > > ============================================================ > > > ================== > > > > --- head/sys/conf/kmod.mk Fri Nov 17 18:00:52 2017 > (r325953) > > > > +++ head/sys/conf/kmod.mk Fri Nov 17 18:16:46 2017 > (r325954) > > > > @@ -469,9 +469,6 @@ genassym.o: ${SRCS:Mopt_*.h} > > > > ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c > > > > .endif > > > > > > > > -lint: ${SRCS} > > > > - ${LINT} ${LINTKERNFLAGS} ${CFLAGS:M-[DILU]*} ${.ALLSRC:M*.c} > > > > - > > > > .if defined(KERNBUILDDIR) > > > > ${OBJS}: opt_global.h > > > > .endif > > > > > > > > Modified: head/usr.sbin/config/mkmakefile.c > > > > ============================================================ > > > ================== > > > > --- head/usr.sbin/config/mkmakefile.c Fri Nov 17 18:00:52 2017 > > > (r325953) > > > > +++ head/usr.sbin/config/mkmakefile.c Fri Nov 17 18:16:46 2017 > > > (r325954) > > > > @@ -690,18 +690,11 @@ do_rules(FILE *f) > > > > continue; > > > > } > > > > if (ftp->f_depends) { > > > > - fprintf(f, "%s%sln: $S/%s%c %s\n", > > > > - ftp->f_objprefix, tail(np), np, > > > och, > > > > - ftp->f_depends); > > > > - fprintf(f, "\t${NORMAL_LINT}\n\n"); > > > > fprintf(f, "%s%so: $S/%s%c %s\n", > > > > ftp->f_objprefix, tail(np), np, > > > och, > > > > ftp->f_depends); > > > > } > > > > else { > > > > - fprintf(f, "%s%sln: $S/%s%c\n", > > > > - ftp->f_objprefix, tail(np), np, > > > och); > > > > - fprintf(f, "\t${NORMAL_LINT}\n\n"); > > > > fprintf(f, "%s%so: $S/%s%c\n", > > > > ftp->f_objprefix, tail(np), np, > > > och); > > > > } > > > > > > > > > > > > > > -- > > > Rod Grimes > > > rgrimes@freebsd.org > > > > > -- > Rod Grimes > rgrimes@freebsd.org > From owner-svn-src-head@freebsd.org Sat Nov 18 10:01:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8480ADF36CA; Sat, 18 Nov 2017 10:01:46 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D0CE96A552; Sat, 18 Nov 2017 10:01:44 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from thor.intern.walstatt.dynvpn.de ([78.55.200.217]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LvhC4-1fEkst2o9M-017Wnp; Sat, 18 Nov 2017 11:01:35 +0100 Date: Sat, 18 Nov 2017 11:01:26 +0100 From: "O. Hartmann" To: Pedro Giffuni Cc: rgrimes@freebsd.org, "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers , Warner Losh Subject: Re: svn commit: r325954 - in head: . share/mk sys/conf usr.sbin/config Message-ID: <20171118110126.5a1c3486@thor.intern.walstatt.dynvpn.de> In-Reply-To: <29499AF9-FC0A-4CDA-9657-B092B3F9A0D0@FreeBSD.org> References: <201711180134.vAI1Y2ks064138@pdx.rh.CN85.dnsmgr.net> <29499AF9-FC0A-4CDA-9657-B092B3F9A0D0@FreeBSD.org> Organization: WALSTATT User-Agent: OutScare 3.1415926 X-Operating-System: ImNotAnOperatingSystem 3.141592527 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/C+PBCrhfiGisjrz+lM4aNtO"; protocol="application/pgp-signature" X-Provags-ID: V03:K0:ReVXTm/Ev0teYTupVkDJyOqYXAud1qnk5fqXRb+BD9x/gJyr/vl aWSbRBZ5cmHI3uEFnNPo/L3g1MWErMlxuTm7EcsXnQ1d+jCpMbx3zLA2JjJAm2cvmxP9i+m kYtWmLJtbV0UQRLoQI/akXojrQScsSjGOnncPBhJ/j6nPSP24PJWWKAqA6Hv7a6sIIKudo7 eHuRIdp+sUEI0/SICZ+Gg== X-UI-Out-Filterresults: notjunk:1;V01:K0:1BkH/DLoZBY=:23qL7yYgx0zlhpvi1ZRUec 15ADykaIRfYeqNCV7W6YLoNv2xeHSyVtwOZBilcBoOZZleq8S4+raWQUfYTMlZb7JYIQxH5Q2 lvMZGy6kQLxHoRonWATrg/Lsgm9HRvtOvyq1pz8GYznXGNrkw9lHDeNcc81m4l7YsOoMZlNhk fANqhat/pAX9E8pJ2m9Bp8sblzKX+a9ZwCa0hNCPExfjlK2rM3rxu9sRV8wIcBLskrsSr5Xnw 43jJQRhxZ0hiTpS97ukyALqV3o8yd+uQzhEFCLyWukPG22lAblqfPGLTijZxkr++XM81Er02F Hc+o7VEC7Mpo2QB80pLKl9wVakjtMM+wu7Srsz00wLZdDAT9QCFyL23W/vlhkpPe36b8+/rie o3YzQ2vRGYl8L89RNB5QAfEtCkAN6P46SVuJpcPOipF0NXrAsl4f4I/su3rPWErqy7dAHQYqo y3wPlXfueehsvFNyR/ZuG54okotMi8aC++F9C4q6AjRR7uzsD191caY+FRYTQ94Zwfc7b0Dm0 nywMPwlXsKnmXm2HOnXfSHY05Kl9wYCA/2uSBG8G/je/jKIr+VnXfQ7gTlaRKBFUaaWI+tGAE JkWZPj0MdnY1t1VvtX/21oNyOS44zBk8qCsMOZragN/GrK9ZApaSRtqhzrcPSwTXK6YZdmACd GWGhusu1N0dDwrgK2qV8EQPIBLenFh/uW89Sf+S0Q+lxpOkpj/B1i0y9TriLyTVcJNeKBzTma DmzKdM3iHdSc4Pssbns2hPMTB6ZiVw2b43NBsBrw3V+B+5G6S28krfpcsSfKlErd6JT3KzmZf JQCX8/YCquUeAT6dbw4EXIDivfa0g== X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 10:01:46 -0000 --Sig_/C+PBCrhfiGisjrz+lM4aNtO Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Am Fri, 17 Nov 2017 21:31:06 -0500 Pedro Giffuni schrieb: > > On Nov 17, 2017, at 20:34, Rodney W. Grimes wrote: > >=20 > > [ Charset UTF-8 unsupported, converting... ] =20 > >> Kib@ posted to arch that we were removing it, nobody objected, we remo= ved > >> it. If it was a working feature that might have a few users, that's one > >> thing. But I don't think make lint has actually worked in at least a d= ecade. =20 > >=20 > > Thats a sad state of affairs. > > =20 >=20 > t=E2=80=99s not sad, just the way things are, modern compilers are doing = much of the checking > older tools like lint used to do.. OpenBSD and DragonflyBSD both killed l= int ages ago. >=20 > OTOH, we should probably consider other tools, like sparse: >=20 > https://sparse.wiki.kernel.org/index.php/Main_Page Unfortunately, there is (yet) no port of this tool in our tree ... Or did I= miss something? > =20 > The license is fine and it plays nice with the compiler. >=20 > >>=20 > >> When I try it today, I get dozens of warnings, and several syntax erro= rs: > >>=20 > >> types.h(289): syntax error [249] > >> nvme.h(79): syntax error [249] > >> nvme.h(105): syntax error [249] > >> nvme.h(137): syntax error [249] > >> nvme.h(160): syntax error [249] > >> nvme.h(160): cannot recover from previous errors [224] > >>=20 > >> since it flags all c99 and newer usages as syntax errors. We've been u= sing > >> c99 for the kernel since about 8.x, and in the base longer than that. = xlint > >> hasn't been useful since we started doing this. The types.h change wen= t in: > >> c217b5c12e71 ( mdf 2011-12-12 18:44:17 +0000 289)typedef _Bool b= ool; > >> which as far as I can make out was between 8.x being branched and 9.x = being > >> branched. This feature has therefore been broken for 3 major releases > >> without any announcement, or even any bug reports coming in. Not exact= ly a > >> feature that has an audience that needs to be informed of anything... = While > >> I generally agree one should try to follow proper deprecation process,= this > >> has been de-facto removed from the source tree for at least 6 years, a= nd > >> likely broken a lot longer than that. At most this deserves a one-line= r in > >> the release notes. At most. > >>=20 > >> So is this about my forgetting to include a "Release Notes: Yes" line = in > >> the commit, or something larger? =20 > >=20 > > Something larger. Just because the src tree use of lint is failing > > does not meant that someone out there is not using lint in some > > other capacity. The depreication policy is there to notify them > > that lint well be removed as a program in the next release. > > =20 >=20 > Where is this policy written? If we have to, my guess is we can announce = the > deprecation in 11.2. A policy that would force us to ship xlint in 12.0 w= ould just be a > bad policy. >=20 > "xlint" is/was an internal development tool not a utility of any usefulne= ss for > non-developers. I would compare it to the disappearance of the C Preproce= ssor when we > moved to clang, with the significant difference that the lack of C a prep= rocessor broke > some ports. >=20 > > Just because FreeBSD's internal use of lint is broken should in > > no way relieve us of that obligation and stated policy. > > =20 >=20 > If someone needs it the/she may submit it in the ports tree, like we did = with other > stuff that has been deprecated. >=20 > > People seem to be axing stuff without following this policy, > > and without even bothering to do a release notes Y. > > =20 >=20 > So =E2=80=A6 can we remove ctm(1) ? >=20 > Pedro. >=20 > > =20 > >> Warner > >>=20 > >> On Fri, Nov 17, 2017 at 11:31 AM, Rodney W. Grimes < =20 > >> freebsd@pdx.rh.cn85.dnsmgr.net> wrote: =20 > >> =20 > >>> TOP post,sorry.... > >>>=20 > >>>=20 > >>> Someone needs to follow up with proper deprication procedures on lint. > >>>=20 > >>> =20 > >>>> Author: imp > >>>> Date: Fri Nov 17 18:16:46 2017 > >>>> New Revision: 325954 > >>>> URL: https://svnweb.freebsd.org/changeset/base/325954 > >>>>=20 > >>>> Log: > >>>> Remove build system support for lint. > >>>>=20 > >>>> Differential Revision: https://reviews.freebsd.org/D13124 > >>>>=20 > >>>> Modified: > >>>> head/Makefile > >>>> head/share/mk/bsd.README > >>>> head/share/mk/bsd.lib.mk > >>>> head/share/mk/bsd.own.mk > >>>> head/share/mk/bsd.prog.mk > >>>> head/share/mk/bsd.subdir.mk > >>>> head/share/mk/bsd.suffixes.mk > >>>> head/share/mk/sys.mk > >>>> head/sys/conf/kern.mk > >>>> head/sys/conf/kern.post.mk > >>>> head/sys/conf/kern.pre.mk > >>>> head/sys/conf/kmod.mk > >>>> head/usr.sbin/config/mkmakefile.c > >>>>=20 > >>>> Modified: head/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 =20 > >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 > >>>> --- head/Makefile Fri Nov 17 18:00:52 2017 (r325953) > >>>> +++ head/Makefile Fri Nov 17 18:16:46 2017 (r325954) > >>>> @@ -129,7 +129,7 @@ TGTS=3D all all-man buildenv buildenvvars =20 > >>> buildkernel bu =20 > >>>> everything hier hierarchy install installcheck installkernel \ > >>>> installkernel.debug packagekernel packageworld \ > >>>> reinstallkernel reinstallkernel.debug \ > >>>> - installworld kernel-toolchain libraries lint maninstall \ > >>>> + installworld kernel-toolchain libraries maninstall \ > >>>> obj objlink showconfig tags toolchain update \ > >>>> _worldtmp _legacy _bootstrap-tools _cleanobj _obj \ > >>>> _build-tools _build-metadata _cross-tools _includes _libraries \ > >>>>=20 > >>>> Modified: head/share/mk/bsd.README > >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 > >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 > >>>> --- head/share/mk/bsd.README Fri Nov 17 18:00:52 2017 (r3259= 53) > >>>> +++ head/share/mk/bsd.README Fri Nov 17 18:16:46 2017 (r3259= 54) > >>>> @@ -250,8 +250,6 @@ It has seven targets: > >>>> beforeinstall and afterinstall may also be used to cause > >>>> actions immediately before and after the install target > >>>> is executed. > >>>> - lint: > >>>> - run lint on the source files > >>>> tags: > >>>> create a tags file for the source files. > >>>>=20 > >>>> @@ -488,18 +486,17 @@ ${MOD}_oid.h A header which programmaticall= y =20 > >>> describes =20 > >>>>=20 > >>>> The include file contains the default targets for =20 > >>> building =20 > >>>> subdirectories. It has the same seven targets as : all= , =20 > >>> clean, =20 > >>>> -cleandir, depend, install, lint, and tags. For all of the director= ies > >>>> -listed in the variable SUBDIRS, the specified directory will be vis= ited > >>>> -and the target made. There is also a default target which allows t= he > >>>> -command "make subdir" where subdir is any directory listed in the = =20 > >>> variable =20 > >>>> -SUBDIRS. > >>>> +cleandir, depend, install, and tags. For all of the directories li= sted =20 > >>> in the =20 > >>>> +variable SUBDIRS, the specified directory will be visited and the = =20 > >>> target made. =20 > >>>> +There is also a default target which allows the command "make subdi= r" =20 > >>> where =20 > >>>> +subdir is any directory listed in the variable SUBDIRS. > >>>>=20 > >>>> =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- =20 > >>> =3D-=3D-=3D-=3D-=3D-=3D-=3D =20 > >>>>=20 > >>>> -The include file has support for building libraries. = It =20 > >>> has =20 > >>>> -the same seven targets as : all, clean, cleandir, depe= nd, > >>>> -install, lint, and tags. It has a limited number of suffixes, =20 > >>> consistent =20 > >>>> -with the current needs of the BSD tree. > >>>> +The include file has support for building libraries. = It =20 > >>> has the =20 > >>>> +same seven targets as : all, clean, cleandir, depend, = =20 > >>> install, and =20 > >>>> +tags. It has a limited number of suffixes, consistent with the cur= rent =20 > >>> needs of =20 > >>>> +the BSD tree. > >>>>=20 > >>>> It sets/uses the following variables: > >>>>=20 > >>>> @@ -530,8 +527,6 @@ LIB_CXX The name of the library to bui= ld. =20 > >>> It also cau =20 > >>>> will be built. NO_PIC can be set to only build a static > >>>> library. > >>>>=20 > >>>> -LINTLIBDIR Target directory for lint libraries. > >>>> - > >>>> MAN The manual pages to be installed. See bsd.man.mk for mo= re > >>>> details. > >>>>=20 > >>>> @@ -588,8 +583,6 @@ It has seven targets: > >>>> targets beforeinstall and afterinstall may also be u= sed > >>>> to cause actions immediately before and after the > >>>> install target is executed. > >>>> - lint: > >>>> - run lint on the source files. > >>>> tags: > >>>> create a tags file for the source files. > >>>>=20 > >>>>=20 > >>>> Modified: head/share/mk/bsd.lib.mk > >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 > >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 > >>>> --- head/share/mk/bsd.lib.mk Fri Nov 17 18:00:52 2017 (r3259= 53) > >>>> +++ head/share/mk/bsd.lib.mk Fri Nov 17 18:16:46 2017 (r3259= 54) > >>>> @@ -285,18 +285,6 @@ lib${LIB_PRIVATE}${LIB}_pic.a: ${SOBJS} > >>>> ${RANLIB} ${RANLIBFLAGS} ${.TARGET} > >>>> .endif > >>>>=20 > >>>> -.if defined(WANT_LINT) && !defined(NO_LINT) && defined(LIB) && =20 > >>> !empty(LIB) =20 > >>>> -LINTLIB=3D llib-l${LIB}.ln > >>>> -_LIBS+=3D ${LINTLIB} > >>>> -LINTOBJS+=3D ${SRCS:M*.c:.c=3D.ln} > >>>> -CLEANFILES+=3D ${LINTOBJS} > >>>> - > >>>> -${LINTLIB}: ${LINTOBJS} > >>>> - @${ECHO} building lint library ${.TARGET} > >>>> - @rm -f ${.TARGET} > >>>> - ${LINT} ${LINTLIBFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC} > >>>> -.endif > >>>> - > >>>> .endif # !defined(INTERNALLIB) > >>>>=20 > >>>> .if defined(_SKIP_BUILD) > >>>> @@ -403,10 +391,6 @@ _libinstall: > >>>> ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -o ${LIBOWN} -g= =20 > >>> ${LIBGRP} -m ${LIBMODE} \ =20 > >>>> ${_INSTALLFLAGS} lib${LIB}_pic.a ${DESTDIR}${_LIBDIR}/ > >>>> .endif > >>>> -.if defined(WANT_LINT) && !defined(NO_LINT) && defined(LIB) && =20 > >>> !empty(LIB) =20 > >>>> - ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -o ${LIBOWN} -= g =20 > >>> ${LIBGRP} -m ${LIBMODE} \ =20 > >>>> - ${_INSTALLFLAGS} ${LINTLIB} ${DESTDIR}${LINTLIBDIR}/ > >>>> -.endif > >>>> .endif # !defined(INTERNALLIB) > >>>>=20 > >>>> .if !defined(LIBRARIES_ONLY) > >>>> @@ -423,11 +407,6 @@ realinstall: maninstall > >>>> .ORDER: beforeinstall maninstall > >>>> .endif > >>>>=20 > >>>> -.endif > >>>> - > >>>> -.if !target(lint) > >>>> -lint: ${SRCS:M*.c} > >>>> - ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC} > >>>> .endif > >>>>=20 > >>>> .if ${MK_MAN} !=3D "no" && !defined(LIBRARIES_ONLY) > >>>>=20 > >>>> Modified: head/share/mk/bsd.own.mk > >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 > >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 > >>>> --- head/share/mk/bsd.own.mk Fri Nov 17 18:00:52 2017 (r3259= 53) > >>>> +++ head/share/mk/bsd.own.mk Fri Nov 17 18:16:46 2017 (r3259= 54) > >>>> @@ -32,8 +32,6 @@ > >>>> # > >>>> # LIBEXECDIR Base path for system daemons and utilities. [/usr/libex= ec] > >>>> # > >>>> -# LINTLIBDIR Base path for lint libraries. [/usr/libdata/lint] > >>>> -# > >>>> # SHLIBDIR Base path for shared libraries. [${LIBDIR}] > >>>> # > >>>> # LIBOWN Library owner. [${BINOWN}] > >>>> @@ -162,7 +160,6 @@ LIBDIR?=3D ${LIBDIR_BASE} > >>>> LIBCOMPATDIR?=3D /usr/lib/compat > >>>> LIBDATADIR?=3D /usr/libdata > >>>> LIBEXECDIR?=3D /usr/libexec > >>>> -LINTLIBDIR?=3D /usr/libdata/lint > >>>> SHLIBDIR?=3D ${LIBDIR} > >>>> LIBOWN?=3D ${BINOWN} > >>>> LIBGRP?=3D ${BINGRP} > >>>>=20 > >>>> Modified: head/share/mk/bsd.prog.mk > >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 > >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 > >>>> --- head/share/mk/bsd.prog.mk Fri Nov 17 18:00:52 2017 (r3259= 53) > >>>> +++ head/share/mk/bsd.prog.mk Fri Nov 17 18:16:46 2017 (r3259= 54) > >>>> @@ -294,13 +294,6 @@ realinstall: maninstall > >>>>=20 > >>>> .endif # !target(install) > >>>>=20 > >>>> -.if !target(lint) > >>>> -lint: ${SRCS:M*.c} > >>>> -.if defined(PROG) > >>>> - ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC} > >>>> -.endif > >>>> -.endif > >>>> - > >>>> .if ${MK_MAN} !=3D "no" > >>>> .include > >>>> .endif > >>>>=20 > >>>> Modified: head/share/mk/bsd.subdir.mk > >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 > >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 > >>>> --- head/share/mk/bsd.subdir.mk Fri Nov 17 18:00:52 2017 =20 > >>> (r325953) =20 > >>>> +++ head/share/mk/bsd.subdir.mk Fri Nov 17 18:16:46 2017 =20 > >>> (r325954) =20 > >>>> @@ -46,7 +46,7 @@ SUBDIR_TARGETS+=3D \ > >>>> all all-man analyze buildconfig buildfiles buildinclude= s \ > >>>> checkdpadd clean cleandepend cleandir cleanilinks \ > >>>> cleanobj depend distribute files includes installconfig= \ > >>>> - installfiles installincludes print-dir realinstall lin= t \ > >>>> + installfiles installincludes print-dir realinstall \ > >>>> maninstall manlint ${_obj} objlink tags \ > >>>>=20 > >>>> # Described above. > >>>>=20 > >>>> Modified: head/share/mk/bsd.suffixes.mk > >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 > >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 > >>>> --- head/share/mk/bsd.suffixes.mk Fri Nov 17 18:00:52 2017 =20 > >>> (r325953) =20 > >>>> +++ head/share/mk/bsd.suffixes.mk Fri Nov 17 18:16:46 2017 =20 > >>> (r325954) =20 > >>>> @@ -4,14 +4,6 @@ > >>>> cp -f ${.IMPSRC} ${.TARGET} > >>>> chmod a+x ${.TARGET} > >>>>=20 > >>>> -.c.ln: > >>>> - ${LINT} ${LINTOBJFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC} || \ > >>>> - touch ${.TARGET} > >>>> - > >>>> -.cc.ln .C.ln .cpp.ln .cxx.ln: > >>>> - ${LINT} ${LINTOBJFLAGS} ${CXXFLAGS:M-[DIU]*} ${.IMPSRC} || \ > >>>> - touch ${.TARGET} > >>>> - > >>>> .c: > >>>> ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} > >>>> ${CTFCONVERT_CMD} > >>>>=20 > >>>> Modified: head/share/mk/sys.mk > >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 > >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 > >>>> --- head/share/mk/sys.mk Fri Nov 17 18:00:52 2017 (r3259= 53) > >>>> +++ head/share/mk/sys.mk Fri Nov 17 18:16:46 2017 (r3259= 54) > >>>> @@ -142,7 +142,7 @@ NO_META_IGNORE_HOST_HEADERS=3D 1 > >>>> .if defined(%POSIX) > >>>> .SUFFIXES: .o .c .y .l .a .sh .f > >>>> .else > >>>> -.SUFFIXES: .out .a .ln .o .bco .llo .c .cc .cpp .cxx .C .m .F .f = .e =20 > >>> .r .y .l .S .asm .s .cl .p .h .sh =20 > >>>> +.SUFFIXES: .out .a .o .bco .llo .c .cc .cpp .cxx .C .m .F .f .e .= r .y =20 > >>> .l .S .asm .s .cl .p .h .sh =20 > >>>> .endif > >>>>=20 > >>>> AR ?=3D ar > >>>> @@ -244,13 +244,6 @@ LFLAGS ?=3D > >>>> LD ?=3D ld > >>>> LDFLAGS ?=3D > >>>> _LDFLAGS =3D ${LDFLAGS:S/-Wl,//g:N-mabi=3D*:N-fuse-ld=3D*} > >>>> - > >>>> -LINT ?=3D lint > >>>> -LINTFLAGS ?=3D -cghapbx > >>>> -LINTKERNFLAGS ?=3D ${LINTFLAGS} > >>>> -LINTOBJFLAGS ?=3D -cghapbxu -i > >>>> -LINTOBJKERNFLAGS?=3D ${LINTOBJFLAGS} > >>>> -LINTLIBFLAGS ?=3D -cghapbxu -C ${LIB} > >>>>=20 > >>>> MAKE ?=3D make > >>>>=20 > >>>>=20 > >>>> Modified: head/sys/conf/kern.mk > >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 > >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 > >>>> --- head/sys/conf/kern.mk Fri Nov 17 18:00:52 2017 (r3259= 53) > >>>> +++ head/sys/conf/kern.mk Fri Nov 17 18:16:46 2017 (r3259= 54) > >>>> @@ -228,7 +228,7 @@ PHONY_NOTMAIN =3D afterdepend afterinstall all = =20 > >>> beforedep =20 > >>>> beforelinking build build-tools buildfiles buildinclude= s \ > >>>> checkdpadd clean cleandepend cleandir cleanobj configur= e \ > >>>> depend distclean distribute exe \ > >>>> - html includes install installfiles installincludes lin= t \ > >>>> + html includes install installfiles installincludes \ > >>>> obj objlink objs objwarn \ > >>>> realinstall regress \ > >>>> tags whereobj > >>>>=20 > >>>> Modified: head/sys/conf/kern.post.mk > >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 > >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 > >>>> --- head/sys/conf/kern.post.mk Fri Nov 17 18:00:52 2017 =20 > >>> (r325953) =20 > >>>> +++ head/sys/conf/kern.post.mk Fri Nov 17 18:16:46 2017 =20 > >>> (r325954) =20 > >>>> @@ -153,7 +153,6 @@ ${FULLKERNEL}: ${SYSTEM_DEP} vers.o > >>>>=20 > >>>> OBJS_DEPEND_GUESS+=3D assym.s vnode_if.h ${BEFORE_DEPEND:M*.h} \ > >>>> ${MFILES:T:S/.m$/.h/} > >>>> -LNFILES=3D ${CFILES:T:S/.c$/.ln/} > >>>>=20 > >>>> .for mfile in ${MFILES} > >>>> # XXX the low quality .m.o rules gnerated by config are normally used > >>>> @@ -167,15 +166,11 @@ ${mfile:T:S/.m$/.h/}: ${mfile} > >>>> kernel-clean: > >>>> rm -f *.o *.so *.pico *.ko *.s eddep errs \ > >>>> ${FULLKERNEL} ${KERNEL_KO} ${KERNEL_KO}.debug \ > >>>> - linterrs tags vers.c \ > >>>> + tags vers.c \ > >>>> vnode_if.c vnode_if.h vnode_if_newproto.h vnode_if_typedef.= h \ > >>>> ${MFILES:T:S/.m$/.c/} ${MFILES:T:S/.m$/.h/} \ > >>>> ${CLEAN} > >>>>=20 > >>>> -lint: ${LNFILES} > >>>> - ${LINT} ${LINTKERNFLAGS} ${CFLAGS:M-[DILU]*} ${.ALLSRC} 2>&1 |= \ > >>>> - tee -a linterrs > >>>> - > >>>> # This is a hack. BFD "optimizes" away dynamic mode if there are no > >>>> # dynamic references. We could probably do a '-Bforcedynamic' mode = like > >>>> # in the a.out ld. For now, this works. > >>>> @@ -364,9 +359,6 @@ kernel-reinstall: > >>>> config.o env.o hints.o vers.o vnode_if.o: > >>>> ${NORMAL_C} > >>>> ${NORMAL_CTFCONVERT} > >>>> - > >>>> -config.ln env.ln hints.ln vers.ln vnode_if.ln: > >>>> - ${NORMAL_LINT} > >>>>=20 > >>>> .if ${MK_REPRODUCIBLE_BUILD} !=3D "no" > >>>> REPRO_FLAG=3D"-r" > >>>>=20 > >>>> Modified: head/sys/conf/kern.pre.mk > >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 > >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 > >>>> --- head/sys/conf/kern.pre.mk Fri Nov 17 18:00:52 2017 (r3259= 53) > >>>> +++ head/sys/conf/kern.pre.mk Fri Nov 17 18:16:46 2017 (r3259= 54) > >>>> @@ -46,7 +46,6 @@ M=3D ${MACHINE} > >>>>=20 > >>>> AWK?=3D awk > >>>> CP?=3D cp > >>>> -LINT?=3D lint > >>>> NM?=3D nm > >>>> OBJCOPY?=3D objcopy > >>>> SIZE?=3D size > >>>> @@ -121,9 +120,6 @@ CFLAGS+=3D ${CONF_CFLAGS} > >>>> LDFLAGS+=3D -Wl,--build-id=3Dsha1 > >>>> .endif > >>>>=20 > >>>> -# Optional linting. This can be overridden in /etc/make.conf. > >>>> -LINTFLAGS=3D ${LINTOBJKERNFLAGS} > >>>> - > >>>> NORMAL_C=3D ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.IMPSRC} > >>>> NORMAL_S=3D ${CC:N${CCACHE_BIN}} -c ${ASM_CFLAGS} ${WERROR} ${.IMPSR= C} > >>>> PROFILE_C=3D ${CC} -c ${CFLAGS} ${WERROR} ${.IMPSRC} > >>>> @@ -175,8 +171,6 @@ NORMAL_CTFCONVERT=3D > >>>> .else > >>>> NORMAL_CTFCONVERT=3D @: > >>>> .endif > >>>> - > >>>> -NORMAL_LINT=3D ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC} > >>>>=20 > >>>> # Linux Kernel Programming Interface C-flags > >>>> LINUXKPI_INCLUDES=3D -I$S/compat/linuxkpi/common/include > >>>>=20 > >>>> Modified: head/sys/conf/kmod.mk > >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 > >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 > >>>> --- head/sys/conf/kmod.mk Fri Nov 17 18:00:52 2017 (r3259= 53) > >>>> +++ head/sys/conf/kmod.mk Fri Nov 17 18:16:46 2017 (r3259= 54) > >>>> @@ -469,9 +469,6 @@ genassym.o: ${SRCS:Mopt_*.h} > >>>> ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c > >>>> .endif > >>>>=20 > >>>> -lint: ${SRCS} > >>>> - ${LINT} ${LINTKERNFLAGS} ${CFLAGS:M-[DILU]*} ${.ALLSRC:M*.c} > >>>> - > >>>> .if defined(KERNBUILDDIR) > >>>> ${OBJS}: opt_global.h > >>>> .endif > >>>>=20 > >>>> Modified: head/usr.sbin/config/mkmakefile.c > >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 > >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 > >>>> --- head/usr.sbin/config/mkmakefile.c Fri Nov 17 18:00:52 2017 =20 > >>> (r325953) =20 > >>>> +++ head/usr.sbin/config/mkmakefile.c Fri Nov 17 18:16:46 2017 =20 > >>> (r325954) =20 > >>>> @@ -690,18 +690,11 @@ do_rules(FILE *f) > >>>> continue; > >>>> } > >>>> if (ftp->f_depends) { > >>>> - fprintf(f, "%s%sln: $S/%s%c %s\n", > >>>> - ftp->f_objprefix, tail(np), np= , =20 > >>> och, =20 > >>>> - ftp->f_depends); > >>>> - fprintf(f, "\t${NORMAL_LINT}\n\n"); > >>>> fprintf(f, "%s%so: $S/%s%c %s\n", > >>>> ftp->f_objprefix, tail(np), np,= =20 > >>> och, =20 > >>>> ftp->f_depends); > >>>> } > >>>> else { > >>>> - fprintf(f, "%s%sln: $S/%s%c\n", > >>>> - ftp->f_objprefix, tail(np), np= , =20 > >>> och); =20 > >>>> - fprintf(f, "\t${NORMAL_LINT}\n\n"); > >>>> fprintf(f, "%s%so: $S/%s%c\n", > >>>> ftp->f_objprefix, tail(np), np,= =20 > >>> och); =20 > >>>> } > >>>>=20 > >>>> =20 > >>>=20 > >>> -- > >>> Rod Grimes > >>> rgrimes@freebsd.org > >>> =20 > >=20 > > --=20 > > Rod Grimes rgrimes@free= bsd.org > > =20 >=20 > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" --=20 O. Hartmann Ich widerspreche der Nutzung oder =C3=9Cbermittlung meiner Daten f=C3=BCr Werbezwecke oder f=C3=BCr die Markt- oder Meinungsforschung (=C2=A7 28 Abs.= 4 BDSG). --Sig_/C+PBCrhfiGisjrz+lM4aNtO Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCWhAE9wAKCRDS528fyFhY lGU+Af9CjaKDOgKr552mH+zOpy/jtF/L9JI78usPwjj2ImtAvm0GeXF5SlJQz7ZD 8xrOwjzdcnvKRlcWaGsgDdK6b6fhAf9+1+SchapPQQTW/b4kDQAVlFZh95zGOXkd CqVdf3Ujgx1UxFqQdn6xb21j38NXkUcpgvkqZQme2I0cYGJR3N8s =5x5i -----END PGP SIGNATURE----- --Sig_/C+PBCrhfiGisjrz+lM4aNtO-- From owner-svn-src-head@freebsd.org Sat Nov 18 10:42:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC3E0DB83D1; Sat, 18 Nov 2017 10:42:33 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 871306B657; Sat, 18 Nov 2017 10:42:32 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.103] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id D3561109F87; Sat, 18 Nov 2017 21:42:22 +1100 (AEDT) Date: Sat, 18 Nov 2017 21:42:21 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Warner Losh cc: "Rodney W. Grimes" , Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r325954 - in head: . share/mk sys/conf usr.sbin/config In-Reply-To: Message-ID: <20171118190422.V949@besplex.bde.org> References: <201711180134.vAI1Y2ks064138@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=cK6QihWN c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=iKhvJSA4AAAA:8 a=6ZAgHcMKeUqKX4WalFMA:9 a=k_bWJkH_PEfGhh2f:21 a=YjaBXsvuNmzr3sZk:21 a=CjuIK1q_8ugA:10 a=odh9cflL3HIXMm4fY7Wr:22 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 10:42:34 -0000 On Fri, 17 Nov 2017, Warner Losh wrote: > On Fri, Nov 17, 2017 at 6:34 PM, Rodney W. Grimes < > freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > >> [ Charset UTF-8 unsupported, converting... ] >>> Kib@ posted to arch that we were removing it, nobody objected, we >> removed >>> it. If it was a working feature that might have a few users, that's one >>> thing. But I don't think make lint has actually worked in at least a >> decade. >> >> Thats a sad state of affairs. > > Indeed. The bugs are mostly in system sources outside of lint, and user errors. >> When I try it today, I get dozens of warnings, and several syntax errors: >>> >>> types.h(289): syntax error [249] This only happens with _KERNEL defined. It shows a bug in types.h. Debugged below. >>> nvme.h(79): syntax error [249] >>> nvme.h(105): syntax error [249] >>> nvme.h(137): syntax error [249] >>> nvme.h(160): syntax error [249] >>> nvme.h(160): cannot recover from previous errors [224] nvme.h could easily have lots more bugs than sys/types.h, since it is not designed to support C90 or applications or be very portable. >>> since it flags all c99 and newer usages as syntax errors. We've been This shouldn't break use of lint on K&R or C90 sources. But types.h is broken. It no longer supports K&R, C90, or most other things that are upposed to be controlled by the visibility ifdefs in it. >> using >>> c99 for the kernel since about 8.x, and in the base longer than that. >> xlint >>> hasn't been useful since we started doing this. The types.h change went >> in: >>> c217b5c12e71 ( mdf 2011-12-12 18:44:17 +0000 289)typedef _Bool >> bool; >>> which as far as I can make out was between 8.x being branched and 9.x >> being >>> branched. This feature has therefore been broken for 3 major releases >>> without any announcement, or even any bug reports coming in. Not exactly >> a >>> feature that has an audience that needs to be informed of anything... It was sys/types.h that was broken then. lint just detects the bug. The bug in sys/types.h is that iff _KERNEL is defined, it uses _Bool without declaring it unless __STDC_VERSION__ < 199901L && __GNUC__ < 3 && !defined(__INTEL_COMPILER__). stdbool.h uses the same ifdef for defining _Bool. However, stdbool.h uses a different definition of bool that hides the bug unless bool is actually used -- sttdef.h #defines bool as _Bool, while sys/types.h typedefs bool as _Bool. The ifdef is fragile and works and fails as follows: - when __STDC_VERSION__ >= 199901L, _Bool must be defined by the compiler and there is no problem. - gcc-4.2.1 defaults to c90 so __STDC_VERSION__ is undefined and is equivalent to 0 (modulo the bug of the existence of -Wundef). But __GNUC__ is 4, so the ifdef is not satisified anyway. It is important to not typedef _Bool since it is a builtin in gcc-4 even with c90. The __GNUC__ < 3 test is what implements this. - icc apparently defines __GNUC__ as < 3, but defines _Bool, so it is important to not typedef _Bool for icc too. The !defined(__INTEL_COMPILER__) test is what implements this. Most __INTEL_COMPILER__ tests are used because icc doesn't emulate being gcc very well. - clang is very incompatible and defaults to c11, so the ifdef is not satisfied by default. When c90 is forced, clang is less incompatible and the ifdef works like for gcc-4 (clang sets __GNUC__ to 4 despite its incompatibility, and the incompatibility is not large enough to break this test.) Then in lint, there is a problem getting __STDC_VERSION__ and even __GNUC__ defined correctly. __GNUC__ should not be defined without the lint option -g. lint uses cc -E... instead of cpp to reduce unportabilities, but this turns out to be fairly unportable too, due to the clang incompatiblity. The main bugs are that lint doesn't use -std at all, and clang is incompatible. lint only supports c90 and c90 with some gcc extensions, so should use -std=c89 or -std=gnu90 to restrict the headers to what it supports. The default -std=c89 still works for gcc, but clang gives -std=c11. lint's main CFLAGS passed to cc are: -E -x c (OK so far) #if 0 bogus null -D__attribute__(()) and -D__extension__(()) #else -U__GNUC__ (perhaps even worse than the null definitions) #endif -Wp,-C -Wcomment (perhaps OK) -D__LINT__ -Dlint (OK) -p adds: -Wtraditional -Wnosystem-headers -s adds: -trigraphs -Wtrigraphs -pedantic -D__STRICT_ANSI__ -t adds: -traditional -D${MACHINE} -D${MACHINE_ARCH} -d adds: -nostdinc -idirafter >> Something larger. Just because the src tree use of lint is failing >> does not meant that someone out there is not using lint in some >> other capacity. The depreication policy is there to notify them >> that lint well be removed as a program in the next release. > > Without a working sys/types.h, nothing non-trivial will work. Even C90 support is broken. > Lint is totally totally broken. It's a rotting corpse that needs to be just > gone. Since it has been totally broken for several major releases, I see no Less broken than in 1993 for the 1990 language that its supports. Its support was never complete, but FreeBSD fixed all the headers to support this language. The headers are broken again, but not as badly as in 1993. Full list of bugs found by lint on sys/types.h: X _types.h(104): warning: c89 C does not support 'long long' [265] Lint bug: doesn't give full pathnames. Who knows where _types.h is today? Well, it is sys/_types.h. Headers bug: the long long abomination is hard-coded as that in the declaration of __max_align_t. Using the abomination is wronger than usual here. sys/_types.h is supposed to be MI, but the abomination is MD. Except ABIs defeat the point of having long long (a hack to avoid expanding long) by forcing it to be precisely 64 bits, so it is not really MD. But since it is not MD, it has little to do with alignment. Using __intmax_t would fix all of these bugs. I fixed the corresponding bug in the definition of __intmax_t itself (actually __int64_t) using __attribute__(__mode__(__DI__)) for gcc and icc, and long long otherwise. Except lint's #undef of __GNUC__ breaks detection of gcc, and lint can't do anything good with __attribute__(()) anyway. lint was later fixed using ugly LONGLONG markup. Recent axing didn't remove this markup AFAIR. Later, the __attribute__(()) was removed. X endian.h(122): warning: extra bits set to 0 in conversion of 'unsigned int' to 'unsigned long long', op & [309] X endian.h(122): warning: conversion to 'unsigned int' due to prototype, arg #1 [259] X endian.h(122): warning: conversion to 'unsigned int' due to prototype, arg #1 [259] X types.h(355): warning: conversion to 'unsigned int' due to prototype, arg #1 [259] X types.h(355): warning: conversion to 'unsigned int' due to prototype, arg #1 [259] Non-useful lint warnings. lint doesn't trust prototypes. -Wconversion in gcc does much the same, but is not the default. X _types.h(62): warning: struct __timer never defined [233] X _types.h(63): warning: struct __mq never defined [233] Worse non-useful lint warnings. lint doesn't understand forward declarations of structs. These are a recondite C90 feature needed mainly to support prototypes. X endian.h(111): warning: static function __bswap64_var unused [236] A serious problem. The function is inline, but inline functions are not in C90, so lint defines away the inline keyword (it is spelled __inline). Plain static functions in header files are unusual but not wrong. X _pthreadtypes.h(44): warning: struct pthread never defined [233] X _pthreadtypes.h(45): warning: struct pthread_attr never defined [233] X _pthreadtypes.h(46): warning: struct pthread_cond never defined [233] X _pthreadtypes.h(47): warning: struct pthread_cond_attr never defined [233] X _pthreadtypes.h(48): warning: struct pthread_mutex never defined [233] X _pthreadtypes.h(49): warning: struct pthread_mutex_attr never defined [233] X _pthreadtypes.h(51): warning: struct pthread_rwlock never defined [233] X _pthreadtypes.h(52): warning: struct pthread_rwlockattr never defined [233] X _pthreadtypes.h(53): warning: struct pthread_barrier never defined [233] X _pthreadtypes.h(54): warning: struct pthread_barrier_attr never defined [233] X _pthreadtypes.h(55): warning: struct pthread_spinlock never defined [233] X _pthreadtypes.h(78): warning: struct pthread_barrierattr never defined [233] X types.h(247): warning: struct cap_rights never defined [233] Lots more of lint not understanding forward declarations. X types.h(313): warning: static function __bitcount16 unused [236] X types.h(352): warning: static function __bitcount64 unused [236] X Lint pass2: More of lint not understanding static inline functions. That was without __KERNEL. There was only 1 real bug (misuse of the long long abomination). Missing lint markup was a feature since it allowed lint to detect the bug. Extra errors with _KERNEL: X types.h(289): syntax error [249] X [... 2 more undefined structs] That is only 1 extra and already debugged. It was mostly a user error to use lint on non-C90 code. sys/types.h should be C90 if _ANSI_SOURCE or _POSIX_SOURCE is defined. But defining them makes no difference to lint warnings. -Wno-system-headers is supposed to be the default, so adding it for -p should have no effect, but it actually increases the number of warnings by 5. These are all "bitwise operation on signed value possibly unportable" in sys/endian.h and sys/types.h. Now it is clang than doesn't understand C90. In __bswap16_var() and __bitcount16() we start with uint16_t and unsign-extend to signed int for use in expressions, then do bitwise operations. C90's broken as designed value-preserving extension rules give the signed int, and clang doesn't understand there are no problems with the sign bit because the expressions barely need more than 16 bits so they don't go near the sign bit. Also, clang doesn't support -Wtraditional and lint doesn't have enough control to select a working cpp. Lint supports a -B option, but this only allows using alternative executables for the lint passes and not the cpp pass. Bruce From owner-svn-src-head@freebsd.org Sat Nov 18 11:58:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09A63DB9591; Sat, 18 Nov 2017 11:58:37 +0000 (UTC) (envelope-from bhd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7B816D1A5; Sat, 18 Nov 2017 11:58:36 +0000 (UTC) (envelope-from bhd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAIBwZuG094828; Sat, 18 Nov 2017 11:58:35 GMT (envelope-from bhd@FreeBSD.org) Received: (from bhd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAIBwZ83094827; Sat, 18 Nov 2017 11:58:35 GMT (envelope-from bhd@FreeBSD.org) Message-Id: <201711181158.vAIBwZ83094827@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bhd set sender to bhd@FreeBSD.org using -f From: Bjoern Heidotting Date: Sat, 18 Nov 2017 11:58:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325964 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: bhd X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 325964 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 11:58:37 -0000 Author: bhd (doc committer) Date: Sat Nov 18 11:58:35 2017 New Revision: 325964 URL: https://svnweb.freebsd.org/changeset/base/325964 Log: Remove leftover in lagg(4) manpage forgotten in r271733 Reviewed by: bcr Differential Revision: https://reviews.freebsd.org/D13061 Modified: head/share/man/man4/lagg.4 Modified: head/share/man/man4/lagg.4 ============================================================================== --- head/share/man/man4/lagg.4 Fri Nov 17 23:27:06 2017 (r325963) +++ head/share/man/man4/lagg.4 Sat Nov 18 11:58:35 2017 (r325964) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 23, 2016 +.Dd November 18, 2017 .Dt LAGG 4 .Os .Sh NAME @@ -86,8 +86,6 @@ This constraint can be relaxed by setting the .Xr sysctl 8 variable to a nonzero value, which is useful for certain bridged network setups. -.Ic loadbalance -mode. .It Ic lacp Supports the IEEE 802.1AX (formerly 802.3ad) Link Aggregation Control Protocol (LACP) and the Marker Protocol. From owner-svn-src-head@freebsd.org Sat Nov 18 13:21:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A93A3DBB0B1; Sat, 18 Nov 2017 13:21:23 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7342A6F685; Sat, 18 Nov 2017 13:21:23 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAIDLM80028726; Sat, 18 Nov 2017 13:21:22 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAIDLM6S028725; Sat, 18 Nov 2017 13:21:22 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201711181321.vAIDLM6S028725@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 18 Nov 2017 13:21:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325965 - head/libexec/rtld-elf X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/libexec/rtld-elf X-SVN-Commit-Revision: 325965 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 13:21:23 -0000 Author: trasz Date: Sat Nov 18 13:21:22 2017 New Revision: 325965 URL: https://svnweb.freebsd.org/changeset/base/325965 Log: Increase rtld initial memory pool size from 32kB to 128kB. The old value was probably fine back in 1998, when that code was imported (although the comments still mention VAX, which was quite obsolete by then); now, however, it's too small to handle our libc, which results in some additional calls to munmap/mmap later on. Asking for more virtual address space is virtually free, and syscalls are not, thus the change. It was suggested by kib@ that this might be a symptom of a deeper problem. It doesn't only affect libc, though - the change also improves rtld memory management for eg KDE libraries. I guess it's just a natural bloat. MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D12834 Modified: head/libexec/rtld-elf/malloc.c Modified: head/libexec/rtld-elf/malloc.c ============================================================================== --- head/libexec/rtld-elf/malloc.c Sat Nov 18 11:58:35 2017 (r325964) +++ head/libexec/rtld-elf/malloc.c Sat Nov 18 13:21:22 2017 (r325965) @@ -61,7 +61,7 @@ static int findbucket(); /* * Pre-allocate mmap'ed pages */ -#define NPOOLPAGES (32*1024/pagesz) +#define NPOOLPAGES (128*1024/pagesz) static caddr_t pagepool_start, pagepool_end; static int morepages(); From owner-svn-src-head@freebsd.org Sat Nov 18 14:10:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC767DBBC81; Sat, 18 Nov 2017 14:10:20 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3CFBA70C50; Sat, 18 Nov 2017 14:10:20 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id vAIEA8aw066394 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 18 Nov 2017 16:10:09 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua vAIEA8aw066394 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id vAIEA7a9066388; Sat, 18 Nov 2017 16:10:07 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 18 Nov 2017 16:10:07 +0200 From: Konstantin Belousov To: Edward Tomasz Napierala Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r325965 - head/libexec/rtld-elf Message-ID: <20171118141007.GI2272@kib.kiev.ua> References: <201711181321.vAIDLM6S028725@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201711181321.vAIDLM6S028725@repo.freebsd.org> User-Agent: Mutt/1.9.1 (2017-09-22) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 14:10:21 -0000 On Sat, Nov 18, 2017 at 01:21:22PM +0000, Edward Tomasz Napierala wrote: > Author: trasz > Date: Sat Nov 18 13:21:22 2017 > New Revision: 325965 > URL: https://svnweb.freebsd.org/changeset/base/325965 > > Log: > Increase rtld initial memory pool size from 32kB to 128kB. > > The old value was probably fine back in 1998, when that code was imported > (although the comments still mention VAX, which was quite obsolete by then); > now, however, it's too small to handle our libc, which results in some > additional calls to munmap/mmap later on. Asking for more virtual address > space is virtually free, and syscalls are not, thus the change. > > It was suggested by kib@ that this might be a symptom of a deeper problem. > It doesn't only affect libc, though - the change also improves rtld memory > management for eg KDE libraries. I guess it's just a natural bloat. This is not what I said. My guess was that the large allocation you see in the ktrace output as coming from rtld was really an allocation of the TLS segment, and it was so large because libc has that large TLS segment. You did not checked this guess against the actual code. If my guess is true, I do not see a point in the change you made: the memory consumption is externally imposed on rtld, and we should not try to tailor it to single, whenever important, consumer. > > MFC after: 2 weeks > Sponsored by: DARPA, AFRL > Differential Revision: https://reviews.freebsd.org/D12834 > > Modified: > head/libexec/rtld-elf/malloc.c > > Modified: head/libexec/rtld-elf/malloc.c > ============================================================================== > --- head/libexec/rtld-elf/malloc.c Sat Nov 18 11:58:35 2017 (r325964) > +++ head/libexec/rtld-elf/malloc.c Sat Nov 18 13:21:22 2017 (r325965) > @@ -61,7 +61,7 @@ static int findbucket(); > /* > * Pre-allocate mmap'ed pages > */ > -#define NPOOLPAGES (32*1024/pagesz) > +#define NPOOLPAGES (128*1024/pagesz) > static caddr_t pagepool_start, pagepool_end; > static int morepages(); > From owner-svn-src-head@freebsd.org Sat Nov 18 14:16:13 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD2BCDBBEDF; Sat, 18 Nov 2017 14:16:13 +0000 (UTC) (envelope-from se@freebsd.org) Received: from mailout02.t-online.de (mailout02.t-online.de [194.25.134.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailout00.t-online.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9476A71041; Sat, 18 Nov 2017 14:16:13 +0000 (UTC) (envelope-from se@freebsd.org) Received: from fwd22.aul.t-online.de (fwd22.aul.t-online.de [172.20.26.127]) by mailout02.t-online.de (Postfix) with SMTP id E58FB4181393; Sat, 18 Nov 2017 15:16:04 +0100 (CET) Received: from Stefans-MBP-2.fritz.box (TFNyicZpZh+E8iOz+JXuAusNSja5lMRVWa4R-U+3VmdkWkesK3dVnpRPFC29jggQ3A@[87.151.220.147]) by fwd22.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1eG3ua-0bWcnw0; Sat, 18 Nov 2017 15:16:00 +0100 Subject: Re: svn commit: r325954 - in head: . share/mk sys/conf usr.sbin/config To: Pedro Giffuni Cc: rgrimes@freebsd.org, "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers , Warner Losh , "O. Hartmann" References: <201711180134.vAI1Y2ks064138@pdx.rh.CN85.dnsmgr.net> <29499AF9-FC0A-4CDA-9657-B092B3F9A0D0@FreeBSD.org> From: Stefan Esser Message-ID: <04747a89-4dc7-a476-dc32-a158ee1f5240@freebsd.org> Date: Sat, 18 Nov 2017 15:15:59 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <29499AF9-FC0A-4CDA-9657-B092B3F9A0D0@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-ID: TFNyicZpZh+E8iOz+JXuAusNSja5lMRVWa4R-U+3VmdkWkesK3dVnpRPFC29jggQ3A X-TOI-MSGID: 436b6188-7e8e-4c40-9f37-9dfbc1ca02c9 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 14:16:14 -0000 Am 18.11.17 um 03:31 schrieb Pedro Giffuni: > >> On Nov 17, 2017, at 20:34, Rodney W. Grimes wrote: >> >> [ Charset UTF-8 unsupported, converting... ] >>> Kib@ posted to arch that we were removing it, nobody objected, we removed >>> it. If it was a working feature that might have a few users, that's one >>> thing. But I don't think make lint has actually worked in at least a decade. >> >> Thats a sad state of affairs. >> > > t’s not sad, just the way things are, modern compilers are doing much of the checking older tools like lint used to do.. OpenBSD and DragonflyBSD both killed lint ages ago. > > OTOH, we should probably consider other tools, like sparse: > > https://sparse.wiki.kernel.org/index.php/Main_Page > > The license is fine and it plays nice with the compiler. It builds on -CURRENT, but the Makefile needs some tweaks (it does not find LLVM or Gtk+-2.0, even though they are present on my system). I'll work on a port over the weekend ... Regards, STefan From owner-svn-src-head@freebsd.org Sat Nov 18 14:27:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69EEFDBC446; Sat, 18 Nov 2017 14:27:02 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE7CC71BF8; Sat, 18 Nov 2017 14:27:01 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAIER03s059287; Sat, 18 Nov 2017 14:27:00 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAIEQolF059175; Sat, 18 Nov 2017 14:26:50 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201711181426.vAIEQolF059175@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 18 Nov 2017 14:26:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325966 - in head: lib/libc/arm/gen lib/libc/locale lib/libc/mips lib/libc/mips/gen lib/libc/net lib/libc/rpc lib/libcam lib/libkiconv lib/libprocstat lib/librpcsvc lib/libthr/sys lib/l... X-SVN-Group: head X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: in head: lib/libc/arm/gen lib/libc/locale lib/libc/mips lib/libc/mips/gen lib/libc/net lib/libc/rpc lib/libcam lib/libkiconv lib/libprocstat lib/librpcsvc lib/libthr/sys lib/libthr/thread lib/msun/bsd... X-SVN-Commit-Revision: 325966 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 14:27:02 -0000 Author: pfg Date: Sat Nov 18 14:26:50 2017 New Revision: 325966 URL: https://svnweb.freebsd.org/changeset/base/325966 Log: spdx: initial adoption of licensing ID tags. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Initially, only tag files that use BSD 4-Clause "Original" license. RelNotes: yes Differential Revision: https://reviews.freebsd.org/D13133 Modified: head/lib/libc/arm/gen/fabs.c head/lib/libc/locale/euc.c head/lib/libc/mips/SYS.h head/lib/libc/mips/gen/fabs.c head/lib/libc/net/ether_addr.c head/lib/libc/rpc/crypt_client.c head/lib/libcam/camlib.h head/lib/libcam/scsi_cmdparse.c head/lib/libkiconv/xlat16_sysctl.c head/lib/libprocstat/cd9660.c head/lib/libprocstat/common_kvm.c head/lib/libprocstat/libprocstat.c head/lib/libprocstat/msdosfs.c head/lib/librpcsvc/yp_passwd.c head/lib/librpcsvc/yp_update.c head/lib/libthr/sys/thr_error.c head/lib/libthr/thread/thr_attr.c head/lib/libthr/thread/thr_autoinit.c head/lib/libthr/thread/thr_concurrency.c head/lib/libthr/thread/thr_getschedparam.c head/lib/libthr/thread/thr_init.c head/lib/libthr/thread/thr_mutex.c head/lib/libthr/thread/thr_setschedparam.c head/lib/libthr/thread/thr_switch_np.c head/lib/msun/bsdsrc/b_exp.c head/lib/msun/bsdsrc/b_log.c head/lib/msun/bsdsrc/b_tgamma.c head/lib/msun/bsdsrc/mathimpl.h head/libexec/mknetid/hash.c head/libexec/mknetid/hash.h head/libexec/mknetid/mknetid.c head/libexec/revnetgroup/hash.c head/libexec/revnetgroup/hash.h head/libexec/revnetgroup/revnetgroup.c head/libexec/ypxfr/yp_dbwrite.c head/libexec/ypxfr/ypxfr_extern.h head/libexec/ypxfr/ypxfr_getmap.c head/libexec/ypxfr/ypxfr_main.c head/libexec/ypxfr/ypxfr_misc.c head/libexec/ypxfr/ypxfrd_getmap.c head/release/picobsd/tinyware/login/pathnames.h head/release/picobsd/tinyware/login/pico-login.c head/release/picobsd/tinyware/passwd/extern.h head/release/picobsd/tinyware/passwd/local_passwd.c head/release/picobsd/tinyware/passwd/passwd.c head/release/picobsd/tinyware/passwd/pw_copy.c head/release/picobsd/tinyware/passwd/pw_util.c head/release/picobsd/tinyware/passwd/pw_util.h head/sbin/bsdlabel/bsdlabel.c head/sbin/etherswitchcfg/ifmedia.c head/sbin/ffsinfo/ffsinfo.c head/sbin/growfs/debug.c head/sbin/growfs/debug.h head/sbin/growfs/growfs.c head/sbin/gvinum/gvinum.h head/sbin/ifconfig/ifmedia.c head/sbin/ifconfig/ifvlan.c head/sbin/rcorder/ealloc.c head/sbin/rcorder/hash.c head/sbin/rcorder/hash.h head/sbin/rcorder/sprite.h head/sys/amd64/amd64/in_cksum.c head/sys/amd64/amd64/machdep.c head/sys/amd64/amd64/pmap.c head/sys/amd64/amd64/trap.c head/sys/amd64/amd64/vm_machdep.c head/sys/amd64/ia32/ia32_syscall.c head/sys/amd64/include/floatingpoint.h head/sys/amd64/include/ieeefp.h head/sys/amd64/include/param.h head/sys/amd64/include/varargs.h head/sys/amd64/include/vmparam.h head/sys/arm/arm/autoconf.c head/sys/arm/arm/in_cksum.c head/sys/arm/arm/vm_machdep.c head/sys/arm/include/_align.h head/sys/arm/include/_types.h head/sys/arm/include/floatingpoint.h head/sys/arm/include/param.h head/sys/arm/include/proc.h head/sys/arm/include/profile.h head/sys/arm/include/reloc.h head/sys/compat/linprocfs/linprocfs.c head/sys/compat/ndis/cfg_var.h head/sys/compat/ndis/hal_var.h head/sys/compat/ndis/kern_ndis.c head/sys/compat/ndis/kern_windrv.c head/sys/compat/ndis/ndis_var.h head/sys/compat/ndis/ntoskrnl_var.h head/sys/compat/ndis/pe_var.h head/sys/compat/ndis/resource_var.h head/sys/compat/ndis/subr_hal.c head/sys/compat/ndis/subr_ndis.c head/sys/compat/ndis/subr_ntoskrnl.c head/sys/compat/ndis/subr_pe.c head/sys/compat/ndis/subr_usbd.c head/sys/compat/ndis/usbd_var.h head/sys/dev/an/if_aironet_ieee.h head/sys/dev/an/if_an.c head/sys/dev/an/if_an_isa.c head/sys/dev/an/if_an_pccard.c head/sys/dev/an/if_an_pci.c head/sys/dev/an/if_anreg.h head/sys/dev/bge/if_bge.c head/sys/dev/bge/if_bgereg.h head/sys/dev/dc/dcphy.c head/sys/dev/dc/if_dc.c head/sys/dev/dc/if_dcreg.h head/sys/dev/dc/pnphy.c head/sys/dev/dcons/dcons.c head/sys/dev/dcons/dcons.h head/sys/dev/dcons/dcons_crom.c head/sys/dev/dcons/dcons_os.c head/sys/dev/dcons/dcons_os.h head/sys/dev/firewire/fwcrom.c head/sys/dev/firewire/fwdma.c head/sys/dev/firewire/fwdma.h head/sys/dev/firewire/fwmem.c head/sys/dev/firewire/fwmem.h head/sys/dev/firewire/fwphyreg.h head/sys/dev/firewire/if_fwe.c head/sys/dev/firewire/if_fwevar.h head/sys/dev/firewire/if_fwip.c head/sys/dev/firewire/if_fwipvar.h head/sys/dev/firewire/sbp_targ.c head/sys/dev/ic/i82586.h head/sys/dev/if_ndis/if_ndis.c head/sys/dev/if_ndis/if_ndis_pccard.c head/sys/dev/if_ndis/if_ndis_pci.c head/sys/dev/if_ndis/if_ndis_usb.c head/sys/dev/if_ndis/if_ndisvar.h head/sys/dev/lge/if_lge.c head/sys/dev/lge/if_lgereg.h head/sys/dev/mii/amphy.c head/sys/dev/mii/amphyreg.h head/sys/dev/mii/brgphy.c head/sys/dev/mii/brgphyreg.h head/sys/dev/mii/ciphy.c head/sys/dev/mii/ciphyreg.h head/sys/dev/mii/mlphy.c head/sys/dev/mii/nsgphyreg.h head/sys/dev/mii/pnaphy.c head/sys/dev/mii/rgephy.c head/sys/dev/mii/rgephyreg.h head/sys/dev/mii/rlphy.c head/sys/dev/mii/rlswitch.c head/sys/dev/mii/xmphy.c head/sys/dev/mii/xmphyreg.h head/sys/dev/msk/if_msk.c head/sys/dev/msk/if_mskreg.h head/sys/dev/nge/if_nge.c head/sys/dev/nge/if_ngereg.h head/sys/dev/pcn/if_pcn.c head/sys/dev/pcn/if_pcnreg.h head/sys/dev/ppbus/lpt.c head/sys/dev/re/if_re.c head/sys/dev/sf/if_sf.c head/sys/dev/sf/if_sfreg.h head/sys/dev/sge/if_sge.c head/sys/dev/sge/if_sgereg.h head/sys/dev/sis/if_sis.c head/sys/dev/sis/if_sisreg.h head/sys/dev/sk/if_sk.c head/sys/dev/sk/if_skreg.h head/sys/dev/sk/xmaciireg.h head/sys/dev/ste/if_ste.c head/sys/dev/ste/if_stereg.h head/sys/dev/ti/if_ti.c head/sys/dev/ti/if_tireg.h head/sys/dev/tl/if_tl.c head/sys/dev/tl/if_tlreg.h head/sys/dev/txp/if_txp.c head/sys/dev/usb/net/if_aue.c head/sys/dev/usb/net/if_auereg.h head/sys/dev/usb/net/if_axe.c head/sys/dev/usb/net/if_axereg.h head/sys/dev/usb/net/if_cdce.c head/sys/dev/usb/net/if_cdcereg.h head/sys/dev/usb/net/if_cue.c head/sys/dev/usb/net/if_cuereg.h head/sys/dev/usb/net/if_kue.c head/sys/dev/usb/net/if_kuefw.h head/sys/dev/usb/net/if_kuereg.h head/sys/dev/usb/net/if_mosreg.h head/sys/dev/usb/net/if_rue.c head/sys/dev/vge/if_vge.c head/sys/dev/vge/if_vgereg.h head/sys/dev/vge/if_vgevar.h head/sys/dev/vr/if_vr.c head/sys/dev/vr/if_vrreg.h head/sys/dev/wb/if_wb.c head/sys/dev/wb/if_wbreg.h head/sys/dev/wi/if_wavelan_ieee.h head/sys/dev/wi/if_wi_macio.c head/sys/dev/wi/if_wi_pccard.c head/sys/dev/wi/if_wi_pci.c head/sys/dev/wi/if_wireg.h head/sys/dev/wi/if_wivar.h head/sys/dev/xl/if_xl.c head/sys/dev/xl/if_xlreg.h head/sys/fs/procfs/procfs.c head/sys/fs/procfs/procfs_rlimit.c head/sys/geom/vinum/geom_vinum_share.c head/sys/geom/vinum/geom_vinum_subr.c head/sys/geom/vinum/geom_vinum_var.h head/sys/i386/i386/longrun.c head/sys/i386/i386/machdep.c head/sys/i386/i386/pmap.c head/sys/i386/i386/trap.c head/sys/i386/i386/vm_machdep.c head/sys/i386/ibcs2/ibcs2_misc.c head/sys/i386/include/floatingpoint.h head/sys/i386/include/ieeefp.h head/sys/isa/pnpreg.h head/sys/kern/init_main.c head/sys/kern/kern_acct.c head/sys/kern/ksched.c head/sys/kern/p1003_1b.c head/sys/kern/posix4_mib.c head/sys/kern/subr_syscall.c head/sys/kern/subr_trap.c head/sys/libkern/strcasecmp.c head/sys/libkern/strstr.c head/sys/mips/include/_types.h head/sys/mips/include/cpuinfo.h head/sys/mips/include/floatingpoint.h head/sys/mips/include/reloc.h head/sys/mips/mips/db_disasm.c head/sys/mips/mips/in_cksum.c head/sys/mips/mips/sys_machdep.c head/sys/net/fddi.h head/sys/net/if_arcsubr.c head/sys/net/if_fddisubr.c head/sys/netinet6/ip6_id.c head/sys/netsmb/smb_crypt.c head/sys/nfs/bootp_subr.c head/sys/nfs/krpc_subr.c head/sys/powerpc/fpu/fpu_emu.c head/sys/powerpc/include/_align.h head/sys/powerpc/include/_types.h head/sys/powerpc/include/param.h head/sys/powerpc/powerpc/in_cksum.c head/sys/powerpc/powerpc/vm_machdep.c head/sys/riscv/riscv/in_cksum.c head/sys/riscv/riscv/pmap.c head/sys/sparc64/include/cache.h head/sys/sparc64/sparc64/cache.c head/sys/sparc64/sparc64/eeprom.c head/sys/sys/kernel.h head/sys/sys/pioctl.h head/sys/sys/posix4.h head/sys/sys/sched.h head/sys/sys/tiio.h head/sys/vm/swap_pager.c head/sys/vm/vm_fault.c head/sys/vm/vm_pageout.c head/sys/vm/vnode_pager.c head/sys/x86/include/_align.h head/sys/x86/include/_types.h head/tools/regression/p1003_1b/fifo.c head/tools/regression/p1003_1b/memlock.c head/tools/regression/p1003_1b/p26.c head/tools/regression/p1003_1b/sched.c head/tools/regression/p1003_1b/yield.c head/usr.bin/chpass/chpass.c head/usr.bin/chpass/chpass.h head/usr.bin/chpass/edit.c head/usr.bin/chpass/field.c head/usr.bin/chpass/util.c head/usr.bin/diff/diffreg.c head/usr.bin/indent/args.c head/usr.bin/indent/indent.c head/usr.bin/indent/indent_codes.h head/usr.bin/indent/indent_globs.h head/usr.bin/indent/io.c head/usr.bin/indent/lexi.c head/usr.bin/indent/parse.c head/usr.bin/indent/pr_comment.c head/usr.bin/locate/bigram/locate.bigram.c head/usr.bin/locate/code/locate.code.c head/usr.bin/locate/locate/fastfind.c head/usr.bin/locate/locate/locate.c head/usr.bin/locate/locate/locate.h head/usr.bin/locate/locate/pathnames.h head/usr.bin/locate/locate/util.c head/usr.bin/login/login.c head/usr.bin/netstat/mbuf.c head/usr.bin/netstat/mroute.c head/usr.bin/netstat/mroute6.c head/usr.bin/pr/egetopt.c head/usr.bin/pr/extern.h head/usr.bin/pr/pr.c head/usr.bin/pr/pr.h head/usr.bin/rup/rup.c head/usr.bin/rusers/rusers.c head/usr.bin/rwall/rwall.c head/usr.bin/truss/amd64-freebsd.c head/usr.bin/truss/amd64-freebsd32.c head/usr.bin/truss/amd64-linux.c head/usr.bin/truss/amd64-linux32.c head/usr.bin/truss/arm-freebsd.c head/usr.bin/truss/extern.h head/usr.bin/truss/i386-freebsd.c head/usr.bin/truss/i386-linux.c head/usr.bin/truss/main.c head/usr.bin/truss/mips-freebsd.c head/usr.bin/truss/setup.c head/usr.bin/truss/sparc64-freebsd.c head/usr.bin/truss/syscalls.c head/usr.bin/uname/uname.c head/usr.sbin/ancontrol/ancontrol.c head/usr.sbin/dconschat/dconschat.c head/usr.sbin/fwcontrol/fwcontrol.c head/usr.sbin/fwcontrol/fwdv.c head/usr.sbin/fwcontrol/fwmpegts.c head/usr.sbin/kldxref/ef.c head/usr.sbin/kldxref/ef_obj.c head/usr.sbin/kldxref/kldxref.c head/usr.sbin/lpr/common_source/common.c head/usr.sbin/lpr/common_source/net.c head/usr.sbin/lpr/common_source/printcap.c head/usr.sbin/lpr/lpr/lpr.c head/usr.sbin/makefs/ffs.c head/usr.sbin/manctl/manctl.sh head/usr.sbin/ndiscvt/inf-parse.y head/usr.sbin/ndiscvt/inf-token.l head/usr.sbin/ndiscvt/inf.c head/usr.sbin/ndiscvt/ndiscvt.c head/usr.sbin/ndiscvt/ndisgen.sh head/usr.sbin/ndiscvt/windrv_stub.c head/usr.sbin/rpc.lockd/lock_proc.c head/usr.sbin/rpc.lockd/lockd.c head/usr.sbin/rpc.lockd/lockd.h head/usr.sbin/rpc.lockd/lockd_lock.c head/usr.sbin/rpc.statd/file.c head/usr.sbin/rpc.statd/procs.c head/usr.sbin/rpc.statd/statd.c head/usr.sbin/rpc.statd/statd.h head/usr.sbin/rpc.yppasswdd/yppasswdd_extern.h head/usr.sbin/rpc.yppasswdd/yppasswdd_main.c head/usr.sbin/rpc.yppasswdd/yppasswdd_server.c head/usr.sbin/rpc.ypupdated/yp_dbdelete.c head/usr.sbin/rpc.ypupdated/yp_dbupdate.c head/usr.sbin/rpc.ypupdated/ypupdated_main.c head/usr.sbin/rpc.ypupdated/ypupdated_server.c head/usr.sbin/rpc.ypxfrd/ypxfrd_extern.h head/usr.sbin/rpc.ypxfrd/ypxfrd_main.c head/usr.sbin/rpc.ypxfrd/ypxfrd_server.c head/usr.sbin/rrenumd/rrenumd.h head/usr.sbin/wpa/ndis_events/ndis_events.c head/usr.sbin/wpa/wpa_supplicant/Packet32.c head/usr.sbin/wpa/wpa_supplicant/Packet32.h head/usr.sbin/yp_mkdb/yp_mkdb.c head/usr.sbin/ypbind/yp_ping.c head/usr.sbin/yppush/yppush_main.c head/usr.sbin/ypserv/yp_access.c head/usr.sbin/ypserv/yp_dblookup.c head/usr.sbin/ypserv/yp_dnslookup.c head/usr.sbin/ypserv/yp_error.c head/usr.sbin/ypserv/yp_extern.h head/usr.sbin/ypserv/yp_main.c head/usr.sbin/ypserv/yp_server.c head/usr.sbin/ypserv/yp_svc_udp.c Modified: head/lib/libc/arm/gen/fabs.c ============================================================================== --- head/lib/libc/arm/gen/fabs.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/lib/libc/arm/gen/fabs.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,6 +1,8 @@ /* $NetBSD: fabs.c,v 1.2 2002/05/26 11:48:01 wiz Exp $ */ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1996 Mark Brinicombe * * Redistribution and use in source and binary forms, with or without Modified: head/lib/libc/locale/euc.c ============================================================================== --- head/lib/libc/locale/euc.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/lib/libc/locale/euc.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright 2013 Garrett D'Amore * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2002-2004 Tim J. Robbins. All rights reserved. Modified: head/lib/libc/mips/SYS.h ============================================================================== --- head/lib/libc/mips/SYS.h Sat Nov 18 13:21:22 2017 (r325965) +++ head/lib/libc/mips/SYS.h Sat Nov 18 14:26:50 2017 (r325966) @@ -2,6 +2,8 @@ /* $FreeBSD$ */ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1996 Jonathan Stone * All rights reserved. * Modified: head/lib/libc/mips/gen/fabs.c ============================================================================== --- head/lib/libc/mips/gen/fabs.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/lib/libc/mips/gen/fabs.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,6 +1,8 @@ /* $NetBSD: fabs.c,v 1.2 2002/05/26 11:48:01 wiz Exp $ */ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1996 Mark Brinicombe * * Redistribution and use in source and binary forms, with or without Modified: head/lib/libc/net/ether_addr.c ============================================================================== --- head/lib/libc/net/ether_addr.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/lib/libc/net/ether_addr.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1995 Bill Paul . * Copyright (c) 2007 Robert N. M. Watson * All rights reserved. Modified: head/lib/libc/rpc/crypt_client.c ============================================================================== --- head/lib/libc/rpc/crypt_client.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/lib/libc/rpc/crypt_client.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1996 * Bill Paul . All rights reserved. * Modified: head/lib/libcam/camlib.h ============================================================================== --- head/lib/libcam/camlib.h Sat Nov 18 13:21:22 2017 (r325965) +++ head/lib/libcam/camlib.h Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause AND BSD-2-Clause-FreeBSD + * * Copyright (c) 1997, 1998 Kenneth D. Merry. * All rights reserved. * Modified: head/lib/libcam/scsi_cmdparse.c ============================================================================== --- head/lib/libcam/scsi_cmdparse.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/lib/libcam/scsi_cmdparse.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,7 +1,10 @@ /* * Taken from the original FreeBSD user SCSI library. */ -/* Copyright (c) 1994 HD Associates +/*- + * SPDX-License-Identifier: BSD-4-Clause + * + * Copyright (c) 1994 HD Associates * (contact: dufault@hda.com) * All rights reserved. * Modified: head/lib/libkiconv/xlat16_sysctl.c ============================================================================== --- head/lib/libkiconv/xlat16_sysctl.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/lib/libkiconv/xlat16_sysctl.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 2000-2001, Boris Popov * All rights reserved. * Modified: head/lib/libprocstat/cd9660.c ============================================================================== --- head/lib/libprocstat/cd9660.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/lib/libprocstat/cd9660.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /* + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 2000 Peter Edwards * Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. Modified: head/lib/libprocstat/common_kvm.c ============================================================================== --- head/lib/libprocstat/common_kvm.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/lib/libprocstat/common_kvm.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 2009 Stanislav Sedov * Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. Modified: head/lib/libprocstat/libprocstat.c ============================================================================== --- head/lib/libprocstat/libprocstat.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/lib/libprocstat/libprocstat.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 2017 Dell EMC * Copyright (c) 2009 Stanislav Sedov * Copyright (c) 1988, 1993 Modified: head/lib/libprocstat/msdosfs.c ============================================================================== --- head/lib/libprocstat/msdosfs.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/lib/libprocstat/msdosfs.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 2000 Peter Edwards * Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. Modified: head/lib/librpcsvc/yp_passwd.c ============================================================================== --- head/lib/librpcsvc/yp_passwd.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/lib/librpcsvc/yp_passwd.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1995, 1996 * Bill Paul . All rights reserved. * Modified: head/lib/librpcsvc/yp_update.c ============================================================================== --- head/lib/librpcsvc/yp_update.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/lib/librpcsvc/yp_update.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1995, 1996 * Bill Paul . All rights reserved. * Modified: head/lib/libthr/sys/thr_error.c ============================================================================== --- head/lib/libthr/sys/thr_error.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/lib/libthr/sys/thr_error.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1995 John Birrell . * Copyright (c) 1994 by Chris Provenzano, proven@mit.edu * All rights reserved. Modified: head/lib/libthr/thread/thr_attr.c ============================================================================== --- head/lib/libthr/thread/thr_attr.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/lib/libthr/thread/thr_attr.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 2003 Craig Rodrigues . * All rights reserved. * Modified: head/lib/libthr/thread/thr_autoinit.c ============================================================================== --- head/lib/libthr/thread/thr_autoinit.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/lib/libthr/thread/thr_autoinit.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 2002 Alfred Perlstein . * Copyright (c) 1995 John Birrell . * All rights reserved. Modified: head/lib/libthr/thread/thr_concurrency.c ============================================================================== --- head/lib/libthr/thread/thr_concurrency.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/lib/libthr/thread/thr_concurrency.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 2003 Sergey Osokin . * All rights reserved. * Modified: head/lib/libthr/thread/thr_getschedparam.c ============================================================================== --- head/lib/libthr/thread/thr_getschedparam.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/lib/libthr/thread/thr_getschedparam.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1998 Daniel Eischen . * All rights reserved. * Modified: head/lib/libthr/thread/thr_init.c ============================================================================== --- head/lib/libthr/thread/thr_init.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/lib/libthr/thread/thr_init.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 2003 Daniel M. Eischen * Copyright (c) 1995-1998 John Birrell * All rights reserved. Modified: head/lib/libthr/thread/thr_mutex.c ============================================================================== --- head/lib/libthr/thread/thr_mutex.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/lib/libthr/thread/thr_mutex.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1995 John Birrell . * Copyright (c) 2006 David Xu . * Copyright (c) 2015, 2016 The FreeBSD Foundation Modified: head/lib/libthr/thread/thr_setschedparam.c ============================================================================== --- head/lib/libthr/thread/thr_setschedparam.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/lib/libthr/thread/thr_setschedparam.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1998 Daniel Eischen . * All rights reserved. * Modified: head/lib/libthr/thread/thr_switch_np.c ============================================================================== --- head/lib/libthr/thread/thr_switch_np.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/lib/libthr/thread/thr_switch_np.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1998 Daniel Eischen . * All rights reserved. * Modified: head/lib/msun/bsdsrc/b_exp.c ============================================================================== --- head/lib/msun/bsdsrc/b_exp.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/lib/msun/bsdsrc/b_exp.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1985, 1993 * The Regents of the University of California. All rights reserved. * Modified: head/lib/msun/bsdsrc/b_log.c ============================================================================== --- head/lib/msun/bsdsrc/b_log.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/lib/msun/bsdsrc/b_log.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. * Modified: head/lib/msun/bsdsrc/b_tgamma.c ============================================================================== --- head/lib/msun/bsdsrc/b_tgamma.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/lib/msun/bsdsrc/b_tgamma.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. * Modified: head/lib/msun/bsdsrc/mathimpl.h ============================================================================== --- head/lib/msun/bsdsrc/mathimpl.h Sat Nov 18 13:21:22 2017 (r325965) +++ head/lib/msun/bsdsrc/mathimpl.h Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. * Modified: head/libexec/mknetid/hash.c ============================================================================== --- head/libexec/mknetid/hash.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/libexec/mknetid/hash.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1995 * Bill Paul . All rights reserved. * Modified: head/libexec/mknetid/hash.h ============================================================================== --- head/libexec/mknetid/hash.h Sat Nov 18 13:21:22 2017 (r325965) +++ head/libexec/mknetid/hash.h Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1995, 1996 * Bill Paul . All rights reserved. * Modified: head/libexec/mknetid/mknetid.c ============================================================================== --- head/libexec/mknetid/mknetid.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/libexec/mknetid/mknetid.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1995, 1996 * Bill Paul . All rights reserved. * Modified: head/libexec/revnetgroup/hash.c ============================================================================== --- head/libexec/revnetgroup/hash.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/libexec/revnetgroup/hash.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1995 * Bill Paul . All rights reserved. * Modified: head/libexec/revnetgroup/hash.h ============================================================================== --- head/libexec/revnetgroup/hash.h Sat Nov 18 13:21:22 2017 (r325965) +++ head/libexec/revnetgroup/hash.h Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1995 * Bill Paul . All rights reserved. * Modified: head/libexec/revnetgroup/revnetgroup.c ============================================================================== --- head/libexec/revnetgroup/revnetgroup.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/libexec/revnetgroup/revnetgroup.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1995 * Bill Paul . All rights reserved. * Modified: head/libexec/ypxfr/yp_dbwrite.c ============================================================================== --- head/libexec/ypxfr/yp_dbwrite.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/libexec/ypxfr/yp_dbwrite.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1995 * Bill Paul . All rights reserved. * Modified: head/libexec/ypxfr/ypxfr_extern.h ============================================================================== --- head/libexec/ypxfr/ypxfr_extern.h Sat Nov 18 13:21:22 2017 (r325965) +++ head/libexec/ypxfr/ypxfr_extern.h Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1995 * Bill Paul . All rights reserved. * Modified: head/libexec/ypxfr/ypxfr_getmap.c ============================================================================== --- head/libexec/ypxfr/ypxfr_getmap.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/libexec/ypxfr/ypxfr_getmap.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1995 * Bill Paul . All rights reserved. * Modified: head/libexec/ypxfr/ypxfr_main.c ============================================================================== --- head/libexec/ypxfr/ypxfr_main.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/libexec/ypxfr/ypxfr_main.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1995 * Bill Paul . All rights reserved. * Modified: head/libexec/ypxfr/ypxfr_misc.c ============================================================================== --- head/libexec/ypxfr/ypxfr_misc.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/libexec/ypxfr/ypxfr_misc.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1995 * Bill Paul . All rights reserved. * Modified: head/libexec/ypxfr/ypxfrd_getmap.c ============================================================================== --- head/libexec/ypxfr/ypxfrd_getmap.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/libexec/ypxfr/ypxfrd_getmap.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1995, 1996 * Bill Paul . All rights reserved. * Modified: head/release/picobsd/tinyware/login/pathnames.h ============================================================================== --- head/release/picobsd/tinyware/login/pathnames.h Sat Nov 18 13:21:22 2017 (r325965) +++ head/release/picobsd/tinyware/login/pathnames.h Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. * Modified: head/release/picobsd/tinyware/login/pico-login.c ============================================================================== --- head/release/picobsd/tinyware/login/pico-login.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/release/picobsd/tinyware/login/pico-login.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1980, 1987, 1988, 1991, 1993, 1994 * The Regents of the University of California. All rights reserved. * Modified: head/release/picobsd/tinyware/passwd/extern.h ============================================================================== --- head/release/picobsd/tinyware/passwd/extern.h Sat Nov 18 13:21:22 2017 (r325965) +++ head/release/picobsd/tinyware/passwd/extern.h Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1994 * The Regents of the University of California. All rights reserved. * Modified: head/release/picobsd/tinyware/passwd/local_passwd.c ============================================================================== --- head/release/picobsd/tinyware/passwd/local_passwd.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/release/picobsd/tinyware/passwd/local_passwd.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1990, 1993, 1994 * The Regents of the University of California. All rights reserved. * Modified: head/release/picobsd/tinyware/passwd/passwd.c ============================================================================== --- head/release/picobsd/tinyware/passwd/passwd.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/release/picobsd/tinyware/passwd/passwd.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1988, 1993, 1994 * The Regents of the University of California. All rights reserved. * Modified: head/release/picobsd/tinyware/passwd/pw_copy.c ============================================================================== --- head/release/picobsd/tinyware/passwd/pw_copy.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/release/picobsd/tinyware/passwd/pw_copy.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1990, 1993, 1994 * The Regents of the University of California. All rights reserved. * Modified: head/release/picobsd/tinyware/passwd/pw_util.c ============================================================================== --- head/release/picobsd/tinyware/passwd/pw_util.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/release/picobsd/tinyware/passwd/pw_util.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1990, 1993, 1994 * The Regents of the University of California. All rights reserved. * Modified: head/release/picobsd/tinyware/passwd/pw_util.h ============================================================================== --- head/release/picobsd/tinyware/passwd/pw_util.h Sat Nov 18 13:21:22 2017 (r325965) +++ head/release/picobsd/tinyware/passwd/pw_util.h Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1994 * The Regents of the University of California. All rights reserved. * Modified: head/sbin/bsdlabel/bsdlabel.c ============================================================================== --- head/sbin/bsdlabel/bsdlabel.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/sbin/bsdlabel/bsdlabel.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1994, 1995 Gordon W. Ross * Copyright (c) 1994 Theo de Raadt * All rights reserved. Modified: head/sbin/etherswitchcfg/ifmedia.c ============================================================================== --- head/sbin/etherswitchcfg/ifmedia.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/sbin/etherswitchcfg/ifmedia.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,7 +1,9 @@ /* $NetBSD: ifconfig.c,v 1.34 1997/04/21 01:17:58 lukem Exp $ */ /* $FreeBSD$ */ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1997 Jason R. Thorpe. * All rights reserved. * Modified: head/sbin/ffsinfo/ffsinfo.c ============================================================================== --- head/sbin/ffsinfo/ffsinfo.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/sbin/ffsinfo/ffsinfo.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 2000 Christoph Herrmann, Thomas-Henning von Kamptz * Copyright (c) 1980, 1989, 1993 The Regents of the University of California. * All rights reserved. Modified: head/sbin/growfs/debug.c ============================================================================== --- head/sbin/growfs/debug.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/sbin/growfs/debug.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 2000 Christoph Herrmann, Thomas-Henning von Kamptz * Copyright (c) 1980, 1989, 1993 The Regents of the University of California. * All rights reserved. Modified: head/sbin/growfs/debug.h ============================================================================== --- head/sbin/growfs/debug.h Sat Nov 18 13:21:22 2017 (r325965) +++ head/sbin/growfs/debug.h Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 2000 Christoph Herrmann, Thomas-Henning von Kamptz * Copyright (c) 1980, 1989, 1993 The Regents of the University of California. * All rights reserved. Modified: head/sbin/growfs/growfs.c ============================================================================== --- head/sbin/growfs/growfs.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/sbin/growfs/growfs.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1980, 1989, 1993 The Regents of the University of California. * Copyright (c) 2000 Christoph Herrmann, Thomas-Henning von Kamptz * Copyright (c) 2012 The FreeBSD Foundation Modified: head/sbin/gvinum/gvinum.h ============================================================================== --- head/sbin/gvinum/gvinum.h Sat Nov 18 13:21:22 2017 (r325965) +++ head/sbin/gvinum/gvinum.h Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1997, 1998 * Nan Yang Computer Services Limited. All rights reserved. * Modified: head/sbin/ifconfig/ifmedia.c ============================================================================== --- head/sbin/ifconfig/ifmedia.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/sbin/ifconfig/ifmedia.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,7 +1,9 @@ /* $NetBSD: ifconfig.c,v 1.34 1997/04/21 01:17:58 lukem Exp $ */ /* $FreeBSD$ */ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1997 Jason R. Thorpe. * All rights reserved. * Modified: head/sbin/ifconfig/ifvlan.c ============================================================================== --- head/sbin/ifconfig/ifvlan.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/sbin/ifconfig/ifvlan.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1999 Bill Paul * Copyright (c) 2012 ADARA Networks, Inc. * All rights reserved. Modified: head/sbin/rcorder/ealloc.c ============================================================================== --- head/sbin/rcorder/ealloc.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/sbin/rcorder/ealloc.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,7 +1,9 @@ /* $FreeBSD$ */ /* $NetBSD: ealloc.c,v 1.1.1.1 1999/11/19 04:30:56 mrg Exp $ */ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1988, 1989, 1990, 1993 * The Regents of the University of California. All rights reserved. * Copyright (c) 1989 by Berkeley Softworks Modified: head/sbin/rcorder/hash.c ============================================================================== --- head/sbin/rcorder/hash.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/sbin/rcorder/hash.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,7 +1,9 @@ /* $FreeBSD$ */ /* $NetBSD: hash.c,v 1.1.1.1 1999/11/19 04:30:56 mrg Exp $ */ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. * Copyright (c) 1988, 1989 by Adam de Boor * Copyright (c) 1989 by Berkeley Softworks Modified: head/sbin/rcorder/hash.h ============================================================================== --- head/sbin/rcorder/hash.h Sat Nov 18 13:21:22 2017 (r325965) +++ head/sbin/rcorder/hash.h Sat Nov 18 14:26:50 2017 (r325966) @@ -1,7 +1,9 @@ /* $FreeBSD$ */ /* $NetBSD: hash.h,v 1.1.1.1 1999/11/19 04:30:56 mrg Exp $ */ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. * Copyright (c) 1988, 1989 by Adam de Boor * Copyright (c) 1989 by Berkeley Softworks Modified: head/sbin/rcorder/sprite.h ============================================================================== --- head/sbin/rcorder/sprite.h Sat Nov 18 13:21:22 2017 (r325965) +++ head/sbin/rcorder/sprite.h Sat Nov 18 14:26:50 2017 (r325966) @@ -1,6 +1,8 @@ /* $NetBSD: sprite.h,v 1.1 1999/11/23 05:28:22 mrg Exp $ */ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1988, 1989, 1990, 1993 * The Regents of the University of California. All rights reserved. * Copyright (c) 1989 by Berkeley Softworks @@ -38,6 +40,7 @@ * SUCH DAMAGE. * * from: @(#)sprite.h 8.1 (Berkeley) 6/6/93 + * $FreeBSD$ */ /* Modified: head/sys/amd64/amd64/in_cksum.c ============================================================================== --- head/sys/amd64/amd64/in_cksum.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/amd64/amd64/in_cksum.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,6 +1,8 @@ /* $NetBSD: in_cksum.c,v 1.7 1997/09/02 13:18:15 thorpej Exp $ */ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1988, 1992, 1993 * The Regents of the University of California. All rights reserved. * Copyright (c) 1996 Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/amd64/amd64/machdep.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 2003 Peter Wemm. * Copyright (c) 1992 Terrence R. Lambert. * Copyright (c) 1982, 1987, 1990 The Regents of the University of California. Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/amd64/amd64/pmap.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1991 Regents of the University of California. * All rights reserved. * Copyright (c) 1994 John S. Dyson Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/amd64/amd64/trap.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (C) 1994, David Greenman * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. Modified: head/sys/amd64/amd64/vm_machdep.c ============================================================================== --- head/sys/amd64/amd64/vm_machdep.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/amd64/amd64/vm_machdep.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1982, 1986 The Regents of the University of California. * Copyright (c) 1989, 1990 William Jolitz * Copyright (c) 1994 John Dyson Modified: head/sys/amd64/ia32/ia32_syscall.c ============================================================================== --- head/sys/amd64/ia32/ia32_syscall.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/amd64/ia32/ia32_syscall.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (C) 1994, David Greenman * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. Modified: head/sys/amd64/include/floatingpoint.h ============================================================================== --- head/sys/amd64/include/floatingpoint.h Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/amd64/include/floatingpoint.h Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1993 Andrew Moore, Talke Studio * All rights reserved. * Modified: head/sys/amd64/include/ieeefp.h ============================================================================== --- head/sys/amd64/include/ieeefp.h Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/amd64/include/ieeefp.h Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 2003 Peter Wemm. * Copyright (c) 1990 Andrew Moore, Talke Studio * All rights reserved. Modified: head/sys/amd64/include/param.h ============================================================================== --- head/sys/amd64/include/param.h Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/amd64/include/param.h Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 2002 David E. O'Brien. All rights reserved. * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. Modified: head/sys/amd64/include/varargs.h ============================================================================== --- head/sys/amd64/include/varargs.h Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/amd64/include/varargs.h Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 2002 David E. O'Brien. All rights reserved. * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. Modified: head/sys/amd64/include/vmparam.h ============================================================================== --- head/sys/amd64/include/vmparam.h Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/amd64/include/vmparam.h Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. * Copyright (c) 1994 John S. Dyson Modified: head/sys/arm/arm/autoconf.c ============================================================================== --- head/sys/arm/arm/autoconf.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/arm/arm/autoconf.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. * Modified: head/sys/arm/arm/in_cksum.c ============================================================================== --- head/sys/arm/arm/in_cksum.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/arm/arm/in_cksum.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,6 +1,8 @@ /* $NetBSD: in_cksum.c,v 1.7 1997/09/02 13:18:15 thorpej Exp $ */ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1988, 1992, 1993 * The Regents of the University of California. All rights reserved. * Copyright (c) 1996 Modified: head/sys/arm/arm/vm_machdep.c ============================================================================== --- head/sys/arm/arm/vm_machdep.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/arm/arm/vm_machdep.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1982, 1986 The Regents of the University of California. * Copyright (c) 1989, 1990 William Jolitz * Copyright (c) 1994 John Dyson Modified: head/sys/arm/include/_align.h ============================================================================== --- head/sys/arm/include/_align.h Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/arm/include/_align.h Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 2001 David E. O'Brien * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. Modified: head/sys/arm/include/_types.h ============================================================================== --- head/sys/arm/include/_types.h Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/arm/include/_types.h Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 2002 Mike Barcroft * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. Modified: head/sys/arm/include/floatingpoint.h ============================================================================== --- head/sys/arm/include/floatingpoint.h Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/arm/include/floatingpoint.h Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1993 Andrew Moore, Talke Studio * All rights reserved. * Modified: head/sys/arm/include/param.h ============================================================================== --- head/sys/arm/include/param.h Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/arm/include/param.h Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 2001 David E. O'Brien * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. Modified: head/sys/arm/include/proc.h ============================================================================== --- head/sys/arm/include/proc.h Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/arm/include/proc.h Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1991 Regents of the University of California. * All rights reserved. * Modified: head/sys/arm/include/profile.h ============================================================================== --- head/sys/arm/include/profile.h Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/arm/include/profile.h Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. * Modified: head/sys/arm/include/reloc.h ============================================================================== --- head/sys/arm/include/reloc.h Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/arm/include/reloc.h Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. * Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/compat/linprocfs/linprocfs.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 2000 Dag-Erling Coïdan Smørgrav * Copyright (c) 1999 Pierre Beyssac * Copyright (c) 1993 Jan-Simon Pendry Modified: head/sys/compat/ndis/cfg_var.h ============================================================================== --- head/sys/compat/ndis/cfg_var.h Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/compat/ndis/cfg_var.h Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 2003 * Bill Paul . All rights reserved. * Modified: head/sys/compat/ndis/hal_var.h ============================================================================== --- head/sys/compat/ndis/hal_var.h Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/compat/ndis/hal_var.h Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 2003 * Bill Paul . All rights reserved. * Modified: head/sys/compat/ndis/kern_ndis.c ============================================================================== --- head/sys/compat/ndis/kern_ndis.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/compat/ndis/kern_ndis.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 2003 * Bill Paul . All rights reserved. * Modified: head/sys/compat/ndis/kern_windrv.c ============================================================================== --- head/sys/compat/ndis/kern_windrv.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/compat/ndis/kern_windrv.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 2005 * Bill Paul . All rights reserved. * Modified: head/sys/compat/ndis/ndis_var.h ============================================================================== --- head/sys/compat/ndis/ndis_var.h Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/compat/ndis/ndis_var.h Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 2003 * Bill Paul . All rights reserved. * Modified: head/sys/compat/ndis/ntoskrnl_var.h ============================================================================== --- head/sys/compat/ndis/ntoskrnl_var.h Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/compat/ndis/ntoskrnl_var.h Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 2003 * Bill Paul . All rights reserved. * Modified: head/sys/compat/ndis/pe_var.h ============================================================================== --- head/sys/compat/ndis/pe_var.h Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/compat/ndis/pe_var.h Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 2003 * Bill Paul . All rights reserved. * Modified: head/sys/compat/ndis/resource_var.h ============================================================================== --- head/sys/compat/ndis/resource_var.h Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/compat/ndis/resource_var.h Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 2005 * Bill Paul . All rights reserved. * Modified: head/sys/compat/ndis/subr_hal.c ============================================================================== --- head/sys/compat/ndis/subr_hal.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/compat/ndis/subr_hal.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 2003 * Bill Paul . All rights reserved. * Modified: head/sys/compat/ndis/subr_ndis.c ============================================================================== --- head/sys/compat/ndis/subr_ndis.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/compat/ndis/subr_ndis.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 2003 * Bill Paul . All rights reserved. * Modified: head/sys/compat/ndis/subr_ntoskrnl.c ============================================================================== --- head/sys/compat/ndis/subr_ntoskrnl.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/compat/ndis/subr_ntoskrnl.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 2003 * Bill Paul . All rights reserved. * Modified: head/sys/compat/ndis/subr_pe.c ============================================================================== --- head/sys/compat/ndis/subr_pe.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/compat/ndis/subr_pe.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 2003 * Bill Paul . All rights reserved. * Modified: head/sys/compat/ndis/subr_usbd.c ============================================================================== --- head/sys/compat/ndis/subr_usbd.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/compat/ndis/subr_usbd.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 2005 * Bill Paul . All rights reserved. * Modified: head/sys/compat/ndis/usbd_var.h ============================================================================== --- head/sys/compat/ndis/usbd_var.h Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/compat/ndis/usbd_var.h Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 2003 * Bill Paul . All rights reserved. * Modified: head/sys/dev/an/if_aironet_ieee.h ============================================================================== --- head/sys/dev/an/if_aironet_ieee.h Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/dev/an/if_aironet_ieee.h Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1997, 1998, 1999 * Bill Paul . All rights reserved. * Modified: head/sys/dev/an/if_an.c ============================================================================== --- head/sys/dev/an/if_an.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/dev/an/if_an.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1997, 1998, 1999 * Bill Paul . All rights reserved. * Modified: head/sys/dev/an/if_an_isa.c ============================================================================== --- head/sys/dev/an/if_an_isa.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/dev/an/if_an_isa.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1997, 1998, 1999 * Bill Paul . All rights reserved. * Modified: head/sys/dev/an/if_an_pccard.c ============================================================================== --- head/sys/dev/an/if_an_pccard.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/dev/an/if_an_pccard.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1997, 1998, 1999 * Bill Paul . All rights reserved. * Modified: head/sys/dev/an/if_an_pci.c ============================================================================== --- head/sys/dev/an/if_an_pci.c Sat Nov 18 13:21:22 2017 (r325965) +++ head/sys/dev/an/if_an_pci.c Sat Nov 18 14:26:50 2017 (r325966) @@ -1,4 +1,6 @@ /*- *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Sat Nov 18 15:21:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20D3CDBD61D for ; Sat, 18 Nov 2017 15:21:23 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from sonic304-35.consmr.mail.ne1.yahoo.com (sonic304-35.consmr.mail.ne1.yahoo.com [66.163.191.161]) (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 E14BE732E9 for ; Sat, 18 Nov 2017 15:21:22 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1511018481; bh=SFdrIFwoxDN5PtB58uMEngoRZZd3Hun8GfYUT9KrwD0=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=KFPDEJOycX/RPWwBx/u6Php0yWt2v6YMvD/mOWy6eydRdatZmkcLe6opo/ioJAHpArTRXSvGvd5uQbSMXjdBHEepy0mIUXhD+EjJ73KY3r81nz7X8cqeWpzC54niGDM8PkDKy+w7N98aOCXxANuXKjZ2cgRYTa4t6/NpTpxKnzhnvA5E9faIZ45wPU9w91j2fFcBfRHhzbZ8/wYgi3Iab9AsA/WHWqNe5IDUfLnzlC/BshVulACYxnQHlFSMabTy4ZmEZQNp7I8v4+Ux1GXgJVbJiRdbbSlEWhB7ycF/b1SSfWsjsce8bFMSNzDNU3TwwRDCB3yCizPOhYzN5WcOFQ== X-YMail-OSG: DojSVFgVM1m1OyF1_p9kmNdfqblxg1ejd9sOZb0A8lG8EwFlQu0BmeWUwuRz.PR Hk2D_sr0shcavCQnUcEABnLsZbbebGRlaPzPbmQWu0xOCxoFPRIseNe6PsN.EeMNfXv8P8xDIKDX QE2OtPTRZzlE1RPI7uEPas2cvf7jqnBggzZ4M9HI9K3rSoY21VpOlhzICheG_tpinKWfWRyTlsl7 0i04oUgFJS6BZT_08hJn.PB32bC__nkNPeVMkQRen7u3T.llr8qfc3zYF4AK_bhp8d9FM96Y.u1s X86Ftv3lVTFs3IjssNuqGQtJgGsVjOoqrRkuYrwc4Dp7.NBPq46PdP3QEq4wjdcte2TR8DjsrZOL CRAum7.c_OqTy0ApV_hakpwpBhFVQ0kFk5yw0GCDy1zlFudw3tiDx9HyZgCyYANlgh.zC8iwZ1Zi 7jqQD8YRHoq9OEnAmdV53AR.FPug72SJlToR73vODlcVz9H4zjXGwhs6wnzTpzNxbt5Hm5J49H7U 8_SBRDRt3DXM8P0u5MTqAW.w0dZx8ZEwn3fZKNdpp Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.ne1.yahoo.com with HTTP; Sat, 18 Nov 2017 15:21:21 +0000 Received: from [127.0.0.1] by smtp207.mail.ne1.yahoo.com with NNFMP; 18 Nov 2017 15:01:05 -0000 X-Yahoo-Newman-Id: 541983.50450.bm@smtp207.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: DojSVFgVM1m1OyF1_p9kmNdfqblxg1ejd9sOZb0A8lG8EwF lQu0BmeWUwuRz.PRHk2D_sr0shcavCQnUcEABnLsZbbebGRlaPzPbmQWu0xO CxoFPRIseNe6PsN.EeMNfXv8P8xDIKDXQE2OtPTRZzlE1RPI7uEPas2cvf7j qnBggzZ4M9HI9K3rSoY21VpOlhzICheG_tpinKWfWRyTlsl70i04oUgFJS6B ZT_08hJn.PB32bC__nkNPeVMkQRen7u3T.llr8qfc3zYF4AK_bhp8d9FM96Y .u1sX86Ftv3lVTFs3IjssNuqGQtJgGsVjOoqrRkuYrwc4Dp7.NBPq46PdP3Q Eq4wjdcte2TR8DjsrZOLCRAum7.c_OqTy0ApV_hakpwpBhFVQ0kFk5yw0GCD y1zlFudw3tiDx9HyZgCyYANlgh.zC8iwZ1Zi7jqQD8YRHoq9OEnAmdV53AR. FPug72SJlToR73vODlcVz9H4zjXGwhs6wnzTpzNxbt5Hm5J49H7U8_SBRDRt 3DXM8P0u5MTqAW.w0dZx8ZEwn3fZKNdpp X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r325954 - in head: . share/mk sys/conf usr.sbin/config To: Stefan Esser Cc: rgrimes@freebsd.org, "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers , Warner Losh , "O. Hartmann" References: <201711180134.vAI1Y2ks064138@pdx.rh.CN85.dnsmgr.net> <29499AF9-FC0A-4CDA-9657-B092B3F9A0D0@FreeBSD.org> <04747a89-4dc7-a476-dc32-a158ee1f5240@freebsd.org> From: Pedro Giffuni Message-ID: <75597b23-7a8c-34ad-736b-8d68ce7dea06@FreeBSD.org> Date: Sat, 18 Nov 2017 10:01:03 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <04747a89-4dc7-a476-dc32-a158ee1f5240@freebsd.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 15:21:23 -0000 Hi; On 11/18/17 09:15, Stefan Esser wrote: > Am 18.11.17 um 03:31 schrieb Pedro Giffuni: >>> On Nov 17, 2017, at 20:34, Rodney W. Grimes wrote: >>> >>> [ Charset UTF-8 unsupported, converting... ] >>>> Kib@ posted to arch that we were removing it, nobody objected, we removed >>>> it. If it was a working feature that might have a few users, that's one >>>> thing. But I don't think make lint has actually worked in at least a decade. >>> Thats a sad state of affairs. >>> >> t’s not sad, just the way things are, modern compilers are doing much of the checking older tools like lint used to do.. OpenBSD and DragonflyBSD both killed lint ages ago. >> >> OTOH, we should probably consider other tools, like sparse: >> >> https://sparse.wiki.kernel.org/index.php/Main_Page >> >> The license is fine and it plays nice with the compiler. > It builds on -CURRENT, but the Makefile needs some tweaks (it does > not find LLVM or Gtk+-2.0, even though they are present on my system). > > I'll work on a port over the weekend ... Thanks! For it to be really useful we still would have to add annotations to the kernel headers. I just resurrected a recent proposal from brooks@ into the IdeasPage: https://wiki.freebsd.org/IdeasPage#Userspace_Address_Space_Annotation It is actually a fun project but my hands are full! Pedro. From owner-svn-src-head@freebsd.org Sat Nov 18 15:34:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8893DDBDD7D; Sat, 18 Nov 2017 15:34:32 +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 54F85739CB; Sat, 18 Nov 2017 15:34:32 +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 vAIFYVjX088335; Sat, 18 Nov 2017 15:34:31 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAIFYVFP088333; Sat, 18 Nov 2017 15:34:31 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201711181534.vAIFYVFP088333@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Sat, 18 Nov 2017 15:34:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325967 - in head: . etc etc/casper X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: in head: . etc etc/casper X-SVN-Commit-Revision: 325967 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 15:34:32 -0000 Author: oshogbo Date: Sat Nov 18 15:34:31 2017 New Revision: 325967 URL: https://svnweb.freebsd.org/changeset/base/325967 Log: Remove unused Casper configurations files. This is a reaming of Casper daemon. Deleted: head/etc/casper/ Modified: head/ObsoleteFiles.inc head/etc/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sat Nov 18 14:26:50 2017 (r325966) +++ head/ObsoleteFiles.inc Sat Nov 18 15:34:31 2017 (r325967) @@ -38,6 +38,13 @@ # xargs -n1 | sort | uniq -d; # done +# 20171118: Remove old etc capser failes +OLD_FILES+=etc/casper/system.dns +OLD_FILES+=etc/casper/system.grp +OLD_FILES+=etc/casper/system.pwd +OLD_FILES+=etc/casper/system.random +OLD_FILES+=etc/casper/system.sysctl +OLD_DIRS+=etc/casper # 20171116: lint(1) removal OLD_FILES+=usr/bin/lint OLD_FILES+=usr/libexec/lint1 Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Sat Nov 18 14:26:50 2017 (r325966) +++ head/etc/Makefile Sat Nov 18 15:34:31 2017 (r325967) @@ -228,9 +228,6 @@ distribution: .if ${MK_BLUETOOTH} != "no" ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install .endif -.if ${MK_CASPER} != "no" - ${_+_}cd ${.CURDIR}/casper; ${MAKE} install -.endif ${_+_}cd ${.CURDIR}/cron.d; ${MAKE} install ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install ${_+_}cd ${.CURDIR}/devd; ${MAKE} install From owner-svn-src-head@freebsd.org Sat Nov 18 15:46:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D393ADBE24B; Sat, 18 Nov 2017 15:46:51 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52CCF73FB9; Sat, 18 Nov 2017 15:46:51 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAIFkoVs092734; Sat, 18 Nov 2017 15:46:50 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAIFkm5Y092715; Sat, 18 Nov 2017 15:46:48 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201711181546.vAIFkm5Y092715@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sat, 18 Nov 2017 15:46:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325968 - in head/sys/gnu/dts: arm include/dt-bindings/clock include/dt-bindings/display include/dt-bindings/genpd include/dt-bindings/gpio include/dt-bindings/iio include/dt-bindings/i... X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/sys/gnu/dts: arm include/dt-bindings/clock include/dt-bindings/display include/dt-bindings/genpd include/dt-bindings/gpio include/dt-bindings/iio include/dt-bindings/iio/adc include/dt-binding... X-SVN-Commit-Revision: 325968 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 15:46:51 -0000 Author: manu Date: Sat Nov 18 15:46:48 2017 New Revision: 325968 URL: https://svnweb.freebsd.org/changeset/base/325968 Log: Update our copy of DTS from the ones from Linux 4.14 Added: head/sys/gnu/dts/arm/am335x-moxa-uc-8100-me-t.dts - copied unchanged from r325773, vendor/device-tree/dist/src/arm/am335x-moxa-uc-8100-me-t.dts head/sys/gnu/dts/arm/am57xx-beagle-x15-revc.dts - copied unchanged from r325773, vendor/device-tree/dist/src/arm/am57xx-beagle-x15-revc.dts head/sys/gnu/dts/arm/at91-sama5d27_som1.dtsi - copied unchanged from r325773, vendor/device-tree/dist/src/arm/at91-sama5d27_som1.dtsi head/sys/gnu/dts/arm/at91-sama5d27_som1_ek.dts - copied unchanged from r325773, vendor/device-tree/dist/src/arm/at91-sama5d27_som1_ek.dts head/sys/gnu/dts/arm/bcm2835-rpi-zero-w.dts - copied unchanged from r325773, vendor/device-tree/dist/src/arm/bcm2835-rpi-zero-w.dts head/sys/gnu/dts/arm/bcm2837.dtsi - copied unchanged from r325773, vendor/device-tree/dist/src/arm/bcm2837.dtsi head/sys/gnu/dts/arm/bcm947189acdbmr.dts - copied unchanged from r325773, vendor/device-tree/dist/src/arm/bcm947189acdbmr.dts head/sys/gnu/dts/arm/dra7-evm-common.dtsi - copied unchanged from r325773, vendor/device-tree/dist/src/arm/dra7-evm-common.dtsi head/sys/gnu/dts/arm/dra72x-mmc-iodelay.dtsi - copied unchanged from r325773, vendor/device-tree/dist/src/arm/dra72x-mmc-iodelay.dtsi head/sys/gnu/dts/arm/dra74x-mmc-iodelay.dtsi - copied unchanged from r325773, vendor/device-tree/dist/src/arm/dra74x-mmc-iodelay.dtsi head/sys/gnu/dts/arm/dra76-evm.dts - copied unchanged from r325773, vendor/device-tree/dist/src/arm/dra76-evm.dts head/sys/gnu/dts/arm/dra76x.dtsi - copied unchanged from r325773, vendor/device-tree/dist/src/arm/dra76x.dtsi head/sys/gnu/dts/arm/gemini-dlink-dir-685.dts - copied unchanged from r325773, vendor/device-tree/dist/src/arm/gemini-dlink-dir-685.dts head/sys/gnu/dts/arm/imx53-cx9020.dts - copied unchanged from r325773, vendor/device-tree/dist/src/arm/imx53-cx9020.dts head/sys/gnu/dts/arm/imx6q-apalis-eval.dts - copied unchanged from r325773, vendor/device-tree/dist/src/arm/imx6q-apalis-eval.dts head/sys/gnu/dts/arm/imx6q-apalis-ixora-v1.1.dts - copied unchanged from r325773, vendor/device-tree/dist/src/arm/imx6q-apalis-ixora-v1.1.dts head/sys/gnu/dts/arm/imx6ul-geam.dts - copied unchanged from r325773, vendor/device-tree/dist/src/arm/imx6ul-geam.dts head/sys/gnu/dts/arm/imx7ulp-pinfunc.h - copied unchanged from r325773, vendor/device-tree/dist/src/arm/imx7ulp-pinfunc.h head/sys/gnu/dts/arm/mt6323.dtsi - copied unchanged from r325773, vendor/device-tree/dist/src/arm/mt6323.dtsi head/sys/gnu/dts/arm/mt7623n-bananapi-bpi-r2.dts - copied unchanged from r325773, vendor/device-tree/dist/src/arm/mt7623n-bananapi-bpi-r2.dts head/sys/gnu/dts/arm/mt7623n-rfb-nand.dts - copied unchanged from r325773, vendor/device-tree/dist/src/arm/mt7623n-rfb-nand.dts head/sys/gnu/dts/arm/mt7623n-rfb.dtsi - copied unchanged from r325773, vendor/device-tree/dist/src/arm/mt7623n-rfb.dtsi head/sys/gnu/dts/arm/rk3229.dtsi - copied unchanged from r325773, vendor/device-tree/dist/src/arm/rk3229.dtsi head/sys/gnu/dts/arm/stm32f4-pinctrl.dtsi - copied unchanged from r325773, vendor/device-tree/dist/src/arm/stm32f4-pinctrl.dtsi head/sys/gnu/dts/arm/stm32f429-pinctrl.dtsi - copied unchanged from r325773, vendor/device-tree/dist/src/arm/stm32f429-pinctrl.dtsi head/sys/gnu/dts/arm/stm32f469-pinctrl.dtsi - copied unchanged from r325773, vendor/device-tree/dist/src/arm/stm32f469-pinctrl.dtsi head/sys/gnu/dts/arm/sun8i-a83t-bananapi-m3.dts - copied unchanged from r325773, vendor/device-tree/dist/src/arm/sun8i-a83t-bananapi-m3.dts head/sys/gnu/dts/arm/sun8i-r16-bananapi-m2m.dts - copied unchanged from r325773, vendor/device-tree/dist/src/arm/sun8i-r16-bananapi-m2m.dts - copied unchanged from r325773, vendor/device-tree/dist/include/dt-bindings/clock/r8a77995-cpg-mssr.h - copied unchanged from r325773, vendor/device-tree/dist/include/dt-bindings/clock/stm32h7-clks.h - copied unchanged from r325773, vendor/device-tree/dist/include/dt-bindings/clock/sun4i-a10-ccu.h - copied unchanged from r325773, vendor/device-tree/dist/include/dt-bindings/clock/sun7i-a20-ccu.h - copied unchanged from r325773, vendor/device-tree/dist/include/dt-bindings/clock/sun8i-r40-ccu.h - copied unchanged from r325773, vendor/device-tree/dist/include/dt-bindings/leds/leds-pca955x.h - copied unchanged from r325773, vendor/device-tree/dist/include/dt-bindings/mfd/stm32h7-rcc.h head/sys/gnu/dts/include/dt-bindings/mips/ - copied from r325773, vendor/device-tree/dist/include/dt-bindings/mips/ - copied unchanged from r325773, vendor/device-tree/dist/include/dt-bindings/power/mt7622-power.h - copied unchanged from r325773, vendor/device-tree/dist/include/dt-bindings/power/r8a77995-sysc.h - copied unchanged from r325773, vendor/device-tree/dist/include/dt-bindings/power/rk3366-power.h - copied unchanged from r325773, vendor/device-tree/dist/include/dt-bindings/reset/amlogic,meson8b-clkc-reset.h - copied unchanged from r325773, vendor/device-tree/dist/include/dt-bindings/reset/snps,hsdk-reset.h - copied unchanged from r325773, vendor/device-tree/dist/include/dt-bindings/reset/sun4i-a10-ccu.h - copied unchanged from r325773, vendor/device-tree/dist/include/dt-bindings/reset/sun8i-r40-ccu.h Directory Properties: head/sys/gnu/dts/include/dt-bindings/clock/r8a77995-cpg-mssr.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/stm32h7-clks.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/sun4i-a10-ccu.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/sun7i-a20-ccu.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/sun8i-r40-ccu.h (props changed) head/sys/gnu/dts/include/dt-bindings/leds/leds-pca955x.h (props changed) head/sys/gnu/dts/include/dt-bindings/mfd/stm32h7-rcc.h (props changed) head/sys/gnu/dts/include/dt-bindings/power/mt7622-power.h (props changed) head/sys/gnu/dts/include/dt-bindings/power/r8a77995-sysc.h (props changed) head/sys/gnu/dts/include/dt-bindings/power/rk3366-power.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/amlogic,meson8b-clkc-reset.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/snps,hsdk-reset.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/sun4i-a10-ccu.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/sun8i-r40-ccu.h (props changed) Deleted: head/sys/gnu/dts/arm/imx6ul-geam-kit.dts head/sys/gnu/dts/arm/imx6ul-geam.dtsi head/sys/gnu/dts/arm/imx6ul-isiot-common.dtsi head/sys/gnu/dts/arm/mt7623-evb.dts head/sys/gnu/dts/arm/uniphier-sld3-ref.dts head/sys/gnu/dts/arm/uniphier-sld3.dtsi head/sys/gnu/dts/include/dt-bindings/genpd/k2g.h Modified: head/sys/gnu/dts/arm/am335x-bone-common.dtsi head/sys/gnu/dts/arm/am335x-chiliboard.dts head/sys/gnu/dts/arm/am335x-evm.dts head/sys/gnu/dts/arm/am33xx.dtsi head/sys/gnu/dts/arm/am437x-gp-evm.dts head/sys/gnu/dts/arm/am43x-epos-evm.dts head/sys/gnu/dts/arm/am571x-idk.dts head/sys/gnu/dts/arm/am572x-idk.dts head/sys/gnu/dts/arm/am57xx-beagle-x15-common.dtsi head/sys/gnu/dts/arm/am57xx-beagle-x15-revb1.dts head/sys/gnu/dts/arm/am57xx-beagle-x15.dts head/sys/gnu/dts/arm/am57xx-commercial-grade.dtsi head/sys/gnu/dts/arm/am57xx-idk-common.dtsi head/sys/gnu/dts/arm/am57xx-industrial-grade.dtsi head/sys/gnu/dts/arm/armada-370.dtsi head/sys/gnu/dts/arm/armada-375.dtsi head/sys/gnu/dts/arm/armada-380.dtsi head/sys/gnu/dts/arm/armada-385-db-ap.dts head/sys/gnu/dts/arm/armada-385-turris-omnia.dts head/sys/gnu/dts/arm/armada-385.dtsi head/sys/gnu/dts/arm/armada-388-clearfog.dts head/sys/gnu/dts/arm/armada-388-clearfog.dtsi head/sys/gnu/dts/arm/armada-388-db.dts head/sys/gnu/dts/arm/armada-388-gp.dts head/sys/gnu/dts/arm/armada-388-rd.dts head/sys/gnu/dts/arm/armada-38x.dtsi head/sys/gnu/dts/arm/armada-390-db.dts head/sys/gnu/dts/arm/armada-395-gp.dts head/sys/gnu/dts/arm/armada-398-db.dts head/sys/gnu/dts/arm/armada-39x.dtsi head/sys/gnu/dts/arm/armada-xp-98dx3236.dtsi head/sys/gnu/dts/arm/armada-xp-db.dts head/sys/gnu/dts/arm/armada-xp-gp.dts head/sys/gnu/dts/arm/armada-xp-mv78230.dtsi head/sys/gnu/dts/arm/armada-xp-mv78260.dtsi head/sys/gnu/dts/arm/armada-xp-mv78460.dtsi head/sys/gnu/dts/arm/armv7-m.dtsi head/sys/gnu/dts/arm/aspeed-ast2500-evb.dts head/sys/gnu/dts/arm/aspeed-bmc-opp-palmetto.dts head/sys/gnu/dts/arm/aspeed-bmc-opp-romulus.dts head/sys/gnu/dts/arm/aspeed-g4.dtsi head/sys/gnu/dts/arm/aspeed-g5.dtsi head/sys/gnu/dts/arm/at91-ariettag25.dts head/sys/gnu/dts/arm/at91-sama5d2_xplained.dts head/sys/gnu/dts/arm/at91sam9g45.dtsi head/sys/gnu/dts/arm/at91sam9m10g45ek.dts head/sys/gnu/dts/arm/bcm-cygnus.dtsi head/sys/gnu/dts/arm/bcm-nsp.dtsi head/sys/gnu/dts/arm/bcm2835-rpi-a-plus.dts head/sys/gnu/dts/arm/bcm2835-rpi-a.dts head/sys/gnu/dts/arm/bcm2835-rpi-b-plus.dts head/sys/gnu/dts/arm/bcm2835-rpi-b-rev2.dts head/sys/gnu/dts/arm/bcm2835-rpi-b.dts head/sys/gnu/dts/arm/bcm2835-rpi-zero.dts head/sys/gnu/dts/arm/bcm2835-rpi.dtsi head/sys/gnu/dts/arm/bcm2835.dtsi head/sys/gnu/dts/arm/bcm2836-rpi-2-b.dts head/sys/gnu/dts/arm/bcm2836.dtsi head/sys/gnu/dts/arm/bcm2837-rpi-3-b.dts head/sys/gnu/dts/arm/bcm283x-rpi-smsc9512.dtsi head/sys/gnu/dts/arm/bcm283x-rpi-usb-otg.dtsi head/sys/gnu/dts/arm/bcm283x.dtsi head/sys/gnu/dts/arm/bcm4708-buffalo-wzr-1750dhp.dts head/sys/gnu/dts/arm/bcm4708-netgear-r6250.dts head/sys/gnu/dts/arm/bcm4708-smartrg-sr400ac.dts head/sys/gnu/dts/arm/bcm47081-tplink-archer-c5-v2.dts head/sys/gnu/dts/arm/bcm4709-tplink-archer-c9-v1.dts head/sys/gnu/dts/arm/bcm47094-dlink-dir-885l.dts head/sys/gnu/dts/arm/bcm47094-luxul-xwr-3100.dts head/sys/gnu/dts/arm/bcm47189-tenda-ac9.dts head/sys/gnu/dts/arm/bcm5301x.dtsi head/sys/gnu/dts/arm/bcm53573.dtsi head/sys/gnu/dts/arm/bcm63138.dtsi head/sys/gnu/dts/arm/bcm7445-bcm97445svmb.dts head/sys/gnu/dts/arm/bcm7445.dtsi head/sys/gnu/dts/arm/bcm911360_entphn.dts head/sys/gnu/dts/arm/bcm958522er.dts head/sys/gnu/dts/arm/bcm958525er.dts head/sys/gnu/dts/arm/bcm958525xmc.dts head/sys/gnu/dts/arm/bcm958622hr.dts head/sys/gnu/dts/arm/bcm958623hr.dts head/sys/gnu/dts/arm/bcm958625hr.dts head/sys/gnu/dts/arm/bcm958625k.dts head/sys/gnu/dts/arm/bcm963138dvt.dts head/sys/gnu/dts/arm/da850-evm.dts head/sys/gnu/dts/arm/da850-lego-ev3.dts head/sys/gnu/dts/arm/dove-cubox-es.dts head/sys/gnu/dts/arm/dove-cubox.dts head/sys/gnu/dts/arm/dove-d2plug.dts head/sys/gnu/dts/arm/dove-d3plug.dts head/sys/gnu/dts/arm/dove-dove-db.dts head/sys/gnu/dts/arm/dove.dtsi head/sys/gnu/dts/arm/dra7-evm.dts head/sys/gnu/dts/arm/dra7.dtsi head/sys/gnu/dts/arm/dra71-evm.dts head/sys/gnu/dts/arm/dra72-evm-common.dtsi head/sys/gnu/dts/arm/dra72-evm-revc.dts head/sys/gnu/dts/arm/dra72-evm-tps65917.dtsi head/sys/gnu/dts/arm/dra72-evm.dts head/sys/gnu/dts/arm/dra7xx-clocks.dtsi head/sys/gnu/dts/arm/efm32gg-dk3750.dts head/sys/gnu/dts/arm/efm32gg.dtsi head/sys/gnu/dts/arm/elpida_ecb240abacn.dtsi head/sys/gnu/dts/arm/exynos3250-artik5-eval.dts head/sys/gnu/dts/arm/exynos3250-artik5.dtsi head/sys/gnu/dts/arm/exynos3250-monk.dts head/sys/gnu/dts/arm/exynos3250-rinato.dts head/sys/gnu/dts/arm/exynos4210-trats.dts head/sys/gnu/dts/arm/exynos4412-itop-scp-core.dtsi head/sys/gnu/dts/arm/exynos4412-odroid-common.dtsi head/sys/gnu/dts/arm/exynos4412-origen.dts head/sys/gnu/dts/arm/exynos4412-trats2.dts head/sys/gnu/dts/arm/exynos5250-arndale.dts head/sys/gnu/dts/arm/exynos5250-smdk5250.dts head/sys/gnu/dts/arm/exynos5250-snow-common.dtsi head/sys/gnu/dts/arm/exynos5250-spring.dts head/sys/gnu/dts/arm/exynos5260-xyref5260.dts head/sys/gnu/dts/arm/exynos5410-smdk5410.dts head/sys/gnu/dts/arm/exynos5420-peach-pit.dts head/sys/gnu/dts/arm/exynos5440.dtsi head/sys/gnu/dts/arm/exynos5800-peach-pi.dts head/sys/gnu/dts/arm/gemini-nas4220b.dts head/sys/gnu/dts/arm/gemini-rut1xx.dts head/sys/gnu/dts/arm/gemini-sq201.dts head/sys/gnu/dts/arm/gemini-wbd111.dts head/sys/gnu/dts/arm/gemini-wbd222.dts head/sys/gnu/dts/arm/gemini.dtsi head/sys/gnu/dts/arm/imx25.dtsi head/sys/gnu/dts/arm/imx28-apx4devkit.dts head/sys/gnu/dts/arm/imx53-pinfunc.h head/sys/gnu/dts/arm/imx53.dtsi head/sys/gnu/dts/arm/imx6dl-gw52xx.dts head/sys/gnu/dts/arm/imx6dl-gw53xx.dts head/sys/gnu/dts/arm/imx6dl-gw54xx.dts head/sys/gnu/dts/arm/imx6dl-riotboard.dts head/sys/gnu/dts/arm/imx6q-apalis-ixora.dts head/sys/gnu/dts/arm/imx6q-b850v3.dts head/sys/gnu/dts/arm/imx6q-bx50v3.dtsi head/sys/gnu/dts/arm/imx6q-evi.dts head/sys/gnu/dts/arm/imx6q-gw52xx.dts head/sys/gnu/dts/arm/imx6q-gw53xx.dts head/sys/gnu/dts/arm/imx6q-gw54xx.dts head/sys/gnu/dts/arm/imx6qdl-apalis.dtsi head/sys/gnu/dts/arm/imx6qdl-dfi-fs700-m60.dtsi head/sys/gnu/dts/arm/imx6qdl-gw51xx.dtsi head/sys/gnu/dts/arm/imx6qdl-gw52xx.dtsi head/sys/gnu/dts/arm/imx6qdl-gw53xx.dtsi head/sys/gnu/dts/arm/imx6qdl-gw54xx.dtsi head/sys/gnu/dts/arm/imx6qdl-gw553x.dtsi head/sys/gnu/dts/arm/imx6qdl-icore-rqs.dtsi head/sys/gnu/dts/arm/imx6qdl-nitrogen6x.dtsi head/sys/gnu/dts/arm/imx6qdl-sabrelite.dtsi head/sys/gnu/dts/arm/imx6qdl-zii-rdu2.dtsi head/sys/gnu/dts/arm/imx6qdl.dtsi head/sys/gnu/dts/arm/imx6sl.dtsi head/sys/gnu/dts/arm/imx6sx.dtsi head/sys/gnu/dts/arm/imx6ul-14x14-evk.dts head/sys/gnu/dts/arm/imx6ul-isiot-emmc.dts head/sys/gnu/dts/arm/imx6ul-isiot-nand.dts head/sys/gnu/dts/arm/imx6ul-isiot.dtsi head/sys/gnu/dts/arm/imx6ul-liteboard.dts head/sys/gnu/dts/arm/imx6ul.dtsi head/sys/gnu/dts/arm/imx7-colibri.dtsi head/sys/gnu/dts/arm/imx7d-sdb.dts head/sys/gnu/dts/arm/imx7d.dtsi head/sys/gnu/dts/arm/imx7s.dtsi head/sys/gnu/dts/arm/integrator.dtsi head/sys/gnu/dts/arm/integratorap.dts head/sys/gnu/dts/arm/integratorcp.dts head/sys/gnu/dts/arm/keystone-k2e-evm.dts head/sys/gnu/dts/arm/keystone-k2e.dtsi head/sys/gnu/dts/arm/keystone-k2g-evm.dts head/sys/gnu/dts/arm/keystone-k2g-ice.dts head/sys/gnu/dts/arm/keystone-k2g.dtsi head/sys/gnu/dts/arm/keystone-k2hk-evm.dts head/sys/gnu/dts/arm/keystone-k2hk.dtsi head/sys/gnu/dts/arm/keystone-k2l-evm.dts head/sys/gnu/dts/arm/keystone-k2l.dtsi head/sys/gnu/dts/arm/kirkwood-6192.dtsi head/sys/gnu/dts/arm/kirkwood-6281.dtsi head/sys/gnu/dts/arm/kirkwood-6282.dtsi head/sys/gnu/dts/arm/kirkwood-98dx4122.dtsi head/sys/gnu/dts/arm/kirkwood-cloudbox.dts head/sys/gnu/dts/arm/kirkwood-dns320.dts head/sys/gnu/dts/arm/kirkwood-dns325.dts head/sys/gnu/dts/arm/kirkwood-dnskw.dtsi head/sys/gnu/dts/arm/kirkwood-dockstar.dts head/sys/gnu/dts/arm/kirkwood-dreamplug.dts head/sys/gnu/dts/arm/kirkwood-goflexnet.dts head/sys/gnu/dts/arm/kirkwood-guruplug-server-plus.dts head/sys/gnu/dts/arm/kirkwood-ib62x0.dts head/sys/gnu/dts/arm/kirkwood-iconnect.dts head/sys/gnu/dts/arm/kirkwood-iomega_ix2_200.dts head/sys/gnu/dts/arm/kirkwood-is2.dts head/sys/gnu/dts/arm/kirkwood-km_common.dtsi head/sys/gnu/dts/arm/kirkwood-km_fixedeth.dts head/sys/gnu/dts/arm/kirkwood-km_kirkwood.dts head/sys/gnu/dts/arm/kirkwood-lschlv2.dts head/sys/gnu/dts/arm/kirkwood-lsxhl.dts head/sys/gnu/dts/arm/kirkwood-lsxl.dtsi head/sys/gnu/dts/arm/kirkwood-mplcec4.dts head/sys/gnu/dts/arm/kirkwood-ns2-common.dtsi head/sys/gnu/dts/arm/kirkwood-ns2.dts head/sys/gnu/dts/arm/kirkwood-ns2lite.dts head/sys/gnu/dts/arm/kirkwood-ns2max.dts head/sys/gnu/dts/arm/kirkwood-ns2mini.dts head/sys/gnu/dts/arm/kirkwood-nsa310.dts head/sys/gnu/dts/arm/kirkwood-nsa310a.dts head/sys/gnu/dts/arm/kirkwood-nsa3x0-common.dtsi head/sys/gnu/dts/arm/kirkwood-openblocks_a6.dts head/sys/gnu/dts/arm/kirkwood-pogoplug-series-4.dts head/sys/gnu/dts/arm/kirkwood-topkick.dts head/sys/gnu/dts/arm/kirkwood-ts219-6281.dts head/sys/gnu/dts/arm/kirkwood-ts219-6282.dts head/sys/gnu/dts/arm/kirkwood-ts219.dtsi head/sys/gnu/dts/arm/kirkwood.dtsi head/sys/gnu/dts/arm/logicpd-torpedo-37xx-devkit.dts head/sys/gnu/dts/arm/ls1021a.dtsi head/sys/gnu/dts/arm/meson.dtsi head/sys/gnu/dts/arm/meson6.dtsi head/sys/gnu/dts/arm/meson8.dtsi head/sys/gnu/dts/arm/meson8b.dtsi head/sys/gnu/dts/arm/motorola-cpcap-mapphone.dtsi head/sys/gnu/dts/arm/moxart.dtsi head/sys/gnu/dts/arm/mt2701.dtsi head/sys/gnu/dts/arm/mt7623.dtsi head/sys/gnu/dts/arm/omap-gpmc-smsc911x.dtsi head/sys/gnu/dts/arm/omap-gpmc-smsc9221.dtsi head/sys/gnu/dts/arm/omap-zoom-common.dtsi head/sys/gnu/dts/arm/omap2420-n800.dts head/sys/gnu/dts/arm/omap2420-n810-wimax.dts head/sys/gnu/dts/arm/omap2420-n810.dts head/sys/gnu/dts/arm/omap2420-n8x0-common.dtsi head/sys/gnu/dts/arm/omap3-beagle-xm.dts head/sys/gnu/dts/arm/omap3-beagle.dts head/sys/gnu/dts/arm/omap3-cm-t3517.dts head/sys/gnu/dts/arm/omap3-cm-t3530.dts head/sys/gnu/dts/arm/omap3-cm-t3730.dts head/sys/gnu/dts/arm/omap3-cm-t3x.dtsi head/sys/gnu/dts/arm/omap3-cm-t3x30.dtsi head/sys/gnu/dts/arm/omap3-devkit8000-common.dtsi head/sys/gnu/dts/arm/omap3-evm-common.dtsi head/sys/gnu/dts/arm/omap3-n900.dts head/sys/gnu/dts/arm/omap3-n950-n9.dtsi head/sys/gnu/dts/arm/omap3-overo-base.dtsi head/sys/gnu/dts/arm/omap3-panel-sharp-ls037v7dw01.dtsi head/sys/gnu/dts/arm/omap3-sb-t35.dtsi head/sys/gnu/dts/arm/omap3-sbc-t3517.dts head/sys/gnu/dts/arm/omap3-sbc-t3530.dts head/sys/gnu/dts/arm/omap3-sbc-t3730.dts head/sys/gnu/dts/arm/omap3-tao3530.dtsi head/sys/gnu/dts/arm/omap3-zoom3.dts head/sys/gnu/dts/arm/omap3.dtsi head/sys/gnu/dts/arm/omap3430-sdp.dts head/sys/gnu/dts/arm/omap4-droid4-xt894.dts head/sys/gnu/dts/arm/omap4-duovero-parlor.dts head/sys/gnu/dts/arm/omap4-panda-common.dtsi head/sys/gnu/dts/arm/omap4-sdp-es23plus.dts head/sys/gnu/dts/arm/omap4-sdp.dts head/sys/gnu/dts/arm/omap4-var-om44customboard.dtsi head/sys/gnu/dts/arm/omap5-board-common.dtsi head/sys/gnu/dts/arm/omap5-cm-t54.dts head/sys/gnu/dts/arm/omap5-sbc-t54.dts head/sys/gnu/dts/arm/pxa27x.dtsi head/sys/gnu/dts/arm/pxa3xx.dtsi head/sys/gnu/dts/arm/qcom-apq8064-arrow-sd-600eval-pins.dtsi head/sys/gnu/dts/arm/qcom-apq8064-arrow-sd-600eval.dts head/sys/gnu/dts/arm/qcom-apq8064-asus-nexus7-flo.dts head/sys/gnu/dts/arm/qcom-apq8064-cm-qs600.dts head/sys/gnu/dts/arm/qcom-apq8064-ifc6410.dts head/sys/gnu/dts/arm/qcom-apq8064-pins.dtsi head/sys/gnu/dts/arm/qcom-apq8064-sony-xperia-yuga.dts head/sys/gnu/dts/arm/qcom-apq8064-v2.0.dtsi head/sys/gnu/dts/arm/qcom-apq8064.dtsi head/sys/gnu/dts/arm/qcom-apq8074-dragonboard.dts head/sys/gnu/dts/arm/qcom-apq8084-ifc6540.dts head/sys/gnu/dts/arm/qcom-apq8084-mtp.dts head/sys/gnu/dts/arm/qcom-apq8084.dtsi head/sys/gnu/dts/arm/qcom-ipq4019-ap.dk01.1.dtsi head/sys/gnu/dts/arm/qcom-ipq4019.dtsi head/sys/gnu/dts/arm/qcom-ipq8064-ap148.dts head/sys/gnu/dts/arm/qcom-ipq8064-v1.0.dtsi head/sys/gnu/dts/arm/qcom-ipq8064.dtsi head/sys/gnu/dts/arm/qcom-msm8660-surf.dts head/sys/gnu/dts/arm/qcom-msm8660.dtsi head/sys/gnu/dts/arm/qcom-msm8960-cdp.dts head/sys/gnu/dts/arm/qcom-msm8960.dtsi head/sys/gnu/dts/arm/qcom-msm8974-lge-nexus5-hammerhead.dts head/sys/gnu/dts/arm/qcom-msm8974-sony-xperia-honami.dts head/sys/gnu/dts/arm/qcom-msm8974.dtsi head/sys/gnu/dts/arm/qcom-pm8841.dtsi head/sys/gnu/dts/arm/qcom-pm8941.dtsi head/sys/gnu/dts/arm/qcom-pma8084.dtsi head/sys/gnu/dts/arm/r7s72100-genmai.dts head/sys/gnu/dts/arm/r7s72100-rskrza1.dts head/sys/gnu/dts/arm/r7s72100.dtsi head/sys/gnu/dts/arm/r8a7743-iwg20d-q7.dts head/sys/gnu/dts/arm/r8a7743-iwg20m.dtsi head/sys/gnu/dts/arm/r8a7743-sk-rzg1m.dts head/sys/gnu/dts/arm/r8a7743.dtsi head/sys/gnu/dts/arm/r8a7745-sk-rzg1e.dts head/sys/gnu/dts/arm/r8a7745.dtsi head/sys/gnu/dts/arm/r8a7790.dtsi head/sys/gnu/dts/arm/r8a7791-koelsch.dts head/sys/gnu/dts/arm/r8a7791.dtsi head/sys/gnu/dts/arm/r8a7792.dtsi head/sys/gnu/dts/arm/r8a7793.dtsi head/sys/gnu/dts/arm/r8a7794.dtsi head/sys/gnu/dts/arm/rk3036-kylin.dts head/sys/gnu/dts/arm/rk3036.dtsi head/sys/gnu/dts/arm/rk3066a-bqcurie2.dts head/sys/gnu/dts/arm/rk3066a-mk808.dts head/sys/gnu/dts/arm/rk3066a-rayeager.dts head/sys/gnu/dts/arm/rk3188-px3-evb.dts head/sys/gnu/dts/arm/rk3188-radxarock.dts head/sys/gnu/dts/arm/rk3228-evb.dts head/sys/gnu/dts/arm/rk3229-evb.dts head/sys/gnu/dts/arm/rk322x.dtsi head/sys/gnu/dts/arm/rk3288-evb.dtsi head/sys/gnu/dts/arm/rk3288-fennec.dts head/sys/gnu/dts/arm/rk3288-firefly-reload-core.dtsi head/sys/gnu/dts/arm/rk3288-firefly-reload.dts head/sys/gnu/dts/arm/rk3288-firefly.dtsi head/sys/gnu/dts/arm/rk3288-miqi.dts head/sys/gnu/dts/arm/rk3288-phycore-rdk.dts head/sys/gnu/dts/arm/rk3288-phycore-som.dtsi head/sys/gnu/dts/arm/rk3288-popmetal.dts head/sys/gnu/dts/arm/rk3288-r89.dts head/sys/gnu/dts/arm/rk3288-rock2-som.dtsi head/sys/gnu/dts/arm/rk3288-rock2-square.dts head/sys/gnu/dts/arm/rk3288-tinker.dts head/sys/gnu/dts/arm/rk3288-veyron-sdmmc.dtsi head/sys/gnu/dts/arm/rk3288-veyron.dtsi head/sys/gnu/dts/arm/rk3288.dtsi head/sys/gnu/dts/arm/rv1108-evb.dts head/sys/gnu/dts/arm/rv1108.dtsi head/sys/gnu/dts/arm/sama5d2-pinfunc.h head/sys/gnu/dts/arm/sama5d2.dtsi head/sys/gnu/dts/arm/samsung_k3pe0e000b.dtsi head/sys/gnu/dts/arm/skeleton.dtsi head/sys/gnu/dts/arm/skeleton64.dtsi head/sys/gnu/dts/arm/spear1310.dtsi head/sys/gnu/dts/arm/spear1340.dtsi head/sys/gnu/dts/arm/st-pincfg.h head/sys/gnu/dts/arm/ste-dbx5x0.dtsi head/sys/gnu/dts/arm/ste-hrefprev60.dtsi head/sys/gnu/dts/arm/ste-nomadik-nhk15.dts head/sys/gnu/dts/arm/ste-nomadik-s8815.dts head/sys/gnu/dts/arm/ste-nomadik-stn8815.dtsi head/sys/gnu/dts/arm/ste-u300.dts head/sys/gnu/dts/arm/stm32429i-eval.dts head/sys/gnu/dts/arm/stm32f429-disco.dts head/sys/gnu/dts/arm/stm32f429.dtsi head/sys/gnu/dts/arm/stm32f469-disco.dts head/sys/gnu/dts/arm/stm32f746.dtsi head/sys/gnu/dts/arm/stm32f769-disco.dts head/sys/gnu/dts/arm/stm32h743.dtsi head/sys/gnu/dts/arm/stm32h743i-eval.dts head/sys/gnu/dts/arm/sun6i-a31.dtsi head/sys/gnu/dts/arm/sun7i-a20-cubietruck.dts head/sys/gnu/dts/arm/sun8i-a23-a33.dtsi head/sys/gnu/dts/arm/sun8i-a83t-allwinner-h8homlet-v2.dts head/sys/gnu/dts/arm/sun8i-a83t-cubietruck-plus.dts head/sys/gnu/dts/arm/sun8i-a83t.dtsi head/sys/gnu/dts/arm/sun8i-h3-beelink-x2.dts head/sys/gnu/dts/arm/tango4-common.dtsi head/sys/gnu/dts/arm/tango4-smp8758.dtsi head/sys/gnu/dts/arm/tango4-vantage-1172.dts head/sys/gnu/dts/arm/tegra114-dalmore.dts head/sys/gnu/dts/arm/tegra114-roth.dts head/sys/gnu/dts/arm/tegra114-tn7.dts head/sys/gnu/dts/arm/tegra114.dtsi head/sys/gnu/dts/arm/tegra124-jetson-tk1-emc.dtsi head/sys/gnu/dts/arm/tegra124-jetson-tk1.dts head/sys/gnu/dts/arm/tegra124-nyan-big-emc.dtsi head/sys/gnu/dts/arm/tegra124-nyan-big.dts head/sys/gnu/dts/arm/tegra124-nyan-blaze-emc.dtsi head/sys/gnu/dts/arm/tegra124-nyan-blaze.dts head/sys/gnu/dts/arm/tegra124-nyan.dtsi head/sys/gnu/dts/arm/tegra124-venice2.dts head/sys/gnu/dts/arm/tegra124.dtsi head/sys/gnu/dts/arm/tegra20-colibri-512.dtsi head/sys/gnu/dts/arm/tegra20-harmony.dts head/sys/gnu/dts/arm/tegra20-iris-512.dts head/sys/gnu/dts/arm/tegra20-medcom-wide.dts head/sys/gnu/dts/arm/tegra20-paz00.dts head/sys/gnu/dts/arm/tegra20-plutux.dts head/sys/gnu/dts/arm/tegra20-seaboard.dts head/sys/gnu/dts/arm/tegra20-tamonten.dtsi head/sys/gnu/dts/arm/tegra20-tec.dts head/sys/gnu/dts/arm/tegra20-trimslice.dts head/sys/gnu/dts/arm/tegra20-ventana.dts head/sys/gnu/dts/arm/tegra20.dtsi head/sys/gnu/dts/arm/tegra30-apalis-eval.dts head/sys/gnu/dts/arm/tegra30-apalis.dtsi head/sys/gnu/dts/arm/tegra30-beaver.dts head/sys/gnu/dts/arm/tegra30-cardhu-a02.dts head/sys/gnu/dts/arm/tegra30-cardhu-a04.dts head/sys/gnu/dts/arm/tegra30-cardhu.dtsi head/sys/gnu/dts/arm/tegra30-colibri-eval-v3.dts head/sys/gnu/dts/arm/tegra30-colibri.dtsi head/sys/gnu/dts/arm/tegra30.dtsi head/sys/gnu/dts/arm/tps65217.dtsi head/sys/gnu/dts/arm/uniphier-ld4-ref.dts head/sys/gnu/dts/arm/uniphier-ld4.dtsi head/sys/gnu/dts/arm/uniphier-ld6b-ref.dts head/sys/gnu/dts/arm/uniphier-ld6b.dtsi head/sys/gnu/dts/arm/uniphier-pinctrl.dtsi head/sys/gnu/dts/arm/uniphier-pro4-ace.dts head/sys/gnu/dts/arm/uniphier-pro4-ref.dts head/sys/gnu/dts/arm/uniphier-pro4-sanji.dts head/sys/gnu/dts/arm/uniphier-pro4.dtsi head/sys/gnu/dts/arm/uniphier-pro5.dtsi head/sys/gnu/dts/arm/uniphier-pxs2-gentil.dts head/sys/gnu/dts/arm/uniphier-pxs2-vodka.dts head/sys/gnu/dts/arm/uniphier-pxs2.dtsi head/sys/gnu/dts/arm/uniphier-sld8-ref.dts head/sys/gnu/dts/arm/uniphier-sld8.dtsi head/sys/gnu/dts/arm/versatile-ab.dts head/sys/gnu/dts/arm/versatile-pb.dts head/sys/gnu/dts/arm/vexpress-v2m.dtsi head/sys/gnu/dts/arm/vexpress-v2p-ca15-tc1.dts head/sys/gnu/dts/arm/vexpress-v2p-ca15_a7.dts head/sys/gnu/dts/arm/vexpress-v2p-ca5s.dts head/sys/gnu/dts/arm/vexpress-v2p-ca9.dts head/sys/gnu/dts/arm/xenvm-4.2.dts head/sys/gnu/dts/arm/zx296702-ad1.dts head/sys/gnu/dts/arm/zx296702.dtsi head/sys/gnu/dts/arm/zynq-7000.dtsi head/sys/gnu/dts/arm/zynq-parallella.dts head/sys/gnu/dts/arm/zynq-zc702.dts head/sys/gnu/dts/arm/zynq-zc706.dts head/sys/gnu/dts/arm/zynq-zed.dts head/sys/gnu/dts/arm/zynq-zybo.dts head/sys/gnu/dts/include/dt-bindings/clock/berlin2.h head/sys/gnu/dts/include/dt-bindings/clock/berlin2q.h head/sys/gnu/dts/include/dt-bindings/clock/cortina,gemini-clock.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/clock/efm32-cmu.h head/sys/gnu/dts/include/dt-bindings/clock/exynos-audss-clk.h head/sys/gnu/dts/include/dt-bindings/clock/gxbb-aoclkc.h head/sys/gnu/dts/include/dt-bindings/clock/gxbb-clkc.h head/sys/gnu/dts/include/dt-bindings/clock/jz4740-cgu.h head/sys/gnu/dts/include/dt-bindings/clock/jz4780-cgu.h head/sys/gnu/dts/include/dt-bindings/clock/marvell,mmp2.h head/sys/gnu/dts/include/dt-bindings/clock/marvell,pxa168.h head/sys/gnu/dts/include/dt-bindings/clock/marvell,pxa1928.h head/sys/gnu/dts/include/dt-bindings/clock/marvell,pxa910.h head/sys/gnu/dts/include/dt-bindings/clock/meson8b-clkc.h head/sys/gnu/dts/include/dt-bindings/clock/mpc512x-clock.h head/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-msm8996.h head/sys/gnu/dts/include/dt-bindings/clock/rk3228-cru.h head/sys/gnu/dts/include/dt-bindings/clock/rockchip,rk808.h head/sys/gnu/dts/include/dt-bindings/clock/rv1108-cru.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/clock/ste-ab8500.h head/sys/gnu/dts/include/dt-bindings/clock/stih407-clks.h head/sys/gnu/dts/include/dt-bindings/clock/stih410-clks.h head/sys/gnu/dts/include/dt-bindings/clock/stih416-clks.h head/sys/gnu/dts/include/dt-bindings/clock/stih418-clks.h head/sys/gnu/dts/include/dt-bindings/clock/tegra114-car.h head/sys/gnu/dts/include/dt-bindings/clock/tegra124-car-common.h head/sys/gnu/dts/include/dt-bindings/clock/tegra124-car.h head/sys/gnu/dts/include/dt-bindings/clock/tegra186-clock.h head/sys/gnu/dts/include/dt-bindings/clock/tegra20-car.h head/sys/gnu/dts/include/dt-bindings/clock/tegra210-car.h head/sys/gnu/dts/include/dt-bindings/clock/tegra30-car.h head/sys/gnu/dts/include/dt-bindings/display/tda998x.h head/sys/gnu/dts/include/dt-bindings/gpio/gpio.h head/sys/gnu/dts/include/dt-bindings/gpio/tegra-gpio.h head/sys/gnu/dts/include/dt-bindings/gpio/tegra186-gpio.h head/sys/gnu/dts/include/dt-bindings/iio/adc/fsl-imx25-gcq.h head/sys/gnu/dts/include/dt-bindings/iio/adi,ad5592r.h head/sys/gnu/dts/include/dt-bindings/input/input.h head/sys/gnu/dts/include/dt-bindings/input/linux-event-codes.h head/sys/gnu/dts/include/dt-bindings/interrupt-controller/arm-gic.h head/sys/gnu/dts/include/dt-bindings/interrupt-controller/irq.h head/sys/gnu/dts/include/dt-bindings/interrupt-controller/mips-gic.h head/sys/gnu/dts/include/dt-bindings/interrupt-controller/mvebu-icu.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/leds/common.h head/sys/gnu/dts/include/dt-bindings/leds/leds-ns2.h head/sys/gnu/dts/include/dt-bindings/mailbox/tegra186-hsp.h head/sys/gnu/dts/include/dt-bindings/media/c8sectpfe.h head/sys/gnu/dts/include/dt-bindings/memory/mt8173-larb-port.h head/sys/gnu/dts/include/dt-bindings/memory/tegra114-mc.h head/sys/gnu/dts/include/dt-bindings/memory/tegra124-mc.h head/sys/gnu/dts/include/dt-bindings/memory/tegra210-mc.h head/sys/gnu/dts/include/dt-bindings/memory/tegra30-mc.h head/sys/gnu/dts/include/dt-bindings/mfd/as3722.h head/sys/gnu/dts/include/dt-bindings/mfd/dbx500-prcmu.h head/sys/gnu/dts/include/dt-bindings/mfd/max77620.h head/sys/gnu/dts/include/dt-bindings/mfd/palmas.h head/sys/gnu/dts/include/dt-bindings/mfd/qcom-rpm.h head/sys/gnu/dts/include/dt-bindings/mfd/st-lpc.h head/sys/gnu/dts/include/dt-bindings/mfd/stm32f4-rcc.h head/sys/gnu/dts/include/dt-bindings/mfd/stm32f7-rcc.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/mux/mux.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/pinctrl/am33xx.h head/sys/gnu/dts/include/dt-bindings/pinctrl/am43xx.h head/sys/gnu/dts/include/dt-bindings/pinctrl/dm814x.h head/sys/gnu/dts/include/dt-bindings/pinctrl/dra.h head/sys/gnu/dts/include/dt-bindings/pinctrl/mt6397-pinfunc.h head/sys/gnu/dts/include/dt-bindings/pinctrl/mt7623-pinfunc.h head/sys/gnu/dts/include/dt-bindings/pinctrl/omap.h head/sys/gnu/dts/include/dt-bindings/pinctrl/pinctrl-tegra-xusb.h head/sys/gnu/dts/include/dt-bindings/pinctrl/qcom,pmic-gpio.h head/sys/gnu/dts/include/dt-bindings/pinctrl/qcom,pmic-mpp.h head/sys/gnu/dts/include/dt-bindings/pinctrl/r7s72100-pinctrl.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/pinctrl/samsung.h head/sys/gnu/dts/include/dt-bindings/pinctrl/stm32f429-pinfunc.h head/sys/gnu/dts/include/dt-bindings/pinctrl/stm32f746-pinfunc.h head/sys/gnu/dts/include/dt-bindings/pinctrl/stm32h7-pinfunc.h head/sys/gnu/dts/include/dt-bindings/power/mt8173-power.h head/sys/gnu/dts/include/dt-bindings/power/rk3288-power.h head/sys/gnu/dts/include/dt-bindings/power/rk3328-power.h head/sys/gnu/dts/include/dt-bindings/power/rk3368-power.h head/sys/gnu/dts/include/dt-bindings/power/rk3399-power.h head/sys/gnu/dts/include/dt-bindings/pwm/pwm.h head/sys/gnu/dts/include/dt-bindings/reset/cortina,gemini-reset.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/reset/hisi,hi6220-resets.h head/sys/gnu/dts/include/dt-bindings/reset/pistachio-resets.h head/sys/gnu/dts/include/dt-bindings/reset/stih407-resets.h head/sys/gnu/dts/include/dt-bindings/reset/stih415-resets.h head/sys/gnu/dts/include/dt-bindings/reset/stih416-resets.h head/sys/gnu/dts/include/dt-bindings/reset/tegra124-car.h head/sys/gnu/dts/include/dt-bindings/reset/tegra210-car.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/soc/rockchip,boot-mode.h head/sys/gnu/dts/include/dt-bindings/sound/apq8016-lpass.h head/sys/gnu/dts/include/dt-bindings/sound/audio-jack-events.h head/sys/gnu/dts/include/dt-bindings/sound/cs35l32.h head/sys/gnu/dts/include/dt-bindings/sound/fsl-imx-audmux.h head/sys/gnu/dts/include/dt-bindings/sound/samsung-i2s.h head/sys/gnu/dts/include/dt-bindings/sound/tas2552.h head/sys/gnu/dts/include/dt-bindings/sound/tlv320aic31xx-micbias.h head/sys/gnu/dts/include/dt-bindings/thermal/lm90.h head/sys/gnu/dts/include/dt-bindings/thermal/tegra124-soctherm.h Directory Properties: head/sys/gnu/dts/arm/ (props changed) head/sys/gnu/dts/include/ (props changed) head/sys/gnu/dts/include/dt-bindings/clock/bcm-sr.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/boston-clock.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/mt6797-clk.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/omap4.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-ipq8074.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/r8a7790-cpg-mssr.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/r8a7791-cpg-mssr.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/r8a7792-cpg-mssr.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/r8a7793-cpg-mssr.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/r8a7794-cpg-mssr.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/rk3128-cru.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/sun8i-a83t-ccu.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/sun8i-de2.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/sun8i-r-ccu.h (props changed) head/sys/gnu/dts/include/dt-bindings/mips/lantiq_rcu_gphy.h (props changed) head/sys/gnu/dts/include/dt-bindings/pinctrl/brcm,pinctrl-stingray.h (props changed) head/sys/gnu/dts/include/dt-bindings/power/imx7-power.h (props changed) head/sys/gnu/dts/include/dt-bindings/power/mt6797-power.h (props changed) head/sys/gnu/dts/include/dt-bindings/power/owl-s500-powergate.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/altr,rst-mgr-a10sr.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/altr,rst-mgr-s10.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/imx7-reset.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/sun8i-a83t-ccu.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/sun8i-de2.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/sun8i-r-ccu.h (props changed) Modified: head/sys/gnu/dts/arm/am335x-bone-common.dtsi ============================================================================== --- head/sys/gnu/dts/arm/am335x-bone-common.dtsi Sat Nov 18 15:34:31 2017 (r325967) +++ head/sys/gnu/dts/arm/am335x-bone-common.dtsi Sat Nov 18 15:46:48 2017 (r325968) @@ -319,13 +319,10 @@ ti,pmic-shutdown-controller; charger { - interrupts = <0>, <1>; - interrupt-names = "USB", "AC"; status = "okay"; }; pwrbutton { - interrupts = <2>; status = "okay"; }; Modified: head/sys/gnu/dts/arm/am335x-chiliboard.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-chiliboard.dts Sat Nov 18 15:34:31 2017 (r325967) +++ head/sys/gnu/dts/arm/am335x-chiliboard.dts Sat Nov 18 15:46:48 2017 (r325968) @@ -191,13 +191,10 @@ interrupts = <7>; /* NNMI */ charger { - interrupts = <0>, <1>; - interrupt-names = "USB", "AC"; status = "okay"; }; pwrbutton { - interrupts = <2>; status = "okay"; }; }; Modified: head/sys/gnu/dts/arm/am335x-evm.dts ============================================================================== --- head/sys/gnu/dts/arm/am335x-evm.dts Sat Nov 18 15:34:31 2017 (r325967) +++ head/sys/gnu/dts/arm/am335x-evm.dts Sat Nov 18 15:46:48 2017 (r325968) @@ -531,6 +531,7 @@ interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */ <1 IRQ_TYPE_NONE>; /* termcount */ rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */ + ti,nand-xfer-type = "prefetch-dma"; ti,nand-ecc-opt = "bch8"; ti,elm-id = <&elm>; nand-bus-width = <8>; Copied: head/sys/gnu/dts/arm/am335x-moxa-uc-8100-me-t.dts (from r325773, vendor/device-tree/dist/src/arm/am335x-moxa-uc-8100-me-t.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/arm/am335x-moxa-uc-8100-me-t.dts Sat Nov 18 15:46:48 2017 (r325968, copy of r325773, vendor/device-tree/dist/src/arm/am335x-moxa-uc-8100-me-t.dts) @@ -0,0 +1,525 @@ +/* + * Copyright (C) 2017 MOXA Inc. - https://www.moxa.com/ + * + * Author: SZ Lin (林上智) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +/dts-v1/; + +#include "am33xx.dtsi" + +/ { + model = "Moxa UC-8100-ME-T"; + compatible = "moxa,uc-8100-me-t", "ti,am33xx"; + + cpus { + cpu@0 { + cpu0-supply = <&vdd1_reg>; + }; + }; + + memory { + device_type = "memory"; + reg = <0x80000000 0x20000000>; /* 512 MB */ + }; + + vbat: vbat-regulator { + compatible = "regulator-fixed"; + }; + + /* Power supply provides a fixed 3.3V @3A */ + vmmcsd_fixed: vmmcsd-regulator { + compatible = "regulator-fixed"; + regulator-name = "vmmcsd_fixed"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + }; + + leds { + compatible = "gpio-leds"; + led1 { + label = "uc8100me:CEL1"; + gpios = <&gpio_xten 8 0>; + default-state = "off"; + }; + + led2 { + label = "uc8100me:CEL2"; + gpios = <&gpio_xten 9 0>; + default-state = "off"; + }; + + led3 { + label = "uc8100me:CEL3"; + gpios = <&gpio_xten 10 0>; + default-state = "off"; + }; + + led4 { + label = "uc8100me:DIA1"; + gpios = <&gpio_xten 11 0>; + default-state = "off"; + }; + led5 { + label = "uc8100me:DIA2"; + gpios = <&gpio_xten 12 0>; + default-state = "off"; + }; + led6 { + label = "uc8100me:DIA3"; + gpios = <&gpio_xten 13 0>; + default-state = "off"; + }; + led7 { + label = "uc8100me:SD"; + gpios = <&gpio_xten 14 0>; + default-state = "off"; + }; + led8 { + label = "uc8100me:USB"; + gpios = <&gpio_xten 15 0>; + default-state = "off"; + }; + led9 { + label = "uc8100me:USER"; + gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + }; + + buttons: push_button { + compatible = "gpio-keys"; + }; + +}; + +&am33xx_pinmux { + pinctrl-names = "default"; + pinctrl-0 = <&minipcie_pins>; + + minipcie_pins: pinmux_minipcie { + pinctrl-single,pins = < + AM33XX_IOPAD(0x8e8, PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_pclk.gpio2_24 */ + AM33XX_IOPAD(0x8ec, PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_ac_bias_en.gpio2_25 */ + AM33XX_IOPAD(0x8e0, PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_vsync.gpio2_22 Power off PIN*/ + >; + }; + + push_button_pins: pinmux_push_button { + pinctrl-single,pins = < + AM33XX_IOPAD(0x9ac, PIN_INPUT_PULLDOWN | MUX_MODE7) /* mcasp0_ahcklx.gpio3_21 */ + >; + }; + + i2c0_pins: pinmux_i2c0_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x988, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_sda.i2c0_sda */ + AM33XX_IOPAD(0x98c, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_scl.i2c0_scl */ + >; + }; + + + i2c1_pins: pinmux_i2c1_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x968, PIN_INPUT_PULLUP | MUX_MODE3) /* uart0_ctsn.i2c1_sda */ + AM33XX_IOPAD(0x96c, PIN_INPUT_PULLUP | MUX_MODE3) /* uart0_rtsn.i2c1_scl */ + >; + }; + + uart0_pins: pinmux_uart0_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x970, PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */ + AM33XX_IOPAD(0x974, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */ + >; + }; + + uart1_pins: pinmux_uart1_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x978, PIN_INPUT | MUX_MODE0) /* uart1_ctsn.uart1_ctsn */ + AM33XX_IOPAD(0x97C, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart1_rtsn.uart1_rtsn */ + AM33XX_IOPAD(0x980, PIN_INPUT_PULLUP | MUX_MODE0) /* uart1_rxd.uart1_rxd */ + AM33XX_IOPAD(0x984, PIN_OUTPUT | MUX_MODE0) /* uart1_txd.uart1_txd */ + >; + }; + + uart2_pins: pinmux_uart2_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x8d8, PIN_INPUT | MUX_MODE6) /* lcd_data14.uart5_ctsn */ + AM33XX_IOPAD(0x8dc, PIN_OUTPUT_PULLDOWN | MUX_MODE6) /* lcd_data15.uart5_rtsn */ + AM33XX_IOPAD(0x8c4, PIN_INPUT_PULLUP | MUX_MODE4) /* lcd_data9.uart5_rxd */ + AM33XX_IOPAD(0x8c0, PIN_OUTPUT | MUX_MODE4) /* lcd_data8.uart5_txd */ + >; + }; + + cpsw_default: cpsw_default { + pinctrl-single,pins = < + /* Slave 1 */ + AM33XX_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_crs.rmii1_crs_dv */ + AM33XX_IOPAD(0x910, PIN_INPUT_PULLUP | MUX_MODE1) /* mii1_rxerr.rmii1_rxerr */ + AM33XX_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txen.rmii1_txen */ + AM33XX_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txd1.rmii1_txd1 */ + AM33XX_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txd0.rmii1_txd0 */ + AM33XX_IOPAD(0x93c, PIN_INPUT_PULLUP | MUX_MODE1) /* mii1_rxd1.rmii1_rxd1 */ + AM33XX_IOPAD(0x940, PIN_INPUT_PULLUP | MUX_MODE1) /* mii1_rxd0.rmii1_rxd0 */ + AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE0) /* mii1_refclk.rmii1_refclk */ + + /* Slave 2 */ + AM33XX_IOPAD(0x870, PIN_INPUT_PULLDOWN | MUX_MODE3) /* rmii2_crs_dv */ + AM33XX_IOPAD(0x874, PIN_INPUT_PULLDOWN | MUX_MODE3) /* rmii2_rxer */ + AM33XX_IOPAD(0x840, PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* rmii2_txen */ + AM33XX_IOPAD(0x850, PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* rmii2_td1 */ + AM33XX_IOPAD(0x854, PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* rmii2_td0 */ + AM33XX_IOPAD(0x868, PIN_INPUT_PULLDOWN | MUX_MODE3) /* rmii2_rd1 */ + AM33XX_IOPAD(0x86c, PIN_INPUT_PULLDOWN | MUX_MODE3) /* rmii2_rd0 */ + AM33XX_IOPAD(0x908, PIN_INPUT_PULLDOWN | MUX_MODE1) /* rmii2_refclk */ + + >; + }; + + davinci_mdio_default: davinci_mdio_default { + pinctrl-single,pins = < + /* MDIO */ + AM33XX_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */ + AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */ + >; + }; + + mmc0_pins_default: pinmux_mmc0_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x8f0, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat3 */ + AM33XX_IOPAD(0x8f4, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat2 */ + AM33XX_IOPAD(0x8f8, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat1 */ + AM33XX_IOPAD(0x8fc, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat0 */ + AM33XX_IOPAD(0x900, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_clk */ + AM33XX_IOPAD(0x904, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_cmd */ + AM33XX_IOPAD(0x990, PIN_INPUT_PULLUP | MUX_MODE7) /* mcasp0_aclkx.gpio3_14 */ + AM33XX_IOPAD(0x9a0, PIN_INPUT_PULLUP | MUX_MODE7) /* mcasp0_aclkx.gpio3_18 */ + >; + }; + + mmc2_pins_default: pinmux_mmc2_pins { + pinctrl-single,pins = < + /* eMMC */ + AM33XX_IOPAD(0x830, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_ad12.mmc2_dat0 */ + AM33XX_IOPAD(0x834, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_ad13.mmc2_dat1 */ + AM33XX_IOPAD(0x838, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_ad14.mmc2_dat2 */ + AM33XX_IOPAD(0x83c, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_ad15.mmc2_dat3 */ + AM33XX_IOPAD(0x820, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_ad8.mmc2_dat4 */ + AM33XX_IOPAD(0x824, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_ad9.mmc2_dat5 */ + AM33XX_IOPAD(0x828, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_ad10.mmc2_dat6 */ + AM33XX_IOPAD(0x82c, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_ad11.mmc2_dat7 */ + AM33XX_IOPAD(0x888, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_csn3.mmc2_cmd */ + AM33XX_IOPAD(0x88c, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_clk.mmc2_clk */ + >; + }; + + spi0_pins: pinmux_spi0 { + pinctrl-single,pins = < + AM33XX_IOPAD(0x950, PIN_INPUT_PULLUP | MUX_MODE0) /* spi0_sclk.spi0_sclk */ + AM33XX_IOPAD(0x95C, PIN_INPUT_PULLUP | MUX_MODE0) /* spi0_cs0.spi0_cs0 */ + AM33XX_IOPAD(0x954, PIN_INPUT_PULLUP | MUX_MODE0) /* spi0_d0.spi0_d0 */ + AM33XX_IOPAD(0x958, PIN_INPUT_PULLUP | MUX_MODE0) /* spi0_d1.spi0_d1 */ + >; + }; + +}; + +&uart0 { + /* Console */ + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins>; +}; + +&uart1 { + /* UART 1 setting */ + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&uart1_pins>; +}; + +&uart5 { + /* UART 2 setting */ + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&uart2_pins>; +}; + +&i2c0 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins>; + + status = "okay"; + clock-frequency = <400000>; + + tpm: tpm@20 { + compatible = "infineon,slb9645tt"; + reg = <0x20>; + }; + + tps: tps@2d { + compatible = "ti,tps65910"; + reg = <0x2d>; + }; + + eeprom: eeprom@50 { + compatible = "atmel,24c16"; + pagesize = <16>; + reg = <0x50>; + }; + + rtc_wdt: rtc_wdt@68 { + compatible = "dallas,ds1374"; + reg = <0x68>; + }; +}; + +&i2c1 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins>; + + status = "okay"; + clock-frequency = <400000>; + gpio_xten: gpio_xten@27 { + compatible = "nxp,pca9535"; + gpio-controller; + #gpio-cells = <2>; + reg = <0x27>; + }; +}; + +&usb { + status = "okay"; +}; + +&usb_ctrl_mod { + status = "okay"; +}; + +&usb0_phy { + status = "okay"; +}; + +&usb1_phy { + status = "okay"; +}; + +&usb0 { + status = "okay"; + dr_mode = "host"; +}; + +&usb1 { + status = "okay"; + dr_mode = "host"; +}; + +&cppi41dma { + status = "okay"; +}; + +#include "tps65910.dtsi" + +&tps { + vcc1-supply = <&vbat>; + vcc2-supply = <&vbat>; + vcc3-supply = <&vbat>; + vcc4-supply = <&vbat>; + vcc5-supply = <&vbat>; + vcc6-supply = <&vbat>; + vcc7-supply = <&vbat>; + vccio-supply = <&vbat>; + + regulators { + vrtc_reg: regulator@0 { + regulator-always-on; + }; + + vio_reg: regulator@1 { + regulator-always-on; + }; + + vdd1_reg: regulator@2 { + /* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */ + regulator-name = "vdd_mpu"; + regulator-min-microvolt = <912500>; + regulator-max-microvolt = <1378000>; + regulator-boot-on; + regulator-always-on; + }; + + vdd2_reg: regulator@3 { + /* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */ + regulator-name = "vdd_core"; + regulator-min-microvolt = <912500>; + regulator-max-microvolt = <1150000>; + regulator-boot-on; + regulator-always-on; + }; + + vdd3_reg: regulator@4 { + regulator-always-on; + }; + + vdig1_reg: regulator@5 { + regulator-always-on; + }; + + vdig2_reg: regulator@6 { + regulator-always-on; + }; + + vpll_reg: regulator@7 { + regulator-always-on; + }; + + vdac_reg: regulator@8 { + regulator-always-on; + }; + + vaux1_reg: regulator@9 { + regulator-always-on; + }; + + vaux2_reg: regulator@10 { + regulator-always-on; + }; + + vaux33_reg: regulator@11 { + regulator-always-on; + }; + + vmmc_reg: regulator@12 { + compatible = "regulator-fixed"; + regulator-name = "vmmc_reg"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + }; +}; + +/* Power */ +&vbat { + regulator-name = "vbat"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; +}; + +&mac { + pinctrl-names = "default"; + pinctrl-0 = <&cpsw_default>; + dual_emac = <1>; + status = "okay"; +}; + +&davinci_mdio { + pinctrl-names = "default"; + pinctrl-0 = <&davinci_mdio_default>; + status = "okay"; +}; + +&cpsw_emac0 { + status = "okay"; + phy_id = <&davinci_mdio>, <4>; + phy-mode = "rmii"; + dual_emac_res_vlan = <1>; +}; + +&cpsw_emac1 { + status = "okay"; + phy_id = <&davinci_mdio>, <5>; + phy-mode = "rmii"; + dual_emac_res_vlan = <2>; +}; + +&phy_sel { + reg= <0x44e10650 0xf5>; + rmii-clock-ext; +}; + +&sham { + status = "okay"; +}; + +&aes { + status = "okay"; +}; + +&gpio0 { + ti,no-reset-on-init; +}; + +&mmc1 { + pinctrl-names = "default"; + vmmc-supply = <&vmmcsd_fixed>; + bus-width = <4>; + pinctrl-0 = <&mmc0_pins_default>; + cd-gpios = <&gpio3 14 GPIO_ACTIVE_HIGH>; + wp-gpios = <&gpio3 18 GPIO_ACTIVE_HIGH>; + status = "okay"; +}; + +&mmc3 { + dmas = <&edma_xbar 12 0 1 + &edma_xbar 13 0 2>; + dma-names = "tx", "rx"; + pinctrl-names = "default"; + vmmc-supply = <&vmmcsd_fixed>; + bus-width = <8>; + pinctrl-0 = <&mmc2_pins_default>; + ti,non-removable; + status = "okay"; +}; + +&buttons { + pinctrl-names = "default"; + pinctrl-0 = <&push_button_pins>; + #address-cells = <1>; + #size-cells = <0>; + + button@0 { + label = "push_button"; + linux,code = <0x100>; + gpios = <&gpio3 21 GPIO_ACTIVE_LOW>; + }; +}; + +/* SPI Busses */ +&spi0 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&spi0_pins>; + + m25p80@0 { + compatible = "mx25l6405d"; + spi-max-frequency = <40000000>; + + reg = <0>; + spi-cpol; + spi-cpha; + #address-cells = <1>; + #size-cells = <1>; + + /* reg : The partition's offset and size within the mtd bank. */ + partitions@0 { + label = "MLO"; + reg = <0x0 0x80000>; + }; + + partitions@1 { + label = "U-Boot"; + reg = <0x80000 0x100000>; + }; + + partitions@2 { + label = "U-Boot Env"; + reg = <0x180000 0x20000>; + }; + }; +}; Modified: head/sys/gnu/dts/arm/am33xx.dtsi ============================================================================== --- head/sys/gnu/dts/arm/am33xx.dtsi Sat Nov 18 15:34:31 2017 (r325967) +++ head/sys/gnu/dts/arm/am33xx.dtsi Sat Nov 18 15:46:48 2017 (r325968) @@ -36,6 +36,8 @@ phy1 = &usb1_phy; ethernet0 = &cpsw_emac0; ethernet1 = &cpsw_emac1; + spi0 = &spi0; + spi1 = &spi1; }; cpus { Modified: head/sys/gnu/dts/arm/am437x-gp-evm.dts ============================================================================== --- head/sys/gnu/dts/arm/am437x-gp-evm.dts Sat Nov 18 15:34:31 2017 (r325967) +++ head/sys/gnu/dts/arm/am437x-gp-evm.dts Sat Nov 18 15:46:48 2017 (r325968) @@ -149,6 +149,13 @@ system-clock-frequency = <12000000>; }; }; + + beeper: beeper { + compatible = "gpio-beeper"; + pinctrl-names = "default"; + pinctrl-0 = <&beeper_pins>; + gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>; + }; }; &am43xx_pinmux { @@ -510,6 +517,13 @@ AM4372_IOPAD(0x974, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */ >; }; + + beeper_pins: beeper_pins { + pinctrl-single,pins = < + AM4372_IOPAD(0x9e0, PIN_OUTPUT_PULLUP | MUX_MODE7) /* cam1_field.gpio4_12 */ + >; + }; + }; &uart0 { @@ -842,6 +856,7 @@ interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */ <1 IRQ_TYPE_NONE>; /* termcount */ rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */ + ti,nand-xfer-type = "prefetch-dma"; ti,nand-ecc-opt = "bch16"; ti,elm-id = <&elm>; nand-bus-width = <8>; Modified: head/sys/gnu/dts/arm/am43x-epos-evm.dts ============================================================================== --- head/sys/gnu/dts/arm/am43x-epos-evm.dts Sat Nov 18 15:34:31 2017 (r325967) +++ head/sys/gnu/dts/arm/am43x-epos-evm.dts Sat Nov 18 15:46:48 2017 (r325968) @@ -388,6 +388,7 @@ pinctrl-0 = <&cpsw_default>; pinctrl-1 = <&cpsw_sleep>; status = "okay"; + slaves = <1>; }; &davinci_mdio { @@ -402,11 +403,6 @@ phy-mode = "rmii"; }; -&cpsw_emac1 { - phy_id = <&davinci_mdio>, <1>; - phy-mode = "rmii"; -}; - &phy_sel { rmii-clock-ext; }; @@ -564,6 +560,7 @@ interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */ <1 IRQ_TYPE_NONE>; /* termcount */ rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */ + ti,nand-xfer-type = "prefetch-dma"; ti,nand-ecc-opt = "bch16"; ti,elm-id = <&elm>; nand-bus-width = <8>; Modified: head/sys/gnu/dts/arm/am571x-idk.dts ============================================================================== --- head/sys/gnu/dts/arm/am571x-idk.dts Sat Nov 18 15:34:31 2017 (r325967) +++ head/sys/gnu/dts/arm/am571x-idk.dts Sat Nov 18 15:46:48 2017 (r325968) @@ -11,6 +11,7 @@ #include #include #include "am57xx-idk-common.dtsi" +#include "dra72x-mmc-iodelay.dtsi" / { model = "TI AM5718 IDK"; @@ -64,13 +65,6 @@ }; }; -&mmc1 { - status = "okay"; - vmmc-supply = <&ldo1_reg>; - bus-width = <4>; - cd-gpios = <&gpio6 27 0>; /* gpio 219 */ -}; - &omap_dwc3_2 { extcon = <&extcon_usb2>; }; @@ -95,4 +89,31 @@ mbox_ipu2_ipc3x: mbox_ipu2_ipc3x { status = "okay"; }; +}; + +&pcie1_rc { + status = "okay"; + gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>; +}; + +&pcie1_ep { + gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>; +}; + +&mmc1 { + pinctrl-names = "default", "hs", "sdr12", "sdr25", "sdr50", "ddr50", "sdr104"; + pinctrl-0 = <&mmc1_pins_default>; + pinctrl-1 = <&mmc1_pins_hs>; + pinctrl-2 = <&mmc1_pins_sdr12>; + pinctrl-3 = <&mmc1_pins_sdr25>; + pinctrl-4 = <&mmc1_pins_sdr50>; + pinctrl-5 = <&mmc1_pins_ddr50_rev20 &mmc1_iodelay_ddr50_conf>; + pinctrl-6 = <&mmc1_pins_sdr104 &mmc1_iodelay_sdr104_rev20_conf>; +}; + +&mmc2 { + pinctrl-names = "default", "hs", "ddr_1_8v"; + pinctrl-0 = <&mmc2_pins_default>; + pinctrl-1 = <&mmc2_pins_hs>; + pinctrl-2 = <&mmc2_pins_ddr_rev20 &mmc2_iodelay_ddr_conf>; }; Modified: head/sys/gnu/dts/arm/am572x-idk.dts ============================================================================== --- head/sys/gnu/dts/arm/am572x-idk.dts Sat Nov 18 15:34:31 2017 (r325967) +++ head/sys/gnu/dts/arm/am572x-idk.dts Sat Nov 18 15:46:48 2017 (r325968) @@ -12,6 +12,7 @@ #include #include #include "am57xx-idk-common.dtsi" +#include "dra74x-mmc-iodelay.dtsi" / { model = "TI AM5728 IDK"; @@ -67,6 +68,24 @@ }; }; +&mmc1 { + pinctrl-names = "default", "hs", "sdr12", "sdr25", "sdr50", "ddr50", "sdr104"; + pinctrl-0 = <&mmc1_pins_default>; + pinctrl-1 = <&mmc1_pins_hs>; + pinctrl-2 = <&mmc1_pins_sdr12>; + pinctrl-3 = <&mmc1_pins_sdr25>; + pinctrl-4 = <&mmc1_pins_sdr50>; + pinctrl-5 = <&mmc1_pins_ddr50 &mmc1_iodelay_ddr_rev20_conf>; + pinctrl-6 = <&mmc1_pins_sdr104 &mmc1_iodelay_sdr104_rev20_conf>; +}; + +&mmc2 { + pinctrl-names = "default", "hs", "ddr_1_8v"; + pinctrl-0 = <&mmc2_pins_default>; + pinctrl-1 = <&mmc2_pins_hs>; + pinctrl-2 = <&mmc2_pins_ddr_rev20>; +}; + &omap_dwc3_2 { extcon = <&extcon_usb2>; }; @@ -76,19 +95,16 @@ vbus-gpio = <&gpio3 26 GPIO_ACTIVE_HIGH>; }; -&mmc1 { - status = "okay"; - vmmc-supply = <&v3_3d>; - vmmc_aux-supply = <&ldo1_reg>; - bus-width = <4>; - cd-gpios = <&gpio6 27 0>; /* gpio 219 */ -}; - &sn65hvs882 { load-gpios = <&gpio3 19 GPIO_ACTIVE_LOW>; }; -&pcie1 { +&pcie1_rc { + status = "okay"; + gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>; +}; + +&pcie1_ep { gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>; }; Modified: head/sys/gnu/dts/arm/am57xx-beagle-x15-common.dtsi ============================================================================== --- head/sys/gnu/dts/arm/am57xx-beagle-x15-common.dtsi Sat Nov 18 15:34:31 2017 (r325967) +++ head/sys/gnu/dts/arm/am57xx-beagle-x15-common.dtsi Sat Nov 18 15:46:48 2017 (r325968) @@ -9,6 +9,7 @@ #include "dra74x.dtsi" #include "am57xx-commercial-grade.dtsi" +#include "dra74x-mmc-iodelay.dtsi" #include #include @@ -166,34 +167,6 @@ }; }; -&dra7_pmx_core { - mmc1_pins_default: mmc1_pins_default { - pinctrl-single,pins = < - DRA7XX_CORE_IOPAD(0x376c, PIN_INPUT | MUX_MODE14) /* mmc1sdcd.gpio219 */ - DRA7XX_CORE_IOPAD(0x3754, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_clk.clk */ - DRA7XX_CORE_IOPAD(0x3758, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_cmd.cmd */ - DRA7XX_CORE_IOPAD(0x375c, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_dat0.dat0 */ - DRA7XX_CORE_IOPAD(0x3760, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_dat1.dat1 */ - DRA7XX_CORE_IOPAD(0x3764, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_dat2.dat2 */ - DRA7XX_CORE_IOPAD(0x3768, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_dat3.dat3 */ - >; - }; - - mmc2_pins_default: mmc2_pins_default { - pinctrl-single,pins = < - DRA7XX_CORE_IOPAD(0x349c, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a23.mmc2_clk */ - DRA7XX_CORE_IOPAD(0x34b0, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_cs1.mmc2_cmd */ - DRA7XX_CORE_IOPAD(0x34a0, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a24.mmc2_dat0 */ - DRA7XX_CORE_IOPAD(0x34a4, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a25.mmc2_dat1 */ - DRA7XX_CORE_IOPAD(0x34a8, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a26.mmc2_dat2 */ - DRA7XX_CORE_IOPAD(0x34ac, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a27.mmc2_dat3 */ - DRA7XX_CORE_IOPAD(0x348c, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a19.mmc2_dat4 */ - DRA7XX_CORE_IOPAD(0x3490, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a20.mmc2_dat5 */ - DRA7XX_CORE_IOPAD(0x3494, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a21.mmc2_dat6 */ - DRA7XX_CORE_IOPAD(0x3498, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a22.mmc2_dat7 */ - >; - }; -}; &i2c1 { status = "okay"; clock-frequency = <400000>; @@ -570,7 +543,12 @@ }; }; -&pcie1 { +&pcie1_rc { + status = "ok"; + gpios = <&gpio2 8 GPIO_ACTIVE_LOW>; +}; + +&pcie1_ep { gpios = <&gpio2 8 GPIO_ACTIVE_LOW>; }; Modified: head/sys/gnu/dts/arm/am57xx-beagle-x15-revb1.dts ============================================================================== --- head/sys/gnu/dts/arm/am57xx-beagle-x15-revb1.dts Sat Nov 18 15:34:31 2017 (r325967) +++ head/sys/gnu/dts/arm/am57xx-beagle-x15-revb1.dts Sat Nov 18 15:46:48 2017 (r325968) @@ -19,8 +19,23 @@ }; &mmc1 { + pinctrl-names = "default", "hs", "sdr12", "sdr25", "sdr50", "ddr50", "sdr104"; + pinctrl-0 = <&mmc1_pins_default>; + pinctrl-1 = <&mmc1_pins_hs>; + pinctrl-2 = <&mmc1_pins_sdr12>; + pinctrl-3 = <&mmc1_pins_sdr25>; + pinctrl-4 = <&mmc1_pins_sdr50>; + pinctrl-5 = <&mmc1_pins_ddr50 &mmc1_iodelay_ddr_rev11_conf>; + pinctrl-6 = <&mmc1_pins_sdr104 &mmc1_iodelay_sdr104_rev11_conf>; vmmc-supply = <&vdd_3v3>; - vmmc-aux-supply = <&ldo1_reg>; + vqmmc-supply = <&ldo1_reg>; +}; + +&mmc2 { + pinctrl-names = "default", "hs", "ddr_1_8v"; + pinctrl-0 = <&mmc2_pins_default>; + pinctrl-1 = <&mmc2_pins_hs>; + pinctrl-2 = <&mmc2_pins_ddr_3_3v_rev11 &mmc2_iodelay_ddr_3_3v_rev11_conf>; }; /* errata i880 "Ethernet RGMII2 Limited to 10/100 Mbps" */ Copied: head/sys/gnu/dts/arm/am57xx-beagle-x15-revc.dts (from r325773, vendor/device-tree/dist/src/arm/am57xx-beagle-x15-revc.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/arm/am57xx-beagle-x15-revc.dts Sat Nov 18 15:46:48 2017 (r325968, copy of r325773, vendor/device-tree/dist/src/arm/am57xx-beagle-x15-revc.dts) @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2014-2017 Texas Instruments Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include "am57xx-beagle-x15-common.dtsi" + +/ { + model = "TI AM5728 BeagleBoard-X15 rev C"; +}; + +&tpd12s015 { + gpios = <&gpio7 10 GPIO_ACTIVE_HIGH>, /* gpio7_10, CT CP HPD */ + <&gpio2 30 GPIO_ACTIVE_HIGH>, /* gpio2_30, LS OE */ + <&gpio7 12 GPIO_ACTIVE_HIGH>; /* gpio7_12/sp1_cs2, HPD */ +}; + +&mmc1 { + pinctrl-names = "default", "hs", "sdr12", "sdr25", "sdr50", "ddr50", "sdr104"; + pinctrl-0 = <&mmc1_pins_default>; + pinctrl-1 = <&mmc1_pins_hs>; + pinctrl-2 = <&mmc1_pins_sdr12>; + pinctrl-3 = <&mmc1_pins_sdr25>; + pinctrl-4 = <&mmc1_pins_sdr50>; + pinctrl-5 = <&mmc1_pins_ddr50 &mmc1_iodelay_ddr_rev20_conf>; + pinctrl-6 = <&mmc1_pins_sdr104 &mmc1_iodelay_sdr104_rev20_conf>; + vmmc-supply = <&vdd_3v3>; + vqmmc-supply = <&ldo1_reg>; +}; + +&mmc2 { + pinctrl-names = "default", "hs", "ddr_1_8v"; + pinctrl-0 = <&mmc2_pins_default>; + pinctrl-1 = <&mmc2_pins_hs>; + pinctrl-2 = <&mmc2_pins_ddr_rev20>; +}; Modified: head/sys/gnu/dts/arm/am57xx-beagle-x15.dts ============================================================================== --- head/sys/gnu/dts/arm/am57xx-beagle-x15.dts Sat Nov 18 15:34:31 2017 (r325967) +++ head/sys/gnu/dts/arm/am57xx-beagle-x15.dts Sat Nov 18 15:46:48 2017 (r325968) @@ -20,7 +20,18 @@ }; &mmc1 { + pinctrl-names = "default", "hs"; + pinctrl-0 = <&mmc1_pins_default>; + pinctrl-1 = <&mmc1_pins_hs>; + vmmc-supply = <&ldo1_reg>; +}; + +&mmc2 { + pinctrl-names = "default", "hs", "ddr_1_8v"; + pinctrl-0 = <&mmc2_pins_default>; + pinctrl-1 = <&mmc2_pins_hs>; + pinctrl-2 = <&mmc2_pins_ddr_3_3v_rev11 &mmc2_iodelay_ddr_3_3v_rev11_conf>; }; /* errata i880 "Ethernet RGMII2 Limited to 10/100 Mbps" */ Modified: head/sys/gnu/dts/arm/am57xx-commercial-grade.dtsi ============================================================================== --- head/sys/gnu/dts/arm/am57xx-commercial-grade.dtsi Sat Nov 18 15:34:31 2017 (r325967) +++ head/sys/gnu/dts/arm/am57xx-commercial-grade.dtsi Sat Nov 18 15:46:48 2017 (r325968) @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 &cpu_alert0 { temperature = <80000>; /* milliCelsius */ }; Modified: head/sys/gnu/dts/arm/am57xx-idk-common.dtsi ============================================================================== --- head/sys/gnu/dts/arm/am57xx-idk-common.dtsi Sat Nov 18 15:34:31 2017 (r325967) +++ head/sys/gnu/dts/arm/am57xx-idk-common.dtsi Sat Nov 18 15:46:48 2017 (r325968) @@ -399,6 +399,14 @@ dr_mode = "peripheral"; }; +&mmc1 { + status = "okay"; + vmmc-supply = <&v3_3d>; + vqmmc-supply = <&ldo1_reg>; + bus-width = <4>; + cd-gpios = <&gpio6 27 GPIO_ACTIVE_LOW>; /* gpio 219 */ +}; + &mmc2 { status = "okay"; vmmc-supply = <&v3_3d>; Modified: head/sys/gnu/dts/arm/am57xx-industrial-grade.dtsi ============================================================================== --- head/sys/gnu/dts/arm/am57xx-industrial-grade.dtsi Sat Nov 18 15:34:31 2017 (r325967) +++ head/sys/gnu/dts/arm/am57xx-industrial-grade.dtsi Sat Nov 18 15:46:48 2017 (r325968) @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 &cpu_alert0 { temperature = <90000>; /* milliCelsius */ }; Modified: head/sys/gnu/dts/arm/armada-370.dtsi ============================================================================== --- head/sys/gnu/dts/arm/armada-370.dtsi Sat Nov 18 15:34:31 2017 (r325967) +++ head/sys/gnu/dts/arm/armada-370.dtsi Sat Nov 18 15:46:48 2017 (r325968) @@ -72,7 +72,7 @@ reg = ; }; - pciec: pcie-controller@82000000 { + pciec: pcie@82000000 { compatible = "marvell,armada-370-pcie"; status = "disabled"; device_type = "pci"; @@ -100,6 +100,7 @@ #interrupt-cells = <1>; ranges = <0x82000000 0 0 0x82000000 0x1 0 1 0 0x81000000 0 0 0x81000000 0x1 0 1 0>; + bus-range = <0x00 0xff>; interrupt-map-mask = <0 0 0 0>; interrupt-map = <0 0 0 0 &mpic 58>; marvell,pcie-port = <0>; @@ -117,6 +118,7 @@ #interrupt-cells = <1>; ranges = <0x82000000 0 0 0x82000000 0x2 0 1 0 0x81000000 0 0 0x81000000 0x2 0 1 0>; + bus-range = <0x00 0xff>; interrupt-map-mask = <0 0 0 0>; interrupt-map = <0 0 0 0 &mpic 62>; marvell,pcie-port = <1>; Modified: head/sys/gnu/dts/arm/armada-375.dtsi ============================================================================== --- head/sys/gnu/dts/arm/armada-375.dtsi Sat Nov 18 15:34:31 2017 (r325967) +++ head/sys/gnu/dts/arm/armada-375.dtsi Sat Nov 18 15:46:48 2017 (r325968) @@ -178,9 +178,9 @@ reg = <0x8000 0x1000>; cache-unified; cache-level = <2>; - arm,double-linefill-incr = <1>; + arm,double-linefill-incr = <0>; arm,double-linefill-wrap = <0>; - arm,double-linefill = <1>; + arm,double-linefill = <0>; prefetch-data = <1>; }; @@ -582,7 +582,7 @@ }; }; - pciec: pcie-controller@82000000 { + pciec: pcie@82000000 { compatible = "marvell,armada-370-pcie"; status = "disabled"; device_type = "pci"; @@ -610,6 +610,7 @@ #interrupt-cells = <1>; ranges = <0x82000000 0 0 0x82000000 0x1 0 1 0 0x81000000 0 0 0x81000000 0x1 0 1 0>; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Sat Nov 18 16:07:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 276A8DBE9DF; Sat, 18 Nov 2017 16:07:55 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8157747DA; Sat, 18 Nov 2017 16:07:54 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAIG7rVx001136; Sat, 18 Nov 2017 16:07:53 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAIG7rNZ001135; Sat, 18 Nov 2017 16:07:53 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201711181607.vAIG7rNZ001135@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sat, 18 Nov 2017 16:07:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325969 - in head/sys: dts/arm modules/dtb/allwinner X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/sys: dts/arm modules/dtb/allwinner X-SVN-Commit-Revision: 325969 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 16:07:55 -0000 Author: manu Date: Sat Nov 18 16:07:53 2017 New Revision: 325969 URL: https://svnweb.freebsd.org/changeset/base/325969 Log: dts: Allwinner: Remove our last custom DTS All Allwinner boards should use the upstream DTS so remove our remaining custom ones. Deleted: head/sys/dts/arm/a83t.dtsi head/sys/dts/arm/h3.dtsi head/sys/dts/arm/nanopi-neo.dts head/sys/dts/arm/orangepi-plus-2e.dts head/sys/dts/arm/sinovoip-bpi-m3.dts head/sys/dts/arm/sun7i-a20-hdmi.dtsi head/sys/dts/arm/sun8i-a83t-sinovoip-bpi-m3.dts head/sys/dts/arm/sun8i-a83t.dtsi head/sys/dts/arm/sun8i-h3-nanopi-neo.dts head/sys/dts/arm/xpowers-axp209.dtsi Modified: head/sys/modules/dtb/allwinner/Makefile Modified: head/sys/modules/dtb/allwinner/Makefile ============================================================================== --- head/sys/modules/dtb/allwinner/Makefile Sat Nov 18 15:46:48 2017 (r325968) +++ head/sys/modules/dtb/allwinner/Makefile Sat Nov 18 16:07:53 2017 (r325969) @@ -1,8 +1,6 @@ # $FreeBSD$ # All the dts files for allwinner systems we support. DTS= \ - nanopi-neo.dts \ - orangepi-plus-2e.dts \ sun4i-a10-cubieboard.dts \ sun4i-a10-olinuxino-lime.dts \ sun6i-a31s-sinovoip-bpi-m2.dts \ @@ -14,7 +12,9 @@ DTS= \ sun7i-a20-pcduino3.dts \ sun8i-h2-plus-orangepi-zero.dts \ sun8i-h3-nanopi-m1.dts \ - sun8i-h3-orangepi-one.dts + sun8i-h3-nanopi-neo.dts \ + sun8i-h3-orangepi-one.dts \ + sun8i-h3-orangepi-plus2e.dts LINKS= \ ${DTBDIR}/sun4i-a10-cubieboard.dtb ${DTBDIR}/cubieboard.dtb \ @@ -24,6 +24,5 @@ LINKS= \ ${DTBDIR}/sun7i-a20-cubieboard2.dtb ${DTBDIR}/cubieboard2.dtb \ ${DTBDIR}/sun7i-a20-olimex-som-evb.dtb ${DTBDIR}/olimex-a20-som-evb.dtb \ ${DTBDIR}/sun7i-a20-pcduino3.dtb ${DTBDIR}/pcduino3.dtb \ - ${DTBDIR}/nanopi-neo.dtb ${DTBDIR}/sun8i-h3-nanopi-neo.dtb .include From owner-svn-src-head@freebsd.org Sat Nov 18 16:14:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6523DBEC3E; Sat, 18 Nov 2017 16:14:39 +0000 (UTC) (envelope-from se@freebsd.org) Received: from mailout07.t-online.de (mailout07.t-online.de [194.25.134.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailout00.t-online.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6589C74BFE; Sat, 18 Nov 2017 16:14:39 +0000 (UTC) (envelope-from se@freebsd.org) Received: from fwd12.aul.t-online.de (fwd12.aul.t-online.de [172.20.26.241]) by mailout07.t-online.de (Postfix) with SMTP id B967A42D4675; Sat, 18 Nov 2017 17:14:30 +0100 (CET) Received: from Stefans-MBP-2.fritz.box (Tl8UfiZUQhJhAqCmVp4wSMv9X41hfyUM7BY1ISYWQRfi+zmU4+aaDrsZWfkP3ehgGO@[87.151.220.147]) by fwd12.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1eG5lG-1dZ5yi0; Sat, 18 Nov 2017 17:14:30 +0100 Subject: Re: svn commit: r325954 - in head: . share/mk sys/conf usr.sbin/config To: Pedro Giffuni , Stefan Esser Cc: src-committers , "svn-src-all@freebsd.org" , rgrimes@freebsd.org, "svn-src-head@freebsd.org" , "O. Hartmann" , Warner Losh References: <201711180134.vAI1Y2ks064138@pdx.rh.CN85.dnsmgr.net> <29499AF9-FC0A-4CDA-9657-B092B3F9A0D0@FreeBSD.org> <04747a89-4dc7-a476-dc32-a158ee1f5240@freebsd.org> <75597b23-7a8c-34ad-736b-8d68ce7dea06@FreeBSD.org> From: Stefan Esser Message-ID: <0186512e-dc90-6d00-c048-d87a9c1948a3@freebsd.org> Date: Sat, 18 Nov 2017 17:14:28 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <75597b23-7a8c-34ad-736b-8d68ce7dea06@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-ID: Tl8UfiZUQhJhAqCmVp4wSMv9X41hfyUM7BY1ISYWQRfi+zmU4+aaDrsZWfkP3ehgGO X-TOI-MSGID: 7d625a4f-0f07-4f53-a97c-34b367b28676 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 16:14:39 -0000 Am 18.11.17 um 16:01 schrieb Pedro Giffuni: > Hi; > > On 11/18/17 09:15, Stefan Esser wrote: >> Am 18.11.17 um 03:31 schrieb Pedro Giffuni: >>>> On Nov 17, 2017, at 20:34, Rodney W. Grimes >>>> wrote: >>>> >>>> [ Charset UTF-8 unsupported, converting... ] >>>>> Kib@ posted to arch that we were removing it, nobody objected, we removed >>>>> it. If it was a working feature that might have a few users, that's one >>>>> thing. But I don't think make lint has actually worked in at least a decade. >>>> Thats a sad state of affairs. >>>> >>> t’s not sad, just the way things are, modern compilers are doing much of >>> the checking older tools like lint used to do.. OpenBSD and DragonflyBSD >>> both killed lint ages ago. >>> >>> OTOH, we should probably consider other tools, like sparse: >>> >>> https://sparse.wiki.kernel.org/index.php/Main_Page >>>   The license is fine and it plays nice with the compiler. >> It builds on -CURRENT, but the Makefile needs some tweaks (it does >> not find LLVM or Gtk+-2.0, even though they are present on my system). >> >> I'll work on a port over the weekend ... > > Thanks! I've got a port that builds all of sparse except sparse-llvm. The sources use GNU extensions, and I do not think it is worth the effort to provide standard compliant replacements for them at this time. Building sparc´se-llvm will take some more effort and require the LLVM port to be installed, since it references headers not installed by our system compiler. It is an optional component, but one we definitely should have. I'm not sure how to proceed, but the easiest path forward is to make the LLVM support optional and depend on one particular LLVM version (i.e. 4.0 for now) built from a port if the option is enabled. > For it to be really useful we still would have to add annotations to the > kernel headers. Well, those could be added over time ... > I just resurrected a recent proposal from brooks@ into the IdeasPage: > > https://wiki.freebsd.org/IdeasPage#Userspace_Address_Space_Annotation > > It is actually a fun project but my hands are full! The port was easy, so far, I'll commit it without sparse-llvm for now. LLVM support will follow when I've got the remaining build issues resolved. Regards, STefan From owner-svn-src-head@freebsd.org Sat Nov 18 16:38:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A846CDBF284 for ; Sat, 18 Nov 2017 16:38:30 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22c.google.com (mail-io0-x22c.google.com [IPv6:2607:f8b0:4001:c06::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6E973754B8 for ; Sat, 18 Nov 2017 16:38:30 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22c.google.com with SMTP id v21so11798427ioi.4 for ; Sat, 18 Nov 2017 08:38:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=WU1qj9u7MJ2qATkgKufEuGAMlnSOPz+Ra9b0P3NN+ok=; b=uTSAY46qAqvmfxm1a387HFGq+KFs9vDTOkW2FNOWPka5iHIGoRleNnXq9hZLN32Wmg kM7AignOyEe6+xEzo4f7fvvwvut/gToSButD5L6cLg7mJTQq82ialdEN6w+tILjKTyTY WMhO2qQP9HjhnNsynM8VV8TDtDPvvR9+Q+ewVk8E//fpACh7mcGLP/L4yq6y49fuxcbM fHJXsyMz38DuIhANXbDKPQQ86mGbKq0cCYFJAWEozkqlcdt3YYrf1jmN0rzUCCMr9Tm0 jWMx6J7kMZ/dsyVEMNu/h/Gpat0C22/Hzv8mvu5nESCmdXLrwBtUPn61uLy4Ne89K3iE P+8g== 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=WU1qj9u7MJ2qATkgKufEuGAMlnSOPz+Ra9b0P3NN+ok=; b=KK8t/yKk2E0EC8iDLZgnr+7e32xNMN+sLG/Q2kCeqaMtkHqLSjj97Q+gnUu2Ier6Wp 18DGPi/j/X4AZsB6q9PABf+qDrwnR7ZGKgGQ2/fH6VkS7sKRrU8x9uJ2t8Wg+/hmr0UH jBnSDZnhPYVx6oT30dq/NBiTfoJv+L8vsB+zSdFa+rLdHkC7Ntn5dzNqVaP7XxZhw7ha 6KHSSPg7u4MmX+IfYDPUfCzd/NdweYSUX4MCToJvn0eWfxdRttSt66mscQGxM83V/SUx TNY69VL/IkF6o7Hxo9m730pxujVOqj9pd7GrsVZsXbQef5CHzM2nd0+bdrWKqGs+9Vra j8Fg== X-Gm-Message-State: AJaThX78v+HuVLlADobpOflfqeumdkJyuQnY8YtmyzJ+HsaXcEaZwEDC Wij9TIuL5Nr8R53Q0nHQmLtiGoelLcnheenUb2khhg== X-Google-Smtp-Source: AGs4zMaRVU74hIYiaX0ZaJ5NiRNAibJitlbDFNBw+W5WAARbC3GFJoT9xB1+u/WLiVURpTteV01B86+ByGr1Q3B6CoI= X-Received: by 10.107.48.197 with SMTP id w188mr4169271iow.301.1511023109525; Sat, 18 Nov 2017 08:38:29 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Sat, 18 Nov 2017 08:38:28 -0800 (PST) X-Originating-IP: [2603:300b:6:5100:d59a:59a:dd99:c18d] In-Reply-To: <20171118190422.V949@besplex.bde.org> References: <201711180134.vAI1Y2ks064138@pdx.rh.CN85.dnsmgr.net> <20171118190422.V949@besplex.bde.org> From: Warner Losh Date: Sat, 18 Nov 2017 09:38:28 -0700 X-Google-Sender-Auth: kWcKU5hturyC5lzjW5EQ2vg7jSA Message-ID: Subject: Re: svn commit: r325954 - in head: . share/mk sys/conf usr.sbin/config To: Bruce Evans Cc: "Rodney W. Grimes" , Warner Losh , 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.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 16:38:30 -0000 On Sat, Nov 18, 2017 at 3:42 AM, Bruce Evans wrote: > since it flags all c99 and newer usages as syntax errors. We've been >>>> >>> > This shouldn't break use of lint on K&R or C90 sources. But types.h is > broken. It no longer supports K&R, C90, or most other things that are > supposed to be controlled by the visibility ifdefs in it. Thanks for this insightful analysis. I've clipped the rest of it, which is more of the same. It can't support the new C compiler construct, and we've managed to break the old ones. Plus it gives lots of warnings that aren't useful and doesn't understand several of the idioms we've started using heavily in the kernel (such as forward struct declaration). Since many of these problems are in the system kernel headers, the break all non-trivial uses of lint. None of these things are ever going to be fixed. It's quite likely the kernel will never again compile on anything older than a c99 compiler. While we have a lot of ifdefs to attempt to support older compilers, it's almost all certainly bit-rotted from lack of use. Warner From owner-svn-src-head@freebsd.org Sat Nov 18 17:02:42 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9BCBDDBFDA5; Sat, 18 Nov 2017 17:02:42 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 30CA976374; Sat, 18 Nov 2017 17:02:42 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id vAIH2ZUF005482 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 18 Nov 2017 19:02:35 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua vAIH2ZUF005482 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id vAIH2ZZ1005481; Sat, 18 Nov 2017 19:02:35 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 18 Nov 2017 19:02:35 +0200 From: Konstantin Belousov To: Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r325638 - in head/sys: conf dev/mlx5 dev/mlx5/mlx5_core dev/mlx5/mlx5_en modules/mlx5 Message-ID: <20171118170235.GJ2272@kib.kiev.ua> References: <201711100949.vAA9n8Sw008427@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201711100949.vAA9n8Sw008427@repo.freebsd.org> User-Agent: Mutt/1.9.1 (2017-09-22) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 17:02:42 -0000 On Fri, Nov 10, 2017 at 09:49:08AM +0000, Hans Petter Selasky wrote: > Author: hselasky > Date: Fri Nov 10 09:49:08 2017 > New Revision: 325638 > URL: https://svnweb.freebsd.org/changeset/base/325638 > > Log: > Refactor the flowsteering APIs used by mlx5en(4). This change is needed by > the coming ibcore and mlx5ib updates in order to support traffic redirection > to so-called raw ethernet QPs. > > Remove unused E-switch related routines and files while at it. > This seems to break on all gcc platforms. I see cc1: warnings being treated as errors /root/deviant2/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c:2558: warning: redundant re declaration of 'iterate_rules_in_ns' [-Wredundant-decls] /root/deviant2/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c:2502: warning: previous dec laration of 'iterate_rules_in_ns' was here --- mlx5_fs_tree.o --- *** [mlx5_fs_tree.o] Error code 1 Patch below should fix this item. Are you fine with it ? diff --git a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c index bf796d65b5f..d0ffa44387c 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c @@ -2553,10 +2553,6 @@ static void iterate_rules_in_ft(struct mlx5_flow_table *ft, mutex_unlock(&ft->base.lock); } -static void iterate_rules_in_ns(struct mlx5_flow_namespace *ns, - rule_event_fn add_rule_cb, - void *context); - static void iterate_rules_in_prio(struct fs_prio *prio, rule_event_fn add_rule_cb, void *context) From owner-svn-src-head@freebsd.org Sat Nov 18 20:01:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1F99DDA6B0; Sat, 18 Nov 2017 20:01:03 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 765A47A5F0; Sat, 18 Nov 2017 20:01:03 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAIK12SH001261; Sat, 18 Nov 2017 20:01:02 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAIK12FW001260; Sat, 18 Nov 2017 20:01:02 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201711182001.vAIK12FW001260@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 18 Nov 2017 20:01:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325970 - head X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 325970 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 20:01:03 -0000 Author: bdrewery Date: Sat Nov 18 20:01:02 2017 New Revision: 325970 URL: https://svnweb.freebsd.org/changeset/base/325970 Log: Fix 'make -n' for {reinstall,distribute}kernel. PR: 201779 Sponsored by: Dell Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sat Nov 18 16:07:53 2017 (r325969) +++ head/Makefile.inc1 Sat Nov 18 20:01:02 2017 (r325970) @@ -1442,7 +1442,7 @@ reinstallkernel reinstallkernel.debug: _installcheck_k @echo "--------------------------------------------------------------" @echo ">>> Installing kernel ${INSTALLKERNEL}" @echo "--------------------------------------------------------------" - cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \ + ${_+_}cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \ ${CROSSENV} PATH=${TMPPATH} \ ${MAKE} ${IMAKE_INSTALL} KERNEL=${INSTKERNNAME} ${.TARGET:S/kernel//} .endif @@ -1451,7 +1451,7 @@ reinstallkernel reinstallkernel.debug: _installcheck_k @echo "--------------------------------------------------------------" @echo ">>> Installing kernel ${_kernel}" @echo "--------------------------------------------------------------" - cd ${KRNLOBJDIR}/${_kernel}; \ + ${_+_}cd ${KRNLOBJDIR}/${_kernel}; \ ${CROSSENV} PATH=${TMPPATH} \ ${MAKE} ${IMAKE_INSTALL} KERNEL=${INSTKERNNAME}.${_kernel} ${.TARGET:S/kernel//} .endfor @@ -1467,7 +1467,7 @@ distributekernel distributekernel.debug: .PHONY .if defined(NO_ROOT) @echo "#${MTREE_MAGIC}" > ${DESTDIR}/${DISTDIR}/kernel.premeta .endif - cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \ + ${_+_}cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \ ${IMAKEENV} ${IMAKE_INSTALL:S/METALOG/kernel.premeta/} \ ${IMAKE_MTREE} PATH=${TMPPATH} ${MAKE} KERNEL=${INSTKERNNAME} \ DESTDIR=${INSTALL_DDIR}/kernel \ @@ -1482,7 +1482,7 @@ distributekernel distributekernel.debug: .PHONY .if defined(NO_ROOT) @echo "#${MTREE_MAGIC}" > ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.premeta .endif - cd ${KRNLOBJDIR}/${_kernel}; \ + ${_+_}cd ${KRNLOBJDIR}/${_kernel}; \ ${IMAKEENV} ${IMAKE_INSTALL:S/METALOG/kernel.${_kernel}.premeta/} \ ${IMAKE_MTREE} PATH=${TMPPATH} ${MAKE} \ KERNEL=${INSTKERNNAME}.${_kernel} \ From owner-svn-src-head@freebsd.org Sat Nov 18 20:01:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C800DDA6C8; Sat, 18 Nov 2017 20:01:07 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EDCBB7A5FD; Sat, 18 Nov 2017 20:01:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAIK15GQ001321; Sat, 18 Nov 2017 20:01:05 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAIK15un001320; Sat, 18 Nov 2017 20:01:05 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201711182001.vAIK15un001320@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 18 Nov 2017 20:01:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325971 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 325971 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 20:01:07 -0000 Author: bdrewery Date: Sat Nov 18 20:01:05 2017 New Revision: 325971 URL: https://svnweb.freebsd.org/changeset/base/325971 Log: Fix PORTS_MODULES+'make reinstallkernel' trying to run bogus 'make redeinstall'. Also fix 'make installkernel' running 'make deinstall' twice. PR: 201779 MFC after: 2 weeks Sponsored by: Dell Modified: head/sys/conf/kern.post.mk Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Sat Nov 18 20:01:02 2017 (r325970) +++ head/sys/conf/kern.post.mk Sat Nov 18 20:01:05 2017 (r325971) @@ -87,7 +87,7 @@ ${__target}: ports-${__target} ports-${__target}: .for __i in ${PORTS_MODULES} @${ECHO} "===> Ports module ${__i} (${__target})" - cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B ${__target:C/install/deinstall reinstall/:C/reinstall/deinstall reinstall/} + cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B ${__target:C/(re)?install/deinstall reinstall/} .endfor .endfor .endif From owner-svn-src-head@freebsd.org Sat Nov 18 20:01:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D315DDA6F3; Sat, 18 Nov 2017 20:01:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 486B37A63B; Sat, 18 Nov 2017 20:01:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAIK19wo001379; Sat, 18 Nov 2017 20:01:09 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAIK19lc001378; Sat, 18 Nov 2017 20:01:09 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201711182001.vAIK19lc001378@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 18 Nov 2017 20:01:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325972 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 325972 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 20:01:10 -0000 Author: bdrewery Date: Sat Nov 18 20:01:09 2017 New Revision: 325972 URL: https://svnweb.freebsd.org/changeset/base/325972 Log: Include Makefile.sys.inc if possible for top-level only. This will allow disabling some things like AUTO_OBJ early if not needed for the directory/targets, without putting special logic into share/mk/*.sys.mk. Sponsored by: Dell Modified: head/share/mk/src.sys.env.mk Modified: head/share/mk/src.sys.env.mk ============================================================================== --- head/share/mk/src.sys.env.mk Sat Nov 18 20:01:05 2017 (r325971) +++ head/share/mk/src.sys.env.mk Sat Nov 18 20:01:09 2017 (r325972) @@ -44,4 +44,7 @@ MAKESYSPATH:= ${.PARSEDIR:tA} .export MAKESYSPATH .endif +.if ${RELDIR:U} == "." && ${.MAKE.LEVEL} == 0 +.sinclude "${.CURDIR}/Makefile.sys.inc" +.endif .include From owner-svn-src-head@freebsd.org Sat Nov 18 20:01:14 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B67ABDDA740; Sat, 18 Nov 2017 20:01:14 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B151B7A6C1; Sat, 18 Nov 2017 20:01:13 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAIK1CCO001428; Sat, 18 Nov 2017 20:01:12 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAIK1CKh001426; Sat, 18 Nov 2017 20:01:12 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201711182001.vAIK1CKh001426@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 18 Nov 2017 20:01:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325973 - head X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 325973 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 20:01:15 -0000 Author: bdrewery Date: Sat Nov 18 20:01:12 2017 New Revision: 325973 URL: https://svnweb.freebsd.org/changeset/base/325973 Log: Move top-level AUTO_OBJ logic to Makefile.sys.inc. Sponsored by: Dell Added: head/Makefile.sys.inc (contents, props changed) Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Sat Nov 18 20:01:09 2017 (r325972) +++ head/Makefile Sat Nov 18 20:01:12 2017 (r325973) @@ -167,18 +167,6 @@ META_TGT_WHITELIST+= \ tinderbox toolchain \ toolchains universe world worlds xdev xdev-build -# Likewise for AUTO_OBJ. Many targets do not need object directories created -# for each visited directory. Only when things are being built are they -# needed. Having AUTO_OBJ disabled in a build target is fine as it should -# fallback to running 'make obj' as needed. If a target is not in this list -# then it is ran with MK_AUTO_OBJ=no in environment. -# 'showconfig' is in the list to avoid forcing MK_AUTO_OBJ=no for it. -AUTO_OBJ_TGT_WHITELIST+= \ - _* all all-man build* depend everything *toolchain* includes \ - libraries obj objlink showconfig tags xdev xdev-build native-xtools \ - stage* create-packages* real-packages sign-packages package-pkg \ - tinderbox universe* kernel kernels world worlds bmake - .ORDER: buildworld installworld .ORDER: buildworld distrib-dirs .ORDER: buildworld distribution @@ -245,7 +233,7 @@ SUB_MAKE= ${MAKE} -m ${.CURDIR}/share/mk .endif _MAKE= PATH=${PATH} MAKE_CMD="${MAKE}" ${SUB_MAKE} -f Makefile.inc1 \ - TARGET=${_TARGET} TARGET_ARCH=${_TARGET_ARCH} + TARGET=${_TARGET} TARGET_ARCH=${_TARGET_ARCH} ${_MAKEARGS} .if defined(MK_META_MODE) && ${MK_META_MODE} == "yes" # Only allow meta mode for the whitelisted targets. See META_TGT_WHITELIST @@ -275,21 +263,6 @@ MK_META_MODE= no .endif # !exists(/dev/filemon) && !defined(NO_FILEMON) .endif # ${MK_META_MODE} == yes .endif # defined(MK_META_MODE) && ${MK_META_MODE} == yes - -# Only allow AUTO_OBJ for the whitelisted targets. See AUTO_OBJ_TGT_WHITELIST -# above. MK_AUTO_OBJ not checked here for "yes" as it may not yet be enabled -# since it is opportunistic. -.if empty(.MAKEOVERRIDES:MMK_AUTO_OBJ) -.for _tgt in ${AUTO_OBJ_TGT_WHITELIST} -.if make(${_tgt}) -_CAN_USE_AUTO_OBJ?= yes -.endif -.endfor -.if !defined(_CAN_USE_AUTO_OBJ) -_MAKE+= MK_AUTO_OBJ=no -MK_AUTO_OBJ= no -.endif -.endif # empty(.MAKEOVERRIDES:MMK_AUTO_OBJ) # Guess target architecture from target type, and vice versa, based on # historic FreeBSD practice of tending to have TARGET == TARGET_ARCH Added: head/Makefile.sys.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/Makefile.sys.inc Sat Nov 18 20:01:12 2017 (r325973) @@ -0,0 +1,39 @@ +# $FreeBSD$ +# +# This is included very early from share/mk/src.sys.env.mk, after +# /etc/src-env.conf but before /etc/make.conf, /etc/src.conf, or OBJDIR +# handling. +# - It is not safe to use .OBJDIR/OBJTOP/OBJROOT here. +# - __ENV_ONLY_OPTIONS have been parsed by now except for opporutunistic +# MK_AUTO_OBJ. +# + +.if ${MK_DIRDEPS_BUILD} == "no" +# For AUTO_OBJ many targets do not need object directories created at top-level +# for each visited directory. Only when things are being built are they +# needed. Having AUTO_OBJ disabled in a build target is fine as it should +# fallback to running 'make obj' as needed. If a target is not in this list +# then it is ran with MK_AUTO_OBJ=no in environment. +# 'showconfig' is in the list to avoid forcing MK_AUTO_OBJ=no for it. +AUTO_OBJ_TGT_WHITELIST+= \ + _* all all-man build* depend everything *toolchain* includes \ + libraries obj objlink showconfig tags xdev xdev-build native-xtools \ + stage* create-packages* real-packages sign-packages package-pkg \ + tinderbox universe* kernel kernels world worlds bmake + +# Only allow AUTO_OBJ for the whitelisted targets. See AUTO_OBJ_TGT_WHITELIST +# above. MK_AUTO_OBJ not checked here for "yes" as it may not yet be enabled +# since it is opportunistic. +.if empty(.MAKEOVERRIDES:MMK_AUTO_OBJ) +.for _tgt in ${AUTO_OBJ_TGT_WHITELIST} +.if make(${_tgt}) +_CAN_USE_AUTO_OBJ?= yes +.endif +.endfor +.if !defined(_CAN_USE_AUTO_OBJ) +_MAKEARGS+= MK_AUTO_OBJ=no +MK_AUTO_OBJ= no +.endif +.endif # empty(.MAKEOVERRIDES:MMK_AUTO_OBJ) + +.endif # ${MK_DIRDEPS_BUILD} == "no" From owner-svn-src-head@freebsd.org Sat Nov 18 20:01:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 955B1DDA779; Sat, 18 Nov 2017 20:01:19 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 567037A783; Sat, 18 Nov 2017 20:01:17 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAIK1GM1002174; Sat, 18 Nov 2017 20:01:16 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAIK1FHh002172; Sat, 18 Nov 2017 20:01:15 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201711182001.vAIK1FHh002172@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 18 Nov 2017 20:01:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325974 - in head: . share/mk X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: in head: . share/mk X-SVN-Commit-Revision: 325974 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 20:01:20 -0000 Author: bdrewery Date: Sat Nov 18 20:01:15 2017 New Revision: 325974 URL: https://svnweb.freebsd.org/changeset/base/325974 Log: Fix top-level targets with read-only OBJDIR. This also makes it so that top-level build targets do not immediately create the OBJDIR. Only sub-make targets will do so. This avoids creating object directories for targets like 'make check-old' or creating unneeded MACHINE.MACHINE_ARCH directories during 'make tinderbox'. Reported by: npn, lifanov Tested by: npn, Mark Millard Sponsored by: Dell Modified: head/Makefile.sys.inc head/share/mk/src.sys.obj.mk Modified: head/Makefile.sys.inc ============================================================================== --- head/Makefile.sys.inc Sat Nov 18 20:01:12 2017 (r325973) +++ head/Makefile.sys.inc Sat Nov 18 20:01:15 2017 (r325974) @@ -33,6 +33,11 @@ _CAN_USE_AUTO_OBJ?= yes .if !defined(_CAN_USE_AUTO_OBJ) _MAKEARGS+= MK_AUTO_OBJ=no MK_AUTO_OBJ= no +# This will prevent src.sys.obj.mk from opportunistically enabling AUTO_OBJ +# in this make execution and for sub-makes. For all of these targets we +# just want to read any existing OBJDIR but we don't care if we can create +# or write to them. +.MAKEOVERRIDES+= MK_AUTO_OBJ .endif .endif # empty(.MAKEOVERRIDES:MMK_AUTO_OBJ) Modified: head/share/mk/src.sys.obj.mk ============================================================================== --- head/share/mk/src.sys.obj.mk Sat Nov 18 20:01:12 2017 (r325973) +++ head/share/mk/src.sys.obj.mk Sat Nov 18 20:01:15 2017 (r325974) @@ -19,6 +19,12 @@ # TARGET.TARGET_ARCH added in as it assumes that MAKEOBJDIRPREFIX is # nested in the existing OBJTOP with TARGET.TARGET_ARCH in it. # +# The expected OBJDIR is stored in __objdir for auto.obj.mk to use. +# +# AUTO_OBJ is opportunistically enabled if the computed .OBJDIR is writable +# by the current user. Some top-level targets disable this behavior in +# Makefile.sys.inc. +# _default_makeobjdirprefix?= /usr/obj _default_makeobjdir= $${.CURDIR:S,^$${SRCTOP},$${OBJTOP},} From owner-svn-src-head@freebsd.org Sat Nov 18 20:06:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C767EDDAAEF; Sat, 18 Nov 2017 20:06:39 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47B0A7AED6; Sat, 18 Nov 2017 20:06:38 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from thor.intern.walstatt.dynvpn.de ([78.55.200.217]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LfYqz-1ew6z72Q1Z-00p6z9; Sat, 18 Nov 2017 21:06:36 +0100 Date: Sat, 18 Nov 2017 21:06:29 +0100 From: "O. Hartmann" To: Bryan Drewery Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r325974 - in head: . share/mk Message-ID: <20171118210629.7dde2e64@thor.intern.walstatt.dynvpn.de> In-Reply-To: <201711182001.vAIK1FHh002172@repo.freebsd.org> References: <201711182001.vAIK1FHh002172@repo.freebsd.org> Organization: WALSTATT User-Agent: OutScare 3.1415926 X-Operating-System: ImNotAnOperatingSystem 3.141592527 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/UNM_SElv7nnmEuatcHn.ksR"; protocol="application/pgp-signature" X-Provags-ID: V03:K0:VpBqPIDmVszGcuIEp0R/o25UgUZTMlSHJAuzA5j6mrkOHmACGBC 0y0X7yBzOdne92xJpzLGe01MLZ2yBplTPtwzcE5hlGSdHWTfUq5xsqV6iewMx9XNJfAmRCJ JsZJQ0DyzMZnfreh0yUyheNW6c7soU7HP93jQswsjESeEFXcLalDckxgWrBXlTEnl1WTCfp zuTWVcmYzl7IMfRLI8OZg== X-UI-Out-Filterresults: notjunk:1;V01:K0:gDA3cxZaUfY=:ntjU/2j4lq1WIKZLou9kX5 YoiRxVARz/k2NDHq2+lcnPOIuB3ndCzbCQvog5mOUer1bsUexxmN/wSqhukcNjDr0fT65Qenm 5zle/du0ZW2dZ8hDC56lzCSu0qCKo/BwaHGwLizjFzpwIyxDy+8mjB2B8gBaQa+vemFsxLGzq V19Qo7P8KdkqHmd/ItrYdCjzWtPB9hEFaV9w8IgcwuAbROgO7MJ4Q0DnmSVeovh2ysPdjsq86 IVeyCZdXQjr4U17fVa23Cn48QRMvsR5A1ERgOIXLUEmgJtDQrSmBkTjhBY/Xb6MlY6Zx/n4Cq m6Xf1CixFfzKd+ROQuvv2iXHz9C1ch4Wflhpi4I4noa9D5wZa2ylX9NlYfRPtOByp/FbenK1q qXBZYHF3MYJfSzdKa5tkMD/0LVo0j+D3QeUHgoRp1lShe6XPvFfKBJXwcy55Fc2amY4hVz03n ExLKjJdsSzeMB9VmE+eoOW9uwGjNzMyNOfo5IliM6zPY5UPHlnXTumzuFlIUEooOQghR8ZGFM p4AA1exGU5AS+gkor7rna7kEFEtUuI3BOQHhlYVEju639ZtnXmywoHm1cWth+cIHAmUcMn5pr 7V1m3hEwhWIavZmleyVHdHhNH29J1SEXkjbNLjm9LU+DiDIO5u9EotD/N3v29pBDDORV1Hpw1 m+pv8S6Q2gzwQGHkCJD27LQCtcWl1RHG+ECAWI74Tn1o0M0a51vZE1iGx/ZNBELdyXIBBTy+6 FBjmOvTaLksWB4mcOHlDTeSOXE/1RILYpW+G0R2cdU3mryjqgh9tM0zEi7fAs96f6474efmv0 Ag4ruYvNyRWWq47luc4LQizRUVyVA== X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 20:06:39 -0000 --Sig_/UNM_SElv7nnmEuatcHn.ksR Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Am Sat, 18 Nov 2017 20:01:15 +0000 (UTC) Bryan Drewery schrieb: > Author: bdrewery > Date: Sat Nov 18 20:01:15 2017 > New Revision: 325974 > URL: https://svnweb.freebsd.org/changeset/base/325974 >=20 > Log: > Fix top-level targets with read-only OBJDIR. > =20 > This also makes it so that top-level build targets do not immediately c= reate > the OBJDIR. Only sub-make targets will do so. This avoids creating ob= ject > directories for targets like 'make check-old' or creating unneeded > MACHINE.MACHINE_ARCH directories during 'make tinderbox'. > =20 > Reported by: npn, lifanov > Tested by: npn, Mark Millard > Sponsored by: Dell >=20 > Modified: > head/Makefile.sys.inc > head/share/mk/src.sys.obj.mk >=20 > Modified: head/Makefile.sys.inc > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/Makefile.sys.inc Sat Nov 18 20:01:12 2017 (r325973) > +++ head/Makefile.sys.inc Sat Nov 18 20:01:15 2017 (r325974) > @@ -33,6 +33,11 @@ _CAN_USE_AUTO_OBJ?=3D yes > .if !defined(_CAN_USE_AUTO_OBJ) > _MAKEARGS+=3D MK_AUTO_OBJ=3Dno > MK_AUTO_OBJ=3D no > +# This will prevent src.sys.obj.mk from opportunistically enabling AUTO_= OBJ > +# in this make execution and for sub-makes. For all of these targets we > +# just want to read any existing OBJDIR but we don't care if we can crea= te > +# or write to them. > +.MAKEOVERRIDES+=3D MK_AUTO_OBJ > .endif > .endif # empty(.MAKEOVERRIDES:MMK_AUTO_OBJ) > =20 >=20 > Modified: head/share/mk/src.sys.obj.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/share/mk/src.sys.obj.mk Sat Nov 18 20:01:12 2017 (r325973) > +++ head/share/mk/src.sys.obj.mk Sat Nov 18 20:01:15 2017 (r325974) > @@ -19,6 +19,12 @@ > # TARGET.TARGET_ARCH added in as it assumes that MAKEOBJDIRPREFIX is > # nested in the existing OBJTOP with TARGET.TARGET_ARCH in it. > # > +# The expected OBJDIR is stored in __objdir for auto.obj.mk to use. > +# > +# AUTO_OBJ is opportunistically enabled if the computed .OBJDIR is writ= able > +# by the current user. Some top-level targets disable this behavior in > +# Makefile.sys.inc. > +# > =20 > _default_makeobjdirprefix?=3D /usr/obj > _default_makeobjdir=3D $${.CURDIR:S,^$${SRCTOP},$${OBJTOP},} > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" Seems to break buildworld: [...] Updated to revision 325974. root@walhall:/usr/src # make -j9 buildworld buildkernel make: "/usr/src/Makefile.sys.inc" line 11: Malformed conditional (${MK_DIRD= EPS_BUILD} =3D=3D "no") make: Fatal errors encountered -- cannot continue make: stopped in /usr/src .ERROR_TARGET=3D'' --=20 O. Hartmann Ich widerspreche der Nutzung oder =C3=9Cbermittlung meiner Daten f=C3=BCr Werbezwecke oder f=C3=BCr die Markt- oder Meinungsforschung (=C2=A7 28 Abs.= 4 BDSG). --Sig_/UNM_SElv7nnmEuatcHn.ksR Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCWhCSxQAKCRDS528fyFhY lH8AAf47iqoxvVf1QgYEsY6hGJlifx+Xdl2FFzCWKEpfnWrsS+pXOKWa4QU8gWZ0 cJkibokXECA3pNVqFlw5fTv3twP5Af92i6tvZv+quO3mVlnEV2UTVQmoKly8f5nm af/hqbcE+SGvIOvjoxfx6McKVfOJl+bD5EQ8u8oIDaccabHacNGo =HsiG -----END PGP SIGNATURE----- --Sig_/UNM_SElv7nnmEuatcHn.ksR-- From owner-svn-src-head@freebsd.org Sat Nov 18 20:08:00 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D3F1DDAB88; Sat, 18 Nov 2017 20:08:00 +0000 (UTC) (envelope-from bdrewery@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 3F5317B022; Sat, 18 Nov 2017 20:08:00 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 7203DA005; Sat, 18 Nov 2017 20:07:59 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 57F8F9DF6; Sat, 18 Nov 2017 20:07:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id hcYAoaP1u5ju; Sat, 18 Nov 2017 20:07:54 +0000 (UTC) Subject: Re: svn commit: r325974 - in head: . share/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 064569DF1 To: "O. Hartmann" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201711182001.vAIK1FHh002172@repo.freebsd.org> <20171118210629.7dde2e64@thor.intern.walstatt.dynvpn.de> From: Bryan Drewery Organization: FreeBSD Message-ID: <305f90ef-da9c-3181-2e14-666267b29974@FreeBSD.org> Date: Sat, 18 Nov 2017 12:07:43 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171118210629.7dde2e64@thor.intern.walstatt.dynvpn.de> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="88vbqteAHXpAtuHEt4FsHxIv1IxSrltX8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 20:08:00 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --88vbqteAHXpAtuHEt4FsHxIv1IxSrltX8 Content-Type: multipart/mixed; boundary="aHhtJDKic3uRWePaBfipIHw2uR3bslMLG"; protected-headers="v1" From: Bryan Drewery To: "O. Hartmann" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <305f90ef-da9c-3181-2e14-666267b29974@FreeBSD.org> Subject: Re: svn commit: r325974 - in head: . share/mk References: <201711182001.vAIK1FHh002172@repo.freebsd.org> <20171118210629.7dde2e64@thor.intern.walstatt.dynvpn.de> In-Reply-To: <20171118210629.7dde2e64@thor.intern.walstatt.dynvpn.de> --aHhtJDKic3uRWePaBfipIHw2uR3bslMLG Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 11/18/17 12:06 PM, O. Hartmann wrote: > Am Sat, 18 Nov 2017 20:01:15 +0000 (UTC) > Bryan Drewery schrieb: >=20 >> Author: bdrewery >> Date: Sat Nov 18 20:01:15 2017 >> New Revision: 325974 >> URL: https://svnweb.freebsd.org/changeset/base/325974 >> >> Log: >> Fix top-level targets with read-only OBJDIR. >> =20 >> This also makes it so that top-level build targets do not immediatel= y create >> the OBJDIR. Only sub-make targets will do so. This avoids creating= object >> directories for targets like 'make check-old' or creating unneeded >> MACHINE.MACHINE_ARCH directories during 'make tinderbox'. >> =20 >> Reported by: npn, lifanov >> Tested by: npn, Mark Millard >> Sponsored by: Dell >> >> Modified: >> head/Makefile.sys.inc >> head/share/mk/src.sys.obj.mk >> >> Modified: head/Makefile.sys.inc >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/Makefile.sys.inc Sat Nov 18 20:01:12 2017 (r325973) >> +++ head/Makefile.sys.inc Sat Nov 18 20:01:15 2017 (r325974) >> @@ -33,6 +33,11 @@ _CAN_USE_AUTO_OBJ?=3D yes >> .if !defined(_CAN_USE_AUTO_OBJ) >> _MAKEARGS+=3D MK_AUTO_OBJ=3Dno >> MK_AUTO_OBJ=3D no >> +# This will prevent src.sys.obj.mk from opportunistically enabling AU= TO_OBJ >> +# in this make execution and for sub-makes. For all of these targets= we >> +# just want to read any existing OBJDIR but we don't care if we can c= reate >> +# or write to them. >> +.MAKEOVERRIDES+=3D MK_AUTO_OBJ >> .endif >> .endif # empty(.MAKEOVERRIDES:MMK_AUTO_OBJ) >> =20 >> >> Modified: head/share/mk/src.sys.obj.mk >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/share/mk/src.sys.obj.mk Sat Nov 18 20:01:12 2017 (r325973) >> +++ head/share/mk/src.sys.obj.mk Sat Nov 18 20:01:15 2017 (r325974) >> @@ -19,6 +19,12 @@ >> # TARGET.TARGET_ARCH added in as it assumes that MAKEOBJDIRPREFIX is= >> # nested in the existing OBJTOP with TARGET.TARGET_ARCH in it. >> # >> +# The expected OBJDIR is stored in __objdir for auto.obj.mk to use. >> +# >> +# AUTO_OBJ is opportunistically enabled if the computed .OBJDIR is w= ritable >> +# by the current user. Some top-level targets disable this behavior= in >> +# Makefile.sys.inc. >> +# >> =20 >> _default_makeobjdirprefix?=3D /usr/obj >> _default_makeobjdir=3D $${.CURDIR:S,^$${SRCTOP},$${OBJTOP},} >> _______________________________________________ >> svn-src-head@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/svn-src-head >> To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org= " >=20 > Seems to break buildworld: >=20 > [...] >=20 > Updated to revision 325974. > root@walhall:/usr/src # make -j9 buildworld buildkernel > make: "/usr/src/Makefile.sys.inc" line 11: Malformed conditional (${MK_= DIRDEPS_BUILD} =3D=3D > "no") make: Fatal errors encountered -- cannot continue > make: stopped in /usr/src > .ERROR_TARGET=3D'' >=20 Doh, I took out the :Uno at the last minute. Fixing. --=20 Regards, Bryan Drewery --aHhtJDKic3uRWePaBfipIHw2uR3bslMLG-- --88vbqteAHXpAtuHEt4FsHxIv1IxSrltX8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEzBAEBCgAdFiEE+Rc8ssOq6npcih8JNddxu25Gl88FAloQkxEACgkQNddxu25G l89J0gf/QwXbP3yvYQwYCznHZkR2EkNBtYfJkkGubjk/syOvoO3oS4+hEBBdzJdH ggiStaFydNfI/jAQL77trp2azEP+4hf0X14WdCduWnxPvP+tun/IdIEsYgXjpJhj QdV47WNBzUjlXiW1ByUipQr88Z96CYYmYh8bpeKrrPIxKgBg1Fmu/SkDoXJQpSnS sNYUiGRQQjX2o3SZo7xmsB+otrX9mAHJ3SbHrBHVOfQW0b7Wtq+Kqd/nS2FqSHpI nizrJaFBrEPQpMhhL47LFGudVVxVPipwKQG2tMZWjPQnFsAGtF+p4IjqV/QC8Byk H6V9XxdXj2YEqIkmgNZL+5x2+wL13w== =UsCn -----END PGP SIGNATURE----- --88vbqteAHXpAtuHEt4FsHxIv1IxSrltX8-- From owner-svn-src-head@freebsd.org Sat Nov 18 20:10:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E922DDAC9B; Sat, 18 Nov 2017 20:10:37 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B5B27B200; Sat, 18 Nov 2017 20:10:37 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAIKAaw7005607; Sat, 18 Nov 2017 20:10:36 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAIKAafB005606; Sat, 18 Nov 2017 20:10:36 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201711182010.vAIKAafB005606@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 18 Nov 2017 20:10:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325975 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 325975 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 20:10:37 -0000 Author: bdrewery Date: Sat Nov 18 20:10:36 2017 New Revision: 325975 URL: https://svnweb.freebsd.org/changeset/base/325975 Log: Evaluate options after including src-env.conf and before Makefile.sys.inc. Fixes top-level breakage in r325974. Pointyhat to: bdrewery Sponsored by: Dell Modified: head/share/mk/src.sys.env.mk Modified: head/share/mk/src.sys.env.mk ============================================================================== --- head/share/mk/src.sys.env.mk Sat Nov 18 20:01:15 2017 (r325974) +++ head/share/mk/src.sys.env.mk Sat Nov 18 20:10:36 2017 (r325975) @@ -22,6 +22,8 @@ SRC_ENV_CONF?= /etc/src-env.conf _src_env_conf_included_: .NOTMAIN .endif +.include + # Top-level installs should not use meta mode as it may prevent installing # based on cookies. .if make(*install*) && ${.MAKE.LEVEL} == 0 From owner-svn-src-head@freebsd.org Sat Nov 18 20:17:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B942BDDAFAD; Sat, 18 Nov 2017 20:17:21 +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 78C9C7B690; Sat, 18 Nov 2017 20:17:21 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (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 6B5DF26014D; Sat, 18 Nov 2017 21:17:16 +0100 (CET) Subject: Re: svn commit: r325638 - in head/sys: conf dev/mlx5 dev/mlx5/mlx5_core dev/mlx5/mlx5_en modules/mlx5 To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201711100949.vAA9n8Sw008427@repo.freebsd.org> <20171118170235.GJ2272@kib.kiev.ua> From: Hans Petter Selasky Message-ID: Date: Sat, 18 Nov 2017 21:14:29 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171118170235.GJ2272@kib.kiev.ua> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 20:17:21 -0000 On 11/18/17 18:02, Konstantin Belousov wrote: > On Fri, Nov 10, 2017 at 09:49:08AM +0000, Hans Petter Selasky wrote: >> Author: hselasky >> Date: Fri Nov 10 09:49:08 2017 >> New Revision: 325638 >> URL: https://svnweb.freebsd.org/changeset/base/325638 >> >> Log: >> Refactor the flowsteering APIs used by mlx5en(4). This change is needed by >> the coming ibcore and mlx5ib updates in order to support traffic redirection >> to so-called raw ethernet QPs. >> >> Remove unused E-switch related routines and files while at it. >> > > This seems to break on all gcc platforms. I see > cc1: warnings being treated as errors > /root/deviant2/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c:2558: warning: redundant re > declaration of 'iterate_rules_in_ns' [-Wredundant-decls] > /root/deviant2/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c:2502: warning: previous dec > laration of 'iterate_rules_in_ns' was here > --- mlx5_fs_tree.o --- > *** [mlx5_fs_tree.o] Error code 1 > > > Patch below should fix this item. Are you fine with it ? > > diff --git a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c > index bf796d65b5f..d0ffa44387c 100644 > --- a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c > +++ b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c > @@ -2553,10 +2553,6 @@ static void iterate_rules_in_ft(struct mlx5_flow_table *ft, > mutex_unlock(&ft->base.lock); > } > > -static void iterate_rules_in_ns(struct mlx5_flow_namespace *ns, > - rule_event_fn add_rule_cb, > - void *context); > - > static void iterate_rules_in_prio(struct fs_prio *prio, > rule_event_fn add_rule_cb, > void *context) > > No problem. Go ahead. Don't forget to MFC. --HPS From owner-svn-src-head@freebsd.org Sat Nov 18 20:32:11 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 131F5DDB835; Sat, 18 Nov 2017 20:32:11 +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 D43CA7C201; Sat, 18 Nov 2017 20:32: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 vAIKW9q6017326; Sat, 18 Nov 2017 20:32:09 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAIKW9r1017325; Sat, 18 Nov 2017 20:32:09 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201711182032.vAIKW9r1017325@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 18 Nov 2017 20:32:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325976 - head/sys/dev/mlx5/mlx5_core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_core X-SVN-Commit-Revision: 325976 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 20:32:11 -0000 Author: hselasky Date: Sat Nov 18 20:32:09 2017 New Revision: 325976 URL: https://svnweb.freebsd.org/changeset/base/325976 Log: Remove duplicate static function prototype to fix compilation of mlx5_fs_tree.c after r325638 when using GCC. Found by: kib @ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c Modified: head/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c Sat Nov 18 20:10:36 2017 (r325975) +++ head/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c Sat Nov 18 20:32:09 2017 (r325976) @@ -2553,10 +2553,6 @@ static void iterate_rules_in_ft(struct mlx5_flow_table mutex_unlock(&ft->base.lock); } -static void iterate_rules_in_ns(struct mlx5_flow_namespace *ns, - rule_event_fn add_rule_cb, - void *context); - static void iterate_rules_in_prio(struct fs_prio *prio, rule_event_fn add_rule_cb, void *context) From owner-svn-src-head@freebsd.org Sat Nov 18 20:38:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B01FDDBAE5; Sat, 18 Nov 2017 20:38:06 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47E617C437; Sat, 18 Nov 2017 20:38:06 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAIKc5NY017619; Sat, 18 Nov 2017 20:38:05 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAIKc5rr017618; Sat, 18 Nov 2017 20:38:05 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201711182038.vAIKc5rr017618@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sat, 18 Nov 2017 20:38:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325977 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 325977 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 20:38:06 -0000 Author: manu Date: Sat Nov 18 20:38:05 2017 New Revision: 325977 URL: https://svnweb.freebsd.org/changeset/base/325977 Log: if_awg: only request completion interrupt on the last descriptor of a tx frame The hardware will not issue a completion interrupt for a descriptor with TX_INT_CTL set if it doesn't also have TX_LAST_DESC set. Submitted by: Guy Yur Differential Revision: https://reviews.freebsd.org/D13029 Modified: head/sys/arm/allwinner/if_awg.c Modified: head/sys/arm/allwinner/if_awg.c ============================================================================== --- head/sys/arm/allwinner/if_awg.c Sat Nov 18 20:32:09 2017 (r325976) +++ head/sys/arm/allwinner/if_awg.c Sat Nov 18 20:38:05 2017 (r325977) @@ -169,6 +169,7 @@ struct awg_txring { bus_dma_tag_t buf_tag; struct awg_bufmap buf_map[TX_DESC_COUNT]; u_int cur, next, queued; + u_int segs; }; struct awg_rxring { @@ -399,8 +400,6 @@ awg_setup_txdesc(struct awg_softc *sc, int index, int } else { status = TX_DESC_CTL; size = flags | len; - if ((index & (awg_tx_interval - 1)) == 0) - size |= TX_INT_CTL; ++sc->tx.queued; } @@ -449,8 +448,18 @@ awg_setup_txbuf(struct awg_softc *sc, int index, struc for (cur = index, i = 0; i < nsegs; i++) { sc->tx.buf_map[cur].mbuf = (i == 0 ? m : NULL); - if (i == nsegs - 1) + sc->tx.segs++; + if (i == nsegs - 1) { flags |= TX_LAST_DESC; + /* + * Can only request TX completion + * interrupt on last descriptor. + */ + if (sc->tx.segs >= awg_tx_interval) { + sc->tx.segs = 0; + flags |= TX_INT_CTL; + } + } awg_setup_txdesc(sc, cur, flags, segs[i].ds_addr, segs[i].ds_len); flags &= ~TX_FIR_DESC; From owner-svn-src-head@freebsd.org Sat Nov 18 20:42:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8E88DDBD48; Sat, 18 Nov 2017 20:42:49 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2C527C82B; Sat, 18 Nov 2017 20:42:49 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAIKgmKw021576; Sat, 18 Nov 2017 20:42:48 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAIKgmhS021575; Sat, 18 Nov 2017 20:42:48 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201711182042.vAIKgmhS021575@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sat, 18 Nov 2017 20:42:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325978 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 325978 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 20:42:49 -0000 Author: manu Date: Sat Nov 18 20:42:48 2017 New Revision: 325978 URL: https://svnweb.freebsd.org/changeset/base/325978 Log: if_awg: mark the first tx descriptor as ready only after all the other tx descriptors are set up In a multi segment frame, if the first tx descriptor is marked with TX_DESC_CTL but not all tx descriptors for the other segments in the frame are set up, the TX DMA may transmit an incomplete frame. To prevent this, set TX_DESC_CTL for the first tx descriptor only when done with all the other segments. Also, don't bother cleaning transmitted tx descriptors since TX_DESC_CTL is cleared for them by the hardware and they will be reprogrammed before TX_DESC_CTL is reenabled for them. Submitted by: Guy Yur Differential Revision: https://reviews.freebsd.org/D13030 Modified: head/sys/arm/allwinner/if_awg.c Modified: head/sys/arm/allwinner/if_awg.c ============================================================================== --- head/sys/arm/allwinner/if_awg.c Sat Nov 18 20:38:05 2017 (r325977) +++ head/sys/arm/allwinner/if_awg.c Sat Nov 18 20:42:48 2017 (r325978) @@ -387,35 +387,17 @@ awg_media_change(if_t ifp) return (error); } -static void -awg_setup_txdesc(struct awg_softc *sc, int index, int flags, bus_addr_t paddr, - u_int len) -{ - uint32_t status, size; - - if (paddr == 0 || len == 0) { - status = 0; - size = 0; - --sc->tx.queued; - } else { - status = TX_DESC_CTL; - size = flags | len; - ++sc->tx.queued; - } - - sc->tx.desc_ring[index].addr = htole32((uint32_t)paddr); - sc->tx.desc_ring[index].size = htole32(size); - sc->tx.desc_ring[index].status = htole32(status); -} - static int awg_setup_txbuf(struct awg_softc *sc, int index, struct mbuf **mp) { bus_dma_segment_t segs[TX_MAX_SEGS]; - int error, nsegs, cur, i, flags; + int error, nsegs, cur, first, i; u_int csum_flags; + uint32_t flags, status; struct mbuf *m; + cur = first = index; + m = *mp; error = bus_dmamap_load_mbuf_sg(sc->tx.buf_tag, sc->tx.buf_map[index].map, m, segs, &nsegs, BUS_DMA_NOWAIT); @@ -438,6 +420,7 @@ awg_setup_txbuf(struct awg_softc *sc, int index, struc BUS_DMASYNC_PREWRITE); flags = TX_FIR_DESC; + status = 0; if ((m->m_pkthdr.csum_flags & CSUM_IP) != 0) { if ((m->m_pkthdr.csum_flags & (CSUM_TCP|CSUM_UDP)) != 0) csum_flags = TX_CHECKSUM_CTL_FULL; @@ -446,8 +429,7 @@ awg_setup_txbuf(struct awg_softc *sc, int index, struc flags |= (csum_flags << TX_CHECKSUM_CTL_SHIFT); } - for (cur = index, i = 0; i < nsegs; i++) { - sc->tx.buf_map[cur].mbuf = (i == 0 ? m : NULL); + for (i = 0; i < nsegs; i++) { sc->tx.segs++; if (i == nsegs - 1) { flags |= TX_LAST_DESC; @@ -460,16 +442,51 @@ awg_setup_txbuf(struct awg_softc *sc, int index, struc flags |= TX_INT_CTL; } } - awg_setup_txdesc(sc, cur, flags, segs[i].ds_addr, - segs[i].ds_len); + + sc->tx.desc_ring[cur].addr = htole32((uint32_t)segs[i].ds_addr); + sc->tx.desc_ring[cur].size = htole32(flags | segs[i].ds_len); + sc->tx.desc_ring[cur].status = htole32(status); + flags &= ~TX_FIR_DESC; + /* + * Setting of the valid bit in the first descriptor is + * deferred until the whole chain is fully set up. + */ + status = TX_DESC_CTL; + + ++sc->tx.queued; cur = TX_NEXT(cur); } + sc->tx.buf_map[first].mbuf = m; + + /* + * The whole mbuf chain has been DMA mapped, + * fix the first descriptor. + */ + sc->tx.desc_ring[first].status = htole32(TX_DESC_CTL); + return (nsegs); } static void +awg_clean_txbuf(struct awg_softc *sc, int index) +{ + struct awg_bufmap *bmap; + + --sc->tx.queued; + + bmap = &sc->tx.buf_map[index]; + if (bmap->mbuf != NULL) { + bus_dmamap_sync(sc->tx.buf_tag, bmap->map, + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(sc->tx.buf_tag, bmap->map); + m_freem(bmap->mbuf); + bmap->mbuf = NULL; + } +} + +static void awg_setup_rxdesc(struct awg_softc *sc, int index, bus_addr_t paddr) { uint32_t status, size; @@ -891,7 +908,6 @@ awg_rxintr(struct awg_softc *sc) static void awg_txintr(struct awg_softc *sc) { - struct awg_bufmap *bmap; struct emac_desc *desc; uint32_t status; if_t ifp; @@ -908,23 +924,12 @@ awg_txintr(struct awg_softc *sc) status = le32toh(desc->status); if ((status & TX_DESC_CTL) != 0) break; - bmap = &sc->tx.buf_map[i]; - if (bmap->mbuf != NULL) { - bus_dmamap_sync(sc->tx.buf_tag, bmap->map, - BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(sc->tx.buf_tag, bmap->map); - m_freem(bmap->mbuf); - bmap->mbuf = NULL; - } - awg_setup_txdesc(sc, i, 0, 0, 0); + awg_clean_txbuf(sc, i); if_setdrvflagbits(ifp, 0, IFF_DRV_OACTIVE); if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); } sc->tx.next = i; - - bus_dmamap_sync(sc->tx.desc_tag, sc->tx.desc_map, - BUS_DMASYNC_PREWRITE); } static void @@ -1519,7 +1524,7 @@ awg_setup_dma(device_t dev) return (error); } - sc->tx.queued = TX_DESC_COUNT; + sc->tx.queued = 0; for (i = 0; i < TX_DESC_COUNT; i++) { error = bus_dmamap_create(sc->tx.buf_tag, 0, &sc->tx.buf_map[i].map); @@ -1527,7 +1532,6 @@ awg_setup_dma(device_t dev) device_printf(dev, "cannot create TX buffer map\n"); return (error); } - awg_setup_txdesc(sc, i, 0, 0, 0); } /* Setup RX ring */ From owner-svn-src-head@freebsd.org Sat Nov 18 20:46:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BFA51DDBEB8; Sat, 18 Nov 2017 20:46:32 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99E2F7CA4F; Sat, 18 Nov 2017 20:46:32 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAIKkVmb021812; Sat, 18 Nov 2017 20:46:31 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAIKkVDK021811; Sat, 18 Nov 2017 20:46:31 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201711182046.vAIKkVDK021811@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sat, 18 Nov 2017 20:46:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325979 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 325979 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 20:46:32 -0000 Author: manu Date: Sat Nov 18 20:46:31 2017 New Revision: 325979 URL: https://svnweb.freebsd.org/changeset/base/325979 Log: if_awg: store mbuf and dma mapping in the last segment of a tx frame instead of the first According to the datasheet, TX_DESC_CTL is cleared when whole frame is transmitted or all data in the current descriptor's buffer are transmitted. When the mbuf and mapping are stored in the first segment and in a scenario where a tx completion interrupt arrives for a frame and only the start of the next frame was transmitted, at the time of interrupt processing the mbuf and mapping will be freed when processing the first segment of the next frame but the other untrasmitted segments still need to use them. Submitted by: Guy Yur Differential Revision: https://reviews.freebsd.org/D13031 Modified: head/sys/arm/allwinner/if_awg.c Modified: head/sys/arm/allwinner/if_awg.c ============================================================================== --- head/sys/arm/allwinner/if_awg.c Sat Nov 18 20:42:48 2017 (r325978) +++ head/sys/arm/allwinner/if_awg.c Sat Nov 18 20:46:31 2017 (r325979) @@ -390,17 +390,19 @@ awg_media_change(if_t ifp) static int awg_setup_txbuf(struct awg_softc *sc, int index, struct mbuf **mp) { + bus_dmamap_t map; bus_dma_segment_t segs[TX_MAX_SEGS]; - int error, nsegs, cur, first, i; + int error, nsegs, cur, first, last, i; u_int csum_flags; uint32_t flags, status; struct mbuf *m; cur = first = index; + map = sc->tx.buf_map[first].map; m = *mp; - error = bus_dmamap_load_mbuf_sg(sc->tx.buf_tag, - sc->tx.buf_map[index].map, m, segs, &nsegs, BUS_DMA_NOWAIT); + error = bus_dmamap_load_mbuf_sg(sc->tx.buf_tag, map, m, segs, + &nsegs, BUS_DMA_NOWAIT); if (error == EFBIG) { m = m_collapse(m, M_NOWAIT, TX_MAX_SEGS); if (m == NULL) { @@ -408,16 +410,15 @@ awg_setup_txbuf(struct awg_softc *sc, int index, struc return (0); } *mp = m; - error = bus_dmamap_load_mbuf_sg(sc->tx.buf_tag, - sc->tx.buf_map[index].map, m, segs, &nsegs, BUS_DMA_NOWAIT); + error = bus_dmamap_load_mbuf_sg(sc->tx.buf_tag, map, m, + segs, &nsegs, BUS_DMA_NOWAIT); } if (error != 0) { device_printf(sc->dev, "awg_setup_txbuf: bus_dmamap_load_mbuf_sg failed\n"); return (0); } - bus_dmamap_sync(sc->tx.buf_tag, sc->tx.buf_map[index].map, - BUS_DMASYNC_PREWRITE); + bus_dmamap_sync(sc->tx.buf_tag, map, BUS_DMASYNC_PREWRITE); flags = TX_FIR_DESC; status = 0; @@ -458,7 +459,11 @@ awg_setup_txbuf(struct awg_softc *sc, int index, struc cur = TX_NEXT(cur); } - sc->tx.buf_map[first].mbuf = m; + /* Store mapping and mbuf in the last segment */ + last = TX_SKIP(cur, TX_DESC_COUNT - 1); + sc->tx.buf_map[first].map = sc->tx.buf_map[last].map; + sc->tx.buf_map[last].map = map; + sc->tx.buf_map[last].mbuf = m; /* * The whole mbuf chain has been DMA mapped, From owner-svn-src-head@freebsd.org Sat Nov 18 20:50:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25C5FDDBFED; Sat, 18 Nov 2017 20:50:33 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E6EC87CC36; Sat, 18 Nov 2017 20:50:32 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAIKoVC6022073; Sat, 18 Nov 2017 20:50:31 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAIKoVme022072; Sat, 18 Nov 2017 20:50:31 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201711182050.vAIKoVme022072@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sat, 18 Nov 2017 20:50:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325980 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 325980 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 20:50:33 -0000 Author: manu Date: Sat Nov 18 20:50:31 2017 New Revision: 325980 URL: https://svnweb.freebsd.org/changeset/base/325980 Log: if_awg: only increment IFCOUNTER_OPACKETS when the last segment of a frame has been successfully transmitted A packet may be built from multiple segments, don't increase the count for each segment Submitted by: Guy Yur Differential Revision: https://reviews.freebsd.org/D13032 Modified: head/sys/arm/allwinner/if_awg.c Modified: head/sys/arm/allwinner/if_awg.c ============================================================================== --- head/sys/arm/allwinner/if_awg.c Sat Nov 18 20:46:31 2017 (r325979) +++ head/sys/arm/allwinner/if_awg.c Sat Nov 18 20:50:31 2017 (r325980) @@ -914,7 +914,7 @@ static void awg_txintr(struct awg_softc *sc) { struct emac_desc *desc; - uint32_t status; + uint32_t status, size; if_t ifp; int i; @@ -929,9 +929,15 @@ awg_txintr(struct awg_softc *sc) status = le32toh(desc->status); if ((status & TX_DESC_CTL) != 0) break; + size = le32toh(desc->size); + if (size & TX_LAST_DESC) { + if ((status & (TX_HEADER_ERR | TX_PAYLOAD_ERR)) != 0) + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + else + if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); + } awg_clean_txbuf(sc, i); if_setdrvflagbits(ifp, 0, IFF_DRV_OACTIVE); - if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); } sc->tx.next = i; From owner-svn-src-head@freebsd.org Sat Nov 18 20:55:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0AAA3DDC1E5; Sat, 18 Nov 2017 20:55:39 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0BF17D02B; Sat, 18 Nov 2017 20:55:38 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAIKtbHN026263; Sat, 18 Nov 2017 20:55:37 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAIKtb8i026262; Sat, 18 Nov 2017 20:55:37 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201711182055.vAIKtb8i026262@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sat, 18 Nov 2017 20:55:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325981 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 325981 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 20:55:39 -0000 Author: manu Date: Sat Nov 18 20:55:37 2017 New Revision: 325981 URL: https://svnweb.freebsd.org/changeset/base/325981 Log: if_awg: replace multiple calls to if_setdrvflagbits with one call in awg_txintr Small optimization Submitted by: Guy Yur Differential Revision: https://reviews.freebsd.org/D13033 Modified: head/sys/arm/allwinner/if_awg.c Modified: head/sys/arm/allwinner/if_awg.c ============================================================================== --- head/sys/arm/allwinner/if_awg.c Sat Nov 18 20:50:31 2017 (r325980) +++ head/sys/arm/allwinner/if_awg.c Sat Nov 18 20:55:37 2017 (r325981) @@ -916,7 +916,7 @@ awg_txintr(struct awg_softc *sc) struct emac_desc *desc; uint32_t status, size; if_t ifp; - int i; + int i, prog; AWG_ASSERT_LOCKED(sc); @@ -924,6 +924,8 @@ awg_txintr(struct awg_softc *sc) BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); ifp = sc->ifp; + + prog = 0; for (i = sc->tx.next; sc->tx.queued > 0; i = TX_NEXT(i)) { desc = &sc->tx.desc_ring[i]; status = le32toh(desc->status); @@ -936,11 +938,14 @@ awg_txintr(struct awg_softc *sc) else if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); } + prog++; awg_clean_txbuf(sc, i); - if_setdrvflagbits(ifp, 0, IFF_DRV_OACTIVE); } - sc->tx.next = i; + if (prog > 0) { + sc->tx.next = i; + if_setdrvflagbits(ifp, 0, IFF_DRV_OACTIVE); + } } static void From owner-svn-src-head@freebsd.org Sat Nov 18 20:59:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C51BDDC32C; Sat, 18 Nov 2017 20:59:22 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED4477D3A4; Sat, 18 Nov 2017 20:59:21 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAIKxLm8026900; Sat, 18 Nov 2017 20:59:21 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAIKxLOe026899; Sat, 18 Nov 2017 20:59:21 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201711182059.vAIKxLOe026899@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sat, 18 Nov 2017 20:59:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325982 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 325982 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 20:59:22 -0000 Author: manu Date: Sat Nov 18 20:59:20 2017 New Revision: 325982 URL: https://svnweb.freebsd.org/changeset/base/325982 Log: if_awg: don't process transmitted packets on TX_BUF_UA_INT, only on TX_INT TX_BUF_UA_INT is set when there are no buffers to transmit and can happen before hw.awg.tx_interval segments have been transmitted. To reduce load, tx cleanup should be done in hw.awg.tx_interval intervals. Submitted by: Guy Yur Differential Revision: https://reviews.freebsd.org/D13034 Modified: head/sys/arm/allwinner/if_awg.c Modified: head/sys/arm/allwinner/if_awg.c ============================================================================== --- head/sys/arm/allwinner/if_awg.c Sat Nov 18 20:55:37 2017 (r325981) +++ head/sys/arm/allwinner/if_awg.c Sat Nov 18 20:59:20 2017 (r325982) @@ -963,8 +963,10 @@ awg_intr(void *arg) if (val & RX_INT) awg_rxintr(sc); - if (val & (TX_INT|TX_BUF_UA_INT)) { + if (val & TX_INT) awg_txintr(sc); + + if (val & (TX_INT | TX_BUF_UA_INT)) { if (!if_sendq_empty(sc->ifp)) awg_start_locked(sc); } From owner-svn-src-head@freebsd.org Sat Nov 18 21:04:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A64D6DDC5F7; Sat, 18 Nov 2017 21:04:40 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7FF7A7D803; Sat, 18 Nov 2017 21:04:40 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAIL4dTc031103; Sat, 18 Nov 2017 21:04:39 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAIL4dc2031102; Sat, 18 Nov 2017 21:04:39 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201711182104.vAIL4dc2031102@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sat, 18 Nov 2017 21:04:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325983 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 325983 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 21:04:40 -0000 Author: manu Date: Sat Nov 18 21:04:39 2017 New Revision: 325983 URL: https://svnweb.freebsd.org/changeset/base/325983 Log: if_awg: rename tx functions to match other drivers and free mbuf on m_collapse failure - use awg_encap and awg_txeof names to match iflib and other network drivers. - handle m_collapse failure similarly by freeing the mbuf rather than reenqueuing it where it will continue to fail. Submitted by: Guy Yur Differential Revision: https://reviews.freebsd.org/D13035 Modified: head/sys/arm/allwinner/if_awg.c Modified: head/sys/arm/allwinner/if_awg.c ============================================================================== --- head/sys/arm/allwinner/if_awg.c Sat Nov 18 20:59:20 2017 (r325982) +++ head/sys/arm/allwinner/if_awg.c Sat Nov 18 21:04:39 2017 (r325983) @@ -388,7 +388,7 @@ awg_media_change(if_t ifp) } static int -awg_setup_txbuf(struct awg_softc *sc, int index, struct mbuf **mp) +awg_encap(struct awg_softc *sc, struct mbuf **mp) { bus_dmamap_t map; bus_dma_segment_t segs[TX_MAX_SEGS]; @@ -397,7 +397,7 @@ awg_setup_txbuf(struct awg_softc *sc, int index, struc uint32_t flags, status; struct mbuf *m; - cur = first = index; + cur = first = sc->tx.cur; map = sc->tx.buf_map[first].map; m = *mp; @@ -406,18 +406,34 @@ awg_setup_txbuf(struct awg_softc *sc, int index, struc if (error == EFBIG) { m = m_collapse(m, M_NOWAIT, TX_MAX_SEGS); if (m == NULL) { - device_printf(sc->dev, "awg_setup_txbuf: m_collapse failed\n"); - return (0); + device_printf(sc->dev, "awg_encap: m_collapse failed\n"); + m_freem(*mp); + *mp = NULL; + return (ENOMEM); } *mp = m; error = bus_dmamap_load_mbuf_sg(sc->tx.buf_tag, map, m, segs, &nsegs, BUS_DMA_NOWAIT); + if (error != 0) { + m_freem(*mp); + *mp = NULL; + } } if (error != 0) { - device_printf(sc->dev, "awg_setup_txbuf: bus_dmamap_load_mbuf_sg failed\n"); - return (0); + device_printf(sc->dev, "awg_encap: bus_dmamap_load_mbuf_sg failed\n"); + return (error); } + if (nsegs == 0) { + m_freem(*mp); + *mp = NULL; + return (EIO); + } + if (sc->tx.queued + nsegs > TX_DESC_COUNT) { + bus_dmamap_unload(sc->tx.buf_tag, map); + return (ENOBUFS); + } + bus_dmamap_sync(sc->tx.buf_tag, map, BUS_DMASYNC_PREWRITE); flags = TX_FIR_DESC; @@ -459,6 +475,8 @@ awg_setup_txbuf(struct awg_softc *sc, int index, struc cur = TX_NEXT(cur); } + sc->tx.cur = cur; + /* Store mapping and mbuf in the last segment */ last = TX_SKIP(cur, TX_DESC_COUNT - 1); sc->tx.buf_map[first].map = sc->tx.buf_map[last].map; @@ -471,7 +489,7 @@ awg_setup_txbuf(struct awg_softc *sc, int index, struc */ sc->tx.desc_ring[first].status = htole32(TX_DESC_CTL); - return (nsegs); + return (0); } static void @@ -546,7 +564,7 @@ awg_start_locked(struct awg_softc *sc) struct mbuf *m; uint32_t val; if_t ifp; - int cnt, nsegs; + int cnt, err; AWG_ASSERT_LOCKED(sc); @@ -560,22 +578,19 @@ awg_start_locked(struct awg_softc *sc) return; for (cnt = 0; ; cnt++) { - if (sc->tx.queued >= TX_DESC_COUNT - TX_MAX_SEGS) { - if_setdrvflagbits(ifp, IFF_DRV_OACTIVE, 0); - break; - } - m = if_dequeue(ifp); if (m == NULL) break; - nsegs = awg_setup_txbuf(sc, sc->tx.cur, &m); - if (nsegs == 0) { - if_sendq_prepend(ifp, m); + err = awg_encap(sc, &m); + if (err != 0) { + if (err == ENOBUFS) + if_setdrvflagbits(ifp, IFF_DRV_OACTIVE, 0); + if (m != NULL) + if_sendq_prepend(ifp, m); break; } if_bpfmtap(ifp, m); - sc->tx.cur = TX_SKIP(sc->tx.cur, nsegs); } if (cnt != 0) { @@ -911,7 +926,7 @@ awg_rxintr(struct awg_softc *sc) } static void -awg_txintr(struct awg_softc *sc) +awg_txeof(struct awg_softc *sc) { struct emac_desc *desc; uint32_t status, size; @@ -964,7 +979,7 @@ awg_intr(void *arg) awg_rxintr(sc); if (val & TX_INT) - awg_txintr(sc); + awg_txeof(sc); if (val & (TX_INT | TX_BUF_UA_INT)) { if (!if_sendq_empty(sc->ifp)) @@ -993,7 +1008,7 @@ awg_poll(if_t ifp, enum poll_cmd cmd, int count) } rx_npkts = awg_rxintr(sc); - awg_txintr(sc); + awg_txeof(sc); if (!if_sendq_empty(ifp)) awg_start_locked(sc); From owner-svn-src-head@freebsd.org Sat Nov 18 21:08:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59885DDC6AD; Sat, 18 Nov 2017 21:08:19 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33D3E7D988; Sat, 18 Nov 2017 21:08:19 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAIL8IJB031302; Sat, 18 Nov 2017 21:08:18 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAIL8IbM031301; Sat, 18 Nov 2017 21:08:18 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201711182108.vAIL8IbM031301@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sat, 18 Nov 2017 21:08:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325984 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 325984 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 21:08:19 -0000 Author: manu Date: Sat Nov 18 21:08:18 2017 New Revision: 325984 URL: https://svnweb.freebsd.org/changeset/base/325984 Log: if_awg: avoid hole in the rx ring buffer when mbuf allocation fails Use a spare dma map when attempting to map a new mbuf on the rx path. If the mbuf allocation fails or the dma map loading for the new mbuf fails just reuse the old mbuf and increase the drop counter. Submitted by: Guy Yur Differential Revision: https://reviews.freebsd.org/D12538 Modified: head/sys/arm/allwinner/if_awg.c Modified: head/sys/arm/allwinner/if_awg.c ============================================================================== --- head/sys/arm/allwinner/if_awg.c Sat Nov 18 21:04:39 2017 (r325983) +++ head/sys/arm/allwinner/if_awg.c Sat Nov 18 21:08:18 2017 (r325984) @@ -179,6 +179,7 @@ struct awg_rxring { bus_addr_t desc_ring_paddr; bus_dma_tag_t buf_tag; struct awg_bufmap buf_map[RX_DESC_COUNT]; + bus_dmamap_t buf_spare_map; u_int cur; }; @@ -519,24 +520,45 @@ awg_setup_rxdesc(struct awg_softc *sc, int index, bus_ sc->rx.desc_ring[index].addr = htole32((uint32_t)paddr); sc->rx.desc_ring[index].size = htole32(size); - sc->rx.desc_ring[index].next = - htole32(sc->rx.desc_ring_paddr + DESC_OFF(RX_NEXT(index))); sc->rx.desc_ring[index].status = htole32(status); } +static void +awg_reuse_rxdesc(struct awg_softc *sc, int index) +{ + + sc->rx.desc_ring[index].status = htole32(RX_DESC_CTL); +} + static int -awg_setup_rxbuf(struct awg_softc *sc, int index, struct mbuf *m) +awg_newbuf_rx(struct awg_softc *sc, int index) { + struct mbuf *m; bus_dma_segment_t seg; - int error, nsegs; + bus_dmamap_t map; + int nsegs; + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); + if (m == NULL) + return (ENOBUFS); + + m->m_pkthdr.len = m->m_len = m->m_ext.ext_size; m_adj(m, ETHER_ALIGN); - error = bus_dmamap_load_mbuf_sg(sc->rx.buf_tag, - sc->rx.buf_map[index].map, m, &seg, &nsegs, 0); - if (error != 0) - return (error); + if (bus_dmamap_load_mbuf_sg(sc->rx.buf_tag, sc->rx.buf_spare_map, + m, &seg, &nsegs, BUS_DMA_NOWAIT) != 0) { + m_freem(m); + return (ENOBUFS); + } + if (sc->rx.buf_map[index].mbuf != NULL) { + bus_dmamap_sync(sc->rx.buf_tag, sc->rx.buf_map[index].map, + BUS_DMASYNC_POSTREAD); + bus_dmamap_unload(sc->rx.buf_tag, sc->rx.buf_map[index].map); + } + map = sc->rx.buf_map[index].map; + sc->rx.buf_map[index].map = sc->rx.buf_spare_map; + sc->rx.buf_spare_map = map; bus_dmamap_sync(sc->rx.buf_tag, sc->rx.buf_map[index].map, BUS_DMASYNC_PREREAD); @@ -546,18 +568,6 @@ awg_setup_rxbuf(struct awg_softc *sc, int index, struc return (0); } -static struct mbuf * -awg_alloc_mbufcl(struct awg_softc *sc) -{ - struct mbuf *m; - - m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); - if (m != NULL) - m->m_pkthdr.len = m->m_len = m->m_ext.ext_size; - - return (m); -} - static void awg_start_locked(struct awg_softc *sc) { @@ -840,7 +850,7 @@ static int awg_rxintr(struct awg_softc *sc) { if_t ifp; - struct mbuf *m, *m0, *mh, *mt; + struct mbuf *m, *mh, *mt; int error, index, len, cnt, npkt; uint32_t status; @@ -857,61 +867,62 @@ awg_rxintr(struct awg_softc *sc) if ((status & RX_DESC_CTL) != 0) break; - bus_dmamap_sync(sc->rx.buf_tag, sc->rx.buf_map[index].map, - BUS_DMASYNC_POSTREAD); - bus_dmamap_unload(sc->rx.buf_tag, sc->rx.buf_map[index].map); - len = (status & RX_FRM_LEN) >> RX_FRM_LEN_SHIFT; - if (len != 0) { - m = sc->rx.buf_map[index].mbuf; - m->m_pkthdr.rcvif = ifp; - m->m_pkthdr.len = len; - m->m_len = len; - if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); - if ((if_getcapenable(ifp) & IFCAP_RXCSUM) != 0 && - (status & RX_FRM_TYPE) != 0) { - m->m_pkthdr.csum_flags = CSUM_IP_CHECKED; - if ((status & RX_HEADER_ERR) == 0) - m->m_pkthdr.csum_flags |= CSUM_IP_VALID; - if ((status & RX_PAYLOAD_ERR) == 0) { - m->m_pkthdr.csum_flags |= - CSUM_DATA_VALID | CSUM_PSEUDO_HDR; - m->m_pkthdr.csum_data = 0xffff; - } - } + if (len == 0) { + if ((status & (RX_NO_ENOUGH_BUF_ERR | RX_OVERFLOW_ERR)) != 0) + if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); + awg_reuse_rxdesc(sc, index); + continue; + } - m->m_nextpkt = NULL; - if (mh == NULL) - mh = m; - else - mt->m_nextpkt = m; - mt = m; - ++cnt; - ++npkt; + m = sc->rx.buf_map[index].mbuf; - if (cnt == awg_rx_batch) { - AWG_UNLOCK(sc); - if_input(ifp, mh); - AWG_LOCK(sc); - mh = mt = NULL; - cnt = 0; - } - + error = awg_newbuf_rx(sc, index); + if (error != 0) { + if_inc_counter(ifp, IFCOUNTER_IQDROPS, 1); + awg_reuse_rxdesc(sc, index); + continue; } - if ((m0 = awg_alloc_mbufcl(sc)) != NULL) { - error = awg_setup_rxbuf(sc, index, m0); - if (error != 0) { - /* XXX hole in RX ring */ + m->m_pkthdr.rcvif = ifp; + m->m_pkthdr.len = len; + m->m_len = len; + if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); + + if ((if_getcapenable(ifp) & IFCAP_RXCSUM) != 0 && + (status & RX_FRM_TYPE) != 0) { + m->m_pkthdr.csum_flags = CSUM_IP_CHECKED; + if ((status & RX_HEADER_ERR) == 0) + m->m_pkthdr.csum_flags |= CSUM_IP_VALID; + if ((status & RX_PAYLOAD_ERR) == 0) { + m->m_pkthdr.csum_flags |= + CSUM_DATA_VALID | CSUM_PSEUDO_HDR; + m->m_pkthdr.csum_data = 0xffff; } - } else - if_inc_counter(ifp, IFCOUNTER_IQDROPS, 1); + } + + m->m_nextpkt = NULL; + if (mh == NULL) + mh = m; + else + mt->m_nextpkt = m; + mt = m; + ++cnt; + ++npkt; + + if (cnt == awg_rx_batch) { + AWG_UNLOCK(sc); + if_input(ifp, mh); + AWG_LOCK(sc); + mh = mt = NULL; + cnt = 0; + } } if (index != sc->rx.cur) { bus_dmamap_sync(sc->rx.desc_tag, sc->rx.desc_map, - BUS_DMASYNC_PREWRITE); + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); } if (mh != NULL) { @@ -1500,7 +1511,6 @@ static int awg_setup_dma(device_t dev) { struct awg_softc *sc; - struct mbuf *m; int error, i; sc = device_get_softc(dev); @@ -1615,18 +1625,25 @@ awg_setup_dma(device_t dev) return (error); } + error = bus_dmamap_create(sc->rx.buf_tag, 0, &sc->rx.buf_spare_map); + if (error != 0) { + device_printf(dev, + "cannot create RX buffer spare map\n"); + return (error); + } + for (i = 0; i < RX_DESC_COUNT; i++) { + sc->rx.desc_ring[i].next = + htole32(sc->rx.desc_ring_paddr + DESC_OFF(RX_NEXT(i))); + error = bus_dmamap_create(sc->rx.buf_tag, 0, &sc->rx.buf_map[i].map); if (error != 0) { device_printf(dev, "cannot create RX buffer map\n"); return (error); } - if ((m = awg_alloc_mbufcl(sc)) == NULL) { - device_printf(dev, "cannot allocate RX mbuf\n"); - return (ENOMEM); - } - error = awg_setup_rxbuf(sc, i, m); + sc->rx.buf_map[i].mbuf = NULL; + error = awg_newbuf_rx(sc, i); if (error != 0) { device_printf(dev, "cannot create RX buffer\n"); return (error); From owner-svn-src-head@freebsd.org Sat Nov 18 21:12:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0811DDC78F; Sat, 18 Nov 2017 21:12:07 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6AABB7DD27; Sat, 18 Nov 2017 21:12:07 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAILC6g2035147; Sat, 18 Nov 2017 21:12:06 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAILC6C8035146; Sat, 18 Nov 2017 21:12:06 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201711182112.vAILC6C8035146@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sat, 18 Nov 2017 21:12:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325985 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 325985 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 21:12:07 -0000 Author: manu Date: Sat Nov 18 21:12:06 2017 New Revision: 325985 URL: https://svnweb.freebsd.org/changeset/base/325985 Log: if_awg: drain tx buffers and clear rx buffers when stopping Stale packets should not be transmitted when the interface comes up after being down. Count the successfully transmitted ones for statistics and drop the rest. Submitted by: Guy Yur Differential Revision: https://reviews.freebsd.org/D12539 Modified: head/sys/arm/allwinner/if_awg.c Modified: head/sys/arm/allwinner/if_awg.c ============================================================================== --- head/sys/arm/allwinner/if_awg.c Sat Nov 18 21:08:18 2017 (r325984) +++ head/sys/arm/allwinner/if_awg.c Sat Nov 18 21:12:06 2017 (r325985) @@ -215,6 +215,8 @@ static struct resource_spec awg_spec[] = { { -1, 0 } }; +static void awg_txeof(struct awg_softc *sc); + static int awg_miibus_readreg(device_t dev, int phy, int reg) { @@ -809,6 +811,7 @@ awg_stop(struct awg_softc *sc) { if_t ifp; uint32_t val; + int i; AWG_ASSERT_LOCKED(sc); @@ -842,6 +845,39 @@ awg_stop(struct awg_softc *sc) WR4(sc, EMAC_RX_CTL_1, val & ~RX_DMA_EN); sc->link = 0; + + /* Finish handling transmitted buffers */ + awg_txeof(sc); + + /* Release any untransmitted buffers. */ + for (i = sc->tx.next; sc->tx.queued > 0; i = TX_NEXT(i)) { + val = le32toh(sc->tx.desc_ring[i].status); + if ((val & TX_DESC_CTL) != 0) + break; + awg_clean_txbuf(sc, i); + } + sc->tx.next = i; + for (; sc->tx.queued > 0; i = TX_NEXT(i)) { + sc->tx.desc_ring[i].status = 0; + awg_clean_txbuf(sc, i); + } + sc->tx.cur = sc->tx.next; + bus_dmamap_sync(sc->tx.desc_tag, sc->tx.desc_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); + + /* Setup RX buffers for reuse */ + bus_dmamap_sync(sc->rx.desc_tag, sc->rx.desc_map, + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); + + for (i = sc->rx.cur; ; i = RX_NEXT(i)) { + val = le32toh(sc->rx.desc_ring[i].status); + if ((val & RX_DESC_CTL) != 0) + break; + awg_reuse_rxdesc(sc, i); + } + sc->rx.cur = i; + bus_dmamap_sync(sc->rx.desc_tag, sc->rx.desc_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); if_setdrvflagbits(ifp, 0, IFF_DRV_RUNNING | IFF_DRV_OACTIVE); } From owner-svn-src-head@freebsd.org Sat Nov 18 21:27:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0842CDDCC7E; Sat, 18 Nov 2017 21:27:35 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C39A57E367; Sat, 18 Nov 2017 21:27:34 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAILRXqc039705; Sat, 18 Nov 2017 21:27:33 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAILRXRg039704; Sat, 18 Nov 2017 21:27:33 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201711182127.vAILRXRg039704@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 18 Nov 2017 21:27:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325986 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 325986 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 21:27:35 -0000 Author: bdrewery Date: Sat Nov 18 21:27:33 2017 New Revision: 325986 URL: https://svnweb.freebsd.org/changeset/base/325986 Log: Remove unneeded special case for .OBJDIR=.CURDIR. The else statement is already handling this by ensuring a safe .OBJDIR is used. Sponsored by: Dell Modified: head/share/mk/src.sys.obj.mk Modified: head/share/mk/src.sys.obj.mk ============================================================================== --- head/share/mk/src.sys.obj.mk Sat Nov 18 21:12:06 2017 (r325985) +++ head/share/mk/src.sys.obj.mk Sat Nov 18 21:27:33 2017 (r325986) @@ -192,13 +192,6 @@ MK_AUTO_OBJ:= ${__objdir_writable} # The expected OBJDIR already exists, set it as .OBJDIR. .if !empty(__objdir) && exists(${__objdir}) .OBJDIR: ${__objdir} -# Special case to work around bmake bug. If the top-level .OBJDIR does not yet -# exist and MAKEOBJDIR is passed into environment and yield a blank value, -# bmake will incorrectly set .OBJDIR=${SRCTOP}/ rather than the expected -# ${SRCTOP} to match ${.CURDIR}. -.elif ${MAKE_VERSION} <= 20170720 && \ - ${.CURDIR} == ${SRCTOP} && ${.OBJDIR} == ${SRCTOP}/ -.OBJDIR: ${.CURDIR} .else # The OBJDIR we wanted does not yet exist, ensure we default to safe .CURDIR # in case make started with a bogus MAKEOBJDIR, that expanded before OBJTOP From owner-svn-src-head@freebsd.org Sat Nov 18 21:39:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98A90DDCF26; Sat, 18 Nov 2017 21:39:55 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 576637E850; Sat, 18 Nov 2017 21:39:55 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAILdsTc044395; Sat, 18 Nov 2017 21:39:54 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAILds09044394; Sat, 18 Nov 2017 21:39:54 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201711182139.vAILds09044394@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sat, 18 Nov 2017 21:39:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325987 - head/sys/dts/arm64 X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/dts/arm64 X-SVN-Commit-Revision: 325987 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 21:39:55 -0000 Author: manu Date: Sat Nov 18 21:39:54 2017 New Revision: 325987 URL: https://svnweb.freebsd.org/changeset/base/325987 Log: dts: arm64: allwinner: Remove unused dts for pine64 Latest u-boot port provide the dts for pine64, remove our custom and outdated dts for this board. Deleted: head/sys/dts/arm64/ From owner-svn-src-head@freebsd.org Sat Nov 18 22:53:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7DB2DDEA1E; Sat, 18 Nov 2017 22:53:47 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 978B580B3B; Sat, 18 Nov 2017 22:53:47 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 6822C5A9F27; Sat, 18 Nov 2017 22:53:40 +0000 (UTC) Date: Sat, 18 Nov 2017 22:53:40 +0000 From: Brooks Davis To: Stefan Esser Cc: Pedro Giffuni , Stefan Esser , src-committers , "svn-src-all@freebsd.org" , rgrimes@freebsd.org, "svn-src-head@freebsd.org" , "O. Hartmann" , Warner Losh Subject: Re: svn commit: r325954 - in head: . share/mk sys/conf usr.sbin/config Message-ID: <20171118225340.GF35747@spindle.one-eyed-alien.net> References: <201711180134.vAI1Y2ks064138@pdx.rh.CN85.dnsmgr.net> <29499AF9-FC0A-4CDA-9657-B092B3F9A0D0@FreeBSD.org> <04747a89-4dc7-a476-dc32-a158ee1f5240@freebsd.org> <75597b23-7a8c-34ad-736b-8d68ce7dea06@FreeBSD.org> <0186512e-dc90-6d00-c048-d87a9c1948a3@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mvpLiMfbWzRoNl4x" Content-Disposition: inline In-Reply-To: <0186512e-dc90-6d00-c048-d87a9c1948a3@freebsd.org> User-Agent: Mutt/1.9.1 (2017-09-22) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 22:53:48 -0000 --mvpLiMfbWzRoNl4x Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Nov 18, 2017 at 05:14:28PM +0100, Stefan Esser wrote: > Am 18.11.17 um 16:01 schrieb Pedro Giffuni: > > Hi; > >=20 > > On 11/18/17 09:15, Stefan Esser wrote: > >> Am 18.11.17 um 03:31 schrieb Pedro Giffuni: > >>>> On Nov 17, 2017, at 20:34, Rodney W. Grimes > >>>> wrote: > >>>> > >>>> [ Charset UTF-8 unsupported, converting... ] > >>>>> Kib@ posted to arch that we were removing it, nobody objected, we r= emoved > >>>>> it. If it was a working feature that might have a few users, that's= one > >>>>> thing. But I don't think make lint has actually worked in at least = a decade. > >>>> Thats a sad state of affairs. > >>>> > >>> t?s not sad, just the way things are, modern compilers are doing much= of > >>> the checking older tools like lint used to do.. OpenBSD and Dragonfly= BSD > >>> both killed lint ages ago. > >>> > >>> OTOH, we should probably consider other tools, like sparse: > >>> > >>> https://sparse.wiki.kernel.org/index.php/Main_Page > >>> ? The license is fine and it plays nice with the compiler. > >> It builds on -CURRENT, but the Makefile needs some tweaks (it does > >> not find LLVM or Gtk+-2.0, even though they are present on my system). > >> > >> I'll work on a port over the weekend ... > >=20 > > Thanks! >=20 > I've got a port that builds all of sparse except sparse-llvm. The sources > use GNU extensions, and I do not think it is worth the effort to provide > standard compliant replacements for them at this time. >=20 > Building sparc?se-llvm will take some more effort and require the LLVM po= rt > to be installed, since it references headers not installed by our system > compiler. It is an optional component, but one we definitely should have. >=20 > I'm not sure how to proceed, but the easiest path forward is to make the > LLVM support optional and depend on one particular LLVM version (i.e. 4.0 > for now) built from a port if the option is enabled. >=20 > > For it to be really useful we still would have to add annotations to the > > kernel headers. >=20 > Well, those could be added over time ... >=20 > > I just resurrected a recent proposal from brooks@ into the IdeasPage: > >=20 > > https://wiki.freebsd.org/IdeasPage#Userspace_Address_Space_Annotation > >=20 > > It is actually a fun project but my hands are full! >=20 > The port was easy, so far, I'll commit it without sparse-llvm for now. > LLVM support will follow when I've got the remaining build issues resolve= d. I wrote up a port a month or so ago, but I didn't commit it because I belive they authors of sparse failed to understand how C qualifiers work and the __user annotations used in linux are harmful as a result. The problem is that they annotate the data not the pointer. You can make a case for this for the address space annotations, but I believe it's completely wrong for the anti-derefernce guards. I'd hoped that that the linux style __user annotations would be a good match for the __capability annotations we use in CHERI to denote pointers that are capabilities (fat pointers), but they aren't usable. This makes me sad, but I will object to adding these annotations to our tree. (Some of the other annotations look ok, but I've not tested further after this disappointment.) -- Brooks --mvpLiMfbWzRoNl4x Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJaELnzAAoJEKzQXbSebgfApUEH+gOQvsni0/Hv9UbqcmiK1rp2 ZHmu7iFXQknqrnz9z9DeLWvo7tNJYqEU4TyKVbAgJ+lytXVltZ0p/HZWVNpJtwD4 V8a9ueKXicixEDhEu9BDZxr/6muG4HEFX1lfUaxjBhBmcsenQJcZCSvxGxwdjw5x VDnKuf2mlo+SFm7eHUsq/i8xops+mBxmwzbulmYch044Pj/IdcRkMk4srp8D3siT zO+P+9FaxFivGPv+7bIxokVPTT7D1qlxZUz84zmhymeM2xt8uG11tLBssI2/eUGy +TP2fCwy0yNn8Z8o37xWeHw+RGhpfdSMx0w7ROym3tQ7uOcwSEIy7q+VscSkgPQ= =bfAk -----END PGP SIGNATURE----- --mvpLiMfbWzRoNl4x--