From owner-svn-src-head@freebsd.org Sun Feb 5 00:32: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 DCAC8CBBB53; Sun, 5 Feb 2017 00:32:13 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B4CA41D33; Sun, 5 Feb 2017 00:32:13 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v150WCRk065037; Sun, 5 Feb 2017 00:32:12 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v150WC0j065036; Sun, 5 Feb 2017 00:32:12 GMT (envelope-from br@FreeBSD.org) Message-Id: <201702050032.v150WC0j065036@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Sun, 5 Feb 2017 00:32:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313254 - head/sys/riscv/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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, 05 Feb 2017 00:32:14 -0000 Author: br Date: Sun Feb 5 00:32:12 2017 New Revision: 313254 URL: https://svnweb.freebsd.org/changeset/base/313254 Log: Implement atomic_fcmpset_*() for RISC-V. Requested by: mjg Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9447 Modified: head/sys/riscv/include/atomic.h Modified: head/sys/riscv/include/atomic.h ============================================================================== --- head/sys/riscv/include/atomic.h Sat Feb 4 20:57:09 2017 (r313253) +++ head/sys/riscv/include/atomic.h Sun Feb 5 00:32:12 2017 (r313254) @@ -120,6 +120,31 @@ atomic_cmpset_32(volatile uint32_t *p, u return (!res); } +static __inline int +atomic_fcmpset_32(volatile uint32_t *p, uint32_t *cmpval, uint32_t newval) +{ + uint32_t tmp; + int res; + + res = 0; + + __asm __volatile( + "0:" + "li %1, 1\n" /* Preset to fail */ + "lr.w %0, %2\n" /* Load old value */ + "bne %0, %z4, 1f\n" /* Compare */ + "sc.w %1, %z5, %2\n" /* Try to store new value */ + "j 2f\n" + "1:" + "sw %0, %3\n" /* Save old value */ + "2:" + : "=&r" (tmp), "=&r" (res), "+A" (*p), "+A" (*cmpval) + : "rJ" (*cmpval), "rJ" (newval) + : "memory"); + + return (!res); +} + static __inline uint32_t atomic_fetchadd_32(volatile uint32_t *p, uint32_t val) { @@ -152,6 +177,7 @@ atomic_readandclear_32(volatile uint32_t #define atomic_add_int atomic_add_32 #define atomic_clear_int atomic_clear_32 #define atomic_cmpset_int atomic_cmpset_32 +#define atomic_fcmpset_int atomic_fcmpset_32 #define atomic_fetchadd_int atomic_fetchadd_32 #define atomic_readandclear_int atomic_readandclear_32 #define atomic_set_int atomic_set_32 @@ -183,6 +209,27 @@ atomic_cmpset_rel_32(volatile uint32_t * return (atomic_cmpset_32(p, cmpval, newval)); } +static __inline int +atomic_fcmpset_acq_32(volatile uint32_t *p, uint32_t *cmpval, uint32_t newval) +{ + int res; + + res = atomic_fcmpset_32(p, cmpval, newval); + + fence(); + + return (res); +} + +static __inline int +atomic_fcmpset_rel_32(volatile uint32_t *p, uint32_t *cmpval, uint32_t newval) +{ + + fence(); + + return (atomic_fcmpset_32(p, cmpval, newval)); +} + static __inline uint32_t atomic_load_acq_32(volatile uint32_t *p) { @@ -207,6 +254,7 @@ atomic_store_rel_32(volatile uint32_t *p #define atomic_add_acq_int atomic_add_acq_32 #define atomic_clear_acq_int atomic_clear_acq_32 #define atomic_cmpset_acq_int atomic_cmpset_acq_32 +#define atomic_fcmpset_acq_int atomic_fcmpset_acq_32 #define atomic_load_acq_int atomic_load_acq_32 #define atomic_set_acq_int atomic_set_acq_32 #define atomic_subtract_acq_int atomic_subtract_acq_32 @@ -214,6 +262,7 @@ atomic_store_rel_32(volatile uint32_t *p #define atomic_add_rel_int atomic_add_rel_32 #define atomic_clear_rel_int atomic_add_rel_32 #define atomic_cmpset_rel_int atomic_cmpset_rel_32 +#define atomic_fcmpset_rel_int atomic_fcmpset_rel_32 #define atomic_set_rel_int atomic_set_rel_32 #define atomic_subtract_rel_int atomic_subtract_rel_32 #define atomic_store_rel_int atomic_store_rel_32 @@ -281,6 +330,31 @@ atomic_cmpset_64(volatile uint64_t *p, u return (!res); } +static __inline int +atomic_fcmpset_64(volatile uint64_t *p, uint64_t *cmpval, uint64_t newval) +{ + uint64_t tmp; + int res; + + res = 0; + + __asm __volatile( + "0:" + "li %1, 1\n" /* Preset to fail */ + "lr.d %0, %2\n" /* Load old value */ + "bne %0, %z4, 1f\n" /* Compare */ + "sc.d %1, %z5, %2\n" /* Try to store new value */ + "j 2f\n" + "1:" + "sd %0, %3\n" /* Save old value */ + "2:" + : "=&r" (tmp), "=&r" (res), "+A" (*p), "+A" (*cmpval) + : "rJ" (*cmpval), "rJ" (newval) + : "memory"); + + return (!res); +} + static __inline uint64_t atomic_fetchadd_64(volatile uint64_t *p, uint64_t val) { @@ -339,6 +413,7 @@ atomic_swap_64(volatile uint64_t *p, uin #define atomic_add_long atomic_add_64 #define atomic_clear_long atomic_clear_64 #define atomic_cmpset_long atomic_cmpset_64 +#define atomic_fcmpset_long atomic_fcmpset_64 #define atomic_fetchadd_long atomic_fetchadd_64 #define atomic_readandclear_long atomic_readandclear_64 #define atomic_set_long atomic_set_64 @@ -347,6 +422,7 @@ atomic_swap_64(volatile uint64_t *p, uin #define atomic_add_ptr atomic_add_64 #define atomic_clear_ptr atomic_clear_64 #define atomic_cmpset_ptr atomic_cmpset_64 +#define atomic_fcmpset_ptr atomic_fcmpset_64 #define atomic_fetchadd_ptr atomic_fetchadd_64 #define atomic_readandclear_ptr atomic_readandclear_64 #define atomic_set_ptr atomic_set_64 @@ -378,6 +454,27 @@ atomic_cmpset_rel_64(volatile uint64_t * return (atomic_cmpset_64(p, cmpval, newval)); } +static __inline int +atomic_fcmpset_acq_64(volatile uint64_t *p, uint64_t *cmpval, uint64_t newval) +{ + int res; + + res = atomic_fcmpset_64(p, cmpval, newval); + + fence(); + + return (res); +} + +static __inline int +atomic_fcmpset_rel_64(volatile uint64_t *p, uint64_t *cmpval, uint64_t newval) +{ + + fence(); + + return (atomic_fcmpset_64(p, cmpval, newval)); +} + static __inline uint64_t atomic_load_acq_64(volatile uint64_t *p) { @@ -402,6 +499,7 @@ atomic_store_rel_64(volatile uint64_t *p #define atomic_add_acq_long atomic_add_acq_64 #define atomic_clear_acq_long atomic_add_acq_64 #define atomic_cmpset_acq_long atomic_cmpset_acq_64 +#define atomic_fcmpset_acq_long atomic_fcmpset_acq_64 #define atomic_load_acq_long atomic_load_acq_64 #define atomic_set_acq_long atomic_set_acq_64 #define atomic_subtract_acq_long atomic_subtract_acq_64 @@ -409,6 +507,7 @@ atomic_store_rel_64(volatile uint64_t *p #define atomic_add_acq_ptr atomic_add_acq_64 #define atomic_clear_acq_ptr atomic_add_acq_64 #define atomic_cmpset_acq_ptr atomic_cmpset_acq_64 +#define atomic_fcmpset_acq_ptr atomic_fcmpset_acq_64 #define atomic_load_acq_ptr atomic_load_acq_64 #define atomic_set_acq_ptr atomic_set_acq_64 #define atomic_subtract_acq_ptr atomic_subtract_acq_64 @@ -447,6 +546,7 @@ atomic_thread_fence_seq_cst(void) #define atomic_add_rel_long atomic_add_rel_64 #define atomic_clear_rel_long atomic_clear_rel_64 #define atomic_cmpset_rel_long atomic_cmpset_rel_64 +#define atomic_fcmpset_rel_long atomic_fcmpset_rel_64 #define atomic_set_rel_long atomic_set_rel_64 #define atomic_subtract_rel_long atomic_subtract_rel_64 #define atomic_store_rel_long atomic_store_rel_64 @@ -454,6 +554,7 @@ atomic_thread_fence_seq_cst(void) #define atomic_add_rel_ptr atomic_add_rel_64 #define atomic_clear_rel_ptr atomic_clear_rel_64 #define atomic_cmpset_rel_ptr atomic_cmpset_rel_64 +#define atomic_fcmpset_rel_ptr atomic_fcmpset_rel_64 #define atomic_set_rel_ptr atomic_set_rel_64 #define atomic_subtract_rel_ptr atomic_subtract_rel_64 #define atomic_store_rel_ptr atomic_store_rel_64 From owner-svn-src-head@freebsd.org Sun Feb 5 00:45: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 9171CCBBFBA; Sun, 5 Feb 2017 00:45:03 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44F2E7D3; Sun, 5 Feb 2017 00:45:03 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v150j24T070172; Sun, 5 Feb 2017 00:45:02 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v150j2j3070170; Sun, 5 Feb 2017 00:45:02 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201702050045.v150j2j3070170@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 5 Feb 2017 00:45:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313257 - head/sbin/nvmecontrol X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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, 05 Feb 2017 00:45:03 -0000 Author: imp Date: Sun Feb 5 00:45:02 2017 New Revision: 313257 URL: https://svnweb.freebsd.org/changeset/base/313257 Log: Add some descriptions to the man page for the supported log pages as well as the new wdc commands. Make wdc be an alias for hgst when specifying the vendor to use to interpret the page. Modified: head/sbin/nvmecontrol/logpage.c head/sbin/nvmecontrol/nvmecontrol.8 Modified: head/sbin/nvmecontrol/logpage.c ============================================================================== --- head/sbin/nvmecontrol/logpage.c Sun Feb 5 00:42:15 2017 (r313256) +++ head/sbin/nvmecontrol/logpage.c Sun Feb 5 00:45:02 2017 (r313257) @@ -846,6 +846,8 @@ static struct logpage_function { sizeof(struct nvme_firmware_page)}, {HGST_INFO_LOG, "hgst", print_hgst_info_log, DEFAULT_SIZE}, + {HGST_INFO_LOG, "wdc", print_hgst_info_log, + DEFAULT_SIZE}, {INTEL_LOG_TEMP_STATS, "intel", print_intel_temp_stats, sizeof(struct intel_log_temp_stats)}, {INTEL_LOG_READ_LAT_LOG, "intel", print_intel_read_lat_log, Modified: head/sbin/nvmecontrol/nvmecontrol.8 ============================================================================== --- head/sbin/nvmecontrol/nvmecontrol.8 Sun Feb 5 00:42:15 2017 (r313256) +++ head/sbin/nvmecontrol/nvmecontrol.8 Sun Feb 5 00:45:02 2017 (r313257) @@ -62,6 +62,7 @@ .Ic logpage .Aq Fl p Ar page_id .Op Fl x +.Op Fl v Ar vendor-string .Aq device id .Aq namespace id .Nm @@ -74,7 +75,7 @@ .Ic power .Op Fl l .Op Fl p power_state -.Op fl w workload_hint +.Op Fl w workload_hint .Nm .Ic wdc cap-diag .Op Fl o path_template @@ -96,6 +97,26 @@ .Sh DESCRIPTION NVM Express (NVMe) is a storage protocol standard, for SSDs and other high-speed storage devices over PCI Express. +.Pp +.Ss logpage +The logpage command knows how to print log pages of various types. +It also knows about vendor specific log pages from hgst/wdc and intel. +Page 0xc1 for hgst/wdc contains the advanced smart information about +the drive. +Page 0xc1 is read latency stats for intel. +Page 0xc2 is write latency stats for intel. +Page 0xc5 is temperature stats for intel. +Page 0xca is advanced smart information for intel. +.Ss wdc +The various wdc command retrieve log data from the wdc/hgst drives. +The +.Fl o +flag specifies a path template to use to output the files. +Each file takes the path template (which defaults to nothing), appends +the drive's serial number and the type of dump it is followed +by .bin. +These logs must be sent to the vendor for analysis. +This tool only provides a way to extract them. .Sh EXAMPLES .Dl nvmecontrol devlist .Pp From owner-svn-src-head@freebsd.org Sun Feb 5 00:55: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 20EF0CC51FF; Sun, 5 Feb 2017 00:55:09 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BAE81BD2; Sun, 5 Feb 2017 00:55:08 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v150t7dh074040; Sun, 5 Feb 2017 00:55:07 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v150t7v2074038; Sun, 5 Feb 2017 00:55:07 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201702050055.v150t7v2074038@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 5 Feb 2017 00:55:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313258 - head/sbin/nvmecontrol X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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, 05 Feb 2017 00:55:09 -0000 Author: imp Date: Sun Feb 5 00:55:07 2017 New Revision: 313258 URL: https://svnweb.freebsd.org/changeset/base/313258 Log: Add the ability to dump log pages directly in binary to stdout. Update man page to include this flag, and an example of dumping a vendor-specific page while I'm here. Modified: head/sbin/nvmecontrol/logpage.c head/sbin/nvmecontrol/nvmecontrol.8 Modified: head/sbin/nvmecontrol/logpage.c ============================================================================== --- head/sbin/nvmecontrol/logpage.c Sun Feb 5 00:45:02 2017 (r313257) +++ head/sbin/nvmecontrol/logpage.c Sun Feb 5 00:55:07 2017 (r313258) @@ -74,6 +74,12 @@ kv_lookup(const struct kv_name *kv, size return bad; } +static void +print_bin(void *data, uint32_t length) +{ + write(STDOUT_FILENO, data, length); +} + /* * 128-bit integer augments to standard values. On i386 this * doesn't exist, so we use 64-bit values. The 128-bit counters @@ -872,7 +878,7 @@ logpage(int argc, char *argv[]) { int fd, nsid; int log_page = 0, pageflag = false; - int hexflag = false, ns_specified; + int binflag = false, hexflag = false, ns_specified; char ch, *p; char cname[64]; uint32_t size; @@ -882,8 +888,11 @@ logpage(int argc, char *argv[]) struct nvme_controller_data cdata; print_fn_t print_fn; - while ((ch = getopt(argc, argv, "p:xv:")) != -1) { + while ((ch = getopt(argc, argv, "bp:xv:")) != -1) { switch (ch) { + case 'b': + binflag = true; + break; case 'p': /* TODO: Add human-readable ASCII page IDs */ log_page = strtol(optarg, &p, 0); @@ -942,7 +951,9 @@ logpage(int argc, char *argv[]) print_fn = print_hex; size = DEFAULT_SIZE; - if (!hexflag) { + if (binflag) + print_fn = print_bin; + if (!binflag && !hexflag) { /* * See if there is a pretty print function for the specified log * page. If one isn't found, we just revert to the default Modified: head/sbin/nvmecontrol/nvmecontrol.8 ============================================================================== --- head/sbin/nvmecontrol/nvmecontrol.8 Sun Feb 5 00:45:02 2017 (r313257) +++ head/sbin/nvmecontrol/nvmecontrol.8 Sun Feb 5 00:55:07 2017 (r313258) @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 10, 2016 +.Dd February 4, 2017 .Dt NVMECONTROL 8 .Os .Sh NAME @@ -63,6 +63,7 @@ .Aq Fl p Ar page_id .Op Fl x .Op Fl v Ar vendor-string +.Op Fl b .Aq device id .Aq namespace id .Nm @@ -147,10 +148,21 @@ Display a human-readable summary of the Log pages defined by the NVMe specification include Error Information Log (ID=1), SMART/Health Information Log (ID=2), and Firmware Slot Log (ID=3). .Pp +.Dl nvmecontrol logpage -p 0xc1 -v wdc nvme0 +.Pp +Display a human-readable summary of the nvme0's wdc-specific advanced +SMART data. +.Pp .Dl nvmecontrol logpage -p 1 -x nvme0 .Pp Display a hexadecimal dump of the nvme0 controller's Error Information Log. .Pp +.Dl nvmecontrol logpage -p 0xcb -b nvme0 > /tmp/page-cb.bin +.Pp +Print the contents of vendor specific page 0xcb as binary data on +standard out. +Redirect it to a temporary file. +.Pp .Dl nvmecontrol firmware -s 2 -f /tmp/nvme_firmware nvme0 .Pp Download the firmware image contained in "/tmp/nvme_firmware" to slot 2 of the From owner-svn-src-head@freebsd.org Sun Feb 5 01:17: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 B84D7CC5EE1; Sun, 5 Feb 2017 01:17:06 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 739B3192C; Sun, 5 Feb 2017 01:17:06 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id aBRncNba0cWiHaBRpcfhlP; Sat, 04 Feb 2017 18:16:58 -0700 X-Authority-Analysis: v=2.2 cv=JLBLi4Cb c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=n2v9WMKugxEA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=kJ238s9Cgt9YSbS1S48A:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id B313DDDF; Sat, 4 Feb 2017 17:16:55 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v151Gtj1060849; Sat, 4 Feb 2017 17:16:55 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201702050116.v151Gtj1060849@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Warner Losh cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313191 - head/sbin/nvmecontrol In-Reply-To: Message from Warner Losh of "Sat, 04 Feb 2017 05:53:01 +0000." <201702040553.v145r1wB002775@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 04 Feb 2017 17:16:55 -0800 X-CMAE-Envelope: MS4wfAw5oqgq6bLpMnCdPW81ajfGEKGn2PX0My8H7nMh0UjXj1xl2SoHd3yhTYwTK1cF1R5OcrgLJf0EDIWl9WKLgLXDPqrIVuUoFM1m8Q0SxmpBmCXid33q WdSZJew2PL9Bwi51UplBDBU6Vh0LM8y1xBpA5huXy/tl9K9KdhxezY2Gxpb7z6HbWvG8aCsrwm5UbBDjXjlmUJGgsUd5MdSJgIEiplRBGRRJoSvDqops6W6J 1c8vYMllVW+Ft9jwukNbcQJfKfu55alCbEii7cYDon7JgvznpYHJu4eVWUj8FxMP X-BeenThere: svn-src-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, 05 Feb 2017 01:17:06 -0000 In message <201702040553.v145r1wB002775@repo.freebsd.org>, Warner Losh writes: > Author: imp > Date: Sat Feb 4 05:53:00 2017 > New Revision: 313191 > URL: https://svnweb.freebsd.org/changeset/base/313191 > > Log: > Implement 5 wdc-specific nvme control options for their HGST drives: > wdc cap-diag Capture diagnostic data from drive > wdc drive-log Capture drive history data from drive > wdc get-crash-dump Retrieve firmware crash dump from drive > > Added: > head/sbin/nvmecontrol/wdc.c (contents, props changed) > Modified: > head/sbin/nvmecontrol/Makefile > head/sbin/nvmecontrol/nvmecontrol.8 > head/sbin/nvmecontrol/nvmecontrol.c > head/sbin/nvmecontrol/nvmecontrol.h [...] > + while (len > 0) { > + resid = len > NVME_MAX_XFER_SIZE ? NVME_MAX_XFER_SIZE : len; > + wdc_get_data(fd, opcode, resid, offset, cmd, buf, resid); > + if (write(fd2, buf, resid) != resid) Hi Warner, I'm seeing the following on i386. opt/src/svn-current/sbin/nvmecontrol/wdc.c:156:30: error: comparison of integers of different signs: 'ssize_t' (aka 'int') and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare] if (write(fd2, buf, resid) != resid) ~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~ 1 error generated. amd64 builds okay. > + err(1, "write"); > + offset += resid; > + len -= resid; > + } > + free(buf); > + close(fd2); [...] -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Sun Feb 5 01:20: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 B9EA3CD008A; Sun, 5 Feb 2017 01:20:40 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89B881B4A; Sun, 5 Feb 2017 01:20:40 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v151KdfK082266; Sun, 5 Feb 2017 01:20:39 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v151Kdsu082265; Sun, 5 Feb 2017 01:20:39 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201702050120.v151Kdsu082265@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 5 Feb 2017 01:20:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313259 - head/sbin/nvmecontrol X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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, 05 Feb 2017 01:20:40 -0000 Author: imp Date: Sun Feb 5 01:20:39 2017 New Revision: 313259 URL: https://svnweb.freebsd.org/changeset/base/313259 Log: Use ssize_t instead of uint32_t to prevent warnings about a comparison with different signs. Due to the promotion rules, this would only happen on 32-bit platforms. Modified: head/sbin/nvmecontrol/wdc.c Modified: head/sbin/nvmecontrol/wdc.c ============================================================================== --- head/sbin/nvmecontrol/wdc.c Sun Feb 5 00:55:07 2017 (r313258) +++ head/sbin/nvmecontrol/wdc.c Sun Feb 5 01:20:39 2017 (r313259) @@ -127,7 +127,8 @@ wdc_do_dump(int fd, char *tmpl, const ch { int fd2; uint8_t *buf; - uint32_t len, resid, offset; + uint32_t len, offset; + ssize_t resid; wdc_append_serial_name(fd, tmpl, MAXPATHLEN, suffix); From owner-svn-src-head@freebsd.org Sun Feb 5 01:21: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 63B70CD0248 for ; Sun, 5 Feb 2017 01:21:05 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x241.google.com (mail-io0-x241.google.com [IPv6:2607:f8b0:4001:c06::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2BEBA1CFA for ; Sun, 5 Feb 2017 01:21:05 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x241.google.com with SMTP id q20so5924747ioi.3 for ; Sat, 04 Feb 2017 17:21:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=dHZFfgGmi7/Mein23dg3tC9cmBqROkHsvD68kswj900=; b=i/g98ht8vwvVpVeqae1wwNSYVdDxIxUBUDJKMIfEi0S8XKI6+J2HzGTtGF5M2C+O6E /628WOORBF0ciSSIgJMKwTTOqoVywiLAhLSpfvSilxTIsOJzdOr0V8iiE+xwG5wQpuZ6 4+c3Yp5xiV4m/YO7URrrKL8fQwPLrChTNpW2Un1wQ4uXoE6kjrHYEbxje1dO9OmeXALI n3qFrWVsn7Y9bhXFmKF0k5z3m5IBvxf8yWnVNMk2AvzXXHJzN2MCmYp+dawf3JoeO95v MYtnbg4IQ6ZXeQsK3KhRQ+V0yiX7OM6BdZUCfZ02IH120eePH6+5JsA+OO2zOaX/a5Tt gSbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=dHZFfgGmi7/Mein23dg3tC9cmBqROkHsvD68kswj900=; b=c8kYXN3S7KYnX93mUcAII7aWZ2hwJLxJTxfemuSp4KRxbxi3aPk7KHPDDT4CTX+Zdx OQ4uQBVlZmr3wzTYdwNPWV+xJstDtLsj7zMVvYfXymwY2LTidmYgHHkGsAPmmz0Idbqj VSEDVAsBDKE39W2Zftg4oTajxtVYnofryU3TvHb+jgNzWCjFvS1m0igfcK6iPoap4JN7 8Kt9nc5EE8d4HsBxUbWH4ZnJsoelXbdBbghflZG6q6Ve6NmrwRZUdJKFqZFqznQSiNE0 epgMd1NAZoNTIGso5btefFgClZKiYixwbT5MH07tOeFZZgmWq4j2OZRIyBF+rcSzeVho Hotw== X-Gm-Message-State: AMke39n21jEYQa/cBJ/0Bk6FGp1Pwe81tTXGUDZOZY2nWApBg7uWpZwVJen1I2sCrE8RVuyhDiDSQIzIowDzGA== X-Received: by 10.107.139.131 with SMTP id n125mr3014708iod.166.1486257664237; Sat, 04 Feb 2017 17:21:04 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.145.217 with HTTP; Sat, 4 Feb 2017 17:21:02 -0800 (PST) X-Originating-IP: [69.53.245.200] In-Reply-To: <201702050116.v151Gtj1060849@slippy.cwsent.com> References: <201702040553.v145r1wB002775@repo.freebsd.org> <201702050116.v151Gtj1060849@slippy.cwsent.com> From: Warner Losh Date: Sat, 4 Feb 2017 18:21:02 -0700 X-Google-Sender-Auth: aG4UViT5uFIHT9Icc8DAx5AtU4Q Message-ID: Subject: Re: svn commit: r313191 - head/sbin/nvmecontrol To: Cy Schubert Cc: Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-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, 05 Feb 2017 01:21:05 -0000 Thanks! Fixed in r313259. Warner On Sat, Feb 4, 2017 at 6:16 PM, Cy Schubert wrote: > In message <201702040553.v145r1wB002775@repo.freebsd.org>, Warner Losh > writes: >> Author: imp >> Date: Sat Feb 4 05:53:00 2017 >> New Revision: 313191 >> URL: https://svnweb.freebsd.org/changeset/base/313191 >> >> Log: >> Implement 5 wdc-specific nvme control options for their HGST drives: >> wdc cap-diag Capture diagnostic data from drive >> wdc drive-log Capture drive history data from drive >> wdc get-crash-dump Retrieve firmware crash dump from drive >> >> Added: >> head/sbin/nvmecontrol/wdc.c (contents, props changed) >> Modified: >> head/sbin/nvmecontrol/Makefile >> head/sbin/nvmecontrol/nvmecontrol.8 >> head/sbin/nvmecontrol/nvmecontrol.c >> head/sbin/nvmecontrol/nvmecontrol.h > [...] >> + while (len > 0) { >> + resid = len > NVME_MAX_XFER_SIZE ? NVME_MAX_XFER_SIZE : len; >> + wdc_get_data(fd, opcode, resid, offset, cmd, buf, resid); >> + if (write(fd2, buf, resid) != resid) > > Hi Warner, > > I'm seeing the following on i386. > > opt/src/svn-current/sbin/nvmecontrol/wdc.c:156:30: error: comparison of > integers of different signs: 'ssize_t' (aka 'int') and 'uint32_t' (aka > 'unsigned int') [-Werror,-Wsign-compare] > if (write(fd2, buf, resid) != resid) > ~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~ > 1 error generated. > > amd64 builds okay. > >> + err(1, "write"); >> + offset += resid; >> + len -= resid; >> + } >> + free(buf); >> + close(fd2); > [...] > > > -- > Cheers, > Cy Schubert > FreeBSD UNIX: Web: http://www.FreeBSD.org > > The need of the many outweighs the greed of the few. > > From owner-svn-src-head@freebsd.org Sun Feb 5 01:26: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 2BB93CD03D9; Sun, 5 Feb 2017 01:26:14 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D41421CA; Sun, 5 Feb 2017 01:26:13 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id aBalcNdzIcWiHaBamcfiu4; Sat, 04 Feb 2017 18:26:12 -0700 X-Authority-Analysis: v=2.2 cv=JLBLi4Cb c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=n2v9WMKugxEA:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=BWvPGDcYAAAA:8 a=pSDo845uDOqUOBJDyvoA:9 a=CjuIK1q_8ugA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=pxhY87DP9d2VeQe4joPk:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id E5EDAE47; Sat, 4 Feb 2017 17:26:10 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v151QAfE005740; Sat, 4 Feb 2017 17:26:10 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201702050126.v151QAfE005740@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Warner Losh cc: Cy Schubert , Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r313191 - head/sbin/nvmecontrol In-Reply-To: Message from Warner Losh of "Sat, 04 Feb 2017 18:21:02 -0700." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 04 Feb 2017 17:26:10 -0800 X-CMAE-Envelope: MS4wfCFKt1/Hb7D8lxi/MB2abphm3zNUPnmB2CuHquwSMdxDAo/41yQW6S9rFLZG9//8om+R3YDh3MklJYxD/9UKR7hKFYYQZNFJEDQE3pjswDP2Dj6SuKxr 1yjdUvaoCn02yb0dq9f4ngA39NpWf2FbvslbCjfWKCSoB1Xe6L+kf7LYWIoQCsxEv8kuGDwOZ7LAgM3U8uj/M3BI8mlvlFfL+Ne2rjfDiHzY9ZsKD03lQwg+ 40UgCZS3qBlw96DTEm5+ZSngNDODb63ka0QoSJP3hjDkWaC1x36qzwt3wrhBue/axgA8643J/MQuL0rIn93xmw== X-BeenThere: svn-src-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, 05 Feb 2017 01:26:14 -0000 Thanks. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. In message , Warner Losh writes: > Thanks! Fixed in r313259. > > Warner > > On Sat, Feb 4, 2017 at 6:16 PM, Cy Schubert wrote: > > In message <201702040553.v145r1wB002775@repo.freebsd.org>, Warner Losh > > writes: > >> Author: imp > >> Date: Sat Feb 4 05:53:00 2017 > >> New Revision: 313191 > >> URL: https://svnweb.freebsd.org/changeset/base/313191 > >> > >> Log: > >> Implement 5 wdc-specific nvme control options for their HGST drives: > >> wdc cap-diag Capture diagnostic data from drive > >> wdc drive-log Capture drive history data from drive > >> wdc get-crash-dump Retrieve firmware crash dump from drive > >> > >> Added: > >> head/sbin/nvmecontrol/wdc.c (contents, props changed) > >> Modified: > >> head/sbin/nvmecontrol/Makefile > >> head/sbin/nvmecontrol/nvmecontrol.8 > >> head/sbin/nvmecontrol/nvmecontrol.c > >> head/sbin/nvmecontrol/nvmecontrol.h > > [...] > >> + while (len > 0) { > >> + resid = len > NVME_MAX_XFER_SIZE ? NVME_MAX_XFER_SIZE : len; > >> + wdc_get_data(fd, opcode, resid, offset, cmd, buf, resid); > >> + if (write(fd2, buf, resid) != resid) > > > > Hi Warner, > > > > I'm seeing the following on i386. > > > > opt/src/svn-current/sbin/nvmecontrol/wdc.c:156:30: error: comparison of > > integers of different signs: 'ssize_t' (aka 'int') and 'uint32_t' (aka > > 'unsigned int') [-Werror,-Wsign-compare] > > if (write(fd2, buf, resid) != resid) > > ~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~ > > 1 error generated. > > > > amd64 builds okay. > > > >> + err(1, "write"); > >> + offset += resid; > >> + len -= resid; > >> + } > >> + free(buf); > >> + close(fd2); > > [...] > > > > > > -- > > Cheers, > > Cy Schubert > > FreeBSD UNIX: Web: http://www.FreeBSD.org > > > > The need of the many outweighs the greed of the few. > > > > > > From owner-svn-src-head@freebsd.org Sun Feb 5 01: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 D86D4CD0466 for ; Sun, 5 Feb 2017 01:26:40 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x243.google.com (mail-it0-x243.google.com [IPv6:2607:f8b0:4001:c0b::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A059034D for ; Sun, 5 Feb 2017 01:26:40 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x243.google.com with SMTP id e137so5121931itc.0 for ; Sat, 04 Feb 2017 17:26:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=CMTG2H2XDvrdcdX9nl9tkvxLnJ+Qub0Rjq+NL8H9LXM=; b=H2MKMTvN1VVHwFG2IvZy3WtF6/ycODDptOUdcZwUkYDAKJ1IJx2NI9eqDvE5yvNiNB Mr4EP/oARitrhls/+8LaZq/GlbxquIiXJfvZM2xAwVV5K4toCbvGOTnxCVg4kDhaXb57 7OE3rwabJuxAYzpuU37OpNp28XmVinD9emnCwB4WNL5W73rHwUNAmAKkgbRozZXUXUvh Lh2gy6BeJb445GdhWV4Icllc8sB4PgX3ZD56Mw/6pb2hsLon0rUA9sPK4/Qk2fjRwImj ahB6i3J8IOYHE3nAjSIDVGpcaxz5dhX0bTkbE2AAXHEI1GjZfZwNz7nhJMpoTVq3w82M Kx3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=CMTG2H2XDvrdcdX9nl9tkvxLnJ+Qub0Rjq+NL8H9LXM=; b=Nyq9GrGDF+pJTBiFy+JSWd96kt7Pr+cU2Y542JfWJE/aaLI0rG9F+OLjJX5DbsF/Ak fTz3RSqBrWFJv1W/zl9srowNpQ8T12YB7A9oMRly/K+4f/7CCvhWwDtqAGDLuLvOf4oO 6GSYtdDKCp1cxSlbnnKVSEsHaEGP+a+a7NfzYSMkajjbh6oYwaG9EZXyKVc2yi7eLutt iCJdd+9psH5X+2mUOqNIaa2/hcJAm/+O4doQBq4J/ekaR59zehqKgdmS8c7RmLToyTbT ZXc0NmFuClIy3hWdXCTgqSk53tbp81g0SinPKAJkWgwa9jCVgLCZwhJL4mn+XGERIpeg zCyg== X-Gm-Message-State: AIkVDXIB+e8RoHDYIYwStyDuMrQQnTD29qLbDnbMg5vUnRngwrouufuTkgKbV8m/Tfrw+OSmbN9cB1YqXoQpRw== X-Received: by 10.36.178.21 with SMTP id u21mr2644967ite.103.1486258000029; Sat, 04 Feb 2017 17:26:40 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.145.217 with HTTP; Sat, 4 Feb 2017 17:26:39 -0800 (PST) X-Originating-IP: [69.53.245.200] In-Reply-To: <201702050126.v151QAfE005740@slippy.cwsent.com> References: <201702050126.v151QAfE005740@slippy.cwsent.com> From: Warner Losh Date: Sat, 4 Feb 2017 18:26:39 -0700 X-Google-Sender-Auth: 8Mg701qH0gjPyhZ4SP6Vn1wmpKI Message-ID: Subject: Re: svn commit: r313191 - head/sbin/nvmecontrol To: Cy Schubert Cc: Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-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, 05 Feb 2017 01:26:40 -0000 Sorry it took so long. Warner On Sat, Feb 4, 2017 at 6:26 PM, Cy Schubert wrote: > Thanks. > > > -- > Cheers, > Cy Schubert > FreeBSD UNIX: Web: http://www.FreeBSD.org > > The need of the many outweighs the greed of the few. > > > In message om> > , Warner Losh writes: >> Thanks! Fixed in r313259. >> >> Warner >> >> On Sat, Feb 4, 2017 at 6:16 PM, Cy Schubert wrote: >> > In message <201702040553.v145r1wB002775@repo.freebsd.org>, Warner Losh >> > writes: >> >> Author: imp >> >> Date: Sat Feb 4 05:53:00 2017 >> >> New Revision: 313191 >> >> URL: https://svnweb.freebsd.org/changeset/base/313191 >> >> >> >> Log: >> >> Implement 5 wdc-specific nvme control options for their HGST drives: >> >> wdc cap-diag Capture diagnostic data from drive >> >> wdc drive-log Capture drive history data from drive >> >> wdc get-crash-dump Retrieve firmware crash dump from drive >> >> >> >> Added: >> >> head/sbin/nvmecontrol/wdc.c (contents, props changed) >> >> Modified: >> >> head/sbin/nvmecontrol/Makefile >> >> head/sbin/nvmecontrol/nvmecontrol.8 >> >> head/sbin/nvmecontrol/nvmecontrol.c >> >> head/sbin/nvmecontrol/nvmecontrol.h >> > [...] >> >> + while (len > 0) { >> >> + resid = len > NVME_MAX_XFER_SIZE ? NVME_MAX_XFER_SIZE : len; >> >> + wdc_get_data(fd, opcode, resid, offset, cmd, buf, resid); >> >> + if (write(fd2, buf, resid) != resid) >> > >> > Hi Warner, >> > >> > I'm seeing the following on i386. >> > >> > opt/src/svn-current/sbin/nvmecontrol/wdc.c:156:30: error: comparison of >> > integers of different signs: 'ssize_t' (aka 'int') and 'uint32_t' (aka >> > 'unsigned int') [-Werror,-Wsign-compare] >> > if (write(fd2, buf, resid) != resid) >> > ~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~ >> > 1 error generated. >> > >> > amd64 builds okay. >> > >> >> + err(1, "write"); >> >> + offset += resid; >> >> + len -= resid; >> >> + } >> >> + free(buf); >> >> + close(fd2); >> > [...] >> > >> > >> > -- >> > Cheers, >> > Cy Schubert >> > FreeBSD UNIX: Web: http://www.FreeBSD.org >> > >> > The need of the many outweighs the greed of the few. >> > >> > >> >> > > From owner-svn-src-head@freebsd.org Sun Feb 5 01:40: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 DD541CD0831; Sun, 5 Feb 2017 01:40:28 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA8B8B3A; Sun, 5 Feb 2017 01:40:28 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v151eRkZ090327; Sun, 5 Feb 2017 01:40:27 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v151eRXX090326; Sun, 5 Feb 2017 01:40:27 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702050140.v151eRXX090326@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 5 Feb 2017 01:40:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313260 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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, 05 Feb 2017 01:40:29 -0000 Author: mjg Date: Sun Feb 5 01:40:27 2017 New Revision: 313260 URL: https://svnweb.freebsd.org/changeset/base/313260 Log: fd: switch fget_unlocked to atomic_fcmpset Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Sun Feb 5 01:20:39 2017 (r313259) +++ head/sys/kern/kern_descrip.c Sun Feb 5 01:40:27 2017 (r313260) @@ -2569,8 +2569,8 @@ fget_unlocked(struct filedesc *fdp, int if (error != 0) return (error); #endif - retry: count = fp->f_count; + retry: if (count == 0) { /* * Force a reload. Other thread could reallocate the @@ -2584,7 +2584,7 @@ fget_unlocked(struct filedesc *fdp, int * Use an acquire barrier to force re-reading of fdt so it is * refreshed for verification. */ - if (atomic_cmpset_acq_int(&fp->f_count, count, count + 1) == 0) + if (atomic_fcmpset_acq_int(&fp->f_count, &count, count + 1) == 0) goto retry; fdt = fdp->fd_files; #ifdef CAPABILITIES From owner-svn-src-head@freebsd.org Sun Feb 5 02:16: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 2C270CD0FCE for ; Sun, 5 Feb 2017 02:16:15 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) 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 AD88F1AEE for ; Sun, 5 Feb 2017 02:16:14 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: by mail-wm0-x236.google.com with SMTP id b65so83348494wmf.0 for ; Sat, 04 Feb 2017 18:16:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to; bh=MSo5tbz1h+ykk1j1jOVNSQ9DPwphzTOrlroxw+e6RGY=; b=RZdR4TrL8qFQWdQnFAAnwh8jFcueSxsZn46ryM7kBprWMlpts0xafbr7AvOG3c1At0 Le6u6xr7VtS4+UJ8hK8EQFvWLWdMZZH4iS1+/+1Ao/ovF70EISfoqMyaywqMlOBNeeVZ InRxMQ3XqAsu0gi7I7KkVnur+2M8VFhbAAg8xGKsqIZcHFSv+Ehoa+OefhNvjapoeSYP urE2ETrnumxQ+ourHCF3/JoGpKxrnOniuMMdE4I5TAgpWOAC4s4RS29XBxa38Y8mrEkK dgBb3WI8EArU7uHWR0E+NTJ0rPNsl6i3IWctvuDRetCpJfCNbnLaaidtcI6jv0T/+Gry MU5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to; bh=MSo5tbz1h+ykk1j1jOVNSQ9DPwphzTOrlroxw+e6RGY=; b=q/9InBqB5PJW5XSUTCDb086PVVGGL0zducL/bhzMgC1PQDPyqnOuuvqaRpjkcvwRAS aieu2K4BZ8IyZj+o+PRmQCwqrWQsxoQ5dqXQUvz/5Z7eoT8R7qjXiAejIRzIaesglLMm DXIdW7g502fduzb2chI2jPgcfb7CQdChZoT0+/MC9jwJpLyjoHzSaBS41kHo7KOR61J7 sJCNNuGAUav/Fp6kJ1zvjJ3dT9VZ5Dbmm4Sk4RW4AnWqQ/jxkx1F/1a1S0C7PmaxKGjP jipdc4p5GMIEnRPuJq58Ywa/gy8dvlvIXEhiwB5AjJDM93fH3PQXKhiDFwHhw/S8YkHI +fuQ== X-Gm-Message-State: AMke39kcEkSjx06ntFdU79u8mhwMneOIpW4k3wAkLteL63gJ6ieumJmtHo0DK6GHQzeIZ7Tf X-Received: by 10.28.127.13 with SMTP id a13mr3239591wmd.96.1486260972606; Sat, 04 Feb 2017 18:16:12 -0800 (PST) Received: from [10.10.1.58] ([185.97.61.26]) by smtp.gmail.com with ESMTPSA id 198sm5253474wmn.11.2017.02.04.18.16.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 Feb 2017 18:16:11 -0800 (PST) Subject: Re: svn commit: r313260 - head/sys/kern To: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201702050140.v151eRXX090326@repo.freebsd.org> From: Steven Hartland Message-ID: <42c790bb-df12-2a50-6181-24bac5c72d34@multiplay.co.uk> Date: Sun, 5 Feb 2017 02:16:12 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <201702050140.v151eRXX090326@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-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, 05 Feb 2017 02:16:15 -0000 Hi Mateusz could you improve on the commit message as it currently describes what is changed, which can be obtained from the diff, but not why? I hope on one feels like I'm trying to teach them to suck eggs, as I know everyone here has a wealth of experience, but I strongly believe commit messages are a very important way of improving the overall quality of the code base by sharing with others the reason for changes, which they can then learn from. I know I for one love picking up new nuggets of knowledge from others in this way. Also I believe this is area the project as a whole can improve on, so I don't mean to single out anyone here. Anyway I hope people find this useful: When I write a commit message I try to stick to the following rules which I believe helps to bring clarity for others about my actions. 1. First line is a brief summary of the out come of the change e.g. Fixed compiler warnings in nvmecontrol on 32bit platforms 2. Follow up paragraphs expand on #1 if needed including details about not just what but why the change was made e.g. Use ssize_t instead of uint32_t to prevent warnings about a comparison with different signs. Due to the promotion rules, this would only happen on 32-bit platforms. 3. When writing #2 include details that would not be obvious to non-experts in the particular area. #2 and #3 are really important to sharing knowledge that others may not know, its quite relevant to this commit msg, as while it may be obvious to you and others familiar with the atomic ops, to the rest of us we're just wondering why make this change? N.B. The example is based on Warner's recent commit purely as an example, which had a good why, just missing the brief summary. While on this subject are there any official guidelines to writing commit messages, if no should we create some? On 05/02/2017 01:40, Mateusz Guzik wrote: > Author: mjg > Date: Sun Feb 5 01:40:27 2017 > New Revision: 313260 > URL: https://svnweb.freebsd.org/changeset/base/313260 > > Log: > fd: switch fget_unlocked to atomic_fcmpset > > Modified: > head/sys/kern/kern_descrip.c > > Modified: head/sys/kern/kern_descrip.c > ============================================================================== > --- head/sys/kern/kern_descrip.c Sun Feb 5 01:20:39 2017 (r313259) > +++ head/sys/kern/kern_descrip.c Sun Feb 5 01:40:27 2017 (r313260) > @@ -2569,8 +2569,8 @@ fget_unlocked(struct filedesc *fdp, int > if (error != 0) > return (error); > #endif > - retry: > count = fp->f_count; > + retry: > if (count == 0) { > /* > * Force a reload. Other thread could reallocate the > @@ -2584,7 +2584,7 @@ fget_unlocked(struct filedesc *fdp, int > * Use an acquire barrier to force re-reading of fdt so it is > * refreshed for verification. > */ > - if (atomic_cmpset_acq_int(&fp->f_count, count, count + 1) == 0) > + if (atomic_fcmpset_acq_int(&fp->f_count, &count, count + 1) == 0) > goto retry; > fdt = fdp->fd_files; > #ifdef CAPABILITIES > From owner-svn-src-head@freebsd.org Sun Feb 5 02:27: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 E9915CD141B; Sun, 5 Feb 2017 02:27:05 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B8F6318F; Sun, 5 Feb 2017 02:27:05 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v152R4lm010438; Sun, 5 Feb 2017 02:27:04 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v152R4Ev010437; Sun, 5 Feb 2017 02:27:04 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702050227.v152R4Ev010437@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 5 Feb 2017 02:27:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313261 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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, 05 Feb 2017 02:27:06 -0000 Author: markj Date: Sun Feb 5 02:27:04 2017 New Revision: 313261 URL: https://svnweb.freebsd.org/changeset/base/313261 Log: Make witness_warn() always print to the console. witness_warn() either breaks into the debugger or panics the system, so its output should go to the console regardless of the witness(4) output channel configuration. MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/sys/kern/subr_witness.c Modified: head/sys/kern/subr_witness.c ============================================================================== --- head/sys/kern/subr_witness.c Sun Feb 5 01:40:27 2017 (r313260) +++ head/sys/kern/subr_witness.c Sun Feb 5 02:27:04 2017 (r313261) @@ -1732,15 +1732,14 @@ witness_warn(int flags, struct lock_obje continue; if (n == 0) { va_start(ap, fmt); - witness_voutput(fmt, ap); + vprintf(fmt, ap); va_end(ap); - witness_output( - " with the following %slocks held:\n", + printf(" with the following %slocks held:\n", (flags & WARN_SLEEPOK) != 0 ? "non-sleepable " : ""); } n++; - witness_list_lock(lock1, witness_output); + witness_list_lock(lock1, printf); } /* @@ -1765,11 +1764,11 @@ witness_warn(int flags, struct lock_obje return (0); va_start(ap, fmt); - witness_voutput(fmt, ap); + vprintf(fmt, ap); va_end(ap); - witness_output(" with the following %slocks held:\n", + printf(" with the following %slocks held:\n", (flags & WARN_SLEEPOK) != 0 ? "non-sleepable " : ""); - n += witness_list_locks(&lock_list, witness_output); + n += witness_list_locks(&lock_list, printf); } else sched_unpin(); if (flags & WARN_PANIC && n) From owner-svn-src-head@freebsd.org Sun Feb 5 02:39: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 E913ECD16B4; Sun, 5 Feb 2017 02:39:13 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3D419BC; Sun, 5 Feb 2017 02:39:13 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v152dCG8014512; Sun, 5 Feb 2017 02:39:12 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v152dCQk014506; Sun, 5 Feb 2017 02:39:12 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702050239.v152dCQk014506@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 5 Feb 2017 02:39:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313262 - in head: cddl/contrib/opensolaris/lib/libdtrace/common sys/cddl/contrib/opensolaris/uts/common/dtrace sys/cddl/contrib/opensolaris/uts/common/sys sys/cddl/dev/dtrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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, 05 Feb 2017 02:39:14 -0000 Author: markj Date: Sun Feb 5 02:39:12 2017 New Revision: 313262 URL: https://svnweb.freebsd.org/changeset/base/313262 Log: Use PC-relative relocations for USDT probe sites on i386 and amd64. When recording probe site addresses in the output DOF file, dtrace -G needs to emit relocations for the .SUNW_dof section in order to obtain the addresses of functions containing probe sites. DTrace expects the addresses to be relative to the base address of the final ELF file, and the amd64 USDT implementation was relying on some unspecified and incorrect behaviour in the base system GNU ld to achieve this. This change reimplements the probe site relocation handling to allow USDT to be used with lld and newer GNU binutils. Specifically, it makes use of R_X86_64_PC64/R_386_PC32 relocations to obtain the probe site address relative to the DOF file address, and adds and uses a new DOF relocation type which computes the final probe site address using these relative offsets. Reported by and discussed with: Rafael EspĂ­ndola MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D9374 Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.c head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h head/sys/cddl/dev/dtrace/dtrace_ioctl.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c Sun Feb 5 02:27:04 2017 (r313261) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c Sun Feb 5 02:39:12 2017 (r313262) @@ -462,18 +462,8 @@ dof_add_probe(dt_idhash_t *dhp, dt_ident dt_buf_write(dtp, &ddo->ddo_enoffs, pip->pi_enoffs, pip->pi_nenoffs * sizeof (uint32_t), sizeof (uint32_t)); - /* - * If pi_rname isn't set, the relocation will be against the - * function name. If it is, the relocation will be against - * pi_rname. This will be used if the function is scoped - * locally so an alternate symbol is added for the purpose - * of this relocation. - */ - if (pip->pi_rname == NULL) - dofr.dofr_name = dofpr.dofpr_func; - else - dofr.dofr_name = dof_add_string(ddo, pip->pi_rname); - dofr.dofr_type = DOF_RELO_SETX; + dofr.dofr_name = dof_add_string(ddo, pip->pi_rname); + dofr.dofr_type = DOF_RELO_DOFREL; dofr.dofr_offset = dt_buf_len(&ddo->ddo_probes); dofr.dofr_data = 0; Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Sun Feb 5 02:27:04 2017 (r313261) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Sun Feb 5 02:39:12 2017 (r313262) @@ -237,7 +237,7 @@ printf("%s:%s(%d): DOODAD\n",__FUNCTION_ rel->r_offset = s->dofs_offset + dofr[j].dofr_offset; rel->r_info = ELF32_R_INFO(count + dep->de_global, - R_386_32); + R_386_PC32); #elif defined(__mips__) /* XXX */ printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); @@ -253,15 +253,6 @@ printf("%s:%s(%d): DOODAD\n",__FUNCTION_ #elif defined(__riscv__) /* XXX */ printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); -#elif defined(__sparc) - /* - * Add 4 bytes to hit the low half of this 64-bit - * big-endian address. - */ - rel->r_offset = s->dofs_offset + - dofr[j].dofr_offset + 4; - rel->r_info = ELF32_R_INFO(count + dep->de_global, - R_SPARC_32); #else #error unknown ISA #endif @@ -270,7 +261,7 @@ printf("%s:%s(%d): DOODAD\n",__FUNCTION_ sym->st_value = 0; sym->st_size = 0; sym->st_info = ELF32_ST_INFO(STB_GLOBAL, STT_FUNC); - sym->st_other = 0; + sym->st_other = ELF32_ST_VISIBILITY(STV_HIDDEN); sym->st_shndx = SHN_UNDEF; rel++; @@ -287,11 +278,7 @@ printf("%s:%s(%d): DOODAD\n",__FUNCTION_ sym->st_value = 0; sym->st_size = dof->dofh_filesz; sym->st_info = ELF32_ST_INFO(STB_GLOBAL, STT_OBJECT); -#ifdef illumos - sym->st_other = 0; -#else sym->st_other = ELF32_ST_VISIBILITY(STV_HIDDEN); -#endif sym->st_shndx = ESHDR_DOF; sym++; @@ -448,18 +435,8 @@ prepare_elf64(dtrace_hdl_t *dtp, const d #elif defined(__i386) || defined(__amd64) rel->r_offset = s->dofs_offset + dofr[j].dofr_offset; -#ifdef illumos rel->r_info = ELF64_R_INFO(count + dep->de_global, - R_AMD64_64); -#else - rel->r_info = ELF64_R_INFO(count + dep->de_global, - R_X86_64_RELATIVE); -#endif -#elif defined(__sparc) - rel->r_offset = s->dofs_offset + - dofr[j].dofr_offset; - rel->r_info = ELF64_R_INFO(count + dep->de_global, - R_SPARC_64); + R_X86_64_PC64); #else #error unknown ISA #endif @@ -468,7 +445,7 @@ prepare_elf64(dtrace_hdl_t *dtp, const d sym->st_value = 0; sym->st_size = 0; sym->st_info = GELF_ST_INFO(STB_GLOBAL, STT_FUNC); - sym->st_other = 0; + sym->st_other = ELF64_ST_VISIBILITY(STV_HIDDEN); sym->st_shndx = SHN_UNDEF; rel++; @@ -485,11 +462,7 @@ prepare_elf64(dtrace_hdl_t *dtp, const d sym->st_value = 0; sym->st_size = dof->dofh_filesz; sym->st_info = GELF_ST_INFO(STB_GLOBAL, STT_OBJECT); -#ifdef illumos - sym->st_other = 0; -#else sym->st_other = ELF64_ST_VISIBILITY(STV_HIDDEN); -#endif sym->st_shndx = ESHDR_DOF; sym++; @@ -797,16 +770,15 @@ dump_elf64(dtrace_hdl_t *dtp, const dof_ } static int -dt_symtab_lookup(Elf_Data *data_sym, int nsym, uintptr_t addr, uint_t shn, - GElf_Sym *sym, int uses_funcdesc, Elf *elf) +dt_symtab_lookup(Elf_Data *data_sym, int start, int end, uintptr_t addr, + uint_t shn, GElf_Sym *sym, int uses_funcdesc, Elf *elf) { - int i, ret = -1; Elf64_Addr symval; Elf_Scn *opd_scn; Elf_Data *opd_desc; - GElf_Sym s; + int i; - for (i = 0; i < nsym && gelf_getsym(data_sym, i, sym) != NULL; i++) { + for (i = start; i < end && gelf_getsym(data_sym, i, sym) != NULL; i++) { if (GELF_ST_TYPE(sym->st_info) == STT_FUNC) { symval = sym->st_value; if (uses_funcdesc) { @@ -816,20 +788,12 @@ dt_symtab_lookup(Elf_Data *data_sym, int *(uint64_t*)((char *)opd_desc->d_buf + symval); } if ((uses_funcdesc || shn == sym->st_shndx) && - symval <= addr && - addr < symval + sym->st_size) { - if (GELF_ST_BIND(sym->st_info) == STB_GLOBAL) - return (0); - - ret = 0; - s = *sym; - } + symval <= addr && addr < symval + sym->st_size) + return (0); } } - if (ret == 0) - *sym = s; - return (ret); + return (-1); } #if defined(__aarch64__) @@ -1237,7 +1201,7 @@ process_obj(dtrace_hdl_t *dtp, const cha dt_provider_t *pvp; dt_probe_t *prp; uint32_t off, eclass, emachine1, emachine2; - size_t symsize, nsym, isym, istr, len; + size_t symsize, osym, nsym, isym, istr, len; key_t objkey; dt_link_pair_t *pair, *bufs = NULL; dt_strtab_t *strtab; @@ -1374,12 +1338,13 @@ process_obj(dtrace_hdl_t *dtp, const cha * target (text) section to replace the call instruction with * one or more nops. * - * If the function containing the probe is locally scoped - * (static), we create an alias used by the relocation in the - * generated object. The alias, a new symbol, will be global - * (so that the relocation from the generated object can be - * resolved), and hidden (so that it is converted to a local - * symbol at link time). Such aliases have this form: + * To avoid runtime overhead, the relocations added to the + * generated object should be resolved at static link time. We + * therefore create aliases for the functions that contain + * probes. An alias is global (so that the relocation from the + * generated object can be resolved), and hidden (so that its + * address is known at static link time). Such aliases have this + * form: * * $dtrace. * @@ -1417,16 +1382,13 @@ process_obj(dtrace_hdl_t *dtp, const cha if (strncmp(s, dt_prefix, sizeof (dt_prefix) - 1) != 0) continue; - if (dt_symtab_lookup(data_sym, isym, rela.r_offset, - shdr_rel.sh_info, &fsym, - (emachine1 == EM_PPC64), elf) != 0) { + if (dt_symtab_lookup(data_sym, 0, isym, rela.r_offset, + shdr_rel.sh_info, &fsym, (emachine1 == EM_PPC64), + elf) != 0) { dt_strtab_destroy(strtab); goto err; } - if (GELF_ST_BIND(fsym.st_info) != STB_LOCAL) - continue; - if (fsym.st_name > data_str->d_size) { dt_strtab_destroy(strtab); goto err; @@ -1462,12 +1424,12 @@ process_obj(dtrace_hdl_t *dtp, const cha } /* - * If needed, allocate the additional space for the symbol - * table and string table copying the old data into the new - * buffers, and marking the buffers as dirty. We inject those - * newly allocated buffers into the libelf data structures, but - * are still responsible for freeing them once we're done with - * the elf handle. + * If any probes were found, allocate the additional space for + * the symbol table and string table, copying the old data into + * the new buffers, and marking the buffers as dirty. We inject + * those newly allocated buffers into the libelf data + * structures, but are still responsible for freeing them once + * we're done with the elf handle. */ if (nsym > 0) { /* @@ -1516,9 +1478,11 @@ process_obj(dtrace_hdl_t *dtp, const cha shdr_sym.sh_size += nsym * symsize; (void) gelf_update_shdr(scn_sym, &shdr_sym); + osym = isym; nsym += isym; } else { dt_strtab_destroy(strtab); + continue; } /* @@ -1577,8 +1541,11 @@ process_obj(dtrace_hdl_t *dtp, const cha bcopy(s, pname, p - s); pname[p - s] = '\0'; - if (dt_symtab_lookup(data_sym, isym, rela.r_offset, - shdr_rel.sh_info, &fsym, + if (dt_symtab_lookup(data_sym, osym, isym, + rela.r_offset, shdr_rel.sh_info, &fsym, + (emachine1 == EM_PPC64), elf) != 0 && + dt_symtab_lookup(data_sym, 0, osym, + rela.r_offset, shdr_rel.sh_info, &fsym, (emachine1 == EM_PPC64), elf) != 0) goto err; @@ -1588,37 +1555,30 @@ process_obj(dtrace_hdl_t *dtp, const cha assert(GELF_ST_TYPE(fsym.st_info) == STT_FUNC); /* - * If a NULL relocation name is passed to - * dt_probe_define(), the function name is used for the - * relocation. The relocation needs to use a mangled - * name if the symbol is locally scoped; the function - * name may need to change if we've found the global - * alias for the locally scoped symbol (we prefer - * global symbols to locals in dt_symtab_lookup()). + * If this is our first time encountering this symbol, + * emit an alias. */ s = (char *)data_str->d_buf + fsym.st_name; - r = NULL; - if (GELF_ST_BIND(fsym.st_info) == STB_LOCAL) { + if (strncmp(s, dt_symprefix, + sizeof (dt_symprefix) - 1) != 0) { + u_int bind = GELF_ST_BIND(fsym.st_info); + dsym = fsym; dsym.st_name = istr; - dsym.st_info = GELF_ST_INFO(STB_GLOBAL, - STT_FUNC); - dsym.st_other = - ELF64_ST_VISIBILITY(STV_ELIMINATE); + dsym.st_info = GELF_ST_INFO(bind == STB_LOCAL ? + STB_GLOBAL : bind, STT_FUNC); + dsym.st_other = GELF_ST_VISIBILITY(STV_HIDDEN); (void) gelf_update_sym(data_sym, isym, &dsym); - - r = (char *)data_str->d_buf + istr; - istr += 1 + sprintf(r, dt_symfmt, - dt_symprefix, objkey, s); + r = (char *) data_str->d_buf + istr; + istr += 1 + sprintf(r, dt_symfmt, dt_symprefix, objkey, + s); isym++; assert(isym <= nsym); - - } else if (strncmp(s, dt_symprefix, - strlen(dt_symprefix)) == 0) { + } else { r = s; - if ((s = strchr(s, '.')) == NULL) - goto err; + s = strchr(s, '.'); + assert(s != NULL); s++; } Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.c Sun Feb 5 02:27:04 2017 (r313261) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.c Sun Feb 5 02:39:12 2017 (r313262) @@ -545,9 +545,7 @@ dt_probe_define(dt_provider_t *pvp, dt_p for (pip = prp->pr_inst; pip != NULL; pip = pip->pi_next) { if (strcmp(pip->pi_fname, fname) == 0 && - ((rname == NULL && pip->pi_rname == NULL) || - (rname != NULL && pip->pi_rname != NULL && - strcmp(pip->pi_rname, rname) == 0))) + strcmp(pip->pi_rname, rname) == 0) break; } @@ -565,7 +563,7 @@ dt_probe_define(dt_provider_t *pvp, dt_p if ((pip->pi_fname = strdup(fname)) == NULL) goto nomem; - if (rname != NULL && (pip->pi_rname = strdup(rname)) == NULL) + if ((pip->pi_rname = strdup(rname)) == NULL) goto nomem; pip->pi_noffs = 0; @@ -605,7 +603,7 @@ dt_probe_define(dt_provider_t *pvp, dt_p dt_dprintf("defined probe %s %s:%s %s() +0x%x (%s)\n", isenabled ? "(is-enabled)" : "", pvp->pv_desc.dtvd_name, prp->pr_ident->di_name, fname, offset, - rname != NULL ? rname : fname); + rname); assert(*noffs < *maxoffs); (*offs)[(*noffs)++] = offset; Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sun Feb 5 02:27:04 2017 (r313261) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sun Feb 5 02:39:12 2017 (r313262) @@ -13917,12 +13917,13 @@ err: /* * Apply the relocations from the specified 'sec' (a DOF_SECT_URELHDR) to the - * specified DOF. At present, this amounts to simply adding 'ubase' to the - * site of any user SETX relocations to account for load object base address. - * In the future, if we need other relocations, this function can be extended. + * specified DOF. SETX relocations are computed using 'ubase', the base load + * address of the object containing the DOF, and DOFREL relocations are relative + * to the relocation offset within the DOF. */ static int -dtrace_dof_relocate(dof_hdr_t *dof, dof_sec_t *sec, uint64_t ubase) +dtrace_dof_relocate(dof_hdr_t *dof, dof_sec_t *sec, uint64_t ubase, + uint64_t udaddr) { uintptr_t daddr = (uintptr_t)dof; dof_relohdr_t *dofr = @@ -13960,6 +13961,7 @@ dtrace_dof_relocate(dof_hdr_t *dof, dof_ case DOF_RELO_NONE: break; case DOF_RELO_SETX: + case DOF_RELO_DOFREL: if (r->dofr_offset >= ts->dofs_size || r->dofr_offset + sizeof (uint64_t) > ts->dofs_size) { dtrace_dof_error(dof, "bad relocation offset"); @@ -13971,7 +13973,11 @@ dtrace_dof_relocate(dof_hdr_t *dof, dof_ return (-1); } - *(uint64_t *)taddr += ubase; + if (r->dofr_type == DOF_RELO_SETX) + *(uint64_t *)taddr += ubase; + else + *(uint64_t *)taddr += + udaddr + ts->dofs_offset + r->dofr_offset; break; default: dtrace_dof_error(dof, "invalid relocation type"); @@ -13992,7 +13998,7 @@ dtrace_dof_relocate(dof_hdr_t *dof, dof_ */ static int dtrace_dof_slurp(dof_hdr_t *dof, dtrace_vstate_t *vstate, cred_t *cr, - dtrace_enabling_t **enabp, uint64_t ubase, int noprobes) + dtrace_enabling_t **enabp, uint64_t ubase, uint64_t udaddr, int noprobes) { uint64_t len = dof->dofh_loadsz, seclen; uintptr_t daddr = (uintptr_t)dof; @@ -14154,7 +14160,7 @@ dtrace_dof_slurp(dof_hdr_t *dof, dtrace_ switch (sec->dofs_type) { case DOF_SECT_URELHDR: - if (dtrace_dof_relocate(dof, sec, ubase) != 0) + if (dtrace_dof_relocate(dof, sec, ubase, udaddr) != 0) return (-1); break; } @@ -15519,7 +15525,7 @@ dtrace_anon_property(void) } rv = dtrace_dof_slurp(dof, &state->dts_vstate, CRED(), - &dtrace_anon.dta_enabling, 0, B_TRUE); + &dtrace_anon.dta_enabling, 0, 0, B_TRUE); if (rv == 0) rv = dtrace_dof_options(dof, state); @@ -16290,7 +16296,7 @@ dtrace_helper_slurp(dof_hdr_t *dof, dof_ vstate = &help->dthps_vstate; if ((rv = dtrace_dof_slurp(dof, vstate, NULL, &enab, dhp->dofhp_addr, - B_FALSE)) != 0) { + dhp->dofhp_dof, B_FALSE)) != 0) { dtrace_dof_destroy(dof); return (rv); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Sun Feb 5 02:27:04 2017 (r313261) +++ head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Sun Feb 5 02:39:12 2017 (r313262) @@ -784,6 +784,7 @@ typedef struct dof_relodesc { #define DOF_RELO_NONE 0 /* empty relocation entry */ #define DOF_RELO_SETX 1 /* relocate setx value */ +#define DOF_RELO_DOFREL 2 /* relocate DOF-relative value */ typedef struct dof_optdesc { uint32_t dofo_option; /* option identifier */ Modified: head/sys/cddl/dev/dtrace/dtrace_ioctl.c ============================================================================== --- head/sys/cddl/dev/dtrace/dtrace_ioctl.c Sun Feb 5 02:27:04 2017 (r313261) +++ head/sys/cddl/dev/dtrace/dtrace_ioctl.c Sun Feb 5 02:39:12 2017 (r313262) @@ -429,7 +429,8 @@ dtrace_ioctl(struct cdev *dev, u_long cm return (EBUSY); } - if (dtrace_dof_slurp(dof, vstate, td->td_ucred, &enab, 0, B_TRUE) != 0) { + if (dtrace_dof_slurp(dof, vstate, td->td_ucred, &enab, 0, 0, + B_TRUE) != 0) { mutex_exit(&dtrace_lock); mutex_exit(&cpu_lock); dtrace_dof_destroy(dof); From owner-svn-src-head@freebsd.org Sun Feb 5 02:44: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 CF8F0CD1884; Sun, 5 Feb 2017 02:44:09 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 81F44E3A; Sun, 5 Feb 2017 02:44:09 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v152i8L9018235; Sun, 5 Feb 2017 02:44:08 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v152i8QW018234; Sun, 5 Feb 2017 02:44:08 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702050244.v152i8QW018234@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 5 Feb 2017 02:44:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313263 - head/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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, 05 Feb 2017 02:44:09 -0000 Author: markj Date: Sun Feb 5 02:44:08 2017 New Revision: 313263 URL: https://svnweb.freebsd.org/changeset/base/313263 Log: Fix a double free of libelf data buffers in the USDT link code. libdtrace needs to append to the input object files' string and symbol tables. Currently it does so by allocating a larger buffer, copying the existing sections into them, and swapping pointers in the libelf data descriptors. However, it also frees those buffers when its processing is complete, which leads to a double free since the elftoolchain libelf owns them and also frees them in elf_end(3). Instead, free the buffers originally allocated by libelf. MFC after: 2 weeks Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Sun Feb 5 02:39:12 2017 (r313262) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Sun Feb 5 02:44:08 2017 (r313263) @@ -1205,6 +1205,7 @@ process_obj(dtrace_hdl_t *dtp, const cha key_t objkey; dt_link_pair_t *pair, *bufs = NULL; dt_strtab_t *strtab; + void *tmp; if ((fd = open64(obj, O_RDWR)) == -1) { return (dt_link_error(dtp, elf, fd, bufs, @@ -1463,7 +1464,9 @@ process_obj(dtrace_hdl_t *dtp, const cha bufs = pair; bcopy(data_str->d_buf, pair->dlp_str, data_str->d_size); + tmp = data_str->d_buf; data_str->d_buf = pair->dlp_str; + pair->dlp_str = tmp; data_str->d_size += len; (void) elf_flagdata(data_str, ELF_C_SET, ELF_F_DIRTY); @@ -1471,7 +1474,9 @@ process_obj(dtrace_hdl_t *dtp, const cha (void) gelf_update_shdr(scn_str, &shdr_str); bcopy(data_sym->d_buf, pair->dlp_sym, data_sym->d_size); + tmp = data_sym->d_buf; data_sym->d_buf = pair->dlp_sym; + pair->dlp_sym = tmp; data_sym->d_size += nsym * symsize; (void) elf_flagdata(data_sym, ELF_C_SET, ELF_F_DIRTY); @@ -1657,9 +1662,6 @@ process_obj(dtrace_hdl_t *dtp, const cha (void) elf_end(elf); (void) close(fd); -#ifndef illumos - if (nsym > 0) -#endif while ((pair = bufs) != NULL) { bufs = pair->dlp_next; dt_free(dtp, pair->dlp_str); From owner-svn-src-head@freebsd.org Sun Feb 5 02:44: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 8FD42CD18D9; Sun, 5 Feb 2017 02:44:49 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C87BF7C; Sun, 5 Feb 2017 02:44:49 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v152im7k018301; Sun, 5 Feb 2017 02:44:48 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v152imc7018300; Sun, 5 Feb 2017 02:44:48 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702050244.v152imc7018300@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 5 Feb 2017 02:44:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313264 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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, 05 Feb 2017 02:44:49 -0000 Author: markj Date: Sun Feb 5 02:44:48 2017 New Revision: 313264 URL: https://svnweb.freebsd.org/changeset/base/313264 Log: Avoid using Sun compiler-specific flags. MFC after: 1 week Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.enabled2.ksh Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.enabled2.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.enabled2.ksh Sun Feb 5 02:44:08 2017 (r313263) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.enabled2.ksh Sun Feb 5 02:44:48 2017 (r313264) @@ -77,7 +77,7 @@ main(int argc, char **argv) } EOF -cc -c -xO2 test.c +cc -c -O2 test.c if [ $? -ne 0 ]; then print -u2 "failed to compile test.c" exit 1 From owner-svn-src-head@freebsd.org Sun Feb 5 02:45: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 A1F7DCD1945; Sun, 5 Feb 2017 02:45:36 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7102910EA; Sun, 5 Feb 2017 02:45:36 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v152jZU9018382; Sun, 5 Feb 2017 02:45:35 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v152jZ8u018381; Sun, 5 Feb 2017 02:45:35 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702050245.v152jZ8u018381@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 5 Feb 2017 02:45:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313265 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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, 05 Feb 2017 02:45:36 -0000 Author: markj Date: Sun Feb 5 02:45:35 2017 New Revision: 313265 URL: https://svnweb.freebsd.org/changeset/base/313265 Log: Search for _DTRACE_VERSION in sys/sdt.h rather than unistd.h. MFC after: 1 week Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.include.ksh Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.include.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.include.ksh Sun Feb 5 02:44:48 2017 (r313264) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.include.ksh Sun Feb 5 02:45:35 2017 (r313265) @@ -25,7 +25,7 @@ # # ident "%Z%%M% %I% %E% SMI" -# Make sure defines _DTRACE_VERSION +# Make sure defines _DTRACE_VERSION DIR=/var/tmp/dtest.$$ @@ -33,7 +33,7 @@ mkdir $DIR cd $DIR cat > test.c < +#include int main(int argc, char **argv) @@ -46,7 +46,7 @@ main(int argc, char **argv) } EOF -cc -xarch=generic -o test test.c +cc -o test test.c if [ $? -ne 0 ]; then print -u2 "failed to compile test.c" exit 1 From owner-svn-src-head@freebsd.org Sun Feb 5 02:46: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 4D2EFCD19B1; Sun, 5 Feb 2017 02:46:23 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x242.google.com (mail-pf0-x242.google.com [IPv6:2607:f8b0:400e:c00::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 199BE1277; Sun, 5 Feb 2017 02:46:23 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x242.google.com with SMTP id e4so4313112pfg.0; Sat, 04 Feb 2017 18:46:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=qstsLE0OEOSucKRdZ/HKDVZ3nrDAbZtPaiKhPCOIpqs=; b=ZevhOQiQNtQviPhNlRnjfBsl4XfAGBL5fmoJeLwbRjngdx8+rUjbd5daXA+aAw/03E MIEXwtlUuBk7M73Z3FYC2KUXVz6xVtqzQNZN8aJ/OTIiZcxzz0xtwMLklUzJohXQv1To 2vyt+moJ8zIpt92cPZJkbXgcFzsK73vSaCBGjqYhnkZoSuy7uquY+M6jbF4zuLjLClmY /TL18nu07s9XMAg0gtCDqWVHtAlKV4d6lsXM1woW+Kdo4nyZwFxzkoUJSwcvnpzsBQUx T3dUyzcXt1oIKBDrkaX96vrHRwppiFh7lvJfgscg3tj6naR5nVS0bDuGlGjovAeHXjix fQug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=qstsLE0OEOSucKRdZ/HKDVZ3nrDAbZtPaiKhPCOIpqs=; b=MJuX7wb5CKW/daH9X3hvrUKUqwaRu/7rL5CmDktuIJSIa7tMSDxdlblzsfF6iXofQr CEMm9vPYO/ymO9KSkfhkPycgtr9kapAPMGzxs/bbSD9WA037qUMuMWw0slI5JNu/jFPa JFbQbNAkmHVPJr+J64VPzMq15WIFpaoS61EULFmYFjiKQzPIzIrA+RTtRpNMPBzPzxbG W4B5IacxHC4Fkk79Kw92o46dA324Kur0Plqna9Zweoz4QFQyAoJU9hk9JpbvorLUMzOf fCyCao4KcVo2z3m3iFIv18FLyutG8KtOFFS4mcDRpl1ZNOMvV/+rlPoAlR6l37pqjsYp kQJg== X-Gm-Message-State: AIkVDXIpFJeuV3rImPuKtuN8vqxTjeGzGKxZC4/9eQbdlFS0adzVpIRIeXs8Tk8P5BBq6A== X-Received: by 10.99.66.193 with SMTP id p184mr5804137pga.213.1486262782651; Sat, 04 Feb 2017 18:46:22 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id y6sm78736533pgc.1.2017.02.04.18.46.21 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 04 Feb 2017 18:46:22 -0800 (PST) Subject: Re: svn commit: r313260 - head/sys/kern Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_1CF7A619-F4AE-498A-8F1A-07565308AB52"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <42c790bb-df12-2a50-6181-24bac5c72d34@multiplay.co.uk> Date: Sat, 4 Feb 2017 18:46:25 -0800 Cc: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <978681FD-1FB2-4E5A-BBBF-43F3176DFE2B@gmail.com> References: <201702050140.v151eRXX090326@repo.freebsd.org> <42c790bb-df12-2a50-6181-24bac5c72d34@multiplay.co.uk> To: Steven Hartland X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-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, 05 Feb 2017 02:46:23 -0000 --Apple-Mail=_1CF7A619-F4AE-498A-8F1A-07565308AB52 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Feb 4, 2017, at 18:16, Steven Hartland = wrote: >=20 > Hi Mateusz could you improve on the commit message as it currently = describes what is changed, which can be obtained from the diff, but not = why? >=20 > I hope on one feels like I'm trying to teach them to suck eggs, as I = know everyone here has a wealth of experience, but I strongly believe = commit messages are a very important way of improving the overall = quality of the code base by sharing with others the reason for changes, = which they can then learn from. I know I for one love picking up new = nuggets of knowledge from others in this way. >=20 > Also I believe this is area the project as a whole can improve on, so = I don't mean to single out anyone here. >=20 > Anyway I hope people find this useful: >=20 > When I write a commit message I try to stick to the following rules = which I believe helps to bring clarity for others about my actions. > 1. First line is a brief summary of the out come of the change e.g. > Fixed compiler warnings in nvmecontrol on 32bit platforms > 2. Follow up paragraphs expand on #1 if needed including details about = not just what but why the change was made e.g. > Use ssize_t instead of uint32_t to prevent warnings about a comparison = with different signs. Due to the promotion rules, this would only = happen on 32-bit platforms. > 3. When writing #2 include details that would not be obvious to = non-experts in the particular area. >=20 > #2 and #3 are really important to sharing knowledge that others may = not know, its quite relevant to this commit msg, as while it may be = obvious to you and others familiar with the atomic ops, to the rest of = us we're just wondering why make this change? >=20 > N.B. The example is based on Warner's recent commit purely as an = example, which had a good why, just missing the brief summary. >=20 > While on this subject are there any official guidelines to writing = commit messages, if no should we create some? Please. It really irritates me when I find similar commit = messages at $work from people that don=E2=80=99t describe the rationale = for the commit =E2=80=94 especially when I need to assess the risk = (backport needed, testing required, etc). Thanks! -Ngie --Apple-Mail=_1CF7A619-F4AE-498A-8F1A-07565308AB52 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYlpIBAAoJEPWDqSZpMIYV3HgP/3K80/KkQz9/Rhs4RdAbuYFb sFlOA1dE1enj07CkpG5cgz1iJYiBxZC09pL5cC1BLyzrJrcDNT9h4OEQY2hjg0NH 7mJdeBFpvnbP1qQazuhM3jO/Ww/GdVXmGlGpaTR17WzljVzIpjoe1B//f1HhQkLu GKVOgXolxvYYD8tMfUoGMXTJbd1KLwAKZLPAc4d59wBRrPpwDw5btAtIfZC9lJJ0 dH54RrjRFDfcTmAPTrdUuUNaqO6QCFPwlcKFWeO8MlFJicovAPqhTJJfUTJ1+4hF X8gQE9o65DZBd/RiY/y80MVHtqUIzbjzNwhEafRHsJXMPuY5LOV9roXHiGm/VMQw Wt57ROiDZqXoY02djIlOKQe3Ux5TqlB5kVfTGU6UXQ7kqUXYI19S76nEiU4aONS4 74KKiklzvVaAJlcF8RmI0RRQp3Cyqy1VIl+J09i/I7HycW+7ry6kcsSfMcIdGNKy Z6iRu+RkIZAOaHHNNQ3egQW0wgo2WUoPODg98eE+0XGRSWVr4KsbqvGm6O1KBPEl o/vFE7lqbchXeykNm1iZNZwJYwZB1ioXDxWE0Aw3oQ5bpFnbiF6yj52PjatLLzwl xHGkMRyUpy4W0O6XLYR+RZAXg1K/rzZvAmblAG7dLItz7EXGdZOK08spb5ESRv6K 1VWAyPOv3SoG2b1EHiM7 =6wLj -----END PGP SIGNATURE----- --Apple-Mail=_1CF7A619-F4AE-498A-8F1A-07565308AB52-- From owner-svn-src-head@freebsd.org Sun Feb 5 02:47: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 91310CD1A29; Sun, 5 Feb 2017 02:47:35 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60A3313F0; Sun, 5 Feb 2017 02:47:35 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v152lYhc018496; Sun, 5 Feb 2017 02:47:34 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v152lYkC018495; Sun, 5 Feb 2017 02:47:34 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702050247.v152lYkC018495@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 5 Feb 2017 02:47:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313266 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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, 05 Feb 2017 02:47:35 -0000 Author: markj Date: Sun Feb 5 02:47:34 2017 New Revision: 313266 URL: https://svnweb.freebsd.org/changeset/base/313266 Log: Ensure that the DOF string length is divisible by 2. It is an ASCII encoding of a hexadecimal representation of the DOF file used to enable anonymous tracing, so its length should always be even. MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sun Feb 5 02:45:35 2017 (r313265) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sun Feb 5 02:47:34 2017 (r313266) @@ -13346,8 +13346,11 @@ dtrace_dof_property(const char *name) data += strlen(name) + 1; /* skip past the '=' */ len = eol - data; + if (len % 2 != 0) { + dtrace_dof_error(NULL, "invalid DOF encoding length"); + goto doferr; + } bytes = len / 2; - if (bytes < sizeof(dof_hdr_t)) { dtrace_dof_error(NULL, "truncated header"); goto doferr; From owner-svn-src-head@freebsd.org Sun Feb 5 03:00: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 B436DCD1C80; Sun, 5 Feb 2017 03:00:11 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 476D81AD4; Sun, 5 Feb 2017 03:00:11 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm0-x244.google.com with SMTP id r18so13979442wmd.3; Sat, 04 Feb 2017 19:00:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ydfKFIlnDAYHEuo0/eMD7YTKgawVvcK8KMjMgSQrr/s=; b=HED5PXgv9uAyKpmqi2Lp054dM1KAkwM+MrfFfQeVAD2iIJm+kaaivOBESn3RYAc1wq FacYgQVMTladLaKJ7YHnNJFTFthya28JHzFMKX7baZV4vNWr2ZCIAbAP8OMLMCa6FhI6 fNASazcVMTabdkKtCkgOiOqHU294UG7fFjuiUsZ8iRyAnnN5FKF8ivPiMlg5lKaz77it J83QFSb/W0iyrVoWNRpKK5AvNhCuvgGczq5ja3VNV983gHn6TVPVP0o9Jj3L29h6FzJZ hfHkWewbMmLivekeNOL0FqeYp5TDym5fCHmpewWtCzCU0noED0K15pfwKU3pSYG5Nj7p IlJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ydfKFIlnDAYHEuo0/eMD7YTKgawVvcK8KMjMgSQrr/s=; b=Fu+UjMl1uBYZNC/oixmWQcu6MGLu1tIbsOApQQBs/cupFlq3lu56f5j5R69uNl21GP M/ZF2vrVje5QQM+3u1dk2SecShNJqf1wDJmbPq/0aLqAiaEGh4FVWeb77DLfOr7z+dt8 M+vUxE/gm/cSOTWE0lvArURzNcQ2AtQ+OuNowBFNk4weCYS9X4VV8spAyUm+MH7rniRO K0KOhrSVyoeCE8hJuRjlLefRWZmlujWB/aCrxlrwyYaYJJmgCTogp+FdMY/tRH7SG2CY HxDo16+Y95T+j+BD90boYbgWzebglw4WE9dpe7OHZI0SGqf0eRITArQ4MwRM3ovlD4AZ Tlpw== X-Gm-Message-State: AMke39nPxDMqR1v92AbCWhVnVde2gOmqEo+/PXMYmIbjpqR/OpMmqHyZSgtPi49iWEM6jA== X-Received: by 10.28.147.147 with SMTP id v141mr4069813wmd.110.1486263609634; Sat, 04 Feb 2017 19:00:09 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by smtp.gmail.com with ESMTPSA id h3sm53139778wrb.31.2017.02.04.19.00.08 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Sat, 04 Feb 2017 19:00:09 -0800 (PST) Date: Sun, 5 Feb 2017 04:00:06 +0100 From: Mateusz Guzik To: Steven Hartland Cc: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313260 - head/sys/kern Message-ID: <20170205030006.GB4375@dft-labs.eu> References: <201702050140.v151eRXX090326@repo.freebsd.org> <42c790bb-df12-2a50-6181-24bac5c72d34@multiplay.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <42c790bb-df12-2a50-6181-24bac5c72d34@multiplay.co.uk> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-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, 05 Feb 2017 03:00:11 -0000 On Sun, Feb 05, 2017 at 02:16:12AM +0000, Steven Hartland wrote: > Hi Mateusz could you improve on the commit message as it currently > describes what is changed, which can be obtained from the diff, but > not why? > > I hope on one feels like I'm trying to teach them to suck eggs, as I > know everyone here has a wealth of experience, but I strongly believe > commit messages are a very important way of improving the overall > quality of the code base by sharing with others the reason for > changes, which they can then learn from. I know I for one love > picking up new nuggets of knowledge from others in this way. > In general I agree that commit messages should be descriptive (see below), but I also think there are things which are somewhat self-explanatory and if someone is unfamiliar with given concept, they can always ask and/or find it documented elsewhere. For instance, plugging an unused variable, a memory leak, doing a lockless check first etc. are all pretty standard and unless there is something unusual going on (e.g. complicated circumstances leading to a leak) there is not much to explain. In particular, I don't see why anyone would explain why leaks are bad on each commit plugging one. In the same spirit, the switch to fcmpset should be a routine change. Interested parties can check the man page and the commit message which introduced it. Arguably I should have elaborated more in there. The gist is as follows: there are plenty of cases where the kernel wants to atomically replace the value of a particular variable. Sometimes, like in this commit, we want to bump the counter by 1, but only if the current value is not 0. For that we need to read the value, see if it is 0 and if not, try to replace what we read with what we read + 1. We cannot just increment as the value could have changed to 0 in the meantime. But this also means that multiple cpus doing the same operation on the same variable will trip on each other - one will succeed while the rest will have to retry. Prior to this commit, each retry attempt would explicitly re-read the value. This induces cache coherency traffic slowing everyone down. amd64 has the nice property of giving us the value it found eleminating the need to explicitly re-read it. There is similar story on i386 and sparc. Other architectures may also benefit from this, but that I did not benchmark. In short under contention atomic_fcmpset is going to be faster than atomic_cmpset. I did not benchmark this particular change, but a switch of the sort easily gives 10%+ in microbenchmarks on amd64. That said, while one can argue this optimizes the code, it really depessimizes it as something of the sort should have been already employed. Parties interested in scalability problems (and cpu caches in particular) are encouraged to read: https://www.kernel.org/pub/linux/kernel/people/paulmck/perfbook/perfbook.html > Also I believe this is area the project as a whole can improve on, so > I don't mean to single out anyone here. > > Anyway I hope people find this useful: > > When I write a commit message I try to stick to the following rules > which I believe helps to bring clarity for others about my actions. > 1. First line is a brief summary of the out come of the change e.g. > Fixed compiler warnings in nvmecontrol on 32bit platforms This should be mandatory in the form of one sentence, preferably prefixed with a keyword. So in particular I would phrase this one as: nvme: fix compiler warnings in nvmecontrol on 32bit platforms or so > 2. Follow up paragraphs expand on #1 if needed including details > about not just what but why the change was made e.g. > Use ssize_t instead of uint32_t to prevent warnings about a > comparison with different signs. Due to the promotion rules, this > would only happen on 32-bit platforms. See above. Unclear how much explanation is needed. While a safe default would be to always elaborate, I don't think it is necessary in all cases. Things which do need elaborated commit messages is algorithm changes, bug fixes (unless the bug is trivial), > 3. When writing #2 include details that would not be obvious to > non-experts in the particular area. > > #2 and #3 are really important to sharing knowledge that others may > not know, its quite relevant to this commit msg, as while it may be > obvious to you and others familiar with the atomic ops, to the rest > of us we're just wondering why make this change? > Well, while I don't have the best track record with commit messages, I do believe I elaborate enough when it is needed, which I think is rare. see https://svnweb.freebsd.org/base?view=revision&revision=306608 or https://svnweb.freebsd.org/base?view=revision&revision=303643 or https://svnweb.freebsd.org/base?view=revision&revision=295233 for examples Other than that I think my changes are straightforward (and sometimes weirdly buggy :/). tl;dr I think my commit message here was perfectly fine > N.B. The example is based on Warner's recent commit purely as an > example, which had a good why, just missing the brief summary. > > While on this subject are there any official guidelines to writing > commit messages, if no should we create some? > I'm unaware of any. > On 05/02/2017 01:40, Mateusz Guzik wrote: > >Author: mjg > >Date: Sun Feb 5 01:40:27 2017 > >New Revision: 313260 > >URL: https://svnweb.freebsd.org/changeset/base/313260 > > > >Log: > > fd: switch fget_unlocked to atomic_fcmpset > > > >Modified: > > head/sys/kern/kern_descrip.c > > > >Modified: head/sys/kern/kern_descrip.c > >============================================================================== > >--- head/sys/kern/kern_descrip.c Sun Feb 5 01:20:39 2017 (r313259) > >+++ head/sys/kern/kern_descrip.c Sun Feb 5 01:40:27 2017 (r313260) > >@@ -2569,8 +2569,8 @@ fget_unlocked(struct filedesc *fdp, int > > if (error != 0) > > return (error); > > #endif > >- retry: > > count = fp->f_count; > >+ retry: > > if (count == 0) { > > /* > > * Force a reload. Other thread could reallocate the > >@@ -2584,7 +2584,7 @@ fget_unlocked(struct filedesc *fdp, int > > * Use an acquire barrier to force re-reading of fdt so it is > > * refreshed for verification. > > */ > >- if (atomic_cmpset_acq_int(&fp->f_count, count, count + 1) == 0) > >+ if (atomic_fcmpset_acq_int(&fp->f_count, &count, count + 1) == 0) > > goto retry; > > fdt = fdp->fd_files; > > #ifdef CAPABILITIES > > > -- Mateusz Guzik From owner-svn-src-head@freebsd.org Sun Feb 5 03:23: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 A5C3BCD16F1; Sun, 5 Feb 2017 03:23:17 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75A0B102B; Sun, 5 Feb 2017 03:23:17 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v153NG1k035134; Sun, 5 Feb 2017 03:23:16 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v153NGMP035133; Sun, 5 Feb 2017 03:23:16 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702050323.v153NGMP035133@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 5 Feb 2017 03:23:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313268 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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, 05 Feb 2017 03:23:17 -0000 Author: mjg Date: Sun Feb 5 03:23:16 2017 New Revision: 313268 URL: https://svnweb.freebsd.org/changeset/base/313268 Log: vfs: use atomic_fcmpset in vfs_refcount_* Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sun Feb 5 02:49:42 2017 (r313267) +++ head/sys/kern/vfs_subr.c Sun Feb 5 03:23:16 2017 (r313268) @@ -2461,11 +2461,11 @@ vfs_refcount_acquire_if_not_zero(volatil { u_int old; + old = *count; for (;;) { - old = *count; if (old == 0) return (0); - if (atomic_cmpset_int(count, old, old + 1)) + if (atomic_fcmpset_int(count, &old, old + 1)) return (1); } } @@ -2475,11 +2475,11 @@ vfs_refcount_release_if_not_last(volatil { u_int old; + old = *count; for (;;) { - old = *count; if (old == 1) return (0); - if (atomic_cmpset_int(count, old, old - 1)) + if (atomic_fcmpset_int(count, &old, old - 1)) return (1); } } From owner-svn-src-head@freebsd.org Sun Feb 5 03:26: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 0BB81CD17EE; Sun, 5 Feb 2017 03:26:36 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D7E1D1224; Sun, 5 Feb 2017 03:26:35 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v153QY9m035292; Sun, 5 Feb 2017 03:26:34 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v153QYhP035290; Sun, 5 Feb 2017 03:26:34 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702050326.v153QYhP035290@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 5 Feb 2017 03:26:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313269 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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, 05 Feb 2017 03:26:36 -0000 Author: mjg Date: Sun Feb 5 03:26:34 2017 New Revision: 313269 URL: https://svnweb.freebsd.org/changeset/base/313269 Log: mtx: switch to fcmpset The found value is passed to locking routines in order to reduce cacheline accesses. mtx_unlock grows an explicit check for regular unlock. On ll/sc architectures the routine can fail even if the lock could have been handled by the inline primitive. Discussed with: jhb Tested by: pho (previous version) Modified: head/sys/kern/kern_mutex.c head/sys/sys/mutex.h Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Sun Feb 5 03:23:16 2017 (r313268) +++ head/sys/kern/kern_mutex.c Sun Feb 5 03:26:34 2017 (r313269) @@ -455,12 +455,11 @@ _mtx_trylock_flags_(volatile uintptr_t * * sleep waiting for it), or if we need to recurse on it. */ void -__mtx_lock_sleep(volatile uintptr_t *c, uintptr_t tid, int opts, +__mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v, uintptr_t tid, int opts, const char *file, int line) { struct mtx *m; struct turnstile *ts; - uintptr_t v; #ifdef ADAPTIVE_MUTEXES volatile struct thread *owner; #endif @@ -489,7 +488,6 @@ __mtx_lock_sleep(volatile uintptr_t *c, lock_delay_arg_init(&lda, NULL); #endif m = mtxlock2mtx(c); - v = MTX_READ_VALUE(m); if (__predict_false(lv_mtx_owner(v) == (struct thread *)tid)) { KASSERT((m->lock_object.lo_flags & LO_RECURSABLE) != 0 || @@ -520,9 +518,8 @@ __mtx_lock_sleep(volatile uintptr_t *c, for (;;) { if (v == MTX_UNOWNED) { - if (_mtx_obtain_lock(m, tid)) + if (_mtx_obtain_lock_fetch(m, &v, tid)) break; - v = MTX_READ_VALUE(m); continue; } #ifdef KDTRACE_HOOKS @@ -674,12 +671,11 @@ _mtx_lock_spin_failed(struct mtx *m) * is handled inline. */ void -_mtx_lock_spin_cookie(volatile uintptr_t *c, uintptr_t tid, int opts, - const char *file, int line) +_mtx_lock_spin_cookie(volatile uintptr_t *c, uintptr_t v, uintptr_t tid, + int opts, const char *file, int line) { struct mtx *m; struct lock_delay_arg lda; - uintptr_t v; #ifdef LOCK_PROFILING int contested = 0; uint64_t waittime = 0; @@ -706,12 +702,10 @@ _mtx_lock_spin_cookie(volatile uintptr_t #ifdef KDTRACE_HOOKS spin_time -= lockstat_nsecs(&m->lock_object); #endif - v = MTX_READ_VALUE(m); for (;;) { if (v == MTX_UNOWNED) { - if (_mtx_obtain_lock(m, tid)) + if (_mtx_obtain_lock_fetch(m, &v, tid)) break; - v = MTX_READ_VALUE(m); continue; } /* Give interrupts a chance while we spin. */ @@ -796,14 +790,11 @@ retry: m->lock_object.lo_name, file, line)); WITNESS_CHECKORDER(&m->lock_object, opts | LOP_NEWORDER | LOP_EXCLUSIVE, file, line, NULL); - v = MTX_READ_VALUE(m); for (;;) { - if (v == MTX_UNOWNED) { - if (_mtx_obtain_lock(m, tid)) - break; - v = MTX_READ_VALUE(m); + if (_mtx_obtain_lock_fetch(m, &v, tid)) + break; + if (v == MTX_UNOWNED) continue; - } if (v == tid) { m->mtx_recurse++; break; @@ -896,11 +887,18 @@ __mtx_unlock_sleep(volatile uintptr_t *c { struct mtx *m; struct turnstile *ts; + uintptr_t v; if (SCHEDULER_STOPPED()) return; m = mtxlock2mtx(c); + v = MTX_READ_VALUE(m); + + if (v == (uintptr_t)curthread) { + if (_mtx_release_lock(m, (uintptr_t)curthread)) + return; + } if (mtx_recursed(m)) { if (--(m->mtx_recurse) == 0) Modified: head/sys/sys/mutex.h ============================================================================== --- head/sys/sys/mutex.h Sun Feb 5 03:23:16 2017 (r313268) +++ head/sys/sys/mutex.h Sun Feb 5 03:26:34 2017 (r313269) @@ -98,13 +98,13 @@ void mtx_sysinit(void *arg); int _mtx_trylock_flags_(volatile uintptr_t *c, int opts, const char *file, int line); void mutex_init(void); -void __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t tid, int opts, - const char *file, int line); +void __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v, uintptr_t tid, + int opts, const char *file, int line); void __mtx_unlock_sleep(volatile uintptr_t *c, int opts, const char *file, int line); #ifdef SMP -void _mtx_lock_spin_cookie(volatile uintptr_t *c, uintptr_t tid, int opts, - const char *file, int line); +void _mtx_lock_spin_cookie(volatile uintptr_t *c, uintptr_t v, uintptr_t tid, + int opts, const char *file, int line); #endif void __mtx_lock_flags(volatile uintptr_t *c, int opts, const char *file, int line); @@ -140,13 +140,13 @@ void thread_lock_flags_(struct thread *, _mtx_destroy(&(m)->mtx_lock) #define mtx_trylock_flags_(m, o, f, l) \ _mtx_trylock_flags_(&(m)->mtx_lock, o, f, l) -#define _mtx_lock_sleep(m, t, o, f, l) \ - __mtx_lock_sleep(&(m)->mtx_lock, t, o, f, l) +#define _mtx_lock_sleep(m, v, t, o, f, l) \ + __mtx_lock_sleep(&(m)->mtx_lock, v, t, o, f, l) #define _mtx_unlock_sleep(m, o, f, l) \ __mtx_unlock_sleep(&(m)->mtx_lock, o, f, l) #ifdef SMP -#define _mtx_lock_spin(m, t, o, f, l) \ - _mtx_lock_spin_cookie(&(m)->mtx_lock, t, o, f, l) +#define _mtx_lock_spin(m, v, t, o, f, l) \ + _mtx_lock_spin_cookie(&(m)->mtx_lock, v, t, o, f, l) #endif #define _mtx_lock_flags(m, o, f, l) \ __mtx_lock_flags(&(m)->mtx_lock, o, f, l) @@ -171,6 +171,11 @@ void thread_lock_flags_(struct thread *, #define _mtx_obtain_lock(mp, tid) \ atomic_cmpset_acq_ptr(&(mp)->mtx_lock, MTX_UNOWNED, (tid)) +#define _mtx_obtain_lock_fetch(mp, vp, tid) ({ \ + *vp = MTX_UNOWNED; \ + atomic_fcmpset_rel_ptr(&(mp)->mtx_lock, vp, (tid)); \ +}) + /* Try to release mtx_lock if it is unrecursed and uncontested. */ #define _mtx_release_lock(mp, tid) \ atomic_cmpset_rel_ptr(&(mp)->mtx_lock, (tid), MTX_UNOWNED) @@ -188,9 +193,10 @@ void thread_lock_flags_(struct thread *, /* Lock a normal mutex. */ #define __mtx_lock(mp, tid, opts, file, line) do { \ uintptr_t _tid = (uintptr_t)(tid); \ + uintptr_t _v; \ \ - if (((mp)->mtx_lock != MTX_UNOWNED || !_mtx_obtain_lock((mp), _tid)))\ - _mtx_lock_sleep((mp), _tid, (opts), (file), (line)); \ + if (!_mtx_obtain_lock_fetch((mp), &_v, _tid)) \ + _mtx_lock_sleep((mp), _v, _tid, (opts), (file), (line));\ else \ LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(adaptive__acquire, \ mp, 0, 0, file, line); \ @@ -205,13 +211,14 @@ void thread_lock_flags_(struct thread *, #ifdef SMP #define __mtx_lock_spin(mp, tid, opts, file, line) do { \ uintptr_t _tid = (uintptr_t)(tid); \ + uintptr_t _v; \ \ spinlock_enter(); \ - if (((mp)->mtx_lock != MTX_UNOWNED || !_mtx_obtain_lock((mp), _tid))) {\ - if ((mp)->mtx_lock == _tid) \ + if (!_mtx_obtain_lock_fetch((mp), &_v, _tid)) { \ + if (_v == _tid) \ (mp)->mtx_recurse++; \ else \ - _mtx_lock_spin((mp), _tid, (opts), (file), (line)); \ + _mtx_lock_spin((mp), _v, _tid, (opts), (file), (line));\ } else \ LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(spin__acquire, \ mp, 0, 0, file, line); \ @@ -265,7 +272,7 @@ void thread_lock_flags_(struct thread *, \ if ((mp)->mtx_recurse == 0) \ LOCKSTAT_PROFILE_RELEASE_LOCK(adaptive__release, mp); \ - if ((mp)->mtx_lock != _tid || !_mtx_release_lock((mp), _tid)) \ + if (!_mtx_release_lock((mp), _tid)) \ _mtx_unlock_sleep((mp), (opts), (file), (line)); \ } while (0) From owner-svn-src-head@freebsd.org Sat Feb 4 21:34: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 DE8DACD02F3; Sat, 4 Feb 2017 21:34:21 +0000 (UTC) (envelope-from onwahe@gmail.com) Received: from mail-it0-x243.google.com (mail-it0-x243.google.com [IPv6:2607:f8b0:4001:c0b::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 98537299; Sat, 4 Feb 2017 21:34:21 +0000 (UTC) (envelope-from onwahe@gmail.com) Received: by mail-it0-x243.google.com with SMTP id e137so4802733itc.0; Sat, 04 Feb 2017 13:34:21 -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=NgWGi9AQOO+WCRLgPn8mfmFPopErTFXhJFLJfmCITt8=; b=HGuxgv8vh8u+wXk3WLsgDRPh0CvutijD3F/59ROcqvwXO0nDE+6YrW0tha0DzZ9NsN 1O8rLUa52wp5uVdp8h+RNGUmJgSv52l4lKtYbbpV+7NX6lmoimdwjN5j5T1AsxCTUDXn +I2m7E4pZb+Yt2jsc8j+Jh6b7HyDYR05aK1Z20dqkHIe3PYhArB9Qiy2X3p/f8obB+Vx Ld8i5CH4P3lMT0JrX0taPCQ+OWlIQ/gudcqHK753awquWqKby8LGyaQa6vEdVP+tYO20 dfQkw2h3yJZwIKfWN3XtBVY03AYPHI1w3jgB9KAuBW3GgyoFpZwgyu/ncpjkO1e2+CQV JWVg== 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=NgWGi9AQOO+WCRLgPn8mfmFPopErTFXhJFLJfmCITt8=; b=XOl3Sage+W+wRKOkY+AMdk+iS44Tyy2MlzABWhE0/ol2v7fc/JQgVs+sjiZQkt4iRJ ewYa8id3tWVqS18gxXWWi9O8gkR0YBY54BxWhUUnUoki000KMvAb1RqgDPAadAou3Vlp cLkDD9ZOABKvsbEgjT/sbJlZzLO3KPv2jl0hOab5NjWyNxs8hqA7vMyxoyez98UFmsUy 7zWbQV2yv8tBgeWLg8L/M8XEMWfUIKYLsm+p24XRyhlmBtPZEfh3OmVsjX/g+sxoKXr4 /Pp3n9L+N3uWoTrLaN2j7A3D6Vao0LiF7vqTYUjiLrrV11knbsw4ENGn6B5t5iKxfhrJ PFsw== X-Gm-Message-State: AIkVDXIi7o4YPSe212xZx7bcEdEE/bJ5pWFnb9ytdip3Tr0U7HlxpfyJX5FDuDUMAtn8inRwPM34sFQok/psGQ== X-Received: by 10.36.40.198 with SMTP id h189mr2440181ith.114.1486244060930; Sat, 04 Feb 2017 13:34:20 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.101.194 with HTTP; Sat, 4 Feb 2017 13:34:20 -0800 (PST) In-Reply-To: References: <201702010332.v113WnYf041362@repo.freebsd.org> <20170203231238.0675c289@kan> <8523aaa5-6c30-9f9f-40f0-fdf82cdf1669@pix.net> <6bf86e46-9714-c7e9-8d47-845761e2de24@FreeBSD.org> <8a2f7f7d-14c3-8e75-e060-fc41213ce389@FreeBSD.org> From: Svatopluk Kraus Date: Sat, 4 Feb 2017 22:34:20 +0100 Message-ID: Subject: Re: svn commit: r313037 - in head/sys: amd64/include kern mips/include net powerpc/include sparc64/include To: Jason Harmening Cc: Andreas Tobler , Kurt Lidl , Alexander Kabaev , "Jason A. Harmening" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Ed Maste , Justin Hibbits Content-Type: text/plain; charset=UTF-8 X-Mailman-Approved-At: Sun, 05 Feb 2017 04:05:46 +0000 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: Sat, 04 Feb 2017 21:34:22 -0000 Probably not related. But when I took short look to the patch to see what could go wrong, I walked into the following comment in _rm_wlock(): "Assumes rm->rm_writecpus update is visible on other CPUs before rm_cleanIPI is called." There is no explicit barrier to ensure it. However, there might be some barriers inside of smp_rendezvous_cpus(). I have no idea what could happened if this assumption is not met. Note that rm_cleanIPI() is affected by the patch. On Sat, Feb 4, 2017 at 9:39 PM, Jason Harmening wrote: > Can you post an example of such panic? Only 2 MI pieces were changed, > netisr and rmlock. I haven't seen problems on my own amd64/i386/arm testing > of this, so a backtrace might help to narrow down the cause. > > On Sat, Feb 4, 2017 at 12:22 PM, Andreas Tobler > wrote: >> >> On 04.02.17 20:54, Jason Harmening wrote: >>> >>> I suspect this broke rmlocks for mips because the rmlock implementation >>> takes the address of the per-CPU pc_rm_queue when building tracker >>> lists. That address may be later accessed from another CPU and will >>> then translate to the wrong physical region if the address was taken >>> relative to the globally-constant pcpup VA used on mips. >>> >>> Regardless, for mips get_pcpup() should be implemented as >>> pcpu_find(curcpu) since returning an address that may mean something >>> different depending on the CPU seems like a big POLA violation if >>> nothing else. >>> >>> I'm more concerned about the report of powerpc breakage. For powerpc we >>> simply take each pcpu pointer from the pc_allcpu list (which is the same >>> value stored in the cpuid_to_pcpu array) and pass it through the ap_pcpu >>> global to each AP's startup code, which then stores it in sprg0. It >>> should be globally unique and won't have the variable-translation issues >>> seen on mips. Andreas, are you certain this change was responsible the >>> breakage you saw, and was it the same sort of hang observed on mips? >> >> >> I'm really sure. 313036 booted fine, allowed me to execute heavy >> compilation jobs, np. 313037 on the other side gave me various patterns of >> panics. During startup, but I also succeeded to get into multiuser and then >> the panic happend during port building. >> >> I have no deeper inside where pcpu data is used. Justin mentioned netisr? >> >> Andreas >> > From owner-svn-src-head@freebsd.org Sun Feb 5 04:53: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 30F57CC5CD8; Sun, 5 Feb 2017 04:53:15 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E5D6AEB2; Sun, 5 Feb 2017 04:53:14 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v154rEJB072598; Sun, 5 Feb 2017 04:53:14 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v154rDjf072595; Sun, 5 Feb 2017 04:53:13 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702050453.v154rDjf072595@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 5 Feb 2017 04:53:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313270 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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, 05 Feb 2017 04:53:15 -0000 Author: mjg Date: Sun Feb 5 04:53:13 2017 New Revision: 313270 URL: https://svnweb.freebsd.org/changeset/base/313270 Log: rwlock: switch to fcmpset Discussed with: jhb Tested by: pho Modified: head/sys/kern/kern_rwlock.c head/sys/sys/rwlock.h Modified: head/sys/kern/kern_rwlock.c ============================================================================== --- head/sys/kern/kern_rwlock.c Sun Feb 5 03:26:34 2017 (r313269) +++ head/sys/kern/kern_rwlock.c Sun Feb 5 04:53:13 2017 (r313270) @@ -440,7 +440,7 @@ __rw_rlock(volatile uintptr_t *c, const * if the lock has been unlocked and write waiters * were present. */ - if (atomic_cmpset_acq_ptr(&rw->rw_lock, v, + if (atomic_fcmpset_acq_ptr(&rw->rw_lock, &v, v + RW_ONE_READER)) { if (LOCK_LOG_TEST(&rw->lock_object, 0)) CTR4(KTR_LOCK, @@ -449,7 +449,6 @@ __rw_rlock(volatile uintptr_t *c, const (void *)(v + RW_ONE_READER)); break; } - v = RW_READ_VALUE(rw); continue; } #ifdef KDTRACE_HOOKS @@ -675,7 +674,7 @@ _rw_runlock_cookie(volatile uintptr_t *c * just drop one and return. */ if (RW_READERS(x) > 1) { - if (atomic_cmpset_rel_ptr(&rw->rw_lock, x, + if (atomic_fcmpset_rel_ptr(&rw->rw_lock, &x, x - RW_ONE_READER)) { if (LOCK_LOG_TEST(&rw->lock_object, 0)) CTR4(KTR_LOCK, @@ -684,7 +683,6 @@ _rw_runlock_cookie(volatile uintptr_t *c (void *)(x - RW_ONE_READER)); break; } - x = RW_READ_VALUE(rw); continue; } /* @@ -694,14 +692,13 @@ _rw_runlock_cookie(volatile uintptr_t *c if (!(x & RW_LOCK_WAITERS)) { MPASS((x & ~RW_LOCK_WRITE_SPINNER) == RW_READERS_LOCK(1)); - if (atomic_cmpset_rel_ptr(&rw->rw_lock, x, + if (atomic_fcmpset_rel_ptr(&rw->rw_lock, &x, RW_UNLOCKED)) { if (LOCK_LOG_TEST(&rw->lock_object, 0)) CTR2(KTR_LOCK, "%s: %p last succeeded", __func__, rw); break; } - x = RW_READ_VALUE(rw); continue; } /* @@ -769,8 +766,8 @@ _rw_runlock_cookie(volatile uintptr_t *c * read or write lock. */ void -__rw_wlock_hard(volatile uintptr_t *c, uintptr_t tid, const char *file, - int line) +__rw_wlock_hard(volatile uintptr_t *c, uintptr_t v, uintptr_t tid, + const char *file, int line) { struct rwlock *rw; struct turnstile *ts; @@ -779,7 +776,7 @@ __rw_wlock_hard(volatile uintptr_t *c, u int spintries = 0; int i; #endif - uintptr_t v, x; + uintptr_t x; #ifdef LOCK_PROFILING uint64_t waittime = 0; int contested = 0; @@ -803,7 +800,6 @@ __rw_wlock_hard(volatile uintptr_t *c, u lock_delay_arg_init(&lda, NULL); #endif rw = rwlock2rw(c); - v = RW_READ_VALUE(rw); if (__predict_false(lv_rw_wowner(v) == (struct thread *)tid)) { KASSERT(rw->lock_object.lo_flags & LO_RECURSABLE, @@ -825,9 +821,8 @@ __rw_wlock_hard(volatile uintptr_t *c, u #endif for (;;) { if (v == RW_UNLOCKED) { - if (_rw_write_lock(rw, tid)) + if (_rw_write_lock_fetch(rw, &v, tid)) break; - v = RW_READ_VALUE(rw); continue; } #ifdef KDTRACE_HOOKS Modified: head/sys/sys/rwlock.h ============================================================================== --- head/sys/sys/rwlock.h Sun Feb 5 03:26:34 2017 (r313269) +++ head/sys/sys/rwlock.h Sun Feb 5 04:53:13 2017 (r313270) @@ -84,6 +84,11 @@ #define _rw_write_lock(rw, tid) \ atomic_cmpset_acq_ptr(&(rw)->rw_lock, RW_UNLOCKED, (tid)) +#define _rw_write_lock_fetch(rw, vp, tid) ({ \ + *vp = RW_UNLOCKED; \ + atomic_fcmpset_acq_ptr(&(rw)->rw_lock, vp, (tid)); \ +}) + /* Release a write lock quickly if there are no waiters. */ #define _rw_write_unlock(rw, tid) \ atomic_cmpset_rel_ptr(&(rw)->rw_lock, (tid), RW_UNLOCKED) @@ -97,9 +102,10 @@ /* Acquire a write lock. */ #define __rw_wlock(rw, tid, file, line) do { \ uintptr_t _tid = (uintptr_t)(tid); \ + uintptr_t _v; \ \ - if ((rw)->rw_lock != RW_UNLOCKED || !_rw_write_lock((rw), _tid))\ - _rw_wlock_hard((rw), _tid, (file), (line)); \ + if (!_rw_write_lock_fetch((rw), &_v, _tid)) \ + _rw_wlock_hard((rw), _v, _tid, (file), (line)); \ else \ LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(rw__acquire, rw, \ 0, 0, file, line, LOCKSTAT_WRITER); \ @@ -114,7 +120,7 @@ else { \ LOCKSTAT_PROFILE_RELEASE_RWLOCK(rw__release, rw, \ LOCKSTAT_WRITER); \ - if ((rw)->rw_lock != _tid || !_rw_write_unlock((rw), _tid))\ + if (!_rw_write_unlock((rw), _tid)) \ _rw_wunlock_hard((rw), _tid, (file), (line)); \ } \ } while (0) @@ -135,8 +141,8 @@ void _rw_wunlock_cookie(volatile uintptr void __rw_rlock(volatile uintptr_t *c, const char *file, int line); int __rw_try_rlock(volatile uintptr_t *c, const char *file, int line); void _rw_runlock_cookie(volatile uintptr_t *c, const char *file, int line); -void __rw_wlock_hard(volatile uintptr_t *c, uintptr_t tid, const char *file, - int line); +void __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v, uintptr_t tid, + const char *file, int line); void __rw_wunlock_hard(volatile uintptr_t *c, uintptr_t tid, const char *file, int line); int __rw_try_upgrade(volatile uintptr_t *c, const char *file, int line); @@ -171,8 +177,8 @@ void __rw_assert(const volatile uintptr_ __rw_try_rlock(&(rw)->rw_lock, f, l) #define _rw_runlock(rw, f, l) \ _rw_runlock_cookie(&(rw)->rw_lock, f, l) -#define _rw_wlock_hard(rw, t, f, l) \ - __rw_wlock_hard(&(rw)->rw_lock, t, f, l) +#define _rw_wlock_hard(rw, v, t, f, l) \ + __rw_wlock_hard(&(rw)->rw_lock, v, t, f, l) #define _rw_wunlock_hard(rw, t, f, l) \ __rw_wunlock_hard(&(rw)->rw_lock, t, f, l) #define _rw_try_upgrade(rw, f, l) \ From owner-svn-src-head@freebsd.org Sun Feb 5 04:54: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 4D3F5CC5D9B; Sun, 5 Feb 2017 04:54:22 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B85B1009; Sun, 5 Feb 2017 04:54:21 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v154sLIt072684; Sun, 5 Feb 2017 04:54:21 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v154sKN3072682; Sun, 5 Feb 2017 04:54:20 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702050454.v154sKN3072682@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 5 Feb 2017 04:54:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313271 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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, 05 Feb 2017 04:54:22 -0000 Author: mjg Date: Sun Feb 5 04:54:20 2017 New Revision: 313271 URL: https://svnweb.freebsd.org/changeset/base/313271 Log: sx: switch to fcmpset Discussed with: jhb Tested by: pho (previous version) Modified: head/sys/kern/kern_sx.c head/sys/sys/sx.h Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Sun Feb 5 04:53:13 2017 (r313270) +++ head/sys/kern/kern_sx.c Sun Feb 5 04:54:20 2017 (r313271) @@ -530,15 +530,14 @@ sx_downgrade_(struct sx *sx, const char * accessible from at least sx.h. */ int -_sx_xlock_hard(struct sx *sx, uintptr_t tid, int opts, const char *file, - int line) +_sx_xlock_hard(struct sx *sx, uintptr_t x, uintptr_t tid, int opts, + const char *file, int line) { GIANT_DECLARE; #ifdef ADAPTIVE_SX volatile struct thread *owner; u_int i, spintries = 0; #endif - uintptr_t x; #ifdef LOCK_PROFILING uint64_t waittime = 0; int contested = 0; @@ -563,8 +562,6 @@ _sx_xlock_hard(struct sx *sx, uintptr_t lock_delay_arg_init(&lda, NULL); #endif - x = SX_READ_VALUE(sx); - /* If we already hold an exclusive lock, then recurse. */ if (__predict_false(lv_sx_owner(x) == (struct thread *)tid)) { KASSERT((sx->lock_object.lo_flags & LO_RECURSABLE) != 0, @@ -587,9 +584,8 @@ _sx_xlock_hard(struct sx *sx, uintptr_t #endif for (;;) { if (x == SX_LOCK_UNLOCKED) { - if (atomic_cmpset_acq_ptr(&sx->sx_lock, x, tid)) + if (atomic_fcmpset_acq_ptr(&sx->sx_lock, &x, tid)) break; - x = SX_READ_VALUE(sx); continue; } #ifdef KDTRACE_HOOKS @@ -902,7 +898,7 @@ _sx_slock_hard(struct sx *sx, int opts, */ if (x & SX_LOCK_SHARED) { MPASS(!(x & SX_LOCK_SHARED_WAITERS)); - if (atomic_cmpset_acq_ptr(&sx->sx_lock, x, + if (atomic_fcmpset_acq_ptr(&sx->sx_lock, &x, x + SX_ONE_SHARER)) { if (LOCK_LOG_TEST(&sx->lock_object, 0)) CTR4(KTR_LOCK, @@ -911,7 +907,6 @@ _sx_slock_hard(struct sx *sx, int opts, (void *)(x + SX_ONE_SHARER)); break; } - x = SX_READ_VALUE(sx); continue; } #ifdef KDTRACE_HOOKS @@ -1085,7 +1080,7 @@ _sx_sunlock_hard(struct sx *sx, const ch * so, just drop one and return. */ if (SX_SHARERS(x) > 1) { - if (atomic_cmpset_rel_ptr(&sx->sx_lock, x, + if (atomic_fcmpset_rel_ptr(&sx->sx_lock, &x, x - SX_ONE_SHARER)) { if (LOCK_LOG_TEST(&sx->lock_object, 0)) CTR4(KTR_LOCK, @@ -1094,8 +1089,6 @@ _sx_sunlock_hard(struct sx *sx, const ch (void *)(x - SX_ONE_SHARER)); break; } - - x = SX_READ_VALUE(sx); continue; } @@ -1105,14 +1098,14 @@ _sx_sunlock_hard(struct sx *sx, const ch */ if (!(x & SX_LOCK_EXCLUSIVE_WAITERS)) { MPASS(x == SX_SHARERS_LOCK(1)); - if (atomic_cmpset_rel_ptr(&sx->sx_lock, - SX_SHARERS_LOCK(1), SX_LOCK_UNLOCKED)) { + x = SX_SHARERS_LOCK(1); + if (atomic_fcmpset_rel_ptr(&sx->sx_lock, + &x, SX_LOCK_UNLOCKED)) { if (LOCK_LOG_TEST(&sx->lock_object, 0)) CTR2(KTR_LOCK, "%s: %p last succeeded", __func__, sx); break; } - x = SX_READ_VALUE(sx); continue; } Modified: head/sys/sys/sx.h ============================================================================== --- head/sys/sys/sx.h Sun Feb 5 04:53:13 2017 (r313270) +++ head/sys/sys/sx.h Sun Feb 5 04:54:20 2017 (r313271) @@ -109,7 +109,7 @@ int _sx_slock(struct sx *sx, int opts, c int _sx_xlock(struct sx *sx, int opts, const char *file, int line); void _sx_sunlock(struct sx *sx, const char *file, int line); void _sx_xunlock(struct sx *sx, const char *file, int line); -int _sx_xlock_hard(struct sx *sx, uintptr_t tid, int opts, +int _sx_xlock_hard(struct sx *sx, uintptr_t v, uintptr_t tid, int opts, const char *file, int line); int _sx_slock_hard(struct sx *sx, int opts, const char *file, int line); void _sx_xunlock_hard(struct sx *sx, uintptr_t tid, const char *file, int @@ -153,11 +153,12 @@ __sx_xlock(struct sx *sx, struct thread int line) { uintptr_t tid = (uintptr_t)td; + uintptr_t v; int error = 0; - if (sx->sx_lock != SX_LOCK_UNLOCKED || - !atomic_cmpset_acq_ptr(&sx->sx_lock, SX_LOCK_UNLOCKED, tid)) - error = _sx_xlock_hard(sx, tid, opts, file, line); + v = SX_LOCK_UNLOCKED; + if (!atomic_fcmpset_acq_ptr(&sx->sx_lock, &v, tid)) + error = _sx_xlock_hard(sx, v, tid, opts, file, line); else LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(sx__acquire, sx, 0, 0, file, line, LOCKSTAT_WRITER); @@ -174,8 +175,7 @@ __sx_xunlock(struct sx *sx, struct threa if (sx->sx_recurse == 0) LOCKSTAT_PROFILE_RELEASE_RWLOCK(sx__release, sx, LOCKSTAT_WRITER); - if (sx->sx_lock != tid || - !atomic_cmpset_rel_ptr(&sx->sx_lock, tid, SX_LOCK_UNLOCKED)) + if (!atomic_cmpset_rel_ptr(&sx->sx_lock, tid, SX_LOCK_UNLOCKED)) _sx_xunlock_hard(sx, tid, file, line); } From owner-svn-src-head@freebsd.org Sun Feb 5 05:20: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 CA2A4CD02DC; Sun, 5 Feb 2017 05:20:30 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A018119C6; Sun, 5 Feb 2017 05:20:30 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v155KTKf080847; Sun, 5 Feb 2017 05:20:29 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v155KTW8080845; Sun, 5 Feb 2017 05:20:29 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702050520.v155KTW8080845@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 5 Feb 2017 05:20:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313272 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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, 05 Feb 2017 05:20:30 -0000 Author: mjg Date: Sun Feb 5 05:20:29 2017 New Revision: 313272 URL: https://svnweb.freebsd.org/changeset/base/313272 Log: sx: uninline slock/sunlock Shared locking routines explicitly read the value and test it. If the change attempt fails, they fall back to a regular function which would retry in a loop. The problem is that with many concurrent readers the risk of failure is pretty high and even the value returned by fcmpset is very likely going to be stale by the time the loop in the fallback routine is reached. Uninline said primitives. It gives a throughput increase when doing concurrent slocks/sunlocks with 80 hardware threads from ~50 mln/s to ~56 mln/s. Interestingly, rwlock primitives are already not inlined. Modified: head/sys/kern/kern_sx.c head/sys/sys/sx.h Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Sun Feb 5 04:54:20 2017 (r313271) +++ head/sys/kern/kern_sx.c Sun Feb 5 05:20:29 2017 (r313272) @@ -276,29 +276,6 @@ sx_destroy(struct sx *sx) } int -_sx_slock(struct sx *sx, int opts, const char *file, int line) -{ - int error = 0; - - if (SCHEDULER_STOPPED()) - return (0); - KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), - ("sx_slock() by idle thread %p on sx %s @ %s:%d", - curthread, sx->lock_object.lo_name, file, line)); - KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, - ("sx_slock() of destroyed sx @ %s:%d", file, line)); - WITNESS_CHECKORDER(&sx->lock_object, LOP_NEWORDER, file, line, NULL); - error = __sx_slock(sx, opts, file, line); - if (!error) { - LOCK_LOG_LOCK("SLOCK", &sx->lock_object, 0, 0, file, line); - WITNESS_LOCK(&sx->lock_object, 0, file, line); - TD_LOCKS_INC(curthread); - } - - return (error); -} - -int sx_try_slock_(struct sx *sx, const char *file, int line) { uintptr_t x; @@ -391,21 +368,6 @@ sx_try_xlock_(struct sx *sx, const char } void -_sx_sunlock(struct sx *sx, const char *file, int line) -{ - - if (SCHEDULER_STOPPED()) - return; - KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, - ("sx_sunlock() of destroyed sx @ %s:%d", file, line)); - _sx_assert(sx, SA_SLOCKED, file, line); - WITNESS_UNLOCK(&sx->lock_object, 0, file, line); - LOCK_LOG_LOCK("SUNLOCK", &sx->lock_object, 0, 0, file, line); - __sx_sunlock(sx, file, line); - TD_LOCKS_DEC(curthread); -} - -void _sx_xunlock(struct sx *sx, const char *file, int line) { @@ -840,14 +802,8 @@ _sx_xunlock_hard(struct sx *sx, uintptr_ kick_proc0(); } -/* - * This function represents the so-called 'hard case' for sx_slock - * operation. All 'easy case' failures are redirected to this. Note - * that ideally this would be a static function, but it needs to be - * accessible from at least sx.h. - */ int -_sx_slock_hard(struct sx *sx, int opts, const char *file, int line) +_sx_slock(struct sx *sx, int opts, const char *file, int line) { GIANT_DECLARE; #ifdef ADAPTIVE_SX @@ -1051,14 +1007,8 @@ _sx_slock_hard(struct sx *sx, int opts, return (error); } -/* - * This function represents the so-called 'hard case' for sx_sunlock - * operation. All 'easy case' failures are redirected to this. Note - * that ideally this would be a static function, but it needs to be - * accessible from at least sx.h. - */ void -_sx_sunlock_hard(struct sx *sx, const char *file, int line) +_sx_sunlock(struct sx *sx, const char *file, int line) { uintptr_t x; int wakeup_swapper; @@ -1066,6 +1016,7 @@ _sx_sunlock_hard(struct sx *sx, const ch if (SCHEDULER_STOPPED()) return; + LOCKSTAT_PROFILE_RELEASE_RWLOCK(sx__release, sx, LOCKSTAT_READER); x = SX_READ_VALUE(sx); for (;;) { /* Modified: head/sys/sys/sx.h ============================================================================== --- head/sys/sys/sx.h Sun Feb 5 04:54:20 2017 (r313271) +++ head/sys/sys/sx.h Sun Feb 5 05:20:29 2017 (r313272) @@ -111,10 +111,8 @@ void _sx_sunlock(struct sx *sx, const ch void _sx_xunlock(struct sx *sx, const char *file, int line); int _sx_xlock_hard(struct sx *sx, uintptr_t v, uintptr_t tid, int opts, const char *file, int line); -int _sx_slock_hard(struct sx *sx, int opts, const char *file, int line); void _sx_xunlock_hard(struct sx *sx, uintptr_t tid, const char *file, int line); -void _sx_sunlock_hard(struct sx *sx, const char *file, int line); #if defined(INVARIANTS) || defined(INVARIANT_SUPPORT) void _sx_assert(const struct sx *sx, int what, const char *file, int line); #endif @@ -179,41 +177,6 @@ __sx_xunlock(struct sx *sx, struct threa _sx_xunlock_hard(sx, tid, file, line); } -/* Acquire a shared lock. */ -static __inline int -__sx_slock(struct sx *sx, int opts, const char *file, int line) -{ - uintptr_t x = sx->sx_lock; - int error = 0; - - if (!(x & SX_LOCK_SHARED) || - !atomic_cmpset_acq_ptr(&sx->sx_lock, x, x + SX_ONE_SHARER)) - error = _sx_slock_hard(sx, opts, file, line); - else - LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(sx__acquire, sx, - 0, 0, file, line, LOCKSTAT_READER); - - return (error); -} - -/* - * Release a shared lock. We can just drop a single shared lock so - * long as we aren't trying to drop the last shared lock when other - * threads are waiting for an exclusive lock. This takes advantage of - * the fact that an unlocked lock is encoded as a shared lock with a - * count of 0. - */ -static __inline void -__sx_sunlock(struct sx *sx, const char *file, int line) -{ - uintptr_t x = sx->sx_lock; - - LOCKSTAT_PROFILE_RELEASE_RWLOCK(sx__release, sx, LOCKSTAT_READER); - if (x == (SX_SHARERS_LOCK(1) | SX_LOCK_EXCLUSIVE_WAITERS) || - !atomic_cmpset_rel_ptr(&sx->sx_lock, x, x - SX_ONE_SHARER)) - _sx_sunlock_hard(sx, file, line); -} - /* * Public interface for lock operations. */ @@ -227,12 +190,6 @@ __sx_sunlock(struct sx *sx, const char * _sx_xlock((sx), SX_INTERRUPTIBLE, (file), (line)) #define sx_xunlock_(sx, file, line) \ _sx_xunlock((sx), (file), (line)) -#define sx_slock_(sx, file, line) \ - (void)_sx_slock((sx), 0, (file), (line)) -#define sx_slock_sig_(sx, file, line) \ - _sx_slock((sx), SX_INTERRUPTIBLE, (file) , (line)) -#define sx_sunlock_(sx, file, line) \ - _sx_sunlock((sx), (file), (line)) #else #define sx_xlock_(sx, file, line) \ (void)__sx_xlock((sx), curthread, 0, (file), (line)) @@ -240,13 +197,13 @@ __sx_sunlock(struct sx *sx, const char * __sx_xlock((sx), curthread, SX_INTERRUPTIBLE, (file), (line)) #define sx_xunlock_(sx, file, line) \ __sx_xunlock((sx), curthread, (file), (line)) +#endif /* LOCK_DEBUG > 0 || SX_NOINLINE */ #define sx_slock_(sx, file, line) \ - (void)__sx_slock((sx), 0, (file), (line)) + (void)_sx_slock((sx), 0, (file), (line)) #define sx_slock_sig_(sx, file, line) \ - __sx_slock((sx), SX_INTERRUPTIBLE, (file), (line)) + _sx_slock((sx), SX_INTERRUPTIBLE, (file) , (line)) #define sx_sunlock_(sx, file, line) \ - __sx_sunlock((sx), (file), (line)) -#endif /* LOCK_DEBUG > 0 || SX_NOINLINE */ + _sx_sunlock((sx), (file), (line)) #define sx_try_slock(sx) sx_try_slock_((sx), LOCK_FILE, LOCK_LINE) #define sx_try_xlock(sx) sx_try_xlock_((sx), LOCK_FILE, LOCK_LINE) #define sx_try_upgrade(sx) sx_try_upgrade_((sx), LOCK_FILE, LOCK_LINE) From owner-svn-src-head@freebsd.org Sun Feb 5 05:36: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 A7EFACD0D48; Sun, 5 Feb 2017 05:36:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 823E51B0F; Sun, 5 Feb 2017 05:36:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v155apxw091922; Sun, 5 Feb 2017 05:36:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v155aplo091921; Sun, 5 Feb 2017 05:36:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702050536.v155aplo091921@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 5 Feb 2017 05:36:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313273 - head/sbin/kldload X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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, 05 Feb 2017 05:36:52 -0000 Author: ngie Date: Sun Feb 5 05:36:51 2017 New Revision: 313273 URL: https://svnweb.freebsd.org/changeset/base/313273 Log: style(9) cleanup - Delete trailing whitespace - Fix alignment/variable sorting - Delete single-line enclosing braces MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/sbin/kldload/kldload.c Modified: head/sbin/kldload/kldload.c ============================================================================== --- head/sbin/kldload/kldload.c Sun Feb 5 05:20:29 2017 (r313272) +++ head/sbin/kldload/kldload.c Sun Feb 5 05:36:51 2017 (r313273) @@ -41,9 +41,6 @@ __FBSDID("$FreeBSD$"); #define PATHCTL "kern.module_path" -static int path_check(const char *, int); -static void usage(void); - /* * Check to see if the requested module is specified as a filename with no * path. If so and if a file by the same name exists in the module path, @@ -52,43 +49,37 @@ static void usage(void); static int path_check(const char *kldname, int quiet) { - int mib[5], found; - size_t miblen, pathlen; - char kldpath[MAXPATHLEN]; char *path, *tmppath, *element; struct stat sb; + int mib[5]; + char kldpath[MAXPATHLEN]; + size_t miblen, pathlen; dev_t dev; ino_t ino; + int found; - if (strchr(kldname, '/') != NULL) { + if (strchr(kldname, '/') != NULL) return (0); - } - if (strstr(kldname, ".ko") == NULL) { + if (strstr(kldname, ".ko") == NULL) return (0); - } - if (stat(kldname, &sb) != 0) { + if (stat(kldname, &sb) != 0) return (0); - } found = 0; dev = sb.st_dev; ino = sb.st_ino; miblen = nitems(mib); - if (sysctlnametomib(PATHCTL, mib, &miblen) != 0) { + if (sysctlnametomib(PATHCTL, mib, &miblen) != 0) err(1, "sysctlnametomib(%s)", PATHCTL); - } - if (sysctl(mib, miblen, NULL, &pathlen, NULL, 0) == -1) { + if (sysctl(mib, miblen, NULL, &pathlen, NULL, 0) == -1) err(1, "getting path: sysctl(%s) - size only", PATHCTL); - } path = malloc(pathlen + 1); - if (path == NULL) { + if (path == NULL) err(1, "allocating %lu bytes for the path", (unsigned long)pathlen + 1); - } - if (sysctl(mib, miblen, path, &pathlen, NULL, 0) == -1) { + if (sysctl(mib, miblen, path, &pathlen, NULL, 0) == -1) err(1, "getting path: sysctl(%s)", PATHCTL); - } tmppath = path; while ((element = strsep(&tmppath, ";")) != NULL) { @@ -97,39 +88,36 @@ path_check(const char *kldname, int quie strlcat(kldpath, "/", MAXPATHLEN); } strlcat(kldpath, kldname, MAXPATHLEN); - - if (stat(kldpath, &sb) == -1) { + + if (stat(kldpath, &sb) == -1) continue; - } found = 1; if (sb.st_dev != dev || sb.st_ino != ino) { - if (!quiet) { + if (!quiet) warnx("%s will be loaded from %s, not the " "current directory", kldname, element); - } break; - } else if (sb.st_dev == dev && sb.st_ino == ino) { + } else if (sb.st_dev == dev && sb.st_ino == ino) break; - } } free(path); - + if (!found) { - if (!quiet) { + if (!quiet) warnx("%s is not in the module path", kldname); - } return (-1); } - + return (0); } static void usage(void) { + fprintf(stderr, "usage: kldload [-nqv] file ...\n"); exit(1); } @@ -138,17 +126,17 @@ int main(int argc, char** argv) { int c; + int check_loaded; int errors; int fileid; - int verbose; int quiet; - int check_loaded; + int verbose; errors = 0; verbose = 0; quiet = 0; check_loaded = 0; - + while ((c = getopt(argc, argv, "nqv")) != -1) { switch (c) { case 'q': @@ -204,9 +192,8 @@ main(int argc, char** argv) printf("Loaded %s, id=%d\n", argv[0], fileid); } - } else { + } else errors++; - } argv++; } From owner-svn-src-head@freebsd.org Sun Feb 5 06:51: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 AD4D4CD1D97; Sun, 5 Feb 2017 06:51:46 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5AA8A1DBE; Sun, 5 Feb 2017 06:51:46 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v156pjeU023472; Sun, 5 Feb 2017 06:51:45 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v156pjuQ023471; Sun, 5 Feb 2017 06:51:45 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702050651.v156pjuQ023471@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 5 Feb 2017 06:51:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313274 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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, 05 Feb 2017 06:51:46 -0000 Author: mjg Date: Sun Feb 5 06:51:45 2017 New Revision: 313274 URL: https://svnweb.freebsd.org/changeset/base/313274 Log: sx: add witness support missed in r313272 Modified: head/sys/kern/kern_sx.c Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Sun Feb 5 05:36:51 2017 (r313273) +++ head/sys/kern/kern_sx.c Sun Feb 5 06:51:45 2017 (r313274) @@ -833,6 +833,12 @@ _sx_slock(struct sx *sx, int opts, const #elif defined(KDTRACE_HOOKS) lock_delay_arg_init(&lda, NULL); #endif + KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + ("sx_slock() by idle thread %p on sx %s @ %s:%d", + curthread, sx->lock_object.lo_name, file, line)); + KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, + ("sx_slock() of destroyed sx @ %s:%d", file, line)); + WITNESS_CHECKORDER(&sx->lock_object, LOP_NEWORDER, file, line, NULL); #ifdef KDTRACE_HOOKS all_time -= lockstat_nsecs(&sx->lock_object); #endif @@ -1000,9 +1006,13 @@ _sx_slock(struct sx *sx, int opts, const LOCKSTAT_READER, (state & SX_LOCK_SHARED) == 0, (state & SX_LOCK_SHARED) == 0 ? 0 : SX_SHARERS(state)); #endif - if (error == 0) + if (error == 0) { LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(sx__acquire, sx, contested, waittime, file, line, LOCKSTAT_READER); + LOCK_LOG_LOCK("SLOCK", &sx->lock_object, 0, 0, file, line); + WITNESS_LOCK(&sx->lock_object, 0, file, line); + TD_LOCKS_INC(curthread); + } GIANT_RESTORE(); return (error); } @@ -1016,6 +1026,11 @@ _sx_sunlock(struct sx *sx, const char *f if (SCHEDULER_STOPPED()) return; + KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, + ("sx_sunlock() of destroyed sx @ %s:%d", file, line)); + _sx_assert(sx, SA_SLOCKED, file, line); + WITNESS_UNLOCK(&sx->lock_object, 0, file, line); + LOCK_LOG_LOCK("SUNLOCK", &sx->lock_object, 0, 0, file, line); LOCKSTAT_PROFILE_RELEASE_RWLOCK(sx__release, sx, LOCKSTAT_READER); x = SX_READ_VALUE(sx); for (;;) { @@ -1091,6 +1106,7 @@ _sx_sunlock(struct sx *sx, const char *f kick_proc0(); break; } + TD_LOCKS_DEC(curthread); } #ifdef INVARIANT_SUPPORT From owner-svn-src-head@freebsd.org Sun Feb 5 08:04: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 8F04BCD1395; Sun, 5 Feb 2017 08:04:13 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66F138BF; Sun, 5 Feb 2017 08:04:13 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1584C9A052483; Sun, 5 Feb 2017 08:04:12 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1584Cim052478; Sun, 5 Feb 2017 08:04:12 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702050804.v1584Cim052478@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 5 Feb 2017 08:04:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313275 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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, 05 Feb 2017 08:04:13 -0000 Author: mjg Date: Sun Feb 5 08:04:11 2017 New Revision: 313275 URL: https://svnweb.freebsd.org/changeset/base/313275 Log: mtx: move lockstat handling out of inline primitives Lockstat requires checking if it is enabled and if so, calling a 6 argument function. Further, determining whether to call it on unlock requires pre-reading the lock value. This is problematic in at least 3 ways: - more branches in the hot path than necessary - additional cacheline ping pong under contention - bigger code Instead, check first if lockstat handling is necessary and if so, just fall back to regular locking routines. For this purpose a new macro is introduced (LOCKSTAT_PROFILE_ENABLED). LOCK_PROFILING uninlines all primitives. Fold in the current inline lock variant into the _mtx_lock_flags to retain the support. With this change the inline variants are not used when LOCK_PROFILING is defined and thus can ignore its existence. This results in: text data bss dec hex filename 22259667 1303208 4994976 28557851 1b3c21b kernel.orig 21797315 1303208 4994976 28095499 1acb40b kernel.patched i.e. about 3% reduction in text size. A remaining action is to remove spurious arguments for internal kernel consumers. Modified: head/sys/kern/kern_mutex.c head/sys/sys/lockstat.h head/sys/sys/mutex.h head/sys/sys/sdt.h Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Sun Feb 5 06:51:45 2017 (r313274) +++ head/sys/kern/kern_mutex.c Sun Feb 5 08:04:11 2017 (r313275) @@ -265,6 +265,7 @@ void __mtx_lock_flags(volatile uintptr_t *c, int opts, const char *file, int line) { struct mtx *m; + uintptr_t tid, v; if (SCHEDULER_STOPPED()) return; @@ -282,7 +283,13 @@ __mtx_lock_flags(volatile uintptr_t *c, WITNESS_CHECKORDER(&m->lock_object, (opts & ~MTX_RECURSE) | LOP_NEWORDER | LOP_EXCLUSIVE, file, line, NULL); - __mtx_lock(m, curthread, opts, file, line); + tid = (uintptr_t)curthread; + v = MTX_UNOWNED; + if (!_mtx_obtain_lock_fetch(m, &v, tid)) + _mtx_lock_sleep(m, v, tid, opts, file, line); + else + LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(adaptive__acquire, + m, 0, 0, file, line); LOCK_LOG_LOCK("LOCK", &m->lock_object, opts, m->mtx_recurse, file, line); WITNESS_LOCK(&m->lock_object, (opts & ~MTX_RECURSE) | LOP_EXCLUSIVE, @@ -310,7 +317,7 @@ __mtx_unlock_flags(volatile uintptr_t *c line); mtx_assert(m, MA_OWNED); - __mtx_unlock(m, curthread, opts, file, line); + __mtx_unlock_sleep(c, opts, file, line); TD_LOCKS_DEC(curthread); } @@ -887,20 +894,17 @@ __mtx_unlock_sleep(volatile uintptr_t *c { struct mtx *m; struct turnstile *ts; - uintptr_t v; if (SCHEDULER_STOPPED()) return; m = mtxlock2mtx(c); - v = MTX_READ_VALUE(m); - if (v == (uintptr_t)curthread) { + if (!mtx_recursed(m)) { + LOCKSTAT_PROFILE_RELEASE_LOCK(adaptive__release, m); if (_mtx_release_lock(m, (uintptr_t)curthread)) return; - } - - if (mtx_recursed(m)) { + } else { if (--(m->mtx_recurse) == 0) atomic_clear_ptr(&m->mtx_lock, MTX_RECURSED); if (LOCK_LOG_TEST(&m->lock_object, opts)) Modified: head/sys/sys/lockstat.h ============================================================================== --- head/sys/sys/lockstat.h Sun Feb 5 06:51:45 2017 (r313274) +++ head/sys/sys/lockstat.h Sun Feb 5 08:04:11 2017 (r313275) @@ -107,6 +107,10 @@ extern int lockstat_enabled; LOCKSTAT_RECORD1(probe, lp, a); \ } while (0) +#ifndef LOCK_PROFILING +#define LOCKSTAT_PROFILE_ENABLED(probe) SDT_PROBE_ENABLED(lockstat, , , probe) +#endif + struct lock_object; uint64_t lockstat_nsecs(struct lock_object *); @@ -130,6 +134,10 @@ uint64_t lockstat_nsecs(struct lock_obje #define LOCKSTAT_PROFILE_RELEASE_RWLOCK(probe, lp, a) \ LOCKSTAT_PROFILE_RELEASE_LOCK(probe, lp) +#ifndef LOCK_PROFILING +#define LOCKSTAT_PROFILE_ENABLED(probe) 0 +#endif + #endif /* !KDTRACE_HOOKS */ #endif /* _KERNEL */ #endif /* _SYS_LOCKSTAT_H */ Modified: head/sys/sys/mutex.h ============================================================================== --- head/sys/sys/mutex.h Sun Feb 5 06:51:45 2017 (r313274) +++ head/sys/sys/mutex.h Sun Feb 5 08:04:11 2017 (r313275) @@ -171,10 +171,8 @@ void thread_lock_flags_(struct thread *, #define _mtx_obtain_lock(mp, tid) \ atomic_cmpset_acq_ptr(&(mp)->mtx_lock, MTX_UNOWNED, (tid)) -#define _mtx_obtain_lock_fetch(mp, vp, tid) ({ \ - *vp = MTX_UNOWNED; \ - atomic_fcmpset_rel_ptr(&(mp)->mtx_lock, vp, (tid)); \ -}) +#define _mtx_obtain_lock_fetch(mp, vp, tid) \ + atomic_fcmpset_rel_ptr(&(mp)->mtx_lock, vp, (tid)) /* Try to release mtx_lock if it is unrecursed and uncontested. */ #define _mtx_release_lock(mp, tid) \ @@ -193,13 +191,11 @@ void thread_lock_flags_(struct thread *, /* Lock a normal mutex. */ #define __mtx_lock(mp, tid, opts, file, line) do { \ uintptr_t _tid = (uintptr_t)(tid); \ - uintptr_t _v; \ + uintptr_t _v = MTX_UNOWNED; \ \ - if (!_mtx_obtain_lock_fetch((mp), &_v, _tid)) \ + if (__predict_false(LOCKSTAT_PROFILE_ENABLED(adaptive__acquire) ||\ + !_mtx_obtain_lock_fetch((mp), &_v, _tid))) \ _mtx_lock_sleep((mp), _v, _tid, (opts), (file), (line));\ - else \ - LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(adaptive__acquire, \ - mp, 0, 0, file, line); \ } while (0) /* @@ -211,7 +207,7 @@ void thread_lock_flags_(struct thread *, #ifdef SMP #define __mtx_lock_spin(mp, tid, opts, file, line) do { \ uintptr_t _tid = (uintptr_t)(tid); \ - uintptr_t _v; \ + uintptr_t _v = MTX_UNOWNED; \ \ spinlock_enter(); \ if (!_mtx_obtain_lock_fetch((mp), &_v, _tid)) { \ @@ -270,9 +266,8 @@ void thread_lock_flags_(struct thread *, #define __mtx_unlock(mp, tid, opts, file, line) do { \ uintptr_t _tid = (uintptr_t)(tid); \ \ - if ((mp)->mtx_recurse == 0) \ - LOCKSTAT_PROFILE_RELEASE_LOCK(adaptive__release, mp); \ - if (!_mtx_release_lock((mp), _tid)) \ + if (__predict_false(LOCKSTAT_PROFILE_ENABLED(adaptive__release) ||\ + !_mtx_release_lock((mp), _tid))) \ _mtx_unlock_sleep((mp), (opts), (file), (line)); \ } while (0) Modified: head/sys/sys/sdt.h ============================================================================== --- head/sys/sys/sdt.h Sun Feb 5 06:51:45 2017 (r313274) +++ head/sys/sys/sdt.h Sun Feb 5 08:04:11 2017 (r313275) @@ -160,6 +160,9 @@ SET_DECLARE(sdt_argtypes_set, struct sdt #define SDT_PROBE_DECLARE(prov, mod, func, name) \ extern struct sdt_probe sdt_##prov##_##mod##_##func##_##name[1] +#define SDT_PROBE_ENABLED(prov, mod, func, name) \ + __predict_false((sdt_##prov##_##mod##_##func##_##name->id)) + #define SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) do { \ if (__predict_false(sdt_##prov##_##mod##_##func##_##name->id)) \ (*sdt_probe_func)(sdt_##prov##_##mod##_##func##_##name->id, \ From owner-svn-src-head@freebsd.org Sun Feb 5 08:24: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 C8CD0CD196C; Sun, 5 Feb 2017 08:24:38 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98A891395; Sun, 5 Feb 2017 08:24:38 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v158ObZv061300; Sun, 5 Feb 2017 08:24:37 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v158Obwa061299; Sun, 5 Feb 2017 08:24:37 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702050824.v158Obwa061299@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 5 Feb 2017 08:24:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313276 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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, 05 Feb 2017 08:24:38 -0000 Author: ngie Date: Sun Feb 5 08:24:37 2017 New Revision: 313276 URL: https://svnweb.freebsd.org/changeset/base/313276 Log: Use kldload -n when loading if_deqna This fixes if_deqna from being loaded by accident twice if it's already loaded in the kernel. MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/etc/devd.conf Modified: head/etc/devd.conf ============================================================================== --- head/etc/devd.conf Sun Feb 5 08:04:11 2017 (r313275) +++ head/etc/devd.conf Sun Feb 5 08:24:37 2017 (r313276) @@ -272,7 +272,7 @@ nomatch 10 { match "bus" "pccard[0-9]+"; match "manufacturer" "0x1234"; match "product" "0x2323"; - action "kldload if_deqna"; + action "kldload -n if_deqna"; }; attach 10 { device-name "deqna[0-9]+"; From owner-svn-src-head@freebsd.org Sun Feb 5 08:51: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 1C109CD111E; Sun, 5 Feb 2017 08:51:43 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D901F1ED0; Sun, 5 Feb 2017 08:51:42 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v158pfFT070354; Sun, 5 Feb 2017 08:51:41 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v158pfqG070353; Sun, 5 Feb 2017 08:51:41 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201702050851.v158pfqG070353@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 5 Feb 2017 08:51:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313277 - head/usr.bin/sed X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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, 05 Feb 2017 08:51:43 -0000 Author: delphij Date: Sun Feb 5 08:51:41 2017 New Revision: 313277 URL: https://svnweb.freebsd.org/changeset/base/313277 Log: Restore r312404: Use S_ISREG instead of manual & (also it's better to compare the result from & and the pattern instead of just assuming it's one bit value). Pointed out by Tianjie Mao . MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D4827 Modified: head/usr.bin/sed/main.c Modified: head/usr.bin/sed/main.c ============================================================================== --- head/usr.bin/sed/main.c Sun Feb 5 08:24:37 2017 (r313276) +++ head/usr.bin/sed/main.c Sun Feb 5 08:51:41 2017 (r313277) @@ -391,7 +391,7 @@ mf_fgets(SPACE *sp, enum e_spflag spflag if (inplace != NULL) { if (lstat(fname, &sb) != 0) err(1, "%s", fname); - if (!(sb.st_mode & S_IFREG)) + if (!S_ISREG(sb.st_mode)) errx(1, "%s: %s %s", fname, "in-place editing only", "works for regular files"); From owner-svn-src-head@freebsd.org Sun Feb 5 09:35: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 6FD22CD027D; Sun, 5 Feb 2017 09:35:18 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 350C91642; Sun, 5 Feb 2017 09:35:18 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v159ZHoG089927; Sun, 5 Feb 2017 09:35:17 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v159ZHdR089926; Sun, 5 Feb 2017 09:35:17 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702050935.v159ZHdR089926@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 5 Feb 2017 09:35:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313278 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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, 05 Feb 2017 09:35:18 -0000 Author: mjg Date: Sun Feb 5 09:35:17 2017 New Revision: 313278 URL: https://svnweb.freebsd.org/changeset/base/313278 Log: mtx: fix up _mtx_obtain_lock_fetch usage in thread lock Since _mtx_obtain_lock_fetch no longer sets the argument to MTX_UNOWNED, callers have to do it on their own. Modified: head/sys/kern/kern_mutex.c Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Sun Feb 5 08:51:41 2017 (r313277) +++ head/sys/kern/kern_mutex.c Sun Feb 5 09:35:17 2017 (r313278) @@ -782,6 +782,7 @@ thread_lock_flags_(struct thread *td, in #ifdef KDTRACE_HOOKS spin_time -= lockstat_nsecs(&td->td_lock->lock_object); #endif + v = MTX_UNOWNED; for (;;) { retry: spinlock_enter(); From owner-svn-src-head@freebsd.org Sun Feb 5 09:53: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 D1D20CD0690; Sun, 5 Feb 2017 09:53:14 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A18FC1DD8; Sun, 5 Feb 2017 09:53:14 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v159rDwi098007; Sun, 5 Feb 2017 09:53:13 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v159rDt8098006; Sun, 5 Feb 2017 09:53:13 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702050953.v159rDt8098006@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 5 Feb 2017 09:53:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313279 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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, 05 Feb 2017 09:53:14 -0000 Author: mjg Date: Sun Feb 5 09:53:13 2017 New Revision: 313279 URL: https://svnweb.freebsd.org/changeset/base/313279 Log: mtx: fixup r313278, the assignemnt was supposed to go inside the loop Modified: head/sys/kern/kern_mutex.c Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Sun Feb 5 09:35:17 2017 (r313278) +++ head/sys/kern/kern_mutex.c Sun Feb 5 09:53:13 2017 (r313279) @@ -782,9 +782,9 @@ thread_lock_flags_(struct thread *td, in #ifdef KDTRACE_HOOKS spin_time -= lockstat_nsecs(&td->td_lock->lock_object); #endif - v = MTX_UNOWNED; for (;;) { retry: + v = MTX_UNOWNED; spinlock_enter(); m = td->td_lock; KASSERT(m->mtx_lock != MTX_DESTROYED, From owner-svn-src-head@freebsd.org Sun Feb 5 09:54: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 1AFBECD06FE; Sun, 5 Feb 2017 09:54:18 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E9D6F1F23; Sun, 5 Feb 2017 09:54:17 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v159sH9H098098; Sun, 5 Feb 2017 09:54:17 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v159sG3d098096; Sun, 5 Feb 2017 09:54:16 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702050954.v159sG3d098096@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 5 Feb 2017 09:54:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313280 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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, 05 Feb 2017 09:54:18 -0000 Author: mjg Date: Sun Feb 5 09:54:16 2017 New Revision: 313280 URL: https://svnweb.freebsd.org/changeset/base/313280 Log: sx: move lockstat handling out of inline primitives See r313275 for details. Modified: head/sys/kern/kern_sx.c head/sys/sys/sx.h Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Sun Feb 5 09:53:13 2017 (r313279) +++ head/sys/kern/kern_sx.c Sun Feb 5 09:54:16 2017 (r313280) @@ -310,6 +310,7 @@ sx_try_slock_(struct sx *sx, const char int _sx_xlock(struct sx *sx, int opts, const char *file, int line) { + uintptr_t tid, x; int error = 0; if (SCHEDULER_STOPPED()) @@ -321,7 +322,13 @@ _sx_xlock(struct sx *sx, int opts, const ("sx_xlock() of destroyed sx @ %s:%d", file, line)); WITNESS_CHECKORDER(&sx->lock_object, LOP_NEWORDER | LOP_EXCLUSIVE, file, line, NULL); - error = __sx_xlock(sx, curthread, opts, file, line); + tid = (uintptr_t)curthread; + x = SX_LOCK_UNLOCKED; + if (!atomic_fcmpset_acq_ptr(&sx->sx_lock, &x, tid)) + error = _sx_xlock_hard(sx, x, tid, opts, file, line); + else + LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(sx__acquire, sx, + 0, 0, file, line, LOCKSTAT_WRITER); if (!error) { LOCK_LOG_LOCK("XLOCK", &sx->lock_object, 0, sx->sx_recurse, file, line); @@ -379,7 +386,7 @@ _sx_xunlock(struct sx *sx, const char *f WITNESS_UNLOCK(&sx->lock_object, LOP_EXCLUSIVE, file, line); LOCK_LOG_LOCK("XUNLOCK", &sx->lock_object, 0, sx->sx_recurse, file, line); - __sx_xunlock(sx, curthread, file, line); + _sx_xunlock_hard(sx, (uintptr_t)curthread, file, line); TD_LOCKS_DEC(curthread); } @@ -757,8 +764,13 @@ _sx_xunlock_hard(struct sx *sx, uintptr_ MPASS(!(sx->sx_lock & SX_LOCK_SHARED)); - /* If the lock is recursed, then unrecurse one level. */ - if (sx_xlocked(sx) && sx_recursed(sx)) { + if (!sx_recursed(sx)) { + LOCKSTAT_PROFILE_RELEASE_RWLOCK(sx__release, sx, + LOCKSTAT_WRITER); + if (atomic_cmpset_rel_ptr(&sx->sx_lock, tid, SX_LOCK_UNLOCKED)) + return; + } else { + /* The lock is recursed, unrecurse one level. */ if ((--sx->sx_recurse) == 0) atomic_clear_ptr(&sx->sx_lock, SX_LOCK_RECURSED); if (LOCK_LOG_TEST(&sx->lock_object, 0)) Modified: head/sys/sys/sx.h ============================================================================== --- head/sys/sys/sx.h Sun Feb 5 09:53:13 2017 (r313279) +++ head/sys/sys/sx.h Sun Feb 5 09:54:16 2017 (r313280) @@ -145,21 +145,19 @@ struct sx_args { * deferred to 'tougher' functions. */ +#if (LOCK_DEBUG == 0) && !defined(SX_NOINLINE) /* Acquire an exclusive lock. */ static __inline int __sx_xlock(struct sx *sx, struct thread *td, int opts, const char *file, int line) { uintptr_t tid = (uintptr_t)td; - uintptr_t v; + uintptr_t v = SX_LOCK_UNLOCKED; int error = 0; - v = SX_LOCK_UNLOCKED; - if (!atomic_fcmpset_acq_ptr(&sx->sx_lock, &v, tid)) + if (__predict_false(LOCKSTAT_PROFILE_ENABLED(sx__acquire) || + !atomic_fcmpset_acq_ptr(&sx->sx_lock, &v, tid))) error = _sx_xlock_hard(sx, v, tid, opts, file, line); - else - LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(sx__acquire, sx, - 0, 0, file, line, LOCKSTAT_WRITER); return (error); } @@ -170,12 +168,11 @@ __sx_xunlock(struct sx *sx, struct threa { uintptr_t tid = (uintptr_t)td; - if (sx->sx_recurse == 0) - LOCKSTAT_PROFILE_RELEASE_RWLOCK(sx__release, sx, - LOCKSTAT_WRITER); - if (!atomic_cmpset_rel_ptr(&sx->sx_lock, tid, SX_LOCK_UNLOCKED)) + if (__predict_false(LOCKSTAT_PROFILE_ENABLED(sx__release) || + !atomic_cmpset_rel_ptr(&sx->sx_lock, tid, SX_LOCK_UNLOCKED))) _sx_xunlock_hard(sx, tid, file, line); } +#endif /* * Public interface for lock operations. From owner-svn-src-head@freebsd.org Sun Feb 5 10:00: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 D28E4CD0903; Sun, 5 Feb 2017 10:00:14 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 94B93308; Sun, 5 Feb 2017 10:00:14 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1caJcB-000JsL-0y; Sun, 05 Feb 2017 13:00:11 +0300 Date: Sun, 5 Feb 2017 13:00:11 +0300 From: Slawa Olhovchenkov To: Mateusz Guzik Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313275 - in head/sys: kern sys Message-ID: <20170205100010.GB5366@zxy.spb.ru> References: <201702050804.v1584Cim052478@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201702050804.v1584Cim052478@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-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, 05 Feb 2017 10:00:14 -0000 On Sun, Feb 05, 2017 at 08:04:12AM +0000, Mateusz Guzik wrote: > Author: mjg > Date: Sun Feb 5 08:04:11 2017 > New Revision: 313275 > URL: https://svnweb.freebsd.org/changeset/base/313275 > > Log: > mtx: move lockstat handling out of inline primitives > > Lockstat requires checking if it is enabled and if so, calling a 6 argument > function. Further, determining whether to call it on unlock requires > pre-reading the lock value. > > This is problematic in at least 3 ways: > - more branches in the hot path than necessary > - additional cacheline ping pong under contention > - bigger code > > Instead, check first if lockstat handling is necessary and if so, just fall > back to regular locking routines. For this purpose a new macro is introduced > (LOCKSTAT_PROFILE_ENABLED). > > LOCK_PROFILING uninlines all primitives. Fold in the current inline lock > variant into the _mtx_lock_flags to retain the support. With this change > the inline variants are not used when LOCK_PROFILING is defined and thus > can ignore its existence. > > This results in: > text data bss dec hex filename > 22259667 1303208 4994976 28557851 1b3c21b kernel.orig > 21797315 1303208 4994976 28095499 1acb40b kernel.patched > > i.e. about 3% reduction in text size. > > A remaining action is to remove spurious arguments for internal kernel > consumers. Do you planed MFC all of this? From owner-svn-src-head@freebsd.org Sun Feb 5 10:01: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 11270CD0A74; Sun, 5 Feb 2017 10:01:35 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-lf0-x243.google.com (mail-lf0-x243.google.com [IPv6:2a00:1450:4010:c07::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8BB718DE; Sun, 5 Feb 2017 10:01:34 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-lf0-x243.google.com with SMTP id x1so1532409lff.0; Sun, 05 Feb 2017 02:01:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=uk9Emlh4INh8+0TzplG1GM06ifLcD0JXMeH55OBB4O4=; b=Fj0W+08g9g7gIEKbdCPit+ooeE16ViIBmaUcPDchQdkm0csD4Jlfq4SMkt+z3yBJjw t1SXISl14EwWRusAb39mQ9X1hENNCvPqGCupNf7yviWvMMp/yc1TyjyzsQ9ioX7LL00S xornnZ69Nak9WACXVKPisHyn8ayEjhb1S8vR1FmQnKqP0QlvP9h+q1fBTg7SsLhtoBya qkea+r8PEt8rvCoPCKMAf/zgI1tcmATVt43kRkF3ZSFniZbGODB/C/vGz2LpiT8ZU4ZQ /YG4aXQzVZ76uUmLdBTC0H+/Barn0hrMv91LuMbpt7yxMx3ubq0aAdVzcdJaMdk6vOWG VMAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=uk9Emlh4INh8+0TzplG1GM06ifLcD0JXMeH55OBB4O4=; b=TnMKM3mw0GL2jA3eS+HZuvIG19pQFoHOrE2QfHX6h280BWtvn+ICKSTGm54jLZUkFv Yw0fmdlLZ7K+pKQ7Q0zOXOl1cenvAKr30P5pXf5T8XizKcPD6MQELEEvFedHSutkHSNp haht+lBE8vFbJeK4vsZO79f+/x2wPZkH2hzmqpl/m3ZKelhd2615V++dh1/Osv0I7B2y 6iQZ9CJioLggdA6cV/CKNvMCDq6YlGUfhPwGEV2HYe3xpLoWe7DEF6LmQ51v7bmT3clC LwDAZMzmEp6ym5QcD3VGT7/wR65GvLdBGYFxHZdwAzioRiLUQ08GDPipF87UcFgAp44w 1s1g== X-Gm-Message-State: AIkVDXJ/AQfz9MTGRnX9abxhxa3oUOvDuoYPUei8zdS761hGdrB0HTvNMzNSYC6scNMx8A== X-Received: by 10.25.234.216 with SMTP id y85mr1667741lfi.35.1486288892130; Sun, 05 Feb 2017 02:01:32 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by smtp.gmail.com with ESMTPSA id 14sm9485004lju.16.2017.02.05.02.01.30 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Sun, 05 Feb 2017 02:01:31 -0800 (PST) Date: Sun, 5 Feb 2017 11:01:28 +0100 From: Mateusz Guzik To: Slawa Olhovchenkov Cc: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313275 - in head/sys: kern sys Message-ID: <20170205100127.GC4375@dft-labs.eu> References: <201702050804.v1584Cim052478@repo.freebsd.org> <20170205100010.GB5366@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20170205100010.GB5366@zxy.spb.ru> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-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, 05 Feb 2017 10:01:35 -0000 On Sun, Feb 05, 2017 at 01:00:11PM +0300, Slawa Olhovchenkov wrote: > On Sun, Feb 05, 2017 at 08:04:12AM +0000, Mateusz Guzik wrote: > > > Author: mjg > > Date: Sun Feb 5 08:04:11 2017 > > New Revision: 313275 > > URL: https://svnweb.freebsd.org/changeset/base/313275 > > > > Log: > > mtx: move lockstat handling out of inline primitives > > > > Lockstat requires checking if it is enabled and if so, calling a 6 argument > > function. Further, determining whether to call it on unlock requires > > pre-reading the lock value. > > > > This is problematic in at least 3 ways: > > - more branches in the hot path than necessary > > - additional cacheline ping pong under contention > > - bigger code > > > > Instead, check first if lockstat handling is necessary and if so, just fall > > back to regular locking routines. For this purpose a new macro is introduced > > (LOCKSTAT_PROFILE_ENABLED). > > > > LOCK_PROFILING uninlines all primitives. Fold in the current inline lock > > variant into the _mtx_lock_flags to retain the support. With this change > > the inline variants are not used when LOCK_PROFILING is defined and thus > > can ignore its existence. > > > > This results in: > > text data bss dec hex filename > > 22259667 1303208 4994976 28557851 1b3c21b kernel.orig > > 21797315 1303208 4994976 28095499 1acb40b kernel.patched > > > > i.e. about 3% reduction in text size. > > > > A remaining action is to remove spurious arguments for internal kernel > > consumers. > > Do you planed MFC all of this? Yes, around march. -- Mateusz Guzik From owner-svn-src-head@freebsd.org Sun Feb 5 10:03: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 B6D63CD0C80; Sun, 5 Feb 2017 10:03:10 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 787FFAD6; Sun, 5 Feb 2017 10:03:10 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1caJf2-000Jy0-B1; Sun, 05 Feb 2017 13:03:08 +0300 Date: Sun, 5 Feb 2017 13:03:08 +0300 From: Slawa Olhovchenkov To: Mateusz Guzik Cc: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313275 - in head/sys: kern sys Message-ID: <20170205100308.GF6599@zxy.spb.ru> References: <201702050804.v1584Cim052478@repo.freebsd.org> <20170205100010.GB5366@zxy.spb.ru> <20170205100127.GC4375@dft-labs.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170205100127.GC4375@dft-labs.eu> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-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, 05 Feb 2017 10:03:10 -0000 On Sun, Feb 05, 2017 at 11:01:28AM +0100, Mateusz Guzik wrote: > On Sun, Feb 05, 2017 at 01:00:11PM +0300, Slawa Olhovchenkov wrote: > > On Sun, Feb 05, 2017 at 08:04:12AM +0000, Mateusz Guzik wrote: > > > > > Author: mjg > > > Date: Sun Feb 5 08:04:11 2017 > > > New Revision: 313275 > > > URL: https://svnweb.freebsd.org/changeset/base/313275 > > > > > > Log: > > > mtx: move lockstat handling out of inline primitives > > > > > > Lockstat requires checking if it is enabled and if so, calling a 6 argument > > > function. Further, determining whether to call it on unlock requires > > > pre-reading the lock value. > > > > > > This is problematic in at least 3 ways: > > > - more branches in the hot path than necessary > > > - additional cacheline ping pong under contention > > > - bigger code > > > > > > Instead, check first if lockstat handling is necessary and if so, just fall > > > back to regular locking routines. For this purpose a new macro is introduced > > > (LOCKSTAT_PROFILE_ENABLED). > > > > > > LOCK_PROFILING uninlines all primitives. Fold in the current inline lock > > > variant into the _mtx_lock_flags to retain the support. With this change > > > the inline variants are not used when LOCK_PROFILING is defined and thus > > > can ignore its existence. > > > > > > This results in: > > > text data bss dec hex filename > > > 22259667 1303208 4994976 28557851 1b3c21b kernel.orig > > > 21797315 1303208 4994976 28095499 1acb40b kernel.patched > > > > > > i.e. about 3% reduction in text size. > > > > > > A remaining action is to remove spurious arguments for internal kernel > > > consumers. > > > > Do you planed MFC all of this? > > Yes, around march. Thanks! From owner-svn-src-head@freebsd.org Sun Feb 5 12:05: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 BAC68CD0E01; Sun, 5 Feb 2017 12:05:42 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5126D812; Sun, 5 Feb 2017 12:05:42 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm0-x244.google.com with SMTP id c85so15502054wmi.1; Sun, 05 Feb 2017 04:05:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=UsUQEkBHiIeHOZ/qmd68oo3xAWq3u0hxKXUPLMuLgOA=; b=gD4QPKRGNl/ZOi+qWDOd92LmKvTKeiqPNJvWzctaNF3S/RiE8fcsz+zfU52HfeG4eN rVW2QCyg3tVm0cgPkQ3cv0Skujz1vestD+KzhBD0YRZ/E7Jf9PbW0bWC0QROGujl3XQv 6Ix5QW2m46f8MC0uNDOftYJ0qgJG9tHH/l9PORBZD+KBTNJXz6vpVh2ynVE7TmCD7VBP +gO8SPqLE2vYRA4xeU3CAsss4T0z/rFnVyBgFNh/J5nt/oZ4aI6t0yaA44+X7ScJ1S5O WkR4pvFVC80LL+ah16SB7tl9BJZz/o5mMhGxq/GzGOa1F28MIjuWsWAIs72Fj59SKe6T MpIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=UsUQEkBHiIeHOZ/qmd68oo3xAWq3u0hxKXUPLMuLgOA=; b=ELFcm4uGRF5ZW8vU3L1FESsk8up1TqRQEbHfSAT8NK547d5k9HDHkkrj524EFfgCko RexP0XH3QQPz5Mjogx2/0vTTJgtspcRcYp44aZ0KNW11iA/YTBv7TzjQECptXK4/J2hw nXazmj7gYqh/lxiRjTZWnceGdQHfwE08demFdeZt1oM5/ZiK7CZIvd5+CNJZEdpEjWI2 bq+spQe9v+tivNKyzmAzeZZoAZxkdBItuxi27XXZ3w7ZzXvQ6RsU3xA0meK+WnebTv9B HYIp1vu+9bz51emlFDA9qAo6I0fGPmtKWGZrWDUUSIC71EsyQwFDLiF1QOFBjMM3cIgj wZQQ== X-Gm-Message-State: AMke39lMn31j9qcwlz7HKzMddsX6FeWEQLVexeQh8Db3aOU5f7IKREANXfAwp7qMPx02pA== X-Received: by 10.28.195.70 with SMTP id t67mr5021601wmf.98.1486296340031; Sun, 05 Feb 2017 04:05:40 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by smtp.gmail.com with ESMTPSA id o42sm54666151wrb.18.2017.02.05.04.05.38 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Sun, 05 Feb 2017 04:05:39 -0800 (PST) Date: Sun, 5 Feb 2017 13:05:36 +0100 From: Mateusz Guzik To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313272 - in head/sys: kern sys Message-ID: <20170205120536.GA16310@dft-labs.eu> References: <201702050520.v155KTW8080845@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201702050520.v155KTW8080845@repo.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-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, 05 Feb 2017 12:05:42 -0000 On Sun, Feb 05, 2017 at 05:20:29AM +0000, Mateusz Guzik wrote: > Author: mjg > Date: Sun Feb 5 05:20:29 2017 > New Revision: 313272 > URL: https://svnweb.freebsd.org/changeset/base/313272 > > Log: > sx: uninline slock/sunlock > > Shared locking routines explicitly read the value and test it. If the > change attempt fails, they fall back to a regular function which would > retry in a loop. > > The problem is that with many concurrent readers the risk of failure is pretty > high and even the value returned by fcmpset is very likely going to be stale > by the time the loop in the fallback routine is reached. > > Uninline said primitives. It gives a throughput increase when doing concurrent > slocks/sunlocks with 80 hardware threads from ~50 mln/s to ~56 mln/s. > > Interestingly, rwlock primitives are already not inlined. > Note that calling to "hard" primitives each is somewhat expensive. In order to remedy part of the cost I intend to introduce uninlined variants which only know how to spin. I have a WIP patch for rwlocks and after I flesh it out I'll adapt it for sx. > Modified: > head/sys/kern/kern_sx.c > head/sys/sys/sx.h > > Modified: head/sys/kern/kern_sx.c > ============================================================================== > --- head/sys/kern/kern_sx.c Sun Feb 5 04:54:20 2017 (r313271) > +++ head/sys/kern/kern_sx.c Sun Feb 5 05:20:29 2017 (r313272) > @@ -276,29 +276,6 @@ sx_destroy(struct sx *sx) > } > > int > -_sx_slock(struct sx *sx, int opts, const char *file, int line) > -{ > - int error = 0; > - > - if (SCHEDULER_STOPPED()) > - return (0); > - KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), > - ("sx_slock() by idle thread %p on sx %s @ %s:%d", > - curthread, sx->lock_object.lo_name, file, line)); > - KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, > - ("sx_slock() of destroyed sx @ %s:%d", file, line)); > - WITNESS_CHECKORDER(&sx->lock_object, LOP_NEWORDER, file, line, NULL); > - error = __sx_slock(sx, opts, file, line); > - if (!error) { > - LOCK_LOG_LOCK("SLOCK", &sx->lock_object, 0, 0, file, line); > - WITNESS_LOCK(&sx->lock_object, 0, file, line); > - TD_LOCKS_INC(curthread); > - } > - > - return (error); > -} > - > -int > sx_try_slock_(struct sx *sx, const char *file, int line) > { > uintptr_t x; > @@ -391,21 +368,6 @@ sx_try_xlock_(struct sx *sx, const char > } > > void > -_sx_sunlock(struct sx *sx, const char *file, int line) > -{ > - > - if (SCHEDULER_STOPPED()) > - return; > - KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, > - ("sx_sunlock() of destroyed sx @ %s:%d", file, line)); > - _sx_assert(sx, SA_SLOCKED, file, line); > - WITNESS_UNLOCK(&sx->lock_object, 0, file, line); > - LOCK_LOG_LOCK("SUNLOCK", &sx->lock_object, 0, 0, file, line); > - __sx_sunlock(sx, file, line); > - TD_LOCKS_DEC(curthread); > -} > - > -void > _sx_xunlock(struct sx *sx, const char *file, int line) > { > > @@ -840,14 +802,8 @@ _sx_xunlock_hard(struct sx *sx, uintptr_ > kick_proc0(); > } > > -/* > - * This function represents the so-called 'hard case' for sx_slock > - * operation. All 'easy case' failures are redirected to this. Note > - * that ideally this would be a static function, but it needs to be > - * accessible from at least sx.h. > - */ > int > -_sx_slock_hard(struct sx *sx, int opts, const char *file, int line) > +_sx_slock(struct sx *sx, int opts, const char *file, int line) > { > GIANT_DECLARE; > #ifdef ADAPTIVE_SX > @@ -1051,14 +1007,8 @@ _sx_slock_hard(struct sx *sx, int opts, > return (error); > } > > -/* > - * This function represents the so-called 'hard case' for sx_sunlock > - * operation. All 'easy case' failures are redirected to this. Note > - * that ideally this would be a static function, but it needs to be > - * accessible from at least sx.h. > - */ > void > -_sx_sunlock_hard(struct sx *sx, const char *file, int line) > +_sx_sunlock(struct sx *sx, const char *file, int line) > { > uintptr_t x; > int wakeup_swapper; > @@ -1066,6 +1016,7 @@ _sx_sunlock_hard(struct sx *sx, const ch > if (SCHEDULER_STOPPED()) > return; > > + LOCKSTAT_PROFILE_RELEASE_RWLOCK(sx__release, sx, LOCKSTAT_READER); > x = SX_READ_VALUE(sx); > for (;;) { > /* > > Modified: head/sys/sys/sx.h > ============================================================================== > --- head/sys/sys/sx.h Sun Feb 5 04:54:20 2017 (r313271) > +++ head/sys/sys/sx.h Sun Feb 5 05:20:29 2017 (r313272) > @@ -111,10 +111,8 @@ void _sx_sunlock(struct sx *sx, const ch > void _sx_xunlock(struct sx *sx, const char *file, int line); > int _sx_xlock_hard(struct sx *sx, uintptr_t v, uintptr_t tid, int opts, > const char *file, int line); > -int _sx_slock_hard(struct sx *sx, int opts, const char *file, int line); > void _sx_xunlock_hard(struct sx *sx, uintptr_t tid, const char *file, int > line); > -void _sx_sunlock_hard(struct sx *sx, const char *file, int line); > #if defined(INVARIANTS) || defined(INVARIANT_SUPPORT) > void _sx_assert(const struct sx *sx, int what, const char *file, int line); > #endif > @@ -179,41 +177,6 @@ __sx_xunlock(struct sx *sx, struct threa > _sx_xunlock_hard(sx, tid, file, line); > } > > -/* Acquire a shared lock. */ > -static __inline int > -__sx_slock(struct sx *sx, int opts, const char *file, int line) > -{ > - uintptr_t x = sx->sx_lock; > - int error = 0; > - > - if (!(x & SX_LOCK_SHARED) || > - !atomic_cmpset_acq_ptr(&sx->sx_lock, x, x + SX_ONE_SHARER)) > - error = _sx_slock_hard(sx, opts, file, line); > - else > - LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(sx__acquire, sx, > - 0, 0, file, line, LOCKSTAT_READER); > - > - return (error); > -} > - > -/* > - * Release a shared lock. We can just drop a single shared lock so > - * long as we aren't trying to drop the last shared lock when other > - * threads are waiting for an exclusive lock. This takes advantage of > - * the fact that an unlocked lock is encoded as a shared lock with a > - * count of 0. > - */ > -static __inline void > -__sx_sunlock(struct sx *sx, const char *file, int line) > -{ > - uintptr_t x = sx->sx_lock; > - > - LOCKSTAT_PROFILE_RELEASE_RWLOCK(sx__release, sx, LOCKSTAT_READER); > - if (x == (SX_SHARERS_LOCK(1) | SX_LOCK_EXCLUSIVE_WAITERS) || > - !atomic_cmpset_rel_ptr(&sx->sx_lock, x, x - SX_ONE_SHARER)) > - _sx_sunlock_hard(sx, file, line); > -} > - > /* > * Public interface for lock operations. > */ > @@ -227,12 +190,6 @@ __sx_sunlock(struct sx *sx, const char * > _sx_xlock((sx), SX_INTERRUPTIBLE, (file), (line)) > #define sx_xunlock_(sx, file, line) \ > _sx_xunlock((sx), (file), (line)) > -#define sx_slock_(sx, file, line) \ > - (void)_sx_slock((sx), 0, (file), (line)) > -#define sx_slock_sig_(sx, file, line) \ > - _sx_slock((sx), SX_INTERRUPTIBLE, (file) , (line)) > -#define sx_sunlock_(sx, file, line) \ > - _sx_sunlock((sx), (file), (line)) > #else > #define sx_xlock_(sx, file, line) \ > (void)__sx_xlock((sx), curthread, 0, (file), (line)) > @@ -240,13 +197,13 @@ __sx_sunlock(struct sx *sx, const char * > __sx_xlock((sx), curthread, SX_INTERRUPTIBLE, (file), (line)) > #define sx_xunlock_(sx, file, line) \ > __sx_xunlock((sx), curthread, (file), (line)) > +#endif /* LOCK_DEBUG > 0 || SX_NOINLINE */ > #define sx_slock_(sx, file, line) \ > - (void)__sx_slock((sx), 0, (file), (line)) > + (void)_sx_slock((sx), 0, (file), (line)) > #define sx_slock_sig_(sx, file, line) \ > - __sx_slock((sx), SX_INTERRUPTIBLE, (file), (line)) > + _sx_slock((sx), SX_INTERRUPTIBLE, (file) , (line)) > #define sx_sunlock_(sx, file, line) \ > - __sx_sunlock((sx), (file), (line)) > -#endif /* LOCK_DEBUG > 0 || SX_NOINLINE */ > + _sx_sunlock((sx), (file), (line)) > #define sx_try_slock(sx) sx_try_slock_((sx), LOCK_FILE, LOCK_LINE) > #define sx_try_xlock(sx) sx_try_xlock_((sx), LOCK_FILE, LOCK_LINE) > #define sx_try_upgrade(sx) sx_try_upgrade_((sx), LOCK_FILE, LOCK_LINE) > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" -- Mateusz Guzik From owner-svn-src-head@freebsd.org Sun Feb 5 13:11: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 A76DECD128D; Sun, 5 Feb 2017 13:11:55 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from sakura.ccs.furiru.org (sakura.ccs.furiru.org [IPv6:2001:2f0:104:8060::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "sakura.ccs.furiru.org", Issuer "sakura.ccs.furiru.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4491EA82; Sun, 5 Feb 2017 13:11:53 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from localhost (authenticated bits=0) by sakura.ccs.furiru.org (unknown) with ESMTPA id v15DBjPm028350; Sun, 5 Feb 2017 22:11:48 +0900 (JST) (envelope-from nyan@FreeBSD.org) Date: Sun, 05 Feb 2017 22:11:44 +0900 (JST) Message-Id: <20170205.221144.1616842004369178243.nyan@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/example... From: TAKAHASHI Yoshihiro In-Reply-To: <201701280222.v0S2MFSR022477@repo.freebsd.org> References: <201701280222.v0S2MFSR022477@repo.freebsd.org> X-Mailer: Mew version 6.7 on Emacs 25.1 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-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, 05 Feb 2017 13:11:55 -0000 I have decided to remove pc98 support on stable/11 as well after 2 weeks to reduce conflicts between head and stable/11. In article <201701280222.v0S2MFSR022477@repo.freebsd.org> Takahashi Yoshihiro writes: > Author: nyan > Date: Sat Jan 28 02:22:15 2017 > New Revision: 312910 > URL: https://svnweb.freebsd.org/changeset/base/312910 > > Log: > Remove pc98 support completely. > I thank all developers and contributors for pc98. > > Relnotes: yes > > Deleted: > head/etc/etc.pc98/ > head/libexec/Makefile.pc98 > head/release/pc98/ > head/sbin/Makefile.pc98 > head/sbin/fdisk_pc98/ > head/share/man/man4/man4.i386/ct.4 > head/share/man/man4/man4.i386/snc.4 > head/share/syscons/keymaps/jp.pc98.iso.kbd > head/share/syscons/keymaps/jp.pc98.kbd > head/share/vt/keymaps/jp.pc98.iso.kbd > head/share/vt/keymaps/jp.pc98.kbd > head/sys/boot/Makefile.pc98 > head/sys/boot/pc98/ > head/sys/conf/Makefile.pc98 > head/sys/conf/files.pc98 > head/sys/conf/options.pc98 > head/sys/dev/aic/aic_cbus.c > head/sys/dev/ata/ata-cbus.c > head/sys/dev/ct/ > head/sys/dev/ed/if_ed98.h > head/sys/dev/ed/if_ed_cbus.c > head/sys/dev/fdc/fdc_cbus.c > head/sys/dev/fe/if_fe_cbus.c > head/sys/dev/ic/i8251.h > head/sys/dev/ic/wd33c93reg.h > head/sys/dev/le/if_le_cbus.c > head/sys/dev/mse/mse_cbus.c > head/sys/dev/snc/ > head/sys/dev/uart/uart_cpu_pc98.c > head/sys/geom/geom_pc98.c > head/sys/geom/geom_pc98_enc.c > head/sys/geom/part/g_part_pc98.c > head/sys/modules/canbepm/ > head/sys/modules/canbus/ > head/sys/modules/ct/ > head/sys/modules/geom/geom_part/geom_part_pc98/ > head/sys/modules/geom/geom_pc98/ > head/sys/modules/pmc/ > head/sys/modules/snc/ > head/sys/pc98/ > head/sys/sys/disk/pc98.h > head/sys/sys/diskpc98.h > head/usr.bin/mkimg/pc98.c > head/usr.bin/mkimg/tests/img-1x1-4096-pc98.qcow.gz.uu > head/usr.bin/mkimg/tests/img-1x1-4096-pc98.qcow2.gz.uu > head/usr.bin/mkimg/tests/img-1x1-4096-pc98.raw.gz.uu > head/usr.bin/mkimg/tests/img-1x1-4096-pc98.vhd.gz.uu > head/usr.bin/mkimg/tests/img-1x1-4096-pc98.vhdf.gz.uu > head/usr.bin/mkimg/tests/img-1x1-4096-pc98.vmdk.gz.uu > head/usr.bin/mkimg/tests/img-1x1-512-pc98.qcow.gz.uu > head/usr.bin/mkimg/tests/img-1x1-512-pc98.qcow2.gz.uu > head/usr.bin/mkimg/tests/img-1x1-512-pc98.raw.gz.uu > head/usr.bin/mkimg/tests/img-1x1-512-pc98.vhd.gz.uu > head/usr.bin/mkimg/tests/img-1x1-512-pc98.vhdf.gz.uu > head/usr.bin/mkimg/tests/img-1x1-512-pc98.vmdk.gz.uu > head/usr.bin/mkimg/tests/img-63x255-4096-pc98.qcow.gz.uu > head/usr.bin/mkimg/tests/img-63x255-4096-pc98.qcow2.gz.uu > head/usr.bin/mkimg/tests/img-63x255-4096-pc98.raw.gz.uu > head/usr.bin/mkimg/tests/img-63x255-4096-pc98.vhd.gz.uu > head/usr.bin/mkimg/tests/img-63x255-4096-pc98.vhdf.gz.uu > head/usr.bin/mkimg/tests/img-63x255-4096-pc98.vmdk.gz.uu > head/usr.bin/mkimg/tests/img-63x255-512-pc98.qcow.gz.uu > head/usr.bin/mkimg/tests/img-63x255-512-pc98.qcow2.gz.uu > head/usr.bin/mkimg/tests/img-63x255-512-pc98.raw.gz.uu > head/usr.bin/mkimg/tests/img-63x255-512-pc98.vhd.gz.uu > head/usr.bin/mkimg/tests/img-63x255-512-pc98.vhdf.gz.uu > head/usr.bin/mkimg/tests/img-63x255-512-pc98.vmdk.gz.uu > head/usr.sbin/boot98cfg/ > head/usr.sbin/bsdinstall/partedit/partedit_pc98.c > Modified: > head/Makefile > head/Makefile.inc1 > head/ObsoleteFiles.inc > head/etc/rc.d/syscons > head/lib/libsysdecode/Makefile > head/lib/libsysdecode/mkioctls > head/release/doc/README > head/release/doc/en_US.ISO8859-1/hardware/article.xml > head/release/doc/en_US.ISO8859-1/readme/article.xml > head/release/doc/share/examples/Makefile.relnotesng > head/release/doc/share/misc/dev.archlist.txt > head/release/doc/share/xml/release.ent > head/release/rc.local > head/rescue/rescue/Makefile > head/sbin/bsdlabel/bsdlabel.8 > head/sbin/bsdlabel/bsdlabel.c > head/sbin/geom/class/part/gpart.8 > head/share/examples/bootforth/frames.4th > head/share/man/man4/adv.4 > head/share/man/man4/ahc.4 > head/share/man/man4/apic.4 > head/share/man/man4/ed.4 > head/share/man/man4/esp.4 > head/share/man/man4/fxp.4 > head/share/man/man4/geom.4 > head/share/man/man4/man4.i386/Makefile > head/share/man/man4/man4.i386/aic.4 > head/share/man/man4/ncr.4 > head/share/man/man4/ncv.4 > head/share/man/man4/sym.4 > head/share/mk/bsd.stand.mk > head/share/mk/local.meta.sys.mk > head/share/syscons/keymaps/INDEX.keymaps > head/share/syscons/keymaps/Makefile > head/share/vt/keymaps/INDEX.keymaps > head/share/vt/keymaps/Makefile > head/sys/Makefile > head/sys/boot/common/Makefile.inc > head/sys/boot/common/isapnp.h > head/sys/boot/ficl/loader.c > head/sys/boot/forth/frames.4th > head/sys/cam/cam_xpt.c > head/sys/conf/NOTES > head/sys/conf/config.mk > head/sys/conf/files > head/sys/conf/files.amd64 > head/sys/conf/files.i386 > head/sys/conf/options > head/sys/crypto/aesni/aesni.h > head/sys/crypto/via/padlock.c > head/sys/crypto/via/padlock_hash.c > head/sys/dev/ata/ata-all.h > head/sys/dev/ep/if_ep_isa.c > head/sys/dev/exca/excareg.h > head/sys/dev/fb/fb.c > head/sys/dev/fb/splash_bmp.c > head/sys/dev/fdc/fdc.c > head/sys/dev/fdc/fdcvar.h > head/sys/dev/fe/if_fe.c > head/sys/dev/fe/if_fereg.h > head/sys/dev/kbd/kbd.c > head/sys/dev/le/am79900.c > head/sys/dev/mse/msevar.h > head/sys/dev/pccbb/pccbb_isa.c > head/sys/dev/pci/vga_pci.c > head/sys/dev/ppc/ppc.c > head/sys/dev/ppc/ppcreg.h > head/sys/dev/sio/sio_pccard.c > head/sys/dev/sio/sio_pci.c > head/sys/dev/sio/sio_puc.c > head/sys/dev/sio/siovar.h > head/sys/dev/sound/isa/mss.c > head/sys/dev/sound/isa/mss.h > head/sys/dev/sound/isa/sbc.c > head/sys/dev/syscons/daemon/daemon_saver.c > head/sys/dev/syscons/dragon/dragon_saver.c > head/sys/dev/syscons/fire/fire_saver.c > head/sys/dev/syscons/logo/logo_saver.c > head/sys/dev/syscons/plasma/plasma_saver.c > head/sys/dev/syscons/rain/rain_saver.c > head/sys/dev/syscons/scmouse.c > head/sys/dev/syscons/scvidctl.c > head/sys/dev/syscons/star/star_saver.c > head/sys/dev/syscons/syscons.c > head/sys/dev/syscons/syscons.h > head/sys/dev/syscons/warp/warp_saver.c > head/sys/dev/uart/uart.h > head/sys/dev/uart/uart_bus_isa.c > head/sys/geom/geom_bsd.c > head/sys/i386/bios/apm.c > head/sys/i386/bios/apm.h > head/sys/i386/i386/genassym.c > head/sys/i386/i386/initcpu.c > head/sys/i386/i386/locore.s > head/sys/i386/i386/machdep.c > head/sys/i386/i386/mp_machdep.c > head/sys/i386/i386/mpboot.s > head/sys/i386/i386/vm_machdep.c > head/sys/i386/isa/elink.h > head/sys/i386/isa/npx.c > head/sys/i386/pci/pci_pir.c > head/sys/isa/isareg.h > head/sys/isa/isavar.h > head/sys/isa/pnp.c > head/sys/isa/pnpreg.h > head/sys/modules/Makefile > head/sys/modules/Makefile.inc > head/sys/modules/aic/Makefile > head/sys/modules/apm/Makefile > head/sys/modules/ata/Makefile > head/sys/modules/drm2/Makefile > head/sys/modules/ed/Makefile > head/sys/modules/fdc/Makefile > head/sys/modules/fe/Makefile > head/sys/modules/geom/geom_part/Makefile > head/sys/modules/i2c/controllers/Makefile > head/sys/modules/le/Makefile > head/sys/modules/mse/Makefile > head/sys/modules/ppc/Makefile > head/sys/modules/sio/Makefile > head/sys/modules/sound/sound/Makefile > head/sys/sys/consio.h > head/sys/sys/copyright.h > head/sys/sys/fbio.h > head/sys/sys/fdcio.h > head/sys/x86/isa/atpic.c > head/sys/x86/isa/clock.c > head/sys/x86/isa/icu.h > head/sys/x86/isa/isa.c > head/sys/x86/x86/autoconf.c > head/sys/x86/x86/cpu_machdep.c > head/sys/x86/x86/intr_machdep.c > head/sys/x86/x86/mptable.c > head/sys/x86/x86/nexus.c > head/targets/pseudo/userland/Makefile.depend > head/targets/pseudo/userland/misc/Makefile.depend > head/tools/build/mk/OptionalObsoleteFiles.inc > head/tools/tools/kerninclude/kerninclude.sh > head/tools/tools/sysdoc/sysdoc.sh > head/tools/tools/vt/keymaps/KBDFILES.map > head/tools/tools/vt/keymaps/convert-keymap.pl > head/usr.bin/mkimg/Makefile > head/usr.bin/mkimg/tests/mkimg.sh > head/usr.sbin/Makefile.i386 > head/usr.sbin/bsdinstall/partedit/gpart_ops.c > head/usr.sbin/bsdinstall/partedit/part_wizard.c > head/usr.sbin/bsdinstall/partedit/scripted.c > head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_partition_tbl.c > head/usr.sbin/config/config.5 > head/usr.sbin/fdcontrol/Makefile > head/usr.sbin/fdformat/Makefile > head/usr.sbin/fdread/Makefile > head/usr.sbin/fdread/fdutil.c > head/usr.sbin/kgzip/kgzip.8 > head/usr.sbin/pc-sysinstall/backend-partmanager/create-part.sh > head/usr.sbin/pnpinfo/Makefile > head/usr.sbin/vidcontrol/vidcontrol.c > > Modified: head/Makefile > ============================================================================== > --- head/Makefile Sat Jan 28 00:40:36 2017 (r312909) > +++ head/Makefile Sat Jan 28 02:22:15 2017 (r312910) > @@ -236,7 +236,7 @@ _MAKE+= MK_META_MODE=no > > # Guess machine architecture from machine type, and vice versa. > .if !defined(TARGET_ARCH) && defined(TARGET) > -_TARGET_ARCH= ${TARGET:S/pc98/i386/:S/arm64/aarch64/} > +_TARGET_ARCH= ${TARGET:S/arm64/aarch64/} > .elif !defined(TARGET) && defined(TARGET_ARCH) && \ > ${TARGET_ARCH} != ${MACHINE_ARCH} > _TARGET= ${TARGET_ARCH:C/mips(n32|64)?(el)?(hf)?/mips/:C/arm(v6)?(eb)?/arm/:C/aarch64/arm64/:C/powerpc64/powerpc/:C/powerpcspe/powerpc/:C/riscv64(sf)?/riscv/} > @@ -417,13 +417,12 @@ worlds: .PHONY > # existing system is. > # > .if make(universe) || make(universe_kernels) || make(tinderbox) || make(targets) > -TARGETS?=amd64 arm arm64 i386 mips pc98 powerpc sparc64 > +TARGETS?=amd64 arm arm64 i386 mips powerpc sparc64 > _UNIVERSE_TARGETS= ${TARGETS} > TARGET_ARCHES_arm?= arm armeb armv6 > TARGET_ARCHES_arm64?= aarch64 > TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32 mipselhf mipshf mips64elhf mips64hf > TARGET_ARCHES_powerpc?= powerpc powerpc64 powerpcspe > -TARGET_ARCHES_pc98?= i386 > .for target in ${TARGETS} > TARGET_ARCHES_${target}?= ${target} > .endfor > > Modified: head/Makefile.inc1 > ============================================================================== > --- head/Makefile.inc1 Sat Jan 28 00:40:36 2017 (r312909) > +++ head/Makefile.inc1 Sat Jan 28 02:22:15 2017 (r312910) > @@ -349,7 +349,6 @@ KNOWN_ARCHES?= aarch64/arm64 \ > armeb/arm \ > armv6/arm \ > i386 \ > - i386/pc98 \ > mips \ > mipsel/mips \ > mips64el/mips \ > > Modified: head/ObsoleteFiles.inc > ============================================================================== > --- head/ObsoleteFiles.inc Sat Jan 28 00:40:36 2017 (r312909) > +++ head/ObsoleteFiles.inc Sat Jan 28 02:22:15 2017 (r312910) > @@ -38,6 +38,17 @@ > # xargs -n1 | sort | uniq -d; > # done > > +# 20170128: remove pc98 support > +OLD_FILES+=usr/include/dev/ic/i8251.h > +OLD_FILES+=usr/include/dev/ic/wd33c93reg.h > +OLD_FILES+=usr/include/sys/disk/pc98.h > +OLD_FILES+=usr/include/sys/diskpc98.h > +OLD_FILES+=usr/share/man/man4/i386/ct.4.gz > +OLD_FILES+=usr/share/man/man4/i386/snc.4.gz > +OLD_FILES+=usr/share/syscons/keymaps/jp.pc98.iso.kbd > +OLD_FILES+=usr/share/syscons/keymaps/jp.pc98.kbd > +OLD_FILES+=usr/share/vt/keymaps/jp.pc98.iso.kbd > +OLD_FILES+=usr/share/vt/keymaps/jp.pc98.kbd > # 20170110: Four files from ggate tests consolidated into one > OLD_FILES+=usr/tests/sys/geom/class/gate/1_test > OLD_FILES+=usr/tests/sys/geom/class/gate/2_test > > Modified: head/etc/rc.d/syscons > ============================================================================== > --- head/etc/rc.d/syscons Sat Jan 28 00:40:36 2017 (r312909) > +++ head/etc/rc.d/syscons Sat Jan 28 02:22:15 2017 (r312910) > @@ -112,7 +112,6 @@ icelandic.iso) echo is;; > it.iso) echo it;; > jp.106x) echo jp.capsctrl;; > jp.106) echo jp;; > -#?? jp.pc98.iso) echo jp.pc98;; > kk.pt154.io) echo kz.io;; > kk.pt154.kst) echo kz.kst;; > latinamerican.iso.acc) echo latinamerican.acc;; > > Modified: head/lib/libsysdecode/Makefile > ============================================================================== > --- head/lib/libsysdecode/Makefile Sat Jan 28 00:40:36 2017 (r312909) > +++ head/lib/libsysdecode/Makefile Sat Jan 28 02:22:15 2017 (r312910) > @@ -120,7 +120,7 @@ tables.h: mktables > ioctl.c: .PHONY > .endif > ioctl.c: mkioctls .META > - env MACHINE=${MACHINE} CPP="${CPP}" \ > + env CPP="${CPP}" \ > /bin/sh ${.CURDIR}/mkioctls ${DESTDIR}${INCLUDEDIR} > ${.TARGET} > > beforedepend: ioctl.c tables.h > > Modified: head/lib/libsysdecode/mkioctls > ============================================================================== > --- head/lib/libsysdecode/mkioctls Sat Jan 28 00:40:36 2017 (r312909) > +++ head/lib/libsysdecode/mkioctls Sat Jan 28 02:22:15 2017 (r312910) > @@ -24,15 +24,7 @@ ioctl_includes=$( > awk '{printf("#include <%s>\\n", $1)}' > ) > > -: ${MACHINE=$(uname -m)} > -case "${MACHINE}" in > -*pc98*) > - ioctl_includes="$ioctl_includes#include \\n" > - ;; > -*) > - ioctl_includes="$ioctl_includes#include \\n" > - ;; > -esac > +ioctl_includes="$ioctl_includes#include \\n" > > awk -v x="$ioctl_includes" 'BEGIN {print x}' | > $CPP -nostdinc -I$includedir -dM -DCOMPAT_43TTY - | > > Modified: head/release/doc/README > ============================================================================== > --- head/release/doc/README Sat Jan 28 00:40:36 2017 (r312909) > +++ head/release/doc/README Sat Jan 28 02:22:15 2017 (r312910) > @@ -99,7 +99,7 @@ element will be included. For example: > > SPARC64-specific text > > -The currently-supported architectures are amd64, arm, i386, pc98, > +The currently-supported architectures are amd64, arm, i386, > powerpc and sparc64. An element may appear for multiple architectures > by specifying a comma-separated list of architectures > (i.e. arch="sparc64,amd64"). > > Modified: head/release/doc/en_US.ISO8859-1/hardware/article.xml > ============================================================================== > --- head/release/doc/en_US.ISO8859-1/hardware/article.xml Sat Jan 28 00:40:36 2017 (r312909) > +++ head/release/doc/en_US.ISO8859-1/hardware/article.xml Sat Jan 28 02:22:15 2017 (r312910) > @@ -252,35 +252,6 @@ > more information. > > > - > - pc98 > - > - NEC PC-9801/9821 series with almost all &i386;-compatible > - processors, including 80486, &pentium;, &pentium; Pro, > - &pentium; II, and variants. All &i386;-compatible processors > - by AMD, Cyrix, IBM, and IDT are also supported. > - > - NEC FC-9801/9821 series, and NEC SV-98 series (both of > - them are compatible with PC-9801/9821 series) should be > - supported. > - > - EPSON PC-386/486/586 series, which are compatible with NEC > - PC-9801 series are supported. > - > - High-resolution mode is not supported. NEC > - PC-98XA/XL/RL/XL^2, and NEC PC-H98 series are supported in > - normal (PC-9801 compatible) mode only. > - > - Although there are some multi-processor systems (such as > - Rs20/B20), SMP-related features of &os; are not supported > - yet. > - > - PC-9801/9821 standard bus (called C-Bus), PC-9801NOTE > - expansion bus (110pin), and PCI bus are supported. New Extend > - Standard Architecture (NESA) bus (used in PC-H98, SV-H98, and > - FC-H98 series) is not supported. > - > - > > powerpc > > @@ -636,17 +607,9 @@ > > Disk Controllers > > - [&arch.amd64;, &arch.i386;, &arch.pc98;, &arch.sparc64;] > + [&arch.amd64;, &arch.i386;, &arch.sparc64;] > IDE/ATA controllers (&man.ata.4; driver) > > - [&arch.pc98;] IDE/ATA controllers (wdc driver) > - > - > - > - On-board IDE controller > - > - > - > &hwlist.aac; > > &hwlist.adv; > @@ -673,8 +636,6 @@ > > &hwlist.ciss; > > - &hwlist.ct; > - > &hwlist.dpt; > > > @@ -894,8 +855,6 @@ > > &hwlist.sn; > > - &hwlist.snc; > - > &hwlist.ste; > > &hwlist.stge; > @@ -904,7 +863,7 @@ > > &hwlist.tl; > > - [&arch.amd64;, &arch.i386;, &arch.pc98;] SMC 83c17x > + [&arch.amd64;, &arch.i386;] SMC 83c17x > (EPIC)-based Ethernet NICs (&man.tx.4; driver) > > &hwlist.txp; > @@ -934,8 +893,7 @@ > > FDDI Interfaces > > - [&arch.i386;, &arch.pc98;] DEC DEFPA PCI (&man.fpa.4; > - driver) > + [&arch.i386;] DEC DEFPA PCI (&man.fpa.4; driver) > > [&arch.i386;] DEC DEFEA EISA (&man.fpa.4; driver) > > @@ -943,28 +901,28 @@ > > ATM Interfaces > > - [&arch.i386;, &arch.pc98;] Midway-based ATM interfaces > + [&arch.i386;] Midway-based ATM interfaces > (&man.en.4; driver) > > - [&arch.i386;, &arch.pc98; &arch.sparc64;] FORE Systems, > + [&arch.i386;, &arch.sparc64;] FORE Systems, > Inc. PCA-200E ATM PCI Adapters (hfa and &man.fatm.4; > drivers) > > - [&arch.i386;, &arch.pc98;] IDT NICStAR 77201/211-based ATM > + [&arch.i386;] IDT NICStAR 77201/211-based ATM > Adapters (&man.idt.4; driver) > > - [&arch.i386;, &arch.pc98; &arch.sparc64;] FORE Systems, > + [&arch.i386;, &arch.sparc64;] FORE Systems, > Inc. HE155 and HE622 ATM interfaces (&man.hatm.4; > driver) > > - [&arch.i386;, &arch.pc98;] IDT77252-based ATM cards > + [&arch.i386;] IDT77252-based ATM cards > (&man.patm.4; driver) > > > > Wireless Network Interfaces > > - [&arch.amd64;, &arch.i386;, &arch.pc98;] Cisco/Aironet > + [&arch.amd64;, &arch.i386;] Cisco/Aironet > 802.11b wireless adapters (&man.an.4; driver) > > &hwlist.ath; > @@ -1016,7 +974,7 @@ > > &hwlist.urtw; > > - [&arch.amd64;, &arch.i386;, &arch.pc98;] Lucent > + [&arch.amd64;, &arch.i386;] Lucent > Technologies WaveLAN/IEEE 802.11b wireless network adapters > and workalikes using the Lucent Hermes, Intersil PRISM-II, > Intersil PRISM-2.5, Intersil Prism-3, and Symbol Spectrum24 > @@ -1214,77 +1172,6 @@ > > &hwlist.rc; > > - [&arch.pc98;] Internel serial interfaces (&man.sio.4; > - driver) > - > - > - > - PC-9801 on-board > - > - > - PC-9821 2'nd CCU (flags 0x12000000) > - > - > - > - [&arch.pc98;] NEC PC-9861K, PC-9801-101 and Midori-Denshi > - MDC-926Rs (&man.sio.4; driver) > - > - > - > - COM2 (flags 0x01000000) > - > - > - > - COM3 (flags 0x02000000) > - > - > - > - [&arch.pc98;] NEC PC-9801-120 (&man.sio.4; driver) > - > - > - "flags 0x11000000" is necessary in kernel > - configuration. > - > - > - [&arch.pc98;] Microcore MC-16550, MC-16550II, MC-RS98 > - (&man.sio.4; driver) > - > - > - "flags 0x14000?01" is necessary in kernel > - configuration. > - > - > - [&arch.pc98;] Media Intelligent RSB-2000, RSB-3000 and > - AIWA B98-02 (&man.sio.4; driver) > - > - > - "flags 0x15000?01" is necessary in kernel > - configuration. > - > - > - [&arch.pc98;] Media Intelligent RSB-384 (&man.sio.4; > - driver) > - > - > - "flags 0x16000001" is necessary in kernel > - configuration. > - > - > - [&arch.pc98;] I-O DATA RSA-98III (&man.sio.4; > - driver) > - > - > - "flags 0x18000?01" is necessary in kernel > - configuration. > - > - > - [&arch.pc98;] Hayes ESP98 (&man.sio.4; driver) > - > - > - "options COM_ESP" and "flags 0x19000000" are necessary > - in kernel configuration. > - > - > > > > @@ -1350,35 +1237,6 @@ > > &hwlist.snd.vibes; > > - [&arch.pc98;] NEC PC-9801-73, 86 and compatibles (nss > - driver) > - > - > - > - NEC A-MATE internal sound > - > - > - > - Q-Vision WaveStar, WaveMaster > - > - > - > - [&arch.pc98;] NEC X-MATE, CanBe, ValueStar internal (mss > - driver) > - > - [&arch.pc98;] Creative Technologies SoundBlaster(98) > - (&man.sb.4; driver) > - > - [&arch.pc98;] I-O DATA CD-BOX (&man.sb.4; driver) > - > - [&arch.pc98;] MPU-401 and compatible interfaces (mpu > - driver) > - > - > - > - Q-Vision WaveStar > - > - > > > > @@ -1392,7 +1250,7 @@ > > USB Devices > > - [&arch.amd64;, &arch.i386;, &arch.pc98;] A > + [&arch.amd64;, &arch.i386;] A > range of USB peripherals are supported; devices known to work > are listed in this section. Owing to the generic nature of > most USB devices, with some exceptions any device of a given > @@ -1400,14 +1258,14 @@ > here. > > > - [&arch.amd64;, &arch.i386;, &arch.pc98;] > + [&arch.amd64;, &arch.i386;] > USB Ethernet adapters can be found in the section listing > Ethernet > interfaces. > > > > - [&arch.amd64;, &arch.i386;, &arch.pc98;] > + [&arch.amd64;, &arch.i386;] > USB Bluetooth adapters can be found in Bluetooth section. > > > @@ -1415,18 +1273,15 @@ > > &hwlist.uhci; > > - [&arch.amd64;, &arch.i386;, &arch.pc98;] USB > + [&arch.amd64;, &arch.i386;] USB > 2.0 controllers using the EHCI interface (&man.ehci.4; > driver) > > - [&arch.amd64;, &arch.i386;, &arch.pc98;] > - Hubs > + [&arch.amd64;, &arch.i386;] Hubs > > - [&arch.amd64;, &arch.i386;, &arch.pc98;] > - Keyboards (&man.ukbd.4; driver) > + [&arch.amd64;, &arch.i386;] Keyboards (&man.ukbd.4; driver) > > - [&arch.amd64;, &arch.i386;, &arch.pc98;] > - Miscellaneous > + [&arch.amd64;, &arch.i386;] Miscellaneous > > > > @@ -1454,8 +1309,7 @@ > > &hwlist.umodem; > > - [&arch.amd64;, &arch.i386;, &arch.pc98;] Mice > - (&man.ums.4; driver) > + [&arch.amd64;, &arch.i386;] Mice (&man.ums.4; driver) > > &hwlist.ulpt; > > @@ -1471,7 +1325,7 @@ > > &hwlist.umass; > > - [&arch.amd64;, &arch.i386;, &arch.pc98;] Audio Devices > + [&arch.amd64;, &arch.i386;] Audio Devices > (&man.uaudio.4; driver) > > &hwlist.uvisor; > @@ -1507,8 +1361,7 @@ > > Miscellaneous > > - [&arch.amd64;, &arch.i386;, &arch.pc98;] > - FAX-Modem/PCCARD > + [&arch.amd64;, &arch.i386;] FAX-Modem/PCCARD > > > > @@ -1521,7 +1374,7 @@ > > > > - [&arch.amd64;, &arch.i386;, &arch.pc98;] Floppy drives > + [&arch.amd64;, &arch.i386;] Floppy drives > (&man.fdc.4; driver) > > [&arch.amd64;, &arch.i386;] VGA-compatible video cards > @@ -1533,8 +1386,7 @@ > found at http://www.x.org/. > > > - [&arch.amd64;, &arch.i386;, &arch.pc98;] > - Keyboards including: > + [&arch.amd64;, &arch.i386;] Keyboards including: > > > > @@ -1548,21 +1400,17 @@ > > > > - [&arch.pc98;] Standard keyboards > - > - > - > - [&arch.amd64;, &arch.i386;, &arch.pc98;] > + [&arch.amd64;, &arch.i386;] > USB keyboards (&man.ukbd.4; driver) > > > > - [&arch.amd64;, &arch.i386;, &arch.pc98;] > + [&arch.amd64;, &arch.i386;] > Pointing devices including: > > > > - [&arch.amd64;, &arch.i386;, &arch.pc98;] Bus mice and > + [&arch.amd64;, &arch.i386;] Bus mice and > compatible devices (&man.mse.4; driver) > > > @@ -1577,7 +1425,7 @@ > > > > - [&arch.amd64;, &arch.i386;, &arch.pc98;] > + [&arch.amd64;, &arch.i386;] > USB mice (&man.ums.4; driver) > > > @@ -1591,17 +1439,10 @@ > [&arch.amd64;, &arch.i386;] PC standard > parallel ports (&man.ppc.4; driver) > > - [&arch.pc98;] PC-9821 standard parallel > - ports (&man.ppc.4; driver) > - > [&arch.i386;, &arch.amd64;] PC-compatible joysticks > (&man.joy.4; driver) > > - [&arch.pc98;] Joystick port of SoundBlaster(98) > - (&man.joy.4; driver) > - > - [&arch.i386;, &arch.pc98;] PHS Data Communication > - Card/PCCARD > + [&arch.i386;] PHS Data Communication Card/PCCARD > > > > @@ -1621,8 +1462,6 @@ > cards compatible with the HOT1 from Virtual Computers (xrpu > driver). > > - [&arch.pc98;] Power Management Controller of NEC PC-98 > - Note (pmc driver) > > > > > Modified: head/release/doc/en_US.ISO8859-1/readme/article.xml > ============================================================================== > --- head/release/doc/en_US.ISO8859-1/readme/article.xml Sat Jan 28 00:40:36 2017 (r312909) > +++ head/release/doc/en_US.ISO8859-1/readme/article.xml Sat Jan 28 02:22:15 2017 (r312910) > @@ -69,7 +69,6 @@ > &os; is an operating system based on 4.4 BSD Lite for > AMD64 and Intel EM64T based PC hardware (&arch.amd64;), > Intel, AMD, Cyrix or NexGen x86 based PC hardware (&arch.i386;), > - NEC PC-9801/9821 series PCs and compatibles (&arch.pc98;), > and &ultrasparc; machines (&arch.sparc64;). Versions > for the &arm; (&arch.arm;), &mips; (&arch.mips;), and > &powerpc; (&arch.powerpc;) architectures are currently under > @@ -324,7 +323,7 @@ > > > On platforms that support &man.bsdinstall.8; (currently > - &arch.amd64;, &arch.i386;, &arch.pc98;, and &arch.sparc64;), these documents are generally available via the > + &arch.amd64;, &arch.i386;, and &arch.sparc64;), these documents are generally available via the > Documentation menu during installation. Once the system is > installed, you can revisit this menu by re-running the > &man.bsdinstall.8; utility. > > Modified: head/release/doc/share/examples/Makefile.relnotesng > ============================================================================== > --- head/release/doc/share/examples/Makefile.relnotesng Sat Jan 28 00:40:36 2017 (r312909) > +++ head/release/doc/share/examples/Makefile.relnotesng Sat Jan 28 02:22:15 2017 (r312910) > @@ -6,7 +6,7 @@ > # the build tree. > # > > -ARCHS= amd64 i386 pc98 powerpc sparc64 > +ARCHS= amd64 i386 powerpc sparc64 > MULTITEXTS= > UNITEXTS= hardware readme relnotes errata > > > Modified: head/release/doc/share/misc/dev.archlist.txt > ============================================================================== > --- head/release/doc/share/misc/dev.archlist.txt Sat Jan 28 00:40:36 2017 (r312909) > +++ head/release/doc/share/misc/dev.archlist.txt Sat Jan 28 02:22:15 2017 (r312910) > @@ -36,43 +36,42 @@ > # [,...] > # > aac i386,amd64 > -adv i386,pc98,amd64 > -adw i386,pc98,amd64 > +adv i386,amd64 > +adw i386,amd64 > aha i386 > ahb i386 > ahd i386,sparc64,amd64 > -aic i386,pc98,amd64 > -amd i386,pc98,amd64 > +aic i386,amd64 > +amd i386,amd64 > arcmsr i386,amd64 > asr i386 > -ath i386,pc98,amd64,sparc64 > -aue i386,pc98,amd64,powerpc > -axe i386,pc98,amd64,powerpc > +ath i386,amd64,sparc64 > +aue i386,amd64,powerpc > +axe i386,amd64,powerpc > bce i386,amd64 > -bge i386,pc98,sparc64,amd64 > -bktr i386,pc98 > +bge i386,sparc64,amd64 > +bktr i386 > bt i386,amd64 > bxe i386,amd64 > -cdce i386,pc98,amd64,powerpc > +cdce i386,amd64,powerpc > ciss i386,amd64 > -ce i386,pc98 > +ce i386 > cm i386 > -cnw i386,pc98,amd64 > -cp i386,pc98 > -ct pc98 > +cnw i386,amd64 > +cp i386 > ctau i386 > -cue i386,pc98,amd64,powerpc > +cue i386,amd64,powerpc > cx i386 > cxgb i386,amd64 > -de i386,pc98,amd64 > +de i386,amd64 > dpt i386,amd64 > -ed i386,pc98 > -ep i386,pc98,amd64 > +ed i386 > +ep i386,amd64 > esp sparc64 > ex i386,amd64 > -fe i386,pc98,amd64 > +fe i386,amd64 > fwohci i386,sparc64,amd64,powerpc > -hifn i386,pc98,amd64 > +hifn i386,amd64 > hpt27xx i386,amd64 > hptiop i386,amd64 > hptmv i386,amd64 > @@ -83,26 +82,26 @@ iir i386,amd64 > ips i386,amd64 > isci i386,amd64 > ixgb i386,amd64 > -kue i386,pc98,amd64,powerpc > -lge i386,pc98,amd64 > +kue i386,amd64,powerpc > +lge i386,amd64 > mfi i386,amd64 > mlx i386,amd64 > mly i386,amd64 > msk i386,amd64 > mxge i386,amd64 > -my i386,pc98 > -ncr i386,pc98,amd64 > -ncv i386,pc98 > +my i386 > +ncr i386,amd64 > +ncv i386 > nfe i386,amd64 > -ng_bt3c i386,pc98,amd64 > -ng_ubt i386,pc98,amd64 > -nsp i386,pc98 > +ng_bt3c i386,amd64 > +ng_ubt i386,amd64 > +nsp i386 > nxge i386,amd64 > oce i386,amd64 > -ohci i386,pc98,amd64,powerpc > +ohci i386,amd64,powerpc > oltr i386 > otus i386,amd64 > -pcn i386,pc98,amd64 > +pcn i386,amd64 > pst i386 > qlxgb amd64 > qlxgbe amd64 > @@ -110,14 +109,13 @@ qlxge amd64 > rc i386 > ral i386,amd64 > rsu i386,amd64 > -rue i386,pc98,amd64 > +rue i386,amd64 > rum i386,amd64 > run i386,amd64 > -safe i386,pc98,amd64 > +safe i386,amd64 > sbp i386,sparc64,amd64 > sfgxe amd64 > sn i386,amd64 > -snc pc98 > snd_ad1816 i386,amd64 > snd_als4000 i386 > snd_atiixp i386,amd64 > @@ -148,31 +146,31 @@ snd_t4dwave i386,amd64,sparc64 > snd_via8233 i386,amd64 > snd_via82c686 i386,amd64 > snd_vibes i386,amd64 > -stg i386,pc98 > -ti i386,pc98,amd64,sparc64 > -tl i386,pc98,amd64 > +stg i386 > +ti i386,amd64,sparc64 > +tl i386,amd64 > trm i386,amd64 > twa i386,amd64 > twe i386,amd64 > tws i386,amd64 > -ubsa i386,pc98,amd64 > -ubsec i386,pc98,amd64 > -ubser i386,pc98,amd64 > -ucycom i386,pc98,amd64 > -udav i386,pc98,amd64 > -uftdi i386,pc98,amd64 > -uhci i386,pc98,amd64,powerpc > -ulpt i386,pc98,amd64,powerpc > -umass i386,pc98,amd64,powerpc > -umodem i386,pc98,amd64 > -uplcom i386,pc98,amd64 > +ubsa i386,amd64 > +ubsec i386,amd64 > +ubser i386,amd64 > +ucycom i386,amd64 > +udav i386,amd64 > +uftdi i386,amd64 > +uhci i386,amd64,powerpc > +ulpt i386,amd64,powerpc > +umass i386,amd64,powerpc > +umodem i386,amd64 > +uplcom i386,amd64 > ural i386,amd64 > -urio i386,pc98,amd64,powerpc > -uvisor i386,pc98,amd64 > -uvscom i386,pc98,amd64 > +urio i386,amd64,powerpc > +uvisor i386,amd64 > +uvscom i386,amd64 > vpo i386 > -vx i386,pc98,amd64 > +vx i386,amd64 > vxge i386,amd64 > -wb i386,pc98,amd64 > +wb i386,amd64 > xe i386,amd64 > zyd i386,amd64 > > Modified: head/release/doc/share/xml/release.ent > ============================================================================== > --- head/release/doc/share/xml/release.ent Sat Jan 28 00:40:36 2017 (r312909) > +++ head/release/doc/share/xml/release.ent Sat Jan 28 02:22:15 2017 (r312910) > @@ -73,7 +73,6 @@ > > > > - > > > > > Modified: head/release/rc.local > ============================================================================== > --- head/release/rc.local Sat Jan 28 00:40:36 2017 (r312909) > +++ head/release/rc.local Sat Jan 28 02:22:15 2017 (r312910) > @@ -16,11 +16,7 @@ mkdir /tmp/bsdinstall_etc > kbdcontrol -d >/dev/null 2>&1 > if [ $? -eq 0 ]; then > # Syscons: use xterm, start interesting things on other VTYs > - if [ ${MACHINE} = "pc98" ]; then > - TERM=cons25w > - else > - TERM=xterm > - fi > + TERM=xterm > > # Don't send ESC on function-key 62/63 (left/right command key) > kbdcontrol -f 62 '' > /dev/null 2>&1 > > Modified: head/rescue/rescue/Makefile > ============================================================================== > --- head/rescue/rescue/Makefile Sat Jan 28 00:40:36 2017 (r312909) > +++ head/rescue/rescue/Makefile Sat Jan 28 02:22:15 2017 (r312910) > @@ -141,10 +141,6 @@ CRUNCH_ALIAS_bsdlabel= disklabel > #CRUNCH_LIBS+= -lsmb > .endif > > -.if ${MACHINE} == "pc98" > -CRUNCH_SRCDIR_fdisk= $(.CURDIR)/../../sbin/fdisk_pc98 > -.endif > - > .if ${MACHINE_CPUARCH} == "sparc64" > CRUNCH_PROGS_sbin+= bsdlabel sunlabel > .endif > > Modified: head/sbin/bsdlabel/bsdlabel.8 > ============================================================================== > --- head/sbin/bsdlabel/bsdlabel.8 Sat Jan 28 00:40:36 2017 (r312909) > +++ head/sbin/bsdlabel/bsdlabel.8 Sat Jan 28 02:22:15 2017 (r312910) > @@ -109,9 +109,9 @@ argument forces > .Nm > to use a layout suitable for a different architecture. > Current valid values are > -.Cm i386 , amd64 , > +.Cm i386 > and > -.Cm pc98 . > +.Cm amd64 . > If this option is omitted, > .Nm > will use a layout suitable for the current machine. > > Modified: head/sbin/bsdlabel/bsdlabel.c > ============================================================================== > --- head/sbin/bsdlabel/bsdlabel.c Sat Jan 28 00:40:36 2017 (r312909) > +++ head/sbin/bsdlabel/bsdlabel.c Sat Jan 28 02:22:15 2017 (r312910) > @@ -164,8 +164,7 @@ main(int argc, char *argv[]) > break; > case 'm': > if (!strcmp(optarg, "i386") || > - !strcmp(optarg, "amd64") || > - !strcmp(optarg, "pc98")) { > + !strcmp(optarg, "amd64")) { > labelsoffset = 1; > labeloffset = 0; > bbsize = 8192; > > Modified: head/sbin/geom/class/part/gpart.8 > ============================================================================== > --- head/sbin/geom/class/part/gpart.8 Sat Jan 28 00:40:36 2017 (r312909) > +++ head/sbin/geom/class/part/gpart.8 Sat Jan 28 02:22:15 2017 (r312910) > @@ -543,11 +543,6 @@ The > option enables backward compatibility for partition names > in the EBR scheme. > It also prevents any type of actions on such partitions. > -.It Cm PC98 > -An MBR variant for NEC PC-98 and compatible computers. > -Requires the > -.Cm GEOM_PART_PC98 > -kernel option. > .It Cm VTOC8 > Sun's SMI Volume Table Of Contents, used by > .Tn SPARC64 > @@ -945,12 +940,6 @@ The scheme-specific attributes for MBR: > .Bl -tag -width ".Cm active" > .It Cm active > .El > -.Pp > -The scheme-specific attributes for PC98: > -.Bl -tag -width ".Cm bootable" > -.It Cm active > -.It Cm bootable > -.El > .Sh BOOTSTRAPPING > .Fx > supports several partitioning schemes and each scheme uses different > > Modified: head/share/examples/bootforth/frames.4th > ============================================================================== > --- head/share/examples/bootforth/frames.4th Sat Jan 28 00:40:36 2017 (r312909) > +++ head/share/examples/bootforth/frames.4th Sat Jan 28 02:22:15 2017 (r312910) > @@ -12,49 +12,26 @@ variable rt_el > variable rb_el > variable fill > > -s" arch-pc98" environment? [if] > - \ Single frames > - 149 constant sh_el > - 150 constant sv_el > - 152 constant slt_el > - 154 constant slb_el > - 153 constant srt_el > - 155 constant srb_el > - \ Double frames > - 149 constant dh_el > - 150 constant dv_el > - 152 constant dlt_el > - 154 constant dlb_el > - 153 constant drt_el > - 155 constant drb_el > - \ Fillings > - 0 constant fill_none > - 32 constant fill_blank > - 135 constant fill_dark > - 135 constant fill_med > - 135 constant fill_bright > -[else] > - \ Single frames > - 196 constant sh_el > - 179 constant sv_el > - 218 constant slt_el > - 192 constant slb_el > - 191 constant srt_el > - 217 constant srb_el > - \ Double frames > - 205 constant dh_el > - 186 constant dv_el > - 201 constant dlt_el > - 200 constant dlb_el > - 187 constant drt_el > - 188 constant drb_el > - \ Fillings > - 0 constant fill_none > - 32 constant fill_blank > - 176 constant fill_dark > - 177 constant fill_med > - 178 constant fill_bright > -[then] > +\ Single frames > +196 constant sh_el > +179 constant sv_el > +218 constant slt_el > +192 constant slb_el > +191 constant srt_el > +217 constant srb_el > +\ Double frames > +205 constant dh_el > +186 constant dv_el > +201 constant dlt_el > +200 constant dlb_el > +187 constant drt_el > +188 constant drb_el > +\ Fillings > +0 constant fill_none > +32 constant fill_blank > +176 constant fill_dark > +177 constant fill_med > +178 constant fill_bright > > : hline ( len x y -- ) \ Draw horizontal single line > at-xy \ move cursor > > Modified: head/share/man/man4/adv.4 > ============================================================================== > --- head/share/man/man4/adv.4 Sat Jan 28 00:40:36 2017 (r312909) > +++ head/share/man/man4/adv.4 Sat Jan 28 02:22:15 2017 (r312910) > @@ -204,12 +204,6 @@ AdvanSys ABP950 > AdvanSys ABP980, ABP980U > .It > AdvanSys ABP980UA/3980UA > -.It > -MELCO IFC-USP (PC-98) > -.It > -RATOC REX-PCI30 (PC-98) > -.It > -@Nifty FNECHARD IFC-USUP-TX (PC-98) > .El > .Sh SEE ALSO > .Xr adw 4 , > > Modified: head/share/man/man4/ahc.4 > ============================================================================== > --- head/share/man/man4/ahc.4 Sat Jan 28 00:40:36 2017 (r312909) > +++ head/share/man/man4/ahc.4 Sat Jan 28 02:22:15 2017 (r312910) > @@ -349,14 +349,6 @@ Adaptec > Adaptec > .Tn 4944UW > .It > -NEC PC-9821Xt13 (PC-98) > -.It > -NEC RvII26 (PC-98) > -.It > -NEC PC-9821X-B02L/B09 (PC-98) > -.It > -NEC SV-98/2-B03 (PC-98) > -.It > Many motherboards with on-board > .Tn SCSI > support > > Modified: head/share/man/man4/apic.4 > ============================================================================== > --- head/share/man/man4/apic.4 Sat Jan 28 00:40:36 2017 (r312909) > +++ head/share/man/man4/apic.4 Sat Jan 28 02:22:15 2017 (r312910) > @@ -32,7 +32,7 @@ > .Nd Advanced Programmable Interrupt Controller (APIC) driver > .Sh SYNOPSIS > This driver is a mandatory part of amd64 kernel. > -To compile this driver into i386 or pc98 kernel, > +To compile this driver into i386 kernel, > place the following line in your > kernel configuration file: > .Bd -ragged -offset indent > > Modified: head/share/man/man4/ed.4 > ============================================================================== > --- head/share/man/man4/ed.4 Sat Jan 28 00:40:36 2017 (r312909) > +++ head/share/man/man4/ed.4 Sat Jan 28 02:22:15 2017 (r312910) > @@ -133,12 +133,6 @@ Accton EN2212/EN2216/UE2216 > .It > Allied Telesis CentreCOM LA100-PCM_V2 > .It > -Allied Telesis LA-98 (flags 0x000000) (PC-98) > -.It > -Allied Telesis SIC-98, SIC-98NOTE (110pin), SIU-98 (flags 0x600000) (PC-98) > -.It > -Allied Telesis SIU-98-D (flags 0x610000) (PC-98) > -.It > AmbiCom 10BaseT card (8002, 8002T, 8010 and 8610) > .It > Bay Networks NETGEAR FA410TXC Fast Ethernet > @@ -163,12 +157,6 @@ Compex Net-A adapter > .It > Compex RL2000 > .It > -Contec C-NET(98), RT-1007(98), C-NET(9N) (110pin) (flags 0xa00000) (PC-98) > -.It > -Contec C-NET(98)E-A, C-NET(98)L-A, C-NET(98)P (flags 0x300000) (PC-98) > -.It > -Corega Ether98-T (flags 0x000000) (PC-98) > -.It > Corega Ether PCC-T/EtherII PCC-T/FEther PCC-TXF/PCC-TXD PCC-T/Fether II TXD > .It > Corega LAPCCTXD (TC5299J) > @@ -179,16 +167,10 @@ DEC EtherWorks DE305 > .It > Danpex EN-6200P2 > .It > -D-Link DE-298, DE-298P (flags 0x500000) (PC-98) > -.It > D-Link DE-660, DE-660+ > .It > D-Link IC-CARD/IC-CARD+ Ethernet > .It > -ELECOM LD-98P (flags 0x500000) (PC-98) > -.It > -ELECOM LD-BDN, LD-NW801G (flags 0x200000) (PC-98) > -.It > ELECOM Laneed LD-CDL/TX, LD-CDF, LD-CDS, LD-10/100CD, LD-CDWA (DP83902A) > .It > Hawking PN652TX PC Card (AX88790) > @@ -198,17 +180,10 @@ HP PC Lan+ 27247B and 27252A > .It > IBM Creditcard Ethernet I/II > .It > -ICM AD-ET2-T, DT-ET-25, DT-ET-T5, IF-2766ET, IF-2771ET, NB-ET-T (110pin) > -(flags 0x500000) (PC-98) > -.It > -I-O DATA LA/T-98, LA/T-98SB, LA2/T-98, ET/T-98 (flags 0x900000) (PC-98) > -.It > I-O DATA ET2/T-PCI > .It > I-O DATA PCLATE > .It > -Kansai KLA-98C/T (flags 0x900000) (PC-98) > -.It > Kingston KNE-PC2, CIO10T, KNE-PCM/x Ethernet > .It > KTI ET32P2 PCI > @@ -217,28 +192,14 @@ Linksys EC2T/PCMPC100/PCM100, PCMLM56 > .It > Linksys EtherFast 10/100 PC Card, Combo PCMCIA Ethernet Card (PCMPC100 V2) > .It > -Logitec LAN-98T (flags 0xb00000) (PC-98) > -.It > MACNICA Ethernet ME1 for JEIDA > .It > -MACNICA ME98 (flags 0x900000) (PC-98) > -.It > -MACNICA NE2098 (flags 0x400000) (PC-98) > -.It > -MELCO EGY-98 (flags 0x300000) (PC-98) > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > --- TAKAHASHI Yoshihiro From owner-svn-src-head@freebsd.org Sun Feb 5 13:24: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 AA77ACD1598; Sun, 5 Feb 2017 13:24:55 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 824E31074; Sun, 5 Feb 2017 13:24:55 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v15DOsQ5084558; Sun, 5 Feb 2017 13:24:54 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v15DOsdK084554; Sun, 5 Feb 2017 13:24:54 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201702051324.v15DOsdK084554@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 5 Feb 2017 13:24:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313281 - in head/sys: compat/freebsd32 compat/linux kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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, 05 Feb 2017 13:24:55 -0000 Author: trasz Date: Sun Feb 5 13:24:54 2017 New Revision: 313281 URL: https://svnweb.freebsd.org/changeset/base/313281 Log: Add kern_cpuset_getaffinity() and kern_cpuset_getaffinity(), and use it in compats instead of their sys_*() counterparts. Reviewed by: kib, jhb, dchagin MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9383 Modified: head/sys/compat/freebsd32/freebsd32_misc.c head/sys/compat/linux/linux_misc.c head/sys/kern/kern_cpuset.c head/sys/sys/syscallsubr.h Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Sun Feb 5 09:54:16 2017 (r313280) +++ head/sys/compat/freebsd32/freebsd32_misc.c Sun Feb 5 13:24:54 2017 (r313281) @@ -2554,30 +2554,18 @@ int freebsd32_cpuset_getaffinity(struct thread *td, struct freebsd32_cpuset_getaffinity_args *uap) { - struct cpuset_getaffinity_args ap; - ap.level = uap->level; - ap.which = uap->which; - ap.id = PAIR32TO64(id_t,uap->id); - ap.cpusetsize = uap->cpusetsize; - ap.mask = uap->mask; - - return (sys_cpuset_getaffinity(td, &ap)); + return (kern_cpuset_getaffinity(td, uap->level, uap->which, + PAIR32TO64(id_t,uap->id), uap->cpusetsize, uap->mask)); } int freebsd32_cpuset_setaffinity(struct thread *td, struct freebsd32_cpuset_setaffinity_args *uap) { - struct cpuset_setaffinity_args ap; - - ap.level = uap->level; - ap.which = uap->which; - ap.id = PAIR32TO64(id_t,uap->id); - ap.cpusetsize = uap->cpusetsize; - ap.mask = uap->mask; - return (sys_cpuset_setaffinity(td, &ap)); + return (kern_cpuset_setaffinity(td, uap->level, uap->which, + PAIR32TO64(id_t,uap->id), uap->cpusetsize, uap->mask)); } int Modified: head/sys/compat/linux/linux_misc.c ============================================================================== --- head/sys/compat/linux/linux_misc.c Sun Feb 5 09:54:16 2017 (r313280) +++ head/sys/compat/linux/linux_misc.c Sun Feb 5 13:24:54 2017 (r313281) @@ -2102,7 +2102,6 @@ linux_sched_getaffinity(struct thread *t { int error; struct thread *tdt; - struct cpuset_getaffinity_args cga; #ifdef DEBUG if (ldebug(sched_getaffinity)) @@ -2117,13 +2116,10 @@ linux_sched_getaffinity(struct thread *t return (ESRCH); PROC_UNLOCK(tdt->td_proc); - cga.level = CPU_LEVEL_WHICH; - cga.which = CPU_WHICH_TID; - cga.id = tdt->td_tid; - cga.cpusetsize = sizeof(cpuset_t); - cga.mask = (cpuset_t *) args->user_mask_ptr; - if ((error = sys_cpuset_getaffinity(td, &cga)) == 0) + error = kern_cpuset_getaffinity(td, CPU_LEVEL_WHICH, CPU_WHICH_TID, + tdt->td_tid, sizeof(cpuset_t), (cpuset_t *)args->user_mask_ptr); + if (error == 0) td->td_retval[0] = sizeof(cpuset_t); return (error); @@ -2136,7 +2132,6 @@ int linux_sched_setaffinity(struct thread *td, struct linux_sched_setaffinity_args *args) { - struct cpuset_setaffinity_args csa; struct thread *tdt; #ifdef DEBUG @@ -2152,13 +2147,9 @@ linux_sched_setaffinity(struct thread *t return (ESRCH); PROC_UNLOCK(tdt->td_proc); - csa.level = CPU_LEVEL_WHICH; - csa.which = CPU_WHICH_TID; - csa.id = tdt->td_tid; - csa.cpusetsize = sizeof(cpuset_t); - csa.mask = (cpuset_t *) args->user_mask_ptr; - return (sys_cpuset_setaffinity(td, &csa)); + return (kern_cpuset_setaffinity(td, CPU_LEVEL_WHICH, CPU_WHICH_TID, + tdt->td_tid, sizeof(cpuset_t), (cpuset_t *) args->user_mask_ptr)); } struct linux_rlimit64 { Modified: head/sys/kern/kern_cpuset.c ============================================================================== --- head/sys/kern/kern_cpuset.c Sun Feb 5 09:54:16 2017 (r313280) +++ head/sys/kern/kern_cpuset.c Sun Feb 5 13:24:54 2017 (r313281) @@ -1078,6 +1078,15 @@ struct cpuset_getaffinity_args { int sys_cpuset_getaffinity(struct thread *td, struct cpuset_getaffinity_args *uap) { + + return (kern_cpuset_getaffinity(td, uap->level, uap->which, + uap->id, uap->cpusetsize, uap->mask)); +} + +int +kern_cpuset_getaffinity(struct thread *td, cpulevel_t level, cpuwhich_t which, + id_t id, size_t cpusetsize, cpuset_t *maskp) +{ struct thread *ttd; struct cpuset *nset; struct cpuset *set; @@ -1086,18 +1095,17 @@ sys_cpuset_getaffinity(struct thread *td int error; size_t size; - if (uap->cpusetsize < sizeof(cpuset_t) || - uap->cpusetsize > CPU_MAXSIZE / NBBY) + if (cpusetsize < sizeof(cpuset_t) || cpusetsize > CPU_MAXSIZE / NBBY) return (ERANGE); - size = uap->cpusetsize; + size = cpusetsize; mask = malloc(size, M_TEMP, M_WAITOK | M_ZERO); - error = cpuset_which(uap->which, uap->id, &p, &ttd, &set); + error = cpuset_which(which, id, &p, &ttd, &set); if (error) goto out; - switch (uap->level) { + switch (level) { case CPU_LEVEL_ROOT: case CPU_LEVEL_CPUSET: - switch (uap->which) { + switch (which) { case CPU_WHICH_TID: case CPU_WHICH_PID: thread_lock(ttd); @@ -1112,7 +1120,7 @@ sys_cpuset_getaffinity(struct thread *td error = EINVAL; goto out; } - if (uap->level == CPU_LEVEL_ROOT) + if (level == CPU_LEVEL_ROOT) nset = cpuset_refroot(set); else nset = cpuset_refbase(set); @@ -1120,7 +1128,7 @@ sys_cpuset_getaffinity(struct thread *td cpuset_rel(nset); break; case CPU_LEVEL_WHICH: - switch (uap->which) { + switch (which) { case CPU_WHICH_TID: thread_lock(ttd); CPU_COPY(&ttd->td_cpuset->cs_mask, mask); @@ -1138,13 +1146,13 @@ sys_cpuset_getaffinity(struct thread *td CPU_COPY(&set->cs_mask, mask); break; case CPU_WHICH_IRQ: - error = intr_getaffinity(uap->id, mask); + error = intr_getaffinity(id, mask); break; case CPU_WHICH_DOMAIN: - if (uap->id < 0 || uap->id >= MAXMEMDOM) + if (id < 0 || id >= MAXMEMDOM) error = ESRCH; else - CPU_COPY(&cpuset_domain[uap->id], mask); + CPU_COPY(&cpuset_domain[id], mask); break; } break; @@ -1157,7 +1165,7 @@ sys_cpuset_getaffinity(struct thread *td if (p) PROC_UNLOCK(p); if (error == 0) - error = copyout(mask, uap->mask, size); + error = copyout(mask, maskp, size); out: free(mask, M_TEMP); return (error); @@ -1175,6 +1183,15 @@ struct cpuset_setaffinity_args { int sys_cpuset_setaffinity(struct thread *td, struct cpuset_setaffinity_args *uap) { + + return (kern_cpuset_setaffinity(td, uap->level, uap->which, + uap->id, uap->cpusetsize, uap->mask)); +} + +int +kern_cpuset_setaffinity(struct thread *td, cpulevel_t level, cpuwhich_t which, + id_t id, size_t cpusetsize, const cpuset_t *maskp) +{ struct cpuset *nset; struct cpuset *set; struct thread *ttd; @@ -1182,22 +1199,21 @@ sys_cpuset_setaffinity(struct thread *td cpuset_t *mask; int error; - if (uap->cpusetsize < sizeof(cpuset_t) || - uap->cpusetsize > CPU_MAXSIZE / NBBY) + if (cpusetsize < sizeof(cpuset_t) || cpusetsize > CPU_MAXSIZE / NBBY) return (ERANGE); - mask = malloc(uap->cpusetsize, M_TEMP, M_WAITOK | M_ZERO); - error = copyin(uap->mask, mask, uap->cpusetsize); + mask = malloc(cpusetsize, M_TEMP, M_WAITOK | M_ZERO); + error = copyin(maskp, mask, cpusetsize); if (error) goto out; /* * Verify that no high bits are set. */ - if (uap->cpusetsize > sizeof(cpuset_t)) { + if (cpusetsize > sizeof(cpuset_t)) { char *end; char *cp; end = cp = (char *)&mask->__bits; - end += uap->cpusetsize; + end += cpusetsize; cp += sizeof(cpuset_t); while (cp != end) if (*cp++ != 0) { @@ -1206,13 +1222,13 @@ sys_cpuset_setaffinity(struct thread *td } } - switch (uap->level) { + switch (level) { case CPU_LEVEL_ROOT: case CPU_LEVEL_CPUSET: - error = cpuset_which(uap->which, uap->id, &p, &ttd, &set); + error = cpuset_which(which, id, &p, &ttd, &set); if (error) break; - switch (uap->which) { + switch (which) { case CPU_WHICH_TID: case CPU_WHICH_PID: thread_lock(ttd); @@ -1228,7 +1244,7 @@ sys_cpuset_setaffinity(struct thread *td error = EINVAL; goto out; } - if (uap->level == CPU_LEVEL_ROOT) + if (level == CPU_LEVEL_ROOT) nset = cpuset_refroot(set); else nset = cpuset_refbase(set); @@ -1237,24 +1253,23 @@ sys_cpuset_setaffinity(struct thread *td cpuset_rel(set); break; case CPU_LEVEL_WHICH: - switch (uap->which) { + switch (which) { case CPU_WHICH_TID: - error = cpuset_setthread(uap->id, mask); + error = cpuset_setthread(id, mask); break; case CPU_WHICH_PID: - error = cpuset_setproc(uap->id, NULL, mask); + error = cpuset_setproc(id, NULL, mask); break; case CPU_WHICH_CPUSET: case CPU_WHICH_JAIL: - error = cpuset_which(uap->which, uap->id, &p, - &ttd, &set); + error = cpuset_which(which, id, &p, &ttd, &set); if (error == 0) { error = cpuset_modify(set, mask); cpuset_rel(set); } break; case CPU_WHICH_IRQ: - error = intr_setaffinity(uap->id, mask); + error = intr_setaffinity(id, mask); break; default: error = EINVAL; Modified: head/sys/sys/syscallsubr.h ============================================================================== --- head/sys/sys/syscallsubr.h Sun Feb 5 09:54:16 2017 (r313280) +++ head/sys/sys/syscallsubr.h Sun Feb 5 13:24:54 2017 (r313281) @@ -33,6 +33,7 @@ #include #include #include +#include struct file; struct filecaps; @@ -86,6 +87,11 @@ int kern_clock_settime(struct thread *td int kern_close(struct thread *td, int fd); int kern_connectat(struct thread *td, int dirfd, int fd, struct sockaddr *sa); +int kern_cpuset_getaffinity(struct thread *td, cpulevel_t level, + cpuwhich_t which, id_t id, size_t cpusetsize, cpuset_t *maskp); +int kern_cpuset_setaffinity(struct thread *td, cpulevel_t level, + cpuwhich_t which, id_t id, size_t cpusetsize, + const cpuset_t *maskp); int kern_cpuset_getid(struct thread *td, cpulevel_t level, cpuwhich_t which, id_t id, cpusetid_t *setid); int kern_cpuset_setid(struct thread *td, cpuwhich_t which, From owner-svn-src-head@freebsd.org Sun Feb 5 13:37: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 744FFCD1B7D; Sun, 5 Feb 2017 13:37:25 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E54618D0; Sun, 5 Feb 2017 13:37:25 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v15DbO0V088957; Sun, 5 Feb 2017 13:37:24 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v15DbOfU088955; Sun, 5 Feb 2017 13:37:24 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702051337.v15DbOfU088955@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 5 Feb 2017 13:37:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313282 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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, 05 Feb 2017 13:37:25 -0000 Author: mjg Date: Sun Feb 5 13:37:23 2017 New Revision: 313282 URL: https://svnweb.freebsd.org/changeset/base/313282 Log: rwlock: move lockstat handling out of inline primitives See r313275 for details. One difference here is that recursion handling was removed from the fallback routine. As it is it was never supposed to see a recursed lock in the first place. Future changes will move it out of inline variants, but right now there is no easy to way to test if the lock is recursed without reading additional words. Modified: head/sys/kern/kern_rwlock.c head/sys/sys/rwlock.h Modified: head/sys/kern/kern_rwlock.c ============================================================================== --- head/sys/kern/kern_rwlock.c Sun Feb 5 13:24:54 2017 (r313281) +++ head/sys/kern/kern_rwlock.c Sun Feb 5 13:37:23 2017 (r313282) @@ -283,6 +283,7 @@ void _rw_wlock_cookie(volatile uintptr_t *c, const char *file, int line) { struct rwlock *rw; + uintptr_t tid, v; if (SCHEDULER_STOPPED()) return; @@ -296,7 +297,14 @@ _rw_wlock_cookie(volatile uintptr_t *c, ("rw_wlock() of destroyed rwlock @ %s:%d", file, line)); WITNESS_CHECKORDER(&rw->lock_object, LOP_NEWORDER | LOP_EXCLUSIVE, file, line, NULL); - __rw_wlock(rw, curthread, file, line); + tid = (uintptr_t)curthread; + v = RW_UNLOCKED; + if (!_rw_write_lock_fetch(rw, &v, tid)) + _rw_wlock_hard(rw, v, tid, file, line); + else + LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(rw__acquire, rw, + 0, 0, file, line, LOCKSTAT_WRITER); + LOCK_LOG_LOCK("WLOCK", &rw->lock_object, 0, rw->rw_recurse, file, line); WITNESS_LOCK(&rw->lock_object, LOP_EXCLUSIVE, file, line); TD_LOCKS_INC(curthread); @@ -355,7 +363,11 @@ _rw_wunlock_cookie(volatile uintptr_t *c WITNESS_UNLOCK(&rw->lock_object, LOP_EXCLUSIVE, file, line); LOCK_LOG_LOCK("WUNLOCK", &rw->lock_object, 0, rw->rw_recurse, file, line); - __rw_wunlock(rw, curthread, file, line); + if (rw->rw_recurse) + rw->rw_recurse--; + else + _rw_wunlock_hard(rw, (uintptr_t)curthread, file, line); + TD_LOCKS_DEC(curthread); } @@ -998,13 +1010,12 @@ __rw_wunlock_hard(volatile uintptr_t *c, return; rw = rwlock2rw(c); + MPASS(!rw_recursed(rw)); - if (rw_wlocked(rw) && rw_recursed(rw)) { - rw->rw_recurse--; - if (LOCK_LOG_TEST(&rw->lock_object, 0)) - CTR2(KTR_LOCK, "%s: %p unrecursing", __func__, rw); + LOCKSTAT_PROFILE_RELEASE_RWLOCK(rw__release, rw, + LOCKSTAT_WRITER); + if (_rw_write_unlock(rw, tid)) return; - } KASSERT(rw->rw_lock & (RW_LOCK_READ_WAITERS | RW_LOCK_WRITE_WAITERS), ("%s: neither of the waiter flags are set", __func__)); Modified: head/sys/sys/rwlock.h ============================================================================== --- head/sys/sys/rwlock.h Sun Feb 5 13:24:54 2017 (r313281) +++ head/sys/sys/rwlock.h Sun Feb 5 13:37:23 2017 (r313282) @@ -84,10 +84,8 @@ #define _rw_write_lock(rw, tid) \ atomic_cmpset_acq_ptr(&(rw)->rw_lock, RW_UNLOCKED, (tid)) -#define _rw_write_lock_fetch(rw, vp, tid) ({ \ - *vp = RW_UNLOCKED; \ - atomic_fcmpset_acq_ptr(&(rw)->rw_lock, vp, (tid)); \ -}) +#define _rw_write_lock_fetch(rw, vp, tid) \ + atomic_fcmpset_acq_ptr(&(rw)->rw_lock, vp, (tid)) /* Release a write lock quickly if there are no waiters. */ #define _rw_write_unlock(rw, tid) \ @@ -102,13 +100,11 @@ /* Acquire a write lock. */ #define __rw_wlock(rw, tid, file, line) do { \ uintptr_t _tid = (uintptr_t)(tid); \ - uintptr_t _v; \ + uintptr_t _v = RW_UNLOCKED; \ \ - if (!_rw_write_lock_fetch((rw), &_v, _tid)) \ + if (__predict_false(LOCKSTAT_PROFILE_ENABLED(rw__acquire) || \ + !_rw_write_lock_fetch((rw), &_v, _tid))) \ _rw_wlock_hard((rw), _v, _tid, (file), (line)); \ - else \ - LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(rw__acquire, rw, \ - 0, 0, file, line, LOCKSTAT_WRITER); \ } while (0) /* Release a write lock. */ @@ -118,9 +114,8 @@ if ((rw)->rw_recurse) \ (rw)->rw_recurse--; \ else { \ - LOCKSTAT_PROFILE_RELEASE_RWLOCK(rw__release, rw, \ - LOCKSTAT_WRITER); \ - if (!_rw_write_unlock((rw), _tid)) \ + if (__predict_false(LOCKSTAT_PROFILE_ENABLED(rw__release) ||\ + !_rw_write_unlock((rw), _tid))) \ _rw_wunlock_hard((rw), _tid, (file), (line)); \ } \ } while (0) From owner-svn-src-head@freebsd.org Sun Feb 5 14:03: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 40CEDCD2365; Sun, 5 Feb 2017 14:03:27 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1056DA51; Sun, 5 Feb 2017 14:03:26 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v15E3QVU001258; Sun, 5 Feb 2017 14:03:26 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v15E3QwK001257; Sun, 5 Feb 2017 14:03:26 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201702051403.v15E3QwK001257@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 5 Feb 2017 14:03:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313283 - head/sys/compat/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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, 05 Feb 2017 14:03:27 -0000 Author: trasz Date: Sun Feb 5 14:03:25 2017 New Revision: 313283 URL: https://svnweb.freebsd.org/changeset/base/313283 Log: Fix linux_pipe() and linux_pipe2() to close file descriptors on copyout error. Reviewed by: dchagin MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9425 Modified: head/sys/compat/linux/linux_file.c Modified: head/sys/compat/linux/linux_file.c ============================================================================== --- head/sys/compat/linux/linux_file.c Sun Feb 5 13:37:23 2017 (r313282) +++ head/sys/compat/linux/linux_file.c Sun Feb 5 14:03:25 2017 (r313283) @@ -1537,11 +1537,16 @@ linux_pipe(struct thread *td, struct lin #endif error = kern_pipe(td, fildes, 0, NULL, NULL); - if (error) + if (error != 0) return (error); - /* XXX: Close descriptors on error. */ - return (copyout(fildes, args->pipefds, sizeof(fildes))); + error = copyout(fildes, args->pipefds, sizeof(fildes)); + if (error != 0) { + (void)kern_close(td, fildes[0]); + (void)kern_close(td, fildes[1]); + } + + return (error); } int @@ -1564,11 +1569,16 @@ linux_pipe2(struct thread *td, struct li if ((args->flags & LINUX_O_CLOEXEC) != 0) flags |= O_CLOEXEC; error = kern_pipe(td, fildes, flags, NULL, NULL); - if (error) + if (error != 0) return (error); - /* XXX: Close descriptors on error. */ - return (copyout(fildes, args->pipefds, sizeof(fildes))); + error = copyout(fildes, args->pipefds, sizeof(fildes)); + if (error != 0) { + (void)kern_close(td, fildes[0]); + (void)kern_close(td, fildes[1]); + } + + return (error); } int From owner-svn-src-head@freebsd.org Sun Feb 5 14:17: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 0D101CD2626; Sun, 5 Feb 2017 14:17:12 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A23110A0; Sun, 5 Feb 2017 14:17:11 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v15EHAJ3006051; Sun, 5 Feb 2017 14:17:10 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v15EHAC7006044; Sun, 5 Feb 2017 14:17:10 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201702051417.v15EHAC7006044@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 5 Feb 2017 14:17:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313284 - in head/sys: amd64/linux amd64/linux32 compat/linux i386/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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, 05 Feb 2017 14:17:12 -0000 Author: dchagin Date: Sun Feb 5 14:17:09 2017 New Revision: 313284 URL: https://svnweb.freebsd.org/changeset/base/313284 Log: Update syscall.master to 4.10-rc6. Also fix comments, a typo, and wrong numbering for a few unimplemented syscalls. For 32-bit Linuxulator, socketcall() syscall was historically the entry point for the sockets API. Starting in Linux 4.3, direct syscalls are provided for the sockets API. Enable it. The initial version of patch was provided by trasz@ and extended by me. Submitted by: trasz MFC after: 2 week Differential Revision: https://reviews.freebsd.org/D9381 Modified: head/sys/amd64/linux/linux_dummy.c head/sys/amd64/linux/syscalls.master head/sys/amd64/linux32/linux32_dummy.c head/sys/amd64/linux32/syscalls.master head/sys/compat/linux/linux_socket.h head/sys/i386/linux/linux_dummy.c head/sys/i386/linux/syscalls.master Modified: head/sys/amd64/linux/linux_dummy.c ============================================================================== --- head/sys/amd64/linux/linux_dummy.c Sun Feb 5 14:03:25 2017 (r313283) +++ head/sys/amd64/linux/linux_dummy.c Sun Feb 5 14:17:09 2017 (r313284) @@ -82,41 +82,86 @@ DUMMY(mq_timedreceive); DUMMY(mq_notify); DUMMY(mq_getsetattr); DUMMY(kexec_load); +/* linux 2.6.11: */ DUMMY(add_key); DUMMY(request_key); DUMMY(keyctl); +/* linux 2.6.13: */ DUMMY(ioprio_set); DUMMY(ioprio_get); DUMMY(inotify_init); DUMMY(inotify_add_watch); DUMMY(inotify_rm_watch); +/* linux 2.6.16: */ DUMMY(migrate_pages); DUMMY(unshare); +/* linux 2.6.17: */ DUMMY(splice); DUMMY(tee); DUMMY(sync_file_range); DUMMY(vmsplice); +/* linux 2.6.18: */ DUMMY(move_pages); +/* linux 2.6.22: */ DUMMY(signalfd); -DUMMY(timerfd); +DUMMY(timerfd_create); +/* linux 2.6.25: */ DUMMY(timerfd_settime); DUMMY(timerfd_gettime); +/* linux 2.6.27: */ DUMMY(signalfd4); DUMMY(inotify_init1); +/* linux 2.6.30: */ DUMMY(preadv); DUMMY(pwritev); -DUMMY(rt_tsigqueueinfo); +/* linux 2.6.31: */ +DUMMY(rt_tgsigqueueinfo); DUMMY(perf_event_open); +/* linux 2.6.38: */ DUMMY(fanotify_init); DUMMY(fanotify_mark); +/* linux 2.6.39: */ DUMMY(name_to_handle_at); DUMMY(open_by_handle_at); DUMMY(clock_adjtime); +/* linux 3.0: */ DUMMY(setns); +DUMMY(getcpu); +/* linux 3.2: */ DUMMY(process_vm_readv); DUMMY(process_vm_writev); +/* linux 3.5: */ DUMMY(kcmp); +/* linux 3.8: */ DUMMY(finit_module); +DUMMY(sched_setattr); +DUMMY(sched_getattr); +/* linux 3.14: */ +DUMMY(renameat2); +/* linux 3.15: */ +DUMMY(seccomp); +DUMMY(getrandom); +DUMMY(memfd_create); +DUMMY(kexec_file_load); +/* linux 3.18: */ +DUMMY(bpf); +/* linux 3.19: */ +DUMMY(execveat); +/* linux 4.2: */ +DUMMY(userfaultfd); +/* linux 4.3: */ +DUMMY(membarrier); +/* linux 4.4: */ +DUMMY(mlock2); +/* linux 4.5: */ +DUMMY(copy_file_range); +/* linux 4.6: */ +DUMMY(preadv2); +DUMMY(pwritev2); +/* linux 4.8: */ +DUMMY(pkey_mprotect); +DUMMY(pkey_alloc); +DUMMY(pkey_free); #define DUMMY_XATTR(s) \ int \ Modified: head/sys/amd64/linux/syscalls.master ============================================================================== --- head/sys/amd64/linux/syscalls.master Sun Feb 5 14:03:25 2017 (r313283) +++ head/sys/amd64/linux/syscalls.master Sun Feb 5 14:17:09 2017 (r313284) @@ -11,18 +11,20 @@ ; there is no audit event for the call at this time. For the ; case where the event exists, but we don't want auditing, the ; event should be #defined to AUE_NULL in audit_kevents.h. -; type one of STD, OBSOL, UNIMPL +; type one of STD, NOPROTO, UNIMPL ; name psuedo-prototype of syscall routine ; If one of the following alts is different, then all appear: ; altname name of system call if different ; alttag name of args struct tag if different from [o]`name'"_args" ; altrtyp return type if not int (bogus - syscalls always return int) -; for UNIMPL/OBSOL, name continues with comments +; for UNIMPL, name continues with comments ; types: ; STD always included -; OBSOL obsolete, not included in system, only specifies name ; UNIMPL not implemented, placeholder only +; NOPROTO same as STD except do not create structure or +; function prototype in sys/sysproto.h. Does add a +; definition to syscall.h besides adding a sysent. #include #include @@ -369,7 +371,7 @@ 206 AUE_NULL UNIMPL linux_io_setup 207 AUE_NULL UNIMPL linux_io_destroy 208 AUE_NULL UNIMPL linux_io_getevents -209 AUE_NULL UNIMPL inux_io_submit +209 AUE_NULL UNIMPL linux_io_submit 210 AUE_NULL UNIMPL linux_io_cancel 211 AUE_NULL UNIMPL linux_get_thread_area 212 AUE_NULL STD { int linux_lookup_dcookie(void); } @@ -473,7 +475,7 @@ 281 AUE_NULL STD { int linux_epoll_pwait(l_int epfd, struct epoll_event *events, \ l_int maxevents, l_int timeout, l_sigset_t *mask); } 282 AUE_NULL STD { int linux_signalfd(void); } -283 AUE_NULL STD { int linux_timerfd(void); } +283 AUE_NULL STD { int linux_timerfd_create(void); } 284 AUE_NULL STD { int linux_eventfd(l_uint initval); } 285 AUE_NULL STD { int linux_fallocate(l_int fd, l_int mode, \ l_loff_t offset, l_loff_t len); } @@ -481,35 +483,114 @@ 287 AUE_NULL STD { int linux_timerfd_gettime(void); } 288 AUE_ACCEPT STD { int linux_accept4(l_int s, l_uintptr_t addr, \ l_uintptr_t namelen, int flags); } +; linux 2.6.27: 289 AUE_NULL STD { int linux_signalfd4(void); } 290 AUE_NULL STD { int linux_eventfd2(l_uint initval, l_int flags); } 291 AUE_NULL STD { int linux_epoll_create1(l_int flags); } 292 AUE_NULL STD { int linux_dup3(l_int oldfd, \ l_int newfd, l_int flags); } 293 AUE_NULL STD { int linux_pipe2(l_int *pipefds, l_int flags); } -294 AUE_NULL STD { int linux_inotify_init1(void); } -295 AUE_NULL STD { int linux_preadv(void); } -296 AUE_NULL STD { int linux_pwritev(void); } -297 AUE_NULL STD { int linux_rt_tsigqueueinfo(void); } +294 AUE_NULL STD { int linux_inotify_init1(l_int flags); } +; linux 2.6.30: +295 AUE_NULL STD { int linux_preadv(l_ulong fd, \ + struct iovec *vec, l_ulong vlen, \ + l_ulong pos_l, l_ulong pos_h); } +296 AUE_NULL STD { int linux_pwritev(l_ulong fd, \ + struct iovec *vec, l_ulong vlen, \ + l_ulong pos_l, l_ulong pos_h); } +; linux 2.6.31: +297 AUE_NULL STD { int linux_rt_tgsigqueueinfo(l_pid_t tgid, \ + l_pid_t tid, l_int sig, l_siginfo_t *uinfo); } 298 AUE_NULL STD { int linux_perf_event_open(void); } +; linux 2.6.33: 299 AUE_NULL STD { int linux_recvmmsg(l_int s, \ struct l_mmsghdr *msg, l_uint vlen, \ l_uint flags, struct l_timespec *timeout); } +; linux 2.6.37: 300 AUE_NULL STD { int linux_fanotify_init(void); } 301 AUE_NULL STD { int linux_fanotify_mark(void); } +; linux 2.6.36: 302 AUE_NULL STD { int linux_prlimit64(l_pid_t pid, l_uint resource, \ struct rlimit *new, struct rlimit *old); } +; linux 2.6.39 (glibc 2.14): 303 AUE_NULL STD { int linux_name_to_handle_at(void); } 304 AUE_NULL STD { int linux_open_by_handle_at(void); } 305 AUE_NULL STD { int linux_clock_adjtime(void); } 306 AUE_SYNC STD { int linux_syncfs(l_int fd); } +; linux 3.0 (glibc 2.14): 307 AUE_NULL STD { int linux_sendmmsg(l_int s, \ struct l_mmsghdr *msg, l_uint vlen, \ l_uint flags); } -308 AUE_NULL STD { int linux_setns(void); } -309 AUE_NULL STD { int linux_process_vm_readv(void); } -310 AUE_NULL STD { int linux_process_vm_writev(void); } -311 AUE_NULL STD { int linux_kcmp(void); } -312 AUE_NULL STD { int linux_finit_module(void); } +308 AUE_NULL STD { int linux_setns(l_int fd, l_int nstype); } +; linux 2.6.19 (no glibc wrapper): +309 AUE_NULL STD { int linux_getcpu(l_uint *cpu, l_uint *node, \ + void *cache); } +; linux 3.2 (glibc 2.15): +310 AUE_NULL STD { int linux_process_vm_readv(l_pid_t pid, \ + const struct iovec *lvec, l_ulong liovcnt, \ + const struct iovec *rvec, l_ulong riovcnt, \ + l_ulong flags); } +311 AUE_NULL STD { int linux_process_vm_writev(l_pid_t pid, \ + const struct iovec *lvec, l_ulong liovcnt, \ + const struct iovec *rvec, l_ulong riovcnt, \ + l_ulong flags); } +; linux 3.5 (no glibc wrapper): +312 AUE_NULL STD { int linux_kcmp(l_pid_t pid1, l_pid_t pid2, \ + l_int type, l_ulong idx1, l_ulong idx); } +; linux 3.8 (no glibc wrapper): +313 AUE_NULL STD { int linux_finit_module(l_int fd, \ + const char *uargs, l_int flags); } +; linux 3.14: +314 AUE_NULL STD { int linux_sched_setattr(l_pid_t pid, \ + void *attr, l_uint flags); } +315 AUE_NULL STD { int linux_sched_getattr(l_pid_t pid, \ + void *attr, l_uint size, l_uint flags); } +; linux 3.15: +316 AUE_NULL STD { int linux_renameat2(l_int oldfd, \ + const char *oldname, l_int newfd, \ + const char *newname, unsigned int flags); } +; linux 3.17: +317 AUE_NULL STD { int linux_seccomp(l_uint op, l_uint flags, \ + const char *uargs); } +318 AUE_NULL STD { int linux_getrandom(char *buf, \ + l_size_t count, l_uint flags); } +319 AUE_NULL STD { int linux_memfd_create(const char *uname_ptr, \ + l_uint flags); } +320 AUE_NULL STD { int linux_kexec_file_load(l_int kernel_fd, \ + l_int initrd_fd, l_ulong cmdline_len, \ + const char *cmdline_ptr, l_ulong flags); } +; linux 3.18: +321 AUE_NULL STD { int linux_bpf(l_int cmd, void *attr, \ + l_uint size); } +; linux 3.19: +322 AUE_NULL STD { int linux_execveat(l_int dfd, \ + const char *filename, const char **argv, \ + const char **envp, l_int flags); } +; linux 4.2: +323 AUE_NULL STD { int linux_userfaultfd(l_int flags); } +; linux 4.3: +324 AUE_NULL STD { int linux_membarrier(l_int cmd, l_int flags); } +; linux 4.4: +325 AUE_NULL STD { int linux_mlock2(l_ulong start, l_size_t len, \ + l_int flags); } +; linux 4.5: +326 AUE_NULL STD { int linux_copy_file_range(l_int fd_in, \ + l_loff_t *off_in, l_int fd_out, \ + l_loff_t *off_out, l_size_t len, \ + l_uint flags); } +; linux 4.6: +327 AUE_NULL STD { int linux_preadv2(l_ulong fd, \ + const struct iovec *vec, l_ulong vlen, \ + l_ulong pos_l, l_ulong pos_h, l_int flags); } +328 AUE_NULL STD { int linux_pwritev2(l_ulong fd, \ + const struct iovec *vec, l_ulong vlen, \ + l_ulong pos_l, l_ulong pos_h, l_int flags); } +; linux 4.8: +329 AUE_NULL STD { int linux_pkey_mprotect(l_ulong start, \ + l_size_t len, l_ulong prot, l_int pkey); } +330 AUE_NULL STD { int linux_pkey_alloc(l_ulong flags, \ + l_ulong init_val); } +331 AUE_NULL STD { int linux_pkey_free(l_int pkey); } + ; please, keep this line at the end. -313 AUE_NULL UNIMPL nosys +332 AUE_NULL UNIMPL nosys Modified: head/sys/amd64/linux32/linux32_dummy.c ============================================================================== --- head/sys/amd64/linux32/linux32_dummy.c Sun Feb 5 14:03:25 2017 (r313283) +++ head/sys/amd64/linux32/linux32_dummy.c Sun Feb 5 14:17:09 2017 (r313284) @@ -114,18 +114,51 @@ DUMMY(inotify_init1); DUMMY(preadv); DUMMY(pwritev); /* linux 2.6.31: */ -DUMMY(rt_tsigqueueinfo); +DUMMY(rt_tgsigqueueinfo); DUMMY(perf_event_open); /* linux 2.6.33: */ DUMMY(fanotify_init); DUMMY(fanotify_mark); -/* later: */ +/* linux 2.6.39: */ DUMMY(name_to_handle_at); DUMMY(open_by_handle_at); DUMMY(clock_adjtime); +/* linux 3.0: */ DUMMY(setns); +/* linux 3.2: */ DUMMY(process_vm_readv); DUMMY(process_vm_writev); +/* linux 3.5: */ +DUMMY(kcmp); +/* linux 3.8: */ +DUMMY(finit_module); +DUMMY(sched_setattr); +DUMMY(sched_getattr); +/* linux 3.14: */ +DUMMY(renameat2); +/* linux 3.15: */ +DUMMY(seccomp); +DUMMY(getrandom); +DUMMY(memfd_create); +/* linux 3.18: */ +DUMMY(bpf); +/* linux 3.19: */ +DUMMY(execveat); +/* linux 4.2: */ +DUMMY(userfaultfd); +/* linux 4.3: */ +DUMMY(membarrier); +/* linux 4.4: */ +DUMMY(mlock2); +/* linux 4.5: */ +DUMMY(copy_file_range); +/* linux 4.6: */ +DUMMY(preadv2); +DUMMY(pwritev2); +/* linux 4.8: */ +DUMMY(pkey_mprotect); +DUMMY(pkey_alloc); +DUMMY(pkey_free); #define DUMMY_XATTR(s) \ int \ Modified: head/sys/amd64/linux32/syscalls.master ============================================================================== --- head/sys/amd64/linux32/syscalls.master Sun Feb 5 14:03:25 2017 (r313283) +++ head/sys/amd64/linux32/syscalls.master Sun Feb 5 14:17:09 2017 (r313284) @@ -11,18 +11,20 @@ ; there is no audit event for the call at this time. For the ; case where the event exists, but we don't want auditing, the ; event should be #defined to AUE_NULL in audit_kevents.h. -; type one of STD, OBSOL, UNIMPL +; type one of STD, NOPROTO, UNIMPL ; name psuedo-prototype of syscall routine ; If one of the following alts is different, then all appear: ; altname name of system call if different ; alttag name of args struct tag if different from [o]`name'"_args" ; altrtyp return type if not int (bogus - syscalls always return int) -; for UNIMPL/OBSOL, name continues with comments +; for UNIMPL, name continues with comments ; types: ; STD always included -; OBSOL obsolete, not included in system, only specifies name ; UNIMPL not implemented, placeholder only +; NOPROTO same as STD except do not create structure or +; function prototype in sys/sysproto.h. Does add a +; definition to syscall.h besides adding a sysent. #include "opt_compat.h" #include @@ -553,10 +555,15 @@ 331 AUE_NULL STD { int linux_pipe2(l_int *pipefds, l_int flags); } 332 AUE_NULL STD { int linux_inotify_init1(void); } ; linux 2.6.30: -333 AUE_NULL STD { int linux_preadv(void); } -334 AUE_NULL STD { int linux_pwritev(void); } +333 AUE_NULL STD { int linux_preadv(l_ulong fd, \ + struct iovec *vec, l_ulong vlen, \ + l_ulong pos_l, l_ulong pos_h); } +334 AUE_NULL STD { int linux_pwritev(l_ulong fd, \ + struct iovec *vec, l_ulong vlen, \ + l_ulong pos_l, l_ulong pos_h); } ; linux 2.6.31: -335 AUE_NULL STD { int linux_rt_tsigqueueinfo(void); } +335 AUE_NULL STD { int linux_rt_tgsigqueueinfo(l_pid_t tgid, \ + l_pid_t tid, l_int sig, l_siginfo_t *uinfo); } 336 AUE_NULL STD { int linux_perf_event_open(void); } ; linux 2.6.33: 337 AUE_NULL STD { int linux_recvmmsg(l_int s, \ @@ -569,16 +576,113 @@ l_uint resource, \ struct rlimit *new, \ struct rlimit *old); } -; later: +; linux 2.6.39: 341 AUE_NULL STD { int linux_name_to_handle_at(void); } 342 AUE_NULL STD { int linux_open_by_handle_at(void); } 343 AUE_NULL STD { int linux_clock_adjtime(void); } 344 AUE_SYNC STD { int linux_syncfs(l_int fd); } +; linux 3.0: 345 AUE_NULL STD { int linux_sendmmsg(l_int s, \ struct l_mmsghdr *msg, l_uint vlen, \ l_uint flags); } 346 AUE_NULL STD { int linux_setns(void); } -347 AUE_NULL STD { int linux_process_vm_readv(void); } -348 AUE_NULL STD { int linux_process_vm_writev(void); } +; linux 3.2 (glibc 2.15): +347 AUE_NULL STD { int linux_process_vm_readv(l_pid_t pid, \ + const struct iovec *lvec, l_ulong liovcnt, \ + const struct iovec *rvec, l_ulong riovcnt, \ + l_ulong flags); } +348 AUE_NULL STD { int linux_process_vm_writev(l_pid_t pid, \ + const struct iovec *lvec, l_ulong liovcnt, \ + const struct iovec *rvec, l_ulong riovcnt, \ + l_ulong flags); } +; linux 3.5 (no glibc wrapper): +349 AUE_NULL STD { int linux_kcmp(l_pid_t pid1, l_pid_t pid2, \ + l_int type, l_ulong idx1, l_ulong idx); } +; linux 3.8 (no glibc wrapper): +350 AUE_NULL STD { int linux_finit_module(l_int fd, \ + const char *uargs, l_int flags); } +; linux 3.14: +351 AUE_NULL STD { int linux_sched_setattr(l_pid_t pid, \ + void *attr, l_uint flags); } +352 AUE_NULL STD { int linux_sched_getattr(l_pid_t pid, \ + void *attr, l_uint size, l_uint flags); } +; linux 3.15: +353 AUE_NULL STD { int linux_renameat2(l_int oldfd, \ + const char *oldname, l_int newfd, \ + const char *newname, unsigned int flags); } +; linux 3.17: +354 AUE_NULL STD { int linux_seccomp(l_uint op, l_uint flags, \ + const char *uargs); } +355 AUE_NULL STD { int linux_getrandom(char *buf, \ + l_size_t count, l_uint flags); } +356 AUE_NULL STD { int linux_memfd_create(const char *uname_ptr, \ + l_uint flags); } +; linux 3.18: +357 AUE_NULL STD { int linux_bpf(l_int cmd, void *attr, \ + l_uint size); } +; linux 3.19: +358 AUE_NULL STD { int linux_execveat(l_int dfd, \ + const char *filename, const char **argv, \ + const char **envp, l_int flags); } +; linux 4.3: sockets now direct system calls: +359 AUE_SOCKET STD { int linux_socket(l_int domain, l_int type, \ + l_int protocol); } +360 AUE_SOCKETPAIR STD { int linux_socketpair(l_int domain, \ + l_int type, l_int protocol, l_uintptr_t rsv); } +361 AUE_BIND STD { int linux_bind(l_int s, l_uintptr_t name, \ + l_int namelen); } +362 AUE_CONNECT STD { int linux_connect(l_int s, l_uintptr_t name, \ + l_int namelen); } +363 AUE_LISTEN STD { int linux_listen(l_int s, l_int backlog); } +364 AUE_ACCEPT STD { int linux_accept4(l_int s, l_uintptr_t addr, \ + l_uintptr_t namelen, l_int flags); } +365 AUE_GETSOCKOPT STD { int linux_getsockopt(l_int s, l_int level, \ + l_int optname, l_uintptr_t optval, \ + l_uintptr_t optlen); } +366 AUE_SETSOCKOPT STD { int linux_setsockopt(l_int s, l_int level, \ + l_int optname, l_uintptr_t optval, \ + l_int optlen); } +367 AUE_GETSOCKNAME STD { int linux_getsockname(l_int s, \ + l_uintptr_t addr, l_uintptr_t namelen); } +368 AUE_GETPEERNAME STD { int linux_getpeername(l_int s, \ + l_uintptr_t addr, l_uintptr_t namelen); } +369 AUE_SENDTO STD { int linux_sendto(l_int s, l_uintptr_t msg, \ + l_int len, l_int flags, l_uintptr_t to, \ + l_int tolen); } +370 AUE_SENDMSG STD { int linux_sendmsg(l_int s, l_uintptr_t msg, \ + l_int flags); } +371 AUE_RECVFROM STD { int linux_recvfrom(l_int s, l_uintptr_t buf, \ + l_size_t len, l_int flags, l_uintptr_t from, \ + l_uintptr_t fromlen); } +372 AUE_RECVMSG STD { int linux_recvmsg(l_int s, l_uintptr_t msg, \ + l_int flags); } +373 AUE_NULL STD { int linux_shutdown(l_int s, l_int how); } +; +; linux 4.2: +374 AUE_NULL STD { int linux_userfaultfd(l_int flags); } +; linux 4.3: +375 AUE_NULL STD { int linux_membarrier(l_int cmd, l_int flags); } +; linux 4.4: +376 AUE_NULL STD { int linux_mlock2(l_ulong start, l_size_t len, \ + l_int flags); } +; linux 4.5: +377 AUE_NULL STD { int linux_copy_file_range(l_int fd_in, \ + l_loff_t *off_in, l_int fd_out, \ + l_loff_t *off_out, l_size_t len, \ + l_uint flags); } +; linux 4.6: +378 AUE_NULL STD { int linux_preadv2(l_ulong fd, \ + const struct iovec *vec, l_ulong vlen, \ + l_ulong pos_l, l_ulong pos_h, l_int flags); } +379 AUE_NULL STD { int linux_pwritev2(l_ulong fd, \ + const struct iovec *vec, l_ulong vlen, \ + l_ulong pos_l, l_ulong pos_h, l_int flags); } +; linux 4.8: +380 AUE_NULL STD { int linux_pkey_mprotect(l_ulong start, \ + l_size_t len, l_ulong prot, l_int pkey); } +381 AUE_NULL STD { int linux_pkey_alloc(l_ulong flags, \ + l_ulong init_val); } +382 AUE_NULL STD { int linux_pkey_free(l_int pkey); } + ; please, keep this line at the end. -349 AUE_NULL UNIMPL nosys +383 AUE_NULL UNIMPL nosys Modified: head/sys/compat/linux/linux_socket.h ============================================================================== --- head/sys/compat/linux/linux_socket.h Sun Feb 5 14:03:25 2017 (r313283) +++ head/sys/compat/linux/linux_socket.h Sun Feb 5 14:17:09 2017 (r313284) @@ -142,131 +142,18 @@ struct l_ucred { #if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) -struct linux_sendto_args { - int s; - l_uintptr_t msg; - int len; - int flags; - l_uintptr_t to; - int tolen; -}; - -struct linux_socket_args { - int domain; - int type; - int protocol; -}; - -struct linux_bind_args { - int s; - l_uintptr_t name; - int namelen; -}; - -struct linux_connect_args { - int s; - l_uintptr_t name; - int namelen; -}; - -struct linux_listen_args { - int s; - int backlog; -}; - struct linux_accept_args { int s; l_uintptr_t addr; l_uintptr_t namelen; }; -struct linux_accept4_args { - int s; - l_uintptr_t addr; - l_uintptr_t namelen; - int flags; -}; - -struct linux_getsockname_args { - int s; - l_uintptr_t addr; - l_uintptr_t namelen; -}; - -struct linux_getpeername_args { - int s; - l_uintptr_t addr; - l_uintptr_t namelen; -}; - -struct linux_socketpair_args { - int domain; - int type; - int protocol; - l_uintptr_t rsv; -}; - -struct linux_recvfrom_args { - int s; - l_uintptr_t buf; - int len; - int flags; - l_uintptr_t from; - l_uintptr_t fromlen; -}; - -struct linux_sendmsg_args { - int s; - l_uintptr_t msg; - int flags; -}; - -struct linux_recvmsg_args { - int s; - l_uintptr_t msg; - int flags; -}; - -struct linux_shutdown_args { - int s; - int how; -}; - -struct linux_setsockopt_args { - int s; - int level; - int optname; - l_uintptr_t optval; - int optlen; -}; - -struct linux_getsockopt_args { - int s; - int level; - int optname; - l_uintptr_t optval; - l_uintptr_t optlen; -}; - -int linux_socket(struct thread *td, struct linux_socket_args *args); -int linux_bind(struct thread *td, struct linux_bind_args *args); -int linux_connect(struct thread *, struct linux_connect_args *); -int linux_listen(struct thread *td, struct linux_listen_args *args); int linux_accept(struct thread *td, struct linux_accept_args *args); -int linux_accept4(struct thread *td, struct linux_accept4_args *args); -int linux_getsockname(struct thread *td, struct linux_getsockname_args *args); -int linux_getpeername(struct thread *td, struct linux_getpeername_args *args); -int linux_socketpair(struct thread *td, struct linux_socketpair_args *args); -int linux_sendto(struct thread *td, struct linux_sendto_args *args); -int linux_recvfrom(struct thread *td, struct linux_recvfrom_args *args); -int linux_sendmsg(struct thread *td, struct linux_sendmsg_args *args); -int linux_recvmsg(struct thread *td, struct linux_recvmsg_args *args); -int linux_shutdown(struct thread *td, struct linux_shutdown_args *args); -int linux_setsockopt(struct thread *td, struct linux_setsockopt_args *args); -int linux_getsockopt(struct thread *td, struct linux_getsockopt_args *args); #endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */ + + /* Operations for socketcall */ #define LINUX_SOCKET 1 Modified: head/sys/i386/linux/linux_dummy.c ============================================================================== --- head/sys/i386/linux/linux_dummy.c Sun Feb 5 14:03:25 2017 (r313283) +++ head/sys/i386/linux/linux_dummy.c Sun Feb 5 14:17:09 2017 (r313284) @@ -109,19 +109,52 @@ DUMMY(inotify_init1); /* linux 2.6.30: */ DUMMY(preadv); DUMMY(pwritev); -/* linux 2.6.31 */ -DUMMY(rt_tsigqueueinfo); +/* linux 2.6.31: */ +DUMMY(rt_tgsigqueueinfo); DUMMY(perf_event_open); /* linux 2.6.33: */ DUMMY(fanotify_init); DUMMY(fanotify_mark); -/* later: */ +/* linux 2.6.39: */ DUMMY(name_to_handle_at); DUMMY(open_by_handle_at); DUMMY(clock_adjtime); +/* linux 3.0: */ DUMMY(setns); +/* linux 3.2: */ DUMMY(process_vm_readv); DUMMY(process_vm_writev); +/* linux 3.5: */ +DUMMY(kcmp); +/* linux 3.8: */ +DUMMY(finit_module); +DUMMY(sched_setattr); +DUMMY(sched_getattr); +/* linux 3.14: */ +DUMMY(renameat2); +/* linux 3.15: */ +DUMMY(seccomp); +DUMMY(getrandom); +DUMMY(memfd_create); +/* linux 3.18: */ +DUMMY(bpf); +/* linux 3.19: */ +DUMMY(execveat); +/* linux 4.2: */ +DUMMY(userfaultfd); +/* linux 4.3: */ +DUMMY(membarrier); +/* linux 4.4: */ +DUMMY(mlock2); +/* linux 4.5: */ +DUMMY(copy_file_range); +/* linux 4.6: */ +DUMMY(preadv2); +DUMMY(pwritev2); +/* linux 4.8: */ +DUMMY(pkey_mprotect); +DUMMY(pkey_alloc); +DUMMY(pkey_free); #define DUMMY_XATTR(s) \ int \ Modified: head/sys/i386/linux/syscalls.master ============================================================================== --- head/sys/i386/linux/syscalls.master Sun Feb 5 14:03:25 2017 (r313283) +++ head/sys/i386/linux/syscalls.master Sun Feb 5 14:17:09 2017 (r313284) @@ -11,18 +11,20 @@ ; there is no audit event for the call at this time. For the ; case where the event exists, but we don't want auditing, the ; event should be #defined to AUE_NULL in audit_kevents.h. -; type one of STD, OBSOL, UNIMPL +; type one of STD, NOPROTO, UNIMPL ; name psuedo-prototype of syscall routine ; If one of the following alts is different, then all appear: ; altname name of system call if different ; alttag name of args struct tag if different from [o]`name'"_args" ; altrtyp return type if not int (bogus - syscalls always return int) -; for UNIMPL/OBSOL, name continues with comments +; for UNIMPL, name continues with comments ; types: ; STD always included -; OBSOL obsolete, not included in system, only specifies name ; UNIMPL not implemented, placeholder only +; NOPROTO same as STD except do not create structure or +; function prototype in sys/sysproto.h. Does add a +; definition to syscall.h besides adding a sysent. #include #include @@ -561,10 +563,15 @@ 331 AUE_NULL STD { int linux_pipe2(l_int *pipefds, l_int flags); } 332 AUE_NULL STD { int linux_inotify_init1(void); } ; linux 2.6.30: -333 AUE_NULL STD { int linux_preadv(void); } -334 AUE_NULL STD { int linux_pwritev(void); } +333 AUE_NULL STD { int linux_preadv(l_ulong fd, \ + struct iovec *vec, l_ulong vlen, \ + l_ulong pos_l, l_ulong pos_h); } +334 AUE_NULL STD { int linux_pwritev(l_ulong fd, \ + struct iovec *vec, l_ulong vlen, \ + l_ulong pos_l, l_ulong pos_h); } ; linux 2.6.31: -335 AUE_NULL STD { int linux_rt_tsigqueueinfo(void); } +335 AUE_NULL STD { int linux_rt_tgsigqueueinfo(l_pid_t tgid, \ + l_pid_t tid, l_int sig, l_siginfo_t *uinfo); } 336 AUE_NULL STD { int linux_perf_event_open(void); } ; linux 2.6.33: 337 AUE_NULL STD { int linux_recvmmsg(l_int s, \ @@ -577,16 +584,112 @@ l_uint resource, \ struct rlimit *new, \ struct rlimit *old); } -; later: +; linux 2.6.39: 341 AUE_NULL STD { int linux_name_to_handle_at(void); } 342 AUE_NULL STD { int linux_open_by_handle_at(void); } 343 AUE_NULL STD { int linux_clock_adjtime(void); } 344 AUE_SYNC STD { int linux_syncfs(l_int fd); } +; linux 3.0: 345 AUE_NULL STD { int linux_sendmmsg(l_int s, \ struct l_mmsghdr *msg, l_uint vlen, \ l_uint flags); } 346 AUE_NULL STD { int linux_setns(void); } -347 AUE_NULL STD { int linux_process_vm_readv(void); } -348 AUE_NULL STD { int linux_process_vm_writev(void); } +; linux 3.2 (glibc 2.15): +347 AUE_NULL STD { int linux_process_vm_readv(l_pid_t pid, \ + const struct iovec *lvec, l_ulong liovcnt, \ + const struct iovec *rvec, l_ulong riovcnt, \ + l_ulong flags); } +348 AUE_NULL STD { int linux_process_vm_writev(l_pid_t pid, \ + const struct iovec *lvec, l_ulong liovcnt, \ + const struct iovec *rvec, l_ulong riovcnt, \ + l_ulong flags); } +; linux 3.5 (no glibc wrapper): +349 AUE_NULL STD { int linux_kcmp(l_pid_t pid1, l_pid_t pid2, \ + l_int type, l_ulong idx1, l_ulong idx); } +; linux 3.8 (no glibc wrapper): +350 AUE_NULL STD { int linux_finit_module(l_int fd, \ + const char *uargs, l_int flags); } +; linux 3.14: +351 AUE_NULL STD { int linux_sched_setattr(l_pid_t pid, \ + void *attr, l_uint flags); } +352 AUE_NULL STD { int linux_sched_getattr(l_pid_t pid, \ + void *attr, l_uint size, l_uint flags); } +; linux 3.15: +353 AUE_NULL STD { int linux_renameat2(l_int oldfd, \ + const char *oldname, l_int newfd, \ + const char *newname, unsigned int flags); } +; linux 3.17: +354 AUE_NULL STD { int linux_seccomp(l_uint op, l_uint flags, \ + const char *uargs); } +355 AUE_NULL STD { int linux_getrandom(char *buf, \ + l_size_t count, l_uint flags); } +356 AUE_NULL STD { int linux_memfd_create(const char *uname_ptr, \ + l_uint flags); } +; linux 3.18: +357 AUE_NULL STD { int linux_bpf(l_int cmd, void *attr, \ + l_uint size); } +; linux 3.19: +358 AUE_NULL STD { int linux_execveat(l_int dfd, \ + const char *filename, const char **argv, \ + const char **envp, l_int flags); } +; linux 4.3: sockets now direct system calls: +359 AUE_SOCKET STD { int linux_socket(l_int domain, l_int type, \ + l_int protocol); } +360 AUE_SOCKETPAIR STD { int linux_socketpair(l_int domain, \ + l_int type, l_int protocol, l_uintptr_t rsv); } +361 AUE_BIND STD { int linux_bind(l_int s, l_uintptr_t name, \ + l_int namelen); } +362 AUE_CONNECT STD { int linux_connect(l_int s, l_uintptr_t name, \ + l_int namelen); } +363 AUE_LISTEN STD { int linux_listen(l_int s, l_int backlog); } +364 AUE_ACCEPT STD { int linux_accept4(l_int s, l_uintptr_t addr, \ + l_uintptr_t namelen, l_int flags); } +365 AUE_GETSOCKOPT STD { int linux_getsockopt(l_int s, l_int level, \ + l_int optname, l_uintptr_t optval, \ + l_uintptr_t optlen); } +366 AUE_SETSOCKOPT STD { int linux_setsockopt(l_int s, l_int level, \ + l_int optname, l_uintptr_t optval, \ + l_int optlen); } +367 AUE_GETSOCKNAME STD { int linux_getsockname(l_int s, \ + l_uintptr_t addr, l_uintptr_t namelen); } +368 AUE_GETPEERNAME STD { int linux_getpeername(l_int s, \ + l_uintptr_t addr, l_uintptr_t namelen); } +369 AUE_SENDTO STD { int linux_sendto(l_int s, l_uintptr_t msg, \ + l_int len, l_int flags, l_uintptr_t to, \ + l_int tolen); } +370 AUE_SENDMSG STD { int linux_sendmsg(l_int s, l_uintptr_t msg, \ + l_int flags); } +371 AUE_RECVFROM STD { int linux_recvfrom(l_int s, l_uintptr_t buf, \ + l_size_t len, l_int flags, l_uintptr_t from, \ + l_uintptr_t fromlen); } +372 AUE_RECVMSG STD { int linux_recvmsg(l_int s, l_uintptr_t msg, \ + l_int flags); } +373 AUE_NULL STD { int linux_shutdown(l_int s, l_int how); } +; linux 4.2: +374 AUE_NULL STD { int linux_userfaultfd(l_int flags); } +; linux 4.3: +375 AUE_NULL STD { int linux_membarrier(l_int cmd, l_int flags); } +; linux 4.4: +376 AUE_NULL STD { int linux_mlock2(l_ulong start, l_size_t len, \ + l_int flags); } +; linux 4.5: +377 AUE_NULL STD { int linux_copy_file_range(l_int fd_in, \ + l_loff_t *off_in, l_int fd_out, \ + l_loff_t *off_out, l_size_t len, \ + l_uint flags); } +; linux 4.6: +378 AUE_NULL STD { int linux_preadv2(l_ulong fd, \ + const struct iovec *vec, l_ulong vlen, \ + l_ulong pos_l, l_ulong pos_h, l_int flags); } +379 AUE_NULL STD { int linux_pwritev2(l_ulong fd, \ + const struct iovec *vec, l_ulong vlen, \ + l_ulong pos_l, l_ulong pos_h, l_int flags); } +; linux 4.8: +380 AUE_NULL STD { int linux_pkey_mprotect(l_ulong start, \ + l_size_t len, l_ulong prot, l_int pkey); } +381 AUE_NULL STD { int linux_pkey_alloc(l_ulong flags, \ + l_ulong init_val); } +382 AUE_NULL STD { int linux_pkey_free(l_int pkey); } + ; please, keep this line at the end. -349 AUE_NULL UNIMPL nosys +383 AUE_NULL UNIMPL nosys From owner-svn-src-head@freebsd.org Sun Feb 5 14:19: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 D4F17CD26D9; Sun, 5 Feb 2017 14:19:20 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 71FC4128F; Sun, 5 Feb 2017 14:19:20 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v15EJJD9006170; Sun, 5 Feb 2017 14:19:19 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v15EJJil006164; Sun, 5 Feb 2017 14:19:19 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201702051419.v15EJJil006164@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 5 Feb 2017 14:19:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313285 - in head/sys: amd64/linux amd64/linux32 i386/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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, 05 Feb 2017 14:19:20 -0000 Author: dchagin Date: Sun Feb 5 14:19:19 2017 New Revision: 313285 URL: https://svnweb.freebsd.org/changeset/base/313285 Log: Regen after r313284. MFC after: 2 week Modified: head/sys/amd64/linux/linux_proto.h head/sys/amd64/linux/linux_syscall.h head/sys/amd64/linux/linux_syscalls.c head/sys/amd64/linux/linux_sysent.c head/sys/amd64/linux/linux_systrace_args.c head/sys/amd64/linux32/linux32_proto.h head/sys/amd64/linux32/linux32_syscall.h head/sys/amd64/linux32/linux32_syscalls.c head/sys/amd64/linux32/linux32_sysent.c head/sys/amd64/linux32/linux32_systrace_args.c head/sys/i386/linux/linux_proto.h head/sys/i386/linux/linux_syscall.h head/sys/i386/linux/linux_syscalls.c head/sys/i386/linux/linux_sysent.c head/sys/i386/linux/linux_systrace_args.c Modified: head/sys/amd64/linux/linux_proto.h ============================================================================== --- head/sys/amd64/linux/linux_proto.h Sun Feb 5 14:17:09 2017 (r313284) +++ head/sys/amd64/linux/linux_proto.h Sun Feb 5 14:19:19 2017 (r313285) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux/syscalls.master 302515 2016-07-10 08:15:50Z dchagin + * created from FreeBSD: head/sys/amd64/linux/syscalls.master 313284 2017-02-05 14:17:09Z dchagin */ #ifndef _LINUX_SYSPROTO_H_ @@ -1000,7 +1000,7 @@ struct linux_epoll_pwait_args { struct linux_signalfd_args { register_t dummy; }; -struct linux_timerfd_args { +struct linux_timerfd_create_args { register_t dummy; }; struct linux_eventfd_args { @@ -1044,16 +1044,27 @@ struct linux_pipe2_args { char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; }; struct linux_inotify_init1_args { - register_t dummy; + char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; }; struct linux_preadv_args { - register_t dummy; + char fd_l_[PADL_(l_ulong)]; l_ulong fd; char fd_r_[PADR_(l_ulong)]; + char vec_l_[PADL_(struct iovec *)]; struct iovec * vec; char vec_r_[PADR_(struct iovec *)]; + char vlen_l_[PADL_(l_ulong)]; l_ulong vlen; char vlen_r_[PADR_(l_ulong)]; + char pos_l_l_[PADL_(l_ulong)]; l_ulong pos_l; char pos_l_r_[PADR_(l_ulong)]; + char pos_h_l_[PADL_(l_ulong)]; l_ulong pos_h; char pos_h_r_[PADR_(l_ulong)]; }; struct linux_pwritev_args { - register_t dummy; -}; -struct linux_rt_tsigqueueinfo_args { - register_t dummy; + char fd_l_[PADL_(l_ulong)]; l_ulong fd; char fd_r_[PADR_(l_ulong)]; + char vec_l_[PADL_(struct iovec *)]; struct iovec * vec; char vec_r_[PADR_(struct iovec *)]; + char vlen_l_[PADL_(l_ulong)]; l_ulong vlen; char vlen_r_[PADR_(l_ulong)]; + char pos_l_l_[PADL_(l_ulong)]; l_ulong pos_l; char pos_l_r_[PADR_(l_ulong)]; + char pos_h_l_[PADL_(l_ulong)]; l_ulong pos_h; char pos_h_r_[PADR_(l_ulong)]; +}; +struct linux_rt_tgsigqueueinfo_args { + char tgid_l_[PADL_(l_pid_t)]; l_pid_t tgid; char tgid_r_[PADR_(l_pid_t)]; + char tid_l_[PADL_(l_pid_t)]; l_pid_t tid; char tid_r_[PADR_(l_pid_t)]; + char sig_l_[PADL_(l_int)]; l_int sig; char sig_r_[PADR_(l_int)]; + char uinfo_l_[PADL_(l_siginfo_t *)]; l_siginfo_t * uinfo; char uinfo_r_[PADR_(l_siginfo_t *)]; }; struct linux_perf_event_open_args { register_t dummy; @@ -1096,19 +1107,141 @@ struct linux_sendmmsg_args { char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; }; struct linux_setns_args { - register_t dummy; + char fd_l_[PADL_(l_int)]; l_int fd; char fd_r_[PADR_(l_int)]; + char nstype_l_[PADL_(l_int)]; l_int nstype; char nstype_r_[PADR_(l_int)]; +}; +struct linux_getcpu_args { + char cpu_l_[PADL_(l_uint *)]; l_uint * cpu; char cpu_r_[PADR_(l_uint *)]; + char node_l_[PADL_(l_uint *)]; l_uint * node; char node_r_[PADR_(l_uint *)]; + char cache_l_[PADL_(void *)]; void * cache; char cache_r_[PADR_(void *)]; }; struct linux_process_vm_readv_args { - register_t dummy; + char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)]; + char lvec_l_[PADL_(const struct iovec *)]; const struct iovec * lvec; char lvec_r_[PADR_(const struct iovec *)]; + char liovcnt_l_[PADL_(l_ulong)]; l_ulong liovcnt; char liovcnt_r_[PADR_(l_ulong)]; + char rvec_l_[PADL_(const struct iovec *)]; const struct iovec * rvec; char rvec_r_[PADR_(const struct iovec *)]; + char riovcnt_l_[PADL_(l_ulong)]; l_ulong riovcnt; char riovcnt_r_[PADR_(l_ulong)]; + char flags_l_[PADL_(l_ulong)]; l_ulong flags; char flags_r_[PADR_(l_ulong)]; }; struct linux_process_vm_writev_args { - register_t dummy; + char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)]; + char lvec_l_[PADL_(const struct iovec *)]; const struct iovec * lvec; char lvec_r_[PADR_(const struct iovec *)]; + char liovcnt_l_[PADL_(l_ulong)]; l_ulong liovcnt; char liovcnt_r_[PADR_(l_ulong)]; + char rvec_l_[PADL_(const struct iovec *)]; const struct iovec * rvec; char rvec_r_[PADR_(const struct iovec *)]; + char riovcnt_l_[PADL_(l_ulong)]; l_ulong riovcnt; char riovcnt_r_[PADR_(l_ulong)]; + char flags_l_[PADL_(l_ulong)]; l_ulong flags; char flags_r_[PADR_(l_ulong)]; }; struct linux_kcmp_args { - register_t dummy; + char pid1_l_[PADL_(l_pid_t)]; l_pid_t pid1; char pid1_r_[PADR_(l_pid_t)]; + char pid2_l_[PADL_(l_pid_t)]; l_pid_t pid2; char pid2_r_[PADR_(l_pid_t)]; + char type_l_[PADL_(l_int)]; l_int type; char type_r_[PADR_(l_int)]; + char idx1_l_[PADL_(l_ulong)]; l_ulong idx1; char idx1_r_[PADR_(l_ulong)]; + char idx_l_[PADL_(l_ulong)]; l_ulong idx; char idx_r_[PADR_(l_ulong)]; }; struct linux_finit_module_args { - register_t dummy; + char fd_l_[PADL_(l_int)]; l_int fd; char fd_r_[PADR_(l_int)]; + char uargs_l_[PADL_(const char *)]; const char * uargs; char uargs_r_[PADR_(const char *)]; + char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; +}; +struct linux_sched_setattr_args { + char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)]; + char attr_l_[PADL_(void *)]; void * attr; char attr_r_[PADR_(void *)]; + char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; +}; +struct linux_sched_getattr_args { + char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)]; + char attr_l_[PADL_(void *)]; void * attr; char attr_r_[PADR_(void *)]; + char size_l_[PADL_(l_uint)]; l_uint size; char size_r_[PADR_(l_uint)]; + char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; +}; +struct linux_renameat2_args { + char oldfd_l_[PADL_(l_int)]; l_int oldfd; char oldfd_r_[PADR_(l_int)]; + char oldname_l_[PADL_(const char *)]; const char * oldname; char oldname_r_[PADR_(const char *)]; + char newfd_l_[PADL_(l_int)]; l_int newfd; char newfd_r_[PADR_(l_int)]; + char newname_l_[PADL_(const char *)]; const char * newname; char newname_r_[PADR_(const char *)]; + char flags_l_[PADL_(unsigned int)]; unsigned int flags; char flags_r_[PADR_(unsigned int)]; +}; +struct linux_seccomp_args { + char op_l_[PADL_(l_uint)]; l_uint op; char op_r_[PADR_(l_uint)]; + char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; + char uargs_l_[PADL_(const char *)]; const char * uargs; char uargs_r_[PADR_(const char *)]; +}; +struct linux_getrandom_args { + char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)]; + char count_l_[PADL_(l_size_t)]; l_size_t count; char count_r_[PADR_(l_size_t)]; + char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; +}; +struct linux_memfd_create_args { + char uname_ptr_l_[PADL_(const char *)]; const char * uname_ptr; char uname_ptr_r_[PADR_(const char *)]; + char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; +}; +struct linux_kexec_file_load_args { + char kernel_fd_l_[PADL_(l_int)]; l_int kernel_fd; char kernel_fd_r_[PADR_(l_int)]; + char initrd_fd_l_[PADL_(l_int)]; l_int initrd_fd; char initrd_fd_r_[PADR_(l_int)]; + char cmdline_len_l_[PADL_(l_ulong)]; l_ulong cmdline_len; char cmdline_len_r_[PADR_(l_ulong)]; + char cmdline_ptr_l_[PADL_(const char *)]; const char * cmdline_ptr; char cmdline_ptr_r_[PADR_(const char *)]; + char flags_l_[PADL_(l_ulong)]; l_ulong flags; char flags_r_[PADR_(l_ulong)]; +}; +struct linux_bpf_args { + char cmd_l_[PADL_(l_int)]; l_int cmd; char cmd_r_[PADR_(l_int)]; + char attr_l_[PADL_(void *)]; void * attr; char attr_r_[PADR_(void *)]; + char size_l_[PADL_(l_uint)]; l_uint size; char size_r_[PADR_(l_uint)]; +}; +struct linux_execveat_args { + char dfd_l_[PADL_(l_int)]; l_int dfd; char dfd_r_[PADR_(l_int)]; + char filename_l_[PADL_(const char *)]; const char * filename; char filename_r_[PADR_(const char *)]; + char argv_l_[PADL_(const char **)]; const char ** argv; char argv_r_[PADR_(const char **)]; + char envp_l_[PADL_(const char **)]; const char ** envp; char envp_r_[PADR_(const char **)]; + char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; +}; +struct linux_userfaultfd_args { + char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; +}; +struct linux_membarrier_args { + char cmd_l_[PADL_(l_int)]; l_int cmd; char cmd_r_[PADR_(l_int)]; + char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; +}; +struct linux_mlock2_args { + char start_l_[PADL_(l_ulong)]; l_ulong start; char start_r_[PADR_(l_ulong)]; + char len_l_[PADL_(l_size_t)]; l_size_t len; char len_r_[PADR_(l_size_t)]; + char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; +}; +struct linux_copy_file_range_args { + char fd_in_l_[PADL_(l_int)]; l_int fd_in; char fd_in_r_[PADR_(l_int)]; + char off_in_l_[PADL_(l_loff_t *)]; l_loff_t * off_in; char off_in_r_[PADR_(l_loff_t *)]; + char fd_out_l_[PADL_(l_int)]; l_int fd_out; char fd_out_r_[PADR_(l_int)]; + char off_out_l_[PADL_(l_loff_t *)]; l_loff_t * off_out; char off_out_r_[PADR_(l_loff_t *)]; + char len_l_[PADL_(l_size_t)]; l_size_t len; char len_r_[PADR_(l_size_t)]; + char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; +}; +struct linux_preadv2_args { + char fd_l_[PADL_(l_ulong)]; l_ulong fd; char fd_r_[PADR_(l_ulong)]; + char vec_l_[PADL_(const struct iovec *)]; const struct iovec * vec; char vec_r_[PADR_(const struct iovec *)]; + char vlen_l_[PADL_(l_ulong)]; l_ulong vlen; char vlen_r_[PADR_(l_ulong)]; + char pos_l_l_[PADL_(l_ulong)]; l_ulong pos_l; char pos_l_r_[PADR_(l_ulong)]; + char pos_h_l_[PADL_(l_ulong)]; l_ulong pos_h; char pos_h_r_[PADR_(l_ulong)]; + char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; +}; +struct linux_pwritev2_args { + char fd_l_[PADL_(l_ulong)]; l_ulong fd; char fd_r_[PADR_(l_ulong)]; + char vec_l_[PADL_(const struct iovec *)]; const struct iovec * vec; char vec_r_[PADR_(const struct iovec *)]; + char vlen_l_[PADL_(l_ulong)]; l_ulong vlen; char vlen_r_[PADR_(l_ulong)]; + char pos_l_l_[PADL_(l_ulong)]; l_ulong pos_l; char pos_l_r_[PADR_(l_ulong)]; + char pos_h_l_[PADL_(l_ulong)]; l_ulong pos_h; char pos_h_r_[PADR_(l_ulong)]; + char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; +}; +struct linux_pkey_mprotect_args { + char start_l_[PADL_(l_ulong)]; l_ulong start; char start_r_[PADR_(l_ulong)]; + char len_l_[PADL_(l_size_t)]; l_size_t len; char len_r_[PADR_(l_size_t)]; + char prot_l_[PADL_(l_ulong)]; l_ulong prot; char prot_r_[PADR_(l_ulong)]; + char pkey_l_[PADL_(l_int)]; l_int pkey; char pkey_r_[PADR_(l_int)]; +}; +struct linux_pkey_alloc_args { + char flags_l_[PADL_(l_ulong)]; l_ulong flags; char flags_r_[PADR_(l_ulong)]; + char init_val_l_[PADL_(l_ulong)]; l_ulong init_val; char init_val_r_[PADR_(l_ulong)]; +}; +struct linux_pkey_free_args { + char pkey_l_[PADL_(l_int)]; l_int pkey; char pkey_r_[PADR_(l_int)]; }; #define nosys linux_nosys int linux_open(struct thread *, struct linux_open_args *); @@ -1339,7 +1472,7 @@ int linux_move_pages(struct thread *, st int linux_utimensat(struct thread *, struct linux_utimensat_args *); int linux_epoll_pwait(struct thread *, struct linux_epoll_pwait_args *); int linux_signalfd(struct thread *, struct linux_signalfd_args *); -int linux_timerfd(struct thread *, struct linux_timerfd_args *); +int linux_timerfd_create(struct thread *, struct linux_timerfd_create_args *); int linux_eventfd(struct thread *, struct linux_eventfd_args *); int linux_fallocate(struct thread *, struct linux_fallocate_args *); int linux_timerfd_settime(struct thread *, struct linux_timerfd_settime_args *); @@ -1353,7 +1486,7 @@ int linux_pipe2(struct thread *, struct int linux_inotify_init1(struct thread *, struct linux_inotify_init1_args *); int linux_preadv(struct thread *, struct linux_preadv_args *); int linux_pwritev(struct thread *, struct linux_pwritev_args *); -int linux_rt_tsigqueueinfo(struct thread *, struct linux_rt_tsigqueueinfo_args *); +int linux_rt_tgsigqueueinfo(struct thread *, struct linux_rt_tgsigqueueinfo_args *); int linux_perf_event_open(struct thread *, struct linux_perf_event_open_args *); int linux_recvmmsg(struct thread *, struct linux_recvmmsg_args *); int linux_fanotify_init(struct thread *, struct linux_fanotify_init_args *); @@ -1365,10 +1498,29 @@ int linux_clock_adjtime(struct thread *, int linux_syncfs(struct thread *, struct linux_syncfs_args *); int linux_sendmmsg(struct thread *, struct linux_sendmmsg_args *); int linux_setns(struct thread *, struct linux_setns_args *); +int linux_getcpu(struct thread *, struct linux_getcpu_args *); int linux_process_vm_readv(struct thread *, struct linux_process_vm_readv_args *); int linux_process_vm_writev(struct thread *, struct linux_process_vm_writev_args *); int linux_kcmp(struct thread *, struct linux_kcmp_args *); int linux_finit_module(struct thread *, struct linux_finit_module_args *); +int linux_sched_setattr(struct thread *, struct linux_sched_setattr_args *); +int linux_sched_getattr(struct thread *, struct linux_sched_getattr_args *); +int linux_renameat2(struct thread *, struct linux_renameat2_args *); +int linux_seccomp(struct thread *, struct linux_seccomp_args *); +int linux_getrandom(struct thread *, struct linux_getrandom_args *); +int linux_memfd_create(struct thread *, struct linux_memfd_create_args *); +int linux_kexec_file_load(struct thread *, struct linux_kexec_file_load_args *); +int linux_bpf(struct thread *, struct linux_bpf_args *); +int linux_execveat(struct thread *, struct linux_execveat_args *); +int linux_userfaultfd(struct thread *, struct linux_userfaultfd_args *); +int linux_membarrier(struct thread *, struct linux_membarrier_args *); +int linux_mlock2(struct thread *, struct linux_mlock2_args *); +int linux_copy_file_range(struct thread *, struct linux_copy_file_range_args *); +int linux_preadv2(struct thread *, struct linux_preadv2_args *); +int linux_pwritev2(struct thread *, struct linux_pwritev2_args *); +int linux_pkey_mprotect(struct thread *, struct linux_pkey_mprotect_args *); +int linux_pkey_alloc(struct thread *, struct linux_pkey_alloc_args *); +int linux_pkey_free(struct thread *, struct linux_pkey_free_args *); #ifdef COMPAT_43 @@ -1632,7 +1784,7 @@ int linux_finit_module(struct thread *, #define LINUX_SYS_AUE_linux_utimensat AUE_FUTIMESAT #define LINUX_SYS_AUE_linux_epoll_pwait AUE_NULL #define LINUX_SYS_AUE_linux_signalfd AUE_NULL -#define LINUX_SYS_AUE_linux_timerfd AUE_NULL +#define LINUX_SYS_AUE_linux_timerfd_create AUE_NULL #define LINUX_SYS_AUE_linux_eventfd AUE_NULL #define LINUX_SYS_AUE_linux_fallocate AUE_NULL #define LINUX_SYS_AUE_linux_timerfd_settime AUE_NULL @@ -1646,7 +1798,7 @@ int linux_finit_module(struct thread *, #define LINUX_SYS_AUE_linux_inotify_init1 AUE_NULL #define LINUX_SYS_AUE_linux_preadv AUE_NULL #define LINUX_SYS_AUE_linux_pwritev AUE_NULL -#define LINUX_SYS_AUE_linux_rt_tsigqueueinfo AUE_NULL +#define LINUX_SYS_AUE_linux_rt_tgsigqueueinfo AUE_NULL #define LINUX_SYS_AUE_linux_perf_event_open AUE_NULL #define LINUX_SYS_AUE_linux_recvmmsg AUE_NULL #define LINUX_SYS_AUE_linux_fanotify_init AUE_NULL @@ -1658,10 +1810,29 @@ int linux_finit_module(struct thread *, #define LINUX_SYS_AUE_linux_syncfs AUE_SYNC #define LINUX_SYS_AUE_linux_sendmmsg AUE_NULL #define LINUX_SYS_AUE_linux_setns AUE_NULL +#define LINUX_SYS_AUE_linux_getcpu AUE_NULL #define LINUX_SYS_AUE_linux_process_vm_readv AUE_NULL #define LINUX_SYS_AUE_linux_process_vm_writev AUE_NULL #define LINUX_SYS_AUE_linux_kcmp AUE_NULL #define LINUX_SYS_AUE_linux_finit_module AUE_NULL +#define LINUX_SYS_AUE_linux_sched_setattr AUE_NULL +#define LINUX_SYS_AUE_linux_sched_getattr AUE_NULL +#define LINUX_SYS_AUE_linux_renameat2 AUE_NULL +#define LINUX_SYS_AUE_linux_seccomp AUE_NULL +#define LINUX_SYS_AUE_linux_getrandom AUE_NULL +#define LINUX_SYS_AUE_linux_memfd_create AUE_NULL +#define LINUX_SYS_AUE_linux_kexec_file_load AUE_NULL +#define LINUX_SYS_AUE_linux_bpf AUE_NULL +#define LINUX_SYS_AUE_linux_execveat AUE_NULL +#define LINUX_SYS_AUE_linux_userfaultfd AUE_NULL +#define LINUX_SYS_AUE_linux_membarrier AUE_NULL +#define LINUX_SYS_AUE_linux_mlock2 AUE_NULL +#define LINUX_SYS_AUE_linux_copy_file_range AUE_NULL +#define LINUX_SYS_AUE_linux_preadv2 AUE_NULL +#define LINUX_SYS_AUE_linux_pwritev2 AUE_NULL +#define LINUX_SYS_AUE_linux_pkey_mprotect AUE_NULL +#define LINUX_SYS_AUE_linux_pkey_alloc AUE_NULL +#define LINUX_SYS_AUE_linux_pkey_free AUE_NULL #undef PAD_ #undef PADL_ Modified: head/sys/amd64/linux/linux_syscall.h ============================================================================== --- head/sys/amd64/linux/linux_syscall.h Sun Feb 5 14:17:09 2017 (r313284) +++ head/sys/amd64/linux/linux_syscall.h Sun Feb 5 14:19:19 2017 (r313285) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux/syscalls.master 302515 2016-07-10 08:15:50Z dchagin + * created from FreeBSD: head/sys/amd64/linux/syscalls.master 313284 2017-02-05 14:17:09Z dchagin */ #define LINUX_SYS_read 0 @@ -277,7 +277,7 @@ #define LINUX_SYS_linux_utimensat 280 #define LINUX_SYS_linux_epoll_pwait 281 #define LINUX_SYS_linux_signalfd 282 -#define LINUX_SYS_linux_timerfd 283 +#define LINUX_SYS_linux_timerfd_create 283 #define LINUX_SYS_linux_eventfd 284 #define LINUX_SYS_linux_fallocate 285 #define LINUX_SYS_linux_timerfd_settime 286 @@ -291,7 +291,7 @@ #define LINUX_SYS_linux_inotify_init1 294 #define LINUX_SYS_linux_preadv 295 #define LINUX_SYS_linux_pwritev 296 -#define LINUX_SYS_linux_rt_tsigqueueinfo 297 +#define LINUX_SYS_linux_rt_tgsigqueueinfo 297 #define LINUX_SYS_linux_perf_event_open 298 #define LINUX_SYS_linux_recvmmsg 299 #define LINUX_SYS_linux_fanotify_init 300 @@ -303,8 +303,27 @@ #define LINUX_SYS_linux_syncfs 306 #define LINUX_SYS_linux_sendmmsg 307 #define LINUX_SYS_linux_setns 308 -#define LINUX_SYS_linux_process_vm_readv 309 -#define LINUX_SYS_linux_process_vm_writev 310 -#define LINUX_SYS_linux_kcmp 311 -#define LINUX_SYS_linux_finit_module 312 -#define LINUX_SYS_MAXSYSCALL 314 +#define LINUX_SYS_linux_getcpu 309 +#define LINUX_SYS_linux_process_vm_readv 310 +#define LINUX_SYS_linux_process_vm_writev 311 +#define LINUX_SYS_linux_kcmp 312 +#define LINUX_SYS_linux_finit_module 313 +#define LINUX_SYS_linux_sched_setattr 314 +#define LINUX_SYS_linux_sched_getattr 315 +#define LINUX_SYS_linux_renameat2 316 +#define LINUX_SYS_linux_seccomp 317 +#define LINUX_SYS_linux_getrandom 318 +#define LINUX_SYS_linux_memfd_create 319 +#define LINUX_SYS_linux_kexec_file_load 320 +#define LINUX_SYS_linux_bpf 321 +#define LINUX_SYS_linux_execveat 322 +#define LINUX_SYS_linux_userfaultfd 323 +#define LINUX_SYS_linux_membarrier 324 +#define LINUX_SYS_linux_mlock2 325 +#define LINUX_SYS_linux_copy_file_range 326 +#define LINUX_SYS_linux_preadv2 327 +#define LINUX_SYS_linux_pwritev2 328 +#define LINUX_SYS_linux_pkey_mprotect 329 +#define LINUX_SYS_linux_pkey_alloc 330 +#define LINUX_SYS_linux_pkey_free 331 +#define LINUX_SYS_MAXSYSCALL 333 Modified: head/sys/amd64/linux/linux_syscalls.c ============================================================================== --- head/sys/amd64/linux/linux_syscalls.c Sun Feb 5 14:17:09 2017 (r313284) +++ head/sys/amd64/linux/linux_syscalls.c Sun Feb 5 14:19:19 2017 (r313285) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux/syscalls.master 302515 2016-07-10 08:15:50Z dchagin + * created from FreeBSD: head/sys/amd64/linux/syscalls.master 313284 2017-02-05 14:17:09Z dchagin */ const char *linux_syscallnames[] = { @@ -217,7 +217,7 @@ const char *linux_syscallnames[] = { "#206", /* 206 = linux_io_setup */ "#207", /* 207 = linux_io_destroy */ "#208", /* 208 = linux_io_getevents */ - "#209", /* 209 = inux_io_submit */ + "#209", /* 209 = linux_io_submit */ "#210", /* 210 = linux_io_cancel */ "#211", /* 211 = linux_get_thread_area */ "linux_lookup_dcookie", /* 212 = linux_lookup_dcookie */ @@ -291,7 +291,7 @@ const char *linux_syscallnames[] = { "linux_utimensat", /* 280 = linux_utimensat */ "linux_epoll_pwait", /* 281 = linux_epoll_pwait */ "linux_signalfd", /* 282 = linux_signalfd */ - "linux_timerfd", /* 283 = linux_timerfd */ + "linux_timerfd_create", /* 283 = linux_timerfd_create */ "linux_eventfd", /* 284 = linux_eventfd */ "linux_fallocate", /* 285 = linux_fallocate */ "linux_timerfd_settime", /* 286 = linux_timerfd_settime */ @@ -305,7 +305,7 @@ const char *linux_syscallnames[] = { "linux_inotify_init1", /* 294 = linux_inotify_init1 */ "linux_preadv", /* 295 = linux_preadv */ "linux_pwritev", /* 296 = linux_pwritev */ - "linux_rt_tsigqueueinfo", /* 297 = linux_rt_tsigqueueinfo */ + "linux_rt_tgsigqueueinfo", /* 297 = linux_rt_tgsigqueueinfo */ "linux_perf_event_open", /* 298 = linux_perf_event_open */ "linux_recvmmsg", /* 299 = linux_recvmmsg */ "linux_fanotify_init", /* 300 = linux_fanotify_init */ @@ -317,9 +317,28 @@ const char *linux_syscallnames[] = { "linux_syncfs", /* 306 = linux_syncfs */ "linux_sendmmsg", /* 307 = linux_sendmmsg */ "linux_setns", /* 308 = linux_setns */ - "linux_process_vm_readv", /* 309 = linux_process_vm_readv */ - "linux_process_vm_writev", /* 310 = linux_process_vm_writev */ - "linux_kcmp", /* 311 = linux_kcmp */ - "linux_finit_module", /* 312 = linux_finit_module */ - "#313", /* 313 = nosys */ + "linux_getcpu", /* 309 = linux_getcpu */ + "linux_process_vm_readv", /* 310 = linux_process_vm_readv */ + "linux_process_vm_writev", /* 311 = linux_process_vm_writev */ + "linux_kcmp", /* 312 = linux_kcmp */ + "linux_finit_module", /* 313 = linux_finit_module */ + "linux_sched_setattr", /* 314 = linux_sched_setattr */ + "linux_sched_getattr", /* 315 = linux_sched_getattr */ + "linux_renameat2", /* 316 = linux_renameat2 */ + "linux_seccomp", /* 317 = linux_seccomp */ + "linux_getrandom", /* 318 = linux_getrandom */ + "linux_memfd_create", /* 319 = linux_memfd_create */ + "linux_kexec_file_load", /* 320 = linux_kexec_file_load */ + "linux_bpf", /* 321 = linux_bpf */ + "linux_execveat", /* 322 = linux_execveat */ + "linux_userfaultfd", /* 323 = linux_userfaultfd */ + "linux_membarrier", /* 324 = linux_membarrier */ + "linux_mlock2", /* 325 = linux_mlock2 */ + "linux_copy_file_range", /* 326 = linux_copy_file_range */ + "linux_preadv2", /* 327 = linux_preadv2 */ + "linux_pwritev2", /* 328 = linux_pwritev2 */ + "linux_pkey_mprotect", /* 329 = linux_pkey_mprotect */ + "linux_pkey_alloc", /* 330 = linux_pkey_alloc */ + "linux_pkey_free", /* 331 = linux_pkey_free */ + "#332", /* 332 = nosys */ }; Modified: head/sys/amd64/linux/linux_sysent.c ============================================================================== --- head/sys/amd64/linux/linux_sysent.c Sun Feb 5 14:17:09 2017 (r313284) +++ head/sys/amd64/linux/linux_sysent.c Sun Feb 5 14:19:19 2017 (r313285) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux/syscalls.master 302515 2016-07-10 08:15:50Z dchagin + * created from FreeBSD: head/sys/amd64/linux/syscalls.master 313284 2017-02-05 14:17:09Z dchagin */ #include @@ -227,7 +227,7 @@ struct sysent linux_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 206 = linux_io_setup */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 207 = linux_io_destroy */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 208 = linux_io_getevents */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 209 = inux_io_submit */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 209 = linux_io_submit */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 210 = linux_io_cancel */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 211 = linux_get_thread_area */ { 0, (sy_call_t *)linux_lookup_dcookie, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 212 = linux_lookup_dcookie */ @@ -301,7 +301,7 @@ struct sysent linux_sysent[] = { { AS(linux_utimensat_args), (sy_call_t *)linux_utimensat, AUE_FUTIMESAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 280 = linux_utimensat */ { AS(linux_epoll_pwait_args), (sy_call_t *)linux_epoll_pwait, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 281 = linux_epoll_pwait */ { 0, (sy_call_t *)linux_signalfd, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 282 = linux_signalfd */ - { 0, (sy_call_t *)linux_timerfd, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 283 = linux_timerfd */ + { 0, (sy_call_t *)linux_timerfd_create, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 283 = linux_timerfd_create */ { AS(linux_eventfd_args), (sy_call_t *)linux_eventfd, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 284 = linux_eventfd */ { AS(linux_fallocate_args), (sy_call_t *)linux_fallocate, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 285 = linux_fallocate */ { 0, (sy_call_t *)linux_timerfd_settime, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 286 = linux_timerfd_settime */ @@ -312,10 +312,10 @@ struct sysent linux_sysent[] = { { AS(linux_epoll_create1_args), (sy_call_t *)linux_epoll_create1, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 291 = linux_epoll_create1 */ { AS(linux_dup3_args), (sy_call_t *)linux_dup3, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 292 = linux_dup3 */ { AS(linux_pipe2_args), (sy_call_t *)linux_pipe2, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 293 = linux_pipe2 */ - { 0, (sy_call_t *)linux_inotify_init1, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 294 = linux_inotify_init1 */ - { 0, (sy_call_t *)linux_preadv, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 295 = linux_preadv */ - { 0, (sy_call_t *)linux_pwritev, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 296 = linux_pwritev */ - { 0, (sy_call_t *)linux_rt_tsigqueueinfo, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 297 = linux_rt_tsigqueueinfo */ + { AS(linux_inotify_init1_args), (sy_call_t *)linux_inotify_init1, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 294 = linux_inotify_init1 */ + { AS(linux_preadv_args), (sy_call_t *)linux_preadv, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 295 = linux_preadv */ + { AS(linux_pwritev_args), (sy_call_t *)linux_pwritev, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 296 = linux_pwritev */ + { AS(linux_rt_tgsigqueueinfo_args), (sy_call_t *)linux_rt_tgsigqueueinfo, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 297 = linux_rt_tgsigqueueinfo */ { 0, (sy_call_t *)linux_perf_event_open, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 298 = linux_perf_event_open */ { AS(linux_recvmmsg_args), (sy_call_t *)linux_recvmmsg, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 299 = linux_recvmmsg */ { 0, (sy_call_t *)linux_fanotify_init, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 300 = linux_fanotify_init */ @@ -326,10 +326,29 @@ struct sysent linux_sysent[] = { { 0, (sy_call_t *)linux_clock_adjtime, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 305 = linux_clock_adjtime */ { AS(linux_syncfs_args), (sy_call_t *)linux_syncfs, AUE_SYNC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 306 = linux_syncfs */ { AS(linux_sendmmsg_args), (sy_call_t *)linux_sendmmsg, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 307 = linux_sendmmsg */ - { 0, (sy_call_t *)linux_setns, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 308 = linux_setns */ - { 0, (sy_call_t *)linux_process_vm_readv, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 309 = linux_process_vm_readv */ - { 0, (sy_call_t *)linux_process_vm_writev, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 310 = linux_process_vm_writev */ - { 0, (sy_call_t *)linux_kcmp, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 311 = linux_kcmp */ - { 0, (sy_call_t *)linux_finit_module, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 312 = linux_finit_module */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 313 = nosys */ + { AS(linux_setns_args), (sy_call_t *)linux_setns, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 308 = linux_setns */ + { AS(linux_getcpu_args), (sy_call_t *)linux_getcpu, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 309 = linux_getcpu */ + { AS(linux_process_vm_readv_args), (sy_call_t *)linux_process_vm_readv, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 310 = linux_process_vm_readv */ + { AS(linux_process_vm_writev_args), (sy_call_t *)linux_process_vm_writev, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 311 = linux_process_vm_writev */ + { AS(linux_kcmp_args), (sy_call_t *)linux_kcmp, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 312 = linux_kcmp */ + { AS(linux_finit_module_args), (sy_call_t *)linux_finit_module, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 313 = linux_finit_module */ + { AS(linux_sched_setattr_args), (sy_call_t *)linux_sched_setattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 314 = linux_sched_setattr */ + { AS(linux_sched_getattr_args), (sy_call_t *)linux_sched_getattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 315 = linux_sched_getattr */ + { AS(linux_renameat2_args), (sy_call_t *)linux_renameat2, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 316 = linux_renameat2 */ + { AS(linux_seccomp_args), (sy_call_t *)linux_seccomp, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 317 = linux_seccomp */ + { AS(linux_getrandom_args), (sy_call_t *)linux_getrandom, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 318 = linux_getrandom */ + { AS(linux_memfd_create_args), (sy_call_t *)linux_memfd_create, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 319 = linux_memfd_create */ + { AS(linux_kexec_file_load_args), (sy_call_t *)linux_kexec_file_load, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 320 = linux_kexec_file_load */ + { AS(linux_bpf_args), (sy_call_t *)linux_bpf, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 321 = linux_bpf */ + { AS(linux_execveat_args), (sy_call_t *)linux_execveat, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 322 = linux_execveat */ + { AS(linux_userfaultfd_args), (sy_call_t *)linux_userfaultfd, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 323 = linux_userfaultfd */ + { AS(linux_membarrier_args), (sy_call_t *)linux_membarrier, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 324 = linux_membarrier */ + { AS(linux_mlock2_args), (sy_call_t *)linux_mlock2, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 325 = linux_mlock2 */ + { AS(linux_copy_file_range_args), (sy_call_t *)linux_copy_file_range, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 326 = linux_copy_file_range */ + { AS(linux_preadv2_args), (sy_call_t *)linux_preadv2, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 327 = linux_preadv2 */ + { AS(linux_pwritev2_args), (sy_call_t *)linux_pwritev2, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 328 = linux_pwritev2 */ + { AS(linux_pkey_mprotect_args), (sy_call_t *)linux_pkey_mprotect, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 329 = linux_pkey_mprotect */ + { AS(linux_pkey_alloc_args), (sy_call_t *)linux_pkey_alloc, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 330 = linux_pkey_alloc */ + { AS(linux_pkey_free_args), (sy_call_t *)linux_pkey_free, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 331 = linux_pkey_free */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 332 = nosys */ }; Modified: head/sys/amd64/linux/linux_systrace_args.c ============================================================================== --- head/sys/amd64/linux/linux_systrace_args.c Sun Feb 5 14:17:09 2017 (r313284) +++ head/sys/amd64/linux/linux_systrace_args.c Sun Feb 5 14:19:19 2017 (r313285) @@ -2076,7 +2076,7 @@ systrace_args(int sysnum, void *params, *n_args = 0; break; } - /* linux_timerfd */ + /* linux_timerfd_create */ case 283: { *n_args = 0; break; @@ -2157,22 +2157,41 @@ systrace_args(int sysnum, void *params, } /* linux_inotify_init1 */ case 294: { - *n_args = 0; + struct linux_inotify_init1_args *p = params; + iarg[0] = p->flags; /* l_int */ + *n_args = 1; break; } /* linux_preadv */ case 295: { - *n_args = 0; + struct linux_preadv_args *p = params; + iarg[0] = p->fd; /* l_ulong */ + uarg[1] = (intptr_t) p->vec; /* struct iovec * */ + iarg[2] = p->vlen; /* l_ulong */ + iarg[3] = p->pos_l; /* l_ulong */ + iarg[4] = p->pos_h; /* l_ulong */ + *n_args = 5; break; } /* linux_pwritev */ case 296: { - *n_args = 0; + struct linux_pwritev_args *p = params; + iarg[0] = p->fd; /* l_ulong */ + uarg[1] = (intptr_t) p->vec; /* struct iovec * */ + iarg[2] = p->vlen; /* l_ulong */ + iarg[3] = p->pos_l; /* l_ulong */ + iarg[4] = p->pos_h; /* l_ulong */ + *n_args = 5; break; } - /* linux_rt_tsigqueueinfo */ + /* linux_rt_tgsigqueueinfo */ case 297: { - *n_args = 0; + struct linux_rt_tgsigqueueinfo_args *p = params; + iarg[0] = p->tgid; /* l_pid_t */ + iarg[1] = p->tid; /* l_pid_t */ + iarg[2] = p->sig; /* l_int */ + uarg[3] = (intptr_t) p->uinfo; /* l_siginfo_t * */ + *n_args = 4; break; } /* linux_perf_event_open */ @@ -2245,27 +2264,235 @@ systrace_args(int sysnum, void *params, } /* linux_setns */ case 308: { - *n_args = 0; + struct linux_setns_args *p = params; + iarg[0] = p->fd; /* l_int */ + iarg[1] = p->nstype; /* l_int */ + *n_args = 2; break; } - /* linux_process_vm_readv */ + /* linux_getcpu */ case 309: { - *n_args = 0; + struct linux_getcpu_args *p = params; + uarg[0] = (intptr_t) p->cpu; /* l_uint * */ + uarg[1] = (intptr_t) p->node; /* l_uint * */ + uarg[2] = (intptr_t) p->cache; /* void * */ + *n_args = 3; break; } - /* linux_process_vm_writev */ + /* linux_process_vm_readv */ case 310: { - *n_args = 0; + struct linux_process_vm_readv_args *p = params; + iarg[0] = p->pid; /* l_pid_t */ + uarg[1] = (intptr_t) p->lvec; /* const struct iovec * */ + iarg[2] = p->liovcnt; /* l_ulong */ + uarg[3] = (intptr_t) p->rvec; /* const struct iovec * */ + iarg[4] = p->riovcnt; /* l_ulong */ + iarg[5] = p->flags; /* l_ulong */ + *n_args = 6; break; } - /* linux_kcmp */ + /* linux_process_vm_writev */ case 311: { - *n_args = 0; + struct linux_process_vm_writev_args *p = params; + iarg[0] = p->pid; /* l_pid_t */ + uarg[1] = (intptr_t) p->lvec; /* const struct iovec * */ + iarg[2] = p->liovcnt; /* l_ulong */ + uarg[3] = (intptr_t) p->rvec; /* const struct iovec * */ + iarg[4] = p->riovcnt; /* l_ulong */ + iarg[5] = p->flags; /* l_ulong */ + *n_args = 6; break; } - /* linux_finit_module */ + /* linux_kcmp */ case 312: { - *n_args = 0; + struct linux_kcmp_args *p = params; + iarg[0] = p->pid1; /* l_pid_t */ + iarg[1] = p->pid2; /* l_pid_t */ + iarg[2] = p->type; /* l_int */ + iarg[3] = p->idx1; /* l_ulong */ + iarg[4] = p->idx; /* l_ulong */ + *n_args = 5; + break; + } + /* linux_finit_module */ + case 313: { + struct linux_finit_module_args *p = params; + iarg[0] = p->fd; /* l_int */ + uarg[1] = (intptr_t) p->uargs; /* const char * */ + iarg[2] = p->flags; /* l_int */ + *n_args = 3; + break; + } + /* linux_sched_setattr */ + case 314: { + struct linux_sched_setattr_args *p = params; + iarg[0] = p->pid; /* l_pid_t */ + uarg[1] = (intptr_t) p->attr; /* void * */ + iarg[2] = p->flags; /* l_uint */ + *n_args = 3; + break; + } + /* linux_sched_getattr */ + case 315: { + struct linux_sched_getattr_args *p = params; + iarg[0] = p->pid; /* l_pid_t */ + uarg[1] = (intptr_t) p->attr; /* void * */ + iarg[2] = p->size; /* l_uint */ + iarg[3] = p->flags; /* l_uint */ + *n_args = 4; + break; + } + /* linux_renameat2 */ + case 316: { + struct linux_renameat2_args *p = params; + iarg[0] = p->oldfd; /* l_int */ + uarg[1] = (intptr_t) p->oldname; /* const char * */ + iarg[2] = p->newfd; /* l_int */ + uarg[3] = (intptr_t) p->newname; /* const char * */ + uarg[4] = p->flags; /* unsigned int */ + *n_args = 5; + break; + } + /* linux_seccomp */ + case 317: { + struct linux_seccomp_args *p = params; + iarg[0] = p->op; /* l_uint */ + iarg[1] = p->flags; /* l_uint */ + uarg[2] = (intptr_t) p->uargs; /* const char * */ + *n_args = 3; + break; + } + /* linux_getrandom */ + case 318: { + struct linux_getrandom_args *p = params; + uarg[0] = (intptr_t) p->buf; /* char * */ + iarg[1] = p->count; /* l_size_t */ + iarg[2] = p->flags; /* l_uint */ + *n_args = 3; + break; + } + /* linux_memfd_create */ + case 319: { + struct linux_memfd_create_args *p = params; + uarg[0] = (intptr_t) p->uname_ptr; /* const char * */ + iarg[1] = p->flags; /* l_uint */ + *n_args = 2; + break; + } + /* linux_kexec_file_load */ + case 320: { + struct linux_kexec_file_load_args *p = params; + iarg[0] = p->kernel_fd; /* l_int */ + iarg[1] = p->initrd_fd; /* l_int */ + iarg[2] = p->cmdline_len; /* l_ulong */ + uarg[3] = (intptr_t) p->cmdline_ptr; /* const char * */ + iarg[4] = p->flags; /* l_ulong */ + *n_args = 5; + break; + } + /* linux_bpf */ + case 321: { + struct linux_bpf_args *p = params; + iarg[0] = p->cmd; /* l_int */ + uarg[1] = (intptr_t) p->attr; /* void * */ + iarg[2] = p->size; /* l_uint */ + *n_args = 3; + break; + } + /* linux_execveat */ + case 322: { + struct linux_execveat_args *p = params; + iarg[0] = p->dfd; /* l_int */ + uarg[1] = (intptr_t) p->filename; /* const char * */ + uarg[2] = (intptr_t) p->argv; /* const char ** */ + uarg[3] = (intptr_t) p->envp; /* const char ** */ + iarg[4] = p->flags; /* l_int */ + *n_args = 5; + break; + } + /* linux_userfaultfd */ + case 323: { + struct linux_userfaultfd_args *p = params; + iarg[0] = p->flags; /* l_int */ + *n_args = 1; + break; + } + /* linux_membarrier */ + case 324: { + struct linux_membarrier_args *p = params; + iarg[0] = p->cmd; /* l_int */ + iarg[1] = p->flags; /* l_int */ + *n_args = 2; + break; + } + /* linux_mlock2 */ + case 325: { + struct linux_mlock2_args *p = params; + iarg[0] = p->start; /* l_ulong */ + iarg[1] = p->len; /* l_size_t */ + iarg[2] = p->flags; /* l_int */ + *n_args = 3; + break; + } + /* linux_copy_file_range */ + case 326: { + struct linux_copy_file_range_args *p = params; + iarg[0] = p->fd_in; /* l_int */ + uarg[1] = (intptr_t) p->off_in; /* l_loff_t * */ + iarg[2] = p->fd_out; /* l_int */ + uarg[3] = (intptr_t) p->off_out; /* l_loff_t * */ + iarg[4] = p->len; /* l_size_t */ + iarg[5] = p->flags; /* l_uint */ + *n_args = 6; + break; + } + /* linux_preadv2 */ + case 327: { + struct linux_preadv2_args *p = params; + iarg[0] = p->fd; /* l_ulong */ + uarg[1] = (intptr_t) p->vec; /* const struct iovec * */ + iarg[2] = p->vlen; /* l_ulong */ + iarg[3] = p->pos_l; /* l_ulong */ + iarg[4] = p->pos_h; /* l_ulong */ + iarg[5] = p->flags; /* l_int */ + *n_args = 6; + break; + } + /* linux_pwritev2 */ + case 328: { + struct linux_pwritev2_args *p = params; + iarg[0] = p->fd; /* l_ulong */ + uarg[1] = (intptr_t) p->vec; /* const struct iovec * */ + iarg[2] = p->vlen; /* l_ulong */ + iarg[3] = p->pos_l; /* l_ulong */ + iarg[4] = p->pos_h; /* l_ulong */ + iarg[5] = p->flags; /* l_int */ + *n_args = 6; + break; + } + /* linux_pkey_mprotect */ + case 329: { + struct linux_pkey_mprotect_args *p = params; + iarg[0] = p->start; /* l_ulong */ + iarg[1] = p->len; /* l_size_t */ + iarg[2] = p->prot; /* l_ulong */ + iarg[3] = p->pkey; /* l_int */ + *n_args = 4; + break; + } + /* linux_pkey_alloc */ + case 330: { + struct linux_pkey_alloc_args *p = params; + iarg[0] = p->flags; /* l_ulong */ + iarg[1] = p->init_val; /* l_ulong */ + *n_args = 2; + break; + } + /* linux_pkey_free */ + case 331: { + struct linux_pkey_free_args *p = params; + iarg[0] = p->pkey; /* l_int */ + *n_args = 1; break; } default: @@ -5415,7 +5642,7 @@ systrace_entry_setargdesc(int sysnum, in /* linux_signalfd */ case 282: break; - /* linux_timerfd */ + /* linux_timerfd_create */ case 283: break; /* linux_eventfd */ @@ -5529,15 +5756,76 @@ systrace_entry_setargdesc(int sysnum, in break; /* linux_inotify_init1 */ case 294: + switch(ndx) { + case 0: + p = "l_int"; + break; + default: + break; + }; break; /* linux_preadv */ case 295: + switch(ndx) { + case 0: + p = "l_ulong"; + break; + case 1: + p = "userland struct iovec *"; + break; + case 2: + p = "l_ulong"; + break; + case 3: + p = "l_ulong"; + break; + case 4: + p = "l_ulong"; + break; + default: + break; + }; break; /* linux_pwritev */ case 296: + switch(ndx) { + case 0: + p = "l_ulong"; + break; + case 1: + p = "userland struct iovec *"; + break; + case 2: + p = "l_ulong"; + break; + case 3: + p = "l_ulong"; + break; + case 4: + p = "l_ulong"; + break; + default: + break; + }; break; - /* linux_rt_tsigqueueinfo */ + /* linux_rt_tgsigqueueinfo */ case 297: + switch(ndx) { + case 0: + p = "l_pid_t"; + break; + case 1: + p = "l_pid_t"; + break; + case 2: + p = "l_int"; + break; + case 3: + p = "userland l_siginfo_t *"; + break; + default: + break; + }; break; /* linux_perf_event_open */ case 298: @@ -5629,23 +5917,443 @@ systrace_entry_setargdesc(int sysnum, in break; /* linux_setns */ case 308: + switch(ndx) { + case 0: + p = "l_int"; + break; + case 1: + p = "l_int"; + break; + default: + break; + }; break; - /* linux_process_vm_readv */ + /* linux_getcpu */ case 309: + switch(ndx) { + case 0: + p = "userland l_uint *"; + break; + case 1: + p = "userland l_uint *"; + break; + case 2: + p = "userland void *"; + break; + default: + break; + }; break; - /* linux_process_vm_writev */ + /* linux_process_vm_readv */ case 310: + switch(ndx) { + case 0: + p = "l_pid_t"; + break; + case 1: + p = "userland const struct iovec *"; + break; + case 2: + p = "l_ulong"; + break; + case 3: + p = "userland const struct iovec *"; + break; + case 4: + p = "l_ulong"; + break; + case 5: + p = "l_ulong"; + break; + default: + break; + }; break; - /* linux_kcmp */ + /* linux_process_vm_writev */ case 311: + switch(ndx) { + case 0: + p = "l_pid_t"; + break; + case 1: + p = "userland const struct iovec *"; + break; + case 2: + p = "l_ulong"; + break; + case 3: + p = "userland const struct iovec *"; + break; + case 4: + p = "l_ulong"; + break; + case 5: + p = "l_ulong"; + break; + default: + break; + }; break; - /* linux_finit_module */ + /* linux_kcmp */ case 312: + switch(ndx) { + case 0: + p = "l_pid_t"; + break; + case 1: + p = "l_pid_t"; + break; + case 2: + p = "l_int"; + break; + case 3: + p = "l_ulong"; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Sun Feb 5 15:17: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 800F2CD17CF; Sun, 5 Feb 2017 15:17:47 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 60DD41366; Sun, 5 Feb 2017 15:17:47 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id B26E01DC1; Sun, 5 Feb 2017 15:17:46 +0000 (UTC) Date: Sun, 5 Feb 2017 15:17:46 +0000 From: Alexey Dokuchaev To: Mateusz Guzik Cc: Steven Hartland , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mateusz Guzik Subject: Re: svn commit: r313260 - head/sys/kern Message-ID: <20170205151746.GA6841@FreeBSD.org> References: <201702050140.v151eRXX090326@repo.freebsd.org> <42c790bb-df12-2a50-6181-24bac5c72d34@multiplay.co.uk> <20170205030006.GB4375@dft-labs.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170205030006.GB4375@dft-labs.eu> User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-src-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, 05 Feb 2017 15:17:47 -0000 On Sun, Feb 05, 2017 at 04:00:06AM +0100, Mateusz Guzik wrote: > For instance, plugging an unused variable, a memory leak, doing a > lockless check first etc. are all pretty standard and unless there is > something unusual going on (e.g. complicated circumstances leading to a > leak) there is not much to explain. In particular, I don't see why > anyone would explain why leaks are bad on each commit plugging one. Right; these (unused variable, resource leaks) usually do not warrant elaborate explanation. [ Some linefeeds below were trimmed for brevity ] > The gist is as follows: there are plenty of cases where the kernel wants > to atomically replace the value of a particular variable. Sometimes, > like in this commit, we want to bump the counter by 1, but only if the > current value is not 0. For that we need to read the value, see if it is > 0 and if not, try to replace what we read with what we read + 1. We > cannot just increment as the value could have changed to 0 in the > meantime. > But this also means that multiple cpus doing the same operation on the > same variable will trip on each other - one will succeed while the rest > will have to retry. > Prior to this commit, each retry attempt would explicitly re-read the > value. This induces cache coherency traffic slowing everyone down. > amd64 has the nice property of giving us the value it found eleminating > the need to explicitly re-read it. There is similar story on i386 and > sparc. > Other architectures may also benefit from this, but that I did not > benchmark. > > In short[,] under contention atomic_fcmpset is going to be faster than > atomic_cmpset. > I did not benchmark this particular change, but a switch of the sort > easily gives 10%+ in microbenchmarks on amd64. > That said, while one can argue this optimizes the code, it really > depessimizes it as something of the sort should have been already > employed. Given the above, IMHO it's quite far from an obvious or of manpage-lookup thing, and thus requires proper explanation in the commit log. > > While on this subject are there any official guidelines to writing > > commit messages, if no should we create some? > > I'm unaware of any. We might not have official guidelines, but 30%-what/70%-why rule would apply perfectly here. ;-) ./danfe From owner-svn-src-head@freebsd.org Sun Feb 5 15: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 AD78DCD1DDA; Sun, 5 Feb 2017 15:45:32 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61DEB19A; Sun, 5 Feb 2017 15:45:32 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v15FjVMZ043052; Sun, 5 Feb 2017 15:45:31 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v15FjVvr043049; Sun, 5 Feb 2017 15:45:31 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201702051545.v15FjVvr043049@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 5 Feb 2017 15:45:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313287 - head/sys/dev/usb/serial X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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, 05 Feb 2017 15:45:32 -0000 Author: ian Date: Sun Feb 5 15:45:31 2017 New Revision: 313287 URL: https://svnweb.freebsd.org/changeset/base/313287 Log: Add tsw_busy support to usb_serial (ucom). The tty layer uses tsw_busy to poll for busy/idle status of the transmitter hardware during close() and tcdrain(). The ucom layer defines ULSR_TXRDY and ULSR_TSRE bits for the line status register; when both are set, the transmitter is idle. Not all chip drivers maintain those bits in the sc_lsr field, and if the bits never get set the transmitter will always appear busy, causing hangs in tcdrain(). These changes add a new sc_flag bit, UCOM_FLAG_LSRTXIDLE. When this flag is set, ucom_busy() uses the lsr bits to return busy vs. idle state, otherwise it always returns idle (which is effectively what happened before this change because tsw_busy wasn't implemented). For the uftdi chip driver, these changes stop masking out the tx idle bits when processing the status register (because now they're useful), and it calls ucom_use_lsr_txbits() to indicate the bits are maintained by the driver and can be used by ucom_busy(). Differential Revision: https://reviews.freebsd.org/D9183 Modified: head/sys/dev/usb/serial/uftdi.c head/sys/dev/usb/serial/usb_serial.c head/sys/dev/usb/serial/usb_serial.h Modified: head/sys/dev/usb/serial/uftdi.c ============================================================================== --- head/sys/dev/usb/serial/uftdi.c Sun Feb 5 14:25:31 2017 (r313286) +++ head/sys/dev/usb/serial/uftdi.c Sun Feb 5 15:45:31 2017 (r313287) @@ -1123,6 +1123,9 @@ uftdi_attach(device_t dev) FTDI_SIO_SET_DATA_PARITY_NONE | FTDI_SIO_SET_DATA_BITS(8)); + /* Indicate tx bits in sc_lsr can be used to determine busy vs idle. */ + ucom_use_lsr_txbits(&sc->sc_ucom); + error = ucom_attach(&sc->sc_super_ucom, &sc->sc_ucom, 1, sc, &uftdi_callback, &sc->sc_mtx); if (error) { @@ -1279,16 +1282,20 @@ uftdi_read_callback(struct usb_xfer *xfe offset = 0; /* * Extract packet headers and payload bytes from the buffer. - * Feed payload bytes to ucom/tty layer; OR-accumulate header - * status bits which are transient and could toggle with each - * packet. After processing all packets in the buffer, process - * the accumulated transient MSR and LSR values along with the + * Feed payload bytes to ucom/tty layer; OR-accumulate the + * receiver-related header status bits which are transient and + * could toggle with each packet, but for transmitter-related + * bits keep only the ones from the last packet. + * + * After processing all packets in the buffer, process the + * accumulated transient MSR and LSR values along with the * non-transient bits from the last packet header. */ while (buflen >= UFTDI_IHDRSIZE) { usbd_copy_out(pc, offset, buf, UFTDI_IHDRSIZE); offset += UFTDI_IHDRSIZE; buflen -= UFTDI_IHDRSIZE; + lsr &= ~(ULSR_TXRDY | ULSR_TSRE); lsr |= FTDI_GET_LSR(buf); if (FTDI_GET_MSR(buf) & FTDI_SIO_RI_MASK) msr |= SER_RI; @@ -1311,8 +1318,7 @@ uftdi_read_callback(struct usb_xfer *xfe if (ftdi_msr & FTDI_SIO_RLSD_MASK) msr |= SER_DCD; - if ((sc->sc_msr != msr) || - ((sc->sc_lsr & FTDI_LSR_MASK) != (lsr & FTDI_LSR_MASK))) { + if (sc->sc_msr != msr || sc->sc_lsr != lsr) { DPRINTF("status change msr=0x%02x (0x%02x) " "lsr=0x%02x (0x%02x)\n", msr, sc->sc_msr, lsr, sc->sc_lsr); Modified: head/sys/dev/usb/serial/usb_serial.c ============================================================================== --- head/sys/dev/usb/serial/usb_serial.c Sun Feb 5 14:25:31 2017 (r313286) +++ head/sys/dev/usb/serial/usb_serial.c Sun Feb 5 15:45:31 2017 (r313287) @@ -161,6 +161,7 @@ static tsw_param_t ucom_param; static tsw_outwakeup_t ucom_outwakeup; static tsw_inwakeup_t ucom_inwakeup; static tsw_free_t ucom_free; +static tsw_busy_t ucom_busy; static struct ttydevsw ucom_class = { .tsw_flags = TF_INITLOCK | TF_CALLOUT, @@ -172,6 +173,7 @@ static struct ttydevsw ucom_class = { .tsw_param = ucom_param, .tsw_modem = ucom_modem, .tsw_free = ucom_free, + .tsw_busy = ucom_busy, }; MODULE_DEPEND(ucom, usb, 1, 1, 1); @@ -1294,6 +1296,27 @@ ucom_outwakeup(struct tty *tp) ucom_start_transfers(sc); } +static bool +ucom_busy(struct tty *tp) +{ + struct ucom_softc *sc = tty_softc(tp); + const uint8_t txidle = ULSR_TXRDY | ULSR_TSRE; + + UCOM_MTX_ASSERT(sc, MA_OWNED); + + DPRINTFN(3, "sc = %p lsr 0x%02x\n", sc, sc->sc_lsr); + + /* + * If the driver maintains the txidle bits in LSR, we can use them to + * determine whether the transmitter is busy or idle. Otherwise we have + * to assume it is idle to avoid hanging forever on tcdrain(3). + */ + if (sc->sc_flag & UCOM_FLAG_LSRTXIDLE) + return ((sc->sc_lsr & txidle) != txidle); + else + return (false); +} + /*------------------------------------------------------------------------* * ucom_get_data * Modified: head/sys/dev/usb/serial/usb_serial.h ============================================================================== --- head/sys/dev/usb/serial/usb_serial.h Sun Feb 5 14:25:31 2017 (r313286) +++ head/sys/dev/usb/serial/usb_serial.h Sun Feb 5 15:45:31 2017 (r313287) @@ -180,6 +180,7 @@ struct ucom_softc { #define UCOM_FLAG_WAIT_REFS 0x0100 /* set if we must wait for refs */ #define UCOM_FLAG_FREE_UNIT 0x0200 /* set if we must free the unit */ #define UCOM_FLAG_INWAKEUP 0x0400 /* set if we are in the tsw_inwakeup callback */ +#define UCOM_FLAG_LSRTXIDLE 0x0800 /* set if sc_lsr bits ULSR_TSRE+TXRDY work */ uint8_t sc_lsr; uint8_t sc_msr; uint8_t sc_mcr; @@ -218,4 +219,12 @@ void ucom_drain(struct ucom_super_softc void ucom_drain_all(void *); void ucom_ref(struct ucom_super_softc *); int ucom_unref(struct ucom_super_softc *); + +static inline void +ucom_use_lsr_txbits(struct ucom_softc *sc) +{ + + sc->sc_flag |= UCOM_FLAG_LSRTXIDLE; +} + #endif /* _USB_SERIAL_H_ */ From owner-svn-src-head@freebsd.org Sun Feb 5 16:09: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 CF0A0CD26C7 for ; Sun, 5 Feb 2017 16:09:04 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) 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 762E41508 for ; Sun, 5 Feb 2017 16:09:04 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: by mail-wm0-x236.google.com with SMTP id r141so89032244wmg.1 for ; Sun, 05 Feb 2017 08:09:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to; bh=Frg5uuv7u8B21upAZiJlZdYMYmy4SVZL0cXYdEL4Cq0=; b=zjcBUbSvw63aDFVhHCk8BzlyHNOjbqYDbtSpuZ2GpZnUEmWXLrOy4/6n99/PlV+nAY Hj4A6IKEgfMT60GFYXYdqHVJBQn1RqIsRemaPIA3JTAhDYzBluY3mwY40AIP0EHY2LPm VbPmAR6dvhV37/eYNpjRSn42PJsmfO7qgq66NyyB0i3pxGRAnf0j2N/L4mLKRes6LBBP fz6riWKMe5Y2fk4YM6o+4G0Uc4Y/v9rGDPy91yQowUAaXtDCTKeTisWs731/Qzaz8EXm DtfY9oQYoQsgqQMQ8M8yiUfVjRCK/rcBqnP5D9zEzX9XJm3s+Zcizcj4mNp6OhQHspQE fpfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to; bh=Frg5uuv7u8B21upAZiJlZdYMYmy4SVZL0cXYdEL4Cq0=; b=VbTArc4pQ3aGupMYOe7fFME3WgTx0tfFdhs3ycASGZ+OLOsvwqsnIcgUFi7zpN8dhi OeGfeiRdTcj5Ln66lkET+/A4nuu/B9+3aEHGDn3IeHBzcqiTu7rSFDvXbTmX4vcYIgZk 6JMY2kxyApza3YgU5lRss+bnWyIwYj+KkRC04qWrcq5FlOW1aNv39VuX+5KKMYNOJx86 fLO8NSOR2rZMI1xAkobGBPhGGepiNNbH2U99gLrQE+mdRw0Tw6wIq9iAeOg7CN/ueVLp 4vqg9mxFpzZn+zcpSbGz+/ObF0oLTqd85NsiPD0P+nLTBosCEEFloNUhx/m+4MhNzqZi g0Tg== X-Gm-Message-State: AMke39lJFYbGHYSz8SNq3/Tbqyvf506Fv+u5ZTMZ2uFgnk/SxAOi/ePWYWUFvvUhfsmeClCq X-Received: by 10.28.57.131 with SMTP id g125mr5069528wma.33.1486310942030; Sun, 05 Feb 2017 08:09:02 -0800 (PST) Received: from [10.10.1.58] ([185.97.61.26]) by smtp.gmail.com with ESMTPSA id 202sm8081826wmp.20.2017.02.05.08.09.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 05 Feb 2017 08:09:01 -0800 (PST) Subject: Re: svn commit: r313260 - head/sys/kern To: Alexey Dokuchaev , Mateusz Guzik References: <201702050140.v151eRXX090326@repo.freebsd.org> <42c790bb-df12-2a50-6181-24bac5c72d34@multiplay.co.uk> <20170205030006.GB4375@dft-labs.eu> <20170205151746.GA6841@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mateusz Guzik From: Steven Hartland Message-ID: <853ff396-92ce-2539-6986-c6d3fb4bea97@multiplay.co.uk> Date: Sun, 5 Feb 2017 16:09:00 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170205151746.GA6841@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-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, 05 Feb 2017 16:09:04 -0000 On 05/02/2017 15:17, Alexey Dokuchaev wrote: > On Sun, Feb 05, 2017 at 04:00:06AM +0100, Mateusz Guzik wrote: >> For instance, plugging an unused variable, a memory leak, doing a >> lockless check first etc. are all pretty standard and unless there is >> something unusual going on (e.g. complicated circumstances leading to a >> leak) there is not much to explain. In particular, I don't see why >> anyone would explain why leaks are bad on each commit plugging one. > Right; these (unused variable, resource leaks) usually do not warrant > elaborate explanation. Indeed these are self explanatory >> The gist is as follows: there are plenty of cases where the kernel wants >> to atomically replace the value of a particular variable. Sometimes, >> like in this commit, we want to bump the counter by 1, but only if the >> current value is not 0. For that we need to read the value, see if it is >> 0 and if not, try to replace what we read with what we read + 1. We >> cannot just increment as the value could have changed to 0 in the >> meantime. >> But this also means that multiple cpus doing the same operation on the >> same variable will trip on each other - one will succeed while the rest >> will have to retry. >> Prior to this commit, each retry attempt would explicitly re-read the >> value. This induces cache coherency traffic slowing everyone down. >> amd64 has the nice property of giving us the value it found eleminating >> the need to explicitly re-read it. There is similar story on i386 and >> sparc. >> Other architectures may also benefit from this, but that I did not >> benchmark. >> >> In short[,] under contention atomic_fcmpset is going to be faster than >> atomic_cmpset. >> I did not benchmark this particular change, but a switch of the sort >> easily gives 10%+ in microbenchmarks on amd64. >> That said, while one can argue this optimizes the code, it really >> depessimizes it as something of the sort should have been already >> employed. > Given the above, IMHO it's quite far from an obvious or of manpage-lookup > thing, and thus requires proper explanation in the commit log. Absolutely, I would encourage everyone to not only think about others making similar changes but also providing education for those who may uses similar code in other areas. If said changes where using older code as an example, without knowing otherwise they may not use the updated methodologies. Sharing the detail you have done above is fantastic, allowing others to take note without having to do the research that the may well not have time for, with the result being improved code quality moving forward; so thanks for that :) > >>> While on this subject are there any official guidelines to writing >>> commit messages, if no should we create some? >> I'm unaware of any. > We might not have official guidelines, but 30%-what/70%-why rule would > apply perfectly here. ;-) > Sounds like a good guide. Regards Steve From owner-svn-src-head@freebsd.org Sun Feb 5 18:58: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 ADEF1CD2706; Sun, 5 Feb 2017 18:58:15 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: from mail-oi0-x242.google.com (mail-oi0-x242.google.com [IPv6:2607:f8b0:4003:c06::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 68FE21C81; Sun, 5 Feb 2017 18:58:15 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: by mail-oi0-x242.google.com with SMTP id u143so5053956oif.3; Sun, 05 Feb 2017 10:58:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=/1eObKWATfOUpgTvXWKEc3/BB+8Y12ZOszjRmSkZdfo=; b=TrEB6dv8I8lt1jGz4ScmO1EIC24I/q++QgPk1SrcqXnpDOy/ORlUH+rbDQbn4nFhcW exzl8RtdZEbYsl9/oJQy0d3fz5gnymYLcVeWWT9VDPFviZXqdwMAH3o3vssOX6WhNfMM sRJOba/Gu1mZ3vY17I8BlGTLY6vJAnToow8d8Cy6KQ4bXLYkHXJ1Mp5Vk80vHBw0eb31 sN7e0x7rqyF7qvz/qtODBD8m9OA2ZAh3t9nUjYJWdES1kAJJrPiswkwQvhtFikgzjcha u28fr0ppKpJgd9pk7lUqK1r8AdBPhl01zHPpeJ82ToCxUpfWVOKa2XJrUQrwuCBv1SAP S7DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=/1eObKWATfOUpgTvXWKEc3/BB+8Y12ZOszjRmSkZdfo=; b=fBAJvm+q/SGpKgTPwgdzoIxLm5B7FJYUC0kZ4rlJHDD0NuBa49rM0rGFowuh3u+Wx+ Y47rwxilgwYDlex1nskwFiKqSr3PCkQEn8dTSSySPp5f6EPV6YdMyQ6EJu6Ma52HAghb juKvh2PoIog+h/Wwnk2LSKiWvewV8Xbi7LJelDR9dzE07Gg06ovx2KohurOHeLpxM3Uy EcG0ao/ARCqPwVvvQuJ8qB7YjZjlMexP7BuBffu/QY6pM4/fyjzaszwO96s5oDsTx/xq BhaFzxmEuywNl2KsJTNqAEQWNI42YZJekY7hNAdnS4HTPyKjppkKwdYy/zu+vZTz6YMj BxqQ== X-Gm-Message-State: AMke39ltxNpZjDzYadYb4tzt65yDf8ognCGTx+eZ1rGLPkVedP+lfW2lgwEqslu+GswoQnmGz5ndvNIYSoeoBw== X-Received: by 10.202.193.65 with SMTP id r62mr3481370oif.90.1486321094479; Sun, 05 Feb 2017 10:58:14 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.51.7 with HTTP; Sun, 5 Feb 2017 10:58:13 -0800 (PST) In-Reply-To: References: <201702010332.v113WnYf041362@repo.freebsd.org> <20170203231238.0675c289@kan> <8523aaa5-6c30-9f9f-40f0-fdf82cdf1669@pix.net> <6bf86e46-9714-c7e9-8d47-845761e2de24@FreeBSD.org> <8a2f7f7d-14c3-8e75-e060-fc41213ce389@FreeBSD.org> From: Jason Harmening Date: Sun, 5 Feb 2017 10:58:13 -0800 Message-ID: Subject: Re: svn commit: r313037 - in head/sys: amd64/include kern mips/include net powerpc/include sparc64/include To: Svatopluk Kraus Cc: Andreas Tobler , Kurt Lidl , Alexander Kabaev , "Jason A. Harmening" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Ed Maste , Justin Hibbits X-Mailman-Approved-At: Sun, 05 Feb 2017 21:46:34 +0000 Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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, 05 Feb 2017 18:58:15 -0000 Hmm, it's a good idea to consider the possibility of a barrier issue. It wouldn't be the first time we've had such a problem on a weakly-ordered architecture. That said, I don't see a problem in this case. smp_rendezvous_cpus() takes a spinlock and then issues atomic_store_rel_int() to ensure the rendezvous params are visible to other cpus. The latter corresponds to lwsync on powerpc, which AFAIK should be sufficient to ensure visibility of prior stores. For now I'm going with the simpler explanation that I made a bad assumption in the powerpc get_pcpu() and there is some context in which the read of sprg0 doesn't return a consistent pointer value. Unfortunately I don't see where that might be right now. On the mips side, Kurt/Alexander can you test the attached patch? It contains a simple fix to ensure get_pcpu() returns the consistent per-cpu pointer. On Sat, Feb 4, 2017 at 1:34 PM, Svatopluk Kraus wrote: > Probably not related. But when I took short look to the patch to see > what could go wrong, I walked into the following comment in > _rm_wlock(): "Assumes rm->rm_writecpus update is visible on other CPUs > before rm_cleanIPI is called." There is no explicit barrier to ensure > it. However, there might be some barriers inside of > smp_rendezvous_cpus(). I have no idea what could happened if this > assumption is not met. Note that rm_cleanIPI() is affected by the > patch. > > > > On Sat, Feb 4, 2017 at 9:39 PM, Jason Harmening > wrote: > > Can you post an example of such panic? Only 2 MI pieces were changed, > > netisr and rmlock. I haven't seen problems on my own amd64/i386/arm > testing > > of this, so a backtrace might help to narrow down the cause. > > > > On Sat, Feb 4, 2017 at 12:22 PM, Andreas Tobler > > wrote: > >> > >> On 04.02.17 20:54, Jason Harmening wrote: > >>> > >>> I suspect this broke rmlocks for mips because the rmlock implementation > >>> takes the address of the per-CPU pc_rm_queue when building tracker > >>> lists. That address may be later accessed from another CPU and will > >>> then translate to the wrong physical region if the address was taken > >>> relative to the globally-constant pcpup VA used on mips. > >>> > >>> Regardless, for mips get_pcpup() should be implemented as > >>> pcpu_find(curcpu) since returning an address that may mean something > >>> different depending on the CPU seems like a big POLA violation if > >>> nothing else. > >>> > >>> I'm more concerned about the report of powerpc breakage. For powerpc > we > >>> simply take each pcpu pointer from the pc_allcpu list (which is the > same > >>> value stored in the cpuid_to_pcpu array) and pass it through the > ap_pcpu > >>> global to each AP's startup code, which then stores it in sprg0. It > >>> should be globally unique and won't have the variable-translation > issues > >>> seen on mips. Andreas, are you certain this change was responsible > the > >>> breakage you saw, and was it the same sort of hang observed on mips? > >> > >> > >> I'm really sure. 313036 booted fine, allowed me to execute heavy > >> compilation jobs, np. 313037 on the other side gave me various patterns > of > >> panics. During startup, but I also succeeded to get into multiuser and > then > >> the panic happend during port building. > >> > >> I have no deeper inside where pcpu data is used. Justin mentioned > netisr? > >> > >> Andreas > >> > > > From owner-svn-src-head@freebsd.org Sun Feb 5 18:59: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 D7E01CD27EB; Sun, 5 Feb 2017 18:59:06 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: from mail-ot0-x243.google.com (mail-ot0-x243.google.com [IPv6:2607:f8b0:4003:c0f::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9253117D; Sun, 5 Feb 2017 18:59:06 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: by mail-ot0-x243.google.com with SMTP id 65so8085641otq.2; Sun, 05 Feb 2017 10:59:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=YOsWwwnUpNul4B1X0J/EorgqK2kCN9Zt6pRCnysFF2I=; b=vajO0pzKWxgAZNFS99eYkhyw4oIweyNw090vRUjFNnMUaY2rBwROo+I6Gp40mMpL5f iOuhYcEVdeBMk9xN2kRVV5x6jLAHVbmltR4MqAJWA/SCQsO6tme+2ERENJCGnmjarA8A hmXFphpBw/OWFQj3fwcA+vtQf4QZIZ8f6R3o4eDv3dkk+Hj/tewi+AqXO9nP8+bsY+dr 2BApT3pN6s5+RVFwKsfy3BZxMkuNRyfi+mMIBIvPce0Toxx9KY6yaPkO17ansf19KzJa 3/9g8vaImkaN0x/Ou+9tPGYds/cDJSeqSvaOgLCBMQg/6zj4rh3ycpzmy1jTTU9zCKre M0zA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=YOsWwwnUpNul4B1X0J/EorgqK2kCN9Zt6pRCnysFF2I=; b=OpWjyND3xURHt1sAMKvptgBKetKoDqZwq1vK1kdmHBDsCMfRiCbX1c4d65EihliLMP TJsOJYibT3L/BfMv4uLLlpfQtJ0CVHNRCLR5Pp93vCSKA83ODtHlV4CghuYaxvSa95Kw RE5LrVcmaFOBniqVoyMd5u6g00wlbU/Ntjxi9F4eOlwLdTvBvdWpB1A/uFiqWlbyiZao n0z7zvamuASaszvc3GISEzUTXNqrXfBzCeg97ULsv/m9VL+cNcD/245WEUy7r9l+jR0v RlbUE95yDz1H/pyjRn+LOFMfYnXtX5ZQ0RY2gI4Bn55aNZEruoyRI3S65iaMYIbCZNXQ WY8g== X-Gm-Message-State: AIkVDXLbwqkHGXx9SwvULs51sYjzNWAahwbJ3BqjrhVbLCr0e3P9mumZBDZDEaBWBFdGDhKaHJXvkmbOzT7sFg== X-Received: by 10.157.27.208 with SMTP id v16mr3066558otv.200.1486321145841; Sun, 05 Feb 2017 10:59:05 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.51.7 with HTTP; Sun, 5 Feb 2017 10:59:05 -0800 (PST) In-Reply-To: References: <201702010332.v113WnYf041362@repo.freebsd.org> <20170203231238.0675c289@kan> <8523aaa5-6c30-9f9f-40f0-fdf82cdf1669@pix.net> <6bf86e46-9714-c7e9-8d47-845761e2de24@FreeBSD.org> <8a2f7f7d-14c3-8e75-e060-fc41213ce389@FreeBSD.org> From: Jason Harmening Date: Sun, 5 Feb 2017 10:59:05 -0800 Message-ID: Subject: Re: svn commit: r313037 - in head/sys: amd64/include kern mips/include net powerpc/include sparc64/include To: Svatopluk Kraus Cc: Andreas Tobler , Kurt Lidl , Alexander Kabaev , "Jason A. Harmening" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Ed Maste , Justin Hibbits Content-Type: multipart/mixed; boundary=001a1141481aebafb20547cd1b65 X-Mailman-Approved-At: Mon, 06 Feb 2017 00:34:57 +0000 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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, 05 Feb 2017 18:59:07 -0000 --001a1141481aebafb20547cd1b65 Content-Type: text/plain; charset=UTF-8 Actually attaching the patch this time (**** gmail client) On Sun, Feb 5, 2017 at 10:58 AM, Jason Harmening wrote: > Hmm, it's a good idea to consider the possibility of a barrier issue. It > wouldn't be the first time we've had such a problem on a weakly-ordered > architecture. That said, I don't see a problem in this case. > smp_rendezvous_cpus() takes a spinlock and then issues > atomic_store_rel_int() to ensure the rendezvous params are visible to > other cpus. The latter corresponds to lwsync on powerpc, which AFAIK > should be sufficient to ensure visibility of prior stores. > > For now I'm going with the simpler explanation that I made a bad > assumption in the powerpc get_pcpu() and there is some context in which > the read of sprg0 doesn't return a consistent pointer value. Unfortunately > I don't see where that might be right now. > > On the mips side, Kurt/Alexander can you test the attached patch? It > contains a simple fix to ensure get_pcpu() returns the consistent per-cpu > pointer. > > On Sat, Feb 4, 2017 at 1:34 PM, Svatopluk Kraus wrote: > >> Probably not related. But when I took short look to the patch to see >> what could go wrong, I walked into the following comment in >> _rm_wlock(): "Assumes rm->rm_writecpus update is visible on other CPUs >> before rm_cleanIPI is called." There is no explicit barrier to ensure >> it. However, there might be some barriers inside of >> smp_rendezvous_cpus(). I have no idea what could happened if this >> assumption is not met. Note that rm_cleanIPI() is affected by the >> patch. >> >> >> >> On Sat, Feb 4, 2017 at 9:39 PM, Jason Harmening >> wrote: >> > Can you post an example of such panic? Only 2 MI pieces were changed, >> > netisr and rmlock. I haven't seen problems on my own amd64/i386/arm >> testing >> > of this, so a backtrace might help to narrow down the cause. >> > >> > On Sat, Feb 4, 2017 at 12:22 PM, Andreas Tobler >> > wrote: >> >> >> >> On 04.02.17 20:54, Jason Harmening wrote: >> >>> >> >>> I suspect this broke rmlocks for mips because the rmlock >> implementation >> >>> takes the address of the per-CPU pc_rm_queue when building tracker >> >>> lists. That address may be later accessed from another CPU and will >> >>> then translate to the wrong physical region if the address was taken >> >>> relative to the globally-constant pcpup VA used on mips. >> >>> >> >>> Regardless, for mips get_pcpup() should be implemented as >> >>> pcpu_find(curcpu) since returning an address that may mean something >> >>> different depending on the CPU seems like a big POLA violation if >> >>> nothing else. >> >>> >> >>> I'm more concerned about the report of powerpc breakage. For powerpc >> we >> >>> simply take each pcpu pointer from the pc_allcpu list (which is the >> same >> >>> value stored in the cpuid_to_pcpu array) and pass it through the >> ap_pcpu >> >>> global to each AP's startup code, which then stores it in sprg0. It >> >>> should be globally unique and won't have the variable-translation >> issues >> >>> seen on mips. Andreas, are you certain this change was responsible >> the >> >>> breakage you saw, and was it the same sort of hang observed on mips? >> >> >> >> >> >> I'm really sure. 313036 booted fine, allowed me to execute heavy >> >> compilation jobs, np. 313037 on the other side gave me various >> patterns of >> >> panics. During startup, but I also succeeded to get into multiuser and >> then >> >> the panic happend during port building. >> >> >> >> I have no deeper inside where pcpu data is used. Justin mentioned >> netisr? >> >> >> >> Andreas >> >> >> > >> > > --001a1141481aebafb20547cd1b65 Content-Type: text/plain; charset=US-ASCII; name="patch_get_pcpu.txt" Content-Disposition: attachment; filename="patch_get_pcpu.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: f_iyt18bxx0 SW5kZXg6IHN5cy9hbWQ2NC9pbmNsdWRlL3BjcHUuaAo9PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBzeXMvYW1kNjQv aW5jbHVkZS9wY3B1LmgJKHJldmlzaW9uIDMxMzE5MykKKysrIHN5cy9hbWQ2NC9pbmNsdWRlL3Bj cHUuaAkod29ya2luZyBjb3B5KQpAQCAtNzgsNiArNzgsNyBAQAogCiBleHRlcm4gc3RydWN0IHBj cHUgKnBjcHVwOwogCisjZGVmaW5lCWdldF9wY3B1KCkJCShwY3B1cCkKICNkZWZpbmUJUENQVV9H RVQobWVtYmVyKQkocGNwdXAtPnBjXyAjIyBtZW1iZXIpCiAjZGVmaW5lCVBDUFVfQUREKG1lbWJl ciwgdmFsKQkocGNwdXAtPnBjXyAjIyBtZW1iZXIgKz0gKHZhbCkpCiAjZGVmaW5lCVBDUFVfSU5D KG1lbWJlcikJUENQVV9BREQobWVtYmVyLCAxKQpAQCAtMjAzLDYgKzIwNCwxNSBAQAogCX0JCQkJ CQkJCVwKIH0KIAorI2RlZmluZQlnZXRfcGNwdSgpIF9fZXh0ZW5zaW9uX18gKHsJCQkJCVwKKwlz dHJ1Y3QgcGNwdSAqX19wYzsJCQkJCQlcCisJCQkJCQkJCQlcCisJX19hc20gX192b2xhdGlsZSgi bW92cSAlJWdzOiUxLCUwIgkJCQlcCisJICAgIDogIj1yIiAoX19wYykJCQkJCQlcCisJICAgIDog Im0iICgqKHN0cnVjdCBwY3B1ICopKF9fcGNwdV9vZmZzZXQocGNfcHJ2c3BhY2UpKSkpOwlcCisJ X19wYzsJCQkJCQkJCVwKK30pCisKICNkZWZpbmUJUENQVV9HRVQobWVtYmVyKQlfX1BDUFVfR0VU KHBjXyAjIyBtZW1iZXIpCiAjZGVmaW5lCVBDUFVfQUREKG1lbWJlciwgdmFsKQlfX1BDUFVfQURE KHBjXyAjIyBtZW1iZXIsIHZhbCkKICNkZWZpbmUJUENQVV9JTkMobWVtYmVyKQlfX1BDUFVfSU5D KHBjXyAjIyBtZW1iZXIpCkluZGV4OiBzeXMva2Vybi9rZXJuX3JtbG9jay5jCj09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0K LS0tIHN5cy9rZXJuL2tlcm5fcm1sb2NrLmMJKHJldmlzaW9uIDMxMzE5MykKKysrIHN5cy9rZXJu L2tlcm5fcm1sb2NrLmMJKHdvcmtpbmcgY29weSkKQEAgLTE1Niw3ICsxNTYsNyBAQAogCQkgKi8K IAkJY3JpdGljYWxfZW50ZXIoKTsKIAkJdGQgPSBjdXJ0aHJlYWQ7Ci0JCXBjID0gcGNwdV9maW5k KGN1cmNwdSk7CisJCXBjID0gZ2V0X3BjcHUoKTsKIAkJZm9yIChxdWV1ZSA9IHBjLT5wY19ybV9x dWV1ZS5ybXFfbmV4dDsKIAkJICAgIHF1ZXVlICE9ICZwYy0+cGNfcm1fcXVldWU7IHF1ZXVlID0g cXVldWUtPnJtcV9uZXh0KSB7CiAJCQl0cmFja2VyID0gKHN0cnVjdCBybV9wcmlvdHJhY2tlciAq KXF1ZXVlOwpAQCAtMjU4LDcgKzI1OCw3IEBACiAJc3RydWN0IHJtbG9jayAqcm0gPSBhcmc7CiAJ c3RydWN0IHJtX3ByaW90cmFja2VyICp0cmFja2VyOwogCXN0cnVjdCBybV9xdWV1ZSAqcXVldWU7 Ci0JcGMgPSBwY3B1X2ZpbmQoY3VyY3B1KTsKKwlwYyA9IGdldF9wY3B1KCk7CiAKIAlmb3IgKHF1 ZXVlID0gcGMtPnBjX3JtX3F1ZXVlLnJtcV9uZXh0OyBxdWV1ZSAhPSAmcGMtPnBjX3JtX3F1ZXVl OwogCSAgICBxdWV1ZSA9IHF1ZXVlLT5ybXFfbmV4dCkgewpAQCAtMzU1LDcgKzM1NSw3IEBACiAJ c3RydWN0IHBjcHUgKnBjOwogCiAJY3JpdGljYWxfZW50ZXIoKTsKLQlwYyA9IHBjcHVfZmluZChj dXJjcHUpOworCXBjID0gZ2V0X3BjcHUoKTsKIAogCS8qIENoZWNrIGlmIHdlIGp1c3QgbmVlZCB0 byBkbyBhIHByb3BlciBjcml0aWNhbF9leGl0LiAqLwogCWlmICghQ1BVX0lTU0VUKHBjLT5wY19j cHVpZCwgJnJtLT5ybV93cml0ZWNwdXMpKSB7CkBAIC00MTYsNyArNDE2LDcgQEAKIAl9CiAKIAlj cml0aWNhbF9lbnRlcigpOwotCXBjID0gcGNwdV9maW5kKGN1cmNwdSk7CisJcGMgPSBnZXRfcGNw dSgpOwogCUNQVV9DTFIocGMtPnBjX2NwdWlkLCAmcm0tPnJtX3dyaXRlY3B1cyk7CiAJcm1fdHJh Y2tlcl9hZGQocGMsIHRyYWNrZXIpOwogCXNjaGVkX3BpbigpOwpAQCAtNjQxLDcgKzY0MSw3IEBA CiAjaWZkZWYgSU5WQVJJQU5UUwogCWlmICghKHJtLT5sb2NrX29iamVjdC5sb19mbGFncyAmIExP X1JFQ1VSU0FCTEUpICYmICF0cnlsb2NrKSB7CiAJCWNyaXRpY2FsX2VudGVyKCk7Ci0JCUtBU1NF UlQocm1fdHJhY2tlcnNfcHJlc2VudChwY3B1X2ZpbmQoY3VyY3B1KSwgcm0sCisJCUtBU1NFUlQo cm1fdHJhY2tlcnNfcHJlc2VudChnZXRfcGNwdSgpLCBybSwKIAkJICAgIGN1cnRocmVhZCkgPT0g MCwKIAkJICAgICgicm1fcmxvY2s6IHJlY3Vyc2VkIG9uIG5vbi1yZWN1cnNpdmUgcm1sb2NrICVz IEAgJXM6JWRcbiIsCiAJCSAgICBybS0+bG9ja19vYmplY3QubG9fbmFtZSwgZmlsZSwgbGluZSkp OwpAQCAtNzcxLDcgKzc3MSw3IEBACiAJCX0KIAogCQljcml0aWNhbF9lbnRlcigpOwotCQljb3Vu dCA9IHJtX3RyYWNrZXJzX3ByZXNlbnQocGNwdV9maW5kKGN1cmNwdSksIHJtLCBjdXJ0aHJlYWQp OworCQljb3VudCA9IHJtX3RyYWNrZXJzX3ByZXNlbnQoZ2V0X3BjcHUoKSwgcm0sIGN1cnRocmVh ZCk7CiAJCWNyaXRpY2FsX2V4aXQoKTsKIAogCQlpZiAoY291bnQgPT0gMCkKQEAgLTc5Nyw3ICs3 OTcsNyBAQAogCQkJICAgIHJtLT5sb2NrX29iamVjdC5sb19uYW1lLCBmaWxlLCBsaW5lKTsKIAog CQljcml0aWNhbF9lbnRlcigpOwotCQljb3VudCA9IHJtX3RyYWNrZXJzX3ByZXNlbnQocGNwdV9m aW5kKGN1cmNwdSksIHJtLCBjdXJ0aHJlYWQpOworCQljb3VudCA9IHJtX3RyYWNrZXJzX3ByZXNl bnQoZ2V0X3BjcHUoKSwgcm0sIGN1cnRocmVhZCk7CiAJCWNyaXRpY2FsX2V4aXQoKTsKIAogCQlp ZiAoY291bnQgIT0gMCkKSW5kZXg6IHN5cy9taXBzL2luY2x1ZGUvcGNwdS5oCj09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0K LS0tIHN5cy9taXBzL2luY2x1ZGUvcGNwdS5oCShyZXZpc2lvbiAzMTMxOTMpCisrKyBzeXMvbWlw cy9pbmNsdWRlL3BjcHUuaAkod29ya2luZyBjb3B5KQpAQCAtMzksMTYgKzM5LDE3IEBACiAJc3Ry dWN0CXBtYXAJKnBjX2N1cnBtYXA7CQkvKiBwbWFwIG9mIGN1cnRocmVhZCAqLwlcCiAJdV9pbnQz Ml90CXBjX25leHRfYXNpZDsJCS8qIG5leHQgQVNJRCB0byBhbGxvYyAqLyBcCiAJdV9pbnQzMl90 CXBjX2FzaWRfZ2VuZXJhdGlvbjsJLyogY3VycmVudCBBU0lEIGdlbmVyYXRpb24gKi8gXAotCXVf aW50CQlwY19wZW5kaW5nX2lwaXM7CS8qIElQSXMgcGVuZGluZyB0byB0aGlzIENQVSAqLworCXVf aW50CQlwY19wZW5kaW5nX2lwaXM7CS8qIElQSXMgcGVuZGluZyB0byB0aGlzIENQVSAqLyBcCisJ c3RydWN0CXBjcHUJKnBjX3NlbGY7CQkvKiBnbG9iYWxseS11bmlxZSBzZWxmIHBvaW50ZXIgKi8K IAogI2lmZGVmCV9fbWlwc19uNjQKICNkZWZpbmUJUENQVV9NRF9NSVBTNjRfRklFTERTCQkJCQkJ XAogCVBDUFVfTURfQ09NTU9OX0ZJRUxEUwkJCQkJCVwKLQljaGFyCQlfX3BhZFs2MV0KKwljaGFy CQlfX3BhZFs1M10KICNlbHNlCiAjZGVmaW5lCVBDUFVfTURfTUlQUzMyX0ZJRUxEUwkJCQkJCVwK IAlQQ1BVX01EX0NPTU1PTl9GSUVMRFMJCQkJCQlcCi0JY2hhcgkJX19wYWRbMTkzXQorCWNoYXIJ CV9fcGFkWzE4OV0KICNlbmRpZgogCiAjaWZkZWYJX19taXBzX242NApAQCAtNjUsNiArNjYsMTMg QEAKIGV4dGVybiBzdHJ1Y3QgcGNwdSAqcGNwdXA7CiAjZGVmaW5lCVBDUFVQCXBjcHVwCiAKKy8q CisgKiBTaW5jZSB3ZSB1c2UgYSB3aXJlZCBUTEIgZW50cnkgdG8gbWFwIHRoZSBzYW1lIFZBIHRv IGEgZGlmZmVyZW50CisgKiBwaHlzaWNhbCBwYWdlIGZvciBlYWNoIENQVSwgZ2V0X3BjcHUoKSBt dXN0IHVzZSB0aGUgcGNfc2VsZgorICogZmllbGQgdG8gb2J0YWluIGEgZ2xvYmFsbHktdW5pcXVl IHBvaW50ZXIuCisgKi8KKyNkZWZpbmUJZ2V0X3BjcHUoKQkJKFBDUFVQLT5wY19zZWxmKQorCiAj ZGVmaW5lCVBDUFVfQUREKG1lbWJlciwgdmFsdWUpCShQQ1BVUC0+cGNfICMjIG1lbWJlciArPSAo dmFsdWUpKQogI2RlZmluZQlQQ1BVX0dFVChtZW1iZXIpCShQQ1BVUC0+cGNfICMjIG1lbWJlcikK ICNkZWZpbmUJUENQVV9JTkMobWVtYmVyKQlQQ1BVX0FERChtZW1iZXIsIDEpCkluZGV4OiBzeXMv bWlwcy9taXBzL21hY2hkZXAuYwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBzeXMvbWlwcy9taXBzL21hY2hkZXAu YwkocmV2aXNpb24gMzEzMTkzKQorKysgc3lzL21pcHMvbWlwcy9tYWNoZGVwLmMJKHdvcmtpbmcg Y29weSkKQEAgLTQ3NSw2ICs0NzUsNyBAQAogCiAJcGNwdS0+cGNfbmV4dF9hc2lkID0gMTsKIAlw Y3B1LT5wY19hc2lkX2dlbmVyYXRpb24gPSAxOworCXBjcHUtPnBjX3NlbGYgPSBwY3B1OwogI2lm ZGVmIFNNUAogCWlmICgodm1fb2Zmc2V0X3QpcGNwdXAgPj0gVk1fTUlOX0tFUk5FTF9BRERSRVNT ICYmCiAJICAgICh2bV9vZmZzZXRfdClwY3B1cCA8PSBWTV9NQVhfS0VSTkVMX0FERFJFU1MpIHsK SW5kZXg6IHN5cy9uZXQvbmV0aXNyLmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gc3lzL25ldC9uZXRpc3IuYwko cmV2aXNpb24gMzEzMTkzKQorKysgc3lzL25ldC9uZXRpc3IuYwkod29ya2luZyBjb3B5KQpAQCAt MTI2OCw5ICsxMjY4LDcgQEAKIHN0YXRpYyB2b2lkCiBuZXRpc3JfaW5pdCh2b2lkICphcmcpCiB7 Ci0jaWZkZWYgRUFSTFlfQVBfU1RBUlRVUAogCXN0cnVjdCBwY3B1ICpwYzsKLSNlbmRpZgogCiAJ TkVUSVNSX0xPQ0tfSU5JVCgpOwogCWlmIChuZXRpc3JfbWF4dGhyZWFkcyA9PSAwIHx8IG5ldGlz cl9tYXh0aHJlYWRzIDwgLTEgKQpAQCAtMTMwOCw3ICsxMzA2LDggQEAKIAkJbmV0aXNyX3N0YXJ0 X3N3aShwYy0+cGNfY3B1aWQsIHBjKTsKIAl9CiAjZWxzZQotCW5ldGlzcl9zdGFydF9zd2koY3Vy Y3B1LCBwY3B1X2ZpbmQoY3VyY3B1KSk7CisJcGMgPSBnZXRfcGNwdSgpOworCW5ldGlzcl9zdGFy dF9zd2kocGMtPnBjX2NwdWlkLCBwYyk7CiAjZW5kaWYKIH0KIFNZU0lOSVQobmV0aXNyX2luaXQs IFNJX1NVQl9TT0ZUSU5UUiwgU0lfT1JERVJfRklSU1QsIG5ldGlzcl9pbml0LCBOVUxMKTsKSW5k ZXg6IHN5cy9wb3dlcnBjL2luY2x1ZGUvY3B1ZnVuYy5oCj09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIHN5cy9wb3dl cnBjL2luY2x1ZGUvY3B1ZnVuYy5oCShyZXZpc2lvbiAzMTMxOTMpCisrKyBzeXMvcG93ZXJwYy9p bmNsdWRlL2NwdWZ1bmMuaAkod29ya2luZyBjb3B5KQpAQCAtMjAxLDcgKzIwMSw3IEBACiB9CiAK IHN0YXRpYyBfX2lubGluZSBzdHJ1Y3QgcGNwdSAqCi1wb3dlcnBjX2dldF9wY3B1cCh2b2lkKQor Z2V0X3BjcHUodm9pZCkKIHsKIAlzdHJ1Y3QgcGNwdSAqcmV0OwogCkluZGV4OiBzeXMvcG93ZXJw Yy9pbmNsdWRlL3BjcHUuaAo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBzeXMvcG93ZXJwYy9pbmNsdWRlL3BjcHUu aAkocmV2aXNpb24gMzEzMTkzKQorKysgc3lzL3Bvd2VycGMvaW5jbHVkZS9wY3B1LmgJKHdvcmtp bmcgY29weSkKQEAgLTE0Miw3ICsxNDIsNyBAQAogCiAjaWZkZWYgX0tFUk5FTAogCi0jZGVmaW5l IHBjcHVwCSgoc3RydWN0IHBjcHUgKikgcG93ZXJwY19nZXRfcGNwdXAoKSkKKyNkZWZpbmUgcGNw dXAJKGdldF9wY3B1KCkpCiAKIHN0YXRpYyBfX2lubGluZSBfX3B1cmUyIHN0cnVjdCB0aHJlYWQg KgogX19jdXJ0aHJlYWQodm9pZCkKSW5kZXg6IHN5cy9zcGFyYzY0L2luY2x1ZGUvcGNwdS5oCj09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT0KLS0tIHN5cy9zcGFyYzY0L2luY2x1ZGUvcGNwdS5oCShyZXZpc2lvbiAzMTMxOTMp CisrKyBzeXMvc3BhcmM2NC9pbmNsdWRlL3BjcHUuaAkod29ya2luZyBjb3B5KQpAQCAtNzQsNiAr NzQsNyBAQAogcmVnaXN0ZXIgc3RydWN0IHBjYiAqY3VycGNiIF9fYXNtX18oX19YU1RSSU5HKFBD Ql9SRUcpKTsKIHJlZ2lzdGVyIHN0cnVjdCBwY3B1ICpwY3B1cCBfX2FzbV9fKF9fWFNUUklORyhQ Q1BVX1JFRykpOwogCisjZGVmaW5lCWdldF9wY3B1KCkJCShwY3B1cCkKICNkZWZpbmUJUENQVV9H RVQobWVtYmVyKQkocGNwdXAtPnBjXyAjIyBtZW1iZXIpCiAKIHN0YXRpYyBfX2lubGluZSBfX3B1 cmUyIHN0cnVjdCB0aHJlYWQgKgo= --001a1141481aebafb20547cd1b65-- From owner-svn-src-head@freebsd.org Sun Feb 5 21:06: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 1F3B4CD24EB; Sun, 5 Feb 2017 21:06:59 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from smtp.imp.ch (smtp.imp.ch [IPv6:2001:4060:1:1001::13:197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7D211DF8; Sun, 5 Feb 2017 21:06:58 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from [192.168.225.14] (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by fgznet.ch (Postfix) with ESMTPSA id 7FC1F10D06A; Sun, 5 Feb 2017 22:06:46 +0100 (CET) Subject: Re: svn commit: r313037 - in head/sys: amd64/include kern mips/include net powerpc/include sparc64/include To: Jason Harmening , Svatopluk Kraus References: <201702010332.v113WnYf041362@repo.freebsd.org> <20170203231238.0675c289@kan> <8523aaa5-6c30-9f9f-40f0-fdf82cdf1669@pix.net> <6bf86e46-9714-c7e9-8d47-845761e2de24@FreeBSD.org> <8a2f7f7d-14c3-8e75-e060-fc41213ce389@FreeBSD.org> Cc: Kurt Lidl , Alexander Kabaev , "Jason A. Harmening" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Ed Maste , Justin Hibbits From: Andreas Tobler Message-ID: Date: Sun, 5 Feb 2017 22:06:46 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: Obelix Submit on 127.0.1.1 X-Mailman-Approved-At: Mon, 06 Feb 2017 01:19:06 +0000 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, 05 Feb 2017 21:06:59 -0000 On 05.02.17 19:59, Jason Harmening wrote: > Actually attaching the patch this time (**** gmail client) > > On Sun, Feb 5, 2017 at 10:58 AM, Jason Harmening > > wrote: > > Hmm, it's a good idea to consider the possibility of a barrier > issue. It wouldn't be the first time we've had such a problem on a > weakly-ordered architecture. That said, I don't see a problem in > this case. smp_rendezvous_cpus() takes a spinlock and then issues > atomic_store_rel_int() to ensure the rendezvous params are visible > to other cpus. The latter corresponds to lwsync on powerpc, which > AFAIK should be sufficient to ensure visibility of prior stores. > > For now I'm going with the simpler explanation that I made a bad > assumption in the powerpc get_pcpu() and there is some context in > which the read of sprg0 doesn't return a consistent pointer value. > Unfortunately I don't see where that might be right now. > > On the mips side, Kurt/Alexander can you test the attached patch? > It contains a simple fix to ensure get_pcpu() returns the consistent > per-cpu pointer. Here the panic I received with the latest patch you sent. World & kernel are on 313286 + patch. https://people.freebsd.org/~andreast/pcpu/ It is the same panic, pic 2 is with a try to get a core .... The load issue was a gmake -j8 bootstrap of todays gcc trunk sources. The machine has 2 physical CPU's, two threads pre cpu :) I revert now and see if the situation becomes stable again or if there is something else. Andreas From owner-svn-src-head@freebsd.org Mon Feb 6 01:57: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 42977CD2C28; Mon, 6 Feb 2017 01:57:43 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F94F16BC; Mon, 6 Feb 2017 01:57:42 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v161vgfI098086; Mon, 6 Feb 2017 01:57:42 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v161vgln098085; Mon, 6 Feb 2017 01:57:42 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702060157.v161vgln098085@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 6 Feb 2017 01:57:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313306 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 01:57:43 -0000 Author: adrian Date: Mon Feb 6 01:57:41 2017 New Revision: 313306 URL: https://svnweb.freebsd.org/changeset/base/313306 Log: [iwm] free node reference if rxparams addition fails. Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Sun Feb 5 22:18:45 2017 (r313305) +++ head/sys/dev/iwm/if_iwm.c Mon Feb 6 01:57:41 2017 (r313306) @@ -2994,8 +2994,11 @@ iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc, /* rssi is in 1/2db units */ rxs.c_rssi = rssi * 2; rxs.c_nf = sc->sc_noise; - if (ieee80211_add_rx_params(m, &rxs) == 0) + if (ieee80211_add_rx_params(m, &rxs) == 0) { + if (ni) + ieee80211_free_node(ni); goto fail; + } if (ieee80211_radiotap_active_vap(vap)) { struct iwm_rx_radiotap_header *tap = &sc->sc_rxtap; @@ -3042,7 +3045,8 @@ iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc, return; -fail: counter_u64_add(ic->ic_ierrors, 1); +fail: + counter_u64_add(ic->ic_ierrors, 1); } static int From owner-svn-src-head@freebsd.org Mon Feb 6 01:58: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 9DE1CCD2C69; Mon, 6 Feb 2017 01:58:00 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6DB39180C; Mon, 6 Feb 2017 01:58:00 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v161vx43098139; Mon, 6 Feb 2017 01:57:59 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v161vxQK098138; Mon, 6 Feb 2017 01:57:59 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702060157.v161vxQK098138@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 6 Feb 2017 01:57:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313307 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 01:58:00 -0000 Author: adrian Date: Mon Feb 6 01:57:59 2017 New Revision: 313307 URL: https://svnweb.freebsd.org/changeset/base/313307 Log: [iwm] TODO for QOS support. Modified: head/sys/dev/iwm/if_iwm_mac_ctxt.c Modified: head/sys/dev/iwm/if_iwm_mac_ctxt.c ============================================================================== --- head/sys/dev/iwm/if_iwm_mac_ctxt.c Mon Feb 6 01:57:41 2017 (r313306) +++ head/sys/dev/iwm/if_iwm_mac_ctxt.c Mon Feb 6 01:57:59 2017 (r313307) @@ -318,6 +318,11 @@ iwm_mvm_mac_ctxt_cmd_common(struct iwm_s = htole32((ic->ic_flags & IEEE80211_F_SHSLOT) ? IWM_MAC_FLG_SHORT_SLOT : 0); + /* + * XXX TODO: if we're doing QOS.. + * cmd->qos_flags |= cpu_to_le32(MAC_QOS_FLG_UPDATE_EDCA) + */ + /* XXX TODO: set wme parameters; also handle getting updated wme parameters */ for (i = 0; i < IWM_AC_NUM+1; i++) { int txf = i; From owner-svn-src-head@freebsd.org Mon Feb 6 02:01: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 A5417CD2DDA; Mon, 6 Feb 2017 02:01:23 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74E661B86; Mon, 6 Feb 2017 02:01:23 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1621MXW099054; Mon, 6 Feb 2017 02:01:22 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1621Mb4099051; Mon, 6 Feb 2017 02:01:22 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702060201.v1621Mb4099051@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 6 Feb 2017 02:01:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313308 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 02:01:23 -0000 Author: adrian Date: Mon Feb 6 02:01:22 2017 New Revision: 313308 URL: https://svnweb.freebsd.org/changeset/base/313308 Log: [iwm] The HW Revision stepping constants should be in if_iwmreg.h. Obtained from: dragonflybsd 84292f0c38594c462c719c0e59da5908b93aba5f Modified: head/sys/dev/iwm/if_iwmreg.h head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwmreg.h ============================================================================== --- head/sys/dev/iwm/if_iwmreg.h Mon Feb 6 01:57:59 2017 (r313307) +++ head/sys/dev/iwm/if_iwmreg.h Mon Feb 6 02:01:22 2017 (r313308) @@ -297,6 +297,16 @@ #define IWM_CSR_HW_REV_DASH(_val) (((_val) & 0x0000003) >> 0) #define IWM_CSR_HW_REV_STEP(_val) (((_val) & 0x000000C) >> 2) +/** + * hw_rev values + */ +enum { + IWM_SILICON_A_STEP = 0, + IWM_SILICON_B_STEP, + IWM_SILICON_C_STEP, +}; + + #define IWM_CSR_HW_REV_TYPE_MSK (0x000FFF0) #define IWM_CSR_HW_REV_TYPE_5300 (0x0000020) #define IWM_CSR_HW_REV_TYPE_5350 (0x0000030) Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 01:57:59 2017 (r313307) +++ head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 02:01:22 2017 (r313308) @@ -432,10 +432,6 @@ struct iwm_softc { int ict_cur; int sc_hw_rev; -#define IWM_SILICON_A_STEP 0 -#define IWM_SILICON_B_STEP 1 -#define IWM_SILICON_C_STEP 2 -#define IWM_SILICON_D_STEP 3 int sc_hw_id; int sc_device_family; #define IWM_DEVICE_FAMILY_7000 1 From owner-svn-src-head@freebsd.org Mon Feb 6 02:14: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 B2AD2CD1134; Mon, 6 Feb 2017 02:14:35 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70D7826F; Mon, 6 Feb 2017 02:14:35 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v162EYbp005952; Mon, 6 Feb 2017 02:14:34 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v162EYOV005946; Mon, 6 Feb 2017 02:14:34 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702060214.v162EYOV005946@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 6 Feb 2017 02:14:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313309 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 02:14:35 -0000 Author: adrian Date: Mon Feb 6 02:14:34 2017 New Revision: 313309 URL: https://svnweb.freebsd.org/changeset/base/313309 Log: [iwm] Sync if_iwm_phy_db code with Linux iwlwifi. Obtained from: Dragonflybsd commit c1019b6bfff36c856f7b4fccbdf3bb13ac27750c Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_phy_db.c head/sys/dev/iwm/if_iwm_phy_db.h head/sys/dev/iwm/if_iwmreg.h head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Mon Feb 6 02:01:22 2017 (r313308) +++ head/sys/dev/iwm/if_iwm.c Mon Feb 6 02:14:34 2017 (r313309) @@ -4619,11 +4619,9 @@ iwm_init_hw(struct iwm_softc *sc) goto error; } - /* Send phy db control command and then phy db calibration*/ - if ((error = iwm_send_phy_db_data(sc)) != 0) { - device_printf(sc->sc_dev, "phy_db_data failed\n"); + /* Send phy db control command and then phy db calibration */ + if ((error = iwm_send_phy_db_data(sc->sc_phy_db)) != 0) goto error; - } if ((error = iwm_send_phy_cfg_cmd(sc)) != 0) { device_printf(sc->sc_dev, "phy_cfg_cmd failed\n"); @@ -5251,7 +5249,7 @@ iwm_notif_intr(struct iwm_softc *sc) struct iwm_calib_res_notif_phy_db *phy_db_notif; phy_db_notif = (void *)pkt->data; - iwm_phy_db_set_section(sc, phy_db_notif); + iwm_phy_db_set_section(sc->sc_phy_db, phy_db_notif); break; } @@ -5774,6 +5772,13 @@ iwm_attach(device_t dev) callout_init_mtx(&sc->sc_led_blink_to, &sc->sc_mtx, 0); TASK_INIT(&sc->sc_es_task, 0, iwm_endscan_cb, sc); + /* Init phy db */ + sc->sc_phy_db = iwm_phy_db_init(sc); + if (!sc->sc_phy_db) { + device_printf(dev, "Cannot init phy_db\n"); + goto fail; + } + /* PCI attach */ error = iwm_pci_attach(dev); if (error != 0) @@ -6223,7 +6228,8 @@ iwm_detach_local(struct iwm_softc *sc, i ieee80211_ifdetach(&sc->sc_ic); } - iwm_phy_db_free(sc); + iwm_phy_db_free(sc->sc_phy_db); + sc->sc_phy_db = NULL; /* Free descriptor rings */ iwm_free_rx_ring(sc, &sc->rxq); Modified: head/sys/dev/iwm/if_iwm_phy_db.c ============================================================================== --- head/sys/dev/iwm/if_iwm_phy_db.c Mon Feb 6 02:01:22 2017 (r313308) +++ head/sys/dev/iwm/if_iwm_phy_db.c Mon Feb 6 02:14:34 2017 (r313309) @@ -150,26 +150,104 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include -#include -#include +#include "if_iwmreg.h" +#include "if_iwmvar.h" +#include "if_iwm_debug.h" +#include "if_iwm_util.h" +#include "if_iwm_phy_db.h" + +#define CHANNEL_NUM_SIZE 4 /* num of channels in calib_ch size */ + +struct iwm_phy_db_entry { + uint16_t size; + uint8_t *data; +}; + +/** + * struct iwm_phy_db - stores phy configuration and calibration data. + * + * @cfg: phy configuration. + * @calib_nch: non channel specific calibration data. + * @calib_ch: channel specific calibration data. + * @n_group_papd: number of entries in papd channel group. + * @calib_ch_group_papd: calibration data related to papd channel group. + * @n_group_txp: number of entries in tx power channel group. + * @calib_ch_group_txp: calibration data related to tx power chanel group. + */ +struct iwm_phy_db { + struct iwm_phy_db_entry cfg; + struct iwm_phy_db_entry calib_nch; + int n_group_papd; + struct iwm_phy_db_entry *calib_ch_group_papd; + int n_group_txp; + struct iwm_phy_db_entry *calib_ch_group_txp; + + struct iwm_softc *sc; +}; + +enum iwm_phy_db_section_type { + IWM_PHY_DB_CFG = 1, + IWM_PHY_DB_CALIB_NCH, + IWM_PHY_DB_UNUSED, + IWM_PHY_DB_CALIB_CHG_PAPD, + IWM_PHY_DB_CALIB_CHG_TXP, + IWM_PHY_DB_MAX +}; + +#define PHY_DB_CMD 0x6c /* TEMP API - The actual is 0x8c */ + +/* + * phy db - configure operational ucode + */ +struct iwm_phy_db_cmd { + uint16_t type; + uint16_t length; + uint8_t data[]; +} __packed; + +/* for parsing of tx power channel group data that comes from the firmware*/ +struct iwm_phy_db_chg_txp { + uint32_t space; + uint16_t max_channel_idx; +} __packed; /* - * BEGIN iwl-phy-db.c + * phy db - Receive phy db chunk after calibrations */ +struct iwm_calib_res_notif_phy_db { + uint16_t type; + uint16_t length; + uint8_t data[]; +} __packed; + +struct iwm_phy_db * +iwm_phy_db_init(struct iwm_softc *sc) +{ + struct iwm_phy_db *phy_db = malloc(sizeof(struct iwm_phy_db), + M_DEVBUF, M_NOWAIT | M_ZERO); + + if (!phy_db) + return phy_db; + + phy_db->sc = sc; + + phy_db->n_group_txp = -1; + phy_db->n_group_papd = -1; + + /* TODO: add default values of the phy db. */ + return phy_db; +} + /* * get phy db section: returns a pointer to a phy db section specified by * type and channel group id. */ static struct iwm_phy_db_entry * -iwm_phy_db_get_section(struct iwm_softc *sc, - enum iwm_phy_db_section_type type, uint16_t chg_id) +iwm_phy_db_get_section(struct iwm_phy_db *phy_db, + enum iwm_phy_db_section_type type, + uint16_t chg_id) { - struct iwm_phy_db *phy_db = &sc->sc_phy_db; - - if (type >= IWM_PHY_DB_MAX) + if (!phy_db || type >= IWM_PHY_DB_MAX) return NULL; switch (type) { @@ -178,11 +256,11 @@ iwm_phy_db_get_section(struct iwm_softc case IWM_PHY_DB_CALIB_NCH: return &phy_db->calib_nch; case IWM_PHY_DB_CALIB_CHG_PAPD: - if (chg_id >= IWM_NUM_PAPD_CH_GROUPS) + if (chg_id >= phy_db->n_group_papd) return NULL; return &phy_db->calib_ch_group_papd[chg_id]; case IWM_PHY_DB_CALIB_CHG_TXP: - if (chg_id >= IWM_NUM_TXP_CH_GROUPS) + if (chg_id >= phy_db->n_group_txp) return NULL; return &phy_db->calib_ch_group_txp[chg_id]; default: @@ -191,24 +269,92 @@ iwm_phy_db_get_section(struct iwm_softc return NULL; } +static void +iwm_phy_db_free_section(struct iwm_phy_db *phy_db, + enum iwm_phy_db_section_type type, uint16_t chg_id) +{ + struct iwm_phy_db_entry *entry = + iwm_phy_db_get_section(phy_db, type, chg_id); + if (!entry) + return; + + if (entry->data != NULL) + free(entry->data, M_DEVBUF); + entry->data = NULL; + entry->size = 0; +} + +void +iwm_phy_db_free(struct iwm_phy_db *phy_db) +{ + int i; + + if (!phy_db) + return; + + iwm_phy_db_free_section(phy_db, IWM_PHY_DB_CFG, 0); + iwm_phy_db_free_section(phy_db, IWM_PHY_DB_CALIB_NCH, 0); + + for (i = 0; i < phy_db->n_group_papd; i++) + iwm_phy_db_free_section(phy_db, IWM_PHY_DB_CALIB_CHG_PAPD, i); + if (phy_db->calib_ch_group_papd != NULL) + free(phy_db->calib_ch_group_papd, M_DEVBUF); + + for (i = 0; i < phy_db->n_group_txp; i++) + iwm_phy_db_free_section(phy_db, IWM_PHY_DB_CALIB_CHG_TXP, i); + if (phy_db->calib_ch_group_txp != NULL) + free(phy_db->calib_ch_group_txp, M_DEVBUF); + + free(phy_db, M_DEVBUF); +} + int -iwm_phy_db_set_section(struct iwm_softc *sc, - struct iwm_calib_res_notif_phy_db *phy_db_notif) +iwm_phy_db_set_section(struct iwm_phy_db *phy_db, + struct iwm_calib_res_notif_phy_db *phy_db_notif) { enum iwm_phy_db_section_type type = le16toh(phy_db_notif->type); - uint16_t size = le16toh(phy_db_notif->length); - struct iwm_phy_db_entry *entry; - uint16_t chg_id = 0; + uint16_t size = le16toh(phy_db_notif->length); + struct iwm_phy_db_entry *entry; + uint16_t chg_id = 0; - if (type == IWM_PHY_DB_CALIB_CHG_PAPD || - type == IWM_PHY_DB_CALIB_CHG_TXP) + if (!phy_db) + return EINVAL; + + if (type == IWM_PHY_DB_CALIB_CHG_PAPD) { chg_id = le16toh(*(uint16_t *)phy_db_notif->data); + if (phy_db && !phy_db->calib_ch_group_papd) { + /* + * Firmware sends the largest index first, so we can use + * it to know how much we should allocate. + */ + phy_db->calib_ch_group_papd = malloc( + (chg_id + 1) * sizeof(struct iwm_phy_db_entry), + M_DEVBUF, M_NOWAIT | M_ZERO); + if (!phy_db->calib_ch_group_papd) + return ENOMEM; + phy_db->n_group_papd = chg_id + 1; + } + } else if (type == IWM_PHY_DB_CALIB_CHG_TXP) { + chg_id = le16toh(*(uint16_t *)phy_db_notif->data); + if (phy_db && !phy_db->calib_ch_group_txp) { + /* + * Firmware sends the largest index first, so we can use + * it to know how much we should allocate. + */ + phy_db->calib_ch_group_txp = malloc( + (chg_id + 1) * sizeof(struct iwm_phy_db_entry), + M_DEVBUF, M_NOWAIT | M_ZERO); + if (!phy_db->calib_ch_group_txp) + return ENOMEM; + phy_db->n_group_txp = chg_id + 1; + } + } - entry = iwm_phy_db_get_section(sc, type, chg_id); + entry = iwm_phy_db_get_section(phy_db, type, chg_id); if (!entry) return EINVAL; - if (entry->data) + if (entry->data != NULL) free(entry->data, M_DEVBUF); entry->data = malloc(size, M_DEVBUF, M_NOWAIT); if (!entry->data) { @@ -216,17 +362,18 @@ iwm_phy_db_set_section(struct iwm_softc return ENOMEM; } memcpy(entry->data, phy_db_notif->data, size); + entry->size = size; - IWM_DPRINTF(sc, IWM_DEBUG_RESET, - "%s(%d): [PHYDB]SET: Type %d , Size: %d, data: %p\n", - __func__, __LINE__, type, size, entry->data); + IWM_DPRINTF(phy_db->sc, IWM_DEBUG_RESET, + "%s(%d): [PHYDB]SET: Type %d , Size: %d\n", + __func__, __LINE__, type, size); return 0; } static int -iwm_is_valid_channel(uint16_t ch_id) +is_valid_channel(uint16_t ch_id) { if (ch_id <= 14 || (36 <= ch_id && ch_id <= 64 && ch_id % 4 == 0) || @@ -237,10 +384,10 @@ iwm_is_valid_channel(uint16_t ch_id) } static uint8_t -iwm_ch_id_to_ch_index(uint16_t ch_id) +ch_id_to_ch_index(uint16_t ch_id) { - if (!iwm_is_valid_channel(ch_id)) - return 0xff; + if (!is_valid_channel(ch_id)) + return 0xff; if (ch_id <= 14) return ch_id - 1; @@ -253,9 +400,9 @@ iwm_ch_id_to_ch_index(uint16_t ch_id) static uint16_t -iwm_channel_id_to_papd(uint16_t ch_id) +channel_id_to_papd(uint16_t ch_id) { - if (!iwm_is_valid_channel(ch_id)) + if (!is_valid_channel(ch_id)) return 0xff; if (1 <= ch_id && ch_id <= 14) @@ -268,17 +415,15 @@ iwm_channel_id_to_papd(uint16_t ch_id) } static uint16_t -iwm_channel_id_to_txp(struct iwm_softc *sc, uint16_t ch_id) +channel_id_to_txp(struct iwm_phy_db *phy_db, uint16_t ch_id) { - struct iwm_phy_db *phy_db = &sc->sc_phy_db; struct iwm_phy_db_chg_txp *txp_chg; int i; - uint8_t ch_index = iwm_ch_id_to_ch_index(ch_id); - + uint8_t ch_index = ch_id_to_ch_index(ch_id); if (ch_index == 0xff) return 0xff; - for (i = 0; i < IWM_NUM_TXP_CH_GROUPS; i++) { + for (i = 0; i < phy_db->n_group_txp; i++) { txp_chg = (void *)phy_db->calib_ch_group_txp[i].data; if (!txp_chg) return 0xff; @@ -293,71 +438,79 @@ iwm_channel_id_to_txp(struct iwm_softc * } static int -iwm_phy_db_get_section_data(struct iwm_softc *sc, - uint32_t type, uint8_t **data, uint16_t *size, uint16_t ch_id) +iwm_phy_db_get_section_data(struct iwm_phy_db *phy_db, + uint32_t type, uint8_t **data, uint16_t *size, + uint16_t ch_id) { struct iwm_phy_db_entry *entry; uint16_t ch_group_id = 0; - IWM_DPRINTF(sc, IWM_DEBUG_RESET, "->%s\n", __func__); + if (!phy_db) + return EINVAL; + /* find wanted channel group */ if (type == IWM_PHY_DB_CALIB_CHG_PAPD) - ch_group_id = iwm_channel_id_to_papd(ch_id); + ch_group_id = channel_id_to_papd(ch_id); else if (type == IWM_PHY_DB_CALIB_CHG_TXP) - ch_group_id = iwm_channel_id_to_txp(sc, ch_id); + ch_group_id = channel_id_to_txp(phy_db, ch_id); - entry = iwm_phy_db_get_section(sc, type, ch_group_id); + entry = iwm_phy_db_get_section(phy_db, type, ch_group_id); if (!entry) return EINVAL; *data = entry->data; *size = entry->size; - IWM_DPRINTF(sc, IWM_DEBUG_RESET, - "%s(%d): [PHYDB] GET: Type %d , Size: %d\n", - __func__, __LINE__, type, *size); + IWM_DPRINTF(phy_db->sc, IWM_DEBUG_RESET, + "%s(%d): [PHYDB] GET: Type %d , Size: %d\n", + __func__, __LINE__, type, *size); return 0; } static int -iwm_send_phy_db_cmd(struct iwm_softc *sc, uint16_t type, - uint16_t length, void *data) +iwm_send_phy_db_cmd(struct iwm_phy_db *phy_db, uint16_t type, + uint16_t length, void *data) { struct iwm_phy_db_cmd phy_db_cmd; struct iwm_host_cmd cmd = { - .id = IWM_PHY_DB_CMD, - .flags = IWM_CMD_SYNC, + .id = PHY_DB_CMD, }; - IWM_DPRINTF(sc, IWM_DEBUG_CMD, - "Sending PHY-DB hcmd of type %d, of length %d\n", - type, length); + IWM_DPRINTF(phy_db->sc, IWM_DEBUG_RESET, + "Sending PHY-DB hcmd of type %d, of length %d\n", + type, length); /* Set phy db cmd variables */ - phy_db_cmd.type = le16toh(type); - phy_db_cmd.length = le16toh(length); + phy_db_cmd.type = htole16(type); + phy_db_cmd.length = htole16(length); /* Set hcmd variables */ cmd.data[0] = &phy_db_cmd; cmd.len[0] = sizeof(struct iwm_phy_db_cmd); cmd.data[1] = data; cmd.len[1] = length; +#ifdef notyet + cmd.dataflags[1] = IWM_HCMD_DFL_NOCOPY; +#endif - return iwm_send_cmd(sc, &cmd); + return iwm_send_cmd(phy_db->sc, &cmd); } static int -iwm_phy_db_send_all_channel_groups(struct iwm_softc *sc, - enum iwm_phy_db_section_type type, uint8_t max_ch_groups) +iwm_phy_db_send_all_channel_groups(struct iwm_phy_db *phy_db, + enum iwm_phy_db_section_type type, + uint8_t max_ch_groups) { uint16_t i; int err; struct iwm_phy_db_entry *entry; - /* Send all the channel-specific groups to operational fw */ + /* Send all the channel specific groups to operational fw */ for (i = 0; i < max_ch_groups; i++) { - entry = iwm_phy_db_get_section(sc, type, i); + entry = iwm_phy_db_get_section(phy_db, + type, + i); if (!entry) return EINVAL; @@ -365,16 +518,18 @@ iwm_phy_db_send_all_channel_groups(struc continue; /* Send the requested PHY DB section */ - err = iwm_send_phy_db_cmd(sc, type, entry->size, entry->data); + err = iwm_send_phy_db_cmd(phy_db, + type, + entry->size, + entry->data); if (err) { - IWM_DPRINTF(sc, IWM_DEBUG_CMD, - "%s: Can't SEND phy_db section %d (%d), " - "err %d\n", __func__, type, i, err); + device_printf(phy_db->sc->sc_dev, + "Can't SEND phy_db section %d (%d), err %d\n", + type, i, err); return err; } - DELAY(1000); - IWM_DPRINTF(sc, IWM_DEBUG_CMD, + IWM_DPRINTF(phy_db->sc, IWM_DEBUG_CMD, "Sent PHY_DB HCMD, type = %d num = %d\n", type, i); } @@ -382,102 +537,73 @@ iwm_phy_db_send_all_channel_groups(struc } int -iwm_send_phy_db_data(struct iwm_softc *sc) +iwm_send_phy_db_data(struct iwm_phy_db *phy_db) { uint8_t *data = NULL; uint16_t size = 0; int err; - IWM_DPRINTF(sc, IWM_DEBUG_CMD | IWM_DEBUG_RESET, + IWM_DPRINTF(phy_db->sc, IWM_DEBUG_CMD | IWM_DEBUG_RESET, "%s: Sending phy db data and configuration to runtime image\n", __func__); /* Send PHY DB CFG section */ - err = iwm_phy_db_get_section_data(sc, IWM_PHY_DB_CFG, &data, &size, 0); + err = iwm_phy_db_get_section_data(phy_db, IWM_PHY_DB_CFG, + &data, &size, 0); if (err) { - IWM_DPRINTF(sc, IWM_DEBUG_CMD | IWM_DEBUG_RESET, + device_printf(phy_db->sc->sc_dev, "%s: Cannot get Phy DB cfg section, %d\n", __func__, err); return err; } - err = iwm_send_phy_db_cmd(sc, IWM_PHY_DB_CFG, size, data); + err = iwm_send_phy_db_cmd(phy_db, IWM_PHY_DB_CFG, size, data); if (err) { - IWM_DPRINTF(sc, IWM_DEBUG_CMD | IWM_DEBUG_RESET, + device_printf(phy_db->sc->sc_dev, "%s: Cannot send HCMD of Phy DB cfg section, %d\n", __func__, err); return err; } - err = iwm_phy_db_get_section_data(sc, IWM_PHY_DB_CALIB_NCH, + err = iwm_phy_db_get_section_data(phy_db, IWM_PHY_DB_CALIB_NCH, &data, &size, 0); if (err) { - IWM_DPRINTF(sc, IWM_DEBUG_CMD | IWM_DEBUG_RESET, + device_printf(phy_db->sc->sc_dev, "%s: Cannot get Phy DB non specific channel section, " "%d\n", __func__, err); return err; } - err = iwm_send_phy_db_cmd(sc, IWM_PHY_DB_CALIB_NCH, size, data); + err = iwm_send_phy_db_cmd(phy_db, IWM_PHY_DB_CALIB_NCH, size, data); if (err) { - IWM_DPRINTF(sc, IWM_DEBUG_CMD | IWM_DEBUG_RESET, + device_printf(phy_db->sc->sc_dev, "%s: Cannot send HCMD of Phy DB non specific channel " "sect, %d\n", __func__, err); return err; } /* Send all the TXP channel specific data */ - err = iwm_phy_db_send_all_channel_groups(sc, - IWM_PHY_DB_CALIB_CHG_PAPD, IWM_NUM_PAPD_CH_GROUPS); + err = iwm_phy_db_send_all_channel_groups(phy_db, + IWM_PHY_DB_CALIB_CHG_PAPD, phy_db->n_group_papd); if (err) { - IWM_DPRINTF(sc, IWM_DEBUG_CMD | IWM_DEBUG_RESET, + device_printf(phy_db->sc->sc_dev, "%s: Cannot send channel specific PAPD groups, %d\n", __func__, err); return err; } /* Send all the TXP channel specific data */ - err = iwm_phy_db_send_all_channel_groups(sc, - IWM_PHY_DB_CALIB_CHG_TXP, IWM_NUM_TXP_CH_GROUPS); + err = iwm_phy_db_send_all_channel_groups(phy_db, + IWM_PHY_DB_CALIB_CHG_TXP, phy_db->n_group_txp); if (err) { - IWM_DPRINTF(sc, IWM_DEBUG_CMD | IWM_DEBUG_RESET, + device_printf(phy_db->sc->sc_dev, "%s: Cannot send channel specific TX power groups, " "%d\n", __func__, err); return err; } - IWM_DPRINTF(sc, IWM_DEBUG_CMD | IWM_DEBUG_RESET, + IWM_DPRINTF(phy_db->sc, IWM_DEBUG_CMD | IWM_DEBUG_RESET, "%s: Finished sending phy db non channel data\n", __func__); return 0; } - -static void -iwm_phy_db_free_section(struct iwm_softc *sc, - enum iwm_phy_db_section_type type, uint16_t chg_id) -{ - struct iwm_phy_db_entry *entry = - iwm_phy_db_get_section(sc, type, chg_id); - if (!entry) - return; - - if (entry->data != NULL) - free(entry->data, M_DEVBUF); - entry->data = NULL; - entry->size = 0; -} - -void -iwm_phy_db_free(struct iwm_softc *sc) -{ - int i; - - iwm_phy_db_free_section(sc, IWM_PHY_DB_CFG, 0); - iwm_phy_db_free_section(sc, IWM_PHY_DB_CALIB_NCH, 0); - - for (i = 0; i < IWM_NUM_PAPD_CH_GROUPS; i++) - iwm_phy_db_free_section(sc, IWM_PHY_DB_CALIB_CHG_PAPD, i); - - for (i = 0; i < IWM_NUM_TXP_CH_GROUPS; i++) - iwm_phy_db_free_section(sc, IWM_PHY_DB_CALIB_CHG_TXP, i); -} Modified: head/sys/dev/iwm/if_iwm_phy_db.h ============================================================================== --- head/sys/dev/iwm/if_iwm_phy_db.h Mon Feb 6 02:01:22 2017 (r313308) +++ head/sys/dev/iwm/if_iwm_phy_db.h Mon Feb 6 02:14:34 2017 (r313309) @@ -106,8 +106,12 @@ #ifndef __IF_IWM_PHY_DB_H__ #define __IF_IWM_PHY_DB_H__ -extern int iwm_phy_db_set_section(struct iwm_softc *sc, +struct iwm_calib_res_notif_phy_db; + +extern struct iwm_phy_db *iwm_phy_db_init(struct iwm_softc *sc); +extern void iwm_phy_db_free(struct iwm_phy_db *phy_db); +extern int iwm_phy_db_set_section(struct iwm_phy_db *phy_db, struct iwm_calib_res_notif_phy_db *phy_db_notif); -extern int iwm_send_phy_db_data(struct iwm_softc *sc); -extern void iwm_phy_db_free(struct iwm_softc *sc); +extern int iwm_send_phy_db_data(struct iwm_phy_db *phy_db); + #endif /* __IF_IWM_PHY_DB_H__ */ Modified: head/sys/dev/iwm/if_iwmreg.h ============================================================================== --- head/sys/dev/iwm/if_iwmreg.h Mon Feb 6 02:01:22 2017 (r313308) +++ head/sys/dev/iwm/if_iwmreg.h Mon Feb 6 02:14:34 2017 (r313309) @@ -2013,45 +2013,6 @@ struct iwm_phy_cfg_cmd { #define IWM_PHY_CFG_RX_CHAIN_B (1 << 13) #define IWM_PHY_CFG_RX_CHAIN_C (1 << 14) -/* - * PHY db - */ - -enum iwm_phy_db_section_type { - IWM_PHY_DB_CFG = 1, - IWM_PHY_DB_CALIB_NCH, - IWM_PHY_DB_UNUSED, - IWM_PHY_DB_CALIB_CHG_PAPD, - IWM_PHY_DB_CALIB_CHG_TXP, - IWM_PHY_DB_MAX -}; - -#define IWM_PHY_DB_CMD 0x6c /* TEMP API - The actual is 0x8c */ - -/* - * phy db - configure operational ucode - */ -struct iwm_phy_db_cmd { - uint16_t type; - uint16_t length; - uint8_t data[]; -} __packed; - -/* for parsing of tx power channel group data that comes from the firmware */ -struct iwm_phy_db_chg_txp { - uint32_t space; - uint16_t max_channel_idx; -} __packed; - -/* - * phy db - Receive phy db chunk after calibrations - */ -struct iwm_calib_res_notif_phy_db { - uint16_t type; - uint16_t length; - uint8_t data[]; -} __packed; - /* Target of the IWM_NVM_ACCESS_CMD */ enum { Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 02:01:22 2017 (r313308) +++ head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 02:14:34 2017 (r313309) @@ -314,25 +314,6 @@ enum iwm_hcmd_dataflag { IWM_HCMD_DFL_DUP = (1 << 1), }; -/* - * iwlwifi/iwl-phy-db - */ - -#define IWM_NUM_PAPD_CH_GROUPS 9 -#define IWM_NUM_TXP_CH_GROUPS 9 - -struct iwm_phy_db_entry { - uint16_t size; - uint8_t *data; -}; - -struct iwm_phy_db { - struct iwm_phy_db_entry cfg; - struct iwm_phy_db_entry calib_nch; - struct iwm_phy_db_entry calib_ch_group_papd[IWM_NUM_PAPD_CH_GROUPS]; - struct iwm_phy_db_entry calib_ch_group_txp[IWM_NUM_TXP_CH_GROUPS]; -}; - struct iwm_int_sta { uint32_t sta_id; uint32_t tfd_queue_msk; @@ -474,7 +455,7 @@ struct iwm_softc { struct iwm_tlv_calib_ctrl sc_default_calib[IWM_UCODE_TYPE_MAX]; struct iwm_nvm_data sc_nvm; - struct iwm_phy_db sc_phy_db; + struct iwm_phy_db *sc_phy_db; struct iwm_bf_data sc_bf; From owner-svn-src-head@freebsd.org Mon Feb 6 02:20: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 F3707CD1214; Mon, 6 Feb 2017 02:20:06 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B32F264E; Mon, 6 Feb 2017 02:20:06 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v162K5MJ006185; Mon, 6 Feb 2017 02:20:05 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v162K5JH006183; Mon, 6 Feb 2017 02:20:05 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702060220.v162K5JH006183@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 6 Feb 2017 02:20:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313310 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 02:20:07 -0000 Author: adrian Date: Mon Feb 6 02:20:05 2017 New Revision: 313310 URL: https://svnweb.freebsd.org/changeset/base/313310 Log: [iwm] make sure we call iwm_detach_local() only once. Obtained from: DragonflyBSD git ebd4ceab76a6f161362029cbfd08efaedaab0519 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Mon Feb 6 02:14:34 2017 (r313309) +++ head/sys/dev/iwm/if_iwm.c Mon Feb 6 02:20:05 2017 (r313310) @@ -5766,6 +5766,7 @@ iwm_attach(device_t dev) int txq_i, i; sc->sc_dev = dev; + sc->sc_attached = 1; IWM_LOCK_INIT(sc); mbufq_init(&sc->sc_snd, ifqmaxlen); callout_init_mtx(&sc->sc_watchdog_to, &sc->sc_mtx, 0); @@ -6218,6 +6219,10 @@ iwm_detach_local(struct iwm_softc *sc, i device_t dev = sc->sc_dev; int i; + if (!sc->sc_attached) + return 0; + sc->sc_attached = 0; + if (do_net80211) ieee80211_draintask(&sc->sc_ic, &sc->sc_es_task); Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 02:14:34 2017 (r313309) +++ head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 02:20:05 2017 (r313310) @@ -369,6 +369,7 @@ struct iwm_node { struct iwm_softc { device_t sc_dev; uint32_t sc_debug; + int sc_attached; struct mtx sc_mtx; struct mbufq sc_snd; From owner-svn-src-head@freebsd.org Mon Feb 6 03:06: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 2D5D3CD1E0E; Mon, 6 Feb 2017 03:06:13 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F0CE91CC5; Mon, 6 Feb 2017 03:06:12 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1636C9H026953; Mon, 6 Feb 2017 03:06:12 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1636BCg026948; Mon, 6 Feb 2017 03:06:11 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702060306.v1636BCg026948@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 6 Feb 2017 03:06:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313311 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 03:06:13 -0000 Author: adrian Date: Mon Feb 6 03:06:11 2017 New Revision: 313311 URL: https://svnweb.freebsd.org/changeset/base/313311 Log: [iwm] Sync nvm parsing code with Linux iwlwifi. * sc->sc_nvm becomes sc->nvm_data and is now a pointer instead of an inlined struct. * Add sc->eeprom_size and sc->nvm_hw_section_num configuration values to struct iwm_softc. * For now continue to avoid negative error return-values, and use pointer variables for some return values, as before. * Continue to omit LAR (location aware regulatory) related code as well. Tested: * Intel 7260, STA mode (2GHz) Obtained from: dragonflybsd commit 39f8331b1a6f295291e08c377da12a8e7a5436c0 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_scan.c head/sys/dev/iwm/if_iwm_util.c head/sys/dev/iwm/if_iwmreg.h head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Mon Feb 6 02:20:05 2017 (r313310) +++ head/sys/dev/iwm/if_iwm.c Mon Feb 6 03:06:11 2017 (r313311) @@ -260,20 +260,23 @@ static int iwm_post_alive(struct iwm_sof static int iwm_nvm_read_chunk(struct iwm_softc *, uint16_t, uint16_t, uint16_t, uint8_t *, uint16_t *); static int iwm_nvm_read_section(struct iwm_softc *, uint16_t, uint8_t *, - uint16_t *, size_t); + uint16_t *, uint32_t); static uint32_t iwm_eeprom_channel_flags(uint16_t); static void iwm_add_channel_band(struct iwm_softc *, struct ieee80211_channel[], int, int *, int, size_t, const uint8_t[]); static void iwm_init_channel_map(struct ieee80211com *, int, int *, struct ieee80211_channel[]); -static int iwm_parse_nvm_data(struct iwm_softc *, const uint16_t *, - const uint16_t *, const uint16_t *, - const uint16_t *, const uint16_t *, - const uint16_t *); -static void iwm_set_hw_address_8000(struct iwm_softc *, - struct iwm_nvm_data *, - const uint16_t *, const uint16_t *); +static struct iwm_nvm_data * + iwm_parse_nvm_data(struct iwm_softc *, const uint16_t *, + const uint16_t *, const uint16_t *, + const uint16_t *, const uint16_t *, + const uint16_t *); +static void iwm_free_nvm_data(struct iwm_nvm_data *); +static void iwm_set_hw_address_family_8000(struct iwm_softc *, + struct iwm_nvm_data *, + const uint16_t *, + const uint16_t *); static int iwm_get_sku(const struct iwm_softc *, const uint16_t *, const uint16_t *); static int iwm_get_nvm_version(const struct iwm_softc *, const uint16_t *); @@ -283,8 +286,8 @@ static int iwm_get_n_hw_addrs(const stru const uint16_t *); static void iwm_set_radio_cfg(const struct iwm_softc *, struct iwm_nvm_data *, uint32_t); -static int iwm_parse_nvm_sections(struct iwm_softc *, - struct iwm_nvm_section *); +static struct iwm_nvm_data * + iwm_parse_nvm_sections(struct iwm_softc *, struct iwm_nvm_section *); static int iwm_nvm_init(struct iwm_softc *); static int iwm_firmware_load_sect(struct iwm_softc *, uint32_t, const uint8_t *, uint32_t); @@ -1646,21 +1649,11 @@ iwm_post_alive(struct iwm_softc *sc) * iwlwifi/mvm/nvm.c */ -/* list of NVM sections we are allowed/need to read */ -const int nvm_to_read[] = { - IWM_NVM_SECTION_TYPE_HW, - IWM_NVM_SECTION_TYPE_SW, - IWM_NVM_SECTION_TYPE_REGULATORY, - IWM_NVM_SECTION_TYPE_CALIBRATION, - IWM_NVM_SECTION_TYPE_PRODUCTION, - IWM_NVM_SECTION_TYPE_HW_8000, - IWM_NVM_SECTION_TYPE_MAC_OVERRIDE, - IWM_NVM_SECTION_TYPE_PHY_SKU, -}; +#define IWM_NVM_HW_SECTION_NUM_FAMILY_7000 0 +#define IWM_NVM_HW_SECTION_NUM_FAMILY_8000 10 /* Default NVM size to read */ #define IWM_NVM_DEFAULT_CHUNK_SIZE (2*1024) -#define IWM_MAX_NVM_SECTION_SIZE 8192 #define IWM_NVM_WRITE_OPCODE 1 #define IWM_NVM_READ_OPCODE 0 @@ -1675,7 +1668,6 @@ static int iwm_nvm_read_chunk(struct iwm_softc *sc, uint16_t section, uint16_t offset, uint16_t length, uint8_t *data, uint16_t *len) { - offset = 0; struct iwm_nvm_access_cmd nvm_access_cmd = { .offset = htole16(offset), .length = htole16(length), @@ -1702,17 +1694,9 @@ iwm_nvm_read_chunk(struct iwm_softc *sc, } pkt = cmd.resp_pkt; - if (pkt->hdr.flags & IWM_CMD_FAILED_MSK) { - device_printf(sc->sc_dev, - "Bad return from IWM_NVM_ACCES_COMMAND (0x%08X)\n", - pkt->hdr.flags); - ret = EIO; - goto exit; - } /* Extract NVM response */ nvm_resp = (void *)pkt->data; - ret = le16toh(nvm_resp->status); bytes_read = le16toh(nvm_resp->length); offset_read = le16toh(nvm_resp->offset); @@ -1758,6 +1742,7 @@ iwm_nvm_read_chunk(struct iwm_softc *sc, goto exit; } + /* Write data to NVM */ memcpy(data + offset, resp_data, bytes_read); *len = bytes_read; @@ -1778,34 +1763,40 @@ iwm_nvm_read_chunk(struct iwm_softc *sc, */ static int iwm_nvm_read_section(struct iwm_softc *sc, - uint16_t section, uint8_t *data, uint16_t *len, size_t max_len) + uint16_t section, uint8_t *data, uint16_t *len, uint32_t size_read) { - uint16_t chunklen, seglen; - int error = 0; + uint16_t seglen, length, offset = 0; + int ret; - IWM_DPRINTF(sc, IWM_DEBUG_RESET, - "reading NVM section %d\n", section); + /* Set nvm section read length */ + length = IWM_NVM_DEFAULT_CHUNK_SIZE; - chunklen = seglen = IWM_NVM_DEFAULT_CHUNK_SIZE; - *len = 0; + seglen = length; - /* Read NVM chunks until exhausted (reading less than requested) */ - while (seglen == chunklen && *len < max_len) { - error = iwm_nvm_read_chunk(sc, - section, *len, chunklen, data, &seglen); - if (error) { - IWM_DPRINTF(sc, IWM_DEBUG_RESET, - "Cannot read from NVM section " - "%d at offset %d\n", section, *len); - return error; + /* Read the NVM until exhausted (reading less than requested) */ + while (seglen == length) { + /* Check no memory assumptions fail and cause an overflow */ + if ((size_read + offset + length) > + sc->eeprom_size) { + device_printf(sc->sc_dev, + "EEPROM size is too small for NVM\n"); + return ENOBUFS; } - *len += seglen; + + ret = iwm_nvm_read_chunk(sc, section, offset, length, data, &seglen); + if (ret) { + IWM_DPRINTF(sc, IWM_DEBUG_EEPROM | IWM_DEBUG_RESET, + "Cannot read NVM from section %d offset %d, length %d\n", + section, offset, length); + return ret; + } + offset += seglen; } - IWM_DPRINTF(sc, IWM_DEBUG_RESET, - "NVM section %d read completed (%d bytes, error=%d)\n", - section, *len, error); - return error; + IWM_DPRINTF(sc, IWM_DEBUG_EEPROM | IWM_DEBUG_RESET, + "NVM section %d read completed\n", section); + *len = offset; + return 0; } /* @@ -1889,7 +1880,7 @@ enum nvm_sku_bits { * @IWM_NVM_CHANNEL_IBSS: usable as an IBSS channel * @IWM_NVM_CHANNEL_ACTIVE: active scanning allowed * @IWM_NVM_CHANNEL_RADAR: radar detection required - * XXX cannot find this (DFS) flag in iwl-nvm-parse.c + * XXX cannot find this (DFS) flag in iwm-nvm-parse.c * @IWM_NVM_CHANNEL_DFS: dynamic freq selection candidate * @IWM_NVM_CHANNEL_WIDE: 20 MHz channel okay (?) * @IWM_NVM_CHANNEL_40MHZ: 40 MHz channel okay (?) @@ -1908,6 +1899,10 @@ enum iwm_nvm_channel_flags { IWM_NVM_CHANNEL_160MHZ = (1 << 11), }; +/* lower blocks contain EEPROM image and calibration data */ +#define IWM_OTP_LOW_IMAGE_SIZE_FAMILY_7000 (16 * 512 * sizeof(uint16_t)) /* 16 KB */ +#define IWM_OTP_LOW_IMAGE_SIZE_FAMILY_8000 (32 * 512 * sizeof(uint16_t)) /* 32 KB */ + /* * Translate EEPROM flags to net80211. */ @@ -1935,7 +1930,7 @@ iwm_add_channel_band(struct iwm_softc *s int maxchans, int *nchans, int ch_idx, size_t ch_num, const uint8_t bands[]) { - const uint16_t * const nvm_ch_flags = sc->sc_nvm.nvm_ch_flags; + const uint16_t * const nvm_ch_flags = sc->nvm_data->nvm_ch_flags; uint32_t nflags; uint16_t ch_flags; uint8_t ieee; @@ -1976,7 +1971,7 @@ iwm_init_channel_map(struct ieee80211com struct ieee80211_channel chans[]) { struct iwm_softc *sc = ic->ic_softc; - struct iwm_nvm_data *data = &sc->sc_nvm; + struct iwm_nvm_data *data = sc->nvm_data; uint8_t bands[IEEE80211_MODE_BYTES]; size_t ch_num; @@ -2005,7 +2000,7 @@ iwm_init_channel_map(struct ieee80211com } static void -iwm_set_hw_address_8000(struct iwm_softc *sc, struct iwm_nvm_data *data, +iwm_set_hw_address_family_8000(struct iwm_softc *sc, struct iwm_nvm_data *data, const uint16_t *mac_override, const uint16_t *nvm_hw) { const uint8_t *hw_addr; @@ -2128,15 +2123,57 @@ iwm_set_radio_cfg(const struct iwm_softc } static int +iwm_set_hw_address(struct iwm_softc *sc, struct iwm_nvm_data *data, + const uint16_t *nvm_hw, const uint16_t *mac_override) +{ +#ifdef notyet /* for FAMILY 9000 */ + if (cfg->mac_addr_from_csr) { + iwm_set_hw_address_from_csr(sc, data); + } else +#endif + if (sc->sc_device_family != IWM_DEVICE_FAMILY_8000) { + const uint8_t *hw_addr = (const uint8_t *)(nvm_hw + IWM_HW_ADDR); + + /* The byte order is little endian 16 bit, meaning 214365 */ + data->hw_addr[0] = hw_addr[1]; + data->hw_addr[1] = hw_addr[0]; + data->hw_addr[2] = hw_addr[3]; + data->hw_addr[3] = hw_addr[2]; + data->hw_addr[4] = hw_addr[5]; + data->hw_addr[5] = hw_addr[4]; + } else { + iwm_set_hw_address_family_8000(sc, data, mac_override, nvm_hw); + } + + if (!iwm_is_valid_ether_addr(data->hw_addr)) { + device_printf(sc->sc_dev, "no valid mac address was found\n"); + return EINVAL; + } + + return 0; +} + +static struct iwm_nvm_data * iwm_parse_nvm_data(struct iwm_softc *sc, const uint16_t *nvm_hw, const uint16_t *nvm_sw, const uint16_t *nvm_calib, const uint16_t *mac_override, const uint16_t *phy_sku, const uint16_t *regulatory) { - struct iwm_nvm_data *data = &sc->sc_nvm; - uint8_t hw_addr[IEEE80211_ADDR_LEN]; + struct iwm_nvm_data *data; uint32_t sku, radio_cfg; + if (sc->sc_device_family != IWM_DEVICE_FAMILY_8000) { + data = malloc(sizeof(*data) + + IWM_NUM_CHANNELS * sizeof(uint16_t), + M_DEVBUF, M_NOWAIT | M_ZERO); + } else { + data = malloc(sizeof(*data) + + IWM_NUM_CHANNELS_8000 * sizeof(uint16_t), + M_DEVBUF, M_NOWAIT | M_ZERO); + } + if (!data) + return NULL; + data->nvm_version = iwm_get_nvm_version(sc, nvm_sw); radio_cfg = iwm_get_radio_cfg(sc, nvm_sw, phy_sku); @@ -2149,17 +2186,10 @@ iwm_parse_nvm_data(struct iwm_softc *sc, data->n_hw_addrs = iwm_get_n_hw_addrs(sc, nvm_sw); - /* The byte order is little endian 16 bit, meaning 214365 */ - if (sc->sc_device_family == IWM_DEVICE_FAMILY_7000) { - IEEE80211_ADDR_COPY(hw_addr, nvm_hw + IWM_HW_ADDR); - data->hw_addr[0] = hw_addr[1]; - data->hw_addr[1] = hw_addr[0]; - data->hw_addr[2] = hw_addr[3]; - data->hw_addr[3] = hw_addr[2]; - data->hw_addr[4] = hw_addr[5]; - data->hw_addr[5] = hw_addr[4]; - } else { - iwm_set_hw_address_8000(sc, data, mac_override, nvm_hw); + /* If no valid mac address was found - bail out */ + if (iwm_set_hw_address(sc, data, nvm_hw, mac_override)) { + free(data, M_DEVBUF); + return NULL; } if (sc->sc_device_family == IWM_DEVICE_FAMILY_7000) { @@ -2170,14 +2200,17 @@ iwm_parse_nvm_data(struct iwm_softc *sc, IWM_NUM_CHANNELS_8000 * sizeof(uint16_t)); } - return 0; + return data; } -/* - * END NVM PARSE - */ +static void +iwm_free_nvm_data(struct iwm_nvm_data *data) +{ + if (data != NULL) + free(data, M_DEVBUF); +} -static int +static struct iwm_nvm_data * iwm_parse_nvm_sections(struct iwm_softc *sc, struct iwm_nvm_section *sections) { const uint16_t *hw, *sw, *calib, *regulatory, *mac_override, *phy_sku; @@ -2185,42 +2218,38 @@ iwm_parse_nvm_sections(struct iwm_softc /* Checking for required sections */ if (sc->sc_device_family == IWM_DEVICE_FAMILY_7000) { if (!sections[IWM_NVM_SECTION_TYPE_SW].data || - !sections[IWM_NVM_SECTION_TYPE_HW].data) { + !sections[sc->nvm_hw_section_num].data) { device_printf(sc->sc_dev, "Can't parse empty OTP/NVM sections\n"); - return ENOENT; + return NULL; } - - hw = (const uint16_t *) sections[IWM_NVM_SECTION_TYPE_HW].data; } else if (sc->sc_device_family == IWM_DEVICE_FAMILY_8000) { /* SW and REGULATORY sections are mandatory */ if (!sections[IWM_NVM_SECTION_TYPE_SW].data || !sections[IWM_NVM_SECTION_TYPE_REGULATORY].data) { device_printf(sc->sc_dev, "Can't parse empty OTP/NVM sections\n"); - return ENOENT; + return NULL; } /* MAC_OVERRIDE or at least HW section must exist */ - if (!sections[IWM_NVM_SECTION_TYPE_HW_8000].data && + if (!sections[sc->nvm_hw_section_num].data && !sections[IWM_NVM_SECTION_TYPE_MAC_OVERRIDE].data) { device_printf(sc->sc_dev, "Can't parse mac_address, empty sections\n"); - return ENOENT; + return NULL; } /* PHY_SKU section is mandatory in B0 */ if (!sections[IWM_NVM_SECTION_TYPE_PHY_SKU].data) { device_printf(sc->sc_dev, "Can't parse phy_sku in B0, empty sections\n"); - return ENOENT; + return NULL; } - - hw = (const uint16_t *) - sections[IWM_NVM_SECTION_TYPE_HW_8000].data; } else { panic("unknown device family %d\n", sc->sc_device_family); } + hw = (const uint16_t *) sections[sc->nvm_hw_section_num].data; sw = (const uint16_t *)sections[IWM_NVM_SECTION_TYPE_SW].data; calib = (const uint16_t *) sections[IWM_NVM_SECTION_TYPE_CALIBRATION].data; @@ -2237,46 +2266,57 @@ iwm_parse_nvm_sections(struct iwm_softc static int iwm_nvm_init(struct iwm_softc *sc) { - struct iwm_nvm_section nvm_sections[IWM_NVM_NUM_OF_SECTIONS]; - int i, section, error; + struct iwm_nvm_section nvm_sections[IWM_NVM_MAX_NUM_SECTIONS]; + int i, ret, section; + uint32_t size_read = 0; + uint8_t *nvm_buffer, *temp; uint16_t len; - uint8_t *buf; - const size_t bufsz = IWM_MAX_NVM_SECTION_SIZE; - memset(nvm_sections, 0 , sizeof(nvm_sections)); + memset(nvm_sections, 0, sizeof(nvm_sections)); - buf = malloc(bufsz, M_DEVBUF, M_NOWAIT); - if (buf == NULL) - return ENOMEM; + if (sc->nvm_hw_section_num >= IWM_NVM_MAX_NUM_SECTIONS) + return EINVAL; - for (i = 0; i < nitems(nvm_to_read); i++) { - section = nvm_to_read[i]; - KASSERT(section <= nitems(nvm_sections), - ("too many sections")); + /* load NVM values from nic */ + /* Read From FW NVM */ + IWM_DPRINTF(sc, IWM_DEBUG_EEPROM, "Read from NVM\n"); - error = iwm_nvm_read_section(sc, section, buf, &len, bufsz); - if (error) { - error = 0; + nvm_buffer = malloc(sc->eeprom_size, M_DEVBUF, M_NOWAIT | M_ZERO); + if (!nvm_buffer) + return ENOMEM; + for (section = 0; section < IWM_NVM_MAX_NUM_SECTIONS; section++) { + /* we override the constness for initial read */ + ret = iwm_nvm_read_section(sc, section, nvm_buffer, + &len, size_read); + if (ret) continue; - } - nvm_sections[section].data = malloc(len, M_DEVBUF, M_NOWAIT); - if (nvm_sections[section].data == NULL) { - error = ENOMEM; + size_read += len; + temp = malloc(len, M_DEVBUF, M_NOWAIT); + if (!temp) { + ret = ENOMEM; break; } - memcpy(nvm_sections[section].data, buf, len); + memcpy(temp, nvm_buffer, len); + + nvm_sections[section].data = temp; nvm_sections[section].length = len; } - free(buf, M_DEVBUF); - if (error == 0) - error = iwm_parse_nvm_sections(sc, nvm_sections); + if (!size_read) + device_printf(sc->sc_dev, "OTP is blank\n"); + free(nvm_buffer, M_DEVBUF); - for (i = 0; i < IWM_NVM_NUM_OF_SECTIONS; i++) { + sc->nvm_data = iwm_parse_nvm_sections(sc, nvm_sections); + if (!sc->nvm_data) + return EINVAL; + IWM_DPRINTF(sc, IWM_DEBUG_EEPROM | IWM_DEBUG_RESET, + "nvm version = %x\n", sc->nvm_data->nvm_version); + + for (i = 0; i < IWM_NVM_MAX_NUM_SECTIONS; i++) { if (nvm_sections[i].data != NULL) free(nvm_sections[i].data, M_DEVBUF); } - return error; + return 0; } /* @@ -2673,7 +2713,7 @@ iwm_run_init_mvm_ucode(struct iwm_softc device_printf(sc->sc_dev, "failed to read nvm\n"); return error; } - IEEE80211_ADDR_COPY(sc->sc_ic.ic_macaddr, sc->sc_nvm.hw_addr); + IEEE80211_ADDR_COPY(sc->sc_ic.ic_macaddr, sc->nvm_data->hw_addr); return 0; } @@ -2694,7 +2734,7 @@ iwm_run_init_mvm_ucode(struct iwm_softc __func__, ((sc->sc_fw_phy_config & IWM_FW_PHY_CFG_TX_CHAIN) >> IWM_FW_PHY_CFG_TX_CHAIN_POS), - sc->sc_nvm.valid_tx_ant, + sc->nvm_data->valid_tx_ant, iwm_fw_valid_tx_ant(sc)); @@ -5648,6 +5688,8 @@ iwm_dev_check(device_t dev) case PCI_PRODUCT_INTEL_WL_3160_2: sc->sc_fwname = "iwm3160fw"; sc->host_interrupt_operation_mode = 1; + sc->eeprom_size = IWM_OTP_LOW_IMAGE_SIZE_FAMILY_7000; + sc->nvm_hw_section_num = IWM_NVM_HW_SECTION_NUM_FAMILY_7000; sc->sc_device_family = IWM_DEVICE_FAMILY_7000; sc->sc_fwdmasegsz = IWM_FWDMASEGSZ; return (0); @@ -5655,6 +5697,8 @@ iwm_dev_check(device_t dev) case PCI_PRODUCT_INTEL_WL_3165_2: sc->sc_fwname = "iwm7265fw"; sc->host_interrupt_operation_mode = 0; + sc->eeprom_size = IWM_OTP_LOW_IMAGE_SIZE_FAMILY_7000; + sc->nvm_hw_section_num = IWM_NVM_HW_SECTION_NUM_FAMILY_7000; sc->sc_device_family = IWM_DEVICE_FAMILY_7000; sc->sc_fwdmasegsz = IWM_FWDMASEGSZ; return (0); @@ -5662,6 +5706,8 @@ iwm_dev_check(device_t dev) case PCI_PRODUCT_INTEL_WL_7260_2: sc->sc_fwname = "iwm7260fw"; sc->host_interrupt_operation_mode = 1; + sc->eeprom_size = IWM_OTP_LOW_IMAGE_SIZE_FAMILY_7000; + sc->nvm_hw_section_num = IWM_NVM_HW_SECTION_NUM_FAMILY_7000; sc->sc_device_family = IWM_DEVICE_FAMILY_7000; sc->sc_fwdmasegsz = IWM_FWDMASEGSZ; return (0); @@ -5669,6 +5715,8 @@ iwm_dev_check(device_t dev) case PCI_PRODUCT_INTEL_WL_7265_2: sc->sc_fwname = "iwm7265fw"; sc->host_interrupt_operation_mode = 0; + sc->eeprom_size = IWM_OTP_LOW_IMAGE_SIZE_FAMILY_7000; + sc->nvm_hw_section_num = IWM_NVM_HW_SECTION_NUM_FAMILY_7000; sc->sc_device_family = IWM_DEVICE_FAMILY_7000; sc->sc_fwdmasegsz = IWM_FWDMASEGSZ; return (0); @@ -5676,6 +5724,8 @@ iwm_dev_check(device_t dev) case PCI_PRODUCT_INTEL_WL_8260_2: sc->sc_fwname = "iwm8000Cfw"; sc->host_interrupt_operation_mode = 0; + sc->eeprom_size = IWM_OTP_LOW_IMAGE_SIZE_FAMILY_8000; + sc->nvm_hw_section_num = IWM_NVM_HW_SECTION_NUM_FAMILY_8000; sc->sc_device_family = IWM_DEVICE_FAMILY_8000; sc->sc_fwdmasegsz = IWM_FWDMASEGSZ_8000; return (0); @@ -5993,10 +6043,10 @@ iwm_preinit(void *arg) device_printf(dev, "hw rev 0x%x, fw ver %s, address %s\n", sc->sc_hw_rev & IWM_CSR_HW_REV_TYPE_MSK, - sc->sc_fwver, ether_sprintf(sc->sc_nvm.hw_addr)); + sc->sc_fwver, ether_sprintf(sc->nvm_data->hw_addr)); /* not all hardware can do 5GHz band */ - if (!sc->sc_nvm.sku_cap_band_52GHz_enable) + if (!sc->nvm_data->sku_cap_band_52GHz_enable) memset(&ic->ic_sup_rates[IEEE80211_MODE_11A], 0, sizeof(ic->ic_sup_rates[IEEE80211_MODE_11A])); IWM_UNLOCK(sc); @@ -6236,6 +6286,8 @@ iwm_detach_local(struct iwm_softc *sc, i iwm_phy_db_free(sc->sc_phy_db); sc->sc_phy_db = NULL; + iwm_free_nvm_data(sc->nvm_data); + /* Free descriptor rings */ iwm_free_rx_ring(sc, &sc->rxq); for (i = 0; i < nitems(sc->txq); i++) Modified: head/sys/dev/iwm/if_iwm_scan.c ============================================================================== --- head/sys/dev/iwm/if_iwm_scan.c Mon Feb 6 02:20:05 2017 (r313310) +++ head/sys/dev/iwm/if_iwm_scan.c Mon Feb 6 03:06:11 2017 (r313311) @@ -407,7 +407,7 @@ iwm_mvm_fill_probe_req(struct iwm_softc remain -= 3; } - if (sc->sc_nvm.sku_cap_band_52GHz_enable) { + if (sc->nvm_data->sku_cap_band_52GHz_enable) { /* Fill in 5GHz IEs. */ rs = &ic->ic_sup_rates[IEEE80211_MODE_11A]; if (rs->rs_nrates > IEEE80211_RATE_SIZE) { @@ -674,7 +674,7 @@ iwm_mvm_lmac_scan(struct iwm_softc *sc) req->scan_flags |= htole32(IWM_MVM_LMAC_SCAN_FLAGS_RRM_ENABLED); req->flags = htole32(IWM_PHY_BAND_24); - if (sc->sc_nvm.sku_cap_band_52GHz_enable) + if (sc->nvm_data->sku_cap_band_52GHz_enable) req->flags |= htole32(IWM_PHY_BAND_5); req->filter_flags = htole32(IWM_MAC_FILTER_ACCEPT_GRP | IWM_MAC_FILTER_IN_BEACON); Modified: head/sys/dev/iwm/if_iwm_util.c ============================================================================== --- head/sys/dev/iwm/if_iwm_util.c Mon Feb 6 02:20:05 2017 (r313310) +++ head/sys/dev/iwm/if_iwm_util.c Mon Feb 6 03:06:11 2017 (r313311) @@ -437,8 +437,8 @@ iwm_fw_valid_tx_ant(struct iwm_softc *sc tx_ant = ((sc->sc_fw_phy_config & IWM_FW_PHY_CFG_TX_CHAIN) >> IWM_FW_PHY_CFG_TX_CHAIN_POS); - if (sc->sc_nvm.valid_tx_ant) - tx_ant &= sc->sc_nvm.valid_tx_ant; + if (sc->nvm_data->valid_tx_ant) + tx_ant &= sc->nvm_data->valid_tx_ant; return tx_ant; } @@ -451,8 +451,8 @@ iwm_fw_valid_rx_ant(struct iwm_softc *sc rx_ant = ((sc->sc_fw_phy_config & IWM_FW_PHY_CFG_RX_CHAIN) >> IWM_FW_PHY_CFG_RX_CHAIN_POS); - if (sc->sc_nvm.valid_rx_ant) - rx_ant &= sc->sc_nvm.valid_rx_ant; + if (sc->nvm_data->valid_rx_ant) + rx_ant &= sc->nvm_data->valid_rx_ant; return rx_ant; } Modified: head/sys/dev/iwm/if_iwmreg.h ============================================================================== --- head/sys/dev/iwm/if_iwmreg.h Mon Feb 6 02:20:05 2017 (r313310) +++ head/sys/dev/iwm/if_iwmreg.h Mon Feb 6 03:06:11 2017 (r313311) @@ -2023,18 +2023,13 @@ enum { /* Section types for IWM_NVM_ACCESS_CMD */ enum { - IWM_NVM_SECTION_TYPE_HW = 0, - IWM_NVM_SECTION_TYPE_SW, - IWM_NVM_SECTION_TYPE_PAPD, - IWM_NVM_SECTION_TYPE_REGULATORY, - IWM_NVM_SECTION_TYPE_CALIBRATION, - IWM_NVM_SECTION_TYPE_PRODUCTION, - IWM_NVM_SECTION_TYPE_POST_FCS_CALIB, - /* 7, 8, 9 unknown */ - IWM_NVM_SECTION_TYPE_HW_8000 = 10, - IWM_NVM_SECTION_TYPE_MAC_OVERRIDE, - IWM_NVM_SECTION_TYPE_PHY_SKU, - IWM_NVM_NUM_OF_SECTIONS, + IWM_NVM_SECTION_TYPE_SW = 1, + IWM_NVM_SECTION_TYPE_REGULATORY = 3, + IWM_NVM_SECTION_TYPE_CALIBRATION = 4, + IWM_NVM_SECTION_TYPE_PRODUCTION = 5, + IWM_NVM_SECTION_TYPE_MAC_OVERRIDE = 11, + IWM_NVM_SECTION_TYPE_PHY_SKU = 12, + IWM_NVM_MAX_NUM_SECTIONS = 13, }; /** Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 02:20:05 2017 (r313310) +++ head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 03:06:11 2017 (r313311) @@ -192,10 +192,10 @@ struct iwm_nvm_data { #define IWM_NUM_CHANNELS 39 #define IWM_NUM_CHANNELS_8000 51 - uint16_t nvm_ch_flags[IWM_NUM_CHANNELS_8000]; - uint16_t nvm_version; uint8_t max_tx_pwr_half_dbm; + + uint16_t nvm_ch_flags[]; }; /* max bufs per tfd the driver will use */ @@ -291,10 +291,6 @@ struct iwm_ucode_status { #define IWM_CMD_RESP_MAX PAGE_SIZE -/* lower blocks contain EEPROM image and calibration data */ -#define IWM_OTP_LOW_IMAGE_SIZE_FAMILY_7000 16384 -#define IWM_OTP_LOW_IMAGE_SIZE_FAMILY_8000 32768 - #define IWM_MVM_TE_SESSION_PROTECTION_MAX_TIME_MS 500 #define IWM_MVM_TE_SESSION_PROTECTION_MIN_TIME_MS 400 @@ -455,7 +451,7 @@ struct iwm_softc { int sc_fw_phy_config; struct iwm_tlv_calib_ctrl sc_default_calib[IWM_UCODE_TYPE_MAX]; - struct iwm_nvm_data sc_nvm; + struct iwm_nvm_data *nvm_data; struct iwm_phy_db *sc_phy_db; struct iwm_bf_data sc_bf; @@ -493,6 +489,9 @@ struct iwm_softc { struct iwm_tx_radiotap_header sc_txtap; int sc_max_rssi; + + uint16_t eeprom_size; + uint8_t nvm_hw_section_num; }; #define IWM_LOCK_INIT(_sc) \ From owner-svn-src-head@freebsd.org Mon Feb 6 03:29: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 B99EECD2223; Mon, 6 Feb 2017 03:29:51 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C0B6A66; Mon, 6 Feb 2017 03:29:51 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v163Tojo034754; Mon, 6 Feb 2017 03:29:50 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v163TofP034751; Mon, 6 Feb 2017 03:29:50 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702060329.v163TofP034751@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 6 Feb 2017 03:29:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313312 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 03:29:51 -0000 Author: adrian Date: Mon Feb 6 03:29:50 2017 New Revision: 313312 URL: https://svnweb.freebsd.org/changeset/base/313312 Log: [iwm] Use chipset configuration structs like iwlwifi does. * This makes it a bit easier to factor out common parts for e.g. the 7000 chipset family. * Add iwm7265d config, and recognize the 7265D chipset variant via the hardware revision. Tested: * 7260, STA mode (2ghz) Obtained from: Dragonflybsd commit cc8d6ccf5583fd45964f3bde9b057ee4f834c0e0 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_pcie_trans.c head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Mon Feb 6 03:06:11 2017 (r313311) +++ head/sys/dev/iwm/if_iwm.c Mon Feb 6 03:29:50 2017 (r313312) @@ -165,6 +165,67 @@ __FBSDID("$FreeBSD$"); #include #include +#define IWM_NVM_HW_SECTION_NUM_FAMILY_7000 0 +#define IWM_NVM_HW_SECTION_NUM_FAMILY_8000 10 + +/* lower blocks contain EEPROM image and calibration data */ +#define IWM_OTP_LOW_IMAGE_SIZE_FAMILY_7000 (16 * 512 * sizeof(uint16_t)) /* 16 KB */ +#define IWM_OTP_LOW_IMAGE_SIZE_FAMILY_8000 (32 * 512 * sizeof(uint16_t)) /* 32 KB */ + +#define IWM7260_FW "iwm7260fw" +#define IWM3160_FW "iwm3160fw" +#define IWM7265_FW "iwm7265fw" +#define IWM7265D_FW "iwm7265Dfw" +#define IWM8000_FW "iwm8000Cfw" + +#define IWM_DEVICE_7000_COMMON \ + .device_family = IWM_DEVICE_FAMILY_7000, \ + .eeprom_size = IWM_OTP_LOW_IMAGE_SIZE_FAMILY_7000, \ + .nvm_hw_section_num = IWM_NVM_HW_SECTION_NUM_FAMILY_7000 + +const struct iwm_cfg iwm7260_cfg = { + .fw_name = IWM7260_FW, + IWM_DEVICE_7000_COMMON, + .host_interrupt_operation_mode = 1, +}; + +const struct iwm_cfg iwm3160_cfg = { + .fw_name = IWM3160_FW, + IWM_DEVICE_7000_COMMON, + .host_interrupt_operation_mode = 1, +}; + +const struct iwm_cfg iwm3165_cfg = { + /* XXX IWM7265D_FW doesn't seem to work properly yet */ + .fw_name = IWM7265_FW, + IWM_DEVICE_7000_COMMON, + .host_interrupt_operation_mode = 0, +}; + +const struct iwm_cfg iwm7265_cfg = { + .fw_name = IWM7265_FW, + IWM_DEVICE_7000_COMMON, + .host_interrupt_operation_mode = 0, +}; + +const struct iwm_cfg iwm7265d_cfg = { + /* XXX IWM7265D_FW doesn't seem to work properly yet */ + .fw_name = IWM7265_FW, + IWM_DEVICE_7000_COMMON, + .host_interrupt_operation_mode = 0, +}; + +#define IWM_DEVICE_8000_COMMON \ + .device_family = IWM_DEVICE_FAMILY_8000, \ + .eeprom_size = IWM_OTP_LOW_IMAGE_SIZE_FAMILY_8000, \ + .nvm_hw_section_num = IWM_NVM_HW_SECTION_NUM_FAMILY_8000 + +const struct iwm_cfg iwm8260_cfg = { + .fw_name = IWM8000_FW, + IWM_DEVICE_8000_COMMON, + .host_interrupt_operation_mode = 0, +}; + const uint8_t iwm_nvm_channels[] = { /* 2.4 GHz */ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, @@ -512,12 +573,12 @@ iwm_read_firmware(struct iwm_softc *sc, * fw_fp will be set. */ IWM_UNLOCK(sc); - fwp = firmware_get(sc->sc_fwname); + fwp = firmware_get(sc->cfg->fw_name); IWM_LOCK(sc); if (fwp == NULL) { device_printf(sc->sc_dev, "could not read firmware %s (error %d)\n", - sc->sc_fwname, error); + sc->cfg->fw_name, error); goto out; } fw->fw_fp = fwp; @@ -536,7 +597,7 @@ iwm_read_firmware(struct iwm_softc *sc, if (*(const uint32_t *)fw->fw_fp->data != 0 || le32toh(uhdr->magic) != IWM_TLV_UCODE_MAGIC) { device_printf(sc->sc_dev, "invalid firmware %s\n", - sc->sc_fwname); + sc->cfg->fw_name); error = EINVAL; goto out; } @@ -1370,7 +1431,7 @@ iwm_mvm_nic_config(struct iwm_softc *sc) * (PCIe power is lost before PERST# is asserted), causing ME FW * to lose ownership and not being able to obtain it back. */ - if (sc->sc_device_family == IWM_DEVICE_FAMILY_7000) { + if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000) { iwm_set_bits_mask_prph(sc, IWM_APMG_PS_CTRL_REG, IWM_APMG_PS_CTRL_EARLY_PWR_OFF_RESET_DIS, ~IWM_APMG_PS_CTRL_EARLY_PWR_OFF_RESET_DIS); @@ -1416,7 +1477,7 @@ iwm_nic_rx_init(struct iwm_softc *sc) IWM_WRITE_1(sc, IWM_CSR_INT_COALESCING, IWM_HOST_INT_TIMEOUT_DEF); /* W/A for interrupt coalescing bug in 7260 and 3160 */ - if (sc->host_interrupt_operation_mode) + if (sc->cfg->host_interrupt_operation_mode) IWM_SETBITS(sc, IWM_CSR_INT_COALESCING, IWM_HOST_INT_OPER_MODE); /* @@ -1473,7 +1534,7 @@ iwm_nic_init(struct iwm_softc *sc) int error; iwm_apm_init(sc); - if (sc->sc_device_family == IWM_DEVICE_FAMILY_7000) + if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000) iwm_set_pwr(sc); iwm_mvm_nic_config(sc); @@ -1633,7 +1694,7 @@ iwm_post_alive(struct iwm_softc *sc) IWM_FH_TX_CHICKEN_BITS_SCD_AUTO_RETRY_EN); /* Enable L1-Active */ - if (sc->sc_device_family != IWM_DEVICE_FAMILY_8000) { + if (sc->cfg->device_family != IWM_DEVICE_FAMILY_8000) { iwm_clear_bits_prph(sc, IWM_APMG_PCIDEV_STT_REG, IWM_APMG_PCIDEV_STT_VAL_L1_ACT_DIS); } @@ -1649,9 +1710,6 @@ iwm_post_alive(struct iwm_softc *sc) * iwlwifi/mvm/nvm.c */ -#define IWM_NVM_HW_SECTION_NUM_FAMILY_7000 0 -#define IWM_NVM_HW_SECTION_NUM_FAMILY_8000 10 - /* Default NVM size to read */ #define IWM_NVM_DEFAULT_CHUNK_SIZE (2*1024) @@ -1777,7 +1835,7 @@ iwm_nvm_read_section(struct iwm_softc *s while (seglen == length) { /* Check no memory assumptions fail and cause an overflow */ if ((size_read + offset + length) > - sc->eeprom_size) { + sc->cfg->eeprom_size) { device_printf(sc->sc_dev, "EEPROM size is too small for NVM\n"); return ENOBUFS; @@ -1899,10 +1957,6 @@ enum iwm_nvm_channel_flags { IWM_NVM_CHANNEL_160MHZ = (1 << 11), }; -/* lower blocks contain EEPROM image and calibration data */ -#define IWM_OTP_LOW_IMAGE_SIZE_FAMILY_7000 (16 * 512 * sizeof(uint16_t)) /* 16 KB */ -#define IWM_OTP_LOW_IMAGE_SIZE_FAMILY_8000 (32 * 512 * sizeof(uint16_t)) /* 32 KB */ - /* * Translate EEPROM flags to net80211. */ @@ -1938,7 +1992,7 @@ iwm_add_channel_band(struct iwm_softc *s for (; ch_idx < ch_num; ch_idx++) { ch_flags = le16_to_cpup(nvm_ch_flags + ch_idx); - if (sc->sc_device_family == IWM_DEVICE_FAMILY_7000) + if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000) ieee = iwm_nvm_channels[ch_idx]; else ieee = iwm_nvm_channels_8000[ch_idx]; @@ -1988,7 +2042,7 @@ iwm_init_channel_map(struct ieee80211com IWM_NUM_2GHZ_CHANNELS - 1, IWM_NUM_2GHZ_CHANNELS, bands); if (data->sku_cap_band_52GHz_enable) { - if (sc->sc_device_family == IWM_DEVICE_FAMILY_7000) + if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000) ch_num = nitems(iwm_nvm_channels); else ch_num = nitems(iwm_nvm_channels_8000); @@ -2062,7 +2116,7 @@ static int iwm_get_sku(const struct iwm_softc *sc, const uint16_t *nvm_sw, const uint16_t *phy_sku) { - if (sc->sc_device_family != IWM_DEVICE_FAMILY_8000) + if (sc->cfg->device_family != IWM_DEVICE_FAMILY_8000) return le16_to_cpup(nvm_sw + IWM_SKU); return le32_to_cpup((const uint32_t *)(phy_sku + IWM_SKU_8000)); @@ -2071,7 +2125,7 @@ iwm_get_sku(const struct iwm_softc *sc, static int iwm_get_nvm_version(const struct iwm_softc *sc, const uint16_t *nvm_sw) { - if (sc->sc_device_family != IWM_DEVICE_FAMILY_8000) + if (sc->cfg->device_family != IWM_DEVICE_FAMILY_8000) return le16_to_cpup(nvm_sw + IWM_NVM_VERSION); else return le32_to_cpup((const uint32_t *)(nvm_sw + @@ -2082,7 +2136,7 @@ static int iwm_get_radio_cfg(const struct iwm_softc *sc, const uint16_t *nvm_sw, const uint16_t *phy_sku) { - if (sc->sc_device_family != IWM_DEVICE_FAMILY_8000) + if (sc->cfg->device_family != IWM_DEVICE_FAMILY_8000) return le16_to_cpup(nvm_sw + IWM_RADIO_CFG); return le32_to_cpup((const uint32_t *)(phy_sku + IWM_RADIO_CFG_8000)); @@ -2093,7 +2147,7 @@ iwm_get_n_hw_addrs(const struct iwm_soft { int n_hw_addr; - if (sc->sc_device_family != IWM_DEVICE_FAMILY_8000) + if (sc->cfg->device_family != IWM_DEVICE_FAMILY_8000) return le16_to_cpup(nvm_sw + IWM_N_HW_ADDRS); n_hw_addr = le32_to_cpup((const uint32_t *)(nvm_sw + IWM_N_HW_ADDRS_8000)); @@ -2105,7 +2159,7 @@ static void iwm_set_radio_cfg(const struct iwm_softc *sc, struct iwm_nvm_data *data, uint32_t radio_cfg) { - if (sc->sc_device_family != IWM_DEVICE_FAMILY_8000) { + if (sc->cfg->device_family != IWM_DEVICE_FAMILY_8000) { data->radio_cfg_type = IWM_NVM_RF_CFG_TYPE_MSK(radio_cfg); data->radio_cfg_step = IWM_NVM_RF_CFG_STEP_MSK(radio_cfg); data->radio_cfg_dash = IWM_NVM_RF_CFG_DASH_MSK(radio_cfg); @@ -2131,7 +2185,7 @@ iwm_set_hw_address(struct iwm_softc *sc, iwm_set_hw_address_from_csr(sc, data); } else #endif - if (sc->sc_device_family != IWM_DEVICE_FAMILY_8000) { + if (sc->cfg->device_family != IWM_DEVICE_FAMILY_8000) { const uint8_t *hw_addr = (const uint8_t *)(nvm_hw + IWM_HW_ADDR); /* The byte order is little endian 16 bit, meaning 214365 */ @@ -2162,7 +2216,7 @@ iwm_parse_nvm_data(struct iwm_softc *sc, struct iwm_nvm_data *data; uint32_t sku, radio_cfg; - if (sc->sc_device_family != IWM_DEVICE_FAMILY_8000) { + if (sc->cfg->device_family != IWM_DEVICE_FAMILY_8000) { data = malloc(sizeof(*data) + IWM_NUM_CHANNELS * sizeof(uint16_t), M_DEVBUF, M_NOWAIT | M_ZERO); @@ -2192,7 +2246,7 @@ iwm_parse_nvm_data(struct iwm_softc *sc, return NULL; } - if (sc->sc_device_family == IWM_DEVICE_FAMILY_7000) { + if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000) { memcpy(data->nvm_ch_flags, &nvm_sw[IWM_NVM_CHANNELS], IWM_NUM_CHANNELS * sizeof(uint16_t)); } else { @@ -2216,14 +2270,14 @@ iwm_parse_nvm_sections(struct iwm_softc const uint16_t *hw, *sw, *calib, *regulatory, *mac_override, *phy_sku; /* Checking for required sections */ - if (sc->sc_device_family == IWM_DEVICE_FAMILY_7000) { + if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000) { if (!sections[IWM_NVM_SECTION_TYPE_SW].data || - !sections[sc->nvm_hw_section_num].data) { + !sections[sc->cfg->nvm_hw_section_num].data) { device_printf(sc->sc_dev, "Can't parse empty OTP/NVM sections\n"); return NULL; } - } else if (sc->sc_device_family == IWM_DEVICE_FAMILY_8000) { + } else if (sc->cfg->device_family == IWM_DEVICE_FAMILY_8000) { /* SW and REGULATORY sections are mandatory */ if (!sections[IWM_NVM_SECTION_TYPE_SW].data || !sections[IWM_NVM_SECTION_TYPE_REGULATORY].data) { @@ -2232,7 +2286,7 @@ iwm_parse_nvm_sections(struct iwm_softc return NULL; } /* MAC_OVERRIDE or at least HW section must exist */ - if (!sections[sc->nvm_hw_section_num].data && + if (!sections[sc->cfg->nvm_hw_section_num].data && !sections[IWM_NVM_SECTION_TYPE_MAC_OVERRIDE].data) { device_printf(sc->sc_dev, "Can't parse mac_address, empty sections\n"); @@ -2246,10 +2300,10 @@ iwm_parse_nvm_sections(struct iwm_softc return NULL; } } else { - panic("unknown device family %d\n", sc->sc_device_family); + panic("unknown device family %d\n", sc->cfg->device_family); } - hw = (const uint16_t *) sections[sc->nvm_hw_section_num].data; + hw = (const uint16_t *) sections[sc->cfg->nvm_hw_section_num].data; sw = (const uint16_t *)sections[IWM_NVM_SECTION_TYPE_SW].data; calib = (const uint16_t *) sections[IWM_NVM_SECTION_TYPE_CALIBRATION].data; @@ -2274,14 +2328,14 @@ iwm_nvm_init(struct iwm_softc *sc) memset(nvm_sections, 0, sizeof(nvm_sections)); - if (sc->nvm_hw_section_num >= IWM_NVM_MAX_NUM_SECTIONS) + if (sc->cfg->nvm_hw_section_num >= IWM_NVM_MAX_NUM_SECTIONS) return EINVAL; /* load NVM values from nic */ /* Read From FW NVM */ IWM_DPRINTF(sc, IWM_DEBUG_EEPROM, "Read from NVM\n"); - nvm_buffer = malloc(sc->eeprom_size, M_DEVBUF, M_NOWAIT | M_ZERO); + nvm_buffer = malloc(sc->cfg->eeprom_size, M_DEVBUF, M_NOWAIT | M_ZERO); if (!nvm_buffer) return ENOMEM; for (section = 0; section < IWM_NVM_MAX_NUM_SECTIONS; section++) { @@ -2562,7 +2616,7 @@ iwm_load_firmware(struct iwm_softc *sc, { int error, w; - if (sc->sc_device_family == IWM_DEVICE_FAMILY_8000) + if (sc->cfg->device_family == IWM_DEVICE_FAMILY_8000) error = iwm_load_firmware_8000(sc, ucode_type); else error = iwm_load_firmware_7000(sc, ucode_type); @@ -2575,7 +2629,7 @@ iwm_load_firmware(struct iwm_softc *sc, } if (error || !sc->sc_uc.uc_ok) { device_printf(sc->sc_dev, "could not load firmware\n"); - if (sc->sc_device_family == IWM_DEVICE_FAMILY_8000) { + if (sc->cfg->device_family == IWM_DEVICE_FAMILY_8000) { device_printf(sc->sc_dev, "cpu1 status: 0x%x\n", iwm_read_prph(sc, IWM_SB_CPU_1_STATUS)); device_printf(sc->sc_dev, "cpu2 status: 0x%x\n", @@ -4498,7 +4552,7 @@ iwm_mvm_sf_config(struct iwm_softc *sc, }; int ret = 0; - if (sc->sc_device_family == IWM_DEVICE_FAMILY_8000) + if (sc->cfg->device_family == IWM_DEVICE_FAMILY_8000) sf_cmd.state |= htole32(IWM_SF_CFG_DUMMY_NOTIF_OFF); switch (new_state) { @@ -4686,7 +4740,7 @@ iwm_init_hw(struct iwm_softc *sc) } /* Initialize tx backoffs to the minimum. */ - if (sc->sc_device_family == IWM_DEVICE_FAMILY_7000) + if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000) iwm_mvm_tt_tx_backoff(sc, 0); error = iwm_mvm_power_update_device(sc); @@ -5682,51 +5736,30 @@ iwm_dev_check(device_t dev) sc = device_get_softc(dev); - sc->sc_hw_rev = IWM_READ(sc, IWM_CSR_HW_REV); switch (pci_get_device(dev)) { case PCI_PRODUCT_INTEL_WL_3160_1: case PCI_PRODUCT_INTEL_WL_3160_2: - sc->sc_fwname = "iwm3160fw"; - sc->host_interrupt_operation_mode = 1; - sc->eeprom_size = IWM_OTP_LOW_IMAGE_SIZE_FAMILY_7000; - sc->nvm_hw_section_num = IWM_NVM_HW_SECTION_NUM_FAMILY_7000; - sc->sc_device_family = IWM_DEVICE_FAMILY_7000; + sc->cfg = &iwm3160_cfg; sc->sc_fwdmasegsz = IWM_FWDMASEGSZ; return (0); case PCI_PRODUCT_INTEL_WL_3165_1: case PCI_PRODUCT_INTEL_WL_3165_2: - sc->sc_fwname = "iwm7265fw"; - sc->host_interrupt_operation_mode = 0; - sc->eeprom_size = IWM_OTP_LOW_IMAGE_SIZE_FAMILY_7000; - sc->nvm_hw_section_num = IWM_NVM_HW_SECTION_NUM_FAMILY_7000; - sc->sc_device_family = IWM_DEVICE_FAMILY_7000; + sc->cfg = &iwm3165_cfg; sc->sc_fwdmasegsz = IWM_FWDMASEGSZ; return (0); case PCI_PRODUCT_INTEL_WL_7260_1: case PCI_PRODUCT_INTEL_WL_7260_2: - sc->sc_fwname = "iwm7260fw"; - sc->host_interrupt_operation_mode = 1; - sc->eeprom_size = IWM_OTP_LOW_IMAGE_SIZE_FAMILY_7000; - sc->nvm_hw_section_num = IWM_NVM_HW_SECTION_NUM_FAMILY_7000; - sc->sc_device_family = IWM_DEVICE_FAMILY_7000; + sc->cfg = &iwm7260_cfg; sc->sc_fwdmasegsz = IWM_FWDMASEGSZ; return (0); case PCI_PRODUCT_INTEL_WL_7265_1: case PCI_PRODUCT_INTEL_WL_7265_2: - sc->sc_fwname = "iwm7265fw"; - sc->host_interrupt_operation_mode = 0; - sc->eeprom_size = IWM_OTP_LOW_IMAGE_SIZE_FAMILY_7000; - sc->nvm_hw_section_num = IWM_NVM_HW_SECTION_NUM_FAMILY_7000; - sc->sc_device_family = IWM_DEVICE_FAMILY_7000; + sc->cfg = &iwm7265_cfg; sc->sc_fwdmasegsz = IWM_FWDMASEGSZ; return (0); case PCI_PRODUCT_INTEL_WL_8260_1: case PCI_PRODUCT_INTEL_WL_8260_2: - sc->sc_fwname = "iwm8000Cfw"; - sc->host_interrupt_operation_mode = 0; - sc->eeprom_size = IWM_OTP_LOW_IMAGE_SIZE_FAMILY_8000; - sc->nvm_hw_section_num = IWM_NVM_HW_SECTION_NUM_FAMILY_8000; - sc->sc_device_family = IWM_DEVICE_FAMILY_8000; + sc->cfg = &iwm8260_cfg; sc->sc_fwdmasegsz = IWM_FWDMASEGSZ_8000; return (0); default: @@ -5842,16 +5875,14 @@ iwm_attach(device_t dev) if (error != 0) goto fail; - /* - * We now start fiddling with the hardware - */ + sc->sc_hw_rev = IWM_READ(sc, IWM_CSR_HW_REV); /* * In the 8000 HW family the format of the 4 bytes of CSR_HW_REV have * changed, and now the revision step also includes bit 0-1 (no more * "dash" value). To keep hw_rev backwards compatible - we'll store it * in the old format. */ - if (sc->sc_device_family == IWM_DEVICE_FAMILY_8000) + if (sc->cfg->device_family == IWM_DEVICE_FAMILY_8000) sc->sc_hw_rev = (sc->sc_hw_rev & 0xfff0) | (IWM_CSR_HW_REV_STEP(sc->sc_hw_rev << 2) << 2); @@ -5860,7 +5891,7 @@ iwm_attach(device_t dev) goto fail; } - if (sc->sc_device_family == IWM_DEVICE_FAMILY_8000) { + if (sc->cfg->device_family == IWM_DEVICE_FAMILY_8000) { int ret; uint32_t hw_step; @@ -5898,6 +5929,12 @@ iwm_attach(device_t dev) } } + /* special-case 7265D, it has the same PCI IDs. */ + if (sc->cfg == &iwm7265_cfg && + (sc->sc_hw_rev & IWM_CSR_HW_REV_TYPE_MSK) == IWM_CSR_HW_REV_TYPE_7265D) { + sc->cfg = &iwm7265d_cfg; + } + /* Allocate DMA memory for firmware transfers. */ if ((error = iwm_alloc_fwmem(sc)) != 0) { device_printf(dev, "could not allocate memory for firmware\n"); Modified: head/sys/dev/iwm/if_iwm_pcie_trans.c ============================================================================== --- head/sys/dev/iwm/if_iwm_pcie_trans.c Mon Feb 6 03:06:11 2017 (r313311) +++ head/sys/dev/iwm/if_iwm_pcie_trans.c Mon Feb 6 03:29:50 2017 (r313312) @@ -256,7 +256,7 @@ iwm_nic_lock(struct iwm_softc *sc) IWM_SETBITS(sc, IWM_CSR_GP_CNTRL, IWM_CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); - if (sc->sc_device_family == IWM_DEVICE_FAMILY_8000) + if (sc->cfg->device_family == IWM_DEVICE_FAMILY_8000) DELAY(2); if (iwm_poll_bit(sc, IWM_CSR_GP_CNTRL, @@ -425,7 +425,7 @@ iwm_apm_init(struct iwm_softc *sc) IWM_DPRINTF(sc, IWM_DEBUG_RESET, "iwm apm start\n"); /* Disable L0S exit timer (platform NMI Work/Around) */ - if (sc->sc_device_family != IWM_DEVICE_FAMILY_8000) { + if (sc->cfg->device_family != IWM_DEVICE_FAMILY_8000) { IWM_SETBITS(sc, IWM_CSR_GIO_CHICKEN_BITS, IWM_CSR_GIO_CHICKEN_BITS_REG_BIT_DIS_L0S_EXIT_TIMER); } @@ -476,7 +476,7 @@ iwm_apm_init(struct iwm_softc *sc) goto out; } - if (sc->host_interrupt_operation_mode) { + if (sc->cfg->host_interrupt_operation_mode) { /* * This is a bit of an abuse - This is needed for 7260 / 3160 * only check host_interrupt_operation_mode even if this is @@ -505,7 +505,7 @@ iwm_apm_init(struct iwm_softc *sc) * do not disable clocks. This preserves any hardware bits already * set by default in "CLK_CTRL_REG" after reset. */ - if (sc->sc_device_family == IWM_DEVICE_FAMILY_7000) { + if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000) { iwm_write_prph(sc, IWM_APMG_CLK_EN_REG, IWM_APMG_CLK_VAL_DMA_CLK_RQT); DELAY(20); Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 03:06:11 2017 (r313311) +++ head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 03:29:50 2017 (r313312) @@ -362,6 +362,27 @@ struct iwm_node { #define IWM_ICT_COUNT (IWM_ICT_SIZE / sizeof (uint32_t)) #define IWM_ICT_PADDR_SHIFT 12 +enum iwm_device_family { + IWM_DEVICE_FAMILY_UNDEFINED, + IWM_DEVICE_FAMILY_7000, + IWM_DEVICE_FAMILY_8000, +}; + +/** + * struct iwm_cfg + * @fw_name: Firmware filename. + * @host_interrupt_operation_mode: device needs host interrupt operation + * mode set + * @nvm_hw_section_num: the ID of the HW NVM section + */ +struct iwm_cfg { + const char *fw_name; + uint16_t eeprom_size; + enum iwm_device_family device_family; + int host_interrupt_operation_mode; + uint8_t nvm_hw_section_num; +}; + struct iwm_softc { device_t sc_dev; uint32_t sc_debug; @@ -411,9 +432,6 @@ struct iwm_softc { int sc_hw_rev; int sc_hw_id; - int sc_device_family; -#define IWM_DEVICE_FAMILY_7000 1 -#define IWM_DEVICE_FAMILY_8000 2 struct iwm_dma_info kw_dma; struct iwm_dma_info fw_dma; @@ -445,12 +463,12 @@ struct iwm_softc { */ int sc_generation; - const char *sc_fwname; bus_size_t sc_fwdmasegsz; struct iwm_fw_info sc_fw; int sc_fw_phy_config; struct iwm_tlv_calib_ctrl sc_default_calib[IWM_UCODE_TYPE_MAX]; + const struct iwm_cfg *cfg; struct iwm_nvm_data *nvm_data; struct iwm_phy_db *sc_phy_db; @@ -481,17 +499,12 @@ struct iwm_softc { struct iwm_notif_statistics sc_stats; int sc_noise; - int host_interrupt_operation_mode; - caddr_t sc_drvbpf; struct iwm_rx_radiotap_header sc_rxtap; struct iwm_tx_radiotap_header sc_txtap; int sc_max_rssi; - - uint16_t eeprom_size; - uint8_t nvm_hw_section_num; }; #define IWM_LOCK_INIT(_sc) \ From owner-svn-src-head@freebsd.org Mon Feb 6 05:03: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 377C2CD263F; Mon, 6 Feb 2017 05:03:43 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 047681C40; Mon, 6 Feb 2017 05:03:42 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1653gds074640; Mon, 6 Feb 2017 05:03:42 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1653fLN074634; Mon, 6 Feb 2017 05:03:41 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702060503.v1653fLN074634@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 6 Feb 2017 05:03:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313314 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 05:03:43 -0000 Author: adrian Date: Mon Feb 6 05:03:41 2017 New Revision: 313314 URL: https://svnweb.freebsd.org/changeset/base/313314 Log: [iwm] Sync valid_tx_ant and valid_rx_ant mask handling with iwlwifi. * This fixes the phy_cfg field sent in the iwm_send_phy_cfg_cmd() command, which wasn't taking into account the valid_rx_ant and valid_tx_ant masks from nvm_data before. Tested: * 7260, STA mode, 2G and 5G Obtained from: DragonflyBSD commit cbb82693c18fd71b4eb86855b82d03995f352d65 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_phy_ctxt.c head/sys/dev/iwm/if_iwm_scan.c head/sys/dev/iwm/if_iwm_util.c head/sys/dev/iwm/if_iwm_util.h head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Mon Feb 6 04:30:18 2017 (r313313) +++ head/sys/dev/iwm/if_iwm.c Mon Feb 6 05:03:41 2017 (r313314) @@ -771,8 +771,14 @@ iwm_read_firmware(struct iwm_softc *sc, (int) tlv_len); goto parse_out; } - sc->sc_fw_phy_config = + sc->sc_fw.phy_config = le32toh(*(const uint32_t *)tlv_data); + sc->sc_fw.valid_tx_ant = (sc->sc_fw.phy_config & + IWM_FW_PHY_CFG_TX_CHAIN) >> + IWM_FW_PHY_CFG_TX_CHAIN_POS; + sc->sc_fw.valid_rx_ant = (sc->sc_fw.phy_config & + IWM_FW_PHY_CFG_RX_CHAIN) >> + IWM_FW_PHY_CFG_RX_CHAIN_POS; break; case IWM_UCODE_TLV_API_CHANGES_SET: { @@ -1401,12 +1407,13 @@ iwm_mvm_nic_config(struct iwm_softc *sc) { uint8_t radio_cfg_type, radio_cfg_step, radio_cfg_dash; uint32_t reg_val = 0; + uint32_t phy_config = iwm_mvm_get_phy_config(sc); - radio_cfg_type = (sc->sc_fw_phy_config & IWM_FW_PHY_CFG_RADIO_TYPE) >> + radio_cfg_type = (phy_config & IWM_FW_PHY_CFG_RADIO_TYPE) >> IWM_FW_PHY_CFG_RADIO_TYPE_POS; - radio_cfg_step = (sc->sc_fw_phy_config & IWM_FW_PHY_CFG_RADIO_STEP) >> + radio_cfg_step = (phy_config & IWM_FW_PHY_CFG_RADIO_STEP) >> IWM_FW_PHY_CFG_RADIO_STEP_POS; - radio_cfg_dash = (sc->sc_fw_phy_config & IWM_FW_PHY_CFG_RADIO_DASH) >> + radio_cfg_dash = (phy_config & IWM_FW_PHY_CFG_RADIO_DASH) >> IWM_FW_PHY_CFG_RADIO_DASH_POS; /* SKU control */ @@ -2696,7 +2703,7 @@ iwm_send_phy_cfg_cmd(struct iwm_softc *s enum iwm_ucode_type ucode_type = sc->sc_uc_current; /* Set parameters */ - phy_cfg_cmd.phy_cfg = htole32(sc->sc_fw_phy_config); + phy_cfg_cmd.phy_cfg = htole32(iwm_mvm_get_phy_config(sc)); phy_cfg_cmd.calib_control.event_trigger = sc->sc_default_calib[ucode_type].event_trigger; phy_cfg_cmd.calib_control.flow_trigger = @@ -2783,6 +2790,7 @@ iwm_run_init_mvm_ucode(struct iwm_softc if (error != 0) return error; +#if 0 IWM_DPRINTF(sc, IWM_DEBUG_RESET, "%s: phy_txant=0x%08x, nvm_valid_tx_ant=0x%02x, valid=0x%02x\n", __func__, @@ -2790,10 +2798,11 @@ iwm_run_init_mvm_ucode(struct iwm_softc >> IWM_FW_PHY_CFG_TX_CHAIN_POS), sc->nvm_data->valid_tx_ant, iwm_fw_valid_tx_ant(sc)); - +#endif /* Send TX valid antennas before triggering calibrations */ - if ((error = iwm_send_tx_ant_cfg(sc, iwm_fw_valid_tx_ant(sc))) != 0) { + error = iwm_send_tx_ant_cfg(sc, iwm_mvm_get_valid_tx_ant(sc)); + if (error != 0) { device_printf(sc->sc_dev, "failed to send antennas before calibration: %d\n", error); return error; @@ -4238,11 +4247,11 @@ iwm_setrates(struct iwm_softc *sc, struc #if 0 if (txant == 0) - txant = iwm_fw_valid_tx_ant(sc); + txant = iwm_mvm_get_valid_tx_ant(sc); nextant = 1<<(ffs(txant)-1); txant &= ~nextant; #else - nextant = iwm_fw_valid_tx_ant(sc); + nextant = iwm_mvm_get_valid_tx_ant(sc); #endif /* * Map the rate id into a rate index into @@ -4708,7 +4717,8 @@ iwm_init_hw(struct iwm_softc *sc) goto error; } - if ((error = iwm_send_tx_ant_cfg(sc, iwm_fw_valid_tx_ant(sc))) != 0) { + error = iwm_send_tx_ant_cfg(sc, iwm_mvm_get_valid_tx_ant(sc)); + if (error != 0) { device_printf(sc->sc_dev, "antenna config failed\n"); goto error; } Modified: head/sys/dev/iwm/if_iwm_phy_ctxt.c ============================================================================== --- head/sys/dev/iwm/if_iwm_phy_ctxt.c Mon Feb 6 04:30:18 2017 (r313313) +++ head/sys/dev/iwm/if_iwm_phy_ctxt.c Mon Feb 6 05:03:41 2017 (r313314) @@ -202,8 +202,8 @@ iwm_mvm_phy_ctxt_cmd_data(struct iwm_sof ieee80211_chan2ieee(ic, chan), chains_static, chains_dynamic, - iwm_fw_valid_rx_ant(sc), - iwm_fw_valid_tx_ant(sc)); + iwm_mvm_get_valid_rx_ant(sc), + iwm_mvm_get_valid_tx_ant(sc)); cmd->ci.band = IEEE80211_IS_CHAN_2GHZ(chan) ? @@ -217,13 +217,13 @@ iwm_mvm_phy_ctxt_cmd_data(struct iwm_sof idle_cnt = chains_static; active_cnt = chains_dynamic; - cmd->rxchain_info = htole32(iwm_fw_valid_rx_ant(sc) << + cmd->rxchain_info = htole32(iwm_mvm_get_valid_rx_ant(sc) << IWM_PHY_RX_CHAIN_VALID_POS); cmd->rxchain_info |= htole32(idle_cnt << IWM_PHY_RX_CHAIN_CNT_POS); cmd->rxchain_info |= htole32(active_cnt << IWM_PHY_RX_CHAIN_MIMO_CNT_POS); - cmd->txchain_info = htole32(iwm_fw_valid_tx_ant(sc)); + cmd->txchain_info = htole32(iwm_mvm_get_valid_tx_ant(sc)); } /* Modified: head/sys/dev/iwm/if_iwm_scan.c ============================================================================== --- head/sys/dev/iwm/if_iwm_scan.c Mon Feb 6 04:30:18 2017 (r313313) +++ head/sys/dev/iwm/if_iwm_scan.c Mon Feb 6 05:03:41 2017 (r313314) @@ -172,7 +172,7 @@ iwm_mvm_scan_rx_chain(struct iwm_softc * uint16_t rx_chain; uint8_t rx_ant; - rx_ant = iwm_fw_valid_rx_ant(sc); + rx_ant = iwm_mvm_get_valid_rx_ant(sc); rx_chain = rx_ant << IWM_PHY_RX_CHAIN_VALID_POS; rx_chain |= rx_ant << IWM_PHY_RX_CHAIN_FORCE_MIMO_SEL_POS; rx_chain |= rx_ant << IWM_PHY_RX_CHAIN_FORCE_SEL_POS; @@ -209,7 +209,7 @@ iwm_mvm_scan_rate_n_flags(struct iwm_sof for (i = 0, ind = sc->sc_scan_last_antenna; i < IWM_RATE_MCS_ANT_NUM; i++) { ind = (ind + 1) % IWM_RATE_MCS_ANT_NUM; - if (iwm_fw_valid_tx_ant(sc) & (1 << ind)) { + if (iwm_mvm_get_valid_tx_ant(sc) & (1 << ind)) { sc->sc_scan_last_antenna = ind; break; } @@ -469,8 +469,8 @@ iwm_mvm_config_umac_scan(struct iwm_soft if (scan_config == NULL) return ENOMEM; - scan_config->tx_chains = htole32(iwm_fw_valid_tx_ant(sc)); - scan_config->rx_chains = htole32(iwm_fw_valid_rx_ant(sc)); + scan_config->tx_chains = htole32(iwm_mvm_get_valid_tx_ant(sc)); + scan_config->rx_chains = htole32(iwm_mvm_get_valid_rx_ant(sc)); scan_config->legacy_rates = htole32(rates | IWM_SCAN_CONFIG_SUPPORTED_RATE(rates)); Modified: head/sys/dev/iwm/if_iwm_util.c ============================================================================== --- head/sys/dev/iwm/if_iwm_util.c Mon Feb 6 04:30:18 2017 (r313313) +++ head/sys/dev/iwm/if_iwm_util.c Mon Feb 6 05:03:41 2017 (r313314) @@ -428,31 +428,3 @@ iwm_free_resp(struct iwm_softc *sc, stru sc->sc_wantresp = -1; wakeup(&sc->sc_wantresp); } - -uint8_t -iwm_fw_valid_tx_ant(struct iwm_softc *sc) -{ - uint8_t tx_ant; - - tx_ant = ((sc->sc_fw_phy_config & IWM_FW_PHY_CFG_TX_CHAIN) - >> IWM_FW_PHY_CFG_TX_CHAIN_POS); - - if (sc->nvm_data->valid_tx_ant) - tx_ant &= sc->nvm_data->valid_tx_ant; - - return tx_ant; -} - -uint8_t -iwm_fw_valid_rx_ant(struct iwm_softc *sc) -{ - uint8_t rx_ant; - - rx_ant = ((sc->sc_fw_phy_config & IWM_FW_PHY_CFG_RX_CHAIN) - >> IWM_FW_PHY_CFG_RX_CHAIN_POS); - - if (sc->nvm_data->valid_rx_ant) - rx_ant &= sc->nvm_data->valid_rx_ant; - - return rx_ant; -} Modified: head/sys/dev/iwm/if_iwm_util.h ============================================================================== --- head/sys/dev/iwm/if_iwm_util.h Mon Feb 6 04:30:18 2017 (r313313) +++ head/sys/dev/iwm/if_iwm_util.h Mon Feb 6 05:03:41 2017 (r313314) @@ -116,7 +116,34 @@ extern int iwm_mvm_send_cmd_pdu_status(s uint16_t len, const void *data, uint32_t *status); extern void iwm_free_resp(struct iwm_softc *sc, struct iwm_host_cmd *hcmd); -extern uint8_t iwm_fw_valid_tx_ant(struct iwm_softc *sc); -extern uint8_t iwm_fw_valid_rx_ant(struct iwm_softc *sc); +static inline uint8_t +iwm_mvm_get_valid_tx_ant(struct iwm_softc *sc) +{ + return sc->nvm_data && sc->nvm_data->valid_tx_ant ? + sc->sc_fw.valid_tx_ant & sc->nvm_data->valid_tx_ant : + sc->sc_fw.valid_tx_ant; +} + +static inline uint8_t +iwm_mvm_get_valid_rx_ant(struct iwm_softc *sc) +{ + return sc->nvm_data && sc->nvm_data->valid_rx_ant ? + sc->sc_fw.valid_rx_ant & sc->nvm_data->valid_rx_ant : + sc->sc_fw.valid_rx_ant; +} + +static inline uint32_t +iwm_mvm_get_phy_config(struct iwm_softc *sc) +{ + uint32_t phy_config = ~(IWM_FW_PHY_CFG_TX_CHAIN | + IWM_FW_PHY_CFG_RX_CHAIN); + uint32_t valid_rx_ant = iwm_mvm_get_valid_rx_ant(sc); + uint32_t valid_tx_ant = iwm_mvm_get_valid_tx_ant(sc); + + phy_config |= valid_tx_ant << IWM_FW_PHY_CFG_TX_CHAIN_POS | + valid_rx_ant << IWM_FW_PHY_CFG_RX_CHAIN_POS; + + return sc->sc_fw.phy_config & phy_config; +} #endif /* __IF_IWM_UTIL_H__ */ Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 04:30:18 2017 (r313313) +++ head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 05:03:41 2017 (r313314) @@ -172,6 +172,10 @@ struct iwm_fw_info { } fw_sect[IWM_UCODE_SECT_MAX]; int fw_count; } fw_sects[IWM_UCODE_TYPE_MAX]; + + uint32_t phy_config; + uint8_t valid_tx_ant; + uint8_t valid_rx_ant; }; struct iwm_nvm_data { @@ -465,7 +469,6 @@ struct iwm_softc { bus_size_t sc_fwdmasegsz; struct iwm_fw_info sc_fw; - int sc_fw_phy_config; struct iwm_tlv_calib_ctrl sc_default_calib[IWM_UCODE_TYPE_MAX]; const struct iwm_cfg *cfg; From owner-svn-src-head@freebsd.org Mon Feb 6 05:07: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 069BACD271B; Mon, 6 Feb 2017 05:07:17 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B907C1DAE; Mon, 6 Feb 2017 05:07:16 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1657FrX074809; Mon, 6 Feb 2017 05:07:15 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1657Fa8074807; Mon, 6 Feb 2017 05:07:15 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702060507.v1657Fa8074807@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 6 Feb 2017 05:07:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313315 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 05:07:17 -0000 Author: adrian Date: Mon Feb 6 05:07:15 2017 New Revision: 313315 URL: https://svnweb.freebsd.org/changeset/base/313315 Log: [iwm] Get rid of some gratuitous constant renaming wrt. Linux iwlwifi. * IWM_UCODE_SECT_MAX -> IWM_UCODE_SECTION_MAX * IWM_UCODE_TYPE_* -> IWM_UCODE_* (except for IWM_UCODE_TYPE_MAX which stays). Obtained from: DragonflyBSD commit ff4d1fc3ed002c9fb362423da6c45d711b65658a Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Mon Feb 6 05:03:41 2017 (r313314) +++ head/sys/dev/iwm/if_iwm.c Mon Feb 6 05:07:15 2017 (r313315) @@ -490,7 +490,7 @@ iwm_firmware_store_section(struct iwm_so return EINVAL; fws = &sc->sc_fw.fw_sects[type]; - if (fws->fw_count >= IWM_UCODE_SECT_MAX) + if (fws->fw_count >= IWM_UCODE_SECTION_MAX) return EINVAL; fwone = &fws->fw_sect[fws->fw_count]; @@ -558,7 +558,7 @@ iwm_read_firmware(struct iwm_softc *sc, size_t len; if (fw->fw_status == IWM_FW_STATUS_DONE && - ucode_type != IWM_UCODE_TYPE_INIT) + ucode_type != IWM_UCODE_INIT) return 0; while (fw->fw_status == IWM_FW_STATUS_INPROGRESS) @@ -716,9 +716,9 @@ iwm_read_firmware(struct iwm_softc *sc, } case IWM_UCODE_TLV_SEC_RT: if ((error = iwm_firmware_store_section(sc, - IWM_UCODE_TYPE_REGULAR, tlv_data, tlv_len)) != 0) { + IWM_UCODE_REGULAR, tlv_data, tlv_len)) != 0) { device_printf(sc->sc_dev, - "%s: IWM_UCODE_TYPE_REGULAR: iwm_firmware_store_section() failed; %d\n", + "%s: IWM_UCODE_REGULAR: iwm_firmware_store_section() failed; %d\n", __func__, error); goto parse_out; @@ -726,9 +726,9 @@ iwm_read_firmware(struct iwm_softc *sc, break; case IWM_UCODE_TLV_SEC_INIT: if ((error = iwm_firmware_store_section(sc, - IWM_UCODE_TYPE_INIT, tlv_data, tlv_len)) != 0) { + IWM_UCODE_INIT, tlv_data, tlv_len)) != 0) { device_printf(sc->sc_dev, - "%s: IWM_UCODE_TYPE_INIT: iwm_firmware_store_section() failed; %d\n", + "%s: IWM_UCODE_INIT: iwm_firmware_store_section() failed; %d\n", __func__, error); goto parse_out; @@ -736,9 +736,9 @@ iwm_read_firmware(struct iwm_softc *sc, break; case IWM_UCODE_TLV_SEC_WOWLAN: if ((error = iwm_firmware_store_section(sc, - IWM_UCODE_TYPE_WOW, tlv_data, tlv_len)) != 0) { + IWM_UCODE_WOWLAN, tlv_data, tlv_len)) != 0) { device_printf(sc->sc_dev, - "%s: IWM_UCODE_TYPE_WOW: iwm_firmware_store_section() failed; %d\n", + "%s: IWM_UCODE_WOWLAN: iwm_firmware_store_section() failed; %d\n", __func__, error); goto parse_out; @@ -829,7 +829,7 @@ iwm_read_firmware(struct iwm_softc *sc, case IWM_UCODE_TLV_SEC_RT_USNIFFER: if ((error = iwm_firmware_store_section(sc, - IWM_UCODE_TYPE_REGULAR_USNIFFER, tlv_data, + IWM_UCODE_REGULAR_USNIFFER, tlv_data, tlv_len)) != 0) goto parse_out; break; @@ -2492,7 +2492,7 @@ iwm_load_cpu_sections_8000(struct iwm_so (*first_ucode_section)++; } - for (i = *first_ucode_section; i < IWM_UCODE_SECT_MAX; i++) { + for (i = *first_ucode_section; i < IWM_UCODE_SECTION_MAX; i++) { last_read_idx = i; data = fws->fw_sect[i].fws_data; dlen = fws->fw_sect[i].fws_len; @@ -2764,7 +2764,7 @@ iwm_run_init_mvm_ucode(struct iwm_softc sc->sc_init_complete = 0; if ((error = iwm_mvm_load_ucode_wait_alive(sc, - IWM_UCODE_TYPE_INIT)) != 0) { + IWM_UCODE_INIT)) != 0) { device_printf(sc->sc_dev, "failed to load init firmware\n"); return error; } @@ -4706,7 +4706,7 @@ iwm_init_hw(struct iwm_softc *sc) } /* omstart, this time with the regular firmware */ - error = iwm_mvm_load_ucode_wait_alive(sc, IWM_UCODE_TYPE_REGULAR); + error = iwm_mvm_load_ucode_wait_alive(sc, IWM_UCODE_REGULAR); if (error) { device_printf(sc->sc_dev, "could not load firmware\n"); goto error; Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 05:03:41 2017 (r313314) +++ head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 05:07:15 2017 (r313315) @@ -137,7 +137,7 @@ struct iwm_tx_radiotap_header { (1 << IEEE80211_RADIOTAP_CHANNEL)) -#define IWM_UCODE_SECT_MAX 16 +#define IWM_UCODE_SECTION_MAX 16 #define IWM_FWDMASEGSZ (192*1024) #define IWM_FWDMASEGSZ_8000 (320*1024) /* sanity check value */ @@ -152,11 +152,21 @@ struct iwm_tx_radiotap_header { #define IWM_FW_STATUS_INPROGRESS 1 #define IWM_FW_STATUS_DONE 2 +/** + * enum iwm_ucode_type + * + * The type of ucode. + * + * @IWM_UCODE_REGULAR: Normal runtime ucode + * @IWM_UCODE_INIT: Initial ucode + * @IWM_UCODE_WOWLAN: Wake on Wireless enabled ucode + * @IWM_UCODE_REGULAR_USNIFFER: Normal runtime ucode when using usniffer image + */ enum iwm_ucode_type { - IWM_UCODE_TYPE_REGULAR, - IWM_UCODE_TYPE_INIT, - IWM_UCODE_TYPE_WOW, - IWM_UCODE_TYPE_REGULAR_USNIFFER, + IWM_UCODE_REGULAR, + IWM_UCODE_INIT, + IWM_UCODE_WOWLAN, + IWM_UCODE_REGULAR_USNIFFER, IWM_UCODE_TYPE_MAX }; @@ -169,7 +179,7 @@ struct iwm_fw_info { const void *fws_data; uint32_t fws_len; uint32_t fws_devoff; - } fw_sect[IWM_UCODE_SECT_MAX]; + } fw_sect[IWM_UCODE_SECTION_MAX]; int fw_count; } fw_sects[IWM_UCODE_TYPE_MAX]; From owner-svn-src-head@freebsd.org Mon Feb 6 05:08: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 25F04CD27A8; Mon, 6 Feb 2017 05:08:23 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 00A991F09; Mon, 6 Feb 2017 05:08:22 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1658MME074891; Mon, 6 Feb 2017 05:08:22 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1658LtK074887; Mon, 6 Feb 2017 05:08:21 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702060508.v1658LtK074887@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 6 Feb 2017 05:08:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313316 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 05:08:23 -0000 Author: adrian Date: Mon Feb 6 05:08:21 2017 New Revision: 313316 URL: https://svnweb.freebsd.org/changeset/base/313316 Log: [iwm] Store paging_mem_size field in firmware image information struct. Obtained from: DragonflyBSD commit a8524cc6c440e5ce9490ba2b0507c99ff6777c6d Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwmreg.h head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Mon Feb 6 05:07:15 2017 (r313315) +++ head/sys/dev/iwm/if_iwm.c Mon Feb 6 05:08:21 2017 (r313316) @@ -554,6 +554,8 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode_tlv_type tlv_type; const struct firmware *fwp; const uint8_t *data; + uint32_t usniffer_img; + uint32_t paging_mem_size; int error = 0; size_t len; @@ -834,6 +836,38 @@ iwm_read_firmware(struct iwm_softc *sc, goto parse_out; break; + case IWM_UCODE_TLV_PAGING: + if (tlv_len != sizeof(uint32_t)) { + error = EINVAL; + goto parse_out; + } + paging_mem_size = le32toh(*(const uint32_t *)tlv_data); + + IWM_DPRINTF(sc, IWM_DEBUG_FIRMWARE_TLV, + "%s: Paging: paging enabled (size = %u bytes)\n", + __func__, paging_mem_size); + if (paging_mem_size > IWM_MAX_PAGING_IMAGE_SIZE) { + device_printf(sc->sc_dev, + "%s: Paging: driver supports up to %u bytes for paging image\n", + __func__, IWM_MAX_PAGING_IMAGE_SIZE); + error = EINVAL; + goto out; + } + if (paging_mem_size & (IWM_FW_PAGING_SIZE - 1)) { + device_printf(sc->sc_dev, + "%s: Paging: image isn't multiple %u\n", + __func__, IWM_FW_PAGING_SIZE); + error = EINVAL; + goto out; + } + + sc->sc_fw.fw_sects[IWM_UCODE_REGULAR].paging_mem_size = + paging_mem_size; + usniffer_img = IWM_UCODE_REGULAR_USNIFFER; + sc->sc_fw.fw_sects[usniffer_img].paging_mem_size = + paging_mem_size; + break; + case IWM_UCODE_TLV_N_SCAN_CHANNELS: if (tlv_len != sizeof(uint32_t)) { error = EINVAL; Modified: head/sys/dev/iwm/if_iwmreg.h ============================================================================== --- head/sys/dev/iwm/if_iwmreg.h Mon Feb 6 05:07:15 2017 (r313315) +++ head/sys/dev/iwm/if_iwmreg.h Mon Feb 6 05:08:21 2017 (r313316) @@ -888,6 +888,28 @@ struct iwm_fw_cipher_scheme { uint8_t hw_cipher; } __packed; +/* + * Block paging calculations + */ +#define IWM_PAGE_2_EXP_SIZE 12 /* 4K == 2^12 */ +#define IWM_FW_PAGING_SIZE (1 << IWM_PAGE_2_EXP_SIZE) /* page size is 4KB */ +#define IWM_PAGE_PER_GROUP_2_EXP_SIZE 3 +/* 8 pages per group */ +#define IWM_NUM_OF_PAGE_PER_GROUP (1 << IWM_PAGE_PER_GROUP_2_EXP_SIZE) +/* don't change, support only 32KB size */ +#define IWM_PAGING_BLOCK_SIZE (IWM_NUM_OF_PAGE_PER_GROUP * IWM_FW_PAGING_SIZE) +/* 32K == 2^15 */ +#define IWM_BLOCK_2_EXP_SIZE (IWM_PAGE_2_EXP_SIZE + IWM_PAGE_PER_GROUP_2_EXP_SIZE) + +/* + * Image paging calculations + */ +#define IWM_BLOCK_PER_IMAGE_2_EXP_SIZE 5 +/* 2^5 == 32 blocks per image */ +#define IWM_NUM_OF_BLOCK_PER_IMAGE (1 << IWM_BLOCK_PER_IMAGE_2_EXP_SIZE) +/* maximum image size 1024KB */ +#define IWM_MAX_PAGING_IMAGE_SIZE (IWM_NUM_OF_BLOCK_PER_IMAGE * IWM_PAGING_BLOCK_SIZE) + /** * struct iwm_fw_cscheme_list - a cipher scheme list * @size: a number of entries Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 05:07:15 2017 (r313315) +++ head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 05:08:21 2017 (r313316) @@ -181,6 +181,7 @@ struct iwm_fw_info { uint32_t fws_devoff; } fw_sect[IWM_UCODE_SECTION_MAX]; int fw_count; + uint32_t paging_mem_size; } fw_sects[IWM_UCODE_TYPE_MAX]; uint32_t phy_config; From owner-svn-src-head@freebsd.org Mon Feb 6 05:09: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 27F71CD281C; Mon, 6 Feb 2017 05:09:44 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D3785B6; Mon, 6 Feb 2017 05:09:43 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1659gC1074977; Mon, 6 Feb 2017 05:09:42 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1659g61074974; Mon, 6 Feb 2017 05:09:42 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702060509.v1659g61074974@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 6 Feb 2017 05:09:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313317 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 05:09:44 -0000 Author: adrian Date: Mon Feb 6 05:09:42 2017 New Revision: 313317 URL: https://svnweb.freebsd.org/changeset/base/313317 Log: [iwm] Change 2nd arg of iwm_phy_db_set_section() to struct iwm_rx_packet. * This matches the function declaration in Linux's iwlwifi. Obtained from: DragonflyBSD commit de7995a5e0ebf2d0016a87a0142a98c75db58fb4 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_phy_db.c head/sys/dev/iwm/if_iwm_phy_db.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Mon Feb 6 05:08:21 2017 (r313316) +++ head/sys/dev/iwm/if_iwm.c Mon Feb 6 05:09:42 2017 (r313317) @@ -5383,13 +5383,9 @@ iwm_notif_intr(struct iwm_softc *sc) wakeup(&sc->sc_uc); break; } - case IWM_CALIB_RES_NOTIF_PHY_DB: { - struct iwm_calib_res_notif_phy_db *phy_db_notif; - phy_db_notif = (void *)pkt->data; - - iwm_phy_db_set_section(sc->sc_phy_db, phy_db_notif); - - break; } + case IWM_CALIB_RES_NOTIF_PHY_DB: + iwm_phy_db_set_section(sc->sc_phy_db, pkt); + break; case IWM_STATISTICS_NOTIFICATION: { struct iwm_notif_statistics *stats; Modified: head/sys/dev/iwm/if_iwm_phy_db.c ============================================================================== --- head/sys/dev/iwm/if_iwm_phy_db.c Mon Feb 6 05:08:21 2017 (r313316) +++ head/sys/dev/iwm/if_iwm_phy_db.c Mon Feb 6 05:09:42 2017 (r313317) @@ -310,8 +310,10 @@ iwm_phy_db_free(struct iwm_phy_db *phy_d int iwm_phy_db_set_section(struct iwm_phy_db *phy_db, - struct iwm_calib_res_notif_phy_db *phy_db_notif) + struct iwm_rx_packet *pkt) { + struct iwm_calib_res_notif_phy_db *phy_db_notif = + (struct iwm_calib_res_notif_phy_db *)pkt->data; enum iwm_phy_db_section_type type = le16toh(phy_db_notif->type); uint16_t size = le16toh(phy_db_notif->length); struct iwm_phy_db_entry *entry; Modified: head/sys/dev/iwm/if_iwm_phy_db.h ============================================================================== --- head/sys/dev/iwm/if_iwm_phy_db.h Mon Feb 6 05:08:21 2017 (r313316) +++ head/sys/dev/iwm/if_iwm_phy_db.h Mon Feb 6 05:09:42 2017 (r313317) @@ -111,7 +111,7 @@ struct iwm_calib_res_notif_phy_db; extern struct iwm_phy_db *iwm_phy_db_init(struct iwm_softc *sc); extern void iwm_phy_db_free(struct iwm_phy_db *phy_db); extern int iwm_phy_db_set_section(struct iwm_phy_db *phy_db, - struct iwm_calib_res_notif_phy_db *phy_db_notif); + struct iwm_rx_packet *pkt); extern int iwm_send_phy_db_data(struct iwm_phy_db *phy_db); #endif /* __IF_IWM_PHY_DB_H__ */ From owner-svn-src-head@freebsd.org Mon Feb 6 05:19: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 46310CD2AF6; Mon, 6 Feb 2017 05:19:31 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15D4B7D8; Mon, 6 Feb 2017 05:19:31 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v165JUpW078893; Mon, 6 Feb 2017 05:19:30 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v165JU1e078891; Mon, 6 Feb 2017 05:19:30 GMT (envelope-from np@FreeBSD.org) Message-Id: <201702060519.v165JU1e078891@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 6 Feb 2017 05:19:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313318 - in head: share/man/man4 sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 05:19:31 -0000 Author: np Date: Mon Feb 6 05:19:29 2017 New Revision: 313318 URL: https://svnweb.freebsd.org/changeset/base/313318 Log: cxgbe(4): Allow tunables that control the number of queues to be set to '-n' to tell the driver to create _up to_ 'n' queues if enough cores are available. For example, setting hw.cxgbe.nrxq10g="-32" will result in 16 queues if the system has 16 cores, 32 if it has 32. There is no change in the default number of queues of any type. MFC after: 1 week Sponsored by: Chelsio Communications Modified: head/share/man/man4/cxgbe.4 head/sys/dev/cxgbe/t4_main.c Modified: head/share/man/man4/cxgbe.4 ============================================================================== --- head/share/man/man4/cxgbe.4 Mon Feb 6 05:09:42 2017 (r313317) +++ head/share/man/man4/cxgbe.4 Mon Feb 6 05:19:29 2017 (r313318) @@ -167,6 +167,10 @@ Tunables can be set at the .Xr loader 8 prompt before booting the kernel or stored in .Xr loader.conf 5 . +There are multiple tunables that control the number of queues of various +types. +A negative value for such a tunable instructs the driver to create +up to that many queues if there are enough CPU cores available. .Bl -tag -width indent .It Va hw.cxgbe.ntxq10g Number of tx queues used for a 10Gb or higher-speed port. Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Mon Feb 6 05:09:42 2017 (r313317) +++ head/sys/dev/cxgbe/t4_main.c Mon Feb 6 05:19:29 2017 (r313318) @@ -232,8 +232,8 @@ SLIST_HEAD(, uld_info) t4_uld_list; * Tunables. See tweak_tunables() too. * * Each tunable is set to a default value here if it's known at compile-time. - * Otherwise it is set to -1 as an indication to tweak_tunables() that it should - * provide a reasonable default when the driver is loaded. + * Otherwise it is set to -n as an indication to tweak_tunables() that it should + * provide a reasonable default (upto n) when the driver is loaded. * * Tunables applicable to both T4 and T5 are under hw.cxgbe. Those specific to * T5 are under hw.cxl. @@ -243,27 +243,27 @@ SLIST_HEAD(, uld_info) t4_uld_list; * Number of queues for tx and rx, 10G and 1G, NIC and offload. */ #define NTXQ_10G 16 -int t4_ntxq10g = -1; +int t4_ntxq10g = -NTXQ_10G; TUNABLE_INT("hw.cxgbe.ntxq10g", &t4_ntxq10g); #define NRXQ_10G 8 -int t4_nrxq10g = -1; +int t4_nrxq10g = -NRXQ_10G; TUNABLE_INT("hw.cxgbe.nrxq10g", &t4_nrxq10g); #define NTXQ_1G 4 -int t4_ntxq1g = -1; +int t4_ntxq1g = -NTXQ_1G; TUNABLE_INT("hw.cxgbe.ntxq1g", &t4_ntxq1g); #define NRXQ_1G 2 -int t4_nrxq1g = -1; +int t4_nrxq1g = -NRXQ_1G; TUNABLE_INT("hw.cxgbe.nrxq1g", &t4_nrxq1g); #define NTXQ_VI 1 -static int t4_ntxq_vi = -1; +static int t4_ntxq_vi = -NTXQ_VI; TUNABLE_INT("hw.cxgbe.ntxq_vi", &t4_ntxq_vi); #define NRXQ_VI 1 -static int t4_nrxq_vi = -1; +static int t4_nrxq_vi = -NRXQ_VI; TUNABLE_INT("hw.cxgbe.nrxq_vi", &t4_nrxq_vi); static int t4_rsrv_noflowq = 0; @@ -271,37 +271,37 @@ TUNABLE_INT("hw.cxgbe.rsrv_noflowq", &t4 #ifdef TCP_OFFLOAD #define NOFLDTXQ_10G 8 -static int t4_nofldtxq10g = -1; +static int t4_nofldtxq10g = -NOFLDTXQ_10G; TUNABLE_INT("hw.cxgbe.nofldtxq10g", &t4_nofldtxq10g); #define NOFLDRXQ_10G 2 -static int t4_nofldrxq10g = -1; +static int t4_nofldrxq10g = -NOFLDRXQ_10G; TUNABLE_INT("hw.cxgbe.nofldrxq10g", &t4_nofldrxq10g); #define NOFLDTXQ_1G 2 -static int t4_nofldtxq1g = -1; +static int t4_nofldtxq1g = -NOFLDTXQ_1G; TUNABLE_INT("hw.cxgbe.nofldtxq1g", &t4_nofldtxq1g); #define NOFLDRXQ_1G 1 -static int t4_nofldrxq1g = -1; +static int t4_nofldrxq1g = -NOFLDRXQ_1G; TUNABLE_INT("hw.cxgbe.nofldrxq1g", &t4_nofldrxq1g); #define NOFLDTXQ_VI 1 -static int t4_nofldtxq_vi = -1; +static int t4_nofldtxq_vi = -NOFLDTXQ_VI; TUNABLE_INT("hw.cxgbe.nofldtxq_vi", &t4_nofldtxq_vi); #define NOFLDRXQ_VI 1 -static int t4_nofldrxq_vi = -1; +static int t4_nofldrxq_vi = -NOFLDRXQ_VI; TUNABLE_INT("hw.cxgbe.nofldrxq_vi", &t4_nofldrxq_vi); #endif #ifdef DEV_NETMAP #define NNMTXQ_VI 2 -static int t4_nnmtxq_vi = -1; +static int t4_nnmtxq_vi = -NNMTXQ_VI; TUNABLE_INT("hw.cxgbe.nnmtxq_vi", &t4_nnmtxq_vi); #define NNMRXQ_VI 2 -static int t4_nnmrxq_vi = -1; +static int t4_nnmrxq_vi = -NNMRXQ_VI; TUNABLE_INT("hw.cxgbe.nnmrxq_vi", &t4_nnmrxq_vi); #endif @@ -9532,6 +9532,22 @@ uld_active(struct adapter *sc, int uld_i #endif /* + * t = ptr to tunable. + * nc = number of CPUs. + * c = compiled in default for that tunable. + */ +static void +calculate_nqueues(int *t, int nc, const int c) +{ + int nq; + + if (*t > 0) + return; + nq = *t < 0 ? -*t : c; + *t = min(nc, nq); +} + +/* * Come up with reasonable defaults for some of the tunables, provided they're * not set by the user (in which case we'll use the values as is). */ @@ -9544,7 +9560,7 @@ tweak_tunables(void) #ifdef RSS t4_ntxq10g = rss_getnumbuckets(); #else - t4_ntxq10g = min(nc, NTXQ_10G); + calculate_nqueues(&t4_ntxq10g, nc, NTXQ_10G); #endif } @@ -9553,18 +9569,17 @@ tweak_tunables(void) /* XXX: way too many for 1GbE? */ t4_ntxq1g = rss_getnumbuckets(); #else - t4_ntxq1g = min(nc, NTXQ_1G); + calculate_nqueues(&t4_ntxq1g, nc, NTXQ_1G); #endif } - if (t4_ntxq_vi < 1) - t4_ntxq_vi = min(nc, NTXQ_VI); + calculate_nqueues(&t4_ntxq_vi, nc, NTXQ_VI); if (t4_nrxq10g < 1) { #ifdef RSS t4_nrxq10g = rss_getnumbuckets(); #else - t4_nrxq10g = min(nc, NRXQ_10G); + calculate_nqueues(&t4_nrxq10g, nc, NRXQ_10G); #endif } @@ -9573,31 +9588,19 @@ tweak_tunables(void) /* XXX: way too many for 1GbE? */ t4_nrxq1g = rss_getnumbuckets(); #else - t4_nrxq1g = min(nc, NRXQ_1G); + calculate_nqueues(&t4_nrxq1g, nc, NRXQ_1G); #endif } - if (t4_nrxq_vi < 1) - t4_nrxq_vi = min(nc, NRXQ_VI); + calculate_nqueues(&t4_nrxq_vi, nc, NRXQ_VI); #ifdef TCP_OFFLOAD - if (t4_nofldtxq10g < 1) - t4_nofldtxq10g = min(nc, NOFLDTXQ_10G); - - if (t4_nofldtxq1g < 1) - t4_nofldtxq1g = min(nc, NOFLDTXQ_1G); - - if (t4_nofldtxq_vi < 1) - t4_nofldtxq_vi = min(nc, NOFLDTXQ_VI); - - if (t4_nofldrxq10g < 1) - t4_nofldrxq10g = min(nc, NOFLDRXQ_10G); - - if (t4_nofldrxq1g < 1) - t4_nofldrxq1g = min(nc, NOFLDRXQ_1G); - - if (t4_nofldrxq_vi < 1) - t4_nofldrxq_vi = min(nc, NOFLDRXQ_VI); + calculate_nqueues(&t4_nofldtxq10g, nc, NOFLDTXQ_10G); + calculate_nqueues(&t4_nofldtxq1g, nc, NOFLDTXQ_1G); + calculate_nqueues(&t4_nofldtxq_vi, nc, NOFLDTXQ_VI); + calculate_nqueues(&t4_nofldrxq10g, nc, NOFLDRXQ_10G); + calculate_nqueues(&t4_nofldrxq1g, nc, NOFLDRXQ_1G); + calculate_nqueues(&t4_nofldrxq_vi, nc, NOFLDRXQ_VI); if (t4_toecaps_allowed == -1) t4_toecaps_allowed = FW_CAPS_CONFIG_TOE; @@ -9624,11 +9627,8 @@ tweak_tunables(void) #endif #ifdef DEV_NETMAP - if (t4_nnmtxq_vi < 1) - t4_nnmtxq_vi = min(nc, NNMTXQ_VI); - - if (t4_nnmrxq_vi < 1) - t4_nnmrxq_vi = min(nc, NNMRXQ_VI); + calculate_nqueues(&t4_nnmtxq_vi, nc, NNMTXQ_VI); + calculate_nqueues(&t4_nnmrxq_vi, nc, NNMRXQ_VI); #endif if (t4_tmr_idx_10g < 0 || t4_tmr_idx_10g >= SGE_NTIMERS) From owner-svn-src-head@freebsd.org Mon Feb 6 05:27: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 97C60CD2DE4; Mon, 6 Feb 2017 05:27:09 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60845E23; Mon, 6 Feb 2017 05:27:09 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v165R87V083203; Mon, 6 Feb 2017 05:27:08 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v165R8bO083196; Mon, 6 Feb 2017 05:27:08 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702060527.v165R8bO083196@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 6 Feb 2017 05:27:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313322 - in head/sys: conf dev/iwm modules/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 05:27:09 -0000 Author: adrian Date: Mon Feb 6 05:27:07 2017 New Revision: 313322 URL: https://svnweb.freebsd.org/changeset/base/313322 Log: [iwm] Add implementation of the notification wait api from iwlwifi. Obtained from: Linux iwlwifi Obtained from: DragonflyBSD commit 94dc1dadceb57b688036211262d678bc6bbdde37 Added: head/sys/dev/iwm/if_iwm_notif_wait.c (contents, props changed) head/sys/dev/iwm/if_iwm_notif_wait.h (contents, props changed) Modified: head/sys/conf/files head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwmvar.h head/sys/modules/iwm/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Feb 6 05:27:05 2017 (r313321) +++ head/sys/conf/files Mon Feb 6 05:27:07 2017 (r313322) @@ -1882,6 +1882,7 @@ dev/iwm/if_iwm.c optional iwm dev/iwm/if_iwm_binding.c optional iwm dev/iwm/if_iwm_led.c optional iwm dev/iwm/if_iwm_mac_ctxt.c optional iwm +dev/netif/iwm/if_iwm_notif_wait.c optional iwm dev/iwm/if_iwm_pcie_trans.c optional iwm dev/iwm/if_iwm_phy_ctxt.c optional iwm dev/iwm/if_iwm_phy_db.c optional iwm Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Mon Feb 6 05:27:05 2017 (r313321) +++ head/sys/dev/iwm/if_iwm.c Mon Feb 6 05:27:07 2017 (r313322) @@ -153,6 +153,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -5277,6 +5278,8 @@ iwm_notif_intr(struct iwm_softc *sc) continue; } + iwm_notification_wait_notify(sc->sc_notif_wait, code, pkt); + switch (code) { case IWM_REPLY_RX_PHY_CMD: iwm_mvm_rx_rx_phy_cmd(sc, pkt, data); @@ -5896,6 +5899,12 @@ iwm_attach(device_t dev) callout_init_mtx(&sc->sc_led_blink_to, &sc->sc_mtx, 0); TASK_INIT(&sc->sc_es_task, 0, iwm_endscan_cb, sc); + sc->sc_notif_wait = iwm_notification_wait_init(sc); + if (sc->sc_notif_wait == NULL) { + device_printf(dev, "failed to init notification wait struct\n"); + goto fail; + } + /* Init phy db */ sc->sc_phy_db = iwm_phy_db_init(sc); if (!sc->sc_phy_db) { @@ -6383,6 +6392,11 @@ iwm_detach_local(struct iwm_softc *sc, i /* Finished with the hardware - detach things */ iwm_pci_detach(dev); + if (sc->sc_notif_wait != NULL) { + iwm_notification_wait_free(sc->sc_notif_wait); + sc->sc_notif_wait = NULL; + } + mbufq_drain(&sc->sc_snd); IWM_LOCK_DESTROY(sc); Added: head/sys/dev/iwm/if_iwm_notif_wait.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/iwm/if_iwm_notif_wait.c Mon Feb 6 05:27:07 2017 (r313322) @@ -0,0 +1,219 @@ +/*- + * Based on BSD-licensed source modules in the Linux iwlwifi driver, + * which were used as the reference documentation for this implementation. + * + ****************************************************************************** + * + * This file is provided under a dual BSD/GPLv2 license. When using or + * redistributing this file, you may do so under either license. + * + * GPL LICENSE SUMMARY + * + * Copyright(c) 2007 - 2014 Intel Corporation. All rights reserved. + * Copyright(c) 2015 Intel Deutschland GmbH + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, + * USA + * + * The full GNU General Public License is included in this distribution + * in the file called COPYING. + * + * Contact Information: + * Intel Linux Wireless + * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 + * + * BSD LICENSE + * + * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name Intel Corporation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + *****************************************************************************/ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_wlan.h" + +#include +#include +#include +#include +#include +#include +#include + +#include + +#define IWM_WAIT_LOCK_INIT(_n, _s) \ + mtx_init(&(_n)->lk_mtx, (_s), "iwm wait_notif", MTX_DEF); +#define IWM_WAIT_LOCK(_n) mtx_lock(&(_n)->lk_mtx) +#define IWM_WAIT_UNLOCK(_n) mtx_unlock(&(_n)->lk_mtx) +#define IWM_WAIT_LOCK_DESTROY(_n) mtx_destroy(&(_n)->lk_mtx) + +struct iwm_notif_wait_data { + struct mtx lk_mtx; + char lk_buf[32]; + STAILQ_HEAD(, iwm_notification_wait) list; + struct iwm_softc *sc; +}; + +struct iwm_notif_wait_data * +iwm_notification_wait_init(struct iwm_softc *sc) +{ + struct iwm_notif_wait_data *data; + + data = malloc(sizeof(*data), M_DEVBUF, M_NOWAIT | M_ZERO); + if (data != NULL) { + snprintf(data->lk_buf, 32, "iwm wait_notif"); + IWM_WAIT_LOCK_INIT(data, data->lk_buf); + STAILQ_INIT(&data->list); + data->sc = sc; + } + + return data; +} + +void +iwm_notification_wait_free(struct iwm_notif_wait_data *notif_data) +{ + KASSERT(STAILQ_EMPTY(¬if_data->list), ("notif list isn't empty")); + IWM_WAIT_LOCK_DESTROY(notif_data); + free(notif_data, M_DEVBUF); +} + +/* XXX Get rid of separate cmd argument, like in iwlwifi's code */ +void +iwm_notification_wait_notify(struct iwm_notif_wait_data *notif_data, + uint16_t cmd, struct iwm_rx_packet *pkt) +{ + struct iwm_notification_wait *wait_entry; + + IWM_WAIT_LOCK(notif_data); + STAILQ_FOREACH(wait_entry, ¬if_data->list, entry) { + int found = FALSE; + int i; + + /* + * If it already finished (triggered) or has been + * aborted then don't evaluate it again to avoid races, + * Otherwise the function could be called again even + * though it returned true before + */ + if (wait_entry->triggered || wait_entry->aborted) + continue; + + for (i = 0; i < wait_entry->n_cmds; i++) { + if (cmd == wait_entry->cmds[i]) { + found = TRUE; + break; + } + } + if (!found) + continue; + + if (!wait_entry->fn || + wait_entry->fn(notif_data->sc, pkt, wait_entry->fn_data)) { + wait_entry->triggered = 1; + wakeup(wait_entry); + } + } + IWM_WAIT_UNLOCK(notif_data); +} + +void +iwm_abort_notification_waits(struct iwm_notif_wait_data *notif_data) +{ + struct iwm_notification_wait *wait_entry; + + IWM_WAIT_LOCK(notif_data); + STAILQ_FOREACH(wait_entry, ¬if_data->list, entry) { + wait_entry->aborted = 1; + wakeup(wait_entry); + } + IWM_WAIT_UNLOCK(notif_data); +} + +void +iwm_init_notification_wait(struct iwm_notif_wait_data *notif_data, + struct iwm_notification_wait *wait_entry, const uint16_t *cmds, int n_cmds, + int (*fn)(struct iwm_softc *sc, struct iwm_rx_packet *pkt, void *data), + void *fn_data) +{ + KASSERT(n_cmds <= IWM_MAX_NOTIF_CMDS, + ("n_cmds %d is too large", n_cmds)); + wait_entry->fn = fn; + wait_entry->fn_data = fn_data; + wait_entry->n_cmds = n_cmds; + memcpy(wait_entry->cmds, cmds, n_cmds * sizeof(uint16_t)); + wait_entry->triggered = 0; + wait_entry->aborted = 0; + + IWM_WAIT_LOCK(notif_data); + STAILQ_INSERT_TAIL(¬if_data->list, wait_entry, entry); + IWM_WAIT_UNLOCK(notif_data); +} + +int +iwm_wait_notification(struct iwm_notif_wait_data *notif_data, + struct iwm_notification_wait *wait_entry, int timeout) +{ + int ret = 0; + + IWM_WAIT_LOCK(notif_data); + if (!wait_entry->triggered && !wait_entry->aborted) { + ret = msleep(wait_entry, ¬if_data->lk_mtx, 0, "iwm_notif", + timeout); + } + STAILQ_REMOVE(¬if_data->list, wait_entry, iwm_notification_wait, + entry); + IWM_WAIT_UNLOCK(notif_data); + + return ret; +} + +void +iwm_remove_notification(struct iwm_notif_wait_data *notif_data, + struct iwm_notification_wait *wait_entry) +{ + IWM_WAIT_LOCK(notif_data); + STAILQ_REMOVE(¬if_data->list, wait_entry, iwm_notification_wait, + entry); + IWM_WAIT_UNLOCK(notif_data); +} Added: head/sys/dev/iwm/if_iwm_notif_wait.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/iwm/if_iwm_notif_wait.h Mon Feb 6 05:27:07 2017 (r313322) @@ -0,0 +1,138 @@ +/*- + * Based on BSD-licensed source modules in the Linux iwlwifi driver, + * which were used as the reference documentation for this implementation. + * + ****************************************************************************** + * + * This file is provided under a dual BSD/GPLv2 license. When using or + * redistributing this file, you may do so under either license. + * + * GPL LICENSE SUMMARY + * + * Copyright(c) 2007 - 2014 Intel Corporation. All rights reserved. + * Copyright(c) 2015 Intel Deutschland GmbH + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, + * USA + * + * The full GNU General Public License is included in this distribution + * in the file called COPYING. + * + * Contact Information: + * Intel Linux Wireless + * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 + * + * BSD LICENSE + * + * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name Intel Corporation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + *****************************************************************************/ + +/* $FreeBSD$ */ + +#ifndef __IF_IWN_NOTIF_WAIT_H__ +#define __IF_IWN_NOTIF_WAIT_H__ + +#include + +#define IWM_MAX_NOTIF_CMDS 5 + +struct iwm_rx_packet; +struct iwm_softc; + +/** + * struct iwm_notification_wait - notification wait entry + * @entry: link for global list + * @fn: Function called with the notification. If the function + * returns true, the wait is over, if it returns false then + * the waiter stays blocked. If no function is given, any + * of the listed commands will unblock the waiter. + * @cmds: command IDs + * @n_cmds: number of command IDs + * @triggered: waiter should be woken up + * @aborted: wait was aborted + * + * This structure is not used directly, to wait for a + * notification declare it on the stack, and call + * iwm_init_notification_wait() with appropriate + * parameters. Then do whatever will cause the ucode + * to notify the driver, and to wait for that then + * call iwm_wait_notification(). + * + * Each notification is one-shot. If at some point we + * need to support multi-shot notifications (which + * can't be allocated on the stack) we need to modify + * the code for them. + */ +struct iwm_notification_wait { + STAILQ_ENTRY(iwm_notification_wait) entry; + + int (*fn)(struct iwm_softc *sc, struct iwm_rx_packet *pkt, void *data); + void *fn_data; + + uint16_t cmds[IWM_MAX_NOTIF_CMDS]; + uint8_t n_cmds; + int triggered, aborted; +}; + +/* caller functions */ +extern struct iwm_notif_wait_data *iwm_notification_wait_init( + struct iwm_softc *sc); +extern void iwm_notification_wait_free(struct iwm_notif_wait_data *notif_data); +extern void iwm_notification_wait_notify( + struct iwm_notif_wait_data *notif_data, uint16_t cmd, + struct iwm_rx_packet *pkt); +extern void iwm_abort_notification_waits( + struct iwm_notif_wait_data *notif_data); + +/* user functions */ +extern void iwm_init_notification_wait(struct iwm_notif_wait_data *notif_data, + struct iwm_notification_wait *wait_entry, + const uint16_t *cmds, int n_cmds, + int (*fn)(struct iwm_softc *sc, + struct iwm_rx_packet *pkt, void *data), + void *fn_data); +extern int iwm_wait_notification(struct iwm_notif_wait_data *notif_data, + struct iwm_notification_wait *wait_entry, int timeout); +extern void iwm_remove_notification(struct iwm_notif_wait_data *notif_data, + struct iwm_notification_wait *wait_entry); + +#endif /* __IF_IWN_NOTIF_WAIT_H__ */ Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 05:27:05 2017 (r313321) +++ head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 05:27:07 2017 (r313322) @@ -519,6 +519,8 @@ struct iwm_softc { struct iwm_tx_radiotap_header sc_txtap; int sc_max_rssi; + + struct iwm_notif_wait_data *sc_notif_wait; }; #define IWM_LOCK_INIT(_sc) \ Modified: head/sys/modules/iwm/Makefile ============================================================================== --- head/sys/modules/iwm/Makefile Mon Feb 6 05:27:05 2017 (r313321) +++ head/sys/modules/iwm/Makefile Mon Feb 6 05:27:07 2017 (r313322) @@ -6,7 +6,7 @@ KMOD= if_iwm # Main driver SRCS= if_iwm.c if_iwm_binding.c if_iwm_util.c if_iwm_phy_db.c SRCS+= if_iwm_mac_ctxt.c if_iwm_phy_ctxt.c if_iwm_time_event.c -SRCS+= if_iwm_power.c if_iwm_scan.c if_iwm_led.c +SRCS+= if_iwm_power.c if_iwm_scan.c if_iwm_led.c if_iwm_notif_wait.c # bus layer SRCS+= if_iwm_pcie_trans.c SRCS+= device_if.h bus_if.h pci_if.h opt_wlan.h From owner-svn-src-head@freebsd.org Mon Feb 6 05:35: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 61464CD21FD; Mon, 6 Feb 2017 05:35:12 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BE341684; Mon, 6 Feb 2017 05:35:12 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v165ZBC8087343; Mon, 6 Feb 2017 05:35:11 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v165ZBQt087341; Mon, 6 Feb 2017 05:35:11 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702060535.v165ZBQt087341@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 6 Feb 2017 05:35:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313325 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 05:35:12 -0000 Author: adrian Date: Mon Feb 6 05:35:11 2017 New Revision: 313325 URL: https://svnweb.freebsd.org/changeset/base/313325 Log: [iwm] Use notification wait API to wait for calibration to complete. Tested: * 7260, STA mode (2g, 5g) Obtained from: DragonflyBSD commit 1e0cf8ec6fcd77978f5336297ece61a415790f84 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Mon Feb 6 05:34:47 2017 (r313324) +++ head/sys/dev/iwm/if_iwm.c Mon Feb 6 05:35:11 2017 (r313325) @@ -284,6 +284,8 @@ struct iwm_nvm_section { uint8_t *data; }; +#define IWM_MVM_UCODE_CALIB_TIMEOUT (2*hz) + static int iwm_store_cscheme(struct iwm_softc *, const uint8_t *, size_t); static int iwm_firmware_store_section(struct iwm_softc *, enum iwm_ucode_type, @@ -2751,6 +2753,28 @@ iwm_send_phy_cfg_cmd(struct iwm_softc *s } static int +iwm_wait_phy_db_entry(struct iwm_softc *sc, + struct iwm_rx_packet *pkt, void *data) +{ + struct iwm_phy_db *phy_db = data; + + if (pkt->hdr.code != IWM_CALIB_RES_NOTIF_PHY_DB) { + if(pkt->hdr.code != IWM_INIT_COMPLETE_NOTIF) { + device_printf(sc->sc_dev, "%s: Unexpected cmd: %d\n", + __func__, pkt->hdr.code); + } + return TRUE; + } + + if (iwm_phy_db_set_section(phy_db, pkt)) { + device_printf(sc->sc_dev, + "%s: iwm_phy_db_set_section failed\n", __func__); + } + + return FALSE; +} + +static int iwm_mvm_load_ucode_wait_alive(struct iwm_softc *sc, enum iwm_ucode_type ucode_type) { @@ -2788,7 +2812,12 @@ iwm_mvm_load_ucode_wait_alive(struct iwm static int iwm_run_init_mvm_ucode(struct iwm_softc *sc, int justnvm) { - int error; + struct iwm_notification_wait calib_wait; + static const uint16_t init_complete[] = { + IWM_INIT_COMPLETE_NOTIF, + IWM_CALIB_RES_NOTIF_PHY_DB + }; + int ret; /* do not operate with rfkill switch turned on */ if ((sc->sc_flags & IWM_FLAG_RFKILL) && !justnvm) { @@ -2797,81 +2826,80 @@ iwm_run_init_mvm_ucode(struct iwm_softc return EPERM; } - sc->sc_init_complete = 0; - if ((error = iwm_mvm_load_ucode_wait_alive(sc, - IWM_UCODE_INIT)) != 0) { - device_printf(sc->sc_dev, "failed to load init firmware\n"); - return error; + iwm_init_notification_wait(sc->sc_notif_wait, + &calib_wait, + init_complete, + nitems(init_complete), + iwm_wait_phy_db_entry, + sc->sc_phy_db); + + /* Will also start the device */ + ret = iwm_mvm_load_ucode_wait_alive(sc, IWM_UCODE_INIT); + if (ret) { + device_printf(sc->sc_dev, "Failed to start INIT ucode: %d\n", + ret); + goto error; } if (justnvm) { - if ((error = iwm_nvm_init(sc)) != 0) { + /* Read nvm */ + ret = iwm_nvm_init(sc); + if (ret) { device_printf(sc->sc_dev, "failed to read nvm\n"); - return error; + goto error; } IEEE80211_ADDR_COPY(sc->sc_ic.ic_macaddr, sc->nvm_data->hw_addr); - - return 0; + goto error; } - if ((error = iwm_send_bt_init_conf(sc)) != 0) { + ret = iwm_send_bt_init_conf(sc); + if (ret) { device_printf(sc->sc_dev, - "failed to send bt coex configuration: %d\n", error); - return error; + "failed to send bt coex configuration: %d\n", ret); + goto error; } /* Init Smart FIFO. */ - error = iwm_mvm_sf_config(sc, IWM_SF_INIT_OFF); - if (error != 0) - return error; - -#if 0 - IWM_DPRINTF(sc, IWM_DEBUG_RESET, - "%s: phy_txant=0x%08x, nvm_valid_tx_ant=0x%02x, valid=0x%02x\n", - __func__, - ((sc->sc_fw_phy_config & IWM_FW_PHY_CFG_TX_CHAIN) - >> IWM_FW_PHY_CFG_TX_CHAIN_POS), - sc->nvm_data->valid_tx_ant, - iwm_fw_valid_tx_ant(sc)); -#endif + ret = iwm_mvm_sf_config(sc, IWM_SF_INIT_OFF); + if (ret) + goto error; /* Send TX valid antennas before triggering calibrations */ - error = iwm_send_tx_ant_cfg(sc, iwm_mvm_get_valid_tx_ant(sc)); - if (error != 0) { + ret = iwm_send_tx_ant_cfg(sc, iwm_mvm_get_valid_tx_ant(sc)); + if (ret) { device_printf(sc->sc_dev, - "failed to send antennas before calibration: %d\n", error); - return error; + "failed to send antennas before calibration: %d\n", ret); + goto error; } /* * Send phy configurations command to init uCode * to start the 16.0 uCode init image internal calibrations. */ - if ((error = iwm_send_phy_cfg_cmd(sc)) != 0 ) { + ret = iwm_send_phy_cfg_cmd(sc); + if (ret) { device_printf(sc->sc_dev, - "%s: failed to run internal calibration: %d\n", - __func__, error); - return error; + "%s: Failed to run INIT calibrations: %d\n", + __func__, ret); + goto error; } /* * Nothing to do but wait for the init complete notification - * from the firmware + * from the firmware. */ - while (!sc->sc_init_complete) { - error = msleep(&sc->sc_init_complete, &sc->sc_mtx, - 0, "iwminit", 2*hz); - if (error) { - device_printf(sc->sc_dev, "init complete failed: %d\n", - sc->sc_init_complete); - break; - } - } + IWM_UNLOCK(sc); + ret = iwm_wait_notification(sc->sc_notif_wait, &calib_wait, + IWM_MVM_UCODE_CALIB_TIMEOUT); + IWM_LOCK(sc); - IWM_DPRINTF(sc, IWM_DEBUG_RESET, "init %scomplete\n", - sc->sc_init_complete ? "" : "not "); - return error; + goto out; + +error: + iwm_remove_notification(sc->sc_notif_wait, &calib_wait); +out: + return ret; } /* @@ -5387,7 +5415,6 @@ iwm_notif_intr(struct iwm_softc *sc) break; } case IWM_CALIB_RES_NOTIF_PHY_DB: - iwm_phy_db_set_section(sc->sc_phy_db, pkt); break; case IWM_STATISTICS_NOTIFICATION: { @@ -5452,8 +5479,6 @@ iwm_notif_intr(struct iwm_softc *sc) break; case IWM_INIT_COMPLETE_NOTIF: - sc->sc_init_complete = 1; - wakeup(&sc->sc_init_complete); break; case IWM_SCAN_OFFLOAD_COMPLETE: { Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 05:34:47 2017 (r313324) +++ head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 05:35:11 2017 (r313325) @@ -452,7 +452,6 @@ struct iwm_softc { struct iwm_dma_info fw_dma; int sc_fw_chunk_done; - int sc_init_complete; struct iwm_ucode_status sc_uc; enum iwm_ucode_type sc_uc_current; From owner-svn-src-head@freebsd.org Mon Feb 6 06:15: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 584A3CD35EA; Mon, 6 Feb 2017 06:15:40 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08548114A; Mon, 6 Feb 2017 06:15:39 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v166FdkM003714; Mon, 6 Feb 2017 06:15:39 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v166FdRc003713; Mon, 6 Feb 2017 06:15:39 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201702060615.v166FdRc003713@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 6 Feb 2017 06:15:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313326 - head/tools/tools/nanobsd/embedded X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 06:15:40 -0000 Author: imp Date: Mon Feb 6 06:15:38 2017 New Revision: 313326 URL: https://svnweb.freebsd.org/changeset/base/313326 Log: o Add mkimg to the cross tools, and use the TMPPATH as PATH to pick up mkimg for building on systems like FreeBSD 11.0 that don't have my -a changes. o Set NANO_ROOT and NANO_ALTROOT for std-* since their values don't change when we set NANO_SLICE*. PR: 216829 PR: 216830 Modified: head/tools/tools/nanobsd/embedded/common Modified: head/tools/tools/nanobsd/embedded/common ============================================================================== --- head/tools/tools/nanobsd/embedded/common Mon Feb 6 05:35:11 2017 (r313325) +++ head/tools/tools/nanobsd/embedded/common Mon Feb 6 06:15:38 2017 (r313326) @@ -132,6 +132,7 @@ customize_cmd cust_install_machine_files # NB: leave c++ enabled so devd can be built CONF_BUILD=" +LOCAL_XTOOL_DIRS=usr.bin/mkimg WITHOUT_ACPI=true WITHOUT_ATM=true WITHOUT_AUDIT=true @@ -612,17 +613,23 @@ std-embedded) NANO_SLICE_CFG=s2 NANO_SLICE_ROOT=s3 NANO_SLICE_ALTROOT=s4 + NANO_ROOT=${NANO_SLICE_ROOT}a + NANO_ALTROOT=${NANO_SLICE_ALTROOT}a ;; std-x86) NANO_SLICE_CFG=s1 NANO_SLICE_ROOT=s2 NANO_SLICE_ALTROOT=s3 + NANO_ROOT=${NANO_SLICE_ROOT}a + NANO_ALTROOT=${NANO_SLICE_ALTROOT}a ;; powerpc64-ibm) NANO_SLICE_PPCBOOT=s1 NANO_SLICE_CFG=s2 NANO_SLICE_ROOT=s3 NANO_SLICE_ALTROOT=s4 + NANO_ROOT=${NANO_SLICE_ROOT}a + NANO_ALTROOT=${NANO_SLICE_ALTROOT}a ;; powerpc64-apple) echo Not yet @@ -633,6 +640,8 @@ std-uefi) NANO_SLICE_CFG=s2 NANO_SLICE_ROOT=s3 NANO_SLICE_ALTROOT=s4 + NANO_ROOT=${NANO_SLICE_ROOT} + NANO_ALTROOT=${NANO_SLICE_ALTROOT} ;; std-uefi-bios) NANO_DISK_SCHEME=gpt @@ -641,7 +650,6 @@ std-uefi-bios) NANO_SLICE_CFG=p3 NANO_SLICE_ROOT=p4 NANO_SLICE_ALTROOT=p5 - # override root name NANO_ROOT=${NANO_SLICE_ROOT} NANO_ALTROOT=${NANO_SLICE_ALTROOT} ;; @@ -660,3 +668,8 @@ NANO_SLICE_DATA= # Not included create_diskimage ( ) ( eval create_diskimage_${NANO_DISK_SCHEME} ) + +# Set the path to the same path we use for buldworld to use latest mkimg +NANO_TARGET=$(cd ${NANO_SRC}; ${NANO_MAKE} TARGET_ARCH=${NANO_ARCH} -V _TARGET) +NANO_TMPPATH=$(cd ${NANO_SRC}; ${NANO_MAKE} TARGET=${NANO_TARGET} TARGET_ARCH=${NANO_ARCH} -f Makefile.inc1 buildenv -V TMPPATH) +export PATH="${NANO_TMPPATH}" From owner-svn-src-head@freebsd.org Mon Feb 6 07:02: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 E5E88CD3A62; Mon, 6 Feb 2017 07:02:18 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B594FD58; Mon, 6 Feb 2017 07:02:18 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1672HWX023510; Mon, 6 Feb 2017 07:02:17 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1672Hro023509; Mon, 6 Feb 2017 07:02:17 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201702060702.v1672Hro023509@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 6 Feb 2017 07:02:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313327 - head/usr.bin/gzip X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 07:02:19 -0000 Author: delphij Date: Mon Feb 6 07:02:17 2017 New Revision: 313327 URL: https://svnweb.freebsd.org/changeset/base/313327 Log: Reflect actual NetBSD revision we already have. MFC after: 3 days Modified: head/usr.bin/gzip/unxz.c Modified: head/usr.bin/gzip/unxz.c ============================================================================== --- head/usr.bin/gzip/unxz.c Mon Feb 6 06:15:38 2017 (r313326) +++ head/usr.bin/gzip/unxz.c Mon Feb 6 07:02:17 2017 (r313327) @@ -1,4 +1,4 @@ -/* $NetBSD: unxz.c,v 1.5 2011/09/30 01:32:21 christos Exp $ */ +/* $NetBSD: unxz.c,v 1.6 2016/01/29 15:19:01 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. From owner-svn-src-head@freebsd.org Mon Feb 6 07:57: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 A8446CD108E for ; Mon, 6 Feb 2017 07:57:26 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yw0-x229.google.com (mail-yw0-x229.google.com [IPv6:2607:f8b0:4002:c05::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6426C8EC for ; Mon, 6 Feb 2017 07:57:26 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yw0-x229.google.com with SMTP id v200so44347737ywc.3 for ; Sun, 05 Feb 2017 23:57:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=bex5ktrMozIXH/dXQhZd4HxxAriq/DXNav9QRUgctkY=; b=tvQcFs1UPPFySj/2O8b6A5zhEdAV47LgDP7nh7Zk4izwprsR+HdYd5N43Dp42CLKjl KirgU2fyy9dxcq59mD7W2bxDF3ZdSAvrbwdPP/oRSDov22L/2/hFKKxxnNb1/7jq38Ad jFZ9Dwz+pZt4TIbhAn37bhEPtogwL4TAaJKIBGyjVBrcLCiDTHBFGABEqGSI1elqkqpe qloYOXQDU93+BVNKZVXDe6o4wsgx5EtDpg3Czi4/ERu8SuRPJ23fIHG3jJvsBB996k/L qig3pT6kb1vv4wgmdKtnUPn1/yX1hqLsBBqTuD0bgE442+aA3b/rr0+SbnFXeEwhMmuH eRDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=bex5ktrMozIXH/dXQhZd4HxxAriq/DXNav9QRUgctkY=; b=k2QQwJPVGVUvL11XoaVGx5Qw2kX2Wkth+tPG5N/ptSCQnJo1H1P4s6Ogv2VdMnzcar q2HYIk8BCZF1FHKQ3RZKWJEpqpWuYSFAv3KAb3tIysyYyjaglM53wHtRGftg99TR/FtQ BLHw+ZOu18w917RnoGwR+4it6wtT4MAVelh2lkqBNj24iaU6tJTnn6kLdHVaD1J8C4SE rUYP71JSP4DI6UMx+3UO9x/yOMinQErjJ8TJZdnayD4MnzG5DkxsuynumZnGrhRjGSCS 3Xf2n5FUBQH3tWf9IHKSzJRCu0ATz+RpB6rwO3i0vgLSJchFyC0J53cz69nnHDmbx1YS tY4g== X-Gm-Message-State: AIkVDXKAgxJMz4Bow225SmxmtCttrhkFXEku244oCIdcaQ4PzhnmlbcWREU1MVO8uDoV7JJzPp7tClvnT7wzMg== X-Received: by 10.129.110.133 with SMTP id j127mr5964516ywc.214.1486367845325; Sun, 05 Feb 2017 23:57:25 -0800 (PST) MIME-Version: 1.0 Received: by 10.129.52.76 with HTTP; Sun, 5 Feb 2017 23:56:54 -0800 (PST) In-Reply-To: <201702060527.v165R8bO083196@repo.freebsd.org> References: <201702060527.v165R8bO083196@repo.freebsd.org> From: Ed Schouten Date: Mon, 6 Feb 2017 08:56:54 +0100 Message-ID: Subject: Re: svn commit: r313322 - in head/sys: conf dev/iwm modules/iwm To: Adrian Chadd Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-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: Mon, 06 Feb 2017 07:57:26 -0000 Hi Adrian, 2017-02-06 6:27 GMT+01:00 Adrian Chadd : > Modified: head/sys/conf/files > ============================================================================== > --- head/sys/conf/files Mon Feb 6 05:27:05 2017 (r313321) > +++ head/sys/conf/files Mon Feb 6 05:27:07 2017 (r313322) > @@ -1882,6 +1882,7 @@ dev/iwm/if_iwm.c optional iwm > dev/iwm/if_iwm_binding.c optional iwm > dev/iwm/if_iwm_led.c optional iwm > dev/iwm/if_iwm_mac_ctxt.c optional iwm > +dev/netif/iwm/if_iwm_notif_wait.c optional iwm > dev/iwm/if_iwm_pcie_trans.c optional iwm > dev/iwm/if_iwm_phy_ctxt.c optional iwm > dev/iwm/if_iwm_phy_db.c optional iwm What's with the 'netif' part in the source file's name? The actual source file doesn't use it. -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 From owner-svn-src-head@freebsd.org Mon Feb 6 08:26: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 7BD5ECD1BD0; Mon, 6 Feb 2017 08:26:47 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C99A17FA; Mon, 6 Feb 2017 08:26:47 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v168QkT3056017; Mon, 6 Feb 2017 08:26:46 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v168QjD0056011; Mon, 6 Feb 2017 08:26:45 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201702060826.v168QjD0056011@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Mon, 6 Feb 2017 08:26:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313328 - in head/sys/boot: common usb/storage zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 08:26:47 -0000 Author: tsoome Date: Mon Feb 6 08:26:45 2017 New Revision: 313328 URL: https://svnweb.freebsd.org/changeset/base/313328 Log: loader: Implement disk_ioctl() to support DIOCGSECTORSIZE and DIOCGMEDIASIZE. Need interface to extract information about disk abstraction, to read disk or partition size depending on the provided argument and adjust disk size based on information in partition table. The disk handle from disk_open() has d_offset field to point to partition start. So we can use this fact to return either whole disk size or partition size. For this we only need to record partition size we get from disk_open() anyhow. In addition, this will also make it possible to adjust the disk media size based on information from partition table. The problem with disk size is about some BIOS systems reporting bogus disk size for 2+TB disks, but since such disks are using GPT partitioning, and GPT does have information about disk size (alternate LBA + 1), we can use this fact to record disk size based on partition table. This patch does exactly this: implements DIOCGSECTORSIZE and DIOCGMEDIASIZE ioctl, and DIOCGMEDIASIZE will report either disk media size or partition size. Adds ptable_getsize() call to read partition size in bytes from ptable pointer. Updates disk_open() to use ptable_getsize() to update mediasize value. Implements GPT detection function to update ptable size (used by ptable_getsize()) according to alternate lba (which is location of backup copy of GPT header table). Reviewed by: allanjude Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D8594 Modified: head/sys/boot/common/disk.c head/sys/boot/common/part.c head/sys/boot/common/part.h head/sys/boot/usb/storage/umass_loader.c head/sys/boot/zfs/zfs.c Modified: head/sys/boot/common/disk.c ============================================================================== --- head/sys/boot/common/disk.c Mon Feb 6 07:02:17 2017 (r313327) +++ head/sys/boot/common/disk.c Mon Feb 6 08:26:45 2017 (r313328) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); struct open_disk { struct ptable *table; uint64_t mediasize; + uint64_t entrysize; u_int sectorsize; u_int flags; int rcnt; @@ -264,13 +265,28 @@ disk_write(struct disk_devdesc *dev, voi } int -disk_ioctl(struct disk_devdesc *dev, u_long cmd, void *buf) +disk_ioctl(struct disk_devdesc *dev, u_long cmd, void *data) { + struct open_disk *od = dev->d_opendata; - if (dev->d_dev->dv_ioctl) - return ((*dev->d_dev->dv_ioctl)(dev->d_opendata, cmd, buf)); + if (od == NULL) + return (ENOTTY); - return (ENXIO); + switch (cmd) { + case DIOCGSECTORSIZE: + *(u_int *)data = od->sectorsize; + break; + case DIOCGMEDIASIZE: + if (dev->d_offset == 0) + *(uint64_t *)data = od->mediasize; + else + *(uint64_t *)data = od->entrysize * od->sectorsize; + break; + default: + return (ENOTTY); + } + + return (0); } int @@ -315,6 +331,7 @@ disk_open(struct disk_devdesc *dev, uint } dev->d_opendata = od; od->rcnt = 0; + od->entrysize = 0; } od->mediasize = mediasize; od->sectorsize = sectorsize; @@ -330,14 +347,24 @@ disk_open(struct disk_devdesc *dev, uint rc = ENXIO; goto out; } + + if (ptable_getsize(od->table, &mediasize) != 0) { + rc = ENXIO; + goto out; + } + if (mediasize > od->mediasize) { + od->mediasize = mediasize; + } opened: rc = 0; if (ptable_gettype(od->table) == PTABLE_BSD && partition >= 0) { /* It doesn't matter what value has d_slice */ rc = ptable_getpart(od->table, &part, partition); - if (rc == 0) + if (rc == 0) { dev->d_offset = part.start; + od->entrysize = part.end - part.start + 1; + } } else if (slice >= 0) { /* Try to get information about partition */ if (slice == 0) @@ -347,6 +374,7 @@ opened: if (rc != 0) /* Partition doesn't exist */ goto out; dev->d_offset = part.start; + od->entrysize = part.end - part.start + 1; slice = part.index; if (ptable_gettype(od->table) == PTABLE_GPT) { partition = 255; @@ -389,6 +417,7 @@ opened: if (rc != 0) goto out; dev->d_offset += part.start; + od->entrysize = part.end - part.start + 1; } out: if (table != NULL) Modified: head/sys/boot/common/part.c ============================================================================== --- head/sys/boot/common/part.c Mon Feb 6 07:02:17 2017 (r313327) +++ head/sys/boot/common/part.c Mon Feb 6 08:26:45 2017 (r313328) @@ -310,10 +310,30 @@ ptable_gptread(struct ptable *table, voi DEBUG("GPT detected"); size = MIN(hdr.hdr_entries * hdr.hdr_entsz, MAXTBLSZ * table->sectorsize); + + /* + * If the disk's sector count is smaller than the sector count recorded + * in the disk's GPT table header, set the table->sectors to the value + * recorded in GPT tables. This is done to work around buggy firmware + * that returns truncated disk sizes. + * + * Note, this is still not a foolproof way to get disk's size. For + * example, an image file can be truncated when copied to smaller media. + */ + if (hdr.hdr_lba_alt + 1 > table->sectors) + table->sectors = hdr.hdr_lba_alt + 1; + for (i = 0; i < size / hdr.hdr_entsz; i++) { ent = (struct gpt_ent *)(tbl + i * hdr.hdr_entsz); if (uuid_equal(&ent->ent_type, &gpt_uuid_unused, NULL)) continue; + + /* Simple sanity checks. */ + if (ent->ent_lba_start < hdr.hdr_lba_start || + ent->ent_lba_end > hdr.hdr_lba_end || + ent->ent_lba_start > ent->ent_lba_end) + continue; + entry = malloc(sizeof(*entry)); if (entry == NULL) break; @@ -735,6 +755,19 @@ ptable_gettype(const struct ptable *tabl } int +ptable_getsize(const struct ptable *table, uint64_t *sizep) +{ + uint64_t tmp = table->sectors * table->sectorsize; + + if (tmp < table->sectors) + return (EOVERFLOW); + + if (sizep != NULL) + *sizep = tmp; + return (0); +} + +int ptable_getpart(const struct ptable *table, struct ptable_entry *part, int index) { struct pentry *entry; Modified: head/sys/boot/common/part.h ============================================================================== --- head/sys/boot/common/part.h Mon Feb 6 07:02:17 2017 (r313327) +++ head/sys/boot/common/part.h Mon Feb 6 08:26:45 2017 (r313328) @@ -70,6 +70,7 @@ struct ptable *ptable_open(void *dev, ui diskread_t *dread); void ptable_close(struct ptable *table); enum ptable_type ptable_gettype(const struct ptable *table); +int ptable_getsize(const struct ptable *table, uint64_t *sizep); int ptable_getpart(const struct ptable *table, struct ptable_entry *part, int index); Modified: head/sys/boot/usb/storage/umass_loader.c ============================================================================== --- head/sys/boot/usb/storage/umass_loader.c Mon Feb 6 07:02:17 2017 (r313327) +++ head/sys/boot/usb/storage/umass_loader.c Mon Feb 6 08:26:45 2017 (r313328) @@ -137,10 +137,20 @@ umass_disk_open(struct open_file *f,...) } static int -umass_disk_ioctl(struct open_file *f __unused, u_long cmd, void *buf) +umass_disk_ioctl(struct open_file *f, u_long cmd, void *buf) { + struct disk_devdesc *dev; uint32_t nblock; uint32_t blocksize; + int rc; + + dev = (struct disk_devdesc *)(f->f_devdata); + if (dev == NULL) + return (EINVAL); + + rc = disk_ioctl(dev, cmd, buf); + if (rc != ENOTTY) + return (rc); switch (cmd) { case DIOCGSECTORSIZE: Modified: head/sys/boot/zfs/zfs.c ============================================================================== --- head/sys/boot/zfs/zfs.c Mon Feb 6 07:02:17 2017 (r313327) +++ head/sys/boot/zfs/zfs.c Mon Feb 6 08:26:45 2017 (r313328) @@ -483,7 +483,7 @@ zfs_probe_dev(const char *devname, uint6 { struct ptable *table; struct zfs_probe_args pa; - off_t mediasz; + uint64_t mediasz; int ret; pa.fd = open(devname, O_RDONLY); From owner-svn-src-head@freebsd.org Mon Feb 6 08:27: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 52EB3CD1C26; Mon, 6 Feb 2017 08:27:21 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 152271960; Mon, 6 Feb 2017 08:27:21 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v168RK45056088; Mon, 6 Feb 2017 08:27:20 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v168RJQY056084; Mon, 6 Feb 2017 08:27:19 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201702060827.v168RJQY056084@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Mon, 6 Feb 2017 08:27:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313329 - in head: bin/ed secure/usr.bin secure/usr.bin/bdes usr.bin usr.bin/enigma X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 08:27:21 -0000 Author: allanjude Date: Mon Feb 6 08:27:19 2017 New Revision: 313329 URL: https://svnweb.freebsd.org/changeset/base/313329 Log: Remove bdes(1) The use of DES for anything is discouraged, especially with a static IV of 0 If you still need bdes(1) to decrypt Kirk's video lectures, see security/bdes in ports. This commit brought to you by the FOSDEM DevSummit and the "remove unneeded dependancies on openssl in base" working group Reviewed by: bapt, brnrd Relnotes: yes Sponsored by: FOSDEM DevSummit Differential Revision: https://reviews.freebsd.org/D9424 Deleted: head/secure/usr.bin/bdes/ Modified: head/bin/ed/ed.1 head/secure/usr.bin/Makefile head/usr.bin/Makefile head/usr.bin/enigma/enigma.1 Modified: head/bin/ed/ed.1 ============================================================================== --- head/bin/ed/ed.1 Mon Feb 6 08:26:45 2017 (r313328) +++ head/bin/ed/ed.1 Mon Feb 6 08:27:19 2017 (r313329) @@ -1,5 +1,5 @@ .\" $FreeBSD$ -.Dd October 2, 2016 +.Dd February 5, 2017 .Dt ED 1 .Os .Sh NAME @@ -871,9 +871,6 @@ writes. If a newline alone is entered as the key, then encryption is turned off. Otherwise, echoing is disabled while a key is read. -Encryption/decryption is done using the -.Xr bdes 1 -algorithm. .It Pf (.+1)z n Scroll .Ar n @@ -962,7 +959,6 @@ results in an error. If the command is entered a second time, it succeeds, but any changes to the buffer are lost. .Sh SEE ALSO -.Xr bdes 1 , .Xr sed 1 , .Xr sh 1 , .Xr vi 1 , Modified: head/secure/usr.bin/Makefile ============================================================================== --- head/secure/usr.bin/Makefile Mon Feb 6 08:26:45 2017 (r313328) +++ head/secure/usr.bin/Makefile Mon Feb 6 08:27:19 2017 (r313329) @@ -4,7 +4,7 @@ SUBDIR= .if ${MK_OPENSSL} != "no" -SUBDIR+=bdes openssl +SUBDIR+=openssl .if ${MK_OPENSSH} != "no" SUBDIR+=scp sftp ssh ssh-add ssh-agent ssh-keygen ssh-keyscan .endif Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Mon Feb 6 08:26:45 2017 (r313328) +++ head/usr.bin/Makefile Mon Feb 6 08:27:19 2017 (r313329) @@ -6,7 +6,6 @@ # XXX MISSING: deroff diction graph learn plot # spell spline struct xsend # XXX Use GNU versions: diff ld patch -# Moved to secure: bdes # SUBDIR= alias \ Modified: head/usr.bin/enigma/enigma.1 ============================================================================== --- head/usr.bin/enigma/enigma.1 Mon Feb 6 08:26:45 2017 (r313328) +++ head/usr.bin/enigma/enigma.1 Mon Feb 6 08:27:19 2017 (r313329) @@ -6,7 +6,7 @@ .\" .\" $FreeBSD$ .\" " -.Dd May 14, 2004 +.Dd February 5, 2017 .Dt ENIGMA 1 .Os .Sh NAME @@ -84,7 +84,6 @@ with other operating systems that also p .Xr crypt 1 there). For real encryption, refer to -.Xr bdes 1 , .Xr openssl 1 , .Xr pgp 1 Pq Pa ports/security/pgp , or @@ -115,7 +114,6 @@ enigma XXX < encrypted .Pp This displays the previously created file on the terminal. .Sh SEE ALSO -.Xr bdes 1 , .Xr gpg 1 , .Xr openssl 1 , .Xr pgp 1 , From owner-svn-src-head@freebsd.org Mon Feb 6 08:37: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 9CBE3CD1E8C; Mon, 6 Feb 2017 08:37:00 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 DV Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7AF5C1ECA; Mon, 6 Feb 2017 08:37:00 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from Xins-MBP.ut.rhv.delphij.net (unknown [IPv6:2601:646:8882:752a:d1a3:819a:4f6f:ae91]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id 10C192AD4B; Mon, 6 Feb 2017 00:37:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1486370220; x=1486384620; bh=hobcOv2l0PUCu+mwzrajORGvaFBHwLz5oeFJy4hICzw=; h=Subject:To:References:Cc:From:Date:In-Reply-To; b=s0kXejqQ7qJ98PNaT+IW+NJmzAjM1e/6HqTPAsq2UzmA3rK2WxdxTLXMAjq16BxdP ngmX1yHL2rhuzeBa526rMxJFC7fBta+A9/R7Q1adlNWBPVTHzo9BCfVAFD7mHyXNfo AnbkR/o8ALhgq+PGGQbq7ok+fRMWJi0ey7xGNN7A= Subject: Re: svn commit: r313329 - in head: bin/ed secure/usr.bin secure/usr.bin/bdes usr.bin usr.bin/enigma To: Allan Jude , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201702060827.v168RJQY056084@repo.freebsd.org> Cc: d@delphij.net From: Xin Li Message-ID: <89d00010-a1b8-78ac-974e-2846b4ff320b@delphij.net> Date: Mon, 6 Feb 2017 00:36:56 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <201702060827.v168RJQY056084@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="uNjwp2PjSOos17teWDOvxXAOSJ47B4u3H" X-BeenThere: svn-src-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: Mon, 06 Feb 2017 08:37:00 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --uNjwp2PjSOos17teWDOvxXAOSJ47B4u3H Content-Type: multipart/mixed; boundary="FtXOlNrCgTW3KS2lUJuOlv4AVCClMs2fK"; protected-headers="v1" From: Xin Li To: Allan Jude , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Cc: d@delphij.net Message-ID: <89d00010-a1b8-78ac-974e-2846b4ff320b@delphij.net> Subject: Re: svn commit: r313329 - in head: bin/ed secure/usr.bin secure/usr.bin/bdes usr.bin usr.bin/enigma References: <201702060827.v168RJQY056084@repo.freebsd.org> In-Reply-To: <201702060827.v168RJQY056084@repo.freebsd.org> --FtXOlNrCgTW3KS2lUJuOlv4AVCClMs2fK Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2/6/17 00:27, Allan Jude wrote: > Author: allanjude > Date: Mon Feb 6 08:27:19 2017 > New Revision: 313329 > URL: https://svnweb.freebsd.org/changeset/base/313329 >=20 > Log: > Remove bdes(1) > =20 > The use of DES for anything is discouraged, especially with a static = IV of 0 > =20 > If you still need bdes(1) to decrypt Kirk's video lectures, see > security/bdes in ports. > =20 > This commit brought to you by the FOSDEM DevSummit and the > "remove unneeded dependancies on openssl in base" working group > =20 > Reviewed by: bapt, brnrd > Relnotes: yes > Sponsored by: FOSDEM DevSummit > Differential Revision: https://reviews.freebsd.org/D9424 >=20 > Deleted: > head/secure/usr.bin/bdes/ > Modified: > head/bin/ed/ed.1 > head/secure/usr.bin/Makefile > head/usr.bin/Makefile > head/usr.bin/enigma/enigma.1 Obsoletefiles.inc? --FtXOlNrCgTW3KS2lUJuOlv4AVCClMs2fK-- --uNjwp2PjSOos17teWDOvxXAOSJ47B4u3H Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJYmDWrAAoJEJW2GBstM+nsbq0QAKPkT/Zu74Mj4vUQPXpy9iZ1 CAZJg95C8iGDVldjQw/Z1kXWn3kawnu5LTssxMCKBkK/cy2hZm7D4G+XbmXKAqbG WV8YM0GmBIb8c4gA4WKHG9YGECJpEMcbZu/+eqO5M5OHjYjLWeaX9LYTdPOaeIK8 Dt6bzrgY1k2hmBhkqN3AtKteoaZ6YGp/xudCWq4o2chAU34krXkA0r21EqAjxROb XAaK7aqBfwCGYaTOyUwywsrvMz3PwfKB4VY8nm4eMl3bXIwEeT7E7IABtUdPsg6z F1pXd8sXQxG/b6XXGXNRDg7eXeEqUbGrIP021HEj4oc3Wp/vMClk+bzy9I3S1xVf PXzQNUpw9loyggfaMk+dCLtkADvPjkeKtFR1TneVL6QH0G4rIpIRqXa9Jr1FN7sR vMJTm1oP7J+dyTshGwE9R5y9h1NjKus6Io8/XAakiGtMG5CkkO2yQ27kPgfrahd6 FQCbKfLSwQQpU9QMNB+d6hG+TLR6ZwppeqMDahoXqKEy2Hcn0ZClE83MS+LkBKq8 NnSwFzuSFiGnIgbrJ1FOoLsfA09+4/glXK0jagaJ1p3tu/c3db7qOro4CSSCW2kz qspOQsgdWQ9pKMNZOcyYrp4+ZRsV1fXAF41KgN9GDGdLe6QBKpDGdEbqZhzaQzKN CPSax9CG2CrHxDHpp2Fo =RD89 -----END PGP SIGNATURE----- --uNjwp2PjSOos17teWDOvxXAOSJ47B4u3H-- From owner-svn-src-head@freebsd.org Mon Feb 6 08:50: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 F06D0CD22A9; Mon, 6 Feb 2017 08:50:01 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A145B850; Mon, 6 Feb 2017 08:50:01 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v168o0U0064336; Mon, 6 Feb 2017 08:50:00 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v168nwmf064277; Mon, 6 Feb 2017 08:49:58 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201702060849.v168nwmf064277@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 6 Feb 2017 08:49:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313330 - in head: contrib/netcat lib/libipsec sbin/ifconfig sbin/setkey share/man/man4 sys/conf sys/modules sys/modules/ipsec sys/modules/tcp/tcpmd5 sys/net sys/netinet sys/netinet/tcp... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 08:50:02 -0000 Author: ae Date: Mon Feb 6 08:49:57 2017 New Revision: 313330 URL: https://svnweb.freebsd.org/changeset/base/313330 Log: Merge projects/ipsec into head/. Small summary ------------- o Almost all IPsec releated code was moved into sys/netipsec. o New kernel modules added: ipsec.ko and tcpmd5.ko. New kernel option IPSEC_SUPPORT added. It enables support for loading and unloading of ipsec.ko and tcpmd5.ko kernel modules. o IPSEC_NAT_T option was removed. Now NAT-T support is enabled by default. The UDP_ENCAP_ESPINUDP_NON_IKE encapsulation type support was removed. Added TCP/UDP checksum handling for inbound packets that were decapsulated by transport mode SAs. setkey(8) modified to show run-time NAT-T configuration of SA. o New network pseudo interface if_ipsec(4) added. For now it is build as part of ipsec.ko module (or with IPSEC kernel). It implements IPsec virtual tunnels to create route-based VPNs. o The network stack now invokes IPsec functions using special methods. The only one header file should be included to declare all the needed things to work with IPsec. o All IPsec protocols handlers (ESP/AH/IPCOMP protosw) were removed. Now these protocols are handled directly via IPsec methods. o TCP_SIGNATURE support was reworked to be more close to RFC. o PF_KEY SADB was reworked: - now all security associations stored in the single SPI namespace, and all SAs MUST have unique SPI. - several hash tables added to speed up lookups in SADB. - SADB now uses rmlock to protect access, and concurrent threads can do SA lookups in the same time. - many PF_KEY message handlers were reworked to reflect changes in SADB. - SADB_UPDATE message was extended to support new PF_KEY headers: SADB_X_EXT_NEW_ADDRESS_SRC and SADB_X_EXT_NEW_ADDRESS_DST. They can be used by IKE daemon to change SA addresses. o ipsecrequest and secpolicy structures were cardinally changed to avoid locking protection for ipsecrequest. Now we support only limited number (4) of bundled SAs, but they are supported for both INET and INET6. o INPCB security policy cache was introduced. Each PCB now caches used security policies to avoid SP lookup for each packet. o For inbound security policies added the mode, when the kernel does check for full history of applied IPsec transforms. o References counting rules for security policies and security associations were changed. The proper SA locking added into xform code. o xform code was also changed. Now it is possible to unregister xforms. tdb_xxx structures were changed and renamed to reflect changes in SADB/SPDB, and changed rules for locking and refcounting. Reviewed by: gnn, wblock Obtained from: Yandex LLC Relnotes: yes Sponsored by: Yandex LLC Differential Revision: https://reviews.freebsd.org/D9352 Added: head/sbin/ifconfig/ifipsec.c (contents, props changed) head/share/man/man4/if_ipsec.4 (contents, props changed) head/sys/modules/ipsec/ head/sys/modules/ipsec/Makefile (contents, props changed) head/sys/modules/tcp/tcpmd5/ head/sys/modules/tcp/tcpmd5/Makefile (contents, props changed) head/sys/net/if_ipsec.c (contents, props changed) head/sys/net/if_ipsec.h (contents, props changed) head/sys/netipsec/ipsec_mod.c (contents, props changed) head/sys/netipsec/ipsec_pcb.c (contents, props changed) head/sys/netipsec/ipsec_support.h (contents, props changed) head/sys/netipsec/subr_ipsec.c (contents, props changed) head/sys/netipsec/udpencap.c (contents, props changed) Deleted: head/sys/netinet/ip_ipsec.c head/sys/netinet/ip_ipsec.h head/sys/netinet6/ip6_ipsec.c head/sys/netinet6/ip6_ipsec.h Modified: head/contrib/netcat/netcat.c head/lib/libipsec/pfkey.c head/lib/libipsec/pfkey_dump.c head/sbin/ifconfig/Makefile head/sbin/setkey/setkey.8 head/share/man/man4/Makefile head/share/man/man4/ipsec.4 head/share/man/man4/tcp.4 head/share/man/man4/udp.4 head/sys/conf/NOTES head/sys/conf/files head/sys/conf/files.amd64 head/sys/conf/files.arm head/sys/conf/files.arm64 head/sys/conf/files.i386 head/sys/conf/files.mips head/sys/conf/files.powerpc head/sys/conf/files.riscv head/sys/conf/files.sparc64 head/sys/conf/kern.opts.mk head/sys/conf/options head/sys/modules/Makefile head/sys/net/pfkeyv2.h head/sys/netinet/in_pcb.c head/sys/netinet/in_proto.c head/sys/netinet/ip_input.c head/sys/netinet/ip_output.c head/sys/netinet/raw_ip.c head/sys/netinet/sctp_input.c head/sys/netinet/sctp_os_bsd.h head/sys/netinet/sctp_pcb.c head/sys/netinet/tcp_input.c head/sys/netinet/tcp_output.c head/sys/netinet/tcp_stacks/fastpath.c head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_syncache.c head/sys/netinet/tcp_usrreq.c head/sys/netinet/tcp_var.h head/sys/netinet/udp.h head/sys/netinet/udp_usrreq.c head/sys/netinet6/in6.h head/sys/netinet6/in6_proto.c head/sys/netinet6/ip6_forward.c head/sys/netinet6/ip6_input.c head/sys/netinet6/ip6_output.c head/sys/netinet6/raw_ip6.c head/sys/netinet6/sctp6_usrreq.c head/sys/netinet6/udp6_usrreq.c head/sys/netipsec/ipsec.c head/sys/netipsec/ipsec.h head/sys/netipsec/ipsec6.h head/sys/netipsec/ipsec_input.c head/sys/netipsec/ipsec_mbuf.c head/sys/netipsec/ipsec_output.c head/sys/netipsec/key.c head/sys/netipsec/key.h head/sys/netipsec/key_debug.c head/sys/netipsec/key_debug.h head/sys/netipsec/keydb.h head/sys/netipsec/keysock.c head/sys/netipsec/xform.h head/sys/netipsec/xform_ah.c head/sys/netipsec/xform_esp.c head/sys/netipsec/xform_ipcomp.c head/sys/netipsec/xform_tcp.c head/usr.bin/netstat/inet.c Modified: head/contrib/netcat/netcat.c ============================================================================== --- head/contrib/netcat/netcat.c Mon Feb 6 08:27:19 2017 (r313329) +++ head/contrib/netcat/netcat.c Mon Feb 6 08:49:57 2017 (r313330) @@ -131,7 +131,7 @@ ssize_t drainbuf(int, unsigned char *, s ssize_t fillbuf(int, unsigned char *, size_t *); #ifdef IPSEC -void add_ipsec_policy(int, char *); +void add_ipsec_policy(int, int, char *); char *ipsec_policy[2]; #endif @@ -642,12 +642,6 @@ remote_connect(const char *host, const c if ((s = socket(res0->ai_family, res0->ai_socktype, res0->ai_protocol)) < 0) continue; -#ifdef IPSEC - if (ipsec_policy[0] != NULL) - add_ipsec_policy(s, ipsec_policy[0]); - if (ipsec_policy[1] != NULL) - add_ipsec_policy(s, ipsec_policy[1]); -#endif if (rtableid >= 0 && (setsockopt(s, SOL_SOCKET, SO_SETFIB, &rtableid, sizeof(rtableid)) == -1)) @@ -765,12 +759,7 @@ local_listen(char *host, char *port, str ret = setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof(x)); if (ret == -1) err(1, NULL); -#ifdef IPSEC - if (ipsec_policy[0] != NULL) - add_ipsec_policy(s, ipsec_policy[0]); - if (ipsec_policy[1] != NULL) - add_ipsec_policy(s, ipsec_policy[1]); -#endif + if (FreeBSD_Oflag) { if (setsockopt(s, IPPROTO_TCP, TCP_NOOPT, &FreeBSD_Oflag, sizeof(FreeBSD_Oflag)) == -1) @@ -1235,6 +1224,12 @@ set_common_sockopts(int s, int af) &FreeBSD_Oflag, sizeof(FreeBSD_Oflag)) == -1) err(1, "disable TCP options"); } +#ifdef IPSEC + if (ipsec_policy[0] != NULL) + add_ipsec_policy(s, af, ipsec_policy[0]); + if (ipsec_policy[1] != NULL) + add_ipsec_policy(s, af, ipsec_policy[1]); +#endif } int @@ -1360,7 +1355,7 @@ help(void) #ifdef IPSEC void -add_ipsec_policy(int s, char *policy) +add_ipsec_policy(int s, int af, char *policy) { char *raw; int e; @@ -1369,8 +1364,12 @@ add_ipsec_policy(int s, char *policy) if (raw == NULL) errx(1, "ipsec_set_policy `%s': %s", policy, ipsec_strerror()); - e = setsockopt(s, IPPROTO_IP, IP_IPSEC_POLICY, raw, - ipsec_get_policylen(raw)); + if (af == AF_INET) + e = setsockopt(s, IPPROTO_IP, IP_IPSEC_POLICY, raw, + ipsec_get_policylen(raw)); + if (af == AF_INET6) + e = setsockopt(s, IPPROTO_IPV6, IPV6_IPSEC_POLICY, raw, + ipsec_get_policylen(raw)); if (e < 0) err(1, "ipsec policy cannot be configured"); free(raw); Modified: head/lib/libipsec/pfkey.c ============================================================================== --- head/lib/libipsec/pfkey.c Mon Feb 6 08:27:19 2017 (r313329) +++ head/lib/libipsec/pfkey.c Mon Feb 6 08:49:57 2017 (r313330) @@ -1776,21 +1776,17 @@ pfkey_align(msg, mhp) case SADB_EXT_SPIRANGE: case SADB_X_EXT_POLICY: case SADB_X_EXT_SA2: - case SADB_X_EXT_SA_REPLAY: - mhp[ext->sadb_ext_type] = (caddr_t)ext; - break; case SADB_X_EXT_NAT_T_TYPE: case SADB_X_EXT_NAT_T_SPORT: case SADB_X_EXT_NAT_T_DPORT: - /* case SADB_X_EXT_NAT_T_OA: is OAI */ case SADB_X_EXT_NAT_T_OAI: case SADB_X_EXT_NAT_T_OAR: case SADB_X_EXT_NAT_T_FRAG: - if (feature_present("ipsec_natt")) { - mhp[ext->sadb_ext_type] = (caddr_t)ext; - break; - } - /* FALLTHROUGH */ + case SADB_X_EXT_SA_REPLAY: + case SADB_X_EXT_NEW_ADDRESS_SRC: + case SADB_X_EXT_NEW_ADDRESS_DST: + mhp[ext->sadb_ext_type] = (caddr_t)ext; + break; default: __ipsec_errcode = EIPSEC_INVAL_EXTTYPE; return -1; Modified: head/lib/libipsec/pfkey_dump.c ============================================================================== --- head/lib/libipsec/pfkey_dump.c Mon Feb 6 08:27:19 2017 (r313329) +++ head/lib/libipsec/pfkey_dump.c Mon Feb 6 08:49:57 2017 (r313330) @@ -220,6 +220,9 @@ pfkey_sadump(m) struct sadb_ident *m_sid, *m_did; struct sadb_sens *m_sens; struct sadb_x_sa_replay *m_sa_replay; + struct sadb_x_nat_t_type *natt_type; + struct sadb_x_nat_t_port *natt_sport, *natt_dport; + struct sadb_address *natt_oai, *natt_oar; /* check pfkey message. */ if (pfkey_align(m, mhp)) { @@ -245,33 +248,46 @@ pfkey_sadump(m) m_did = (struct sadb_ident *)mhp[SADB_EXT_IDENTITY_DST]; m_sens = (struct sadb_sens *)mhp[SADB_EXT_SENSITIVITY]; m_sa_replay = (struct sadb_x_sa_replay *)mhp[SADB_X_EXT_SA_REPLAY]; + natt_type = (struct sadb_x_nat_t_type *)mhp[SADB_X_EXT_NAT_T_TYPE]; + natt_sport = (struct sadb_x_nat_t_port *)mhp[SADB_X_EXT_NAT_T_SPORT]; + natt_dport = (struct sadb_x_nat_t_port *)mhp[SADB_X_EXT_NAT_T_DPORT]; + natt_oai = (struct sadb_address *)mhp[SADB_X_EXT_NAT_T_OAI]; + natt_oar = (struct sadb_address *)mhp[SADB_X_EXT_NAT_T_OAR]; + /* source address */ if (m_saddr == NULL) { printf("no ADDRESS_SRC extension.\n"); return; } - printf("%s ", str_ipaddr((struct sockaddr *)(m_saddr + 1))); + printf("%s", str_ipaddr((struct sockaddr *)(m_saddr + 1))); + if (natt_type != NULL && natt_sport != NULL) + printf("[%u]", ntohs(natt_sport->sadb_x_nat_t_port_port)); /* destination address */ if (m_daddr == NULL) { - printf("no ADDRESS_DST extension.\n"); + printf("\nno ADDRESS_DST extension.\n"); return; } - printf("%s ", str_ipaddr((struct sockaddr *)(m_daddr + 1))); + printf(" %s", str_ipaddr((struct sockaddr *)(m_daddr + 1))); + if (natt_type != NULL && natt_dport != NULL) + printf("[%u]", ntohs(natt_dport->sadb_x_nat_t_port_port)); /* SA type */ if (m_sa == NULL) { - printf("no SA extension.\n"); + printf("\nno SA extension.\n"); return; } if (m_sa2 == NULL) { - printf("no SA2 extension.\n"); + printf("\nno SA2 extension.\n"); return; } printf("\n\t"); - GETMSGSTR(str_satype, m->sadb_msg_satype); + if (m->sadb_msg_satype == SADB_SATYPE_ESP && natt_type != NULL) + printf("esp-udp "); + else + GETMSGSTR(str_satype, m->sadb_msg_satype); printf("mode="); GETMSGSTR(str_mode, m_sa2->sadb_x_sa2_mode); @@ -282,6 +298,18 @@ pfkey_sadump(m) (u_int32_t)m_sa2->sadb_x_sa2_reqid, (u_int32_t)m_sa2->sadb_x_sa2_reqid); + /* other NAT-T information */ + if (natt_type != NULL && (natt_oai != NULL || natt_oar != NULL)) { + printf("\tNAT:"); + if (natt_oai != NULL) + printf(" OAI=%s", + str_ipaddr((struct sockaddr *)(natt_oai + 1))); + if (natt_oar != NULL) + printf(" OAR=%s", + str_ipaddr((struct sockaddr *)(natt_oar + 1))); + printf("\n"); + } + /* encryption key */ if (m->sadb_msg_satype == SADB_X_SATYPE_IPCOMP) { printf("\tC: "); Modified: head/sbin/ifconfig/Makefile ============================================================================== --- head/sbin/ifconfig/Makefile Mon Feb 6 08:27:19 2017 (r313329) +++ head/sbin/ifconfig/Makefile Mon Feb 6 08:49:57 2017 (r313330) @@ -34,6 +34,7 @@ SRCS+= ifvlan.c # SIOC[GS]ETVLAN suppor SRCS+= ifvxlan.c # VXLAN support SRCS+= ifgre.c # GRE keys etc SRCS+= ifgif.c # GIF reversed header workaround +SRCS+= ifipsec.c # IPsec VTI SRCS+= sfp.c # SFP/SFP+ information LIBADD+= m Added: head/sbin/ifconfig/ifipsec.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/ifconfig/ifipsec.c Mon Feb 6 08:49:57 2017 (r313330) @@ -0,0 +1,101 @@ +/*- + * Copyright (c) 2016 Yandex LLC + * Copyright (c) 2016 Andrey V. Elsukov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "ifconfig.h" + +static void +ipsec_status(int s) +{ + uint32_t reqid; + + ifr.ifr_data = (caddr_t)&reqid; + if (ioctl(s, IPSECGREQID, &ifr) == -1) + return; + printf("\treqid: %u\n", reqid); +} + +static +DECL_CMD_FUNC(setreqid, val, arg) +{ + char *ep; + uint32_t v; + + v = strtoul(val, &ep, 0); + if (*ep != '\0') { + warn("Invalid reqid value %s", val); + return; + } + ifr.ifr_data = (char *)&v; + if (ioctl(s, IPSECSREQID, &ifr) == -1) { + warn("ioctl(IPSECSREQID)"); + return; + } +} + +static struct cmd ipsec_cmds[] = { + DEF_CMD_ARG("reqid", setreqid), +}; + +static struct afswtch af_ipsec = { + .af_name = "af_ipsec", + .af_af = AF_UNSPEC, + .af_other_status = ipsec_status, +}; + +static __constructor void +ipsec_ctor(void) +{ + size_t i; + + for (i = 0; i < nitems(ipsec_cmds); i++) + cmd_register(&ipsec_cmds[i]); + af_register(&af_ipsec); +#undef N +} Modified: head/sbin/setkey/setkey.8 ============================================================================== --- head/sbin/setkey/setkey.8 Mon Feb 6 08:27:19 2017 (r313329) +++ head/sbin/setkey/setkey.8 Mon Feb 6 08:49:57 2017 (r313330) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 3, 2016 +.Dd February 6, 2017 .Dt SETKEY 8 .Os .\" @@ -270,8 +270,6 @@ must be a decimal number, or a hexadecim prefix. SPI values between 0 and 255 are reserved for future use by IANA and they cannot be used. -TCP-MD5 associations must use 0x1000 and therefore only have per-host -granularity at this time. .\" .Pp .It Ar extensions Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Mon Feb 6 08:27:19 2017 (r313329) +++ head/share/man/man4/Makefile Mon Feb 6 08:49:57 2017 (r313330) @@ -201,6 +201,7 @@ MAN= aac.4 \ icmp.4 \ icmp6.4 \ ida.4 \ + if_ipsec.4 \ ifmib.4 \ ig4.4 \ igb.4 \ Added: head/share/man/man4/if_ipsec.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/if_ipsec.4 Mon Feb 6 08:49:57 2017 (r313330) @@ -0,0 +1,141 @@ +.\" Copyright (c) 2017 Andrey V. Elsukov +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd February 6, 2017 +.Dt if_ipsec 4 +.Os +.Sh NAME +.Nm if_ipsec +.Nd IPsec virtual tunneling interface +.Sh SYNOPSIS +The +.Cm if_ipsec +network interface is a part of the +.Fx +IPsec implementation. +To compile it into the kernel, place this line in the kernel +configuration file: +.Bd -ragged -offset indent +.Cd "options IPSEC" +.Ed +.Pp +It can also be loaded as part of the +.Cm ipsec +kernel module if the kernel was compiled with +.Bd -ragged -offset indent +.Cd "options IPSEC_SUPPORT" +.Ed +.Sh DESCRIPTION +The +.Nm +network interface is targeted for creating route-based VPNs. +It can tunnel IPv4 and IPv6 traffic over either IPv4 or IPv6 and secure +it with ESP. +.Pp +.Nm +interfaces are dynamically created and destroyed with the +.Xr ifconfig 8 +.Cm create +and +.Cm destroy +subcommands. +The administrator must configure IPsec +.Cm tunnel +endpoint addresses. +These addresses will be used for the outer IP header of ESP packets. +The administrator can also configure the protocol and addresses for the inner +IP header with +.Xr ifconfig 8 , +and modify the routing table to route the packets through the +.Nm +interface. +.Pp +When the +.Nm +interface is configured, it automatically creates special security policies. +These policies can be used to acquire security associations from the IKE daemon, +which are needed for establishing an IPsec tunnel. +It is also possible to create needed security associations manually with the +.Xr setkey 8 +utility. +.Pp +Each +.Nm +interface has an additional numeric configuration option +.Cm reqid Ar id . +This +.Ar id +is used to distinguish traffic and security policies between several +.Nm +interfaces. +The +.Cm reqid +can be specified on interface creation and changed later. +If not specified, it is automatically assigned. +Note that changing +.Cm reqid +will lead to generation of new security policies, and this +may require creating new security associations. +.Sh EXAMPLES +The example below shows manual configuration of an IPsec tunnel +between two FreeBSD hosts. +Host A has the IP address 192.168.0.3, and host B has the IP address +192.168.0.5. +.Pp +On host A: +.Bd -literal -offset indent +ifconfig ipsec0 create reqid 100 +ifconfig ipsec0 inet tunnel 192.168.0.3 192.168.0.5 +ifconfig ipsec0 inet 172.16.0.3/16 172.16.0.5 +setkey -c +add 192.168.0.3 192.168.0.5 esp 10000 -m tunnel -u 100 -E rijndael-cbc "VerySecureKey!!1"; +add 192.168.0.5 192.168.0.3 esp 10001 -m tunnel -u 100 -E rijndael-cbc "VerySecureKey!!2"; +^D +.Ed +.Pp +On host B: +.Bd -literal -offset indent +ifconfig ipsec0 create reqid 200 +ifconfig ipsec0 inet tunnel 192.168.0.5 192.168.0.3 +ifconfig ipsec0 inet 172.16.0.5/16 172.16.0.3 +setkey -c +add 192.168.0.3 192.168.0.5 esp 10000 -m tunnel -u 200 -E rijndael-cbc "VerySecureKey!!1"; +add 192.168.0.5 192.168.0.3 esp 10001 -m tunnel -u 200 -E rijndael-cbc "VerySecureKey!!2"; +^D +.Ed +.Pp +Note the value 100 on host A and value 200 on host B are used as reqid. +The same value must be used as identifier of the policy entry in the +.Xr setkey 8 +command. +.Sh SEE ALSO +.Xr gif 4 , +.Xr gre 4 , +.Xr ipsec 4 , +.Xr ifconfig 8 , +.Xr setkey 8 +.Sh AUTHORS +.An Andrey V. Elsukov Aq Mt ae@FreeBSD.org Modified: head/share/man/man4/ipsec.4 ============================================================================== --- head/share/man/man4/ipsec.4 Mon Feb 6 08:27:19 2017 (r313329) +++ head/share/man/man4/ipsec.4 Mon Feb 6 08:49:57 2017 (r313330) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 29, 2009 +.Dd February 6, 2017 .Dt IPSEC 4 .Os .Sh NAME @@ -37,6 +37,7 @@ .Nd Internet Protocol Security protocol .Sh SYNOPSIS .Cd "options IPSEC" +.Cd "options IPSEC_SUPPORT" .Cd "device crypto" .Pp .In sys/types.h @@ -151,6 +152,16 @@ Refer to .Xr setkey 8 on how to use it. .Pp +Depending on the socket's address family, IPPROTO_IP or IPPROTO_IPV6 +transport level and IP_IPSEC_POLICY or IPV6_IPSEC_POLICY socket options +may be used to configure per-socket security policies. +A properly-formed IPsec policy specification structure can be +created using +.Xr ipsec_set_policy 3 +function and used as socket option value for the +.Xr setsockopt 2 +call. +.Pp When setting policies using the .Xr setkey 8 command, the @@ -228,6 +239,8 @@ for tweaking the kernel's IPsec behavior .It "net.inet.ipsec.dfbit integer yes" .It "net.inet.ipsec.ecn integer yes" .It "net.inet.ipsec.debug integer yes" +.It "net.inet.ipsec.natt_cksum_policy integer yes" +.It "net.inet.ipsec.check_policy_history integer yes" .It "net.inet6.ipsec6.ecn integer yes" .It "net.inet6.ipsec6.debug integer yes" .El @@ -270,6 +283,23 @@ talks more about the behavior. .It Li ipsec.debug If set to non-zero, debug messages will be generated via .Xr syslog 3 . +.It Li ipsec.natt_cksum_policy +Controls how the kernel handles TCP and UDP checksums when ESP in UDP +encapsulation is used for IPsec transport mode. +If set to a non-zero value, the kernel fully recomputes checksums for +inbound TCP segments and UDP datagrams after they are decapsulated and +decrypted. +If set to 0 and original addresses were configured for corresponding SA +by the IKE daemon, the kernel incrementally recomputes checksums for +inbound TCP segments and UDP datagrams. +If addresses were not configured, the checksums are ignored. +.It Li ipsec.check_policy_history +Enables strict policy checking for inbound packets. +By default, inbound security policies check that packets handled by IPsec +have been decrypted and authenticated. +If this variable is set to a non-zero value, each packet handled by IPsec +is checked against the history of IPsec security associations. +The IPsec security protocol, mode, and SA addresses must match. .El .Pp Variables under the @@ -305,6 +335,7 @@ routines from looking into the IP payloa .Xr ipsec_set_policy 3 , .Xr crypto 4 , .Xr enc 4 , +.Xr if_ipsec 4 , .Xr icmp6 4 , .Xr intro 4 , .Xr ip6 4 , Modified: head/share/man/man4/tcp.4 ============================================================================== --- head/share/man/man4/tcp.4 Mon Feb 6 08:27:19 2017 (r313329) +++ head/share/man/man4/tcp.4 Mon Feb 6 08:49:57 2017 (r313330) @@ -34,7 +34,7 @@ .\" From: @(#)tcp.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd Jan 29, 2017 +.Dd February 6, 2017 .Dt TCP 4 .Os .Sh NAME @@ -272,33 +272,27 @@ or the internal send buffer is filled. This option enables the use of MD5 digests (also known as TCP-MD5) on writes to the specified socket. Outgoing traffic is digested; -digests on incoming traffic are verified if the -.Va net.inet.tcp.signature_verify_input -sysctl is nonzero. -The current default behavior for the system is to respond to a system -advertising this option with TCP-MD5; this may change. +digests on incoming traffic are verified. +When this option is enabled on a socket, all inbound and outgoing +TCP segments must be signed with MD5 digests. .Pp One common use for this in a .Fx router deployment is to enable based routers to interwork with Cisco equipment at peering points. Support for this feature conforms to RFC 2385. -Only IPv4 -.Pq Dv AF_INET -sessions are supported. .Pp In order for this option to function correctly, it is necessary for the administrator to add a tcp-md5 key entry to the system's security associations database (SADB) using the .Xr setkey 8 utility. -This entry must have an SPI of 0x1000 and can therefore only be specified -on a per-host basis at this time. +This entry can only be specified on a per-host basis at this time. .Pp -If an SADB entry cannot be found for the destination, the outgoing traffic -will have an invalid digest option prepended, and the following error message -will be visible on the system console: -.Em "tcp_signature_compute: SADB lookup failed for %d.%d.%d.%d" . +If an SADB entry cannot be found for the destination, +the system does not send any outgoing segments and drops any inbound segments. +.Pp +Each dropped segment is taken into account in the TCP protocol statistics. .El .Pp The option level for the Modified: head/share/man/man4/udp.4 ============================================================================== --- head/share/man/man4/udp.4 Mon Feb 6 08:27:19 2017 (r313329) +++ head/share/man/man4/udp.4 Mon Feb 6 08:49:57 2017 (r313330) @@ -28,7 +28,7 @@ .\" @(#)udp.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd June 5, 1993 +.Dd February 6, 2017 .Dt UDP 4 .Os .Sh NAME @@ -99,6 +99,17 @@ transport level may be used with .Tn UDP ; see .Xr ip 4 . +.Tn UDP_ENCAP +socket option may be used at the +.Tn IPPROTO_UDP +level to encapsulate +.Tn ESP +packets in +.Tn UDP . +Only one value is supported for this option: +.Tn UDP_ENCAP_ESPINUDP +from RFC 3948, defined in +.In netinet/udp.h . .Sh MIB VARIABLES The .Nm @@ -158,7 +169,8 @@ exists. .Xr blackhole 4 , .Xr inet 4 , .Xr intro 4 , -.Xr ip 4 +.Xr ip 4 , +.Xr udplite 4 .Sh HISTORY The .Nm Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Mon Feb 6 08:27:19 2017 (r313329) +++ head/sys/conf/NOTES Mon Feb 6 08:49:57 2017 (r313330) @@ -627,12 +627,12 @@ options TCP_OFFLOAD # TCP offload supp # In order to enable IPSEC you MUST also add device crypto to # your kernel configuration options IPSEC #IP security (requires device crypto) + +# Option IPSEC_SUPPORT does not enable IPsec, but makes it possible to +# load it as a kernel module. You still MUST add device crypto to your kernel +# configuration. +options IPSEC_SUPPORT #options IPSEC_DEBUG #debug for IP security -# -# Set IPSEC_NAT_T to enable NAT-Traversal support. This enables -# optional UDP encapsulation of ESP packets. -# -options IPSEC_NAT_T #NAT-T support, UDP encap of ESP # # SMB/CIFS requester @@ -1027,7 +1027,8 @@ options ACCEPT_FILTER_HTTP # carried in TCP option 19. This option is commonly used to protect # TCP sessions (e.g. BGP) where IPSEC is not available nor desirable. # This is enabled on a per-socket basis using the TCP_MD5SIG socket option. -# This requires the use of 'device crypto' and 'options IPSEC'. +# This requires the use of 'device crypto' and either 'options IPSEC' or +# 'options IPSEC_SUPPORT'. options TCP_SIGNATURE #include support for RFC 2385 # DUMMYNET enables the "dummynet" bandwidth limiter. You need IPFIREWALL Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Feb 6 08:27:19 2017 (r313329) +++ head/sys/conf/files Mon Feb 6 08:49:57 2017 (r313330) @@ -587,22 +587,24 @@ contrib/ngatm/netnatm/sig/sig_unimsgcpy. compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/sig/sig_verify.c optional ngatm_uni \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" -crypto/blowfish/bf_ecb.c optional ipsec -crypto/blowfish/bf_skey.c optional crypto | ipsec -crypto/camellia/camellia.c optional crypto | ipsec -crypto/camellia/camellia-api.c optional crypto | ipsec -crypto/des/des_ecb.c optional crypto | ipsec | netsmb -crypto/des/des_setkey.c optional crypto | ipsec | netsmb +crypto/blowfish/bf_ecb.c optional ipsec | ipsec_support +crypto/blowfish/bf_skey.c optional crypto | ipsec | ipsec_support +crypto/camellia/camellia.c optional crypto | ipsec | ipsec_support +crypto/camellia/camellia-api.c optional crypto | ipsec | ipsec_support +crypto/des/des_ecb.c optional crypto | ipsec | ipsec_support | netsmb +crypto/des/des_setkey.c optional crypto | ipsec | ipsec_support | netsmb crypto/rc4/rc4.c optional netgraph_mppc_encryption | kgssapi crypto/rijndael/rijndael-alg-fst.c optional crypto | ekcd | geom_bde | \ - ipsec | random !random_loadable | wlan_ccmp + ipsec | ipsec_support | random !random_loadable | wlan_ccmp crypto/rijndael/rijndael-api-fst.c optional ekcd | geom_bde | random !random_loadable -crypto/rijndael/rijndael-api.c optional crypto | ipsec | wlan_ccmp +crypto/rijndael/rijndael-api.c optional crypto | ipsec | ipsec_support | \ + wlan_ccmp crypto/sha1.c optional carp | crypto | ipsec | \ - netgraph_mppc_encryption | sctp -crypto/sha2/sha256c.c optional crypto | ekcd | geom_bde | ipsec | random !random_loadable | \ - sctp | zfs -crypto/sha2/sha512c.c optional crypto | geom_bde | ipsec | zfs + ipsec_support | netgraph_mppc_encryption | sctp +crypto/sha2/sha256c.c optional crypto | ekcd | geom_bde | ipsec | \ + ipsec_support | random !random_loadable | sctp | zfs +crypto/sha2/sha512c.c optional crypto | geom_bde | ipsec | \ + ipsec_support | zfs crypto/skein/skein.c optional crypto | zfs crypto/skein/skein_block.c optional crypto | zfs crypto/siphash/siphash.c optional inet | inet6 @@ -3879,8 +3881,7 @@ libkern/strtouq.c standard libkern/strvalid.c standard libkern/timingsafe_bcmp.c standard libkern/zlib.c optional crypto | geom_uzip | ipsec | \ - mxge | netgraph_deflate | \ - ddb_ctf | gzio + ipsec_support | mxge | netgraph_deflate | ddb_ctf | gzio net/altq/altq_cbq.c optional altq net/altq/altq_cdnr.c optional altq net/altq/altq_codel.c optional altq @@ -3916,6 +3917,7 @@ net/if_fwsubr.c optional fwip net/if_gif.c optional gif inet | gif inet6 | \ netgraph_gif inet | netgraph_gif inet6 net/if_gre.c optional gre inet | gre inet6 +net/if_ipsec.c optional inet ipsec | inet6 ipsec net/if_iso88025subr.c optional token net/if_lagg.c optional lagg net/if_loop.c optional loop @@ -4104,7 +4106,6 @@ netinet/ip_encap.c optional inet | inet netinet/ip_fastfwd.c optional inet netinet/ip_icmp.c optional inet | inet6 netinet/ip_input.c optional inet -netinet/ip_ipsec.c optional inet ipsec netinet/ip_mroute.c optional mrouting inet netinet/ip_options.c optional inet netinet/ip_output.c optional inet @@ -4174,7 +4175,6 @@ netinet6/ip6_id.c optional inet6 netinet6/ip6_input.c optional inet6 netinet6/ip6_mroute.c optional mrouting inet6 netinet6/ip6_output.c optional inet6 -netinet6/ip6_ipsec.c optional inet6 ipsec netinet6/mld6.c optional inet6 netinet6/nd6.c optional inet6 netinet6/nd6_nbr.c optional inet6 @@ -4187,15 +4187,25 @@ netinet6/udp6_usrreq.c optional inet6 netipsec/ipsec.c optional ipsec inet | ipsec inet6 netipsec/ipsec_input.c optional ipsec inet | ipsec inet6 netipsec/ipsec_mbuf.c optional ipsec inet | ipsec inet6 +netipsec/ipsec_mod.c optional ipsec inet | ipsec inet6 netipsec/ipsec_output.c optional ipsec inet | ipsec inet6 -netipsec/key.c optional ipsec inet | ipsec inet6 -netipsec/key_debug.c optional ipsec inet | ipsec inet6 -netipsec/keysock.c optional ipsec inet | ipsec inet6 +netipsec/ipsec_pcb.c optional ipsec inet | ipsec inet6 | \ + ipsec_support inet | ipsec_support inet6 +netipsec/key.c optional ipsec inet | ipsec inet6 | \ + ipsec_support inet | ipsec_support inet6 +netipsec/key_debug.c optional ipsec inet | ipsec inet6 | \ + ipsec_support inet | ipsec_support inet6 +netipsec/keysock.c optional ipsec inet | ipsec inet6 | \ + ipsec_support inet | ipsec_support inet6 +netipsec/subr_ipsec.c optional ipsec inet | ipsec inet6 | \ + ipsec_support inet | ipsec_support inet6 +netipsec/udpencap.c optional ipsec inet netipsec/xform_ah.c optional ipsec inet | ipsec inet6 netipsec/xform_esp.c optional ipsec inet | ipsec inet6 netipsec/xform_ipcomp.c optional ipsec inet | ipsec inet6 netipsec/xform_tcp.c optional ipsec inet tcp_signature | \ - ipsec inet6 tcp_signature + ipsec inet6 tcp_signature | ipsec_support inet tcp_signature | \ + ipsec_support inet6 tcp_signature netnatm/natm.c optional natm netnatm/natm_pcb.c optional natm netnatm/natm_proto.c optional natm @@ -4547,18 +4557,18 @@ ofed/drivers/infiniband/hw/mthca/mthca_u compile-with "${OFED_C}" # crypto support -opencrypto/cast.c optional crypto | ipsec -opencrypto/criov.c optional crypto | ipsec -opencrypto/crypto.c optional crypto | ipsec +opencrypto/cast.c optional crypto | ipsec | ipsec_support +opencrypto/criov.c optional crypto | ipsec | ipsec_support +opencrypto/crypto.c optional crypto | ipsec | ipsec_support opencrypto/cryptodev.c optional cryptodev -opencrypto/cryptodev_if.m optional crypto | ipsec -opencrypto/cryptosoft.c optional crypto | ipsec -opencrypto/cryptodeflate.c optional crypto | ipsec -opencrypto/gmac.c optional crypto | ipsec -opencrypto/gfmult.c optional crypto | ipsec -opencrypto/rmd160.c optional crypto | ipsec -opencrypto/skipjack.c optional crypto | ipsec -opencrypto/xform.c optional crypto | ipsec +opencrypto/cryptodev_if.m optional crypto | ipsec | ipsec_support +opencrypto/cryptosoft.c optional crypto | ipsec | ipsec_support +opencrypto/cryptodeflate.c optional crypto | ipsec | ipsec_support +opencrypto/gmac.c optional crypto | ipsec | ipsec_support +opencrypto/gfmult.c optional crypto | ipsec | ipsec_support +opencrypto/rmd160.c optional crypto | ipsec | ipsec_support +opencrypto/skipjack.c optional crypto | ipsec | ipsec_support +opencrypto/xform.c optional crypto | ipsec | ipsec_support rpc/auth_none.c optional krpc | nfslockd | nfscl | nfsd rpc/auth_unix.c optional krpc | nfslockd | nfscl | nfsd rpc/authunix_prot.c optional krpc | nfslockd | nfscl | nfsd Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Mon Feb 6 08:27:19 2017 (r313329) +++ head/sys/conf/files.amd64 Mon Feb 6 08:49:57 2017 (r313330) @@ -180,8 +180,9 @@ aesni_wrap.o optional aesni \ compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes ${.IMPSRC}" \ no-implicit-rule \ clean "aesni_wrap.o" -crypto/blowfish/bf_enc.c optional crypto | ipsec -crypto/des/des_enc.c optional crypto | ipsec | netsmb +crypto/blowfish/bf_enc.c optional crypto | ipsec | ipsec_support +crypto/des/des_enc.c optional crypto | ipsec | \ + ipsec_support | netsmb crypto/via/padlock.c optional padlock crypto/via/padlock_cipher.c optional padlock crypto/via/padlock_hash.c optional padlock Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Mon Feb 6 08:27:19 2017 (r313329) +++ head/sys/conf/files.arm Mon Feb 6 08:49:57 2017 (r313330) @@ -112,8 +112,8 @@ cddl/compat/opensolaris/kern/opensolaris cddl/dev/dtrace/arm/dtrace_asm.S optional dtrace compile-with "${DTRACE_S}" cddl/dev/dtrace/arm/dtrace_subr.c optional dtrace compile-with "${DTRACE_C}" cddl/dev/fbt/arm/fbt_isa.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" -crypto/blowfish/bf_enc.c optional crypto | ipsec -crypto/des/des_enc.c optional crypto | ipsec | netsmb +crypto/blowfish/bf_enc.c optional crypto | ipsec | ipsec_support +crypto/des/des_enc.c optional crypto | ipsec | ipsec_support | netsmb dev/cpufreq/cpufreq_dt.c optional cpufreq fdt dev/dwc/if_dwc.c optional dwc dev/dwc/if_dwc_if.m optional dwc Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Mon Feb 6 08:27:19 2017 (r313329) +++ head/sys/conf/files.arm64 Mon Feb 6 08:49:57 2017 (r313330) @@ -142,8 +142,8 @@ armv8_crypto_wrap.o optional armv8crypt compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc:N-mgeneral-regs-only} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -march=armv8a+crypto ${.IMPSRC}" \ no-implicit-rule \ clean "armv8_crypto_wrap.o" -crypto/blowfish/bf_enc.c optional crypto | ipsec -crypto/des/des_enc.c optional crypto | ipsec | netsmb +crypto/blowfish/bf_enc.c optional crypto | ipsec | ipsec_support +crypto/des/des_enc.c optional crypto | ipsec | ipsec_support | netsmb dev/acpica/acpi_if.m optional acpi dev/ahci/ahci_generic.c optional ahci dev/cpufreq/cpufreq_dt.c optional cpufreq fdt Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Mon Feb 6 08:27:19 2017 (r313329) +++ head/sys/conf/files.i386 Mon Feb 6 08:49:57 2017 (r313330) @@ -143,7 +143,7 @@ compat/svr4/svr4_syscallnames.c optional compat/svr4/svr4_sysent.c optional compat_svr4 compat/svr4/svr4_sysvec.c optional compat_svr4 compat/svr4/svr4_termios.c optional compat_svr4 -bf_enc.o optional crypto | ipsec \ +bf_enc.o optional crypto | ipsec | ipsec_support \ dependency "$S/crypto/blowfish/arch/i386/bf_enc.S $S/crypto/blowfish/arch/i386/bf_enc_586.S $S/crypto/blowfish/arch/i386/bf_enc_686.S" \ compile-with "${CC} -c -I$S/crypto/blowfish/arch/i386 ${ASM_CFLAGS} ${WERROR} ${.IMPSRC}" \ no-implicit-rule @@ -159,7 +159,7 @@ aesni_wrap.o optional aesni \ compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes ${.IMPSRC}" \ no-implicit-rule \ clean "aesni_wrap.o" -crypto/des/arch/i386/des_enc.S optional crypto | ipsec | netsmb +crypto/des/arch/i386/des_enc.S optional crypto | ipsec | ipsec_support | netsmb crypto/via/padlock.c optional padlock crypto/via/padlock_cipher.c optional padlock crypto/via/padlock_hash.c optional padlock Modified: head/sys/conf/files.mips ============================================================================== --- head/sys/conf/files.mips Mon Feb 6 08:27:19 2017 (r313329) +++ head/sys/conf/files.mips Mon Feb 6 08:49:57 2017 (r313330) @@ -83,8 +83,10 @@ mips/mips/sc_machdep.c optional sc dev/uart/uart_cpu_fdt.c optional uart fdt # crypto support -- use generic -crypto/blowfish/bf_enc.c optional crypto | ipsec -crypto/des/des_enc.c optional crypto | ipsec | netsmb +crypto/blowfish/bf_enc.c optional crypto | ipsec | \ + ipsec_support +crypto/des/des_enc.c optional crypto | ipsec | \ + ipsec_support | netsmb # AP common nvram interface MIPS specific, but maybe should be more generic dev/nvram2env/nvram2env_mips.c optional nvram2env Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Mon Feb 6 08:27:19 2017 (r313329) +++ head/sys/conf/files.powerpc Mon Feb 6 08:49:57 2017 (r313330) @@ -20,8 +20,8 @@ cddl/contrib/opensolaris/common/atomic/p cddl/dev/dtrace/powerpc/dtrace_asm.S optional dtrace compile-with "${DTRACE_S}" cddl/dev/dtrace/powerpc/dtrace_subr.c optional dtrace compile-with "${DTRACE_C}" cddl/dev/fbt/powerpc/fbt_isa.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" -crypto/blowfish/bf_enc.c optional crypto | ipsec -crypto/des/des_enc.c optional crypto | ipsec | netsmb +crypto/blowfish/bf_enc.c optional crypto | ipsec | ipsec_support +crypto/des/des_enc.c optional crypto | ipsec | ipsec_support | netsmb dev/bm/if_bm.c optional bm powermac dev/adb/adb_bus.c optional adb dev/adb/adb_kbd.c optional adb Modified: head/sys/conf/files.riscv ============================================================================== --- head/sys/conf/files.riscv Mon Feb 6 08:27:19 2017 (r313329) +++ head/sys/conf/files.riscv Mon Feb 6 08:49:57 2017 (r313330) @@ -3,8 +3,8 @@ cddl/compat/opensolaris/kern/opensolaris cddl/dev/dtrace/riscv/dtrace_asm.S optional dtrace compile-with "${DTRACE_S}" cddl/dev/dtrace/riscv/dtrace_subr.c optional dtrace compile-with "${DTRACE_C}" cddl/dev/fbt/riscv/fbt_isa.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" -crypto/blowfish/bf_enc.c optional crypto | ipsec -crypto/des/des_enc.c optional crypto | ipsec | netsmb +crypto/blowfish/bf_enc.c optional crypto | ipsec | ipsec_support +crypto/des/des_enc.c optional crypto | ipsec | ipsec_support | netsmb dev/ofw/ofw_cpu.c optional fdt dev/uart/uart_cpu_fdt.c optional uart fdt dev/xilinx/axi_quad_spi.c optional xilinx_spi Modified: head/sys/conf/files.sparc64 ============================================================================== --- head/sys/conf/files.sparc64 Mon Feb 6 08:27:19 2017 (r313329) +++ head/sys/conf/files.sparc64 Mon Feb 6 08:49:57 2017 (r313330) @@ -23,8 +23,8 @@ ukbdmap.h optional ukbd_dflt_keymap \ clean "ukbdmap.h" # cddl/contrib/opensolaris/common/atomic/sparc64/opensolaris_atomic.S optional zfs compile-with "${ZFS_S}" -crypto/blowfish/bf_enc.c optional crypto | ipsec -crypto/des/des_enc.c optional crypto | ipsec | netsmb +crypto/blowfish/bf_enc.c optional crypto | ipsec | ipsec_support +crypto/des/des_enc.c optional crypto | ipsec | ipsec_support | netsmb dev/atkbdc/atkbd.c optional atkbd atkbdc dev/atkbdc/atkbd_atkbdc.c optional atkbd atkbdc dev/atkbdc/atkbdc.c optional atkbdc Modified: head/sys/conf/kern.opts.mk ============================================================================== --- head/sys/conf/kern.opts.mk Mon Feb 6 08:27:19 2017 (r313329) +++ head/sys/conf/kern.opts.mk Mon Feb 6 08:49:57 2017 (r313330) @@ -34,6 +34,7 @@ __DEFAULT_YES_OPTIONS = \ INET \ INET6 \ IPFILTER \ + IPSEC_SUPPORT \ ISCSI \ KERNEL_SYMBOLS \ NETGRAPH \ Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Mon Feb 6 08:27:19 2017 (r313329) +++ head/sys/conf/options Mon Feb 6 08:49:57 2017 (r313330) @@ -428,7 +428,7 @@ IPFIREWALL_VERBOSE opt_ipfw.h IPFIREWALL_VERBOSE_LIMIT opt_ipfw.h IPSEC opt_ipsec.h IPSEC_DEBUG opt_ipsec.h -IPSEC_NAT_T opt_ipsec.h +IPSEC_SUPPORT opt_ipsec.h IPSTEALTH KRPC LIBALIAS @@ -451,7 +451,7 @@ TCP_HHOOK opt_inet.h TCP_OFFLOAD opt_inet.h # Enable code to dispatch TCP offloading TCP_RFC7413 opt_inet.h TCP_RFC7413_MAX_KEYS opt_inet.h -TCP_SIGNATURE opt_inet.h +TCP_SIGNATURE opt_ipsec.h VLAN_ARRAY opt_vlan.h XBONEHACK FLOWTABLE opt_route.h Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Mon Feb 6 08:27:19 2017 (r313329) +++ head/sys/modules/Makefile Mon Feb 6 08:49:57 2017 (r313330) @@ -177,6 +177,7 @@ SUBDIR= \ ip6_mroute_mod \ ip_mroute_mod \ ${_ips} \ + ${_ipsec} \ ${_ipw} \ ${_ipwfw} \ ${_isci} \ @@ -357,6 +358,7 @@ SUBDIR= \ sysvipc \ ${_ti} \ ${_tcp_fastpath} \ + ${_tcpmd5} \ tests/framework \ tests/callout_test \ tl \ @@ -447,6 +449,10 @@ _toecore= toecore _if_enc= if_enc _if_gif= if_gif _if_gre= if_gre +.if ${MK_IPSEC_SUPPORT} != "no" +_ipsec= ipsec +_tcpmd5= tcp/tcpmd5 +.endif .endif .if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \ Added: head/sys/modules/ipsec/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/ipsec/Makefile Mon Feb 6 08:49:57 2017 (r313330) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../net ${.CURDIR}/../../netipsec + +KMOD= ipsec +SRCS= if_ipsec.c ipsec.c ipsec_input.c ipsec_mbuf.c ipsec_mod.c \ + ipsec_output.c xform_ah.c xform_esp.c xform_ipcomp.c \ + opt_inet.h opt_inet6.h opt_ipsec.h opt_sctp.h +SRCS.INET= udpencap.c + +opt_ipsec.h: + @echo "#define IPSEC_SUPPORT 1" > ${.TARGET} + +.include Added: head/sys/modules/tcp/tcpmd5/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/tcp/tcpmd5/Makefile Mon Feb 6 08:49:57 2017 (r313330) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Mon Feb 6 08:56: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 DF1CDCD2516; Mon, 6 Feb 2017 08:56:05 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF05FD54; Mon, 6 Feb 2017 08:56:05 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v168u4i3068296; Mon, 6 Feb 2017 08:56:04 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v168u4Db068295; Mon, 6 Feb 2017 08:56:04 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201702060856.v168u4Db068295@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 6 Feb 2017 08:56:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313331 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 08:56:06 -0000 Author: ae Date: Mon Feb 6 08:56:04 2017 New Revision: 313331 URL: https://svnweb.freebsd.org/changeset/base/313331 Log: Add removed headers into the ObsoleteFiles.inc. Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Mon Feb 6 08:49:57 2017 (r313330) +++ head/ObsoleteFiles.inc Mon Feb 6 08:56:04 2017 (r313331) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20170206: merged projects/ipsec +OLD_FILES+=usr/include/netinet/ip_ipsec.h +OLD_FILES+=usr/include/netinet6/ip6_ipsec.h # 20170128: remove pc98 support OLD_FILES+=usr/include/dev/ic/i8251.h OLD_FILES+=usr/include/dev/ic/i8255.h From owner-svn-src-head@freebsd.org Mon Feb 6 08:58: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 A7615CD2634; Mon, 6 Feb 2017 08:58:41 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 81EB7FD5; Mon, 6 Feb 2017 08:58:41 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v168wepX068559; Mon, 6 Feb 2017 08:58:40 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v168weso068556; Mon, 6 Feb 2017 08:58:40 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201702060858.v168weso068556@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Mon, 6 Feb 2017 08:58:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313332 - head/sys/boot/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 08:58:41 -0000 Author: tsoome Date: Mon Feb 6 08:58:40 2017 New Revision: 313332 URL: https://svnweb.freebsd.org/changeset/base/313332 Log: loader: bcache read ahead block count should take account the large sectors The loader bcache is implementing simple read-ahead to boost the cache. The bcache is built based on 512B block sizes, and the read ahead is attempting to read number of cache blocks, based on amount of the free bcache space. However, there are devices using larger sector sizes than 512B, most obviously the CD media is based on 2k sectors. This means the read-ahead can not be just random number of blocks, but we should use value suitable also for use with larger sectors, as for example, with CD devices, we should read multiple of 2KB. Since the sector size from disk interface is not too reliable, i guess we can just use "good enough" value, so the implementation is rounding down the read ahead block count to be multiple of 16. This means we have covered sector sizes to 8k. In addition, the update does implement the end of cache marker, to help to detect the possible memory corruption - I have not seen it happening so far, but it does not hurt to have the detection mechanism in place. Reviewed by: allanjude Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D9179 Modified: head/sys/boot/common/bcache.c head/sys/boot/common/bootstrap.h Modified: head/sys/boot/common/bcache.c ============================================================================== --- head/sys/boot/common/bcache.c Mon Feb 6 08:56:04 2017 (r313331) +++ head/sys/boot/common/bcache.c Mon Feb 6 08:58:40 2017 (r313332) @@ -64,7 +64,7 @@ struct bcachectl struct bcache { struct bcachectl *bcache_ctl; caddr_t bcache_data; - u_int bcache_nblks; + size_t bcache_nblks; size_t ra; }; @@ -86,6 +86,7 @@ static u_int bcache_rablks; ((bc)->bcache_ctl[BHASH((bc), (blkno))].bc_blkno != (blkno)) #define BCACHE_READAHEAD 256 #define BCACHE_MINREADAHEAD 32 +#define BCACHE_MARKER 0xdeadbeef static void bcache_invalidate(struct bcache *bc, daddr_t blkno); static void bcache_insert(struct bcache *bc, daddr_t blkno); @@ -95,7 +96,7 @@ static void bcache_free_instance(struct * Initialise the cache for (nblks) of (bsize). */ void -bcache_init(u_int nblks, size_t bsize) +bcache_init(size_t nblks, size_t bsize) { /* set up control data */ bcache_total_nblks = nblks; @@ -122,6 +123,7 @@ bcache_allocate(void) u_int i; struct bcache *bc = malloc(sizeof (struct bcache)); int disks = bcache_numdev; + uint32_t *marker; if (disks == 0) disks = 1; /* safe guard */ @@ -140,11 +142,13 @@ bcache_allocate(void) bc->bcache_nblks = bcache_total_nblks >> i; bcache_unit_nblks = bc->bcache_nblks; - bc->bcache_data = malloc(bc->bcache_nblks * bcache_blksize); + bc->bcache_data = malloc(bc->bcache_nblks * bcache_blksize + + sizeof(uint32_t)); if (bc->bcache_data == NULL) { /* dont error out yet. fall back to 32 blocks and try again */ bc->bcache_nblks = 32; - bc->bcache_data = malloc(bc->bcache_nblks * bcache_blksize); + bc->bcache_data = malloc(bc->bcache_nblks * bcache_blksize + + sizeof(uint32_t)); } bc->bcache_ctl = malloc(bc->bcache_nblks * sizeof(struct bcachectl)); @@ -152,8 +156,11 @@ bcache_allocate(void) if ((bc->bcache_data == NULL) || (bc->bcache_ctl == NULL)) { bcache_free_instance(bc); errno = ENOMEM; - return(NULL); + return (NULL); } + /* Insert cache end marker. */ + marker = (uint32_t *)(bc->bcache_data + bc->bcache_nblks * bcache_blksize); + *marker = BCACHE_MARKER; /* Flush the cache */ for (i = 0; i < bc->bcache_nblks; i++) { @@ -215,6 +222,9 @@ read_strategy(void *devdata, int rw, dad int result; daddr_t p_blk; caddr_t p_buf; + uint32_t *marker; + + marker = (uint32_t *)(bc->bcache_data + bc->bcache_nblks * bcache_blksize); if (bc == NULL) { errno = ENODEV; @@ -261,9 +271,35 @@ read_strategy(void *devdata, int rw, dad p_size = MIN(r_size, nblk - i); /* read at least those blocks */ + /* + * The read ahead size setup. + * While the read ahead can save us IO, it also can complicate things: + * 1. We do not want to read ahead by wrapping around the + * bcache end - this would complicate the cache management. + * 2. We are using bc->ra as dynamic hint for read ahead size, + * detected cache hits will increase the read-ahead block count, and + * misses will decrease, see the code above. + * 3. The bcache is sized by 512B blocks, however, the underlying device + * may have a larger sector size, and we should perform the IO by + * taking into account these larger sector sizes. We could solve this by + * passing the sector size to bcache_allocate(), or by using ioctl(), but + * in this version we are using the constant, 16 blocks, and are rounding + * read ahead block count down to multiple of 16. + * Using the constant has two reasons, we are not entirely sure if the + * BIOS disk interface is providing the correct value for sector size. + * And secondly, this way we get the most conservative setup for the ra. + * + * The selection of multiple of 16 blocks (8KB) is quite arbitrary, however, + * we want to have the CD (2K) and the 4K disks to be covered. + * Also, as we have 32 blocks to be allocated as the fallback value in the + * bcache_allocate(), the 16 ra blocks will allow the read ahead + * to be used even with bcache this small. + */ + ra = bc->bcache_nblks - BHASH(bc, p_blk + p_size); - if (ra != bc->bcache_nblks) { /* do we have RA space? */ - ra = MIN(bc->ra, ra); + if (ra != 0 && ra != bc->bcache_nblks) { /* do we have RA space? */ + ra = MIN(bc->ra, ra - 1); + ra = rounddown(ra, 16); /* multiple of 16 blocks */ p_size += ra; } @@ -310,6 +346,12 @@ read_strategy(void *devdata, int rw, dad result = 0; } + if (*marker != BCACHE_MARKER) { + printf("BUG: bcache corruption detected: nblks: %zu p_blk: %lu, " + "p_size: %zu, ra: %zu\n", bc->bcache_nblks, + (long unsigned)BHASH(bc, p_blk), p_size, ra); + } + done: if ((result == 0) && (rsize != NULL)) *rsize = size; @@ -338,7 +380,7 @@ bcache_strategy(void *devdata, int rw, d /* bypass large requests, or when the cache is inactive */ if (bc == NULL || ((size * 2 / bcache_blksize) > bcache_nblks)) { - DEBUG("bypass %d from %d", size / bcache_blksize, blk); + DEBUG("bypass %zu from %qu", size / bcache_blksize, blk); bcache_bypasses++; return (dd->dv_strategy(dd->dv_devdata, rw, blk, size, buf, rsize)); } Modified: head/sys/boot/common/bootstrap.h ============================================================================== --- head/sys/boot/common/bootstrap.h Mon Feb 6 08:56:04 2017 (r313331) +++ head/sys/boot/common/bootstrap.h Mon Feb 6 08:58:40 2017 (r313332) @@ -73,7 +73,7 @@ int kern_pread(int fd, vm_offset_t dest, void *alloc_pread(int fd, off_t off, size_t len); /* bcache.c */ -void bcache_init(u_int nblks, size_t bsize); +void bcache_init(size_t nblks, size_t bsize); void bcache_add_dev(int); void *bcache_allocate(void); void bcache_free(void *); From owner-svn-src-head@freebsd.org Mon Feb 6 09:03: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 8141BCD2B6F; Mon, 6 Feb 2017 09:03:24 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63F3015F6; Mon, 6 Feb 2017 09:03:24 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from T530-Allan.ScaleEngine.net (unknown [91.183.237.24]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id BCA0A13993; Mon, 6 Feb 2017 09:03:21 +0000 (UTC) Subject: Re: svn commit: r313329 - in head: bin/ed secure/usr.bin secure/usr.bin/bdes usr.bin usr.bin/enigma To: Xin Li , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201702060827.v168RJQY056084@repo.freebsd.org> <89d00010-a1b8-78ac-974e-2846b4ff320b@delphij.net> Cc: d@delphij.net From: Allan Jude Message-ID: <84844dbb-c9ce-5397-4ae6-3657edf78136@freebsd.org> Date: Mon, 6 Feb 2017 04:03:20 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <89d00010-a1b8-78ac-974e-2846b4ff320b@delphij.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 09:03:24 -0000 On 02/06/17 03:36 AM, Xin Li wrote: > > > On 2/6/17 00:27, Allan Jude wrote: >> Author: allanjude >> Date: Mon Feb 6 08:27:19 2017 >> New Revision: 313329 >> URL: https://svnweb.freebsd.org/changeset/base/313329 >> >> Log: >> Remove bdes(1) >> >> The use of DES for anything is discouraged, especially with a static IV of 0 >> >> If you still need bdes(1) to decrypt Kirk's video lectures, see >> security/bdes in ports. >> >> This commit brought to you by the FOSDEM DevSummit and the >> "remove unneeded dependancies on openssl in base" working group >> >> Reviewed by: bapt, brnrd >> Relnotes: yes >> Sponsored by: FOSDEM DevSummit >> Differential Revision: https://reviews.freebsd.org/D9424 >> >> Deleted: >> head/secure/usr.bin/bdes/ >> Modified: >> head/bin/ed/ed.1 >> head/secure/usr.bin/Makefile >> head/usr.bin/Makefile >> head/usr.bin/enigma/enigma.1 > > Obsoletefiles.inc? > Woops, missed that, even after Bapt reminded me. I have created a review to make sure the entries are correct: https://reviews.freebsd.org/D9457 -- Allan Jude From owner-svn-src-head@freebsd.org Mon Feb 6 09:18: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 961AECD3124; Mon, 6 Feb 2017 09:18:49 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 646357D; Mon, 6 Feb 2017 09:18:49 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v169Im3D077843; Mon, 6 Feb 2017 09:18:48 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v169ImKG077835; Mon, 6 Feb 2017 09:18:48 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201702060918.v169ImKG077835@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Mon, 6 Feb 2017 09:18:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313333 - in head: lib/libstand sys/boot/efi/include sys/boot/efi/libefi sys/boot/efi/loader sys/boot/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 09:18:49 -0000 Author: tsoome Date: Mon Feb 6 09:18:47 2017 New Revision: 313333 URL: https://svnweb.freebsd.org/changeset/base/313333 Log: loader: Replace EFI part devices. Rewrite EFI part device interface to present disk devices in more user friendly way. We keep list of three types of devices: floppy, cd and disk, the visible names: fdX: cdX: and diskX: Use common/disk.c and common/part.c interfaces to manage the partitioning. The lsdev -l will additionally list the device path. Reviewed by: imp, allanjude Approved by: imp (mentor), allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D8581 Modified: head/lib/libstand/stand.h head/sys/boot/efi/include/efilib.h head/sys/boot/efi/libefi/devpath.c head/sys/boot/efi/libefi/efipart.c head/sys/boot/efi/loader/conf.c head/sys/boot/efi/loader/devicename.c head/sys/boot/efi/loader/main.c head/sys/boot/zfs/zfs.c Modified: head/lib/libstand/stand.h ============================================================================== --- head/lib/libstand/stand.h Mon Feb 6 08:58:40 2017 (r313332) +++ head/lib/libstand/stand.h Mon Feb 6 09:18:47 2017 (r313333) @@ -168,6 +168,7 @@ struct devdesc #define DEVT_NET 2 #define DEVT_CD 3 #define DEVT_ZFS 4 +#define DEVT_FD 5 int d_unit; void *d_opendata; }; Modified: head/sys/boot/efi/include/efilib.h ============================================================================== --- head/sys/boot/efi/include/efilib.h Mon Feb 6 08:58:40 2017 (r313332) +++ head/sys/boot/efi/include/efilib.h Mon Feb 6 09:18:47 2017 (r313333) @@ -31,16 +31,37 @@ #define _LOADER_EFILIB_H #include +#include extern EFI_HANDLE IH; extern EFI_SYSTEM_TABLE *ST; extern EFI_BOOT_SERVICES *BS; extern EFI_RUNTIME_SERVICES *RS; -extern struct devsw efipart_dev; +extern struct devsw efipart_fddev; +extern struct devsw efipart_cddev; +extern struct devsw efipart_hddev; extern struct devsw efinet_dev; extern struct netif_driver efinetif; +/* EFI block device data, included here to help efi_zfs_probe() */ +typedef STAILQ_HEAD(pdinfo_list, pdinfo) pdinfo_list_t; + +typedef struct pdinfo +{ + STAILQ_ENTRY(pdinfo) pd_link; /* link in device list */ + pdinfo_list_t pd_part; /* link of partitions */ + EFI_HANDLE pd_handle; + EFI_HANDLE pd_alias; + EFI_DEVICE_PATH *pd_devpath; + EFI_BLOCK_IO *pd_blkio; + int pd_unit; /* unit number */ + int pd_open; /* reference counter */ + void *pd_bcache; /* buffer cache data */ +} pdinfo_t; + +pdinfo_list_t *efiblk_get_pdinfo_list(struct devsw *dev); + void *efi_get_table(EFI_GUID *tbl); int efi_register_handles(struct devsw *, EFI_HANDLE *, EFI_HANDLE *, int); @@ -53,6 +74,7 @@ EFI_DEVICE_PATH *efi_lookup_devpath(EFI_ EFI_HANDLE efi_devpath_handle(EFI_DEVICE_PATH *); EFI_DEVICE_PATH *efi_devpath_last_node(EFI_DEVICE_PATH *); EFI_DEVICE_PATH *efi_devpath_trim(EFI_DEVICE_PATH *); +int efi_devpath_match(EFI_DEVICE_PATH *, EFI_DEVICE_PATH *); CHAR16 *efi_devpath_name(EFI_DEVICE_PATH *); void efi_free_devpath_name(CHAR16 *); Modified: head/sys/boot/efi/libefi/devpath.c ============================================================================== --- head/sys/boot/efi/libefi/devpath.c Mon Feb 6 08:58:40 2017 (r313332) +++ head/sys/boot/efi/libefi/devpath.c Mon Feb 6 09:18:47 2017 (r313333) @@ -138,3 +138,31 @@ efi_devpath_handle(EFI_DEVICE_PATH *devp return (NULL); return (h); } + +int +efi_devpath_match(EFI_DEVICE_PATH *devpath1, EFI_DEVICE_PATH *devpath2) +{ + int len; + + if (devpath1 == NULL || devpath2 == NULL) + return (0); + + while (1) { + if (DevicePathType(devpath1) != DevicePathType(devpath2) || + DevicePathSubType(devpath1) != DevicePathSubType(devpath2)) + return (0); + + len = DevicePathNodeLength(devpath1); + if (len != DevicePathNodeLength(devpath2)) + return (0); + + if (memcmp(devpath1, devpath2, (size_t)len) != 0) + return (0); + + if (IsDevicePathEnd(devpath1)) + break; + devpath1 = NextDevicePathNode(devpath1); + devpath2 = NextDevicePathNode(devpath2); + } + return (1); +} Modified: head/sys/boot/efi/libefi/efipart.c ============================================================================== --- head/sys/boot/efi/libefi/efipart.c Mon Feb 6 08:58:40 2017 (r313332) +++ head/sys/boot/efi/libefi/efipart.c Mon Feb 6 09:18:47 2017 (r313333) @@ -27,8 +27,10 @@ #include __FBSDID("$FreeBSD$"); +#include #include #include +#include #include #include @@ -37,57 +39,110 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include static EFI_GUID blkio_guid = BLOCK_IO_PROTOCOL; -static int efipart_init(void); +static int efipart_initfd(void); +static int efipart_initcd(void); +static int efipart_inithd(void); + static int efipart_strategy(void *, int, daddr_t, size_t, char *, size_t *); static int efipart_realstrategy(void *, int, daddr_t, size_t, char *, size_t *); + static int efipart_open(struct open_file *, ...); static int efipart_close(struct open_file *); -static int efipart_print(int); +static int efipart_ioctl(struct open_file *, u_long, void *); -struct devsw efipart_dev = { - .dv_name = "part", - .dv_type = DEVT_DISK, - .dv_init = efipart_init, +static int efipart_printfd(int); +static int efipart_printcd(int); +static int efipart_printhd(int); + +struct devsw efipart_fddev = { + .dv_name = "fd", + .dv_type = DEVT_FD, + .dv_init = efipart_initfd, .dv_strategy = efipart_strategy, .dv_open = efipart_open, .dv_close = efipart_close, - .dv_ioctl = noioctl, - .dv_print = efipart_print, + .dv_ioctl = efipart_ioctl, + .dv_print = efipart_printfd, .dv_cleanup = NULL }; -/* - * info structure to support bcache - */ -struct pdinfo { - int pd_unit; /* unit number */ - int pd_open; /* reference counter */ - void *pd_bcache; /* buffer cache data */ +struct devsw efipart_cddev = { + .dv_name = "cd", + .dv_type = DEVT_CD, + .dv_init = efipart_initcd, + .dv_strategy = efipart_strategy, + .dv_open = efipart_open, + .dv_close = efipart_close, + .dv_ioctl = efipart_ioctl, + .dv_print = efipart_printcd, + .dv_cleanup = NULL }; -static struct pdinfo *pdinfo; -static int npdinfo = 0; -#define PD(dev) (pdinfo[(dev)->d_unit]) +struct devsw efipart_hddev = { + .dv_name = "disk", + .dv_type = DEVT_DISK, + .dv_init = efipart_inithd, + .dv_strategy = efipart_strategy, + .dv_open = efipart_open, + .dv_close = efipart_close, + .dv_ioctl = efipart_ioctl, + .dv_print = efipart_printhd, + .dv_cleanup = NULL +}; + +static pdinfo_list_t fdinfo; +static pdinfo_list_t cdinfo; +static pdinfo_list_t hdinfo; + +static EFI_HANDLE *efipart_handles = NULL; +static UINTN efipart_nhandles = 0; + +static pdinfo_t * +efiblk_get_pdinfo(pdinfo_list_t *pdi, int unit) +{ + pdinfo_t *pd; + + STAILQ_FOREACH(pd, pdi, pd_link) { + if (pd->pd_unit == unit) + return (pd); + } + return (NULL); +} static int -efipart_init(void) +efiblk_pdinfo_count(pdinfo_list_t *pdi) +{ + pdinfo_t *pd; + int i = 0; + + STAILQ_FOREACH(pd, pdi, pd_link) { + i++; + } + return (i); +} + +static int +efipart_inithandles(void) { - EFI_BLOCK_IO *blkio; - EFI_DEVICE_PATH *devpath, *devpathcpy, *tmpdevpath, *node; - EFI_HANDLE *hin, *hout, *aliases, handle; - EFI_STATUS status; UINTN sz; - u_int n, nin, nout, nrdisk; - int err; + EFI_HANDLE *hin; + EFI_STATUS status; + + if (efipart_nhandles != 0) { + free(efipart_handles); + efipart_handles = NULL; + efipart_nhandles = 0; + } sz = 0; hin = NULL; - status = BS->LocateHandle(ByProtocol, &blkio_guid, 0, &sz, 0); + status = BS->LocateHandle(ByProtocol, &blkio_guid, 0, &sz, hin); if (status == EFI_BUFFER_TOO_SMALL) { - hin = (EFI_HANDLE *)malloc(sz * 3); + hin = malloc(sz); status = BS->LocateHandle(ByProtocol, &blkio_guid, 0, &sz, hin); if (EFI_ERROR(status)) @@ -96,33 +151,150 @@ efipart_init(void) if (EFI_ERROR(status)) return (efi_status_to_errno(status)); - /* Filter handles to only include FreeBSD partitions. */ - nin = sz / sizeof(EFI_HANDLE); - hout = hin + nin; - aliases = hout + nin; - nout = 0; - nrdisk = 0; - - bzero(aliases, nin * sizeof(EFI_HANDLE)); - pdinfo = malloc(nin * sizeof(*pdinfo)); - if (pdinfo == NULL) - return (ENOMEM); + efipart_handles = hin; + efipart_nhandles = sz; + return (0); +} - for (n = 0; n < nin; n++) { - devpath = efi_lookup_devpath(hin[n]); - if (devpath == NULL) { - continue; +static ACPI_HID_DEVICE_PATH * +efipart_floppy(EFI_DEVICE_PATH *node) +{ + ACPI_HID_DEVICE_PATH *acpi = NULL; + + if (DevicePathType(node) == ACPI_DEVICE_PATH && + DevicePathSubType(node) == ACPI_DP) { + acpi = (ACPI_HID_DEVICE_PATH *) node; + if (acpi->HID == EISA_PNP_ID(0x604) || + acpi->HID == EISA_PNP_ID(0x700) || + acpi->HID == EISA_ID(0x41d1, 0x701)) { + return (acpi); } + } + return (acpi); +} - status = BS->HandleProtocol(hin[n], &blkio_guid, - (void**)&blkio); - if (EFI_ERROR(status)) +/* + * Add or update entries with new handle data. + */ +static int +efipart_fdinfo_add(EFI_HANDLE handle, uint32_t uid, EFI_DEVICE_PATH *devpath) +{ + pdinfo_t *fd; + + fd = malloc(sizeof(pdinfo_t)); + if (fd == NULL) { + printf("Failed to register floppy %d, out of memory\n", uid); + return (ENOMEM); + } + memset(fd, 0, sizeof(pdinfo_t)); + STAILQ_INIT(&fd->pd_part); + + fd->pd_unit = uid; + fd->pd_handle = handle; + fd->pd_devpath = devpath; + STAILQ_INSERT_TAIL(&fdinfo, fd, pd_link); + return (0); +} + +static void +efipart_updatefd(void) +{ + EFI_DEVICE_PATH *devpath, *node; + ACPI_HID_DEVICE_PATH *acpi; + int i, nin; + + nin = efipart_nhandles / sizeof (*efipart_handles); + for (i = 0; i < nin; i++) { + devpath = efi_lookup_devpath(efipart_handles[i]); + if (devpath == NULL) continue; - if (!blkio->Media->LogicalPartition) { - nrdisk++; + + if ((node = efi_devpath_last_node(devpath)) == NULL) continue; + if ((acpi = efipart_floppy(node)) != NULL) { + efipart_fdinfo_add(efipart_handles[i], acpi->UID, + devpath); + } + } +} + +static int +efipart_initfd(void) +{ + int rv; + + rv = efipart_inithandles(); + if (rv != 0) + return (rv); + STAILQ_INIT(&fdinfo); + + efipart_updatefd(); + + bcache_add_dev(efiblk_pdinfo_count(&fdinfo)); + return (0); +} + +/* + * Add or update entries with new handle data. + */ +static int +efipart_cdinfo_add(EFI_HANDLE handle, EFI_HANDLE alias, + EFI_DEVICE_PATH *devpath) +{ + int unit; + pdinfo_t *cd; + pdinfo_t *pd; + + unit = 0; + STAILQ_FOREACH(pd, &cdinfo, pd_link) { + if (efi_devpath_match(pd->pd_devpath, devpath) != 0) { + pd->pd_handle = handle; + pd->pd_alias = alias; + return (0); } + unit++; + } + + cd = malloc(sizeof(pdinfo_t)); + if (cd == NULL) { + printf("Failed to add cd %d, out of memory\n", unit); + return (ENOMEM); + } + memset(cd, 0, sizeof(pdinfo_t)); + STAILQ_INIT(&cd->pd_part); + + cd->pd_handle = handle; + cd->pd_unit = unit; + cd->pd_alias = alias; + cd->pd_devpath = devpath; + STAILQ_INSERT_TAIL(&cdinfo, cd, pd_link); + return (0); +} + +static void +efipart_updatecd(void) +{ + int i, nin; + EFI_DEVICE_PATH *devpath, *devpathcpy, *tmpdevpath, *node; + EFI_HANDLE handle; + EFI_BLOCK_IO *blkio; + EFI_STATUS status; + nin = efipart_nhandles / sizeof (*efipart_handles); + for (i = 0; i < nin; i++) { + devpath = efi_lookup_devpath(efipart_handles[i]); + if (devpath == NULL) + continue; + + if ((node = efi_devpath_last_node(devpath)) == NULL) + continue; + if (efipart_floppy(node) != NULL) + continue; + + status = BS->HandleProtocol(efipart_handles[i], + &blkio_guid, (void **)&blkio); + if (EFI_ERROR(status)) + continue; /* * If we come across a logical partition of subtype CDROM * it doesn't refer to the CD filesystem itself, but rather @@ -130,8 +302,6 @@ efipart_init(void) * we try to find the parent device and add that instead as * that will be the CD filesystem. */ - if ((node = efi_devpath_last_node(devpath)) == NULL) - continue; if (DevicePathType(node) == MEDIA_DEVICE_PATH && DevicePathSubType(node) == MEDIA_CDROM_DP) { devpathcpy = efi_devpath_trim(devpath); @@ -143,109 +313,400 @@ efipart_init(void) free(devpathcpy); if (EFI_ERROR(status)) continue; - hout[nout] = handle; - aliases[nout] = hin[n]; - } else - hout[nout] = hin[n]; - nout++; - pdinfo[npdinfo].pd_open = 0; - pdinfo[npdinfo].pd_bcache = NULL; - pdinfo[npdinfo].pd_unit = npdinfo; - npdinfo++; + devpath = efi_lookup_devpath(handle); + efipart_cdinfo_add(handle, efipart_handles[i], + devpath); + continue; + } + + if (DevicePathType(node) == MESSAGING_DEVICE_PATH && + DevicePathSubType(node) == MSG_ATAPI_DP) { + efipart_cdinfo_add(efipart_handles[i], NULL, + devpath); + continue; + } + + /* USB or SATA cd without the media. */ + if (blkio->Media->RemovableMedia && + !blkio->Media->MediaPresent) { + efipart_cdinfo_add(efipart_handles[i], NULL, + devpath); + } } +} - bcache_add_dev(npdinfo); - err = efi_register_handles(&efipart_dev, hout, aliases, nout); - free(hin); +static int +efipart_initcd(void) +{ + int rv; + + rv = efipart_inithandles(); + if (rv != 0) + return (rv); + STAILQ_INIT(&cdinfo); - if (nout == 0 && nrdisk > 0) - printf("Found %d disk(s) but no logical partition\n", nrdisk); - return (err); + efipart_updatecd(); + + bcache_add_dev(efiblk_pdinfo_count(&cdinfo)); + return (0); } static int -efipart_print(int verbose) +efipart_hdinfo_add(EFI_HANDLE disk_handle, EFI_HANDLE part_handle) { - char line[80]; + EFI_DEVICE_PATH *disk_devpath, *part_devpath; + HARDDRIVE_DEVICE_PATH *node; + int unit; + pdinfo_t *hd, *pd, *last; + + disk_devpath = efi_lookup_devpath(disk_handle); + part_devpath = efi_lookup_devpath(part_handle); + if (disk_devpath == NULL || part_devpath == NULL) { + return (ENOENT); + } + + pd = malloc(sizeof(pdinfo_t)); + if (pd == NULL) { + printf("Failed to add disk, out of memory\n"); + return (ENOMEM); + } + memset(pd, 0, sizeof(pdinfo_t)); + STAILQ_INIT(&pd->pd_part); + node = (HARDDRIVE_DEVICE_PATH *)efi_devpath_last_node(part_devpath); + + STAILQ_FOREACH(hd, &hdinfo, pd_link) { + if (efi_devpath_match(hd->pd_devpath, disk_devpath) != 0) { + /* Add the partition. */ + pd->pd_handle = part_handle; + pd->pd_unit = node->PartitionNumber; + pd->pd_devpath = part_devpath; + STAILQ_INSERT_TAIL(&hd->pd_part, pd, pd_link); + return (0); + } + } + + last = STAILQ_LAST(&hdinfo, pdinfo, pd_link); + if (last != NULL) + unit = last->pd_unit + 1; + else + unit = 0; + + /* Add the disk. */ + hd = pd; + hd->pd_handle = disk_handle; + hd->pd_unit = unit; + hd->pd_devpath = disk_devpath; + STAILQ_INSERT_TAIL(&hdinfo, hd, pd_link); + + pd = malloc(sizeof(pdinfo_t)); + if (pd == NULL) { + printf("Failed to add partition, out of memory\n"); + return (ENOMEM); + } + memset(pd, 0, sizeof(pdinfo_t)); + STAILQ_INIT(&pd->pd_part); + + /* Add the partition. */ + pd->pd_handle = part_handle; + pd->pd_unit = node->PartitionNumber; + pd->pd_devpath = part_devpath; + STAILQ_INSERT_TAIL(&hd->pd_part, pd, pd_link); + + return (0); +} + +static void +efipart_updatehd(void) +{ + int i, nin; + EFI_DEVICE_PATH *devpath, *devpathcpy, *tmpdevpath, *node; + EFI_HANDLE handle; EFI_BLOCK_IO *blkio; - EFI_HANDLE h; EFI_STATUS status; - u_int unit; + + nin = efipart_nhandles / sizeof (*efipart_handles); + for (i = 0; i < nin; i++) { + devpath = efi_lookup_devpath(efipart_handles[i]); + if (devpath == NULL) + continue; + + if ((node = efi_devpath_last_node(devpath)) == NULL) + continue; + if (efipart_floppy(node) != NULL) + continue; + + status = BS->HandleProtocol(efipart_handles[i], + &blkio_guid, (void **)&blkio); + if (EFI_ERROR(status)) + continue; + + if (DevicePathType(node) == MEDIA_DEVICE_PATH && + DevicePathSubType(node) == MEDIA_HARDDRIVE_DP) { + devpathcpy = efi_devpath_trim(devpath); + if (devpathcpy == NULL) + continue; + tmpdevpath = devpathcpy; + status = BS->LocateDevicePath(&blkio_guid, &tmpdevpath, + &handle); + free(devpathcpy); + if (EFI_ERROR(status)) + continue; + /* + * We do not support nested partitions. + */ + devpathcpy = efi_lookup_devpath(handle); + if (devpathcpy == NULL) + continue; + if ((node = efi_devpath_last_node(devpathcpy)) == NULL) + continue; + if (DevicePathType(node) == MEDIA_DEVICE_PATH && + DevicePathSubType(node) == MEDIA_HARDDRIVE_DP) + continue; + efipart_hdinfo_add(handle, efipart_handles[i]); + continue; + } + } +} + +static int +efipart_inithd(void) +{ + int rv; + + rv = efipart_inithandles(); + if (rv != 0) + return (rv); + STAILQ_INIT(&hdinfo); + + efipart_updatehd(); + + bcache_add_dev(efiblk_pdinfo_count(&hdinfo)); + return (0); +} + +static int +efipart_print_common(struct devsw *dev, pdinfo_list_t *pdlist, int verbose) +{ int ret = 0; + EFI_BLOCK_IO *blkio; + EFI_STATUS status; + EFI_HANDLE h; + pdinfo_t *pd; + CHAR16 *text; + struct disk_devdesc pd_dev; + char line[80]; - printf("%s devices:", efipart_dev.dv_name); + if (STAILQ_EMPTY(pdlist)) + return (0); + + printf("%s devices:", dev->dv_name); if ((ret = pager_output("\n")) != 0) return (ret); - for (unit = 0, h = efi_find_handle(&efipart_dev, 0); - h != NULL; h = efi_find_handle(&efipart_dev, ++unit)) { - snprintf(line, sizeof(line), " %s%d:", - efipart_dev.dv_name, unit); - if ((ret = pager_output(line)) != 0) - break; - + STAILQ_FOREACH(pd, pdlist, pd_link) { + h = pd->pd_handle; + if (verbose) { /* Output the device path. */ + text = efi_devpath_name(efi_lookup_devpath(h)); + if (text != NULL) { + printf(" %S", text); + efi_free_devpath_name(text); + if ((ret = pager_output("\n")) != 0) + break; + } + } + snprintf(line, sizeof(line), + " %s%d", dev->dv_name, pd->pd_unit); + printf("%s:", line); status = BS->HandleProtocol(h, &blkio_guid, (void **)&blkio); if (!EFI_ERROR(status)) { - snprintf(line, sizeof(line), " %llu blocks", - (unsigned long long)(blkio->Media->LastBlock + 1)); - if ((ret = pager_output(line)) != 0) + printf(" %llu", + blkio->Media->LastBlock == 0? 0: + (unsigned long long) (blkio->Media->LastBlock + 1)); + if (blkio->Media->LastBlock != 0) { + printf(" X %u", blkio->Media->BlockSize); + } + printf(" blocks"); + if (blkio->Media->MediaPresent) { + if (blkio->Media->RemovableMedia) + printf(" (removable)"); + } else + printf(" (no media)"); + if ((ret = pager_output("\n")) != 0) + break; + if (!blkio->Media->MediaPresent) + continue; + + pd->pd_blkio = blkio; + pd_dev.d_dev = dev; + pd_dev.d_unit = pd->pd_unit; + pd_dev.d_slice = -1; + pd_dev.d_partition = -1; + pd_dev.d_opendata = blkio; + ret = disk_open(&pd_dev, blkio->Media->BlockSize * + (blkio->Media->LastBlock + 1), + blkio->Media->BlockSize, + blkio->Media->RemovableMedia? DISK_F_NOCACHE: 0); + if (ret == 0) { + ret = disk_print(&pd_dev, line, verbose); + disk_close(&pd_dev); + if (ret != 0) + return (ret); + } else { + /* Do not fail from disk_open() */ + ret = 0; + } + } else { + if ((ret = pager_output("\n")) != 0) break; - if (blkio->Media->RemovableMedia) - if ((ret = pager_output(" (removable)")) != 0) - break; } - if ((ret = pager_output("\n")) != 0) - break; } return (ret); } static int +efipart_printfd(int verbose) +{ + return (efipart_print_common(&efipart_fddev, &fdinfo, verbose)); +} + +static int +efipart_printcd(int verbose) +{ + return (efipart_print_common(&efipart_cddev, &cdinfo, verbose)); +} + +static int +efipart_printhd(int verbose) +{ + return (efipart_print_common(&efipart_hddev, &hdinfo, verbose)); +} + +pdinfo_list_t * +efiblk_get_pdinfo_list(struct devsw *dev) +{ + if (dev->dv_type == DEVT_DISK) + return (&hdinfo); + if (dev->dv_type == DEVT_CD) + return (&cdinfo); + if (dev->dv_type == DEVT_FD) + return (&fdinfo); + return (NULL); +} + +static int efipart_open(struct open_file *f, ...) { va_list args; - struct devdesc *dev; + struct disk_devdesc *dev; + pdinfo_list_t *pdi; + pdinfo_t *pd; EFI_BLOCK_IO *blkio; - EFI_HANDLE h; EFI_STATUS status; va_start(args, f); - dev = va_arg(args, struct devdesc*); + dev = va_arg(args, struct disk_devdesc*); va_end(args); + if (dev == NULL) + return (EINVAL); - h = efi_find_handle(&efipart_dev, dev->d_unit); - if (h == NULL) + pdi = efiblk_get_pdinfo_list(dev->d_dev); + if (pdi == NULL) return (EINVAL); - status = BS->HandleProtocol(h, &blkio_guid, (void **)&blkio); - if (EFI_ERROR(status)) - return (efi_status_to_errno(status)); + pd = efiblk_get_pdinfo(pdi, dev->d_unit); + if (pd == NULL) + return (EIO); + + if (pd->pd_blkio == NULL) { + status = BS->HandleProtocol(pd->pd_handle, &blkio_guid, + (void **)&pd->pd_blkio); + if (EFI_ERROR(status)) + return (efi_status_to_errno(status)); + } + blkio = pd->pd_blkio; if (!blkio->Media->MediaPresent) return (EAGAIN); - dev->d_opendata = blkio; - PD(dev).pd_open++; - if (PD(dev).pd_bcache == NULL) - PD(dev).pd_bcache = bcache_allocate(); + pd->pd_open++; + if (pd->pd_bcache == NULL) + pd->pd_bcache = bcache_allocate(); + + if (dev->d_dev->dv_type == DEVT_DISK) { + return (disk_open(dev, + blkio->Media->BlockSize * (blkio->Media->LastBlock + 1), + blkio->Media->BlockSize, + blkio->Media->RemovableMedia? DISK_F_NOCACHE: 0)); + } return (0); } static int efipart_close(struct open_file *f) { - struct devdesc *dev; + struct disk_devdesc *dev; + pdinfo_list_t *pdi; + pdinfo_t *pd; - dev = (struct devdesc *)(f->f_devdata); - if (dev->d_opendata == NULL) + dev = (struct disk_devdesc *)(f->f_devdata); + if (dev == NULL) + return (EINVAL); + pdi = efiblk_get_pdinfo_list(dev->d_dev); + if (pdi == NULL) return (EINVAL); - dev->d_opendata = NULL; - PD(dev).pd_open--; - if (PD(dev).pd_open == 0) { - bcache_free(PD(dev).pd_bcache); - PD(dev).pd_bcache = NULL; + pd = efiblk_get_pdinfo(pdi, dev->d_unit); + if (pd == NULL) + return (EINVAL); + + pd->pd_open--; + if (pd->pd_open == 0) { + pd->pd_blkio = NULL; + bcache_free(pd->pd_bcache); + pd->pd_bcache = NULL; } + if (dev->d_dev->dv_type == DEVT_DISK) + return (disk_close(dev)); + return (0); +} + +static int +efipart_ioctl(struct open_file *f, u_long cmd, void *data) +{ + struct disk_devdesc *dev; + pdinfo_list_t *pdi; + pdinfo_t *pd; + int rc; + + dev = (struct disk_devdesc *)(f->f_devdata); + if (dev == NULL) + return (EINVAL); + pdi = efiblk_get_pdinfo_list(dev->d_dev); + if (pdi == NULL) + return (EINVAL); + + pd = efiblk_get_pdinfo(pdi, dev->d_unit); + if (pd == NULL) + return (EINVAL); + + if (dev->d_dev->dv_type == DEVT_DISK) { + rc = disk_ioctl(dev, cmd, data); + if (rc != ENOTTY) + return (rc); + } + + switch (cmd) { + case DIOCGSECTORSIZE: + *(u_int *)data = pd->pd_blkio->Media->BlockSize; + break; + case DIOCGMEDIASIZE: + *(off_t *)data = pd->pd_blkio->Media->BlockSize * + (pd->pd_blkio->Media->LastBlock + 1); + break; + default: + return (ENOTTY); + } + return (0); } @@ -294,12 +755,29 @@ efipart_strategy(void *devdata, int rw, char *buf, size_t *rsize) { struct bcache_devdata bcd; - struct devdesc *dev; + struct disk_devdesc *dev; + pdinfo_list_t *pdi; + pdinfo_t *pd; + + dev = (struct disk_devdesc *)devdata; + if (dev == NULL) + return (EINVAL); + pdi = efiblk_get_pdinfo_list(dev->d_dev); + if (pdi == NULL) + return (EINVAL); + + pd = efiblk_get_pdinfo(pdi, dev->d_unit); + if (pd == NULL) + return (EINVAL); - dev = (struct devdesc *)devdata; bcd.dv_strategy = efipart_realstrategy; bcd.dv_devdata = devdata; - bcd.dv_cache = PD(dev).pd_bcache; + bcd.dv_cache = pd->pd_bcache; + + if (dev->d_dev->dv_type == DEVT_DISK) { + return (bcache_strategy(&bcd, rw, blk + dev->d_offset, + size, buf, rsize)); + } return (bcache_strategy(&bcd, rw, blk, size, buf, rsize)); } @@ -307,7 +785,9 @@ static int efipart_realstrategy(void *devdata, int rw, daddr_t blk, size_t size, char *buf, size_t *rsize) { - struct devdesc *dev = (struct devdesc *)devdata; + struct disk_devdesc *dev = (struct disk_devdesc *)devdata; + pdinfo_list_t *pdi; + pdinfo_t *pd; EFI_BLOCK_IO *blkio; off_t off; char *blkbuf; @@ -317,7 +797,15 @@ efipart_realstrategy(void *devdata, int if (dev == NULL || blk < 0) return (EINVAL); - blkio = dev->d_opendata; + pdi = efiblk_get_pdinfo_list(dev->d_dev); + if (pdi == NULL) + return (EINVAL); + + pd = efiblk_get_pdinfo(pdi, dev->d_unit); + if (pd == NULL) + return (EINVAL); + + blkio = pd->pd_blkio; if (blkio == NULL) return (ENXIO); Modified: head/sys/boot/efi/loader/conf.c ============================================================================== --- head/sys/boot/efi/loader/conf.c Mon Feb 6 08:58:40 2017 (r313332) +++ head/sys/boot/efi/loader/conf.c Mon Feb 6 09:18:47 2017 (r313333) @@ -36,7 +36,9 @@ __FBSDID("$FreeBSD$"); #endif struct devsw *devsw[] = { - &efipart_dev, + &efipart_fddev, + &efipart_cddev, + &efipart_hddev, &efinet_dev, #ifdef EFI_ZFS_BOOT &zfs_dev, Modified: head/sys/boot/efi/loader/devicename.c ============================================================================== --- head/sys/boot/efi/loader/devicename.c Mon Feb 6 08:58:40 2017 (r313332) +++ head/sys/boot/efi/loader/devicename.c Mon Feb 6 09:18:47 2017 (r313333) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifdef EFI_ZFS_BOOT #include #endif @@ -90,7 +91,7 @@ efi_parsedev(struct devdesc **dev, const struct devsw *dv; char *cp; const char *np; - int i; + int i, err; /* minimum length check */ if (strlen(devspec) < 2) @@ -106,11 +107,26 @@ efi_parsedev(struct devdesc **dev, const return (ENOENT); np = devspec + strlen(dv->dv_name); + err = 0; -#ifdef EFI_ZFS_BOOT - if (dv->dv_type == DEVT_ZFS) { - int err; + switch (dv->dv_type) { + case DEVT_NONE: + break; + + case DEVT_DISK: + idev = malloc(sizeof(struct disk_devdesc)); + if (idev == NULL) + return (ENOMEM); + + err = disk_parsedev((struct disk_devdesc *)idev, np, path); + if (err != 0) { + free(idev); + return (err); + } + break; +#ifdef EFI_ZFS_BOOT + case DEVT_ZFS: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Mon Feb 6 09:40: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 D5306CD38EC; Mon, 6 Feb 2017 09:40:15 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B2E6116F; Mon, 6 Feb 2017 09:40:15 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v169eEka086127; Mon, 6 Feb 2017 09:40:14 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v169eEul086124; Mon, 6 Feb 2017 09:40:14 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702060940.v169eEul086124@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Mon, 6 Feb 2017 09:40:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313335 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 09:40:15 -0000 Author: mjg Date: Mon Feb 6 09:40:14 2017 New Revision: 313335 URL: https://svnweb.freebsd.org/changeset/base/313335 Log: locks: fix recursion support after recent changes When a relevant lockstat probe is enabled the fallback primitive is called with a constant signifying a free lock. This works fine for typical cases but breaks with recursion, since it checks if the passed value is that of the executing thread. Read the value if necessary. Modified: head/sys/kern/kern_mutex.c head/sys/kern/kern_rwlock.c head/sys/kern/kern_sx.c Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Mon Feb 6 09:31:25 2017 (r313334) +++ head/sys/kern/kern_mutex.c Mon Feb 6 09:40:14 2017 (r313335) @@ -495,6 +495,8 @@ __mtx_lock_sleep(volatile uintptr_t *c, lock_delay_arg_init(&lda, NULL); #endif m = mtxlock2mtx(c); + if (__predict_false(v == MTX_UNOWNED)) + v = MTX_READ_VALUE(m); if (__predict_false(lv_mtx_owner(v) == (struct thread *)tid)) { KASSERT((m->lock_object.lo_flags & LO_RECURSABLE) != 0 || Modified: head/sys/kern/kern_rwlock.c ============================================================================== --- head/sys/kern/kern_rwlock.c Mon Feb 6 09:31:25 2017 (r313334) +++ head/sys/kern/kern_rwlock.c Mon Feb 6 09:40:14 2017 (r313335) @@ -812,6 +812,8 @@ __rw_wlock_hard(volatile uintptr_t *c, u lock_delay_arg_init(&lda, NULL); #endif rw = rwlock2rw(c); + if (__predict_false(v == RW_UNLOCKED)) + v = RW_READ_VALUE(rw); if (__predict_false(lv_rw_wowner(v) == (struct thread *)tid)) { KASSERT(rw->lock_object.lo_flags & LO_RECURSABLE, Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Mon Feb 6 09:31:25 2017 (r313334) +++ head/sys/kern/kern_sx.c Mon Feb 6 09:40:14 2017 (r313335) @@ -531,6 +531,9 @@ _sx_xlock_hard(struct sx *sx, uintptr_t lock_delay_arg_init(&lda, NULL); #endif + if (__predict_false(x == SX_LOCK_UNLOCKED)) + x = SX_READ_VALUE(sx); + /* If we already hold an exclusive lock, then recurse. */ if (__predict_false(lv_sx_owner(x) == (struct thread *)tid)) { KASSERT((sx->lock_object.lo_flags & LO_RECURSABLE) != 0, From owner-svn-src-head@freebsd.org Mon Feb 6 09:47: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 D65F8CD3B43; Mon, 6 Feb 2017 09:47:49 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99CCC161B; Mon, 6 Feb 2017 09:47:49 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1caftc-0009LH-1j; Mon, 06 Feb 2017 12:47:40 +0300 Date: Mon, 6 Feb 2017 12:47:40 +0300 From: Slawa Olhovchenkov To: Navdeep Parhar Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313318 - in head: share/man/man4 sys/dev/cxgbe Message-ID: <20170206094739.GC5366@zxy.spb.ru> References: <201702060519.v165JU1e078891@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201702060519.v165JU1e078891@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-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: Mon, 06 Feb 2017 09:47:49 -0000 On Mon, Feb 06, 2017 at 05:19:30AM +0000, Navdeep Parhar wrote: > Author: np > Date: Mon Feb 6 05:19:29 2017 > New Revision: 313318 > URL: https://svnweb.freebsd.org/changeset/base/313318 > > Log: > cxgbe(4): Allow tunables that control the number of queues to be set to > '-n' to tell the driver to create _up to_ 'n' queues if enough cores are > available. For example, setting hw.cxgbe.nrxq10g="-32" will result in > 16 queues if the system has 16 cores, 32 if it has 32. > > There is no change in the default number of queues of any type. Just for my info: how many queues supported by different hardware (T4/T5/T6)? From owner-svn-src-head@freebsd.org Mon Feb 6 10:51: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 6FE58CD3A30; Mon, 6 Feb 2017 10:51:54 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F87B1931; Mon, 6 Feb 2017 10:51:54 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16AprKP018100; Mon, 6 Feb 2017 10:51:53 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16AprIp018099; Mon, 6 Feb 2017 10:51:53 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201702061051.v16AprIp018099@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Mon, 6 Feb 2017 10:51:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313336 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 10:51:54 -0000 Author: allanjude Date: Mon Feb 6 10:51:53 2017 New Revision: 313336 URL: https://svnweb.freebsd.org/changeset/base/313336 Log: Add ObsoleteFiles entries for bdes(1) missed in r313329 Reported by: delphij Reviewed by: bapt, imp Differential Revision: https://reviews.freebsd.org/D9457 Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Mon Feb 6 09:40:14 2017 (r313335) +++ head/ObsoleteFiles.inc Mon Feb 6 10:51:53 2017 (r313336) @@ -38,6 +38,10 @@ # xargs -n1 | sort | uniq -d; # done +# 20170206: remove bdes(1) +OLD_FILES+=usr/bin/bdes +OLD_FILES+=usr/lib/debug/usr/bin/bdes.debug +OLD_FILES+=usr/share/man/man1/bdes.1.gz # 20170206: merged projects/ipsec OLD_FILES+=usr/include/netinet/ip_ipsec.h OLD_FILES+=usr/include/netinet6/ip6_ipsec.h From owner-svn-src-head@freebsd.org Mon Feb 6 10:57: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 BF09ACD3BC8; Mon, 6 Feb 2017 10:57:55 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E86E1EAA; Mon, 6 Feb 2017 10:57:55 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16Avs0q018609; Mon, 6 Feb 2017 10:57:54 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16Avs9M018608; Mon, 6 Feb 2017 10:57:54 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201702061057.v16Avs9M018608@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Mon, 6 Feb 2017 10:57:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313337 - head/sys/boot/efi/loader X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 10:57:55 -0000 Author: tsoome Date: Mon Feb 6 10:57:54 2017 New Revision: 313337 URL: https://svnweb.freebsd.org/changeset/base/313337 Log: loader: 313329 missed ZFS guard in loader/main.c Missing guard added. Reviewed by: imp, allanjude Approved by: imp (mentor), allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D9458 Modified: head/sys/boot/efi/loader/main.c Modified: head/sys/boot/efi/loader/main.c ============================================================================== --- head/sys/boot/efi/loader/main.c Mon Feb 6 10:51:53 2017 (r313336) +++ head/sys/boot/efi/loader/main.c Mon Feb 6 10:57:54 2017 (r313337) @@ -185,6 +185,7 @@ find_currdev(EFI_LOADED_IMAGE *img) int unit; uint64_t extra; +#ifdef EFI_ZFS_BOOT /* Did efi_zfs_probe() detect the boot pool? */ if (pool_guid != 0) { struct zfs_devdesc currdev; @@ -203,6 +204,7 @@ find_currdev(EFI_LOADED_IMAGE *img) env_nounset); return (0); } +#endif /* EFI_ZFS_BOOT */ /* We have device lists for hd, cd, fd, walk them all. */ pdi_list = efiblk_get_pdinfo_list(&efipart_hddev); From owner-svn-src-head@freebsd.org Mon Feb 6 11:37: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 6F6BCCD34C0; Mon, 6 Feb 2017 11:37:21 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 341841349; Mon, 6 Feb 2017 11:37:21 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16BbKlI034521; Mon, 6 Feb 2017 11:37:20 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16BbKVM034520; Mon, 6 Feb 2017 11:37:20 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201702061137.v16BbKVM034520@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Mon, 6 Feb 2017 11:37:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313338 - head/sys/dev/gxemul/disk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 11:37:21 -0000 Author: sbruno Date: Mon Feb 6 11:37:20 2017 New Revision: 313338 URL: https://svnweb.freebsd.org/changeset/base/313338 Log: gxemul: Add a format string to call to g_new_providerf() found when compiling mips64 target with clang. Reviewed by: brooks Modified: head/sys/dev/gxemul/disk/gxemul_disk.c Modified: head/sys/dev/gxemul/disk/gxemul_disk.c ============================================================================== --- head/sys/dev/gxemul/disk/gxemul_disk.c Mon Feb 6 10:57:54 2017 (r313337) +++ head/sys/dev/gxemul/disk/gxemul_disk.c Mon Feb 6 11:37:20 2017 (r313338) @@ -171,7 +171,7 @@ gxemul_disk_attach_geom(void *arg, int f sc->sc_geom = g_new_geomf(&g_gxemul_disk_class, "%s", device_get_nameunit(sc->sc_dev)); sc->sc_geom->softc = sc; - sc->sc_provider = g_new_providerf(sc->sc_geom, sc->sc_geom->name); + sc->sc_provider = g_new_providerf(sc->sc_geom, "%s", sc->sc_geom->name); sc->sc_provider->sectorsize = GXEMUL_DISK_DEV_BLOCKSIZE; sc->sc_provider->mediasize = sc->sc_size; g_error_provider(sc->sc_provider, 0); From owner-svn-src-head@freebsd.org Mon Feb 6 13:08: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 4FC85CD111F; Mon, 6 Feb 2017 13:08:50 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F6251039; Mon, 6 Feb 2017 13:08:49 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16D8n0d071179; Mon, 6 Feb 2017 13:08:49 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16D8nGC071178; Mon, 6 Feb 2017 13:08:49 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201702061308.v16D8nGC071178@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 6 Feb 2017 13:08:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313339 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 13:08:50 -0000 Author: andrew Date: Mon Feb 6 13:08:48 2017 New Revision: 313339 URL: https://svnweb.freebsd.org/changeset/base/313339 Log: Only allow the pic type to be either a PIC or MSI type. All interrupt controller drivers handle either MSI/MSI-X interrupts, or regular interrupts, as such enforce this in the interrupt handling framework. If a later driver was to handle both it would need to create one of each. This will allow future changes to allow the xref space to overlap, but refer to different drivers. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation X-Differential Revision: https://reviews.freebsd.org/D8616 Modified: head/sys/kern/subr_intr.c Modified: head/sys/kern/subr_intr.c ============================================================================== --- head/sys/kern/subr_intr.c Mon Feb 6 11:37:20 2017 (r313338) +++ head/sys/kern/subr_intr.c Mon Feb 6 13:08:48 2017 (r313339) @@ -105,8 +105,10 @@ struct intr_pic { SLIST_ENTRY(intr_pic) pic_next; intptr_t pic_xref; /* hardware identification */ device_t pic_dev; +/* Only one of FLAG_PIC or FLAG_MSI may be set */ #define FLAG_PIC (1 << 0) #define FLAG_MSI (1 << 1) +#define FLAG_TYPE_MASK (FLAG_PIC | FLAG_MSI) u_int pic_flags; struct mtx pic_child_lock; SLIST_HEAD(, intr_pic_child) pic_children; @@ -115,7 +117,7 @@ struct intr_pic { static struct mtx pic_list_lock; static SLIST_HEAD(, intr_pic) pic_list; -static struct intr_pic *pic_lookup(device_t dev, intptr_t xref); +static struct intr_pic *pic_lookup(device_t dev, intptr_t xref, int flags); /* Interrupt source definition. */ static struct mtx isrc_table_lock; @@ -688,7 +690,7 @@ isrc_add_handler(struct intr_irqsrc *isr * Lookup interrupt controller locked. */ static inline struct intr_pic * -pic_lookup_locked(device_t dev, intptr_t xref) +pic_lookup_locked(device_t dev, intptr_t xref, int flags) { struct intr_pic *pic; @@ -699,6 +701,10 @@ pic_lookup_locked(device_t dev, intptr_t /* Note that pic->pic_dev is never NULL on registered PIC. */ SLIST_FOREACH(pic, &pic_list, pic_next) { + if ((pic->pic_flags & FLAG_TYPE_MASK) != + (flags & FLAG_TYPE_MASK)) + continue; + if (dev == NULL) { if (xref == pic->pic_xref) return (pic); @@ -715,12 +721,12 @@ pic_lookup_locked(device_t dev, intptr_t * Lookup interrupt controller. */ static struct intr_pic * -pic_lookup(device_t dev, intptr_t xref) +pic_lookup(device_t dev, intptr_t xref, int flags) { struct intr_pic *pic; mtx_lock(&pic_list_lock); - pic = pic_lookup_locked(dev, xref); + pic = pic_lookup_locked(dev, xref, flags); mtx_unlock(&pic_list_lock); return (pic); } @@ -729,12 +735,12 @@ pic_lookup(device_t dev, intptr_t xref) * Create interrupt controller. */ static struct intr_pic * -pic_create(device_t dev, intptr_t xref) +pic_create(device_t dev, intptr_t xref, int flags) { struct intr_pic *pic; mtx_lock(&pic_list_lock); - pic = pic_lookup_locked(dev, xref); + pic = pic_lookup_locked(dev, xref, flags); if (pic != NULL) { mtx_unlock(&pic_list_lock); return (pic); @@ -746,6 +752,7 @@ pic_create(device_t dev, intptr_t xref) } pic->pic_xref = xref; pic->pic_dev = dev; + pic->pic_flags = flags; mtx_init(&pic->pic_child_lock, "pic child lock", NULL, MTX_SPIN); SLIST_INSERT_HEAD(&pic_list, pic, pic_next); mtx_unlock(&pic_list_lock); @@ -757,12 +764,12 @@ pic_create(device_t dev, intptr_t xref) * Destroy interrupt controller. */ static void -pic_destroy(device_t dev, intptr_t xref) +pic_destroy(device_t dev, intptr_t xref, int flags) { struct intr_pic *pic; mtx_lock(&pic_list_lock); - pic = pic_lookup_locked(dev, xref); + pic = pic_lookup_locked(dev, xref, flags); if (pic == NULL) { mtx_unlock(&pic_list_lock); return; @@ -783,12 +790,10 @@ intr_pic_register(device_t dev, intptr_t if (dev == NULL) return (NULL); - pic = pic_create(dev, xref); + pic = pic_create(dev, xref, FLAG_PIC); if (pic == NULL) return (NULL); - pic->pic_flags |= FLAG_PIC; - debugf("PIC %p registered for %s \n", pic, device_get_nameunit(dev), dev, xref); return (pic); @@ -822,13 +827,13 @@ intr_pic_claim_root(device_t dev, intptr { struct intr_pic *pic; - pic = pic_lookup(dev, xref); + pic = pic_lookup(dev, xref, FLAG_PIC); if (pic == NULL) { device_printf(dev, "not registered\n"); return (EINVAL); } - KASSERT((pic->pic_flags & FLAG_PIC) != 0, + KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_PIC, ("%s: Found a non-PIC controller: %s", __func__, device_get_name(pic->pic_dev))); @@ -870,7 +875,8 @@ intr_pic_add_handler(device_t parent, st struct intr_pic_child *child; #endif - parent_pic = pic_lookup(parent, 0); + /* Find the parent PIC */ + parent_pic = pic_lookup(parent, 0, FLAG_PIC); if (parent_pic == NULL) return (NULL); @@ -904,13 +910,14 @@ intr_resolve_irq(device_t dev, intptr_t if (data == NULL) return (EINVAL); - pic = pic_lookup(dev, xref); + pic = pic_lookup(dev, xref, + (data->type == INTR_MAP_DATA_MSI) ? FLAG_MSI : FLAG_PIC); if (pic == NULL) return (ESRCH); switch (data->type) { case INTR_MAP_DATA_MSI: - KASSERT((pic->pic_flags & FLAG_MSI) != 0, + KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_MSI, ("%s: Found a non-MSI controller: %s", __func__, device_get_name(pic->pic_dev))); msi = (struct intr_map_data_msi *)data; @@ -918,7 +925,7 @@ intr_resolve_irq(device_t dev, intptr_t return (0); default: - KASSERT((pic->pic_flags & FLAG_PIC) != 0, + KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_PIC, ("%s: Found a non-PIC controller: %s", __func__, device_get_name(pic->pic_dev))); return (PIC_MAP_INTR(pic->pic_dev, data, isrc)); @@ -1255,12 +1262,10 @@ intr_msi_register(device_t dev, intptr_t if (dev == NULL) return (EINVAL); - pic = pic_create(dev, xref); + pic = pic_create(dev, xref, FLAG_MSI); if (pic == NULL) return (ENOMEM); - pic->pic_flags |= FLAG_MSI; - debugf("PIC %p registered for %s \n", pic, device_get_nameunit(dev), dev, (uintmax_t)xref); return (0); @@ -1276,11 +1281,11 @@ intr_alloc_msi(device_t pci, device_t ch struct intr_map_data_msi *msi; int err, i; - pic = pic_lookup(NULL, xref); + pic = pic_lookup(NULL, xref, FLAG_MSI); if (pic == NULL) return (ESRCH); - KASSERT((pic->pic_flags & FLAG_MSI) != 0, + KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_MSI, ("%s: Found a non-MSI controller: %s", __func__, device_get_name(pic->pic_dev))); @@ -1313,11 +1318,11 @@ intr_release_msi(device_t pci, device_t struct intr_map_data_msi *msi; int i, err; - pic = pic_lookup(NULL, xref); + pic = pic_lookup(NULL, xref, FLAG_MSI); if (pic == NULL) return (ESRCH); - KASSERT((pic->pic_flags & FLAG_MSI) != 0, + KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_MSI, ("%s: Found a non-MSI controller: %s", __func__, device_get_name(pic->pic_dev))); @@ -1352,11 +1357,11 @@ intr_alloc_msix(device_t pci, device_t c struct intr_map_data_msi *msi; int err; - pic = pic_lookup(NULL, xref); + pic = pic_lookup(NULL, xref, FLAG_MSI); if (pic == NULL) return (ESRCH); - KASSERT((pic->pic_flags & FLAG_MSI) != 0, + KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_MSI, ("%s: Found a non-MSI controller: %s", __func__, device_get_name(pic->pic_dev))); @@ -1380,11 +1385,11 @@ intr_release_msix(device_t pci, device_t struct intr_map_data_msi *msi; int err; - pic = pic_lookup(NULL, xref); + pic = pic_lookup(NULL, xref, FLAG_MSI); if (pic == NULL) return (ESRCH); - KASSERT((pic->pic_flags & FLAG_MSI) != 0, + KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_MSI, ("%s: Found a non-MSI controller: %s", __func__, device_get_name(pic->pic_dev))); @@ -1413,11 +1418,11 @@ intr_map_msi(device_t pci, device_t chil struct intr_pic *pic; int err; - pic = pic_lookup(NULL, xref); + pic = pic_lookup(NULL, xref, FLAG_MSI); if (pic == NULL) return (ESRCH); - KASSERT((pic->pic_flags & FLAG_MSI) != 0, + KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_MSI, ("%s: Found a non-MSI controller: %s", __func__, device_get_name(pic->pic_dev))); From owner-svn-src-head@freebsd.org Mon Feb 6 13:53: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 24DABCD20C3; Mon, 6 Feb 2017 13:53:50 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id CFA78E7B; Mon, 6 Feb 2017 13:53:49 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id ajjgc9P8MVQuxajjhcOGxW; Mon, 06 Feb 2017 06:53:42 -0700 X-Authority-Analysis: v=2.2 cv=BNTDlBYG c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=n2v9WMKugxEA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=8Cg8ip8I2pv_peD6t-UA:9 a=CjuIK1q_8ugA:10 a=6cegRdsiIKAA:10 a=PWgaC5gQ5SgA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id E39B0AD4; Mon, 6 Feb 2017 05:53:39 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v16Drdfa054163; Mon, 6 Feb 2017 05:53:39 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201702061353.v16Drdfa054163@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Toomas Soome cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313337 - head/sys/boot/efi/loader In-Reply-To: Message from Toomas Soome of "Mon, 06 Feb 2017 10:57:54 +0000." <201702061057.v16Avs9M018608@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 06 Feb 2017 05:53:39 -0800 X-CMAE-Envelope: MS4wfO3iAdpSF1IjM5FtKADqTiqulmDU0VLpCt3h6Nf1OCKsdQOP6ayKrYRLopn0eEPr4qBVmwejdoWsm8V0yrSx4gsXez6a7a4b8sncK8GC20NEn9mR79xd X13i4FPcALEWGXioKoqTrMWkslO2QF3riAmJ/RAJyuugl+xZ7utLRyu69U0QFPOxBUNbuEsEgRQDxnap2pQCOg5SVBj9fkMAi0uxjCjCQfDlnslmR1+yvbrs +6X0VAIeflijh6FajnNEFtIFEKYANYZpEkVQnQBM+MghGWcQOOszSL+ZGchGy9aj X-BeenThere: svn-src-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: Mon, 06 Feb 2017 13:53:50 -0000 In message <201702061057.v16Avs9M018608@repo.freebsd.org>, Toomas Soome writes: > Author: tsoome > Date: Mon Feb 6 10:57:54 2017 > New Revision: 313337 > URL: https://svnweb.freebsd.org/changeset/base/313337 > > Log: > loader: 313329 missed ZFS guard in loader/main.c Did you mean r313328? -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Mon Feb 6 13:58: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 2EE00CD2230; Mon, 6 Feb 2017 13:58:56 +0000 (UTC) (envelope-from tsoome@me.com) Received: from st13p35im-asmtp002.me.com (st13p35im-asmtp002.me.com [17.164.199.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07C0310A0; Mon, 6 Feb 2017 13:58:56 +0000 (UTC) (envelope-from tsoome@me.com) Received: from process-dkim-sign-daemon.st13p35im-asmtp002.me.com by st13p35im-asmtp002.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0OKY00I00HCFNS00@st13p35im-asmtp002.me.com>; Mon, 06 Feb 2017 13:58:49 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=4d515a; t=1486389529; bh=/Bt5K8bgIqubZEEh0DWxSzseTFhj/g8ZtbT9KKuNI6E=; h=Content-type:MIME-version:Subject:From:Date:Message-id:To; b=LGBBu6zoRskb+8E95R6B5sl68lSGCc1uLtF03ZFg6HFJeCRHjS6TK+y/Pd/tLMG/o rCnsdQSmscI8ExOu1OIHB85pXifReE8soP5SPKlWtcqyxxa0qz57hJvAaXphh0q0WH rfwqlgrHuDf5fJPcTjNM8IDgEyWNdFYZ7tfFY4KLYSRKefdB1uAOImECKxohBvZS3C EE5ZRMNQ6QzaWvr3N1SyFGJmqaMZGIPm1W/qgYyKcjspd2bJDYSxQoR/w/EQLyVb43 poNyyQz1ooFJnJTcJR7SNhs4gpCf4PNQBRKoz+B8Gwpbo1knvTMO+AbsNmGyFcd5Qe anT7Eg8P+NySA== Received: from icloud.com ([127.0.0.1]) by st13p35im-asmtp002.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0OKY00J5HHHY4M00@st13p35im-asmtp002.me.com>; Mon, 06 Feb 2017 13:58:49 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-02-06_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1034 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1603290000 definitions=main-1702060139 Content-type: text/plain; charset=utf-8 MIME-version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: svn commit: r313337 - head/sys/boot/efi/loader From: Toomas Soome In-reply-to: <201702061353.v16Drdfa054163@slippy.cwsent.com> Date: Mon, 06 Feb 2017 15:58:45 +0200 Cc: Toomas Soome , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-transfer-encoding: quoted-printable Message-id: References: <201702061353.v16Drdfa054163@slippy.cwsent.com> To: Cy Schubert X-Mailer: Apple Mail (2.3259) X-BeenThere: svn-src-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: Mon, 06 Feb 2017 13:58:56 -0000 > On 6. veebr 2017, at 15:53, Cy Schubert = wrote: >=20 > In message <201702061057.v16Avs9M018608@repo.freebsd.org>, Toomas = Soome=20 > writes: >> Author: tsoome >> Date: Mon Feb 6 10:57:54 2017 >> New Revision: 313337 >> URL: https://svnweb.freebsd.org/changeset/base/313337 >>=20 >> Log: >> loader: 313329 missed ZFS guard in loader/main.c >=20 > Did you mean r313328? >=20 Oh indeed:( I have no idea how I did mix that up=E2=80=A6 (I blame lack = of coffee;) Should I do something about it? rgds, toomas= From owner-svn-src-head@freebsd.org Mon Feb 6 14:00: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 16888CD22ED; Mon, 6 Feb 2017 14:00:30 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA6E31225; Mon, 6 Feb 2017 14:00:29 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16E0SHl091365; Mon, 6 Feb 2017 14:00:28 GMT (envelope-from kan@FreeBSD.org) Received: (from kan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16E0Sb5091364; Mon, 6 Feb 2017 14:00:28 GMT (envelope-from kan@FreeBSD.org) Message-Id: <201702061400.v16E0Sb5091364@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kan set sender to kan@FreeBSD.org using -f From: Alexander Kabaev Date: Mon, 6 Feb 2017 14:00:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313341 - head/sys/mips/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 14:00:30 -0000 Author: kan Date: Mon Feb 6 14:00:28 2017 New Revision: 313341 URL: https://svnweb.freebsd.org/changeset/base/313341 Log: Use 64bit store instruction in atomic_fcmpset_64. Reported by: br Modified: head/sys/mips/include/atomic.h Modified: head/sys/mips/include/atomic.h ============================================================================== --- head/sys/mips/include/atomic.h Mon Feb 6 13:32:22 2017 (r313340) +++ head/sys/mips/include/atomic.h Mon Feb 6 14:00:28 2017 (r313341) @@ -529,7 +529,7 @@ atomic_fcmpset_64(__volatile uint64_t *p "beqz %0, 1b\n\t" /* if it failed, spin */ "j 3f\n\t" "2:\n\t" - "sw %0, %2\n\t" /* save old value */ + "sd %0, %2\n\t" /* save old value */ "li %0, 0\n\t" "3:\n" : "=&r" (ret), "+m" (*p), "=m" (*cmpval) From owner-svn-src-head@freebsd.org Mon Feb 6 14:02: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 A5076CD24F0; Mon, 6 Feb 2017 14:02:01 +0000 (UTC) (envelope-from tsoome@me.com) Received: from st13p35im-asmtp002.me.com (st13p35im-asmtp002.me.com [17.164.199.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B14716FB; Mon, 6 Feb 2017 14:02:01 +0000 (UTC) (envelope-from tsoome@me.com) Received: from process-dkim-sign-daemon.st13p35im-asmtp002.me.com by st13p35im-asmtp002.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0OKY00M00HLMHX00@st13p35im-asmtp002.me.com>; Mon, 06 Feb 2017 14:02:00 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=4d515a; t=1486389720; bh=4j/Z8dxIQbQi4/KZCJmZ1b8bvc5IJ+NeVNRqmXA2TYk=; h=From:Message-id:Content-type:MIME-version:Subject:Date:To; b=gohwhMnKt6bjJFgdEn8omvdDKTqI269fLH3KZODfhtW3ZVLs5uuCqQF9A1h6YDlPJ YZUSX+yPnnkDyoks1QmUuly786pXbJD3vLyDo6sgYjJSuAmz9tEnIjEKhCThac9Utl zExfXvfUqXjiIQAGdu1egU9cVERhTGmAFzs6OH8mCdDkQAkBbDotCbQ8BUs6dCRRG0 lF+1lt9HkcH7z6O1zIpj5wwXH7hB4ftMV9fgMwIBkrvqLDOTwI7neKuju6qLLv8yTa PpTU5tobmmNUrDbXKURSBAPp37xu0hGinsSF9rmLrUSzg3sWg9D4hYxVwIKsOBCfsp zexnJ6owVi+9A== Received: from icloud.com ([127.0.0.1]) by st13p35im-asmtp002.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0OKY00GEMHN9ZR50@st13p35im-asmtp002.me.com>; Mon, 06 Feb 2017 14:02:00 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-02-06_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1034 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1603290000 definitions=main-1702060139 From: Toomas Soome Message-id: MIME-version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: svn commit: r313337 - head/sys/boot/efi/loader Date: Mon, 06 Feb 2017 16:01:56 +0200 In-reply-to: Cc: Toomas Soome , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Cy Schubert References: <201702061353.v16Drdfa054163@slippy.cwsent.com> X-Mailer: Apple Mail (2.3259) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-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: Mon, 06 Feb 2017 14:02:01 -0000 > On 6. veebr 2017, at 15:58, Toomas Soome wrote: >=20 >=20 >> On 6. veebr 2017, at 15:53, Cy Schubert = wrote: >>=20 >> In message <201702061057.v16Avs9M018608@repo.freebsd.org>, Toomas = Soome=20 >> writes: >>> Author: tsoome >>> Date: Mon Feb 6 10:57:54 2017 >>> New Revision: 313337 >>> URL: https://svnweb.freebsd.org/changeset/base/313337 >>>=20 >>> Log: >>> loader: 313329 missed ZFS guard in loader/main.c >>=20 >> Did you mean r313328? >>=20 >=20 >=20 > Oh indeed:( I have no idea how I did mix that up=E2=80=A6 (I blame = lack of coffee;) Should I do something about it? >=20 Actually=E2=80=A6. well=E2=80=A6 the correct one is r313333, = https://svnweb.freebsd.org/base?view=3Drevision&revision=3D313333 = (I = still blame the coffee). rgds, toomas= From owner-svn-src-head@freebsd.org Mon Feb 6 14:31: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 5552BCD2FEA; Mon, 6 Feb 2017 14:31:24 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DCD3E7E8; Mon, 6 Feb 2017 14:31:23 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.5/8.14.5) with ESMTP id v16EVEhR021003; Mon, 6 Feb 2017 17:31:14 +0300 (MSK) (envelope-from marck@rinet.ru) Date: Mon, 6 Feb 2017 17:31:14 +0300 (MSK) From: Dmitry Morozovsky To: "Andrey V. Elsukov" cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313330 - in head: contrib/netcat lib/libipsec sbin/ifconfig sbin/setkey share/man/man4 sys/conf sys/modules sys/modules/ipsec sys/modules/tcp/tcpmd5 sys/net sys/netinet sys/netinet/tcp... In-Reply-To: <201702060849.v168nwmf064277@repo.freebsd.org> Message-ID: References: <201702060849.v168nwmf064277@repo.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (woozle.rinet.ru [0.0.0.0]); Mon, 06 Feb 2017 17:31:14 +0300 (MSK) X-BeenThere: svn-src-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: Mon, 06 Feb 2017 14:31:24 -0000 On Mon, 6 Feb 2017, Andrey V. Elsukov wrote: > Author: ae > Date: Mon Feb 6 08:49:57 2017 > New Revision: 313330 > URL: https://svnweb.freebsd.org/changeset/base/313330 > > Log: > Merge projects/ipsec into head/. [snip] Great, thanks! Have you any plans to merge this into stable/11 to reduce diffs in network stack code? -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-svn-src-head@freebsd.org Mon Feb 6 14:41: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 2DAA9CD3214; Mon, 6 Feb 2017 14:41:36 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D8C61F57; Mon, 6 Feb 2017 14:41:35 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16EfYWr010324; Mon, 6 Feb 2017 14:41:34 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16EfYZx010320; Mon, 6 Feb 2017 14:41:34 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201702061441.v16EfYZx010320@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 6 Feb 2017 14:41:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313342 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 14:41:36 -0000 Author: andrew Date: Mon Feb 6 14:41:34 2017 New Revision: 313342 URL: https://svnweb.freebsd.org/changeset/base/313342 Log: Only build the ACPI PCI drivers on x86, they are unlikely to be used on arm64 without dignificant changes. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Modified: head/sys/conf/files head/sys/conf/files.amd64 head/sys/conf/files.i386 Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Feb 6 14:00:28 2017 (r313341) +++ head/sys/conf/files Mon Feb 6 14:41:34 2017 (r313342) @@ -668,11 +668,6 @@ dev/acpica/acpi_ec.c optional acpi dev/acpica/acpi_isab.c optional acpi isa dev/acpica/acpi_lid.c optional acpi dev/acpica/acpi_package.c optional acpi -dev/acpica/acpi_pci.c optional acpi pci -dev/acpica/acpi_pci_link.c optional acpi pci -dev/acpica/acpi_pcib.c optional acpi pci -dev/acpica/acpi_pcib_acpi.c optional acpi pci -dev/acpica/acpi_pcib_pci.c optional acpi pci dev/acpica/acpi_perf.c optional acpi dev/acpica/acpi_powerres.c optional acpi dev/acpica/acpi_quirk.c optional acpi Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Mon Feb 6 14:00:28 2017 (r313341) +++ head/sys/conf/files.amd64 Mon Feb 6 14:41:34 2017 (r313342) @@ -188,6 +188,11 @@ crypto/via/padlock_cipher.c optional pad crypto/via/padlock_hash.c optional padlock dev/acpica/acpi_if.m standard dev/acpica/acpi_hpet.c optional acpi +dev/acpica/acpi_pci.c optional acpi pci +dev/acpica/acpi_pci_link.c optional acpi pci +dev/acpica/acpi_pcib.c optional acpi pci +dev/acpica/acpi_pcib_acpi.c optional acpi pci +dev/acpica/acpi_pcib_pci.c optional acpi pci dev/acpica/acpi_timer.c optional acpi dev/acpi_support/acpi_wmi_if.m standard dev/agp/agp_amd64.c optional agp Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Mon Feb 6 14:00:28 2017 (r313341) +++ head/sys/conf/files.i386 Mon Feb 6 14:41:34 2017 (r313342) @@ -163,6 +163,11 @@ crypto/des/arch/i386/des_enc.S optional crypto/via/padlock.c optional padlock crypto/via/padlock_cipher.c optional padlock crypto/via/padlock_hash.c optional padlock +dev/acpica/acpi_pci.c optional acpi pci +dev/acpica/acpi_pci_link.c optional acpi pci +dev/acpica/acpi_pcib.c optional acpi pci +dev/acpica/acpi_pcib_acpi.c optional acpi pci +dev/acpica/acpi_pcib_pci.c optional acpi pci dev/advansys/adv_isa.c optional adv isa dev/agp/agp_ali.c optional agp dev/agp/agp_amd.c optional agp From owner-svn-src-head@freebsd.org Mon Feb 6 14:58: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 A0C46CD3547; Mon, 6 Feb 2017 14:58:25 +0000 (UTC) (envelope-from sgalabov@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6DAC7183D; Mon, 6 Feb 2017 14:58:25 +0000 (UTC) (envelope-from sgalabov@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16EwOs3015634; Mon, 6 Feb 2017 14:58:24 GMT (envelope-from sgalabov@FreeBSD.org) Received: (from sgalabov@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16EwOjU015633; Mon, 6 Feb 2017 14:58:24 GMT (envelope-from sgalabov@FreeBSD.org) Message-Id: <201702061458.v16EwOjU015633@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sgalabov set sender to sgalabov@FreeBSD.org using -f From: Stanislav Galabov Date: Mon, 6 Feb 2017 14:58:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313343 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 14:58:25 -0000 Author: sgalabov Date: Mon Feb 6 14:58:24 2017 New Revision: 313343 URL: https://svnweb.freebsd.org/changeset/base/313343 Log: sys/arm/arm/identcpu-v4.c: fix identify_arm_cpu() identify_arm_cpu() in sys/arm/arm/identcpu-v4.c incorrectly uses a u_int8_t variable to store the result of cpu_get_control(). It should really use a u_int variable, the same way as done for cpu_ident() in the same function, as both cpuid and control registers are 32-bit.. This issue causes users of identcpu-v4 to incorrectly report things such as icache status (bit 12 in cpu control register) and basically anything defined in bits above bit 7 :-) Reviewed by: manu Sponsored by: Smartcom - Bulgaria AD Differential Revision: https://reviews.freebsd.org/D9460 Modified: head/sys/arm/arm/identcpu-v4.c Modified: head/sys/arm/arm/identcpu-v4.c ============================================================================== --- head/sys/arm/arm/identcpu-v4.c Mon Feb 6 14:41:34 2017 (r313342) +++ head/sys/arm/arm/identcpu-v4.c Mon Feb 6 14:58:24 2017 (r313343) @@ -294,8 +294,7 @@ u_int cpu_pfr(int num) void identify_arm_cpu(void) { - u_int cpuid; - u_int8_t ctrl; + u_int cpuid, ctrl; int i; ctrl = cpu_get_control(); From owner-svn-src-head@freebsd.org Mon Feb 6 15:18: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 06154CD3BB3 for ; Mon, 6 Feb 2017 15:18:35 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yw0-x22e.google.com (mail-yw0-x22e.google.com [IPv6:2607:f8b0:4002:c05::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C392F76A for ; Mon, 6 Feb 2017 15:18:34 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yw0-x22e.google.com with SMTP id v200so50117742ywc.3 for ; Mon, 06 Feb 2017 07:18:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=yk1AZYP22G5VIP+F33TTLy9j6iaqV4LRMYMJC2baq50=; b=glcY+hxLI6VOWUvLh72eJKnSSORnfP73rMA43lZi/SzFGAHpOF5TKjlGXF5SY613lG mlTLdYXCanIRAV4t3qxiwRiIGQ5SKZ+KfrkNVP8xgG3BN5t0UxrERU9jwTWHI39Qsvax ViXPcD96x/8maiGBS9XP6jSE836pGa4BJfCiGWZAK9f/EebcM7F8PFViV7wpYeQ1xc2a l9UQp4d4rVhTL2bOrjplAjVDXm2tRhSp5RlEiGsL4i7VU6QEAAKjHICBO9K89zrKR/qP Hd0+55ZHPzeNQwSL705nAtIMi5Y3856vtWJnZEkKX4i4ptUGxNl3cS4JL0SxpYfW6nqR 7W9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=yk1AZYP22G5VIP+F33TTLy9j6iaqV4LRMYMJC2baq50=; b=f1VwJ4xD5pgsTPYrWV1qO1KH6BD0AhDgKoNWEJlPNncfDJ3rxOnOpfNZc2r8YAeolO Dpi2AipHdhWd9Uj4toUClRgMAH2d0wuqavqwR21syNkodswTuddl6euYd62bYQ9wumky Svzdor7O1D9483uRBSLGFqR/IAUlOpGcAvJBbSPfqAFGU8VxYz6nhjKuZb2FfVDDYduM rFZgfFr2pikcwTAObKxd7u9kLSip2RFVFgtpivt46CAtZpO/LQ8gB1k1drp/ebJWcNge pkNHbAHOrUu1A/a0+quiialPLtGrovCwQDDbTEk6yYuoAtl8WkdtZJ24FL6HHI9zScIB pPCA== X-Gm-Message-State: AIkVDXLlIglbQPC+LVPrh6ud5JtXUhGBoqECVLUFxGcKfh3aceomDlESIikwRHy/3Ney339zlWdSu+V63eZHNA== X-Received: by 10.129.108.77 with SMTP id h74mr7084197ywc.95.1486394313788; Mon, 06 Feb 2017 07:18:33 -0800 (PST) MIME-Version: 1.0 Received: by 10.129.52.76 with HTTP; Mon, 6 Feb 2017 07:18:03 -0800 (PST) In-Reply-To: <201702060827.v168RJQY056084@repo.freebsd.org> References: <201702060827.v168RJQY056084@repo.freebsd.org> From: Ed Schouten Date: Mon, 6 Feb 2017 16:18:03 +0100 Message-ID: Subject: Re: svn commit: r313329 - in head: bin/ed secure/usr.bin secure/usr.bin/bdes usr.bin usr.bin/enigma To: Allan Jude Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-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: Mon, 06 Feb 2017 15:18:35 -0000 Hi Allan, 2017-02-06 9:27 GMT+01:00 Allan Jude : > The use of DES for anything is discouraged, especially with a static IV of 0 Not entirely related to this, but still... Do we want to go ahead and also remove DES support from crypt(3)? Compared to the other crypt formats, the DES implementation seems fairly large, uses global state, etc. I can send out a change for code review if people {like,don't object to} this. -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 From owner-svn-src-head@freebsd.org Mon Feb 6 15:24: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 9AE43CD3DCC; Mon, 6 Feb 2017 15:24:44 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72903BCA; Mon, 6 Feb 2017 15:24:44 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from T530-Allan.ScaleEngine.net (unknown [91.183.237.24]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id 64CC31307C; Mon, 6 Feb 2017 15:24:42 +0000 (UTC) Subject: Re: svn commit: r313329 - in head: bin/ed secure/usr.bin secure/usr.bin/bdes usr.bin usr.bin/enigma To: Ed Schouten References: <201702060827.v168RJQY056084@repo.freebsd.org> Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Allan Jude Message-ID: Date: Mon, 6 Feb 2017 10:24:40 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 15:24:44 -0000 On 02/06/17 10:18 AM, Ed Schouten wrote: > Hi Allan, > > 2017-02-06 9:27 GMT+01:00 Allan Jude : >> The use of DES for anything is discouraged, especially with a static IV of 0 > > Not entirely related to this, but still... > > Do we want to go ahead and also remove DES support from crypt(3)? > Compared to the other crypt formats, the DES implementation seems > fairly large, uses global state, etc. > > I can send out a change for code review if people {like,don't object to} this. > I remember in the 4.x days, there was a documented reason why you might need to keep des crypt(3) instead of using md5crypt, but I would hope that went away a long time ago. I am in favour of this, but I don't know what all of the implications might be. We should likely ask someone on secteam@ about this. -- Allan Jude From owner-svn-src-head@freebsd.org Mon Feb 6 15:24:53 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 8CFDECD3E0C; Mon, 6 Feb 2017 15:24:53 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C3ECC49; Mon, 6 Feb 2017 15:24:53 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16FOqJg027258; Mon, 6 Feb 2017 15:24:52 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16FOqcq027257; Mon, 6 Feb 2017 15:24:52 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201702061524.v16FOqcq027257@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 6 Feb 2017 15:24:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313344 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 15:24:53 -0000 Author: andrew Date: Mon Feb 6 15:24:52 2017 New Revision: 313344 URL: https://svnweb.freebsd.org/changeset/base/313344 Log: Temporary disable gicv3_its.c when FDT is missing from the kernel until INTRNG supports ACPI. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Modified: head/sys/conf/files.arm64 Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Mon Feb 6 14:58:24 2017 (r313343) +++ head/sys/conf/files.arm64 Mon Feb 6 15:24:52 2017 (r313344) @@ -88,7 +88,7 @@ arm64/arm64/disassem.c optional ddb arm64/arm64/dump_machdep.c standard arm64/arm64/elf_machdep.c standard arm64/arm64/exception.S standard -arm64/arm64/gicv3_its.c optional intrng +arm64/arm64/gicv3_its.c optional intrng fdt arm64/arm64/gic_v3.c standard arm64/arm64/gic_v3_fdt.c optional fdt arm64/arm64/identcpu.c standard From owner-svn-src-head@freebsd.org Mon Feb 6 17:20: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 A0911CD30F8; Mon, 6 Feb 2017 17:20:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B62F1381; Mon, 6 Feb 2017 17:20:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16HKbtM072190; Mon, 6 Feb 2017 17:20:37 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16HKbD3072188; Mon, 6 Feb 2017 17:20:37 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702061720.v16HKbD3072188@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 6 Feb 2017 17:20:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313345 - in head/sys: arm/include arm64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 17:20:38 -0000 Author: kib Date: Mon Feb 6 17:20:37 2017 New Revision: 313345 URL: https://svnweb.freebsd.org/changeset/base/313345 Log: Update arm and arm64 counters MD bits. On arm64 use atomics. Then, both arm and arm64 do not need a critical section around update. Replace all cpus loop by CPU_FOREACH(). This brings arm and arm64 counter(9) implementation closer to current amd64, but being more RISC-y, arm* version cannot avoid atomics. Reported by: Alexandre Martins Reviewed by: andrew Tested by: Alexandre Martins, andrew Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/arm/include/counter.h head/sys/arm64/include/counter.h Modified: head/sys/arm/include/counter.h ============================================================================== --- head/sys/arm/include/counter.h Mon Feb 6 15:24:52 2017 (r313344) +++ head/sys/arm/include/counter.h Mon Feb 6 17:20:37 2017 (r313345) @@ -31,12 +31,9 @@ #include #include -#ifdef INVARIANTS -#include -#endif -#define counter_enter() critical_enter() -#define counter_exit() critical_exit() +#define counter_enter() do {} while (0) +#define counter_exit() do {} while (0) #ifdef IN_SUBR_COUNTER_C @@ -55,7 +52,7 @@ counter_u64_fetch_inline(uint64_t *p) int i; r = 0; - for (i = 0; i < mp_ncpus; i++) + CPU_FOREACH(i) r += counter_u64_read_one((uint64_t *)p, i); return (r); @@ -78,18 +75,13 @@ counter_u64_zero_inline(counter_u64_t c) } #endif -#define counter_u64_add_protected(c, inc) do { \ - CRITICAL_ASSERT(curthread); \ - atomic_add_64((uint64_t *)zpcpu_get(c), (inc)); \ -} while (0) +#define counter_u64_add_protected(c, inc) counter_u64_add(c, inc) static inline void counter_u64_add(counter_u64_t c, int64_t inc) { - counter_enter(); - counter_u64_add_protected(c, inc); - counter_exit(); + atomic_add_64((uint64_t *)zpcpu_get(c), inc); } #endif /* ! __MACHINE_COUNTER_H__ */ Modified: head/sys/arm64/include/counter.h ============================================================================== --- head/sys/arm64/include/counter.h Mon Feb 6 15:24:52 2017 (r313344) +++ head/sys/arm64/include/counter.h Mon Feb 6 17:20:37 2017 (r313345) @@ -30,12 +30,10 @@ #define _MACHINE_COUNTER_H_ #include -#ifdef INVARIANTS -#include -#endif +#include -#define counter_enter() critical_enter() -#define counter_exit() critical_exit() +#define counter_enter() do {} while (0) +#define counter_exit() do {} while (0) #ifdef IN_SUBR_COUNTER_C static inline uint64_t @@ -52,13 +50,12 @@ counter_u64_fetch_inline(uint64_t *p) int i; r = 0; - for (i = 0; i < mp_ncpus; i++) + CPU_FOREACH(i) r += counter_u64_read_one((uint64_t *)p, i); return (r); } -/* XXXKIB might interrupt increment */ static void counter_u64_zero_one_cpu(void *arg) { @@ -76,18 +73,13 @@ counter_u64_zero_inline(counter_u64_t c) } #endif -#define counter_u64_add_protected(c, inc) do { \ - CRITICAL_ASSERT(curthread); \ - *(uint64_t *)zpcpu_get(c) += (inc); \ -} while (0) +#define counter_u64_add_protected(c, inc) counter_u64_add(c, inc) static inline void counter_u64_add(counter_u64_t c, int64_t inc) { - counter_enter(); - counter_u64_add_protected(c, inc); - counter_exit(); + atomic_add_64((uint64_t *)zpcpu_get(c), inc); } #endif /* ! _MACHINE_COUNTER_H_ */ From owner-svn-src-head@freebsd.org Mon Feb 6 17:48: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 31A76CD36E4; Mon, 6 Feb 2017 17:48:27 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08EAB3A6; Mon, 6 Feb 2017 17:48:26 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16HmQxb084483; Mon, 6 Feb 2017 17:48:26 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16HmPIF084479; Mon, 6 Feb 2017 17:48:25 GMT (envelope-from np@FreeBSD.org) Message-Id: <201702061748.v16HmPIF084479@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 6 Feb 2017 17:48:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313346 - head/sys/dev/cxgbe/tom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 17:48:27 -0000 Author: np Date: Mon Feb 6 17:48:25 2017 New Revision: 313346 URL: https://svnweb.freebsd.org/changeset/base/313346 Log: cxgbe/t4_tom: Fix CLIP entry refcounting on the passive side. Every IPv6 connection being handled by the TOE should have a reference on its CLIP entry. Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/tom/t4_connect.c head/sys/dev/cxgbe/tom/t4_listen.c head/sys/dev/cxgbe/tom/t4_tom.c head/sys/dev/cxgbe/tom/t4_tom.h Modified: head/sys/dev/cxgbe/tom/t4_connect.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_connect.c Mon Feb 6 17:20:37 2017 (r313345) +++ head/sys/dev/cxgbe/tom/t4_connect.c Mon Feb 6 17:48:25 2017 (r313346) @@ -402,7 +402,7 @@ t4_connect(struct toedev *tod, struct so if ((inp->inp_vflag & INP_IPV6) == 0) DONT_OFFLOAD_ACTIVE_OPEN(ENOTSUP); - toep->ce = hold_lip(td, &inp->in6p_laddr); + toep->ce = hold_lip(td, &inp->in6p_laddr, NULL); if (toep->ce == NULL) DONT_OFFLOAD_ACTIVE_OPEN(ENOENT); Modified: head/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_listen.c Mon Feb 6 17:20:37 2017 (r313345) +++ head/sys/dev/cxgbe/tom/t4_listen.c Mon Feb 6 17:48:25 2017 (r313346) @@ -209,7 +209,7 @@ alloc_lctx(struct adapter *sc, struct in !IN6_ARE_ADDR_EQUAL(&in6addr_any, &inp->in6p_laddr)) { struct tom_data *td = sc->tom_softc; - lctx->ce = hold_lip(td, &inp->in6p_laddr); + lctx->ce = hold_lip(td, &inp->in6p_laddr, NULL); if (lctx->ce == NULL) { free(lctx, M_CXGBE); return (NULL); @@ -1584,6 +1584,8 @@ reset: INP_WLOCK_ASSERT(new_inp); MPASS(so->so_vnet == lctx->vnet); toep->vnet = lctx->vnet; + if (inc.inc_flags & INC_ISIPV6) + toep->ce = hold_lip(sc->tom_softc, &inc.inc6_laddr, lctx->ce); /* * This is for the unlikely case where the syncache entry that we added Modified: head/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom.c Mon Feb 6 17:20:37 2017 (r313345) +++ head/sys/dev/cxgbe/tom/t4_tom.c Mon Feb 6 17:48:25 2017 (r313346) @@ -730,12 +730,12 @@ search_lip(struct tom_data *td, struct i } struct clip_entry * -hold_lip(struct tom_data *td, struct in6_addr *lip) +hold_lip(struct tom_data *td, struct in6_addr *lip, struct clip_entry *ce) { - struct clip_entry *ce; mtx_lock(&td->clip_table_lock); - ce = search_lip(td, lip); + if (ce == NULL) + ce = search_lip(td, lip); if (ce != NULL) ce->refcount++; mtx_unlock(&td->clip_table_lock); Modified: head/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom.h Mon Feb 6 17:20:37 2017 (r313345) +++ head/sys/dev/cxgbe/tom/t4_tom.h Mon Feb 6 17:48:25 2017 (r313346) @@ -321,7 +321,8 @@ uint64_t calc_opt0(struct socket *, stru uint64_t select_ntuple(struct vi_info *, struct l2t_entry *); void set_tcpddp_ulp_mode(struct toepcb *); int negative_advice(int); -struct clip_entry *hold_lip(struct tom_data *, struct in6_addr *); +struct clip_entry *hold_lip(struct tom_data *, struct in6_addr *, + struct clip_entry *); void release_lip(struct tom_data *, struct clip_entry *); /* t4_connect.c */ From owner-svn-src-head@freebsd.org Mon Feb 6 17:50: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 CDAA0CD3758; Mon, 6 Feb 2017 17:50:10 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99999791; Mon, 6 Feb 2017 17:50:10 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16Ho9Vi084611; Mon, 6 Feb 2017 17:50:09 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16Ho9FU084609; Mon, 6 Feb 2017 17:50:09 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201702061750.v16Ho9FU084609@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 6 Feb 2017 17:50:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313347 - in head/sys/arm64: arm64 include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 17:50:10 -0000 Author: andrew Date: Mon Feb 6 17:50:09 2017 New Revision: 313347 URL: https://svnweb.freebsd.org/changeset/base/313347 Log: Remove arm64_tlb_flushID_SE, it's unused and may be wrong. Sponsored by: ABT Systems Ltd Modified: head/sys/arm64/arm64/cpufunc_asm.S head/sys/arm64/include/cpufunc.h Modified: head/sys/arm64/arm64/cpufunc_asm.S ============================================================================== --- head/sys/arm64/arm64/cpufunc_asm.S Mon Feb 6 17:48:25 2017 (r313346) +++ head/sys/arm64/arm64/cpufunc_asm.S Mon Feb 6 17:50:09 2017 (r313347) @@ -103,19 +103,6 @@ ENTRY(arm64_tlb_flushID) ret END(arm64_tlb_flushID) -ENTRY(arm64_tlb_flushID_SE) - ldr x1, .Lpage_mask - bic x0, x0, x1 -#ifdef SMP - tlbi vae1is, x0 -#else - tlbi vae1, x0 -#endif - dsb ish - isb - ret -END(arm64_tlb_flushID_SE) - /* * void arm64_dcache_wb_range(vm_offset_t, vm_size_t) */ Modified: head/sys/arm64/include/cpufunc.h ============================================================================== --- head/sys/arm64/include/cpufunc.h Mon Feb 6 17:48:25 2017 (r313346) +++ head/sys/arm64/include/cpufunc.h Mon Feb 6 17:50:09 2017 (r313347) @@ -129,7 +129,6 @@ extern int64_t dczva_line_size; #define cpu_setttb(a) arm64_setttb(a) #define cpu_tlb_flushID() arm64_tlb_flushID() -#define cpu_tlb_flushID_SE(e) arm64_tlb_flushID_SE(e) #define cpu_dcache_wbinv_range(a, s) arm64_dcache_wbinv_range((a), (s)) #define cpu_dcache_inv_range(a, s) arm64_dcache_inv_range((a), (s)) From owner-svn-src-head@freebsd.org Mon Feb 6 18:08: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 30407CD3E5E; Mon, 6 Feb 2017 18:08:04 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: from mail-yb0-x243.google.com (mail-yb0-x243.google.com [IPv6:2607:f8b0:4002:c09::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E3EF01669; Mon, 6 Feb 2017 18:08:03 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: by mail-yb0-x243.google.com with SMTP id j82so3844458ybg.2; Mon, 06 Feb 2017 10:08:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=U+/BTIQY/LGghXYRDnuVxv/Sjuh9tBpGxqzp0QHDa9A=; b=RPBfGLjSkmqYREE7t7qTdn5bCc4UIszVwqnKciTTyQkTp4BDI/0HwSoK3TrJrxRcLg XVuret5DlmUB1gXOu+tCcqsbjuQKSMsaK9EPYLKm3OE/MFGxo4tAfOP9UlcxSfQdHBmd WTziXFVakx4tCyFOmn8xiM3qatR73gOpzw43JoIcDVb+7tC35GQ3tapVdk1LHbTHiAXe ZrrjEDnjrGfalTgHszbrL5an6OWtm2ysKl2Nc6UJ6UOL9CeDsTOSrxfby7FKeT4+OJJ+ BOyRD+SZ7/3ayW8WmKnTIw5HATEm6Hj1RQrgAf3HyyCEg0hicFmGVBzErn4aD2N2PwB+ /w8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=U+/BTIQY/LGghXYRDnuVxv/Sjuh9tBpGxqzp0QHDa9A=; b=ixCuY1S0i6wb1gHnn68PJO1DoD6Keo/73XgypqjDndG1zRJh1R9RDMyFvZGnwnhmQ1 lciOqnKxOWmf/ZZSkb/N/wi77ku2liD4jVzDQz8A1G6pysv1NwGkmWLVXBR/ud/cxTEf NpfYew1kcuh16kcO9aS5kW7EpXUli6TbvDTVHITIeyYrJ3ctdSyAQjMwzAboWOm3HuHj s6ldZrd9M7eI1Gk0D8GLT0R2E2xft27am8492ElnZHxBfKSnrAzG9ykF54fYYT6Ra8nh 2lPlSj1Aedv7NK6x3fivTaDDlXKY7Z+fiHWIgG+AhhVLcalI6nxEOSe7oL6edz8sMgjB pxwA== X-Gm-Message-State: AMke39kHpiAxxbBSXmMk38wxckQnVTkET5SB7R1NSnoO8qj8WI4lH0FW1j1xPWQeqm09eJI1+9vcCS1HXHES5A== X-Received: by 10.37.101.215 with SMTP id z206mr8033057ybb.5.1486404483115; Mon, 06 Feb 2017 10:08:03 -0800 (PST) MIME-Version: 1.0 Sender: nparhar@gmail.com Received: by 10.13.227.194 with HTTP; Mon, 6 Feb 2017 10:08:02 -0800 (PST) In-Reply-To: <20170206094739.GC5366@zxy.spb.ru> References: <201702060519.v165JU1e078891@repo.freebsd.org> <20170206094739.GC5366@zxy.spb.ru> From: Navdeep Parhar Date: Mon, 6 Feb 2017 10:08:02 -0800 X-Google-Sender-Auth: VSO15czrbICV_dz3flHCBGfbuc4 Message-ID: Subject: Re: svn commit: r313318 - in head: share/man/man4 sys/dev/cxgbe To: Slawa Olhovchenkov Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-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: Mon, 06 Feb 2017 18:08:04 -0000 On Mon, Feb 6, 2017 at 1:47 AM, Slawa Olhovchenkov wrote: > On Mon, Feb 06, 2017 at 05:19:30AM +0000, Navdeep Parhar wrote: > >> Author: np >> Date: Mon Feb 6 05:19:29 2017 >> New Revision: 313318 >> URL: https://svnweb.freebsd.org/changeset/base/313318 >> >> Log: >> cxgbe(4): Allow tunables that control the number of queues to be set to >> '-n' to tell the driver to create _up to_ 'n' queues if enough cores are >> available. For example, setting hw.cxgbe.nrxq10g="-32" will result in >> 16 queues if the system has 16 cores, 32 if it has 32. >> >> There is no change in the default number of queues of any type. > > Just for my info: how many queues supported by different hardware (T4/T5/T6)? Each of them supports 1K+ interrupt capable rx queues. But the practical limit comes from the number of MSI-X vectors for PCIe PF4 of the card. With 128 interrupts max (most common) you have enough to run a 4 port card with 16 queues each. A 2 port could have 32 queues each. All this assumes that you set number of queues to some power of 2. If not then you could go higher than these values. Regards, Navdeep From owner-svn-src-head@freebsd.org Mon Feb 6 18:29: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 902D0CD337B; Mon, 6 Feb 2017 18:29:44 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62A9832F; Mon, 6 Feb 2017 18:29:44 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16IThsU001304; Mon, 6 Feb 2017 18:29:43 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16ITh1o001303; Mon, 6 Feb 2017 18:29:43 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201702061829.v16ITh1o001303@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Mon, 6 Feb 2017 18:29:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313348 - head/sys/boot/i386/libi386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 18:29:44 -0000 Author: tsoome Date: Mon Feb 6 18:29:43 2017 New Revision: 313348 URL: https://svnweb.freebsd.org/changeset/base/313348 Log: loader: biosdisk fix for 2+TB disks This fix is implementing partition based boundary check for disk IO and updates disk mediasize (if needed), based on information from partition table. As it appeared, the signed int based approach still has corner cases, and the wrapover based behavior is non-standard. The idea for this fix is based on two assumptions: The bug about media size is hitting large (2+TB) disks, lesser disks hopefully, are not affected. Large disks are using GPT (which does include information about disk size). Since our concern is about boot support and boot disks are partitioned, implementing partition boundaries based IO verification should make the media size issues mostly disappear. However, for large disk case, we do have the disk size available from GPT table. If non-GPT cases will appear, we still can make approximate calculation about disk size based on defined partition(s), however, this is not the objective of this patch, and can be added later if there is any need. This patch does implement disk media size adjustment (if needed) in bd_open(), and boundary check in bd_realstrategy(). Reviewed by: allanjude Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D8595 Modified: head/sys/boot/i386/libi386/biosdisk.c Modified: head/sys/boot/i386/libi386/biosdisk.c ============================================================================== --- head/sys/boot/i386/libi386/biosdisk.c Mon Feb 6 17:50:09 2017 (r313347) +++ head/sys/boot/i386/libi386/biosdisk.c Mon Feb 6 18:29:43 2017 (r313348) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); */ #include +#include #include #include #include @@ -302,15 +303,28 @@ bd_int13probe(struct bdinfo *bd) if (!V86_CY(v86.efl)) { uint64_t total; - if (params.sectors != 0) - bd->bd_sectors = params.sectors; + /* + * Sector size must be a multiple of 512 bytes. + * An alternate test would be to check power of 2, + * powerof2(params.sector_size). + */ + if (params.sector_size % BIOSDISK_SECSIZE) + bd->bd_sectorsize = BIOSDISK_SECSIZE; + else + bd->bd_sectorsize = params.sector_size; + + total = bd->bd_sectorsize * params.sectors; + if (params.sectors != 0) { + /* Only update if we did not overflow. */ + if (total > params.sectors) + bd->bd_sectors = params.sectors; + } total = (uint64_t)params.cylinders * params.heads * params.sectors_per_track; if (bd->bd_sectors < total) bd->bd_sectors = total; - bd->bd_sectorsize = params.sector_size; ret = 1; } DEBUG("unit 0x%x flags %x, sectors %llu, sectorsize %u", @@ -377,8 +391,10 @@ static int bd_open(struct open_file *f, ...) { struct disk_devdesc *dev, rdev; + struct disk_devdesc disk; int err, g_err; va_list ap; + uint64_t size; va_start(ap, f); dev = va_arg(ap, struct disk_devdesc *); @@ -389,6 +405,33 @@ bd_open(struct open_file *f, ...) BD(dev).bd_open++; if (BD(dev).bd_bcache == NULL) BD(dev).bd_bcache = bcache_allocate(); + + /* + * Read disk size from partition. + * This is needed to work around buggy BIOS systems returning + * wrong (truncated) disk media size. + * During bd_probe() we tested if the mulitplication of bd_sectors + * would overflow so it should be safe to perform here. + */ + disk.d_dev = dev->d_dev; + disk.d_type = dev->d_type; + disk.d_unit = dev->d_unit; + disk.d_opendata = NULL; + disk.d_slice = -1; + disk.d_partition = -1; + disk.d_offset = 0; + if (disk_open(&disk, BD(dev).bd_sectors * BD(dev).bd_sectorsize, + BD(dev).bd_sectorsize, (BD(dev).bd_flags & BD_FLOPPY) ? + DISK_F_NOCACHE: 0) == 0) { + + if (disk_ioctl(&disk, DIOCGMEDIASIZE, &size) == 0) { + size /= BD(dev).bd_sectorsize; + if (size > BD(dev).bd_sectors) + BD(dev).bd_sectors = size; + } + disk_close(&disk); + } + err = disk_open(dev, BD(dev).bd_sectors * BD(dev).bd_sectorsize, BD(dev).bd_sectorsize, (BD(dev).bd_flags & BD_FLOPPY) ? DISK_F_NOCACHE: 0); @@ -486,8 +529,14 @@ static int bd_ioctl(struct open_file *f, u_long cmd, void *data) { struct disk_devdesc *dev; + int rc; dev = (struct disk_devdesc *)f->f_devdata; + + rc = disk_ioctl(dev, cmd, data); + if (rc != ENOTTY) + return (rc); + switch (cmd) { case DIOCGSECTORSIZE: *(u_int *)data = BD(dev).bd_sectorsize; @@ -521,7 +570,8 @@ bd_realstrategy(void *devdata, int rw, d char *buf, size_t *rsize) { struct disk_devdesc *dev = (struct disk_devdesc *)devdata; - int blks, remaining; + uint64_t disk_blocks; + int blks; #ifdef BD_SUPPORT_FRAGS /* XXX: sector size */ char fragbuf[BIOSDISK_SECSIZE]; size_t fragsize; @@ -533,19 +583,43 @@ bd_realstrategy(void *devdata, int rw, d #endif DEBUG("open_disk %p", dev); + + /* + * Check the value of the size argument. We do have quite small + * heap (64MB), but we do not know good upper limit, so we check against + * INT_MAX here. This will also protect us against possible overflows + * while translating block count to bytes. + */ + if (size > INT_MAX) { + DEBUG("too large read: %zu bytes", size); + return (EIO); + } + blks = size / BD(dev).bd_sectorsize; + if (dblk > dblk + blks) + return (EIO); + if (rsize) *rsize = 0; + /* Get disk blocks, this value is either for whole disk or for partition */ + if (disk_ioctl(dev, DIOCGMEDIASIZE, &disk_blocks)) { + /* DIOCGMEDIASIZE does return bytes. */ + disk_blocks /= BD(dev).bd_sectorsize; + } else { + /* We should not get here. Just try to survive. */ + disk_blocks = BD(dev).bd_sectors - dev->d_offset; + } + + /* Validate source block address. */ + if (dblk < dev->d_offset || dblk >= dev->d_offset + disk_blocks) + return (EIO); + /* - * Perform partial read to prevent read-ahead crossing - * the end of disk - or any 32 bit aliases of the end. - * Signed arithmetic is used to handle wrap-around cases - * like we do for TCP sequence numbers. + * Truncate if we are crossing disk or partition end. */ - remaining = (int)(BD(dev).bd_sectors - dblk); /* truncate */ - if (remaining > 0 && remaining < blks) { - blks = remaining; + if (dblk + blks >= dev->d_offset + disk_blocks) { + blks = dev->d_offset + disk_blocks - dblk; size = blks * BD(dev).bd_sectorsize; DEBUG("short read %d", blks); } From owner-svn-src-head@freebsd.org Mon Feb 6 18:44: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 06DCECD36DE; Mon, 6 Feb 2017 18:44:17 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE5DEE20; Mon, 6 Feb 2017 18:44:16 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16IiFRp009414; Mon, 6 Feb 2017 18:44:15 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16IiFTO009411; Mon, 6 Feb 2017 18:44:15 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201702061844.v16IiFTO009411@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Mon, 6 Feb 2017 18:44:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313349 - in head/sys/boot/i386: btx/lib libi386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 18:44:17 -0000 Author: tsoome Date: Mon Feb 6 18:44:15 2017 New Revision: 313349 URL: https://svnweb.freebsd.org/changeset/base/313349 Log: loader: disk io should not use alloca() The alloca() does give us pointer and we have no practical way to check if the area is actually available, resulting in corruption in corner cases. Unfortunately we do not have too many options right now, but to use one page. Reviewed by: allanjude Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D9455 Modified: head/sys/boot/i386/btx/lib/btxv86.h head/sys/boot/i386/libi386/bioscd.c head/sys/boot/i386/libi386/biosdisk.c Modified: head/sys/boot/i386/btx/lib/btxv86.h ============================================================================== --- head/sys/boot/i386/btx/lib/btxv86.h Mon Feb 6 18:29:43 2017 (r313348) +++ head/sys/boot/i386/btx/lib/btxv86.h Mon Feb 6 18:44:15 2017 (r313349) @@ -23,6 +23,14 @@ #include #include +/* + * Memory buffer space for real mode IO. + * Just one page is not much, but the space is rather limited. + * See ../btx/btx.S for details. + */ +#define V86_IO_BUFFER 0x8000 +#define V86_IO_BUFFER_SIZE 0x1000 + #define V86_ADDR 0x10000 /* Segment:offset address */ #define V86_CALLF 0x20000 /* Emulate far call */ #define V86_FLAGS 0x40000 /* Return flags */ Modified: head/sys/boot/i386/libi386/bioscd.c ============================================================================== --- head/sys/boot/i386/libi386/bioscd.c Mon Feb 6 18:29:43 2017 (r313348) +++ head/sys/boot/i386/libi386/bioscd.c Mon Feb 6 18:44:15 2017 (r313349) @@ -309,9 +309,6 @@ bc_realstrategy(void *devdata, int rw, d return (0); } -/* Max number of sectors to bounce-buffer at a time. */ -#define CD_BOUNCEBUF 8 - /* return negative value for an error, otherwise blocks read */ static int bc_read(int unit, daddr_t dblk, int blks, caddr_t dest) @@ -339,8 +336,9 @@ bc_read(int unit, daddr_t dblk, int blks * physical memory so we have to arrange a suitable * bounce buffer. */ - x = min(CD_BOUNCEBUF, (unsigned)blks); - bbuf = alloca(x * BIOSCD_SECSIZE); + x = V86_IO_BUFFER_SIZE / BIOSCD_SECSIZE; + x = min(x, (unsigned)blks); + bbuf = PTOV(V86_IO_BUFFER); maxfer = x; } else { bbuf = NULL; Modified: head/sys/boot/i386/libi386/biosdisk.c ============================================================================== --- head/sys/boot/i386/libi386/biosdisk.c Mon Feb 6 18:29:43 2017 (r313348) +++ head/sys/boot/i386/libi386/biosdisk.c Mon Feb 6 18:44:15 2017 (r313349) @@ -666,9 +666,6 @@ bd_realstrategy(void *devdata, int rw, d return (0); } -/* Max number of sectors to bounce-buffer if the request crosses a 64k boundary */ -#define FLOPPY_BOUNCEBUF 18 - static int bd_edd_io(struct disk_devdesc *dev, daddr_t dblk, int blks, caddr_t dest, int write) @@ -732,7 +729,7 @@ static int bd_io(struct disk_devdesc *dev, daddr_t dblk, int blks, caddr_t dest, int write) { u_int x, sec, result, resid, retry, maxfer; - caddr_t p, xp, bbuf, breg; + caddr_t p, xp, bbuf; /* Just in case some idiot actually tries to read/write -1 blocks... */ if (blks < 0) @@ -754,17 +751,12 @@ bd_io(struct disk_devdesc *dev, daddr_t * as we need to. Use the bottom half unless there is a break * there, in which case we use the top half. */ - x = min(FLOPPY_BOUNCEBUF, (unsigned)blks); - bbuf = alloca(x * 2 * BD(dev).bd_sectorsize); - if (((u_int32_t)VTOP(bbuf) & 0xffff0000) == - ((u_int32_t)VTOP(bbuf + x * BD(dev).bd_sectorsize) & 0xffff0000)) { - breg = bbuf; - } else { - breg = bbuf + x * BD(dev).bd_sectorsize; - } + x = V86_IO_BUFFER_SIZE / BD(dev).bd_sectorsize; + x = min(x, (unsigned)blks); + bbuf = PTOV(V86_IO_BUFFER); maxfer = x; /* limit transfers to bounce region size */ } else { - breg = bbuf = NULL; + bbuf = NULL; maxfer = 0; } @@ -779,14 +771,14 @@ bd_io(struct disk_devdesc *dev, daddr_t x = min(x, maxfer); /* fit bounce buffer */ /* where do we transfer to? */ - xp = bbuf == NULL ? p : breg; + xp = bbuf == NULL ? p : bbuf; /* * Put your Data In, Put your Data out, * Put your Data In, and shake it all about */ if (write && bbuf != NULL) - bcopy(p, breg, x * BD(dev).bd_sectorsize); + bcopy(p, bbuf, x * BD(dev).bd_sectorsize); /* * Loop retrying the operation a couple of times. The BIOS @@ -820,7 +812,7 @@ bd_io(struct disk_devdesc *dev, daddr_t return(-1); } if (!write && bbuf != NULL) - bcopy(breg, p, x * BD(dev).bd_sectorsize); + bcopy(bbuf, p, x * BD(dev).bd_sectorsize); p += (x * BD(dev).bd_sectorsize); dblk += x; resid -= x; From owner-svn-src-head@freebsd.org Mon Feb 6 18:38: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 57AE3CD3543; Mon, 6 Feb 2017 18:38:29 +0000 (UTC) (envelope-from lidl@pix.net) Received: from hydra.pix.net (hydra.pix.net [IPv6:2001:470:e254::4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.pix.net", Issuer "Pix.Com Technologies LLC CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 17339A63; Mon, 6 Feb 2017 18:38:29 +0000 (UTC) (envelope-from lidl@pix.net) Received: from torb.pix.net (torb.pix.net [IPv6:2001:470:e254:10:1042:6a31:1deb:9f8a]) (authenticated bits=0) by hydra.pix.net (8.16.0.19/8.15.2) with ESMTPA id v16IcLRR098302; Mon, 6 Feb 2017 13:38:21 -0500 (EST) (envelope-from lidl@pix.net) Subject: Re: svn commit: r313037 - in head/sys: amd64/include kern mips/include net powerpc/include sparc64/include To: Jason Harmening , Svatopluk Kraus References: <201702010332.v113WnYf041362@repo.freebsd.org> <20170203231238.0675c289@kan> <8523aaa5-6c30-9f9f-40f0-fdf82cdf1669@pix.net> <6bf86e46-9714-c7e9-8d47-845761e2de24@FreeBSD.org> <8a2f7f7d-14c3-8e75-e060-fc41213ce389@FreeBSD.org> Cc: Andreas Tobler , Alexander Kabaev , "Jason A. Harmening" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Ed Maste , Justin Hibbits From: Kurt Lidl Message-ID: <5fcc9f37-3c0e-2685-2779-75b2a7566599@pix.net> Date: Mon, 6 Feb 2017 13:38:21 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Mon, 06 Feb 2017 18:56:48 +0000 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: Mon, 06 Feb 2017 18:38:29 -0000 On 2/5/17 1:59 PM, Jason Harmening wrote: > Actually attaching the patch this time (**** gmail client) > > On Sun, Feb 5, 2017 at 10:58 AM, Jason Harmening > > wrote: > > Hmm, it's a good idea to consider the possibility of a barrier > issue. It wouldn't be the first time we've had such a problem on a > weakly-ordered architecture. That said, I don't see a problem in > this case. smp_rendezvous_cpus() takes a spinlock and then issues > atomic_store_rel_int() to ensure the rendezvous params are visible > to other cpus. The latter corresponds to lwsync on powerpc, which > AFAIK should be sufficient to ensure visibility of prior stores. > > For now I'm going with the simpler explanation that I made a bad > assumption in the powerpc get_pcpu() and there is some context in > which the read of sprg0 doesn't return a consistent pointer value. > Unfortunately I don't see where that might be right now. > > On the mips side, Kurt/Alexander can you test the attached patch? > It contains a simple fix to ensure get_pcpu() returns the consistent > per-cpu pointer. I applied this patch on top of r313347 (which I had verified that a kernel built from that revisions to boot from successfully). The kernel from r313347+(this patch) least gets to multi-user on my ERL. So, that's a big improvement. I'll start a native buildworld/buildkernel on the ERL, and that ought to give it a reasonable workout. -Kurt > > On Sat, Feb 4, 2017 at 1:34 PM, Svatopluk Kraus > wrote: > > Probably not related. But when I took short look to the patch to see > what could go wrong, I walked into the following comment in > _rm_wlock(): "Assumes rm->rm_writecpus update is visible on > other CPUs > before rm_cleanIPI is called." There is no explicit barrier to > ensure > it. However, there might be some barriers inside of > smp_rendezvous_cpus(). I have no idea what could happened if this > assumption is not met. Note that rm_cleanIPI() is affected by the > patch. > > > > On Sat, Feb 4, 2017 at 9:39 PM, Jason Harmening > > > wrote: > > Can you post an example of such panic? Only 2 MI pieces were > changed, > > netisr and rmlock. I haven't seen problems on my own > amd64/i386/arm testing > > of this, so a backtrace might help to narrow down the cause. > > > > On Sat, Feb 4, 2017 at 12:22 PM, Andreas Tobler > > > > wrote: > >> > >> On 04.02.17 20:54, Jason Harmening wrote: > >>> > >>> I suspect this broke rmlocks for mips because the rmlock > implementation > >>> takes the address of the per-CPU pc_rm_queue when building > tracker > >>> lists. That address may be later accessed from another CPU > and will > >>> then translate to the wrong physical region if the address > was taken > >>> relative to the globally-constant pcpup VA used on mips. > >>> > >>> Regardless, for mips get_pcpup() should be implemented as > >>> pcpu_find(curcpu) since returning an address that may mean > something > >>> different depending on the CPU seems like a big POLA > violation if > >>> nothing else. > >>> > >>> I'm more concerned about the report of powerpc breakage. > For powerpc we > >>> simply take each pcpu pointer from the pc_allcpu list (which > is the same > >>> value stored in the cpuid_to_pcpu array) and pass it through > the ap_pcpu > >>> global to each AP's startup code, which then stores it in > sprg0. It > >>> should be globally unique and won't have the > variable-translation issues > >>> seen on mips. Andreas, are you certain this change was > responsible the > >>> breakage you saw, and was it the same sort of hang observed > on mips? > >> > >> > >> I'm really sure. 313036 booted fine, allowed me to execute heavy > >> compilation jobs, np. 313037 on the other side gave me > various patterns of > >> panics. During startup, but I also succeeded to get into > multiuser and then > >> the panic happend during port building. > >> > >> I have no deeper inside where pcpu data is used. Justin > mentioned netisr? > >> > >> Andreas > >> > > > > > From owner-svn-src-head@freebsd.org Mon Feb 6 19:13: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 E11E2CD3158; Mon, 6 Feb 2017 19:13:13 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF8871FDF; Mon, 6 Feb 2017 19:13:13 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 981F210A791; Mon, 6 Feb 2017 14:13:12 -0500 (EST) From: John Baldwin To: TAKAHASHI Yoshihiro Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/example... Date: Mon, 06 Feb 2017 10:54:18 -0800 Message-ID: <1794109.pgrNgNxaIj@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <20170205.221144.1616842004369178243.nyan@FreeBSD.org> References: <201701280222.v0S2MFSR022477@repo.freebsd.org> <20170205.221144.1616842004369178243.nyan@FreeBSD.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 06 Feb 2017 14:13:12 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-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: Mon, 06 Feb 2017 19:13:14 -0000 On Sunday, February 05, 2017 10:11:44 PM TAKAHASHI Yoshihiro wrote: > I have decided to remove pc98 support on stable/11 as well > after 2 weeks to reduce conflicts between head and stable/11. That seems like it might be a bit invasive to do on a stable branch? In the past when we've retired architectures we've only done it in HEAD, but not removed it from a stable branch. -- John Baldwin From owner-svn-src-head@freebsd.org Mon Feb 6 19:13: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 77880CD3170; Mon, 6 Feb 2017 19:13:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 583831FE1; Mon, 6 Feb 2017 19:13:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 4FC9E10A7DB; Mon, 6 Feb 2017 14:13:15 -0500 (EST) From: John Baldwin To: Andrew Turner Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313342 - head/sys/conf Date: Mon, 06 Feb 2017 10:43:09 -0800 Message-ID: <2448004.hnTc9TClBV@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201702061441.v16EfYZx010320@repo.freebsd.org> References: <201702061441.v16EfYZx010320@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 06 Feb 2017 14:13:15 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-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: Mon, 06 Feb 2017 19:13:16 -0000 On Monday, February 06, 2017 02:41:34 PM Andrew Turner wrote: > Author: andrew > Date: Mon Feb 6 14:41:34 2017 > New Revision: 313342 > URL: https://svnweb.freebsd.org/changeset/base/313342 > > Log: > Only build the ACPI PCI drivers on x86, they are unlikely to be used on > arm64 without dignificant changes. > > Obtained from: ABT Systems Ltd > Sponsored by: The FreeBSD Foundation I still think this is not really the right approach. Nothing about _BBN, _CRS, or _PRT, etc. is x86-specific. -- John Baldwin From owner-svn-src-head@freebsd.org Mon Feb 6 20:37: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 8B5FBCD3BCE; Mon, 6 Feb 2017 20:37:00 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E8441A9B; Mon, 6 Feb 2017 20:37:00 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16KaxF9061349; Mon, 6 Feb 2017 20:36:59 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16Kaxbc061348; Mon, 6 Feb 2017 20:36:59 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201702062036.v16Kaxbc061348@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 6 Feb 2017 20:36:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313350 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 20:37:00 -0000 Author: trasz Date: Mon Feb 6 20:36:59 2017 New Revision: 313350 URL: https://svnweb.freebsd.org/changeset/base/313350 Log: In r290196 the root mount hold mechanism was changed to make it not wait for mount hold release if the root device already exists. So, unless your rootdev is not on USB - ie in the usual case - the root mount won't wait for USB. However, the old behaviour was sometimes used as "wait until USB is fully enumerated", and r290196 broke that. This commit adds vfs.root_mount_always_wait tunable, to force the kernel to always wait for root mount holds, even if the root is already there. Reviewed by: kib MFC after: 2 weeks Relnotes: yes Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9387 Modified: head/sys/kern/vfs_mountroot.c Modified: head/sys/kern/vfs_mountroot.c ============================================================================== --- head/sys/kern/vfs_mountroot.c Mon Feb 6 18:44:15 2017 (r313349) +++ head/sys/kern/vfs_mountroot.c Mon Feb 6 20:36:59 2017 (r313350) @@ -132,6 +132,11 @@ static int root_mount_complete; static int root_mount_timeout = 3; TUNABLE_INT("vfs.mountroot.timeout", &root_mount_timeout); +static int root_mount_always_wait = 0; +SYSCTL_INT(_vfs, OID_AUTO, root_mount_always_wait, CTLFLAG_RDTUN, + &root_mount_always_wait, 0, + "Wait for root mount holds even if the root device already exists"); + SYSCTL_PROC(_vfs, OID_AUTO, root_mount_hold, CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, 0, sysctl_vfs_root_mount_hold, "A", @@ -961,10 +966,11 @@ vfs_mountroot_wait_if_neccessary(const c /* * In case of ZFS and NFS we don't have a way to wait for - * specific device. + * specific device. Also do the wait if the user forced that + * behaviour by setting vfs.root_mount_always_wait=1. */ if (strcmp(fs, "zfs") == 0 || strstr(fs, "nfs") != NULL || - dev[0] == '\0') { + dev[0] == '\0' || root_mount_always_wait != 0) { vfs_mountroot_wait(); return (0); } From owner-svn-src-head@freebsd.org Mon Feb 6 20:44: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 4AF79CD3EDB; Mon, 6 Feb 2017 20:44:36 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 17FA085; Mon, 6 Feb 2017 20:44:36 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16KiZTI065164; Mon, 6 Feb 2017 20:44:35 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16KiZOv065163; Mon, 6 Feb 2017 20:44:35 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201702062044.v16KiZOv065163@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 6 Feb 2017 20:44:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313351 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 20:44:36 -0000 Author: trasz Date: Mon Feb 6 20:44:34 2017 New Revision: 313351 URL: https://svnweb.freebsd.org/changeset/base/313351 Log: Make root_mount_hold() work after boot. This is important for two reasons. First is rerooting into USB-mounted device that happens to be not yet enumerated. The second is when mounting with (non-root) filesystem on USB device on a hub that's enumerated later than the root mount: the rc scripts explicitly mount for the root mount holds to be released, but each USB bus takes the hold asynchronously, and if that happens after root mount, it would just get ignored. Reviewed by: marcel MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9388 Modified: head/sys/kern/vfs_mountroot.c Modified: head/sys/kern/vfs_mountroot.c ============================================================================== --- head/sys/kern/vfs_mountroot.c Mon Feb 6 20:36:59 2017 (r313350) +++ head/sys/kern/vfs_mountroot.c Mon Feb 6 20:44:34 2017 (r313351) @@ -171,9 +171,6 @@ root_mount_hold(const char *identifier) { struct root_hold_token *h; - if (root_mounted()) - return (NULL); - h = malloc(sizeof *h, M_DEVBUF, M_ZERO | M_WAITOK); h->who = identifier; mtx_lock(&root_holds_mtx); @@ -186,8 +183,8 @@ void root_mount_rel(struct root_hold_token *h) { - if (h == NULL) - return; + KASSERT(h != NULL, ("%s: NULL token", __func__)); + mtx_lock(&root_holds_mtx); LIST_REMOVE(h, list); wakeup(&root_holds); From owner-svn-src-head@freebsd.org Mon Feb 6 20:57: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 0349CCD318B; Mon, 6 Feb 2017 20:57:14 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF8BA912; Mon, 6 Feb 2017 20:57:13 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16KvC1t069672; Mon, 6 Feb 2017 20:57:12 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16KvCtI069664; Mon, 6 Feb 2017 20:57:12 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201702062057.v16KvCtI069664@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 6 Feb 2017 20:57:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313352 - in head/sys: compat/cloudabi compat/freebsd32 compat/linux vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 20:57:14 -0000 Author: trasz Date: Mon Feb 6 20:57:12 2017 New Revision: 313352 URL: https://svnweb.freebsd.org/changeset/base/313352 Log: Add kern_vm_mmap2(), kern_vm_mprotect(), kern_vm_msync(), kern_vm_munlock(), kern_vm_munmap(), and kern_vm_madvise(), and use them in various compats instead of their sys_*() counterparts. Reviewed by: ed, dchagin, kib MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9378 Modified: head/sys/compat/cloudabi/cloudabi_mem.c head/sys/compat/freebsd32/freebsd32_misc.c head/sys/compat/linux/linux_misc.c head/sys/compat/linux/linux_mmap.c head/sys/vm/vm_extern.h head/sys/vm/vm_mmap.c Modified: head/sys/compat/cloudabi/cloudabi_mem.c ============================================================================== --- head/sys/compat/cloudabi/cloudabi_mem.c Mon Feb 6 20:44:34 2017 (r313351) +++ head/sys/compat/cloudabi/cloudabi_mem.c Mon Feb 6 20:57:12 2017 (r313352) @@ -28,7 +28,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include + +#include #include @@ -62,137 +64,115 @@ int cloudabi_sys_mem_advise(struct thread *td, struct cloudabi_sys_mem_advise_args *uap) { - struct madvise_args madvise_args = { - .addr = uap->mapping, - .len = uap->mapping_len - }; + int behav; switch (uap->advice) { case CLOUDABI_ADVICE_DONTNEED: - madvise_args.behav = MADV_DONTNEED; + behav = MADV_DONTNEED; break; case CLOUDABI_ADVICE_NORMAL: - madvise_args.behav = MADV_NORMAL; + behav = MADV_NORMAL; break; case CLOUDABI_ADVICE_RANDOM: - madvise_args.behav = MADV_RANDOM; + behav = MADV_RANDOM; break; case CLOUDABI_ADVICE_SEQUENTIAL: - madvise_args.behav = MADV_SEQUENTIAL; + behav = MADV_SEQUENTIAL; break; case CLOUDABI_ADVICE_WILLNEED: - madvise_args.behav = MADV_WILLNEED; + behav = MADV_WILLNEED; break; default: return (EINVAL); } - return (sys_madvise(td, &madvise_args)); + return (kern_vm_madvise(td, (vm_offset_t)uap->mapping, + uap->mapping_len, behav)); } int cloudabi_sys_mem_lock(struct thread *td, struct cloudabi_sys_mem_lock_args *uap) { - struct mlock_args mlock_args = { - .addr = uap->mapping, - .len = uap->mapping_len - }; - return (sys_mlock(td, &mlock_args)); + return (vm_mlock(td->td_proc, td->td_ucred, uap->mapping, + uap->mapping_len)); } int cloudabi_sys_mem_map(struct thread *td, struct cloudabi_sys_mem_map_args *uap) { - struct mmap_args mmap_args = { - .addr = uap->addr, - .len = uap->len, - .fd = uap->fd, - .pos = uap->off - }; - int error; + int error, flags, prot; /* Translate flags. */ + flags = 0; if (uap->flags & CLOUDABI_MAP_ANON) - mmap_args.flags |= MAP_ANON; + flags |= MAP_ANON; if (uap->flags & CLOUDABI_MAP_FIXED) - mmap_args.flags |= MAP_FIXED; + flags |= MAP_FIXED; if (uap->flags & CLOUDABI_MAP_PRIVATE) - mmap_args.flags |= MAP_PRIVATE; + flags |= MAP_PRIVATE; if (uap->flags & CLOUDABI_MAP_SHARED) - mmap_args.flags |= MAP_SHARED; + flags |= MAP_SHARED; /* Translate protection. */ - error = convert_mprot(uap->prot, &mmap_args.prot); + error = convert_mprot(uap->prot, &prot); if (error != 0) return (error); - return (sys_mmap(td, &mmap_args)); + return (kern_vm_mmap(td, (vm_offset_t)uap->addr, uap->len, prot, + flags, uap->fd, uap->off)); } int cloudabi_sys_mem_protect(struct thread *td, struct cloudabi_sys_mem_protect_args *uap) { - struct mprotect_args mprotect_args = { - .addr = uap->mapping, - .len = uap->mapping_len, - }; - int error; + int error, prot; /* Translate protection. */ - error = convert_mprot(uap->prot, &mprotect_args.prot); + error = convert_mprot(uap->prot, &prot); if (error != 0) return (error); - return (sys_mprotect(td, &mprotect_args)); + return (kern_vm_mprotect(td, (vm_offset_t)uap->mapping, + uap->mapping_len, prot)); } int cloudabi_sys_mem_sync(struct thread *td, struct cloudabi_sys_mem_sync_args *uap) { - struct msync_args msync_args = { - .addr = uap->mapping, - .len = uap->mapping_len, - }; + int flags; /* Convert flags. */ switch (uap->flags & (CLOUDABI_MS_ASYNC | CLOUDABI_MS_SYNC)) { case CLOUDABI_MS_ASYNC: - msync_args.flags |= MS_ASYNC; + flags = MS_ASYNC; break; case CLOUDABI_MS_SYNC: - msync_args.flags |= MS_SYNC; + flags = MS_SYNC; break; default: return (EINVAL); } if ((uap->flags & CLOUDABI_MS_INVALIDATE) != 0) - msync_args.flags |= MS_INVALIDATE; + flags |= MS_INVALIDATE; - return (sys_msync(td, &msync_args)); + return (kern_vm_msync(td, (vm_offset_t)uap->mapping, + uap->mapping_len, flags)); } int cloudabi_sys_mem_unlock(struct thread *td, struct cloudabi_sys_mem_unlock_args *uap) { - struct munlock_args munlock_args = { - .addr = uap->mapping, - .len = uap->mapping_len - }; - return (sys_munlock(td, &munlock_args)); + return (kern_vm_munlock(td, (vm_offset_t)uap->mapping, uap->mapping_len)); } int cloudabi_sys_mem_unmap(struct thread *td, struct cloudabi_sys_mem_unmap_args *uap) { - struct munmap_args munmap_args = { - .addr = uap->mapping, - .len = uap->mapping_len - }; - return (sys_munmap(td, &munmap_args)); + return (kern_vm_munmap(td, (vm_offset_t)uap->mapping, uap->mapping_len)); } Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Mon Feb 6 20:44:34 2017 (r313351) +++ head/sys/compat/freebsd32/freebsd32_misc.c Mon Feb 6 20:57:12 2017 (r313352) @@ -449,42 +449,30 @@ freebsd32_fexecve(struct thread *td, str int freebsd32_mprotect(struct thread *td, struct freebsd32_mprotect_args *uap) { - struct mprotect_args ap; + int prot; - ap.addr = PTRIN(uap->addr); - ap.len = uap->len; - ap.prot = uap->prot; + prot = uap->prot; #if defined(__amd64__) - if (i386_read_exec && (ap.prot & PROT_READ) != 0) - ap.prot |= PROT_EXEC; + if (i386_read_exec && (prot & PROT_READ) != 0) + prot |= PROT_EXEC; #endif - return (sys_mprotect(td, &ap)); + return (kern_vm_mprotect(td, (vm_offset_t)PTRIN(uap->addr), + uap->len, prot)); } int freebsd32_mmap(struct thread *td, struct freebsd32_mmap_args *uap) { - struct mmap_args ap; - vm_offset_t addr = (vm_offset_t) uap->addr; - vm_size_t len = uap->len; - int prot = uap->prot; - int flags = uap->flags; - int fd = uap->fd; - off_t pos = PAIR32TO64(off_t,uap->pos); + int prot; + prot = uap->prot; #if defined(__amd64__) if (i386_read_exec && (prot & PROT_READ)) prot |= PROT_EXEC; #endif - ap.addr = (void *) addr; - ap.len = len; - ap.prot = prot; - ap.flags = flags; - ap.fd = fd; - ap.pos = pos; - - return (sys_mmap(td, &ap)); + return (kern_vm_mmap(td, (vm_offset_t)uap->addr, uap->len, prot, + uap->flags, uap->fd, PAIR32TO64(off_t, uap->pos))); } #ifdef COMPAT_FREEBSD6 Modified: head/sys/compat/linux/linux_misc.c ============================================================================== --- head/sys/compat/linux/linux_misc.c Mon Feb 6 20:44:34 2017 (r313351) +++ head/sys/compat/linux/linux_misc.c Mon Feb 6 20:57:12 2017 (r313352) @@ -585,10 +585,8 @@ select_out: int linux_mremap(struct thread *td, struct linux_mremap_args *args) { - struct munmap_args /* { - void *addr; - size_t len; - } */ bsd_args; + uintptr_t addr; + size_t len; int error = 0; #ifdef DEBUG @@ -623,10 +621,9 @@ linux_mremap(struct thread *td, struct l } if (args->new_len < args->old_len) { - bsd_args.addr = - (caddr_t)((uintptr_t)args->addr + args->new_len); - bsd_args.len = args->old_len - args->new_len; - error = sys_munmap(td, &bsd_args); + addr = args->addr + args->new_len; + len = args->old_len - args->new_len; + error = kern_vm_munmap(td, addr, len); } td->td_retval[0] = error ? 0 : (uintptr_t)args->addr; @@ -640,13 +637,9 @@ linux_mremap(struct thread *td, struct l int linux_msync(struct thread *td, struct linux_msync_args *args) { - struct msync_args bsd_args; - bsd_args.addr = (caddr_t)(uintptr_t)args->addr; - bsd_args.len = (uintptr_t)args->len; - bsd_args.flags = args->fl & ~LINUX_MS_SYNC; - - return (sys_msync(td, &bsd_args)); + return (kern_vm_msync(td, args->addr, args->len, + args->fl & ~LINUX_MS_SYNC)); } int Modified: head/sys/compat/linux/linux_mmap.c ============================================================================== --- head/sys/compat/linux/linux_mmap.c Mon Feb 6 20:44:34 2017 (r313351) +++ head/sys/compat/linux/linux_mmap.c Mon Feb 6 20:57:12 2017 (r313352) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -67,15 +68,7 @@ linux_mmap_common(struct thread *td, uin { struct proc *p = td->td_proc; struct vmspace *vms = td->td_proc->p_vmspace; - struct mmap_args /* { - caddr_t addr; - size_t len; - int prot; - int flags; - int fd; - off_t pos; - } */ bsd_args; - int error; + int bsd_flags, error; struct file *fp; cap_rights_t rights; @@ -83,7 +76,7 @@ linux_mmap_common(struct thread *td, uin addr, len, prot, flags, fd, pos); error = 0; - bsd_args.flags = 0; + bsd_flags = 0; fp = NULL; /* @@ -94,21 +87,21 @@ linux_mmap_common(struct thread *td, uin return (EINVAL); if (flags & LINUX_MAP_SHARED) - bsd_args.flags |= MAP_SHARED; + bsd_flags |= MAP_SHARED; if (flags & LINUX_MAP_PRIVATE) - bsd_args.flags |= MAP_PRIVATE; + bsd_flags |= MAP_PRIVATE; if (flags & LINUX_MAP_FIXED) - bsd_args.flags |= MAP_FIXED; + bsd_flags |= MAP_FIXED; if (flags & LINUX_MAP_ANON) { /* Enforce pos to be on page boundary, then ignore. */ if ((pos & PAGE_MASK) != 0) return (EINVAL); pos = 0; - bsd_args.flags |= MAP_ANON; + bsd_flags |= MAP_ANON; } else - bsd_args.flags |= MAP_NOSYNC; + bsd_flags |= MAP_NOSYNC; if (flags & LINUX_MAP_GROWSDOWN) - bsd_args.flags |= MAP_STACK; + bsd_flags |= MAP_STACK; /* * PROT_READ, PROT_WRITE, or PROT_EXEC implies PROT_READ and PROT_EXEC @@ -118,14 +111,13 @@ linux_mmap_common(struct thread *td, uin * * XXX. Linux checks that the file system is not mounted with noexec. */ - bsd_args.prot = prot; #if defined(__amd64__) - linux_fixup_prot(td, &bsd_args.prot); + linux_fixup_prot(td, &prot); #endif /* Linux does not check file descriptor when MAP_ANONYMOUS is set. */ - bsd_args.fd = (bsd_args.flags & MAP_ANON) ? -1 : fd; - if (bsd_args.fd != -1) { + fd = (bsd_flags & MAP_ANON) ? -1 : fd; + if (fd != -1) { /* * Linux follows Solaris mmap(2) description: * The file descriptor fildes is opened with @@ -133,8 +125,7 @@ linux_mmap_common(struct thread *td, uin * protection options specified. */ - error = fget(td, bsd_args.fd, - cap_rights_init(&rights, CAP_MMAP), &fp); + error = fget(td, fd, cap_rights_init(&rights, CAP_MMAP), &fp); if (error != 0) return (error); if (fp->f_type != DTYPE_VNODE) { @@ -205,21 +196,13 @@ linux_mmap_common(struct thread *td, uin * we map the full stack, since we don't have a way * to autogrow it. */ - if (len > STACK_SIZE - GUARD_SIZE) { - bsd_args.addr = (caddr_t)addr; - bsd_args.len = len; - } else { - bsd_args.addr = (caddr_t)addr - - (STACK_SIZE - GUARD_SIZE - len); - bsd_args.len = STACK_SIZE - GUARD_SIZE; + if (len <= STACK_SIZE - GUARD_SIZE) { + addr = addr - (STACK_SIZE - GUARD_SIZE - len); + len = STACK_SIZE - GUARD_SIZE; } - } else { - bsd_args.addr = (caddr_t)addr; - bsd_args.len = len; } - bsd_args.pos = pos; - error = sys_mmap(td, &bsd_args); + error = kern_vm_mmap(td, addr, len, prot, bsd_flags, fd, pos); LINUX_CTR2(mmap2, "return: %d (%p)", error, td->td_retval[0]); @@ -229,16 +212,11 @@ linux_mmap_common(struct thread *td, uin int linux_mprotect_common(struct thread *td, uintptr_t addr, size_t len, int prot) { - struct mprotect_args bsd_args; - - bsd_args.addr = (void *)addr; - bsd_args.len = len; - bsd_args.prot = prot; #if defined(__amd64__) - linux_fixup_prot(td, &bsd_args.prot); + linux_fixup_prot(td, &prot); #endif - return (sys_mprotect(td, &bsd_args)); + return (kern_vm_mprotect(td, addr, len, prot)); } #if defined(__amd64__) Modified: head/sys/vm/vm_extern.h ============================================================================== --- head/sys/vm/vm_extern.h Mon Feb 6 20:44:34 2017 (r313351) +++ head/sys/vm/vm_extern.h Mon Feb 6 20:57:12 2017 (r313352) @@ -71,6 +71,16 @@ void kmem_init(vm_offset_t, vm_offset_t) void kmem_init_zero_region(void); void kmeminit(void); +int kern_vm_mmap(struct thread *td, vm_offset_t addr, vm_size_t size, + vm_prot_t prot, int flags, int fd, off_t pos); +int kern_vm_mprotect(struct thread *td, vm_offset_t addr, vm_size_t size, + vm_prot_t prot); +int kern_vm_msync(struct thread *td, vm_offset_t addr, vm_size_t size, + int flags); +int kern_vm_munlock(struct thread *td, vm_offset_t addr, vm_size_t size); +int kern_vm_munmap(struct thread *td, vm_offset_t addr, vm_size_t size); +int kern_vm_madvise(struct thread *td, vm_offset_t addr, vm_size_t len, + int behav); void swapout_procs(int); int kernacc(void *, int, int); int useracc(void *, int, int); Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Mon Feb 6 20:44:34 2017 (r313351) +++ head/sys/vm/vm_mmap.c Mon Feb 6 20:57:12 2017 (r313352) @@ -187,27 +187,26 @@ struct mmap_args { * MPSAFE */ int -sys_mmap(td, uap) - struct thread *td; - struct mmap_args *uap; +sys_mmap(struct thread *td, struct mmap_args *uap) +{ + + return (kern_vm_mmap(td, (vm_offset_t)uap->addr, uap->len, + uap->prot, uap->flags, uap->fd, uap->pos)); +} + +int +kern_vm_mmap(struct thread *td, vm_offset_t addr, vm_size_t size, + vm_prot_t prot, int flags, int fd, off_t pos) { struct file *fp; - vm_offset_t addr; - vm_size_t size, pageoff; + vm_size_t pageoff; vm_prot_t cap_maxprot; - int align, error, flags, prot; - off_t pos; + int align, error; struct vmspace *vms = td->td_proc->p_vmspace; cap_rights_t rights; - addr = (vm_offset_t) uap->addr; - size = uap->len; - prot = uap->prot; - flags = uap->flags; - pos = uap->pos; - fp = NULL; - AUDIT_ARG_FD(uap->fd); + AUDIT_ARG_FD(fd); /* * Ignore old flags that used to be defined but did not do anything. @@ -224,8 +223,8 @@ sys_mmap(td, uap) * pos. */ if (!SV_CURPROC_FLAG(SV_AOUT)) { - if ((uap->len == 0 && curproc->p_osrel >= P_OSREL_MAP_ANON) || - ((flags & MAP_ANON) != 0 && (uap->fd != -1 || pos != 0))) + if ((size == 0 && curproc->p_osrel >= P_OSREL_MAP_ANON) || + ((flags & MAP_ANON) != 0 && (fd != -1 || pos != 0))) return (EINVAL); } else { if ((flags & MAP_ANON) != 0) @@ -233,7 +232,7 @@ sys_mmap(td, uap) } if (flags & MAP_STACK) { - if ((uap->fd != -1) || + if ((fd != -1) || ((prot & (PROT_READ | PROT_WRITE)) != (PROT_READ | PROT_WRITE))) return (EINVAL); flags |= MAP_ANON; @@ -353,7 +352,7 @@ sys_mmap(td, uap) } if (prot & PROT_EXEC) cap_rights_set(&rights, CAP_MMAP_X); - error = fget_mmap(td, uap->fd, &rights, &cap_maxprot, &fp); + error = fget_mmap(td, fd, &rights, &cap_maxprot, &fp); if (error != 0) goto done; if ((flags & (MAP_SHARED | MAP_PRIVATE)) == 0 && @@ -380,15 +379,9 @@ done: int freebsd6_mmap(struct thread *td, struct freebsd6_mmap_args *uap) { - struct mmap_args oargs; - oargs.addr = uap->addr; - oargs.len = uap->len; - oargs.prot = uap->prot; - oargs.flags = uap->flags; - oargs.fd = uap->fd; - oargs.pos = uap->pos; - return (sys_mmap(td, &oargs)); + return (kern_vm_mmap(td, (vm_offset_t)uap->addr, uap->len, + uap->prot, uap->flags, uap->fd, uap->pos)); } #endif @@ -404,11 +397,8 @@ struct ommap_args { }; #endif int -ommap(td, uap) - struct thread *td; - struct ommap_args *uap; +ommap(struct thread *td, struct ommap_args *uap) { - struct mmap_args nargs; static const char cvtbsdprot[8] = { 0, PROT_EXEC, @@ -419,36 +409,34 @@ ommap(td, uap) PROT_WRITE | PROT_READ, PROT_EXEC | PROT_WRITE | PROT_READ, }; + int flags, prot; #define OMAP_ANON 0x0002 #define OMAP_COPY 0x0020 #define OMAP_SHARED 0x0010 #define OMAP_FIXED 0x0100 - nargs.addr = uap->addr; - nargs.len = uap->len; - nargs.prot = cvtbsdprot[uap->prot & 0x7]; + prot = cvtbsdprot[uap->prot & 0x7]; #ifdef COMPAT_FREEBSD32 #if defined(__amd64__) if (i386_read_exec && SV_PROC_FLAG(td->td_proc, SV_ILP32) && - nargs.prot != 0) - nargs.prot |= PROT_EXEC; + prot != 0) + prot |= PROT_EXEC; #endif #endif - nargs.flags = 0; + flags = 0; if (uap->flags & OMAP_ANON) - nargs.flags |= MAP_ANON; + flags |= MAP_ANON; if (uap->flags & OMAP_COPY) - nargs.flags |= MAP_COPY; + flags |= MAP_COPY; if (uap->flags & OMAP_SHARED) - nargs.flags |= MAP_SHARED; + flags |= MAP_SHARED; else - nargs.flags |= MAP_PRIVATE; + flags |= MAP_PRIVATE; if (uap->flags & OMAP_FIXED) - nargs.flags |= MAP_FIXED; - nargs.fd = uap->fd; - nargs.pos = uap->pos; - return (sys_mmap(td, &nargs)); + flags |= MAP_FIXED; + return (kern_vm_mmap(td, (vm_offset_t)uap->addr, uap->len, + prot, flags, uap->fd, uap->pos)); } #endif /* COMPAT_43 */ @@ -464,20 +452,20 @@ struct msync_args { * MPSAFE */ int -sys_msync(td, uap) - struct thread *td; - struct msync_args *uap; +sys_msync(struct thread *td, struct msync_args *uap) { - vm_offset_t addr; - vm_size_t size, pageoff; - int flags; + + return (kern_vm_msync(td, (vm_offset_t)uap->addr, uap->len, + uap->flags)); +} + +int +kern_vm_msync(struct thread *td, vm_offset_t addr, vm_size_t size, int flags) +{ + vm_size_t pageoff; vm_map_t map; int rv; - addr = (vm_offset_t) uap->addr; - size = uap->len; - flags = uap->flags; - pageoff = (addr & PAGE_MASK); addr -= pageoff; size += pageoff; @@ -519,21 +507,23 @@ struct munmap_args { * MPSAFE */ int -sys_munmap(td, uap) - struct thread *td; - struct munmap_args *uap; +sys_munmap(struct thread *td, struct munmap_args *uap) +{ + + return (kern_vm_munmap(td, (vm_offset_t)uap->addr, uap->len)); +} + +int +kern_vm_munmap(struct thread *td, vm_offset_t addr, vm_size_t size) { #ifdef HWPMC_HOOKS struct pmckern_map_out pkm; vm_map_entry_t entry; bool pmc_handled; #endif - vm_offset_t addr; - vm_size_t size, pageoff; + vm_size_t pageoff; vm_map_t map; - addr = (vm_offset_t) uap->addr; - size = uap->len; if (size == 0) return (EINVAL); @@ -602,18 +592,20 @@ struct mprotect_args { * MPSAFE */ int -sys_mprotect(td, uap) - struct thread *td; - struct mprotect_args *uap; +sys_mprotect(struct thread *td, struct mprotect_args *uap) { - vm_offset_t addr; - vm_size_t size, pageoff; - vm_prot_t prot; - addr = (vm_offset_t) uap->addr; - size = uap->len; - prot = uap->prot & VM_PROT_ALL; + return (kern_vm_mprotect(td, (vm_offset_t)uap->addr, uap->len, + uap->prot)); +} +int +kern_vm_mprotect(struct thread *td, vm_offset_t addr, vm_size_t size, + vm_prot_t prot) +{ + vm_size_t pageoff; + + prot = (prot & VM_PROT_ALL); pageoff = (addr & PAGE_MASK); addr -= pageoff; size += pageoff; @@ -689,6 +681,14 @@ sys_madvise(td, uap) struct thread *td; struct madvise_args *uap; { + + return (kern_vm_madvise(td, (vm_offset_t)uap->addr, uap->len, + uap->behav)); +} + +int +kern_vm_madvise(struct thread *td, vm_offset_t addr, vm_size_t len, int behav) +{ vm_offset_t start, end; vm_map_t map; int flags; @@ -697,7 +697,7 @@ sys_madvise(td, uap) * Check for our special case, advising the swap pager we are * "immortal." */ - if (uap->behav == MADV_PROTECT) { + if (behav == MADV_PROTECT) { flags = PPROT_SET; return (kern_procctl(td, P_PID, td->td_proc->p_pid, PROC_SPROTECT, &flags)); @@ -706,27 +706,26 @@ sys_madvise(td, uap) /* * Check for illegal behavior */ - if (uap->behav < 0 || uap->behav > MADV_CORE) + if (behav < 0 || behav > MADV_CORE) return (EINVAL); /* * Check for illegal addresses. Watch out for address wrap... Note * that VM_*_ADDRESS are not constants due to casts (argh). */ map = &td->td_proc->p_vmspace->vm_map; - if ((vm_offset_t)uap->addr < vm_map_min(map) || - (vm_offset_t)uap->addr + uap->len > vm_map_max(map)) + if (addr < vm_map_min(map) || addr + len > vm_map_max(map)) return (EINVAL); - if (((vm_offset_t) uap->addr + uap->len) < (vm_offset_t) uap->addr) + if ((addr + len) < addr) return (EINVAL); /* * Since this routine is only advisory, we default to conservative * behavior. */ - start = trunc_page((vm_offset_t) uap->addr); - end = round_page((vm_offset_t) uap->addr + uap->len); + start = trunc_page(addr); + end = round_page(addr + len); - if (vm_map_madvise(map, start, end, uap->behav)) + if (vm_map_madvise(map, start, end, behav)) return (EINVAL); return (0); } @@ -1189,12 +1188,16 @@ struct munlock_args { * MPSAFE */ int -sys_munlock(td, uap) - struct thread *td; - struct munlock_args *uap; +sys_munlock(struct thread *td, struct munlock_args *uap) { - vm_offset_t addr, end, last, start; - vm_size_t size; + + return (kern_vm_munlock(td, (vm_offset_t)uap->addr, uap->len)); +} + +int +kern_vm_munlock(struct thread *td, vm_offset_t addr, vm_size_t size) +{ + vm_offset_t end, last, start; #ifdef RACCT vm_map_t map; #endif @@ -1203,8 +1206,6 @@ sys_munlock(td, uap) error = priv_check(td, PRIV_VM_MUNLOCK); if (error) return (error); - addr = (vm_offset_t)uap->addr; - size = uap->len; last = addr + size; start = trunc_page(addr); end = round_page(last); From owner-svn-src-head@freebsd.org Mon Feb 6 21:02: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 DCB4DCD345A; Mon, 6 Feb 2017 21:02:27 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A9AF3F36; Mon, 6 Feb 2017 21:02:27 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16L2Qc1073559; Mon, 6 Feb 2017 21:02:26 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16L2QRb073558; Mon, 6 Feb 2017 21:02:26 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702062102.v16L2QRb073558@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 6 Feb 2017 21:02:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313354 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Mon, 06 Feb 2017 21:02:28 -0000 Author: adrian Date: Mon Feb 6 21:02:26 2017 New Revision: 313354 URL: https://svnweb.freebsd.org/changeset/base/313354 Log: [iwm] fix path. Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Feb 6 20:57:17 2017 (r313353) +++ head/sys/conf/files Mon Feb 6 21:02:26 2017 (r313354) @@ -1879,7 +1879,7 @@ dev/iwm/if_iwm.c optional iwm dev/iwm/if_iwm_binding.c optional iwm dev/iwm/if_iwm_led.c optional iwm dev/iwm/if_iwm_mac_ctxt.c optional iwm -dev/netif/iwm/if_iwm_notif_wait.c optional iwm +dev/iwm/if_iwm_notif_wait.c optional iwm dev/iwm/if_iwm_pcie_trans.c optional iwm dev/iwm/if_iwm_phy_ctxt.c optional iwm dev/iwm/if_iwm_phy_db.c optional iwm From owner-svn-src-head@freebsd.org Mon Feb 6 21: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 6B381CD34B8; Mon, 6 Feb 2017 21:02:42 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D09B2103A; Mon, 6 Feb 2017 21:02:41 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-wm0-x244.google.com with SMTP id r18so24370782wmd.3; Mon, 06 Feb 2017 13:02:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=brbp2QEO0G6A3/rNsf31l7/QWANKHP04GnqjKgFi67g=; b=QCmxqFfHgtTQLG3jUVf7SMkihI0IAzVjfHrsxGIAsbPpkwCrCpVzjMq/337oCc+vKq RIsZ4rOn5k+qU6EhH5UwBBxfPKqJ6+jMGB7Ljao2cqzAraitYIqbaXuEGMCYL6EoYLub zodAbs8AKdjZBI6+UEMhRknwE4/Bttr96Du2HQss0V9hGLEI6FFIUuDB+UvyVANp76n+ iOTyi5JFAgxkxkHq4OTyZZJlTVjNjdB6BW2ZIjA/5nMZb8quHtnMNl+pEaluF4qgWdfu b4KnA3f2g11UshEADcPujPCVKMxjvyjDNqSbwxM+/iC6qCEYwpuDX8uPljcnRgoAsQdD 2srg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=brbp2QEO0G6A3/rNsf31l7/QWANKHP04GnqjKgFi67g=; b=fvREQC9FkHMvsPQfssNEfJHOmBi8T9I+trKkj/6jWConOgUhjhhme040XZXLofCJ02 rOr5osRGZomIBSD5OFhFmykG19q9EeqRMXH2Jh1yAdRxCZLpErsEuXbrif/yJrGuhF/O kYPy6yzf8A1qC8UaM4Ijf6JNcWl0P9bPRxgzrIODQb1T0W9LAw58lJCiDTR6TX2MkdDh OHJERgzZ8srlDnKeNiYVDyWKD2rnDYHoyjRVnqyhrHS4r9Gfhbh7GlLoZ9tYPlhZg3Uq rjFD+JuTQEXnXApqt3zz8420gX9rUim5IzYSq/n26YFf1ILMriRTTA0CucduZ7RDn8i0 su6A== X-Gm-Message-State: AIkVDXLjIqobvtV0gkwvbx5REn0QgK1pOgZKsBcoH/v3pd1xp630V4Ujp/D9To1W75gKF5Ik8lVw3Q1ZcdWHKQ== X-Received: by 10.223.169.112 with SMTP id u103mr10699813wrc.166.1486414960316; Mon, 06 Feb 2017 13:02:40 -0800 (PST) MIME-Version: 1.0 Sender: adrian.chadd@gmail.com Received: by 10.194.82.162 with HTTP; Mon, 6 Feb 2017 13:02:39 -0800 (PST) In-Reply-To: References: <201702060527.v165R8bO083196@repo.freebsd.org> From: Adrian Chadd Date: Mon, 6 Feb 2017 13:02:39 -0800 X-Google-Sender-Auth: TRsWGxMz2UZ55Azcm50DGvK1MSg Message-ID: Subject: Re: svn commit: r313322 - in head/sys: conf dev/iwm modules/iwm To: Ed Schouten Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-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: Mon, 06 Feb 2017 21:02:42 -0000 Fixed, thanks. -adrian On 5 February 2017 at 23:56, Ed Schouten wrote: > Hi Adrian, > > 2017-02-06 6:27 GMT+01:00 Adrian Chadd : >> Modified: head/sys/conf/files >> ============================================================================== >> --- head/sys/conf/files Mon Feb 6 05:27:05 2017 (r313321) >> +++ head/sys/conf/files Mon Feb 6 05:27:07 2017 (r313322) >> @@ -1882,6 +1882,7 @@ dev/iwm/if_iwm.c optional iwm >> dev/iwm/if_iwm_binding.c optional iwm >> dev/iwm/if_iwm_led.c optional iwm >> dev/iwm/if_iwm_mac_ctxt.c optional iwm >> +dev/netif/iwm/if_iwm_notif_wait.c optional iwm >> dev/iwm/if_iwm_pcie_trans.c optional iwm >> dev/iwm/if_iwm_phy_ctxt.c optional iwm >> dev/iwm/if_iwm_phy_db.c optional iwm > > What's with the 'netif' part in the source file's name? The actual > source file doesn't use it. > > -- > Ed Schouten > Nuxi, 's-Hertogenbosch, the Netherlands > KvK-nr.: 62051717 From owner-svn-src-head@freebsd.org Mon Feb 6 23:03: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 D6011CD3CBB; Mon, 6 Feb 2017 23:03:28 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3CA51953; Mon, 6 Feb 2017 23:03:28 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id E914110A791; Mon, 6 Feb 2017 18:03:26 -0500 (EST) From: John Baldwin To: Edward Tomasz Napierala Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313352 - in head/sys: compat/cloudabi compat/freebsd32 compat/linux vm Date: Mon, 06 Feb 2017 15:03:11 -0800 Message-ID: <2958370.34Dmljdf7f@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201702062057.v16KvCtI069664@repo.freebsd.org> References: <201702062057.v16KvCtI069664@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 06 Feb 2017 18:03:27 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-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: Mon, 06 Feb 2017 23:03:28 -0000 On Monday, February 06, 2017 08:57:12 PM Edward Tomasz Napierala wrote: > Author: trasz > Date: Mon Feb 6 20:57:12 2017 > New Revision: 313352 > URL: https://svnweb.freebsd.org/changeset/base/313352 > > Log: > Add kern_vm_mmap2(), kern_vm_mprotect(), kern_vm_msync(), kern_vm_munlock(), > kern_vm_munmap(), and kern_vm_madvise(), and use them in various compats > instead of their sys_*() counterparts. > > Reviewed by: ed, dchagin, kib > MFC after: 2 weeks > Sponsored by: DARPA, AFRL > Differential Revision: https://reviews.freebsd.org/D9378 I know kib@ suggested kern_vm_ instead of the vm_ you had suggested, but just kern_ would be more consistent. That is what we have done with every other system call. (e.g. there isn't kern_socket_bind, kern_socket_listen, etc., but just kern_bind() and kern_listen()). -- John Baldwin From owner-svn-src-head@freebsd.org Tue Feb 7 00:09: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 4BA32CD2080; Tue, 7 Feb 2017 00:09:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B0831835; Tue, 7 Feb 2017 00:09:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1709npN055114; Tue, 7 Feb 2017 00:09:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1709nOj055112; Tue, 7 Feb 2017 00:09:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702070009.v1709nOj055112@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 7 Feb 2017 00:09:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313356 - in head: sys/netpfil/ipfw usr.sbin/syslogd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Tue, 07 Feb 2017 00:09:50 -0000 Author: ngie Date: Tue Feb 7 00:09:48 2017 New Revision: 313356 URL: https://svnweb.freebsd.org/changeset/base/313356 Log: Fix typos in comments (returing -> returning) MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/sys/netpfil/ipfw/dn_heap.h head/usr.sbin/syslogd/syslogd.c Modified: head/sys/netpfil/ipfw/dn_heap.h ============================================================================== --- head/sys/netpfil/ipfw/dn_heap.h Mon Feb 6 22:03:07 2017 (r313355) +++ head/sys/netpfil/ipfw/dn_heap.h Tue Feb 7 00:09:48 2017 (r313356) @@ -85,7 +85,7 @@ enum { * HEAP_TOP() returns a pointer to the top element of the heap, * but makes no checks on its existence (XXX should we change ?) * - * heap_extract() removes the entry at the top, returing the pointer. + * heap_extract() removes the entry at the top, returning the pointer. * (the key should have been read before). * * heap_scan() invokes a callback on each entry of the heap. Modified: head/usr.sbin/syslogd/syslogd.c ============================================================================== --- head/usr.sbin/syslogd/syslogd.c Mon Feb 6 22:03:07 2017 (r313355) +++ head/usr.sbin/syslogd/syslogd.c Tue Feb 7 00:09:48 2017 (r313356) @@ -2348,7 +2348,7 @@ markit(void) /* * fork off and become a daemon, but wait for the child to come online - * before returing to the parent, or we get disk thrashing at boot etc. + * before returning to the parent, or we get disk thrashing at boot etc. * Set a timer so we don't hang forever if it wedges. */ static int From owner-svn-src-head@freebsd.org Tue Feb 7 00:42: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 9B430CD2A44; Tue, 7 Feb 2017 00:42:56 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B0B8B16; Tue, 7 Feb 2017 00:42:56 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v170gtFx070724; Tue, 7 Feb 2017 00:42:55 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v170gtF6070723; Tue, 7 Feb 2017 00:42:55 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702070042.v170gtF6070723@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 7 Feb 2017 00:42:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313357 - head/usr.sbin/syslogd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Tue, 07 Feb 2017 00:42:56 -0000 Author: ngie Date: Tue Feb 7 00:42:55 2017 New Revision: 313357 URL: https://svnweb.freebsd.org/changeset/base/313357 Log: Use a flexible array for TypeNames instead of hardcoding the array length MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/usr.sbin/syslogd/syslogd.c Modified: head/usr.sbin/syslogd/syslogd.c ============================================================================== --- head/usr.sbin/syslogd/syslogd.c Tue Feb 7 00:09:48 2017 (r313356) +++ head/usr.sbin/syslogd/syslogd.c Tue Feb 7 00:42:55 2017 (r313357) @@ -287,7 +287,7 @@ static int repeatinterval[] = { 30, 120, #define F_WALL 6 /* everyone logged on */ #define F_PIPE 7 /* pipe to program */ -static const char *TypeNames[8] = { +static const char *TypeNames[] = { "UNUSED", "FILE", "TTY", "CONSOLE", "FORW", "USERS", "WALL", "PIPE" }; From owner-svn-src-head@freebsd.org Tue Feb 7 00:47: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 5BCE8CD2E66; Tue, 7 Feb 2017 00:47:34 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2721DE87; Tue, 7 Feb 2017 00:47:34 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v170lXWA070965; Tue, 7 Feb 2017 00:47:33 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v170lXoX070964; Tue, 7 Feb 2017 00:47:33 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702070047.v170lXoX070964@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 7 Feb 2017 00:47:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313358 - head/usr.sbin/syslogd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Tue, 07 Feb 2017 00:47:34 -0000 Author: ngie Date: Tue Feb 7 00:47:33 2017 New Revision: 313358 URL: https://svnweb.freebsd.org/changeset/base/313358 Log: Sort sys/ #includes and zap an unnecessary trailing space nearby MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/usr.sbin/syslogd/syslogd.c Modified: head/usr.sbin/syslogd/syslogd.c ============================================================================== --- head/usr.sbin/syslogd/syslogd.c Tue Feb 7 00:42:55 2017 (r313357) +++ head/usr.sbin/syslogd/syslogd.c Tue Feb 7 00:47:33 2017 (r313358) @@ -79,17 +79,17 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include -#include #include -#include -#include -#include #include +#include +#include #include +#include +#include +#include +#include -#if defined(INET) || defined(INET6) +#if defined(INET) || defined(INET6) #include #include #endif From owner-svn-src-head@freebsd.org Tue Feb 7 00:54: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 907FDCD214C; Tue, 7 Feb 2017 00:54:22 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from butcher-nb.yandex.net (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) by mx1.freebsd.org (Postfix) with ESMTP id 63FD412E0; Tue, 7 Feb 2017 00:54:21 +0000 (UTC) (envelope-from ae@FreeBSD.org) Subject: Re: svn commit: r313330 - in head: contrib/netcat lib/libipsec sbin/ifconfig sbin/setkey share/man/man4 sys/conf sys/modules sys/modules/ipsec sys/modules/tcp/tcpmd5 sys/net sys/netinet sys/netinet/tcp... To: Dmitry Morozovsky References: <201702060849.v168nwmf064277@repo.freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: "Andrey V. Elsukov" Message-ID: <1e8b55ba-11d2-9563-be44-0e20f7f2f33d@FreeBSD.org> Date: Tue, 7 Feb 2017 03:53:05 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-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: Tue, 07 Feb 2017 00:54:22 -0000 On 06.02.2017 17:31, Dmitry Morozovsky wrote: >> Date: Mon Feb 6 08:49:57 2017 >> New Revision: 313330 >> URL: https://svnweb.freebsd.org/changeset/base/313330 >> >> Log: >> Merge projects/ipsec into head/. > > [snip] > > Great, thanks! > > Have you any plans to merge this into stable/11 to reduce diffs in network > stack code? It depends from the further users feedback. I wanted to do MFC after one or two months. But there are two things that are questionable. The date of stable/11 feature freeze is not known. And there is also some changes that can be considered as POLA violations. E.g. now SPIs are unique, and if user had manually configured SAs with the same SPI, the MFC will break this. -- WBR, Andrey V. Elsukov From owner-svn-src-head@freebsd.org Tue Feb 7 01:21: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 74586CD2B24; Tue, 7 Feb 2017 01:21:19 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43B3FB0; Tue, 7 Feb 2017 01:21:19 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v171LID2083005; Tue, 7 Feb 2017 01:21:18 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v171LInM083004; Tue, 7 Feb 2017 01:21:18 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201702070121.v171LInM083004@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Tue, 7 Feb 2017 01:21:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313359 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Tue, 07 Feb 2017 01:21:19 -0000 Author: gnn Date: Tue Feb 7 01:21:18 2017 New Revision: 313359 URL: https://svnweb.freebsd.org/changeset/base/313359 Log: Fix the ifdef protection and remove superfluous extern statements Reported by: Konstantin Belousov MFC after: 2 weeks Sponsored by: DARPA, AFRL Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace_xoroshiro128_plus.h Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace_xoroshiro128_plus.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace_xoroshiro128_plus.h Tue Feb 7 00:47:33 2017 (r313358) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace_xoroshiro128_plus.h Tue Feb 7 01:21:18 2017 (r313359) @@ -32,9 +32,10 @@ #ifndef _DTRACE_XOROSHIRO128_PLUS_H #define _DTRACE_XOROSHIRO128_PLUS_H -#endif #include -extern void dtrace_xoroshiro128_plus_jump(uint64_t * const, uint64_t * const); -extern uint64_t dtrace_xoroshiro128_plus_next(uint64_t * const); +void dtrace_xoroshiro128_plus_jump(uint64_t * const, uint64_t * const); +uint64_t dtrace_xoroshiro128_plus_next(uint64_t * const); + +#endif From owner-svn-src-head@freebsd.org Tue Feb 7 01:28: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 E411CCD30C8; Tue, 7 Feb 2017 01:28:56 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA6B98A4; Tue, 7 Feb 2017 01:28:56 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v171StBU086911; Tue, 7 Feb 2017 01:28:55 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v171StXn086910; Tue, 7 Feb 2017 01:28:55 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702070128.v171StXn086910@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 7 Feb 2017 01:28:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313360 - head/usr.sbin/syslogd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Tue, 07 Feb 2017 01:28:57 -0000 Author: ngie Date: Tue Feb 7 01:28:55 2017 New Revision: 313360 URL: https://svnweb.freebsd.org/changeset/base/313360 Log: Sort sys/ #includes some more MFC after: 1 week X-MFC with: r313358 Sponsored by: Dell EMC Isilon Modified: head/usr.sbin/syslogd/syslogd.c Modified: head/usr.sbin/syslogd/syslogd.c ============================================================================== --- head/usr.sbin/syslogd/syslogd.c Tue Feb 7 01:21:18 2017 (r313359) +++ head/usr.sbin/syslogd/syslogd.c Tue Feb 7 01:28:55 2017 (r313360) @@ -84,10 +84,10 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include #include +#include #include +#include #if defined(INET) || defined(INET6) #include From owner-svn-src-head@freebsd.org Tue Feb 7 02:21: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 6EE59CD44FB; Tue, 7 Feb 2017 02:21:35 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E9831792; Tue, 7 Feb 2017 02:21:35 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v172LYa0010384; Tue, 7 Feb 2017 02:21:34 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v172LYV1010383; Tue, 7 Feb 2017 02:21:34 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702070221.v172LYV1010383@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 7 Feb 2017 02:21:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313373 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Tue, 07 Feb 2017 02:21:35 -0000 Author: adrian Date: Tue Feb 7 02:21:34 2017 New Revision: 313373 URL: https://svnweb.freebsd.org/changeset/base/313373 Log: [ath] prepare for station side quiet time support. * Track the current quiet time configuration in the ath_vap struct. * Add an accessor method for calling the quiet time HAL method. Modified: head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Tue Feb 7 02:00:14 2017 (r313372) +++ head/sys/dev/ath/if_athvar.h Tue Feb 7 02:21:34 2017 (r313373) @@ -490,6 +490,7 @@ struct ath_vap { int (*av_set_tim)(struct ieee80211_node *, int); void (*av_recv_pspoll)(struct ieee80211_node *, struct mbuf *); + struct ieee80211_quiet_ie quiet_ie; }; #define ATH_VAP(vap) ((struct ath_vap *)(vap)) @@ -1484,6 +1485,8 @@ void ath_intr(void *); ((*(_ah)->ah_get11nExtBusy)((_ah))) #define ath_hal_setchainmasks(_ah, _txchainmask, _rxchainmask) \ ((*(_ah)->ah_setChainMasks)((_ah), (_txchainmask), (_rxchainmask))) +#define ath_hal_set_quiet(_ah, _p, _d, _o, _f) \ + ((*(_ah)->ah_setQuiet)((_ah), (_p), (_d), (_o), (_f))) #define ath_hal_spectral_supported(_ah) \ (ath_hal_getcapability(_ah, HAL_CAP_SPECTRAL_SCAN, 0, NULL) == HAL_OK) From owner-svn-src-head@freebsd.org Tue Feb 7 02:32: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 8F096CD4A6D; Tue, 7 Feb 2017 02:32:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C0A71E9C; Tue, 7 Feb 2017 02:32:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v172Wn6w015793; Tue, 7 Feb 2017 02:32:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v172WnRg015792; Tue, 7 Feb 2017 02:32:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702070232.v172WnRg015792@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 7 Feb 2017 02:32:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313374 - head/lib/libc/stdlib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Tue, 07 Feb 2017 02:32:50 -0000 Author: ngie Date: Tue Feb 7 02:32:49 2017 New Revision: 313374 URL: https://svnweb.freebsd.org/changeset/base/313374 Log: hcreate(3): fix the ERRORS section and bump .Dd - Add missing comma between functions that trigger ENOMEM error. - Fix the description for ESRCH. The action that triggers this error is FIND, not SEARCH (SEARCH does not exist). MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/lib/libc/stdlib/hcreate.3 Modified: head/lib/libc/stdlib/hcreate.3 ============================================================================== --- head/lib/libc/stdlib/hcreate.3 Tue Feb 7 02:21:34 2017 (r313373) +++ head/lib/libc/stdlib/hcreate.3 Tue Feb 7 02:32:49 2017 (r313374) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 26, 2015 +.Dd February 6, 2017 .Dt HCREATE 3 .Os .Sh NAME @@ -265,9 +265,9 @@ main(void) .Ed .Sh ERRORS The -.Fn hcreate +.Fn hcreate , .Fn hcreate_r , -.Fn hsearch +.Fn hsearch , and .Fn hsearch_r functions will fail if: @@ -281,7 +281,7 @@ The and .Fn hsearch_r functions will also fail if the action is -.Dv SEARCH +.Dv FIND and the element is not found: .Bl -tag -width Er .It Bq Er ESRCH From owner-svn-src-head@freebsd.org Tue Feb 7 03:46: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 B92A6CD36DA; Tue, 7 Feb 2017 03:46:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C6A0D49; Tue, 7 Feb 2017 03:46:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v173km9l044780; Tue, 7 Feb 2017 03:46:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v173km5F044779; Tue, 7 Feb 2017 03:46:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702070346.v173km5F044779@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 7 Feb 2017 03:46:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313376 - head/lib/libc/tests/stdio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Tue, 07 Feb 2017 03:46:49 -0000 Author: ngie Date: Tue Feb 7 03:46:48 2017 New Revision: 313376 URL: https://svnweb.freebsd.org/changeset/base/313376 Log: Fix :hexadecimal_floating_point on i386 Don't exclude i386 from LDBL_MANT_DIG == 64; it works properly in that case. While here, replace strcmp + atf_tc_fail with ATF_CHECK_MSG for 2 reasons: - Gather as many results as possible instead of failing early and not testing the rest of the cases. - Simplify logic when checking test inputs vs outputs and printing test result. Tested on: amd64, i386 MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/stdio/printfloat_test.c Modified: head/lib/libc/tests/stdio/printfloat_test.c ============================================================================== --- head/lib/libc/tests/stdio/printfloat_test.c Tue Feb 7 02:57:11 2017 (r313375) +++ head/lib/libc/tests/stdio/printfloat_test.c Tue Feb 7 03:46:48 2017 (r313376) @@ -70,22 +70,19 @@ _testfmt(const char *result, const char va_copy(ap2, ap); smash_stack(); vsnprintf(s, sizeof(s), fmt, ap); - if (strcmp(result, s) != 0) { - atf_tc_fail( - "printf(\"%s\", %s) ==> [%s], expected [%s]", - fmt, argstr, s, result); - } + ATF_CHECK_MSG(strcmp(result, s) == 0, + "printf(\"%s\", %s) ==> [%s], expected [%s]", + fmt, argstr, s, result); smash_stack(); mbstowcs(ws, s, BUF - 1); mbstowcs(wfmt, fmt, BUF - 1); mbstowcs(wresult, result, BUF - 1); vswprintf(ws, sizeof(ws) / sizeof(ws[0]), wfmt, ap2); - if (wcscmp(wresult, ws) != 0) { - atf_tc_fail( - "wprintf(\"%ls\", %s) ==> [%ls], expected [%ls]", - wfmt, argstr, ws, wresult); - } + ATF_CHECK_MSG(wcscmp(wresult, ws) == 0, + "wprintf(\"%ls\", %s) ==> [%ls], expected [%ls]", + wfmt, argstr, ws, wresult); + va_end(ap); va_end(ap2); } @@ -318,7 +315,7 @@ ATF_TC_BODY(hexadecimal_floating_point, testfmt("0x1p-1074", "%a", 0x1p-1074); testfmt("0x1.2345p-1024", "%a", 0x1.2345p-1024); -#if (LDBL_MANT_DIG == 64) && !defined(__i386__) +#if (LDBL_MANT_DIG == 64) testfmt("0x1.921fb54442d18468p+1", "%La", 0x3.243f6a8885a308dp0L); testfmt("0x1p-16445", "%La", 0x1p-16445L); testfmt("0x1.30ecap-16381", "%La", 0x9.8765p-16384L); From owner-svn-src-head@freebsd.org Tue Feb 7 04:15: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 68183CD450E; Tue, 7 Feb 2017 04:15:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 37BDF1C0F; Tue, 7 Feb 2017 04:15:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v174FfU1056761; Tue, 7 Feb 2017 04:15:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v174FfLu056760; Tue, 7 Feb 2017 04:15:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702070415.v174FfLu056760@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 7 Feb 2017 04:15:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313377 - head/contrib/netbsd-tests/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Tue, 07 Feb 2017 04:15:42 -0000 Author: ngie Date: Tue Feb 7 04:15:41 2017 New Revision: 313377 URL: https://svnweb.freebsd.org/changeset/base/313377 Log: Expect :floatunditf to fail on FreeBSD/i386 The precision error on FreeBSD/i386 doesn't match the expected output in long double form. MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/contrib/netbsd-tests/lib/libc/gen/t_floatunditf.c Modified: head/contrib/netbsd-tests/lib/libc/gen/t_floatunditf.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/t_floatunditf.c Tue Feb 7 03:46:48 2017 (r313376) +++ head/contrib/netbsd-tests/lib/libc/gen/t_floatunditf.c Tue Feb 7 04:15:41 2017 (r313377) @@ -119,6 +119,11 @@ ATF_TC_BODY(floatunditf, tc) #else size_t i; +#if defined(__FreeBSD__) && defined(__i386__) + atf_tc_expect_fail("the floating point error on FreeBSD/i386 doesn't " + "match the expected floating point error on NetBSD"); +#endif + for (i = 0; i < __arraycount(testcases); ++i) ATF_CHECK_MSG( testcases[i].ld == (long double)testcases[i].u64, From owner-svn-src-head@freebsd.org Tue Feb 7 04:25: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 70AA5CD48FB; Tue, 7 Feb 2017 04:25:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DBC41B1; Tue, 7 Feb 2017 04:25:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v174PLAN060825; Tue, 7 Feb 2017 04:25:21 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v174PLIf060824; Tue, 7 Feb 2017 04:25:21 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702070425.v174PLIf060824@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 7 Feb 2017 04:25:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313378 - head/lib/libc/tests/stdio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Tue, 07 Feb 2017 04:25:22 -0000 Author: ngie Date: Tue Feb 7 04:25:21 2017 New Revision: 313378 URL: https://svnweb.freebsd.org/changeset/base/313378 Log: Wrap strcmp/wcscmp calls with ATF_CHECK_MSG and drop atf_tc_fail use The reasoning here was the same as what was done in r313376: - Gather as many results as possible instead of failing early and not testing the rest of the cases. - Simplify logic when checking test inputs vs outputs and printing test result. MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/stdio/printbasic_test.c Modified: head/lib/libc/tests/stdio/printbasic_test.c ============================================================================== --- head/lib/libc/tests/stdio/printbasic_test.c Tue Feb 7 04:15:41 2017 (r313377) +++ head/lib/libc/tests/stdio/printbasic_test.c Tue Feb 7 04:25:21 2017 (r313378) @@ -78,22 +78,19 @@ _testfmt(const char *result, const char va_copy(ap2, ap); smash_stack(); vsnprintf(s, sizeof(s), fmt, ap); - if (strcmp(result, s) != 0) { - atf_tc_fail( - "printf(\"%s\", %s) ==> [%s], expected [%s]", - fmt, argstr, s, result); - } + ATF_CHECK_MSG(strcmp(result, s) == 0, + "printf(\"%s\", %s) ==> [%s], expected [%s]", + fmt, argstr, s, result); smash_stack(); mbstowcs(ws, s, BUF - 1); mbstowcs(wfmt, fmt, BUF - 1); mbstowcs(wresult, result, BUF - 1); vswprintf(ws, sizeof(ws) / sizeof(ws[0]), wfmt, ap2); - if (wcscmp(wresult, ws) != 0) { - atf_tc_fail( - "wprintf(\"%ls\", %s) ==> [%ls], expected [%ls]", - wfmt, argstr, ws, wresult); - } + ATF_CHECK_MSG(wcscmp(wresult, ws) == 0, + "wprintf(\"%ls\", %s) ==> [%ls], expected [%ls]", + wfmt, argstr, ws, wresult); + va_end(ap); va_end(ap2); } From owner-svn-src-head@freebsd.org Tue Feb 7 05:39: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 1A387CD2037; Tue, 7 Feb 2017 05:39:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB36D671; Tue, 7 Feb 2017 05:39:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v175d0q4088936; Tue, 7 Feb 2017 05:39:00 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v175d0eL088935; Tue, 7 Feb 2017 05:39:00 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702070539.v175d0eL088935@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 7 Feb 2017 05:39:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313379 - head/lib/libc/tests/stdio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Tue, 07 Feb 2017 05:39:02 -0000 Author: ngie Date: Tue Feb 7 05:39:00 2017 New Revision: 313379 URL: https://svnweb.freebsd.org/changeset/base/313379 Log: Expect :int_within_limits to fail when ptrdiff_t/*intmax_t differ in base type The %t{d,u} (ptrdiff_t) tests fail for the following reasons: - ptrdiff_t is by definition int32_t on !LP64 architectures and int64_t on LP64 architectures. - intmax_t is by definition fixed to int64_t on all architectures. - Some of the code in lib/libc/stdio/... is promoting ptrdiff_t to *intmax_t when parsing/representing the value. PR: 191674 MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/stdio/printbasic_test.c Modified: head/lib/libc/tests/stdio/printbasic_test.c ============================================================================== --- head/lib/libc/tests/stdio/printbasic_test.c Tue Feb 7 04:25:21 2017 (r313378) +++ head/lib/libc/tests/stdio/printbasic_test.c Tue Feb 7 05:39:00 2017 (r313379) @@ -111,6 +111,11 @@ ATF_TC_BODY(int_within_limits, tc) testfmt("-1", "%jd", (intmax_t)-1); testfmt(S_UINT64MAX, "%ju", UINT64_MAX); + if (sizeof(ptrdiff_t) != sizeof(uintmax_t)) + atf_tc_expect_fail("the %%t qualifier is broken on 32-bit " + "platforms where there's a mismatch between ptrdiff_t and " + "uintmax_t's type width; bug # 191674"); + testfmt("-1", "%td", (ptrdiff_t)-1); testfmt(S_SIZEMAX, "%tu", (size_t)-1); From owner-svn-src-head@freebsd.org Tue Feb 7 05:42: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 E3B53CD22CB; Tue, 7 Feb 2017 05:42:28 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x241.google.com (mail-pg0-x241.google.com [IPv6:2607:f8b0:400e:c05::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AC464B36; Tue, 7 Feb 2017 05:42:28 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x241.google.com with SMTP id 75so11099816pgf.3; Mon, 06 Feb 2017 21:42:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=1e5dJOn5OR6/nA8P4y2Vwm1qAuGAdwI97zCBo8GKPEk=; b=WMtBJ6b5MOUINFm2faa0xZmR7flhNQrjoVTLyZfrJYpSbjGns+RSom+MA0CUW/eVYa ARv6pnZBdq89XF6oKxPoUC3DahhpD0nbK5b9IwImsgvqSFWLmmshHqb9+glEj0KK2HLW XAQEijSrXki2av6te7sG6JrpDhUInHcKa6wajrNqy6Erehu3O9NSyFUXrQV7Dhcty9kl 5XfzJs8pw4eyxEX5VdzrEynjIOMI9GI6tISp/wZHLIEBoZ480j3EuZnAEexKLBrLDO0D Oj2m44BXZkSp6/ixD87eN7U8guNwqPUvNkhI/gMtZyiGgBQqj1jSvwy9gQyxyGjLolCA Cz2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=1e5dJOn5OR6/nA8P4y2Vwm1qAuGAdwI97zCBo8GKPEk=; b=uSXXFqBvVG3RwUapsOlzvX2lNSEzhAr0PhoMvwlvrCuejToX8qvBp5ZRiaI12e+I26 5eHe+hururtZsOkLkZIQon/hwDKihZpXYhyTBJ0Vf+UTh+MfpIRPzWo5EhncykkaN9WO CYZoPKpEX+ldY+AgBurgr3E6pzdnn6yaZ67I4/ZVJoh8JMCRra28UXciOK2HAAH8QdXo IyZUXhadOdITAq67ghWhFGQ08XOYu5ATuVPf1QqaRQIwlQALuZVHalMv1pckH9kMEx11 3WT12J5in03If0t7bxLZvlVrJ46dWyDIE5QfSX01uSyWIasSn7awGgKIuwDEqylDY0GA VyaQ== X-Gm-Message-State: AIkVDXI5CFXn7NlVisJRqgnxjsHKim9QktuErU4rMdK5l6/3HXhi4F8xlOFNOblbv59zJQ== X-Received: by 10.98.205.3 with SMTP id o3mr17394312pfg.148.1486446148115; Mon, 06 Feb 2017 21:42:28 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id j185sm6991809pgd.35.2017.02.06.21.42.27 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 06 Feb 2017 21:42:27 -0800 (PST) Subject: Re: svn commit: r313379 - head/lib/libc/tests/stdio Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_0B3F955B-5023-4955-98AF-3EE15B1A4636"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201702070539.v175d0eL088935@repo.freebsd.org> Date: Mon, 6 Feb 2017 21:42:24 -0800 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <729410CF-7046-4F57-8EEC-8E5DC3CBE1C5@gmail.com> References: <201702070539.v175d0eL088935@repo.freebsd.org> To: Ngie Cooper X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-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: Tue, 07 Feb 2017 05:42:29 -0000 --Apple-Mail=_0B3F955B-5023-4955-98AF-3EE15B1A4636 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Feb 6, 2017, at 21:39, Ngie Cooper wrote: >=20 > Author: ngie > Date: Tue Feb 7 05:39:00 2017 > New Revision: 313379 > URL: https://svnweb.freebsd.org/changeset/base/313379 >=20 > Log: > Expect :int_within_limits to fail when ptrdiff_t/*intmax_t differ in = base type >=20 > The %t{d,u} (ptrdiff_t) tests fail for the following reasons: > - ptrdiff_t is by definition int32_t on !LP64 architectures and = int64_t on > LP64 architectures. > - intmax_t is by definition fixed to int64_t on all architectures. > - Some of the code in lib/libc/stdio/... is promoting ptrdiff_t to = *intmax_t > when parsing/representing the value. For the sake of brevity, this fixes the test on arm/i386/mips. Cheers, -Ngie --Apple-Mail=_0B3F955B-5023-4955-98AF-3EE15B1A4636 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYmV5CAAoJEPWDqSZpMIYVLoIP/jn66wHKTqi/SO20OJlmUwwK vxjV93lvfGTXxpOBcUnRX+sWD4gTv5rjrNjgsf5l6FcB8+YsqV/2WcTjq1y0h94O /Y8KLzJn/BaCZOgbcjTZ6DqHt9bS50mv2kCLi48n0qjekj9nhXdewfaOux99LCP8 6w7KhY78ZLT1sML0Z4rk5T5Uam0Yei3v/lmse4TRzCFb5vhKIwZ50TVhBlgYi/59 22Uqm1lM1PCW+wGQrw4HWHHzp2xKRy9PZpPP4qWH8S8F7aSqLZLpPLYY9+hww6fP 4ilf9Pgh/ueHM3eof/vJ0FrJScCKfdRtUpx41QdALjlCAXIx/r/1Da2RzJHiDcqw CU4/m3saqKEktvnTHKTzY/AbbkjWNvvrQcIZIWRICqyfF21ZfTp7r7EdOxFaWWR7 h+GfDRZvUhziLQJYZIi1T5z/rii5HseuYWVQKiPaQjIfzY6Rba5Pa3fJctepii9L 0RWWMAGwHHhm+XBnVP6v6cdHtPIZVQ0bb5mi9899RvSQeyrSZz3x61tCNo+jrDu5 9QIHZx5cAEfFgbtAZijfpd2lSN9Muh9T8ygY6wpPtAE0MLxHAVPqjJhDHVpQWVh9 W3mAkVegJs15hUIKVMLPbYbiMYm8oQBXGOqsl7JnLyjF8XmxfTRMjSGX21773ait bK7WMz4s51bdKYy7Fsah =UWwj -----END PGP SIGNATURE----- --Apple-Mail=_0B3F955B-5023-4955-98AF-3EE15B1A4636-- From owner-svn-src-head@freebsd.org Tue Feb 7 08:39: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 ACD36CC6A09; Tue, 7 Feb 2017 08:39:14 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A95F3B9; Tue, 7 Feb 2017 08:39:13 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v178d9Y3056286 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 7 Feb 2017 10:39:09 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v178d9Y3056286 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v178d9ZV056285; Tue, 7 Feb 2017 10:39:09 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 7 Feb 2017 10:39:09 +0200 From: Konstantin Belousov To: John Baldwin Cc: Edward Tomasz Napierala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313352 - in head/sys: compat/cloudabi compat/freebsd32 compat/linux vm Message-ID: <20170207083909.GX2092@kib.kiev.ua> References: <201702062057.v16KvCtI069664@repo.freebsd.org> <2958370.34Dmljdf7f@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2958370.34Dmljdf7f@ralph.baldwin.cx> User-Agent: Mutt/1.7.2 (2016-11-26) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-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: Tue, 07 Feb 2017 08:39:14 -0000 On Mon, Feb 06, 2017 at 03:03:11PM -0800, John Baldwin wrote: > On Monday, February 06, 2017 08:57:12 PM Edward Tomasz Napierala wrote: > > Author: trasz > > Date: Mon Feb 6 20:57:12 2017 > > New Revision: 313352 > > URL: https://svnweb.freebsd.org/changeset/base/313352 > > > > Log: > > Add kern_vm_mmap2(), kern_vm_mprotect(), kern_vm_msync(), kern_vm_munlock(), > > kern_vm_munmap(), and kern_vm_madvise(), and use them in various compats > > instead of their sys_*() counterparts. > > > > Reviewed by: ed, dchagin, kib > > MFC after: 2 weeks > > Sponsored by: DARPA, AFRL > > Differential Revision: https://reviews.freebsd.org/D9378 > > I know kib@ suggested kern_vm_ instead of the vm_ you had suggested, > but just kern_ would be more consistent. That is what we have done with > every other system call. (e.g. there isn't kern_socket_bind, kern_socket_listen, > etc., but just kern_bind() and kern_listen()). Note that the kern_vm_* functions are not quite regular syscall helpers. The big issue with them, which caused my suggestion, is that the functions cannot be declared in sys/syscallsubr.h, because their declarations depend on the vm/*.h namespace. From owner-svn-src-head@freebsd.org Tue Feb 7 10:35: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 7E875CD4E4F; Tue, 7 Feb 2017 10:35:49 +0000 (UTC) (envelope-from onwahe@gmail.com) Received: from mail-it0-x243.google.com (mail-it0-x243.google.com [IPv6:2607:f8b0:4001:c0b::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4A73F1C80; Tue, 7 Feb 2017 10:35:49 +0000 (UTC) (envelope-from onwahe@gmail.com) Received: by mail-it0-x243.google.com with SMTP id f200so11956319itf.3; Tue, 07 Feb 2017 02:35:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=JRYvN2xMbvtDWPp7sxYp156YqPkm4tkvaYYoYAFmNa8=; b=XQI5x8kWnmnIgej6Fe6Ed4ajKfbiAaQvnwj+9nwerSDSZL2eyci2sUkc21lYrKB6LH t87PaSD8OkQgVcyWfW6Hreto/09m95Ut1+q3rv5KD1vhdqKWXUwi8bpNg0qCDeqdfu5L QxBjFTUOQOIa98ouVtitpBbjpHAvkdCKBpukIROm4shSRYXDu7qcfxdv/VIedmf/OGEx WWX+f1M9U1oy4CSLyZDI/Q0isnRzWMdeTUw4JhkEIDViCKbwmtD0EdSAwaLwINQ217QA 2zsU3zLFDmYBioqGDaK6lCxKbMyRJagsGKOwmPvJtFVRAf5Fz2URXIkQcNvAcu6s/rMe jYSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=JRYvN2xMbvtDWPp7sxYp156YqPkm4tkvaYYoYAFmNa8=; b=FQNv4Uf9MDvkvGUfuIyPpfN+23njhp+aC/jXV0x3MGH9hs5ZrnrgCmCxU1pYKDvhdl FYfBAInoIHWoLXLFt82jzQ2A79O1H2G3D9UlXW0NDEGUwjUUEYwWwWU6Q8qZvK870FPy BwQAb8t4ODgd8MWspa1lhP7myG93KN96Bw0S+d9ZZduikI7Bx+CFB/T4FmagasTmb3qe /LM8xT98H9Om1L9zSrMC9oLcJ++RK3TvdJljPPdX10MzdqsAz8n21DYUjJUCkwwLu8yY s5xxAkm71LK0feZ5tIbzlA7w0DM0qD9YiwV3sAcrErZZf/+31nKK2dY71aTx3fb8a6T1 Ylgw== X-Gm-Message-State: AIkVDXJdyPPSUIsiwlxcco6778flnchhPO4QjnhPjdoiIZr/4QjhywT4QDg86zxgcvZpamN94/01FqpQ3aRZcg== X-Received: by 10.36.131.65 with SMTP id d62mr11433780ite.111.1486463748435; Tue, 07 Feb 2017 02:35:48 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.101.194 with HTTP; Tue, 7 Feb 2017 02:35:48 -0800 (PST) In-Reply-To: <201702061308.v16D8nGC071178@repo.freebsd.org> References: <201702061308.v16D8nGC071178@repo.freebsd.org> From: Svatopluk Kraus Date: Tue, 7 Feb 2017 11:35:48 +0100 Message-ID: Subject: Re: svn commit: r313339 - head/sys/kern To: Andrew Turner Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-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: Tue, 07 Feb 2017 10:35:49 -0000 So, you did it again. No discussion, you have just committed what you wanted even if I requested a change. It means that I wanted to review it! Or you think that I forget about that when you wait for three months? Your change is not explained at all !! So, explain it better or revert! Does an xref refer only to one hardware? Or two hardwares may have same xrefs? Why one hardware cannot be represented by one PIC in INTRNG even if two drivers exist for it? Except for the flag, intr_pic_register() is same as intr_msi_register() now. On Mon, Feb 6, 2017 at 2:08 PM, Andrew Turner wrote: > Author: andrew > Date: Mon Feb 6 13:08:48 2017 > New Revision: 313339 > URL: https://svnweb.freebsd.org/changeset/base/313339 > > Log: > Only allow the pic type to be either a PIC or MSI type. All interrupt > controller drivers handle either MSI/MSI-X interrupts, or regular > interrupts, as such enforce this in the interrupt handling framework. > If a later driver was to handle both it would need to create one of each. > > This will allow future changes to allow the xref space to overlap, but > refer to different drivers. > > Obtained from: ABT Systems Ltd > Sponsored by: The FreeBSD Foundation > X-Differential Revision: https://reviews.freebsd.org/D8616 > > Modified: > head/sys/kern/subr_intr.c > > Modified: head/sys/kern/subr_intr.c > ============================================================================== > --- head/sys/kern/subr_intr.c Mon Feb 6 11:37:20 2017 (r313338) > +++ head/sys/kern/subr_intr.c Mon Feb 6 13:08:48 2017 (r313339) > @@ -105,8 +105,10 @@ struct intr_pic { > SLIST_ENTRY(intr_pic) pic_next; > intptr_t pic_xref; /* hardware identification */ > device_t pic_dev; > +/* Only one of FLAG_PIC or FLAG_MSI may be set */ > #define FLAG_PIC (1 << 0) > #define FLAG_MSI (1 << 1) > +#define FLAG_TYPE_MASK (FLAG_PIC | FLAG_MSI) > u_int pic_flags; > struct mtx pic_child_lock; > SLIST_HEAD(, intr_pic_child) pic_children; > @@ -115,7 +117,7 @@ struct intr_pic { > static struct mtx pic_list_lock; > static SLIST_HEAD(, intr_pic) pic_list; > > -static struct intr_pic *pic_lookup(device_t dev, intptr_t xref); > +static struct intr_pic *pic_lookup(device_t dev, intptr_t xref, int flags); > > /* Interrupt source definition. */ > static struct mtx isrc_table_lock; > @@ -688,7 +690,7 @@ isrc_add_handler(struct intr_irqsrc *isr > * Lookup interrupt controller locked. > */ > static inline struct intr_pic * > -pic_lookup_locked(device_t dev, intptr_t xref) > +pic_lookup_locked(device_t dev, intptr_t xref, int flags) > { > struct intr_pic *pic; > > @@ -699,6 +701,10 @@ pic_lookup_locked(device_t dev, intptr_t > > /* Note that pic->pic_dev is never NULL on registered PIC. */ > SLIST_FOREACH(pic, &pic_list, pic_next) { > + if ((pic->pic_flags & FLAG_TYPE_MASK) != > + (flags & FLAG_TYPE_MASK)) > + continue; > + > if (dev == NULL) { > if (xref == pic->pic_xref) > return (pic); > @@ -715,12 +721,12 @@ pic_lookup_locked(device_t dev, intptr_t > * Lookup interrupt controller. > */ > static struct intr_pic * > -pic_lookup(device_t dev, intptr_t xref) > +pic_lookup(device_t dev, intptr_t xref, int flags) > { > struct intr_pic *pic; > > mtx_lock(&pic_list_lock); > - pic = pic_lookup_locked(dev, xref); > + pic = pic_lookup_locked(dev, xref, flags); > mtx_unlock(&pic_list_lock); > return (pic); > } > @@ -729,12 +735,12 @@ pic_lookup(device_t dev, intptr_t xref) > * Create interrupt controller. > */ > static struct intr_pic * > -pic_create(device_t dev, intptr_t xref) > +pic_create(device_t dev, intptr_t xref, int flags) > { > struct intr_pic *pic; > > mtx_lock(&pic_list_lock); > - pic = pic_lookup_locked(dev, xref); > + pic = pic_lookup_locked(dev, xref, flags); > if (pic != NULL) { > mtx_unlock(&pic_list_lock); > return (pic); > @@ -746,6 +752,7 @@ pic_create(device_t dev, intptr_t xref) > } > pic->pic_xref = xref; > pic->pic_dev = dev; > + pic->pic_flags = flags; > mtx_init(&pic->pic_child_lock, "pic child lock", NULL, MTX_SPIN); > SLIST_INSERT_HEAD(&pic_list, pic, pic_next); > mtx_unlock(&pic_list_lock); > @@ -757,12 +764,12 @@ pic_create(device_t dev, intptr_t xref) > * Destroy interrupt controller. > */ > static void > -pic_destroy(device_t dev, intptr_t xref) > +pic_destroy(device_t dev, intptr_t xref, int flags) > { > struct intr_pic *pic; > > mtx_lock(&pic_list_lock); > - pic = pic_lookup_locked(dev, xref); > + pic = pic_lookup_locked(dev, xref, flags); > if (pic == NULL) { > mtx_unlock(&pic_list_lock); > return; > @@ -783,12 +790,10 @@ intr_pic_register(device_t dev, intptr_t > > if (dev == NULL) > return (NULL); > - pic = pic_create(dev, xref); > + pic = pic_create(dev, xref, FLAG_PIC); > if (pic == NULL) > return (NULL); > > - pic->pic_flags |= FLAG_PIC; > - > debugf("PIC %p registered for %s \n", pic, > device_get_nameunit(dev), dev, xref); > return (pic); > @@ -822,13 +827,13 @@ intr_pic_claim_root(device_t dev, intptr > { > struct intr_pic *pic; > > - pic = pic_lookup(dev, xref); > + pic = pic_lookup(dev, xref, FLAG_PIC); > if (pic == NULL) { > device_printf(dev, "not registered\n"); > return (EINVAL); > } > > - KASSERT((pic->pic_flags & FLAG_PIC) != 0, > + KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_PIC, > ("%s: Found a non-PIC controller: %s", __func__, > device_get_name(pic->pic_dev))); > So, you would check that pic_lookup(dev, xref, FLAG_PIC) returns PIC with FLAG_PIC set? Really? This nonsense is in other places too. If you would like to be this way, check it only in pic_lookup() then! > @@ -870,7 +875,8 @@ intr_pic_add_handler(device_t parent, st > struct intr_pic_child *child; > #endif > > - parent_pic = pic_lookup(parent, 0); > + /* Find the parent PIC */ > + parent_pic = pic_lookup(parent, 0, FLAG_PIC); > if (parent_pic == NULL) > return (NULL); > > @@ -904,13 +910,14 @@ intr_resolve_irq(device_t dev, intptr_t > if (data == NULL) > return (EINVAL); > > - pic = pic_lookup(dev, xref); > + pic = pic_lookup(dev, xref, > + (data->type == INTR_MAP_DATA_MSI) ? FLAG_MSI : FLAG_PIC); > if (pic == NULL) > return (ESRCH); > > switch (data->type) { > case INTR_MAP_DATA_MSI: > - KASSERT((pic->pic_flags & FLAG_MSI) != 0, > + KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_MSI, > ("%s: Found a non-MSI controller: %s", __func__, > device_get_name(pic->pic_dev))); > msi = (struct intr_map_data_msi *)data; > @@ -918,7 +925,7 @@ intr_resolve_irq(device_t dev, intptr_t > return (0); > > default: > - KASSERT((pic->pic_flags & FLAG_PIC) != 0, > + KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_PIC, > ("%s: Found a non-PIC controller: %s", __func__, > device_get_name(pic->pic_dev))); > return (PIC_MAP_INTR(pic->pic_dev, data, isrc)); > @@ -1255,12 +1262,10 @@ intr_msi_register(device_t dev, intptr_t > > if (dev == NULL) > return (EINVAL); > - pic = pic_create(dev, xref); > + pic = pic_create(dev, xref, FLAG_MSI); > if (pic == NULL) > return (ENOMEM); > > - pic->pic_flags |= FLAG_MSI; > - > debugf("PIC %p registered for %s \n", pic, > device_get_nameunit(dev), dev, (uintmax_t)xref); > return (0); > @@ -1276,11 +1281,11 @@ intr_alloc_msi(device_t pci, device_t ch > struct intr_map_data_msi *msi; > int err, i; > > - pic = pic_lookup(NULL, xref); > + pic = pic_lookup(NULL, xref, FLAG_MSI); > if (pic == NULL) > return (ESRCH); > > - KASSERT((pic->pic_flags & FLAG_MSI) != 0, > + KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_MSI, > ("%s: Found a non-MSI controller: %s", __func__, > device_get_name(pic->pic_dev))); > > @@ -1313,11 +1318,11 @@ intr_release_msi(device_t pci, device_t > struct intr_map_data_msi *msi; > int i, err; > > - pic = pic_lookup(NULL, xref); > + pic = pic_lookup(NULL, xref, FLAG_MSI); > if (pic == NULL) > return (ESRCH); > > - KASSERT((pic->pic_flags & FLAG_MSI) != 0, > + KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_MSI, > ("%s: Found a non-MSI controller: %s", __func__, > device_get_name(pic->pic_dev))); > > @@ -1352,11 +1357,11 @@ intr_alloc_msix(device_t pci, device_t c > struct intr_map_data_msi *msi; > int err; > > - pic = pic_lookup(NULL, xref); > + pic = pic_lookup(NULL, xref, FLAG_MSI); > if (pic == NULL) > return (ESRCH); > > - KASSERT((pic->pic_flags & FLAG_MSI) != 0, > + KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_MSI, > ("%s: Found a non-MSI controller: %s", __func__, > device_get_name(pic->pic_dev))); > > @@ -1380,11 +1385,11 @@ intr_release_msix(device_t pci, device_t > struct intr_map_data_msi *msi; > int err; > > - pic = pic_lookup(NULL, xref); > + pic = pic_lookup(NULL, xref, FLAG_MSI); > if (pic == NULL) > return (ESRCH); > > - KASSERT((pic->pic_flags & FLAG_MSI) != 0, > + KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_MSI, > ("%s: Found a non-MSI controller: %s", __func__, > device_get_name(pic->pic_dev))); > > @@ -1413,11 +1418,11 @@ intr_map_msi(device_t pci, device_t chil > struct intr_pic *pic; > int err; > > - pic = pic_lookup(NULL, xref); > + pic = pic_lookup(NULL, xref, FLAG_MSI); > if (pic == NULL) > return (ESRCH); > > - KASSERT((pic->pic_flags & FLAG_MSI) != 0, > + KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_MSI, > ("%s: Found a non-MSI controller: %s", __func__, > device_get_name(pic->pic_dev))); > > From owner-svn-src-head@freebsd.org Tue Feb 7 11:48: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 B82DECD427A; Tue, 7 Feb 2017 11:48:21 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from kif.fubar.geek.nz (kif.fubar.geek.nz [178.62.119.249]) by mx1.freebsd.org (Postfix) with ESMTP id 7E5CA3D1; Tue, 7 Feb 2017 11:48:21 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from zapp (global-5-144.nat-2.net.cam.ac.uk [131.111.5.144]) by kif.fubar.geek.nz (Postfix) with ESMTPSA id 61C5BD8561; Tue, 7 Feb 2017 11:33:14 +0000 (UTC) Date: Tue, 7 Feb 2017 11:38:44 +0000 From: Andrew Turner To: Svatopluk Kraus Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313339 - head/sys/kern Message-ID: <20170207113844.2cd08852@zapp> In-Reply-To: References: <201702061308.v16D8nGC071178@repo.freebsd.org> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.29; amd64-portbld-freebsd12.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-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: Tue, 07 Feb 2017 11:48:21 -0000 On Tue, 7 Feb 2017 11:35:48 +0100 Svatopluk Kraus wrote: > Does an xref refer only to one hardware? Or two hardwares may have > same xrefs? Why one hardware cannot be represented by one PIC in > INTRNG even if two drivers exist for it? The xref is an FDT thing, in INTRNG we use it as a handle to hardware. This changes it so each of these handles refers to hardware within one of two spaces, the PIC space and MSI space. It may be that for FDT these spaces are non overlapping, however with ACPI it will simplify the code to allow us to have the same handle refer to different controllers in different spaces. > On Mon, Feb 6, 2017 at 2:08 PM, Andrew Turner > wrote: > > Author: andrew > > Date: Mon Feb 6 13:08:48 2017 > > New Revision: 313339 > > URL: https://svnweb.freebsd.org/changeset/base/313339 > > > > Log: > > Only allow the pic type to be either a PIC or MSI type. All > > interrupt controller drivers handle either MSI/MSI-X interrupts, or > > regular interrupts, as such enforce this in the interrupt handling > > framework. If a later driver was to handle both it would need to > > create one of each. > > > > This will allow future changes to allow the xref space to > > overlap, but refer to different drivers. > > > > Obtained from: ABT Systems Ltd > > Sponsored by: The FreeBSD Foundation > > X-Differential Revision: https://reviews.freebsd.org/D8616 ... > > @@ -822,13 +827,13 @@ intr_pic_claim_root(device_t dev, intptr > > { > > struct intr_pic *pic; > > > > - pic = pic_lookup(dev, xref); > > + pic = pic_lookup(dev, xref, FLAG_PIC); > > if (pic == NULL) { > > device_printf(dev, "not registered\n"); > > return (EINVAL); > > } > > > > - KASSERT((pic->pic_flags & FLAG_PIC) != 0, > > + KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_PIC, > > ("%s: Found a non-PIC controller: %s", __func__, > > device_get_name(pic->pic_dev))); > > > > So, you would check that pic_lookup(dev, xref, FLAG_PIC) returns PIC > with FLAG_PIC set? > Really? This nonsense is in other places too. If you would like to be > this way, check it only in pic_lookup() then! It's there so if someone makes a change to pic_lookup that breaks this assumption they will be told about it. Andrew From owner-svn-src-head@freebsd.org Tue Feb 7 12:04: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 E3995CD10C3; Tue, 7 Feb 2017 12:04:05 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBC8B121C; Tue, 7 Feb 2017 12:04:05 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17C440V046030; Tue, 7 Feb 2017 12:04:04 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17C448G046024; Tue, 7 Feb 2017 12:04:04 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201702071204.v17C448G046024@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 7 Feb 2017 12:04:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313385 - in head/sys/arm: altera/socfpga conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Tue, 07 Feb 2017 12:04:06 -0000 Author: andrew Date: Tue Feb 7 12:04:04 2017 New Revision: 313385 URL: https://svnweb.freebsd.org/changeset/base/313385 Log: Add support for PLATFORM and PLATFORM_SMP to the Altera SOCFPGA SoC. This will help with moving it to GENERIC. Reviewed by: br Sponsored by: ABT Systems Ltd Differential Revision: https://reviews.freebsd.org/D9461 Added: head/sys/arm/altera/socfpga/socfpga_mp.h (contents, props changed) Modified: head/sys/arm/altera/socfpga/socfpga_common.c head/sys/arm/altera/socfpga/socfpga_machdep.c head/sys/arm/altera/socfpga/socfpga_mp.c head/sys/arm/conf/SOCKIT.common Modified: head/sys/arm/altera/socfpga/socfpga_common.c ============================================================================== --- head/sys/arm/altera/socfpga/socfpga_common.c Tue Feb 7 08:33:46 2017 (r313384) +++ head/sys/arm/altera/socfpga/socfpga_common.c Tue Feb 7 12:04:04 2017 (r313385) @@ -43,27 +43,3 @@ __FBSDID("$FreeBSD$"); #include -void -cpu_reset(void) -{ - uint32_t paddr; - bus_addr_t vaddr; - phandle_t node; - - if (rstmgr_warmreset() == 0) - goto end; - - node = OF_finddevice("rstmgr"); - if (node == -1) - goto end; - - if ((OF_getencprop(node, "reg", &paddr, sizeof(paddr))) > 0) { - if (bus_space_map(fdtbus_bs_tag, paddr, 0x8, 0, &vaddr) == 0) { - bus_space_write_4(fdtbus_bs_tag, vaddr, - RSTMGR_CTRL, CTRL_SWWARMRSTREQ); - } - } - -end: - while (1); -} Modified: head/sys/arm/altera/socfpga/socfpga_machdep.c ============================================================================== --- head/sys/arm/altera/socfpga/socfpga_machdep.c Tue Feb 7 08:33:46 2017 (r313384) +++ head/sys/arm/altera/socfpga/socfpga_machdep.c Tue Feb 7 12:04:04 2017 (r313385) @@ -28,7 +28,6 @@ * SUCH DAMAGE. */ -#include "opt_ddb.h" #include "opt_platform.h" #include @@ -41,38 +40,22 @@ __FBSDID("$FreeBSD$"); #include +#include + #include #include +#include #include #include +#include -vm_offset_t -platform_lastaddr(void) -{ - - return (devmap_lastaddr()); -} - -void -platform_probe_and_attach(void) -{ - -} - -void -platform_gpio_init(void) -{ - -} - -void -platform_late_init(void) -{ +#include +#include -} +#include "platform_if.h" -int -platform_devmap_init(void) +static int +socfpga_devmap_init(platform_t plat) { /* UART */ @@ -99,3 +82,42 @@ platform_devmap_init(void) return (0); } + +static void +socfpga_cpu_reset(platform_t plat) +{ + uint32_t paddr; + bus_addr_t vaddr; + phandle_t node; + + if (rstmgr_warmreset() == 0) + goto end; + + node = OF_finddevice("rstmgr"); + if (node == -1) + goto end; + + if ((OF_getencprop(node, "reg", &paddr, sizeof(paddr))) > 0) { + if (bus_space_map(fdtbus_bs_tag, paddr, 0x8, 0, &vaddr) == 0) { + bus_space_write_4(fdtbus_bs_tag, vaddr, + RSTMGR_CTRL, CTRL_SWWARMRSTREQ); + } + } + +end: + while (1); +} + +static platform_method_t socfpga_methods[] = { + PLATFORMMETHOD(platform_devmap_init, socfpga_devmap_init), + PLATFORMMETHOD(platform_cpu_reset, socfpga_cpu_reset), + +#ifdef SMP + PLATFORMMETHOD(platform_mp_setmaxid, socfpga_mp_setmaxid), + PLATFORMMETHOD(platform_mp_start_ap, socfpga_mp_start_ap), +#endif + + PLATFORMMETHOD_END, +}; + +FDT_PLATFORM_DEF(socfpga, "socfpga", 0, "altr,socfpga", 0); Modified: head/sys/arm/altera/socfpga/socfpga_mp.c ============================================================================== --- head/sys/arm/altera/socfpga/socfpga_mp.c Tue Feb 7 08:33:46 2017 (r313384) +++ head/sys/arm/altera/socfpga/socfpga_mp.c Tue Feb 7 12:04:04 2017 (r313385) @@ -28,6 +28,8 @@ * SUCH DAMAGE. */ +#include "opt_platform.h" + #include __FBSDID("$FreeBSD$"); #include @@ -45,6 +47,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include + +#include #define SCU_PHYSBASE 0xFFFEC000 #define SCU_SIZE 0x100 @@ -85,7 +90,7 @@ socfpga_trampoline(void) } void -platform_mp_setmaxid(void) +socfpga_mp_setmaxid(platform_t plat) { int hwcpu, ncpu; @@ -105,7 +110,7 @@ platform_mp_setmaxid(void) } void -platform_mp_start_ap(void) +socfpga_mp_start_ap(platform_t plat) { bus_space_handle_t scu, rst, ram; int reg; Added: head/sys/arm/altera/socfpga/socfpga_mp.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/altera/socfpga/socfpga_mp.h Tue Feb 7 12:04:04 2017 (r313385) @@ -0,0 +1,34 @@ +/*- + * Copyright (c) 2017 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _SOCFPGA_MP_H_ +#define _SOCFPGA_MP_H_ + +void socfpga_mp_setmaxid(platform_t); +void socfpga_mp_start_ap(platform_t); + +#endif /* _SOCFPGA_MP_H_ */ Modified: head/sys/arm/conf/SOCKIT.common ============================================================================== --- head/sys/arm/conf/SOCKIT.common Tue Feb 7 08:33:46 2017 (r313384) +++ head/sys/arm/conf/SOCKIT.common Tue Feb 7 12:04:04 2017 (r313385) @@ -26,6 +26,8 @@ makeoptions MODULES_OVERRIDE="" makeoptions WERROR="-Werror" options SCHED_ULE # ULE scheduler +options PLATFORM # Platform based SoC +options PLATFORM_SMP options SMP # Enable multiple cores # NFS root from boopt/dhcp From owner-svn-src-head@freebsd.org Tue Feb 7 12:55: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 9FCA3CD4393; Tue, 7 Feb 2017 12:55:12 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 317DB1137; Tue, 7 Feb 2017 12:55:12 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wm0-x242.google.com with SMTP id v77so28068086wmv.0; Tue, 07 Feb 2017 04:55:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=L+7gt/Vs/Z+2cYv4QhuUOxd0RjxIz3QYyvYYMEkHYAE=; b=Rx7gKHSDRfZ0/1VPWaB0PmYkpORYwdrHyv9u6QLIaB/SYREdvCG3la5x3fwc0bAj4z OHLBW5Ap0FCo1pQFtD4Q6m3LO3V9zFT5/T4nnhD3/zRtN8OgtbdmL5AwINriMlop+RXG nWx1K4TvA/eprhuh1qEH7bkQHxQGV3vXrieOIQbygkN5IO+hGtc/uHJs8CERT/xzu9VX lefTkZgG5emCHIR+gxiy81jw9PmD14cj2YaJ+im1oL/httemqdHr8wL/cS+rMbDtxZaO z3Qg8aIt/J1OAtbfMrFVK3didBRISuZXrGIf8iplY/pGlDkRB9tEmsRN3pohiCz2QYSk DX1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=L+7gt/Vs/Z+2cYv4QhuUOxd0RjxIz3QYyvYYMEkHYAE=; b=E9UfUV6zP48HZThusITZ5UEswoMzcSH2jA3oNcfWK+kiaJzaLZiFkFZ9MW0+8TnGCi jp7pCM8l9NcyyaD8wIxuBhBOCourm+RRWr6L6NNR98yGDKBUs589SrS/hrXN45JuuvKp R7xrPSkOC24Wk5Du/yJglXvcvOHKupsZpNODzgWb0f3+ZoJKnClHAH09lzkGUDyyLv1+ MC17CYk+NRJwAmTU3F2oZAeoG/c6u2k1urUGjsHxi6S0Bahluz24JK4XwTvWqrDbjO2t SmKcWHfMubAZJEHdYYnV8jQbxO7joyjST0MEKUQVYg0JaNtvl+ViSMijKIqcSX8VdRpl 2RVg== X-Gm-Message-State: AMke39nlOvmzz5W3Jx2C1RfZVYYMyFcUD3u5Yas1BQaOdlLmsObQ8bfwQZ+6ewbvn3gsXw== X-Received: by 10.28.148.76 with SMTP id w73mr13279908wmd.74.1486472110449; Tue, 07 Feb 2017 04:55:10 -0800 (PST) Received: from brick (global-5-142.nat-2.net.cam.ac.uk. [131.111.5.142]) by smtp.gmail.com with ESMTPSA id 8sm2843670wmg.1.2017.02.07.04.55.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Feb 2017 04:55:09 -0800 (PST) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Tue, 7 Feb 2017 12:55:08 +0000 From: Edward Tomasz Napierala To: Konstantin Belousov Cc: John Baldwin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313352 - in head/sys: compat/cloudabi compat/freebsd32 compat/linux vm Message-ID: <20170207125508.GA62670@brick> Mail-Followup-To: Konstantin Belousov , John Baldwin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201702062057.v16KvCtI069664@repo.freebsd.org> <2958370.34Dmljdf7f@ralph.baldwin.cx> <20170207083909.GX2092@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170207083909.GX2092@kib.kiev.ua> User-Agent: Mutt/1.7.2 (2016-11-26) X-BeenThere: svn-src-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: Tue, 07 Feb 2017 12:55:12 -0000 On 0207T1039, Konstantin Belousov wrote: > On Mon, Feb 06, 2017 at 03:03:11PM -0800, John Baldwin wrote: > > On Monday, February 06, 2017 08:57:12 PM Edward Tomasz Napierala wrote: > > > Author: trasz > > > Date: Mon Feb 6 20:57:12 2017 > > > New Revision: 313352 > > > URL: https://svnweb.freebsd.org/changeset/base/313352 > > > > > > Log: > > > Add kern_vm_mmap2(), kern_vm_mprotect(), kern_vm_msync(), kern_vm_munlock(), > > > kern_vm_munmap(), and kern_vm_madvise(), and use them in various compats > > > instead of their sys_*() counterparts. > > > > > > Reviewed by: ed, dchagin, kib > > > MFC after: 2 weeks > > > Sponsored by: DARPA, AFRL > > > Differential Revision: https://reviews.freebsd.org/D9378 > > > > I know kib@ suggested kern_vm_ instead of the vm_ you had suggested, > > but just kern_ would be more consistent. That is what we have done with > > every other system call. (e.g. there isn't kern_socket_bind, kern_socket_listen, > > etc., but just kern_bind() and kern_listen()). > > Note that the kern_vm_* functions are not quite regular syscall helpers. > The big issue with them, which caused my suggestion, is that the > functions cannot be declared in sys/syscallsubr.h, because their > declarations depend on the vm/*.h namespace. Exactly; they use vm-specific types (vm_offset_t, for example). And I wanted to avoid changing the types all over the place, at least for now. From owner-svn-src-head@freebsd.org Tue Feb 7 13:50: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 20428CD5321; Tue, 7 Feb 2017 13:50:20 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BD1051158; Tue, 7 Feb 2017 13:50:19 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm0-x242.google.com with SMTP id u63so28411320wmu.2; Tue, 07 Feb 2017 05:50:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=PpQzmTLItw5sximOQjW5g84QVpQ0sdMLTjQs1vLY6mA=; b=UGANyXDMGhUDcXvNOGJokj1wNAiu/UHvdqiRZDnoHaw/OBAHBZQIdP6WcxC5exRI9Z 3zyslcGnnzRybRgDT7damASSQqDKUaPBk0SjyZU0h7BXKMwilPnncK7vxGNfnccaDla1 WwVlm1J0VOStuH2etSq23scpQGeobF0bPIyByVJXLMrH+8uNpmLYXxw/xcH3NxSdAIu0 wD25Ble9iEfyN4vWtJZzNjhPdrRgNGZpzI5GJKiEwQ9WSAOTRChAjJvOucexO+14ujlO eaxVGWqKFOLvarX7ISiH3Se141Lj0ChwflG5jn9cVAj+u4Oy60GxGRA00EKAvJjnWVNx uPqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=PpQzmTLItw5sximOQjW5g84QVpQ0sdMLTjQs1vLY6mA=; b=XO5d2/s1incB/qR9DgqD/QJqf7Yx/diiQbvJNGqdk2E88qYKtuCnhnx2aiPBOPrSf8 IjJVR5RjK673WahgHHB0XhULpXgag+wQEok2FAHXIYbMY6wa9jzJCpy7cXzaZFDz93no 1Ujsw/udKMS604wvhiW9v3i9GEukafV6LT+Nw8pY/JPxqsbipQOgbj9SHaNg/mexVWXB Za1azeFD0VpDHD2Mj8dWvqyhnaqxYK6xeW8yekleT5qLM2lY3aRdRNN6sIoJExF4utTY I9mzg79d6uOnUqQkZzAty9wnBmBPC7K8ov5dn1lwdWBxr8lxTXUjGSZctMPci5kRVvGy T8vA== X-Gm-Message-State: AMke39mQrjb2PV+qdizLPfe92MI2ceB4f5eKaObdA7SZN+fSMwX1TKdOQ4fTiN0Hf+MUYA== X-Received: by 10.28.178.16 with SMTP id b16mr14513611wmf.83.1486475417917; Tue, 07 Feb 2017 05:50:17 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by smtp.gmail.com with ESMTPSA id p49sm7482787wrb.10.2017.02.07.05.50.16 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 07 Feb 2017 05:50:17 -0800 (PST) Date: Tue, 7 Feb 2017 14:50:15 +0100 From: Mateusz Guzik To: Edward Tomasz Napierala Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313352 - in head/sys: compat/cloudabi compat/freebsd32 compat/linux vm Message-ID: <20170207135014.GC4772@dft-labs.eu> References: <201702062057.v16KvCtI069664@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201702062057.v16KvCtI069664@repo.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-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: Tue, 07 Feb 2017 13:50:20 -0000 On Mon, Feb 06, 2017 at 08:57:12PM +0000, Edward Tomasz Napierala wrote: > Author: trasz > Date: Mon Feb 6 20:57:12 2017 > New Revision: 313352 > URL: https://svnweb.freebsd.org/changeset/base/313352 > > Log: > Add kern_vm_mmap2(), kern_vm_mprotect(), kern_vm_msync(), kern_vm_munlock(), > kern_vm_munmap(), and kern_vm_madvise(), and use them in various compats > instead of their sys_*() counterparts. > > -sys_mmap(td, uap) > - struct thread *td; > - struct mmap_args *uap; > +sys_mmap(struct thread *td, struct mmap_args *uap) > +{ > + > + return (kern_vm_mmap(td, (vm_offset_t)uap->addr, uap->len, > + uap->prot, uap->flags, uap->fd, uap->pos)); > +} > + > +int > +kern_vm_mmap(struct thread *td, vm_offset_t addr, vm_size_t size, > + vm_prot_t prot, int flags, int fd, off_t pos) > { Can we start dropping the td argument? It always is curthread and almost always has to be anyway as something down below accesses data in a manner only safe for curthread (classic: credential checks). With this example the function takes 7 args. So the commit added an indirection which cannot be tail called on amd64 due to the 7th argument passed through the stack. Removing the td argument deals with the problem. -- Mateusz Guzik From owner-svn-src-head@freebsd.org Tue Feb 7 13:56: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 DAB5ACD557F; Tue, 7 Feb 2017 13:56:07 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99B5016F6; Tue, 7 Feb 2017 13:56:07 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1cb6FS-0007Ks-N9; Tue, 07 Feb 2017 16:55:58 +0300 Date: Tue, 7 Feb 2017 16:55:58 +0300 From: Slawa Olhovchenkov To: "Andrey V. Elsukov" Cc: Dmitry Morozovsky , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r313330 - in head: contrib/netcat lib/libipsec sbin/ifconfig sbin/setkey share/man/man4 sys/conf sys/modules sys/modules/ipsec sys/modules/tcp/tcpmd5 sys/net sys/netinet sys/netinet/tcp... Message-ID: <20170207135558.GF5366@zxy.spb.ru> References: <201702060849.v168nwmf064277@repo.freebsd.org> <1e8b55ba-11d2-9563-be44-0e20f7f2f33d@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1e8b55ba-11d2-9563-be44-0e20f7f2f33d@FreeBSD.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-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: Tue, 07 Feb 2017 13:56:08 -0000 On Tue, Feb 07, 2017 at 03:53:05AM +0300, Andrey V. Elsukov wrote: > On 06.02.2017 17:31, Dmitry Morozovsky wrote: > >> Date: Mon Feb 6 08:49:57 2017 > >> New Revision: 313330 > >> URL: https://svnweb.freebsd.org/changeset/base/313330 > >> > >> Log: > >> Merge projects/ipsec into head/. > > > > [snip] > > > > Great, thanks! > > > > Have you any plans to merge this into stable/11 to reduce diffs in network > > stack code? > > It depends from the further users feedback. > I wanted to do MFC after one or two months. But there are two things > that are questionable. The date of stable/11 feature freeze is not > known. And there is also some changes that can be considered as POLA > violations. E.g. now SPIs are unique, and if user had manually > configured SAs with the same SPI, the MFC will break this. What about IKE? I am don't know, do IKE SPI number negotiation? Or remote side just assign implicit SPI? In last case posible race on local system. From owner-svn-src-head@freebsd.org Tue Feb 7 14:49: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 005D4CD44C5; Tue, 7 Feb 2017 14:49:38 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC6181A66; Tue, 7 Feb 2017 14:49:37 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17Enaiv014306; Tue, 7 Feb 2017 14:49:36 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17EnaUa014301; Tue, 7 Feb 2017 14:49:36 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702071449.v17EnaUa014301@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 7 Feb 2017 14:49:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313386 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Tue, 07 Feb 2017 14:49:38 -0000 Author: mjg Date: Tue Feb 7 14:49:36 2017 New Revision: 313386 URL: https://svnweb.freebsd.org/changeset/base/313386 Log: locks: change backoff to exponential Previous implementation would use a random factor to spread readers and reduce chances of starvation. This visibly reduces effectiveness of the mechanism. Switch to the more traditional exponential variant. Try to limit starvation by imposing an upper limit of spins after which spinning is half of what other threads get. Note the mechanism is turned off by default. Reviewed by: kib (previous version) Modified: head/sys/kern/kern_mutex.c head/sys/kern/kern_rwlock.c head/sys/kern/kern_sx.c head/sys/kern/subr_lock.c head/sys/sys/lock.h Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Tue Feb 7 12:04:04 2017 (r313385) +++ head/sys/kern/kern_mutex.c Tue Feb 7 14:49:36 2017 (r313386) @@ -140,63 +140,27 @@ struct lock_class lock_class_mtx_spin = #ifdef ADAPTIVE_MUTEXES static SYSCTL_NODE(_debug, OID_AUTO, mtx, CTLFLAG_RD, NULL, "mtx debugging"); -static struct lock_delay_config __read_mostly mtx_delay = { - .initial = 1000, - .step = 500, - .min = 100, - .max = 5000, -}; +static struct lock_delay_config __read_mostly mtx_delay; -SYSCTL_INT(_debug_mtx, OID_AUTO, delay_initial, CTLFLAG_RW, &mtx_delay.initial, - 0, ""); -SYSCTL_INT(_debug_mtx, OID_AUTO, delay_step, CTLFLAG_RW, &mtx_delay.step, - 0, ""); -SYSCTL_INT(_debug_mtx, OID_AUTO, delay_min, CTLFLAG_RW, &mtx_delay.min, +SYSCTL_INT(_debug_mtx, OID_AUTO, delay_base, CTLFLAG_RW, &mtx_delay.base, 0, ""); SYSCTL_INT(_debug_mtx, OID_AUTO, delay_max, CTLFLAG_RW, &mtx_delay.max, 0, ""); -static void -mtx_delay_sysinit(void *dummy) -{ - - mtx_delay.initial = mp_ncpus * 25; - mtx_delay.step = (mp_ncpus * 25) / 2; - mtx_delay.min = mp_ncpus * 5; - mtx_delay.max = mp_ncpus * 25 * 10; -} -LOCK_DELAY_SYSINIT(mtx_delay_sysinit); +LOCK_DELAY_SYSINIT_DEFAULT(mtx_delay); #endif static SYSCTL_NODE(_debug, OID_AUTO, mtx_spin, CTLFLAG_RD, NULL, "mtx spin debugging"); -static struct lock_delay_config __read_mostly mtx_spin_delay = { - .initial = 1000, - .step = 500, - .min = 100, - .max = 5000, -}; - -SYSCTL_INT(_debug_mtx_spin, OID_AUTO, delay_initial, CTLFLAG_RW, - &mtx_spin_delay.initial, 0, ""); -SYSCTL_INT(_debug_mtx_spin, OID_AUTO, delay_step, CTLFLAG_RW, &mtx_spin_delay.step, - 0, ""); -SYSCTL_INT(_debug_mtx_spin, OID_AUTO, delay_min, CTLFLAG_RW, &mtx_spin_delay.min, - 0, ""); -SYSCTL_INT(_debug_mtx_spin, OID_AUTO, delay_max, CTLFLAG_RW, &mtx_spin_delay.max, - 0, ""); +static struct lock_delay_config __read_mostly mtx_spin_delay; -static void -mtx_spin_delay_sysinit(void *dummy) -{ +SYSCTL_INT(_debug_mtx_spin, OID_AUTO, delay_base, CTLFLAG_RW, + &mtx_spin_delay.base, 0, ""); +SYSCTL_INT(_debug_mtx_spin, OID_AUTO, delay_max, CTLFLAG_RW, + &mtx_spin_delay.max, 0, ""); - mtx_spin_delay.initial = mp_ncpus * 25; - mtx_spin_delay.step = (mp_ncpus * 25) / 2; - mtx_spin_delay.min = mp_ncpus * 5; - mtx_spin_delay.max = mp_ncpus * 25 * 10; -} -LOCK_DELAY_SYSINIT(mtx_spin_delay_sysinit); +LOCK_DELAY_SYSINIT_DEFAULT(mtx_spin_delay); /* * System-wide mutexes Modified: head/sys/kern/kern_rwlock.c ============================================================================== --- head/sys/kern/kern_rwlock.c Tue Feb 7 12:04:04 2017 (r313385) +++ head/sys/kern/kern_rwlock.c Tue Feb 7 14:49:36 2017 (r313386) @@ -100,32 +100,14 @@ static SYSCTL_NODE(_debug, OID_AUTO, rwl SYSCTL_INT(_debug_rwlock, OID_AUTO, retry, CTLFLAG_RW, &rowner_retries, 0, ""); SYSCTL_INT(_debug_rwlock, OID_AUTO, loops, CTLFLAG_RW, &rowner_loops, 0, ""); -static struct lock_delay_config __read_mostly rw_delay = { - .initial = 1000, - .step = 500, - .min = 100, - .max = 5000, -}; +static struct lock_delay_config __read_mostly rw_delay; -SYSCTL_INT(_debug_rwlock, OID_AUTO, delay_initial, CTLFLAG_RW, &rw_delay.initial, - 0, ""); -SYSCTL_INT(_debug_rwlock, OID_AUTO, delay_step, CTLFLAG_RW, &rw_delay.step, - 0, ""); -SYSCTL_INT(_debug_rwlock, OID_AUTO, delay_min, CTLFLAG_RW, &rw_delay.min, +SYSCTL_INT(_debug_rwlock, OID_AUTO, delay_base, CTLFLAG_RW, &rw_delay.base, 0, ""); SYSCTL_INT(_debug_rwlock, OID_AUTO, delay_max, CTLFLAG_RW, &rw_delay.max, 0, ""); -static void -rw_delay_sysinit(void *dummy) -{ - - rw_delay.initial = mp_ncpus * 25; - rw_delay.step = (mp_ncpus * 25) / 2; - rw_delay.min = mp_ncpus * 5; - rw_delay.max = mp_ncpus * 25 * 10; -} -LOCK_DELAY_SYSINIT(rw_delay_sysinit); +LOCK_DELAY_SYSINIT_DEFAULT(rw_delay); #endif /* Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Tue Feb 7 12:04:04 2017 (r313385) +++ head/sys/kern/kern_sx.c Tue Feb 7 14:49:36 2017 (r313386) @@ -148,32 +148,14 @@ static SYSCTL_NODE(_debug, OID_AUTO, sx, SYSCTL_UINT(_debug_sx, OID_AUTO, retries, CTLFLAG_RW, &asx_retries, 0, ""); SYSCTL_UINT(_debug_sx, OID_AUTO, loops, CTLFLAG_RW, &asx_loops, 0, ""); -static struct lock_delay_config __read_mostly sx_delay = { - .initial = 1000, - .step = 500, - .min = 100, - .max = 5000, -}; +static struct lock_delay_config __read_mostly sx_delay; -SYSCTL_INT(_debug_sx, OID_AUTO, delay_initial, CTLFLAG_RW, &sx_delay.initial, - 0, ""); -SYSCTL_INT(_debug_sx, OID_AUTO, delay_step, CTLFLAG_RW, &sx_delay.step, - 0, ""); -SYSCTL_INT(_debug_sx, OID_AUTO, delay_min, CTLFLAG_RW, &sx_delay.min, +SYSCTL_INT(_debug_sx, OID_AUTO, delay_base, CTLFLAG_RW, &sx_delay.base, 0, ""); SYSCTL_INT(_debug_sx, OID_AUTO, delay_max, CTLFLAG_RW, &sx_delay.max, 0, ""); -static void -sx_delay_sysinit(void *dummy) -{ - - sx_delay.initial = mp_ncpus * 25; - sx_delay.step = (mp_ncpus * 25) / 2; - sx_delay.min = mp_ncpus * 5; - sx_delay.max = mp_ncpus * 25 * 10; -} -LOCK_DELAY_SYSINIT(sx_delay_sysinit); +LOCK_DELAY_SYSINIT_DEFAULT(sx_delay); #endif void Modified: head/sys/kern/subr_lock.c ============================================================================== --- head/sys/kern/subr_lock.c Tue Feb 7 12:04:04 2017 (r313385) +++ head/sys/kern/subr_lock.c Tue Feb 7 14:49:36 2017 (r313386) @@ -56,6 +56,9 @@ __FBSDID("$FreeBSD$"); #include +SDT_PROVIDER_DEFINE(lock); +SDT_PROBE_DEFINE1(lock, , , starvation, "u_int"); + CTASSERT(LOCK_CLASS_MAX == 15); struct lock_class *lock_classes[LOCK_CLASS_MAX + 1] = { @@ -103,32 +106,56 @@ lock_destroy(struct lock_object *lock) lock->lo_flags &= ~LO_INITIALIZED; } +static SYSCTL_NODE(_debug, OID_AUTO, lock, CTLFLAG_RD, NULL, "lock debugging"); +static SYSCTL_NODE(_debug_lock, OID_AUTO, delay, CTLFLAG_RD, NULL, + "lock delay"); + +static u_int __read_mostly starvation_limit = 131072; +SYSCTL_INT(_debug_lock_delay, OID_AUTO, starvation_limit, CTLFLAG_RW, + &starvation_limit, 0, ""); + +static u_int __read_mostly restrict_starvation = 0; +SYSCTL_INT(_debug_lock_delay, OID_AUTO, restrict_starvation, CTLFLAG_RW, + &restrict_starvation, 0, ""); + void lock_delay(struct lock_delay_arg *la) { - u_int i, delay, backoff, min, max; struct lock_delay_config *lc = la->config; + u_int i; - delay = la->delay; + la->delay <<= 1; + if (__predict_false(la->delay > lc->max)) + la->delay = lc->max; - if (delay == 0) - delay = lc->initial; - else { - delay += lc->step; - max = lc->max; - if (delay > max) - delay = max; - } - - backoff = cpu_ticks() % delay; - min = lc->min; - if (backoff < min) - backoff = min; - for (i = 0; i < backoff; i++) + for (i = la->delay; i > 0; i++) cpu_spinwait(); - la->delay = delay; - la->spin_cnt += backoff; + la->spin_cnt += la->delay; + if (__predict_false(la->spin_cnt > starvation_limit)) { + SDT_PROBE1(lock, , , starvation, la->delay); + if (restrict_starvation) + la->delay = lc->base; + } +} + +static u_int +lock_roundup_2(u_int val) +{ + u_int res; + + for (res = 1; res <= val; res <<= 1) + continue; + + return (res); +} + +void +lock_delay_default_init(struct lock_delay_config *lc) +{ + + lc->base = lock_roundup_2(mp_ncpus) / 4; + lc->max = lc->base * 1024; } #ifdef DDB @@ -655,7 +682,6 @@ out: critical_exit(); } -static SYSCTL_NODE(_debug, OID_AUTO, lock, CTLFLAG_RD, NULL, "lock debugging"); static SYSCTL_NODE(_debug_lock, OID_AUTO, prof, CTLFLAG_RD, NULL, "lock profiling"); SYSCTL_INT(_debug_lock_prof, OID_AUTO, skipspin, CTLFLAG_RW, Modified: head/sys/sys/lock.h ============================================================================== --- head/sys/sys/lock.h Tue Feb 7 12:04:04 2017 (r313385) +++ head/sys/sys/lock.h Tue Feb 7 14:49:36 2017 (r313386) @@ -202,9 +202,7 @@ extern struct lock_class lock_class_lock extern struct lock_class *lock_classes[]; struct lock_delay_config { - u_int initial; - u_int step; - u_int min; + u_int base; u_int max; }; @@ -215,19 +213,25 @@ struct lock_delay_arg { }; static inline void -lock_delay_arg_init(struct lock_delay_arg *la, struct lock_delay_config *lc) { +lock_delay_arg_init(struct lock_delay_arg *la, struct lock_delay_config *lc) +{ la->config = lc; - la->delay = 0; + la->delay = lc->base; la->spin_cnt = 0; } #define LOCK_DELAY_SYSINIT(func) \ SYSINIT(func##_ld, SI_SUB_LOCK, SI_ORDER_ANY, func, NULL) +#define LOCK_DELAY_SYSINIT_DEFAULT(lc) \ + SYSINIT(lock_delay_##lc##_ld, SI_SUB_LOCK, SI_ORDER_ANY, \ + lock_delay_default_init, &lc) + void lock_init(struct lock_object *, struct lock_class *, const char *, const char *, int); void lock_destroy(struct lock_object *); void lock_delay(struct lock_delay_arg *); +void lock_delay_default_init(struct lock_delay_config *); void spinlock_enter(void); void spinlock_exit(void); void witness_init(struct lock_object *, const char *); From owner-svn-src-head@freebsd.org Tue Feb 7 14:57: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 D12CBCD48C0; Tue, 7 Feb 2017 14:57:55 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3B87E1F8F; Tue, 7 Feb 2017 14:57:55 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm0-x242.google.com with SMTP id c85so28778673wmi.1; Tue, 07 Feb 2017 06:57:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Oiyb5Dsp6PWIbbIreyhlFLh+joIJaJOb+9wekeAhX3A=; b=CNZnB2b17szKjrjE2Q7RC+539xvIWGbtnbPTxVxs7QKCY8iCo7MHByu8rd5kSrpmOc epC3mZrD4Jtlrscd2Zv7mcnPg6z82KI+9FKbYt0a5ErL0w3xrgZMBJR2anX0p48of4bH 1xPMPgIIVRs54GO9ajd8Fopt9b6SrZO2AwZ11H/5xf6lIAh84J7Rni2iczaHDQ36WuJs li0GYe7aL/49lDSsIs1FQMUOr++5yLgyARYv65O/VumezKpxYMGJ8f4roomTDTVL4iN5 XJ3438m4fxo1HzLqiYRAOcSwMzfK+DgCNOjb7v7k6A8coR49RFuY0kEDwtohFsMUgVEF nbhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Oiyb5Dsp6PWIbbIreyhlFLh+joIJaJOb+9wekeAhX3A=; b=OEHyZt1ny2RI4bLwjkWIrHUtdmrQ2tyf8l83Ok2DPtTALcb+3GQb0vD/fQNgU+Qu6O sdxx2p260GhLVA66pnNfAuKd2YAnFTK+steHutK0yT9U8J7nBukT9+8bLUKxsDNhuhnW UNgRDjWCqnrqbleD8W4ix/NYOHZCB8rhm86FwHcy8eFw7bg+Qgnrzr7+LWe+THMxpi1N fbRxTEBDRq0lDNYDbiThw+FSE2aka0DBQN1+PUh3MUCj96Z/slBr+4h3nI/O0hMpbdIv UzVNmaCruxPqsSEzo0IoxKXe78qQVj9ev8eiBZbEPZvdMhoV3nhkqF/uIcCyVCleldmN AUNQ== X-Gm-Message-State: AMke39m9VD2o9R4knGUeVFaTLlG5gEnyMH6fqyb1eURFA3yQXh91bzaxXmCIvxTCrvUNsQ== X-Received: by 10.28.47.15 with SMTP id v15mr12929996wmv.67.1486479473685; Tue, 07 Feb 2017 06:57:53 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by smtp.gmail.com with ESMTPSA id x135sm19233327wme.23.2017.02.07.06.57.52 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 07 Feb 2017 06:57:53 -0800 (PST) Date: Tue, 7 Feb 2017 15:57:50 +0100 From: Mateusz Guzik To: Alexey Dokuchaev Cc: Steven Hartland , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mateusz Guzik Subject: Re: svn commit: r313260 - head/sys/kern Message-ID: <20170207145750.GD4772@dft-labs.eu> References: <201702050140.v151eRXX090326@repo.freebsd.org> <42c790bb-df12-2a50-6181-24bac5c72d34@multiplay.co.uk> <20170205030006.GB4375@dft-labs.eu> <20170205151746.GA6841@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20170205151746.GA6841@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-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: Tue, 07 Feb 2017 14:57:55 -0000 On Sun, Feb 05, 2017 at 03:17:46PM +0000, Alexey Dokuchaev wrote: > On Sun, Feb 05, 2017 at 04:00:06AM +0100, Mateusz Guzik wrote: > > For instance, plugging an unused variable, a memory leak, doing a > > lockless check first etc. are all pretty standard and unless there is > > something unusual going on (e.g. complicated circumstances leading to a > > leak) there is not much to explain. In particular, I don't see why > > anyone would explain why leaks are bad on each commit plugging one. > > Right; these (unused variable, resource leaks) usually do not warrant > elaborate explanation. > > [ Some linefeeds below were trimmed for brevity ] > > The gist is as follows: there are plenty of cases where the kernel wants > > to atomically replace the value of a particular variable. Sometimes, > > like in this commit, we want to bump the counter by 1, but only if the > > current value is not 0. For that we need to read the value, see if it is > > 0 and if not, try to replace what we read with what we read + 1. We > > cannot just increment as the value could have changed to 0 in the > > meantime. > > But this also means that multiple cpus doing the same operation on the > > same variable will trip on each other - one will succeed while the rest > > will have to retry. > > Prior to this commit, each retry attempt would explicitly re-read the > > value. This induces cache coherency traffic slowing everyone down. > > amd64 has the nice property of giving us the value it found eleminating > > the need to explicitly re-read it. There is similar story on i386 and > > sparc. > > Other architectures may also benefit from this, but that I did not > > benchmark. > > > > In short[,] under contention atomic_fcmpset is going to be faster than > > atomic_cmpset. > > I did not benchmark this particular change, but a switch of the sort > > easily gives 10%+ in microbenchmarks on amd64. > > That said, while one can argue this optimizes the code, it really > > depessimizes it as something of the sort should have been already > > employed. > > Given the above, IMHO it's quite far from an obvious or of manpage-lookup > thing, and thus requires proper explanation in the commit log. > If the aformenteiond explanation is necessary, the place for it is in the man page. There are already several commits with fcmpset and there will be more to come. I don't see why any of them would convey the information. > > > While on this subject are there any official guidelines to writing > > > commit messages, if no should we create some? > > > > I'm unaware of any. > > We might not have official guidelines, but 30%-what/70%-why rule would > apply perfectly here. ;-) > > ./danfe -- Mateusz Guzik From owner-svn-src-head@freebsd.org Tue Feb 7 15:16: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 90980CD5156; Tue, 7 Feb 2017 15:16:02 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60113118A; Tue, 7 Feb 2017 15:16:02 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17FG1wY026309; Tue, 7 Feb 2017 15:16:01 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17FG1sX026308; Tue, 7 Feb 2017 15:16:01 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201702071516.v17FG1sX026308@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 7 Feb 2017 15:16:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313389 - head/sys/boot/efi/libefi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Tue, 07 Feb 2017 15:16:02 -0000 Author: manu Date: Tue Feb 7 15:16:01 2017 New Revision: 313389 URL: https://svnweb.freebsd.org/changeset/base/313389 Log: efipart is also using the '%S' printf format, add -Wno-format for it. This fix building for armv6. Modified: head/sys/boot/efi/libefi/Makefile Modified: head/sys/boot/efi/libefi/Makefile ============================================================================== --- head/sys/boot/efi/libefi/Makefile Tue Feb 7 15:13:19 2017 (r313388) +++ head/sys/boot/efi/libefi/Makefile Tue Feb 7 15:16:01 2017 (r313389) @@ -26,6 +26,7 @@ SRCS+= time_event.c # of a short. There's no good cast to use here so just ignore the # warnings for now. CWARNFLAGS.efinet.c+= -Wno-format +CWARNFLAGS.efipart.c+= -Wno-format CWARNFLAGS.env.c+= -Wno-format .if ${MACHINE_CPUARCH} == "aarch64" From owner-svn-src-head@freebsd.org Tue Feb 7 15:28:53 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 5FC50CD5459; Tue, 7 Feb 2017 15:28:53 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0A3B191F; Tue, 7 Feb 2017 15:28:52 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v17FSmDl074832 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 7 Feb 2017 17:28:48 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v17FSmDl074832 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v17FSmdK074831; Tue, 7 Feb 2017 17:28:48 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 7 Feb 2017 17:28:48 +0200 From: Konstantin Belousov To: Mateusz Guzik Cc: Edward Tomasz Napierala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313352 - in head/sys: compat/cloudabi compat/freebsd32 compat/linux vm Message-ID: <20170207152848.GC2092@kib.kiev.ua> References: <201702062057.v16KvCtI069664@repo.freebsd.org> <20170207135014.GC4772@dft-labs.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170207135014.GC4772@dft-labs.eu> User-Agent: Mutt/1.7.2 (2016-11-26) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-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: Tue, 07 Feb 2017 15:28:53 -0000 On Tue, Feb 07, 2017 at 02:50:15PM +0100, Mateusz Guzik wrote: > Can we start dropping the td argument? It always is curthread and > almost always has to be anyway as something down below accesses > data in a manner only safe for curthread (classic: credential checks). > > With this example the function takes 7 args. So the commit added an > indirection which cannot be tail called on amd64 due to the 7th argument > passed through the stack. Removing the td argument deals with the > problem. OTOH accessing current thread as curthread adds some number of instructions with %gs prefixes. On older machines, this caused bubbles in the frontend decoding of the instructions, which made using plain pointer instead of the magical curthread reasonable. Modern big processors should not have the problem anymore, but smaller designs like Atom still do. I suspect it is quite hard to notice a difference there, either with %gs decoding overhead, or with the missed tail call optimization, for the vm syscalls which are quite slow on its own. The effects of both micro- optimizations should be noise. From owner-svn-src-head@freebsd.org Tue Feb 7 15:31: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 A03ECCD55AA for ; Tue, 7 Feb 2017 15:31:02 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: from mail-wj0-x22a.google.com (mail-wj0-x22a.google.com [IPv6:2a00:1450:400c:c01::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 4BE701C92 for ; Tue, 7 Feb 2017 15:31:02 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: by mail-wj0-x22a.google.com with SMTP id la6so4958861wjc.0 for ; Tue, 07 Feb 2017 07:31:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to; bh=14icftTA0jvXa4Tee8+dRHyqAezOrcis2S0LKdxY/6o=; b=XoU42eWrLPr62gU3IAalyBRfkqlnEUhs/3A4jO0H3LB+xfbcpaUMh/y3tIOcscSpf3 wlcUvJi0mFbxhy9bmO+8IfnasoDMXAPN2oXsTzB6dbtJSuXV+5dvzT7LUxzZQw/iuP1b iw2Ep8hQj7w8RFoUrEYPIfAGxsa2w7yVJkf2E8yb/mEAVwQk1/H3iTlsiY0bCplafg8t ckIHal6MC2nuthdrwtqfvVPZA/I77J5oqK+qhJUwz1JEZScIiS4MLjjl3wUP56f0f3ew Vv1EW/lbUqjKPhtyhjhPaf1g6ww7U/98YxvT17ajFLqT/A0ffyqrH4osjnRFe6ItfFV6 Qafg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to; bh=14icftTA0jvXa4Tee8+dRHyqAezOrcis2S0LKdxY/6o=; b=qDDz9L233u1DLgw0nmBGTryEmY8Arn15vy1RWUCRRNX465yGFN78UtNhLmloCJ2mlj 5SRj2z6K7AmmPLHgDbPTFr/F6aOxIPUsqrxvgHH0L8I/xvGIY+M/B2/dDPvcQPLVWMCb wLBIpKiIGe+txnxkrqH+KjVamQxHN6aVfPjRsdvsQ7LxBU0LAQPPi8KIqhlzeNi2ct5W f8rNvsbNoJ1b/Yy/i6IG19riYMoXAQdITmwcK+n3JefUaeFmGPggqdrOLb1ghcdD2OIy f96fqrinyG258hD65HfdqJNgxMEDcjxEugMaL2cXEBxhgyPqsb1zszooFFPqpVHSszFF fxOw== X-Gm-Message-State: AIkVDXKAJr8wRHYX1uaFZcApaBc1c8nTbgmgWu6vbskCpSPpHzYKgtB5UME4XUOR+qIj8vUL X-Received: by 10.223.136.109 with SMTP id e42mr14838414wre.14.1486481459804; Tue, 07 Feb 2017 07:30:59 -0800 (PST) Received: from [10.10.1.58] ([185.97.61.26]) by smtp.gmail.com with ESMTPSA id q12sm19388238wmd.8.2017.02.07.07.30.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Feb 2017 07:30:59 -0800 (PST) Subject: Re: svn commit: r313260 - head/sys/kern To: Mateusz Guzik , Alexey Dokuchaev References: <201702050140.v151eRXX090326@repo.freebsd.org> <42c790bb-df12-2a50-6181-24bac5c72d34@multiplay.co.uk> <20170205030006.GB4375@dft-labs.eu> <20170205151746.GA6841@FreeBSD.org> <20170207145750.GD4772@dft-labs.eu> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mateusz Guzik From: Steven Hartland Message-ID: <8e0f5a4c-16ec-842d-f4f7-32c830f43553@multiplay.co.uk> Date: Tue, 7 Feb 2017 15:30:58 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170207145750.GD4772@dft-labs.eu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-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: Tue, 07 Feb 2017 15:31:02 -0000 On 07/02/2017 14:57, Mateusz Guzik wrote: > On Sun, Feb 05, 2017 at 03:17:46PM +0000, Alexey Dokuchaev wrote: >> On Sun, Feb 05, 2017 at 04:00:06AM +0100, Mateusz Guzik wrote: >>> For instance, plugging an unused variable, a memory leak, doing a >>> lockless check first etc. are all pretty standard and unless there is >>> something unusual going on (e.g. complicated circumstances leading to a >>> leak) there is not much to explain. In particular, I don't see why >>> anyone would explain why leaks are bad on each commit plugging one. >> Right; these (unused variable, resource leaks) usually do not warrant >> elaborate explanation. >> >> [ Some linefeeds below were trimmed for brevity ] >>> The gist is as follows: there are plenty of cases where the kernel wants >>> to atomically replace the value of a particular variable. Sometimes, >>> like in this commit, we want to bump the counter by 1, but only if the >>> current value is not 0. For that we need to read the value, see if it is >>> 0 and if not, try to replace what we read with what we read + 1. We >>> cannot just increment as the value could have changed to 0 in the >>> meantime. >>> But this also means that multiple cpus doing the same operation on the >>> same variable will trip on each other - one will succeed while the rest >>> will have to retry. >>> Prior to this commit, each retry attempt would explicitly re-read the >>> value. This induces cache coherency traffic slowing everyone down. >>> amd64 has the nice property of giving us the value it found eleminating >>> the need to explicitly re-read it. There is similar story on i386 and >>> sparc. >>> Other architectures may also benefit from this, but that I did not >>> benchmark. >>> >>> In short[,] under contention atomic_fcmpset is going to be faster than >>> atomic_cmpset. >>> I did not benchmark this particular change, but a switch of the sort >>> easily gives 10%+ in microbenchmarks on amd64. >>> That said, while one can argue this optimizes the code, it really >>> depessimizes it as something of the sort should have been already >>> employed. >> Given the above, IMHO it's quite far from an obvious or of manpage-lookup >> thing, and thus requires proper explanation in the commit log. >> > If the aformenteiond explanation is necessary, the place for it is in > the man page. There are already several commits with fcmpset and there > will be more to come. I don't see why any of them would convey the > information. > The details of why performance under contention of atomic_fcmpset is better than atomic_cmpset, a manpage would be nice. All I'm suggesting is, while one could guess this may be a performance or possibly a compatibility thing, the reason is not obvious, so a small piece of detail on why the change was done should always be included. For this one something like the following would be nice: Switch fget_unlocked to atomic_fcmpset Improve performance under contention by switching fget_unlocked to use atomic_fcmpset. With small piece of additional information, its clear the reason for the change (why) was to improve performance and anyone who wants more detail on why this would be the case can research it via a manpage or other resources, wouldn't you agree? Regards Steve From owner-svn-src-head@freebsd.org Tue Feb 7 16:01: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 C72B0CD5FC1; Tue, 7 Feb 2017 16:01:08 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 966851351; Tue, 7 Feb 2017 16:01:08 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17G17tH046734; Tue, 7 Feb 2017 16:01:07 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17G17Cd046733; Tue, 7 Feb 2017 16:01:07 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702071601.v17G17Cd046733@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 7 Feb 2017 16:01:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313390 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Tue, 07 Feb 2017 16:01:08 -0000 Author: mjg Date: Tue Feb 7 16:01:07 2017 New Revision: 313390 URL: https://svnweb.freebsd.org/changeset/base/313390 Log: locks: follow up r313386 Unfinished diff was committed by accident. The loop in lock_delay was changed to decrement, but the loop iterator was still incrementing. Modified: head/sys/kern/subr_lock.c Modified: head/sys/kern/subr_lock.c ============================================================================== --- head/sys/kern/subr_lock.c Tue Feb 7 15:16:01 2017 (r313389) +++ head/sys/kern/subr_lock.c Tue Feb 7 16:01:07 2017 (r313390) @@ -128,7 +128,7 @@ lock_delay(struct lock_delay_arg *la) if (__predict_false(la->delay > lc->max)) la->delay = lc->max; - for (i = la->delay; i > 0; i++) + for (i = la->delay; i > 0; i--) cpu_spinwait(); la->spin_cnt += la->delay; From owner-svn-src-head@freebsd.org Tue Feb 7 17:03: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 5332DCD50DF; Tue, 7 Feb 2017 17:03:24 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 203051F16; Tue, 7 Feb 2017 17:03:24 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17H3NnT071986; Tue, 7 Feb 2017 17:03:23 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17H3NBh071984; Tue, 7 Feb 2017 17:03:23 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702071703.v17H3NBh071984@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 7 Feb 2017 17:03:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313391 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Tue, 07 Feb 2017 17:03:24 -0000 Author: mjg Date: Tue Feb 7 17:03:22 2017 New Revision: 313391 URL: https://svnweb.freebsd.org/changeset/base/313391 Log: Bump struct thread alignment to 32. This gives additional bits to use in locking primitives which store the lock thread pointer in the lock value. Discussed with: kib Modified: head/sys/kern/init_main.c head/sys/kern/kern_thread.c Modified: head/sys/kern/init_main.c ============================================================================== --- head/sys/kern/init_main.c Tue Feb 7 16:01:07 2017 (r313390) +++ head/sys/kern/init_main.c Tue Feb 7 17:03:22 2017 (r313391) @@ -99,7 +99,7 @@ void mi_startup(void); /* Should be e static struct session session0; static struct pgrp pgrp0; struct proc proc0; -struct thread0_storage thread0_st __aligned(16); +struct thread0_storage thread0_st __aligned(32); struct vmspace vmspace0; struct proc *initproc; Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Tue Feb 7 16:01:07 2017 (r313390) +++ head/sys/kern/kern_thread.c Tue Feb 7 17:03:22 2017 (r313391) @@ -281,7 +281,7 @@ threadinit(void) thread_zone = uma_zcreate("THREAD", sched_sizeof_thread(), thread_ctor, thread_dtor, thread_init, thread_fini, - 16 - 1, UMA_ZONE_NOFREE); + 32 - 1, UMA_ZONE_NOFREE); tidhashtbl = hashinit(maxproc / 2, M_TIDHASH, &tidhash); rw_init(&tidhash_lock, "tidhash"); } From owner-svn-src-head@freebsd.org Tue Feb 7 17:04: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 6228BCD513C; Tue, 7 Feb 2017 17:04:32 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3CDA6CA; Tue, 7 Feb 2017 17:04:32 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17H4VUx072064; Tue, 7 Feb 2017 17:04:31 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17H4VMH072062; Tue, 7 Feb 2017 17:04:31 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702071704.v17H4VMH072062@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 7 Feb 2017 17:04:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313392 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Tue, 07 Feb 2017 17:04:32 -0000 Author: mjg Date: Tue Feb 7 17:04:31 2017 New Revision: 313392 URL: https://svnweb.freebsd.org/changeset/base/313392 Log: rwlock: implement RW_LOCK_WRITER_RECURSED bit This moves recursion handling out of the inlined wunlock path and in particular saves a read and a branch. Discussed with: Modified: head/sys/kern/kern_rwlock.c head/sys/sys/rwlock.h Modified: head/sys/kern/kern_rwlock.c ============================================================================== --- head/sys/kern/kern_rwlock.c Tue Feb 7 17:03:22 2017 (r313391) +++ head/sys/kern/kern_rwlock.c Tue Feb 7 17:04:31 2017 (r313392) @@ -312,6 +312,7 @@ __rw_try_wlock(volatile uintptr_t *c, co if (rw_wlocked(rw) && (rw->lock_object.lo_flags & LO_RECURSABLE) != 0) { rw->rw_recurse++; + atomic_set_ptr(&rw->rw_lock, RW_LOCK_WRITER_RECURSED); rval = 1; } else rval = atomic_cmpset_acq_ptr(&rw->rw_lock, RW_UNLOCKED, @@ -345,10 +346,8 @@ _rw_wunlock_cookie(volatile uintptr_t *c WITNESS_UNLOCK(&rw->lock_object, LOP_EXCLUSIVE, file, line); LOCK_LOG_LOCK("WUNLOCK", &rw->lock_object, 0, rw->rw_recurse, file, line); - if (rw->rw_recurse) - rw->rw_recurse--; - else - _rw_wunlock_hard(rw, (uintptr_t)curthread, file, line); + + _rw_wunlock_hard(rw, (uintptr_t)curthread, file, line); TD_LOCKS_DEC(curthread); } @@ -802,6 +801,7 @@ __rw_wlock_hard(volatile uintptr_t *c, u ("%s: recursing but non-recursive rw %s @ %s:%d\n", __func__, rw->lock_object.lo_name, file, line)); rw->rw_recurse++; + atomic_set_ptr(&rw->rw_lock, RW_LOCK_WRITER_RECURSED); if (LOCK_LOG_TEST(&rw->lock_object, 0)) CTR2(KTR_LOCK, "%s: %p recursing", __func__, rw); return; @@ -994,12 +994,17 @@ __rw_wunlock_hard(volatile uintptr_t *c, return; rw = rwlock2rw(c); - MPASS(!rw_recursed(rw)); - LOCKSTAT_PROFILE_RELEASE_RWLOCK(rw__release, rw, - LOCKSTAT_WRITER); - if (_rw_write_unlock(rw, tid)) + if (!rw_recursed(rw)) { + LOCKSTAT_PROFILE_RELEASE_RWLOCK(rw__release, rw, + LOCKSTAT_WRITER); + if (_rw_write_unlock(rw, tid)) + return; + } else { + if (--(rw->rw_recurse) == 0) + atomic_clear_ptr(&rw->rw_lock, RW_LOCK_WRITER_RECURSED); return; + } KASSERT(rw->rw_lock & (RW_LOCK_READ_WAITERS | RW_LOCK_WRITE_WAITERS), ("%s: neither of the waiter flags are set", __func__)); Modified: head/sys/sys/rwlock.h ============================================================================== --- head/sys/sys/rwlock.h Tue Feb 7 17:03:22 2017 (r313391) +++ head/sys/sys/rwlock.h Tue Feb 7 17:04:31 2017 (r313392) @@ -58,9 +58,10 @@ #define RW_LOCK_READ_WAITERS 0x02 #define RW_LOCK_WRITE_WAITERS 0x04 #define RW_LOCK_WRITE_SPINNER 0x08 +#define RW_LOCK_WRITER_RECURSED 0x10 #define RW_LOCK_FLAGMASK \ (RW_LOCK_READ | RW_LOCK_READ_WAITERS | RW_LOCK_WRITE_WAITERS | \ - RW_LOCK_WRITE_SPINNER) + RW_LOCK_WRITE_SPINNER | RW_LOCK_WRITER_RECURSED) #define RW_LOCK_WAITERS (RW_LOCK_READ_WAITERS | RW_LOCK_WRITE_WAITERS) #define RW_OWNER(x) ((x) & ~RW_LOCK_FLAGMASK) @@ -111,13 +112,9 @@ #define __rw_wunlock(rw, tid, file, line) do { \ uintptr_t _tid = (uintptr_t)(tid); \ \ - if ((rw)->rw_recurse) \ - (rw)->rw_recurse--; \ - else { \ - if (__predict_false(LOCKSTAT_PROFILE_ENABLED(rw__release) ||\ - !_rw_write_unlock((rw), _tid))) \ - _rw_wunlock_hard((rw), _tid, (file), (line)); \ - } \ + if (__predict_false(LOCKSTAT_PROFILE_ENABLED(rw__release) || \ + !_rw_write_unlock((rw), _tid))) \ + _rw_wunlock_hard((rw), _tid, (file), (line)); \ } while (0) /* From owner-svn-src-head@freebsd.org Tue Feb 7 17:15: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 8BF4CCD54C3; Tue, 7 Feb 2017 17:15:14 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58BA4D1A; Tue, 7 Feb 2017 17:15:14 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17HFDoY076336; Tue, 7 Feb 2017 17:15:13 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17HFDKB076335; Tue, 7 Feb 2017 17:15:13 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201702071715.v17HFDKB076335@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 7 Feb 2017 17:15:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313393 - head/sys/modules/dtb/allwinner X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Tue, 07 Feb 2017 17:15:14 -0000 Author: manu Date: Tue Feb 7 17:15:13 2017 New Revision: 313393 URL: https://svnweb.freebsd.org/changeset/base/313393 Log: Switch to the Linux device tree upstream names for Allwinner boards. Newer u-boot that uses the u-boot-master port uses these names. Modified: head/sys/modules/dtb/allwinner/Makefile Modified: head/sys/modules/dtb/allwinner/Makefile ============================================================================== --- head/sys/modules/dtb/allwinner/Makefile Tue Feb 7 17:04:31 2017 (r313392) +++ head/sys/modules/dtb/allwinner/Makefile Tue Feb 7 17:15:13 2017 (r313393) @@ -1,17 +1,26 @@ # $FreeBSD$ # All the dts files for allwinner systems we support. DTS= \ - bananapi.dts \ - bananapim2.dts \ - cubieboard.dts \ - cubieboard2.dts \ nanopi-neo.dts \ - olimex-a20-som-evb.dts \ - olinuxino-lime.dts \ orangepi-plus-2e.dts \ - pcduino3.dts \ sinovoip-bpi-m3.dts \ + sun4i-a10-cubieboard.dts \ + sun4i-a10-olinuxino-lime.dts \ + sun6i-a31s-sinovoip-bpi-m2.dts \ sun5i-a13-olinuxino.dts \ - sun5i-r8-chip.dts + sun5i-r8-chip.dts \ + sun7i-a20-bananapi.dts \ + sun7i-a20-cubieboard2.dts \ + sun7i-a20-olimex-som-evb.dts \ + sun7i-a20-pcduino3.dts + +LINKS= \ + ${DTBDIR}/sun4i-a10-cubieboard.dtb ${DTBDIR}/cubieboard.dtb \ + ${DTBDIR}/sun4i-a10-olinuxino-lime.dtb ${DTBDIR}/olinuxino-lime.dtb \ + ${DTBDIR}/sun6i-a31s-sinovoip-bpi-m2.dtb ${DTBDIR}/bananapim2.dtb \ + ${DTBDIR}/sun7i-a20-bananapi.dtb ${DTBDIR}/bananapi.dtb \ + ${DTBDIR}/sun7i-a20-cubieboard2.dtb ${DTBDIR}/cubieboard2.dtb \ + ${DTBDIR}/sun7i-a20-olimex-som-evb.dtb ${DTBDIR}/olimex-a20-som-evb.dtb \ + ${DTBDIR}/sun7i-a20-pcduino3.dtb ${DTBDIR}/pcduino3.dtb .include From owner-svn-src-head@freebsd.org Tue Feb 7 17:31: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 65DB9CD586A; Tue, 7 Feb 2017 17:31:25 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3570E16C8; Tue, 7 Feb 2017 17:31:25 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17HVOgu081968; Tue, 7 Feb 2017 17:31:24 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17HVOtQ081967; Tue, 7 Feb 2017 17:31:24 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201702071731.v17HVOtQ081967@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 7 Feb 2017 17:31:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313394 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Tue, 07 Feb 2017 17:31:25 -0000 Author: manu Date: Tue Feb 7 17:31:24 2017 New Revision: 313394 URL: https://svnweb.freebsd.org/changeset/base/313394 Log: subr_sfbus.c need sys/proc.h for struct thread definition. This fixes kernel build for armv6. Discussed with: kib Modified: head/sys/kern/subr_sfbuf.c Modified: head/sys/kern/subr_sfbuf.c ============================================================================== --- head/sys/kern/subr_sfbuf.c Tue Feb 7 17:15:13 2017 (r313393) +++ head/sys/kern/subr_sfbuf.c Tue Feb 7 17:31:24 2017 (r313394) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include From owner-svn-src-head@freebsd.org Tue Feb 7 17:41: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 CAA33CD5C9B; Tue, 7 Feb 2017 17:41:00 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A8871D9D; Tue, 7 Feb 2017 17:41:00 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17HexeV084683; Tue, 7 Feb 2017 17:40:59 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17HexVp084681; Tue, 7 Feb 2017 17:40:59 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201702071740.v17HexVp084681@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 7 Feb 2017 17:40:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313395 - head/tests/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Tue, 07 Feb 2017 17:41:00 -0000 Author: asomers Date: Tue Feb 7 17:40:59 2017 New Revision: 313395 URL: https://svnweb.freebsd.org/changeset/base/313395 Log: Add fibs_test:udp_dontroute6, another IPv6 multi-FIB test PR: 196361 MFC after: 3 weeks Sponsored by: Spectra Logic Corp Modified: head/tests/sys/netinet/fibs_test.sh head/tests/sys/netinet/udp_dontroute.c Modified: head/tests/sys/netinet/fibs_test.sh ============================================================================== --- head/tests/sys/netinet/fibs_test.sh Tue Feb 7 17:31:24 2017 (r313394) +++ head/tests/sys/netinet/fibs_test.sh Tue Feb 7 17:40:59 2017 (r313395) @@ -595,6 +595,61 @@ udp_dontroute_cleanup() cleanup_tap } +atf_test_case udp_dontroute6 cleanup +udp_dontroute6_head() +{ + atf_set "descr" "Source address selection for UDP IPv6 packets with SO_DONTROUTE on non-default FIBs works" + atf_set "require.user" "root" + atf_set "require.config" "fibs" +} + +udp_dontroute6_body() +{ + # Configure the TAP interface to use an RFC3849 nonrouteable address + # and a non-default fib + ADDR0="2001:db8::2" + ADDR1="2001:db8::3" + SUBNET="2001:db8::" + MASK="64" + # Use a different IP on the same subnet as the target + TARGET="2001:db8::100" + SRCDIR=`atf_get_srcdir` + + atf_expect_fail "PR196361 IPv6 network routes don't respect net.add_addr_allfibs=0" + + # Check system configuration + if [ 0 != `sysctl -n net.add_addr_allfibs` ]; then + atf_skip "This test requires net.add_addr_allfibs=0" + fi + get_fibs 2 + + # Configure the TAP interfaces. Use no_dad so the addresses will be + # ready right away and won't be marked as tentative until DAD + # completes. + setup_tap ${FIB0} inet6 ${ADDR0} ${MASK} no_dad + TARGET_TAP=${TAP} + setup_tap ${FIB1} inet6 ${ADDR1} ${MASK} no_dad + + # Send a UDP packet with SO_DONTROUTE. In the failure case, it will + # return ENETUNREACH, or send the packet to the wrong tap + atf_check -o ignore setfib ${FIB0} \ + ${SRCDIR}/udp_dontroute -6 ${TARGET} /dev/${TARGET_TAP} + cleanup_tap + + # Repeat, but this time target the other tap + setup_tap ${FIB0} inet6 ${ADDR0} ${MASK} no_dad + setup_tap ${FIB1} inet6 ${ADDR1} ${MASK} no_dad + TARGET_TAP=${TAP} + + atf_check -o ignore setfib ${FIB1} \ + ${SRCDIR}/udp_dontroute -6 ${TARGET} /dev/${TARGET_TAP} +} + +udp_dontroute6_cleanup() +{ + cleanup_tap +} + atf_init_test_cases() { @@ -609,6 +664,7 @@ atf_init_test_cases() atf_add_test_case subnet_route_with_multiple_fibs_on_same_subnet atf_add_test_case subnet_route_with_multiple_fibs_on_same_subnet_inet6 atf_add_test_case udp_dontroute + atf_add_test_case udp_dontroute6 } # Looks up one or more fibs from the configuration data and validates them. @@ -656,6 +712,7 @@ get_tap() # Protocol (inet or inet6) # IP address # Netmask in number of bits (eg 24 or 8) +# Extra flags # Return: the tap interface name as the env variable TAP setup_tap() { @@ -663,9 +720,10 @@ setup_tap() local PROTO=$2 local ADDR=$3 local MASK=$4 + local FLAGS=$5 get_tap - echo setfib ${FIB} ifconfig $TAP ${PROTO} ${ADDR}/${MASK} fib $FIB - setfib ${FIB} ifconfig $TAP ${PROTO} ${ADDR}/${MASK} fib $FIB + echo setfib ${FIB} ifconfig $TAP ${PROTO} ${ADDR}/${MASK} fib $FIB $FLAGS + setfib ${FIB} ifconfig $TAP ${PROTO} ${ADDR}/${MASK} fib $FIB $FLAGS } cleanup_tap() Modified: head/tests/sys/netinet/udp_dontroute.c ============================================================================== --- head/tests/sys/netinet/udp_dontroute.c Tue Feb 7 17:31:24 2017 (r313394) +++ head/tests/sys/netinet/udp_dontroute.c Tue Feb 7 17:40:59 2017 (r313395) @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -52,7 +53,7 @@ int main(int argc, char **argv) { - struct sockaddr_in dst; + struct sockaddr_storage dst; int s, t; int opt; int ret; @@ -60,17 +61,33 @@ main(int argc, char **argv) const char* sendbuf = "Hello, World!"; const size_t buflen = 80; char recvbuf[buflen]; - - if (argc != 3) { - fprintf(stderr, "Usage: %s ip_address tapdev\n", argv[0]); + bool v6 = false; + const char *addr, *tapdev; + const uint16_t port = 46120; + + bzero(&dst, sizeof(dst)); + if (argc < 3 || argc > 4) { + fprintf(stderr, "Usage: %s [-6] ip_address tapdev\n", argv[0]); exit(2); } - t = open(argv[2], O_RDWR | O_NONBLOCK); + if (strcmp("-6", argv[1]) == 0) { + v6 = true; + addr = argv[2]; + tapdev = argv[3]; + } else { + addr = argv[1]; + tapdev = argv[2]; + } + + t = open(tapdev, O_RDWR | O_NONBLOCK); if (t < 0) err(EXIT_FAILURE, "open"); - s = socket(PF_INET, SOCK_DGRAM, 0); + if (v6) + s = socket(PF_INET6, SOCK_DGRAM, 0); + else + s = socket(PF_INET, SOCK_DGRAM, 0); if (s < 0) err(EXIT_FAILURE, "socket"); opt = 1; @@ -79,16 +96,26 @@ main(int argc, char **argv) if (ret == -1) err(EXIT_FAILURE, "setsockopt(SO_DONTROUTE)"); - dst.sin_len = sizeof(dst); - dst.sin_family = AF_INET; - dst.sin_port = htons(46120); - dst.sin_addr.s_addr = inet_addr(argv[1]); - if (dst.sin_addr.s_addr == htonl(INADDR_NONE)) { - fprintf(stderr, "Invalid address: %s\n", argv[1]); - exit(2); + if (v6) { + struct sockaddr_in6 *dst6 = ((struct sockaddr_in6*)&dst); + + dst.ss_len = sizeof(struct sockaddr_in6); + dst.ss_family = AF_INET6; + dst6->sin6_port = htons(port); + ret = inet_pton(AF_INET6, addr, &dst6->sin6_addr); + } else { + struct sockaddr_in *dst4 = ((struct sockaddr_in*)&dst); + + dst.ss_len = sizeof(struct sockaddr_in); + dst.ss_family = AF_INET; + dst4->sin_port = htons(port); + ret = inet_pton(AF_INET, addr, &dst4->sin_addr); } + if (ret != 1) + err(EXIT_FAILURE, "inet_pton returned %d", ret); + ret = sendto(s, sendbuf, strlen(sendbuf), 0, (struct sockaddr*)&dst, - dst.sin_len); + dst.ss_len); if (ret == -1) err(EXIT_FAILURE, "sendto"); From owner-svn-src-head@freebsd.org Tue Feb 7 17:58: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 11117CD5FDE; Tue, 7 Feb 2017 17:58:38 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6D69BD8; Tue, 7 Feb 2017 17:58:37 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 02EBA10A791; Tue, 7 Feb 2017 12:58:37 -0500 (EST) From: John Baldwin To: Edward Tomasz Napierala Cc: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313352 - in head/sys: compat/cloudabi compat/freebsd32 compat/linux vm Date: Tue, 07 Feb 2017 09:55:25 -0800 Message-ID: <3460210.7qRYCLqZx1@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <20170207125508.GA62670@brick> References: <201702062057.v16KvCtI069664@repo.freebsd.org> <20170207083909.GX2092@kib.kiev.ua> <20170207125508.GA62670@brick> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Tue, 07 Feb 2017 12:58:37 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-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: Tue, 07 Feb 2017 17:58:38 -0000 On Tuesday, February 07, 2017 12:55:08 PM Edward Tomasz Napierala wrote: > On 0207T1039, Konstantin Belousov wrote: > > On Mon, Feb 06, 2017 at 03:03:11PM -0800, John Baldwin wrote: > > > On Monday, February 06, 2017 08:57:12 PM Edward Tomasz Napierala wrote: > > > > Author: trasz > > > > Date: Mon Feb 6 20:57:12 2017 > > > > New Revision: 313352 > > > > URL: https://svnweb.freebsd.org/changeset/base/313352 > > > > > > > > Log: > > > > Add kern_vm_mmap2(), kern_vm_mprotect(), kern_vm_msync(), kern_vm_munlock(), > > > > kern_vm_munmap(), and kern_vm_madvise(), and use them in various compats > > > > instead of their sys_*() counterparts. > > > > > > > > Reviewed by: ed, dchagin, kib > > > > MFC after: 2 weeks > > > > Sponsored by: DARPA, AFRL > > > > Differential Revision: https://reviews.freebsd.org/D9378 > > > > > > I know kib@ suggested kern_vm_ instead of the vm_ you had suggested, > > > but just kern_ would be more consistent. That is what we have done with > > > every other system call. (e.g. there isn't kern_socket_bind, kern_socket_listen, > > > etc., but just kern_bind() and kern_listen()). > > > > Note that the kern_vm_* functions are not quite regular syscall helpers. > > The big issue with them, which caused my suggestion, is that the > > functions cannot be declared in sys/syscallsubr.h, because their > > declarations depend on the vm/*.h namespace. > > Exactly; they use vm-specific types (vm_offset_t, for example). And I > wanted to avoid changing the types all over the place, at least for now. You would only need though right? None of the actual objects are used, just things like vm_prot_t? OTOH, kern_* is currently only used for things that are syscall implementations and generally take syscall arguments directly (or close approximations of syscall arguments). It is annoying to lose the consistency in meaning. -- John Baldwin From owner-svn-src-head@freebsd.org Tue Feb 7 18:19: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 1537CCD56BA; Tue, 7 Feb 2017 18:19:13 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7B0B1878; Tue, 7 Feb 2017 18:19:12 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17IJBYr001386; Tue, 7 Feb 2017 18:19:11 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17IJBMc001382; Tue, 7 Feb 2017 18:19:11 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201702071819.v17IJBMc001382@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 7 Feb 2017 18:19:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313396 - in head/sys/arm64: arm64 include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Tue, 07 Feb 2017 18:19:13 -0000 Author: andrew Date: Tue Feb 7 18:19:11 2017 New Revision: 313396 URL: https://svnweb.freebsd.org/changeset/base/313396 Log: Push reading of ESR_EL1 to assembly. Among other uses this will allow us to expose this to signal handlers, e.g. for the clang sanitizers. Sponsored by: DARPA, AFRL Modified: head/sys/arm64/arm64/exception.S head/sys/arm64/arm64/genassym.c head/sys/arm64/arm64/trap.c head/sys/arm64/include/frame.h Modified: head/sys/arm64/arm64/exception.S ============================================================================== --- head/sys/arm64/arm64/exception.S Tue Feb 7 17:40:59 2017 (r313395) +++ head/sys/arm64/arm64/exception.S Tue Feb 7 18:19:11 2017 (r313396) @@ -56,10 +56,12 @@ __FBSDID("$FreeBSD$"); stp x0, x1, [sp, #(TF_X + 0 * 8)] mrs x10, elr_el1 mrs x11, spsr_el1 + mrs x12, esr_el1 .if \el == 0 mrs x18, sp_el0 .endif - stp x10, x11, [sp, #(TF_ELR)] + str x10, [sp, #(TF_ELR)] + stp w11, w12, [sp, #(TF_SPSR)] stp x18, lr, [sp, #(TF_SP)] mrs x18, tpidr_el1 add x29, sp, #(TF_SIZE) Modified: head/sys/arm64/arm64/genassym.c ============================================================================== --- head/sys/arm64/arm64/genassym.c Tue Feb 7 17:40:59 2017 (r313395) +++ head/sys/arm64/arm64/genassym.c Tue Feb 7 18:19:11 2017 (r313396) @@ -62,4 +62,5 @@ ASSYM(TD_LOCK, offsetof(struct thread, t ASSYM(TF_SIZE, sizeof(struct trapframe)); ASSYM(TF_SP, offsetof(struct trapframe, tf_sp)); ASSYM(TF_ELR, offsetof(struct trapframe, tf_elr)); +ASSYM(TF_SPSR, offsetof(struct trapframe, tf_spsr)); ASSYM(TF_X, offsetof(struct trapframe, tf_x)); Modified: head/sys/arm64/arm64/trap.c ============================================================================== --- head/sys/arm64/arm64/trap.c Tue Feb 7 17:40:59 2017 (r313395) +++ head/sys/arm64/arm64/trap.c Tue Feb 7 18:19:11 2017 (r313396) @@ -257,7 +257,7 @@ print_registers(struct trapframe *frame) printf(" sp: %16lx\n", frame->tf_sp); printf(" lr: %16lx\n", frame->tf_lr); printf(" elr: %16lx\n", frame->tf_elr); - printf("spsr: %16lx\n", frame->tf_spsr); + printf("spsr: %8x\n", frame->tf_spsr); } void @@ -267,7 +267,7 @@ do_el1h_sync(struct trapframe *frame) uint64_t esr, far; /* Read the esr register to get the exception details */ - esr = READ_SPECIALREG(esr_el1); + esr = frame->tf_esr; exception = ESR_ELx_EXCEPTION(esr); #ifdef KDTRACE_HOOKS @@ -352,7 +352,7 @@ do_el0_sync(struct trapframe *frame) td = curthread; td->td_frame = frame; - esr = READ_SPECIALREG(esr_el1); + esr = frame->tf_esr; exception = ESR_ELx_EXCEPTION(esr); switch (exception) { case EXCP_UNKNOWN: Modified: head/sys/arm64/include/frame.h ============================================================================== --- head/sys/arm64/include/frame.h Tue Feb 7 17:40:59 2017 (r313395) +++ head/sys/arm64/include/frame.h Tue Feb 7 18:19:11 2017 (r313396) @@ -45,7 +45,8 @@ struct trapframe { uint64_t tf_sp; uint64_t tf_lr; uint64_t tf_elr; - uint64_t tf_spsr; + uint32_t tf_spsr; + uint32_t tf_esr; uint64_t tf_x[30]; }; From owner-svn-src-head@freebsd.org Tue Feb 7 18:23: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 EC66ECD58F0; Tue, 7 Feb 2017 18:23:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B9A3A1E28; Tue, 7 Feb 2017 18:23:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17INil7005237; Tue, 7 Feb 2017 18:23:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17INiut005236; Tue, 7 Feb 2017 18:23:44 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702071823.v17INiut005236@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 7 Feb 2017 18:23:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313397 - head/usr.bin/sed/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Tue, 07 Feb 2017 18:23:46 -0000 Author: ngie Date: Tue Feb 7 18:23:44 2017 New Revision: 313397 URL: https://svnweb.freebsd.org/changeset/base/313397 Log: Don't expect :inplace_symlink_src to fail anymore (post-r313277) The S_ISREG check was restored, such that the code will again fail with in-place replacements on symlinks MFC after: 12 days X-MFC with: r313277 Sponsored by: Dell EMC Isilon Modified: head/usr.bin/sed/tests/sed2_test.sh Modified: head/usr.bin/sed/tests/sed2_test.sh ============================================================================== --- head/usr.bin/sed/tests/sed2_test.sh Tue Feb 7 18:19:11 2017 (r313396) +++ head/usr.bin/sed/tests/sed2_test.sh Tue Feb 7 18:23:44 2017 (r313397) @@ -47,8 +47,6 @@ inplace_symlink_src_head() } inplace_symlink_src_body() { - atf_expect_fail "Check for S_IFREG reverted in r312404" - echo foo > a atf_check ln -s a b atf_check -e not-empty -s not-exit:0 sed -i '' -e 's,foo,bar,g' b From owner-svn-src-head@freebsd.org Tue Feb 7 18:29: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 E4807CD59D6; Tue, 7 Feb 2017 18:29:38 +0000 (UTC) (envelope-from alc@rice.edu) Received: from pp1.rice.edu (proofpoint1.mail.rice.edu [128.42.201.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE1E5188; Tue, 7 Feb 2017 18:29:37 +0000 (UTC) (envelope-from alc@rice.edu) Received: from pps.filterd (pp1.rice.edu [127.0.0.1]) by pp1.rice.edu (8.16.0.17/8.16.0.17) with SMTP id v17ID4K2011489; Tue, 7 Feb 2017 12:29:36 -0600 Received: from mh1.mail.rice.edu (mh1.mail.rice.edu [128.42.201.20]) by pp1.rice.edu with ESMTP id 28fkarr0ep-1; Tue, 07 Feb 2017 12:29:36 -0600 X-Virus-Scanned: by amavis-2.7.0 at mh1.mail.rice.edu, auth channel Received: from 108-254-203-201.lightspeed.hstntx.sbcglobal.net (108-254-203-201.lightspeed.hstntx.sbcglobal.net [108.254.203.201]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh1.mail.rice.edu (Postfix) with ESMTPSA id C0157460E80; Tue, 7 Feb 2017 12:29:35 -0600 (CST) Subject: Re: svn commit: r313352 - in head/sys: compat/cloudabi compat/freebsd32 compat/linux vm To: John Baldwin , Edward Tomasz Napierala References: <201702062057.v16KvCtI069664@repo.freebsd.org> <20170207083909.GX2092@kib.kiev.ua> <20170207125508.GA62670@brick> <3460210.7qRYCLqZx1@ralph.baldwin.cx> Cc: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Alan Cox Message-ID: <98dce77f-b581-93fe-d2d6-ca1e27cd6a95@rice.edu> Date: Tue, 7 Feb 2017 12:29:35 -0600 User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <3460210.7qRYCLqZx1@ralph.baldwin.cx> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=3 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1611190142 X-BeenThere: svn-src-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: Tue, 07 Feb 2017 18:29:39 -0000 On 02/07/2017 11:55, John Baldwin wrote: > On Tuesday, February 07, 2017 12:55:08 PM Edward Tomasz Napierala wrote: >> On 0207T1039, Konstantin Belousov wrote: >>> On Mon, Feb 06, 2017 at 03:03:11PM -0800, John Baldwin wrote: >>>> On Monday, February 06, 2017 08:57:12 PM Edward Tomasz Napierala wrote: >>>>> Author: trasz >>>>> Date: Mon Feb 6 20:57:12 2017 >>>>> New Revision: 313352 >>>>> URL: https://svnweb.freebsd.org/changeset/base/313352 >>>>> >>>>> Log: >>>>> Add kern_vm_mmap2(), kern_vm_mprotect(), kern_vm_msync(), kern_vm_munlock(), >>>>> kern_vm_munmap(), and kern_vm_madvise(), and use them in various compats >>>>> instead of their sys_*() counterparts. >>>>> >>>>> Reviewed by: ed, dchagin, kib >>>>> MFC after: 2 weeks >>>>> Sponsored by: DARPA, AFRL >>>>> Differential Revision: https://reviews.freebsd.org/D9378 >>>> I know kib@ suggested kern_vm_ instead of the vm_ you had suggested, >>>> but just kern_ would be more consistent. That is what we have done with >>>> every other system call. (e.g. there isn't kern_socket_bind, kern_socket_listen, >>>> etc., but just kern_bind() and kern_listen()). >>> Note that the kern_vm_* functions are not quite regular syscall helpers. >>> The big issue with them, which caused my suggestion, is that the >>> functions cannot be declared in sys/syscallsubr.h, because their >>> declarations depend on the vm/*.h namespace. >> Exactly; they use vm-specific types (vm_offset_t, for example). And I >> wanted to avoid changing the types all over the place, at least for now. > You would only need though right? None of the actual objects > are used, just things like vm_prot_t? > > OTOH, kern_* is currently only used for things that are syscall implementations > and generally take syscall arguments directly (or close approximations of > syscall arguments). It is annoying to lose the consistency in meaning. > I tend to agree with John. Why not use the same types for the kern_* parameters as are used in the corresponding args structure? Let the conversion to the Mach VM types happen inside of the function's implementation. From owner-svn-src-head@freebsd.org Tue Feb 7 18:37: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 F24FCCD5CE3; Tue, 7 Feb 2017 18:37:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF6FBAED; Tue, 7 Feb 2017 18:37:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17Ibk6a009906; Tue, 7 Feb 2017 18:37:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17Ibkhn009905; Tue, 7 Feb 2017 18:37:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702071837.v17Ibkhn009905@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 7 Feb 2017 18:37:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313398 - head/contrib/byacc/test/yacc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Tue, 07 Feb 2017 18:37:48 -0000 Author: ngie Date: Tue Feb 7 18:37:46 2017 New Revision: 313398 URL: https://svnweb.freebsd.org/changeset/base/313398 Log: Apply r274475's to expr.oxout.tab.c to fix the test on FreeBSD YYINT on FreeBSD is int, not short I'll work with the upstream maintainer or come up with a build method of modifying their definitions on install instead of having to modify tests to match our forked YYINT definition. PR: 216891 Sponsored by: Dell EMC Isilon Modified: head/contrib/byacc/test/yacc/expr.oxout.tab.c Modified: head/contrib/byacc/test/yacc/expr.oxout.tab.c ============================================================================== --- head/contrib/byacc/test/yacc/expr.oxout.tab.c Tue Feb 7 18:23:44 2017 (r313397) +++ head/contrib/byacc/test/yacc/expr.oxout.tab.c Tue Feb 7 18:37:46 2017 (r313398) @@ -178,7 +178,7 @@ extern int YYPARSE_DECL(); #define ID 257 #define CONST 258 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT expr.oxout_lhs[] = { -1, 2, 0, 1, 3, 3, 3, 3, 3, 3, 3, }; From owner-svn-src-head@freebsd.org Tue Feb 7 18:40: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 ACD5CCD5E46; Tue, 7 Feb 2017 18:40:22 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x242.google.com (mail-pf0-x242.google.com [IPv6:2607:f8b0:400e:c00::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 79EC4E6F; Tue, 7 Feb 2017 18:40:22 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x242.google.com with SMTP id f144so9820994pfa.2; Tue, 07 Feb 2017 10:40:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=mX28dMMaEXBGZ0hwVPu6g59mryGWJjsN6pdTY5dbuts=; b=PvAc07XR34Do8q2rfUi3XRnByxhCMDcEryEzr6X5LNq/zleJexGDyC0PI0l9mx0RmB CQSAULCdKJbhUrupso2PXDAWUOHgKN+xMqz5hZBvRVkMD8V8jSVcDAmi5zESVNEM6u5q L8SIxH+re+V1L70SwDvwV3G2uR4fMdeuWMQ1xyLp2Hq+WThdlgzg/DsluyN33cllfLMf 16Z1eHGIswDzciw3a0YH+42N7IP/aBB2L2G0gpfhZC6jsU7VZdDtTJ/Pw8p5As2lDjad 2cOeuXh6cWywDKXtMzULUAfe92aOBYfjhXb6XJTRWZylxd78ibbRRYT2X3XfOps6SdFz AmyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=mX28dMMaEXBGZ0hwVPu6g59mryGWJjsN6pdTY5dbuts=; b=JrAITqQl/UnN/hcPi9SatMlR+8BvUb9GwRz3TZwO2H94jbYxGzl4/9SCz0Agmt8kBo gptPe2RdM2fkpRo55Q4/Yv9eCT8fPOYpE3cUmMoEn0cspiIKwPEiM4dYMK61Fyj0C6mN gGpTyHGc6mDpGDVPis9k1B6uiJXCk0QU/ZNMkgIkoEUoRmVQRSs8GucDZppjMHPrWf4C pBRDv4T3qI8RmdRXTLTAT1VpRBv2Kz2r0NKwCRideQ2lDTT8Ukngx+ttu8uk5spBnvK+ oK+6TLrI4V6HDEyZpKU51TEGt03FV40n7VlJx3c5oonh/QfrYziwfuo9+x0P6yW1M8tI /yzA== X-Gm-Message-State: AIkVDXKnetWpCmMAciOlxYirGiSw2/Ies/OMXPPWYvO8C4o1gCsOtqBMmIODEMvsH3Hyng== X-Received: by 10.98.37.132 with SMTP id l126mr21631806pfl.45.1486492821845; Tue, 07 Feb 2017 10:40:21 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id 21sm13389146pfy.4.2017.02.07.10.40.20 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 07 Feb 2017 10:40:21 -0800 (PST) Subject: Re: svn commit: r313398 - head/contrib/byacc/test/yacc Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_E3CD9BA6-33E9-4871-A610-698427ED723C"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201702071837.v17Ibkhn009905@repo.freebsd.org> Date: Tue, 7 Feb 2017 10:40:19 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Jung-uk Kim Message-Id: <25E886E6-970E-43C7-9654-CB380E2C84F6@gmail.com> References: <201702071837.v17Ibkhn009905@repo.freebsd.org> To: Ngie Cooper X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-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: Tue, 07 Feb 2017 18:40:22 -0000 --Apple-Mail=_E3CD9BA6-33E9-4871-A610-698427ED723C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Feb 7, 2017, at 10:37, Ngie Cooper wrote: >=20 > Author: ngie > Date: Tue Feb 7 18:37:46 2017 > New Revision: 313398 > URL: https://svnweb.freebsd.org/changeset/base/313398 >=20 > Log: > Apply r274475's to expr.oxout.tab.c to fix the test on FreeBSD >=20 > YYINT on FreeBSD is int, not short >=20 > I'll work with the upstream maintainer or come up with a build > method of modifying their definitions on install instead of > having to modify tests to match our forked YYINT definition. >=20 > PR: 216891 > Sponsored by: Dell EMC Isilon I forgot to mention=E2=80=A6 "X-MFC with: r313105, = r313106=E2=80=9D. An MFC timer was never set for those changes, so I didn=E2=80=99t = set a timer in my change either, but if those changes are backported, I = can backport this one as well. Thanks, -Ngie --Apple-Mail=_E3CD9BA6-33E9-4871-A610-698427ED723C Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYmhSTAAoJEPWDqSZpMIYVvGQQAKGqeopJT/W5Z7OAvgLIGd1d 1kMbVfopBsqiER1lIgi3efmRA1skNL+0IlDTTGAVRzHu1f8UXKYAS6Q3xmtWTqXm 2hZQ0M9o5yDtc4ZBsPk0efUUi6cDjmRqkoc57lF6PasS90Zt6PP1I8kmK4nANxBo 5J3bE8DG04K9DPGfnLHwHTA2FI5ke2hlJbAzaTGRxxeVtg0QYaeOJqWQvpu7fLGn fRWlO2XG7IkC4+J1/pJmT2grFYJxvO3O9wbuS4qUCaMi32gLLfza+UUhkcSo4FYr da0z/st67cHXZKaDqY2875XUtuTYl1xWa3fsZHa2yBPzkufYjvxfX/0LTFeTe+8/ RZqcHPiRvTrxjsNAfFYmRQjiF14n64n1bvYIYhCt8AAul0k0YePOTLi/w+CH79+z V0dODXLcjbpOLzumKKsEIw/gRVlK48U1AKYp6G8NB/J0BTApjBH/lOG+vQEMAfs/ k02tLYjI6NFESRXf0qoLaVyo6JJpxV+7lgsh6QOGNfrdqDBzjvl2QEG1H6TUzFFO Ku+shFpq4yOrTS9wNZeyrLRcN1BoL8EG50CArK6HLPnIS4f5BqnzPr3GcKINSBE4 0OYKfRmRtVL6ZlFEPjuRxJ8qr3IQj8JPDhxIF8BiHkN2xk8W9eAv1yUC8ha9iFAa 2QqUTusLws7WrOcPlDO2 =jZmN -----END PGP SIGNATURE----- --Apple-Mail=_E3CD9BA6-33E9-4871-A610-698427ED723C-- From owner-svn-src-head@freebsd.org Tue Feb 7 18:46: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 3AF8ECD415B; Tue, 7 Feb 2017 18:46:16 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) by mx1.freebsd.org (Postfix) with ESMTP id A30A4146A; Tue, 7 Feb 2017 18:46:15 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Subject: Re: svn commit: r313398 - head/contrib/byacc/test/yacc To: "Ngie Cooper (yaneurabeya)" , Ngie Cooper References: <201702071837.v17Ibkhn009905@repo.freebsd.org> <25E886E6-970E-43C7-9654-CB380E2C84F6@gmail.com> Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Jung-uk Kim Message-ID: Date: Tue, 7 Feb 2017 13:46:15 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <25E886E6-970E-43C7-9654-CB380E2C84F6@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Tue, 07 Feb 2017 18:46:16 -0000 On 02/07/2017 13:40, Ngie Cooper (yaneurabeya) wrote: > >> On Feb 7, 2017, at 10:37, Ngie Cooper wrote: >> >> Author: ngie >> Date: Tue Feb 7 18:37:46 2017 >> New Revision: 313398 >> URL: https://svnweb.freebsd.org/changeset/base/313398 >> >> Log: >> Apply r274475's to expr.oxout.tab.c to fix the test on FreeBSD >> >> YYINT on FreeBSD is int, not short >> >> I'll work with the upstream maintainer or come up with a build >> method of modifying their definitions on install instead of >> having to modify tests to match our forked YYINT definition. >> >> PR: 216891 >> Sponsored by: Dell EMC Isilon > > I forgot to mention… "X-MFC with: r313105, r313106”. > An MFC timer was never set for those changes, so I didn’t set a timer in my change either, but if those changes are backported, I can backport this one as well. Thanks and sorry for the break. Jung-uk Kim From owner-svn-src-head@freebsd.org Tue Feb 7 18:57: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 A5324CD449E; Tue, 7 Feb 2017 18:57:58 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74B9A1CA0; Tue, 7 Feb 2017 18:57:58 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17Ivvsd018292; Tue, 7 Feb 2017 18:57:57 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17Ivvn1018291; Tue, 7 Feb 2017 18:57:57 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201702071857.v17Ivvn1018291@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Tue, 7 Feb 2017 18:57:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313401 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Tue, 07 Feb 2017 18:57:58 -0000 Author: vangyzen Date: Tue Feb 7 18:57:57 2017 New Revision: 313401 URL: https://svnweb.freebsd.org/changeset/base/313401 Log: Fix garbage IP addresses in UDP log_in_vain messages If multiple threads emit a UDP log_in_vain message concurrently, the IP addresses could be garbage due to concurrent usage of a single string buffer inside inet_ntoa(). Use inet_ntoa_r() with two stack buffers instead. Reported by: Mark Martinec MFC after: 3 days Relnotes: yes Sponsored by: Dell EMC Modified: head/sys/netinet/udp_usrreq.c Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Tue Feb 7 18:57:52 2017 (r313400) +++ head/sys/netinet/udp_usrreq.c Tue Feb 7 18:57:57 2017 (r313401) @@ -667,13 +667,13 @@ udp_input(struct mbuf **mp, int *offp, i INPLOOKUP_RLOCKPCB, ifp, m); if (inp == NULL) { if (udp_log_in_vain) { - char buf[4*sizeof "123"]; + char src[INET_ADDRSTRLEN]; + char dst[INET_ADDRSTRLEN]; - strcpy(buf, inet_ntoa(ip->ip_dst)); log(LOG_INFO, "Connection attempt to UDP %s:%d from %s:%d\n", - buf, ntohs(uh->uh_dport), inet_ntoa(ip->ip_src), - ntohs(uh->uh_sport)); + inet_ntoa_r(ip->ip_dst, dst), ntohs(uh->uh_dport), + inet_ntoa_r(ip->ip_src, src), ntohs(uh->uh_sport)); } UDPSTAT_INC(udps_noport); if (m->m_flags & (M_BCAST | M_MCAST)) { From owner-svn-src-head@freebsd.org Tue Feb 7 19:11: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 BE0CACD4969; Tue, 7 Feb 2017 19:11:00 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from kif.fubar.geek.nz (kif.fubar.geek.nz [178.62.119.249]) by mx1.freebsd.org (Postfix) with ESMTP id 8D274A57; Tue, 7 Feb 2017 19:11:00 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from zapp (global-5-144.nat-2.net.cam.ac.uk [131.111.5.144]) by kif.fubar.geek.nz (Postfix) with ESMTPSA id 51FB9D8561; Tue, 7 Feb 2017 19:05:27 +0000 (UTC) Date: Tue, 7 Feb 2017 19:10:58 +0000 From: Andrew Turner To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313342 - head/sys/conf Message-ID: <20170207191058.65d72285@zapp> In-Reply-To: <2448004.hnTc9TClBV@ralph.baldwin.cx> References: <201702061441.v16EfYZx010320@repo.freebsd.org> <2448004.hnTc9TClBV@ralph.baldwin.cx> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.29; amd64-portbld-freebsd12.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-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: Tue, 07 Feb 2017 19:11:00 -0000 On Mon, 06 Feb 2017 10:43:09 -0800 John Baldwin wrote: > On Monday, February 06, 2017 02:41:34 PM Andrew Turner wrote: > > Author: andrew > > Date: Mon Feb 6 14:41:34 2017 > > New Revision: 313342 > > URL: https://svnweb.freebsd.org/changeset/base/313342 > > > > Log: > > Only build the ACPI PCI drivers on x86, they are unlikely to be > > used on arm64 without dignificant changes. > > > > Obtained from: ABT Systems Ltd > > Sponsored by: The FreeBSD Foundation > > I still think this is not really the right approach. Nothing about > _BBN, _CRS, or _PRT, etc. is x86-specific. > the main issue is the code assumes a single PCIe root controller, e.g. the pci_cfg* KPI won't work on ThunderX with 6 independent PCIe root controllers. I expect much of the code could be re-enabled on arm64, however for now it's easier to disable it. Andrew From owner-svn-src-head@freebsd.org Tue Feb 7 19:13: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 330DDCD4C6D; Tue, 7 Feb 2017 19:13:39 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x243.google.com (mail-pf0-x243.google.com [IPv6:2607:f8b0:400e:c00::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F38AADF5; Tue, 7 Feb 2017 19:13:38 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x243.google.com with SMTP id f144so9867619pfa.2; Tue, 07 Feb 2017 11:13:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=oH2r635airVb7X3Kk0uBo6ozptNmIwXBaYiBX0ZUhi4=; b=D9o5hnzGyJiYxQ2sYfw4M0DuZYJSVEvIZZDi09d72aykTI2/l30+eiEkdnkmHojvtj W3ElZ5euCjeGmXwJ6oSqpGRuDCoSNtRGaCtSW3zxhPbNq6qFG3zTAa3h55XhReIqbtjm TfG4SKAUlPjicr+CEXjBMTH1V24cm6J0Ij4WKP8KeF4CHisMUi9BTvqch4N3sH4U4UJY o7Ld1mdMnFvgg8eKQs8cokkp8odFRd1cxYdKWTbRMwiOow/nPEG5q2wqSctA+Mw0Rxz4 r5QfOn2Sv5k1IMKp5uX+MSqGZeULZKm5Nw2g5YEE2A6jAj4AAhd0YHxGMHapxBYYDyD+ +pLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=oH2r635airVb7X3Kk0uBo6ozptNmIwXBaYiBX0ZUhi4=; b=ZnYC9sU2pU2ydjtyDrcnCnQXQH33EYYnu7Q6UkBkX9S/gvL1xFoMbirn6n+qfO9Md+ 4Ub5GZxtPPF/2/c6cn8Fi8OU/n5wS2j5wHKbneHgVqOIqMtoIkdup7G1fzQcYo4J+8Kl rv+SYshjR25GWdxila24AWpmD4mQiRjh77p4b9rAkagr3ylI4bsKVQc1OXjvOuGwK2t0 5yhym2n00NxcwEbAtABfPgIRO3Ma57Q+OCxyjpgzLEcHVANNTmMFiuCNQhxuG4z4ncDT UYZMBNT8JVK+wntRbIxY6dqT3WkrN9gug3YWgk0PyS6JMhvsEmZmxfs7VvtzcVAt7ws0 Ktpg== X-Gm-Message-State: AIkVDXJ4Sj8NaXZULXcYfMYPY4LpWEXJR+5vBjEti+Zu7Nk5uq33l17htA06iDvz9vZt6g== X-Received: by 10.84.128.33 with SMTP id 30mr28305839pla.128.1486494818135; Tue, 07 Feb 2017 11:13:38 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id 75sm13389737pfp.80.2017.02.07.11.13.37 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 07 Feb 2017 11:13:37 -0800 (PST) Subject: Re: svn commit: r313398 - head/contrib/byacc/test/yacc Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_4B01CC8E-883A-43F2-A7C5-4A95E5A07B4E"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Tue, 7 Feb 2017 11:13:15 -0800 Cc: Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201702071837.v17Ibkhn009905@repo.freebsd.org> <25E886E6-970E-43C7-9654-CB380E2C84F6@gmail.com> To: Jung-uk Kim X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-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: Tue, 07 Feb 2017 19:13:39 -0000 --Apple-Mail=_4B01CC8E-883A-43F2-A7C5-4A95E5A07B4E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Feb 7, 2017, at 10:46, Jung-uk Kim wrote: >=20 > On 02/07/2017 13:40, Ngie Cooper (yaneurabeya) wrote: >>=20 >>> On Feb 7, 2017, at 10:37, Ngie Cooper wrote: >>>=20 >>> Author: ngie >>> Date: Tue Feb 7 18:37:46 2017 >>> New Revision: 313398 >>> URL: https://svnweb.freebsd.org/changeset/base/313398 >>>=20 >>> Log: >>> Apply r274475's to expr.oxout.tab.c to fix the test on FreeBSD >>>=20 >>> YYINT on FreeBSD is int, not short >>>=20 >>> I'll work with the upstream maintainer or come up with a build >>> method of modifying their definitions on install instead of >>> having to modify tests to match our forked YYINT definition. >>>=20 >>> PR: 216891 >>> Sponsored by: Dell EMC Isilon >>=20 >> I forgot to mention=E2=80=A6 "X-MFC with: r313105, = r313106=E2=80=9D. >> An MFC timer was never set for those changes, so I didn=E2=80=99t = set a timer in my change either, but if those changes are backported, I = can backport this one as well. >=20 > Thanks and sorry for the break. No worries :)=E2=80=A6 I have an idea for how to do this more reliably = in the future without having to hack up the tests. I=E2=80=99ll send = that out for CR sometime this coming week. -Ngie --Apple-Mail=_4B01CC8E-883A-43F2-A7C5-4A95E5A07B4E Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYmhxSAAoJEPWDqSZpMIYVvl8P/iNK1i7IQZtrvujRBotRCUvg o+LLDAmPq6StuPfuF/L8xoiOvJjUI1EwGREmYPlg3365grlVRWEA4ZCfFJ8LsbJn 0mDaBPyqtwob4A6eL+FykDBNdFTRcMyeTMOYFB+vy0OSrqhtBIegcF2At5N4AXMk VldC4ifTgVHggRm+ohYinDj/zzr3xCqgDp+gsvFoX3IkDKj+DtS46Bd01yNZ9zDB ySYIrurQao/+v4thVqPATrYmXxAPwTielFxRsR1jLrXc+tBt9vyIPB9+s+ScL29n yhwwBYd35+ODIzhpRHpb20TgLqmiqfQnA70Lugs/BncNU+Vi90VKAHSbsmmIgdSM TadjPMHVJ61XqcB30oK069bSqjzKUl7tr2bFHHXyFkJdVCQ68lZp2lTr5QYcikDE dEatzVwXcrileadUXyuEm2pWaG9UpCq+TF+Urs424bkJofGaT9hgwrK4wcqCN7O1 8dWE3G7ucn7uAAIs35uSrxSt8EIHT7LaTcME2K9saxQHtRshUILGfUUM2fcbElQS U2EnNUeAV4AVYTV+RzM1Vk7o+54jFOUZ1wVW7VFRuyRGIv8LaPa3fLiEZ0degsyc GxgDMyCDQCUi0XZlFnBIZXFRRUWJ8EETJ7BlQcij9N6dmK5jOofJJqd+yNjuOzCc bhM0HzL3/Ns8lrfgcxl8 =dE08 -----END PGP SIGNATURE----- --Apple-Mail=_4B01CC8E-883A-43F2-A7C5-4A95E5A07B4E-- From owner-svn-src-head@freebsd.org Tue Feb 7 19:28: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 F0C7CCD512F; Tue, 7 Feb 2017 19:28:33 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF8C11534; Tue, 7 Feb 2017 19:28:33 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17JSW9n030741; Tue, 7 Feb 2017 19:28:32 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17JSWCi030739; Tue, 7 Feb 2017 19:28:32 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201702071928.v17JSWCi030739@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 7 Feb 2017 19:28:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313403 - head/sys/arm/allwinner X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Tue, 07 Feb 2017 19:28:34 -0000 Author: manu Date: Tue Feb 7 19:28:32 2017 New Revision: 313403 URL: https://svnweb.freebsd.org/changeset/base/313403 Log: Rename timer.c to a10_timer.c Requested by: andrew Added: head/sys/arm/allwinner/a10_timer.c - copied unchanged from r313402, head/sys/arm/allwinner/timer.c Deleted: head/sys/arm/allwinner/timer.c Modified: head/sys/arm/allwinner/files.allwinner_up Copied: head/sys/arm/allwinner/a10_timer.c (from r313402, head/sys/arm/allwinner/timer.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/allwinner/a10_timer.c Tue Feb 7 19:28:32 2017 (r313403, copy of r313402, head/sys/arm/allwinner/timer.c) @@ -0,0 +1,367 @@ +/*- + * Copyright (c) 2012 Ganbold Tsagaankhuu + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include + +#include + +/** + * Timer registers addr + * + */ +#define SW_TIMER_IRQ_EN_REG 0x00 +#define SW_TIMER_IRQ_STA_REG 0x04 +#define SW_TIMER0_CTRL_REG 0x10 +#define SW_TIMER0_INT_VALUE_REG 0x14 +#define SW_TIMER0_CUR_VALUE_REG 0x18 + +#define SW_COUNTER64LO_REG 0xa4 +#define SW_COUNTER64HI_REG 0xa8 +#define CNT64_CTRL_REG 0xa0 + +#define CNT64_RL_EN 0x02 /* read latch enable */ + +#define TIMER_ENABLE (1<<0) +#define TIMER_AUTORELOAD (1<<1) +#define TIMER_OSC24M (1<<2) /* oscillator = 24mhz */ +#define TIMER_PRESCALAR (0<<4) /* prescalar = 1 */ + +#define SYS_TIMER_CLKSRC 24000000 /* clock source */ + +struct a10_timer_softc { + device_t sc_dev; + struct resource *res[2]; + bus_space_tag_t sc_bst; + bus_space_handle_t sc_bsh; + void *sc_ih; /* interrupt handler */ + uint32_t sc_period; + uint32_t timer0_freq; + struct eventtimer et; +}; + +int a10_timer_get_timerfreq(struct a10_timer_softc *); + +#define timer_read_4(sc, reg) \ + bus_space_read_4(sc->sc_bst, sc->sc_bsh, reg) +#define timer_write_4(sc, reg, val) \ + bus_space_write_4(sc->sc_bst, sc->sc_bsh, reg, val) + +static u_int a10_timer_get_timecount(struct timecounter *); +static int a10_timer_timer_start(struct eventtimer *, + sbintime_t first, sbintime_t period); +static int a10_timer_timer_stop(struct eventtimer *); + +static uint64_t timer_read_counter64(void); + +static int a10_timer_hardclock(void *); +static int a10_timer_probe(device_t); +static int a10_timer_attach(device_t); + +static delay_func a10_timer_delay; + +static struct timecounter a10_timer_timecounter = { + .tc_name = "a10_timer timer0", + .tc_get_timecount = a10_timer_get_timecount, + .tc_counter_mask = ~0u, + .tc_frequency = 0, + .tc_quality = 1000, +}; + +struct a10_timer_softc *a10_timer_sc = NULL; + +static struct resource_spec a10_timer_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { SYS_RES_IRQ, 0, RF_ACTIVE }, + { -1, 0 } +}; + +static uint64_t +timer_read_counter64(void) +{ + uint32_t lo, hi; + + /* Latch counter, wait for it to be ready to read. */ + timer_write_4(a10_timer_sc, CNT64_CTRL_REG, CNT64_RL_EN); + while (timer_read_4(a10_timer_sc, CNT64_CTRL_REG) & CNT64_RL_EN) + continue; + + hi = timer_read_4(a10_timer_sc, SW_COUNTER64HI_REG); + lo = timer_read_4(a10_timer_sc, SW_COUNTER64LO_REG); + + return (((uint64_t)hi << 32) | lo); +} + +static int +a10_timer_probe(device_t dev) +{ + struct a10_timer_softc *sc; + u_int soc_family; + + sc = device_get_softc(dev); + + if (!ofw_bus_is_compatible(dev, "allwinner,sun4i-a10-timer")) + return (ENXIO); + + soc_family = allwinner_soc_family(); + if (soc_family != ALLWINNERSOC_SUN4I && + soc_family != ALLWINNERSOC_SUN5I) + return (ENXIO); + + device_set_desc(dev, "Allwinner A10/A20 timer"); + return (BUS_PROBE_DEFAULT); +} + +static int +a10_timer_attach(device_t dev) +{ + struct a10_timer_softc *sc; + int err; + uint32_t val; + + sc = device_get_softc(dev); + + if (bus_alloc_resources(dev, a10_timer_spec, sc->res)) { + device_printf(dev, "could not allocate resources\n"); + return (ENXIO); + } + + sc->sc_dev = dev; + sc->sc_bst = rman_get_bustag(sc->res[0]); + sc->sc_bsh = rman_get_bushandle(sc->res[0]); + + /* Setup and enable the timer interrupt */ + err = bus_setup_intr(dev, sc->res[1], INTR_TYPE_CLK, a10_timer_hardclock, + NULL, sc, &sc->sc_ih); + if (err != 0) { + bus_release_resources(dev, a10_timer_spec, sc->res); + device_printf(dev, "Unable to setup the clock irq handler, " + "err = %d\n", err); + return (ENXIO); + } + + /* Set clock source to OSC24M, 16 pre-division */ + val = timer_read_4(sc, SW_TIMER0_CTRL_REG); + val |= TIMER_PRESCALAR | TIMER_OSC24M; + timer_write_4(sc, SW_TIMER0_CTRL_REG, val); + + /* Enable timer0 */ + val = timer_read_4(sc, SW_TIMER_IRQ_EN_REG); + val |= TIMER_ENABLE; + timer_write_4(sc, SW_TIMER_IRQ_EN_REG, val); + + sc->timer0_freq = SYS_TIMER_CLKSRC; + + /* Set desired frequency in event timer and timecounter */ + sc->et.et_frequency = sc->timer0_freq; + sc->et.et_name = "a10_timer Eventtimer"; + sc->et.et_flags = ET_FLAGS_ONESHOT | ET_FLAGS_PERIODIC; + sc->et.et_quality = 1000; + sc->et.et_min_period = (0x00000005LLU << 32) / sc->et.et_frequency; + sc->et.et_max_period = (0xfffffffeLLU << 32) / sc->et.et_frequency; + sc->et.et_start = a10_timer_timer_start; + sc->et.et_stop = a10_timer_timer_stop; + sc->et.et_priv = sc; + et_register(&sc->et); + + if (device_get_unit(dev) == 0) { + arm_set_delay(a10_timer_delay, sc); + a10_timer_sc = sc; + } + + a10_timer_timecounter.tc_frequency = sc->timer0_freq; + tc_init(&a10_timer_timecounter); + + if (bootverbose) { + device_printf(sc->sc_dev, "clock: hz=%d stathz = %d\n", hz, stathz); + + device_printf(sc->sc_dev, "event timer clock frequency %u\n", + sc->timer0_freq); + device_printf(sc->sc_dev, "timecounter clock frequency %lld\n", + a10_timer_timecounter.tc_frequency); + } + + return (0); +} + +static int +a10_timer_timer_start(struct eventtimer *et, sbintime_t first, + sbintime_t period) +{ + struct a10_timer_softc *sc; + uint32_t count; + uint32_t val; + + sc = (struct a10_timer_softc *)et->et_priv; + + if (period != 0) + sc->sc_period = ((uint32_t)et->et_frequency * period) >> 32; + else + sc->sc_period = 0; + if (first != 0) + count = ((uint32_t)et->et_frequency * first) >> 32; + else + count = sc->sc_period; + + /* Update timer values */ + timer_write_4(sc, SW_TIMER0_INT_VALUE_REG, sc->sc_period); + timer_write_4(sc, SW_TIMER0_CUR_VALUE_REG, count); + + val = timer_read_4(sc, SW_TIMER0_CTRL_REG); + if (period != 0) { + /* periodic */ + val |= TIMER_AUTORELOAD; + } else { + /* oneshot */ + val &= ~TIMER_AUTORELOAD; + } + /* Enable timer0 */ + val |= TIMER_ENABLE; + timer_write_4(sc, SW_TIMER0_CTRL_REG, val); + + return (0); +} + +static int +a10_timer_timer_stop(struct eventtimer *et) +{ + struct a10_timer_softc *sc; + uint32_t val; + + sc = (struct a10_timer_softc *)et->et_priv; + + /* Disable timer0 */ + val = timer_read_4(sc, SW_TIMER0_CTRL_REG); + val &= ~TIMER_ENABLE; + timer_write_4(sc, SW_TIMER0_CTRL_REG, val); + + sc->sc_period = 0; + + return (0); +} + +int +a10_timer_get_timerfreq(struct a10_timer_softc *sc) +{ + return (sc->timer0_freq); +} + +static int +a10_timer_hardclock(void *arg) +{ + struct a10_timer_softc *sc; + uint32_t val; + + sc = (struct a10_timer_softc *)arg; + + /* Clear interrupt pending bit. */ + timer_write_4(sc, SW_TIMER_IRQ_STA_REG, 0x1); + + val = timer_read_4(sc, SW_TIMER0_CTRL_REG); + /* + * Disabled autoreload and sc_period > 0 means + * timer_start was called with non NULL first value. + * Now we will set periodic timer with the given period + * value. + */ + if ((val & (1<<1)) == 0 && sc->sc_period > 0) { + /* Update timer */ + timer_write_4(sc, SW_TIMER0_CUR_VALUE_REG, sc->sc_period); + + /* Make periodic and enable */ + val |= TIMER_AUTORELOAD | TIMER_ENABLE; + timer_write_4(sc, SW_TIMER0_CTRL_REG, val); + } + + if (sc->et.et_active) + sc->et.et_event_cb(&sc->et, sc->et.et_arg); + + return (FILTER_HANDLED); +} + +u_int +a10_timer_get_timecount(struct timecounter *tc) +{ + + if (a10_timer_sc == NULL) + return (0); + + return ((u_int)timer_read_counter64()); +} + +static device_method_t a10_timer_methods[] = { + DEVMETHOD(device_probe, a10_timer_probe), + DEVMETHOD(device_attach, a10_timer_attach), + + DEVMETHOD_END +}; + +static driver_t a10_timer_driver = { + "a10_timer", + a10_timer_methods, + sizeof(struct a10_timer_softc), +}; + +static devclass_t a10_timer_devclass; + +EARLY_DRIVER_MODULE(a10_timer, simplebus, a10_timer_driver, a10_timer_devclass, 0, 0, + BUS_PASS_TIMER + BUS_PASS_ORDER_MIDDLE); + +static void +a10_timer_delay(int usec, void *arg) +{ + struct a10_timer_softc *sc = arg; + uint64_t end, now; + + now = timer_read_counter64(); + end = now + (sc->timer0_freq / 1000000) * (usec + 1); + + while (now < end) + now = timer_read_counter64(); +} Modified: head/sys/arm/allwinner/files.allwinner_up ============================================================================== --- head/sys/arm/allwinner/files.allwinner_up Tue Feb 7 19:02:59 2017 (r313402) +++ head/sys/arm/allwinner/files.allwinner_up Tue Feb 7 19:28:32 2017 (r313403) @@ -1,3 +1,3 @@ # $FreeBSD$ -arm/allwinner/timer.c standard +arm/allwinner/a10_timer.c standard From owner-svn-src-head@freebsd.org Tue Feb 7 19: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 D65A5CD549D; Tue, 7 Feb 2017 19:42:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A51771EE8; Tue, 7 Feb 2017 19:42:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17JggdY038701; Tue, 7 Feb 2017 19:42:42 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17JggnI038693; Tue, 7 Feb 2017 19:42:42 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702071942.v17JggnI038693@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 7 Feb 2017 19:42:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313404 - in head/lib/libnetbsd: . sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Tue, 07 Feb 2017 19:42:43 -0000 Author: ngie Date: Tue Feb 7 19:42:41 2017 New Revision: 313404 URL: https://svnweb.freebsd.org/changeset/base/313404 Log: Improve libnetbsd compatibility with NetBSD This change is being made to diff reduce/reduce duplication in contrib/netbsd-tests and to facilitate further porting of software from NetBSD Add the following headers: - sys/event.h: -- sys/types.h is required for kqueue on FreeBSD, but not NetBSD. - sys/types.h: -- NBBY is defined in sys/param.h on FreeBSD, not sys/types.h like on NetBSD. Pull in sys/param.h to have parity with NetBSD. - sys/wait.h: -- Define wrusage as __wrusage for parity with NetBSD typedef. - glob.h -- Define __gl_stat_t as "struct stat" for parity with NetBSD typedef. - pthread.h: -- Pull in pthread_np.h for _np functions defined separately on FreeBSD. Improve compatibility with NetBSD in the following headers: - sha1.h: -- define SHA1_CTX as SHA_CTX -- define SHA1Final as SHA1_Final - sha2.h: -- #include sha384 to pick up all of the SHA 384 bit macros and definitions. - util.h: -- Add sys/types.h to util.h to pollute the header for types used in flags_to_string and string_to_flags (u_long) as NetBSD doesn't require them for the functions. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Added: head/lib/libnetbsd/glob.h - copied, changed from r312222, projects/netbsd-tests-upstream-01-2017/lib/libnetbsd/glob.h head/lib/libnetbsd/pthread.h - copied, changed from r312303, projects/netbsd-tests-upstream-01-2017/lib/libnetbsd/pthread.h head/lib/libnetbsd/sys/event.h - copied unchanged from r312242, projects/netbsd-tests-upstream-01-2017/lib/libnetbsd/sys/event.h head/lib/libnetbsd/sys/types.h - copied unchanged from r312241, projects/netbsd-tests-upstream-01-2017/lib/libnetbsd/sys/types.h head/lib/libnetbsd/sys/wait.h - copied unchanged from r312240, projects/netbsd-tests-upstream-01-2017/lib/libnetbsd/sys/wait.h Modified: head/lib/libnetbsd/sha1.h head/lib/libnetbsd/sha2.h head/lib/libnetbsd/util.h Copied and modified: head/lib/libnetbsd/glob.h (from r312222, projects/netbsd-tests-upstream-01-2017/lib/libnetbsd/glob.h) ============================================================================== --- projects/netbsd-tests-upstream-01-2017/lib/libnetbsd/glob.h Sun Jan 15 10:16:20 2017 (r312222, copy source) +++ head/lib/libnetbsd/glob.h Tue Feb 7 19:42:41 2017 (r313404) @@ -1,33 +1,30 @@ -/* $FreeBSD$ */ - /*- - * Copyright (c) 2012 SRI International + * Copyright (c) 2017 Dell, Inc. * All rights reserved. * - * This software was developed by SRI International and the University of - * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) - * ("CTSRD"), as part of the DARPA CRASH research programme. - * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ */ #ifndef _LIBNETBSD_GLOB_H_ @@ -39,4 +36,4 @@ #define __gl_stat_t struct stat #endif -#endif /* _SHA1_H_ */ +#endif Copied and modified: head/lib/libnetbsd/pthread.h (from r312303, projects/netbsd-tests-upstream-01-2017/lib/libnetbsd/pthread.h) ============================================================================== --- projects/netbsd-tests-upstream-01-2017/lib/libnetbsd/pthread.h Mon Jan 16 18:51:27 2017 (r312303, copy source) +++ head/lib/libnetbsd/pthread.h Tue Feb 7 19:42:41 2017 (r313404) @@ -33,4 +33,4 @@ #include_next #include -#endif /* _SHA1_H_ */ +#endif Modified: head/lib/libnetbsd/sha1.h ============================================================================== --- head/lib/libnetbsd/sha1.h Tue Feb 7 19:28:32 2017 (r313403) +++ head/lib/libnetbsd/sha1.h Tue Feb 7 19:42:41 2017 (r313404) @@ -35,8 +35,11 @@ #include +#define SHA1_CTX SHA_CTX + #define SHA1End SHA1_End #define SHA1File SHA1_File +#define SHA1Final SHA1_Final #define SHA1Init SHA1_Init #define SHA1Update SHA1_Update Modified: head/lib/libnetbsd/sha2.h ============================================================================== --- head/lib/libnetbsd/sha2.h Tue Feb 7 19:28:32 2017 (r313403) +++ head/lib/libnetbsd/sha2.h Tue Feb 7 19:42:41 2017 (r313404) @@ -34,6 +34,7 @@ #define _SHA2_H_ #include +#include #include #endif /* _SHA2_H_ */ Copied: head/lib/libnetbsd/sys/event.h (from r312242, projects/netbsd-tests-upstream-01-2017/lib/libnetbsd/sys/event.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libnetbsd/sys/event.h Tue Feb 7 19:42:41 2017 (r313404, copy of r312242, projects/netbsd-tests-upstream-01-2017/lib/libnetbsd/sys/event.h) @@ -0,0 +1,42 @@ +/*- + * Copyright (c) 2017 Dell, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ * + */ + +#ifndef _LIBNETBSD_SYS_EVENT_H_ +#define _LIBNETBSD_SYS_EVENT_H_ + +/* + * kqueue on FreeBSD requires sys/event.h, which in turn uses uintptr_t + * (defined in sys/types.h), so in order to accomodate their requirements, + * pull in sys/types.h as part of event.h. + */ +#include + +#include_next + +#endif Copied: head/lib/libnetbsd/sys/types.h (from r312241, projects/netbsd-tests-upstream-01-2017/lib/libnetbsd/sys/types.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libnetbsd/sys/types.h Tue Feb 7 19:42:41 2017 (r313404, copy of r312241, projects/netbsd-tests-upstream-01-2017/lib/libnetbsd/sys/types.h) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2017 Dell, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ * + */ + +#ifndef _LIBNETBSD_SYS_TYPES_H_ +#define _LIBNETBSD_SYS_TYPES_H_ + +#include_next + +#include /* For NBBY */ + +#endif Copied: head/lib/libnetbsd/sys/wait.h (from r312240, projects/netbsd-tests-upstream-01-2017/lib/libnetbsd/sys/wait.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libnetbsd/sys/wait.h Tue Feb 7 19:42:41 2017 (r313404, copy of r312240, projects/netbsd-tests-upstream-01-2017/lib/libnetbsd/sys/wait.h) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2017 Dell, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ * + */ + +#ifndef _LIBNETBSD_SYS_WAIT_H_ +#define _LIBNETBSD_SYS_WAIT_H_ + +#include_next + +#define wrusage __wrusage + +#endif Modified: head/lib/libnetbsd/util.h ============================================================================== --- head/lib/libnetbsd/util.h Tue Feb 7 19:28:32 2017 (r313403) +++ head/lib/libnetbsd/util.h Tue Feb 7 19:42:41 2017 (r313404) @@ -30,12 +30,13 @@ * SUCH DAMAGE. */ -#ifndef _UTIL_H_ -#define _UTIL_H_ +#ifndef _LIBNETBSD_UTIL_H_ +#define _LIBNETBSD_UTIL_H_ +#include #include char *flags_to_string(u_long flags, const char *def); int string_to_flags(char **stringp, u_long *setp, u_long *clrp); -#endif /* _UTIL_H_ */ +#endif From owner-svn-src-head@freebsd.org Tue Feb 7 20:22: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 4AD73CD5FA8; Tue, 7 Feb 2017 20:22:33 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B5CB417A5; Tue, 7 Feb 2017 20:22:32 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v17KMNXQ083198 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 7 Feb 2017 22:22:23 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v17KMNXQ083198 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v17KMMeR083197; Tue, 7 Feb 2017 22:22:22 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 7 Feb 2017 22:22:22 +0200 From: Konstantin Belousov To: Alan Cox Cc: John Baldwin , Edward Tomasz Napierala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313352 - in head/sys: compat/cloudabi compat/freebsd32 compat/linux vm Message-ID: <20170207202222.GE2092@kib.kiev.ua> References: <201702062057.v16KvCtI069664@repo.freebsd.org> <20170207083909.GX2092@kib.kiev.ua> <20170207125508.GA62670@brick> <3460210.7qRYCLqZx1@ralph.baldwin.cx> <98dce77f-b581-93fe-d2d6-ca1e27cd6a95@rice.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <98dce77f-b581-93fe-d2d6-ca1e27cd6a95@rice.edu> User-Agent: Mutt/1.7.2 (2016-11-26) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-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: Tue, 07 Feb 2017 20:22:33 -0000 On Tue, Feb 07, 2017 at 12:29:35PM -0600, Alan Cox wrote: > I tend to agree with John. Why not use the same types for the kern_* > parameters as are used in the corresponding args structure? Let the > conversion to the Mach VM types happen inside of the function's > implementation. I do not object, but still I want to point out that such arrangement really depends on all Unix-like systems using the same type model (ILP32 or LP64 or both). If we would try to use current kern_* functions from syscallsubr.h for something more involved, like x32, then the assumption breaks and the type puns are spread. In fact, even in the compat32 layer (host native ILP32->LP64), the somewhat incorrect type manipulations are performed, e.g. we represent a binary-native pointer as host' uint32_t type, which is converted to void * for the purpose of kern_ calls. This conversion assumes much more about the platform than only type sizes, e.g. the flat address space with individually addressable bytes and normal arithmetic for pointers. Mach types are somewhat better in this respect, with purposedly used arithmetic types like vm_size_t, vm_offset_t, vm_ooffset_t for address space operations. Again, I do not object but want to note this mismatch. From owner-svn-src-head@freebsd.org Tue Feb 7 20:34: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 3E2C8CD599F; Tue, 7 Feb 2017 20:34:05 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F043FF68; Tue, 7 Feb 2017 20:34:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17KY459062947; Tue, 7 Feb 2017 20:34:04 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17KY3is062944; Tue, 7 Feb 2017 20:34:03 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201702072034.v17KY3is062944@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 7 Feb 2017 20:34:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313407 - in head: sys/kern sys/sys usr.bin/gcore X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Tue, 07 Feb 2017 20:34:05 -0000 Author: jhb Date: Tue Feb 7 20:34:03 2017 New Revision: 313407 URL: https://svnweb.freebsd.org/changeset/base/313407 Log: Copy the e_machine and e_flags fields from the binary into an ELF core dump. In the kernel, cache the machine and flags fields from ELF header to use in the ELF header of a core dump. For gcore, the copy these fields over from the ELF header in the binary. This matters for platforms which encode ABI information in the flags field (such as o32 vs n32 on MIPS). Reviewed by: kib Sponsored by: DARPA / AFRL Differential Revision: https://reviews.freebsd.org/D9392 Modified: head/sys/kern/imgact_elf.c head/sys/sys/proc.h head/usr.bin/gcore/elfcore.c Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Tue Feb 7 19:47:30 2017 (r313406) +++ head/sys/kern/imgact_elf.c Tue Feb 7 20:34:03 2017 (r313407) @@ -1055,6 +1055,8 @@ __CONCAT(exec_, __elfN(imgact))(struct i imgp->interpreted = 0; imgp->reloc_base = addr; imgp->proc->p_osrel = osrel; + imgp->proc->p_elf_machine = hdr->e_machine; + imgp->proc->p_elf_flags = hdr->e_flags; ret: free(interp_buf, M_TEMP); @@ -1655,15 +1657,11 @@ __elfN(puthdr)(struct thread *td, void * ehdr->e_ident[EI_ABIVERSION] = 0; ehdr->e_ident[EI_PAD] = 0; ehdr->e_type = ET_CORE; -#if defined(COMPAT_FREEBSD32) && __ELF_WORD_SIZE == 32 - ehdr->e_machine = ELF_ARCH32; -#else - ehdr->e_machine = ELF_ARCH; -#endif + ehdr->e_machine = td->td_proc->p_elf_machine; ehdr->e_version = EV_CURRENT; ehdr->e_entry = 0; ehdr->e_phoff = sizeof(Elf_Ehdr); - ehdr->e_flags = 0; + ehdr->e_flags = td->td_proc->p_elf_flags; ehdr->e_ehsize = sizeof(Elf_Ehdr); ehdr->e_phentsize = sizeof(Elf_Phdr); ehdr->e_shentsize = sizeof(Elf_Shdr); Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Tue Feb 7 19:47:30 2017 (r313406) +++ head/sys/sys/proc.h Tue Feb 7 20:34:03 2017 (r313407) @@ -617,8 +617,11 @@ struct proc { our subtree. */ u_int p_xexit; /* (c) Exit code. */ u_int p_xsig; /* (c) Stop/kill sig. */ + uint16_t p_elf_machine; /* (x) ELF machine type */ + uint64_t p_elf_flags; /* (x) ELF flags */ + /* End area that is copied on creation. */ -#define p_endcopy p_xsig +#define p_endcopy p_elf_flags struct pgrp *p_pgrp; /* (c + e) Pointer to process group. */ struct knlist *p_klist; /* (c) Knotes attached to this proc. */ int p_numthreads; /* (c) Number of threads. */ Modified: head/usr.bin/gcore/elfcore.c ============================================================================== --- head/usr.bin/gcore/elfcore.c Tue Feb 7 19:47:30 2017 (r313406) +++ head/usr.bin/gcore/elfcore.c Tue Feb 7 20:34:03 2017 (r313407) @@ -117,8 +117,8 @@ static void *elf_note_procstat_psstrings static void *elf_note_procstat_rlimit(void *, size_t *); static void *elf_note_procstat_umask(void *, size_t *); static void *elf_note_procstat_vmmap(void *, size_t *); -static void elf_puthdr(pid_t, vm_map_entry_t, void *, size_t, size_t, size_t, - int); +static void elf_puthdr(int, pid_t, vm_map_entry_t, void *, size_t, size_t, + size_t, int); static void elf_putnote(int, notefunc_t, void *, struct sbuf *); static void elf_putnotes(pid_t, struct sbuf *, size_t *); static void freemap(vm_map_entry_t); @@ -178,7 +178,7 @@ elf_detach(void) * Write an ELF coredump for the given pid to the given fd. */ static void -elf_coredump(int efd __unused, int fd, pid_t pid) +elf_coredump(int efd, int fd, pid_t pid) { vm_map_entry_t map; struct sseg_closure seginfo; @@ -230,7 +230,7 @@ elf_coredump(int efd __unused, int fd, p hdr = sbuf_data(sb); segoff = sbuf_len(sb); /* Fill in the header. */ - elf_puthdr(pid, map, hdr, hdrsize, notesz, segoff, seginfo.count); + elf_puthdr(efd, pid, map, hdr, hdrsize, notesz, segoff, seginfo.count); n = write(fd, hdr, segoff); if (n == -1) @@ -420,14 +420,21 @@ elf_putnote(int type, notefunc_t notefun * Generate the ELF coredump header. */ static void -elf_puthdr(pid_t pid, vm_map_entry_t map, void *hdr, size_t hdrsize, +elf_puthdr(int efd, pid_t pid, vm_map_entry_t map, void *hdr, size_t hdrsize, size_t notesz, size_t segoff, int numsegs) { - Elf_Ehdr *ehdr; + Elf_Ehdr *ehdr, binhdr; Elf_Phdr *phdr; Elf_Shdr *shdr; struct phdr_closure phc; + ssize_t cnt; + cnt = read(efd, &binhdr, sizeof(binhdr)); + if (cnt < 0) + err(1, "Failed to re-read ELF header"); + else if (cnt != sizeof(binhdr)) + errx(1, "Failed to re-read ELF header"); + ehdr = (Elf_Ehdr *)hdr; ehdr->e_ident[EI_MAG0] = ELFMAG0; @@ -441,11 +448,11 @@ elf_puthdr(pid_t pid, vm_map_entry_t map ehdr->e_ident[EI_ABIVERSION] = 0; ehdr->e_ident[EI_PAD] = 0; ehdr->e_type = ET_CORE; - ehdr->e_machine = ELF_ARCH; + ehdr->e_machine = binhdr.e_machine; ehdr->e_version = EV_CURRENT; ehdr->e_entry = 0; ehdr->e_phoff = sizeof(Elf_Ehdr); - ehdr->e_flags = 0; + ehdr->e_flags = binhdr.e_flags; ehdr->e_ehsize = sizeof(Elf_Ehdr); ehdr->e_phentsize = sizeof(Elf_Phdr); ehdr->e_shentsize = sizeof(Elf_Shdr); From owner-svn-src-head@freebsd.org Tue Feb 7 20:35: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 0E0FECD5A26; Tue, 7 Feb 2017 20:35:01 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it0-x244.google.com (mail-it0-x244.google.com [IPv6:2607:f8b0:4001:c0b::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C9D7B147B; Tue, 7 Feb 2017 20:35:00 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it0-x244.google.com with SMTP id f200so13577509itf.3; Tue, 07 Feb 2017 12:35:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=MDLX4XnWJ75iAfmDoYte7wOXqnNZJ+gsXRDy12UhHVY=; b=Xzx2Ea6ACMfhRAu89iEiVlWIlEWAmehP2080isdM5pKJC4J/ZTReKg/9H6qebDxIMX ChO+GbL+qmbprSztZlWDMFyjf34zcW8FEJTT606XaOBs7uTMN04IpedkfuT/y53XWhuA nsG0cgV06CTruqkNhbJYMX3XCiKMGiz7je07+KwslkTaZWHETqzIkMfw3G75Vr+MU8Gk nilViDK9rhcBm53gmG+psCZLR2wBm5A3jMAPHcKkHhqhpzztczacgta0y27tlEtj9Mh8 Rjk5ntA/+7FJxgmQ6FfMhBPV4GcCBcCfAmhxnjh/ZjRnUxadibGet4ccjQN65UAyrr6t bohg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=MDLX4XnWJ75iAfmDoYte7wOXqnNZJ+gsXRDy12UhHVY=; b=WIJ6roNE9rxLQo/wwNoq358JKr3G+KPxa8mp5GvJnAwF2TrgZhAAgazZzjSiOUnvF/ xefT0K7kB+Vvd7/2ZQd/i8LiU21KdaAXDrllrIvnfrhNeFrTzbXn0+os03rS2clhbPnb LpxSXwdnfcH3BfYpi7CSu3Q+fh82F+P3CAND3/W119JSWhulbm8yTzTFDwNg5LBzYISw RBNCiOjgsSKKZANeJckbOHdXj/r6571JzluWuEE4h/TyuIk6ehHGL8IcAxr0zMMjPq4c PnEmo7/j3shS2lCXdqNZfvAhRbbWM9InUHI3zbzDkGdZniBdW/qb4orgzXRSrR9dWOmK nB4A== X-Gm-Message-State: AIkVDXJ/lxhk/kohtjq8ty7XQULiJvkKK4/1Y6yVAXvzhaJqCwl7F5fgg4T1POAfe37uprfyKiovfOOVlb0dwQ== X-Received: by 10.36.10.3 with SMTP id 3mr13167850itw.108.1486499700266; Tue, 07 Feb 2017 12:35:00 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.175.159 with HTTP; Tue, 7 Feb 2017 12:34:39 -0800 (PST) In-Reply-To: <8e0f5a4c-16ec-842d-f4f7-32c830f43553@multiplay.co.uk> References: <201702050140.v151eRXX090326@repo.freebsd.org> <42c790bb-df12-2a50-6181-24bac5c72d34@multiplay.co.uk> <20170205030006.GB4375@dft-labs.eu> <20170205151746.GA6841@FreeBSD.org> <20170207145750.GD4772@dft-labs.eu> <8e0f5a4c-16ec-842d-f4f7-32c830f43553@multiplay.co.uk> From: Ed Maste Date: Tue, 7 Feb 2017 15:34:39 -0500 X-Google-Sender-Auth: 10M2DALlQA02Qf7sWbArlbJXsPw Message-ID: Subject: Re: svn commit: r313260 - head/sys/kern To: Steven Hartland Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Mateusz Guzik Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-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: Tue, 07 Feb 2017 20:35:01 -0000 On 7 February 2017 at 10:30, Steven Hartland wrote: > All I'm suggesting is, while one could guess this may be a performance or > possibly a compatibility thing, the reason is not obvious, so a small piece > of detail on why the change was done should always be included. > > For this one something like the following would be nice: > > Switch fget_unlocked to atomic_fcmpset > > Improve performance under contention by switching fget_unlocked to > use atomic_fcmpset. I agree, and one of the key reasons to do this is so that there's this tiny bit of context if someone later runs "git blame" or "svn annotate" and discovers this change for the line containing atomic_fcmpset. Comments containing "eliminate memory leak" or "remove unused variable" have a self-evident reason, but I don't believe that's true for "switch to atomic_fcmpset." Repeating the "switch fget_unlocked to..." in the proposed commit message above feels redundant to me though, and I would suggest: | Switch fget_unlocked to atomic_fcmpset | | Improves performance under contention. or just: | Use atmoic_fcmpset to improve performance under contention From owner-svn-src-head@freebsd.org Tue Feb 7 22:46: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 35B2BCD587F; Tue, 7 Feb 2017 22:46:01 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 106C91761; Tue, 7 Feb 2017 22:46:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17Mk08j015660; Tue, 7 Feb 2017 22:46:00 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17Mk0Ac015659; Tue, 7 Feb 2017 22:46:00 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201702072246.v17Mk0Ac015659@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 7 Feb 2017 22:46:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313409 - head/sys/geom/journal X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Tue, 07 Feb 2017 22:46:01 -0000 Author: jhb Date: Tue Feb 7 22:45:59 2017 New Revision: 313409 URL: https://svnweb.freebsd.org/changeset/base/313409 Log: Defer startup of gjournal switcher kproc. Don't start switcher kproc until the first GEOM is created. Reviewed by: pjd MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D8576 Modified: head/sys/geom/journal/g_journal.c Modified: head/sys/geom/journal/g_journal.c ============================================================================== --- head/sys/geom/journal/g_journal.c Tue Feb 7 22:40:38 2017 (r313408) +++ head/sys/geom/journal/g_journal.c Tue Feb 7 22:45:59 2017 (r313409) @@ -227,11 +227,14 @@ struct g_class g_journal_class = { static int g_journal_destroy(struct g_journal_softc *sc); static void g_journal_metadata_update(struct g_journal_softc *sc); +static void g_journal_start_switcher(struct g_class *mp); +static void g_journal_stop_switcher(void); static void g_journal_switch_wait(struct g_journal_softc *sc); #define GJ_SWITCHER_WORKING 0 #define GJ_SWITCHER_DIE 1 #define GJ_SWITCHER_DIED 2 +static struct proc *g_journal_switcher_proc = NULL; static int g_journal_switcher_state = GJ_SWITCHER_WORKING; static int g_journal_switcher_wokenup = 0; static int g_journal_sync_requested = 0; @@ -2383,6 +2386,10 @@ g_journal_create(struct g_class *mp, str sc->sc_jconsumer = cp; } + /* Start switcher kproc if needed. */ + if (g_journal_switcher_proc == NULL) + g_journal_start_switcher(mp); + if ((sc->sc_type & GJ_TYPE_COMPLETE) != GJ_TYPE_COMPLETE) { /* Journal is not complete yet. */ return (gp); @@ -2759,7 +2766,6 @@ static void g_journal_switcher(void *arg static void g_journal_init(struct g_class *mp) { - int error; /* Pick a conservative value if provided value sucks. */ if (g_journal_cache_divisor <= 0 || @@ -2779,9 +2785,6 @@ g_journal_init(struct g_class *mp) g_journal_lowmem, mp, EVENTHANDLER_PRI_FIRST); if (g_journal_event_lowmem == NULL) GJ_DEBUG(0, "Warning! Cannot register lowmem event."); - error = kproc_create(g_journal_switcher, mp, NULL, 0, 0, - "g_journal switcher"); - KASSERT(error == 0, ("Cannot create switcher thread.")); } static void @@ -2794,11 +2797,7 @@ g_journal_fini(struct g_class *mp) } if (g_journal_event_lowmem != NULL) EVENTHANDLER_DEREGISTER(vm_lowmem, g_journal_event_lowmem); - g_journal_switcher_state = GJ_SWITCHER_DIE; - wakeup(&g_journal_switcher_state); - while (g_journal_switcher_state != GJ_SWITCHER_DIED) - tsleep(&g_journal_switcher_state, PRIBIO, "jfini:wait", hz / 5); - GJ_DEBUG(1, "Switcher died."); + g_journal_stop_switcher(); } DECLARE_GEOM_CLASS(g_journal_class, g_journal); @@ -2998,9 +2997,34 @@ next: } } +static void +g_journal_start_switcher(struct g_class *mp) +{ + int error; + + g_topology_assert(); + MPASS(g_journal_switcher_proc == NULL); + g_journal_switcher_state = GJ_SWITCHER_WORKING; + error = kproc_create(g_journal_switcher, mp, &g_journal_switcher_proc, + 0, 0, "g_journal switcher"); + KASSERT(error == 0, ("Cannot create switcher thread.")); +} + +static void +g_journal_stop_switcher(void) +{ + g_topology_assert(); + MPASS(g_journal_switcher_proc != NULL); + g_journal_switcher_state = GJ_SWITCHER_DIE; + wakeup(&g_journal_switcher_state); + while (g_journal_switcher_state != GJ_SWITCHER_DIED) + tsleep(&g_journal_switcher_state, PRIBIO, "jfini:wait", hz / 5); + GJ_DEBUG(1, "Switcher died."); + g_journal_switcher_proc = NULL; +} + /* - * TODO: Switcher thread should be started on first geom creation and killed on - * last geom destruction. + * TODO: Kill switcher thread on last geom destruction? */ static void g_journal_switcher(void *arg) From owner-svn-src-head@freebsd.org Tue Feb 7 22:48: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 65B77CD5928; Tue, 7 Feb 2017 22:48:18 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 45DBB1930; Tue, 7 Feb 2017 22:48:18 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 3CCA410A7FA; Tue, 7 Feb 2017 17:48:17 -0500 (EST) From: John Baldwin To: Andrew Turner Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313342 - head/sys/conf Date: Tue, 07 Feb 2017 14:37:15 -0800 Message-ID: <6070632.jUjQOVzxbI@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <20170207191058.65d72285@zapp> References: <201702061441.v16EfYZx010320@repo.freebsd.org> <2448004.hnTc9TClBV@ralph.baldwin.cx> <20170207191058.65d72285@zapp> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Tue, 07 Feb 2017 17:48:17 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-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: Tue, 07 Feb 2017 22:48:18 -0000 On Tuesday, February 07, 2017 07:10:58 PM Andrew Turner wrote: > On Mon, 06 Feb 2017 10:43:09 -0800 > John Baldwin wrote: > > > On Monday, February 06, 2017 02:41:34 PM Andrew Turner wrote: > > > Author: andrew > > > Date: Mon Feb 6 14:41:34 2017 > > > New Revision: 313342 > > > URL: https://svnweb.freebsd.org/changeset/base/313342 > > > > > > Log: > > > Only build the ACPI PCI drivers on x86, they are unlikely to be > > > used on arm64 without dignificant changes. > > > > > > Obtained from: ABT Systems Ltd > > > Sponsored by: The FreeBSD Foundation > > > > I still think this is not really the right approach. Nothing about > > _BBN, _CRS, or _PRT, etc. is x86-specific. > > > > the main issue is the code assumes a single PCIe root controller, e.g. > the pci_cfg* KPI won't work on ThunderX with 6 independent PCIe root > controllers. I expect much of the code could be re-enabled on arm64, > however for now it's easier to disable it. It would be fairly trivial to add a domain argument to the pci_cfg* API. Right now x86 only supports a single domain partly due to this (the MCFG handler doesn't yet handle multiple domains because it can't be handed a request for a domain other than zero, but that is only an implementation choice in part due to this API limitation). I'd be more inclined to pass PCI config requests up to the parent nexus driver and not use pci_cfg* in the ACPI code at all though if that model works better. -- John Baldwin From owner-svn-src-head@freebsd.org Tue Feb 7 22:57: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 18A11CD5CD8; Tue, 7 Feb 2017 22:57:17 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8556B0; Tue, 7 Feb 2017 22:57:15 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 1D75D10A7B9; Tue, 7 Feb 2017 17:57:09 -0500 (EST) From: John Baldwin To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313409 - head/sys/geom/journal Date: Tue, 07 Feb 2017 14:57:06 -0800 Message-ID: <74328668.ma5t6WLkG7@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201702072246.v17Mk0Ac015659@repo.freebsd.org> References: <201702072246.v17Mk0Ac015659@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Tue, 07 Feb 2017 17:57:09 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-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: Tue, 07 Feb 2017 22:57:17 -0000 On Tuesday, February 07, 2017 10:46:00 PM John Baldwin wrote: > Author: jhb > Date: Tue Feb 7 22:45:59 2017 > New Revision: 313409 > URL: https://svnweb.freebsd.org/changeset/base/313409 > > Log: > Defer startup of gjournal switcher kproc. > > Don't start switcher kproc until the first GEOM is created. > > Reviewed by: pjd > MFC after: 1 month > Differential Revision: https://reviews.freebsd.org/D8576 Originally this triggered a panic with EARLY_AP_STARTUP, but that was later resolved by permitting callouts during early boot for !thread0. However, this is still useful to avoid creating an unused kthread on a system that doesn't use gjournal, so I committed it for that reason. -- John Baldwin From owner-svn-src-head@freebsd.org Tue Feb 7 23:40: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 A9ACDCD55E9 for ; Tue, 7 Feb 2017 23:40:56 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: from mail-wm0-x235.google.com (mail-wm0-x235.google.com [IPv6:2a00:1450:400c:c09::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 386D3137B for ; Tue, 7 Feb 2017 23:40:55 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: by mail-wm0-x235.google.com with SMTP id v186so31824198wmd.0 for ; Tue, 07 Feb 2017 15:40:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to; bh=W1GHPbX8CduBoDLkc6uCyrqF/x9FPHBb1xkVQj1Bmgc=; b=jiuQz41pPGL24KRHjryzVqX8czN0nmPOOaKYAEVWCI3WoNh3fXl5p808kTOuNjwIIq FIzs04s+bjYvusNJiNscjx90D94amSTbRelbP/g7lCVNHjnzz8bFdbL7IiFw8qziBbZX 8/VjlOIMz7+4Bvqd3MXtSOccAByOqdgR5ReHP7mgR3uoYz6+MI3Eczyw1//FIcoa7a19 +m4BC//7ZXg6JHTaSZfPB+4aoLsEN/ODe+rjNxpjoN7nfU3/7gIzbcKuXZoPgXgeGxUH GIYvDWvnEghAjJtlI1e6sM4BY+W2e2NfvqsWqGdb1fxg6YIxi8xq2GyEzL7mBzc7zSZ/ UsrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to; bh=W1GHPbX8CduBoDLkc6uCyrqF/x9FPHBb1xkVQj1Bmgc=; b=s2pV1gk69y7gP9C3RmleQAf59TNSl9j1T0Q7Sx865ndwtVUlnP731/UpmtJRS2J+mu kJ26ci1zg1YYbEGLF82oE7qyo9l6smb1Ky/Jkp2unU6aeh7tqzQXgfpMSzx2Yph4yuA6 U5pZxPsMNu7ZvHsxb9FWZv4n9VoRzh+9ArDNjrg6rBQ7o8/7dKEiJM/OKv4GEm/LVwgE afWaAryiC4evt8Dt727CrSfPFLA/TBRrAC57WodHpaFK7+m7bVVqswB8glEgIlN1k2y1 qAcngENj4TjCkaQgY5O91zqnr4/JhSNASAnca4NvtaT/JB0in2Wj3AgtlfnNzbyfXhDv LG8g== X-Gm-Message-State: AMke39mUCUDdt1bMdW07lprVy+pQXXx+ROZaiKQ+8W5YbN4qGeBPWvlvtM+VSEy1OzUkMiPd X-Received: by 10.28.18.130 with SMTP id 124mr16099656wms.8.1486510854307; Tue, 07 Feb 2017 15:40:54 -0800 (PST) Received: from [10.10.1.58] ([185.97.61.26]) by smtp.gmail.com with ESMTPSA id a13sm190495wma.13.2017.02.07.15.40.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Feb 2017 15:40:53 -0800 (PST) Subject: Re: svn commit: r313260 - head/sys/kern To: Ed Maste References: <201702050140.v151eRXX090326@repo.freebsd.org> <42c790bb-df12-2a50-6181-24bac5c72d34@multiplay.co.uk> <20170205030006.GB4375@dft-labs.eu> <20170205151746.GA6841@FreeBSD.org> <20170207145750.GD4772@dft-labs.eu> <8e0f5a4c-16ec-842d-f4f7-32c830f43553@multiplay.co.uk> Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Mateusz Guzik From: Steven Hartland Message-ID: <1a7c31e9-561c-9391-47f1-f25e5381b03f@multiplay.co.uk> Date: Tue, 7 Feb 2017 23:40:53 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-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: Tue, 07 Feb 2017 23:40:56 -0000 On 07/02/2017 20:34, Ed Maste wrote: > On 7 February 2017 at 10:30, Steven Hartland > wrote: >> All I'm suggesting is, while one could guess this may be a performance or >> possibly a compatibility thing, the reason is not obvious, so a small piece >> of detail on why the change was done should always be included. >> >> For this one something like the following would be nice: >> >> Switch fget_unlocked to atomic_fcmpset >> >> Improve performance under contention by switching fget_unlocked to >> use atomic_fcmpset. > I agree, and one of the key reasons to do this is so that there's this > tiny bit of context if someone later runs "git blame" or "svn > annotate" and discovers this change for the line containing > atomic_fcmpset. Comments containing "eliminate memory leak" or "remove > unused variable" have a self-evident reason, but I don't believe > that's true for "switch to atomic_fcmpset." > > Repeating the "switch fget_unlocked to..." in the proposed commit > message above feels redundant to me though, and I would suggest: > > | Switch fget_unlocked to atomic_fcmpset > | > | Improves performance under contention. > > or just: > > | Use atmoic_fcmpset to improve performance under contention All those work for me as they clearly state why the change was made, so I hope this is something we can try to improve moving forward :) From owner-svn-src-head@freebsd.org Wed Feb 8 00:02: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 C00F2CD5F5B; Wed, 8 Feb 2017 00:02:55 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CF3C286; Wed, 8 Feb 2017 00:02:55 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1802sGJ048013; Wed, 8 Feb 2017 00:02:54 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1802sjb048012; Wed, 8 Feb 2017 00:02:54 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <201702080002.v1802sjb048012@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Wed, 8 Feb 2017 00:02:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313410 - head/usr.sbin/bsdinstall/partedit X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Wed, 08 Feb 2017 00:02:55 -0000 Author: rpokala Date: Wed Feb 8 00:02:54 2017 New Revision: 313410 URL: https://svnweb.freebsd.org/changeset/base/313410 Log: Fix indentation (only line in file w/ 8-space indent rather than hard-tab). MFH: 1 week Modified: head/usr.sbin/bsdinstall/partedit/scripted.c Modified: head/usr.sbin/bsdinstall/partedit/scripted.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/scripted.c Tue Feb 7 22:45:59 2017 (r313409) +++ head/usr.sbin/bsdinstall/partedit/scripted.c Wed Feb 8 00:02:54 2017 (r313410) @@ -85,7 +85,7 @@ part_config(char *disk, const char *sche LIST_FOREACH(classp, &mesh.lg_class, lg_class) if (strcmp(classp->lg_name, "PART") == 0) break; - if (classp != NULL) { + if (classp != NULL) { LIST_FOREACH(gpart, &classp->lg_geom, lg_geom) if (strcmp(gpart->lg_name, disk) == 0) break; From owner-svn-src-head@freebsd.org Wed Feb 8 00:23: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 A2DEACD356C; Wed, 8 Feb 2017 00:23:39 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from mr11p00im-asmtp001.me.com (mr11p00im-asmtp001.me.com [17.110.69.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88C56EFB; Wed, 8 Feb 2017 00:23:39 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from process-dkim-sign-daemon.mr11p00im-asmtp001.me.com by mr11p00im-asmtp001.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0OL1006004WUGX00@mr11p00im-asmtp001.me.com>; Wed, 08 Feb 2017 00:23:22 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mac.com; s=4d515a; t=1486513402; bh=Sz4U1Y/aHw02Phh78l+BHMDkQ2e5ayFLQiXwXq6q03I=; h=Date:Subject:From:To:Message-id:MIME-version:Content-type; b=vAfMxIvkIGx+dboTB67r/H9oC5THW37KeUJfva89HtZeVxdjO47jZChRhrv/QmMxb QK8L+NoLqdtwxxc9XhGp/OkEWJgYy8TnKmHqUEtSTG53WrpNBD+r3C3cRQyP/gcZcU vbMJI+LhgejqoJ/JhWF8IX0vV3gq5sAbv9RrCJTfjwYvWeKDxz6QtmoV2EerpOlwDN GlGJ0FrbHlxWRAZmHy8nrdNBL+0YQH8cl4XzckcWDf4woEMhNJWUBWBvJTDhOhSodn AQjUSY2jhbAH3l9znTCUINMlZ4U3LFMgFa7gCvfG4D5ZGLgqmjogpJBqDbILKSIoQ2 2ldzKQmY2yy4Q== Received: from icloud.com ([127.0.0.1]) by mr11p00im-asmtp001.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0OL100LP452WXE10@mr11p00im-asmtp001.me.com>; Wed, 08 Feb 2017 00:23:21 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-02-07_12:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1034 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1603290000 definitions=main-1702080003 User-Agent: Microsoft-MacOutlook/f.1e.0.170107 Date: Tue, 07 Feb 2017 16:23:20 -0800 Subject: Re: svn commit: r313410 - head/usr.sbin/bsdinstall/partedit From: Ravi Pokala Sender: "Pokala, Ravi" To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-id: <7CE41C48-8A21-4888-BF98-210DA2ADFE84@panasas.com> Thread-topic: svn commit: r313410 - head/usr.sbin/bsdinstall/partedit References: <201702080002.v1802sjb048012@repo.freebsd.org> In-reply-to: <201702080002.v1802sjb048012@repo.freebsd.org> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit X-BeenThere: svn-src-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: Wed, 08 Feb 2017 00:23:39 -0000 Err, that should have been s/MFH/MFC/ (obviously) -Ravi (rpokala@) -----Original Message----- From: on behalf of Ravi Pokala Date: 2017-02-07, Tuesday at 16:02 To: , , Subject: svn commit: r313410 - head/usr.sbin/bsdinstall/partedit Author: rpokala Date: Wed Feb 8 00:02:54 2017 New Revision: 313410 URL: https://svnweb.freebsd.org/changeset/base/313410 Log: Fix indentation (only line in file w/ 8-space indent rather than hard-tab). MFH: 1 week Modified: head/usr.sbin/bsdinstall/partedit/scripted.c Modified: head/usr.sbin/bsdinstall/partedit/scripted.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/scripted.c Tue Feb 7 22:45:59 2017 (r313409) +++ head/usr.sbin/bsdinstall/partedit/scripted.c Wed Feb 8 00:02:54 2017 (r313410) @@ -85,7 +85,7 @@ part_config(char *disk, const char *sche LIST_FOREACH(classp, &mesh.lg_class, lg_class) if (strcmp(classp->lg_name, "PART") == 0) break; - if (classp != NULL) { + if (classp != NULL) { LIST_FOREACH(gpart, &classp->lg_geom, lg_geom) if (strcmp(gpart->lg_name, disk) == 0) break; From owner-svn-src-head@freebsd.org Wed Feb 8 00:50: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 1C0CBCD3982; Wed, 8 Feb 2017 00:50:30 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E62D1784; Wed, 8 Feb 2017 00:50:30 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [74.217.198.10] (port=65188 helo=[10.1.4.66]) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1cbFMe-000OPA-G8; Tue, 07 Feb 2017 23:40:00 +0000 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: svn commit: r313410 - head/usr.sbin/bsdinstall/partedit From: Devin Teske In-Reply-To: <201702080002.v1802sjb048012@repo.freebsd.org> Date: Tue, 7 Feb 2017 16:50:28 -0800 Cc: Devin Teske , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201702080002.v1802sjb048012@repo.freebsd.org> To: Ravi Pokala X-Mailer: Apple Mail (2.3124) Sender: devin@shxd.cx X-BeenThere: svn-src-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: Wed, 08 Feb 2017 00:50:30 -0000 Thank you very much, Ravi! =E2=80=94=20 Devin > On Feb 7, 2017, at 4:02 PM, Ravi Pokala wrote: >=20 > Author: rpokala > Date: Wed Feb 8 00:02:54 2017 > New Revision: 313410 > URL: https://svnweb.freebsd.org/changeset/base/313410 >=20 > Log: > Fix indentation (only line in file w/ 8-space indent rather than = hard-tab). >=20 > MFH: 1 week >=20 > Modified: > head/usr.sbin/bsdinstall/partedit/scripted.c >=20 > Modified: head/usr.sbin/bsdinstall/partedit/scripted.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/usr.sbin/bsdinstall/partedit/scripted.c Tue Feb 7 = 22:45:59 2017 (r313409) > +++ head/usr.sbin/bsdinstall/partedit/scripted.c Wed Feb 8 = 00:02:54 2017 (r313410) > @@ -85,7 +85,7 @@ part_config(char *disk, const char *sche > LIST_FOREACH(classp, &mesh.lg_class, lg_class) > if (strcmp(classp->lg_name, "PART") =3D=3D 0) > break; > - if (classp !=3D NULL) { > + if (classp !=3D NULL) { > LIST_FOREACH(gpart, &classp->lg_geom, lg_geom) > if (strcmp(gpart->lg_name, disk) =3D=3D 0) > break; >=20 From owner-svn-src-head@freebsd.org Wed Feb 8 01:31: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 0867ECD46D5; Wed, 8 Feb 2017 01:31:57 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id C60A5DD9; Wed, 8 Feb 2017 01:31:56 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id E3310D66656; Wed, 8 Feb 2017 12:31:47 +1100 (AEDT) Date: Wed, 8 Feb 2017 12:31:46 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Emmanuel Vadot cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313394 - head/sys/kern In-Reply-To: <201702071731.v17HVOtQ081967@repo.freebsd.org> Message-ID: <20170208120650.T1171@besplex.bde.org> References: <201702071731.v17HVOtQ081967@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=BKLDlBYG c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=QZfLhJmqEQRP8M4zX-cA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-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: Wed, 08 Feb 2017 01:31:57 -0000 On Tue, 7 Feb 2017, Emmanuel Vadot wrote: > Log: > subr_sfbus.c need sys/proc.h for struct thread definition. > This fixes kernel build for armv6. > > Discussed with: kib sys/proc.h was accidentally (?) provided by gross namespace pollution on some arches (perhaps on all the arches that use subr_sfbuf.c) in . This pollution is only supplied under INVARIANTS, so it is not completely accidental. However, at least on i386, sys/proc.h and its nested pollution isn't even used for anything except to pollute. has lots of other undocumented pollution which is actually partially used (mainly sys/pcpu.h and its pollution). Bruce From owner-svn-src-head@freebsd.org Wed Feb 8 03:21: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 18EABCD41A4; Wed, 8 Feb 2017 03:21:31 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D537C1DD5; Wed, 8 Feb 2017 03:21:30 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v183LTls028879; Wed, 8 Feb 2017 03:21:29 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v183LTDV028878; Wed, 8 Feb 2017 03:21:29 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201702080321.v183LTDV028878@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 8 Feb 2017 03:21:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313411 - head/contrib/elftoolchain/libelftc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Wed, 08 Feb 2017 03:21:31 -0000 Author: jhibbits Date: Wed Feb 8 03:21:29 2017 New Revision: 313411 URL: https://svnweb.freebsd.org/changeset/base/313411 Log: Add elf*-powerpc-freebsd targets to the elftoolchain target list FreeBSD uses the full target triple when generating embedded rootfs images (MFS_IMAGE= make option). Without this change objcopy errors out with: objcopy: elf64-poewrpc-freebsd: invalid target name MFC after: 2 weeks Modified: head/contrib/elftoolchain/libelftc/libelftc_bfdtarget.c Modified: head/contrib/elftoolchain/libelftc/libelftc_bfdtarget.c ============================================================================== --- head/contrib/elftoolchain/libelftc/libelftc_bfdtarget.c Wed Feb 8 00:02:54 2017 (r313410) +++ head/contrib/elftoolchain/libelftc/libelftc_bfdtarget.c Wed Feb 8 03:21:29 2017 (r313411) @@ -127,6 +127,15 @@ struct _Elftc_Bfd_Target _libelftc_targe }, { + .bt_name = "elf32-powerpc-freebsd", + .bt_type = ETF_ELF, + .bt_byteorder = ELFDATA2MSB, + .bt_elfclass = ELFCLASS32, + .bt_machine = EM_PPC, + .bt_osabi = ELFOSABI_FREEBSD, + }, + + { .bt_name = "elf32-powerpcle", .bt_type = ETF_ELF, .bt_byteorder = ELFDATA2LSB, @@ -290,6 +299,15 @@ struct _Elftc_Bfd_Target _libelftc_targe }, { + .bt_name = "elf64-powerpc-freebsd", + .bt_type = ETF_ELF, + .bt_byteorder = ELFDATA2MSB, + .bt_elfclass = ELFCLASS64, + .bt_machine = EM_PPC64, + .bt_osabi = ELFOSABI_FREEBSD, + }, + + { .bt_name = "elf64-powerpcle", .bt_type = ETF_ELF, .bt_byteorder = ELFDATA2LSB, From owner-svn-src-head@freebsd.org Wed Feb 8 06:43: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 7207DCC7D50; Wed, 8 Feb 2017 06:43:03 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44290D92; Wed, 8 Feb 2017 06:43:03 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v186h2Hm009230; Wed, 8 Feb 2017 06:43:02 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v186h2Ic009228; Wed, 8 Feb 2017 06:43:02 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702080643.v186h2Ic009228@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 8 Feb 2017 06:43:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313412 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Wed, 08 Feb 2017 06:43:03 -0000 Author: adrian Date: Wed Feb 8 06:43:02 2017 New Revision: 313412 URL: https://svnweb.freebsd.org/changeset/base/313412 Log: [iwm] Get rid of iwm_disable_rx_dma, just use iwm_pcie_rx_stop directly. * This also fixes one of many small nic lock handling bugs, and matches iwlwifi's code. Obtained from: DragonflyBSD git 50787d03cd0a0366c9cc4a055bb6977e5f65c85d Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_pcie_trans.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Wed Feb 8 03:21:29 2017 (r313411) +++ head/sys/dev/iwm/if_iwm.c Wed Feb 8 06:43:02 2017 (r313412) @@ -302,7 +302,6 @@ static int iwm_alloc_sched(struct iwm_so static int iwm_alloc_kw(struct iwm_softc *); static int iwm_alloc_ict(struct iwm_softc *); static int iwm_alloc_rx_ring(struct iwm_softc *, struct iwm_rx_ring *); -static void iwm_disable_rx_dma(struct iwm_softc *); static void iwm_reset_rx_ring(struct iwm_softc *, struct iwm_rx_ring *); static void iwm_free_rx_ring(struct iwm_softc *, struct iwm_rx_ring *); static int iwm_alloc_tx_ring(struct iwm_softc *, struct iwm_tx_ring *, @@ -1104,18 +1103,6 @@ fail: iwm_free_rx_ring(sc, ring); } static void -iwm_disable_rx_dma(struct iwm_softc *sc) -{ - /* XXX conditional nic locks are stupid */ - /* XXX print out if we can't lock the NIC? */ - if (iwm_nic_lock(sc)) { - /* XXX handle if RX stop doesn't finish? */ - (void) iwm_pcie_rx_stop(sc); - iwm_nic_unlock(sc); - } -} - -static void iwm_reset_rx_ring(struct iwm_softc *sc, struct iwm_rx_ring *ring) { /* Reset the ring state */ @@ -1401,7 +1388,7 @@ iwm_stop_device(struct iwm_softc *sc) } iwm_nic_unlock(sc); } - iwm_disable_rx_dma(sc); + iwm_pcie_rx_stop(sc); /* Stop RX ring. */ iwm_reset_rx_ring(sc, &sc->rxq); @@ -1485,16 +1472,18 @@ iwm_mvm_nic_config(struct iwm_softc *sc) static int iwm_nic_rx_init(struct iwm_softc *sc) { - if (!iwm_nic_lock(sc)) - return EBUSY; - /* * Initialize RX ring. This is from the iwn driver. */ memset(sc->rxq.stat, 0, sizeof(*sc->rxq.stat)); - /* stop DMA */ - iwm_disable_rx_dma(sc); + /* Stop Rx DMA */ + iwm_pcie_rx_stop(sc); + + if (!iwm_nic_lock(sc)) + return EBUSY; + + /* reset and flush pointers */ IWM_WRITE(sc, IWM_FH_MEM_RCSR_CHNL0_RBDCB_WPTR, 0); IWM_WRITE(sc, IWM_FH_MEM_RCSR_CHNL0_FLUSH_RB_REQ, 0); IWM_WRITE(sc, IWM_FH_RSCSR_CHNL0_RDPTR, 0); Modified: head/sys/dev/iwm/if_iwm_pcie_trans.c ============================================================================== --- head/sys/dev/iwm/if_iwm_pcie_trans.c Wed Feb 8 03:21:29 2017 (r313411) +++ head/sys/dev/iwm/if_iwm_pcie_trans.c Wed Feb 8 06:43:02 2017 (r313412) @@ -572,10 +572,14 @@ iwm_set_pwr(struct iwm_softc *sc) int iwm_pcie_rx_stop(struct iwm_softc *sc) { - - IWM_WRITE(sc, IWM_FH_MEM_RCSR_CHNL0_CONFIG_REG, 0); - return (iwm_poll_bit(sc, IWM_FH_MEM_RSSR_RX_STATUS_REG, - IWM_FH_RSSR_CHNL0_RX_STATUS_CHNL_IDLE, - IWM_FH_RSSR_CHNL0_RX_STATUS_CHNL_IDLE, - 1000)); + int ret = 0; + if (iwm_nic_lock(sc)) { + IWM_WRITE(sc, IWM_FH_MEM_RCSR_CHNL0_CONFIG_REG, 0); + ret = iwm_poll_bit(sc, IWM_FH_MEM_RSSR_RX_STATUS_REG, + IWM_FH_RSSR_CHNL0_RX_STATUS_CHNL_IDLE, + IWM_FH_RSSR_CHNL0_RX_STATUS_CHNL_IDLE, + 1000); + iwm_nic_unlock(sc); + } + return ret; } From owner-svn-src-head@freebsd.org Wed Feb 8 06:44: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 D3635CC7DDB; Wed, 8 Feb 2017 06:44:51 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB8B7EE3; Wed, 8 Feb 2017 06:44:51 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v186iotN009349; Wed, 8 Feb 2017 06:44:50 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v186io5X009346; Wed, 8 Feb 2017 06:44:50 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702080644.v186io5X009346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 8 Feb 2017 06:44:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313413 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Wed, 08 Feb 2017 06:44:51 -0000 Author: adrian Date: Wed Feb 8 06:44:50 2017 New Revision: 313413 URL: https://svnweb.freebsd.org/changeset/base/313413 Log: [iwm] Add scan abort functions, to properly cancel a running scan. * Uses the notification wait api to wait for the corresponding scan complete notification after sending the abort command. Taken-From: Linux iwlwifi Obtained from: DragonflyBSD commit b484d09d54301740f036ddf02008117f563960c2 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_scan.c head/sys/dev/iwm/if_iwm_scan.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Wed Feb 8 06:43:02 2017 (r313412) +++ head/sys/dev/iwm/if_iwm.c Wed Feb 8 06:44:50 2017 (r313413) @@ -5447,7 +5447,9 @@ iwm_notif_intr(struct iwm_softc *sc) case IWM_TIME_EVENT_CMD: case IWM_WIDE_ID(IWM_ALWAYS_LONG_GROUP, IWM_SCAN_CFG_CMD): case IWM_WIDE_ID(IWM_ALWAYS_LONG_GROUP, IWM_SCAN_REQ_UMAC): + case IWM_WIDE_ID(IWM_ALWAYS_LONG_GROUP, IWM_SCAN_ABORT_UMAC): case IWM_SCAN_OFFLOAD_REQUEST_CMD: + case IWM_SCAN_OFFLOAD_ABORT_CMD: case IWM_REPLY_BEACON_FILTERING_CMD: case IWM_MAC_PM_POWER_TABLE: case IWM_TIME_QUOTA_CMD: Modified: head/sys/dev/iwm/if_iwm_scan.c ============================================================================== --- head/sys/dev/iwm/if_iwm_scan.c Wed Feb 8 06:43:02 2017 (r313412) +++ head/sys/dev/iwm/if_iwm_scan.c Wed Feb 8 06:44:50 2017 (r313413) @@ -153,6 +153,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -737,3 +738,86 @@ iwm_mvm_lmac_scan(struct iwm_softc *sc) free(req, M_DEVBUF); return ret; } + +static int +iwm_mvm_lmac_scan_abort(struct iwm_softc *sc) +{ + int ret; + struct iwm_host_cmd hcmd = { + .id = IWM_SCAN_OFFLOAD_ABORT_CMD, + .len = { 0, }, + .data = { NULL, }, + .flags = IWM_CMD_SYNC, + }; + uint32_t status; + + ret = iwm_mvm_send_cmd_status(sc, &hcmd, &status); + if (ret) + return ret; + + if (status != IWM_CAN_ABORT_STATUS) { + /* + * The scan abort will return 1 for success or + * 2 for "failure". A failure condition can be + * due to simply not being in an active scan which + * can occur if we send the scan abort before the + * microcode has notified us that a scan is completed. + */ + IWM_DPRINTF(sc, IWM_DEBUG_SCAN, + "SCAN OFFLOAD ABORT ret %d.\n", status); + ret = ENOENT; + } + + return ret; +} + +static int +iwm_mvm_umac_scan_abort(struct iwm_softc *sc) +{ + struct iwm_umac_scan_abort cmd = {}; + int uid, ret; + + uid = 0; + cmd.uid = htole32(uid); + + IWM_DPRINTF(sc, IWM_DEBUG_SCAN, "Sending scan abort, uid %u\n", uid); + + ret = iwm_mvm_send_cmd_pdu(sc, + iwm_cmd_id(IWM_SCAN_ABORT_UMAC, + IWM_ALWAYS_LONG_GROUP, 0), + 0, sizeof(cmd), &cmd); + + return ret; +} + +int +iwm_mvm_scan_stop_wait(struct iwm_softc *sc) +{ + struct iwm_notification_wait wait_scan_done; + static const uint16_t scan_done_notif[] = { IWM_SCAN_COMPLETE_UMAC, + IWM_SCAN_OFFLOAD_COMPLETE, }; + int ret; + + iwm_init_notification_wait(sc->sc_notif_wait, &wait_scan_done, + scan_done_notif, nitems(scan_done_notif), + NULL, NULL); + + IWM_DPRINTF(sc, IWM_DEBUG_SCAN, "Preparing to stop scan\n"); + + if (isset(sc->sc_enabled_capa, IWM_UCODE_TLV_CAPA_UMAC_SCAN)) + ret = iwm_mvm_umac_scan_abort(sc); + else + ret = iwm_mvm_lmac_scan_abort(sc); + + if (ret) { + IWM_DPRINTF(sc, IWM_DEBUG_SCAN, "couldn't stop scan\n"); + iwm_remove_notification(sc->sc_notif_wait, &wait_scan_done); + return ret; + } + + IWM_UNLOCK(sc); + ret = iwm_wait_notification(sc->sc_notif_wait, &wait_scan_done, hz); + IWM_LOCK(sc); + + return ret; +} Modified: head/sys/dev/iwm/if_iwm_scan.h ============================================================================== --- head/sys/dev/iwm/if_iwm_scan.h Wed Feb 8 06:43:02 2017 (r313412) +++ head/sys/dev/iwm/if_iwm_scan.h Wed Feb 8 06:44:50 2017 (r313413) @@ -109,5 +109,6 @@ extern int iwm_mvm_lmac_scan(struct iwm_softc *sc); extern int iwm_mvm_config_umac_scan(struct iwm_softc *); extern int iwm_mvm_umac_scan(struct iwm_softc *); +extern int iwm_mvm_scan_stop_wait(struct iwm_softc *sc); #endif /* __IF_IWN_SCAN_H__ */ From owner-svn-src-head@freebsd.org Wed Feb 8 06:51: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 B03BDCC7E89; Wed, 8 Feb 2017 06:51:00 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B07010FF; Wed, 8 Feb 2017 06:51:00 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v186oxI8010354; Wed, 8 Feb 2017 06:50:59 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v186oxI5010352; Wed, 8 Feb 2017 06:50:59 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702080650.v186oxI5010352@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 8 Feb 2017 06:50:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313414 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Wed, 08 Feb 2017 06:51:00 -0000 Author: adrian Date: Wed Feb 8 06:50:59 2017 New Revision: 313414 URL: https://svnweb.freebsd.org/changeset/base/313414 Log: [iwm] Use iwm_mvm_scan_stop_wait to properly abort scans. * Add IWM_FLAG_SCAN_RUNNING to sc->sc_flags to track whether the firmware is currently running a scan, in order to decide wheter iwm_scan_end needs to abort a running scan. * In iwm_scan_end, if the scan is still running, we now abort it, in order to keep the firmware scanning state in sync. * Try to make things a bit simpler, by reacting on the IWM_SCAN_OFFLOAD_COMPLETE and IWM_SCAN_COMPLETE_UMAC notifications, instead of IWM_SCAN_ITERATION_COMPLETE and IWM_SCAN_ITERATION_COMPLETE_UMAC. This should be fine since we always only tell the firmware to do a single scan iteration anyway. Obtained from: DragonflyBSD commit 1f249c981c4e89e7cde1836a75b61cac36dc7ac5 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Wed Feb 8 06:44:50 2017 (r313413) +++ head/sys/dev/iwm/if_iwm.c Wed Feb 8 06:50:59 2017 (r313414) @@ -4951,6 +4951,7 @@ iwm_stop(struct iwm_softc *sc) iwm_led_blink_stop(sc); sc->sc_tx_timer = 0; iwm_stop_device(sc); + sc->sc_flags &= ~IWM_FLAG_SCAN_RUNNING; } static void @@ -5475,6 +5476,10 @@ iwm_notif_intr(struct iwm_softc *sc) case IWM_SCAN_OFFLOAD_COMPLETE: { struct iwm_periodic_scan_complete *notif; notif = (void *)pkt->data; + if (sc->sc_flags & IWM_FLAG_SCAN_RUNNING) { + sc->sc_flags &= ~IWM_FLAG_SCAN_RUNNING; + ieee80211_runtask(ic, &sc->sc_es_task); + } break; } @@ -5492,9 +5497,10 @@ iwm_notif_intr(struct iwm_softc *sc) IWM_DPRINTF(sc, IWM_DEBUG_SCAN, "UMAC scan complete, status=0x%x\n", notif->status); -#if 0 /* XXX This would be a duplicate scan end call */ - taskqueue_enqueue(sc->sc_tq, &sc->sc_es_task); -#endif + if (sc->sc_flags & IWM_FLAG_SCAN_RUNNING) { + sc->sc_flags &= ~IWM_FLAG_SCAN_RUNNING; + ieee80211_runtask(ic, &sc->sc_es_task); + } break; } @@ -6254,15 +6260,21 @@ iwm_scan_start(struct ieee80211com *ic) int error; IWM_LOCK(sc); + if (sc->sc_flags & IWM_FLAG_SCAN_RUNNING) { + /* This should not be possible */ + device_printf(sc->sc_dev, + "%s: Previous scan not completed yet\n", __func__); + } if (isset(sc->sc_enabled_capa, IWM_UCODE_TLV_CAPA_UMAC_SCAN)) error = iwm_mvm_umac_scan(sc); else error = iwm_mvm_lmac_scan(sc); if (error != 0) { - device_printf(sc->sc_dev, "could not initiate 2 GHz scan\n"); + device_printf(sc->sc_dev, "could not initiate scan\n"); IWM_UNLOCK(sc); ieee80211_cancel_scan(vap); } else { + sc->sc_flags |= IWM_FLAG_SCAN_RUNNING; iwm_led_blink_start(sc); IWM_UNLOCK(sc); } @@ -6278,7 +6290,23 @@ iwm_scan_end(struct ieee80211com *ic) iwm_led_blink_stop(sc); if (vap->iv_state == IEEE80211_S_RUN) iwm_mvm_led_enable(sc); + if (sc->sc_flags & IWM_FLAG_SCAN_RUNNING) { + /* + * Removing IWM_FLAG_SCAN_RUNNING now, is fine because + * both iwm_scan_end and iwm_scan_start run in the ic->ic_tq + * taskqueue. + */ + sc->sc_flags &= ~IWM_FLAG_SCAN_RUNNING; + iwm_mvm_scan_stop_wait(sc); + } IWM_UNLOCK(sc); + + /* + * Make sure we don't race, if sc_es_task is still enqueued here. + * This is to make sure that it won't call ieee80211_scan_done + * when we have already started the next scan. + */ + taskqueue_cancel(ic->ic_tq, &sc->sc_es_task, NULL); } static void Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Wed Feb 8 06:44:50 2017 (r313413) +++ head/sys/dev/iwm/if_iwmvar.h Wed Feb 8 06:50:59 2017 (r313414) @@ -415,6 +415,7 @@ struct iwm_softc { #define IWM_FLAG_RFKILL (1 << 3) #define IWM_FLAG_BUSY (1 << 4) #define IWM_FLAG_SCANNING (1 << 5) +#define IWM_FLAG_SCAN_RUNNING (1 << 6) struct intr_config_hook sc_preinit_hook; struct callout sc_watchdog_to; From owner-svn-src-head@freebsd.org Wed Feb 8 06:53: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 7A659CD3050; Wed, 8 Feb 2017 06:53:25 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4EE3414ED; Wed, 8 Feb 2017 06:53:25 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v186rOZP013231; Wed, 8 Feb 2017 06:53:24 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v186rNVx013225; Wed, 8 Feb 2017 06:53:23 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702080653.v186rNVx013225@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 8 Feb 2017 06:53:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313415 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Wed, 08 Feb 2017 06:53:25 -0000 Author: adrian Date: Wed Feb 8 06:53:23 2017 New Revision: 313415 URL: https://svnweb.freebsd.org/changeset/base/313415 Log: [iwm] Implement apmg_wake_up_wa workaround properly for 7000 family. * Add iwm_pcie_set_cmd_in_flight() and iwm_pcie_clear_cmd_in_flight() helper methods. * Use ring->queued tracking in the command queue to set/clear the cmd_hold_nic_awake bit at the right points. Taken-From: Linux iwlwifi Obtained from: DragonflyBSD commit ce43f57f5308b579ea21e8a5a29969114ba2247d Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_pcie_trans.c head/sys/dev/iwm/if_iwm_pcie_trans.h head/sys/dev/iwm/if_iwm_util.c head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Wed Feb 8 06:50:59 2017 (r313414) +++ head/sys/dev/iwm/if_iwm.c Wed Feb 8 06:53:23 2017 (r313415) @@ -182,7 +182,8 @@ __FBSDID("$FreeBSD$"); #define IWM_DEVICE_7000_COMMON \ .device_family = IWM_DEVICE_FAMILY_7000, \ .eeprom_size = IWM_OTP_LOW_IMAGE_SIZE_FAMILY_7000, \ - .nvm_hw_section_num = IWM_NVM_HW_SECTION_NUM_FAMILY_7000 + .nvm_hw_section_num = IWM_NVM_HW_SECTION_NUM_FAMILY_7000, \ + .apmg_wake_up_wa = 1 const struct iwm_cfg iwm7260_cfg = { .fw_name = IWM7260_FW, @@ -1251,6 +1252,9 @@ iwm_reset_tx_ring(struct iwm_softc *sc, sc->qfullmsk &= ~(1 << ring->qid); ring->queued = 0; ring->cur = 0; + + if (ring->qid == IWM_MVM_CMD_QUEUE && sc->cmd_hold_nic_awake) + iwm_pcie_clear_cmd_in_flight(sc); } static void @@ -3338,6 +3342,18 @@ iwm_cmd_done(struct iwm_softc *sc, struc data->m = NULL; } wakeup(&ring->desc[pkt->hdr.idx]); + + if (((pkt->hdr.idx + ring->queued) % IWM_TX_RING_COUNT) != ring->cur) { + device_printf(sc->sc_dev, + "%s: Some HCMDs skipped?: idx=%d queued=%d cur=%d\n", + __func__, pkt->hdr.idx, ring->queued, ring->cur); + /* XXX call iwm_force_nmi() */ + } + + KASSERT(ring->queued > 0, ("ring->queued is empty?")); + ring->queued--; + if (ring->queued == 0) + iwm_pcie_clear_cmd_in_flight(sc); } #if 0 @@ -5580,9 +5596,6 @@ iwm_notif_intr(struct iwm_softc *sc) ADVANCE_RXQ(sc); } - IWM_CLRBITS(sc, IWM_CSR_GP_CNTRL, - IWM_CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); - /* * Tell the firmware what we have processed. * Seems like the hardware gets upset unless we align Modified: head/sys/dev/iwm/if_iwm_pcie_trans.c ============================================================================== --- head/sys/dev/iwm/if_iwm_pcie_trans.c Wed Feb 8 06:50:59 2017 (r313414) +++ head/sys/dev/iwm/if_iwm_pcie_trans.c Wed Feb 8 06:53:23 2017 (r313415) @@ -253,6 +253,9 @@ iwm_nic_lock(struct iwm_softc *sc) { int rv = 0; + if (sc->cmd_hold_nic_awake) + return 1; + IWM_SETBITS(sc, IWM_CSR_GP_CNTRL, IWM_CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); @@ -277,6 +280,9 @@ iwm_nic_lock(struct iwm_softc *sc) void iwm_nic_unlock(struct iwm_softc *sc) { + if (sc->cmd_hold_nic_awake) + return; + IWM_CLRBITS(sc, IWM_CSR_GP_CNTRL, IWM_CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); } @@ -583,3 +589,55 @@ iwm_pcie_rx_stop(struct iwm_softc *sc) } return ret; } + +void +iwm_pcie_clear_cmd_in_flight(struct iwm_softc *sc) +{ + if (!sc->cfg->apmg_wake_up_wa) + return; + + if (!sc->cmd_hold_nic_awake) { + device_printf(sc->sc_dev, + "%s: cmd_hold_nic_awake not set\n", __func__); + return; + } + + sc->cmd_hold_nic_awake = 0; + IWM_CLRBITS(sc, IWM_CSR_GP_CNTRL, + IWM_CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); +} + +int +iwm_pcie_set_cmd_in_flight(struct iwm_softc *sc) +{ + int ret; + + /* + * wake up the NIC to make sure that the firmware will see the host + * command - we will let the NIC sleep once all the host commands + * returned. This needs to be done only on NICs that have + * apmg_wake_up_wa set. + */ + if (sc->cfg->apmg_wake_up_wa && + !sc->cmd_hold_nic_awake) { + + IWM_SETBITS(sc, IWM_CSR_GP_CNTRL, + IWM_CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); + + ret = iwm_poll_bit(sc, IWM_CSR_GP_CNTRL, + IWM_CSR_GP_CNTRL_REG_VAL_MAC_ACCESS_EN, + (IWM_CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY | + IWM_CSR_GP_CNTRL_REG_FLAG_GOING_TO_SLEEP), + 15000); + if (ret == 0) { + IWM_CLRBITS(sc, IWM_CSR_GP_CNTRL, + IWM_CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); + device_printf(sc->sc_dev, + "%s: Failed to wake NIC for hcmd\n", __func__); + return EIO; + } + sc->cmd_hold_nic_awake = 1; + } + + return 0; +} Modified: head/sys/dev/iwm/if_iwm_pcie_trans.h ============================================================================== --- head/sys/dev/iwm/if_iwm_pcie_trans.h Wed Feb 8 06:50:59 2017 (r313414) +++ head/sys/dev/iwm/if_iwm_pcie_trans.h Wed Feb 8 06:53:23 2017 (r313415) @@ -129,4 +129,7 @@ extern int iwm_start_hw(struct iwm_softc extern void iwm_set_pwr(struct iwm_softc *sc); extern int iwm_pcie_rx_stop(struct iwm_softc *sc); +extern int iwm_pcie_set_cmd_in_flight(struct iwm_softc *sc); +extern void iwm_pcie_clear_cmd_in_flight(struct iwm_softc *sc); + #endif Modified: head/sys/dev/iwm/if_iwm_util.c ============================================================================== --- head/sys/dev/iwm/if_iwm_util.c Wed Feb 8 06:50:59 2017 (r313414) +++ head/sys/dev/iwm/if_iwm_util.c Wed Feb 8 06:53:23 2017 (r313415) @@ -305,17 +305,10 @@ iwm_send_cmd(struct iwm_softc *sc, struc bus_dmamap_sync(ring->desc_dma.tag, ring->desc_dma.map, BUS_DMASYNC_PREWRITE); - IWM_SETBITS(sc, IWM_CSR_GP_CNTRL, - IWM_CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); - if (!iwm_poll_bit(sc, IWM_CSR_GP_CNTRL, - IWM_CSR_GP_CNTRL_REG_VAL_MAC_ACCESS_EN, - (IWM_CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY | - IWM_CSR_GP_CNTRL_REG_FLAG_GOING_TO_SLEEP), 15000)) { - device_printf(sc->sc_dev, - "%s: acquiring device failed\n", __func__); - error = EBUSY; + error = iwm_pcie_set_cmd_in_flight(sc); + if (error) goto out; - } + ring->queued++; #if 0 iwm_update_sched(sc, ring->qid, ring->cur, 0, 0); Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Wed Feb 8 06:50:59 2017 (r313414) +++ head/sys/dev/iwm/if_iwmvar.h Wed Feb 8 06:53:23 2017 (r313415) @@ -389,6 +389,8 @@ enum iwm_device_family { * @host_interrupt_operation_mode: device needs host interrupt operation * mode set * @nvm_hw_section_num: the ID of the HW NVM section + * @apmg_wake_up_wa: should the MAC access REQ be asserted when a command + * is in flight. This is due to a HW bug in 7260, 3160 and 7265. */ struct iwm_cfg { const char *fw_name; @@ -396,6 +398,7 @@ struct iwm_cfg { enum iwm_device_family device_family; int host_interrupt_operation_mode; uint8_t nvm_hw_section_num; + int apmg_wake_up_wa; }; struct iwm_softc { @@ -521,6 +524,8 @@ struct iwm_softc { int sc_max_rssi; struct iwm_notif_wait_data *sc_notif_wait; + + int cmd_hold_nic_awake; }; #define IWM_LOCK_INIT(_sc) \ From owner-svn-src-head@freebsd.org Wed Feb 8 06:54: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 584A4CD30E4; Wed, 8 Feb 2017 06:54:10 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 257A51681; Wed, 8 Feb 2017 06:54:10 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v186s9ie013302; Wed, 8 Feb 2017 06:54:09 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v186s9lg013301; Wed, 8 Feb 2017 06:54:09 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702080654.v186s9lg013301@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 8 Feb 2017 06:54:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313416 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Wed, 08 Feb 2017 06:54:10 -0000 Author: adrian Date: Wed Feb 8 06:54:08 2017 New Revision: 313416 URL: https://svnweb.freebsd.org/changeset/base/313416 Log: [iwm] Only for family 7000 power-down busmaster DMA clocks when stopping. Taken-From: Linux iwlwifi Obtained from: DragonflyBSD commit 4c45994fcc77373ae2fb0901db15368c9731f641 Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Wed Feb 8 06:53:23 2017 (r313415) +++ head/sys/dev/iwm/if_iwm.c Wed Feb 8 06:54:08 2017 (r313416) @@ -1401,11 +1401,12 @@ iwm_stop_device(struct iwm_softc *sc) for (qid = 0; qid < nitems(sc->txq); qid++) iwm_reset_tx_ring(sc, &sc->txq[qid]); - /* - * Power-down device's busmaster DMA clocks - */ - iwm_write_prph(sc, IWM_APMG_CLK_DIS_REG, IWM_APMG_CLK_VAL_DMA_CLK_RQT); - DELAY(5); + if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000) { + /* Power-down device's busmaster DMA clocks */ + iwm_write_prph(sc, IWM_APMG_CLK_DIS_REG, + IWM_APMG_CLK_VAL_DMA_CLK_RQT); + DELAY(5); + } /* Make sure (redundant) we've released our request to stay awake */ IWM_CLRBITS(sc, IWM_CSR_GP_CNTRL, From owner-svn-src-head@freebsd.org Wed Feb 8 06:56: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 241EECD317C; Wed, 8 Feb 2017 06:56:30 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F06B21814; Wed, 8 Feb 2017 06:56:29 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v186uTCl013449; Wed, 8 Feb 2017 06:56:29 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v186uS5i013445; Wed, 8 Feb 2017 06:56:28 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702080656.v186uS5i013445@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 8 Feb 2017 06:56:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313417 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Wed, 08 Feb 2017 06:56:30 -0000 Author: adrian Date: Wed Feb 8 06:56:28 2017 New Revision: 313417 URL: https://svnweb.freebsd.org/changeset/base/313417 Log: [iwm] Very basic DTS thermal sensor support (prints temp as debug msg). * Adds IWM_DEBUG_TEMP debug message type, for printing messages related to temperature sensors and thermal/TDP infos. * The firmware regularly sends us DTS measurement notifications, so just print the temperature value as a debugging message. (Adrian's addition): * Eventually this can be used by the driver to limit transmit rate / power to try and do some thermal throttling. Obtained from: DragonflyBSD commit efb7d4eb5c3140889a8880e12fd83c7bbfd0059d Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_debug.h head/sys/dev/iwm/if_iwmreg.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Wed Feb 8 06:54:08 2017 (r313416) +++ head/sys/dev/iwm/if_iwm.c Wed Feb 8 06:56:28 2017 (r313417) @@ -5451,8 +5451,20 @@ iwm_notif_intr(struct iwm_softc *sc) notif->source_id, sc->sc_fw_mcc); break; } - case IWM_DTS_MEASUREMENT_NOTIFICATION: + case IWM_DTS_MEASUREMENT_NOTIFICATION: { + struct iwm_dts_measurement_notif_v1 *notif; + + if (iwm_rx_packet_payload_len(pkt) < sizeof(*notif)) { + device_printf(sc->sc_dev, + "Invalid DTS_MEASUREMENT_NOTIFICATION\n"); + break; + } + notif = (void *)pkt->data; + IWM_DPRINTF(sc, IWM_DEBUG_TEMP, + "IWM_DTS_MEASUREMENT_NOTIFICATION - %d\n", + notif->temp); break; + } case IWM_PHY_CONFIGURATION_CMD: case IWM_TX_ANT_CONFIGURATION_CMD: Modified: head/sys/dev/iwm/if_iwm_debug.h ============================================================================== --- head/sys/dev/iwm/if_iwm_debug.h Wed Feb 8 06:54:08 2017 (r313416) +++ head/sys/dev/iwm/if_iwm_debug.h Wed Feb 8 06:56:28 2017 (r313417) @@ -41,6 +41,7 @@ enum { IWM_DEBUG_FIRMWARE_TLV = 0x00020000, /* Firmware TLV parsing */ IWM_DEBUG_TRANS = 0x00040000, /* Transport layer (eg PCIe) */ IWM_DEBUG_EEPROM = 0x00080000, /* EEPROM/channel information */ + IWM_DEBUG_TEMP = 0x00100000, /* Thermal Sensor handling */ IWM_DEBUG_REGISTER = 0x20000000, /* print chipset register */ IWM_DEBUG_TRACE = 0x40000000, /* Print begin and start driver function */ IWM_DEBUG_FATAL = 0x80000000, /* fatal errors */ Modified: head/sys/dev/iwm/if_iwmreg.h ============================================================================== --- head/sys/dev/iwm/if_iwmreg.h Wed Feb 8 06:54:08 2017 (r313416) +++ head/sys/dev/iwm/if_iwmreg.h Wed Feb 8 06:56:28 2017 (r313417) @@ -5978,6 +5978,30 @@ enum iwm_mcc_source { IWM_MCC_SOURCE_GETTING_MCC_TEST_MODE = 0x11, }; +/** + * struct iwm_dts_measurement_notif_v1 - measurements notification + * + * @temp: the measured temperature + * @voltage: the measured voltage + */ +struct iwm_dts_measurement_notif_v1 { + int32_t temp; + int32_t voltage; +} __packed; /* TEMPERATURE_MEASUREMENT_TRIGGER_NTFY_S_VER_1*/ + +/** + * struct iwm_dts_measurement_notif_v2 - measurements notification + * + * @temp: the measured temperature + * @voltage: the measured voltage + * @threshold_idx: the trip index that was crossed + */ +struct iwm_dts_measurement_notif_v2 { + int32_t temp; + int32_t voltage; + int32_t threshold_idx; +} __packed; /* TEMPERATURE_MEASUREMENT_TRIGGER_NTFY_S_VER_2 */ + /* * Some cherry-picked definitions */ From owner-svn-src-head@freebsd.org Wed Feb 8 06:57: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 B415FCD3231; Wed, 8 Feb 2017 06:57:22 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69FC519A2; Wed, 8 Feb 2017 06:57:22 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v186vLrR013522; Wed, 8 Feb 2017 06:57:21 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v186vLTw013520; Wed, 8 Feb 2017 06:57:21 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702080657.v186vLTw013520@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 8 Feb 2017 06:57:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313418 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Wed, 08 Feb 2017 06:57:22 -0000 Author: adrian Date: Wed Feb 8 06:57:21 2017 New Revision: 313418 URL: https://svnweb.freebsd.org/changeset/base/313418 Log: [iwm] Recognize IWM_DTS_MEASUREMENT_NOTIF_WIDE notification. * Add the command groups enum, and the iwm_phy_ops_subcmd_ids enum to if_iwmreg.h definitions. * The IWM_DTS_MEASUREMENT_NOTIF_WIDE notification will be generated by version 17 firmware. Taken-From: Linux iwlwifi Obtained from: DragonflyBSD commit 4d8d6f9def2ffb60aaf2d88f72f069a96c0b4e3f Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwmreg.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Wed Feb 8 06:56:28 2017 (r313417) +++ head/sys/dev/iwm/if_iwm.c Wed Feb 8 06:57:21 2017 (r313418) @@ -5451,7 +5451,9 @@ iwm_notif_intr(struct iwm_softc *sc) notif->source_id, sc->sc_fw_mcc); break; } - case IWM_DTS_MEASUREMENT_NOTIFICATION: { + case IWM_DTS_MEASUREMENT_NOTIFICATION: + case IWM_WIDE_ID(IWM_PHY_OPS_GROUP, + IWM_DTS_MEASUREMENT_NOTIF_WIDE): { struct iwm_dts_measurement_notif_v1 *notif; if (iwm_rx_packet_payload_len(pkt) < sizeof(*notif)) { Modified: head/sys/dev/iwm/if_iwmreg.h ============================================================================== --- head/sys/dev/iwm/if_iwmreg.h Wed Feb 8 06:56:28 2017 (r313417) +++ head/sys/dev/iwm/if_iwmreg.h Wed Feb 8 06:57:21 2017 (r313418) @@ -1949,6 +1949,25 @@ enum { IWM_REPLY_MAX = 0xff, }; +enum iwm_phy_ops_subcmd_ids { + IWM_CMD_DTS_MEASUREMENT_TRIGGER_WIDE = 0x0, + IWM_CTDP_CONFIG_CMD = 0x03, + IWM_TEMP_REPORTING_THRESHOLDS_CMD = 0x04, + IWM_CT_KILL_NOTIFICATION = 0xFE, + IWM_DTS_MEASUREMENT_NOTIF_WIDE = 0xFF, +}; + +/* command groups */ +enum { + IWM_LEGACY_GROUP = 0x0, + IWM_LONG_GROUP = 0x1, + IWM_SYSTEM_GROUP = 0x2, + IWM_MAC_CONF_GROUP = 0x3, + IWM_PHY_OPS_GROUP = 0x4, + IWM_DATA_PATH_GROUP = 0x5, + IWM_PROT_OFFLOAD_GROUP = 0xb, +}; + /** * struct iwm_cmd_response - generic response struct for most commands * @status: status of the command asked, changes for each one From owner-svn-src-head@freebsd.org Wed Feb 8 07:01: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 4B72FCD339C; Wed, 8 Feb 2017 07:01:33 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DDA0A1D65; Wed, 8 Feb 2017 07:01:32 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1871VdC014618; Wed, 8 Feb 2017 07:01:31 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1871V14014617; Wed, 8 Feb 2017 07:01:31 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702080701.v1871V14014617@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 8 Feb 2017 07:01:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313419 - head/sys/contrib/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Wed, 08 Feb 2017 07:01:33 -0000 Author: adrian Date: Wed Feb 8 07:01:31 2017 New Revision: 313419 URL: https://svnweb.freebsd.org/changeset/base/313419 Log: [iwm] add version 17 firmware. Added: head/sys/contrib/dev/iwm/iwm-3160-17.fw.uu Added: head/sys/contrib/dev/iwm/iwm-3160-17.fw.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/contrib/dev/iwm/iwm-3160-17.fw.uu Wed Feb 8 07:01:31 2017 (r313419) @@ -0,0 +1,20409 @@ +begin 644 iwm-3160-17.fw +M`````$E73`IS=')E86TZ3&EN=7A?0V]R94-Y8VQE,31?````"`````(`````````'````!`````````` +M````````````````&P````0````!````$P````0``0```(```````!$```#B +M804```$```````"$?(``,"B``(RF@`#,F8``Z!.``(";@``````````````` +M``````````````````!L(,`0#QL)(MP=P!`*`!M`(``;;@0``&$0`!MN`0`` +M810``&$/``!A```;)"``&R7D'<`1W`3`$@$`&W`(``!A#QP=(@0`'2;H'<`0 +M`0`;,.@=P!&"!!LD"``;)00HP!'I#P!A```;)0`!&R1<',`1````8=P=P!`` +M`!TD````(0$`6#$/10`B`%P`.?0EP!`!`1,R`0$3,P$`$V+O_P`R!```8@-@ +M`&(``%@X`@!8,6,``&'D!,`2Z!W`$0$`4B2T'\`0`@`3<`,``&$(`%@P"`!D +M,0<``&$/$U(B@@03)`@`$R4!`%)N`0``80$``&$```!A"`!8;NL/`&$``!,E +M```3)"00P!$`@!,D```3)3@!,B!`#* +M$0```20```$E"0``84``$R4&`1,D!"C`$0]V$R(L2,<1#W@3(@``QA$#``$D +M```!)0]%`"(`7``Y[_\`,AD``&0`@!,D`0`3)3@P'P!($*,`1\`?`$LA)QQ$/@=P!`/$P'AX>'AL7 +M%!(*'AX>'AX>'AL7%!(*'AX>'AX>'AL7%!(*'AX````````````````8M@$` +M!0```@0```!#AY.(@< +MB1R*'(L)P```L```!TH@$`#````/3_`0`- +M````6%("``X```"@"6`+X`4````"!.```````````````` +M```$`````0`````````!`````0```!X```````````````$!#@X````````R +M"`(/`P`!``````````$!#@X````````C!`(*`````````````/0!```````` +M````````````````.%"````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````0`````)`!```` +MH``0)P``Z`,``.@#```0(X``$".``/R$@`#XA(``^(2``/"$@`#\A(``^(2` +M`/B$@`#PA(``\(2``/R$@`#\A(``\(2``/R$@`#TA(```````/__```!`0`` +M``````````$`````L!T!`+`=`0"P'0$`!/\``+`=`0"P'0$`.`$!`+`=`0`` +M]```P/T``+`=`0"P'0$`L!T!`+`=`0"P'0$`L!T!`+`=`0"P'0$`L!T!`+`= +M`0"P'0$`L!T!`+`=`0!D&`$`7!4!`+P8`0"P'0$`L!T!`+`=`0#`#@$`/!T! +M`%`1`0`$$@$`"!$!`+@%`0`(!0$`;`H!`)@4`0#0'0$`L!T!``3R``"<]``` +ML!T!`)CX``#@]@``>`8!`!`"`0"P'0$`L!T!`+`=`0"P'0$`L!T!`+`=`0"P +M'0$`L!T!`+`=`0"P'0$`L!T!`+`=`0"P'0$`L!T!`+`=`0"P'0$`L!T!``#_ +M``#\_@``^/X``+`=`0"P'0$`L!T!`+`=`0"P'0$`\`$!`+`=`0"P'0$`L!T! +M`+`=`0"P'0$`P!H!`+`=`0"P'0$`-`X!`,`-`0"P'0$`L!T!`+`=`0``#@$` +ML!T!`+`=`0"P'0$`L!T!`+`=`0#(_```W/L``+`=`0"P'0$`L!T!`'0(`0#L +M'P$`L!T!`+`=`0"P'0$`L!T!`+`=`0"P'0$`L!T!`$@4`0"P'0$`%`D!`+`= +M`0#H#0$`L!T!``C_``"P'0$`L!T!`+`=`0"P'0$`L!T!`+`=`0!L_@``L!T! +M`+`=`0"P'0$`L!T!`+`=`0"P'0$`'!H!`/0,`0"P'0$`L!T!`+`=`0"8_0`` +ML!T!`/C\``!T!@$`L!T!`-@&`0"P'0$`L!T!`+`=`0!X_0``L!T!`+`=`0`T +M_P``L!T!`(P:`0!P`@$`L!T!`+`=`0#<``$`Z!\!`+`=`0`\&@$`L!T!``@, +M`0`H_```G!D!`+`=`0"P'0$`@`P!`+`=`0"P'0$`L!T!`%P&`0"P'0$`L!T! +M`+`=`0"P'0$`L!T!`#P#`0"P'0$`L!T!`+`=`0"P'0$`L!T!`/@3`0"P'0$` +ML!T!`+`=`0"P'0$`L!T!`+`=`0"P'0$`L!T!`+`=`0"P'0$`L!T!`+`=`0"P +M'0$`L!T!`#0(`0#P'P$`L!T!`+`=`0"P'0$`L!T!`+`=`0"P'0$`//8``+`= +M`0"P'0$`L!T!`*0?`0"``P$`L!T!`+`=`0"P'0$`L!T!`,P#`0`$%0$`2/8` +M`+`=`0"P'0$`L!T!`+`=`0"P'0$`Y!\!`+`=`0#```````````````````````````````````````#T*@$`!0```@0` +M``!`8```#_!P!8 +M!P```/\@``P0$``$`1`.$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0#Q`)$!`% +M"A`+$!`0$`(0$`T0$!`0$!`0$!`0$`8#$!`0$!`0$!`0$!`0$!`($!`0$!`0 +M$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0 +M$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0 +M$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0 +M$!`0!Q`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!``````!(6` +M```````````````````````````````````````````````````````````` +M`````/\```#__________________________P`````````````````````` +M`````````````````````````````````````````````````````````"BP +M`0`@-@$`"+8!`"`V`0#0;@(`(#8!`#PC`0!,3@(`D%8!`"`V`0`@-@$`7%(" +M`%Q2`@!<4@(`7%("`%Q2`@!<4@(`7%("`"`V`0`@-@$`(#8!`"`V`0`HD@`` +M(#8!`"`V`0`@-@$`(#8!`"`V`0!@5@$`2%8!`"`V`0`@-@$````````````` +M`````````````````````````````````````0````$````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````$````"`````P````````#_````_P```/\```#_```` +M````````````````````````````````_P```(@3```````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````#_____```````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````"``````````````````````````/____\````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````(``````````````````````````_____P`````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````@`````````````````````````#_____```````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````"``````````````````````````/____\` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````(`````````````````````````` +M``````````````````````````#_```````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````_____P````#_____`````/____\`````_____P``````````#P`_ +M``$````/`#\``0````\`/P`!````#P`_``$````/`#\``0`````````/`#\` +M`0````\`/P`!````#P`_``$````/`#\``0````\`/P`!``````````\`/P`! +M````#P`_``$````/`#\``0````\`/P`!````#P`_``$`````````#P`_``$` +M```/`#\``0````\`/P`!````#P`_``$````/`#\``0`````````/`#\``0`` +M``\`/P`!````#P`_``$````/`#\``0````\`/P`!``````````````"K```` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``#J"J(*7@H="N`)I0EM"3<)!`G3"*0(=PA+""((^@?3!ZX'B@<````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````!42````@````0```!#C($&QY?#C(%(!Y@ +M#C(&)1YB#C('*AYC#C((+QYD#C()-!YE#C(*.1YG#C(+/AYH#C(,0QYI#C(- +M2!YJ#C(.31YL#C(B4$`-(``D8$`/(#$F<$`2(#0H`$$4(#$J$$$7(#$L($$9 +M(#$N,$$<(#,P0$$>(#$R4$$A(#$T8$$C(#$V<$$F(#,X`$(H(#$Z$$(K(#$\ +M($(M(#$^,$(P(#-`0$(R(#%D8$1?(C!F<$1B(C)H`$5D(B]J$$5G(B]L($5I +M(B]N,$5L(C)P0$5N(B]R4$5Q(B]T8$5S(B]V<$5V(C)X`$9X(B]Z$$9[(B]\ +M($9](B]^,$:`(C&`0$:"(B^"4$:%(@"$8$:'(BZ&<$:*(C&(`$>,(BZ*$$>/ +M(BZ,($>1(BZ.,$>4(C"00$>6(BV12$>8(@"5:$>=(BV7>$>?(C"9"$BB)"V; +M&$BD)"V=*$BG)"V?.$BI)#"A2$BL)"VE:$BQ)"T````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````/``\`#P`/ +M``\`#P`/``\````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````0`!``````#``)``T``````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````#QB```*````!````%Q^@``````````````````````````````` +M````````````````````````_____Z#%@````````````$!"#P!`0@\`0$(/ +M`$!"#P!`0@\`0$(/`$!"#P!`0@\`0$(/`$!"#P#@!P``0`$``.`'``!``0`` +M("<``.`'``#@!P``0`$``.`'``!``0```@`````````"```````````````` +M`````````````````````````````````````````-1M@`!\XX``&``````` +M``````````````````#_____```````````````````````````````````` +M`````````````````````````````````````````````````.`3`@`$%`(` +M%!0"`.P3`@#<$P(`&!0"`,03`@```````%`````P```````````````````` +M``````````!```"`,0``@`X``````````````````````````````"X````R +M````(``````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````"0'@(`[!H"`(`>`@!T'0(`8!X"`."H`0`8'@(`'!L" +M`*`<`@#0&@(`U!H"```````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`(````````````````````"`````@("`@("`@("`@("`@("`@("`@("`@("` +M@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("` +M@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("` +M@("`@("`@("`@("`@(```@```````````````````````````````(`````` +M`/\```````````(```````````````````````````````"```````#_```` +M```````"````````````````````````````````@```````_P`````````` +M`@```````````````````````````````(```````/\```````````(````` +M``````````````````````````"```````#_```````````"```````````` +M````````````````````@```````_P```````````@`````````````````` +M`````````````(```````/\```````````(````````````````````````` +M``````"```````#_```````````"```````````````````````````````` +M@```````_P```````````@```````````````````````````````(`````` +M`/\```````````(```````````````````````````````"```````#_```` +M```````"````````````````````````````````@```````_P`````````` +M`@```````````````````````````````(```````/\```````````(````` +M``````````````````````````"```````#_```````````"```````````` +M````````````````````@```````_P```````````@`````````````````` +M`````````````(```````/\``````````````````($`````````@@`````` +M``"#`````````(0`````````A0````````"&`````````(<`````````B``` +M``````")`````````(H`````````BP````````",`````````(T````````` +MC@````````"/`````````,`!```````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`,!G``"09P``%&@``*AG```8:```B&<``,1G``#_````_P```/\```#_```` +M_P```/\```#_````_P```/\```#_````_P```/\```#_````_P```/\```#_ +M````_P```/\```#_````_P```/\```#_````_P```/\```#_````_P```/\` +M``#_````_P```/\```#_```````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````&""@`!P@H``H(*``+""@`#@@H``@ +M(*``)""@`#`@H``T(*``/""@`$`AH`!$(:``:"&@`&PAH`!X(:``2"&@`$PA +MH`!P(:``="&@`'PAH```````_P`````````````````````````````````` +M```````````````````````T+0(`!0```@0```!6]Y:7E]=W9W;W=I=WUU=G5O=6EU?7-VR5T +M)8HC@B-[(W0CBB&"(7LA="&/!8<%?P5X!8\#AP-_`W@#?7EV>6]Y:7E]=W9W +M;W=I=WUU=G5O=6EU?7-V4%R06Q!9D%Z)7,E;25G)7HCB%S +M(6TA9R%]!78%;P5I!7T#=@-O`VD#?7EV>6]Y:7E]=W9W;W=I=WUU=G5O=6EU +M?7-V7)Y;'F`=WEW75R=6QU@'-Y6]R;VQO@&UY;7)M;&V`:WEK6ER:6QI@&=Y9W)G;&>` +M97EE6-R8VQC@&%Y87)A;&%_17A%<45K17]#>$-Q0VM#?T%X07%! +M:T&$)7TE=B5O)80C?2-V(V\CA"%](78A;R&'!7\%>`5R!8<#?P-X`W(#```` +M``````#^````T-"ZN;>WN+>X`````````````````````````.^^K=[OOJW> +M[[ZMWN^^K=X``````````````````````````%1Q```*````!````%Q^@``` +M````S/X``+`=`0"\!`$``````/\````$````````````````````__\``(0U +M``"8-0``K#4``#@U```P-0``0#4``*PT``"D-```<.(``'S>``"$WP``X-\` +M``3?``!DWP``O-\``+CB``#,Z```%.D``,3I```.D``+#I```4Z@`` +M3-\``##?``!PW@`````````````"`@7_`@,```(!`0$#`P#_`P$!`0,``@(# +M`@4&```"_P````,```$#``$$!``#`P4``@4&`0$!_P$``@(!`P`%`0(%!@`` +M```````````````````8+0(`!@````0```!W]\$W@```P4'"0L5 +M#0\1$P```P`&!@8&!@8```````````,-+XF)-T.)B8F)B7.)66$`58)K38F) +MB8F)0TT"T`````!A04%`04%!0"%!04``````0&``8$!@8& +M!@8&!@8&!@8&!@(&!``````+!P,`.S____'____R#___\A____ +M_R+___\C____)/___R7___\F`````````````````````````````,`L```` +M````P"P``````````````@````(````L@0$`Z((````````````````````` +M```````````````````/`#\``@````\`/P`"````#P`_``(````/`#\``@`` +M``\`/P`"(`````````$```"JJJJJJJJJJJJJJNZJJJJJ*/\`S*JJ``"JJ@#, +MJJH```!``,``0`#``%``\`!0`/`````````````````````````````````` +M``````````````````````````````"JJJJJJJJJJJJJJJJJJJJJJJJJJJJJ +MJJJJJJJJJJJJJ@``````````````````````;&UN;W!Q0GMH +M+Z$]FA\6*;27T!XXCN,X',=Q'+V$]A*.XS@.',=Q'([C.`Y>0GL)QW$8!'`*(`M`"=0#J`%\!U`&^`J@#'022!'P%&`;J`-0! +MO@*H`WP%4`=BM>9-FNQ%CYT?0(F'^A7O +MZ[+)C@O[[$%GL_U?ZD6_(_=3EN1;F\)U'.&N/6I,6FQ!?@+U3X-<:/11--$( +M^9/B5/%NW%AM>:56:4$<^*$.D&!('^\*!$>+HE +MXTOSHOY=P("*!:T_O"%(<`3QWV/!=W6O8T(P(!KE#OUMOTR!%!@U)B_#X;ZB +M-JS(Y[HK,I7FH,"8&=&>?Z-F1'Y4JSN#"\J,*:?BO!T6=JT[VU9D3G0>%-N2"@QL2.2X79]NO>]#IL2H.:0Q-].+\C+50XM9 +M;K?:C`%DL=*RWO\J-9M.BP``0($!`8&"`@````1```````````````` +M````9````!````#_``P@"````!(````````````````````L`0``$````/\` +M#"`"````$P```````````````````"P!```0````_P`,(`<````4```````` +M`$`&`````````0```!`````!``Q`!````!4`````````0`8````````!```` +M$`````$`#$`#````%@````````!`!@````````$````0`````0`,0`,````7 +M`````````````````````0```!````#_``0`!````!@`````````0`8````` +M```R````,@````$!S$`#````&0````````````````````$````!`````0$` +M@`$````:`````````````````````0````$```#__P"@!0```!L````````` +M$``````````!````$`````$"!``&````'``````````$``````````$````! +M`````0`,``$````=``````````0``````````0````$````!``P``0```!X` +M````````!``````````!`````0````$``(`!````'P`````````````````` +M``$````(````_P`,(`8````@`````````````````````0````@```#_``P@ +M`@```"$````````````````````!`````0```/\`#*`#````(@`````````` +M``````````$````!`````0(,@`$````C`````````````````````0````$` +M``#_``"@!@```"0````````````````````!`````0````$"1``"````)0`` +M``````````````````$````0````_P`,(`,````F`````````-@````````` +M`0```&0````!``@``@```"<`````````+`$````````!`````0````$`#$`$ +M````*``````````L`0````````$````!````_P`,0`0````I`````````"P! +M`````````0````$````!``Q`!````"H`````````+`$````````!`````0`` +M``$`#$`#````*P`````````L`0````````$````!`````0`,0`4````L```` +M``````(``````````0````$````!``0`!0```"T`````````!``````````! +M`````0````$`#$`!````+@`````````L`0````````$```!I`````0`,0`,` +M```O``````````````````````(``!(```#_``Q@`@```#``````````,@`` +M``````!D````$````/\`#&`&````,0`````````L`0````````$```!N```` +M`0`,0`0````$#`P(%!0$!$````"```````$````"````!````$```$````!` +M````_T%5514`````@(B("`````$``!S_____`!````0!`!C^__]_``@```0" +M`1C_____`!````$!`1C_____`!````,``!S\_U+550T```(``!S\_Z?JJPX` +M``4"`1C\_U+550T```(!`1C\_Z?JJPX```,!`1C\_U+550T```4!`!C\_ZEJ +MJP8```!````7````>*X``!0``````````0```(1\`0``````>-,```,```!` +MLP``!`````C.```(````N,L```P```"LO@``$0`````````3````!*\``!8` +M```\<`(``````##3```$````4&X"``4```"LN0``"````+S+```,````8,$` +M``T`````````$0```````````````````-#2``` Delivered-To: svn-src-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 ABDBCCD33F9; Wed, 8 Feb 2017 07:01:59 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 504961EE7; Wed, 8 Feb 2017 07:01:59 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1871wUO014675; Wed, 8 Feb 2017 07:01:58 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1871wAX014674; Wed, 8 Feb 2017 07:01:58 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702080701.v1871wAX014674@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 8 Feb 2017 07:01:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313420 - head/sys/contrib/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Wed, 08 Feb 2017 07:01:59 -0000 Author: adrian Date: Wed Feb 8 07:01:58 2017 New Revision: 313420 URL: https://svnweb.freebsd.org/changeset/base/313420 Log: [iwm] add version 17 firmware. Added: head/sys/contrib/dev/iwm/iwm-7260-17.fw.uu Added: head/sys/contrib/dev/iwm/iwm-7260-17.fw.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/contrib/dev/iwm/iwm-7260-17.fw.uu Wed Feb 8 07:01:58 2017 (r313420) @@ -0,0 +1,23322 @@ +begin 644 iwm-7260-17.fw +M`````$E73`IS=')E86TZ3&EN=7A?0V]R94-Y8VQE,31?````"`````(`````````'````!`````````` +M````````````````&P````0````!````$P````1``0```(```````!$```#B +M804```$```````#@DX``E"J``*R_@`#(L8``*!6``("S@``````````````` +M``````````````````!L(,`0#QL)(MP=P!`*`!M`(``;;@0``&$0`!MN`0`` +M810``&$/``!A```;)"``&R7D'<`1``7`$@$`&W`(``!A#QP=(@0`'2;H'<`0 +M`0`;,.@=P!&"!!LD"``;)00HP!'I#P!A```;)0`!&R1<',`1````8=P=P!`` +M`!TD````(0$`6#$/10`B`%P`.?0EP!`!`1,R`0$3,P$`$V+O_P`R!```8@-@ +M`&(``%@X`@!8,68``&$(!<`2Z!W`$0$`4B2T'\`0`@`3<`,``&$(`%@P"`!D +M,0T``&$/$U(B@@03)`@`$R4!`%)N!```88($$R0(`!,E!"C`$00``&&"!!,D +M&``3)00HP!$```!A"`!8;N4/`&$``!,E```3)"00P!$`@!,D```3)3@!,B!`#*$0```20```$E!@``80]V$R(L2,<1 +M#W@3(@``QA$#``$D```!)0]%`"(`7``Y[_\`,AD``&0`@!,D`0`3)3@@=P!`/$P`L````````````` +M```````````````````````````````````````````>````'H@>B%H```!6 +M````5HA6B`(!``"J````JHBJB/X!``","@``5(Q4C*0?```````````````` +M_@```0#_``(!_P$`_P$!`/X"`0,"_P$!`/\!`0'_`@#_`P(`_@0"`P+_`@(` +M_P("`?\#`/\%`P#^!@,``_\#`P#_`P,!_P```````````````+1(```*```` +M!````+B5@``````````````````420``!0````0```"XE8`````````````` +M`````````````````````0```-0``0#L`@$`7`(!`,0"`0!4_0``3/T``!@V +M```$,P``5#,````````````````````!"_\```4#```$`@``!O\```#_```, +M_P``!_\```C_```)_P``"O\```+_`0#_``$"`!$!`0(!`0$#_P$!!`(!`04# +M`0$&!`$!!P4!`0@&`0$)#P$!"A`!``S_`0#^_P(`_P<"`0'_`@(""`("`PD" +M`@0*`@(%"P("!@P"`@<-`@((#@(""0X"`@H-`@`,_P(`_O\````````````` +M``````````#_!P```/\```?_``$)"```"O\!`@```0,!_P$#`O\!`P/_`0$$ +M_P$"!0`!`0O_`0(,_P$$!@8!`0?_`0`(_P$`"O\"`@#_`@,!_P(#`O\"`P/_ +M`@$$`0("!0`"`0L!`@(,`0($!@8"`@<``@`(`0(`"@$#`/\"`P,`_P,#`?\# +M`P+_`P,#!`,!!`4#`@4``P$+!0,"#`4#!`8&`P,'_P,`"`4#``H%`P#^`P0$ +M`/\$!`'_!`0"_P0$`_\$!`3_!`0%_P0$"_\$!`S_!`0&!@0$!P8$``C_!``* +M_P````````````#_`````0,``@("``,``@``!?\```;_```$_P``!P0```C_ +M`0#_`0$!``,!`@$"`0("`@$`!/\!`0<$`0`(_P(#``8"`@(&`@`%_P(`!O\" +M``3_`@`'!P(`"`<#`P`&`P`!!0,"`@8#`07_`P`&_P,`!`<#``<'`P`(!P`` +M`````0#_`0#_``$``?\!`@+_`@#_`0(``?\"`0/_`@,$_P(""O\"`@G_`@(( +M_P,``?\#`0,*`P4%"@,$!O\#!@H(`P,)_P0`_P,$``'_!`$#"P0"!PL$`@@$ +M!`,$_P0""@D$!`G_!`0&_P4`_P(%!`;_!0$#!@4``?\%!0K_!04)!08`__\& +M!`;_!@$#!@8``?\&`P3_!@8)!P8&"O\````````````````````````````` +M``!PCX```0`#;(^```$``R@5@``!``%4DH```0`#6)*```$``XA(`0`"``0` +M```(!`P""@8.`0D%#0,+!P\!D0```3\```*1```^/0```Y$``#T]```$D0`` +M/P,```61```)$```!I$``!8<```'D0``'Q\```B1```<%@``"9$``!`)```* +MD0```S\```N1```]/0``#)$``#T^```-D0``/P$``!$0/DA(2.`0!`````T@ +M!````"!#.0````#@A`$``.$0`0````(0E\L%`#!@"P````_2!````!C2^/__ +M'P%S,`$```G@B8:$A`K@A(0```O@IE77(`S@(HLL,@W@JHF'(@[@'GOL,1?@ +MDHR+BAC@BHH``!G@?DGG(!K@(HLL,AO@DTVW(1S@'GOL,21@``````)S```` +M`!$@%(4!``)@_A0```-@$10```9@$10``!D0!````&$0(````!(@E`,```D0 +M;E\``!H0`````#$0A@$``#(0D`$``#,0R````#004````#40@````#H0:0`` +M`#L0P````,$0`````"K@^>7G)BO@(HLL,BS@<\YI*RW@'GOL,2C@BXN)B2G@ +MB8D``#;@7%Q<7#?@7%P``#'@_^=Q`#+@[C0G`#/@H/#\`#3@L0\``#7@```` +M``)'`0```%)*"0!2R@@`$4((`!!""`#OO0<`[[T'`.\Y!P#..0<`SCD'`*ZU +M!@"M-0<`#T8)`'/."0!32@D`4DH)`%)*"0`RQ@@`,<8(`#'&"``QQ@@`$$(( +M`!!""``00@@`$$((`!!""``00@@`$$((`.^]!P#OO0<`[[T'`.^]!P#OO0<` +M[[T'`.^]!P#OO0<`[[T'`.^]!P`/0@@`$$((`!!""``00@@`$$((`!!""``0 +M0@@`,,8(`#'&"``QQ@@`,<8(`%)*"0!22@D`4DH)`'/."0!31@@`S[4&`*VU +M!@#..0<`SCD'`,ZY!P#OO0<`[[T'``]""``00@@`,4H)`%)*"0#OO0<`[ST' +M`,ZU!@"M-08`C#$&`,T]"``QQ@@`,<8(`%%*"0!22@D`4DH)`#+&"``QQ@@` +M,48(`!!""``00@@`$$((`!!""``0Q@@`,<8(`#'&"`!22@D`4DH)`%)*"0`Q +MQ@@`,<8(`/"Y!@",,08`C+4&`*TU!P#.O0<`[[T'`#'&"``Q0@@`$,('`.^] +M!P#O00@`$$((`!!""``QQ@@`,<8(`!%""``00@@`$,('`.^]!P#O00@`$,(( +M`#'&"``>'AX>'AL7%!(*'AX>'AX;%Q02"AX>'AX>'AX;%Q02"AX>'AX>&Q<4 +M$@H>'AX>'AX>&Q<4$@H>'AX>'AL7%!(*'AX``````````````````+C:`0`% +M```"!````+B5@``````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````T#*``0`R@`%0,H`!0#*``3`R@`!P"2@`'PDH`"`)*``A"2@`%`0H`!()J``8!"@`$PFH`!D$*``:!"@`%@0 +MH``P$*``/!"@`#00H``L#*```(&D``&!I``#@:0`B"2@`(PDH`"0)*``E"2@ +M`)@DH`"<)*``H"2@`*0DH```````````````````````<1L-`."!`0`6GP(` +M````````````````<0$),@()WP``Z```X@``-@$`'P(`7P$`8`$`*0(`*@(` +MW@#XSP`(TP`(T``(U``(T0`(U0`(T@`8U@``,0`D,@`F!`!,.```Y0%SY@$$ +MI@)SIP($CP'_5@+_@P'_1`+_C@$/50(/D`$`3@(`D0%]D@%]DP%]3P)]4`)] +M40)]6@!56P!5_0`!Z@$$_@`3_P`&90"3;@`)?`$-@`$-/0(-00(-S@$"CP(" +MSP$/D`(/D0(`O0$)?@()QP$6B`(6I`$/I0$/90(/9@(/WP$!UP$`H`(!F`(` +M>@$!.P(!```````#`>P!!0`0``0`$0`2``,`"@`+`#0!'0(U`1X"-@$?`B4` +M```*``L`!``/``,![`$0`#@`Y`&E`D@`$@`C````#1$B`#03@``0$X``9!.` +M``P3@``#`>P!`@'K`04`!``0``H`"P`&``@`?`&``3T"00)S`7@``F'H` +M`(!Z``"<&```?!D``/@8``!\&```>!D``'08``!H&```;!@``'`8``!$;@`` +MG&X``'1N``!L;@``_____________________P0```#_______________\# +M````_____P``````````_____P``````````_____P```````````P```!`` +M```#`````````````````````````/\``````````````/\````````````` +M`&0```!D```````````````````````````!``````'_```"_P```P$```7_ +M```&_P``"/\```?_```)_P``"O\```O_```,_P$`_P,!`0```0$""@$"!00! +M`0;_`0$'_P$#"@@"6`+X`4````"!.```````` +M```````````$`````@`````````!`````0```!X```````````````$!#@X` +M```````R"`(/`P`!``````````$!#@X````````C!`(*`````````````/0! +M````````````````````````O%F````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````0```` +M`)`!````H``0)P``Z`,``.@#``#8)(``V"2``&B<@`!DG(``9)R``%R<@`!H +MG(``9)R``&2<@`!`0`(-0$`"#4!``@U`0"D$@$`"#4! +M``@U`0#,%0$`"#4!`.0Q`0"T&0$`"#4!``@U`0"P%P$`0#@(`7',!`"A1`0`H +M40$`X'X"`.!^`@#@?@(`X'X"`.!^`@#@?@(`X'X"`"A1`0`H40$`*%$!`"A1 +M`0`\G@``*%$!`"A1`0`H40$`*%$!`"A1`0`LN!XH'```````````````````````````````` +M```````````````````````````````````````````````````````````` +M````7$L```(````$````N)6``````````````````+A+```%````!````+B5 +M@``````````````%```#"0,)!0D,$0`````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````!,"*``2`B@`/`%@``````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````/L5C``S$0``````````,P`````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``$"`P0%!@<("0H+#`T.#Q`J*RPM+B]*2TQ-3D]0:FML;6YO<(J+C(V.CY"J +MJZRMKJ_*R\S-SL_0T=+3U-76U]?7U]?7U]?7U]?7U]?7U]?7`$```0$"`P0% +M!@<("0H+#`T.#Q`J*RPM+B]*2TQ-3D]0:FML;6YO<(J+C(V.CY"JJZRMKJ_* +MR\S-SL_0T=+3U-34U-34U-34U-34U-34U-34U-34`#T!`0(#!`4&!P@)"@L, +M#0X/*BLL+2\P2DM,34Y/4&IK;&UN;W",C8Z/D)&KK*VNK["QS,W.S]#1TM/3 +MU-76U]C9VMO +M@````````````````````````````````````````````````````````0P> +M6PXR`A$>70XR`Q8>7@XR!!L>7PXR!2`>8`XR!B4>8@XR!RH>8PXR""\>9`XR +M"30>90XR"CD>9PXR"SX>:`XR#$,>:0XR#4@>:@XR#DT>;`XR(E!`#2``)&!` +M#R`R)G!`$B`Q*`!!%"`R*A!!%R`O+"!!&2`R+C!!'"`Q,$!!'B`R,E!!(2`R +M-&!!(R`R-G!!)B`Q.`!"*"`R.A!"*R`O/"!"+2`R/C!","`Q0$!",B`R9&!$ +M7R(R9G!$8B(P:`!%9"(Q:A!%9R(M;"!%:2(Q;C!%;"(P<$!%;B(Q`!&>"(Q>A!&>R(M?"!&?2(Q?C!&@"(P@$!&@B(P@E!& +MA2(QA&!&AR(PAG!&BB(OB`!'C"(PBA!'CR(LC"!'D2(PCC!'E"(OD$!'EB(P +MD4A'F"(`E6A'G2(PEWA'GR(MF0A(HB0PFQA(I"0KG2A(IR0PGSA(J20MH4A( +MK"0PI6A(L20P```````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````#P`/``\`#P`/``\`#P`/```````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````````$``0``````P`"0 +M`-`````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````89P``"@````0```"X +ME8```````````````````````````````````````````````````````/__ +M__\XWX````````````!`0@\`0$(/`$!"#P!`0@\`0$(/`$!"#P!`0@\`0$(/ +M`$!"#P!`0@\`X`<``$`!``#@!P``0`$``"`G``#@!P``X`<``$`!``#@!P`` +M0`$```(``````````@`````````````````````````````````````````` +M``````````````",@X``%/V``!@`````````````````````````_____P`` +M```````````````````````````````````````````````````````````` +M``````````````````````#X/`(`'#T"`"P]`@`$/0(`]#P"`#`]`@#"&@`$@AH`!,(:``<"&@ +M`'0AH`!\(:```````/\````````````````````````````````````````` +M````````````````U%@"``4```($````N)6``````````````````*1O```& +M````!````+B5@`````````````````!T/P$`"@````0```"XE8`````````` +M````````!&<```4```($````N)6``````````````````*29`0`%```"!``` +M`+B5@`````````````````!PF@$`!0```@0```"XE8`````````````````` +MP%@"``8`````````N)6`````````````N)6``+B5@`"T(*``;""@```P``#_ +MC___``````````#8E8``V)6``*0@H``X(*```0```/C___\``````````/B5 +M@`#XE8``J""@`#P@H``0````Q____P``````````&):``!B6@`"L(*``>"&@ +M`$`!```__O__```````````XEH``.):``+`@H`!\(:````P``/_Q__\````` +M`````/\```#_```````````````````````````````````````````````` +M```````!`/\```````````````````````````````````!0+H``F.Z``!@` +M`````````0``````````````7"V``&#N@``8``````````$````````````` +M`.2"@`"8_(``&``````````!```````````````````````````````````` +M`````````````````````%Q#@`!@](``&``````````!```````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````#__P``__\````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````````#P`_``$````/`#\` +M`0````\`/P`!````#P`_``$````/`#\``0````\`/P`!````#P`_``$````/ +M`#\``@`````@`#``,``@`"``"@`&``(`$``0`!``$``(``H`!@`"``L`"P`+ +M``L`"P`*``8``@```````````````$A(/#P````````````````````````` +M``````!(2#P\`````````````````````/]_````````_W\```````#_?P`` +M`````/]_````````_W\```````#_?P``_W\``````````````````'QY=GEO +M>6EY?'=V=V]W:7=\=79U;W5I=7QS=G-O`57E55-R4VQ3@%%Y47)1;%&`3WE/4UR36Q-@$MY2W)+;$N`27E)4=R1VQ'@$5Y17)%;$6`0WE#4%R06Q!A"5])74E;R6$(WTC +M=2-O(X0A?2%U(6\AB`6!!7@%<@6(`X$#>`-R`XAY@'EY>7)Y;'F`=WEW75R=6QU@'-Y`57E55-R4VQ3@%%Y47)1 +M;%&`3WE/4UR36Q-@$MY2W)+;$N`27E)4=R1VQ'@$5Y +M17)%;$6`0WE#4%R06Q!@"5Y)7(E;"6`(WDC2%R(6PA +M@`5Y!7(%;`6``WD#<@-L`XAY@'EY>7)Y;'F`=WEW75R=6QU@'-Y +M`57E55-R4VQ3@%%Y47)1;%&`3WE/4UR36Q-@$MY2W)+;$N`27E)4=R1VQ'@$5Y17)%;$6`0WE#4%R06Q!@"5Y)7(E;"6`(WDC2%R(6PA@`5Y!7(%;`6``WD# +M<@-L`X!Y>7ER>6QY@'=Y=W)W;'>`=7EU7-R6UR;6QM@&MY:W)K;&N`:7EI6=R9VQG@&5Y97)E +M;&6`8WEC6%R86QA@$5Y17)%;$6`0WE#4%R06Q!@"5Y +M)7(E;"6`(WDC2%R(6PA@`5Y!7(%;`6``WD#<@-L`P`````````` +M``````@(``#.S,_-P,#`O\'!PL'"PL+!P\(````````````````````````` +M````[[ZMWN^^K=[OOJW>[[ZMW@``````````````````````````"'H```H` +M```$````N)6```````!D%0$`"#4!`"`<`0``````_P````$````````````` +M``0```````````````````````````````````#__P``]#<```@X```<.``` +MJ#<``*`W``"P-P``'#<``!0W``",\0``F.T``*#N``#\[@``(.X``(#N``#8 +M[@``X/$``!CX``!@^```$/D``(SY``#$^```_/@``&CY``!H[@``3.X``(#M +M``````````````("!?\"`P```@$!`0,#`/\#`0$!`P`"`@,"!08```+_```` +M`P```0,``00$``,#!0`"!08!`0'_`0`"`@$#``4!`@4&``````4````````` +M````````````````X`R``.`,@``,#8``X`R``.`,@``````````````````` +M````N%@"``8````$````N)6``````````````````-A8`@`&````!````+B5 +M@`````````````````!`;```!0````0```"XE8``````````````````P&T` +M``4````$````N)6``````````````````/A8`@`&````!````+B5@``````` +M`````#$T.C,T.C4W`````,D`````````!0(-``@$.A0Z```Z)#H`$`P0.CH< +M&#H@``H@.9="8'<\.#0P+"@D(!P8%!`,"`0`!`4%!`("```=!1D`$P````!$ +M0$<4`````P,#`P,#```$WM_?!-X```,%!PD+%0T/$1,```,`!@8&!@8&```` +M```````##2^)B3=#B8F)B8ESB5EA`%6":TV)B8F)B4--'(EY>6@```!K&WPP +M``````84%!0$%!04`A04%```````"P<#`#LW,R\K)R,?&Q<3#PL'`P`[-S,O +M*R +M0GMH+Z$]FA\6*;27T!XXCN,X',=Q'+V$]A*.XS@.',=Q'([C.`Y>0GL)QW$< +M!P$!`0$!`0$!0<$!`0$!`0$!`4'!`0$!`0$!`0%!00$!`0$!`0$!0<$!`0$! +M`0$!`4%!`0$!`0$!`0%!00$!`0$!`0$!04$!`0$!`0$!`4)"04%!04%!04%! +M04%!04%!04%"0D)!04%!04+"0D)#04%!04)"0D-#0T%!04%!04%"0D)!04%! +M0D)"0T-#04%!0D)#0T1$Q$%!0D)#1$3$1D8!`@,$F9D#`)W8B9U.[,1.-$B# +M-"=V8B<:I$$:$SNQ$Q$8@1$/_,`/#=(@#0N]T`L:`#0`3@!H`)P`T`#J``0! +M.`%;`38`;`"B`-@`1`&P`>8!'`*(`M`"=0#J`%\!U`&^`J@#'022!'P%&`;J +M`-0!O@*H`WP%4`5)%08`,"J'718+C0M-K+<[K3[6_:D379AM\Y]>U(^W7%>EQ/UIFBY```LP6!` +M'^/(>>VVOM1&C=EG2W+>E-28Z+!*A6N[*L7E3Q;MQ8;7FE5FE!'/BA#I!@2! +M_O"@1'BZ)>-+\Z+^7<"`B@6M/[PA2'`$\=]CP7=UKV-","`:Y0[];;],@108 +M-28OP^&^HC7,B#DN5Y/R58+\1WJLR.>Z*S*5YJ#`F!G1GG^C9D1^5*L[@PO* +MC"G'TVL\*'FGXKP=%G:M.]M69$YT'A3;D@H,;$CDN%V?;KWO0Z;$J#FD,3?3 +MB_(RU4.+66ZWVHP!9+'2G.!)M-CZK`?S)<^ORH[TZ4<8$-5OB/!O2G)<)#CQ +M5\=S49%!ZI8\#^%F` +M"1<:VF4QU\:$N-##@K`I=UH1'LM[_*C6;3HL``$"!`0&!@@(````E9F=H:4` +M```1````````````````````9````!````#_``P@"````!(````````````` +M```````L`0``$````/\`#"`"````$P```````````````````"P!```0```` +M_P`,(`<````4`````````$`&`````````0```!`````!``Q`!````!4````` +M````0`8````````!````$`````$`#$`#````%@````````!`!@````````$` +M```0`````0`,0`,````7`````````````````````0```!````#_``0`!``` +M`!@`````````0`8````````R````,@````$!S$`#````&0`````````````` +M``````$````!`````0$`@`$````:`````````````````````0````$```#_ +M_P"@!0```!L`````````$``````````!````$`````$"!``&````'``````` +M```$``````````$````!`````0`,``$````=``````````0``````````0`` +M``$````!``P``0```!X`````````!``````````!`````0````$``(`!```` +M'P````````````````````$````(````_P`,(`8````@```````````````` +M`````0````@```#_``P@`@```"$````````````````````!`````0```/\` +M#*`#````(@````````````````````$````!`````0(,@`$````C```````` +M`````````````0````$```#_``"@!@```"0````````````````````!```` +M`0````$"1``"````)0````````````````````$````0````_P`,(`,````F +M`````````-@``````````0```&0````!``@``@```"<`````````+`$````` +M```!`````0````$`#$`$````*``````````L`0````````$````!````_P`, +M0`0````I`````````"P!`````````0````$````!``Q`!````"H````````` *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Wed Feb 8 07:02: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 06FB0CD3432; Wed, 8 Feb 2017 07:02:11 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98F46EC; Wed, 8 Feb 2017 07:02:10 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v18729s4014729; Wed, 8 Feb 2017 07:02:09 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v18729Op014728; Wed, 8 Feb 2017 07:02:09 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702080702.v18729Op014728@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 8 Feb 2017 07:02:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313421 - head/sys/contrib/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Wed, 08 Feb 2017 07:02:11 -0000 Author: adrian Date: Wed Feb 8 07:02:09 2017 New Revision: 313421 URL: https://svnweb.freebsd.org/changeset/base/313421 Log: [iwm] add version 17 firmware. Added: head/sys/contrib/dev/iwm/iwm-7265-17.fw.uu Added: head/sys/contrib/dev/iwm/iwm-7265-17.fw.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/contrib/dev/iwm/iwm-7265-17.fw.uu Wed Feb 8 07:02:09 2017 (r313421) @@ -0,0 +1,26235 @@ +begin 644 iwm-7265-17.fw +M`````$E73`IS=')E86TZ3&EN=7A?0V]R94-Y8VQE,31?````"`````(`````````'````!`````````` +M````````````````&P````0````!````$P````2``0```(```````!$```#B +M804```$```````"HMH```#.``*SK@`"8W8``O!R``(#?@``````````````` +M``````````````````!L(,`0#QL)(MP=P!`*`!M`(``;;@H``&&``!MN/``` +M80`!&VX]``!A``(;;CX``&$0`!MN`0``84P``&%'``!A```;)"``&R7D'<`1 +MB`;A&!\`"&(``!LE`0`;)```!24!``4D``@%.0$`!6*((,`1`@`%)``(!3D! +M``5BC"#`$00`!20`"`4Y`0`%8I`@P!$(``4D``@%.0$`!6*4(,`1$``%)``( +M!3D!``5BF"#`$2``!20`"`4Y`0`%8IP@P!%```4D``@%.0$`!6*@(,`1```( +M)0``""2(!N$9A`;A&4`&P!(!`!MP"```80\<'2($`!TFZ!W`$`$`&S#H'<`1 +M@@0;)`@`&R4$*,`1O@\`80``&R2``!LEY!W`$0``&R0``1LEY!W`$0``&R0` +M`ALEY!W`$0@`7W`$``!AV!W`$/_^&S+8'<`1KP\`8=@=P!```1LPV!W`$:L/ +M`&$``!LE``$;)%P!,B``#&$0,` +M`20```$E#T4`(@!<`#GO_P`R'```9`"`$R0!`!,E.!S`$0]W$R+@',`1`@`! +M8@\!$R($",`1!P`3)0<.$R0$*,`1C`G`$@0HP!&0"<`2R$G'$0]P$R(!`!,P +M!"C`$9@)P!(8*,`1#Q,#(@@`6#$#`!,D```3)00(P!$``!,D.$7`$04``&$` +M`%@X!`!8,0``$R0!`!,E.!S`$0``%20````AZ!W`$`\3!R(/9`$B"@`!0`@` +M`7`>``!A"`!8;@D``&$(``=P!0``80`"7#$!``@D```()80&X1D"``!A`"!8 +M,````&$!0A,D```3)00HP!&"!!,D&``3)00HP!'H'<`0YO\3,O__$S/H'<`1 +M```!)`@``24/`6,B`0!2)`@`!VX"``!A```5)````"$4``!A0`;`$N@=P!$! +M`%(DM!_`$`(`$W`"``!A"`!D,>,/`&$/$U(B#Q-2(@$`4FX$``!A@@03)`@` +M$R4$*,`1!```88($$R08`!,E!"C`$0```&'8-("!``#`%@(!$V1"`1,D!"C` +M$1"\@($``,`6!@$38@0(P!`$`!-D#UP`(@H``$``!@!P&@``80``$R0``!,E +M``#`%R``6#'((,`0<$7`$!`(P!```!,E`P`3)!P(P!$<",`1```3)`0(P!$/ +M%!4B!``5)@\P("+[_S`R`P`3)!@(P!$/%!4B`@`5)@\@,"(``!,D$$7`$1@( +MP!$0`%@Q#P`3(@$`$S`$*,`1#WP3(@@`S!$``!,E```3)#1(QQ$/>Q,B`0`3 +M,`0HP!$/%!4B`@`5)@]-$R($$,41`@`3)/``#(!@L`>`!`!P\`%`#\#!$`&``L"A(` +MI`$``!,`#``@#10``P`L#14`!``P#0`````````````````````````````` +M`````````````````````````!X````>B!Z(6@```%8```!6B%:(`@$``*H` +M``"JB*J(_@$``(P*``!4C%2,I!\```````````````#^```!`/\``@'_`0#_ +M`0$`_@(!`P+_`0$`_P$!`?\"`/\#`@#^!`(#`O\"`@#_`@(!_P,`_P4#`/X& +M`P`#_P,#`/\#`P'_````````````````<%<```H````$````G+B````````` +M`````````-!7```%````!````)RX@``````````````````````````````` +M```!````""0!`"`F`0"0)0$`^"4!`(@@`0"`(`$`<#T``%PZ``"L.@`````` +M``````````````$+_P``!0,```0"```&_P```/\```S_```'_P``"/\```G_ +M```*_P```O\!`/\``0(`$0$!`@$!`0/_`0$$`@$!!0,!`08$`0$'!0$!"`8! +M`0D/`0$*$`$`#/\!`/[_`@#_!P(!`?\"`@((`@(#"0("!`H"`@4+`@(&#`(" +M!PT"`@@.`@()#@(""@T"``S_`@#^_P```````````````````````/\'```` +M_P``!_\``0D(```*_P$"```!`P'_`0,"_P$#`_\!`03_`0(%``$!"_\!`@S_ +M`00&!@$!!_\!``C_`0`*_P("`/\"`P'_`@,"_P(#`_\"`00!`@(%``(!"P$" +M`@P!`@0&!@("!P`"``@!`@`*`0,`_P(#`P#_`P,!_P,#`O\#`P,$`P$$!0," +M!0`#`0L%`P(,!0,$!@8#`P?_`P`(!0,`"@4#`/X#!`0`_P0$`?\$!`+_!`0# +M_P0$!/\$!`7_!`0+_P0$#/\$!`8&!`0'!@0`"/\$``K_`````````````/\` +M```!`P`"`@(``P`"```%_P``!O\```3_```'!```"/\!`/\!`0$``P$"`0(! +M`@("`0`$_P$!!P0!``C_`@,`!@("`@8"``7_`@`&_P(`!/\"``<'`@`(!P,# +M``8#``$%`P("!@,!!?\#``;_`P`$!P,`!P<#``@'```````!`/\!`/\``0`! +M_P$"`O\"`/\!`@`!_P(!`_\"`P3_`@(*_P(""?\"`@C_`P`!_P,!`PH#!04* +M`P0&_P,&"@@#`PG_!`#_`P0``?\$`0,+!`('"P0""`0$`P3_!`(*"00$"?\$ +M!`;_!0#_`@4$!O\%`0,&!0`!_P4%"O\%!0D%!@#__P8$!O\&`0,&!@`!_P8# +M!/\&!@D'!@8*_P```````````````````````````````#BR@``!``,TLH`` +M`0`#O!R```$``1RU@``!``,@M8```0`#N'$!``(`!`````@$#`(*!@X!"04- +M`PL'#P&1```!/P```I$``#X]```#D0``/3T```21```_`P``!9$```D0```& +MD0``%AP```>1```?'P``")$``!P6```)D0``$`D```J1```#/P``"Y$``#T] +M```,D0``/3X```V1```_`0``$1`^2$@`X!`$````#2`$````81`B````($,Y +M`````."$`0``X1`!`````A"7RP4`,&`+````#]($````&-+\__\?`7,0```` +M">")AH2$"N"$A```"^"F5=<@#.`BBRPR#>"JB8>^PQ%^"2C(N*&."* +MB@``&>!^2><@&N`BBRPR&^"33;>^PQ)&`"`````G,`````$2`4A0$` +M&1`&````$=(#````,>#_MW8`,N#D)3\`,^`B4@X`-.`N````->``````-N`V +M-C8V-^`V-@``"1!N7P``&A``````,1"&`0``,A"0`0``,Q#(````-!!0```` +M-1"`````.A!I````.Q#`````P1``````)(``/```*N#YY>`>>^PQ*."+BXF)*>")B0``#&"#)0``.!!2````.1"6````08`!```` +M`DFTD0C"8!`(0.#O![Y>CP<\WFX'.YTN +M!SD<#@>WV\T&-INM!C4:[0:[W_`(S.5R"4IE,@E()/((Q^/Q"$:CL0A%(I$( +M1")Q",/A4`A"83`(P6`P",%@$`A`X.\'O]_O![_?[P<_G\\'/I_/!SZ?SP<^ +MGZ\'O5ZO![V>SP<^GZ\'O5ZO![V>SP<^G\\'/I_/!SZ?SP>_W^\'O]_O![_? +M#PA`8#`(P6`P",%@4`A"X7`(PR&1"$0BD0C%HM$(QN/Q",[&XT&M9K-!C;;[08W'`X'N9Q.![O=C@<\7J\'OM\/"$!@,`A"HC$- +MZ70Z#_'Q`(0&`P",%@,`C! +M8!`(0"#P!S^?SP>]'H\'O-UN![N=3@KP<]G\\'OQ\0"$!@ +M,`C!8#`(P6`0"$`@\`>_W^\'/Y_O![_?#PC`8%`(0Z+Q",EELPG-9K,)1"*1 +M"$1A$`B_G\\'/I_/!SZ?[P>_'Q`(P:!0",+A<`C#X7`(0J$P"$$@\`>_G\\' +M/I_/!SZ?[P<_8%`(1"*1"+O=;@>[W4X'N)NM!K293`:Q6`P&-!P/"$0BL0C% +M8M$(1J/Q",?C\0C'X]$(1F.Q"$4B<0C#H5`(P6`P"$`@$`A`(!`(P&`P"$&A +M<`C#(9$(Q6+1"$;C\0C'X_$(QZ/1"$9CL0C%(I$(0!Z.!C!8+`8QF6P&M)KM +M!CC=;@>[W6X'M5JM!C7:;`8R62P&,1J.!\"BT0C&XQ$)R&12"4KE<@G+Y5() +M2F4R"4CD\0A&H[$(0!Z.!K%83`:RV8P&M5JM!@$````B(B`?'AT;&AH:(B(@ +M'QX=&QH:&B(B(B(@'QX=&QH:&B(B(!\>'1L:&AHB(B(B(!\>'1L:&AHB(B`? +M'AT;&AH:(B(B(B$?'AT;&A<7(B(A'QX=&QH7%R(B("`A'QX=&QH7%"(B(1\> +M'1L:%Q0B(AX>'AX>'!H8%1(>'AX>'AP:&!42(B(B(B$?'AT<&A@8(B(A'QX= +M'!H8&"(B(B(A'QX='!H8%"(B(1\>'1P:&!8B(B`@(!\>'!L8%A(>'AX>'AP; +M&!84(B(B(B$?'AT<&1<7(B(A'QX='!D7%R(B("`A'QX='!D7%"`@(1\>'1P9 +M%Q0B(B`@(!\>'!L7%1(>'AX>'AP;%Q42(B(B(B(@'QT;&AH:(B(B(!\=&QH: +M&B(B(B(B(!\=&QH:&B(B(B`?'1L:&AHB(B(B(B`?'1L:&AHB(B(@'QT;&AH: +M(B(B(B(A(!X<&1<7(B(B(1\=&QH8&"(B(B(B(1X>'!D5$B(B(B$>'1L:%Q4B +M(B`@("`?'1H8%1(@("`@'QT:&!42(B(B(B(A(!X<&A@8(B(B(2`>'!H8&"(B +M(B(B("`?'1L9$R(B(B`@'QL;&18B(B`@("`@'AP9%A(@("`@(!X<&184(B(A +M(2$A'AT<&1<7(2$A(2`>'!D7%R(B(2$A(1\>'!D7%"$A(2$?'1P:%Q0B(A\? +M'Q\?'!L8%1$?'Q\?'QP9&!41(B(```````````````"X$@(`!0```@0```"< +MN(`````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M-`R@`$`,H`!4#*``4`R@`$P,H``<'*``0""@`"@DH`!L$*``&"2@`'@DH`!\ +M)*``@"2@`(0DH`!0$*``2":@`&`0H`!,)J``9!"@`&@0H`!8$*``,!"@`#P0 +MH``T$*``+`R@``"!I``!@:0``X&D`(@DH`",)*``D"2@`)0DH`"8)*``G"2@ +M`*`DH`"D)*```````````````````````'(;#0#A@0$`%Y\"```````````` +M`````#0!`#8!`#X!5S\!9D`!=T$!F$(!!U\!JF`!JG$!>1\"`"D"_RH"_S(" +M>:$`6Z(`&Z,`,*0`$J4`(*8`!Z<`&Z@`$JD`!ZH``*P`":T`!JX`#*\`";`` +M!K$`#+(`![,`!+0`"K4`!K@`7KX`&<@`!LD`!LH``H!!/X`$_\`!FX`"GD`#74``7\`#X<`#ID` +MQ9D`S7P!#8`!#3T"#4$"#7T!_SX"_W\!_T`"_R<`'"@`&"D`'"H`'+D!![H! +M$'H"!WL"$,X!`X\"`Y$"`+T!"7X""<O@`9R``&R0`&R@`!S``%S0`%RP`$S@`#SP`*T``*T0`"T@`" +MTP`*U``*U0`"U@`"UP`*V``*VP"(W`"(W0"JW@#=WP``XP`(Y``(Y0`*Y@`* +MZ```ZP`([``([0`*[@`,,0`D,@`F=P$P.`(P!`!,.```Y0%SY@$*I@)SIP(* +M^P#_CP$@5@(@@P$`1`(`C@$/50(/D`$`3@(`D0%]D@%]DP%]3P)]4`)]40)] +M6@!56P!5_0`!Z@$$_@`3_P`&;@`*>0`-=0`!?P`/AP`.F0#%F0#-?`$-@`$- +M/0(-00(-?0'_/@+_?P'_0`+_)P`<*``8*0`<*@`@('>P(0S@$# +MCP(#D0(`O0$)?@()QP$,B`(,O@$)?P()R`$&B0(&I`$0J@$2I0$0JP$290(0 +M:P(29@(0;`(2WP$!UP$`H`(!F`(`>@$!.P(!8@'/9`'/9@'/+`+/+@+/,`+/ +M$``$``L````#`>P!!0`0``0`$0`2``,`"@`+`#0!'0(U`1X"-@$?`B4````* +M``L`!``/``,![`$0`#@`Y`&E`D@`$@`C````#1$B`\`:@`"<&H``\!J``)0: +M@``#`>P!`@'K`04`!``0``H`"P`&``@`?`&``3T"00)S`73B('(D"@!`!@```#(^0$`&0```/Q,```:```````````````````````` +M```!`_\```#_`@#_``(!`_\"`P3_`@(*`0(""_\"!04"`@(`_P(`_@,!`/\$ +M`0$"!0$"`?\!`@#_`0#^!@,`_P<#`PH(`P,+"`,"`?\#!04"`P,"_P,#"?\# +M`@#_`P#^"00`_PH$!`H+!`0+"P0$"`P$`@'_!`,$_P0%!0T$!`+_!`(`#@4% +M"@\%!0L/!08&$`4%`A$%`@`2!@#_$P8&"A0&!@L4!@0'_P8$`A4&!@G_!@(` +M_P8`_A8```````````````!@CP``"@````0```"%T!`#0[ +M`0!X70$`>%T!`-@]`0!X70$`R"L!`(0X`0!X70$`>%T!`'A=`0!X70$`>%T! +M`'A=`0!X70$`>%T!`'A=`0!X70$`>%T!`'A=`0!X70$`1%8!`!Q3`0"<5@$` +M>%T!`'A=`0!X70$`^$L!``1=`0#`3@$`F$\!`&Q.`0#(0@$`&$(!`(A'`0!8 +M4@$`J%T!`'A=`0"T*0$`9"P!`'A=`0`D,0$`8"\!`(A#`0#T/@$`>%T!`'A= +M`0!X70$`>%T!`'A=`0!X70$`>%T!`'A=`0!X70$`>%T!`'A=`0!X70$`>%T! +M`'A=`0!X70$`>%T!`'A=`0#@.@$`U#H!`,@Z`0!X70$`>%T!`'A=`0!X70$` +M>%T!`-0^`0!X70$`>%T!`'A=`0!X70$`>%T!`,!8`0!X70$`>%T!`&Q+`0#X +M2@$`X#T!`'A=`0!X70$`.$L!`'A=`0!X70$`>%T!`'A=`0!X70$`\#4!`/PT +M`0`H.`$`^#%T!`'A=`0!X70$`>%T! +M`'A=`0``4@$`>%T!`%Q&`0!X70$`($L!`'A=`0`X.P$`>%T!`'A=`0!X70$` +M>%T!`'A=`0!X70$`,#D!`'A=`0!X70$`>%T!`'A=`0!X70$`>%T!`!A8`0`@ +M2@$`>%T!`'A=`0!X70$`7#@!`'A=`0!<-P$`A$,!`'A=`0#T0P$`>%T!`'A= +M`0!X70$`W#%T!`*Q)`0`@-@$` +M>%T!`'A=`0!L0P$`>%T!`'A=`0!X70$`>%T!`'A=`0!$0`$`>%T!`'A=`0!X +M70$`>%T!`'A=`0"P40$`>%T!`'A=`0!X70$`>%T!`'A=`0!X70$`>%T!`'A= +M`0!X70$`>%T!`'A=`0!X70$`>%T!`'A=`0!\10$`R%\!`'A=`0!X70$`>%T! +M`'A=`0!X70$`>%T!`%0N`0`<+@$`>%T!`'A=`0!\7P$`B$`!`'A=`0!X70$` +M>%T!`'A=`0#80`$`Q%(!`,@N`0!X70$`>%T!`'A=`0!X70$`>%T!`+Q?`0!X +M70$`^$,!`'@\`0#,00$`>%T!`'A=`0`X4@$`>%T!`'A=`0!X70$`>%T!`'A= +M`0!X70$`>%T!`'A=`0!X70$`>%T!`'A=`0`P40$`>%T!`'A=`0"P/P$`P%%T!`"0^`0!X70$`7#\!`'A=`0`P6`$` +M>%T!`'A=`0!X70$`>%T!`'A=`0`,60``H%@``)Q8``#X6```/,D!`.S(`0!T +MR0$`(,D!`&3(`0"*8!`%R!`0!<@0$````````````````````````````````````````````` +M`````0````$````````````````````````````````````````````````` +M``````````````````````````````````````````````$````"`````P`` +M``````#_````_P```/\```#_```````````````````````````````````` +M_P````````````````````,````?````````````````````$$(`@$M+2TM+ +M```````````````````````````````````````````````````````````` +M``````````````````````````````````"($P`````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````_____P`````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````@`````````````````````````#_____```````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````"``````````````````````````/____\````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````(``````````````````````````_____P`````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````@`````````````````````````#_____```` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````"````````````````````````````` +M````````````````````````_P`````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````/____\`````_____P````#_____`````/____\```````````\`/P`! +M````#P`_``$````/`#\``0````\`/P`!````#P`_``$`````````#P`_``$` +M```/`#\``0````\`/P`!````#P`_``$````/`#\``0`````````/`#\``0`` +M``\`/P`!````#P`_``$````/`#\``0````\`/P`!``````````\`/P`!```` +M#P`_``$````/`#\``0````\`/P`!````#P`_``$`````````#P`_``$````/ +M`#\``0````\`/P`!````#P`_``$````/`#\``0``````````````JP`````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````$``!`````@````4````!````Z@JB"EX*'0K@":4);0DW"00)TPBD +M"'<(2P@B"/H'TP>N!XH'```````````````````````````````````````` +M````````````````````````````````````````````````````````9%L` +M``(````$````G+B``````````````````,!;```%````!````)RX@``````` +M```````%``!R`0``J`(```,)`PD%"0P1```````````````````````````` +M`````````````````````````!P`````````'``````````<`````````!P` +M```?````'````!\````<````'P```!P````?````'````!\````<````'P`` +M`!P````?````'````!\````<````'P```!P`````````'`````````!Z```` +M`````'H`````````>@````````!Z````?P```'H```!_````>@```'\```!Z +M````?P```'H```!_````>@```'\```!Z````?P```'H```!_````>@```'\` +M``!Z`````````'H````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M9F8.``````!F9@H`9F8&`&9F!@!F9@(`9F8"`&9F/@!F9CX`9F8Z`&9F.@`` +M````9F8V``````!F9C(``````&9F#@```````````&9F!@`````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````0`!`0$!`0$!`0$``0`!````````_P`````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````$P(H`!("*``;`>````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````^S6,`#.Q```````````S```` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````>'AX>'AX>'AX>'AX>`!D<'AX>'AX> +M'AX>'AX`'AX>'AX>'AX>`!X>'AX>'AX>'@`!!@($`@(```0$!@0(`P`````9 +M'AX>'AX>&!D>'AX>'AX8&!X>'AX>'AX>`!4>'A@5'AX8&!X>'@,(``````8` +M``````````#_!0```````!@8&!@8'0$&!@8&``8``!X`'@`>`!@`!@8&`0$! +M`?T&!@````````8!`0``'@```````````````0`````````````````5&!@8 +M&!@8&!@8%1@8````````````````````_O[^_OX`%!88&!02$!@8```````` +M````````````````````````````%1@8&!@8&!05&!@8&!@8%!(8&!@8&!@8 +M&````````0````$````1&!@4$1@8%!08&!@``````/L4%!04%!@8&!@8&!@8 +M&!@8&!@8`!@8&!@8&!@8&!@8&!@`&!@8&!@8&!@8`!@8&!@8&!@8&``8&!@8 +M&!@8&!@8&!@8&!@8&!@8&!@8&!@8`!@8&!@8&!@8&!@8&!@8&!@8&`$!`0$! +M`0`````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````!65```>P````````!:5```.P````````!:5```>P`` +M```````*(```.P````````!:5```0P`````````*`````0```#`P```````` +M`````````````````0```#\````````````````````'`````````@(````` +M```````````!``("``$```("`0`!`@`"`@`````!``$``@(!``````````$` +M```````"`@```0```0```0`````"``("``````(```````(````!```````` +M``````(```$``@`$```````````````"``(``````````````````@`"``$` +M`````@````````````(``0(``@("`````````@`"```!```````````````` +M`````0```0````(``0(```````````,"```````````"``````("```````` +M`````````````````0`"`@```````````````````@`"`0````````````(` +M`````@`"`@`"`````````@`````````````"`@(``````@`"`@("``$```(` +M`````0(``@("``(!`@````(````"``$```(```(!`````````````@`````` +M``````````(``````````````````0````$"`0(```("```````!``(```$` +M`0`"```````````````````````````````````````"`````````````@`` +M``(`!``"`````@````(````"``(``@(````````````"``````(``````@`` +M````!0````(``0```0```0(```````````````````````$```````$``@`` +M``$``@`!``````(````````````````````````````````````````!```` +M```````````````````````````````````````````````````````````` +M``````(````````"`````````````````````````````@``````*2G_____ +M```````````````````````````````````````````````````````````> +M`0``+`L````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````0(#!`4&!P@)"@L,#0X/$"HJ*RPM +M+B]*2TQ-3D]0:VQM;G!QBXR-CH^1K*VNK["QS,S,S<[/T-'2T]/3T]/3T]/3 +MT]/3T]/3T],`00```````````0(#!`4&!P@)"@L,#0X/$"HJ*RPM+B]*2TQ- +M3D]0:FMM;F]PBHN,C8Z/JJNLK:ZORLO,S<[/T-#0T-#0T-#0T-#0T-#0T-#0 +MT-``/@$"`P0$!08'"`D*"PP-#BHK+"TN+TI+3$U.3U!J:FML;6YOBHN,C8Z/ +MD*JKK*VNK["PRLK+S,W.S]#1TM/4U=;7V-G:VMK:VMK:VMK:VMK:VMH`0P(" +M`P0%!@8'"`D*"PP-#BHK+"TN+TI+3$U.3U!0:FML;6YOBHN,C8Z/D*JKK*VN +MK["PRLK+S,W.S]#1TM/4U=;7U]?7U]?7U]?7U]?7U]?7U]<`0`(#`P0%!@<( +M"0H+#`T.*BLL+2XO2DM,34Y/3U!J:VQM;F^*BXR-CH^0JJNLK:ZOL+#*RLO, +MS<[/T-'2T]34U-34U-34U-34U-34U-34U-34U-0`/``````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``#_?_]__W__?_]_``````````````````````````````````"JJ@``_P`` +M`/\```#_````_P```/\```#_````_P```/\```#_````_P```/\```#_```` +M_P```/\```#_````_P```/\```#_````_P```/\```#_````_P```/\```#_ +M````_P```/\```#_````_P```/\```#_```````!`````0````$````!```` +M`0````$````!`````0````$````!`````0````$````!`````0````$````! +M`````0````$````!`````0````$````!`````0````$````!`````0````$` +M```!`````0````$````````````````````````````````````````````` +M``````````````````````````````````````````````!_?W]_?W]_?W]_ +M?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_ +M?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_ +M?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_ +M?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_ +M?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_ +M?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_ +M?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_ +M?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_ +M?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_ +M?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_ +M?W]_?W]_?W]_?W]_?W]_?W]_?W\```````````````"^````O@````$````` +M`````0```%\```!?`````@`````````"````+P```"\````#``````````,` +M```8````&``````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````H```````````````````#_`/\````````````` +M`````````/\`_P``````-````````````````````/\`_P`````````````` +M````````_P#_``````!P````````````````````_P#_```````````````` +M``````#_`/\``````)D```````````````````#_`/\````````````````` +M`````/\`_P```````````````````````0````$``````````0````$````` +M`````0````$````````````````````!`````0`````````!`````0`````` +M```!`````0``````````````````````````````C`H````````````````` +M``````````````````P#"````````````/\````````````````````````` +M`````````````````````/\````````````````````````````````````` +M`````````/\``````````````````````````````````````````````/\` +M`````````````````````````````````````````````/\````````````` +M`````````````````````````````````/\````````````````````````` +M`````````````````````/\````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````!`````````&`*@0`````````````````````````````````````` +M``````````````````````$,'K8.,@(1'KD.,@,6'KL.,@0;'KX.,@4@'L`. +M,@8E'L,.,@$B`'1@1>8B-'9P1>LB,'@`1O`B-'H01O4B-'P@ +M1OHB-'XP1O\B,(!`1@0B-()01@DB`(1@1@XB-(9P1A,B,(@`1Q@B,XH01QTB +M,XP@1R(B-(XP1R@(`?'H"`(QZ`@!D>@(`5'H"`)!Z`@`\>@(```````#@ +M````@`````````````````````````````"`]```@$L```!````````````` +M``````````````````#D````7````$`````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````````D(8"`"B"`@"`A@(` +M"(4"`&"&`@#$!`(`K(4"`&""`@`PA`(`#(("`!""`@`````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Wed Feb 8 07:03: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 3DA17CD3677; Wed, 8 Feb 2017 07:03:11 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFD546E4; Wed, 8 Feb 2017 07:03:10 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v187398M017812; Wed, 8 Feb 2017 07:03:09 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v18739x2017811; Wed, 8 Feb 2017 07:03:09 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702080703.v18739x2017811@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 8 Feb 2017 07:03:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313423 - head/sys/contrib/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Wed, 08 Feb 2017 07:03:11 -0000 Author: adrian Date: Wed Feb 8 07:03:09 2017 New Revision: 313423 URL: https://svnweb.freebsd.org/changeset/base/313423 Log: [iwm] add this 3 megabyte firmware image. Added: head/sys/contrib/dev/iwm/iwm-8000C-17.fw.uu Added: head/sys/contrib/dev/iwm/iwm-8000C-17.fw.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/contrib/dev/iwm/iwm-8000C-17.fw.uu Wed Feb 8 07:03:09 2017 (r313423) @@ -0,0 +1,53122 @@ +begin 644 iwm-8000C-17.fw +M`````$E73`IS=')E86TZ3&EN=7A?0V]R94-Y8VQE,31?````"`````(````!````'````!`````````` +M````````````````&P````0````"````$P```+P"````0$``!@```*$````` +M``$``````(:````B!18@&LP!`$````!``````0```'$Q!0`````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````#)HZK+"NR_;[>SV-J?H*@2 +M)"VN"OM[Z)]:'1-) +MBXB&):Q^@4FLV\VRR$6:.F52&%E"TY(P!W2[JX&"60!'>'E_$E.$9DQ"<\"AA1+1?2W:MEA`D:D*_3B32F; +M&>"J>2NA*_RWBGOMO_;^DQAVF]8/%ULJT$W"]"STML5RM(DDN&U([K3\US#5 +M9'!WV03*PM0=Q0$HQ.OOB86Z;1&IO_UWHS_:'WVO?0$2,[A#@Y!VA2$U9`5G +MYXD1(`C,DU7;E46SIN?N'F$PTY3X@Z`R_?A'D*G8PY[J;Y%+W>FEW:?H:1CQ +M_$2,#K5'MRL"KM!U#E&B'-EJ,H1#EGEDS\GO;S1H4B'?0VUT++-8,4D%#@.Z +MR@2_W',#````!P````B``0```(```(`!``<````(``4`````````!0`'```` +MN*T```"`1`"PK0``$P````2``0```(```````!$```!Q,04```$````````, +MT(``2":```CU@`#L[(``E!.``(!P@0`````````````````````````````` +M``!L(,`0#QL)(MP=P!`*`!M`(``;;@H``&&``!MN/@``80`!&VY1``!A``(; +M;F$``&$0`!MN`0``86\``&%J``!A```;)"``&R7D'<`12`CA&!\`"&(``!LE +M`0`;)```!24!``4D``@%.0$`!6*((,`1`@`%)``(!3D!``5BC"#`$00`!20` +M"`4Y`0`%8I`@P!$(``4D``@%.0$`!6*4(,`1$``%)``(!3D!``5BF"#`$2`` +M!20`"`4Y`0`%8IP@P!%```4D``@%.0$`!6*@(,`1```()0``""1(".$91`CA +M&10(P!(!`!MP"@``80\<'2($`!TF)`C`$@$;(R+H'<`0`0`C<`$``&$1`!LP +M`0`;,.@=P!&\#P!A```;)(``&R7D'<`1"`!?<`D``&'0!\`2``D;*,P'@($` +M`,`7U`?`$@`)&RC(!X"!``#`%ZX/`&',!\`2X`>`@0``P!?(!\`2W`>`@0`` +MP!>G#P!A```;)``!&R7D'<`1"`!?<*(/`&$```4EX@0%)-0'P!(`"1LH``4; +M*=P'@($``,`7T`?`$@`)&R@`!1LIX`>`@0``P!>5#P!A```;)``"&R7D'<`1 +M"`!?<`0``&'L'\`0__\;,^P?P!&,#P!A[!_`$```&S'L'\`1B`\`80``&R4@ +M`!LD7!S`$0```&'<'<`0```=)````"$!`%@Q0`!F<`@``&&`9^(8`0`3<`4` +M`&$(`%@P"`!D,28``&$(`%@P"0``80]%`"(`7``Y]"7`$`$!$S(!`1,S`0`3 +M8N__`#($``!B`V``8@``6#@"`%@Q=P``8>@=P!!X^`$D_\`!)0`!$SD/$P$B +M'`C`$@`!$SCH'<`1`0!2)'A%P!`!`!-P#```80@`6##8'L`0"@`30`(`$VX$ +M``!A`0`()```""5$".$9`0``80"`6#`(`&0Q````80@`6&[C#P!A```3)0`` +M$R0D$,`1`(`3)```$R4X',`1D`K`$@$`$W`%``!A```3)0``$R0``"$E```A +M)!(``&$``!,E`P`3)```(242`"$D#T0`(@H``$```0!P!```8?[_$S("`#!P +M^/\A,OK_(3(``@!P!```8?W_$S("`#!PQ_\A,M?_(3(H`,T1#R$3(BP`S1%P +M"L`2!`#-$70*P!((`,T1>`K`$@``S1&`"L`2\![-$80*P!(P*@=P!`/$P@=P!!P^`$D__\! +M)0`!$SD/$P$B%`C`$@`!$SCH'<`1`0!2)'A%P!`!`!-P`@``80@`9#'C#P!A +MC`K`$@$`$VY>``!AJ-6`@0``P!8&`1-B!`C`$`0`$V0/7``B"@``0``&`'`: +M``!A```3)```$R4``,`7(`!8,<@@P!!P1<`0$`C`$```$R4#`!,D'`C`$1P( +MP!$``!,D!`C`$0\4%2($`!4F#S`@(OO_,#(#`!,D&`C`$0\4%2("`!4F#R`P +M(@``$R001<`1&`C`$1``6#$``!,E`P`3)```(24_`"$D#TP`(@H``$`!``!P +M!```8?[_$S("`#!P^/\A,OK_(3("``!P!```8?W_$S("`#!PQ_\A,M?_(3(H +M`,T1#R$3(BP`S1$``!,E```3)`P`S1%\"L`2``#-$0]-$R($$,41`@`3)/`< +MP!$!`!,D[!S`$0``$R1P`!,E$!S`$0``$R4``!,DX!S`$0``$R4!`!,D<$3$ +M$60`$R101,01F-6`@0``P!8"`1-B#Q05(@P`%28!`!,D`0`3)"00P!$``!,D +M``#`%P\4%2(0`!4F!@`3)%!$Q!$``!,D<$3$$0``%20````A```;)0``&R0! +M`&1N`0`;)`(`9&X"`!LD!`!D;@0`&R0,`!MB#QL+(@\+8R(!`!M``@`;00`` +M`&$``!LEG`N`@0`;&B@``,`6```;)0(`&T```!MQ#V1C(@``'20````A```` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````#0!P`````````````!`0$!`0$!`;T? +M``!C+@``_____P``````````````````````````"``````````````````` +M`````````````````````````````0`````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````#,P```1$```````````````"B@````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````!$`(`````````````D````*``` +M`"P````P````-````#@````\````0````$0```!(````3````%````!4```` +M6````%P```!@````9````&@```!L````<````'0```!X````?````(````"$ +M````B````(P```"0````E0```)D```"=````H0```*4```"I````K0```+$` +M```J````.@```$H```!:````:@```'H```"*````FP```*L````"````!``` +M``8````#````"P```!,````;````(P```"L````S````.@```$(````!```` +M``````0````%`````````````````/\```#^`0```O\```/_``$`_P$``0(! +M`@+_`@#_`P(`_@0"``/_````````````````>-(```H````$````)-.````` +M`````````````(S2```*````!````"33@``````````````````````````` +M````````````````````````````'@```!Z('HA:````5@```%:(5H@"`0`` +MJ@```*J(JHC^`0``C`H``%2,5(RD'P````#_```!`/\```/_```&_P``"?\` +M``K_`0#_`0$!`0$!``+_`0(#_P$!!O\!`0G_`0`*_P$`_@("`/\#`@($`P(` +M!?\"``C_`@,&_P(`"?\"`@/_`@`*_P(`_@0#`/\%`P('_P,`"?\#`P/_`P,& +M_P,`"O\#`/X&````````````````8)4```H````$````)-.````````````` +M`````/B5```%````!````"33@``````````````````````````````````` +M````+),!`$25`0"TE`$`')4!`)"/`0"(CP$`,&4``!1B``!D8@`````````` +M````````````````````````````````_P<```#_```'_P`!"0@```K_`0(` +M``$#`?\!`P+_`0,#_P$!!/\!`@4``0$+_P$"#/\!!`8&`0$'_P$`"/\!``K_ +M`@(`_P(#`?\"`P+_`@,#_P(!!`$"`@4``@$+`0("#`$"!`8&`@('``(`"`$" +M``H!`P#_`@,#`/\#`P'_`P,"_P,#`P0#`00%`P(%``,!"P4#`@P%`P0&!@,# +M!_\#``@%`P`*!0,`_@,$!`#_!`0!_P0$`O\$!`/_!`0$_P0$!?\$!`O_!`0, +M_P0$!@8$!`<&!``(_P0`"O\`````````````_P````$#``("`@`#``(```7_ +M```&_P``!/\```<$```(_P$`_P$!`0`#`0(!`@$"`@(!``3_`0$'!`$`"/\" +M`P`&`@("!@(`!?\"``;_`@`$_P(`!P<"``@'`P,`!@,``04#`@(&`P$%_P,` +M!O\#``0'`P`'!P,`"`<`````````````````$```]@\``-@/``"F#P``80\` +M``D/``"=#@``(`X``)$-``#Q#```00P``((+``"T"@``V0D``/((````"``` +M`P<``/X%``#Q!```W@,``,<"``"L`0``C@````````````````$````!```` +M```````````!`````0````$```````````````$```C)@``!``,$R8```0`# +ME!.```$``>S+@``!``/PRX```0`#I/P!``(`!```(````"``````````55(` +M`$=%``!,20``3D,``$1)``!350``6EH``%I:``!:6@``6EH``%I:``!:6@`` +M6EH``%I:``!:6@``6EH`````````"`0,`@H&#@$)!0T#"PL+I*H"`#,S`P`` +M``0`,E4%````"`"KJ@H````,`,W,#``````````````````````````````` +M``````````````````#_````````````````````;-\```4```($````)-.` +M`/\```````````````````````````````8````````````````````````` +M````````````````H!.``-#T@``8`````````````````````````/____\` +M````````````````````(`(`````(0(`````(@(`````(P(`````)`(````` +M)0(`````!@``````````````T+P"`,2\`@#PO`(`$,`"`,2]`@"(O0(`-+T" +M`'C``@`8#H``D.Z``!X```#,D40``0````````#JD40````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````````````H/\```4```($ +M````)-.````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````````````````````"` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````0/_````_P(`_P`"`0/_`@,$_P(""@$"`@O_`@4%`@("`/\"`/X# +M`0#_!`$!`@4!`@'_`0(`_P$`_@8#`/\'`P,*"`,#"P@#`@'_`P4%`@,#`O\# +M`PG_`P(`_P,`_@D$`/\*!`0*"P0$"PL$!`@,!`(!_P0#!/\$!04-!`0"_P0" +M``X%!0H/!04+#P4&!A`%!0(1!0(`$@8`_Q,&!@H4!@8+%`8$!_\&!`(5!@8) +M_P8"`/\&`/X6````````````````*-L```H````$````)-.``(A]``#\?0`` +MY!\``/1]```4K```)*P``""L``!````G@```*X```1N`` +M`!?@```8X```1^```"C@```IX```..```#G@````B`$`8F)B8F)B````G`$` +M9V=G9V=G````D`$`9&1D9&1D``!F9F9F9F8````````````````````````( +M<@``!0````0````DTX``^'$```!R``"T<@``_'$```1R```````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````````,P;`````,@;`````$`<```` +M`$P<`````%`<`````%0<`````%@<`````%P<`````&`<`````&0<`````'`< +M``````@<`````&@<`````&P<`````$0<`````$@<`````!`<```````<```` +M`)@>`````)P>`````*0>`````*@>`````,`>`````+@>`````+P>```````= +M`````"`=`````$`=`````&`=`````(`=`````*`=`````,`=`````.`=```` +M`````````!0````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````````$````````````` +M``````#8!@```/\#`-`'````_P4`4`<```#_+0`L!P```/\]`(`&````_P0` +MI`8```#_)0#X!@```/\\`.`O`@``_]T`>`<```#_3`#,!P```/\B`'0'```` +M_R8`R`<```#_*`#P+@(``"```"@N`@``_S``P`8```#_!P"@!P```/\@``P0 +M$``$`1`.$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0#Q`)$!`%"A`+$!`0$`(0 +M$`T0$!`0$!`0$!`0$`8#$!`0$!`0$!`0$!`0$!`($!`0$!`0$!`0$!`0$!`0 +M$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0 +M$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0 +M$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0!Q`0$!`0 +M$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!#=!P!0\@@````````````` +M``````````````````````````````````````````````````````````#_ +M````W!Z``,04@0`:``````````$``````````````.`>@`#\%($`&``````` +M```!``````````````#__________________________P`````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````````````````````````````*3T +M`@!0$P(`;/T"`%`3`@","P0`4!,"`'SJ`0"HUP,`!#X"`%`3`@!0$P(`X.P# +M`.#L`P#@[`,`X.P#`.#L`P#@[`,`X.P#`%`3`@!0$P(`4!,"`%`3`@"L"`$` +M4!,"`%`3`@`$/@(`4!,"`%`3`@#4/0(`O#T"`%`3`@!0$P(```$````!```` +M```````````!`````0````$```````````````$````````````````````` +M``````````````````````````````````````````````$````!```````` +M````````````!R@P.DA06&!H<'B`B)"9FZ&E```````````````````````` +M```````````````````````````````````````````````````````````` +M``````````$````"`````P````````#_````_P```/\```#_```````````` +M````````R$("``4```($````)-.``````````````````+!,`@`%```"!``` +M`"33@`````````````````````````````````````````````````#_```` +M`````!A&`````"!&`````"1&`````(!&`````(1&`````(A&`````(Q&```` +M`)!&`````)1&`````)A&`````)Q&`````*!&`````,!&`````,1&`````,A& +M`````,Q&`````-!&`````-1&`````-A&`````-Q&`````.!&`````.1&```` +M`.A&`````.Q&`````/!&`````/1&`````/A&`````/Q&`````!1&``````!' +M``````1'``````A'``````Q'`````$!'`````$1'`````'Q'`````(!'```` +M`(1'`````(A'`````)!'`````)1'`````)A'`````*!'`````*1'`````*A' +M`````*1&``````1&``````A&``````Q&`````!!&``````!&`````#,````` +M`&`<`````&0<`````&@<`````&P<`````'`<`````'0<`````'@<`````(`< +M`````(@<`````(P<`````)`<`````)0<`````)@<`````)P<`````*`<```` +M`*0<`````*@<`````*P<`````+`<`````+0<`````+@<`````+P<`````,`< +M`````,0<`````,@<`````,P<`````-`<`````-0<`````-@<`````-P<```` +M`*@=`````+@=`````+P=`````,`=`````,0=`````,@=`````,P=`````-`= +M`````-0=`````-@=`````-P=`````.`=`````.0=`````.@=`````.P=```` +M`/`=`````/0=`````/@=`````/P=`````&0?`````.P?`````'0>`````$0? +M`````(`?`````(0?`````(@?`````(P?`````)`?`````)0?`````)@?```` +M`)P?`````*`?`````*0?`````*@?`````*P?`````+`?`````.0?`````/`? +M`````/0?`````/P?`````$8`````````````````````````X!P`````Y!P` +M````Z!P`````]!P`````^!P`````#!T`````&!T`````+!T`````,!T````` +MG!T`````H!T`````,!X`````-!X`````.!X`````/!X`````3!X`````4!X` +M````5!X`````6!X`````7!X`````9!X`````>!X`````?!X`````A!X````` +MC!X`````D!X`````E!X`````F!X`````G!X`````H!X`````P!X`````Q!X` +M````T!X`````U!X``````!\`````X!X`````!!\`````W!X`````=!\````` +M>!\`````?!\`````^!\`````*@`````````````````````````````````` +M``,````?````````````````````$$(`@$M+2TM+```````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````$````````````````````````````````` +M`````````````````````````````````````````````/\````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````/SP```````````````````,`````````_P`````````` +M````````````````````````````````````__\````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````(```` +M```````````````````````````````````````````````````````````` +M`````````*2,```*````!````"33@````````````'21```@DP``Q)$``,R0 +M``!0DP``Y)(``""1``"`D`````$````!!`$!`0`"`0$!`P$``@`*$`I0"I`*T`L`"T`+@`NP"_`,,`Q@#*`,X`T0#5 +M`-@`W`#?`.,`YP#J`.X`\0#U`/@`_`#_``(!!@$)`0T!$`$4`1`2$! +M)`$H`2L!+@$R`34!.`$[`3\!0@%%`4@!3`%/`5(!50%9`5P!7P%B`64!:`%K +M`6\!<@%U`7@!>P%^`8$!A`&'`8H!C0&0`9,!E@&:`9T!GP&B`:4!J`&K`:X! +ML0&T`;(!Y0'H`>L![0'P +M`?,!]@'X`?L!_@$!`@,"!@()`@P"#@(1`A0"%@(9`AP"'@(A`B0")@(I`BP" +M+@(Q`C0"-@(Y`CL"/@)!`D,"1@)(`DL"30)0`E,"50)8`EH"70)?`F("9`)G +M`FD";`)N`G$"P)]`G\"@@*$`H<"B0*,`HX"D`*3`I4"F`*:`IP" +MGP*A`J,"I@*H`JL"K0*O`K("M`*V`KD"NP*]`L`"P@+$`L8"R0++`LT"T`+2 +M`M0"U@+9`ML"W0+?`N("Y`+F`N@"Z@+M`N\"\0+S`O8"^`+Z`OP"_@(``ZL` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````8F@``!0````0````DTX`````````% +M``!R`0``J`(```,)`PD%"0P1`````````````````````/____\`'``````$ +M'``````('``````,'``````H'`````!('`````!,'`````!0'`````!0'``` +M``!\'``````H.```````3``````$3``````(3``````,3``````@3``````D +M3``````H3`````!`3`````!$3`````!@3`````"`3`````"@3`````#`3``` +M``#$3`````#(3`````#,3`````#@3```````30````!@30``````)`````#, +M)@````#<)@````#$)@`````@)``````T)`````"8)0````"<)0````"@)0`` +M``"D)0````"H)0````"L)0````#$)0````#()0````#4)0````#8)0````#< +M)0````#@)0````#D)0````#H)0````#L)0````#P)0`````$)P`````8$``` +M```L$`````!`$`````!,$`````",#0````"4#0````"<#0````#`1`````#$ +M1`````#(1`````#,1`````#01`````#41`````#81`````#@1`````#D1``` +M``#H1`````#L1`````#X1`````#\1```````10`````D10`````H10`````L +M10````!$10````"X10````!@"``````(#0`````0#0`````4#0``````#0`` +M```$#0````!5```````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````/____^`V8``Z$B!`!@``````````0``````````````!"`````````` +M````````````````````@E7"34)$PGR"-$(L0B1"'((4P@U +M"!<(^0?'!VL'4````!K0```3@```"$`$``$`!``:,```` +M&`$``!@!```8`0``&`$`*A0``"A(```F>```!K0```3@```"$`$``$`!``:( +M````&`$`"E0(``B$```&M```!.````(0`0``0`$``!@!```8`0``&`$``!@! +M```8`0!C`````(`$`,8```#&&`<`0$`5`&,!``#&`0``"B0```A8```&N``` +M!.0```(4`0``0`$`!H@````8`0``&`$``!@!```8`0``&`$`"B0```A8```& +MN```!.0```(4`0``0`$`!H@````8`0``&`$``!@!```8`0``&`$``!@!```8 +M`0``&`$``!@!```8`0``&`$``!@!```8`0!"`````````*4```"EE`(`0$`5 +M`$(```"E````"CP```AL```&P```!/0```(D`0``4`$``8`!``%,`0`$P``` +M`!@!```8`0``&`$`"CP```AL```&P```!/0```(D`0``4`$``8`!``%,`0`$ +MP````!@!```8`0``&`$``!@!```8`0``&`$``!@!```8`0``&`$``!@!```8 +M`0`"``````````8````&&```0$`5``(````&````&@```!@8```62```%'@` +M`!*P```&X```!!@!``),`0``@`$``!@!```8`0``&`$`&@```!@8```62``` +M%'@``!*P```&X```!!@!``),`0``@`$`"'````:L```$V````@@!```X`0`` +M&`$``!@!```8`0``&`$``!@!```8`0"$``````````@!```((00`0$`5`(0` +M```(`0``&@@``!@T```69```%)0``!+$```&"`$`!#@!``)D`0``E`$``!@! +M```8`0``&`$`&@@``!@T```69```%)0``!+$```&"`$`!#@!``)D`0``E`$` +M`!@!```8`0``&`$``!@!```8`0``&`$``!@!```8`0``&`$``!@!```8`0"$ +M``````````@!```((00`0$`5`(0````(`0`````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````! +M````(`````,```#I`.D````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````````#/[__P$```#2V``` +MTM@``"YG__\N9___$````-+8``#2V```+F?__RYG__\0````TM@``-+8```N +M9___+F?__Q````#2V```TM@``"YG__\N9___$````-+8``#2V```+F?__RYG +M__\0````TM@``-+8```N9___+F?__Q````#2V```TM@``"YG__\N9___$``` +M`-+8``#2V```+F?__RYG__\0````TM@``-+8```N9___+F?__Q````#2V``` +MTM@``"YG__\N9___$````-+8``#2V```+F?__RYG__\0````TM@``-+8```N +M9___+F?__Q`````````````````````````````````````````````````` +M````````F@````$``````.0,```````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````/]__W__?_]__W\````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````3 +M$Q,7&Q\I*S,[#1,3$Q<;(RPM,SL-%!04%!PD)"PT.`T4%!04'"`J+#A`#104 +M&!P<)"PN-D`-$1$1$1DA)2DM-0TD)"0D+#0T/&!X`"0D+"PL,#0^6'@`'B8F +M)BXN-D9>G@`@("`@*#`P/$R@`!XB(B8J+C(X4IX`'24E)2TU.4%EG0`;&QL; +M(RLU/U.;`!L?(R,K*S,^3YL`'"0D*"PT/DADG``5%149'2TS.5V5`!08'!PD +M+#0Z4)0`&R,C(RLS/TMGFP`2$A8:'B8P.E*2`!(:'AXB)C([9I(`&2$A)2DQ +M/45IF0`3$Q,7&Q\I*S,[#1,3$Q<;(RPM,SL-%!04%!PD)"PT.`T4%!04'"`J +M+#A`#104&!P<)"PN-D`-$1$1$1DA)2DM-0TD)"0D+#0T/&!X`"0D+"PL,#0^ +M6'@`'B8F)BXN-D9>G@`@("`@*#`P/$R@`!XB(B8J+C(X4IX`'24E)2TU.4%E +MG0`;&QL;(RLU/U.;`!L?(R,K*S,^3YL`'"0D*"PT/DADG``5%149'2TS.5V5 +M`!08'!PD+#0Z4)0`&R,C(RLS/TMGFP`2$A8:'B8P.E*2`!(:'AXB)C([9I(` +M&2$A)2DQ/45IF0`J*BHJ*BHJ*BHR#2HJ*BHJ*BHJ+C(-*"@H*"@H*"@H*`TJ +M*BHJ*BHJ*C`X#2HJ*BHJ*BHJ,#@-)RG@`@("`@*#`P/$R@`!XB +M(B8J+C(X4IX`'24E)2TU.4%EG0`;&QL;(RLU/U.;`!L?(R,K*S,^3YL`'"0D +M*"PT/DADG``5%149'2TS.5V5`!08'!PD+#0Z4)0`&R,C(RLS/TMGFP`2$A8: +M'B8P.E*2`!(:'AXB)C([9I(`&2$A)2DQ/45IF0`3$Q,7&Q\I*S,[#1,3$Q<; +M(RPM,SL-%!04%!PD)"PT.`T4%!04'"`J+#A`#104&!P<)"PN-D`-$1$1$1DA +M)2DM-0TD)"0D+#0T/&!X`"0D+"PL,#0^6'@`'B8F)BXN-D9>G@`@("`@*#`P +M/$R@`!XB(B8J+C(X4IX`'24E)2TU.4%EG0`;&QL;(RLU/U.;`!L?(R,K*S,^ +M3YL`'"0D*"PT/DADG``5%149'2TS.5V5`!08'!PD+#0Z4)0`&R,C(RLS/TMG +MFP`2$A8:'B8P.E*2`!(:'AXB)C([9I(`&2$A)2DQ/45IF0`3$Q,7&Q\I*S,[ +M#1,3$Q<;(RPM,SL-%!04%!PD)"PT.`T4%!04'"`J+#A`#104&!P<)"PN-D`- +M$1$1$1DA)2DM-0TD)"0D+#0T/&!X`"0D+"PL,#0^6'@`'B8F)BXN-D9>G@`@ +M("`@*#`P/$R@`!XB(B8J+C(X4IX`'24E)2TU.4%EG0`;&QL;(RLU/U.;`!L? +M(R,K*S,^3YL`'"0D*"PT/DADG``5%149'2TS.5V5`!08'!PD+#0Z4)0`&R,C +M(RLS/TMGFP`2$A8:'B8P.E*2`!(:'AXB)C([9I(`&2$A)2DQ/45IF0`J*BHJ +M*BHJ*BHR#2HJ*BHJ*BHJ+C(-*"@H*"@H*"@H*`TJ*BHJ*BHJ*C`X#2HJ*BHJ +M*BHJ,#@-)RG@`@("`@*#`P/$R@`!XB(B8J+C(X4IX`'24E)2TU +M.4%EG0`;&QL;(RLU/U.;`!L?(R,K*S,^3YL`'"0D*"PT/DADG``5%149'2TS +M.5V5`!08'!PD+#0Z4)0`&R,C(RLS/TMGFP`2$A8:'B8P.E*2`!(:'AXB)C([ +M9I(`&2$A)2DQ/45IF0`0$!`0%"`H*#`P#1`0$!`4("@H,#@-*"@H*"XX0DA. +M6``H*"@H,CQ$3%)>`"@H*"@R/$1,5&``*"@H*#`X0$948``H*"@H,#A`1E1@ +M`!`0$!`4("@H,#`-$!`0$!0@*"@P.`TH*"@H+CA"2$Y8`"@H*"@R/$1,4EX` +M*"@H*#(\1$Q48``H*"@H,#A`1E1@`"@H*"@P.$!&5&``_W__?_]__W__?_]_ +M_W__?_]__W\````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````,`4``#`'X`#0"``"D`J@!`````8P`#`(@`%0"7`#D`NP$@`- +M@!3@#D`5@!`P%_`1``S`$T`.T!1@#T`6@!'0%Z`>4!E`(*`:4"*P'"`D\!UP +M&'`?$!K@()`;H"-@'6`E@"[0)V`O,"FP,3`K@#,`+>`FP"Y`*)`PD"IP,H`K +M<#0@.Y`U8#R@-T`^@#C0/X`Z`#6@.Z`V8#T0.!`_@#E@0(!&H$%`2$!#`$H0 +M13!+P$700'!'P$(@21!$D$IP12!,L%003E!6P$^P6!!2X%FP4S!-H%4`3U!7 +MX%!@6\!U +M`'Y0=P!_4'EP@#![0(*@B5"$,(N@A?"-L(?PCH"(((/`BO"$D(S@AG".((AP +MD""8()(`FA"4P)O`E6"=<)?0D:"8T))`FT"5`)Q@EK"><*7@GV"G@*'0J$"C +M$*O0I""?0*:PH$"H4*+PJ2"DD*L@LS"MP+00KX"V<+$0N*"R(*SPLU"N8+4P +ML'"W(++@N(#`L+K`P3"\\,,0OC#%D+_PN0#!,+OPPE"]@,20OH#&4,_PQW#0 +M0,KPT<#+8--PSH#'P,\`R2#1\,JPTB#-X-/0VY#5P-W0UV#?@-D@X5#;,-3` +MW$#74-Y0V)#@P-J@X9#IH./@ZF#E$.U`YQ#NP.B@XC#J@.00[%#F<.W0Y]#N +MT/6`\##W\/%`^I#S8/L`];#OL/80\;#XX/*@^D#TL/SP_^#]\/]0__#_X/_P +M__#_@/WP_Y#^\/_`__#_\/_P__#_\/_P__#_\/_P__#_\/_P__#_\/_P__#_ +M\/_P__#_\/_P__#_\/_P__#_\/_P__#_\/_P__#_\/_P__#_\/_P__#_\/_P +M__#_\/_P__#_\/_P__#_\/_P__#_\/_P__#_\/_P__#_\/_P__#_\/_P__#_ +M\/_P__#_\/_P__#_\/_P__#_\/_P__#_\/_P__#_\/_P__#_\/_P__#_@`"` +M`8`"@`.`!(`%@`:`!X`(@`F`"H`+@`R`#8`.@`^`$(`1@!*`$X`4@!6`%H`7 +M@!B`&8`:@!N`'(`=@!Z`'X`@@"&`(H`C@"2`)8`F@">`*(`I@"J`*X`L@"V` +M+H`O@#"`,8`R@#.`-(`U@#:`-X`X@#F`.H`[@#R`/8`^@#^`0(!!@$*`0X!$ +M@$6`1H!'@$B`28!*@$N`3(!-@$Z`3X!0@%&`4H!3H+L-`&!;`P"@NPT`X"(" +M```````````!``$````!``$````!``$````!``$````!``$````!``$````! +M`````0````$````!`````0````$````!``$````!``$````!``$````!``$` +M```!``$````!``$````!`````0````$````!`````0````$````!``$````! +M``$````!``$````!``$````!``$````!``$````!`````0````$````!```` +M`0````$````!``$````!``$````!``$````!``$````!``$````!``$````! +M`````0````$````!`````0````$````!``$````!``$````!``$````!``$` +M```!``$````!``$````!`````0````$````!`````0````$````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````=W<#`PT-!@8#`PT-!@8#`PT-!@8# +M`PT-!@8#`PT-!@8#`PT-```````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````)A9$`28&8JB```````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Wed Feb 8 07:03: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 F3AB0CD375C; Wed, 8 Feb 2017 07:03:53 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0B6EA13; Wed, 8 Feb 2017 07:03:53 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1873qeD017936; Wed, 8 Feb 2017 07:03:52 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1873q5u017935; Wed, 8 Feb 2017 07:03:52 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702080703.v1873q5u017935@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 8 Feb 2017 07:03:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313425 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Wed, 08 Feb 2017 07:03:54 -0000 Author: adrian Date: Wed Feb 8 07:03:52 2017 New Revision: 313425 URL: https://svnweb.freebsd.org/changeset/base/313425 Log: [iwm] add version 17 firmware. Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Feb 8 07:03:24 2017 (r313424) +++ head/sys/conf/files Wed Feb 8 07:03:52 2017 (r313425) @@ -1897,7 +1897,7 @@ iwm3160fw.fwo optional iwm3160fw | iwm no-implicit-rule \ clean "iwm3160fw.fwo" iwm3160.fw optional iwm3160fw | iwmfw \ - dependency "$S/contrib/dev/iwm/iwm-3160-16.fw.uu" \ + dependency "$S/contrib/dev/iwm/iwm-3160-17.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwm3160.fw" @@ -1911,7 +1911,7 @@ iwm7260fw.fwo optional iwm7260fw | iwm no-implicit-rule \ clean "iwm7260fw.fwo" iwm7260.fw optional iwm7260fw | iwmfw \ - dependency "$S/contrib/dev/iwm/iwm-7260-16.fw.uu" \ + dependency "$S/contrib/dev/iwm/iwm-7260-17.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwm7260.fw" @@ -1925,7 +1925,7 @@ iwm7265fw.fwo optional iwm7265fw | iwm no-implicit-rule \ clean "iwm7265fw.fwo" iwm7265.fw optional iwm7265fw | iwmfw \ - dependency "$S/contrib/dev/iwm/iwm-7265-16.fw.uu" \ + dependency "$S/contrib/dev/iwm/iwm-7265-17.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwm7265.fw" @@ -1939,7 +1939,7 @@ iwm8000Cfw.fwo optional iwm8000Cfw | i no-implicit-rule \ clean "iwm8000Cfw.fwo" iwm8000C.fw optional iwm8000Cfw | iwmfw \ - dependency "$S/contrib/dev/iwm/iwm-8000C-16.fw.uu" \ + dependency "$S/contrib/dev/iwm/iwm-8000C-17.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwm8000C.fw" From owner-svn-src-head@freebsd.org Wed Feb 8 07:04: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 8D3D5CD37A2; Wed, 8 Feb 2017 07:04:08 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43510AEF; Wed, 8 Feb 2017 07:04:08 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v18747a9017994; Wed, 8 Feb 2017 07:04:07 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v18747g2017990; Wed, 8 Feb 2017 07:04:07 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702080704.v18747g2017990@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 8 Feb 2017 07:04:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313426 - in head/sys/modules/iwmfw: iwm3160fw iwm7260fw iwm7265fw iwm8000Cfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Wed, 08 Feb 2017 07:04:08 -0000 Author: adrian Date: Wed Feb 8 07:04:06 2017 New Revision: 313426 URL: https://svnweb.freebsd.org/changeset/base/313426 Log: [iwm] bump firmware to version 17. Modified: head/sys/modules/iwmfw/iwm3160fw/Makefile head/sys/modules/iwmfw/iwm7260fw/Makefile head/sys/modules/iwmfw/iwm7265fw/Makefile head/sys/modules/iwmfw/iwm8000Cfw/Makefile Modified: head/sys/modules/iwmfw/iwm3160fw/Makefile ============================================================================== --- head/sys/modules/iwmfw/iwm3160fw/Makefile Wed Feb 8 07:03:52 2017 (r313425) +++ head/sys/modules/iwmfw/iwm3160fw/Makefile Wed Feb 8 07:04:06 2017 (r313426) @@ -1,6 +1,6 @@ # $FreeBSD$ KMOD= iwm3160fw -IMG= iwm-3160-16 +IMG= iwm-3160-17 .include Modified: head/sys/modules/iwmfw/iwm7260fw/Makefile ============================================================================== --- head/sys/modules/iwmfw/iwm7260fw/Makefile Wed Feb 8 07:03:52 2017 (r313425) +++ head/sys/modules/iwmfw/iwm7260fw/Makefile Wed Feb 8 07:04:06 2017 (r313426) @@ -1,6 +1,6 @@ # $FreeBSD$ KMOD= iwm7260fw -IMG= iwm-7260-16 +IMG= iwm-7260-17 .include Modified: head/sys/modules/iwmfw/iwm7265fw/Makefile ============================================================================== --- head/sys/modules/iwmfw/iwm7265fw/Makefile Wed Feb 8 07:03:52 2017 (r313425) +++ head/sys/modules/iwmfw/iwm7265fw/Makefile Wed Feb 8 07:04:06 2017 (r313426) @@ -1,6 +1,6 @@ # $FreeBSD$ KMOD= iwm7265fw -IMG= iwm-7265-16 +IMG= iwm-7265-17 .include Modified: head/sys/modules/iwmfw/iwm8000Cfw/Makefile ============================================================================== --- head/sys/modules/iwmfw/iwm8000Cfw/Makefile Wed Feb 8 07:03:52 2017 (r313425) +++ head/sys/modules/iwmfw/iwm8000Cfw/Makefile Wed Feb 8 07:04:06 2017 (r313426) @@ -1,6 +1,6 @@ # $FreeBSD$ KMOD= iwm8000Cfw -IMG= iwm-8000C-16 +IMG= iwm-8000C-17 .include From owner-svn-src-head@freebsd.org Wed Feb 8 07:05: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 CAE02CD3864; Wed, 8 Feb 2017 07:05:57 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A93ACB8; Wed, 8 Feb 2017 07:05:57 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1875utI018106; Wed, 8 Feb 2017 07:05:56 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1875uYq018103; Wed, 8 Feb 2017 07:05:56 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702080705.v1875uYq018103@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 8 Feb 2017 07:05:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313427 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Wed, 08 Feb 2017 07:05:57 -0000 Author: adrian Date: Wed Feb 8 07:05:56 2017 New Revision: 313427 URL: https://svnweb.freebsd.org/changeset/base/313427 Log: [iwm] Recognize the IWM_UCODE_TLV_FW_MEM_SEG firmware section type. * Will be needed for loading version 22 of 7265D firmware. Obtained from: DragonflyBSD commit 1d244c8133cf15d00d46836bc48958188cf9f510 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwmreg.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Wed Feb 8 07:04:06 2017 (r313426) +++ head/sys/dev/iwm/if_iwm.c Wed Feb 8 07:05:56 2017 (r313427) @@ -892,6 +892,9 @@ iwm_read_firmware(struct iwm_softc *sc, le32toh(((const uint32_t *)tlv_data)[2])); break; + case IWM_UCODE_TLV_FW_MEM_SEG: + break; + default: device_printf(sc->sc_dev, "%s: unknown firmware section %d, abort\n", Modified: head/sys/dev/iwm/if_iwmreg.h ============================================================================== --- head/sys/dev/iwm/if_iwmreg.h Wed Feb 8 07:04:06 2017 (r313426) +++ head/sys/dev/iwm/if_iwmreg.h Wed Feb 8 07:05:56 2017 (r313427) @@ -1006,6 +1006,7 @@ enum iwm_ucode_tlv_type { IWM_UCODE_TLV_FW_DBG_CONF = 39, IWM_UCODE_TLV_FW_DBG_TRIGGER = 40, IWM_UCODE_TLV_FW_GSCAN_CAPA = 50, + IWM_UCODE_TLV_FW_MEM_SEG = 51, }; struct iwm_ucode_tlv { From owner-svn-src-head@freebsd.org Wed Feb 8 07:07: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 B6179CD38E8; Wed, 8 Feb 2017 07:07:24 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 829E7E07; Wed, 8 Feb 2017 07:07:24 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1877NLr018196; Wed, 8 Feb 2017 07:07:23 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1877Nrq018194; Wed, 8 Feb 2017 07:07:23 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702080707.v1877Nrq018194@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 8 Feb 2017 07:07:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313428 - in head/sys: conf modules/iwmfw/iwm8000Cfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Wed, 08 Feb 2017 07:07:24 -0000 Author: adrian Date: Wed Feb 8 07:07:23 2017 New Revision: 313428 URL: https://svnweb.freebsd.org/changeset/base/313428 Log: [iwm] back this out to version 16 for now. Since I'm manually playing the dragonflybsd iwm/iwmfw commits forward, I'm .. well, this. This right here. Modified: head/sys/conf/files head/sys/modules/iwmfw/iwm8000Cfw/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Feb 8 07:05:56 2017 (r313427) +++ head/sys/conf/files Wed Feb 8 07:07:23 2017 (r313428) @@ -1939,7 +1939,7 @@ iwm8000Cfw.fwo optional iwm8000Cfw | i no-implicit-rule \ clean "iwm8000Cfw.fwo" iwm8000C.fw optional iwm8000Cfw | iwmfw \ - dependency "$S/contrib/dev/iwm/iwm-8000C-17.fw.uu" \ + dependency "$S/contrib/dev/iwm/iwm-8000C-16.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwm8000C.fw" Modified: head/sys/modules/iwmfw/iwm8000Cfw/Makefile ============================================================================== --- head/sys/modules/iwmfw/iwm8000Cfw/Makefile Wed Feb 8 07:05:56 2017 (r313427) +++ head/sys/modules/iwmfw/iwm8000Cfw/Makefile Wed Feb 8 07:07:23 2017 (r313428) @@ -1,6 +1,6 @@ # $FreeBSD$ KMOD= iwm8000Cfw -IMG= iwm-8000C-17 +IMG= iwm-8000C-16 .include From owner-svn-src-head@freebsd.org Wed Feb 8 07:08: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 E0424CD3968; Wed, 8 Feb 2017 07:08:14 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B0128F48; Wed, 8 Feb 2017 07:08:14 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1878D2L018266; Wed, 8 Feb 2017 07:08:13 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1878DdK018265; Wed, 8 Feb 2017 07:08:13 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702080708.v1878DdK018265@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 8 Feb 2017 07:08:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313429 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Wed, 08 Feb 2017 07:08:15 -0000 Author: adrian Date: Wed Feb 8 07:08:13 2017 New Revision: 313429 URL: https://svnweb.freebsd.org/changeset/base/313429 Log: [iwm] SCAN_ABORT_UMAC response doesn't use a wide id Obtained from: DragonflyBSD commit cef47a9cbb0a3ce5f18369fed9403d2764884bc2 Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Wed Feb 8 07:07:23 2017 (r313428) +++ head/sys/dev/iwm/if_iwm.c Wed Feb 8 07:08:13 2017 (r313429) @@ -5482,7 +5482,7 @@ iwm_notif_intr(struct iwm_softc *sc) case IWM_TIME_EVENT_CMD: case IWM_WIDE_ID(IWM_ALWAYS_LONG_GROUP, IWM_SCAN_CFG_CMD): case IWM_WIDE_ID(IWM_ALWAYS_LONG_GROUP, IWM_SCAN_REQ_UMAC): - case IWM_WIDE_ID(IWM_ALWAYS_LONG_GROUP, IWM_SCAN_ABORT_UMAC): + case IWM_SCAN_ABORT_UMAC: case IWM_SCAN_OFFLOAD_REQUEST_CMD: case IWM_SCAN_OFFLOAD_ABORT_CMD: case IWM_REPLY_BEACON_FILTERING_CMD: From owner-svn-src-head@freebsd.org Wed Feb 8 07:09: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 A012DCD3A14; Wed, 8 Feb 2017 07:09:11 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6FD52117D; Wed, 8 Feb 2017 07:09:11 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1879AfV018463; Wed, 8 Feb 2017 07:09:10 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1879A8j018462; Wed, 8 Feb 2017 07:09:10 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702080709.v1879A8j018462@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 8 Feb 2017 07:09:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313430 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Wed, 08 Feb 2017 07:09:11 -0000 Author: adrian Date: Wed Feb 8 07:09:10 2017 New Revision: 313430 URL: https://svnweb.freebsd.org/changeset/base/313430 Log: [iwm] Remove 1s delay after fw loading. Can't reproduce issues on AC8260. The 1s delay was added in the update to version 16 fw, where Family 8000 support was added. Obtained from: DragonflyBSD commit bb480ca679a7ea530bdca6e41082d5755e9751dc Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Wed Feb 8 07:08:13 2017 (r313429) +++ head/sys/dev/iwm/if_iwm.c Wed Feb 8 07:09:10 2017 (r313430) @@ -2678,12 +2678,6 @@ iwm_load_firmware(struct iwm_softc *sc, } } - /* - * Give the firmware some time to initialize. - * Accessing it too early causes errors. - */ - msleep(&w, &sc->sc_mtx, 0, "iwmfwinit", hz); - return error; } From owner-svn-src-head@freebsd.org Wed Feb 8 08:43: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 95E60CD4928; Wed, 8 Feb 2017 08:43:00 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 7D817689; Wed, 8 Feb 2017 08:43:00 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (ppp121-45-246-6.lns20.per4.internode.on.net [121.45.246.6]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id v188gseq012371 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 8 Feb 2017 00:42:57 -0800 (PST) (envelope-from julian@freebsd.org) Subject: Re: svn commit: r313272 - in head/sys: kern sys To: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201702050520.v155KTW8080845@repo.freebsd.org> <20170205120536.GA16310@dft-labs.eu> From: Julian Elischer Message-ID: Date: Wed, 8 Feb 2017 16:42:48 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170205120536.GA16310@dft-labs.eu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-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: Wed, 08 Feb 2017 08:43:00 -0000 On 5/2/17 8:05 pm, Mateusz Guzik wrote: > On Sun, Feb 05, 2017 at 05:20:29AM +0000, Mateusz Guzik wrote: >> Author: mjg >> Date: Sun Feb 5 05:20:29 2017 >> New Revision: 313272 >> URL: https://svnweb.freebsd.org/changeset/base/313272 >> >> Log: >> sx: uninline slock/sunlock >> >> Shared locking routines explicitly read the value and test it. If the >> change attempt fails, they fall back to a regular function which would >> retry in a loop. >> >> The problem is that with many concurrent readers the risk of failure is pretty >> high and even the value returned by fcmpset is very likely going to be stale >> by the time the loop in the fallback routine is reached. >> >> Uninline said primitives. It gives a throughput increase when doing concurrent >> slocks/sunlocks with 80 hardware threads from ~50 mln/s to ~56 mln/s. >> >> Interestingly, rwlock primitives are already not inlined. >> > Note that calling to "hard" primitives each is somewhat expensive. > In order to remedy part of the cost I intend to introduce uninlined > variants which only know how to spin. I have a WIP patch for rwlocks and > after I flesh it out I'll adapt it for sx. > please remember to report back with some ministat plots when you are done so we can see the results.. Thanks for doing the work. >> Modified: >> head/sys/kern/kern_sx.c >> head/sys/sys/sx.h >> >> Modified: head/sys/kern/kern_sx.c >> ============================================================================== >> --- head/sys/kern/kern_sx.c Sun Feb 5 04:54:20 2017 (r313271) >> +++ head/sys/kern/kern_sx.c Sun Feb 5 05:20:29 2017 (r313272) >> @@ -276,29 +276,6 @@ sx_destroy(struct sx *sx) >> } >> >> int >> -_sx_slock(struct sx *sx, int opts, const char *file, int line) >> -{ >> - int error = 0; >> - >> - if (SCHEDULER_STOPPED()) >> - return (0); >> - KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), >> - ("sx_slock() by idle thread %p on sx %s @ %s:%d", >> - curthread, sx->lock_object.lo_name, file, line)); >> - KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, >> - ("sx_slock() of destroyed sx @ %s:%d", file, line)); >> - WITNESS_CHECKORDER(&sx->lock_object, LOP_NEWORDER, file, line, NULL); >> - error = __sx_slock(sx, opts, file, line); >> - if (!error) { >> - LOCK_LOG_LOCK("SLOCK", &sx->lock_object, 0, 0, file, line); >> - WITNESS_LOCK(&sx->lock_object, 0, file, line); >> - TD_LOCKS_INC(curthread); >> - } >> - >> - return (error); >> -} >> - >> -int >> sx_try_slock_(struct sx *sx, const char *file, int line) >> { >> uintptr_t x; >> @@ -391,21 +368,6 @@ sx_try_xlock_(struct sx *sx, const char >> } >> >> void >> -_sx_sunlock(struct sx *sx, const char *file, int line) >> -{ >> - >> - if (SCHEDULER_STOPPED()) >> - return; >> - KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, >> - ("sx_sunlock() of destroyed sx @ %s:%d", file, line)); >> - _sx_assert(sx, SA_SLOCKED, file, line); >> - WITNESS_UNLOCK(&sx->lock_object, 0, file, line); >> - LOCK_LOG_LOCK("SUNLOCK", &sx->lock_object, 0, 0, file, line); >> - __sx_sunlock(sx, file, line); >> - TD_LOCKS_DEC(curthread); >> -} >> - >> -void >> _sx_xunlock(struct sx *sx, const char *file, int line) >> { >> >> @@ -840,14 +802,8 @@ _sx_xunlock_hard(struct sx *sx, uintptr_ >> kick_proc0(); >> } >> >> -/* >> - * This function represents the so-called 'hard case' for sx_slock >> - * operation. All 'easy case' failures are redirected to this. Note >> - * that ideally this would be a static function, but it needs to be >> - * accessible from at least sx.h. >> - */ >> int >> -_sx_slock_hard(struct sx *sx, int opts, const char *file, int line) >> +_sx_slock(struct sx *sx, int opts, const char *file, int line) >> { >> GIANT_DECLARE; >> #ifdef ADAPTIVE_SX >> @@ -1051,14 +1007,8 @@ _sx_slock_hard(struct sx *sx, int opts, >> return (error); >> } >> >> -/* >> - * This function represents the so-called 'hard case' for sx_sunlock >> - * operation. All 'easy case' failures are redirected to this. Note >> - * that ideally this would be a static function, but it needs to be >> - * accessible from at least sx.h. >> - */ >> void >> -_sx_sunlock_hard(struct sx *sx, const char *file, int line) >> +_sx_sunlock(struct sx *sx, const char *file, int line) >> { >> uintptr_t x; >> int wakeup_swapper; >> @@ -1066,6 +1016,7 @@ _sx_sunlock_hard(struct sx *sx, const ch >> if (SCHEDULER_STOPPED()) >> return; >> >> + LOCKSTAT_PROFILE_RELEASE_RWLOCK(sx__release, sx, LOCKSTAT_READER); >> x = SX_READ_VALUE(sx); >> for (;;) { >> /* >> >> Modified: head/sys/sys/sx.h >> ============================================================================== >> --- head/sys/sys/sx.h Sun Feb 5 04:54:20 2017 (r313271) >> +++ head/sys/sys/sx.h Sun Feb 5 05:20:29 2017 (r313272) >> @@ -111,10 +111,8 @@ void _sx_sunlock(struct sx *sx, const ch >> void _sx_xunlock(struct sx *sx, const char *file, int line); >> int _sx_xlock_hard(struct sx *sx, uintptr_t v, uintptr_t tid, int opts, >> const char *file, int line); >> -int _sx_slock_hard(struct sx *sx, int opts, const char *file, int line); >> void _sx_xunlock_hard(struct sx *sx, uintptr_t tid, const char *file, int >> line); >> -void _sx_sunlock_hard(struct sx *sx, const char *file, int line); >> #if defined(INVARIANTS) || defined(INVARIANT_SUPPORT) >> void _sx_assert(const struct sx *sx, int what, const char *file, int line); >> #endif >> @@ -179,41 +177,6 @@ __sx_xunlock(struct sx *sx, struct threa >> _sx_xunlock_hard(sx, tid, file, line); >> } >> >> -/* Acquire a shared lock. */ >> -static __inline int >> -__sx_slock(struct sx *sx, int opts, const char *file, int line) >> -{ >> - uintptr_t x = sx->sx_lock; >> - int error = 0; >> - >> - if (!(x & SX_LOCK_SHARED) || >> - !atomic_cmpset_acq_ptr(&sx->sx_lock, x, x + SX_ONE_SHARER)) >> - error = _sx_slock_hard(sx, opts, file, line); >> - else >> - LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(sx__acquire, sx, >> - 0, 0, file, line, LOCKSTAT_READER); >> - >> - return (error); >> -} >> - >> -/* >> - * Release a shared lock. We can just drop a single shared lock so >> - * long as we aren't trying to drop the last shared lock when other >> - * threads are waiting for an exclusive lock. This takes advantage of >> - * the fact that an unlocked lock is encoded as a shared lock with a >> - * count of 0. >> - */ >> -static __inline void >> -__sx_sunlock(struct sx *sx, const char *file, int line) >> -{ >> - uintptr_t x = sx->sx_lock; >> - >> - LOCKSTAT_PROFILE_RELEASE_RWLOCK(sx__release, sx, LOCKSTAT_READER); >> - if (x == (SX_SHARERS_LOCK(1) | SX_LOCK_EXCLUSIVE_WAITERS) || >> - !atomic_cmpset_rel_ptr(&sx->sx_lock, x, x - SX_ONE_SHARER)) >> - _sx_sunlock_hard(sx, file, line); >> -} >> - >> /* >> * Public interface for lock operations. >> */ >> @@ -227,12 +190,6 @@ __sx_sunlock(struct sx *sx, const char * >> _sx_xlock((sx), SX_INTERRUPTIBLE, (file), (line)) >> #define sx_xunlock_(sx, file, line) \ >> _sx_xunlock((sx), (file), (line)) >> -#define sx_slock_(sx, file, line) \ >> - (void)_sx_slock((sx), 0, (file), (line)) >> -#define sx_slock_sig_(sx, file, line) \ >> - _sx_slock((sx), SX_INTERRUPTIBLE, (file) , (line)) >> -#define sx_sunlock_(sx, file, line) \ >> - _sx_sunlock((sx), (file), (line)) >> #else >> #define sx_xlock_(sx, file, line) \ >> (void)__sx_xlock((sx), curthread, 0, (file), (line)) >> @@ -240,13 +197,13 @@ __sx_sunlock(struct sx *sx, const char * >> __sx_xlock((sx), curthread, SX_INTERRUPTIBLE, (file), (line)) >> #define sx_xunlock_(sx, file, line) \ >> __sx_xunlock((sx), curthread, (file), (line)) >> +#endif /* LOCK_DEBUG > 0 || SX_NOINLINE */ >> #define sx_slock_(sx, file, line) \ >> - (void)__sx_slock((sx), 0, (file), (line)) >> + (void)_sx_slock((sx), 0, (file), (line)) >> #define sx_slock_sig_(sx, file, line) \ >> - __sx_slock((sx), SX_INTERRUPTIBLE, (file), (line)) >> + _sx_slock((sx), SX_INTERRUPTIBLE, (file) , (line)) >> #define sx_sunlock_(sx, file, line) \ >> - __sx_sunlock((sx), (file), (line)) >> -#endif /* LOCK_DEBUG > 0 || SX_NOINLINE */ >> + _sx_sunlock((sx), (file), (line)) >> #define sx_try_slock(sx) sx_try_slock_((sx), LOCK_FILE, LOCK_LINE) >> #define sx_try_xlock(sx) sx_try_xlock_((sx), LOCK_FILE, LOCK_LINE) >> #define sx_try_upgrade(sx) sx_try_upgrade_((sx), LOCK_FILE, LOCK_LINE) >> _______________________________________________ >> svn-src-all@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/svn-src-all >> To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@freebsd.org Wed Feb 8 08:52: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 345B0CD4D07; Wed, 8 Feb 2017 08:52:24 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x242.google.com (mail-pf0-x242.google.com [IPv6:2607:f8b0:400e:c00::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F3D90BCA; Wed, 8 Feb 2017 08:52:23 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x242.google.com with SMTP id e4so11220425pfg.0; Wed, 08 Feb 2017 00:52:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=Ts+wqcP2wZ1lVljUN8XkLE7whCOAnM9+C00bsShD7Hs=; b=MAfU7lKooTbXzuQbZGDNSqjvxzHCqrs2oj5Xv4Ym61ZdxDp247ivJNHstzl2WLxa3C EdidEmAPNiUe/s4Z5Vp7Xjyvm8LcbTdwLzwcn1XxHVuSzaItK73pPEtaUI3R7rYHBy7/ /5RvjB8F1QBYDHn7jmwao44VAL5U0pVbsWb+DLM/EnLRP77uNVsh1n9x2WvU9T6tvtcQ 6S+CJvR1UPaqCUkb+tMuErUyOFQITLK0gTSZGNvR1dNugIu9uJXE+1HNPRHGSKS7VViR +F3ZPxZpY9jldY6vB6Yu5elxY5Yy1qD4w+Te5KdsDP7kE6OkPbMZM2A99rYDg/NCCxj3 hu7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=Ts+wqcP2wZ1lVljUN8XkLE7whCOAnM9+C00bsShD7Hs=; b=CfzywIU1VoK5jVkNk8uprXQTWIH6W9XB9JCZTvLxd7VuF7iHVATZk/YnjuHcz3A6GL 5l/TnrjOBCBl0zgbpNZuBfk/6zl+xfIEHTeoSc3g416qV5MBhiaxcKLYHqaGe6edOA+Q wkbwe36Sj8qOlw/9DfjLVN81lwbipKQ9gCvseO+XKyYnWN67L7jyav65DSmv7sG7Rdq3 8ox+cYOOU+rWheUXCAw/s7+CJ4auAaLHCNh6Adzn7mFFfqN54MOSgOiRo+qWI1uKPBfu musAKvq8DitmxRnTYEuAca0FVBEm56AuPUL7/Hzxb43M1eFIR8T8rQUMVGCaPyvUfF8e oNvQ== X-Gm-Message-State: AIkVDXLhb6rJCpIimy1NIv0hflbma2cSQjwo2p2XywSoSkTcKF6BLr84TgDuDCvfGbCJhA== X-Received: by 10.98.16.14 with SMTP id y14mr24803277pfi.63.1486543943305; Wed, 08 Feb 2017 00:52:23 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id m21sm18089339pgh.4.2017.02.08.00.52.22 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Feb 2017 00:52:22 -0800 (PST) Subject: Re: svn commit: r312926 - in head: bin/ed contrib/dma share/mk sys/amd64/amd64 sys/amd64/cloudabi64 sys/cam/ctl sys/cddl/dev/fbt/x86 sys/compat/cloudabi sys/compat/cloudabi64 sys/compat/linuxkpi/common... Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_657136FC-AF6C-49AF-8BA4-CAD685E0C908"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201701281630.v0SGUEfW063907@repo.freebsd.org> Date: Wed, 8 Feb 2017 00:52:20 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <6F201758-8984-49A9-9F47-5E9C4F5700E4@gmail.com> References: <201701281630.v0SGUEfW063907@repo.freebsd.org> To: Baptiste Daroussin X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-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: Wed, 08 Feb 2017 08:52:24 -0000 --Apple-Mail=_657136FC-AF6C-49AF-8BA4-CAD685E0C908 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 28, 2017, at 08:30, Baptiste Daroussin = wrote: >=20 > Author: bapt > Date: Sat Jan 28 16:30:14 2017 > New Revision: 312926 > URL: https://svnweb.freebsd.org/changeset/base/312926 >=20 > Log: > Revert r312923 a better approach will be taken later >=20 > Modified: > head/bin/ed/Makefile > head/contrib/dma/mail.c > head/share/mk/bsd.doc.mk > head/sys/amd64/amd64/db_trace.c > head/sys/amd64/cloudabi64/cloudabi64_sysvec.c > head/sys/cam/ctl/ctl_ioctl.h > head/sys/cddl/dev/fbt/x86/fbt_isa.c > head/sys/compat/cloudabi/cloudabi_fd.c > head/sys/compat/cloudabi64/cloudabi64_poll.c > head/sys/compat/linuxkpi/common/include/linux/slab.h > head/sys/contrib/dev/acpica/components/namespace/nsxfeval.c > head/sys/contrib/dev/acpica/include/acpixf.h > head/sys/ddb/ddb.h > head/sys/dev/drm2/drm_agpsupport.c > head/sys/dev/drm2/drm_bufs.c > head/sys/dev/drm2/drm_dma.c > head/sys/dev/drm2/drm_drv.c > head/sys/dev/drm2/drm_os_freebsd.c > head/sys/dev/drm2/drm_os_freebsd.h > head/sys/dev/drm2/drm_stub.c > head/sys/fs/nfsserver/nfs_nfsdstate.c > head/sys/kern/kern_descrip.c > head/sys/kern/kern_shutdown.c > head/sys/modules/drm2/drm2/Makefile > head/tools/build/Makefile > head/tools/tools/locale/etc/unicode.conf > head/usr.bin/getconf/confstr.gperf > head/usr.bin/getconf/getconf.c > head/usr.bin/getconf/limits.gperf > head/usr.bin/getconf/pathconf.gperf > head/usr.bin/getconf/progenv.gperf > head/usr.bin/getconf/sysconf.gperf > head/usr.sbin/nscd/nscd.c > head/usr.sbin/nscd/nscdcli.c I noticed that this revision and the next one are a point of = issue when running =E2=80=9Csvn merge --reintegrate ". Was "svn merge -c = -=E2=80=9C used? Thanks, -Ngie --Apple-Mail=_657136FC-AF6C-49AF-8BA4-CAD685E0C908 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYmtxFAAoJEPWDqSZpMIYV+14QAM/YM4XkDD5Nkh2Ch5tBGJ4W /xWa9rc9RzgWxji9axHpQJld4C0tjCuRGGm+EQXbAyb30Oo8jcEd9sBhym0RPOla qXrK50ydDXSl5V3CZ7CyD7T6bAsp5ItrV4+1dgxZh9LiJObjmIcXW1izlNmxCLBc sVcsD12OzbvpyN5Hp1Xoibjhl/cJrcCj1+Om0iZvo0e/SO41GCS8X1lIMc2xSEMD 9FodAzGeJrNof1KCOTEmYBLrAdFC+liySHlt8XI6GRpapGy6hG9FBlf8ul4EowSR To/Sg2no7/EC2noPS+PE8mUoEaCgAbbG/qNowfvCim+3Vyu97G80HXYSSVPIvXif eZAOVFFV/yy7IZg4OI0P79EMGZ5S0KL0eKUIF8r0anu7eIr/+lRQ8ubyPHd940ZW UQwLG/ygYoaBPWz8fdPK9VM7kfgHWg+MKJdzpAEbQY1Pg+Gd4JgpjxnCDCGGy6bL Qwuh5u6p/HGszd1bkB0819uPzkPIExPwNHuiYijhsFiqPDsTiSgqAFLSygUSPTe8 y7KCQVl8BZXalQgi00rATk8tj2+xiFReFnhnGI7+iAetaLMHEBGufskLRCBAZboQ A/x2t+phKH6ugEXicbdtpBT7LbE8Yvaolrgz96K7y+gal6EwH9KRw9a7uBLTfAJL sAs7IsTHyYygm/fn+igX =g8YI -----END PGP SIGNATURE----- --Apple-Mail=_657136FC-AF6C-49AF-8BA4-CAD685E0C908-- From owner-svn-src-head@freebsd.org Wed Feb 8 09:19: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 70976CD548F; Wed, 8 Feb 2017 09:19:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 405C21A36; Wed, 8 Feb 2017 09:19:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v189JnWm072295; Wed, 8 Feb 2017 09:19:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v189Jnkd072294; Wed, 8 Feb 2017 09:19:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702080919.v189Jnkd072294@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 8 Feb 2017 09:19:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313436 - head/lib/libutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Wed, 08 Feb 2017 09:19:50 -0000 Author: ngie Date: Wed Feb 8 09:19:49 2017 New Revision: 313436 URL: https://svnweb.freebsd.org/changeset/base/313436 Log: Clarify #includes for hexdump(3) vs sbuf_hexdump(9) hexdump(3) only requires libutil.h, whereas sbuf_hexdump(9) requires sys/types.h (for ssize_t) and sys/sbuf.h MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libutil/hexdump.3 Modified: head/lib/libutil/hexdump.3 ============================================================================== --- head/lib/libutil/hexdump.3 Wed Feb 8 09:03:31 2017 (r313435) +++ head/lib/libutil/hexdump.3 Wed Feb 8 09:19:49 2017 (r313436) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 8, 2014 +.Dd February 8, 2017 .Dt HEXDUMP 3 .Os .Sh NAME @@ -36,9 +36,10 @@ .Nd "dump a block of bytes to standard out in hexadecimal form" .Sh SYNOPSIS .In libutil.h -.In sys/sbuf.h .Ft void .Fn hexdump "void *ptr" "int length" "const char *hdr" "int flags" +.In sys/types.h +.In sys/sbuf.h .Ft void .Fo sbuf_hexdump .Fa "struct sbuf *sb" From owner-svn-src-head@freebsd.org Wed Feb 8 09:22: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 4A1B4CD56FD; Wed, 8 Feb 2017 09:22:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 174721E7A; Wed, 8 Feb 2017 09:22:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v189Malq075952; Wed, 8 Feb 2017 09:22:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v189MaUf075951; Wed, 8 Feb 2017 09:22:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702080922.v189MaUf075951@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 8 Feb 2017 09:22:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313437 - head/lib/libutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Wed, 08 Feb 2017 09:22:37 -0000 Author: ngie Date: Wed Feb 8 09:22:35 2017 New Revision: 313437 URL: https://svnweb.freebsd.org/changeset/base/313437 Log: Create link from hexdump(3) to sbuf_hexdump(9) as the manpage describes sbuf_hexdump(9)'s behavior MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libutil/Makefile Modified: head/lib/libutil/Makefile ============================================================================== --- head/lib/libutil/Makefile Wed Feb 8 09:19:49 2017 (r313436) +++ head/lib/libutil/Makefile Wed Feb 8 09:22:35 2017 (r313437) @@ -35,6 +35,7 @@ MAN+= expand_number.3 flopen.3 fparseln. property.3 pty.3 quotafile.3 realhostname.3 realhostname_sa.3 \ _secure_path.3 trimdomain.3 uucplock.3 pw_util.3 MAN+= login.conf.5 +MLINKS+=hexdump.3 sbuf_hexdump.9 MLINKS+= kld.3 kld_isloaded.3 kld.3 kld_load.3 MLINKS+=login_auth.3 auth_cat.3 login_auth.3 auth_checknologin.3 MLINKS+=login_cap.3 login_close.3 login_cap.3 login_getcapbool.3 \ From owner-svn-src-head@freebsd.org Wed Feb 8 09:24: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 DDAE5CD579D; Wed, 8 Feb 2017 09:24:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 951BC1FE1; Wed, 8 Feb 2017 09:24:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v189OPDx076064; Wed, 8 Feb 2017 09:24:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v189OP8K076063; Wed, 8 Feb 2017 09:24:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702080924.v189OP8K076063@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 8 Feb 2017 09:24:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313438 - head/lib/libutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Wed, 08 Feb 2017 09:24:27 -0000 Author: ngie Date: Wed Feb 8 09:24:25 2017 New Revision: 313438 URL: https://svnweb.freebsd.org/changeset/base/313438 Log: Clean up trailing and leading whitespace for variables to make it consistent with the rest of the file and style.Makefile(9) a bit more MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libutil/Makefile Modified: head/lib/libutil/Makefile ============================================================================== --- head/lib/libutil/Makefile Wed Feb 8 09:22:35 2017 (r313437) +++ head/lib/libutil/Makefile Wed Feb 8 09:24:25 2017 (r313438) @@ -36,7 +36,7 @@ MAN+= expand_number.3 flopen.3 fparseln. _secure_path.3 trimdomain.3 uucplock.3 pw_util.3 MAN+= login.conf.5 MLINKS+=hexdump.3 sbuf_hexdump.9 -MLINKS+= kld.3 kld_isloaded.3 kld.3 kld_load.3 +MLINKS+=kld.3 kld_isloaded.3 kld.3 kld_load.3 MLINKS+=login_auth.3 auth_cat.3 login_auth.3 auth_checknologin.3 MLINKS+=login_cap.3 login_close.3 login_cap.3 login_getcapbool.3 \ login_cap.3 login_getcaplist.3 login_cap.3 login_getcapnum.3 \ @@ -58,9 +58,9 @@ MLINKS+=pidfile.3 pidfile_close.3 \ pidfile.3 pidfile_open.3 \ pidfile.3 pidfile_remove.3 \ pidfile.3 pidfile_write.3 -MLINKS+= property.3 property_find.3 property.3 properties_free.3 -MLINKS+= property.3 properties_read.3 -MLINKS+= pty.3 forkpty.3 pty.3 openpty.3 +MLINKS+=property.3 property_find.3 property.3 properties_free.3 +MLINKS+=property.3 properties_read.3 +MLINKS+=pty.3 forkpty.3 pty.3 openpty.3 MLINKS+=quotafile.3 quota_close.3 \ quotafile.3 quota_fsname.3 \ quotafile.3 quota_open.3 \ @@ -70,7 +70,7 @@ MLINKS+=quotafile.3 quota_close.3 \ quotafile.3 quota_write_limits.3 \ quotafile.3 quota_write_usage.3 MLINKS+=uucplock.3 uu_lock.3 uucplock.3 uu_lock_txfr.3 \ - uucplock.3 uu_lockerr.3 uucplock.3 uu_unlock.3 + uucplock.3 uu_lockerr.3 uucplock.3 uu_unlock.3 MLINKS+=pw_util.3 pw_copy.3 \ pw_util.3 pw_dup.3 \ pw_util.3 pw_edit.3 \ From owner-svn-src-head@freebsd.org Wed Feb 8 09:28: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 E5D66CD5889; Wed, 8 Feb 2017 09:28:13 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4EED229B; Wed, 8 Feb 2017 09:28:13 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (ppp121-45-246-6.lns20.per4.internode.on.net [121.45.246.6]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id v189S7i0012630 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 8 Feb 2017 01:28:11 -0800 (PST) (envelope-from julian@freebsd.org) Subject: Re: svn commit: r313350 - head/sys/kern To: Edward Tomasz Napierala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201702062036.v16Kaxbc061348@repo.freebsd.org> From: Julian Elischer Message-ID: Date: Wed, 8 Feb 2017 17:28:02 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <201702062036.v16Kaxbc061348@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-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: Wed, 08 Feb 2017 09:28:14 -0000 On 7/2/17 4:36 am, Edward Tomasz Napierala wrote: > Author: trasz > Date: Mon Feb 6 20:36:59 2017 > New Revision: 313350 > URL: https://svnweb.freebsd.org/changeset/base/313350 > > Log: > In r290196 the root mount hold mechanism was changed to make it not wait > for mount hold release if the root device already exists. So, unless your > rootdev is not on USB - ie in the usual case - the root mount won't wait > for USB. However, the old behaviour was sometimes used as "wait until USB > is fully enumerated", and r290196 broke that. > > This commit adds vfs.root_mount_always_wait tunable, to force the kernel > to always wait for root mount holds, even if the root is already there. can we not add some more specific way to wait for enumeration? like a sysctl that counts number of enumerations completed? > > Reviewed by: kib > MFC after: 2 weeks > Relnotes: yes > Sponsored by: DARPA, AFRL > Differential Revision: https://reviews.freebsd.org/D9387 > > Modified: > head/sys/kern/vfs_mountroot.c > > Modified: head/sys/kern/vfs_mountroot.c > ============================================================================== > --- head/sys/kern/vfs_mountroot.c Mon Feb 6 18:44:15 2017 (r313349) > +++ head/sys/kern/vfs_mountroot.c Mon Feb 6 20:36:59 2017 (r313350) > @@ -132,6 +132,11 @@ static int root_mount_complete; > static int root_mount_timeout = 3; > TUNABLE_INT("vfs.mountroot.timeout", &root_mount_timeout); > > +static int root_mount_always_wait = 0; > +SYSCTL_INT(_vfs, OID_AUTO, root_mount_always_wait, CTLFLAG_RDTUN, > + &root_mount_always_wait, 0, > + "Wait for root mount holds even if the root device already exists"); > + > SYSCTL_PROC(_vfs, OID_AUTO, root_mount_hold, > CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, > NULL, 0, sysctl_vfs_root_mount_hold, "A", > @@ -961,10 +966,11 @@ vfs_mountroot_wait_if_neccessary(const c > > /* > * In case of ZFS and NFS we don't have a way to wait for > - * specific device. > + * specific device. Also do the wait if the user forced that > + * behaviour by setting vfs.root_mount_always_wait=1. > */ > if (strcmp(fs, "zfs") == 0 || strstr(fs, "nfs") != NULL || > - dev[0] == '\0') { > + dev[0] == '\0' || root_mount_always_wait != 0) { > vfs_mountroot_wait(); > return (0); > } > > From owner-svn-src-head@freebsd.org Wed Feb 8 09:38: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 C97CBCD5A6F; Wed, 8 Feb 2017 09:38:57 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-qk0-x234.google.com (mail-qk0-x234.google.com [IPv6:2607:f8b0:400d:c09::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 78B4F9C0; Wed, 8 Feb 2017 09:38:57 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: by mail-qk0-x234.google.com with SMTP id u25so115803185qki.2; Wed, 08 Feb 2017 01:38:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=x1OhgdLxPjAkzwMpTu624ks8um0LZnB8OXfvVg3DjeY=; b=j3hVqd2rMD8jzBSpj+fmX+tbYAq+LAGBbqJsD5+EVnsDO7OlU/S+cecQvmAboyeGSe e8x4Mx+iiYSj0MJUj6BDsFcGFwIMmX1d1plbkMFqJP0UWWXLtHoS5FPwGzf0r43l1fEf WzwgD5nAuHSriqu3bjRkiYjV9TZoVbj28pVfaoA492FjAMgqVuJTLreVKGVM8NjQywFE v7RCIge3x7y73kV7M7/o+z7OBK1W5Ya1VIt0HleQvFzdWhnX0cgX5RVcYt2nWNhIj2Ku i6YTSmPr0N1EKXXxW6m6MDXtXYI7xjE2qrQ8WvWqqXabqrY/EgWxy2Mgq9hKrfR3EurG 5rIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=x1OhgdLxPjAkzwMpTu624ks8um0LZnB8OXfvVg3DjeY=; b=RniaHjYOhcCdeoJLqiZPhkHbXQBiM3//CE50TT4FGCNG6XPigJ3Ah994rrbdxRrgCd a9mRrLUrOKiJC8oQRvLr5TecpW/G7hcj5Y359AjZe/RxGLaVLhKn8goZ974nUdOgMYZX xluLdHXYfrshmWQa+fwO3ef8/lFMWewV1LJfcwTQm5TqmjUHQQM1dbrfsFVXOb0OYs4j LX+F2bFeZAZz50I9dIdnbEa3KxY7AHuvpTBvkG7QqidJolxQuIKEijS9vJSYz0mRCACa qz8uo3cW8dN15eB7RXfNfDxeJPNPfLOYmslyLIZxEta34dL/DaGYg41sk1GoMhamb75d M1JQ== X-Gm-Message-State: AMke39kWbRyGZkS+4m6kn0MQ3lXM3Z1dxQ3maHQwQQ5Ia6vs6ET5b81dOx78CYyt5iCh8FFQVfQHR1V1eKka5g== X-Received: by 10.55.150.7 with SMTP id y7mr19269597qkd.232.1486546736648; Wed, 08 Feb 2017 01:38:56 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.150.188 with HTTP; Wed, 8 Feb 2017 01:38:56 -0800 (PST) In-Reply-To: <201702080922.v189MaUf075951@repo.freebsd.org> References: <201702080922.v189MaUf075951@repo.freebsd.org> From: Sergey Kandaurov Date: Wed, 8 Feb 2017 12:38:56 +0300 Message-ID: Subject: Re: svn commit: r313437 - head/lib/libutil To: Ngie Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-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: Wed, 08 Feb 2017 09:38:57 -0000 On 8 February 2017 at 12:22, Ngie Cooper wrote: > Author: ngie > Date: Wed Feb 8 09:22:35 2017 > New Revision: 313437 > URL: https://svnweb.freebsd.org/changeset/base/313437 > > Log: > Create link from hexdump(3) to sbuf_hexdump(9) as the manpage describes > sbuf_hexdump(9)'s behavior > > MFC after: 3 weeks > Sponsored by: Dell EMC Isilon > > Modified: > head/lib/libutil/Makefile > > Modified: head/lib/libutil/Makefile > ============================================================ > ================== > --- head/lib/libutil/Makefile Wed Feb 8 09:19:49 2017 (r313436) > +++ head/lib/libutil/Makefile Wed Feb 8 09:22:35 2017 (r313437) > @@ -35,6 +35,7 @@ MAN+= expand_number.3 flopen.3 fparseln. > property.3 pty.3 quotafile.3 realhostname.3 realhostname_sa.3 \ > _secure_path.3 trimdomain.3 uucplock.3 pw_util.3 > MAN+= login.conf.5 > +MLINKS+=hexdump.3 sbuf_hexdump.9 > This looks odd imho also that sbuf_hexdump(3) is part of libsbuf. Note also hexdump(3) taht's essential copy of hexdump(9). If go this duplicating route why not copy sbuf_hexdump description as well. I like more how that's done with sbuf(9) that's the only man page, ymmv. -- wbr, pluknet From owner-svn-src-head@freebsd.org Wed Feb 8 09:46: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 CE6B0CD5D7C; Wed, 8 Feb 2017 09:46:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72862E6F; Wed, 8 Feb 2017 09:46:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v189kFXh084497; Wed, 8 Feb 2017 09:46:15 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v189kFVT084495; Wed, 8 Feb 2017 09:46:15 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702080946.v189kFVT084495@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 8 Feb 2017 09:46:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313439 - in head: contrib/netbsd-tests/dev/audio contrib/netbsd-tests/dev/cgd contrib/netbsd-tests/dev/clock_subr contrib/netbsd-tests/dev/scsipi contrib/netbsd-tests/dev/sysmon contri... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Wed, 08 Feb 2017 09:46:16 -0000 Author: ngie Date: Wed Feb 8 09:46:15 2017 New Revision: 313439 URL: https://svnweb.freebsd.org/changeset/base/313439 Log: Merge content from ^/projects/netbsd-tests-upstream-01-2017 into ^/head The primary end-goal of this drop is ease future merges with NetBSD and collaborate further with the NetBSD project. The goal was (largely, not completely as some items are still oustanding in the NetBSD GNATS system) achieved by doing the following: - Pushing as many changes required to port contrib/netbsd-tests back to NetBSD as possible, then pull the upstream applied changes back in to FreeBSD. - Diff reduce with upstream where possible by: -- Improving libnetbsd header, etc compat glue. -- Using _SED variables to modify test scripts on the fly for items that could not be upstreamed to NetBSD. As a bonus for this work, this change also introduces testcases for uniq(1). Many thanks to Christos for working with me to get many of the changes back into the NetBSD project. In collaboration with: Christos Zoulas MFC after: 1 month Sponsored by: Dell EMC Isilon Added: head/contrib/netbsd-tests/dev/clock_subr/ - copied from r313435, projects/netbsd-tests-upstream-01-2017/contrib/netbsd-tests/dev/clock_subr/ head/contrib/netbsd-tests/fs/vfs/t_mtime_otrunc.c - copied unchanged from r313435, projects/netbsd-tests-upstream-01-2017/contrib/netbsd-tests/fs/vfs/t_mtime_otrunc.c head/contrib/netbsd-tests/fs/vfs/t_rwtoro.c - copied unchanged from r313435, projects/netbsd-tests-upstream-01-2017/contrib/netbsd-tests/fs/vfs/t_rwtoro.c head/contrib/netbsd-tests/kernel/arch/ - copied from r313435, projects/netbsd-tests-upstream-01-2017/contrib/netbsd-tests/kernel/arch/ head/contrib/netbsd-tests/lib/libc/gen/exect/ - copied from r313435, projects/netbsd-tests-upstream-01-2017/contrib/netbsd-tests/lib/libc/gen/exect/ head/contrib/netbsd-tests/lib/libc/hash/t_hmac.c - copied unchanged from r313435, projects/netbsd-tests-upstream-01-2017/contrib/netbsd-tests/lib/libc/hash/t_hmac.c head/contrib/netbsd-tests/lib/libpthread_dbg/ - copied from r313435, projects/netbsd-tests-upstream-01-2017/contrib/netbsd-tests/lib/libpthread_dbg/ head/contrib/netbsd-tests/lib/librefuse/ - copied from r313435, projects/netbsd-tests-upstream-01-2017/contrib/netbsd-tests/lib/librefuse/ head/contrib/netbsd-tests/net/carp/t_basic.sh - copied unchanged from r313435, projects/netbsd-tests-upstream-01-2017/contrib/netbsd-tests/net/carp/t_basic.sh head/contrib/netbsd-tests/net/if_tun/ - copied from r313435, projects/netbsd-tests-upstream-01-2017/contrib/netbsd-tests/net/if_tun/ head/contrib/netbsd-tests/net/if_vlan/ - copied from r313435, projects/netbsd-tests-upstream-01-2017/contrib/netbsd-tests/net/if_vlan/ head/contrib/netbsd-tests/sys/uvm/ - copied from r313435, projects/netbsd-tests-upstream-01-2017/contrib/netbsd-tests/sys/uvm/ head/contrib/netbsd-tests/usr.bin/mixerctl/ - copied from r313435, projects/netbsd-tests-upstream-01-2017/contrib/netbsd-tests/usr.bin/mixerctl/ head/contrib/netbsd-tests/usr.bin/uniq/ - copied from r313435, projects/netbsd-tests-upstream-01-2017/contrib/netbsd-tests/usr.bin/uniq/ head/usr.bin/uniq/tests/ - copied from r313435, projects/netbsd-tests-upstream-01-2017/usr.bin/uniq/tests/ Deleted: head/contrib/netbsd-tests/net/carp/t_basic.c Modified: head/contrib/netbsd-tests/dev/audio/t_pad_output.bz2.uue head/contrib/netbsd-tests/dev/cgd/t_cgd_3des.c head/contrib/netbsd-tests/dev/cgd/t_cgd_aes.c head/contrib/netbsd-tests/dev/cgd/t_cgd_blowfish.c head/contrib/netbsd-tests/dev/scsipi/t_cd.c head/contrib/netbsd-tests/dev/sysmon/t_swwdog.c head/contrib/netbsd-tests/fs/common/h_fsmacros.h head/contrib/netbsd-tests/fs/ffs/h_quota2_tests.c head/contrib/netbsd-tests/fs/ffs/t_fifos.c head/contrib/netbsd-tests/fs/ffs/t_mount.c head/contrib/netbsd-tests/fs/ffs/t_quota2_1.c head/contrib/netbsd-tests/fs/ffs/t_quota2_remount.c head/contrib/netbsd-tests/fs/ffs/t_snapshot.c head/contrib/netbsd-tests/fs/ffs/t_snapshot_log.c head/contrib/netbsd-tests/fs/ffs/t_snapshot_v2.c head/contrib/netbsd-tests/fs/hfs/t_pathconvert.c head/contrib/netbsd-tests/fs/kernfs/t_basic.c head/contrib/netbsd-tests/fs/lfs/t_pr.c head/contrib/netbsd-tests/fs/msdosfs/t_snapshot.c head/contrib/netbsd-tests/fs/nfs/t_mountd.c head/contrib/netbsd-tests/fs/nullfs/t_basic.c head/contrib/netbsd-tests/fs/ptyfs/t_nullpts.c head/contrib/netbsd-tests/fs/ptyfs/t_ptyfs.c head/contrib/netbsd-tests/fs/puffs/t_basic.c head/contrib/netbsd-tests/fs/puffs/t_fuzz.c head/contrib/netbsd-tests/fs/puffs/t_io.c head/contrib/netbsd-tests/fs/tmpfs/t_mknod.sh head/contrib/netbsd-tests/fs/tmpfs/t_readdir.sh head/contrib/netbsd-tests/fs/tmpfs/t_renamerace.c head/contrib/netbsd-tests/fs/umapfs/t_basic.c head/contrib/netbsd-tests/fs/union/t_pr.c head/contrib/netbsd-tests/fs/vfs/t_full.c head/contrib/netbsd-tests/fs/vfs/t_io.c head/contrib/netbsd-tests/fs/vfs/t_renamerace.c head/contrib/netbsd-tests/fs/vfs/t_ro.c head/contrib/netbsd-tests/fs/vfs/t_union.c head/contrib/netbsd-tests/fs/vfs/t_unpriv.c head/contrib/netbsd-tests/fs/vfs/t_vfsops.c head/contrib/netbsd-tests/fs/vfs/t_vnops.c head/contrib/netbsd-tests/include/sys/t_socket.c head/contrib/netbsd-tests/kernel/kqueue/read/t_fifo.c head/contrib/netbsd-tests/kernel/kqueue/read/t_file.c head/contrib/netbsd-tests/kernel/kqueue/read/t_file2.c head/contrib/netbsd-tests/kernel/kqueue/read/t_pipe.c head/contrib/netbsd-tests/kernel/kqueue/read/t_ttypty.c head/contrib/netbsd-tests/kernel/kqueue/t_ioctl.c head/contrib/netbsd-tests/kernel/kqueue/t_proc1.c head/contrib/netbsd-tests/kernel/kqueue/t_proc2.c head/contrib/netbsd-tests/kernel/kqueue/t_proc3.c head/contrib/netbsd-tests/kernel/kqueue/t_sig.c head/contrib/netbsd-tests/kernel/kqueue/t_vnode.c head/contrib/netbsd-tests/kernel/kqueue/write/t_fifo.c head/contrib/netbsd-tests/kernel/kqueue/write/t_pipe.c head/contrib/netbsd-tests/kernel/kqueue/write/t_ttypty.c head/contrib/netbsd-tests/kernel/t_extent.c head/contrib/netbsd-tests/kernel/t_filedesc.c head/contrib/netbsd-tests/kernel/t_lock.c head/contrib/netbsd-tests/kernel/t_mqueue.c head/contrib/netbsd-tests/kernel/t_ptrace.c head/contrib/netbsd-tests/kernel/t_ptrace_wait.c head/contrib/netbsd-tests/kernel/t_pty.c head/contrib/netbsd-tests/kernel/t_rnd.c head/contrib/netbsd-tests/lib/libc/c063/t_mkfifoat.c head/contrib/netbsd-tests/lib/libc/db/t_db.sh head/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_spawnattr.c head/contrib/netbsd-tests/lib/libc/gen/t_glob.c head/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c head/contrib/netbsd-tests/lib/libc/gen/t_sleep.c head/contrib/netbsd-tests/lib/libc/hash/h_hash.c head/contrib/netbsd-tests/lib/libc/hash/t_sha2.c head/contrib/netbsd-tests/lib/libc/locale/t_io.c head/contrib/netbsd-tests/lib/libc/locale/t_mbtowc.c head/contrib/netbsd-tests/lib/libc/regex/debug.c head/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c head/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c head/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c head/contrib/netbsd-tests/lib/libc/setjmp/t_setjmp.c head/contrib/netbsd-tests/lib/libc/setjmp/t_threadjmp.c head/contrib/netbsd-tests/lib/libc/ssp/h_memset.c head/contrib/netbsd-tests/lib/libc/ssp/h_read.c head/contrib/netbsd-tests/lib/libc/stdlib/h_getopt.c head/contrib/netbsd-tests/lib/libc/stdlib/h_getopt_long.c head/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c head/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c head/contrib/netbsd-tests/lib/libc/string/t_strlen.c head/contrib/netbsd-tests/lib/libc/sys/t_clock_gettime.c head/contrib/netbsd-tests/lib/libc/sys/t_connect.c head/contrib/netbsd-tests/lib/libc/sys/t_dup.c head/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c head/contrib/netbsd-tests/lib/libc/sys/t_getrusage.c head/contrib/netbsd-tests/lib/libc/sys/t_kevent.c head/contrib/netbsd-tests/lib/libc/sys/t_link.c head/contrib/netbsd-tests/lib/libc/sys/t_listen.c head/contrib/netbsd-tests/lib/libc/sys/t_mincore.c head/contrib/netbsd-tests/lib/libc/sys/t_mlock.c head/contrib/netbsd-tests/lib/libc/sys/t_mmap.c head/contrib/netbsd-tests/lib/libc/sys/t_msgctl.c head/contrib/netbsd-tests/lib/libc/sys/t_msgrcv.c head/contrib/netbsd-tests/lib/libc/sys/t_msgsnd.c head/contrib/netbsd-tests/lib/libc/sys/t_msync.c head/contrib/netbsd-tests/lib/libc/sys/t_nanosleep.c head/contrib/netbsd-tests/lib/libc/sys/t_pipe.c head/contrib/netbsd-tests/lib/libc/sys/t_pipe2.c head/contrib/netbsd-tests/lib/libc/sys/t_posix_fadvise.c head/contrib/netbsd-tests/lib/libc/sys/t_revoke.c head/contrib/netbsd-tests/lib/libc/sys/t_select.c head/contrib/netbsd-tests/lib/libc/sys/t_setrlimit.c head/contrib/netbsd-tests/lib/libc/sys/t_sigaction.c head/contrib/netbsd-tests/lib/libc/sys/t_sigqueue.c head/contrib/netbsd-tests/lib/libc/sys/t_socketpair.c head/contrib/netbsd-tests/lib/libc/sys/t_stat.c head/contrib/netbsd-tests/lib/libc/sys/t_timer_create.c head/contrib/netbsd-tests/lib/libc/sys/t_truncate.c head/contrib/netbsd-tests/lib/libc/sys/t_umask.c head/contrib/netbsd-tests/lib/libc/sys/t_unlink.c head/contrib/netbsd-tests/lib/libc/sys/t_wait.c head/contrib/netbsd-tests/lib/libc/sys/t_wait_noproc.c head/contrib/netbsd-tests/lib/libc/sys/t_write.c head/contrib/netbsd-tests/lib/libm/t_ilogb.c head/contrib/netbsd-tests/lib/libm/t_pow.c head/contrib/netbsd-tests/lib/libm/t_precision.c head/contrib/netbsd-tests/lib/libm/t_scalbn.c head/contrib/netbsd-tests/lib/libposix/t_rename.c head/contrib/netbsd-tests/lib/libpthread/h_common.h head/contrib/netbsd-tests/lib/libpthread/t_condwait.c head/contrib/netbsd-tests/lib/libpthread/t_detach.c head/contrib/netbsd-tests/lib/libpthread/t_fork.c head/contrib/netbsd-tests/lib/libpthread/t_fpu.c head/contrib/netbsd-tests/lib/libpthread/t_join.c head/contrib/netbsd-tests/lib/libpthread/t_mutex.c head/contrib/netbsd-tests/lib/libpthread/t_once.c head/contrib/netbsd-tests/lib/libpthread/t_sem.c head/contrib/netbsd-tests/lib/libpthread/t_swapcontext.c head/contrib/netbsd-tests/lib/librt/t_sem.c head/contrib/netbsd-tests/lib/librumpclient/t_fd.c head/contrib/netbsd-tests/lib/semaphore/sem.c head/contrib/netbsd-tests/libexec/ld.elf_so/t_dlerror-cleared.c head/contrib/netbsd-tests/libexec/ld.elf_so/t_dlerror-false.c head/contrib/netbsd-tests/libexec/ld.elf_so/t_dlinfo.c head/contrib/netbsd-tests/libexec/ld.elf_so/t_ifunc.c head/contrib/netbsd-tests/modules/t_builtin.c head/contrib/netbsd-tests/net/bpf/t_bpf.c head/contrib/netbsd-tests/net/bpf/t_mbuf.c head/contrib/netbsd-tests/net/bpfilter/t_bpfilter.c head/contrib/netbsd-tests/net/bpfjit/t_bpfjit.c head/contrib/netbsd-tests/net/bpfjit/t_cop.c head/contrib/netbsd-tests/net/bpfjit/t_extmem.c head/contrib/netbsd-tests/net/bpfjit/t_mbuf.c head/contrib/netbsd-tests/net/config/netconfig.c head/contrib/netbsd-tests/net/icmp/t_forward.c head/contrib/netbsd-tests/net/icmp/t_ping.c head/contrib/netbsd-tests/net/if/t_ifconfig.sh head/contrib/netbsd-tests/net/if_loop/t_pr.c head/contrib/netbsd-tests/net/ndp/t_ra.sh head/contrib/netbsd-tests/net/net/t_raw.c head/contrib/netbsd-tests/rump/modautoload/t_modautoload.c head/contrib/netbsd-tests/rump/rumpkern/t_kern.c head/contrib/netbsd-tests/rump/rumpkern/t_lwproc.c head/contrib/netbsd-tests/rump/rumpkern/t_modcmd.c head/contrib/netbsd-tests/rump/rumpkern/t_modlinkset.c head/contrib/netbsd-tests/rump/rumpkern/t_signals.c head/contrib/netbsd-tests/rump/rumpkern/t_threads.c head/contrib/netbsd-tests/rump/rumpkern/t_tsleep.c head/contrib/netbsd-tests/rump/rumpkern/t_vm.c head/contrib/netbsd-tests/rump/rumpvfs/t_basic.c head/contrib/netbsd-tests/rump/rumpvfs/t_etfs.c head/contrib/netbsd-tests/rump/rumpvfs/t_p2kifs.c head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh head/contrib/netbsd-tests/usr.sbin/mtree/t_mtree.sh head/etc/mtree/BSD.tests.dist head/lib/libc/tests/hash/Makefile head/lib/libc/tests/regex/Makefile head/tests/sys/fs/tmpfs/Makefile head/usr.bin/uniq/Makefile Directory Properties: head/ (props changed) head/contrib/netbsd-tests/ (props changed) Modified: head/contrib/netbsd-tests/dev/audio/t_pad_output.bz2.uue ============================================================================== --- head/contrib/netbsd-tests/dev/audio/t_pad_output.bz2.uue Wed Feb 8 09:24:25 2017 (r313438) +++ head/contrib/netbsd-tests/dev/audio/t_pad_output.bz2.uue Wed Feb 8 09:46:15 2017 (r313439) @@ -1,1040 +1,1035 @@ begin 644 t_pad_output.bz2 -M0EIH.3%!629360S39&D`>;SS,K;%2@`2::%N=I -MVR86:*KOO>O99MMM-XP&76N]W/6T=[SW@<[G'3H:Z'K1F?=WON]WO>]S=WN^ -ML]W>^WN[[W;V\VW>[OMN^WW;;3+3/=TK*Y5E4LVE#-E5H:"S530#1IB5LS:V -MJHK6!JVA2M9LR*V:MFUJ55JBM:Q4*EL,5$`50)L6M11:P55:V%+55:U5C!I3 -M1L,BU5-5JV-%F55-5EL;:@5:K+%5:S--;5-;:M5MJVZZ[:V]>[:7NTN>][;> -M[O/MO-M[NYOM]WN^[K69ON\^][WO(Q/N8ZZ![N''=O3VP[V/>RCRX[0VJ7FW -M-FQJ%7-G0R;9MB*N\G'>PTM*5H%``-LF2NKF=-LQFU*50444`446P`&FV06V -MUE17-HDJB[#--!MBC$-1L#;!MF@JALFIM-IE3-30"JH#2D`$`!,F$R83(830 -M--,AD!H&AH`R#$9`:&AHR`Q-`,":8)D8C`3)@FF":8@P"9,$,"&)D#0)@$&D -MD$TPF@`)@```````-`"8`)@"8F$R8`F3$`)@`:&F@),R83":8$Q---,"8"8( -M,:1D#!,H--)2:$$VF##`"#329,1A-!,Q$:F)A-#$-3TT4>F4]">IZ0&U#3:@ -MVC4#`-(/4#3T@#30&@/1/1#0#1D``#$-!HR:-!)I2E$H&3TVPVH\BE/QIHC1 -M3,34T4]IE-I0WD4?IJ33T0`R:&T0`9!IM0&CRC(`!HT&AZ@`&@`````````` -M``TI$#1IHIFU,F`T:F*>"G@$F:3TP"-3T9&"&FT*/3"3R,33)I/":&C(T&(T -M4\T-`GIDR-,$T:GIJ>1B831II/(&D\C4S(::8F)HU-02:E)*!#5/%/>V,B-H -MB&"-#(TF(Q38BFVE3_48AM!-(]4_*GJ:>4>-4V*'IIE/RFIY-3RFU#$S4WJA -MH](](]&H::/1/4:>IZFF:0/2!DVIZAH-J9`>4!H:?.1!_\Q4%G*&;V=R9PT='B<1$&>Y2K7;'1?;`L!0$`X6":FH$!$6!]N]*1& -M`>)4`P7%5$G@V]E5TZFK&($]>M7]W^OSGV?[[OM^+/=V,U7MZH"`7P^J9Y.4XK0O)T]ML=,$]>C2&`+KJIP7B%-.A(A^%=L6PJT7:EU�$"\C_*-.JQ+2^W+*<`+ -M[7C&UXHH9B@ULW[I"-T:`@7%]:`B#,.N],:_+:SN\[:H0"]MG;I((-):D9I@ -MEY+M.9\`=/Z'Y5'G)UUBI`$7\=-,6\WB0M^K1(IGM("()_S^&EB%H$,(T:^: -MUJXAFG+?)LZ=2(B>DJ4`+\#0+:GW.!F9[Y0"67\4D'5N=?C<2IH"`B?%D\H0 -MGG&E/!&")G6)];))G]L??MF>!#;?]*:P<1'/-^\77VA0`%Z]R -ME-$,ZC*8W\V[=O*,`"`LNLU]SC!;I4"KG=/S#X!?7Y]N/BU*2;"=,Y6JXJ7( -M\0$Q,LORY367(RS2IZ5>L>\@(%\(7%0'&&F:-KRF&'2:+-/TMFDH`&<+FRQ] -M2/+>LL58^19Q"!7L,11[)RREOK.2B(B\T[XU`#;W%RR(G[K(5$X17%G>A! -M5%N-\(U<88J#4CQIX2R!95&T"Z:FJFOLXD$6)JV@!^C#B[K7^`23@`L&RH8#R4AD93YM`Q3];.J--PN6QM[K)JH -M(O;C-[U@O)%QFS:U:_'AEV+O+ML-FTP(.3(!E'S>H'.(0@#>MJ$"'FJI*?4K -MJ(^8_>2M:QGP"F_OWH5:].!EVM>UB'TW=R@(I#\VT2P%KT]_6]DV]DSX*:$B -M$\P$5TX-N@FLFP9/6Z#&OW(]F)2R!;.(FW!F6.80[RE%T=?O6H/*`%S(]JQ[ -MR7,>5IA_&NS_C[WLV",$5K/Y3CA9I<=R)5=2;=$"#3;X4$!A3SS<4MFG&3LO -M(C(AK8$A:MCVU5]2F6(!3!"(X/?9Y:@`ZT))M.B\B78]MY1`BX"?4#9]!56Z -M)(%K(4E%,HP1?M]'(C@/O^H")>Y@&LC0T?.?#9A!9W#]194/2$B@/0R$+"9F]7%, -M*1BYC&C`#LQ@*O)X;[/:@Q((+?>_Z#+K*>EX6<1R+?T&:\=DJ!\#0UPA_,^E -MKZ<2Y.D"5H,L:04L5`\;Q^3FH0!$N<-%2!`?/ZS>I:''+V&_V'MP$I)`W;W0 -M<("[Y"-384_['P.#[FK55I#5ZVMM[DH!4-F!?_"G;WQ+<>IO:.A1D`8W/]@0M8>%BW/(+<-&H2+N=9T(HE -M8\PHC>;Y(&31@"8(L>$>5^/YP&:Y@'%$18BM3_NBBG3?7>!ZKL^1-#L?/ -MI`&OUVRZ_+Y/!HD`*"]TF31QJ9YV"1#B\R/?U",@5[-@I;.4&_W%90)LS8U+ -M`,#YI0(2X6ML1-K;[$WRF]A\#Y!IMEPB$/?B%:LF@SS8@#$1(96`NH:/6&-` -M!:=-[T<("%]0_N*VT8X/5G4]+'5W>2@57]UECJP$[[:29VK4&^<0`O3I=VF? -MKR@)6"J[:JVG6:T`(X0_F^G'Y[@#IX#*^6`L@0>X[PUGR@1M8&GY?GK+(:KI -M_U,(@U>K55\YIW+R5A#A_I*4^UE*=FQJ$`;GLX^GP`%VFAMHQLA -MVW-FEG)_<:*\3(P705=2"A.U_T1]?;OU(#\LK5$7LA$\:N3_/7'@3_L2$4!K -MJ6$S1,[?R[77H`%;Q,<;P<]WB#C?6PY9\/V7UF*!4\2`M<&]Z=&$0`^[XVX` -MP>#"!:ZO,V=QZ_BB!8WP5-F0XF%^[*`J8WXH"<]L!5-)?B8P\`,YVUF%`M%7EW:-*$+>N64?@;# -M6+FLFTL@'_E2321+T;G=ZYGMTB0'"&+[8**(!6Z&96X#]H(:2NZ%,2"$GFN, -M1!^?3G/A^`L*^I@/+HZ6G:DLBAZ_E30+MJ_"3C6J2\[8"57T0*Q`"%5OI.Y. -M:BNS&C[E[K4@%]-&1?WDI(=$YDICRZ]&1/M.`*SX?V1W6>I79`5A)E)=C -MC=S#.CUY].X/Z]T\1.%B=8L[(9KD:Y=]^`D`AJ=I:%X(.1-A<7W`!S-]'$IU -M%-,2`BN_0O@K[OJ'6R\VPY5,3$:,BZ"HE]\AB;53X3@H[X^"Q3E2>4%#6-2: -M>^%"&#=/Z`@,;KO?/M\""U$)66_)4NJ?&F2ZTN,QPSL<'S\O.`#\I/;_'\T\ -M\-UI3`?SYZ:\L#\%AH`3:"O?XZN.EK961YEOS49"&]N%ZP3[JVOQ(P=(?G.6 -M@"M:W;)3<$\42B["?O/^=:1F#6]NZ$72@W50#Y79>"J>K0,*`@N)KT"+ -MZ#V_U(:?,N,'9\5&MI`$7^7$@&/KSB6TZC+HW]3$;[NL`N)UQ1FMLA(2OD\, -MU-4^]`5TS)K^W:"%9?8I@#2TGV8,J0KY?V?HZW)%R@*_M:XB%7\[7[?P:+XG -M]Q&X;\NX'>`&K2Z:_Q+0S=C1O(G$9#64P!8K][WE]U4>TJFLWGKV#V18-2@R -M8+PTOK0G!;/I"G/^B\0/-;"WIP@_PRA]#,0B6+V)K?EQ=JK2J^C(DC[`S_#X -MY"3TWE]1\OSVL0(N;%("2?M9ZI%FL[0`%"TQ] -MLWN_%Q7@Q^2]DUETH`>JNY1%N_++1LROZ>56$Q,7?.DD3?D:TBT$%+8?@O=, -MI("V5)HR`5A@RVJDL_?A(029R?[YENFJ2&8AT% -MAH6LF-70$`OWGS?-)?`A8JG!J?%BHFQ9=TR**BD@F:4QF(@.L`,57(WQ!&7* -MGC:=$3`_\4$,7F=+;N-@^ORPA65Q4U)$1_U9=>^G^O)/=\V,['3Z#NE@24'X -M=@U7X)-@E=Q@E'!@5_O2O$2"(_!93W=VB(#"F-EGAUAGK"PI/7HT9!#`D5[Y -M\+'#?L&`?+99C>0W1!!Z[=:J17*V6,CT(^FX5>=WB+G?#?J>A=T@<1CRU($& -M2/KW2SC-%H(8X0R]O``AJ6;Q6%^K*1B208.WI0!J4>@[T4Z6:D(9;.)+M_1- -MD"V&FA!;[J;:O3>;"4Q<%,4Y9Y.."\W*KZ:-!PZ3;$/=\"N4*'#KN#<9_N@B -MQ2=Z3G3EXJ/09W=Q:+STH`I>+,97UO,$WD!()PS]%F:D('H[F.JU@(>YN9OAUH:$_GW-1*(O^MOQS@06;P87 -M:-R?;K+]`04'98(@+A!K949?(_%S,4L9H$=7%`"GS.&9\=+H:;/X_;W^YMH< -M"`NS4-HBV;9?TX0@D-MV//U([Z4A$+WJ^K::^5S2ZJW[N0=5QIYEJ -M=&Z\W[TBD`7-[6J=-74GF61-$`:NXFO.%)=[[['PD6!H:;V/CZ?H.Q@V*Y3) -M(*(U*S_(`/X`@=4A8N1X;%PR]WU'P@+J3H?%;:O%,!M`$NVB]R")87^3W$@Z@#S-W_E3`9X%)L4B] -M6_71C'P<+:@@B2Q8.33:?)*X7!K<\Y@""[>-"CM-^)"A0$'ZQ -MUML"Y6[R\SL]`>$W58Z2ZL/G<&BN`"S?9P>JEF>9LK)Z?`TF2@=J?D?SU%]\ -MW2C2*QY;KIS^#>[A@(M]1Q3>IZ28P$!0&!DN>1#QKZ+6SW.]/5S;\E4CTD_V -MU!):LAW$J=&UU6.(N$C -MLD@@W6RR($]+)$-=IJ=G_\M`\%7E[I+&X(JO-968S9V4N@0@/FM[:` -M_DOHOVK;9]H"`YSN@MDXZ5!^\;IM^0"ZT[=\^+)':SZM<12_B%("*PA+=^-6 -M4X_PN14]E.7-."Q^B5'&6TA[JYMVGDV@!"6IH/Z6JH@=S^?QJF3 -M!%)(6*9O6O[NA.NF%0*E0`7VVG[["W;V*1;OZ\T -MW:K[M91`=CW>?L7]P`2I.^9+5TYAQM`E(0%F$ZV>R`(-RC7H&]XXFP:UY%BC -M`)R"D*N0[730$"U_3>;"DF%<'PC3?1;![F/0$!`7,+9HVZ(Q&0*AY&)ULVCY -M+1$(Q-SG5-O"<=//)P//$5`7SK)KA'4P'#J4"OU;LGD;/`VB,,ES0$FE7$DK=#UHE`B"R(_/."6="48`%=C -MEUSNIQ$$'36Q-I&5Q98XY)(("#_'Q/I0`.M?]'YG8[&O\#T,WD(20@3N/DL_0J^9;`\([->'9A>G7GCX\9E -M0@!M=I66J/(],51@(@0?HS\478WX*Y0T*XJ_O=U@*6WFC3'B"(E.&1'DANP8 -MA"9[NDG#6V]/W#46R."#QGG`O/#C)\[4?2`5H^5G3W+1P5.,(-QBP&W;-.%? -M>-((FRE+9_]=P/6!9$?X[H"/MB#IS`3J?[;1Z39%A=G\K;XFA6OI;)8DN$C" -M7BML%@PI!R4,UBVE3B=_ZKF<0@AH@GWQH836)<,FH8K\Z1<`_]C"$EEWC%^! -M/Y>[K2`I79%TH]PM=ML)@!SW*@GM%S$@J3N28M)R-`A+=E0XY^IL#V`"]FQ+ -M^_4^]%/H2!_ZO.Z:1OO/.8$>DXQ6NJ6@RJ$@&7W`;:(MKWWPFQW;(@(#-U?F -M5&F]RJ`A#+VFVB@-@,'YAF.IL?V!1W3A`*O%]39V9A:^=$086@"=9YY/=SI% -MP.43I]O%5,)TL*VCMQ>K<+1@HN)6`Y+R!4_X_[?Z1FD()>SVM"YCWW&/D(N1E:+:6?SS"^T^ -M>=9VH1@3/V1P?4WZR_1P%2B?BLO6(!4HEY]22&L[0O;91=\SO%,3IA"MH[!B -M%CFMX;((MF&F@-:$#^/NR4^?H#P+/T?`(?"H1O\3JUR+0$3,YUPX/"V!XHN$ -M4I81(I##TI)/`O^DT'P/ALO4[G$M3G3UU0\M=O((04/Q>A^QPA4[V'_/X-$'J#` -MO++H<>8QCBZ$W -M)UR&A$!99;W<4^-+"5>D]I#=H>!H8G2&P7(Q_(!?:3VM_H>=M^AN) -M]$08[0JX/,N;+V:J5'I6(6V.$(:0ZX_O4^QL.>\MF$P#[-^RDL0I]Q%IA\Z7&&FQAHOC`D/9^WQY/_D&5RP';_%[KSXRXR"- -MF8_*GR>O=!,]"!HE3EGA09H#U/^0V%;4=#9/YAX%'X,O\!"!B0Q? -M0.$N*`P//0.Z40@-,IF["EION'/2:'+N!#DP74'%[`W6W$.LT!L1>2LAH-3&4=%D#P&9C[JB -M];D8SD-)BOV;`_Z^+M/#??G`.L6]X+VMQ,0,SZ)HV(7+922%)EYPV/>7YUQJ -M!F5L#3[/:P0.`4%JR2QH)>8$]JHLV*0:[,(?IQ8<-C8[FQCJ78RA5_6X:=%? -ML;9!'+Z7+@8YD,W0.Z!V<.E@:$%BG_<]G3G5ZM]/H,].8:E4@PJ!J(D)H".9OD;4' -M"EQJXO^TH/ZS1L+=5L$%Z]`8O]7IOZY=8C-N1>,Q1=^BFR@T+P:'@C3,3:*. -M3`"L]U%/UP=A9X#@_-05U7IC2>XUP/.GC'>F"Y[4=*YQM^4F*N%V!PAFPKE1 -M6C!"G!@N@+W^R3SZV=E77GWPH-/N38#!++$4!=X:K+&1A2:W][17AS990I0; -M_Y#W\L@\:%VI#A:K9PY?,VY!>'`[-/7_S]GZET(W$\(#P:6IV9-1`H;VP=R? -M$`$G:%9(6N(ABM$"PMCR#P^[&TL]\"<,%S_QL -MQ(0B^P3W;T0R$$,%O,Q.5^I:K:OQNEMR8W^HR9"+KL.A[&]/%$`O)-.G_<7: -MIEO@!2J#72LI4S)[\@T]>'F\[H=F?&BM:7\O0^-ICQSRP&+Y9<=`EM^-,*'X -M?.R(5S.U$/)84-J#B5/5X#K<8L^0]0=L2#DD7]O],#(!9[U@83@F_Q:-[OF*D/&+-'5/=5`+VG)*RF0!&^C -M6JEQSUE0R*U.P`*S^=SAK8%RM=JW9#^Y\7`(?6_56S7G8;R>EHQ[,XHQCI_6 -M:2&_SJDYG\[4`..FZBLFED?N/A(KAL;1^9VFA:LF05>S^-5\:T/A\T.W2`9Z -MCR5SH84"^^CO0=:VV;P.D748UHW-!?N2_1E1I$^UWXVY#??7?O7MSNQE*Y-H -M`P:-/D3G!;1RA!ZK]T"0R3#7TR$X)IH7CXG#@3499,D8:^1/?H!S7?-HM(@Q -M5K9@4,%"4ZEMT/"_\0SAXXEGRN_`)&U1H,4XI9J%((D#1[,AX1TPPPPBAZA& -M!3:"V2`C$8#"*&6;GU'3+`_,_6_`]S@AW#.X23A3AL[JPI?;_?6!8+%_D?YJ -M"=RQ9,"'UT26,!(G^/'S\&#HPY'/H]/]YA#ZW![^Q`)_(&S?W>C!PZDI$S*_ -MUF+Y[5.P1GTK/PX0EJ?`18=(:`&YJA^N]`U#AQ"+T\#6/?[DT&&`FCR7_5SE -M3GT=O`34]-,T2!`[DP:*Y=PT_6.H1]9U[%)JHU=TQC$I`Y;L,@;.$8:7L$%I -MM"XSG]H0%WK:P_]@,2PP)2Z[_1E93+*BL864BUC^]U@OC2?, -M5HK_HTJ(^6Z-<^88P#OK\;*<(OS,[<;O2_HSYBTHY1P_+Q'R&J6YG@G!0OC: -M>\X;HTP3T>WODBO/KV&');,/W9PJI3G"N7[P80""\*]K-:J[PN8WX-`')Z0Q -M--X#0N7R,,".J0^Z!RMW)_]S`QNHH4L"$:\H;!ENOD+(_R]9VD9X/7%Q)JQ[ -MY9[BYU8,+$#4ST5"'!V*CZA;H/`[?D#]_FIH,]/BKM(!O7/T:`3.2LX]F,#- -M[&$7Y@#SAXL^MW08\-[)B=,(V35`ZHLV.H?2C%@DT.Q^0G;L;W8S,YX'S5FQ -M0]`-49S:KL`7G8CO5,>\PM[OA%:@E#8=HV(YA%,P&#W:#`)SIG$0JJYFRR/@ -M(+%6W79$,W]AO<]5W6UR([/ON4,7;95RLCA'%$_H<%;3OAEL?Y*9]>;#3](/ -M-R@-JH$4LK_`R'1W(2^VPAL`8/K@^'`+$>7=IVL\&G3>NVAYP3\X<%:[TM`< -M+"9Y@CBSG?P=]85NZ'DQNQPA!/)PX)?/^[,<+7DFE6(ATIMM]^U008;L8X"W -M[8QF_,%\FX'5WG$,N8?F+;B7G56R`2>UAA`.;N#K#>-B/V":GQTZEP/"@+2& -MM-+T9%?KWB3'YE+;FW'U5"7A(PKWH;VK.F%=ZR -MS(3]Q`&IWIBP]V+H4P=LP3L=6"K5"Q!G2@<(:94)[VKP&H^:!QE?V@6C?E), -MA4_]'=&O[1+0WBN:K)FZG#59EBBC)ZRR15_BZIL0V4+V[VH?0'#+A<$__@*: -M1$AF]*;V'!.;(TG+1/DO!74UZ1,RB[-,9@O7`ZQMR^81(%,/IHK.9)N=HY+J -M37V]PXP0V*+*^_O=>@,TN;S0AFDU#U+)-BRD?9MJ[U>W/BZE9/])=8,]$&EZ -M-Z39$`8='K/B)J?HK#-E2]+<55)7Y&H@J2T:"NY[7`PCXUIG0`QX[;&;C@%; -M;&NIZ^J,7XHX7#2P-7?AB>�K5LYFY=Y -M?>J;Q;S[(`!>@[EW>7(]]!87MS_!V'$>`/2*"7SXXURC&\UN(&G0';=SP@7+ -MVNAG47FKWFQVT\M&VP^@";ZN!DB&`R26G&XEN>YYQSY0TZ!(-B`EO>HF'`86 -M,#9Z;[R_`0AA)_K.`#-#T?P?T.UTGTR5.Y9\QA/20\KYWM?DZ1I*,56:J`?J -M`<%`JBA\SG0%)YC\Y]/C';2K_N94D+)VP-.#6J[.J0D"*&/'$1Z#4\9?C"_#R^!U=*?2B4 -M$O5>N6J@)VM%-A"%>T7Z<[%`W1,_8CPJVZ!]I2H'MGX\859[G^:;[;.ZT@K2 -MXD/QA?6&O;P39*5)-]]-!88S!6L>*9IUY)MRD(OKWQ;C(LFW*,/)LR0&.IS0 -M*BDINQ+[8/GQ$OIDDC.$:;IWCB5CYV4MA6Y_[PU[)W.K'OOG!J605KP./&_@ -M9>_3AG1%CUH("==L#X3WT%UMUM>O>8O<#OH@O#>DK+CV8J]I]Z++#\?\@"3# -M7&*,YQ)VG)<3AKJ..-128TQGSL\E]G]MT*S_L+849W@I1C>-;)FK,/*H7KR -M*W'9T`MJ,UV%J)E-X;(.TQAC=CV63Q[;`TQ;6EC-6^OAH?ZY8X^W%YHPXYOK -MJ(5*.U*W0]@^VE4!(N%D;#CC&>YZ^\K[=.QZ/N-%]TS/3O=.$KLF<=V7_@8D -MHVW1N<_W4^R#N&+6H:W2S0Q&@,=)Z,/G9'J=O#[2:X"KS4 *4E+FJA=+MIBA.]H>Q78=?8#9:.G@*9W:JJLW@HI>6Y-:[VB4+=@Q!O_T -M+^?.I*GUM.AGE44K_[PI*NZJ?YG3[DQE+;!QH$J:`F&I85,[_J>UR$]Y]_I" -MK)#L[22+9XSI4+CC[9*R]'64IG+*KR`;=.Z@-L4Q/O:%,3V%7LE%ZIN\$_.* -MP$987+OB2FN'*F\M11A6MHY1E(\4D2Q#D%*M1\WXSIE=;*?9F(IYT@BI`M;J -MNBC-P7<#+SYY$?:&(Q/G>KJQ\YFKXWW -M-2QBHGCI#\_Z"C;C2F;(0AX=:D/T[3!P -MI`RQ@#5U=#2]%(&<_6$$_"-&P-D9]??T^\>AAG.&@009*9,DAU:7U#7-GS.' -M*,*!ECV-23)VX_1Z/B2_,G,]"D@5?7P^_8<@@Z7 -MF'?9XZ6-B]O:`*R;E1.X09Z#%H="PVY^^%3V8'!+@[^L%Z'D3&DV-TR -MFN"DMW,-!*[?E')VOE]F>QWJ(A8L/M8+YZ<[KPVC8&7>"7QC#%NYJ.S,6C_T -M-@_IZ6L9^@>G\N*69H*7-C3#1>G7:]J'0,*RPG7S2<%$P;,:#3$K_',B;KIZ -MSXKNY@.[6\S:F"CV1;.5!DPVKB<(UB:]*WR9AL!_2_HG[SZJ.T_!NSEW/$>! -M@O%K:V5/"!V&RTS?S^7YG+-?W4;LU\A"F04VLZ1Q!@8,9?1&+%T/K-K+\.YO -M';3N&L19V=E=\CB<'`0]I'&==V-<_L<+@ENI+=&QR?OF9:_&OEDL.^U@UII< -MZX6RLGR&GS/8THS3VLF;@^@B3U%!/QDMP>GU6`HMCRX`C\,[(Q\ -M@0%&)S2>O$Z9H/7A0@*%^XUITX;\A1`KPKDO<6/Z,\PCEM(BC-884!CC8HM) -MF=3146A@FSQ@F=<)^_*J3W8>!#NO7?.T\&D#)_9W.5\[`*)Z]I)*G\9I(P:U -M@I"4D8JJJ'OT@?I&8^6(=28]6\HNX8$I&&YF3 -M#L#OXN;7LJ`2/!&SDLZ(O5Q_5&*.Y$*FK#:9XQQ?)!?Y!,&CT2=^,HFS1G]: -MPN.WO7,A!3)$*G4#^YNOJR8'Z"+T"J'(Y0-]'XUPJA@YM>>C!L,>NE'1S]*# -MAKO>,3+%V9K>L#BU.W;)-\BV]74>NU\SE422.BPFD&\VN#BM&<,6?0$S2&+T -MW]7@6U%Y$^]M.P'_MMDGHW'F3[+0<%!C<]8!*31_W\--]';+?ZN=6U6XG7'L -M6Q+(UV2OW3G<:O"7P0MI=BGUEJQ#UVL?+A995B40&\&@$M&#I:C&EH`\]^!S -M8,,5$QEJ?/8NL<0K]&F&;BSOK1.X]L_HOOUE)8;YF+\S'Q5S`U2DEM%B[A5] -MT*`UM3&Q[BV77-G;(8KL^<3:0\$!`B@@2S%RH>QY:"L@$HN8;\):5)UN6*SJ -M4G1AOW9J++H*\.;=PM)^E'%VAA;PX$G'_#5O4^T#BHY&\AK+_92,K777?5!8 -MR&YA<51GK$?5I<]H;30:ZPPL+%PKO7ODJ4NYZQKSK%@[&,J=(OS.=NKG%<8F -M7U^NFS]-&;2+S^R@=DQ&,-='/FH^4R[JXD.52=G*4X'"/^O^\_@'Z?[#$^4_ -M*:2GZEA\J*J"2%$MH,(?F2?^J*463X2'FH&F\OT(A\J6/@3M/E>?91+.U>UY -M':#DQ]1O^?//&`6!F<`/#M&2X#MI9<4G:9)1R'.,9EU.,WG:_?,WJZH-K%=H -MNUL]B1!8ST=)^)J:N9N=^JJ.U.IW-2U/(R -MWEA5-[O-YQ`\BDI=4)3VRASN)S_;M@;9A3;7=UT]NG -M+Z[I4\NG40>U>!4_+;-$;9]^4I]?J1W*)7HWJ]X431VG$X'>T\.]Z%'73#F'= -M\+IW)V:S-N-MI:`K)]=A;K@;D#N)0K-RH5Z,\0N+,1YL.'&=5Z=QKF!>G7MN -MP_CJH79C-W_7>1JF>`6J>XPY"ZAB8\"J>/2>B'HR>B",/D(3X1]TDUFR(18!]L`OVC2,8B0]J -MQ?1%$\"CW#)MOQL`,[H]YZ/5\9.58>E`/=0W&PLL[:D]/&NCG*/$9WEB.63# -MG4,ZXCF2EYQEE=1P[9J+D!24HTMQ5?P3J1`&;-R;YZDZ:;XSNB,Z_AE'5\=M -MO_?)W9V+YIZ=LD'S#5TE_`QX,[2.C2)7I)V"9F6674*J89HTKQF7:%1J`&=R -M=0E):BI7,U^#R&M02/K5]QE;?)\\/S<[?N+,R]Z9UV]BW")?Z5W_U2WEMRY3 -MY)3Z>H5`V7\5E):H#U[Z17"1ZW[@38>KC\RV75A(A21Q!TVQ4N[G(YU$H)./ -MG*:"=GUPVKV5+1+V??9_"17,E9L>^S.GD1*;&$:'A<@Y)+(654C@ZR -M_U"SG(2TF9^;EA2P#.V-_ZJC$V5PE/M-EIY_6I4V&$N8/([%`C.&W[BJ\[4[ -M=_;>H;I\_R4O^)`N-$L'WXRK)K84< -M&/WZ$ON<:V&ZDJ7B]D[2?[0ZJWB12F"=#'/#/%H!7-42(#,'E=8'R"+>VT\* -M11-):53)F$*Q4)454&*EJ'ER#G!4C.VS,/5NQY.L$I0$D99I3C7+4Y4T.*VC -MFKFF,_&S0CA<`7!CQP%0+(*J&_/=V58(![P01B23`3Y[`XA^ZH4" -M$\!.F!'@'(R\5?FAFHZUKS"",#APY>A&^M\T;\Q)U^\71U1^\U!J8NHD?YE= -M6:=%?L2P/%9U_\>'1&0?JNM+D+[0_8$P.;GEFDEYO)9?E1QIS?([>FCD(>U7DO*-5?3(_]?\^C$`OQ"4SWG7/^)3 -MJ,2\KBKG>H@#B_Y$9R>49,K^1_A/7B1"MTW&!BH6N5_RG$M8@6PK7*B)JU6$ -MD1.SSE\\&P")E#IAR59+U.;ZX3K[,Q]+29>45>#`E$Q<4O>N>=X-0_-4B%*< -MG9\PW@0YAV[%,M2Y]>I40C!EVJ;H8&OKZ\43D#YHVO.,15X,8Q@5>_FH#QWL -MM%Q23`#!8P"GXE#W.*%]#&(3$^_5U'N@8@>%B?$>8&!'?70')C&1&'5[EF=; -M"[@M3IU_K3F6Z-'_!2+SC0?L5K&.J?1C1T=,YD^&+&?%K4\W_: -MV]+LM_T3'&@UX?,975H)WBA!&>-C)1*R\-N_$1OU!YZ;`<:*$9A23T/^DXMI -MSHBHF.AXALIVVFQ$$39-S1Y5B19.KZ&6"91#_^CYB&E;V5S4BNK#;E%M-GEWK)S.;)!QT9`6>V;59[F9I17'5]56"L/N?S_QNGZ6_&E1`U3XS1 -M$?C6L5!0AB82X&LC4DF((*DGS__?V*?32_$?8^F/JWZ3ZA_2?&^^=I_H8)T- -M;)X;/R6:%FFF-UE?HY,.\K7^B'L-Q\YI.JL]>OP!?HL2U7))C-\XDE#^8R.L -M`3!O/`;5JPR?N):V_[&BH3AZ&GCDY[;#I\\U?5N?*#.1]@B=-NI+MBLG; -M2-=DA72[K4NO!O^RL.L8_Q+EP8*$4S&V*[^W9,W?RF.R.<[O[>%T -MMTNP3*[&EWEE1HK],U,8>WBVU*?RIY_^*=E^Q1J![C6L.KR3<:RCUIR,P& -M*./;G"OU6+H4"'9^MU9T+$0"'O#1T250J*7,Y>XM=H%,V=ZM+DP<+2+MQUD= -M+Z[(.8F7?ZD_U?:M(_QZ#&@V#FUN27XM:J[0S$M(3X3KI^!S5^)8BIR>SRO5 -M03_W/V=I;_!7EL>L\O4X].]R:VK]>.3Y71'E`'G]$#6Z*E#'7Q>QC!B?+I\0 -M]8%#X@5GQ`8,A[)%5!1@'Q(.+*_$M)*(Q9/\#)[7XV'M,GS8L]_@^74..E)8 -MC%+!&(.NPI3G`VH#-A4U`$4QQODU]-]=_%]]]I)=65.1W[#)Q:%$E4/_?+W1 -MJ/2(591#`U1B6PS2WZ\ -M3KQBC`Z\3KLIB@E,A'_ZUX+0E51&!$KUO??&70LJZM*#WG%AB"PJ;%DA^/B^AK5WJ9G>/>Y92TS@^_\+P.Q.W4H#K]=@J=M!8PBC`>/[OKZ7@PU.=@6G9P#9A@H?N=R'4;OUI]*--R$ -M^QCC0K]".78^3M:(>I]K(ZFG8D<1!LK>NMR7YA#Q1>'YC4B>$,*DV[&F -M3="[\K=SM.Z=-:26I@ME67XJ@IU<^E/T[W578(WS\KL-[G1=MU%3D5`0JV_K -MJW?)ECVU'P5W?:^>QR>9\/^]WL?'YOL8C>HYSWR)-76D\?U]ZR+VV51NW5 -M2W3?A(\VM^OR'D_?6SZZ>V:\K*R^D5TYMEHZ'$O>:"/;O7O"-!3X5\75%\3; -M\R^55##>!1!JW@PL*"\JHHD.7(V5(3!9*6EB?AR%`YB%3DX:I[KJ\3V7%F9 -M[4R'2_.XU#Z6<:$(J#NQY[J]7D4ME0K>!->H;NN+QET"'-CT,>41/*%M -M\EJP/1A@LL8HPA0\M*=M)/*HL8R%%\L4/'N'Y_W?Q?DX^M^@\?V/^>S]2M/^ -M5('7UH43YAK'&C\IK_5,GY9ZL*7\Z\ZA34=NO3JLS*B8F)B6IID1U%)(9U%1 -M,V&5X_J%2;LD^['7T<)P@=84LWJ["X%58BFQ@#X&"%0H.`K*2?+ZH5'4V0]* -M+'595;2J"D@4K2J*B<"$_G,*(H:G,/;#XO.5CQY_"7R\J!$ -M#!UAE@0?>SV8KTH]NKB/'#JP0GK\_^VF$TCF+QT;%><8EWI=+8ATM/0_ZT)U -MKXH[:AMN3]/;]7-FY_'H:.C-H;)7!@3/;)2\0+J!+H'HTL)Y8#/*T60/F`8P -M#M34'C\IY4\MFK4&]644U:'0FFM=:89IE#4-P':R4OE_)767%M#W?^2;TE[G -MK$Y?=NG]Z6;.)_X9SIX2?DJDYW1:XDV<]HZ&A/GT&O9^\XU-[<#T[K]?QQU^ -MNCOE1*IP_0X=D@GKC:4/3/`13TP5%MD/3#T[8B*0*1&&,"$"#$8B?P($B@!` -M92`%?.>U]//U#\&CJ5M;\1W_9BP1^9M%W.(OBCW+!722E4!#8G:E%9)2;4*B -MFHI2F=4E9%4*C4YXE1-JYQ7554]B$2F^Y0S*0H9B9H^,\9XIXY'QM)12*2>- -M%C)/'(L$45(&S!LJF!RE#Q?S]^6;^^=GLO9GG6><\H\?@\X]?\OZW_O@MN7R -M^R;_/`C7LCDC_<,/-.5DQR5(K)TZ*8Q^4K^SF6EH@6M,)AW7'>7,4M+O)@\I -MY3R]VWRH."(J>BA&"(^6R1D&*G+9!D5FPTL)RYO"[X;^_X1RPY1O?M#P/F?G -M>_[S_3[>B=?H_3C#]G.[ZUVE^[S'S/*-;5T2HK+"!26$B965UA6D5@UTZ.-. -MX'W(`YR;P7?.P[*8MD:RUHJPG?`4BD#O@,$-Y@";SQX\#$1X$&\2`_XP<*AQ -M'A9'0:T.-[R^ZE4?RW9PULTP3\I0>_IUAT:=DF6U=5W2PL!7D5@R.BD5135U -M9RBUR>U*TN1;J8&=',\8YU=01XF,Y$Y"G(!$G(%7!5$G()QV4"(@'((B(SD, -M`10Y%%:4"SD,ZJ1UO<]]7XE)Q05/`'S/@[!.Q(7P'9BP,0$ -MB*C`-01B/F/'@<8$`XD#YYP.(.).`!.)$'%0Y=>2DOWN?5R=GL=?X/P^;?[& -M?Z%@J*R1CV@TIEI*IIT"1(B3)FX-Q7T>*2/W\W[Q]QK>3N\?DKE9?_6:<[C=MG<7.\FV]O7,_5ZU"74`U)%E%=E<<> -MNP%*Z,`8:D.R`B(R3L`8*(L)V1[]I;";SS@0/GS`CX?KGZSJX3CF&VC$'IZ<=-$W)#ID' -M%*,DP$1('3`0W65(%*S+I@GO:AA]/JGSQ?4GF4[V]K;#@TZ.2E09\O+A2UZ% -M2:$62Q=N''J0GSZFJ)7I41(TY]\?"2`,X,SDT,Z='-99@55@=$!0#4`Q(I)T -M0$42((2D8@4*D"".,$I<7Q'>'5'+'L?.NY#X7SO-6A_KZ'Q5Q?A\8 -MYEWNNZX.Z'CBE(HDIJHDTS5D$[18&9D@`21'2$ZGMZBA.N3J=6*BI)VB#&2= -M8J6AVE"3`:P44SS%-7XS,'Q/35_O][^OW9FYOF9F5-9W/F=B3Z81B$/I3B5" -M!JF<6]IE!+R")8R3,$1BA+R*<:RP+%*9`SR*9V0<[%0YA6@T<#P56NZQU-?[ -M.GL?(7V$S[S/RO:Y?TPRYO[?I)NL-IHB8LL@8D5[5`8;S -MJ/$?(_^_@OM'X1_I^S[J9_B)GP9ARB+WN.+T#%])3%/H11$$8!1>5]'G7P%0 -M$@/R,$PPB2,04`\R?Y63Q8I#FYJ%)0)A!!3%$!C)&QL$;(Q[7K?6_%_J4?*] -M\&?!THIK2S,UP-W)KH9%TV`F;;0V$&,`I%-*4`I%#X?^RF$`VQ19#:&&YVB( -MR;1=GN'':NUV:;2,?T'-BXKZ?^>0;0K[,S*YN[[`3=T6>_S1W-+>-.,4XU@( -M2DA+"!8PI"6`,5D-$-#0D*DSZ*JEA?H4T'@?'ZY[3D\?]*SXA6'$G,-WV/?7 -M)R26Y*+C((8(H&2,23.`L,TE$%@%D.]I@PQD"BDHA<"E7`C@.JZCJCE[!'3N -M7!<'3V;U304:PX6'/'UWNMVW.+HZ?,H;CP[N@=U.W=R*FY0Z";MV,&+8&)'= -MC`%(@Q0#S)#@Q0FZ&Z=&X$W;J4W8W,8(QW,(-/#'2C'F7_F?OG^;Z,F239\K -M+JVI))!4J@T@0#5J`K#J#!TITI2=4!0PRKAG:=6H@(`BLD-X;XHL-_>.KK\/ -MU)^-]3B]CZ#RXO)C7R)EQY''DJ8'&6&*<>5!RM[=I#``P1BH$U23)"JR%F+3 -M)`3C9K$P?`?>?YS_PK'O?52^U"JSGRZ4L4`?AAA8(5?"@0A49"D!$!!0YI, -M/M\6`8`YJ59#5`2TAB#4LAS/T=4+4JBI3B0Z3=TR].!%%#I)4.C$LW$:ZL0#I`6*2:4@@PFL/#)6?0QT9] -M[6=WZW('^3W^3FV]+IDCC(51!5@?@-6`0`0/92I?>)2I*A%(8`%`8J!F(7H5-)HA8"F:J-*B -M@,&"^7R^\O+\RGXI;SN=YG&Y^J8C%BLX\!KJ:[18%`8Q83B(1=:2H2@+B2HL -M0"HI#$8@Q&$TN)O'=_=\;V78/B\.FF?H["OHMNW -M;MMJS8;`V$B1)-A(QMI)L@B(,)LE2&@LV"S9-'9,>34)7>-S-V=I_:[S?M>C -M\OM?%P]C#4X5MX=E=8U:H*&J"13!.L:JH*H=0JR=00WR`Q"=4#:J&,4628)U -M")TQ(S?U8O4>HUITG3N[/G.#LX.$0M)PCPV,X8*3AD'SF@<)$49#A(JPX8<" -M`]NV]U<7#P4Z9@N,8JG%Q);.'B3A:K#B)@(L!$(< -M4`4!&!Q(09!96Q(<0<3*K`H-M8<)QYA#FQ\/1<04H"QG?D.N>'T^][W -M^)V/,/E'$,/>;NQ3KHFN.LVFXW4-VXW&X,,^:W0E0W2+)4A@DPR&Z;DHDH"P -MW!NYIR'SG>]#BX3SNY[@IYQYPGVN;G"*O@W-6U5'3#P>+HVXE"S;5:);2;`VPVMU6&" -M0VR.VPVLL@L\MJ(3`;:63;W:S4=W4?,X*88SQHWV4%')[)PCA=73-HPHX=/" -MZ?J,(!44DTY#U6G4+)@LLD&"L0-,FDP1TVI4X6F;6$1PF?1\'_]X?P>Y\?J= -M/Q'=R[^^90R$RY4B9%,L+$#*112,3"$^;@*:`&@"Z`NAGIHII,>?NC\/C^#E -MET''T=SBG&'$!QR+#4T8%@HLG&V#`*"@H&%JIAF'"JDTS"\+3>5IZQV*.EP> -M4<0MD%4)?(4P"AA+Y!S5"\:35LAJLP -M!>WE&D7]HB9CH'-YN74W=BTR,@^)")UN@Z:*0TU9WK-F>S #%LU0!$V#") -M(B$-@9LLQ0-D48DV;'ME(Z"7`Z*LC^K`.7JPUN@L>W6Y8VXWX4$+KY?4OHPA -M'D`*(&8A@0*6(+`,Q+&6)8D#,"Y@S/JKZL#X84?#I>#SSVN_:EF2BB*(-$4J -M;;%4-D$$&&:9R@LSF;4K(R+(*C"9P-25@9)+DH5)35%(7)DEMK=;;R"V[9V\ -MV*RL2'(@R&1:0Y`#6E0EA%J`:IER8Q+@7HRZ.CQ -M`X#@AP+.`X`[A%(I#@(+.!A1"4.!(482G`R<%CLN,&-O5Q;S$&_;O -MG,WN9;CXMYQC.)D9YMUN:FWY/OL.FF_APFSR!YJ.V6VQ86VU518I:$Q45`*`+:H -M"H18@BD,9,:6RC;93C*;"ZG:W]OB[&R=YT?7[?V#SNQL9LQ>,OU:S5F#,&:J -M*#5@9DF:2*!F@"A,TFJA%S4F;5U5.?O;18]'I]WN=W=B;;;=BZ7-Q=<"PN@" -M(8$)=)%N0&`7(,I!;BZZ1@**C=E&W-MP8*[PK5N[K8._V7ZIBA;?@54@$*HJ -M0@F$"@IG@+)>@(19*HI9#/(L!B`0H(%4E`H2$&%0215$1A+CNS4W\F+'P>]> -MU'7W@\'L]FPQ2DP(FPBPV$FP`1)L:K(%(I%`U(*IJ:E4U-0U#*<7:-KF'P_` -M\0Z1T.AO8]2LAW]FP[_F+ML=NQVM*K#;)L9J2;2&Q-KB(':A%6$1$M(8@I#: -MJAVE)M=NW%QC3R.P[WI^+DY.3(UIDVH:SCXZ:\8M7C+27CQ36@DPUEA-:'"S -MM)J%9-4%FM"MM(4(:33`Q&'$X>,.C?+76YG&/E_@>VXN7+K,R!DUDMRN5L0H -M&AR,#1-22D%%"2(DF@02M(:@&,F8::6K*&?1H:7O!R^\3.^KN]\?!-_NGO\H -MLPEK:VA:%J*`DM8%*(2C&DM5F(D"D,=JUPJ!0&TO(V5Y*[TB"YZ`M"`/R/R60(!`820J/D)M>:.W%MW&V6%P7<*ZHEU2@*A%)<$BPN`6Y%` -M$$$@H)JFB0TBI4!*417<;-2JQ7'7*CF*WM[7!+++@KX-_2/5Z3U^`WS=OF^% -M`63>3I0F]PA+#>P4*)"R,2&H%WUM$-Z8E4W[YTG@ZK>;/S/Z6_=V#?Y60RW< -M?4W>1<270B@72`H7$+A"((@U06F,PG%.KL^J['<]R:'U&@-!ZE70%06/J+*J -MB0[D$8L1`P0AW"=Q(49"QY[`9P8L*//7@YN+G\FO[MX-#/3CXQUVX[E[I\_!JIA%("`LEZJ%^>+G=JL^7I9MKD^)ENZ&[LC= -M26VX\0ACH$06&,BP%DR(&2*1DR061F6+*Q3&1@'7BTV2TV=FPV+ -M1\%U#J*Z*[^OE$*,@Z>'L?5[/7C'!>IZE010QTMDD,!(I*JBD-S64W+#HW8P -M%DE0P!AFYA$)N8544H`UV"&LZ[14=PX865?P^9?SN#>Z8I;QK;MS)F -M"N"F95+99,[9+(*3,DF<)4R64%0469%#(7!=MUN97*5@W#K=#+73U>KR_+_$ -M];S^?LZ-&?GV:VC6UBHZU)K2:R1@YZ*36`UF00%U(2C`H0Z$*DL1%)T3H;;$ -M7G._HUJ2M'!P>%YENT;NW5IERY,EQD,BY$%R3(B0,CD:P&`YV!,$6$L%,Q?8[IM[7/]CO\GDFK?Q.A9FSCG0M3/FS1'U?V_9Z7:^LZ'@9!6QI;K6Y: -MLE0520)!()$D((`I$P];!0U,DH2'7"*2M9`[0**#U2=<[3U^EZ7D\G3O3YCR -MY9>+(USAXSC*IQ/&%(LX(*063CA[9EM4EMD&0X[:K`2+%XV$#3G:-?2[@Z80\"#%-D%AM2,!=+8%(*;6 -MH4!$V@B<7535,SR6^KS8W=!7=^R\C#Q3C5=CT[2K32LJTM):T(=K)%EB"22T -M!8"P+8*H6B*A;9;I60*QVS';Q>-TJW#P#Q/6&R4%! -M2<QAY=KK]CT^;Z/W1[_X?) -MHZ6Z.AG.72FD,$-"(PT0C"+-&+4EA&(&@+!3"32:(AI;=#0T>3E?==\ZGR[? -MA7?V3+J#$R:F295LHI"Z"@HC)E`4,TE8&@3#%K`J.FB)H6!- -M-5MTS;VW9LFT4NOHUXFT>5O]W?CN6W&;5MR71EJ5+B199!9+DIA*@+%+F`PB -MA<%PXJ"KK<&.[:K(59RKNZ/$Y'(,G/XG%Z=KMJ,V&CH:&,8#!HS29H3225(# -M,THU*P*`NCIC!3,\MKEVIJ%:F7+E$\.[J'J -M-YH;-DTQ39IJ4V!*`[*3)DE"2M8%D-C(NR@,N>-A7>5VHGC\/N6[3U?A9[M' -MT)X.0U\>NNO!R)9S2W3?GLFP-C$--$@;&1D58-L$"960U`E299J+%#B'$-O*V'&G'KI@ACMXQ),$!9,3C<3`4!(LF*63%7%H.+: -M0ZSAV<1OZN.KKJZS6S70X]=5)8:TK)0BG$U`FL#"5#6)#N!;22 -MNH;&\3QE$UFTR[J<_=X]-?M[9PG$\1Q3A9Q2SAXJ*1%DK(,A\Q98"PE`4.)# -MB8,%.YCAQQ%'BEO:.'3R5O,>3C^0>5Y.^\Z.A\43O-I8KJ3O3[. -MG?'MX/>_#\X\T/-`\T?-IAPPP",\U&`I)YI'53V[A@%`$S@G&`SCG`L*A?50HA"^!20+V\*9FO? -M@??6-&`,AAUT(AWN=DYCCH=E>$K@!!)<#S%#H#H*&E:1`V6HA4(@(A)LA.5) -M-@1U)BA0ZF4C@=!+0;/)F3E%R.)R(B3)C".5@(19#4 -M0RAK:Y5JAE8:A4(50)P$$^"<34H[M/I=Y"R+I/6]YR -M?-\4Z^2\.OCA;:3B8DX^*DL!2!\N"BDX`Z>4C)RD!A0%=*WIB8=,8A@O]OP& -M.,SUU1#1BGK08)FGHKM"V"DM)C9*82T)%@=J1<"L@@E*`H@3Q"U0AA6$V,&K -M2Q]O+8@3E0+)M8(XHLH2OF$B$1E)D*ASAS@*$YN>R,F.>P#4!4!0$.=B<]0\ -M'90IJQNQ3<[NSG?+NW>EIGU\NLKDG)D:U!89`:T)A)D3#!9(D4U6S#)E%->4 -MRM*9996]KC,CJZS+T#;Z'=RUNOAUZ^[52S*M!CKRP(2=LD,,(D63)BU@6"<% -M`82*!H">9P>&D=FW);ZG5\;)S;//%VS=$`Y4,4-81"*(@1*1SU"JG.\Z!8%$ -M@L%(,#GPXP!4("B$@")2!#$"I`6M&D:U!%2@Y]*ET-W#>VZ5J%\/O^#;7:[3 -M:&U@R*38R(0VB#)4VS:@[5`4!5=5Y2'@+3MI2MK738AYF[=KMB=(1GT$GT"$ -MG@G#C$*0R*$ULF`J`I$FL>/A,)IJJ3Y\,!,*4*%&MJ;_=7(&[AN -M2@2W'@^7PKKX)0H'B'X%(4R%`3-)#,&IJ$U"RM3-FU;"K.'@U.=T^\ZW1QF' -M3PF$4TTPE1285=-L9"P`PC2!*`1TQBP8*+#2CIE"85KA5I\+6-WA<%>-XVT: -MF'A8<,:#"89A2+!`PB19!A%@I,)#2*3@9R@,14G#3$Y70P2J1++;W[&*ICK4 -M6@:`*2**+0A:TRXL8PI+D4&%S(H#`+:J0N&DP,L9!)%DP%K:RZ68++"Q2[2T -M2W15Q='4RMJKT.#HCMUX;>$85A$,0-R,"4B.E218J2$4@01&2`W*$4W)$G1N -MH3%I!"88,4-U3=T(IK)0J7P_,<=!KNUEKUQ`+NON6!8YO=]J$6=F[ -M=><>5XTIA=HP8&UBD$21@;4A&!M9*@*@<((NE2CR/@O91+ZZH>U0^[=L[[UY -MJPTW8U[-<6'WMH(FT(;0-J0ML!(H;=MA8"BS;JHF4WS)EU*W^AUNIQ.O<8C" -M;V+>JRK`V"L=6QP5@3`$Y&,!UF+@AR0-0@5)0,D.1(4B@HD,,E"B)&DUFV]9 -MDNL+@Q&H([I:#=%)[2-L50V6P!E0F=L4!0LF8RVDY&2@%%Y3EN9N!IQI%+E& -MBG.UZ^OT.&H[P:NKRN4+0BE,,4:K"(B1$!$JDA9)SI&0YTA&$?<\^"525I:D -MYL&+B)$]!++#6V;0CR/.--$4:%$UE::1HD(TQ0%"--*C"&%)I,)4(8$(R!OO>CV>\.IZO)I-$'/2C8&C"I2& -M@)HR4`MLBDJ10B0-#,-#/E'+R?2?1:^K7EEN-W3>DY,N2.+AR)#(AQY9 -M^7WO3Z)X=Y;=YOW[T(].^H4FY@DG2[V`LC(;TA$F$I:"*;T97?.># -MTUZ-V[U+=&&JVXW;&!W4P/K,>#QUGV!0I?1]'T?(*%]'R"`'Q4B$T=HCMI*( -M#(*3NF%D=4\,/=">3R9Z?;^SW>S/EUAQAPG`\4XJ)PZN+$L"H09)CZ2J&Q@" -MD*)IL,,PH)IX>'P\8O#MUWQ^CWW%Q'$.0Y^@^+MUAPG$<4XD0XI#B& -M2,#B8%0BH!ID(`43301H-,%#.5=/2&CIQY:RSL->Q8M0B%(6J$M+;J*A<8L% -MDL`7`W,9+FE0E0ERU4QL@6`=LG;(%!
&1$,4R/;TW5?@V<'3M.?S]?=,= -MMI5J+Q)IRU0N8EP%R10&`H%Q)C808%R%S"F)"XN$9=K&//F-7KXC@4X7@G<< -M/`BIC@08IP`<`E9"R`=Q!)W!!)>"BP[EG`IP2[-W:O%W4TZOA^'U_5^B]3PO -M6>'V=_H7];EZVML:VP*:]:VNA>)KDUXTT$UHA%!A->(%C"@FE-"1'2HUR]T& -MN;LX=.SO.]X1N]CFY;CC&+);+;JA4N1EP&)4@R2YE,-)AA(DG*%L`*2L*P#E -M(\M(RV\@AQ,G1YHWN`&).GJ@ -M(2QBP!(I[9`C)-;$8+(,.);36@,GJJ,)#"1'2I-,!:HK1I4J0^>MX/'Q9:S7KUUG&+-=:)#6C$@R>X8L4(A*R37`UH -MZDUFOCFLXSPY%6VW9L#48>IFF7H -M(`I57A?FOIH63-$!(7LO8&9D+))8(H2,EZC(DS5I6&!#!8MYN!Q'<.6?8<%W -M(WN-M:N4KQZTR3)$UZJ9281)DP*)*2(A-5Y?/Z''W-75GH&9PK/4$S@9XR,#.,!(=N8K=JW$8C$XL6*;N.K,:%D,:U8-A0MD!RK1H" -M0R6,D8&3"*1(9(I!@8V%)4QHP3'0.[L)L;`<38YG,Z7K-[>^S^IS?"OX7`>7 -ML\'N_2,%WZK9OW0WUWW>;]Y.G>"I;8;[90-[(,DWH=QA$@+(L*3>MHM#I:XJ -M3`*B5`;MZE9JFH-_'(`>*K$)M&*$0@:2;;8%DVS -M:;5/+AAM#"-47;6NXWW^,\V_9U7WWA8%FQ8$2Q!D0B2)%B$02)2H*A8//8DG -M/&%9*0.<1>=,)#!,+%DSH"YR^N7?L>'U>MCV/5N\W6W8[2ZQ+;"J,%B%I<)< -ML;@+FJJQMLI8R%S$06"@,)B#*A9(ZZJ)1"ARL8=Y[]--.]WYXPET5[\N#G]G -M:V(ADA@@2!'GH'P\Q]A1@1]'E141'R2@P(4`8$8@1D,S*J9E-3-6:HCSK]+9 -MV>#G=WN=+JV[=VW95MUPN,+;:*)*D+;92K","4#""%HD2*6I$TY;L[)A[O:P -M]/OSUIAPCAT8G$8ISZ^U@Q,C5(9%M"9*PC(&0K("0F0!0*$%8F4!1,(:1HBC -M"WNW.=_KW?A['AS,&&S#!L/P)`D#X#^I9?@)@D+T!9&0TE1$(P+QI%)4?(,! -M"E++Y#[N)*NQBPX<*]K4:]2.QW_,]+UQ?&LB"'-,)`1WH&<#/,ZYZE0J(S., -M8"@L,\!K!@2]`L9*A+V(D4$)>BD&&2\-4=E*+[+S.5VD";F&41[TQ8^ -M?B'[PS*73W1PQZT<,$*&`/@/E($`5"JA!>BRRJ%`9"]$0@D+U$IL9"R-ZH^Z -M00_OZ[YX>''C&+O?W+)/;M-!+#5E2'`X`X2CA!28FA,Y-$6`@#I94`I(9KHV -M1=3J6()@L*H4,U+`+H:O:EF\Z[O^-S9_O!WG=6!V;(LQ\J&/BB-(S@J#'<'1 -MT$O17%J(0J=`D%((06($@0",A"$"F,1V2BZHIS!@8H8":AIXQ-CAQX+.KZ3I -M]QU3.='1HOSN?D:,XYH7@S.R@#.P82]%`OLHI(%A`SK%C(1)+`O`SU11GSWG -M(T&^+]NYN5>Q]&/[5.3JZL#T&3"Q^)3"(8AE$BT8U0QI&A)1G0`/0=%QA)$A -M@8&I`H'0:K"PZ$*PO0C.@>@]R?\C+?EOGI^QRW,SY6YN>I,IE4RRJ51=83(8 -M*023*VLB@,#(XV@H0HBL51/!*3Y*%2D.EX>6.'@=HNKOBAL41'1I4G'`CB(X -M$8:#!@9HB08&>E6$0*K`9&DH="E)WCO!YA!.]@N?(YP/J.D?!ZW&F9=:LXV' -M&W$+B.%P#1@@*&B,#1(P-+;I0"DK`$FB$D.(V&P7)-B^+PW>5M2][XBU9'', -MUM*(:((:#01JBH2B7,D9`L$1!06022T48"2Y@+0)%%#14M)N%NYMB87'=9ZN -M_[?WPS^7Z?AO=/+NY=Y<."G4J4JEM3L\'4=3$'J+$G4C;0.HAU'N+)9`JC%D -M6"0ZA!.IB'56JAU([ZG2=._6['W!^'[\;>CO%QO76RRKANA;<#:TA9=)@C`2 -M2X4&"!+A1D%D0ESC9*N1+`:IH"RI*M4;)U!U/3=2YX&[T=99_9F>&O/Q#E=G -M%,]-L,S!?(UQKZ^OJ20WQ3U)M<4V0V4P5*-F!LJH39C(R!LCZ^@H"RJD9-D8 -M,=H-C:VJH\*7.N?F>B%33,!RY9%$DY(R`R&0B -MA$DM&4A"C&8S&KCG/.6/4]GD[O*?+^]Y9H\SW9@^KVGH].PXF'ZB_@_/UN"W -M5R"13(E6XA-220)(B"1"$!*`$H"(=<0,(4`ZV(BP$A.N3K\5QVZ&(:A9)*TQ -M;B!O;2& -M^,G&ED-Z()!(=+`0!4*E0:52H*@VAWFUL[:J-K9Z(R;>YW"R_BZGD>L\ZM\T -MF:S^(?2;?>]EESR?J.QHYG4&)/$'AZUFV"+9-H@I:-FT&%"B*2"AA-U&)!0$ -MDW>.E$C`I%@,..[J0L8!9)U;(Q!,>/&RWT*P<_F')^>#/&V]OF%'"0YM.EUS -M-=`61V5C:6)[=@@&R(HI-3(6`9B5(5`%#4&4A0:AJ`<\QMV3(7\'?]??W_?: -M?'U+.MES%WQQ<76R9J1"+C"!Q%>#Q0@`NA7D"*'B%"(0!*(_9-#`,#(5),R. -M:B5"D49F-LW)?8Q1!,@R:@QV`O*^B_]_G/?+TU+;=E'`XX'"`J@.%M"0@629 -MXM(@P!SJQ96`4GT[,W"30,&A<#2,NNDN!VP>$>*871ZFQ-FM^5HCE.I5>6\' -MV&]`^CP!'=E3NL9#;W8V%1@%ML[I3`X=3"P-#E$$(^&/$/DADR8\+L!H^$R2 -MM=A'=I%O1_1?U^3[8*SS!,[:;FOU3<#-29H:I)F8D6$*3,J]HU`0F98R1D-$ -M8Q(NQD0[LV]V=V)2FW;W9>SQESJ+%9$74Y7ZI]13IJO=[WL?9YAS-KGU,7+Y -MN.]>S*Z7M0D2"N2!6,H+V+(8[Z6"0[%U4A8!JB/<;(,#L)(F%$"H*Y))"$5Z -MQ%>NQE<>TEEEDJYW_,Q?FL.9X(HT+:YTJ[DN2ZW(`JQDF12+&#"*9%5,B62C -M(@9X9D@S.6T6?`G(^(/$XWC7,RIDS,S.5V?"J;8I;A$<Z$.\%PPF\8+`0B\3)&!OB#.E!FIK,`UQSY&A\;CHS,.#>W -M_#?;FR;>8>/T/L,I*2&C1(=R>OZ^0O&XZ/;FX-W>'I-HVDVMI-FD3:-IC`-H -M8,8LB!':H7OL"R%&"3OVV=X.\>^;_;Q[#V>`>]X/7^H[Q^K_'>M]B=\50Q[< -MY=#9_/\M2D<*:?$]/N--0`.L^[4!Q.A.)G%R/`XQB#B8@`Y2.$LAX4AJ"ZKX -M7!"HP1@'A13PTJQ8,DE8PQ3[;[JS4P0E8LG`R6$]T&,408SFY&-0.CI31)C& -MBG4'.@5;M/=?EU3>C2YU`;QW!IK^E)Z]2%50'T;'<_':SGA6[:67D5L8ED$L -MH!E80)0@ST!!((0"4@@D9)J`BG[MA6\R3(:7091!;_.B^16,K)$RDDC'1&G8A#Q(BA%5QC=ZFZ^O-K#QY`E2HD*1,C;F]O.3*]((9;Y9)R>\OX5`BJTE.2[A`H?=/3DHWX$I(E% -MM53ID_`*X:9C,R?8T&GO*'/9XX@1_!SP>RC$4WP,%]+XY!*)?))`%])P*D&$ -MY?!5>SP6260F`58P0YLLLK@?=5Q^QZW0[Y>3V>?;GKHS?6PH@.72DER'WJ1% -MGXH_C6;QJS,BKTA2UTT<67=3C;7<&*ONQ2FK)')M3>1HZ5W:$+S>?GOS1EU7 -M+_7P+'F8.O@&QID%X['6()V+&%$PL"RBE3G!.ZYJ0&#S6F1"%,1((84Q@'X/ -MQQ5ICP/&VC!.U,[!D8X5=6__5G*"&H8`T5G#4.HPLN.C8<.2KE:$VJ$1U\:S -M*BD\[GXBYL-+QO?"<\7%^T0"4G/^M/)3_B^S]TA16EA&K4!H.L8[+BOP$SV# -MN*AFM2X7JG;;W=ET^U[7M?*]KLX>W:;EJJ.;$=9QHIF[O+J?G+G\?X].@X_F5ZC?<5HI];CP";5'!!K0[O -MIQZCQUQ[W&WMX&7<&X8=Q#U/-A!:DL1/?64(8<,^CLLFI)0CZ@'94P.*P,!" -M@XGPQQQ0D(LLT\IZA2^^=CU+511^)T=?+Y4W+R51&&;XJWMCT:;9X[UG0D5- -M@L_]$U-&P4M?^[&J\J$QG7NHM>_-3,@/M'XI,]8NH:UM77%E"Q++>SS\GEO2 -M)G1^$']+Q=^+[`8QZ5/=)OAD8GW[<^HJF*45!8 -M/XE5H$IWUK1(Y!=6!FE8CIJ=F><]ITN/OZK6?!%4I<;/H"'DT!QTW\>,;&(; -MJ!TD(,1*(F\0C$023Q^K3#*J2,">8"B`L$DA#'&(X&!BA(0IUD7+RB]2KOLY/\L`MPF^%6\;P5+ -M!JLX$:-M6W;]U;,)XEE?FAZ5KZE6=TR]-N64R6$3#_#[G/\9KCNP1:(AU./9 -MBG\D2Z?(&]:?MV_%\7Q)I$W0J[K4P)O,*(46RDGJH -MB*1@1]2GJHQ!2"2-OC:@C``XH009[LPL*1]BA-!!C=PK!TP>P.N;Z,O#\88J -M&=[]?R47F.05_'3\*KZ6&S<90WQRFJ3\YP\2V0'85ONGK/6A.(I#$(DV-.=N -M>8O@AAE/M02W+(>=JD@Q`%+D:/$H4.0+[E+HYVBNC]34KW)*&5=I5[=W4QG7P_6SI_LAZ?0`R[D/SOL>DA['KSV#RZ -MF'L+IUV'L`"GF/KJ/KVR"`5FB44D7UXP9JU7']J_[/A':/4K\+ZO\K]J?P># -M'^GH_GGQX05G5H'G4\]L-"7^CZ?-2 -M1R]Q62]"--Q":-2O=;YU41UM?.$6AO-8!_!QK.BSXT"?H*JW>DWN?<;,NUAS -MHFQ]&YRSA\/U)_3\@\=>G,&,+.S7B'9;&@YW9/8V45`]@QBHD#Z -M%B)'YBU!8PD^A7V2D*2?0C#W]D&5!C`XP,+V;$V@WQX#&0FD)T/8G1.Y-C-^ -M:>!T?MG!Z<5V(G7QF7XB90:MPP_`P[_IW9(#ZS[S$0>T([/X+JG1BX]^3>-: -MX&;*'+*FO.[?SL9BS%G._KD6I^C5*._G&0P=>=3%96Y\L]+=P8/3YU$?!?X/*LX>VI;M0_* -M[5RV#CX]G4Y'?[O"T/Z!<.^''WG.\;L@]D-P1AT/%G34#<3Q1Y]`4V0DKJTQ -M1$121)/H$^+[6,!QI23S^U0M*OHM6LP.('P4S,'21\^`<5&?.AAZ#CIL!%-F -M!LY.#@GL._:L)2/YGF8O&"UTM/LHR%*%=DGIT:#X?ZYYC%#RW"ZG:-=PL`\H -M#L"B93=3J+#1(REMQ5K=&"'RBHM1Y\$+<`SP0Z72HK[?X-@5Y5\OP4:Y\ANR -MLV1@8O[RY[_ADI^"8,^.-56_^\JB^U$/ZN]N0C^H-!6%88H, -M.)BZK/-)G>9-@R9_#NNML\IS5H^/-!RG&A44_;(/I].P';K[QYQW%Q&5V>?_ -M;F:\+MG7-->[9>MGI@,#;NTG74#&M]CS=K0MK,[O$`,\*WQPVGXGB\3:\5U: -MH23QY)A>^O-45MF@\M;UIK6(4X"G<33\?>O]_9.A*+Q[K(S.5M;(MP7:GT.; -M4'&D.@:S46EA'N+Q9NHPW(">J871RD_*T3O<.P>*K_HIC9GDG]9MK(/<#F%J -M@9OL8M)F(A>JC\7I-)75DS9'/U\8.;T%[`9W#O1UE60@G-7S5RW1NTX;DA:]H+*WY<)( -MQF-], -M(FH2;>HO:)NB1HJJBLK)I#Q%1=:82-D:.,ZRA(E27/EGPC?;%MS(7LZ4 -MZ;]<]6NDWG2M#"CSH*B-G,-(AJ$)'U(QQC-YX@V@B1&(P]!""JL//8!1"9D0 -M]"O@V4L(STR*LG\=F.W>VIAL_5_(IB'RXD?91A]4S^&?)^2?)[5+\A$#P3=O -MYBZ0]KYKW"N-%K1B3#/ZTIR9K8Z8?2<-]RR"5YY0J`G1N?TPW/WAG2=ILJ#FIQ$!C)ZUK!$H"_Z%"?\VV6O_@/.IQAA`/ -M5V=Y?D21G+"JRD%'45&W\\&G)7V,GLBU1Z$QGR^U -MNL9E&EN#\2B-A-WEF#15&?,+"#_+>S-O*P.7COG?7);1GP-0[1+G?MW_NA.0 -MPT3(-8GJ,R^R$)N[*=EA,VLS53L.X_;_<$^AX*['$WO?,][[H^/ZRR?%$9UZ_:DGQ8JF1D#ZT% -M8#"'UJJOXNU7ZS_/<)'SE2'A9!"XQGS1#1))!!<(`#C$A`T0'4,+,&-A%PM( -M'NWHN!HL?0&?I=,W7`S]M/N9S6Z"-X!@Y3G@V?8VCW?K+8 -MUZABR2.V2LRL4=T!J4(]?)\B1CO=8*Q;\J[*\_#R@G4@5C,X["?OPP@S\BD> -M^*86+UQ87_SS03E=_[\<6;_0?GE&^:[?EXMOC4T?[C.6,WA_7-^N+#"^X\W2 -M*N*Z(<6W5;#F5K#V+.)QY?-6-8"5OQ%Q?I1ZL:1]7ZJJPV*`''9"@4=E,#+L -M8!I75BTTP:(_!OH_"5^)4C;1NY]"LJ),CEL9I\#@+OHK7`#PT47>Q6%7<<-= -M8-!#!3*M)!B -M2F1^/XQP56^Z9=#E(B_,PWN@.U7\"NO626++K%8769KM;`TFPQW0!=>H'(9, -M#9@'CBU^>@4*.C1X078$XT4N_@;)+S?2O;]V?>7OAOA2)8 -M>*.+JES6;(WV\_@+?UP@5G)E,!^@G*3":[L"T5RF,#@BIK'?CF#=IF+I(HUI -MQ&'?:!B+>,$QGT!C!J?@CF`L+P_>*X"QC9@:58\1@.Q/O2VMR&2)M8_MMH.$ -M[&A8-&.[E5?"T4KG993<-<(RR-Z-!::Q@&L._;-9?`,#K[:+!P5)O,WN,^IO -M3>24)IS]CB[LZ.;U=?#(2%BZ5X3L.MKVNTQF6UIH2KPAZXAL]`1_I>!$9#Q$ -M=-Y/-BX@NC+ODES$3']Z?6J8T+5BNMY.N?,?3G)#N^]2U>(SZETO>'SE7&E\ -MA$YMPSDP,,*U<CQAZ-0_HA6C -M1R)V!I-3^NTT5C;(<3@V@_H=Z;$*=10AFUU@I?M#^I<%O%IP,#++Q;[%?BAM -M$R<4*?,[D36.,,#G.,3PJ:9LW>IW>*C6`8:S -M+["BV=P-9?/%HU3=4S`->/RGH*X,/D??G-AY_`L,?*RFI^79U&-B.1!6$(Z" -MGVF"NM`75`?*3.9[$B=+E,L'DM!QK:>-K-PQ]C?SGUC/(AVWV_Q_LI]D_+4GZ/45('SV)44'Z]*2 -M'[%"7]L%BS\"DLD%#ML/G62P#C!D,1'!,8B<]^-^:M:R4(4![.FM!Z#Y;^\, -M[UXC^!3*OD/!(O;#1;K8=QH,#LISY!^"4><5/N&77I&:[I4'&\\"S-,QM'5; -MLJSY/GA4'E[]YLLX@+]>D?NPF/02AS=\(P1>;D')55L&@UGD*\P!!,N6*F'9 -M-#GQ_!&I>)3IW#';>;WD'.1G;YY)'5#\U8]CRE;@6Y:2]Y>@LVS_9O<'M4N< -M3P9FS)PKX6X9-.\*$(!Y,WW4>[1796#-IJ2?2"%Q/_C=O+55UI(X[ICO`XG+ -MQ8K*@=D@7)H?F.&+=^IV-D+E!M;5"V<6PU]%\=/Z&%#OMS]L`-88.C\7I[77 -MH:*0_9B7>V/;(8,*/^>1.ST]1&+QSSI#=D].F#U;>",^2(O>8#M-YI/2$Z&1 -M;R?K=.@,R7UP@8B;-#:]\QGB/XC)LHV8-$NR#G4RR.BP\?C[Y-](1,&_G'IP -MG/`G./=A>:IAO#"9/7^%VT0_4QX$EH@<[]QCPH]);ST[7[5/J)]EB_6\DC=&V3PZ@SC.81#:^D42JT/%;#U%3)\< -M0"`OFE&A3H%+9GV?@"`HZ17?R3U?#6C+H^@\)$:)<8]Q!&PXH&NYL;!;.DTI*7I\+Q:=;Y]O*2S*.594W8F -M8B!%$9\RM>*:,':\!H$[#Q:TP&S(L(DXL>?C'$_F('U/:=4<+:%UKLP&>!L@ -MX"Z5E,\`_&,)\P!'EIVJL8(P)_<0GD,XKU+*1)]JE3]@Q83\WK4?XG^MCJ!Z -M5#OJZEFE.W$[4'Z"?;6'XS/`\_T,!_50[F0YAD7#R9P`X6:L@V;9S-V<>9P: -M->LR"$':8UMS6OTY9.M,%6:%%KX75H+P(4 -MJ/E\WS?^<^)8[8+=IER"5WYCW?:BC?(50M_E1CBD/=EZ/TD,D(/H6&* -MD=>:\3G3<[T&K.EMG'FJ[-Y38'J/*OPHS9:K.MV.I^FI^,!!JKTM@B16#[A6 -M)Q!5UM[@M!I2S-I=X;R!>Z)._Q"H]J!`:+U'@8[;EZQVY3"C/7X14+[PP#I0 -M'R'L3IS_^["D$SQ5F-?=ICG`/S\-4;)KH66.#=9>T-OMWTE[=Q4.'@?+B3P> -M8H51@E//_BC17&A;UX9]^-#_8PN]JW(Q8XYD,:"]7_07=\\DTYN(;K*HX+SZ -MAHH..,&B5$VPMN8,"%HQ%ZXEMM[+O+,_QYLKQG+G3H.$-KIM4>,3:2IK!Q_. -M8!5XB*5C=KVS`G`*1DH6B&^>(F -M4M#.L-Y*[FAC!'.5O5-0Y'5+L&.TC[0X<]7H-]&&A+]_5&FO[CR5C!HLA*!I -M-N?KQB@_ES9Y78I8WGM-J-EU3N*3]LWHM][SAH<]F!9W8XQNX)^4AMN6K-%[ -M4ON#XJ!;-F8SD]-3D3BM*@A%F'1YW!*02JW+X'-N(M49N*+A&L:PM:X"IZ:X -MX%]2V-`7'JCG&R+/=F>..D&:WZ89_M\'TTVFEU'-[3%E->6;XU-K,J!J!NS5 -ME!DX*%I1;WLOI3R*(LV_-\LB=C"`L#"`8K0NN>E)CGYASQNCXGW8@<\UM?BH -MP1)^QL/<,Z7]'=^-G]N?Y[/I6*'+H; -MMZ[X#U=X_=3"!O0ZQ7^3&[=&/I]5`!OIRP16/M1@.WYHES'A;!X:KIAW6PL+ -MW]SO..`/Y1AVBL389V6:]C0X1`:J%JWKEE&)CM:W=&P^7_'F[<05#O^S -M?"[^DGR^(FB!35P"CWLAM_(OZLQ6TFDM&W6F9EAP`^5N&3%:7946I%#_`5PJ -MY]\PP-VD6VSZAY'YD1+M<+_2^#$':4.F_/J!H?KML?!T#H8:`X$30]SDW@#! -MA+>"*3H:+@FBN(\#:,30Y[I3NR67I->C!*J1K0U;EWUT0=*:_GQ_G@KA;ZK_ -ML,IM7E=E>]#K-_D-D+3#51HABC0+5:+M-FDNZ$6MC\K_-VBI_0-<=LS"TM18 -M?UNTT[]$K4]TGB&R%"X\TV(0Y&!GRR<\=]('37I$V%`3'U.X('US+_^C>;M* -MNTC##KS-6,_SX0\3EA;V:E#B'!@^'N%OZP#\#UA5J5YDFX^+8&$K:A^4_U*M -MR0/-Z<28[[754/#JC@V;KG5)PC.1*Z -MP:@%I]/86BI*FA>+WJ`K6PG;'XZ[0_LD`=_#K?^"/WU0/H3O@'#-:,H*>@!^ -M[L#P"MAE:UF1N?)Q3B7IU;'5,JP/^CQ2EF<'H<\L7.B?=7D\0@?3OQPILT(E -MJ%M46O3_[1"_9OAB:PFR=`T9VB]$1\F"J`AZD>0W=,)@M%:5$''FBN/')CXI -M-3[_F@Y]=9Q`&R\^\-CG#]\@U,!19S0UCA:C`;S6LDKJC,LZ^.]D1#C`.SSE -M4S(23!(R];LJ9)=+[O'3/=]Q5+[E3UQXG<_#U6MWAH5\N(&.+2U/FXP"F8N2 -MK>"I-YY@"WS)PP.:L_PS^C"@3AVU3>%^NS.T2[M158(_O/'8RI*%X)W(?O-% -M311H2/&>0/!Y;UN.#RKN]=ZB0+"P%/1G-05OX=:;)NVE",$PY0PX)4D9R@'6 -M\XZ!05/A)9P/O%2XT*7>7JWVF:7`TCT!S3`\T=Y5N`+,Q_$T*,Z4[Z_2+72M -M-@-?J[\M:QFH^^0\/M[VB`[>X-*X/L[^/-+.6H+H?#G&X)H;RHJ#>_SQ[XA^ -MK9(GBR+039BE)9<"V]0=+U\$E5M.B0.3M=Q;'[ORRDF\SI"+TDN>_;Z6!Y+- -M/2F2,AM/SW'>+CK`B4^R:N6!.RCK8C2N1V3*D7>?CBX6(VG!.OXP'A,].!"\ -M*T[,VG*-W1W%N_VK,+'\3"7H-@:PZ`)K9&4\48PJXP+7KQODI]3["<$1J&\X -M:K>TN#/K"W3J7BQ&K450P!+G>#0G+2>]%[0B#U)>WR$BE/:8"]"LJ6OX_.XJ -M9#9X]O'%4@]ICX+*/,6M_S'*2,GFTUG8\9(##ML9Q3L'^ -MOOZ`)`8O_>@X$^L-<:F^]HQ?S(-W=XT0N]MDQ)+<9@E77VB[ZNR"07W@X44D -MI+P"8_)CPA$`EV"&R=]K/G`!%%:BBE^*N);6US>=77`)/46)(*Y_'[A%[T$ -M223UUM4?$JX"^C0A_#T;U,@!:W11GF-MM76UAV!`L\RB(@];9_DTVACSQ%#9 -M>U;ZX9_<#^SP#^(B0A)S+,)%39;7SV6Z=V>";*47CN?AR?82O$-%9IV"J]A$ -MZK7ZZJ2')\.;J`?!,6*RQ316:^O[?H_1_K?W2D0A?5LL=P'B("*OI$H_7#EG -M@]+_RR:%0_G?C:_4A(O!]C^[;3&EQFPOJAXENW)3PY45$,<2!\_/`&DT5\;* -M5G]\KX49P-6[S8+;VM)K1E&AAW2-_/$!D5(?D: -MW7'R*S1Y_D$-!;..@[3OW:KCMO$`M',%>X^O]1\OO^R7BRWTA^JB0_I"0YF& -MS1HNFC.;F$_Z_4B*0Z6K\3CG1G/Q@^N?)0\03)L)Y]EI,^!\_;D1_7+;&R.N -M,CN%F^-@L1HLY/Y;,W?X`&T272NQ9*^.J:3Z0G,/@K;B8.P&P_R[]1G6S]CX -M2L/HC6Y/<0HP&P%;BWN""6_G7R_YZG#1@.!>O4<]YD3E&Q9S'3J_VSUYLMMJ -M)#"BRIEWN&RV<[\74L9G:K.'`-*0.Q(]'\Y#VX'R39&@]8UFG%W,+Z:<"[C; -M'5_6,8YLT!/;2$QE-F_N0AC2ARARL%S-E+:J'*MJ(@Z<'#A77>TPE)33FR=9 -M=^=C964X[T`Z_RD[!_1P/0AOD'21@/8W94&:.U4'=&3F:0J]*3I_SWX7)'[# -MY!^J*V_J"_@\9H4;UU9PO99[92.#K[VF`YM8)XV%SY4V]:(73M)T@TES\PY' -M\@K:T^"6FJ9NIP5M8X&@.?@=@P@#UL:!?3),=!RZ>]^AH24S8&P20?Z[6+^_ -M-%3_Y[FP4]^#F-*:D*O9N.\20490'$F29KM9G$D%\EWIOQ#.M;DN)5"C -M^B`$#L\O.M"BI0.*^S9YC!:;4+SC;<:*/D(,Y'^3#.%/_FNWV@+T8V/*:9`0 -MJ?IXO>WQBX5/_`R"D367BP-&<&_I+9(,36'BG9H_?+"^^R@#"XZ[X.$(>`W& -M0TP$IY:$V.UZ<^:'F+=\HU$Q>9F9+*YVQP.WEK_+] -M"]:0J/F08O&5=^G0V4U=Q_O?30?Z`IJ^&_-@5:/S-6S539%E8O)AC=6&3.%- -M_]3XWCYWT]-Q_!"`5O`6#N^@;`F^L^Z;4$,)TLV6Y.ET.]X@-1I&7\XN/YM& -M@(/V$#;G<&R(TI3A-VKE`+<..U.X -M)T:O(R.#*?@T7H3MCFR*&I,+1!DA*7R?/@^I&"Z;W;1+40NEBN/'MSRAIT%; -M$4*`AQ_]VO!:#Q.&!W"GI'3^8^`_=W;;4A;:F&5#@#.^U)>I8-"PW4:!MYZ* -M-@Y"@-V8K+2_O#Q*,;%@EEJW.@8[4@L&.JG)TXQXM;H -M,>1>^8/I7(L0O%F;W7U)P2?"@048V.YLJU>ZA:6`I:-+XRJ?`W -MJY9=,+.+A38T'W)/@2JH#Q4:[X#Q";_%(!2;6UAY`Z!,KG&`F97!7#CAV"&/ -MZF0VIS-N&GZ?S7=H:*8*[C36JHB%)WM!8#69@\4_W5&#@$K_`*;!S'4!;\1I -M;X1>W+;":.%.S_7(O;M\3:JW2V!\JC@D7O^-W\$?!BCXV&G(LJQSWO.-O/`< -ML*LZV?.B)$.TFFW#&9,&4ZW.J`)1\5=4<5-(/'7-OKE07O^UW6R9T;[C2(`8 -M_J$=P&V67*1``XZ>Y"MCS59"D#O9-)'JHB*TOSZ,E0!,C$1S$M6QXD_N@IG_H>A.)7 -M0QKP11RIQGGA9L\+_B^$%R\&ZW4/MTILWR$$?3.3(\8A&Y3B(D1TN+PN81*N -M'&3[+BSQ#07,&X\T"&L-.;^($Y;Z,V-7^=X0S[;`476`$E08QU.%(<2!(6SD -M:9(TOC4Z#/R/[1NB5`'/P^(V7ZM-!]."(B'-#O)N;`;ES.;8Y -M"<,`;JW06_'T!ZI(O5#;%IHR[/ISOMJB&F=30HUG'H6T`-6XK(J"_H>&#"43 -MW18#G5=TJ"\[\3XAWUOF7)#[4,=%G^)GR+N=MD6M)I$-R0G,%LN;!`-=Z,^U6=X$:'-?R*D80&O,`7])GB$#?8C -M-,K4"5"Y\I@4@9,]JS8S]$"67+-,]%^M_1`2PR(S9O/._)_`I31J -M[VN((A>8+I5TR"O@P`Q6&AAF,(!6`KMGU:*&07I90U!:[(AG:J3W9#@=;J'K -MY?JO#%0!`5.ZOO)VO+T(Q$X$X=P63&=-Q<^0'S:F*?C_ZYT`7>ORN[/C65I$ -M^*\0;%_H(RA`#)7]X[\H0#%KDA*'7\X\)8_#(FAH5\QB4M/YW7QH4,@:?S^EZ[_SI$#5A/,R?;_2]7I0#\9)#5 -M2/?45*?-[;XGCL@0`$-IUN+NXK_=,I$`$WJY!S"8^1;/Y\@2<.WS>^,J[I1'UT1W8G];+J"`$'Y9>L/[3 -M"2?MF_[V-H8>`)4X%5OW2ET&[2>'^?=:.W)UC"VY-$1$C5M%R^!7X7D]5KZ; -M7C/MK&]]6I`@BMS")#GF_/UY#W+R1$"&U1_3LMQA:JN -MVRLLTT3W'S-(0"GOFD[_48TU>OJ\86EGB!BXGM?;<22F`00=MWO.9Y8EPYS' -MR6B4VU9RW2!1T=4!!GIOPD/*]MT[-=W,S'DX1$[32"TX+I):?''N/D`I/IM' -M4OBO@J$>9X2@^`-HD<_V2GNMVOYN#7DD/$Y>ADA;'?[BO4P!W*N*CHVV>W+\ -M9Q84@"C5^1-0&SEE[#`97J331$WN<>*2Q/D!^#\+&.UU<<<`"6G]6]3'FJ^G -M92&9E=;K50=H?!!.3=$G6*J\]@X<7B*0!,-/C125LA;!O[9$%/*D&T>2@`1[?E_6BXQA<='_(;Y>7#JGTJ8`9(T["8PF>E%_ -ME6^"4.OQOY.HR!>=P@2W@[ZM7YA-QSAGQED0(+ZL*M=+4!*WPFN3_9<^"&IW -M?VY3P6\H-XPM4FFU.1K5K[A[$IQ&? -M4[C]X^*D/,671D`)/LW;,Z2(T[*F\1[NXN%0`$OW'2U?8`B&G&77Z>XBO(T; -MIP3I$'-5B/L/=U#&XMBPY0SBDD`N=R[07^H+BZ-@=&C -ME)`*>1:EL0:3C9@(Y,245D=UZC&WX,-)A`!OL2NPA -M=U9HR!)=)XERANOX4R`;(G\IO,1$0;E -M#I3)2^`/W+)&X;9'QLR(`!\SNI[]:!W:.O>N'$L:=K1DHR!62?0_FNE?;76W -M5W:)AFO\4R+W5N7TV07)UA_`_"UL(-$`%WSVXC9^<ZD_O-)1$6O^4M.4Y"S'+V.I<;/6'P%.R\!3FZBN -M'O,K*'CX(8RSB=6NNM^"TE9`-^`J\@);/\T1`:A\@DKJ -MMX"5DZ5($U#F\/HH"*1EG6G)H8H=LF"_`ANFJWT]"339WT)`<7YR+V!A_O:7COO> -MQ.ZO,>;EOJ2`73]8%-ON2*W]T!X",9R*)=+]=CWYU<8FOC;*PLJ9+(A0<`%C -M';J6GLB=4,ZU]5$17%S@>SME_81ZY.3H(D^!.O`"]E]Q -MS^<.YZB^7N5:`X7'?K3T1Y`7_S>W)P\A""&KN&H\-W-G``!B-W9LDY[',0*7 -MXWP\Y[ZP+;TZM$TWTPF86+23"ROSX&< -MQL'G[;HY7B2R$%/]T$P;O/PWCKZ3;/G7LZ[\K*41!O;VHKGDJ_$B-68=..Y\ -M`17>(35W$KZ)1OCY%#3X$91/KA1#'>IR-_)"0&+I'1=-/(2<]N6[29K#I4!$ -M_VQ%Z*C`Y]6:];]D,"O`I`!PW\%YOX$X]3Z3VW-XI@LTZ^A/)C6B!-SR!?>IK$\GH`>!YU:_G^[U^).")MO_$0;<7L+$\*:%.^U$1?80>5H]SP -MH30D,]RUB)?DL`#\=6D()@LHJY]S.P'P2Y<2P']T]3T4:/JGR"UU,@G@@\=+ -M0O`E)A?Z:TA&GC@@WBA6,&X/`KN^NV0@*599L!]YSO)<;@IC:<7,JE$!_,EJ -M`C!0Z5OMOF,2ML&A@41$VZ>YK`,+,<6VF]4C/D2GS>Q)$$<7OVR\.B]F,]NP -M0J1*+?#9LBR=1)QVL71]4"-)(IL`4+.=%A"OVM^CM2#:;;'A,J#;&F$1+V+O -M`%BI;**:12N[VO%:Z5((@QQ$@25,M;D-_)GB&Y5/F14?\V7B_[;0:B@`?,Y2 -M$5_]MPU?N#$1UU3!$(C(M%U;DAB/Y5_YGL=LSH`7$L%?T`6NC0C[N'A?7*&0 -MD"_G6!?!\CY[,H]YQXK/2QD<]YT@`?2& -MC%7R$)5.#(;#':[*O(O2S_6!YCFLGP/3X2`3+T9A9ZG6C,NUT"(A[D\^"QTO -MZ^AL>DEZ=(EM/*+DL%1G9<1WF.D,"\<7KR-5-2XC5;PT!]JF" -M#UF91M0-]]8`AN+`OF5IBLRVA<=>4]UTI%?=AGG""_<=#19D,)+/T0$!F'2S -M(9J,WF.FD>=P6!4X*,B\^.TO@(\YD#SD@`9_G@#ZJ/L6!B)[#D4CZJI"+>@!PXK>5-1R%,%[J.C -M(@DX%)%]!C?*VB4P+_;8&^(J;`8H,W"3CC-:(A%9"80+R@"OEA5",&HL?,?7!KS01D4[R@KS)`#K*,/Q,M>"5DJ(9=$"VA`+75HX9);&Q/1!0?D9!DF=41,JW]1WJCH -M,0/D/ART_6D,OO_'^^M!8[9(`*LBZ2![=N^?EQ3H"%A1,#\`557[T6^2=M,V -M)FO6T8"9>)FM($_92'&Q@?#ZIGO+HFV5^207VA#'Q\K2(-UV\/7`"[U%.QGW -MD1D^D@L5>`N?K\MJ3@M.?Z"9NE'GWXZ"B5D@57]J39)"JX;MHQ_2[FX&7:/( -MZ,B<"''G)T`,5W7%G7=P23Y(LGU"'1U?2'!T,YD2;T`(37A9I'^IW5(AU]9J -M[+2\#*=#Q(2%CE)@$/=R/Q!B5\"*50$HU7GE.^^D0F$(AL\6E:X0$ -MQ=_M83[A&7=\MMQB+(72,(T>YZQ\OB[\=M?P0]%UYUZ8Q.^/W:GO39"FEB)P -M1\S0+W1K]!CT),'6UR20%#&CNO24EI3OCWFX1@KV*(A4V6EKEP920LI%,C`Y -M'6@EEKY1$&#=;FO5;T;F-9HVY/)")6\DO3S0!?/RZO:IZKF=]PU4,C%++$!. -M>!IA'K8\Q$C,0D6[\4H"&P2,8?*DUH57*'54 -M8"Z9_2'37'/[0RX\3:`@XUW*?B!8_2I?VH8:HE76#3IY(%S.]($2P]=G^N_L -MAFC,I$+C"A/>^0$XBEK^U\7Z$`Y<0\W--KIV;`!P%VIW5B#70XH!8O!:+=Q"BFS.;<*U -M>N4T@E`%NJ_>2Q`FY+&EWE'G)%+=*9$!5.1`-3_<_7&C?QF1YTX/9 -M(#+SV6'HZDHD+R`ONS@M/H/'-R$EESXY+HJ`F#.OBQ#Y2?#TE4R';(MEFOL6 -M6","$N_U-%=$0_JTL+% -MQ."K+3NKY7&"0%G?*G_EV?2`W4-\HDJEJQ$*D!3L1`+"U/8F%3/?81!@4:ST -MVY$&&HLNFO)]AH]!91%J*A,`)>`,0)96L"M3OQR>L9:"'"=3I4P`N&0B!]4K -MN!/0DP@R\,>4R&BLR!2'3W.X2LZ'CYCAOI$*R`/J=XO(9I1>T/L]O1:QJ6($ -M!3:!D\(M=7G&R/;)::;4P:-6Z8.B(DBT^K/SDU[J:P`N503,`J5.4].I[Z(./"X?*S^K!%">>`:5F[[4A>1%E]1X+D@+/^?,'_.8\2$.U -MOE,%`(9D@!8S]XO7S"U.1IX=^+1CR->#];K^:A=IIF>.EDU7RT\/AHB`JWRHS6Q#^:243'3F_ -M(AG9*`W5/L$QXC'0;3BG2#>1)C(R/#9H4&10%C)/1D1;#<^N8-P5TIB80#S4 -MS3UB(O1%^-ZFK+/UVVW$L:!`.L5);#2]JH];,FP8E*XJ`18[2J?OU>9//>>A -M49:?*\:BE\H")IH'SHQ50P#:QH4POC=G`+_KO018+U=]G@IMT8/S&I*8$AM6 -MGNWC.`34J\+R*F@,J-4>A&1B7.D@*]:(`0@B'!1HDS@'C2:WKJNC"EJP1:O> -M]Q,V-OVT0S*NG(R$'2>?H]?]%L$!SV;C+ZJDRSY'_UFHUNAE0F9L,1$$/1@E -M.`VORJ]R8,'C?VX,>-#"F`OEZ:.]TMVO*Z5]+>B-,=LX1,!!_8W=WQ^A_NW2 -MU$]I<80'?F$?$T:TQ<-`7?_J>Z[KURF99P`.KXYJ2I[?7'X+[_/R.WORQ$3( -MEV;"IG=`U0"QHCJUEUHP3H2CI%@RFV5L]!.[""+>TSWP,+L5@5^0QHYKD@`);D%:,NF9"A%(V1LK_TIM+)7S",$083.2HU,IAAFT'XT4$ -M?KD3U7')$I1"I._]\#P!!78-ZZX%HIIC4@)GI="3J]'-G"($!/F";"$X;)_"2&TDDA)\#BWJV=LP`]FAV799YS"0\=-?CU[U[ -M]/CISW_1L5^$A`#N#].H2;S%@=VHZ>RV_5"=L-6G!$*Q=R5^L65DQ&(P(P&2:S4C7` -MI8:*T>=/$0=6%U>^QJ]19]OB[<$K&%()RS

-M2X_PW\A4?`_T,KO6V2"`&K3MT,)!CK(Q.$F)Q>PD._D?Y*B^4D*2DD`6%-K8_P_JX2!'5M`WMGAS"KQWJHOF+*UVOQ:T[Y9-3P0*:WWIXLJ?C- -MUZV=DJTK6B``2W7?Q^C,9G.S@>+J0P=!_WD]A`#3_>Y.LY!9N]=.H@! -M5<3DW_A4"O%8FJ8(JMD+#XY#2LZ&2YJ4@!!8^J9Q;X_04\]2WO:]/KHT8(N#N? -M.RP'[7_8W^LB&QHZJGJ<0EMX$D^/^9T'!QBWAHT1$+>ZL+"U4V0E\.+S$-7& -M?.E_'!DT,GI3P(DFW0K0NYLF4^AB>9#5?NG)A+!%U^U&1$P=C,+:I:Z(R=?"9MF:$RKNC2@@'_$L?IRA.PM&PI@"V4DW;=.NQE$!G*O0 -M<2FBEN>ST^PK:4`G?N8HG(2#9=4[9NBPU,@75J,&4W(#B$5)7,">)F//)?JD -M(AAW?&JOS\C;2`8+C-,ECG&;S4V'-F2`BPY76`6C*^TZ<3!ICXBW8Q+(R(IJ -MPD=_V;-<]R\W$)-FF7_LY%TD10_/HQ$.J)0(EAUOI;$\Z-U/"3#'J)?$)`D@ -MT\)L()ABS_02AY,@?!#2]]K`&)V-5J5[<\[M]U\$4M_NV6/ZE)Y$6/%P&&)" -M@##\T3#,]>TX^FMTL@4^0$9,B46EIO_7PTT?JDP$5D\SBBVD6P38:VFJ"(9> -MFWL4HA?5`(4HB`C77YOO')]QKNZYYI^/"QJ>B(%>Q4-LY?.D'#;^-D.`AO\Z -MRP:C/<+\M"$$70[\XF(*$95EYG<%2A1GP0B/7`R#]N4>DDNA506P\X(M\*3B -MYPB@%N)A+!NKIQ7;$^,XIB`^[6,,>0'(WC733>(+6T3*<5RPD$`Q[ZGZQ%$R -MK>_NCIQV9E4NK]JWP)0!6HSR:0_@Y;)SFUH?^7TF^51@A083IZWJJ'*;HWE[ -M!B3-9KT$IQ=$D`$VR-[!;XBS"*"^;+RLFF!H0@#Q6<6D..:(%V[6?%W$:[E: -MW1;9L;^3PJK7V5/0H2U_DO1=@J$OY%>3:5662$!$.'F[;RI9 -M"GX^Q74GI[))>;981@$CSTG`D#;II8WJ2D_P9URN*!((B=OJ<[I%%/N23OH] -M,.9U_'>;^(20![J&#(A5/G*P8MXF7!FZ+CJFH1P7?K$)I$*S-9JV#BFLC)JW -M?,)92?8D\_[=:E``13__IP%L$]^JMVD*JLCH@_%VK58MEKU\E-(`:KZ10`? -M%J[A`OY&P2@0ZF.Z8`A5S7YA.I5[$)0]#8KPJ2`%&7(N_@Y[!`:/8C^SL -M7UN+$XNDTE6R5"40'77+[7T9"S7[+0O]A0LS,XL28`%+NXOFS/%6`JZC?-]M -MM.AUDM2>%,!;B?!+":PA6=>AIF!SS4LBL_CJT)$XYC7R'FL>]VVNNK_O[)I$ -M*F?/_ZR$!E\D.K!KH5LHV)LD:SUT]/4KLCG"(N7\G^9($?A?^_KWHR_G_Y\; -M4[1.VL/[3@0U4S%LY$)Z,P`ZZG4U%#5?#"1D7S[WW[9%XNB_<=]O]3PNVG64 -MDGI((2KQ#XC[B71.G5+,;_A\3XW:(`#X)-!4:M>(N\XL;V]*4&H[/M9*)%92 -MM7FVB:``R3`!2HD$A^&FX*?Q3O$<61]KDD@BHU4!>R?]8Z^?][&\>5$"'8B- -M-)D`Z2./Q[,EG+YQE=6>W`'Y3P0P1C -MP;\VHB%?D)99.NY(&`&/>9NBD%\4BHID!;K7NR"&3LY+AOU0_;[1J -MVX;__9AP3@ABJ4B`$WG;6*"X79OW62Q*;A)B`P5+H31`?$7O5G7UG-#JS-=Y -M]+3[M4(#SNW(GM*1"3'.T>SU\0C)U2E7AA_7T%Y(^M(!#@-W]D0I:`SS,V"W -M=J02^2-RUZ-"1"N7[T`2O/2K%7?^0W]M,9!2Z^8]\FF`$R9ER4D/:(=^]8 -MN/4)\\G>JG9PC(!IK`_=?&[B:NG*;0$`P_CQ+$:0&42BW*HF4$JW-L+N)K6I -M(*XFZOP@3@T]+P`-/@T&,KZK7``L\OLPB>Z0SFL -M9T+85;%-("3U;S5$6WE_,-,FUW?8,V\)O-MTD`?09,@DP&)E(_HU9\"C=MKP -MB(;[,X#:Y=-S"O=6'1:%I88?3!)I`>F@[)`<&6/G#O>:^>Y&0ZR30R!$ -M(/Z]I?I+A6C$(++YCND`G\G1-QW2Z3N>WP -MDB!?R#!.&Y^9%VG.LA+W^89(0'[/I$4P\>F$D-S0^X0]OG]:.]2<"4 -MJP@)^C^ML,>]8_QX:PB+4;/9^0$&.$_#_Y_BT?7=+#+E?8.3AY]"FD`X8Z:(0F-E -M$Z2S"6DZEPH2`#8@O(FHYW?+_X6UWA?QB)0!B(9C:$1Z\"I9RD'']_5,-=7# -MG7T>ED0JZF;N_NUT><`%6I9Y^<6]`G]Z;T",`;JTL:4@/WRF7DC8\^)RW;DD -M0'X3N>"&^?&5N&_2\\\]])<497ZK'=4B*][<)H;]8E;L;)9V,ZN[+?)8&]6: -M,A%#:O^@VN#*.OB6Z%&1>AZ:@`)SVIC6F]QG=]FH#(]"SGZK=*.^3@3]KI/T -MN<`1#G?\S=B^5J!^J8Y=1C8U$,1$E?#Y?N6]29WZ.CAD$I$V]T@*+N?]9 -MEBHVFE$`&YR1%RT&CE+E:VNC^2$BQZ\1#NOFKV4$_I?CY(Z.\%#FTR'ME4`) -M*7*^8`-I.])!NZ*3'*3^!/J\%,0&E@"`NZE-9P.'=8?0J=ED:FQH)-Y64XB' -M<]OV[G7_3R"*.0Q+=UZ=5XO#9.%RUBCLXGDP`P_0H`$8""BP8R\=N5BNYRD@ -MN[2I``[T``5GK,GSKOPI_QC,>Y+(03KWXQK(#.B8\.&F0U.MIT]#XT -M<2BB9=,!"+Y5!X&7;`%LCKDM>2'S6K<%WO(P1^2'FWM6N(0.1GY'^RI`>;"]N+7P4@9XL172P.,X -M$0ZW98YYBB=#JM+/61X.>C[2<0%B`5(W5>C$!WT9CXW+1N=EWW163@O4WVH` -M'<43H?//N?_:2-6`GKQ`[U2CDX%#V,URIF:(AYQ]]:T*W12,,;1HP.MJ7D@3 -M(E^;+3JHF[$.E<)?;N/TL^IPX/5^5:(%(,?BH0!P4=YH>OG-UU--,)9!G]*; -M3P4(1!0QZ;)L^D'U$H*,DS'0&74[G>@%NH7&Y%.BV1QUVG&])T@Y*3Z/Q!"N -MJ0>.N4BQ;VRE:),!6K6"%VOX1FZM/!?I2]UECP,^;SE`F$!.PVY\6.%!9@O' *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Wed Feb 8 09: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 CC7F0CD5102; Wed, 8 Feb 2017 09:53:00 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x244.google.com (mail-pg0-x244.google.com [IPv6:2607:f8b0:400e:c05::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 98DB41762; Wed, 8 Feb 2017 09:53:00 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x244.google.com with SMTP id v184so14755234pgv.1; Wed, 08 Feb 2017 01:53:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=kHqxtcO847xW+nk1XzTowkQZw1FT0CiCbUZAp32u7s0=; b=WoEVJsSZM2TW5TMFYUr2oAp8cwnzxWrMlBjkJOnwjOny1ibng1ZSwTZ6lqVZ2wAuI3 qki+Foy6aJgmhr2b+THJZro/zgyjD/dj6VwXelONbKIjqINJNYek1rE4tB2V9mF9bxzJ wrSFQCZV7fm2LcmVj3XgEp144d/nNAlhk/HbnZmsED+cqQYzZCeeNf3+TqP0WR/qUHH5 RVjJJ/2M0iK9MWar6dU6K4u6+i7txm69qgFsQvf3hOoM0aVG9mpf1+PdxpbeDh/VKDy5 yOVAUNWnwcpBre1kMaf4uQ2xX9VMs+6NRTsoClQQntXHKVzH9327IMPCMOYhl0osKe8G 1jGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=kHqxtcO847xW+nk1XzTowkQZw1FT0CiCbUZAp32u7s0=; b=IwbRBRbKkrcxLoq/4K7nEhe5Jy8cXwpK926j6OBk1lUB9+yvOizY++mDaDNKXXQlT1 DfGB462PX6956weRfAS7RhbvZDVz9RhapmjRG5Q04vPdi4KjDTyldzRVPhQXDTlwxNg8 A9ZU7g2f2bIjo9vt8oG3oop6wbk/ASB+NNwDUMucfGtyC/VwWrCkyrldXHcv/RdXmKnU Hif5CMGl8nSFbMp/z9v/3ygVBLWUbmy/t2NSWMXS44BBdDReobVV8Y34lBQ39LuQ5ixW JTM8eW7+sfy9iRfdO8XWYRcS/3FYrrWyRajK/IQ65Zf9J4nWK84OT9QuU8BaoVZzpn7s rWyg== X-Gm-Message-State: AIkVDXKPX788FU+DE4AhkJLRpRPFNCLSzx6fGSVpCBI4wfIf1s0/JM7RCEFdrIDk4Lxuaw== X-Received: by 10.84.225.20 with SMTP id t20mr32977341plj.154.1486547580076; Wed, 08 Feb 2017 01:53:00 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id u24sm18585151pfi.25.2017.02.08.01.52.59 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Feb 2017 01:52:59 -0800 (PST) Subject: Re: svn commit: r313437 - head/lib/libutil Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_9876E442-C670-4379-A654-6A495960BE21"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Wed, 8 Feb 2017 01:52:58 -0800 Cc: Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <779F34BC-816D-48E4-90B6-8DD3FCE401A4@gmail.com> References: <201702080922.v189MaUf075951@repo.freebsd.org> To: Sergey Kandaurov X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-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: Wed, 08 Feb 2017 09:53:00 -0000 --Apple-Mail=_9876E442-C670-4379-A654-6A495960BE21 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Feb 8, 2017, at 01:38, Sergey Kandaurov wrote: >=20 > On 8 February 2017 at 12:22, Ngie Cooper wrote: > Author: ngie > Date: Wed Feb 8 09:22:35 2017 > New Revision: 313437 > URL: https://svnweb.freebsd.org/changeset/base/313437 >=20 > Log: > Create link from hexdump(3) to sbuf_hexdump(9) as the manpage = describes > sbuf_hexdump(9)'s behavior >=20 > MFC after: 3 weeks > Sponsored by: Dell EMC Isilon >=20 > Modified: > head/lib/libutil/Makefile >=20 > Modified: head/lib/libutil/Makefile > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/lib/libutil/Makefile Wed Feb 8 09:19:49 2017 = (r313436) > +++ head/lib/libutil/Makefile Wed Feb 8 09:22:35 2017 = (r313437) > @@ -35,6 +35,7 @@ MAN+=3D expand_number.3 flopen.3 fparseln. > property.3 pty.3 quotafile.3 realhostname.3 realhostname_sa.3 = \ > _secure_path.3 trimdomain.3 uucplock.3 pw_util.3 > MAN+=3D login.conf.5 > +MLINKS+=3Dhexdump.3 sbuf_hexdump.9 >=20 > This looks odd imho also that sbuf_hexdump(3) is part of libsbuf. > Note also hexdump(3) taht's essential copy of hexdump(9). > If go this duplicating route why not copy sbuf_hexdump description as = well. >=20 > I like more how that's done with sbuf(9) that's the only man page, = ymmv. Ack. The implementation is spread between iexdump(3) and sbuf(9), but = probably should just be in sbuf(9). I=E2=80=99ll look at cleaning this = up further after I talk with scottl@ a bit more. Thanks! -Ngie --Apple-Mail=_9876E442-C670-4379-A654-6A495960BE21 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYmup6AAoJEPWDqSZpMIYV/u0QAMTpUlg+dub5Kxse90a5cakw cUBxwitGcKP7kGjvHbJLdjdBlxcqNynXnb+olNL8XUmfJu4WCeFvRg4Rwj8LqsIF AzKapSakVY0BVvFBCiEx45AUNlLLydXtHxDxZVKDJJVqAfkmmbekH3TD/RX2WI8w RLYdDuqs42FW8SDLK8JrGgaOH0iqM45/AXN9RLGMnakGZnZJ3mhwTnLTK+97dwCb A+Xk1t7M9ZG+vsgelmKC4dvkMv8o4Z3PoBJT5tykxhz+uAqy1LEbf55QtPHt8sLA dzb3A+UoXnl81GQaNc2A2bOA66uXPEFIEWGT09c4ex44D0DmLoC0QqRbwc0VIHuw qDnCwEUEiCVbJJor+kZOh57N9fOaFZq3n8gYR2oUkR2bDa97Dmc35r+PKd55uSfo ZVkFFpQgJ2khh6MkYWweFRzP/mZSOaFLgwf79BsPiK+v2WJUVynlJnZcFl1NGyfG /sbcFVnaDrz2/jQvuUUtKwAquJdbXTYC0y1dk13nlEM6DIS4AGpEcZyWdY+XjXWK 8mAun5oaZHd2/N6OKd8OSI5m8V66F00rWSy+eXyBcKL/K7FYW10DwASJ9V/tNYuR mXDxRaTWeDhneKg9SkP5nKtCsc6C8Ei9Jh3uVvq+xjlp6+RNrOiQ77u28LdrAr46 KW3GLGMrKPDADXsrFWbM =pcE5 -----END PGP SIGNATURE----- --Apple-Mail=_9876E442-C670-4379-A654-6A495960BE21-- From owner-svn-src-head@freebsd.org Wed Feb 8 09:56: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 7A168CD51B4; Wed, 8 Feb 2017 09:56:06 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x243.google.com (mail-pg0-x243.google.com [IPv6:2607:f8b0:400e:c05::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4062819DD; Wed, 8 Feb 2017 09:56:06 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x243.google.com with SMTP id 75so14770721pgf.3; Wed, 08 Feb 2017 01:56:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=7sjWRORumHE27US5H/l17IhWRt7y0bf8JFbTcHFVlAI=; b=MM6zaBAbMnhabzSO1n1jt6X3C92GylJ025JY842o0m7cYHSoljTPnsfRkaC/vBsNKd NJ/JWwDTWd2ln0GPEEWBUEBQhAayQ/Qc3GBn2OqtwTt3vYnWYa8ceTi4eJqPVkdsR3lp RydP4pxpeP47c98AIf4snVEl3XRtYUCcMAJaNhLnSKjQDGrHyYZYqZ62VNkzECOtFeUV c2eZzVeuRlNfTczrqSQTl4nT7QdQPBf1limtnqxIdqOZNzwjuTt6G8RnNeJabffab3Gn uAQ76CcpnI6c6B/EGDsDYlILZre/yNjUiG/TH+2XpJfu6jP84v5At6sdt+qTDe2dOVuI VJow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=7sjWRORumHE27US5H/l17IhWRt7y0bf8JFbTcHFVlAI=; b=gREL8Oy0Y5AGnKJ277tOduERj4/8mQeLvr1fPR6Wq+JPfZLLGZq9SfiyOqPo/8Uq/o ZGbjDvpB1HXaBAnjMJPc9ZJ7lhap7iHU69icKWLokBcjYUjFkFIk2hQ89PMgew+l24Sj sO2AxdwUx6EmKCO+u8cGdiuy0l9q2TQtuQYKFKBah/u+cEIY9GmQg9DfNCU+3aQCpLIq 1lXaqZU28AsIcnQ8wsMFGqvrgoVB4645hutNsGMcIUyCazY5X3zUQNuwaEp+yQwEWPMu 6HBwBYh4pdfoa7F+f9xV7tKNqjIvhNWqhMFqA19bQDnQkePdR5a2WmvTkGTXKpKGtEv9 RO3A== X-Gm-Message-State: AIkVDXJeSuXaPj1vD2FoIewGcQXM9lFsGKYYAa0JYvbZrlqNE96/+N6lFmlNTvXoShKAtw== X-Received: by 10.98.67.153 with SMTP id l25mr25033552pfi.91.1486547765889; Wed, 08 Feb 2017 01:56:05 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id e189sm18514591pfg.64.2017.02.08.01.56.04 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Feb 2017 01:56:05 -0800 (PST) Subject: Re: svn commit: r313437 - head/lib/libutil Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_DD168B0A-943A-4343-8EA1-570B625660C4"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <779F34BC-816D-48E4-90B6-8DD3FCE401A4@gmail.com> Date: Wed, 8 Feb 2017 01:56:04 -0800 Cc: Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201702080922.v189MaUf075951@repo.freebsd.org> <779F34BC-816D-48E4-90B6-8DD3FCE401A4@gmail.com> To: Sergey Kandaurov X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-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: Wed, 08 Feb 2017 09:56:06 -0000 --Apple-Mail=_DD168B0A-943A-4343-8EA1-570B625660C4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Feb 8, 2017, at 01:52, Ngie Cooper (yaneurabeya) = wrote: >=20 >>=20 >> On Feb 8, 2017, at 01:38, Sergey Kandaurov wrote: >>=20 >> On 8 February 2017 at 12:22, Ngie Cooper wrote: >> Author: ngie >> Date: Wed Feb 8 09:22:35 2017 >> New Revision: 313437 >> URL: https://svnweb.freebsd.org/changeset/base/313437 >>=20 >> Log: >> Create link from hexdump(3) to sbuf_hexdump(9) as the manpage = describes >> sbuf_hexdump(9)'s behavior >>=20 >> MFC after: 3 weeks >> Sponsored by: Dell EMC Isilon >>=20 >> Modified: >> head/lib/libutil/Makefile >>=20 >> Modified: head/lib/libutil/Makefile >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/lib/libutil/Makefile Wed Feb 8 09:19:49 2017 = (r313436) >> +++ head/lib/libutil/Makefile Wed Feb 8 09:22:35 2017 = (r313437) >> @@ -35,6 +35,7 @@ MAN+=3D expand_number.3 flopen.3 fparseln. >> property.3 pty.3 quotafile.3 realhostname.3 realhostname_sa.3 = \ >> _secure_path.3 trimdomain.3 uucplock.3 pw_util.3 >> MAN+=3D login.conf.5 >> +MLINKS+=3Dhexdump.3 sbuf_hexdump.9 >>=20 >> This looks odd imho also that sbuf_hexdump(3) is part of libsbuf. >> Note also hexdump(3) taht's essential copy of hexdump(9). >> If go this duplicating route why not copy sbuf_hexdump description as = well. >>=20 >> I like more how that's done with sbuf(9) that's the only man page, = ymmv. >=20 > Ack. The implementation is spread between iexdump(3) and sbuf(9), but = probably should just be in sbuf(9). =E2=80=A6 for sbuf_hexdump(9). The point behind sbuf(3) and the = separation in documentation with the kernel and user interface is a bit = curious. > I=E2=80=99ll look at cleaning this up further after I talk with = scottl@ a bit more. Thanks! -Ngie --Apple-Mail=_DD168B0A-943A-4343-8EA1-570B625660C4 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYmus0AAoJEPWDqSZpMIYVDRMQALUY3tnDel1QXeP6iT/Fjkc+ I0yhBBaRqI6RL3IuK3VczyilfswoqBj/h4kIFnCyySE0RxCKBoXAmDrvFL8gcEaT BY1awO1XpMhwwsksyxuhbWUueh2YL6i7sbgCRbClBzm4im71tEQfl+n3HwNI7U8a JGPdXIU2OlB3xSHMIx5DhWWdUuAsRnnEg6c7gR5GsSSPvoE5szap2z69BQF6xNyN Vrh69COpn3aBWJN1xh9LYwmI0b0tW4kwm8U0iOyPB/p1/Phwo8rspQBhXHsv23gu tHoKCsiicGmYFXstYYqYiTLHb/4UWuM3TVoMSUGwD2DLya3Xln/6fEB98CnqUXWq oWMPLmkxHcU6yi/clYpvbdsVHyR8q4vKeJmfZDEbklrYWA2dgYjsCXzv+33TnwFe x0QcVUEoui6XO0R/5jI/QnwBEPr7VSYMT1H7VFVC0sjiuhJtTX+0RD2VkMEV5lRZ /WHnyWd+EXe+Sq5u70TqMDx0WFRE4MP37cFdgmvLWRizWIzsXl1ujPKujSMOS0U7 sCWzliM44PW8QtYptMWccvLoecVZq0Zc9KTSvqO598mRtBv5CG4z7RfQ/vH+6V/n Q0r6+1/+ydjG3wI9zb3P7xqmB3XEBBG/I5ZTYX3nJso0uGmaG+ljQ60e/4MXpxUh 2xlrvtDPTy0hGlJreB6y =IgYX -----END PGP SIGNATURE----- --Apple-Mail=_DD168B0A-943A-4343-8EA1-570B625660C4-- From owner-svn-src-head@freebsd.org Wed Feb 8 12: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 C9333CD6E33; Wed, 8 Feb 2017 12:58:37 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 933501F7F; Wed, 8 Feb 2017 12:58:37 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smtp.greenhost.nl ([213.108.104.138]) by smarthost1.greenhost.nl with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1cbRpT-0006ZK-CB; Wed, 08 Feb 2017 13:58:35 +0100 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, "Stanislav Galabov" Subject: Re: svn commit: r313343 - head/sys/arm/arm References: <201702061458.v16EwOjU015633@repo.freebsd.org> Date: Wed, 08 Feb 2017 13:58:34 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Ronald Klop" Message-ID: In-Reply-To: <201702061458.v16EwOjU015633@repo.freebsd.org> User-Agent: Opera Mail/12.16 (FreeBSD) X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1 X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: / X-Spam-Score: -0.2 X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 autolearn=disabled version=3.4.0 X-Scan-Signature: 353bb18b0f14186cd389c275975c39f5 X-BeenThere: svn-src-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: Wed, 08 Feb 2017 12:58:37 -0000 Hello, Is this applicable to 11-CURRENT also? That version (sys/arm/arm/identcpu.c) has: void identify_arm_cpu(void) { u_int cpuid, reg, size, sets, ways; u_int8_t type, linesize, ctrl; int i; Regards, Ronald. On Mon, 06 Feb 2017 15:58:24 +0100, Stanislav Galabov wrote: > Author: sgalabov > Date: Mon Feb 6 14:58:24 2017 > New Revision: 313343 > URL: https://svnweb.freebsd.org/changeset/base/313343 > > Log: > sys/arm/arm/identcpu-v4.c: fix identify_arm_cpu() > identify_arm_cpu() in sys/arm/arm/identcpu-v4.c incorrectly uses a > u_int8_t variable to store the result of cpu_get_control(). > It should really use a u_int variable, the same way as done for > cpu_ident() > in the same function, as both cpuid and control registers are 32-bit.. > This issue causes users of identcpu-v4 to incorrectly report things > such as > icache status (bit 12 in cpu control register) and basically anything > defined in bits above bit 7 :-) > Reviewed by: manu > Sponsored by: Smartcom - Bulgaria AD > Differential Revision: https://reviews.freebsd.org/D9460 > > Modified: > head/sys/arm/arm/identcpu-v4.c > > Modified: head/sys/arm/arm/identcpu-v4.c > ============================================================================== > --- head/sys/arm/arm/identcpu-v4.c Mon Feb 6 14:41:34 2017 (r313342) > +++ head/sys/arm/arm/identcpu-v4.c Mon Feb 6 14:58:24 2017 (r313343) > @@ -294,8 +294,7 @@ u_int cpu_pfr(int num) > void > identify_arm_cpu(void) > { > - u_int cpuid; > - u_int8_t ctrl; > + u_int cpuid, ctrl; > int i; > ctrl = cpu_get_control(); > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@freebsd.org Wed Feb 8 12:58: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 0C7D8CD6E54; Wed, 8 Feb 2017 12:58:43 +0000 (UTC) (envelope-from onwahe@gmail.com) Received: from mail-io0-x241.google.com (mail-io0-x241.google.com [IPv6:2607:f8b0:4001:c06::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C8D6F1FA5; Wed, 8 Feb 2017 12:58:42 +0000 (UTC) (envelope-from onwahe@gmail.com) Received: by mail-io0-x241.google.com with SMTP id m98so15744440iod.2; Wed, 08 Feb 2017 04:58:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Y0Ovd0dS+Wgo2zamPXH2Sa00VqLWVPSbx6SJzm6gwws=; b=QDzBW0pYW8t/B+LoreSgAL+q7w9qnxUJ62Dsjp//azTW49cBtZ28BeE96qAIR3Ow2L /jPmMHlkj7jhjty2DaladksNgLdtsxaataqv74u5MRATbZmKtw5+CuMlzNBOXn3PXmr3 7/LgwOkYZVPTDEaAWhvMgYkG6FC4nZkbZKiVh8Ov+NbBlsnxnmmHbzFgXZHR2TUq5vtz /AjYSEB3Wpd7FelESrXSg/EaeqByuxL3h5AMKmZ2CrBoDCb6pYDMRH6lUql/H0RC4AzZ Bbg5YElcC/n7FdObPJatild7TBdFq2JBDMdhDa2iTwx/RVCTQYhhYQ8WU6QjOf4CsTc/ IeVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Y0Ovd0dS+Wgo2zamPXH2Sa00VqLWVPSbx6SJzm6gwws=; b=bmSxhpMKZsm4xFnJzFPz7+iRCcLDdziTodni6AufGtSvCbB8Pn068CxfyDZtReKOgX bwDmJNlqpkL+Kih43b/TzaFUT7d+YuE/PVzGmB4rnGf5sKyBdCtZGHkZY+Qyi9SUDh+t 9SUm8tJiilqRYFEegX3BA5rcgbgzsNrd4NCtbfslgCfUQ7f42yaFKbK+izLR0+tf2nEX 5T4lG1o0zNdR4otVDynWWz0nPknFRtgl7Q7UCoD6YF1jhzqEzKLKIN5ifd9XsCNJQ9CS gr9MZ3P+uPop2GtYzCz+1p+cumKb+LUlaZdZtcHDo5bfzqzOaPCR2YXxA9yWJaPdrA0W S9cQ== X-Gm-Message-State: AMke39kYTzapnWHRn8e2A2izxeIrhFhDPrytxFkext8hhEW9/Cu1SBGbXS7hdDYHHyf3HoIiunUcxNEvhGoEhQ== X-Received: by 10.107.152.144 with SMTP id a138mr9935068ioe.207.1486558722107; Wed, 08 Feb 2017 04:58:42 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.101.194 with HTTP; Wed, 8 Feb 2017 04:58:41 -0800 (PST) In-Reply-To: <20170207113844.2cd08852@zapp> References: <201702061308.v16D8nGC071178@repo.freebsd.org> <20170207113844.2cd08852@zapp> From: Svatopluk Kraus Date: Wed, 8 Feb 2017 13:58:41 +0100 Message-ID: Subject: Re: svn commit: r313339 - head/sys/kern To: Andrew Turner Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-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: Wed, 08 Feb 2017 12:58:43 -0000 On Tue, Feb 7, 2017 at 12:38 PM, Andrew Turner wrote: > On Tue, 7 Feb 2017 11:35:48 +0100 > Svatopluk Kraus wrote: >> Does an xref refer only to one hardware? Or two hardwares may have >> same xrefs? Why one hardware cannot be represented by one PIC in >> INTRNG even if two drivers exist for it? > > The xref is an FDT thing, in INTRNG we use it as a handle to hardware. > This changes it so each of these handles refers to hardware within one > of two spaces, the PIC space and MSI space. It may be that for FDT > these spaces are non overlapping, however with ACPI it will simplify > the code to allow us to have the same handle refer to different > controllers in different spaces. In INTRNG, the xref is not FDT thing, but general hardware identifier which is intented to be unique in a system. See intr_map_irq(device_t dev, intptr_t xref, struct intr_map_data *data). The xref should be independent on mapping data. INTRNG should know nothing about mapping data, but your change just changed that. The xref is opaque for INTRNG too. So, I do not see where is the problem to have unique xref identifiers in a system. The xref can be defined that way. So, do you have a problem with overlapping spaces or you just want to have more PICs for one xref? > >> On Mon, Feb 6, 2017 at 2:08 PM, Andrew Turner >> wrote: >> > Author: andrew >> > Date: Mon Feb 6 13:08:48 2017 >> > New Revision: 313339 >> > URL: https://svnweb.freebsd.org/changeset/base/313339 >> > >> > Log: >> > Only allow the pic type to be either a PIC or MSI type. All >> > interrupt controller drivers handle either MSI/MSI-X interrupts, or >> > regular interrupts, as such enforce this in the interrupt handling >> > framework. If a later driver was to handle both it would need to >> > create one of each. >> > >> > This will allow future changes to allow the xref space to >> > overlap, but refer to different drivers. >> > >> > Obtained from: ABT Systems Ltd >> > Sponsored by: The FreeBSD Foundation >> > X-Differential Revision: https://reviews.freebsd.org/D8616 > ... >> > @@ -822,13 +827,13 @@ intr_pic_claim_root(device_t dev, intptr >> > { >> > struct intr_pic *pic; >> > >> > - pic = pic_lookup(dev, xref); >> > + pic = pic_lookup(dev, xref, FLAG_PIC); >> > if (pic == NULL) { >> > device_printf(dev, "not registered\n"); >> > return (EINVAL); >> > } >> > >> > - KASSERT((pic->pic_flags & FLAG_PIC) != 0, >> > + KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_PIC, >> > ("%s: Found a non-PIC controller: %s", __func__, >> > device_get_name(pic->pic_dev))); >> > >> >> So, you would check that pic_lookup(dev, xref, FLAG_PIC) returns PIC >> with FLAG_PIC set? >> Really? This nonsense is in other places too. If you would like to be >> this way, check it only in pic_lookup() then! > > It's there so if someone makes a change to pic_lookup that breaks > this assumption they will be told about it. For me, it's too much. It's like calling mtx_lock() and immediately check that the mutex is locked. It's mental to check that a function really returned what was requested. Especially, when the function returns NULL in case that the request cannot be met. Should anyone check any function that it does what is announced? From owner-svn-src-head@freebsd.org Wed Feb 8 12:59: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 C437ACD6EDA; Wed, 8 Feb 2017 12:59:16 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 66EEB2BF; Wed, 8 Feb 2017 12:59:16 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by mail-wm0-x243.google.com with SMTP id v77so33012326wmv.0; Wed, 08 Feb 2017 04:59:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=bz1WoOVWLwvZyzNqOA08jkg7r/ElG9ITTwh0dYcUupQ=; b=mN3qOub9puSxSRC0wBQ/yKTZdMS6nLsWbhwAbzxv/amwa8A2X64Yf6nayE8Z7Sak06 xZ/0SfojYtD4715UMgKmq0Lu70D11Gb5S7aDokssOcPwG9d03pLtmzBBJDNiamd2FuuE 7zQYu8Cl/ubVn3XlTmkieYZplUXNudDZYpTMBwNoiWlKRLmQ3ugQrAFP2FyYGCwLDf6h lEO1MM55BSxxIlJTJDv61btICiulyt8+hgbjfId+W3lrOg9kqf2/zgAdjVB6K8GK0ZSB FLLfUGmP1p1gTnNsXDU3BFdoZCxmApNZObozJpZVboQR5iz4ooM68ifAHAAFBmCiZrHQ 7WlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=bz1WoOVWLwvZyzNqOA08jkg7r/ElG9ITTwh0dYcUupQ=; b=V9gUv3P4tftDW4mQ/ATFwBhroUYSyfmF6rZOWq8dKr9lvSILQukzAw8iyeY5EbACcl qQGxq/okLn7ZYkcVpq/qM9CWX1zVijB1+IISbZn4W6tkSjNCD4zZJLO7g2BuIVBcM3oR 4W/ooy1KryOtpe/2QP1fLW8Go9fWoVbEpq6ZcY2B+aCDuy+Gc+WuQimgk2i4lXAAa5ka tYxoYzpwgCyi2r6Q1qLefq0PYE9GfEumZMcXplf85h6r4qz9jSJO/bl6mfw5aFdNDmNq gprOrXl6efczWu2sK/RfgGrElzInB68TDA8jgylpvXUeP0WEa7L1Ny4Ln/GGadDiZyrS OS4A== X-Gm-Message-State: AIkVDXK9p1t1vtWKS2rSLQDnFiULaM7WQPiqxs51tbejEDJEIAR6ZkLewaK3qUHNaMB1bg== X-Received: by 10.223.148.230 with SMTP id 93mr19062090wrr.13.1486558753965; Wed, 08 Feb 2017 04:59:13 -0800 (PST) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id w99sm12952949wrb.5.2017.02.08.04.59.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Feb 2017 04:59:13 -0800 (PST) Sender: Baptiste Daroussin Date: Wed, 8 Feb 2017 13:59:12 +0100 From: Baptiste Daroussin To: "Ngie Cooper (yaneurabeya)" Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312926 - in head: bin/ed contrib/dma share/mk sys/amd64/amd64 sys/amd64/cloudabi64 sys/cam/ctl sys/cddl/dev/fbt/x86 sys/compat/cloudabi sys/compat/cloudabi64 sys/compat/linuxkpi/common... Message-ID: <20170208125911.sxr2gtayke3qpohr@ivaldir.etoilebsd.net> References: <201701281630.v0SGUEfW063907@repo.freebsd.org> <6F201758-8984-49A9-9F47-5E9C4F5700E4@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="bhsrxqnlhlo7s7kz" Content-Disposition: inline In-Reply-To: <6F201758-8984-49A9-9F47-5E9C4F5700E4@gmail.com> User-Agent: NeoMutt/20170128 (1.7.2) X-BeenThere: svn-src-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: Wed, 08 Feb 2017 12:59:16 -0000 --bhsrxqnlhlo7s7kz Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 08, 2017 at 12:52:20AM -0800, Ngie Cooper (yaneurabeya) wrote: >=20 > > On Jan 28, 2017, at 08:30, Baptiste Daroussin wrote: > >=20 > > Author: bapt > > Date: Sat Jan 28 16:30:14 2017 > > New Revision: 312926 > > URL: https://svnweb.freebsd.org/changeset/base/312926 > >=20 > > Log: > > Revert r312923 a better approach will be taken later > >=20 > > Modified: > > head/bin/ed/Makefile > > head/contrib/dma/mail.c > > head/share/mk/bsd.doc.mk > > head/sys/amd64/amd64/db_trace.c > > head/sys/amd64/cloudabi64/cloudabi64_sysvec.c > > head/sys/cam/ctl/ctl_ioctl.h > > head/sys/cddl/dev/fbt/x86/fbt_isa.c > > head/sys/compat/cloudabi/cloudabi_fd.c > > head/sys/compat/cloudabi64/cloudabi64_poll.c > > head/sys/compat/linuxkpi/common/include/linux/slab.h > > head/sys/contrib/dev/acpica/components/namespace/nsxfeval.c > > head/sys/contrib/dev/acpica/include/acpixf.h > > head/sys/ddb/ddb.h > > head/sys/dev/drm2/drm_agpsupport.c > > head/sys/dev/drm2/drm_bufs.c > > head/sys/dev/drm2/drm_dma.c > > head/sys/dev/drm2/drm_drv.c > > head/sys/dev/drm2/drm_os_freebsd.c > > head/sys/dev/drm2/drm_os_freebsd.h > > head/sys/dev/drm2/drm_stub.c > > head/sys/fs/nfsserver/nfs_nfsdstate.c > > head/sys/kern/kern_descrip.c > > head/sys/kern/kern_shutdown.c > > head/sys/modules/drm2/drm2/Makefile > > head/tools/build/Makefile > > head/tools/tools/locale/etc/unicode.conf > > head/usr.bin/getconf/confstr.gperf > > head/usr.bin/getconf/getconf.c > > head/usr.bin/getconf/limits.gperf > > head/usr.bin/getconf/pathconf.gperf > > head/usr.bin/getconf/progenv.gperf > > head/usr.bin/getconf/sysconf.gperf > > head/usr.sbin/nscd/nscd.c > > head/usr.sbin/nscd/nscdcli.c >=20 > I noticed that this revision and the next one are a point of issue when = running =E2=80=9Csvn merge --reintegrate ". Was "svn merge -c -=E2=80=9C us= ed? Yes the crap was I did svn merge -c -312923 then svn ci which took the reve= rt and all the temporary crap I had I reverted entirely that one later and commit "manually" the files that were supposed to be reverted initially by copying the files from before r312923 So sorry it was a total mess. Bapt --bhsrxqnlhlo7s7kz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAlibFhwACgkQY4mL3PG3 Plq2CRAAnLcs2m+voJKZNPxzeFVpUhrDwmNJGrQQ957SDIiQNSwr7gR3LB+J7GxZ hpwE7tXwvc3aCOMdrqCnO3EhOGpfoD4erwRLObbp87NnOSGXAgJaMfMu591/em68 0YcaeK/PiPH9y5QZEOKkXIpVVlBQev5/0tm3R6IE3UDkbfaWiAX2pTP0nwoBMUNP hQqEvBwTsEtm7PQlmEATjR0xAxgk37kbBthrxLxxsFYPlzocpNhVuSnKfleH3xkY I8KYt82Nl4yp+ONtKtYGVsoa+mVCa5GN5g46tfqcnXD1xMwqfzJY3KFgFu/zo8wd EVNwqG4t/q9j0KcRMNEZH0EIyjHANHSPE1MyD7Dlow+VFQDt1ly7pinksWjB8DNa k/3HawyrlXD1WkkWa5ayTSEbuEP0aIqct6SHG4qRIFlZM5MJJzCOZRCzSJOfsEzx UPaX8DHIqMLh1tOQyD7DKULwCMZosNXv03X1zn/jBmc+z+Sae88/mtvwB1nkAHNR Rh8QwZ4NTmYPbvLgbITk9EOiNxzQQzB3aOVynrlIQmjWaG6qjF/+szu/o+k+8ogV nWR5xsLlQfBzUPEdsn4PtHUMyCTGhRnbtfkIF9a6VJV0lDgmzg8umIw502HVZ9aE WyAXNlj1+WjCnIaUy0oXNjbqlaaxG+4G/+xfabiW/QUpTLxYHmI= =31x3 -----END PGP SIGNATURE----- --bhsrxqnlhlo7s7kz-- From owner-svn-src-head@freebsd.org Wed Feb 8 13:01: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 72D0BCD6F92; Wed, 8 Feb 2017 13:01:50 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 06C688BE; Wed, 8 Feb 2017 13:01:50 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: by mail-wm0-x243.google.com with SMTP id u63so33120748wmu.2; Wed, 08 Feb 2017 05:01:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:subject:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=97uQQPCZN3ZfLJ1CopBMoOgXBpIYlWWB0hgsXU8SmvA=; b=uAATg9mJWWvXdBb2wvzB2tN+C5i/+LcdKeUQHxjrw9xavaBe8KV/1CrHRDcVrKAiHN s6GN10dZmlvYq1J0a+uV0Th4g1Mef71nVw1cdP7BpZEwd9kErOhxY/HxAkw0DItE0Vm4 mWzPBNWyFh8NZXxTVU0YTozn8ulW8apFHdPZKK0o/pKIpGmsKZ1hp0WRG9zwvgNHnW1n 51TDHo11PfKEuRn2Kbtkk6Yce9CwTrnMsw+vTrd6SsAUdzITUdDsQSn+UfB/gvRn8Wrn adtQ1TbVasZTZru2YxhI0oRJX/Hui6NsJh4cqWbtv43/FMF0M/+kVEjFyi6Heclxq5Zb jHlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=97uQQPCZN3ZfLJ1CopBMoOgXBpIYlWWB0hgsXU8SmvA=; b=dJFo1JDgf0Aks94x8LSFIMTF2zJLfCTvknzzemS+xWGScdlke1CqlNQ4qtGxI4at4Z lw/0nU/HDYz1fz7IlCVfmspjMMzvlluKe0LBF3TJiXgGOYCOQV9y7auLSD1ISDwEAi+u eiWsPOinzQ3h/BvCuSBORedO8gLEIx5kh/Bly0TnNtaYi5zkTVazWqpE0cZnqtq3NSjy joVQigP5+e3r4Q2KSq6TMs1N3mneSpwl2/+d+mCPOicaZ+nXImNLEW0AkUMuIHecXri4 ZUL4LhVBS2FIbuqg3JgLYvUYZPkYAdT0GNFH/RkkWlsCl8mEk6M913MXECFBGW7IOIVg 3Mbw== X-Gm-Message-State: AMke39mFCp4N2xRSbWKyQv9RyR58szos396b/UMN8qrKXW2cweL2nsRRit8s82weatVYOg== X-Received: by 10.28.45.197 with SMTP id t188mr19203822wmt.15.1486558908586; Wed, 08 Feb 2017 05:01:48 -0800 (PST) Received: from [192.168.252.71] ([193.178.153.36]) by smtp.gmail.com with ESMTPSA id a13sm3264760wma.13.2017.02.08.05.01.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Feb 2017 05:01:47 -0800 (PST) From: Stanislav Galabov X-Google-Original-From: Stanislav Galabov Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.0 \(3226\)) Subject: Re: svn commit: r313343 - head/sys/arm/arm In-Reply-To: Date: Wed, 8 Feb 2017 15:01:46 +0200 Cc: Stanislav Galabov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <27DC1078-9C59-4B6C-A9CF-9E6D246F7366@FreeBSD.org> References: <201702061458.v16EwOjU015633@repo.freebsd.org> To: Ronald Klop X-Mailer: Apple Mail (2.3226) X-BeenThere: svn-src-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: Wed, 08 Feb 2017 13:01:50 -0000 Hi, I hadn=E2=80=99t looked at 11-CURRENT to be honest, but looking at it - = yes, it seems is applicable there too. Unfortunately I am not certain I=E2=80=99ll have time to MFC this, so if = anyone wants to/has the time - please be my guest. Best wishes, Stanislav > On Feb 8, 2017, at 14:58, Ronald Klop wrote: >=20 > Hello, >=20 > Is this applicable to 11-CURRENT also? >=20 > That version (sys/arm/arm/identcpu.c) has: > void > identify_arm_cpu(void) > { > u_int cpuid, reg, size, sets, ways; > u_int8_t type, linesize, ctrl; > int i; >=20 > Regards, > Ronald. >=20 >=20 > On Mon, 06 Feb 2017 15:58:24 +0100, Stanislav Galabov = wrote: >=20 >> Author: sgalabov >> Date: Mon Feb 6 14:58:24 2017 >> New Revision: 313343 >> URL: https://svnweb.freebsd.org/changeset/base/313343 >>=20 >> Log: >> sys/arm/arm/identcpu-v4.c: fix identify_arm_cpu() >> identify_arm_cpu() in sys/arm/arm/identcpu-v4.c incorrectly uses a >> u_int8_t variable to store the result of cpu_get_control(). >> It should really use a u_int variable, the same way as done for = cpu_ident() >> in the same function, as both cpuid and control registers are = 32-bit.. >> This issue causes users of identcpu-v4 to incorrectly report things = such as >> icache status (bit 12 in cpu control register) and basically = anything >> defined in bits above bit 7 :-) >> Reviewed by: manu >> Sponsored by: Smartcom - Bulgaria AD >> Differential Revision: https://reviews.freebsd.org/D9460 >>=20 >> Modified: >> head/sys/arm/arm/identcpu-v4.c >>=20 >> Modified: head/sys/arm/arm/identcpu-v4.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/arm/arm/identcpu-v4.c Mon Feb 6 14:41:34 2017 = (r313342) >> +++ head/sys/arm/arm/identcpu-v4.c Mon Feb 6 14:58:24 2017 = (r313343) >> @@ -294,8 +294,7 @@ u_int cpu_pfr(int num) >> void >> identify_arm_cpu(void) >> { >> - u_int cpuid; >> - u_int8_t ctrl; >> + u_int cpuid, ctrl; >> int i; >> ctrl =3D cpu_get_control(); >> _______________________________________________ >> svn-src-all@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/svn-src-all >> To unsubscribe, send any mail to = "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@freebsd.org Wed Feb 8 15:43: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 8993BCD50A6; Wed, 8 Feb 2017 15:43:09 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B515DD2; Wed, 8 Feb 2017 15:43:09 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [10.1.1.2] (unknown [10.1.1.2]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id B47DD13013; Wed, 8 Feb 2017 15:43:07 +0000 (UTC) Subject: Re: svn commit: r312926 - in head: bin/ed contrib/dma share/mk sys/amd64/amd64 sys/amd64/cloudabi64 sys/cam/ctl sys/cddl/dev/fbt/x86 sys/compat/cloudabi sys/compat/cloudabi64 sys/compat/linuxkpi/common... To: Baptiste Daroussin , "Ngie Cooper (yaneurabeya)" References: <201701281630.v0SGUEfW063907@repo.freebsd.org> <6F201758-8984-49A9-9F47-5E9C4F5700E4@gmail.com> <20170208125911.sxr2gtayke3qpohr@ivaldir.etoilebsd.net> Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Allan Jude Message-ID: <98fba402-dfc3-8977-2f50-8790a8c19637@freebsd.org> Date: Wed, 8 Feb 2017 10:42:58 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <20170208125911.sxr2gtayke3qpohr@ivaldir.etoilebsd.net> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="CQTn02gPGV4UL29HCVAOX3MJn8xcdj8WO" X-BeenThere: svn-src-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: Wed, 08 Feb 2017 15:43:09 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --CQTn02gPGV4UL29HCVAOX3MJn8xcdj8WO Content-Type: multipart/mixed; boundary="3D1WjLW2VAk55cuMIeuwDsNtAc7K86eRU"; protected-headers="v1" From: Allan Jude To: Baptiste Daroussin , "Ngie Cooper (yaneurabeya)" Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <98fba402-dfc3-8977-2f50-8790a8c19637@freebsd.org> Subject: Re: svn commit: r312926 - in head: bin/ed contrib/dma share/mk sys/amd64/amd64 sys/amd64/cloudabi64 sys/cam/ctl sys/cddl/dev/fbt/x86 sys/compat/cloudabi sys/compat/cloudabi64 sys/compat/linuxkpi/common... References: <201701281630.v0SGUEfW063907@repo.freebsd.org> <6F201758-8984-49A9-9F47-5E9C4F5700E4@gmail.com> <20170208125911.sxr2gtayke3qpohr@ivaldir.etoilebsd.net> In-Reply-To: <20170208125911.sxr2gtayke3qpohr@ivaldir.etoilebsd.net> --3D1WjLW2VAk55cuMIeuwDsNtAc7K86eRU Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2017-02-08 07:59, Baptiste Daroussin wrote: > On Wed, Feb 08, 2017 at 12:52:20AM -0800, Ngie Cooper (yaneurabeya) wro= te: >> >>> On Jan 28, 2017, at 08:30, Baptiste Daroussin wrot= e: >>> >>> Author: bapt >>> Date: Sat Jan 28 16:30:14 2017 >>> New Revision: 312926 >>> URL: https://svnweb.freebsd.org/changeset/base/312926 >>> >>> Log: >>> Revert r312923 a better approach will be taken later >>> >>> Modified: >>> head/bin/ed/Makefile >>> head/contrib/dma/mail.c >>> head/share/mk/bsd.doc.mk >>> head/sys/amd64/amd64/db_trace.c >>> head/sys/amd64/cloudabi64/cloudabi64_sysvec.c >>> head/sys/cam/ctl/ctl_ioctl.h >>> head/sys/cddl/dev/fbt/x86/fbt_isa.c >>> head/sys/compat/cloudabi/cloudabi_fd.c >>> head/sys/compat/cloudabi64/cloudabi64_poll.c >>> head/sys/compat/linuxkpi/common/include/linux/slab.h >>> head/sys/contrib/dev/acpica/components/namespace/nsxfeval.c >>> head/sys/contrib/dev/acpica/include/acpixf.h >>> head/sys/ddb/ddb.h >>> head/sys/dev/drm2/drm_agpsupport.c >>> head/sys/dev/drm2/drm_bufs.c >>> head/sys/dev/drm2/drm_dma.c >>> head/sys/dev/drm2/drm_drv.c >>> head/sys/dev/drm2/drm_os_freebsd.c >>> head/sys/dev/drm2/drm_os_freebsd.h >>> head/sys/dev/drm2/drm_stub.c >>> head/sys/fs/nfsserver/nfs_nfsdstate.c >>> head/sys/kern/kern_descrip.c >>> head/sys/kern/kern_shutdown.c >>> head/sys/modules/drm2/drm2/Makefile >>> head/tools/build/Makefile >>> head/tools/tools/locale/etc/unicode.conf >>> head/usr.bin/getconf/confstr.gperf >>> head/usr.bin/getconf/getconf.c >>> head/usr.bin/getconf/limits.gperf >>> head/usr.bin/getconf/pathconf.gperf >>> head/usr.bin/getconf/progenv.gperf >>> head/usr.bin/getconf/sysconf.gperf >>> head/usr.sbin/nscd/nscd.c >>> head/usr.sbin/nscd/nscdcli.c >> >> I noticed that this revision and the next one are a point of issue wh= en running =E2=80=9Csvn merge --reintegrate ". Was "svn merge -c -=E2=80=9C= used? >=20 > Yes the crap was I did svn merge -c -312923 then svn ci which took the = revert > and all the temporary crap I had >=20 > I reverted entirely that one later and commit "manually" the files that= were > supposed to be reverted initially by copying the files from before r312= 923 >=20 > So sorry it was a total mess. >=20 > Bapt >=20 Yeah, it looks like bapt@ committed his work-in-progress make OpenSSL in base private patch. --=20 Allan Jude --3D1WjLW2VAk55cuMIeuwDsNtAc7K86eRU-- --CQTn02gPGV4UL29HCVAOX3MJn8xcdj8WO Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iQIcBAEBAgAGBQJYmzyFAAoJEBmVNT4SmAt+5X0P+wd6WvcYW909bK/8/BxJglPZ ThdIXYtRp0sWzCNcJqXKnb9im2/iQxPo6Q/3N1aJ17DOm0i7ZtZTu51qiDYylREH WqUt/Iwd50nNblVmVUxJ7fntZFleybXS7sh7Px8jYts5d5pbTFkPovtccIVkgQpa C3oP6S8J8vg3fv/MR8VTh4lK25KCaAbrYJDGgIm9FmDMYOHoU2oVsmCf967+H/ri W4MQSSLnYye90zl71rTY5dkXPeRbmlATuKlc6cbITwUbU0Bdy2MuAOaReQq9Qvt2 FVwnMulYFth2/glAyZetCif/wGT0BPNcqyBQnN9+zTrPfEYImvqs9UDPzpdtSG7D FmDrLJZF3EYpCw/e4Qqwe8qaOnDriR2dOeCCDBD173OoOFke8ABb+PkjcBT2Lkg4 /1GE0pvWCEw2zUjK+uTQWaYgMgKlNDVehMui7Q6l5qZaLvVCehebcD3yqOKDq/wV jmpuYMnFbLgDg5itSwMc7grd7KbRnrl3aoFyfZYEyUT4YN/XK3pwn353uTiQWwBV SXxDNp9o3Bx+ZWKW+lcItXIroE11Ky+RQGSuYqqMQCOvwer8gODiVJo0Q9Q78qEF Az2SpR7zf3gwPRFVwdY79K3AgPJ5Os6rJoxcZeFwmz4FZnuUJ8VfcZEG4edigPqg eA/YxhrTI79D2Pwcdyao =NbJt -----END PGP SIGNATURE----- --CQTn02gPGV4UL29HCVAOX3MJn8xcdj8WO-- From owner-svn-src-head@freebsd.org Wed Feb 8 15:52: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 503E7CD56FD; Wed, 8 Feb 2017 15:52:10 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FBFB12AF; Wed, 8 Feb 2017 15:52:10 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v18Fq9wg034507; Wed, 8 Feb 2017 15:52:09 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v18Fq9hc034506; Wed, 8 Feb 2017 15:52:09 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201702081552.v18Fq9hc034506@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Wed, 8 Feb 2017 15:52:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313442 - head/sys/boot/efi/libefi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Wed, 08 Feb 2017 15:52:10 -0000 Author: tsoome Date: Wed Feb 8 15:52:09 2017 New Revision: 313442 URL: https://svnweb.freebsd.org/changeset/base/313442 Log: loader: possible NULL pointer dereference in efipart.c Fix bugs found by Coverity in efipart.c. The Issue is that efi_devpath_last_node() can return NULL pointer, and therefore we should check for it. In real life we really do not expect to see it to happen, so we will just error out from the test. CID: 1371004 Reported by: Coverity Reviewed by: allanjude Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D9490 Modified: head/sys/boot/efi/libefi/efipart.c Modified: head/sys/boot/efi/libefi/efipart.c ============================================================================== --- head/sys/boot/efi/libefi/efipart.c Wed Feb 8 13:37:57 2017 (r313441) +++ head/sys/boot/efi/libefi/efipart.c Wed Feb 8 15:52:09 2017 (r313442) @@ -364,6 +364,9 @@ efipart_hdinfo_add(EFI_HANDLE disk_handl if (disk_devpath == NULL || part_devpath == NULL) { return (ENOENT); } + node = (HARDDRIVE_DEVICE_PATH *)efi_devpath_last_node(part_devpath); + if (node == NULL) + return (ENOENT); /* This should not happen. */ pd = malloc(sizeof(pdinfo_t)); if (pd == NULL) { @@ -372,7 +375,6 @@ efipart_hdinfo_add(EFI_HANDLE disk_handl } memset(pd, 0, sizeof(pdinfo_t)); STAILQ_INIT(&pd->pd_part); - node = (HARDDRIVE_DEVICE_PATH *)efi_devpath_last_node(part_devpath); STAILQ_FOREACH(hd, &hdinfo, pd_link) { if (efi_devpath_match(hd->pd_devpath, disk_devpath) != 0) { From owner-svn-src-head@freebsd.org Wed Feb 8 16:46: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 AFA72CD6889; Wed, 8 Feb 2017 16:46:58 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 633211A31; Wed, 8 Feb 2017 16:46:58 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v18Gkv6E056125; Wed, 8 Feb 2017 16:46:57 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v18Gkvfr056123; Wed, 8 Feb 2017 16:46:57 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201702081646.v18Gkvfr056123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Wed, 8 Feb 2017 16:46:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313447 - in head/sys: dev/acpica x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Wed, 08 Feb 2017 16:46:58 -0000 Author: jtl Date: Wed Feb 8 16:46:57 2017 New Revision: 313447 URL: https://svnweb.freebsd.org/changeset/base/313447 Log: Ensure the idle thread's loop services interrupts in a timely way when using the ACPI C1/mwait sleep method. Previously, the mwait instruction would return when an interrupt was pending; however, the idle loop did not actually enable interrupts when this occurred. This led to a situation where the idle loop could quickly spin through the C1/mwait sleep method a number of times when an interrupt was pending. (Eventually, the situation corrected itself when something other than an interrupt triggered the idle loop to either enable interrupts or schedule another thread.) Reviewed by: kib, imp (earlier version) Input from: jhb MFC after: 1 week Sponsored by: Netflix Modified: head/sys/dev/acpica/acpi_cpu.c head/sys/x86/x86/cpu_machdep.c Modified: head/sys/dev/acpica/acpi_cpu.c ============================================================================== --- head/sys/dev/acpica/acpi_cpu.c Wed Feb 8 16:07:59 2017 (r313446) +++ head/sys/dev/acpica/acpi_cpu.c Wed Feb 8 16:46:57 2017 (r313447) @@ -1158,6 +1158,9 @@ acpi_cpu_idle(sbintime_t sbt) end_time = ((cpu_ticks() - cputicks) << 20) / cpu_tickrate(); if (curthread->td_critnest == 0) end_time = min(end_time, 500000 / hz); + /* acpi_cpu_c1() returns with interrupts enabled. */ + if (cx_next->do_mwait) + ACPI_ENABLE_IRQS(); sc->cpu_prev_sleep = (sc->cpu_prev_sleep * 3 + end_time) / 4; return; } Modified: head/sys/x86/x86/cpu_machdep.c ============================================================================== --- head/sys/x86/x86/cpu_machdep.c Wed Feb 8 16:07:59 2017 (r313446) +++ head/sys/x86/x86/cpu_machdep.c Wed Feb 8 16:46:57 2017 (r313447) @@ -129,6 +129,14 @@ acpi_cpu_c1(void) __asm __volatile("sti; hlt"); } +/* + * Use mwait to pause execution while waiting for an interrupt or + * another thread to signal that there is more work. + * + * NOTE: Interrupts will cause a wakeup; however, this function does + * not enable interrupt handling. The caller is responsible to enable + * interrupts. + */ void acpi_cpu_idle_mwait(uint32_t mwait_hint) { From owner-svn-src-head@freebsd.org Wed Feb 8 17:03: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 00BACCD6FA9; Wed, 8 Feb 2017 17:03:54 +0000 (UTC) (envelope-from garga@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C18BF941; Wed, 8 Feb 2017 17:03:53 +0000 (UTC) (envelope-from garga@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v18H3q5k064194; Wed, 8 Feb 2017 17:03:52 GMT (envelope-from garga@FreeBSD.org) Received: (from garga@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v18H3qZD064193; Wed, 8 Feb 2017 17:03:52 GMT (envelope-from garga@FreeBSD.org) Message-Id: <201702081703.v18H3qZD064193@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: garga set sender to garga@FreeBSD.org using -f From: Renato Botelho Date: Wed, 8 Feb 2017 17:03:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313448 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Wed, 08 Feb 2017 17:03:54 -0000 Author: garga (ports committer) Date: Wed Feb 8 17:03:52 2017 New Revision: 313448 URL: https://svnweb.freebsd.org/changeset/base/313448 Log: bsdinstall: Make sure chroot filesystems are umounted after use * DISTDIR_IS_UNIONFS is set every time BSDINSTALL_DISTDIR is mounted inside BSDINSTALL_CHROOT. Use this flag to decide if it needs to be umounted * BSDINSTALL_CHROOT/dev is mounted when 'bsdinstall mount' is called, there is no need to mount it again when user goes to shell after installation Reviewed by: allanjude Obtained from: pfSense MFC after: 1 week Sponsored by: Rubicon Communications (Netgate) Differential Revision: https://reviews.freebsd.org/D8573 Modified: head/usr.sbin/bsdinstall/scripts/auto Modified: head/usr.sbin/bsdinstall/scripts/auto ============================================================================== --- head/usr.sbin/bsdinstall/scripts/auto Wed Feb 8 16:46:57 2017 (r313447) +++ head/usr.sbin/bsdinstall/scripts/auto Wed Feb 8 17:03:52 2017 (r313448) @@ -449,9 +449,11 @@ finalconfig trap error SIGINT # SIGINT is bad again bsdinstall config || error "Failed to save config" +if [ -n "$DISTDIR_IS_UNIONFS" ]; then + umount -f $BSDINSTALL_DISTDIR +fi + if [ ! -z "$BSDINSTALL_FETCHDEST" ]; then - [ "$BSDINSTALL_FETCHDEST" != "$BSDINSTALL_DISTDIR" ] && \ - umount "$BSDINSTALL_DISTDIR" rm -rf "$BSDINSTALL_FETCHDEST" fi @@ -460,7 +462,6 @@ dialog --backtitle "FreeBSD Installer" - "The installation is now finished. Before exiting the installer, would you like to open a shell in the new system to make any final manual modifications?" 0 0 if [ $? -eq 0 ]; then clear - mount -t devfs devfs "$BSDINSTALL_CHROOT/dev" echo This shell is operating in a chroot in the new system. \ When finished making configuration changes, type \"exit\". chroot "$BSDINSTALL_CHROOT" /bin/sh 2>&1 From owner-svn-src-head@freebsd.org Wed Feb 8 17:45: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 56720CD6FE9; Wed, 8 Feb 2017 17:45:25 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2612E766; Wed, 8 Feb 2017 17:45:25 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v18HjOZc080927; Wed, 8 Feb 2017 17:45:24 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v18HjOAW080925; Wed, 8 Feb 2017 17:45:24 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201702081745.v18HjOAW080925@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 8 Feb 2017 17:45:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313449 - in head: sys/sys usr.bin/gcore X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Wed, 08 Feb 2017 17:45:25 -0000 Author: jhb Date: Wed Feb 8 17:45:23 2017 New Revision: 313449 URL: https://svnweb.freebsd.org/changeset/base/313449 Log: Trim trailing whitespace (mostly introduced in r313407). Sponsored by: DARPA / AFRL Modified: head/sys/sys/proc.h head/usr.bin/gcore/elfcore.c Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Wed Feb 8 17:03:52 2017 (r313448) +++ head/sys/sys/proc.h Wed Feb 8 17:45:23 2017 (r313449) @@ -315,7 +315,7 @@ struct thread { } td_state; /* (t) thread state */ union { register_t tdu_retval[2]; - off_t tdu_off; + off_t tdu_off; } td_uretoff; /* (k) Syscall aux returns. */ #define td_retval td_uretoff.tdu_retval u_int td_cowgen; /* (k) Generation of COW pointers. */ @@ -619,7 +619,7 @@ struct proc { u_int p_xsig; /* (c) Stop/kill sig. */ uint16_t p_elf_machine; /* (x) ELF machine type */ uint64_t p_elf_flags; /* (x) ELF flags */ - + /* End area that is copied on creation. */ #define p_endcopy p_elf_flags struct pgrp *p_pgrp; /* (c + e) Pointer to process group. */ Modified: head/usr.bin/gcore/elfcore.c ============================================================================== --- head/usr.bin/gcore/elfcore.c Wed Feb 8 17:03:52 2017 (r313448) +++ head/usr.bin/gcore/elfcore.c Wed Feb 8 17:45:23 2017 (r313449) @@ -434,7 +434,7 @@ elf_puthdr(int efd, pid_t pid, vm_map_en err(1, "Failed to re-read ELF header"); else if (cnt != sizeof(binhdr)) errx(1, "Failed to re-read ELF header"); - + ehdr = (Elf_Ehdr *)hdr; ehdr->e_ident[EI_MAG0] = ELFMAG0; From owner-svn-src-head@freebsd.org Wed Feb 8 18:32: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 CA7FBCD699E; Wed, 8 Feb 2017 18:32:54 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98A1E1013; Wed, 8 Feb 2017 18:32:54 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v18IWrrx001897; Wed, 8 Feb 2017 18:32:53 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v18IWrIa001896; Wed, 8 Feb 2017 18:32:53 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201702081832.v18IWrIa001896@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Wed, 8 Feb 2017 18:32:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313451 - head/sys/boot/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Wed, 08 Feb 2017 18:32:54 -0000 Author: tsoome Date: Wed Feb 8 18:32:53 2017 New Revision: 313451 URL: https://svnweb.freebsd.org/changeset/base/313451 Log: loader: possible NULL pointer dereference in bcache.c Coverity detected the possible NULL pointer dereference case. Also updated comment as was suggested in illumos review. CID: 1371008 Reported by: Coverity Reviewed by: allanjude Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D9496 Modified: head/sys/boot/common/bcache.c Modified: head/sys/boot/common/bcache.c ============================================================================== --- head/sys/boot/common/bcache.c Wed Feb 8 18:32:35 2017 (r313450) +++ head/sys/boot/common/bcache.c Wed Feb 8 18:32:53 2017 (r313451) @@ -224,13 +224,13 @@ read_strategy(void *devdata, int rw, dad caddr_t p_buf; uint32_t *marker; - marker = (uint32_t *)(bc->bcache_data + bc->bcache_nblks * bcache_blksize); - if (bc == NULL) { errno = ENODEV; return (-1); } + marker = (uint32_t *)(bc->bcache_data + bc->bcache_nblks * bcache_blksize); + if (rsize != NULL) *rsize = 0; @@ -290,10 +290,9 @@ read_strategy(void *devdata, int rw, dad * And secondly, this way we get the most conservative setup for the ra. * * The selection of multiple of 16 blocks (8KB) is quite arbitrary, however, - * we want to have the CD (2K) and the 4K disks to be covered. - * Also, as we have 32 blocks to be allocated as the fallback value in the - * bcache_allocate(), the 16 ra blocks will allow the read ahead - * to be used even with bcache this small. + * we want to cover CDs (2K) and 4K disks. + * bcache_allocate() will always fall back to a minimum of 32 blocks. + * Our choice of 16 read ahead blocks will always fit inside the bcache. */ ra = bc->bcache_nblks - BHASH(bc, p_blk + p_size); From owner-svn-src-head@freebsd.org Wed Feb 8 19:26: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 62B58CD5FA5; Wed, 8 Feb 2017 19:26:00 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 17B7F1E1B; Wed, 8 Feb 2017 19:26:00 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v18JPxKJ023708; Wed, 8 Feb 2017 19:25:59 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v18JPwcF023706; Wed, 8 Feb 2017 19:25:58 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702081925.v18JPwcF023706@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 8 Feb 2017 19:25:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313453 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Wed, 08 Feb 2017 19:26:00 -0000 Author: mjg Date: Wed Feb 8 19:25:58 2017 New Revision: 313453 URL: https://svnweb.freebsd.org/changeset/base/313453 Log: Implement LOCKSTAT_OOL_PROFILE_ENABLED For use in uninlined locking primitives to decide whether lockstat or profiling needs to be taken care of. Modified: head/sys/sys/lockstat.h head/sys/sys/sdt.h Modified: head/sys/sys/lockstat.h ============================================================================== --- head/sys/sys/lockstat.h Wed Feb 8 18:33:00 2017 (r313452) +++ head/sys/sys/lockstat.h Wed Feb 8 19:25:58 2017 (r313453) @@ -107,10 +107,6 @@ extern int lockstat_enabled; LOCKSTAT_RECORD1(probe, lp, a); \ } while (0) -#ifndef LOCK_PROFILING -#define LOCKSTAT_PROFILE_ENABLED(probe) SDT_PROBE_ENABLED(lockstat, , , probe) -#endif - struct lock_object; uint64_t lockstat_nsecs(struct lock_object *); @@ -134,10 +130,16 @@ uint64_t lockstat_nsecs(struct lock_obje #define LOCKSTAT_PROFILE_RELEASE_RWLOCK(probe, lp, a) \ LOCKSTAT_PROFILE_RELEASE_LOCK(probe, lp) +#endif /* !KDTRACE_HOOKS */ + #ifndef LOCK_PROFILING -#define LOCKSTAT_PROFILE_ENABLED(probe) 0 +#define LOCKSTAT_PROFILE_ENABLED(probe) \ + SDT_PROBE_ENABLED(lockstat, , , probe) +#define LOCKSTAT_OOL_PROFILE_ENABLED(probe) \ + SDT_PROBE_ENABLED(lockstat, , , probe) +#else +#define LOCKSTAT_OOL_PROFILE_ENABLED(probe) 1 #endif -#endif /* !KDTRACE_HOOKS */ #endif /* _KERNEL */ #endif /* _SYS_LOCKSTAT_H */ Modified: head/sys/sys/sdt.h ============================================================================== --- head/sys/sys/sdt.h Wed Feb 8 18:33:00 2017 (r313452) +++ head/sys/sys/sdt.h Wed Feb 8 19:25:58 2017 (r313453) @@ -86,6 +86,7 @@ #define SDT_PROVIDER_DECLARE(prov) #define SDT_PROBE_DEFINE(prov, mod, func, name) #define SDT_PROBE_DECLARE(prov, mod, func, name) +#define SDT_PROBE_ENABLED(prov, mod, func, name) 0 #define SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) #define SDT_PROBE_ARGTYPE(prov, mod, func, name, num, type, xtype) From owner-svn-src-head@freebsd.org Wed Feb 8 19: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 4C3CCCD613B; Wed, 8 Feb 2017 19:28:48 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 240FE298; Wed, 8 Feb 2017 19:28:48 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v18JSl2Y023859; Wed, 8 Feb 2017 19:28:47 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v18JSlN3023858; Wed, 8 Feb 2017 19:28:47 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702081928.v18JSlN3023858@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 8 Feb 2017 19:28:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313454 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Wed, 08 Feb 2017 19:28:48 -0000 Author: mjg Date: Wed Feb 8 19:28:46 2017 New Revision: 313454 URL: https://svnweb.freebsd.org/changeset/base/313454 Log: rwlock: implemenet rlock/runlock fast path This improves singlethreaded throughput on my test machine from ~247 mln ops/s to ~328 mln. It is mostly about avoiding the setup cost of lockstat. Reviewed by: jhb (previous version) Modified: head/sys/kern/kern_rwlock.c Modified: head/sys/kern/kern_rwlock.c ============================================================================== --- head/sys/kern/kern_rwlock.c Wed Feb 8 19:25:58 2017 (r313453) +++ head/sys/kern/kern_rwlock.c Wed Feb 8 19:28:46 2017 (r313454) @@ -359,13 +359,44 @@ _rw_wunlock_cookie(volatile uintptr_t *c * is unlocked and has no writer waiters or spinners. Failing otherwise * prioritizes writers before readers. */ -#define RW_CAN_READ(_rw) \ - ((curthread->td_rw_rlocks && (_rw) & RW_LOCK_READ) || ((_rw) & \ +#define RW_CAN_READ(td, _rw) \ + (((td)->td_rw_rlocks && (_rw) & RW_LOCK_READ) || ((_rw) & \ (RW_LOCK_READ | RW_LOCK_WRITE_WAITERS | RW_LOCK_WRITE_SPINNER)) == \ RW_LOCK_READ) -void -__rw_rlock(volatile uintptr_t *c, const char *file, int line) +static bool __always_inline +__rw_rlock_try(struct rwlock *rw, struct thread *td, uintptr_t *vp, + const char *file, int line) +{ + + /* + * Handle the easy case. If no other thread has a write + * lock, then try to bump up the count of read locks. Note + * that we have to preserve the current state of the + * RW_LOCK_WRITE_WAITERS flag. If we fail to acquire a + * read lock, then rw_lock must have changed, so restart + * the loop. Note that this handles the case of a + * completely unlocked rwlock since such a lock is encoded + * as a read lock with no waiters. + */ + while (RW_CAN_READ(td, *vp)) { + if (atomic_fcmpset_acq_ptr(&rw->rw_lock, vp, + *vp + RW_ONE_READER)) { + if (LOCK_LOG_TEST(&rw->lock_object, 0)) + CTR4(KTR_LOCK, + "%s: %p succeed %p -> %p", __func__, + rw, (void *)*vp, + (void *)(*vp + RW_ONE_READER)); + td->td_rw_rlocks++; + return (true); + } + } + return (false); +} + +static void __noinline +__rw_rlock_hard(volatile uintptr_t *c, struct thread *td, uintptr_t v, + const char *file, int line) { struct rwlock *rw; struct turnstile *ts; @@ -378,7 +409,6 @@ __rw_rlock(volatile uintptr_t *c, const uint64_t waittime = 0; int contested = 0; #endif - uintptr_t v; #if defined(ADAPTIVE_RWLOCKS) || defined(KDTRACE_HOOKS) struct lock_delay_arg lda; #endif @@ -399,51 +429,15 @@ __rw_rlock(volatile uintptr_t *c, const #endif rw = rwlock2rw(c); - KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), - ("rw_rlock() by idle thread %p on rwlock %s @ %s:%d", - curthread, rw->lock_object.lo_name, file, line)); - KASSERT(rw->rw_lock != RW_DESTROYED, - ("rw_rlock() of destroyed rwlock @ %s:%d", file, line)); - KASSERT(rw_wowner(rw) != curthread, - ("rw_rlock: wlock already held for %s @ %s:%d", - rw->lock_object.lo_name, file, line)); - WITNESS_CHECKORDER(&rw->lock_object, LOP_NEWORDER, file, line, NULL); - #ifdef KDTRACE_HOOKS all_time -= lockstat_nsecs(&rw->lock_object); #endif - v = RW_READ_VALUE(rw); #ifdef KDTRACE_HOOKS state = v; #endif for (;;) { - /* - * Handle the easy case. If no other thread has a write - * lock, then try to bump up the count of read locks. Note - * that we have to preserve the current state of the - * RW_LOCK_WRITE_WAITERS flag. If we fail to acquire a - * read lock, then rw_lock must have changed, so restart - * the loop. Note that this handles the case of a - * completely unlocked rwlock since such a lock is encoded - * as a read lock with no waiters. - */ - if (RW_CAN_READ(v)) { - /* - * The RW_LOCK_READ_WAITERS flag should only be set - * if the lock has been unlocked and write waiters - * were present. - */ - if (atomic_fcmpset_acq_ptr(&rw->rw_lock, &v, - v + RW_ONE_READER)) { - if (LOCK_LOG_TEST(&rw->lock_object, 0)) - CTR4(KTR_LOCK, - "%s: %p succeed %p -> %p", __func__, - rw, (void *)v, - (void *)(v + RW_ONE_READER)); - break; - } - continue; - } + if (__rw_rlock_try(rw, td, &v, file, line)) + break; #ifdef KDTRACE_HOOKS lda.spin_cnt++; #endif @@ -485,7 +479,7 @@ __rw_rlock(volatile uintptr_t *c, const rw->lock_object.lo_name); for (i = 0; i < rowner_loops; i++) { v = RW_READ_VALUE(rw); - if ((v & RW_LOCK_READ) == 0 || RW_CAN_READ(v)) + if ((v & RW_LOCK_READ) == 0 || RW_CAN_READ(td, v)) break; cpu_spinwait(); } @@ -513,7 +507,7 @@ __rw_rlock(volatile uintptr_t *c, const * recheck its state and restart the loop if needed. */ v = RW_READ_VALUE(rw); - if (RW_CAN_READ(v)) { + if (RW_CAN_READ(td, v)) { turnstile_cancel(ts); continue; } @@ -538,7 +532,7 @@ __rw_rlock(volatile uintptr_t *c, const /* * The lock is held in write mode or it already has waiters. */ - MPASS(!RW_CAN_READ(v)); + MPASS(!RW_CAN_READ(td, v)); /* * If the RW_LOCK_READ_WAITERS flag is already set, then @@ -598,10 +592,36 @@ __rw_rlock(volatile uintptr_t *c, const */ LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(rw__acquire, rw, contested, waittime, file, line, LOCKSTAT_READER); +} + +void +__rw_rlock(volatile uintptr_t *c, const char *file, int line) +{ + struct rwlock *rw; + struct thread *td; + uintptr_t v; + + td = curthread; + rw = rwlock2rw(c); + + KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(td), + ("rw_rlock() by idle thread %p on rwlock %s @ %s:%d", + td, rw->lock_object.lo_name, file, line)); + KASSERT(rw->rw_lock != RW_DESTROYED, + ("rw_rlock() of destroyed rwlock @ %s:%d", file, line)); + KASSERT(rw_wowner(rw) != td, + ("rw_rlock: wlock already held for %s @ %s:%d", + rw->lock_object.lo_name, file, line)); + WITNESS_CHECKORDER(&rw->lock_object, LOP_NEWORDER, file, line, NULL); + + v = RW_READ_VALUE(rw); + if (__predict_false(LOCKSTAT_OOL_PROFILE_ENABLED(rw__acquire) || + !__rw_rlock_try(rw, td, &v, file, line))) + __rw_rlock_hard(c, td, v, file, line); + LOCK_LOG_LOCK("RLOCK", &rw->lock_object, 0, 0, file, line); WITNESS_LOCK(&rw->lock_object, 0, file, line); TD_LOCKS_INC(curthread); - curthread->td_rw_rlocks++; } int @@ -641,40 +661,25 @@ __rw_try_rlock(volatile uintptr_t *c, co return (0); } -void -_rw_runlock_cookie(volatile uintptr_t *c, const char *file, int line) +static bool __always_inline +__rw_runlock_try(struct rwlock *rw, struct thread *td, uintptr_t *vp) { - struct rwlock *rw; - struct turnstile *ts; - uintptr_t x, v, queue; - - if (SCHEDULER_STOPPED()) - return; - - rw = rwlock2rw(c); - - KASSERT(rw->rw_lock != RW_DESTROYED, - ("rw_runlock() of destroyed rwlock @ %s:%d", file, line)); - __rw_assert(c, RA_RLOCKED, file, line); - WITNESS_UNLOCK(&rw->lock_object, 0, file, line); - LOCK_LOG_LOCK("RUNLOCK", &rw->lock_object, 0, 0, file, line); - /* TODO: drop "owner of record" here. */ - x = RW_READ_VALUE(rw); for (;;) { /* * See if there is more than one read lock held. If so, * just drop one and return. */ - if (RW_READERS(x) > 1) { - if (atomic_fcmpset_rel_ptr(&rw->rw_lock, &x, - x - RW_ONE_READER)) { + if (RW_READERS(*vp) > 1) { + if (atomic_fcmpset_rel_ptr(&rw->rw_lock, vp, + *vp - RW_ONE_READER)) { if (LOCK_LOG_TEST(&rw->lock_object, 0)) CTR4(KTR_LOCK, "%s: %p succeeded %p -> %p", - __func__, rw, (void *)x, - (void *)(x - RW_ONE_READER)); - break; + __func__, rw, (void *)*vp, + (void *)(*vp - RW_ONE_READER)); + td->td_rw_rlocks--; + return (true); } continue; } @@ -682,18 +687,41 @@ _rw_runlock_cookie(volatile uintptr_t *c * If there aren't any waiters for a write lock, then try * to drop it quickly. */ - if (!(x & RW_LOCK_WAITERS)) { - MPASS((x & ~RW_LOCK_WRITE_SPINNER) == + if (!(*vp & RW_LOCK_WAITERS)) { + MPASS((*vp & ~RW_LOCK_WRITE_SPINNER) == RW_READERS_LOCK(1)); - if (atomic_fcmpset_rel_ptr(&rw->rw_lock, &x, + if (atomic_fcmpset_rel_ptr(&rw->rw_lock, vp, RW_UNLOCKED)) { if (LOCK_LOG_TEST(&rw->lock_object, 0)) CTR2(KTR_LOCK, "%s: %p last succeeded", __func__, rw); - break; + td->td_rw_rlocks--; + return (true); } continue; } + break; + } + return (false); +} + +static void __noinline +__rw_runlock_hard(volatile uintptr_t *c, struct thread *td, uintptr_t v, + const char *file, int line) +{ + struct rwlock *rw; + struct turnstile *ts; + uintptr_t x, queue; + + if (SCHEDULER_STOPPED()) + return; + + rw = rwlock2rw(c); + + for (;;) { + if (__rw_runlock_try(rw, td, &v)) + break; + /* * Ok, we know we have waiters and we think we are the * last reader, so grab the turnstile lock. @@ -746,13 +774,38 @@ _rw_runlock_cookie(volatile uintptr_t *c turnstile_broadcast(ts, queue); turnstile_unpend(ts, TS_SHARED_LOCK); turnstile_chain_unlock(&rw->lock_object); + td->td_rw_rlocks--; break; } LOCKSTAT_PROFILE_RELEASE_RWLOCK(rw__release, rw, LOCKSTAT_READER); +} + +void +_rw_runlock_cookie(volatile uintptr_t *c, const char *file, int line) +{ + struct rwlock *rw; + struct thread *td; + uintptr_t v; + + rw = rwlock2rw(c); + + KASSERT(rw->rw_lock != RW_DESTROYED, + ("rw_runlock() of destroyed rwlock @ %s:%d", file, line)); + __rw_assert(c, RA_RLOCKED, file, line); + WITNESS_UNLOCK(&rw->lock_object, 0, file, line); + LOCK_LOG_LOCK("RUNLOCK", &rw->lock_object, 0, 0, file, line); + + td = curthread; + v = RW_READ_VALUE(rw); + + if (__predict_false(LOCKSTAT_OOL_PROFILE_ENABLED(rw__release) || + !__rw_runlock_try(rw, td, &v))) + __rw_runlock_hard(c, td, v, file, line); + TD_LOCKS_DEC(curthread); - curthread->td_rw_rlocks--; } + /* * This function is called when we are unable to obtain a write lock on the * first try. This means that at least one other thread holds either a From owner-svn-src-head@freebsd.org Wed Feb 8 19:29: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 6AA2FCD61A2; Wed, 8 Feb 2017 19:29:35 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B8C35F9; Wed, 8 Feb 2017 19:29:35 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v18JTYng023933; Wed, 8 Feb 2017 19:29:34 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v18JTYcU023932; Wed, 8 Feb 2017 19:29:34 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702081929.v18JTYcU023932@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 8 Feb 2017 19:29:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313455 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Wed, 08 Feb 2017 19:29:35 -0000 Author: mjg Date: Wed Feb 8 19:29:34 2017 New Revision: 313455 URL: https://svnweb.freebsd.org/changeset/base/313455 Log: sx: implement slock/sunlock fast path See r313454. Modified: head/sys/kern/kern_sx.c Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Wed Feb 8 19:28:46 2017 (r313454) +++ head/sys/kern/kern_sx.c Wed Feb 8 19:29:34 2017 (r313455) @@ -799,8 +799,32 @@ _sx_xunlock_hard(struct sx *sx, uintptr_ kick_proc0(); } -int -_sx_slock(struct sx *sx, int opts, const char *file, int line) +static bool __always_inline +__sx_slock_try(struct sx *sx, uintptr_t *xp, const char *file, int line) +{ + + /* + * If no other thread has an exclusive lock then try to bump up + * the count of sharers. Since we have to preserve the state + * of SX_LOCK_EXCLUSIVE_WAITERS, if we fail to acquire the + * shared lock loop back and retry. + */ + while (*xp & SX_LOCK_SHARED) { + MPASS(!(*xp & SX_LOCK_SHARED_WAITERS)); + if (atomic_fcmpset_acq_ptr(&sx->sx_lock, xp, + *xp + SX_ONE_SHARER)) { + if (LOCK_LOG_TEST(&sx->lock_object, 0)) + CTR4(KTR_LOCK, "%s: %p succeed %p -> %p", + __func__, sx, (void *)*xp, + (void *)(*xp + SX_ONE_SHARER)); + return (true); + } + } + return (false); +} + +static int __noinline +_sx_slock_hard(struct sx *sx, int opts, const char *file, int line, uintptr_t x) { GIANT_DECLARE; #ifdef ADAPTIVE_SX @@ -810,7 +834,6 @@ _sx_slock(struct sx *sx, int opts, const uint64_t waittime = 0; int contested = 0; #endif - uintptr_t x; int error = 0; #if defined(ADAPTIVE_SX) || defined(KDTRACE_HOOKS) struct lock_delay_arg lda; @@ -830,17 +853,8 @@ _sx_slock(struct sx *sx, int opts, const #elif defined(KDTRACE_HOOKS) lock_delay_arg_init(&lda, NULL); #endif - KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), - ("sx_slock() by idle thread %p on sx %s @ %s:%d", - curthread, sx->lock_object.lo_name, file, line)); - KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, - ("sx_slock() of destroyed sx @ %s:%d", file, line)); - WITNESS_CHECKORDER(&sx->lock_object, LOP_NEWORDER, file, line, NULL); #ifdef KDTRACE_HOOKS all_time -= lockstat_nsecs(&sx->lock_object); -#endif - x = SX_READ_VALUE(sx); -#ifdef KDTRACE_HOOKS state = x; #endif @@ -849,25 +863,8 @@ _sx_slock(struct sx *sx, int opts, const * shared locks once there is an exclusive waiter. */ for (;;) { - /* - * If no other thread has an exclusive lock then try to bump up - * the count of sharers. Since we have to preserve the state - * of SX_LOCK_EXCLUSIVE_WAITERS, if we fail to acquire the - * shared lock loop back and retry. - */ - if (x & SX_LOCK_SHARED) { - MPASS(!(x & SX_LOCK_SHARED_WAITERS)); - if (atomic_fcmpset_acq_ptr(&sx->sx_lock, &x, - x + SX_ONE_SHARER)) { - if (LOCK_LOG_TEST(&sx->lock_object, 0)) - CTR4(KTR_LOCK, - "%s: %p succeed %p -> %p", __func__, - sx, (void *)x, - (void *)(x + SX_ONE_SHARER)); - break; - } - continue; - } + if (__sx_slock_try(sx, &x, file, line)) + break; #ifdef KDTRACE_HOOKS lda.spin_cnt++; #endif @@ -1006,51 +1003,62 @@ _sx_slock(struct sx *sx, int opts, const if (error == 0) { LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(sx__acquire, sx, contested, waittime, file, line, LOCKSTAT_READER); - LOCK_LOG_LOCK("SLOCK", &sx->lock_object, 0, 0, file, line); - WITNESS_LOCK(&sx->lock_object, 0, file, line); - TD_LOCKS_INC(curthread); } GIANT_RESTORE(); return (error); } -void -_sx_sunlock(struct sx *sx, const char *file, int line) +int +_sx_slock(struct sx *sx, int opts, const char *file, int line) { uintptr_t x; - int wakeup_swapper; - - if (SCHEDULER_STOPPED()) - return; + int error; + KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + ("sx_slock() by idle thread %p on sx %s @ %s:%d", + curthread, sx->lock_object.lo_name, file, line)); KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, - ("sx_sunlock() of destroyed sx @ %s:%d", file, line)); - _sx_assert(sx, SA_SLOCKED, file, line); - WITNESS_UNLOCK(&sx->lock_object, 0, file, line); - LOCK_LOG_LOCK("SUNLOCK", &sx->lock_object, 0, 0, file, line); - LOCKSTAT_PROFILE_RELEASE_RWLOCK(sx__release, sx, LOCKSTAT_READER); + ("sx_slock() of destroyed sx @ %s:%d", file, line)); + WITNESS_CHECKORDER(&sx->lock_object, LOP_NEWORDER, file, line, NULL); + + error = 0; x = SX_READ_VALUE(sx); + if (__predict_false(LOCKSTAT_OOL_PROFILE_ENABLED(sx__acquire) || + !__sx_slock_try(sx, &x, file, line))) + error = _sx_slock_hard(sx, opts, file, line, x); + if (error == 0) { + LOCK_LOG_LOCK("SLOCK", &sx->lock_object, 0, 0, file, line); + WITNESS_LOCK(&sx->lock_object, 0, file, line); + TD_LOCKS_INC(curthread); + } + return (error); +} + +static bool __always_inline +_sx_sunlock_try(struct sx *sx, uintptr_t *xp) +{ + for (;;) { /* * We should never have sharers while at least one thread * holds a shared lock. */ - KASSERT(!(x & SX_LOCK_SHARED_WAITERS), + KASSERT(!(*xp & SX_LOCK_SHARED_WAITERS), ("%s: waiting sharers", __func__)); /* * See if there is more than one shared lock held. If * so, just drop one and return. */ - if (SX_SHARERS(x) > 1) { - if (atomic_fcmpset_rel_ptr(&sx->sx_lock, &x, - x - SX_ONE_SHARER)) { + if (SX_SHARERS(*xp) > 1) { + if (atomic_fcmpset_rel_ptr(&sx->sx_lock, xp, + *xp - SX_ONE_SHARER)) { if (LOCK_LOG_TEST(&sx->lock_object, 0)) CTR4(KTR_LOCK, "%s: %p succeeded %p -> %p", - __func__, sx, (void *)x, - (void *)(x - SX_ONE_SHARER)); - break; + __func__, sx, (void *)*xp, + (void *)(*xp - SX_ONE_SHARER)); + return (true); } continue; } @@ -1059,18 +1067,36 @@ _sx_sunlock(struct sx *sx, const char *f * If there aren't any waiters for an exclusive lock, * then try to drop it quickly. */ - if (!(x & SX_LOCK_EXCLUSIVE_WAITERS)) { - MPASS(x == SX_SHARERS_LOCK(1)); - x = SX_SHARERS_LOCK(1); + if (!(*xp & SX_LOCK_EXCLUSIVE_WAITERS)) { + MPASS(*xp == SX_SHARERS_LOCK(1)); + *xp = SX_SHARERS_LOCK(1); if (atomic_fcmpset_rel_ptr(&sx->sx_lock, - &x, SX_LOCK_UNLOCKED)) { + xp, SX_LOCK_UNLOCKED)) { if (LOCK_LOG_TEST(&sx->lock_object, 0)) CTR2(KTR_LOCK, "%s: %p last succeeded", __func__, sx); - break; + return (true); } continue; } + break; + } + return (false); +} + +static void __noinline +_sx_sunlock_hard(struct sx *sx, uintptr_t x, const char *file, int line) +{ + int wakeup_swapper; + + if (SCHEDULER_STOPPED()) + return; + + LOCKSTAT_PROFILE_RELEASE_RWLOCK(sx__release, sx, LOCKSTAT_READER); + + for (;;) { + if (_sx_sunlock_try(sx, &x)) + break; /* * At this point, there should just be one sharer with @@ -1103,6 +1129,24 @@ _sx_sunlock(struct sx *sx, const char *f kick_proc0(); break; } +} + +void +_sx_sunlock(struct sx *sx, const char *file, int line) +{ + uintptr_t x; + + KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, + ("sx_sunlock() of destroyed sx @ %s:%d", file, line)); + _sx_assert(sx, SA_SLOCKED, file, line); + WITNESS_UNLOCK(&sx->lock_object, 0, file, line); + LOCK_LOG_LOCK("SUNLOCK", &sx->lock_object, 0, 0, file, line); + + x = SX_READ_VALUE(sx); + if (__predict_false(LOCKSTAT_OOL_PROFILE_ENABLED(sx__release) || + !_sx_sunlock_try(sx, &x))) + _sx_sunlock_hard(sx, x, file, line); + TD_LOCKS_DEC(curthread); } From owner-svn-src-head@freebsd.org Wed Feb 8 20:21: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 32678CD6011; Wed, 8 Feb 2017 20:21:31 +0000 (UTC) (envelope-from garga@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E44F87E6; Wed, 8 Feb 2017 20:21:30 +0000 (UTC) (envelope-from garga@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v18KLTK4046395; Wed, 8 Feb 2017 20:21:29 GMT (envelope-from garga@FreeBSD.org) Received: (from garga@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v18KLTuG046394; Wed, 8 Feb 2017 20:21:29 GMT (envelope-from garga@FreeBSD.org) Message-Id: <201702082021.v18KLTuG046394@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: garga set sender to garga@FreeBSD.org using -f From: Renato Botelho Date: Wed, 8 Feb 2017 20:21:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313457 - head/usr.sbin/arp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Wed, 08 Feb 2017 20:21:31 -0000 Author: garga (ports committer) Date: Wed Feb 8 20:21:29 2017 New Revision: 313457 URL: https://svnweb.freebsd.org/changeset/base/313457 Log: Fix style(9) Reviewed by: vangyzen, allanjude, cem Approved by: allanjude MFC after: 1 week Sponsored by: Rubicon Communications (Netgate) Differential Revision: https://reviews.freebsd.org/D9494 Modified: head/usr.sbin/arp/arp.c Modified: head/usr.sbin/arp/arp.c ============================================================================== --- head/usr.sbin/arp/arp.c Wed Feb 8 20:08:38 2017 (r313456) +++ head/usr.sbin/arp/arp.c Wed Feb 8 20:21:29 2017 (r313457) @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); * arp - display, set, and delete arp table entries */ - #include #include #include @@ -80,8 +79,8 @@ __FBSDID("$FreeBSD$"); #include #include -typedef void (action_fn)(struct sockaddr_dl *sdl, - struct sockaddr_in *s_in, struct rt_msghdr *rtm); +typedef void (action_fn)(struct sockaddr_dl *sdl, struct sockaddr_in *s_in, + struct rt_msghdr *rtm); static int search(u_long addr, action_fn *action); static action_fn print_entry; @@ -344,18 +343,20 @@ set(int argc, char **argv) } } else if (strncmp(argv[0], "blackhole", 9) == 0) { if (flags & RTF_REJECT) { - printf("Choose one of blackhole or reject, not both.\n"); + printf("Choose one of blackhole or reject, " + "not both."); } flags |= RTF_BLACKHOLE; } else if (strncmp(argv[0], "reject", 6) == 0) { if (flags & RTF_BLACKHOLE) { - printf("Choose one of blackhole or reject, not both.\n"); + printf("Choose one of blackhole or reject, " + "not both."); } flags |= RTF_REJECT; } else if (strncmp(argv[0], "trail", 5) == 0) { /* XXX deprecated and undocumented feature */ printf("%s: Sending trailers is no longer supported\n", - host); + host); } argv++; } @@ -381,7 +382,7 @@ set(int argc, char **argv) /* * In the case a proxy-arp entry is being added for - * a remote end point, the RTF_ANNOUNCE flag in the + * a remote end point, the RTF_ANNOUNCE flag in the * RTM_GET command is an indication to the kernel * routing code that the interface associated with * the prefix route covering the local end of the @@ -467,7 +468,7 @@ delete(char *host) sdl = (struct sockaddr_dl *)(SA_SIZE(addr) + (char *)addr); /* - * With the new L2/L3 restructure, the route + * With the new L2/L3 restructure, the route * returned is a prefix route. The important * piece of information from the previous * RTM_GET is the interface index. In the @@ -486,7 +487,7 @@ delete(char *host) * is a proxy-arp entry to remove. */ if (flags & RTF_ANNOUNCE) { - fprintf(stderr, "delete: cannot locate %s\n",host); + fprintf(stderr, "delete: cannot locate %s\n", host); return (1); } @@ -525,7 +526,7 @@ search(u_long addr, action_fn *action) mib[5] = RTF_LLINFO; #else mib[5] = 0; -#endif +#endif if (sysctl(mib, 6, NULL, &needed, NULL, 0) < 0) err(1, "route-sysctl-estimate"); if (needed == 0) /* empty table */ @@ -575,7 +576,7 @@ print_entry(struct sockaddr_dl *sdl, struct if_nameindex *p; int seg; - if (ifnameindex == NULL) + if (ifnameindex == NULL) if ((ifnameindex = if_nameindex()) == NULL) err(1, "cannot retrieve interface names"); @@ -597,7 +598,8 @@ print_entry(struct sockaddr_dl *sdl, sdl->sdl_type == IFT_L2VLAN || sdl->sdl_type == IFT_BRIDGE) && sdl->sdl_alen == ETHER_ADDR_LEN) - printf("%s", ether_ntoa((struct ether_addr *)LLADDR(sdl))); + printf("%s", + ether_ntoa((struct ether_addr *)LLADDR(sdl))); else { int n = sdl->sdl_nlen > 0 ? sdl->sdl_nlen + 1 : 0; @@ -607,7 +609,7 @@ print_entry(struct sockaddr_dl *sdl, printf("(incomplete)"); for (p = ifnameindex; p && ifnameindex->if_index && - ifnameindex->if_name; p++) { + ifnameindex->if_name; p++) { if (p->if_index == sdl->sdl_index) { printf(" on %s", p->if_name); break; @@ -629,31 +631,31 @@ print_entry(struct sockaddr_dl *sdl, printf(" published"); switch(sdl->sdl_type) { case IFT_ETHER: - printf(" [ethernet]"); - break; + printf(" [ethernet]"); + break; case IFT_ISO88025: - printf(" [token-ring]"); + printf(" [token-ring]"); trld = SDL_ISO88025(sdl); if (trld->trld_rcf != 0) { printf(" rt=%x", ntohs(trld->trld_rcf)); for (seg = 0; seg < ((TR_RCF_RIFLEN(trld->trld_rcf) - 2 ) / 2); - seg++) + seg++) printf(":%x", ntohs(*(trld->trld_route[seg]))); } break; case IFT_FDDI: - printf(" [fddi]"); - break; + printf(" [fddi]"); + break; case IFT_ATM: - printf(" [atm]"); - break; + printf(" [atm]"); + break; case IFT_L2VLAN: printf(" [vlan]"); break; case IFT_IEEE1394: - printf(" [firewire]"); - break; + printf(" [firewire]"); + break; case IFT_BRIDGE: printf(" [bridge]"); break; @@ -662,8 +664,8 @@ print_entry(struct sockaddr_dl *sdl, break; default: break; - } - + } + printf("\n"); } @@ -688,13 +690,13 @@ static void usage(void) { fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n", - "usage: arp [-n] [-i interface] hostname", - " arp [-n] [-i interface] -a", - " arp -d hostname [pub]", - " arp -d [-i interface] -a", - " arp -s hostname ether_addr [temp] [reject | blackhole] [pub [only]]", - " arp -S hostname ether_addr [temp] [reject | blackhole] [pub [only]]", - " arp -f filename"); + "usage: arp [-n] [-i interface] hostname", + " arp [-n] [-i interface] -a", + " arp -d hostname [pub]", + " arp -d [-i interface] -a", + " arp -s hostname ether_addr [temp] [reject | blackhole] [pub [only]]", + " arp -S hostname ether_addr [temp] [reject | blackhole] [pub [only]]", + " arp -f filename"); exit(1); } @@ -753,12 +755,12 @@ rtmsg(int cmd, struct sockaddr_in *dst, case RTM_GET: rtm->rtm_addrs |= RTA_DST; } -#define NEXTADDR(w, s) \ - do { \ - if ((s) != NULL && rtm->rtm_addrs & (w)) { \ - bcopy((s), cp, sizeof(*(s))); \ - cp += SA_SIZE(s); \ - } \ +#define NEXTADDR(w, s) \ + do { \ + if ((s) != NULL && rtm->rtm_addrs & (w)) { \ + bcopy((s), cp, sizeof(*(s))); \ + cp += SA_SIZE(s); \ + } \ } while (0) NEXTADDR(RTA_DST, dst); @@ -814,7 +816,7 @@ get_ether_addr(in_addr_t ipaddr, struct } #define NEXTIFR(i) \ - ((struct ifreq *)((char *)&(i)->ifr_addr \ + ((struct ifreq *)((char *)&(i)->ifr_addr \ + MAX((i)->ifr_addr.sa_len, sizeof((i)->ifr_addr))) ) /* @@ -835,14 +837,10 @@ get_ether_addr(in_addr_t ipaddr, struct if (ioctl(sock, SIOCGIFFLAGS, &ifreq) < 0) continue; if ((ifreq.ifr_flags & - (IFF_UP|IFF_BROADCAST|IFF_POINTOPOINT| - IFF_LOOPBACK|IFF_NOARP)) - != (IFF_UP|IFF_BROADCAST)) + (IFF_UP|IFF_BROADCAST|IFF_POINTOPOINT| + IFF_LOOPBACK|IFF_NOARP)) != (IFF_UP|IFF_BROADCAST)) continue; - /* - * Get its netmask and check that it's on - * the right subnet. - */ + /* Get its netmask and check that it's on the right subnet. */ if (ioctl(sock, SIOCGIFNETMASK, &ifreq) < 0) continue; mask = ((struct sockaddr_in *) From owner-svn-src-head@freebsd.org Wed Feb 8 20:31: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 68B46CD6544; Wed, 8 Feb 2017 20:31:55 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3697CD3E; Wed, 8 Feb 2017 20:31:55 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v18KVsm3051961; Wed, 8 Feb 2017 20:31:54 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v18KVsrR051960; Wed, 8 Feb 2017 20:31:54 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201702082031.v18KVsrR051960@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 8 Feb 2017 20:31:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313458 - head/contrib/llvm/tools/lld/ELF X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Wed, 08 Feb 2017 20:31:55 -0000 Author: emaste Date: Wed Feb 8 20:31:54 2017 New Revision: 313458 URL: https://svnweb.freebsd.org/changeset/base/313458 Log: lld: Allow arbitrary code alignment in .eh_frame According to the specification, CIE code alignment factor is an arbitrary unsigned LEB128 encoded value. PR: 216908 Reported by: Wolfgang Meyer Obtained from: Upstream LLD r277105 MFC after: 1 week Modified: head/contrib/llvm/tools/lld/ELF/EhFrame.cpp Modified: head/contrib/llvm/tools/lld/ELF/EhFrame.cpp ============================================================================== --- head/contrib/llvm/tools/lld/ELF/EhFrame.cpp Wed Feb 8 20:21:29 2017 (r313457) +++ head/contrib/llvm/tools/lld/ELF/EhFrame.cpp Wed Feb 8 20:31:54 2017 (r313458) @@ -117,9 +117,8 @@ template uint8_t getFdeEnco StringRef Aug(reinterpret_cast(D.begin()), AugEnd - D.begin()); D = D.slice(Aug.size() + 1); - // Code alignment factor should always be 1 for .eh_frame. - if (readByte(D) != 1) - fatal("CIE code alignment must be 1"); + // Skip code alignment factor. + skipLeb128(D); // Skip data alignment factor. skipLeb128(D); From owner-svn-src-head@freebsd.org Wed Feb 8 23:17: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 3D1CCCD67A6; Wed, 8 Feb 2017 23:17:25 +0000 (UTC) (envelope-from def@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F36EBB92; Wed, 8 Feb 2017 23:17:24 +0000 (UTC) (envelope-from def@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v18NHO3Z018453; Wed, 8 Feb 2017 23:17:24 GMT (envelope-from def@FreeBSD.org) Received: (from def@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v18NHNRZ018451; Wed, 8 Feb 2017 23:17:23 GMT (envelope-from def@FreeBSD.org) Message-Id: <201702082317.v18NHNRZ018451@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: def set sender to def@FreeBSD.org using -f From: Konrad Witaszczyk Date: Wed, 8 Feb 2017 23:17:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313459 - head/sbin/decryptcore X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Wed, 08 Feb 2017 23:17:25 -0000 Author: def Date: Wed Feb 8 23:17:23 2017 New Revision: 313459 URL: https://svnweb.freebsd.org/changeset/base/313459 Log: Don't decrypt a core if a vmcore file already exists by default. Allow to change this behaviour using the -f flag. Approved by: pjd (mentor) Modified: head/sbin/decryptcore/decryptcore.8 head/sbin/decryptcore/decryptcore.c Modified: head/sbin/decryptcore/decryptcore.8 ============================================================================== --- head/sbin/decryptcore/decryptcore.8 Wed Feb 8 20:31:54 2017 (r313458) +++ head/sbin/decryptcore/decryptcore.8 Wed Feb 8 23:17:23 2017 (r313459) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 13, 2016 +.Dd February 9, 2017 .Dt DECRYPTCORE 8 .Os .Sh NAME @@ -32,13 +32,13 @@ .Nd "decrypt a core dump of the operating system" .Sh SYNOPSIS .Nm -.Op Fl Lv +.Op Fl fLv .Fl p Ar privatekeyfile .Fl k Ar keyfile .Fl e Ar encryptedcore .Fl c Ar core .Nm -.Op Fl Lv +.Op Fl fLv .Op Fl d Ar crashdir .Fl p Ar privatekeyfile .Fl n Ar dumpnr @@ -70,10 +70,20 @@ file where corresponds to .Ar dumpnr . .Pp +By default +.Nm +does not overwrite an old core dump as a user might want to store the core +somewhere else for the future. +This behaviour can be changed using the +.Fl f +flag. +.Pp The .Nm utility can be started with the following command line arguments: .Bl -tag -width ".Fl e Ar encryptedcore" +.It Fl f +Remove a decryped core dump if it already exists. .It Fl L Write log messages to .Xr syslogd 8 . Modified: head/sbin/decryptcore/decryptcore.c ============================================================================== --- head/sbin/decryptcore/decryptcore.c Wed Feb 8 20:31:54 2017 (r313458) +++ head/sbin/decryptcore/decryptcore.c Wed Feb 8 23:17:23 2017 (r313459) @@ -55,8 +55,8 @@ usage(void) { pjdlog_exitx(1, - "usage: decryptcore [-Lv] -p privatekeyfile -k keyfile -e encryptedcore -c core\n" - " decryptcore [-Lv] [-d crashdir] -p privatekeyfile -n dumpnr"); + "usage: decryptcore [-fLv] -p privatekeyfile -k keyfile -e encryptedcore -c core\n" + " decryptcore [-fLv] [-d crashdir] -p privatekeyfile -n dumpnr"); } static int @@ -115,8 +115,8 @@ failed: } static bool -decrypt(const char *privkeyfile, const char *keyfile, const char *input, - const char *output) +decrypt(int ofd, const char *privkeyfile, const char *keyfile, + const char *input) { uint8_t buf[KERNELDUMP_BUFFER_SIZE], key[KERNELDUMP_KEY_MAX_SIZE]; EVP_CIPHER_CTX ctx; @@ -124,14 +124,14 @@ decrypt(const char *privkeyfile, const c FILE *fp; struct kerneldumpkey *kdk; RSA *privkey; - int ifd, kfd, ofd, olen, privkeysize; + int ifd, kfd, olen, privkeysize; ssize_t bytes; pid_t pid; + PJDLOG_ASSERT(ofd >= 0); PJDLOG_ASSERT(privkeyfile != NULL); PJDLOG_ASSERT(keyfile != NULL); PJDLOG_ASSERT(input != NULL); - PJDLOG_ASSERT(output != NULL); privkey = NULL; @@ -142,11 +142,14 @@ decrypt(const char *privkeyfile, const c pid = fork(); if (pid == -1) { pjdlog_errno(LOG_ERR, "Unable to create child process"); + close(ofd); return (false); } - if (pid > 0) + if (pid > 0) { + close(ofd); return (wait_for_process(pid) == 0); + } kfd = open(keyfile, O_RDONLY); if (kfd == -1) { @@ -158,11 +161,6 @@ decrypt(const char *privkeyfile, const c pjdlog_errno(LOG_ERR, "Unable to open %s", input); goto failed; } - ofd = open(output, O_WRONLY | O_CREAT | O_TRUNC, 0600); - if (ofd == -1) { - pjdlog_errno(LOG_ERR, "Unable to open %s", output); - goto failed; - } fp = fopen(privkeyfile, "r"); if (fp == NULL) { pjdlog_errno(LOG_ERR, "Unable to open %s", privkeyfile); @@ -247,8 +245,7 @@ decrypt(const char *privkeyfile, const c } if (olen > 0 && write(ofd, buf, olen) != olen) { - pjdlog_errno(LOG_ERR, "Unable to write data to %s", - output); + pjdlog_errno(LOG_ERR, "Unable to write core"); goto failed; } } while (bytes > 0); @@ -269,9 +266,11 @@ main(int argc, char **argv) { char core[PATH_MAX], encryptedcore[PATH_MAX], keyfile[PATH_MAX]; const char *crashdir, *dumpnr, *privatekey; - int ch, debug; + int ch, debug, error, ofd; size_t ii; - bool usesyslog; + bool force, usesyslog; + + error = 1; pjdlog_init(PJDLOG_MODE_STD); pjdlog_prefix_set("(decryptcore) "); @@ -281,10 +280,11 @@ main(int argc, char **argv) crashdir = NULL; dumpnr = NULL; *encryptedcore = '\0'; + force = false; *keyfile = '\0'; privatekey = NULL; usesyslog = false; - while ((ch = getopt(argc, argv, "Lc:d:e:k:n:p:v")) != -1) { + while ((ch = getopt(argc, argv, "Lc:d:e:fk:n:p:v")) != -1) { switch (ch) { case 'L': usesyslog = true; @@ -302,6 +302,9 @@ main(int argc, char **argv) pjdlog_exitx(1, "Encrypted core file path is too long."); } break; + case 'f': + force = true; + break; case 'k': if (strlcpy(keyfile, optarg, sizeof(keyfile)) >= sizeof(keyfile)) { @@ -361,13 +364,24 @@ main(int argc, char **argv) pjdlog_mode_set(PJDLOG_MODE_SYSLOG); pjdlog_debug_set(debug); - if (!decrypt(privatekey, keyfile, encryptedcore, core)) { + if (force && unlink(core) == -1 && errno != ENOENT) { + pjdlog_errno(LOG_ERR, "Unable to remove old core"); + goto out; + } + ofd = open(core, O_WRONLY | O_CREAT | O_EXCL, 0600); + if (ofd == -1) { + pjdlog_errno(LOG_ERR, "Unable to open %s", core); + goto out; + } + + if (!decrypt(ofd, privatekey, keyfile, encryptedcore)) { if (unlink(core) == -1 && errno != ENOENT) - pjdlog_exit(1, "Unable to remove core"); - exit(1); + pjdlog_errno(LOG_ERR, "Unable to remove core"); + goto out; } + error = 0; +out: pjdlog_fini(); - - exit(0); + exit(error); } From owner-svn-src-head@freebsd.org Thu Feb 9 04:07: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 D0CDBCD70C6; Thu, 9 Feb 2017 04:07:31 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A880A1FEB; Thu, 9 Feb 2017 04:07:31 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1947UlE040079; Thu, 9 Feb 2017 04:07:30 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1947UFx040073; Thu, 9 Feb 2017 04:07:30 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702090407.v1947UFx040073@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 9 Feb 2017 04:07:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313462 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Thu, 09 Feb 2017 04:07:31 -0000 Author: adrian Date: Thu Feb 9 04:07:30 2017 New Revision: 313462 URL: https://svnweb.freebsd.org/changeset/base/313462 Log: [net80211] quiet IE handling improvements * on the station side, only call the quiet time IE method if we have a quiet IE - otherwise call the NULL method once, and then don't waste time calling NULL * on the beacon generation side - force a beacon regeneration each time quiet time is enabled/disabled. Without this, enabling/disabling quiet time IE would cause the beacon contents to be corrupted since none of the "move contents around" logic (like for CSA and TIM handling) is implemented. This changes the size of ieee80211_node so it requires a kernel recompile, but no userland recompile. Tested: * AR9380, AP mode, enabling/disabling quiet time IE * AR9380, STA mode, with upcoming driver changes. Modified: head/sys/net80211/ieee80211_node.h head/sys/net80211/ieee80211_output.c head/sys/net80211/ieee80211_proto.h head/sys/net80211/ieee80211_sta.c head/sys/net80211/ieee80211_var.h Modified: head/sys/net80211/ieee80211_node.h ============================================================================== --- head/sys/net80211/ieee80211_node.h Thu Feb 9 02:08:42 2017 (r313461) +++ head/sys/net80211/ieee80211_node.h Thu Feb 9 04:07:30 2017 (r313462) @@ -249,6 +249,11 @@ struct ieee80211_node { struct ieee80211vap *ni_wdsvap; /* associated WDS vap */ void *ni_rctls; /* private ratectl state */ + + /* quiet time IE state for the given node */ + uint32_t ni_quiet_ie_set; /* Quiet time IE was seen */ + struct ieee80211_quiet_ie ni_quiet_ie; /* last seen quiet IE */ + uint64_t ni_spare[3]; }; MALLOC_DECLARE(M_80211_NODE); Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Thu Feb 9 02:08:42 2017 (r313461) +++ head/sys/net80211/ieee80211_output.c Thu Feb 9 04:07:30 2017 (r313462) @@ -2128,7 +2128,6 @@ ieee80211_add_qos(uint8_t *frm, const st * Send a probe request frame with the specified ssid * and any optional information element data. */ -/* XXX VHT? */ int ieee80211_send_probereq(struct ieee80211_node *ni, const uint8_t sa[IEEE80211_ADDR_LEN], @@ -2438,7 +2437,6 @@ ieee80211_send_mgmt(struct ieee80211_nod case IEEE80211_FC0_SUBTYPE_ASSOC_REQ: case IEEE80211_FC0_SUBTYPE_REASSOC_REQ: - /* XXX VHT? */ /* * asreq frame format * [2] capability information @@ -2700,7 +2698,6 @@ bad: * Space is left to prepend and 802.11 header at the * front but it's left to the caller to fill in. */ -/* XXX VHT? */ struct mbuf * ieee80211_alloc_proberesp(struct ieee80211_node *bss, int legacy) { @@ -3035,7 +3032,6 @@ ieee80211_tx_mgt_cb(struct ieee80211_nod } } -/* XXX VHT? */ static void ieee80211_beacon_construct(struct mbuf *m, uint8_t *frm, struct ieee80211_node *ni) @@ -3163,15 +3159,23 @@ ieee80211_beacon_construct(struct mbuf * } else bo->bo_csa = frm; + bo->bo_quiet = NULL; if (vap->iv_flags & IEEE80211_F_DOTH) { - bo->bo_quiet = frm; if (IEEE80211_IS_CHAN_DFS(ic->ic_bsschan) && - (vap->iv_flags_ext & IEEE80211_FEXT_DFS)) { - if (vap->iv_quiet) + (vap->iv_flags_ext & IEEE80211_FEXT_DFS) && + (vap->iv_quiet == 1)) { + /* + * We only insert the quiet IE offset if + * the quiet IE is enabled. Otherwise don't + * put it here or we'll just overwrite + * some other beacon contents. + */ + if (vap->iv_quiet) { + bo->bo_quiet = frm; frm = ieee80211_add_quiet(frm,vap, 0); + } } - } else - bo->bo_quiet = frm; + } if (IEEE80211_IS_CHAN_ANYG(ni->ni_chan)) { bo->bo_erp = frm; @@ -3239,7 +3243,6 @@ ieee80211_beacon_construct(struct mbuf * /* * Allocate a beacon frame and fillin the appropriate bits. */ -/* XXX VHT? */ struct mbuf * ieee80211_beacon_alloc(struct ieee80211_node *ni) { @@ -3252,6 +3255,14 @@ ieee80211_beacon_alloc(struct ieee80211_ uint8_t *frm; /* + * Update the "We're putting the quiet IE in the beacon" state. + */ + if (vap->iv_quiet == 1) + vap->iv_flags_ext |= IEEE80211_FEXT_QUIET_IE; + else if (vap->iv_quiet == 0) + vap->iv_flags_ext &= ~IEEE80211_FEXT_QUIET_IE; + + /* * beacon frame format * * Note: This needs updating for 802.11-2012. @@ -3286,7 +3297,6 @@ ieee80211_beacon_alloc(struct ieee80211_ * NB: we allocate the max space required for the TIM bitmap. * XXX how big is this? */ - /* XXX VHT? */ pktlen = 8 /* time stamp */ + sizeof(uint16_t) /* beacon interval */ + sizeof(uint16_t) /* capabilities */ @@ -3392,6 +3402,42 @@ ieee80211_beacon_update(struct ieee80211 return 1; /* just assume length changed */ } + /* + * Handle the quiet time element being added and removed. + * Again, for now we just cheat and reconstruct the whole + * beacon - that way the gap is provided as appropriate. + * + * So, track whether we have already added the IE versus + * whether we want to be adding the IE. + */ + if ((vap->iv_flags_ext & IEEE80211_FEXT_QUIET_IE) && + (vap->iv_quiet == 0)) { + /* + * Quiet time beacon IE enabled, but it's disabled; + * recalc + */ + vap->iv_flags_ext &= ~IEEE80211_FEXT_QUIET_IE; + ieee80211_beacon_construct(m, + mtod(m, uint8_t*) + sizeof(struct ieee80211_frame), ni); + /* XXX do WME aggressive mode processing? */ + IEEE80211_UNLOCK(ic); + return 1; /* just assume length changed */ + } + + if (((vap->iv_flags_ext & IEEE80211_FEXT_QUIET_IE) == 0) && + (vap->iv_quiet == 1)) { + /* + * Quiet time beacon IE disabled, but it's now enabled; + * recalc + */ + vap->iv_flags_ext |= IEEE80211_FEXT_QUIET_IE; + ieee80211_beacon_construct(m, + mtod(m, uint8_t*) + sizeof(struct ieee80211_frame), ni); + /* XXX do WME aggressive mode processing? */ + IEEE80211_UNLOCK(ic); + return 1; /* just assume length changed */ + } + wh = mtod(m, struct ieee80211_frame *); /* @@ -3600,10 +3646,17 @@ ieee80211_beacon_update(struct ieee80211 vap->iv_csa_count++; /* NB: don't clear IEEE80211_BEACON_CSA */ } + + /* + * Only add the quiet time IE if we've enabled it + * as appropriate. + */ if (IEEE80211_IS_CHAN_DFS(ic->ic_bsschan) && - (vap->iv_flags_ext & IEEE80211_FEXT_DFS) ){ - if (vap->iv_quiet) + (vap->iv_flags_ext & IEEE80211_FEXT_DFS)) { + if (vap->iv_quiet && + (vap->iv_flags_ext & IEEE80211_FEXT_QUIET_IE)) { ieee80211_add_quiet(bo->bo_quiet, vap, 1); + } } if (isset(bo->bo_flags, IEEE80211_BEACON_ERP)) { /* Modified: head/sys/net80211/ieee80211_proto.h ============================================================================== --- head/sys/net80211/ieee80211_proto.h Thu Feb 9 02:08:42 2017 (r313461) +++ head/sys/net80211/ieee80211_proto.h Thu Feb 9 04:07:30 2017 (r313462) @@ -391,6 +391,8 @@ enum { IEEE80211_BEACON_TDMA = 9, /* TDMA Info */ IEEE80211_BEACON_ATH = 10, /* ATH parameters */ IEEE80211_BEACON_MESHCONF = 11, /* Mesh Configuration */ + IEEE80211_BEACON_QUIET = 12, /* Quiet time IE */ + IEEE80211_BEACON_VHTINFO = 13, /* VHT information */ }; int ieee80211_beacon_update(struct ieee80211_node *, struct mbuf *, int mcast); Modified: head/sys/net80211/ieee80211_sta.c ============================================================================== --- head/sys/net80211/ieee80211_sta.c Thu Feb 9 02:08:42 2017 (r313461) +++ head/sys/net80211/ieee80211_sta.c Thu Feb 9 04:07:30 2017 (r313462) @@ -1319,6 +1319,27 @@ startbgscan(struct ieee80211vap *vap) ieee80211_time_after(ticks, ic->ic_lastdata + vap->iv_bgscanidle))); } +#ifdef notyet +/* + * Compare two quiet IEs and return if they are equivalent. + * + * The tbttcount isnt checked - that's not part of the configuration. + */ +static int +compare_quiet_ie(const struct ieee80211_quiet_ie *q1, + const struct ieee80211_quiet_ie *q2) +{ + + if (q1->period != q2->period) + return (0); + if (le16dec(&q1->duration) != le16dec(&q2->duration)) + return (0); + if (le16dec(&q1->offset) != le16dec(&q2->offset)) + return (0); + return (1); +} +#endif + static void sta_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, int subtype, const struct ieee80211_rx_stats *rxs, @@ -1449,8 +1470,26 @@ sta_recv_mgmt(struct ieee80211_node *ni, ht_state_change = 1; } - if (scan.quiet) + /* + * If we have a quiet time IE then report it up to + * the driver. + * + * Otherwise, inform the driver that the quiet time + * IE has disappeared - only do that once rather than + * spamming it each time. + */ + if (scan.quiet) { ic->ic_set_quiet(ni, scan.quiet); + ni->ni_quiet_ie_set = 1; + memcpy(&ni->ni_quiet_ie, scan.quiet, + sizeof(struct ieee80211_quiet_ie)); + } else { + if (ni->ni_quiet_ie_set == 1) + ic->ic_set_quiet(ni, NULL); + ni->ni_quiet_ie_set = 0; + bzero(&ni->ni_quiet_ie, + sizeof(struct ieee80211_quiet_ie)); + } if (scan.tim != NULL) { struct ieee80211_tim_ie *tim = Modified: head/sys/net80211/ieee80211_var.h ============================================================================== --- head/sys/net80211/ieee80211_var.h Thu Feb 9 02:08:42 2017 (r313461) +++ head/sys/net80211/ieee80211_var.h Thu Feb 9 04:07:30 2017 (r313462) @@ -636,12 +636,13 @@ MALLOC_DECLARE(M_80211_VAP); #define IEEE80211_FEXT_SEQNO_OFFLOAD 0x00100000 /* CONF: driver does seqno insertion/allocation */ #define IEEE80211_FEXT_FRAG_OFFLOAD 0x00200000 /* CONF: hardware does 802.11 fragmentation + assignment */ #define IEEE80211_FEXT_VHT 0x00400000 /* CONF: VHT support */ +#define IEEE80211_FEXT_QUIET_IE 0x00800000 /* STATUS: quiet IE in a beacon has been added */ #define IEEE80211_FEXT_BITS \ "\20\2INACT\3SCANWAIT\4BGSCAN\5WPS\6TSN\7SCANREQ\10RESUME" \ "\0114ADDR\12NONEPR_PR\13SWBMISS\14DFS\15DOTD\16STATEWAIT\17REINIT" \ "\20BPF\21WDSLEGACY\22PROBECHAN\23UNIQMAC\24SCAN_OFFLOAD\25SEQNO_OFFLOAD" \ - "\26VHT" + "\26VHT\27QUIET_IE" /* ic_flags_ht/iv_flags_ht */ #define IEEE80211_FHT_NONHT_PR 0x00000001 /* STATUS: non-HT sta present */ From owner-svn-src-head@freebsd.org Thu Feb 9 07:29: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 ED2ABCD74C9; Thu, 9 Feb 2017 07:29:08 +0000 (UTC) (envelope-from sgalabov@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0F5DB29; Thu, 9 Feb 2017 07:29:08 +0000 (UTC) (envelope-from sgalabov@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v197T7lT021208; Thu, 9 Feb 2017 07:29:07 GMT (envelope-from sgalabov@FreeBSD.org) Received: (from sgalabov@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v197T7Si021205; Thu, 9 Feb 2017 07:29:07 GMT (envelope-from sgalabov@FreeBSD.org) Message-Id: <201702090729.v197T7Si021205@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sgalabov set sender to sgalabov@FreeBSD.org using -f From: Stanislav Galabov Date: Thu, 9 Feb 2017 07:29:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313465 - head/sys/dev/rt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Thu, 09 Feb 2017 07:29:09 -0000 Author: sgalabov Date: Thu Feb 9 07:29:07 2017 New Revision: 313465 URL: https://svnweb.freebsd.org/changeset/base/313465 Log: Set GDMA1 Frames Destination Port to Port 0 (CPU) Some U-Boot versions do not initialize MT7620's Frame Engine. Then it is not possible to receive packets from the network. Setting GDMA1 Frames Destination Port to Port 0 (CPU) in GDM Forwarding Configuration register solves this issue. Submitted by: Hiroki Mori (yamori813@yahoo.co.jp) Reviewed by: adrian mizhka (previous version) Differential Revision: https://reviews.freebsd.org/D9301 Modified: head/sys/dev/rt/if_rt.c head/sys/dev/rt/if_rtreg.h head/sys/dev/rt/if_rtvar.h Modified: head/sys/dev/rt/if_rt.c ============================================================================== --- head/sys/dev/rt/if_rt.c Thu Feb 9 04:45:18 2017 (r313464) +++ head/sys/dev/rt/if_rt.c Thu Feb 9 07:29:07 2017 (r313465) @@ -393,11 +393,13 @@ rt_attach(device_t dev) sc->csum_fail_ip = RT305X_RXD_SRC_IP_CSUM_FAIL; sc->csum_fail_l4 = RT305X_RXD_SRC_L4_CSUM_FAIL; } - + /* Fill in soc-specific registers map */ switch(sc->rt_chipid) { case RT_CHIPID_MT7620: case RT_CHIPID_MT7621: + sc->gdma1_base = MT7620_GDMA1_BASE; + /* fallthrough */ case RT_CHIPID_RT5350: device_printf(dev, "%cT%x Ethernet MAC (rev 0x%08x)\n", sc->rt_chipid >= 0x7600 ? 'M' : 'R', @@ -431,18 +433,7 @@ rt_attach(device_t dev) default: device_printf(dev, "RT305XF Ethernet MAC (rev 0x%08x)\n", sc->mac_rev); - RT_WRITE(sc, GDMA1_BASE + GDMA_FWD_CFG, - ( - GDM_ICS_EN | /* Enable IP Csum */ - GDM_TCS_EN | /* Enable TCP Csum */ - GDM_UCS_EN | /* Enable UDP Csum */ - GDM_STRPCRC | /* Strip CRC from packet */ - GDM_DST_PORT_CPU << GDM_UFRC_P_SHIFT | /* fwd UCast to CPU */ - GDM_DST_PORT_CPU << GDM_BFRC_P_SHIFT | /* fwd BCast to CPU */ - GDM_DST_PORT_CPU << GDM_MFRC_P_SHIFT | /* fwd MCast to CPU */ - GDM_DST_PORT_CPU << GDM_OFRC_P_SHIFT /* fwd Other to CPU */ - )); - + sc->gdma1_base = GDMA1_BASE; sc->delay_int_cfg=PDMA_BASE+DELAY_INT_CFG; sc->fe_int_status=GE_PORT_BASE+FE_INT_STATUS; sc->fe_int_enable=GE_PORT_BASE+FE_INT_ENABLE; @@ -464,6 +455,19 @@ rt_attach(device_t dev) sc->int_tx_done_mask=INT_TXQ0_DONE; } + if (sc->gdma1_base != 0) + RT_WRITE(sc, sc->gdma1_base + GDMA_FWD_CFG, + ( + GDM_ICS_EN | /* Enable IP Csum */ + GDM_TCS_EN | /* Enable TCP Csum */ + GDM_UCS_EN | /* Enable UDP Csum */ + GDM_STRPCRC | /* Strip CRC from packet */ + GDM_DST_PORT_CPU << GDM_UFRC_P_SHIFT | /* fwd UCast to CPU */ + GDM_DST_PORT_CPU << GDM_BFRC_P_SHIFT | /* fwd BCast to CPU */ + GDM_DST_PORT_CPU << GDM_MFRC_P_SHIFT | /* fwd MCast to CPU */ + GDM_DST_PORT_CPU << GDM_OFRC_P_SHIFT /* fwd Other to CPU */ + )); + /* allocate Tx and Rx rings */ for (i = 0; i < RT_SOFTC_TX_RING_COUNT; i++) { error = rt_alloc_tx_ring(sc, &sc->tx_ring[i], i); @@ -782,18 +786,18 @@ rt_init_locked(void *priv) //rt305x_sysctl_set(SYSCTL_RSTCTRL, SYSCTL_RSTCTRL_FRENG); /* Fwd to CPU (uni|broad|multi)cast and Unknown */ - if(sc->rt_chipid == RT_CHIPID_RT3050) - RT_WRITE(sc, GDMA1_BASE + GDMA_FWD_CFG, - ( - GDM_ICS_EN | /* Enable IP Csum */ - GDM_TCS_EN | /* Enable TCP Csum */ - GDM_UCS_EN | /* Enable UDP Csum */ - GDM_STRPCRC | /* Strip CRC from packet */ - GDM_DST_PORT_CPU << GDM_UFRC_P_SHIFT | /* Forward UCast to CPU */ - GDM_DST_PORT_CPU << GDM_BFRC_P_SHIFT | /* Forward BCast to CPU */ - GDM_DST_PORT_CPU << GDM_MFRC_P_SHIFT | /* Forward MCast to CPU */ - GDM_DST_PORT_CPU << GDM_OFRC_P_SHIFT /* Forward Other to CPU */ - )); + if (sc->gdma1_base != 0) + RT_WRITE(sc, sc->gdma1_base + GDMA_FWD_CFG, + ( + GDM_ICS_EN | /* Enable IP Csum */ + GDM_TCS_EN | /* Enable TCP Csum */ + GDM_UCS_EN | /* Enable UDP Csum */ + GDM_STRPCRC | /* Strip CRC from packet */ + GDM_DST_PORT_CPU << GDM_UFRC_P_SHIFT | /* fwd UCast to CPU */ + GDM_DST_PORT_CPU << GDM_BFRC_P_SHIFT | /* fwd BCast to CPU */ + GDM_DST_PORT_CPU << GDM_MFRC_P_SHIFT | /* fwd MCast to CPU */ + GDM_DST_PORT_CPU << GDM_OFRC_P_SHIFT /* fwd Other to CPU */ + )); /* disable DMA engine */ RT_WRITE(sc, sc->pdma_glo_cfg, 0); @@ -965,25 +969,25 @@ rt_stop_locked(void *priv) /* disable interrupts */ RT_WRITE(sc, sc->fe_int_enable, 0); - if(sc->rt_chipid == RT_CHIPID_RT5350 || - sc->rt_chipid == RT_CHIPID_MT7620 || - sc->rt_chipid == RT_CHIPID_MT7621) { - } else { - /* reset adapter */ - RT_WRITE(sc, GE_PORT_BASE + FE_RST_GLO, PSE_RESET); - - RT_WRITE(sc, GDMA1_BASE + GDMA_FWD_CFG, - ( - GDM_ICS_EN | /* Enable IP Csum */ - GDM_TCS_EN | /* Enable TCP Csum */ - GDM_UCS_EN | /* Enable UDP Csum */ - GDM_STRPCRC | /* Strip CRC from packet */ - GDM_DST_PORT_CPU << GDM_UFRC_P_SHIFT | /* Forward UCast to CPU */ - GDM_DST_PORT_CPU << GDM_BFRC_P_SHIFT | /* Forward BCast to CPU */ - GDM_DST_PORT_CPU << GDM_MFRC_P_SHIFT | /* Forward MCast to CPU */ - GDM_DST_PORT_CPU << GDM_OFRC_P_SHIFT /* Forward Other to CPU */ - )); + if(sc->rt_chipid != RT_CHIPID_RT5350 && + sc->rt_chipid != RT_CHIPID_MT7620 && + sc->rt_chipid != RT_CHIPID_MT7621) { + /* reset adapter */ + RT_WRITE(sc, GE_PORT_BASE + FE_RST_GLO, PSE_RESET); } + + if (sc->gdma1_base != 0) + RT_WRITE(sc, sc->gdma1_base + GDMA_FWD_CFG, + ( + GDM_ICS_EN | /* Enable IP Csum */ + GDM_TCS_EN | /* Enable TCP Csum */ + GDM_UCS_EN | /* Enable UDP Csum */ + GDM_STRPCRC | /* Strip CRC from packet */ + GDM_DST_PORT_CPU << GDM_UFRC_P_SHIFT | /* fwd UCast to CPU */ + GDM_DST_PORT_CPU << GDM_BFRC_P_SHIFT | /* fwd BCast to CPU */ + GDM_DST_PORT_CPU << GDM_MFRC_P_SHIFT | /* fwd MCast to CPU */ + GDM_DST_PORT_CPU << GDM_OFRC_P_SHIFT /* fwd Other to CPU */ + )); } static void Modified: head/sys/dev/rt/if_rtreg.h ============================================================================== --- head/sys/dev/rt/if_rtreg.h Thu Feb 9 04:45:18 2017 (r313464) +++ head/sys/dev/rt/if_rtreg.h Thu Feb 9 07:29:07 2017 (r313465) @@ -105,9 +105,10 @@ #define FOE_TS_TIMESTAMP_MASK 0x0000ffff #define FOE_TS_TIMESTAMP_SHIFT 0 -#define GDMA1_BASE 0x0020 -#define GDMA2_BASE 0x0060 -#define CDMA_BASE 0x0080 +#define GDMA1_BASE 0x0020 +#define GDMA2_BASE 0x0060 +#define CDMA_BASE 0x0080 +#define MT7620_GDMA1_BASE 0x600 #define GDMA_FWD_CFG 0x00 /* Only GDMA */ #define GDM_DROP_256B (1<<23) Modified: head/sys/dev/rt/if_rtvar.h ============================================================================== --- head/sys/dev/rt/if_rtvar.h Thu Feb 9 04:45:18 2017 (r313464) +++ head/sys/dev/rt/if_rtvar.h Thu Feb 9 07:29:07 2017 (r313465) @@ -283,6 +283,7 @@ struct rt_softc uint32_t fe_int_enable; uint32_t pdma_glo_cfg; uint32_t pdma_rst_idx; + uint32_t gdma1_base; uint32_t tx_base_ptr[RT_SOFTC_TX_RING_COUNT]; uint32_t tx_max_cnt[RT_SOFTC_TX_RING_COUNT]; uint32_t tx_ctx_idx[RT_SOFTC_TX_RING_COUNT]; From owner-svn-src-head@freebsd.org Thu Feb 9 08:19: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 DBDF0CD7763; Thu, 9 Feb 2017 08:19:31 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D3DC6C9; Thu, 9 Feb 2017 08:19:31 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v198JUrD041825; Thu, 9 Feb 2017 08:19:30 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v198JUDj041822; Thu, 9 Feb 2017 08:19:30 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702090819.v198JUDj041822@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 9 Feb 2017 08:19:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313467 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Thu, 09 Feb 2017 08:19:32 -0000 Author: mjg Date: Thu Feb 9 08:19:30 2017 New Revision: 313467 URL: https://svnweb.freebsd.org/changeset/base/313467 Log: locks: tidy up unlock fallback paths Update comments to note these functions are reachable if lockstat is enabled. Check if the lock has any bits set before attempting unlock, which saves an unnecessary atomic operation. Modified: head/sys/kern/kern_mutex.c head/sys/kern/kern_rwlock.c head/sys/kern/kern_sx.c Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Thu Feb 9 08:03:07 2017 (r313466) +++ head/sys/kern/kern_mutex.c Thu Feb 9 08:19:30 2017 (r313467) @@ -853,25 +853,24 @@ thread_lock_set(struct thread *td, struc /* * __mtx_unlock_sleep: the tougher part of releasing an MTX_DEF lock. * - * We are only called here if the lock is recursed or contested (i.e. we - * need to wake up a blocked thread). + * We are only called here if the lock is recursed, contested (i.e. we + * need to wake up a blocked thread) or lockstat probe is active. */ void __mtx_unlock_sleep(volatile uintptr_t *c, int opts, const char *file, int line) { struct mtx *m; struct turnstile *ts; + uintptr_t tid, v; if (SCHEDULER_STOPPED()) return; + tid = (uintptr_t)curthread; m = mtxlock2mtx(c); + v = MTX_READ_VALUE(m); - if (!mtx_recursed(m)) { - LOCKSTAT_PROFILE_RELEASE_LOCK(adaptive__release, m); - if (_mtx_release_lock(m, (uintptr_t)curthread)) - return; - } else { + if (v & MTX_RECURSED) { if (--(m->mtx_recurse) == 0) atomic_clear_ptr(&m->mtx_lock, MTX_RECURSED); if (LOCK_LOG_TEST(&m->lock_object, opts)) @@ -879,6 +878,10 @@ __mtx_unlock_sleep(volatile uintptr_t *c return; } + LOCKSTAT_PROFILE_RELEASE_LOCK(adaptive__release, m); + if (v == tid && _mtx_release_lock(m, tid)) + return; + /* * We have to lock the chain before the turnstile so this turnstile * can be removed from the hash list if it is empty. Modified: head/sys/kern/kern_rwlock.c ============================================================================== --- head/sys/kern/kern_rwlock.c Thu Feb 9 08:03:07 2017 (r313466) +++ head/sys/kern/kern_rwlock.c Thu Feb 9 08:19:30 2017 (r313467) @@ -1030,9 +1030,10 @@ __rw_wlock_hard(volatile uintptr_t *c, u } /* - * This function is called if the first try at releasing a write lock failed. - * This means that one of the 2 waiter bits must be set indicating that at - * least one thread is waiting on this lock. + * This function is called if lockstat is active or the first try at releasing + * a write lock failed. The latter means that the lock is recursed or one of + * the 2 waiter bits must be set indicating that at least one thread is waiting + * on this lock. */ void __rw_wunlock_hard(volatile uintptr_t *c, uintptr_t tid, const char *file, @@ -1047,18 +1048,19 @@ __rw_wunlock_hard(volatile uintptr_t *c, return; rw = rwlock2rw(c); - - if (!rw_recursed(rw)) { - LOCKSTAT_PROFILE_RELEASE_RWLOCK(rw__release, rw, - LOCKSTAT_WRITER); - if (_rw_write_unlock(rw, tid)) - return; - } else { + v = RW_READ_VALUE(rw); + if (v & RW_LOCK_WRITER_RECURSED) { if (--(rw->rw_recurse) == 0) atomic_clear_ptr(&rw->rw_lock, RW_LOCK_WRITER_RECURSED); + if (LOCK_LOG_TEST(&rw->lock_object, 0)) + CTR2(KTR_LOCK, "%s: %p unrecursing", __func__, rw); return; } + LOCKSTAT_PROFILE_RELEASE_RWLOCK(rw__release, rw, LOCKSTAT_WRITER); + if (v == tid && _rw_write_unlock(rw, tid)) + return; + KASSERT(rw->rw_lock & (RW_LOCK_READ_WAITERS | RW_LOCK_WRITE_WAITERS), ("%s: neither of the waiter flags are set", __func__)); Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Thu Feb 9 08:03:07 2017 (r313466) +++ head/sys/kern/kern_sx.c Thu Feb 9 08:19:30 2017 (r313467) @@ -749,12 +749,8 @@ _sx_xunlock_hard(struct sx *sx, uintptr_ MPASS(!(sx->sx_lock & SX_LOCK_SHARED)); - if (!sx_recursed(sx)) { - LOCKSTAT_PROFILE_RELEASE_RWLOCK(sx__release, sx, - LOCKSTAT_WRITER); - if (atomic_cmpset_rel_ptr(&sx->sx_lock, tid, SX_LOCK_UNLOCKED)) - return; - } else { + x = SX_READ_VALUE(sx); + if (x & SX_LOCK_RECURSED) { /* The lock is recursed, unrecurse one level. */ if ((--sx->sx_recurse) == 0) atomic_clear_ptr(&sx->sx_lock, SX_LOCK_RECURSED); @@ -762,6 +758,12 @@ _sx_xunlock_hard(struct sx *sx, uintptr_ CTR2(KTR_LOCK, "%s: %p unrecursing", __func__, sx); return; } + + LOCKSTAT_PROFILE_RELEASE_RWLOCK(sx__release, sx, LOCKSTAT_WRITER); + if (x == tid && + atomic_cmpset_rel_ptr(&sx->sx_lock, tid, SX_LOCK_UNLOCKED)) + return; + MPASS(sx->sx_lock & (SX_LOCK_SHARED_WAITERS | SX_LOCK_EXCLUSIVE_WAITERS)); if (LOCK_LOG_TEST(&sx->lock_object, 0)) From owner-svn-src-head@freebsd.org Thu Feb 9 13:32: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 25B5FCD6B72; Thu, 9 Feb 2017 13:32:21 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E43CC1A00; Thu, 9 Feb 2017 13:32:20 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19DWKnn074831; Thu, 9 Feb 2017 13:32:20 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19DWKGW074830; Thu, 9 Feb 2017 13:32:20 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702091332.v19DWKGW074830@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 9 Feb 2017 13:32:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313472 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Thu, 09 Feb 2017 13:32:21 -0000 Author: mjg Date: Thu Feb 9 13:32:19 2017 New Revision: 313472 URL: https://svnweb.freebsd.org/changeset/base/313472 Log: rwlock: fix r313454 The runlock slow path would update wrong variable before restarting the loop, in effect corrupting the state. Reported by: pho Modified: head/sys/kern/kern_rwlock.c Modified: head/sys/kern/kern_rwlock.c ============================================================================== --- head/sys/kern/kern_rwlock.c Thu Feb 9 09:02:45 2017 (r313471) +++ head/sys/kern/kern_rwlock.c Thu Feb 9 13:32:19 2017 (r313472) @@ -755,7 +755,7 @@ __rw_runlock_hard(volatile uintptr_t *c, if (!atomic_cmpset_rel_ptr(&rw->rw_lock, RW_READERS_LOCK(1) | v, x)) { turnstile_chain_unlock(&rw->lock_object); - x = RW_READ_VALUE(rw); + v = RW_READ_VALUE(rw); continue; } if (LOCK_LOG_TEST(&rw->lock_object, 0)) From owner-svn-src-head@freebsd.org Thu Feb 9 15:16: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 E635CCD7314; Thu, 9 Feb 2017 15:16:09 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2C61285; Thu, 9 Feb 2017 15:16:09 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19FG8tr016674; Thu, 9 Feb 2017 15:16:08 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19FG8mA016673; Thu, 9 Feb 2017 15:16:08 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201702091516.v19FG8mA016673@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Thu, 9 Feb 2017 15:16:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313474 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Thu, 09 Feb 2017 15:16:10 -0000 Author: allanjude Date: Thu Feb 9 15:16:08 2017 New Revision: 313474 URL: https://svnweb.freebsd.org/changeset/base/313474 Log: Add I2C device hints for Onion Omega This allows you to control up to 8 relay expansions from FreeBSD https://github.com/freebsd/freebsd-wifi-build/wiki/Onion-Omega#controlling-the-relay-expansion Reviewed by: adrian, mizhka MFC after: 1 week Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D9503 Modified: head/sys/mips/conf/ONIONOMEGA.hints Modified: head/sys/mips/conf/ONIONOMEGA.hints ============================================================================== --- head/sys/mips/conf/ONIONOMEGA.hints Thu Feb 9 14:47:34 2017 (r313473) +++ head/sys/mips/conf/ONIONOMEGA.hints Thu Feb 9 15:16:08 2017 (r313474) @@ -123,3 +123,10 @@ hint.gpioled.3.pins=0x00008000 hint.gpioled.3.name="blue" hint.gpioled.3.invert=0 +# I2C +# 0x20 - 0x27 = Relay Controllers (0x27 is default) +# 0x5a = PWM/Servo Controller +hint.gpioiic.0.at="gpiobus0" +hint.gpioiic.0.pins=0x300000 # pins 20 and 21 +hint.gpioiic.0.scl=0 # pin 20 +hint.gpioiic.0.sda=1 # pin 21 From owner-svn-src-head@freebsd.org Thu Feb 9 17:47: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 9B3C3CD7E7B; Thu, 9 Feb 2017 17:47:03 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 597AF1A00; Thu, 9 Feb 2017 17:47:03 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19Hl2c2079798; Thu, 9 Feb 2017 17:47:02 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19Hl1Hx079792; Thu, 9 Feb 2017 17:47:01 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201702091747.v19Hl1Hx079792@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Thu, 9 Feb 2017 17:47:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313475 - in head: lib/libstand sbin/fsck_ffs sys/ufs/ufs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Thu, 09 Feb 2017 17:47:03 -0000 Author: cem Date: Thu Feb 9 17:47:01 2017 New Revision: 313475 URL: https://svnweb.freebsd.org/changeset/base/313475 Log: ufs: Use UFS_MAXNAMLEN constant (like NFS, EXT2FS, SVR4, IBCS2) instead of redefining the MAXNAMLEN constant. No functional change. Reviewed by: kib@, markj@ Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D9500 Modified: head/lib/libstand/ufs.c head/sbin/fsck_ffs/fsutil.c head/sbin/fsck_ffs/pass3.c head/sys/ufs/ufs/dir.h head/sys/ufs/ufs/dirhash.h head/sys/ufs/ufs/ufs_lookup.c Modified: head/lib/libstand/ufs.c ============================================================================== --- head/lib/libstand/ufs.c Thu Feb 9 15:16:08 2017 (r313474) +++ head/lib/libstand/ufs.c Thu Feb 9 17:47:01 2017 (r313475) @@ -586,7 +586,7 @@ ufs_open(upath, f) ncp = cp; while ((c = *cp) != '\0' && c != '/') { - if (++len > MAXNAMLEN) { + if (++len > UFS_MAXNAMLEN) { rc = ENOENT; goto out; } Modified: head/sbin/fsck_ffs/fsutil.c ============================================================================== --- head/sbin/fsck_ffs/fsutil.c Thu Feb 9 15:16:08 2017 (r313474) +++ head/sbin/fsck_ffs/fsutil.c Thu Feb 9 17:47:01 2017 (r313475) @@ -889,7 +889,7 @@ getpathname(char *namebuf, ino_t curdir, cp -= len; memmove(cp, namebuf, (size_t)len); *--cp = '/'; - if (cp < &namebuf[MAXNAMLEN]) + if (cp < &namebuf[UFS_MAXNAMLEN]) break; ino = idesc.id_number; } Modified: head/sbin/fsck_ffs/pass3.c ============================================================================== --- head/sbin/fsck_ffs/pass3.c Thu Feb 9 15:16:08 2017 (r313474) +++ head/sbin/fsck_ffs/pass3.c Thu Feb 9 17:47:01 2017 (r313475) @@ -52,7 +52,7 @@ pass3(void) int loopcnt, inpindex, state; ino_t orphan; struct inodesc idesc; - char namebuf[MAXNAMLEN+1]; + char namebuf[UFS_MAXNAMLEN+1]; for (inpindex = inplast - 1; inpindex >= 0; inpindex--) { if (got_siginfo) { Modified: head/sys/ufs/ufs/dir.h ============================================================================== --- head/sys/ufs/ufs/dir.h Thu Feb 9 15:16:08 2017 (r313474) +++ head/sys/ufs/ufs/dir.h Thu Feb 9 17:47:01 2017 (r313475) @@ -57,7 +57,7 @@ * the length of the entry, and the length of the name contained in * the entry. These are followed by the name padded to a 4 byte boundary * with null bytes. All names are guaranteed null terminated. - * The maximum length of a name in a directory is MAXNAMLEN. + * The maximum length of a name in a directory is UFS_MAXNAMLEN. * * The macro DIRSIZ(fmt, dp) gives the amount of space required to represent * a directory entry. Free space in a directory is represented by @@ -72,14 +72,15 @@ * dp->d_ino set to 0. */ #define DIRBLKSIZ DEV_BSIZE -#define MAXNAMLEN 255 +#define UFS_MAXNAMLEN 255 struct direct { u_int32_t d_ino; /* inode number of entry */ u_int16_t d_reclen; /* length of this record */ u_int8_t d_type; /* file type, see below */ u_int8_t d_namlen; /* length of string in d_name */ - char d_name[MAXNAMLEN + 1];/* name with length <= MAXNAMLEN */ + char d_name[UFS_MAXNAMLEN + 1]; + /* name with length <= UFS_MAXNAMLEN */ }; /* @@ -124,7 +125,7 @@ struct direct { /* * Template for manipulating directories. Should use struct direct's, - * but the name field is MAXNAMLEN - 1, and this just won't do. + * but the name field is UFS_MAXNAMLEN - 1, and this just won't do. */ struct dirtemplate { u_int32_t dot_ino; Modified: head/sys/ufs/ufs/dirhash.h ============================================================================== --- head/sys/ufs/ufs/dirhash.h Thu Feb 9 15:16:08 2017 (r313474) +++ head/sys/ufs/ufs/dirhash.h Thu Feb 9 17:47:01 2017 (r313475) @@ -48,7 +48,7 @@ #define DIRHASH_DEL (-2) /* deleted entry; may be part of chain */ #define DIRALIGN 4 -#define DH_NFSTATS (DIRECTSIZ(MAXNAMLEN + 1) / DIRALIGN) +#define DH_NFSTATS (DIRECTSIZ(UFS_MAXNAMLEN + 1) / DIRALIGN) /* max DIRALIGN words in a directory entry */ /* Modified: head/sys/ufs/ufs/ufs_lookup.c ============================================================================== --- head/sys/ufs/ufs/ufs_lookup.c Thu Feb 9 15:16:08 2017 (r313474) +++ head/sys/ufs/ufs/ufs_lookup.c Thu Feb 9 17:47:01 2017 (r313475) @@ -771,7 +771,7 @@ ufs_dirbad(ip, offset, how) * record length must be multiple of 4 * entry must fit in rest of its DIRBLKSIZ block * record must be large enough to contain entry - * name is not longer than MAXNAMLEN + * name is not longer than UFS_MAXNAMLEN * name must be as long as advertised, and null terminated */ int @@ -792,7 +792,7 @@ ufs_dirbadentry(dp, ep, entryoffsetinblo # endif if ((ep->d_reclen & 0x3) != 0 || ep->d_reclen > DIRBLKSIZ - (entryoffsetinblock & (DIRBLKSIZ - 1)) || - ep->d_reclen < DIRSIZ(OFSFMT(dp), ep) || namlen > MAXNAMLEN) { + ep->d_reclen < DIRSIZ(OFSFMT(dp), ep) || namlen > UFS_MAXNAMLEN) { /*return (1); */ printf("First bad\n"); goto bad; From owner-svn-src-head@freebsd.org Thu Feb 9 17:48: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 82FE6CD7F4F; Thu, 9 Feb 2017 17:48:34 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52AE01CEF; Thu, 9 Feb 2017 17:48:34 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19HmXsF080025; Thu, 9 Feb 2017 17:48:33 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19HmX6E080024; Thu, 9 Feb 2017 17:48:33 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201702091748.v19HmX6E080024@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 9 Feb 2017 17:48:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313476 - head/sys/dev/e1000 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Thu, 09 Feb 2017 17:48:34 -0000 Author: andrew Date: Thu Feb 9 17:48:33 2017 New Revision: 313476 URL: https://svnweb.freebsd.org/changeset/base/313476 Log: Add support for the Intel 82572EI back to em(4), it seems it was dropped when oving to iflib. Reviewed by: sbruno Sponsored by: ABT Systems Ltd Differential Revision: https://reviews.freebsd.org/D9511 Modified: head/sys/dev/e1000/if_em.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Thu Feb 9 17:47:01 2017 (r313475) +++ head/sys/dev/e1000/if_em.c Thu Feb 9 17:48:33 2017 (r313476) @@ -104,6 +104,7 @@ static pci_vendor_info_t em_vendor_info_ PVID(0x8086, E1000_DEV_ID_82571EB_QUAD_COPPER_LP, "Intel(R) PRO/1000 Network Connection"), PVID(0x8086, E1000_DEV_ID_82571EB_QUAD_FIBER, "Intel(R) PRO/1000 Network Connection"), PVID(0x8086, E1000_DEV_ID_82571PT_QUAD_COPPER, "Intel(R) PRO/1000 Network Connection"), + PVID(0x8086, E1000_DEV_ID_82572EI, "Intel(R) PRO/1000 Network Connection"), PVID(0x8086, E1000_DEV_ID_82572EI_COPPER, "Intel(R) PRO/1000 Network Connection"), PVID(0x8086, E1000_DEV_ID_82572EI_FIBER, "Intel(R) PRO/1000 Network Connection"), PVID(0x8086, E1000_DEV_ID_82572EI_SERDES, "Intel(R) PRO/1000 Network Connection"), From owner-svn-src-head@freebsd.org Thu Feb 9 19:58: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 E59A6CD889B; Thu, 9 Feb 2017 19:58:13 +0000 (UTC) (envelope-from garga@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFD821304; Thu, 9 Feb 2017 19:58:13 +0000 (UTC) (envelope-from garga@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19JwCvS034513; Thu, 9 Feb 2017 19:58:12 GMT (envelope-from garga@FreeBSD.org) Received: (from garga@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19JwCWi034512; Thu, 9 Feb 2017 19:58:12 GMT (envelope-from garga@FreeBSD.org) Message-Id: <201702091958.v19JwCWi034512@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: garga set sender to garga@FreeBSD.org using -f From: Renato Botelho Date: Thu, 9 Feb 2017 19:58:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313477 - head/usr.sbin/arp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Thu, 09 Feb 2017 19:58:14 -0000 Author: garga (ports committer) Date: Thu Feb 9 19:58:12 2017 New Revision: 313477 URL: https://svnweb.freebsd.org/changeset/base/313477 Log: Cleanup on usr.sbin/arp/arp.c * 'blackhole' and 'reject' are mutually exclusive, replace printf() by errx() when both are selected. * 'trail' option is no longer supported since first import of arp from 4.4BSD. XXX message was added 13 years ago in r128192. I believe it's time to remove it. * Use warnx() to print some informative messages instead of printf() * Replace strncmp() by strcmp() when validating parameters and exit when invalid parameter is found Reviewed by: allanjude, vangyzen, cem Approved by: allanjude MFC after: 1 week Sponsored by: Rubicon Communications (Netgate) Differential Revision: https://reviews.freebsd.org/D9504 Modified: head/usr.sbin/arp/arp.c Modified: head/usr.sbin/arp/arp.c ============================================================================== --- head/usr.sbin/arp/arp.c Thu Feb 9 17:48:33 2017 (r313476) +++ head/usr.sbin/arp/arp.c Thu Feb 9 19:58:12 2017 (r313477) @@ -319,7 +319,7 @@ set(int argc, char **argv) return (1); doing_proxy = flags = expire_time = 0; while (argc-- > 0) { - if (strncmp(argv[0], "temp", 4) == 0) { + if (strcmp(argv[0], "temp") == 0) { struct timespec tp; int max_age; size_t len = sizeof(max_age); @@ -329,10 +329,10 @@ set(int argc, char **argv) &max_age, &len, NULL, 0) != 0) err(1, "sysctlbyname"); expire_time = tp.tv_sec + max_age; - } else if (strncmp(argv[0], "pub", 3) == 0) { + } else if (strcmp(argv[0], "pub") == 0) { flags |= RTF_ANNOUNCE; doing_proxy = 1; - if (argc && strncmp(argv[1], "only", 3) == 0) { + if (argc && strcmp(argv[1], "only") == 0) { /* * Compatibility: in pre FreeBSD 8 times * the "only" keyword used to mean that @@ -341,29 +341,28 @@ set(int argc, char **argv) */ argc--; argv++; } - } else if (strncmp(argv[0], "blackhole", 9) == 0) { + } else if (strcmp(argv[0], "blackhole") == 0) { if (flags & RTF_REJECT) { - printf("Choose one of blackhole or reject, " + errx(1, "Choose one of blackhole or reject, " "not both."); } flags |= RTF_BLACKHOLE; - } else if (strncmp(argv[0], "reject", 6) == 0) { + } else if (strcmp(argv[0], "reject") == 0) { if (flags & RTF_BLACKHOLE) { - printf("Choose one of blackhole or reject, " + errx(1, "Choose one of blackhole or reject, " "not both."); } flags |= RTF_REJECT; - } else if (strncmp(argv[0], "trail", 5) == 0) { - /* XXX deprecated and undocumented feature */ - printf("%s: Sending trailers is no longer supported\n", - host); + } else { + warnx("Invalid parameter '%s'", argv[0]); + usage(); } argv++; } ea = (struct ether_addr *)LLADDR(&sdl_m); if (doing_proxy && !strcmp(eaddr, "auto")) { if (!get_ether_addr(dst->sin_addr.s_addr, ea)) { - printf("no interface found for %s\n", + warnx("no interface found for %s", inet_ntoa(dst->sin_addr)); return (1); } @@ -399,7 +398,7 @@ set(int argc, char **argv) if ((sdl->sdl_family != AF_LINK) || (rtm->rtm_flags & RTF_GATEWAY) || !valid_type(sdl->sdl_type)) { - printf("cannot intuit interface index and type for %s\n", host); + warnx("cannot intuit interface index and type for %s", host); return (1); } sdl_m.sdl_type = sdl->sdl_type; @@ -487,7 +486,7 @@ delete(char *host) * is a proxy-arp entry to remove. */ if (flags & RTF_ANNOUNCE) { - fprintf(stderr, "delete: cannot locate %s\n", host); + warnx("delete: cannot locate %s", host); return (1); } @@ -870,9 +869,8 @@ get_ether_addr(in_addr_t ipaddr, struct */ dla = (struct sockaddr_dl *) &ifr->ifr_addr; memcpy(hwaddr, LLADDR(dla), dla->sdl_alen); - printf("using interface %s for proxy with address ", - ifp->ifr_name); - printf("%s\n", ether_ntoa(hwaddr)); + printf("using interface %s for proxy with address %s\n", ifp->ifr_name, + ether_ntoa(hwaddr)); retval = dla->sdl_alen; done: close(sock); From owner-svn-src-head@freebsd.org Thu Feb 9 21:30: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 03380CD8B4F; Thu, 9 Feb 2017 21:30:55 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CAFC11CAF; Thu, 9 Feb 2017 21:30:54 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19LUrw0072599; Thu, 9 Feb 2017 21:30:53 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19LUr2R072597; Thu, 9 Feb 2017 21:30:53 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201702092130.v19LUr2R072597@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 9 Feb 2017 21:30:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313483 - in head/sys/cddl/contrib/opensolaris/uts/common: fs/zfs sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Thu, 09 Feb 2017 21:30:55 -0000 Author: asomers Date: Thu Feb 9 21:30:53 2017 New Revision: 313483 URL: https://svnweb.freebsd.org/changeset/base/313483 Log: Fix setting birthtime in ZFS sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c * In zfs_freebsd_setattr, if the caller wants to set the birthtime, set the bits that zfs_settattr expects * In zfs_setattr, if XAT_CREATETIME is set, set xoa_createtime, expected by zfs_xvattr_set. The two levels of indirection seem excessive, but it minimizes diffs vs OpenZFS. * In zfs_setattr, check for overflow of va_birthtime (from delphij) * Remove red herring in zfs_getattr sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h * Un-booby-trap some macros New tests are under review at https://github.com/pjd/pjdfstest/pull/6 Reviewed by: avg MFC after: 3 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D9353 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c head/sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Feb 9 21:29:18 2017 (r313482) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Feb 9 21:30:53 2017 (r313483) @@ -2786,15 +2786,6 @@ zfs_getattr(vnode_t *vp, vattr_t *vap, i zfs_sa_get_scanstamp(zp, xvap); } - if (XVA_ISSET_REQ(xvap, XAT_CREATETIME)) { - uint64_t times[2]; - - (void) sa_lookup(zp->z_sa_hdl, SA_ZPL_CRTIME(zfsvfs), - times, sizeof (times)); - ZFS_TIME_DECODE(&xoap->xoa_createtime, times); - XVA_SET_RTN(xvap, XAT_CREATETIME); - } - if (XVA_ISSET_REQ(xvap, XAT_REPARSE)) { xoap->xoa_reparse = ((zp->z_pflags & ZFS_REPARSE) != 0); XVA_SET_RTN(xvap, XAT_REPARSE); @@ -2956,6 +2947,11 @@ zfs_setattr(vnode_t *vp, vattr_t *vap, i return (SET_ERROR(EOVERFLOW)); } } + if (xoap && (mask & AT_XVATTR) && XVA_ISSET_REQ(xvap, XAT_CREATETIME) && + TIMESPEC_OVERFLOW(&vap->va_birthtime)) { + ZFS_EXIT(zfsvfs); + return (SET_ERROR(EOVERFLOW)); + } attrzp = NULL; aclp = NULL; @@ -3400,6 +3396,8 @@ zfs_setattr(vnode_t *vp, vattr_t *vap, i if (xoap && (mask & AT_XVATTR)) { + if (XVA_ISSET_REQ(xvap, XAT_CREATETIME)) + xoap->xoa_createtime = vap->va_birthtime; /* * restore trimmed off masks * so that return masks can be set for caller. @@ -5251,6 +5249,10 @@ zfs_freebsd_setattr(ap) xvap.xva_xoptattrs.xoa_sparse); #undef FLAG_CHANGE } + if (vap->va_birthtime.tv_sec != VNOVAL) { + xvap.xva_vattr.va_mask |= AT_XVATTR; + XVA_SET_REQ(&xvap, XAT_CREATETIME); + } return (zfs_setattr(vp, (vattr_t *)&xvap, 0, cred, NULL)); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h Thu Feb 9 21:29:18 2017 (r313482) +++ head/sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h Thu Feb 9 21:30:53 2017 (r313483) @@ -268,27 +268,30 @@ typedef struct xvattr { * XVA_SET_REQ() sets an attribute bit in the proper element in the bitmap * of requested attributes (xva_reqattrmap[]). */ -#define XVA_SET_REQ(xvap, attr) \ +#define XVA_SET_REQ(xvap, attr) { \ ASSERT((xvap)->xva_vattr.va_mask | AT_XVATTR); \ ASSERT((xvap)->xva_magic == XVA_MAGIC); \ - (xvap)->xva_reqattrmap[XVA_INDEX(attr)] |= XVA_ATTRBIT(attr) + (xvap)->xva_reqattrmap[XVA_INDEX(attr)] |= XVA_ATTRBIT(attr); \ +} /* * XVA_CLR_REQ() clears an attribute bit in the proper element in the bitmap * of requested attributes (xva_reqattrmap[]). */ -#define XVA_CLR_REQ(xvap, attr) \ +#define XVA_CLR_REQ(xvap, attr) { \ ASSERT((xvap)->xva_vattr.va_mask | AT_XVATTR); \ ASSERT((xvap)->xva_magic == XVA_MAGIC); \ - (xvap)->xva_reqattrmap[XVA_INDEX(attr)] &= ~XVA_ATTRBIT(attr) + (xvap)->xva_reqattrmap[XVA_INDEX(attr)] &= ~XVA_ATTRBIT(attr); \ +} /* * XVA_SET_RTN() sets an attribute bit in the proper element in the bitmap * of returned attributes (xva_rtnattrmap[]). */ -#define XVA_SET_RTN(xvap, attr) \ +#define XVA_SET_RTN(xvap, attr) { \ ASSERT((xvap)->xva_vattr.va_mask | AT_XVATTR); \ ASSERT((xvap)->xva_magic == XVA_MAGIC); \ - (XVA_RTNATTRMAP(xvap))[XVA_INDEX(attr)] |= XVA_ATTRBIT(attr) + (XVA_RTNATTRMAP(xvap))[XVA_INDEX(attr)] |= XVA_ATTRBIT(attr); \ +} /* * XVA_ISSET_REQ() checks the requested attribute bitmap (xva_reqattrmap[]) From owner-svn-src-head@freebsd.org Thu Feb 9 23:15: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 4FE22CD8C3B; Thu, 9 Feb 2017 23:15:13 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1930E2A9; Thu, 9 Feb 2017 23:15:13 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19NFCKm018437; Thu, 9 Feb 2017 23:15:12 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19NFC9I018435; Thu, 9 Feb 2017 23:15:12 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702092315.v19NFC9I018435@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 9 Feb 2017 23:15:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313490 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Thu, 09 Feb 2017 23:15:13 -0000 Author: adrian Date: Thu Feb 9 23:15:11 2017 New Revision: 313490 URL: https://svnweb.freebsd.org/changeset/base/313490 Log: [ath] initial station side quiet IE support. This implements hardware assisted quiet IE support. Quiet time is an optional interval on DFS channels (but doesn't have to be DFS only channels! sigh) where the station and AP can be quiet in order to allow for channel utilisation measurements. Typically that's stuff like radar detection, spectral scan, other-BSS frame sniffing, checking how busy the air is, etc. The hardware implements it as one of the generic timers, which is supplied a period, offset from the trigger period and duration to stay quiet. The AP can announce quiet time configurations which change, and so this code also tracks that. Implementation details: * track the current quiet time IE * compare the new one against the previous one - if only the TBTT counter changes, don't update things * If tbttcount=1 then program it into the hardware - that is when it is easiest to program the correct starting offset (one TBTT + configured offset). * .. later on check to see if it can be done on any tbttcount * If the IE goes away then remove the quiet timer and clear the config * Upon reset, state change, new beacon - clear quiet time IE and just let it resync from the next beacon. History: This was work done initially by sibridgetech.com in 2011/2012/2013 as part of some FreeBSD wifi DFS contracting work they had for a third party. They implemented the net80211 quiet time IE pieces and had some test code for the station side which didn't entirely use the timers correctly. I figured out how to use the timers correctly without stopping/starting the transmit DMA engine each time. When done correctly, the timer just needs to be programmed once and left alone until the next configuration change. So, thanks to Himali Patel and Parthiv Shah for their work way back then. I finally figured it out and finished it! TODO: * Now, I'd rather net80211 did the quiet time IE tracking and parsing, pushing configurations into the driver is needed. I'll look at doing that in a subsequent update. * This doesn't handle multiple quiet time IEs, which will currently just mess things up. I'll look into supporting that in the future (at least by only obeying "one" of them, and then ignoring subsequent IEs in a beacon/probe frame.) * This also implements the STA side and not the AP side - the AP side will come later, and involves taking various other intervals into account (eg the beacon offset for multi-VAP modes, the SWBA time, etc, etc) as well as obtaining the configuration when a beacon is configured/generated rather than "hearing" an IE. * .. investigate supporting quiet IE in mesh, tdma, ibss modes * .. investigate supporting quiet IE for non-DFS channels (so this can be done for say, 2GHz channels.) * Chances are i should commit NULL methods for the ar5210, ar5211 HALs.. Tested: * AR9380, STA mode - announcing quiet, removing quiet, changing quite time config, whilst doing iperf testing; * AR9380, AP mode. Modified: head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_ath_beacon.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Thu Feb 9 22:57:56 2017 (r313489) +++ head/sys/dev/ath/if_ath.c Thu Feb 9 23:15:11 2017 (r313490) @@ -199,6 +199,7 @@ static void ath_set_channel(struct ieee8 #ifdef ATH_ENABLE_11N static void ath_update_chw(struct ieee80211com *); #endif /* ATH_ENABLE_11N */ +static int ath_set_quiet_ie(struct ieee80211_node *, uint8_t *); static void ath_calibrate(void *); static int ath_newstate(struct ieee80211vap *, enum ieee80211_state, int); static void ath_setup_stationkey(struct ieee80211_node *); @@ -1325,6 +1326,7 @@ ath_attach(u_int16_t devid, struct ath_s ic->ic_update_chw = ath_update_chw; #endif /* ATH_ENABLE_11N */ + ic->ic_set_quiet = ath_set_quiet_ie; #ifdef ATH_ENABLE_RADIOTAP_VENDOR_EXT /* @@ -2523,6 +2525,20 @@ ath_settkipmic(struct ath_softc *sc) } } +static void +ath_vap_clear_quiet_ie(struct ath_softc *sc) +{ + struct ieee80211com *ic = &sc->sc_ic; + struct ieee80211vap *vap; + struct ath_vap *avp; + + TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) { + avp = ATH_VAP(vap); + /* Quiet time handling - ensure we resync */ + memset(&avp->quiet_ie, 0, sizeof(avp->quiet_ie)); + } +} + static int ath_init(struct ath_softc *sc) { @@ -2569,6 +2585,9 @@ ath_init(struct ath_softc *sc) sc->sc_rx_resetted = 1; ATH_RX_UNLOCK(sc); + /* Clear quiet IE state for each VAP */ + ath_vap_clear_quiet_ie(sc); + ath_chan_change(sc, ic->ic_curchan); /* Let DFS at it in case it's a DFS channel */ @@ -2950,6 +2969,9 @@ ath_reset(struct ath_softc *sc, ATH_RESE sc->sc_rx_resetted = 1; ATH_RX_UNLOCK(sc); + /* Quiet time handling - ensure we resync */ + ath_vap_clear_quiet_ie(sc); + /* Let DFS at it in case it's a DFS channel */ ath_dfs_radar_enable(sc, ic->ic_curchan); @@ -4157,9 +4179,12 @@ ath_tx_update_stats(struct ath_softc *sc sc->sc_ant_tx[txant]++; if (ts->ts_finaltsi != 0) sc->sc_stats.ast_tx_altrate++; + + /* XXX TODO: should do per-pri conuters */ pri = M_WME_GETAC(bf->bf_m); if (pri >= WME_AC_VO) ic->ic_wme.wme_hipri_traffic++; + if ((bf->bf_state.bfs_txflags & HAL_TXDESC_NOACK) == 0) ni->ni_inact = ni->ni_inact_reload; } else { @@ -5243,6 +5268,9 @@ ath_chan_set(struct ath_softc *sc, struc sc->sc_rx_resetted = 1; ATH_RX_UNLOCK(sc); + /* Quiet time handling - ensure we resync */ + ath_vap_clear_quiet_ie(sc); + /* Let DFS at it in case it's a DFS channel */ ath_dfs_radar_enable(sc, chan); @@ -5516,11 +5544,154 @@ ath_update_chw(struct ieee80211com *ic) { struct ath_softc *sc = ic->ic_softc; - DPRINTF(sc, ATH_DEBUG_STATE, "%s: called\n", __func__); + //DPRINTF(sc, ATH_DEBUG_STATE, "%s: called\n", __func__); + device_printf(sc->sc_dev, "%s: called\n", __func__); + + /* + * XXX TODO: schedule a tasklet that stops things without freeing, + * walks the now stopped TX queue(s) looking for frames to retry + * as if we TX filtered them (whch may mean dropping non-ampdu frames!) + * but okay) then place them back on the software queue so they + * can have the rate control lookup done again. + */ ath_set_channel(ic); } #endif /* ATH_ENABLE_11N */ +/* + * This is called by the beacon parsing routine in the receive + * path to update the current quiet time information provided by + * an AP. + * + * This is STA specific, it doesn't take the AP TBTT/beacon slot + * offset into account. + * + * The quiet IE doesn't control the /now/ beacon interval - it + * controls the upcoming beacon interval. So, when tbtt=1, + * the quiet element programming shall be for the next beacon + * interval. There's no tbtt=0 behaviour defined, so don't. + * + * Since we're programming the next quiet interval, we have + * to keep in mind what we will see when the next beacon + * is received with potentially a quiet IE. For example, if + * quiet_period is 1, then we are always getting a quiet interval + * each TBTT - so if we just program it in upon each beacon received, + * it will constantly reflect the "next" TBTT and we will never + * let the counter stay programmed correctly. + * + * So: + * + the first time we see the quiet IE, program it and store + * the details somewhere; + * + if the quiet parameters don't change (ie, period/duration/offset) + * then just leave the programming enabled; + * + (we can "skip" beacons, so don't try to enforce tbttcount unless + * you're willing to also do the skipped beacon math); + * + if the quiet IE is removed, then halt quiet time. + */ +static int +ath_set_quiet_ie(struct ieee80211_node *ni, uint8_t *ie) +{ + struct ieee80211_quiet_ie *q; + struct ieee80211vap *vap = ni->ni_vap; + struct ath_vap *avp = ATH_VAP(vap); + struct ieee80211com *ic = vap->iv_ic; + struct ath_softc *sc = ic->ic_softc; + + if (vap->iv_opmode != IEEE80211_M_STA) + return (0); + + /* Verify we have a quiet time IE */ + if (ie == NULL) { + DPRINTF(sc, ATH_DEBUG_QUIETIE, + "%s: called; NULL IE, disabling\n", __func__); + + ath_hal_set_quiet(sc->sc_ah, 0, 0, 0, HAL_QUIET_DISABLE); + memset(&avp->quiet_ie, 0, sizeof(avp->quiet_ie)); + return (0); + } + + /* If we do, verify it's actually legit */ + if (ie[0] != IEEE80211_ELEMID_QUIET) + return 0; + if (ie[1] != 6) + return 0; + + /* Note: this belongs in net80211, parsed out and everything */ + q = (void *) ie; + + /* + * Compare what we have stored to what we last saw. + * If they're the same then don't program in anything. + */ + if ((q->period == avp->quiet_ie.period) && + (le16dec(&q->duration) == le16dec(&avp->quiet_ie.duration)) && + (le16dec(&q->offset) == le16dec(&avp->quiet_ie.offset))) + return (0); + + DPRINTF(sc, ATH_DEBUG_QUIETIE, + "%s: called; tbttcount=%d, period=%d, duration=%d, offset=%d\n", + __func__, + (int) q->tbttcount, + (int) q->period, + (int) le16dec(&q->duration), + (int) le16dec(&q->offset)); + + /* + * Don't program in garbage values. + */ + if ((le16dec(&q->duration) == 0) || + (le16dec(&q->duration) >= ni->ni_intval)) { + DPRINTF(sc, ATH_DEBUG_QUIETIE, + "%s: invalid duration (%d)\n", __func__, + le16dec(&q->duration)); + return (0); + } + /* + * Can have a 0 offset, but not a duration - so just check + * they don't exceed the intval. + */ + if (le16dec(&q->duration) + le16dec(&q->offset) >= ni->ni_intval) { + DPRINTF(sc, ATH_DEBUG_QUIETIE, + "%s: invalid duration + offset (%d+%d)\n", __func__, + le16dec(&q->duration), + le16dec(&q->offset)); + return (0); + } + if (q->tbttcount == 0) { + DPRINTF(sc, ATH_DEBUG_QUIETIE, + "%s: invalid tbttcount (0)\n", __func__); + return (0); + } + if (q->period == 0) { + DPRINTF(sc, ATH_DEBUG_QUIETIE, + "%s: invalid period (0)\n", __func__); + return (0); + } + + /* + * This is a new quiet time IE config, so wait until tbttcount + * is equal to 1, and program it in. + */ + if (q->tbttcount == 1) { + DPRINTF(sc, ATH_DEBUG_QUIETIE, + "%s: programming\n", __func__); + ath_hal_set_quiet(sc->sc_ah, + q->period * ni->ni_intval, /* convert to TU */ + le16dec(&q->duration), /* already in TU */ + le16dec(&q->offset) + ni->ni_intval, + HAL_QUIET_ENABLE | HAL_QUIET_ADD_CURRENT_TSF); + /* + * Note: no HAL_QUIET_ADD_SWBA_RESP_TIME; as this is for + * STA mode + */ + + /* Update local state */ + memcpy(&avp->quiet_ie, ie, sizeof(struct ieee80211_quiet_ie)); + } + + return (0); +} + static void ath_set_channel(struct ieee80211com *ic) { @@ -5826,6 +5997,9 @@ ath_newstate(struct ieee80211vap *vap, e "%s: STA; syncbeacon=1\n", __func__); sc->sc_syncbeacon = 1; + /* Quiet time handling - ensure we resync */ + memset(&avp->quiet_ie, 0, sizeof(avp->quiet_ie)); + if (csa_run_transition) ath_beacon_config(sc, vap); @@ -5891,6 +6065,10 @@ ath_newstate(struct ieee80211vap *vap, e taskqueue_unblock(sc->sc_tq); } else if (nstate == IEEE80211_S_INIT) { + + /* Quiet time handling - ensure we resync */ + memset(&avp->quiet_ie, 0, sizeof(avp->quiet_ie)); + /* * If there are no vaps left in RUN state then * shutdown host/driver operation: @@ -5934,6 +6112,9 @@ ath_newstate(struct ieee80211vap *vap, e } ATH_UNLOCK(sc); } + } else if (nstate == IEEE80211_S_SCAN) { + /* Quiet time handling - ensure we resync */ + memset(&avp->quiet_ie, 0, sizeof(avp->quiet_ie)); } bad: ieee80211_free_node(ni); Modified: head/sys/dev/ath/if_ath_beacon.c ============================================================================== --- head/sys/dev/ath/if_ath_beacon.c Thu Feb 9 22:57:56 2017 (r313489) +++ head/sys/dev/ath/if_ath_beacon.c Thu Feb 9 23:15:11 2017 (r313490) @@ -761,6 +761,12 @@ ath_beacon_generate(struct ath_softc *sc bus_dmamap_sync(sc->sc_dmat, bf->bf_dmamap, BUS_DMASYNC_PREWRITE); /* + * XXX TODO: tie into net80211 for quiet time IE update and program + * local AP timer if we require it. The process of updating the + * beacon will also update the IE with the relevant counters. + */ + + /* * Enable the CAB queue before the beacon queue to * insure cab frames are triggered by this beacon. */ @@ -917,6 +923,7 @@ ath_beacon_config(struct ath_softc *sc, ((((u_int32_t)(_h)) << 22) | (((u_int32_t)(_l)) >> 10)) #define FUDGE 2 struct ath_hal *ah = sc->sc_ah; + struct ath_vap *avp; struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_node *ni; u_int32_t nexttbtt, intval, tsftu; @@ -935,12 +942,19 @@ ath_beacon_config(struct ath_softc *sc, return; } + /* Now that we have a vap, we can do this bit */ + avp = ATH_VAP(vap); + ni = ieee80211_ref_node(vap->iv_bss); ATH_LOCK(sc); ath_power_set_power_state(sc, HAL_PM_AWAKE); ATH_UNLOCK(sc); + /* Always clear the quiet IE timers; let the next update program them */ + ath_hal_set_quiet(ah, 0, 0, 0, HAL_QUIET_DISABLE); + memset(&avp->quiet_ie, 0, sizeof(avp->quiet_ie)); + /* extract tstamp from last beacon and convert to TU */ nexttbtt = TSF_TO_TU(le32dec(ni->ni_tstamp.data + 4), le32dec(ni->ni_tstamp.data)); From owner-svn-src-head@freebsd.org Thu Feb 9 23:20: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 F1C7DCD8CEF; Thu, 9 Feb 2017 23:20:56 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2BC475F; Thu, 9 Feb 2017 23:20:56 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19NKti4020774; Thu, 9 Feb 2017 23:20:55 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19NKtHi020768; Thu, 9 Feb 2017 23:20:55 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702092320.v19NKtHi020768@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 9 Feb 2017 23:20:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313491 - in head/sys/dev/ath/ath_hal: ar5210 ar5211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Thu, 09 Feb 2017 23:20:57 -0000 Author: adrian Date: Thu Feb 9 23:20:55 2017 New Revision: 313491 URL: https://svnweb.freebsd.org/changeset/base/313491 Log: [ath_hal] implement NULL methods for ah_setQuiet for AR5210, AR5211. Tested: * "crap, I didn't bring my cardbus collection and T400 with me" compile tested. Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210.h head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c head/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c head/sys/dev/ath/ath_hal/ar5211/ar5211.h head/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c head/sys/dev/ath/ath_hal/ar5211/ar5211_misc.c Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210.h Thu Feb 9 23:15:11 2017 (r313490) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210.h Thu Feb 9 23:20:55 2017 (r313491) @@ -251,6 +251,8 @@ extern HAL_BOOL ar5210SetCTSTimeout(stru extern u_int ar5210GetCTSTimeout(struct ath_hal *); extern HAL_BOOL ar5210SetDecompMask(struct ath_hal *, uint16_t, int); void ar5210SetCoverageClass(struct ath_hal *, uint8_t, int); +extern HAL_STATUS ar5210SetQuiet(struct ath_hal *, uint32_t, uint32_t, + uint32_t, HAL_QUIET_FLAG); extern HAL_STATUS ar5210GetCapability(struct ath_hal *, HAL_CAPABILITY_TYPE, uint32_t, uint32_t *); extern HAL_BOOL ar5210SetCapability(struct ath_hal *, HAL_CAPABILITY_TYPE, Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c Thu Feb 9 23:15:11 2017 (r313490) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c Thu Feb 9 23:20:55 2017 (r313491) @@ -135,6 +135,7 @@ static const struct ath_hal_private ar52 .ah_getCTSTimeout = ar5210GetCTSTimeout, .ah_setDecompMask = ar5210SetDecompMask, .ah_setCoverageClass = ar5210SetCoverageClass, + .ah_setQuiet = ar5210SetQuiet, .ah_get11nExtBusy = ar5210Get11nExtBusy, .ah_getMibCycleCounts = ar5210GetMibCycleCounts, .ah_setChainMasks = ar5210SetChainMasks, Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c Thu Feb 9 23:15:11 2017 (r313490) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c Thu Feb 9 23:20:55 2017 (r313491) @@ -552,6 +552,13 @@ ar5210SetCoverageClass(struct ath_hal *a { } +HAL_STATUS +ar5210SetQuiet(struct ath_hal *ah, uint32_t period, uint32_t duration, + uint32_t next_start, HAL_QUIET_FLAG flags) +{ + return HAL_OK; +} + /* * Control Adaptive Noise Immunity Parameters */ Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211.h Thu Feb 9 23:15:11 2017 (r313490) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211.h Thu Feb 9 23:20:55 2017 (r313491) @@ -271,6 +271,8 @@ extern HAL_BOOL ar5211SetSifsTime(struct extern u_int ar5211GetSifsTime(struct ath_hal *); extern HAL_BOOL ar5211SetDecompMask(struct ath_hal *, uint16_t, int); extern void ar5211SetCoverageClass(struct ath_hal *, uint8_t, int); +extern HAL_STATUS ar5211SetQuiet(struct ath_hal *, uint32_t, uint32_t, + uint32_t, HAL_QUIET_FLAG); extern uint32_t ar5211GetCurRssi(struct ath_hal *); extern u_int ar5211GetDefAntenna(struct ath_hal *); extern void ar5211SetDefAntenna(struct ath_hal *ah, u_int antenna); Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c Thu Feb 9 23:15:11 2017 (r313490) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c Thu Feb 9 23:20:55 2017 (r313491) @@ -135,6 +135,7 @@ static const struct ath_hal_private ar52 .ah_getCTSTimeout = ar5211GetCTSTimeout, .ah_setDecompMask = ar5211SetDecompMask, .ah_setCoverageClass = ar5211SetCoverageClass, + .ah_setQuiet = ar5211SetQuiet, .ah_get11nExtBusy = ar5211Get11nExtBusy, .ah_getMibCycleCounts = ar5211GetMibCycleCounts, .ah_setChainMasks = ar5211SetChainMasks, Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211_misc.c Thu Feb 9 23:15:11 2017 (r313490) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211_misc.c Thu Feb 9 23:20:55 2017 (r313491) @@ -554,6 +554,13 @@ ar5211SetCoverageClass(struct ath_hal *a { } +HAL_STATUS +ar5211SetQuiet(struct ath_hal *ah, uint32_t period, uint32_t duration, + uint32_t next_start, HAL_QUIET_FLAG flags) +{ + return HAL_OK; +} + /* * Control Adaptive Noise Immunity Parameters */ From owner-svn-src-head@freebsd.org Thu Feb 9 23:29: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 9800CCD8FF4; Thu, 9 Feb 2017 23:29:58 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6519FCAD; Thu, 9 Feb 2017 23:29:58 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19NTvaB022605; Thu, 9 Feb 2017 23:29:57 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19NTvpu022604; Thu, 9 Feb 2017 23:29:57 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702092329.v19NTvpu022604@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 9 Feb 2017 23:29:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313492 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Thu, 09 Feb 2017 23:29:58 -0000 Author: adrian Date: Thu Feb 9 23:29:57 2017 New Revision: 313492 URL: https://svnweb.freebsd.org/changeset/base/313492 Log: [net80211] don't bother doing fragmentation if the driver supports fragmentation offload. Tested: * ath10k, which does its own fragmentation in firmware. Modified: head/sys/net80211/ieee80211_output.c Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Thu Feb 9 23:20:55 2017 (r313491) +++ head/sys/net80211/ieee80211_output.c Thu Feb 9 23:29:57 2017 (r313492) @@ -1631,12 +1631,20 @@ ieee80211_encap(struct ieee80211vap *vap __func__); } + /* + * Check if xmit fragmentation is required. + * + * If the hardware does fragmentation offload, then don't bother + * doing it here. + */ + if (IEEE80211_CONF_FRAG_OFFLOAD(ic)) + txfrag = 0; + else + txfrag = (m->m_pkthdr.len > vap->iv_fragthreshold && + !IEEE80211_IS_MULTICAST(wh->i_addr1) && + (vap->iv_caps & IEEE80211_C_TXFRAG) && + (m->m_flags & (M_FF | M_AMPDU_MPDU)) == 0); - /* check if xmit fragmentation is required */ - txfrag = (m->m_pkthdr.len > vap->iv_fragthreshold && - !IEEE80211_IS_MULTICAST(wh->i_addr1) && - (vap->iv_caps & IEEE80211_C_TXFRAG) && - (m->m_flags & (M_FF | M_AMPDU_MPDU)) == 0); if (key != NULL) { /* * IEEE 802.1X: send EAPOL frames always in the clear. From owner-svn-src-head@freebsd.org Thu Feb 9 23:32: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 E0F49CD818B; Thu, 9 Feb 2017 23:32:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B0C55F13; Thu, 9 Feb 2017 23:32:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19NW3vD024349; Thu, 9 Feb 2017 23:32:03 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19NW3n2024348; Thu, 9 Feb 2017 23:32:03 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702092332.v19NW3n2024348@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 9 Feb 2017 23:32:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313493 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Thu, 09 Feb 2017 23:32:05 -0000 Author: kib Date: Thu Feb 9 23:32:03 2017 New Revision: 313493 URL: https://svnweb.freebsd.org/changeset/base/313493 Log: Define ELF_ST_VISIBILITY(). Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/sys/elf_generic.h Modified: head/sys/sys/elf_generic.h ============================================================================== --- head/sys/sys/elf_generic.h Thu Feb 9 23:29:57 2017 (r313492) +++ head/sys/sys/elf_generic.h Thu Feb 9 23:32:03 2017 (r313493) @@ -84,5 +84,6 @@ __ElfType(Ssize); #define ELF_ST_BIND __ELFN(ST_BIND) #define ELF_ST_TYPE __ELFN(ST_TYPE) #define ELF_ST_INFO __ELFN(ST_INFO) +#define ELF_ST_VISIBILITY __ELFN(ST_VISIBILITY) #endif /* !_SYS_ELF_GENERIC_H_ */ From owner-svn-src-head@freebsd.org Thu Feb 9 23: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 7938BCD820C; Thu, 9 Feb 2017 23:33:07 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48F2311C1; Thu, 9 Feb 2017 23:33:07 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19NX6TU026724; Thu, 9 Feb 2017 23:33:06 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19NX6Ll026723; Thu, 9 Feb 2017 23:33:06 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702092333.v19NX6Ll026723@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 9 Feb 2017 23:33:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313494 - head/libexec/rtld-elf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Thu, 09 Feb 2017 23:33:07 -0000 Author: kib Date: Thu Feb 9 23:33:06 2017 New Revision: 313494 URL: https://svnweb.freebsd.org/changeset/base/313494 Log: Handle protected symbols in rtld. Protected symbol reference in GOT of the defining object must be resolved to itself, same as -Bsymbolic globally. Discussed with: emaste Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D9317 Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Thu Feb 9 23:32:03 2017 (r313493) +++ head/libexec/rtld-elf/rtld.c Thu Feb 9 23:33:06 2017 (r313494) @@ -3957,15 +3957,19 @@ symlook_default(SymLook *req, const Obj_ donelist_init(&donelist); symlook_init_from_req(&req1, req); - /* Look first in the referencing object if linked symbolically. */ - if (refobj->symbolic && !donelist_check(&donelist, refobj)) { - res = symlook_obj(&req1, refobj); - if (res == 0) { - req->sym_out = req1.sym_out; - req->defobj_out = req1.defobj_out; - assert(req->defobj_out != NULL); - } + /* + * Look first in the referencing object if linked symbolically, + * and similarly handle protected symbols. + */ + res = symlook_obj(&req1, refobj); + if (res == 0 && (refobj->symbolic || + ELF_ST_VISIBILITY(req1.sym_out->st_other) == STV_PROTECTED)) { + req->sym_out = req1.sym_out; + req->defobj_out = req1.defobj_out; + assert(req->defobj_out != NULL); } + if (refobj->symbolic || req->defobj_out != NULL) + donelist_check(&donelist, refobj); symlook_global(req, &donelist); From owner-svn-src-head@freebsd.org Thu Feb 9 23:35: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 F301DCD82C6; Thu, 9 Feb 2017 23:35:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A62DC1360; Thu, 9 Feb 2017 23:35:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19NZvtE026870; Thu, 9 Feb 2017 23:35:57 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19NZvSQ026869; Thu, 9 Feb 2017 23:35:57 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702092335.v19NZvSQ026869@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 9 Feb 2017 23:35:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313495 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Thu, 09 Feb 2017 23:35:59 -0000 Author: kib Date: Thu Feb 9 23:35:57 2017 New Revision: 313495 URL: https://svnweb.freebsd.org/changeset/base/313495 Log: Do not establish advisory locks when doing open(O_EXLOCK) or open(O_SHLOCK) for files which do not have DTYPE_VNODE type. Both flock(2) and fcntl(2) syscalls refuse to acquire advisory lock on a file which type is not DTYPE_VNODE. Do the same when lock is requested from open(2). Restructure the block in vn_open_vnode() which handles O_EXLOCK and O_SHLOCK open flags to make it easier to quit its execution earlier with an error. Tested by: pho (previous version) Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/kern/vfs_vnops.c Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Thu Feb 9 23:33:06 2017 (r313494) +++ head/sys/kern/vfs_vnops.c Thu Feb 9 23:35:57 2017 (r313495) @@ -349,8 +349,12 @@ vn_open_vnode(struct vnode *vp, int fmod if ((error = VOP_OPEN(vp, fmode, cred, td, fp)) != 0) return (error); - if (fmode & (O_EXLOCK | O_SHLOCK)) { + while ((fmode & (O_EXLOCK | O_SHLOCK)) != 0) { KASSERT(fp != NULL, ("open with flock requires fp")); + if (fp->f_type != DTYPE_VNODE) { + error = EBADF; + break; + } lock_flags = VOP_ISLOCKED(vp); VOP_UNLOCK(vp, 0); lf.l_whence = SEEK_SET; @@ -367,8 +371,12 @@ vn_open_vnode(struct vnode *vp, int fmod if (error == 0) fp->f_flag |= FHASLOCK; vn_lock(vp, lock_flags | LK_RETRY); - if (error == 0 && vp->v_iflag & VI_DOOMED) + if (error != 0) + break; + if ((vp->v_iflag & VI_DOOMED) != 0) { error = ENOENT; + break; + } /* * Another thread might have used this vnode as an @@ -376,20 +384,20 @@ vn_open_vnode(struct vnode *vp, int fmod * Ensure the vnode is still able to be opened for * writing after the lock has been obtained. */ - if (error == 0 && accmode & VWRITE) + if ((accmode & VWRITE) != 0) error = vn_writechk(vp); + break; + } - if (error != 0) { - fp->f_flag |= FOPENFAILED; - fp->f_vnode = vp; - if (fp->f_ops == &badfileops) { - fp->f_type = DTYPE_VNODE; - fp->f_ops = &vnops; - } - vref(vp); + if (error != 0) { + fp->f_flag |= FOPENFAILED; + fp->f_vnode = vp; + if (fp->f_ops == &badfileops) { + fp->f_type = DTYPE_VNODE; + fp->f_ops = &vnops; } - } - if (error == 0 && fmode & FWRITE) { + vref(vp); + } else if ((fmode & FWRITE) != 0) { VOP_ADD_WRITECOUNT(vp, 1); CTR3(KTR_VFS, "%s: vp %p v_writecount increased to %d", __func__, vp, vp->v_writecount); From owner-svn-src-head@freebsd.org Thu Feb 9 23:36: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 C0A92CD834A; Thu, 9 Feb 2017 23:36:51 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74250151B; Thu, 9 Feb 2017 23:36:51 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19NaoFm026956; Thu, 9 Feb 2017 23:36:50 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19NaoD2026955; Thu, 9 Feb 2017 23:36:50 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702092336.v19NaoD2026955@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 9 Feb 2017 23:36:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313496 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Thu, 09 Feb 2017 23:36:51 -0000 Author: kib Date: Thu Feb 9 23:36:50 2017 New Revision: 313496 URL: https://svnweb.freebsd.org/changeset/base/313496 Log: Increase a chance of devfs_close() calling d_close cdevsw method. If a file opened over a vnode has an advisory lock set at close, vn_closefile() acquires additional vnode use reference to prevent freeing the vnode in vn_close(). Side effect is that for device vnodes, devfs_close() sees that vnode reference count is greater than one and refuses to call d_close(). Create internal version of vn_close() which can avoid dropping the vnode reference if needed, and use this to execute VOP_CLOSE() without acquiring a new reference. Note that any parallel reference to the vnode would still prevent d_close call, if the reference is not from an opened file, e.g. due to stat(2). Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/kern/vfs_vnops.c Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Thu Feb 9 23:35:57 2017 (r313495) +++ head/sys/kern/vfs_vnops.c Thu Feb 9 23:36:50 2017 (r313496) @@ -430,12 +430,9 @@ vn_writechk(vp) /* * Vnode close call */ -int -vn_close(vp, flags, file_cred, td) - register struct vnode *vp; - int flags; - struct ucred *file_cred; - struct thread *td; +static int +vn_close1(struct vnode *vp, int flags, struct ucred *file_cred, + struct thread *td, bool keep_ref) { struct mount *mp; int error, lock_flags; @@ -457,11 +454,22 @@ vn_close(vp, flags, file_cred, td) __func__, vp, vp->v_writecount); } error = VOP_CLOSE(vp, flags, file_cred, td); - vput(vp); + if (keep_ref) + VOP_UNLOCK(vp, 0); + else + vput(vp); vn_finished_write(mp); return (error); } +int +vn_close(struct vnode *vp, int flags, struct ucred *file_cred, + struct thread *td) +{ + + return (vn_close1(vp, flags, file_cred, td, false)); +} + /* * Heuristic to detect sequential operation. */ @@ -1573,18 +1581,15 @@ vn_closefile(struct file *fp, struct thr struct vnode *vp; struct flock lf; int error; + bool ref; vp = fp->f_vnode; fp->f_ops = &badfileops; + ref= (fp->f_flag & FHASLOCK) != 0 && fp->f_type == DTYPE_VNODE; - if (__predict_false((fp->f_flag & FHASLOCK) != 0) && - fp->f_type == DTYPE_VNODE) - vrefact(vp); - - error = vn_close(vp, fp->f_flag, fp->f_cred, td); + error = vn_close1(vp, fp->f_flag, fp->f_cred, td, ref); - if (__predict_false((fp->f_flag & FHASLOCK) != 0) && - fp->f_type == DTYPE_VNODE) { + if (__predict_false(ref)) { lf.l_whence = SEEK_SET; lf.l_start = 0; lf.l_len = 0; From owner-svn-src-head@freebsd.org Fri Feb 10 01:04: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 E3958CD83C1; Fri, 10 Feb 2017 01:04:13 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A748B823; Fri, 10 Feb 2017 01:04:13 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A14Cab063656; Fri, 10 Feb 2017 01:04:12 GMT (envelope-from erj@FreeBSD.org) Received: (from erj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A14B5R063644; Fri, 10 Feb 2017 01:04:11 GMT (envelope-from erj@FreeBSD.org) Message-Id: <201702100104.v1A14B5R063644@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: erj set sender to erj@FreeBSD.org using -f From: Eric Joyner Date: Fri, 10 Feb 2017 01:04:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313497 - in head/sys: amd64/conf conf dev/ixl modules/ixl modules/ixlv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Fri, 10 Feb 2017 01:04:14 -0000 Author: erj Date: Fri Feb 10 01:04:11 2017 New Revision: 313497 URL: https://svnweb.freebsd.org/changeset/base/313497 Log: ixl(4): Update to 1.7.12-k Refresh upstream driver before impending conversion to iflib. Major new features: - Support for Fortville-based 25G adapters - Support for I2C reads/writes (To prevent getting or sending corrupt data, you should set dev.ixl.0.debug.disable_fw_link_management=1 when using I2C [this will disable link!], then set it to 0 when done. The driver implements the SIOCGI2C ioctl, so ifconfig -v works for reading I2C data, but there are read_i2c and write_i2c sysctls under the .debug sysctl tree [the latter being useful for upper page support in QSFP+]). - Addition of an iWARP client interface (so the future iWARP driver for X722 devices can communicate with the base driver). - Compiling this option in is enabled by default, with "options IXL_IW" in GENERIC. Differential Revision: https://reviews.freebsd.org/D9227 Reviewed by: sbruno MFC after: 2 weeks Sponsored by: Intel Corporation Added: head/sys/dev/ixl/ixl_iw.c (contents, props changed) head/sys/dev/ixl/ixl_iw.h - copied, changed from r313496, head/sys/dev/ixl/ixl_pf_iov.h head/sys/dev/ixl/ixl_iw_int.h - copied, changed from r313496, head/sys/dev/ixl/ixl_pf_iov.h head/sys/dev/ixl/ixl_pf_i2c.c (contents, props changed) Modified: head/sys/amd64/conf/GENERIC head/sys/amd64/conf/NOTES head/sys/conf/files.amd64 head/sys/conf/options.amd64 head/sys/dev/ixl/i40e_adminq.c head/sys/dev/ixl/i40e_adminq_cmd.h head/sys/dev/ixl/i40e_common.c head/sys/dev/ixl/i40e_devids.h head/sys/dev/ixl/i40e_lan_hmc.c head/sys/dev/ixl/i40e_nvm.c head/sys/dev/ixl/i40e_osdep.c head/sys/dev/ixl/i40e_osdep.h head/sys/dev/ixl/i40e_prototype.h head/sys/dev/ixl/i40e_type.h head/sys/dev/ixl/i40e_virtchnl.h head/sys/dev/ixl/if_ixl.c head/sys/dev/ixl/if_ixlv.c head/sys/dev/ixl/ixl.h head/sys/dev/ixl/ixl_pf.h head/sys/dev/ixl/ixl_pf_iov.c head/sys/dev/ixl/ixl_pf_iov.h head/sys/dev/ixl/ixl_pf_main.c head/sys/dev/ixl/ixl_txrx.c head/sys/dev/ixl/ixlv.h head/sys/dev/ixl/ixlvc.c head/sys/modules/ixl/Makefile head/sys/modules/ixlv/Makefile Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Thu Feb 9 23:36:50 2017 (r313496) +++ head/sys/amd64/conf/GENERIC Fri Feb 10 01:04:11 2017 (r313497) @@ -233,6 +233,7 @@ device em # Intel PRO/1000 Gigabit Et device ix # Intel PRO/10GbE PCIE PF Ethernet device ixv # Intel PRO/10GbE PCIE VF Ethernet device ixl # Intel XL710 40Gbe PCIE Ethernet +options IXL_IW # Enable iWARP Client Interface in ixl(4) device ixlv # Intel XL710 40Gbe VF PCIE Ethernet device le # AMD Am7900 LANCE and Am79C9xx PCnet device ti # Alteon Networks Tigon I/II gigabit Ethernet Modified: head/sys/amd64/conf/NOTES ============================================================================== --- head/sys/amd64/conf/NOTES Thu Feb 9 23:36:50 2017 (r313496) +++ head/sys/amd64/conf/NOTES Fri Feb 10 01:04:11 2017 (r313497) @@ -335,6 +335,7 @@ device ipw # Intel 2100 wireless NICs. device iwi # Intel 2200BG/2225BG/2915ABG wireless NICs. device iwn # Intel 4965/1000/5000/6000 wireless NICs. device ixl # Intel XL710 40Gbe PCIE Ethernet +options IXL_IW # Enable iWARP Client Interface in ixl(4) device ixlv # Intel XL710 40Gbe VF PCIE Ethernet device mlx4 # Shared code module between IB and Ethernet device mlx4ib # Mellanox ConnectX HCA InfiniBand Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Thu Feb 9 23:36:50 2017 (r313496) +++ head/sys/conf/files.amd64 Fri Feb 10 01:04:11 2017 (r313497) @@ -256,6 +256,10 @@ dev/ixl/ixl_pf_qmgr.c optional ixl pci compile-with "${NORMAL_C} -I$S/dev/ixl" dev/ixl/ixl_pf_iov.c optional ixl pci \ compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/ixl_pf_i2c.c optional ixl pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/ixl_iw.c optional ixl pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" dev/ixl/if_ixlv.c optional ixlv pci \ compile-with "${NORMAL_C} -I$S/dev/ixl" dev/ixl/ixlvc.c optional ixlv pci \ Modified: head/sys/conf/options.amd64 ============================================================================== --- head/sys/conf/options.amd64 Thu Feb 9 23:36:50 2017 (r313496) +++ head/sys/conf/options.amd64 Fri Feb 10 01:04:11 2017 (r313497) @@ -48,6 +48,9 @@ AGP_DEBUG opt_agp.h ATKBD_DFLT_KEYMAP opt_atkbd.h +# iWARP client interface support in ixl +IXL_IW opt_ixl.h + # ------------------------------- # EOF # ------------------------------- Modified: head/sys/dev/ixl/i40e_adminq.c ============================================================================== --- head/sys/dev/ixl/i40e_adminq.c Thu Feb 9 23:36:50 2017 (r313496) +++ head/sys/dev/ixl/i40e_adminq.c Fri Feb 10 01:04:11 2017 (r313497) @@ -1020,11 +1020,11 @@ enum i40e_status_code i40e_clean_arq_ele desc = I40E_ADMINQ_DESC(hw->aq.arq, ntc); desc_idx = ntc; + hw->aq.arq_last_status = + (enum i40e_admin_queue_err)LE16_TO_CPU(desc->retval); flags = LE16_TO_CPU(desc->flags); if (flags & I40E_AQ_FLAG_ERR) { ret_code = I40E_ERR_ADMIN_QUEUE_ERROR; - hw->aq.arq_last_status = - (enum i40e_admin_queue_err)LE16_TO_CPU(desc->retval); i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE, "AQRX: Event received with error 0x%X.\n", Modified: head/sys/dev/ixl/i40e_adminq_cmd.h ============================================================================== --- head/sys/dev/ixl/i40e_adminq_cmd.h Thu Feb 9 23:36:50 2017 (r313496) +++ head/sys/dev/ixl/i40e_adminq_cmd.h Fri Feb 10 01:04:11 2017 (r313497) @@ -154,6 +154,7 @@ enum i40e_admin_queue_opc { /* WoL commands */ i40e_aqc_opc_set_wol_filter = 0x0120, i40e_aqc_opc_get_wake_reason = 0x0121, + i40e_aqc_opc_clear_all_wol_filters = 0x025E, /* internal switch commands */ i40e_aqc_opc_get_switch_config = 0x0200, @@ -535,7 +536,8 @@ struct i40e_aqc_mac_address_read { #define I40E_AQC_PORT_ADDR_VALID 0x40 #define I40E_AQC_WOL_ADDR_VALID 0x80 #define I40E_AQC_MC_MAG_EN_VALID 0x100 -#define I40E_AQC_ADDR_VALID_MASK 0x1F0 +#define I40E_AQC_WOL_PRESERVE_STATUS 0x200 +#define I40E_AQC_ADDR_VALID_MASK 0x3F0 u8 reserved[6]; __le32 addr_high; __le32 addr_low; @@ -556,6 +558,7 @@ I40E_CHECK_STRUCT_LEN(24, i40e_aqc_mac_a struct i40e_aqc_mac_address_write { __le16 command_flags; #define I40E_AQC_MC_MAG_EN 0x0100 +#define I40E_AQC_WOL_PRESERVE_ON_PFR 0x0200 #define I40E_AQC_WRITE_TYPE_LAA_ONLY 0x0000 #define I40E_AQC_WRITE_TYPE_LAA_WOL 0x4000 #define I40E_AQC_WRITE_TYPE_PORT 0x8000 @@ -594,6 +597,7 @@ struct i40e_aqc_set_wol_filter { __le16 cmd_flags; #define I40E_AQC_SET_WOL_FILTER 0x8000 #define I40E_AQC_SET_WOL_FILTER_NO_TCO_WOL 0x4000 +#define I40E_AQC_SET_WOL_FILTER_WOL_PRESERVE_ON_PFR 0x2000 #define I40E_AQC_SET_WOL_FILTER_ACTION_CLEAR 0 #define I40E_AQC_SET_WOL_FILTER_ACTION_SET 1 __le16 valid_flags; @@ -1757,6 +1761,8 @@ struct i40e_aq_get_phy_abilities_resp { #define I40E_AQ_PHY_LINK_ENABLED 0x08 #define I40E_AQ_PHY_AN_ENABLED 0x10 #define I40E_AQ_PHY_FLAG_MODULE_QUAL 0x20 +#define I40E_AQ_PHY_FEC_ABILITY_KR 0x40 +#define I40E_AQ_PHY_FEC_ABILITY_RS 0x80 __le16 eee_capability; #define I40E_AQ_EEE_100BASE_TX 0x0002 #define I40E_AQ_EEE_1000BASE_T 0x0004 @@ -1768,11 +1774,20 @@ struct i40e_aq_get_phy_abilities_resp { u8 d3_lpan; #define I40E_AQ_SET_PHY_D3_LPAN_ENA 0x01 u8 phy_type_ext; -#define I40E_AQ_PHY_TYPE_EXT_25G_KR 0X01 -#define I40E_AQ_PHY_TYPE_EXT_25G_CR 0X02 +#define I40E_AQ_PHY_TYPE_EXT_25G_KR 0x01 +#define I40E_AQ_PHY_TYPE_EXT_25G_CR 0x02 #define I40E_AQ_PHY_TYPE_EXT_25G_SR 0x04 #define I40E_AQ_PHY_TYPE_EXT_25G_LR 0x08 - u8 mod_type_ext; + u8 fec_cfg_curr_mod_ext_info; +#define I40E_AQ_ENABLE_FEC_KR 0x01 +#define I40E_AQ_ENABLE_FEC_RS 0x02 +#define I40E_AQ_REQUEST_FEC_KR 0x04 +#define I40E_AQ_REQUEST_FEC_RS 0x08 +#define I40E_AQ_ENABLE_FEC_AUTO 0x10 +#define I40E_AQ_FEC +#define I40E_AQ_MODULE_TYPE_EXT_MASK 0xE0 +#define I40E_AQ_MODULE_TYPE_EXT_SHIFT 5 + u8 ext_comp_code; u8 phy_id[4]; u8 module_type[3]; @@ -1796,11 +1811,15 @@ struct i40e_aq_set_phy_config { /* same __le32 eeer; u8 low_power_ctrl; u8 phy_type_ext; -#define I40E_AQ_PHY_TYPE_EXT_25G_KR 0X01 -#define I40E_AQ_PHY_TYPE_EXT_25G_CR 0X02 -#define I40E_AQ_PHY_TYPE_EXT_25G_SR 0x04 -#define I40E_AQ_PHY_TYPE_EXT_25G_LR 0x08 - u8 reserved[2]; + u8 fec_config; +#define I40E_AQ_SET_FEC_ABILITY_KR BIT(0) +#define I40E_AQ_SET_FEC_ABILITY_RS BIT(1) +#define I40E_AQ_SET_FEC_REQUEST_KR BIT(2) +#define I40E_AQ_SET_FEC_REQUEST_RS BIT(3) +#define I40E_AQ_SET_FEC_AUTO BIT(4) +#define I40E_AQ_PHY_FEC_CONFIG_SHIFT 0x0 +#define I40E_AQ_PHY_FEC_CONFIG_MASK (0x1F << I40E_AQ_PHY_FEC_CONFIG_SHIFT) + u8 reserved; }; I40E_CHECK_CMD_LENGTH(i40e_aq_set_phy_config); @@ -1890,6 +1909,8 @@ struct i40e_aqc_get_link_status { u8 loopback; /* use defines from i40e_aqc_set_lb_mode */ __le16 max_frame_size; u8 config; +#define I40E_AQ_CONFIG_FEC_KR_ENA 0x01 +#define I40E_AQ_CONFIG_FEC_RS_ENA 0x02 #define I40E_AQ_CONFIG_CRC_ENA 0x04 #define I40E_AQ_CONFIG_PACING_MASK 0x78 u8 power_desc; Modified: head/sys/dev/ixl/i40e_common.c ============================================================================== --- head/sys/dev/ixl/i40e_common.c Thu Feb 9 23:36:50 2017 (r313496) +++ head/sys/dev/ixl/i40e_common.c Fri Feb 10 01:04:11 2017 (r313497) @@ -78,7 +78,6 @@ enum i40e_status_code i40e_set_mac_type( hw->mac.type = I40E_MAC_X722; break; case I40E_DEV_ID_X722_VF: - case I40E_DEV_ID_X722_VF_HV: case I40E_DEV_ID_X722_A0_VF: hw->mac.type = I40E_MAC_X722_VF; break; @@ -1088,7 +1087,8 @@ enum i40e_status_code i40e_get_mac_addr( status = i40e_aq_mac_address_read(hw, &flags, &addrs, NULL); if (flags & I40E_AQC_LAN_ADDR_VALID) - memcpy(mac_addr, &addrs.pf_lan_mac, sizeof(addrs.pf_lan_mac)); + i40e_memcpy(mac_addr, &addrs.pf_lan_mac, sizeof(addrs.pf_lan_mac), + I40E_NONDMA_TO_NONDMA); return status; } @@ -1111,7 +1111,8 @@ enum i40e_status_code i40e_get_port_mac_ return status; if (flags & I40E_AQC_PORT_ADDR_VALID) - memcpy(mac_addr, &addrs.port_mac, sizeof(addrs.port_mac)); + i40e_memcpy(mac_addr, &addrs.port_mac, sizeof(addrs.port_mac), + I40E_NONDMA_TO_NONDMA); else status = I40E_ERR_INVALID_MAC_ADDR; @@ -1224,6 +1225,8 @@ static enum i40e_media_type i40e_get_med case I40E_PHY_TYPE_1000BASE_LX: case I40E_PHY_TYPE_40GBASE_SR4: case I40E_PHY_TYPE_40GBASE_LR4: + case I40E_PHY_TYPE_25GBASE_LR: + case I40E_PHY_TYPE_25GBASE_SR: media = I40E_MEDIA_TYPE_FIBER; break; case I40E_PHY_TYPE_100BASE_TX: @@ -1238,6 +1241,7 @@ static enum i40e_media_type i40e_get_med case I40E_PHY_TYPE_10GBASE_SFPP_CU: case I40E_PHY_TYPE_40GBASE_AOC: case I40E_PHY_TYPE_10GBASE_AOC: + case I40E_PHY_TYPE_25GBASE_CR: media = I40E_MEDIA_TYPE_DA; break; case I40E_PHY_TYPE_1000BASE_KX: @@ -1245,6 +1249,7 @@ static enum i40e_media_type i40e_get_med case I40E_PHY_TYPE_10GBASE_KR: case I40E_PHY_TYPE_40GBASE_KR4: case I40E_PHY_TYPE_20GBASE_KR2: + case I40E_PHY_TYPE_25GBASE_KR: media = I40E_MEDIA_TYPE_BACKPLANE; break; case I40E_PHY_TYPE_SGMII: @@ -1725,10 +1730,13 @@ enum i40e_status_code i40e_set_fc(struct config.abilities |= I40E_AQ_PHY_ENABLE_ATOMIC_LINK; /* Copy over all the old settings */ config.phy_type = abilities.phy_type; + config.phy_type_ext = abilities.phy_type_ext; config.link_speed = abilities.link_speed; config.eee_capability = abilities.eee_capability; config.eeer = abilities.eeer_val; config.low_power_ctrl = abilities.d3_lpan; + config.fec_config = abilities.fec_cfg_curr_mod_ext_info & + I40E_AQ_PHY_FEC_CONFIG_MASK; status = i40e_aq_set_phy_config(hw, &config, NULL); if (status) @@ -1888,6 +1896,8 @@ enum i40e_status_code i40e_aq_get_link_i hw_link_info->link_speed = (enum i40e_aq_link_speed)resp->link_speed; hw_link_info->link_info = resp->link_info; hw_link_info->an_info = resp->an_info; + hw_link_info->fec_info = resp->config & (I40E_AQ_CONFIG_FEC_KR_ENA | + I40E_AQ_CONFIG_FEC_RS_ENA); hw_link_info->ext_info = resp->ext_info; hw_link_info->loopback = resp->loopback; hw_link_info->max_frame_size = LE16_TO_CPU(resp->max_frame_size); @@ -1910,12 +1920,13 @@ enum i40e_status_code i40e_aq_get_link_i else hw_link_info->crc_enable = FALSE; - if (resp->command_flags & CPU_TO_LE16(I40E_AQ_LSE_ENABLE)) + if (resp->command_flags & CPU_TO_LE16(I40E_AQ_LSE_IS_ENABLED)) hw_link_info->lse_enable = TRUE; else hw_link_info->lse_enable = FALSE; - if ((hw->aq.fw_maj_ver < 4 || (hw->aq.fw_maj_ver == 4 && + if ((hw->mac.type == I40E_MAC_XL710) && + (hw->aq.fw_maj_ver < 4 || (hw->aq.fw_maj_ver == 4 && hw->aq.fw_min_ver < 40)) && hw_link_info->phy_type == 0xE) hw_link_info->phy_type = I40E_PHY_TYPE_10GBASE_SFPP_CU; @@ -2280,6 +2291,43 @@ enum i40e_status_code i40e_aq_set_vsi_mu } /** +* i40e_aq_set_vsi_full_promiscuous +* @hw: pointer to the hw struct +* @seid: VSI number +* @set: set promiscuous enable/disable +* @cmd_details: pointer to command details structure or NULL +**/ +enum i40e_status_code i40e_aq_set_vsi_full_promiscuous(struct i40e_hw *hw, + u16 seid, bool set, + struct i40e_asq_cmd_details *cmd_details) +{ + struct i40e_aq_desc desc; + struct i40e_aqc_set_vsi_promiscuous_modes *cmd = + (struct i40e_aqc_set_vsi_promiscuous_modes *)&desc.params.raw; + enum i40e_status_code status; + u16 flags = 0; + + i40e_fill_default_direct_cmd_desc(&desc, + i40e_aqc_opc_set_vsi_promiscuous_modes); + + if (set) + flags = I40E_AQC_SET_VSI_PROMISC_UNICAST | + I40E_AQC_SET_VSI_PROMISC_MULTICAST | + I40E_AQC_SET_VSI_PROMISC_BROADCAST; + + cmd->promiscuous_flags = CPU_TO_LE16(flags); + + cmd->valid_flags = CPU_TO_LE16(I40E_AQC_SET_VSI_PROMISC_UNICAST | + I40E_AQC_SET_VSI_PROMISC_MULTICAST | + I40E_AQC_SET_VSI_PROMISC_BROADCAST); + + cmd->seid = CPU_TO_LE16(seid); + status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); + + return status; +} + +/** * i40e_aq_set_vsi_mc_promisc_on_vlan * @hw: pointer to the hw struct * @seid: vsi number @@ -2348,6 +2396,40 @@ enum i40e_status_code i40e_aq_set_vsi_uc } /** + * i40e_aq_set_vsi_bc_promisc_on_vlan + * @hw: pointer to the hw struct + * @seid: vsi number + * @enable: set broadcast promiscuous enable/disable for a given VLAN + * @vid: The VLAN tag filter - capture any broadcast packet with this VLAN tag + * @cmd_details: pointer to command details structure or NULL + **/ +enum i40e_status_code i40e_aq_set_vsi_bc_promisc_on_vlan(struct i40e_hw *hw, + u16 seid, bool enable, u16 vid, + struct i40e_asq_cmd_details *cmd_details) +{ + struct i40e_aq_desc desc; + struct i40e_aqc_set_vsi_promiscuous_modes *cmd = + (struct i40e_aqc_set_vsi_promiscuous_modes *)&desc.params.raw; + enum i40e_status_code status; + u16 flags = 0; + + i40e_fill_default_direct_cmd_desc(&desc, + i40e_aqc_opc_set_vsi_promiscuous_modes); + + if (enable) + flags |= I40E_AQC_SET_VSI_PROMISC_BROADCAST; + + cmd->promiscuous_flags = CPU_TO_LE16(flags); + cmd->valid_flags = CPU_TO_LE16(I40E_AQC_SET_VSI_PROMISC_BROADCAST); + cmd->seid = CPU_TO_LE16(seid); + cmd->vlan_tag = CPU_TO_LE16(vid | I40E_AQC_SET_VSI_VLAN_VALID); + + status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); + + return status; +} + +/** * i40e_aq_set_vsi_broadcast * @hw: pointer to the hw struct * @seid: vsi number @@ -2680,14 +2762,17 @@ enum i40e_status_code i40e_update_link_i if (status) return status; - if (hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) { + /* extra checking needed to ensure link info to user is timely */ + if ((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) && + ((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) || + !(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) { status = i40e_aq_get_phy_capabilities(hw, FALSE, false, &abilities, NULL); if (status) return status; - memcpy(hw->phy.link_info.module_type, &abilities.module_type, - sizeof(hw->phy.link_info.module_type)); + i40e_memcpy(hw->phy.link_info.module_type, &abilities.module_type, + sizeof(hw->phy.link_info.module_type), I40E_NONDMA_TO_NONDMA); } return status; } @@ -3537,6 +3622,14 @@ static void i40e_parse_discover_capabili break; case I40E_AQ_CAP_ID_MNG_MODE: p->management_mode = number; + if (major_rev > 1) { + p->mng_protocols_over_mctp = logical_id; + i40e_debug(hw, I40E_DEBUG_INIT, + "HW Capability: Protocols over MCTP = %d\n", + p->mng_protocols_over_mctp); + } else { + p->mng_protocols_over_mctp = 0; + } i40e_debug(hw, I40E_DEBUG_INIT, "HW Capability: Management Mode = %d\n", p->management_mode); @@ -3765,7 +3858,6 @@ static void i40e_parse_discover_capabili else p->acpi_prog_method = I40E_ACPI_PROGRAMMING_METHOD_HW_FVL; p->proxy_support = (phys_id & I40E_PROXY_SUPPORT_MASK) ? 1 : 0; - p->proxy_support = p->proxy_support; i40e_debug(hw, I40E_DEBUG_INIT, "HW Capability: WOL proxy filters = %d\n", hw->num_wol_proxy_filters); @@ -3806,8 +3898,10 @@ static void i40e_parse_discover_capabili /* partition id is 1-based, and functions are evenly spread * across the ports as partitions */ - hw->partition_id = (hw->pf_id / hw->num_ports) + 1; - hw->num_partitions = num_functions / hw->num_ports; + if (hw->num_ports != 0) { + hw->partition_id = (hw->pf_id / hw->num_ports) + 1; + hw->num_partitions = num_functions / hw->num_ports; + } /* additional HW specific goodies that might * someday be HW version specific @@ -4292,11 +4386,15 @@ enum i40e_status_code i40e_aq_start_stop /** * i40e_aq_add_udp_tunnel * @hw: pointer to the hw struct - * @udp_port: the UDP port to add + * @udp_port: the UDP port to add in Host byte order * @header_len: length of the tunneling header length in DWords * @protocol_index: protocol index type * @filter_index: pointer to filter index * @cmd_details: pointer to command details structure or NULL + * + * Note: Firmware expects the udp_port value to be in Little Endian format, + * and this function will call CPU_TO_LE16 to convert from Host byte order to + * Little Endian order. **/ enum i40e_status_code i40e_aq_add_udp_tunnel(struct i40e_hw *hw, u16 udp_port, u8 protocol_index, @@ -5905,9 +6003,6 @@ enum i40e_status_code i40e_aq_configure_ desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF); desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD); - if (bwd_size > I40E_AQ_LARGE_BUF) - desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_LB); - desc.datalen = CPU_TO_LE16(bwd_size); status = i40e_asq_send_command(hw, &desc, bw_data, bwd_size, cmd_details); @@ -5916,7 +6011,92 @@ enum i40e_status_code i40e_aq_configure_ } /** - * i40e_read_phy_register + * i40e_read_phy_register_clause22 + * @hw: pointer to the HW structure + * @reg: register address in the page + * @phy_adr: PHY address on MDIO interface + * @value: PHY register value + * + * Reads specified PHY register value + **/ +enum i40e_status_code i40e_read_phy_register_clause22(struct i40e_hw *hw, + u16 reg, u8 phy_addr, u16 *value) +{ + enum i40e_status_code status = I40E_ERR_TIMEOUT; + u8 port_num = (u8)hw->func_caps.mdio_port_num; + u32 command = 0; + u16 retry = 1000; + + command = (reg << I40E_GLGEN_MSCA_DEVADD_SHIFT) | + (phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) | + (I40E_MDIO_CLAUSE22_OPCODE_READ_MASK) | + (I40E_MDIO_CLAUSE22_STCODE_MASK) | + (I40E_GLGEN_MSCA_MDICMD_MASK); + wr32(hw, I40E_GLGEN_MSCA(port_num), command); + do { + command = rd32(hw, I40E_GLGEN_MSCA(port_num)); + if (!(command & I40E_GLGEN_MSCA_MDICMD_MASK)) { + status = I40E_SUCCESS; + break; + } + i40e_usec_delay(10); + retry--; + } while (retry); + + if (status) { + i40e_debug(hw, I40E_DEBUG_PHY, + "PHY: Can't write command to external PHY.\n"); + } else { + command = rd32(hw, I40E_GLGEN_MSRWD(port_num)); + *value = (command & I40E_GLGEN_MSRWD_MDIRDDATA_MASK) >> + I40E_GLGEN_MSRWD_MDIRDDATA_SHIFT; + } + + return status; +} + +/** + * i40e_write_phy_register_clause22 + * @hw: pointer to the HW structure + * @reg: register address in the page + * @phy_adr: PHY address on MDIO interface + * @value: PHY register value + * + * Writes specified PHY register value + **/ +enum i40e_status_code i40e_write_phy_register_clause22(struct i40e_hw *hw, + u16 reg, u8 phy_addr, u16 value) +{ + enum i40e_status_code status = I40E_ERR_TIMEOUT; + u8 port_num = (u8)hw->func_caps.mdio_port_num; + u32 command = 0; + u16 retry = 1000; + + command = value << I40E_GLGEN_MSRWD_MDIWRDATA_SHIFT; + wr32(hw, I40E_GLGEN_MSRWD(port_num), command); + + command = (reg << I40E_GLGEN_MSCA_DEVADD_SHIFT) | + (phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) | + (I40E_MDIO_CLAUSE22_OPCODE_WRITE_MASK) | + (I40E_MDIO_CLAUSE22_STCODE_MASK) | + (I40E_GLGEN_MSCA_MDICMD_MASK); + + wr32(hw, I40E_GLGEN_MSCA(port_num), command); + do { + command = rd32(hw, I40E_GLGEN_MSCA(port_num)); + if (!(command & I40E_GLGEN_MSCA_MDICMD_MASK)) { + status = I40E_SUCCESS; + break; + } + i40e_usec_delay(10); + retry--; + } while (retry); + + return status; +} + +/** + * i40e_read_phy_register_clause45 * @hw: pointer to the HW structure * @page: registers page number * @reg: register address in the page @@ -5925,9 +6105,8 @@ enum i40e_status_code i40e_aq_configure_ * * Reads specified PHY register value **/ -enum i40e_status_code i40e_read_phy_register(struct i40e_hw *hw, - u8 page, u16 reg, u8 phy_addr, - u16 *value) +enum i40e_status_code i40e_read_phy_register_clause45(struct i40e_hw *hw, + u8 page, u16 reg, u8 phy_addr, u16 *value) { enum i40e_status_code status = I40E_ERR_TIMEOUT; u32 command = 0; @@ -5937,8 +6116,8 @@ enum i40e_status_code i40e_read_phy_regi command = (reg << I40E_GLGEN_MSCA_MDIADD_SHIFT) | (page << I40E_GLGEN_MSCA_DEVADD_SHIFT) | (phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) | - (I40E_MDIO_OPCODE_ADDRESS) | - (I40E_MDIO_STCODE) | + (I40E_MDIO_CLAUSE45_OPCODE_ADDRESS_MASK) | + (I40E_MDIO_CLAUSE45_STCODE_MASK) | (I40E_GLGEN_MSCA_MDICMD_MASK) | (I40E_GLGEN_MSCA_MDIINPROGEN_MASK); wr32(hw, I40E_GLGEN_MSCA(port_num), command); @@ -5960,8 +6139,8 @@ enum i40e_status_code i40e_read_phy_regi command = (page << I40E_GLGEN_MSCA_DEVADD_SHIFT) | (phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) | - (I40E_MDIO_OPCODE_READ) | - (I40E_MDIO_STCODE) | + (I40E_MDIO_CLAUSE45_OPCODE_READ_MASK) | + (I40E_MDIO_CLAUSE45_STCODE_MASK) | (I40E_GLGEN_MSCA_MDICMD_MASK) | (I40E_GLGEN_MSCA_MDIINPROGEN_MASK); status = I40E_ERR_TIMEOUT; @@ -5991,7 +6170,7 @@ phy_read_end: } /** - * i40e_write_phy_register + * i40e_write_phy_register_clause45 * @hw: pointer to the HW structure * @page: registers page number * @reg: register address in the page @@ -6000,9 +6179,8 @@ phy_read_end: * * Writes value to specified PHY register **/ -enum i40e_status_code i40e_write_phy_register(struct i40e_hw *hw, - u8 page, u16 reg, u8 phy_addr, - u16 value) +enum i40e_status_code i40e_write_phy_register_clause45(struct i40e_hw *hw, + u8 page, u16 reg, u8 phy_addr, u16 value) { enum i40e_status_code status = I40E_ERR_TIMEOUT; u32 command = 0; @@ -6012,8 +6190,8 @@ enum i40e_status_code i40e_write_phy_reg command = (reg << I40E_GLGEN_MSCA_MDIADD_SHIFT) | (page << I40E_GLGEN_MSCA_DEVADD_SHIFT) | (phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) | - (I40E_MDIO_OPCODE_ADDRESS) | - (I40E_MDIO_STCODE) | + (I40E_MDIO_CLAUSE45_OPCODE_ADDRESS_MASK) | + (I40E_MDIO_CLAUSE45_STCODE_MASK) | (I40E_GLGEN_MSCA_MDICMD_MASK) | (I40E_GLGEN_MSCA_MDIINPROGEN_MASK); wr32(hw, I40E_GLGEN_MSCA(port_num), command); @@ -6037,8 +6215,8 @@ enum i40e_status_code i40e_write_phy_reg command = (page << I40E_GLGEN_MSCA_DEVADD_SHIFT) | (phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) | - (I40E_MDIO_OPCODE_WRITE) | - (I40E_MDIO_STCODE) | + (I40E_MDIO_CLAUSE45_OPCODE_WRITE_MASK) | + (I40E_MDIO_CLAUSE45_STCODE_MASK) | (I40E_GLGEN_MSCA_MDICMD_MASK) | (I40E_GLGEN_MSCA_MDIINPROGEN_MASK); status = I40E_ERR_TIMEOUT; @@ -6059,6 +6237,78 @@ phy_write_end: } /** + * i40e_write_phy_register + * @hw: pointer to the HW structure + * @page: registers page number + * @reg: register address in the page + * @phy_adr: PHY address on MDIO interface + * @value: PHY register value + * + * Writes value to specified PHY register + **/ +enum i40e_status_code i40e_write_phy_register(struct i40e_hw *hw, + u8 page, u16 reg, u8 phy_addr, u16 value) +{ + enum i40e_status_code status; + + switch (hw->device_id) { + case I40E_DEV_ID_1G_BASE_T_X722: + status = i40e_write_phy_register_clause22(hw, + reg, phy_addr, value); + break; + case I40E_DEV_ID_10G_BASE_T: + case I40E_DEV_ID_10G_BASE_T4: + case I40E_DEV_ID_10G_BASE_T_X722: + case I40E_DEV_ID_25G_B: + case I40E_DEV_ID_25G_SFP28: + status = i40e_write_phy_register_clause45(hw, + page, reg, phy_addr, value); + break; + default: + status = I40E_ERR_UNKNOWN_PHY; + break; + } + + return status; +} + +/** + * i40e_read_phy_register + * @hw: pointer to the HW structure + * @page: registers page number + * @reg: register address in the page + * @phy_adr: PHY address on MDIO interface + * @value: PHY register value + * + * Reads specified PHY register value + **/ +enum i40e_status_code i40e_read_phy_register(struct i40e_hw *hw, + u8 page, u16 reg, u8 phy_addr, u16 *value) +{ + enum i40e_status_code status; + + switch (hw->device_id) { + case I40E_DEV_ID_1G_BASE_T_X722: + status = i40e_read_phy_register_clause22(hw, reg, phy_addr, + value); + break; + case I40E_DEV_ID_10G_BASE_T: + case I40E_DEV_ID_10G_BASE_T4: + case I40E_DEV_ID_10G_BASE_T_X722: + case I40E_DEV_ID_25G_B: + case I40E_DEV_ID_25G_SFP28: + status = i40e_read_phy_register_clause45(hw, page, reg, + phy_addr, value); + break; + default: + status = I40E_ERR_UNKNOWN_PHY; + break; + } + + return status; +} + +/** * i40e_get_phy_address * @hw: pointer to the HW structure * @dev_num: PHY port num that address we want @@ -6100,14 +6350,16 @@ enum i40e_status_code i40e_blink_phy_lin for (gpio_led_port = 0; gpio_led_port < 3; gpio_led_port++, led_addr++) { - status = i40e_read_phy_register(hw, I40E_PHY_COM_REG_PAGE, - led_addr, phy_addr, &led_reg); + status = i40e_read_phy_register_clause45(hw, + I40E_PHY_COM_REG_PAGE, + led_addr, phy_addr, + &led_reg); if (status) goto phy_blinking_end; led_ctl = led_reg; if (led_reg & I40E_PHY_LED_LINK_MODE_MASK) { led_reg = 0; - status = i40e_write_phy_register(hw, + status = i40e_write_phy_register_clause45(hw, I40E_PHY_COM_REG_PAGE, led_addr, phy_addr, led_reg); @@ -6119,20 +6371,18 @@ enum i40e_status_code i40e_blink_phy_lin if (time > 0 && interval > 0) { for (i = 0; i < time * 1000; i += interval) { - status = i40e_read_phy_register(hw, - I40E_PHY_COM_REG_PAGE, - led_addr, phy_addr, - &led_reg); + status = i40e_read_phy_register_clause45(hw, + I40E_PHY_COM_REG_PAGE, + led_addr, phy_addr, &led_reg); if (status) goto restore_config; if (led_reg & I40E_PHY_LED_MANUAL_ON) led_reg = 0; else led_reg = I40E_PHY_LED_MANUAL_ON; - status = i40e_write_phy_register(hw, - I40E_PHY_COM_REG_PAGE, - led_addr, phy_addr, - led_reg); + status = i40e_write_phy_register_clause45(hw, + I40E_PHY_COM_REG_PAGE, + led_addr, phy_addr, led_reg); if (status) goto restore_config; i40e_msec_delay(interval); @@ -6140,8 +6390,9 @@ enum i40e_status_code i40e_blink_phy_lin } restore_config: - status = i40e_write_phy_register(hw, I40E_PHY_COM_REG_PAGE, led_addr, - phy_addr, led_ctl); + status = i40e_write_phy_register_clause45(hw, + I40E_PHY_COM_REG_PAGE, + led_addr, phy_addr, led_ctl); phy_blinking_end: return status; @@ -6172,8 +6423,10 @@ enum i40e_status_code i40e_led_get_phy(s for (gpio_led_port = 0; gpio_led_port < 3; gpio_led_port++, temp_addr++) { - status = i40e_read_phy_register(hw, I40E_PHY_COM_REG_PAGE, - temp_addr, phy_addr, ®_val); + status = i40e_read_phy_register_clause45(hw, + I40E_PHY_COM_REG_PAGE, + temp_addr, phy_addr, + ®_val); if (status) return status; *val = reg_val; @@ -6206,41 +6459,42 @@ enum i40e_status_code i40e_led_set_phy(s i = rd32(hw, I40E_PFGEN_PORTNUM); port_num = (u8)(i & I40E_PFGEN_PORTNUM_PORT_NUM_MASK); phy_addr = i40e_get_phy_address(hw, port_num); - - status = i40e_read_phy_register(hw, I40E_PHY_COM_REG_PAGE, led_addr, - phy_addr, &led_reg); + status = i40e_read_phy_register_clause45(hw, I40E_PHY_COM_REG_PAGE, + led_addr, phy_addr, &led_reg); if (status) return status; led_ctl = led_reg; if (led_reg & I40E_PHY_LED_LINK_MODE_MASK) { led_reg = 0; - status = i40e_write_phy_register(hw, I40E_PHY_COM_REG_PAGE, - led_addr, phy_addr, led_reg); + status = i40e_write_phy_register_clause45(hw, + I40E_PHY_COM_REG_PAGE, + led_addr, phy_addr, + led_reg); if (status) return status; } - status = i40e_read_phy_register(hw, I40E_PHY_COM_REG_PAGE, - led_addr, phy_addr, &led_reg); + status = i40e_read_phy_register_clause45(hw, I40E_PHY_COM_REG_PAGE, + led_addr, phy_addr, &led_reg); if (status) goto restore_config; if (on) led_reg = I40E_PHY_LED_MANUAL_ON; else led_reg = 0; - status = i40e_write_phy_register(hw, I40E_PHY_COM_REG_PAGE, - led_addr, phy_addr, led_reg); + status = i40e_write_phy_register_clause45(hw, I40E_PHY_COM_REG_PAGE, + led_addr, phy_addr, led_reg); if (status) goto restore_config; if (mode & I40E_PHY_LED_MODE_ORIG) { led_ctl = (mode & I40E_PHY_LED_MODE_MASK); - status = i40e_write_phy_register(hw, + status = i40e_write_phy_register_clause45(hw, I40E_PHY_COM_REG_PAGE, led_addr, phy_addr, led_ctl); } return status; restore_config: - status = i40e_write_phy_register(hw, I40E_PHY_COM_REG_PAGE, led_addr, - phy_addr, led_ctl); + status = i40e_write_phy_register_clause45(hw, I40E_PHY_COM_REG_PAGE, + led_addr, phy_addr, led_ctl); return status; } @@ -6485,10 +6739,13 @@ enum i40e_status_code i40e_aq_set_arp_pr i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_set_proxy_config); + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF); + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD); desc.params.external.addr_high = CPU_TO_LE32(I40E_HI_DWORD((u64)proxy_config)); desc.params.external.addr_low = CPU_TO_LE32(I40E_LO_DWORD((u64)proxy_config)); + desc.datalen = CPU_TO_LE16(sizeof(struct i40e_aqc_arp_proxy_data)); status = i40e_asq_send_command(hw, &desc, proxy_config, sizeof(struct i40e_aqc_arp_proxy_data), @@ -6519,10 +6776,13 @@ enum i40e_status_code i40e_aq_set_ns_pro i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_set_ns_proxy_table_entry); + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF); + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD); desc.params.external.addr_high = CPU_TO_LE32(I40E_HI_DWORD((u64)ns_proxy_table_entry)); desc.params.external.addr_low = CPU_TO_LE32(I40E_LO_DWORD((u64)ns_proxy_table_entry)); + desc.datalen = CPU_TO_LE16(sizeof(struct i40e_aqc_ns_proxy_data)); status = i40e_asq_send_command(hw, &desc, ns_proxy_table_entry, sizeof(struct i40e_aqc_ns_proxy_data), @@ -6569,9 +6829,11 @@ enum i40e_status_code i40e_aq_set_clear_ if (set_filter) { if (!filter) return I40E_ERR_PARAM; + cmd_flags |= I40E_AQC_SET_WOL_FILTER; - buff_len = sizeof(*filter); + cmd_flags |= I40E_AQC_SET_WOL_FILTER_WOL_PRESERVE_ON_PFR; } + if (no_wol_tco) cmd_flags |= I40E_AQC_SET_WOL_FILTER_NO_TCO_WOL; cmd->cmd_flags = CPU_TO_LE16(cmd_flags); @@ -6582,6 +6844,12 @@ enum i40e_status_code i40e_aq_set_clear_ valid_flags |= I40E_AQC_SET_WOL_FILTER_NO_TCO_ACTION_VALID; cmd->valid_flags = CPU_TO_LE16(valid_flags); + buff_len = sizeof(*filter); + desc.datalen = CPU_TO_LE16(buff_len); + + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF); + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD); + cmd->address_high = CPU_TO_LE32(I40E_HI_DWORD((u64)filter)); cmd->address_low = CPU_TO_LE32(I40E_LO_DWORD((u64)filter)); @@ -6618,3 +6886,24 @@ enum i40e_status_code i40e_aq_get_wake_e return status; } +/** +* i40e_aq_clear_all_wol_filters +* @hw: pointer to the hw struct +* @cmd_details: pointer to command details structure or NULL +* +* Get information for the reason of a Wake Up event +**/ +enum i40e_status_code i40e_aq_clear_all_wol_filters(struct i40e_hw *hw, + struct i40e_asq_cmd_details *cmd_details) +{ + struct i40e_aq_desc desc; + enum i40e_status_code status; + + i40e_fill_default_direct_cmd_desc(&desc, + i40e_aqc_opc_clear_all_wol_filters); + + status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); + + return status; +} + Modified: head/sys/dev/ixl/i40e_devids.h ============================================================================== --- head/sys/dev/ixl/i40e_devids.h Thu Feb 9 23:36:50 2017 (r313496) +++ head/sys/dev/ixl/i40e_devids.h Fri Feb 10 01:04:11 2017 (r313497) @@ -63,7 +63,6 @@ #define I40E_DEV_ID_10G_BASE_T_X722 0x37D2 #define I40E_DEV_ID_SFP_I_X722 0x37D3 #define I40E_DEV_ID_X722_VF 0x37CD -#define I40E_DEV_ID_X722_VF_HV 0x37D9 #define i40e_is_40G_device(d) ((d) == I40E_DEV_ID_QSFP_A || \ (d) == I40E_DEV_ID_QSFP_B || \ Modified: head/sys/dev/ixl/i40e_lan_hmc.c ============================================================================== --- head/sys/dev/ixl/i40e_lan_hmc.c Thu Feb 9 23:36:50 2017 (r313496) +++ head/sys/dev/ixl/i40e_lan_hmc.c Fri Feb 10 01:04:11 2017 (r313497) @@ -1240,11 +1240,6 @@ enum i40e_status_code i40e_hmc_get_objec u64 obj_offset_in_fpm; u32 sd_idx, sd_lmt; - if (NULL == hmc_info) { - ret_code = I40E_ERR_BAD_PTR; - DEBUGOUT("i40e_hmc_get_object_va: bad hmc_info ptr\n"); - goto exit; - } if (NULL == hmc_info->hmc_obj) { ret_code = I40E_ERR_BAD_PTR; DEBUGOUT("i40e_hmc_get_object_va: bad hmc_info->hmc_obj ptr\n"); Modified: head/sys/dev/ixl/i40e_nvm.c ============================================================================== --- head/sys/dev/ixl/i40e_nvm.c Thu Feb 9 23:36:50 2017 (r313496) +++ head/sys/dev/ixl/i40e_nvm.c Fri Feb 10 01:04:11 2017 (r313497) @@ -220,14 +220,14 @@ enum i40e_status_code i40e_read_nvm_word { enum i40e_status_code ret_code = I40E_SUCCESS; - if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE) { - ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ); - if (!ret_code) { + ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ); + if (!ret_code) { + if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE) { ret_code = i40e_read_nvm_word_aq(hw, offset, data); - i40e_release_nvm(hw); + } else { + ret_code = i40e_read_nvm_word_srctl(hw, offset, data); } - } else { - ret_code = i40e_read_nvm_word_srctl(hw, offset, data); + i40e_release_nvm(hw); } return ret_code; } @@ -886,9 +886,20 @@ enum i40e_status_code i40e_nvmupd_comman *((u16 *)&bytes[2]) = hw->nvm_wait_opcode; } + /* Clear error status on read */ + if (hw->nvmupd_state == I40E_NVMUPD_STATE_ERROR) + hw->nvmupd_state = I40E_NVMUPD_STATE_INIT; + return I40E_SUCCESS; } + /* Clear status even it is not read and log */ + if (hw->nvmupd_state == I40E_NVMUPD_STATE_ERROR) { + i40e_debug(hw, I40E_DEBUG_NVM, + "Clearing I40E_NVMUPD_STATE_ERROR state without reading\n"); + hw->nvmupd_state = I40E_NVMUPD_STATE_INIT; + } + switch (hw->nvmupd_state) { case I40E_NVMUPD_STATE_INIT: status = i40e_nvmupd_state_init(hw, cmd, bytes, perrno); @@ -1247,6 +1258,11 @@ void i40e_nvmupd_check_wait_event(struct } hw->nvm_wait_opcode = 0; + if (hw->aq.arq_last_status) { + hw->nvmupd_state = I40E_NVMUPD_STATE_ERROR; + return; + } + switch (hw->nvmupd_state) { case I40E_NVMUPD_STATE_INIT_WAIT: hw->nvmupd_state = I40E_NVMUPD_STATE_INIT; @@ -1409,7 +1425,8 @@ static enum i40e_status_code i40e_nvmupd if (hw->nvm_buff.va) { buff = hw->nvm_buff.va; - memcpy(buff, &bytes[aq_desc_len], aq_data_len); + i40e_memcpy(buff, &bytes[aq_desc_len], aq_data_len, + I40E_NONDMA_TO_NONDMA); } } @@ -1482,7 +1499,7 @@ static enum i40e_status_code i40e_nvmupd __func__, cmd->offset, cmd->offset + len); buff = ((u8 *)&hw->nvm_wb_desc) + cmd->offset; - memcpy(bytes, buff, len); + i40e_memcpy(bytes, buff, len, I40E_NONDMA_TO_NONDMA); bytes += len; remainder -= len; @@ -1496,7 +1513,7 @@ static enum i40e_status_code i40e_nvmupd i40e_debug(hw, I40E_DEBUG_NVM, "%s: databuf bytes %d to %d\n", __func__, start_byte, start_byte + remainder); - memcpy(bytes, buff, remainder); + i40e_memcpy(bytes, buff, remainder, I40E_NONDMA_TO_NONDMA); } return I40E_SUCCESS; Modified: head/sys/dev/ixl/i40e_osdep.c ============================================================================== --- head/sys/dev/ixl/i40e_osdep.c Thu Feb 9 23:36:50 2017 (r313496) +++ head/sys/dev/ixl/i40e_osdep.c Fri Feb 10 01:04:11 2017 (r313497) @@ -189,15 +189,71 @@ void i40e_debug_shared(struct i40e_hw *hw, enum i40e_debug_mask mask, char *fmt, ...) { va_list args; + device_t dev; if (!(mask & ((struct i40e_hw *)hw)->debug_mask)) return; + dev = ((struct i40e_osdep *)hw->back)->dev; + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Fri Feb 10 02:01: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 C1458CD8AF1; Fri, 10 Feb 2017 02:01:33 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9BEC5D9A; Fri, 10 Feb 2017 02:01:33 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A21Wnh087569; Fri, 10 Feb 2017 02:01:32 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A21WVF087568; Fri, 10 Feb 2017 02:01:32 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702100201.v1A21WVF087568@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 10 Feb 2017 02:01:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313504 - head/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Fri, 10 Feb 2017 02:01:33 -0000 Author: markj Date: Fri Feb 10 02:01:32 2017 New Revision: 313504 URL: https://svnweb.freebsd.org/changeset/base/313504 Log: When patching USDT probes, use non-unique names for aliases of weak symbols. Aliases are normally given names that include a key that's unique for each input object file. This, for example, ensures that aliases for identically named local symbols in different object files don't conflict. However, in some cases the static linker will leave an undefined alias after merging identical weak symbols, resulting in a link error. A non-unique name allows the aliases to be merged as well. PR: 216871 X-MFC With: r313262 Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Fri Feb 10 01:59:35 2017 (r313503) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Fri Feb 10 02:01:32 2017 (r313504) @@ -261,7 +261,7 @@ printf("%s:%s(%d): DOODAD\n",__FUNCTION_ sym->st_value = 0; sym->st_size = 0; sym->st_info = ELF32_ST_INFO(STB_GLOBAL, STT_FUNC); - sym->st_other = ELF32_ST_VISIBILITY(STV_HIDDEN); + sym->st_other = 0; sym->st_shndx = SHN_UNDEF; rel++; @@ -445,7 +445,7 @@ prepare_elf64(dtrace_hdl_t *dtp, const d sym->st_value = 0; sym->st_size = 0; sym->st_info = GELF_ST_INFO(STB_GLOBAL, STT_FUNC); - sym->st_other = ELF64_ST_VISIBILITY(STV_HIDDEN); + sym->st_other = 0; sym->st_shndx = SHN_UNDEF; rel++; @@ -1187,6 +1187,7 @@ process_obj(dtrace_hdl_t *dtp, const cha static const char dt_enabled[] = "enabled"; static const char dt_symprefix[] = "$dtrace"; static const char dt_symfmt[] = "%s%ld.%s"; + static const char dt_weaksymfmt[] = "%s.%s"; char probename[DTRACE_NAMELEN]; int fd, i, ndx, eprobe, mod = 0; Elf *elf = NULL; @@ -1548,44 +1549,46 @@ process_obj(dtrace_hdl_t *dtp, const cha if (dt_symtab_lookup(data_sym, osym, isym, rela.r_offset, shdr_rel.sh_info, &fsym, - (emachine1 == EM_PPC64), elf) != 0 && - dt_symtab_lookup(data_sym, 0, osym, + (emachine1 == EM_PPC64), elf) == 0) { + if (fsym.st_name > data_str->d_size) + goto err; + + r = s = (char *) data_str->d_buf + fsym.st_name; + assert(strstr(s, dt_symprefix) == s); + s = strchr(s, '.') + 1; + } else if (dt_symtab_lookup(data_sym, 0, osym, rela.r_offset, shdr_rel.sh_info, &fsym, - (emachine1 == EM_PPC64), elf) != 0) - goto err; - - if (fsym.st_name > data_str->d_size) - goto err; + (emachine1 == EM_PPC64), elf) == 0) { + u_int bind; - assert(GELF_ST_TYPE(fsym.st_info) == STT_FUNC); - - /* - * If this is our first time encountering this symbol, - * emit an alias. - */ - s = (char *)data_str->d_buf + fsym.st_name; - - if (strncmp(s, dt_symprefix, - sizeof (dt_symprefix) - 1) != 0) { - u_int bind = GELF_ST_BIND(fsym.st_info); + bind = GELF_ST_BIND(fsym.st_info) == STB_WEAK ? + STB_WEAK : STB_GLOBAL; + /* + * Emit an alias for the symbol. It needs to be + * non-preemptible so that .SUNW_dof relocations + * may be resolved at static link time. Aliases + * of weak symbols are given a non-unique name + * so that they may be merged by the linker. + */ dsym = fsym; dsym.st_name = istr; - dsym.st_info = GELF_ST_INFO(bind == STB_LOCAL ? - STB_GLOBAL : bind, STT_FUNC); + dsym.st_info = GELF_ST_INFO(bind, STT_FUNC); dsym.st_other = GELF_ST_VISIBILITY(STV_HIDDEN); (void) gelf_update_sym(data_sym, isym, &dsym); r = (char *) data_str->d_buf + istr; - istr += 1 + sprintf(r, dt_symfmt, dt_symprefix, objkey, - s); + s = (char *) data_str->d_buf + fsym.st_name; + if (bind == STB_WEAK) + istr += sprintf(r, dt_weaksymfmt, + dt_symprefix, s); + else + istr += sprintf(r, dt_symfmt, + dt_symprefix, objkey, s); + istr++; isym++; assert(isym <= nsym); - } else { - r = s; - s = strchr(s, '.'); - assert(s != NULL); - s++; - } + } else + goto err; if ((pvp = dt_provider_lookup(dtp, pname)) == NULL) { return (dt_link_error(dtp, elf, fd, bufs, From owner-svn-src-head@freebsd.org Fri Feb 10 05:16: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 4EB8BCD6E9B; Fri, 10 Feb 2017 05:16:16 +0000 (UTC) (envelope-from eri@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D7EC1D06; Fri, 10 Feb 2017 05:16:16 +0000 (UTC) (envelope-from eri@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A5GF03068351; Fri, 10 Feb 2017 05:16:15 GMT (envelope-from eri@FreeBSD.org) Received: (from eri@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A5GERJ068339; Fri, 10 Feb 2017 05:16:14 GMT (envelope-from eri@FreeBSD.org) Message-Id: <201702100516.v1A5GERJ068339@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eri set sender to eri@FreeBSD.org using -f From: =?UTF-8?Q?Ermal_Lu=c3=a7i?= Date: Fri, 10 Feb 2017 05:16:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313524 - in head/sys: netinet netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Fri, 10 Feb 2017 05:16:16 -0000 Author: eri Date: Fri Feb 10 05:16:14 2017 New Revision: 313524 URL: https://svnweb.freebsd.org/changeset/base/313524 Log: The patch provides the same socket option as Linux IP_ORIGDSTADDR. Unfortunately they will have different integer value due to Linux value being already assigned in FreeBSD. The patch is similar to IP_RECVDSTADDR but also provides the destination port value to the application. This allows/improves implementation of transparent proxies on UDP sockets due to having the whole information on forwarded packets. Sponsored-by: rsync.net Differential Revision: D9235 Reviewed-by: adrian Modified: head/sys/netinet/in.h head/sys/netinet/in_pcb.c head/sys/netinet/in_pcb.h head/sys/netinet/ip_output.c head/sys/netinet/udp_usrreq.c head/sys/netinet6/in6.h head/sys/netinet6/in6_pcb.c head/sys/netinet6/in6_pcb.h head/sys/netinet6/ip6_output.c head/sys/netinet6/raw_ip6.c head/sys/netinet6/udp6_usrreq.c Modified: head/sys/netinet/in.h ============================================================================== --- head/sys/netinet/in.h Fri Feb 10 05:14:19 2017 (r313523) +++ head/sys/netinet/in.h Fri Feb 10 05:16:14 2017 (r313524) @@ -433,6 +433,8 @@ __END_DECLS #define IP_BINDANY 24 /* bool: allow bind to any address */ #define IP_BINDMULTI 25 /* bool: allow multiple listeners on a tuple */ #define IP_RSS_LISTEN_BUCKET 26 /* int; set RSS listen bucket */ +#define IP_ORIGDSTADDR 27 /* bool: receive IP dst addr/port w/dgram */ +#define IP_RECVORIGDSTADDR IP_ORIGDSTADDR /* * Options for controlling the firewall and dummynet. Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Fri Feb 10 05:14:19 2017 (r313523) +++ head/sys/netinet/in_pcb.c Fri Feb 10 05:16:14 2017 (r313524) @@ -2492,6 +2492,10 @@ db_print_inpflags(int inp_flags) db_printf("%sINP_RECVDSTADDR", comma ? ", " : ""); comma = 1; } + if (inp_flags & INP_ORIGDSTADDR) { + db_printf("%sINP_ORIGDSTADDR", comma ? ", " : ""); + comma = 1; + } if (inp_flags & INP_HDRINCL) { db_printf("%sINP_HDRINCL", comma ? ", " : ""); comma = 1; Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Fri Feb 10 05:14:19 2017 (r313523) +++ head/sys/netinet/in_pcb.h Fri Feb 10 05:16:14 2017 (r313524) @@ -618,6 +618,7 @@ short inp_so_options(const struct inpcb #define INP_RECVFLOWID 0x00000100 /* populate recv datagram with flow info */ #define INP_RECVRSSBUCKETID 0x00000200 /* populate recv datagram with bucket id */ #define INP_RATE_LIMIT_CHANGED 0x00000400 /* rate limit needs attention */ +#define INP_ORIGDSTADDR 0x00000800 /* receive IP dst address/port */ /* * Flags passed to in_pcblookup*() functions. Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Fri Feb 10 05:14:19 2017 (r313523) +++ head/sys/netinet/ip_output.c Fri Feb 10 05:16:14 2017 (r313524) @@ -1065,6 +1065,7 @@ ip_ctloutput(struct socket *so, struct s case IP_MINTTL: case IP_RECVOPTS: case IP_RECVRETOPTS: + case IP_ORIGDSTADDR: case IP_RECVDSTADDR: case IP_RECVTTL: case IP_RECVIF: @@ -1126,6 +1127,10 @@ ip_ctloutput(struct socket *so, struct s OPTSET(INP_RECVDSTADDR); break; + case IP_ORIGDSTADDR: + OPTSET2(INP_ORIGDSTADDR, optval); + break; + case IP_RECVTTL: OPTSET(INP_RECVTTL); break; @@ -1258,6 +1263,7 @@ ip_ctloutput(struct socket *so, struct s case IP_MINTTL: case IP_RECVOPTS: case IP_RECVRETOPTS: + case IP_ORIGDSTADDR: case IP_RECVDSTADDR: case IP_RECVTTL: case IP_RECVIF: @@ -1303,6 +1309,10 @@ ip_ctloutput(struct socket *so, struct s optval = OPTBIT(INP_RECVDSTADDR); break; + case IP_ORIGDSTADDR: + optval = OPTBIT2(INP_ORIGDSTADDR); + break; + case IP_RECVTTL: optval = OPTBIT(INP_RECVTTL); break; Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Fri Feb 10 05:14:19 2017 (r313523) +++ head/sys/netinet/udp_usrreq.c Fri Feb 10 05:16:14 2017 (r313524) @@ -304,7 +304,7 @@ udp_append(struct inpcb *inp, struct ip { struct sockaddr *append_sa; struct socket *so; - struct mbuf *opts = NULL; + struct mbuf *tmpopts, *opts = NULL; #ifdef INET6 struct sockaddr_in6 udp_in6; #endif @@ -319,7 +319,7 @@ udp_append(struct inpcb *inp, struct ip if (up->u_tun_func != NULL) { in_pcbref(inp); INP_RUNLOCK(inp); - (*up->u_tun_func)(n, off, inp, (struct sockaddr *)udp_in, + (*up->u_tun_func)(n, off, inp, (struct sockaddr *)&udp_in[0], up->u_tun_ctx); INP_RLOCK(inp); return (in_pcbrele_rlocked(inp)); @@ -355,16 +355,27 @@ udp_append(struct inpcb *inp, struct ip #endif /* INET6 */ ip_savecontrol(inp, &opts, ip, n); } + if (inp->inp_vflag & INP_IPV4 && inp->inp_flags2 & INP_ORIGDSTADDR) { + tmpopts = sbcreatecontrol((caddr_t)&udp_in[1], + sizeof(struct sockaddr_in), IP_ORIGDSTADDR, IPPROTO_IP); + if (tmpopts) { + if (opts) { + tmpopts->m_next = opts; + opts = tmpopts; + } else + opts = tmpopts; + } + } #ifdef INET6 if (inp->inp_vflag & INP_IPV6) { bzero(&udp_in6, sizeof(udp_in6)); udp_in6.sin6_len = sizeof(udp_in6); udp_in6.sin6_family = AF_INET6; - in6_sin_2_v4mapsin6(udp_in, &udp_in6); + in6_sin_2_v4mapsin6(&udp_in[0], &udp_in6); append_sa = (struct sockaddr *)&udp_in6; } else #endif /* INET6 */ - append_sa = (struct sockaddr *)udp_in; + append_sa = (struct sockaddr *)&udp_in[0]; m_adj(n, off); so = inp->inp_socket; @@ -390,7 +401,7 @@ udp_input(struct mbuf **mp, int *offp, i uint16_t len, ip_len; struct inpcbinfo *pcbinfo; struct ip save_ip; - struct sockaddr_in udp_in; + struct sockaddr_in udpin[2]; struct mbuf *m; struct m_tag *fwd_tag; int cscov_partial, iphlen; @@ -435,11 +446,16 @@ udp_input(struct mbuf **mp, int *offp, i * Construct sockaddr format source address. Stuff source address * and datagram in user buffer. */ - bzero(&udp_in, sizeof(udp_in)); - udp_in.sin_len = sizeof(udp_in); - udp_in.sin_family = AF_INET; - udp_in.sin_port = uh->uh_sport; - udp_in.sin_addr = ip->ip_src; + bzero(&udpin[0], sizeof(struct sockaddr_in)); + udpin[0].sin_len = sizeof(struct sockaddr_in); + udpin[0].sin_family = AF_INET; + udpin[0].sin_port = uh->uh_sport; + udpin[0].sin_addr = ip->ip_src; + bzero(&udpin[1], sizeof(struct sockaddr_in)); + udpin[1].sin_len = sizeof(struct sockaddr_in); + udpin[1].sin_family = AF_INET; + udpin[1].sin_port = uh->uh_dport; + udpin[1].sin_addr = ip->ip_dst; /* * Make mbuf data length reflect UDP length. If not enough data to @@ -568,7 +584,7 @@ udp_input(struct mbuf **mp, int *offp, i blocked = imo_multi_filter(imo, ifp, (struct sockaddr *)&group, - (struct sockaddr *)&udp_in); + (struct sockaddr *)&udpin[0]); if (blocked != MCAST_PASS) { if (blocked == MCAST_NOTGMEMBER) IPSTAT_INC(ips_notmember); @@ -587,7 +603,7 @@ udp_input(struct mbuf **mp, int *offp, i UDP_PROBE(receive, NULL, last, ip, last, uh); if (udp_append(last, ip, n, iphlen, - &udp_in)) { + udpin)) { goto inp_lost; } } @@ -620,7 +636,7 @@ udp_input(struct mbuf **mp, int *offp, i goto badunlocked; } UDP_PROBE(receive, NULL, last, ip, last, uh); - if (udp_append(last, ip, m, iphlen, &udp_in) == 0) + if (udp_append(last, ip, m, iphlen, udp_in) == 0) INP_RUNLOCK(last); inp_lost: INP_INFO_RUNLOCK(pcbinfo); @@ -710,7 +726,7 @@ udp_input(struct mbuf **mp, int *offp, i } UDP_PROBE(receive, NULL, inp, ip, inp, uh); - if (udp_append(inp, ip, m, iphlen, &udp_in) == 0) + if (udp_append(inp, ip, m, iphlen, udp_in) == 0) INP_RUNLOCK(inp); return (IPPROTO_DONE); Modified: head/sys/netinet6/in6.h ============================================================================== --- head/sys/netinet6/in6.h Fri Feb 10 05:14:19 2017 (r313523) +++ head/sys/netinet6/in6.h Fri Feb 10 05:16:14 2017 (r313524) @@ -497,6 +497,9 @@ struct route_in6 { #define IPV6_RECVFLOWID 70 /* bool; receive IP6 flowid/flowtype w/ datagram */ #define IPV6_RECVRSSBUCKETID 71 /* bool; receive IP6 RSS bucket id w/ datagram */ +#define IPV6_ORIGDSTADDR 65 /* bool: allow getting dstaddr /port info */ +#define IPV6_RECVORIGDSTADDR IPV6_ORIGDSTADDR + /* * The following option is private; do not use it from user applications. * It is deliberately defined to the same value as IP_MSFILTER. Modified: head/sys/netinet6/in6_pcb.c ============================================================================== --- head/sys/netinet6/in6_pcb.c Fri Feb 10 05:14:19 2017 (r313523) +++ head/sys/netinet6/in6_pcb.c Fri Feb 10 05:16:14 2017 (r313524) @@ -1267,7 +1267,7 @@ in6_pcblookup_mbuf(struct inpcbinfo *pcb } void -init_sin6(struct sockaddr_in6 *sin6, struct mbuf *m) +init_sin6(struct sockaddr_in6 *sin6, struct mbuf *m, int srcordst) { struct ip6_hdr *ip; @@ -1275,7 +1275,7 @@ init_sin6(struct sockaddr_in6 *sin6, str bzero(sin6, sizeof(*sin6)); sin6->sin6_len = sizeof(*sin6); sin6->sin6_family = AF_INET6; - sin6->sin6_addr = ip->ip6_src; + sin6->sin6_addr = srcordst ? ip->ip6_dst : ip->ip6_src; (void)sa6_recoverscope(sin6); /* XXX: should catch errors... */ Modified: head/sys/netinet6/in6_pcb.h ============================================================================== --- head/sys/netinet6/in6_pcb.h Fri Feb 10 05:14:19 2017 (r313523) +++ head/sys/netinet6/in6_pcb.h Fri Feb 10 05:16:14 2017 (r313524) @@ -113,7 +113,7 @@ int in6_mapped_sockaddr(struct socket *s int in6_mapped_peeraddr(struct socket *so, struct sockaddr **nam); int in6_selecthlim(struct in6pcb *, struct ifnet *); int in6_pcbsetport(struct in6_addr *, struct inpcb *, struct ucred *); -void init_sin6(struct sockaddr_in6 *sin6, struct mbuf *m); +void init_sin6(struct sockaddr_in6 *sin6, struct mbuf *m, int); #endif /* _KERNEL */ #endif /* !_NETINET6_IN6_PCB_H_ */ Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Fri Feb 10 05:14:19 2017 (r313523) +++ head/sys/netinet6/ip6_output.c Fri Feb 10 05:16:14 2017 (r313524) @@ -1545,6 +1545,7 @@ ip6_ctloutput(struct socket *so, struct #endif case IPV6_V6ONLY: case IPV6_AUTOFLOWLABEL: + case IPV6_ORIGDSTADDR: case IPV6_BINDANY: case IPV6_BINDMULTI: #ifdef RSS @@ -1730,6 +1731,9 @@ do { \ OPTSET(IN6P_AUTOFLOWLABEL); break; + case IPV6_ORIGDSTADDR: + OPTSET2(INP_ORIGDSTADDR, optval); + break; case IPV6_BINDANY: OPTSET(INP_BINDANY); break; @@ -2018,6 +2022,10 @@ do { \ optval = OPTBIT(IN6P_AUTOFLOWLABEL); break; + case IPV6_ORIGDSTADDR: + optval = OPTBIT2(INP_ORIGDSTADDR); + break; + case IPV6_BINDANY: optval = OPTBIT(INP_BINDANY); break; Modified: head/sys/netinet6/raw_ip6.c ============================================================================== --- head/sys/netinet6/raw_ip6.c Fri Feb 10 05:14:19 2017 (r313523) +++ head/sys/netinet6/raw_ip6.c Fri Feb 10 05:16:14 2017 (r313524) @@ -166,7 +166,7 @@ rip6_input(struct mbuf **mp, int *offp, RIP6STAT_INC(rip6s_ipackets); - init_sin6(&fromsa, m); /* general init */ + init_sin6(&fromsa, m, 0); /* general init */ ifp = m->m_pkthdr.rcvif; Modified: head/sys/netinet6/udp6_usrreq.c ============================================================================== --- head/sys/netinet6/udp6_usrreq.c Fri Feb 10 05:14:19 2017 (r313523) +++ head/sys/netinet6/udp6_usrreq.c Fri Feb 10 05:16:14 2017 (r313524) @@ -137,7 +137,7 @@ udp6_append(struct inpcb *inp, struct mb struct sockaddr_in6 *fromsa) { struct socket *so; - struct mbuf *opts; + struct mbuf *opts = NULL, *tmp_opts; struct udpcb *up; INP_LOCK_ASSERT(inp); @@ -149,7 +149,7 @@ udp6_append(struct inpcb *inp, struct mb if (up->u_tun_func != NULL) { in_pcbref(inp); INP_RUNLOCK(inp); - (*up->u_tun_func)(n, off, inp, (struct sockaddr *)fromsa, + (*up->u_tun_func)(n, off, inp, (struct sockaddr *)&fromsa[0], up->u_tun_ctx); INP_RLOCK(inp); return (in_pcbrele_rlocked(inp)); @@ -173,11 +173,23 @@ udp6_append(struct inpcb *inp, struct mb if (inp->inp_flags & INP_CONTROLOPTS || inp->inp_socket->so_options & SO_TIMESTAMP) ip6_savecontrol(inp, n, &opts); + if (inp->inp_vflag & INP_IPV6 && inp->inp_flags2 & INP_ORIGDSTADDR) { + tmp_opts = sbcreatecontrol((caddr_t)&fromsa[1], + sizeof(struct sockaddr_in6), IP_ORIGDSTADDR, IPPROTO_IPV6); + if (tmp_opts) { + if (opts) { + tmp_opts->m_next = opts; + opts = tmp_opts; + } else + opts = tmp_opts; + } + + } m_adj(n, off + sizeof(struct udphdr)); so = inp->inp_socket; SOCKBUF_LOCK(&so->so_rcv); - if (sbappendaddr_locked(&so->so_rcv, (struct sockaddr *)fromsa, n, + if (sbappendaddr_locked(&so->so_rcv, (struct sockaddr *)&fromsa[0], n, opts) == 0) { SOCKBUF_UNLOCK(&so->so_rcv); m_freem(n); @@ -202,7 +214,7 @@ udp6_input(struct mbuf **mp, int *offp, int off = *offp; int cscov_partial; int plen, ulen; - struct sockaddr_in6 fromsa; + struct sockaddr_in6 fromsa[2]; struct m_tag *fwd_tag; uint16_t uh_sum; uint8_t nxt; @@ -277,8 +289,10 @@ udp6_input(struct mbuf **mp, int *offp, /* * Construct sockaddr format source address. */ - init_sin6(&fromsa, m); - fromsa.sin6_port = uh->uh_sport; + init_sin6(&fromsa[0], m, 0); + fromsa[0].sin6_port = uh->uh_sport; + init_sin6(&fromsa[1], m, 1); + fromsa[1].sin6_port = uh->uh_dport; pcbinfo = udp_get_inpcbinfo(nxt); if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { @@ -349,7 +363,7 @@ udp6_input(struct mbuf **mp, int *offp, blocked = im6o_mc_filter(imo, ifp, (struct sockaddr *)&mcaddr, - (struct sockaddr *)&fromsa); + (struct sockaddr *)&fromsa[0]); if (blocked != MCAST_PASS) { if (blocked == MCAST_NOTGMEMBER) IP6STAT_INC(ip6s_notmember); @@ -370,7 +384,7 @@ udp6_input(struct mbuf **mp, int *offp, INP_RLOCK(last); UDP_PROBE(receive, NULL, last, ip6, last, uh); - if (udp6_append(last, n, off, &fromsa)) + if (udp6_append(last, n, off, fromsa)) goto inp_lost; INP_RUNLOCK(last); } @@ -402,7 +416,7 @@ udp6_input(struct mbuf **mp, int *offp, INP_RLOCK(last); INP_INFO_RUNLOCK(pcbinfo); UDP_PROBE(receive, NULL, last, ip6, last, uh); - if (udp6_append(last, m, off, &fromsa) == 0) + if (udp6_append(last, m, off, fromsa) == 0) INP_RUNLOCK(last); inp_lost: return (IPPROTO_DONE); @@ -482,7 +496,7 @@ udp6_input(struct mbuf **mp, int *offp, } } UDP_PROBE(receive, NULL, inp, ip6, inp, uh); - if (udp6_append(inp, m, off, &fromsa) == 0) + if (udp6_append(inp, m, off, fromsa) == 0) INP_RUNLOCK(inp); return (IPPROTO_DONE); From owner-svn-src-head@freebsd.org Fri Feb 10 05: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 A67F8CD73FE; Fri, 10 Feb 2017 05:30:15 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 56E8D359; Fri, 10 Feb 2017 05:30:14 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id c3eRckLFeVQuxc3eSckSOp; Thu, 09 Feb 2017 22:21:45 -0700 X-Authority-Analysis: v=2.2 cv=BNTDlBYG c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=n2v9WMKugxEA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=NX_4MUJWoXXv2Cpo7zUA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id E574E14C; Thu, 9 Feb 2017 21:21:42 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v1A5LgfJ003611; Thu, 9 Feb 2017 21:21:42 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201702100521.v1A5LgfJ003611@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Konstantin Belousov cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313495 - head/sys/kern In-Reply-To: Message from Konstantin Belousov of "Thu, 09 Feb 2017 23:35:57 +0000." <201702092335.v19NZvSQ026869@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 09 Feb 2017 21:21:42 -0800 X-CMAE-Envelope: MS4wfArmT95PmROSROQZMsBtw8MOHI4rdLYaAhyLpH3RffJNUTkXXGA8LL8cjUgHwABJ8Lot80xcSju7F2WM3eNVGVmgtzB/xs4BkiKQnJg6WiNTa/gyIg3m dPnNe7pwnUPM0GskKT/HEdklov+CAjurfgs/tDAgpFUxeboW6bFeJlrypG/dm3oQCBf0phV4H2bMYMeCCzTFnoJobkfyEssyPmYZFJ+M9dnygwWC1p9L6Vfp CbX3T3Cn2Bu2ywGJ3VL2v7PV1uORkkSFyb4wV00AefgQh6xJUouaHB1ovG4Qdq32 X-BeenThere: svn-src-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: Fri, 10 Feb 2017 05:30:15 -0000 In message <201702092335.v19NZvSQ026869@repo.freebsd.org>, Konstantin Belousov writes: > Author: kib > Date: Thu Feb 9 23:35:57 2017 > New Revision: 313495 > URL: https://svnweb.freebsd.org/changeset/base/313495 > > Log: > Do not establish advisory locks when doing open(O_EXLOCK) or open(O_SHLOCK) > for files which do not have DTYPE_VNODE type. > > Both flock(2) and fcntl(2) syscalls refuse to acquire advisory lock on > a file which type is not DTYPE_VNODE. Do the same when lock is > requested from open(2). > > Restructure the block in vn_open_vnode() which handles O_EXLOCK and > O_SHLOCK open flags to make it easier to quit its execution earlier > with an error. > > Tested by: pho (previous version) > Sponsored by: The FreeBSD Foundation > MFC after: 2 weeks > > Modified: > head/sys/kern/vfs_vnops.c > > Modified: head/sys/kern/vfs_vnops.c > ============================================================================= > = > --- head/sys/kern/vfs_vnops.c Thu Feb 9 23:33:06 2017 (r313494) > +++ head/sys/kern/vfs_vnops.c Thu Feb 9 23:35:57 2017 (r313495) > @@ -349,8 +349,12 @@ vn_open_vnode(struct vnode *vp, int fmod > if ((error = VOP_OPEN(vp, fmode, cred, td, fp)) != 0) > return (error); > > - if (fmode & (O_EXLOCK | O_SHLOCK)) { > + while ((fmode & (O_EXLOCK | O_SHLOCK)) != 0) { > KASSERT(fp != NULL, ("open with flock requires fp")); > + if (fp->f_type != DTYPE_VNODE) { > + error = EBADF; > + break; > + } Hi kib@, This broke dhclient. I've attached typescript output at the end of this email. > lock_flags = VOP_ISLOCKED(vp); > VOP_UNLOCK(vp, 0); > lf.l_whence = SEEK_SET; > @@ -367,8 +371,12 @@ vn_open_vnode(struct vnode *vp, int fmod > if (error == 0) > fp->f_flag |= FHASLOCK; > vn_lock(vp, lock_flags | LK_RETRY); > - if (error == 0 && vp->v_iflag & VI_DOOMED) > + if (error != 0) > + break; > + if ((vp->v_iflag & VI_DOOMED) != 0) { > error = ENOENT; > + break; > + } > > /* > * Another thread might have used this vnode as an > @@ -376,20 +384,20 @@ vn_open_vnode(struct vnode *vp, int fmod > * Ensure the vnode is still able to be opened for > * writing after the lock has been obtained. > */ > - if (error == 0 && accmode & VWRITE) > + if ((accmode & VWRITE) != 0) > error = vn_writechk(vp); > + break; > + } > > - if (error != 0) { > - fp->f_flag |= FOPENFAILED; > - fp->f_vnode = vp; > - if (fp->f_ops == &badfileops) { > - fp->f_type = DTYPE_VNODE; > - fp->f_ops = &vnops; > - } > - vref(vp); > + if (error != 0) { > + fp->f_flag |= FOPENFAILED; > + fp->f_vnode = vp; > + if (fp->f_ops == &badfileops) { > + fp->f_type = DTYPE_VNODE; > + fp->f_ops = &vnops; > } > - } > - if (error == 0 && fmode & FWRITE) { > + vref(vp); > + } else if ((fmode & FWRITE) != 0) { > VOP_ADD_WRITECOUNT(vp, 1); > CTR3(KTR_VFS, "%s: vp %p v_writecount increased to %d", > __func__, vp, vp->v_writecount); > > Script started on Thu Feb 9 20:22:12 2017 slippy# dhclient lagg0 can't open and lock /var/db/dhclient.leases.lagg0: Bad file descriptor exiting. slippy# truss dhclient lagg0 mmap(0x0,32768,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 740511744 (0x2c235000) issetugid() = 0 (0x0) lstat("/etc",{ mode=drwxr-xr-x ,inode=119424,size=3584,blksize=16384 }) = 0 (0x0) lstat("/etc/libmap.conf",{ mode=-rw-r--r-- ,inode=119627,size=5672,blksize=1 6384 }) = 0 (0x0) openat(AT_FDCWD,"/etc/libmap.conf",O_RDONLY|O_CLOEXEC,00) = 3 (0x3) fstat(3,{ mode=-rw-r--r-- ,inode=119627,size=5672,blksize=16384 }) = 0 (0x0) mmap(0x0,5672,PROT_READ,MAP_PRIVATE,3,0x0) = 740544512 (0x2c23d000) close(3) = 0 (0x0) mmap(0x0,36864,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 740552704 (0x2c23f000) munmap(0x2c23d000,5672) = 0 (0x0) openat(AT_FDCWD,"/var/run/ld-elf.so.hints",O_RDONLY|O_CLOEXEC,00) = 3 (0x3) read(3,"Ehnt\^A\0\0\0\M^@\0\0\0\M-7\^C\0"...,128) = 128 (0x80) fstat(3,{ mode=-r--r--r-- ,inode=318545,size=1079,blksize=16384 }) = 0 (0x0) lseek(3,0x80,SEEK_SET) = 128 (0x80) read(3,"/lib:/usr/lib:/usr/lib/compat:/u"...,951) = 951 (0x3b7) close(3) = 0 (0x0) access("/lib/libutil.so.9",F_OK) = 0 (0x0) openat(AT_FDCWD,"/lib/libutil.so.9",O_RDONLY|O_CLOEXEC|O_VERIFY,00) = 3 (0x3) fstat(3,{ mode=-r--r--r-- ,inode=358296,size=74256,blksize=16384 }) = 0 (0x0) mmap(0x0,4096,PROT_READ,MAP_PRIVATE|MAP_PREFAULT_READ,3,0x0) = 740544512 (0x2c23d000) mmap(0x0,2174976,PROT_NONE,MAP_PRIVATE|MAP_ANON|MAP_NOCORE,-1,0x0) = 742612992 (0x2c436000) mmap(0x2c436000,69632,PROT_READ|PROT_EXEC,MAP_PRIVATE|MAP_FIXED|MAP_NOCORE|M AP_PREFAULT_READ,3,0x0) = 742612992 (0x2c436000) mmap(0x2c646000,8192,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_PREFAULT _READ,3,0x10000) = 744775680 (0x2c646000) mmap(0x2c648000,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_ANON,-1, 0x0) = 744783872 (0x2c648000) munmap(0x2c23d000,4096) = 0 (0x0) close(3) = 0 (0x0) access("/lib/libc.so.7",F_OK) = 0 (0x0) openat(AT_FDCWD,"/lib/libc.so.7",O_RDONLY|O_CLOEXEC|O_VERIFY,00) = 3 (0x3) fstat(3,{ mode=-r--r--r-- ,inode=358279,size=1785024,blksize=16384 }) = 0 (0x0) mmap(0x0,4096,PROT_READ,MAP_PRIVATE|MAP_PREFAULT_READ,3,0x0) = 740544512 (0x2c23d000) mmap(0x0,3928064,PROT_NONE,MAP_PRIVATE|MAP_ANON|MAP_NOCORE,-1,0x0) = 744787968 (0x2c649000) mmap(0x2c649000,1679360,PROT_READ|PROT_EXEC,MAP_PRIVATE|MAP_FIXED|MAP_NOCORE |MAP_PREFAULT_READ,3,0x0) = 744787968 (0x2c649000) mmap(0x2c9e2000,53248,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_PREFAUL T_READ,3,0x199000) = 748560384 (0x2c9e2000) mmap(0x2c9ef000,102400,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_ANON,- 1,0x0) = 748613632 (0x2c9ef000) munmap(0x2c23d000,4096) = 0 (0x0) close(3) = 0 (0x0) munmap(0x2c244000,16384) = 0 (0x0) mmap(0x0,102400,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 740573184 (0x2c244000) sysarch(AMD64_SET_FSBASE,0x7fffffffe328) = 0 (0x0) sigprocmask(SIG_BLOCK,{ SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTER M|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXF SZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0) sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0) readlink("/etc/malloc.conf",0x7fffffffda20,1024) ERR#2 'No such file or directory' issetugid() = 0 (0x0) __sysctl(0x7fffffffd8c0,0x2,0x7fffffffd910,0x7fffffffd908,0x2c7ac7b7,0xd) = 0 (0x0) __sysctl(0x7fffffffd910,0x2,0x7fffffffd9d4,0x7fffffffd9c8,0x0,0x0) = 0 (0x0) mmap(0x0,2097152,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 748716032 (0x2ca08000) munmap(0x2ca08000,2097152) = 0 (0x0) mmap(0x0,4190208,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 748716032 (0x2ca08000) munmap(0x2ca08000,2064384) = 0 (0x0) munmap(0x2ce00000,28672) = 0 (0x0) sigprocmask(SIG_BLOCK,{ SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTER M|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXF SZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0) sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0) sigprocmask(SIG_BLOCK,{ SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTER M|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXF SZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0) sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0) sigprocmask(SIG_BLOCK,{ SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTER M|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXF SZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0) sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0) socket(PF_LOCAL,SOCK_DGRAM|SOCK_CLOEXEC,0) = 3 (0x3) connect(3,{ AF_UNIX "/var/run/logpriv" },106) = 0 (0x0) mmap(0x0,2097152,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 752877568 (0x2ce00000) openat(AT_FDCWD,"/var/run/dhclient.lagg0.pid",O_WRONLY|O_NONBLOCK|O_CREAT|O_ CLOEXEC,0644) = 4 (0x4) flock(0x4,0x6) = 0 (0x0) stat("/var/run/dhclient.lagg0.pid",{ mode=-rw-r--r-- ,inode=318523,size=0,blksize=16384 }) = 0 (0x0) fstat(4,{ mode=-rw-r--r-- ,inode=318523,size=0,blksize=16384 }) = 0 (0x0) ftruncate(4,0x0) = 0 (0x0) fstat(4,{ mode=-rw-r--r-- ,inode=318523,size=0,blksize=16384 }) = 0 (0x0) issetugid() = 0 (0x0) open("/usr/share/zoneinfo/America/Vancouver",O_RDONLY,00) = 5 (0x5) fstat(5,{ mode=-r--r--r-- ,inode=164043,size=2875,blksize=16384 }) = 0 (0x0) read(5,"TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0"...,41448) = 2875 (0xb3b) close(5) = 0 (0x0) issetugid() = 0 (0x0) open("/usr/share/zoneinfo/posixrules",O_RDONLY,00) = 5 (0x5) fstat(5,{ mode=-r--r--r-- ,inode=164324,size=3519,blksize=16384 }) = 0 (0x0) read(5,"TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0"...,41448) = 3519 (0xdbf) close(5) = 0 (0x0) open("/etc/dhclient.conf",O_RDONLY,0666) = 5 (0x5) fstat(5,{ mode=-rw-r--r-- ,inode=120257,size=2514,blksize=16384 }) = 0 (0x0) read(5,"# $FreeBSD: head/etc/dhclient.co"...,16384) = 2514 (0x9d2) read(5,0x2ce34600,16384) = 0 (0x0) close(5) = 0 (0x0) fstat(4,{ mode=-rw-r--r-- ,inode=318523,size=0,blksize=16384 }) = 0 (0x0) ftruncate(4,0x0) = 0 (0x0) getpid() = 3061 (0xbf5) pwrite(0x4,0x7fffffffe810,0x4,0x0) = 4 (0x4) socket(PF_INET,SOCK_DGRAM,0) = 5 (0x5) ioctl(5,SIOCGIFMEDIA,0xffffe870) = 0 (0x0) close(5) = 0 (0x0) openat(AT_FDCWD,"/dev/null",O_RDWR,00) = 5 (0x5) stat("/etc/nsswitch.conf",{ mode=-rw-r--r-- ,inode=119871,size=400,blksize=1 6384 }) = 0 (0x0) open("/etc/nsswitch.conf",O_RDONLY|O_CLOEXEC,0666) = 6 (0x6) ioctl(6,TIOCGETA,0xffffe4f0) ERR#25 'Inappropriate ioctl for device' fstat(6,{ mode=-rw-r--r-- ,inode=119871,size=400,blksize=16384 }) = 0 (0x0) read(6,"#\n# nsswitch.conf(5) - name ser"...,16384) = 400 (0x190) read(6,0x2ce34600,16384) = 0 (0x0) sigprocmask(SIG_BLOCK,{ SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTER M|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXF SZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0) access("/lib/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/lib/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/lib/compat/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/compat/pkg/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/krb5/lib/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/kde4/lib/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/compat/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/ffmpeg0/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/freeradius-2.2.9/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc47/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc48/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc49/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc5/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc6/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gegl-0.2/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/graphviz/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/httrack/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/itcl3.4/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/jitsi/lib/native/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/libxul/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/mysql/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/mysql/plugin/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/nss/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/opencollada/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/perl5/5.20/mach/CORE/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/perl5/5.22/mach/CORE/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/perl5/5.24/mach/CORE/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/pgtcl/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/pidgin/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/pth/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/qt4/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/samba4/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/xmms/Input/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/xrdp/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/libexec/openldap/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm34/lib/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm35/lib/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm36/lib/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm37/lib/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm38/lib/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm39/lib/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/lib/casper/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/lib/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/lib/nss_files.so.1",F_OK) ERR#2 'No such file or directory' sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0) sigprocmask(SIG_BLOCK,{ SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTER M|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXF SZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0) access("/lib/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/lib/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/lib/compat/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/compat/pkg/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/krb5/lib/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/kde4/lib/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/compat/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/ffmpeg0/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/freeradius-2.2.9/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc47/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc48/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc49/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc5/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc6/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gegl-0.2/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/graphviz/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/httrack/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/itcl3.4/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/jitsi/lib/native/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/libxul/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/mysql/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/mysql/plugin/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/nss/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/opencollada/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/perl5/5.20/mach/CORE/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/perl5/5.22/mach/CORE/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/perl5/5.24/mach/CORE/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/pgtcl/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/pidgin/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/pth/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/qt4/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/samba4/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/xmms/Input/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/xrdp/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/libexec/openldap/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm34/lib/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm35/lib/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm36/lib/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm37/lib/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm38/lib/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm39/lib/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/lib/casper/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/lib/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/lib/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0) sigprocmask(SIG_BLOCK,{ SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTER M|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXF SZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0) access("/lib/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/lib/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/lib/compat/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/compat/pkg/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/krb5/lib/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/kde4/lib/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/compat/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/ffmpeg0/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/freeradius-2.2.9/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc47/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc48/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc49/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc5/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc6/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gegl-0.2/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/graphviz/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/httrack/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/itcl3.4/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/jitsi/lib/native/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/libxul/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/mysql/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/mysql/plugin/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/nss/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/opencollada/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/perl5/5.20/mach/CORE/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/perl5/5.22/mach/CORE/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/perl5/5.24/mach/CORE/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/pgtcl/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/pidgin/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/pth/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/qt4/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/samba4/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/xmms/Input/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/xrdp/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/libexec/openldap/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm34/lib/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm35/lib/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm36/lib/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm37/lib/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm38/lib/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm39/lib/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/lib/casper/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/lib/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/lib/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0) sigprocmask(SIG_BLOCK,{ SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTER M|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXF SZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0) access("/lib/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/lib/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/lib/compat/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/compat/pkg/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/krb5/lib/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/kde4/lib/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/compat/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/ffmpeg0/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/freeradius-2.2.9/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc47/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc48/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc49/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc5/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc6/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gegl-0.2/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/graphviz/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/httrack/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/itcl3.4/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/jitsi/lib/native/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/libxul/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/mysql/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/mysql/plugin/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/nss/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/opencollada/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/perl5/5.20/mach/CORE/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/perl5/5.22/mach/CORE/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/perl5/5.24/mach/CORE/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/pgtcl/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/pidgin/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/pth/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/qt4/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/samba4/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/xmms/Input/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/xrdp/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/libexec/openldap/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm34/lib/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm35/lib/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm36/lib/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm37/lib/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm38/lib/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm39/lib/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/lib/casper/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/lib/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/lib/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0) ioctl(6,TIOCGETA,0xffffe4c0) ERR#25 'Inappropriate ioctl for device' close(6) = 0 (0x0) sigprocmask(SIG_BLOCK,{ SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTER M|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXF SZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0) sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0) sigprocmask(SIG_BLOCK,{ SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTER M|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXF SZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0) sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0) geteuid() = 0 (0x0) open("/etc/spwd.db",O_RDONLY|O_CLOEXEC,00) = 6 (0x6) fstat(6,{ mode=-rw------- ,inode=119874,size=57344,blksize=16384 }) = 0 (0x0) read(6,"\0\^F\^Ua\0\0\0\^B\0\0\^D\M-R\0"...,260) = 260 (0x104) pread(0x6,0x2ce76000,0x1000,0x6000) = 4096 (0x1000) pread(0x6,0x2ce77000,0x1000,0x8000) = 4096 (0x1000) close(6) = 0 (0x0) __sysctl(0x7fffffffe8a0,0x2,0x629820,0x7fffffffe898,0x0,0x0) = 0 (0x0) fork() = 3062 (0xbf6) wait4(-1,{ EXITED,val=0 },0x0,0x0) = 3062 (0xbf6) __sysctl(0x7fffffffe810,0x6,0x0,0x7fffffffe808,0x0,0x0) = 0 (0x0) __sysctl(0x7fffffffe810,0x6,0x2ce80000,0x7fffffffe808,0x0,0x0) = 0 (0x0) openat(AT_FDCWD,"/dev/bpf0",O_RDONLY,00) = 6 (0x6) ioctl(6,BIOCSETIF,0x2ce2a040) = 0 (0x0) ioctl(6,BIOCVERSION,0xffffe828) = 0 (0x0) ioctl(6,BIOCIMMEDIATE,0xffffe814) = 0 (0x0) ioctl(6,BIOCGBLEN,0xffffe810) = 0 (0x0) ioctl(6,BIOCSETF,0xffffe818) = 0 (0x0) ioctl(6,BIOCLOCK,0x0) = 0 (0x0) cap_rights_limit(0x6,0x7fffffffe830) = 0 (0x0) cap_ioctls_limit(0x6,0x4116e0,0x2) = 0 (0x0) openat(AT_FDCWD,"/dev/bpf0",O_WRONLY,00) = 7 (0x7) ioctl(7,BIOCSETIF,0x2ce2a040) = 0 (0x0) ioctl(7,BIOCVERSION,0xffffe830) = 0 (0x0) ioctl(7,BIOCSETWF,0xffffe820) = 0 (0x0) ioctl(7,BIOCLOCK,0x0) = 0 (0x0) cap_rights_limit(0x7,0x7fffffffe838) = 0 (0x0) socket(PF_INET,SOCK_RAW,17) = 8 (0x8) setsockopt(0x8,0x0,0x2,0x7fffffffe81c,0x4) = 0 (0x0) pipe2(0x7fffffffe8e8,0) = 0 (0x0) fork() = 3067 (0xbfb) close(8) = 0 (0x0) close(7) = 0 (0x0) close(9) = 0 (0x0) cap_rights_limit(0xa,0x7fffffffe8d8) = 0 (0x0) openat(AT_FDCWD,"/var/db/dhclient.leases.lagg0",O_RDONLY|O_EXLOCK|O_CREAT,00 ) ERR#9 'Bad file descriptor' stat("/usr/share/nls/C/libc.cat",0x7fffffffe288) ERR#2 'No such file or directory' stat("/usr/share/nls/libc/C",0x7fffffffe288) ERR#2 'No such file or directory' stat("/usr/local/share/nls/C/libc.cat",0x7fffffffe288) ERR#2 'No such file or directory' stat("/usr/local/share/nls/libc/C",0x7fffffffe288) ERR#2 'No such file or directory' getpid() = 3061 (0xbf5) sendto(3,"<27>Feb 9 20:22:24 dhclient[306"...,106,0x0,NULL,0x0) = 106 (0x6a) can't open and lock /var/db/dhclient.leases.lagg0: Bad file descriptorwrite(2,"can't open and lock /var/db/dhcl"...,70) = 70 (0x46) write(2,"\n",1) = 1 (0x1) getpid() = 3061 (0xbf5) sendto(3,"<26>Feb 9 20:22:24 dhclient[306"...,44,0x0,NULL,0x0) = 44 (0x2c) exiting. write(2,"exiting.\n",9) = 9 (0x9) fstat(4,{ mode=-rw-r--r-- ,inode=318523,size=4,blksize=16384 }) = 0 (0x0) unlink("/var/run/dhclient.lagg0.pid") = 0 (0x0) close(4) = 0 (0x0) sigprocmask(SIG_BLOCK,{ SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTER M|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXF SZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0) sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0) sigprocmask(SIG_BLOCK,{ SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTER M|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXF SZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0) sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0) sigprocmask(SIG_BLOCK,{ SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTER M|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXF SZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0) sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0) sigprocmask(SIG_BLOCK,{ SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTER M|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXF SZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0) sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0) exit(0x1) process exit, rval = 1 slippy# exit Script done on Thu Feb 9 20:22:26 2017 -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Fri Feb 10 05:30: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 D027DCD745F; Fri, 10 Feb 2017 05:30:59 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x244.google.com (mail-pg0-x244.google.com [IPv6:2607:f8b0:400e:c05::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9C5F677C; Fri, 10 Feb 2017 05:30:59 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x244.google.com with SMTP id 194so2217976pgd.0; Thu, 09 Feb 2017 21:30:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=wYlvhPb2NTwLnbJfm8YG8UBnMbnRhlzUM9xBu/G+Bag=; b=GYeBnBr7kwFH0YTow59WgGVVpDWvSHVIoyC3ko1wTgtI04wpHIlKrqVCjKhtzhx+OV I0uJJw3e9BUyxkuqjnEkAmeTW0znm0NITghy1HzKKWN35q0seoLRVIMvkE3w1oVMLiSe i3GKf50O45etrzjeQwQX5sjLXwBCZf6CM8hZovyDcq5KCVAGXPuLtXtPWadKZs9UUwqw krOCCX05p14Cm77zJo0O7PPTvod1kww47lsdz7mV6hQPkWuaOGQzkzM/SG1N0bcSefhj lAusZhY0DRW6RWR0R4+zXW/a3+lYVJwv734ltGsnn/IMG8+Ija6ND/Skpn2u1GoCOeUb mszQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=wYlvhPb2NTwLnbJfm8YG8UBnMbnRhlzUM9xBu/G+Bag=; b=HAaADl8QdvbjZNyT1XD5LUKDOb9SKG2wGwECB/sYzdgUtONGxPp+WKeqN/HYRKzEsI CsBZZ+QkopdYI9rfLcqccVaNs2q5ItsmRqLWdVdQ8tPy+KMtpWOYb3k0eHGeBzNszLf4 qDvMqx4Y3xWAdxPulPSXvHyEzDrJyPC/ArgQh8yb3/GbAuTDZPq4oer57iyifHpIsoO+ Gcz4zRYlsFC7LCpxj8RRwTQxdSlhHt4sRxz+RxYi8xD/9+KhOKrwPIVZ71nFccnKdogR UwSPhQ7lSfDG0DkjkEj+YKQKLDGl87MxITcMZPLl3E0/2/DkqtARgE56pl+XVCvJtNza dSzw== X-Gm-Message-State: AMke39m0cvS78TAPeXUNEMxw8b3Pm6jATJfB84Hp84iRsM7op29TiPX4G+XCZFrvTfWnjQ== X-Received: by 10.99.94.195 with SMTP id s186mr8488755pgb.197.1486704659244; Thu, 09 Feb 2017 21:30:59 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id a2sm1350637pfc.72.2017.02.09.21.30.58 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Feb 2017 21:30:58 -0800 (PST) Subject: Re: svn commit: r311993 - head/sys/dev/nand Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_6C808015-34ED-4AE1-9338-A087205434AA"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Thu, 9 Feb 2017 21:30:56 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Alexander Kabaev , Alexander Motin Message-Id: <26EBCAD7-44FC-4E80-80C2-079D69DEFCB2@gmail.com> References: <201701121805.v0CI5CYg090736@repo.freebsd.org> To: Ronald Klop X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-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: Fri, 10 Feb 2017 05:30:59 -0000 --Apple-Mail=_6C808015-34ED-4AE1-9338-A087205434AA Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 26, 2017, at 09:07, Ronald Klop wrote: >=20 > Should this be merged to 11-stable also? > I got a build failure on this with 11/arm. Me too when I ran =E2=80=9Cmake tinderbox=E2=80=9D. I=E2=80=99m working = on the merge to ^/stable/10 and ^/stable/11 right now. Thanks, -Ngie --Apple-Mail=_6C808015-34ED-4AE1-9338-A087205434AA Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYnVARAAoJEPWDqSZpMIYVLacP/07ilizSyqOd8vU/Oim+lNbS klS2DoKh5GymTP+GaUITbPTbi+PuNnoCs4dBUWqN9eqZdGv7dW3DS+vlmP8IBIon IELMY6K4UqTQUOEmrCRiEqepo9Vsvy+DG/bnsnsaXgxMd+suzZYiDo5bdaHwlegg jZ14Npvs06XhXDAZWlP7Xbc5m1JbqGmCcTtXCH7bWyi/K/CSdVj1XWs0ZENMuU+1 sWZi7YK5jRJWdtWX4F9pEH9/A5d+44GU6xoElZ19BBeUQkiPydRblhzGTxMIOv+l yqw6zw7M8J7cKAPpAo66OfCg+L1Sv3rACQZ/tccgoq51IvksSsPonSmg3P4lb5MD pcF241dIxgrxvagHywKVCQyYJqSB2Sb/PLreUr++xm5yDoaXUzDBm+NybizPmGKO fRGHhwCaByMEG6RUo2Wtyh0fGQfnYwJvb/Ll/NQmya36FyE+l+0FSY4DheQPHCSQ 0mBBLW0p2wxKml/9zysTCGWkyrwCeFmhGfEFs6kmJ3PCv5NDVMSKeHyZzvHzzyMU lQ4G8w4G4f0ZXGe/n6LrzQm53j+3XnTOBpAb6AhQtHdmpJzVotDgxIlCczTZWOX/ H9t/0enu7fGVzTTUNLCyhbGsjNIDuaA6fs/mQDL8BGRsQ/vLv2Fg72OjmFxRTFBb BgFlxCYCLYCURIqnAQML =2SJg -----END PGP SIGNATURE----- --Apple-Mail=_6C808015-34ED-4AE1-9338-A087205434AA-- From owner-svn-src-head@freebsd.org Fri Feb 10 05:32: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 1EFDBCD76B5; Fri, 10 Feb 2017 05:32:54 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DF2ACB28; Fri, 10 Feb 2017 05:32:53 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x244.google.com with SMTP id b145so855580pfb.2; Thu, 09 Feb 2017 21:32:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=cvvj9Hv8OBqFTPC19/4ERRZzMV5FI8aQhrjldBgE3rk=; b=qd2noEoIP1Ngn2Q9Z58C/EaR7OIxdDa+z2BREMpPTgvaoPLPfLEhzJsOOEERdrge5f TMXgqTUXQ1k9uW+3cmKR3SWbDwu/2vHrL5svaZq/IZO0otoS2pkGcWuKTgV48l6D8idb E1hRnnF1VOEKGKBHwve/ZjKAraw3XHFkPHdo2MSC0s2+TjWswjvxm60i++91O2wFnKE6 sIdFiKHGYWQc3dUJO7N/Xcvfdnxm0x9vZL32KWmyFZWgzB5ySiwYMhD/YJsTrA6k1SQp AyKQy4wzSbrj1VtQKR5mRi8KX85W122SQfcweHgVQpsUcLkDfJNRkejNnspHnCJcwQC7 jnJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=cvvj9Hv8OBqFTPC19/4ERRZzMV5FI8aQhrjldBgE3rk=; b=dOC2l8ufDplAtPq2FyfYx0OWLDlvzEPoVvgnFfMk0vDAy7NZkK2KtAoO/q+LrZvcmA BhM4cGnEM3AvT2G4zkRX7MUaKkc4AXoqEk+CAzJnrfBnkunAQqDQwqOr3XLe2lnrZ7ek 5vk1nyvEzZ7ORbGLGXvqBWSzyY3ozoU6oJ5a/aKS6x1evgCgnH1RHSy6EwDdXWqsFTcg jd49AnrhCVppcf4Mlk4xkFa3ENPSeTuTmxhmR0HcTCTlrBvUrp2MIAo+kv2hgK3RnZe8 EaoNoqT16dQlsvu1/eedLhkr1oVJA/pF+RJzzE4r9ayw7/W07GeWxXsf3F4EWvNnjRtn xZGQ== X-Gm-Message-State: AMke39kXAvTRHgz8yZl2xvJViEJM7SDBCDf8w/4wKQlglc+mq68ihrGmNDXFgs9zzVILYg== X-Received: by 10.84.224.70 with SMTP id a6mr9112916plt.28.1486704773269; Thu, 09 Feb 2017 21:32:53 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id p14sm1357358pfl.75.2017.02.09.21.32.52 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Feb 2017 21:32:52 -0800 (PST) Subject: Re: svn commit: r311993 - head/sys/dev/nand Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_FA9F9ADB-A753-41B8-AA5C-3E1FDE97AA44"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <26EBCAD7-44FC-4E80-80C2-079D69DEFCB2@gmail.com> Date: Thu, 9 Feb 2017 21:32:51 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Alexander Kabaev , Alexander Motin Message-Id: <9C37B132-4DE0-415F-8C18-2BE090F17268@gmail.com> References: <201701121805.v0CI5CYg090736@repo.freebsd.org> <26EBCAD7-44FC-4E80-80C2-079D69DEFCB2@gmail.com> To: Ronald Klop X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-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: Fri, 10 Feb 2017 05:32:54 -0000 --Apple-Mail=_FA9F9ADB-A753-41B8-AA5C-3E1FDE97AA44 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Feb 9, 2017, at 21:30, Ngie Cooper (yaneurabeya) = wrote: >=20 >=20 >> On Jan 26, 2017, at 09:07, Ronald Klop wrote: >>=20 >> Should this be merged to 11-stable also? >> I got a build failure on this with 11/arm. >=20 > Me too when I ran =E2=80=9Cmake tinderbox=E2=80=9D. I=E2=80=99m = working on the merge to ^/stable/10 and ^/stable/11 right now. > Thanks, Ah=E2=80=A6 the fix was merged to ^/stable/11, not ^/stable/10 =E2=80=94 = hence the failure=E2=80=A6 heh. -Ngie --Apple-Mail=_FA9F9ADB-A753-41B8-AA5C-3E1FDE97AA44 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYnVCDAAoJEPWDqSZpMIYVZ5kP/2eQzGipCHVFkf8PrrQVrRUX Sii2nk7OicyTqZm80cF+YIg/zEvhmcITNZB5FI7vpgLqQ09xhY0z4GbTXxJSDWqp fJ9xB9bFhgS6Ein8xHn6vN6gZmc8MjUhdQTNHFjoNBSFvOJGmkMeLT8JkMWmyAHL F5yuaoASHJDBrFHr4zJr5nxJE55wlpDFyLPCGqOiNFV4eH58xtNv22bKRJZ+BhO3 pEvjVyRkh6ATmYU8FUq6W2Unh385gzPhqI/q/59j4WWPqs7lB30IxktfEAt4WaTR +GXpgy4GNt/a1mO4USTeGwdq9gMzdY5x1GIb7jYpw5nPDmym8U214j69cdOr/9CE bZ1SIivijvgAMnT+Bepp4AGNS7ElJqZ5z03P6oOnYkdDWl2ntZPd3n0Gqmr8Xtvc GsVqUq9ALq6Tx3rCLiHKFhVpNNGOT/pOeHRzXyHR5h4xYwE48/qDPv4jT4pLCco8 rN5Xflmye1MBi5a65TVsg4IxAGE85IdANTYKWEHN9y5Z9RNmz155KWw0w9EGZ1uX yWVYXIsjfPtq8xayw1lqUvIcKsoHSGNbTdnMmSzpUdQAQl2ZhwErApyVlHV5H/u1 KBBQE7mZYYQJyLkjo0C5+kcEC+OjNDzPmju/cgRqFfffHwYLZ5ZqcNMftbFo4P/6 U70GCBIPlZRWFZ5qfEEb =J0Dk -----END PGP SIGNATURE----- --Apple-Mail=_FA9F9ADB-A753-41B8-AA5C-3E1FDE97AA44-- From owner-svn-src-head@freebsd.org Fri Feb 10 05:47: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 B6B3DCD7D41; Fri, 10 Feb 2017 05:47:15 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 27B9C171B; Fri, 10 Feb 2017 05:47:14 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from freyja.zeit4.iv.bundesimmobilien.de ([87.138.105.249]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0Ls7MZ-1cQLtV2HmR-013vKs; Fri, 10 Feb 2017 06:47:06 +0100 Date: Fri, 10 Feb 2017 06:47:00 +0100 From: "O. Hartmann" To: Ermal =?ISO-8859-1?Q?Lu=E7i?= Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313524 - in head/sys: netinet netinet6 Message-ID: <20170210064649.1f76b10f@freyja.zeit4.iv.bundesimmobilien.de> In-Reply-To: <201702100516.v1A5GERJ068339@repo.freebsd.org> References: <201702100516.v1A5GERJ068339@repo.freebsd.org> Organization: Walstatt X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.29; amd64-portbld-freebsd12.0) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:lwBmvOT84E31Rk9fiS5AO9TnUex2AQylU/iJveCfb+EGnT3dgjs 8Of3Gvc/tls7wnmVBn88VE0ChmC/yjx47Xapjk8vXHh7ivV75hGdvaLchPNDwBRMm41AHGD sHSvJ0/Fbxizab3kcxhBTOyAFXiT63YsPPOILq7xDQFx6qYADCtr0eqYXjff4UyvHdXXD+I h6Yr6zoQKPrNB6Tuce/yQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:5VTumOKeTzk=:wuLKJ85FJeQz2cRmznY04q ue7qE7JkVxTjfKUiT/fY47qEd5pbUIhUZ+lWYDKgxXIZrd1KdJ2FKRu2S6ootw8v94gg8hWNZ 7zBOCaexpBIk5YS10SXDdJczr7bcUPNlMDLwq90W2xDW9WwVY04+25519LlN3/4CXc0k7p/58 /+sBrIGkqCPY8kBe4UyEjqlYYogNgn7pcU+Qd64y2Wk24UlDGAiMb3quLJKk5xlY2EsfN45OA 4nRBQiNSurThRwlm5vHMPjoQ1bkQCaKa6/mMfGiqFzOJrOK6Fuf0O0brSfBEGmSC0vgCFoOW8 RwQFZZCLtV00f/ueFcGnGABsG7J9r0DwfwPPIbY4luaEc7odjsCMmG4rlEJwoB5Ijej4AysiV QtTCDJKly5K0oLf14gxmwWc+U+DeFOSzBjaaerx6hz9WDgzHWtZKsTyYnnhbInKCLuYzcAGOx 6l0SJ6UK7butTW9DfoMkJKprnpzC7aeucygKJ+7JgDocKyHDaXTaFN9LZ9LQIMd3nkc5jTrtC I4nTydk9SFUL1jqsFUSm2DHeTi9iSAfC4E/mQP6dt5nZbidCYGakm4oc8X2X49riB0UMB/qeI g06SMeVsgm0O+UYiYBXetnnlgdndNvq1tECdsgggIX4nwgRxheI3/GeUzcPLV+SyOEph2QtF0 k7cHvsurE+Mm0riGZgggqk1b5v7hVVXXXMCKsSl0Q9zk27ytdrBzE5+9j0J9tWZ/9fClx3Shs BW/ITnCmXINa5Bm/RYXPP0nZHqsxuJHrTY5IqDzt4RAh8QoTx410QoEiFT4lUjK4ly7R8DZ73 c9Rs4IZ X-BeenThere: svn-src-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: Fri, 10 Feb 2017 05:47:15 -0000 On Fri, 10 Feb 2017 05:16:14 +0000 (UTC) Ermal Lu=C3=A7i wrote: > Author: eri > Date: Fri Feb 10 05:16:14 2017 > New Revision: 313524 > URL: https://svnweb.freebsd.org/changeset/base/313524 >=20 > Log: > The patch provides the same socket option as Linux IP_ORIGDSTADDR. > Unfortunately they will have different integer value due to Linux value > being already assigned in FreeBSD.=20 > The patch is similar to IP_RECVDSTADDR but also provides the destination > port value to the application.=20 > This allows/improves implementation of transparent proxies on UDP socke= ts > due to having the whole information on forwarded packets.=20 > Sponsored-by: rsync.net > Differential Revision: D9235 > Reviewed-by: adrian >=20 > Modified: > head/sys/netinet/in.h > head/sys/netinet/in_pcb.c > head/sys/netinet/in_pcb.h > head/sys/netinet/ip_output.c > head/sys/netinet/udp_usrreq.c > head/sys/netinet6/in6.h > head/sys/netinet6/in6_pcb.c > head/sys/netinet6/in6_pcb.h > head/sys/netinet6/ip6_output.c > head/sys/netinet6/raw_ip6.c > head/sys/netinet6/udp6_usrreq.c >=20 > Modified: head/sys/netinet/in.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/in.h Fri Feb 10 05:14:19 2017 (r313523) > +++ head/sys/netinet/in.h Fri Feb 10 05:16:14 2017 (r313524) > @@ -433,6 +433,8 @@ __END_DECLS > #define IP_BINDANY 24 /* bool: allow bind to any > address */ #define IP_BINDMULTI 25 /* bool: allow > multiple listeners on a tuple */ #define IP_RSS_LISTEN_BUCKET > 26 /* int; set RSS listen bucket */ +#define > IP_ORIGDSTADDR 27 /* bool: receive IP dst addr/port w/dgram > */ +#define IP_RECVORIGDSTADDR IP_ORIGDSTADDR=20 > /* > * Options for controlling the firewall and dummynet. >=20 > Modified: head/sys/netinet/in_pcb.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/in_pcb.c Fri Feb 10 05:14:19 2017 (r313523) > +++ head/sys/netinet/in_pcb.c Fri Feb 10 05:16:14 2017 (r313524) > @@ -2492,6 +2492,10 @@ db_print_inpflags(int inp_flags) > db_printf("%sINP_RECVDSTADDR", comma ? ", " : ""); > comma =3D 1; > } > + if (inp_flags & INP_ORIGDSTADDR) { > + db_printf("%sINP_ORIGDSTADDR", comma ? ", " : ""); > + comma =3D 1; > + } > if (inp_flags & INP_HDRINCL) { > db_printf("%sINP_HDRINCL", comma ? ", " : ""); > comma =3D 1; >=20 > Modified: head/sys/netinet/in_pcb.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/in_pcb.h Fri Feb 10 05:14:19 2017 (r313523) > +++ head/sys/netinet/in_pcb.h Fri Feb 10 05:16:14 2017 (r313524) > @@ -618,6 +618,7 @@ short inp_so_options(const struct inpcb=20 > #define INP_RECVFLOWID 0x00000100 /* populate recv > datagram with flow info */ #define INP_RECVRSSBUCKETID > 0x00000200 /* populate recv datagram with bucket id */ #define > INP_RATE_LIMIT_CHANGED 0x00000400 /* rate limit needs attention */ > +#define INP_ORIGDSTADDR 0x00000800 /* receive IP dst > address/port */ /* > * Flags passed to in_pcblookup*() functions. >=20 > Modified: head/sys/netinet/ip_output.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/ip_output.c Fri Feb 10 05:14:19 2017 > (r313523) +++ head/sys/netinet/ip_output.c Fri Feb 10 05:16:14 > 2017 (r313524) @@ -1065,6 +1065,7 @@ ip_ctloutput(struct socket *so, > struct s case IP_MINTTL: > case IP_RECVOPTS: > case IP_RECVRETOPTS: > + case IP_ORIGDSTADDR: > case IP_RECVDSTADDR: > case IP_RECVTTL: > case IP_RECVIF: > @@ -1126,6 +1127,10 @@ ip_ctloutput(struct socket *so, struct s > OPTSET(INP_RECVDSTADDR); > break; > =20 > + case IP_ORIGDSTADDR: > + OPTSET2(INP_ORIGDSTADDR, optval); > + break; > + > case IP_RECVTTL: > OPTSET(INP_RECVTTL); > break; > @@ -1258,6 +1263,7 @@ ip_ctloutput(struct socket *so, struct s > case IP_MINTTL: > case IP_RECVOPTS: > case IP_RECVRETOPTS: > + case IP_ORIGDSTADDR: > case IP_RECVDSTADDR: > case IP_RECVTTL: > case IP_RECVIF: > @@ -1303,6 +1309,10 @@ ip_ctloutput(struct socket *so, struct s > optval =3D OPTBIT(INP_RECVDSTADDR); > break; > =20 > + case IP_ORIGDSTADDR: > + optval =3D OPTBIT2(INP_ORIGDSTADDR); > + break; > + > case IP_RECVTTL: > optval =3D OPTBIT(INP_RECVTTL); > break; >=20 > Modified: head/sys/netinet/udp_usrreq.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/udp_usrreq.c Fri Feb 10 05:14:19 2017 > (r313523) +++ head/sys/netinet/udp_usrreq.c Fri Feb 10 05:16:14 > 2017 (r313524) @@ -304,7 +304,7 @@ udp_append(struct inpcb *inp, > struct ip { > struct sockaddr *append_sa; > struct socket *so; > - struct mbuf *opts =3D NULL; > + struct mbuf *tmpopts, *opts =3D NULL; > #ifdef INET6 > struct sockaddr_in6 udp_in6; > #endif > @@ -319,7 +319,7 @@ udp_append(struct inpcb *inp, struct ip=20 > if (up->u_tun_func !=3D NULL) { > in_pcbref(inp); > INP_RUNLOCK(inp); > - (*up->u_tun_func)(n, off, inp, (struct sockaddr *)udp_in, > + (*up->u_tun_func)(n, off, inp, (struct sockaddr *)&udp_in[0], > up->u_tun_ctx); > INP_RLOCK(inp); > return (in_pcbrele_rlocked(inp)); > @@ -355,16 +355,27 @@ udp_append(struct inpcb *inp, struct ip=20 > #endif /* INET6 */ > ip_savecontrol(inp, &opts, ip, n); > } > + if (inp->inp_vflag & INP_IPV4 && inp->inp_flags2 & INP_ORIGDSTADDR) { > + tmpopts =3D sbcreatecontrol((caddr_t)&udp_in[1], > + sizeof(struct sockaddr_in), IP_ORIGDSTADDR, > IPPROTO_IP); > + if (tmpopts) { > + if (opts) { > + tmpopts->m_next =3D opts; > + opts =3D tmpopts; > + } else > + opts =3D tmpopts; > + } > + } > #ifdef INET6 > if (inp->inp_vflag & INP_IPV6) { > bzero(&udp_in6, sizeof(udp_in6)); > udp_in6.sin6_len =3D sizeof(udp_in6); > udp_in6.sin6_family =3D AF_INET6; > - in6_sin_2_v4mapsin6(udp_in, &udp_in6); > + in6_sin_2_v4mapsin6(&udp_in[0], &udp_in6); > append_sa =3D (struct sockaddr *)&udp_in6; > } else > #endif /* INET6 */ > - append_sa =3D (struct sockaddr *)udp_in; > + append_sa =3D (struct sockaddr *)&udp_in[0]; > m_adj(n, off); > =20 > so =3D inp->inp_socket; > @@ -390,7 +401,7 @@ udp_input(struct mbuf **mp, int *offp, i > uint16_t len, ip_len; > struct inpcbinfo *pcbinfo; > struct ip save_ip; > - struct sockaddr_in udp_in; > + struct sockaddr_in udpin[2]; > struct mbuf *m; > struct m_tag *fwd_tag; > int cscov_partial, iphlen; > @@ -435,11 +446,16 @@ udp_input(struct mbuf **mp, int *offp, i > * Construct sockaddr format source address. Stuff source address > * and datagram in user buffer. > */ > - bzero(&udp_in, sizeof(udp_in)); > - udp_in.sin_len =3D sizeof(udp_in); > - udp_in.sin_family =3D AF_INET; > - udp_in.sin_port =3D uh->uh_sport; > - udp_in.sin_addr =3D ip->ip_src; > + bzero(&udpin[0], sizeof(struct sockaddr_in)); > + udpin[0].sin_len =3D sizeof(struct sockaddr_in); > + udpin[0].sin_family =3D AF_INET; > + udpin[0].sin_port =3D uh->uh_sport; > + udpin[0].sin_addr =3D ip->ip_src; > + bzero(&udpin[1], sizeof(struct sockaddr_in)); > + udpin[1].sin_len =3D sizeof(struct sockaddr_in); > + udpin[1].sin_family =3D AF_INET; > + udpin[1].sin_port =3D uh->uh_dport; > + udpin[1].sin_addr =3D ip->ip_dst; > =20 > /* > * Make mbuf data length reflect UDP length. If not enough data to > @@ -568,7 +584,7 @@ udp_input(struct mbuf **mp, int *offp, i > =20 > blocked =3D imo_multi_filter(imo, ifp, > (struct sockaddr *)&group, > - (struct sockaddr *)&udp_in); > + (struct sockaddr *)&udpin[0]); > if (blocked !=3D MCAST_PASS) { > if (blocked =3D=3D MCAST_NOTGMEMBER) > IPSTAT_INC(ips_notmember); > @@ -587,7 +603,7 @@ udp_input(struct mbuf **mp, int *offp, i > UDP_PROBE(receive, NULL, last, ip, > last, uh); > if (udp_append(last, ip, n, iphlen, > - &udp_in)) { > + udpin)) { > goto inp_lost; > } > } > @@ -620,7 +636,7 @@ udp_input(struct mbuf **mp, int *offp, i > goto badunlocked; > } > UDP_PROBE(receive, NULL, last, ip, last, uh); > - if (udp_append(last, ip, m, iphlen, &udp_in) =3D=3D 0)=20 > + if (udp_append(last, ip, m, iphlen, udp_in) =3D=3D 0)=20 > INP_RUNLOCK(last); > inp_lost: > INP_INFO_RUNLOCK(pcbinfo); > @@ -710,7 +726,7 @@ udp_input(struct mbuf **mp, int *offp, i > } > =20 > UDP_PROBE(receive, NULL, inp, ip, inp, uh); > - if (udp_append(inp, ip, m, iphlen, &udp_in) =3D=3D 0)=20 > + if (udp_append(inp, ip, m, iphlen, udp_in) =3D=3D 0)=20 > INP_RUNLOCK(inp); > return (IPPROTO_DONE); > =20 >=20 > Modified: head/sys/netinet6/in6.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet6/in6.h Fri Feb 10 05:14:19 2017 (r313523) > +++ head/sys/netinet6/in6.h Fri Feb 10 05:16:14 2017 (r313524) > @@ -497,6 +497,9 @@ struct route_in6 { > #define IPV6_RECVFLOWID 70 /* bool; receive IP6 > flowid/flowtype w/ datagram */ #define IPV6_RECVRSSBUCKETID > 71 /* bool; receive IP6 RSS bucket id w/ datagram */=20 > +#define IPV6_ORIGDSTADDR 65 /* bool: allow getting > dstaddr /port info */ +#define IPV6_RECVORIGDSTADDR > IPV6_ORIGDSTADDR + > /* > * The following option is private; do not use it from user applications. > * It is deliberately defined to the same value as IP_MSFILTER. >=20 > Modified: head/sys/netinet6/in6_pcb.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet6/in6_pcb.c Fri Feb 10 05:14:19 2017 > (r313523) +++ head/sys/netinet6/in6_pcb.c Fri Feb 10 05:16:14 > 2017 (r313524) @@ -1267,7 +1267,7 @@ in6_pcblookup_mbuf(struct > inpcbinfo *pcb } > =20 > void > -init_sin6(struct sockaddr_in6 *sin6, struct mbuf *m) > +init_sin6(struct sockaddr_in6 *sin6, struct mbuf *m, int srcordst) > { > struct ip6_hdr *ip; > =20 > @@ -1275,7 +1275,7 @@ init_sin6(struct sockaddr_in6 *sin6, str > bzero(sin6, sizeof(*sin6)); > sin6->sin6_len =3D sizeof(*sin6); > sin6->sin6_family =3D AF_INET6; > - sin6->sin6_addr =3D ip->ip6_src; > + sin6->sin6_addr =3D srcordst ? ip->ip6_dst : ip->ip6_src; > =20 > (void)sa6_recoverscope(sin6); /* XXX: should catch errors... */ > =20 >=20 > Modified: head/sys/netinet6/in6_pcb.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet6/in6_pcb.h Fri Feb 10 05:14:19 2017 > (r313523) +++ head/sys/netinet6/in6_pcb.h Fri Feb 10 05:16:14 > 2017 (r313524) @@ -113,7 +113,7 @@ int > in6_mapped_sockaddr(struct socket *s int in6_mapped_peeraddr(struct > socket *so, struct sockaddr **nam); int in6_selecthlim(struct in6pcb > *, struct ifnet *); int in6_pcbsetport(struct in6_addr *, struct inpcb > *, struct ucred *); -void init_sin6(struct sockaddr_in6 *sin6, struct > mbuf *m); +void init_sin6(struct sockaddr_in6 *sin6, struct mbuf *m, > int); #endif /* _KERNEL */ > =20 > #endif /* !_NETINET6_IN6_PCB_H_ */ >=20 > Modified: head/sys/netinet6/ip6_output.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet6/ip6_output.c Fri Feb 10 05:14:19 2017 > (r313523) +++ head/sys/netinet6/ip6_output.c Fri Feb 10 05:16:14 > 2017 (r313524) @@ -1545,6 +1545,7 @@ ip6_ctloutput(struct socket *so, > struct #endif > case IPV6_V6ONLY: > case IPV6_AUTOFLOWLABEL: > + case IPV6_ORIGDSTADDR: > case IPV6_BINDANY: > case IPV6_BINDMULTI: > #ifdef RSS > @@ -1730,6 +1731,9 @@ do { \ > OPTSET(IN6P_AUTOFLOWLABEL); > break; > =20 > + case IPV6_ORIGDSTADDR: > + OPTSET2(INP_ORIGDSTADDR, optval); > + break; > case IPV6_BINDANY: > OPTSET(INP_BINDANY); > break; > @@ -2018,6 +2022,10 @@ do { \ > optval =3D OPTBIT(IN6P_AUTOFLOWLABEL); > break; > =20 > + case IPV6_ORIGDSTADDR: > + optval =3D OPTBIT2(INP_ORIGDSTADDR); > + break; > + > case IPV6_BINDANY: > optval =3D OPTBIT(INP_BINDANY); > break; >=20 > Modified: head/sys/netinet6/raw_ip6.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet6/raw_ip6.c Fri Feb 10 05:14:19 2017 > (r313523) +++ head/sys/netinet6/raw_ip6.c Fri Feb 10 05:16:14 > 2017 (r313524) @@ -166,7 +166,7 @@ rip6_input(struct mbuf **mp, int > *offp,=20 > RIP6STAT_INC(rip6s_ipackets); > =20 > - init_sin6(&fromsa, m); /* general init */ > + init_sin6(&fromsa, m, 0); /* general init */ > =20 > ifp =3D m->m_pkthdr.rcvif; > =20 >=20 > Modified: head/sys/netinet6/udp6_usrreq.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet6/udp6_usrreq.c Fri Feb 10 05:14:19 2017 > (r313523) +++ head/sys/netinet6/udp6_usrreq.c Fri Feb 10 05:16:14 > 2017 (r313524) @@ -137,7 +137,7 @@ udp6_append(struct inpcb *inp, > struct mb struct sockaddr_in6 *fromsa) > { > struct socket *so; > - struct mbuf *opts; > + struct mbuf *opts =3D NULL, *tmp_opts; > struct udpcb *up; > =20 > INP_LOCK_ASSERT(inp); > @@ -149,7 +149,7 @@ udp6_append(struct inpcb *inp, struct mb > if (up->u_tun_func !=3D NULL) { > in_pcbref(inp); > INP_RUNLOCK(inp); > - (*up->u_tun_func)(n, off, inp, (struct sockaddr *)fromsa, > + (*up->u_tun_func)(n, off, inp, (struct sockaddr *)&fromsa[0], > up->u_tun_ctx); > INP_RLOCK(inp); > return (in_pcbrele_rlocked(inp)); > @@ -173,11 +173,23 @@ udp6_append(struct inpcb *inp, struct mb > if (inp->inp_flags & INP_CONTROLOPTS || > inp->inp_socket->so_options & SO_TIMESTAMP) > ip6_savecontrol(inp, n, &opts); > + if (inp->inp_vflag & INP_IPV6 && inp->inp_flags2 & INP_ORIGDSTADDR) { > + tmp_opts =3D sbcreatecontrol((caddr_t)&fromsa[1], > + sizeof(struct sockaddr_in6), IP_ORIGDSTADDR, > IPPROTO_IPV6); > + if (tmp_opts) { > + if (opts) { > + tmp_opts->m_next =3D opts; > + opts =3D tmp_opts; > + } else > + opts =3D tmp_opts; > + } > + > + } > m_adj(n, off + sizeof(struct udphdr)); > =20 > so =3D inp->inp_socket; > SOCKBUF_LOCK(&so->so_rcv); > - if (sbappendaddr_locked(&so->so_rcv, (struct sockaddr *)fromsa, n, > + if (sbappendaddr_locked(&so->so_rcv, (struct sockaddr *)&fromsa[0], > n, opts) =3D=3D 0) { > SOCKBUF_UNLOCK(&so->so_rcv); > m_freem(n); > @@ -202,7 +214,7 @@ udp6_input(struct mbuf **mp, int *offp,=20 > int off =3D *offp; > int cscov_partial; > int plen, ulen; > - struct sockaddr_in6 fromsa; > + struct sockaddr_in6 fromsa[2]; > struct m_tag *fwd_tag; > uint16_t uh_sum; > uint8_t nxt; > @@ -277,8 +289,10 @@ udp6_input(struct mbuf **mp, int *offp,=20 > /* > * Construct sockaddr format source address. > */ > - init_sin6(&fromsa, m); > - fromsa.sin6_port =3D uh->uh_sport; > + init_sin6(&fromsa[0], m, 0); > + fromsa[0].sin6_port =3D uh->uh_sport; > + init_sin6(&fromsa[1], m, 1); > + fromsa[1].sin6_port =3D uh->uh_dport; > =20 > pcbinfo =3D udp_get_inpcbinfo(nxt); > if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { > @@ -349,7 +363,7 @@ udp6_input(struct mbuf **mp, int *offp,=20 > =20 > blocked =3D im6o_mc_filter(imo, ifp, > (struct sockaddr *)&mcaddr, > - (struct sockaddr *)&fromsa); > + (struct sockaddr *)&fromsa[0]); > if (blocked !=3D MCAST_PASS) { > if (blocked =3D=3D MCAST_NOTGMEMBER) > IP6STAT_INC(ip6s_notmember); > @@ -370,7 +384,7 @@ udp6_input(struct mbuf **mp, int *offp,=20 > INP_RLOCK(last); > UDP_PROBE(receive, NULL, last, ip6, > last, uh); > - if (udp6_append(last, n, off, > &fromsa)) > + if (udp6_append(last, n, off, > fromsa)) goto inp_lost; > INP_RUNLOCK(last); > } > @@ -402,7 +416,7 @@ udp6_input(struct mbuf **mp, int *offp,=20 > INP_RLOCK(last); > INP_INFO_RUNLOCK(pcbinfo); > UDP_PROBE(receive, NULL, last, ip6, last, uh); > - if (udp6_append(last, m, off, &fromsa) =3D=3D 0)=20 > + if (udp6_append(last, m, off, fromsa) =3D=3D 0)=20 > INP_RUNLOCK(last); > inp_lost: > return (IPPROTO_DONE); > @@ -482,7 +496,7 @@ udp6_input(struct mbuf **mp, int *offp,=20 > } > } > UDP_PROBE(receive, NULL, inp, ip6, inp, uh); > - if (udp6_append(inp, m, off, &fromsa) =3D=3D 0) > + if (udp6_append(inp, m, off, fromsa) =3D=3D 0) > INP_RUNLOCK(inp); > return (IPPROTO_DONE); > =20 > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" The patch broke buildkernel: [...] /usr/src/sys/netinet/udp_usrreq.c:639:39: error: use of undeclared identifi= er 'udp_in'; did you mean 'udpin'? if (udp_append(last, ip, m, iphlen, udp_in)= =3D=3D 0) ^~~~~~ udpin /usr/src/sys/netinet/udp_usrreq.c:404:21: note: 'udpin' declared here struct sockaddr_in udpin[2]; Kind regards, oh From owner-svn-src-head@freebsd.org Fri Feb 10 05:51: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 C46E4CD7E10; Fri, 10 Feb 2017 05:51:41 +0000 (UTC) (envelope-from eri@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E35C1ACE; Fri, 10 Feb 2017 05:51:41 +0000 (UTC) (envelope-from eri@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A5pekF083863; Fri, 10 Feb 2017 05:51:40 GMT (envelope-from eri@FreeBSD.org) Received: (from eri@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A5pd0L083855; Fri, 10 Feb 2017 05:51:39 GMT (envelope-from eri@FreeBSD.org) Message-Id: <201702100551.v1A5pd0L083855@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eri set sender to eri@FreeBSD.org using -f From: =?UTF-8?Q?Ermal_Lu=c3=a7i?= Date: Fri, 10 Feb 2017 05:51:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313527 - in head/sys: netinet netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Fri, 10 Feb 2017 05:51:41 -0000 Author: eri Date: Fri Feb 10 05:51:39 2017 New Revision: 313527 URL: https://svnweb.freebsd.org/changeset/base/313527 Log: Correct missed variable name. Reported-by: ohartmann@walstatt.org Modified: head/sys/netinet/in_pcb.c head/sys/netinet/in_pcb.h head/sys/netinet/tcp_usrreq.c head/sys/netinet/udp_usrreq.c head/sys/netinet6/in6_pcb.c head/sys/netinet6/in6_pcb.h head/sys/netinet6/in6_src.c head/sys/netinet6/udp6_usrreq.c Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Fri Feb 10 05:42:06 2017 (r313526) +++ head/sys/netinet/in_pcb.c Fri Feb 10 05:51:39 2017 (r313527) @@ -371,8 +371,8 @@ in_pcbbind(struct inpcb *inp, struct soc */ #if defined(INET) || defined(INET6) int -in_pcb_lport(struct inpcb *inp, struct in_addr *laddrp, u_short *lportp, - struct ucred *cred, int lookupflags) +in_pcb_lport(struct inpcb *inp, struct sockaddr *nam, struct in_addr *laddrp, + u_short *lportp, struct ucred *cred, int lookupflags) { struct inpcbinfo *pcbinfo; struct inpcb *tmpinp; @@ -381,6 +381,7 @@ in_pcb_lport(struct inpcb *inp, struct i u_short aux, first, last, lport; #ifdef INET struct in_addr laddr; + struct sockaddr_in *sin = NULL; #endif pcbinfo = inp->inp_pcbinfo; @@ -447,6 +448,7 @@ in_pcb_lport(struct inpcb *inp, struct i KASSERT(laddrp != NULL, ("%s: laddrp NULL for v4 inp %p", __func__, inp)); laddr = *laddrp; + sin = (struct sockaddr_in *)nam; } #endif tmpinp = NULL; /* Make compiler happy. */ @@ -466,16 +468,29 @@ in_pcb_lport(struct inpcb *inp, struct i lport = htons(*lastport); #ifdef INET6 - if ((inp->inp_vflag & INP_IPV6) != 0) - tmpinp = in6_pcblookup_local(pcbinfo, - &inp->in6p_laddr, lport, lookupflags, cred); + if ((inp->inp_vflag & INP_IPV6) != 0) { + struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)nam; + if (sin6 != NULL && (inp->inp_flags & INP_ANONPORT)) { + tmpinp = in6_pcblookup_hash_locked(pcbinfo, + &sin6->sin6_addr, sin6->sin6_port, + &inp->in6p_laddr, lport, + lookupflags & (~INPLOOKUP_WILDCARD), + NULL); + } else + tmpinp = in6_pcblookup_local(pcbinfo, + &inp->in6p_laddr, lport, lookupflags, cred); + } #endif #if defined(INET) && defined(INET6) else #endif #ifdef INET - tmpinp = in_pcblookup_local(pcbinfo, laddr, - lport, lookupflags, cred); + if (sin != NULL && (inp->inp_flags & INP_ANONPORT)) + tmpinp = in_pcblookup_hash_locked(pcbinfo, sin->sin_addr, sin->sin_port, laddr, + lport, lookupflags & (~INPLOOKUP_WILDCARD), NULL); + else + tmpinp = in_pcblookup_local(pcbinfo, laddr, + lport, lookupflags, cred); #endif } while (tmpinp != NULL); @@ -571,7 +586,7 @@ in_pcbbind_setup(struct inpcb *inp, stru return (EINVAL); if ((so->so_options & (SO_REUSEADDR|SO_REUSEPORT)) == 0) lookupflags = INPLOOKUP_WILDCARD; - if (nam == NULL) { + if (nam == NULL || ((*lportp) == 0 && (inp->inp_flags & INP_ANONPORT))) { if ((error = prison_local_ip4(cred, &laddr)) != 0) return (error); } else { @@ -692,7 +707,7 @@ in_pcbbind_setup(struct inpcb *inp, stru if (*lportp != 0) lport = *lportp; if (lport == 0) { - error = in_pcb_lport(inp, &laddr, &lport, cred, lookupflags); + error = in_pcb_lport(inp, nam, &laddr, &lport, cred, lookupflags); if (error != 0) return (error); Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Fri Feb 10 05:42:06 2017 (r313526) +++ head/sys/netinet/in_pcb.h Fri Feb 10 05:51:39 2017 (r313527) @@ -697,8 +697,8 @@ void in_pcbgroup_update_mbuf(struct inpc void in_pcbpurgeif0(struct inpcbinfo *, struct ifnet *); int in_pcballoc(struct socket *, struct inpcbinfo *); int in_pcbbind(struct inpcb *, struct sockaddr *, struct ucred *); -int in_pcb_lport(struct inpcb *, struct in_addr *, u_short *, - struct ucred *, int); +int in_pcb_lport(struct inpcb *, struct sockaddr *, struct in_addr *, + u_short *, struct ucred *, int); int in_pcbbind_setup(struct inpcb *, struct sockaddr *, in_addr_t *, u_short *, struct ucred *); int in_pcbconnect(struct inpcb *, struct sockaddr *, struct ucred *); Modified: head/sys/netinet/tcp_usrreq.c ============================================================================== --- head/sys/netinet/tcp_usrreq.c Fri Feb 10 05:42:06 2017 (r313526) +++ head/sys/netinet/tcp_usrreq.c Fri Feb 10 05:51:39 2017 (r313527) @@ -1238,9 +1238,12 @@ tcp_connect(struct tcpcb *tp, struct soc INP_HASH_WLOCK(&V_tcbinfo); if (inp->inp_lport == 0) { - error = in_pcbbind(inp, (struct sockaddr *)0, td->td_ucred); - if (error) + inp->inp_flags |= INP_ANONPORT; + error = in_pcbbind(inp, nam, td->td_ucred); + if (error) { + inp->inp_flags &= ~INP_ANONPORT; goto out; + } } /* @@ -1296,9 +1299,12 @@ tcp6_connect(struct tcpcb *tp, struct so INP_HASH_WLOCK(&V_tcbinfo); if (inp->inp_lport == 0) { - error = in6_pcbbind(inp, (struct sockaddr *)0, td->td_ucred); - if (error) + inp->inp_flags |= INP_ANONPORT; + error = in6_pcbbind(inp, nam, td->td_ucred); + if (error) { + inp->inp_flags &= ~INP_ANONPORT; goto out; + } } error = in6_pcbconnect(inp, nam, td->td_ucred); if (error != 0) Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Fri Feb 10 05:42:06 2017 (r313526) +++ head/sys/netinet/udp_usrreq.c Fri Feb 10 05:51:39 2017 (r313527) @@ -636,7 +636,7 @@ udp_input(struct mbuf **mp, int *offp, i goto badunlocked; } UDP_PROBE(receive, NULL, last, ip, last, uh); - if (udp_append(last, ip, m, iphlen, udp_in) == 0) + if (udp_append(last, ip, m, iphlen, udpin) == 0) INP_RUNLOCK(last); inp_lost: INP_INFO_RUNLOCK(pcbinfo); Modified: head/sys/netinet6/in6_pcb.c ============================================================================== --- head/sys/netinet6/in6_pcb.c Fri Feb 10 05:42:06 2017 (r313526) +++ head/sys/netinet6/in6_pcb.c Fri Feb 10 05:51:39 2017 (r313527) @@ -132,7 +132,7 @@ in6_pcbbind(register struct inpcb *inp, return (EINVAL); if ((so->so_options & (SO_REUSEADDR|SO_REUSEPORT)) == 0) lookupflags = INPLOOKUP_WILDCARD; - if (nam == NULL) { + if (nam == NULL || (inp->inp_flags & INP_ANONPORT)) { if ((error = prison_local_ip6(cred, &inp->in6p_laddr, ((inp->inp_flags & IN6P_IPV6_V6ONLY) != 0))) != 0) return (error); @@ -296,7 +296,7 @@ in6_pcbbind(register struct inpcb *inp, inp->in6p_laddr = sin6->sin6_addr; } if (lport == 0) { - if ((error = in6_pcbsetport(&inp->in6p_laddr, inp, cred)) != 0) { + if ((error = in6_pcbsetport(nam, &inp->in6p_laddr, inp, cred)) != 0) { /* Undo an address bind that may have occurred. */ inp->in6p_laddr = in6addr_any; return (error); @@ -416,9 +416,12 @@ in6_pcbconnect_mbuf(register struct inpc } if (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr)) { if (inp->inp_lport == 0) { - error = in6_pcbbind(inp, (struct sockaddr *)0, cred); - if (error) + inp->inp_flags |= INP_ANONPORT; + error = in6_pcbbind(inp, nam, cred); + if (error) { + inp->inp_flags &= ~INP_ANONPORT; return (error); + } } inp->in6p_laddr = addr6; } Modified: head/sys/netinet6/in6_pcb.h ============================================================================== --- head/sys/netinet6/in6_pcb.h Fri Feb 10 05:42:06 2017 (r313526) +++ head/sys/netinet6/in6_pcb.h Fri Feb 10 05:51:39 2017 (r313527) @@ -112,7 +112,8 @@ int in6_getsockaddr(struct socket *so, s int in6_mapped_sockaddr(struct socket *so, struct sockaddr **nam); int in6_mapped_peeraddr(struct socket *so, struct sockaddr **nam); int in6_selecthlim(struct in6pcb *, struct ifnet *); -int in6_pcbsetport(struct in6_addr *, struct inpcb *, struct ucred *); +int in6_pcbsetport(struct sockaddr *, struct in6_addr *, struct inpcb *, + struct ucred *); void init_sin6(struct sockaddr_in6 *sin6, struct mbuf *m, int); #endif /* _KERNEL */ Modified: head/sys/netinet6/in6_src.c ============================================================================== --- head/sys/netinet6/in6_src.c Fri Feb 10 05:42:06 2017 (r313526) +++ head/sys/netinet6/in6_src.c Fri Feb 10 05:51:39 2017 (r313527) @@ -956,7 +956,8 @@ in6_selecthlim(struct inpcb *in6p, struc * share this function by all *bsd*... */ int -in6_pcbsetport(struct in6_addr *laddr, struct inpcb *inp, struct ucred *cred) +in6_pcbsetport(struct sockaddr *nam6, struct in6_addr *laddr, struct inpcb *inp, + struct ucred *cred) { struct socket *so = inp->inp_socket; u_int16_t lport = 0; @@ -979,7 +980,7 @@ in6_pcbsetport(struct in6_addr *laddr, s inp->inp_flags |= INP_ANONPORT; - error = in_pcb_lport(inp, NULL, &lport, cred, lookupflags); + error = in_pcb_lport(inp, nam6, NULL, &lport, cred, lookupflags); if (error != 0) return (error); Modified: head/sys/netinet6/udp6_usrreq.c ============================================================================== --- head/sys/netinet6/udp6_usrreq.c Fri Feb 10 05:42:06 2017 (r313526) +++ head/sys/netinet6/udp6_usrreq.c Fri Feb 10 05:51:39 2017 (r313527) @@ -778,11 +778,16 @@ udp6_output(struct inpcb *inp, struct mb error = EADDRNOTAVAIL; goto release; } - if (inp->inp_lport == 0 && - (error = in6_pcbsetport(laddr, inp, td->td_ucred)) != 0) { - /* Undo an address bind that may have occurred. */ - inp->in6p_laddr = in6addr_any; - goto release; + if (inp->inp_lport == 0) { + inp->inp_flags |= INP_ANONPORT; + error = in6_pcbsetport((struct sockaddr *)addr6, laddr, + inp, td->td_ucred); + if (error) { + inp->inp_flags &= ~INP_ANONPORT; + /* Undo an address bind that may have occurred. */ + inp->in6p_laddr = in6addr_any; + goto release; + } } } else { if (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr)) { From owner-svn-src-head@freebsd.org Fri Feb 10 05:58: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 A77B8CD8069; Fri, 10 Feb 2017 05:58:18 +0000 (UTC) (envelope-from eri@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 79AA71DC1; Fri, 10 Feb 2017 05:58:18 +0000 (UTC) (envelope-from eri@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A5wHEX084854; Fri, 10 Feb 2017 05:58:17 GMT (envelope-from eri@FreeBSD.org) Received: (from eri@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A5wGco084846; Fri, 10 Feb 2017 05:58:16 GMT (envelope-from eri@FreeBSD.org) Message-Id: <201702100558.v1A5wGco084846@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eri set sender to eri@FreeBSD.org using -f From: =?UTF-8?Q?Ermal_Lu=c3=a7i?= Date: Fri, 10 Feb 2017 05:58:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313528 - in head/sys: netinet netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Fri, 10 Feb 2017 05:58:18 -0000 Author: eri Date: Fri Feb 10 05:58:16 2017 New Revision: 313528 URL: https://svnweb.freebsd.org/changeset/base/313528 Log: Revert r313527 Heh svn is not git Modified: head/sys/netinet/in_pcb.c head/sys/netinet/in_pcb.h head/sys/netinet/tcp_usrreq.c head/sys/netinet/udp_usrreq.c head/sys/netinet6/in6_pcb.c head/sys/netinet6/in6_pcb.h head/sys/netinet6/in6_src.c head/sys/netinet6/udp6_usrreq.c Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Fri Feb 10 05:51:39 2017 (r313527) +++ head/sys/netinet/in_pcb.c Fri Feb 10 05:58:16 2017 (r313528) @@ -371,8 +371,8 @@ in_pcbbind(struct inpcb *inp, struct soc */ #if defined(INET) || defined(INET6) int -in_pcb_lport(struct inpcb *inp, struct sockaddr *nam, struct in_addr *laddrp, - u_short *lportp, struct ucred *cred, int lookupflags) +in_pcb_lport(struct inpcb *inp, struct in_addr *laddrp, u_short *lportp, + struct ucred *cred, int lookupflags) { struct inpcbinfo *pcbinfo; struct inpcb *tmpinp; @@ -381,7 +381,6 @@ in_pcb_lport(struct inpcb *inp, struct s u_short aux, first, last, lport; #ifdef INET struct in_addr laddr; - struct sockaddr_in *sin = NULL; #endif pcbinfo = inp->inp_pcbinfo; @@ -448,7 +447,6 @@ in_pcb_lport(struct inpcb *inp, struct s KASSERT(laddrp != NULL, ("%s: laddrp NULL for v4 inp %p", __func__, inp)); laddr = *laddrp; - sin = (struct sockaddr_in *)nam; } #endif tmpinp = NULL; /* Make compiler happy. */ @@ -468,29 +466,16 @@ in_pcb_lport(struct inpcb *inp, struct s lport = htons(*lastport); #ifdef INET6 - if ((inp->inp_vflag & INP_IPV6) != 0) { - struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)nam; - if (sin6 != NULL && (inp->inp_flags & INP_ANONPORT)) { - tmpinp = in6_pcblookup_hash_locked(pcbinfo, - &sin6->sin6_addr, sin6->sin6_port, - &inp->in6p_laddr, lport, - lookupflags & (~INPLOOKUP_WILDCARD), - NULL); - } else - tmpinp = in6_pcblookup_local(pcbinfo, - &inp->in6p_laddr, lport, lookupflags, cred); - } + if ((inp->inp_vflag & INP_IPV6) != 0) + tmpinp = in6_pcblookup_local(pcbinfo, + &inp->in6p_laddr, lport, lookupflags, cred); #endif #if defined(INET) && defined(INET6) else #endif #ifdef INET - if (sin != NULL && (inp->inp_flags & INP_ANONPORT)) - tmpinp = in_pcblookup_hash_locked(pcbinfo, sin->sin_addr, sin->sin_port, laddr, - lport, lookupflags & (~INPLOOKUP_WILDCARD), NULL); - else - tmpinp = in_pcblookup_local(pcbinfo, laddr, - lport, lookupflags, cred); + tmpinp = in_pcblookup_local(pcbinfo, laddr, + lport, lookupflags, cred); #endif } while (tmpinp != NULL); @@ -586,7 +571,7 @@ in_pcbbind_setup(struct inpcb *inp, stru return (EINVAL); if ((so->so_options & (SO_REUSEADDR|SO_REUSEPORT)) == 0) lookupflags = INPLOOKUP_WILDCARD; - if (nam == NULL || ((*lportp) == 0 && (inp->inp_flags & INP_ANONPORT))) { + if (nam == NULL) { if ((error = prison_local_ip4(cred, &laddr)) != 0) return (error); } else { @@ -707,7 +692,7 @@ in_pcbbind_setup(struct inpcb *inp, stru if (*lportp != 0) lport = *lportp; if (lport == 0) { - error = in_pcb_lport(inp, nam, &laddr, &lport, cred, lookupflags); + error = in_pcb_lport(inp, &laddr, &lport, cred, lookupflags); if (error != 0) return (error); Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Fri Feb 10 05:51:39 2017 (r313527) +++ head/sys/netinet/in_pcb.h Fri Feb 10 05:58:16 2017 (r313528) @@ -697,8 +697,8 @@ void in_pcbgroup_update_mbuf(struct inpc void in_pcbpurgeif0(struct inpcbinfo *, struct ifnet *); int in_pcballoc(struct socket *, struct inpcbinfo *); int in_pcbbind(struct inpcb *, struct sockaddr *, struct ucred *); -int in_pcb_lport(struct inpcb *, struct sockaddr *, struct in_addr *, - u_short *, struct ucred *, int); +int in_pcb_lport(struct inpcb *, struct in_addr *, u_short *, + struct ucred *, int); int in_pcbbind_setup(struct inpcb *, struct sockaddr *, in_addr_t *, u_short *, struct ucred *); int in_pcbconnect(struct inpcb *, struct sockaddr *, struct ucred *); Modified: head/sys/netinet/tcp_usrreq.c ============================================================================== --- head/sys/netinet/tcp_usrreq.c Fri Feb 10 05:51:39 2017 (r313527) +++ head/sys/netinet/tcp_usrreq.c Fri Feb 10 05:58:16 2017 (r313528) @@ -1238,12 +1238,9 @@ tcp_connect(struct tcpcb *tp, struct soc INP_HASH_WLOCK(&V_tcbinfo); if (inp->inp_lport == 0) { - inp->inp_flags |= INP_ANONPORT; - error = in_pcbbind(inp, nam, td->td_ucred); - if (error) { - inp->inp_flags &= ~INP_ANONPORT; + error = in_pcbbind(inp, (struct sockaddr *)0, td->td_ucred); + if (error) goto out; - } } /* @@ -1299,12 +1296,9 @@ tcp6_connect(struct tcpcb *tp, struct so INP_HASH_WLOCK(&V_tcbinfo); if (inp->inp_lport == 0) { - inp->inp_flags |= INP_ANONPORT; - error = in6_pcbbind(inp, nam, td->td_ucred); - if (error) { - inp->inp_flags &= ~INP_ANONPORT; + error = in6_pcbbind(inp, (struct sockaddr *)0, td->td_ucred); + if (error) goto out; - } } error = in6_pcbconnect(inp, nam, td->td_ucred); if (error != 0) Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Fri Feb 10 05:51:39 2017 (r313527) +++ head/sys/netinet/udp_usrreq.c Fri Feb 10 05:58:16 2017 (r313528) @@ -636,7 +636,7 @@ udp_input(struct mbuf **mp, int *offp, i goto badunlocked; } UDP_PROBE(receive, NULL, last, ip, last, uh); - if (udp_append(last, ip, m, iphlen, udpin) == 0) + if (udp_append(last, ip, m, iphlen, udp_in) == 0) INP_RUNLOCK(last); inp_lost: INP_INFO_RUNLOCK(pcbinfo); Modified: head/sys/netinet6/in6_pcb.c ============================================================================== --- head/sys/netinet6/in6_pcb.c Fri Feb 10 05:51:39 2017 (r313527) +++ head/sys/netinet6/in6_pcb.c Fri Feb 10 05:58:16 2017 (r313528) @@ -132,7 +132,7 @@ in6_pcbbind(register struct inpcb *inp, return (EINVAL); if ((so->so_options & (SO_REUSEADDR|SO_REUSEPORT)) == 0) lookupflags = INPLOOKUP_WILDCARD; - if (nam == NULL || (inp->inp_flags & INP_ANONPORT)) { + if (nam == NULL) { if ((error = prison_local_ip6(cred, &inp->in6p_laddr, ((inp->inp_flags & IN6P_IPV6_V6ONLY) != 0))) != 0) return (error); @@ -296,7 +296,7 @@ in6_pcbbind(register struct inpcb *inp, inp->in6p_laddr = sin6->sin6_addr; } if (lport == 0) { - if ((error = in6_pcbsetport(nam, &inp->in6p_laddr, inp, cred)) != 0) { + if ((error = in6_pcbsetport(&inp->in6p_laddr, inp, cred)) != 0) { /* Undo an address bind that may have occurred. */ inp->in6p_laddr = in6addr_any; return (error); @@ -416,12 +416,9 @@ in6_pcbconnect_mbuf(register struct inpc } if (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr)) { if (inp->inp_lport == 0) { - inp->inp_flags |= INP_ANONPORT; - error = in6_pcbbind(inp, nam, cred); - if (error) { - inp->inp_flags &= ~INP_ANONPORT; + error = in6_pcbbind(inp, (struct sockaddr *)0, cred); + if (error) return (error); - } } inp->in6p_laddr = addr6; } Modified: head/sys/netinet6/in6_pcb.h ============================================================================== --- head/sys/netinet6/in6_pcb.h Fri Feb 10 05:51:39 2017 (r313527) +++ head/sys/netinet6/in6_pcb.h Fri Feb 10 05:58:16 2017 (r313528) @@ -112,8 +112,7 @@ int in6_getsockaddr(struct socket *so, s int in6_mapped_sockaddr(struct socket *so, struct sockaddr **nam); int in6_mapped_peeraddr(struct socket *so, struct sockaddr **nam); int in6_selecthlim(struct in6pcb *, struct ifnet *); -int in6_pcbsetport(struct sockaddr *, struct in6_addr *, struct inpcb *, - struct ucred *); +int in6_pcbsetport(struct in6_addr *, struct inpcb *, struct ucred *); void init_sin6(struct sockaddr_in6 *sin6, struct mbuf *m, int); #endif /* _KERNEL */ Modified: head/sys/netinet6/in6_src.c ============================================================================== --- head/sys/netinet6/in6_src.c Fri Feb 10 05:51:39 2017 (r313527) +++ head/sys/netinet6/in6_src.c Fri Feb 10 05:58:16 2017 (r313528) @@ -956,8 +956,7 @@ in6_selecthlim(struct inpcb *in6p, struc * share this function by all *bsd*... */ int -in6_pcbsetport(struct sockaddr *nam6, struct in6_addr *laddr, struct inpcb *inp, - struct ucred *cred) +in6_pcbsetport(struct in6_addr *laddr, struct inpcb *inp, struct ucred *cred) { struct socket *so = inp->inp_socket; u_int16_t lport = 0; @@ -980,7 +979,7 @@ in6_pcbsetport(struct sockaddr *nam6, st inp->inp_flags |= INP_ANONPORT; - error = in_pcb_lport(inp, nam6, NULL, &lport, cred, lookupflags); + error = in_pcb_lport(inp, NULL, &lport, cred, lookupflags); if (error != 0) return (error); Modified: head/sys/netinet6/udp6_usrreq.c ============================================================================== --- head/sys/netinet6/udp6_usrreq.c Fri Feb 10 05:51:39 2017 (r313527) +++ head/sys/netinet6/udp6_usrreq.c Fri Feb 10 05:58:16 2017 (r313528) @@ -778,16 +778,11 @@ udp6_output(struct inpcb *inp, struct mb error = EADDRNOTAVAIL; goto release; } - if (inp->inp_lport == 0) { - inp->inp_flags |= INP_ANONPORT; - error = in6_pcbsetport((struct sockaddr *)addr6, laddr, - inp, td->td_ucred); - if (error) { - inp->inp_flags &= ~INP_ANONPORT; - /* Undo an address bind that may have occurred. */ - inp->in6p_laddr = in6addr_any; - goto release; - } + if (inp->inp_lport == 0 && + (error = in6_pcbsetport(laddr, inp, td->td_ucred)) != 0) { + /* Undo an address bind that may have occurred. */ + inp->in6p_laddr = in6addr_any; + goto release; } } else { if (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr)) { From owner-svn-src-head@freebsd.org Fri Feb 10 06:01: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 1DA5CCD80FF; Fri, 10 Feb 2017 06:01:49 +0000 (UTC) (envelope-from eri@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE8E38A; Fri, 10 Feb 2017 06:01:48 +0000 (UTC) (envelope-from eri@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A61lDI087878; Fri, 10 Feb 2017 06:01:47 GMT (envelope-from eri@FreeBSD.org) Received: (from eri@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A61lci087877; Fri, 10 Feb 2017 06:01:47 GMT (envelope-from eri@FreeBSD.org) Message-Id: <201702100601.v1A61lci087877@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eri set sender to eri@FreeBSD.org using -f From: =?UTF-8?Q?Ermal_Lu=c3=a7i?= Date: Fri, 10 Feb 2017 06:01:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313529 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Fri, 10 Feb 2017 06:01:49 -0000 Author: eri Date: Fri Feb 10 06:01:47 2017 New Revision: 313529 URL: https://svnweb.freebsd.org/changeset/base/313529 Log: Fix build after r313524 Reported-by: ohartmann@walstatt.org Modified: head/sys/netinet/udp_usrreq.c Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Fri Feb 10 05:58:16 2017 (r313528) +++ head/sys/netinet/udp_usrreq.c Fri Feb 10 06:01:47 2017 (r313529) @@ -636,7 +636,7 @@ udp_input(struct mbuf **mp, int *offp, i goto badunlocked; } UDP_PROBE(receive, NULL, last, ip, last, uh); - if (udp_append(last, ip, m, iphlen, udp_in) == 0) + if (udp_append(last, ip, m, iphlen, udpin) == 0) INP_RUNLOCK(last); inp_lost: INP_INFO_RUNLOCK(pcbinfo); @@ -726,7 +726,7 @@ udp_input(struct mbuf **mp, int *offp, i } UDP_PROBE(receive, NULL, inp, ip, inp, uh); - if (udp_append(inp, ip, m, iphlen, udp_in) == 0) + if (udp_append(inp, ip, m, iphlen, udpin) == 0) INP_RUNLOCK(inp); return (IPPROTO_DONE); From owner-svn-src-head@freebsd.org Fri Feb 10 06:09: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 EA4E1CD82DB; Fri, 10 Feb 2017 06:09:22 +0000 (UTC) (envelope-from o.hartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 456CB63F; Fri, 10 Feb 2017 06:09:21 +0000 (UTC) (envelope-from o.hartmann@walstatt.org) Received: from freyja.zeit4.iv.bundesimmobilien.de ([87.138.105.249]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MNMyz-1cVAVi1NRx-006tFT; Fri, 10 Feb 2017 07:09:11 +0100 Date: Fri, 10 Feb 2017 07:09:10 +0100 From: "O. Hartmann" To: Ermal =?ISO-8859-1?Q?Lu=E7i?= Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313529 - head/sys/netinet Message-ID: <20170210070910.188415ae@freyja.zeit4.iv.bundesimmobilien.de> In-Reply-To: <201702100601.v1A61lci087877@repo.freebsd.org> References: <201702100601.v1A61lci087877@repo.freebsd.org> Organization: Walstatt X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.29; amd64-portbld-freebsd12.0) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:vYDc+j7AbjUGqd9Js8O7dQ0Hbx5NDsVp4dvP/MEfRJqWhpNXdsl ntC/8z3sGeMoJl0ecL/nwHRPp0uMQLU7pdetO2TREQBZVI71SotshNmwP9OImlQQADyxtz4 ZOqFnOjI5B3mIzuF+mc44Jj/ah1xprCFeYwIEAEl0hq8Q64X6mbqoQEnyotX8soxIWgUULD Iv0ygVHT1AW7qZd6m1+rg== X-UI-Out-Filterresults: notjunk:1;V01:K0:qQvk2X26+jE=:MSqmD093tza6uCJzUdTPpC LD00ClOhE3biDU3v6zwc3DlMv6R1vR5Th3h8Tp7mTYl/I8Nnl4Wdj8Tio3trCIJ6fzEneUJYv 4GV35UQpDnpyZgDWnKYHq9/q7n3VtGGA5dL2PMVrwX5i0JtHh9MFA+UFs1ARFrGy7MjFaW3Ji uo1/6x42FDio+JU9Y1Iy4xM2WCFdOtspOIv00Ysq0/boPAB1hnY4Dp01xOChqk26QriaXp/xm O/1cBChzeWm4GQscs0EyJ/tcdHnFLXDm7Sju+mvPiI1b+65qp6FhpxtNKzOYkqXZxPUy/subO bDBZpLnV2iU3MG9/WQZijiowpkkt3mqIlJnLKBpkzyrMrDdgdMBIOWyIUldJmD8V6KHy+Y4Ii q8kfVpDWa2iXWfNIsJvfTVWEVDEGZD6lgsjZ+BPL892uBmPnlkEJhCZuPdAEKvDy/v3P35gtv RRDvaapjWCm91AGd+74CYLD0niYDNLuEju8WsO7PvC6upbvX3eet+M1Jjel2RpuczXUQ3NVQU 1LxevJxxGK6x/gZTr5DXG7qrOLTkdZrZ5nLE0nKh/EbSuv+yEdeqf33qqozSpMhR3QIzTSLqH hoqvAFbOdqPUqBDGVreBvesB9MTS501HyF6+hnlUuRbQQq9nlhk4TQwDVBmvmzYGXbuHx2COQ ybYOjqsUqUuURHLLJskfpu7JA/40xL+56IfcH2yyUGnagqFdCQbLOofzwzZj9J50SC0CRnGLw 28mfRtspPgBtioi3nDCfRSIgoyNJTv2H2Q4WX4xlmJTiQuB9ri3tcaV7M1L8n4wdwc6J3B9FJ XkUMhQB07oddCz8ZaqUrpTSO5qX5IspoCSRHHuLHHVlDiR+4H330v8ggTZftWtgeZ80ELE5lP N7v+4UsFrymRE58qAuNyXyn5AzH2iXsNqurvQPvkOMoc1Q14tohE8M4umerxcO8NsV9HPIc/7 uECONUcdoVXoRRhU8F/lFCLxsE0i35wh0yRmGXaCCWRDcOZkZLxKx/jwnCVxtYiZO6byW/hPu WLG4tazlmNt/vD/F2mqPVDo= X-BeenThere: svn-src-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: Fri, 10 Feb 2017 06:09:23 -0000 On Fri, 10 Feb 2017 06:01:47 +0000 (UTC) Ermal Lu=C3=A7i wrote: > Author: eri > Date: Fri Feb 10 06:01:47 2017 > New Revision: 313529 > URL: https://svnweb.freebsd.org/changeset/base/313529 >=20 > Log: > Fix build after r313524 > =20 > Reported-by: ohartmann@walstatt.org >=20 > Modified: > head/sys/netinet/udp_usrreq.c >=20 > Modified: head/sys/netinet/udp_usrreq.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/udp_usrreq.c Fri Feb 10 05:58:16 2017 > (r313528) +++ head/sys/netinet/udp_usrreq.c Fri Feb 10 06:01:47 > 2017 (r313529) @@ -636,7 +636,7 @@ udp_input(struct mbuf **mp, int > *offp, i goto badunlocked; > } > UDP_PROBE(receive, NULL, last, ip, last, uh); > - if (udp_append(last, ip, m, iphlen, udp_in) =3D=3D 0)=20 > + if (udp_append(last, ip, m, iphlen, udpin) =3D=3D 0)=20 > INP_RUNLOCK(last); > inp_lost: > INP_INFO_RUNLOCK(pcbinfo); > @@ -726,7 +726,7 @@ udp_input(struct mbuf **mp, int *offp, i > } > =20 > UDP_PROBE(receive, NULL, inp, ip, inp, uh); > - if (udp_append(inp, ip, m, iphlen, udp_in) =3D=3D 0)=20 > + if (udp_append(inp, ip, m, iphlen, udpin) =3D=3D 0)=20 > INP_RUNLOCK(inp); > return (IPPROTO_DONE); > =20 > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" Still (r313529) buildkernel breakage: [...] /usr/src/sys/netinet6/ip6_output.c:1741:10: error: duplicate case value '65' case IPV6_BINDMULTI: ^ /usr/src/sys/netinet6/in6.h:492:25: note: expanded from macro 'IPV6_BINDMUL= TI' #define IPV6_BINDMULTI 65 /* bool; allow multibind to same addr/po= rt */ From owner-svn-src-head@freebsd.org Fri Feb 10 06:20: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 24961CD8608; Fri, 10 Feb 2017 06:20:29 +0000 (UTC) (envelope-from eri@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E859AB20; Fri, 10 Feb 2017 06:20:28 +0000 (UTC) (envelope-from eri@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A6KSlb093165; Fri, 10 Feb 2017 06:20:28 GMT (envelope-from eri@FreeBSD.org) Received: (from eri@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A6KS8S093164; Fri, 10 Feb 2017 06:20:28 GMT (envelope-from eri@FreeBSD.org) Message-Id: <201702100620.v1A6KS8S093164@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eri set sender to eri@FreeBSD.org using -f From: =?UTF-8?Q?Ermal_Lu=c3=a7i?= Date: Fri, 10 Feb 2017 06:20:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313530 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Fri, 10 Feb 2017 06:20:29 -0000 Author: eri Date: Fri Feb 10 06:20:27 2017 New Revision: 313530 URL: https://svnweb.freebsd.org/changeset/base/313530 Log: Use proper value for socket option on IPv6 Reported-by: ohartmann@walstatt.org Modified: head/sys/netinet6/in6.h Modified: head/sys/netinet6/in6.h ============================================================================== --- head/sys/netinet6/in6.h Fri Feb 10 06:01:47 2017 (r313529) +++ head/sys/netinet6/in6.h Fri Feb 10 06:20:27 2017 (r313530) @@ -497,7 +497,7 @@ struct route_in6 { #define IPV6_RECVFLOWID 70 /* bool; receive IP6 flowid/flowtype w/ datagram */ #define IPV6_RECVRSSBUCKETID 71 /* bool; receive IP6 RSS bucket id w/ datagram */ -#define IPV6_ORIGDSTADDR 65 /* bool: allow getting dstaddr /port info */ +#define IPV6_ORIGDSTADDR 72 /* bool: allow getting dstaddr /port info */ #define IPV6_RECVORIGDSTADDR IPV6_ORIGDSTADDR /* From owner-svn-src-head@freebsd.org Fri Feb 10 07:16: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 42625CD180A; Fri, 10 Feb 2017 07:16:58 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 12216BAC; Fri, 10 Feb 2017 07:16:58 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A7Gvkv018166; Fri, 10 Feb 2017 07:16:57 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A7GvgU018165; Fri, 10 Feb 2017 07:16:57 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702100716.v1A7GvgU018165@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 10 Feb 2017 07:16:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313536 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Fri, 10 Feb 2017 07:16:58 -0000 Author: adrian Date: Fri Feb 10 07:16:56 2017 New Revision: 313536 URL: https://svnweb.freebsd.org/changeset/base/313536 Log: [ath] sigh, how'd I miss this. Modified: head/sys/dev/ath/if_ath_debug.h Modified: head/sys/dev/ath/if_ath_debug.h ============================================================================== --- head/sys/dev/ath/if_ath_debug.h Fri Feb 10 07:13:16 2017 (r313535) +++ head/sys/dev/ath/if_ath_debug.h Fri Feb 10 07:16:56 2017 (r313536) @@ -70,6 +70,7 @@ enum { ATH_DEBUG_DIVERSITY = 0x1000000000ULL, /* Diversity logic */ ATH_DEBUG_PWRSAVE = 0x2000000000ULL, ATH_DEBUG_BTCOEX = 0x4000000000ULL, /* BT Coex */ + ATH_DEBUG_QUIETIE = 0x8000000000ULL, /* Quiet time handling */ ATH_DEBUG_ANY = 0xffffffffffffffffULL }; From owner-svn-src-head@freebsd.org Fri Feb 10 07:42: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 8232CCD82A0; Fri, 10 Feb 2017 07:42:39 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x243.google.com (mail-pf0-x243.google.com [IPv6:2607:f8b0:400e:c00::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DCD41C53; Fri, 10 Feb 2017 07:42:39 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x243.google.com with SMTP id e4so2033987pfg.0; Thu, 09 Feb 2017 23:42:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=k5Qgtx6U9qCVK/z6JDhMiryqiEdXrUdhvqxLo1Y/pOk=; b=syItRYAx6V2+gtbY9Y5PreRUetvGaY94W/CQNiWIx2awuozfOzkRfl72u4FJrnzLcB 5wSuE+iv7r/5iOdY0Na/txD1oOgeKsAPPiFUmOy8jYorcoJi4rZjVDDgua3LjTglghr6 CN2ghnku9PIcVOd3Ii4yQEaAemV+yW1MGkUV3/SB+kwTqTWXC0d1Jnz1vdccXj2fZfwK ZRNl9LipyT3FvzlpH1cmQs40z782DmVTcrlLBa57rMnN9i4M3IYOe45OdThAZWCT8rcc sT2b4m26+TZHiuL08mA7osR9UryL5A0ebOnqPc1Az5WAKEyJvo8rQEPsB0kFfJUpv1De /MGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=k5Qgtx6U9qCVK/z6JDhMiryqiEdXrUdhvqxLo1Y/pOk=; b=qQYFPsco5vWVpqquvCk+Ni+hYYsDgwYRDSlrxFkA/rD3+Xg9JvDxqDsW+9GrBcX/8v 1Neo4aZ0QPisDdw+rMFlbDl593J6RN5WZwJoZcsX/yOS9P1sdpqPJe6xixMdpV6v9Xn4 7e0c7ykA+7mbxUNpTm0BI7mM6syLdaEbbXK/oxJ4FWncuIpNMXGCwxh9jz93Zu7CosjG 0W2VVdYTDqIEwzM/WvGJKPCuBRis0XGuGpUlWGs2nUWVWRrd7oywEwDv7KblI0VRzgWI c2ANWVSe3HtxssCb3GYQCfR+bgLyqkBfrjX4/HfPaIV3CuyP1XRusODE8Vu7zWnDcb1u zp6A== X-Gm-Message-State: AMke39lfSm9bOoN43RbXT2EnxRaYAXxp08k25Bepe1G0akqMT9DJpgxZlIKvgsb9wmY56w== X-Received: by 10.84.217.202 with SMTP id d10mr9583416plj.53.1486712558639; Thu, 09 Feb 2017 23:42:38 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id e127sm2651255pfh.89.2017.02.09.23.42.37 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Feb 2017 23:42:38 -0800 (PST) Subject: Re: svn commit: r306486 - in head: share/man/man4 sys/amd64/conf sys/conf sys/dev/mlx4 sys/dev/mlx4/mlx4_core sys/dev/mlx4/mlx4_en sys/dev/mlx4/mlx4_ib sys/i386/conf sys/modules sys/modules/mlx4 sys/mo... Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_CCD8119E-A0BE-4F4E-91E6-5F4FFDF1711D"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201609300823.u8U8N7ff043558@repo.freebsd.org> Date: Thu, 9 Feb 2017 23:42:36 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <0AFF68F4-3304-4953-906A-DE1158CF35DC@gmail.com> References: <201609300823.u8U8N7ff043558@repo.freebsd.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-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: Fri, 10 Feb 2017 07:42:39 -0000 --Apple-Mail=_CCD8119E-A0BE-4F4E-91E6-5F4FFDF1711D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Sep 30, 2016, at 01:23, Hans Petter Selasky = wrote: >=20 > Author: hselasky > Date: Fri Sep 30 08:23:06 2016 > New Revision: 306486 > URL: https://svnweb.freebsd.org/changeset/base/306486 >=20 > Log: > Move the ConnectX-3 and ConnectX-2 driver from sys/ofed into = sys/dev/mlx4 > like other PCI network drivers. The sys/ofed directory is now mainly > reserved for generic infiniband code, with exception of the mthca = driver. >=20 > - Add new manual page, mlx4en(4), describing how to configure and = load > mlx4en. >=20 > - All relevant driver C-files are now prefixed mlx4, mlx4_en and > mlx4_ib respectivly to avoid object filename collisions when = compiling > the kernel. This also fixes an issue with proper dependency file > generation for the C-files in question. >=20 > - Device mlxen is now device mlx4en and depends on device mlx4, see > mlx4en(4). Only the network device name remains unchanged. >=20 > - The mlx4 and mlx4en modules are now built by default on i386 and > amd64 targets. Only building the mlx4ib module depends on > WITH_OFED=3DYES . >=20 > Sponsored by: Mellanox Technologies Hi Hans! I was wondering if there was a reason why this change hasn=E2=80=99= t been MFCed =E2=80=A6 I noticed this because the mlx4en(4) manpage is = tied to this commit. Thanks! -Ngie --Apple-Mail=_CCD8119E-A0BE-4F4E-91E6-5F4FFDF1711D Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYnW7tAAoJEPWDqSZpMIYViU4P/iy91ZdEEy0P5RnhO9Inht3f EgX+yDOvyFWl4VfZeCDchmjBFQh2yQlVKDNhNn47INSWlo7rtVKZ+KdOXt8q6QfK gBJFu0jCF1qI/8jeoZ2UFM3mwh+n4nnaL4pS45yRJFhtCxdC6EMAk1HkCtWVk9c/ iFSWtTPmOlxI9b7jgpj72hCqgFOXk0m3xpwhLVTlQSEVJIMNIzBf25agQHr4AqMs KmxQitwlpPhniANirgO/h7SubLaJjGFsMd8oeVmirrDpnOmURPiylugSdwP4rAQO o4ACprVHGBMV4xHw45hcu2bnrJ0+M29LlHMGXxQYaXggZRfn0iP7Decz3W/3fPEs I7T8EliebbybN5UBkWwysI1bErL1d8aGmhoHdF24jdsKxVeSVVTnvlmORhMfWkOU cGLV9GpZrAldxoXGq0axyesft57QEAo72uP6DFiw2toB1BEFaVDpazPuDHZ0lRTU aykdgRaUr3sTzlNs6JfnZc0p1HD5C/Yz2RcEE4yfd2XCqax7gpZZPWWq0TN4Pg36 TZLO8FJh1tNoghb8kkHjKzXIwHDDfB8L3fLc0tpR3zAOackI7j7YxDAV8SP9UqOR nMJgxg8YAgFkm/Kstk6yptMtSqbm4TEH5Zj/tS79CuT0E1mjz9CLPaOOducmAXQz Fqdf9+IPqcTmssQ1ztZ4 =3DJ5 -----END PGP SIGNATURE----- --Apple-Mail=_CCD8119E-A0BE-4F4E-91E6-5F4FFDF1711D-- From owner-svn-src-head@freebsd.org Fri Feb 10 08:51: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 A1661CD969E; Fri, 10 Feb 2017 08:51:06 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E1351F9A; Fri, 10 Feb 2017 08:51:06 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 7AD9E1FE104; Fri, 10 Feb 2017 09:50:59 +0100 (CET) Subject: Re: svn commit: r306486 - in head: share/man/man4 sys/amd64/conf sys/conf sys/dev/mlx4 sys/dev/mlx4/mlx4_core sys/dev/mlx4/mlx4_en sys/dev/mlx4/mlx4_ib sys/i386/conf sys/modules sys/modules/mlx4 sys/mo... To: "Ngie Cooper (yaneurabeya)" References: <201609300823.u8U8N7ff043558@repo.freebsd.org> <0AFF68F4-3304-4953-906A-DE1158CF35DC@gmail.com> Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Hans Petter Selasky Message-ID: <8d3dc85f-dfbf-97c6-3169-29dc53364b18@selasky.org> Date: Fri, 10 Feb 2017 09:50:24 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <0AFF68F4-3304-4953-906A-DE1158CF35DC@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Fri, 10 Feb 2017 08:51:06 -0000 On 02/10/17 08:42, Ngie Cooper (yaneurabeya) wrote: > >> On Sep 30, 2016, at 01:23, Hans Petter Selasky wrote: >> >> Author: hselasky >> Date: Fri Sep 30 08:23:06 2016 >> New Revision: 306486 >> URL: https://svnweb.freebsd.org/changeset/base/306486 >> >> Log: >> Move the ConnectX-3 and ConnectX-2 driver from sys/ofed into sys/dev/mlx4 >> like other PCI network drivers. The sys/ofed directory is now mainly >> reserved for generic infiniband code, with exception of the mthca driver. >> >> - Add new manual page, mlx4en(4), describing how to configure and load >> mlx4en. >> >> - All relevant driver C-files are now prefixed mlx4, mlx4_en and >> mlx4_ib respectivly to avoid object filename collisions when compiling >> the kernel. This also fixes an issue with proper dependency file >> generation for the C-files in question. >> >> - Device mlxen is now device mlx4en and depends on device mlx4, see >> mlx4en(4). Only the network device name remains unchanged. >> >> - The mlx4 and mlx4en modules are now built by default on i386 and >> amd64 targets. Only building the mlx4ib module depends on >> WITH_OFED=YES . >> >> Sponsored by: Mellanox Technologies > > Hi Hans! > I was wondering if there was a reason why this change hasn’t been MFCed … I noticed this because the mlx4en(4) manpage is tied to this commit. No, except for making integration more difficult for people that use SVN. Which branches do you wish this MFC'ed to? --HPS From owner-svn-src-head@freebsd.org Fri Feb 10 09:31: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 A58A2CD8344; Fri, 10 Feb 2017 09:31:43 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7416515F0; Fri, 10 Feb 2017 09:31:43 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A9VgaG077269; Fri, 10 Feb 2017 09:31:42 GMT (envelope-from pstef@FreeBSD.org) Received: (from pstef@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A9VdHH077236; Fri, 10 Feb 2017 09:31:39 GMT (envelope-from pstef@FreeBSD.org) Message-Id: <201702100931.v1A9VdHH077236@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pstef set sender to pstef@FreeBSD.org using -f From: Piotr Pawel Stefaniak Date: Fri, 10 Feb 2017 09:31:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313544 - head/usr.bin/indent/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Fri, 10 Feb 2017 09:31:43 -0000 Author: pstef Date: Fri Feb 10 09:31:39 2017 New Revision: 313544 URL: https://svnweb.freebsd.org/changeset/base/313544 Log: indent(1): add regression test cases These examples show expected behavior of indent(1). They are meant to be used together with a regression test mechanism, either Kyua, a Makefile or perhaps something else. The mechanism should in essence do this: indent -P${test}.pro < ${test}.0 > ${test}.0.run and compare ${test}.0.stdout to ${test}.0.run. If the files differ or the exit status isn't 0, the test failed. * ${test}.pro is an indent(1) profile: a list of options passed through a file. The program doesn't complain if the file doesn't exist. * ${test}.0 is a C source file which acts as input for indent(1). It doesn't have to have any particular formatting, since it's the output that matters. * ${test}.0.stdout contains expected output. It doesn't have to be formatted in Kernel Normal Form as the point of the tests is to check for regressions in the program and not to check that it always produces KNF. Reviewed by: ngie Approved by: pfg (mentor) Differential Revision: https://reviews.freebsd.org/D9007 Added: head/usr.bin/indent/tests/ head/usr.bin/indent/tests/comments.0 (contents, props changed) head/usr.bin/indent/tests/comments.0.stdout (contents, props changed) head/usr.bin/indent/tests/declarations.0 (contents, props changed) head/usr.bin/indent/tests/declarations.0.stdout (contents, props changed) head/usr.bin/indent/tests/elsecomment.0 (contents, props changed) head/usr.bin/indent/tests/elsecomment.0.stdout (contents, props changed) head/usr.bin/indent/tests/elsecomment.pro (contents, props changed) head/usr.bin/indent/tests/float.0 (contents, props changed) head/usr.bin/indent/tests/float.0.stdout (contents, props changed) head/usr.bin/indent/tests/label.0 (contents, props changed) head/usr.bin/indent/tests/label.0.stdout (contents, props changed) head/usr.bin/indent/tests/label.pro (contents, props changed) head/usr.bin/indent/tests/list_head.0 (contents, props changed) head/usr.bin/indent/tests/list_head.0.stdout (contents, props changed) head/usr.bin/indent/tests/nsac.0 (contents, props changed) head/usr.bin/indent/tests/nsac.0.stdout (contents, props changed) head/usr.bin/indent/tests/nsac.pro (contents, props changed) head/usr.bin/indent/tests/offsetof.0 (contents, props changed) head/usr.bin/indent/tests/offsetof.0.stdout (contents, props changed) head/usr.bin/indent/tests/sac.0 (contents, props changed) head/usr.bin/indent/tests/sac.0.stdout (contents, props changed) head/usr.bin/indent/tests/sac.pro (contents, props changed) head/usr.bin/indent/tests/struct.0 (contents, props changed) head/usr.bin/indent/tests/struct.0.stdout (contents, props changed) head/usr.bin/indent/tests/surplusbad.0 (contents, props changed) head/usr.bin/indent/tests/surplusbad.0.stdout (contents, props changed) head/usr.bin/indent/tests/surplusbad.pro (contents, props changed) head/usr.bin/indent/tests/types_from_file.0 (contents, props changed) head/usr.bin/indent/tests/types_from_file.0.stdout (contents, props changed) head/usr.bin/indent/tests/types_from_file.list (contents, props changed) head/usr.bin/indent/tests/types_from_file.pro (contents, props changed) head/usr.bin/indent/tests/wchar.0 (contents, props changed) head/usr.bin/indent/tests/wchar.0.stdout (contents, props changed) Added: head/usr.bin/indent/tests/comments.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/comments.0 Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,25 @@ +/* $FreeBSD$ */ +/* See r303597, r303598, r309219, and r309343 */ +void t(void) { + /* + * Old indent wrapped the URL near where this sentence ends. + * + * https://www.freebsd.org/cgi/man.cgi?query=indent&apropos=0&sektion=0&manpath=FreeBSD+12-current&arch=default&format=html + */ + + /* + * Old indent did not wrap to column 78 + * + * aaaaaa bbbbbb cccccc dddddd eeeeee ffffff ggggg hhhhh iiiii jjjj kk + */ + + /* + * Old indent unnecessarily removed the star comment continuation on the next line. + * + * *test* + */ + + /* r309219 Go through linked list, freeing from the malloced (t[-1]) address. */ + + /* r309343 */ +} Added: head/usr.bin/indent/tests/comments.0.stdout ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/comments.0.stdout Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,32 @@ +/* $FreeBSD$ */ +/* See r303597, r303598, r309219, and r309343 */ +void +t(void) +{ + /* + * Old indent wrapped the URL near where this sentence ends. + * + * https://www.freebsd.org/cgi/man.cgi?query=indent&apropos=0&sektion=0&manpath=FreeBSD+12-current&arch=default&format=html + */ + + /* + * Old indent did not wrap to column 78 + * + * aaaaaa bbbbbb cccccc dddddd eeeeee ffffff ggggg hhhhh iiiii jjjj + * kk + */ + + /* + * Old indent unnecessarily removed the star comment continuation on + * the next line. + * + * *test* + */ + + /* + * r309219 Go through linked list, freeing from the malloced (t[-1]) + * address. + */ + + /* r309343 */ +} Added: head/usr.bin/indent/tests/declarations.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/declarations.0 Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,21 @@ +/* $FreeBSD$ */ +/* See r303570 */ +void t(void) { + int a, + b, + c; + int + *d, + *e, + *f; + int (*g)(), + (*h)(), + (*i)(); + int j, + k, + l; + int m + ,n + ,o + ; +} Added: head/usr.bin/indent/tests/declarations.0.stdout ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/declarations.0.stdout Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,15 @@ +/* $FreeBSD$ */ +/* See r303570 */ +void +t(void) +{ + int a, b, c; + int + *d, *e, *f; + int (*g) (), (*h) (), (*i) (); + int j, k, l; + int m + ,n + ,o + ; +} Added: head/usr.bin/indent/tests/elsecomment.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/elsecomment.0 Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,18 @@ +/* $FreeBSD$ */ +/* See r303484 and r309342 */ +void t(void) { + if (0) { + + } /* Old indent would remove the following blank line */ + + /* + * test + */ + + if (1) + ; + else /* Old indent would get very confused here */ + { + + } +} Added: head/usr.bin/indent/tests/elsecomment.0.stdout ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/elsecomment.0.stdout Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,22 @@ +/* $FreeBSD$ */ +/* See r303484 and r309342 */ +void +t(void) +{ + if (0) + { + + } /* Old indent would remove the following + * blank line */ + + /* + * test + */ + + if (1) + ; + else /* Old indent would get very confused here */ + { + + } +} Added: head/usr.bin/indent/tests/elsecomment.pro ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/elsecomment.pro Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +-bl Added: head/usr.bin/indent/tests/float.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/float.0 Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,6 @@ +/* $FreeBSD$ */ +/* See r303499 */ +void t(void) { + unsigned long x = 314UL; + float y = 3.14f; +} Added: head/usr.bin/indent/tests/float.0.stdout ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/float.0.stdout Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,8 @@ +/* $FreeBSD$ */ +/* See r303499 */ +void +t(void) +{ + unsigned long x = 314UL; + float y = 3.14f; +} Added: head/usr.bin/indent/tests/label.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/label.0 Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,13 @@ +/* $FreeBSD$ */ +/* See r303489 */ +void t(void) { + switch (1) + { + case 1: /* test */ + case 2: /* test */ + } +CLEANUP: + ; +V: ; +U: ; +} Added: head/usr.bin/indent/tests/label.0.stdout ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/label.0.stdout Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,14 @@ +/* $FreeBSD$ */ +/* See r303489 */ +void +t(void) +{ + switch (1) { + case 1: /* test */ + case 2: /* test */ + } +CLEANUP: + ; +V: ; +U: ; +} Added: head/usr.bin/indent/tests/label.pro ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/label.pro Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +-nut Added: head/usr.bin/indent/tests/list_head.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/list_head.0 Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,16 @@ +/* $FreeBSD$ */ +/* See r309380 */ +static int +do_execve(td, args, mac_p) + struct thread *td; + struct image_args *args; + struct mac *mac_p; +{ + +} + +static LIST_HEAD(, alq) ald_active; +static int ald_shuttingdown = 0; +struct thread *ald_thread; + + Added: head/usr.bin/indent/tests/list_head.0.stdout ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/list_head.0.stdout Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,14 @@ +/* $FreeBSD$ */ +/* See r309380 */ +static int +do_execve(td, args, mac_p) + struct thread *td; + struct image_args *args; + struct mac *mac_p; +{ + +} + +static LIST_HEAD(, alq) ald_active; +static int ald_shuttingdown = 0; +struct thread *ald_thread; Added: head/usr.bin/indent/tests/nsac.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/nsac.0 Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,4 @@ +/* $FreeBSD$ */ +void t(void) { + int a = (double) 8; +} Added: head/usr.bin/indent/tests/nsac.0.stdout ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/nsac.0.stdout Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,6 @@ +/* $FreeBSD$ */ +void +t(void) +{ + int a = (double)8; +} Added: head/usr.bin/indent/tests/nsac.pro ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/nsac.pro Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +-nsac Added: head/usr.bin/indent/tests/offsetof.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/offsetof.0 Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,5 @@ +/* $FreeBSD$ */ +/* See r303718 */ +void t(void) { + int n = malloc(offsetof(struct s, f) + 1); +} Added: head/usr.bin/indent/tests/offsetof.0.stdout ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/offsetof.0.stdout Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,7 @@ +/* $FreeBSD$ */ +/* See r303718 */ +void +t(void) +{ + int n = malloc(offsetof(struct s, f) + 1); +} Added: head/usr.bin/indent/tests/sac.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/sac.0 Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,4 @@ +/* $FreeBSD$ */ +void t(void) { + int a = (double) 8; +} Added: head/usr.bin/indent/tests/sac.0.stdout ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/sac.0.stdout Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,6 @@ +/* $FreeBSD$ */ +void +t(void) +{ + int a = (double) 8; +} Added: head/usr.bin/indent/tests/sac.pro ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/sac.pro Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +-sac Added: head/usr.bin/indent/tests/struct.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/struct.0 Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,13 @@ +/* $FreeBSD$ */ +/* See r303485 */ +void +t(void) +{ + static const struct { + int a; + int b; + } c[] = { + { D, E }, + { F, G } + }; +} Added: head/usr.bin/indent/tests/struct.0.stdout ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/struct.0.stdout Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,13 @@ +/* $FreeBSD$ */ +/* See r303485 */ +void +t(void) +{ + static const struct { + int a; + int b; + } c[] = { + {D, E}, + {F, G} + }; +} Added: head/usr.bin/indent/tests/surplusbad.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/surplusbad.0 Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,9 @@ +/* $FreeBSD$ */ +/* See r303599 */ +#if defined(__i386__) +int a; +#elif defined(__amd64__) +int b; +#else +#error "Port me" +#endif Added: head/usr.bin/indent/tests/surplusbad.0.stdout ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/surplusbad.0.stdout Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,9 @@ +/* $FreeBSD$ */ +/* See r303599 */ +#if defined(__i386__) +int a; +#elif defined(__amd64__) +int b; +#else +#error "Port me" +#endif Added: head/usr.bin/indent/tests/surplusbad.pro ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/surplusbad.pro Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +-bad Added: head/usr.bin/indent/tests/types_from_file.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/types_from_file.0 Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,3 @@ +/* $FreeBSD$ */ +/* See r303735 */ +void t(a *x, b *y, c *z); Added: head/usr.bin/indent/tests/types_from_file.0.stdout ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/types_from_file.0.stdout Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,3 @@ +/* $FreeBSD$ */ +/* See r303735 */ +void t(a *x, b *y, c * z); Added: head/usr.bin/indent/tests/types_from_file.list ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/types_from_file.list Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,2 @@ +b +a \ No newline at end of file Added: head/usr.bin/indent/tests/types_from_file.pro ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/types_from_file.pro Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +-Utypes_from_file.list Added: head/usr.bin/indent/tests/wchar.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/wchar.0 Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,6 @@ +/* $FreeBSD$ */ +/* See r309220 */ +#include + +wchar_t *x = L"test"; +wchar_t y = L't'; Added: head/usr.bin/indent/tests/wchar.0.stdout ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/wchar.0.stdout Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,6 @@ +/* $FreeBSD$ */ +/* See r309220 */ +#include + +wchar_t *x = L"test"; +wchar_t y = L't'; From owner-svn-src-head@freebsd.org Fri Feb 10 13:28: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 583C8CD8129; Fri, 10 Feb 2017 13:28:32 +0000 (UTC) (envelope-from ray@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A6DFAA6; Fri, 10 Feb 2017 13:28:31 +0000 (UTC) (envelope-from ray@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1ADSVDa071985; Fri, 10 Feb 2017 13:28:31 GMT (envelope-from ray@FreeBSD.org) Received: (from ray@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1ADSVDV071984; Fri, 10 Feb 2017 13:28:31 GMT (envelope-from ray@FreeBSD.org) Message-Id: <201702101328.v1ADSVDV071984@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ray set sender to ray@FreeBSD.org using -f From: Aleksandr Rybalko Date: Fri, 10 Feb 2017 13:28:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313547 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Fri, 10 Feb 2017 13:28:32 -0000 Author: ray Date: Fri Feb 10 13:28:30 2017 New Revision: 313547 URL: https://svnweb.freebsd.org/changeset/base/313547 Log: o Reset mouse selection when new lines reach selection lines. o Fix how selection handled on display. Submitted by: hselasky Reviewed by: hselasky, emaste(previous version) Todo: track mouse select direction. Modified: head/sys/dev/vt/vt_buf.c Modified: head/sys/dev/vt/vt_buf.c ============================================================================== --- head/sys/dev/vt/vt_buf.c Fri Feb 10 11:17:45 2017 (r313546) +++ head/sys/dev/vt/vt_buf.c Fri Feb 10 13:28:30 2017 (r313547) @@ -54,6 +54,11 @@ static MALLOC_DEFINE(M_VTBUF, "vtbuf", " (d).tp_row = (s).tp_row; \ } while (0) +#ifndef SC_NO_CUTPASTE +static int vtbuf_wth(const struct vt_buf *vb, int row); +static int vtbuf_in_this_range(int begin, int test, int end, int sz); +#endif +static int vtbuf_htw(const struct vt_buf *vb, int row); /* * line4 @@ -122,6 +127,9 @@ vthistory_seek(struct vt_buf *vb, int of void vthistory_addlines(struct vt_buf *vb, int offset) { +#ifndef SC_NO_CUTPASTE + int cur, sz; +#endif vb->vb_curroffset += offset; if (vb->vb_curroffset < 0) @@ -132,6 +140,17 @@ vthistory_addlines(struct vt_buf *vb, in if ((vb->vb_flags & VBF_SCROLL) == 0) { vb->vb_roffset = vb->vb_curroffset; } + +#ifndef SC_NO_CUTPASTE + sz = vb->vb_history_size; + cur = vb->vb_roffset + vb->vb_scr_size.tp_row + sz - 1; + if (vtbuf_in_this_range(cur, vb->vb_mark_start.tp_row, cur + offset, sz) || + vtbuf_in_this_range(cur, vb->vb_mark_end.tp_row, cur + offset, sz)) { + /* clear screen selection */ + vb->vb_mark_start.tp_row = vb->vb_mark_end.tp_row; + vb->vb_mark_start.tp_col = vb->vb_mark_end.tp_col; + } +#endif } void @@ -144,11 +163,33 @@ vthistory_getpos(const struct vt_buf *vb #ifndef SC_NO_CUTPASTE /* Only mouse support use it now. */ /* Translate current view row number to history row. */ static int -vtbuf_wth(struct vt_buf *vb, int row) +vtbuf_wth(const struct vt_buf *vb, int row) { return ((vb->vb_roffset + row) % vb->vb_history_size); } + +/* + * Test if an index in a circular buffer is within a range. + * + * begin - start index + * end - end index + * test - test index + * sz - size of circular buffer when it turns over + */ +static int +vtbuf_in_this_range(int begin, int test, int end, int sz) +{ + + begin %= sz; + end %= sz; + + /* check for inversion */ + if (begin > end) + return (test >= begin || test < end); + else + return (test >= begin && test < end); +} #endif /* Translate history row to current view row number. */ @@ -169,33 +210,44 @@ vtbuf_htw(const struct vt_buf *vb, int r int vtbuf_iscursor(const struct vt_buf *vb, int row, int col) { - int sc, sr, ec, er, tmp; +#ifndef SC_NO_CUTPASTE + int sc, sr, sz, ec, er, tmp; +#endif if ((vb->vb_flags & (VBF_CURSOR|VBF_SCROLL)) == VBF_CURSOR && (vb->vb_cursor.tp_row == row) && (vb->vb_cursor.tp_col == col)) return (1); +#ifndef SC_NO_CUTPASTE /* Mark cut/paste region. */ + if (vb->vb_mark_start.tp_col == vb->vb_mark_end.tp_col && + vb->vb_mark_start.tp_row == vb->vb_mark_end.tp_row) + return (0); - /* - * Luckily screen view is not like circular buffer, so we will - * calculate in screen coordinates. Translate first. - */ sc = vb->vb_mark_start.tp_col; - sr = vtbuf_htw(vb, vb->vb_mark_start.tp_row); + sr = vb->vb_mark_start.tp_row; ec = vb->vb_mark_end.tp_col; - er = vtbuf_htw(vb, vb->vb_mark_end.tp_row); + er = vb->vb_mark_end.tp_row; + /* + * Information about if the selection was made bottom-top or + * top-bottom is lost due to modulo arithmetics and needs to + * be recovered: + */ + sz = vb->vb_history_size; + tmp = (sz + er - sr) % sz; + row = vtbuf_wth(vb, row); - /* Swap start and end if start > end. */ - if (POS_INDEX(sc, sr) > POS_INDEX(ec, er)) { + /* Swap start and end if start > end */ + if ((2 * tmp) > sz || (tmp == 0 && sc > ec)) { tmp = sc; sc = ec; ec = tmp; tmp = sr; sr = er; er = tmp; } - if ((POS_INDEX(sc, sr) <= POS_INDEX(col, row)) && - (POS_INDEX(col, row) < POS_INDEX(ec, er))) + if (vtbuf_in_this_range(POS_INDEX(sc, sr), POS_INDEX(col, row), + POS_INDEX(ec, er), POS_INDEX(0, sz))) return (1); +#endif return (0); } @@ -627,8 +679,8 @@ vtbuf_flush_mark(struct vt_buf *vb) int s, e; /* Notify renderer to update marked region. */ - if (vb->vb_mark_start.tp_col || vb->vb_mark_end.tp_col || - vb->vb_mark_start.tp_row || vb->vb_mark_end.tp_row) { + if ((vb->vb_mark_start.tp_col != vb->vb_mark_end.tp_col) || + (vb->vb_mark_start.tp_row != vb->vb_mark_end.tp_row)) { s = vtbuf_htw(vb, vb->vb_mark_start.tp_row); e = vtbuf_htw(vb, vb->vb_mark_end.tp_row); From owner-svn-src-head@freebsd.org Fri Feb 10 14:24:53 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 3B182CD85DB; Fri, 10 Feb 2017 14:24:53 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x22c.google.com (mail-io0-x22c.google.com [IPv6:2607:f8b0:4001:c06::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 056EAF36; Fri, 10 Feb 2017 14:24:53 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x22c.google.com with SMTP id j18so50656061ioe.2; Fri, 10 Feb 2017 06:24:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=5zyPGf5OP5Y0ZYTYRqPXvcRRxwtmosdPF7C941pwH4U=; b=gWg+yhB+2Z59AIrZ5VmkJbOnXyANsu6niWZOFlz9mlBlrn49iWezjTAO6XjJ0Rlw4C p+6gz9+l7YxK1abOVTlVycthn0MLlyaogr/KYgAeYdRc02XkXU79+R33Zq0bRNK+YPK6 4LGQTH/uGwLwFM6fxFfMc5poz777ZZ46F9goHQRZDwOGCT+2hqzrcEBfdd/TrFpNc6E5 Q+0jSOgoHI9tKhSqLoA01IqtEBTBkpAs4eJGiB37KeAzz7AsR1I+YnXZvXcnb+yO/48I MUNX4EtXzwXkHy8X5aqfde3KxpvYgNVWyHhdHTbcWStzR0mko24qvAxpdyWOGM+tN3+V FbSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=5zyPGf5OP5Y0ZYTYRqPXvcRRxwtmosdPF7C941pwH4U=; b=r37GP5r9m+I/tu166ixezTUqOyG2I9E2QBPM+uaKgaXNOlzQgqMwC3AsxbGhIV8QAf Y2BP8JXIExgGYvmL+COSaLgFJB/2dPd38DVBgQLEbuY1GFYBr6kBYUXyANyUwwHnfruw gUvKsn//pMqo/mHZlMRZyQLX0KXvXXP8nMfO3ATgcD6o2A76lyd8IfxED6H2fLXBsbnX hGFrN0XNB/vItjib83X9INTEdMUUYiB2bJIHXiNxZ7EQjxhS/4HBBNNh9QLL3Xse2ANp zJWCzVzHKG2IOWqogONRlZK9kgJxbRiFBh7lZ6gDPXr+JFAE35sC/DDAhxIN+7GA7rta IueQ== X-Gm-Message-State: AMke39kVJ//KQqSRkYGwvYX0+M984Zm5JTNlKCeMCI5FfclWUHqcYd9QAOce6EOUa1Q877BuW8v+a6IXp/YZGg== X-Received: by 10.107.18.12 with SMTP id a12mr9602590ioj.155.1486736692309; Fri, 10 Feb 2017 06:24:52 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.175.159 with HTTP; Fri, 10 Feb 2017 06:24:31 -0800 (PST) In-Reply-To: <201702101328.v1ADSVDV071984@repo.freebsd.org> References: <201702101328.v1ADSVDV071984@repo.freebsd.org> From: Ed Maste Date: Fri, 10 Feb 2017 09:24:31 -0500 X-Google-Sender-Auth: _uXHGCWZLoJa_FMNORK81e32yyc Message-ID: Subject: Re: svn commit: r313547 - head/sys/dev/vt To: Aleksandr Rybalko Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-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: Fri, 10 Feb 2017 14:24:53 -0000 On 10 February 2017 at 08:28, Aleksandr Rybalko wrote: > Author: ray > Date: Fri Feb 10 13:28:30 2017 > New Revision: 313547 > URL: https://svnweb.freebsd.org/changeset/base/313547 > > Log: > o Reset mouse selection when new lines reach selection lines. > o Fix how selection handled on display. PR: 211922 From owner-svn-src-head@freebsd.org Fri Feb 10 14:27: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 CBBACCD8810 for ; Fri, 10 Feb 2017 14:27:39 +0000 (UTC) (envelope-from ray@ddteam.net) Received: from mail-yw0-x22d.google.com (mail-yw0-x22d.google.com [IPv6:2607:f8b0:4002:c05::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 896EA13C9 for ; Fri, 10 Feb 2017 14:27:39 +0000 (UTC) (envelope-from ray@ddteam.net) Received: by mail-yw0-x22d.google.com with SMTP id u68so21855231ywg.0 for ; Fri, 10 Feb 2017 06:27:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ddteam-net.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=E5HsxsuUnYeY44KM45llR51s9oFM5dtgKZ7ksVGsNro=; b=CU/JP+JXrkdJ79D6umY1krCqEY6k/YQ8grnkE5vKOSge7v3J5jaWtU1/qnh2E4GJbe L3XH6f6O9+d3WLgXhAfDgrjcCil5KCvQYgmeUrdreRJ7KeAeHsaLNHBkuv3juSBKZICU OPB1BxLxqwR+STy8dqbYayhecacMuG+GzVgkAAQuVnAM82vCW6xhNVvmi8eo1L1lOtga LOAybsjx7PSs5pR5dKs1Wt+Pvm3KE+/SWN5o/d2ieUIaw7jXOD8pOfLuj9qnOn/fqB37 XfmUOeQlgx+GU046b8CcFkK3hYFsrc1FBvZOcsIS8L45dV7oTN3jJmKEDlO0mYftE4Op NCGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=E5HsxsuUnYeY44KM45llR51s9oFM5dtgKZ7ksVGsNro=; b=AgjFPEmuglNEwLQbCCm/YmpU5MTaQXU8BBYJR7ngrR5bzwai2Pq1eqxpd2/a1eVelN bQjXTiQiG75UpjsT0F60LTFK9LVs0iULC3bS5M71P8IJx/VUu0/bcg9bP95E8R95pDBS mmJ5VY7V21BNnaniCYvNZJl/Et2bccUHuZgTCqh+wAGJBWNriAFehmsKjyE2kGJuoGdp kmbSxfFGgfDdhWxg2G7UGV76R0LrQ1gUqQoQMwHY0DafX2oG/TJzT5aZhIXM2IkVKTMu O7Om/JGFn9Kt8qOWp0I1XonMTHX2b8jl0lECK1y4T+beetMLwaS135VZSpoMOcQg4s4o RA/g== X-Gm-Message-State: AMke39k2VpRuQGDEdHhB8XDfIq0vwYPYxkzqHFWNqGV5tklbF9SBvPd2pdCUecySYHZaO9MfrLsrzlXhOYzoAA== X-Received: by 10.13.227.65 with SMTP id m62mr6400429ywe.188.1486736858575; Fri, 10 Feb 2017 06:27:38 -0800 (PST) MIME-Version: 1.0 Received: by 10.37.219.10 with HTTP; Fri, 10 Feb 2017 06:27:38 -0800 (PST) In-Reply-To: References: <201702101328.v1ADSVDV071984@repo.freebsd.org> From: Aleksandr Rybalko Date: Fri, 10 Feb 2017 16:27:38 +0200 Message-ID: Subject: Re: svn commit: r313547 - head/sys/dev/vt To: Ed Maste Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-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: Fri, 10 Feb 2017 14:27:39 -0000 Ed, thanks, I will define PR on planned fix 2017-02-10 16:24 GMT+02:00 Ed Maste : > On 10 February 2017 at 08:28, Aleksandr Rybalko wrote: > > Author: ray > > Date: Fri Feb 10 13:28:30 2017 > > New Revision: 313547 > > URL: https://svnweb.freebsd.org/changeset/base/313547 > > > > Log: > > o Reset mouse selection when new lines reach selection lines. > > o Fix how selection handled on display. > > PR: 211922 > -- WBW ------- Rybalko Aleksandr From owner-svn-src-head@freebsd.org Fri Feb 10 14:49: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 3F0A6CD8210; Fri, 10 Feb 2017 14:49:06 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0ECB6354; Fri, 10 Feb 2017 14:49:05 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1AEn5An004756; Fri, 10 Feb 2017 14:49:05 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1AEn5XX004753; Fri, 10 Feb 2017 14:49:05 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702101449.v1AEn5XX004753@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 10 Feb 2017 14:49:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313549 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Fri, 10 Feb 2017 14:49:06 -0000 Author: kib Date: Fri Feb 10 14:49:04 2017 New Revision: 313549 URL: https://svnweb.freebsd.org/changeset/base/313549 Log: Fix r313495. The file type DTYPE_VNODE can be assigned as a fallback if VOP_OPEN() did not initialized file type. This is a typical code path used by normal file systems. Also, change error returned for inappropriate file type used for O_EXLOCK to EOPNOTSUPP, as declared in the open(2) man page. Reported by: cy, dhw, Iblis Lin Tested by: dhw Sponsored by: The FreeBSD Foundation MFC after: 13 days Modified: head/sys/kern/vfs_vnops.c head/sys/sys/file.h Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Fri Feb 10 14:38:28 2017 (r313548) +++ head/sys/kern/vfs_vnops.c Fri Feb 10 14:49:04 2017 (r313549) @@ -351,8 +351,8 @@ vn_open_vnode(struct vnode *vp, int fmod while ((fmode & (O_EXLOCK | O_SHLOCK)) != 0) { KASSERT(fp != NULL, ("open with flock requires fp")); - if (fp->f_type != DTYPE_VNODE) { - error = EBADF; + if (fp->f_type != DTYPE_NONE && fp->f_type != DTYPE_VNODE) { + error = EOPNOTSUPP; break; } lock_flags = VOP_ISLOCKED(vp); Modified: head/sys/sys/file.h ============================================================================== --- head/sys/sys/file.h Fri Feb 10 14:38:28 2017 (r313548) +++ head/sys/sys/file.h Fri Feb 10 14:49:04 2017 (r313549) @@ -53,6 +53,7 @@ struct vnode; #endif /* _KERNEL */ +#define DTYPE_NONE 0 /* not yet initialized */ #define DTYPE_VNODE 1 /* file */ #define DTYPE_SOCKET 2 /* communications endpoint */ #define DTYPE_PIPE 3 /* pipe */ From owner-svn-src-head@freebsd.org Fri Feb 10 15:18: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 D259ACD9034; Fri, 10 Feb 2017 15:18:43 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA7E0375; Fri, 10 Feb 2017 15:18:43 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1AFIgYH018104; Fri, 10 Feb 2017 15:18:42 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1AFIgM6018098; Fri, 10 Feb 2017 15:18:42 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201702101518.v1AFIgM6018098@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 10 Feb 2017 15:18:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313554 - in head/sys/dev: hpt27xx hptnr hptrr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Fri, 10 Feb 2017 15:18:43 -0000 Author: pfg Date: Fri Feb 10 15:18:41 2017 New Revision: 313554 URL: https://svnweb.freebsd.org/changeset/base/313554 Log: Clean redundant MIN/MAX declarations in some HighPoint drivers. The hpt27xx(4), hptnr(4), and hptrr(4) drivers declare MIN() and MAX() internally which match the macros from sys/param.h. MIN() is not used, MAX is only used once and can be replaced with the max() version in libkern.h which operates on u_ints. MFC after: 2 weeks Modified: head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c head/sys/dev/hpt27xx/ldm.h head/sys/dev/hptnr/hptnr_osm_bsd.c head/sys/dev/hptnr/ldm.h head/sys/dev/hptrr/hptrr_osm_bsd.c head/sys/dev/hptrr/ldm.h Modified: head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c ============================================================================== --- head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Fri Feb 10 15:03:54 2017 (r313553) +++ head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Fri Feb 10 15:18:41 2017 (r313554) @@ -297,7 +297,7 @@ static int hpt_flush_vdev(PVBUS_EXT vbus hpt_lock_vbus(vbus_ext); if (mIsArray(vd->type) && vd->u.array.transform) - count = MAX(vd->u.array.transform->source->cmds_per_request, + count = max(vd->u.array.transform->source->cmds_per_request, vd->u.array.transform->target->cmds_per_request); else count = vd->cmds_per_request; Modified: head/sys/dev/hpt27xx/ldm.h ============================================================================== --- head/sys/dev/hpt27xx/ldm.h Fri Feb 10 15:03:54 2017 (r313553) +++ head/sys/dev/hpt27xx/ldm.h Fri Feb 10 15:18:41 2017 (r313554) @@ -59,10 +59,6 @@ extern "C" { #error "Please redefine MAX_PARTITIONS_PER_DISK!!!" #endif -#define MAX(a,b) (((a)>(b))?(a):(b)) -#define MIN(a,b) (((a)<(b))?(a):(b)) - - typedef char check_HPT_TIME_is_unsigned[ (HPT_TIME)(-1) > 0 ? 1 : -1 ]; #define hpt_time_after_eq(a, b) ((int)(a) - (int)(b) >= 0) Modified: head/sys/dev/hptnr/hptnr_osm_bsd.c ============================================================================== --- head/sys/dev/hptnr/hptnr_osm_bsd.c Fri Feb 10 15:03:54 2017 (r313553) +++ head/sys/dev/hptnr/hptnr_osm_bsd.c Fri Feb 10 15:18:41 2017 (r313554) @@ -294,7 +294,7 @@ static int hpt_flush_vdev(PVBUS_EXT vbus hpt_assert_vbus_locked(vbus_ext); if (mIsArray(vd->type) && vd->u.array.transform) - count = MAX(vd->u.array.transform->source->cmds_per_request, + count = max(vd->u.array.transform->source->cmds_per_request, vd->u.array.transform->target->cmds_per_request); else count = vd->cmds_per_request; Modified: head/sys/dev/hptnr/ldm.h ============================================================================== --- head/sys/dev/hptnr/ldm.h Fri Feb 10 15:03:54 2017 (r313553) +++ head/sys/dev/hptnr/ldm.h Fri Feb 10 15:18:41 2017 (r313554) @@ -58,9 +58,6 @@ extern "C" { #error "Please redefine MAX_PARTITIONS_PER_DISK!!!" #endif -#define MAX(a,b) (((a)>(b))?(a):(b)) -#define MIN(a,b) (((a)<(b))?(a):(b)) - typedef char check_HPT_TIME_is_unsigned[ (HPT_TIME)(-1) > 0 ? 1 : -1 ]; Modified: head/sys/dev/hptrr/hptrr_osm_bsd.c ============================================================================== --- head/sys/dev/hptrr/hptrr_osm_bsd.c Fri Feb 10 15:03:54 2017 (r313553) +++ head/sys/dev/hptrr/hptrr_osm_bsd.c Fri Feb 10 15:18:41 2017 (r313554) @@ -300,7 +300,7 @@ static int hpt_flush_vdev(PVBUS_EXT vbus hpt_assert_vbus_locked(vbus_ext); if (mIsArray(vd->type) && vd->u.array.transform) - count = MAX(vd->u.array.transform->source->cmds_per_request, + count = max(vd->u.array.transform->source->cmds_per_request, vd->u.array.transform->target->cmds_per_request); else count = vd->cmds_per_request; Modified: head/sys/dev/hptrr/ldm.h ============================================================================== --- head/sys/dev/hptrr/ldm.h Fri Feb 10 15:03:54 2017 (r313553) +++ head/sys/dev/hptrr/ldm.h Fri Feb 10 15:18:41 2017 (r313554) @@ -58,10 +58,6 @@ extern "C" { #error "Please redefine MAX_PARTITIONS_PER_DISK!!!" #endif -#define MAX(a,b) (((a)>(b))?(a):(b)) -#define MIN(a,b) (((a)<(b))?(a):(b)) - - typedef char check_HPT_TIME_is_unsigned[ (HPT_TIME)(-1) > 0 ? 1 : -1 ]; #define hpt_time_after_eq(a, b) ((long)(a) - (long)(b) >= 0) From owner-svn-src-head@freebsd.org Fri Feb 10 15:22: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 D578CCD92C0; Fri, 10 Feb 2017 15:22:22 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A559D2B; Fri, 10 Feb 2017 15:22:22 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1AFMLx0022285; Fri, 10 Feb 2017 15:22:21 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1AFMLG7022279; Fri, 10 Feb 2017 15:22:21 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201702101522.v1AFMLG7022279@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 10 Feb 2017 15:22:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313555 - in head/sys/dev/mlx4: . mlx4_core X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Fri, 10 Feb 2017 15:22:22 -0000 Author: hselasky Date: Fri Feb 10 15:22:21 2017 New Revision: 313555 URL: https://svnweb.freebsd.org/changeset/base/313555 Log: Flexible and asymmetric allocation of EQs and MSI-X vectors for PF/VFs. Previously, the mlx4 driver queried the firmware in order to get the number of supported EQs. Under SRIOV, since this was done before the driver notified the firmware how many VFs it actually needs, the firmware had to take into account a worst case scenario and always allocated four EQs per VF, where one was used for events while the others were used for completions. Now, when the firmware supports the asymmetric allocation scheme, denoted by exposing num_sys_eqs > 0 (--> MLX4_DEV_CAP_FLAG2_SYS_EQS), we use the QUERY_FUNC command to query the firmware before enabling SRIOV. Thus we can get more EQs and MSI-X vectors per function. Moreover, when running in the new firmware/driver mode, the limitation that the number of EQs should be a power of two is lifted. Obtained from: Linux (dual BSD/GPLv2 licensed) Submitted by: Dexuan Cui @ microsoft . com Differential Revision: https://reviews.freebsd.org/D8867 MFC after: 2 weeks Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx4/device.h head/sys/dev/mlx4/mlx4_core/fw.h head/sys/dev/mlx4/mlx4_core/mlx4_eq.c head/sys/dev/mlx4/mlx4_core/mlx4_fw.c head/sys/dev/mlx4/mlx4_core/mlx4_main.c head/sys/dev/mlx4/mlx4_core/mlx4_profile.c Modified: head/sys/dev/mlx4/device.h ============================================================================== --- head/sys/dev/mlx4/device.h Fri Feb 10 15:18:41 2017 (r313554) +++ head/sys/dev/mlx4/device.h Fri Feb 10 15:22:21 2017 (r313555) @@ -199,6 +199,7 @@ enum { MLX4_DEV_CAP_FLAG2_EQE_STRIDE = 1LL << 23, MLX4_DEV_CAP_FLAG2_UPDATE_QP_SRC_CHECK_LB = 1LL << 24, MLX4_DEV_CAP_FLAG2_RX_CSUM_MODE = 1LL << 25, + MLX4_DEV_CAP_FLAG2_SYS_EQS = 1LL << 26, }; /* bit enums for an 8-bit flags field indicating special use @@ -473,6 +474,7 @@ struct mlx4_caps { int num_cqs; int max_cqes; int reserved_cqs; + int num_sys_eqs; int num_eqs; int reserved_eqs; int num_comp_vectors; Modified: head/sys/dev/mlx4/mlx4_core/fw.h ============================================================================== --- head/sys/dev/mlx4/mlx4_core/fw.h Fri Feb 10 15:18:41 2017 (r313554) +++ head/sys/dev/mlx4/mlx4_core/fw.h Fri Feb 10 15:22:21 2017 (r313555) @@ -56,6 +56,7 @@ struct mlx4_dev_cap { int max_mpts; int reserved_eqs; int max_eqs; + int num_sys_eqs; int reserved_mtts; int max_mrw_sz; int reserved_mrws; @@ -146,6 +147,16 @@ struct mlx4_func_cap { u8 def_counter_index; }; +struct mlx4_func { + int bus; + int device; + int function; + int physical_function; + int rsvd_eqs; + int max_eq; + int rsvd_uars; +}; + struct mlx4_adapter { u16 vsd_vendor_id; char board_id[MLX4_BOARD_ID_LEN]; @@ -173,6 +184,7 @@ struct mlx4_init_hca_param { u8 log_num_srqs; u8 log_num_cqs; u8 log_num_eqs; + u16 num_sys_eqs; u8 log_rd_per_qp; u8 log_mc_table_sz; u8 log_mpt_sz; @@ -225,6 +237,7 @@ int mlx4_map_cmd(struct mlx4_dev *dev, u int mlx4_SET_ICM_SIZE(struct mlx4_dev *dev, u64 icm_size, u64 *aux_pages); int mlx4_NOP(struct mlx4_dev *dev); int mlx4_MOD_STAT_CFG(struct mlx4_dev *dev, struct mlx4_mod_stat_cfg *cfg); +int mlx4_QUERY_FUNC(struct mlx4_dev *dev, struct mlx4_func *func, int slave); void mlx4_opreq_action(struct work_struct *work); #endif /* MLX4_FW_H */ Modified: head/sys/dev/mlx4/mlx4_core/mlx4_eq.c ============================================================================== --- head/sys/dev/mlx4/mlx4_core/mlx4_eq.c Fri Feb 10 15:18:41 2017 (r313554) +++ head/sys/dev/mlx4/mlx4_core/mlx4_eq.c Fri Feb 10 15:22:21 2017 (r313555) @@ -1136,8 +1136,12 @@ int mlx4_init_eq_table(struct mlx4_dev * goto err_out_free; } - err = mlx4_bitmap_init(&priv->eq_table.bitmap, dev->caps.num_eqs, - dev->caps.num_eqs - 1, dev->caps.reserved_eqs, 0); + err = mlx4_bitmap_init(&priv->eq_table.bitmap, + roundup_pow_of_two(dev->caps.num_eqs), + dev->caps.num_eqs - 1, + dev->caps.reserved_eqs, + roundup_pow_of_two(dev->caps.num_eqs) - + dev->caps.num_eqs); if (err) goto err_out_free; Modified: head/sys/dev/mlx4/mlx4_core/mlx4_fw.c ============================================================================== --- head/sys/dev/mlx4/mlx4_core/mlx4_fw.c Fri Feb 10 15:18:41 2017 (r313554) +++ head/sys/dev/mlx4/mlx4_core/mlx4_fw.c Fri Feb 10 15:22:21 2017 (r313555) @@ -179,6 +179,60 @@ int mlx4_MOD_STAT_CFG(struct mlx4_dev *d return err; } +int mlx4_QUERY_FUNC(struct mlx4_dev *dev, struct mlx4_func *func, int slave) +{ + struct mlx4_cmd_mailbox *mailbox; + u32 *outbox; + u8 in_modifier; + u8 field; + u16 field16; + int err; + +#define QUERY_FUNC_BUS_OFFSET 0x00 +#define QUERY_FUNC_DEVICE_OFFSET 0x01 +#define QUERY_FUNC_FUNCTION_OFFSET 0x01 +#define QUERY_FUNC_PHYSICAL_FUNCTION_OFFSET 0x03 +#define QUERY_FUNC_RSVD_EQS_OFFSET 0x04 +#define QUERY_FUNC_MAX_EQ_OFFSET 0x06 +#define QUERY_FUNC_RSVD_UARS_OFFSET 0x0b + + mailbox = mlx4_alloc_cmd_mailbox(dev); + if (IS_ERR(mailbox)) + return PTR_ERR(mailbox); + outbox = mailbox->buf; + + in_modifier = slave; + + err = mlx4_cmd_box(dev, 0, mailbox->dma, in_modifier, 0, + MLX4_CMD_QUERY_FUNC, + MLX4_CMD_TIME_CLASS_A, + MLX4_CMD_NATIVE); + if (err) + goto out; + + MLX4_GET(field, outbox, QUERY_FUNC_BUS_OFFSET); + func->bus = field & 0xf; + MLX4_GET(field, outbox, QUERY_FUNC_DEVICE_OFFSET); + func->device = field & 0xf1; + MLX4_GET(field, outbox, QUERY_FUNC_FUNCTION_OFFSET); + func->function = field & 0x7; + MLX4_GET(field, outbox, QUERY_FUNC_PHYSICAL_FUNCTION_OFFSET); + func->physical_function = field & 0xf; + MLX4_GET(field16, outbox, QUERY_FUNC_RSVD_EQS_OFFSET); + func->rsvd_eqs = field16 & 0xffff; + MLX4_GET(field16, outbox, QUERY_FUNC_MAX_EQ_OFFSET); + func->max_eq = field16 & 0xffff; + MLX4_GET(field, outbox, QUERY_FUNC_RSVD_UARS_OFFSET); + func->rsvd_uars = field & 0x0f; + + mlx4_dbg(dev, "Bus: %d, Device: %d, Function: %d, Physical function: %d, Max EQs: %d, Reserved EQs: %d, Reserved UARs: %d\n", + func->bus, func->device, func->function, func->physical_function, + func->max_eq, func->rsvd_eqs, func->rsvd_uars); +out: + mlx4_free_cmd_mailbox(dev, mailbox); + return err; +} + int mlx4_QUERY_FUNC_CAP_wrapper(struct mlx4_dev *dev, int slave, struct mlx4_vhcr *vhcr, struct mlx4_cmd_mailbox *inbox, @@ -189,6 +243,7 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m u8 field, port; u32 size; int err = 0; + struct mlx4_func func; #define QUERY_FUNC_CAP_FLAGS_OFFSET 0x0 #define QUERY_FUNC_CAP_NUM_PORTS_OFFSET 0x1 @@ -231,6 +286,7 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m #define QUERY_FUNC_CAP_PROPS_DEF_COUNTER 0x20 #define QUERY_FUNC_CAP_RDMA_PROPS_FORCE_PHY_WQE_GID 0x80 +#define QUERY_FUNC_CAP_SUPPORTS_NON_POWER_OF_2_NUM_EQS (1 << 31) if (vhcr->op_modifier == 1) { port = vhcr->in_modifier; /* phys-port = logical-port */ @@ -293,11 +349,24 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m size = dev->caps.num_cqs; MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_CQ_QUOTA_OFFSET_DEP); - size = dev->caps.num_eqs; - MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MAX_EQ_OFFSET); - - size = dev->caps.reserved_eqs; - MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_RESERVED_EQ_OFFSET); + if (!(dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS) || + mlx4_QUERY_FUNC(dev, &func, slave)) { + size = vhcr->in_modifier & + QUERY_FUNC_CAP_SUPPORTS_NON_POWER_OF_2_NUM_EQS ? + dev->caps.num_eqs : + rounddown_pow_of_two(dev->caps.num_eqs); + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MAX_EQ_OFFSET); + size = dev->caps.reserved_eqs; + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_RESERVED_EQ_OFFSET); + } else { + size = vhcr->in_modifier & + QUERY_FUNC_CAP_SUPPORTS_NON_POWER_OF_2_NUM_EQS ? + func.max_eq : + rounddown_pow_of_two(func.max_eq); + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MAX_EQ_OFFSET); + size = func.rsvd_eqs; + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_RESERVED_EQ_OFFSET); + } size = priv->mfunc.master.res_tracker.res_alloc[RES_MPT].quota[slave]; MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MPT_QUOTA_OFFSET); @@ -327,14 +396,17 @@ int mlx4_QUERY_FUNC_CAP(struct mlx4_dev u8 field, op_modifier; u32 size; int err = 0, quotas = 0; + u32 in_modifier; op_modifier = !!gen_or_port; /* 0 = general, 1 = logical port */ + in_modifier = op_modifier ? gen_or_port : + QUERY_FUNC_CAP_SUPPORTS_NON_POWER_OF_2_NUM_EQS; mailbox = mlx4_alloc_cmd_mailbox(dev); if (IS_ERR(mailbox)) return PTR_ERR(mailbox); - err = mlx4_cmd_box(dev, 0, mailbox->dma, gen_or_port, op_modifier, + err = mlx4_cmd_box(dev, 0, mailbox->dma, in_modifier, op_modifier, MLX4_CMD_QUERY_FUNC_CAP, MLX4_CMD_TIME_CLASS_A, MLX4_CMD_WRAPPED); if (err) @@ -504,6 +576,7 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev * #define QUERY_DEV_CAP_MAX_MRW_SZ_OFFSET 0x21 #define QUERY_DEV_CAP_RSVD_MRW_OFFSET 0x22 #define QUERY_DEV_CAP_MAX_MTT_SEG_OFFSET 0x23 +#define QUERY_DEV_CAP_NUM_SYS_EQ_OFFSET 0x26 #define QUERY_DEV_CAP_MAX_AV_OFFSET 0x27 #define QUERY_DEV_CAP_MAX_REQ_QP_OFFSET 0x29 #define QUERY_DEV_CAP_MAX_RES_QP_OFFSET 0x2b @@ -601,6 +674,8 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev * dev_cap->reserved_mrws = 1 << (field & 0xf); MLX4_GET(field, outbox, QUERY_DEV_CAP_MAX_MTT_SEG_OFFSET); dev_cap->max_mtt_seg = 1 << (field & 0x3f); + MLX4_GET(size, outbox, QUERY_DEV_CAP_NUM_SYS_EQ_OFFSET); + dev_cap->num_sys_eqs = size & 0xfff; MLX4_GET(field, outbox, QUERY_DEV_CAP_MAX_REQ_QP_OFFSET); dev_cap->max_requester_per_qp = 1 << (field & 0x3f); MLX4_GET(field, outbox, QUERY_DEV_CAP_MAX_RES_QP_OFFSET); @@ -827,8 +902,11 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev * * we can't use any EQs whose doorbell falls on that page, * even if the EQ itself isn't reserved. */ - dev_cap->reserved_eqs = max(dev_cap->reserved_uars * 4, - dev_cap->reserved_eqs); + if (dev_cap->num_sys_eqs == 0) + dev_cap->reserved_eqs = max(dev_cap->reserved_uars * 4, + dev_cap->reserved_eqs); + else + dev_cap->flags2 |= MLX4_DEV_CAP_FLAG2_SYS_EQS; mlx4_dbg(dev, "Max ICM size %lld MB\n", (unsigned long long) dev_cap->max_icm_sz >> 20); @@ -838,8 +916,9 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev * dev_cap->max_srqs, dev_cap->reserved_srqs, dev_cap->srq_entry_sz); mlx4_dbg(dev, "Max CQs: %d, reserved CQs: %d, entry size: %d\n", dev_cap->max_cqs, dev_cap->reserved_cqs, dev_cap->cqc_entry_sz); - mlx4_dbg(dev, "Max EQs: %d, reserved EQs: %d, entry size: %d\n", - dev_cap->max_eqs, dev_cap->reserved_eqs, dev_cap->eqc_entry_sz); + mlx4_dbg(dev, "Num sys EQs: %d, max EQs: %d, reserved EQs: %d, entry size: %d\n", + dev_cap->num_sys_eqs, dev_cap->max_eqs, dev_cap->reserved_eqs, + dev_cap->eqc_entry_sz); mlx4_dbg(dev, "reserved MPTs: %d, reserved MTTs: %d\n", dev_cap->reserved_mrws, dev_cap->reserved_mtts); mlx4_dbg(dev, "Max PDs: %d, reserved PDs: %d, reserved UARs: %d\n", @@ -1341,6 +1420,7 @@ int mlx4_INIT_HCA(struct mlx4_dev *dev, #define INIT_HCA_AUXC_BASE_OFFSET (INIT_HCA_QPC_OFFSET + 0x50) #define INIT_HCA_EQC_BASE_OFFSET (INIT_HCA_QPC_OFFSET + 0x60) #define INIT_HCA_LOG_EQ_OFFSET (INIT_HCA_QPC_OFFSET + 0x67) +#define INIT_HCA_NUM_SYS_EQS_OFFSET (INIT_HCA_QPC_OFFSET + 0x6a) #define INIT_HCA_RDMARC_BASE_OFFSET (INIT_HCA_QPC_OFFSET + 0x70) #define INIT_HCA_LOG_RD_OFFSET (INIT_HCA_QPC_OFFSET + 0x77) #define INIT_HCA_MCAST_OFFSET 0x0c0 @@ -1449,6 +1529,7 @@ int mlx4_INIT_HCA(struct mlx4_dev *dev, MLX4_PUT(inbox, param->auxc_base, INIT_HCA_AUXC_BASE_OFFSET); MLX4_PUT(inbox, param->eqc_base, INIT_HCA_EQC_BASE_OFFSET); MLX4_PUT(inbox, param->log_num_eqs, INIT_HCA_LOG_EQ_OFFSET); + MLX4_PUT(inbox, param->num_sys_eqs, INIT_HCA_NUM_SYS_EQS_OFFSET); MLX4_PUT(inbox, param->rdmarc_base, INIT_HCA_RDMARC_BASE_OFFSET); MLX4_PUT(inbox, param->log_rd_per_qp, INIT_HCA_LOG_RD_OFFSET); @@ -1555,6 +1636,7 @@ int mlx4_QUERY_HCA(struct mlx4_dev *dev, MLX4_GET(param->auxc_base, outbox, INIT_HCA_AUXC_BASE_OFFSET); MLX4_GET(param->eqc_base, outbox, INIT_HCA_EQC_BASE_OFFSET); MLX4_GET(param->log_num_eqs, outbox, INIT_HCA_LOG_EQ_OFFSET); + MLX4_GET(param->num_sys_eqs, outbox, INIT_HCA_NUM_SYS_EQS_OFFSET); MLX4_GET(param->rdmarc_base, outbox, INIT_HCA_RDMARC_BASE_OFFSET); MLX4_GET(param->log_rd_per_qp, outbox, INIT_HCA_LOG_RD_OFFSET); Modified: head/sys/dev/mlx4/mlx4_core/mlx4_main.c ============================================================================== --- head/sys/dev/mlx4/mlx4_core/mlx4_main.c Fri Feb 10 15:18:41 2017 (r313554) +++ head/sys/dev/mlx4/mlx4_core/mlx4_main.c Fri Feb 10 15:22:21 2017 (r313555) @@ -590,6 +590,29 @@ static void mlx4_set_port_mask(struct ml dev->caps.port_mask[i] = dev->caps.port_type[i]; } +enum { + MLX4_QUERY_FUNC_NUM_SYS_EQS = 1 << 0, +}; + +static int mlx4_query_func(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap) +{ + int err = 0; + struct mlx4_func func; + + if (dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS) { + err = mlx4_QUERY_FUNC(dev, &func, 0); + if (err) { + mlx4_err(dev, "QUERY_DEV_CAP command failed, aborting.\n"); + return err; + } + dev_cap->max_eqs = func.max_eq; + dev_cap->reserved_eqs = func.rsvd_eqs; + dev_cap->reserved_uars = func.rsvd_uars; + err |= MLX4_QUERY_FUNC_NUM_SYS_EQS; + } + return err; +} + static int mlx4_dev_cap(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap) { int err; @@ -623,7 +646,10 @@ static int mlx4_dev_cap(struct mlx4_dev } dev->caps.num_ports = dev_cap->num_ports; - dev->phys_caps.num_phys_eqs = MLX4_MAX_EQ_NUM; + dev->caps.num_sys_eqs = dev_cap->num_sys_eqs; + dev->phys_caps.num_phys_eqs = dev_cap->flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS ? + dev->caps.num_sys_eqs : + MLX4_MAX_EQ_NUM; for (i = 1; i <= dev->caps.num_ports; ++i) { dev->caps.vl_cap[i] = dev_cap->max_vl[i]; dev->caps.ib_mtu_cap[i] = dev_cap->ib_mtu[i]; @@ -1465,8 +1491,7 @@ static int mlx4_init_cmpt_table(struct m if (err) goto err_srq; - num_eqs = (mlx4_is_master(dev)) ? dev->phys_caps.num_phys_eqs : - dev->caps.num_eqs; + num_eqs = dev->phys_caps.num_phys_eqs; err = mlx4_init_icm_table(dev, &priv->eq_table.cmpt_table, cmpt_base + ((u64) (MLX4_CMPT_TYPE_EQ * @@ -1528,8 +1553,7 @@ static int mlx4_init_icm(struct mlx4_dev } - num_eqs = (mlx4_is_master(dev)) ? dev->phys_caps.num_phys_eqs : - dev->caps.num_eqs; + num_eqs = dev->phys_caps.num_phys_eqs; err = mlx4_init_icm_table(dev, &priv->eq_table.table, init_hca->eqc_base, dev_cap->eqc_entry_sz, num_eqs, num_eqs, 0, 0); @@ -2065,6 +2089,18 @@ static int mlx4_init_hca(struct mlx4_dev goto err_free_icm; } + if (dev_cap->flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS) { + err = mlx4_query_func(dev, dev_cap); + if (err < 0) { + mlx4_err(dev, "QUERY_FUNC command failed, aborting.\n"); + goto err_stop_fw; + } else if (err & MLX4_QUERY_FUNC_NUM_SYS_EQS) { + dev->caps.num_eqs = dev_cap->max_eqs; + dev->caps.reserved_eqs = dev_cap->reserved_eqs; + dev->caps.reserved_uars = dev_cap->reserved_uars; + } + } + /* * Read HCA frequency by QUERY_HCA command */ @@ -2905,13 +2941,12 @@ static void mlx4_enable_msi_x(struct mlx { struct mlx4_priv *priv = mlx4_priv(dev); struct msix_entry *entries; - int nreq = min_t(int, dev->caps.num_ports * - min_t(int, num_possible_cpus() + 1, MAX_MSIX_P_PORT) - + MSIX_LEGACY_SZ, MAX_MSIX); int err; int i; if (msi_x) { + int nreq = dev->caps.num_ports * num_online_cpus() + MSIX_LEGACY_SZ; + nreq = min_t(int, dev->caps.num_eqs - dev->caps.reserved_eqs, nreq); Modified: head/sys/dev/mlx4/mlx4_core/mlx4_profile.c ============================================================================== --- head/sys/dev/mlx4/mlx4_core/mlx4_profile.c Fri Feb 10 15:18:41 2017 (r313554) +++ head/sys/dev/mlx4/mlx4_core/mlx4_profile.c Fri Feb 10 15:22:21 2017 (r313555) @@ -199,10 +199,17 @@ u64 mlx4_make_profile(struct mlx4_dev *d init_hca->log_num_cqs = profile[i].log_num; break; case MLX4_RES_EQ: - dev->caps.num_eqs = roundup_pow_of_two(min_t(unsigned, dev_cap->max_eqs, - MAX_MSIX)); - init_hca->eqc_base = profile[i].start; - init_hca->log_num_eqs = ilog2(dev->caps.num_eqs); + if (dev_cap->flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS) { + init_hca->log_num_eqs = 0x1f; + init_hca->eqc_base = profile[i].start; + init_hca->num_sys_eqs = dev_cap->num_sys_eqs; + } else { + dev->caps.num_eqs = roundup_pow_of_two( + min_t(unsigned, + dev_cap->max_eqs, MAX_MSIX)); + init_hca->eqc_base = profile[i].start; + init_hca->log_num_eqs = ilog2(dev->caps.num_eqs); + } break; case MLX4_RES_DMPT: dev->caps.num_mpts = profile[i].num; From owner-svn-src-head@freebsd.org Fri Feb 10 15:28: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 CA379CD93D7; Fri, 10 Feb 2017 15:28:20 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8069F114F; Fri, 10 Feb 2017 15:28:20 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1AFSJ1p022567; Fri, 10 Feb 2017 15:28:19 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1AFSJUm022561; Fri, 10 Feb 2017 15:28:19 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201702101528.v1AFSJUm022561@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 10 Feb 2017 15:28:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313556 - in head/sys/dev/mlx4: . mlx4_core X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Fri, 10 Feb 2017 15:28:20 -0000 Author: hselasky Date: Fri Feb 10 15:28:18 2017 New Revision: 313556 URL: https://svnweb.freebsd.org/changeset/base/313556 Log: Change mlx4 QP allocation scheme. When using Blue-Flame, BF, the QPN overrides the VLAN, CV, and SV fields in the WQE. Thus, BF may only be used for QPNs with bits 6,7 unset. The current ethernet driver code reserves a TX QP range with 256b alignment. This is wrong because if there are more than 64 TX QPs in use, QPNs >= base + 65 will have bits 6/7 set. This problem is not specific for the Ethernet driver, any entity that tries to reserve more than 64 BF-enabled QPs should fail. Also, using ranges is not necessary here and is wasteful. The new mechanism introduced here will support reservation for "Eth QPs eligible for BF" for all drivers: bare-metal, multi-PF, and VFs (when hypervisors support WC in VMs). The flow we use is: 1. In mlx4_en, allocate Tx QPs one by one instead of a range allocation, and request "BF enabled QPs" if BF is supported for the function 2. In the ALLOC_RES FW command, change param1 to: a. param1[23:0] - number of QPs b. param1[31-24] - flags controlling QPs reservation Bit 31 refers to Eth blueflame supported QPs. Those QPs must have bits 6 and 7 unset in order to be used in Ethernet. Bits 24-30 of the flags are currently reserved. When a function tries to allocate a QP, it states the required attributes for this QP. Those attributes are considered "best-effort". If an attribute, such as Ethernet BF enabled QP, is a must-have attribute, the function has to check that attribute is supported before trying to do the allocation. In a lower layer of the code, mlx4_qp_reserve_range masks out the bits which are unsupported. If SRIOV is used, the PF validates those attributes and masks out unsupported attributes as well. In order to notify VFs which attributes are supported, the VF uses QUERY_FUNC_CAP command. This command's mailbox is filled by the PF, which notifies which QP allocation attributes it supports. Obtained from: Linux (dual BSD/GPLv2 licensed) Submitted by: Dexuan Cui @ microsoft . com Differential Revision: https://reviews.freebsd.org/D8868 MFC after: 2 weeks Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx4/device.h head/sys/dev/mlx4/mlx4_core/fw.h head/sys/dev/mlx4/mlx4_core/mlx4_fw.c head/sys/dev/mlx4/mlx4_core/mlx4_main.c head/sys/dev/mlx4/mlx4_core/mlx4_qp.c head/sys/dev/mlx4/mlx4_core/mlx4_resource_tracker.c Modified: head/sys/dev/mlx4/device.h ============================================================================== --- head/sys/dev/mlx4/device.h Fri Feb 10 15:22:21 2017 (r313555) +++ head/sys/dev/mlx4/device.h Fri Feb 10 15:28:18 2017 (r313556) @@ -219,6 +219,23 @@ enum { }; enum { + MLX4_QUERY_FUNC_FLAGS_BF_RES_QP = 1LL << 0 +}; + +/* bit enums for an 8-bit flags field indicating special use + * QPs which require special handling in qp_reserve_range. + * Currently, this only includes QPs used by the ETH interface, + * where we expect to use blueflame. These QPs must not have + * bits 6 and 7 set in their qp number. + * + * This enum may use only bits 0..7. + */ +enum { + MLX4_RESERVE_ETH_BF_QP = 1 << 7, +}; + + +enum { MLX4_DEV_CAP_64B_EQE_ENABLED = 1LL << 0, MLX4_DEV_CAP_64B_CQE_ENABLED = 1LL << 1 }; @@ -533,6 +550,7 @@ struct mlx4_caps { u32 max_basic_counters; u32 max_extended_counters; u8 def_counter_index[MLX4_MAX_PORTS + 1]; + u8 alloc_res_qp_mask; }; struct mlx4_buf_list { Modified: head/sys/dev/mlx4/mlx4_core/fw.h ============================================================================== --- head/sys/dev/mlx4/mlx4_core/fw.h Fri Feb 10 15:22:21 2017 (r313555) +++ head/sys/dev/mlx4/mlx4_core/fw.h Fri Feb 10 15:28:18 2017 (r313556) @@ -145,6 +145,7 @@ struct mlx4_func_cap { u8 physical_port; u8 port_flags; u8 def_counter_index; + u8 extra_flags; }; struct mlx4_func { Modified: head/sys/dev/mlx4/mlx4_core/mlx4_fw.c ============================================================================== --- head/sys/dev/mlx4/mlx4_core/mlx4_fw.c Fri Feb 10 15:22:21 2017 (r313555) +++ head/sys/dev/mlx4/mlx4_core/mlx4_fw.c Fri Feb 10 15:28:18 2017 (r313556) @@ -265,10 +265,15 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m #define QUERY_FUNC_CAP_MTT_QUOTA_OFFSET 0x64 #define QUERY_FUNC_CAP_MCG_QUOTA_OFFSET 0x68 +#define QUERY_FUNC_CAP_EXTRA_FLAGS_OFFSET 0x6c + #define QUERY_FUNC_CAP_FMR_FLAG 0x80 #define QUERY_FUNC_CAP_FLAG_RDMA 0x40 #define QUERY_FUNC_CAP_FLAG_ETH 0x80 #define QUERY_FUNC_CAP_FLAG_QUOTAS 0x10 +#define QUERY_FUNC_CAP_FLAG_VALID_MAILBOX 0x04 + +#define QUERY_FUNC_CAP_EXTRA_FLAGS_BF_QP_ALLOC_FLAG (1UL << 31) /* when opcode modifier = 1 */ #define QUERY_FUNC_CAP_PHYS_PORT_OFFSET 0x3 @@ -322,7 +327,7 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m } else if (vhcr->op_modifier == 0) { /* enable rdma and ethernet interfaces, and new quota locations */ field = (QUERY_FUNC_CAP_FLAG_ETH | QUERY_FUNC_CAP_FLAG_RDMA | - QUERY_FUNC_CAP_FLAG_QUOTAS); + QUERY_FUNC_CAP_FLAG_QUOTAS | QUERY_FUNC_CAP_FLAG_VALID_MAILBOX); MLX4_PUT(outbox->buf, field, QUERY_FUNC_CAP_FLAGS_OFFSET); field = dev->caps.num_ports; @@ -382,6 +387,8 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MCG_QUOTA_OFFSET); MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MCG_QUOTA_OFFSET_DEP); + size = QUERY_FUNC_CAP_EXTRA_FLAGS_BF_QP_ALLOC_FLAG; + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_EXTRA_FLAGS_OFFSET); } else err = -EINVAL; @@ -474,6 +481,17 @@ int mlx4_QUERY_FUNC_CAP(struct mlx4_dev MLX4_GET(size, outbox, QUERY_FUNC_CAP_RESERVED_EQ_OFFSET); func_cap->reserved_eq = size & 0xFFFFFF; + func_cap->extra_flags = 0; + + /* Mailbox data from 0x6c and onward should only be treated if + * QUERY_FUNC_CAP_FLAG_VALID_MAILBOX is set in func_cap->flags + */ + if (func_cap->flags & QUERY_FUNC_CAP_FLAG_VALID_MAILBOX) { + MLX4_GET(size, outbox, QUERY_FUNC_CAP_EXTRA_FLAGS_OFFSET); + if (size & QUERY_FUNC_CAP_EXTRA_FLAGS_BF_QP_ALLOC_FLAG) + func_cap->extra_flags |= MLX4_QUERY_FUNC_FLAGS_BF_RES_QP; + } + goto out; } Modified: head/sys/dev/mlx4/mlx4_core/mlx4_main.c ============================================================================== --- head/sys/dev/mlx4/mlx4_core/mlx4_main.c Fri Feb 10 15:22:21 2017 (r313555) +++ head/sys/dev/mlx4/mlx4_core/mlx4_main.c Fri Feb 10 15:28:18 2017 (r313556) @@ -849,6 +849,11 @@ static int mlx4_dev_cap(struct mlx4_dev if (!mlx4_is_slave(dev)) { for (i = 0; i < dev->caps.num_ports; ++i) dev->caps.def_counter_index[i] = i << 1; + + dev->caps.alloc_res_qp_mask = + (dev->caps.bf_reg_size ? MLX4_RESERVE_ETH_BF_QP : 0); + } else { + dev->caps.alloc_res_qp_mask = 0; } return 0; @@ -1114,6 +1119,10 @@ static int mlx4_slave_cap(struct mlx4_de slave_adjust_steering_mode(dev, &dev_cap, &hca_param); + if (func_cap.extra_flags & MLX4_QUERY_FUNC_FLAGS_BF_RES_QP && + dev->caps.bf_reg_size) + dev->caps.alloc_res_qp_mask |= MLX4_RESERVE_ETH_BF_QP; + return 0; err_mem: Modified: head/sys/dev/mlx4/mlx4_core/mlx4_qp.c ============================================================================== --- head/sys/dev/mlx4/mlx4_core/mlx4_qp.c Fri Feb 10 15:22:21 2017 (r313555) +++ head/sys/dev/mlx4/mlx4_core/mlx4_qp.c Fri Feb 10 15:28:18 2017 (r313556) @@ -242,6 +242,9 @@ int mlx4_qp_reserve_range(struct mlx4_de u64 out_param; int err; + /* Turn off all unsupported QP allocation flags */ + flags &= dev->caps.alloc_res_qp_mask; + if (mlx4_is_mfunc(dev)) { set_param_l(&in_param, (((u32) flags) << 24) | (u32) cnt); set_param_h(&in_param, align); Modified: head/sys/dev/mlx4/mlx4_core/mlx4_resource_tracker.c ============================================================================== --- head/sys/dev/mlx4/mlx4_core/mlx4_resource_tracker.c Fri Feb 10 15:22:21 2017 (r313555) +++ head/sys/dev/mlx4/mlx4_core/mlx4_resource_tracker.c Fri Feb 10 15:28:18 2017 (r313556) @@ -1544,7 +1544,10 @@ static int qp_alloc_res(struct mlx4_dev switch (op) { case RES_OP_RESERVE: count = get_param_l(&in_param) & 0xffffff; - flags = get_param_l(&in_param) >> 24; + /* Turn off all unsupported QP allocation flags that the + * slave tries to set. + */ + flags = (get_param_l(&in_param) >> 24) & dev->caps.alloc_res_qp_mask; align = get_param_h(&in_param); err = mlx4_grant_resource(dev, slave, RES_QP, count, 0); if (err) From owner-svn-src-head@freebsd.org Fri Feb 10 16:06: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 B9A2BCD94CF; Fri, 10 Feb 2017 16:06:15 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86DF2109; Fri, 10 Feb 2017 16:06:15 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1AG6EQH040002; Fri, 10 Feb 2017 16:06:14 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1AG6EEh040001; Fri, 10 Feb 2017 16:06:14 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201702101606.v1AG6EEh040001@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Fri, 10 Feb 2017 16:06:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313557 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Fri, 10 Feb 2017 16:06:15 -0000 Author: bz Date: Fri Feb 10 16:06:14 2017 New Revision: 313557 URL: https://svnweb.freebsd.org/changeset/base/313557 Log: Allow Dtrace to be compiled into the kernel again after r313177. MFC after: 1 week Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Fri Feb 10 15:28:18 2017 (r313556) +++ head/sys/conf/files Fri Feb 10 16:06:14 2017 (r313557) @@ -268,6 +268,7 @@ cddl/contrib/opensolaris/uts/common/zmod # dtrace specific cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c optional dtrace compile-with "${DTRACE_C}" \ warning "kernel contains CDDL licensed DTRACE" +cddl/contrib/opensolaris/uts/common/dtrace/dtrace_xoroshiro128_plus.c optional dtrace compile-with "${DTRACE_C}" cddl/dev/dtmalloc/dtmalloc.c optional dtmalloc | dtraceall compile-with "${CDDL_C}" cddl/dev/profile/profile.c optional dtrace_profile | dtraceall compile-with "${CDDL_C}" cddl/dev/sdt/sdt.c optional dtrace_sdt | dtraceall compile-with "${CDDL_C}" From owner-svn-src-head@freebsd.org Fri Feb 10 17:34: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 C6D89CD83C6; Fri, 10 Feb 2017 17:34:49 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B35037A; Fri, 10 Feb 2017 17:34:49 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1AHYmPJ077448; Fri, 10 Feb 2017 17:34:48 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1AHYmxC077447; Fri, 10 Feb 2017 17:34:48 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201702101734.v1AHYmxC077447@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 10 Feb 2017 17:34:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313559 - head/contrib/compiler-rt/lib/sanitizer_common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Fri, 10 Feb 2017 17:34:49 -0000 Author: glebius Date: Fri Feb 10 17:34:48 2017 New Revision: 313559 URL: https://svnweb.freebsd.org/changeset/base/313559 Log: Don't check struct rtentry on FreeBSD, it is an internal kernel structure. On other systems it may be API structure for SIOCADDRT/SIOCDELRT. Reviewed by: emaste, dim Modified: head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc Modified: head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc ============================================================================== --- head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc Fri Feb 10 16:11:11 2017 (r313558) +++ head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc Fri Feb 10 17:34:48 2017 (r313559) @@ -23,11 +23,6 @@ #ifdef _FILE_OFFSET_BITS #undef _FILE_OFFSET_BITS #endif -#if SANITIZER_FREEBSD -#define _WANT_RTENTRY -#include -#include -#endif #include #include #include @@ -422,6 +417,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El unsigned struct_input_absinfo_sz = sizeof(struct input_absinfo); unsigned struct_input_id_sz = sizeof(struct input_id); unsigned struct_mtpos_sz = sizeof(struct mtpos); + unsigned struct_rtentry_sz = sizeof(struct rtentry); unsigned struct_termio_sz = sizeof(struct termio); unsigned struct_vt_consize_sz = sizeof(struct vt_consize); unsigned struct_vt_sizes_sz = sizeof(struct vt_sizes); @@ -441,7 +437,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El unsigned struct_midi_info_sz = sizeof(struct midi_info); unsigned struct_mtget_sz = sizeof(struct mtget); unsigned struct_mtop_sz = sizeof(struct mtop); - unsigned struct_rtentry_sz = sizeof(struct rtentry); unsigned struct_sbi_instrument_sz = sizeof(struct sbi_instrument); unsigned struct_seq_event_rec_sz = sizeof(struct seq_event_rec); unsigned struct_synth_info_sz = sizeof(struct synth_info); From owner-svn-src-head@freebsd.org Fri Feb 10 17:37: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 E5B2BCD8492; Fri, 10 Feb 2017 17:37:05 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2D8878A; Fri, 10 Feb 2017 17:37:05 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1AHb4a2077599; Fri, 10 Feb 2017 17:37:04 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1AHb4Qg077598; Fri, 10 Feb 2017 17:37:04 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201702101737.v1AHb4Qg077598@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 10 Feb 2017 17:37:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313560 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Fri, 10 Feb 2017 17:37:06 -0000 Author: glebius Date: Fri Feb 10 17:37:04 2017 New Revision: 313560 URL: https://svnweb.freebsd.org/changeset/base/313560 Log: Last consumer of _WANT_RTENTRY gone. Modified: head/sys/net/route.h Modified: head/sys/net/route.h ============================================================================== --- head/sys/net/route.h Fri Feb 10 17:34:48 2017 (r313559) +++ head/sys/net/route.h Fri Feb 10 17:37:04 2017 (r313560) @@ -135,7 +135,7 @@ VNET_DECLARE(u_int, rt_add_addr_allfibs) #endif #endif -#if defined(_KERNEL) || defined(_WANT_RTENTRY) +#if defined(_KERNEL) struct rtentry { struct radix_node rt_nodes[2]; /* tree glue, and other values */ /* @@ -159,7 +159,7 @@ struct rtentry { struct mtx rt_mtx; /* mutex for routing entry */ struct rtentry *rt_chain; /* pointer to next rtentry to delete */ }; -#endif /* _KERNEL || _WANT_RTENTRY */ +#endif /* _KERNEL */ #define RTF_UP 0x1 /* route usable */ #define RTF_GATEWAY 0x2 /* destination is a gateway */ From owner-svn-src-head@freebsd.org Fri Feb 10 17:46: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 DD134CD8859; Fri, 10 Feb 2017 17:46:27 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA25BD98; Fri, 10 Feb 2017 17:46:27 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1AHkQJG081792; Fri, 10 Feb 2017 17:46:26 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1AHkQLs081790; Fri, 10 Feb 2017 17:46:26 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201702101746.v1AHkQLs081790@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 10 Feb 2017 17:46:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313561 - in head/sys: netinet netipsec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Fri, 10 Feb 2017 17:46:28 -0000 Author: glebius Date: Fri Feb 10 17:46:26 2017 New Revision: 313561 URL: https://svnweb.freebsd.org/changeset/base/313561 Log: Move tcp_fields_to_net() static inline into tcp_var.h, just below its friend tcp_fields_to_host(). There is third party code that also uses this inline. Reviewed by: ae Modified: head/sys/netinet/tcp_var.h head/sys/netipsec/xform_tcp.c Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Fri Feb 10 17:37:04 2017 (r313560) +++ head/sys/netinet/tcp_var.h Fri Feb 10 17:46:26 2017 (r313561) @@ -863,6 +863,15 @@ tcp_fields_to_host(struct tcphdr *th) th->th_urp = ntohs(th->th_urp); } +static inline void +tcp_fields_to_net(struct tcphdr *th) +{ + + th->th_seq = htonl(th->th_seq); + th->th_ack = htonl(th->th_ack); + th->th_win = htons(th->th_win); + th->th_urp = htons(th->th_urp); +} #endif /* _KERNEL */ #endif /* _NETINET_TCP_VAR_H_ */ Modified: head/sys/netipsec/xform_tcp.c ============================================================================== --- head/sys/netipsec/xform_tcp.c Fri Feb 10 17:37:04 2017 (r313560) +++ head/sys/netipsec/xform_tcp.c Fri Feb 10 17:46:26 2017 (r313561) @@ -72,16 +72,6 @@ __FBSDID("$FreeBSD$"); #define TCP_KEYLEN_MIN 1 /* minimum length of TCP-MD5 key */ #define TCP_KEYLEN_MAX 80 /* maximum length of TCP-MD5 key */ -static inline void -tcp_fields_to_net(struct tcphdr *th) -{ - - th->th_seq = htonl(th->th_seq); - th->th_ack = htonl(th->th_ack); - th->th_win = htons(th->th_win); - th->th_urp = htons(th->th_urp); -} - static int tcp_ipsec_pcbctl(struct inpcb *inp, struct sockopt *sopt) { From owner-svn-src-head@freebsd.org Fri Feb 10 17:56: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 535F9CD8B9A; Fri, 10 Feb 2017 17:56:12 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 3D87514B4; Fri, 10 Feb 2017 17:56:11 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id v1AHuABp027789 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 10 Feb 2017 09:56:10 -0800 (PST) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v1AHuAup027788; Fri, 10 Feb 2017 09:56:10 -0800 (PST) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 10 Feb 2017 09:56:10 -0800 From: Gleb Smirnoff To: Jilles Tjoelker Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313174 - in head: lib/libc/sys share/man/man4 Message-ID: <20170210175610.GF1973@FreeBSD.org> References: <201702032033.v13KXNhI072385@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201702032033.v13KXNhI072385@repo.freebsd.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-BeenThere: svn-src-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: Fri, 10 Feb 2017 17:56:12 -0000 On Fri, Feb 03, 2017 at 08:33:23PM +0000, Jilles Tjoelker wrote: J> Author: jilles J> Date: Fri Feb 3 20:33:23 2017 J> New Revision: 313174 J> URL: https://svnweb.freebsd.org/changeset/base/313174 J> J> Log: J> Clean up documentation of AF_UNIX control messages. J> J> Document AF_UNIX control messages in unix(4) only, not split between unix(4) J> and recv(2). Thanks a lot! This split was always irritating. -- Totus tuus, Glebius. From owner-svn-src-head@freebsd.org Fri Feb 10 19:11: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 3CF4CCD9E89; Fri, 10 Feb 2017 19:11:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 01B291E42; Fri, 10 Feb 2017 19:11:34 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1AJBYfp017084; Fri, 10 Feb 2017 19:11:34 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1AJBYOt017083; Fri, 10 Feb 2017 19:11:34 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201702101911.v1AJBYOt017083@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 10 Feb 2017 19:11:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313562 - head/usr.sbin/kldxref X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Fri, 10 Feb 2017 19:11:35 -0000 Author: emaste Date: Fri Feb 10 19:11:33 2017 New Revision: 313562 URL: https://svnweb.freebsd.org/changeset/base/313562 Log: kldxref: s/sections/segments/ in warning message The message refers to program header segments, not sections. PR: 216975 Modified: head/usr.sbin/kldxref/ef.c Modified: head/usr.sbin/kldxref/ef.c ============================================================================== --- head/usr.sbin/kldxref/ef.c Fri Feb 10 17:46:26 2017 (r313561) +++ head/usr.sbin/kldxref/ef.c Fri Feb 10 19:11:33 2017 (r313562) @@ -600,7 +600,7 @@ ef_open(const char *filename, struct elf filename); break; } else if (nsegs > MAXSEGS) { - warnx("%s: too many sections", filename); + warnx("%s: too many segments", filename); break; } ef->ef_nsegs = nsegs; From owner-svn-src-head@freebsd.org Fri Feb 10 19:17: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 7031DCD90A4; Fri, 10 Feb 2017 19:17:11 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3FC302DF; Fri, 10 Feb 2017 19:17:11 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1AJHA7N018757; Fri, 10 Feb 2017 19:17:10 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1AJHAYt018756; Fri, 10 Feb 2017 19:17:10 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201702101917.v1AJHAYt018756@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 10 Feb 2017 19:17:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313563 - head/usr.sbin/kldxref X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Fri, 10 Feb 2017 19:17:11 -0000 Author: emaste Date: Fri Feb 10 19:17:10 2017 New Revision: 313563 URL: https://svnweb.freebsd.org/changeset/base/313563 Log: kldxref: bump MAXSEGS to 3 ld.bfd generates two PT_LOAD segments, but certain linkers or linker configurations generate three PT_LOAD segments (one additional for RELRO). PR: 216975 Reported by: Shawn Webb MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/kldxref/ef.c Modified: head/usr.sbin/kldxref/ef.c ============================================================================== --- head/usr.sbin/kldxref/ef.c Fri Feb 10 19:11:33 2017 (r313562) +++ head/usr.sbin/kldxref/ef.c Fri Feb 10 19:17:10 2017 (r313563) @@ -47,7 +47,7 @@ #include "ef.h" -#define MAXSEGS 2 +#define MAXSEGS 3 struct ef_file { char* ef_name; struct elf_file *ef_efile; From owner-svn-src-head@freebsd.org Fri Feb 10 19:25:53 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 6D7D7CD96FF; Fri, 10 Feb 2017 19:25:53 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2BA9BC58; Fri, 10 Feb 2017 19:25:53 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1AJPqOj022903; Fri, 10 Feb 2017 19:25:52 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1AJPqhR022902; Fri, 10 Feb 2017 19:25:52 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201702101925.v1AJPqhR022902@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 10 Feb 2017 19:25:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313564 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Fri, 10 Feb 2017 19:25:53 -0000 Author: jhb Date: Fri Feb 10 19:25:52 2017 New Revision: 313564 URL: https://svnweb.freebsd.org/changeset/base/313564 Log: Drop the "created from" line from files generated by makesyscalls.sh. This information is less useful when the generated files are included in source control along with the source. If needed it can be reconstructed from the $FreeBSD$ tag in the generated file. Removing this information from the generated output permits committing the generated files along with the change to the system call master list without having inconsistent metadata in the generated files. Reviewed by: emaste, kib MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D9497 Modified: head/sys/kern/makesyscalls.sh Modified: head/sys/kern/makesyscalls.sh ============================================================================== --- head/sys/kern/makesyscalls.sh Fri Feb 10 19:17:10 2017 (r313563) +++ head/sys/kern/makesyscalls.sh Fri Feb 10 19:25:52 2017 (r313564) @@ -119,10 +119,12 @@ sed -e ' printf "/*\n * System call switch table.\n *\n" > syssw printf " * DO NOT EDIT-- this file is automatically generated.\n" > syssw printf " * $%s$\n", "FreeBSD" > syssw + printf " */\n\n" > syssw printf "/*\n * System call prototypes.\n *\n" > sysarg printf " * DO NOT EDIT-- this file is automatically generated.\n" > sysarg printf " * $%s$\n", "FreeBSD" > sysarg + printf " */\n\n" > sysarg printf "\n#ifdef %s\n\n", compat > syscompat printf "\n#ifdef %s\n\n", compat4 > syscompat4 @@ -133,10 +135,13 @@ sed -e ' printf "/*\n * System call names.\n *\n" > sysnames printf " * DO NOT EDIT-- this file is automatically generated.\n" > sysnames printf " * $%s$\n", "FreeBSD" > sysnames + printf " */\n\n" > sysnames printf "/*\n * System call numbers.\n *\n" > syshdr printf " * DO NOT EDIT-- this file is automatically generated.\n" > syshdr printf " * $%s$\n", "FreeBSD" > syshdr + printf " */\n\n" > syshdr + printf "# FreeBSD system call object files.\n" > sysmk printf "# DO NOT EDIT-- this file is automatically generated.\n" > sysmk printf "# $%s$\n", "FreeBSD" > sysmk @@ -146,15 +151,9 @@ sed -e ' printf " * $%s$\n", "FreeBSD" > systrace } NR == 1 { - gsub("[$]FreeBSD: ", "FreeBSD: ", $0) - gsub(" [$]", "", $0) - - printf " * created from%s\n */\n\n", $0 > syssw - printf "\n/* The casts are bogus but will do for now. */\n" > sysent printf "struct sysent %s[] = {\n",switchname > sysent - printf " * created from%s\n */\n\n", $0 > sysarg printf "#ifndef %s\n", sysproto_h > sysarg printf "#define\t%s\n\n", sysproto_h > sysarg printf "#include \n" > sysarg @@ -177,12 +176,9 @@ sed -e ' printf "#define\tPADR_(t)\t0\n" > sysarg printf "#endif\n\n" > sysarg - printf " * created from%s\n */\n\n", $0 > sysnames printf "const char *%s[] = {\n", namesname > sysnames - printf " * created from%s\n */\n\n", $0 > syshdr - - printf "# created from%s\nMIASM = ", $0 > sysmk + printf "MIASM = " > sysmk printf " * This file is part of the DTrace syscall provider.\n */\n\n" > systrace printf "static void\nsystrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)\n{\n" > systrace From owner-svn-src-head@freebsd.org Fri Feb 10 19:31: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 BA278CD9819; Fri, 10 Feb 2017 19:31:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87607F0C; Fri, 10 Feb 2017 19:31:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1AJV9VT024016; Fri, 10 Feb 2017 19:31:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1AJV9Z1024015; Fri, 10 Feb 2017 19:31:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702101931.v1AJV9Z1024015@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 10 Feb 2017 19:31:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313565 - head/tests/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Fri, 10 Feb 2017 19:31:10 -0000 Author: ngie Date: Fri Feb 10 19:31:09 2017 New Revision: 313565 URL: https://svnweb.freebsd.org/changeset/base/313565 Log: Expect :mmap__bad_arguments to fail Some recent changes to vm related to mmap(2) have broken the prot checks that would result with an EINVAL with this case I suspect r313352 is the root-cause the issue PR: 216976 Sponsored by: Dell EMC Isilon Modified: head/tests/sys/vm/mmap_test.c Modified: head/tests/sys/vm/mmap_test.c ============================================================================== --- head/tests/sys/vm/mmap_test.c Fri Feb 10 19:25:52 2017 (r313564) +++ head/tests/sys/vm/mmap_test.c Fri Feb 10 19:31:09 2017 (r313565) @@ -134,6 +134,8 @@ ATF_TC_BODY(mmap__bad_arguments, tc) checked_mmap(PROT_READ, MAP_SHARED, devstatfd, 0, "simple /dev/devstat shared"); + atf_tc_expect_fail("extra PROT flags check fails due to recent mmap(2) changes; bug # 216976"); + /* Extra PROT flags. */ checked_mmap(PROT_READ | PROT_WRITE | 0x100000, MAP_ANON, -1, EINVAL, "MAP_ANON with extra PROT flags"); From owner-svn-src-head@freebsd.org Fri Feb 10 19:36: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 C3CFBCD9AD1; Fri, 10 Feb 2017 19:36:28 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x242.google.com (mail-pg0-x242.google.com [IPv6:2607:f8b0:400e:c05::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8BA1A15C4; Fri, 10 Feb 2017 19:36:28 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x242.google.com with SMTP id 194so3780850pgd.0; Fri, 10 Feb 2017 11:36:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=/DRwD5+Hdsr5+qCfNi9FmT6xfMxOJNrnJOFGZCdoaAg=; b=YMPnhRUqF9zqq29Oyv42EQwtMadnRTAVmvzZ1F0iFb1zl9j2sJmDtMiyWgis5fwAt4 efrdAs7ZdGJsgST/P4xd6jVEOXxq90TTOqzji02kXSFbve4FiiRJ906EJ7oxCgaQ6Y7u SLsihOSqKXlv3vEplMJGnW4HlzfVqYkblUgB8BJMF6Gqe6aunfahB6rZd7ICiByiCaJ8 JUzNwJ+loYFJxSxd/92G0b8+5nthuGyQg1XE0tizCEUGysNqfD+K/K8s3iJGQRa80omg t07bBP/d4YXOu98Pp+OE9ejCxT+K9NAfkxihcdnCjvlplc5p3dRrcgdt6opRef6AMEeu ex8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=/DRwD5+Hdsr5+qCfNi9FmT6xfMxOJNrnJOFGZCdoaAg=; b=GUXzDqbCzUko9P6GypGQ9n825KtUM6+5v5qP2OP4xdwFCoJHsevNVvmwVj+N9lxupK rU7KFE8R+LZHHHsZkk6uEQcTQYaOnTKdtcHNA1oe2jssxw5lZjRtjtWrJSt745mAlcFF RwRqGtI35mmQBXtzTpkLvDOS2E9IUFRi9SBTLFxA/0s3L+h1D7xjHPkgkrk/5lQccraT 7gdnYHAVX1b0g5HvXiVlALvYw1299I+OwXGuP6w3icSs61vCHVVSjfFuyU2WUikAwjI7 9Q0CJ81j4s0QriCEIG1FJXMBmT6l6DQiQsBNWI54RhjcOKVf0iEK9ARZ4fydLyQehTmr vMrw== X-Gm-Message-State: AMke39kKnki/JlrnOMjf4YfdJVfLPAdacntvHjHoYuLoqRDDst7Bf16qynsoTSkXYRZV/Q== X-Received: by 10.84.133.1 with SMTP id 1mr13492907plf.151.1486755387860; Fri, 10 Feb 2017 11:36:27 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id p4sm864608pgd.50.2017.02.10.11.36.26 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 10 Feb 2017 11:36:27 -0800 (PST) Subject: Re: svn commit: r313352 - in head/sys: compat/cloudabi compat/freebsd32 compat/linux vm Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_7FEF837F-493B-4404-BAE6-A6BB2776FC4C"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201702062057.v16KvCtI069664@repo.freebsd.org> Date: Fri, 10 Feb 2017 11:36:25 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <2ACAB759-1162-4401-9B29-EE5A33F13AD6@gmail.com> References: <201702062057.v16KvCtI069664@repo.freebsd.org> To: Edward Tomasz Napierala X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-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: Fri, 10 Feb 2017 19:36:28 -0000 --Apple-Mail=_7FEF837F-493B-4404-BAE6-A6BB2776FC4C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Feb 6, 2017, at 12:57, Edward Tomasz Napierala = wrote: >=20 > Author: trasz > Date: Mon Feb 6 20:57:12 2017 > New Revision: 313352 > URL: https://svnweb.freebsd.org/changeset/base/313352 >=20 > Log: > Add kern_vm_mmap2(), kern_vm_mprotect(), kern_vm_msync(), = kern_vm_munlock(), > kern_vm_munmap(), and kern_vm_madvise(), and use them in various = compats > instead of their sys_*() counterparts. >=20 > Reviewed by: ed, dchagin, kib > MFC after: 2 weeks > Sponsored by: DARPA, AFRL > Differential Revision: https://reviews.freebsd.org/D9378 >=20 > Modified: > head/sys/compat/cloudabi/cloudabi_mem.c > head/sys/compat/freebsd32/freebsd32_misc.c > head/sys/compat/linux/linux_misc.c > head/sys/compat/linux/linux_mmap.c > head/sys/vm/vm_extern.h > head/sys/vm/vm_mmap.c Please see = https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D216976 . I believe = this causes an issue with validating the prot argument which in turn is = causing failures on ci.freebsd.org when it runs the kyua tests. Thank you, -Ngie --Apple-Mail=_7FEF837F-493B-4404-BAE6-A6BB2776FC4C Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYnhY6AAoJEPWDqSZpMIYVFikQAKztg3r8Z9K2+6mSb3CdFHtW ACaHZr2yjrD20EDQfL0N+vwBM7oCDcaU2mpOq4wD9m2Xo87zbj4X/gMgiopqBmEG o1kEWKIVF4SwSFPZsJR2e9i++6B1osHepiS3mi2cHpofXEAwovr5xY+TTnE1ar9w fVDtCS13aHo618fS7Wc2rrruV5SoM5g8LRvV5rv+qOpRAFnEdVIVzqaFeseqFhPb utBPfW+CR4q7y4Kh8+GYDkBtYqlWTh5sGT2pZ7TzK0N427mFM7Psd7FkIezXB1to nmwBqxvgkAGUblvEa5SetTQNErzc6+i6UNm0PjN5bTt2LqrKdZWqaSJsi9lLJoE1 p7/guR2zS3vI0AJocxCMg6SeHtgImQoSiy34Ag1Vo902KXVWhsugtf6X2kxzeuBw Ht3UzGDQN9SNSwtHdx1RgTFpe9aK7QikUD5JDyOY5cNXeRPBdLmkGC4YXdXBn41V Fnscep0n3RzWdaXuL/rn/pzsOkrtFOJG0IuWXji4byLr+U3YDEy8tuGtY8ZhyNT5 xXKMyqsugN9Vx3nTaBxwmXtgb6dgMp2fbwShltFDInEg4x4sedwWduAEgnSVjwL9 2kdofkpLT+3QO8W4YognKsUPB5d+PcR7slUq9L6adVo55Jkyb1Uscp93RnCoJSwK eT3PM4UOhHXlutrL1pNG =bvUQ -----END PGP SIGNATURE----- --Apple-Mail=_7FEF837F-493B-4404-BAE6-A6BB2776FC4C-- From owner-svn-src-head@freebsd.org Fri Feb 10 19:38: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 E3147CD9C20; Fri, 10 Feb 2017 19:38:45 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C238B18C6; Fri, 10 Feb 2017 19:38:45 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 09C8A10A791; Fri, 10 Feb 2017 14:38:44 -0500 (EST) From: John Baldwin To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313564 - head/sys/kern Date: Fri, 10 Feb 2017 11:38:38 -0800 Message-ID: <2023305.EdEEquGYxm@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201702101925.v1AJPqhR022902@repo.freebsd.org> References: <201702101925.v1AJPqhR022902@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Fri, 10 Feb 2017 14:38:44 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-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: Fri, 10 Feb 2017 19:38:46 -0000 On Friday, February 10, 2017 07:25:52 PM John Baldwin wrote: > Author: jhb > Date: Fri Feb 10 19:25:52 2017 > New Revision: 313564 > URL: https://svnweb.freebsd.org/changeset/base/313564 > > Log: > Drop the "created from" line from files generated by makesyscalls.sh. > > This information is less useful when the generated files are included in > source control along with the source. If needed it can be reconstructed > from the $FreeBSD$ tag in the generated file. Removing this information > from the generated output permits committing the generated files along > with the change to the system call master list without having inconsistent > metadata in the generated files. There is a tradeoff of course. Having the generated files mixed in the commits does make the diff more noisy, and it can be more of a pain in reviews. One can still just not include the generated files when posting reviews (we already have to do that because you have to generate the files to do testing). However, I do think that at least for MFCs we should include the generated files in the merge so that on stable branches we don't have known-broken commits once this change is merged back to stable branches. -- John Baldwin From owner-svn-src-head@freebsd.org Fri Feb 10 19:45: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 54BEECD9EB4; Fri, 10 Feb 2017 19:45:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 225881F73; Fri, 10 Feb 2017 19:45:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1AJj6iL031472; Fri, 10 Feb 2017 19:45:06 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1AJj24H031436; Fri, 10 Feb 2017 19:45:02 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201702101945.v1AJj24H031436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 10 Feb 2017 19:45:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313566 - in head/sys: amd64/linux amd64/linux32 compat/cloudabi32 compat/cloudabi64 compat/freebsd32 compat/svr4 i386/ibcs2 i386/linux kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Fri, 10 Feb 2017 19:45:07 -0000 Author: jhb Date: Fri Feb 10 19:45:02 2017 New Revision: 313566 URL: https://svnweb.freebsd.org/changeset/base/313566 Log: Regenerate all the system call tables to drop "created from" lines. One of the ibcs2 files contains some actual changes (new headers) as it hasn't been regenerated after older changes to makesyscalls.sh. Modified: head/sys/amd64/linux/linux_proto.h head/sys/amd64/linux/linux_syscall.h head/sys/amd64/linux/linux_syscalls.c head/sys/amd64/linux/linux_sysent.c head/sys/amd64/linux32/linux32_proto.h head/sys/amd64/linux32/linux32_syscall.h head/sys/amd64/linux32/linux32_syscalls.c head/sys/amd64/linux32/linux32_sysent.c head/sys/compat/cloudabi32/cloudabi32_proto.h head/sys/compat/cloudabi32/cloudabi32_syscall.h head/sys/compat/cloudabi32/cloudabi32_syscalls.c head/sys/compat/cloudabi32/cloudabi32_sysent.c head/sys/compat/cloudabi64/cloudabi64_proto.h head/sys/compat/cloudabi64/cloudabi64_syscall.h head/sys/compat/cloudabi64/cloudabi64_syscalls.c head/sys/compat/cloudabi64/cloudabi64_sysent.c head/sys/compat/freebsd32/freebsd32_proto.h head/sys/compat/freebsd32/freebsd32_syscall.h head/sys/compat/freebsd32/freebsd32_syscalls.c head/sys/compat/freebsd32/freebsd32_sysent.c head/sys/compat/svr4/svr4_proto.h head/sys/compat/svr4/svr4_syscall.h head/sys/compat/svr4/svr4_syscallnames.c head/sys/compat/svr4/svr4_sysent.c head/sys/i386/ibcs2/ibcs2_proto.h head/sys/i386/ibcs2/ibcs2_syscall.h head/sys/i386/ibcs2/ibcs2_sysent.c head/sys/i386/linux/linux_proto.h head/sys/i386/linux/linux_syscall.h head/sys/i386/linux/linux_syscalls.c head/sys/i386/linux/linux_sysent.c head/sys/kern/init_sysent.c head/sys/kern/syscalls.c head/sys/sys/syscall.h head/sys/sys/syscall.mk head/sys/sys/sysproto.h Modified: head/sys/amd64/linux/linux_proto.h ============================================================================== --- head/sys/amd64/linux/linux_proto.h Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/amd64/linux/linux_proto.h Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux/syscalls.master 313284 2017-02-05 14:17:09Z dchagin */ #ifndef _LINUX_SYSPROTO_H_ Modified: head/sys/amd64/linux/linux_syscall.h ============================================================================== --- head/sys/amd64/linux/linux_syscall.h Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/amd64/linux/linux_syscall.h Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux/syscalls.master 313284 2017-02-05 14:17:09Z dchagin */ #define LINUX_SYS_read 0 Modified: head/sys/amd64/linux/linux_syscalls.c ============================================================================== --- head/sys/amd64/linux/linux_syscalls.c Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/amd64/linux/linux_syscalls.c Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux/syscalls.master 313284 2017-02-05 14:17:09Z dchagin */ const char *linux_syscallnames[] = { Modified: head/sys/amd64/linux/linux_sysent.c ============================================================================== --- head/sys/amd64/linux/linux_sysent.c Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/amd64/linux/linux_sysent.c Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux/syscalls.master 313284 2017-02-05 14:17:09Z dchagin */ #include Modified: head/sys/amd64/linux32/linux32_proto.h ============================================================================== --- head/sys/amd64/linux32/linux32_proto.h Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/amd64/linux32/linux32_proto.h Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 313284 2017-02-05 14:17:09Z dchagin */ #ifndef _LINUX32_SYSPROTO_H_ Modified: head/sys/amd64/linux32/linux32_syscall.h ============================================================================== --- head/sys/amd64/linux32/linux32_syscall.h Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/amd64/linux32/linux32_syscall.h Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 313284 2017-02-05 14:17:09Z dchagin */ #define LINUX32_SYS_linux_exit 1 Modified: head/sys/amd64/linux32/linux32_syscalls.c ============================================================================== --- head/sys/amd64/linux32/linux32_syscalls.c Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/amd64/linux32/linux32_syscalls.c Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 313284 2017-02-05 14:17:09Z dchagin */ const char *linux32_syscallnames[] = { Modified: head/sys/amd64/linux32/linux32_sysent.c ============================================================================== --- head/sys/amd64/linux32/linux32_sysent.c Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/amd64/linux32/linux32_sysent.c Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 313284 2017-02-05 14:17:09Z dchagin */ #include "opt_compat.h" Modified: head/sys/compat/cloudabi32/cloudabi32_proto.h ============================================================================== --- head/sys/compat/cloudabi32/cloudabi32_proto.h Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/compat/cloudabi32/cloudabi32_proto.h Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/contrib/cloudabi/syscalls32.master 312353 2017-01-17 22:03:08Z ed */ #ifndef _CLOUDABI32_SYSPROTO_H_ Modified: head/sys/compat/cloudabi32/cloudabi32_syscall.h ============================================================================== --- head/sys/compat/cloudabi32/cloudabi32_syscall.h Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/compat/cloudabi32/cloudabi32_syscall.h Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/contrib/cloudabi/syscalls32.master 312353 2017-01-17 22:03:08Z ed */ #define CLOUDABI32_SYS_cloudabi_sys_clock_res_get 0 Modified: head/sys/compat/cloudabi32/cloudabi32_syscalls.c ============================================================================== --- head/sys/compat/cloudabi32/cloudabi32_syscalls.c Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/compat/cloudabi32/cloudabi32_syscalls.c Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/contrib/cloudabi/syscalls32.master 312353 2017-01-17 22:03:08Z ed */ const char *cloudabi32_syscallnames[] = { Modified: head/sys/compat/cloudabi32/cloudabi32_sysent.c ============================================================================== --- head/sys/compat/cloudabi32/cloudabi32_sysent.c Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/compat/cloudabi32/cloudabi32_sysent.c Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/contrib/cloudabi/syscalls32.master 312353 2017-01-17 22:03:08Z ed */ #include Modified: head/sys/compat/cloudabi64/cloudabi64_proto.h ============================================================================== --- head/sys/compat/cloudabi64/cloudabi64_proto.h Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/compat/cloudabi64/cloudabi64_proto.h Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/contrib/cloudabi/syscalls64.master 312353 2017-01-17 22:03:08Z ed */ #ifndef _CLOUDABI64_SYSPROTO_H_ Modified: head/sys/compat/cloudabi64/cloudabi64_syscall.h ============================================================================== --- head/sys/compat/cloudabi64/cloudabi64_syscall.h Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/compat/cloudabi64/cloudabi64_syscall.h Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/contrib/cloudabi/syscalls64.master 312353 2017-01-17 22:03:08Z ed */ #define CLOUDABI64_SYS_cloudabi_sys_clock_res_get 0 Modified: head/sys/compat/cloudabi64/cloudabi64_syscalls.c ============================================================================== --- head/sys/compat/cloudabi64/cloudabi64_syscalls.c Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/compat/cloudabi64/cloudabi64_syscalls.c Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/contrib/cloudabi/syscalls64.master 312353 2017-01-17 22:03:08Z ed */ const char *cloudabi64_syscallnames[] = { Modified: head/sys/compat/cloudabi64/cloudabi64_sysent.c ============================================================================== --- head/sys/compat/cloudabi64/cloudabi64_sysent.c Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/compat/cloudabi64/cloudabi64_sysent.c Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/contrib/cloudabi/syscalls64.master 312353 2017-01-17 22:03:08Z ed */ #include Modified: head/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_proto.h Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/compat/freebsd32/freebsd32_proto.h Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 310638 2016-12-27 20:21:11Z jhb */ #ifndef _FREEBSD32_SYSPROTO_H_ Modified: head/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscall.h Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/compat/freebsd32/freebsd32_syscall.h Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 310638 2016-12-27 20:21:11Z jhb */ #define FREEBSD32_SYS_syscall 0 Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscalls.c Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/compat/freebsd32/freebsd32_syscalls.c Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 310638 2016-12-27 20:21:11Z jhb */ const char *freebsd32_syscallnames[] = { Modified: head/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_sysent.c Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/compat/freebsd32/freebsd32_sysent.c Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 310638 2016-12-27 20:21:11Z jhb */ #include "opt_compat.h" Modified: head/sys/compat/svr4/svr4_proto.h ============================================================================== --- head/sys/compat/svr4/svr4_proto.h Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/compat/svr4/svr4_proto.h Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/svr4/syscalls.master 302096 2016-06-23 00:29:03Z brooks */ #ifndef _SVR4_SYSPROTO_H_ Modified: head/sys/compat/svr4/svr4_syscall.h ============================================================================== --- head/sys/compat/svr4/svr4_syscall.h Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/compat/svr4/svr4_syscall.h Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/svr4/syscalls.master 302096 2016-06-23 00:29:03Z brooks */ #define SVR4_SYS_exit 1 Modified: head/sys/compat/svr4/svr4_syscallnames.c ============================================================================== --- head/sys/compat/svr4/svr4_syscallnames.c Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/compat/svr4/svr4_syscallnames.c Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/svr4/syscalls.master 302096 2016-06-23 00:29:03Z brooks */ const char *svr4_syscallnames[] = { Modified: head/sys/compat/svr4/svr4_sysent.c ============================================================================== --- head/sys/compat/svr4/svr4_sysent.c Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/compat/svr4/svr4_sysent.c Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/svr4/syscalls.master 302096 2016-06-23 00:29:03Z brooks */ #include Modified: head/sys/i386/ibcs2/ibcs2_proto.h ============================================================================== --- head/sys/i386/ibcs2/ibcs2_proto.h Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/i386/ibcs2/ibcs2_proto.h Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/ibcs2/syscalls.master 227691 2011-11-19 06:35:15Z ed */ #ifndef _IBCS2_SYSPROTO_H_ @@ -12,8 +11,10 @@ #include #include #include +#include #include #include +#include #include @@ -351,6 +352,12 @@ int ibcs2_isc(struct thread *, struct ib #endif /* COMPAT_FREEBSD7 */ + +#ifdef COMPAT_FREEBSD10 + + +#endif /* COMPAT_FREEBSD10 */ + #define IBCS2_SYS_AUE_ibcs2_read AUE_NULL #define IBCS2_SYS_AUE_ibcs2_open AUE_OPEN_RWTC #define IBCS2_SYS_AUE_ibcs2_wait AUE_WAIT4 Modified: head/sys/i386/ibcs2/ibcs2_syscall.h ============================================================================== --- head/sys/i386/ibcs2/ibcs2_syscall.h Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/i386/ibcs2/ibcs2_syscall.h Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/ibcs2/syscalls.master 227691 2011-11-19 06:35:15Z ed */ #define IBCS2_SYS_syscall 0 Modified: head/sys/i386/ibcs2/ibcs2_sysent.c ============================================================================== --- head/sys/i386/ibcs2/ibcs2_sysent.c Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/i386/ibcs2/ibcs2_sysent.c Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/ibcs2/syscalls.master 227691 2011-11-19 06:35:15Z ed */ #include Modified: head/sys/i386/linux/linux_proto.h ============================================================================== --- head/sys/i386/linux/linux_proto.h Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/i386/linux/linux_proto.h Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/linux/syscalls.master 313284 2017-02-05 14:17:09Z dchagin */ #ifndef _LINUX_SYSPROTO_H_ Modified: head/sys/i386/linux/linux_syscall.h ============================================================================== --- head/sys/i386/linux/linux_syscall.h Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/i386/linux/linux_syscall.h Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/linux/syscalls.master 313284 2017-02-05 14:17:09Z dchagin */ #define LINUX_SYS_linux_exit 1 Modified: head/sys/i386/linux/linux_syscalls.c ============================================================================== --- head/sys/i386/linux/linux_syscalls.c Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/i386/linux/linux_syscalls.c Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/linux/syscalls.master 313284 2017-02-05 14:17:09Z dchagin */ const char *linux_syscallnames[] = { Modified: head/sys/i386/linux/linux_sysent.c ============================================================================== --- head/sys/i386/linux/linux_sysent.c Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/i386/linux/linux_sysent.c Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/linux/syscalls.master 313284 2017-02-05 14:17:09Z dchagin */ #include Modified: head/sys/kern/init_sysent.c ============================================================================== --- head/sys/kern/init_sysent.c Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/kern/init_sysent.c Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 310638 2016-12-27 20:21:11Z jhb */ #include "opt_compat.h" Modified: head/sys/kern/syscalls.c ============================================================================== --- head/sys/kern/syscalls.c Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/kern/syscalls.c Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 310638 2016-12-27 20:21:11Z jhb */ const char *syscallnames[] = { Modified: head/sys/sys/syscall.h ============================================================================== --- head/sys/sys/syscall.h Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/sys/syscall.h Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 310638 2016-12-27 20:21:11Z jhb */ #define SYS_syscall 0 Modified: head/sys/sys/syscall.mk ============================================================================== --- head/sys/sys/syscall.mk Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/sys/syscall.mk Fri Feb 10 19:45:02 2017 (r313566) @@ -1,7 +1,6 @@ # FreeBSD system call object files. # DO NOT EDIT-- this file is automatically generated. # $FreeBSD$ -# created from FreeBSD: head/sys/kern/syscalls.master 310638 2016-12-27 20:21:11Z jhb MIASM = \ syscall.o \ exit.o \ Modified: head/sys/sys/sysproto.h ============================================================================== --- head/sys/sys/sysproto.h Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/sys/sysproto.h Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 310638 2016-12-27 20:21:11Z jhb */ #ifndef _SYS_SYSPROTO_H_ From owner-svn-src-head@freebsd.org Fri Feb 10 20:10: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 3D039CD9320; Fri, 10 Feb 2017 20:10:11 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 18B73C31; Fri, 10 Feb 2017 20:10:10 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id v1AKA9NA028597 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 10 Feb 2017 12:10:09 -0800 (PST) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v1AKA9Gb028596; Fri, 10 Feb 2017 12:10:09 -0800 (PST) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 10 Feb 2017 12:10:08 -0800 From: Gleb Smirnoff To: Eric van Gyzen Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313401 - head/sys/netinet Message-ID: <20170210201008.GG1973@FreeBSD.org> References: <201702071857.v17Ivvn1018291@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201702071857.v17Ivvn1018291@repo.freebsd.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-BeenThere: svn-src-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: Fri, 10 Feb 2017 20:10:11 -0000 On Tue, Feb 07, 2017 at 06:57:57PM +0000, Eric van Gyzen wrote: E> Author: vangyzen E> Date: Tue Feb 7 18:57:57 2017 E> New Revision: 313401 E> URL: https://svnweb.freebsd.org/changeset/base/313401 E> E> Log: E> Fix garbage IP addresses in UDP log_in_vain messages E> E> If multiple threads emit a UDP log_in_vain message concurrently, E> the IP addresses could be garbage due to concurrent usage of a E> single string buffer inside inet_ntoa(). Use inet_ntoa_r() with E> two stack buffers instead. E> E> Reported by: Mark Martinec E> MFC after: 3 days E> Relnotes: yes E> Sponsored by: Dell EMC Thanks. I think inet_ntoa() and anything that uses static buffer should just be removed from libkern. -- Totus tuus, Glebius. From owner-svn-src-head@freebsd.org Fri Feb 10 20:19: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 6EAE9CD9543; Fri, 10 Feb 2017 20:19:38 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x241.google.com (mail-pg0-x241.google.com [IPv6:2607:f8b0:400e:c05::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3BF991077; Fri, 10 Feb 2017 20:19:38 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x241.google.com with SMTP id v184so3840688pgv.1; Fri, 10 Feb 2017 12:19:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=fZd32r44ucI2OhQTLIl4YdJuWb1S8YU/ehjGETGuzOc=; b=fLE7FmX+LO30zJ3tRsbopmXA9NpcewjMPdgK+mxem4yapvG8kENCA9wCLP0J50AhJ3 foFhXOjhf0E0v0wHcXoIvwHluwutl9Bm9/feMldkvXUqelhUCwvfk8aebQqY6iW3CxCr YU9gmOJrKcAvw2CR0xTYsCiML8mKq94iyXOHvt203fEjcTh5fzbz607paO0QpDo/Uz8b 31JiRn7fbEijfbMsO9BInCHgbSdLZVv/J7fiTOe9CiVEB4Ovw+vqGAyrgIePMm74OKDe iaVJNMcU3Ei5d1eCbx+hkwn5rR73nQcpAi6tYU3iXus31peAnx4tURgsB9G+PrIpUf0Y wrag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=fZd32r44ucI2OhQTLIl4YdJuWb1S8YU/ehjGETGuzOc=; b=uHMZ4nXGoERSHZSp3AaQAmrAlJipkAwf0V+Z2NW9Ow/5msvZDf/Ii8RzS/Eht182qU FdWZJNVWEBYTBp9nnYNv7pGAt8phtNx1JVDUCOaDkBjay61l2XaQpXrUHu3zuTdqWCdu Dd6GgEIa5N6ZsbUuxAeJerWSLjorn0giem/XbwGJZwTiTCb9Zj4IeIEgyF0SO2LT2dRN O4GT3trWGtElb/3A4QcC2ncUQ7mMC/pl6x8RWxgXHIsgKJyW71Zqm8OBTsrZYijKY2GP L1COQDsVnEdLNpofRtk3UI2h1HvNaesqvGqpYfapmFWYuQsJq2qkMRFUblL++gXHeYD0 QvoQ== X-Gm-Message-State: AMke39mn5iVhqIoty45i8ssnTyiUnVpchBnBZyrNHZecnDzruVR2TTpdSLUh4N1HUKrnnA== X-Received: by 10.98.8.11 with SMTP id c11mr12255744pfd.135.1486757977654; Fri, 10 Feb 2017 12:19:37 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id z74sm7227461pfd.70.2017.02.10.12.19.36 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 10 Feb 2017 12:19:37 -0800 (PST) Subject: Re: svn commit: r313564 - head/sys/kern Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_4489DBB5-19C5-4F22-839F-1F2B56FCB472"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <2023305.EdEEquGYxm@ralph.baldwin.cx> Date: Fri, 10 Feb 2017 12:19:35 -0800 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201702101925.v1AJPqhR022902@repo.freebsd.org> <2023305.EdEEquGYxm@ralph.baldwin.cx> To: John Baldwin X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-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: Fri, 10 Feb 2017 20:19:38 -0000 --Apple-Mail=_4489DBB5-19C5-4F22-839F-1F2B56FCB472 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Feb 10, 2017, at 11:38, John Baldwin wrote: >=20 > On Friday, February 10, 2017 07:25:52 PM John Baldwin wrote: >> Author: jhb >> Date: Fri Feb 10 19:25:52 2017 >> New Revision: 313564 >> URL: https://svnweb.freebsd.org/changeset/base/313564 >>=20 >> Log: >> Drop the "created from" line from files generated by = makesyscalls.sh. >>=20 >> This information is less useful when the generated files are = included in >> source control along with the source. If needed it can be = reconstructed >> from the $FreeBSD$ tag in the generated file. Removing this = information >> from the generated output permits committing the generated files = along >> with the change to the system call master list without having = inconsistent >> metadata in the generated files. >=20 > There is a tradeoff of course. Having the generated files mixed in = the > commits does make the diff more noisy, and it can be more of a pain in = reviews. > One can still just not include the generated files when posting = reviews (we > already have to do that because you have to generate the files to do = testing). >=20 > However, I do think that at least for MFCs we should include the = generated > files in the merge so that on stable branches we don't have = known-broken > commits once this change is merged back to stable branches. Uhh=E2=80=A6. $FreeBSD$ isn=E2=80=99t being expanded in some of these = files=E2=80=A6 $ svn pg svn:keywords sys/sys/syscall.mk FreeBSD=3D%H $ grep '$FreeBSD' sys/sys/syscall.mk # $FreeBSD$ -Ngie --Apple-Mail=_4489DBB5-19C5-4F22-839F-1F2B56FCB472 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYniBYAAoJEPWDqSZpMIYVqLYQAMB/6hAbu9FVU/fLJgicXo6m QcartWGIky1OdN/7swg3pA9nSQZGsRnN+HZtxxYIx7aHfFwREQA3yKRSeO4Fz8mk AU+yJC/1BJtONBXse3iaVG9jZRYMYdMCaWF9r5beaZ1IOuQ0VTXj0Njlq/YibYl7 Yp3Yd+WglQXeYVHNWM8+uxA2nvEwKjeujakEcrqtCXf3z5PIL/M4tvPyJxzigS9m qhNMgtJGbur0dQ/k7RK+CIeB2Djt5sa5m68RNo4UiLoKk2t896sN8Vo+B67bkKLQ DU8E7CBJceOFVOrvZT35MWXt/F+c6jRMmWRebxtKRRA2qGJaVOyXEbO7+ay3LJq0 Ovb0AUDJTMZuULp7E25aD14kZLfxSfzuMGnLafPO/CxQLgfO2L2EZoqUtmVhKtEA AI56bQmvIgmAHWjCJuXs1LGY7QHwT8hbgibbmTIHqhN+m+KrxqSfce2Fz0jcaLwK n7lFTe7Z2zFB6p7TMhHo69BlHYRWLZZp6zEYxWKGSClXqVRAfiCVJTr6qquvTf+6 zZW/aXYBX5g7Uo1xU3x05+48bqoCNF8Wmk+Cq7M/+usvcmK5NjiudDndMgDrJ1C3 GgwMFWk8hIuYLrBug74FLCEqaAYyhJiJ6BOjUhmquPQVWeHSV1N5pRX/josRWRq/ FupAO/5eRHZiKTWlnd/5 =5tI3 -----END PGP SIGNATURE----- --Apple-Mail=_4489DBB5-19C5-4F22-839F-1F2B56FCB472-- From owner-svn-src-head@freebsd.org Fri Feb 10 21: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 076C6CD94F7; Fri, 10 Feb 2017 21:05:06 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x241.google.com (mail-io0-x241.google.com [IPv6:2607:f8b0:4001:c06::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C4A8DA72; Fri, 10 Feb 2017 21:05:05 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x241.google.com with SMTP id 101so6948318iom.0; Fri, 10 Feb 2017 13:05:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=UFAHL2rYpnNYqP/+VTaHBQiHy5RTfvvDbcRrpQjhf6I=; b=Ks+DNeU2oUsoWIPCLBcj/ONhoVYATvXDhI5V7qOHG5RUPiyw7mVCsUy5q89k8puPTU GnT9eEjvVfm2kzx1xu9jclJwN6nIbEV9to2qj48fSSuGucwEKyjlr5b8qKnLHA+6I6j0 spAFrh2RPAjpNzDqH9utMt7hASzzuSi+dtzvF1l7liVJoAYVDJ/1T7FLXCxWxIzcU0qi utqqbUy9v1qG7zmrWNyvB+NcWPVflY2EX7GO4yvg4RpW9eL/ccmcLztfocoTMZ7xAB2Y qH/rCXJM4j6jRaIPbouanB6aWdNAnxe3WWrLF48xc4zy1u2X8EzMs5knSeqZ2o6oO47j HDWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=UFAHL2rYpnNYqP/+VTaHBQiHy5RTfvvDbcRrpQjhf6I=; b=mROPOIxxVedGGAbRL6E8IWChC/5Eg0JrZEGYgLdpf1R3HgF9xZ6fU3ucHhRTuVeTpv tEP65ThijUII5tTYtf9IldCu1NT8aOfGLMYJqtnI6qpSekTyRQ6HsUolxC+OPu9gtlmb CCyPLc5LS+Jw/l3DjjlPJJW1aTM1W/AdhbpMF+ZqEzZ0St5mdioLxj4hI0cEDUl1kbol KBkz7VUHpyAGR9GQuslmxQ03/gzt44lzU9UKo8hKXU3LFTCWEpf16MDT3DvjopIKlkg7 aPzv8mQOIj+dWYKHzz+abBihnD6JTSFoMsCQ0GgV9Jz0j1oIADLCWhdBWEtcwJXCSkal VV2g== X-Gm-Message-State: AMke39ndpl0Cigi6t4qrzfHA4DlGYS/t3VUGMXGG1yYiQ+Njf7N+gaA9MutoXw+8TeS8zbLNE+01NsHzXdfICQ== X-Received: by 10.107.142.195 with SMTP id q186mr4841580iod.169.1486760705099; Fri, 10 Feb 2017 13:05:05 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.175.159 with HTTP; Fri, 10 Feb 2017 13:04:44 -0800 (PST) In-Reply-To: <20170210201008.GG1973@FreeBSD.org> References: <201702071857.v17Ivvn1018291@repo.freebsd.org> <20170210201008.GG1973@FreeBSD.org> From: Ed Maste Date: Fri, 10 Feb 2017 16:04:44 -0500 X-Google-Sender-Auth: NFHBEXyQlGc8OgFGVOa3KgbRYlY Message-ID: Subject: Re: svn commit: r313401 - head/sys/netinet To: Gleb Smirnoff Cc: Eric van Gyzen , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-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: Fri, 10 Feb 2017 21:05:06 -0000 On 10 February 2017 at 15:10, Gleb Smirnoff wrote: > > Thanks. I think inet_ntoa() and anything that uses static buffer > should just be removed from libkern. Agreed. A quick grep found inet_ntoa used in: netpfil/pf/pf_osfp.c netpfil/ipfw/ip_fw_log.c kern/kern_jail.c fs/nfsserver/nfs_nfsdkrpc.c netinet/ip_icmp.c netinet/tcp_hostcache.c netinet/ip_options.c netinet/in_mcast.c netinet/igmp.c netinet/libalias/alias_nbt.c netinet/libalias/alias_proxy.c netinet/libalias/alias_sctp.c netinet/ip_mroute.c netinet/in.c netinet/if_ether.c dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c From owner-svn-src-head@freebsd.org Fri Feb 10 22:02: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 4F681CD94DF; Fri, 10 Feb 2017 22:02:47 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 276AC643; Fri, 10 Feb 2017 22:02:47 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1AM2kt1088476; Fri, 10 Feb 2017 22:02:46 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1AM2kVV088475; Fri, 10 Feb 2017 22:02:46 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201702102202.v1AM2kVV088475@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Fri, 10 Feb 2017 22:02:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313568 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Fri, 10 Feb 2017 22:02:47 -0000 Author: ken Date: Fri Feb 10 22:02:45 2017 New Revision: 313568 URL: https://svnweb.freebsd.org/changeset/base/313568 Log: Change the isp(4) driver to not adjust the tag type for REQUEST SENSE. The isp(4) driver was changing the tag type for REQUEST SENSE commands to Head of Queue, when the CAM CCB flag CAM_TAG_ACTION_VALID was NOT set. CAM_TAG_ACTION_VALID is set when the tag action in the XPT_SCSI_IO is not CAM_TAG_ACTION_NONE and when the target has tagged queueing turned on. In most cases when CAM_TAG_ACTION_VALID is not set, it is because the target is not doing tagged queueing. In those cases, trying to send a Head of Queue tag may cause problems. Instead, default to sending a simple tag. IBM tape drives claim to support tagged queueing in their standard Inquiry data, but have the DQue bit set in the control mode page (mode page 10). CAM correctly detects that these drives do not support tagged queueing, and clears the CAM_TAG_ACTION_VALID flag on CCBs sent down to the drives. This caused the isp(4) driver to go down the path of setting the tag action to a default value, and for Request Sense commands only, set the tag action to Head of Queue. If an IBM tape drive does get a Head of Queue tag, it rejects it with Invalid Message Error (0x49,0x00). (The Qlogic firmware translates that to a Transport Error, which the driver translates to an Unrecoverable HBA Error, or CAM_UNREC_HBA_ERROR.) So, by default, it wasn't possible to get a good response from a REQUEST SENSE to an FC-attached IBM tape drive with the isp(4) driver. IBM tape drives (tested on an LTO-5 with G9N1 firmware and a TS1150 with 4470 firmware) also have a bug in that sending a command with a non-simple tag attribute breaks the tape drive's Command Reference Number (CRN) accounting and causes it to ignore all subsequent commands because it and the initiator disagree about the next expected CRN. The drives do reject the initial command with a head of queue tag with an Invalid Message Error (0x49,0x00), but after that they ignore any subsequent commands. IBM confirmed that it is a bug, and sent me test firmware that fixes the bug. However tape drives in the field will still exhibit the bug until they are upgraded. Request Sense is not often sent to targets because most errors are reported automatically through autosense in Fibre Channel and other modern transports. ("Modern" meaning post SCSI-2.) So this is not an error that would crop up frequently. But Request Sense is useful on tape devices to report status information, aside from error reporting. This problem is less serious without FC-Tape features turned on, specifically precise delivery of commands (which enables Command Reference Numbers), enabled on the target and initiator. Without FC-Tape features turned on, the target would return an error and things would continue on. And it also does not cause problems for targets that do tagged queueing, because in those cases the isp(4) driver just uses the tag type that is specified in the CCB, assuming the CAM_TAG_ACTION_VALID flag is set, and defaults to sending a Simple tag action if it isn't an ordered or head of queue tag. sys/dev/isp/isp.c: In isp_start(), don't try to send Request Sense commands with the Head of Queue tag attribute if the CCB doesn't have a valid tag action. The tag action likely isn't valid because the target doesn't support tagged queueing. Sponsored by: Spectra Logic MFC after: 3 days Modified: head/sys/dev/isp/isp.c Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Fri Feb 10 19:49:42 2017 (r313567) +++ head/sys/dev/isp/isp.c Fri Feb 10 22:02:45 2017 (r313568) @@ -4451,11 +4451,7 @@ isp_start(XS_T *xs) if (XS_TAG_P(xs)) { ttype = XS_TAG_TYPE(xs); } else { - if (XS_CDBP(xs)[0] == 0x3) { - ttype = REQFLAG_HTAG; - } else { - ttype = REQFLAG_STAG; - } + ttype = REQFLAG_STAG; } if (ttype == REQFLAG_OTAG) { ttype = FCP_CMND_TASK_ATTR_ORDERED; @@ -4479,14 +4475,7 @@ isp_start(XS_T *xs) if (XS_TAG_P(xs)) { ((ispreqt2_t *)reqp)->req_flags = XS_TAG_TYPE(xs); } else { - /* - * If we don't know what tag to use, use HEAD OF QUEUE - * for Request Sense or Simple. - */ - if (XS_CDBP(xs)[0] == 0x3) /* REQUEST SENSE */ - ((ispreqt2_t *)reqp)->req_flags = REQFLAG_HTAG; - else - ((ispreqt2_t *)reqp)->req_flags = REQFLAG_STAG; + ((ispreqt2_t *)reqp)->req_flags = REQFLAG_STAG; } } else { sdparam *sdp = SDPARAM(isp, XS_CHANNEL(xs)); From owner-svn-src-head@freebsd.org Sat Feb 11 00:34: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 D7C74CDAE2F; Sat, 11 Feb 2017 00:34:51 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4C521311; Sat, 11 Feb 2017 00:34:51 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 6C96D10A7B9; Fri, 10 Feb 2017 19:34:49 -0500 (EST) From: John Baldwin To: "Ngie Cooper (yaneurabeya)" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313564 - head/sys/kern Date: Fri, 10 Feb 2017 16:34:35 -0800 Message-ID: <123901029.nPdTysnfLg@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: References: <201702101925.v1AJPqhR022902@repo.freebsd.org> <2023305.EdEEquGYxm@ralph.baldwin.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Fri, 10 Feb 2017 19:34:49 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-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: Sat, 11 Feb 2017 00:34:52 -0000 On Friday, February 10, 2017 12:19:35 PM Ngie Cooper wrote: >=20 > > On Feb 10, 2017, at 11:38, John Baldwin wrote: > >=20 > > On Friday, February 10, 2017 07:25:52 PM John Baldwin wrote: > >> Author: jhb > >> Date: Fri Feb 10 19:25:52 2017 > >> New Revision: 313564 > >> URL: https://svnweb.freebsd.org/changeset/base/313564 > >>=20 > >> Log: > >> Drop the "created from" line from files generated by makesyscalls= .sh. > >>=20 > >> This information is less useful when the generated files are incl= uded in > >> source control along with the source. If needed it can be recons= tructed > >> from the $FreeBSD$ tag in the generated file. Removing this info= rmation > >> from the generated output permits committing the generated files = along > >> with the change to the system call master list without having inc= onsistent > >> metadata in the generated files. > >=20 > > There is a tradeoff of course. Having the generated files mixed in= the > > commits does make the diff more noisy, and it can be more of a pain= in reviews. > > One can still just not include the generated files when posting rev= iews (we > > already have to do that because you have to generate the files to d= o testing). > >=20 > > However, I do think that at least for MFCs we should include the ge= nerated > > files in the merge so that on stable branches we don't have known-b= roken > > commits once this change is merged back to stable branches. >=20 > Uhh=E2=80=A6. $FreeBSD$ isn=E2=80=99t being expanded in some of these= files=E2=80=A6 >=20 > $ svn pg svn:keywords sys/sys/syscall.mk > FreeBSD=3D%H > $ grep '$FreeBSD' sys/sys/syscall.mk > # $FreeBSD$ Which client are you using? This is what I see on the clean checkout of head I comitted this from: % grep FreeBSD sys/sys/syscall.mk # FreeBSD system call object files. # $FreeBSD: head/sys/sys/syscall.mk 313566 2017-02-10 19:45:02Z jhb $ --=20 John Baldwin From owner-svn-src-head@freebsd.org Sat Feb 11 00:41: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 8D2F1CDAECE; Sat, 11 Feb 2017 00:41:31 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qk0-x243.google.com (mail-qk0-x243.google.com [IPv6:2607:f8b0:400d:c09::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 493FE17AE; Sat, 11 Feb 2017 00:41:31 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-qk0-x243.google.com with SMTP id e1so7224585qkh.1; Fri, 10 Feb 2017 16:41:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=yKNWpT6TMar+z2vhOQl3jsArBjTUOTjgGnbcro6qxnY=; b=PyBA+sohiAI5iKQ5J/z08gB/E0DpY7UuE5CS6ru7DNrOGzKrMVtET3mQDin2p2nIpa Y6AizsYjZDkQKEqwDlWPpRCwtBfTrpesGIjz5IomNKGBFDvf28NJgKe6n8vMbPakSy2U 69tBwHNsWU2TE7G8LoypojFbQFPfJy78ULkZTKOlcYlqN68JL/N+1zCeMXZ/QZFCnkKN vryi9/Gcb/bRA8MrZpbb9ijDt+fJDSiANHLir3pVtKVnrsTufHlEbFvtdQbIzaA2RgJD ZlUQ4fKcKlKXhYIeenX7Jk5Hgfr6fjJnDfpdGXLKS5hCke2TycnwRXc/0IGRK7TTGrf2 eR2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=yKNWpT6TMar+z2vhOQl3jsArBjTUOTjgGnbcro6qxnY=; b=HApQTAJE/+GpD096BQ8NmTQaBM4RZL+zqZTuWVBLKJZTMJZM+f/ClDNtc0mS+Nl8H9 pQrr3JB5zKmCPKPb4MsxwZMtVHybqSPW+jLO8FYye0uCulwAeM0KebXa0Cs08IWQtbVP P2bc+kKm3OF9tXXJveLij0KSVpkCwSxs0zzt1W2uL5Apv/KB5xo8POygAUB+RnIt7StB TPOZRBsJ00ketuf82FLYAk7FMJdRWcrfdBYe0cPgNHTJntmQ77dilfe6/0Th74mewfea afzRODYSNpiSZ13v11xPHtzWqpne5u3NS8LP+I9iPSrDf3qMu71Hh9KW/y5ZzqwwPx+N FnNA== X-Gm-Message-State: AMke39knC7w3KYGDbMn5HpByhr8RtQ0EO4+eBle2eLQfMqOwHgMhBxERirSSjyc9THY8uWLzcjM3I1kGW+FBcQ== X-Received: by 10.55.67.135 with SMTP id q129mr11622814qka.98.1486773690430; Fri, 10 Feb 2017 16:41:30 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.84.230 with HTTP; Fri, 10 Feb 2017 16:41:30 -0800 (PST) In-Reply-To: <123901029.nPdTysnfLg@ralph.baldwin.cx> References: <201702101925.v1AJPqhR022902@repo.freebsd.org> <2023305.EdEEquGYxm@ralph.baldwin.cx> <123901029.nPdTysnfLg@ralph.baldwin.cx> From: Ngie Cooper Date: Fri, 10 Feb 2017 16:41:30 -0800 Message-ID: Subject: Re: svn commit: r313564 - head/sys/kern To: John Baldwin Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-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: Sat, 11 Feb 2017 00:41:31 -0000 On Fri, Feb 10, 2017 at 4:34 PM, John Baldwin wrote: ... > Which client are you using? I'll have to doublecheck, but IIRC I'm using the latest copy of devel/subversion . > This is what I see on the clean checkout of head I comitted this from: > > % grep FreeBSD sys/sys/syscall.mk > # FreeBSD system call object files. > # $FreeBSD: head/sys/sys/syscall.mk 313566 2017-02-10 19:45:02Z jhb $ Ok! Thanks for the reply :). -Ngie From owner-svn-src-head@freebsd.org Sat Feb 11 01:01: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 9377ACD8437; Sat, 11 Feb 2017 01:01:00 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62C566ED; Sat, 11 Feb 2017 01:01:00 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B10xg8059541; Sat, 11 Feb 2017 01:00:59 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B10x85059537; Sat, 11 Feb 2017 01:00:59 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201702110100.v1B10x85059537@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Sat, 11 Feb 2017 01:00:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313572 - head/contrib/libarchive/libarchive X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Sat, 11 Feb 2017 01:01:00 -0000 Author: mm Date: Sat Feb 11 01:00:58 2017 New Revision: 313572 URL: https://svnweb.freebsd.org/changeset/base/313572 Log: MFV r313569:313569:313569: Sync libarchive with vendor Vendor bugfixes: cpio reader sanity fix (OSS-Fuzz 504) WARC reader sanity fixes (OSS-Fuzz 511, 526, 532, 552) mtree reader time parsing fix (OSS-Fuzz 538) XAR reader memleak fix (OSS-Fuzz 551) MFC after: 1 week Modified: head/contrib/libarchive/libarchive/archive_read_support_format_cpio.c head/contrib/libarchive/libarchive/archive_read_support_format_mtree.c head/contrib/libarchive/libarchive/archive_read_support_format_warc.c head/contrib/libarchive/libarchive/archive_read_support_format_xar.c Directory Properties: head/contrib/libarchive/ (props changed) Modified: head/contrib/libarchive/libarchive/archive_read_support_format_cpio.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_cpio.c Sat Feb 11 00:56:18 2017 (r313571) +++ head/contrib/libarchive/libarchive/archive_read_support_format_cpio.c Sat Feb 11 01:00:58 2017 (r313572) @@ -356,7 +356,7 @@ archive_read_format_cpio_read_header(str struct archive_entry *entry) { struct cpio *cpio; - const void *h; + const void *h, *hl; struct archive_string_conv *sconv; size_t namelength; size_t name_pad; @@ -406,11 +406,11 @@ archive_read_format_cpio_read_header(str "Rejecting malformed cpio archive: symlink contents exceed 1 megabyte"); return (ARCHIVE_FATAL); } - h = __archive_read_ahead(a, + hl = __archive_read_ahead(a, (size_t)cpio->entry_bytes_remaining, NULL); - if (h == NULL) + if (hl == NULL) return (ARCHIVE_FATAL); - if (archive_entry_copy_symlink_l(entry, (const char *)h, + if (archive_entry_copy_symlink_l(entry, (const char *)hl, (size_t)cpio->entry_bytes_remaining, sconv) != 0) { if (errno == ENOMEM) { archive_set_error(&a->archive, ENOMEM, @@ -434,7 +434,7 @@ archive_read_format_cpio_read_header(str * header. XXX */ /* Compare name to "TRAILER!!!" to test for end-of-archive. */ - if (namelength == 11 && memcmp((const char *)h, "TRAILER!!!", + if (namelength == 11 && strncmp((const char *)h, "TRAILER!!!", 11) == 0) { /* TODO: Store file location of start of block. */ archive_clear_error(&a->archive); Modified: head/contrib/libarchive/libarchive/archive_read_support_format_mtree.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_mtree.c Sat Feb 11 00:56:18 2017 (r313571) +++ head/contrib/libarchive/libarchive/archive_read_support_format_mtree.c Sat Feb 11 01:00:58 2017 (r313572) @@ -1608,8 +1608,11 @@ parse_keyword(struct archive_read *a, st if (*val == '.') { ++val; ns = (long)mtree_atol10(&val); - } else - ns = 0; + if (ns < 0) + ns = 0; + else if (ns > 999999999) + ns = 999999999; + } if (m > my_time_t_max) m = my_time_t_max; else if (m < my_time_t_min) Modified: head/contrib/libarchive/libarchive/archive_read_support_format_warc.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_warc.c Sat Feb 11 00:56:18 2017 (r313571) +++ head/contrib/libarchive/libarchive/archive_read_support_format_warc.c Sat Feb 11 01:00:58 2017 (r313572) @@ -134,8 +134,8 @@ static ssize_t _warc_rdlen(const char *b static time_t _warc_rdrtm(const char *buf, size_t bsz); static time_t _warc_rdmtm(const char *buf, size_t bsz); static const char *_warc_find_eoh(const char *buf, size_t bsz); +static const char *_warc_find_eol(const char *buf, size_t bsz); - int archive_read_support_format_warc(struct archive *_a) { @@ -198,8 +198,8 @@ _warc_bid(struct archive_read *a, int be /* otherwise snarf the record's version number */ ver = _warc_rdver(hdr, nrd); - if (ver == 0U || ver > 10000U) { - /* oh oh oh, best not to wager ... */ + if (ver < 1200U || ver > 10000U) { + /* we only support WARC 0.12 to 1.0 */ return -1; } @@ -254,23 +254,32 @@ start_over: &a->archive, ARCHIVE_ERRNO_MISC, "Bad record header"); return (ARCHIVE_FATAL); - } else if ((ver = _warc_rdver(buf, eoh - buf)) > 10000U) { - /* nawww, I wish they promised backward compatibility - * anyhoo, in their infinite wisdom the 28500 guys might - * come up with something we can't possibly handle so - * best end things here */ + } + ver = _warc_rdver(buf, eoh - buf); + /* we currently support WARC 0.12 to 1.0 */ + if (ver == 0U) { archive_set_error( &a->archive, ARCHIVE_ERRNO_MISC, - "Unsupported record version"); + "Invalid record version"); return (ARCHIVE_FATAL); - } else if ((cntlen = _warc_rdlen(buf, eoh - buf)) < 0) { + } else if (ver < 1200U || ver > 10000U) { + archive_set_error( + &a->archive, ARCHIVE_ERRNO_MISC, + "Unsupported record version: %u.%u", + ver / 10000, (ver % 10000) / 100); + return (ARCHIVE_FATAL); + } + cntlen = _warc_rdlen(buf, eoh - buf); + if (cntlen < 0) { /* nightmare! the specs say content-length is mandatory * so I don't feel overly bad stopping the reader here */ archive_set_error( &a->archive, EINVAL, "Bad content length"); return (ARCHIVE_FATAL); - } else if ((rtime = _warc_rdrtm(buf, eoh - buf)) == (time_t)-1) { + } + rtime = _warc_rdrtm(buf, eoh - buf); + if (rtime == (time_t)-1) { /* record time is mandatory as per WARC/1.0, * so just barf here, fast and loud */ archive_set_error( @@ -284,7 +293,7 @@ start_over: if (ver != w->pver) { /* stringify this entry's version */ archive_string_sprintf(&w->sver, - "WARC/%u.%u", ver / 10000, ver % 10000); + "WARC/%u.%u", ver / 10000, (ver % 10000) / 100); /* remember the version */ w->pver = ver; } @@ -577,51 +586,41 @@ out: } static unsigned int -_warc_rdver(const char buf[10], size_t bsz) +_warc_rdver(const char *buf, size_t bsz) { static const char magic[] = "WARC/"; - unsigned int ver; - - (void)bsz; /* UNUSED */ + unsigned int ver = 0U; + unsigned int end = 0U; - if (memcmp(buf, magic, sizeof(magic) - 1U) != 0) { - /* nope */ - return 99999U; + if (bsz < 12 || memcmp(buf, magic, sizeof(magic) - 1U) != 0) { + /* buffer too small or invalid magic */ + return ver; } /* looks good so far, read the version number for a laugh */ buf += sizeof(magic) - 1U; - /* most common case gets a quick-check here */ - if (memcmp(buf, "1.0\r\n", 5U) == 0) { - ver = 10000U; - } else { - switch (*buf) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - if (buf[1U] == '.') { - char *on; - - /* set up major version */ - ver = (buf[0U] - '0') * 10000U; - /* minor version, anyone? */ - ver += (strtol(buf + 2U, &on, 10)) * 100U; - /* don't parse anything else */ - if (on > buf + 2U) { - break; - } - } - /* FALLTHROUGH */ - case '9': - default: - /* just make the version ridiculously high */ - ver = 999999U; - break; + + if (isdigit(buf[0U]) && (buf[1U] == '.') && isdigit(buf[2U])) { + /* we support a maximum of 2 digits in the minor version */ + if (isdigit(buf[3U])) + end = 1U; + /* set up major version */ + ver = (buf[0U] - '0') * 10000U; + /* set up minor version */ + if (end == 1U) { + ver += (buf[2U] - '0') * 1000U; + ver += (buf[3U] - '0') * 100U; + } else + ver += (buf[2U] - '0') * 100U; + /* + * WARC below version 0.12 has a space-separated header + * WARC 0.12 and above terminates the version with a CRLF + */ + if (ver >= 1200U) { + if (memcmp(buf + 3U + end, "\r\n", 2U) != 0) + ver = 0U; + } else if (ver < 1200U) { + if (!isblank(*(buf + 3U + end))) + ver = 0U; } } return ver; @@ -631,34 +630,27 @@ static unsigned int _warc_rdtyp(const char *buf, size_t bsz) { static const char _key[] = "\r\nWARC-Type:"; - const char *const eob = buf + bsz; - const char *val; + const char *val, *eol; if ((val = xmemmem(buf, bsz, _key, sizeof(_key) - 1U)) == NULL) { /* no bother */ return WT_NONE; } - /* overread whitespace */ val += sizeof(_key) - 1U; - while (val < eob && isspace((unsigned char)*val)) + if ((eol = _warc_find_eol(val, buf + bsz - val)) == NULL) { + /* no end of line */ + return WT_NONE; + } + + /* overread whitespace */ + while (val < eol && isblank((unsigned char)*val)) ++val; - if (val + 8U > eob) { - ; - } else if (memcmp(val, "resource", 8U) == 0) { - return WT_RSRC; - } else if (memcmp(val, "warcinfo", 8U) == 0) { - return WT_INFO; - } else if (memcmp(val, "metadata", 8U) == 0) { - return WT_META; - } else if (memcmp(val, "request", 7U) == 0) { - return WT_REQ; - } else if (memcmp(val, "response", 8U) == 0) { - return WT_RSP; - } else if (memcmp(val, "conversi", 8U) == 0) { - return WT_CONV; - } else if (memcmp(val, "continua", 8U) == 0) { - return WT_CONT; + if (val + 8U == eol) { + if (memcmp(val, "resource", 8U) == 0) + return WT_RSRC; + else if (memcmp(val, "response", 8U) == 0) + return WT_RSP; } return WT_NONE; } @@ -667,10 +659,7 @@ static warc_string_t _warc_rduri(const char *buf, size_t bsz) { static const char _key[] = "\r\nWARC-Target-URI:"; - const char *const eob = buf + bsz; - const char *val; - const char *uri; - const char *eol; + const char *val, *uri, *eol, *p; warc_string_t res = {0U, NULL}; if ((val = xmemmem(buf, bsz, _key, sizeof(_key) - 1U)) == NULL) { @@ -679,25 +668,32 @@ _warc_rduri(const char *buf, size_t bsz) } /* overread whitespace */ val += sizeof(_key) - 1U; - while (val < eob && isspace((unsigned char)*val)) + if ((eol = _warc_find_eol(val, buf + bsz - val)) == NULL) { + /* no end of line */ + return res; + } + + while (val < eol && isblank((unsigned char)*val)) ++val; /* overread URL designators */ - if ((uri = xmemmem(val, eob - val, "://", 3U)) == NULL) { + if ((uri = xmemmem(val, eol - val, "://", 3U)) == NULL) { /* not touching that! */ return res; - } else if ((eol = memchr(uri, '\n', eob - uri)) == NULL) { - /* no end of line? :O */ - return res; } - /* massage uri to point to after :// */ + /* spaces inside uri are not allowed, CRLF should follow */ + for (p = val; p < eol; p++) { + if (isspace(*p)) + return res; + } + + /* there must be at least space for ftp */ + if (uri < (val + 3U)) + return res; + + /* move uri to point to after :// */ uri += 3U; - /* also massage eol to point to the first whitespace - * after the last non-whitespace character before - * the end of the line */ - while (eol > uri && isspace((unsigned char)eol[-1])) - --eol; /* now then, inspect the URI */ if (memcmp(val, "file", 4U) == 0) { @@ -720,7 +716,7 @@ static ssize_t _warc_rdlen(const char *buf, size_t bsz) { static const char _key[] = "\r\nContent-Length:"; - const char *val; + const char *val, *eol; char *on = NULL; long int len; @@ -728,14 +724,24 @@ _warc_rdlen(const char *buf, size_t bsz) /* no bother */ return -1; } - - /* strtol kindly overreads whitespace for us, so use that */ val += sizeof(_key) - 1U; + if ((eol = _warc_find_eol(val, buf + bsz - val)) == NULL) { + /* no end of line */ + return -1; + } + + /* skip leading whitespace */ + while (val < eol && isblank(*val)) + val++; + /* there must be at least one digit */ + if (!isdigit(*val)) + return -1; len = strtol(val, &on, 10); - if (on == NULL || !isspace((unsigned char)*on)) { - /* hm, can we trust that number? Best not. */ + if (on != eol) { + /* line must end here */ return -1; } + return (size_t)len; } @@ -743,7 +749,7 @@ static time_t _warc_rdrtm(const char *buf, size_t bsz) { static const char _key[] = "\r\nWARC-Date:"; - const char *val; + const char *val, *eol; char *on = NULL; time_t res; @@ -751,13 +757,17 @@ _warc_rdrtm(const char *buf, size_t bsz) /* no bother */ return (time_t)-1; } + val += sizeof(_key) - 1U; + if ((eol = _warc_find_eol(val, buf + bsz - val)) == NULL ) { + /* no end of line */ + return -1; + } /* xstrpisotime() kindly overreads whitespace for us, so use that */ - val += sizeof(_key) - 1U; res = xstrpisotime(val, &on); - if (on == NULL || !isspace((unsigned char)*on)) { - /* hm, can we trust that number? Best not. */ - return (time_t)-1; + if (on != eol) { + /* line must end here */ + return -1; } return res; } @@ -766,7 +776,7 @@ static time_t _warc_rdmtm(const char *buf, size_t bsz) { static const char _key[] = "\r\nLast-Modified:"; - const char *val; + const char *val, *eol; char *on = NULL; time_t res; @@ -774,13 +784,17 @@ _warc_rdmtm(const char *buf, size_t bsz) /* no bother */ return (time_t)-1; } + val += sizeof(_key) - 1U; + if ((eol = _warc_find_eol(val, buf + bsz - val)) == NULL ) { + /* no end of line */ + return -1; + } /* xstrpisotime() kindly overreads whitespace for us, so use that */ - val += sizeof(_key) - 1U; res = xstrpisotime(val, &on); - if (on == NULL || !isspace((unsigned char)*on)) { - /* hm, can we trust that number? Best not. */ - return (time_t)-1; + if (on != eol) { + /* line must end here */ + return -1; } return res; } @@ -797,4 +811,12 @@ _warc_find_eoh(const char *buf, size_t b return hit; } +static const char* +_warc_find_eol(const char *buf, size_t bsz) +{ + static const char _marker[] = "\r\n"; + const char *hit = xmemmem(buf, bsz, _marker, sizeof(_marker) - 1U); + + return hit; +} /* archive_read_support_format_warc.c ends here */ Modified: head/contrib/libarchive/libarchive/archive_read_support_format_xar.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_xar.c Sat Feb 11 00:56:18 2017 (r313571) +++ head/contrib/libarchive/libarchive/archive_read_support_format_xar.c Sat Feb 11 01:00:58 2017 (r313572) @@ -394,6 +394,7 @@ static void checksum_update(struct archi size_t, const void *, size_t); static int checksum_final(struct archive_read *, const void *, size_t, const void *, size_t); +static void checksum_cleanup(struct archive_read *); static int decompression_init(struct archive_read *, enum enctype); static int decompress(struct archive_read *, const void **, size_t *, const void *, size_t *); @@ -923,6 +924,7 @@ xar_cleanup(struct archive_read *a) int r; xar = (struct xar *)(a->format->data); + checksum_cleanup(a); r = decompression_cleanup(a); hdlink = xar->hdlink_list; while (hdlink != NULL) { @@ -1720,6 +1722,16 @@ decompression_cleanup(struct archive_rea } static void +checksum_cleanup(struct archive_read *a) { + struct xar *xar; + + xar = (struct xar *)(a->format->data); + + _checksum_final(&(xar->a_sumwrk), NULL, 0); + _checksum_final(&(xar->e_sumwrk), NULL, 0); +} + +static void xmlattr_cleanup(struct xmlattr_list *list) { struct xmlattr *attr, *next; From owner-svn-src-head@freebsd.org Sat Feb 11 01:07: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 C011FCD86AE; Sat, 11 Feb 2017 01:07:48 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75F97A93; Sat, 11 Feb 2017 01:07:48 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B17l4Z062662; Sat, 11 Feb 2017 01:07:47 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B17loM062657; Sat, 11 Feb 2017 01:07:47 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201702110107.v1B17loM062657@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 11 Feb 2017 01:07:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313573 - in head/sys: arm/arm arm/include contrib/vchiq/interface/compat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Sat, 11 Feb 2017 01:07:48 -0000 Author: ian Date: Sat Feb 11 01:07:46 2017 New Revision: 313573 URL: https://svnweb.freebsd.org/changeset/base/313573 Log: Stop including sys/types.h from arm's machine/atomic.h, fix the places where atomic.h was being included without ensuring that types.h (via param.h) was included first, as required by atomic(9). Modified: head/sys/arm/arm/identcpu-v4.c head/sys/arm/arm/identcpu-v6.c head/sys/arm/arm/stack_machdep.c head/sys/arm/include/atomic.h head/sys/contrib/vchiq/interface/compat/vchi_bsd.h Modified: head/sys/arm/arm/identcpu-v4.c ============================================================================== --- head/sys/arm/arm/identcpu-v4.c Sat Feb 11 01:00:58 2017 (r313572) +++ head/sys/arm/arm/identcpu-v4.c Sat Feb 11 01:07:46 2017 (r313573) @@ -43,8 +43,8 @@ #include __FBSDID("$FreeBSD$"); -#include #include +#include #include #include #include Modified: head/sys/arm/arm/identcpu-v6.c ============================================================================== --- head/sys/arm/arm/identcpu-v6.c Sat Feb 11 01:00:58 2017 (r313572) +++ head/sys/arm/arm/identcpu-v6.c Sat Feb 11 01:07:46 2017 (r313573) @@ -43,8 +43,8 @@ #include __FBSDID("$FreeBSD$"); -#include #include +#include #include #include #include Modified: head/sys/arm/arm/stack_machdep.c ============================================================================== --- head/sys/arm/arm/stack_machdep.c Sat Feb 11 01:00:58 2017 (r313572) +++ head/sys/arm/arm/stack_machdep.c Sat Feb 11 01:07:46 2017 (r313573) @@ -27,8 +27,8 @@ #include __FBSDID("$FreeBSD$"); -#include #include +#include #include #include Modified: head/sys/arm/include/atomic.h ============================================================================== --- head/sys/arm/include/atomic.h Sat Feb 11 01:00:58 2017 (r313572) +++ head/sys/arm/include/atomic.h Sat Feb 11 01:07:46 2017 (r313573) @@ -39,7 +39,6 @@ #ifndef _MACHINE_ATOMIC_H_ #define _MACHINE_ATOMIC_H_ -#include #include #ifndef _KERNEL Modified: head/sys/contrib/vchiq/interface/compat/vchi_bsd.h ============================================================================== --- head/sys/contrib/vchiq/interface/compat/vchi_bsd.h Sat Feb 11 01:00:58 2017 (r313572) +++ head/sys/contrib/vchiq/interface/compat/vchi_bsd.h Sat Feb 11 01:07:46 2017 (r313573) @@ -28,8 +28,8 @@ #ifndef __VCHI_BSD_H__ #define __VCHI_BSD_H__ -#include #include +#include #include #include #include From owner-svn-src-head@freebsd.org Sat Feb 11 02:33: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 1E3E3CDAF8D; Sat, 11 Feb 2017 02:33:50 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1134376; Sat, 11 Feb 2017 02:33:49 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B2Xn88000524; Sat, 11 Feb 2017 02:33:49 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B2XmH7000519; Sat, 11 Feb 2017 02:33:48 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201702110233.v1B2XmH7000519@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 11 Feb 2017 02:33:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313575 - in head: sys/boot/pc98 usr.sbin/makefs usr.sbin/makefs/ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Sat, 11 Feb 2017 02:33:50 -0000 Author: emaste Date: Sat Feb 11 02:33:48 2017 New Revision: 313575 URL: https://svnweb.freebsd.org/changeset/base/313575 Log: makefs: make the buffer functions look exactly like the kernel ones From NetBSD christos Sat Jan 26 00:19:39 2013 +0000 make the buffer functions look exactly like the kernel ones and add other cruft to make the kernel files compile. ffs.c 1.54 ffs/buf.c 1.13 ffs/buf.h 1.3 ffs/ffs_alloc.c 1.21 ffs/ffs_balloc.c 1.15 Reviewed by: marcel, ngie Obtained from: NetBSD Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8404 Added: head/sys/boot/pc98/ - copied from r312897, head/sys/boot/pc98/ Modified: head/usr.sbin/makefs/ffs.c head/usr.sbin/makefs/ffs/buf.c head/usr.sbin/makefs/ffs/buf.h head/usr.sbin/makefs/ffs/ffs_alloc.c head/usr.sbin/makefs/ffs/ffs_balloc.c Modified: head/usr.sbin/makefs/ffs.c ============================================================================== --- head/usr.sbin/makefs/ffs.c Sat Feb 11 02:00:56 2017 (r313574) +++ head/usr.sbin/makefs/ffs.c Sat Feb 11 02:33:48 2017 (r313575) @@ -973,7 +973,7 @@ ffs_write_file(union dinode *din, uint32 errno = bwrite(bp); if (errno != 0) goto bad_ffs_write_file; - brelse(bp); + brelse(bp, 0); if (!isfile) p += chunk; } Modified: head/usr.sbin/makefs/ffs/buf.c ============================================================================== --- head/usr.sbin/makefs/ffs/buf.c Sat Feb 11 02:00:56 2017 (r313574) +++ head/usr.sbin/makefs/ffs/buf.c Sat Feb 11 02:33:48 2017 (r313575) @@ -1,4 +1,4 @@ -/* $NetBSD: buf.c,v 1.12 2004/06/20 22:20:18 jmc Exp $ */ +/* $NetBSD: buf.c,v 1.13 2004/06/20 22:20:18 jmc Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -60,10 +60,12 @@ extern int sectorsize; /* XXX: from ffs TAILQ_HEAD(buftailhead,buf) buftail; int -bread(int fd, struct fs *fs, daddr_t blkno, int size, struct buf **bpp) +bread(struct vnode *vp, daddr_t blkno, int size, struct ucred *u1 __unused, + struct buf **bpp) { off_t offset; ssize_t rv; + struct fs *fs = vp->fs; assert (fs != NULL); assert (bpp != NULL); @@ -71,7 +73,7 @@ bread(int fd, struct fs *fs, daddr_t blk if (debug & DEBUG_BUF_BREAD) printf("bread: fs %p blkno %lld size %d\n", fs, (long long)blkno, size); - *bpp = getblk(fd, fs, blkno, size); + *bpp = getblk(vp, blkno, size, 0, 0, 0); offset = (*bpp)->b_blkno * sectorsize; /* XXX */ if (debug & DEBUG_BUF_BREAD) printf("bread: bp %p blkno %lld offset %lld bcount %ld\n", @@ -95,7 +97,7 @@ bread(int fd, struct fs *fs, daddr_t blk } void -brelse(struct buf *bp) +brelse(struct buf *bp, int u1 __unused) { assert (bp != NULL); @@ -174,12 +176,16 @@ bcleanup(void) } struct buf * -getblk(int fd, struct fs *fs, daddr_t blkno, int size) +getblk(struct vnode *vp, daddr_t blkno, int size, int u1 __unused, + int u2 __unused, int u3 __unused) { static int buftailinitted; struct buf *bp; void *n; + int fd = vp->fd; + struct fs *fs = vp->fs; + blkno += vp->offset; assert (fs != NULL); if (debug & DEBUG_BUF_GETBLK) printf("getblk: fs %p blkno %lld size %d\n", fs, Modified: head/usr.sbin/makefs/ffs/buf.h ============================================================================== --- head/usr.sbin/makefs/ffs/buf.h Sat Feb 11 02:00:56 2017 (r313574) +++ head/usr.sbin/makefs/ffs/buf.h Sat Feb 11 02:33:48 2017 (r313575) @@ -1,4 +1,4 @@ -/* $NetBSD: buf.h,v 1.2 2001/11/02 03:12:49 lukem Exp $ */ +/* $NetBSD: buf.h,v 1.3 2001/11/02 03:12:49 lukem Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -43,6 +43,15 @@ #include #include +struct ucred; + +struct vnode { + int fd; + void *fs; + void *v_data; + int offset; +}; + struct buf { void * b_data; long b_bufsize; @@ -56,10 +65,11 @@ struct buf { }; void bcleanup(void); -int bread(int, struct fs *, daddr_t, int, struct buf **); -void brelse(struct buf *); +int bread(struct vnode *, daddr_t, int, struct ucred *, + struct buf **); +void brelse(struct buf *, int); int bwrite(struct buf *); -struct buf * getblk(int, struct fs *, daddr_t, int); +struct buf * getblk(struct vnode *, daddr_t, int, int, int, int); #define bdwrite(bp) bwrite(bp) #define clrbuf(bp) memset((bp)->b_data, 0, (u_int)(bp)->b_bcount) Modified: head/usr.sbin/makefs/ffs/ffs_alloc.c ============================================================================== --- head/usr.sbin/makefs/ffs/ffs_alloc.c Sat Feb 11 02:00:56 2017 (r313574) +++ head/usr.sbin/makefs/ffs/ffs_alloc.c Sat Feb 11 02:33:48 2017 (r313575) @@ -297,19 +297,20 @@ ffs_alloccg(struct inode *ip, int cg, da int error, frags, allocsiz, i; struct fs *fs = ip->i_fs; const int needswap = UFS_FSNEEDSWAP(fs); + struct vnode vp = { ip->i_fd, ip->i_fs, NULL, 0 }; if (fs->fs_cs(fs, cg).cs_nbfree == 0 && size == fs->fs_bsize) return (0); - error = bread(ip->i_fd, ip->i_fs, fsbtodb(fs, cgtod(fs, cg)), - (int)fs->fs_cgsize, &bp); + error = bread(&vp, fsbtodb(fs, cgtod(fs, cg)), (int)fs->fs_cgsize, + NULL, &bp); if (error) { - brelse(bp); + brelse(bp, 0); return (0); } cgp = (struct cg *)bp->b_data; if (!cg_chkmagic_swap(cgp, needswap) || (cgp->cg_cs.cs_nbfree == 0 && size == fs->fs_bsize)) { - brelse(bp); + brelse(bp, 0); return (0); } if (size == fs->fs_bsize) { @@ -332,7 +333,7 @@ ffs_alloccg(struct inode *ip, int cg, da * allocated, and hacked up */ if (cgp->cg_cs.cs_nbfree == 0) { - brelse(bp); + brelse(bp, 0); return (0); } bno = ffs_alloccgblk(ip, bp, bpref); @@ -432,6 +433,7 @@ ffs_blkfree(struct inode *ip, daddr_t bn int i, error, cg, blk, frags, bbase; struct fs *fs = ip->i_fs; const int needswap = UFS_FSNEEDSWAP(fs); + struct vnode vp = { ip->i_fd, ip->i_fs, NULL, 0 }; if (size > fs->fs_bsize || fragoff(fs, size) != 0 || fragnum(fs, bno) + numfrags(fs, size) > fs->fs_frag) { @@ -444,15 +446,15 @@ ffs_blkfree(struct inode *ip, daddr_t bn (uintmax_t)ip->i_number); return; } - error = bread(ip->i_fd, ip->i_fs, fsbtodb(fs, cgtod(fs, cg)), - (int)fs->fs_cgsize, &bp); + error = bread(&vp, fsbtodb(fs, cgtod(fs, cg)), (int)fs->fs_cgsize, + NULL, &bp); if (error) { - brelse(bp); + brelse(bp, 0); return; } cgp = (struct cg *)bp->b_data; if (!cg_chkmagic_swap(cgp, needswap)) { - brelse(bp); + brelse(bp, 0); return; } cgbno = dtogd(fs, bno); Modified: head/usr.sbin/makefs/ffs/ffs_balloc.c ============================================================================== --- head/usr.sbin/makefs/ffs/ffs_balloc.c Sat Feb 11 02:00:56 2017 (r313574) +++ head/usr.sbin/makefs/ffs/ffs_balloc.c Sat Feb 11 02:33:48 2017 (r313575) @@ -89,6 +89,7 @@ ffs_balloc_ufs1(struct inode *ip, off_t int32_t *allocblk, allociblk[NIADDR + 1]; int32_t *allocib; const int needswap = UFS_FSNEEDSWAP(fs); + struct vnode vp = { ip->i_fd, ip->i_fs, NULL, 0 }; lbn = lblkno(fs, offset); size = blkoff(fs, offset) + bufsize; @@ -132,10 +133,10 @@ ffs_balloc_ufs1(struct inode *ip, off_t */ if (bpp != NULL) { - error = bread(ip->i_fd, ip->i_fs, lbn, - fs->fs_bsize, bpp); + error = bread(&vp, lbn, fs->fs_bsize, NULL, + bpp); if (error) { - brelse(*bpp); + brelse(*bpp, 0); return (error); } } @@ -158,10 +159,10 @@ ffs_balloc_ufs1(struct inode *ip, off_t */ if (bpp != NULL) { - error = bread(ip->i_fd, ip->i_fs, lbn, - osize, bpp); + error = bread(&vp, lbn, osize, NULL, + bpp); if (error) { - brelse(*bpp); + brelse(*bpp, 0); return (error); } } @@ -188,7 +189,7 @@ ffs_balloc_ufs1(struct inode *ip, off_t if (error) return (error); if (bpp != NULL) { - bp = getblk(ip->i_fd, ip->i_fs, lbn, nsize); + bp = getblk(&vp, lbn, nsize, 0, 0, 0); bp->b_blkno = fsbtodb(fs, newb); clrbuf(bp); *bpp = bp; @@ -226,7 +227,7 @@ ffs_balloc_ufs1(struct inode *ip, off_t return error; nb = newb; *allocblk++ = nb; - bp = getblk(ip->i_fd, ip->i_fs, indirs[1].in_lbn, fs->fs_bsize); + bp = getblk(&vp, indirs[1].in_lbn, fs->fs_bsize, 0, 0, 0); bp->b_blkno = fsbtodb(fs, nb); clrbuf(bp); /* @@ -244,10 +245,9 @@ ffs_balloc_ufs1(struct inode *ip, off_t */ for (i = 1;;) { - error = bread(ip->i_fd, ip->i_fs, indirs[i].in_lbn, - fs->fs_bsize, &bp); + error = bread(&vp, indirs[i].in_lbn, fs->fs_bsize, NULL, &bp); if (error) { - brelse(bp); + brelse(bp, 0); return error; } bap = (int32_t *)bp->b_data; @@ -256,20 +256,19 @@ ffs_balloc_ufs1(struct inode *ip, off_t break; i++; if (nb != 0) { - brelse(bp); + brelse(bp, 0); continue; } if (pref == 0) pref = ffs_blkpref_ufs1(ip, lbn, 0, (int32_t *)0); error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, &newb); if (error) { - brelse(bp); + brelse(bp, 0); return error; } nb = newb; *allocblk++ = nb; - nbp = getblk(ip->i_fd, ip->i_fs, indirs[i].in_lbn, - fs->fs_bsize); + nbp = getblk(&vp, indirs[i].in_lbn, fs->fs_bsize, 0, 0, 0); nbp->b_blkno = fsbtodb(fs, nb); clrbuf(nbp); /* @@ -278,7 +277,7 @@ ffs_balloc_ufs1(struct inode *ip, off_t */ if ((error = bwrite(nbp)) != 0) { - brelse(bp); + brelse(bp, 0); return error; } bap[indirs[i - 1].in_off] = ufs_rw32(nb, needswap); @@ -294,13 +293,13 @@ ffs_balloc_ufs1(struct inode *ip, off_t pref = ffs_blkpref_ufs1(ip, lbn, indirs[num].in_off, &bap[0]); error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, &newb); if (error) { - brelse(bp); + brelse(bp, 0); return error; } nb = newb; *allocblk++ = nb; if (bpp != NULL) { - nbp = getblk(ip->i_fd, ip->i_fs, lbn, fs->fs_bsize); + nbp = getblk(&vp, lbn, fs->fs_bsize, 0, 0, 0); nbp->b_blkno = fsbtodb(fs, nb); clrbuf(nbp); *bpp = nbp; @@ -314,11 +313,11 @@ ffs_balloc_ufs1(struct inode *ip, off_t bwrite(bp); return (0); } - brelse(bp); + brelse(bp, 0); if (bpp != NULL) { - error = bread(ip->i_fd, ip->i_fs, lbn, (int)fs->fs_bsize, &nbp); + error = bread(&vp, lbn, (int)fs->fs_bsize, NULL, &nbp); if (error) { - brelse(nbp); + brelse(nbp, 0); return error; } *bpp = nbp; @@ -340,6 +339,7 @@ ffs_balloc_ufs2(struct inode *ip, off_t int64_t *allocblk, allociblk[NIADDR + 1]; int64_t *allocib; const int needswap = UFS_FSNEEDSWAP(fs); + struct vnode vp = { ip->i_fd, ip->i_fs, NULL, 0 }; lbn = lblkno(fs, offset); size = blkoff(fs, offset) + bufsize; @@ -383,10 +383,10 @@ ffs_balloc_ufs2(struct inode *ip, off_t */ if (bpp != NULL) { - error = bread(ip->i_fd, ip->i_fs, lbn, - fs->fs_bsize, bpp); + error = bread(&vp, lbn, fs->fs_bsize, NULL, + bpp); if (error) { - brelse(*bpp); + brelse(*bpp, 0); return (error); } } @@ -409,10 +409,10 @@ ffs_balloc_ufs2(struct inode *ip, off_t */ if (bpp != NULL) { - error = bread(ip->i_fd, ip->i_fs, lbn, - osize, bpp); + error = bread(&vp, lbn, osize, NULL, + bpp); if (error) { - brelse(*bpp); + brelse(*bpp, 0); return (error); } } @@ -439,7 +439,7 @@ ffs_balloc_ufs2(struct inode *ip, off_t if (error) return (error); if (bpp != NULL) { - bp = getblk(ip->i_fd, ip->i_fs, lbn, nsize); + bp = getblk(&vp, lbn, nsize, 0, 0, 0); bp->b_blkno = fsbtodb(fs, newb); clrbuf(bp); *bpp = bp; @@ -477,7 +477,7 @@ ffs_balloc_ufs2(struct inode *ip, off_t return error; nb = newb; *allocblk++ = nb; - bp = getblk(ip->i_fd, ip->i_fs, indirs[1].in_lbn, fs->fs_bsize); + bp = getblk(&vp, indirs[1].in_lbn, fs->fs_bsize, 0, 0, 0); bp->b_blkno = fsbtodb(fs, nb); clrbuf(bp); /* @@ -495,10 +495,9 @@ ffs_balloc_ufs2(struct inode *ip, off_t */ for (i = 1;;) { - error = bread(ip->i_fd, ip->i_fs, indirs[i].in_lbn, - fs->fs_bsize, &bp); + error = bread(&vp, indirs[i].in_lbn, fs->fs_bsize, NULL, &bp); if (error) { - brelse(bp); + brelse(bp, 0); return error; } bap = (int64_t *)bp->b_data; @@ -507,20 +506,19 @@ ffs_balloc_ufs2(struct inode *ip, off_t break; i++; if (nb != 0) { - brelse(bp); + brelse(bp, 0); continue; } if (pref == 0) pref = ffs_blkpref_ufs2(ip, lbn, 0, (int64_t *)0); error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, &newb); if (error) { - brelse(bp); + brelse(bp, 0); return error; } nb = newb; *allocblk++ = nb; - nbp = getblk(ip->i_fd, ip->i_fs, indirs[i].in_lbn, - fs->fs_bsize); + nbp = getblk(&vp, indirs[i].in_lbn, fs->fs_bsize, 0, 0, 0); nbp->b_blkno = fsbtodb(fs, nb); clrbuf(nbp); /* @@ -529,7 +527,7 @@ ffs_balloc_ufs2(struct inode *ip, off_t */ if ((error = bwrite(nbp)) != 0) { - brelse(bp); + brelse(bp, 0); return error; } bap[indirs[i - 1].in_off] = ufs_rw64(nb, needswap); @@ -545,13 +543,13 @@ ffs_balloc_ufs2(struct inode *ip, off_t pref = ffs_blkpref_ufs2(ip, lbn, indirs[num].in_off, &bap[0]); error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, &newb); if (error) { - brelse(bp); + brelse(bp, 0); return error; } nb = newb; *allocblk++ = nb; if (bpp != NULL) { - nbp = getblk(ip->i_fd, ip->i_fs, lbn, fs->fs_bsize); + nbp = getblk(&vp, lbn, fs->fs_bsize, 0, 0, 0); nbp->b_blkno = fsbtodb(fs, nb); clrbuf(nbp); *bpp = nbp; @@ -565,11 +563,11 @@ ffs_balloc_ufs2(struct inode *ip, off_t bwrite(bp); return (0); } - brelse(bp); + brelse(bp, 0); if (bpp != NULL) { - error = bread(ip->i_fd, ip->i_fs, lbn, (int)fs->fs_bsize, &nbp); + error = bread(&vp, lbn, (int)fs->fs_bsize, NULL, &nbp); if (error) { - brelse(nbp); + brelse(nbp, 0); return error; } *bpp = nbp; From owner-svn-src-head@freebsd.org Sat Feb 11 02:45: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 A9EC0CDA448; Sat, 11 Feb 2017 02:45:55 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D4C1C91; Sat, 11 Feb 2017 02:45:55 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B2jsiW004497; Sat, 11 Feb 2017 02:45:54 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B2jsic004496; Sat, 11 Feb 2017 02:45:54 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201702110245.v1B2jsic004496@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 11 Feb 2017 02:45:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313576 - head/sys/boot/pc98 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Sat, 11 Feb 2017 02:45:55 -0000 Author: emaste Date: Sat Feb 11 02:45:54 2017 New Revision: 313576 URL: https://svnweb.freebsd.org/changeset/base/313576 Log: Remove sys/boot/pc98 accidentally restored in r313575 Reported by: rpokala Deleted: head/sys/boot/pc98/ From owner-svn-src-head@freebsd.org Sat Feb 11 05: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 AE710CDA1F3; Sat, 11 Feb 2017 05:19:46 +0000 (UTC) (envelope-from mmokhi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58940671; Sat, 11 Feb 2017 05:19:46 +0000 (UTC) (envelope-from mmokhi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B5JjGO067261; Sat, 11 Feb 2017 05:19:45 GMT (envelope-from mmokhi@FreeBSD.org) Received: (from mmokhi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B5Jjm5067259; Sat, 11 Feb 2017 05:19:45 GMT (envelope-from mmokhi@FreeBSD.org) Message-Id: <201702110519.v1B5Jjm5067259@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmokhi set sender to mmokhi@FreeBSD.org using -f From: Mahdi Mokhtari Date: Sat, 11 Feb 2017 05:19:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313577 - in head: share/misc usr.bin/calendar/calendars X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Sat, 11 Feb 2017 05:19:46 -0000 Author: mmokhi (ports committer) Date: Sat Feb 11 05:19:45 2017 New Revision: 313577 URL: https://svnweb.freebsd.org/changeset/base/313577 Log: Adding myself to committers-ports.dot and calendar.freebsd Submitted by: mmokhi Approved by: feld, mat (mentors) Differential Revision: https://reviews.freebsd.org/D9528 Modified: head/share/misc/committers-ports.dot head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Sat Feb 11 02:45:54 2017 (r313576) +++ head/share/misc/committers-ports.dot Sat Feb 11 05:19:45 2017 (r313577) @@ -173,6 +173,7 @@ milki [label="Jonathan Chu\nmilki@FreeBS misha [label="Mikhail Pchelin\nmisha@FreeBSD.org\n2016/11/15"] miwi [label="Martin Wilke\nmiwi@FreeBSD.org\n2006/06/04"] mm [label="Martin Matuska\nmm@FreeBSD.org\n2007/04/04"] +mmokhi [label="Mahdi Mokhtari\nmmokhi@FreeBSD.org\n2017/02/09"] mnag [label="Marcus Alves Grando\nmnag@FreeBSD.org\n2005/09/15"] mva [label="Marcus von Appen\nmva@FreeBSD.org\n2009/02/16"] nemysis [label="Rusmir Dusko\nnemysis@FreeBSD.org\n2013/07/31"] @@ -372,6 +373,7 @@ erwin -> simon feld -> brnrd feld -> junovitch +feld -> mmokhi feld -> rezny fjoe -> danfe @@ -481,6 +483,7 @@ makc -> rakuco mat -> bmah mat -> dvl mat -> gordon +mat -> mmokhi mat -> tcberner mat -> thierry mat -> woodsb02 Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Sat Feb 11 02:45:54 2017 (r313576) +++ head/usr.bin/calendar/calendars/calendar.freebsd Sat Feb 11 05:19:45 2017 (r313577) @@ -28,6 +28,7 @@ 01/19 Ruslan Ermilov born in Simferopol, USSR, 1974 01/19 Marcelo S. Araujo born in Joinville, Santa Catarina, Brazil, 1981 01/20 Poul-Henning Kamp born in Korsoer, Denmark, 1966 +01/21 Mahdi Mokhtari born in Tehran, Iran, 1995 01/22 Johann Visagie born in Cape Town, South Africa, 1970 01/23 Hideyuki KURASHINA born in Niigata, Japan, 1982 01/24 Fabien Thomas born in Avignon, France, 1971 From owner-svn-src-head@freebsd.org Sat Feb 11 05:33: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 8A907CDA9FE; Sat, 11 Feb 2017 05:33:50 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5788310B0; Sat, 11 Feb 2017 05:33:50 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B5XncF075493; Sat, 11 Feb 2017 05:33:49 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B5XnxI075492; Sat, 11 Feb 2017 05:33:49 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702110533.v1B5XnxI075492@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 11 Feb 2017 05:33:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313578 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Sat, 11 Feb 2017 05:33:50 -0000 Author: adrian Date: Sat Feb 11 05:33:49 2017 New Revision: 313578 URL: https://svnweb.freebsd.org/changeset/base/313578 Log: [net80211] add a sysctl that forces a vap restart. Well, vap restart really does "all restart" for now, which will be a good way of debugging firmware restart issues. Modified: head/sys/net80211/ieee80211_freebsd.c Modified: head/sys/net80211/ieee80211_freebsd.c ============================================================================== --- head/sys/net80211/ieee80211_freebsd.c Sat Feb 11 05:19:45 2017 (r313577) +++ head/sys/net80211/ieee80211_freebsd.c Sat Feb 11 05:33:49 2017 (r313578) @@ -180,6 +180,26 @@ ieee80211_sysctl_radar(SYSCTL_HANDLER_AR return 0; } +/* + * For now, just restart everything. + * + * Later on, it'd be nice to have a separate VAP restart to + * full-device restart. + */ +static int +ieee80211_sysctl_vap_restart(SYSCTL_HANDLER_ARGS) +{ + struct ieee80211vap *vap = arg1; + int t = 0, error; + + error = sysctl_handle_int(oidp, &t, 0, req); + if (error || !req->newptr) + return error; + + ieee80211_restart_all(vap->iv_ic); + return 0; +} + void ieee80211_sysctl_attach(struct ieee80211com *ic) { @@ -259,6 +279,12 @@ ieee80211_sysctl_vattach(struct ieee8021 &vap->iv_ampdu_mintraffic[WME_AC_VI], 0, "VI traffic tx aggr threshold (pps)"); } + + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "force_restart", CTLTYPE_INT | CTLFLAG_RW, vap, 0, + ieee80211_sysctl_vap_restart, "I", + "force a VAP restart"); + if (vap->iv_caps & IEEE80211_C_DFS) { SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "radar", CTLTYPE_INT | CTLFLAG_RW, vap->iv_ic, 0, From owner-svn-src-head@freebsd.org Sat Feb 11 09:57: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 7D1B0CD9DD2; Sat, 11 Feb 2017 09:57:33 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: from mail-io0-x244.google.com (mail-io0-x244.google.com [IPv6:2607:f8b0:4001:c06::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47C9E1249; Sat, 11 Feb 2017 09:57:33 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: by mail-io0-x244.google.com with SMTP id c80so7937762iod.1; Sat, 11 Feb 2017 01:57:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=ERQR8bGmWHZgDY/QtaahA40WhJLOZMk6Rugg2hvvqiM=; b=KHpoOwDQ92wznrvjEONvJctafe3VS6500XdoLXhb994CzbQzmkPnKMqh2TlULUKyGj R6eLU3B2Tbjr2t1juMUP/npHE3dnkyh39haD5sxk29zr15GgxCLBM6HWZjiXoobhiWNq iMm4UZF48JbQn/sJTDtXnaq2T4+mu+upKTuzgpPNspYe+LL7XmS03+MOkLKRuHYFeJJ/ 2u5gsEMZsS7kkwYoyO6a+avAh/Odw+9wCA2pPE619Cuv7x4gGHEm37rxYk5EVCEwGJsM 9SK2SqdZVh1B8OUwbsEUgWyVkJk0T24eKDvWsX43g68aR0ME97BHsZv9Qfll8xkv91rV suJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=ERQR8bGmWHZgDY/QtaahA40WhJLOZMk6Rugg2hvvqiM=; b=GIew9m98Q1z66cGZLJsFhucU6EIDnhpmQIZ/lLOgjizt1eg643BGKArBqF2IpAdO36 atGYk0Q93DKmJa+uFpOh04bC7qx7OBNMJGrgoboVgAv/TPmIEHdl0xL2HQAqtW6dIj9i owInkFgaG7WYLg24l1MgyXYZvz3NPv2SF1T0s0OBkrJTi4VWDIR9kJUx+UmKJO/3V7I4 AwclymsLTuheFDnD7RJaIWqB7NDej4AKbSviV6r1hY6ITLvfCFmNOfxYES13uSf4k9aB gRXo659GGqZdPX+xBAAan/6aFsFcys649PetdRs/Jhznq0hxflFLmdz9VaDHy0DRS9qh GvZA== X-Gm-Message-State: AMke39nTfSkq+qLXRTg+16X9dsfDaEgvojwFf90zW8g+hPXI/y+11mpotw+IUKHSx5j1035WasEpTbKZCM77UA== X-Received: by 10.107.135.42 with SMTP id j42mr12819930iod.171.1486807052536; Sat, 11 Feb 2017 01:57:32 -0800 (PST) MIME-Version: 1.0 Sender: antoine.brodin.freebsd@gmail.com Received: by 10.107.205.142 with HTTP; Sat, 11 Feb 2017 01:57:32 -0800 (PST) In-Reply-To: <201702101737.v1AHb4Qg077598@repo.freebsd.org> References: <201702101737.v1AHb4Qg077598@repo.freebsd.org> From: Antoine Brodin Date: Sat, 11 Feb 2017 10:57:32 +0100 X-Google-Sender-Auth: TEw2OsQL2He3X3dvcz1oTV3erCg Message-ID: Subject: Re: svn commit: r313560 - head/sys/net To: Gleb Smirnoff Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-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: Sat, 11 Feb 2017 09:57:33 -0000 On Fri, Feb 10, 2017 at 6:37 PM, Gleb Smirnoff wrote: > Author: glebius > Date: Fri Feb 10 17:37:04 2017 > New Revision: 313560 > URL: https://svnweb.freebsd.org/changeset/base/313560 > > Log: > Last consumer of _WANT_RTENTRY gone. > > Modified: > head/sys/net/route.h Hi, This change seems to break devel/llvm37 : http://beefy11.nyi.freebsd.org/data/head-i386-default/p433828_s313572/logs/errors/llvm37-3.7.1_4.log http://beefy12.nyi.freebsd.org/data/head-amd64-default/p433828_s313572/logs/errors/llvm37-3.7.1_4.log More than 6000 are skipped due to this failure. Cheers, Antoine (with hat: portmgr) From owner-svn-src-head@freebsd.org Sat Feb 11 12:55:53 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 C00D5CDA73A; Sat, 11 Feb 2017 12:55:53 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wr0-x243.google.com (mail-wr0-x243.google.com [IPv6:2a00:1450:400c:c0c::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 63C7D1509; Sat, 11 Feb 2017 12:55:53 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wr0-x243.google.com with SMTP id 89so17836649wrr.1; Sat, 11 Feb 2017 04:55:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=mSwsK/SiE5o3n7++BPDV70GUCKlWK2XUhScQr1vW6DU=; b=i+K27P2js46wNzzzaaBk9LFuSc0OCaLG32Fe4jcyBI3u0yFpIOtBkfFW0tszvRg1gn PJjOikOVTuBhDmK3alJVlCnl+cSQvRncxxupIvQ5x0GHOUUhlrEu2x6ujzBm/Oly/Row PYKffX3uaukb+BrG5lI+3NWTaj73EIRjVgiqJp2dJ7RlOJ4idrtj3rfoF3ZMU6qJP7eS 5s6APBFZaha4j1n+YWyUHaFe9NXE1B2VibUxHONUEBizc/r39hh3lPuUblBP0UyFBycy lU9qNQo/c8ueQPoCHvCZchcnn5i414CUczQphinCqBk+tOYrgzT9LRLAEQxGVB5By/fg lSlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=mSwsK/SiE5o3n7++BPDV70GUCKlWK2XUhScQr1vW6DU=; b=NJpxJ+wkRfwUS3stzP75gxADKBjlLR2/LHp5h8WAy63KDH3M1Q9tUZQwN3KDZZXXVa IxwSv9h2AmjaJYB+yJWYhCVMk9gMPIKxvCrGd3LTIBDBTZCeh05nuThgQ3avbiMiorQD wnCHMYDdG7MHmWNBlv30DhPrCb1dOd0tRl4kZW9q/eoY8WKCbZI5BN+2vbz5dvSBkMei vmEpTS6AuwaZ0M99fAIHS4t6IlmjRuKYia+obfhAJTQTb0cY/f7dyPV1o6I+khv7wrII XiTG71t1RniPGgcEtmGRAPH+tnp48Uqpw5xPggHNRMHX1wEiEZoMkxzzmomhylYMjbHq e/gA== X-Gm-Message-State: AMke39kevxcyQ4qHeYn0bWUpZ54UGjxt3LLsxQUCEUXxtGnOkA+7PKgPv8LaSLExeOQlbg== X-Received: by 10.223.131.193 with SMTP id 59mr11470470wre.186.1486817751286; Sat, 11 Feb 2017 04:55:51 -0800 (PST) Received: from brick (gbh5.clarehall.cam.ac.uk. [131.111.224.37]) by smtp.gmail.com with ESMTPSA id w30sm6342892wrb.5.2017.02.11.04.55.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 Feb 2017 04:55:50 -0800 (PST) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Sat, 11 Feb 2017 12:55:48 +0000 From: Edward Tomasz Napierala To: John Baldwin Cc: Gleb Smirnoff , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r312988 - in head/sys: compat/cloudabi compat/linux kern sys Message-ID: <20170211125548.GB3574@brick> Mail-Followup-To: John Baldwin , Gleb Smirnoff , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org References: <201701301257.v0UCvNrK065993@repo.freebsd.org> <3349880.lYJPXOWCO7@ralph.baldwin.cx> <20170201182337.GG3334@FreeBSD.org> <148601396.h8ndg2hV6R@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <148601396.h8ndg2hV6R@ralph.baldwin.cx> User-Agent: Mutt/1.7.2 (2016-11-26) X-BeenThere: svn-src-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: Sat, 11 Feb 2017 12:55:53 -0000 On 0201T1236, John Baldwin wrote: > On Wednesday, February 01, 2017 10:23:37 AM Gleb Smirnoff wrote: > > On Tue, Jan 31, 2017 at 02:13:36PM -0800, John Baldwin wrote: > > J> On Monday, January 30, 2017 12:57:23 PM Edward Tomasz Napierala wrote: > > J> > Author: trasz > > J> > Date: Mon Jan 30 12:57:22 2017 > > J> > New Revision: 312988 > > J> > URL: https://svnweb.freebsd.org/changeset/base/312988 > > J> > > > J> > Log: > > J> > Add kern_listen(), kern_shutdown(), and kern_socket(), and use them > > J> > instead of their sys_*() counterparts in various compats. The svr4 > > J> > is left untouched, because there's no point. > > J> > > J> Note that you can compile test svr4 since it is still in the tree. > > J> If we want to remove svr4, then we should remove it. However, we > > J> should maintain code that is in the tree if it is still there. > > > > All we can do right now is maintain it as compilable. My example with > > COMPAT_OLDSOCK shows that SVR4 simply doesn't work as kld, and nobody > > complains. > > > > Okay, what if I say on freebsd-arch/freebsd-current that I am going > > to remove it and wait for any objections for a month, and then do it? > > I would rather remove it than start skipping it in tree sweeps. We should > strive to maintain code that is in our tree. If you can't get things tested, > then we are better off removing the code instead of having it rot in the > tree (cf the discussion on old ISA drivers). On one hand you're right. On the other - in this particular case including svr4 (which I have no way of testing) in this sweep could break it, while not touching it couldn't, as the old method continues to work. Removing it is not a bad idea, though. Gleb, would you? From owner-svn-src-head@freebsd.org Sat Feb 11 13:57: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 C3A3BCDBD5D; Sat, 11 Feb 2017 13:57:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from springbank.echomania.com (springbank.echomania.com [IPv6:2a01:7c8:aab2:81::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "springbank.echomania.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8CD8E6D6; Sat, 11 Feb 2017 13:57:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) X-Virus-Scanned: Debian amavisd-new at springbank.echomania.com Received: from [IPv6:2001:7b8:3a7::ec1c:8b58:8931:41f2] (unknown [IPv6:2001:7b8:3a7:0:ec1c:8b58:8931:41f2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by springbank.echomania.com (Postfix) with ESMTPSA id 8E125580108; Sat, 11 Feb 2017 14:57:03 +0100 (CET) From: Dimitry Andric Message-Id: <58334877-F513-4FFC-B2D2-62E9BD5EE3D2@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_CE5B491D-E4D6-43EA-8492-D96E6805BE37"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: svn commit: r313560 - head/sys/net Date: Sat, 11 Feb 2017 14:56:52 +0100 In-Reply-To: Cc: Gleb Smirnoff , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Antoine Brodin References: <201702101737.v1AHb4Qg077598@repo.freebsd.org> X-Mailer: Apple Mail (2.3259) X-BeenThere: svn-src-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: Sat, 11 Feb 2017 13:57:07 -0000 --Apple-Mail=_CE5B491D-E4D6-43EA-8492-D96E6805BE37 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 11 Feb 2017, at 10:57, Antoine Brodin wrote: >=20 > On Fri, Feb 10, 2017 at 6:37 PM, Gleb Smirnoff = wrote: >> Author: glebius >> Date: Fri Feb 10 17:37:04 2017 >> New Revision: 313560 >> URL: https://svnweb.freebsd.org/changeset/base/313560 >>=20 >> Log: >> Last consumer of _WANT_RTENTRY gone. >>=20 >> Modified: >> head/sys/net/route.h >=20 > Hi, >=20 > This change seems to break devel/llvm37 : > = http://beefy11.nyi.freebsd.org/data/head-i386-default/p433828_s313572/logs= /errors/llvm37-3.7.1_4.log > = http://beefy12.nyi.freebsd.org/data/head-amd64-default/p433828_s313572/log= s/errors/llvm37-3.7.1_4.log >=20 > More than 6000 are skipped due to this failure. Oof, I didn't think about that, sorry. Can we just apply this upstream fix: https://reviews.llvm.org/rL294806 to all llvm ports, please? -DImitry --Apple-Mail=_CE5B491D-E4D6-43EA-8492-D96E6805BE37 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAlifGC8ACgkQsF6jCi4glqMLqQCfQNbOb1Q5NVMcb/mtRUdwzm0I Ws0AoOyxtK+eiGwITH208e/1qnioDTdk =gi7Y -----END PGP SIGNATURE----- --Apple-Mail=_CE5B491D-E4D6-43EA-8492-D96E6805BE37-- From owner-svn-src-head@freebsd.org Sat Feb 11 14:36: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 A1217CDAAFB; Sat, 11 Feb 2017 14:36:18 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [199.48.133.146]) by mx1.freebsd.org (Postfix) with ESMTP id 8A08E1804; Sat, 11 Feb 2017 14:36:17 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from ford.home.vangyzen.net (unknown [76.164.15.242]) by smtp.vangyzen.net (Postfix) with ESMTPSA id 4F1C2564DF; Sat, 11 Feb 2017 08:36:17 -0600 (CST) Subject: Re: svn commit: r313401 - head/sys/netinet To: Ed Maste , Gleb Smirnoff References: <201702071857.v17Ivvn1018291@repo.freebsd.org> <20170210201008.GG1973@FreeBSD.org> Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Eric van Gyzen Message-ID: <5f3b4a86-7ca0-e823-346c-b035c0d5390b@FreeBSD.org> Date: Sat, 11 Feb 2017 08:36:15 -0600 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-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: Sat, 11 Feb 2017 14:36:18 -0000 On 02/10/2017 15:04, Ed Maste wrote: > On 10 February 2017 at 15:10, Gleb Smirnoff wrote: >> >> Thanks. I think inet_ntoa() and anything that uses static buffer >> should just be removed from libkern. > > Agreed. A quick grep found inet_ntoa used in: Also agreed. I had already started on it. ;-) Eric From owner-svn-src-head@freebsd.org Sat Feb 11 14:38: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 C1ED0CDAB70 for ; Sat, 11 Feb 2017 14:38:00 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm2-vm5.bullet.mail.ne1.yahoo.com (nm2-vm5.bullet.mail.ne1.yahoo.com [98.138.91.224]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CB5E1987 for ; Sat, 11 Feb 2017 14:38:00 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1486823872; bh=pmwmhvHllt2wW4PZHsbNcfXWuEwSVLkjQHVUudm6M5Y=; h=Subject:To:References:From:Date:In-Reply-To:From:Subject; b=R4JlBdpzl8Puo9twrF1vSVwCO3JUL2BvDVAZugy4ryTdgriLnzo2Dq/pn2Caralv43CtT2huTn3ojw0PoWtbm0XXvWqZhv4tgEogH1P8IbDKbSJN80dBsT4+biPZPcD/eGAMZQrNJuEe/0VJNWBIgf0T35gVZKalfmf1epBWckUJaT/FSVx3K8lKbktTEnB/PcC9LnSDsRG2EdNORgd9GO3BNtjfPjkgOn6/kIfbnQlvu5+0AaPLBQuWoMizZyznw8Kash5Ps5suvtZg9+7nzW0MKg07oHCvbrOvcb2Ss4BGR+9xX20/UQSQHE30T76uTVgAfVBZcUhECkRBhQuK1Q== Received: from [98.138.101.128] by nm2.bullet.mail.ne1.yahoo.com with NNFMP; 11 Feb 2017 14:37:52 -0000 Received: from [98.138.104.113] by tm16.bullet.mail.ne1.yahoo.com with NNFMP; 11 Feb 2017 14:37:52 -0000 Received: from [127.0.0.1] by smtp222.mail.ne1.yahoo.com with NNFMP; 11 Feb 2017 14:37:52 -0000 X-Yahoo-Newman-Id: 937608.1512.bm@smtp222.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: iuNIW4UVM1mYVOp1NnniA_IPVcR7FGBfh.flO4DqchiBtn6 qgjkqBq1v8.OoawL5Y8zd4yVoYuK7A4R.U5kmkYPIlL05wq27k.za_6QiBkR fao4o.L0Fj4a430UlhuUB7tQhXxOlzL7XRbvp.t8A1j6eMhrcJ9afiTsAK3f nFMihp835KUkTwpEelUB8Pmof2wYVgl4PV3R79sYKXL3vnzb5VrNU4X5I093 UuLZbFTEAvxK3h_gXXEz_.4.tCD54ZC7w4I3YM5FPAFduI5gmtqEOlO5.o7j s_39XDCcFK6OR565QZEeAOT4VRSNNn3DJYp7k_iey3D_a.xsaqNjcvSWBgv6 pfAh0dJPoVVj0Fsj6BXl9fN7.uB.jV0pwKOQIqpAtBTXLj1Vz6hsaiZ3lGZV yR83InuWiSfbOieZFx2GaYes00I7YrwNadE7jAuMxxJ4ytUWAK9Jz.EKIPS4 VKiBb33kaUxlYBBAyuHujkrfG0H.XZNj1iqWTFUXjfKx5.o1sH8w45U.HK1m Bp7CqMryP3Pyf22rC7iKOHj3XZJaqDyhK1lKggbHsVBJqwMw- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r312988 - in head/sys: compat/cloudabi compat/linux kern sys To: John Baldwin , Gleb Smirnoff , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org References: <201701301257.v0UCvNrK065993@repo.freebsd.org> <3349880.lYJPXOWCO7@ralph.baldwin.cx> <20170201182337.GG3334@FreeBSD.org> <148601396.h8ndg2hV6R@ralph.baldwin.cx> <20170211125548.GB3574@brick> From: Pedro Giffuni Message-ID: <7cd316b7-acd1-c2ac-2ea0-1e81635aba91@FreeBSD.org> Date: Sat, 11 Feb 2017 09:40:19 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <20170211125548.GB3574@brick> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-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: Sat, 11 Feb 2017 14:38:00 -0000 On 2/11/2017 7:55 AM, Edward Tomasz Napierala wrote: > On 0201T1236, John Baldwin wrote: >> On Wednesday, February 01, 2017 10:23:37 AM Gleb Smirnoff wrote: >>> On Tue, Jan 31, 2017 at 02:13:36PM -0800, John Baldwin wrote: >>> J> On Monday, January 30, 2017 12:57:23 PM Edward Tomasz Napierala wrote: >>> J> > Author: trasz >>> J> > Date: Mon Jan 30 12:57:22 2017 >>> J> > New Revision: 312988 >>> J> > URL: https://svnweb.freebsd.org/changeset/base/312988 >>> J> > >>> J> > Log: >>> J> > Add kern_listen(), kern_shutdown(), and kern_socket(), and use them >>> J> > instead of their sys_*() counterparts in various compats. The svr4 >>> J> > is left untouched, because there's no point. >>> J> >>> J> Note that you can compile test svr4 since it is still in the tree. >>> J> If we want to remove svr4, then we should remove it. However, we >>> J> should maintain code that is in the tree if it is still there. >>> >>> All we can do right now is maintain it as compilable. My example with >>> COMPAT_OLDSOCK shows that SVR4 simply doesn't work as kld, and nobody >>> complains. >>> >>> Okay, what if I say on freebsd-arch/freebsd-current that I am going >>> to remove it and wait for any objections for a month, and then do it? >> I would rather remove it than start skipping it in tree sweeps. We should >> strive to maintain code that is in our tree. If you can't get things tested, >> then we are better off removing the code instead of having it rot in the >> tree (cf the discussion on old ISA drivers). > On one hand you're right. On the other - in this particular case including > svr4 (which I have no way of testing) in this sweep could break it, while > not touching it couldn't, as the old method continues to work. > > Removing it is not a bad idea, though. Gleb, would you? > > FWIW, the SVR4 emulator was never completely ported from NetBSD and no one seems to have any interest in bringing it to amd64. I'd say kill it, if someone ever needs it back we have subversion. Pedro. From owner-svn-src-head@freebsd.org Sat Feb 11 15:25: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 81574CDB83F; Sat, 11 Feb 2017 15:25:50 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 504D711D2; Sat, 11 Feb 2017 15:25:50 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BFPnLU028763; Sat, 11 Feb 2017 15:25:49 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BFPnP0028762; Sat, 11 Feb 2017 15:25:49 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201702111525.v1BFPnP0028762@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Sat, 11 Feb 2017 15:25:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313645 - head/sys/boot/efi/libefi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Sat, 11 Feb 2017 15:25:50 -0000 Author: tsoome Date: Sat Feb 11 15:25:49 2017 New Revision: 313645 URL: https://svnweb.freebsd.org/changeset/base/313645 Log: loader: implement MEDIA_FILEPATH_DP support in efipart The efipart rework did break the ARM systems as the new code is using more exact filters to sort the devices and we need to add support for MEDIA_FILEPATH_DP device paths. PR: 216940 Reported by: karl@denninger.net Reviewed by: allanjude, manu Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D9520 Modified: head/sys/boot/efi/libefi/efipart.c Modified: head/sys/boot/efi/libefi/efipart.c ============================================================================== --- head/sys/boot/efi/libefi/efipart.c Sat Feb 11 14:04:18 2017 (r313644) +++ head/sys/boot/efi/libefi/efipart.c Sat Feb 11 15:25:49 2017 (r313645) @@ -417,6 +417,89 @@ efipart_hdinfo_add(EFI_HANDLE disk_handl return (0); } +/* + * The MEDIA_FILEPATH_DP has device name. + * From U-Boot sources it looks like names are in the form + * of typeN:M, where type is interface type, N is disk id + * and M is partition id. + */ +static int +efipart_hdinfo_add_filepath(EFI_HANDLE disk_handle) +{ + EFI_DEVICE_PATH *devpath; + FILEPATH_DEVICE_PATH *node; + char *pathname, *p; + int unit, len; + pdinfo_t *pd, *last; + + /* First collect and verify all the data */ + if ((devpath = efi_lookup_devpath(disk_handle)) == NULL) + return (ENOENT); + node = (FILEPATH_DEVICE_PATH *)efi_devpath_last_node(devpath); + if (node == NULL) + return (ENOENT); /* This should not happen. */ + + pd = malloc(sizeof(pdinfo_t)); + if (pd == NULL) { + printf("Failed to add disk, out of memory\n"); + return (ENOMEM); + } + memset(pd, 0, sizeof(pdinfo_t)); + STAILQ_INIT(&pd->pd_part); + last = STAILQ_LAST(&hdinfo, pdinfo, pd_link); + if (last != NULL) + unit = last->pd_unit + 1; + else + unit = 0; + + /* FILEPATH_DEVICE_PATH has 0 terminated string */ + for (len = 0; node->PathName[len] != 0; len++) + ; + if ((pathname = malloc(len + 1)) == NULL) { + printf("Failed to add disk, out of memory\n"); + free(pd); + return (ENOMEM); + } + cpy16to8(node->PathName, pathname, len + 1); + p = strchr(pathname, ':'); + + /* + * Assume we are receiving handles in order, first disk handle, + * then partitions for this disk. If this assumption proves + * false, this code would need update. + */ + if (p == NULL) { /* no colon, add the disk */ + pd->pd_handle = disk_handle; + pd->pd_unit = unit; + pd->pd_devpath = devpath; + STAILQ_INSERT_TAIL(&hdinfo, pd, pd_link); + free(pathname); + return (0); + } + p++; /* skip the colon */ + unit = (int)strtol(p, NULL, 0); + + /* + * We should have disk registered, if not, we are receiving + * handles out of order, and this code should be reworked + * to create "blank" disk for partition, and to find the + * disk based on PathName compares. + */ + if (last == NULL) { + printf("BUG: No disk for partition \"%s\"\n", pathname); + free(pathname); + free(pd); + return (EINVAL); + } + /* Add the partition. */ + pd->pd_handle = disk_handle; + pd->pd_unit = unit; + pd->pd_devpath = devpath; + STAILQ_INSERT_TAIL(&last->pd_part, pd, pd_link); + free(pathname); + return (0); +} + static void efipart_updatehd(void) { @@ -467,6 +550,12 @@ efipart_updatehd(void) efipart_hdinfo_add(handle, efipart_handles[i]); continue; } + + if (DevicePathType(node) == MEDIA_DEVICE_PATH && + DevicePathSubType(node) == MEDIA_FILEPATH_DP) { + efipart_hdinfo_add_filepath(efipart_handles[i]); + continue; + } } } From owner-svn-src-head@freebsd.org Sat Feb 11 17:02: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 E0E58CCD332; Sat, 11 Feb 2017 17:02:35 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 76C551D33; Sat, 11 Feb 2017 17:02:35 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-wm0-x242.google.com with SMTP id c85so11428375wmi.1; Sat, 11 Feb 2017 09:02:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=HZ8hUruQdjhDhmBNFZJhUUHAWVppNTX2lmd8Vbk4YXw=; b=G3D28o5nD6VmMTMzxRY2A7dGLtrnzSTlaPNdyGpCmuDyG/OVLxPAMrDC9PAVwuqoYP SY4IxzWDg4VeOPvGnNUq5vF1ajh/s2JKKzjhNziy6wk3YsharCskNG2KqwO3dmuZSMPR nLXHlOP6R/bbb/M9oyS/3x6xNX0wuZctw6lcF5LnrakkXnvG1Wos86vdbPAtv43KCG0G f0OZPP+P9OvYh0bGtxtUoFr05mLBymSxIkcgY5+sgTHgs6XtB/G8K6hccAwPV/Ek8evT yD/gsf7Chx4fYgVUFqPKXDevpbZToATjOsUcMf9qzRp9liHrx/ktc9YZ+B2Ncrh/6ZsA YTFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=HZ8hUruQdjhDhmBNFZJhUUHAWVppNTX2lmd8Vbk4YXw=; b=PFkiaBasKUYupxZ2tthMTj5HOIXjEk4budFWbL17SBBf+jG2UwlrRC4XF8SN0YTge1 9ctMHTlxi4FipZQln2hLhaTzzh/qcnjY4ltqWdE2bF6Os3NGxqdFiFLyMOWCkuMUflhT 2Hy86c9gNFJi9IOiY9pbOsD4nCVgZ4SHgPFXMcZi+JpXBJuFOZ0IfYRcJq3wY31F0SKo bsco/aBKMBoP0S/PfrDPHqTgLUp3XUKM1+D01tl00qXJ+2FckpHGUakQMTxBgw9SCgoo BtjESV9Z3eab8mo1OxOAUbxWIXhM5J+n/G/iTJew/ea+TD/7TIKFL2yYvgwcJ2sMlLyO HvwA== X-Gm-Message-State: AMke39lZa9GhDKp9qWOhjC8B4zawbVNs2V8BNpCHMJa4eLHZRuCHHtBzP87Mfi0lOwp+TNhSdKl9aL5al4z0+g== X-Received: by 10.28.47.7 with SMTP id v7mr27176582wmv.138.1486832553720; Sat, 11 Feb 2017 09:02:33 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.128.135 with HTTP; Sat, 11 Feb 2017 09:02:33 -0800 (PST) In-Reply-To: <5f3b4a86-7ca0-e823-346c-b035c0d5390b@FreeBSD.org> References: <201702071857.v17Ivvn1018291@repo.freebsd.org> <20170210201008.GG1973@FreeBSD.org> <5f3b4a86-7ca0-e823-346c-b035c0d5390b@FreeBSD.org> From: Adrian Chadd Date: Sat, 11 Feb 2017 09:02:33 -0800 Message-ID: Subject: Re: svn commit: r313401 - head/sys/netinet To: Eric van Gyzen Cc: Ed Maste , Gleb Smirnoff , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-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: Sat, 11 Feb 2017 17:02:36 -0000 Can we do the same with ether_ntoa too? -adrian From owner-svn-src-head@freebsd.org Sat Feb 11 17:05: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 3310FCCD44D; Sat, 11 Feb 2017 17:05:10 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B3531F12; Sat, 11 Feb 2017 17:05:09 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BH59ql071552; Sat, 11 Feb 2017 17:05:09 GMT (envelope-from rstone@FreeBSD.org) Received: (from rstone@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BH58OE071548; Sat, 11 Feb 2017 17:05:08 GMT (envelope-from rstone@FreeBSD.org) Message-Id: <201702111705.v1BH58OE071548@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rstone set sender to rstone@FreeBSD.org using -f From: Ryan Stone Date: Sat, 11 Feb 2017 17:05:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313646 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Sat, 11 Feb 2017 17:05:10 -0000 Author: rstone Date: Sat Feb 11 17:05:08 2017 New Revision: 313646 URL: https://svnweb.freebsd.org/changeset/base/313646 Log: Don't zero out srtt after excess retransmits If the TCP stack has retransmitted more than 1/4 of the total number of retransmits before a connection drop, it decides that its current RTT estimate is hopelessly out of date and decides to recalculate it from scratch starting with the next ACK. Unfortunately, it implements this by zeroing out the current RTT estimate. Drop this hack entirely, as it makes it significantly more difficult to debug connection issues. Instead check for excessive retransmits at the point where srtt is updated from an ACK being received. If we've exceeded 1/4 of the maximum retransmits, discard the previous srtt estimate and replace it with the latest rtt measurement. Differential Revision: https://reviews.freebsd.org/D9519 Reviewed by: gnn Sponsored by: Dell EMC Isilon Modified: head/sys/netinet/tcp_input.c head/sys/netinet/tcp_timer.c head/sys/netinet/tcp_timer.h Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Sat Feb 11 15:25:49 2017 (r313645) +++ head/sys/netinet/tcp_input.c Sat Feb 11 17:05:08 2017 (r313646) @@ -3494,7 +3494,7 @@ tcp_xmit_timer(struct tcpcb *tp, int rtt TCPSTAT_INC(tcps_rttupdated); tp->t_rttupdated++; - if (tp->t_srtt != 0) { + if ((tp->t_srtt != 0) && (tp->t_rxtshift <= TCP_RTT_INVALIDATE)) { /* * srtt is stored as fixed point with 5 bits after the * binary point (i.e., scaled by 8). The following magic Modified: head/sys/netinet/tcp_timer.c ============================================================================== --- head/sys/netinet/tcp_timer.c Sat Feb 11 15:25:49 2017 (r313645) +++ head/sys/netinet/tcp_timer.c Sat Feb 11 17:05:08 2017 (r313646) @@ -845,20 +845,16 @@ tcp_timer_rexmt(void * xtp) (tp->t_rxtshift == 3)) tp->t_flags &= ~(TF_REQ_SCALE|TF_REQ_TSTMP|TF_SACK_PERMIT); /* - * If we backed off this far, our srtt estimate is probably bogus. - * Clobber it so we'll take the next rtt measurement as our srtt; - * move the current srtt into rttvar to keep the current - * retransmit times until then. + * If we backed off this far, notify the L3 protocol that we're having + * connection problems. */ - if (tp->t_rxtshift > TCP_MAXRXTSHIFT / 4) { + if (tp->t_rxtshift > TCP_RTT_INVALIDATE) { #ifdef INET6 if ((tp->t_inpcb->inp_vflag & INP_IPV6) != 0) in6_losing(tp->t_inpcb); else #endif in_losing(tp->t_inpcb); - tp->t_rttvar += (tp->t_srtt >> TCP_RTT_SHIFT); - tp->t_srtt = 0; } tp->snd_nxt = tp->snd_una; tp->snd_recover = tp->snd_max; Modified: head/sys/netinet/tcp_timer.h ============================================================================== --- head/sys/netinet/tcp_timer.h Sat Feb 11 15:25:49 2017 (r313645) +++ head/sys/netinet/tcp_timer.h Sat Feb 11 17:05:08 2017 (r313646) @@ -119,6 +119,13 @@ #define TCPTV_DELACK ( hz/10 ) /* 100ms timeout */ +/* + * If we exceed this number of retransmits for a single segment, we'll consider + * the current srtt measurement no longer valid and will recalculate from + * scratch starting with the next ACK. + */ +#define TCP_RTT_INVALIDATE (TCP_MAXRXTSHIFT / 4) + #ifdef TCPTIMERS static const char *tcptimers[] = { "REXMT", "PERSIST", "KEEP", "2MSL", "DELACK" }; From owner-svn-src-head@freebsd.org Sat Feb 11 18:04: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 0D659CD83D7; Sat, 11 Feb 2017 18:04:45 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D15011FEC; Sat, 11 Feb 2017 18:04:44 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BI4hni096547; Sat, 11 Feb 2017 18:04:43 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BI4h4g096546; Sat, 11 Feb 2017 18:04:43 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201702111804.v1BI4h4g096546@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sat, 11 Feb 2017 18:04:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313647 - head/usr.sbin/pciconf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Sat, 11 Feb 2017 18:04:45 -0000 Author: cem Date: Sat Feb 11 18:04:43 2017 New Revision: 313647 URL: https://svnweb.freebsd.org/changeset/base/313647 Log: pciconf(8): Replace an assert with errx The condition can be hit with simple user input, so it isn't an invariant. Just error out. PR: 217003 Reported by: Vladislav V. Prodan Sponsored by: Dell EMC Isilon Modified: head/usr.sbin/pciconf/pciconf.c Modified: head/usr.sbin/pciconf/pciconf.c ============================================================================== --- head/usr.sbin/pciconf/pciconf.c Sat Feb 11 17:05:08 2017 (r313646) +++ head/usr.sbin/pciconf/pciconf.c Sat Feb 11 18:04:43 2017 (r313647) @@ -879,7 +879,8 @@ getdevice(const char *name) errx(1, "Device name is too long"); memcpy(patterns[0].pd_name, name, cp - name); patterns[0].pd_unit = strtol(cp, &cp, 10); - assert(*cp == '\0'); + if (*cp != '\0') + errx(1, "Invalid device name"); patterns[0].flags = PCI_GETCONF_MATCH_NAME | PCI_GETCONF_MATCH_UNIT; pc.num_patterns = 1; pc.pat_buf_len = sizeof(patterns); From owner-svn-src-head@freebsd.org Sat Feb 11 19:12: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 6798CCDB7DA; Sat, 11 Feb 2017 19:12:15 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 45BD62AA; Sat, 11 Feb 2017 19:12:15 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 72D695A9F27; Sat, 11 Feb 2017 19:12:08 +0000 (UTC) Date: Sat, 11 Feb 2017 19:12:08 +0000 From: Brooks Davis To: Dimitry Andric Cc: Antoine Brodin , Gleb Smirnoff , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313560 - head/sys/net Message-ID: <20170211191208.GB90269@spindle.one-eyed-alien.net> References: <201702101737.v1AHb4Qg077598@repo.freebsd.org> <58334877-F513-4FFC-B2D2-62E9BD5EE3D2@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0OAP2g/MAC+5xKAE" Content-Disposition: inline In-Reply-To: <58334877-F513-4FFC-B2D2-62E9BD5EE3D2@FreeBSD.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-BeenThere: svn-src-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: Sat, 11 Feb 2017 19:12:15 -0000 --0OAP2g/MAC+5xKAE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Feb 11, 2017 at 02:56:52PM +0100, Dimitry Andric wrote: > On 11 Feb 2017, at 10:57, Antoine Brodin wrote: > >=20 > > On Fri, Feb 10, 2017 at 6:37 PM, Gleb Smirnoff wr= ote: > >> Author: glebius > >> Date: Fri Feb 10 17:37:04 2017 > >> New Revision: 313560 > >> URL: https://svnweb.freebsd.org/changeset/base/313560 > >>=20 > >> Log: > >> Last consumer of _WANT_RTENTRY gone. > >>=20 > >> Modified: > >> head/sys/net/route.h > >=20 > > Hi, > >=20 > > This change seems to break devel/llvm37 : > > http://beefy11.nyi.freebsd.org/data/head-i386-default/p433828_s313572/l= ogs/errors/llvm37-3.7.1_4.log > > http://beefy12.nyi.freebsd.org/data/head-amd64-default/p433828_s313572/= logs/errors/llvm37-3.7.1_4.log > >=20 > > More than 6000 are skipped due to this failure. >=20 > Oof, I didn't think about that, sorry. Can we just apply this upstream > fix: https://reviews.llvm.org/rL294806 to all llvm ports, please? I'll apply this and commit it soon. -- Brooks --0OAP2g/MAC+5xKAE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJYn2IHAAoJEKzQXbSebgfAPF4H/1i2tZdoALdHngIj+JGhRcMg 2EGGo5ZV0HJ8+sjVKgHdse7/DP0jrsn53YnRUdzPkPXS+qBOr8UbwKdtDLp3oyCO 2/sHdbgmr+RPpRMDTpk1tU7HvPritpsRL6qEM3NBWj+hzTS69jNKPPURHdvRWdEt cEAD/+ocINr52Bc2yqEncf6mFDPVVqJwf0/s249Rt7GLUma9yOb4C7DR8mi4bDOy z/jFw0RZoON6WwBrkRCnqHQjMPebVHlYMjG4YJogZf9yFg10wh1un4DDQfLZVGmE OisdUElivA/7Rsy/bvmgHeyKxRpIZIl4JoN5fynbr3fIxHWByY05yEf3jHaZP5A= =8pJ1 -----END PGP SIGNATURE----- --0OAP2g/MAC+5xKAE-- From owner-svn-src-head@freebsd.org Sat Feb 11 20:12: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 84B72CDBCFD; Sat, 11 Feb 2017 20:12:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54159E8D; Sat, 11 Feb 2017 20:12:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BKCs1V050010; Sat, 11 Feb 2017 20:12:54 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BKCsmp050009; Sat, 11 Feb 2017 20:12:54 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702112012.v1BKCsmp050009@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 20:12:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313650 - head/gnu/usr.bin/gdb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Sat, 11 Feb 2017 20:12:55 -0000 Author: ngie Date: Sat Feb 11 20:12:54 2017 New Revision: 313650 URL: https://svnweb.freebsd.org/changeset/base/313650 Log: Use SRCTOP/OBJTOP and simplify output using :H instead of "../" for directory entries This simplifies pathing in make/displayed output MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/gnu/usr.bin/gdb/Makefile.inc Modified: head/gnu/usr.bin/gdb/Makefile.inc ============================================================================== --- head/gnu/usr.bin/gdb/Makefile.inc Sat Feb 11 20:02:39 2017 (r313649) +++ head/gnu/usr.bin/gdb/Makefile.inc Sat Feb 11 20:12:54 2017 (r313650) @@ -5,19 +5,17 @@ VENDOR= marcel PACKAGE= gdb -BMAKE_GDB= ${.CURDIR}/.. -BMAKE_ROOT= ${BMAKE_GDB}/.. +BMAKE_GDB= ${.CURDIR:H} +BMAKE_ROOT= ${BMAKE_GDB:H} BMAKE_BU= ${BMAKE_ROOT}/binutils -CNTRB_ROOT= ${BMAKE_ROOT}/../../contrib -CNTRB_BU= ${CNTRB_ROOT}/binutils -CNTRB_GDB= ${CNTRB_ROOT}/gdb -CNTRB_RL= ${CNTRB_ROOT}/libreadline - -OBJ_ROOT= ${.OBJDIR}/../.. -OBJ_BU= ${OBJ_ROOT}/binutils -OBJ_GDB= ${OBJ_ROOT}/gdb -OBJ_RL= ${OBJ_ROOT}/../lib/libreadline/readline +CNTRB_BU= ${SRCTOP}/contrib/binutils +CNTRB_GDB= ${SRCTOP}/contrib/gdb +CNTRB_RL= ${SRCTOP}/contrib/libreadline + +OBJ_BU= ${OBJTOP}/gnu/usr.bin/binutils +OBJ_GDB= ${OBJTOP}/gnu/usr.bin/gdb +OBJ_RL= ${OBJTOP}/gnu/lib/libreadline/readline # These assignments duplicate much of the functionality of # MACHINE_CPUARCH, but there's no easy way to export make functions... @@ -47,12 +45,12 @@ CFLAGS+= -I${CNTRB_GDB}/gdb/config CFLAGS+= -I${CNTRB_BU}/include CFLAGS+= -I${CNTRB_GDB}/include CFLAGS+= -I${CNTRB_BU}/bfd -CFLAGS+= -I${OBJ_RL}/.. +CFLAGS+= -I${OBJ_RL:H} GENSRCS+= nm.h tm.h .if defined(GDB_CROSS_DEBUGGER) -CFLAGS+= -DCROSS_DEBUGGER -I${BMAKE_ROOT}/../.. +CFLAGS+= -DCROSS_DEBUGGER -I${BMAKE_ROOT:H:H} GDB_SUFFIX= -${TARGET_ARCH} MAN= .endif From owner-svn-src-head@freebsd.org Sat Feb 11 20: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 90986CDBD94; Sat, 11 Feb 2017 20:14:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60266FE1; Sat, 11 Feb 2017 20:14:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BKEowR050117; Sat, 11 Feb 2017 20:14:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BKEoW2050116; Sat, 11 Feb 2017 20:14:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702112014.v1BKEoW2050116@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 20:14:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313651 - head/lib/libc/tests/tls X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Sat, 11 Feb 2017 20:14:51 -0000 Author: ngie Date: Sat Feb 11 20:14:50 2017 New Revision: 313651 URL: https://svnweb.freebsd.org/changeset/base/313651 Log: Manipulate OBJDIR with :H when referencing dso directory This reduces path lengths, etc in memory with make by a minimal value Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/tls/Makefile Modified: head/lib/libc/tests/tls/Makefile ============================================================================== --- head/lib/libc/tests/tls/Makefile Sat Feb 11 20:12:54 2017 (r313650) +++ head/lib/libc/tests/tls/Makefile Sat Feb 11 20:14:50 2017 (r313651) @@ -16,7 +16,7 @@ NETBSD_ATF_TESTS_C+= tls_dynamic_test .include "../Makefile.netbsd-tests" -DSODIR= ${.OBJDIR}/../tls_dso +DSODIR= ${.OBJDIR:H}/tls_dso LIBADD.tls_static_test+= pthread LDFLAGS.tls_static_test+= -static From owner-svn-src-head@freebsd.org Sat Feb 11 20:18: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 07E28CDBEB8; Sat, 11 Feb 2017 20:18:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C92341260; Sat, 11 Feb 2017 20:18:25 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BKIOMk050392; Sat, 11 Feb 2017 20:18:24 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BKIO3I050391; Sat, 11 Feb 2017 20:18:24 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702112018.v1BKIO3I050391@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 20:18:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313652 - head/usr.bin/bsdcat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Sat, 11 Feb 2017 20:18:26 -0000 Author: ngie Date: Sat Feb 11 20:18:24 2017 New Revision: 313652 URL: https://svnweb.freebsd.org/changeset/base/313652 Log: Use SRCTOP instead of .CURDIR relative paths with ".." This simplifies pathing in make/displayed output MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/usr.bin/bsdcat/Makefile Modified: head/usr.bin/bsdcat/Makefile ============================================================================== --- head/usr.bin/bsdcat/Makefile Sat Feb 11 20:14:50 2017 (r313651) +++ head/usr.bin/bsdcat/Makefile Sat Feb 11 20:18:24 2017 (r313652) @@ -2,10 +2,10 @@ .include -_LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive -_LIBARCHIVECONFDIR= ${.CURDIR}/../../lib/libarchive +_LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive +_LIBARCHIVECONFDIR= ${SRCTOP}/lib/libarchive -PROG= bsdcat +PROG= bsdcat BSDCAT_VERSION_STRING= 3.2.2 .PATH: ${_LIBARCHIVEDIR}/cat From owner-svn-src-head@freebsd.org Sat Feb 11 20:19: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 40366CDBF1B; Sat, 11 Feb 2017 20:19:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F65A13A0; Sat, 11 Feb 2017 20:19:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BKJ5TJ050464; Sat, 11 Feb 2017 20:19:05 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BKJ5HA050463; Sat, 11 Feb 2017 20:19:05 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702112019.v1BKJ5HA050463@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 20:19:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313653 - head/usr.bin/atm/sscop X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Sat, 11 Feb 2017 20:19:06 -0000 Author: ngie Date: Sat Feb 11 20:19:04 2017 New Revision: 313653 URL: https://svnweb.freebsd.org/changeset/base/313653 Log: Use SRCTOP instead of .CURDIR relative paths with ".." This simplifies pathing in make/displayed output MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/usr.bin/atm/sscop/Makefile Modified: head/usr.bin/atm/sscop/Makefile ============================================================================== --- head/usr.bin/atm/sscop/Makefile Sat Feb 11 20:18:24 2017 (r313652) +++ head/usr.bin/atm/sscop/Makefile Sat Feb 11 20:19:04 2017 (r313653) @@ -1,6 +1,6 @@ # $FreeBSD$ -CONTRIB= ${.CURDIR}/../../../contrib/ngatm/sscop +CONTRIB= ${SRCTOP}/contrib/ngatm/sscop .PATH: ${CONTRIB} From owner-svn-src-head@freebsd.org Sat Feb 11 20: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 79DB9CDB105; Sat, 11 Feb 2017 20:27:07 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C0411840; Sat, 11 Feb 2017 20:27:07 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BKR6gx054515; Sat, 11 Feb 2017 20:27:06 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BKR6qj054514; Sat, 11 Feb 2017 20:27:06 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702112027.v1BKR6qj054514@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 20:27:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313654 - head/usr.bin/awk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Sat, 11 Feb 2017 20:27:07 -0000 Author: ngie Date: Sat Feb 11 20:27:06 2017 New Revision: 313654 URL: https://svnweb.freebsd.org/changeset/base/313654 Log: Use SRCTOP to refer to awk source in contrib/awk and remove unnecessary AWKSRC prefix for maketab.c The former simplifies pathing in make/displayed output, whereas the latter was just unnecessarily superfluous since .PATH referenced the path to maketab.c earlier on in the Makefile. MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/usr.bin/awk/Makefile Modified: head/usr.bin/awk/Makefile ============================================================================== --- head/usr.bin/awk/Makefile Sat Feb 11 20:19:04 2017 (r313653) +++ head/usr.bin/awk/Makefile Sat Feb 11 20:27:06 2017 (r313654) @@ -1,6 +1,6 @@ # $FreeBSD$ -AWKSRC= ${.CURDIR}/../../contrib/one-true-awk +AWKSRC= ${SRCTOP}/contrib/one-true-awk .PATH: ${AWKSRC} PROG= awk @@ -26,6 +26,6 @@ proctab.c: maketab ${BTOOLSPATH:U.}/maketab > proctab.c build-tools: maketab -maketab: ytab.h ${AWKSRC}/maketab.c ${BUILD_TOOLS_META} +maketab: ytab.h maketab.c ${BUILD_TOOLS_META} .include From owner-svn-src-head@freebsd.org Sat Feb 11 20:27: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 49AE8CDB17C; Sat, 11 Feb 2017 20:27:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1999419D9; Sat, 11 Feb 2017 20:27:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BKReHe054576; Sat, 11 Feb 2017 20:27:40 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BKRe7Z054574; Sat, 11 Feb 2017 20:27:40 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702112027.v1BKRe7Z054574@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 11 Feb 2017 20:27:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313655 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Sat, 11 Feb 2017 20:27:41 -0000 Author: kib Date: Sat Feb 11 20:27:39 2017 New Revision: 313655 URL: https://svnweb.freebsd.org/changeset/base/313655 Log: Change type of the prot parameter for kern_vm_mmap() from vm_prot_t to int. This makes the code to pass whole word of the mmap(2) syscall argument prot to the syscall helper kern_vm_mmap(), which can validate all bits. The change provides temporal fix for sys/vm/mmap_test mmap__bad_arguments, which was broken after r313352. PR: 216976 Reported and tested by: ngie Sponsored by: The FreeBSD Foundation Modified: head/sys/vm/vm_extern.h head/sys/vm/vm_mmap.c Modified: head/sys/vm/vm_extern.h ============================================================================== --- head/sys/vm/vm_extern.h Sat Feb 11 20:27:06 2017 (r313654) +++ head/sys/vm/vm_extern.h Sat Feb 11 20:27:39 2017 (r313655) @@ -72,7 +72,7 @@ void kmem_init_zero_region(void); void kmeminit(void); int kern_vm_mmap(struct thread *td, vm_offset_t addr, vm_size_t size, - vm_prot_t prot, int flags, int fd, off_t pos); + int prot, int flags, int fd, off_t pos); int kern_vm_mprotect(struct thread *td, vm_offset_t addr, vm_size_t size, vm_prot_t prot); int kern_vm_msync(struct thread *td, vm_offset_t addr, vm_size_t size, Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Sat Feb 11 20:27:06 2017 (r313654) +++ head/sys/vm/vm_mmap.c Sat Feb 11 20:27:39 2017 (r313655) @@ -196,7 +196,7 @@ sys_mmap(struct thread *td, struct mmap_ int kern_vm_mmap(struct thread *td, vm_offset_t addr, vm_size_t size, - vm_prot_t prot, int flags, int fd, off_t pos) + int prot, int flags, int fd, off_t pos) { struct file *fp; vm_size_t pageoff; From owner-svn-src-head@freebsd.org Sat Feb 11 20:27: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 28B21CDB1BD; Sat, 11 Feb 2017 20:27:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E9EBE1ADD; Sat, 11 Feb 2017 20:27:54 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BKRs3q054641; Sat, 11 Feb 2017 20:27:54 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BKRr6H054640; Sat, 11 Feb 2017 20:27:53 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702112027.v1BKRr6H054640@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 20:27:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313656 - head/usr.bin/bluetooth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Sat, 11 Feb 2017 20:27:55 -0000 Author: ngie Date: Sat Feb 11 20:27:53 2017 New Revision: 313656 URL: https://svnweb.freebsd.org/changeset/base/313656 Log: Use SRCTOP to define .include with usr.bin/Makefile.inc MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/usr.bin/bluetooth/Makefile.inc Modified: head/usr.bin/bluetooth/Makefile.inc ============================================================================== --- head/usr.bin/bluetooth/Makefile.inc Sat Feb 11 20:27:39 2017 (r313655) +++ head/usr.bin/bluetooth/Makefile.inc Sat Feb 11 20:27:53 2017 (r313656) @@ -1,4 +1,4 @@ # $FreeBSD$ -.include "${.CURDIR}/../../Makefile.inc" +.include "${SRCTOP}/usr.bin/Makefile.inc" From owner-svn-src-head@freebsd.org Sat Feb 11 20:31: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 808CDCDB562; Sat, 11 Feb 2017 20:31:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 504E21FB8; Sat, 11 Feb 2017 20:31:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BKVvKn058330; Sat, 11 Feb 2017 20:31:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BKVv8b058329; Sat, 11 Feb 2017 20:31:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702112031.v1BKVv8b058329@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 20:31:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313657 - head/tests/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Sat, 11 Feb 2017 20:31:58 -0000 Author: ngie Date: Sat Feb 11 20:31:57 2017 New Revision: 313657 URL: https://svnweb.freebsd.org/changeset/base/313657 Log: Revert r313565 -- :mmap__bad_arguments passes again after r313655 PR: 216976 Sponsored by: Dell EMC Isilon Modified: head/tests/sys/vm/mmap_test.c Modified: head/tests/sys/vm/mmap_test.c ============================================================================== --- head/tests/sys/vm/mmap_test.c Sat Feb 11 20:27:53 2017 (r313656) +++ head/tests/sys/vm/mmap_test.c Sat Feb 11 20:31:57 2017 (r313657) @@ -134,8 +134,6 @@ ATF_TC_BODY(mmap__bad_arguments, tc) checked_mmap(PROT_READ, MAP_SHARED, devstatfd, 0, "simple /dev/devstat shared"); - atf_tc_expect_fail("extra PROT flags check fails due to recent mmap(2) changes; bug # 216976"); - /* Extra PROT flags. */ checked_mmap(PROT_READ | PROT_WRITE | 0x100000, MAP_ANON, -1, EINVAL, "MAP_ANON with extra PROT flags"); From owner-svn-src-head@freebsd.org Sat Feb 11 21:31: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 172EACDA8EB; Sat, 11 Feb 2017 21:31:07 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wr0-x243.google.com (mail-wr0-x243.google.com [IPv6:2a00:1450:400c:c0c::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9E9DE1730; Sat, 11 Feb 2017 21:31:06 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wr0-x243.google.com with SMTP id o16so18884649wra.2; Sat, 11 Feb 2017 13:31:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=At4WyT2Cvwuz4974gH7pG9ycO5Z152orTfaDzck/MIk=; b=aQHAMebWSw7dVyBB4Cr8mFfsyuIWZ6nK06g1zAliNmjuN5QW7dMYtiH+KeNrlw7K0D I1hAxjdYAZFIvhA6KjUzZFCX4x1rHkQ6sVB4sPeg/+T7g62sHc9cfv4w+8Gt6/XDkYRY uZMVxrJcq/T8WVVR242Y67lSi+MoOtBn1Iw0Q3JmP5Yox4RmeafHGJBEnHnA83rEF2Hh 1FMsQr585I32TWx+hrzVImWuQtJaKoy4HC+7dH8G6lC9ecPcLhe6E/Zuzu+OgLHm0vjc k61ww0O6scmzGmf3Ptk20wJIMGFp0VVZSIFukBzFZGQbJIN88OT0P6GDk/a/jVrvdrnB rThQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=At4WyT2Cvwuz4974gH7pG9ycO5Z152orTfaDzck/MIk=; b=PqVyFUmSGj3S91ogXoGZQ7Sjf1h34ffdOfry/Ky/8uvLzqiBVqxYNxq9mbOyODoq6Y 0La6XXG5wDJHE4P/j0IlWyTHCD8uWtgw2UBETyCMpGiCgnz83DhXf1dxcF5LyF1SIccH XOutkmpEB3nkp6CbitH+15ocJFSRULRu7Dq/syptReJWfKvZwVsqvJTV/UNK5A+1pB+F +XUoS+wNoW3IER47nOdfe9fcA2jAPXkfJxj/xkMnX8CVVsnNMOaaOFD+aLaVACE5zV8D pDPFmxrHDMPgM5yajbYtO/cxt8W0iPcl78IpvBH4dpoF6a6fUYKHRYxUtUghkS3SCanZ 0Bfg== X-Gm-Message-State: AMke39nJ3guc/48OTyd2gmxVZRsOQDmA5Qvj/9ATToXqzGPGbPb1wOoTIRtJysE1ky8k0w== X-Received: by 10.223.160.206 with SMTP id n14mr13221880wrn.31.1486848664839; Sat, 11 Feb 2017 13:31:04 -0800 (PST) Received: from brick (gbh5.clarehall.cam.ac.uk. [131.111.224.37]) by smtp.gmail.com with ESMTPSA id i29sm7698664wrc.25.2017.02.11.13.31.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 Feb 2017 13:31:03 -0800 (PST) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Sat, 11 Feb 2017 21:31:02 +0000 From: Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313655 - head/sys/vm Message-ID: <20170211213102.GA65541@brick> Mail-Followup-To: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201702112027.v1BKRe7Z054574@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201702112027.v1BKRe7Z054574@repo.freebsd.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-BeenThere: svn-src-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: Sat, 11 Feb 2017 21:31:07 -0000 On 0211T2027, Konstantin Belousov wrote: > Author: kib > Date: Sat Feb 11 20:27:39 2017 > New Revision: 313655 > URL: https://svnweb.freebsd.org/changeset/base/313655 > > Log: > Change type of the prot parameter for kern_vm_mmap() from vm_prot_t to int. > > This makes the code to pass whole word of the mmap(2) syscall argument > prot to the syscall helper kern_vm_mmap(), which can validate all > bits. The change provides temporal fix for sys/vm/mmap_test > mmap__bad_arguments, which was broken after r313352. Thanks, and sorry for the breakage. From owner-svn-src-head@freebsd.org Sat Feb 11 23:06: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 569E4CDB615; Sat, 11 Feb 2017 23:06:55 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23C38DE4; Sat, 11 Feb 2017 23:06:55 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BN6s2D019971; Sat, 11 Feb 2017 23:06:54 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BN6sXc019970; Sat, 11 Feb 2017 23:06:54 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702112306.v1BN6sXc019970@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Feb 2017 23:06:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313659 - head/bin/pwd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Sat, 11 Feb 2017 23:06:55 -0000 Author: bapt Date: Sat Feb 11 23:06:53 2017 New Revision: 313659 URL: https://svnweb.freebsd.org/changeset/base/313659 Log: Remove space at and of line Reported by: make manlint MFC after: 2 days Modified: head/bin/pwd/pwd.1 Modified: head/bin/pwd/pwd.1 ============================================================================== --- head/bin/pwd/pwd.1 Sat Feb 11 20:46:49 2017 (r313658) +++ head/bin/pwd/pwd.1 Sat Feb 11 23:06:53 2017 (r313659) @@ -87,7 +87,7 @@ utility conforms to .St -p1003.1-2001 . .Sh HISTORY The -.Nm +.Nm command appeared in .At v5 . .Sh BUGS From owner-svn-src-head@freebsd.org Sat Feb 11 23:09: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 75E54CDB702; Sat, 11 Feb 2017 23:09:51 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 45C25FE1; Sat, 11 Feb 2017 23:09:51 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BN9oQd020103; Sat, 11 Feb 2017 23:09:50 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BN9olR020102; Sat, 11 Feb 2017 23:09:50 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702112309.v1BN9olR020102@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Feb 2017 23:09:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313660 - head/bin/sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Sat, 11 Feb 2017 23:09:51 -0000 Author: bapt Date: Sat Feb 11 23:09:50 2017 New Revision: 313660 URL: https://svnweb.freebsd.org/changeset/base/313660 Log: Remove empty Li Reported by: make manlint MFC after: 2 days Modified: head/bin/sh/sh.1 Modified: head/bin/sh/sh.1 ============================================================================== --- head/bin/sh/sh.1 Sat Feb 11 23:06:53 2017 (r313659) +++ head/bin/sh/sh.1 Sat Feb 11 23:09:50 2017 (r313660) @@ -1033,7 +1033,7 @@ The syntax of the command is: .Bd -unfilled -offset indent -compact .Ic case Ar word Ic in -.Ar pattern Ns Li ) Ar list Li ;; +.Ar pattern Ns ) Ar list Li ;; .Ar ... .Ic esac .Ed From owner-svn-src-head@freebsd.org Sat Feb 11 23:14: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 669EECDB8B7; Sat, 11 Feb 2017 23:14:29 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3634113C9; Sat, 11 Feb 2017 23:14:29 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BNESbL023929; Sat, 11 Feb 2017 23:14:28 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BNESNS023928; Sat, 11 Feb 2017 23:14:28 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702112314.v1BNESNS023928@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Feb 2017 23:14:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313661 - head/usr.bin/env X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Sat, 11 Feb 2017 23:14:29 -0000 Author: bapt Date: Sat Feb 11 23:14:28 2017 New Revision: 313661 URL: https://svnweb.freebsd.org/changeset/base/313661 Log: Escape Ss to avoid confusion by mdoc parser with the Ss macro Reported by: make manlint MFC after: 2 days Modified: head/usr.bin/env/env.1 Modified: head/usr.bin/env/env.1 ============================================================================== --- head/usr.bin/env/env.1 Sat Feb 11 23:09:50 2017 (r313660) +++ head/usr.bin/env/env.1 Sat Feb 11 23:14:28 2017 (r313661) @@ -133,7 +133,7 @@ is specified, prints out the names and values of the variables in the environment, with one name/value pair per line. .\" -.Ss Details of Fl S Ss (split-string) processing +.Ss Details of Fl S \&Ss (split-string) processing The processing of the .Fl S option will split the given From owner-svn-src-head@freebsd.org Sat Feb 11 23:36: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 2F4C1CDBE4C; Sat, 11 Feb 2017 23:36:54 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F05711D82; Sat, 11 Feb 2017 23:36:53 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BNarjB032090; Sat, 11 Feb 2017 23:36:53 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BNaraJ032089; Sat, 11 Feb 2017 23:36:53 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702112336.v1BNaraJ032089@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Feb 2017 23:36:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313662 - head/usr.bin/whois X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Sat, 11 Feb 2017 23:36:54 -0000 Author: bapt Date: Sat Feb 11 23:36:52 2017 New Revision: 313662 URL: https://svnweb.freebsd.org/changeset/base/313662 Log: Add missing -width after -Bl -tag Reported by: make manlint MFC after: 2 days Modified: head/usr.bin/whois/whois.1 Modified: head/usr.bin/whois/whois.1 ============================================================================== --- head/usr.bin/whois/whois.1 Sat Feb 11 23:14:28 2017 (r313661) +++ head/usr.bin/whois/whois.1 Sat Feb 11 23:36:52 2017 (r313662) @@ -206,7 +206,7 @@ The operands specified to are treated independently and may be used as queries on different whois servers. .Sh ENVIRONMENT -.Bl -tag +.Bl -tag -width WHOIS_SERVER .It Ev WHOIS_SERVER The primary default whois server. If this is unset, From owner-svn-src-head@freebsd.org Sat Feb 11 23:37: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 10E27CDBED6; Sat, 11 Feb 2017 23:37:50 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4B241EDD; Sat, 11 Feb 2017 23:37:49 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BNbmQQ032163; Sat, 11 Feb 2017 23:37:48 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BNbmp5032162; Sat, 11 Feb 2017 23:37:48 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702112337.v1BNbmp5032162@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Feb 2017 23:37:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313663 - head/usr.bin/unzip X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Sat, 11 Feb 2017 23:37:50 -0000 Author: bapt Date: Sat Feb 11 23:37:48 2017 New Revision: 313663 URL: https://svnweb.freebsd.org/changeset/base/313663 Log: Add missing section after .Xr reference Reported by: make manlint MFC after: 2 days Modified: head/usr.bin/unzip/unzip.1 Modified: head/usr.bin/unzip/unzip.1 ============================================================================== --- head/usr.bin/unzip/unzip.1 Sat Feb 11 23:36:52 2017 (r313662) +++ head/usr.bin/unzip/unzip.1 Sat Feb 11 23:37:48 2017 (r313663) @@ -171,7 +171,7 @@ The utility is only able to process ZIP archives handled by .Xr libarchive 3 . Depending on the installed version of -.Xr libarchive , +.Xr libarchive 3 , this may or may not include self-extracting archives. .Sh SEE ALSO .Xr libarchive 3 From owner-svn-src-head@freebsd.org Sat Feb 11 23:38: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 AA696CDBF39; Sat, 11 Feb 2017 23:38:29 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5DA73102F; Sat, 11 Feb 2017 23:38:29 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BNcSFg032229; Sat, 11 Feb 2017 23:38:28 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BNcSCY032228; Sat, 11 Feb 2017 23:38:28 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702112338.v1BNcSCY032228@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Feb 2017 23:38:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313664 - head/usr.bin/units X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Sat, 11 Feb 2017 23:38:29 -0000 Author: bapt Date: Sat Feb 11 23:38:28 2017 New Revision: 313664 URL: https://svnweb.freebsd.org/changeset/base/313664 Log: Escape No to avoid confusion with the No macro Reported by: make manlint MFC after: 2 days Modified: head/usr.bin/units/units.1 Modified: head/usr.bin/units/units.1 ============================================================================== --- head/usr.bin/units/units.1 Sat Feb 11 23:37:48 2017 (r313663) +++ head/usr.bin/units/units.1 Sat Feb 11 23:38:28 2017 (r313664) @@ -14,33 +14,33 @@ .Sh OPTIONS The following options are available: .Bl -tag -width indent -.It Fl h No , Fl -help +.It Fl h \&No , Fl -help Show an overview of options -.It Fl f Ar filename No , Fl -file Ar filename +.It Fl f Ar filename \&No , Fl -file Ar filename Specify the name of the units data file to load. -.It Fl H Ar filename No , Fl -historyfile Ar filename +.It Fl H Ar filename \&No , Fl -historyfile Ar filename Ignored, for compatibility with GNU units. .It Fl e , Fl -exponential Behave as if -o '%6e' was typed. -.It Fl q No , Fl -quiet +.It Fl q \&No , Fl -quiet Suppress prompting of the user for units and the display of statistics about the number of units loaded. -.It Fl U No , Fl -unitsfile +.It Fl U \&No , Fl -unitsfile If the default unit file exists prints its location. If not, print .Qo Units data file not found .Qc -.It Fl t No , Fl -terse +.It Fl t \&No , Fl -terse Only print the result. This is used when calling .Nm from other programs for easy to parse results. -.It Fl v No , Fl -verbose +.It Fl v \&No , Fl -verbose Print the units in the conversion output. Be more verbose in general. -.It Fl o Ar format No , Fl -output-format Ar format +.It Fl o Ar format \&No , Fl -output-format Ar format Select the output format string by which numbers are printed. -.It Fl V No , Fl -version +.It Fl V \&No , Fl -version Print the version number, usage, and then exit. .It Ar from-unit to-unit Allow a single unit conversion to be done directly from the command From owner-svn-src-head@freebsd.org Sat Feb 11 23:39: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 77932CDBF9B; Sat, 11 Feb 2017 23:39:15 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44C561189; Sat, 11 Feb 2017 23:39:15 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BNdEnb032301; Sat, 11 Feb 2017 23:39:14 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BNdEpQ032300; Sat, 11 Feb 2017 23:39:14 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702112339.v1BNdEpQ032300@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Feb 2017 23:39:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313665 - head/usr.bin/sdiff X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Sat, 11 Feb 2017 23:39:15 -0000 Author: bapt Date: Sat Feb 11 23:39:14 2017 New Revision: 313665 URL: https://svnweb.freebsd.org/changeset/base/313665 Log: Remove useless .Pp after the .Sh macro and remove empty line Reported by: make manlint MFC after: 2 days Modified: head/usr.bin/sdiff/sdiff.1 Modified: head/usr.bin/sdiff/sdiff.1 ============================================================================== --- head/usr.bin/sdiff/sdiff.1 Sat Feb 11 23:38:28 2017 (r313664) +++ head/usr.bin/sdiff/sdiff.1 Sat Feb 11 23:39:14 2017 (r313665) @@ -167,8 +167,6 @@ The default is was written from scratch for the public domain by .An Ray Lai Aq ray@cyth.net . .Sh CAVEATS -.Pp Tabs are treated as anywhere from one to eight characters wide, depending on the current column. Terminals that treat tabs as eight characters wide will look best. - From owner-svn-src-head@freebsd.org Sat Feb 11 23:39: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 C0E40CDBFF1; Sat, 11 Feb 2017 23:39:57 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8DED112E1; Sat, 11 Feb 2017 23:39:57 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BNdu5X032363; Sat, 11 Feb 2017 23:39:56 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BNduJV032362; Sat, 11 Feb 2017 23:39:56 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702112339.v1BNduJV032362@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Feb 2017 23:39:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313666 - head/usr.bin/revoke X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Sat, 11 Feb 2017 23:39:57 -0000 Author: bapt Date: Sat Feb 11 23:39:56 2017 New Revision: 313666 URL: https://svnweb.freebsd.org/changeset/base/313666 Log: Remove empty space at EOL and escept Ed Reported by: make manlint MFC after: 2 days Modified: head/usr.bin/revoke/revoke.1 Modified: head/usr.bin/revoke/revoke.1 ============================================================================== --- head/usr.bin/revoke/revoke.1 Sat Feb 11 23:39:14 2017 (r313665) +++ head/usr.bin/revoke/revoke.1 Sat Feb 11 23:39:56 2017 (r313666) @@ -1,6 +1,6 @@ .\" Copyright (c) 2009 Ed Schouten .\" All rights reserved. -.\" +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: @@ -9,7 +9,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" +.\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -21,7 +21,7 @@ .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. -.\" +.\" .\" $FreeBSD$ .\" .Dd June 15, 2009 @@ -53,4 +53,4 @@ The program first appeared in .Fx 8.0 . .Sh AUTHORS -.An Ed Schouten Aq Mt ed@FreeBSD.org +.An \&Ed Schouten Aq Mt ed@FreeBSD.org From owner-svn-src-head@freebsd.org Sat Feb 11 23:40: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 25ED0CDB08C; Sat, 11 Feb 2017 23:40:59 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E72D514D2; Sat, 11 Feb 2017 23:40:58 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BNev54032461; Sat, 11 Feb 2017 23:40:57 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BNevdl032460; Sat, 11 Feb 2017 23:40:57 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702112340.v1BNevdl032460@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Feb 2017 23:40:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313667 - head/usr.bin/mkuzip X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Sat, 11 Feb 2017 23:40:59 -0000 Author: bapt Date: Sat Feb 11 23:40:57 2017 New Revision: 313667 URL: https://svnweb.freebsd.org/changeset/base/313667 Log: Remove spaces at EOL and sort correctly the SEE ALSO section Reported by: make manlint MFC after: 2 days Modified: head/usr.bin/mkuzip/mkuzip.8 Modified: head/usr.bin/mkuzip/mkuzip.8 ============================================================================== --- head/usr.bin/mkuzip/mkuzip.8 Sat Feb 11 23:39:56 2017 (r313666) +++ head/usr.bin/mkuzip/mkuzip.8 Sat Feb 11 23:40:57 2017 (r313667) @@ -58,7 +58,7 @@ works in two phases: An .Ar infile image is split into clusters; each cluster is compressed using -.Xr zlib 3 +.Xr zlib 3 or .Xr lzma 3 . .It @@ -72,7 +72,7 @@ The options are: Name of the output file .Ar outfile . The default is to use the input name with the suffix -.Pa .uzip +.Pa .uzip for the .Xr zlib 3 compression or @@ -174,8 +174,8 @@ to handle resulting images correctly. .Sh SEE ALSO .Xr gzip 1 , .Xr xz 1 , -.Xr zlib 3 , .Xr lzma 3 , +.Xr zlib 3 , .Xr geom 4 , .Xr geom_uzip 4 , .Xr md 4 , From owner-svn-src-head@freebsd.org Sat Feb 11 23:41: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 34DE2CDB0EF; Sat, 11 Feb 2017 23:41:40 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0202017F5; Sat, 11 Feb 2017 23:41:39 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BNfdhT033263; Sat, 11 Feb 2017 23:41:39 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BNfdUp033262; Sat, 11 Feb 2017 23:41:39 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702112341.v1BNfdUp033262@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Feb 2017 23:41:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313668 - head/usr.bin/mkimg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Sat, 11 Feb 2017 23:41:40 -0000 Author: bapt Date: Sat Feb 11 23:41:38 2017 New Revision: 313668 URL: https://svnweb.freebsd.org/changeset/base/313668 Log: Add missing section in manpage reference Reported by: make manlint MFC after: 2 days Modified: head/usr.bin/mkimg/mkimg.1 Modified: head/usr.bin/mkimg/mkimg.1 ============================================================================== --- head/usr.bin/mkimg/mkimg.1 Sat Feb 11 23:40:57 2017 (r313667) +++ head/usr.bin/mkimg/mkimg.1 Sat Feb 11 23:41:38 2017 (r313668) @@ -274,7 +274,7 @@ Directory to put temporary files in; def .Sh EXAMPLES To create a bootable disk image that is partitioned using the GPT scheme and containing a root file system that was previously created using -.Xr makefs +.Xr makefs 8 and also containing a swap partition, run the .Nm utility as follows: From owner-svn-src-head@freebsd.org Sat Feb 11 23:42: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 82B10CDB28D; Sat, 11 Feb 2017 23:42:34 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5287E1A01; Sat, 11 Feb 2017 23:42:34 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BNgXra036096; Sat, 11 Feb 2017 23:42:33 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BNgX9O036095; Sat, 11 Feb 2017 23:42:33 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702112342.v1BNgX9O036095@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Feb 2017 23:42:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313669 - head/usr.bin/ipcrm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Sat, 11 Feb 2017 23:42:34 -0000 Author: bapt Date: Sat Feb 11 23:42:33 2017 New Revision: 313669 URL: https://svnweb.freebsd.org/changeset/base/313669 Log: Properly use .An macro before Authors name Reported by: make manlint MFC after: 2 days Modified: head/usr.bin/ipcrm/ipcrm.1 Modified: head/usr.bin/ipcrm/ipcrm.1 ============================================================================== --- head/usr.bin/ipcrm/ipcrm.1 Sat Feb 11 23:41:38 2017 (r313668) +++ head/usr.bin/ipcrm/ipcrm.1 Sat Feb 11 23:42:33 2017 (r313669) @@ -114,6 +114,9 @@ If the identifier or the key is -1, it w The wiping of all System V IPC objects was first implemented in .Fx 6.4 No and 7.1. .Sh AUTHORS -The original author was Adam Glass. -The wiping of all System V IPC objects was thought up by Callum -Gibson and extended and implemented by Edwin Groothuis. +The original author was +.An Adam Glass . +The wiping of all System V IPC objects was thought up by +.An Callum Gibson +and extended and implemented by +.An Edwin Groothuis . From owner-svn-src-head@freebsd.org Sat Feb 11 23:43: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 9CDA4CDB2FC; Sat, 11 Feb 2017 23:43:13 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6CA621B8B; Sat, 11 Feb 2017 23:43:13 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BNhCGF036163; Sat, 11 Feb 2017 23:43:12 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BNhCf3036162; Sat, 11 Feb 2017 23:43:12 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702112343.v1BNhCf3036162@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Feb 2017 23:43:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313670 - head/usr.bin/expand X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Sat, 11 Feb 2017 23:43:13 -0000 Author: bapt Date: Sat Feb 11 23:43:12 2017 New Revision: 313670 URL: https://svnweb.freebsd.org/changeset/base/313670 Log: Escape Sm to avoid confusion with Sm macro Reported by: make manlint MFC after: 2 days Modified: head/usr.bin/expand/expand.1 Modified: head/usr.bin/expand/expand.1 ============================================================================== --- head/usr.bin/expand/expand.1 Sat Feb 11 23:42:33 2017 (r313669) +++ head/usr.bin/expand/expand.1 Sat Feb 11 23:43:12 2017 (r313670) @@ -81,7 +81,7 @@ If the .Fl a option is given, then tabs are inserted whenever they would compress the resultant file by replacing two or more characters. -.It Fl t Sm Ar tab1 , tab2 , ... , tabn Sm +.It Fl t \&Sm Ar tab1 , tab2 , ... , tabn \&Sm Set tab stops at column positions .Ar tab1 , tab2 , ... , tabn . If only a single number is given, tab stops are set that number of From owner-svn-src-head@freebsd.org Sat Feb 11 23:44: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 764B3CDB36B; Sat, 11 Feb 2017 23:44:38 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 460F61CF7; Sat, 11 Feb 2017 23:44:38 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BNibjO036269; Sat, 11 Feb 2017 23:44:37 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BNibpF036268; Sat, 11 Feb 2017 23:44:37 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702112344.v1BNibpF036268@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Feb 2017 23:44:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313671 - head/usr.bin/bc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Sat, 11 Feb 2017 23:44:38 -0000 Author: bapt Date: Sat Feb 11 23:44:37 2017 New Revision: 313671 URL: https://svnweb.freebsd.org/changeset/base/313671 Log: Use correct date format Reported by: make manlint MFC after: 2 days Modified: head/usr.bin/bc/bc.1 Modified: head/usr.bin/bc/bc.1 ============================================================================== --- head/usr.bin/bc/bc.1 Sat Feb 11 23:43:12 2017 (r313670) +++ head/usr.bin/bc/bc.1 Sat Feb 11 23:44:37 2017 (r313671) @@ -35,7 +35,7 @@ .\" .\" @(#)bc.1 6.8 (Berkeley) 8/8/91 .\" -.Dd November 21 2015 +.Dd November 21, 2015 .Dt BC 1 .Os .Sh NAME From owner-svn-src-head@freebsd.org Sat Feb 11 23:45: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 30C7DCDB3CF; Sat, 11 Feb 2017 23:45:12 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F1FCA1E36; Sat, 11 Feb 2017 23:45:11 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BNjBLq036338; Sat, 11 Feb 2017 23:45:11 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BNjBb1036337; Sat, 11 Feb 2017 23:45:11 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702112345.v1BNjBb1036337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Feb 2017 23:45:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313672 - head/usr.bin/mail X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Sat, 11 Feb 2017 23:45:12 -0000 Author: bapt Date: Sat Feb 11 23:45:10 2017 New Revision: 313672 URL: https://svnweb.freebsd.org/changeset/base/313672 Log: Remove useless Li macro Reported by: make manlint MFC after: 2 days Modified: head/usr.bin/mail/mail.1 Modified: head/usr.bin/mail/mail.1 ============================================================================== --- head/usr.bin/mail/mail.1 Sat Feb 11 23:44:37 2017 (r313671) +++ head/usr.bin/mail/mail.1 Sat Feb 11 23:45:10 2017 (r313672) @@ -1094,7 +1094,7 @@ Default is .Va save . .It Va searchheaders If this option is set, then a message-list specifier in the form -.Dq Li / Ns Ar x Ns Li : Ns Ar y +.Dq Li / Ns Ar x Ns : Ns Ar y will expand to all messages containing the substring .Ar y in the header field From owner-svn-src-head@freebsd.org Sat Feb 11 23:45: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 52732CDB42D; Sat, 11 Feb 2017 23:45:52 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A1261F8F; Sat, 11 Feb 2017 23:45:52 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BNjpna036403; Sat, 11 Feb 2017 23:45:51 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BNjohr036400; Sat, 11 Feb 2017 23:45:50 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702112345.v1BNjohr036400@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Feb 2017 23:45:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313673 - in head/usr.bin: ctlstat mt perror uuencode X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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: Sat, 11 Feb 2017 23:45:52 -0000 Author: bapt Date: Sat Feb 11 23:45:50 2017 New Revision: 313673 URL: https://svnweb.freebsd.org/changeset/base/313673 Log: Remove spaces at end of line Reported by: make manlint MFC after: 2 days Modified: head/usr.bin/ctlstat/ctlstat.8 head/usr.bin/mt/mt.1 head/usr.bin/perror/perror.1 head/usr.bin/uuencode/uuencode.1 Modified: head/usr.bin/ctlstat/ctlstat.8 ============================================================================== --- head/usr.bin/ctlstat/ctlstat.8 Sat Feb 11 23:45:10 2017 (r313672) +++ head/usr.bin/ctlstat/ctlstat.8 Sat Feb 11 23:45:50 2017 (r313673) @@ -1,7 +1,7 @@ -.\" +.\" .\" Copyright (c) 2010 Silicon Graphics International Corp. .\" All rights reserved. -.\" +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: @@ -13,7 +13,7 @@ .\" ("Disclaimer") and any redistribution must be conditioned upon .\" including a substantially similar Disclaimer requirement for further .\" binary redistribution. -.\" +.\" .\" NO WARRANTY .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS .\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT @@ -26,7 +26,7 @@ .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING .\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGES. -.\" +.\" .\" ctlstat utility man page. .\" .\" Author: Ken Merry Modified: head/usr.bin/mt/mt.1 ============================================================================== --- head/usr.bin/mt/mt.1 Sat Feb 11 23:45:10 2017 (r313672) +++ head/usr.bin/mt/mt.1 Sat Feb 11 23:45:50 2017 (r313673) @@ -273,12 +273,12 @@ status command, this will be the same XM .Do .Nm status -.Fl x +.Fl x .Dc .El .It Cm param Display or set parameters. -One of +One of .Fl l , .Fl s , or @@ -293,7 +293,7 @@ To display a specific parameter, specify .It Fl p Ar name Specify the parameter name to list (with .Fl l ) -or set (with +or set (with .Fl s ) . .It Fl q Enable quiet mode for parameter listing. @@ -361,11 +361,11 @@ The drive will verify the checksum befor .El .It Cm locate Set the tape drive's logical position. -One of +One of .Fl b , .Fl e , .Fl f , -or +or .Fl s must be specified to indicate the type of position. If the partition number is specified, the drive will first relocate to the Modified: head/usr.bin/perror/perror.1 ============================================================================== --- head/usr.bin/perror/perror.1 Sat Feb 11 23:45:10 2017 (r313672) +++ head/usr.bin/perror/perror.1 Sat Feb 11 23:45:50 2017 (r313673) @@ -1,8 +1,8 @@ -.\" +.\" .\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: George V. Neville-Neil .\" All rights reserved. -.\" +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: @@ -11,7 +11,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" +.\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -23,7 +23,7 @@ .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. -.\" +.\" .\" $FreeBSD$ .\" .Dd May 12, 2009 Modified: head/usr.bin/uuencode/uuencode.1 ============================================================================== --- head/usr.bin/uuencode/uuencode.1 Sat Feb 11 23:45:10 2017 (r313672) +++ head/usr.bin/uuencode/uuencode.1 Sat Feb 11 23:45:50 2017 (r313673) @@ -40,7 +40,7 @@ .Sh SYNOPSIS .Nm .Op Fl m -.Op Fl r +.Op Fl r .Op Fl o Ar output_file .Op Ar file .Ar name