From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 00:01:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F85B83A for ; Sun, 19 Apr 2015 00:01:25 +0000 (UTC) Received: from nm24-vm0.bullet.mail.bf1.yahoo.com (nm24-vm0.bullet.mail.bf1.yahoo.com [98.139.213.161]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B1306695 for ; Sun, 19 Apr 2015 00:01:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1429401677; bh=vAk6qO/z4o0BXp376Ves/9fLOX2/3vGU1nFuDuUHMBk=; h=Date:From:To:Subject:References:In-Reply-To:From:Subject; b=HxexhSSoHe7MdNOvo9/I1+0kZxvyqxFixNoIjDMqI5OomKuDpOcQls+QX2/Nll+it/aI9YLYCOK7uadP2GBCf1+8nJ60U2uHaoSuq0zGNqHEWs4Lvl2cvl4s2dZPuUzBpV5T4LiM98lno0MW68E8syNSMUIqlHzRjOTWmRJk+EDgTblqGAtu8uJ7ceXsQVQ9hSoo9qOK6Go56JqJIyNB3JWBt6rTNltJo7ij3gX2fZ2vK8sInZrah9TwZUkGiwAJ5w7IAeTqabh8/7N3iWPNHzlOxkTBjHjLpS85Yh4GAQ7LxQImz+8+1MHcwjxaX8ds//wLtaq2EvqC6DFTgqacgA== Received: from [98.139.215.140] by nm24.bullet.mail.bf1.yahoo.com with NNFMP; 19 Apr 2015 00:01:17 -0000 Received: from [98.139.211.207] by tm11.bullet.mail.bf1.yahoo.com with NNFMP; 19 Apr 2015 00:01:17 -0000 Received: from [127.0.0.1] by smtp216.mail.bf1.yahoo.com with NNFMP; 19 Apr 2015 00:01:17 -0000 X-Yahoo-Newman-Id: 155474.87340.bm@smtp216.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: 5ObfdfEVM1k2By6rXJLAmqajUKU4aiweXqycBrVqk9kFQQg .msmNOJKf8gNlGazxDfaeymlF1.DZ2lL4fSp4SLdntzaA3s43PXHBSvPtZ2A h6VZgUbdQfBccf90VtvMqclzKJXlqOf.gHaz9nwx3oJPL3cXIJO8jambMyfR Yoa6B7p7NdlKBuVLBM.8jsbr.z_zq_51A_QuGSgPRbrGurSEOfosKH2qtQHl tCbxa5L53c1iMTzGrskn87PJNJbtDjidVuQIU0eDFHH2KU.L5d0e851bIdFT rWpSL2ygEOnCF85NKGuggONy_AJ0Cuk.PIkZ7cHPsncSnF2lt4sqiGMxTvOL Zf2oJK7iBHi7xL_u1mLHgE0VW_0rjevlE4Eonqvez0_2eac0qqgLjYckDzJ. Xc4ezp2VLeeLEuO_axmr11xdxQ6E3ZUGUGsXGY7tD_wZC8t38Ohe9NlCJ3Sg 9oiIpp87xYalKqa9h1Ye9BZDmut7h1QB1hVubtBuCj8lIW8FZQJxTPoFa.VI kSbD_GQEA4jWB9Xbp4umk_t6qMA.s3SJA X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <5532F05B.2070204@FreeBSD.org> Date: Sat, 18 Apr 2015 19:01:31 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Eitan Adler , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281719 - head/bin/ed References: <201504182356.t3INu4HD008807@svn.freebsd.org> In-Reply-To: <201504182356.t3INu4HD008807@svn.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 00:01:25 -0000 Oh yes ... On 04/18/15 18:56, Eitan Adler wrote: > Author: eadler > Date: Sat Apr 18 23:56:04 2015 > New Revision: 281719 > URL: https://svnweb.freebsd.org/changeset/base/281719 > > Log: > bin/ed: use correct type in multiplication > The result is line_t** so the multiplication should be size * > sizeof(line_t*) > > MFC After: 1 month > > Modified: > head/bin/ed/glbl.c > > Modified: head/bin/ed/glbl.c > ============================================================================== > --- head/bin/ed/glbl.c Sat Apr 18 23:49:57 2015 (r281718) > +++ head/bin/ed/glbl.c Sat Apr 18 23:56:04 2015 (r281719) > @@ -153,7 +153,7 @@ set_active_node(line_t *lp) > if (active_list != NULL) { > #endif > if ((ts = (line_t **) realloc(active_list, > - (ti += MINBUFSZ) * sizeof(line_t **))) == NULL) { > + (ti += MINBUFSZ) * sizeof(line_t *))) == NULL) { > fprintf(stderr, "%s\n", strerror(errno)); > errmsg = "out of memory"; > SPL0(); > Found by: clang static checker http://scan.freebsd.org/scan-build/bin/2015-04-18-amd64/report-9ba1bb.html#EndPath ;) Thanks, Pedro. From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 00:29:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F971B47; Sun, 19 Apr 2015 00:29:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E3318B5; Sun, 19 Apr 2015 00:29:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3J0T3BS035929; Sun, 19 Apr 2015 00:29:03 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3J0T3SL035928; Sun, 19 Apr 2015 00:29:03 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201504190029.t3J0T3SL035928@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sun, 19 Apr 2015 00:29:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281720 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 00:29:03 -0000 Author: alc Date: Sun Apr 19 00:29:02 2015 New Revision: 281720 URL: https://svnweb.freebsd.org/changeset/base/281720 Log: Eliminate an unused variable. MFC after: 1 week Modified: head/sys/vm/device_pager.c Modified: head/sys/vm/device_pager.c ============================================================================== --- head/sys/vm/device_pager.c Sat Apr 18 23:56:04 2015 (r281719) +++ head/sys/vm/device_pager.c Sun Apr 19 00:29:02 2015 (r281720) @@ -294,7 +294,6 @@ static int old_dev_pager_fault(vm_object_t object, vm_ooffset_t offset, int prot, vm_page_t *mres) { - vm_pindex_t pidx; vm_paddr_t paddr; vm_page_t m_paddr, page; struct cdev *dev; @@ -304,7 +303,6 @@ old_dev_pager_fault(vm_object_t object, vm_memattr_t memattr; int ref, ret; - pidx = OFF_TO_IDX(offset); memattr = object->memattr; VM_OBJECT_WUNLOCK(object); From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 00:33:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 81943CAA; Sun, 19 Apr 2015 00:33:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6FC3296B; Sun, 19 Apr 2015 00:33:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3J0XMxp041770; Sun, 19 Apr 2015 00:33:22 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3J0XMDX041769; Sun, 19 Apr 2015 00:33:22 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201504190033.t3J0XMDX041769@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 19 Apr 2015 00:33:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281721 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 00:33:22 -0000 Author: jhibbits Date: Sun Apr 19 00:33:21 2015 New Revision: 281721 URL: https://svnweb.freebsd.org/changeset/base/281721 Log: Fix the build. Commit the last part of e500 PMC. Pointy hat to: jhibbits Modified: head/sys/sys/pmc.h Modified: head/sys/sys/pmc.h ============================================================================== --- head/sys/sys/pmc.h Sun Apr 19 00:29:02 2015 (r281720) +++ head/sys/sys/pmc.h Sun Apr 19 00:33:21 2015 (r281721) @@ -102,6 +102,8 @@ __PMC_CPU(MIPS_OCTEON, 0x201, "Cavium Octeon") \ __PMC_CPU(MIPS_74K, 0x202, "MIPS 74K") \ __PMC_CPU(PPC_7450, 0x300, "PowerPC MPC7450") \ + __PMC_CPU(PPC_E500, 0x340, "PowerPC e500 Core") \ + __PMC_CPU(PPC_MPC85XX, 0x340, "Freescale PowerPC MPC85XX") \ __PMC_CPU(PPC_970, 0x380, "IBM PowerPC 970") \ __PMC_CPU(GENERIC, 0x400, "Generic") @@ -136,6 +138,7 @@ enum pmc_cputype { __PMC_CLASS(MIPS74K) /* MIPS 74K */ \ __PMC_CLASS(PPC7450) /* Motorola MPC7450 class */ \ __PMC_CLASS(PPC970) /* IBM PowerPC 970 class */ \ + __PMC_CLASS(E500) /* Freescale e500 class */ \ __PMC_CLASS(SOFT) /* Software events */ enum pmc_class { From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 00:37:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8902FE09; Sun, 19 Apr 2015 00:37:57 +0000 (UTC) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 65CDB97E; Sun, 19 Apr 2015 00:37:57 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.14.9/8.14.9) with ESMTP id t3J0UpP4055922 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 18 Apr 2015 17:30:51 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.9/8.14.9/Submit) id t3J0Uput055921; Sat, 18 Apr 2015 17:30:51 -0700 (PDT) (envelope-from sgk) Date: Sat, 18 Apr 2015 17:30:51 -0700 From: Steve Kargl To: Oliver Pinter Cc: Konstantin Belousov , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r281707 - in head/sys: amd64/amd64 i386/i386 i386/include i386/xen x86/include x86/xen Message-ID: <20150419003051.GA55896@troutmask.apl.washington.edu> References: <201504182123.t3ILNHUk080941@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 00:37:57 -0000 On Sun, Apr 19, 2015 at 12:39:47AM +0200, Oliver Pinter wrote: > On Sat, Apr 18, 2015 at 11:23 PM, Konstantin Belousov wrote: > > > > void acpi_SetDefaultIntrModel(int model); > > void acpi_cpu_c1(void); > > > > +void acpi_cpu_idle_mwait(uint32_t mwait_hint); > > This change is related of this commit or this belongs to other modificatons? > Please trim your replies. -- Steve From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 04:27:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C906DFFA; Sun, 19 Apr 2015 04:27:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B32D8FEB; Sun, 19 Apr 2015 04:27:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3J4RppF035756; Sun, 19 Apr 2015 04:27:51 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3J4RpHI035755; Sun, 19 Apr 2015 04:27:51 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201504190427.t3J4RpHI035755@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 19 Apr 2015 04:27:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281723 - head/usr.bin/calendar X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 04:27:52 -0000 Author: eadler Date: Sun Apr 19 04:27:50 2015 New Revision: 281723 URL: https://svnweb.freebsd.org/changeset/base/281723 Log: calendar: remove useless check lineline checked for 0 in the while loop condition. There is no need to check for it additionally in the body. CID: 1288959 MFC After: 1 week Modified: head/usr.bin/calendar/io.c Modified: head/usr.bin/calendar/io.c ============================================================================== --- head/usr.bin/calendar/io.c Sun Apr 19 01:23:12 2015 (r281722) +++ head/usr.bin/calendar/io.c Sun Apr 19 04:27:50 2015 (r281723) @@ -257,9 +257,6 @@ cal_parse(FILE *in, FILE *out) return (1); while ((linelen = getline(&line, &linecap, in)) > 0) { - if (linelen == 0) - continue; - if (*line == '#') { switch (token(line+1, out, &skip)) { case T_ERR: From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 04:53:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5BBF227B; Sun, 19 Apr 2015 04:53:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49BA82FC; Sun, 19 Apr 2015 04:53:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3J4rT1R057323; Sun, 19 Apr 2015 04:53:29 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3J4rTQT057322; Sun, 19 Apr 2015 04:53:29 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201504190453.t3J4rTQT057322@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 19 Apr 2015 04:53:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281724 - head/usr.bin/rpcgen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 04:53:29 -0000 Author: eadler Date: Sun Apr 19 04:53:28 2015 New Revision: 281724 URL: https://svnweb.freebsd.org/changeset/base/281724 Log: rpcgen: fix use use of strcmp strcmp only guarantee that it will return at least 1 if the string B is greater than that of string A. Modified: head/usr.bin/rpcgen/rpc_sample.c Modified: head/usr.bin/rpcgen/rpc_sample.c ============================================================================== --- head/usr.bin/rpcgen/rpc_sample.c Sun Apr 19 04:27:50 2015 (r281723) +++ head/usr.bin/rpcgen/rpc_sample.c Sun Apr 19 04:53:28 2015 (r281724) @@ -115,7 +115,7 @@ write_sample_client(const char *program_ for (l = proc->args.decls; l != NULL; l = l->next) { f_print(fout, "\t"); ptype(l->decl.prefix, l->decl.type, 1); - if (strcmp(l->decl.type,"string") == 1) + if (strcmp(l->decl.type,"string") >= 1) f_print(fout, " "); pvname(proc->proc_name, vp->vers_num); f_print(fout, "_%s;\n", l->decl.name); From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 06:18:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8FBDA798; Sun, 19 Apr 2015 06:18:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D337BCA; Sun, 19 Apr 2015 06:18:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3J6IgH0023884; Sun, 19 Apr 2015 06:18:42 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3J6Ifth023878; Sun, 19 Apr 2015 06:18:41 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201504190618.t3J6Ifth023878@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 19 Apr 2015 06:18:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281725 - in head/sys/fs: nfs nfsclient nfsserver X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 06:18:42 -0000 Author: trasz Date: Sun Apr 19 06:18:41 2015 New Revision: 281725 URL: https://svnweb.freebsd.org/changeset/base/281725 Log: Replace "new NFS" with just "NFS" in some sysctl description strings. Sponsored by: The FreeBSD Foundation Modified: head/sys/fs/nfs/nfs_commonport.c head/sys/fs/nfsclient/nfs_clvfsops.c head/sys/fs/nfsserver/nfs_nfsdport.c Modified: head/sys/fs/nfs/nfs_commonport.c ============================================================================== --- head/sys/fs/nfs/nfs_commonport.c Sun Apr 19 04:53:28 2015 (r281724) +++ head/sys/fs/nfs/nfs_commonport.c Sun Apr 19 06:18:41 2015 (r281725) @@ -69,7 +69,7 @@ void (*ncl_call_invalcaches)(struct vnod static int nfs_realign_test; static int nfs_realign_count; -SYSCTL_NODE(_vfs, OID_AUTO, nfs, CTLFLAG_RW, 0, "New NFS filesystem"); +SYSCTL_NODE(_vfs, OID_AUTO, nfs, CTLFLAG_RW, 0, "NFS filesystem"); SYSCTL_INT(_vfs_nfs, OID_AUTO, realign_test, CTLFLAG_RW, &nfs_realign_test, 0, "Number of realign tests done"); SYSCTL_INT(_vfs_nfs, OID_AUTO, realign_count, CTLFLAG_RW, &nfs_realign_count, @@ -78,7 +78,7 @@ SYSCTL_STRING(_vfs_nfs, OID_AUTO, callba nfsv4_callbackaddr, sizeof(nfsv4_callbackaddr), "NFSv4 callback addr for server to use"); SYSCTL_INT(_vfs_nfs, OID_AUTO, debuglevel, CTLFLAG_RW, &nfscl_debuglevel, - 0, "Debug level for new nfs client"); + 0, "Debug level for NFS client"); /* * Defines for malloc @@ -100,12 +100,12 @@ MALLOC_DEFINE(M_NEWNFSCLDELEG, "NFSCL de MALLOC_DEFINE(M_NEWNFSCLCLIENT, "NFSCL client", "NFSCL Client"); MALLOC_DEFINE(M_NEWNFSCLLOCKOWNER, "NFSCL lckown", "NFSCL Lock Owner"); MALLOC_DEFINE(M_NEWNFSCLLOCK, "NFSCL lck", "NFSCL Lock"); -MALLOC_DEFINE(M_NEWNFSV4NODE, "NEWNFSnode", "New nfs vnode"); -MALLOC_DEFINE(M_NEWNFSDIRECTIO, "NEWdirectio", "New nfs Direct IO buffer"); +MALLOC_DEFINE(M_NEWNFSV4NODE, "NEWNFSnode", "NFS vnode"); +MALLOC_DEFINE(M_NEWNFSDIRECTIO, "NEWdirectio", "NFS Direct IO buffer"); MALLOC_DEFINE(M_NEWNFSDIROFF, "NFSCL diroffdiroff", - "New NFS directory offset data"); + "NFS directory offset data"); MALLOC_DEFINE(M_NEWNFSDROLLBACK, "NFSD rollback", - "New NFS local lock rollback"); + "NFS local lock rollback"); MALLOC_DEFINE(M_NEWNFSLAYOUT, "NFSCL layout", "NFSv4.1 Layout"); MALLOC_DEFINE(M_NEWNFSFLAYOUT, "NFSCL flayout", "NFSv4.1 File Layout"); MALLOC_DEFINE(M_NEWNFSDEVINFO, "NFSCL devinfo", "NFSv4.1 Device Info"); Modified: head/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvfsops.c Sun Apr 19 04:53:28 2015 (r281724) +++ head/sys/fs/nfsclient/nfs_clvfsops.c Sun Apr 19 06:18:41 2015 (r281725) @@ -86,8 +86,8 @@ extern struct nfsmount *ncl_iodmount[NFS extern struct mtx ncl_iod_mutex; NFSCLSTATEMUTEX; -MALLOC_DEFINE(M_NEWNFSREQ, "newnfsclient_req", "New NFS request header"); -MALLOC_DEFINE(M_NEWNFSMNT, "newnfsmnt", "New NFS mount struct"); +MALLOC_DEFINE(M_NEWNFSREQ, "newnfsclient_req", "NFS request header"); +MALLOC_DEFINE(M_NEWNFSMNT, "newnfsmnt", "NFS mount struct"); SYSCTL_DECL(_vfs_nfs); static int nfs_ip_paranoia = 1; Modified: head/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdport.c Sun Apr 19 04:53:28 2015 (r281724) +++ head/sys/fs/nfsserver/nfs_nfsdport.c Sun Apr 19 06:18:41 2015 (r281725) @@ -84,7 +84,7 @@ extern int nfsrv_issuedelegs; extern int nfsrv_dolocallocks; extern int nfsd_enable_stringtouid; -SYSCTL_NODE(_vfs, OID_AUTO, nfsd, CTLFLAG_RW, 0, "New NFS server"); +SYSCTL_NODE(_vfs, OID_AUTO, nfsd, CTLFLAG_RW, 0, "NFS server"); SYSCTL_INT(_vfs_nfsd, OID_AUTO, mirrormnt, CTLFLAG_RW, &nfsrv_enable_crossmntpt, 0, "Enable nfsd to cross mount points"); SYSCTL_INT(_vfs_nfsd, OID_AUTO, commit_blks, CTLFLAG_RW, &nfs_commit_blks, @@ -96,7 +96,7 @@ SYSCTL_INT(_vfs_nfsd, OID_AUTO, issue_de SYSCTL_INT(_vfs_nfsd, OID_AUTO, enable_locallocks, CTLFLAG_RW, &nfsrv_dolocallocks, 0, "Enable nfsd to acquire local locks on files"); SYSCTL_INT(_vfs_nfsd, OID_AUTO, debuglevel, CTLFLAG_RW, &nfsd_debuglevel, - 0, "Debug level for new nfs server"); + 0, "Debug level for NFS server"); SYSCTL_INT(_vfs_nfsd, OID_AUTO, enable_stringtouid, CTLFLAG_RW, &nfsd_enable_stringtouid, 0, "Enable nfsd to accept numeric owner_names"); From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 07:12:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 957D1DB8; Sun, 19 Apr 2015 07:12:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69633EA; Sun, 19 Apr 2015 07:12:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3J7CHC4071029; Sun, 19 Apr 2015 07:12:17 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3J7CHvg071028; Sun, 19 Apr 2015 07:12:17 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201504190712.t3J7CHvg071028@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 19 Apr 2015 07:12:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281726 - head/sys/compat/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 07:12:17 -0000 Author: trasz Date: Sun Apr 19 07:12:16 2015 New Revision: 281726 URL: https://svnweb.freebsd.org/changeset/base/281726 Log: Optimize the O_NOCTTY handling hack in linux_common_open(). Differential Revision: https://reviews.freebsd.org/D2323 Reviewed by: kib@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/compat/linux/linux_file.c Modified: head/sys/compat/linux/linux_file.c ============================================================================== --- head/sys/compat/linux/linux_file.c Sun Apr 19 06:18:41 2015 (r281725) +++ head/sys/compat/linux/linux_file.c Sun Apr 19 07:12:16 2015 (r281726) @@ -132,39 +132,38 @@ linux_common_open(struct thread *td, int /* XXX LINUX_O_NOATIME: unable to be easily implemented. */ error = kern_openat(td, dirfd, path, UIO_SYSSPACE, bsd_flags, mode); + if (error != 0) + goto done; - if (!error) { - fd = td->td_retval[0]; - /* - * XXX In between kern_open() and fget(), another process - * having the same filedesc could use that fd without - * checking below. - */ - error = fget(td, fd, cap_rights_init(&rights, CAP_IOCTL), &fp); - if (!error) { - sx_slock(&proctree_lock); - PROC_LOCK(p); - if (!(bsd_flags & O_NOCTTY) && - SESS_LEADER(p) && !(p->p_flag & P_CONTROLT)) { - PROC_UNLOCK(p); - sx_unlock(&proctree_lock); - /* XXXPJD: Verify if TIOCSCTTY is allowed. */ - if (fp->f_type == DTYPE_VNODE) - (void) fo_ioctl(fp, TIOCSCTTY, (caddr_t) 0, - td->td_ucred, td); - } else { - PROC_UNLOCK(p); - sx_sunlock(&proctree_lock); - } + if (bsd_flags & O_NOCTTY) + goto done; + + /* + * XXX In between kern_open() and fget(), another process + * having the same filedesc could use that fd without + * checking below. + */ + fd = td->td_retval[0]; + if (fget(td, fd, cap_rights_init(&rights, CAP_IOCTL), &fp) == 0) { + if (fp->f_type != DTYPE_VNODE) { fdrop(fp, td); - /* - * XXX as above, fdrop()/kern_close() pair is racy. - */ - if (error) - kern_close(td, fd); + goto done; + } + sx_slock(&proctree_lock); + PROC_LOCK(p); + if (SESS_LEADER(p) && !(p->p_flag & P_CONTROLT)) { + PROC_UNLOCK(p); + sx_sunlock(&proctree_lock); + /* XXXPJD: Verify if TIOCSCTTY is allowed. */ + (void) fo_ioctl(fp, TIOCSCTTY, (caddr_t) 0, + td->td_ucred, td); + } else { + PROC_UNLOCK(p); + sx_sunlock(&proctree_lock); } } +done: #ifdef DEBUG if (ldebug(open)) printf(LMSG("open returns error %d"), error); From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 07:16:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A012AB2; Sun, 19 Apr 2015 07:16:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8142D169; Sun, 19 Apr 2015 07:16:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3J7GjSs072745; Sun, 19 Apr 2015 07:16:45 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3J7GjmW072744; Sun, 19 Apr 2015 07:16:45 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201504190716.t3J7GjmW072744@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 19 Apr 2015 07:16:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281727 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 07:16:45 -0000 Author: eadler Date: Sun Apr 19 07:16:44 2015 New Revision: 281727 URL: https://svnweb.freebsd.org/changeset/base/281727 Log: README: changes and fixups Two orthogonal goals: - try to make README look a little nicer on phabricator by using Remarkup syntax for commands (using `` instead of using a closing ') - try to make README look a little nicer on github. - Don't encourage `make world` when the handbook specifies otherwise - Change language around documentation to be a bit clearer MFC After: 2 weeks Modified: head/README Modified: head/README ============================================================================== --- head/README Sun Apr 19 07:12:16 2015 (r281726) +++ head/README Sun Apr 19 07:16:44 2015 (r281727) @@ -8,37 +8,32 @@ sources in this tree - please see the sp more information). The Makefile in this directory supports a number of targets for -building components (or all) of the FreeBSD source tree, the most -commonly used one being ``world'', which rebuilds and installs -everything in the FreeBSD system from the source tree except the -kernel, the kernel-modules and the contents of /etc. The ``world'' -target should only be used in cases where the source tree has not -changed from the currently running version. See: -http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html +building components (or all) of the FreeBSD source tree. See build(7) +and http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html for more information, including setting make(1) variables. -The ``buildkernel'' and ``installkernel'' targets build and install +The `buildkernel` and `installkernel` targets build and install the kernel and the modules (see below). Please see the top of the Makefile in this directory for more information on the standard build targets and compile-time flags. -Building a kernel is a somewhat more involved process, documentation -for which can be found at: - http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html -And in the config(8) man page. +Building a kernel is a somewhat more involved process. See build(7), config(8), +and http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html +for more information. + Note: If you want to build and install the kernel with the -``buildkernel'' and ``installkernel'' targets, you might need to build +`buildkernel` and `installkernel` targets, you might need to build world before. More information is available in the handbook. -The sample kernel configuration files reside in the sys//conf -sub-directory (assuming that you've installed the kernel sources), the -file named GENERIC being the one used to build your initial installation -kernel. The file NOTES contains entries and documentation for all possible +The kernel configuration files reside in the sys//conf +sub-directory. GENERIC is the default configuration used in release builds. +NOTES contains entries and documentation for all possible devices, not just those commonly used. Source Roadmap: --------------- + bin System/user commands. cddl Various commands and libraries under the Common Development From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 07:35:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B47573E8; Sun, 19 Apr 2015 07:35:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2A3033C; Sun, 19 Apr 2015 07:35:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3J7ZJAf088042; Sun, 19 Apr 2015 07:35:19 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3J7ZJEr088041; Sun, 19 Apr 2015 07:35:19 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201504190735.t3J7ZJEr088041@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 19 Apr 2015 07:35:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281728 - head/sys/compat/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 07:35:19 -0000 Author: trasz Date: Sun Apr 19 07:35:18 2015 New Revision: 281728 URL: https://svnweb.freebsd.org/changeset/base/281728 Log: Add back fdrop() missed in r281726. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/compat/linux/linux_file.c Modified: head/sys/compat/linux/linux_file.c ============================================================================== --- head/sys/compat/linux/linux_file.c Sun Apr 19 07:16:44 2015 (r281727) +++ head/sys/compat/linux/linux_file.c Sun Apr 19 07:35:18 2015 (r281728) @@ -161,6 +161,7 @@ linux_common_open(struct thread *td, int PROC_UNLOCK(p); sx_sunlock(&proctree_lock); } + fdrop(fp, td); } done: From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 07:46:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5A01C5B5; Sun, 19 Apr 2015 07:46:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47382610; Sun, 19 Apr 2015 07:46:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3J7kXsa097081; Sun, 19 Apr 2015 07:46:33 GMT (envelope-from pluknet@FreeBSD.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3J7kXql097080; Sun, 19 Apr 2015 07:46:33 GMT (envelope-from pluknet@FreeBSD.org) Message-Id: <201504190746.t3J7kXql097080@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pluknet set sender to pluknet@FreeBSD.org using -f From: Sergey Kandaurov Date: Sun, 19 Apr 2015 07:46:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281729 - stable/10/lib/libc/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 07:46:33 -0000 Author: pluknet Date: Sun Apr 19 07:46:32 2015 New Revision: 281729 URL: https://svnweb.freebsd.org/changeset/base/281729 Log: MFC r274933 (by bapt), r281470: r274933 - Ta is only allowed with Bl -column not in Bl -item r281470 - Remove obsolete bits about maximum number of file systems. Modified: stable/10/lib/libc/sys/mount.2 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/sys/mount.2 ============================================================================== --- stable/10/lib/libc/sys/mount.2 Sun Apr 19 07:35:18 2015 (r281728) +++ stable/10/lib/libc/sys/mount.2 Sun Apr 19 07:46:32 2015 (r281729) @@ -28,7 +28,7 @@ .\" @(#)mount.2 8.3 (Berkeley) 5/24/95 .\" $FreeBSD$ .\" -.Dd January 26, 2010 +.Dd April 13, 2015 .Dt MOUNT 2 .Os .Sh NAME @@ -86,7 +86,7 @@ containing .Fa niov elements. The following options are required by all file systems: -.Bl -item -offset indent -compact +.Bl -column fstype -offset indent .It .Li fstype Ta file system type name (e.g., Dq Li procfs ) .It @@ -351,11 +351,6 @@ The argument points outside the process's allocated address space. .El -.Pp -A -.Em ufs -mount can also fail if the maximum number of file systems are currently -mounted. .Sh SEE ALSO .Xr lsvfs 1 , .Xr mksnap_ffs 8 , From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 07:49:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 10A4C71B; Sun, 19 Apr 2015 07:49:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F2383628; Sun, 19 Apr 2015 07:49:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3J7ndZC098216; Sun, 19 Apr 2015 07:49:39 GMT (envelope-from pluknet@FreeBSD.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3J7ndWv098215; Sun, 19 Apr 2015 07:49:39 GMT (envelope-from pluknet@FreeBSD.org) Message-Id: <201504190749.t3J7ndWv098215@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pluknet set sender to pluknet@FreeBSD.org using -f From: Sergey Kandaurov Date: Sun, 19 Apr 2015 07:49:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281730 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 07:49:40 -0000 Author: pluknet Date: Sun Apr 19 07:49:39 2015 New Revision: 281730 URL: https://svnweb.freebsd.org/changeset/base/281730 Log: MFC r280688 (by ru): Corrected descriptions of net.inet.icmp.icmplim and icmplim_output. Modified: stable/10/share/man/man4/icmp.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/icmp.4 ============================================================================== --- stable/10/share/man/man4/icmp.4 Sun Apr 19 07:46:32 2015 (r281729) +++ stable/10/share/man/man4/icmp.4 Sun Apr 19 07:49:39 2015 (r281730) @@ -32,7 +32,7 @@ .\" @(#)icmp.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd September 30, 2014 +.Dd March 26, 2015 .Dt ICMP 4 .Os .Sh NAME @@ -181,13 +181,11 @@ Defaults to 0. .It Va icmplim .Pq Vt integer Bandwidth limit for ICMP replies in packets/second. -Used when -.Va icmplim_output -is non-zero. +If set to zero, no limiting will occur. Defaults to 200. .It Va icmplim_output .Pq Vt boolean -Enable/disable bandwidth limiting of ICMP replies. +Enable/disable logging of ICMP replies bandwidth limiting. Defaults to true. .It Va drop_redirect .Pq Vt boolean From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 08:23:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 40D7FF53; Sun, 19 Apr 2015 08:23:44 +0000 (UTC) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 779D7A38; Sun, 19 Apr 2015 08:23:43 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id B3F15780E07; Sun, 19 Apr 2015 18:23:27 +1000 (AEST) Date: Sun, 19 Apr 2015 18:23:26 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Eitan Adler cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281724 - head/usr.bin/rpcgen In-Reply-To: <201504190453.t3J4rTQT057322@svn.freebsd.org> Message-ID: <20150419172929.F1928@besplex.bde.org> References: <201504190453.t3J4rTQT057322@svn.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.1 cv=L/MkHYj8 c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=0J2RCfu4unCSrN9MOBsA:9 a=VqtkUkEFVafXuUsY:21 a=rwKKNUuyyiyYeohE:21 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 08:23:44 -0000 On Sun, 19 Apr 2015, Eitan Adler wrote: > Log: > rpcgen: fix use use of strcmp > strcmp only guarantee that it will return at least 1 if the string B > is greater than that of string A. > > Modified: > head/usr.bin/rpcgen/rpc_sample.c > > Modified: head/usr.bin/rpcgen/rpc_sample.c > ============================================================================== > --- head/usr.bin/rpcgen/rpc_sample.c Sun Apr 19 04:27:50 2015 (r281723) > +++ head/usr.bin/rpcgen/rpc_sample.c Sun Apr 19 04:53:28 2015 (r281724) > @@ -115,7 +115,7 @@ write_sample_client(const char *program_ > for (l = proc->args.decls; l != NULL; l = l->next) { > f_print(fout, "\t"); > ptype(l->decl.prefix, l->decl.type, 1); > - if (strcmp(l->decl.type,"string") == 1) > + if (strcmp(l->decl.type,"string") >= 1) > f_print(fout, " "); > pvname(proc->proc_name, vp->vers_num); > f_print(fout, "_%s;\n", l->decl.name); It is still a bad example. strcmp is actually documented as returning > 0 if . ' >= 1' is just an obfuscated way of writing ' > 0'. Actually, it is still nonsense. I think l_decl.type is a keyword with a limited number of values. Probably 1 was never returned, since there is no keyword starting with "r" or "sr". So to avoid changing the behaviour, the correct change was to remove the dead code. However, the behaviour was probably broken. Signed comparison with keywords makes no sense. Only comparison for equality, or perhaps for being a prefix, makes sense. I think comparison for equality was intended. That could be written as 'strcmp ... == 0'. However, using strcmp to compare for equality would be a style bug. Everywhere else in the file, and almost everywhere else in the program spell this comparison using streq, since strcmp is apparently too hard to use. The other broken places are: - rpc_cout.c: 3 instances of strcmp, 9 of streq - rpc_main.c: 4 instances of strcmp, 4 of streq - rpc_parse.c: 2 instances of strcmp, 11 of streq - rpc_sample.c: 1 instances of strcmp, 6 of streq - rpc_svcout.c: 3 instances of strcmp, 5 of streq - rpc_util.c: 2 instances of strcmp, 9 of streq streq is used fairly consistently in old code, and the style was broken fairly consistently in changes (about half, including the above, apparently from Sun in 1995). There are often mounds of collateral style bugs near changes to use strcmp. In the above, the next statement is misindented. In this file, the indentation elsewhere is mostly using tabs. It is never using spaces where that would be correct, but is often where it is incorrect (mostly for corrupted tabs and 2-space indentation). Old sun code had many more indentation errors from 5-space indentation for K&R function headers. Altogether, this file had a mixture of 2-space indentation, 4-space indentation which gave bogus lining up of parentheses (in the above code), 5-space indentation, correct lining-up-parentheses indentation, 8-space indentation from corrupt tabs, and normal indentation with tabs. A grate sample. Bruce From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 08:30:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB71C240; Sun, 19 Apr 2015 08:30:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9F9DA62; Sun, 19 Apr 2015 08:30:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3J8UDNb031993; Sun, 19 Apr 2015 08:30:13 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3J8UDKm031992; Sun, 19 Apr 2015 08:30:13 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201504190830.t3J8UDKm031992@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 19 Apr 2015 08:30:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281731 - head/usr.sbin/config X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 08:30:14 -0000 Author: eadler Date: Sun Apr 19 08:30:13 2015 New Revision: 281731 URL: https://svnweb.freebsd.org/changeset/base/281731 Log: config: remove set but unchecked variable reported by: gcc5.1 Modified: head/usr.sbin/config/main.c Modified: head/usr.sbin/config/main.c ============================================================================== --- head/usr.sbin/config/main.c Sun Apr 19 07:49:39 2015 (r281730) +++ head/usr.sbin/config/main.c Sun Apr 19 08:30:13 2015 (r281731) @@ -686,7 +686,7 @@ kernconfdump(const char *file) { struct stat st; FILE *fp, *pp; - int error, len, osz, r; + int error, osz, r; unsigned int i, off, size, t1, t2, align; char *cmd, *o; @@ -714,7 +714,7 @@ kernconfdump(const char *file) if (pp == NULL) errx(EXIT_FAILURE, "popen() failed"); free(cmd); - len = fread(o, osz, 1, pp); + fread(o, osz, 1, pp); pclose(pp); r = sscanf(o, "%d%d%d%d%d", &off, &size, &t1, &t2, &align); free(o); From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 08:31:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9CADD4AF; Sun, 19 Apr 2015 08:31:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8ACB0A71; Sun, 19 Apr 2015 08:31:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3J8VRuj035667; Sun, 19 Apr 2015 08:31:27 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3J8VRSX035666; Sun, 19 Apr 2015 08:31:27 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504190831.t3J8VRSX035666@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 19 Apr 2015 08:31:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281732 - stable/10/sys/dev/acpica X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 08:31:27 -0000 Author: kib Date: Sun Apr 19 08:31:26 2015 New Revision: 281732 URL: https://svnweb.freebsd.org/changeset/base/281732 Log: MFC r281462: Define capabilities bits from the revision 007 of the document 302223. Modified: stable/10/sys/dev/acpica/acpivar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/acpica/acpivar.h ============================================================================== --- stable/10/sys/dev/acpica/acpivar.h Sun Apr 19 08:30:13 2015 (r281731) +++ stable/10/sys/dev/acpica/acpivar.h Sun Apr 19 08:31:26 2015 (r281732) @@ -185,7 +185,7 @@ extern struct mtx acpi_mutex; * Various features and capabilities for the acpi_get_features() method. * In particular, these are used for the ACPI 3.0 _PDC and _OSC methods. * See the Intel document titled "Intel Processor Vendor-Specific ACPI", - * number 302223-005. + * number 302223-007. */ #define ACPI_CAP_PERF_MSRS (1 << 0) /* Intel SpeedStep PERF_CTL MSRs */ #define ACPI_CAP_C1_IO_HALT (1 << 1) /* Intel C1 "IO then halt" sequence */ @@ -198,6 +198,9 @@ extern struct mtx acpi_mutex; #define ACPI_CAP_SMP_C1_NATIVE (1 << 8) /* MP C1 support other than halt */ #define ACPI_CAP_SMP_C3_NATIVE (1 << 9) /* MP C2 and C3 support */ #define ACPI_CAP_PX_HW_COORD (1 << 11) /* Intel P-state HW coordination */ +#define ACPI_CAP_INTR_CPPC (1 << 12) /* Native Interrupt Handling for + Collaborative Processor Performance Control notifications */ +#define ACPI_CAP_HW_DUTY_C (1 << 13) /* Hardware Duty Cycling */ /* * Quirk flags. From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 08:34:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 56BFC62F; Sun, 19 Apr 2015 08:34:51 +0000 (UTC) Date: Sun, 19 Apr 2015 08:34:51 +0000 From: Alexey Dokuchaev To: Eitan Adler Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281727 - head Message-ID: <20150419083451.GA79519@FreeBSD.org> References: <201504190716.t3J7GjmW072744@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201504190716.t3J7GjmW072744@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 08:34:51 -0000 On Sun, Apr 19, 2015 at 07:16:45AM +0000, Eitan Adler wrote: > New Revision: 281727 > URL: https://svnweb.freebsd.org/changeset/base/281727 > > Log: > README: changes and fixups > Two orthogonal goals: > - try to make README look a little nicer on phabricator by using > Remarkup syntax for commands (using `` instead of using a closing ') > - try to make README look a little nicer on github. FreeBSD had traditionally used both double (``...'') and single (`...') to express "literal" something; I am not convinced that changing it just to match GitHub's markdown warrants it. This `...` form is alien to FreeBSD, and can be also confused with backquoted form of shell's $(...) command substitution. ./danfe From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 08:42:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 00D9F921 for ; Sun, 19 Apr 2015 08:42:40 +0000 (UTC) Received: from mail-wg0-x22b.google.com (mail-wg0-x22b.google.com [IPv6:2a00:1450:400c:c00::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8805DC13 for ; Sun, 19 Apr 2015 08:42:40 +0000 (UTC) Received: by wgso17 with SMTP id o17so150762053wgs.1 for ; Sun, 19 Apr 2015 01:42:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=+J9/csZEEXgoGybOWPYqaBE8zamEvHnRBEF0LT8Il+I=; b=MoOLBmypjq49OmWZisAt+bg0TsC6KsKNG2HXQgoA+mL2FOwWY6rr2BqLwF9rwiBWxc vO1oPz/ccVkE/jpC3VYBKHmzMX9zNXkVt5yHGqLKp/uBOlBQaBRw/Wdys2XqKHA01A9n rurBtf6E5WiKO0KbX9kT3AkSmGZUH159aAfT8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=+J9/csZEEXgoGybOWPYqaBE8zamEvHnRBEF0LT8Il+I=; b=k7YkFIqyP5LDABTPMEE9MIcq8VxCGmnwR4SS1wPGIM2kGHwyanJi6JZQGO27MGqT7B x3enlkkLirrVtrOmYgnw6JOLdUzJIXqA8i9D0HllmcVZFdN/zereMM/pgruXkbuO7QwE 57MaLReMfOpXXo2gtqXXslYm+hwQiNumZgejIAL+W73i876lF0CbKMF+bOSZWlEpDO1q vJCRfvcydJP4zpUGoLQx/Ity5jsZL6aPQYWvpLVJ+6xryr2gSkjIOphWl0+q2Y8mtRPO CGqLPJp15XnrRfrb/vPGkKF9aENMzQjBG8cGhEl4VQiHhg7cBcWiIm9GHwyvv6Uk1hJw ovQg== X-Gm-Message-State: ALoCoQn4OWHeSCZzWAvMA1WDHkd1bw7wZgZ7LUY0cN9HIQEnX6XTr+48HwnNGMa/aD6/WJXPlxh5 X-Received: by 10.194.237.34 with SMTP id uz2mr20487896wjc.157.1429432958988; Sun, 19 Apr 2015 01:42:38 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.28.211.135 with HTTP; Sun, 19 Apr 2015 01:42:08 -0700 (PDT) In-Reply-To: <20150419083451.GA79519@FreeBSD.org> References: <201504190716.t3J7GjmW072744@svn.freebsd.org> <20150419083451.GA79519@FreeBSD.org> From: Eitan Adler Date: Sun, 19 Apr 2015 01:42:08 -0700 X-Google-Sender-Auth: cuO27SwLTqWeOzO9vV97gTH9XRs Message-ID: Subject: Re: svn commit: r281727 - head To: Alexey Dokuchaev Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 08:42:41 -0000 On 19 April 2015 at 01:34, Alexey Dokuchaev wrote: > On Sun, Apr 19, 2015 at 07:16:45AM +0000, Eitan Adler wrote: >> New Revision: 281727 >> URL: https://svnweb.freebsd.org/changeset/base/281727 >> >> Log: >> README: changes and fixups >> Two orthogonal goals: >> - try to make README look a little nicer on phabricator by using >> Remarkup syntax for commands (using `` instead of using a closing ') >> - try to make README look a little nicer on github. > > FreeBSD had traditionally used both double (``...'') and single (`...') to > express "literal" something; I am not convinced that changing it just to > match GitHub's markdown warrants it. This `...` form is alien to FreeBSD, > and can be also confused with backquoted form of shell's $(...) command > substitution. Without this change, the syntax ends up being parsed very weirdly by both phabricator and github. That said, if there is strong precedent not to use the markdown syntax, and it would cause confusion, I will revert those changes. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 08:45:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19CBEC31; Sun, 19 Apr 2015 08:45:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0846DC2C; Sun, 19 Apr 2015 08:45:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3J8jbiV045814; Sun, 19 Apr 2015 08:45:37 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3J8jb6Z045813; Sun, 19 Apr 2015 08:45:37 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201504190845.t3J8jb6Z045813@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 19 Apr 2015 08:45:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281733 - head/usr.sbin/tzsetup X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 08:45:38 -0000 Author: eadler Date: Sun Apr 19 08:45:37 2015 New Revision: 281733 URL: https://svnweb.freebsd.org/changeset/base/281733 Log: tzsetup: remove set but unused variable - leave a comment explaining which variable it used to be Reported by: gcc5.1 Modified: head/usr.sbin/tzsetup/tzsetup.c Modified: head/usr.sbin/tzsetup/tzsetup.c ============================================================================== --- head/usr.sbin/tzsetup/tzsetup.c Sun Apr 19 08:31:26 2015 (r281732) +++ head/usr.sbin/tzsetup/tzsetup.c Sun Apr 19 08:45:37 2015 (r281733) @@ -475,7 +475,7 @@ read_zones(void) FILE *fp; struct continent *cont; size_t len; - char *line, *tlc, *coord, *file, *descr, *p; + char *line, *tlc, *file, *descr, *p; int lineno; fp = fopen(path_zonetab, "r"); @@ -495,7 +495,7 @@ read_zones(void) if (strlen(tlc) != 2) errx(1, "%s:%d: invalid country code `%s'", path_zonetab, lineno, tlc); - coord = strsep(&line, "\t"); /* Unused */ + /* coord = */ strsep(&line, "\t"); /* Unused */ file = strsep(&line, "\t"); p = strchr(file, '/'); if (p == 0) From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 09:07:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BBD83134; Sun, 19 Apr 2015 09:07:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA54ADEC; Sun, 19 Apr 2015 09:07:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3J97wku063972; Sun, 19 Apr 2015 09:07:58 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3J97wiZ063971; Sun, 19 Apr 2015 09:07:58 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201504190907.t3J97wiZ063971@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 19 Apr 2015 09:07:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281734 - head/usr.sbin/inetd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 09:07:58 -0000 Author: eadler Date: Sun Apr 19 09:07:57 2015 New Revision: 281734 URL: https://svnweb.freebsd.org/changeset/base/281734 Log: identd: remove redundant zeroing se_rpc_lowvers was set to 0 twice, so remove one of them I can not find any other variable which they may have been a typo of. Reported by: gcc5.1 Modified: head/usr.sbin/inetd/inetd.c Modified: head/usr.sbin/inetd/inetd.c ============================================================================== --- head/usr.sbin/inetd/inetd.c Sun Apr 19 08:45:37 2015 (r281733) +++ head/usr.sbin/inetd/inetd.c Sun Apr 19 09:07:57 2015 (r281734) @@ -1752,8 +1752,7 @@ more: memmove(sep->se_proto, sep->se_proto + 4, strlen(sep->se_proto) + 1 - 4); sep->se_rpc = 1; - sep->se_rpc_prog = sep->se_rpc_lowvers = - sep->se_rpc_lowvers = 0; + sep->se_rpc_prog = sep->se_rpc_lowvers = 0; memcpy(&sep->se_ctrladdr4, bind_sa4, sizeof(sep->se_ctrladdr4)); if ((versp = strrchr(sep->se_service, '/'))) { From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 09:17:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 10C043FC; Sun, 19 Apr 2015 09:17:33 +0000 (UTC) Received: from mail-wi0-x22d.google.com (mail-wi0-x22d.google.com [IPv6:2a00:1450:400c: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 B0AFBECF; Sun, 19 Apr 2015 09:17:32 +0000 (UTC) Received: by widdi4 with SMTP id di4so66079123wid.0; Sun, 19 Apr 2015 02:17:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=UCQa0IgNjko/+A3rRvUw3sQgpQhiCfbSHqlyzrJoMSs=; b=nG/jfD/nd6DjWf2pRjKztWko2thFlEseTMN46jfVngpltLisylb0pEP137CXAEjD6Z MErq3/s9Gh2G3f9vkYMuuJLKMBBTR6cb7OgHCWRB8kG5hS/7WHPv0MqBNM6o+J1K604h E/SlWj4jz2zhl9FBiS2/AnQgHesOVRzOH7cMmcfKh43IwBWg84SFqMtbLOYlmeImgSB5 7BGwgcp6T93dCnxMZwnz9UIc+9QXawtJp4Z31j7/o2dS1GwIrX28VDQmLMepHiRoN+I+ EMFxlv6T1w6yDe4hmgqkifVVmAgF5WerYW9XC//KVC9TwBRfxlMSiVZLFlIsK2xld3/s hj3A== MIME-Version: 1.0 X-Received: by 10.194.236.33 with SMTP id ur1mr20701606wjc.77.1429435051175; Sun, 19 Apr 2015 02:17:31 -0700 (PDT) Sender: pluknet@gmail.com Received: by 10.27.80.202 with HTTP; Sun, 19 Apr 2015 02:17:31 -0700 (PDT) In-Reply-To: <201504190907.t3J97wiZ063971@svn.freebsd.org> References: <201504190907.t3J97wiZ063971@svn.freebsd.org> Date: Sun, 19 Apr 2015 12:17:31 +0300 X-Google-Sender-Auth: dthxEs8eZo9owv_rY852ySJ9Kzk Message-ID: Subject: Re: svn commit: r281734 - head/usr.sbin/inetd From: Sergey Kandaurov To: Eitan Adler Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 09:17:33 -0000 On 19 April 2015 at 12:07, Eitan Adler wrote: > Author: eadler > Date: Sun Apr 19 09:07:57 2015 > New Revision: 281734 > URL: https://svnweb.freebsd.org/changeset/base/281734 > > Log: > identd: remove redundant zeroing > se_rpc_lowvers was set to 0 twice, so remove one of them > I can not find any other variable which they may have been a typo of. > > Reported by: gcc5.1 > > Modified: > head/usr.sbin/inetd/inetd.c > > Modified: head/usr.sbin/inetd/inetd.c > ============================================================================== > --- head/usr.sbin/inetd/inetd.c Sun Apr 19 08:45:37 2015 (r281733) > +++ head/usr.sbin/inetd/inetd.c Sun Apr 19 09:07:57 2015 (r281734) > @@ -1752,8 +1752,7 @@ more: > memmove(sep->se_proto, sep->se_proto + 4, > strlen(sep->se_proto) + 1 - 4); > sep->se_rpc = 1; > - sep->se_rpc_prog = sep->se_rpc_lowvers = > - sep->se_rpc_lowvers = 0; > + sep->se_rpc_prog = sep->se_rpc_lowvers = 0; > memcpy(&sep->se_ctrladdr4, bind_sa4, > sizeof(sep->se_ctrladdr4)); > if ((versp = strrchr(sep->se_service, '/'))) { > se_rpc_highvers ? They both seem to be used prezeroed in a later sscanf(). -- wbr, pluknet From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 09:26:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F3B47607 for ; Sun, 19 Apr 2015 09:26:20 +0000 (UTC) Received: from mail-wg0-x231.google.com (mail-wg0-x231.google.com [IPv6:2a00:1450:400c:c00::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A4C88FA3 for ; Sun, 19 Apr 2015 09:26:20 +0000 (UTC) Received: by wgyo15 with SMTP id o15so151173669wgy.2 for ; Sun, 19 Apr 2015 02:26:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=ZEQdzeYbzcVAZHqsKehVMX75qdADsPG2QfWtzOoxAco=; b=EMaNXgeHlXUlxm+Lk3B8B1PQzWO9S4U6aFF7uu3C1qlLfmWg/Afr2ckvEmGQ7ACcaL risqqLO+bIL225bavNgSEl+X5LyuEoEJ7uZb4F6NFOq0TU7ADgy0rmE70BAxS1IrXpAb PwF+01jW+B3wKGZjmR9vtiLX2AkdBIWg1k7aU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=ZEQdzeYbzcVAZHqsKehVMX75qdADsPG2QfWtzOoxAco=; b=BLveZHGQF/MWaZmqtnM/ocINstEBLZWmHL4BMvn2LuZHEQlPTRx4dhS99AlfuAMAA/ j7ikcxTri6HtxRUy1wd6b172HHS5HjT5UW5QLg4+QvEzbQY+NuoIK9P5Tk7VtiShO0jZ NT17ZMjuklgRppBXTrdi09s/Ev1DouyRy3RXKfVznSYGcgnHOJHgn6evhwj0rRYQfCXZ gTtSI1TkzXX/BqgCkwiOJipMhnhtCZXFkCZc3ayM8LVjqwZUuXYIOh9zf+9vKBlfqVBs O5PruqnHAmMfC5lMadkoqJmpx9Pz/bBrF4yfgcwEX4en5DZeFims/C09TUFTK4j6EPZQ 7r9g== X-Gm-Message-State: ALoCoQkRScX11RXS3l5nBd204GcfFkFuWPylFV5KKZJ8uGmFJosdAljqkdB16rpV/GvFS5p7zSaR X-Received: by 10.180.77.170 with SMTP id t10mr15680939wiw.5.1429435579043; Sun, 19 Apr 2015 02:26:19 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.28.211.135 with HTTP; Sun, 19 Apr 2015 02:25:48 -0700 (PDT) In-Reply-To: References: <201504190907.t3J97wiZ063971@svn.freebsd.org> From: Eitan Adler Date: Sun, 19 Apr 2015 02:25:48 -0700 X-Google-Sender-Auth: cON8RTfV3YpPY2sHTb4Fy4FprIg Message-ID: Subject: Re: svn commit: r281734 - head/usr.sbin/inetd To: Sergey Kandaurov Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 09:26:21 -0000 On 19 April 2015 at 02:17, Sergey Kandaurov wrote: > On 19 April 2015 at 12:07, Eitan Adler wrote: >> Author: eadler >> Date: Sun Apr 19 09:07:57 2015 >> New Revision: 281734 >> URL: https://svnweb.freebsd.org/changeset/base/281734 >> >> Log: >> identd: remove redundant zeroing >> se_rpc_lowvers was set to 0 twice, so remove one of them >> I can not find any other variable which they may have been a typo of. >> >> Reported by: gcc5.1 >> >> Modified: >> head/usr.sbin/inetd/inetd.c >> >> Modified: head/usr.sbin/inetd/inetd.c >> ============================================================================== >> --- head/usr.sbin/inetd/inetd.c Sun Apr 19 08:45:37 2015 (r281733) >> +++ head/usr.sbin/inetd/inetd.c Sun Apr 19 09:07:57 2015 (r281734) >> @@ -1752,8 +1752,7 @@ more: >> memmove(sep->se_proto, sep->se_proto + 4, >> strlen(sep->se_proto) + 1 - 4); >> sep->se_rpc = 1; >> - sep->se_rpc_prog = sep->se_rpc_lowvers = >> - sep->se_rpc_lowvers = 0; >> + sep->se_rpc_prog = sep->se_rpc_lowvers = 0; >> memcpy(&sep->se_ctrladdr4, bind_sa4, >> sizeof(sep->se_ctrladdr4)); >> if ((versp = strrchr(sep->se_service, '/'))) { >> > > se_rpc_highvers ? > They both seem to be used prezeroed in a later sscanf(). hmmm, likely. I was looking for a different variable, not a different member :\ I'll fix -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 09:27:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78AD674A; Sun, 19 Apr 2015 09:27:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66FA4FAA; Sun, 19 Apr 2015 09:27:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3J9RmrM080195; Sun, 19 Apr 2015 09:27:48 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3J9Rm9g080194; Sun, 19 Apr 2015 09:27:48 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201504190927.t3J9Rm9g080194@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 19 Apr 2015 09:27:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281735 - head/usr.sbin/inetd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 09:27:48 -0000 Author: eadler Date: Sun Apr 19 09:27:47 2015 New Revision: 281735 URL: https://svnweb.freebsd.org/changeset/base/281735 Log: identd: also zero se_rpc_highvers Reported by: pluknet Modified: head/usr.sbin/inetd/inetd.c Modified: head/usr.sbin/inetd/inetd.c ============================================================================== --- head/usr.sbin/inetd/inetd.c Sun Apr 19 09:07:57 2015 (r281734) +++ head/usr.sbin/inetd/inetd.c Sun Apr 19 09:27:47 2015 (r281735) @@ -1752,9 +1752,8 @@ more: memmove(sep->se_proto, sep->se_proto + 4, strlen(sep->se_proto) + 1 - 4); sep->se_rpc = 1; - sep->se_rpc_prog = sep->se_rpc_lowvers = 0; - memcpy(&sep->se_ctrladdr4, bind_sa4, - sizeof(sep->se_ctrladdr4)); + sep->se_rpc_prog = sep->se_rpc_lowvers = + sep->se_rpc_highvers = 0; if ((versp = strrchr(sep->se_service, '/'))) { *versp++ = '\0'; switch (sscanf(versp, "%u-%u", From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 09:35:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DDFBCA68; Sun, 19 Apr 2015 09:35:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CAE79ED; Sun, 19 Apr 2015 09:35:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3J9ZkZN088202; Sun, 19 Apr 2015 09:35:46 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3J9ZkAL088201; Sun, 19 Apr 2015 09:35:46 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201504190935.t3J9ZkAL088201@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 19 Apr 2015 09:35:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281736 - head/usr.sbin/inetd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 09:35:47 -0000 Author: eadler Date: Sun Apr 19 09:35:46 2015 New Revision: 281736 URL: https://svnweb.freebsd.org/changeset/base/281736 Log: identd: restore memcpy I should not be committing at 2:30am.... Reported by: pluknet Modified: head/usr.sbin/inetd/inetd.c Modified: head/usr.sbin/inetd/inetd.c ============================================================================== --- head/usr.sbin/inetd/inetd.c Sun Apr 19 09:27:47 2015 (r281735) +++ head/usr.sbin/inetd/inetd.c Sun Apr 19 09:35:46 2015 (r281736) @@ -1752,6 +1752,8 @@ more: memmove(sep->se_proto, sep->se_proto + 4, strlen(sep->se_proto) + 1 - 4); sep->se_rpc = 1; + memcpy(&sep->se_ctrladdr4, bind_sa4, + sizeof(sep->se_ctrladdr4)); sep->se_rpc_prog = sep->se_rpc_lowvers = sep->se_rpc_highvers = 0; if ((versp = strrchr(sep->se_service, '/'))) { From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 11:34:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 88688D88; Sun, 19 Apr 2015 11:34:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 76E9EE0D; Sun, 19 Apr 2015 11:34:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3JBYgVb087784; Sun, 19 Apr 2015 11:34:42 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3JBYgD1087783; Sun, 19 Apr 2015 11:34:42 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504191134.t3JBYgD1087783@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 19 Apr 2015 11:34:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281738 - head/sys/fs/nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 11:34:42 -0000 Author: mav Date: Sun Apr 19 11:34:41 2015 New Revision: 281738 URL: https://svnweb.freebsd.org/changeset/base/281738 Log: Change wcommitsize default from one empirical value to another. The new value is more predictable with growing RAM size: hibufspace maxvnodes old new i386: 256MB 32980992 15800 2198732 2097152 2GB 94027776 107677 878764 4194304 amd64: 256MB 32980992 15800 2198732 2097152 1GB 114114560 68062 1678155 4194304 4GB 217055232 111807 1955452 4194304 16GB 1717846016 337308 5097465 16777216 64GB 1734918144 1164427 1490479 16777216 256GB 1734918144 4426453 391983 16777216 Reviewed by: rmacklem MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clvfsops.c Modified: head/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvfsops.c Sun Apr 19 10:47:55 2015 (r281737) +++ head/sys/fs/nfsclient/nfs_clvfsops.c Sun Apr 19 11:34:41 2015 (r281738) @@ -1324,10 +1324,13 @@ mountnfs(struct nfs_args *argp, struct m nmp->nm_timeo = NFS_TIMEO; nmp->nm_retry = NFS_RETRANS; nmp->nm_readahead = NFS_DEFRAHEAD; - if (desiredvnodes >= 11000) - nmp->nm_wcommitsize = hibufspace / (desiredvnodes / 1000); - else - nmp->nm_wcommitsize = hibufspace / 10; + + /* This is empirical approximation of sqrt(hibufspace) * 256. */ + nmp->nm_wcommitsize = NFS_MAXBSIZE / 256; + while ((long)nmp->nm_wcommitsize * nmp->nm_wcommitsize < hibufspace) + nmp->nm_wcommitsize *= 2; + nmp->nm_wcommitsize *= 256; + if ((argp->flags & NFSMNT_NFSV4) != 0) nmp->nm_minorvers = minvers; else From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 12:49:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CFE4AC6F; Sun, 19 Apr 2015 12:49:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE65D6EC; Sun, 19 Apr 2015 12:49:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3JCnVc0044603; Sun, 19 Apr 2015 12:49:31 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3JCnVPX044602; Sun, 19 Apr 2015 12:49:31 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201504191249.t3JCnVPX044602@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sun, 19 Apr 2015 12:49:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281740 - head/sbin/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 12:49:31 -0000 Author: melifaro Date: Sun Apr 19 12:49:30 2015 New Revision: 281740 URL: https://svnweb.freebsd.org/changeset/base/281740 Log: Fix use-after-free. Reported by: Coverity Scan, pfg CID: 1245747 Modified: head/sbin/ipfw/nat.c Modified: head/sbin/ipfw/nat.c ============================================================================== --- head/sbin/ipfw/nat.c Sun Apr 19 12:11:07 2015 (r281739) +++ head/sbin/ipfw/nat.c Sun Apr 19 12:49:30 2015 (r281740) @@ -1008,11 +1008,10 @@ nat_foreach(nat_cb_t *f, void *arg, int olh->size = sz; if (do_get3(IP_FW_NAT44_LIST_NAT, &olh->opheader, &sz) != 0) { + sz = olh->size; free(olh); - if (errno == ENOMEM) { - sz = olh->size; + if (errno == ENOMEM) continue; - } return (errno); } From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 13:28:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E72903F7; Sun, 19 Apr 2015 13:28:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4E80AEC; Sun, 19 Apr 2015 13:28:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3JDSWjs078355; Sun, 19 Apr 2015 13:28:32 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3JDSWYD078354; Sun, 19 Apr 2015 13:28:32 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201504191328.t3JDSWYD078354@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 19 Apr 2015 13:28:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281741 - stable/10/lib/libc/gen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 13:28:33 -0000 Author: jilles Date: Sun Apr 19 13:28:32 2015 New Revision: 281741 URL: https://svnweb.freebsd.org/changeset/base/281741 Log: MFC r281082: fts: Don't return FTS_SLNONE if it's not a symlink (if race). When following symlinks, fts returned FTS_SLNONE when fstatat(flag=0) failed, but a subsequent fstatat(flag=AT_SYMLINK_NOFOLLOW) succeeded. This incorrectly triggered if a filename existed to be read from the directory, was deleted before the fstatat(flag=0) and created again after the fstatat(flag=0). Fix this by only returning FTS_SLNONE if the result from fstatat(flag=AT_SYMLINK_NOFOLLOW) is actually a symlink. If it is not a symlink, treat it as if fstatat(flag=0) succeeded. PR: 196724 Modified: stable/10/lib/libc/gen/fts.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/gen/fts.c ============================================================================== --- stable/10/lib/libc/gen/fts.c Sun Apr 19 12:49:30 2015 (r281740) +++ stable/10/lib/libc/gen/fts.c Sun Apr 19 13:28:32 2015 (r281741) @@ -905,12 +905,13 @@ fts_stat(FTS *sp, FTSENT *p, int follow, if (ISSET(FTS_LOGICAL) || follow) { if (fstatat(dfd, path, sbp, 0)) { saved_errno = errno; - if (!fstatat(dfd, path, sbp, AT_SYMLINK_NOFOLLOW)) { - errno = 0; - return (FTS_SLNONE); + if (fstatat(dfd, path, sbp, AT_SYMLINK_NOFOLLOW)) { + p->fts_errno = saved_errno; + goto err; } - p->fts_errno = saved_errno; - goto err; + errno = 0; + if (S_ISLNK(sbp->st_mode)) + return (FTS_SLNONE); } } else if (fstatat(dfd, path, sbp, AT_SYMLINK_NOFOLLOW)) { p->fts_errno = errno; From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 13:46:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 98062813; Sun, 19 Apr 2015 13:46:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 85632CBD; Sun, 19 Apr 2015 13:46:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3JDkEjR094179; Sun, 19 Apr 2015 13:46:14 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3JDkEhY094177; Sun, 19 Apr 2015 13:46:14 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201504191346.t3JDkEhY094177@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 19 Apr 2015 13:46:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281742 - stable/10/tools/regression/lib/libc/gen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 13:46:14 -0000 Author: jilles Date: Sun Apr 19 13:46:13 2015 New Revision: 281742 URL: https://svnweb.freebsd.org/changeset/base/281742 Log: MFC r280830: wordexp(): Add testcase for non-default IFS in environment. The non-default IFS is expected to be used. Modified: stable/10/tools/regression/lib/libc/gen/test-wordexp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/regression/lib/libc/gen/test-wordexp.c ============================================================================== --- stable/10/tools/regression/lib/libc/gen/test-wordexp.c Sun Apr 19 13:28:32 2015 (r281741) +++ stable/10/tools/regression/lib/libc/gen/test-wordexp.c Sun Apr 19 13:46:13 2015 (r281742) @@ -240,6 +240,21 @@ main(int argc, char *argv[]) r = unsetenv("IFS"); assert(r == 0); + /* + * With IFS set to a non-default value, and using it. + */ + r = setenv("IFS", ":", 1); + assert(r == 0); + r = wordexp("${IFS+hello:world}", &we, 0); + assert(r == 0); + assert(we.we_wordc == 2); + assert(strcmp(we.we_wordv[0], "hello") == 0); + assert(strcmp(we.we_wordv[1], "world") == 0); + assert(we.we_wordv[2] == NULL); + wordfree(&we); + r = unsetenv("IFS"); + assert(r == 0); + printf("PASS wordexp()\n"); printf("PASS wordfree()\n"); From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 13:51:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26121B2B; Sun, 19 Apr 2015 13:51:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 13FC2D76; Sun, 19 Apr 2015 13:51:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3JDpPll000558; Sun, 19 Apr 2015 13:51:25 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3JDpP0o000557; Sun, 19 Apr 2015 13:51:25 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201504191351.t3JDpP0o000557@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 19 Apr 2015 13:51:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281743 - stable/10/lib/libc/gen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 13:51:26 -0000 Author: jilles Date: Sun Apr 19 13:51:25 2015 New Revision: 281743 URL: https://svnweb.freebsd.org/changeset/base/281743 Log: MFC r280919: wordexp: Explicitly pass along IFS. Per Austin group issue #884, sh should not import IFS from the environment but always set it to $' \t\n'. For wordexp(), however, it is documented and useful for it to use IFS from the environment. Since sh currently imports IFS from the environment, this change has no functional effect. Modified: stable/10/lib/libc/gen/wordexp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/gen/wordexp.c ============================================================================== --- stable/10/lib/libc/gen/wordexp.c Sun Apr 19 13:46:13 2015 (r281742) +++ stable/10/lib/libc/gen/wordexp.c Sun Apr 19 13:51:25 2015 (r281743) @@ -118,8 +118,10 @@ we_askshell(const char *words, wordexp_t char *nstrings; /* Temporary for realloc() */ char **nwv; /* Temporary for realloc() */ sigset_t newsigblock, oldsigblock; + const char *ifs; serrno = errno; + ifs = getenv("IFS"); if (pipe2(pdes, O_CLOEXEC) < 0) return (WRDE_NOSPACE); /* XXX */ @@ -145,7 +147,8 @@ we_askshell(const char *words, wordexp_t _fcntl(pdes[1], F_SETFD, 0)) < 0) _exit(1); execl(_PATH_BSHELL, "sh", flags & WRDE_UNDEF ? "-u" : "+u", - "-c", "eval \"$1\";eval \"wordexp $2\"", "", + "-c", "IFS=$1;eval \"$2\";eval \"wordexp $3\"", "", + ifs != NULL ? ifs : " \t\n", flags & WRDE_SHOWERR ? "" : "exec 2>/dev/null", words, (char *)NULL); _exit(1); From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 15:39:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id CA3E0B1B; Sun, 19 Apr 2015 15:39:27 +0000 (UTC) Date: Sun, 19 Apr 2015 15:39:27 +0000 From: Alexey Dokuchaev To: Eitan Adler Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r281727 - head Message-ID: <20150419153927.GA30772@FreeBSD.org> References: <201504190716.t3J7GjmW072744@svn.freebsd.org> <20150419083451.GA79519@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 15:39:27 -0000 On Sun, Apr 19, 2015 at 01:42:08AM -0700, Eitan Adler wrote: > On 19 April 2015 at 01:34, Alexey Dokuchaev wrote: > > On Sun, Apr 19, 2015 at 07:16:45AM +0000, Eitan Adler wrote: > >> New Revision: 281727 > >> URL: https://svnweb.freebsd.org/changeset/base/281727 > >> > >> Log: > >> README: changes and fixups > >> Two orthogonal goals: > >> - try to make README look a little nicer on phabricator by using > >> Remarkup syntax for commands (using `` instead of using a > >> closing ') > >> - try to make README look a little nicer on github. > > > > FreeBSD had traditionally used both double (``...'') and single (`...') > > to express "literal" something; I am not convinced that changing it > > just to match GitHub's markdown warrants it. This `...` form is alien > > to FreeBSD, and can be also confused with backquoted form of shell's > > $(...) command substitution. > > Without this change, the syntax ends up being parsed very weirdly by > both phabricator and github. That said, if there is strong precedent > not to use the markdown syntax, and it would cause confusion, I will > revert those changes. I understand your reasons. I don't think we have any strong precedent for those things, but nor do I want to neglect the issue of markdowning our docs... Seeing /usr/ports/CONTRIBUTING.md already made me shiver. Since we control our own installation of Phabricator, maybe we should teach it to recognize ``...'' and `...' instead of converting them? (I don't know what to do about GitHub, but I don't like the idea that their markdown syntax inadvertently affects our files.) ./danfe From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 15:44:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 774C4CB7; Sun, 19 Apr 2015 15:44:55 +0000 (UTC) Received: from relay.mailchannels.net (tkt-001-i373.relay.mailchannels.net [174.136.5.175]) by mx1.freebsd.org (Postfix) with ESMTP id BA9EEA62; Sun, 19 Apr 2015 15:44:53 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp6.ore.mailhop.org (ip-10-204-4-183.us-west-2.compute.internal [10.204.4.183]) by relay.mailchannels.net (Postfix) with ESMTPA id A984F608FE; Sun, 19 Apr 2015 15:44:50 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp6.ore.mailhop.org (smtp6.ore.mailhop.org [10.45.8.167]) (using TLSv1 with cipher DHE-RSA-AES256-SHA) by 0.0.0.0:2500 (trex/5.4.8); Sun, 19 Apr 2015 15:44:51 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: duocircle|x-authuser|hippie X-MailChannels-Auth-Id: duocircle X-MC-Loop-Signature: 1429458290817:3322840153 X-MC-Ingress-Time: 1429458290817 Received: from c-73-34-117-227.hsd1.co.comcast.net ([73.34.117.227] helo=ilsoft.org) by smtp6.ore.mailhop.org with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1YjrOs-0001PF-0d; Sun, 19 Apr 2015 15:44:50 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t3JFiktq027639; Sun, 19 Apr 2015 09:44:46 -0600 (MDT) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX1/yctJyptgXBtlI3/rUkSaB Message-ID: <1429458286.1182.89.camel@freebsd.org> Subject: Re: svn commit: r281727 - head From: Ian Lepore To: Alexey Dokuchaev Cc: Eitan Adler , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Date: Sun, 19 Apr 2015 09:44:46 -0600 In-Reply-To: <20150419153927.GA30772@FreeBSD.org> References: <201504190716.t3J7GjmW072744@svn.freebsd.org> <20150419083451.GA79519@FreeBSD.org> <20150419153927.GA30772@FreeBSD.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.10 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-AuthUser: hippie X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 15:44:55 -0000 On Sun, 2015-04-19 at 15:39 +0000, Alexey Dokuchaev wrote: > On Sun, Apr 19, 2015 at 01:42:08AM -0700, Eitan Adler wrote: > > On 19 April 2015 at 01:34, Alexey Dokuchaev wrote: > > > On Sun, Apr 19, 2015 at 07:16:45AM +0000, Eitan Adler wrote: > > >> New Revision: 281727 > > >> URL: https://svnweb.freebsd.org/changeset/base/281727 > > >> > > >> Log: > > >> README: changes and fixups > > >> Two orthogonal goals: > > >> - try to make README look a little nicer on phabricator by using > > >> Remarkup syntax for commands (using `` instead of using a > > >> closing ') > > >> - try to make README look a little nicer on github. > > > > > > FreeBSD had traditionally used both double (``...'') and single (`...') > > > to express "literal" something; I am not convinced that changing it > > > just to match GitHub's markdown warrants it. This `...` form is alien > > > to FreeBSD, and can be also confused with backquoted form of shell's > > > $(...) command substitution. > > > > Without this change, the syntax ends up being parsed very weirdly by > > both phabricator and github. That said, if there is strong precedent > > not to use the markdown syntax, and it would cause confusion, I will > > revert those changes. > > I understand your reasons. I don't think we have any strong precedent > for those things, but nor do I want to neglect the issue of markdowning > our docs... Seeing /usr/ports/CONTRIBUTING.md already made me shiver. > > Since we control our own installation of Phabricator, maybe we should > teach it to recognize ``...'' and `...' instead of converting them? > (I don't know what to do about GitHub, but I don't like the idea that > their markdown syntax inadvertently affects our files.) > > ./danfe > Indeed, chasing the fad of the day seems like a Really Bad Idea. I know people are religious about github and will bristle at labeling it a fad. People had similar feelings about sourceforge a few years ago. We wisely avoiding changing anything then, and we should do so some more. Our readme and similar files are plain ascii text. If that confuses github, then the fix needs to be applied at github. -- Ian From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 15:54:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6909CE80; Sun, 19 Apr 2015 15:54:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C6C7B39; Sun, 19 Apr 2015 15:54:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3JFs0dq000191; Sun, 19 Apr 2015 15:54:00 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3JFrxP5000178; Sun, 19 Apr 2015 15:53:59 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201504191553.t3JFrxP5000178@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Sun, 19 Apr 2015 15:53:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281745 - in head: share/man/man4 sys/dev/usb sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 15:54:00 -0000 Author: kevlo Date: Sun Apr 19 15:53:58 2015 New Revision: 281745 URL: https://svnweb.freebsd.org/changeset/base/281745 Log: Add new USB ID. PR: 199522 Modified: head/share/man/man4/run.4 head/sys/dev/usb/usbdevs head/sys/dev/usb/wlan/if_run.c Modified: head/share/man/man4/run.4 ============================================================================== --- head/share/man/man4/run.4 Sun Apr 19 14:55:22 2015 (r281744) +++ head/share/man/man4/run.4 Sun Apr 19 15:53:58 2015 (r281745) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 3, 2014 +.Dd April 19, 2015 .Dt RUN 4 .Os .Sh NAME @@ -133,6 +133,7 @@ driver supports the following wireless a .It Belkin F6D4050 ver 1 .It Belkin F9L1103 .It Buffalo WLI-UC-AG300N +.It Buffalo WLI-UC-G300HP .It Buffalo WLI-UC-G300N .It Buffalo WLI-UC-G301N .It Buffalo WLI-UC-GN Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Sun Apr 19 14:55:22 2015 (r281744) +++ head/sys/dev/usb/usbdevs Sun Apr 19 15:53:58 2015 (r281745) @@ -3017,11 +3017,12 @@ product MELCO WLRUCG 0x0116 WLR-UC-G product MELCO WLRUCGAOSS 0x0119 WLR-UC-G-AOSS product MELCO WLIUCAG300N 0x012e WLI-UC-AG300N product MELCO WLIUCG 0x0137 WLI-UC-G -product MELCO RT2870_1 0x0148 RT2870 +product MELCO WLIUCG300HP 0x0148 WLI-UC-G300HP product MELCO RT2870_2 0x0150 RT2870 product MELCO WLIUCGN 0x015d WLI-UC-GN product MELCO WLIUCG301N 0x016f WLI-UC-G301N product MELCO WLIUCGNM 0x01a2 WLI-UC-GNM +product MELCO WLIUCG300HPV1 0x01a8 WLI-UC-G300HP-V1 product MELCO WLIUCGNM2 0x01ee WLI-UC-GNM2 /* Merlin products */ Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Sun Apr 19 14:55:22 2015 (r281744) +++ head/sys/dev/usb/wlan/if_run.c Sun Apr 19 15:53:58 2015 (r281745) @@ -225,13 +225,14 @@ static const STRUCT_USB_HOST_ID run_devs RUN_DEV(LOGITEC, LANW300NU2), RUN_DEV(LOGITEC, LANW150NU2), RUN_DEV(LOGITEC, LANW300NU2S), - RUN_DEV(MELCO, RT2870_1), + RUN_DEV(MELCO, WLIUCG300HP), RUN_DEV(MELCO, RT2870_2), RUN_DEV(MELCO, WLIUCAG300N), RUN_DEV(MELCO, WLIUCG300N), RUN_DEV(MELCO, WLIUCG301N), RUN_DEV(MELCO, WLIUCGN), RUN_DEV(MELCO, WLIUCGNM), + RUN_DEV(MELCO, WLIUCG300HPV1), RUN_DEV(MELCO, WLIUCGNM2), RUN_DEV(MOTOROLA4, RT2770), RUN_DEV(MOTOROLA4, RT3070), From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 16:14:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 61A6D28C for ; Sun, 19 Apr 2015 16:14:23 +0000 (UTC) Received: from mail-wi0-x22a.google.com (mail-wi0-x22a.google.com [IPv6:2a00:1450:400c:c05::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E8BDBD14 for ; Sun, 19 Apr 2015 16:14:22 +0000 (UTC) Received: by wizk4 with SMTP id k4so72532492wiz.1 for ; Sun, 19 Apr 2015 09:14:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=5Rtl+OdZGJ12ciPXUcxy8int9EC1QGiqM5Mit1QJaRE=; b=PkWKUB3T22vNDhmLRXIs53lOYxHNe4xMCoIvtTZzAtNABmEKaFIhr6pErixN66N3OY 7OLfS4+5ZyZ8i+sqoV7Q/5yd0PsGSH+GjbXy2IEl5ICyVX/yEPZCgXYFVWX9WfOzPih4 Jc3BNDU5w3nef1tb5Pyniznxs+fZj3AOMW7fU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=5Rtl+OdZGJ12ciPXUcxy8int9EC1QGiqM5Mit1QJaRE=; b=eZ4QLWqe9MXdp1SiHP7+DEiSbVAKCK0c4q1vB54yMuK4A5GOz7YuThvrJxqtOhm7r4 TDwnL3tka5LH1NAyws230qaFQZmG9Nsuu3gE7vvIuQMxA+okd2Pq3reJeQUOYZGTt2ZW eFkaZpVj0jQ7sxxMn4ch1ZAefLf0xBum4ALKvtd7I3QDHgM8u809Sp1YVl8zwGJ0oNYH K8vnB0/+6GJdoT0Lhzdo3hHvTTstC8eR3nZst3bfDWkEKMFop3Fv1hJ+QUBadLkp08Sr xfOHCXJVfDEpYgDFLy3yxoVwqPxLgSn0EPZCVMzaZIajCAgt8GghYgvHZmO2DWXyhpH5 cR+g== X-Gm-Message-State: ALoCoQljXpslrf/8b8165fYW/lh6+PJW1dfVYc5hCf6yJlcMBzTwB5AkWEsLFFcJ3C6eO5sGwIlR X-Received: by 10.180.81.104 with SMTP id z8mr17862608wix.5.1429460061310; Sun, 19 Apr 2015 09:14:21 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.28.211.135 with HTTP; Sun, 19 Apr 2015 09:13:50 -0700 (PDT) In-Reply-To: <1429458286.1182.89.camel@freebsd.org> References: <201504190716.t3J7GjmW072744@svn.freebsd.org> <20150419083451.GA79519@FreeBSD.org> <20150419153927.GA30772@FreeBSD.org> <1429458286.1182.89.camel@freebsd.org> From: Eitan Adler Date: Sun, 19 Apr 2015 09:13:50 -0700 X-Google-Sender-Auth: 5sLptwNR5HR53nfvgQSK-X5Y5ak Message-ID: Subject: Re: svn commit: r281727 - head To: Ian Lepore Cc: Alexey Dokuchaev , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 16:14:23 -0000 On 19 April 2015 at 08:44, Ian Lepore wrote: > On Sun, 2015-04-19 at 15:39 +0000, Alexey Dokuchaev wrote: >> On Sun, Apr 19, 2015 at 01:42:08AM -0700, Eitan Adler wrote: >> > On 19 April 2015 at 01:34, Alexey Dokuchaev wrote: >> > > On Sun, Apr 19, 2015 at 07:16:45AM +0000, Eitan Adler wrote: >> > >> New Revision: 281727 >> > >> URL: https://svnweb.freebsd.org/changeset/base/281727 >> > >> >> > >> Log: >> > >> README: changes and fixups >> > >> Two orthogonal goals: >> > >> - try to make README look a little nicer on phabricator by using >> > >> Remarkup syntax for commands (using `` instead of using a >> > >> closing ') >> > >> - try to make README look a little nicer on github. >> > > >> > > FreeBSD had traditionally used both double (``...'') and single (`...') >> > > to express "literal" something; I am not convinced that changing it >> > > just to match GitHub's markdown warrants it. This `...` form is alien >> > > to FreeBSD, and can be also confused with backquoted form of shell's >> > > $(...) command substitution. >> > >> > Without this change, the syntax ends up being parsed very weirdly by >> > both phabricator and github. That said, if there is strong precedent >> > not to use the markdown syntax, and it would cause confusion, I will >> > revert those changes. >> >> I understand your reasons. I don't think we have any strong precedent >> for those things, but nor do I want to neglect the issue of markdowning >> our docs... Seeing /usr/ports/CONTRIBUTING.md already made me shiver. >> >> Since we control our own installation of Phabricator, maybe we should >> teach it to recognize ``...'' and `...' instead of converting them? >> (I don't know what to do about GitHub, but I don't like the idea that >> their markdown syntax inadvertently affects our files.) >> >> ./danfe >> > > Indeed, chasing the fad of the day seems like a Really Bad Idea. I know > people are religious about github and will bristle at labeling it a fad. > People had similar feelings about sourceforge a few years ago. We > wisely avoiding changing anything then, and we should do so some more. There is a difference between chasing the latest fad at the expense of the tools we already use, vs trying to allow users to do both. > Our readme and similar files are plain ascii text. If that confuses > github, then the fix needs to be applied at github. Note well: I avoided changing the files to be pure Markdown or Remarkup. I kept the files readable as plaintext. The goal of r281727 (this commit) was to - keep the plaintext readable - make it more readable on github - make it more readable on phabricator As an example, in the list of the 'source roadmap' only the entry usr.sbin has a single tab instead of double tab. This causes it to be non-tabular when parsed as GHB. I chose not to fix this, because it would break the plaintext alignment. Trying to get all three of these right is actually quite difficult :'( -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 16:18:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9154145E for ; Sun, 19 Apr 2015 16:18:00 +0000 (UTC) Received: from mail-wi0-x22c.google.com (mail-wi0-x22c.google.com [IPv6:2a00:1450:400c:c05::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 11C7ED32 for ; Sun, 19 Apr 2015 16:18:00 +0000 (UTC) Received: by widdi4 with SMTP id di4so72562541wid.0 for ; Sun, 19 Apr 2015 09:17:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=OWheE/8NvSRGSQpoG12UQeAuRvFXvx/kf7heYkZE3do=; b=ZFTR2rCkgwCw7YoSUM13Za6MbVjLFQ6dHfc9n0VAdxfk8w/w74Xeip9SJSYlA8virj MoqblEVt7Mt8xVnfaVvOG9uhi7D31S8SBTQhmHWuMsPP5IfjOma6fALrjUdko8k4WgSK rjRRv02wp5TU0vnbu1ULqsdLjuLLm9+VmXqqY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=OWheE/8NvSRGSQpoG12UQeAuRvFXvx/kf7heYkZE3do=; b=X+WSg2op97+nipb08Tewir2y8Br9eEbrv9z00RgscRywlPj3NkUe2KjtHUzDk6TcaN pyDrsqbrc7FjxxcUSZYf2fm6MUdJJJPnFkVnqac4Lh7/huBPw8BkzLYJzCMlrbYkWlI5 yGyFTolgTySd4cLkSqzwTaLEoV7+dUvANGkf3dr/cOKq2q/AL77a+Pnyrq0z7YMZUAMx LxHtMg87M6crrmBeb8QzsBfQp5TO8U2oXnZw5bNppTdrKWHX+P2a6Jr1XpNm8LTR62tB GSq5CMqbvH02zOFpV7SR4H2+kweGKDAsV9gqPkYh7x+NGoQS1fEDixH6GEPEXh4yTeA6 Wxkw== X-Gm-Message-State: ALoCoQka2U7nZv/PJySo/m3LFi2jQnLrpymIwG+BOKvj+J4mEjoS8qc09lTLkazQYbCJPQm1gvdN X-Received: by 10.180.92.161 with SMTP id cn1mr17752429wib.91.1429460278540; Sun, 19 Apr 2015 09:17:58 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.28.211.135 with HTTP; Sun, 19 Apr 2015 09:17:28 -0700 (PDT) In-Reply-To: <20150419153927.GA30772@FreeBSD.org> References: <201504190716.t3J7GjmW072744@svn.freebsd.org> <20150419083451.GA79519@FreeBSD.org> <20150419153927.GA30772@FreeBSD.org> From: Eitan Adler Date: Sun, 19 Apr 2015 09:17:28 -0700 X-Google-Sender-Auth: q3csPyRtl2UU8nmpczbJoabm4qY Message-ID: Subject: Re: svn commit: r281727 - head To: Alexey Dokuchaev Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 16:18:00 -0000 On 19 April 2015 at 08:39, Alexey Dokuchaev wrote: > On Sun, Apr 19, 2015 at 01:42:08AM -0700, Eitan Adler wrote: >> On 19 April 2015 at 01:34, Alexey Dokuchaev wrote: >> > On Sun, Apr 19, 2015 at 07:16:45AM +0000, Eitan Adler wrote: >> >> New Revision: 281727 >> >> URL: https://svnweb.freebsd.org/changeset/base/281727 >> >> >> >> Log: >> >> README: changes and fixups >> >> Two orthogonal goals: >> >> - try to make README look a little nicer on phabricator by using >> >> Remarkup syntax for commands (using `` instead of using a >> >> closing ') >> >> - try to make README look a little nicer on github. >> > >> > FreeBSD had traditionally used both double (``...'') and single (`...') >> > to express "literal" something; I am not convinced that changing it >> > just to match GitHub's markdown warrants it. This `...` form is alien >> > to FreeBSD, and can be also confused with backquoted form of shell's >> > $(...) command substitution. >> >> Without this change, the syntax ends up being parsed very weirdly by >> both phabricator and github. That said, if there is strong precedent >> not to use the markdown syntax, and it would cause confusion, I will >> revert those changes. > > I understand your reasons. I don't think we have any strong precedent > for those things, but nor do I want to neglect the issue of markdowning > our docs... Seeing /usr/ports/CONTRIBUTING.md already made me shiver. > > Since we control our own installation of Phabricator, maybe we should > teach it to recognize ``...'' and `...' instead of converting them? > (I don't know what to do about GitHub, but I don't like the idea that > their markdown syntax inadvertently affects our files.) I will have a conversation with the phabricator folks. If there is an option to provide a custom parser for such things I don't see the harm in trying it. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 17:07:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D157E198; Sun, 19 Apr 2015 17:07:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF4E2239; Sun, 19 Apr 2015 17:07:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3JH7p2e061123; Sun, 19 Apr 2015 17:07:51 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3JH7pQY061122; Sun, 19 Apr 2015 17:07:51 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201504191707.t3JH7pQY061122@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 19 Apr 2015 17:07:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281746 - head/tools/tools/netmap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 17:07:51 -0000 Author: adrian Date: Sun Apr 19 17:07:51 2015 New Revision: 281746 URL: https://svnweb.freebsd.org/changeset/base/281746 Log: Update pkt-gen to optionally use randomised source/destination IPv4 addresses/ports. When doing traffic testing of actual code that /does/ things to the packet (rather than say, 'bridge.c'), it's typically a good idea to use a variety of cache-busting and flow-tracking-busting packet spreads. The pkt-gen method of testing an IP range was to walk it linearly - which is fine, but not useful enough. This can be used to completely randomize the source/destination addresses (eg to test out flow-tracking-busting) and to keep the destination fixed whilst randomising the source (eg to test out what a DDoS may look like.) Tested: * Intel ixgbe 10G (82599) netmap Differential Revision: https://reviews.freebsd.org/D2309 MFC after: 2 weeks Sponsored by: Norse Corp, Inc. Modified: head/tools/tools/netmap/pkt-gen.c Modified: head/tools/tools/netmap/pkt-gen.c ============================================================================== --- head/tools/tools/netmap/pkt-gen.c Sun Apr 19 15:53:58 2015 (r281745) +++ head/tools/tools/netmap/pkt-gen.c Sun Apr 19 17:07:51 2015 (r281746) @@ -183,6 +183,8 @@ struct glob_arg { #define OPT_DUMP 64 /* dump rx/tx traffic */ #define OPT_MONITOR_TX 128 #define OPT_MONITOR_RX 256 +#define OPT_RANDOM_SRC 512 +#define OPT_RANDOM_DST 1024 int dev_type; #ifndef NO_PCAP pcap_t *p; @@ -567,32 +569,44 @@ update_addresses(struct pkt *pkt, struct struct udphdr *udp = &pkt->udp; do { - p = ntohs(udp->uh_sport); - if (p < g->src_ip.port1) { /* just inc, no wrap */ - udp->uh_sport = htons(p + 1); - break; - } - udp->uh_sport = htons(g->src_ip.port0); + /* XXX for now it doesn't handle non-random src, random dst */ + if (g->options & OPT_RANDOM_SRC) { + udp->uh_sport = random(); + ip->ip_src.s_addr = random(); + } else { + p = ntohs(udp->uh_sport); + if (p < g->src_ip.port1) { /* just inc, no wrap */ + udp->uh_sport = htons(p + 1); + break; + } + udp->uh_sport = htons(g->src_ip.port0); - a = ntohl(ip->ip_src.s_addr); - if (a < g->src_ip.end) { /* just inc, no wrap */ - ip->ip_src.s_addr = htonl(a + 1); - break; - } - ip->ip_src.s_addr = htonl(g->src_ip.start); + a = ntohl(ip->ip_src.s_addr); + if (a < g->src_ip.end) { /* just inc, no wrap */ + ip->ip_src.s_addr = htonl(a + 1); + break; + } + ip->ip_src.s_addr = htonl(g->src_ip.start); - udp->uh_sport = htons(g->src_ip.port0); - p = ntohs(udp->uh_dport); - if (p < g->dst_ip.port1) { /* just inc, no wrap */ - udp->uh_dport = htons(p + 1); - break; + udp->uh_sport = htons(g->src_ip.port0); } - udp->uh_dport = htons(g->dst_ip.port0); - a = ntohl(ip->ip_dst.s_addr); - if (a < g->dst_ip.end) { /* just inc, no wrap */ - ip->ip_dst.s_addr = htonl(a + 1); - break; + if (g->options & OPT_RANDOM_DST) { + udp->uh_dport = random(); + ip->ip_dst.s_addr = random(); + } else { + p = ntohs(udp->uh_dport); + if (p < g->dst_ip.port1) { /* just inc, no wrap */ + udp->uh_dport = htons(p + 1); + break; + } + udp->uh_dport = htons(g->dst_ip.port0); + + a = ntohl(ip->ip_dst.s_addr); + if (a < g->dst_ip.end) { /* just inc, no wrap */ + ip->ip_dst.s_addr = htonl(a + 1); + break; + } } ip->ip_dst.s_addr = htonl(g->dst_ip.start); } while (0); @@ -1394,7 +1408,9 @@ usage(void) "\t-R rate in packets per second\n" "\t-X dump payload\n" "\t-H len add empty virtio-net-header with size 'len'\n" - "\t-P file load packet from pcap file" + "\t-P file load packet from pcap file\n" + "\t-z use random IPv4 src address/port\n" + "\t-Z use random IPv4 dst address/port\n" "", cmd); @@ -1667,7 +1683,7 @@ main(int arc, char **argv) g.virt_header = 0; while ( (ch = getopt(arc, argv, - "a:f:F:n:i:Il:d:s:D:S:b:c:o:p:T:w:WvR:XC:H:e:m:P:")) != -1) { + "a:f:F:n:i:Il:d:s:D:S:b:c:o:p:T:w:WvR:XC:H:e:m:P:zZ")) != -1) { struct sf *fn; switch(ch) { @@ -1813,8 +1829,13 @@ main(int arc, char **argv) case 'P': g.packet_file = strdup(optarg); break; + case 'z': + g.options |= OPT_RANDOM_SRC; + break; + case 'Z': + g.options |= OPT_RANDOM_DST; + break; } - } if (strlen(g.ifname) <=0 ) { From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 17:14:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71141401 for ; Sun, 19 Apr 2015 17:14:45 +0000 (UTC) Received: from mail-wg0-f47.google.com (mail-wg0-f47.google.com [74.125.82.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 097B7329 for ; Sun, 19 Apr 2015 17:14:44 +0000 (UTC) Received: by wgsk9 with SMTP id k9so156888295wgs.3 for ; Sun, 19 Apr 2015 10:14:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=WotAkS5bHeZqIwUbfamZeFYSUW0J3eFyWKEmiLIH69c=; b=IOhivorlHA4oaF+e3ZKsfZfoZhJrffURG1ziQHeqXOoGsUxHt1hjC3046fnwC7hbyQ Ja9pSKSR+pVG/9iiHs+xxun5hi7mUlAsIeX2Q0l8NW5AysbSyiMCQ05aqGNeZpTW7U6m YbOEpKSscJHZFQ1IlSWhaiZy67FyKVcWWoqR2q5BolztZxa0bmmMpK1SVvF/PY+LTNSn JlnqUEX/A8DbvdQ7G3QARcdLxTzXIosOl7tjtSVltIV1ETrHI9iJvW/nwk12DqJKVszq PWrSF2w8W7pyrz8WyHvw92Thk7PHbvZW2l4ca0mRedC58g0cHsqlGP+2kWSVviemlmCS HGiw== X-Gm-Message-State: ALoCoQmkXtop4t+eOvxZfPGTggf4FDBssGMk4aIcmUQk0kpSsD3TeA2TNGRHkLjhJBWEptP/RS0p X-Received: by 10.194.157.39 with SMTP id wj7mr23932158wjb.57.1429463261196; Sun, 19 Apr 2015 10:07:41 -0700 (PDT) Received: from [10.10.1.68] (82-69-141-170.dsl.in-addr.zen.co.uk. [82.69.141.170]) by mx.google.com with ESMTPSA id eh5sm11692553wic.20.2015.04.19.10.07.39 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 Apr 2015 10:07:40 -0700 (PDT) From: Steven Hartland X-Google-Original-From: Steven Hartland Message-ID: <5533E0E1.7030801@freebsd.org> Date: Sun, 19 Apr 2015 18:07:45 +0100 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Eitan Adler , Alexey Dokuchaev CC: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r281727 - head References: <201504190716.t3J7GjmW072744@svn.freebsd.org> <20150419083451.GA79519@FreeBSD.org> <20150419153927.GA30772@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 17:14:45 -0000 On 19/04/2015 17:17, Eitan Adler wrote: > On 19 April 2015 at 08:39, Alexey Dokuchaev wrote: >> On Sun, Apr 19, 2015 at 01:42:08AM -0700, Eitan Adler wrote: >>> On 19 April 2015 at 01:34, Alexey Dokuchaev wrote: >>>> On Sun, Apr 19, 2015 at 07:16:45AM +0000, Eitan Adler wrote: >>>>> New Revision: 281727 >>>>> URL: https://svnweb.freebsd.org/changeset/base/281727 >>>>> >>>>> Log: >>>>> README: changes and fixups >>>>> Two orthogonal goals: >>>>> - try to make README look a little nicer on phabricator by using >>>>> Remarkup syntax for commands (using `` instead of using a >>>>> closing ') >>>>> - try to make README look a little nicer on github. >>>> FreeBSD had traditionally used both double (``...'') and single (`...') >>>> to express "literal" something; I am not convinced that changing it >>>> just to match GitHub's markdown warrants it. This `...` form is alien >>>> to FreeBSD, and can be also confused with backquoted form of shell's >>>> $(...) command substitution. >>> Without this change, the syntax ends up being parsed very weirdly by >>> both phabricator and github. That said, if there is strong precedent >>> not to use the markdown syntax, and it would cause confusion, I will >>> revert those changes. >> I understand your reasons. I don't think we have any strong precedent >> for those things, but nor do I want to neglect the issue of markdowning >> our docs... Seeing /usr/ports/CONTRIBUTING.md already made me shiver. >> >> Since we control our own installation of Phabricator, maybe we should >> teach it to recognize ``...'' and `...' instead of converting them? >> (I don't know what to do about GitHub, but I don't like the idea that >> their markdown syntax inadvertently affects our files.) > I will have a conversation with the phabricator folks. If there is an > option to provide a custom parser for such things I don't see the harm > in trying it. Making the simple changes in the commit achieves its goal and it doesn't effect its readability in plan text so why wast time adapting tools when its not needed. Lets not be afraid to adapt for the greater good :) Regards Steve From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 17:15:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 469EE474; Sun, 19 Apr 2015 17:15:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27F56330; Sun, 19 Apr 2015 17:15:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3JHFuOe068376; Sun, 19 Apr 2015 17:15:56 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3JHFtGh068372; Sun, 19 Apr 2015 17:15:55 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201504191715.t3JHFtGh068372@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 19 Apr 2015 17:15:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281747 - head/sys/dev/acpica X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 17:15:56 -0000 Author: adrian Date: Sun Apr 19 17:15:55 2015 New Revision: 281747 URL: https://svnweb.freebsd.org/changeset/base/281747 Log: Refactor out the _PXM -> VM domain lookup done in ACPI, in preparation for its use in upcoming code. This is inspired by something in jhb's NUMA IRQ allocation patchset. However, the tricky bit here is that the PXM lookup for a node may fail, requiring a lookup on the parent node. So if it doesn't exist, don't fail - just go up to the parent. Only error out of the lookup is the ACPI lookup returns an error. Sponsored by: Norse Corp, Inc. Modified: head/sys/dev/acpica/acpi.c head/sys/dev/acpica/acpivar.h Modified: head/sys/dev/acpica/acpi.c ============================================================================== --- head/sys/dev/acpica/acpi.c Sun Apr 19 17:07:51 2015 (r281746) +++ head/sys/dev/acpica/acpi.c Sun Apr 19 17:15:55 2015 (r281747) @@ -1071,30 +1071,53 @@ acpi_hint_device_unit(device_t acdev, de } /* - * Fetch the NUMA domain for the given device. - * - * If a device has a _PXM method, map that to a NUMA domain. + * Fetch the VM domain for the given device 'dev'. * - * If none is found, then it'll call the parent method. - * If there's no domain, return ENOENT. + * Return 1 + domain if there's a domain, 0 if not found; + * -1 upon an error. */ int -acpi_get_domain(device_t dev, device_t child, int *domain) +acpi_parse_pxm(device_t dev, int *domain) { #if MAXMEMDOM > 1 ACPI_HANDLE h; int d, pxm; - h = acpi_get_handle(child); + h = acpi_get_handle(dev); if ((h != NULL) && ACPI_SUCCESS(acpi_GetInteger(h, "_PXM", &pxm))) { d = acpi_map_pxm_to_vm_domainid(pxm); if (d < 0) - return (ENOENT); + return (-1); *domain = d; - return (0); + return (1); } #endif + + return (0); +} + +/* + * Fetch the NUMA domain for the given device. + * + * If a device has a _PXM method, map that to a NUMA domain. + * + * If none is found, then it'll call the parent method. + * If there's no domain, return ENOENT. + */ +int +acpi_get_domain(device_t dev, device_t child, int *domain) +{ + int ret; + + ret = acpi_parse_pxm(child, domain); + /* Error */ + if (ret == -1) + return (ENOENT); + /* Found */ + if (ret == 1) + return (0); + /* No _PXM node; go up a level */ return (bus_generic_get_domain(dev, child, domain)); } Modified: head/sys/dev/acpica/acpivar.h ============================================================================== --- head/sys/dev/acpica/acpivar.h Sun Apr 19 17:07:51 2015 (r281746) +++ head/sys/dev/acpica/acpivar.h Sun Apr 19 17:15:55 2015 (r281747) @@ -500,8 +500,8 @@ SYSCTL_DECL(_debug_acpi); #if MAXMEMDOM > 1 extern int acpi_map_pxm_to_vm_domainid(int pxm); #endif - extern int acpi_get_domain(device_t dev, device_t child, int *domain); +extern int acpi_parse_pxm(device_t dev, int *domain); #endif /* _KERNEL */ #endif /* !_ACPIVAR_H_ */ From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 20:15:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35AC4F14; Sun, 19 Apr 2015 20:15:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23B1293A; Sun, 19 Apr 2015 20:15:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3JKFws3018368; Sun, 19 Apr 2015 20:15:58 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3JKFwm1018367; Sun, 19 Apr 2015 20:15:58 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201504192015.t3JKFwm1018367@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 19 Apr 2015 20:15:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281751 - head/sys/x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 20:15:58 -0000 Author: marius Date: Sun Apr 19 20:15:57 2015 New Revision: 281751 URL: https://svnweb.freebsd.org/changeset/base/281751 Log: Refine the workaround for Intel HSD131 [1] added in r269052: - Use the full mask described by the erratum as with a sufficiently high number of these false-positives, the overflow bit (bit 62) additionally gets set [7]. - HSD131 has been brought into several other Haswell-derived CPUs including to the next generation, i. e. Intel Broadwell. Thus, also skip reporting of these benign errors by default on CPU models affected by HSM142, HSW131 and BDM48 [2 - 5], describing the HSD131 silicon bug for additional models. Also, Celeron 2955U with a CPU ID of 0x45 have been reported to be covered by this fault [6], with the specification update concerned with HSM142 [2] only referring to 0x3c and 0x46. Submitted by: David Froehlich [7] MFC after: 3 days http://www.intel.de/content/dam/www/public/us/en/documents/specification-updates/4th-gen-core-family-desktop-specification-update.pdf [1] http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/4th-gen-core-family-mobile-specification-update.pdf [2] http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/5th-gen-core-family-spec-update.pdf [3] http://www.intel.de/content/dam/www/public/us/en/documents/specification-updates/core-m-processor-family-spec-update.pdf [4] http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/xeon-e3-1200v3-spec-update.pdf [5] https://lists.freebsd.org/pipermail/freebsd-hackers/2015-January/046878.html [6] Modified: head/sys/x86/x86/mca.c Modified: head/sys/x86/x86/mca.c ============================================================================== --- head/sys/x86/x86/mca.c Sun Apr 19 20:08:36 2015 (r281750) +++ head/sys/x86/x86/mca.c Sun Apr 19 20:15:57 2015 (r281751) @@ -251,15 +251,24 @@ mca_mute(const struct mca_record *rec) { /* - * Skip spurious corrected parity errors generated by desktop Haswell - * (see HSD131 erratum) unless reporting is enabled. - * Note that these errors also have been observed with D0-stepping, - * while the revision 014 desktop Haswell specification update only - * talks about C0-stepping. + * Skip spurious corrected parity errors generated by Intel Haswell- + * and Broadwell-based CPUs (see HSD131, HSM142, HSW131 and BDM48 + * erratum respectively), unless reporting is enabled. + * Note that these errors also have been observed with the D0-stepping + * of Haswell, while at least initially the CPU specification updates + * suggested only the C0-stepping to be affected. Similarly, Celeron + * 2955U with a CPU ID of 0x45 apparently are also concerned with the + * same problem, with HSM142 only referring to 0x3c and 0x46. */ - if (rec->mr_cpu_vendor_id == CPU_VENDOR_INTEL && - rec->mr_cpu_id == 0x306c3 && rec->mr_bank == 0 && - rec->mr_status == 0x90000040000f0005 && !intel6h_HSD131) + if (cpu_vendor_id == CPU_VENDOR_INTEL && + CPUID_TO_FAMILY(cpu_id) == 0x6 && + (CPUID_TO_MODEL(cpu_id) == 0x3c || /* HSD131, HSM142, HSW131 */ + CPUID_TO_MODEL(cpu_id) == 0x3d || /* BDM48 */ + CPUID_TO_MODEL(cpu_id) == 0x45 || + CPUID_TO_MODEL(cpu_id) == 0x46) && /* HSM142 */ + rec->mr_bank == 0 && + (rec->mr_status & 0xa0000000ffffffff) == 0x80000000000f0005 && + !intel6h_HSD131) return (1); return (0); From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 20:20:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB69D106; Sun, 19 Apr 2015 20:20:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C9EB095B; Sun, 19 Apr 2015 20:20:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3JKKqlx022560; Sun, 19 Apr 2015 20:20:52 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3JKKqie022559; Sun, 19 Apr 2015 20:20:52 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201504192020.t3JKKqie022559@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 19 Apr 2015 20:20:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281752 - head/sys/arm/allwinner/a20 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 20:20:53 -0000 Author: marius Date: Sun Apr 19 20:20:52 2015 New Revision: 281752 URL: https://svnweb.freebsd.org/changeset/base/281752 Log: Make a comment reflect reality. Modified: head/sys/arm/allwinner/a20/a20_mp.c Modified: head/sys/arm/allwinner/a20/a20_mp.c ============================================================================== --- head/sys/arm/allwinner/a20/a20_mp.c Sun Apr 19 20:15:57 2015 (r281751) +++ head/sys/arm/allwinner/a20/a20_mp.c Sun Apr 19 20:20:52 2015 (r281752) @@ -25,6 +25,7 @@ #include __FBSDID("$FreeBSD$"); + #include #include #include @@ -71,7 +72,7 @@ platform_mp_setmaxid(void) if (mp_ncpus != 0) return; - /* Read current CP15 Cache Size ID Register */ + /* Read the number of cores from the CP15 L2 Control Register. */ __asm __volatile("mrc p15, 1, %0, c9, c0, 2" : "=r" (ncpu)); ncpu = ((ncpu >> 24) & 0x3) + 1; From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 23:45:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 36C9E271; Sun, 19 Apr 2015 23:45:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 24D07F07; Sun, 19 Apr 2015 23:45:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3JNj5D6072879; Sun, 19 Apr 2015 23:45:05 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3JNj4hN072878; Sun, 19 Apr 2015 23:45:04 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201504192345.t3JNj4hN072878@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 19 Apr 2015 23:45:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r281755 - vendor-sys/illumos/dist/uts/common X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 23:45:05 -0000 Author: delphij Date: Sun Apr 19 23:45:04 2015 New Revision: 281755 URL: https://svnweb.freebsd.org/changeset/base/281755 Log: Sync Makefile.files to illumos-gate@244781f10dcd82684fd8163c016540667842f203. Modified: vendor-sys/illumos/dist/uts/common/Makefile.files Modified: vendor-sys/illumos/dist/uts/common/Makefile.files ============================================================================== --- vendor-sys/illumos/dist/uts/common/Makefile.files Sun Apr 19 23:31:00 2015 (r281754) +++ vendor-sys/illumos/dist/uts/common/Makefile.files Sun Apr 19 23:45:04 2015 (r281755) @@ -21,9 +21,9 @@ # # Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved. -# Copyright (c) 2012 Nexenta Systems, Inc. All rights reserved. # Copyright (c) 2013 by Delphix. All rights reserved. # Copyright (c) 2013 by Saso Kiselkov. All rights reserved. +# Copyright 2014 Nexenta Systems, Inc. All rights reserved. # # @@ -1328,6 +1328,7 @@ TRANS_OBJS += mdtrans.o trans_ioctl.o tr ZFS_COMMON_OBJS += \ arc.o \ + blkptr.o \ bplist.o \ bpobj.o \ bptree.o \ @@ -1360,6 +1361,7 @@ ZFS_COMMON_OBJS += \ lz4.o \ lzjb.o \ metaslab.o \ + multilist.o \ range_tree.o \ refcount.o \ rrwlock.o \ @@ -1846,7 +1848,8 @@ ZYD_OBJS += zyd.o zyd_usb.o zyd_hw.o zyd MXFE_OBJS += mxfe.o -MPTSAS_OBJS += mptsas.o mptsas_impl.o mptsas_init.o mptsas_raid.o mptsas_smhba.o +MPTSAS_OBJS += mptsas.o mptsas_hash.o mptsas_impl.o mptsas_init.o \ + mptsas_raid.o mptsas_smhba.o SFE_OBJS += sfe.o sfe_util.o @@ -1865,6 +1868,8 @@ ATGE_OBJS += atge_main.o atge_l1e.o atge YGE_OBJS = yge.o +SKD_OBJS = skd.o + # # Build up defines and paths. # From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 23:56:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F090846E; Sun, 19 Apr 2015 23:55:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DEB4FFE2; Sun, 19 Apr 2015 23:55:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3JNtxfQ079922; Sun, 19 Apr 2015 23:55:59 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3JNtx0i079921; Sun, 19 Apr 2015 23:55:59 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504192355.t3JNtx0i079921@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 19 Apr 2015 23:55:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281756 - head/sys/fs/nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 23:56:00 -0000 Author: pfg Date: Sun Apr 19 23:55:59 2015 New Revision: 281756 URL: https://svnweb.freebsd.org/changeset/base/281756 Log: nfsrpc_createv4: fix double free. Reported by: Oliver Pinter, clang static checker Obtained from: HardenedBSD (commit 63cac77c42c0c3fc67da62f97d5ab651d52ae707) Reviewed by: rmacklem MFC after: 5 days Modified: head/sys/fs/nfsclient/nfs_clrpcops.c Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Sun Apr 19 23:45:04 2015 (r281755) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Sun Apr 19 23:55:59 2015 (r281756) @@ -2153,8 +2153,10 @@ nfsrpc_createv4(vnode_t dvp, char *name, (void) nfs_catnap(PZERO, ret, "nfs_crt2"); } while (ret == NFSERR_DELAY); if (ret) { - if (dp != NULL) + if (dp != NULL) { FREE((caddr_t)dp, M_NFSCLDELEG); + dp = NULL; + } if (ret == NFSERR_STALECLIENTID || ret == NFSERR_STALEDONTRECOVER || ret == NFSERR_BADSESSION) From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 02:07:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 002D3AA; Mon, 20 Apr 2015 02:07:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E2AA8DDC; Mon, 20 Apr 2015 02:07:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3K27vj4078042; Mon, 20 Apr 2015 02:07:57 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3K27vFt078041; Mon, 20 Apr 2015 02:07:57 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201504200207.t3K27vFt078041@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 20 Apr 2015 02:07:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281758 - head/bin/ed X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 02:07:58 -0000 Author: eadler Date: Mon Apr 20 02:07:57 2015 New Revision: 281758 URL: https://svnweb.freebsd.org/changeset/base/281758 Log: ed(1): Fix [-Werror=logical-not-parentheses] /usr/src/bin/ed/glbl.c:64:36: error: logical not is only applied to theleft hand side of comparison [-Werror=logical-not-parentheses] Obtained from: Dragonfly (1fff89cbaeaa43af720a1f23d9c466b756dd8a58) MFC After: 1 month Modified: head/bin/ed/glbl.c Modified: head/bin/ed/glbl.c ============================================================================== --- head/bin/ed/glbl.c Mon Apr 20 00:24:32 2015 (r281757) +++ head/bin/ed/glbl.c Mon Apr 20 02:07:57 2015 (r281758) @@ -60,7 +60,7 @@ build_active_list(int isgcmd) return ERR; if (isbinary) NUL_TO_NEWLINE(s, lp->len); - if (!regexec(pat, s, 0, NULL, 0) == isgcmd && + if (!(regexec(pat, s, 0, NULL, 0) == isgcmd) && set_active_node(lp) < 0) return ERR; } From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 02:23:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 525022C7; Mon, 20 Apr 2015 02:23:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 40B00F64; Mon, 20 Apr 2015 02:23:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3K2N1Yd091371; Mon, 20 Apr 2015 02:23:01 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3K2N1LJ091370; Mon, 20 Apr 2015 02:23:01 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201504200223.t3K2N1LJ091370@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 20 Apr 2015 02:23:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281759 - head/usr.bin/find X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 02:23:01 -0000 Author: eadler Date: Mon Apr 20 02:23:00 2015 New Revision: 281759 URL: https://svnweb.freebsd.org/changeset/base/281759 Log: find.1: Add missing whitespace: Obtained from: Dragonfly (dee38d02d51cc8316f82b0263158d2546f2398bc) Modified: head/usr.bin/find/find.1 Modified: head/usr.bin/find/find.1 ============================================================================== --- head/usr.bin/find/find.1 Mon Apr 20 02:07:57 2015 (r281758) +++ head/usr.bin/find/find.1 Mon Apr 20 02:23:00 2015 (r281759) @@ -1015,7 +1015,7 @@ and as well as .Ic -amin , -anewer , -cmin , -cnewer , -delete , -empty , -fstype , .Ic -iname , -inum , -iregex , -ls , -maxdepth , -mindepth , -mmin , -.Ic -path , -print0 , -regex, -sparse +.Ic -path , -print0 , -regex , -sparse and all of the .Ic -B* birthtime related primaries are extensions to From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 02:34:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8FC44496; Mon, 20 Apr 2015 02:34:09 +0000 (UTC) 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 59CD4AC; Mon, 20 Apr 2015 02:34:06 +0000 (UTC) Received: from jre-mbp.elischer.org (ppp121-45-246-160.lns20.per4.internode.on.net [121.45.246.160]) (authenticated bits=0) by vps1.elischer.org (8.14.9/8.14.9) with ESMTP id t3K2XqGo004690 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sun, 19 Apr 2015 19:33:57 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <5534658A.9060206@freebsd.org> Date: Mon, 20 Apr 2015 10:33:46 +0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Rui Paulo , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org, torek@freebsd.org Subject: Re: svn commit: r281660 - svnadmin/conf References: <201504171639.t3HGd0vu060621@svn.freebsd.org> In-Reply-To: <201504171639.t3HGd0vu060621@svn.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 02:34:09 -0000 On 4/18/15 12:39 AM, Rui Paulo wrote: > Author: rpaulo > Date: Fri Apr 17 16:38:59 2015 > New Revision: 281660 > URL: https://svnweb.freebsd.org/changeset/base/281660 > > Log: > Please join me in welcoming Chris Torek. Chris is a long time BSD guy > and has been hacking on bhyve for a while. the words "about time" fail to express the magnitude of the omission. > > Approved by: core > > Modified: > svnadmin/conf/access > svnadmin/conf/mentors > > Modified: svnadmin/conf/access > ============================================================================== > --- svnadmin/conf/access Fri Apr 17 16:02:49 2015 (r281659) > +++ svnadmin/conf/access Fri Apr 17 16:38:59 2015 (r281660) > @@ -213,6 +213,7 @@ theraven > thomas > thompsa > tijl > +torek > trasz > trhodes > trociny > > Modified: svnadmin/conf/mentors > ============================================================================== > --- svnadmin/conf/mentors Fri Apr 17 16:02:49 2015 (r281659) > +++ svnadmin/conf/mentors Fri Apr 17 16:38:59 2015 (r281660) > @@ -31,6 +31,7 @@ peterj jhb Co-mentor: grog > pkelsey jmallett > slm ken Co-mentor: scottl, ambrisko > snb dwmalone > +torek rpaulo > vangyzen kib > venkat delphij Co-mentor: luigi, jhb > versus gavin Co-mentor: fjoe > > From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 03:45:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3F6AECA1; Mon, 20 Apr 2015 03:45:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B5F3AC8; Mon, 20 Apr 2015 03:45:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3K3jxrG052033; Mon, 20 Apr 2015 03:45:59 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3K3jtdJ052006; Mon, 20 Apr 2015 03:45:55 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201504200345.t3K3jtdJ052006@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Mon, 20 Apr 2015 03:45:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r281760 - in vendor/NetBSD/bmake/dist: . PSD.doc lst.lib mk unit-tests X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 03:45:59 -0000 Author: sjg Date: Mon Apr 20 03:45:54 2015 New Revision: 281760 URL: https://svnweb.freebsd.org/changeset/base/281760 Log: Import bmake-20150418 Added: vendor/NetBSD/bmake/dist/mk/cython.mk (contents, props changed) vendor/NetBSD/bmake/dist/mk/manifest.mk (contents, props changed) vendor/NetBSD/bmake/dist/mk/mkopt.sh (contents, props changed) vendor/NetBSD/bmake/dist/mk/whats.mk (contents, props changed) vendor/NetBSD/bmake/dist/unit-tests/comment.exp vendor/NetBSD/bmake/dist/unit-tests/comment.mk (contents, props changed) vendor/NetBSD/bmake/dist/unit-tests/cond1.exp vendor/NetBSD/bmake/dist/unit-tests/cond1.mk (contents, props changed) vendor/NetBSD/bmake/dist/unit-tests/doterror.exp vendor/NetBSD/bmake/dist/unit-tests/doterror.mk (contents, props changed) vendor/NetBSD/bmake/dist/unit-tests/dotwait.exp vendor/NetBSD/bmake/dist/unit-tests/dotwait.mk (contents, props changed) vendor/NetBSD/bmake/dist/unit-tests/error.exp vendor/NetBSD/bmake/dist/unit-tests/error.mk (contents, props changed) vendor/NetBSD/bmake/dist/unit-tests/escape.exp vendor/NetBSD/bmake/dist/unit-tests/escape.mk (contents, props changed) vendor/NetBSD/bmake/dist/unit-tests/export-all.exp vendor/NetBSD/bmake/dist/unit-tests/export-all.mk (contents, props changed) vendor/NetBSD/bmake/dist/unit-tests/export-env.exp vendor/NetBSD/bmake/dist/unit-tests/export-env.mk (contents, props changed) vendor/NetBSD/bmake/dist/unit-tests/export.exp vendor/NetBSD/bmake/dist/unit-tests/export.mk (contents, props changed) vendor/NetBSD/bmake/dist/unit-tests/forloop.exp vendor/NetBSD/bmake/dist/unit-tests/forloop.mk (contents, props changed) vendor/NetBSD/bmake/dist/unit-tests/forsubst.exp vendor/NetBSD/bmake/dist/unit-tests/forsubst.mk (contents, props changed) vendor/NetBSD/bmake/dist/unit-tests/hash.exp vendor/NetBSD/bmake/dist/unit-tests/hash.mk (contents, props changed) vendor/NetBSD/bmake/dist/unit-tests/impsrc.exp vendor/NetBSD/bmake/dist/unit-tests/impsrc.mk (contents, props changed) vendor/NetBSD/bmake/dist/unit-tests/misc.exp vendor/NetBSD/bmake/dist/unit-tests/misc.mk (contents, props changed) vendor/NetBSD/bmake/dist/unit-tests/moderrs.exp vendor/NetBSD/bmake/dist/unit-tests/moderrs.mk (contents, props changed) vendor/NetBSD/bmake/dist/unit-tests/modmatch.exp vendor/NetBSD/bmake/dist/unit-tests/modmatch.mk (contents, props changed) vendor/NetBSD/bmake/dist/unit-tests/modmisc.exp vendor/NetBSD/bmake/dist/unit-tests/modmisc.mk (contents, props changed) vendor/NetBSD/bmake/dist/unit-tests/modorder.exp vendor/NetBSD/bmake/dist/unit-tests/modorder.mk (contents, props changed) vendor/NetBSD/bmake/dist/unit-tests/modts.exp vendor/NetBSD/bmake/dist/unit-tests/modts.mk (contents, props changed) vendor/NetBSD/bmake/dist/unit-tests/modword.exp vendor/NetBSD/bmake/dist/unit-tests/modword.mk (contents, props changed) vendor/NetBSD/bmake/dist/unit-tests/order.exp vendor/NetBSD/bmake/dist/unit-tests/order.mk (contents, props changed) vendor/NetBSD/bmake/dist/unit-tests/phony-end.exp vendor/NetBSD/bmake/dist/unit-tests/phony-end.mk (contents, props changed) vendor/NetBSD/bmake/dist/unit-tests/posix.exp vendor/NetBSD/bmake/dist/unit-tests/posix.mk (contents, props changed) vendor/NetBSD/bmake/dist/unit-tests/posix1.exp vendor/NetBSD/bmake/dist/unit-tests/posix1.mk (contents, props changed) vendor/NetBSD/bmake/dist/unit-tests/qequals.exp vendor/NetBSD/bmake/dist/unit-tests/qequals.mk (contents, props changed) vendor/NetBSD/bmake/dist/unit-tests/suffixes.exp vendor/NetBSD/bmake/dist/unit-tests/suffixes.mk (contents, props changed) vendor/NetBSD/bmake/dist/unit-tests/sunshcmd.exp vendor/NetBSD/bmake/dist/unit-tests/sunshcmd.mk (contents, props changed) vendor/NetBSD/bmake/dist/unit-tests/sysv.exp vendor/NetBSD/bmake/dist/unit-tests/sysv.mk (contents, props changed) vendor/NetBSD/bmake/dist/unit-tests/ternary.exp vendor/NetBSD/bmake/dist/unit-tests/ternary.mk (contents, props changed) vendor/NetBSD/bmake/dist/unit-tests/unexport-env.exp vendor/NetBSD/bmake/dist/unit-tests/unexport-env.mk (contents, props changed) vendor/NetBSD/bmake/dist/unit-tests/unexport.exp vendor/NetBSD/bmake/dist/unit-tests/unexport.mk (contents, props changed) vendor/NetBSD/bmake/dist/unit-tests/varcmd.exp vendor/NetBSD/bmake/dist/unit-tests/varcmd.mk (contents, props changed) vendor/NetBSD/bmake/dist/unit-tests/varmisc.exp vendor/NetBSD/bmake/dist/unit-tests/varmisc.mk (contents, props changed) vendor/NetBSD/bmake/dist/unit-tests/varshell.exp vendor/NetBSD/bmake/dist/unit-tests/varshell.mk (contents, props changed) Deleted: vendor/NetBSD/bmake/dist/unit-tests/comment vendor/NetBSD/bmake/dist/unit-tests/cond1 vendor/NetBSD/bmake/dist/unit-tests/doterror vendor/NetBSD/bmake/dist/unit-tests/dotwait vendor/NetBSD/bmake/dist/unit-tests/error vendor/NetBSD/bmake/dist/unit-tests/export vendor/NetBSD/bmake/dist/unit-tests/export-all vendor/NetBSD/bmake/dist/unit-tests/export-env vendor/NetBSD/bmake/dist/unit-tests/forloop vendor/NetBSD/bmake/dist/unit-tests/forsubst vendor/NetBSD/bmake/dist/unit-tests/hash vendor/NetBSD/bmake/dist/unit-tests/misc vendor/NetBSD/bmake/dist/unit-tests/moderrs vendor/NetBSD/bmake/dist/unit-tests/modmatch vendor/NetBSD/bmake/dist/unit-tests/modmisc vendor/NetBSD/bmake/dist/unit-tests/modorder vendor/NetBSD/bmake/dist/unit-tests/modts vendor/NetBSD/bmake/dist/unit-tests/modword vendor/NetBSD/bmake/dist/unit-tests/order vendor/NetBSD/bmake/dist/unit-tests/phony-end vendor/NetBSD/bmake/dist/unit-tests/posix vendor/NetBSD/bmake/dist/unit-tests/qequals vendor/NetBSD/bmake/dist/unit-tests/sunshcmd vendor/NetBSD/bmake/dist/unit-tests/sysv vendor/NetBSD/bmake/dist/unit-tests/ternary vendor/NetBSD/bmake/dist/unit-tests/test.exp vendor/NetBSD/bmake/dist/unit-tests/unexport vendor/NetBSD/bmake/dist/unit-tests/unexport-env vendor/NetBSD/bmake/dist/unit-tests/varcmd Modified: vendor/NetBSD/bmake/dist/ChangeLog vendor/NetBSD/bmake/dist/FILES vendor/NetBSD/bmake/dist/Makefile vendor/NetBSD/bmake/dist/PSD.doc/Makefile vendor/NetBSD/bmake/dist/PSD.doc/tutorial.ms vendor/NetBSD/bmake/dist/bmake.1 vendor/NetBSD/bmake/dist/bmake.cat1 vendor/NetBSD/bmake/dist/compat.c vendor/NetBSD/bmake/dist/configure vendor/NetBSD/bmake/dist/configure.in vendor/NetBSD/bmake/dist/job.c vendor/NetBSD/bmake/dist/lst.h vendor/NetBSD/bmake/dist/lst.lib/lstInt.h vendor/NetBSD/bmake/dist/lst.lib/lstRemove.c vendor/NetBSD/bmake/dist/main.c vendor/NetBSD/bmake/dist/make.1 vendor/NetBSD/bmake/dist/make.c vendor/NetBSD/bmake/dist/make.h vendor/NetBSD/bmake/dist/meta.c vendor/NetBSD/bmake/dist/mk/ChangeLog vendor/NetBSD/bmake/dist/mk/FILES vendor/NetBSD/bmake/dist/mk/auto.dep.mk vendor/NetBSD/bmake/dist/mk/auto.obj.mk vendor/NetBSD/bmake/dist/mk/autodep.mk vendor/NetBSD/bmake/dist/mk/dep.mk vendor/NetBSD/bmake/dist/mk/dirdeps.mk vendor/NetBSD/bmake/dist/mk/gendirdeps.mk vendor/NetBSD/bmake/dist/mk/install-mk vendor/NetBSD/bmake/dist/mk/links.mk vendor/NetBSD/bmake/dist/mk/meta.autodep.mk vendor/NetBSD/bmake/dist/mk/meta.stage.mk vendor/NetBSD/bmake/dist/mk/meta.sys.mk vendor/NetBSD/bmake/dist/mk/meta2deps.py vendor/NetBSD/bmake/dist/mk/meta2deps.sh vendor/NetBSD/bmake/dist/mk/mk-files.txt vendor/NetBSD/bmake/dist/mk/own.mk vendor/NetBSD/bmake/dist/mk/sys.dependfile.mk vendor/NetBSD/bmake/dist/nonints.h vendor/NetBSD/bmake/dist/parse.c vendor/NetBSD/bmake/dist/suff.c vendor/NetBSD/bmake/dist/targ.c vendor/NetBSD/bmake/dist/unit-tests/Makefile.in vendor/NetBSD/bmake/dist/var.c Modified: vendor/NetBSD/bmake/dist/ChangeLog ============================================================================== --- vendor/NetBSD/bmake/dist/ChangeLog Mon Apr 20 02:23:00 2015 (r281759) +++ vendor/NetBSD/bmake/dist/ChangeLog Mon Apr 20 03:45:54 2015 (r281760) @@ -1,8 +1,76 @@ +2015-04-18 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20150418 + Merge with NetBSD make, pick up + o job.c: use memmove() rather than memcpy() + + * unit-tests/varshell.mk: SunOS cannot handle the TERMINATED_BY_SIGNAL + case, so skip it. + +2015-04-11 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20150411 + bump version - only mk/ changes. + +2015-04-10 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20150410 + Merge with NetBSD make, pick up + o document different handling of '-' in jobs mode vs compat + o fix jobs mode so that '-' only applies to whole job + when shell lacks hasErrCtl + o meta.c: use separate vars to track lcwd and latestdir (read) + per process + +2015-04-01 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20150401 + Merge with NetBSD make, pick up + o meta.c: close meta file in child + + * Makefile: use BINDIR.bmake if set. + Same for MANDIR and SHAREDIR + Handy for testing release candidates + in various environments. + +2015-03-26 Simon J. Gerraty + + * move initialization of savederr to block where it is used + to avoid spurious warning from gcc5 + +2014-11-11 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20141111 + just a cooler number + +2014-11-05 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20141105 + Merge with NetBSD make, pick up + o revert major overhaul of suffix handling + and POSIX compliance - too much breakage + and impossible to make backwards compatible. + o we still have the new unit test structure which is ok. + o meta.c ensure "-- filemon" is at start of line. + +2014-09-17 Simon J. Gerraty + + * configure.in: test that result of getconf PATH_MAX is numeric + and discard if not. Apparently needed for Hurd. + +2014-08-30 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20140830 + Merge with NetBSD make, pick up + o major overhaul of suffix handling + o improved POSIX compliance + o overhauled unit-tests + 2014-06-20 Simon J. Gerraty * Makefile (MAKE_VERSION): 20140620 Merge with NetBSD make, pick up - o var.c return varNoError rather than var_Error for ::= modidiers. + o var.c return varNoError rather than var_Error for ::= modifiers. 2014-05-22 Simon J. Gerraty Modified: vendor/NetBSD/bmake/dist/FILES ============================================================================== --- vendor/NetBSD/bmake/dist/FILES Mon Apr 20 02:23:00 2015 (r281759) +++ vendor/NetBSD/bmake/dist/FILES Mon Apr 20 03:45:54 2015 (r281760) @@ -92,35 +92,74 @@ targ.c trace.c trace.h unit-tests/Makefile.in -unit-tests/comment -unit-tests/cond1 -unit-tests/doterror -unit-tests/dotwait -unit-tests/error -unit-tests/export -unit-tests/export-all -unit-tests/export-env -unit-tests/forloop -unit-tests/forsubst -unit-tests/hash -unit-tests/misc -unit-tests/moderrs -unit-tests/modmatch -unit-tests/modmisc -unit-tests/modorder -unit-tests/modts -unit-tests/modword -unit-tests/order -unit-tests/phony-end -unit-tests/posix -unit-tests/qequals -unit-tests/sunshcmd -unit-tests/sysv -unit-tests/ternary -unit-tests/test.exp -unit-tests/unexport -unit-tests/unexport-env -unit-tests/varcmd +unit-tests/comment.exp +unit-tests/comment.mk +unit-tests/cond1.exp +unit-tests/cond1.mk +unit-tests/doterror.exp +unit-tests/doterror.mk +unit-tests/dotwait.exp +unit-tests/dotwait.mk +unit-tests/error.exp +unit-tests/error.mk +unit-tests/escape.exp +unit-tests/escape.mk +unit-tests/export-all.exp +unit-tests/export-all.mk +unit-tests/export-env.exp +unit-tests/export-env.mk +unit-tests/export.exp +unit-tests/export.mk +unit-tests/forloop.exp +unit-tests/forloop.mk +unit-tests/forsubst.exp +unit-tests/forsubst.mk +unit-tests/hash.exp +unit-tests/hash.mk +unit-tests/impsrc.exp +unit-tests/impsrc.mk +unit-tests/misc.exp +unit-tests/misc.mk +unit-tests/moderrs.exp +unit-tests/moderrs.mk +unit-tests/modmatch.exp +unit-tests/modmatch.mk +unit-tests/modmisc.exp +unit-tests/modmisc.mk +unit-tests/modorder.exp +unit-tests/modorder.mk +unit-tests/modts.exp +unit-tests/modts.mk +unit-tests/modword.exp +unit-tests/modword.mk +unit-tests/order.exp +unit-tests/order.mk +unit-tests/phony-end.exp +unit-tests/phony-end.mk +unit-tests/posix.exp +unit-tests/posix.mk +unit-tests/posix1.exp +unit-tests/posix1.mk +unit-tests/qequals.exp +unit-tests/qequals.mk +unit-tests/suffixes.exp +unit-tests/suffixes.mk +unit-tests/sunshcmd.exp +unit-tests/sunshcmd.mk +unit-tests/sysv.exp +unit-tests/sysv.mk +unit-tests/ternary.exp +unit-tests/ternary.mk +unit-tests/unexport-env.exp +unit-tests/unexport-env.mk +unit-tests/unexport.exp +unit-tests/unexport.mk +unit-tests/varcmd.exp +unit-tests/varcmd.mk +unit-tests/varmisc.exp +unit-tests/varmisc.mk +unit-tests/varshell.exp +unit-tests/varshell.mk util.c var.c wait.h Modified: vendor/NetBSD/bmake/dist/Makefile ============================================================================== --- vendor/NetBSD/bmake/dist/Makefile Mon Apr 20 02:23:00 2015 (r281759) +++ vendor/NetBSD/bmake/dist/Makefile Mon Apr 20 03:45:54 2015 (r281760) @@ -1,7 +1,7 @@ -# $Id: Makefile,v 1.27 2014/06/20 14:51:54 sjg Exp $ +# $Id: Makefile,v 1.36 2015/04/18 19:58:53 sjg Exp $ # Base version on src date -MAKE_VERSION= 20140620 +MAKE_VERSION= 20150418 PROG= bmake @@ -180,9 +180,9 @@ COPTS.parse.c += -Wno-format-nonliteral COPTS.var.c += -Wno-format-nonliteral # Force these -SHAREDIR= ${prefix}/share -BINDIR= ${prefix}/bin -MANDIR= ${SHAREDIR}/man +SHAREDIR= ${SHAREDIR.bmake:U${prefix}/share} +BINDIR= ${BINDIR.bmake:U${prefix}/bin} +MANDIR= ${MANDIR.bmake:U${SHAREDIR}/man} .if !exists(.depend) ${OBJS}: config.h Modified: vendor/NetBSD/bmake/dist/PSD.doc/Makefile ============================================================================== --- vendor/NetBSD/bmake/dist/PSD.doc/Makefile Mon Apr 20 02:23:00 2015 (r281759) +++ vendor/NetBSD/bmake/dist/PSD.doc/Makefile Mon Apr 20 03:45:54 2015 (r281760) @@ -1,8 +1,10 @@ -# $NetBSD: Makefile,v 1.2 1995/06/14 15:20:23 christos Exp $ +# $NetBSD: Makefile,v 1.4 2014/07/05 19:22:43 dholland Exp $ # @(#)Makefile 8.1 (Berkeley) 8/14/93 -DIR= psd/12.make +SECTION=reference/ref1 +ARTICLE=make SRCS= tutorial.ms MACROS= -ms +EXTRAHTMLFILES=make1.png make2.png .include Modified: vendor/NetBSD/bmake/dist/PSD.doc/tutorial.ms ============================================================================== --- vendor/NetBSD/bmake/dist/PSD.doc/tutorial.ms Mon Apr 20 02:23:00 2015 (r281759) +++ vendor/NetBSD/bmake/dist/PSD.doc/tutorial.ms Mon Apr 20 03:45:54 2015 (r281760) @@ -1,4 +1,4 @@ -.\" $NetBSD: tutorial.ms,v 1.11 2011/08/18 15:19:30 sjg Exp $ +.\" $NetBSD: tutorial.ms,v 1.12 2014/09/30 21:33:14 christos Exp $ .\" Copyright (c) 1988, 1989, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -67,6 +67,16 @@ .\" .EH 'PSD:12-%''PMake \*- A Tutorial' .OH 'PMake \*- A Tutorial''PSD:12-%' +.\" Ix is an indexing macro similar to .IX but I've disabled it for now +.\" Since that would require 2 passes and I am not in the mood for that. +.de Ix +.. +.\" Rd is section (region) define and Rm is region mention? Again disable for +.\" now. +.de Rd +.. +.de Rm +.. .\" xH is a macro to provide numbered headers that are automatically stuffed .\" into a table-of-contents, properly indented, etc. If the first argument .\" is numeric, it is taken as the depth for numbering (as for .NH), else Modified: vendor/NetBSD/bmake/dist/bmake.1 ============================================================================== --- vendor/NetBSD/bmake/dist/bmake.1 Mon Apr 20 02:23:00 2015 (r281759) +++ vendor/NetBSD/bmake/dist/bmake.1 Mon Apr 20 03:45:54 2015 (r281760) @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.229 2014/01/19 10:23:29 apb Exp $ +.\" $NetBSD: make.1,v 1.247 2015/04/10 08:43:32 wiz Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd February 14, 2014 +.Dd April 9, 2015 .Dt MAKE 1 .Os .Sh NAME @@ -209,8 +209,6 @@ Force the option to print raw values of variables. .It Ar v Print debugging information about variable assignment. -.It Ar w -Print entering and leaving directory messages, pre and post processing. .It Ar x Run shell commands with .Fl x @@ -352,6 +350,8 @@ contains a then the value will be expanded before printing. .It Fl W Treat any warnings during makefile parsing as errors. +.It Fl w +Print entering and leaving directory messages, pre and post processing. .It Fl X Don't export variables passed on the command line to the environment individually. @@ -441,17 +441,29 @@ The value need not necessarily be used to describe existing files. Expansion is in directory order, not alphabetically as done in the shell. .Sh SHELL COMMANDS -Each target may have associated with it a series of shell commands, normally +Each target may have associated with it one or more lines of shell +commands, normally used to create the target. -Each of the commands in this script +Each of the lines in this script .Em must be preceded by a tab. -While any target may appear on a dependency line, only one of these -dependencies may be followed by a creation script, unless the +(For historical reasons, spaces are not accepted.) +While targets can appear in many dependency lines if desired, by +default only one of these rules may be followed by a creation +script. +If the .Ql Ic \&:: -operator is used. +operator is used, however, all rules may include scripts and the +scripts are executed in the order found. .Pp -If the first characters of the command line are any combination of +Each line is treated as a separate shell command, unless the end of +line is escaped with a backslash +.Pq Ql \e +in which case that line and the next are combined. +.\" The escaped newline is retained and passed to the shell, which +.\" normally ignores it. +.\" However, the tab at the beginning of the following line is removed. +If the first characters of the command are any combination of .Ql Ic @ , .Ql Ic + , or @@ -469,6 +481,7 @@ This is similar to the effect of the .MA except that the effect can be limited to a single line of a script. A .Ql Ic \- +in compatibility mode causes any non-zero exit status of the command line to be ignored. .Pp When @@ -477,22 +490,21 @@ is run in jobs mode with .Fl j Ar max_jobs , the entire script for the target is fed to a single instance of the shell. -.Pp In compatibility (non-jobs) mode, each command is run in a separate process. If the command contains any shell meta characters .Pq Ql #=|^(){};&<>*?[]:$`\e\en -it will be passed to the shell, otherwise +it will be passed to the shell; otherwise .Nm will attempt direct execution. -.Pp -Since -.Nm -will -.Xr chdir 2 -to -.Ql Va .OBJDIR -before executing any targets, each child process -starts with that as its current working directory. +If a line starts with +.Ql Ic \- +and the shell has ErrCtl enabled then failure of the command line +will be ignored as in compatibility mode. +Otherwise +.Ql Ic \- +affects the entire job; +the script will stop at the first command line that fails, +but the target will not be deemed to have failed. .Pp Makefiles should be written so that the mode of .Nm @@ -500,20 +512,32 @@ operation does not change their behavior For example, any command which needs to use .Dq cd or -.Dq chdir , -without side-effect should be put in parenthesis: +.Dq chdir +without potentially changing the directory for subsequent commands +should be put in parentheses so it executes in a subshell. +To force the use of one shell, escape the line breaks so as to make +the whole script one command. +For example: .Bd -literal -offset indent - avoid-chdir-side-effects: @echo Building $@ in `pwd` - @(cd ${.CURDIR} && ${.MAKE} $@) + @(cd ${.CURDIR} && ${MAKE} $@) @echo Back in `pwd` ensure-one-shell-regardless-of-mode: - @echo Building $@ in `pwd`; \\ - (cd ${.CURDIR} && ${.MAKE} $@); \\ + @echo Building $@ in `pwd`; \e + (cd ${.CURDIR} && ${MAKE} $@); \e echo Back in `pwd` .Ed +.Pp +Since +.Nm +will +.Xr chdir 2 +to +.Ql Va .OBJDIR +before executing any targets, each child process +starts with that as its current working directory. .Sh VARIABLE ASSIGNMENTS Variables in make are much like variables in the shell, and, by tradition, consist of all upper-case letters. @@ -624,13 +648,19 @@ Variables defined in the makefile or in Variables defined as part of the command line. .It Local variables Variables that are defined specific to a certain target. +.El +.Pp +Local variables are all built in and their values vary magically from +target to target. +It is not currently possible to define new local variables. The seven local variables are as follows: -.Bl -tag -width ".ARCHIVE" +.Bl -tag -width ".ARCHIVE" -offset indent .It Va .ALLSRC The list of all sources for this target; also known as .Ql Va \&\*[Gt] . .It Va .ARCHIVE -The name of the archive file. +The name of the archive file; also known as +.Ql Va \&! . .It Va .IMPSRC In suffix-transformation rules, the name/path of the source from which the target is to be transformed (the @@ -639,7 +669,8 @@ source); also known as .Ql Va \&\*[Lt] . It is not defined in explicit rules. .It Va .MEMBER -The name of the archive member. +The name of the archive member; also known as +.Ql Va % . .It Va .OODATE The list of sources for this target that were deemed out-of-date; also known as @@ -648,31 +679,41 @@ known as The file prefix of the target, containing only the file portion, no suffix or preceding directory components; also known as .Ql Va * . +The suffix must be one of the known suffixes declared with +.Ic .SUFFIXES +or it will not be recognized. .It Va .TARGET The name of the target; also known as .Ql Va @ . .El .Pp The shorter forms -.Ql Va @ , +.Ql ( Va \*[Gt] , +.Ql Va \&! , +.Ql Va \*[Lt] , +.Ql Va % , .Ql Va \&? , -.Ql Va \&\*[Lt] , -.Ql Va \&\*[Gt] , +.Ql Va * , and -.Ql Va * +.Ql Va @ ) are permitted for backward -compatibility with historical makefiles and are not recommended. -The six variables -.Ql Va "@F" , -.Ql Va "@D" , -.Ql Va "\*[Lt]F" , -.Ql Va "\*[Lt]D" , -.Ql Va "*F" , +compatibility with historical makefiles and legacy POSIX make and are +not recommended. +.Pp +Variants of these variables with the punctuation followed immediately by +.Ql D +or +.Ql F , +e.g. +.Ql Va $(@D) , +are legacy forms equivalent to using the +.Ql :H and -.Ql Va "*D" -are permitted for compatibility with +.Ql :T +modifiers. +These forms are accepted for compatibility with .At V -makefiles and are not recommended. +makefiles and POSIX but are not recommended. .Pp Four of the local variables may be used in sources on dependency lines because they expand to the proper value for each target on the line. @@ -682,7 +723,6 @@ These variables are .Ql Va .ARCHIVE , and .Ql Va .MEMBER . -.El .Ss Additional built-in variables In addition, .Nm @@ -2119,19 +2159,87 @@ system makefile system makefile directory .El .Sh COMPATIBILITY -The basic make syntax is compatible between different versions of make, +The basic make syntax is compatible between different versions of make; however the special variables, variable modifiers and conditionals are not. -.Pp -The way that parallel makes are scheduled changed in -NetBSD 4.0 -so that .ORDER and .WAIT apply recursively to the dependent nodes. -The algorithms used may change again in the future. +.Ss Older versions +An incomplete list of changes in older versions of +.Nm : .Pp The way that .for loop variables are substituted changed after NetBSD 5.0 so that they still appear to be variable expansions. In particular this stops them being treated as syntax, and removes some obscure problems using them in .if statements. +.Pp +The way that parallel makes are scheduled changed in +NetBSD 4.0 +so that .ORDER and .WAIT apply recursively to the dependent nodes. +The algorithms used may change again in the future. +.Ss Other make dialects +Other make dialects (GNU make, SVR4 make, POSIX make, etc.) do not +support most of the features of +.Nm +as described in this manual. +Most notably: +.Bl -bullet -offset indent +.It +The +.Ic .WAIT +and +.Ic .ORDER +declarations and most functionality pertaining to parallelization. +(GNU make supports parallelization but lacks these features needed to +control it effectively.) +.It +Directives, including for loops and conditionals and most of the +forms of include files. +(GNU make has its own incompatible and less powerful syntax for +conditionals.) +.It +All built-in variables that begin with a dot. +.It +Most of the special sources and targets that begin with a dot, +with the notable exception of +.Ic .PHONY , +.Ic .PRECIOUS , +and +.Ic .SUFFIXES . +.It +Variable modifiers, except for the +.Dl :old=new +string substitution, which does not portably support globbing with +.Ql % +and historically only works on declared suffixes. +.It +The +.Ic $> +variable even in its short form; most makes support this functionality +but its name varies. +.El +.Pp +Some features are somewhat more portable, such as assignment with +.Ic += , +.Ic ?= , +and +.Ic != . +The +.Ic .PATH +functionality is based on an older feature +.Ic VPATH +found in GNU make and many versions of SVR4 make; however, +historically its behavior is too ill-defined (and too buggy) to rely +upon. +.Pp +The +.Ic $@ +and +.Ic $< +variables are more or less universally portable, as is the +.Ic $(MAKE) +variable. +Basic use of suffix rules (for files only in the current directory, +not trying to chain transformations together, etc.) is also reasonably +portable. .Sh SEE ALSO .Xr mkdep 1 .Sh HISTORY Modified: vendor/NetBSD/bmake/dist/bmake.cat1 ============================================================================== --- vendor/NetBSD/bmake/dist/bmake.cat1 Mon Apr 20 02:23:00 2015 (r281759) +++ vendor/NetBSD/bmake/dist/bmake.cat1 Mon Apr 20 03:45:54 2015 (r281760) @@ -122,9 +122,6 @@ DDEESSCCRRIIPPTTIIOONN _v Print debugging information about variable assignment. - _w Print entering and leaving directory messages, pre and - post processing. - _x Run shell commands with --xx so the actual commands are printed as they are executed. @@ -221,6 +218,9 @@ DDEESSCCRRIIPPTTIIOONN --WW Treat any warnings during makefile parsing as errors. + --ww Print entering and leaving directory messages, pre and post pro- + cessing. + --XX Don't export variables passed on the command line to the environ- ment individually. Variables passed on the command line are still exported via the _M_A_K_E_F_L_A_G_S environment variable. This @@ -273,46 +273,55 @@ FFIILLEE DDEEPPEENNDDEENNCC done in the shell. SSHHEELLLL CCOOMMMMAANNDDSS - Each target may have associated with it a series of shell commands, nor- - mally used to create the target. Each of the commands in this script - _m_u_s_t be preceded by a tab. While any target may appear on a dependency - line, only one of these dependencies may be followed by a creation - script, unless the `::::' operator is used. - - If the first characters of the command line are any combination of `@@', - `++', or `--', the command is treated specially. A `@@' causes the command - not to be echoed before it is executed. A `++' causes the command to be - executed even when --nn is given. This is similar to the effect of the - .MAKE special source, except that the effect can be limited to a single - line of a script. A `--' causes any non-zero exit status of the command - line to be ignored. + Each target may have associated with it one or more lines of shell com- + mands, normally used to create the target. Each of the lines in this + script _m_u_s_t be preceded by a tab. (For historical reasons, spaces are + not accepted.) While targets can appear in many dependency lines if + desired, by default only one of these rules may be followed by a creation + script. If the `::::' operator is used, however, all rules may include + scripts and the scripts are executed in the order found. + + Each line is treated as a separate shell command, unless the end of line + is escaped with a backslash (`\') in which case that line and the next + are combined. If the first characters of the command are any combination + of `@@', `++', or `--', the command is treated specially. A `@@' causes the + command not to be echoed before it is executed. A `++' causes the command + to be executed even when --nn is given. This is similar to the effect of + the .MAKE special source, except that the effect can be limited to a sin- + gle line of a script. A `--' in compatibility mode causes any non-zero + exit status of the command line to be ignored. When bbmmaakkee is run in jobs mode with --jj _m_a_x___j_o_b_s, the entire script for - the target is fed to a single instance of the shell. - - In compatibility (non-jobs) mode, each command is run in a separate - process. If the command contains any shell meta characters - (`#=|^(){};&<>*?[]:$`\\n') it will be passed to the shell, otherwise - bbmmaakkee will attempt direct execution. - - Since bbmmaakkee will chdir(2) to `_._O_B_J_D_I_R' before executing any targets, each - child process starts with that as its current working directory. + the target is fed to a single instance of the shell. In compatibility + (non-jobs) mode, each command is run in a separate process. If the com- + mand contains any shell meta characters (`#=|^(){};&<>*?[]:$`\\n') it + will be passed to the shell; otherwise bbmmaakkee will attempt direct execu- + tion. If a line starts with `--' and the shell has ErrCtl enabled then + failure of the command line will be ignored as in compatibility mode. + Otherwise `--' affects the entire job; the script will stop at the first + command line that fails, but the target will not be deemed to have + failed. Makefiles should be written so that the mode of bbmmaakkee operation does not change their behavior. For example, any command which needs to use - ``cd'' or ``chdir'', without side-effect should be put in parenthesis: - + ``cd'' or ``chdir'' without potentially changing the directory for subse- + quent commands should be put in parentheses so it executes in a subshell. + To force the use of one shell, escape the line breaks so as to make the + whole script one command. For example: avoid-chdir-side-effects: @echo Building $@ in `pwd` - @(cd ${.CURDIR} && ${.MAKE} $@) + @(cd ${.CURDIR} && ${MAKE} $@) @echo Back in `pwd` ensure-one-shell-regardless-of-mode: @echo Building $@ in `pwd`; \ - (cd ${.CURDIR} && ${.MAKE} $@); \ + (cd ${.CURDIR} && ${MAKE} $@); \ echo Back in `pwd` + Since bbmmaakkee will chdir(2) to `_._O_B_J_D_I_R' before executing any targets, each + child process starts with that as its current working directory. + VVAARRIIAABBLLEE AASSSSIIGGNNMMEENNTTSS Variables in make are much like variables in the shell, and, by tradi- tion, consist of all upper-case letters. @@ -402,40 +411,47 @@ VVAARRIIAABBLLEE AASSSSIIGG Variables defined as part of the command line. Local variables - Variables that are defined specific to a certain target. The - seven local variables are as follows: + Variables that are defined specific to a certain target. - _._A_L_L_S_R_C The list of all sources for this target; also known as - `_>'. + Local variables are all built in and their values vary magically from + target to target. It is not currently possible to define new local vari- + ables. The seven local variables are as follows: - _._A_R_C_H_I_V_E The name of the archive file. + _._A_L_L_S_R_C The list of all sources for this target; also known as + `_>'. - _._I_M_P_S_R_C In suffix-transformation rules, the name/path of the - source from which the target is to be transformed (the - ``implied'' source); also known as `_<'. It is not - defined in explicit rules. + _._A_R_C_H_I_V_E The name of the archive file; also known as `_!'. - _._M_E_M_B_E_R The name of the archive member. + _._I_M_P_S_R_C In suffix-transformation rules, the name/path of the + source from which the target is to be transformed (the + ``implied'' source); also known as `_<'. It is not + defined in explicit rules. - _._O_O_D_A_T_E The list of sources for this target that were deemed - out-of-date; also known as `_?'. + _._M_E_M_B_E_R The name of the archive member; also known as `_%'. - _._P_R_E_F_I_X The file prefix of the target, containing only the file - portion, no suffix or preceding directory components; - also known as `_*'. + _._O_O_D_A_T_E The list of sources for this target that were deemed out- + of-date; also known as `_?'. - _._T_A_R_G_E_T The name of the target; also known as `_@'. + _._P_R_E_F_I_X The file prefix of the target, containing only the file + portion, no suffix or preceding directory components; + also known as `_*'. The suffix must be one of the known + suffixes declared with ..SSUUFFFFIIXXEESS or it will not be recog- + nized. - The shorter forms `_@', `_?', `_<', `_>', and `_*' are permitted for - backward compatibility with historical makefiles and are not rec- - ommended. The six variables `_@_F', `_@_D', `_<_F', `_<_D', `_*_F', and - `_*_D' are permitted for compatibility with AT&T System V UNIX - makefiles and are not recommended. + _._T_A_R_G_E_T The name of the target; also known as `_@'. - Four of the local variables may be used in sources on dependency - lines because they expand to the proper value for each target on - the line. These variables are `_._T_A_R_G_E_T', `_._P_R_E_F_I_X', `_._A_R_C_H_I_V_E', - and `_._M_E_M_B_E_R'. + The shorter forms (`_>', `_!', `_<', `_%', `_?', `_*', and `_@') are permitted + for backward compatibility with historical makefiles and legacy POSIX + make and are not recommended. + + Variants of these variables with the punctuation followed immediately by + `D' or `F', e.g. `_$_(_@_D_)', are legacy forms equivalent to using the `:H' + and `:T' modifiers. These forms are accepted for compatibility with AT&T + System V UNIX makefiles and POSIX but are not recommended. + + Four of the local variables may be used in sources on dependency lines + because they expand to the proper value for each target on the line. + These variables are `_._T_A_R_G_E_T', `_._P_R_E_F_I_X', `_._A_R_C_H_I_V_E', and `_._M_E_M_B_E_R'. AAddddiittiioonnaall bbuuiilltt--iinn vvaarriiaabblleess In addition, bbmmaakkee sets or knows about the following variables: @@ -1356,19 +1372,58 @@ FFIILLEESS /usr/share/mk system makefile directory CCOOMMPPAATTIIBBIILLIITTYY - The basic make syntax is compatible between different versions of make, + The basic make syntax is compatible between different versions of make; however the special variables, variable modifiers and conditionals are not. - The way that parallel makes are scheduled changed in NetBSD 4.0 so that - .ORDER and .WAIT apply recursively to the dependent nodes. The algo- - rithms used may change again in the future. + OOllddeerr vveerrssiioonnss + An incomplete list of changes in older versions of bbmmaakkee: The way that .for loop variables are substituted changed after NetBSD 5.0 so that they still appear to be variable expansions. In particular this stops them being treated as syntax, and removes some obscure problems using them in .if statements. + The way that parallel makes are scheduled changed in NetBSD 4.0 so that + .ORDER and .WAIT apply recursively to the dependent nodes. The algo- + rithms used may change again in the future. + + OOtthheerr mmaakkee ddiiaalleeccttss + Other make dialects (GNU make, SVR4 make, POSIX make, etc.) do not sup- + port most of the features of bbmmaakkee as described in this manual. Most + notably: + + ++oo The ..WWAAIITT and ..OORRDDEERR declarations and most functionality per- + taining to parallelization. (GNU make supports parallelization + but lacks these features needed to control it effectively.) + + ++oo Directives, including for loops and conditionals and most of + the forms of include files. (GNU make has its own incompatible + and less powerful syntax for conditionals.) + + ++oo All built-in variables that begin with a dot. + + ++oo Most of the special sources and targets that begin with a dot, + with the notable exception of ..PPHHOONNYY, ..PPRREECCIIOOUUSS, and ..SSUUFFFFIIXXEESS. + + ++oo Variable modifiers, except for the + :old=new + string substitution, which does not portably support globbing + with `%' and historically only works on declared suffixes. + + ++oo The $$>> variable even in its short form; most makes support this + functionality but its name varies. + + Some features are somewhat more portable, such as assignment with ++==, ??==, + and !!==. The ..PPAATTHH functionality is based on an older feature VVPPAATTHH found + in GNU make and many versions of SVR4 make; however, historically its + behavior is too ill-defined (and too buggy) to rely upon. + + The $$@@ and $$<< variables are more or less universally portable, as is the + $$((MMAAKKEE)) variable. Basic use of suffix rules (for files only in the cur- + rent directory, not trying to chain transformations together, etc.) is + also reasonably portable. + SSEEEE AALLSSOO mkdep(1) @@ -1394,4 +1449,4 @@ BBUUGGSS There is no way of escaping a space character in a filename. -NetBSD 5.1 February 14, 2014 NetBSD 5.1 +NetBSD 5.1 April 9, 2015 NetBSD 5.1 Modified: vendor/NetBSD/bmake/dist/compat.c ============================================================================== --- vendor/NetBSD/bmake/dist/compat.c Mon Apr 20 02:23:00 2015 (r281759) +++ vendor/NetBSD/bmake/dist/compat.c Mon Apr 20 03:45:54 2015 (r281760) @@ -1,4 +1,4 @@ -/* $NetBSD: compat.c,v 1.94 2014/01/03 00:02:01 sjg Exp $ */ +/* $NetBSD: compat.c,v 1.96 2014/09/07 20:55:34 joerg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: compat.c,v 1.94 2014/01/03 00:02:01 sjg Exp $"; +static char rcsid[] = "$NetBSD: compat.c,v 1.96 2014/09/07 20:55:34 joerg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)compat.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: compat.c,v 1.94 2014/01/03 00:02:01 sjg Exp $"); +__RCSID("$NetBSD: compat.c,v 1.96 2014/09/07 20:55:34 joerg Exp $"); #endif #endif /* not lint */ #endif Modified: vendor/NetBSD/bmake/dist/configure ============================================================================== Binary file (source and/or target). No diff available. Modified: vendor/NetBSD/bmake/dist/configure.in ============================================================================== --- vendor/NetBSD/bmake/dist/configure.in Mon Apr 20 02:23:00 2015 (r281759) +++ vendor/NetBSD/bmake/dist/configure.in Mon Apr 20 03:45:54 2015 (r281760) @@ -1,6 +1,6 @@ dnl dnl RCSid: -dnl $Id: configure.in,v 1.52 2014/02/15 22:27:59 sjg Exp $ +dnl $Id: configure.in,v 1.53 2014/11/06 01:49:40 sjg Exp $ dnl dnl Process this file with autoconf to produce a configure script dnl @@ -82,6 +82,8 @@ dnl dnl Hurd refuses to define PATH_MAX or MAXPATHLEN if test -x /usr/bin/getconf; then bmake_path_max=`getconf PATH_MAX / 2> /dev/null` + # only a numeric response is useful + test ${bmake_path_max:-0} -gt 0 2> /dev/null || bmake_path_max= fi bmake_path_max=${bmake_path_max:-1024} if test $bmake_path_max -gt 1024; then Modified: vendor/NetBSD/bmake/dist/job.c ============================================================================== --- vendor/NetBSD/bmake/dist/job.c Mon Apr 20 02:23:00 2015 (r281759) +++ vendor/NetBSD/bmake/dist/job.c Mon Apr 20 03:45:54 2015 (r281760) @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.176 2013/08/04 16:48:15 sjg Exp $ */ +/* $NetBSD: job.c,v 1.180 2015/04/16 13:31:03 joerg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: job.c,v 1.176 2013/08/04 16:48:15 sjg Exp $"; +static char rcsid[] = "$NetBSD: job.c,v 1.180 2015/04/16 13:31:03 joerg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: job.c,v 1.176 2013/08/04 16:48:15 sjg Exp $"); +__RCSID("$NetBSD: job.c,v 1.180 2015/04/16 13:31:03 joerg Exp $"); #endif #endif /* not lint */ #endif @@ -728,7 +728,6 @@ JobPrintCommand(void *cmdp, void *jobp) shutUp = DEBUG(LOUD) ? FALSE : TRUE; break; case '-': - job->flags |= JOB_IGNERR; errOff = TRUE; break; case '+': @@ -807,6 +806,7 @@ JobPrintCommand(void *cmdp, void *jobp) * to ignore errors. Set cmdTemplate to use the weirdness * instead of the simple "%s\n" template. */ + job->flags |= JOB_IGNERR; if (!(job->flags & JOB_SILENT) && !shutUp) { if (commandShell->hasEchoCtl) { DBPRINTF("%s\n", commandShell->echoOff); @@ -1360,7 +1360,7 @@ JobExec(Job *job, char **argv) (void)fcntl(0, F_SETFD, 0); (void)lseek(0, (off_t)0, SEEK_SET); - if (job->node->type & OP_MAKE) { + if (job->node->type & (OP_MAKE | OP_SUBMAKE)) { /* * Pass job token pipe to submakes. */ @@ -1894,16 +1894,16 @@ end_loop: (void)fflush(stdout); } } - if (i < max - 1) { - /* shift the remaining characters down */ - (void)memcpy(job->outBuf, &job->outBuf[i + 1], max - (i + 1)); + /* + * max is the last offset still in the buffer. Move any remaining + * characters to the start of the buffer and update the end marker + * curPos. + */ + if (i < max) { + (void)memmove(job->outBuf, &job->outBuf[i + 1], max - (i + 1)); job->curPos = max - (i + 1); - } else { - /* - * We have written everything out, so we just start over - * from the start of the buffer. No copying. No nothing. - */ + assert(i == max); job->curPos = 0; } } Modified: vendor/NetBSD/bmake/dist/lst.h ============================================================================== --- vendor/NetBSD/bmake/dist/lst.h Mon Apr 20 02:23:00 2015 (r281759) +++ vendor/NetBSD/bmake/dist/lst.h Mon Apr 20 03:45:54 2015 (r281760) @@ -1,4 +1,4 @@ -/* $NetBSD: lst.h,v 1.18 2009/01/23 21:58:27 dsl Exp $ */ +/* $NetBSD: lst.h,v 1.20 2014/09/07 20:55:34 joerg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. Modified: vendor/NetBSD/bmake/dist/lst.lib/lstInt.h ============================================================================== --- vendor/NetBSD/bmake/dist/lst.lib/lstInt.h Mon Apr 20 02:23:00 2015 (r281759) +++ vendor/NetBSD/bmake/dist/lst.lib/lstInt.h Mon Apr 20 03:45:54 2015 (r281760) @@ -1,4 +1,4 @@ -/* $NetBSD: lstInt.h,v 1.20 2009/01/24 14:43:29 dsl Exp $ */ +/* $NetBSD: lstInt.h,v 1.22 2014/09/07 20:55:34 joerg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 Modified: vendor/NetBSD/bmake/dist/lst.lib/lstRemove.c ============================================================================== --- vendor/NetBSD/bmake/dist/lst.lib/lstRemove.c Mon Apr 20 02:23:00 2015 (r281759) +++ vendor/NetBSD/bmake/dist/lst.lib/lstRemove.c Mon Apr 20 03:45:54 2015 (r281760) @@ -1,4 +1,4 @@ -/* $NetBSD: lstRemove.c,v 1.14 2008/12/13 15:19:29 dsl Exp $ */ +/* $NetBSD: lstRemove.c,v 1.16 2014/09/07 20:55:34 joerg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -33,14 +33,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: lstRemove.c,v 1.14 2008/12/13 15:19:29 dsl Exp $"; +static char rcsid[] = "$NetBSD: lstRemove.c,v 1.16 2014/09/07 20:55:34 joerg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)lstRemove.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: lstRemove.c,v 1.14 2008/12/13 15:19:29 dsl Exp $"); +__RCSID("$NetBSD: lstRemove.c,v 1.16 2014/09/07 20:55:34 joerg Exp $"); #endif #endif /* not lint */ #endif Modified: vendor/NetBSD/bmake/dist/main.c ============================================================================== --- vendor/NetBSD/bmake/dist/main.c Mon Apr 20 02:23:00 2015 (r281759) +++ vendor/NetBSD/bmake/dist/main.c Mon Apr 20 03:45:54 2015 (r281760) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 03:46:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9EA87DC8; Mon, 20 Apr 2015 03:46:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 73EF0AD0; Mon, 20 Apr 2015 03:46:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3K3kr2J052349; Mon, 20 Apr 2015 03:46:53 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3K3krNw052348; Mon, 20 Apr 2015 03:46:53 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201504200346.t3K3krNw052348@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Mon, 20 Apr 2015 03:46:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r281761 - vendor/NetBSD/bmake/20150418 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 03:46:53 -0000 Author: sjg Date: Mon Apr 20 03:46:52 2015 New Revision: 281761 URL: https://svnweb.freebsd.org/changeset/base/281761 Log: bmake-20150418 Added: vendor/NetBSD/bmake/20150418/ - copied from r281760, vendor/NetBSD/bmake/dist/ From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 04:24:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0DF91136; Mon, 20 Apr 2015 04:24:03 +0000 (UTC) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 46487E0D; Mon, 20 Apr 2015 04:24:02 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 83D733C6323; Mon, 20 Apr 2015 14:23:58 +1000 (AEST) Date: Mon, 20 Apr 2015 14:23:58 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Eitan Adler cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281758 - head/bin/ed In-Reply-To: <201504200207.t3K27vFt078041@svn.freebsd.org> Message-ID: <20150420134409.I855@besplex.bde.org> References: <201504200207.t3K27vFt078041@svn.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.1 cv=L/MkHYj8 c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=SCDeaYg9Xmf2xJ3y6JIA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 04:24:03 -0000 On Mon, 20 Apr 2015, Eitan Adler wrote: > Log: > ed(1): Fix [-Werror=logical-not-parentheses] > /usr/src/bin/ed/glbl.c:64:36: error: logical not is only applied to > theleft hand side of comparison [-Werror=logical-not-parentheses] > > Obtained from: Dragonfly (1fff89cbaeaa43af720a1f23d9c466b756dd8a58) > MFC After: 1 month > > Modified: > head/bin/ed/glbl.c > > Modified: head/bin/ed/glbl.c > ============================================================================== > --- head/bin/ed/glbl.c Mon Apr 20 00:24:32 2015 (r281757) > +++ head/bin/ed/glbl.c Mon Apr 20 02:07:57 2015 (r281758) > @@ -60,7 +60,7 @@ build_active_list(int isgcmd) > return ERR; > if (isbinary) > NUL_TO_NEWLINE(s, lp->len); > - if (!regexec(pat, s, 0, NULL, 0) == isgcmd && > + if (!(regexec(pat, s, 0, NULL, 0) == isgcmd) && > set_active_node(lp) < 0) > return ERR; > } How can this be right? !(a == b) is an obfuscated way of writing a != b. The old code seems to have been correct. regexec() returns a pseudo-inverted boolean (0 for success, nonzero for error). isgcmd is a pure boolean (it is an int function arg, so it could be any integer, but it is in a function whose only caller passes it the result of a logical expression). Presumably it is not inverted. Pseudo-inverted booleans must be turned into a pure booleans before being compared with pure booleans, and must usually be inverted. Presumably, inversion is wanted here. This was done using the ! operator. Now, nonsense is done. There is a type mismatch (integer compared with boolean), and even if the integer has only boolean values, then these are probably reversed. The correct way to turn a pseudo-inverted boolean named `error' into a non-inverted boolean is (error == 0), not !error, even if `error' is spelled `regexec(pat, s, 0, NULL, 0)'. Strict KNF doesn't even allow using the ! operator for booleans, but ed(1) uses the ! operator a bit. Sloppy code uses `if (error)' and `if (!error)'. These work because they are equivalent to `if (error != 0)' and `if (error == 0') respectively, and integer 0 represents boolean false uniquely. Similar expressions with integer 1 or a boolean variable don't work because nonzero integers don't represent boolean true uniquely. A related popular obfuscation is to convert a pseudo-non-inverted boolean pnib to a non-inverted boolean using !!pnib. This saves a few characters and is easy for a quick edit than writing (pnib != 0). Bruce From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 08:25:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 872426DB; Mon, 20 Apr 2015 08:25:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7564DBE1; Mon, 20 Apr 2015 08:25:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3K8PuHR058547; Mon, 20 Apr 2015 08:25:56 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3K8Pu2V058541; Mon, 20 Apr 2015 08:25:56 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504200825.t3K8Pu2V058541@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 20 Apr 2015 08:25:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281762 - in head/sys: amd64/amd64 i386/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 08:25:56 -0000 Author: kib Date: Mon Apr 20 08:25:55 2015 New Revision: 281762 URL: https://svnweb.freebsd.org/changeset/base/281762 Log: Remove duplicate definitions of MWAIT_CX hints. Identical defines in specialreg.h are enough. Discussed with: mav Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/amd64/amd64/machdep.c head/sys/i386/i386/machdep.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Mon Apr 20 03:46:52 2015 (r281761) +++ head/sys/amd64/amd64/machdep.c Mon Apr 20 08:25:55 2015 (r281762) @@ -730,15 +730,6 @@ cpu_idle_hlt(sbintime_t sbt) *state = STATE_RUNNING; } -/* - * MWAIT cpu power states. Lower 4 bits are sub-states. - */ -#define MWAIT_C0 0xf0 -#define MWAIT_C1 0x00 -#define MWAIT_C2 0x10 -#define MWAIT_C3 0x20 -#define MWAIT_C4 0x30 - static void cpu_idle_mwait(sbintime_t sbt) { Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Mon Apr 20 03:46:52 2015 (r281761) +++ head/sys/i386/i386/machdep.c Mon Apr 20 08:25:55 2015 (r281762) @@ -1361,15 +1361,6 @@ cpu_idle_hlt(sbintime_t sbt) } #endif -/* - * MWAIT cpu power states. Lower 4 bits are sub-states. - */ -#define MWAIT_C0 0xf0 -#define MWAIT_C1 0x00 -#define MWAIT_C2 0x10 -#define MWAIT_C3 0x20 -#define MWAIT_C4 0x30 - static void cpu_idle_mwait(sbintime_t sbt) { From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 09:07:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31985F91; Mon, 20 Apr 2015 09:07:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FACE72; Mon, 20 Apr 2015 09:07:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3K97CZk089842; Mon, 20 Apr 2015 09:07:12 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3K97Cv6089841; Mon, 20 Apr 2015 09:07:12 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504200907.t3K97Cv6089841@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 20 Apr 2015 09:07:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281763 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 09:07:13 -0000 Author: kib Date: Mon Apr 20 09:07:12 2015 New Revision: 281763 URL: https://svnweb.freebsd.org/changeset/base/281763 Log: Remove code to support the top of the stack layout for FreeBSD 1.x/2.x kernel, but keep explanation of the old ps_strings structure to make it clear what sanity check tries to accomplish. Noted by: Oliver Pinter Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/lib/libc/gen/setproctitle.c Modified: head/lib/libc/gen/setproctitle.c ============================================================================== --- head/lib/libc/gen/setproctitle.c Mon Apr 20 08:25:55 2015 (r281762) +++ head/lib/libc/gen/setproctitle.c Mon Apr 20 09:07:12 2015 (r281763) @@ -42,9 +42,10 @@ __FBSDID("$FreeBSD$"); * 1: old_ps_strings at the very top of the stack. * 2: old_ps_strings at SPARE_USRSPACE below the top of the stack. * 3: ps_strings at the very top of the stack. - * This attempts to support a kernel built in the #2 and #3 era. - */ - + * We only support a kernel providing #3 style ps_strings. + * + * For historical purposes, a definition of the old ps_strings structure + * and location is preserved below: struct old_ps_strings { char *old_ps_argvstr; int old_ps_nargvstr; @@ -53,6 +54,7 @@ struct old_ps_strings { }; #define OLD_PS_STRINGS ((struct old_ps_strings *) \ (USRSTACK - SPARE_USRSPACE - sizeof(struct old_ps_strings))) + */ #include @@ -136,41 +138,38 @@ setproctitle(const char *fmt, ...) ps_strings = (struct ps_strings *)ul_ps_strings; } - /* PS_STRINGS points to zeroed memory on a style #2 kernel */ - if (ps_strings->ps_argvstr) { - /* style #3 */ - if (oargc == -1) { - /* Record our original args */ - oargc = ps_strings->ps_nargvstr; - oargv = ps_strings->ps_argvstr; - for (i = len = 0; i < oargc; i++) { - /* - * The program may have scribbled into its - * argv array, e.g., to remove some arguments. - * If that has happened, break out before - * trying to call strlen on a NULL pointer. - */ - if (oargv[i] == NULL) { - oargc = i; - break; - } - snprintf(obuf + len, SPT_BUFSIZE - len, "%s%s", - len ? " " : "", oargv[i]); - if (len) - len++; - len += strlen(oargv[i]); - if (len >= SPT_BUFSIZE) - break; + /* + * PS_STRINGS points to zeroed memory on a style #2 kernel. + * Should not happen. + */ + if (ps_strings->ps_argvstr == NULL) + return; + + /* style #3 */ + if (oargc == -1) { + /* Record our original args */ + oargc = ps_strings->ps_nargvstr; + oargv = ps_strings->ps_argvstr; + for (i = len = 0; i < oargc; i++) { + /* + * The program may have scribbled into its + * argv array, e.g., to remove some arguments. + * If that has happened, break out before + * trying to call strlen on a NULL pointer. + */ + if (oargv[i] == NULL) { + oargc = i; + break; } + snprintf(obuf + len, SPT_BUFSIZE - len, "%s%s", + len != 0 ? " " : "", oargv[i]); + if (len != 0) + len++; + len += strlen(oargv[i]); + if (len >= SPT_BUFSIZE) + break; } - ps_strings->ps_nargvstr = nargc; - ps_strings->ps_argvstr = nargvp; - } else { - /* style #2 - we can only restore our first arg :-( */ - if (*obuf == '\0') - strncpy(obuf, OLD_PS_STRINGS->old_ps_argvstr, - SPT_BUFSIZE - 1); - OLD_PS_STRINGS->old_ps_nargvstr = 1; - OLD_PS_STRINGS->old_ps_argvstr = nargvp[0]; } + ps_strings->ps_nargvstr = nargc; + ps_strings->ps_argvstr = nargvp; } From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 10:29:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DDF84EC8; Mon, 20 Apr 2015 10:29:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC6E1B18; Mon, 20 Apr 2015 10:29:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KATgbN050968; Mon, 20 Apr 2015 10:29:42 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KATgM4050967; Mon, 20 Apr 2015 10:29:42 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504201029.t3KATgM4050967@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 20 Apr 2015 10:29:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281764 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 10:29:43 -0000 Author: mav Date: Mon Apr 20 10:29:42 2015 New Revision: 281764 URL: https://svnweb.freebsd.org/changeset/base/281764 Log: Disable RX/TX queues notifications when not needed. This reduces CPU load and doubles iperf throughput, reaching 2-3Gbit/s. MFC after: 2 weeks Sponsored by: iXsystems, Inc. Modified: head/usr.sbin/bhyve/pci_virtio_net.c Modified: head/usr.sbin/bhyve/pci_virtio_net.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_net.c Mon Apr 20 09:07:12 2015 (r281763) +++ head/usr.sbin/bhyve/pci_virtio_net.c Mon Apr 20 10:29:42 2015 (r281764) @@ -393,6 +393,7 @@ pci_vtnet_ping_rxq(void *vsc, struct vqu */ if (sc->vsc_rx_ready == 0) { sc->vsc_rx_ready = 1; + vq->vq_used->vu_flags |= VRING_USED_F_NO_NOTIFY; } } @@ -438,6 +439,7 @@ pci_vtnet_ping_txq(void *vsc, struct vqu /* Signal the tx thread for processing */ pthread_mutex_lock(&sc->tx_mtx); + vq->vq_used->vu_flags |= VRING_USED_F_NO_NOTIFY; if (sc->tx_in_progress == 0) pthread_cond_signal(&sc->tx_cond); pthread_mutex_unlock(&sc->tx_mtx); @@ -466,6 +468,7 @@ pci_vtnet_tx_thread(void *param) for (;;) { /* note - tx mutex is locked here */ do { + vq->vq_used->vu_flags &= ~VRING_USED_F_NO_NOTIFY; if (sc->resetting) have_work = 0; else @@ -478,6 +481,7 @@ pci_vtnet_tx_thread(void *param) assert(error == 0); } } while (!have_work); + vq->vq_used->vu_flags |= VRING_USED_F_NO_NOTIFY; sc->tx_in_progress = 1; pthread_mutex_unlock(&sc->tx_mtx); From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 10:44:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46CFA370; Mon, 20 Apr 2015 10:44:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 35351D05; Mon, 20 Apr 2015 10:44:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KAilRw065079; Mon, 20 Apr 2015 10:44:47 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KAilfq065078; Mon, 20 Apr 2015 10:44:47 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504201044.t3KAilfq065078@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 20 Apr 2015 10:44:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281765 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 10:44:47 -0000 Author: mav Date: Mon Apr 20 10:44:46 2015 New Revision: 281765 URL: https://svnweb.freebsd.org/changeset/base/281765 Log: Activate write-only optimization if bpf device opened with O_WRONLY. dhclient opens bpf as write-only to send packets. It never reads received packets from that descriptor, but processing them in kernel takes time. Especially much time takes packet timestamping on systems with expensive timecounter, such as bhyve guest, where network speed dropped in half. MFC after: 2 weeks Sponsored by: iXsystems, Inc. Modified: head/sys/net/bpf.c Modified: head/sys/net/bpf.c ============================================================================== --- head/sys/net/bpf.c Mon Apr 20 10:29:42 2015 (r281764) +++ head/sys/net/bpf.c Mon Apr 20 10:44:46 2015 (r281765) @@ -601,7 +601,7 @@ bpf_attachd(struct bpf_d *d, struct bpf_ * Save sysctl value to protect from sysctl change * between reads */ - op_w = V_bpf_optimize_writers; + op_w = V_bpf_optimize_writers || d->bd_writer; if (d->bd_bif != NULL) bpf_detachd_locked(d); @@ -864,6 +864,8 @@ bpfopen(struct cdev *dev, int flags, int * particular buffer method. */ bpf_buffer_init(d); + if ((flags & FREAD) == 0) + d->bd_writer = 2; d->bd_hbuf_in_use = 0; d->bd_bufmode = BPF_BUFMODE_BUFFER; d->bd_sig = SIGIO; From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 11:54:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D8DB0E7B; Mon, 20 Apr 2015 11:54:02 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::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 D6D91697; Mon, 20 Apr 2015 11:54:01 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t3KBrsOO001847 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 20 Apr 2015 14:53:54 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t3KBrsOO001847 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t3KBrpjT001845; Mon, 20 Apr 2015 14:53:51 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 20 Apr 2015 14:53:51 +0300 From: Konstantin Belousov To: Jung-uk Kim Cc: Alan Cox , John Baldwin , Bruce Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r280279 - head/sys/sys Message-ID: <20150420115351.GD2390@kib.kiev.ua> References: <201503201027.t2KAR6Ze053047@svn.freebsd.org> <550DA656.5060004@FreeBSD.org> <20150322080015.O955@besplex.bde.org> <17035816.lxyzYKiOWV@ralph.baldwin.cx> <552BFEB2.8040407@rice.edu> <552C215D.8020107@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <552C215D.8020107@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) 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.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 11:54:03 -0000 On Mon, Apr 13, 2015 at 04:04:45PM -0400, Jung-uk Kim wrote: > Please try the attached patch. > > Jung-uk Kim > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2 > > iQEcBAEBCAAGBQJVLCFZAAoJEHyflib82/FGOp0H/1+Jr+cKUn/MnV5O5SghPw9f > XzTM4+BV9BcWabLRjFe1LR065SfLDXqKLuU4h5lmVSlXQaxElAXxaMeyO3mrMzR4 > Sb1xr0rf+ZfUARJeEJWI65Wpn+gEH+7XxXAIAetYGMwwclBOBgbZIoDXITnCaUFa > /pi3zQIey8EzbvlzhQcffLDV8oF4f8HNEMoSxMRtOiZNNPu/8ECnyGeHZhOd++kh > pwZNsSbcCw3RXMheuErTpKPrJSEXgMNmWG3G00aP7L8IjcObgOqMUQt+8eT8Ge8B > tEv40kgm2G/OG2akONh4/6bX3hyodW3IHcb6AYhqZogiDIqd/eXD4jDup/kkVxU= > =1Ca9 > -----END PGP SIGNATURE----- > Index: sys/amd64/amd64/pmap.c > =================================================================== > --- sys/amd64/amd64/pmap.c (revision 281496) > +++ sys/amd64/amd64/pmap.c (working copy) > @@ -412,7 +412,7 @@ static caddr_t crashdumpmap; > static void free_pv_chunk(struct pv_chunk *pc); > static void free_pv_entry(pmap_t pmap, pv_entry_t pv); > static pv_entry_t get_pv_entry(pmap_t pmap, struct rwlock **lockp); > -static int popcnt_pc_map_elem_pq(uint64_t elem); > +static int popcnt_pc_map(uint64_t *pc_map); > static vm_page_t reclaim_pv_chunk(pmap_t locked_pmap, struct rwlock **lockp); > static void reserve_pv_entries(pmap_t pmap, int needed, > struct rwlock **lockp); > @@ -2979,7 +2979,7 @@ retry: > } > > /* > - * Returns the number of one bits within the given PV chunk map element. > + * Returns the number of one bits within the given PV chunk map. > * > * The erratas for Intel processors state that "POPCNT Instruction May > * Take Longer to Execute Than Expected". It is believed that the > @@ -2994,12 +2994,21 @@ retry: > * 5th Gen Core: BDM85 > */ > static int > -popcnt_pc_map_elem_pq(uint64_t elem) > +popcnt_pc_map(uint64_t *pc_map) > { > - u_long result; > + u_long count, result; > + int field; > > - __asm __volatile("xorl %k0,%k0;popcntq %1,%0" > - : "=&r" (result) : "rm" (elem)); > + result = 0; > + if ((cpu_feature2 & CPUID2_POPCNT) != 0) > + for (field = 0; field < _NPCM; field++) { > + __asm __volatile("xorl %k0, %k0; popcntq %1, %0" > + : "=r" (count) : "m" (pc_map[field])); > + result += count; > + } > + else > + for (field = 0; field < _NPCM; field++) > + result += bitcount64(pc_map[field]); > return (result); > } > > @@ -3031,15 +3040,7 @@ reserve_pv_entries(pmap_t pmap, int needed, struct > retry: > avail = 0; > TAILQ_FOREACH(pc, &pmap->pm_pvchunk, pc_list) { > - if ((cpu_feature2 & CPUID2_POPCNT) == 0) { > - free = bitcount64(pc->pc_map[0]); > - free += bitcount64(pc->pc_map[1]); > - free += bitcount64(pc->pc_map[2]); > - } else { > - free = popcnt_pc_map_elem_pq(pc->pc_map[0]); > - free += popcnt_pc_map_elem_pq(pc->pc_map[1]); > - free += popcnt_pc_map_elem_pq(pc->pc_map[2]); > - } > + free = popcnt_pc_map(pc->pc_map); > if (free == 0) > break; > avail += free; Yes, this worked for me the same way as for you, the argument is taken directly from memory, without temporary spill. Is this due to silly inliner ? Whatever the reason is, I think a comment should be added noting the subtlety. Otherwise, looks fine. From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 14:23:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F51CFDC; Mon, 20 Apr 2015 14:23:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DB259D9; Mon, 20 Apr 2015 14:23:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KENJ1D029557; Mon, 20 Apr 2015 14:23:19 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KENJ39029556; Mon, 20 Apr 2015 14:23:19 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504201423.t3KENJ39029556@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 20 Apr 2015 14:23:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281766 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 14:23:19 -0000 Author: mav Date: Mon Apr 20 14:23:18 2015 New Revision: 281766 URL: https://svnweb.freebsd.org/changeset/base/281766 Log: Report link as up only if we managed to open tap device. It would be cool to report tap device status, but it has no such API. MFC after: 2 weeks Modified: head/usr.sbin/bhyve/pci_virtio_net.c Modified: head/usr.sbin/bhyve/pci_virtio_net.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_net.c Mon Apr 20 10:44:46 2015 (r281765) +++ head/usr.sbin/bhyve/pci_virtio_net.c Mon Apr 20 14:23:18 2015 (r281766) @@ -644,8 +644,8 @@ pci_vtnet_init(struct vmctx *ctx, struct pci_set_cfgdata8(pi, PCIR_CLASS, PCIC_NETWORK); pci_set_cfgdata16(pi, PCIR_SUBDEV_0, VIRTIO_TYPE_NET); - /* link always up */ - sc->vsc_config.status = 1; + /* Link is up if we managed to open tap device. */ + sc->vsc_config.status = (sc->vsc_tapfd >= 0); /* use BAR 1 to map MSI-X table and PBA, if we're using MSI-X */ if (vi_intr_init(&sc->vsc_vs, 1, fbsdrun_virtio_msix())) From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 14:24:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CA85D1CC; Mon, 20 Apr 2015 14:24:46 +0000 (UTC) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id 753DA9F1; Mon, 20 Apr 2015 14:24:45 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id B8E49D48BC7; Tue, 21 Apr 2015 00:24:37 +1000 (AEST) Date: Tue, 21 Apr 2015 00:24:30 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov cc: Jung-uk Kim , Alan Cox , John Baldwin , Bruce Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r280279 - head/sys/sys In-Reply-To: <20150420115351.GD2390@kib.kiev.ua> Message-ID: <20150420220347.B9956@besplex.bde.org> References: <201503201027.t2KAR6Ze053047@svn.freebsd.org> <550DA656.5060004@FreeBSD.org> <20150322080015.O955@besplex.bde.org> <17035816.lxyzYKiOWV@ralph.baldwin.cx> <552BFEB2.8040407@rice.edu> <552C215D.8020107@FreeBSD.org> <20150420115351.GD2390@kib.kiev.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=A5NVYcmG c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=YzZ1TwzqwVtC-boj8VAA:9 a=kxGYmLXp0S23Zjda:21 a=vdDRyBbVWsL--UbZ:21 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 14:24:46 -0000 On Mon, 20 Apr 2015, Konstantin Belousov wrote: > On Mon, Apr 13, 2015 at 04:04:45PM -0400, Jung-uk Kim wrote: >> Please try the attached patch. > >> Index: sys/amd64/amd64/pmap.c >> =================================================================== >> --- sys/amd64/amd64/pmap.c (revision 281496) >> +++ sys/amd64/amd64/pmap.c (working copy) >> @@ -412,7 +412,7 @@ static caddr_t crashdumpmap; >> static void free_pv_chunk(struct pv_chunk *pc); >> static void free_pv_entry(pmap_t pmap, pv_entry_t pv); >> static pv_entry_t get_pv_entry(pmap_t pmap, struct rwlock **lockp); >> -static int popcnt_pc_map_elem_pq(uint64_t elem); >> +static int popcnt_pc_map(uint64_t *pc_map); >> static vm_page_t reclaim_pv_chunk(pmap_t locked_pmap, struct rwlock **lockp); >> static void reserve_pv_entries(pmap_t pmap, int needed, >> struct rwlock **lockp); >> @@ -2979,7 +2979,7 @@ retry: >> } >> >> /* >> - * Returns the number of one bits within the given PV chunk map element. >> + * Returns the number of one bits within the given PV chunk map. >> * >> * The erratas for Intel processors state that "POPCNT Instruction May >> * Take Longer to Execute Than Expected". It is believed that the >> @@ -2994,12 +2994,21 @@ retry: >> * 5th Gen Core: BDM85 >> */ >> static int >> -popcnt_pc_map_elem_pq(uint64_t elem) >> +popcnt_pc_map(uint64_t *pc_map) >> { >> - u_long result; >> + u_long count, result; >> + int field; >> >> - __asm __volatile("xorl %k0,%k0;popcntq %1,%0" >> - : "=&r" (result) : "rm" (elem)); >> + result = 0; >> + if ((cpu_feature2 & CPUID2_POPCNT) != 0) >> + for (field = 0; field < _NPCM; field++) { >> + __asm __volatile("xorl %k0, %k0; popcntq %1, %0" >> + : "=r" (count) : "m" (pc_map[field])); >> + result += count; >> + } >> + else >> + for (field = 0; field < _NPCM; field++) >> + result += bitcount64(pc_map[field]); >> return (result); >> } >> >> @@ -3031,15 +3040,7 @@ reserve_pv_entries(pmap_t pmap, int needed, struct >> retry: >> avail = 0; >> TAILQ_FOREACH(pc, &pmap->pm_pvchunk, pc_list) { >> - if ((cpu_feature2 & CPUID2_POPCNT) == 0) { >> - free = bitcount64(pc->pc_map[0]); >> - free += bitcount64(pc->pc_map[1]); >> - free += bitcount64(pc->pc_map[2]); >> - } else { >> - free = popcnt_pc_map_elem_pq(pc->pc_map[0]); >> - free += popcnt_pc_map_elem_pq(pc->pc_map[1]); >> - free += popcnt_pc_map_elem_pq(pc->pc_map[2]); >> - } >> + free = popcnt_pc_map(pc->pc_map); >> if (free == 0) >> break; >> avail += free; > > Yes, this worked for me the same way as for you, the argument is taken > directly from memory, without temporary spill. Is this due to silly > inliner ? Whatever the reason is, I think a comment should be added > noting the subtlety. > > Otherwise, looks fine. Erm, this looks silly. It apparently works by making things too complicated for the compiler to "optimize" (where one of the optimizations actually gives pessimal spills). Its main changes are: - change the constraint from "rm" to "m". This alone is not enough to get the compiler to use the natural memory operands without a trip through a register - un-unroll a loop. This alone makes no difference in my simpler test environment. The compiler un-un-unrolls. (The compiler also inlines all the static function whether asked to or not. gcc shouldn't do this inlining for the 3 calls, and gcc -fno-inline-functions-called-once would never do it. clang is missing support for -fno-inline-functions- called-once, and gcc48 vanished with a recent "upgrade" on freefall, so I couldn't test this case easily. -fno-inline-functions-called-once should be the default for kernels. - some other changes apparently confused clang into doing the right thing. It works better to change the constraint to "r": X #include X X static __inline u_long X popcntq(u_long mask) X { X u_long result; X X __asm __volatile("xorl %k0,%k0; popcntq %1,%0" : X "=&r" (result) : "r" (mask)); X return (result); X } X X u_long x[3]; X X int X test(void) X { X return (popcntq(x[0]) + popcntq(x[1]) + popcntq(x[2])); X } X ... X .cfi_startproc X # BB#0: # %entry X pushq %rbp X .Ltmp0: X .cfi_def_cfa_offset 16 X .Ltmp1: X .cfi_offset %rbp, -16 X movq %rsp, %rbp X .Ltmp2: X .cfi_def_cfa_register %rbp X movq x(%rip), %rax X #APP X xorl %ecx, %ecx X popcntq %rax, %rcx X #NO_APP X movq x+8(%rip), %rax X #APP X xorl %edx, %edx X popcntq %rax, %rdx X #NO_APP X addl %ecx, %edx X movq x+16(%rip), %rcx X #APP X xorl %eax, %eax X popcntq %rcx, %rax X #NO_APP X addl %edx, %eax X # kill: EAX EAX RAX X popq %rbp X retq I changed and tested the generic popcntq() since this is the correct function to use and is easier to test. With the old constraint, the This version does extra load instructions, but those should have a negative or zero cost since the loads always have to be done and explicit loads may allow better scheduling (the asm moves them before the xorl's which gives hard-codes reasonable scheduling). Next, improve the asm by telling the compiler to load 0: X __asm __volatile("popcntq %1,%0" : X "=r" (result) : "r" (mask), "0" (0)); This avoids the ugliness with %k0 (the compiler knows the best way to load a 64-bit 0 -- use xorl). This generates the same code, except the compiler uses more registers and moves one of the xorls earlier. "rm" as a constraint still gives the spills. Next, further improve the asm by moving the load of 0 out of it: X result = 0; X __asm __volatile("popcntq %1,%0" : X "+r" (result) : "r" (mask)); This doesn't change the generated code. "rm" still gives spills (and "m" still gives a trip through a register). Finally for this mail, but leaving many more compiler bugs to be determined, further improve the asm by restoring "m" to a constraint but with "m" disparaged: X result = 0; X __asm __volatile("popcntq %1,%0" : X "+r,+r" (result) : "r,?m" (mask)); This works to get the register operand used here, but disparagement seems to be broken in clang (and I never got it to do anything useful in gcc -- I want alternatives in the main part of the asm, but that seems to only be possible in insns in .md files). Here clang prefers "r" even if it is strongly disparaged relative to "m" ("!r,m"). clang seems to always prefer the first alternative. Perhaps that is correct since the 2 alternatives for the output constraint are the same. No, since if the output is broken to "=m,+r", then the broken and disparaged case is prefered. Also, "r,+r" is a syntax error, but no error is detected for "+r,r". gcc42 tells me that it is "+r,"+r" that is the syntax error -- the "+" apparently must be first and then it applies to both alternatives. Disparagement seems to work in gcc42. E.g., with the operand naturally living in memory, "?m,r" still prefers the memory operand, but "!m,r" prefers the register operand. gcc generates suboptimal loads of 0, so the hard-coded xorl is probably best for it: X result = 0; X __asm __volatile("popcntq %1,%0" : X "+r,r" (result) : "r,?m" (mask)); (This is supposed to be the best version.) gcc42 output: X movl $0, %edx First load of 0. Should use xorl. X movl %edx, %ecx Second load of 0. Should use xorl so as to not depend on the previous load. X #APP X popcntq x,%ecx Use second load of 0. popcntq cannot be assembled on i386, but I only compiled to asm. X #NO_APP X movl %edx, %eax Third load of 0. Probably well enough scheduled. X #APP X popcntq x+4,%eax Use third load of 0. Poorly scheduled. Should use first load of 0. X popcntq x+8,%edx Use first load of 0. X #NO_APP X addl %ecx, %eax X addl %edx, %eax Can probably schedule these adds better too (start the first one earlier), but that is easy for the CPU to do. With "m" strongly disparaged ("r,!m"): X movl $0, %edx X movl %edx, %ecx X movl x, %eax X #APP X popcntq %eax,%ecx X #NO_APP X movl %edx, %eax X movl x+4, %ebx X #APP X popcntq %ebx,%eax First 2 popcntq's from the non-disparaged "r". X popcntq x+8,%edx But the disparagement wasn't strong enough for the third. OK. X #NO_APP X addl %ecx, %eax X addl %edx, %eax Bruce From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 14:52:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C7EB6BE2; Mon, 20 Apr 2015 14:52:46 +0000 (UTC) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 8ABA8D73; Mon, 20 Apr 2015 14:52:45 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 498EC7814AC; Tue, 21 Apr 2015 00:52:36 +1000 (AEST) Date: Tue, 21 Apr 2015 00:52:35 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bruce Evans cc: Konstantin Belousov , Jung-uk Kim , Alan Cox , John Baldwin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r280279 - head/sys/sys In-Reply-To: <20150420220347.B9956@besplex.bde.org> Message-ID: <20150421003316.M10305@besplex.bde.org> References: <201503201027.t2KAR6Ze053047@svn.freebsd.org> <550DA656.5060004@FreeBSD.org> <20150322080015.O955@besplex.bde.org> <17035816.lxyzYKiOWV@ralph.baldwin.cx> <552BFEB2.8040407@rice.edu> <552C215D.8020107@FreeBSD.org> <20150420115351.GD2390@kib.kiev.ua> <20150420220347.B9956@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=ZuzUdbLG c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=RFWfT8eTE1r12Y_Lx4gA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 14:52:46 -0000 On Tue, 21 Apr 2015, Bruce Evans wrote: > On Mon, 20 Apr 2015, Konstantin Belousov wrote: > >> On Mon, Apr 13, 2015 at 04:04:45PM -0400, Jung-uk Kim wrote: >>> Please try the attached patch. >>> ... >>> - __asm __volatile("xorl %k0,%k0;popcntq %1,%0" >>> - : "=&r" (result) : "rm" (elem)); >>> ... >>> + __asm __volatile("xorl %k0, %k0; popcntq %1, %0" >>> + : "=r" (count) : "m" (pc_map[field])); >> ... >> Yes, this worked for me the same way as for you, the argument is taken >> directly from memory, without temporary spill. Is this due to silly >> inliner ? Whatever the reason is, I think a comment should be added >> noting the subtlety. >> >> Otherwise, looks fine. > > Erm, this looks silly. It apparently works by making things too complicated > for the compiler to "optimize" (where one of the optimizations actually > gives pessimal spills). Its main changes are: > ... > It works better to change the constraint to "r": It's even sillier than that. The problem is not limited to this function. clang seems to prefer memory whenever you use the "rm" constraint. The silliest case is when you have a chain of simple asm functions. Say the original popcntq (without the xorl): return (popcntq(popcntq(popcntq(popcntq(popcntq(x)))))); gcc compiles this to 5 sequential popcntq instructions, but clang spills the results of the first 4. This is an old bug. clang does this on FreeBSD[9-11]. cc does this on FreeBSD[10-11] (not on FreeBSD-9 since cc = gcc there. Asms should always use "rm" if "m" works. Ones in cpufunc.h always do except for lidt(), lldt() and ltr(). These 3 are fixed in my version. So cpufunc.h almost always asks for the pessimization. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 14:55:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6AF9D40; Mon, 20 Apr 2015 14:55:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9562DD8A; Mon, 20 Apr 2015 14:55:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KEt2eG054148; Mon, 20 Apr 2015 14:55:02 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KEt2mx054147; Mon, 20 Apr 2015 14:55:02 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504201455.t3KEt2mx054147@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 20 Apr 2015 14:55:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281767 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 14:55:02 -0000 Author: mav Date: Mon Apr 20 14:55:01 2015 New Revision: 281767 URL: https://svnweb.freebsd.org/changeset/base/281767 Log: Report link as up if tap device is not specified (black hole). MFC after: 2 weeks Modified: head/usr.sbin/bhyve/pci_virtio_net.c Modified: head/usr.sbin/bhyve/pci_virtio_net.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_net.c Mon Apr 20 14:23:18 2015 (r281766) +++ head/usr.sbin/bhyve/pci_virtio_net.c Mon Apr 20 14:55:01 2015 (r281767) @@ -645,7 +645,7 @@ pci_vtnet_init(struct vmctx *ctx, struct pci_set_cfgdata16(pi, PCIR_SUBDEV_0, VIRTIO_TYPE_NET); /* Link is up if we managed to open tap device. */ - sc->vsc_config.status = (sc->vsc_tapfd >= 0); + sc->vsc_config.status = (opts == NULL || sc->vsc_tapfd >= 0); /* use BAR 1 to map MSI-X table and PBA, if we're using MSI-X */ if (vi_intr_init(&sc->vsc_vs, 1, fbsdrun_virtio_msix())) From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 15:45:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 506EAB04; Mon, 20 Apr 2015 15:45:47 +0000 (UTC) Received: from bigwig.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 2C295647; Mon, 20 Apr 2015 15:45:47 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id D7F5AB913; Mon, 20 Apr 2015 11:45:45 -0400 (EDT) From: John Baldwin To: Justin Hibbits Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281721 - head/sys/sys Date: Mon, 20 Apr 2015 11:25:44 -0400 Message-ID: <476583045.Qcb6O2DFtY@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <201504190033.t3J0XMDX041769@svn.freebsd.org> References: <201504190033.t3J0XMDX041769@svn.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.2.7 (bigwig.baldwin.cx); Mon, 20 Apr 2015 11:45:45 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 15:45:47 -0000 On Sunday, April 19, 2015 12:33:22 AM Justin Hibbits wrote: > Author: jhibbits > Date: Sun Apr 19 00:33:21 2015 > New Revision: 281721 > URL: https://svnweb.freebsd.org/changeset/base/281721 > > Log: > Fix the build. Commit the last part of e500 PMC. > > Pointy hat to: jhibbits > > Modified: > head/sys/sys/pmc.h > > Modified: head/sys/sys/pmc.h > ============================================================================== > --- head/sys/sys/pmc.h Sun Apr 19 00:29:02 2015 (r281720) > +++ head/sys/sys/pmc.h Sun Apr 19 00:33:21 2015 (r281721) > @@ -102,6 +102,8 @@ > __PMC_CPU(MIPS_OCTEON, 0x201, "Cavium Octeon") \ > __PMC_CPU(MIPS_74K, 0x202, "MIPS 74K") \ > __PMC_CPU(PPC_7450, 0x300, "PowerPC MPC7450") \ > + __PMC_CPU(PPC_E500, 0x340, "PowerPC e500 Core") \ > + __PMC_CPU(PPC_MPC85XX, 0x340, "Freescale PowerPC MPC85XX") \ > __PMC_CPU(PPC_970, 0x380, "IBM PowerPC 970") \ > __PMC_CPU(GENERIC, 0x400, "Generic") > > @@ -136,6 +138,7 @@ enum pmc_cputype { > __PMC_CLASS(MIPS74K) /* MIPS 74K */ \ > __PMC_CLASS(PPC7450) /* Motorola MPC7450 class */ \ > __PMC_CLASS(PPC970) /* IBM PowerPC 970 class */ \ > + __PMC_CLASS(E500) /* Freescale e500 class */ \ > __PMC_CLASS(SOFT) /* Software events */ Note that each time a PMC_CLASS is added, the ABI for pmccontrol -L breaks since the enum value of the "SOFT" class changes. We should perhaps fix the value of SOFT to make this less painful (just as we fix the values for PMC_CPU so that those don't change). -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 16:20:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A2D164FE; Mon, 20 Apr 2015 16:20:10 +0000 (UTC) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 68B12A82; Mon, 20 Apr 2015 16:20:10 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id CF6B43C4483; Tue, 21 Apr 2015 02:20:00 +1000 (AEST) Date: Tue, 21 Apr 2015 02:19:52 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: John Baldwin cc: Justin Hibbits , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281721 - head/sys/sys In-Reply-To: <476583045.Qcb6O2DFtY@ralph.baldwin.cx> Message-ID: <20150421020808.D10623@besplex.bde.org> References: <201504190033.t3J0XMDX041769@svn.freebsd.org> <476583045.Qcb6O2DFtY@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=L/MkHYj8 c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=UsB5EdndRrl7-tn2VpUA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 16:20:10 -0000 On Mon, 20 Apr 2015, John Baldwin wrote: > On Sunday, April 19, 2015 12:33:22 AM Justin Hibbits wrote: >> Log: >> Fix the build. Commit the last part of e500 PMC. >> ... >> @@ -136,6 +138,7 @@ enum pmc_cputype { >> __PMC_CLASS(MIPS74K) /* MIPS 74K */ \ >> __PMC_CLASS(PPC7450) /* Motorola MPC7450 class */ \ >> __PMC_CLASS(PPC970) /* IBM PowerPC 970 class */ \ >> + __PMC_CLASS(E500) /* Freescale e500 class */ \ >> __PMC_CLASS(SOFT) /* Software events */ > > Note that each time a PMC_CLASS is added, the ABI for pmccontrol -L > breaks since the enum value of the "SOFT" class changes. We should > perhaps fix the value of SOFT to make this less painful (just as we > fix the values for PMC_CPU so that those don't change). Enums should never be used in ABIs, since their size can be anything large enough. They also cause namespace problems. The whole enum declaration must be exposed in any header that uses an enum type. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 16:24:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 21BBC77A; Mon, 20 Apr 2015 16:24:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1055FB67; Mon, 20 Apr 2015 16:24:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KGNxkj023797; Mon, 20 Apr 2015 16:23:59 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KGNxpw023796; Mon, 20 Apr 2015 16:23:59 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201504201623.t3KGNxpw023796@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 20 Apr 2015 16:23:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281768 - head/share/man/man3 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 16:24:00 -0000 Author: brooks Date: Mon Apr 20 16:23:59 2015 New Revision: 281768 URL: https://svnweb.freebsd.org/changeset/base/281768 Log: Bump doc date missed in r281605. MFC after: 1 day Modified: head/share/man/man3/queue.3 Modified: head/share/man/man3/queue.3 ============================================================================== --- head/share/man/man3/queue.3 Mon Apr 20 14:55:01 2015 (r281767) +++ head/share/man/man3/queue.3 Mon Apr 20 16:23:59 2015 (r281768) @@ -28,7 +28,7 @@ .\" @(#)queue.3 8.2 (Berkeley) 1/24/94 .\" $FreeBSD$ .\" -.Dd June 17, 2013 +.Dd April 16, 2015 .Dt QUEUE 3 .Os .Sh NAME From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 16:31:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29DA29D3; Mon, 20 Apr 2015 16:31:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 18A7DC5E; Mon, 20 Apr 2015 16:31:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KGVRNK031113; Mon, 20 Apr 2015 16:31:27 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KGVRwo031112; Mon, 20 Apr 2015 16:31:27 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504201631.t3KGVRwo031112@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 20 Apr 2015 16:31:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281769 - head/sys/geom/uncompress X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 16:31:28 -0000 Author: pfg Date: Mon Apr 20 16:31:27 2015 New Revision: 281769 URL: https://svnweb.freebsd.org/changeset/base/281769 Log: g_uncompress_taste: prevent a double free. Found by: Clang Static Analyzer MFC after: 1 week Modified: head/sys/geom/uncompress/g_uncompress.c Modified: head/sys/geom/uncompress/g_uncompress.c ============================================================================== --- head/sys/geom/uncompress/g_uncompress.c Mon Apr 20 16:23:59 2015 (r281768) +++ head/sys/geom/uncompress/g_uncompress.c Mon Apr 20 16:31:27 2015 (r281769) @@ -571,6 +571,7 @@ g_uncompress_taste(struct g_class *mp, s (buf+sizeof(struct cloop_header)))[i]); } free(buf, M_GEOM); + buf = NULL; DPRINTF(("%s: done reading offsets\n", gp->name)); mtx_init(&sc->last_mtx, "geom_uncompress cache", NULL, MTX_DEF); sc->last_blk = -1; From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 16:36:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 88AD2C99; Mon, 20 Apr 2015 16:36:20 +0000 (UTC) Received: from mail-qk0-x22a.google.com (mail-qk0-x22a.google.com [IPv6:2607:f8b0:400d:c09::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 42F69C9C; Mon, 20 Apr 2015 16:36:20 +0000 (UTC) Received: by qkgx75 with SMTP id x75so184837992qkg.1; Mon, 20 Apr 2015 09:36:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=6/hR8f7w8gi3WX8hGJa7ggTk9khtC2eQ6KgDnbCY3k8=; b=JI+z5kEvLLsbR3qnysoEvPSBeoKG6EQ07ri1E6umrJlCYhV7OrMKxx9rqF8EuxOScu 1QlglNA557ccZe7kWB471INlBqfZSkN/JP5hKAja7Wzi9L1KnriYRWPDJmp0QXzoAgzO QXAAQfSPaMvPcEJJeI5nlIj2R3GeCL9PUlPr1vHvWxoh4V/kKIHtHuc6AFFy0Giwh7Ch afI/W83IvRG3sng9FvNTe0mKuoQ9wZamPHUy/jGLh6TwUKk7ZTryBWEWcDaQFMTfhFGR aeyQnqjqgchZd3hu8vp1A2KifwyjaMmbd+kQZk5B28DhzkVEtk90bo2gco7s5fbkyNV6 +sxQ== MIME-Version: 1.0 X-Received: by 10.55.20.30 with SMTP id e30mr30189925qkh.45.1429547779427; Mon, 20 Apr 2015 09:36:19 -0700 (PDT) Sender: chmeeedalf@gmail.com Received: by 10.140.84.179 with HTTP; Mon, 20 Apr 2015 09:36:19 -0700 (PDT) In-Reply-To: <20150421020808.D10623@besplex.bde.org> References: <201504190033.t3J0XMDX041769@svn.freebsd.org> <476583045.Qcb6O2DFtY@ralph.baldwin.cx> <20150421020808.D10623@besplex.bde.org> Date: Mon, 20 Apr 2015 09:36:19 -0700 X-Google-Sender-Auth: JRhvpZKjPh_YfFQOmNTqzQNDaTc Message-ID: Subject: Re: svn commit: r281721 - head/sys/sys From: Justin Hibbits To: Bruce Evans Cc: John Baldwin , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 16:36:20 -0000 On Mon, Apr 20, 2015 at 9:19 AM, Bruce Evans wrote: > On Mon, 20 Apr 2015, John Baldwin wrote: > >> On Sunday, April 19, 2015 12:33:22 AM Justin Hibbits wrote: >>> >>> Log: >>> Fix the build. Commit the last part of e500 PMC. >>> ... >>> @@ -136,6 +138,7 @@ enum pmc_cputype { >>> __PMC_CLASS(MIPS74K) /* MIPS 74K */ \ >>> __PMC_CLASS(PPC7450) /* Motorola MPC7450 class */ \ >>> __PMC_CLASS(PPC970) /* IBM PowerPC 970 class */ \ >>> + __PMC_CLASS(E500) /* Freescale e500 class */ \ >>> __PMC_CLASS(SOFT) /* Software events */ >> >> >> Note that each time a PMC_CLASS is added, the ABI for pmccontrol -L >> breaks since the enum value of the "SOFT" class changes. We should >> perhaps fix the value of SOFT to make this less painful (just as we >> fix the values for PMC_CPU so that those don't change). > > > Enums should never be used in ABIs, since their size can be anything > large enough. > > They also cause namespace problems. The whole enum declaration must > be exposed in any header that uses an enum type. > > Bruce Any change breaks ABI for any architecture listed after anyway (Adrian's MIPS74K broke all PowerPC). Could we not take the same IDs as in pmc_events.h to generate the PM_CLASS IDs? - Justin From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 16:40:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 395BAF69; Mon, 20 Apr 2015 16:40:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 280DCCDE; Mon, 20 Apr 2015 16:40:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KGeEuK036848; Mon, 20 Apr 2015 16:40:14 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KGeE9P036847; Mon, 20 Apr 2015 16:40:14 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504201640.t3KGeE9P036847@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 20 Apr 2015 16:40:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281770 - head/sys/fs/nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 16:40:14 -0000 Author: pfg Date: Mon Apr 20 16:40:13 2015 New Revision: 281770 URL: https://svnweb.freebsd.org/changeset/base/281770 Log: Prevent a double free. This is similar to r281756 so set the ptr NULL after free as a safety belt against future changes. Obtained from: HardenedBSD (b2e77ced9ae213d358b44d98f552d9ae4636ecac) Submitted by: Oliver Pinter Revewed by: rmacklem Modified: head/sys/fs/nfsclient/nfs_clrpcops.c Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Mon Apr 20 16:31:27 2015 (r281769) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Mon Apr 20 16:40:13 2015 (r281770) @@ -537,8 +537,10 @@ nfsrpc_openrpc(struct nfsmount *nmp, vno (void) nfs_catnap(PZERO, ret, "nfs_open2"); } while (ret == NFSERR_DELAY); if (ret) { - if (ndp != NULL) + if (ndp != NULL) { FREE((caddr_t)ndp, M_NFSCLDELEG); + ndp = NULL; + } if (ret == NFSERR_STALECLIENTID || ret == NFSERR_STALEDONTRECOVER || ret == NFSERR_BADSESSION) From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 16:48:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3EA524F3; Mon, 20 Apr 2015 16:48:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D7EAE06; Mon, 20 Apr 2015 16:48:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KGmL1A041874; Mon, 20 Apr 2015 16:48:21 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KGmLJo041873; Mon, 20 Apr 2015 16:48:21 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201504201648.t3KGmLJo041873@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Mon, 20 Apr 2015 16:48:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281771 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 16:48:22 -0000 Author: alc Date: Mon Apr 20 16:48:21 2015 New Revision: 281771 URL: https://svnweb.freebsd.org/changeset/base/281771 Log: Eliminate an unused variable. MFC after: 1 week Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Mon Apr 20 16:40:13 2015 (r281770) +++ head/sys/vm/uma_core.c Mon Apr 20 16:48:21 2015 (r281771) @@ -307,9 +307,8 @@ bucket_init(void) { struct uma_bucket_zone *ubz; int size; - int i; - for (i = 0, ubz = &bucket_zones[0]; ubz->ubz_entries != 0; ubz++) { + for (ubz = &bucket_zones[0]; ubz->ubz_entries != 0; ubz++) { size = roundup(sizeof(struct uma_bucket), sizeof(void *)); size += sizeof(void *) * ubz->ubz_entries; ubz->ubz_zone = uma_zcreate(ubz->ubz_name, size, From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 17:14:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F3DD5DFC; Mon, 20 Apr 2015 17:14:40 +0000 (UTC) Received: from mail-ie0-x229.google.com (mail-ie0-x229.google.com [IPv6:2607:f8b0:4001:c03::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 BCB7D1E4; Mon, 20 Apr 2015 17:14:40 +0000 (UTC) Received: by iebrs15 with SMTP id rs15so121572900ieb.3; Mon, 20 Apr 2015 10:14:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=1bfgd8bYgnT+iylU4taadnAoq0CbQQzs26SiBZxIIuw=; b=hBa/EIMgxIqdJx457rxXbDHF+f7A7TXzOPOPblVGAOv38Esis2tW9nwrZ/A63VtUJD T+sdhJV2qV8sm9YnZoQXLLpNvtRZ8MojImwEeNKRQau5RCrKCRiUDPlB8Vv9YWfSjW48 9PEZ+m4U2eO+IEXtTZF/bH0DW5qQgrnx8Zdby6Q4jwPdRLxHlj3BXpEPS17gHnW2nXW1 h+Qd6irk7ud3TqD8X9fKyhqXB7jvUIf/j9XC6u4GjOKyxM7PPsY4v9oLIIvfCSKN/TKS I1TTVKKGotFgrPbYEeZK9QNUhg5xeqnOvpb2R32s+rJtVmHX1Qkv6YlXAAuMBWQPwMT2 uB4g== MIME-Version: 1.0 X-Received: by 10.107.155.13 with SMTP id d13mr22990211ioe.29.1429550080178; Mon, 20 Apr 2015 10:14:40 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.17.194 with HTTP; Mon, 20 Apr 2015 10:14:40 -0700 (PDT) In-Reply-To: References: <201504190033.t3J0XMDX041769@svn.freebsd.org> <476583045.Qcb6O2DFtY@ralph.baldwin.cx> <20150421020808.D10623@besplex.bde.org> Date: Mon, 20 Apr 2015 10:14:40 -0700 X-Google-Sender-Auth: DYzfLDUF8ZI1AXS-g0NaAtwlt4Q Message-ID: Subject: Re: svn commit: r281721 - head/sys/sys From: Adrian Chadd To: Justin Hibbits Cc: Bruce Evans , John Baldwin , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 17:14:41 -0000 (this is why I'm not mfc'ing it.) hwpmc's ABI is not in any way usefully backwards compatible. -adrian From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 17:21:16 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C4BF310A; Mon, 20 Apr 2015 17:21:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B34CD2F5; Mon, 20 Apr 2015 17:21:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KHLG05070731; Mon, 20 Apr 2015 17:21:16 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KHLGCn070730; Mon, 20 Apr 2015 17:21:16 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201504201721.t3KHLGCn070730@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Mon, 20 Apr 2015 17:21:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281772 - head/sys/dev/ixgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 17:21:16 -0000 Author: araujo (ports committer) Date: Mon Apr 20 17:21:15 2015 New Revision: 281772 URL: https://svnweb.freebsd.org/changeset/base/281772 Log: Remove unused variable. Differential Revision: D2331 Reviewed by: erj Modified: head/sys/dev/ixgbe/if_ix.c Modified: head/sys/dev/ixgbe/if_ix.c ============================================================================== --- head/sys/dev/ixgbe/if_ix.c Mon Apr 20 16:48:21 2015 (r281771) +++ head/sys/dev/ixgbe/if_ix.c Mon Apr 20 17:21:15 2015 (r281772) @@ -1195,10 +1195,8 @@ ixgbe_handle_que(void *context, int pend struct adapter *adapter = que->adapter; struct tx_ring *txr = que->txr; struct ifnet *ifp = adapter->ifp; - bool more; if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - more = ixgbe_rxeof(que); IXGBE_TX_LOCK(txr); ixgbe_txeof(txr); #ifndef IXGBE_LEGACY_TX From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 17:24:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 25FD6280; Mon, 20 Apr 2015 17:24:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1476631C; Mon, 20 Apr 2015 17:24:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KHOdIJ073561; Mon, 20 Apr 2015 17:24:39 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KHOdCE073560; Mon, 20 Apr 2015 17:24:39 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201504201724.t3KHOdCE073560@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Mon, 20 Apr 2015 17:24:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281773 - head/sys/dev/ixgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 17:24:40 -0000 Author: araujo (ports committer) Date: Mon Apr 20 17:24:39 2015 New Revision: 281773 URL: https://svnweb.freebsd.org/changeset/base/281773 Log: Add back ixgbe_rxeof, just remove the assignment to more. Modified: head/sys/dev/ixgbe/if_ix.c Modified: head/sys/dev/ixgbe/if_ix.c ============================================================================== --- head/sys/dev/ixgbe/if_ix.c Mon Apr 20 17:21:15 2015 (r281772) +++ head/sys/dev/ixgbe/if_ix.c Mon Apr 20 17:24:39 2015 (r281773) @@ -1197,6 +1197,7 @@ ixgbe_handle_que(void *context, int pend struct ifnet *ifp = adapter->ifp; if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + ixgbe_rxeof(que); IXGBE_TX_LOCK(txr); ixgbe_txeof(txr); #ifndef IXGBE_LEGACY_TX From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 17:30:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E730B6D6; Mon, 20 Apr 2015 17:30:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5CF4376; Mon, 20 Apr 2015 17:30:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KHUD9d076747; Mon, 20 Apr 2015 17:30:13 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KHUDn6076746; Mon, 20 Apr 2015 17:30:13 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201504201730.t3KHUDn6076746@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Mon, 20 Apr 2015 17:30:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281774 - head/sys/dev/xen/netfront X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 17:30:14 -0000 Author: araujo (ports committer) Date: Mon Apr 20 17:30:13 2015 New Revision: 281774 URL: https://svnweb.freebsd.org/changeset/base/281774 Log: Remove unused variable. Differential Revision: D2333 Reviewed by: royger Modified: head/sys/dev/xen/netfront/netfront.c Modified: head/sys/dev/xen/netfront/netfront.c ============================================================================== --- head/sys/dev/xen/netfront/netfront.c Mon Apr 20 17:24:39 2015 (r281773) +++ head/sys/dev/xen/netfront/netfront.c Mon Apr 20 17:30:13 2015 (r281774) @@ -1472,7 +1472,6 @@ xn_assemble_tx_request(struct netfront_i struct ifnet *ifp; struct mbuf *m; u_int nfrags; - netif_extra_info_t *extra; int otherend_id; ifp = sc->xn_ifp; @@ -1546,7 +1545,6 @@ xn_assemble_tx_request(struct netfront_i * of fragments or hit the end of the mbuf chain. */ m = m_head; - extra = NULL; otherend_id = xenbus_get_otherend_id(sc->xbdev); for (m = m_head; m; m = m->m_next) { netif_tx_request_t *tx; From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 17:36:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1B87953; Mon, 20 Apr 2015 17:36:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFAAE64A; Mon, 20 Apr 2015 17:36:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KHaZP3083447; Mon, 20 Apr 2015 17:36:35 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KHaZAt083446; Mon, 20 Apr 2015 17:36:35 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201504201736.t3KHaZAt083446@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 20 Apr 2015 17:36:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281775 - head/contrib/llvm/lib/MC/MCParser X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 17:36:36 -0000 Author: dim Date: Mon Apr 20 17:36:35 2015 New Revision: 281775 URL: https://svnweb.freebsd.org/changeset/base/281775 Log: Pull in r229911 from upstream llvm trunk (by Benjamin Kramer): MC: Allow multiple comma-separated expressions on the .uleb128 directive. For compatiblity with GNU as. Binutils documents this as '.uleb128 expressions'. Subtle, isn't it? Reported by: sbruno PR: 199554 MFC after: 3 days Modified: head/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Modified: head/contrib/llvm/lib/MC/MCParser/AsmParser.cpp ============================================================================== --- head/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Mon Apr 20 17:30:13 2015 (r281774) +++ head/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Mon Apr 20 17:36:35 2015 (r281775) @@ -3636,21 +3636,27 @@ bool AsmParser::parseDirectiveSpace(Stri } /// parseDirectiveLEB128 -/// ::= (.sleb128 | .uleb128) expression +/// ::= (.sleb128 | .uleb128) [ expression (, expression)* ] bool AsmParser::parseDirectiveLEB128(bool Signed) { checkForValidSection(); const MCExpr *Value; - if (parseExpression(Value)) - return true; + for (;;) { + if (parseExpression(Value)) + return true; - if (getLexer().isNot(AsmToken::EndOfStatement)) - return TokError("unexpected token in directive"); + if (Signed) + getStreamer().EmitSLEB128Value(Value); + else + getStreamer().EmitULEB128Value(Value); - if (Signed) - getStreamer().EmitSLEB128Value(Value); - else - getStreamer().EmitULEB128Value(Value); + if (getLexer().is(AsmToken::EndOfStatement)) + break; + + if (getLexer().isNot(AsmToken::Comma)) + return TokError("unexpected token in directive"); + Lex(); + } return false; } From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 17:36:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C8804ADC; Mon, 20 Apr 2015 17:36:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B4CE1653; Mon, 20 Apr 2015 17:36:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KHaixH083581; Mon, 20 Apr 2015 17:36:44 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KHairb083580; Mon, 20 Apr 2015 17:36:44 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201504201736.t3KHairb083580@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Mon, 20 Apr 2015 17:36:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281776 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 17:36:44 -0000 Author: alc Date: Mon Apr 20 17:36:43 2015 New Revision: 281776 URL: https://svnweb.freebsd.org/changeset/base/281776 Log: MFC r279400 Eliminate a variable that became unused when VFS_LOCK_GIANT() was eliminated. Modified: stable/10/sys/vm/vm_mmap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_mmap.c ============================================================================== --- stable/10/sys/vm/vm_mmap.c Mon Apr 20 17:36:35 2015 (r281775) +++ stable/10/sys/vm/vm_mmap.c Mon Apr 20 17:36:43 2015 (r281776) @@ -1293,11 +1293,9 @@ vm_mmap_vnode(struct thread *td, vm_size struct vattr va; vm_object_t obj; vm_offset_t foff; - struct mount *mp; struct ucred *cred; int error, flags, locktype; - mp = vp->v_mount; cred = td->td_ucred; if ((*maxprotp & VM_PROT_WRITE) && (*flagsp & MAP_SHARED)) locktype = LK_EXCLUSIVE; From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 17:37:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 43921CFA; Mon, 20 Apr 2015 17:37:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2434A66E; Mon, 20 Apr 2015 17:37:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KHbc8U084086; Mon, 20 Apr 2015 17:37:38 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KHbcWH084085; Mon, 20 Apr 2015 17:37:38 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201504201737.t3KHbcWH084085@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 20 Apr 2015 17:37:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281777 - head/contrib/llvm/patches X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 17:37:38 -0000 Author: dim Date: Mon Apr 20 17:37:37 2015 New Revision: 281777 URL: https://svnweb.freebsd.org/changeset/base/281777 Log: Add llvm patch corresponding to r281775. Added: head/contrib/llvm/patches/patch-13-llvm-r229911-uleb128-commas.diff Added: head/contrib/llvm/patches/patch-13-llvm-r229911-uleb128-commas.diff ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/patches/patch-13-llvm-r229911-uleb128-commas.diff Mon Apr 20 17:37:37 2015 (r281777) @@ -0,0 +1,77 @@ +Pull in r229911 from upstream llvm trunk (by Benjamin Kramer): + + MC: Allow multiple comma-separated expressions on the .uleb128 directive. + + For compatiblity with GNU as. Binutils documents this as + '.uleb128 expressions'. Subtle, isn't it? + +Introduced here: http://svnweb.freebsd.org/changeset/base/281775 + +Index: lib/MC/MCParser/AsmParser.cpp +=================================================================== +--- lib/MC/MCParser/AsmParser.cpp ++++ lib/MC/MCParser/AsmParser.cpp +@@ -3636,22 +3636,28 @@ bool AsmParser::parseDirectiveSpace(StringRef IDVa + } + + /// parseDirectiveLEB128 +-/// ::= (.sleb128 | .uleb128) expression ++/// ::= (.sleb128 | .uleb128) [ expression (, expression)* ] + bool AsmParser::parseDirectiveLEB128(bool Signed) { + checkForValidSection(); + const MCExpr *Value; + +- if (parseExpression(Value)) +- return true; ++ for (;;) { ++ if (parseExpression(Value)) ++ return true; + +- if (getLexer().isNot(AsmToken::EndOfStatement)) +- return TokError("unexpected token in directive"); ++ if (Signed) ++ getStreamer().EmitSLEB128Value(Value); ++ else ++ getStreamer().EmitULEB128Value(Value); + +- if (Signed) +- getStreamer().EmitSLEB128Value(Value); +- else +- getStreamer().EmitULEB128Value(Value); ++ if (getLexer().is(AsmToken::EndOfStatement)) ++ break; + ++ if (getLexer().isNot(AsmToken::Comma)) ++ return TokError("unexpected token in directive"); ++ Lex(); ++ } ++ + return false; + } + +Index: test/MC/ELF/uleb.s +=================================================================== +--- test/MC/ELF/uleb.s ++++ test/MC/ELF/uleb.s +@@ -11,16 +11,17 @@ foo: + .uleb128 128 + .uleb128 16383 + .uleb128 16384 ++ .uleb128 23, 42 + + // ELF_32: Name: .text + // ELF_32: SectionData ( +-// ELF_32: 0000: 00017F80 01FF7F80 8001 ++// ELF_32: 0000: 00017F80 01FF7F80 8001172A + // ELF_32: ) + // ELF_64: Name: .text + // ELF_64: SectionData ( +-// ELF_64: 0000: 00017F80 01FF7F80 8001 ++// ELF_64: 0000: 00017F80 01FF7F80 8001172A + // ELF_64: ) + // MACHO_32: ('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') +-// MACHO_32: ('_section_data', '00017f80 01ff7f80 8001') ++// MACHO_32: ('_section_data', '00017f80 01ff7f80 8001172a') + // MACHO_64: ('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') +-// MACHO_64: ('_section_data', '00017f80 01ff7f80 8001') ++// MACHO_64: ('_section_data', '00017f80 01ff7f80 8001172a') From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 17:43:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 62DC5F86; Mon, 20 Apr 2015 17:43:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 50A007A5; Mon, 20 Apr 2015 17:43:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KHhbtO089761; Mon, 20 Apr 2015 17:43:37 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KHhbvl089760; Mon, 20 Apr 2015 17:43:37 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201504201743.t3KHhbvl089760@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Mon, 20 Apr 2015 17:43:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281778 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 17:43:37 -0000 Author: alc Date: Mon Apr 20 17:43:36 2015 New Revision: 281778 URL: https://svnweb.freebsd.org/changeset/base/281778 Log: MFC r278402 Preset the object's color, or alignment, to maximize superpage usage. Modified: stable/10/sys/kern/uipc_shm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/uipc_shm.c ============================================================================== --- stable/10/sys/kern/uipc_shm.c Mon Apr 20 17:37:37 2015 (r281777) +++ stable/10/sys/kern/uipc_shm.c Mon Apr 20 17:43:36 2015 (r281778) @@ -554,9 +554,10 @@ shm_alloc(struct ucred *ucred, mode_t mo shmfd->shm_object = vm_pager_allocate(OBJT_DEFAULT, NULL, shmfd->shm_size, VM_PROT_DEFAULT, 0, ucred); KASSERT(shmfd->shm_object != NULL, ("shm_create: vm_pager_allocate")); + shmfd->shm_object->pg_color = 0; VM_OBJECT_WLOCK(shmfd->shm_object); vm_object_clear_flag(shmfd->shm_object, OBJ_ONEMAPPING); - vm_object_set_flag(shmfd->shm_object, OBJ_NOSPLIT); + vm_object_set_flag(shmfd->shm_object, OBJ_COLORED | OBJ_NOSPLIT); VM_OBJECT_WUNLOCK(shmfd->shm_object); vfs_timestamp(&shmfd->shm_birthtime); shmfd->shm_atime = shmfd->shm_mtime = shmfd->shm_ctime = From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 17:43:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B2B0C146; Mon, 20 Apr 2015 17:43:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A15A77B0; Mon, 20 Apr 2015 17:43:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KHhtNP089930; Mon, 20 Apr 2015 17:43:55 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KHhtcZ089929; Mon, 20 Apr 2015 17:43:55 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504201743.t3KHhtcZ089929@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 20 Apr 2015 17:43:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281779 - head/usr.sbin/vidcontrol X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 17:43:55 -0000 Author: emaste Date: Mon Apr 20 17:43:55 2015 New Revision: 281779 URL: https://svnweb.freebsd.org/changeset/base/281779 Log: vidcontrol: skip invalid video modes returned by vt(4) vt(4) has a stub CONS_MODEINFO ioctl that does not provide any data but returns success. This needs to be fixed in the kernel, but address it in vidcontrol(1) as well in case it's run on an older kernel. Reviewed by: bde Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/vidcontrol/vidcontrol.c Modified: head/usr.sbin/vidcontrol/vidcontrol.c ============================================================================== --- head/usr.sbin/vidcontrol/vidcontrol.c Mon Apr 20 17:43:36 2015 (r281778) +++ head/usr.sbin/vidcontrol/vidcontrol.c Mon Apr 20 17:43:55 2015 (r281779) @@ -1085,12 +1085,16 @@ show_mode_info(void) printf("---------------------------------------" "---------------------------------------\n"); + memset(&_info, 0, sizeof(_info)); for (mode = 0; mode <= M_VESA_MODE_MAX; ++mode) { _info.vi_mode = mode; if (ioctl(0, CONS_MODEINFO, &_info)) continue; if (_info.vi_mode != mode) continue; + if (_info.vi_width == 0 && _info.vi_height == 0 && + _info.vi_cwidth == 0 && _info.vi_cheight == 0) + continue; printf("%3d (0x%03x)", mode, mode); printf(" 0x%08x", _info.vi_flags); From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 17:46:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39EA42B1; Mon, 20 Apr 2015 17:46:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 285A67CC; Mon, 20 Apr 2015 17:46:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KHkAH3091111; Mon, 20 Apr 2015 17:46:10 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KHkAYT091110; Mon, 20 Apr 2015 17:46:10 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201504201746.t3KHkAYT091110@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 20 Apr 2015 17:46:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281780 - head/usr.sbin/sysrc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 17:46:10 -0000 Author: dteske Date: Mon Apr 20 17:46:09 2015 New Revision: 281780 URL: https://svnweb.freebsd.org/changeset/base/281780 Log: Update usage statement to align with post-r279624 functionality. MFC after: 3 days X-MFC-to: stable/10 stable/9 Modified: head/usr.sbin/sysrc/sysrc Modified: head/usr.sbin/sysrc/sysrc ============================================================================== --- head/usr.sbin/sysrc/sysrc Mon Apr 20 17:43:55 2015 (r281779) +++ head/usr.sbin/sysrc/sysrc Mon Apr 20 17:46:09 2015 (r281780) @@ -80,7 +80,7 @@ die() # usage() { - f_err "Usage: %s [OPTIONS] name[[+]=value] ...\n" "$pgm" + f_err "Usage: %s [OPTIONS] name[[+|-]=value] ...\n" "$pgm" f_err "Try \`%s --help' for more information.\n" "$pgm" die } From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 18:30:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 303F9C38; Mon, 20 Apr 2015 18:30:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E70ACCD; Mon, 20 Apr 2015 18:30:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KIU6Yf026506; Mon, 20 Apr 2015 18:30:06 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KIU6j6026505; Mon, 20 Apr 2015 18:30:06 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504201830.t3KIU6j6026505@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 20 Apr 2015 18:30:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281781 - head/usr.sbin/crunch/crunchide X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 18:30:07 -0000 Author: emaste Date: Mon Apr 20 18:30:06 2015 New Revision: 281781 URL: https://svnweb.freebsd.org/changeset/base/281781 Log: crunchide: Remove local EM_* ELF definitions provided by system ELF headers Suggested by: imp (in review D2314) Modified: head/usr.sbin/crunch/crunchide/exec_elf32.c Modified: head/usr.sbin/crunch/crunchide/exec_elf32.c ============================================================================== --- head/usr.sbin/crunch/crunchide/exec_elf32.c Mon Apr 20 17:46:09 2015 (r281780) +++ head/usr.sbin/crunch/crunchide/exec_elf32.c Mon Apr 20 18:30:06 2015 (r281781) @@ -178,37 +178,13 @@ ELFNAMEEND(check)(int fd, const char *fn switch (xe16toh(eh.e_machine)) { case EM_386: break; case EM_ALPHA: break; -#ifndef EM_AARCH64 -#define EM_AARCH64 183 -#endif case EM_AARCH64: break; -#ifndef EM_ARM -#define EM_ARM 40 -#endif case EM_ARM: break; -#ifndef EM_MIPS -#define EM_MIPS 8 -#endif -#ifndef EM_MIPS_RS4_BE /* same as EM_MIPS_RS3_LE */ -#define EM_MIPS_RS4_BE 10 -#endif case EM_MIPS: break; case /* EM_MIPS_RS3_LE */ EM_MIPS_RS4_BE: break; -#ifndef EM_PPC -#define EM_PPC 20 -#endif case EM_PPC: break; -#ifndef EM_PPC64 -#define EM_PPC64 21 -#endif case EM_PPC64: break; -#ifndef EM_SPARCV9 -#define EM_SPARCV9 43 -#endif case EM_SPARCV9: break; -#ifndef EM_X86_64 -#define EM_X86_64 62 -#endif case EM_X86_64: break; /* ELFDEFNNAME(MACHDEP_ID_CASES) */ From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 18:53:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1C328BB for ; Mon, 20 Apr 2015 18:53:39 +0000 (UTC) Received: from mail-wi0-x229.google.com (mail-wi0-x229.google.com [IPv6:2a00:1450:400c: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 BBEB5F97 for ; Mon, 20 Apr 2015 18:53:38 +0000 (UTC) Received: by widdi4 with SMTP id di4so103036234wid.0 for ; Mon, 20 Apr 2015 11:53:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=ttCkft2SCpxmxa37mv056HGwqStsfkPIbBlwYA2f7OA=; b=ZiqXqYOIAqzG75178lXnfksn2pspBCheiD5f1/t9AWEFx7H8C645oJMfFfrGHce+ql 4ZFEVrxBTs1Qygw8fQ5z4Xj9modeFUcMDf+weB0CbGkESMT3MgooimWMJxBwVFNtiyUv Ge02NgcrZ1fMWagGiQeYV7mEqvtrEf3WGgjhc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=ttCkft2SCpxmxa37mv056HGwqStsfkPIbBlwYA2f7OA=; b=CllpWkuJo8Ng2aWRLOfvcoBy0SlrJYRr/pOeEPvyOUaqgPq5iF3h7AUFAxSGQ3XsIM zCnZ8w8X+QfXibou7qFt2PgOrSFbIzSWo1X4jHRU4isziOYHNywu0EX3dI8zSqKTUOTf JIeop7cqKcV8nEunFFUbP7sccl/F8W0bdVcFbo9K2ggbsqxFYYrnWV9BK4ilO9FbLCK7 6f4WyDoJJh+RHCW9IwJ4WHC21CpxvqaZahERunMusxBYgoUEcELqEbGcftQmQ+Lf9DO8 9VihzaaOa90+jW1PfvAb7T95zQ4WquDXIWEvVt/eN+M2dItRLiCCkGW9075TT9vEZmsW rbvA== X-Gm-Message-State: ALoCoQk/khU8yqBFHtcEs/llN2MNaX5M8IPXfpeef7OHjOMKRVR0pddF+xiLmPs4SXX51t7pZFMr X-Received: by 10.194.237.34 with SMTP id uz2mr33064055wjc.157.1429556017194; Mon, 20 Apr 2015 11:53:37 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.28.211.135 with HTTP; Mon, 20 Apr 2015 11:53:06 -0700 (PDT) In-Reply-To: <20150420134409.I855@besplex.bde.org> References: <201504200207.t3K27vFt078041@svn.freebsd.org> <20150420134409.I855@besplex.bde.org> From: Eitan Adler Date: Mon, 20 Apr 2015 11:53:06 -0700 X-Google-Sender-Auth: z4jxB6ikKZG--bXDsRlnp8KyTGI Message-ID: Subject: Re: svn commit: r281758 - head/bin/ed To: Bruce Evans Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 18:53:39 -0000 On 19 April 2015 at 21:23, Bruce Evans wrote: > On Mon, 20 Apr 2015, Eitan Adler wrote: > >> Log: >> ed(1): Fix [-Werror=logical-not-parentheses] >> /usr/src/bin/ed/glbl.c:64:36: error: logical not is only applied >> to >> theleft hand side of comparison [-Werror=logical-not-parentheses] >> >> Obtained from: Dragonfly (1fff89cbaeaa43af720a1f23d9c466b756dd8a58) >> MFC After: 1 month >> >> Modified: >> head/bin/ed/glbl.c >> >> Modified: head/bin/ed/glbl.c >> >> ============================================================================== >> --- head/bin/ed/glbl.c Mon Apr 20 00:24:32 2015 (r281757) >> +++ head/bin/ed/glbl.c Mon Apr 20 02:07:57 2015 (r281758) >> @@ -60,7 +60,7 @@ build_active_list(int isgcmd) >> return ERR; >> if (isbinary) >> NUL_TO_NEWLINE(s, lp->len); >> - if (!regexec(pat, s, 0, NULL, 0) == isgcmd && >> + if (!(regexec(pat, s, 0, NULL, 0) == isgcmd) && >> set_active_node(lp) < 0) >> return ERR; >> } > > > How can this be right? !(a == b) is an obfuscated way of writing a != b. bah! How does something like the following look? Index: ed.h =================================================================== --- ed.h (revision 281759) +++ ed.h (working copy) @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -191,7 +192,7 @@ int put_des_char(int, FILE *); void add_line_node(line_t *); int append_lines(long); int apply_subst_template(const char *, regmatch_t *, int, int); -int build_active_list(int); +int build_active_list(bool); int cbc_decode(unsigned char *, FILE *); int cbc_encode(unsigned char *, int, FILE *); int check_addr_range(long, long); Index: glbl.c =================================================================== --- glbl.c (revision 281759) +++ glbl.c (working copy) @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$"); /* build_active_list: add line matching a pattern to the global-active list */ int -build_active_list(int isgcmd) +build_active_list(bool isgcmd) { pattern_t *pat; line_t *lp; @@ -60,7 +60,7 @@ int return ERR; if (isbinary) NUL_TO_NEWLINE(s, lp->len); - if (!(regexec(pat, s, 0, NULL, 0) == isgcmd) && + if ((!regexec(pat, s, 0, NULL, 0)) == isgcmd && set_active_node(lp) < 0) return ERR; } -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 19:11:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9C825648; Mon, 20 Apr 2015 19:11:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B1ED26D; Mon, 20 Apr 2015 19:11:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KJBSQ5056042; Mon, 20 Apr 2015 19:11:28 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KJBSS0056041; Mon, 20 Apr 2015 19:11:28 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504201911.t3KJBSS0056041@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 20 Apr 2015 19:11:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281782 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 19:11:28 -0000 Author: mav Date: Mon Apr 20 19:11:27 2015 New Revision: 281782 URL: https://svnweb.freebsd.org/changeset/base/281782 Log: Don't set bits that should be zero for SATA devices. Old value made Linux think that it is PATA device with SATA bridge. MFC after: 2 weeks Modified: head/usr.sbin/bhyve/pci_ahci.c Modified: head/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- head/usr.sbin/bhyve/pci_ahci.c Mon Apr 20 18:30:06 2015 (r281781) +++ head/usr.sbin/bhyve/pci_ahci.c Mon Apr 20 19:11:27 2015 (r281782) @@ -930,7 +930,6 @@ handle_identify(struct ahci_port *p, int buf[88] = 0x7f; if (p->xfermode & ATA_UDMA0) buf[88] |= (1 << ((p->xfermode & 7) + 8)); - buf[93] = (1 | 1 <<14); buf[100] = sectors; buf[101] = (sectors >> 16); buf[102] = (sectors >> 32); From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 19:54:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F985371; Mon, 20 Apr 2015 19:54:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 30EAA9C3; Mon, 20 Apr 2015 19:54:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KJstPq089407; Mon, 20 Apr 2015 19:54:55 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KJstFp089406; Mon, 20 Apr 2015 19:54:55 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504201954.t3KJstFp089406@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 20 Apr 2015 19:54:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281783 - head/release/tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 19:54:55 -0000 Author: gjb Date: Mon Apr 20 19:54:54 2015 New Revision: 281783 URL: https://svnweb.freebsd.org/changeset/base/281783 Log: When building VM disk images, vm_copy_base() uses tar(1) to copy the userland from one md(4)-mounted filesystem to a clean filesystem to prevent remnants of files that were added and removed from resulting in an unclean filesystem. When newfs(8) creates the first filesystem with journaled soft-updates enabled, the /.sujournal file in the new filesystem cannot be overwritten by the /.sujournal in the original filesystem. To avoid this particular error case, do not enable journaled soft-updates when creating the md(4)-backed filesystems, and instead use tunefs(8) to enable journaled soft-updates after the new filesystem is populated in vm_copy_base(). While here, fix a long standing bug where the build environment /boot files were used by mkimg(1) when creating the VM disk images by using the files in .OBJDIR. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/tools/vmimage.subr Modified: head/release/tools/vmimage.subr ============================================================================== --- head/release/tools/vmimage.subr Mon Apr 20 19:11:27 2015 (r281782) +++ head/release/tools/vmimage.subr Mon Apr 20 19:54:54 2015 (r281783) @@ -14,17 +14,24 @@ write_partition_layout() { SWAPOPT="-p freebsd-swap/swapfs::1G" fi + _OBJDIR="$(make -C ${WORLDDIR} -V .OBJDIR)" + if [ -d "${_OBJDIR%%/usr/src}/${TARGET}.${TARGET_ARCH}" ]; then + BOOTFILES="${_OBJDIR%%/usr/src}/${TARGET}.${TARGET_ARCH}/usr/src/sys/boot" + else + BOOTFILES="${_OBJDIR}/usr/src/sys/boot" + fi + case "${TARGET}:${TARGET_ARCH}" in amd64:amd64 | i386:i386) - mkimg -s gpt -b /boot/pmbr \ - -p freebsd-boot/bootfs:=/boot/gptboot \ + mkimg -s gpt -b ${BOOTFILES}/i386/pmbr/pmbr \ + -p freebsd-boot/bootfs:=${BOOTFILES}/i386/gptboot/gptboot \ ${SWAPOPT} \ -p freebsd-ufs/rootfs:=${VMBASE} \ -o ${VMIMAGE} ;; powerpc:powerpc*) mkimg -s apm \ - -p apple-boot/bootfs:=/boot/boot1.hfs \ + -p apple-boot/bootfs:=${BOOTFILES}/powerpc/boot1.chrp/boot1.hfs \ ${SWAPOPT} \ -p freebsd-ufs/rootfs:=${VMBASE} \ -o ${VMIMAGE} @@ -63,7 +70,7 @@ vm_create_base() { mkdir -p ${DESTDIR} truncate -s ${VMSIZE} ${VMBASE} mddev=$(mdconfig -f ${VMBASE}) - newfs -j /dev/${mddev} + newfs /dev/${mddev} mount /dev/${mddev} ${DESTDIR} return 0 @@ -83,10 +90,10 @@ vm_copy_base() { truncate -s ${VMSIZE} ${VMBASE}.tmp mkdir -p ${DESTDIR}/new mdnew=$(mdconfig -f ${VMBASE}.tmp) - newfs -j /dev/${mdnew} + newfs /dev/${mdnew} mount /dev/${mdnew} ${DESTDIR}/new - tar -cf- -C ${DESTDIR}/old . | tar -xf- -C ${DESTDIR}/new + tar -cf- -C ${DESTDIR}/old . | tar -xUf- -C ${DESTDIR}/new umount_loop /dev/${mdold} rmdir ${DESTDIR}/old @@ -94,6 +101,7 @@ vm_copy_base() { umount_loop /dev/${mdnew} rmdir ${DESTDIR}/new + tunefs -j enable /dev/${mdnew} mdconfig -d -u ${mdnew} mv ${VMBASE}.tmp ${VMBASE} } From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 20:03:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6844687F; Mon, 20 Apr 2015 20:03:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F8E2AE8; Mon, 20 Apr 2015 20:03:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KK3R3k098043; Mon, 20 Apr 2015 20:03:27 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KK3QiA098040; Mon, 20 Apr 2015 20:03:26 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201504202003.t3KK3QiA098040@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Mon, 20 Apr 2015 20:03:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281785 - in head: share/man/man9 sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 20:03:27 -0000 Author: vangyzen Date: Mon Apr 20 20:03:26 2015 New Revision: 281785 URL: https://svnweb.freebsd.org/changeset/base/281785 Log: Always send log(9) messages to the message buffer. It is truer to the semantics of logging for messages to *always* go to the message buffer, where they can eventually be collected and, in fact, be put into a log file. This restores the behavior prior to r70239, which seems to have changed it inadvertently. Submitted by: Eric Badger Reviewed by: jhb Approved by: kib (mentor) Obtained from: Dell Inc. MFC after: 1 week Modified: head/share/man/man9/printf.9 head/sys/kern/subr_prf.c Modified: head/share/man/man9/printf.9 ============================================================================== --- head/share/man/man9/printf.9 Mon Apr 20 20:03:07 2015 (r281784) +++ head/share/man/man9/printf.9 Mon Apr 20 20:03:26 2015 (r281785) @@ -67,7 +67,8 @@ The .Fn log function sends the message to the kernel logging facility, using the log level as indicated by -.Fa pri . +.Fa pri , +and to the console if no process is yet reading the log. .Pp Each of these related functions use the .Fa fmt Modified: head/sys/kern/subr_prf.c ============================================================================== --- head/sys/kern/subr_prf.c Mon Apr 20 20:03:07 2015 (r281784) +++ head/sys/kern/subr_prf.c Mon Apr 20 20:03:26 2015 (r281785) @@ -295,7 +295,7 @@ log(int level, const char *fmt, ...) va_list ap; va_start(ap, fmt); - (void)_vprintf(level, log_open ? TOLOG : TOCONS, fmt, ap); + (void)_vprintf(level, log_open ? TOLOG : TOCONS | TOLOG, fmt, ap); va_end(ap); msgbuftrigger = 1; From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 20:07:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 139FEB54; Mon, 20 Apr 2015 20:07:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02284B22; Mon, 20 Apr 2015 20:07:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KK7dga000380; Mon, 20 Apr 2015 20:07:39 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KK7dtj000379; Mon, 20 Apr 2015 20:07:39 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201504202007.t3KK7dtj000379@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Mon, 20 Apr 2015 20:07:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281787 - head/sbin/dmesg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 20:07:40 -0000 Author: vangyzen Date: Mon Apr 20 20:07:39 2015 New Revision: 281787 URL: https://svnweb.freebsd.org/changeset/base/281787 Log: dmesg: accommodate message buffer growth between the sysctl calls Allocate 12.5% extra space to avoid ENOMEM when the message buffer is growing steadily. Reported by: Steve Wahl (and tested) Approved by: kib (mentor) Obtained from: Dell Inc. MFC after: 1 week Modified: head/sbin/dmesg/dmesg.c Modified: head/sbin/dmesg/dmesg.c ============================================================================== --- head/sbin/dmesg/dmesg.c Mon Apr 20 20:06:25 2015 (r281786) +++ head/sbin/dmesg/dmesg.c Mon Apr 20 20:07:39 2015 (r281787) @@ -118,6 +118,9 @@ main(int argc, char *argv[]) */ if (sysctlbyname("kern.msgbuf", NULL, &buflen, NULL, 0) == -1) err(1, "sysctl kern.msgbuf"); + /* Allocate extra room for growth between the sysctl calls. */ + buflen += buflen/8; + /* Allocate more than sysctl sees, for room to append \n\0. */ if ((bp = malloc(buflen + 2)) == NULL) errx(1, "malloc failed"); if (sysctlbyname("kern.msgbuf", bp, &buflen, NULL, 0) == -1) From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 20:11:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9826BD52; Mon, 20 Apr 2015 20:11:35 +0000 (UTC) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id C6101BFC; Mon, 20 Apr 2015 20:11:34 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id E726F424073; Tue, 21 Apr 2015 05:53:10 +1000 (AEST) Date: Tue, 21 Apr 2015 05:53:09 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Eitan Adler cc: Bruce Evans , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r281758 - head/bin/ed In-Reply-To: Message-ID: <20150421050859.H11701@besplex.bde.org> References: <201504200207.t3K27vFt078041@svn.freebsd.org> <20150420134409.I855@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=L/MkHYj8 c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=TEllcOey7MfUqoLxoeYA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 20:11:35 -0000 On Mon, 20 Apr 2015, Eitan Adler wrote: > On 19 April 2015 at 21:23, Bruce Evans wrote: >> On Mon, 20 Apr 2015, Eitan Adler wrote: >>> ... >>> --- head/bin/ed/glbl.c Mon Apr 20 00:24:32 2015 (r281757) >>> +++ head/bin/ed/glbl.c Mon Apr 20 02:07:57 2015 (r281758) >>> @@ -60,7 +60,7 @@ build_active_list(int isgcmd) >>> return ERR; >>> if (isbinary) >>> NUL_TO_NEWLINE(s, lp->len); >>> - if (!regexec(pat, s, 0, NULL, 0) == isgcmd && >>> + if (!(regexec(pat, s, 0, NULL, 0) == isgcmd) && >>> set_active_node(lp) < 0) >>> return ERR; >>> } >> >> >> How can this be right? !(a == b) is an obfuscated way of writing a != b. > bah! > How does something like the following look? Sorry, not good. I don't like stdbool. Here using it just enlarges and unportablize the code. > Index: ed.h > =================================================================== > --- ed.h (revision 281759) > +++ ed.h (working copy) > @@ -33,6 +33,7 @@ > #include > #include > #include > +#include > #include > #include > #include ed already has bad style, with *.h included in ed.h... > @@ -191,7 +192,7 @@ int put_des_char(int, FILE *); > void add_line_node(line_t *); > int append_lines(long); > int apply_subst_template(const char *, regmatch_t *, int, int); > -int build_active_list(int); > +int build_active_list(bool); It would be impossible to even declare a function that uses bool in a header without increasing the pollution. Actually, this is easy in C99 and only difficult to do portably. _Bool is standard in C99, so the include is only needed for portability to systems that have but not _Bool, or if you want to spell _Bool as bool in C99. The header (and program) otherwise doesn't use many fancy types. > int cbc_decode(unsigned char *, FILE *); > int cbc_encode(unsigned char *, int, FILE *); > int check_addr_range(long, long); It does use FILE. That requires the pollution. > Index: glbl.c > =================================================================== > --- glbl.c (revision 281759) > +++ glbl.c (working copy) > @@ -60,7 +60,7 @@ int > return ERR; > if (isbinary) > NUL_TO_NEWLINE(s, lp->len); > - if (!(regexec(pat, s, 0, NULL, 0) == isgcmd) && > + if ((!regexec(pat, s, 0, NULL, 0)) == isgcmd && > set_active_node(lp) < 0) > return ERR; > } This still has the obfuscation of using ! on a non-boolean, and then needs excessive parentheses to defeat the compiler warning about (a side effect of) this. Parentheses are needed for syntactical reasons in the non-obfuscated version: if ((regexec(pat, s, 0, NULL, 0) == 0) == isgcmd && This depends on the value of isgcmd being 0 or 1. It obviously is, but we have to examine all the callers (just 1) to see this. The bool declaration lets the compiler ensure this. You can ensure it directly replacing isgcmd by (isgcmd != 0). Maybe I wouldn't object to using bool if you rewrote ed to use it in all places that use booleans. ed doesn't seem to have many such places. It uses the variable "int gflag" a lot. gflag contains 5 flags. These are essentially packed booleans. It would be silly to use booleans for the easy case of 1 truth value while continuing to use ints for more complicated cases, but I think that if you translate the complicated cases to use booleans then they would be even more complicated. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 20:33:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B02731B; Mon, 20 Apr 2015 20:33:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39826E1B; Mon, 20 Apr 2015 20:33:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KKXNS9019827; Mon, 20 Apr 2015 20:33:23 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KKXMPW019822; Mon, 20 Apr 2015 20:33:22 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201504202033.t3KKXMPW019822@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 20 Apr 2015 20:33:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281789 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 20:33:23 -0000 Author: eadler Date: Mon Apr 20 20:33:22 2015 New Revision: 281789 URL: https://svnweb.freebsd.org/changeset/base/281789 Log: phabricator related changes: - don't lint either contrib or crypto: these are both externally written directories - add additional linters for spelling (check common typos like teh -> the) - chmod linter checks for executible bit on bad files - merge-conflict checks for merge conflict tokens then may have been resolved incorrectly - filename checks for back characters in filenames - json for json syntax correctness - remove history.immutable: it is meaningless on subversion, and causes workflow problems when trying to use git. It it set to 'true' by default with hg Modified: head/.arcconfig head/.arclint Modified: head/.arcconfig ============================================================================== --- head/.arcconfig Mon Apr 20 20:13:02 2015 (r281788) +++ head/.arcconfig Mon Apr 20 20:33:22 2015 (r281789) @@ -1,5 +1,4 @@ { "project.name": "S", - "phabricator.uri" : "https://reviews.freebsd.org/", - "history.immutable" : true + "phabricator.uri" : "https://reviews.freebsd.org/" } Modified: head/.arclint ============================================================================== --- head/.arclint Mon Apr 20 20:13:02 2015 (r281788) +++ head/.arclint Mon Apr 20 20:33:22 2015 (r281789) @@ -1,9 +1,25 @@ { + "exclude": "(contrib|crypto)", "linters": { "python": { "type": "pep8", - "exclude": "(contrib)", "include": "(\\.py$)" + }, + "spelling": { + "type": "spelling" + }, + "chmod": { + "type": "chmod" + }, + "merge-conflict": { + "type": "merge-conflict" + }, + "filename": { + "type": "filename" + }, + "json": { + "type": "json", + "include": "(\\.arclint|\\.json$)" } } } From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 20:45:11 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 106B4749; Mon, 20 Apr 2015 20:45:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9049F5E; Mon, 20 Apr 2015 20:45:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KKjA8B028649; Mon, 20 Apr 2015 20:45:10 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KKjA2H028648; Mon, 20 Apr 2015 20:45:10 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504202045.t3KKjA2H028648@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 20 Apr 2015 20:45:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281790 - head/tools/build X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 20:45:11 -0000 Author: bdrewery Date: Mon Apr 20 20:45:10 2015 New Revision: 281790 URL: https://svnweb.freebsd.org/changeset/base/281790 Log: Fix indentation to use tabs Modified: head/tools/build/check-links.sh Modified: head/tools/build/check-links.sh ============================================================================== --- head/tools/build/check-links.sh Mon Apr 20 20:33:22 2015 (r281789) +++ head/tools/build/check-links.sh Mon Apr 20 20:45:10 2015 (r281790) @@ -11,27 +11,27 @@ esac # Check for useful libs list_libs="" for lib in $(readelf -d $1 | awk '$2 ~ /\(?NEEDED\)?/ { sub(/\[/,"",$NF); sub(/\]/,"",$NF); print $NF }'); do - echo -n "checking if $lib is needed: " - libpath=$(ldd $1 | awk -v lib=$lib '$1 == lib { print $3 }') - list_libs="$list_libs $libpath" - foundone=0 - for fct in $(nm -D $libpath | awk '$2 == "R" || $2 == "D" || $2 == "T" || $2 == "W" || $2 == "B" { print $3 }'); do - nm -D $1 | awk -v s=$fct '$1 == "U" && $2 == s { found=1 ; exit } END { if (found != 1) { exit 1 } }' && foundone=1 && break - done - if [ $foundone -eq 1 ]; then - echo -n "yes... " - nm -D $1 | awk -v s=$fct '$1 == "U" && $2 == s { print $2 ; exit }' - else - echo "no" - fi + echo -n "checking if $lib is needed: " + libpath=$(ldd $1 | awk -v lib=$lib '$1 == lib { print $3 }') + list_libs="$list_libs $libpath" + foundone=0 + for fct in $(nm -D $libpath | awk '$2 == "R" || $2 == "D" || $2 == "T" || $2 == "W" || $2 == "B" { print $3 }'); do + nm -D $1 | awk -v s=$fct '$1 == "U" && $2 == s { found=1 ; exit } END { if (found != 1) { exit 1 } }' && foundone=1 && break + done + if [ $foundone -eq 1 ]; then + echo -n "yes... " + nm -D $1 | awk -v s=$fct '$1 == "U" && $2 == s { print $2 ; exit }' + else + echo "no" + fi done for sym in $(nm -D $1 | awk '$1 == "U" { print $2 }'); do - found=0 - for l in ${list_libs} ; do - nm -D $l | awk -v s=$sym '($2 == "R" || $2 == "D" || $2 == "T" || $2 == "W" || $2 == "B") && $3 == s { found=1 ; exit } END { if (found != 1) { exit 1 } }' && found=1 && break - done - if [ $found -eq 0 ]; then - echo "Unresolved symbol $sym" - fi + found=0 + for l in ${list_libs} ; do + nm -D $l | awk -v s=$sym '($2 == "R" || $2 == "D" || $2 == "T" || $2 == "W" || $2 == "B") && $3 == s { found=1 ; exit } END { if (found != 1) { exit 1 } }' && found=1 && break + done + if [ $found -eq 0 ]; then + echo "Unresolved symbol $sym" + fi done From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 20:51:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84A3E963; Mon, 20 Apr 2015 20:51:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72EF4BA; Mon, 20 Apr 2015 20:51:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KKpKrC032928; Mon, 20 Apr 2015 20:51:20 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KKpK6S032927; Mon, 20 Apr 2015 20:51:20 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504202051.t3KKpK6S032927@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 20 Apr 2015 20:51:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281791 - head/tools/build X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 20:51:20 -0000 Author: bdrewery Date: Mon Apr 20 20:51:19 2015 New Revision: 281791 URL: https://svnweb.freebsd.org/changeset/base/281791 Log: - Speedup significantly by not using subshells for data already fetched. Ran against /usr/local/sbin/pkg: Before: 25.12 real 12.41 user 33.14 sys After: 0.53 real 0.49 user 0.13 sys - Exit with 1 if any missing or unresolved symbol is detected. - Add option '-U' to skip looking up unresolved symbols. - Don't consider provided weak objects as unresolved (nm V). Sponsored by: EMC / Isilon Storage Division Modified: head/tools/build/check-links.sh Modified: head/tools/build/check-links.sh ============================================================================== --- head/tools/build/check-links.sh Mon Apr 20 20:45:10 2015 (r281790) +++ head/tools/build/check-links.sh Mon Apr 20 20:51:19 2015 (r281791) @@ -1,6 +1,15 @@ #!/bin/sh # $FreeBSD$ +ret=0 +CHECK_UNRESOLVED=1 +while getopts "U" flag; do + case "${flag}" in + U) CHECK_UNRESOLVED=0 ;; + esac +done +shift $((OPTIND-1)) + mime=$(file -L --mime-type $1) case $mime in *application/x-executable);; @@ -8,30 +17,74 @@ case $mime in *) echo "Not an elf file" >&2 ; exit 1;; esac +# Gather all symbols from the target +unresolved_symbols=$(nm -D -u --format=posix "$1" | awk '$2 == "U" {print $1}' | tr '\n' ' ') +ldd_libs=$(ldd $1 | awk '{print $1 ":" $3}') + +libkey() { + libkey="lib_symbols_$1" + patterns=[.+,-] + replacement=_ + while :; do + case " ${libkey} " in + *${patterns}*) + libkey="${libkey%%${patterns}*}${replacement}${libkey#*${patterns}}" + ;; + *) + break + ;; + esac + done + return 0 +} + # Check for useful libs -list_libs="" +list_libs= +resolved_symbols= for lib in $(readelf -d $1 | awk '$2 ~ /\(?NEEDED\)?/ { sub(/\[/,"",$NF); sub(/\]/,"",$NF); print $NF }'); do echo -n "checking if $lib is needed: " - libpath=$(ldd $1 | awk -v lib=$lib '$1 == lib { print $3 }') - list_libs="$list_libs $libpath" - foundone=0 - for fct in $(nm -D $libpath | awk '$2 == "R" || $2 == "D" || $2 == "T" || $2 == "W" || $2 == "B" { print $3 }'); do - nm -D $1 | awk -v s=$fct '$1 == "U" && $2 == s { found=1 ; exit } END { if (found != 1) { exit 1 } }' && foundone=1 && break + for libpair in ${ldd_libs}; do + case "${libpair}" in + ${lib}:*) libpath="${libpair#*:}" && break ;; + esac done - if [ $foundone -eq 1 ]; then - echo -n "yes... " - nm -D $1 | awk -v s=$fct '$1 == "U" && $2 == s { print $2 ; exit }' + list_libs="$list_libs $lib" + foundone= + lib_symbols="$(nm -D --defined-only --format=posix "${libpath}" | awk '$2 ~ /R|D|T|W|B|V/ {print $1}' | tr '\n' ' ')" + if [ ${CHECK_UNRESOLVED} -eq 1 ]; then + # Save the global symbols for this lib + libkey "${lib}" + setvar "${libkey}" "${lib_symbols}" + fi + for fct in ${lib_symbols}; do + case " ${unresolved_symbols} " in + *\ ${fct}\ *) foundone="${fct}" && break ;; + esac + done + if [ -n "${foundone}" ]; then + echo "yes... ${foundone}" else echo "no" + ret=1 fi done -for sym in $(nm -D $1 | awk '$1 == "U" { print $2 }'); do - found=0 - for l in ${list_libs} ; do - nm -D $l | awk -v s=$sym '($2 == "R" || $2 == "D" || $2 == "T" || $2 == "W" || $2 == "B") && $3 == s { found=1 ; exit } END { if (found != 1) { exit 1 } }' && found=1 && break +if [ ${CHECK_UNRESOLVED} -eq 1 ]; then + for sym in ${unresolved_symbols}; do + found=0 + for lib in ${list_libs}; do + libkey "${lib}" + eval "lib_symbols=\"\${${libkey}}\"" + # lib_symbols now contains symbols for the lib. + case " ${lib_symbols} " in + *\ ${sym}\ *) found=1 && break ;; + esac + done + if [ $found -eq 0 ]; then + echo "Unresolved symbol $sym" + ret=1 + fi done - if [ $found -eq 0 ]; then - echo "Unresolved symbol $sym" - fi -done +fi + +exit ${ret} From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 21:19:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 327BCFB9; Mon, 20 Apr 2015 21:19:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2105F38E; Mon, 20 Apr 2015 21:19:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KLJSAw051351; Mon, 20 Apr 2015 21:19:28 GMT (envelope-from joel@FreeBSD.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KLJRgO051342; Mon, 20 Apr 2015 21:19:27 GMT (envelope-from joel@FreeBSD.org) Message-Id: <201504202119.t3KLJRgO051342@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: joel set sender to joel@FreeBSD.org using -f From: Joel Dahl Date: Mon, 20 Apr 2015 21:19:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281793 - in head: lib/libmt lib/libpmc share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 21:19:28 -0000 Author: joel (doc committer) Date: Mon Apr 20 21:19:26 2015 New Revision: 281793 URL: https://svnweb.freebsd.org/changeset/base/281793 Log: Minor mdoc fixes. Modified: head/lib/libmt/mt.3 head/lib/libpmc/pmc.haswellxeon.3 head/share/man/man4/ata.4 Modified: head/lib/libmt/mt.3 ============================================================================== --- head/lib/libmt/mt.3 Mon Apr 20 20:52:20 2015 (r281792) +++ head/lib/libmt/mt.3 Mon Apr 20 21:19:26 2015 (r281793) @@ -35,7 +35,6 @@ .Dt MT 3 .Os .Sh NAME -.Nm .Nm mt_start_element , .Nm mt_end_element , .Nm mt_char_handler , Modified: head/lib/libpmc/pmc.haswellxeon.3 ============================================================================== --- head/lib/libpmc/pmc.haswellxeon.3 Mon Apr 20 20:52:20 2015 (r281792) +++ head/lib/libpmc/pmc.haswellxeon.3 Mon Apr 20 21:19:26 2015 (r281793) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd 21 November, 2014 +.Dd November 21, 2014 .Dt PMC.HASWELLXEON 3 .Os .Sh NAME Modified: head/share/man/man4/ata.4 ============================================================================== --- head/share/man/man4/ata.4 Mon Apr 20 20:52:20 2015 (r281792) +++ head/share/man/man4/ata.4 Mon Apr 20 21:19:26 2015 (r281793) @@ -99,6 +99,7 @@ Interface Power Management is disabled. This is the default value. .It 1 The device is allowed to initiate a PM state change; the host is passive. +.El .It Va hint.ata. Ns Ar X Ns Va .dev Ns Ar X Ns Va .sata_rev limits the initial SATA revision (speed) for the specified device on the specified channel. From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 21:44:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BD094596; Mon, 20 Apr 2015 21:44:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB9DA8D2; Mon, 20 Apr 2015 21:44:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KLiuQm076628; Mon, 20 Apr 2015 21:44:56 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KLiuoc076627; Mon, 20 Apr 2015 21:44:56 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504202144.t3KLiuoc076627@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 20 Apr 2015 21:44:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281795 - head/sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 21:44:56 -0000 Author: pfg Date: Mon Apr 20 21:44:55 2015 New Revision: 281795 URL: https://svnweb.freebsd.org/changeset/base/281795 Log: scsi_parse_transportid_rdma(): fix mismatch in memoty access size. Independently found by Coverity and gcc49. CID: 1230006 Reviewed by: ken MFC after: 5 days Modified: head/sys/cam/scsi/scsi_all.c Modified: head/sys/cam/scsi/scsi_all.c ============================================================================== --- head/sys/cam/scsi/scsi_all.c Mon Apr 20 21:27:25 2015 (r281794) +++ head/sys/cam/scsi/scsi_all.c Mon Apr 20 21:44:55 2015 (r281795) @@ -6039,7 +6039,7 @@ scsi_parse_transportid_rdma(char *id_str goto bailout; } *alloc_len = sizeof(*rdma); - bzero(rdma, sizeof(rdma)); + bzero(rdma, *alloc_len); rdma->format_protocol = SCSI_PROTO_RDMA | SCSI_TRN_RDMA_FORMAT_DEFAULT; bcopy(rdma_id, rdma->initiator_port_id, SCSI_TRN_RDMA_PORT_LEN); From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 22:08:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E108F952; Mon, 20 Apr 2015 22:08:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF6B2AE6; Mon, 20 Apr 2015 22:08:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KM8CBu094228; Mon, 20 Apr 2015 22:08:12 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KM8C4U094224; Mon, 20 Apr 2015 22:08:12 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201504202208.t3KM8C4U094224@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 20 Apr 2015 22:08:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281797 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 22:08:13 -0000 Author: markj Date: Mon Apr 20 22:08:11 2015 New Revision: 281797 URL: https://svnweb.freebsd.org/changeset/base/281797 Log: Move the definition of struct bpf_if to bpf.c. A couple of fields are still exposed via struct bpf_if_ext so that bpf_peers_present() can be inlined into its callers. However, this change eliminates some type duplication in the resulting CTF container, since otherwise ctfmerge(1) propagates the duplication through all types that contain a struct bpf_if. Differential Revision: https://reviews.freebsd.org/D2319 Reviewed by: melifaro, rpaulo Modified: head/sys/net/bpf.c head/sys/net/bpf.h Modified: head/sys/net/bpf.c ============================================================================== --- head/sys/net/bpf.c Mon Apr 20 21:45:38 2015 (r281796) +++ head/sys/net/bpf.c Mon Apr 20 22:08:11 2015 (r281797) @@ -69,7 +69,6 @@ __FBSDID("$FreeBSD$"); #include #include -#define BPF_INTERNAL #include #include #ifdef BPF_JITTER @@ -90,6 +89,20 @@ __FBSDID("$FreeBSD$"); MALLOC_DEFINE(M_BPF, "BPF", "BPF data"); +struct bpf_if { +#define bif_next bif_ext.bif_next +#define bif_dlist bif_ext.bif_dlist + struct bpf_if_ext bif_ext; /* public members */ + u_int bif_dlt; /* link layer type */ + u_int bif_hdrlen; /* length of link header */ + struct ifnet *bif_ifp; /* corresponding interface */ + struct rwlock bif_lock; /* interface lock */ + LIST_HEAD(, bpf_d) bif_wlist; /* writer-only list */ + int bif_flags; /* Interface flags */ +}; + +CTASSERT(offsetof(struct bpf_if, bif_ext) == 0); + #if defined(DEV_BPF) || defined(NETGRAPH_BPF) #define PRINET 26 /* interruptible */ @@ -1892,7 +1905,7 @@ bpf_setif(struct bpf_d *d, struct ifreq /* Check if interface is not being detached from BPF */ BPFIF_RLOCK(bp); - if (bp->flags & BPFIF_FLAG_DYING) { + if (bp->bif_flags & BPFIF_FLAG_DYING) { BPFIF_RUNLOCK(bp); return (ENXIO); } @@ -2561,7 +2574,7 @@ bpfdetach(struct ifnet *ifp) * Mark bp as detached to restrict new consumers. */ BPFIF_WLOCK(bp); - bp->flags |= BPFIF_FLAG_DYING; + bp->bif_flags |= BPFIF_FLAG_DYING; BPFIF_WUNLOCK(bp); CTR4(KTR_NET, "%s: sheduling free for encap %d (%p) for if %p", Modified: head/sys/net/bpf.h ============================================================================== --- head/sys/net/bpf.h Mon Apr 20 21:45:38 2015 (r281796) +++ head/sys/net/bpf.h Mon Apr 20 22:08:11 2015 (r281797) @@ -1451,21 +1451,14 @@ SYSCTL_DECL(_net_bpf); /* * Descriptor associated with each attached hardware interface. - * FIXME: this structure is exposed to external callers to speed up - * bpf_peers_present() call. However we cover all fields not needed by - * this function via BPF_INTERNAL define + * Part of this structure is exposed to external callers to speed up + * bpf_peers_present() calls. */ -struct bpf_if { +struct bpf_if; + +struct bpf_if_ext { LIST_ENTRY(bpf_if) bif_next; /* list of all interfaces */ LIST_HEAD(, bpf_d) bif_dlist; /* descriptor list */ -#ifdef BPF_INTERNAL - u_int bif_dlt; /* link layer type */ - u_int bif_hdrlen; /* length of link header */ - struct ifnet *bif_ifp; /* corresponding interface */ - struct rwlock bif_lock; /* interface lock */ - LIST_HEAD(, bpf_d) bif_wlist; /* writer-only list */ - int flags; /* Interface flags */ -#endif }; void bpf_bufheld(struct bpf_d *d); @@ -1483,8 +1476,10 @@ u_int bpf_filter(const struct bpf_insn static __inline int bpf_peers_present(struct bpf_if *bpf) { + struct bpf_if_ext *ext; - if (!LIST_EMPTY(&bpf->bif_dlist)) + ext = (struct bpf_if_ext *)bpf; + if (!LIST_EMPTY(&ext->bif_dlist)) return (1); return (0); } From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 22:09:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C0DE7AED; Mon, 20 Apr 2015 22:09:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AFCC8AFD; Mon, 20 Apr 2015 22:09:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KM9pNP094967; Mon, 20 Apr 2015 22:09:51 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KM9pXl094966; Mon, 20 Apr 2015 22:09:51 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504202209.t3KM9pXl094966@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 20 Apr 2015 22:09:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281798 - head/lib/libc/iconv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 22:09:51 -0000 Author: pfg Date: Mon Apr 20 22:09:50 2015 New Revision: 281798 URL: https://svnweb.freebsd.org/changeset/base/281798 Log: Fix improbable memory leak in _citrus_prop_read_str(). Found by: Clang Static Analyzer Modified: head/lib/libc/iconv/citrus_prop.c Modified: head/lib/libc/iconv/citrus_prop.c ============================================================================== --- head/lib/libc/iconv/citrus_prop.c Mon Apr 20 22:08:11 2015 (r281797) +++ head/lib/libc/iconv/citrus_prop.c Mon Apr 20 22:09:50 2015 (r281798) @@ -293,8 +293,10 @@ done: } _memstream_ungetc(ms, ch); errnum = _citrus_prop_read_character_common(ms, &ch); - if (errnum != 0) + if (errnum != 0) { + free(s); return (errnum); + } s[n] = ch; ++n, --m; } From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 22:12:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 58296C98; Mon, 20 Apr 2015 22:12:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4673ABCD; Mon, 20 Apr 2015 22:12:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KMCL9n099405; Mon, 20 Apr 2015 22:12:21 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KMCKtF099400; Mon, 20 Apr 2015 22:12:20 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201504202212.t3KMCKtF099400@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Mon, 20 Apr 2015 22:12:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281799 - in head/sys: arm/conf modules/dtb/allwinner X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 22:12:21 -0000 Author: loos Date: Mon Apr 20 22:12:19 2015 New Revision: 281799 URL: https://svnweb.freebsd.org/changeset/base/281799 Log: Build and install the DTB for all the supported AllWinner SoCs. We will need them when we start booting using ubldr. Added: head/sys/modules/dtb/allwinner/ head/sys/modules/dtb/allwinner/Makefile (contents, props changed) Modified: head/sys/arm/conf/CUBIEBOARD head/sys/arm/conf/CUBIEBOARD2 Modified: head/sys/arm/conf/CUBIEBOARD ============================================================================== --- head/sys/arm/conf/CUBIEBOARD Mon Apr 20 22:09:50 2015 (r281798) +++ head/sys/arm/conf/CUBIEBOARD Mon Apr 20 22:12:19 2015 (r281799) @@ -139,4 +139,4 @@ device miibus options FDT # Configure using FDT/DTB data options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=cubieboard.dts - +makeoptions MODULES_EXTRA=dtb/allwinner Modified: head/sys/arm/conf/CUBIEBOARD2 ============================================================================== --- head/sys/arm/conf/CUBIEBOARD2 Mon Apr 20 22:09:50 2015 (r281798) +++ head/sys/arm/conf/CUBIEBOARD2 Mon Apr 20 22:12:19 2015 (r281799) @@ -140,4 +140,4 @@ device miibus options FDT # Configure using FDT/DTB data options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=cubieboard2.dts - +makeoptions MODULES_EXTRA=dtb/allwinner Added: head/sys/modules/dtb/allwinner/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/dtb/allwinner/Makefile Mon Apr 20 22:12:19 2015 (r281799) @@ -0,0 +1,7 @@ +# $FreeBSD$ +# All the dts files for allwinner systems we support. +DTS= \ + cubieboard.dts \ + cubieboard2.dts + +.include From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 22:15:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1CE89EE5; Mon, 20 Apr 2015 22:15:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E6E7ABEE; Mon, 20 Apr 2015 22:15:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KMFJiV000424; Mon, 20 Apr 2015 22:15:19 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KMFJDu000420; Mon, 20 Apr 2015 22:15:19 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504202215.t3KMFJDu000420@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 20 Apr 2015 22:15:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281800 - head/usr.bin/patch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 22:15:20 -0000 Author: pfg Date: Mon Apr 20 22:15:18 2015 New Revision: 281800 URL: https://svnweb.freebsd.org/changeset/base/281800 Log: patch(1): small include changes. Mostly to match OpenBSD, no functional change. Obtained from: OpenBSD Modified: head/usr.bin/patch/inp.c head/usr.bin/patch/pch.c head/usr.bin/patch/util.c Modified: head/usr.bin/patch/inp.c ============================================================================== --- head/usr.bin/patch/inp.c Mon Apr 20 22:12:19 2015 (r281799) +++ head/usr.bin/patch/inp.c Mon Apr 20 22:15:18 2015 (r281800) @@ -34,8 +34,8 @@ #include #include -#include #include +#include #include #include #include Modified: head/usr.bin/patch/pch.c ============================================================================== --- head/usr.bin/patch/pch.c Mon Apr 20 22:12:19 2015 (r281799) +++ head/usr.bin/patch/pch.c Mon Apr 20 22:15:18 2015 (r281800) @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include Modified: head/usr.bin/patch/util.c ============================================================================== --- head/usr.bin/patch/util.c Mon Apr 20 22:12:19 2015 (r281799) +++ head/usr.bin/patch/util.c Mon Apr 20 22:15:18 2015 (r281800) @@ -27,13 +27,13 @@ * $FreeBSD$ */ -#include #include #include #include #include #include +#include #include #include #include @@ -96,7 +96,7 @@ int backup_file(const char *orig) { struct stat filestat; - char bakname[MAXPATHLEN], *s, *simplename; + char bakname[PATH_MAX], *s, *simplename; dev_t orig_device; ino_t orig_inode; @@ -406,7 +406,7 @@ fetchname(const char *at, bool *exists, char * checked_in(char *file) { - char *filebase, *filedir, tmpbuf[MAXPATHLEN]; + char *filebase, *filedir, tmpbuf[PATH_MAX]; struct stat filestat; filebase = basename(file); From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 00:48:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0437D6BC; Tue, 21 Apr 2015 00:48:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D96B2DAE; Tue, 21 Apr 2015 00:48:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3L0mae5020067; Tue, 21 Apr 2015 00:48:36 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3L0mao3020058; Tue, 21 Apr 2015 00:48:36 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504210048.t3L0mao3020058@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 21 Apr 2015 00:48:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281802 - in head/release: . arm64 tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 00:48:37 -0000 Author: gjb Date: Tue Apr 21 00:48:35 2015 New Revision: 281802 URL: https://svnweb.freebsd.org/changeset/base/281802 Log: Merge the following from ^/projects/release-arm64 to allow building FreeBSD/arm64 VM images and memstick.img installation medium: r281786, r281788, r281792: r281786: Add support for building arm64/aarch64 virtual machine images. r281788: Copy amd64/make-memstick.sh to arm64/make-memstick.sh for aarch64 memory stick images. Although arm64 does not yet have USB support, the memstick image should be bootable with certain virtualization tools, such as qemu. r281792: Add a buildenv_setup() prototype, intended to be overridden as needed. For example, the arm64/aarch64 build needs devel/aarch64-binutils, so buildenv_setup() in the release.conf for this architecture handles the installation of the port before buildworld/buildkernel. Sponsored by: The FreeBSD Foundation Added: head/release/arm64/ - copied from r281788, projects/release-arm64/release/arm64/ Modified: head/release/release.conf.sample head/release/release.sh head/release/tools/vmimage.subr Directory Properties: head/ (props changed) Modified: head/release/release.conf.sample ============================================================================== --- head/release/release.conf.sample Tue Apr 21 00:08:37 2015 (r281801) +++ head/release/release.conf.sample Tue Apr 21 00:48:35 2015 (r281802) @@ -7,6 +7,7 @@ ## defined in release.sh. #load_chroot_env() { } #load_target_env() { } +#buildenv_setup() { } ## Set the directory within which the release will be built. CHROOTDIR="/scratch" Modified: head/release/release.sh ============================================================================== --- head/release/release.sh Tue Apr 21 00:08:37 2015 (r281801) +++ head/release/release.sh Tue Apr 21 00:48:35 2015 (r281802) @@ -42,6 +42,7 @@ export PATH # Prototypes that can be redefined per-chroot or per-target. load_chroot_env() { } load_target_env() { } +buildenv_setup() { } # The directory within which the release will be built. CHROOTDIR="/scratch" @@ -279,6 +280,7 @@ if [ -d ${CHROOTDIR}/usr/ports ]; then fi fi +buildenv_setup load_target_env eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_WMAKEFLAGS} buildworld eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_KMAKEFLAGS} buildkernel Modified: head/release/tools/vmimage.subr ============================================================================== --- head/release/tools/vmimage.subr Tue Apr 21 00:08:37 2015 (r281801) +++ head/release/tools/vmimage.subr Tue Apr 21 00:48:35 2015 (r281802) @@ -29,6 +29,13 @@ write_partition_layout() { -p freebsd-ufs/rootfs:=${VMBASE} \ -o ${VMIMAGE} ;; + arm64:aarch64) + mkimg -s gpt \ + -p efi/efiboot:=${BOOTFILES}/efi/boot1/boot1.efifat \ + ${SWAPOPT} \ + -p freebsd-ufs/rootfs:=${VMBASE} \ + -o ${VMIMAGE} + ;; powerpc:powerpc*) mkimg -s apm \ -p apple-boot/bootfs:=${BOOTFILES}/powerpc/boot1.chrp/boot1.hfs \ From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 01:37:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 15247E29; Tue, 21 Apr 2015 01:37:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0350B2F0; Tue, 21 Apr 2015 01:37:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3L1bE7A056181; Tue, 21 Apr 2015 01:37:14 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3L1bE1c056180; Tue, 21 Apr 2015 01:37:14 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504210137.t3L1bE1c056180@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 21 Apr 2015 01:37:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281805 - head/tools/build X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 01:37:15 -0000 Author: bdrewery Date: Tue Apr 21 01:37:14 2015 New Revision: 281805 URL: https://svnweb.freebsd.org/changeset/base/281805 Log: Support demangling C++ symbols with -D flag. Sponsored by: EMC / Isilon Storage Division Modified: head/tools/build/check-links.sh Modified: head/tools/build/check-links.sh ============================================================================== --- head/tools/build/check-links.sh Tue Apr 21 01:09:53 2015 (r281804) +++ head/tools/build/check-links.sh Tue Apr 21 01:37:14 2015 (r281805) @@ -3,8 +3,10 @@ ret=0 CHECK_UNRESOLVED=1 -while getopts "U" flag; do +DEMANGLE= +while getopts "DU" flag; do case "${flag}" in + D) DEMANGLE="-C" ;; U) CHECK_UNRESOLVED=0 ;; esac done @@ -18,7 +20,7 @@ case $mime in esac # Gather all symbols from the target -unresolved_symbols=$(nm -D -u --format=posix "$1" | awk '$2 == "U" {print $1}' | tr '\n' ' ') +unresolved_symbols=$(nm ${DEMANGLE} -D -u --format=posix "$1" | awk '$2 == "U" {print $1}' | tr '\n' ' ') ldd_libs=$(ldd $1 | awk '{print $1 ":" $3}') libkey() { @@ -50,7 +52,7 @@ for lib in $(readelf -d $1 | awk '$2 ~ / done list_libs="$list_libs $lib" foundone= - lib_symbols="$(nm -D --defined-only --format=posix "${libpath}" | awk '$2 ~ /R|D|T|W|B|V/ {print $1}' | tr '\n' ' ')" + lib_symbols="$(nm ${DEMANGLE} -D --defined-only --format=posix "${libpath}" | awk '$2 ~ /R|D|T|W|B|V/ {print $1}' | tr '\n' ' ')" if [ ${CHECK_UNRESOLVED} -eq 1 ]; then # Save the global symbols for this lib libkey "${lib}" From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 01:45:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE5551F4; Tue, 21 Apr 2015 01:45:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97BB53F2; Tue, 21 Apr 2015 01:45:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3L1jENX063450; Tue, 21 Apr 2015 01:45:14 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3L1jCLp063432; Tue, 21 Apr 2015 01:45:12 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201504210145.t3L1jCLp063432@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Tue, 21 Apr 2015 01:45:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281806 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20 contrib/wpa/patches contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers contrib/... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 01:45:14 -0000 Author: rpaulo Date: Tue Apr 21 01:45:11 2015 New Revision: 281806 URL: https://svnweb.freebsd.org/changeset/base/281806 Log: Merge wpa_supplicant/hostapd 2.4. Major changes are: SAE, Suite B, RFC 7268, EAP-PKE, ACS, and tons of bug fixes. Relnotes: yes Added: head/contrib/wpa/CONTRIBUTIONS - copied unchanged from r281682, vendor/wpa/dist/CONTRIBUTIONS head/contrib/wpa/hostapd/hapd_module_tests.c - copied unchanged from r281682, vendor/wpa/dist/hostapd/hapd_module_tests.c head/contrib/wpa/hostapd/wps-ap-nfc.py - copied unchanged from r281682, vendor/wpa/dist/hostapd/wps-ap-nfc.py head/contrib/wpa/hs20/ - copied from r281682, vendor/wpa/dist/hs20/ head/contrib/wpa/patches/openssl-0.9.8za-tls-extensions.patch - copied unchanged from r281682, vendor/wpa/dist/patches/openssl-0.9.8za-tls-extensions.patch head/contrib/wpa/src/ap/acs.c - copied unchanged from r281682, vendor/wpa/dist/src/ap/acs.c head/contrib/wpa/src/ap/acs.h - copied unchanged from r281682, vendor/wpa/dist/src/ap/acs.h head/contrib/wpa/src/ap/bss_load.c - copied unchanged from r281682, vendor/wpa/dist/src/ap/bss_load.c head/contrib/wpa/src/ap/bss_load.h - copied unchanged from r281682, vendor/wpa/dist/src/ap/bss_load.h head/contrib/wpa/src/ap/dfs.c - copied unchanged from r281682, vendor/wpa/dist/src/ap/dfs.c head/contrib/wpa/src/ap/dfs.h - copied unchanged from r281682, vendor/wpa/dist/src/ap/dfs.h head/contrib/wpa/src/ap/dhcp_snoop.c - copied unchanged from r281682, vendor/wpa/dist/src/ap/dhcp_snoop.c head/contrib/wpa/src/ap/dhcp_snoop.h - copied unchanged from r281682, vendor/wpa/dist/src/ap/dhcp_snoop.h head/contrib/wpa/src/ap/ndisc_snoop.c - copied unchanged from r281682, vendor/wpa/dist/src/ap/ndisc_snoop.c head/contrib/wpa/src/ap/ndisc_snoop.h - copied unchanged from r281682, vendor/wpa/dist/src/ap/ndisc_snoop.h head/contrib/wpa/src/ap/x_snoop.c - copied unchanged from r281682, vendor/wpa/dist/src/ap/x_snoop.c head/contrib/wpa/src/ap/x_snoop.h - copied unchanged from r281682, vendor/wpa/dist/src/ap/x_snoop.h head/contrib/wpa/src/common/common_module_tests.c - copied unchanged from r281682, vendor/wpa/dist/src/common/common_module_tests.c head/contrib/wpa/src/common/hw_features_common.c - copied unchanged from r281682, vendor/wpa/dist/src/common/hw_features_common.c head/contrib/wpa/src/common/hw_features_common.h - copied unchanged from r281682, vendor/wpa/dist/src/common/hw_features_common.h head/contrib/wpa/src/common/ieee802_1x_defs.h - copied unchanged from r281682, vendor/wpa/dist/src/common/ieee802_1x_defs.h head/contrib/wpa/src/common/qca-vendor-attr.h - copied unchanged from r281682, vendor/wpa/dist/src/common/qca-vendor-attr.h head/contrib/wpa/src/common/qca-vendor.h - copied unchanged from r281682, vendor/wpa/dist/src/common/qca-vendor.h head/contrib/wpa/src/common/sae.c - copied unchanged from r281682, vendor/wpa/dist/src/common/sae.c head/contrib/wpa/src/common/sae.h - copied unchanged from r281682, vendor/wpa/dist/src/common/sae.h head/contrib/wpa/src/common/tnc.h - copied unchanged from r281682, vendor/wpa/dist/src/common/tnc.h head/contrib/wpa/src/common/wpa_helpers.c - copied unchanged from r281682, vendor/wpa/dist/src/common/wpa_helpers.c head/contrib/wpa/src/common/wpa_helpers.h - copied unchanged from r281682, vendor/wpa/dist/src/common/wpa_helpers.h head/contrib/wpa/src/crypto/aes-siv.c - copied unchanged from r281682, vendor/wpa/dist/src/crypto/aes-siv.c head/contrib/wpa/src/crypto/aes_siv.h - copied unchanged from r281682, vendor/wpa/dist/src/crypto/aes_siv.h head/contrib/wpa/src/crypto/crypto_module_tests.c - copied unchanged from r281682, vendor/wpa/dist/src/crypto/crypto_module_tests.c head/contrib/wpa/src/crypto/sha256-kdf.c - copied unchanged from r281682, vendor/wpa/dist/src/crypto/sha256-kdf.c head/contrib/wpa/src/crypto/sha384.h - copied unchanged from r281682, vendor/wpa/dist/src/crypto/sha384.h head/contrib/wpa/src/drivers/driver_macsec_qca.c - copied unchanged from r281682, vendor/wpa/dist/src/drivers/driver_macsec_qca.c head/contrib/wpa/src/drivers/driver_nl80211.h - copied unchanged from r281682, vendor/wpa/dist/src/drivers/driver_nl80211.h head/contrib/wpa/src/drivers/driver_nl80211_android.c - copied unchanged from r281682, vendor/wpa/dist/src/drivers/driver_nl80211_android.c head/contrib/wpa/src/drivers/driver_nl80211_capa.c - copied unchanged from r281682, vendor/wpa/dist/src/drivers/driver_nl80211_capa.c head/contrib/wpa/src/drivers/driver_nl80211_event.c - copied unchanged from r281682, vendor/wpa/dist/src/drivers/driver_nl80211_event.c head/contrib/wpa/src/drivers/driver_nl80211_monitor.c - copied unchanged from r281682, vendor/wpa/dist/src/drivers/driver_nl80211_monitor.c head/contrib/wpa/src/drivers/driver_nl80211_scan.c - copied unchanged from r281682, vendor/wpa/dist/src/drivers/driver_nl80211_scan.c head/contrib/wpa/src/drivers/driver_openbsd.c - copied unchanged from r281682, vendor/wpa/dist/src/drivers/driver_openbsd.c head/contrib/wpa/src/drivers/linux_defines.h - copied unchanged from r281682, vendor/wpa/dist/src/drivers/linux_defines.h head/contrib/wpa/src/eap_common/eap_eke_common.c - copied unchanged from r281682, vendor/wpa/dist/src/eap_common/eap_eke_common.c head/contrib/wpa/src/eap_common/eap_eke_common.h - copied unchanged from r281682, vendor/wpa/dist/src/eap_common/eap_eke_common.h head/contrib/wpa/src/eap_peer/eap_eke.c - copied unchanged from r281682, vendor/wpa/dist/src/eap_peer/eap_eke.c head/contrib/wpa/src/eap_peer/eap_proxy.h - copied unchanged from r281682, vendor/wpa/dist/src/eap_peer/eap_proxy.h head/contrib/wpa/src/eap_peer/eap_proxy_dummy.c - copied unchanged from r281682, vendor/wpa/dist/src/eap_peer/eap_proxy_dummy.c head/contrib/wpa/src/eap_server/eap_server_eke.c - copied unchanged from r281682, vendor/wpa/dist/src/eap_server/eap_server_eke.c head/contrib/wpa/src/pae/ - copied from r281682, vendor/wpa/dist/src/pae/ head/contrib/wpa/src/utils/bitfield.c - copied unchanged from r281682, vendor/wpa/dist/src/utils/bitfield.c head/contrib/wpa/src/utils/bitfield.h - copied unchanged from r281682, vendor/wpa/dist/src/utils/bitfield.h head/contrib/wpa/src/utils/browser-android.c - copied unchanged from r281682, vendor/wpa/dist/src/utils/browser-android.c head/contrib/wpa/src/utils/browser-system.c - copied unchanged from r281682, vendor/wpa/dist/src/utils/browser-system.c head/contrib/wpa/src/utils/browser-wpadebug.c - copied unchanged from r281682, vendor/wpa/dist/src/utils/browser-wpadebug.c head/contrib/wpa/src/utils/browser.c - copied unchanged from r281682, vendor/wpa/dist/src/utils/browser.c head/contrib/wpa/src/utils/browser.h - copied unchanged from r281682, vendor/wpa/dist/src/utils/browser.h head/contrib/wpa/src/utils/http-utils.h - copied unchanged from r281682, vendor/wpa/dist/src/utils/http-utils.h head/contrib/wpa/src/utils/http_curl.c - copied unchanged from r281682, vendor/wpa/dist/src/utils/http_curl.c head/contrib/wpa/src/utils/platform.h - copied unchanged from r281682, vendor/wpa/dist/src/utils/platform.h head/contrib/wpa/src/utils/utils_module_tests.c - copied unchanged from r281682, vendor/wpa/dist/src/utils/utils_module_tests.c head/contrib/wpa/src/utils/xml-utils.c - copied unchanged from r281682, vendor/wpa/dist/src/utils/xml-utils.c head/contrib/wpa/src/utils/xml-utils.h - copied unchanged from r281682, vendor/wpa/dist/src/utils/xml-utils.h head/contrib/wpa/src/utils/xml_libxml2.c - copied unchanged from r281682, vendor/wpa/dist/src/utils/xml_libxml2.c head/contrib/wpa/src/wps/wps_module_tests.c - copied unchanged from r281682, vendor/wpa/dist/src/wps/wps_module_tests.c head/contrib/wpa/wpa_supplicant/eap_proxy_dummy.mak - copied unchanged from r281682, vendor/wpa/dist/wpa_supplicant/eap_proxy_dummy.mak head/contrib/wpa/wpa_supplicant/eap_proxy_dummy.mk - copied unchanged from r281682, vendor/wpa/dist/wpa_supplicant/eap_proxy_dummy.mk head/contrib/wpa/wpa_supplicant/examples/p2p-nfc.py - copied unchanged from r281682, vendor/wpa/dist/wpa_supplicant/examples/p2p-nfc.py head/contrib/wpa/wpa_supplicant/mesh.c - copied unchanged from r281682, vendor/wpa/dist/wpa_supplicant/mesh.c head/contrib/wpa/wpa_supplicant/mesh.h - copied unchanged from r281682, vendor/wpa/dist/wpa_supplicant/mesh.h head/contrib/wpa/wpa_supplicant/mesh_mpm.c - copied unchanged from r281682, vendor/wpa/dist/wpa_supplicant/mesh_mpm.c head/contrib/wpa/wpa_supplicant/mesh_mpm.h - copied unchanged from r281682, vendor/wpa/dist/wpa_supplicant/mesh_mpm.h head/contrib/wpa/wpa_supplicant/mesh_rsn.c - copied unchanged from r281682, vendor/wpa/dist/wpa_supplicant/mesh_rsn.c head/contrib/wpa/wpa_supplicant/mesh_rsn.h - copied unchanged from r281682, vendor/wpa/dist/wpa_supplicant/mesh_rsn.h head/contrib/wpa/wpa_supplicant/wmm_ac.c - copied unchanged from r281682, vendor/wpa/dist/wpa_supplicant/wmm_ac.c head/contrib/wpa/wpa_supplicant/wmm_ac.h - copied unchanged from r281682, vendor/wpa/dist/wpa_supplicant/wmm_ac.h head/contrib/wpa/wpa_supplicant/wpas_kay.c - copied unchanged from r281682, vendor/wpa/dist/wpa_supplicant/wpas_kay.c head/contrib/wpa/wpa_supplicant/wpas_kay.h - copied unchanged from r281682, vendor/wpa/dist/wpa_supplicant/wpas_kay.h head/contrib/wpa/wpa_supplicant/wpas_module_tests.c - copied unchanged from r281682, vendor/wpa/dist/wpa_supplicant/wpas_module_tests.c Deleted: head/contrib/wpa/hostapd/dump_state.c head/contrib/wpa/hostapd/dump_state.h head/contrib/wpa/patches/openssl-0.9.8-tls-extensions.patch head/contrib/wpa/patches/openssl-0.9.8d-tls-extensions.patch head/contrib/wpa/patches/openssl-0.9.8e-tls-extensions.patch head/contrib/wpa/patches/openssl-0.9.8g-tls-extensions.patch head/contrib/wpa/patches/openssl-0.9.8h-tls-extensions.patch head/contrib/wpa/patches/openssl-0.9.8i-tls-extensions.patch head/contrib/wpa/patches/openssl-0.9.8x-tls-extensions.patch head/contrib/wpa/patches/openssl-0.9.9-session-ticket.patch head/contrib/wpa/src/crypto/crypto_nss.c head/contrib/wpa/src/crypto/fips_prf_cryptoapi.c head/contrib/wpa/src/crypto/fips_prf_gnutls.c head/contrib/wpa/src/crypto/fips_prf_nss.c head/contrib/wpa/src/crypto/tls_nss.c head/contrib/wpa/src/utils/eloop_none.c Modified: head/contrib/wpa/COPYING head/contrib/wpa/README head/contrib/wpa/hostapd/ChangeLog head/contrib/wpa/hostapd/README head/contrib/wpa/hostapd/README-WPS head/contrib/wpa/hostapd/config_file.c head/contrib/wpa/hostapd/ctrl_iface.c head/contrib/wpa/hostapd/defconfig head/contrib/wpa/hostapd/eap_register.c head/contrib/wpa/hostapd/hlr_auc_gw.c head/contrib/wpa/hostapd/hostapd.8 head/contrib/wpa/hostapd/hostapd.conf head/contrib/wpa/hostapd/hostapd.eap_user head/contrib/wpa/hostapd/hostapd.eap_user_sqlite head/contrib/wpa/hostapd/hostapd_cli.c head/contrib/wpa/hostapd/main.c head/contrib/wpa/src/ap/accounting.c head/contrib/wpa/src/ap/ap_config.c head/contrib/wpa/src/ap/ap_config.h head/contrib/wpa/src/ap/ap_drv_ops.c head/contrib/wpa/src/ap/ap_drv_ops.h head/contrib/wpa/src/ap/ap_list.c head/contrib/wpa/src/ap/ap_list.h head/contrib/wpa/src/ap/ap_mlme.c head/contrib/wpa/src/ap/authsrv.c head/contrib/wpa/src/ap/beacon.c head/contrib/wpa/src/ap/beacon.h head/contrib/wpa/src/ap/ctrl_iface_ap.c head/contrib/wpa/src/ap/ctrl_iface_ap.h head/contrib/wpa/src/ap/drv_callbacks.c head/contrib/wpa/src/ap/eap_user_db.c head/contrib/wpa/src/ap/gas_serv.c head/contrib/wpa/src/ap/gas_serv.h head/contrib/wpa/src/ap/hostapd.c head/contrib/wpa/src/ap/hostapd.h head/contrib/wpa/src/ap/hs20.c head/contrib/wpa/src/ap/hs20.h head/contrib/wpa/src/ap/hw_features.c head/contrib/wpa/src/ap/hw_features.h head/contrib/wpa/src/ap/iapp.c head/contrib/wpa/src/ap/ieee802_11.c head/contrib/wpa/src/ap/ieee802_11.h head/contrib/wpa/src/ap/ieee802_11_auth.c head/contrib/wpa/src/ap/ieee802_11_ht.c head/contrib/wpa/src/ap/ieee802_11_shared.c head/contrib/wpa/src/ap/ieee802_11_vht.c head/contrib/wpa/src/ap/ieee802_1x.c head/contrib/wpa/src/ap/ieee802_1x.h head/contrib/wpa/src/ap/p2p_hostapd.c head/contrib/wpa/src/ap/peerkey_auth.c head/contrib/wpa/src/ap/pmksa_cache_auth.c head/contrib/wpa/src/ap/pmksa_cache_auth.h head/contrib/wpa/src/ap/sta_info.c head/contrib/wpa/src/ap/sta_info.h head/contrib/wpa/src/ap/tkip_countermeasures.c head/contrib/wpa/src/ap/vlan_init.c head/contrib/wpa/src/ap/vlan_init.h head/contrib/wpa/src/ap/wmm.c head/contrib/wpa/src/ap/wmm.h head/contrib/wpa/src/ap/wnm_ap.c head/contrib/wpa/src/ap/wnm_ap.h head/contrib/wpa/src/ap/wpa_auth.c head/contrib/wpa/src/ap/wpa_auth.h head/contrib/wpa/src/ap/wpa_auth_ft.c head/contrib/wpa/src/ap/wpa_auth_glue.c head/contrib/wpa/src/ap/wpa_auth_i.h head/contrib/wpa/src/ap/wpa_auth_ie.c head/contrib/wpa/src/ap/wpa_auth_ie.h head/contrib/wpa/src/ap/wps_hostapd.c head/contrib/wpa/src/ap/wps_hostapd.h head/contrib/wpa/src/common/defs.h head/contrib/wpa/src/common/eapol_common.h head/contrib/wpa/src/common/ieee802_11_common.c head/contrib/wpa/src/common/ieee802_11_common.h head/contrib/wpa/src/common/ieee802_11_defs.h head/contrib/wpa/src/common/privsep_commands.h head/contrib/wpa/src/common/version.h head/contrib/wpa/src/common/wpa_common.c head/contrib/wpa/src/common/wpa_common.h head/contrib/wpa/src/common/wpa_ctrl.c head/contrib/wpa/src/common/wpa_ctrl.h head/contrib/wpa/src/crypto/aes-ccm.c head/contrib/wpa/src/crypto/aes-eax.c head/contrib/wpa/src/crypto/aes-gcm.c head/contrib/wpa/src/crypto/aes-omac1.c head/contrib/wpa/src/crypto/aes-unwrap.c head/contrib/wpa/src/crypto/aes-wrap.c head/contrib/wpa/src/crypto/aes_wrap.h head/contrib/wpa/src/crypto/crypto.h head/contrib/wpa/src/crypto/crypto_internal-rsa.c head/contrib/wpa/src/crypto/crypto_openssl.c head/contrib/wpa/src/crypto/dh_groups.c head/contrib/wpa/src/crypto/dh_groups.h head/contrib/wpa/src/crypto/md5.c head/contrib/wpa/src/crypto/milenage.c head/contrib/wpa/src/crypto/ms_funcs.c head/contrib/wpa/src/crypto/random.c head/contrib/wpa/src/crypto/sha1-internal.c head/contrib/wpa/src/crypto/sha1-prf.c head/contrib/wpa/src/crypto/sha1.c head/contrib/wpa/src/crypto/sha256-prf.c head/contrib/wpa/src/crypto/sha256.h head/contrib/wpa/src/crypto/tls.h head/contrib/wpa/src/crypto/tls_gnutls.c head/contrib/wpa/src/crypto/tls_internal.c head/contrib/wpa/src/crypto/tls_none.c head/contrib/wpa/src/crypto/tls_openssl.c head/contrib/wpa/src/crypto/tls_schannel.c head/contrib/wpa/src/drivers/driver.h head/contrib/wpa/src/drivers/driver_bsd.c head/contrib/wpa/src/drivers/driver_common.c head/contrib/wpa/src/drivers/driver_ndis.c head/contrib/wpa/src/drivers/driver_privsep.c head/contrib/wpa/src/drivers/driver_wired.c head/contrib/wpa/src/drivers/drivers.c head/contrib/wpa/src/eap_common/eap_common.c head/contrib/wpa/src/eap_common/eap_common.h head/contrib/wpa/src/eap_common/eap_defs.h head/contrib/wpa/src/eap_common/eap_fast_common.c head/contrib/wpa/src/eap_common/eap_fast_common.h head/contrib/wpa/src/eap_common/eap_gpsk_common.c head/contrib/wpa/src/eap_common/eap_gpsk_common.h head/contrib/wpa/src/eap_common/eap_ikev2_common.c head/contrib/wpa/src/eap_common/eap_ikev2_common.h head/contrib/wpa/src/eap_common/eap_pax_common.c head/contrib/wpa/src/eap_common/eap_pax_common.h head/contrib/wpa/src/eap_common/eap_pwd_common.c head/contrib/wpa/src/eap_common/eap_pwd_common.h head/contrib/wpa/src/eap_common/eap_sim_common.c head/contrib/wpa/src/eap_common/eap_sim_common.h head/contrib/wpa/src/eap_common/ikev2_common.c head/contrib/wpa/src/eap_common/ikev2_common.h head/contrib/wpa/src/eap_peer/eap.c head/contrib/wpa/src/eap_peer/eap.h head/contrib/wpa/src/eap_peer/eap_aka.c head/contrib/wpa/src/eap_peer/eap_config.h head/contrib/wpa/src/eap_peer/eap_fast.c head/contrib/wpa/src/eap_peer/eap_fast_pac.c head/contrib/wpa/src/eap_peer/eap_gpsk.c head/contrib/wpa/src/eap_peer/eap_i.h head/contrib/wpa/src/eap_peer/eap_ikev2.c head/contrib/wpa/src/eap_peer/eap_leap.c head/contrib/wpa/src/eap_peer/eap_methods.c head/contrib/wpa/src/eap_peer/eap_methods.h head/contrib/wpa/src/eap_peer/eap_mschapv2.c head/contrib/wpa/src/eap_peer/eap_pax.c head/contrib/wpa/src/eap_peer/eap_peap.c head/contrib/wpa/src/eap_peer/eap_psk.c head/contrib/wpa/src/eap_peer/eap_pwd.c head/contrib/wpa/src/eap_peer/eap_sake.c head/contrib/wpa/src/eap_peer/eap_sim.c head/contrib/wpa/src/eap_peer/eap_tls.c head/contrib/wpa/src/eap_peer/eap_tls_common.c head/contrib/wpa/src/eap_peer/eap_tls_common.h head/contrib/wpa/src/eap_peer/eap_tnc.c head/contrib/wpa/src/eap_peer/eap_ttls.c head/contrib/wpa/src/eap_peer/eap_vendor_test.c head/contrib/wpa/src/eap_peer/eap_wsc.c head/contrib/wpa/src/eap_peer/ikev2.c head/contrib/wpa/src/eap_peer/mschapv2.c head/contrib/wpa/src/eap_peer/tncc.c head/contrib/wpa/src/eap_server/eap.h head/contrib/wpa/src/eap_server/eap_i.h head/contrib/wpa/src/eap_server/eap_methods.h head/contrib/wpa/src/eap_server/eap_server.c head/contrib/wpa/src/eap_server/eap_server_aka.c head/contrib/wpa/src/eap_server/eap_server_fast.c head/contrib/wpa/src/eap_server/eap_server_gpsk.c head/contrib/wpa/src/eap_server/eap_server_gtc.c head/contrib/wpa/src/eap_server/eap_server_identity.c head/contrib/wpa/src/eap_server/eap_server_ikev2.c head/contrib/wpa/src/eap_server/eap_server_md5.c head/contrib/wpa/src/eap_server/eap_server_methods.c head/contrib/wpa/src/eap_server/eap_server_mschapv2.c head/contrib/wpa/src/eap_server/eap_server_pax.c head/contrib/wpa/src/eap_server/eap_server_peap.c head/contrib/wpa/src/eap_server/eap_server_psk.c head/contrib/wpa/src/eap_server/eap_server_pwd.c head/contrib/wpa/src/eap_server/eap_server_sake.c head/contrib/wpa/src/eap_server/eap_server_sim.c head/contrib/wpa/src/eap_server/eap_server_tls.c head/contrib/wpa/src/eap_server/eap_server_tls_common.c head/contrib/wpa/src/eap_server/eap_server_tnc.c head/contrib/wpa/src/eap_server/eap_server_ttls.c head/contrib/wpa/src/eap_server/eap_server_wsc.c head/contrib/wpa/src/eap_server/eap_sim_db.c head/contrib/wpa/src/eap_server/eap_tls_common.h head/contrib/wpa/src/eap_server/ikev2.c head/contrib/wpa/src/eap_server/tncs.c head/contrib/wpa/src/eapol_auth/eapol_auth_dump.c head/contrib/wpa/src/eapol_auth/eapol_auth_sm.c head/contrib/wpa/src/eapol_auth/eapol_auth_sm.h head/contrib/wpa/src/eapol_auth/eapol_auth_sm_i.h head/contrib/wpa/src/eapol_supp/eapol_supp_sm.c head/contrib/wpa/src/eapol_supp/eapol_supp_sm.h head/contrib/wpa/src/l2_packet/l2_packet.h head/contrib/wpa/src/l2_packet/l2_packet_freebsd.c head/contrib/wpa/src/l2_packet/l2_packet_ndis.c head/contrib/wpa/src/l2_packet/l2_packet_none.c head/contrib/wpa/src/l2_packet/l2_packet_privsep.c head/contrib/wpa/src/p2p/p2p.c head/contrib/wpa/src/p2p/p2p.h head/contrib/wpa/src/p2p/p2p_build.c head/contrib/wpa/src/p2p/p2p_dev_disc.c head/contrib/wpa/src/p2p/p2p_go_neg.c head/contrib/wpa/src/p2p/p2p_group.c head/contrib/wpa/src/p2p/p2p_i.h head/contrib/wpa/src/p2p/p2p_invitation.c head/contrib/wpa/src/p2p/p2p_parse.c head/contrib/wpa/src/p2p/p2p_pd.c head/contrib/wpa/src/p2p/p2p_sd.c head/contrib/wpa/src/p2p/p2p_utils.c head/contrib/wpa/src/radius/radius.c head/contrib/wpa/src/radius/radius.h head/contrib/wpa/src/radius/radius_client.c head/contrib/wpa/src/radius/radius_das.c head/contrib/wpa/src/radius/radius_das.h head/contrib/wpa/src/radius/radius_server.c head/contrib/wpa/src/radius/radius_server.h head/contrib/wpa/src/rsn_supp/peerkey.c head/contrib/wpa/src/rsn_supp/peerkey.h head/contrib/wpa/src/rsn_supp/pmksa_cache.c head/contrib/wpa/src/rsn_supp/pmksa_cache.h head/contrib/wpa/src/rsn_supp/preauth.c head/contrib/wpa/src/rsn_supp/preauth.h head/contrib/wpa/src/rsn_supp/tdls.c head/contrib/wpa/src/rsn_supp/wpa.c head/contrib/wpa/src/rsn_supp/wpa.h head/contrib/wpa/src/rsn_supp/wpa_ft.c head/contrib/wpa/src/rsn_supp/wpa_i.h head/contrib/wpa/src/rsn_supp/wpa_ie.c head/contrib/wpa/src/rsn_supp/wpa_ie.h head/contrib/wpa/src/tls/asn1.c head/contrib/wpa/src/tls/asn1.h head/contrib/wpa/src/tls/libtommath.c head/contrib/wpa/src/tls/pkcs1.c head/contrib/wpa/src/tls/pkcs1.h head/contrib/wpa/src/tls/rsa.c head/contrib/wpa/src/tls/rsa.h head/contrib/wpa/src/tls/tlsv1_client.c head/contrib/wpa/src/tls/tlsv1_client_read.c head/contrib/wpa/src/tls/tlsv1_client_write.c head/contrib/wpa/src/tls/tlsv1_common.c head/contrib/wpa/src/tls/tlsv1_common.h head/contrib/wpa/src/tls/tlsv1_record.c head/contrib/wpa/src/tls/tlsv1_server.c head/contrib/wpa/src/tls/tlsv1_server.h head/contrib/wpa/src/tls/tlsv1_server_i.h head/contrib/wpa/src/tls/tlsv1_server_read.c head/contrib/wpa/src/tls/tlsv1_server_write.c head/contrib/wpa/src/tls/x509v3.c head/contrib/wpa/src/utils/base64.c head/contrib/wpa/src/utils/build_config.h head/contrib/wpa/src/utils/common.c head/contrib/wpa/src/utils/common.h head/contrib/wpa/src/utils/edit.c head/contrib/wpa/src/utils/edit_readline.c head/contrib/wpa/src/utils/edit_simple.c head/contrib/wpa/src/utils/eloop.c head/contrib/wpa/src/utils/eloop.h head/contrib/wpa/src/utils/eloop_win.c head/contrib/wpa/src/utils/ext_password_test.c head/contrib/wpa/src/utils/ip_addr.c head/contrib/wpa/src/utils/ip_addr.h head/contrib/wpa/src/utils/list.h head/contrib/wpa/src/utils/os.h head/contrib/wpa/src/utils/os_internal.c head/contrib/wpa/src/utils/os_none.c head/contrib/wpa/src/utils/os_unix.c head/contrib/wpa/src/utils/os_win32.c head/contrib/wpa/src/utils/pcsc_funcs.c head/contrib/wpa/src/utils/pcsc_funcs.h head/contrib/wpa/src/utils/radiotap.c head/contrib/wpa/src/utils/radiotap.h head/contrib/wpa/src/utils/radiotap_iter.h head/contrib/wpa/src/utils/trace.c head/contrib/wpa/src/utils/trace.h head/contrib/wpa/src/utils/uuid.c head/contrib/wpa/src/utils/wpa_debug.c head/contrib/wpa/src/utils/wpa_debug.h head/contrib/wpa/src/utils/wpabuf.c head/contrib/wpa/src/utils/wpabuf.h head/contrib/wpa/src/wps/http_client.c head/contrib/wpa/src/wps/http_server.c head/contrib/wpa/src/wps/httpread.c head/contrib/wpa/src/wps/ndef.c head/contrib/wpa/src/wps/wps.c head/contrib/wpa/src/wps/wps.h head/contrib/wpa/src/wps/wps_attr_build.c head/contrib/wpa/src/wps/wps_attr_parse.c head/contrib/wpa/src/wps/wps_attr_parse.h head/contrib/wpa/src/wps/wps_attr_process.c head/contrib/wpa/src/wps/wps_common.c head/contrib/wpa/src/wps/wps_defs.h head/contrib/wpa/src/wps/wps_dev_attr.c head/contrib/wpa/src/wps/wps_dev_attr.h head/contrib/wpa/src/wps/wps_enrollee.c head/contrib/wpa/src/wps/wps_er.c head/contrib/wpa/src/wps/wps_er.h head/contrib/wpa/src/wps/wps_er_ssdp.c head/contrib/wpa/src/wps/wps_i.h head/contrib/wpa/src/wps/wps_registrar.c head/contrib/wpa/src/wps/wps_upnp.c head/contrib/wpa/src/wps/wps_upnp_ap.c head/contrib/wpa/src/wps/wps_upnp_i.h head/contrib/wpa/src/wps/wps_upnp_ssdp.c head/contrib/wpa/src/wps/wps_upnp_web.c head/contrib/wpa/src/wps/wps_validate.c head/contrib/wpa/wpa_supplicant/ChangeLog head/contrib/wpa/wpa_supplicant/README head/contrib/wpa/wpa_supplicant/README-HS20 head/contrib/wpa/wpa_supplicant/README-P2P head/contrib/wpa/wpa_supplicant/README-WPS head/contrib/wpa/wpa_supplicant/ap.c head/contrib/wpa/wpa_supplicant/ap.h head/contrib/wpa/wpa_supplicant/bgscan.c head/contrib/wpa/wpa_supplicant/bgscan.h head/contrib/wpa/wpa_supplicant/bgscan_learn.c head/contrib/wpa/wpa_supplicant/bgscan_simple.c head/contrib/wpa/wpa_supplicant/bss.c head/contrib/wpa/wpa_supplicant/bss.h head/contrib/wpa/wpa_supplicant/config.c head/contrib/wpa/wpa_supplicant/config.h head/contrib/wpa/wpa_supplicant/config_file.c head/contrib/wpa/wpa_supplicant/config_none.c head/contrib/wpa/wpa_supplicant/config_ssid.h head/contrib/wpa/wpa_supplicant/ctrl_iface.c head/contrib/wpa/wpa_supplicant/ctrl_iface.h head/contrib/wpa/wpa_supplicant/ctrl_iface_named_pipe.c head/contrib/wpa/wpa_supplicant/ctrl_iface_udp.c head/contrib/wpa/wpa_supplicant/ctrl_iface_unix.c head/contrib/wpa/wpa_supplicant/dbus/Makefile head/contrib/wpa/wpa_supplicant/dbus/dbus_common.c head/contrib/wpa/wpa_supplicant/dbus/dbus_dict_helpers.c head/contrib/wpa/wpa_supplicant/dbus/dbus_dict_helpers.h head/contrib/wpa/wpa_supplicant/dbus/dbus_new.c head/contrib/wpa/wpa_supplicant/dbus/dbus_new.h head/contrib/wpa/wpa_supplicant/dbus/dbus_new_handlers.c head/contrib/wpa/wpa_supplicant/dbus/dbus_new_handlers.h head/contrib/wpa/wpa_supplicant/dbus/dbus_new_handlers_p2p.c head/contrib/wpa/wpa_supplicant/dbus/dbus_new_handlers_p2p.h head/contrib/wpa/wpa_supplicant/dbus/dbus_new_handlers_wps.c head/contrib/wpa/wpa_supplicant/dbus/dbus_new_helpers.c head/contrib/wpa/wpa_supplicant/dbus/dbus_new_helpers.h head/contrib/wpa/wpa_supplicant/dbus/dbus_new_introspect.c head/contrib/wpa/wpa_supplicant/dbus/dbus_old.c head/contrib/wpa/wpa_supplicant/dbus/dbus_old.h head/contrib/wpa/wpa_supplicant/dbus/dbus_old_handlers.c head/contrib/wpa/wpa_supplicant/dbus/dbus_old_handlers.h head/contrib/wpa/wpa_supplicant/dbus/dbus_old_handlers_wps.c head/contrib/wpa/wpa_supplicant/defconfig head/contrib/wpa/wpa_supplicant/driver_i.h head/contrib/wpa/wpa_supplicant/eap_register.c head/contrib/wpa/wpa_supplicant/eapol_test.c head/contrib/wpa/wpa_supplicant/events.c head/contrib/wpa/wpa_supplicant/examples/p2p-action.sh head/contrib/wpa/wpa_supplicant/examples/wps-ap-cli head/contrib/wpa/wpa_supplicant/examples/wps-nfc.py head/contrib/wpa/wpa_supplicant/gas_query.c head/contrib/wpa/wpa_supplicant/gas_query.h head/contrib/wpa/wpa_supplicant/hs20_supplicant.c head/contrib/wpa/wpa_supplicant/hs20_supplicant.h head/contrib/wpa/wpa_supplicant/ibss_rsn.c head/contrib/wpa/wpa_supplicant/ibss_rsn.h head/contrib/wpa/wpa_supplicant/interworking.c head/contrib/wpa/wpa_supplicant/interworking.h head/contrib/wpa/wpa_supplicant/main.c head/contrib/wpa/wpa_supplicant/main_none.c head/contrib/wpa/wpa_supplicant/notify.c head/contrib/wpa/wpa_supplicant/notify.h head/contrib/wpa/wpa_supplicant/offchannel.c head/contrib/wpa/wpa_supplicant/p2p_supplicant.c head/contrib/wpa/wpa_supplicant/p2p_supplicant.h head/contrib/wpa/wpa_supplicant/preauth_test.c head/contrib/wpa/wpa_supplicant/scan.c head/contrib/wpa/wpa_supplicant/scan.h head/contrib/wpa/wpa_supplicant/sme.c head/contrib/wpa/wpa_supplicant/sme.h head/contrib/wpa/wpa_supplicant/tests/test_wpa.c head/contrib/wpa/wpa_supplicant/todo.txt head/contrib/wpa/wpa_supplicant/wifi_display.c head/contrib/wpa/wpa_supplicant/wifi_display.h head/contrib/wpa/wpa_supplicant/wnm_sta.c head/contrib/wpa/wpa_supplicant/wnm_sta.h head/contrib/wpa/wpa_supplicant/wpa_cli.c head/contrib/wpa/wpa_supplicant/wpa_priv.c head/contrib/wpa/wpa_supplicant/wpa_supplicant.c head/contrib/wpa/wpa_supplicant/wpa_supplicant.conf head/contrib/wpa/wpa_supplicant/wpa_supplicant_i.h head/contrib/wpa/wpa_supplicant/wpa_supplicant_template.conf head/contrib/wpa/wpa_supplicant/wpas_glue.c head/contrib/wpa/wpa_supplicant/wps_supplicant.c head/contrib/wpa/wpa_supplicant/wps_supplicant.h head/usr.sbin/wpa/hostapd/Makefile head/usr.sbin/wpa/wpa_passphrase/Makefile head/usr.sbin/wpa/wpa_supplicant/Makefile Directory Properties: head/contrib/wpa/ (props changed) Copied: head/contrib/wpa/CONTRIBUTIONS (from r281682, vendor/wpa/dist/CONTRIBUTIONS) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/wpa/CONTRIBUTIONS Tue Apr 21 01:45:11 2015 (r281806, copy of r281682, vendor/wpa/dist/CONTRIBUTIONS) @@ -0,0 +1,143 @@ +Contributions to hostap.git +--------------------------- + +This software is distributed under a permissive open source license to +allow it to be used in any projects, whether open source or proprietary. +Contributions to the project are welcome and it is important to maintain +clear record of contributions and terms under which they are licensed. +To help with this, following procedure is used to allow acceptance and +recording of the terms. + +All contributions are expected to be licensed under the modified BSD +license (see below). Acknowledgment of the terms is tracked through +inclusion of Signed-off-by tag in the contributions at the end of the +commit log message. This tag indicates that the contributor agrees with +the Developer Certificate of Origin (DCO) version 1.1 terms (see below; +also available from http://developercertificate.org/). + + +The current requirements for contributions to hostap.git +-------------------------------------------------------- + +To indicate your acceptance of Developer's Certificate of Origin 1.1 +terms, please add the following line to the end of the commit message +for each contribution you make to the project: + +Signed-off-by: Your Name + +using your real name. Pseudonyms or anonymous contributions cannot +unfortunately be accepted. + + +History of license and contributions terms +------------------------------------------ + +Until February 11, 2012, in case of most files in hostap.git, "under the +open source license indicated in the file" means that the contribution +is licensed both under GPL v2 and modified BSD license (see below) and +the choice between these licenses is given to anyone who redistributes +or uses the software. As such, the contribution has to be licensed under +both options to allow this choice. + +As of February 11, 2012, the project has chosen to use only the BSD +license option for future distribution. As such, the GPL v2 license +option is no longer used and the contributions are not required to be +licensed until GPL v2. In case of most files in hostap.git, "under the +open source license indicated in the file" means that the contribution +is licensed under the modified BSD license (see below). + +Until February 13, 2014, the project used an extended version of the DCO +that included the identical items (a) through (d) from DCO 1.1 and an +additional item (e): + +(e) The contribution can be licensed under the modified BSD license + as shown below even in case of files that are currently licensed + under other terms. + +This was used during the period when some of the files included the old +license terms. Acceptance of this extended DCO version was indicated +with a Signed-hostap tag in the commit message. This additional item (e) +was used to collect explicit approval to license the contribution with +only the modified BSD license (see below), i.e., without the GPL v2 +option. This was done to allow simpler licensing terms to be used in the +future. It should be noted that the modified BSD license is compatible +with GNU GPL and as such, this possible move to simpler licensing option +does not prevent use of this software in GPL projects. + + +===[ start quote from http://developercertificate.org/ ]======================= + +Developer Certificate of Origin +Version 1.1 + +Copyright (C) 2004, 2006 The Linux Foundation and its contributors. +660 York Street, Suite 102, +San Francisco, CA 94110 USA + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + + +Developer's Certificate of Origin 1.1 + +By making a contribution to this project, I certify that: + +(a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + +(b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + +(c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +(d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. + +===[ end quote from http://developercertificate.org/ ]========================= + + +The license terms used for hostap.git files +------------------------------------------- + +Modified BSD license (no advertisement clause): + +Copyright (c) 2002-2015, Jouni Malinen and contributors +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. + +3. Neither the name(s) of the above-listed copyright holder(s) 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. Modified: head/contrib/wpa/COPYING ============================================================================== --- head/contrib/wpa/COPYING Tue Apr 21 01:37:14 2015 (r281805) +++ head/contrib/wpa/COPYING Tue Apr 21 01:45:11 2015 (r281806) @@ -1,7 +1,7 @@ wpa_supplicant and hostapd -------------------------- -Copyright (c) 2002-2012, Jouni Malinen and contributors +Copyright (c) 2002-2015, Jouni Malinen and contributors All Rights Reserved. Modified: head/contrib/wpa/README ============================================================================== --- head/contrib/wpa/README Tue Apr 21 01:37:14 2015 (r281805) +++ head/contrib/wpa/README Tue Apr 21 01:45:11 2015 (r281806) @@ -1,7 +1,7 @@ wpa_supplicant and hostapd -------------------------- -Copyright (c) 2002-2012, Jouni Malinen and contributors +Copyright (c) 2002-2015, Jouni Malinen and contributors All Rights Reserved. These programs are licensed under the BSD license (the one with Modified: head/contrib/wpa/hostapd/ChangeLog ============================================================================== --- head/contrib/wpa/hostapd/ChangeLog Tue Apr 21 01:37:14 2015 (r281805) +++ head/contrib/wpa/hostapd/ChangeLog Tue Apr 21 01:45:11 2015 (r281806) @@ -1,5 +1,191 @@ ChangeLog for hostapd +2015-03-15 - v2.4 + * allow OpenSSL cipher configuration to be set for internal EAP server + (openssl_ciphers parameter) + * fixed number of small issues based on hwsim test case failures and + static analyzer reports + * fixed Accounting-Request to not include duplicated Acct-Session-Id + * add support for Acct-Multi-Session-Id in RADIUS Accounting messages + * add support for PMKSA caching with SAE + * add support for generating BSS Load element (bss_load_update_period) + * fixed channel switch from VHT to HT + * add INTERFACE-ENABLED and INTERFACE-DISABLED ctrl_iface events + * add support for learning STA IPv4/IPv6 addresses and configuring + ProxyARP support + * dropped support for the madwifi driver interface + * add support for Suite B (128-bit and 192-bit level) key management and + cipher suites + * fixed a regression with driver=wired + * extend EAPOL-Key msg 1/4 retry workaround for changing SNonce + * add BSS_TM_REQ ctrl_iface command to send BSS Transition Management + Request frames and BSS-TM-RESP event to indicate response to such + frame + * add support for EAP Re-Authentication Protocol (ERP) + * fixed AP IE in EAPOL-Key 3/4 when both WPA and FT was enabled + * fixed a regression in HT 20/40 coex Action frame parsing + * set stdout to be line-buffered + * add support for vendor specific VHT extension to enable 256 QAM rates + (VHT-MCS 8 and 9) on 2.4 GHz band + * RADIUS DAS: + - extend Disconnect-Request processing to allow matching of multiple + sessions + - support Acct-Multi-Session-Id as an identifier + - allow PMKSA cache entry to be removed without association + * expire hostapd STA entry if kernel does not have a matching entry + * allow chanlist to be used to specify a subset of channels for ACS + * improve ACS behavior on 2.4 GHz band and allow channel bias to be + configured with acs_chan_bias parameter + * do not reply to a Probe Request frame that includes DSS Parameter Set + element in which the channel does not match the current operating + channel + * add UPDATE_BEACON ctrl_iface command; this can be used to force Beacon + frame contents to be updated and to start beaconing on an interface + that used start_disabled=1 + * fixed some RADIUS server failover cases + +2014-10-09 - v2.3 + * fixed number of minor issues identified in static analyzer warnings + * fixed DFS and channel switch operation for multi-BSS cases + * started to use constant time comparison for various password and hash + values to reduce possibility of any externally measurable timing + differences + * extended explicit clearing of freed memory and expired keys to avoid + keeping private data in memory longer than necessary + * added support for number of new RADIUS attributes from RFC 7268 + (Mobility-Domain-Id, WLAN-HESSID, WLAN-Pairwise-Cipher, + WLAN-Group-Cipher, WLAN-AKM-Suite, WLAN-Group-Mgmt-Pairwise-Cipher) + * fixed GET_CONFIG wpa_pairwise_cipher value + * added code to clear bridge FDB entry on station disconnection + * fixed PMKSA cache timeout from Session-Timeout for WPA/WPA2 cases + * fixed OKC PMKSA cache entry fetch to avoid a possible infinite loop + in case the first entry does not match + * fixed hostapd_cli action script execution to use more robust mechanism + (CVE-2014-3686) + +2014-06-04 - v2.2 + * fixed SAE confirm-before-commit validation to avoid a potential + segmentation fault in an unexpected message sequence that could be + triggered remotely + * extended VHT support + - Operating Mode Notification + - Power Constraint element (local_pwr_constraint) + - Spectrum management capability (spectrum_mgmt_required=1) + - fix VHT80 segment picking in ACS + - fix vht_capab 'Maximum A-MPDU Length Exponent' handling + - fix VHT20 + * fixed HT40 co-ex scan for some pri/sec channel switches + * extended HT40 co-ex support to allow dynamic channel width changes + during the lifetime of the BSS + * fixed HT40 co-ex support to check for overlapping 20 MHz BSS + * fixed MSCHAP UTF-8 to UCS-2 conversion for three-byte encoding; + this fixes password with include UTF-8 characters that use + three-byte encoding EAP methods that use NtPasswordHash + * reverted TLS certificate validation step change in v2.1 that rejected + any AAA server certificate with id-kp-clientAuth even if + id-kp-serverAuth EKU was included + * fixed STA validation step for WPS ER commands to prevent a potential + crash if an ER sends an unexpected PutWLANResponse to a station that + is disassociated, but not fully removed + * enforce full EAP authentication after RADIUS Disconnect-Request by + removing the PMKSA cache entry + * added support for NAS-IP-Address, NAS-identifier, and NAS-IPv6-Address + in RADIUS Disconnect-Request + * added mechanism for removing addresses for MAC ACLs by prefixing an + entry with "-" + * Interworking/Hotspot 2.0 enhancements + - support Hotspot 2.0 Release 2 + * OSEN network for online signup connection + * subscription remediation (based on RADIUS server request or + control interface HS20_WNM_NOTIF for testing purposes) + * Hotspot 2.0 release number indication in WFA RADIUS VSA + * deauthentication request (based on RADIUS server request or + control interface WNM_DEAUTH_REQ for testing purposes) + * Session Info URL RADIUS AVP to trigger ESS Disassociation Imminent + * hs20_icon config parameter to configure icon files for OSU + * osu_* config parameters for OSU Providers list + - do not use Interworking filtering rules on Probe Request if + Interworking is disabled to avoid interop issues + * added/fixed nl80211 functionality + - AP interface teardown optimization + - support vendor specific driver command + (VENDOR []) + * fixed PMF protection of Deauthentication frame when this is triggered + by session timeout + * internal TLS implementation enhancements/fixes + - add SHA256-based cipher suites + - add DHE-RSA cipher suites + - fix X.509 validation of PKCS#1 signature to check for extra data + * RADIUS server functionality + - add minimal RADIUS accounting server support (hostapd-as-server); + this is mainly to enable testing coverage with hwsim scripts + - allow authentication log to be written into SQLite databse + - added option for TLS protocol testing of an EAP peer by simulating + various misbehaviors/known attacks + - MAC ACL support for testing purposes + * fixed PTK derivation for CCMP-256 and GCMP-256 + * extended WPS per-station PSK to support ER case + * added option to configure the management group cipher + (group_mgmt_cipher=AES-128-CMAC (default), BIP-GMAC-128, BIP-GMAC-256, + BIP-CMAC-256) + * fixed AP mode default TXOP Limit values for AC_VI and AC_VO (these + were rounded incorrectly) + * added support for postponing FT response in case PMK-R1 needs to be + pulled from R0KH + * added option to advertise 40 MHz intolerant HT capability with + ht_capab=[40-INTOLERANT] + * remove WPS 1.0 only support, i.e., WSC 2.0 support is now enabled + whenever CONFIG_WPS=y is set + * EAP-pwd fixes + - fix possible segmentation fault on EAP method deinit if an invalid + group is negotiated + * fixed RADIUS client retransmit/failover behavior + - there was a potential ctash due to freed memory being accessed + - failover to a backup server mechanism did not work properly + * fixed a possible crash on double DISABLE command when multiple BSSes + are enabled + * fixed a memory leak in SAE random number generation + * fixed GTK rekeying when the station uses FT protocol + * fixed off-by-one bounds checking in printf_encode() + - this could result in deinial of service in some EAP server cases + * various bug fixes + +2014-02-04 - v2.1 + * added support for simultaneous authentication of equals (SAE) for + stronger password-based authentication with WPA2-Personal + * added nl80211 functionality + - VHT configuration for nl80211 + - support split wiphy dump + - driver-based MAC ACL + - QoS Mapping configuration + * added fully automated regression testing with mac80211_hwsim + * allow ctrl_iface group to be specified on command line (-G) + * allow single hostapd process to control independent WPS interfaces + (wps_independent=1) instead of synchronized operations through all + configured interfaces within a process + * avoid processing received management frames multiple times when using + nl80211 with multiple BSSes + * added support for DFS (processing radar detection events, CAC, channel + re-selection) + * added EAP-EKE server + * added automatic channel selection (ACS) + * added option for using per-BSS (vif) configuration files with + -b: + * extended global control interface ADD/REMOVE commands to allow BSSes + of a radio to be removed individually without having to add/remove all + other BSSes of the radio at the same time + * added support for sending debug info to Linux tracing (-T on command + line) + * replace dump_file functionality with same information being available + through the hostapd control interface + * added support for using Protected Dual of Public Action frames for + GAS/ANQP exchanges when PMF is enabled + * added support for WPS+NFC updates + - improved protocol + - option to fetch and report alternative carrier records for external + NFC operations + * various bug fixes + 2013-01-12 - v2.0 * added AP-STA-DISCONNECTED ctrl_iface event * improved debug logging (human readable event names, interface name Modified: head/contrib/wpa/hostapd/README ============================================================================== --- head/contrib/wpa/hostapd/README Tue Apr 21 01:37:14 2015 (r281805) +++ head/contrib/wpa/hostapd/README Tue Apr 21 01:45:11 2015 (r281806) @@ -2,7 +2,7 @@ hostapd - user space IEEE 802.11 AP and Authenticator and RADIUS authentication server ================================================================ -Copyright (c) 2002-2012, Jouni Malinen and contributors +Copyright (c) 2002-2015, Jouni Malinen and contributors All Rights Reserved. This program is licensed under the BSD license (the one with @@ -74,12 +74,6 @@ Current hardware/software requirements: Please note that station firmware version needs to be 1.7.0 or newer to work in WPA mode. - madwifi driver for cards based on Atheros chip set (ar521x) - (http://sourceforge.net/projects/madwifi/) - Please note that you will need to add the correct path for - madwifi driver root directory in .config (see defconfig file for - an example: CFLAGS += -I) - mac80211-based drivers that support AP mode (with driver=nl80211). This includes drivers for Atheros (ath9k) and Broadcom (b43) chipsets. Modified: head/contrib/wpa/hostapd/README-WPS ============================================================================== --- head/contrib/wpa/hostapd/README-WPS Tue Apr 21 01:37:14 2015 (r281805) +++ head/contrib/wpa/hostapd/README-WPS Tue Apr 21 01:45:11 2015 (r281806) @@ -58,12 +58,10 @@ hostapd configuration WPS is an optional component that needs to be enabled in hostapd build configuration (.config). Here is an example configuration that -includes WPS support and uses madwifi driver interface: +includes WPS support and uses nl80211 driver interface: -CONFIG_DRIVER_MADWIFI=y -CFLAGS += -I/usr/src/madwifi-0.9.3 +CONFIG_DRIVER_NL80211=y CONFIG_WPS=y -CONFIG_WPS2=y CONFIG_WPS_UPNP=y Following parameter can be used to enable support for NFC config method: @@ -75,8 +73,8 @@ Following section shows an example runti (hostapd.conf) that enables WPS: # Configure the driver and network interface -driver=madwifi -interface=ath0 +driver=nl80211 +interface=wlan0 # WPA2-Personal configuration for the AP ssid=wps-test @@ -338,3 +336,17 @@ If the NFC tag contains a password token internal Registrar. This allows station Enrollee from which the password token was received to run through WPS protocol to provision the credential. + +"nfc_get_handover_sel " command can be used to build the +contents of a Handover Select Message for connection handover when this +does not depend on the contents of the Handover Request Message. The +first argument selects the format of the output data and the second +argument selects which type of connection handover is requested (WPS = +Wi-Fi handover as specified in WSC 2.0). + +"nfc_report_handover WPS +" is used to report completed NFC +connection handover. The first parameter indicates whether the local +device initiated or responded to the connection handover and the carrier +records are the selected carrier from the handover request and select +messages as a hexdump. Modified: head/contrib/wpa/hostapd/config_file.c ============================================================================== --- head/contrib/wpa/hostapd/config_file.c Tue Apr 21 01:37:14 2015 (r281805) +++ head/contrib/wpa/hostapd/config_file.c Tue Apr 21 01:45:11 2015 (r281806) @@ -1,6 +1,6 @@ /* * hostapd / Configuration file parser - * Copyright (c) 2003-2012, Jouni Malinen + * Copyright (c) 2003-2015, Jouni Malinen * * This software may be distributed under the terms of the BSD license. * See README for more details. @@ -22,7 +22,12 @@ #include "config_file.h" -extern struct wpa_driver_ops *wpa_drivers[]; +#ifndef CONFIG_NO_RADIUS +#ifdef EAP_SERVER +static struct hostapd_radius_attr * +hostapd_parse_radius_attr(const char *value); +#endif /* EAP_SERVER */ +#endif /* CONFIG_NO_RADIUS */ #ifndef CONFIG_NO_VLAN @@ -83,7 +88,7 @@ static int hostapd_config_read_vlan_file return -1; } - vlan = os_malloc(sizeof(*vlan)); + vlan = os_zalloc(sizeof(*vlan)); if (vlan == NULL) { wpa_printf(MSG_ERROR, "Out of memory while reading " "VLAN interfaces from '%s'", fname); @@ -91,14 +96,10 @@ static int hostapd_config_read_vlan_file return -1; } - os_memset(vlan, 0, sizeof(*vlan)); vlan->vlan_id = vlan_id; os_strlcpy(vlan->ifname, pos, sizeof(vlan->ifname)); - if (bss->vlan_tail) - bss->vlan_tail->next = vlan; - else - bss->vlan = vlan; - bss->vlan_tail = vlan; + vlan->next = bss->vlan; + bss->vlan = vlan; } fclose(f); @@ -136,6 +137,8 @@ static int hostapd_config_read_maclist(c } while (fgets(buf, sizeof(buf), f)) { + int i, rem = 0; + line++; if (buf[0] == '#') @@ -150,14 +153,32 @@ static int hostapd_config_read_maclist(c } if (buf[0] == '\0') continue; + pos = buf; + if (buf[0] == '-') { + rem = 1; + pos++; + } - if (hwaddr_aton(buf, addr)) { + if (hwaddr_aton(pos, addr)) { wpa_printf(MSG_ERROR, "Invalid MAC address '%s' at " - "line %d in '%s'", buf, line, fname); + "line %d in '%s'", pos, line, fname); fclose(f); return -1; } + if (rem) { + i = 0; + while (i < *num) { + if (os_memcmp((*acl)[i].addr, addr, ETH_ALEN) == + 0) { + os_remove_in_array(*acl, *num, + sizeof(**acl), i); + (*num)--; + } else + i++; + } + continue; + } vlan_id = 0; pos = buf; while (*pos != '\0' && *pos != ' ' && *pos != '\t') @@ -195,7 +216,7 @@ static int hostapd_config_read_eap_user( FILE *f; char buf[512], *pos, *start, *pos2; int line = 0, ret = 0, num_methods; - struct hostapd_eap_user *user, *tail = NULL; + struct hostapd_eap_user *user = NULL, *tail = NULL, *new_user = NULL; if (!fname) return 0; @@ -229,6 +250,28 @@ static int hostapd_config_read_eap_user( if (buf[0] == '\0') continue; +#ifndef CONFIG_NO_RADIUS + if (user && os_strncmp(buf, "radius_accept_attr=", 19) == 0) { + struct hostapd_radius_attr *attr, *a; + attr = hostapd_parse_radius_attr(buf + 19); + if (attr == NULL) { + wpa_printf(MSG_ERROR, "Invalid radius_auth_req_attr: %s", + buf + 19); + user = NULL; /* already in the BSS list */ + goto failed; + } + if (user->accept_attr == NULL) { + user->accept_attr = attr; + } else { + a = user->accept_attr; + while (a->next) + a = a->next; + a->next = attr; + } + continue; + } +#endif /* CONFIG_NO_RADIUS */ + user = NULL; if (buf[0] != '"' && buf[0] != '*') { @@ -323,6 +366,10 @@ static int hostapd_config_read_eap_user( EAP_TTLS_AUTH_MSCHAPV2; goto skip_eap; } + if (os_strcmp(start, "MACACL") == 0) { + user->macacl = 1; + goto skip_eap; + } wpa_printf(MSG_ERROR, "Unsupported EAP type " "'%s' on line %d in '%s'", start, line, fname); @@ -337,7 +384,7 @@ static int hostapd_config_read_eap_user( break; start = pos3; } - if (num_methods == 0 && user->ttls_auth == 0) { + if (num_methods == 0 && user->ttls_auth == 0 && !user->macacl) { wpa_printf(MSG_ERROR, "No EAP types configured on " "line %d in '%s'", line, fname); goto failed; @@ -447,7 +494,7 @@ static int hostapd_config_read_eap_user( done: if (tail == NULL) { - tail = conf->eap_user = user; + tail = new_user = user; } else { tail->next = user; tail = user; @@ -455,17 +502,26 @@ static int hostapd_config_read_eap_user( continue; failed: - if (user) { - os_free(user->password); - os_free(user->identity); - os_free(user); - } + if (user) + hostapd_config_free_eap_user(user); ret = -1; break; } fclose(f); + if (ret == 0) { + user = conf->eap_user; + while (user) { + struct hostapd_eap_user *prev; + + prev = user; + user = user->next; + hostapd_config_free_eap_user(prev); + } + conf->eap_user = new_user; + } + return ret; } #endif /* EAP_SERVER */ @@ -636,6 +692,14 @@ static int hostapd_config_parse_key_mgmt else if (os_strcmp(start, "FT-SAE") == 0) val |= WPA_KEY_MGMT_FT_SAE; #endif /* CONFIG_SAE */ +#ifdef CONFIG_SUITEB + else if (os_strcmp(start, "WPA-EAP-SUITE-B") == 0) + val |= WPA_KEY_MGMT_IEEE8021X_SUITE_B; +#endif /* CONFIG_SUITEB */ +#ifdef CONFIG_SUITEB192 + else if (os_strcmp(start, "WPA-EAP-SUITE-B-192") == 0) + val |= WPA_KEY_MGMT_IEEE8021X_SUITE_B_192; +#endif /* CONFIG_SUITEB192 */ else { wpa_printf(MSG_ERROR, "Line %d: invalid key_mgmt '%s'", line, start); @@ -661,49 +725,12 @@ static int hostapd_config_parse_key_mgmt static int hostapd_config_parse_cipher(int line, const char *value) { - int val = 0, last; - char *start, *end, *buf; - - buf = os_strdup(value); - if (buf == NULL) + int val = wpa_parse_cipher(value); + if (val < 0) { + wpa_printf(MSG_ERROR, "Line %d: invalid cipher '%s'.", + line, value); return -1; - start = buf; - - while (*start != '\0') { - while (*start == ' ' || *start == '\t') - start++; - if (*start == '\0') - break; - end = start; - while (*end != ' ' && *end != '\t' && *end != '\0') - end++; - last = *end == '\0'; - *end = '\0'; - if (os_strcmp(start, "CCMP") == 0) - val |= WPA_CIPHER_CCMP; - else if (os_strcmp(start, "GCMP") == 0) - val |= WPA_CIPHER_GCMP; - else if (os_strcmp(start, "TKIP") == 0) - val |= WPA_CIPHER_TKIP; - else if (os_strcmp(start, "WEP104") == 0) - val |= WPA_CIPHER_WEP104; - else if (os_strcmp(start, "WEP40") == 0) - val |= WPA_CIPHER_WEP40; - else if (os_strcmp(start, "NONE") == 0) - val |= WPA_CIPHER_NONE; - else { - wpa_printf(MSG_ERROR, "Line %d: invalid cipher '%s'.", - line, start); - os_free(buf); - return -1; - } - - if (last) - break; - start = end + 1; } - os_free(buf); - if (val == 0) { wpa_printf(MSG_ERROR, "Line %d: no cipher values configured.", line); @@ -748,14 +775,14 @@ static int hostapd_config_read_wep(struc } -static int hostapd_parse_rates(int **rate_list, char *val) +static int hostapd_parse_intlist(int **int_list, char *val) { int *list; int count; char *pos, *end; - os_free(*rate_list); - *rate_list = NULL; + os_free(*int_list); + *int_list = NULL; pos = val; count = 0; @@ -782,37 +809,39 @@ static int hostapd_parse_rates(int **rat } list[count] = -1; - *rate_list = list; + *int_list = list; return 0; } static int hostapd_config_bss(struct hostapd_config *conf, const char *ifname) { - struct hostapd_bss_config *bss; + struct hostapd_bss_config **all, *bss; if (*ifname == '\0') return -1; - bss = os_realloc_array(conf->bss, conf->num_bss + 1, - sizeof(struct hostapd_bss_config)); - if (bss == NULL) { + all = os_realloc_array(conf->bss, conf->num_bss + 1, + sizeof(struct hostapd_bss_config *)); + if (all == NULL) { wpa_printf(MSG_ERROR, "Failed to allocate memory for " "multi-BSS entry"); return -1; } - conf->bss = bss; + conf->bss = all; - bss = &(conf->bss[conf->num_bss]); - os_memset(bss, 0, sizeof(*bss)); + bss = os_zalloc(sizeof(*bss)); + if (bss == NULL) + return -1; bss->radius = os_zalloc(sizeof(*bss->radius)); if (bss->radius == NULL) { wpa_printf(MSG_ERROR, "Failed to allocate memory for " "multi-BSS RADIUS data"); + os_free(bss); return -1; } - conf->num_bss++; + conf->bss[conf->num_bss++] = bss; conf->last_bss = bss; hostapd_config_defaults_bss(bss); @@ -1060,8 +1089,8 @@ static int hostapd_config_ht_capab(struc conf->ht_capab |= HT_CAP_INFO_MAX_AMSDU_SIZE; if (os_strstr(capab, "[DSSS_CCK-40]")) conf->ht_capab |= HT_CAP_INFO_DSSS_CCK40MHZ; - if (os_strstr(capab, "[PSMP]")) - conf->ht_capab |= HT_CAP_INFO_PSMP_SUPP; + if (os_strstr(capab, "[40-INTOLERANT]")) + conf->ht_capab |= HT_CAP_INFO_40MHZ_INTOLERANT; if (os_strstr(capab, "[LSIG-TXOP-PROT]")) conf->ht_capab |= HT_CAP_INFO_LSIG_TXOP_PROTECT_SUPPORT; @@ -1082,8 +1111,6 @@ static int hostapd_config_vht_capab(stru conf->vht_capab |= VHT_CAP_SUPP_CHAN_WIDTH_160MHZ; if (os_strstr(capab, "[VHT160-80PLUS80]")) conf->vht_capab |= VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ; - if (os_strstr(capab, "[VHT160-80PLUS80]")) - conf->vht_capab |= VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ; if (os_strstr(capab, "[RXLDPC]")) conf->vht_capab |= VHT_CAP_RXLDPC; if (os_strstr(capab, "[SHORT-GI-80]")) @@ -1101,15 +1128,15 @@ static int hostapd_config_vht_capab(stru if (os_strstr(capab, "[RX-STBC-1234]")) conf->vht_capab |= VHT_CAP_RXSTBC_4; if (os_strstr(capab, "[SU-BEAMFORMER]")) - conf->vht_capab |= VHT_CAP_MU_BEAMFORMER_CAPABLE; + conf->vht_capab |= VHT_CAP_SU_BEAMFORMER_CAPABLE; if (os_strstr(capab, "[SU-BEAMFORMEE]")) - conf->vht_capab |= VHT_CAP_MU_BEAMFORMEE_CAPABLE; + conf->vht_capab |= VHT_CAP_SU_BEAMFORMEE_CAPABLE; if (os_strstr(capab, "[BF-ANTENNA-2]") && - (conf->vht_capab & VHT_CAP_MU_BEAMFORMER_CAPABLE)) - conf->vht_capab |= VHT_CAP_BEAMFORMER_ANTENNAS_MAX; + (conf->vht_capab & VHT_CAP_SU_BEAMFORMEE_CAPABLE)) + conf->vht_capab |= (1 << VHT_CAP_BEAMFORMEE_STS_OFFSET); if (os_strstr(capab, "[SOUNDING-DIMENSION-2]") && - (conf->vht_capab & VHT_CAP_MU_BEAMFORMER_CAPABLE)) - conf->vht_capab |= VHT_CAP_SOUNDING_DIMENTION_MAX; + (conf->vht_capab & VHT_CAP_SU_BEAMFORMER_CAPABLE)) + conf->vht_capab |= (1 << VHT_CAP_SOUNDING_DIMENSION_OFFSET); if (os_strstr(capab, "[MU-BEAMFORMER]")) conf->vht_capab |= VHT_CAP_MU_BEAMFORMER_CAPABLE; if (os_strstr(capab, "[MU-BEAMFORMEE]")) @@ -1118,8 +1145,20 @@ static int hostapd_config_vht_capab(stru conf->vht_capab |= VHT_CAP_VHT_TXOP_PS; if (os_strstr(capab, "[HTC-VHT]")) conf->vht_capab |= VHT_CAP_HTC_VHT; - if (os_strstr(capab, "[MAX-A-MPDU-LEN-EXP0]")) - conf->vht_capab |= VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT; + if (os_strstr(capab, "[MAX-A-MPDU-LEN-EXP7]")) + conf->vht_capab |= VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MAX; + else if (os_strstr(capab, "[MAX-A-MPDU-LEN-EXP6]")) + conf->vht_capab |= VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_6; + else if (os_strstr(capab, "[MAX-A-MPDU-LEN-EXP5]")) + conf->vht_capab |= VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_5; + else if (os_strstr(capab, "[MAX-A-MPDU-LEN-EXP4]")) + conf->vht_capab |= VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_4; + else if (os_strstr(capab, "[MAX-A-MPDU-LEN-EXP3]")) + conf->vht_capab |= VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_3; + else if (os_strstr(capab, "[MAX-A-MPDU-LEN-EXP2]")) + conf->vht_capab |= VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_2; + else if (os_strstr(capab, "[MAX-A-MPDU-LEN-EXP1]")) + conf->vht_capab |= VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_1; if (os_strstr(capab, "[VHT-LINK-ADAPT2]") && (conf->vht_capab & VHT_CAP_HTC_VHT)) conf->vht_capab |= VHT_CAP_VHT_LINK_ADAPTATION_VHT_UNSOL_MFB; @@ -1135,141 +1174,6 @@ static int hostapd_config_vht_capab(stru #endif /* CONFIG_IEEE80211AC */ -static int hostapd_config_check_bss(struct hostapd_bss_config *bss, - struct hostapd_config *conf) -{ - if (bss->ieee802_1x && !bss->eap_server && - !bss->radius->auth_servers) { - wpa_printf(MSG_ERROR, "Invalid IEEE 802.1X configuration (no " - "EAP authenticator configured)."); - return -1; - } - - if (bss->wpa && bss->wpa_psk_radius != PSK_RADIUS_IGNORED && - bss->macaddr_acl != USE_EXTERNAL_RADIUS_AUTH) { - wpa_printf(MSG_ERROR, "WPA-PSK using RADIUS enabled, but no " - "RADIUS checking (macaddr_acl=2) enabled."); - return -1; - } - - if (bss->wpa && (bss->wpa_key_mgmt & WPA_KEY_MGMT_PSK) && - bss->ssid.wpa_psk == NULL && bss->ssid.wpa_passphrase == NULL && - bss->ssid.wpa_psk_file == NULL && - (bss->wpa_psk_radius != PSK_RADIUS_REQUIRED || - bss->macaddr_acl != USE_EXTERNAL_RADIUS_AUTH)) { - wpa_printf(MSG_ERROR, "WPA-PSK enabled, but PSK or passphrase " - "is not configured."); - return -1; - } - - if (hostapd_mac_comp_empty(bss->bssid) != 0) { - size_t i; - - for (i = 0; i < conf->num_bss; i++) { - if ((&conf->bss[i] != bss) && - (hostapd_mac_comp(conf->bss[i].bssid, - bss->bssid) == 0)) { - wpa_printf(MSG_ERROR, "Duplicate BSSID " MACSTR - " on interface '%s' and '%s'.", - MAC2STR(bss->bssid), - conf->bss[i].iface, bss->iface); - return -1; - } - } - } - -#ifdef CONFIG_IEEE80211R - if (wpa_key_mgmt_ft(bss->wpa_key_mgmt) && - (bss->nas_identifier == NULL || - os_strlen(bss->nas_identifier) < 1 || - os_strlen(bss->nas_identifier) > FT_R0KH_ID_MAX_LEN)) { - wpa_printf(MSG_ERROR, "FT (IEEE 802.11r) requires " - "nas_identifier to be configured as a 1..48 octet " - "string"); - return -1; - } -#endif /* CONFIG_IEEE80211R */ - -#ifdef CONFIG_IEEE80211N - if (conf->ieee80211n && conf->hw_mode == HOSTAPD_MODE_IEEE80211B) { - bss->disable_11n = 1; - wpa_printf(MSG_ERROR, "HT (IEEE 802.11n) in 11b mode is not " - "allowed, disabling HT capabilites"); - } - - if (conf->ieee80211n && - bss->ssid.security_policy == SECURITY_STATIC_WEP) { - bss->disable_11n = 1; - wpa_printf(MSG_ERROR, "HT (IEEE 802.11n) with WEP is not " - "allowed, disabling HT capabilities"); - } - - if (conf->ieee80211n && bss->wpa && - !(bss->wpa_pairwise & WPA_CIPHER_CCMP) && - !(bss->rsn_pairwise & (WPA_CIPHER_CCMP | WPA_CIPHER_GCMP))) { - bss->disable_11n = 1; - wpa_printf(MSG_ERROR, "HT (IEEE 802.11n) with WPA/WPA2 " - "requires CCMP/GCMP to be enabled, disabling HT " - "capabilities"); - } -#endif /* CONFIG_IEEE80211N */ - -#ifdef CONFIG_WPS2 - if (bss->wps_state && bss->ignore_broadcast_ssid) { - wpa_printf(MSG_INFO, "WPS: ignore_broadcast_ssid " - "configuration forced WPS to be disabled"); - bss->wps_state = 0; - } - - if (bss->wps_state && bss->ssid.wep.keys_set && bss->wpa == 0) { - wpa_printf(MSG_INFO, "WPS: WEP configuration forced WPS to be " - "disabled"); - bss->wps_state = 0; - } - - if (bss->wps_state && bss->wpa && - (!(bss->wpa & 2) || - !(bss->rsn_pairwise & WPA_CIPHER_CCMP))) { - wpa_printf(MSG_INFO, "WPS: WPA/TKIP configuration without " - "WPA2/CCMP forced WPS to be disabled"); - bss->wps_state = 0; - } -#endif /* CONFIG_WPS2 */ - -#ifdef CONFIG_HS20 - if (bss->hs20 && - (!(bss->wpa & 2) || - !(bss->rsn_pairwise & (WPA_CIPHER_CCMP | WPA_CIPHER_GCMP)))) { - wpa_printf(MSG_ERROR, "HS 2.0: WPA2-Enterprise/CCMP " - "configuration is required for Hotspot 2.0 " - "functionality"); - return -1; - } -#endif /* CONFIG_HS20 */ - - return 0; -} - - -static int hostapd_config_check(struct hostapd_config *conf) -{ - size_t i; - - if (conf->ieee80211d && (!conf->country[0] || !conf->country[1])) { - wpa_printf(MSG_ERROR, "Cannot enable IEEE 802.11d without " - "setting the country_code"); - return -1; - } - - for (i = 0; i < conf->num_bss; i++) { - if (hostapd_config_check_bss(&conf->bss[i], conf)) - return -1; - } - - return 0; -} - - #ifdef CONFIG_INTERWORKING static int parse_roaming_consortium(struct hostapd_bss_config *bss, char *pos, int line) @@ -1306,26 +1210,34 @@ static int parse_roaming_consortium(stru static int parse_lang_string(struct hostapd_lang_string **array, unsigned int *count, char *pos) { - char *sep; - size_t clen, nlen; + char *sep, *str = NULL; + size_t clen, nlen, slen; struct hostapd_lang_string *ls; + int ret = -1; + + if (*pos == '"' || (*pos == 'P' && pos[1] == '"')) { + str = wpa_config_parse_string(pos, &slen); + if (!str) + return -1; + pos = str; + } sep = os_strchr(pos, ':'); if (sep == NULL) - return -1; + goto fail; *sep++ = '\0'; clen = os_strlen(pos); - if (clen < 2) - return -1; + if (clen < 2 || clen > sizeof(ls->lang)) + goto fail; nlen = os_strlen(sep); if (nlen > 252) - return -1; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 02:00:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5A980713; Tue, 21 Apr 2015 02:00:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48E3D808; Tue, 21 Apr 2015 02:00:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3L20cja076137; Tue, 21 Apr 2015 02:00:38 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3L20cMd076136; Tue, 21 Apr 2015 02:00:38 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201504210200.t3L20cMd076136@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Tue, 21 Apr 2015 02:00:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281807 - head/usr.sbin/wpa X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 02:00:38 -0000 Author: rpaulo Date: Tue Apr 21 02:00:37 2015 New Revision: 281807 URL: https://svnweb.freebsd.org/changeset/base/281807 Log: Fix wpa/hostapd build without OpenSSL. Modified: head/usr.sbin/wpa/Makefile.crypto Modified: head/usr.sbin/wpa/Makefile.crypto ============================================================================== --- head/usr.sbin/wpa/Makefile.crypto Tue Apr 21 01:45:11 2015 (r281806) +++ head/usr.sbin/wpa/Makefile.crypto Tue Apr 21 02:00:37 2015 (r281807) @@ -53,7 +53,8 @@ SRCS+= tls_openssl.c .endif .if defined(CONFIG_INTERNAL_AES) -SRCS+= aes-internal.c \ +SRCS+= aes-unwrap.c aes-wrap.c \ + aes-internal.c \ aes-internal-dec.c \ aes-internal-enc.c .endif @@ -92,7 +93,7 @@ SRCS+= md4-internal.c .endif .if defined(CONFIG_INTERNAL_MD5) -SRCS+= md5-internal.c +SRCS+= md5.c md5-internal.c .endif .if defined(NEED_FIPS186_2_PRF) From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 02:02:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE495881; Tue, 21 Apr 2015 02:02:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CCA21824; Tue, 21 Apr 2015 02:02:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3L22PKC079207; Tue, 21 Apr 2015 02:02:25 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3L22PR1079206; Tue, 21 Apr 2015 02:02:25 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504210202.t3L22PR1079206@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 21 Apr 2015 02:02:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281808 - head/tools/build X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 02:02:26 -0000 Author: bdrewery Date: Tue Apr 21 02:02:25 2015 New Revision: 281808 URL: https://svnweb.freebsd.org/changeset/base/281808 Log: Pass full path to ldd(1) so it works on files in cwd. Modified: head/tools/build/check-links.sh Modified: head/tools/build/check-links.sh ============================================================================== --- head/tools/build/check-links.sh Tue Apr 21 02:00:37 2015 (r281807) +++ head/tools/build/check-links.sh Tue Apr 21 02:02:25 2015 (r281808) @@ -21,7 +21,7 @@ esac # Gather all symbols from the target unresolved_symbols=$(nm ${DEMANGLE} -D -u --format=posix "$1" | awk '$2 == "U" {print $1}' | tr '\n' ' ') -ldd_libs=$(ldd $1 | awk '{print $1 ":" $3}') +ldd_libs=$(ldd $(realpath $1) | awk '{print $1 ":" $3}') libkey() { libkey="lib_symbols_$1" From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 02:49:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 49A81F7F; Tue, 21 Apr 2015 02:49:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3825CC3D; Tue, 21 Apr 2015 02:49:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3L2njXn013269; Tue, 21 Apr 2015 02:49:45 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3L2njXf013268; Tue, 21 Apr 2015 02:49:45 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504210249.t3L2njXf013268@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 21 Apr 2015 02:49:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281809 - head/release/tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 02:49:45 -0000 Author: gjb Date: Tue Apr 21 02:49:44 2015 New Revision: 281809 URL: https://svnweb.freebsd.org/changeset/base/281809 Log: Simplify variable expansion in attempt to fix the vm-image build. Sponsored by: The FreeBSD Foundation Modified: head/release/tools/vmimage.subr Modified: head/release/tools/vmimage.subr ============================================================================== --- head/release/tools/vmimage.subr Tue Apr 21 02:02:25 2015 (r281808) +++ head/release/tools/vmimage.subr Tue Apr 21 02:49:44 2015 (r281809) @@ -14,9 +14,9 @@ write_partition_layout() { SWAPOPT="-p freebsd-swap/swapfs::1G" fi - _OBJDIR="$(make -C ${WORLDDIR} -V .OBJDIR)" - if [ -d "${_OBJDIR%%/usr/src}/${TARGET}.${TARGET_ARCH}" ]; then - BOOTFILES="${_OBJDIR%%/usr/src}/${TARGET}.${TARGET_ARCH}/usr/src/sys/boot" + _OBJDIR="$(make -C ${WORLDDIR} -V .OBJDIR | tr -d '/usr/src')" + if [ -d "${_OBJDIR}/${TARGET}.${TARGET_ARCH}" ]; then + BOOTFILES="${_OBJDIR}/${TARGET}.${TARGET_ARCH}/usr/src/sys/boot" else BOOTFILES="${_OBJDIR}/usr/src/sys/boot" fi From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 03:06:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7BACA5DA; Tue, 21 Apr 2015 03:06:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69BC8F80; Tue, 21 Apr 2015 03:06:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3L36x3d029616; Tue, 21 Apr 2015 03:06:59 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3L36xAo029615; Tue, 21 Apr 2015 03:06:59 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504210306.t3L36xAo029615@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 21 Apr 2015 03:06:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281810 - head/tools/build X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 03:06:59 -0000 Author: bdrewery Date: Tue Apr 21 03:06:58 2015 New Revision: 281810 URL: https://svnweb.freebsd.org/changeset/base/281810 Log: Revert r281805 for now as it breaks due to spaces in output Modified: head/tools/build/check-links.sh Modified: head/tools/build/check-links.sh ============================================================================== --- head/tools/build/check-links.sh Tue Apr 21 02:49:44 2015 (r281809) +++ head/tools/build/check-links.sh Tue Apr 21 03:06:58 2015 (r281810) @@ -3,10 +3,8 @@ ret=0 CHECK_UNRESOLVED=1 -DEMANGLE= -while getopts "DU" flag; do +while getopts "U" flag; do case "${flag}" in - D) DEMANGLE="-C" ;; U) CHECK_UNRESOLVED=0 ;; esac done @@ -20,7 +18,7 @@ case $mime in esac # Gather all symbols from the target -unresolved_symbols=$(nm ${DEMANGLE} -D -u --format=posix "$1" | awk '$2 == "U" {print $1}' | tr '\n' ' ') +unresolved_symbols=$(nm -D -u --format=posix "$1" | awk '$2 == "U" {print $1}' | tr '\n' ' ') ldd_libs=$(ldd $(realpath $1) | awk '{print $1 ":" $3}') libkey() { @@ -52,7 +50,7 @@ for lib in $(readelf -d $1 | awk '$2 ~ / done list_libs="$list_libs $lib" foundone= - lib_symbols="$(nm ${DEMANGLE} -D --defined-only --format=posix "${libpath}" | awk '$2 ~ /R|D|T|W|B|V/ {print $1}' | tr '\n' ' ')" + lib_symbols="$(nm -D --defined-only --format=posix "${libpath}" | awk '$2 ~ /R|D|T|W|B|V/ {print $1}' | tr '\n' ' ')" if [ ${CHECK_UNRESOLVED} -eq 1 ]; then # Save the global symbols for this lib libkey "${lib}" From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 03:29:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A89259AC; Tue, 21 Apr 2015 03:29:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9653B227; Tue, 21 Apr 2015 03:29:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3L3T4Vc046245; Tue, 21 Apr 2015 03:29:04 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3L3T49n046244; Tue, 21 Apr 2015 03:29:04 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504210329.t3L3T49n046244@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 21 Apr 2015 03:29:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281811 - head/tools/build X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 03:29:04 -0000 Author: bdrewery Date: Tue Apr 21 03:29:03 2015 New Revision: 281811 URL: https://svnweb.freebsd.org/changeset/base/281811 Log: - For executables search for matching (B) global uninitialized BSS symbols from linked libraries. Only do this for BSS symbols that have a size which avoids __bss_start. Without this some libraries would be considered unneeded even though they were providing a B symbol. - Add in the symbols from crt1.o to cover a handful of common unresolved symbols. - Consider (C) common data symbols as provided by libraries/crt1. - Move libkey() function to more appropriate place. Sponsored by: EMC / Isilon Storage Division Modified: head/tools/build/check-links.sh Modified: head/tools/build/check-links.sh ============================================================================== --- head/tools/build/check-links.sh Tue Apr 21 03:06:58 2015 (r281810) +++ head/tools/build/check-links.sh Tue Apr 21 03:29:03 2015 (r281811) @@ -1,6 +1,23 @@ #!/bin/sh # $FreeBSD$ +libkey() { + libkey="lib_symbols_$1" + patterns=[.+,-] + replacement=_ + while :; do + case " ${libkey} " in + *${patterns}*) + libkey="${libkey%%${patterns}*}${replacement}${libkey#*${patterns}}" + ;; + *) + break + ;; + esac + done + return 0 +} + ret=0 CHECK_UNRESOLVED=1 while getopts "U" flag; do @@ -11,33 +28,17 @@ done shift $((OPTIND-1)) mime=$(file -L --mime-type $1) +isbin=0 case $mime in -*application/x-executable);; +*application/x-executable) isbin=1 ;; *application/x-sharedlib);; *) echo "Not an elf file" >&2 ; exit 1;; esac # Gather all symbols from the target -unresolved_symbols=$(nm -D -u --format=posix "$1" | awk '$2 == "U" {print $1}' | tr '\n' ' ') +unresolved_symbols=$(nm -D --format=posix "$1" | awk -v isbin=${isbin} '$2 == "U" || ($2 == "B" && $4 != "" && isbin == 1) {print $1}' | tr '\n' ' ') ldd_libs=$(ldd $(realpath $1) | awk '{print $1 ":" $3}') -libkey() { - libkey="lib_symbols_$1" - patterns=[.+,-] - replacement=_ - while :; do - case " ${libkey} " in - *${patterns}*) - libkey="${libkey%%${patterns}*}${replacement}${libkey#*${patterns}}" - ;; - *) - break - ;; - esac - done - return 0 -} - # Check for useful libs list_libs= resolved_symbols= @@ -50,11 +51,11 @@ for lib in $(readelf -d $1 | awk '$2 ~ / done list_libs="$list_libs $lib" foundone= - lib_symbols="$(nm -D --defined-only --format=posix "${libpath}" | awk '$2 ~ /R|D|T|W|B|V/ {print $1}' | tr '\n' ' ')" + lib_symbols="$(nm -D --defined-only --format=posix "${libpath}" | awk '$2 ~ /C|R|D|T|W|B|V/ {print $1}' | tr '\n' ' ')" if [ ${CHECK_UNRESOLVED} -eq 1 ]; then # Save the global symbols for this lib libkey "${lib}" - setvar "${libkey}" "${lib_symbols}" + setvar "${libkey}" "${lib_symbols}" fi for fct in ${lib_symbols}; do case " ${unresolved_symbols} " in @@ -70,6 +71,14 @@ for lib in $(readelf -d $1 | awk '$2 ~ / done if [ ${CHECK_UNRESOLVED} -eq 1 ]; then + # Add in crt1 symbols + list_libs="${list_libs} crt1.o" + lib_symbols="$(nm --defined-only --format=posix "/usr/lib/crt1.o" | awk '$2 ~ /C|R|D|T|W|B|V/ {print $1}' | tr '\n' ' ')" + # Save the global symbols for this lib + libkey "crt1.o" + setvar "${libkey}" "${lib_symbols}" + + # No search libs for all symbols and report missing ones. for sym in ${unresolved_symbols}; do found=0 for lib in ${list_libs}; do From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 04:40:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D3FAC344; Tue, 21 Apr 2015 04:40:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BDE2BB2C; Tue, 21 Apr 2015 04:40:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3L4eg48001509; Tue, 21 Apr 2015 04:40:42 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3L4ecLY001402; Tue, 21 Apr 2015 04:40:38 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201504210440.t3L4ecLY001402@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Tue, 21 Apr 2015 04:40:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281812 - in head: contrib/bmake contrib/bmake/PSD.doc contrib/bmake/lst.lib contrib/bmake/mk contrib/bmake/unit-tests usr.bin/bmake usr.bin/bmake/unit-tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 04:40:42 -0000 Author: sjg Date: Tue Apr 21 04:40:38 2015 New Revision: 281812 URL: https://svnweb.freebsd.org/changeset/base/281812 Log: Merge bmake-20150418 PR: 199486 Added: head/contrib/bmake/mk/cython.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/mk/cython.mk head/contrib/bmake/mk/manifest.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/mk/manifest.mk head/contrib/bmake/mk/mkopt.sh - copied unchanged from r281761, vendor/NetBSD/bmake/dist/mk/mkopt.sh head/contrib/bmake/mk/whats.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/mk/whats.mk head/contrib/bmake/unit-tests/comment.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/comment.exp head/contrib/bmake/unit-tests/comment.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/comment.mk head/contrib/bmake/unit-tests/cond1.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/cond1.exp head/contrib/bmake/unit-tests/cond1.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/cond1.mk head/contrib/bmake/unit-tests/doterror.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/doterror.exp head/contrib/bmake/unit-tests/doterror.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/doterror.mk head/contrib/bmake/unit-tests/dotwait.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/dotwait.exp head/contrib/bmake/unit-tests/dotwait.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/dotwait.mk head/contrib/bmake/unit-tests/error.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/error.exp head/contrib/bmake/unit-tests/error.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/error.mk head/contrib/bmake/unit-tests/escape.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/escape.exp head/contrib/bmake/unit-tests/escape.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/escape.mk head/contrib/bmake/unit-tests/export-all.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/export-all.exp head/contrib/bmake/unit-tests/export-all.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/export-all.mk head/contrib/bmake/unit-tests/export-env.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/export-env.exp head/contrib/bmake/unit-tests/export-env.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/export-env.mk head/contrib/bmake/unit-tests/export.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/export.exp head/contrib/bmake/unit-tests/export.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/export.mk head/contrib/bmake/unit-tests/forloop.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/forloop.exp head/contrib/bmake/unit-tests/forloop.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/forloop.mk head/contrib/bmake/unit-tests/forsubst.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/forsubst.exp head/contrib/bmake/unit-tests/forsubst.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/forsubst.mk head/contrib/bmake/unit-tests/hash.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/hash.exp head/contrib/bmake/unit-tests/hash.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/hash.mk head/contrib/bmake/unit-tests/impsrc.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/impsrc.exp head/contrib/bmake/unit-tests/impsrc.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/impsrc.mk head/contrib/bmake/unit-tests/misc.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/misc.exp head/contrib/bmake/unit-tests/misc.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/misc.mk head/contrib/bmake/unit-tests/moderrs.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/moderrs.exp head/contrib/bmake/unit-tests/moderrs.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/moderrs.mk head/contrib/bmake/unit-tests/modmatch.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/modmatch.exp head/contrib/bmake/unit-tests/modmatch.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/modmatch.mk head/contrib/bmake/unit-tests/modmisc.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/modmisc.exp head/contrib/bmake/unit-tests/modmisc.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/modmisc.mk head/contrib/bmake/unit-tests/modorder.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/modorder.exp head/contrib/bmake/unit-tests/modorder.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/modorder.mk head/contrib/bmake/unit-tests/modts.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/modts.exp head/contrib/bmake/unit-tests/modts.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/modts.mk head/contrib/bmake/unit-tests/modword.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/modword.exp head/contrib/bmake/unit-tests/modword.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/modword.mk head/contrib/bmake/unit-tests/order.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/order.exp head/contrib/bmake/unit-tests/order.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/order.mk head/contrib/bmake/unit-tests/phony-end.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/phony-end.exp head/contrib/bmake/unit-tests/phony-end.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/phony-end.mk head/contrib/bmake/unit-tests/posix.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/posix.exp head/contrib/bmake/unit-tests/posix.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/posix.mk head/contrib/bmake/unit-tests/posix1.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/posix1.exp head/contrib/bmake/unit-tests/posix1.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/posix1.mk head/contrib/bmake/unit-tests/qequals.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/qequals.exp head/contrib/bmake/unit-tests/qequals.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/qequals.mk head/contrib/bmake/unit-tests/suffixes.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/suffixes.exp head/contrib/bmake/unit-tests/suffixes.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/suffixes.mk head/contrib/bmake/unit-tests/sunshcmd.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/sunshcmd.exp head/contrib/bmake/unit-tests/sunshcmd.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/sunshcmd.mk head/contrib/bmake/unit-tests/sysv.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/sysv.exp head/contrib/bmake/unit-tests/sysv.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/sysv.mk head/contrib/bmake/unit-tests/ternary.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/ternary.exp head/contrib/bmake/unit-tests/ternary.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/ternary.mk head/contrib/bmake/unit-tests/unexport-env.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/unexport-env.exp head/contrib/bmake/unit-tests/unexport-env.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/unexport-env.mk head/contrib/bmake/unit-tests/unexport.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/unexport.exp head/contrib/bmake/unit-tests/unexport.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/unexport.mk head/contrib/bmake/unit-tests/varcmd.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/varcmd.exp head/contrib/bmake/unit-tests/varcmd.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/varcmd.mk head/contrib/bmake/unit-tests/varmisc.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/varmisc.exp head/contrib/bmake/unit-tests/varmisc.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/varmisc.mk head/contrib/bmake/unit-tests/varshell.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/varshell.exp head/contrib/bmake/unit-tests/varshell.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/varshell.mk Deleted: head/contrib/bmake/unit-tests/comment head/contrib/bmake/unit-tests/cond1 head/contrib/bmake/unit-tests/doterror head/contrib/bmake/unit-tests/dotwait head/contrib/bmake/unit-tests/error head/contrib/bmake/unit-tests/export head/contrib/bmake/unit-tests/export-all head/contrib/bmake/unit-tests/export-env head/contrib/bmake/unit-tests/forloop head/contrib/bmake/unit-tests/forsubst head/contrib/bmake/unit-tests/hash head/contrib/bmake/unit-tests/misc head/contrib/bmake/unit-tests/moderrs head/contrib/bmake/unit-tests/modmatch head/contrib/bmake/unit-tests/modmisc head/contrib/bmake/unit-tests/modorder head/contrib/bmake/unit-tests/modts head/contrib/bmake/unit-tests/modword head/contrib/bmake/unit-tests/order head/contrib/bmake/unit-tests/phony-end head/contrib/bmake/unit-tests/posix head/contrib/bmake/unit-tests/qequals head/contrib/bmake/unit-tests/sunshcmd head/contrib/bmake/unit-tests/sysv head/contrib/bmake/unit-tests/ternary head/contrib/bmake/unit-tests/test.exp head/contrib/bmake/unit-tests/unexport head/contrib/bmake/unit-tests/unexport-env head/contrib/bmake/unit-tests/varcmd Modified: head/contrib/bmake/ChangeLog head/contrib/bmake/FILES head/contrib/bmake/Makefile head/contrib/bmake/PSD.doc/Makefile head/contrib/bmake/PSD.doc/tutorial.ms head/contrib/bmake/bmake.1 head/contrib/bmake/bmake.cat1 head/contrib/bmake/compat.c head/contrib/bmake/configure head/contrib/bmake/configure.in head/contrib/bmake/job.c head/contrib/bmake/lst.h head/contrib/bmake/lst.lib/lstInt.h head/contrib/bmake/lst.lib/lstRemove.c head/contrib/bmake/main.c head/contrib/bmake/make.1 head/contrib/bmake/make.c head/contrib/bmake/make.h head/contrib/bmake/meta.c head/contrib/bmake/mk/ChangeLog head/contrib/bmake/mk/FILES head/contrib/bmake/mk/auto.dep.mk head/contrib/bmake/mk/auto.obj.mk head/contrib/bmake/mk/autodep.mk head/contrib/bmake/mk/dep.mk head/contrib/bmake/mk/dirdeps.mk head/contrib/bmake/mk/gendirdeps.mk head/contrib/bmake/mk/install-mk head/contrib/bmake/mk/links.mk head/contrib/bmake/mk/meta.autodep.mk head/contrib/bmake/mk/meta.stage.mk head/contrib/bmake/mk/meta.sys.mk head/contrib/bmake/mk/meta2deps.py head/contrib/bmake/mk/meta2deps.sh head/contrib/bmake/mk/mk-files.txt head/contrib/bmake/mk/own.mk head/contrib/bmake/mk/sys.dependfile.mk head/contrib/bmake/nonints.h head/contrib/bmake/parse.c head/contrib/bmake/suff.c head/contrib/bmake/targ.c head/contrib/bmake/unit-tests/Makefile.in head/contrib/bmake/var.c head/usr.bin/bmake/Makefile head/usr.bin/bmake/unit-tests/Makefile Directory Properties: head/contrib/bmake/ (props changed) Modified: head/contrib/bmake/ChangeLog ============================================================================== --- head/contrib/bmake/ChangeLog Tue Apr 21 03:29:03 2015 (r281811) +++ head/contrib/bmake/ChangeLog Tue Apr 21 04:40:38 2015 (r281812) @@ -1,8 +1,76 @@ +2015-04-18 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20150418 + Merge with NetBSD make, pick up + o job.c: use memmove() rather than memcpy() + + * unit-tests/varshell.mk: SunOS cannot handle the TERMINATED_BY_SIGNAL + case, so skip it. + +2015-04-11 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20150411 + bump version - only mk/ changes. + +2015-04-10 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20150410 + Merge with NetBSD make, pick up + o document different handling of '-' in jobs mode vs compat + o fix jobs mode so that '-' only applies to whole job + when shell lacks hasErrCtl + o meta.c: use separate vars to track lcwd and latestdir (read) + per process + +2015-04-01 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20150401 + Merge with NetBSD make, pick up + o meta.c: close meta file in child + + * Makefile: use BINDIR.bmake if set. + Same for MANDIR and SHAREDIR + Handy for testing release candidates + in various environments. + +2015-03-26 Simon J. Gerraty + + * move initialization of savederr to block where it is used + to avoid spurious warning from gcc5 + +2014-11-11 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20141111 + just a cooler number + +2014-11-05 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20141105 + Merge with NetBSD make, pick up + o revert major overhaul of suffix handling + and POSIX compliance - too much breakage + and impossible to make backwards compatible. + o we still have the new unit test structure which is ok. + o meta.c ensure "-- filemon" is at start of line. + +2014-09-17 Simon J. Gerraty + + * configure.in: test that result of getconf PATH_MAX is numeric + and discard if not. Apparently needed for Hurd. + +2014-08-30 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20140830 + Merge with NetBSD make, pick up + o major overhaul of suffix handling + o improved POSIX compliance + o overhauled unit-tests + 2014-06-20 Simon J. Gerraty * Makefile (MAKE_VERSION): 20140620 Merge with NetBSD make, pick up - o var.c return varNoError rather than var_Error for ::= modidiers. + o var.c return varNoError rather than var_Error for ::= modifiers. 2014-05-22 Simon J. Gerraty Modified: head/contrib/bmake/FILES ============================================================================== --- head/contrib/bmake/FILES Tue Apr 21 03:29:03 2015 (r281811) +++ head/contrib/bmake/FILES Tue Apr 21 04:40:38 2015 (r281812) @@ -92,35 +92,74 @@ targ.c trace.c trace.h unit-tests/Makefile.in -unit-tests/comment -unit-tests/cond1 -unit-tests/doterror -unit-tests/dotwait -unit-tests/error -unit-tests/export -unit-tests/export-all -unit-tests/export-env -unit-tests/forloop -unit-tests/forsubst -unit-tests/hash -unit-tests/misc -unit-tests/moderrs -unit-tests/modmatch -unit-tests/modmisc -unit-tests/modorder -unit-tests/modts -unit-tests/modword -unit-tests/order -unit-tests/phony-end -unit-tests/posix -unit-tests/qequals -unit-tests/sunshcmd -unit-tests/sysv -unit-tests/ternary -unit-tests/test.exp -unit-tests/unexport -unit-tests/unexport-env -unit-tests/varcmd +unit-tests/comment.exp +unit-tests/comment.mk +unit-tests/cond1.exp +unit-tests/cond1.mk +unit-tests/doterror.exp +unit-tests/doterror.mk +unit-tests/dotwait.exp +unit-tests/dotwait.mk +unit-tests/error.exp +unit-tests/error.mk +unit-tests/escape.exp +unit-tests/escape.mk +unit-tests/export-all.exp +unit-tests/export-all.mk +unit-tests/export-env.exp +unit-tests/export-env.mk +unit-tests/export.exp +unit-tests/export.mk +unit-tests/forloop.exp +unit-tests/forloop.mk +unit-tests/forsubst.exp +unit-tests/forsubst.mk +unit-tests/hash.exp +unit-tests/hash.mk +unit-tests/impsrc.exp +unit-tests/impsrc.mk +unit-tests/misc.exp +unit-tests/misc.mk +unit-tests/moderrs.exp +unit-tests/moderrs.mk +unit-tests/modmatch.exp +unit-tests/modmatch.mk +unit-tests/modmisc.exp +unit-tests/modmisc.mk +unit-tests/modorder.exp +unit-tests/modorder.mk +unit-tests/modts.exp +unit-tests/modts.mk +unit-tests/modword.exp +unit-tests/modword.mk +unit-tests/order.exp +unit-tests/order.mk +unit-tests/phony-end.exp +unit-tests/phony-end.mk +unit-tests/posix.exp +unit-tests/posix.mk +unit-tests/posix1.exp +unit-tests/posix1.mk +unit-tests/qequals.exp +unit-tests/qequals.mk +unit-tests/suffixes.exp +unit-tests/suffixes.mk +unit-tests/sunshcmd.exp +unit-tests/sunshcmd.mk +unit-tests/sysv.exp +unit-tests/sysv.mk +unit-tests/ternary.exp +unit-tests/ternary.mk +unit-tests/unexport-env.exp +unit-tests/unexport-env.mk +unit-tests/unexport.exp +unit-tests/unexport.mk +unit-tests/varcmd.exp +unit-tests/varcmd.mk +unit-tests/varmisc.exp +unit-tests/varmisc.mk +unit-tests/varshell.exp +unit-tests/varshell.mk util.c var.c wait.h Modified: head/contrib/bmake/Makefile ============================================================================== --- head/contrib/bmake/Makefile Tue Apr 21 03:29:03 2015 (r281811) +++ head/contrib/bmake/Makefile Tue Apr 21 04:40:38 2015 (r281812) @@ -1,7 +1,7 @@ -# $Id: Makefile,v 1.27 2014/06/20 14:51:54 sjg Exp $ +# $Id: Makefile,v 1.36 2015/04/18 19:58:53 sjg Exp $ # Base version on src date -MAKE_VERSION= 20140620 +MAKE_VERSION= 20150418 PROG= bmake @@ -180,9 +180,9 @@ COPTS.parse.c += -Wno-format-nonliteral COPTS.var.c += -Wno-format-nonliteral # Force these -SHAREDIR= ${prefix}/share -BINDIR= ${prefix}/bin -MANDIR= ${SHAREDIR}/man +SHAREDIR= ${SHAREDIR.bmake:U${prefix}/share} +BINDIR= ${BINDIR.bmake:U${prefix}/bin} +MANDIR= ${MANDIR.bmake:U${SHAREDIR}/man} .if !exists(.depend) ${OBJS}: config.h Modified: head/contrib/bmake/PSD.doc/Makefile ============================================================================== --- head/contrib/bmake/PSD.doc/Makefile Tue Apr 21 03:29:03 2015 (r281811) +++ head/contrib/bmake/PSD.doc/Makefile Tue Apr 21 04:40:38 2015 (r281812) @@ -1,8 +1,10 @@ -# $NetBSD: Makefile,v 1.2 1995/06/14 15:20:23 christos Exp $ +# $NetBSD: Makefile,v 1.4 2014/07/05 19:22:43 dholland Exp $ # @(#)Makefile 8.1 (Berkeley) 8/14/93 -DIR= psd/12.make +SECTION=reference/ref1 +ARTICLE=make SRCS= tutorial.ms MACROS= -ms +EXTRAHTMLFILES=make1.png make2.png .include Modified: head/contrib/bmake/PSD.doc/tutorial.ms ============================================================================== --- head/contrib/bmake/PSD.doc/tutorial.ms Tue Apr 21 03:29:03 2015 (r281811) +++ head/contrib/bmake/PSD.doc/tutorial.ms Tue Apr 21 04:40:38 2015 (r281812) @@ -1,4 +1,4 @@ -.\" $NetBSD: tutorial.ms,v 1.11 2011/08/18 15:19:30 sjg Exp $ +.\" $NetBSD: tutorial.ms,v 1.12 2014/09/30 21:33:14 christos Exp $ .\" Copyright (c) 1988, 1989, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -67,6 +67,16 @@ .\" .EH 'PSD:12-%''PMake \*- A Tutorial' .OH 'PMake \*- A Tutorial''PSD:12-%' +.\" Ix is an indexing macro similar to .IX but I've disabled it for now +.\" Since that would require 2 passes and I am not in the mood for that. +.de Ix +.. +.\" Rd is section (region) define and Rm is region mention? Again disable for +.\" now. +.de Rd +.. +.de Rm +.. .\" xH is a macro to provide numbered headers that are automatically stuffed .\" into a table-of-contents, properly indented, etc. If the first argument .\" is numeric, it is taken as the depth for numbering (as for .NH), else Modified: head/contrib/bmake/bmake.1 ============================================================================== --- head/contrib/bmake/bmake.1 Tue Apr 21 03:29:03 2015 (r281811) +++ head/contrib/bmake/bmake.1 Tue Apr 21 04:40:38 2015 (r281812) @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.229 2014/01/19 10:23:29 apb Exp $ +.\" $NetBSD: make.1,v 1.247 2015/04/10 08:43:32 wiz Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd February 14, 2014 +.Dd April 9, 2015 .Dt MAKE 1 .Os .Sh NAME @@ -209,8 +209,6 @@ Force the option to print raw values of variables. .It Ar v Print debugging information about variable assignment. -.It Ar w -Print entering and leaving directory messages, pre and post processing. .It Ar x Run shell commands with .Fl x @@ -352,6 +350,8 @@ contains a then the value will be expanded before printing. .It Fl W Treat any warnings during makefile parsing as errors. +.It Fl w +Print entering and leaving directory messages, pre and post processing. .It Fl X Don't export variables passed on the command line to the environment individually. @@ -441,17 +441,29 @@ The value need not necessarily be used to describe existing files. Expansion is in directory order, not alphabetically as done in the shell. .Sh SHELL COMMANDS -Each target may have associated with it a series of shell commands, normally +Each target may have associated with it one or more lines of shell +commands, normally used to create the target. -Each of the commands in this script +Each of the lines in this script .Em must be preceded by a tab. -While any target may appear on a dependency line, only one of these -dependencies may be followed by a creation script, unless the +(For historical reasons, spaces are not accepted.) +While targets can appear in many dependency lines if desired, by +default only one of these rules may be followed by a creation +script. +If the .Ql Ic \&:: -operator is used. +operator is used, however, all rules may include scripts and the +scripts are executed in the order found. .Pp -If the first characters of the command line are any combination of +Each line is treated as a separate shell command, unless the end of +line is escaped with a backslash +.Pq Ql \e +in which case that line and the next are combined. +.\" The escaped newline is retained and passed to the shell, which +.\" normally ignores it. +.\" However, the tab at the beginning of the following line is removed. +If the first characters of the command are any combination of .Ql Ic @ , .Ql Ic + , or @@ -469,6 +481,7 @@ This is similar to the effect of the .MA except that the effect can be limited to a single line of a script. A .Ql Ic \- +in compatibility mode causes any non-zero exit status of the command line to be ignored. .Pp When @@ -477,22 +490,21 @@ is run in jobs mode with .Fl j Ar max_jobs , the entire script for the target is fed to a single instance of the shell. -.Pp In compatibility (non-jobs) mode, each command is run in a separate process. If the command contains any shell meta characters .Pq Ql #=|^(){};&<>*?[]:$`\e\en -it will be passed to the shell, otherwise +it will be passed to the shell; otherwise .Nm will attempt direct execution. -.Pp -Since -.Nm -will -.Xr chdir 2 -to -.Ql Va .OBJDIR -before executing any targets, each child process -starts with that as its current working directory. +If a line starts with +.Ql Ic \- +and the shell has ErrCtl enabled then failure of the command line +will be ignored as in compatibility mode. +Otherwise +.Ql Ic \- +affects the entire job; +the script will stop at the first command line that fails, +but the target will not be deemed to have failed. .Pp Makefiles should be written so that the mode of .Nm @@ -500,20 +512,32 @@ operation does not change their behavior For example, any command which needs to use .Dq cd or -.Dq chdir , -without side-effect should be put in parenthesis: +.Dq chdir +without potentially changing the directory for subsequent commands +should be put in parentheses so it executes in a subshell. +To force the use of one shell, escape the line breaks so as to make +the whole script one command. +For example: .Bd -literal -offset indent - avoid-chdir-side-effects: @echo Building $@ in `pwd` - @(cd ${.CURDIR} && ${.MAKE} $@) + @(cd ${.CURDIR} && ${MAKE} $@) @echo Back in `pwd` ensure-one-shell-regardless-of-mode: - @echo Building $@ in `pwd`; \\ - (cd ${.CURDIR} && ${.MAKE} $@); \\ + @echo Building $@ in `pwd`; \e + (cd ${.CURDIR} && ${MAKE} $@); \e echo Back in `pwd` .Ed +.Pp +Since +.Nm +will +.Xr chdir 2 +to +.Ql Va .OBJDIR +before executing any targets, each child process +starts with that as its current working directory. .Sh VARIABLE ASSIGNMENTS Variables in make are much like variables in the shell, and, by tradition, consist of all upper-case letters. @@ -624,13 +648,19 @@ Variables defined in the makefile or in Variables defined as part of the command line. .It Local variables Variables that are defined specific to a certain target. +.El +.Pp +Local variables are all built in and their values vary magically from +target to target. +It is not currently possible to define new local variables. The seven local variables are as follows: -.Bl -tag -width ".ARCHIVE" +.Bl -tag -width ".ARCHIVE" -offset indent .It Va .ALLSRC The list of all sources for this target; also known as .Ql Va \&\*[Gt] . .It Va .ARCHIVE -The name of the archive file. +The name of the archive file; also known as +.Ql Va \&! . .It Va .IMPSRC In suffix-transformation rules, the name/path of the source from which the target is to be transformed (the @@ -639,7 +669,8 @@ source); also known as .Ql Va \&\*[Lt] . It is not defined in explicit rules. .It Va .MEMBER -The name of the archive member. +The name of the archive member; also known as +.Ql Va % . .It Va .OODATE The list of sources for this target that were deemed out-of-date; also known as @@ -648,31 +679,41 @@ known as The file prefix of the target, containing only the file portion, no suffix or preceding directory components; also known as .Ql Va * . +The suffix must be one of the known suffixes declared with +.Ic .SUFFIXES +or it will not be recognized. .It Va .TARGET The name of the target; also known as .Ql Va @ . .El .Pp The shorter forms -.Ql Va @ , +.Ql ( Va \*[Gt] , +.Ql Va \&! , +.Ql Va \*[Lt] , +.Ql Va % , .Ql Va \&? , -.Ql Va \&\*[Lt] , -.Ql Va \&\*[Gt] , +.Ql Va * , and -.Ql Va * +.Ql Va @ ) are permitted for backward -compatibility with historical makefiles and are not recommended. -The six variables -.Ql Va "@F" , -.Ql Va "@D" , -.Ql Va "\*[Lt]F" , -.Ql Va "\*[Lt]D" , -.Ql Va "*F" , +compatibility with historical makefiles and legacy POSIX make and are +not recommended. +.Pp +Variants of these variables with the punctuation followed immediately by +.Ql D +or +.Ql F , +e.g. +.Ql Va $(@D) , +are legacy forms equivalent to using the +.Ql :H and -.Ql Va "*D" -are permitted for compatibility with +.Ql :T +modifiers. +These forms are accepted for compatibility with .At V -makefiles and are not recommended. +makefiles and POSIX but are not recommended. .Pp Four of the local variables may be used in sources on dependency lines because they expand to the proper value for each target on the line. @@ -682,7 +723,6 @@ These variables are .Ql Va .ARCHIVE , and .Ql Va .MEMBER . -.El .Ss Additional built-in variables In addition, .Nm @@ -2119,19 +2159,87 @@ system makefile system makefile directory .El .Sh COMPATIBILITY -The basic make syntax is compatible between different versions of make, +The basic make syntax is compatible between different versions of make; however the special variables, variable modifiers and conditionals are not. -.Pp -The way that parallel makes are scheduled changed in -NetBSD 4.0 -so that .ORDER and .WAIT apply recursively to the dependent nodes. -The algorithms used may change again in the future. +.Ss Older versions +An incomplete list of changes in older versions of +.Nm : .Pp The way that .for loop variables are substituted changed after NetBSD 5.0 so that they still appear to be variable expansions. In particular this stops them being treated as syntax, and removes some obscure problems using them in .if statements. +.Pp +The way that parallel makes are scheduled changed in +NetBSD 4.0 +so that .ORDER and .WAIT apply recursively to the dependent nodes. +The algorithms used may change again in the future. +.Ss Other make dialects +Other make dialects (GNU make, SVR4 make, POSIX make, etc.) do not +support most of the features of +.Nm +as described in this manual. +Most notably: +.Bl -bullet -offset indent +.It +The +.Ic .WAIT +and +.Ic .ORDER +declarations and most functionality pertaining to parallelization. +(GNU make supports parallelization but lacks these features needed to +control it effectively.) +.It +Directives, including for loops and conditionals and most of the +forms of include files. +(GNU make has its own incompatible and less powerful syntax for +conditionals.) +.It +All built-in variables that begin with a dot. +.It +Most of the special sources and targets that begin with a dot, +with the notable exception of +.Ic .PHONY , +.Ic .PRECIOUS , +and +.Ic .SUFFIXES . +.It +Variable modifiers, except for the +.Dl :old=new +string substitution, which does not portably support globbing with +.Ql % +and historically only works on declared suffixes. +.It +The +.Ic $> +variable even in its short form; most makes support this functionality +but its name varies. +.El +.Pp +Some features are somewhat more portable, such as assignment with +.Ic += , +.Ic ?= , +and +.Ic != . +The +.Ic .PATH +functionality is based on an older feature +.Ic VPATH +found in GNU make and many versions of SVR4 make; however, +historically its behavior is too ill-defined (and too buggy) to rely +upon. +.Pp +The +.Ic $@ +and +.Ic $< +variables are more or less universally portable, as is the +.Ic $(MAKE) +variable. +Basic use of suffix rules (for files only in the current directory, +not trying to chain transformations together, etc.) is also reasonably +portable. .Sh SEE ALSO .Xr mkdep 1 .Sh HISTORY Modified: head/contrib/bmake/bmake.cat1 ============================================================================== --- head/contrib/bmake/bmake.cat1 Tue Apr 21 03:29:03 2015 (r281811) +++ head/contrib/bmake/bmake.cat1 Tue Apr 21 04:40:38 2015 (r281812) @@ -122,9 +122,6 @@ DDEESSCCRRIIPPTTIIOONN _v Print debugging information about variable assignment. - _w Print entering and leaving directory messages, pre and - post processing. - _x Run shell commands with --xx so the actual commands are printed as they are executed. @@ -221,6 +218,9 @@ DDEESSCCRRIIPPTTIIOONN --WW Treat any warnings during makefile parsing as errors. + --ww Print entering and leaving directory messages, pre and post pro- + cessing. + --XX Don't export variables passed on the command line to the environ- ment individually. Variables passed on the command line are still exported via the _M_A_K_E_F_L_A_G_S environment variable. This @@ -273,46 +273,55 @@ FFIILLEE DDEEPPEENNDDEENNCC done in the shell. SSHHEELLLL CCOOMMMMAANNDDSS - Each target may have associated with it a series of shell commands, nor- - mally used to create the target. Each of the commands in this script - _m_u_s_t be preceded by a tab. While any target may appear on a dependency - line, only one of these dependencies may be followed by a creation - script, unless the `::::' operator is used. - - If the first characters of the command line are any combination of `@@', - `++', or `--', the command is treated specially. A `@@' causes the command - not to be echoed before it is executed. A `++' causes the command to be - executed even when --nn is given. This is similar to the effect of the - .MAKE special source, except that the effect can be limited to a single - line of a script. A `--' causes any non-zero exit status of the command - line to be ignored. + Each target may have associated with it one or more lines of shell com- + mands, normally used to create the target. Each of the lines in this + script _m_u_s_t be preceded by a tab. (For historical reasons, spaces are + not accepted.) While targets can appear in many dependency lines if + desired, by default only one of these rules may be followed by a creation + script. If the `::::' operator is used, however, all rules may include + scripts and the scripts are executed in the order found. + + Each line is treated as a separate shell command, unless the end of line + is escaped with a backslash (`\') in which case that line and the next + are combined. If the first characters of the command are any combination + of `@@', `++', or `--', the command is treated specially. A `@@' causes the + command not to be echoed before it is executed. A `++' causes the command + to be executed even when --nn is given. This is similar to the effect of + the .MAKE special source, except that the effect can be limited to a sin- + gle line of a script. A `--' in compatibility mode causes any non-zero + exit status of the command line to be ignored. When bbmmaakkee is run in jobs mode with --jj _m_a_x___j_o_b_s, the entire script for - the target is fed to a single instance of the shell. - - In compatibility (non-jobs) mode, each command is run in a separate - process. If the command contains any shell meta characters - (`#=|^(){};&<>*?[]:$`\\n') it will be passed to the shell, otherwise - bbmmaakkee will attempt direct execution. - - Since bbmmaakkee will chdir(2) to `_._O_B_J_D_I_R' before executing any targets, each - child process starts with that as its current working directory. + the target is fed to a single instance of the shell. In compatibility + (non-jobs) mode, each command is run in a separate process. If the com- + mand contains any shell meta characters (`#=|^(){};&<>*?[]:$`\\n') it + will be passed to the shell; otherwise bbmmaakkee will attempt direct execu- + tion. If a line starts with `--' and the shell has ErrCtl enabled then + failure of the command line will be ignored as in compatibility mode. + Otherwise `--' affects the entire job; the script will stop at the first + command line that fails, but the target will not be deemed to have + failed. Makefiles should be written so that the mode of bbmmaakkee operation does not change their behavior. For example, any command which needs to use - ``cd'' or ``chdir'', without side-effect should be put in parenthesis: - + ``cd'' or ``chdir'' without potentially changing the directory for subse- + quent commands should be put in parentheses so it executes in a subshell. + To force the use of one shell, escape the line breaks so as to make the + whole script one command. For example: avoid-chdir-side-effects: @echo Building $@ in `pwd` - @(cd ${.CURDIR} && ${.MAKE} $@) + @(cd ${.CURDIR} && ${MAKE} $@) @echo Back in `pwd` ensure-one-shell-regardless-of-mode: @echo Building $@ in `pwd`; \ - (cd ${.CURDIR} && ${.MAKE} $@); \ + (cd ${.CURDIR} && ${MAKE} $@); \ echo Back in `pwd` + Since bbmmaakkee will chdir(2) to `_._O_B_J_D_I_R' before executing any targets, each + child process starts with that as its current working directory. + VVAARRIIAABBLLEE AASSSSIIGGNNMMEENNTTSS Variables in make are much like variables in the shell, and, by tradi- tion, consist of all upper-case letters. @@ -402,40 +411,47 @@ VVAARRIIAABBLLEE AASSSSIIGG Variables defined as part of the command line. Local variables - Variables that are defined specific to a certain target. The - seven local variables are as follows: + Variables that are defined specific to a certain target. - _._A_L_L_S_R_C The list of all sources for this target; also known as - `_>'. + Local variables are all built in and their values vary magically from + target to target. It is not currently possible to define new local vari- + ables. The seven local variables are as follows: - _._A_R_C_H_I_V_E The name of the archive file. + _._A_L_L_S_R_C The list of all sources for this target; also known as + `_>'. - _._I_M_P_S_R_C In suffix-transformation rules, the name/path of the - source from which the target is to be transformed (the - ``implied'' source); also known as `_<'. It is not - defined in explicit rules. + _._A_R_C_H_I_V_E The name of the archive file; also known as `_!'. - _._M_E_M_B_E_R The name of the archive member. + _._I_M_P_S_R_C In suffix-transformation rules, the name/path of the + source from which the target is to be transformed (the + ``implied'' source); also known as `_<'. It is not + defined in explicit rules. - _._O_O_D_A_T_E The list of sources for this target that were deemed - out-of-date; also known as `_?'. + _._M_E_M_B_E_R The name of the archive member; also known as `_%'. - _._P_R_E_F_I_X The file prefix of the target, containing only the file - portion, no suffix or preceding directory components; - also known as `_*'. + _._O_O_D_A_T_E The list of sources for this target that were deemed out- + of-date; also known as `_?'. - _._T_A_R_G_E_T The name of the target; also known as `_@'. + _._P_R_E_F_I_X The file prefix of the target, containing only the file + portion, no suffix or preceding directory components; + also known as `_*'. The suffix must be one of the known + suffixes declared with ..SSUUFFFFIIXXEESS or it will not be recog- + nized. - The shorter forms `_@', `_?', `_<', `_>', and `_*' are permitted for - backward compatibility with historical makefiles and are not rec- - ommended. The six variables `_@_F', `_@_D', `_<_F', `_<_D', `_*_F', and - `_*_D' are permitted for compatibility with AT&T System V UNIX - makefiles and are not recommended. + _._T_A_R_G_E_T The name of the target; also known as `_@'. - Four of the local variables may be used in sources on dependency - lines because they expand to the proper value for each target on - the line. These variables are `_._T_A_R_G_E_T', `_._P_R_E_F_I_X', `_._A_R_C_H_I_V_E', - and `_._M_E_M_B_E_R'. + The shorter forms (`_>', `_!', `_<', `_%', `_?', `_*', and `_@') are permitted + for backward compatibility with historical makefiles and legacy POSIX + make and are not recommended. + + Variants of these variables with the punctuation followed immediately by + `D' or `F', e.g. `_$_(_@_D_)', are legacy forms equivalent to using the `:H' + and `:T' modifiers. These forms are accepted for compatibility with AT&T + System V UNIX makefiles and POSIX but are not recommended. + + Four of the local variables may be used in sources on dependency lines + because they expand to the proper value for each target on the line. + These variables are `_._T_A_R_G_E_T', `_._P_R_E_F_I_X', `_._A_R_C_H_I_V_E', and `_._M_E_M_B_E_R'. AAddddiittiioonnaall bbuuiilltt--iinn vvaarriiaabblleess In addition, bbmmaakkee sets or knows about the following variables: @@ -1356,19 +1372,58 @@ FFIILLEESS /usr/share/mk system makefile directory CCOOMMPPAATTIIBBIILLIITTYY - The basic make syntax is compatible between different versions of make, + The basic make syntax is compatible between different versions of make; however the special variables, variable modifiers and conditionals are not. - The way that parallel makes are scheduled changed in NetBSD 4.0 so that - .ORDER and .WAIT apply recursively to the dependent nodes. The algo- - rithms used may change again in the future. + OOllddeerr vveerrssiioonnss + An incomplete list of changes in older versions of bbmmaakkee: The way that .for loop variables are substituted changed after NetBSD 5.0 so that they still appear to be variable expansions. In particular this stops them being treated as syntax, and removes some obscure problems using them in .if statements. + The way that parallel makes are scheduled changed in NetBSD 4.0 so that + .ORDER and .WAIT apply recursively to the dependent nodes. The algo- + rithms used may change again in the future. + + OOtthheerr mmaakkee ddiiaalleeccttss + Other make dialects (GNU make, SVR4 make, POSIX make, etc.) do not sup- + port most of the features of bbmmaakkee as described in this manual. Most + notably: + + ++oo The ..WWAAIITT and ..OORRDDEERR declarations and most functionality per- + taining to parallelization. (GNU make supports parallelization + but lacks these features needed to control it effectively.) + + ++oo Directives, including for loops and conditionals and most of + the forms of include files. (GNU make has its own incompatible + and less powerful syntax for conditionals.) + + ++oo All built-in variables that begin with a dot. + + ++oo Most of the special sources and targets that begin with a dot, + with the notable exception of ..PPHHOONNYY, ..PPRREECCIIOOUUSS, and ..SSUUFFFFIIXXEESS. + + ++oo Variable modifiers, except for the + :old=new + string substitution, which does not portably support globbing + with `%' and historically only works on declared suffixes. + + ++oo The $$>> variable even in its short form; most makes support this + functionality but its name varies. + + Some features are somewhat more portable, such as assignment with ++==, ??==, + and !!==. The ..PPAATTHH functionality is based on an older feature VVPPAATTHH found + in GNU make and many versions of SVR4 make; however, historically its + behavior is too ill-defined (and too buggy) to rely upon. + + The $$@@ and $$<< variables are more or less universally portable, as is the + $$((MMAAKKEE)) variable. Basic use of suffix rules (for files only in the cur- + rent directory, not trying to chain transformations together, etc.) is + also reasonably portable. + SSEEEE AALLSSOO mkdep(1) @@ -1394,4 +1449,4 @@ BBUUGGSS There is no way of escaping a space character in a filename. -NetBSD 5.1 February 14, 2014 NetBSD 5.1 +NetBSD 5.1 April 9, 2015 NetBSD 5.1 Modified: head/contrib/bmake/compat.c ============================================================================== --- head/contrib/bmake/compat.c Tue Apr 21 03:29:03 2015 (r281811) +++ head/contrib/bmake/compat.c Tue Apr 21 04:40:38 2015 (r281812) @@ -1,4 +1,4 @@ -/* $NetBSD: compat.c,v 1.94 2014/01/03 00:02:01 sjg Exp $ */ +/* $NetBSD: compat.c,v 1.96 2014/09/07 20:55:34 joerg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: compat.c,v 1.94 2014/01/03 00:02:01 sjg Exp $"; +static char rcsid[] = "$NetBSD: compat.c,v 1.96 2014/09/07 20:55:34 joerg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)compat.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: compat.c,v 1.94 2014/01/03 00:02:01 sjg Exp $"); +__RCSID("$NetBSD: compat.c,v 1.96 2014/09/07 20:55:34 joerg Exp $"); #endif #endif /* not lint */ #endif Modified: head/contrib/bmake/configure ============================================================================== Binary file (source and/or target). No diff available. Modified: head/contrib/bmake/configure.in ============================================================================== --- head/contrib/bmake/configure.in Tue Apr 21 03:29:03 2015 (r281811) +++ head/contrib/bmake/configure.in Tue Apr 21 04:40:38 2015 (r281812) @@ -1,6 +1,6 @@ dnl dnl RCSid: -dnl $Id: configure.in,v 1.52 2014/02/15 22:27:59 sjg Exp $ +dnl $Id: configure.in,v 1.53 2014/11/06 01:49:40 sjg Exp $ dnl dnl Process this file with autoconf to produce a configure script dnl @@ -82,6 +82,8 @@ dnl dnl Hurd refuses to define PATH_MAX or MAXPATHLEN if test -x /usr/bin/getconf; then bmake_path_max=`getconf PATH_MAX / 2> /dev/null` + # only a numeric response is useful + test ${bmake_path_max:-0} -gt 0 2> /dev/null || bmake_path_max= fi bmake_path_max=${bmake_path_max:-1024} if test $bmake_path_max -gt 1024; then Modified: head/contrib/bmake/job.c ============================================================================== --- head/contrib/bmake/job.c Tue Apr 21 03:29:03 2015 (r281811) +++ head/contrib/bmake/job.c Tue Apr 21 04:40:38 2015 (r281812) @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.176 2013/08/04 16:48:15 sjg Exp $ */ +/* $NetBSD: job.c,v 1.180 2015/04/16 13:31:03 joerg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: job.c,v 1.176 2013/08/04 16:48:15 sjg Exp $"; +static char rcsid[] = "$NetBSD: job.c,v 1.180 2015/04/16 13:31:03 joerg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: job.c,v 1.176 2013/08/04 16:48:15 sjg Exp $"); +__RCSID("$NetBSD: job.c,v 1.180 2015/04/16 13:31:03 joerg Exp $"); #endif #endif /* not lint */ #endif @@ -744,7 +744,6 @@ JobPrintCommand(void *cmdp, void *jobp) shutUp = DEBUG(LOUD) ? FALSE : TRUE; break; case '-': - job->flags |= JOB_IGNERR; errOff = TRUE; break; case '+': @@ -823,6 +822,7 @@ JobPrintCommand(void *cmdp, void *jobp) * to ignore errors. Set cmdTemplate to use the weirdness * instead of the simple "%s\n" template. */ + job->flags |= JOB_IGNERR; if (!(job->flags & JOB_SILENT) && !shutUp) { if (commandShell->hasEchoCtl) { DBPRINTF("%s\n", commandShell->echoOff); @@ -1376,7 +1376,8 @@ JobExec(Job *job, char **argv) (void)fcntl(0, F_SETFD, 0); (void)lseek(0, (off_t)0, SEEK_SET); - if (Always_pass_job_queue || (job->node->type & OP_MAKE)) { + if (Always_pass_job_queue || + (job->node->type & (OP_MAKE | OP_SUBMAKE))) { /* * Pass job token pipe to submakes. */ @@ -1910,16 +1911,16 @@ end_loop: (void)fflush(stdout); } } - if (i < max - 1) { - /* shift the remaining characters down */ - (void)memcpy(job->outBuf, &job->outBuf[i + 1], max - (i + 1)); + /* + * max is the last offset still in the buffer. Move any remaining + * characters to the start of the buffer and update the end marker + * curPos. + */ + if (i < max) { + (void)memmove(job->outBuf, &job->outBuf[i + 1], max - (i + 1)); job->curPos = max - (i + 1); - } else { - /* - * We have written everything out, so we just start over - * from the start of the buffer. No copying. No nothing. - */ + assert(i == max); job->curPos = 0; } } Modified: head/contrib/bmake/lst.h ============================================================================== --- head/contrib/bmake/lst.h Tue Apr 21 03:29:03 2015 (r281811) +++ head/contrib/bmake/lst.h Tue Apr 21 04:40:38 2015 (r281812) @@ -1,4 +1,4 @@ -/* $NetBSD: lst.h,v 1.18 2009/01/23 21:58:27 dsl Exp $ */ +/* $NetBSD: lst.h,v 1.20 2014/09/07 20:55:34 joerg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. Modified: head/contrib/bmake/lst.lib/lstInt.h ============================================================================== --- head/contrib/bmake/lst.lib/lstInt.h Tue Apr 21 03:29:03 2015 (r281811) +++ head/contrib/bmake/lst.lib/lstInt.h Tue Apr 21 04:40:38 2015 (r281812) @@ -1,4 +1,4 @@ -/* $NetBSD: lstInt.h,v 1.20 2009/01/24 14:43:29 dsl Exp $ */ +/* $NetBSD: lstInt.h,v 1.22 2014/09/07 20:55:34 joerg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 Modified: head/contrib/bmake/lst.lib/lstRemove.c ============================================================================== --- head/contrib/bmake/lst.lib/lstRemove.c Tue Apr 21 03:29:03 2015 (r281811) +++ head/contrib/bmake/lst.lib/lstRemove.c Tue Apr 21 04:40:38 2015 (r281812) @@ -1,4 +1,4 @@ -/* $NetBSD: lstRemove.c,v 1.14 2008/12/13 15:19:29 dsl Exp $ */ +/* $NetBSD: lstRemove.c,v 1.16 2014/09/07 20:55:34 joerg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -33,14 +33,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: lstRemove.c,v 1.14 2008/12/13 15:19:29 dsl Exp $"; +static char rcsid[] = "$NetBSD: lstRemove.c,v 1.16 2014/09/07 20:55:34 joerg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)lstRemove.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: lstRemove.c,v 1.14 2008/12/13 15:19:29 dsl Exp $"); +__RCSID("$NetBSD: lstRemove.c,v 1.16 2014/09/07 20:55:34 joerg Exp $"); #endif #endif /* not lint */ #endif Modified: head/contrib/bmake/main.c ============================================================================== --- head/contrib/bmake/main.c Tue Apr 21 03:29:03 2015 (r281811) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 05:10:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 43B897EB; Tue, 21 Apr 2015 05:10:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32241FC1; Tue, 21 Apr 2015 05:10:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3L5AJqF026023; Tue, 21 Apr 2015 05:10:19 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3L5AJg6026022; Tue, 21 Apr 2015 05:10:19 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504210510.t3L5AJg6026022@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 21 Apr 2015 05:10:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281813 - head/tools/build X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 05:10:19 -0000 Author: bdrewery Date: Tue Apr 21 05:10:18 2015 New Revision: 281813 URL: https://svnweb.freebsd.org/changeset/base/281813 Log: Support libraries linked by path. Sponsored by: EMC / Isilon Storage Division Modified: head/tools/build/check-links.sh Modified: head/tools/build/check-links.sh ============================================================================== --- head/tools/build/check-links.sh Tue Apr 21 04:40:38 2015 (r281812) +++ head/tools/build/check-links.sh Tue Apr 21 05:10:18 2015 (r281813) @@ -3,7 +3,7 @@ libkey() { libkey="lib_symbols_$1" - patterns=[.+,-] + patterns=[.+,/-] replacement=_ while :; do case " ${libkey} " in @@ -44,11 +44,15 @@ list_libs= resolved_symbols= for lib in $(readelf -d $1 | awk '$2 ~ /\(?NEEDED\)?/ { sub(/\[/,"",$NF); sub(/\]/,"",$NF); print $NF }'); do echo -n "checking if $lib is needed: " - for libpair in ${ldd_libs}; do - case "${libpair}" in - ${lib}:*) libpath="${libpair#*:}" && break ;; - esac - done + if [ -n "${lib##/*}" ]; then + for libpair in ${ldd_libs}; do + case "${libpair}" in + ${lib}:*) libpath="${libpair#*:}" && break ;; + esac + done + else + libpath="${lib}" + fi list_libs="$list_libs $lib" foundone= lib_symbols="$(nm -D --defined-only --format=posix "${libpath}" | awk '$2 ~ /C|R|D|T|W|B|V/ {print $1}' | tr '\n' ' ')" From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 05:41:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B237DD6B; Tue, 21 Apr 2015 05:41:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A0082133C; Tue, 21 Apr 2015 05:41:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3L5fv6S055117; Tue, 21 Apr 2015 05:41:57 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3L5fv5F055116; Tue, 21 Apr 2015 05:41:57 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504210541.t3L5fv5F055116@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 21 Apr 2015 05:41:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281814 - head/tools/build X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 05:41:57 -0000 Author: bdrewery Date: Tue Apr 21 05:41:56 2015 New Revision: 281814 URL: https://svnweb.freebsd.org/changeset/base/281814 Log: Tweak BSS symbol handling from r281811 to not consider them unresolved Modified: head/tools/build/check-links.sh Modified: head/tools/build/check-links.sh ============================================================================== --- head/tools/build/check-links.sh Tue Apr 21 05:10:18 2015 (r281813) +++ head/tools/build/check-links.sh Tue Apr 21 05:41:56 2015 (r281814) @@ -36,7 +36,8 @@ case $mime in esac # Gather all symbols from the target -unresolved_symbols=$(nm -D --format=posix "$1" | awk -v isbin=${isbin} '$2 == "U" || ($2 == "B" && $4 != "" && isbin == 1) {print $1}' | tr '\n' ' ') +unresolved_symbols=$(nm -u -D --format=posix "$1" | awk '$2 == "U" {print $1}' | tr '\n' ' ') +[ ${isbin} -eq 1 ] && bss_symbols=$(nm -D --format=posix "$1" | awk '$2 == "B" && $4 != "" {print $1}' | tr '\n' ' ') ldd_libs=$(ldd $(realpath $1) | awk '{print $1 ":" $3}') # Check for useful libs @@ -62,7 +63,7 @@ for lib in $(readelf -d $1 | awk '$2 ~ / setvar "${libkey}" "${lib_symbols}" fi for fct in ${lib_symbols}; do - case " ${unresolved_symbols} " in + case " ${unresolved_symbols} ${bss_symbols} " in *\ ${fct}\ *) foundone="${fct}" && break ;; esac done From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 06:11:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2320550B; Tue, 21 Apr 2015 06:11:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11B1316CC; Tue, 21 Apr 2015 06:11:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3L6BlkY078229; Tue, 21 Apr 2015 06:11:47 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3L6Bl3f078228; Tue, 21 Apr 2015 06:11:47 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201504210611.t3L6Bl3f078228@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 21 Apr 2015 06:11:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281815 - head/sys/dev/usb/video X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 06:11:48 -0000 Author: hselasky Date: Tue Apr 21 06:11:47 2015 New Revision: 281815 URL: https://svnweb.freebsd.org/changeset/base/281815 Log: Don't print uninitialized variables. CID: 1295242 Modified: head/sys/dev/usb/video/udl.c Modified: head/sys/dev/usb/video/udl.c ============================================================================== --- head/sys/dev/usb/video/udl.c Tue Apr 21 05:41:56 2015 (r281814) +++ head/sys/dev/usb/video/udl.c Tue Apr 21 06:11:47 2015 (r281815) @@ -1082,8 +1082,7 @@ udl_select_mode(struct udl_softc *sc) } if (index == UDL_MAX_MODES) { - DPRINTF("no mode line found for %dx%d @ %dHz!\n", - mode.hdisplay, mode.vdisplay, mode.hz); + DPRINTF("no mode line found\n"); i = 0; while (i < sc->sc_edid_info.edid_nmodes) { From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 06:46:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B1D53B91; Tue, 21 Apr 2015 06:46:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8647819F4; Tue, 21 Apr 2015 06:46:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3L6kCZw009401; Tue, 21 Apr 2015 06:46:12 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3L6kCY2009400; Tue, 21 Apr 2015 06:46:12 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504210646.t3L6kCY2009400@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 21 Apr 2015 06:46:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281816 - head/sys/dev/mii X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 06:46:12 -0000 Author: glebius Date: Tue Apr 21 06:46:11 2015 New Revision: 281816 URL: https://svnweb.freebsd.org/changeset/base/281816 Log: Since brgphy doesn't call mii_phy_setmedia(), there is no reason to set any value to ifm_data. If brgphy ever to call mii_phy_setmedia(), then the value of BRGPHY_S1000 | BRGPHY_BMCR_FDX will trigger KASSERT. While here, remove the obfuscating macro and wrap long lines. Sponsored by: Nginx, Inc. Modified: head/sys/dev/mii/brgphy.c Modified: head/sys/dev/mii/brgphy.c ============================================================================== --- head/sys/dev/mii/brgphy.c Tue Apr 21 06:11:47 2015 (r281815) +++ head/sys/dev/mii/brgphy.c Tue Apr 21 06:46:11 2015 (r281816) @@ -266,20 +266,25 @@ brgphy_attach(device_t dev) sc->mii_extcapabilities = PHY_READ(sc, MII_EXTSR); device_printf(dev, " "); -#define ADD(m, c) ifmedia_add(&sc->mii_pdata->mii_media, (m), (c), NULL) - /* Add the supported media types */ if ((sc->mii_flags & MIIF_HAVEFIBER) == 0) { mii_phy_add_media(sc); printf("\n"); } else { sc->mii_anegticks = MII_ANEGTICKS_GIGE; - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_SX, IFM_FDX, sc->mii_inst), - BRGPHY_S1000 | BRGPHY_BMCR_FDX); + ifmedia_add(&sc->mii_pdata->mii_media, + IFM_MAKEWORD(IFM_ETHER, IFM_1000_SX, IFM_FDX, sc->mii_inst), + 0, NULL); printf("1000baseSX-FDX, "); - /* 2.5G support is a software enabled feature on the 5708S and 5709S. */ - if (bce_sc && (bce_sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG)) { - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_2500_SX, IFM_FDX, sc->mii_inst), 0); + /* + * 2.5G support is a software enabled feature + * on the 5708S and 5709S. + */ + if (bce_sc && (bce_sc->bce_phy_flags & + BCE_PHY_2_5G_CAPABLE_FLAG)) { + ifmedia_add(&sc->mii_pdata->mii_media, + IFM_MAKEWORD(IFM_ETHER, IFM_2500_SX, IFM_FDX, + sc->mii_inst), 0, NULL); printf("2500baseSX-FDX, "); } else if ((bsc->serdes_flags & BRGPHY_5708S) && bce_sc && (detect_hs21(bce_sc) != 0)) { @@ -295,11 +300,11 @@ brgphy_attach(device_t dev) printf("auto-neg workaround, "); bsc->serdes_flags |= BRGPHY_NOANWAIT; } - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, sc->mii_inst), 0); + ifmedia_add(&sc->mii_pdata->mii_media, IFM_MAKEWORD(IFM_ETHER, + IFM_AUTO, 0, sc->mii_inst), 0, NULL); printf("auto\n"); } -#undef ADD MIIBUS_MEDIAINIT(sc->mii_dev); return (0); } From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 06:59:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 51F8CD97; Tue, 21 Apr 2015 06:59:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 403821AEF; Tue, 21 Apr 2015 06:59:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3L6xf29019981; Tue, 21 Apr 2015 06:59:41 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3L6xfbc019980; Tue, 21 Apr 2015 06:59:41 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504210659.t3L6xfbc019980@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 21 Apr 2015 06:59:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281817 - head/sys/dev/mii X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 06:59:41 -0000 Author: glebius Date: Tue Apr 21 06:59:40 2015 New Revision: 281817 URL: https://svnweb.freebsd.org/changeset/base/281817 Log: Since xmphy doesn't call mii_phy_setmedia(), there is no reason to set ifm_data. Sponsored by: Nginx, Inc. Modified: head/sys/dev/mii/xmphy.c Modified: head/sys/dev/mii/xmphy.c ============================================================================== --- head/sys/dev/mii/xmphy.c Tue Apr 21 06:46:11 2015 (r281816) +++ head/sys/dev/mii/xmphy.c Tue Apr 21 06:59:40 2015 (r281817) @@ -116,16 +116,15 @@ xmphy_attach(device_t dev) PHY_RESET(sc); -#define ADD(m, c) ifmedia_add(&sc->mii_pdata->mii_media, (m), (c), NULL) +#define ADD(m) ifmedia_add(&sc->mii_pdata->mii_media, (m), 0, NULL) #define PRINT(s) printf("%s%s", sep, s); sep = ", " device_printf(dev, " "); - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_SX, 0, sc->mii_inst), - XMPHY_BMCR_FDX); + ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_SX, 0, sc->mii_inst)); PRINT("1000baseSX"); - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_SX, IFM_FDX, sc->mii_inst), 0); + ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_SX, IFM_FDX, sc->mii_inst)); PRINT("1000baseSX-FDX"); - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, sc->mii_inst), 0); + ADD(IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, sc->mii_inst)); PRINT("auto"); printf("\n"); From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 07:13:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9722B20C; Tue, 21 Apr 2015 07:13:32 +0000 (UTC) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 41BE91CD7; Tue, 21 Apr 2015 07:13:31 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 126DB1045EA0; Tue, 21 Apr 2015 16:48:36 +1000 (AEST) Date: Tue, 21 Apr 2015 16:48:35 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Eric van Gyzen cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281787 - head/sbin/dmesg In-Reply-To: <201504202007.t3KK7dtj000379@svn.freebsd.org> Message-ID: <20150421151131.T1396@besplex.bde.org> References: <201504202007.t3KK7dtj000379@svn.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.1 cv=A5NVYcmG c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=_cJNZYTe81WAuVWcR9kA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 07:13:32 -0000 On Mon, 20 Apr 2015, Eric van Gyzen wrote: > Log: > dmesg: accommodate message buffer growth between the sysctl calls > > Allocate 12.5% extra space to avoid ENOMEM when the message buffer > is growing steadily. This is bogus allocation. The message buffer has a small fixed size so that it fits in physical memory in the kernel, and rarely changes its size after it fills up. Userland can easily statically allocate a buffer 1000 if not 1000000 times as large as the full size in virtual memory. This is much easier to do than even half-baked dynamic allocation. > Modified: head/sbin/dmesg/dmesg.c > ============================================================================== > --- head/sbin/dmesg/dmesg.c Mon Apr 20 20:06:25 2015 (r281786) > +++ head/sbin/dmesg/dmesg.c Mon Apr 20 20:07:39 2015 (r281787) > @@ -118,6 +118,9 @@ main(int argc, char *argv[]) > */ > if (sysctlbyname("kern.msgbuf", NULL, &buflen, NULL, 0) == -1) > err(1, "sysctl kern.msgbuf"); > + /* Allocate extra room for growth between the sysctl calls. */ > + buflen += buflen/8; > + /* Allocate more than sysctl sees, for room to append \n\0. */ > if ((bp = malloc(buflen + 2)) == NULL) > errx(1, "malloc failed"); > if (sysctlbyname("kern.msgbuf", bp, &buflen, NULL, 0) == -1) This still fails if the size grows more than 12.5%. This adds some style bugs: - missing spaces around binary operator - verboseness. There is already a verbose comment about the method just above here - new verbose comments not made less verbose by not adding newline delimiters for the block (a single statement) of code that they describe, unlike some old single-line comments in the file. - (old style bug). Expansion of the verbose comment above gave a worse comment scope obfuscation. Code to adjust the buffer actually needs to be in a different block, but the comment about this code is appended to the main comment and the adjustment is not even appended. Non-half-baked dynamic initialization would check the error returned by the first sysctl, and if it is ENOMEM, then retry. This is actually simpler, since it doesn't need the second sysctl (except dynamically, and almost never then). Allocate some memory before starting the loop. This doesn't need any comments since it is obviously the only correct way to determine the amount of memory needed if the size can change. Dynamic allocation is still overkill. For the initial size, use MSG_BUFSIZE (+2) from . MSG_BUFSIZE is not quite unusable outside of the kernel. It is just a default, so cannot be used correctly outside of the kernel, but given that it exists, it is slightly better than an arbitrary value for the initial size, since that gives only 1 iteration of the loop in the usual case where dmesg was compiled with the same sources as the kernel and the user didn't change the default. Untested version: X buflen = MSGBUFSIZ / 2; X bp = NULL; X do { X buflen *= 2; X if ((bp = reallocf(bp, buflen + 2)) == NULL) X errx(1, "malloc failed"); X if (sysctlbyname("kern.msgbuf", bp, &buflen, NULL, 0) == 0) X break; X if (errno != ENOMEM) X err(1, "sysctl kern.msgbuf"); X } while (0); The error handling is still painful. malloc() failure can't happen, but I preserved the check for it. buflen *= 2 can overflow, but I omitted checking for it. This should be safe since the overflow only malloc() failures (that can't happen) have happened. phk has railed against the practice of starting with a small size and doubling it. Starting with a large size and hoping to never change it is better for bloatware. The above does the latter, except the "large" size is small. Doubling it is correct since anyone changing the default shouldn't make small adjustments. But small utilities don't need any dynamic allocation. They can allocate "large" buffers that are actually small using static allocation. Another not so good way to do the above is have a sysctl that returns the full msgbuf size. This cannot change. Then the only change needed in the original code is to change the first sysctl to determine the full size. All kernel parameters that are not constant because they may be changed by kernel options should have such a sysctl and shouldn't have any manifest constant (except as a default or minimum value, like POSIX minimum values for sysconf()). But using such a constant here just takes more code. It takes 1 sysctl() to determine the size, then a malloc(), then 1 sysctl() (but not in a loop) to use the size. Fully dynamical allocation starting with a reasonably large size usually only needs 1 malloc() and 1 sysctl(). Elsewhere, in much more important places, there is an enormous amount of sloppy code that abuses POSIX manifest constants like PATH_MAX instead of technically correct dynamic code using sysconf(), since static allocation is usually good enough and dynamic allocation is so painful. E.g., static allocation using PATH_MAX is: char path[PATH_MAX]; /* technically broken */ char path2[MAXPATHLEN]; /* honestly unportable */ and using sysconf() it is: long len = sysconf(_SC_PATH_MAX); /* Several lines to check for and handle errors in sysconf(). */ /* Several lines to check for and handle len being unrepresentable * size_t. */ path = malloc(len); /* Several lines to check for and handle errors in malloc(). */ and using PATH_MAX and sysconf() it is: #ifdef PATH_MAX char path[PATH_MAX]; /* assume comp. detects if too large #else /* Above code for dynamic case. */ #endif Bruce From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 07:42:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0CF027AB; Tue, 21 Apr 2015 07:42:59 +0000 (UTC) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cloud.theravensnest.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C7C49102C; Tue, 21 Apr 2015 07:42:58 +0000 (UTC) Received: from [192.168.0.7] (cpc16-cmbg15-2-0-cust60.5-4.cable.virginm.net [86.5.162.61]) (authenticated bits=0) by theravensnest.org (8.15.1/8.15.1) with ESMTPSA id t3L7gmqO058209 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 21 Apr 2015 07:42:50 GMT (envelope-from theraven@FreeBSD.org) X-Authentication-Warning: theravensnest.org: Host cpc16-cmbg15-2-0-cust60.5-4.cable.virginm.net [86.5.162.61] claimed to be [192.168.0.7] Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: svn commit: r281721 - head/sys/sys From: David Chisnall In-Reply-To: <20150421020808.D10623@besplex.bde.org> Date: Tue, 21 Apr 2015 08:42:41 +0100 Cc: John Baldwin , Justin Hibbits , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <785A553E-317E-4C80-83A0-567C80697ED8@FreeBSD.org> References: <201504190033.t3J0XMDX041769@svn.freebsd.org> <476583045.Qcb6O2DFtY@ralph.baldwin.cx> <20150421020808.D10623@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.2098) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 07:42:59 -0000 On 20 Apr 2015, at 17:19, Bruce Evans wrote: >=20 > Enums should never be used in ABIs, since their size can be anything > large enough. The rules for the size of enums also differ between C and C++, though = clang (and, I think, gcc) support an attribute for specifying the enum = type. > They also cause namespace problems. The whole enum declaration must > be exposed in any header that uses an enum type. Both C and C++ permit forward declarations of enums for use in function = prototypes and so on, e.g.: enum foo; void bar(enum foo); David From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 08:54:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8CEB87C9; Tue, 21 Apr 2015 08:54:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 601C21885; Tue, 21 Apr 2015 08:54:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3L8sFte024299; Tue, 21 Apr 2015 08:54:15 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3L8sFOi024298; Tue, 21 Apr 2015 08:54:15 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504210854.t3L8sFOi024298@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 21 Apr 2015 08:54:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281819 - head/sys/dev/mii X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 08:54:15 -0000 Author: glebius Date: Tue Apr 21 08:54:14 2015 New Revision: 281819 URL: https://svnweb.freebsd.org/changeset/base/281819 Log: The comment on BMCR data in if_media entry is wrong. The ifm_data stores the index array, not a value for BMCR register. In case of IFM_10_T there could be either MII_MEDIA_10_T or MII_MEDIA_10_T_FDX, which are 1 and 2, accordingly. Neither matches a valid BMCR value. My guessing is that this write is harmless, since later mii_phy_setmedia() would write a proper value there. The code is here since the initial checkin. Note that case IFM_100_TX has the same comment, but a proper value of BMCR_ISO is written. So, collapse two cases into one, always writing there BMCR_ISO. Sponsored by: Nginx, Inc. Modified: head/sys/dev/mii/mlphy.c Modified: head/sys/dev/mii/mlphy.c ============================================================================== --- head/sys/dev/mii/mlphy.c Tue Apr 21 08:47:27 2015 (r281818) +++ head/sys/dev/mii/mlphy.c Tue Apr 21 08:54:14 2015 (r281819) @@ -220,29 +220,11 @@ mlphy_service(xsc, mii, cmd) msc->ml_linked = 0; return (0); case IFM_10_T: - /* - * For 10baseT modes, reset and program the - * companion PHY (of any), then program ourselves - * to match. This will put us in pass-through - * mode and let the companion PHY do all the - * work. - * - * BMCR data is stored in the ifmedia entry. - */ - if (other != NULL) { - PHY_RESET(other); - PHY_WRITE(other, MII_BMCR, ife->ifm_data); - } - mii_phy_setmedia(sc); - msc->ml_state = 0; - break; case IFM_100_TX: /* - * For 100baseTX modes, reset and isolate the - * companion PHY (if any), then program ourselves + * For 10baseT and 100baseTX modes, reset and isolate + * the companion PHY (if any), then program ourselves * accordingly. - * - * BMCR data is stored in the ifmedia entry. */ if (other != NULL) { PHY_RESET(other); From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 09:11:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E161EAC; Tue, 21 Apr 2015 09:11:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C4C41A9E; Tue, 21 Apr 2015 09:11:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3L9BTDc038323; Tue, 21 Apr 2015 09:11:29 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3L9BTp7038322; Tue, 21 Apr 2015 09:11:29 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201504210911.t3L9BTp7038322@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 21 Apr 2015 09:11:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281820 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 09:11:29 -0000 Author: trasz Date: Tue Apr 21 09:11:28 2015 New Revision: 281820 URL: https://svnweb.freebsd.org/changeset/base/281820 Log: Add hint about "volmode=dev" to ctl.conf(5). Differential Revision: https://reviews.freebsd.org/D2328 Reviewed by: allanjude@, bcr@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/ctl.conf.5 Modified: head/usr.sbin/ctld/ctl.conf.5 ============================================================================== --- head/usr.sbin/ctld/ctl.conf.5 Tue Apr 21 08:54:14 2015 (r281819) +++ head/usr.sbin/ctld/ctl.conf.5 Tue Apr 21 09:11:28 2015 (r281820) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 4, 2015 +.Dd April 19, 2015 .Dt CTL.CONF 5 .Os .Sh NAME @@ -365,7 +365,12 @@ All CTL-specific options are documented section of .Xr ctladm 8 . .It Ic path Ar path -The path to the file or device node used to back the LUN. +The path to the file, device node, or +.Xr zfs 8 +volume used to back the LUN. +For optimal performance, create the volume with the +.Qq Ar volmode=dev +property set. .It Ic serial Ar string The SCSI serial number presented to the initiator. .It Ic size Ar size @@ -435,7 +440,8 @@ target naa.50015178f369f092 { .Sh SEE ALSO .Xr ctl 4 , .Xr ctladm 8 , -.Xr ctld 8 +.Xr ctld 8 , +.Xr zfs 8 .Sh AUTHORS The .Nm From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 09:32:36 2015 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C3CA03B6; Tue, 21 Apr 2015 09:32:36 +0000 (UTC) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 85D221CF2; Tue, 21 Apr 2015 09:32:35 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 7023F4269AD; Tue, 21 Apr 2015 19:32:31 +1000 (AEST) Date: Tue, 21 Apr 2015 19:32:30 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: David Chisnall cc: Bruce Evans , John Baldwin , Justin Hibbits , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r281721 - head/sys/sys In-Reply-To: <785A553E-317E-4C80-83A0-567C80697ED8@FreeBSD.org> Message-ID: <20150421184157.Y2048@besplex.bde.org> References: <201504190033.t3J0XMDX041769@svn.freebsd.org> <476583045.Qcb6O2DFtY@ralph.baldwin.cx> <20150421020808.D10623@besplex.bde.org> <785A553E-317E-4C80-83A0-567C80697ED8@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.1 cv=dKqfxopb c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=FpqDrhUIJt8TsK9rtWoA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 09:32:37 -0000 On Tue, 21 Apr 2015, David Chisnall wrote: > On 20 Apr 2015, at 17:19, Bruce Evans wrote: >> >> Enums should never be used in ABIs, since their size can be anything >> large enough. > > The rules for the size of enums also differ between C and C++, though clang (and, I think, gcc) support an attribute for specifying the enum type. > >> They also cause namespace problems. The whole enum declaration must >> be exposed in any header that uses an enum type. > > Both C and C++ permit forward declarations of enums for use in function prototypes and so on, e.g.: > > enum foo; > void > bar(enum foo); No, they cannot do this since the size may depend on the internals of the enum: TendDRA-5.0.0: "z.c", line 1: Error: [ISO C90 6.5.2.3]: Can't declare the enumeration 'enum foo'. gcc-4.2.1 -std=c99 -pedantic: z.c:1: warning: ISO C forbids forward references to 'enum' types z.c:3: warning: ISO C forbids forward references to 'enum' types clang-current -std==c99 -pedantic z.c:1:6: warning: ISO C forbids forward references to 'enum' types [-Wpedantic] g++-4.2.1: z.cc:1: error: use of enum `foo' without previous declaration clang++-current: z.cc:1:6: error: ISO C++ forbids forward references to 'enum' types It takes -pedantic to turn gcc-4.2.1 and clang-current into something resembling C99 compilers, but in gcc++-4.2.1 and clang++-current nothing is required and error is actually an error. gcc and clang are still far behind TenDRA in the quality of their diagnostics. I thought that forward declarations of enums were allowed too, until recently when their brokenness turned up in kernel builds. syscallsubr.h is broken, since it uses `enum idtype' without declaring it, except bogusly as a forward declaration as above. Only kern_wait6() and kern_procctl() use this enum. (syscallsubr.h also uses the older mistake `enum uio_seg', but it has the namespace pollution of including to get this instead of being broken by this. `enum uio seg' is under __BSD_VISIBLE, but it seems to be bogus to export it to userland since it is only useful in the kernel. struct uio is kernel-only. wait6(2) has somewhat different design errors. It spells `enum idtype' as idtype_t and also uses id_t. `enum idtype' is declared with wait6() in where it is not so polluting, but still needs anti-pollution ifdefs since only idtype_t is standard.) The bug in syscallsubr.h was detected as a side effect when I enabled -pedantic to check for other errors. enums are not used much in the kernel or syscalls, and they seem to mostly have complete declarations. The pollution problem would be larger if there were more of them. POSIX has excessive typedefs, but almost no enums, at least in old versions. In a 2001 draft, it has just 4 lines out of 209786 containing `enum', and a a few more containing `enumeration type'. Its only enum types are: /* For the bsearch family: */ enum { FIND, ENTER } ACTION; enum { preorder, postorder, endorder, leaf } VISIT; /* For wait6(): */ The type idtype_t shall be defined as an enumeration type whose possible values shall include ... Bruce From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 09:39:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BF9E46CC; Tue, 21 Apr 2015 09:39:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ACEF41D49; Tue, 21 Apr 2015 09:39:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3L9dnHt061953; Tue, 21 Apr 2015 09:39:49 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3L9dmL0061947; Tue, 21 Apr 2015 09:39:48 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504210939.t3L9dmL0061947@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 21 Apr 2015 09:39:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281821 - head/sys/dev/mii X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 09:39:50 -0000 Author: glebius Date: Tue Apr 21 09:39:48 2015 New Revision: 281821 URL: https://svnweb.freebsd.org/changeset/base/281821 Log: Instead of storing mii_media_table array index in ifm_data, determine it in mii_phy_setmedia() functionally. Sponsored by: Nginx, Inc. Modified: head/sys/dev/mii/acphy.c head/sys/dev/mii/lxtphy.c head/sys/dev/mii/mii_physubr.c head/sys/dev/mii/miivar.h Modified: head/sys/dev/mii/acphy.c ============================================================================== --- head/sys/dev/mii/acphy.c Tue Apr 21 09:11:28 2015 (r281820) +++ head/sys/dev/mii/acphy.c Tue Apr 21 09:39:48 2015 (r281821) @@ -139,14 +139,12 @@ acphy_attach(device_t dev) sc->mii_capabilities = PHY_READ(sc, MII_BMSR) & sc->mii_capmask; device_printf(dev, " "); -#define ADD(m, c) ifmedia_add(&sc->mii_pdata->mii_media, (m), (c), NULL) +#define ADD(m) ifmedia_add(&sc->mii_pdata->mii_media, (m), 0, NULL) if ((PHY_READ(sc, MII_ACPHY_MCTL) & AC_MCTL_FX_SEL) != 0) { sc->mii_flags |= MIIF_HAVEFIBER; - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_FX, 0, sc->mii_inst), - MII_MEDIA_100_TX); + ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_FX, 0, sc->mii_inst)); printf("100baseFX, "); - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_FX, IFM_FDX, sc->mii_inst), - MII_MEDIA_100_TX_FDX); + ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_FX, IFM_FDX, sc->mii_inst)); printf("100baseFX-FDX, "); } #undef ADD Modified: head/sys/dev/mii/lxtphy.c ============================================================================== --- head/sys/dev/mii/lxtphy.c Tue Apr 21 09:11:28 2015 (r281820) +++ head/sys/dev/mii/lxtphy.c Tue Apr 21 09:39:48 2015 (r281821) @@ -142,12 +142,10 @@ lxtphy_attach(device_t dev) sc->mii_capabilities = PHY_READ(sc, MII_BMSR) & sc->mii_capmask; device_printf(dev, " "); -#define ADD(m, c) ifmedia_add(&sc->mii_pdata->mii_media, (m), (c), NULL) - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_FX, 0, sc->mii_inst), - MII_MEDIA_100_TX); +#define ADD(m) ifmedia_add(&sc->mii_pdata->mii_media, (m), 0, NULL) + ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_FX, 0, sc->mii_inst)); printf("100baseFX, "); - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_FX, IFM_FDX, sc->mii_inst), - MII_MEDIA_100_TX_FDX); + ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_FX, IFM_FDX, sc->mii_inst)); printf("100baseFX-FDX, "); #undef ADD Modified: head/sys/dev/mii/mii_physubr.c ============================================================================== --- head/sys/dev/mii/mii_physubr.c Tue Apr 21 09:11:28 2015 (r281820) +++ head/sys/dev/mii/mii_physubr.c Tue Apr 21 09:39:48 2015 (r281821) @@ -54,9 +54,28 @@ __FBSDID("$FreeBSD$"); #include "miibus_if.h" /* - * Media to register setting conversion table. Order matters. + * + * An array of structures to map MII media types to BMCR/ANAR settings. */ -static const struct mii_media mii_media_table[MII_NMEDIA] = { +enum { + MII_MEDIA_NONE = 0, + MII_MEDIA_10_T, + MII_MEDIA_10_T_FDX, + MII_MEDIA_100_T4, + MII_MEDIA_100_TX, + MII_MEDIA_100_TX_FDX, + MII_MEDIA_1000_X, + MII_MEDIA_1000_X_FDX, + MII_MEDIA_1000_T, + MII_MEDIA_1000_T_FDX, + MII_NMEDIA, +}; + +static const struct mii_media { + u_int mm_bmcr; /* BMCR settings for this media */ + u_int mm_anar; /* ANAR settings for this media */ + u_int mm_gtcr; /* 100base-T2 or 1000base-T CR */ +} mii_media_table[MII_NMEDIA] = { /* None */ { BMCR_ISO, ANAR_CSMA, 0, }, @@ -104,8 +123,10 @@ mii_phy_setmedia(struct mii_softc *sc) struct mii_data *mii = sc->mii_pdata; struct ifmedia_entry *ife = mii->mii_media.ifm_cur; int bmcr, anar, gtcr; + int index = -1; - if (IFM_SUBTYPE(ife->ifm_media) == IFM_AUTO) { + switch (IFM_SUBTYPE(ife->ifm_media)) { + case IFM_AUTO: /* * Force renegotiation if MIIF_DOPAUSE or MIIF_FORCEANEG. * The former is necessary as we might switch from flow- @@ -115,19 +136,78 @@ mii_phy_setmedia(struct mii_softc *sc) (sc->mii_flags & (MIIF_DOPAUSE | MIIF_FORCEANEG)) != 0) (void)mii_phy_auto(sc); return; + + case IFM_NONE: + index = MII_MEDIA_NONE; + break; + + case IFM_HPNA_1: + index = MII_MEDIA_10_T; + break; + + case IFM_10_T: + switch (IFM_OPTIONS(ife->ifm_media)) { + case 0: + index = MII_MEDIA_10_T; + break; + case IFM_FDX: + case (IFM_FDX | IFM_FLOW): + index = MII_MEDIA_10_T_FDX; + break; + }; + break; + + case IFM_100_TX: + case IFM_100_FX: + switch (IFM_OPTIONS(ife->ifm_media)) { + case 0: + index = MII_MEDIA_100_TX; + break; + case IFM_FDX: + case (IFM_FDX | IFM_FLOW): + index = MII_MEDIA_100_TX_FDX; + break; + } + break; + + case IFM_100_T4: + index = MII_MEDIA_100_T4; + break; + + case IFM_1000_SX: + switch (IFM_OPTIONS(ife->ifm_media)) { + case 0: + index = MII_MEDIA_1000_X; + break; + case IFM_FDX: + case (IFM_FDX | IFM_FLOW): + index = MII_MEDIA_1000_X_FDX; + break; + } + break; + + case IFM_1000_T: + switch (IFM_OPTIONS(ife->ifm_media)) { + case 0: + case IFM_ETH_MASTER: + index = MII_MEDIA_1000_T; + break; + case IFM_FDX: + case (IFM_FDX | IFM_ETH_MASTER): + case (IFM_FDX | IFM_FLOW): + case (IFM_FDX | IFM_FLOW | IFM_ETH_MASTER): + index = MII_MEDIA_1000_T_FDX; + break; + } + break; } - /* - * Table index is stored in the media entry. - */ + KASSERT(index != -1, ("%s: failed to map media word %d", + __func__, ife->ifm_media)); - KASSERT(ife->ifm_data >=0 && ife->ifm_data < MII_NMEDIA, - ("invalid ife->ifm_data (0x%x) in mii_phy_setmedia", - ife->ifm_data)); - - anar = mii_media_table[ife->ifm_data].mm_anar; - bmcr = mii_media_table[ife->ifm_data].mm_bmcr; - gtcr = mii_media_table[ife->ifm_data].mm_gtcr; + anar = mii_media_table[index].mm_anar; + bmcr = mii_media_table[index].mm_bmcr; + gtcr = mii_media_table[index].mm_gtcr; if (IFM_SUBTYPE(ife->ifm_media) == IFM_1000_T) { gtcr |= GTCR_MAN_MS; @@ -318,12 +398,11 @@ mii_phy_add_media(struct mii_softc *sc) */ sc->mii_anegticks = MII_ANEGTICKS; -#define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL) +#define ADD(m) ifmedia_add(&mii->mii_media, (m), 0, NULL) #define PRINT(s) printf("%s%s", sep, s); sep = ", " if ((sc->mii_flags & MIIF_NOISOLATE) == 0) { - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_NONE, 0, sc->mii_inst), - MII_MEDIA_NONE); + ADD(IFM_MAKEWORD(IFM_ETHER, IFM_NONE, 0, sc->mii_inst)); PRINT("none"); } @@ -335,51 +414,44 @@ mii_phy_add_media(struct mii_softc *sc) if ((sc->mii_flags & MIIF_IS_HPNA) != 0) { if ((sc->mii_capabilities & BMSR_10THDX) != 0) { ADD(IFM_MAKEWORD(IFM_ETHER, IFM_HPNA_1, 0, - sc->mii_inst), MII_MEDIA_10_T); + sc->mii_inst)); PRINT("HomePNA1"); } return; } if ((sc->mii_capabilities & BMSR_10THDX) != 0) { - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_10_T, 0, sc->mii_inst), - MII_MEDIA_10_T); + ADD(IFM_MAKEWORD(IFM_ETHER, IFM_10_T, 0, sc->mii_inst)); PRINT("10baseT"); } if ((sc->mii_capabilities & BMSR_10TFDX) != 0) { - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_10_T, IFM_FDX, sc->mii_inst), - MII_MEDIA_10_T_FDX); + ADD(IFM_MAKEWORD(IFM_ETHER, IFM_10_T, IFM_FDX, sc->mii_inst)); PRINT("10baseT-FDX"); if ((sc->mii_flags & MIIF_DOPAUSE) != 0 && (sc->mii_flags & MIIF_NOMANPAUSE) == 0) { ADD(IFM_MAKEWORD(IFM_ETHER, IFM_10_T, - IFM_FDX | IFM_FLOW, sc->mii_inst), - MII_MEDIA_10_T_FDX); + IFM_FDX | IFM_FLOW, sc->mii_inst)); PRINT("10baseT-FDX-flow"); } fdx = 1; } if ((sc->mii_capabilities & BMSR_100TXHDX) != 0) { - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, 0, sc->mii_inst), - MII_MEDIA_100_TX); + ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, 0, sc->mii_inst)); PRINT("100baseTX"); } if ((sc->mii_capabilities & BMSR_100TXFDX) != 0) { - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, IFM_FDX, sc->mii_inst), - MII_MEDIA_100_TX_FDX); + ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, IFM_FDX, sc->mii_inst)); PRINT("100baseTX-FDX"); if ((sc->mii_flags & MIIF_DOPAUSE) != 0 && (sc->mii_flags & MIIF_NOMANPAUSE) == 0) { ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, - IFM_FDX | IFM_FLOW, sc->mii_inst), - MII_MEDIA_100_TX_FDX); + IFM_FDX | IFM_FLOW, sc->mii_inst)); PRINT("100baseTX-FDX-flow"); } fdx = 1; } if ((sc->mii_capabilities & BMSR_100T4) != 0) { - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_T4, 0, sc->mii_inst), - MII_MEDIA_100_T4); + ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_T4, 0, sc->mii_inst)); PRINT("100baseT4"); } @@ -392,20 +464,19 @@ mii_phy_add_media(struct mii_softc *sc) sc->mii_anegticks = MII_ANEGTICKS_GIGE; sc->mii_flags |= MIIF_IS_1000X; ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_SX, 0, - sc->mii_inst), MII_MEDIA_1000_X); + sc->mii_inst)); PRINT("1000baseSX"); } if ((sc->mii_extcapabilities & EXTSR_1000XFDX) != 0) { sc->mii_anegticks = MII_ANEGTICKS_GIGE; sc->mii_flags |= MIIF_IS_1000X; ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_SX, IFM_FDX, - sc->mii_inst), MII_MEDIA_1000_X_FDX); + sc->mii_inst)); PRINT("1000baseSX-FDX"); if ((sc->mii_flags & MIIF_DOPAUSE) != 0 && (sc->mii_flags & MIIF_NOMANPAUSE) == 0) { ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_SX, - IFM_FDX | IFM_FLOW, sc->mii_inst), - MII_MEDIA_1000_X_FDX); + IFM_FDX | IFM_FLOW, sc->mii_inst)); PRINT("1000baseSX-FDX-flow"); } fdx = 1; @@ -421,31 +492,29 @@ mii_phy_add_media(struct mii_softc *sc) sc->mii_anegticks = MII_ANEGTICKS_GIGE; sc->mii_flags |= MIIF_HAVE_GTCR; ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_T, 0, - sc->mii_inst), MII_MEDIA_1000_T); + sc->mii_inst)); PRINT("1000baseT"); ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_T, - IFM_ETH_MASTER, sc->mii_inst), MII_MEDIA_1000_T); + IFM_ETH_MASTER, sc->mii_inst)); PRINT("1000baseT-master"); } if ((sc->mii_extcapabilities & EXTSR_1000TFDX) != 0) { sc->mii_anegticks = MII_ANEGTICKS_GIGE; sc->mii_flags |= MIIF_HAVE_GTCR; ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_T, IFM_FDX, - sc->mii_inst), MII_MEDIA_1000_T_FDX); + sc->mii_inst)); PRINT("1000baseT-FDX"); ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_T, - IFM_FDX | IFM_ETH_MASTER, sc->mii_inst), - MII_MEDIA_1000_T_FDX); + IFM_FDX | IFM_ETH_MASTER, sc->mii_inst)); PRINT("1000baseT-FDX-master"); if ((sc->mii_flags & MIIF_DOPAUSE) != 0 && (sc->mii_flags & MIIF_NOMANPAUSE) == 0) { ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_T, - IFM_FDX | IFM_FLOW, sc->mii_inst), - MII_MEDIA_1000_T_FDX); + IFM_FDX | IFM_FLOW, sc->mii_inst)); PRINT("1000baseT-FDX-flow"); ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_T, IFM_FDX | IFM_FLOW | IFM_ETH_MASTER, - sc->mii_inst), MII_MEDIA_1000_T_FDX); + sc->mii_inst)); PRINT("1000baseT-FDX-flow-master"); } fdx = 1; @@ -454,12 +523,11 @@ mii_phy_add_media(struct mii_softc *sc) if ((sc->mii_capabilities & BMSR_ANEG) != 0) { /* intentionally invalid index */ - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, sc->mii_inst), - MII_NMEDIA); + ADD(IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, sc->mii_inst)); PRINT("auto"); if (fdx != 0 && (sc->mii_flags & MIIF_DOPAUSE) != 0) { ADD(IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, IFM_FLOW, - sc->mii_inst), MII_NMEDIA); + sc->mii_inst)); PRINT("auto-flow"); } } Modified: head/sys/dev/mii/miivar.h ============================================================================== --- head/sys/dev/mii/miivar.h Tue Apr 21 09:11:28 2015 (r281820) +++ head/sys/dev/mii/miivar.h Tue Apr 21 09:39:48 2015 (r281821) @@ -180,27 +180,6 @@ struct mii_phydesc { MII_STR_ ## a ## _ ## b } #define MII_PHY_END { 0, 0, NULL } -/* - * An array of these structures map MII media types to BMCR/ANAR settings. - */ -struct mii_media { - u_int mm_bmcr; /* BMCR settings for this media */ - u_int mm_anar; /* ANAR settings for this media */ - u_int mm_gtcr; /* 100base-T2 or 1000base-T CR */ -}; - -#define MII_MEDIA_NONE 0 -#define MII_MEDIA_10_T 1 -#define MII_MEDIA_10_T_FDX 2 -#define MII_MEDIA_100_T4 3 -#define MII_MEDIA_100_TX 4 -#define MII_MEDIA_100_TX_FDX 5 -#define MII_MEDIA_1000_X 6 -#define MII_MEDIA_1000_X_FDX 7 -#define MII_MEDIA_1000_T 8 -#define MII_MEDIA_1000_T_FDX 9 -#define MII_NMEDIA 10 - #ifdef _KERNEL #define PHY_READ(p, r) \ From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 09:59:06 2015 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A7FF9BE2; Tue, 21 Apr 2015 09:59:06 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::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 18F0A1F6F; Tue, 21 Apr 2015 09:59:05 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t3L9x086034723 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 21 Apr 2015 12:59:00 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t3L9x086034723 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t3L9x0WV034722; Tue, 21 Apr 2015 12:59:00 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 21 Apr 2015 12:59:00 +0300 From: Konstantin Belousov To: Bruce Evans Cc: David Chisnall , John Baldwin , Justin Hibbits , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r281721 - head/sys/sys Message-ID: <20150421095900.GL2390@kib.kiev.ua> References: <201504190033.t3J0XMDX041769@svn.freebsd.org> <476583045.Qcb6O2DFtY@ralph.baldwin.cx> <20150421020808.D10623@besplex.bde.org> <785A553E-317E-4C80-83A0-567C80697ED8@FreeBSD.org> <20150421184157.Y2048@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150421184157.Y2048@besplex.bde.org> User-Agent: Mutt/1.5.23 (2014-03-12) 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.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 09:59:06 -0000 On Tue, Apr 21, 2015 at 07:32:30PM +1000, Bruce Evans wrote: > On Tue, 21 Apr 2015, David Chisnall wrote: > > > On 20 Apr 2015, at 17:19, Bruce Evans wrote: > >> > >> Enums should never be used in ABIs, since their size can be anything > >> large enough. > > > > The rules for the size of enums also differ between C and C++, though clang (and, I think, gcc) support an attribute for specifying the enum type. > > > >> They also cause namespace problems. The whole enum declaration must > >> be exposed in any header that uses an enum type. > > > > Both C and C++ permit forward declarations of enums for use in function prototypes and so on, e.g.: > > > > enum foo; > > void > > bar(enum foo); > > No, they cannot do this since the size may depend on the internals of the > enum: > > TendDRA-5.0.0: > "z.c", line 1: Error: > [ISO C90 6.5.2.3]: Can't declare the enumeration 'enum foo'. > This is not true for C. The i386 ABI specification, from year _1997_, states that enum must be 4-bytes unsigned entity, 4-bytes aligned. See page 28 of abi386-4.pdf. From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 10:17:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE700194; Tue, 21 Apr 2015 10:17:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD3801198; Tue, 21 Apr 2015 10:17:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3LAHPVT094230; Tue, 21 Apr 2015 10:17:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3LAHPk6094229; Tue, 21 Apr 2015 10:17:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504211017.t3LAHPk6094229@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 21 Apr 2015 10:17:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281823 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 10:17:26 -0000 Author: ngie Date: Tue Apr 21 10:17:25 2015 New Revision: 281823 URL: https://svnweb.freebsd.org/changeset/base/281823 Log: Serialize all of _kerberos5_bootstrap_tools to avoid build failures involving make bootstrap-tools On the plus side, this also greatly reduces complexity MFC after: 1 week Pointyhat to: ngie Reported by: Willem Jan Withagen Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Apr 21 09:47:27 2015 (r281822) +++ head/Makefile.inc1 Tue Apr 21 10:17:25 2015 (r281823) @@ -1357,13 +1357,7 @@ _kerberos5_bootstrap_tools= \ kerberos5/tools/slc \ usr.bin/compile_et -${_bt}-kerberos5/lib/libroken: ${_bt}-kerberos5/tools/make-roken -${_bt}-kerberos5/tools/asn1_compile: \ - ${_bt}-kerberos5/lib/libroken ${_bt}-kerberos5/lib/libvers -${_bt}-kerberos5/tools/slc: \ - ${_bt}-kerberos5/lib/libroken ${_bt}-kerberos5/lib/libvers -${_bt}-usr.bin/compile_et: \ - ${_bt}-kerberos5/lib/libroken ${_bt}-kerberos5/lib/libvers +.ORDER: ${_kerberos5_bootstrap_tools:C/^/${_bt}-/g} .endif bootstrap-tools: .PHONY From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 10:35:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3125A758; Tue, 21 Apr 2015 10:35:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F879139E; Tue, 21 Apr 2015 10:35:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3LAZO0K007688; Tue, 21 Apr 2015 10:35:24 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3LAZO4D007682; Tue, 21 Apr 2015 10:35:24 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504211035.t3LAZO4D007682@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 21 Apr 2015 10:35:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281824 - in head/sys: conf net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 10:35:25 -0000 Author: glebius Date: Tue Apr 21 10:35:23 2015 New Revision: 281824 URL: https://svnweb.freebsd.org/changeset/base/281824 Log: Make IFMEDIA_DEBUG a kernel option. Sponsored by: Nginx, Inc. Modified: head/sys/conf/NOTES head/sys/conf/options head/sys/net/if_media.c Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Tue Apr 21 10:17:25 2015 (r281823) +++ head/sys/conf/NOTES Tue Apr 21 10:35:23 2015 (r281824) @@ -2836,6 +2836,7 @@ options INIT_PATH=/sbin/init:/rescue/in options BUS_DEBUG # enable newbus debugging options DEBUG_VFS_LOCKS # enable VFS lock debugging options SOCKBUF_DEBUG # enable sockbuf last record/mb tail checking +options IFMEDIA_DEBUG # enable debugging in net/if_media.c # # Verbose SYSINIT Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Tue Apr 21 10:17:25 2015 (r281823) +++ head/sys/conf/options Tue Apr 21 10:35:23 2015 (r281824) @@ -553,6 +553,7 @@ LPT_DEBUG opt_lpt.h PLIP_DEBUG opt_plip.h LOCKF_DEBUG opt_debug_lockf.h SI_DEBUG opt_debug_si.h +IFMEDIA_DEBUG opt_ifmedia.h # Fb options FB_DEBUG opt_fb.h Modified: head/sys/net/if_media.c ============================================================================== --- head/sys/net/if_media.c Tue Apr 21 10:17:25 2015 (r281823) +++ head/sys/net/if_media.c Tue Apr 21 10:35:23 2015 (r281824) @@ -46,6 +46,8 @@ * to implement this interface. */ +#include "opt_ifmedia.h" + #include #include #include From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 10:55:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DBBD0CD9; Tue, 21 Apr 2015 10:55:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C9DA0161B; Tue, 21 Apr 2015 10:55:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3LAtrN1022319; Tue, 21 Apr 2015 10:55:53 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3LAtrR1022318; Tue, 21 Apr 2015 10:55:53 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504211055.t3LAtrR1022318@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 21 Apr 2015 10:55:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281825 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 10:55:54 -0000 Author: mav Date: Tue Apr 21 10:55:53 2015 New Revision: 281825 URL: https://svnweb.freebsd.org/changeset/base/281825 Log: Rewrite physio() to not allocate pbufs for unmapped I/O. pbufs is a limited resource, and their allocator is not SMP-scalable. So instead of always allocating pbuf to immediately convert it to bio, allocate bio just here. If buffer needs kernel mapping, then pbuf is still allocated, but used only as a source of KVA and storage for a list of held pages. On 40-core system doing many 512-byte reads from user level to array of raw SSDs this change removes huge lock congestion inside pbuf allocator. It improves peak performance from ~300K to ~1.2M IOPS. On my previous 24-core system this problem also existed, but was less serious. Reviewed by: kib MFC after: 2 weeks Modified: head/sys/kern/kern_physio.c Modified: head/sys/kern/kern_physio.c ============================================================================== --- head/sys/kern/kern_physio.c Tue Apr 21 10:35:23 2015 (r281824) +++ head/sys/kern/kern_physio.c Tue Apr 21 10:55:53 2015 (r281825) @@ -25,27 +25,26 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +#include #include +#include #include +#include int physio(struct cdev *dev, struct uio *uio, int ioflag) { - struct buf *bp; - struct cdevsw *csw; + struct buf *pbuf; + struct bio *bp; + struct vm_page **pages; caddr_t sa; - u_int iolen; - int error, i, mapped; - - /* Keep the process UPAGES from being swapped. XXX: why ? */ - PHOLD(curproc); - - bp = getpbuf(NULL); - sa = bp->b_data; - error = 0; + u_int iolen, poff; + int error, i, npages, maxpages; + vm_prot_t prot; /* XXX: sanity check */ if(dev->si_iosize_max < PAGE_SIZE) { @@ -76,95 +75,128 @@ physio(struct cdev *dev, struct uio *uio uprintf("%s: request vectors=%d > 1; " "cannot split request\n", devtoname(dev), uio->uio_iovcnt); - - error = EFBIG; - goto doerror; + return (EFBIG); } + /* + * Keep the process UPAGES from being swapped. Processes swapped + * out while holding pbufs, used by swapper, may lead to deadlock. + */ + PHOLD(curproc); + + bp = g_alloc_bio(); + if (uio->uio_segflg != UIO_USERSPACE) { + pbuf = NULL; + pages = NULL; + } else if ((dev->si_flags & SI_UNMAPPED) && unmapped_buf_allowed) { + pbuf = NULL; + maxpages = btoc(MIN(uio->uio_resid, MAXPHYS)) + 1; + pages = malloc(sizeof(*pages) * maxpages, M_DEVBUF, M_WAITOK); + } else { + pbuf = getpbuf(NULL); + sa = pbuf->b_data; + maxpages = btoc(MAXPHYS); + pages = pbuf->b_pages; + } + prot = VM_PROT_READ; + if (uio->uio_rw == UIO_READ) + prot |= VM_PROT_WRITE; /* Less backwards than it looks */ + error = 0; for (i = 0; i < uio->uio_iovcnt; i++) { while (uio->uio_iov[i].iov_len) { - bp->b_flags = 0; + bzero(bp, sizeof(*bp)); if (uio->uio_rw == UIO_READ) { - bp->b_iocmd = BIO_READ; + bp->bio_cmd = BIO_READ; curthread->td_ru.ru_inblock++; } else { - bp->b_iocmd = BIO_WRITE; + bp->bio_cmd = BIO_WRITE; curthread->td_ru.ru_oublock++; } - bp->b_iodone = bdone; - bp->b_data = uio->uio_iov[i].iov_base; - bp->b_bcount = uio->uio_iov[i].iov_len; - bp->b_offset = uio->uio_offset; - bp->b_iooffset = uio->uio_offset; - bp->b_saveaddr = sa; - - /* Don't exceed drivers iosize limit */ - if (bp->b_bcount > dev->si_iosize_max) - bp->b_bcount = dev->si_iosize_max; - - /* - * Make sure the pbuf can map the request - * XXX: The pbuf has kvasize = MAXPHYS so a request - * XXX: larger than MAXPHYS - PAGE_SIZE must be - * XXX: page aligned or it will be fragmented. + bp->bio_offset = uio->uio_offset; + bp->bio_data = uio->uio_iov[i].iov_base; + bp->bio_length = uio->uio_iov[i].iov_len; + if (bp->bio_length > dev->si_iosize_max) + bp->bio_length = dev->si_iosize_max; + if (bp->bio_length > MAXPHYS) + bp->bio_length = MAXPHYS; + + /* + * Make sure the pbuf can map the request. + * The pbuf has kvasize = MAXPHYS, so a request + * larger than MAXPHYS - PAGE_SIZE must be + * page aligned or it will be fragmented. */ - iolen = ((vm_offset_t) bp->b_data) & PAGE_MASK; - if ((bp->b_bcount + iolen) > bp->b_kvasize) { - /* - * This device does not want I/O to be split. - */ + poff = (vm_offset_t)bp->bio_data & PAGE_MASK; + if (pbuf && bp->bio_length + poff > pbuf->b_kvasize) { if (dev->si_flags & SI_NOSPLIT) { uprintf("%s: request ptr %p is not " "on a page boundary; cannot split " "request\n", devtoname(dev), - bp->b_data); + bp->bio_data); error = EFBIG; goto doerror; } - bp->b_bcount = bp->b_kvasize; - if (iolen != 0) - bp->b_bcount -= PAGE_SIZE; + bp->bio_length = pbuf->b_kvasize; + if (poff != 0) + bp->bio_length -= PAGE_SIZE; } - bp->b_bufsize = bp->b_bcount; - bp->b_blkno = btodb(bp->b_offset); + bp->bio_bcount = bp->bio_length; + bp->bio_dev = dev; - csw = dev->si_devsw; - if (uio->uio_segflg == UIO_USERSPACE) { - if (dev->si_flags & SI_UNMAPPED) - mapped = 0; - else - mapped = 1; - if (vmapbuf(bp, mapped) < 0) { + if (pages) { + if ((npages = vm_fault_quick_hold_pages( + &curproc->p_vmspace->vm_map, + (vm_offset_t)bp->bio_data, bp->bio_length, + prot, pages, maxpages)) < 0) { error = EFAULT; goto doerror; } + if (pbuf) { + pmap_qenter((vm_offset_t)sa, + pages, npages); + bp->bio_data = sa + poff; + } else { + bp->bio_ma = pages; + bp->bio_ma_n = npages; + bp->bio_ma_offset = poff; + bp->bio_data = unmapped_buf; + bp->bio_flags |= BIO_UNMAPPED; + } } - dev_strategy_csw(dev, csw, bp); + dev->si_devsw->d_strategy(bp); if (uio->uio_rw == UIO_READ) - bwait(bp, PRIBIO, "physrd"); + biowait(bp, "physrd"); else - bwait(bp, PRIBIO, "physwr"); + biowait(bp, "physwr"); + + if (pages) { + if (pbuf) + pmap_qremove((vm_offset_t)sa, npages); + vm_page_unhold_pages(pages, npages); + } - if (uio->uio_segflg == UIO_USERSPACE) - vunmapbuf(bp); - iolen = bp->b_bcount - bp->b_resid; - if (iolen == 0 && !(bp->b_ioflags & BIO_ERROR)) + iolen = bp->bio_length - bp->bio_resid; + if (iolen == 0 && !(bp->bio_flags & BIO_ERROR)) goto doerror; /* EOF */ uio->uio_iov[i].iov_len -= iolen; uio->uio_iov[i].iov_base = (char *)uio->uio_iov[i].iov_base + iolen; uio->uio_resid -= iolen; uio->uio_offset += iolen; - if( bp->b_ioflags & BIO_ERROR) { - error = bp->b_error; + if (bp->bio_flags & BIO_ERROR) { + error = bp->bio_error; goto doerror; } } } doerror: - relpbuf(bp, NULL); + if (pbuf) + relpbuf(pbuf, NULL); + else if (pages) + free(pages, M_DEVBUF); + g_destroy_bio(bp); PRELE(curproc); return (error); } From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 11:27:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B4C074ED; Tue, 21 Apr 2015 11:27:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A07E51955; Tue, 21 Apr 2015 11:27:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3LBRvvR044468; Tue, 21 Apr 2015 11:27:57 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3LBRonj044390; Tue, 21 Apr 2015 11:27:50 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504211127.t3LBRonj044390@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 21 Apr 2015 11:27:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281826 - in stable/10/sys/dev: aac aacraid advansys aha ahb amr buslogic bwi bwn ciss ct dpt ida if_ndis iir mlx mly trm twe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 11:27:57 -0000 Author: mav Date: Tue Apr 21 11:27:50 2015 New Revision: 281826 URL: https://svnweb.freebsd.org/changeset/base/281826 Log: MFC r280347: Remove MAXBSIZE use from drivers where it has nothing to do. In some cases limits are just not needed, in others -- DFLTPHYS is the right constant to use instead. Modified: stable/10/sys/dev/aac/aac.c stable/10/sys/dev/aacraid/aacraid.c stable/10/sys/dev/advansys/adwcam.c stable/10/sys/dev/aha/aha.c stable/10/sys/dev/ahb/ahb.c stable/10/sys/dev/amr/amr_pci.c stable/10/sys/dev/buslogic/bt.c stable/10/sys/dev/bwi/if_bwi.c stable/10/sys/dev/bwn/if_bwn.c stable/10/sys/dev/ciss/ciss.c stable/10/sys/dev/ct/ct_isa.c stable/10/sys/dev/dpt/dpt_scsi.c stable/10/sys/dev/ida/ida.c stable/10/sys/dev/ida/ida_eisa.c stable/10/sys/dev/ida/ida_pci.c stable/10/sys/dev/if_ndis/if_ndis_pci.c stable/10/sys/dev/iir/iir.c stable/10/sys/dev/iir/iir_pci.c stable/10/sys/dev/mlx/mlx.c stable/10/sys/dev/mlx/mlx_pci.c stable/10/sys/dev/mly/mly.c stable/10/sys/dev/trm/trm.c stable/10/sys/dev/twe/twe.c stable/10/sys/dev/twe/twe_freebsd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/aac/aac.c ============================================================================== --- stable/10/sys/dev/aac/aac.c Tue Apr 21 10:55:53 2015 (r281825) +++ stable/10/sys/dev/aac/aac.c Tue Apr 21 11:27:50 2015 (r281826) @@ -507,9 +507,9 @@ aac_alloc(struct aac_softc *sc) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, /* maxsize */ + sc->aac_max_sectors << 9, /* maxsize */ sc->aac_sg_tablesize, /* nsegments */ - MAXBSIZE, /* maxsegsize */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ BUS_DMA_ALLOCNOW, /* flags */ busdma_lock_mutex, /* lockfunc */ &sc->aac_io_lock, /* lockfuncarg */ Modified: stable/10/sys/dev/aacraid/aacraid.c ============================================================================== --- stable/10/sys/dev/aacraid/aacraid.c Tue Apr 21 10:55:53 2015 (r281825) +++ stable/10/sys/dev/aacraid/aacraid.c Tue Apr 21 11:27:50 2015 (r281826) @@ -597,9 +597,9 @@ aac_alloc(struct aac_softc *sc) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, /* maxsize */ + sc->aac_max_sectors << 9, /* maxsize */ sc->aac_sg_tablesize, /* nsegments */ - MAXBSIZE, /* maxsegsize */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ BUS_DMA_ALLOCNOW, /* flags */ busdma_lock_mutex, /* lockfunc */ &sc->aac_io_lock, /* lockfuncarg */ Modified: stable/10/sys/dev/advansys/adwcam.c ============================================================================== --- stable/10/sys/dev/advansys/adwcam.c Tue Apr 21 10:55:53 2015 (r281825) +++ stable/10/sys/dev/advansys/adwcam.c Tue Apr 21 11:27:50 2015 (r281826) @@ -965,7 +965,7 @@ adw_init(struct adw_softc *adw) /* highaddr */ BUS_SPACE_MAXADDR, /* filter */ NULL, /* filterarg */ NULL, - /* maxsize */ MAXBSIZE, + /* maxsize */ DFLTPHYS, /* nsegments */ ADW_SGSIZE, /* maxsegsz */ BUS_SPACE_MAXSIZE_32BIT, /* flags */ BUS_DMA_ALLOCNOW, Modified: stable/10/sys/dev/aha/aha.c ============================================================================== --- stable/10/sys/dev/aha/aha.c Tue Apr 21 10:55:53 2015 (r281825) +++ stable/10/sys/dev/aha/aha.c Tue Apr 21 11:27:50 2015 (r281826) @@ -460,7 +460,7 @@ aha_init(struct aha_softc* aha) /* highaddr */ BUS_SPACE_MAXADDR, /* filter */ NULL, /* filterarg */ NULL, - /* maxsize */ MAXBSIZE, + /* maxsize */ DFLTPHYS, /* nsegments */ AHA_NSEG, /* maxsegsz */ BUS_SPACE_MAXSIZE_24BIT, /* flags */ BUS_DMA_ALLOCNOW, Modified: stable/10/sys/dev/ahb/ahb.c ============================================================================== --- stable/10/sys/dev/ahb/ahb.c Tue Apr 21 10:55:53 2015 (r281825) +++ stable/10/sys/dev/ahb/ahb.c Tue Apr 21 11:27:50 2015 (r281826) @@ -298,7 +298,7 @@ ahbattach(device_t dev) /* highaddr */ BUS_SPACE_MAXADDR, /* filter */ NULL, /* filterarg */ NULL, - /* maxsize */ MAXBSIZE, + /* maxsize */ DFLTPHYS, /* nsegments */ AHB_NSEG, /* maxsegsz */ BUS_SPACE_MAXSIZE_32BIT, /* flags */ BUS_DMA_ALLOCNOW, Modified: stable/10/sys/dev/amr/amr_pci.c ============================================================================== --- stable/10/sys/dev/amr/amr_pci.c Tue Apr 21 10:55:53 2015 (r281825) +++ stable/10/sys/dev/amr/amr_pci.c Tue Apr 21 11:27:50 2015 (r281826) @@ -261,7 +261,8 @@ amr_pci_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, AMR_NSEG, /* maxsize, nsegments */ + BUS_SPACE_MAXSIZE, /* maxsize */ + BUS_SPACE_UNRESTRICTED, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ 0, /* flags */ NULL, NULL, /* lockfunc, lockarg */ @@ -278,8 +279,9 @@ amr_pci_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, AMR_NSEG, /* maxsize, nsegments */ - MAXBSIZE, /* maxsegsize */ + DFLTPHYS, /* maxsize */ + AMR_NSEG, /* nsegments */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ 0, /* flags */ busdma_lock_mutex, /* lockfunc */ &sc->amr_list_lock, /* lockarg */ @@ -293,8 +295,9 @@ amr_pci_attach(device_t dev) BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, AMR_NSEG, /* maxsize, nsegments */ - MAXBSIZE, /* maxsegsize */ + DFLTPHYS, /* maxsize */ + AMR_NSEG, /* nsegments */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ 0, /* flags */ busdma_lock_mutex, /* lockfunc */ &sc->amr_list_lock, /* lockarg */ Modified: stable/10/sys/dev/buslogic/bt.c ============================================================================== --- stable/10/sys/dev/buslogic/bt.c Tue Apr 21 10:55:53 2015 (r281825) +++ stable/10/sys/dev/buslogic/bt.c Tue Apr 21 11:27:50 2015 (r281826) @@ -728,7 +728,7 @@ bt_init(device_t dev) /* highaddr */ BUS_SPACE_MAXADDR, /* filter */ NULL, /* filterarg */ NULL, - /* maxsize */ MAXBSIZE, + /* maxsize */ DFLTPHYS, /* nsegments */ BT_NSEG, /* maxsegsz */ BUS_SPACE_MAXSIZE_32BIT, /* flags */ BUS_DMA_ALLOCNOW, Modified: stable/10/sys/dev/bwi/if_bwi.c ============================================================================== --- stable/10/sys/dev/bwi/if_bwi.c Tue Apr 21 10:55:53 2015 (r281825) +++ stable/10/sys/dev/bwi/if_bwi.c Tue Apr 21 11:27:50 2015 (r281826) @@ -1915,7 +1915,7 @@ bwi_dma_alloc(struct bwi_softc *sc) lowaddr, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, /* maxsize */ + BUS_SPACE_MAXSIZE, /* maxsize */ BUS_SPACE_UNRESTRICTED, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ BUS_DMA_ALLOCNOW, /* flags */ Modified: stable/10/sys/dev/bwn/if_bwn.c ============================================================================== --- stable/10/sys/dev/bwn/if_bwn.c Tue Apr 21 10:55:53 2015 (r281825) +++ stable/10/sys/dev/bwn/if_bwn.c Tue Apr 21 11:27:50 2015 (r281826) @@ -10381,7 +10381,7 @@ bwn_dma_attach(struct bwn_mac *mac) lowaddr, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, /* maxsize */ + BUS_SPACE_MAXSIZE, /* maxsize */ BUS_SPACE_UNRESTRICTED, /* nsegments */ BUS_SPACE_MAXSIZE, /* maxsegsize */ 0, /* flags */ Modified: stable/10/sys/dev/ciss/ciss.c ============================================================================== --- stable/10/sys/dev/ciss/ciss.c Tue Apr 21 10:55:53 2015 (r281825) +++ stable/10/sys/dev/ciss/ciss.c Tue Apr 21 11:27:50 2015 (r281826) @@ -833,7 +833,7 @@ setup: BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ BUS_SPACE_MAXSIZE_32BIT, /* maxsize */ - CISS_MAX_SG_ELEMENTS, /* nsegments */ + BUS_SPACE_UNRESTRICTED, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ 0, /* flags */ NULL, NULL, /* lockfunc, lockarg */ @@ -851,7 +851,8 @@ setup: BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, CISS_MAX_SG_ELEMENTS, /* maxsize, nsegments */ + (CISS_MAX_SG_ELEMENTS - 1) * PAGE_SIZE, /* maxsize */ + CISS_MAX_SG_ELEMENTS, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ BUS_DMA_ALLOCNOW, /* flags */ busdma_lock_mutex, &sc->ciss_mtx, /* lockfunc, lockarg */ Modified: stable/10/sys/dev/ct/ct_isa.c ============================================================================== --- stable/10/sys/dev/ct/ct_isa.c Tue Apr 21 10:55:53 2015 (r281825) +++ stable/10/sys/dev/ct/ct_isa.c Tue Apr 21 11:27:50 2015 (r281826) @@ -214,7 +214,7 @@ ct_isa_attach(device_t dev) /* setup DMA map */ if (bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_24BIT, BUS_SPACE_MAXADDR, - NULL, NULL, MAXBSIZE, 1, + NULL, NULL, DFLTPHYS, 1, BUS_SPACE_MAXSIZE_32BIT, BUS_DMA_ALLOCNOW, NULL, NULL, &ct->sc_dmat) != 0) { @@ -230,7 +230,7 @@ ct_isa_attach(device_t dev) return ENXIO; } - bus_dmamap_load(ct->sc_dmat, ct->sc_dmamapt, vaddr, MAXBSIZE, + bus_dmamap_load(ct->sc_dmat, ct->sc_dmamapt, vaddr, DFLTPHYS, ct_dmamap, &addr, BUS_DMA_NOWAIT); /* setup machdep softc */ @@ -238,7 +238,7 @@ ct_isa_attach(device_t dev) bs->sc_io_control = 0; bs->sc_bounce_phys = (u_int8_t *)addr; bs->sc_bounce_addr = vaddr; - bs->sc_bounce_size = MAXBSIZE; + bs->sc_bounce_size = DFLTPHYS; bs->sc_minphys = (1 << 24); bs->sc_dmasync_before = ct_isa_dmasync_before; bs->sc_dmasync_after = ct_isa_dmasync_after; Modified: stable/10/sys/dev/dpt/dpt_scsi.c ============================================================================== --- stable/10/sys/dev/dpt/dpt_scsi.c Tue Apr 21 10:55:53 2015 (r281825) +++ stable/10/sys/dev/dpt/dpt_scsi.c Tue Apr 21 11:27:50 2015 (r281826) @@ -1389,7 +1389,7 @@ dpt_init(struct dpt_softc *dpt) /* highaddr */ BUS_SPACE_MAXADDR, /* filter */ NULL, /* filterarg */ NULL, - /* maxsize */ MAXBSIZE, + /* maxsize */ DFLTPHYS, /* nsegments */ dpt->sgsize, /* maxsegsz */ BUS_SPACE_MAXSIZE_32BIT, /* flags */ BUS_DMA_ALLOCNOW, Modified: stable/10/sys/dev/ida/ida.c ============================================================================== --- stable/10/sys/dev/ida/ida.c Tue Apr 21 10:55:53 2015 (r281825) +++ stable/10/sys/dev/ida/ida.c Tue Apr 21 11:27:50 2015 (r281826) @@ -241,7 +241,7 @@ ida_init(struct ida_softc *ida) /* highaddr */ BUS_SPACE_MAXADDR, /* filter */ NULL, /* filterarg */ NULL, - /* maxsize */ MAXBSIZE, + /* maxsize */ DFLTPHYS, /* nsegments */ IDA_NSEG, /* maxsegsz */ BUS_SPACE_MAXSIZE_32BIT, /* flags */ 0, Modified: stable/10/sys/dev/ida/ida_eisa.c ============================================================================== --- stable/10/sys/dev/ida/ida_eisa.c Tue Apr 21 10:55:53 2015 (r281825) +++ stable/10/sys/dev/ida/ida_eisa.c Tue Apr 21 11:27:50 2015 (r281826) @@ -302,8 +302,8 @@ ida_eisa_attach(device_t dev) /* highaddr */ BUS_SPACE_MAXADDR, /* filter */ NULL, /* filterarg */ NULL, - /* maxsize */ MAXBSIZE, - /* nsegments */ IDA_NSEG, + /* maxsize */ BUS_SPACE_MAXSIZE_32BIT, + /* nsegments */ BUS_SPACE_UNRESTRICTED, /* maxsegsize */ BUS_SPACE_MAXSIZE_32BIT, /* flags */ BUS_DMA_ALLOCNOW, /* lockfunc */ NULL, Modified: stable/10/sys/dev/ida/ida_pci.c ============================================================================== --- stable/10/sys/dev/ida/ida_pci.c Tue Apr 21 10:55:53 2015 (r281825) +++ stable/10/sys/dev/ida/ida_pci.c Tue Apr 21 11:27:50 2015 (r281826) @@ -265,8 +265,8 @@ ida_pci_attach(device_t dev) /* highaddr */ BUS_SPACE_MAXADDR, /* filter */ NULL, /* filterarg */ NULL, - /* maxsize */ MAXBSIZE, - /* nsegments */ IDA_NSEG, + /* maxsize */ BUS_SPACE_MAXSIZE_32BIT, + /* nsegments */ BUS_SPACE_UNRESTRICTED, /* maxsegsize */ BUS_SPACE_MAXSIZE_32BIT, /* flags */ BUS_DMA_ALLOCNOW, /* lockfunc */ NULL, Modified: stable/10/sys/dev/if_ndis/if_ndis_pci.c ============================================================================== --- stable/10/sys/dev/if_ndis/if_ndis_pci.c Tue Apr 21 10:55:53 2015 (r281825) +++ stable/10/sys/dev/if_ndis/if_ndis_pci.c Tue Apr 21 11:27:50 2015 (r281826) @@ -295,7 +295,8 @@ ndis_attach_pci(dev) BUS_SPACE_MAXADDR_32BIT,/* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, NDIS_NSEG_NEW,/* maxsize, nsegments */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsize */ + NDIS_NSEG_NEW, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT,/* maxsegsize */ BUS_DMA_ALLOCNOW, /* flags */ NULL, NULL, /* lockfunc, lockarg */ Modified: stable/10/sys/dev/iir/iir.c ============================================================================== --- stable/10/sys/dev/iir/iir.c Tue Apr 21 10:55:53 2015 (r281825) +++ stable/10/sys/dev/iir/iir.c Tue Apr 21 11:27:50 2015 (r281826) @@ -201,7 +201,8 @@ iir_init(struct gdt_softc *gdt) /*lowaddr*/BUS_SPACE_MAXADDR_32BIT, /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, - /*maxsize*/MAXBSIZE, /*nsegments*/GDT_MAXSG, + /*maxsize*/DFLTPHYS, + /*nsegments*/GDT_MAXSG, /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT, /*flags*/BUS_DMA_ALLOCNOW, /*lockfunc*/busdma_lock_mutex, Modified: stable/10/sys/dev/iir/iir_pci.c ============================================================================== --- stable/10/sys/dev/iir/iir_pci.c Tue Apr 21 10:55:53 2015 (r281825) +++ stable/10/sys/dev/iir/iir_pci.c Tue Apr 21 11:27:50 2015 (r281826) @@ -307,7 +307,7 @@ iir_pci_attach(device_t dev) /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, /*maxsize*/BUS_SPACE_MAXSIZE_32BIT, - /*nsegments*/GDT_MAXSG, + /*nsegments*/BUS_SPACE_UNRESTRICTED, /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT, /*flags*/0, /*lockfunc*/busdma_lock_mutex, /*lockarg*/&gdt->sc_lock, &gdt->sc_parent_dmat) != 0) { Modified: stable/10/sys/dev/mlx/mlx.c ============================================================================== --- stable/10/sys/dev/mlx/mlx.c Tue Apr 21 10:55:53 2015 (r281825) +++ stable/10/sys/dev/mlx/mlx.c Tue Apr 21 11:27:50 2015 (r281826) @@ -392,7 +392,8 @@ mlx_attach(struct mlx_softc *sc) BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, MLX_NSEG, /* maxsize, nsegments */ + MLX_MAXPHYS, /* maxsize */ + MLX_NSEG, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ 0, /* flags */ busdma_lock_mutex, /* lockfunc */ Modified: stable/10/sys/dev/mlx/mlx_pci.c ============================================================================== --- stable/10/sys/dev/mlx/mlx_pci.c Tue Apr 21 10:55:53 2015 (r281825) +++ stable/10/sys/dev/mlx/mlx_pci.c Tue Apr 21 11:27:50 2015 (r281826) @@ -189,7 +189,8 @@ mlx_pci_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, MLX_NSEG, /* maxsize, nsegments */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsize */ + BUS_SPACE_UNRESTRICTED, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ BUS_DMA_ALLOCNOW, /* flags */ NULL, /* lockfunc */ Modified: stable/10/sys/dev/mly/mly.c ============================================================================== --- stable/10/sys/dev/mly/mly.c Tue Apr 21 10:55:53 2015 (r281825) +++ stable/10/sys/dev/mly/mly.c Tue Apr 21 11:27:50 2015 (r281826) @@ -383,7 +383,8 @@ mly_pci_attach(struct mly_softc *sc) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, MLY_MAX_SGENTRIES, /* maxsize, nsegments */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsize */ + BUS_SPACE_UNRESTRICTED, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ BUS_DMA_ALLOCNOW, /* flags */ NULL, /* lockfunc */ @@ -401,7 +402,8 @@ mly_pci_attach(struct mly_softc *sc) BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, MLY_MAX_SGENTRIES, /* maxsize, nsegments */ + DFLTPHYS, /* maxsize */ + MLY_MAX_SGENTRIES, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ 0, /* flags */ busdma_lock_mutex, /* lockfunc */ Modified: stable/10/sys/dev/trm/trm.c ============================================================================== --- stable/10/sys/dev/trm/trm.c Tue Apr 21 10:55:53 2015 (r281825) +++ stable/10/sys/dev/trm/trm.c Tue Apr 21 11:27:50 2015 (r281826) @@ -3382,7 +3382,7 @@ trm_init(u_int16_t unit, device_t dev) /*highaddr*/ BUS_SPACE_MAXADDR, /*filter*/ NULL, /*filterarg*/ NULL, - /*maxsize*/ MAXBSIZE, + /*maxsize*/ TRM_MAXPHYS, /*nsegments*/ TRM_NSEG, /*maxsegsz*/ TRM_MAXTRANSFER_SIZE, /*flags*/ BUS_DMA_ALLOCNOW, Modified: stable/10/sys/dev/twe/twe.c ============================================================================== --- stable/10/sys/dev/twe/twe.c Tue Apr 21 10:55:53 2015 (r281825) +++ stable/10/sys/dev/twe/twe.c Tue Apr 21 11:27:50 2015 (r281826) @@ -985,7 +985,7 @@ twe_immediate_request(struct twe_request if (usetmp && (tr->tr_data != NULL)) { tr->tr_flags |= TWE_CMD_IMMEDIATE; - if (tr->tr_length > MAXBSIZE) + if (tr->tr_length > DFLTPHYS) return (EINVAL); bcopy(tr->tr_data, sc->twe_immediate, tr->tr_length); } Modified: stable/10/sys/dev/twe/twe_freebsd.c ============================================================================== --- stable/10/sys/dev/twe/twe_freebsd.c Tue Apr 21 10:55:53 2015 (r281825) +++ stable/10/sys/dev/twe/twe_freebsd.c Tue Apr 21 11:27:50 2015 (r281826) @@ -233,7 +233,8 @@ twe_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, TWE_MAX_SGL_LENGTH, /* maxsize, nsegments */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsize */ + BUS_SPACE_UNRESTRICTED, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ 0, /* flags */ NULL, /* lockfunc */ @@ -301,7 +302,8 @@ twe_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, TWE_MAX_SGL_LENGTH,/* maxsize, nsegments */ + (TWE_MAX_SGL_LENGTH - 1) * PAGE_SIZE,/* maxsize */ + TWE_MAX_SGL_LENGTH, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ BUS_DMA_ALLOCNOW, /* flags */ busdma_lock_mutex, /* lockfunc */ @@ -320,7 +322,7 @@ twe_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, 1, /* maxsize, nsegments */ + DFLTPHYS, 1, /* maxsize, nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ 0, /* flags */ NULL, /* lockfunc */ From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 11:29:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3EF1A62B; Tue, 21 Apr 2015 11:29:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2ADAD195F; Tue, 21 Apr 2015 11:29:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3LBTFZH045332; Tue, 21 Apr 2015 11:29:15 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3LBT8MU045227; Tue, 21 Apr 2015 11:29:08 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504211129.t3LBT8MU045227@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 21 Apr 2015 11:29:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281827 - in stable/9/sys/dev: aac aacraid advansys aha ahb amr buslogic bwi bwn ciss ct dpt ida if_ndis iir mlx mly trm twe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 11:29:15 -0000 Author: mav Date: Tue Apr 21 11:29:07 2015 New Revision: 281827 URL: https://svnweb.freebsd.org/changeset/base/281827 Log: MFC r280347: Remove MAXBSIZE use from drivers where it has nothing to do. In some cases limits are just not needed, in others -- DFLTPHYS is the right constant to use instead. Modified: stable/9/sys/dev/aac/aac.c stable/9/sys/dev/aacraid/aacraid.c stable/9/sys/dev/advansys/adwcam.c stable/9/sys/dev/aha/aha.c stable/9/sys/dev/ahb/ahb.c stable/9/sys/dev/amr/amr_pci.c stable/9/sys/dev/buslogic/bt.c stable/9/sys/dev/bwi/if_bwi.c stable/9/sys/dev/bwn/if_bwn.c stable/9/sys/dev/ciss/ciss.c stable/9/sys/dev/ct/ct_isa.c stable/9/sys/dev/dpt/dpt_scsi.c stable/9/sys/dev/ida/ida.c stable/9/sys/dev/ida/ida_eisa.c stable/9/sys/dev/ida/ida_pci.c stable/9/sys/dev/if_ndis/if_ndis_pci.c stable/9/sys/dev/iir/iir.c stable/9/sys/dev/iir/iir_pci.c stable/9/sys/dev/mlx/mlx.c stable/9/sys/dev/mlx/mlx_pci.c stable/9/sys/dev/mly/mly.c stable/9/sys/dev/trm/trm.c stable/9/sys/dev/twe/twe.c stable/9/sys/dev/twe/twe_freebsd.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/aac/aac.c ============================================================================== --- stable/9/sys/dev/aac/aac.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/aac/aac.c Tue Apr 21 11:29:07 2015 (r281827) @@ -507,9 +507,9 @@ aac_alloc(struct aac_softc *sc) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, /* maxsize */ + sc->aac_max_sectors << 9, /* maxsize */ sc->aac_sg_tablesize, /* nsegments */ - MAXBSIZE, /* maxsegsize */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ BUS_DMA_ALLOCNOW, /* flags */ busdma_lock_mutex, /* lockfunc */ &sc->aac_io_lock, /* lockfuncarg */ Modified: stable/9/sys/dev/aacraid/aacraid.c ============================================================================== --- stable/9/sys/dev/aacraid/aacraid.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/aacraid/aacraid.c Tue Apr 21 11:29:07 2015 (r281827) @@ -597,9 +597,9 @@ aac_alloc(struct aac_softc *sc) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, /* maxsize */ + sc->aac_max_sectors << 9, /* maxsize */ sc->aac_sg_tablesize, /* nsegments */ - MAXBSIZE, /* maxsegsize */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ BUS_DMA_ALLOCNOW, /* flags */ busdma_lock_mutex, /* lockfunc */ &sc->aac_io_lock, /* lockfuncarg */ Modified: stable/9/sys/dev/advansys/adwcam.c ============================================================================== --- stable/9/sys/dev/advansys/adwcam.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/advansys/adwcam.c Tue Apr 21 11:29:07 2015 (r281827) @@ -965,7 +965,7 @@ adw_init(struct adw_softc *adw) /* highaddr */ BUS_SPACE_MAXADDR, /* filter */ NULL, /* filterarg */ NULL, - /* maxsize */ MAXBSIZE, + /* maxsize */ DFLTPHYS, /* nsegments */ ADW_SGSIZE, /* maxsegsz */ BUS_SPACE_MAXSIZE_32BIT, /* flags */ BUS_DMA_ALLOCNOW, Modified: stable/9/sys/dev/aha/aha.c ============================================================================== --- stable/9/sys/dev/aha/aha.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/aha/aha.c Tue Apr 21 11:29:07 2015 (r281827) @@ -460,7 +460,7 @@ aha_init(struct aha_softc* aha) /* highaddr */ BUS_SPACE_MAXADDR, /* filter */ NULL, /* filterarg */ NULL, - /* maxsize */ MAXBSIZE, + /* maxsize */ DFLTPHYS, /* nsegments */ AHA_NSEG, /* maxsegsz */ BUS_SPACE_MAXSIZE_24BIT, /* flags */ BUS_DMA_ALLOCNOW, Modified: stable/9/sys/dev/ahb/ahb.c ============================================================================== --- stable/9/sys/dev/ahb/ahb.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/ahb/ahb.c Tue Apr 21 11:29:07 2015 (r281827) @@ -298,7 +298,7 @@ ahbattach(device_t dev) /* highaddr */ BUS_SPACE_MAXADDR, /* filter */ NULL, /* filterarg */ NULL, - /* maxsize */ MAXBSIZE, + /* maxsize */ DFLTPHYS, /* nsegments */ AHB_NSEG, /* maxsegsz */ BUS_SPACE_MAXSIZE_32BIT, /* flags */ BUS_DMA_ALLOCNOW, Modified: stable/9/sys/dev/amr/amr_pci.c ============================================================================== --- stable/9/sys/dev/amr/amr_pci.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/amr/amr_pci.c Tue Apr 21 11:29:07 2015 (r281827) @@ -261,7 +261,8 @@ amr_pci_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, AMR_NSEG, /* maxsize, nsegments */ + BUS_SPACE_MAXSIZE, /* maxsize */ + BUS_SPACE_UNRESTRICTED, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ 0, /* flags */ NULL, NULL, /* lockfunc, lockarg */ @@ -278,8 +279,9 @@ amr_pci_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, AMR_NSEG, /* maxsize, nsegments */ - MAXBSIZE, /* maxsegsize */ + DFLTPHYS, /* maxsize */ + AMR_NSEG, /* nsegments */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ 0, /* flags */ busdma_lock_mutex, /* lockfunc */ &sc->amr_list_lock, /* lockarg */ @@ -293,8 +295,9 @@ amr_pci_attach(device_t dev) BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, AMR_NSEG, /* maxsize, nsegments */ - MAXBSIZE, /* maxsegsize */ + DFLTPHYS, /* maxsize */ + AMR_NSEG, /* nsegments */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ 0, /* flags */ busdma_lock_mutex, /* lockfunc */ &sc->amr_list_lock, /* lockarg */ Modified: stable/9/sys/dev/buslogic/bt.c ============================================================================== --- stable/9/sys/dev/buslogic/bt.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/buslogic/bt.c Tue Apr 21 11:29:07 2015 (r281827) @@ -728,7 +728,7 @@ bt_init(device_t dev) /* highaddr */ BUS_SPACE_MAXADDR, /* filter */ NULL, /* filterarg */ NULL, - /* maxsize */ MAXBSIZE, + /* maxsize */ DFLTPHYS, /* nsegments */ BT_NSEG, /* maxsegsz */ BUS_SPACE_MAXSIZE_32BIT, /* flags */ BUS_DMA_ALLOCNOW, Modified: stable/9/sys/dev/bwi/if_bwi.c ============================================================================== --- stable/9/sys/dev/bwi/if_bwi.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/bwi/if_bwi.c Tue Apr 21 11:29:07 2015 (r281827) @@ -1914,7 +1914,7 @@ bwi_dma_alloc(struct bwi_softc *sc) lowaddr, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, /* maxsize */ + BUS_SPACE_MAXSIZE, /* maxsize */ BUS_SPACE_UNRESTRICTED, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ BUS_DMA_ALLOCNOW, /* flags */ Modified: stable/9/sys/dev/bwn/if_bwn.c ============================================================================== --- stable/9/sys/dev/bwn/if_bwn.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/bwn/if_bwn.c Tue Apr 21 11:29:07 2015 (r281827) @@ -10381,7 +10381,7 @@ bwn_dma_attach(struct bwn_mac *mac) lowaddr, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, /* maxsize */ + BUS_SPACE_MAXSIZE, /* maxsize */ BUS_SPACE_UNRESTRICTED, /* nsegments */ BUS_SPACE_MAXSIZE, /* maxsegsize */ 0, /* flags */ Modified: stable/9/sys/dev/ciss/ciss.c ============================================================================== --- stable/9/sys/dev/ciss/ciss.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/ciss/ciss.c Tue Apr 21 11:29:07 2015 (r281827) @@ -833,7 +833,7 @@ setup: BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ BUS_SPACE_MAXSIZE_32BIT, /* maxsize */ - CISS_MAX_SG_ELEMENTS, /* nsegments */ + BUS_SPACE_UNRESTRICTED, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ 0, /* flags */ NULL, NULL, /* lockfunc, lockarg */ @@ -851,7 +851,8 @@ setup: BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, CISS_MAX_SG_ELEMENTS, /* maxsize, nsegments */ + (CISS_MAX_SG_ELEMENTS - 1) * PAGE_SIZE, /* maxsize */ + CISS_MAX_SG_ELEMENTS, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ BUS_DMA_ALLOCNOW, /* flags */ busdma_lock_mutex, &sc->ciss_mtx, /* lockfunc, lockarg */ Modified: stable/9/sys/dev/ct/ct_isa.c ============================================================================== --- stable/9/sys/dev/ct/ct_isa.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/ct/ct_isa.c Tue Apr 21 11:29:07 2015 (r281827) @@ -240,7 +240,7 @@ ct_isa_attach(device_t dev) /* setup DMA map */ if (bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_24BIT, BUS_SPACE_MAXADDR, - NULL, NULL, MAXBSIZE, 1, + NULL, NULL, DFLTPHYS, 1, BUS_SPACE_MAXSIZE_32BIT, BUS_DMA_ALLOCNOW, NULL, NULL, &ct->sc_dmat) != 0) { @@ -256,7 +256,7 @@ ct_isa_attach(device_t dev) return ENXIO; } - bus_dmamap_load(ct->sc_dmat, ct->sc_dmamapt, vaddr, MAXBSIZE, + bus_dmamap_load(ct->sc_dmat, ct->sc_dmamapt, vaddr, DFLTPHYS, ct_dmamap, &addr, BUS_DMA_NOWAIT); /* setup machdep softc */ @@ -264,7 +264,7 @@ ct_isa_attach(device_t dev) bs->sc_io_control = 0; bs->sc_bounce_phys = (u_int8_t *)addr; bs->sc_bounce_addr = vaddr; - bs->sc_bounce_size = MAXBSIZE; + bs->sc_bounce_size = DFLTPHYS; bs->sc_minphys = (1 << 24); bs->sc_dmasync_before = ct_isa_dmasync_before; bs->sc_dmasync_after = ct_isa_dmasync_after; Modified: stable/9/sys/dev/dpt/dpt_scsi.c ============================================================================== --- stable/9/sys/dev/dpt/dpt_scsi.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/dpt/dpt_scsi.c Tue Apr 21 11:29:07 2015 (r281827) @@ -1390,7 +1390,7 @@ dpt_init(struct dpt_softc *dpt) /* highaddr */ BUS_SPACE_MAXADDR, /* filter */ NULL, /* filterarg */ NULL, - /* maxsize */ MAXBSIZE, + /* maxsize */ DFLTPHYS, /* nsegments */ dpt->sgsize, /* maxsegsz */ BUS_SPACE_MAXSIZE_32BIT, /* flags */ BUS_DMA_ALLOCNOW, Modified: stable/9/sys/dev/ida/ida.c ============================================================================== --- stable/9/sys/dev/ida/ida.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/ida/ida.c Tue Apr 21 11:29:07 2015 (r281827) @@ -234,7 +234,7 @@ ida_init(struct ida_softc *ida) /* highaddr */ BUS_SPACE_MAXADDR, /* filter */ NULL, /* filterarg */ NULL, - /* maxsize */ MAXBSIZE, + /* maxsize */ DFLTPHYS, /* nsegments */ IDA_NSEG, /* maxsegsz */ BUS_SPACE_MAXSIZE_32BIT, /* flags */ 0, Modified: stable/9/sys/dev/ida/ida_eisa.c ============================================================================== --- stable/9/sys/dev/ida/ida_eisa.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/ida/ida_eisa.c Tue Apr 21 11:29:07 2015 (r281827) @@ -300,8 +300,8 @@ ida_eisa_attach(device_t dev) /* highaddr */ BUS_SPACE_MAXADDR, /* filter */ NULL, /* filterarg */ NULL, - /* maxsize */ MAXBSIZE, - /* nsegments */ IDA_NSEG, + /* maxsize */ BUS_SPACE_MAXSIZE_32BIT, + /* nsegments */ BUS_SPACE_UNRESTRICTED, /* maxsegsize */ BUS_SPACE_MAXSIZE_32BIT, /* flags */ BUS_DMA_ALLOCNOW, /* lockfunc */ NULL, Modified: stable/9/sys/dev/ida/ida_pci.c ============================================================================== --- stable/9/sys/dev/ida/ida_pci.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/ida/ida_pci.c Tue Apr 21 11:29:07 2015 (r281827) @@ -263,8 +263,8 @@ ida_pci_attach(device_t dev) /* highaddr */ BUS_SPACE_MAXADDR, /* filter */ NULL, /* filterarg */ NULL, - /* maxsize */ MAXBSIZE, - /* nsegments */ IDA_NSEG, + /* maxsize */ BUS_SPACE_MAXSIZE_32BIT, + /* nsegments */ BUS_SPACE_UNRESTRICTED, /* maxsegsize */ BUS_SPACE_MAXSIZE_32BIT, /* flags */ BUS_DMA_ALLOCNOW, /* lockfunc */ NULL, Modified: stable/9/sys/dev/if_ndis/if_ndis_pci.c ============================================================================== --- stable/9/sys/dev/if_ndis/if_ndis_pci.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/if_ndis/if_ndis_pci.c Tue Apr 21 11:29:07 2015 (r281827) @@ -295,7 +295,8 @@ ndis_attach_pci(dev) BUS_SPACE_MAXADDR_32BIT,/* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, NDIS_NSEG_NEW,/* maxsize, nsegments */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsize */ + NDIS_NSEG_NEW, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT,/* maxsegsize */ BUS_DMA_ALLOCNOW, /* flags */ NULL, NULL, /* lockfunc, lockarg */ Modified: stable/9/sys/dev/iir/iir.c ============================================================================== --- stable/9/sys/dev/iir/iir.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/iir/iir.c Tue Apr 21 11:29:07 2015 (r281827) @@ -204,7 +204,8 @@ iir_init(struct gdt_softc *gdt) /*lowaddr*/BUS_SPACE_MAXADDR_32BIT, /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, - /*maxsize*/MAXBSIZE, /*nsegments*/GDT_MAXSG, + /*maxsize*/DFLTPHYS, + /*nsegments*/GDT_MAXSG, /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT, /*flags*/BUS_DMA_ALLOCNOW, /*lockfunc*/busdma_lock_mutex, /*lockarg*/&Giant, Modified: stable/9/sys/dev/iir/iir_pci.c ============================================================================== --- stable/9/sys/dev/iir/iir_pci.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/iir/iir_pci.c Tue Apr 21 11:29:07 2015 (r281827) @@ -323,7 +323,7 @@ iir_pci_attach(device_t dev) /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, /*maxsize*/BUS_SPACE_MAXSIZE_32BIT, - /*nsegments*/GDT_MAXSG, + /*nsegments*/BUS_SPACE_UNRESTRICTED, /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT, /*flags*/0, /*lockfunc*/busdma_lock_mutex, /*lockarg*/&Giant, &gdt->sc_parent_dmat) != 0) { Modified: stable/9/sys/dev/mlx/mlx.c ============================================================================== --- stable/9/sys/dev/mlx/mlx.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/mlx/mlx.c Tue Apr 21 11:29:07 2015 (r281827) @@ -378,7 +378,8 @@ mlx_attach(struct mlx_softc *sc) BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, MLX_NSEG, /* maxsize, nsegments */ + MLX_MAXPHYS, /* maxsize */ + MLX_NSEG, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ 0, /* flags */ busdma_lock_mutex, /* lockfunc */ Modified: stable/9/sys/dev/mlx/mlx_pci.c ============================================================================== --- stable/9/sys/dev/mlx/mlx_pci.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/mlx/mlx_pci.c Tue Apr 21 11:29:07 2015 (r281827) @@ -184,7 +184,8 @@ mlx_pci_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, MLX_NSEG, /* maxsize, nsegments */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsize */ + BUS_SPACE_UNRESTRICTED, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ BUS_DMA_ALLOCNOW, /* flags */ NULL, /* lockfunc */ Modified: stable/9/sys/dev/mly/mly.c ============================================================================== --- stable/9/sys/dev/mly/mly.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/mly/mly.c Tue Apr 21 11:29:07 2015 (r281827) @@ -383,7 +383,8 @@ mly_pci_attach(struct mly_softc *sc) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, MLY_MAX_SGENTRIES, /* maxsize, nsegments */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsize */ + BUS_SPACE_UNRESTRICTED, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ BUS_DMA_ALLOCNOW, /* flags */ NULL, /* lockfunc */ @@ -401,7 +402,8 @@ mly_pci_attach(struct mly_softc *sc) BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, MLY_MAX_SGENTRIES, /* maxsize, nsegments */ + DFLTPHYS, /* maxsize */ + MLY_MAX_SGENTRIES, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ 0, /* flags */ busdma_lock_mutex, /* lockfunc */ Modified: stable/9/sys/dev/trm/trm.c ============================================================================== --- stable/9/sys/dev/trm/trm.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/trm/trm.c Tue Apr 21 11:29:07 2015 (r281827) @@ -3386,7 +3386,7 @@ trm_init(u_int16_t unit, device_t dev) /*highaddr*/ BUS_SPACE_MAXADDR, /*filter*/ NULL, /*filterarg*/ NULL, - /*maxsize*/ MAXBSIZE, + /*maxsize*/ TRM_MAXPHYS, /*nsegments*/ TRM_NSEG, /*maxsegsz*/ TRM_MAXTRANSFER_SIZE, /*flags*/ BUS_DMA_ALLOCNOW, Modified: stable/9/sys/dev/twe/twe.c ============================================================================== --- stable/9/sys/dev/twe/twe.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/twe/twe.c Tue Apr 21 11:29:07 2015 (r281827) @@ -985,7 +985,7 @@ twe_immediate_request(struct twe_request if (usetmp && (tr->tr_data != NULL)) { tr->tr_flags |= TWE_CMD_IMMEDIATE; - if (tr->tr_length > MAXBSIZE) + if (tr->tr_length > DFLTPHYS) return (EINVAL); bcopy(tr->tr_data, sc->twe_immediate, tr->tr_length); } Modified: stable/9/sys/dev/twe/twe_freebsd.c ============================================================================== --- stable/9/sys/dev/twe/twe_freebsd.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/twe/twe_freebsd.c Tue Apr 21 11:29:07 2015 (r281827) @@ -233,7 +233,8 @@ twe_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, TWE_MAX_SGL_LENGTH, /* maxsize, nsegments */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsize */ + BUS_SPACE_UNRESTRICTED, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ 0, /* flags */ NULL, /* lockfunc */ @@ -301,7 +302,8 @@ twe_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, TWE_MAX_SGL_LENGTH,/* maxsize, nsegments */ + (TWE_MAX_SGL_LENGTH - 1) * PAGE_SIZE,/* maxsize */ + TWE_MAX_SGL_LENGTH, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ BUS_DMA_ALLOCNOW, /* flags */ busdma_lock_mutex, /* lockfunc */ @@ -320,7 +322,7 @@ twe_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, 1, /* maxsize, nsegments */ + DFLTPHYS, 1, /* maxsize, nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ 0, /* flags */ NULL, /* lockfunc */ From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 11:50:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87755C6D; Tue, 21 Apr 2015 11:50:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7505F1BE7; Tue, 21 Apr 2015 11:50:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3LBoXTU064255; Tue, 21 Apr 2015 11:50:33 GMT (envelope-from jah@FreeBSD.org) Received: (from jah@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3LBoWw4064248; Tue, 21 Apr 2015 11:50:32 GMT (envelope-from jah@FreeBSD.org) Message-Id: <201504211150.t3LBoWw4064248@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jah set sender to jah@FreeBSD.org using -f From: "Jason A. Harmening" Date: Tue, 21 Apr 2015 11:50:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281828 - head/sys/dev/iicbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 11:50:33 -0000 Author: jah Date: Tue Apr 21 11:50:31 2015 New Revision: 281828 URL: https://svnweb.freebsd.org/changeset/base/281828 Log: Fix numerous issues in iic(4) and iicbus(4): --Allow multiple open iic fds by storing addressing state in cdevpriv --Fix, as much as possible, the baked-in race conditions in the iic ioctl interface by requesting bus ownership on I2CSTART, releasing it on I2CSTOP/I2CRSTCARD, and requiring bus ownership by the current cdevpriv to use the I/O ioctls --Reduce internal iic buffer size and remove 1K read/write limit by iteratively calling iicbus_read/iicbus_write --Eliminate dynamic allocation in I2CWRITE/I2CREAD --Move handling of I2CRDWR to separate function and improve error handling --Add new I2CSADDR ioctl to store address in current cdevpriv so that I2CSTART is not needed for read(2)/write(2) to work --Redesign iicbus_request_bus() and iicbus_release_bus(): --iicbus_request_bus() no longer falls through if the bus is already owned by the requesting device. Multiple threads on the same device may want exclusive access. Also, iicbus_release_bus() was never device-recursive anyway. --Previously, if IICBUS_CALLBACK failed in iicbus_release_bus(), but the following iicbus_poll() call succeeded, IICBUS_CALLBACK would not be issued again --Do not hold iicbus mtx during IICBUS_CALLBACK call. There are several drivers that may sleep in IICBUS_CALLBACK, if IIC_WAIT is passed. --Do not loop in iicbus_request_bus if IICBUS_CALLBACK returns EWOULDBLOCK; instead pass that to the caller so that it can retry if so desired. Differential Revision: https://reviews.freebsd.org/D2140 Reviewed by: imp, jhb, loos Approved by: kib (mentor) Modified: head/sys/dev/iicbus/iic.c head/sys/dev/iicbus/iic.h head/sys/dev/iicbus/iicbus_if.m head/sys/dev/iicbus/iiconf.c Modified: head/sys/dev/iicbus/iic.c ============================================================================== --- head/sys/dev/iicbus/iic.c Tue Apr 21 11:29:07 2015 (r281827) +++ head/sys/dev/iicbus/iic.c Tue Apr 21 11:50:31 2015 (r281828) @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -44,28 +45,32 @@ #include "iicbus_if.h" -#define BUFSIZE 1024 - struct iic_softc { - device_t sc_dev; - u_char sc_addr; /* 7 bit address on iicbus */ - int sc_count; /* >0 if device opened */ - - char sc_buffer[BUFSIZE]; /* output buffer */ - char sc_inbuf[BUFSIZE]; /* input buffer */ - struct cdev *sc_devnode; - struct sx sc_lock; }; -#define IIC_LOCK(sc) sx_xlock(&(sc)->sc_lock) -#define IIC_UNLOCK(sc) sx_xunlock(&(sc)->sc_lock) +struct iic_cdevpriv { + struct sx lock; + struct iic_softc *sc; + bool started; + uint8_t addr; +}; + + +#define IIC_LOCK(cdp) sx_xlock(&(cdp)->lock) +#define IIC_UNLOCK(cdp) sx_xunlock(&(cdp)->lock) + +static MALLOC_DEFINE(M_IIC, "iic", "I2C device data"); static int iic_probe(device_t); static int iic_attach(device_t); static int iic_detach(device_t); static void iic_identify(driver_t *driver, device_t parent); +static void iicdtor(void *data); +static int iicuio_move(struct iic_cdevpriv *priv, struct uio *uio, int last); +static int iicuio(struct cdev *dev, struct uio *uio, int ioflag); +static int iicrdwr(struct iic_cdevpriv *priv, struct iic_rdwr_data *d, int flags); static devclass_t iic_devclass; @@ -89,18 +94,13 @@ static driver_t iic_driver = { }; static d_open_t iicopen; -static d_close_t iicclose; -static d_write_t iicwrite; -static d_read_t iicread; static d_ioctl_t iicioctl; static struct cdevsw iic_cdevsw = { .d_version = D_VERSION, - .d_flags = D_TRACKCLOSE, .d_open = iicopen, - .d_close = iicclose, - .d_read = iicread, - .d_write = iicwrite, + .d_read = iicuio, + .d_write = iicuio, .d_ioctl = iicioctl, .d_name = "iic", }; @@ -127,16 +127,15 @@ iic_probe(device_t dev) static int iic_attach(device_t dev) { - struct iic_softc *sc = (struct iic_softc *)device_get_softc(dev); + struct iic_softc *sc; + sc = device_get_softc(dev); sc->sc_dev = dev; - sx_init(&sc->sc_lock, "iic"); sc->sc_devnode = make_dev(&iic_cdevsw, device_get_unit(dev), UID_ROOT, GID_WHEEL, 0600, "iic%d", device_get_unit(dev)); if (sc->sc_devnode == NULL) { device_printf(dev, "failed to create character device\n"); - sx_destroy(&sc->sc_lock); return (ENXIO); } sc->sc_devnode->si_drv1 = sc; @@ -147,11 +146,12 @@ iic_attach(device_t dev) static int iic_detach(device_t dev) { - struct iic_softc *sc = (struct iic_softc *)device_get_softc(dev); + struct iic_softc *sc; + + sc = device_get_softc(dev); if (sc->sc_devnode) destroy_dev(sc->sc_devnode); - sx_destroy(&sc->sc_lock); return (0); } @@ -159,238 +159,331 @@ iic_detach(device_t dev) static int iicopen(struct cdev *dev, int flags, int fmt, struct thread *td) { - struct iic_softc *sc = dev->si_drv1; + struct iic_cdevpriv *priv; + int error; - IIC_LOCK(sc); - if (sc->sc_count > 0) { - IIC_UNLOCK(sc); - return (EBUSY); - } + priv = malloc(sizeof(*priv), M_IIC, M_WAITOK | M_ZERO); - sc->sc_count++; - IIC_UNLOCK(sc); + sx_init(&priv->lock, "iic"); + priv->sc = dev->si_drv1; - return (0); + error = devfs_set_cdevpriv(priv, iicdtor); + if (error != 0) + free(priv, M_IIC); + + return (error); } -static int -iicclose(struct cdev *dev, int flags, int fmt, struct thread *td) +static void +iicdtor(void *data) { - struct iic_softc *sc = dev->si_drv1; + device_t iicdev, parent; + struct iic_cdevpriv *priv; - IIC_LOCK(sc); - if (!sc->sc_count) { - /* XXX: I don't think this can happen. */ - IIC_UNLOCK(sc); - return (EINVAL); - } + priv = data; + KASSERT(priv != NULL, ("iic cdevpriv should not be NULL!")); - sc->sc_count--; + iicdev = priv->sc->sc_dev; + parent = device_get_parent(iicdev); - if (sc->sc_count < 0) - panic("%s: iic_count < 0!", __func__); - IIC_UNLOCK(sc); + if (priv->started) { + iicbus_stop(parent); + iicbus_reset(parent, IIC_UNKNOWN, 0, NULL); + iicbus_release_bus(parent, iicdev); + } - return (0); + sx_destroy(&priv->lock); + free(priv, M_IIC); } static int -iicwrite(struct cdev *dev, struct uio * uio, int ioflag) +iicuio_move(struct iic_cdevpriv *priv, struct uio *uio, int last) { - struct iic_softc *sc = dev->si_drv1; - device_t iicdev = sc->sc_dev; - int sent, error, count; - - IIC_LOCK(sc); - if (!sc->sc_addr) { - IIC_UNLOCK(sc); - return (EINVAL); + device_t parent; + int error, num_bytes, transferred_bytes, written_bytes; + char buffer[128]; + + parent = device_get_parent(priv->sc->sc_dev); + error = 0; + + /* + * We can only transfer up to sizeof(buffer) bytes in 1 shot, so loop until + * everything has been transferred. + */ + while ((error == 0) && (uio->uio_resid > 0)) { + + num_bytes = MIN(uio->uio_resid, sizeof(buffer)); + transferred_bytes = 0; + + if (uio->uio_rw == UIO_WRITE) { + error = uiomove(buffer, num_bytes, uio); + + while ((error == 0) && (transferred_bytes < num_bytes)) { + written_bytes = 0; + error = iicbus_write(parent, &buffer[transferred_bytes], + num_bytes - transferred_bytes, &written_bytes, 0); + transferred_bytes += written_bytes; + } + + } else if (uio->uio_rw == UIO_READ) { + error = iicbus_read(parent, buffer, + num_bytes, &transferred_bytes, + ((uio->uio_resid <= sizeof(buffer)) ? last : 0), 0); + if (error == 0) + error = uiomove(buffer, transferred_bytes, uio); + } } - if (sc->sc_count == 0) { - /* XXX: I don't think this can happen. */ - IIC_UNLOCK(sc); - return (EINVAL); - } + return (error); +} - error = iicbus_request_bus(device_get_parent(iicdev), iicdev, - IIC_DONTWAIT); - if (error) { - IIC_UNLOCK(sc); +static int +iicuio(struct cdev *dev, struct uio *uio, int ioflag) +{ + device_t parent; + struct iic_cdevpriv *priv; + int error; + uint8_t addr; + + priv = NULL; + error = devfs_get_cdevpriv((void**)&priv); + + if (error != 0) return (error); + KASSERT(priv != NULL, ("iic cdevpriv should not be NULL!")); + + IIC_LOCK(priv); + if (priv->started || (priv->addr == 0)) { + IIC_UNLOCK(priv); + return (ENXIO); } + parent = device_get_parent(priv->sc->sc_dev); - count = min(uio->uio_resid, BUFSIZE); - error = uiomove(sc->sc_buffer, count, uio); - if (error) { - IIC_UNLOCK(sc); + error = iicbus_request_bus(parent, priv->sc->sc_dev, + (ioflag & O_NONBLOCK) ? IIC_DONTWAIT : (IIC_WAIT | IIC_INTR)); + if (error != 0) { + IIC_UNLOCK(priv); return (error); } - error = iicbus_block_write(device_get_parent(iicdev), sc->sc_addr, - sc->sc_buffer, count, &sent); + if (uio->uio_rw == UIO_READ) + addr = priv->addr | LSB; + else + addr = priv->addr & ~LSB; + + error = iicbus_start(parent, addr, 0); + if (error != 0) + { + iicbus_release_bus(parent, priv->sc->sc_dev); + IIC_UNLOCK(priv); + return (error); + } - iicbus_release_bus(device_get_parent(iicdev), iicdev); - IIC_UNLOCK(sc); + error = iicuio_move(priv, uio, IIC_LAST_READ); + iicbus_stop(parent); + iicbus_release_bus(parent, priv->sc->sc_dev); + IIC_UNLOCK(priv); return (error); } static int -iicread(struct cdev *dev, struct uio * uio, int ioflag) +iicrdwr(struct iic_cdevpriv *priv, struct iic_rdwr_data *d, int flags) { - struct iic_softc *sc = dev->si_drv1; - device_t iicdev = sc->sc_dev; - int len, error = 0; - int bufsize; - - IIC_LOCK(sc); - if (!sc->sc_addr) { - IIC_UNLOCK(sc); - return (EINVAL); - } + struct iic_msg *buf, *m; + void **usrbufs; + device_t iicdev, parent; + int error, i; - if (sc->sc_count == 0) { - /* XXX: I don't think this can happen. */ - IIC_UNLOCK(sc); - return (EINVAL); - } + iicdev = priv->sc->sc_dev; + parent = device_get_parent(iicdev); + error = 0; - error = iicbus_request_bus(device_get_parent(iicdev), iicdev, - IIC_DONTWAIT); - if (error) { - IIC_UNLOCK(sc); - return (error); - } + buf = malloc(sizeof(*d->msgs) * d->nmsgs, M_IIC, M_WAITOK); - /* max amount of data to read */ - len = min(uio->uio_resid, BUFSIZE); + error = copyin(d->msgs, buf, sizeof(*d->msgs) * d->nmsgs); - error = iicbus_block_read(device_get_parent(iicdev), sc->sc_addr, - sc->sc_inbuf, len, &bufsize); - if (error) { - IIC_UNLOCK(sc); - return (error); + /* Alloc kernel buffers for userland data, copyin write data */ + usrbufs = malloc(sizeof(void *) * d->nmsgs, M_IIC, M_WAITOK | M_ZERO); + + for (i = 0; i < d->nmsgs; i++) { + m = &(buf[i]); + usrbufs[i] = m->buf; + + /* + * At least init the buffer to NULL so we can safely free() it later. + * If the copyin() to buf failed, don't try to malloc bogus m->len. + */ + m->buf = NULL; + if (error != 0) + continue; + m->buf = malloc(m->len, M_IIC, M_WAITOK); + if (!(m->flags & IIC_M_RD)) + error = copyin(usrbufs[i], m->buf, m->len); } - if (bufsize > uio->uio_resid) - panic("%s: too much data read!", __func__); + if (error == 0) + error = iicbus_request_bus(parent, iicdev, + (flags & O_NONBLOCK) ? IIC_DONTWAIT : (IIC_WAIT | IIC_INTR)); - iicbus_release_bus(device_get_parent(iicdev), iicdev); + if (error == 0) { + error = iicbus_transfer(iicdev, buf, d->nmsgs); + iicbus_release_bus(parent, iicdev); + } - error = uiomove(sc->sc_inbuf, bufsize, uio); - IIC_UNLOCK(sc); + /* Copyout all read segments, free up kernel buffers */ + for (i = 0; i < d->nmsgs; i++) { + m = &(buf[i]); + if ((error == 0) && (m->flags & IIC_M_RD)) + error = copyout(m->buf, usrbufs[i], m->len); + free(m->buf, M_IIC); + } + + free(usrbufs, M_IIC); + free(buf, M_IIC); return (error); } static int iicioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thread *td) { - struct iic_softc *sc = dev->si_drv1; - device_t iicdev = sc->sc_dev; - device_t parent = device_get_parent(iicdev); - struct iiccmd *s = (struct iiccmd *)data; - struct iic_rdwr_data *d = (struct iic_rdwr_data *)data; - struct iic_msg *m; - int error, count, i; - char *buf = NULL; - void **usrbufs = NULL; - - if ((error = iicbus_request_bus(parent, iicdev, - (flags & O_NONBLOCK) ? IIC_DONTWAIT : (IIC_WAIT | IIC_INTR)))) + device_t parent, iicdev; + struct iiccmd *s; + struct uio ubuf; + struct iovec uvec; + struct iic_cdevpriv *priv; + int error; + + s = (struct iiccmd *)data; + error = devfs_get_cdevpriv((void**)&priv); + if (error != 0) return (error); + KASSERT(priv != NULL, ("iic cdevpriv should not be NULL!")); + + iicdev = priv->sc->sc_dev; + parent = device_get_parent(iicdev); + IIC_LOCK(priv); + + switch (cmd) { case I2CSTART: - IIC_LOCK(sc); - error = iicbus_start(parent, s->slave, 0); + if (priv->started) { + error = EINVAL; + break; + } + error = iicbus_request_bus(parent, iicdev, + (flags & O_NONBLOCK) ? IIC_DONTWAIT : (IIC_WAIT | IIC_INTR)); - /* - * Implicitly set the chip addr to the slave addr passed as - * parameter. Consequently, start/stop shall be called before - * the read or the write of a block. - */ - if (!error) - sc->sc_addr = s->slave; - IIC_UNLOCK(sc); + if (error == 0) + error = iicbus_start(parent, s->slave, 0); + + if (error == 0) { + priv->addr = s->slave; + priv->started = true; + } else + iicbus_release_bus(parent, iicdev); break; case I2CSTOP: - error = iicbus_stop(parent); + if (priv->started) { + error = iicbus_stop(parent); + iicbus_release_bus(parent, iicdev); + priv->started = false; + } + break; case I2CRSTCARD: - error = iicbus_reset(parent, IIC_UNKNOWN, 0, NULL); /* - * Ignore IIC_ENOADDR as it only means we have a master-only - * controller. - */ - if (error == IIC_ENOADDR) - error = 0; + * Bus should be owned before we reset it. + * We allow the bus to be already owned as the result of an in-progress + * sequence; however, bus reset will always be followed by release + * (a new start is presumably needed for I/O anyway). */ + if (!priv->started) + error = iicbus_request_bus(parent, iicdev, + (flags & O_NONBLOCK) ? IIC_DONTWAIT : (IIC_WAIT | IIC_INTR)); + + if (error == 0) { + error = iicbus_reset(parent, IIC_UNKNOWN, 0, NULL); + /* + * Ignore IIC_ENOADDR as it only means we have a master-only + * controller. + */ + if (error == IIC_ENOADDR) + error = 0; + + iicbus_release_bus(parent, iicdev); + priv->started = false; + } break; case I2CWRITE: - if (s->count <= 0) { + if (!priv->started) { error = EINVAL; break; } - buf = malloc((unsigned long)s->count, M_TEMP, M_WAITOK); - error = copyin(s->buf, buf, s->count); - if (error) - break; - error = iicbus_write(parent, buf, s->count, &count, 10); + uvec.iov_base = s->buf; + uvec.iov_len = s->count; + ubuf.uio_iov = &uvec; + ubuf.uio_iovcnt = 1; + ubuf.uio_segflg = UIO_USERSPACE; + ubuf.uio_td = td; + ubuf.uio_resid = s->count; + ubuf.uio_offset = 0; + ubuf.uio_rw = UIO_WRITE; + error = iicuio_move(priv, &ubuf, 0); break; case I2CREAD: - if (s->count <= 0) { + if (!priv->started) { error = EINVAL; break; } - buf = malloc((unsigned long)s->count, M_TEMP, M_WAITOK); - error = iicbus_read(parent, buf, s->count, &count, s->last, 10); - if (error) - break; - error = copyout(buf, s->buf, s->count); + uvec.iov_base = s->buf; + uvec.iov_len = s->count; + ubuf.uio_iov = &uvec; + ubuf.uio_iovcnt = 1; + ubuf.uio_segflg = UIO_USERSPACE; + ubuf.uio_td = td; + ubuf.uio_resid = s->count; + ubuf.uio_offset = 0; + ubuf.uio_rw = UIO_READ; + error = iicuio_move(priv, &ubuf, s->last); break; case I2CRDWR: - buf = malloc(sizeof(*d->msgs) * d->nmsgs, M_TEMP, M_WAITOK); - error = copyin(d->msgs, buf, sizeof(*d->msgs) * d->nmsgs); - if (error) + /* + * The rdwr list should be a self-contained set of + * transactions. Fail if another transaction is in progress. + */ + if (priv->started) { + error = EINVAL; break; - /* Alloc kernel buffers for userland data, copyin write data */ - usrbufs = malloc(sizeof(void *) * d->nmsgs, M_TEMP, M_ZERO | M_WAITOK); - for (i = 0; i < d->nmsgs; i++) { - m = &((struct iic_msg *)buf)[i]; - usrbufs[i] = m->buf; - m->buf = malloc(m->len, M_TEMP, M_WAITOK); - if (!(m->flags & IIC_M_RD)) - copyin(usrbufs[i], m->buf, m->len); - } - error = iicbus_transfer(iicdev, (struct iic_msg *)buf, d->nmsgs); - /* Copyout all read segments, free up kernel buffers */ - for (i = 0; i < d->nmsgs; i++) { - m = &((struct iic_msg *)buf)[i]; - if (m->flags & IIC_M_RD) - copyout(m->buf, usrbufs[i], m->len); - free(m->buf, M_TEMP); } - free(usrbufs, M_TEMP); + + error = iicrdwr(priv, (struct iic_rdwr_data *)data, flags); + break; case I2CRPTSTART: + if (!priv->started) { + error = EINVAL; + break; + } error = iicbus_repeated_start(parent, s->slave, 0); break; + case I2CSADDR: + priv->addr = *((uint8_t*)data); + break; + default: error = ENOTTY; } - iicbus_release_bus(parent, iicdev); - - if (buf != NULL) - free(buf, M_TEMP); + IIC_UNLOCK(priv); return (error); } Modified: head/sys/dev/iicbus/iic.h ============================================================================== --- head/sys/dev/iicbus/iic.h Tue Apr 21 11:29:07 2015 (r281827) +++ head/sys/dev/iicbus/iic.h Tue Apr 21 11:50:31 2015 (r281828) @@ -63,5 +63,6 @@ struct iic_rdwr_data { #define I2CREAD _IOW('i', 5, struct iiccmd) /* receive data */ #define I2CRDWR _IOW('i', 6, struct iic_rdwr_data) /* General read/write interface */ #define I2CRPTSTART _IOW('i', 7, struct iiccmd) /* repeated start */ +#define I2CSADDR _IOW('i', 8, uint8_t) /* set slave address for future I/O */ #endif Modified: head/sys/dev/iicbus/iicbus_if.m ============================================================================== --- head/sys/dev/iicbus/iicbus_if.m Tue Apr 21 11:29:07 2015 (r281827) +++ head/sys/dev/iicbus/iicbus_if.m Tue Apr 21 11:50:31 2015 (r281828) @@ -51,6 +51,10 @@ METHOD int intr { # # iicbus callback +# Request ownership of bus +# index: IIC_REQUEST_BUS or IIC_RELEASE_BUS +# data: pointer to int containing IIC_WAIT or IIC_DONTWAIT and either IIC_INTR or IIC_NOINTR +# This function is allowed to sleep if *data contains IIC_WAIT. # METHOD int callback { device_t dev; Modified: head/sys/dev/iicbus/iiconf.c ============================================================================== --- head/sys/dev/iicbus/iiconf.c Tue Apr 21 11:29:07 2015 (r281827) +++ head/sys/dev/iicbus/iiconf.c Tue Apr 21 11:50:31 2015 (r281828) @@ -71,7 +71,6 @@ iicbus_poll(struct iicbus_softc *sc, int default: return (EWOULDBLOCK); - break; } return (error); @@ -90,31 +89,32 @@ iicbus_request_bus(device_t bus, device_ struct iicbus_softc *sc = (struct iicbus_softc *)device_get_softc(bus); int error = 0; - /* first, ask the underlying layers if the request is ok */ IICBUS_LOCK(sc); - do { - error = IICBUS_CALLBACK(device_get_parent(bus), - IIC_REQUEST_BUS, (caddr_t)&how); - if (error) - error = iicbus_poll(sc, how); - } while (error == EWOULDBLOCK); - while (!error) { - if (sc->owner && sc->owner != dev) { + while ((error == 0) && (sc->owner != NULL)) + error = iicbus_poll(sc, how); - error = iicbus_poll(sc, how); - } else { - sc->owner = dev; + if (error == 0) { + sc->owner = dev; + /* + * Drop the lock around the call to the bus driver. + * This call should be allowed to sleep in the IIC_WAIT case. + * Drivers might also need to grab locks that would cause LOR + * if our lock is held. + */ + IICBUS_UNLOCK(sc); + /* Ask the underlying layers if the request is ok */ + error = IICBUS_CALLBACK(device_get_parent(bus), + IIC_REQUEST_BUS, (caddr_t)&how); + IICBUS_LOCK(sc); - IICBUS_UNLOCK(sc); - return (0); + if (error != 0) { + sc->owner = NULL; + wakeup_one(sc); } - - /* free any allocated resource */ - if (error) - IICBUS_CALLBACK(device_get_parent(bus), IIC_RELEASE_BUS, - (caddr_t)&how); } + + IICBUS_UNLOCK(sc); return (error); @@ -131,12 +131,6 @@ iicbus_release_bus(device_t bus, device_ struct iicbus_softc *sc = (struct iicbus_softc *)device_get_softc(bus); int error; - /* first, ask the underlying layers if the release is ok */ - error = IICBUS_CALLBACK(device_get_parent(bus), IIC_RELEASE_BUS, NULL); - - if (error) - return (error); - IICBUS_LOCK(sc); if (sc->owner != dev) { @@ -144,13 +138,26 @@ iicbus_release_bus(device_t bus, device_ return (EACCES); } - sc->owner = NULL; - - /* wakeup waiting processes */ - wakeup(sc); + /* + * Drop the lock around the call to the bus driver. + * This call should be allowed to sleep in the IIC_WAIT case. + * Drivers might also need to grab locks that would cause LOR + * if our lock is held. + */ IICBUS_UNLOCK(sc); + /* Ask the underlying layers if the release is ok */ + error = IICBUS_CALLBACK(device_get_parent(bus), IIC_RELEASE_BUS, NULL); - return (0); + if (error == 0) { + IICBUS_LOCK(sc); + sc->owner = NULL; + + /* wakeup a waiting thread */ + wakeup_one(sc); + IICBUS_UNLOCK(sc); + } + + return (error); } /* From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 12:40:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 80658837; Tue, 21 Apr 2015 12:40:56 +0000 (UTC) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 418031228; Tue, 21 Apr 2015 12:40:55 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id E26CF1047520; Tue, 21 Apr 2015 22:40:51 +1000 (AEST) Date: Tue, 21 Apr 2015 22:40:46 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov cc: Bruce Evans , David Chisnall , John Baldwin , Justin Hibbits , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281721 - head/sys/sys In-Reply-To: <20150421095900.GL2390@kib.kiev.ua> Message-ID: <20150421222539.J2985@besplex.bde.org> References: <201504190033.t3J0XMDX041769@svn.freebsd.org> <476583045.Qcb6O2DFtY@ralph.baldwin.cx> <20150421020808.D10623@besplex.bde.org> <785A553E-317E-4C80-83A0-567C80697ED8@FreeBSD.org> <20150421184157.Y2048@besplex.bde.org> <20150421095900.GL2390@kib.kiev.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=L/MkHYj8 c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=yh1_mKi3brNwCaDYqQkA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 12:40:56 -0000 On Tue, 21 Apr 2015, Konstantin Belousov wrote: > On Tue, Apr 21, 2015 at 07:32:30PM +1000, Bruce Evans wrote: >> On Tue, 21 Apr 2015, David Chisnall wrote: >> >>> On 20 Apr 2015, at 17:19, Bruce Evans wrote: >>>> >>>> Enums should never be used in ABIs, since their size can be anything >>>> large enough. >>> >>> The rules for the size of enums also differ between C and C++, though clang (and, I think, gcc) support an attribute for specifying the enum type. >>> >>>> They also cause namespace problems. The whole enum declaration must >>>> be exposed in any header that uses an enum type. >>> >>> Both C and C++ permit forward declarations of enums for use in function prototypes and so on, e.g.: >>> >>> enum foo; >>> void >>> bar(enum foo); >> >> No, they cannot do this since the size may depend on the internals of the >> enum: >> >> TendDRA-5.0.0: >> "z.c", line 1: Error: >> [ISO C90 6.5.2.3]: Can't declare the enumeration 'enum foo'. >> > This is not true for C. The i386 ABI specification, from year _1997_, > states that enum must be 4-bytes unsigned entity, 4-bytes aligned. See page > 28 of abi386-4.pdf. That is only the i386 implementation of C. Good enough for ABI portability. Is it really so broken as to specify unsigned? enum values have type int, so unsigned cannot represent all of them. Unrepresentable enums are detected in all compilers I tested, but the error handling is broken except in gcc: clang-current: z.c:1:29: warning: overflow in enumeration value enum foo { xx = 0x7fffffff, yy }; ^ 1 warning generated. gcc4.2.1: z.c:1: error: overflow in enumeration values TenDRA-5.0.0: trans:/tmp/tccljzRYO/_tcc.t: internal error: constant out of range TendDRA also suffers from the C90 design error of not allowing a comma after yy. It detects this and handles it perfectly brokenly to C90 spec: "z.c", line 1: Error: [Syntax]: Extra comma at end of list. Bruce From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 13:55:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D495179F; Tue, 21 Apr 2015 13:55:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C287A1A99; Tue, 21 Apr 2015 13:55:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3LDtPTm059553; Tue, 21 Apr 2015 13:55:25 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3LDtOen059543; Tue, 21 Apr 2015 13:55:24 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201504211355.t3LDtOen059543@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 21 Apr 2015 13:55:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281829 - in head/sys: compat/linux kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 13:55:26 -0000 Author: trasz Date: Tue Apr 21 13:55:24 2015 New Revision: 281829 URL: https://svnweb.freebsd.org/changeset/base/281829 Log: Modify kern___getcwd() to take max pathlen limit as an additional argument. This will be used for the Linux emulation layer - for Linux, PATH_MAX is 4096 and not 1024. Differential Revision: https://reviews.freebsd.org/D2335 Reviewed by: kib@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/compat/linux/linux_getcwd.c head/sys/compat/linux/linux_misc.h head/sys/kern/vfs_cache.c head/sys/sys/syscallsubr.h Modified: head/sys/compat/linux/linux_getcwd.c ============================================================================== --- head/sys/compat/linux/linux_getcwd.c Tue Apr 21 11:50:31 2015 (r281828) +++ head/sys/compat/linux/linux_getcwd.c Tue Apr 21 13:55:24 2015 (r281829) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include #endif +#include #include #include @@ -423,14 +424,14 @@ linux_getcwd(struct thread *td, struct l len = args->bufsize; - if (len > MAXPATHLEN*4) - len = MAXPATHLEN*4; + if (len > LINUX_PATH_MAX) + len = LINUX_PATH_MAX; else if (len < 2) return ERANGE; path = malloc(len, M_TEMP, M_WAITOK); - error = kern___getcwd(td, path, UIO_SYSSPACE, len); + error = kern___getcwd(td, path, UIO_SYSSPACE, len, LINUX_PATH_MAX); if (!error) { lenused = strlen(path) + 1; if (lenused <= args->bufsize) { Modified: head/sys/compat/linux/linux_misc.h ============================================================================== --- head/sys/compat/linux/linux_misc.h Tue Apr 21 11:50:31 2015 (r281828) +++ head/sys/compat/linux/linux_misc.h Tue Apr 21 13:55:24 2015 (r281829) @@ -55,6 +55,8 @@ #define LINUX_MREMAP_MAYMOVE 1 #define LINUX_MREMAP_FIXED 2 +#define LINUX_PATH_MAX 4096 + extern const char *linux_platform; /* Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Tue Apr 21 11:50:31 2015 (r281828) +++ head/sys/kern/vfs_cache.c Tue Apr 21 13:55:24 2015 (r281829) @@ -1053,11 +1053,13 @@ sys___getcwd(td, uap) struct __getcwd_args *uap; { - return (kern___getcwd(td, uap->buf, UIO_USERSPACE, uap->buflen)); + return (kern___getcwd(td, uap->buf, UIO_USERSPACE, uap->buflen, + MAXPATHLEN)); } int -kern___getcwd(struct thread *td, char *buf, enum uio_seg bufseg, u_int buflen) +kern___getcwd(struct thread *td, char *buf, enum uio_seg bufseg, u_int buflen, + u_int path_max) { char *bp, *tmpbuf; struct filedesc *fdp; @@ -1068,8 +1070,8 @@ kern___getcwd(struct thread *td, char *b return (ENODEV); if (buflen < 2) return (EINVAL); - if (buflen > MAXPATHLEN) - buflen = MAXPATHLEN; + if (buflen > path_max) + buflen = path_max; tmpbuf = malloc(buflen, M_TEMP, M_WAITOK); fdp = td->td_proc->p_fd; Modified: head/sys/sys/syscallsubr.h ============================================================================== --- head/sys/sys/syscallsubr.h Tue Apr 21 11:50:31 2015 (r281828) +++ head/sys/sys/syscallsubr.h Tue Apr 21 13:55:24 2015 (r281829) @@ -58,7 +58,7 @@ struct thr_param; struct __wrusage; int kern___getcwd(struct thread *td, char *buf, enum uio_seg bufseg, - u_int buflen); + u_int buflen, u_int path_max); int kern_accept(struct thread *td, int s, struct sockaddr **name, socklen_t *namelen, struct file **fp); int kern_accept4(struct thread *td, int s, struct sockaddr **name, From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 14:22:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF608FEA; Tue, 21 Apr 2015 14:22:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D27F1E61; Tue, 21 Apr 2015 14:22:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3LEMkrU083410; Tue, 21 Apr 2015 14:22:46 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3LEMksv083409; Tue, 21 Apr 2015 14:22:46 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201504211422.t3LEMksv083409@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 21 Apr 2015 14:22:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281830 - stable/10/share/man/man3 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 14:22:46 -0000 Author: brooks Date: Tue Apr 21 14:22:45 2015 New Revision: 281830 URL: https://svnweb.freebsd.org/changeset/base/281830 Log: MFC r281605,281768: r281605: Fix a minor function definition inconsistancy. r281768: Bump doc date missed in r281605. Modified: stable/10/share/man/man3/queue.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man3/queue.3 ============================================================================== --- stable/10/share/man/man3/queue.3 Tue Apr 21 13:55:24 2015 (r281829) +++ stable/10/share/man/man3/queue.3 Tue Apr 21 14:22:45 2015 (r281830) @@ -32,7 +32,7 @@ .\" @(#)queue.3 8.2 (Berkeley) 1/24/94 .\" $FreeBSD$ .\" -.Dd June 17, 2013 +.Dd April 16, 2015 .Dt QUEUE 3 .Os .Sh NAME @@ -151,7 +151,7 @@ lists and tail queues .Fn STAILQ_INSERT_AFTER "STAILQ_HEAD *head" "TYPE *listelm" "TYPE *elm" "STAILQ_ENTRY NAME" .Fn STAILQ_INSERT_HEAD "STAILQ_HEAD *head" "TYPE *elm" "STAILQ_ENTRY NAME" .Fn STAILQ_INSERT_TAIL "STAILQ_HEAD *head" "TYPE *elm" "STAILQ_ENTRY NAME" -.Fn STAILQ_LAST "STAILQ_HEAD *head" "TYPE" "STAILQ_ENTRY NAME" +.Fn STAILQ_LAST "STAILQ_HEAD *head" "TYPE *elm" "STAILQ_ENTRY NAME" .Fn STAILQ_NEXT "TYPE *elm" "STAILQ_ENTRY NAME" .Fn STAILQ_REMOVE_AFTER "STAILQ_HEAD *head" "TYPE *elm" "STAILQ_ENTRY NAME" .Fn STAILQ_REMOVE_HEAD "STAILQ_HEAD *head" "STAILQ_ENTRY NAME" From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 14:48:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19415849; Tue, 21 Apr 2015 14:48:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 06FE9111A; Tue, 21 Apr 2015 14:48:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3LEmIPI001104; Tue, 21 Apr 2015 14:48:18 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3LEmIlq001103; Tue, 21 Apr 2015 14:48:18 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201504211448.t3LEmIlq001103@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 21 Apr 2015 14:48:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281831 - stable/9/share/man/man3 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 14:48:19 -0000 Author: brooks Date: Tue Apr 21 14:48:18 2015 New Revision: 281831 URL: https://svnweb.freebsd.org/changeset/base/281831 Log: MFC r281605,281768: r281605: Fix a minor function definition inconsistancy. r281768: Bump doc date missed in r281605. Modified: stable/9/share/man/man3/queue.3 Directory Properties: stable/9/share/man/man3/ (props changed) Modified: stable/9/share/man/man3/queue.3 ============================================================================== --- stable/9/share/man/man3/queue.3 Tue Apr 21 14:22:45 2015 (r281830) +++ stable/9/share/man/man3/queue.3 Tue Apr 21 14:48:18 2015 (r281831) @@ -32,7 +32,7 @@ .\" @(#)queue.3 8.2 (Berkeley) 1/24/94 .\" $FreeBSD$ .\" -.Dd June 17, 2013 +.Dd April 16, 2015 .Dt QUEUE 3 .Os .Sh NAME @@ -151,7 +151,7 @@ lists and tail queues .Fn STAILQ_INSERT_AFTER "STAILQ_HEAD *head" "TYPE *listelm" "TYPE *elm" "STAILQ_ENTRY NAME" .Fn STAILQ_INSERT_HEAD "STAILQ_HEAD *head" "TYPE *elm" "STAILQ_ENTRY NAME" .Fn STAILQ_INSERT_TAIL "STAILQ_HEAD *head" "TYPE *elm" "STAILQ_ENTRY NAME" -.Fn STAILQ_LAST "STAILQ_HEAD *head" "TYPE" "STAILQ_ENTRY NAME" +.Fn STAILQ_LAST "STAILQ_HEAD *head" "TYPE *elm" "STAILQ_ENTRY NAME" .Fn STAILQ_NEXT "TYPE *elm" "STAILQ_ENTRY NAME" .Fn STAILQ_REMOVE_AFTER "STAILQ_HEAD *head" "TYPE *elm" "STAILQ_ENTRY NAME" .Fn STAILQ_REMOVE_HEAD "STAILQ_HEAD *head" "STAILQ_ENTRY NAME" From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 14:48:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C194997D; Tue, 21 Apr 2015 14:48:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC6A41123; Tue, 21 Apr 2015 14:48:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3LEmdM1001222; Tue, 21 Apr 2015 14:48:39 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3LEmdIO001221; Tue, 21 Apr 2015 14:48:39 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504211448.t3LEmdIO001221@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 21 Apr 2015 14:48:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281832 - head/release/tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 14:48:39 -0000 Author: gjb Date: Tue Apr 21 14:48:38 2015 New Revision: 281832 URL: https://svnweb.freebsd.org/changeset/base/281832 Log: Revert r281809, which did more harm than good, and apply a more proper fix when attempting to locate the /boot files. Sponsored by: The FreeBSD Foundation Modified: head/release/tools/vmimage.subr Modified: head/release/tools/vmimage.subr ============================================================================== --- head/release/tools/vmimage.subr Tue Apr 21 14:48:18 2015 (r281831) +++ head/release/tools/vmimage.subr Tue Apr 21 14:48:38 2015 (r281832) @@ -14,11 +14,11 @@ write_partition_layout() { SWAPOPT="-p freebsd-swap/swapfs::1G" fi - _OBJDIR="$(make -C ${WORLDDIR} -V .OBJDIR | tr -d '/usr/src')" - if [ -d "${_OBJDIR}/${TARGET}.${TARGET_ARCH}" ]; then - BOOTFILES="${_OBJDIR}/${TARGET}.${TARGET_ARCH}/usr/src/sys/boot" + _OBJDIR="$(make -C ${WORLDDIR} -V .OBJDIR)" + if [ -d "${_OBJDIR%%/usr/src}/${TARGET}.${TARGET_ARCH}" ]; then + BOOTFILES="/${_OBJDIR%%/usr/src}/${TARGET}.${TARGET_ARCH}/usr/src/sys/boot" else - BOOTFILES="${_OBJDIR}/usr/src/sys/boot" + BOOTFILES="/${_OBJDIR}/sys/boot" fi case "${TARGET}:${TARGET_ARCH}" in From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 15:00:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD01BC14; Tue, 21 Apr 2015 15:00:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9B0D21252; Tue, 21 Apr 2015 15:00:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3LF0oF2010331; Tue, 21 Apr 2015 15:00:50 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3LF0o6r010330; Tue, 21 Apr 2015 15:00:50 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201504211500.t3LF0o6r010330@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 21 Apr 2015 15:00:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r281833 - stable/8/share/man/man3 X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 15:00:50 -0000 Author: brooks Date: Tue Apr 21 15:00:49 2015 New Revision: 281833 URL: https://svnweb.freebsd.org/changeset/base/281833 Log: MFC r281605,281768: r281605: Fix a minor function definition inconsistancy. r281768: Bump doc date missed in r281605. Modified: stable/8/share/man/man3/queue.3 Directory Properties: stable/8/share/man/man3/ (props changed) Modified: stable/8/share/man/man3/queue.3 ============================================================================== --- stable/8/share/man/man3/queue.3 Tue Apr 21 14:48:38 2015 (r281832) +++ stable/8/share/man/man3/queue.3 Tue Apr 21 15:00:49 2015 (r281833) @@ -32,7 +32,7 @@ .\" @(#)queue.3 8.2 (Berkeley) 1/24/94 .\" $FreeBSD$ .\" -.Dd June 17, 2013 +.Dd April 16, 2015 .Dt QUEUE 3 .Os .Sh NAME @@ -150,7 +150,7 @@ lists and tail queues .Fn STAILQ_INSERT_AFTER "STAILQ_HEAD *head" "TYPE *listelm" "TYPE *elm" "STAILQ_ENTRY NAME" .Fn STAILQ_INSERT_HEAD "STAILQ_HEAD *head" "TYPE *elm" "STAILQ_ENTRY NAME" .Fn STAILQ_INSERT_TAIL "STAILQ_HEAD *head" "TYPE *elm" "STAILQ_ENTRY NAME" -.Fn STAILQ_LAST "STAILQ_HEAD *head" "TYPE" "STAILQ_ENTRY NAME" +.Fn STAILQ_LAST "STAILQ_HEAD *head" "TYPE *elm" "STAILQ_ENTRY NAME" .Fn STAILQ_NEXT "TYPE *elm" "STAILQ_ENTRY NAME" .Fn STAILQ_REMOVE_AFTER "STAILQ_HEAD *head" "TYPE *elm" "STAILQ_ENTRY NAME" .Fn STAILQ_REMOVE_HEAD "STAILQ_HEAD *head" "STAILQ_ENTRY NAME" From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 15:47:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2004EA66; Tue, 21 Apr 2015 15:47:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DE7818D1; Tue, 21 Apr 2015 15:47:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3LFl0Me047904; Tue, 21 Apr 2015 15:47:00 GMT (envelope-from garga@FreeBSD.org) Received: (from garga@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3LFl0wR047903; Tue, 21 Apr 2015 15:47:00 GMT (envelope-from garga@FreeBSD.org) Message-Id: <201504211547.t3LFl0wR047903@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: garga set sender to garga@FreeBSD.org using -f From: Renato Botelho Date: Tue, 21 Apr 2015 15:47:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281834 - stable/10/usr.bin/sort X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 15:47:01 -0000 Author: garga (ports committer) Date: Tue Apr 21 15:47:00 2015 New Revision: 281834 URL: https://svnweb.freebsd.org/changeset/base/281834 Log: Replace LDFLAGS by LDADD to fix sort build with -DNO_SHARED Differential Revision: https://reviews.freebsd.org/D2044 Reviewed by: sbruno@ Approved by: sbruno@ Sponsored by: Netgate Modified: stable/10/usr.bin/sort/Makefile Modified: stable/10/usr.bin/sort/Makefile ============================================================================== --- stable/10/usr.bin/sort/Makefile Tue Apr 21 15:00:49 2015 (r281833) +++ stable/10/usr.bin/sort/Makefile Tue Apr 21 15:47:00 2015 (r281834) @@ -13,10 +13,10 @@ CLEANFILES+= sort.1 .if defined(WITH_THREADS) CFLAGS+= -DSORT_THREADS -LDFLAGS+= -lpthread -lmd +LDADD+= -lpthread -lmd MAN_SUB+= -e 's|%%THREADS%%||g' .else -LDFLAGS+= -lmd +LDADD+= -lmd MAN_SUB+= -e 's|%%THREADS%%|\.\\"|g' .endif From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 16:54:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D5AE5F54; Tue, 21 Apr 2015 16:54:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2E9510EB; Tue, 21 Apr 2015 16:54:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3LGsLtj001908; Tue, 21 Apr 2015 16:54:21 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3LGsLDS001906; Tue, 21 Apr 2015 16:54:21 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504211654.t3LGsLDS001906@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 21 Apr 2015 16:54:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281835 - in stable: 10/release/doc/share/xml 8/release/doc/share/xml 9/release/doc/share/xml X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 16:54:22 -0000 Author: gjb Date: Tue Apr 21 16:54:21 2015 New Revision: 281835 URL: https://svnweb.freebsd.org/changeset/base/281835 Log: Document SA-15:07, SA-15:08, SA-15:09. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/share/xml/security.xml Changes in other areas also in this revision: Modified: stable/8/release/doc/share/xml/security.xml stable/9/release/doc/share/xml/security.xml Modified: stable/10/release/doc/share/xml/security.xml ============================================================================== --- stable/10/release/doc/share/xml/security.xml Tue Apr 21 15:47:00 2015 (r281834) +++ stable/10/release/doc/share/xml/security.xml Tue Apr 21 16:54:21 2015 (r281835) @@ -86,6 +86,29 @@ 19 March 2015 Multiple vulnerabilities + + + FreeBSD-SA-15:07.ntp + 7 April 2015 + Multiple vulnerabilities + + + + FreeBSD-SA-15:08.bsdinstall + 7 April 2015 + Insecure default GELI key file + permissions + + + + FreeBSD-SA-15:09.ipv6 + 7 April 2015 + Router advertisement Denial of + Service + From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 16:54:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20277F56; Tue, 21 Apr 2015 16:54:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D95D10ED; Tue, 21 Apr 2015 16:54:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3LGsMJr001931; Tue, 21 Apr 2015 16:54:22 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3LGsM3A001930; Tue, 21 Apr 2015 16:54:22 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504211654.t3LGsM3A001930@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 21 Apr 2015 16:54:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281835 - in stable: 10/release/doc/share/xml 8/release/doc/share/xml 9/release/doc/share/xml X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 16:54:23 -0000 Author: gjb Date: Tue Apr 21 16:54:21 2015 New Revision: 281835 URL: https://svnweb.freebsd.org/changeset/base/281835 Log: Document SA-15:07, SA-15:08, SA-15:09. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/share/xml/security.xml Changes in other areas also in this revision: Modified: stable/10/release/doc/share/xml/security.xml stable/8/release/doc/share/xml/security.xml Modified: stable/9/release/doc/share/xml/security.xml ============================================================================== --- stable/9/release/doc/share/xml/security.xml Tue Apr 21 15:47:00 2015 (r281834) +++ stable/9/release/doc/share/xml/security.xml Tue Apr 21 16:54:21 2015 (r281835) @@ -133,6 +133,21 @@ 19 March 2015 Multiple vulnerabilities + + + FreeBSD-SA-15:07.ntp + 7 April 2015 + Multiple vulnerabilities + + + + FreeBSD-SA-15:09.ipv6 + 7 April 2015 + Router advertisement Denial of + Service + From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 16:54:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79A79F55; Tue, 21 Apr 2015 16:54:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6706010EC; Tue, 21 Apr 2015 16:54:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3LGsMgf001921; Tue, 21 Apr 2015 16:54:22 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3LGsMVo001920; Tue, 21 Apr 2015 16:54:22 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504211654.t3LGsMVo001920@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 21 Apr 2015 16:54:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r281835 - in stable: 10/release/doc/share/xml 8/release/doc/share/xml 9/release/doc/share/xml X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 16:54:22 -0000 Author: gjb Date: Tue Apr 21 16:54:21 2015 New Revision: 281835 URL: https://svnweb.freebsd.org/changeset/base/281835 Log: Document SA-15:07, SA-15:08, SA-15:09. Sponsored by: The FreeBSD Foundation Modified: stable/8/release/doc/share/xml/security.xml Changes in other areas also in this revision: Modified: stable/10/release/doc/share/xml/security.xml stable/9/release/doc/share/xml/security.xml Modified: stable/8/release/doc/share/xml/security.xml ============================================================================== --- stable/8/release/doc/share/xml/security.xml Tue Apr 21 15:47:00 2015 (r281834) +++ stable/8/release/doc/share/xml/security.xml Tue Apr 21 16:54:21 2015 (r281835) @@ -238,6 +238,21 @@ 19 March 2015 Multiple vulnerabilities + + + FreeBSD-SA-15:07.ntp + 7 April 2015 + Multiple vulnerabilities + + + + FreeBSD-SA-15:09.ipv6 + 7 April 2015 + Router advertisement Denial of + Service + From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 17:02:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AFEB47A1; Tue, 21 Apr 2015 17:02:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9DC6E1202; Tue, 21 Apr 2015 17:02:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3LH2uL5010357; Tue, 21 Apr 2015 17:02:56 GMT (envelope-from garga@FreeBSD.org) Received: (from garga@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3LH2unT010355; Tue, 21 Apr 2015 17:02:56 GMT (envelope-from garga@FreeBSD.org) Message-Id: <201504211702.t3LH2unT010355@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: garga set sender to garga@FreeBSD.org using -f From: Renato Botelho Date: Tue, 21 Apr 2015 17:02:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281836 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 17:02:56 -0000 Author: garga (ports committer) Date: Tue Apr 21 17:02:55 2015 New Revision: 281836 URL: https://svnweb.freebsd.org/changeset/base/281836 Log: MFC r270155, r274490, r274593, r274607 Add native-xtools target to stable/10 Differential Revision: https://reviews.freebsd.org/D2044 Reviewed by: sbruno@ Approved by: sbruno@ Sponsored by: Netgate Modified: stable/10/Makefile stable/10/Makefile.inc1 Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile ============================================================================== --- stable/10/Makefile Tue Apr 21 16:54:21 2015 (r281835) +++ stable/10/Makefile Tue Apr 21 17:02:55 2015 (r281836) @@ -36,6 +36,8 @@ # specified with XDEV and XDEV_ARCH. # xdev-build - Build cross-development tools. # xdev-install - Install cross-development tools. +# native-xtools - Create host binaries that produce target objects +# for use in qemu user-mode jails. # # "quick" way to test all kernel builds: # _jflag=`sysctl -n hw.ncpu` @@ -110,6 +112,7 @@ TGTS= all all-man buildenv buildenvvars _worldtmp _legacy _bootstrap-tools _cleanobj _obj \ _build-tools _cross-tools _includes _libraries _depend \ build32 builddtb distribute32 install32 xdev xdev-build xdev-install \ + native-xtools \ TGTS+= ${SUBDIR_TARGETS} Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Tue Apr 21 16:54:21 2015 (r281835) +++ stable/10/Makefile.inc1 Tue Apr 21 17:02:55 2015 (r281836) @@ -1493,6 +1493,94 @@ cross-tools: .MAKE ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX} install .endfor +NXBENV= MAKEOBJDIRPREFIX=${OBJTREE}/nxb \ + INSTALL="sh ${.CURDIR}/tools/install.sh" \ + VERSION="${VERSION}" +NXBMAKE= ${NXBENV} ${MAKE} \ + TBLGEN=${OBJTREE}/nxb-bin/usr/bin/tblgen \ + CLANG_TBLGEN=${OBJTREE}/nxb-bin/usr/bin/clang-tblgen \ + MACHINE=${TARGET} MACHINE_ARCH=${TARGET_ARCH} \ + -DWITHOUT_GDB -DNO_TESTS \ + SSP_CFLAGS= \ + -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN \ + -DNO_PIC -DNO_PROFILE -DNO_SHARED \ + -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF \ + -DWITHOUT_CLANG_FULL -DWITHOUT_LLDB + +native-xtools: .MAKE + mkdir -p ${OBJTREE}/nxb-bin/bin + mkdir -p ${OBJTREE}/nxb-bin/sbin + mkdir -p ${OBJTREE}/nxb-bin/usr + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ + -p ${OBJTREE}/nxb-bin/usr >/dev/null + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ + -p ${OBJTREE}/nxb-bin/usr/include >/dev/null +.for _tool in \ + bin/cat \ + bin/chmod \ + bin/cp \ + bin/csh \ + bin/echo \ + bin/expr \ + bin/hostname \ + bin/ln \ + bin/ls \ + bin/mkdir \ + bin/mv \ + bin/ps \ + bin/realpath \ + bin/rm \ + bin/rmdir \ + bin/sh \ + bin/sleep \ + ${_clang_tblgen} \ + usr.bin/ar \ + ${_binutils} \ + ${_cc} \ + ${_gcc_tools} \ + ${_clang_libs} \ + ${_clang} \ + sbin/md5 \ + sbin/sysctl \ + gnu/usr.bin/diff \ + usr.bin/awk \ + usr.bin/basename \ + usr.bin/bmake \ + usr.bin/bzip2 \ + usr.bin/cmp \ + usr.bin/dirname \ + usr.bin/env \ + usr.bin/fetch \ + usr.bin/find \ + usr.bin/grep \ + usr.bin/gzip \ + usr.bin/id \ + usr.bin/lex \ + usr.bin/lorder \ + usr.bin/mktemp \ + usr.bin/mt \ + usr.bin/patch \ + usr.bin/sed \ + usr.bin/sort \ + usr.bin/tar \ + usr.bin/touch \ + usr.bin/tr \ + usr.bin/true \ + usr.bin/uniq \ + usr.bin/unzip \ + usr.bin/xargs \ + usr.bin/xinstall \ + usr.bin/xz \ + usr.bin/yacc \ + usr.sbin/chown + ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ + cd ${.CURDIR}/${_tool} && \ + ${NXBMAKE} DIRPRFX=${_tool}/ obj && \ + ${NXBMAKE} DIRPRFX=${_tool}/ depend && \ + ${NXBMAKE} DIRPRFX=${_tool}/ all && \ + ${NXBMAKE} DIRPRFX=${_tool}/ DESTDIR=${OBJTREE}/nxb-bin install +.endfor + # # hierarchy - ensure that all the needed directories are present # From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 20:24:16 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 36C587C2; Tue, 21 Apr 2015 20:24:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 252CB1848; Tue, 21 Apr 2015 20:24:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3LKOGOX073011; Tue, 21 Apr 2015 20:24:16 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3LKOG3N073010; Tue, 21 Apr 2015 20:24:16 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201504212024.t3LKOG3N073010@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Tue, 21 Apr 2015 20:24:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281838 - head/sys/dev/e1000 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 20:24:16 -0000 Author: hiren Date: Tue Apr 21 20:24:15 2015 New Revision: 281838 URL: https://svnweb.freebsd.org/changeset/base/281838 Log: For igb(4), when we are doing multiqueue, we are all setup to have full 32bit RSS hash from the card. We do not need to hide that under "ifdef RSS" and should expose that by default so others like lagg(4) can use that and avoid hashing the traffic by themselves. While here, improve comments and get rid of hidden/unimplemented RSS support code for UDP. Differential Revision: https://reviews.freebsd.org/D2296 Reviewed by: jfv, erj Discussed with: adrian Sponsored by: Limelight Networks Modified: head/sys/dev/e1000/if_igb.c Modified: head/sys/dev/e1000/if_igb.c ============================================================================== --- head/sys/dev/e1000/if_igb.c Tue Apr 21 19:33:30 2015 (r281837) +++ head/sys/dev/e1000/if_igb.c Tue Apr 21 20:24:15 2015 (r281838) @@ -4630,8 +4630,11 @@ igb_initialise_rss_mapping(struct adapte /* Now fill in hash table */ - /* XXX This means RSS enable + 8 queues for my igb (82580.) */ - mrqc = E1000_MRQC_ENABLE_RSS_4Q; + /* + * MRQC: Multiple Receive Queues Command + * Set queuing to RSS control, number depends on the device. + */ + mrqc = E1000_MRQC_ENABLE_RSS_8Q; #ifdef RSS /* XXX ew typecasting */ @@ -5139,45 +5142,51 @@ igb_rxeof(struct igb_queue *que, int cou rxr->fmp->m_pkthdr.ether_vtag = vtag; rxr->fmp->m_flags |= M_VLANTAG; } -#ifdef RSS - /* XXX set flowtype once this works right */ - rxr->fmp->m_pkthdr.flowid = - le32toh(cur->wb.lower.hi_dword.rss); - switch (pkt_info & E1000_RXDADV_RSSTYPE_MASK) { - case E1000_RXDADV_RSSTYPE_IPV4_TCP: - M_HASHTYPE_SET(rxr->fmp, M_HASHTYPE_RSS_TCP_IPV4); - break; - case E1000_RXDADV_RSSTYPE_IPV4: - M_HASHTYPE_SET(rxr->fmp, M_HASHTYPE_RSS_IPV4); - break; - case E1000_RXDADV_RSSTYPE_IPV6_TCP: - M_HASHTYPE_SET(rxr->fmp, M_HASHTYPE_RSS_TCP_IPV6); - break; - case E1000_RXDADV_RSSTYPE_IPV6_EX: - M_HASHTYPE_SET(rxr->fmp, M_HASHTYPE_RSS_IPV6_EX); - break; - case E1000_RXDADV_RSSTYPE_IPV6: - M_HASHTYPE_SET(rxr->fmp, M_HASHTYPE_RSS_IPV6); - break; - case E1000_RXDADV_RSSTYPE_IPV6_TCP_EX: - M_HASHTYPE_SET(rxr->fmp, M_HASHTYPE_RSS_TCP_IPV6_EX); - break; - - /* XXX no UDP support in RSS just yet */ -#ifdef notyet - case E1000_RXDADV_RSSTYPE_IPV4_UDP: - case E1000_RXDADV_RSSTYPE_IPV6_UDP: - case E1000_RXDADV_RSSTYPE_IPV6_UDP_EX: -#endif - - default: - /* XXX fallthrough */ + + /* + * In case of multiqueue, we have RXCSUM.PCSD bit set + * and never cleared. This means we have RSS hash + * available to be used. + */ + if (adapter->num_queues > 1) { + rxr->fmp->m_pkthdr.flowid = + le32toh(cur->wb.lower.hi_dword.rss); + switch (pkt_info & E1000_RXDADV_RSSTYPE_MASK) { + case E1000_RXDADV_RSSTYPE_IPV4_TCP: + M_HASHTYPE_SET(rxr->fmp, + M_HASHTYPE_RSS_TCP_IPV4); + break; + case E1000_RXDADV_RSSTYPE_IPV4: + M_HASHTYPE_SET(rxr->fmp, + M_HASHTYPE_RSS_IPV4); + break; + case E1000_RXDADV_RSSTYPE_IPV6_TCP: + M_HASHTYPE_SET(rxr->fmp, + M_HASHTYPE_RSS_TCP_IPV6); + break; + case E1000_RXDADV_RSSTYPE_IPV6_EX: + M_HASHTYPE_SET(rxr->fmp, + M_HASHTYPE_RSS_IPV6_EX); + break; + case E1000_RXDADV_RSSTYPE_IPV6: + M_HASHTYPE_SET(rxr->fmp, + M_HASHTYPE_RSS_IPV6); + break; + case E1000_RXDADV_RSSTYPE_IPV6_TCP_EX: + M_HASHTYPE_SET(rxr->fmp, + M_HASHTYPE_RSS_TCP_IPV6_EX); + break; + default: + /* XXX fallthrough */ + M_HASHTYPE_SET(rxr->fmp, + M_HASHTYPE_OPAQUE); + } + } else { +#ifndef IGB_LEGACY_TX + rxr->fmp->m_pkthdr.flowid = que->msix; M_HASHTYPE_SET(rxr->fmp, M_HASHTYPE_OPAQUE); - } -#elif !defined(IGB_LEGACY_TX) - rxr->fmp->m_pkthdr.flowid = que->msix; - M_HASHTYPE_SET(rxr->fmp, M_HASHTYPE_OPAQUE); #endif + } sendmp = rxr->fmp; /* Make sure to set M_PKTHDR. */ sendmp->m_flags |= M_PKTHDR; From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 20:25:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 378A190D; Tue, 21 Apr 2015 20:25:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 259571852; Tue, 21 Apr 2015 20:25:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3LKPD04073560; Tue, 21 Apr 2015 20:25:13 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3LKPDj7073559; Tue, 21 Apr 2015 20:25:13 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504212025.t3LKPDj7073559@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 21 Apr 2015 20:25:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281839 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 20:25:13 -0000 Author: glebius Date: Tue Apr 21 20:25:12 2015 New Revision: 281839 URL: https://svnweb.freebsd.org/changeset/base/281839 Log: Improve carp(4) locking: - Use the carp_sx to serialize not only CARP ioctls, but also carp_attach() and carp_detach(). - Use cif_mtx to lock only access to those the linked list. - These locking changes allow us to do some memory allocations with M_WAITOK and also properly call callout_drain() in carp_destroy(). - In carp_attach() assert that ifaddr isn't attached. We always come here with a pristine address from in[6]_control(). Reviewed by: oleg Sponsored by: Nginx, Inc. Modified: head/sys/netinet/ip_carp.c Modified: head/sys/netinet/ip_carp.c ============================================================================== --- head/sys/netinet/ip_carp.c Tue Apr 21 20:24:15 2015 (r281838) +++ head/sys/netinet/ip_carp.c Tue Apr 21 20:25:12 2015 (r281839) @@ -256,7 +256,7 @@ SYSCTL_VNET_PCPUSTAT(_net_inet_carp, OID #define CIF_LOCK(cif) mtx_lock(&(cif)->cif_mtx) #define CIF_UNLOCK(cif) mtx_unlock(&(cif)->cif_mtx) #define CIF_FREE(cif) do { \ - CIF_LOCK_ASSERT(cif); \ + CIF_LOCK(cif); \ if (TAILQ_EMPTY(&(cif)->cif_vrs)) \ carp_free_if(cif); \ else \ @@ -296,7 +296,6 @@ SYSCTL_VNET_PCPUSTAT(_net_inet_carp, OID static void carp_input_c(struct mbuf *, struct carp_header *, sa_family_t); static struct carp_softc *carp_alloc(struct ifnet *); -static void carp_detach_locked(struct ifaddr *); static void carp_destroy(struct carp_softc *); static struct carp_if *carp_alloc_if(struct ifnet *); @@ -1250,8 +1249,6 @@ carp_multicast_setup(struct carp_if *cif struct ifnet *ifp = cif->cif_ifp; int error = 0; - CIF_LOCK_ASSERT(cif); - switch (sa) { #ifdef INET case AF_INET: @@ -1264,9 +1261,7 @@ carp_multicast_setup(struct carp_if *cif imo->imo_membership = (struct in_multi **)malloc( (sizeof(struct in_multi *) * IP_MIN_MEMBERSHIPS), M_CARP, - M_NOWAIT); - if (imo->imo_membership == NULL) - return (ENOMEM); + M_WAITOK); imo->imo_mfilters = NULL; imo->imo_max_memberships = IP_MIN_MEMBERSHIPS; imo->imo_multicast_vif = -1; @@ -1296,9 +1291,7 @@ carp_multicast_setup(struct carp_if *cif im6o->im6o_membership = (struct in6_multi **)malloc( (sizeof(struct in6_multi *) * IPV6_MIN_MEMBERSHIPS), M_CARP, - M_ZERO | M_NOWAIT); - if (im6o->im6o_membership == NULL) - return (ENOMEM); + M_ZERO | M_WAITOK); im6o->im6o_mfilters = NULL; im6o->im6o_max_memberships = IPV6_MIN_MEMBERSHIPS; im6o->im6o_multicast_hlim = CARP_DFLTTL; @@ -1355,7 +1348,8 @@ static void carp_multicast_cleanup(struct carp_if *cif, sa_family_t sa) { - CIF_LOCK_ASSERT(cif); + sx_assert(&carp_sx, SA_XLOCKED); + switch (sa) { #ifdef INET case AF_INET: @@ -1504,22 +1498,18 @@ carp_alloc(struct ifnet *ifp) return (sc); } -static int +static void carp_grow_ifas(struct carp_softc *sc) { struct ifaddr **new; - CARP_LOCK_ASSERT(sc); - - new = malloc(sc->sc_ifasiz * 2, M_CARP, M_NOWAIT|M_ZERO); - if (new == NULL) - return (ENOMEM); + new = malloc(sc->sc_ifasiz * 2, M_CARP, M_WAITOK | M_ZERO); + CARP_LOCK(sc); bcopy(sc->sc_ifas, new, sc->sc_ifasiz); free(sc->sc_ifas, M_CARP); sc->sc_ifas = new; sc->sc_ifasiz *= 2; - - return (0); + CARP_UNLOCK(sc); } static void @@ -1528,17 +1518,20 @@ carp_destroy(struct carp_softc *sc) struct ifnet *ifp = sc->sc_carpdev; struct carp_if *cif = ifp->if_carp; - CIF_LOCK_ASSERT(cif); + sx_assert(&carp_sx, SA_XLOCKED); + + if (sc->sc_suppress) + carp_demote_adj(-V_carp_ifdown_adj, "vhid removed"); + CARP_UNLOCK(sc); + CIF_LOCK(cif); TAILQ_REMOVE(&cif->cif_vrs, sc, sc_list); + CIF_UNLOCK(cif); mtx_lock(&carp_mtx); LIST_REMOVE(sc, sc_next); mtx_unlock(&carp_mtx); - CARP_LOCK(sc); - if (sc->sc_suppress) - carp_demote_adj(-V_carp_ifdown_adj, "vhid removed"); callout_drain(&sc->sc_ad_tmo); #ifdef INET callout_drain(&sc->sc_md_tmo); @@ -1807,8 +1800,7 @@ carp_attach(struct ifaddr *ifa, int vhid struct carp_softc *sc; int index, error; - if (ifp->if_carp == NULL) - return (ENOPROTOOPT); + KASSERT(ifa->ifa_carp == NULL, ("%s: ifa %p attached", __func__, ifa)); switch (ifa->ifa_addr->sa_family) { #ifdef INET @@ -1822,40 +1814,32 @@ carp_attach(struct ifaddr *ifa, int vhid return (EPROTOTYPE); } + sx_xlock(&carp_sx); + if (ifp->if_carp == NULL) { + sx_xunlock(&carp_sx); + return (ENOPROTOOPT); + } + CIF_LOCK(cif); IFNET_FOREACH_CARP(ifp, sc) if (sc->sc_vhid == vhid) break; + CIF_UNLOCK(cif); if (sc == NULL) { - CIF_UNLOCK(cif); + sx_xunlock(&carp_sx); return (ENOENT); } - if (ifa->ifa_carp) { - if (ifa->ifa_carp->sc_vhid != vhid) - carp_detach_locked(ifa); - else { - CIF_UNLOCK(cif); - return (0); - } - } - error = carp_multicast_setup(cif, ifa->ifa_addr->sa_family); if (error) { CIF_FREE(cif); + sx_xunlock(&carp_sx); return (error); } - CARP_LOCK(sc); index = sc->sc_naddrs + sc->sc_naddrs6 + 1; if (index > sc->sc_ifasiz / sizeof(struct ifaddr *)) - if ((error = carp_grow_ifas(sc)) != 0) { - carp_multicast_cleanup(cif, - ifa->ifa_addr->sa_family); - CARP_UNLOCK(sc); - CIF_FREE(cif); - return (error); - } + carp_grow_ifas(sc); switch (ifa->ifa_addr->sa_family) { #ifdef INET @@ -1873,14 +1857,15 @@ carp_attach(struct ifaddr *ifa, int vhid } ifa_ref(ifa); + + CARP_LOCK(sc); sc->sc_ifas[index - 1] = ifa; ifa->ifa_carp = sc; - carp_hmac_prepare(sc); carp_sc_state(sc); - CARP_UNLOCK(sc); - CIF_UNLOCK(cif); + + sx_xunlock(&carp_sx); return (0); } @@ -1890,25 +1875,14 @@ carp_detach(struct ifaddr *ifa) { struct ifnet *ifp = ifa->ifa_ifp; struct carp_if *cif = ifp->if_carp; - - CIF_LOCK(cif); - carp_detach_locked(ifa); - CIF_FREE(cif); -} - -static void -carp_detach_locked(struct ifaddr *ifa) -{ - struct ifnet *ifp = ifa->ifa_ifp; - struct carp_if *cif = ifp->if_carp; struct carp_softc *sc = ifa->ifa_carp; int i, index; KASSERT(sc != NULL, ("%s: %p not attached", __func__, ifa)); - CIF_LOCK_ASSERT(cif); - CARP_LOCK(sc); + sx_xlock(&carp_sx); + CARP_LOCK(sc); /* Shift array. */ index = sc->sc_naddrs + sc->sc_naddrs6; for (i = 0; i < index; i++) @@ -1943,11 +1917,14 @@ carp_detach_locked(struct ifaddr *ifa) carp_hmac_prepare(sc); carp_sc_state(sc); - if (sc->sc_naddrs == 0 && sc->sc_naddrs6 == 0) { - CARP_UNLOCK(sc); + if (sc->sc_naddrs == 0 && sc->sc_naddrs6 == 0) carp_destroy(sc); - } else + else CARP_UNLOCK(sc); + + CIF_FREE(cif); + + sx_xunlock(&carp_sx); } static void From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 22:05:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D9599878; Tue, 21 Apr 2015 22:05:59 +0000 (UTC) Received: from mail.strugglingcoder.info (strugglingcoder.info [65.19.130.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C60931383; Tue, 21 Apr 2015 22:05:59 +0000 (UTC) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPSA id 6DFF710D75B; Tue, 21 Apr 2015 15:05:50 -0700 (PDT) Date: Tue, 21 Apr 2015 15:05:50 -0700 From: Hiren Panchasara To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281838 - head/sys/dev/e1000 Message-ID: <20150421220550.GA28632@strugglingcoder.info> References: <201504212024.t3LKOG3N073010@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="k+w/mQv8wyuph6w0" Content-Disposition: inline In-Reply-To: <201504212024.t3LKOG3N073010@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 22:06:00 -0000 --k+w/mQv8wyuph6w0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 04/21/15 at 08:24P, Hiren Panchasara wrote: > Author: hiren > Date: Tue Apr 21 20:24:15 2015 > New Revision: 281838 > URL: https://svnweb.freebsd.org/changeset/base/281838 >=20 > Log: > For igb(4), when we are doing multiqueue, we are all setup to have full= 32bit > RSS hash from the card. We do not need to hide that under "ifdef RSS" a= nd should > expose that by default so others like lagg(4) can use that and avoid ha= shing the > traffic by themselves. > While here, improve comments and get rid of hidden/unimplemented RSS su= pport > code for UDP. > =20 > Differential Revision: https://reviews.freebsd.org/D2296 > Reviewed by: jfv, erj > Discussed with: adrian > Sponsored by: Limelight Networks >=20 > Modified: > head/sys/dev/e1000/if_igb.c I intend to MFC this in a week or so. But for that, I'd have to first MFC a part of https://svnweb.freebsd.org/base?view=3Drevision&revision=3D26= 8028 which sets rss hash types. Cheers, Hiren --k+w/mQv8wyuph6w0 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQF8BAEBCgBmBQJVNsm+XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/loCAH/R09M1fXl4pFI834wctgXyYD lIC0Dymbj8BlX1kiYX+RtHMFBKGhJJxCJ/O1tUdbAXh/w4mf1d6WOXF/3uhRG7hv Q82xwjF93e3GhMKI/lrvt7DNj7tAtk4zKeiw79b3o5EZJd9aAhdK76bPyvevBRQK i5G+mduKr1QX/ujFBZGb2aY9l1n4drlwbgieBCqCt+qLUdhSxlCuL+j/jVENAyfd eUbkjEWcsktYf6xVWgJKNn1Qaz5+5y+qfey5LUqDXqhzGMLnU5/69s9dMVwQ9Nau 6MtGLwrUxHc4ppv617RDLOiDoaxxzRPm+V9FHdPhcDUUOyQu2hdBkykfrkFGoc8= =VEWO -----END PGP SIGNATURE----- --k+w/mQv8wyuph6w0-- From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 22:55:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E361F1; Tue, 21 Apr 2015 22:55:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C888188E; Tue, 21 Apr 2015 22:55:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3LMtrZK094145; Tue, 21 Apr 2015 22:55:53 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3LMtrIb094144; Tue, 21 Apr 2015 22:55:53 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201504212255.t3LMtrIb094144@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 21 Apr 2015 22:55:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281840 - head/sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 22:55:53 -0000 Author: delphij Date: Tue Apr 21 22:55:52 2015 New Revision: 281840 URL: https://svnweb.freebsd.org/changeset/base/281840 Log: Extend DA_Q_NO_RC16 to MXUB3* devices. PR: kern/198647 MFC after: 2 weeks Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Tue Apr 21 20:25:12 2015 (r281839) +++ head/sys/cam/scsi/scsi_da.c Tue Apr 21 22:55:52 2015 (r281840) @@ -1186,7 +1186,7 @@ static struct da_quirk_entry da_quirk_ta /* * MX-ES USB Drive by Mach Xtreme */ - { T_DIRECT, SIP_MEDIA_REMOVABLE, "MX", "MXUB3SES*", "*"}, + { T_DIRECT, SIP_MEDIA_REMOVABLE, "MX", "MXUB3*", "*"}, /*quirks*/DA_Q_NO_RC16 }, }; From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 00:38:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 631642BD; Wed, 22 Apr 2015 00:38:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F92E1245; Wed, 22 Apr 2015 00:38:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3M0cENK076440; Wed, 22 Apr 2015 00:38:14 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3M0cC6P076428; Wed, 22 Apr 2015 00:38:12 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504220038.t3M0cC6P076428@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 22 Apr 2015 00:38:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281841 - in stable/10/sys: conf fs/ext2fs modules/ext2fs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 00:38:14 -0000 Author: pfg Date: Wed Apr 22 00:38:11 2015 New Revision: 281841 URL: https://svnweb.freebsd.org/changeset/base/281841 Log: MFC r281670, r281703: Drop experimental ext2fs dir_index support. The htree directory index is a highly desirable feature for research purposes and was meant to improve performance in our ext2/3 driver. Unfortunately our implementation has two problems: - It never really delivered any performance improvement. - It appears to corrupt the filesystem in undetermined circumstances. Strictly speaking dir_index is not required for read/write support in ext2/3 and our limited ext4 support still works fine without it. Regain stability in the ext2 driver by removing it. We may need it back (fixed) if we want to support encrypted ext4 support but thanks to the wonders of version control we can always revert this change and bring it back. PR: 191895 PR: 198731 PR: 199309 Deleted: stable/10/sys/fs/ext2fs/ext2_hash.c stable/10/sys/fs/ext2fs/ext2_htree.c Modified: stable/10/sys/conf/files stable/10/sys/fs/ext2fs/ext2_dir.h stable/10/sys/fs/ext2fs/ext2_extern.h stable/10/sys/fs/ext2fs/ext2_lookup.c stable/10/sys/fs/ext2fs/ext2_vfsops.c stable/10/sys/fs/ext2fs/ext2fs.h stable/10/sys/modules/ext2fs/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Tue Apr 21 22:55:52 2015 (r281840) +++ stable/10/sys/conf/files Wed Apr 22 00:38:11 2015 (r281841) @@ -2870,8 +2870,6 @@ fs/ext2fs/ext2_bmap.c optional ext2fs fs/ext2fs/ext2_extents.c optional ext2fs fs/ext2fs/ext2_inode.c optional ext2fs fs/ext2fs/ext2_inode_cnv.c optional ext2fs -fs/ext2fs/ext2_hash.c optional ext2fs -fs/ext2fs/ext2_htree.c optional ext2fs fs/ext2fs/ext2_lookup.c optional ext2fs fs/ext2fs/ext2_subr.c optional ext2fs fs/ext2fs/ext2_vfsops.c optional ext2fs Modified: stable/10/sys/fs/ext2fs/ext2_dir.h ============================================================================== --- stable/10/sys/fs/ext2fs/ext2_dir.h Tue Apr 21 22:55:52 2015 (r281840) +++ stable/10/sys/fs/ext2fs/ext2_dir.h Wed Apr 22 00:38:11 2015 (r281841) @@ -40,21 +40,6 @@ struct ext2fs_direct { uint16_t e2d_namlen; /* length of string in e2d_name */ char e2d_name[EXT2FS_MAXNAMLEN];/* name with length<=EXT2FS_MAXNAMLEN */ }; - -enum slotstatus { - NONE, - COMPACT, - FOUND -}; - -struct ext2fs_searchslot { - enum slotstatus slotstatus; - doff_t slotoffset; /* offset of area with free space */ - int slotsize; /* size of area at slotoffset */ - int slotfreespace; /* amount of space free in slot */ - int slotneeded; /* sizeof the entry we are seeking */ -}; - /* * The new version of the directory entry. Since EXT2 structures are * stored in intel byte order, and the name_len field could never be Modified: stable/10/sys/fs/ext2fs/ext2_extern.h ============================================================================== --- stable/10/sys/fs/ext2fs/ext2_extern.h Tue Apr 21 22:55:52 2015 (r281840) +++ stable/10/sys/fs/ext2fs/ext2_extern.h Wed Apr 22 00:38:11 2015 (r281841) @@ -40,15 +40,12 @@ #define _FS_EXT2FS_EXT2_EXTERN_H_ struct ext2fs_dinode; -struct ext2fs_direct_2; -struct ext2fs_searchslot; struct indir; struct inode; struct mount; struct vfsconf; struct vnode; -int ext2_add_entry(struct vnode *, struct ext2fs_direct_2 *); int ext2_alloc(struct inode *, daddr_t, e4fs_daddr_t, int, struct ucred *, e4fs_daddr_t *); int ext2_balloc(struct inode *, @@ -86,18 +83,6 @@ int ext2_dirempty(struct inode *, ino_t, int ext2_checkpath(struct inode *, struct inode *, struct ucred *); int cg_has_sb(int i); int ext2_inactive(struct vop_inactive_args *); -int ext2_htree_add_entry(struct vnode *, struct ext2fs_direct_2 *, - struct componentname *); -int ext2_htree_create_index(struct vnode *, struct componentname *, - struct ext2fs_direct_2 *); -int ext2_htree_has_idx(struct inode *); -int ext2_htree_hash(const char *, int, uint32_t *, int, uint32_t *, - uint32_t *); -int ext2_htree_lookup(struct inode *, const char *, int, struct buf **, - int *, doff_t *, doff_t *, doff_t *, struct ext2fs_searchslot *); -int ext2_search_dirblock(struct inode *, void *, int *, const char *, int, - int *, doff_t *, doff_t *, doff_t *, struct ext2fs_searchslot *); - /* Flags to low-level allocation routines. * The low 16-bits are reserved for IO_ flags from vnode.h. Modified: stable/10/sys/fs/ext2fs/ext2_lookup.c ============================================================================== --- stable/10/sys/fs/ext2fs/ext2_lookup.c Tue Apr 21 22:55:52 2015 (r281840) +++ stable/10/sys/fs/ext2fs/ext2_lookup.c Wed Apr 22 00:38:11 2015 (r281841) @@ -113,19 +113,9 @@ static u_char dt_to_ext2_ft[] = { static int ext2_dirbadentry(struct vnode *dp, struct ext2fs_direct_2 *de, int entryoffsetinblock); -static int ext2_is_dot_entry(struct componentname *cnp); static int ext2_lookup_ino(struct vnode *vdp, struct vnode **vpp, struct componentname *cnp, ino_t *dd_ino); -static int -ext2_is_dot_entry(struct componentname *cnp) -{ - if (cnp->cn_namelen <= 2 && cnp->cn_nameptr[0] == '.' && - (cnp->cn_nameptr[1] == '.' || cnp->cn_nameptr[1] == '0')) - return (1); - return (0); -} - /* * Vnode op for reading directories. */ @@ -306,9 +296,13 @@ ext2_lookup_ino(struct vnode *vdp, struc struct buf *bp; /* a buffer of directory entries */ struct ext2fs_direct_2 *ep; /* the current directory entry */ int entryoffsetinblock; /* offset of ep in bp's buffer */ - struct ext2fs_searchslot ss; + enum {NONE, COMPACT, FOUND} slotstatus; + doff_t slotoffset; /* offset of area with free space */ doff_t i_diroff; /* cached i_diroff value */ doff_t i_offset; /* cached i_offset value */ + int slotsize; /* size of area at slotoffset */ + int slotfreespace; /* amount of space free in slot */ + int slotneeded; /* size of the entry we're seeking */ int numdirpasses; /* strategy for directory search */ doff_t endsearch; /* offset to end directory search */ doff_t prevoff; /* prev entry dp->i_offset */ @@ -316,13 +310,12 @@ ext2_lookup_ino(struct vnode *vdp, struc struct vnode *tdp; /* returned by VFS_VGET */ doff_t enduseful; /* pointer past last used dir slot */ u_long bmask; /* block offset mask */ - int error; + int namlen, error; struct ucred *cred = cnp->cn_cred; int flags = cnp->cn_flags; int nameiop = cnp->cn_nameiop; ino_t ino, ino1; int ltype; - int entry_found = 0; int DIRBLKSIZ = VTOI(vdp)->i_e2fs->e2fs_bsize; @@ -333,57 +326,31 @@ ext2_lookup_ino(struct vnode *vdp, struc bmask = VFSTOEXT2(vdp->v_mount)->um_mountp->mnt_stat.f_iosize - 1; restart: bp = NULL; - ss.slotoffset = -1; + slotoffset = -1; /* * We now have a segment name to search for, and a directory to search. - * + */ + + /* * Suppress search for slots unless creating * file and at end of pathname, in which case * we watch for a place to put the new file in * case it doesn't already exist. */ i_diroff = dp->i_diroff; - ss.slotstatus = FOUND; - ss.slotfreespace = ss.slotsize = ss.slotneeded = 0; + slotstatus = FOUND; + slotfreespace = slotsize = slotneeded = 0; if ((nameiop == CREATE || nameiop == RENAME) && (flags & ISLASTCN)) { - ss.slotstatus = NONE; - ss.slotneeded = EXT2_DIR_REC_LEN(cnp->cn_namelen); + slotstatus = NONE; + slotneeded = EXT2_DIR_REC_LEN(cnp->cn_namelen); /* was - ss.slotneeded = (sizeof(struct direct) - MAXNAMLEN + + slotneeded = (sizeof(struct direct) - MAXNAMLEN + cnp->cn_namelen + 3) &~ 3; */ } /* - * Try to lookup dir entry using htree directory index. - * - * If we got an error or we want to find '.' or '..' entry, - * we will fall back to linear search. - */ - if (!ext2_is_dot_entry(cnp) && ext2_htree_has_idx(dp)) { - numdirpasses = 1; - entryoffsetinblock = 0; - switch (ext2_htree_lookup(dp, cnp->cn_nameptr, cnp->cn_namelen, - &bp, &entryoffsetinblock, &i_offset, &prevoff, - &enduseful, &ss)) { - case 0: - ep = (struct ext2fs_direct_2 *)((char *)bp->b_data + - (i_offset & bmask)); - goto foundentry; - case ENOENT: - i_offset = roundup2(dp->i_size, DIRBLKSIZ); - goto notfound; - default: - /* - * Something failed; just fallback to do a linear - * search. - */ - break; - } - } - - /* * If there is cached information on a previous search of * this directory, pick up where we last left off. * We cache only lookups as these are the most common @@ -417,38 +384,96 @@ searchloop: /* * If necessary, get the next directory block. */ - if (bp != NULL) - brelse(bp); - error = ext2_blkatoff(vdp, (off_t)i_offset, NULL, &bp); - if (error != 0) - return (error); - entryoffsetinblock = 0; + if ((i_offset & bmask) == 0) { + if (bp != NULL) + brelse(bp); + if ((error = + ext2_blkatoff(vdp, (off_t)i_offset, NULL, + &bp)) != 0) + return (error); + entryoffsetinblock = 0; + } /* * If still looking for a slot, and at a DIRBLKSIZE * boundary, have to start looking for free space again. */ - if (ss.slotstatus == NONE && + if (slotstatus == NONE && (entryoffsetinblock & (DIRBLKSIZ - 1)) == 0) { - ss.slotoffset = -1; - ss.slotfreespace = 0; + slotoffset = -1; + slotfreespace = 0; } - error = ext2_search_dirblock(dp, bp->b_data, &entry_found, - cnp->cn_nameptr, cnp->cn_namelen, - &entryoffsetinblock, &i_offset, &prevoff, - &enduseful, &ss); - if (error != 0) { - brelse(bp); - return (error); + /* + * Get pointer to next entry. + * Full validation checks are slow, so we only check + * enough to insure forward progress through the + * directory. Complete checks can be run by setting + * "vfs.e2fs.dirchk" to be true. + */ + ep = (struct ext2fs_direct_2 *) + ((char *)bp->b_data + entryoffsetinblock); + if (ep->e2d_reclen == 0 || + (dirchk && ext2_dirbadentry(vdp, ep, entryoffsetinblock))) { + int i; + ext2_dirbad(dp, i_offset, "mangled entry"); + i = DIRBLKSIZ - (entryoffsetinblock & (DIRBLKSIZ - 1)); + i_offset += i; + entryoffsetinblock += i; + continue; } - if (entry_found) { - ep = (struct ext2fs_direct_2 *)((char *)bp->b_data + - (entryoffsetinblock & bmask)); -foundentry: - ino = ep->e2d_ino; - goto found; + + /* + * If an appropriate sized slot has not yet been found, + * check to see if one is available. Also accumulate space + * in the current block so that we can determine if + * compaction is viable. + */ + if (slotstatus != FOUND) { + int size = ep->e2d_reclen; + + if (ep->e2d_ino != 0) + size -= EXT2_DIR_REC_LEN(ep->e2d_namlen); + if (size > 0) { + if (size >= slotneeded) { + slotstatus = FOUND; + slotoffset = i_offset; + slotsize = ep->e2d_reclen; + } else if (slotstatus == NONE) { + slotfreespace += size; + if (slotoffset == -1) + slotoffset = i_offset; + if (slotfreespace >= slotneeded) { + slotstatus = COMPACT; + slotsize = i_offset + + ep->e2d_reclen - slotoffset; + } + } + } } + + /* + * Check for a name match. + */ + if (ep->e2d_ino) { + namlen = ep->e2d_namlen; + if (namlen == cnp->cn_namelen && + !bcmp(cnp->cn_nameptr, ep->e2d_name, + (unsigned)namlen)) { + /* + * Save directory entry's inode number and + * reclen in ndp->ni_ufs area, and release + * directory buffer. + */ + ino = ep->e2d_ino; + goto found; + } + } + prevoff = i_offset; + i_offset += ep->e2d_reclen; + entryoffsetinblock += ep->e2d_reclen; + if (ep->e2d_ino) + enduseful = i_offset; } -notfound: +/* notfound: */ /* * If we started in the middle of the directory and failed * to find our target, we must check the beginning as well. @@ -483,15 +508,15 @@ notfound: * can be put in the range from dp->i_offset to * dp->i_offset + dp->i_count. */ - if (ss.slotstatus == NONE) { + if (slotstatus == NONE) { dp->i_offset = roundup2(dp->i_size, DIRBLKSIZ); dp->i_count = 0; enduseful = dp->i_offset; } else { - dp->i_offset = ss.slotoffset; - dp->i_count = ss.slotsize; - if (enduseful < ss.slotoffset + ss.slotsize) - enduseful = ss.slotoffset + ss.slotsize; + dp->i_offset = slotoffset; + dp->i_count = slotsize; + if (enduseful < slotoffset + slotsize) + enduseful = slotoffset + slotsize; } dp->i_endoff = roundup2(enduseful, DIRBLKSIZ); /* @@ -697,102 +722,6 @@ found: return (0); } -int -ext2_search_dirblock(struct inode *ip, void *data, int *foundp, - const char *name, int namelen, int *entryoffsetinblockp, - doff_t *offp, doff_t *prevoffp, doff_t *endusefulp, - struct ext2fs_searchslot *ssp) -{ - struct vnode *vdp; - struct ext2fs_direct_2 *ep, *top; - uint32_t bsize = ip->i_e2fs->e2fs_bsize; - int offset = *entryoffsetinblockp; - int namlen; - - vdp = ITOV(ip); - - ep = (struct ext2fs_direct_2 *)((char *)data + offset); - top = (struct ext2fs_direct_2 *)((char *)data + - bsize - EXT2_DIR_REC_LEN(0)); - - while (ep < top) { - /* - * Full validation checks are slow, so we only check - * enough to insure forward progress through the - * directory. Complete checks can be run by setting - * "vfs.e2fs.dirchk" to be true. - */ - if (ep->e2d_reclen == 0 || - (dirchk && ext2_dirbadentry(vdp, ep, offset))) { - int i; - ext2_dirbad(ip, *offp, "mangled entry"); - i = bsize - (offset & (bsize - 1)); - *offp += i; - offset += i; - continue; - } - - /* - * If an appropriate sized slot has not yet been found, - * check to see if one is available. Also accumulate space - * in the current block so that we can determine if - * compaction is viable. - */ - if (ssp->slotstatus != FOUND) { - int size = ep->e2d_reclen; - - if (ep->e2d_ino != 0) - size -= EXT2_DIR_REC_LEN(ep->e2d_namlen); - if (size > 0) { - if (size >= ssp->slotneeded) { - ssp->slotstatus = FOUND; - ssp->slotoffset = *offp; - ssp->slotsize = ep->e2d_reclen; - } else if (ssp->slotstatus == NONE) { - ssp->slotfreespace += size; - if (ssp->slotoffset == -1) - ssp->slotoffset = *offp; - if (ssp->slotfreespace >= ssp->slotneeded) { - ssp->slotstatus = COMPACT; - ssp->slotsize = *offp + - ep->e2d_reclen - - ssp->slotoffset; - } - } - } - } - - /* - * Check for a name match. - */ - if (ep->e2d_ino) { - namlen = ep->e2d_namlen; - if (namlen == namelen && - !bcmp(name, ep->e2d_name, (unsigned)namlen)) { - /* - * Save directory entry's inode number and - * reclen in ndp->ni_ufs area, and release - * directory buffer. - */ - *foundp = 1; - return (0); - } - } - *prevoffp = *offp; - *offp += ep->e2d_reclen; - offset += ep->e2d_reclen; - *entryoffsetinblockp = offset; - if (ep->e2d_ino) - *endusefulp = *offp; - /* - * Get pointer to the next entry. - */ - ep = (struct ext2fs_direct_2 *)((char *)data + offset); - } - - return (0); -} - void ext2_dirbad(struct inode *ip, doff_t offset, char *how) { @@ -860,12 +789,16 @@ ext2_dirbadentry(struct vnode *dp, struc int ext2_direnter(struct inode *ip, struct vnode *dvp, struct componentname *cnp) { + struct ext2fs_direct_2 *ep, *nep; struct inode *dp; + struct buf *bp; struct ext2fs_direct_2 newdir; struct iovec aiov; struct uio auio; - int error, newentrysize; - int DIRBLKSIZ = ip->i_e2fs->e2fs_bsize; + u_int dsize; + int error, loc, newentrysize, spacefree; + char *dirbuf; + int DIRBLKSIZ = ip->i_e2fs->e2fs_bsize; #ifdef INVARIANTS @@ -882,28 +815,6 @@ ext2_direnter(struct inode *ip, struct v newdir.e2d_type = EXT2_FT_UNKNOWN; bcopy(cnp->cn_nameptr, newdir.e2d_name, (unsigned)cnp->cn_namelen + 1); newentrysize = EXT2_DIR_REC_LEN(newdir.e2d_namlen); - - if (ext2_htree_has_idx(dp)) { - error = ext2_htree_add_entry(dvp, &newdir, cnp); - if (error) { - dp->i_flag &= ~IN_E4INDEX; - dp->i_flag |= IN_CHANGE | IN_UPDATE; - } - return (error); - } - - if (EXT2_HAS_COMPAT_FEATURE(ip->i_e2fs, EXT2F_COMPAT_DIRHASHINDEX) && - !ext2_htree_has_idx(dp)) { - if ((dp->i_size / DIRBLKSIZ) == 1 && - dp->i_offset == DIRBLKSIZ) { - /* - * Making indexed directory when one block is not - * enough to save all entries. - */ - return ext2_htree_create_index(dvp, cnp, &newdir); - } - } - if (dp->i_count == 0) { /* * If dp->i_count is 0, then namei could find no @@ -935,29 +846,6 @@ ext2_direnter(struct inode *ip, struct v return (error); } - error = ext2_add_entry(dvp, &newdir); - if (!error && dp->i_endoff && dp->i_endoff < dp->i_size) - error = ext2_truncate(dvp, (off_t)dp->i_endoff, IO_SYNC, - cnp->cn_cred, cnp->cn_thread); - return (error); -} - -/* - * Insert an entry into the directory block. - * Compact the contents. - */ -int -ext2_add_entry(struct vnode *dvp, struct ext2fs_direct_2 *entry) -{ - struct ext2fs_direct_2 *ep, *nep; - struct inode *dp; - struct buf *bp; - u_int dsize; - int error, loc, newentrysize, spacefree; - char *dirbuf; - - dp = VTOI(dvp); - /* * If dp->i_count is non-zero, then namei found space * for the new entry in the range dp->i_offset to @@ -989,7 +877,6 @@ ext2_add_entry(struct vnode *dvp, struct * dp->i_offset + dp->i_count would yield the * space. */ - newentrysize = EXT2_DIR_REC_LEN(entry->e2d_namlen); ep = (struct ext2fs_direct_2 *)dirbuf; dsize = EXT2_DIR_REC_LEN(ep->e2d_namlen); spacefree = ep->e2d_reclen - dsize; @@ -1015,15 +902,15 @@ ext2_add_entry(struct vnode *dvp, struct if (ep->e2d_ino == 0) { if (spacefree + dsize < newentrysize) panic("ext2_direnter: compact1"); - entry->e2d_reclen = spacefree + dsize; + newdir.e2d_reclen = spacefree + dsize; } else { if (spacefree < newentrysize) panic("ext2_direnter: compact2"); - entry->e2d_reclen = spacefree; + newdir.e2d_reclen = spacefree; ep->e2d_reclen = dsize; ep = (struct ext2fs_direct_2 *)((char *)ep + dsize); } - bcopy((caddr_t)entry, (caddr_t)ep, (u_int)newentrysize); + bcopy((caddr_t)&newdir, (caddr_t)ep, (u_int)newentrysize); if (DOINGASYNC(dvp)) { bdwrite(bp); error = 0; @@ -1031,6 +918,9 @@ ext2_add_entry(struct vnode *dvp, struct error = bwrite(bp); } dp->i_flag |= IN_CHANGE | IN_UPDATE; + if (!error && dp->i_endoff && dp->i_endoff < dp->i_size) + error = ext2_truncate(dvp, (off_t)dp->i_endoff, IO_SYNC, + cnp->cn_cred, cnp->cn_thread); return (error); } Modified: stable/10/sys/fs/ext2fs/ext2_vfsops.c ============================================================================== --- stable/10/sys/fs/ext2fs/ext2_vfsops.c Tue Apr 21 22:55:52 2015 (r281840) +++ stable/10/sys/fs/ext2fs/ext2_vfsops.c Wed Apr 22 00:38:11 2015 (r281841) @@ -399,22 +399,8 @@ compute_sb_data(struct vnode *devvp, str if (es->e2fs_rev == E2FS_REV0 || !EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_LARGEFILE)) fs->e2fs_maxfilesize = 0x7fffffff; - else { - fs->e2fs_maxfilesize = 0xffffffffffff; - if (EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_HUGE_FILE)) - fs->e2fs_maxfilesize = 0x7fffffffffffffff; - } - if (es->e4fs_flags & E2FS_UNSIGNED_HASH) { - fs->e2fs_uhash = 3; - } else if ((es->e4fs_flags & E2FS_SIGNED_HASH) == 0) { -#ifdef __CHAR_UNSIGNED__ - es->e4fs_flags |= E2FS_UNSIGNED_HASH; - fs->e2fs_uhash = 3; -#else - es->e4fs_flags |= E2FS_SIGNED_HASH; -#endif - } - + else + fs->e2fs_maxfilesize = 0x7fffffffffffffff; return (0); } Modified: stable/10/sys/fs/ext2fs/ext2fs.h ============================================================================== --- stable/10/sys/fs/ext2fs/ext2fs.h Tue Apr 21 22:55:52 2015 (r281840) +++ stable/10/sys/fs/ext2fs/ext2fs.h Wed Apr 22 00:38:11 2015 (r281841) @@ -147,7 +147,6 @@ struct m_ext2fs { int32_t e2fs_contigsumsize; /* size of cluster summary array */ int32_t *e2fs_maxcluster; /* max cluster in each cyl group */ struct csum *e2fs_clustersum; /* cluster summary in each cyl group */ - int32_t e2fs_uhash; /* 3 if hash should be signed, 0 if not */ }; /* cluster summary information */ @@ -212,7 +211,6 @@ struct csum { * - EXT2F_INCOMPAT_FLEX_BG * - EXT2F_INCOMPAT_META_BG */ -#define EXT2F_COMPAT_SUPP EXT2F_COMPAT_DIRHASHINDEX #define EXT2F_ROCOMPAT_SUPP (EXT2F_ROCOMPAT_SPARSESUPER | \ EXT2F_ROCOMPAT_LARGEFILE | \ EXT2F_ROCOMPAT_EXTRA_ISIZE) @@ -242,12 +240,6 @@ struct csum { #define E2FS_ISCLEAN 0x0001 /* Unmounted cleanly */ #define E2FS_ERRORS 0x0002 /* Errors detected */ -/* - * Filesystem miscellaneous flags - */ -#define E2FS_SIGNED_HASH 0x0001 -#define E2FS_UNSIGNED_HASH 0x0002 - /* ext2 file system block group descriptor */ struct ext2_gd { Modified: stable/10/sys/modules/ext2fs/Makefile ============================================================================== --- stable/10/sys/modules/ext2fs/Makefile Tue Apr 21 22:55:52 2015 (r281840) +++ stable/10/sys/modules/ext2fs/Makefile Wed Apr 22 00:38:11 2015 (r281841) @@ -3,8 +3,8 @@ .PATH: ${.CURDIR}/../../fs/ext2fs KMOD= ext2fs SRCS= opt_ddb.h opt_directio.h opt_quota.h opt_suiddir.h vnode_if.h \ - ext2_alloc.c ext2_balloc.c ext2_bmap.c ext2_extents.c ext2_hash.c \ - ext2_htree.c ext2_inode.c ext2_inode_cnv.c ext2_lookup.c ext2_subr.c \ + ext2_alloc.c ext2_balloc.c ext2_bmap.c ext2_extents.c \ + ext2_inode.c ext2_inode_cnv.c ext2_lookup.c ext2_subr.c \ ext2_vfsops.c ext2_vnops.c .include From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 00:40:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6B8BF461; Wed, 22 Apr 2015 00:40:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58A8A1263; Wed, 22 Apr 2015 00:40:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3M0ei3C078436; Wed, 22 Apr 2015 00:40:44 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3M0eg6u078421; Wed, 22 Apr 2015 00:40:42 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504220040.t3M0eg6u078421@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 22 Apr 2015 00:40:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281842 - in stable/9/sys: conf fs/ext2fs modules/ext2fs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 00:40:44 -0000 Author: pfg Date: Wed Apr 22 00:40:41 2015 New Revision: 281842 URL: https://svnweb.freebsd.org/changeset/base/281842 Log: MFC r281670, r281703: Drop experimental ext2fs dir_index support. The htree directory index is a highly desirable feature for research purposes and was meant to improve performance in our ext2/3 driver. Unfortunately our implementation has two problems: - It never really delivered any performance improvement. - It appears to corrupt the filesystem in undetermined circumstances. Strictly speaking dir_index is not required for read/write support in ext2/3 and our limited ext4 support still works fine without it. Regain stability in the ext2 driver by removing it. We may need it back (fixed) if we want to support encrypted ext4 support but thanks to the wonders of version control we can always revert this change and bring it back. PR: 191895 PR: 198731 PR: 199309 Deleted: stable/9/sys/fs/ext2fs/ext2_hash.c stable/9/sys/fs/ext2fs/ext2_htree.c Modified: stable/9/sys/conf/files stable/9/sys/fs/ext2fs/ext2_dir.h stable/9/sys/fs/ext2fs/ext2_extern.h stable/9/sys/fs/ext2fs/ext2_lookup.c stable/9/sys/fs/ext2fs/ext2_vfsops.c stable/9/sys/fs/ext2fs/ext2fs.h stable/9/sys/modules/ext2fs/Makefile Directory Properties: stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/conf/files ============================================================================== --- stable/9/sys/conf/files Wed Apr 22 00:38:11 2015 (r281841) +++ stable/9/sys/conf/files Wed Apr 22 00:40:41 2015 (r281842) @@ -2428,8 +2428,6 @@ fs/ext2fs/ext2_bmap.c optional ext2fs fs/ext2fs/ext2_extents.c optional ext2fs fs/ext2fs/ext2_inode.c optional ext2fs fs/ext2fs/ext2_inode_cnv.c optional ext2fs -fs/ext2fs/ext2_hash.c optional ext2fs -fs/ext2fs/ext2_htree.c optional ext2fs fs/ext2fs/ext2_lookup.c optional ext2fs fs/ext2fs/ext2_subr.c optional ext2fs fs/ext2fs/ext2_vfsops.c optional ext2fs Modified: stable/9/sys/fs/ext2fs/ext2_dir.h ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_dir.h Wed Apr 22 00:38:11 2015 (r281841) +++ stable/9/sys/fs/ext2fs/ext2_dir.h Wed Apr 22 00:40:41 2015 (r281842) @@ -40,21 +40,6 @@ struct ext2fs_direct { uint16_t e2d_namlen; /* length of string in e2d_name */ char e2d_name[EXT2FS_MAXNAMLEN];/* name with length<=EXT2FS_MAXNAMLEN */ }; - -enum slotstatus { - NONE, - COMPACT, - FOUND -}; - -struct ext2fs_searchslot { - enum slotstatus slotstatus; - doff_t slotoffset; /* offset of area with free space */ - int slotsize; /* size of area at slotoffset */ - int slotfreespace; /* amount of space free in slot */ - int slotneeded; /* sizeof the entry we are seeking */ -}; - /* * The new version of the directory entry. Since EXT2 structures are * stored in intel byte order, and the name_len field could never be Modified: stable/9/sys/fs/ext2fs/ext2_extern.h ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_extern.h Wed Apr 22 00:38:11 2015 (r281841) +++ stable/9/sys/fs/ext2fs/ext2_extern.h Wed Apr 22 00:40:41 2015 (r281842) @@ -40,15 +40,12 @@ #define _FS_EXT2FS_EXT2_EXTERN_H_ struct ext2fs_dinode; -struct ext2fs_direct_2; -struct ext2fs_searchslot; struct indir; struct inode; struct mount; struct vfsconf; struct vnode; -int ext2_add_entry(struct vnode *, struct ext2fs_direct_2 *); int ext2_alloc(struct inode *, daddr_t, e4fs_daddr_t, int, struct ucred *, e4fs_daddr_t *); int ext2_balloc(struct inode *, @@ -86,18 +83,6 @@ int ext2_dirempty(struct inode *, ino_t, int ext2_checkpath(struct inode *, struct inode *, struct ucred *); int cg_has_sb(int i); int ext2_inactive(struct vop_inactive_args *); -int ext2_htree_add_entry(struct vnode *, struct ext2fs_direct_2 *, - struct componentname *); -int ext2_htree_create_index(struct vnode *, struct componentname *, - struct ext2fs_direct_2 *); -int ext2_htree_has_idx(struct inode *); -int ext2_htree_hash(const char *, int, uint32_t *, int, uint32_t *, - uint32_t *); -int ext2_htree_lookup(struct inode *, const char *, int, struct buf **, - int *, doff_t *, doff_t *, doff_t *, struct ext2fs_searchslot *); -int ext2_search_dirblock(struct inode *, void *, int *, const char *, int, - int *, doff_t *, doff_t *, doff_t *, struct ext2fs_searchslot *); - /* Flags to low-level allocation routines. * The low 16-bits are reserved for IO_ flags from vnode.h. Modified: stable/9/sys/fs/ext2fs/ext2_lookup.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_lookup.c Wed Apr 22 00:38:11 2015 (r281841) +++ stable/9/sys/fs/ext2fs/ext2_lookup.c Wed Apr 22 00:40:41 2015 (r281842) @@ -113,19 +113,9 @@ static u_char dt_to_ext2_ft[] = { static int ext2_dirbadentry(struct vnode *dp, struct ext2fs_direct_2 *de, int entryoffsetinblock); -static int ext2_is_dot_entry(struct componentname *cnp); static int ext2_lookup_ino(struct vnode *vdp, struct vnode **vpp, struct componentname *cnp, ino_t *dd_ino); -static int -ext2_is_dot_entry(struct componentname *cnp) -{ - if (cnp->cn_namelen <= 2 && cnp->cn_nameptr[0] == '.' && - (cnp->cn_nameptr[1] == '.' || cnp->cn_nameptr[1] == '0')) - return (1); - return (0); -} - /* * Vnode op for reading directories. */ @@ -306,9 +296,13 @@ ext2_lookup_ino(struct vnode *vdp, struc struct buf *bp; /* a buffer of directory entries */ struct ext2fs_direct_2 *ep; /* the current directory entry */ int entryoffsetinblock; /* offset of ep in bp's buffer */ - struct ext2fs_searchslot ss; + enum {NONE, COMPACT, FOUND} slotstatus; + doff_t slotoffset; /* offset of area with free space */ doff_t i_diroff; /* cached i_diroff value */ doff_t i_offset; /* cached i_offset value */ + int slotsize; /* size of area at slotoffset */ + int slotfreespace; /* amount of space free in slot */ + int slotneeded; /* size of the entry we're seeking */ int numdirpasses; /* strategy for directory search */ doff_t endsearch; /* offset to end directory search */ doff_t prevoff; /* prev entry dp->i_offset */ @@ -316,13 +310,12 @@ ext2_lookup_ino(struct vnode *vdp, struc struct vnode *tdp; /* returned by VFS_VGET */ doff_t enduseful; /* pointer past last used dir slot */ u_long bmask; /* block offset mask */ - int error; + int namlen, error; struct ucred *cred = cnp->cn_cred; int flags = cnp->cn_flags; int nameiop = cnp->cn_nameiop; ino_t ino, ino1; int ltype; - int entry_found = 0; int DIRBLKSIZ = VTOI(vdp)->i_e2fs->e2fs_bsize; @@ -333,57 +326,31 @@ ext2_lookup_ino(struct vnode *vdp, struc bmask = VFSTOEXT2(vdp->v_mount)->um_mountp->mnt_stat.f_iosize - 1; restart: bp = NULL; - ss.slotoffset = -1; + slotoffset = -1; /* * We now have a segment name to search for, and a directory to search. - * + */ + + /* * Suppress search for slots unless creating * file and at end of pathname, in which case * we watch for a place to put the new file in * case it doesn't already exist. */ i_diroff = dp->i_diroff; - ss.slotstatus = FOUND; - ss.slotfreespace = ss.slotsize = ss.slotneeded = 0; + slotstatus = FOUND; + slotfreespace = slotsize = slotneeded = 0; if ((nameiop == CREATE || nameiop == RENAME) && (flags & ISLASTCN)) { - ss.slotstatus = NONE; - ss.slotneeded = EXT2_DIR_REC_LEN(cnp->cn_namelen); + slotstatus = NONE; + slotneeded = EXT2_DIR_REC_LEN(cnp->cn_namelen); /* was - ss.slotneeded = (sizeof(struct direct) - MAXNAMLEN + + slotneeded = (sizeof(struct direct) - MAXNAMLEN + cnp->cn_namelen + 3) &~ 3; */ } /* - * Try to lookup dir entry using htree directory index. - * - * If we got an error or we want to find '.' or '..' entry, - * we will fall back to linear search. - */ - if (!ext2_is_dot_entry(cnp) && ext2_htree_has_idx(dp)) { - numdirpasses = 1; - entryoffsetinblock = 0; - switch (ext2_htree_lookup(dp, cnp->cn_nameptr, cnp->cn_namelen, - &bp, &entryoffsetinblock, &i_offset, &prevoff, - &enduseful, &ss)) { - case 0: - ep = (struct ext2fs_direct_2 *)((char *)bp->b_data + - (i_offset & bmask)); - goto foundentry; - case ENOENT: - i_offset = roundup2(dp->i_size, DIRBLKSIZ); - goto notfound; - default: - /* - * Something failed; just fallback to do a linear - * search. - */ - break; - } - } - - /* * If there is cached information on a previous search of * this directory, pick up where we last left off. * We cache only lookups as these are the most common @@ -417,38 +384,96 @@ searchloop: /* * If necessary, get the next directory block. */ - if (bp != NULL) - brelse(bp); - error = ext2_blkatoff(vdp, (off_t)i_offset, NULL, &bp); - if (error != 0) - return (error); - entryoffsetinblock = 0; + if ((i_offset & bmask) == 0) { + if (bp != NULL) + brelse(bp); + if ((error = + ext2_blkatoff(vdp, (off_t)i_offset, NULL, + &bp)) != 0) + return (error); + entryoffsetinblock = 0; + } /* * If still looking for a slot, and at a DIRBLKSIZE * boundary, have to start looking for free space again. */ - if (ss.slotstatus == NONE && + if (slotstatus == NONE && (entryoffsetinblock & (DIRBLKSIZ - 1)) == 0) { - ss.slotoffset = -1; - ss.slotfreespace = 0; + slotoffset = -1; + slotfreespace = 0; } - error = ext2_search_dirblock(dp, bp->b_data, &entry_found, - cnp->cn_nameptr, cnp->cn_namelen, - &entryoffsetinblock, &i_offset, &prevoff, - &enduseful, &ss); - if (error != 0) { - brelse(bp); - return (error); + /* + * Get pointer to next entry. + * Full validation checks are slow, so we only check + * enough to insure forward progress through the + * directory. Complete checks can be run by setting + * "vfs.e2fs.dirchk" to be true. + */ + ep = (struct ext2fs_direct_2 *) + ((char *)bp->b_data + entryoffsetinblock); + if (ep->e2d_reclen == 0 || + (dirchk && ext2_dirbadentry(vdp, ep, entryoffsetinblock))) { + int i; + ext2_dirbad(dp, i_offset, "mangled entry"); + i = DIRBLKSIZ - (entryoffsetinblock & (DIRBLKSIZ - 1)); + i_offset += i; + entryoffsetinblock += i; + continue; } - if (entry_found) { - ep = (struct ext2fs_direct_2 *)((char *)bp->b_data + - (entryoffsetinblock & bmask)); -foundentry: - ino = ep->e2d_ino; - goto found; + + /* + * If an appropriate sized slot has not yet been found, + * check to see if one is available. Also accumulate space + * in the current block so that we can determine if + * compaction is viable. + */ + if (slotstatus != FOUND) { + int size = ep->e2d_reclen; + + if (ep->e2d_ino != 0) + size -= EXT2_DIR_REC_LEN(ep->e2d_namlen); + if (size > 0) { + if (size >= slotneeded) { + slotstatus = FOUND; + slotoffset = i_offset; + slotsize = ep->e2d_reclen; + } else if (slotstatus == NONE) { + slotfreespace += size; + if (slotoffset == -1) + slotoffset = i_offset; + if (slotfreespace >= slotneeded) { + slotstatus = COMPACT; + slotsize = i_offset + + ep->e2d_reclen - slotoffset; + } + } + } } + + /* + * Check for a name match. + */ + if (ep->e2d_ino) { + namlen = ep->e2d_namlen; + if (namlen == cnp->cn_namelen && + !bcmp(cnp->cn_nameptr, ep->e2d_name, + (unsigned)namlen)) { + /* + * Save directory entry's inode number and + * reclen in ndp->ni_ufs area, and release + * directory buffer. + */ + ino = ep->e2d_ino; + goto found; + } + } + prevoff = i_offset; + i_offset += ep->e2d_reclen; + entryoffsetinblock += ep->e2d_reclen; + if (ep->e2d_ino) + enduseful = i_offset; } -notfound: +/* notfound: */ /* * If we started in the middle of the directory and failed * to find our target, we must check the beginning as well. @@ -483,15 +508,15 @@ notfound: * can be put in the range from dp->i_offset to * dp->i_offset + dp->i_count. */ - if (ss.slotstatus == NONE) { + if (slotstatus == NONE) { dp->i_offset = roundup2(dp->i_size, DIRBLKSIZ); dp->i_count = 0; enduseful = dp->i_offset; } else { - dp->i_offset = ss.slotoffset; - dp->i_count = ss.slotsize; - if (enduseful < ss.slotoffset + ss.slotsize) - enduseful = ss.slotoffset + ss.slotsize; + dp->i_offset = slotoffset; + dp->i_count = slotsize; + if (enduseful < slotoffset + slotsize) + enduseful = slotoffset + slotsize; } dp->i_endoff = roundup2(enduseful, DIRBLKSIZ); /* @@ -697,102 +722,6 @@ found: return (0); } -int -ext2_search_dirblock(struct inode *ip, void *data, int *foundp, - const char *name, int namelen, int *entryoffsetinblockp, - doff_t *offp, doff_t *prevoffp, doff_t *endusefulp, - struct ext2fs_searchslot *ssp) -{ - struct vnode *vdp; - struct ext2fs_direct_2 *ep, *top; - uint32_t bsize = ip->i_e2fs->e2fs_bsize; - int offset = *entryoffsetinblockp; - int namlen; - - vdp = ITOV(ip); - - ep = (struct ext2fs_direct_2 *)((char *)data + offset); - top = (struct ext2fs_direct_2 *)((char *)data + - bsize - EXT2_DIR_REC_LEN(0)); - - while (ep < top) { - /* - * Full validation checks are slow, so we only check - * enough to insure forward progress through the - * directory. Complete checks can be run by setting - * "vfs.e2fs.dirchk" to be true. - */ - if (ep->e2d_reclen == 0 || - (dirchk && ext2_dirbadentry(vdp, ep, offset))) { - int i; - ext2_dirbad(ip, *offp, "mangled entry"); - i = bsize - (offset & (bsize - 1)); - *offp += i; - offset += i; - continue; - } - - /* - * If an appropriate sized slot has not yet been found, - * check to see if one is available. Also accumulate space - * in the current block so that we can determine if - * compaction is viable. - */ - if (ssp->slotstatus != FOUND) { - int size = ep->e2d_reclen; - - if (ep->e2d_ino != 0) - size -= EXT2_DIR_REC_LEN(ep->e2d_namlen); - if (size > 0) { - if (size >= ssp->slotneeded) { - ssp->slotstatus = FOUND; - ssp->slotoffset = *offp; - ssp->slotsize = ep->e2d_reclen; - } else if (ssp->slotstatus == NONE) { - ssp->slotfreespace += size; - if (ssp->slotoffset == -1) - ssp->slotoffset = *offp; - if (ssp->slotfreespace >= ssp->slotneeded) { - ssp->slotstatus = COMPACT; - ssp->slotsize = *offp + - ep->e2d_reclen - - ssp->slotoffset; - } - } - } - } - - /* - * Check for a name match. - */ - if (ep->e2d_ino) { - namlen = ep->e2d_namlen; - if (namlen == namelen && - !bcmp(name, ep->e2d_name, (unsigned)namlen)) { - /* - * Save directory entry's inode number and - * reclen in ndp->ni_ufs area, and release - * directory buffer. - */ - *foundp = 1; - return (0); - } - } - *prevoffp = *offp; - *offp += ep->e2d_reclen; - offset += ep->e2d_reclen; - *entryoffsetinblockp = offset; - if (ep->e2d_ino) - *endusefulp = *offp; - /* - * Get pointer to the next entry. - */ - ep = (struct ext2fs_direct_2 *)((char *)data + offset); - } - - return (0); -} - void ext2_dirbad(struct inode *ip, doff_t offset, char *how) { @@ -860,12 +789,16 @@ ext2_dirbadentry(struct vnode *dp, struc int ext2_direnter(struct inode *ip, struct vnode *dvp, struct componentname *cnp) { + struct ext2fs_direct_2 *ep, *nep; struct inode *dp; + struct buf *bp; struct ext2fs_direct_2 newdir; struct iovec aiov; struct uio auio; - int error, newentrysize; - int DIRBLKSIZ = ip->i_e2fs->e2fs_bsize; + u_int dsize; + int error, loc, newentrysize, spacefree; + char *dirbuf; + int DIRBLKSIZ = ip->i_e2fs->e2fs_bsize; #ifdef INVARIANTS @@ -882,28 +815,6 @@ ext2_direnter(struct inode *ip, struct v newdir.e2d_type = EXT2_FT_UNKNOWN; bcopy(cnp->cn_nameptr, newdir.e2d_name, (unsigned)cnp->cn_namelen + 1); newentrysize = EXT2_DIR_REC_LEN(newdir.e2d_namlen); - - if (ext2_htree_has_idx(dp)) { - error = ext2_htree_add_entry(dvp, &newdir, cnp); - if (error) { - dp->i_flag &= ~IN_E4INDEX; - dp->i_flag |= IN_CHANGE | IN_UPDATE; - } - return (error); - } - - if (EXT2_HAS_COMPAT_FEATURE(ip->i_e2fs, EXT2F_COMPAT_DIRHASHINDEX) && - !ext2_htree_has_idx(dp)) { - if ((dp->i_size / DIRBLKSIZ) == 1 && - dp->i_offset == DIRBLKSIZ) { - /* - * Making indexed directory when one block is not - * enough to save all entries. - */ - return ext2_htree_create_index(dvp, cnp, &newdir); - } - } - if (dp->i_count == 0) { /* * If dp->i_count is 0, then namei could find no @@ -935,29 +846,6 @@ ext2_direnter(struct inode *ip, struct v return (error); } - error = ext2_add_entry(dvp, &newdir); - if (!error && dp->i_endoff && dp->i_endoff < dp->i_size) - error = ext2_truncate(dvp, (off_t)dp->i_endoff, IO_SYNC, - cnp->cn_cred, cnp->cn_thread); - return (error); -} - -/* - * Insert an entry into the directory block. - * Compact the contents. - */ -int -ext2_add_entry(struct vnode *dvp, struct ext2fs_direct_2 *entry) -{ - struct ext2fs_direct_2 *ep, *nep; - struct inode *dp; - struct buf *bp; - u_int dsize; - int error, loc, newentrysize, spacefree; - char *dirbuf; - - dp = VTOI(dvp); - /* * If dp->i_count is non-zero, then namei found space * for the new entry in the range dp->i_offset to @@ -989,7 +877,6 @@ ext2_add_entry(struct vnode *dvp, struct * dp->i_offset + dp->i_count would yield the * space. */ - newentrysize = EXT2_DIR_REC_LEN(entry->e2d_namlen); ep = (struct ext2fs_direct_2 *)dirbuf; dsize = EXT2_DIR_REC_LEN(ep->e2d_namlen); spacefree = ep->e2d_reclen - dsize; @@ -1015,15 +902,15 @@ ext2_add_entry(struct vnode *dvp, struct if (ep->e2d_ino == 0) { if (spacefree + dsize < newentrysize) panic("ext2_direnter: compact1"); - entry->e2d_reclen = spacefree + dsize; + newdir.e2d_reclen = spacefree + dsize; } else { if (spacefree < newentrysize) panic("ext2_direnter: compact2"); - entry->e2d_reclen = spacefree; + newdir.e2d_reclen = spacefree; ep->e2d_reclen = dsize; ep = (struct ext2fs_direct_2 *)((char *)ep + dsize); } - bcopy((caddr_t)entry, (caddr_t)ep, (u_int)newentrysize); + bcopy((caddr_t)&newdir, (caddr_t)ep, (u_int)newentrysize); if (DOINGASYNC(dvp)) { bdwrite(bp); error = 0; @@ -1031,6 +918,9 @@ ext2_add_entry(struct vnode *dvp, struct error = bwrite(bp); } dp->i_flag |= IN_CHANGE | IN_UPDATE; + if (!error && dp->i_endoff && dp->i_endoff < dp->i_size) + error = ext2_truncate(dvp, (off_t)dp->i_endoff, IO_SYNC, + cnp->cn_cred, cnp->cn_thread); return (error); } Modified: stable/9/sys/fs/ext2fs/ext2_vfsops.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_vfsops.c Wed Apr 22 00:38:11 2015 (r281841) +++ stable/9/sys/fs/ext2fs/ext2_vfsops.c Wed Apr 22 00:40:41 2015 (r281842) @@ -399,22 +399,8 @@ compute_sb_data(struct vnode *devvp, str if (es->e2fs_rev == E2FS_REV0 || !EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_LARGEFILE)) fs->e2fs_maxfilesize = 0x7fffffff; - else { - fs->e2fs_maxfilesize = 0xffffffffffff; - if (EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_HUGE_FILE)) - fs->e2fs_maxfilesize = 0x7fffffffffffffff; - } - if (es->e4fs_flags & E2FS_UNSIGNED_HASH) { - fs->e2fs_uhash = 3; - } else if ((es->e4fs_flags & E2FS_SIGNED_HASH) == 0) { -#ifdef __CHAR_UNSIGNED__ - es->e4fs_flags |= E2FS_UNSIGNED_HASH; - fs->e2fs_uhash = 3; -#else - es->e4fs_flags |= E2FS_SIGNED_HASH; -#endif - } - + else + fs->e2fs_maxfilesize = 0x7fffffffffffffff; return (0); } Modified: stable/9/sys/fs/ext2fs/ext2fs.h ============================================================================== --- stable/9/sys/fs/ext2fs/ext2fs.h Wed Apr 22 00:38:11 2015 (r281841) +++ stable/9/sys/fs/ext2fs/ext2fs.h Wed Apr 22 00:40:41 2015 (r281842) @@ -147,7 +147,6 @@ struct m_ext2fs { int32_t e2fs_contigsumsize; /* size of cluster summary array */ int32_t *e2fs_maxcluster; /* max cluster in each cyl group */ struct csum *e2fs_clustersum; /* cluster summary in each cyl group */ - int32_t e2fs_uhash; /* 3 if hash should be signed, 0 if not */ }; /* cluster summary information */ @@ -212,7 +211,6 @@ struct csum { * - EXT2F_INCOMPAT_FLEX_BG * - EXT2F_INCOMPAT_META_BG */ -#define EXT2F_COMPAT_SUPP EXT2F_COMPAT_DIRHASHINDEX #define EXT2F_ROCOMPAT_SUPP (EXT2F_ROCOMPAT_SPARSESUPER | \ EXT2F_ROCOMPAT_LARGEFILE | \ EXT2F_ROCOMPAT_EXTRA_ISIZE) @@ -242,12 +240,6 @@ struct csum { #define E2FS_ISCLEAN 0x0001 /* Unmounted cleanly */ #define E2FS_ERRORS 0x0002 /* Errors detected */ -/* - * Filesystem miscellaneous flags - */ -#define E2FS_SIGNED_HASH 0x0001 -#define E2FS_UNSIGNED_HASH 0x0002 - /* ext2 file system block group descriptor */ struct ext2_gd { Modified: stable/9/sys/modules/ext2fs/Makefile ============================================================================== --- stable/9/sys/modules/ext2fs/Makefile Wed Apr 22 00:38:11 2015 (r281841) +++ stable/9/sys/modules/ext2fs/Makefile Wed Apr 22 00:40:41 2015 (r281842) @@ -3,8 +3,8 @@ .PATH: ${.CURDIR}/../../fs/ext2fs KMOD= ext2fs SRCS= opt_ddb.h opt_directio.h opt_quota.h opt_suiddir.h vnode_if.h \ - ext2_alloc.c ext2_balloc.c ext2_bmap.c ext2_extents.c ext2_hash.c \ - ext2_htree.c ext2_inode.c ext2_inode_cnv.c ext2_lookup.c ext2_subr.c \ + ext2_alloc.c ext2_balloc.c ext2_bmap.c ext2_extents.c \ + ext2_inode.c ext2_inode_cnv.c ext2_lookup.c ext2_subr.c \ ext2_vfsops.c ext2_vnops.c .include From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 01:08:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D29D694F; Wed, 22 Apr 2015 01:08:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BCDB71576; Wed, 22 Apr 2015 01:08:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3M18ipc097910; Wed, 22 Apr 2015 01:08:44 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3M18f7N097880; Wed, 22 Apr 2015 01:08:41 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201504220108.t3M18f7N097880@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Wed, 22 Apr 2015 01:08:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281843 - in stable/10: sys/boot sys/boot/arm/uboot sys/boot/common sys/boot/forth sys/boot/i386/loader sys/boot/pc98/loader sys/boot/powerpc/ofw sys/boot/powerpc/ps3 sys/boot/sparc64/l... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 01:08:45 -0000 Author: dteske Date: Wed Apr 22 01:08:40 2015 New Revision: 281843 URL: https://svnweb.freebsd.org/changeset/base/281843 Log: MFC revisions 277693,278335,280382-280385,280923-280926,280931, 280933-280939,280974-280976,281002,281009,281081,281176-281180, 281271,281275,281616 (described in-breif below): r277693: Font fix (des) r278335: Revert that r280382: Whitespace, comments, and copyright update r280383: Prevent inadvertent bootlock condition r280384: Increase max passowrd length from 16 to 255 chars r280385: Add missing variable hints to loader.conf(5) defaults r280923: Whitespace r280924: Comments r280925: Optimize bootmsg to use fg/bg/me from screen.4th r280926: Whitespace and cleanup r280931: Comments r280933: Move beastie to logo-*.4th; brands to brand-*.4th r280934: Add remainder of supported ANSI escape sequences r280935: Securely overwrite (zero) user input after password checks r280936: Use equals for ASCII double frames r280937: Solve dreaded "dictionary full" issue r280938: Add "GELI Passphrase:" prompt to boot loader r280939: Revert that (premature commit) r280974: Use fg/b/me from screen.4th instead of literals r280975: Eliminate literal escape sequences from *.4th r280976: Use ^[[m mode-ending versus ^[[37m r281002: Install newly added brand-*.4th and logo-*.4th files (jkim) r281009: Revert .PATH changes to fix mips build (jkim) r281081: Make sure forth manpages are only installed once (bapt) r281176: Back to previous mode-endings based on feedback r281177: Back to previous mode-endings based on feedback r281178: Back to previous mode-endings based on feedback r281179: Back to previous mode-endings based on feedback r281180: Eliminate literal escape sequences from *.rc r281271: Fix a bootlock condition if loader_version is set NB: Commit message of r281271 has a typo, s/_logo/_version/ r281275: Re-do proper mode-endings r281616: Add "GELI Passphrase:" prompt to boot loader Relnotes: Added "GELI Passphrase:" prompt to boot loader Added: stable/10/sys/boot/forth/Makefile - copied unchanged from r281081, head/sys/boot/forth/Makefile stable/10/sys/boot/forth/Makefile.inc - copied, changed from r281002, head/sys/boot/forth/Makefile.inc stable/10/sys/boot/forth/brand-fbsd.4th - copied, changed from r280933, head/sys/boot/forth/brand-fbsd.4th stable/10/sys/boot/forth/logo-beastie.4th - copied, changed from r280933, head/sys/boot/forth/logo-beastie.4th stable/10/sys/boot/forth/logo-beastiebw.4th - copied, changed from r280933, head/sys/boot/forth/logo-beastiebw.4th stable/10/sys/boot/forth/logo-fbsdbw.4th - copied, changed from r280933, head/sys/boot/forth/logo-fbsdbw.4th stable/10/sys/boot/forth/logo-orb.4th - copied, changed from r280933, head/sys/boot/forth/logo-orb.4th stable/10/sys/boot/forth/logo-orbbw.4th - copied, changed from r280933, head/sys/boot/forth/logo-orbbw.4th Modified: stable/10/sys/boot/Makefile stable/10/sys/boot/arm/uboot/Makefile stable/10/sys/boot/common/Makefile.inc stable/10/sys/boot/forth/beastie.4th stable/10/sys/boot/forth/brand.4th stable/10/sys/boot/forth/check-password.4th stable/10/sys/boot/forth/check-password.4th.8 stable/10/sys/boot/forth/delay.4th stable/10/sys/boot/forth/frames.4th stable/10/sys/boot/forth/loader.4th stable/10/sys/boot/forth/loader.conf stable/10/sys/boot/forth/menu-commands.4th stable/10/sys/boot/forth/menu.4th stable/10/sys/boot/forth/menu.rc stable/10/sys/boot/forth/menusets.4th stable/10/sys/boot/forth/pnp.4th stable/10/sys/boot/forth/screen.4th stable/10/sys/boot/forth/support.4th stable/10/sys/boot/forth/version.4th stable/10/sys/boot/i386/loader/Makefile stable/10/sys/boot/pc98/loader/Makefile stable/10/sys/boot/powerpc/ofw/Makefile stable/10/sys/boot/powerpc/ps3/Makefile stable/10/sys/boot/sparc64/loader/Makefile stable/10/sys/kern/init_main.c stable/10/usr.sbin/bsdinstall/scripts/zfsboot Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/Makefile ============================================================================== --- stable/10/sys/boot/Makefile Wed Apr 22 00:40:41 2015 (r281842) +++ stable/10/sys/boot/Makefile Wed Apr 22 01:08:40 2015 (r281843) @@ -6,6 +6,7 @@ .if ${MK_FORTH} != "no" # Build the add-in FORTH interpreter. SUBDIR+= ficl +SUBDIR+= forth .endif # Pick the machine-dependent subdir based on the target architecture. Modified: stable/10/sys/boot/arm/uboot/Makefile ============================================================================== --- stable/10/sys/boot/arm/uboot/Makefile Wed Apr 22 00:40:41 2015 (r281842) +++ stable/10/sys/boot/arm/uboot/Makefile Wed Apr 22 01:08:40 2015 (r281843) @@ -137,11 +137,7 @@ ldscript.generated:: .if !defined(LOADER_ONLY) .PATH: ${.CURDIR}/../../forth -FILES+= loader.help loader.4th support.4th loader.conf -FILES+= screen.4th frames.4th beastie.4th -FILES+= brand.4th check-password.4th color.4th delay.4th -FILES+= menu.4th menu-commands.4th menusets.4th shortcuts.4th version.4th -FILESDIR_loader.conf= /boot/defaults +.include "${.CURDIR}/../../forth/Makefile.inc" # Put sample loader.rc and menu.rc on disk but don't enable them # by default. Modified: stable/10/sys/boot/common/Makefile.inc ============================================================================== --- stable/10/sys/boot/common/Makefile.inc Wed Apr 22 00:40:41 2015 (r281842) +++ stable/10/sys/boot/common/Makefile.inc Wed Apr 22 01:08:40 2015 (r281843) @@ -56,16 +56,6 @@ SRCS+= pnp.c # Forth interpreter .if defined(BOOT_FORTH) SRCS+= interp_forth.c -MAN+= ../forth/beastie.4th.8 -MAN+= ../forth/brand.4th.8 -MAN+= ../forth/check-password.4th.8 -MAN+= ../forth/color.4th.8 -MAN+= ../forth/delay.4th.8 -MAN+= ../forth/loader.conf.5 -MAN+= ../forth/loader.4th.8 -MAN+= ../forth/menu.4th.8 -MAN+= ../forth/menusets.4th.8 -MAN+= ../forth/version.4th.8 .endif .if defined(BOOT_PROMPT_123) Copied: stable/10/sys/boot/forth/Makefile (from r281081, head/sys/boot/forth/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/boot/forth/Makefile Wed Apr 22 01:08:40 2015 (r281843, copy of r281081, head/sys/boot/forth/Makefile) @@ -0,0 +1,13 @@ +# $FreeBSD$ + +MAN+= beastie.4th.8 \ + brand.4th.8 \ + check-password.4th.8 \ + color.4th.8 \ + delay.4th.8 \ + loader.conf.5 \ + loader.4th.8 \ + menu.4th.8 \ + menusets.4th.8 + +.include Copied and modified: stable/10/sys/boot/forth/Makefile.inc (from r281002, head/sys/boot/forth/Makefile.inc) ============================================================================== --- head/sys/boot/forth/Makefile.inc Thu Apr 2 20:07:05 2015 (r281002, copy source) +++ stable/10/sys/boot/forth/Makefile.inc Wed Apr 22 01:08:40 2015 (r281843) @@ -1,6 +1,5 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../forth FILES+= beastie.4th FILES+= brand.4th FILES+= brand-fbsd.4th Modified: stable/10/sys/boot/forth/beastie.4th ============================================================================== --- stable/10/sys/boot/forth/beastie.4th Wed Apr 22 00:40:41 2015 (r281842) +++ stable/10/sys/boot/forth/beastie.4th Wed Apr 22 01:08:40 2015 (r281843) @@ -1,6 +1,6 @@ -\ Copyright (c) 2003 Scott Long +\ Copyright (c) 2003 Scott Long \ Copyright (c) 2003 Aleksander Fafula -\ Copyright (c) 2006-2013 Devin Teske +\ Copyright (c) 2006-2015 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without @@ -28,7 +28,7 @@ marker task-beastie.4th -only forth definitions also support-functions +only forth definitions variable logoX variable logoY @@ -37,209 +37,52 @@ variable logoY 46 logoX ! 4 logoY ! -: beastie-logo ( x y -- ) \ color BSD mascot (19 rows x 34 columns) - -2dup at-xy ." , ," 1+ -2dup at-xy ." /( )`" 1+ -2dup at-xy ." \ \___ / |" 1+ -2dup at-xy ." /- _ `-/ '" 1+ -2dup at-xy ." (/\/ \ \ /\" 1+ -2dup at-xy ." / / | ` \" 1+ -2dup at-xy ." O O ) / |" 1+ -2dup at-xy ." `-^--'`< '" 1+ -2dup at-xy ." (_.) _ ) /" 1+ -2dup at-xy ." `.___/` /" 1+ -2dup at-xy ." `-----' /" 1+ -2dup at-xy ." <----. __ / __ \" 1+ -2dup at-xy ." <----|====O)))==) \) /====|" 1+ -2dup at-xy ." <----' `--' `.__,' \" 1+ -2dup at-xy ." | |" 1+ -2dup at-xy ." \ / /\" 1+ -2dup at-xy ." ______( (_ / \______/" 1+ -2dup at-xy ." ,' ,-----' |" 1+ - at-xy ." `--{__________)" - - \ Put the cursor back at the bottom - 0 25 at-xy -; - -: beastiebw-logo ( x y -- ) \ B/W BSD mascot (19 rows x 34 columns) - - 2dup at-xy ." , ," 1+ - 2dup at-xy ." /( )`" 1+ - 2dup at-xy ." \ \___ / |" 1+ - 2dup at-xy ." /- _ `-/ '" 1+ - 2dup at-xy ." (/\/ \ \ /\" 1+ - 2dup at-xy ." / / | ` \" 1+ - 2dup at-xy ." O O ) / |" 1+ - 2dup at-xy ." `-^--'`< '" 1+ - 2dup at-xy ." (_.) _ ) /" 1+ - 2dup at-xy ." `.___/` /" 1+ - 2dup at-xy ." `-----' /" 1+ - 2dup at-xy ." <----. __ / __ \" 1+ - 2dup at-xy ." <----|====O)))==) \) /====|" 1+ - 2dup at-xy ." <----' `--' `.__,' \" 1+ - 2dup at-xy ." | |" 1+ - 2dup at-xy ." \ / /\" 1+ - 2dup at-xy ." ______( (_ / \______/" 1+ - 2dup at-xy ." ,' ,-----' |" 1+ - at-xy ." `--{__________)" - - \ Put the cursor back at the bottom - 0 25 at-xy -; - -: fbsdbw-logo ( x y -- ) \ "FreeBSD" logo in B/W (13 rows x 21 columns) - - \ We used to use the beastie himself as our default... until the - \ eventual complaint derided his reign of the advanced boot-menu. - \ - \ This is the replacement of beastie to satiate the haters of our - \ beloved helper-daemon (ready to track down and spear bugs with - \ his trident and sporty sneakers; see above). - \ - \ Since we merely just changed the default and not the default- - \ location, below is an adjustment to the passed-in coordinates, - \ forever influenced by the proper location of beastie himself - \ kept as the default loader_logo_x/loader_logo_y values. - \ - 5 + swap 6 + swap - - 2dup at-xy ." ______" 1+ - 2dup at-xy ." | ____| __ ___ ___ " 1+ - 2dup at-xy ." | |__ | '__/ _ \/ _ \" 1+ - 2dup at-xy ." | __|| | | __/ __/" 1+ - 2dup at-xy ." | | | | | | |" 1+ - 2dup at-xy ." |_| |_| \___|\___|" 1+ - 2dup at-xy ." ____ _____ _____" 1+ - 2dup at-xy ." | _ \ / ____| __ \" 1+ - 2dup at-xy ." | |_) | (___ | | | |" 1+ - 2dup at-xy ." | _ < \___ \| | | |" 1+ - 2dup at-xy ." | |_) |____) | |__| |" 1+ - 2dup at-xy ." | | | |" 1+ - at-xy ." |____/|_____/|_____/" - - \ Put the cursor back at the bottom - 0 25 at-xy -; - -: orb-logo ( x y -- ) \ color Orb mascot (15 rows x 30 columns) - - 3 + \ beastie adjustment (see `fbsdbw-logo' comments above) - - 2dup at-xy ." ``` `" 1+ - 2dup at-xy ." s` `.....---.......--.``` -/" 1+ - 2dup at-xy ." +o .--` /y:` +." 1+ - 2dup at-xy ." yo`:. :o `+-" 1+ - 2dup at-xy ." y/ -/` -o/" 1+ - 2dup at-xy ." .- ::/sy+:." 1+ - 2dup at-xy ." / `-- /" 1+ - 2dup at-xy ." `: :`" 1+ - 2dup at-xy ." `: :`" 1+ - 2dup at-xy ." / /" 1+ - 2dup at-xy ." .- -." 1+ - 2dup at-xy ." -- -." 1+ - 2dup at-xy ." `:` `:`" 1+ - 2dup at-xy ." .-- `--." 1+ - at-xy ." .---.....----." - - \ Put the cursor back at the bottom - 0 25 at-xy -; - -: orbbw-logo ( x y -- ) \ B/W Orb mascot (15 rows x 32 columns) - - 3 + \ beastie adjustment (see `fbsdbw-logo' comments above) - - 2dup at-xy ." ``` `" 1+ - 2dup at-xy ." s` `.....---.......--.``` -/" 1+ - 2dup at-xy ." +o .--` /y:` +." 1+ - 2dup at-xy ." yo`:. :o `+-" 1+ - 2dup at-xy ." y/ -/` -o/" 1+ - 2dup at-xy ." .- ::/sy+:." 1+ - 2dup at-xy ." / `-- /" 1+ - 2dup at-xy ." `: :`" 1+ - 2dup at-xy ." `: :`" 1+ - 2dup at-xy ." / /" 1+ - 2dup at-xy ." .- -." 1+ - 2dup at-xy ." -- -." 1+ - 2dup at-xy ." `:` `:`" 1+ - 2dup at-xy ." .-- `--." 1+ - at-xy ." .---.....----." - - \ Put the cursor back at the bottom - 0 25 at-xy -; - \ This function draws any number of beastie logos at (loader_logo_x, \ loader_logo_y) if defined, else (46,4) (to the right of the menu). To choose \ your beastie, set the variable `loader_logo' to the respective logo name. \ -\ Currently available: -\ -\ NAME DESCRIPTION -\ beastie Color ``Helper Daemon'' mascot (19 rows x 34 columns) -\ beastiebw B/W ``Helper Daemon'' mascot (19 rows x 34 columns) -\ fbsdbw "FreeBSD" logo in B/W (13 rows x 21 columns) -\ orb Color ``Orb'' mascot (15 rows x 30 columns) (2nd default) -\ orbbw B/W ``Orb'' mascot (15 rows x 32 columns) -\ tribute Color ``Tribute'' (must fit 19 rows x 34 columns) (default) -\ tributebw B/W ``Tribute'' (must fit 19 rows x 34 columns) -\ -\ NOTE: Setting `loader_logo' to an undefined value (such as "none") will -\ prevent beastie from being drawn. +\ NOTE: Each is defined as a logo function in /boot/logo-${loader_logo}.4th +\ NOTE: If `/boot/logo-${loader_logo}.4th' does not exist or does not define +\ a `logo' function, no beastie is drawn. \ : draw-beastie ( -- ) \ at (loader_logo_x,loader_logo_y), else (46,4) s" loader_logo_x" getenv dup -1 <> if ?number 1 = if logoX ! then - else - drop - then + else drop then s" loader_logo_y" getenv dup -1 <> if ?number 1 = if logoY ! then - else - drop - then + else drop then - s" loader_logo" getenv dup -1 <> if - dup 5 + allocate if ENOMEM throw then - 0 2swap strcat s" -logo" strcat - over -rot ( a-addr/u -- a-addr a-addr/u ) - sfind ( a-addr a-addr/u -- a-addr xt bool ) - rot ( a-addr xt bool -- xt bool a-addr ) - free ( xt bool a-addr -- xt bool ior ) - if EFREE throw then + + \ If `logo' is defined, execute it + s" logo" sfind ( -- xt|0 bool ) if + logoX @ logoY @ rot execute else - 0 ( cruft -- cruft bool ) \ load the default below - then - 0= if - drop ( cruft -- ) - loader_color? if - ['] orb-logo + \ Not defined; try-include desired logo file + drop ( xt = 0 ) \ cruft + s" loader_logo" getenv dup -1 = over 0= or if + dup 0= if 2drop else drop then \ getenv result unused + loader_color? if + s" try-include /boot/logo-orb.4th" + else + s" try-include /boot/logo-orbbw.4th" + then else - ['] orbbw-logo + 2drop ( c-addr/u -- ) \ getenv result unused + s" try-include /boot/logo-${loader_logo}.4th" then + evaluate + 1 spaces + + \ Execute `logo' if defined now + s" logo" sfind if + logoX @ logoY @ rot execute + else drop then then - logoX @ logoY @ rot execute ; -: clear-beastie ( -- ) \ clears beastie from the screen - logoX @ logoY @ - 2dup at-xy 34 spaces 1+ 2dup at-xy 34 spaces 1+ - 2dup at-xy 34 spaces 1+ 2dup at-xy 34 spaces 1+ - 2dup at-xy 34 spaces 1+ 2dup at-xy 34 spaces 1+ - 2dup at-xy 34 spaces 1+ 2dup at-xy 34 spaces 1+ - 2dup at-xy 34 spaces 1+ 2dup at-xy 34 spaces 1+ - 2dup at-xy 34 spaces 1+ 2dup at-xy 34 spaces 1+ - 2dup at-xy 34 spaces 1+ 2dup at-xy 34 spaces 1+ - 2dup at-xy 34 spaces 1+ 2dup at-xy 34 spaces 1+ - 2dup at-xy 34 spaces 1+ 2dup at-xy 34 spaces 1+ - 2dup at-xy 34 spaces 2drop - - \ Put the cursor back at the bottom - 0 25 at-xy -; +also support-functions : beastie-start ( -- ) \ starts the menu s" console" getenv dup -1 <> if @@ -247,8 +90,7 @@ variable logoY s" set beastie_disable=YES" evaluate then else drop then - s" beastie_disable" getenv - dup -1 <> if + s" beastie_disable" getenv dup -1 <> if s" YES" compare-insensitive 0= if any_conf_read? if load_kernel @@ -256,12 +98,9 @@ variable logoY then exit \ to autoboot (default) then - else - drop - then + else drop then - s" loader_delay" getenv - -1 = if + s" loader_delay" getenv -1 = if s" include /boot/menu.rc" evaluate else drop @@ -272,4 +111,4 @@ variable logoY then ; -only forth also +only forth definitions Copied and modified: stable/10/sys/boot/forth/brand-fbsd.4th (from r280933, head/sys/boot/forth/brand-fbsd.4th) ============================================================================== --- head/sys/boot/forth/brand-fbsd.4th Wed Apr 1 01:14:19 2015 (r280933, copy source) +++ stable/10/sys/boot/forth/brand-fbsd.4th Wed Apr 22 01:08:40 2015 (r281843) @@ -26,13 +26,21 @@ 2 brandX ! 1 brandY ! \ Initialize brand placement defaults +: brand+ ( x y c-addr/u -- x y' ) + 2swap 2dup at-xy 2swap \ position the cursor + type \ print to the screen + 1+ \ increase y for next time we're called +; + : brand ( x y -- ) \ "FreeBSD" [wide] logo in B/W (7 rows x 42 columns) - 2dup at-xy ." ______ ____ _____ _____ " 1+ - 2dup at-xy ." | ____| | _ \ / ____| __ \ " 1+ - 2dup at-xy ." | |___ _ __ ___ ___ | |_) | (___ | | | |" 1+ - 2dup at-xy ." | ___| '__/ _ \/ _ \| _ < \___ \| | | |" 1+ - 2dup at-xy ." | | | | | __/ __/| |_) |____) | |__| |" 1+ - 2dup at-xy ." | | | | | | || | | |" 1+ - at-xy ." |_| |_| \___|\___||____/|_____/|_____/ " + s" ______ ____ _____ _____ " brand+ + s" | ____| | _ \ / ____| __ \ " brand+ + s" | |___ _ __ ___ ___ | |_) | (___ | | | |" brand+ + s" | ___| '__/ _ \/ _ \| _ < \___ \| | | |" brand+ + s" | | | | | __/ __/| |_) |____) | |__| |" brand+ + s" | | | | | | || | | |" brand+ + s" |_| |_| \___|\___||____/|_____/|_____/ " brand+ + + 2drop ; Modified: stable/10/sys/boot/forth/brand.4th ============================================================================== --- stable/10/sys/boot/forth/brand.4th Wed Apr 22 00:40:41 2015 (r281842) +++ stable/10/sys/boot/forth/brand.4th Wed Apr 22 01:08:40 2015 (r281843) @@ -1,4 +1,4 @@ -\ Copyright (c) 2006-2011 Devin Teske +\ Copyright (c) 2006-2015 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without @@ -29,74 +29,46 @@ marker task-brand.4th variable brandX variable brandY -\ Initialize logo placement +\ Initialize brand placement to defaults 2 brandX ! 1 brandY ! -: fbsd-logo ( x y -- ) \ "FreeBSD" [wide] logo in B/W (7 rows x 42 columns) - - 2dup at-xy ." ______ ____ _____ _____ " 1+ - 2dup at-xy ." | ____| | _ \ / ____| __ \ " 1+ - 2dup at-xy ." | |___ _ __ ___ ___ | |_) | (___ | | | |" 1+ - 2dup at-xy ." | ___| '__/ _ \/ _ \| _ < \___ \| | | |" 1+ - 2dup at-xy ." | | | | | __/ __/| |_) |____) | |__| |" 1+ - 2dup at-xy ." | | | | | | || | | |" 1+ - at-xy ." |_| |_| \___|\___||____/|_____/|_____/ " - - \ Put the cursor back at the bottom - 0 25 at-xy -; - -\ This function draws any number of company logos at (loader_brand_x, -\ loader_brand_y) if defined, or (2,1) (top-left) if not defined. To choose -\ your logo, set the variable `loader_brand' to the respective logo name. -\ -\ Currently available: -\ -\ NAME DESCRIPTION -\ fbsd FreeBSD logo +\ This function draws any number of company brands at (loader_brand_x, +\ loader_brand_y) if defined, or (2,1) (top-left). To choose your brand, set +\ the variable `loader_brand' to the respective brand name. +\ +\ NOTE: Each is defined as a brand function in /boot/brand-${loader_brand}.4th +\ NOTE: If `/boot/brand-${loader_brand}.4th' does not exist or does not define +\ a `brand' function, no brand is drawn. \ -\ NOTE: Setting `loader_brand' to the value of an existing function -\ (such as "mycustom-brand") will cause that symbol to be executed. -\ NOTE: Setting `loader_brand' to an undefined value (such as "none") will -\ prevent any brand from being drawn. -\ -: draw-brand ( -- ) +: draw-brand ( -- ) \ at (loader_brand_x,loader_brand_y), else (2,1) s" loader_brand_x" getenv dup -1 <> if - ?number 1 = if - brandX ! - then - else - drop - then - + ?number 1 = if brandX ! then + else drop then s" loader_brand_y" getenv dup -1 <> if - ?number 1 = if - brandY ! - then - else - drop - then + ?number 1 = if brandY ! then + else drop then - s" loader_brand" getenv dup -1 = if - brandX @ brandY @ fbsd-logo - drop exit - then + \ If `brand' is defined, execute it + s" brand" sfind ( -- xt|0 bool ) if + brandX @ brandY @ rot execute + else + \ Not defined; try-include desired brand file + drop ( xt = 0 ) \ cruft + s" loader_brand" getenv dup -1 = over 0= or if + dup 0= if 2drop else drop then \ getenv result unused + s" try-include /boot/brand-fbsd.4th" + else + 2drop ( c-addr/u -- ) \ getenv result unused + s" try-include /boot/brand-${loader_brand}.4th" + then + evaluate + 1 spaces - 2dup s" fbsd" compare-insensitive 0= if - brandX @ brandY @ fbsd-logo - 2drop exit + \ Execute `brand' if defined now + s" brand" sfind if + brandX @ brandY @ rot execute + else drop then then - - \ if it refers to a raw symbol then run that function - sfind if - brandX @ brandY @ - 2 roll - execute - else - drop - then - - 2drop ; Modified: stable/10/sys/boot/forth/check-password.4th ============================================================================== --- stable/10/sys/boot/forth/check-password.4th Wed Apr 22 00:40:41 2015 (r281842) +++ stable/10/sys/boot/forth/check-password.4th Wed Apr 22 01:08:40 2015 (r281843) @@ -1,4 +1,4 @@ -\ Copyright (c) 2006-2012 Devin Teske +\ Copyright (c) 2006-2015 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without @@ -28,15 +28,19 @@ marker task-check-password.4th include /boot/screen.4th -13 constant enter_key \ The decimal ASCII value for Enter key -8 constant bs_key \ The decimal ASCII value for Backspace key -16 constant readmax \ Maximum number of characters for the password +vocabulary password-processing +only forth also password-processing definitions -variable readX \ Current X offset (column)(used by read) -variable read-start \ Starting X offset (column)(used by read) +13 constant enter_key \ The decimal ASCII value for Enter key +8 constant bs_key \ The decimal ASCII value for Backspace key +21 constant ctrl_u \ The decimal ASCII value for Ctrl-U sequence +255 constant readmax \ Maximum number of characters for the password -create readval 16 allot \ input obtained (maximum 16 characters) -variable readlen \ input length +variable read-tick \ Twiddle position (used by read) +variable read-start \ Starting X offset (column)(used by read) + +create readval readmax allot \ input obtained (up to readmax characters) +variable readlen \ input length \ This function blocks program flow (loops forever) until a key is pressed. \ The key that was pressed is added to the top of the stack in the form of its @@ -48,37 +52,50 @@ variable readlen \ input length \ : sgetkey ( -- ) - begin \ Loop forever - key? if \ Was a key pressed? (see loader(8)) - - drop \ Remove stack-cruft - key \ Get the key that was pressed + begin \ Loop forever + key? if \ Was a key pressed? (see loader(8)) + drop \ Remove stack-cruft + key \ Get the key that was pressed + + \ Check key pressed (see loader(8)) and input limit + dup 0<> if ( and ) readlen @ readmax < if + \ Spin the twiddle and then exit this function + read-tick @ dup 1+ 4 mod read-tick ! + 2 spaces + dup 0 = if ( 1 ) ." /" else + dup 1 = if ( 2 ) ." -" else + dup 2 = if ( 3 ) ." \" else + dup 3 = if ( 4 ) ." |" else + 1 spaces + then then then then drop + read-start @ 25 at-xy + exit + then then + + \ Always allow Backspace, Enter, and Ctrl-U + dup bs_key = if exit then + dup enter_key = if exit then + dup ctrl_u = if exit then + then + 50 ms \ Sleep for 50 milliseconds (see loader(8)) + again +; - \ Check key pressed (see loader(8)) and input limit - dup 0<> if ( and ) readlen @ readmax < if +: cfill ( c c-addr/u -- ) + begin dup 0> while + -rot 2dup c! 1+ rot 1- + repeat 2drop drop +; - \ Echo an asterisk (unless Backspace/Enter) - dup bs_key <> if ( and ) dup enter_key <> if - ." *" \ Echo an asterisk - then then - - exit \ Exit from the function - then then - - \ Always allow Backspace and Enter - dup bs_key = if exit then - dup enter_key = if exit then - - then - 50 ms \ Sleep for 50 milliseconds (see loader(8)) - again +: read-reset ( -- ) + 0 readlen ! + 0 readval readmax cfill ; -: read ( String prompt -- ) +: read ( c-addr/u -- ) \ Expects string prompt as stack input 0 25 at-xy \ Move the cursor to the bottom-left dup 1+ read-start ! \ Store X offset after the prompt - read-start @ readX ! \ copy value to the current X offset 0 readlen ! \ Initialize the read length type \ Print the prompt @@ -90,63 +107,53 @@ variable readlen \ input length \ security reasons). If Enter is pressed, we process the \ password, otherwise augment the key to a string. - \ If the key that was entered was not Enter, advance - dup enter_key <> if - readX @ 1+ readX ! \ Advance the column - readlen @ 1+ readlen ! \ Increment input length - then - - \ Handle backspacing - dup bs_key = if - readX @ 2 - readX ! \ Set new cursor position - readlen @ 2 - readlen ! \ Decrement input length - - \ Don't move behind starting position - readX @ read-start @ < if - read-start @ readX ! - then - readlen @ 0< if - 0 readlen ! - then - - \ Reposition cursor and erase character - readX @ 25 at-xy 1 spaces readX @ 25 at-xy - then - dup enter_key = if - drop \ Clean up stack cruft - 10 emit \ Echo new line + drop \ Clean up stack cruft + 3 spaces \ Erase the twiddle + 10 emit \ Echo new line exit - then - - \ If not Backspace or Enter, store the character - dup bs_key <> if ( and ) dup enter_key <> if - - \ store the character in our buffer - dup readval readlen @ 1- + c! - - then then - - drop \ drop the last key that was entered + else dup ctrl_u = if + 3 spaces read-start @ 25 at-xy \ Erase the twiddle + 0 readlen ! \ Reset input to NULL + else dup bs_key = if + readlen @ 1 - dup readlen ! \ Decrement input length + dup 0< if drop 0 dup readlen ! then \ Don't go negative + 0= if 3 spaces read-start @ 25 at-xy then \ Twiddle + else dup \ Store the character + \ NB: sgetkey prevents overflow by way of blocking + \ at readmax except for Backspace or Enter + readlen @ 1+ dup readlen ! 1- readval + c! + then then then + drop \ last key pressed again \ Enter was not pressed; repeat ; +only forth definitions also password-processing + : check-password ( -- ) \ Do not allow the user to proceed beyond this point if a boot-lock \ password has been set (preventing even boot from proceeding) s" bootlock_password" getenv dup -1 <> if + dup readmax > if drop readmax then begin s" Boot Password: " read ( prompt -- ) 2dup readval readlen @ compare 0<> while 3000 ms ." loader: incorrect password" 10 emit repeat - 2drop ( c-addr/u ) - else - drop ( -1 ) \ getenv cruft - then + 2drop read-reset + else drop then + + \ Prompt for GEOM ELI (geli(8)) passphrase if enabled + s" geom_eli_passphrase_prompt" getenv dup -1 <> if + s" YES" compare-insensitive 0= if + s" GELI Passphrase: " read ( prompt -- ) + readval readlen @ s" kern.geom.eli.passphrase" setenv + read-reset + then + else drop then \ Exit if a password was not set s" password" getenv -1 = if exit else drop then @@ -159,12 +166,14 @@ variable readlen \ input length \ Only reached if autoboot fails for any reason (including if/when \ the user aborts/escapes the countdown sequence leading to boot). - s" password" getenv + s" password" getenv dup readmax > if drop readmax then begin s" Password: " read ( prompt -- ) - 2dup readval readlen @ compare 0= if - 2drop exit \ Correct password + 2dup readval readlen @ compare 0= if \ Correct password? + 2drop read-reset exit then 3000 ms ." loader: incorrect password" 10 emit again ; + +only forth definitions Modified: stable/10/sys/boot/forth/check-password.4th.8 ============================================================================== --- stable/10/sys/boot/forth/check-password.4th.8 Wed Apr 22 00:40:41 2015 (r281842) +++ stable/10/sys/boot/forth/check-password.4th.8 Wed Apr 22 01:08:40 2015 (r281843) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2011-2012 Devin Teske +.\" Copyright (c) 2011-2015 Devin Teske .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 10, 2012 +.Dd March 20, 2015 .Dt CHECK-PASSWORD.4TH 8 .Os .Sh NAME @@ -33,8 +33,12 @@ .Sh DESCRIPTION The file that goes by the name of .Nm -is a set of commands designed to either prevent booting or prevent modification -of boot options without an appropriately configured password. +is a set of commands designed to do one or more of the following: +.Pp +.Dl o Prevent booting without password +.Dl o Prevent modification of boot options without password +.Dl o Provide a password to mount geli(8) encrypted root disk(s) +.Pp The commands of .Nm by themselves are not enough for most uses. @@ -58,14 +62,23 @@ The commands provided by it are: .Pp .Bl -tag -width disable-module_module -compact -offset indent .It Ic check-password -Dual-purpose function that can either protect the interactive boot menu or -prevent boot without password (separately). +Multi-purpose function that can protect the interactive boot menu, +prevent boot without password, or prompt for geli(8) passphrase +.Pq depending on Xr loader.conf 5 settings . .Pp First checks .Va bootlock_password and if-set, the user cannot continue until the correct password is entered. .Pp -Next checks +Next, checks +.Va geom_eli_passphrase_prompt +and if set to +.Li YES +.Pq case-insensitive +prompts the user to enter their GELI password for later mounting of the root +device(s) during boot. +.Pp +Last, checks .Va password and if-set, tries to .Ic autoboot @@ -81,6 +94,11 @@ The environment variables that effect it Sets the bootlock password (up to 16 characters long) that is required by .Ic check-password to be entered before the system is allowed to boot. +.It Va geom_eli_passphrase_prompt +Selects whether loader(8) will prompt for GELI credentials, handing-off to the +kernel for later mounting of +.Xr geli 8 +encrypted root device(s). .It Va password Sets the password (up to 16 characters long) that is required by .Ic check-password @@ -122,6 +140,16 @@ to prevent booting without password: .Bd -literal -offset indent -compact bootlock_password="boot" .Ed +.Pp +Add the following to +.Xr loader.conf 5 +to generate a prompt at boot to collect GELI credentials for mounting +.Xr geli 8 +encrypted root device(s): +.Pp +.Bd -literal -offset indent -compact +geom_eli_passphrase_prompt="YES" +.Ed .Sh SEE ALSO .Xr loader.conf 5 , .Xr loader 8 , Modified: stable/10/sys/boot/forth/delay.4th ============================================================================== --- stable/10/sys/boot/forth/delay.4th Wed Apr 22 00:40:41 2015 (r281842) +++ stable/10/sys/boot/forth/delay.4th Wed Apr 22 01:08:40 2015 (r281843) @@ -1,4 +1,4 @@ -\ Copyright (c) 2008-2011 Devin Teske +\ Copyright (c) 2008-2015 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without @@ -26,6 +26,9 @@ marker task-delay.4th +vocabulary delay-processing +only forth also delay-processing definitions + 2 constant delay_default \ Default delay (in seconds) 3 constant etx_key \ End-of-Text character produced by Ctrl+C 13 constant enter_key \ Carriage-Return character produce by ENTER @@ -36,6 +39,8 @@ variable delay_delay \ determined c variable delay_cancelled \ state variable for user cancellation variable delay_showdots \ whether continually print dots while waiting +only forth definitions also delay-processing + : delay_execute ( -- ) \ make sure that we have a command to execute @@ -110,3 +115,5 @@ variable delay_showdots \ whether cont evaluate \ evaluate/execute the command string then ; + +only forth definitions Modified: stable/10/sys/boot/forth/frames.4th ============================================================================== --- stable/10/sys/boot/forth/frames.4th Wed Apr 22 00:40:41 2015 (r281842) +++ stable/10/sys/boot/forth/frames.4th Wed Apr 22 01:08:40 2015 (r281843) @@ -1,9 +1,37 @@ -\ Words implementing frame drawing -\ XXX Filled boxes are left as an exercise for the reader... ;-/ +\ Copyright (c) 2003 Scott Long +\ Copyright (c) 2012-2015 Devin Teske +\ All rights reserved. +\ +\ Redistribution and use in source and binary forms, with or without +\ modification, are permitted provided that the following conditions +\ are met: +\ 1. Redistributions of source code must retain the above copyright +\ notice, this list of conditions and the following disclaimer. +\ 2. Redistributions in binary form must reproduce the above copyright +\ notice, this list of conditions and the following disclaimer in the +\ documentation and/or other materials provided with the distribution. +\ +\ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +\ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +\ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +\ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +\ SUCH DAMAGE. +\ \ $FreeBSD$ marker task-frames.4th +vocabulary frame-drawing +only forth also frame-drawing definitions + +\ XXX Filled boxes are left as an exercise for the reader... ;-/ + variable h_el variable v_el variable lt_el @@ -14,6 +42,7 @@ variable fill \ ASCII frames (used when serial console is detected) 45 constant ascii_dash + 61 constant ascii_equal 124 constant ascii_pipe 43 constant ascii_plus @@ -61,6 +90,8 @@ s" arch-pc98" environment? [if] 178 constant fill_bright [then] +only forth definitions also frame-drawing + : hline ( len x y -- ) \ Draw horizontal single line at-xy \ move cursor 0 do @@ -88,7 +119,11 @@ s" arch-pc98" environment? [if] ; : f_double ( -- ) \ set frames to double - boot_serial? if f_ascii exit then + boot_serial? if + f_ascii + ascii_equal h_el ! + exit + then dh_el h_el ! dv_el v_el ! dlt_el lt_el ! @@ -126,3 +161,5 @@ s" arch-pc98" environment? [if] f_single fill_none fill ! + +only forth definitions Modified: stable/10/sys/boot/forth/loader.4th ============================================================================== --- stable/10/sys/boot/forth/loader.4th Wed Apr 22 00:40:41 2015 (r281842) +++ stable/10/sys/boot/forth/loader.4th Wed Apr 22 01:08:40 2015 (r281843) @@ -1,4 +1,5 @@ -\ Copyright (c) 1999 Daniel C. Sobral +\ Copyright (c) 1999 Daniel C. Sobral +\ Copyright (c) 2011-2015 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without @@ -24,6 +25,8 @@ \ \ $FreeBSD$ +only forth definitions + s" arch-i386" environment? [if] [if] s" loader_version" environment? [if] 11 < [if] @@ -42,15 +45,16 @@ s" arch-i386" environment? [if] [if] include /boot/support.4th include /boot/color.4th include /boot/delay.4th +include /boot/check-password.4th -only forth also support-functions also builtins definitions +only forth definitions : bootmsg ( -- ) - loader_color? if - ." Booting..." cr - else - ." Booting..." cr - then + loader_color? dup ( -- bool bool ) + if 7 fg 4 bg then + ." Booting..." + if me then + cr ; : try-menu-unset @@ -77,6 +81,8 @@ only forth also support-functions also b then ; +only forth also support-functions also builtins definitions + : boot 0= if ( interpreted ) get_arguments then @@ -120,15 +126,13 @@ only forth also support-functions also b ?dup 0= if 0 1 autoboot then ; -also forth definitions also builtins +also forth definitions previous builtin: boot builtin: boot-conf only forth definitions also support-functions -include /boot/check-password.4th - \ ***** start \ \ Initializes support.4th global variables, sets loader_conf_files, @@ -244,5 +248,4 @@ include /boot/check-password.4th then ; immediate \ interpret immediately for access to `source' (aka tib) -only forth also - +only forth definitions Modified: stable/10/sys/boot/forth/loader.conf ============================================================================== --- stable/10/sys/boot/forth/loader.conf Wed Apr 22 00:40:41 2015 (r281842) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 01:35:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2902CA9; Wed, 22 Apr 2015 01:35:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0CF2182F; Wed, 22 Apr 2015 01:35:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3M1ZTQ3017561; Wed, 22 Apr 2015 01:35:29 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3M1ZTap017560; Wed, 22 Apr 2015 01:35:29 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201504220135.t3M1ZTap017560@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Wed, 22 Apr 2015 01:35:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281844 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 01:35:30 -0000 Author: rodrigc Date: Wed Apr 22 01:35:29 2015 New Revision: 281844 URL: https://svnweb.freebsd.org/changeset/base/281844 Log: Quiet compiler warnings in mbuf.h * Mark unused arguments with __unused * Move inline before the return type (and use __inline to keep the file consistent in style.) Submitted by: Steve Kiernan Obtained from: Juniper Networks, Inc. Modified: head/sys/sys/mbuf.h Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Wed Apr 22 01:08:40 2015 (r281843) +++ head/sys/sys/mbuf.h Wed Apr 22 01:35:29 2015 (r281844) @@ -616,8 +616,8 @@ m_getzone(int size) * should go away with constant propagation for !MGETHDR. */ static __inline int -m_init(struct mbuf *m, uma_zone_t zone, int size, int how, short type, - int flags) +m_init(struct mbuf *m, uma_zone_t zone __unused, int size __unused, int how, + short type, int flags) { int error; @@ -1122,7 +1122,7 @@ m_tag_first(struct mbuf *m) * Return the next tag in the list of tags associated with an mbuf. */ static __inline struct m_tag * -m_tag_next(struct mbuf *m, struct m_tag *t) +m_tag_next(struct mbuf *m __unused, struct m_tag *t) { return (SLIST_NEXT(t, m_tag_link)); @@ -1178,7 +1178,7 @@ m_free(struct mbuf *m) return (n); } -static int inline +static __inline int rt_m_getfib(struct mbuf *m) { KASSERT(m->m_flags & M_PKTHDR , ("Attempt to get FIB from non header mbuf.")); From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 01:54:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BA0FCF68; Wed, 22 Apr 2015 01:54:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A772519E2; Wed, 22 Apr 2015 01:54:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3M1sRrv031385; Wed, 22 Apr 2015 01:54:27 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3M1sQOi031375; Wed, 22 Apr 2015 01:54:26 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201504220154.t3M1sQOi031375@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Wed, 22 Apr 2015 01:54:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281845 - in head: lib/libc/stdio libexec/rtld-elf sys/kern sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 01:54:27 -0000 Author: rodrigc Date: Wed Apr 22 01:54:25 2015 New Revision: 281845 URL: https://svnweb.freebsd.org/changeset/base/281845 Log: Support file verification in MAC. * Add VCREAT flag to indicate when a new file is being created * Add VVERIFY to indicate verification is required * Both VCREAT and VVERIFY are only passed on the MAC method vnode_check_open and are removed from the accmode after * Add O_VERIFY flag to rtld open of objects * Add 'v' flag to __sflags to set O_VERIFY flag. Submitted by: Steve Kiernan Obtained from: Juniper Networks, Inc. GitHub Pull Request: https://github.com/freebsd/freebsd/pull/27 Relnotes: yes Modified: head/lib/libc/stdio/flags.c head/libexec/rtld-elf/rtld.c head/sys/kern/vfs_vnops.c head/sys/sys/fcntl.h head/sys/sys/vnode.h Modified: head/lib/libc/stdio/flags.c ============================================================================== --- head/lib/libc/stdio/flags.c Wed Apr 22 01:35:29 2015 (r281844) +++ head/lib/libc/stdio/flags.c Wed Apr 22 01:54:25 2015 (r281845) @@ -97,6 +97,10 @@ __sflags(const char *mode, int *optr) /* set close-on-exec */ o |= O_CLOEXEC; break; + case 'v': + /* verify */ + o |= O_VERIFY; + break; default: known = 0; break; Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Wed Apr 22 01:35:29 2015 (r281844) +++ head/libexec/rtld-elf/rtld.c Wed Apr 22 01:54:25 2015 (r281845) @@ -2165,7 +2165,7 @@ load_object(const char *name, int fd_u, * To avoid a race, we open the file and use fstat() rather than * using stat(). */ - if ((fd = open(path, O_RDONLY | O_CLOEXEC)) == -1) { + if ((fd = open(path, O_RDONLY | O_CLOEXEC | O_VERIFY)) == -1) { _rtld_error("Cannot open \"%s\"", path); free(path); return (NULL); @@ -2855,7 +2855,7 @@ search_library_pathfds(const char *name, dirfd = parse_libdir(fdstr); if (dirfd < 0) break; - fd = __sys_openat(dirfd, name, O_RDONLY | O_CLOEXEC); + fd = __sys_openat(dirfd, name, O_RDONLY | O_CLOEXEC | O_VERIFY); if (fd >= 0) { *fdp = fd; len = strlen(fdstr) + strlen(name) + 3; Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Wed Apr 22 01:35:29 2015 (r281844) +++ head/sys/kern/vfs_vnops.c Wed Apr 22 01:54:25 2015 (r281845) @@ -306,9 +306,15 @@ vn_open_vnode(struct vnode *vp, int fmod if ((fmode & O_APPEND) && (fmode & FWRITE)) accmode |= VAPPEND; #ifdef MAC + if (fmode & O_CREAT) + accmode |= VCREAT; + if (fmode & O_VERIFY) + accmode |= VVERIFY; error = mac_vnode_check_open(cred, vp, accmode); if (error) return (error); + + accmode &= ~(VCREAT | VVERIFY); #endif if ((fmode & O_CREAT) == 0) { if (accmode & VWRITE) { Modified: head/sys/sys/fcntl.h ============================================================================== --- head/sys/sys/fcntl.h Wed Apr 22 01:35:29 2015 (r281844) +++ head/sys/sys/fcntl.h Wed Apr 22 01:54:25 2015 (r281845) @@ -129,6 +129,10 @@ typedef __pid_t pid_t; #define O_CLOEXEC 0x00100000 #endif +#if __BSD_VISIBLE +#define O_VERIFY 0x00200000 /* open only after verification */ +#endif + /* * XXX missing O_DSYNC, O_RSYNC. */ Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Wed Apr 22 01:35:29 2015 (r281844) +++ head/sys/sys/vnode.h Wed Apr 22 01:54:25 2015 (r281845) @@ -336,6 +336,8 @@ struct vattr { #define VWRITE_ACL 000040000000 /* change ACL and/or file mode */ #define VWRITE_OWNER 000100000000 /* change file owner */ #define VSYNCHRONIZE 000200000000 /* not used */ +#define VCREAT 000400000000 /* creating new file */ +#define VVERIFY 001000000000 /* verification required */ /* * Permissions that were traditionally granted only to the file owner. From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 08:34:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35BBC668; Wed, 22 Apr 2015 08:34:22 +0000 (UTC) Received: from mail.sysgo.com (mail.sysgo.com [176.9.53.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC69411E0; Wed, 22 Apr 2015 08:34:21 +0000 (UTC) Date: Wed, 22 Apr 2015 10:28:16 +0200 From: Thomas Mueller To: Devin Teske Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r281843 - in stable/10: sys/boot sys/boot/arm/uboot sys/boot/common sys/boot/forth sys/boot/i386/loader sys/boot/pc98/loader sys/boot/powerpc/ofw sys/boot/powerpc/ps3 sys/boot/sparc64/l... Message-ID: <20150422102816.52860690@tmu.ulm.sysgo.com> In-Reply-To: <201504220108.t3M18f7N097880@svn.freebsd.org> References: <201504220108.t3M18f7N097880@svn.freebsd.org> Organization: SYSGO AG X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.27; amd64-portbld-freebsd10.1) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 08:34:22 -0000 On Wed, 22 Apr 2015 01:08:41 +0000 (UTC), Devin Teske wrote: > Author: dteske > Date: Wed Apr 22 01:08:40 2015 > New Revision: 281843 > URL: https://svnweb.freebsd.org/changeset/base/281843 > > Log: > [...] > r281616: Add "GELI Passphrase:" prompt to boot loader > > [...] > Modified: > [...] > stable/10/sys/kern/init_main.c kern_unsetenv() is still named unsetenv() on 10-STABLE: cc -c -O2 -pipe -fno-strict-aliasing -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -I/usr/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -mno-aes -mno-avx -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -gdwarf-2 -Werror /usr/src/sys/kern/init_main.c /usr/src/sys/kern/init_main.c:711:2: error: implicit declaration of function 'kern_unsetenv' is invalid in C99 [-Werror,-Wimplicit-function-declaration] kern_unsetenv("kern.geom.eli.passphrase"); ^ 1 error generated. *** Error code 1 -- Thomas Mueller From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 09:52:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1889211; Wed, 22 Apr 2015 09:52:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF3B61A5F; Wed, 22 Apr 2015 09:52:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3M9qpbh011317; Wed, 22 Apr 2015 09:52:51 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3M9qptF011316; Wed, 22 Apr 2015 09:52:51 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504220952.t3M9qptF011316@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 22 Apr 2015 09:52:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281846 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 09:52:52 -0000 Author: andrew Date: Wed Apr 22 09:52:51 2015 New Revision: 281846 URL: https://svnweb.freebsd.org/changeset/base/281846 Log: Remove the calls to panic from pmap_object_init_pt and pmap_clear_modify. Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Wed Apr 22 01:54:25 2015 (r281845) +++ head/sys/arm64/arm64/pmap.c Wed Apr 22 09:52:51 2015 (r281846) @@ -2251,7 +2251,9 @@ pmap_object_init_pt(pmap_t pmap, vm_offs vm_pindex_t pindex, vm_size_t size) { - panic("pmap_object_init_pt"); + VM_OBJECT_ASSERT_WLOCKED(object); + KASSERT(object->type == OBJT_DEVICE || object->type == OBJT_SG, + ("pmap_object_init_pt: non-device object")); } /* @@ -2930,7 +2932,8 @@ pmap_clear_modify(vm_page_t m) */ if ((m->aflags & PGA_WRITEABLE) == 0) return; - panic("pmap_clear_modify"); + + /* TODO: We lack support for tracking if a page is modified */ } /* From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 10:25:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 112C0634; Wed, 22 Apr 2015 10:25:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F227A1D6F; Wed, 22 Apr 2015 10:25:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MAP8SX036882; Wed, 22 Apr 2015 10:25:08 GMT (envelope-from pluknet@FreeBSD.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MAP8kF036881; Wed, 22 Apr 2015 10:25:08 GMT (envelope-from pluknet@FreeBSD.org) Message-Id: <201504221025.t3MAP8kF036881@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pluknet set sender to pluknet@FreeBSD.org using -f From: Sergey Kandaurov Date: Wed, 22 Apr 2015 10:25:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281847 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 10:25:09 -0000 Author: pluknet Date: Wed Apr 22 10:25:08 2015 New Revision: 281847 URL: https://svnweb.freebsd.org/changeset/base/281847 Log: Fix r281843 mis-merge. Reported by: Thomas Mueller tmueller at sysgo com Modified: stable/10/sys/kern/init_main.c Modified: stable/10/sys/kern/init_main.c ============================================================================== --- stable/10/sys/kern/init_main.c Wed Apr 22 09:52:51 2015 (r281846) +++ stable/10/sys/kern/init_main.c Wed Apr 22 10:25:08 2015 (r281847) @@ -708,7 +708,7 @@ start_init(void *dummy) vfs_mountroot(); /* Wipe GELI passphrase from the environment. */ - kern_unsetenv("kern.geom.eli.passphrase"); + unsetenv("kern.geom.eli.passphrase"); /* * Need just enough stack to hold the faked-up "execve()" arguments. From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 10:57:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26049B42; Wed, 22 Apr 2015 10:57:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 090341052; Wed, 22 Apr 2015 10:57:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MAv1Ju060922; Wed, 22 Apr 2015 10:57:01 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MAv1AY060906; Wed, 22 Apr 2015 10:57:01 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504221057.t3MAv1AY060906@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 22 Apr 2015 10:57:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281848 - in stable/10/sys: kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 10:57:02 -0000 Author: kib Date: Wed Apr 22 10:57:00 2015 New Revision: 281848 URL: https://svnweb.freebsd.org/changeset/base/281848 Log: MFC r281548: Implement support for binary to request specific stack size for the initial thread. Modified: stable/10/sys/kern/imgact_elf.c stable/10/sys/kern/kern_exec.c stable/10/sys/kern/kern_resource.c stable/10/sys/sys/imgact.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/imgact_elf.c ============================================================================== --- stable/10/sys/kern/imgact_elf.c Wed Apr 22 10:25:08 2015 (r281847) +++ stable/10/sys/kern/imgact_elf.c Wed Apr 22 10:57:00 2015 (r281848) @@ -776,6 +776,7 @@ __CONCAT(exec_, __elfN(imgact))(struct i if (__elfN(nxstack)) imgp->stack_prot = __elfN(trans_prot)(phdr[i].p_flags); + imgp->stack_sz = phdr[i].p_memsz; break; } } Modified: stable/10/sys/kern/kern_exec.c ============================================================================== --- stable/10/sys/kern/kern_exec.c Wed Apr 22 10:25:08 2015 (r281847) +++ stable/10/sys/kern/kern_exec.c Wed Apr 22 10:57:00 2015 (r281848) @@ -1038,6 +1038,7 @@ exec_new_vmspace(imgp, sv) struct proc *p = imgp->proc; struct vmspace *vmspace = p->p_vmspace; vm_object_t obj; + struct rlimit rlim_stack; vm_offset_t sv_minuser, stack_addr; vm_map_t map; u_long ssiz; @@ -1087,10 +1088,22 @@ exec_new_vmspace(imgp, sv) } /* Allocate a new stack */ - if (sv->sv_maxssiz != NULL) + if (imgp->stack_sz != 0) { + ssiz = imgp->stack_sz; + PROC_LOCK(p); + lim_rlimit(p, RLIMIT_STACK, &rlim_stack); + PROC_UNLOCK(p); + if (ssiz > rlim_stack.rlim_max) + ssiz = rlim_stack.rlim_max; + if (ssiz > rlim_stack.rlim_cur) { + rlim_stack.rlim_cur = ssiz; + kern_setrlimit(curthread, RLIMIT_STACK, &rlim_stack); + } + } else if (sv->sv_maxssiz != NULL) { ssiz = *sv->sv_maxssiz; - else + } else { ssiz = maxssiz; + } stack_addr = sv->sv_usrstack - ssiz; error = vm_map_stack(map, stack_addr, (vm_size_t)ssiz, obj != NULL && imgp->stack_prot != 0 ? imgp->stack_prot : Modified: stable/10/sys/kern/kern_resource.c ============================================================================== --- stable/10/sys/kern/kern_resource.c Wed Apr 22 10:25:08 2015 (r281847) +++ stable/10/sys/kern/kern_resource.c Wed Apr 22 10:57:00 2015 (r281848) @@ -757,7 +757,12 @@ kern_proc_setrlimit(struct thread *td, s if (newlim != NULL) lim_free(oldlim); - if (which == RLIMIT_STACK) { + if (which == RLIMIT_STACK && + /* + * Skip calls from exec_new_vmspace(), done when stack is + * not mapped yet. + */ + (td != curthread || (p->p_flag & P_INEXEC) == 0)) { /* * Stack is allocated to the max at exec time with only * "rlim_cur" bytes accessible. If stack limit is going Modified: stable/10/sys/sys/imgact.h ============================================================================== --- stable/10/sys/sys/imgact.h Wed Apr 22 10:25:08 2015 (r281847) +++ stable/10/sys/sys/imgact.h Wed Apr 22 10:57:00 2015 (r281848) @@ -80,6 +80,7 @@ struct image_params { unsigned long pagesizes; int pagesizeslen; vm_prot_t stack_prot; + u_long stack_sz; }; #ifdef _KERNEL From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 10:59:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B7DDECC9; Wed, 22 Apr 2015 10:59:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4CF81067; Wed, 22 Apr 2015 10:59:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MAx6LA061798; Wed, 22 Apr 2015 10:59:06 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MAx6f0061792; Wed, 22 Apr 2015 10:59:06 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504221059.t3MAx6f0061792@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 22 Apr 2015 10:59:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281849 - stable/10/libexec/rtld-elf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 10:59:06 -0000 Author: kib Date: Wed Apr 22 10:59:05 2015 New Revision: 281849 URL: https://svnweb.freebsd.org/changeset/base/281849 Log: MFC r281549: Implement support for -z global linker option. Modified: stable/10/libexec/rtld-elf/rtld.c stable/10/libexec/rtld-elf/rtld.h Directory Properties: stable/10/ (props changed) Modified: stable/10/libexec/rtld-elf/rtld.c ============================================================================== --- stable/10/libexec/rtld-elf/rtld.c Wed Apr 22 10:57:00 2015 (r281848) +++ stable/10/libexec/rtld-elf/rtld.c Wed Apr 22 10:59:05 2015 (r281849) @@ -1150,8 +1150,8 @@ digest_dynamic1(Obj_Entry *obj, int earl obj->z_noopen = true; if ((dynp->d_un.d_val & DF_1_ORIGIN) && trust) obj->z_origin = true; - /*if (dynp->d_un.d_val & DF_1_GLOBAL) - XXX ;*/ + if (dynp->d_un.d_val & DF_1_GLOBAL) + obj->z_global = true; if (dynp->d_un.d_val & DF_1_BIND_NOW) obj->bind_now = true; if (dynp->d_un.d_val & DF_1_NODELETE) @@ -1775,22 +1775,35 @@ init_dag(Obj_Entry *root) } static void -process_nodelete(Obj_Entry *root) +process_z(Obj_Entry *root) { const Objlist_Entry *elm; + Obj_Entry *obj; /* - * Walk over object DAG and process every dependent object that - * is marked as DF_1_NODELETE. They need to grow their own DAG, - * which then should have its reference upped separately. + * Walk over object DAG and process every dependent object + * that is marked as DF_1_NODELETE or DF_1_GLOBAL. They need + * to grow their own DAG. + * + * For DF_1_GLOBAL, DAG is required for symbol lookups in + * symlook_global() to work. + * + * For DF_1_NODELETE, the DAG should have its reference upped. */ STAILQ_FOREACH(elm, &root->dagmembers, link) { - if (elm->obj != NULL && elm->obj->z_nodelete && - !elm->obj->ref_nodel) { - dbg("obj %s nodelete", elm->obj->path); - init_dag(elm->obj); - ref_dag(elm->obj); - elm->obj->ref_nodel = true; + obj = elm->obj; + if (obj == NULL) + continue; + if (obj->z_nodelete && !obj->ref_nodel) { + dbg("obj %s -z nodelete", obj->path); + init_dag(obj); + ref_dag(obj); + obj->ref_nodel = true; + } + if (obj->z_global && objlist_find(&list_global, obj) == NULL) { + dbg("obj %s -z global", obj->path); + objlist_push_tail(&list_global, obj); + init_dag(obj); } } } @@ -2961,13 +2974,13 @@ dlopen_object(const char *name, int fd, initlist_add_objects(obj, &obj->next, &initlist); } /* - * Process all no_delete objects here, given them own - * DAGs to prevent their dependencies from being unloaded. - * This has to be done after we have loaded all of the - * dependencies, so that we do not miss any. + * Process all no_delete or global objects here, given + * them own DAGs to prevent their dependencies from being + * unloaded. This has to be done after we have loaded all + * of the dependencies, so that we do not miss any. */ if (obj != NULL) - process_nodelete(obj); + process_z(obj); } else { /* * Bump the reference counts for objects on this DAG. If Modified: stable/10/libexec/rtld-elf/rtld.h ============================================================================== --- stable/10/libexec/rtld-elf/rtld.h Wed Apr 22 10:57:00 2015 (r281848) +++ stable/10/libexec/rtld-elf/rtld.h Wed Apr 22 10:59:05 2015 (r281849) @@ -264,6 +264,7 @@ typedef struct Struct_Obj_Entry { bool z_loadfltr : 1; /* Immediately load filtees */ bool z_interpose : 1; /* Interpose all objects but main */ bool z_nodeflib : 1; /* Don't search default library path */ + bool z_global : 1; /* Make the object global */ bool ref_nodel : 1; /* Refcount increased to prevent dlclose */ bool init_scanned: 1; /* Object is already on init list. */ bool on_fini_list: 1; /* Object is already on fini list. */ From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 12:24:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3CCC7922; Wed, 22 Apr 2015 12:24:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B9C11A42; Wed, 22 Apr 2015 12:24:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MCOdgl027699; Wed, 22 Apr 2015 12:24:39 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MCOdJH027698; Wed, 22 Apr 2015 12:24:39 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504221224.t3MCOdJH027698@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 22 Apr 2015 12:24:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281850 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 12:24:39 -0000 Author: andrew Date: Wed Apr 22 12:24:38 2015 New Revision: 281850 URL: https://svnweb.freebsd.org/changeset/base/281850 Log: Add the null implementation of stack_save and stack_save_td. Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/arm64/stack_machdep.c Modified: head/sys/arm64/arm64/stack_machdep.c ============================================================================== --- head/sys/arm64/arm64/stack_machdep.c Wed Apr 22 10:59:05 2015 (r281849) +++ head/sys/arm64/arm64/stack_machdep.c Wed Apr 22 12:24:38 2015 (r281850) @@ -43,11 +43,18 @@ __FBSDID("$FreeBSD$"); void stack_save_td(struct stack *st, struct thread *td) { - panic("stack_save_td"); + + if (TD_IS_SWAPPED(td)) + panic("stack_save_td: swapped"); + if (TD_IS_RUNNING(td)) + panic("stack_save_td: running"); + + stack_zero(st); } void stack_save(struct stack *st) { - panic("stack_save"); + + stack_zero(st); } From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 12:32:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 33D02CAC; Wed, 22 Apr 2015 12:32:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20E321B52; Wed, 22 Apr 2015 12:32:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MCWHW1034556; Wed, 22 Apr 2015 12:32:17 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MCWFaI034532; Wed, 22 Apr 2015 12:32:15 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504221232.t3MCWFaI034532@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 22 Apr 2015 12:32:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281851 - in head/sys: amd64/amd64 amd64/include conf i386/i386 i386/include x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 12:32:17 -0000 Author: kib Date: Wed Apr 22 12:32:14 2015 New Revision: 281851 URL: https://svnweb.freebsd.org/changeset/base/281851 Log: Move some common code from sys/amd64/amd64/machdep.c and sys/i386/i386/machdep.c to new file sys/x86/x86/cpu_machdep.c. Most of the code is related to the idle handling. Discussed with: pluknet Sponsored by: The FreeBSD Foundation Added: head/sys/x86/x86/cpu_machdep.c - copied, changed from r281849, head/sys/i386/i386/machdep.c Modified: head/sys/amd64/amd64/machdep.c head/sys/amd64/include/md_var.h head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/conf/files.pc98 head/sys/i386/i386/machdep.c head/sys/i386/include/md_var.h Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Wed Apr 22 12:24:38 2015 (r281850) +++ head/sys/amd64/amd64/machdep.c Wed Apr 22 12:32:14 2015 (r281851) @@ -578,375 +578,6 @@ freebsd4_sigreturn(struct thread *td, st } #endif - -/* - * Machine dependent boot() routine - * - * I haven't seen anything to put here yet - * Possibly some stuff might be grafted back here from boot() - */ -void -cpu_boot(int howto) -{ -} - -/* - * Flush the D-cache for non-DMA I/O so that the I-cache can - * be made coherent later. - */ -void -cpu_flush_dcache(void *ptr, size_t len) -{ - /* Not applicable */ -} - -/* Get current clock frequency for the given cpu id. */ -int -cpu_est_clockrate(int cpu_id, uint64_t *rate) -{ - uint64_t tsc1, tsc2; - uint64_t acnt, mcnt, perf; - register_t reg; - - if (pcpu_find(cpu_id) == NULL || rate == NULL) - return (EINVAL); - - /* - * If TSC is P-state invariant and APERF/MPERF MSRs do not exist, - * DELAY(9) based logic fails. - */ - if (tsc_is_invariant && !tsc_perf_stat) - return (EOPNOTSUPP); - -#ifdef SMP - if (smp_cpus > 1) { - /* Schedule ourselves on the indicated cpu. */ - thread_lock(curthread); - sched_bind(curthread, cpu_id); - thread_unlock(curthread); - } -#endif - - /* Calibrate by measuring a short delay. */ - reg = intr_disable(); - if (tsc_is_invariant) { - wrmsr(MSR_MPERF, 0); - wrmsr(MSR_APERF, 0); - tsc1 = rdtsc(); - DELAY(1000); - mcnt = rdmsr(MSR_MPERF); - acnt = rdmsr(MSR_APERF); - tsc2 = rdtsc(); - intr_restore(reg); - perf = 1000 * acnt / mcnt; - *rate = (tsc2 - tsc1) * perf; - } else { - tsc1 = rdtsc(); - DELAY(1000); - tsc2 = rdtsc(); - intr_restore(reg); - *rate = (tsc2 - tsc1) * 1000; - } - -#ifdef SMP - if (smp_cpus > 1) { - thread_lock(curthread); - sched_unbind(curthread); - thread_unlock(curthread); - } -#endif - - return (0); -} - -/* - * Shutdown the CPU as much as possible - */ -void -cpu_halt(void) -{ - for (;;) - halt(); -} - -void (*cpu_idle_hook)(sbintime_t) = NULL; /* ACPI idle hook. */ -static int cpu_ident_amdc1e = 0; /* AMD C1E supported. */ -static int idle_mwait = 1; /* Use MONITOR/MWAIT for short idle. */ -SYSCTL_INT(_machdep, OID_AUTO, idle_mwait, CTLFLAG_RWTUN, &idle_mwait, - 0, "Use MONITOR/MWAIT for short idle"); - -#define STATE_RUNNING 0x0 -#define STATE_MWAIT 0x1 -#define STATE_SLEEPING 0x2 - -static void -cpu_idle_acpi(sbintime_t sbt) -{ - int *state; - - state = (int *)PCPU_PTR(monitorbuf); - *state = STATE_SLEEPING; - - /* See comments in cpu_idle_hlt(). */ - disable_intr(); - if (sched_runnable()) - enable_intr(); - else if (cpu_idle_hook) - cpu_idle_hook(sbt); - else - __asm __volatile("sti; hlt"); - *state = STATE_RUNNING; -} - -static void -cpu_idle_hlt(sbintime_t sbt) -{ - int *state; - - state = (int *)PCPU_PTR(monitorbuf); - *state = STATE_SLEEPING; - - /* - * Since we may be in a critical section from cpu_idle(), if - * an interrupt fires during that critical section we may have - * a pending preemption. If the CPU halts, then that thread - * may not execute until a later interrupt awakens the CPU. - * To handle this race, check for a runnable thread after - * disabling interrupts and immediately return if one is - * found. Also, we must absolutely guarentee that hlt is - * the next instruction after sti. This ensures that any - * interrupt that fires after the call to disable_intr() will - * immediately awaken the CPU from hlt. Finally, please note - * that on x86 this works fine because of interrupts enabled only - * after the instruction following sti takes place, while IF is set - * to 1 immediately, allowing hlt instruction to acknowledge the - * interrupt. - */ - disable_intr(); - if (sched_runnable()) - enable_intr(); - else - __asm __volatile("sti; hlt"); - *state = STATE_RUNNING; -} - -static void -cpu_idle_mwait(sbintime_t sbt) -{ - int *state; - - state = (int *)PCPU_PTR(monitorbuf); - *state = STATE_MWAIT; - - /* See comments in cpu_idle_hlt(). */ - disable_intr(); - if (sched_runnable()) { - enable_intr(); - *state = STATE_RUNNING; - return; - } - cpu_monitor(state, 0, 0); - if (*state == STATE_MWAIT) - __asm __volatile("sti; mwait" : : "a" (MWAIT_C1), "c" (0)); - else - enable_intr(); - *state = STATE_RUNNING; -} - -static void -cpu_idle_spin(sbintime_t sbt) -{ - int *state; - int i; - - state = (int *)PCPU_PTR(monitorbuf); - *state = STATE_RUNNING; - - /* - * The sched_runnable() call is racy but as long as there is - * a loop missing it one time will have just a little impact if any - * (and it is much better than missing the check at all). - */ - for (i = 0; i < 1000; i++) { - if (sched_runnable()) - return; - cpu_spinwait(); - } -} - -/* - * C1E renders the local APIC timer dead, so we disable it by - * reading the Interrupt Pending Message register and clearing - * both C1eOnCmpHalt (bit 28) and SmiOnCmpHalt (bit 27). - * - * Reference: - * "BIOS and Kernel Developer's Guide for AMD NPT Family 0Fh Processors" - * #32559 revision 3.00+ - */ -#define MSR_AMDK8_IPM 0xc0010055 -#define AMDK8_SMIONCMPHALT (1ULL << 27) -#define AMDK8_C1EONCMPHALT (1ULL << 28) -#define AMDK8_CMPHALT (AMDK8_SMIONCMPHALT | AMDK8_C1EONCMPHALT) - -static void -cpu_probe_amdc1e(void) -{ - - /* - * Detect the presence of C1E capability mostly on latest - * dual-cores (or future) k8 family. - */ - if (cpu_vendor_id == CPU_VENDOR_AMD && - (cpu_id & 0x00000f00) == 0x00000f00 && - (cpu_id & 0x0fff0000) >= 0x00040000) { - cpu_ident_amdc1e = 1; - } -} - -void (*cpu_idle_fn)(sbintime_t) = cpu_idle_acpi; - -void -cpu_idle(int busy) -{ - uint64_t msr; - sbintime_t sbt = -1; - - CTR2(KTR_SPARE2, "cpu_idle(%d) at %d", - busy, curcpu); -#ifdef MP_WATCHDOG - ap_watchdog(PCPU_GET(cpuid)); -#endif - /* If we are busy - try to use fast methods. */ - if (busy) { - if ((cpu_feature2 & CPUID2_MON) && idle_mwait) { - cpu_idle_mwait(busy); - goto out; - } - } - - /* If we have time - switch timers into idle mode. */ - if (!busy) { - critical_enter(); - sbt = cpu_idleclock(); - } - - /* Apply AMD APIC timer C1E workaround. */ - if (cpu_ident_amdc1e && cpu_disable_c3_sleep) { - msr = rdmsr(MSR_AMDK8_IPM); - if (msr & AMDK8_CMPHALT) - wrmsr(MSR_AMDK8_IPM, msr & ~AMDK8_CMPHALT); - } - - /* Call main idle method. */ - cpu_idle_fn(sbt); - - /* Switch timers back into active mode. */ - if (!busy) { - cpu_activeclock(); - critical_exit(); - } -out: - CTR2(KTR_SPARE2, "cpu_idle(%d) at %d done", - busy, curcpu); -} - -int -cpu_idle_wakeup(int cpu) -{ - struct pcpu *pcpu; - int *state; - - pcpu = pcpu_find(cpu); - state = (int *)pcpu->pc_monitorbuf; - /* - * This doesn't need to be atomic since missing the race will - * simply result in unnecessary IPIs. - */ - if (*state == STATE_SLEEPING) - return (0); - if (*state == STATE_MWAIT) - *state = STATE_RUNNING; - return (1); -} - -/* - * Ordered by speed/power consumption. - */ -struct { - void *id_fn; - char *id_name; -} idle_tbl[] = { - { cpu_idle_spin, "spin" }, - { cpu_idle_mwait, "mwait" }, - { cpu_idle_hlt, "hlt" }, - { cpu_idle_acpi, "acpi" }, - { NULL, NULL } -}; - -static int -idle_sysctl_available(SYSCTL_HANDLER_ARGS) -{ - char *avail, *p; - int error; - int i; - - avail = malloc(256, M_TEMP, M_WAITOK); - p = avail; - for (i = 0; idle_tbl[i].id_name != NULL; i++) { - if (strstr(idle_tbl[i].id_name, "mwait") && - (cpu_feature2 & CPUID2_MON) == 0) - continue; - if (strcmp(idle_tbl[i].id_name, "acpi") == 0 && - cpu_idle_hook == NULL) - continue; - p += sprintf(p, "%s%s", p != avail ? ", " : "", - idle_tbl[i].id_name); - } - error = sysctl_handle_string(oidp, avail, 0, req); - free(avail, M_TEMP); - return (error); -} - -SYSCTL_PROC(_machdep, OID_AUTO, idle_available, CTLTYPE_STRING | CTLFLAG_RD, - 0, 0, idle_sysctl_available, "A", "list of available idle functions"); - -static int -idle_sysctl(SYSCTL_HANDLER_ARGS) -{ - char buf[16]; - int error; - char *p; - int i; - - p = "unknown"; - for (i = 0; idle_tbl[i].id_name != NULL; i++) { - if (idle_tbl[i].id_fn == cpu_idle_fn) { - p = idle_tbl[i].id_name; - break; - } - } - strncpy(buf, p, sizeof(buf)); - error = sysctl_handle_string(oidp, buf, sizeof(buf), req); - if (error != 0 || req->newptr == NULL) - return (error); - for (i = 0; idle_tbl[i].id_name != NULL; i++) { - if (strstr(idle_tbl[i].id_name, "mwait") && - (cpu_feature2 & CPUID2_MON) == 0) - continue; - if (strcmp(idle_tbl[i].id_name, "acpi") == 0 && - cpu_idle_hook == NULL) - continue; - if (strcmp(idle_tbl[i].id_name, buf)) - continue; - cpu_idle_fn = idle_tbl[i].id_fn; - return (0); - } - return (EINVAL); -} - -SYSCTL_PROC(_machdep, OID_AUTO, idle, CTLTYPE_STRING | CTLFLAG_RW, 0, 0, - idle_sysctl, "A", "currently selected idle function"); - /* * Reset registers to default values on exec. */ Modified: head/sys/amd64/include/md_var.h ============================================================================== --- head/sys/amd64/include/md_var.h Wed Apr 22 12:24:38 2015 (r281850) +++ head/sys/amd64/include/md_var.h Wed Apr 22 12:32:14 2015 (r281851) @@ -91,6 +91,7 @@ struct dumperinfo; void *alloc_fpusave(int flags); void amd64_syscall(struct thread *td, int traced); void busdma_swi(void); +void cpu_probe_amdc1e(void); void cpu_setregs(void); void doreti_iret(void) __asm(__STRING(doreti_iret)); void doreti_iret_fault(void) __asm(__STRING(doreti_iret_fault)); Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Wed Apr 22 12:24:38 2015 (r281850) +++ head/sys/conf/files.amd64 Wed Apr 22 12:32:14 2015 (r281851) @@ -558,6 +558,7 @@ x86/pci/pci_bus.c optional pci x86/pci/qpi.c optional pci x86/x86/busdma_bounce.c standard x86/x86/busdma_machdep.c standard +x86/x86/cpu_machdep.c standard x86/x86/dump_machdep.c standard x86/x86/fdt_machdep.c optional fdt x86/x86/identcpu.c standard Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Wed Apr 22 12:24:38 2015 (r281850) +++ head/sys/conf/files.i386 Wed Apr 22 12:32:14 2015 (r281851) @@ -576,6 +576,7 @@ x86/pci/pci_bus.c optional pci x86/pci/qpi.c optional pci x86/x86/busdma_bounce.c standard x86/x86/busdma_machdep.c standard +x86/x86/cpu_machdep.c standard x86/x86/dump_machdep.c standard x86/x86/fdt_machdep.c optional fdt x86/x86/identcpu.c standard Modified: head/sys/conf/files.pc98 ============================================================================== --- head/sys/conf/files.pc98 Wed Apr 22 12:24:38 2015 (r281850) +++ head/sys/conf/files.pc98 Wed Apr 22 12:32:14 2015 (r281851) @@ -248,6 +248,7 @@ x86/isa/isa.c optional isa x86/pci/pci_bus.c optional pci x86/x86/busdma_bounce.c standard x86/x86/busdma_machdep.c standard +x86/x86/cpu_machdep.c standard x86/x86/dump_machdep.c standard x86/x86/identcpu.c standard x86/x86/intr_machdep.c standard Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Wed Apr 22 12:24:38 2015 (r281850) +++ head/sys/i386/i386/machdep.c Wed Apr 22 12:32:14 2015 (r281851) @@ -1176,427 +1176,6 @@ sys_sigreturn(td, uap) } /* - * Machine dependent boot() routine - * - * I haven't seen anything to put here yet - * Possibly some stuff might be grafted back here from boot() - */ -void -cpu_boot(int howto) -{ -} - -/* - * Flush the D-cache for non-DMA I/O so that the I-cache can - * be made coherent later. - */ -void -cpu_flush_dcache(void *ptr, size_t len) -{ - /* Not applicable */ -} - -/* Get current clock frequency for the given cpu id. */ -int -cpu_est_clockrate(int cpu_id, uint64_t *rate) -{ - uint64_t tsc1, tsc2; - uint64_t acnt, mcnt, perf; - register_t reg; - - if (pcpu_find(cpu_id) == NULL || rate == NULL) - return (EINVAL); - if ((cpu_feature & CPUID_TSC) == 0) - return (EOPNOTSUPP); - - /* - * If TSC is P-state invariant and APERF/MPERF MSRs do not exist, - * DELAY(9) based logic fails. - */ - if (tsc_is_invariant && !tsc_perf_stat) - return (EOPNOTSUPP); - -#ifdef SMP - if (smp_cpus > 1) { - /* Schedule ourselves on the indicated cpu. */ - thread_lock(curthread); - sched_bind(curthread, cpu_id); - thread_unlock(curthread); - } -#endif - - /* Calibrate by measuring a short delay. */ - reg = intr_disable(); - if (tsc_is_invariant) { - wrmsr(MSR_MPERF, 0); - wrmsr(MSR_APERF, 0); - tsc1 = rdtsc(); - DELAY(1000); - mcnt = rdmsr(MSR_MPERF); - acnt = rdmsr(MSR_APERF); - tsc2 = rdtsc(); - intr_restore(reg); - perf = 1000 * acnt / mcnt; - *rate = (tsc2 - tsc1) * perf; - } else { - tsc1 = rdtsc(); - DELAY(1000); - tsc2 = rdtsc(); - intr_restore(reg); - *rate = (tsc2 - tsc1) * 1000; - } - -#ifdef SMP - if (smp_cpus > 1) { - thread_lock(curthread); - sched_unbind(curthread); - thread_unlock(curthread); - } -#endif - - return (0); -} - -#ifdef XEN - -static void -idle_block(void) -{ - - HYPERVISOR_sched_op(SCHEDOP_block, 0); -} - -void -cpu_halt(void) -{ - HYPERVISOR_shutdown(SHUTDOWN_poweroff); -} - -int scheduler_running; - -static void -cpu_idle_hlt(sbintime_t sbt) -{ - - scheduler_running = 1; - enable_intr(); - idle_block(); -} - -#else -/* - * Shutdown the CPU as much as possible - */ -void -cpu_halt(void) -{ - for (;;) - halt(); -} - -#endif - -void (*cpu_idle_hook)(sbintime_t) = NULL; /* ACPI idle hook. */ -static int cpu_ident_amdc1e = 0; /* AMD C1E supported. */ -static int idle_mwait = 1; /* Use MONITOR/MWAIT for short idle. */ -SYSCTL_INT(_machdep, OID_AUTO, idle_mwait, CTLFLAG_RWTUN, &idle_mwait, - 0, "Use MONITOR/MWAIT for short idle"); - -#define STATE_RUNNING 0x0 -#define STATE_MWAIT 0x1 -#define STATE_SLEEPING 0x2 - -#ifndef PC98 -static void -cpu_idle_acpi(sbintime_t sbt) -{ - int *state; - - state = (int *)PCPU_PTR(monitorbuf); - *state = STATE_SLEEPING; - - /* See comments in cpu_idle_hlt(). */ - disable_intr(); - if (sched_runnable()) - enable_intr(); - else if (cpu_idle_hook) - cpu_idle_hook(sbt); - else - __asm __volatile("sti; hlt"); - *state = STATE_RUNNING; -} -#endif /* !PC98 */ - -#ifndef XEN -static void -cpu_idle_hlt(sbintime_t sbt) -{ - int *state; - - state = (int *)PCPU_PTR(monitorbuf); - *state = STATE_SLEEPING; - - /* - * Since we may be in a critical section from cpu_idle(), if - * an interrupt fires during that critical section we may have - * a pending preemption. If the CPU halts, then that thread - * may not execute until a later interrupt awakens the CPU. - * To handle this race, check for a runnable thread after - * disabling interrupts and immediately return if one is - * found. Also, we must absolutely guarentee that hlt is - * the next instruction after sti. This ensures that any - * interrupt that fires after the call to disable_intr() will - * immediately awaken the CPU from hlt. Finally, please note - * that on x86 this works fine because of interrupts enabled only - * after the instruction following sti takes place, while IF is set - * to 1 immediately, allowing hlt instruction to acknowledge the - * interrupt. - */ - disable_intr(); - if (sched_runnable()) - enable_intr(); - else - __asm __volatile("sti; hlt"); - *state = STATE_RUNNING; -} -#endif - -static void -cpu_idle_mwait(sbintime_t sbt) -{ - int *state; - - state = (int *)PCPU_PTR(monitorbuf); - *state = STATE_MWAIT; - - /* See comments in cpu_idle_hlt(). */ - disable_intr(); - if (sched_runnable()) { - enable_intr(); - *state = STATE_RUNNING; - return; - } - cpu_monitor(state, 0, 0); - if (*state == STATE_MWAIT) - __asm __volatile("sti; mwait" : : "a" (MWAIT_C1), "c" (0)); - else - enable_intr(); - *state = STATE_RUNNING; -} - -static void -cpu_idle_spin(sbintime_t sbt) -{ - int *state; - int i; - - state = (int *)PCPU_PTR(monitorbuf); - *state = STATE_RUNNING; - - /* - * The sched_runnable() call is racy but as long as there is - * a loop missing it one time will have just a little impact if any - * (and it is much better than missing the check at all). - */ - for (i = 0; i < 1000; i++) { - if (sched_runnable()) - return; - cpu_spinwait(); - } -} - -/* - * C1E renders the local APIC timer dead, so we disable it by - * reading the Interrupt Pending Message register and clearing - * both C1eOnCmpHalt (bit 28) and SmiOnCmpHalt (bit 27). - * - * Reference: - * "BIOS and Kernel Developer's Guide for AMD NPT Family 0Fh Processors" - * #32559 revision 3.00+ - */ -#define MSR_AMDK8_IPM 0xc0010055 -#define AMDK8_SMIONCMPHALT (1ULL << 27) -#define AMDK8_C1EONCMPHALT (1ULL << 28) -#define AMDK8_CMPHALT (AMDK8_SMIONCMPHALT | AMDK8_C1EONCMPHALT) - -static void -cpu_probe_amdc1e(void) -{ - - /* - * Detect the presence of C1E capability mostly on latest - * dual-cores (or future) k8 family. - */ - if (cpu_vendor_id == CPU_VENDOR_AMD && - (cpu_id & 0x00000f00) == 0x00000f00 && - (cpu_id & 0x0fff0000) >= 0x00040000) { - cpu_ident_amdc1e = 1; - } -} - -#if defined(PC98) || defined(XEN) -void (*cpu_idle_fn)(sbintime_t) = cpu_idle_hlt; -#else -void (*cpu_idle_fn)(sbintime_t) = cpu_idle_acpi; -#endif - -void -cpu_idle(int busy) -{ -#ifndef XEN - uint64_t msr; -#endif - sbintime_t sbt = -1; - - CTR2(KTR_SPARE2, "cpu_idle(%d) at %d", - busy, curcpu); -#if defined(MP_WATCHDOG) && !defined(XEN) - ap_watchdog(PCPU_GET(cpuid)); -#endif -#ifndef XEN - /* If we are busy - try to use fast methods. */ - if (busy) { - if ((cpu_feature2 & CPUID2_MON) && idle_mwait) { - cpu_idle_mwait(busy); - goto out; - } - } -#endif - - /* If we have time - switch timers into idle mode. */ - if (!busy) { - critical_enter(); - sbt = cpu_idleclock(); - } - -#ifndef XEN - /* Apply AMD APIC timer C1E workaround. */ - if (cpu_ident_amdc1e && cpu_disable_c3_sleep) { - msr = rdmsr(MSR_AMDK8_IPM); - if (msr & AMDK8_CMPHALT) - wrmsr(MSR_AMDK8_IPM, msr & ~AMDK8_CMPHALT); - } -#endif - - /* Call main idle method. */ - cpu_idle_fn(sbt); - - /* Switch timers back into active mode. */ - if (!busy) { - cpu_activeclock(); - critical_exit(); - } -#ifndef XEN -out: -#endif - CTR2(KTR_SPARE2, "cpu_idle(%d) at %d done", - busy, curcpu); -} - -int -cpu_idle_wakeup(int cpu) -{ - struct pcpu *pcpu; - int *state; - - pcpu = pcpu_find(cpu); - state = (int *)pcpu->pc_monitorbuf; - /* - * This doesn't need to be atomic since missing the race will - * simply result in unnecessary IPIs. - */ - if (*state == STATE_SLEEPING) - return (0); - if (*state == STATE_MWAIT) - *state = STATE_RUNNING; - return (1); -} - -/* - * Ordered by speed/power consumption. - */ -struct { - void *id_fn; - char *id_name; -} idle_tbl[] = { - { cpu_idle_spin, "spin" }, - { cpu_idle_mwait, "mwait" }, - { cpu_idle_hlt, "hlt" }, -#ifndef PC98 - { cpu_idle_acpi, "acpi" }, -#endif - { NULL, NULL } -}; - -static int -idle_sysctl_available(SYSCTL_HANDLER_ARGS) -{ - char *avail, *p; - int error; - int i; - - avail = malloc(256, M_TEMP, M_WAITOK); - p = avail; - for (i = 0; idle_tbl[i].id_name != NULL; i++) { - if (strstr(idle_tbl[i].id_name, "mwait") && - (cpu_feature2 & CPUID2_MON) == 0) - continue; -#ifndef PC98 - if (strcmp(idle_tbl[i].id_name, "acpi") == 0 && - cpu_idle_hook == NULL) - continue; -#endif - p += sprintf(p, "%s%s", p != avail ? ", " : "", - idle_tbl[i].id_name); - } - error = sysctl_handle_string(oidp, avail, 0, req); - free(avail, M_TEMP); - return (error); -} - -SYSCTL_PROC(_machdep, OID_AUTO, idle_available, CTLTYPE_STRING | CTLFLAG_RD, - 0, 0, idle_sysctl_available, "A", "list of available idle functions"); - -static int -idle_sysctl(SYSCTL_HANDLER_ARGS) -{ - char buf[16]; - int error; - char *p; - int i; - - p = "unknown"; - for (i = 0; idle_tbl[i].id_name != NULL; i++) { - if (idle_tbl[i].id_fn == cpu_idle_fn) { - p = idle_tbl[i].id_name; - break; - } - } - strncpy(buf, p, sizeof(buf)); - error = sysctl_handle_string(oidp, buf, sizeof(buf), req); - if (error != 0 || req->newptr == NULL) - return (error); - for (i = 0; idle_tbl[i].id_name != NULL; i++) { - if (strstr(idle_tbl[i].id_name, "mwait") && - (cpu_feature2 & CPUID2_MON) == 0) - continue; -#ifndef PC98 - if (strcmp(idle_tbl[i].id_name, "acpi") == 0 && - cpu_idle_hook == NULL) - continue; -#endif - if (strcmp(idle_tbl[i].id_name, buf)) - continue; - cpu_idle_fn = idle_tbl[i].id_fn; - return (0); - } - return (EINVAL); -} - -SYSCTL_PROC(_machdep, OID_AUTO, idle, CTLTYPE_STRING | CTLFLAG_RW, 0, 0, - idle_sysctl, "A", "currently selected idle function"); - -/* * Reset registers to default values on exec. */ void Modified: head/sys/i386/include/md_var.h ============================================================================== --- head/sys/i386/include/md_var.h Wed Apr 22 12:24:38 2015 (r281850) +++ head/sys/i386/include/md_var.h Wed Apr 22 12:32:14 2015 (r281851) @@ -97,6 +97,7 @@ struct dumperinfo; void *alloc_fpusave(int flags); void bcopyb(const void *from, void *to, size_t len); void busdma_swi(void); +void cpu_probe_amdc1e(void); void cpu_setregs(void); void cpu_switch_load_gs(void) __asm(__STRING(cpu_switch_load_gs)); void doreti_iret(void) __asm(__STRING(doreti_iret)); Copied and modified: head/sys/x86/x86/cpu_machdep.c (from r281849, head/sys/i386/i386/machdep.c) ============================================================================== --- head/sys/i386/i386/machdep.c Wed Apr 22 10:59:05 2015 (r281849, copy source) +++ head/sys/x86/x86/cpu_machdep.c Wed Apr 22 12:32:14 2015 (r281851) @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2003 Peter Wemm. * Copyright (c) 1992 Terrence R. Lambert. * Copyright (c) 1982, 1987, 1990 The Regents of the University of California. * All rights reserved. @@ -40,7 +41,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_apic.h" #include "opt_atpic.h" #include "opt_compat.h" #include "opt_cpu.h" @@ -50,115 +50,55 @@ __FBSDID("$FreeBSD$"); #include "opt_kstack_pages.h" #include "opt_maxmem.h" #include "opt_mp_watchdog.h" -#include "opt_npx.h" #include "opt_perfmon.h" #include "opt_platform.h" +#ifdef __i386__ +#include "opt_npx.h" +#include "opt_apic.h" #include "opt_xbox.h" +#endif #include #include #include -#include -#include #include -#include -#include #include -#include -#include -#include #include #include #include -#include #include #include -#include -#include #include #include -#include -#include #include #include -#include #ifdef SMP #include #endif -#include #include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef DDB -#ifndef KDB -#error KDB must be enabled in order for DDB to work! -#endif -#include -#include -#endif - -#ifdef PC98 -#include -#else -#include -#endif -#include - -#include #include #include #include -#include -#include +#include #include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include #ifdef PERFMON #include #endif +#include #ifdef SMP #include #endif -#ifdef FDT -#include -#endif -#ifdef DEV_APIC -#include -#endif - -#ifdef DEV_ISA -#include -#endif - -#ifdef XBOX -#include - -int arch_i386_is_xbox = 0; -uint32_t arch_i386_xbox_memsize = 0; -#endif +#include +#include +#include +#include +#include +#include +#include *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 13:52:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A271FF10; Wed, 22 Apr 2015 13:52:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 91194144D; Wed, 22 Apr 2015 13:52:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MDqUoB004367; Wed, 22 Apr 2015 13:52:30 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MDqUBx004366; Wed, 22 Apr 2015 13:52:30 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504221352.t3MDqUBx004366@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 22 Apr 2015 13:52:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281854 - head/release/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 13:52:30 -0000 Author: gjb Date: Wed Apr 22 13:52:29 2015 New Revision: 281854 URL: https://svnweb.freebsd.org/changeset/base/281854 Log: Remove the gptboot partition from the arm64 memory stick image, which is not needed/used. Sponsored by: The FreeBSD Foundation Modified: head/release/arm64/make-memstick.sh Modified: head/release/arm64/make-memstick.sh ============================================================================== --- head/release/arm64/make-memstick.sh Wed Apr 22 12:58:16 2015 (r281853) +++ head/release/arm64/make-memstick.sh Wed Apr 22 13:52:29 2015 (r281854) @@ -36,6 +36,6 @@ if [ $? -ne 0 ]; then fi rm ${1}/etc/fstab -mkimg -s gpt -p efi:=${1}/boot/boot1.efifat -p freebsd-boot:=${1}/boot/gptboot -p freebsd-ufs:=${2}.part -p freebsd-swap::1M -o ${2} +mkimg -s gpt -p efi:=${1}/boot/boot1.efifat -p freebsd-ufs:=${2}.part -p freebsd-swap::1M -o ${2} rm ${2}.part From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 13:55:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from hub.FreeBSD.org (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9694212D; Wed, 22 Apr 2015 13:55:55 +0000 (UTC) Date: Wed, 22 Apr 2015 13:55:52 +0000 From: Glen Barber To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281854 - head/release/arm64 Message-ID: <20150422135552.GD31769@hub.FreeBSD.org> References: <201504221352.t3MDqUBx004366@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="NtwzykIc2mflq5ck" Content-Disposition: inline In-Reply-To: <201504221352.t3MDqUBx004366@svn.freebsd.org> X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 13:55:56 -0000 --NtwzykIc2mflq5ck Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 22, 2015 at 01:52:30PM +0000, Glen Barber wrote: > Author: gjb > Date: Wed Apr 22 13:52:29 2015 > New Revision: 281854 > URL: https://svnweb.freebsd.org/changeset/base/281854 >=20 > Log: > Remove the gptboot partition from the arm64 memory stick image, > which is not needed/used. > =20 Spotted by andrew@. Glen --NtwzykIc2mflq5ck Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJVN6hoAAoJEAMUWKVHj+KTqVkP/3+Gx2U7pxmtF5qQgxp1E+JM 3hjicIakaurtmEoJBUKdzQUctlUZwnM9E7dZ3bJLeGPVXbeDaRXR6Jl+mJ2s34+l zwM6FCzL+pozAhVhuoZ1gsAzM/CPgwmYYcM+Rdkgjvnw70a3CPq9tZ8hjSNdvV3B 8E1QONL6AgsR4EOWmL7hJQz2PqoX+xJCd49rDTY2kl9iYMR/DBH0lJtxJjr9pvUg zPGZ8CqQfA4Lmte5uZzb+JQc8EcLPqweHwyW26lhTZ7farJ3taWQZebPbwAWi/5v jGfNt5N52ek1l+ulIDfePYsrUxIgSNFbaHCf+4zUKVT+4dbDvcNfWF8i/gZH0pe4 T/uUH8ygE1ok98wPqPfB/b/b3bWhY2p6ARf0sLPSvma5fGn2CAEZ98L4dDh/jZxt 043Togf7ZBf6aDhqQq4FCv5cqcqf9Xe759P60O/DfoRpTHGowMw6HV7OqeNNyGnG GO/tzfUOFgul6scpoSRMYL+9oxt/FpWvam8MdzbRbJ4rideaFfEvmkOt+NWlsp4R eAFRREwHfrZWFt06yEaPxkN4+4lINh8JmHankbQe2FhJImf8H+rd1tOFKtuZSaHS /a75NbvGiMnIwVE5lt/YOXOyKdA9/YU2pmGnmoVhJY0928rDbY8QenyIKG/R+Q3H Ou8T4fokQRx11XzS0XuD =OFkk -----END PGP SIGNATURE----- --NtwzykIc2mflq5ck-- From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 14:39:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 275EF9BC; Wed, 22 Apr 2015 14:39:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 084551988; Wed, 22 Apr 2015 14:39:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MEd2Y6040613; Wed, 22 Apr 2015 14:39:02 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MEcxgW040556; Wed, 22 Apr 2015 14:38:59 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201504221438.t3MEcxgW040556@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Wed, 22 Apr 2015 14:38:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281855 - in head/sys: conf dev/bxe dev/mxge geom/uncompress geom/uzip kern libkern net netgraph opencrypto sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 14:39:03 -0000 Author: rodrigc Date: Wed Apr 22 14:38:58 2015 New Revision: 281855 URL: https://svnweb.freebsd.org/changeset/base/281855 Log: Move zlib.c from net to libkern. It is not network-specific code and would be better as part of libkern instead. Move zlib.h and zutil.h from net/ to sys/ Update includes to use sys/zlib.h and sys/zutil.h instead of net/ Submitted by: Steve Kiernan stevek@juniper.net Obtained from: Juniper Networks, Inc. GitHub Pull Request: https://github.com/freebsd/freebsd/pull/28 Relnotes: yes Added: head/sys/libkern/zlib.c (contents, props changed) - copied, changed from r281845, head/sys/net/zlib.c head/sys/sys/zlib.h (contents, props changed) - copied, changed from r281845, head/sys/net/zlib.h head/sys/sys/zutil.h (contents, props changed) - copied, changed from r281845, head/sys/net/zutil.h Deleted: head/sys/net/zlib.c head/sys/net/zlib.h head/sys/net/zutil.h Modified: head/sys/conf/files head/sys/dev/bxe/bxe.h head/sys/dev/mxge/if_mxge.c head/sys/geom/uncompress/g_uncompress.c head/sys/geom/uzip/g_uzip.c head/sys/kern/kern_gzio.c head/sys/kern/link_elf.c head/sys/kern/link_elf_obj.c head/sys/netgraph/ng_deflate.c head/sys/opencrypto/cryptodeflate.c head/sys/opencrypto/deflate.h Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Apr 22 13:52:29 2015 (r281854) +++ head/sys/conf/files Wed Apr 22 14:38:58 2015 (r281855) @@ -3262,6 +3262,9 @@ libkern/strtoul.c standard 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 | geom_uncompress net/altq/altq_cbq.c optional altq net/altq/altq_cdnr.c optional altq net/altq/altq_hfsc.c optional altq @@ -3324,9 +3327,6 @@ net/slcompress.c optional netgraph_vjc netgraph_sppp net/toeplitz.c optional inet rss | inet6 rss net/vnet.c optional vimage -net/zlib.c optional crypto | geom_uzip | ipsec | \ - mxge | netgraph_deflate | \ - ddb_ctf | gzio | geom_uncompress net80211/ieee80211.c optional wlan net80211/ieee80211_acl.c optional wlan wlan_acl net80211/ieee80211_action.c optional wlan Modified: head/sys/dev/bxe/bxe.h ============================================================================== --- head/sys/dev/bxe/bxe.h Wed Apr 22 13:52:29 2015 (r281854) +++ head/sys/dev/bxe/bxe.h Wed Apr 22 14:38:58 2015 (r281855) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -60,7 +61,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: head/sys/dev/mxge/if_mxge.c ============================================================================== --- head/sys/dev/mxge/if_mxge.c Wed Apr 22 13:52:29 2015 (r281854) +++ head/sys/dev/mxge/if_mxge.c Wed Apr 22 14:38:58 2015 (r281855) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -58,7 +59,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/geom/uncompress/g_uncompress.c ============================================================================== --- head/sys/geom/uncompress/g_uncompress.c Wed Apr 22 13:52:29 2015 (r281854) +++ head/sys/geom/uncompress/g_uncompress.c Wed Apr 22 14:38:58 2015 (r281855) @@ -45,10 +45,10 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include -#include #include #ifdef GEOM_UNCOMPRESS_DEBUG Modified: head/sys/geom/uzip/g_uzip.c ============================================================================== --- head/sys/geom/uzip/g_uzip.c Wed Apr 22 13:52:29 2015 (r281854) +++ head/sys/geom/uzip/g_uzip.c Wed Apr 22 14:38:58 2015 (r281855) @@ -38,9 +38,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include -#include FEATURE(geom_uzip, "GEOM uzip read-only compressed disks support"); Modified: head/sys/kern/kern_gzio.c ============================================================================== --- head/sys/kern/kern_gzio.c Wed Apr 22 13:52:29 2015 (r281854) +++ head/sys/kern/kern_gzio.c Wed Apr 22 14:38:58 2015 (r281855) @@ -32,8 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include - -#include +#include #define KERN_GZ_HDRLEN 10 /* gzip header length */ #define KERN_GZ_TRAILERLEN 8 /* gzip trailer length */ Modified: head/sys/kern/link_elf.c ============================================================================== --- head/sys/kern/link_elf.c Wed Apr 22 13:52:29 2015 (r281854) +++ head/sys/kern/link_elf.c Wed Apr 22 14:38:58 2015 (r281855) @@ -66,7 +66,7 @@ __FBSDID("$FreeBSD$"); #include #ifdef DDB_CTF -#include +#include #endif #include "linker_if.h" Modified: head/sys/kern/link_elf_obj.c ============================================================================== --- head/sys/kern/link_elf_obj.c Wed Apr 22 13:52:29 2015 (r281854) +++ head/sys/kern/link_elf_obj.c Wed Apr 22 14:38:58 2015 (r281855) @@ -60,7 +60,7 @@ __FBSDID("$FreeBSD$"); #include #ifdef DDB_CTF -#include +#include #endif #include "linker_if.h" Copied and modified: head/sys/libkern/zlib.c (from r281845, head/sys/net/zlib.c) ============================================================================== --- head/sys/net/zlib.c Wed Apr 22 01:54:25 2015 (r281845, copy source) +++ head/sys/libkern/zlib.c Wed Apr 22 14:38:58 2015 (r281855) @@ -54,7 +54,7 @@ #define _Z_UTIL_H #ifdef _KERNEL -#include +#include #else #include "zlib.h" #endif Modified: head/sys/netgraph/ng_deflate.c ============================================================================== --- head/sys/netgraph/ng_deflate.c Wed Apr 22 13:52:29 2015 (r281854) +++ head/sys/netgraph/ng_deflate.c Wed Apr 22 14:38:58 2015 (r281855) @@ -39,8 +39,7 @@ #include #include #include - -#include +#include #include #include Modified: head/sys/opencrypto/cryptodeflate.c ============================================================================== --- head/sys/opencrypto/cryptodeflate.c Wed Apr 22 13:52:29 2015 (r281854) +++ head/sys/opencrypto/cryptodeflate.c Wed Apr 22 14:38:58 2015 (r281855) @@ -29,7 +29,7 @@ /* * This file contains a wrapper around the deflate algo compression - * functions using the zlib library (see net/zlib.{c,h}) + * functions using the zlib library (see libkern/zlib.c and sys/zlib.h}) */ #include @@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include Modified: head/sys/opencrypto/deflate.h ============================================================================== --- head/sys/opencrypto/deflate.h Wed Apr 22 13:52:29 2015 (r281854) +++ head/sys/opencrypto/deflate.h Wed Apr 22 14:38:58 2015 (r281855) @@ -36,7 +36,7 @@ #ifndef _CRYPTO_DEFLATE_H_ #define _CRYPTO_DEFLATE_H_ -#include +#include #define Z_METHOD 8 #define Z_MEMLEVEL 8 Copied and modified: head/sys/sys/zlib.h (from r281845, head/sys/net/zlib.h) ============================================================================== Copied and modified: head/sys/sys/zutil.h (from r281845, head/sys/net/zutil.h) ============================================================================== --- head/sys/net/zutil.h Wed Apr 22 01:54:25 2015 (r281845, copy source) +++ head/sys/sys/zutil.h Wed Apr 22 14:38:58 2015 (r281855) @@ -17,7 +17,7 @@ #define ZEXPORT #ifdef _KERNEL -#include +#include #else #include "zlib.h" #endif From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 15:19:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71DC234F; Wed, 22 Apr 2015 15:19:43 +0000 (UTC) Received: from bigwig.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 4CD461DC6; Wed, 22 Apr 2015 15:19:43 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 3D3E7B9A3; Wed, 22 Apr 2015 11:19:42 -0400 (EDT) From: John Baldwin To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281851 - in head/sys: amd64/amd64 amd64/include conf i386/i386 i386/include x86/x86 Date: Wed, 22 Apr 2015 10:32:46 -0400 Message-ID: <4550390.4Tsi2WsAx2@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <201504221232.t3MCWFaI034532@svn.freebsd.org> References: <201504221232.t3MCWFaI034532@svn.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.2.7 (bigwig.baldwin.cx); Wed, 22 Apr 2015 11:19:42 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 15:19:43 -0000 On Wednesday, April 22, 2015 12:32:15 PM Konstantin Belousov wrote: > Author: kib > Date: Wed Apr 22 12:32:14 2015 > New Revision: 281851 > URL: https://svnweb.freebsd.org/changeset/base/281851 > > Log: > Move some common code from sys/amd64/amd64/machdep.c and > sys/i386/i386/machdep.c to new file sys/x86/x86/cpu_machdep.c. Most > of the code is related to the idle handling. > > Discussed with: pluknet > Sponsored by: The FreeBSD Foundation Nice! I still want to do a sys/x86/x86/mp_subr.c. Hopefully soonish. :-/ -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 16:06:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7EC30B1; Wed, 22 Apr 2015 16:06:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6CFDD12EB; Wed, 22 Apr 2015 16:06:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MG6okd006768; Wed, 22 Apr 2015 16:06:50 GMT (envelope-from pjd@FreeBSD.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MG6o21006767; Wed, 22 Apr 2015 16:06:50 GMT (envelope-from pjd@FreeBSD.org) Message-Id: <201504221606.t3MG6o21006767@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pjd set sender to pjd@FreeBSD.org using -f From: Pawel Jakub Dawidek Date: Wed, 22 Apr 2015 16:06:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r281856 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 16:06:50 -0000 Author: pjd Date: Wed Apr 22 16:06:49 2015 New Revision: 281856 URL: https://svnweb.freebsd.org/changeset/base/281856 Log: Welcome Mariusz Zaborski (oshogbo) as a new src committer. Mariusz will be working (at least initially) on Capsicum, Casper, libnv and surroundings. Approved by: core Modified: svnadmin/conf/access Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Wed Apr 22 14:38:58 2015 (r281855) +++ svnadmin/conf/access Wed Apr 22 16:06:49 2015 (r281856) @@ -166,6 +166,7 @@ nwhitehorn nyan obrien oleg +oshogbo peter peter@wemm.org peterj pfg From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 16:51:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 168D9CDF; Wed, 22 Apr 2015 16:51:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 04FB218C0; Wed, 22 Apr 2015 16:51:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MGpL9e040173; Wed, 22 Apr 2015 16:51:21 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MGpLbx040172; Wed, 22 Apr 2015 16:51:21 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504221651.t3MGpLbx040172@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 22 Apr 2015 16:51:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281857 - head/lib/libthr/thread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 16:51:22 -0000 Author: pfg Date: Wed Apr 22 16:51:21 2015 New Revision: 281857 URL: https://svnweb.freebsd.org/changeset/base/281857 Log: _pthread_cleanup_push: fix allocator sizeof operand mismatch Same fix appears to be in DragonFly's libthread_xu. Found by: Clang Static Analyzer MFC after: 1 week Modified: head/lib/libthr/thread/thr_clean.c Modified: head/lib/libthr/thread/thr_clean.c ============================================================================== --- head/lib/libthr/thread/thr_clean.c Wed Apr 22 16:06:49 2015 (r281856) +++ head/lib/libthr/thread/thr_clean.c Wed Apr 22 16:51:21 2015 (r281857) @@ -84,7 +84,7 @@ _pthread_cleanup_push(void (*routine) (v curthread->unwind_disabled = 1; #endif if ((newbuf = (struct pthread_cleanup *) - malloc(sizeof(struct _pthread_cleanup_info))) != NULL) { + malloc(sizeof(struct pthread_cleanup))) != NULL) { newbuf->routine = routine; newbuf->routine_arg = arg; newbuf->onheap = 1; From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 17:09:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CAA5611B; Wed, 22 Apr 2015 17:09:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B9B271A41; Wed, 22 Apr 2015 17:09:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MH93ng054507; Wed, 22 Apr 2015 17:09:03 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MH93vD054506; Wed, 22 Apr 2015 17:09:03 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504221709.t3MH93vD054506@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 22 Apr 2015 17:09:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281858 - head/lib/libc/regex X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 17:09:03 -0000 Author: pfg Date: Wed Apr 22 17:09:02 2015 New Revision: 281858 URL: https://svnweb.freebsd.org/changeset/base/281858 Log: computematchjumps(): fix allocator sizeof operand mismatch. Mostly cosmetical warning. Found by: Clang static analyzer Modified: head/lib/libc/regex/regcomp.c Modified: head/lib/libc/regex/regcomp.c ============================================================================== --- head/lib/libc/regex/regcomp.c Wed Apr 22 16:51:21 2015 (r281857) +++ head/lib/libc/regex/regcomp.c Wed Apr 22 17:09:02 2015 (r281858) @@ -1726,13 +1726,13 @@ computematchjumps(struct parse *p, struc if (p->error != 0) return; - pmatches = (int*) malloc(g->mlen * sizeof(unsigned int)); + pmatches = (int*) malloc(g->mlen * sizeof(int)); if (pmatches == NULL) { g->matchjump = NULL; return; } - g->matchjump = (int*) malloc(g->mlen * sizeof(unsigned int)); + g->matchjump = (int*) malloc(g->mlen * sizeof(int)); if (g->matchjump == NULL) { /* Not a fatal error */ free(pmatches); return; From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 17:15:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id D1984428; Wed, 22 Apr 2015 17:15:42 +0000 (UTC) Date: Wed, 22 Apr 2015 17:15:42 +0000 From: Alexey Dokuchaev To: "Pedro F. Giffuni" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281858 - head/lib/libc/regex Message-ID: <20150422171542.GA4240@FreeBSD.org> References: <201504221709.t3MH93vD054506@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201504221709.t3MH93vD054506@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 17:15:42 -0000 On Wed, Apr 22, 2015 at 05:09:03PM +0000, Pedro F. Giffuni wrote: > New Revision: 281858 > URL: https://svnweb.freebsd.org/changeset/base/281858 > > Log: > computematchjumps(): fix allocator sizeof operand mismatch. > [...] > - pmatches = (int*) malloc(g->mlen * sizeof(unsigned int)); > + pmatches = (int*) malloc(g->mlen * sizeof(int)); > if (pmatches == NULL) { > g->matchjump = NULL; > return; > } > > - g->matchjump = (int*) malloc(g->mlen * sizeof(unsigned int)); > + g->matchjump = (int*) malloc(g->mlen * sizeof(int)); Since you've touched these lines, you could'be also removed (int *) casting from malloc() calls. But now it's too late (does not warrant another commit). ./danfe From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 17:35:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A03487C5; Wed, 22 Apr 2015 17:35:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E0251D8C; Wed, 22 Apr 2015 17:35:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MHZxmN075218; Wed, 22 Apr 2015 17:35:59 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MHZxqx075217; Wed, 22 Apr 2015 17:35:59 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201504221735.t3MHZxqx075217@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Wed, 22 Apr 2015 17:35:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281859 - head/sys/boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 17:35:59 -0000 Author: loos Date: Wed Apr 22 17:35:58 2015 New Revision: 281859 URL: https://svnweb.freebsd.org/changeset/base/281859 Log: Fix the SDHCI clock frequency for RPI2, the default clock (for the newer firmware versions) is 250MHz. Modified: head/sys/boot/fdt/dts/arm/bcm2836.dtsi Modified: head/sys/boot/fdt/dts/arm/bcm2836.dtsi ============================================================================== --- head/sys/boot/fdt/dts/arm/bcm2836.dtsi Wed Apr 22 17:09:02 2015 (r281858) +++ head/sys/boot/fdt/dts/arm/bcm2836.dtsi Wed Apr 22 17:35:58 2015 (r281859) @@ -431,7 +431,7 @@ interrupts = <70>; interrupt-parent = <&intc>; - clock-frequency = <2500000000>; /* Set by VideoCore */ + clock-frequency = <250000000>; /* Set by VideoCore */ }; uart0: uart0 { From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 18:11:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08AC9F36; Wed, 22 Apr 2015 18:11:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA30411B2; Wed, 22 Apr 2015 18:11:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MIBY6L099703; Wed, 22 Apr 2015 18:11:34 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MIBYoA099702; Wed, 22 Apr 2015 18:11:34 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504221811.t3MIBYoA099702@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 22 Apr 2015 18:11:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281860 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 18:11:35 -0000 Author: mav Date: Wed Apr 22 18:11:34 2015 New Revision: 281860 URL: https://svnweb.freebsd.org/changeset/base/281860 Log: Make AIO to not allocate pbufs for unmapped I/O like r281825. While there, make few more performance optimizations. On 40-core system doing many 512-byte AIO reads from array of raw SSDs this change removes lock congestions inside pbuf allocator and devfs, and bottleneck on single AIO completion taskqueue thread. It improves peak AIO performance from ~600K to ~1.3M IOPS. MFC after: 2 weeks Modified: head/sys/kern/vfs_aio.c Modified: head/sys/kern/vfs_aio.c ============================================================================== --- head/sys/kern/vfs_aio.c Wed Apr 22 17:35:58 2015 (r281859) +++ head/sys/kern/vfs_aio.c Wed Apr 22 18:11:34 2015 (r281860) @@ -59,10 +59,12 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +#include #include #include #include @@ -232,9 +234,10 @@ struct aiocblist { int jobstate; /* (b) job state */ int inputcharge; /* (*) input blockes */ int outputcharge; /* (*) output blockes */ - struct buf *bp; /* (*) private to BIO backend, - * buffer pointer - */ + struct bio *bp; /* (*) BIO backend BIO pointer */ + struct buf *pbuf; /* (*) BIO backend buffer pointer */ + struct vm_page *pages[btoc(MAXPHYS)+1]; /* BIO backend pages */ + int npages; /* BIO backend number of pages */ struct proc *userproc; /* (*) user process */ struct ucred *cred; /* (*) active credential when created */ struct file *fd_file; /* (*) pointer to file structure */ @@ -243,7 +246,6 @@ struct aiocblist { struct knlist klist; /* (a) list of knotes */ struct aiocb uaiocb; /* (*) kernel I/O control block */ ksiginfo_t ksi; /* (a) realtime signal info */ - struct task biotask; /* (*) private to BIO backend */ uint64_t seqno; /* (*) job number */ int pending; /* (a) number of pending I/O, aio_fsync only */ }; @@ -344,11 +346,10 @@ static void aio_process_mlock(struct aio static int aio_newproc(int *); int aio_aqueue(struct thread *td, struct aiocb *job, struct aioliojob *lio, int type, struct aiocb_ops *ops); -static void aio_physwakeup(struct buf *bp); +static void aio_physwakeup(struct bio *bp); static void aio_proc_rundown(void *arg, struct proc *p); static void aio_proc_rundown_exec(void *arg, struct proc *p, struct image_params *imgp); static int aio_qphysio(struct proc *p, struct aiocblist *iocb); -static void biohelper(void *, int); static void aio_daemon(void *param); static void aio_swake_cb(struct socket *, struct sockbuf *); static int aio_unload(void); @@ -1294,13 +1295,15 @@ aio_qphysio(struct proc *p, struct aiocb { struct aiocb *cb; struct file *fp; - struct buf *bp; + struct bio *bp; + struct buf *pbuf; struct vnode *vp; struct cdevsw *csw; struct cdev *dev; struct kaioinfo *ki; struct aioliojob *lj; - int error, ref; + int error, ref, unmap, poff; + vm_prot_t prot; cb = &aiocbe->uaiocb; fp = aiocbe->fd_file; @@ -1309,107 +1312,121 @@ aio_qphysio(struct proc *p, struct aiocb return (-1); vp = fp->f_vnode; - - /* - * If its not a disk, we don't want to return a positive error. - * It causes the aio code to not fall through to try the thread - * way when you're talking to a regular file. - */ - if (!vn_isdisk(vp, &error)) { - if (error == ENOTBLK) - return (-1); - else - return (error); - } - - if (vp->v_bufobj.bo_bsize == 0) - return (-1); - - if (cb->aio_nbytes % vp->v_bufobj.bo_bsize) + if (vp->v_type != VCHR) return (-1); - - if (cb->aio_nbytes > - MAXPHYS - (((vm_offset_t) cb->aio_buf) & PAGE_MASK)) + if (vp->v_bufobj.bo_bsize == 0) return (-1); - - ki = p->p_aioinfo; - if (ki->kaio_buffer_count >= ki->kaio_ballowed_count) + if (cb->aio_nbytes % vp->v_bufobj.bo_bsize) return (-1); ref = 0; csw = devvn_refthread(vp, &dev, &ref); if (csw == NULL) return (ENXIO); + + if ((csw->d_flags & D_DISK) == 0) { + error = -1; + goto unref; + } if (cb->aio_nbytes > dev->si_iosize_max) { error = -1; goto unref; } - /* Create and build a buffer header for a transfer. */ - bp = (struct buf *)getpbuf(NULL); - BUF_KERNPROC(bp); + ki = p->p_aioinfo; + poff = (vm_offset_t)cb->aio_buf & PAGE_MASK; + unmap = ((dev->si_flags & SI_UNMAPPED) && unmapped_buf_allowed); + if (unmap) { + if (cb->aio_nbytes > MAXPHYS) { + error = -1; + goto unref; + } + } else { + if (cb->aio_nbytes > MAXPHYS - poff) { + error = -1; + goto unref; + } + if (ki->kaio_buffer_count >= ki->kaio_ballowed_count) { + error = -1; + goto unref; + } + } + aiocbe->bp = bp = g_alloc_bio(); + if (!unmap) { + aiocbe->pbuf = pbuf = (struct buf *)getpbuf(NULL); + BUF_KERNPROC(pbuf); + } AIO_LOCK(ki); ki->kaio_count++; - ki->kaio_buffer_count++; + if (!unmap) + ki->kaio_buffer_count++; lj = aiocbe->lio; if (lj) lj->lioj_count++; - AIO_UNLOCK(ki); - - /* - * Get a copy of the kva from the physical buffer. - */ - error = 0; - - bp->b_bcount = cb->aio_nbytes; - bp->b_bufsize = cb->aio_nbytes; - bp->b_iodone = aio_physwakeup; - bp->b_saveaddr = bp->b_data; - bp->b_data = (void *)(uintptr_t)cb->aio_buf; - bp->b_offset = cb->aio_offset; - bp->b_iooffset = cb->aio_offset; - bp->b_blkno = btodb(cb->aio_offset); - bp->b_iocmd = cb->aio_lio_opcode == LIO_WRITE ? BIO_WRITE : BIO_READ; - - /* - * Bring buffer into kernel space. - */ - if (vmapbuf(bp, (dev->si_flags & SI_UNMAPPED) == 0) < 0) { - error = EFAULT; - goto doerror; - } - - AIO_LOCK(ki); - aiocbe->bp = bp; - bp->b_caller1 = (void *)aiocbe; TAILQ_INSERT_TAIL(&ki->kaio_bufqueue, aiocbe, plist); TAILQ_INSERT_TAIL(&ki->kaio_all, aiocbe, allist); aiocbe->jobstate = JOBST_JOBQBUF; cb->_aiocb_private.status = cb->aio_nbytes; AIO_UNLOCK(ki); - atomic_add_int(&num_queue_count, 1); - atomic_add_int(&num_buf_aio, 1); - - bp->b_error = 0; + bp->bio_length = cb->aio_nbytes; + bp->bio_bcount = cb->aio_nbytes; + bp->bio_done = aio_physwakeup; + bp->bio_data = (void *)(uintptr_t)cb->aio_buf; + bp->bio_offset = cb->aio_offset; + bp->bio_cmd = cb->aio_lio_opcode == LIO_WRITE ? BIO_WRITE : BIO_READ; + bp->bio_dev = dev; + bp->bio_caller1 = (void *)aiocbe; + + prot = VM_PROT_READ; + if (cb->aio_lio_opcode == LIO_READ) + prot |= VM_PROT_WRITE; /* Less backwards than it looks */ + if ((aiocbe->npages = vm_fault_quick_hold_pages( + &curproc->p_vmspace->vm_map, + (vm_offset_t)bp->bio_data, bp->bio_length, prot, aiocbe->pages, + sizeof(aiocbe->pages)/sizeof(aiocbe->pages[0]))) < 0) { + error = EFAULT; + goto doerror; + } + if (!unmap) { + pmap_qenter((vm_offset_t)pbuf->b_data, + aiocbe->pages, aiocbe->npages); + bp->bio_data = pbuf->b_data + poff; + } else { + bp->bio_ma = aiocbe->pages; + bp->bio_ma_n = aiocbe->npages; + bp->bio_ma_offset = poff; + bp->bio_data = unmapped_buf; + bp->bio_flags |= BIO_UNMAPPED; + } - TASK_INIT(&aiocbe->biotask, 0, biohelper, aiocbe); + atomic_add_int(&num_queue_count, 1); + if (!unmap) + atomic_add_int(&num_buf_aio, 1); /* Perform transfer. */ - dev_strategy_csw(dev, csw, bp); + csw->d_strategy(bp); dev_relthread(dev, ref); return (0); doerror: AIO_LOCK(ki); + aiocbe->jobstate = JOBST_NULL; + TAILQ_REMOVE(&ki->kaio_bufqueue, aiocbe, plist); + TAILQ_REMOVE(&ki->kaio_all, aiocbe, allist); ki->kaio_count--; - ki->kaio_buffer_count--; + if (!unmap) + ki->kaio_buffer_count--; if (lj) lj->lioj_count--; - aiocbe->bp = NULL; AIO_UNLOCK(ki); - relpbuf(bp, NULL); + if (pbuf) { + relpbuf(pbuf, NULL); + aiocbe->pbuf = NULL; + } + g_destroy_bio(bp); + aiocbe->bp = NULL; unref: dev_relthread(dev, ref); return (error); @@ -1787,8 +1804,6 @@ no_kqueue: } #endif queueit: - /* No buffer for daemon I/O. */ - aiocbe->bp = NULL; atomic_add_int(&num_queue_count, 1); AIO_LOCK(ki); @@ -2425,54 +2440,43 @@ sys_lio_listio(struct thread *td, struct return (error); } -/* - * Called from interrupt thread for physio, we should return as fast - * as possible, so we schedule a biohelper task. - */ static void -aio_physwakeup(struct buf *bp) +aio_physwakeup(struct bio *bp) { - struct aiocblist *aiocbe; - - aiocbe = (struct aiocblist *)bp->b_caller1; - taskqueue_enqueue(taskqueue_aiod_bio, &aiocbe->biotask); -} - -/* - * Task routine to perform heavy tasks, process wakeup, and signals. - */ -static void -biohelper(void *context, int pending) -{ - struct aiocblist *aiocbe = context; - struct buf *bp; + struct aiocblist *aiocbe = (struct aiocblist *)bp->bio_caller1; struct proc *userp; struct kaioinfo *ki; int nblks; + /* Release mapping into kernel space. */ + if (aiocbe->pbuf) { + pmap_qremove((vm_offset_t)aiocbe->pbuf->b_data, aiocbe->npages); + relpbuf(aiocbe->pbuf, NULL); + aiocbe->pbuf = NULL; + atomic_subtract_int(&num_buf_aio, 1); + } + vm_page_unhold_pages(aiocbe->pages, aiocbe->npages); + bp = aiocbe->bp; + aiocbe->bp = NULL; userp = aiocbe->userproc; ki = userp->p_aioinfo; AIO_LOCK(ki); - aiocbe->uaiocb._aiocb_private.status -= bp->b_resid; + aiocbe->uaiocb._aiocb_private.status -= bp->bio_resid; aiocbe->uaiocb._aiocb_private.error = 0; - if (bp->b_ioflags & BIO_ERROR) - aiocbe->uaiocb._aiocb_private.error = bp->b_error; + if (bp->bio_flags & BIO_ERROR) + aiocbe->uaiocb._aiocb_private.error = bp->bio_error; nblks = btodb(aiocbe->uaiocb.aio_nbytes); if (aiocbe->uaiocb.aio_lio_opcode == LIO_WRITE) aiocbe->outputcharge += nblks; else aiocbe->inputcharge += nblks; - aiocbe->bp = NULL; TAILQ_REMOVE(&userp->p_aioinfo->kaio_bufqueue, aiocbe, plist); ki->kaio_buffer_count--; aio_bio_done_notify(userp, aiocbe, DONE_BUF); AIO_UNLOCK(ki); - /* Release mapping into kernel space. */ - vunmapbuf(bp); - relpbuf(bp, NULL); - atomic_subtract_int(&num_buf_aio, 1); + g_destroy_bio(bp); } /* syscall - wait for the next completion of an aio request */ From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 18:13:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7BF5913F; Wed, 22 Apr 2015 18:13:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A9B511D7; Wed, 22 Apr 2015 18:13:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MIDTSO003011; Wed, 22 Apr 2015 18:13:29 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MIDTgW003010; Wed, 22 Apr 2015 18:13:29 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504221813.t3MIDTgW003010@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 22 Apr 2015 18:13:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281861 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 18:13:29 -0000 Author: pfg Date: Wed Apr 22 18:13:28 2015 New Revision: 281861 URL: https://svnweb.freebsd.org/changeset/base/281861 Log: Add definition for the argument_with_type_tag attribute. This attribute originates in clang and brings support for checking types of variadic functions' arguments for functions like fcntl() and ioctl(). Unfortunately lint(1) will complain about them: in particular as one of the parameters is the function being tagged. For now define this attribute in the lint-sensitive section. Reference: http://clang.llvm.org/docs/AttributeReference.html#type-safety-checking Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Wed Apr 22 18:11:34 2015 (r281860) +++ head/sys/sys/cdefs.h Wed Apr 22 18:13:28 2015 (r281861) @@ -212,6 +212,7 @@ #define __unused #define __packed #define __aligned(x) +#define __arg_type_tag(arg_kind, arg_idx, type_tag_idx) #define __section(x) #define __weak #else @@ -236,6 +237,12 @@ #define __aligned(x) __attribute__((__aligned__(x))) #define __section(x) __attribute__((__section__(x))) #endif +#if __has_attribute(argument_with_type_tag) +#define __arg_type_tag(arg_kind, arg_idx, type_tag_idx) \ + __attribute__((__argument_with_type_tag__(arg_kind, arg_idx, type_tag_idx))) +#else +#define __arg_type_tag(arg_kind, arg_idx, type_tag_idx) +#endif #if defined(__INTEL_COMPILER) #define __dead2 __attribute__((__noreturn__)) #define __pure2 __attribute__((__const__)) From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 18:15:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 885F029F; Wed, 22 Apr 2015 18:15:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 76E8011E8; Wed, 22 Apr 2015 18:15:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MIFJoH003783; Wed, 22 Apr 2015 18:15:19 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MIFJFi003782; Wed, 22 Apr 2015 18:15:19 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201504221815.t3MIFJFi003782@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Wed, 22 Apr 2015 18:15:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281862 - head/sys/modules/zlib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 18:15:19 -0000 Author: rodrigc Date: Wed Apr 22 18:15:18 2015 New Revision: 281862 URL: https://svnweb.freebsd.org/changeset/base/281862 Log: Move zlib.c from net to libkern. Modified: head/sys/modules/zlib/Makefile Modified: head/sys/modules/zlib/Makefile ============================================================================== --- head/sys/modules/zlib/Makefile Wed Apr 22 18:13:28 2015 (r281861) +++ head/sys/modules/zlib/Makefile Wed Apr 22 18:15:18 2015 (r281862) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../net +.PATH: ${.CURDIR}/../../libkern KMOD= zlib SRCS= zlib.c From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 18:35:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D4887619; Wed, 22 Apr 2015 18:35:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2FC21441; Wed, 22 Apr 2015 18:35:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MIZ3OL018106; Wed, 22 Apr 2015 18:35:03 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MIZ3ud018105; Wed, 22 Apr 2015 18:35:03 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201504221835.t3MIZ3ud018105@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Wed, 22 Apr 2015 18:35:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281863 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 18:35:03 -0000 Author: loos Date: Wed Apr 22 18:35:02 2015 New Revision: 281863 URL: https://svnweb.freebsd.org/changeset/base/281863 Log: Fetch the SDHCI frequency from videocore (our prefered source) and only if it fails, fetch the clock-frequency from DTB. If both methods fail, use the hardcoded default. Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Wed Apr 22 18:15:18 2015 (r281862) +++ head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Wed Apr 22 18:35:02 2015 (r281863) @@ -181,17 +181,16 @@ bcm_sdhci_attach(device_t dev) if (err == 0) { /* Convert to MHz */ default_freq /= 1000000; - if (bootverbose) - device_printf(dev, "default frequency: %dMHz\n", - default_freq); + } + if (default_freq == 0) { + node = ofw_bus_get_node(sc->sc_dev); + if ((OF_getencprop(node, "clock-frequency", &cell, + sizeof(cell))) > 0) + default_freq = cell / 1000000; } if (default_freq == 0) default_freq = BCM2835_DEFAULT_SDHCI_FREQ; - node = ofw_bus_get_node(sc->sc_dev); - if ((OF_getprop(node, "clock-frequency", &cell, sizeof(cell))) > 0) - default_freq = fdt32_to_cpu(cell)/1000000; - if (bootverbose) device_printf(dev, "SDHCI frequency: %dMHz\n", default_freq); From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 18:54:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1BE465B1; Wed, 22 Apr 2015 18:54:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E446716A2; Wed, 22 Apr 2015 18:54:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MIspEo032504; Wed, 22 Apr 2015 18:54:51 GMT (envelope-from jgh@FreeBSD.org) Received: (from jgh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MIspZc032503; Wed, 22 Apr 2015 18:54:51 GMT (envelope-from jgh@FreeBSD.org) Message-Id: <201504221854.t3MIspZc032503@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jgh set sender to jgh@FreeBSD.org using -f From: Jason Helfman Date: Wed, 22 Apr 2015 18:54:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281865 - stable/10/sbin/ggate/ggatel X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 18:54:52 -0000 Author: jgh (doc,ports committer) Date: Wed Apr 22 18:54:51 2015 New Revision: 281865 URL: https://svnweb.freebsd.org/changeset/base/281865 Log: MFC: r281324 - ggatel.8 currently doesn't mention the 'rescue' command and documents a non-existing 'attach' command instead. - while here address a spelling error Approved by: wblock (mentor) Differential Revision: https://reviews.freebsd.org/D2346 Modified: stable/10/sbin/ggate/ggatel/ggatel.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ggate/ggatel/ggatel.8 ============================================================================== --- stable/10/sbin/ggate/ggatel/ggatel.8 Wed Apr 22 18:46:29 2015 (r281864) +++ stable/10/sbin/ggate/ggatel/ggatel.8 Wed Apr 22 18:54:51 2015 (r281865) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 2, 2011 +.Dd April 9, 2015 .Dt GGATEL 8 .Os .Sh NAME @@ -40,12 +40,6 @@ .Op Fl u Ar unit .Ar path .Nm -.Cm attach -.Op Fl v -.Op Fl o Cm ro | wo | rw -.Fl u Ar unit -.Ar path -.Nm .Cm destroy .Op Fl f .Fl u Ar unit @@ -53,6 +47,12 @@ .Cm list .Op Fl v .Op Fl u Ar unit +.Nm +.Cm rescue +.Op Fl v +.Op Fl o Cm ro | wo | rw +.Fl u Ar unit +.Ar path .Sh DESCRIPTION The .Nm @@ -70,10 +70,6 @@ Available commands: Create a .Nm ggate provider related to the given regular file or device. -.It Cm attach -Attach a worker process to an existing -.Nm ggate -provider. .It Cm destroy Destroy the given .Nm ggate @@ -82,6 +78,12 @@ provider. List .Nm ggate providers. +.It Cm rescue +Take over a previously created provider and handle pending and future +requests. This is useful if the initial +.Nm +process died. To prevent data loss, the given path must lead to the +regular file or device that was used to create the provider. .El .Pp Available options: @@ -111,7 +113,7 @@ Default is 30. .It Fl u Ar unit Unit number to use. .It Fl v -Do not fork, run in foreground and print debug informations on standard +Do not fork, run in foreground and print debug information on standard output. .It Ar path Path to a regular file or device. From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 19:36:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 728FCDC7; Wed, 22 Apr 2015 19:36:06 +0000 (UTC) Received: from mail.strugglingcoder.info (strugglingcoder.info [65.19.130.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5EBA51BCF; Wed, 22 Apr 2015 19:36:05 +0000 (UTC) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPSA id D24D410DD87; Wed, 22 Apr 2015 12:36:04 -0700 (PDT) Date: Wed, 22 Apr 2015 12:36:04 -0700 From: Hiren Panchasara To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281838 - head/sys/dev/e1000 Message-ID: <20150422193604.GF28632@strugglingcoder.info> References: <201504212024.t3LKOG3N073010@svn.freebsd.org> <20150421220550.GA28632@strugglingcoder.info> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="DEueqSqTbz/jWVG1" Content-Disposition: inline In-Reply-To: <20150421220550.GA28632@strugglingcoder.info> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 19:36:06 -0000 --DEueqSqTbz/jWVG1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 04/21/15 at 03:05P, Hiren Panchasara wrote: > On 04/21/15 at 08:24P, Hiren Panchasara wrote: > > Author: hiren > > Date: Tue Apr 21 20:24:15 2015 > > New Revision: 281838 > > URL: https://svnweb.freebsd.org/changeset/base/281838 > >=20 > > Log: > > For igb(4), when we are doing multiqueue, we are all setup to have fu= ll 32bit > > RSS hash from the card. We do not need to hide that under "ifdef RSS"= and should > > expose that by default so others like lagg(4) can use that and avoid = hashing the > > traffic by themselves. > > While here, improve comments and get rid of hidden/unimplemented RSS = support > > code for UDP. > > =20 > > Differential Revision: https://reviews.freebsd.org/D2296 > > Reviewed by: jfv, erj > > Discussed with: adrian > > Sponsored by: Limelight Networks > >=20 > > Modified: > > head/sys/dev/e1000/if_igb.c >=20 > I intend to MFC this in a week or so. But for that, I'd have to first > MFC a part of https://svnweb.freebsd.org/base?view=3Drevision&revision=3D= 268028 > which sets rss hash types. Apparently another missing MFC is r275358. I'll work on them. Cheers, Hiren --DEueqSqTbz/jWVG1 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQF8BAEBCgBmBQJVN/gkXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/l32MH/jrWPSjFWU4IsU4v/Zw17hNY DO4GfhIEa6SotLBo9sSvJRZFYa/eU31AnwO6KTEV0LE1bfQ4vnPM5gMgZjP23/lF Z7M7EfNmEIQriuSnMfESQzPHMVidMiZBPTmEHhMHf33kcxq+vcrAz+z32LMpgmPZ c6NoSTkaf8YEyYppOhQEHX58XooEyHnNNuFK+Jm/w+3KDxaccOXbKZ6vPFIW09m6 ZwfjJPGabmMBi8bvmMf9bY/g4HIU1x4Xe0G9hnMOksrdsGhh8WBwIeH17mfBAfhg 1yngHJw9qtBBtvHCUwzDm1xCO8LMh0IrWCqqmwZlMbKCA1trP6qABgrpQBLySyI= =PXBC -----END PGP SIGNATURE----- --DEueqSqTbz/jWVG1-- From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 19:41:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1DFD2B2; Wed, 22 Apr 2015 19:41:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E6DA91CA8; Wed, 22 Apr 2015 19:41:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MJfTxt066090; Wed, 22 Apr 2015 19:41:29 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MJfTvS066089; Wed, 22 Apr 2015 19:41:29 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201504221941.t3MJfTvS066089@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 22 Apr 2015 19:41:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281866 - stable/10/sys/netinet6 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 19:41:30 -0000 Author: ae Date: Wed Apr 22 19:41:29 2015 New Revision: 281866 URL: https://svnweb.freebsd.org/changeset/base/281866 Log: MFC r281309: Fix the check for maximum mbuf's size needed to send ND6 NA and NS. It is acceptable that the size can be equal to MCLBYTES. In the later KAME's code this check has been moved under DIAGNOSTIC ifdef, because the size of NA and NS is much smaller than MCLBYTES. So, it is safe to replace the check with KASSERT. PR: 199304 Modified: stable/10/sys/netinet6/nd6_nbr.c Directory Properties: stable/10/ (props changed) stable/10/sys/gnu/dts/ (props changed) Modified: stable/10/sys/netinet6/nd6_nbr.c ============================================================================== --- stable/10/sys/netinet6/nd6_nbr.c Wed Apr 22 18:54:51 2015 (r281865) +++ stable/10/sys/netinet6/nd6_nbr.c Wed Apr 22 19:41:29 2015 (r281866) @@ -400,13 +400,9 @@ nd6_ns_output(struct ifnet *ifp, const s /* estimate the size of message */ maxlen = sizeof(*ip6) + sizeof(*nd_ns); maxlen += (sizeof(struct nd_opt_hdr) + ifp->if_addrlen + 7) & ~7; - if (max_linkhdr + maxlen >= MCLBYTES) { -#ifdef DIAGNOSTIC - printf("nd6_ns_output: max_linkhdr + maxlen >= MCLBYTES " - "(%d + %d > %d)\n", max_linkhdr, maxlen, MCLBYTES); -#endif - return; - } + KASSERT(max_linkhdr + maxlen <= MCLBYTES, ( + "%s: max_linkhdr + maxlen > MCLBYTES (%d + %d > %d)", + __func__, max_linkhdr, maxlen, MCLBYTES)); if (max_linkhdr + maxlen > MHLEN) m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); @@ -973,13 +969,9 @@ nd6_na_output_fib(struct ifnet *ifp, con /* estimate the size of message */ maxlen = sizeof(*ip6) + sizeof(*nd_na); maxlen += (sizeof(struct nd_opt_hdr) + ifp->if_addrlen + 7) & ~7; - if (max_linkhdr + maxlen >= MCLBYTES) { -#ifdef DIAGNOSTIC - printf("nd6_na_output: max_linkhdr + maxlen >= MCLBYTES " - "(%d + %d > %d)\n", max_linkhdr, maxlen, MCLBYTES); -#endif - return; - } + KASSERT(max_linkhdr + maxlen <= MCLBYTES, ( + "%s: max_linkhdr + maxlen > MCLBYTES (%d + %d > %d)", + __func__, max_linkhdr, maxlen, MCLBYTES)); if (max_linkhdr + maxlen > MHLEN) m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 19:59:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB8675F8; Wed, 22 Apr 2015 19:59:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A96DC1E10; Wed, 22 Apr 2015 19:59:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MJx9ra080063; Wed, 22 Apr 2015 19:59:09 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MJx9l8080061; Wed, 22 Apr 2015 19:59:09 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201504221959.t3MJx9l8080061@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 22 Apr 2015 19:59:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281867 - in stable/9/sys: dev/usb/wlan netinet6 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 19:59:10 -0000 Author: ae Date: Wed Apr 22 19:59:08 2015 New Revision: 281867 URL: https://svnweb.freebsd.org/changeset/base/281867 Log: MFC r281309: Fix the check for maximum mbuf's size needed to send ND6 NA and NS. It is acceptable that the size can be equal to MCLBYTES. In the later KAME's code this check has been moved under DIAGNOSTIC ifdef, because the size of NA and NS is much smaller than MCLBYTES. So, it is safe to replace the check with KASSERT. PR: 199304 Modified: stable/9/sys/netinet6/nd6_nbr.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/forth/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/i386/gptboot/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/dev/run/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/isp/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/dev/puc/ (props changed) stable/9/sys/dev/usb/wlan/if_run.c (props changed) stable/9/sys/dev/usb/wlan/if_runreg.h (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) stable/9/sys/modules/ixgbe/ (props changed) stable/9/sys/modules/svr4/ (props changed) stable/9/sys/net/ (props changed) stable/9/sys/netpfil/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/netinet6/nd6_nbr.c ============================================================================== --- stable/9/sys/netinet6/nd6_nbr.c Wed Apr 22 19:41:29 2015 (r281866) +++ stable/9/sys/netinet6/nd6_nbr.c Wed Apr 22 19:59:08 2015 (r281867) @@ -398,13 +398,9 @@ nd6_ns_output(struct ifnet *ifp, const s /* estimate the size of message */ maxlen = sizeof(*ip6) + sizeof(*nd_ns); maxlen += (sizeof(struct nd_opt_hdr) + ifp->if_addrlen + 7) & ~7; - if (max_linkhdr + maxlen >= MCLBYTES) { -#ifdef DIAGNOSTIC - printf("nd6_ns_output: max_linkhdr + maxlen >= MCLBYTES " - "(%d + %d > %d)\n", max_linkhdr, maxlen, MCLBYTES); -#endif - return; - } + KASSERT(max_linkhdr + maxlen <= MCLBYTES, ( + "%s: max_linkhdr + maxlen > MCLBYTES (%d + %d > %d)", + __func__, max_linkhdr, maxlen, MCLBYTES)); MGETHDR(m, M_DONTWAIT, MT_DATA); if (m && max_linkhdr + maxlen >= MHLEN) { @@ -969,13 +965,9 @@ nd6_na_output_fib(struct ifnet *ifp, con /* estimate the size of message */ maxlen = sizeof(*ip6) + sizeof(*nd_na); maxlen += (sizeof(struct nd_opt_hdr) + ifp->if_addrlen + 7) & ~7; - if (max_linkhdr + maxlen >= MCLBYTES) { -#ifdef DIAGNOSTIC - printf("nd6_na_output: max_linkhdr + maxlen >= MCLBYTES " - "(%d + %d > %d)\n", max_linkhdr, maxlen, MCLBYTES); -#endif - return; - } + KASSERT(max_linkhdr + maxlen <= MCLBYTES, ( + "%s: max_linkhdr + maxlen > MCLBYTES (%d + %d > %d)", + __func__, max_linkhdr, maxlen, MCLBYTES)); MGETHDR(m, M_DONTWAIT, MT_DATA); if (m && max_linkhdr + maxlen >= MHLEN) { From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 20:42:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ECC62FA1; Wed, 22 Apr 2015 20:42:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA95812EA; Wed, 22 Apr 2015 20:42:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MKgI5d014646; Wed, 22 Apr 2015 20:42:18 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MKgIMS014641; Wed, 22 Apr 2015 20:42:18 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201504222042.t3MKgIMS014641@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 22 Apr 2015 20:42:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281868 - stable/10/sys/netinet6 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 20:42:19 -0000 Author: ae Date: Wed Apr 22 20:42:17 2015 New Revision: 281868 URL: https://svnweb.freebsd.org/changeset/base/281868 Log: MFC r274988 (with modification): Skip L2 addresses lookups for tunneling interfaces. PR: 197286 Modified: stable/10/sys/netinet6/in6.c stable/10/sys/netinet6/nd6.c Directory Properties: stable/10/ (props changed) stable/10/sys/gnu/dts/ (props changed) Modified: stable/10/sys/netinet6/in6.c ============================================================================== --- stable/10/sys/netinet6/in6.c Wed Apr 22 19:59:08 2015 (r281867) +++ stable/10/sys/netinet6/in6.c Wed Apr 22 20:42:17 2015 (r281868) @@ -155,6 +155,8 @@ in6_ifaddloop(struct ifaddr *ifa) ia = ifa2ia6(ifa); ifp = ifa->ifa_ifp; + if (nd6_need_cache(ifp) == 0) + return; IF_AFDATA_LOCK(ifp); ifa->ifa_rtrequest = nd6_rtrequest; ln = lla_lookup(LLTABLE6(ifp), (LLE_CREATE | LLE_IFADDR | Modified: stable/10/sys/netinet6/nd6.c ============================================================================== --- stable/10/sys/netinet6/nd6.c Wed Apr 22 19:59:08 2015 (r281867) +++ stable/10/sys/netinet6/nd6.c Wed Apr 22 20:42:17 2015 (r281868) @@ -2185,9 +2185,6 @@ nd6_need_cache(struct ifnet *ifp) case IFT_IEEE80211: #endif case IFT_INFINIBAND: - case IFT_GIF: /* XXX need more cases? */ - case IFT_PPP: - case IFT_TUNNEL: case IFT_BRIDGE: case IFT_PROPVIRTUAL: return (1); From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 20:48:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 54F5C2BB; Wed, 22 Apr 2015 20:48:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 28EE9131F; Wed, 22 Apr 2015 20:48:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MKmvrh017194; Wed, 22 Apr 2015 20:48:57 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MKmuYq017190; Wed, 22 Apr 2015 20:48:56 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201504222048.t3MKmuYq017190@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 22 Apr 2015 20:48:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281869 - in stable/9/sys: dev/usb/wlan netinet6 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 20:48:57 -0000 Author: ae Date: Wed Apr 22 20:48:56 2015 New Revision: 281869 URL: https://svnweb.freebsd.org/changeset/base/281869 Log: MFC r274988 (with modification): Skip L2 addresses lookups for tunneling interfaces. PR: 197286 Modified: stable/9/sys/netinet6/in6.c stable/9/sys/netinet6/nd6.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/forth/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/i386/gptboot/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/dev/run/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/isp/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/dev/puc/ (props changed) stable/9/sys/dev/usb/wlan/if_run.c (props changed) stable/9/sys/dev/usb/wlan/if_runreg.h (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) stable/9/sys/modules/ixgbe/ (props changed) stable/9/sys/modules/svr4/ (props changed) stable/9/sys/net/ (props changed) stable/9/sys/netpfil/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/netinet6/in6.c ============================================================================== --- stable/9/sys/netinet6/in6.c Wed Apr 22 20:42:17 2015 (r281868) +++ stable/9/sys/netinet6/in6.c Wed Apr 22 20:48:56 2015 (r281869) @@ -154,6 +154,8 @@ in6_ifaddloop(struct ifaddr *ifa) ia = ifa2ia6(ifa); ifp = ifa->ifa_ifp; + if (nd6_need_cache(ifp) == 0) + return; IF_AFDATA_LOCK(ifp); ifa->ifa_rtrequest = nd6_rtrequest; ln = lla_lookup(LLTABLE6(ifp), (LLE_CREATE | LLE_IFADDR | Modified: stable/9/sys/netinet6/nd6.c ============================================================================== --- stable/9/sys/netinet6/nd6.c Wed Apr 22 20:42:17 2015 (r281868) +++ stable/9/sys/netinet6/nd6.c Wed Apr 22 20:48:56 2015 (r281869) @@ -2175,9 +2175,6 @@ nd6_need_cache(struct ifnet *ifp) case IFT_CARP: #endif case IFT_INFINIBAND: - case IFT_GIF: /* XXX need more cases? */ - case IFT_PPP: - case IFT_TUNNEL: case IFT_BRIDGE: case IFT_PROPVIRTUAL: return (1); From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 21:38:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BF1A0CC0; Wed, 22 Apr 2015 21:38:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ADBC818B0; Wed, 22 Apr 2015 21:38:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MLcMD0053453; Wed, 22 Apr 2015 21:38:22 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MLcMou053452; Wed, 22 Apr 2015 21:38:22 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504222138.t3MLcMou053452@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 22 Apr 2015 21:38:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281870 - head/sys/dev/pccbb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 21:38:22 -0000 Author: jhb Date: Wed Apr 22 21:38:21 2015 New Revision: 281870 URL: https://svnweb.freebsd.org/changeset/base/281870 Log: Cosmetic change: use PCIR_SECLAT_2 rather than PCIR_SECLAT_1. Modified: head/sys/dev/pccbb/pccbb_pci.c Modified: head/sys/dev/pccbb/pccbb_pci.c ============================================================================== --- head/sys/dev/pccbb/pccbb_pci.c Wed Apr 22 20:48:56 2015 (r281869) +++ head/sys/dev/pccbb/pccbb_pci.c Wed Apr 22 21:38:21 2015 (r281870) @@ -467,8 +467,8 @@ cbb_chipinit(struct cbb_softc *sc) uint32_t mux, sysctrl, reg; /* Set CardBus latency timer */ - if (pci_read_config(sc->dev, PCIR_SECLAT_1, 1) < 0x20) - pci_write_config(sc->dev, PCIR_SECLAT_1, 0x20, 1); + if (pci_read_config(sc->dev, PCIR_SECLAT_2, 1) < 0x20) + pci_write_config(sc->dev, PCIR_SECLAT_2, 0x20, 1); /* Set PCI latency timer */ if (pci_read_config(sc->dev, PCIR_LATTIMER, 1) < 0x20) From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 21:42:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0E926F44; Wed, 22 Apr 2015 21:42:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE76B1988; Wed, 22 Apr 2015 21:41:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MLfx8s058403; Wed, 22 Apr 2015 21:41:59 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MLfx0k058402; Wed, 22 Apr 2015 21:41:59 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504222141.t3MLfx0k058402@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 22 Apr 2015 21:41:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281871 - head/sys/dev/pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 21:42:00 -0000 Author: jhb Date: Wed Apr 22 21:41:59 2015 New Revision: 281871 URL: https://svnweb.freebsd.org/changeset/base/281871 Log: The minimim grant and maximum latency PCI config registers are only valid for type 0 devices, not type 1 or 2 bridges. Don't read them for bridge devices during bus scans and return an error when attempting to read them as ivars for bridge devices. Modified: head/sys/dev/pci/pci.c Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Wed Apr 22 21:38:21 2015 (r281870) +++ head/sys/dev/pci/pci.c Wed Apr 22 21:41:59 2015 (r281871) @@ -583,6 +583,8 @@ pci_hdrtypedata(device_t pcib, int b, in case PCIM_HDRTYPE_NORMAL: cfg->subvendor = REG(PCIR_SUBVEND_0, 2); cfg->subdevice = REG(PCIR_SUBDEV_0, 2); + cfg->mingnt = REG(PCIR_MINGNT, 1); + cfg->maxlat = REG(PCIR_MAXLAT, 1); cfg->nummaps = PCI_MAXMAPS_0; break; case PCIM_HDRTYPE_BRIDGE: @@ -641,9 +643,6 @@ pci_fill_devinfo(device_t pcib, int d, i cfg->intpin = REG(PCIR_INTPIN, 1); cfg->intline = REG(PCIR_INTLINE, 1); - cfg->mingnt = REG(PCIR_MINGNT, 1); - cfg->maxlat = REG(PCIR_MAXLAT, 1); - cfg->mfdev = (cfg->hdrtype & PCIM_MFDEV) != 0; cfg->hdrtype &= ~PCIM_MFDEV; STAILQ_INIT(&cfg->maps); @@ -4425,9 +4424,17 @@ pci_read_ivar(device_t dev, device_t chi *result = cfg->cachelnsz; break; case PCI_IVAR_MINGNT: + if (cfg->hdrtype != PCIM_HDRTYPE_NORMAL) { + *result = -1; + return (EINVAL); + } *result = cfg->mingnt; break; case PCI_IVAR_MAXLAT: + if (cfg->hdrtype != PCIM_HDRTYPE_NORMAL) { + *result = -1; + return (EINVAL); + } *result = cfg->maxlat; break; case PCI_IVAR_LATTIMER: From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 21:47:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08F631E0; Wed, 22 Apr 2015 21:47:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB77919D5; Wed, 22 Apr 2015 21:47:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MLlppO060508; Wed, 22 Apr 2015 21:47:51 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MLlpwd060507; Wed, 22 Apr 2015 21:47:51 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504222147.t3MLlpwd060507@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 22 Apr 2015 21:47:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281872 - head/sys/dev/pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 21:47:52 -0000 Author: jhb Date: Wed Apr 22 21:47:51 2015 New Revision: 281872 URL: https://svnweb.freebsd.org/changeset/base/281872 Log: Fix some incorrect #if conditions around older workarounds for bus numbering goofs. MFC after: 1 week Modified: head/sys/dev/pci/pci_pci.c Modified: head/sys/dev/pci/pci_pci.c ============================================================================== --- head/sys/dev/pci/pci_pci.c Wed Apr 22 21:41:59 2015 (r281871) +++ head/sys/dev/pci/pci_pci.c Wed Apr 22 21:47:51 2015 (r281872) @@ -950,7 +950,7 @@ pcib_attach_common(device_t dev) * Quirk handling. */ switch (pci_get_devid(dev)) { -#if !defined(NEW_PCIB) && !defined(PCI_RES_BUS) +#if !(defined(NEW_PCIB) && defined(PCI_RES_BUS)) case 0x12258086: /* Intel 82454KX/GX (Orion) */ { uint8_t supbus; @@ -976,7 +976,7 @@ pcib_attach_common(device_t dev) sc->flags |= PCIB_SUBTRACTIVE; break; -#if !defined(NEW_PCIB) && !defined(PCI_RES_BUS) +#if !(defined(NEW_PCIB) && defined(PCI_RES_BUS)) /* Compaq R3000 BIOS sets wrong subordinate bus number. */ case 0x00dd10de: { From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 21:56:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EF531557; Wed, 22 Apr 2015 21:56:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD5961AC3; Wed, 22 Apr 2015 21:56:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MLuie0067665; Wed, 22 Apr 2015 21:56:44 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MLuiuq067664; Wed, 22 Apr 2015 21:56:44 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504222156.t3MLuiuq067664@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 22 Apr 2015 21:56:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281873 - head/sys/dev/pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 21:56:45 -0000 Author: jhb Date: Wed Apr 22 21:56:44 2015 New Revision: 281873 URL: https://svnweb.freebsd.org/changeset/base/281873 Log: Don't explicitly manage power states for PCI-PCI bridge devices in the driver's suspend and resume routines. These have been redundant no-ops since r214065 changed the PCI bus driver to manage power states for all devices (including type 1/2 bridge devices) during suspend and resume. Modified: head/sys/dev/pci/pci_pci.c Modified: head/sys/dev/pci/pci_pci.c ============================================================================== --- head/sys/dev/pci/pci_pci.c Wed Apr 22 21:47:51 2015 (r281872) +++ head/sys/dev/pci/pci_pci.c Wed Apr 22 21:56:44 2015 (r281873) @@ -1101,32 +1101,15 @@ pcib_attach(device_t dev) int pcib_suspend(device_t dev) { - device_t pcib; - int dstate, error; pcib_cfg_save(device_get_softc(dev)); - error = bus_generic_suspend(dev); - if (error == 0 && pci_do_power_suspend) { - dstate = PCI_POWERSTATE_D3; - pcib = device_get_parent(device_get_parent(dev)); - if (PCIB_POWER_FOR_SLEEP(pcib, dev, &dstate) == 0) - pci_set_powerstate(dev, dstate); - } - return (error); + return (bus_generic_suspend(dev)); } int pcib_resume(device_t dev) { - device_t pcib; - int dstate; - if (pci_do_power_resume) { - pcib = device_get_parent(device_get_parent(dev)); - dstate = PCI_POWERSTATE_D0; - if (PCIB_POWER_FOR_SLEEP(pcib, dev, &dstate) == 0) - pci_set_powerstate(dev, dstate); - } pcib_cfg_restore(device_get_softc(dev)); return (bus_generic_resume(dev)); } From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 22:02:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 05621896; Wed, 22 Apr 2015 22:02:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E5AF11BD9; Wed, 22 Apr 2015 22:02:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MM2Sws073413; Wed, 22 Apr 2015 22:02:28 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MM2R78073403; Wed, 22 Apr 2015 22:02:27 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504222202.t3MM2R78073403@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 22 Apr 2015 22:02:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281874 - in head/sys/dev: pccbb pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 22:02:29 -0000 Author: jhb Date: Wed Apr 22 22:02:27 2015 New Revision: 281874 URL: https://svnweb.freebsd.org/changeset/base/281874 Log: Update the pci_cfg_save/restore routines to operate on bridge devices (type 1 and type 2) as well as leaf devices (type 0). In particular, this allows the existing PCI bus logic to save and restore capability registers such as MSI and PCI-express work for bridge devices rather than requiring that code to be duplicated in bridge drivers. It also means that bridge drivers no longer need to save and restore basic registers such as the PCI command register or BARs nor manage powerstates for the bridge device. While here, pci_setup_secbus() has been changed to initialize the 'sec' and 'sub' fields in the 'secbus' structure instead of requiring the pcib and pccbb drivers to do this in the NEW_PCIB + PCI_RES_BUS case. Differential Revision: https://reviews.freebsd.org/D2240 Reviewed by: imp, jmg MFC after: 2 weeks Modified: head/sys/dev/pccbb/pccbb_pci.c head/sys/dev/pci/pci.c head/sys/dev/pci/pci_pci.c head/sys/dev/pci/pcib_private.h head/sys/dev/pci/pcivar.h Modified: head/sys/dev/pccbb/pccbb_pci.c ============================================================================== --- head/sys/dev/pccbb/pccbb_pci.c Wed Apr 22 21:56:44 2015 (r281873) +++ head/sys/dev/pccbb/pccbb_pci.c Wed Apr 22 22:02:27 2015 (r281874) @@ -259,32 +259,6 @@ cbb_pci_probe(device_t brdev) } /* - * Still need this because the pci code only does power for type 0 - * header devices. - */ -static void -cbb_powerstate_d0(device_t dev) -{ - u_int32_t membase, irq; - - if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) { - /* Save important PCI config data. */ - membase = pci_read_config(dev, CBBR_SOCKBASE, 4); - irq = pci_read_config(dev, PCIR_INTLINE, 4); - - /* Reset the power state. */ - device_printf(dev, "chip is in D%d power mode " - "-- setting to D0\n", pci_get_powerstate(dev)); - - pci_set_powerstate(dev, PCI_POWERSTATE_D0); - - /* Restore PCI config data. */ - pci_write_config(dev, CBBR_SOCKBASE, membase, 4); - pci_write_config(dev, PCIR_INTLINE, irq, 4); - } -} - -/* * Print out the config space */ static void @@ -321,15 +295,15 @@ cbb_pci_attach(device_t brdev) sc->cbdev = NULL; sc->exca[0].pccarddev = NULL; sc->domain = pci_get_domain(brdev); - sc->bus.sec = pci_read_config(brdev, PCIR_SECBUS_2, 1); - sc->bus.sub = pci_read_config(brdev, PCIR_SUBBUS_2, 1); sc->pribus = pcib_get_bus(parent); #if defined(NEW_PCIB) && defined(PCI_RES_BUS) pci_write_config(brdev, PCIR_PRIBUS_2, sc->pribus, 1); pcib_setup_secbus(brdev, &sc->bus, 1); +#else + sc->bus.sec = pci_read_config(brdev, PCIR_SECBUS_2, 1); + sc->bus.sub = pci_read_config(brdev, PCIR_SUBBUS_2, 1); #endif SLIST_INIT(&sc->rl); - cbb_powerstate_d0(brdev); rid = CBBR_SOCKBASE; sc->base_res = bus_alloc_resource_any(brdev, SYS_RES_MEMORY, &rid, @@ -474,11 +448,6 @@ cbb_chipinit(struct cbb_softc *sc) if (pci_read_config(sc->dev, PCIR_LATTIMER, 1) < 0x20) pci_write_config(sc->dev, PCIR_LATTIMER, 0x20, 1); - /* Restore bus configuration */ - pci_write_config(sc->dev, PCIR_PRIBUS_2, sc->pribus, 1); - pci_write_config(sc->dev, PCIR_SECBUS_2, sc->bus.sec, 1); - pci_write_config(sc->dev, PCIR_SUBBUS_2, sc->bus.sub, 1); - /* Enable DMA, memory access for this card and I/O acces for children */ pci_enable_busmaster(sc->dev); pci_enable_io(sc->dev, SYS_RES_IOPORT); @@ -906,15 +875,10 @@ cbb_pci_resume(device_t brdev) * from D0 and back to D0 cause the bridge to lose its config space, so * all the bus mappings and such are preserved. * - * For most drivers, the PCI layer handles this saving. However, since - * there's much black magic and arcane art hidden in these few lines of - * code that would be difficult to transition into the PCI - * layer. chipinit was several years of trial and error to write. + * The PCI layer handles standard PCI registers like the + * command register and BARs, but cbb-specific registers are + * handled here. */ - pci_write_config(brdev, CBBR_SOCKBASE, rman_get_start(sc->base_res), 4); - DEVPRINTF((brdev, "PCI Memory allocated: %08lx\n", - rman_get_start(sc->base_res))); - sc->chipinit(sc); /* reset interrupt -- Do we really need to do this? */ Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Wed Apr 22 21:56:44 2015 (r281873) +++ head/sys/dev/pci/pci.c Wed Apr 22 22:02:27 2015 (r281874) @@ -588,9 +588,19 @@ pci_hdrtypedata(device_t pcib, int b, in cfg->nummaps = PCI_MAXMAPS_0; break; case PCIM_HDRTYPE_BRIDGE: + cfg->bridge.br_seclat = REG(PCIR_SECLAT_1, 1); + cfg->bridge.br_subbus = REG(PCIR_SUBBUS_1, 1); + cfg->bridge.br_secbus = REG(PCIR_SECBUS_1, 1); + cfg->bridge.br_pribus = REG(PCIR_PRIBUS_1, 1); + cfg->bridge.br_control = REG(PCIR_BRIDGECTL_1, 2); cfg->nummaps = PCI_MAXMAPS_1; break; case PCIM_HDRTYPE_CARDBUS: + cfg->bridge.br_seclat = REG(PCIR_SECLAT_2, 1); + cfg->bridge.br_subbus = REG(PCIR_SUBBUS_2, 1); + cfg->bridge.br_secbus = REG(PCIR_SECBUS_2, 1); + cfg->bridge.br_pribus = REG(PCIR_PRIBUS_2, 1); + cfg->bridge.br_control = REG(PCIR_BRIDGECTL_2, 2); cfg->subvendor = REG(PCIR_SUBVEND_2, 2); cfg->subdevice = REG(PCIR_SUBDEV_2, 2); cfg->nummaps = PCI_MAXMAPS_2; @@ -5132,16 +5142,6 @@ pci_cfg_restore(device_t dev, struct pci { /* - * Only do header type 0 devices. Type 1 devices are bridges, - * which we know need special treatment. Type 2 devices are - * cardbus bridges which also require special treatment. - * Other types are unknown, and we err on the side of safety - * by ignoring them. - */ - if ((dinfo->cfg.hdrtype & PCIM_HDRTYPE) != PCIM_HDRTYPE_NORMAL) - return; - - /* * Restore the device to full power mode. We must do this * before we restore the registers because moving from D3 to * D0 will cause the chip's BARs and some other registers to @@ -5151,16 +5151,44 @@ pci_cfg_restore(device_t dev, struct pci */ if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) pci_set_powerstate(dev, PCI_POWERSTATE_D0); - pci_restore_bars(dev); pci_write_config(dev, PCIR_COMMAND, dinfo->cfg.cmdreg, 2); pci_write_config(dev, PCIR_INTLINE, dinfo->cfg.intline, 1); pci_write_config(dev, PCIR_INTPIN, dinfo->cfg.intpin, 1); - pci_write_config(dev, PCIR_MINGNT, dinfo->cfg.mingnt, 1); - pci_write_config(dev, PCIR_MAXLAT, dinfo->cfg.maxlat, 1); pci_write_config(dev, PCIR_CACHELNSZ, dinfo->cfg.cachelnsz, 1); pci_write_config(dev, PCIR_LATTIMER, dinfo->cfg.lattimer, 1); pci_write_config(dev, PCIR_PROGIF, dinfo->cfg.progif, 1); pci_write_config(dev, PCIR_REVID, dinfo->cfg.revid, 1); + switch (dinfo->cfg.hdrtype & PCIM_HDRTYPE) { + case PCIM_HDRTYPE_NORMAL: + pci_write_config(dev, PCIR_MINGNT, dinfo->cfg.mingnt, 1); + pci_write_config(dev, PCIR_MAXLAT, dinfo->cfg.maxlat, 1); + break; + case PCIM_HDRTYPE_BRIDGE: + pci_write_config(dev, PCIR_SECLAT_1, + dinfo->cfg.bridge.br_seclat, 1); + pci_write_config(dev, PCIR_SUBBUS_1, + dinfo->cfg.bridge.br_subbus, 1); + pci_write_config(dev, PCIR_SECBUS_1, + dinfo->cfg.bridge.br_secbus, 1); + pci_write_config(dev, PCIR_PRIBUS_1, + dinfo->cfg.bridge.br_pribus, 1); + pci_write_config(dev, PCIR_BRIDGECTL_1, + dinfo->cfg.bridge.br_control, 2); + break; + case PCIM_HDRTYPE_CARDBUS: + pci_write_config(dev, PCIR_SECLAT_2, + dinfo->cfg.bridge.br_seclat, 1); + pci_write_config(dev, PCIR_SUBBUS_2, + dinfo->cfg.bridge.br_subbus, 1); + pci_write_config(dev, PCIR_SECBUS_2, + dinfo->cfg.bridge.br_secbus, 1); + pci_write_config(dev, PCIR_PRIBUS_2, + dinfo->cfg.bridge.br_pribus, 1); + pci_write_config(dev, PCIR_BRIDGECTL_2, + dinfo->cfg.bridge.br_control, 2); + break; + } + pci_restore_bars(dev); /* * Restore extended capabilities for PCI-Express and PCI-X @@ -5229,40 +5257,57 @@ pci_cfg_save(device_t dev, struct pci_de int ps; /* - * Only do header type 0 devices. Type 1 devices are bridges, which - * we know need special treatment. Type 2 devices are cardbus bridges - * which also require special treatment. Other types are unknown, and - * we err on the side of safety by ignoring them. Powering down - * bridges should not be undertaken lightly. - */ - if ((dinfo->cfg.hdrtype & PCIM_HDRTYPE) != PCIM_HDRTYPE_NORMAL) - return; - - /* * Some drivers apparently write to these registers w/o updating our * cached copy. No harm happens if we update the copy, so do so here * so we can restore them. The COMMAND register is modified by the * bus w/o updating the cache. This should represent the normally - * writable portion of the 'defined' part of type 0 headers. In - * theory we also need to save/restore the PCI capability structures - * we know about, but apart from power we don't know any that are - * writable. + * writable portion of the 'defined' part of type 0/1/2 headers. */ - dinfo->cfg.subvendor = pci_read_config(dev, PCIR_SUBVEND_0, 2); - dinfo->cfg.subdevice = pci_read_config(dev, PCIR_SUBDEV_0, 2); dinfo->cfg.vendor = pci_read_config(dev, PCIR_VENDOR, 2); dinfo->cfg.device = pci_read_config(dev, PCIR_DEVICE, 2); dinfo->cfg.cmdreg = pci_read_config(dev, PCIR_COMMAND, 2); dinfo->cfg.intline = pci_read_config(dev, PCIR_INTLINE, 1); dinfo->cfg.intpin = pci_read_config(dev, PCIR_INTPIN, 1); - dinfo->cfg.mingnt = pci_read_config(dev, PCIR_MINGNT, 1); - dinfo->cfg.maxlat = pci_read_config(dev, PCIR_MAXLAT, 1); dinfo->cfg.cachelnsz = pci_read_config(dev, PCIR_CACHELNSZ, 1); dinfo->cfg.lattimer = pci_read_config(dev, PCIR_LATTIMER, 1); dinfo->cfg.baseclass = pci_read_config(dev, PCIR_CLASS, 1); dinfo->cfg.subclass = pci_read_config(dev, PCIR_SUBCLASS, 1); dinfo->cfg.progif = pci_read_config(dev, PCIR_PROGIF, 1); dinfo->cfg.revid = pci_read_config(dev, PCIR_REVID, 1); + switch (dinfo->cfg.hdrtype & PCIM_HDRTYPE) { + case PCIM_HDRTYPE_NORMAL: + dinfo->cfg.subvendor = pci_read_config(dev, PCIR_SUBVEND_0, 2); + dinfo->cfg.subdevice = pci_read_config(dev, PCIR_SUBDEV_0, 2); + dinfo->cfg.mingnt = pci_read_config(dev, PCIR_MINGNT, 1); + dinfo->cfg.maxlat = pci_read_config(dev, PCIR_MAXLAT, 1); + break; + case PCIM_HDRTYPE_BRIDGE: + dinfo->cfg.bridge.br_seclat = pci_read_config(dev, + PCIR_SECLAT_1, 1); + dinfo->cfg.bridge.br_subbus = pci_read_config(dev, + PCIR_SUBBUS_1, 1); + dinfo->cfg.bridge.br_secbus = pci_read_config(dev, + PCIR_SECBUS_1, 1); + dinfo->cfg.bridge.br_pribus = pci_read_config(dev, + PCIR_PRIBUS_1, 1); + dinfo->cfg.bridge.br_control = pci_read_config(dev, + PCIR_BRIDGECTL_1, 2); + break; + case PCIM_HDRTYPE_CARDBUS: + dinfo->cfg.bridge.br_seclat = pci_read_config(dev, + PCIR_SECLAT_2, 1); + dinfo->cfg.bridge.br_subbus = pci_read_config(dev, + PCIR_SUBBUS_2, 1); + dinfo->cfg.bridge.br_secbus = pci_read_config(dev, + PCIR_SECBUS_2, 1); + dinfo->cfg.bridge.br_pribus = pci_read_config(dev, + PCIR_PRIBUS_2, 1); + dinfo->cfg.bridge.br_control = pci_read_config(dev, + PCIR_BRIDGECTL_2, 2); + dinfo->cfg.subvendor = pci_read_config(dev, PCIR_SUBVEND_2, 2); + dinfo->cfg.subdevice = pci_read_config(dev, PCIR_SUBDEV_2, 2); + break; + } if (dinfo->cfg.pcie.pcie_location != 0) pci_cfg_save_pcie(dev, dinfo); Modified: head/sys/dev/pci/pci_pci.c ============================================================================== --- head/sys/dev/pci/pci_pci.c Wed Apr 22 21:56:44 2015 (r281873) +++ head/sys/dev/pci/pci_pci.c Wed Apr 22 22:02:27 2015 (r281874) @@ -553,18 +553,22 @@ void pcib_setup_secbus(device_t dev, struct pcib_secbus *bus, int min_count) { char buf[64]; - int error, rid; + int error, rid, sec_reg; switch (pci_read_config(dev, PCIR_HDRTYPE, 1) & PCIM_HDRTYPE) { case PCIM_HDRTYPE_BRIDGE: + sec_reg = PCIR_SECBUS_1; bus->sub_reg = PCIR_SUBBUS_1; break; case PCIM_HDRTYPE_CARDBUS: + sec_reg = PCIR_SECBUS_2; bus->sub_reg = PCIR_SUBBUS_2; break; default: panic("not a PCI bridge"); } + bus->sec = pci_read_config(dev, sec_reg, 1); + bus->sub = pci_read_config(dev, bus->sub_reg, 1); bus->dev = dev; bus->rman.rm_start = 0; bus->rman.rm_end = PCI_BUSMAX; @@ -849,20 +853,16 @@ pcib_set_mem_decode(struct pcib_softc *s static void pcib_cfg_save(struct pcib_softc *sc) { +#ifndef NEW_PCIB device_t dev; + uint16_t command; dev = sc->dev; - sc->command = pci_read_config(dev, PCIR_COMMAND, 2); - sc->pribus = pci_read_config(dev, PCIR_PRIBUS_1, 1); - sc->bus.sec = pci_read_config(dev, PCIR_SECBUS_1, 1); - sc->bus.sub = pci_read_config(dev, PCIR_SUBBUS_1, 1); - sc->bridgectl = pci_read_config(dev, PCIR_BRIDGECTL_1, 2); - sc->seclat = pci_read_config(dev, PCIR_SECLAT_1, 1); -#ifndef NEW_PCIB - if (sc->command & PCIM_CMD_PORTEN) + command = pci_read_config(dev, PCIR_COMMAND, 2); + if (command & PCIM_CMD_PORTEN) pcib_get_io_decode(sc); - if (sc->command & PCIM_CMD_MEMEN) + if (command & PCIM_CMD_MEMEN) pcib_get_mem_decode(sc); #endif } @@ -874,21 +874,18 @@ static void pcib_cfg_restore(struct pcib_softc *sc) { device_t dev; - +#ifndef NEW_PCIB + uint16_t command; +#endif dev = sc->dev; - pci_write_config(dev, PCIR_COMMAND, sc->command, 2); - pci_write_config(dev, PCIR_PRIBUS_1, sc->pribus, 1); - pci_write_config(dev, PCIR_SECBUS_1, sc->bus.sec, 1); - pci_write_config(dev, PCIR_SUBBUS_1, sc->bus.sub, 1); - pci_write_config(dev, PCIR_BRIDGECTL_1, sc->bridgectl, 2); - pci_write_config(dev, PCIR_SECLAT_1, sc->seclat, 1); #ifdef NEW_PCIB pcib_write_windows(sc, WIN_IO | WIN_MEM | WIN_PMEM); #else - if (sc->command & PCIM_CMD_PORTEN) + command = pci_read_config(dev, PCIR_COMMAND, 2); + if (command & PCIM_CMD_PORTEN) pcib_set_io_decode(sc); - if (sc->command & PCIM_CMD_MEMEN) + if (command & PCIM_CMD_MEMEN) pcib_set_mem_decode(sc); #endif } @@ -922,7 +919,11 @@ pcib_attach_common(device_t dev) * Get current bridge configuration. */ sc->domain = pci_get_domain(dev); - sc->secstat = pci_read_config(dev, PCIR_SECSTAT_1, 2); +#if !(defined(NEW_PCIB) && defined(PCI_RES_BUS)) + sc->bus.sec = pci_read_config(dev, PCIR_SECBUS_1, 1); + sc->bus.sub = pci_read_config(dev, PCIR_SUBBUS_1, 1); +#endif + sc->bridgectl = pci_read_config(dev, PCIR_BRIDGECTL_1, 2); pcib_cfg_save(sc); /* Modified: head/sys/dev/pci/pcib_private.h ============================================================================== --- head/sys/dev/pci/pcib_private.h Wed Apr 22 21:56:44 2015 (r281873) +++ head/sys/dev/pci/pcib_private.h Wed Apr 22 22:02:27 2015 (r281874) @@ -106,7 +106,6 @@ struct pcib_softc #define PCIB_DISABLE_MSI 0x2 #define PCIB_DISABLE_MSIX 0x4 #define PCIB_ENABLE_ARI 0x8 - uint16_t command; /* command register */ u_int domain; /* domain number */ u_int pribus; /* primary bus number */ struct pcib_secbus bus; /* secondary bus numbers */ @@ -122,9 +121,7 @@ struct pcib_softc uint32_t iobase; /* base address of port window */ uint32_t iolimit; /* topmost address of port window */ #endif - uint16_t secstat; /* secondary bus status register */ uint16_t bridgectl; /* bridge control register */ - uint8_t seclat; /* secondary bus latency timer */ }; #define PCIB_SUPPORTED_ARI_VER 1 Modified: head/sys/dev/pci/pcivar.h ============================================================================== --- head/sys/dev/pci/pcivar.h Wed Apr 22 21:56:44 2015 (r281873) +++ head/sys/dev/pci/pcivar.h Wed Apr 22 22:02:27 2015 (r281874) @@ -41,6 +41,15 @@ typedef uint64_t pci_addr_t; struct nvlist; +/* Config registers for PCI-PCI and PCI-Cardbus bridges. */ +struct pcicfg_bridge { + uint8_t br_seclat; + uint8_t br_subbus; + uint8_t br_secbus; + uint8_t br_pribus; + uint16_t br_control; +}; + /* Interesting values for PCI power management */ struct pcicfg_pp { uint16_t pp_cap; /* PCI power management capabilities */ @@ -190,6 +199,7 @@ typedef struct pcicfg { uint32_t flags; /* flags defined above */ size_t devinfo_size; /* Size of devinfo for this bus type. */ + struct pcicfg_bridge bridge; /* Bridges */ struct pcicfg_pp pp; /* Power management */ struct pcicfg_vpd vpd; /* Vital product data */ struct pcicfg_msi msi; /* PCI MSI */ From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 22:23:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 45A00E2D; Wed, 22 Apr 2015 22:23:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33D5F1DFB; Wed, 22 Apr 2015 22:23:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MMNv7n091912; Wed, 22 Apr 2015 22:23:57 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MMNv5l091910; Wed, 22 Apr 2015 22:23:57 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504222223.t3MMNv5l091910@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 22 Apr 2015 22:23:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281875 - head/lib/libgeom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 22:23:57 -0000 Author: pfg Date: Wed Apr 22 22:23:56 2015 New Revision: 281875 URL: https://svnweb.freebsd.org/changeset/base/281875 Log: libgeom: plug memory leak in EndElement. CID: 1016696 Found by: Clang static checker MFC after: 1 week Modified: head/lib/libgeom/geom_xml2tree.c Modified: head/lib/libgeom/geom_xml2tree.c ============================================================================== --- head/lib/libgeom/geom_xml2tree.c Wed Apr 22 22:02:27 2015 (r281874) +++ head/lib/libgeom/geom_xml2tree.c Wed Apr 22 22:23:56 2015 (r281875) @@ -257,6 +257,7 @@ EndElement(void *userData, const char *n if (!strcmp(name, "config")) { mt->config = NULL; + free(p); return; } From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 01:04:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AEC66D06; Thu, 23 Apr 2015 01:04:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8FF531F51; Thu, 23 Apr 2015 01:04:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3N14FmK011241; Thu, 23 Apr 2015 01:04:15 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3N14FfQ011235; Thu, 23 Apr 2015 01:04:15 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504230104.t3N14FfQ011235@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 23 Apr 2015 01:04:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281876 - in head/release: scripts tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 01:04:15 -0000 Author: gjb Date: Thu Apr 23 01:04:14 2015 New Revision: 281876 URL: https://svnweb.freebsd.org/changeset/base/281876 Log: Create the arm64/aarch64 VM disk image as MBR instead of GPT scheme. UEFI needs to know the unique partition GUID with GPT, which changes each time. Specifically, the QEMU EFI BIOS file has this hard-coded.[1] Since the GPT labels are now unavailable, unconditionally label the root filesystem as 'rootfs' with newfs(8), since it does not hurt anything anywhere else. For the arm64 case, '/' is mounted from /dev/ufs/rootfs; for all other VM images, '/' is mounted from /dev/gpt/rootfs. Unfortunately, since the /dev/gpt/swapfs label is also lost, set NOSWAP=1 for the arm64/aarch64 images. This is temporary, until I figure out a scalable solution to this. But, a certain piece of softare was written "very fast", and ended up living for 15 years. We can deal with this for a week or so. Information from: andrew, emaste [1] Sponsored by: The FreeBSD Foundation Modified: head/release/scripts/mk-vmimage.sh head/release/tools/vmimage.subr Modified: head/release/scripts/mk-vmimage.sh ============================================================================== --- head/release/scripts/mk-vmimage.sh Wed Apr 22 22:23:56 2015 (r281875) +++ head/release/scripts/mk-vmimage.sh Thu Apr 23 01:04:14 2015 (r281876) @@ -93,6 +93,16 @@ main() { . "${VMCONFIG}" fi + case ${TARGET}:${TARGET_ARCH} in + arm64:aarch64) + ROOTLABEL="ufs" + NOSWAP=1 + ;; + *) + ROOTLABEL="gpt" + ;; + esac + vm_create_base vm_install_base vm_extra_install_base Modified: head/release/tools/vmimage.subr ============================================================================== --- head/release/tools/vmimage.subr Wed Apr 22 22:23:56 2015 (r281875) +++ head/release/tools/vmimage.subr Thu Apr 23 01:04:14 2015 (r281876) @@ -30,10 +30,9 @@ write_partition_layout() { -o ${VMIMAGE} ;; arm64:aarch64) - mkimg -s gpt \ - -p efi/efiboot:=${BOOTFILES}/efi/boot1/boot1.efifat \ - ${SWAPOPT} \ - -p freebsd-ufs/rootfs:=${VMBASE} \ + mkimg -s mbr \ + -p efi:=${BOOTFILES}/efi/boot1/boot1.efifat \ + -p freebsd:=${VMBASE} \ -o ${VMIMAGE} ;; powerpc:powerpc*) @@ -77,7 +76,7 @@ vm_create_base() { mkdir -p ${DESTDIR} truncate -s ${VMSIZE} ${VMBASE} mddev=$(mdconfig -f ${VMBASE}) - newfs /dev/${mddev} + newfs -L rootfs /dev/${mddev} mount /dev/${mddev} ${DESTDIR} return 0 @@ -97,7 +96,7 @@ vm_copy_base() { truncate -s ${VMSIZE} ${VMBASE}.tmp mkdir -p ${DESTDIR}/new mdnew=$(mdconfig -f ${VMBASE}.tmp) - newfs /dev/${mdnew} + newfs -L rootfs /dev/${mdnew} mount /dev/${mdnew} ${DESTDIR}/new tar -cf- -C ${DESTDIR}/old . | tar -xUf- -C ${DESTDIR}/new @@ -123,7 +122,7 @@ vm_install_base() { echo '# Custom /etc/fstab for FreeBSD VM images' \ > ${DESTDIR}/etc/fstab - echo '/dev/gpt/rootfs / ufs rw 1 1' \ + echo "/dev/${ROOTLABEL}/rootfs / ufs rw 1 1" \ >> ${DESTDIR}/etc/fstab if [ -z "${NOSWAP}" ]; then echo '/dev/gpt/swapfs none swap sw 0 0' \ From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 01:39:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0C3F43C6; Thu, 23 Apr 2015 01:39:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EEA68124C; Thu, 23 Apr 2015 01:39:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3N1dSdI057852; Thu, 23 Apr 2015 01:39:28 GMT (envelope-from yongari@FreeBSD.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3N1dS9d057851; Thu, 23 Apr 2015 01:39:28 GMT (envelope-from yongari@FreeBSD.org) Message-Id: <201504230139.t3N1dS9d057851@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: yongari set sender to yongari@FreeBSD.org using -f From: Pyun YongHyeon Date: Thu, 23 Apr 2015 01:39:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281877 - head/sys/dev/mii X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 01:39:29 -0000 Author: yongari Date: Thu Apr 23 01:39:28 2015 New Revision: 281877 URL: https://svnweb.freebsd.org/changeset/base/281877 Log: Add another variant of BCM5708S controller to IBM HS21 workaround list. PR: 118238 MFC after: 2 weeks Modified: head/sys/dev/mii/brgphy.c Modified: head/sys/dev/mii/brgphy.c ============================================================================== --- head/sys/dev/mii/brgphy.c Thu Apr 23 01:04:14 2015 (r281876) +++ head/sys/dev/mii/brgphy.c Thu Apr 23 01:39:28 2015 (r281877) @@ -160,25 +160,33 @@ static const struct mii_phy_funcs brgphy brgphy_reset }; -#define HS21_PRODUCT_ID "IBM eServer BladeCenter HS21" -#define HS21_BCM_CHIPID 0x57081021 +static const struct hs21_type { + const uint32_t id; + const char *prod; +} hs21_type_lists[] = { + { 0x57081021, "IBM eServer BladeCenter HS21" }, + { 0x57081011, "IBM eServer BladeCenter HS21 -[8853PAU]-" }, +}; static int detect_hs21(struct bce_softc *bce_sc) { char *sysenv; - int found; + int found, i; found = 0; - if (bce_sc->bce_chipid == HS21_BCM_CHIPID) { - sysenv = kern_getenv("smbios.system.product"); - if (sysenv != NULL) { - if (strncmp(sysenv, HS21_PRODUCT_ID, - strlen(HS21_PRODUCT_ID)) == 0) - found = 1; - freeenv(sysenv); + sysenv = kern_getenv("smbios.system.product"); + if (sysenv == NULL) + return (found); + for (i = 0; i < nitems(hs21_type_lists); i++) { + if (bce_sc->bce_chipid == hs21_type_lists[i].id && + strncmp(sysenv, hs21_type_lists[i].prod, + strlen(hs21_type_lists[i].prod)) == 0) { + found++; + break; } } + freeenv(sysenv); return (found); } From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 01:52:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8292D58D; Thu, 23 Apr 2015 01:52:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 55D7913D5; Thu, 23 Apr 2015 01:52:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3N1q9vj078160; Thu, 23 Apr 2015 01:52:09 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3N1q81C078142; Thu, 23 Apr 2015 01:52:08 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201504230152.t3N1q81C078142@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Thu, 23 Apr 2015 01:52:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281878 - in stable/10: share/man/man4 sys/dev/usb sys/dev/usb/wlan X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 01:52:09 -0000 Author: kevlo Date: Thu Apr 23 01:52:07 2015 New Revision: 281878 URL: https://svnweb.freebsd.org/changeset/base/281878 Log: MFC r281745: Add new USB ID. PR: 199522 Modified: stable/10/share/man/man4/run.4 stable/10/sys/dev/usb/usbdevs stable/10/sys/dev/usb/wlan/if_run.c Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/run.4 ============================================================================== --- stable/10/share/man/man4/run.4 Thu Apr 23 01:39:28 2015 (r281877) +++ stable/10/share/man/man4/run.4 Thu Apr 23 01:52:07 2015 (r281878) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 3, 2014 +.Dd April 19, 2015 .Dt RUN 4 .Os .Sh NAME @@ -133,6 +133,7 @@ driver supports the following wireless a .It Belkin F6D4050 ver 1 .It Belkin F9L1103 .It Buffalo WLI-UC-AG300N +.It Buffalo WLI-UC-G300HP .It Buffalo WLI-UC-G300N .It Buffalo WLI-UC-G301N .It Buffalo WLI-UC-GN Modified: stable/10/sys/dev/usb/usbdevs ============================================================================== --- stable/10/sys/dev/usb/usbdevs Thu Apr 23 01:39:28 2015 (r281877) +++ stable/10/sys/dev/usb/usbdevs Thu Apr 23 01:52:07 2015 (r281878) @@ -2991,11 +2991,12 @@ product MELCO WLRUCG 0x0116 WLR-UC-G product MELCO WLRUCGAOSS 0x0119 WLR-UC-G-AOSS product MELCO WLIUCAG300N 0x012e WLI-UC-AG300N product MELCO WLIUCG 0x0137 WLI-UC-G -product MELCO RT2870_1 0x0148 RT2870 +product MELCO WLIUCG300HP 0x0148 WLI-UC-G300HP product MELCO RT2870_2 0x0150 RT2870 product MELCO WLIUCGN 0x015d WLI-UC-GN product MELCO WLIUCG301N 0x016f WLI-UC-G301N product MELCO WLIUCGNM 0x01a2 WLI-UC-GNM +product MELCO WLIUCG300HPV1 0x01a8 WLI-UC-G300HP-V1 product MELCO WLIUCGNM2 0x01ee WLI-UC-GNM2 /* Merlin products */ Modified: stable/10/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/10/sys/dev/usb/wlan/if_run.c Thu Apr 23 01:39:28 2015 (r281877) +++ stable/10/sys/dev/usb/wlan/if_run.c Thu Apr 23 01:52:07 2015 (r281878) @@ -224,13 +224,14 @@ static const STRUCT_USB_HOST_ID run_devs RUN_DEV(LOGITEC, LANW300NU2), RUN_DEV(LOGITEC, LANW150NU2), RUN_DEV(LOGITEC, LANW300NU2S), - RUN_DEV(MELCO, RT2870_1), + RUN_DEV(MELCO, WLIUCG300HP), RUN_DEV(MELCO, RT2870_2), RUN_DEV(MELCO, WLIUCAG300N), RUN_DEV(MELCO, WLIUCG300N), RUN_DEV(MELCO, WLIUCG301N), RUN_DEV(MELCO, WLIUCGN), RUN_DEV(MELCO, WLIUCGNM), + RUN_DEV(MELCO, WLIUCG300HPV1), RUN_DEV(MELCO, WLIUCGNM2), RUN_DEV(MOTOROLA4, RT2770), RUN_DEV(MOTOROLA4, RT3070), From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 02:50:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46FA6B09; Thu, 23 Apr 2015 02:50:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 360FE18EB; Thu, 23 Apr 2015 02:50:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3N2o7YW058432; Thu, 23 Apr 2015 02:50:07 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3N2o7bE058430; Thu, 23 Apr 2015 02:50:07 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201504230250.t3N2o7bE058430@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Thu, 23 Apr 2015 02:50:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281879 - head/sys/amd64/vmm/amd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 02:50:07 -0000 Author: araujo (ports committer) Date: Thu Apr 23 02:50:06 2015 New Revision: 281879 URL: https://svnweb.freebsd.org/changeset/base/281879 Log: Missing break in switch case. Differential Revision: D2342 Reviewed by: neel Modified: head/sys/amd64/vmm/amd/svm.c Modified: head/sys/amd64/vmm/amd/svm.c ============================================================================== --- head/sys/amd64/vmm/amd/svm.c Thu Apr 23 01:52:07 2015 (r281878) +++ head/sys/amd64/vmm/amd/svm.c Thu Apr 23 02:50:06 2015 (r281879) @@ -802,6 +802,7 @@ svm_handle_inst_emul(struct vmcb *vmcb, case CPU_MODE_REAL: vmexit->u.inst_emul.cs_base = seg.base; vmexit->u.inst_emul.cs_d = 0; + break; case CPU_MODE_PROTECTED: case CPU_MODE_COMPATIBILITY: vmexit->u.inst_emul.cs_base = seg.base; From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 07:32:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F2E431B6; Thu, 23 Apr 2015 07:32:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E02C01600; Thu, 23 Apr 2015 07:32:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3N7WTJ2032336; Thu, 23 Apr 2015 07:32:29 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3N7WT4L032327; Thu, 23 Apr 2015 07:32:29 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504230732.t3N7WT4L032327@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 23 Apr 2015 07:32:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281880 - in stable/10/sys: kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 07:32:30 -0000 Author: kib Date: Thu Apr 23 07:32:28 2015 New Revision: 281880 URL: https://svnweb.freebsd.org/changeset/base/281880 Log: MFC r281003: Speed up symbol lookup for the amd64 kernel modules. Modified: stable/10/sys/kern/link_elf_obj.c stable/10/sys/sys/elf_common.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/link_elf_obj.c ============================================================================== --- stable/10/sys/kern/link_elf_obj.c Thu Apr 23 02:50:06 2015 (r281879) +++ stable/10/sys/kern/link_elf_obj.c Thu Apr 23 07:32:28 2015 (r281880) @@ -173,6 +173,7 @@ static struct linker_class link_elf_clas }; static int relocate_file(elf_file_t ef); +static void elf_obj_cleanup_globals_cache(elf_file_t); static void link_elf_error(const char *filename, const char *s) @@ -1046,6 +1047,13 @@ relocate_file(elf_file_t ef) } } + /* + * Only clean SHN_FBSD_CACHED for successfull return. If we + * modified symbol table for the object but found an + * unresolved symbol, there is no reason to roll back. + */ + elf_obj_cleanup_globals_cache(ef); + return 0; } @@ -1194,6 +1202,21 @@ link_elf_each_function_nameval(linker_fi return (0); } +static void +elf_obj_cleanup_globals_cache(elf_file_t ef) +{ + Elf_Sym *sym; + Elf_Size i; + + for (i = 0; i < ef->ddbsymcnt; i++) { + sym = ef->ddbsymtab + i; + if (sym->st_shndx == SHN_FBSD_CACHED) { + sym->st_shndx = SHN_UNDEF; + sym->st_value = 0; + } + } +} + /* * Symbol lookup function that can be used when the symbol index is known (ie * in relocations). It uses the symbol index instead of doing a fully fledged @@ -1205,7 +1228,7 @@ static Elf_Addr elf_obj_lookup(linker_file_t lf, Elf_Size symidx, int deps) { elf_file_t ef = (elf_file_t)lf; - const Elf_Sym *sym; + Elf_Sym *sym; const char *symbol; Elf_Addr ret; @@ -1233,7 +1256,22 @@ elf_obj_lookup(linker_file_t lf, Elf_Siz if (*symbol == 0) return (0); ret = ((Elf_Addr)linker_file_lookup_symbol(lf, symbol, deps)); - return ret; + + /* + * Cache global lookups during module relocation. The failure + * case is particularly expensive for callers, who must scan + * through the entire globals table doing strcmp(). Cache to + * avoid doing such work repeatedly. + * + * After relocation is complete, undefined globals will be + * restored to SHN_UNDEF in elf_obj_cleanup_globals_cache(), + * above. + */ + if (ret != 0) { + sym->st_shndx = SHN_FBSD_CACHED; + sym->st_value = ret; + } + return (ret); case STB_WEAK: printf("link_elf_obj: Weak symbols not supported\n"); Modified: stable/10/sys/sys/elf_common.h ============================================================================== --- stable/10/sys/sys/elf_common.h Thu Apr 23 02:50:06 2015 (r281879) +++ stable/10/sys/sys/elf_common.h Thu Apr 23 07:32:28 2015 (r281880) @@ -251,6 +251,9 @@ typedef struct { #define SHN_LOPROC 0xff00 /* First processor-specific. */ #define SHN_HIPROC 0xff1f /* Last processor-specific. */ #define SHN_LOOS 0xff20 /* First operating system-specific. */ +#define SHN_FBSD_CACHED SHN_LOOS /* Transient, for sys/kern/link_elf_obj + linker only: Cached global in local + symtab. */ #define SHN_HIOS 0xff3f /* Last operating system-specific. */ #define SHN_ABS 0xfff1 /* Absolute values. */ #define SHN_COMMON 0xfff2 /* Common data. */ From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 07:41:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3172D51F; Thu, 23 Apr 2015 07:41:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F4FC1716; Thu, 23 Apr 2015 07:41:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3N7fwYX042285; Thu, 23 Apr 2015 07:41:59 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3N7fwqa042283; Thu, 23 Apr 2015 07:41:58 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201504230741.t3N7fwqa042283@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 23 Apr 2015 07:41:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281881 - head/sys/dev/usb/controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 07:41:59 -0000 Author: hselasky Date: Thu Apr 23 07:41:58 2015 New Revision: 281881 URL: https://svnweb.freebsd.org/changeset/base/281881 Log: Disable multi process interrupts, because the current code doesn't use them. Else we can end up in an infinite interrupt loop in USB device mode. MFC after: 3 days Modified: head/sys/dev/usb/controller/dwc_otg.c Modified: head/sys/dev/usb/controller/dwc_otg.c ============================================================================== --- head/sys/dev/usb/controller/dwc_otg.c Thu Apr 23 07:32:28 2015 (r281880) +++ head/sys/dev/usb/controller/dwc_otg.c Thu Apr 23 07:41:58 2015 (r281881) @@ -3876,20 +3876,18 @@ dwc_otg_init(struct dwc_otg_softc *sc) if (temp & GHWCFG2_MPI) { uint8_t x; - DPRINTF("Multi Process Interrupts\n"); + DPRINTF("Disable Multi Process Interrupts\n"); for (x = 0; x != sc->sc_dev_in_ep_max; x++) { - DWC_OTG_WRITE_4(sc, DOTG_DIEPEACHINTMSK(x), - DIEPMSK_XFERCOMPLMSK); + DWC_OTG_WRITE_4(sc, DOTG_DIEPEACHINTMSK(x), 0); DWC_OTG_WRITE_4(sc, DOTG_DOEPEACHINTMSK(x), 0); } - DWC_OTG_WRITE_4(sc, DOTG_DEACHINTMSK, 0xFFFF); - } else { - DWC_OTG_WRITE_4(sc, DOTG_DIEPMSK, - DIEPMSK_XFERCOMPLMSK); - DWC_OTG_WRITE_4(sc, DOTG_DOEPMSK, 0); - DWC_OTG_WRITE_4(sc, DOTG_DAINTMSK, 0xFFFF); + DWC_OTG_WRITE_4(sc, DOTG_DEACHINTMSK, 0); } + DWC_OTG_WRITE_4(sc, DOTG_DIEPMSK, + DIEPMSK_XFERCOMPLMSK); + DWC_OTG_WRITE_4(sc, DOTG_DOEPMSK, 0); + DWC_OTG_WRITE_4(sc, DOTG_DAINTMSK, 0xFFFF); } if (sc->sc_mode == DWC_MODE_OTG || sc->sc_mode == DWC_MODE_HOST) { From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 08:41:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AA46CFAC; Thu, 23 Apr 2015 08:41:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B28E1DC7; Thu, 23 Apr 2015 08:41:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3N8fplA007583; Thu, 23 Apr 2015 08:41:51 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3N8fpYo007582; Thu, 23 Apr 2015 08:41:51 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201504230841.t3N8fpYo007582@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 23 Apr 2015 08:41:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281882 - head/sys/compat/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 08:41:51 -0000 Author: trasz Date: Thu Apr 23 08:41:50 2015 New Revision: 281882 URL: https://svnweb.freebsd.org/changeset/base/281882 Log: Simplify linux_getcwd(), removing code that was longer used. Differential Revision: https://reviews.freebsd.org/D2326 Reviewed by: dchagin@, kib@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/compat/linux/linux_getcwd.c Modified: head/sys/compat/linux/linux_getcwd.c ============================================================================== --- head/sys/compat/linux/linux_getcwd.c Thu Apr 23 07:41:58 2015 (r281881) +++ head/sys/compat/linux/linux_getcwd.c Thu Apr 23 08:41:50 2015 (r281882) @@ -2,11 +2,15 @@ /* $NetBSD: vfs_getcwd.c,v 1.3.2.3 1999/07/11 10:24:09 sommerfeld Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. + * Copyright (c) 2015 The FreeBSD Foundation * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Bill Sommerfeld. * + * Portions of this software were developed by Edward Tomasz Napierala + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -36,19 +40,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include -#include -#include #include -#include -#include #include -#include #include -#include -#include /* XXX only for DIRBLKSIZ */ #ifdef COMPAT_LINUX32 #include @@ -60,408 +54,37 @@ __FBSDID("$FreeBSD$"); #include #include -#include - -static int -linux_getcwd_scandir(struct vnode **, struct vnode **, - char **, char *, struct thread *); -static int -linux_getcwd_common(struct vnode *, struct vnode *, - char **, char *, int, int, struct thread *); - -#define DIRENT_MINSIZE (sizeof(struct dirent) - (MAXNAMLEN+1) + 4) - -/* - * Vnode variable naming conventions in this file: - * - * rvp: the current root we're aiming towards. - * lvp, *lvpp: the "lower" vnode - * uvp, *uvpp: the "upper" vnode. - * - * Since all the vnodes we're dealing with are directories, and the - * lookups are going *up* in the filesystem rather than *down*, the - * usual "pvp" (parent) or "dvp" (directory) naming conventions are - * too confusing. - */ - -/* - * XXX Will infinite loop in certain cases if a directory read reliably - * returns EINVAL on last block. - * XXX is EINVAL the right thing to return if a directory is malformed? - */ - -/* - * XXX Untested vs. mount -o union; probably does the wrong thing. - */ - -/* - * Find parent vnode of *lvpp, return in *uvpp - * - * If we care about the name, scan it looking for name of directory - * entry pointing at lvp. - * - * Place the name in the buffer which starts at bufp, immediately - * before *bpp, and move bpp backwards to point at the start of it. - * - * On entry, *lvpp is a locked vnode reference; on exit, it is vput and NULL'ed - * On exit, *uvpp is either NULL or is a locked vnode reference. - */ -static int -linux_getcwd_scandir(lvpp, uvpp, bpp, bufp, td) - struct vnode **lvpp; - struct vnode **uvpp; - char **bpp; - char *bufp; - struct thread *td; -{ - int error = 0; - int eofflag; - off_t off; - int tries; - struct uio uio; - struct iovec iov; - char *dirbuf = NULL; - int dirbuflen; - ino_t fileno; - struct vattr va; - struct vnode *uvp = NULL; - struct vnode *lvp = *lvpp; - struct componentname cn; - int len, reclen; - tries = 0; - - /* - * If we want the filename, get some info we need while the - * current directory is still locked. - */ - if (bufp != NULL) { - error = VOP_GETATTR(lvp, &va, td->td_ucred); - if (error) { - vput(lvp); - *lvpp = NULL; - *uvpp = NULL; - return error; - } - } - - /* - * Ok, we have to do it the hard way.. - * Next, get parent vnode using lookup of .. - */ - cn.cn_nameiop = LOOKUP; - cn.cn_flags = ISLASTCN | ISDOTDOT | RDONLY; - cn.cn_thread = td; - cn.cn_cred = td->td_ucred; - cn.cn_pnbuf = NULL; - cn.cn_nameptr = ".."; - cn.cn_namelen = 2; - cn.cn_consume = 0; - cn.cn_lkflags = LK_SHARED; - - /* - * At this point, lvp is locked and will be unlocked by the lookup. - * On successful return, *uvpp will be locked - */ -#ifdef MAC - error = mac_vnode_check_lookup(td->td_ucred, lvp, &cn); - if (error == 0) -#endif - error = VOP_LOOKUP(lvp, uvpp, &cn); - if (error) { - vput(lvp); - *lvpp = NULL; - *uvpp = NULL; - return error; - } - uvp = *uvpp; - - /* If we don't care about the pathname, we're done */ - if (bufp == NULL) { - vput(lvp); - *lvpp = NULL; - return 0; - } - - fileno = va.va_fileid; - - dirbuflen = DIRBLKSIZ; - if (dirbuflen < va.va_blocksize) - dirbuflen = va.va_blocksize; - dirbuf = malloc(dirbuflen, M_TEMP, M_WAITOK); - -#if 0 -unionread: -#endif - off = 0; - do { - /* call VOP_READDIR of parent */ - iov.iov_base = dirbuf; - iov.iov_len = dirbuflen; - - uio.uio_iov = &iov; - uio.uio_iovcnt = 1; - uio.uio_offset = off; - uio.uio_resid = dirbuflen; - uio.uio_segflg = UIO_SYSSPACE; - uio.uio_rw = UIO_READ; - uio.uio_td = td; - - eofflag = 0; - -#ifdef MAC - error = mac_vnode_check_readdir(td->td_ucred, uvp); - if (error == 0) -#endif /* MAC */ - error = VOP_READDIR(uvp, &uio, td->td_ucred, &eofflag, - 0, 0); - - off = uio.uio_offset; - - /* - * Try again if NFS tosses its cookies. - * XXX this can still loop forever if the directory is busted - * such that the second or subsequent page of it always - * returns EINVAL - */ - if ((error == EINVAL) && (tries < 3)) { - off = 0; - tries++; - continue; /* once more, with feeling */ - } - - if (!error) { - char *cpos; - struct dirent *dp; - - cpos = dirbuf; - tries = 0; - - /* scan directory page looking for matching vnode */ - for (len = (dirbuflen - uio.uio_resid); len > 0; len -= reclen) { - dp = (struct dirent *) cpos; - reclen = dp->d_reclen; - - /* check for malformed directory.. */ - if (reclen < DIRENT_MINSIZE) { - error = EINVAL; - goto out; - } - /* - * XXX should perhaps do VOP_LOOKUP to - * check that we got back to the right place, - * but getting the locking games for that - * right would be heinous. - */ - if ((dp->d_type != DT_WHT) && - (dp->d_fileno == fileno)) { - char *bp = *bpp; - bp -= dp->d_namlen; - - if (bp <= bufp) { - error = ERANGE; - goto out; - } - bcopy(dp->d_name, bp, dp->d_namlen); - error = 0; - *bpp = bp; - goto out; - } - cpos += reclen; - } - } - } while (!eofflag); - error = ENOENT; - -out: - vput(lvp); - *lvpp = NULL; - free(dirbuf, M_TEMP); - return error; -} - - -/* - * common routine shared by sys___getcwd() and linux_vn_isunder() - */ - -#define GETCWD_CHECK_ACCESS 0x0001 - -static int -linux_getcwd_common (lvp, rvp, bpp, bufp, limit, flags, td) - struct vnode *lvp; - struct vnode *rvp; - char **bpp; - char *bufp; - int limit; - int flags; - struct thread *td; -{ - struct filedesc *fdp = td->td_proc->p_fd; - struct vnode *uvp = NULL; - char *bp = NULL; - int error; - accmode_t accmode = VEXEC; - - if (rvp == NULL) { - rvp = fdp->fd_rdir; - if (rvp == NULL) - rvp = rootvnode; - } - - VREF(rvp); - VREF(lvp); - - /* - * Error handling invariant: - * Before a `goto out': - * lvp is either NULL, or locked and held. - * uvp is either NULL, or locked and held. - */ - - error = vn_lock(lvp, LK_EXCLUSIVE | LK_RETRY); - if (error != 0) - panic("vn_lock LK_RETRY returned error %d", error); - if (bufp) - bp = *bpp; - /* - * this loop will terminate when one of the following happens: - * - we hit the root - * - getdirentries or lookup fails - * - we run out of space in the buffer. - */ - if (lvp == rvp) { - if (bp) - *(--bp) = '/'; - goto out; - } - do { - if (lvp->v_type != VDIR) { - error = ENOTDIR; - goto out; - } - - /* - * access check here is optional, depending on - * whether or not caller cares. - */ - if (flags & GETCWD_CHECK_ACCESS) { - error = VOP_ACCESS(lvp, accmode, td->td_ucred, td); - if (error) - goto out; - accmode = VEXEC|VREAD; - } - - /* - * step up if we're a covered vnode.. - */ - while (lvp->v_vflag & VV_ROOT) { - struct vnode *tvp; - - if (lvp == rvp) - goto out; - - tvp = lvp; - lvp = lvp->v_mount->mnt_vnodecovered; - vput(tvp); - /* - * hodie natus est radici frater - */ - if (lvp == NULL) { - error = ENOENT; - goto out; - } - VREF(lvp); - error = vn_lock(lvp, LK_EXCLUSIVE | LK_RETRY); - if (error != 0) - panic("vn_lock LK_RETRY returned %d", error); - } - error = linux_getcwd_scandir(&lvp, &uvp, &bp, bufp, td); - if (error) - goto out; -#ifdef DIAGNOSTIC - if (lvp != NULL) - panic("getcwd: oops, forgot to null lvp"); - if (bufp && (bp <= bufp)) { - panic("getcwd: oops, went back too far"); - } -#endif - if (bp) - *(--bp) = '/'; - lvp = uvp; - uvp = NULL; - limit--; - } while ((lvp != rvp) && (limit > 0)); - -out: - if (bpp) - *bpp = bp; - if (uvp) - vput(uvp); - if (lvp) - vput(lvp); - vrele(rvp); - return error; -} - - /* * Find pathname of process's current directory. - * - * Use vfs vnode-to-name reverse cache; if that fails, fall back - * to reading directory contents. */ - int linux_getcwd(struct thread *td, struct linux_getcwd_args *args) { - char *bp, *bend, *path; - int error, len, lenused; + char *path; + int error, lenused; #ifdef DEBUG if (ldebug(getcwd)) printf(ARGS(getcwd, "%p, %ld"), args->buf, (long)args->bufsize); #endif - len = args->bufsize; - - if (len > LINUX_PATH_MAX) - len = LINUX_PATH_MAX; - else if (len < 2) - return ERANGE; + /* + * Linux returns ERANGE instead of EINVAL. + */ + if (args->bufsize < 2) + return (ERANGE); - path = malloc(len, M_TEMP, M_WAITOK); + path = malloc(LINUX_PATH_MAX, M_TEMP, M_WAITOK); - error = kern___getcwd(td, path, UIO_SYSSPACE, len, LINUX_PATH_MAX); - if (!error) { + error = kern___getcwd(td, path, UIO_SYSSPACE, args->bufsize, + LINUX_PATH_MAX); + if (error == 0) { lenused = strlen(path) + 1; - if (lenused <= args->bufsize) { + error = copyout(path, args->buf, lenused); + if (error == 0) td->td_retval[0] = lenused; - error = copyout(path, args->buf, lenused); - } - else - error = ERANGE; - } else { - bp = &path[len]; - bend = bp; - *(--bp) = '\0'; - - /* - * 5th argument here is "max number of vnodes to traverse". - * Since each entry takes up at least 2 bytes in the output buffer, - * limit it to N/2 vnodes for an N byte buffer. - */ - - error = linux_getcwd_common (td->td_proc->p_fd->fd_cdir, NULL, - &bp, path, len/2, GETCWD_CHECK_ACCESS, td); - if (error) - goto out; - lenused = bend - bp; - td->td_retval[0] = lenused; - /* put the result into user buffer */ - error = copyout(bp, args->buf, lenused); } -out: + free(path, M_TEMP); return (error); } - From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 11:27:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D00C6EAB; Thu, 23 Apr 2015 11:27:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BEACF1ED6; Thu, 23 Apr 2015 11:27:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NBRL75079503; Thu, 23 Apr 2015 11:27:21 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NBRLQu079502; Thu, 23 Apr 2015 11:27:21 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504231127.t3NBRLQu079502@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 23 Apr 2015 11:27:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281883 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 11:27:21 -0000 Author: kib Date: Thu Apr 23 11:27:21 2015 New Revision: 281883 URL: https://svnweb.freebsd.org/changeset/base/281883 Log: Handle incorrect ELF images specifying size for PT_GNU_STACK not being multiple of page size. Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/sys/kern/kern_exec.c Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Thu Apr 23 08:41:50 2015 (r281882) +++ head/sys/kern/kern_exec.c Thu Apr 23 11:27:21 2015 (r281883) @@ -1060,7 +1060,7 @@ exec_new_vmspace(imgp, sv) /* Allocate a new stack */ if (imgp->stack_sz != 0) { - ssiz = imgp->stack_sz; + ssiz = trunc_page(imgp->stack_sz); PROC_LOCK(p); lim_rlimit(p, RLIMIT_STACK, &rlim_stack); PROC_UNLOCK(p); From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 12:25:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 176FABFF for ; Thu, 23 Apr 2015 12:25:36 +0000 (UTC) Received: from nm17-vm4.bullet.mail.gq1.yahoo.com (nm17-vm4.bullet.mail.gq1.yahoo.com [98.137.177.228]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D922C15CE for ; Thu, 23 Apr 2015 12:25:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1429791551; bh=P/ucPUHh0dgHJKfDY3+oSMBpvM8D2PuwoYJ5/R2DSW4=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject; b=fphf/3hunUwhcrgE/gTxDPVRWCZZfJSfm8/rNUwp/8A0P7P6bPptK/gSluHu0hgUHQ9jk5VGAM0iL6SaF42HvqKqcCiHRODSzDCBh/m2oUrwz5PLOkzI87t+TphZdKtVlbYiLRdpm5iHrnQqDPsPQAkobTfQ66sOMan3tLDD4juCUbJYUpnolR1POLuVOj10WCpgOo7uyUnO0F2Rrnhulfvuw6tNx4QPixjcXT4YkxjPWpDQdBunofZ+ovR5mtO5aOV2Vo1Tfl6hS740IXUVN5zRlXufzjFEme8UJzmSd1YYHjCZIuObAJA/EsIGr0TJFNlwetxs3HxolqzxRMKkmA== Received: from [98.137.12.190] by nm17.bullet.mail.gq1.yahoo.com with NNFMP; 23 Apr 2015 12:19:11 -0000 Received: from [208.71.42.197] by tm11.bullet.mail.gq1.yahoo.com with NNFMP; 23 Apr 2015 12:19:11 -0000 Received: from [127.0.0.1] by smtp208.mail.gq1.yahoo.com with NNFMP; 23 Apr 2015 12:19:11 -0000 X-Yahoo-Newman-Id: 536258.72180.bm@smtp208.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: mzDE.yAVM1mb.QlFcdQgncUZTt3Mq3j0rmrnjp8fDV9GR1X wrfFohfa6ySPlrsmnYtM3bMiknS41KqXAVlRKyasIvE3M5j3GXbunltg6pTb owa_1gTAb9aTNtDuod0Wzcp8kSegluHVSsx1zzjzTGOY_u5NTBktDuFCCmqD IwqIycAh7mo0QC6n2w5VdTW29t.pQyGQuTlJazXDXmsPJYUAy0m4J88C.PyH 32bEgSd0yH_uNUyDqQZ0jlm6F1D5vFcZkVGmrx7Z289sgkRrKwIC98oOybz6 zRNC4wUeUf7vFJvlN8AaViEpCgN5TQcBvGLCZzIs8rvRzFr8FqoypzWXQMPD j63Y9Vifviai2DUKyuzg8J5UoE1qItKasYL6wvKvIaod2p7hH5Gv23kJ4sB1 OdppQDVrZnfhqNJxOrzhXorP.5IQXCxBaW.8798gnUk_joslJ4u398ZByqGE B_o.dVnNrwJ.2UItgH9hn.IGofhLZuxUZHKXQykj5yEuFoGeOAkbRQ4DPSOI q9m7kNyKKxZ6ghmqbhQcsnsr1XRDQRjqYpIkIAPS0 X-Yahoo-SMTP: clhABp.swBB7fs.LwIJpv3jkWgo2NU8- Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r281451 - head/sys/vm From: Scott Long In-Reply-To: <201504120621.t3C6LxAV095209@svn.freebsd.org> Date: Thu, 23 Apr 2015 06:19:10 -0600 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <5B48434B-EA97-45B3-BC4E-B039A868186B@yahoo.com> References: <201504120621.t3C6LxAV095209@svn.freebsd.org> To: Dmitry Chagin X-Mailer: Apple Mail (2.2070.6) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 12:25:36 -0000 > On Apr 12, 2015, at 12:21 AM, Dmitry Chagin = wrote: >=20 > Author: dchagin > Date: Sun Apr 12 06:21:58 2015 > New Revision: 281451 > URL: https://svnweb.freebsd.org/changeset/base/281451 >=20 > Log: > Rework r281162. Indeed, the flexible array member is preferable here. >=20 > Suggested by: Justin T. Gibbs >=20 > MFC after: 3 days >=20 > Modified: > head/sys/vm/uma_core.c > head/sys/vm/uma_int.h There=E2=80=99s still something wrong with this. I have a machine with = 28 cores (56 with hyperthreading) and 256GB of RAM, and ever since you = committed r281162, it panics early in boot with a failed assertion. It = looks like the first few members of a uma_slab_t are getting overwritten = accidentally, and somehow the padding of the extra member in the = uma_zone_t was previously protecting it. I don=E2=80=99t know the exact = cause yet, but I must ask that you revert to r281161 in HEAD and = stable/10 until the problem is resolved. Thanks, Scott From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 13:10:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3806B6AC; Thu, 23 Apr 2015 13:10:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 268BC1ADA; Thu, 23 Apr 2015 13:10:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NDA4mN055207; Thu, 23 Apr 2015 13:10:04 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NDA4JE055206; Thu, 23 Apr 2015 13:10:04 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201504231310.t3NDA4JE055206@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 23 Apr 2015 13:10:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281884 - head/lib/libc/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 13:10:04 -0000 Author: tuexen Date: Thu Apr 23 13:10:03 2015 New Revision: 281884 URL: https://svnweb.freebsd.org/changeset/base/281884 Log: A complete user message is signalled with the MSG_EOR flag, not the MSG_EOF flag. Thanks to Valentin Nechayev for reporting the issue. MFC after: 1 week Modified: head/lib/libc/net/sctp_recvmsg.3 Modified: head/lib/libc/net/sctp_recvmsg.3 ============================================================================== --- head/lib/libc/net/sctp_recvmsg.3 Thu Apr 23 11:27:21 2015 (r281883) +++ head/lib/libc/net/sctp_recvmsg.3 Thu Apr 23 13:10:03 2015 (r281884) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 13, 2007 +.Dd April 23, 2015 .Dt SCTP_RECVMSG 3 .Os .Sh NAME @@ -98,13 +98,13 @@ receive buffer, then the argument will .Em not have the -.Dv MSG_EOF +.Dv MSG_EOR flag applied. If the message is a complete message then the .Fa flags argument will have -.Dv MSG_EOF +.Dv MSG_EOR set. Locally detected errors are indicated by a return value of -1 with From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 13:19:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 37F8B9B0; Thu, 23 Apr 2015 13:19:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 268C01B79; Thu, 23 Apr 2015 13:19:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NDJ1FC060061; Thu, 23 Apr 2015 13:19:01 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NDJ1tW060060; Thu, 23 Apr 2015 13:19:01 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504231319.t3NDJ1tW060060@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 23 Apr 2015 13:19:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281885 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 13:19:01 -0000 Author: glebius Date: Thu Apr 23 13:19:00 2015 New Revision: 281885 URL: https://svnweb.freebsd.org/changeset/base/281885 Log: Don't propagate SIOCSIFCAPS from a vlan(4) to its parent. This leads to quite unexpected result of toggling capabilities on the neighbour vlan(4) interfaces. Reviewed by: melifaro, np Differential Revision: https://reviews.freebsd.org/D2310 Sponsored by: Nginx, Inc. Modified: head/sys/net/if_vlan.c Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Thu Apr 23 13:10:03 2015 (r281884) +++ head/sys/net/if_vlan.c Thu Apr 23 13:19:00 2015 (r281885) @@ -1705,27 +1705,6 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd } break; - case SIOCSIFCAP: - VLAN_LOCK(); - if (TRUNK(ifv) != NULL) { - p = PARENT(ifv); - VLAN_UNLOCK(); - if ((p->if_type != IFT_ETHER) && - (ifr->ifr_reqcap & IFCAP_VLAN_HWTAGGING) == 0) { - error = EINVAL; - break; - } - error = (*p->if_ioctl)(p, cmd, data); - if (error) - break; - /* Propogate vlan interface capabilities */ - vlan_trunk_capabilities(p); - } else { - VLAN_UNLOCK(); - error = EINVAL; - } - break; - default: error = EINVAL; break; From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 14:02:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA97BF3F; Thu, 23 Apr 2015 14:02:35 +0000 (UTC) Received: from bigwig.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 B629C1123; Thu, 23 Apr 2015 14:02:35 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 10BE9B923; Thu, 23 Apr 2015 10:02:34 -0400 (EDT) From: John Baldwin To: Gleb Smirnoff Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281885 - head/sys/net Date: Thu, 23 Apr 2015 10:02:19 -0400 Message-ID: <1643843.xLCHLSf0Gm@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <201504231319.t3NDJ1tW060060@svn.freebsd.org> References: <201504231319.t3NDJ1tW060060@svn.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.2.7 (bigwig.baldwin.cx); Thu, 23 Apr 2015 10:02:34 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 14:02:36 -0000 On Thursday, April 23, 2015 01:19:01 PM Gleb Smirnoff wrote: > Author: glebius > Date: Thu Apr 23 13:19:00 2015 > New Revision: 281885 > URL: https://svnweb.freebsd.org/changeset/base/281885 > > Log: > Don't propagate SIOCSIFCAPS from a vlan(4) to its parent. This leads to > quite unexpected result of toggling capabilities on the neighbour vlan(4) > interfaces. > > Reviewed by: melifaro, np > Differential Revision: https://reviews.freebsd.org/D2310 > Sponsored by: Nginx, Inc. Can you look at https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194855 or grab it? It seems to be closely related. I'm not sure if it is useful to allow vlans to use independent MTUs. It does not seem to make sense for a VLAN to have a larger MTU than the trunk though (perhaps the other direction can make sense, but maybe we should let a VLAN's MTU track the trunk unless the VLAN's MTU is set explicitly?) -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 14:04:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7EBF922C; Thu, 23 Apr 2015 14:04:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5FBE01150; Thu, 23 Apr 2015 14:04:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NE4YQe085810; Thu, 23 Apr 2015 14:04:34 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NE4XSu085800; Thu, 23 Apr 2015 14:04:33 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504231404.t3NE4XSu085800@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 23 Apr 2015 14:04:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281886 - in head: lib/libstand sys/boot/libstand32 sys/boot/userboot/libstand X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 14:04:34 -0000 Author: emaste Date: Thu Apr 23 14:04:33 2015 New Revision: 281886 URL: https://svnweb.freebsd.org/changeset/base/281886 Log: Reduce diffs between the three copies of libstand's Makefile This should be a non-functional change. A future change should address the functional differences between these three and converge on a single source. Differential Revision: https://reviews.freebsd.org/D2058 Reviewed by: jhb Sponsored by: The FreeBSD Foundation Modified: head/lib/libstand/Makefile head/sys/boot/libstand32/Makefile head/sys/boot/userboot/libstand/Makefile Modified: head/lib/libstand/Makefile ============================================================================== --- head/lib/libstand/Makefile Thu Apr 23 13:19:00 2015 (r281885) +++ head/lib/libstand/Makefile Thu Apr 23 14:04:33 2015 (r281886) @@ -11,6 +11,9 @@ MK_SSP= no .include +LIBSTAND_SRC= ${.CURDIR} +LIBC_SRC= ${LIBSTAND_SRC}/../libc + LIB= stand NO_PIC= INCS= stand.h @@ -19,7 +22,7 @@ MAN= libstand.3 WARNS?= 0 CFLAGS+= -ffreestanding -Wformat -CFLAGS+= -I${.CURDIR} +CFLAGS+= -I${LIBSTAND_SRC} .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float @@ -54,54 +57,54 @@ SRCS+= gzguts.h zutil.h __main.c assert. # private (pruned) versions of libc string functions SRCS+= strcasecmp.c -.PATH: ${.CURDIR}/../libc/net +.PATH: ${LIBC_SRC}/net SRCS+= ntoh.c # string functions from libc -.PATH: ${.CURDIR}/../libc/string +.PATH: ${LIBC_SRC}/string SRCS+= bcmp.c bcopy.c bzero.c ffs.c memccpy.c memchr.c memcmp.c memcpy.c \ memmove.c memset.c qdivrem.c strcat.c strchr.c strcmp.c strcpy.c \ strcspn.c strlen.c strncat.c strncmp.c strncpy.c strpbrk.c \ strrchr.c strsep.c strspn.c strstr.c strtok.c swab.c .if ${MACHINE_CPUARCH} == "arm" -.PATH: ${.CURDIR}/../libc/arm/gen +.PATH: ${LIBC_SRC}/arm/gen # Compiler support functions -.PATH: ${.CURDIR}/../../contrib/compiler-rt/lib/builtins/ +.PATH: ${LIBSTAND_SRC}/../../contrib/compiler-rt/lib/builtins/ # __clzsi2 and ctzsi2 for various builtin functions SRCS+= clzsi2.c ctzsi2.c # Divide and modulus functions called by the compiler SRCS+= divmoddi4.c divmodsi4.c divdi3.c divsi3.c moddi3.c modsi3.c SRCS+= udivmoddi4.c udivmodsi4.c udivdi3.c udivsi3.c umoddi3.c umodsi3.c -.PATH: ${.CURDIR}/../../contrib/compiler-rt/lib/builtins/arm/ +.PATH: ${LIBSTAND_SRC}/../../contrib/compiler-rt/lib/builtins/arm/ SRCS+= aeabi_idivmod.S aeabi_ldivmod.S aeabi_uidivmod.S aeabi_uldivmod.S SRCS+= aeabi_memcmp.S aeabi_memcpy.S aeabi_memmove.S aeabi_memset.S .endif .if ${MACHINE_CPUARCH} == "aarch64" -.PATH: ${.CURDIR}/../libc/aarch64/gen +.PATH: ${LIBC_SRC}/aarch64/gen .endif .if ${MACHINE_CPUARCH} == "powerpc" -.PATH: ${.CURDIR}/../libc/quad +.PATH: ${LIBC_SRC}/quad SRCS+= ashldi3.c ashrdi3.c SRCS+= syncicache.c .endif # uuid functions from libc -.PATH: ${.CURDIR}/../libc/uuid +.PATH: ${LIBC_SRC}/uuid SRCS+= uuid_equal.c uuid_is_nil.c # _setjmp/_longjmp -.PATH: ${.CURDIR}/${MACHINE_CPUARCH} +.PATH: ${LIBSTAND_SRC}/${MACHINE_CPUARCH} SRCS+= _setjmp.S # decompression functionality from libbz2 # NOTE: to actually test this functionality after libbz2 upgrade compile # loader(8) with LOADER_BZIP2_SUPPORT defined -.PATH: ${.CURDIR}/../../contrib/bzip2 +.PATH: ${LIBSTAND_SRC}/../../contrib/bzip2 CFLAGS+= -DBZ_NO_STDIO -DBZ_NO_COMPRESS SRCS+= libstand_bzlib_private.h @@ -110,7 +113,8 @@ SRCS+= _${file} CLEANFILES+= _${file} _${file}: ${file} - sed "s|bzlib_private\.h|libstand_bzlib_private.h|" ${.ALLSRC} > ${.TARGET} + sed "s|bzlib_private\.h|libstand_bzlib_private.h|" \ + ${.ALLSRC} > ${.TARGET} .endfor CLEANFILES+= libstand_bzlib_private.h @@ -119,8 +123,8 @@ libstand_bzlib_private.h: bzlib_private. ${.ALLSRC} > ${.TARGET} # decompression functionality from libz -.PATH: ${.CURDIR}/../libz -CFLAGS+=-DHAVE_MEMCPY -I${.CURDIR}/../libz +.PATH: ${LIBSTAND_SRC}/../libz +CFLAGS+=-DHAVE_MEMCPY -I${LIBSTAND_SRC}/../libz SRCS+= adler32.c crc32.c libstand_zutil.h libstand_gzguts.h .for file in infback.c inffast.c inflate.c inftrees.c zutil.c @@ -165,4 +169,3 @@ SRCS+= nandfs.c .endif .include - Modified: head/sys/boot/libstand32/Makefile ============================================================================== --- head/sys/boot/libstand32/Makefile Thu Apr 23 13:19:00 2015 (r281885) +++ head/sys/boot/libstand32/Makefile Thu Apr 23 14:04:33 2015 (r281886) @@ -11,9 +11,10 @@ MAN= .include MK_SSP= no -S= ${.CURDIR}/../../../lib/libstand +LIBSTAND_SRC= ${.CURDIR}/../../../lib/libstand +LIBC_SRC= ${LIBSTAND_SRC}/../libc -.PATH: ${S} +.PATH: ${LIBSTAND_SRC} LIB= stand INTERNALLIB= MK_PROFILE= no @@ -22,7 +23,7 @@ NO_PIC= WARNS?= 0 CFLAGS+= -ffreestanding -Wformat -CFLAGS+= -I${S} +CFLAGS+= -I${LIBSTAND_SRC} .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" CFLAGS.gcc+= -mpreferred-stack-boundary=2 @@ -52,56 +53,54 @@ SRCS+= gzguts.h zutil.h __main.c assert. # private (pruned) versions of libc string functions SRCS+= strcasecmp.c -LIBC= ${S}/../libc - -.PATH: ${LIBC}/net +.PATH: ${LIBC_SRC}/net SRCS+= ntoh.c # string functions from libc -.PATH: ${LIBC}/string +.PATH: ${LIBC_SRC}/string SRCS+= bcmp.c bcopy.c bzero.c ffs.c memccpy.c memchr.c memcmp.c memcpy.c \ memmove.c memset.c qdivrem.c strcat.c strchr.c strcmp.c strcpy.c \ strcspn.c strlen.c strncat.c strncmp.c strncpy.c strpbrk.c \ strrchr.c strsep.c strspn.c strstr.c strtok.c swab.c .if ${MACHINE_CPUARCH} == "arm" -.PATH: ${LIBC}/arm/gen +.PATH: ${LIBC_SRC}/arm/gen # Compiler support functions -.PATH: ${.CURDIR}/../../../contrib/compiler-rt/lib/builtins/ +.PATH: ${LIBSTAND_SRC}/../../contrib/compiler-rt/lib/builtins/ # __clzsi2 and ctzsi2 for various builtin functions SRCS+= clzsi2.c ctzsi2.c # Divide and modulus functions called by the compiler SRCS+= divmoddi4.c divmodsi4.c divdi3.c divsi3.c moddi3.c modsi3.c SRCS+= udivmoddi4.c udivmodsi4.c udivdi3.c udivsi3.c umoddi3.c umodsi3.c -.PATH: ${.CURDIR}/../../../contrib/compiler-rt/lib/builtins/arm/ +.PATH: ${LIBSTAND_SRC}/../../contrib/compiler-rt/lib/builtins/arm/ SRCS+= aeabi_idivmod.S aeabi_ldivmod.S aeabi_uidivmod.S aeabi_uldivmod.S SRCS+= aeabi_memcmp.S aeabi_memcpy.S aeabi_memmove.S aeabi_memset.S .endif .if ${MACHINE_CPUARCH} == "powerpc" -.PATH: ${LIBC}/quad +.PATH: ${LIBC_SRC}/quad SRCS+= ashldi3.c ashrdi3.c SRCS+= syncicache.c .endif # uuid functions from libc -.PATH: ${LIBC}/uuid +.PATH: ${LIBC_SRC}/uuid SRCS+= uuid_equal.c uuid_is_nil.c # _setjmp/_longjmp .if ${MACHINE_CPUARCH} == "amd64" -.PATH: ${S}/i386 +.PATH: ${LIBSTAND_SRC}/i386 .else -.PATH: ${S}/${MACHINE_CPUARCH} +.PATH: ${LIBSTAND_SRC}/${MACHINE_CPUARCH} .endif SRCS+= _setjmp.S # decompression functionality from libbz2 # NOTE: to actually test this functionality after libbz2 upgrade compile # loader(8) with LOADER_BZIP2_SUPPORT defined -.PATH: ${.CURDIR}/../../../contrib/bzip2 +.PATH: ${LIBSTAND_SRC}/../../contrib/bzip2 CFLAGS+= -DBZ_NO_STDIO -DBZ_NO_COMPRESS SRCS+= libstand_bzlib_private.h @@ -110,7 +109,8 @@ SRCS+= _${file} CLEANFILES+= _${file} _${file}: ${file} - sed "s|bzlib_private\.h|libstand_bzlib_private.h|" ${.ALLSRC} > ${.TARGET} + sed "s|bzlib_private\.h|libstand_bzlib_private.h|" \ + ${.ALLSRC} > ${.TARGET} .endfor CLEANFILES+= libstand_bzlib_private.h @@ -119,8 +119,8 @@ libstand_bzlib_private.h: bzlib_private. ${.ALLSRC} > ${.TARGET} # decompression functionality from libz -.PATH: ${S}/../libz -CFLAGS+=-DHAVE_MEMCPY -I${S}/../libz +.PATH: ${LIBSTAND_SRC}/../libz +CFLAGS+=-DHAVE_MEMCPY -I${LIBSTAND_SRC}/../libz SRCS+= adler32.c crc32.c libstand_zutil.h libstand_gzguts.h .for file in infback.c inffast.c inflate.c inftrees.c zutil.c Modified: head/sys/boot/userboot/libstand/Makefile ============================================================================== --- head/sys/boot/userboot/libstand/Makefile Thu Apr 23 13:19:00 2015 (r281885) +++ head/sys/boot/userboot/libstand/Makefile Thu Apr 23 14:04:33 2015 (r281886) @@ -11,9 +11,10 @@ MAN= .include MK_SSP= no -S= ${.CURDIR}/../../../../lib/libstand +LIBSTAND_SRC= ${.CURDIR}/../../../../lib/libstand +LIBC_SRC= ${LIBSTAND_SRC}/../libc -.PATH: ${S} +.PATH: ${LIBSTAND_SRC} LIB= stand INTERNALLIB= MK_PROFILE= no @@ -22,7 +23,7 @@ NO_PIC= WARNS?= 0 CFLAGS+= -ffreestanding -Wformat -fPIC -CFLAGS+= -I${.CURDIR}/../../../../lib/libstand +CFLAGS+= -I${LIBSTAND_SRC} .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 @@ -49,14 +50,12 @@ SRCS+= gzguts.h zutil.h __main.c assert. # private (pruned) versions of libc string functions SRCS+= strcasecmp.c -LIBC= ${.CURDIR}/../../../../lib/libc - -.PATH: ${LIBC}/net +.PATH: ${LIBC_SRC}/net SRCS+= ntoh.c # string functions from libc -.PATH: ${LIBC}/string +.PATH: ${LIBC_SRC}/string .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "powerpc" || \ ${MACHINE_CPUARCH} == "sparc64" || ${MACHINE_CPUARCH} == "amd64" || \ ${MACHINE_CPUARCH} == "arm" @@ -66,34 +65,34 @@ SRCS+= bcmp.c bcopy.c bzero.c ffs.c memc strrchr.c strsep.c strspn.c strstr.c strtok.c swab.c .endif .if ${MACHINE_CPUARCH} == "arm" -.PATH: ${LIBC}/arm/gen +.PATH: ${LIBC_SRC}/arm/gen SRCS+= divsi3.S .endif .if ${MACHINE_CPUARCH} == "powerpc" -.PATH: ${LIBC}/libc/quad +.PATH: ${LIBC_SRC}/quad SRCS+= ashldi3.c ashrdi3.c -.PATH: ${LIBC}/powerpc/gen +.PATH: ${LIBC_SRC}/powerpc/gen SRCS+= syncicache.c .endif # uuid functions from libc -.PATH: ${LIBC}/uuid +.PATH: ${LIBC_SRC}/uuid SRCS+= uuid_equal.c uuid_is_nil.c # _setjmp/_longjmp .if ${MACHINE_CPUARCH} == "amd64" -.PATH: ${S}/amd64 +.PATH: ${LIBSTAND_SRC}/amd64 .elif ${MACHINE_ARCH} == "powerpc64" -.PATH: ${S}/powerpc +.PATH: ${LIBSTAND_SRC}/powerpc .else -.PATH: ${S}/${MACHINE_CPUARCH} +.PATH: ${LIBSTAND_SRC}/${MACHINE_CPUARCH} .endif SRCS+= _setjmp.S # decompression functionality from libbz2 # NOTE: to actually test this functionality after libbz2 upgrade compile # loader(8) with LOADER_BZIP2_SUPPORT defined -.PATH: ${.CURDIR}/../../../../contrib/bzip2 +.PATH: ${LIBSTAND_SRC}/../../contrib/bzip2 CFLAGS+= -DBZ_NO_STDIO -DBZ_NO_COMPRESS SRCS+= libstand_bzlib_private.h @@ -102,7 +101,8 @@ SRCS+= _${file} CLEANFILES+= _${file} _${file}: ${file} - sed "s|bzlib_private\.h|libstand_bzlib_private.h|" ${.ALLSRC} > ${.TARGET} + sed "s|bzlib_private\.h|libstand_bzlib_private.h|" \ + ${.ALLSRC} > ${.TARGET} .endfor CLEANFILES+= libstand_bzlib_private.h @@ -111,8 +111,8 @@ libstand_bzlib_private.h: bzlib_private. ${.ALLSRC} > ${.TARGET} # decompression functionality from libz -.PATH: ${.CURDIR}/../../../../lib/libz -CFLAGS+=-DHAVE_MEMCPY -I${.CURDIR}/../../../../lib/libz +.PATH: ${LIBSTAND_SRC}/../libz +CFLAGS+=-DHAVE_MEMCPY -I${LIBSTAND_SRC}/../libz SRCS+= adler32.c crc32.c libstand_zutil.h libstand_gzguts.h .for file in infback.c inffast.c inflate.c inftrees.c zutil.c @@ -121,7 +121,8 @@ CLEANFILES+= _${file} _${file}: ${file} sed -e "s|zutil\.h|libstand_zutil.h|" \ - -e "s|gzguts\.h|libstand_gzguts.h|" ${.ALLSRC} > ${.TARGET} + -e "s|gzguts\.h|libstand_gzguts.h|" \ + ${.ALLSRC} > ${.TARGET} .endfor # depend on stand.h being able to be included multiple times From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 14:22:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE854862; Thu, 23 Apr 2015 14:22:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D91801475; Thu, 23 Apr 2015 14:22:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NEManc095689; Thu, 23 Apr 2015 14:22:36 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NEML80095575; Thu, 23 Apr 2015 14:22:21 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504231422.t3NEML80095575@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 23 Apr 2015 14:22:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281887 - in head: lib/libc/gen lib/libc/include lib/libc/stdio lib/libc/sys share/man/man9 sys/amd64/include sys/boot/i386/common sys/dev/pci sys/i386/include sys/sys sys/vm sys/x86/ac... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 14:22:37 -0000 Author: jhb Date: Thu Apr 23 14:22:20 2015 New Revision: 281887 URL: https://svnweb.freebsd.org/changeset/base/281887 Log: Reassign copyright statements on several files from Advanced Computing Technologies LLC to Hudson River Trading LLC. Approved by: Hudson River Trading LLC (who owns ACT LLC) MFC after: 1 week Modified: head/lib/libc/gen/_once_stub.c head/lib/libc/include/compat.h head/lib/libc/stdio/open_memstream.3 head/lib/libc/stdio/open_memstream.c head/lib/libc/stdio/open_wmemstream.c head/lib/libc/sys/closefrom.2 head/lib/libc/sys/procctl.2 head/share/man/man9/BUS_BIND_INTR.9 head/share/man/man9/BUS_CHILD_DELETED.9 head/share/man/man9/BUS_CHILD_DETACHED.9 head/share/man/man9/BUS_DESCRIBE_INTR.9 head/share/man/man9/BUS_NEW_PASS.9 head/share/man/man9/VOP_ADVISE.9 head/share/man/man9/VOP_ALLOCATE.9 head/share/man/man9/bus_adjust_resource.9 head/share/man/man9/bus_generic_new_pass.9 head/share/man/man9/bus_set_pass.9 head/share/man/man9/getenv.9 head/share/man/man9/refcount.9 head/share/man/man9/sglist.9 head/share/man/man9/shm_map.9 head/sys/amd64/include/vm.h head/sys/boot/i386/common/edd.h head/sys/dev/pci/pci_subr.c head/sys/i386/include/vm.h head/sys/sys/procctl.h head/sys/vm/sg_pager.c head/sys/x86/acpica/srat.c head/sys/x86/include/mca.h head/sys/x86/pci/qpi.c head/sys/x86/x86/mca.c head/tools/regression/file/closefrom/closefrom.c head/tools/regression/lib/libc/stdio/test-open_memstream.c head/tools/regression/lib/libc/stdio/test-open_wmemstream.c head/tools/regression/netinet/arphold/arphold.c head/tools/tools/tscdrift/tscdrift.c head/usr.bin/perror/perror.1 head/usr.bin/perror/perror.c head/usr.bin/procstat/procstat_rusage.c head/usr.bin/protect/protect.1 head/usr.bin/protect/protect.c head/usr.sbin/bhyve/ioapic.c head/usr.sbin/bhyve/ioapic.h head/usr.sbin/bhyve/pci_irq.c head/usr.sbin/bhyve/pci_irq.h head/usr.sbin/bhyve/pm.c head/usr.sbin/etcupdate/etcupdate.8 head/usr.sbin/etcupdate/etcupdate.sh head/usr.sbin/etcupdate/tests/always_test.sh head/usr.sbin/etcupdate/tests/conflicts_test.sh head/usr.sbin/etcupdate/tests/fbsdid_test.sh head/usr.sbin/etcupdate/tests/ignore_test.sh head/usr.sbin/etcupdate/tests/preworld_test.sh head/usr.sbin/etcupdate/tests/tests_test.sh head/usr.sbin/etcupdate/tests/tzsetup_test.sh head/usr.sbin/pciconf/err.c Modified: head/lib/libc/gen/_once_stub.c ============================================================================== --- head/lib/libc/gen/_once_stub.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/lib/libc/gen/_once_stub.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/lib/libc/include/compat.h ============================================================================== --- head/lib/libc/include/compat.h Thu Apr 23 14:04:33 2015 (r281886) +++ head/lib/libc/include/compat.h Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/lib/libc/stdio/open_memstream.3 ============================================================================== --- head/lib/libc/stdio/open_memstream.3 Thu Apr 23 14:04:33 2015 (r281886) +++ head/lib/libc/stdio/open_memstream.3 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013 Advanced Computing Technologies LLC +.\" Copyright (c) 2013 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/lib/libc/stdio/open_memstream.c ============================================================================== --- head/lib/libc/stdio/open_memstream.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/lib/libc/stdio/open_memstream.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/lib/libc/stdio/open_wmemstream.c ============================================================================== --- head/lib/libc/stdio/open_wmemstream.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/lib/libc/stdio/open_wmemstream.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/lib/libc/sys/closefrom.2 ============================================================================== --- head/lib/libc/sys/closefrom.2 Thu Apr 23 14:04:33 2015 (r281886) +++ head/lib/libc/sys/closefrom.2 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/lib/libc/sys/procctl.2 ============================================================================== --- head/lib/libc/sys/procctl.2 Thu Apr 23 14:04:33 2015 (r281886) +++ head/lib/libc/sys/procctl.2 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013 Advanced Computing Technologies LLC +.\" Copyright (c) 2013 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/share/man/man9/BUS_BIND_INTR.9 ============================================================================== --- head/share/man/man9/BUS_BIND_INTR.9 Thu Apr 23 14:04:33 2015 (r281886) +++ head/share/man/man9/BUS_BIND_INTR.9 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/share/man/man9/BUS_CHILD_DELETED.9 ============================================================================== --- head/share/man/man9/BUS_CHILD_DELETED.9 Thu Apr 23 14:04:33 2015 (r281886) +++ head/share/man/man9/BUS_CHILD_DELETED.9 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2012 Advanced Computing Technologies LLC +.\" Copyright (c) 2012 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/share/man/man9/BUS_CHILD_DETACHED.9 ============================================================================== --- head/share/man/man9/BUS_CHILD_DETACHED.9 Thu Apr 23 14:04:33 2015 (r281886) +++ head/share/man/man9/BUS_CHILD_DETACHED.9 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2012 Advanced Computing Technologies LLC +.\" Copyright (c) 2012 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/share/man/man9/BUS_DESCRIBE_INTR.9 ============================================================================== --- head/share/man/man9/BUS_DESCRIBE_INTR.9 Thu Apr 23 14:04:33 2015 (r281886) +++ head/share/man/man9/BUS_DESCRIBE_INTR.9 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/share/man/man9/BUS_NEW_PASS.9 ============================================================================== --- head/share/man/man9/BUS_NEW_PASS.9 Thu Apr 23 14:04:33 2015 (r281886) +++ head/share/man/man9/BUS_NEW_PASS.9 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/share/man/man9/VOP_ADVISE.9 ============================================================================== --- head/share/man/man9/VOP_ADVISE.9 Thu Apr 23 14:04:33 2015 (r281886) +++ head/share/man/man9/VOP_ADVISE.9 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2013 Advanced Computing Technologies LLC +.\" Copyright (c) 2013 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/share/man/man9/VOP_ALLOCATE.9 ============================================================================== --- head/share/man/man9/VOP_ALLOCATE.9 Thu Apr 23 14:04:33 2015 (r281886) +++ head/share/man/man9/VOP_ALLOCATE.9 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2013 Advanced Computing Technologies LLC +.\" Copyright (c) 2013 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/share/man/man9/bus_adjust_resource.9 ============================================================================== --- head/share/man/man9/bus_adjust_resource.9 Thu Apr 23 14:04:33 2015 (r281886) +++ head/share/man/man9/bus_adjust_resource.9 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2011 Advanced Computing Technologies LLC +.\" Copyright (c) 2011 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/share/man/man9/bus_generic_new_pass.9 ============================================================================== --- head/share/man/man9/bus_generic_new_pass.9 Thu Apr 23 14:04:33 2015 (r281886) +++ head/share/man/man9/bus_generic_new_pass.9 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/share/man/man9/bus_set_pass.9 ============================================================================== --- head/share/man/man9/bus_set_pass.9 Thu Apr 23 14:04:33 2015 (r281886) +++ head/share/man/man9/bus_set_pass.9 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/share/man/man9/getenv.9 ============================================================================== --- head/share/man/man9/getenv.9 Thu Apr 23 14:04:33 2015 (r281886) +++ head/share/man/man9/getenv.9 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2013 Advanced Computing Technologies LLC +.\" Copyright (c) 2013 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/share/man/man9/refcount.9 ============================================================================== --- head/share/man/man9/refcount.9 Thu Apr 23 14:04:33 2015 (r281886) +++ head/share/man/man9/refcount.9 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/share/man/man9/sglist.9 ============================================================================== --- head/share/man/man9/sglist.9 Thu Apr 23 14:04:33 2015 (r281886) +++ head/share/man/man9/sglist.9 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/share/man/man9/shm_map.9 ============================================================================== --- head/share/man/man9/shm_map.9 Thu Apr 23 14:04:33 2015 (r281886) +++ head/share/man/man9/shm_map.9 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2011 Advanced Computing Technologies LLC +.\" Copyright (c) 2011 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/sys/amd64/include/vm.h ============================================================================== --- head/sys/amd64/include/vm.h Thu Apr 23 14:04:33 2015 (r281886) +++ head/sys/amd64/include/vm.h Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/sys/boot/i386/common/edd.h ============================================================================== --- head/sys/boot/i386/common/edd.h Thu Apr 23 14:04:33 2015 (r281886) +++ head/sys/boot/i386/common/edd.h Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 Advanced Computing Technologies LLC + * Copyright (c) 2011 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/sys/dev/pci/pci_subr.c ============================================================================== --- head/sys/dev/pci/pci_subr.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/sys/dev/pci/pci_subr.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 Advanced Computing Technologies LLC + * Copyright (c) 2011 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/sys/i386/include/vm.h ============================================================================== --- head/sys/i386/include/vm.h Thu Apr 23 14:04:33 2015 (r281886) +++ head/sys/i386/include/vm.h Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/sys/sys/procctl.h ============================================================================== --- head/sys/sys/procctl.h Thu Apr 23 14:04:33 2015 (r281886) +++ head/sys/sys/procctl.h Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/sys/vm/sg_pager.c ============================================================================== --- head/sys/vm/sg_pager.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/sys/vm/sg_pager.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/sys/x86/acpica/srat.c ============================================================================== --- head/sys/x86/acpica/srat.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/sys/x86/acpica/srat.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2010 Advanced Computing Technologies LLC + * Copyright (c) 2010 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/sys/x86/include/mca.h ============================================================================== --- head/sys/x86/include/mca.h Thu Apr 23 14:04:33 2015 (r281886) +++ head/sys/x86/include/mca.h Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/sys/x86/pci/qpi.c ============================================================================== --- head/sys/x86/pci/qpi.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/sys/x86/pci/qpi.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2010 Advanced Computing Technologies LLC + * Copyright (c) 2010 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/sys/x86/x86/mca.c ============================================================================== --- head/sys/x86/x86/mca.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/sys/x86/x86/mca.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/tools/regression/file/closefrom/closefrom.c ============================================================================== --- head/tools/regression/file/closefrom/closefrom.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/tools/regression/file/closefrom/closefrom.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/tools/regression/lib/libc/stdio/test-open_memstream.c ============================================================================== --- head/tools/regression/lib/libc/stdio/test-open_memstream.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/tools/regression/lib/libc/stdio/test-open_memstream.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/tools/regression/lib/libc/stdio/test-open_wmemstream.c ============================================================================== --- head/tools/regression/lib/libc/stdio/test-open_wmemstream.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/tools/regression/lib/libc/stdio/test-open_wmemstream.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/tools/regression/netinet/arphold/arphold.c ============================================================================== --- head/tools/regression/netinet/arphold/arphold.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/tools/regression/netinet/arphold/arphold.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010 Advanced Computing Technologies LLC + * Copyright (c) 2010 Hudson River Trading LLC * Written by George Neville-Neil gnn@freebsd.org * All rights reserved. * Modified: head/tools/tools/tscdrift/tscdrift.c ============================================================================== --- head/tools/tools/tscdrift/tscdrift.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/tools/tools/tscdrift/tscdrift.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2014 Advanced Computing Technologies LLC + * Copyright (c) 2014 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/usr.bin/perror/perror.1 ============================================================================== --- head/usr.bin/perror/perror.1 Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.bin/perror/perror.1 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: George V. Neville-Neil .\" All rights reserved. .\" Modified: head/usr.bin/perror/perror.c ============================================================================== --- head/usr.bin/perror/perror.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.bin/perror/perror.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: George V. Neville-Neil * All rights reserved. * Modified: head/usr.bin/procstat/procstat_rusage.c ============================================================================== --- head/usr.bin/procstat/procstat_rusage.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.bin/procstat/procstat_rusage.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Advanced Computing Technologies LLC + * Copyright (c) 2012 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/usr.bin/protect/protect.1 ============================================================================== --- head/usr.bin/protect/protect.1 Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.bin/protect/protect.1 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013 Advanced Computing Technologies LLC +.\" Copyright (c) 2013 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/usr.bin/protect/protect.c ============================================================================== --- head/usr.bin/protect/protect.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.bin/protect/protect.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/usr.sbin/bhyve/ioapic.c ============================================================================== --- head/usr.sbin/bhyve/ioapic.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.sbin/bhyve/ioapic.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2014 Advanced Computing Technologies LLC + * Copyright (c) 2014 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/usr.sbin/bhyve/ioapic.h ============================================================================== --- head/usr.sbin/bhyve/ioapic.h Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.sbin/bhyve/ioapic.h Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2014 Advanced Computing Technologies LLC + * Copyright (c) 2014 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/usr.sbin/bhyve/pci_irq.c ============================================================================== --- head/usr.sbin/bhyve/pci_irq.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.sbin/bhyve/pci_irq.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2014 Advanced Computing Technologies LLC + * Copyright (c) 2014 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/usr.sbin/bhyve/pci_irq.h ============================================================================== --- head/usr.sbin/bhyve/pci_irq.h Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.sbin/bhyve/pci_irq.h Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2014 Advanced Computing Technologies LLC + * Copyright (c) 2014 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/usr.sbin/bhyve/pm.c ============================================================================== --- head/usr.sbin/bhyve/pm.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.sbin/bhyve/pm.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/usr.sbin/etcupdate/etcupdate.8 ============================================================================== --- head/usr.sbin/etcupdate/etcupdate.8 Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.sbin/etcupdate/etcupdate.8 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2010-2013 Advanced Computing Technologies LLC +.\" Copyright (c) 2010-2013 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/usr.sbin/etcupdate/etcupdate.sh ============================================================================== --- head/usr.sbin/etcupdate/etcupdate.sh Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.sbin/etcupdate/etcupdate.sh Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010-2013 Advanced Computing Technologies LLC +# Copyright (c) 2010-2013 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: head/usr.sbin/etcupdate/tests/always_test.sh ============================================================================== --- head/usr.sbin/etcupdate/tests/always_test.sh Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.sbin/etcupdate/tests/always_test.sh Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: head/usr.sbin/etcupdate/tests/conflicts_test.sh ============================================================================== --- head/usr.sbin/etcupdate/tests/conflicts_test.sh Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.sbin/etcupdate/tests/conflicts_test.sh Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: head/usr.sbin/etcupdate/tests/fbsdid_test.sh ============================================================================== --- head/usr.sbin/etcupdate/tests/fbsdid_test.sh Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.sbin/etcupdate/tests/fbsdid_test.sh Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: head/usr.sbin/etcupdate/tests/ignore_test.sh ============================================================================== --- head/usr.sbin/etcupdate/tests/ignore_test.sh Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.sbin/etcupdate/tests/ignore_test.sh Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: head/usr.sbin/etcupdate/tests/preworld_test.sh ============================================================================== --- head/usr.sbin/etcupdate/tests/preworld_test.sh Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.sbin/etcupdate/tests/preworld_test.sh Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2013 Advanced Computing Technologies LLC +# Copyright (c) 2013 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: head/usr.sbin/etcupdate/tests/tests_test.sh ============================================================================== --- head/usr.sbin/etcupdate/tests/tests_test.sh Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.sbin/etcupdate/tests/tests_test.sh Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: head/usr.sbin/etcupdate/tests/tzsetup_test.sh ============================================================================== --- head/usr.sbin/etcupdate/tests/tzsetup_test.sh Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.sbin/etcupdate/tests/tzsetup_test.sh Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2013 Advanced Computing Technologies LLC +# Copyright (c) 2013 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: head/usr.sbin/pciconf/err.c ============================================================================== --- head/usr.sbin/pciconf/err.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.sbin/pciconf/err.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Advanced Computing Technologies LLC + * Copyright (c) 2012 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 14:36:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 80301DBF; Thu, 23 Apr 2015 14:36:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6CF08161D; Thu, 23 Apr 2015 14:36:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NEa2AD001645; Thu, 23 Apr 2015 14:36:02 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NEa2Vp001643; Thu, 23 Apr 2015 14:36:02 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201504231436.t3NEa2Vp001643@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 23 Apr 2015 14:36:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281888 - head/usr.bin/nfsstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 14:36:02 -0000 Author: trasz Date: Thu Apr 23 14:36:01 2015 New Revision: 281888 URL: https://svnweb.freebsd.org/changeset/base/281888 Log: Remove oldnfs support from nfsstat(1). Reviewed by: rmacklem@ (earlier version) Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/nfsstat/nfsstat.1 head/usr.bin/nfsstat/nfsstat.c Modified: head/usr.bin/nfsstat/nfsstat.1 ============================================================================== --- head/usr.bin/nfsstat/nfsstat.1 Thu Apr 23 14:22:20 2015 (r281887) +++ head/usr.bin/nfsstat/nfsstat.1 Thu Apr 23 14:36:01 2015 (r281888) @@ -28,7 +28,7 @@ .\" From: @(#)nfsstat.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd May 1, 2013 +.Dd April 23, 2015 .Dt NFSSTAT 1 .Os .Sh NAME @@ -38,7 +38,7 @@ statistics .Sh SYNOPSIS .Nm -.Op Fl cemoszW +.Op Fl cemszW .Op Fl M Ar core .Op Fl N Ar system .Op Fl w Ar wait @@ -58,10 +58,8 @@ The options are as follows: .It Fl c Only display client side statistics. .It Fl e -Report the extra statistics collected by the new NFS client and +Report the extra statistics collected by the NFS client and server for NFSv4. -This option is incompatible with -.Fl o . .It Fl M Extract values associated with the name list from the specified core instead of the default @@ -75,10 +73,6 @@ This option is only supported by the new .It Fl N Extract the name list from the specified system instead of the default .Pa /boot/kernel/kernel . -.It Fl o -Report statistics for the old NFS client and/or server. -Without this -option statistics for the new NFS client and/or server will be reported. .It Fl s Only display server side statistics. .It Fl W Modified: head/usr.bin/nfsstat/nfsstat.c ============================================================================== --- head/usr.bin/nfsstat/nfsstat.c Thu Apr 23 14:22:20 2015 (r281887) +++ head/usr.bin/nfsstat/nfsstat.c Thu Apr 23 14:36:01 2015 (r281888) @@ -79,22 +79,19 @@ struct nlist nl[] = { }; kvm_t *kd; -static int deadkernel = 0; static int widemode = 0; static int zflag = 0; -static int run_v4 = 1; static int printtitle = 1; static struct ext_nfsstats ext_nfsstats; static int extra_output = 0; -void intpr(int, int); -void printhdr(int, int); -void sidewaysintpr(u_int, int, int); -void usage(void); -char *sperc1(int, int); -char *sperc2(int, int); -void exp_intpr(int, int); -void exp_sidewaysintpr(u_int, int, int); +static void intpr(int, int); +static void printhdr(int, int); +static void usage(void); +static char *sperc1(int, int); +static char *sperc2(int, int); +static void exp_intpr(int, int); +static void exp_sidewaysintpr(u_int, int, int); #define DELTA(field) (nfsstats.field - lastst.field) @@ -106,7 +103,6 @@ main(int argc, char **argv) int serverOnly = -1; int ch; char *memf, *nlistf; - char errbuf[_POSIX2_LINE_MAX]; int mntlen, i; char buf[1024]; struct statfs *mntbuf; @@ -114,7 +110,7 @@ main(int argc, char **argv) interval = 0; memf = nlistf = NULL; - while ((ch = getopt(argc, argv, "cesWM:mN:ow:z")) != -1) + while ((ch = getopt(argc, argv, "cesWM:mN:w:z")) != -1) switch(ch) { case 'M': memf = optarg; @@ -162,14 +158,7 @@ main(int argc, char **argv) case 'z': zflag = 1; break; - case 'o': - if (extra_output != 0) - err(1, "-o incompatible with -e"); - run_v4 = 0; - break; case 'e': - if (run_v4 == 0) - err(1, "-e incompatible with -o"); extra_output = 1; break; case '?': @@ -190,26 +179,11 @@ main(int argc, char **argv) } } #endif - if (run_v4 != 0 && modfind("nfscommon") < 0) - errx(1, "new client/server not loaded"); - - if (run_v4 == 0 && (nlistf != NULL || memf != NULL)) { - deadkernel = 1; - - if ((kd = kvm_openfiles(nlistf, memf, NULL, O_RDONLY, - errbuf)) == 0) { - errx(1, "kvm_openfiles: %s", errbuf); - } - if (kvm_nlist(kd, nl) != 0) { - errx(1, "kvm_nlist: can't get names"); - } - } + if (modfind("nfscommon") < 0) + errx(1, "NFS client/server not loaded"); if (interval) { - if (run_v4 > 0) - exp_sidewaysintpr(interval, clientOnly, serverOnly); - else - sidewaysintpr(interval, clientOnly, serverOnly); + exp_sidewaysintpr(interval, clientOnly, serverOnly); } else { if (extra_output != 0) exp_intpr(clientOnly, serverOnly); @@ -220,434 +194,160 @@ main(int argc, char **argv) } /* - * Read the nfs stats using sysctl(3) for live kernels, or kvm_read - * for dead ones. - */ -static void -readstats(struct nfsstats **stp, struct nfsrvstats **srvstp, int zero) -{ - union { - struct nfsstats client; - struct nfsrvstats server; - } zerostat; - size_t buflen; - - if (deadkernel) { - if (*stp != NULL && kvm_read(kd, (u_long)nl[N_NFSSTAT].n_value, - *stp, sizeof(struct nfsstats)) < 0) { - *stp = NULL; - } - if (*srvstp != NULL && kvm_read(kd, - (u_long)nl[N_NFSRVSTAT].n_value, *srvstp, - sizeof(struct nfsrvstats)) < 0) { - *srvstp = NULL; - } - } else { - if (zero) - bzero(&zerostat, sizeof(zerostat)); - buflen = sizeof(struct nfsrvstats); - if (*srvstp != NULL && sysctlbyname("vfs.nfsrv.nfsrvstats", - *srvstp, &buflen, zero ? &zerostat : NULL, - zero ? buflen : 0) < 0) { - if (errno != ENOENT) - err(1, "sysctl: vfs.nfsrv.nfsrvstats"); - *srvstp = NULL; - } - } -} - -/* * Print a description of the nfs stats. */ -void +static void intpr(int clientOnly, int serverOnly) { - struct nfsstats nfsstats, *nfsstatsp; - struct nfsrvstats nfsrvstats, *nfsrvstatsp; int nfssvc_flag; - if (run_v4 == 0) { - /* - * Only read the stats we are going to display to avoid zeroing - * stats the user didn't request. - */ - if (clientOnly) - nfsstatsp = &nfsstats; - else - nfsstatsp = NULL; - if (serverOnly) - nfsrvstatsp = &nfsrvstats; - else - nfsrvstatsp = NULL; - - readstats(&nfsstatsp, &nfsrvstatsp, zflag); - - if (clientOnly && !nfsstatsp) { - printf("Client not present!\n"); - clientOnly = 0; - } - } else { - nfssvc_flag = NFSSVC_GETSTATS; - if (zflag != 0) { - if (clientOnly != 0) - nfssvc_flag |= NFSSVC_ZEROCLTSTATS; - if (serverOnly != 0) - nfssvc_flag |= NFSSVC_ZEROSRVSTATS; - } - if (nfssvc(nfssvc_flag, &ext_nfsstats) < 0) - err(1, "Can't get stats"); + nfssvc_flag = NFSSVC_GETSTATS; + if (zflag != 0) { + if (clientOnly != 0) + nfssvc_flag |= NFSSVC_ZEROCLTSTATS; + if (serverOnly != 0) + nfssvc_flag |= NFSSVC_ZEROSRVSTATS; } + if (nfssvc(nfssvc_flag, &ext_nfsstats) < 0) + err(1, "Can't get stats"); if (clientOnly) { printf("Client Info:\n"); printf("Rpc Counts:\n"); printf("%9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s\n", "Getattr", "Setattr", "Lookup", "Readlink", "Read", "Write", "Create", "Remove"); - if (run_v4 == 0) - printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", - nfsstats.rpccnt[NFSPROC_GETATTR], - nfsstats.rpccnt[NFSPROC_SETATTR], - nfsstats.rpccnt[NFSPROC_LOOKUP], - nfsstats.rpccnt[NFSPROC_READLINK], - nfsstats.rpccnt[NFSPROC_READ], - nfsstats.rpccnt[NFSPROC_WRITE], - nfsstats.rpccnt[NFSPROC_CREATE], - nfsstats.rpccnt[NFSPROC_REMOVE]); - else - printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", - ext_nfsstats.rpccnt[NFSPROC_GETATTR], - ext_nfsstats.rpccnt[NFSPROC_SETATTR], - ext_nfsstats.rpccnt[NFSPROC_LOOKUP], - ext_nfsstats.rpccnt[NFSPROC_READLINK], - ext_nfsstats.rpccnt[NFSPROC_READ], - ext_nfsstats.rpccnt[NFSPROC_WRITE], - ext_nfsstats.rpccnt[NFSPROC_CREATE], - ext_nfsstats.rpccnt[NFSPROC_REMOVE]); + printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", + ext_nfsstats.rpccnt[NFSPROC_GETATTR], + ext_nfsstats.rpccnt[NFSPROC_SETATTR], + ext_nfsstats.rpccnt[NFSPROC_LOOKUP], + ext_nfsstats.rpccnt[NFSPROC_READLINK], + ext_nfsstats.rpccnt[NFSPROC_READ], + ext_nfsstats.rpccnt[NFSPROC_WRITE], + ext_nfsstats.rpccnt[NFSPROC_CREATE], + ext_nfsstats.rpccnt[NFSPROC_REMOVE]); printf("%9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s\n", "Rename", "Link", "Symlink", "Mkdir", "Rmdir", "Readdir", "RdirPlus", "Access"); - if (run_v4 == 0) - printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", - nfsstats.rpccnt[NFSPROC_RENAME], - nfsstats.rpccnt[NFSPROC_LINK], - nfsstats.rpccnt[NFSPROC_SYMLINK], - nfsstats.rpccnt[NFSPROC_MKDIR], - nfsstats.rpccnt[NFSPROC_RMDIR], - nfsstats.rpccnt[NFSPROC_READDIR], - nfsstats.rpccnt[NFSPROC_READDIRPLUS], - nfsstats.rpccnt[NFSPROC_ACCESS]); - else - printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", - ext_nfsstats.rpccnt[NFSPROC_RENAME], - ext_nfsstats.rpccnt[NFSPROC_LINK], - ext_nfsstats.rpccnt[NFSPROC_SYMLINK], - ext_nfsstats.rpccnt[NFSPROC_MKDIR], - ext_nfsstats.rpccnt[NFSPROC_RMDIR], - ext_nfsstats.rpccnt[NFSPROC_READDIR], - ext_nfsstats.rpccnt[NFSPROC_READDIRPLUS], - ext_nfsstats.rpccnt[NFSPROC_ACCESS]); + printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", + ext_nfsstats.rpccnt[NFSPROC_RENAME], + ext_nfsstats.rpccnt[NFSPROC_LINK], + ext_nfsstats.rpccnt[NFSPROC_SYMLINK], + ext_nfsstats.rpccnt[NFSPROC_MKDIR], + ext_nfsstats.rpccnt[NFSPROC_RMDIR], + ext_nfsstats.rpccnt[NFSPROC_READDIR], + ext_nfsstats.rpccnt[NFSPROC_READDIRPLUS], + ext_nfsstats.rpccnt[NFSPROC_ACCESS]); printf("%9.9s %9.9s %9.9s %9.9s %9.9s\n", "Mknod", "Fsstat", "Fsinfo", "PathConf", "Commit"); - if (run_v4 == 0) - printf("%9d %9d %9d %9d %9d\n", - nfsstats.rpccnt[NFSPROC_MKNOD], - nfsstats.rpccnt[NFSPROC_FSSTAT], - nfsstats.rpccnt[NFSPROC_FSINFO], - nfsstats.rpccnt[NFSPROC_PATHCONF], - nfsstats.rpccnt[NFSPROC_COMMIT]); - else - printf("%9d %9d %9d %9d %9d\n", - ext_nfsstats.rpccnt[NFSPROC_MKNOD], - ext_nfsstats.rpccnt[NFSPROC_FSSTAT], - ext_nfsstats.rpccnt[NFSPROC_FSINFO], - ext_nfsstats.rpccnt[NFSPROC_PATHCONF], - ext_nfsstats.rpccnt[NFSPROC_COMMIT]); + printf("%9d %9d %9d %9d %9d\n", + ext_nfsstats.rpccnt[NFSPROC_MKNOD], + ext_nfsstats.rpccnt[NFSPROC_FSSTAT], + ext_nfsstats.rpccnt[NFSPROC_FSINFO], + ext_nfsstats.rpccnt[NFSPROC_PATHCONF], + ext_nfsstats.rpccnt[NFSPROC_COMMIT]); printf("Rpc Info:\n"); printf("%9.9s %9.9s %9.9s %9.9s %9.9s\n", "TimedOut", "Invalid", "X Replies", "Retries", "Requests"); - if (run_v4 == 0) - printf("%9d %9d %9d %9d %9d\n", - nfsstats.rpctimeouts, - nfsstats.rpcinvalid, - nfsstats.rpcunexpected, - nfsstats.rpcretries, - nfsstats.rpcrequests); - else - printf("%9d %9d %9d %9d %9d\n", - ext_nfsstats.rpctimeouts, - ext_nfsstats.rpcinvalid, - ext_nfsstats.rpcunexpected, - ext_nfsstats.rpcretries, - ext_nfsstats.rpcrequests); + printf("%9d %9d %9d %9d %9d\n", + ext_nfsstats.rpctimeouts, + ext_nfsstats.rpcinvalid, + ext_nfsstats.rpcunexpected, + ext_nfsstats.rpcretries, + ext_nfsstats.rpcrequests); printf("Cache Info:\n"); printf("%9.9s %9.9s %9.9s %9.9s", "Attr Hits", "Misses", "Lkup Hits", "Misses"); printf(" %9.9s %9.9s %9.9s %9.9s\n", "BioR Hits", "Misses", "BioW Hits", "Misses"); - if (run_v4 == 0) { - printf("%9d %9d %9d %9d", - nfsstats.attrcache_hits, - nfsstats.attrcache_misses, - nfsstats.lookupcache_hits, - nfsstats.lookupcache_misses); - printf(" %9d %9d %9d %9d\n", - nfsstats.biocache_reads-nfsstats.read_bios, - nfsstats.read_bios, - nfsstats.biocache_writes-nfsstats.write_bios, - nfsstats.write_bios); - } else { - printf("%9d %9d %9d %9d", - ext_nfsstats.attrcache_hits, - ext_nfsstats.attrcache_misses, - ext_nfsstats.lookupcache_hits, - ext_nfsstats.lookupcache_misses); - printf(" %9d %9d %9d %9d\n", - ext_nfsstats.biocache_reads - - ext_nfsstats.read_bios, - ext_nfsstats.read_bios, - ext_nfsstats.biocache_writes - - ext_nfsstats.write_bios, - ext_nfsstats.write_bios); - } + printf("%9d %9d %9d %9d", + ext_nfsstats.attrcache_hits, + ext_nfsstats.attrcache_misses, + ext_nfsstats.lookupcache_hits, + ext_nfsstats.lookupcache_misses); + printf(" %9d %9d %9d %9d\n", + ext_nfsstats.biocache_reads - + ext_nfsstats.read_bios, + ext_nfsstats.read_bios, + ext_nfsstats.biocache_writes - + ext_nfsstats.write_bios, + ext_nfsstats.write_bios); printf("%9.9s %9.9s %9.9s %9.9s", "BioRLHits", "Misses", "BioD Hits", "Misses"); printf(" %9.9s %9.9s %9.9s %9.9s\n", "DirE Hits", "Misses", "Accs Hits", "Misses"); - if (run_v4 == 0) { - printf("%9d %9d %9d %9d", - nfsstats.biocache_readlinks - - nfsstats.readlink_bios, - nfsstats.readlink_bios, - nfsstats.biocache_readdirs - - nfsstats.readdir_bios, - nfsstats.readdir_bios); - printf(" %9d %9d %9d %9d\n", - nfsstats.direofcache_hits, - nfsstats.direofcache_misses, - nfsstats.accesscache_hits, - nfsstats.accesscache_misses); - } else { - printf("%9d %9d %9d %9d", - ext_nfsstats.biocache_readlinks - - ext_nfsstats.readlink_bios, - ext_nfsstats.readlink_bios, - ext_nfsstats.biocache_readdirs - - ext_nfsstats.readdir_bios, - ext_nfsstats.readdir_bios); - printf(" %9d %9d %9d %9d\n", - ext_nfsstats.direofcache_hits, - ext_nfsstats.direofcache_misses, - ext_nfsstats.accesscache_hits, - ext_nfsstats.accesscache_misses); - } - } - if (run_v4 == 0 && serverOnly && !nfsrvstatsp) { - printf("Server not present!\n"); - serverOnly = 0; + printf("%9d %9d %9d %9d", + ext_nfsstats.biocache_readlinks - + ext_nfsstats.readlink_bios, + ext_nfsstats.readlink_bios, + ext_nfsstats.biocache_readdirs - + ext_nfsstats.readdir_bios, + ext_nfsstats.readdir_bios); + printf(" %9d %9d %9d %9d\n", + ext_nfsstats.direofcache_hits, + ext_nfsstats.direofcache_misses, + ext_nfsstats.accesscache_hits, + ext_nfsstats.accesscache_misses); } if (serverOnly) { printf("\nServer Info:\n"); printf("%9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s\n", "Getattr", "Setattr", "Lookup", "Readlink", "Read", "Write", "Create", "Remove"); - if (run_v4 == 0) - printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", - nfsrvstats.srvrpccnt[NFSPROC_GETATTR], - nfsrvstats.srvrpccnt[NFSPROC_SETATTR], - nfsrvstats.srvrpccnt[NFSPROC_LOOKUP], - nfsrvstats.srvrpccnt[NFSPROC_READLINK], - nfsrvstats.srvrpccnt[NFSPROC_READ], - nfsrvstats.srvrpccnt[NFSPROC_WRITE], - nfsrvstats.srvrpccnt[NFSPROC_CREATE], - nfsrvstats.srvrpccnt[NFSPROC_REMOVE]); - else - printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", - ext_nfsstats.srvrpccnt[NFSV4OP_GETATTR], - ext_nfsstats.srvrpccnt[NFSV4OP_SETATTR], - ext_nfsstats.srvrpccnt[NFSV4OP_LOOKUP], - ext_nfsstats.srvrpccnt[NFSV4OP_READLINK], - ext_nfsstats.srvrpccnt[NFSV4OP_READ], - ext_nfsstats.srvrpccnt[NFSV4OP_WRITE], - ext_nfsstats.srvrpccnt[NFSV4OP_CREATE], - ext_nfsstats.srvrpccnt[NFSV4OP_REMOVE]); + printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", + ext_nfsstats.srvrpccnt[NFSV4OP_GETATTR], + ext_nfsstats.srvrpccnt[NFSV4OP_SETATTR], + ext_nfsstats.srvrpccnt[NFSV4OP_LOOKUP], + ext_nfsstats.srvrpccnt[NFSV4OP_READLINK], + ext_nfsstats.srvrpccnt[NFSV4OP_READ], + ext_nfsstats.srvrpccnt[NFSV4OP_WRITE], + ext_nfsstats.srvrpccnt[NFSV4OP_CREATE], + ext_nfsstats.srvrpccnt[NFSV4OP_REMOVE]); printf("%9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s\n", "Rename", "Link", "Symlink", "Mkdir", "Rmdir", "Readdir", "RdirPlus", "Access"); - if (run_v4 == 0) - printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", - nfsrvstats.srvrpccnt[NFSPROC_RENAME], - nfsrvstats.srvrpccnt[NFSPROC_LINK], - nfsrvstats.srvrpccnt[NFSPROC_SYMLINK], - nfsrvstats.srvrpccnt[NFSPROC_MKDIR], - nfsrvstats.srvrpccnt[NFSPROC_RMDIR], - nfsrvstats.srvrpccnt[NFSPROC_READDIR], - nfsrvstats.srvrpccnt[NFSPROC_READDIRPLUS], - nfsrvstats.srvrpccnt[NFSPROC_ACCESS]); - else - printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", - ext_nfsstats.srvrpccnt[NFSV4OP_RENAME], - ext_nfsstats.srvrpccnt[NFSV4OP_LINK], - ext_nfsstats.srvrpccnt[NFSV4OP_SYMLINK], - ext_nfsstats.srvrpccnt[NFSV4OP_MKDIR], - ext_nfsstats.srvrpccnt[NFSV4OP_RMDIR], - ext_nfsstats.srvrpccnt[NFSV4OP_READDIR], - ext_nfsstats.srvrpccnt[NFSV4OP_READDIRPLUS], - ext_nfsstats.srvrpccnt[NFSV4OP_ACCESS]); + printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", + ext_nfsstats.srvrpccnt[NFSV4OP_RENAME], + ext_nfsstats.srvrpccnt[NFSV4OP_LINK], + ext_nfsstats.srvrpccnt[NFSV4OP_SYMLINK], + ext_nfsstats.srvrpccnt[NFSV4OP_MKDIR], + ext_nfsstats.srvrpccnt[NFSV4OP_RMDIR], + ext_nfsstats.srvrpccnt[NFSV4OP_READDIR], + ext_nfsstats.srvrpccnt[NFSV4OP_READDIRPLUS], + ext_nfsstats.srvrpccnt[NFSV4OP_ACCESS]); printf("%9.9s %9.9s %9.9s %9.9s %9.9s\n", "Mknod", "Fsstat", "Fsinfo", "PathConf", "Commit"); - if (run_v4 == 0) - printf("%9d %9d %9d %9d %9d\n", - nfsrvstats.srvrpccnt[NFSPROC_MKNOD], - nfsrvstats.srvrpccnt[NFSPROC_FSSTAT], - nfsrvstats.srvrpccnt[NFSPROC_FSINFO], - nfsrvstats.srvrpccnt[NFSPROC_PATHCONF], - nfsrvstats.srvrpccnt[NFSPROC_COMMIT]); - else - printf("%9d %9d %9d %9d %9d\n", - ext_nfsstats.srvrpccnt[NFSV4OP_MKNOD], - ext_nfsstats.srvrpccnt[NFSV4OP_FSSTAT], - ext_nfsstats.srvrpccnt[NFSV4OP_FSINFO], - ext_nfsstats.srvrpccnt[NFSV4OP_PATHCONF], - ext_nfsstats.srvrpccnt[NFSV4OP_COMMIT]); + printf("%9d %9d %9d %9d %9d\n", + ext_nfsstats.srvrpccnt[NFSV4OP_MKNOD], + ext_nfsstats.srvrpccnt[NFSV4OP_FSSTAT], + ext_nfsstats.srvrpccnt[NFSV4OP_FSINFO], + ext_nfsstats.srvrpccnt[NFSV4OP_PATHCONF], + ext_nfsstats.srvrpccnt[NFSV4OP_COMMIT]); printf("Server Ret-Failed\n"); - if (run_v4 == 0) - printf("%17d\n", nfsrvstats.srvrpc_errs); - else - printf("%17d\n", ext_nfsstats.srvrpc_errs); + printf("%17d\n", ext_nfsstats.srvrpc_errs); printf("Server Faults\n"); - if (run_v4 == 0) - printf("%13d\n", nfsrvstats.srv_errs); - else - printf("%13d\n", ext_nfsstats.srv_errs); + printf("%13d\n", ext_nfsstats.srv_errs); printf("Server Cache Stats:\n"); printf("%9.9s %9.9s %9.9s %9.9s\n", "Inprog", "Idem", "Non-idem", "Misses"); - if (run_v4 == 0) - printf("%9d %9d %9d %9d\n", - nfsrvstats.srvcache_inproghits, - nfsrvstats.srvcache_idemdonehits, - nfsrvstats.srvcache_nonidemdonehits, - nfsrvstats.srvcache_misses); - else - printf("%9d %9d %9d %9d\n", - ext_nfsstats.srvcache_inproghits, - ext_nfsstats.srvcache_idemdonehits, - ext_nfsstats.srvcache_nonidemdonehits, - ext_nfsstats.srvcache_misses); + printf("%9d %9d %9d %9d\n", + ext_nfsstats.srvcache_inproghits, + ext_nfsstats.srvcache_idemdonehits, + ext_nfsstats.srvcache_nonidemdonehits, + ext_nfsstats.srvcache_misses); printf("Server Write Gathering:\n"); printf("%9.9s %9.9s %9.9s\n", "WriteOps", "WriteRPC", "Opsaved"); - if (run_v4 == 0) - printf("%9d %9d %9d\n", - nfsrvstats.srvvop_writes, - nfsrvstats.srvrpccnt[NFSPROC_WRITE], - nfsrvstats.srvrpccnt[NFSPROC_WRITE] - - nfsrvstats.srvvop_writes); - else - /* - * The new client doesn't do write gathering. It was - * only useful for NFSv2. - */ - printf("%9d %9d %9d\n", - ext_nfsstats.srvrpccnt[NFSV4OP_WRITE], - ext_nfsstats.srvrpccnt[NFSV4OP_WRITE], 0); - } -} - -u_char signalled; /* set if alarm goes off "early" */ - -/* - * Print a running summary of nfs statistics. - * Repeat display every interval seconds, showing statistics - * collected over that interval. Assumes that interval is non-zero. - * First line printed at top of screen is always cumulative. - */ -void -sidewaysintpr(u_int interval, int clientOnly, int serverOnly) -{ - struct nfsstats nfsstats, lastst, *nfsstatsp; - struct nfsrvstats nfsrvstats, lastsrvst, *nfsrvstatsp; - int hdrcnt = 1; - - nfsstatsp = &lastst; - nfsrvstatsp = &lastsrvst; - readstats(&nfsstatsp, &nfsrvstatsp, 0); - if (clientOnly && !nfsstatsp) { - printf("Client not present!\n"); - clientOnly = 0; - } - if (serverOnly && !nfsrvstatsp) { - printf("Server not present!\n"); - serverOnly = 0; - } - sleep(interval); - - for (;;) { - nfsstatsp = &nfsstats; - nfsrvstatsp = &nfsrvstats; - readstats(&nfsstatsp, &nfsrvstatsp, 0); - - if (--hdrcnt == 0) { - printhdr(clientOnly, serverOnly); - if (clientOnly && serverOnly) - hdrcnt = 10; - else - hdrcnt = 20; - } - if (clientOnly) { - printf("%s %6d %6d %6d %6d %6d %6d %6d %6d", - ((clientOnly && serverOnly) ? "Client:" : ""), - DELTA(rpccnt[NFSPROC_GETATTR]), - DELTA(rpccnt[NFSPROC_LOOKUP]), - DELTA(rpccnt[NFSPROC_READLINK]), - DELTA(rpccnt[NFSPROC_READ]), - DELTA(rpccnt[NFSPROC_WRITE]), - DELTA(rpccnt[NFSPROC_RENAME]), - DELTA(rpccnt[NFSPROC_ACCESS]), - DELTA(rpccnt[NFSPROC_READDIR]) + - DELTA(rpccnt[NFSPROC_READDIRPLUS]) - ); - if (widemode) { - printf(" %s %s %s %s %s %s", - sperc1(DELTA(attrcache_hits), - DELTA(attrcache_misses)), - sperc1(DELTA(lookupcache_hits), - DELTA(lookupcache_misses)), - sperc2(DELTA(biocache_reads), - DELTA(read_bios)), - sperc2(DELTA(biocache_writes), - DELTA(write_bios)), - sperc1(DELTA(accesscache_hits), - DELTA(accesscache_misses)), - sperc2(DELTA(biocache_readdirs), - DELTA(readdir_bios)) - ); - } - printf("\n"); - lastst = nfsstats; - } - if (serverOnly) { - printf("%s %6d %6d %6d %6d %6d %6d %6d %6d", - ((clientOnly && serverOnly) ? "Server:" : ""), - nfsrvstats.srvrpccnt[NFSPROC_GETATTR]-lastsrvst.srvrpccnt[NFSPROC_GETATTR], - nfsrvstats.srvrpccnt[NFSPROC_LOOKUP]-lastsrvst.srvrpccnt[NFSPROC_LOOKUP], - nfsrvstats.srvrpccnt[NFSPROC_READLINK]-lastsrvst.srvrpccnt[NFSPROC_READLINK], - nfsrvstats.srvrpccnt[NFSPROC_READ]-lastsrvst.srvrpccnt[NFSPROC_READ], - nfsrvstats.srvrpccnt[NFSPROC_WRITE]-lastsrvst.srvrpccnt[NFSPROC_WRITE], - nfsrvstats.srvrpccnt[NFSPROC_RENAME]-lastsrvst.srvrpccnt[NFSPROC_RENAME], - nfsrvstats.srvrpccnt[NFSPROC_ACCESS]-lastsrvst.srvrpccnt[NFSPROC_ACCESS], - (nfsrvstats.srvrpccnt[NFSPROC_READDIR]-lastsrvst.srvrpccnt[NFSPROC_READDIR]) - +(nfsrvstats.srvrpccnt[NFSPROC_READDIRPLUS]-lastsrvst.srvrpccnt[NFSPROC_READDIRPLUS])); - printf("\n"); - lastsrvst = nfsrvstats; - } - fflush(stdout); - sleep(interval); + /* + * The new client doesn't do write gathering. It was + * only useful for NFSv2. + */ + printf("%9d %9d %9d\n", + ext_nfsstats.srvrpccnt[NFSV4OP_WRITE], + ext_nfsstats.srvrpccnt[NFSV4OP_WRITE], 0); } - /*NOTREACHED*/ } -void +static void printhdr(int clientOnly, int serverOnly) { printf("%s%6.6s %6.6s %6.6s %6.6s %6.6s %6.6s %6.6s %6.6s", @@ -661,18 +361,18 @@ printhdr(int clientOnly, int serverOnly) fflush(stdout); } -void +static void usage(void) { (void)fprintf(stderr, - "usage: nfsstat [-cemoszW] [-M core] [-N system] [-w wait]\n"); + "usage: nfsstat [-cemszW] [-M core] [-N system] [-w wait]\n"); exit(1); } static char SPBuf[64][8]; static int SPIndex; -char * +static char * sperc1(int hits, int misses) { char *p = SPBuf[SPIndex]; @@ -687,7 +387,7 @@ sperc1(int hits, int misses) return(p); } -char * +static char * sperc2(int ttl, int misses) { char *p = SPBuf[SPIndex]; @@ -705,7 +405,7 @@ sperc2(int ttl, int misses) /* * Print a description of the nfs stats for the experimental client/server. */ -void +static void exp_intpr(int clientOnly, int serverOnly) { int nfssvc_flag; @@ -961,7 +661,7 @@ exp_intpr(int clientOnly, int serverOnly * collected over that interval. Assumes that interval is non-zero. * First line printed at top of screen is always cumulative. */ -void +static void exp_sidewaysintpr(u_int interval, int clientOnly, int serverOnly) { struct ext_nfsstats nfsstats, lastst, *ext_nfsstatsp; @@ -1035,4 +735,3 @@ exp_sidewaysintpr(u_int interval, int cl } /*NOTREACHED*/ } - From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 14:53:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D4E43C8; Thu, 23 Apr 2015 14:53:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3CB671885; Thu, 23 Apr 2015 14:53:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NErkaf011354; Thu, 23 Apr 2015 14:53:46 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NErk1t011353; Thu, 23 Apr 2015 14:53:46 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504231453.t3NErk1t011353@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 23 Apr 2015 14:53:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281889 - head/sys/dev/kbdmux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 14:53:46 -0000 Author: pfg Date: Thu Apr 23 14:53:45 2015 New Revision: 281889 URL: https://svnweb.freebsd.org/changeset/base/281889 Log: Plug memory leaks in kbdmux(4) Al kudos here for the Clang static analyzer which, unlike Coverity, failed to flag a false positive. Found by: clang static analyzer CID: 1007072 CID: 1007073 CID: 1007074 MFC after: 1 week Modified: head/sys/dev/kbdmux/kbdmux.c Modified: head/sys/dev/kbdmux/kbdmux.c ============================================================================== --- head/sys/dev/kbdmux/kbdmux.c Thu Apr 23 14:36:01 2015 (r281888) +++ head/sys/dev/kbdmux/kbdmux.c Thu Apr 23 14:53:45 2015 (r281889) @@ -472,6 +472,11 @@ kbdmux_init(int unit, keyboard_t **kbdp, KBDMUX_UNLOCK(state); } + if (needfree) { + free(accmap, M_KBDMUX); + free(fkeymap, M_KBDMUX); + free(keymap, M_KBDMUX); + } return (0); bad: if (needfree) { From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 14:58:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 410A668B; Thu, 23 Apr 2015 14:58:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2EEAA18E2; Thu, 23 Apr 2015 14:58:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NEwe1F012178; Thu, 23 Apr 2015 14:58:40 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NEweEU012177; Thu, 23 Apr 2015 14:58:40 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201504231458.t3NEweEU012177@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Thu, 23 Apr 2015 14:58:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281890 - head/sys/boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 14:58:40 -0000 Author: loos Date: Thu Apr 23 14:58:39 2015 New Revision: 281890 URL: https://svnweb.freebsd.org/changeset/base/281890 Log: Enable the watchdog on RPI2. The watchdog is used to reset the SoC on cpu_reset(). Without this, RPI2 will not reboot when asked to. Modified: head/sys/boot/fdt/dts/arm/bcm2836.dtsi Modified: head/sys/boot/fdt/dts/arm/bcm2836.dtsi ============================================================================== --- head/sys/boot/fdt/dts/arm/bcm2836.dtsi Thu Apr 23 14:53:45 2015 (r281889) +++ head/sys/boot/fdt/dts/arm/bcm2836.dtsi Thu Apr 23 14:58:39 2015 (r281890) @@ -101,6 +101,12 @@ */ }; + watchdog0 { + compatible = "broadcom,bcm2835-wdt", + "broadcom,bcm2708-wdt"; + reg = <0x10001c 0x0c>; /* 0x1c, 0x20, 0x24 */ + }; + gpio: gpio { compatible = "broadcom,bcm2835-gpio", "broadcom,bcm2708-gpio"; From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 15:15:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 680CB9F8; Thu, 23 Apr 2015 15:15:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 554B51B15; Thu, 23 Apr 2015 15:15:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NFFkxZ021837; Thu, 23 Apr 2015 15:15:46 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NFFkN0021836; Thu, 23 Apr 2015 15:15:46 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504231515.t3NFFkN0021836@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 23 Apr 2015 15:15:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281891 - stable/10/tools/build/options X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 15:15:46 -0000 Author: bdrewery Date: Thu Apr 23 15:15:45 2015 New Revision: 281891 URL: https://svnweb.freebsd.org/changeset/base/281891 Log: MFC r281053: Remove specific reference to g++(1) for WITH_CXX as it may be clang. Modified: stable/10/tools/build/options/WITHOUT_CXX Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/build/options/WITHOUT_CXX ============================================================================== --- stable/10/tools/build/options/WITHOUT_CXX Thu Apr 23 14:58:39 2015 (r281890) +++ stable/10/tools/build/options/WITHOUT_CXX Thu Apr 23 15:15:45 2015 (r281891) @@ -1,6 +1,6 @@ .\" $FreeBSD$ Set to not build -.Xr g++ 1 +.Xr c++ 1 and related libraries. It will also prevent building of .Xr gperf 1 From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 15:18:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC560DE3; Thu, 23 Apr 2015 15:18:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A9E8F1B52; Thu, 23 Apr 2015 15:18:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NFIip3022441; Thu, 23 Apr 2015 15:18:44 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NFIik1022440; Thu, 23 Apr 2015 15:18:44 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504231518.t3NFIik1022440@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 23 Apr 2015 15:18:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281892 - stable/10/share/man/man5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 15:18:44 -0000 Author: bdrewery Date: Thu Apr 23 15:18:43 2015 New Revision: 281892 URL: https://svnweb.freebsd.org/changeset/base/281892 Log: Regen for r281891 Modified: stable/10/share/man/man5/src.conf.5 Modified: stable/10/share/man/man5/src.conf.5 ============================================================================== --- stable/10/share/man/man5/src.conf.5 Thu Apr 23 15:15:45 2015 (r281891) +++ stable/10/share/man/man5/src.conf.5 Thu Apr 23 15:18:43 2015 (r281892) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. -.\" from FreeBSD: head/tools/build/options/makeman 255964 2013-10-01 07:22:04Z des +.\" from FreeBSD: stable/10/tools/build/options/makeman 255964 2013-10-01 07:22:04Z des .\" $FreeBSD$ -.Dd March 1, 2015 +.Dd April 23, 2015 .Dt SRC.CONF 5 .Os .Sh NAME @@ -329,9 +329,9 @@ Set to not build .Xr ctm 1 and related utilities. .It Va WITHOUT_CXX -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_CXX 220402 2011-04-06 20:19:07Z uqs +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_CXX 281891 2015-04-23 15:15:45Z bdrewery Set to not build -.Xr g++ 1 +.Xr c++ 1 and related libraries. It will also prevent building of .Xr gperf 1 From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 15:19:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D0F7BF26; Thu, 23 Apr 2015 15:19:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE1CF1B6C; Thu, 23 Apr 2015 15:19:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NFJvLf022643; Thu, 23 Apr 2015 15:19:57 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NFJv3e022642; Thu, 23 Apr 2015 15:19:57 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504231519.t3NFJv3e022642@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 23 Apr 2015 15:19:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281893 - stable/10/crypto/openssh X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 15:19:57 -0000 Author: bdrewery Date: Thu Apr 23 15:19:56 2015 New Revision: 281893 URL: https://svnweb.freebsd.org/changeset/base/281893 Log: MFC r280999: Use proper CHAN_TCP_PACKET_DEFAULT for agent forwarding when HPN disabled. Modified: stable/10/crypto/openssh/clientloop.c Directory Properties: stable/10/ (props changed) Modified: stable/10/crypto/openssh/clientloop.c ============================================================================== --- stable/10/crypto/openssh/clientloop.c Thu Apr 23 15:18:43 2015 (r281892) +++ stable/10/crypto/openssh/clientloop.c Thu Apr 23 15:19:56 2015 (r281893) @@ -1922,7 +1922,7 @@ client_request_agent(const char *request if (options.hpn_disabled) c = channel_new("authentication agent connection", SSH_CHANNEL_OPEN, sock, sock, -1, - CHAN_X11_WINDOW_DEFAULT, CHAN_TCP_WINDOW_DEFAULT, 0, + CHAN_X11_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT, 0, "authentication agent connection", 1); else c = channel_new("authentication agent connection", From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 15:20:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70C59FF; Thu, 23 Apr 2015 15:20:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5DF871B89; Thu, 23 Apr 2015 15:20:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NFKwXY024780; Thu, 23 Apr 2015 15:20:58 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NFKwui024779; Thu, 23 Apr 2015 15:20:58 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504231520.t3NFKwui024779@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 23 Apr 2015 15:20:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281894 - stable/9/crypto/openssh X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 15:20:58 -0000 Author: bdrewery Date: Thu Apr 23 15:20:57 2015 New Revision: 281894 URL: https://svnweb.freebsd.org/changeset/base/281894 Log: MFC r280999: Use proper CHAN_TCP_PACKET_DEFAULT for agent forwarding when HPN disabled. Modified: stable/9/crypto/openssh/clientloop.c Directory Properties: stable/9/crypto/openssh/ (props changed) Modified: stable/9/crypto/openssh/clientloop.c ============================================================================== --- stable/9/crypto/openssh/clientloop.c Thu Apr 23 15:19:56 2015 (r281893) +++ stable/9/crypto/openssh/clientloop.c Thu Apr 23 15:20:57 2015 (r281894) @@ -1923,7 +1923,7 @@ client_request_agent(const char *request if (options.hpn_disabled) c = channel_new("authentication agent connection", SSH_CHANNEL_OPEN, sock, sock, -1, - CHAN_X11_WINDOW_DEFAULT, CHAN_TCP_WINDOW_DEFAULT, 0, + CHAN_X11_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT, 0, "authentication agent connection", 1); else c = channel_new("authentication agent connection", From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 15:21:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B937A241; Thu, 23 Apr 2015 15:21:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A6E691BA0; Thu, 23 Apr 2015 15:21:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NFLlAn026624; Thu, 23 Apr 2015 15:21:47 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NFLllh026623; Thu, 23 Apr 2015 15:21:47 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504231521.t3NFLllh026623@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 23 Apr 2015 15:21:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r281895 - stable/8/crypto/openssh X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 15:21:47 -0000 Author: bdrewery Date: Thu Apr 23 15:21:47 2015 New Revision: 281895 URL: https://svnweb.freebsd.org/changeset/base/281895 Log: MFC r280999: Use proper CHAN_TCP_PACKET_DEFAULT for agent forwarding when HPN disabled. Modified: stable/8/crypto/openssh/clientloop.c Directory Properties: stable/8/crypto/openssh/ (props changed) Modified: stable/8/crypto/openssh/clientloop.c ============================================================================== --- stable/8/crypto/openssh/clientloop.c Thu Apr 23 15:20:57 2015 (r281894) +++ stable/8/crypto/openssh/clientloop.c Thu Apr 23 15:21:47 2015 (r281895) @@ -1860,7 +1860,7 @@ client_request_agent(const char *request if (options.hpn_disabled) c = channel_new("authentication agent connection", SSH_CHANNEL_OPEN, sock, sock, -1, - CHAN_X11_WINDOW_DEFAULT, CHAN_TCP_WINDOW_DEFAULT, 0, + CHAN_X11_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT, 0, "authentication agent connection", 1); else c = channel_new("authentication agent connection", From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 15:22:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 96222373; Thu, 23 Apr 2015 15:22:05 +0000 (UTC) Received: from bigwig.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 70CB91C49; Thu, 23 Apr 2015 15:22:05 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id EBCEEB93B; Thu, 23 Apr 2015 11:22:03 -0400 (EDT) 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: r281888 - head/usr.bin/nfsstat Date: Thu, 23 Apr 2015 11:21:52 -0400 Message-ID: <10554184.33BWS7eSAa@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <201504231436.t3NEa2Vp001643@svn.freebsd.org> References: <201504231436.t3NEa2Vp001643@svn.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.2.7 (bigwig.baldwin.cx); Thu, 23 Apr 2015 11:22:04 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 15:22:05 -0000 On Thursday, April 23, 2015 02:36:02 PM Edward Tomasz Napierala wrote: > Author: trasz > Date: Thu Apr 23 14:36:01 2015 > New Revision: 281888 > URL: https://svnweb.freebsd.org/changeset/base/281888 > > Log: > Remove oldnfs support from nfsstat(1). > > Reviewed by: rmacklem@ (earlier version) > Sponsored by: The FreeBSD Foundation > > Modified: > head/usr.bin/nfsstat/nfsstat.1 > head/usr.bin/nfsstat/nfsstat.c It might be nice to rename the "new" datastructure names as well, so that ext_nfsstats would just be nfsstats. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 15:24:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A85E152B; Thu, 23 Apr 2015 15:24:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95A2B1C78; Thu, 23 Apr 2015 15:24:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NFOYwB027053; Thu, 23 Apr 2015 15:24:34 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NFOYaW027052; Thu, 23 Apr 2015 15:24:34 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504231524.t3NFOYaW027052@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 23 Apr 2015 15:24:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281896 - stable/10/usr.bin/lockf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 15:24:34 -0000 Author: bdrewery Date: Thu Apr 23 15:24:33 2015 New Revision: 281896 URL: https://svnweb.freebsd.org/changeset/base/281896 Log: MFC r281582: Remove extra flags from r250462. Modified: stable/10/usr.bin/lockf/lockf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/lockf/lockf.c ============================================================================== --- stable/10/usr.bin/lockf/lockf.c Thu Apr 23 15:21:47 2015 (r281895) +++ stable/10/usr.bin/lockf/lockf.c Thu Apr 23 15:24:33 2015 (r281896) @@ -169,7 +169,7 @@ acquire_lock(const char *name, int flags { int fd; - if ((fd = open(name, flags|O_RDONLY|O_EXLOCK|flags, 0666)) == -1) { + if ((fd = open(name, O_RDONLY|O_EXLOCK|flags, 0666)) == -1) { if (errno == EAGAIN || errno == EINTR) return (-1); err(EX_CANTCREAT, "cannot open %s", name); From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 15:25:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CFBEE674; Thu, 23 Apr 2015 15:25:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BCDE01C8E; Thu, 23 Apr 2015 15:25:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NFPNrP027245; Thu, 23 Apr 2015 15:25:23 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NFPNLt027244; Thu, 23 Apr 2015 15:25:23 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504231525.t3NFPNLt027244@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 23 Apr 2015 15:25:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281897 - stable/9/usr.bin/lockf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 15:25:23 -0000 Author: bdrewery Date: Thu Apr 23 15:25:22 2015 New Revision: 281897 URL: https://svnweb.freebsd.org/changeset/base/281897 Log: MFC r281582: Remove extra flags from r250462. Modified: stable/9/usr.bin/lockf/lockf.c Directory Properties: stable/9/usr.bin/lockf/ (props changed) Modified: stable/9/usr.bin/lockf/lockf.c ============================================================================== --- stable/9/usr.bin/lockf/lockf.c Thu Apr 23 15:24:33 2015 (r281896) +++ stable/9/usr.bin/lockf/lockf.c Thu Apr 23 15:25:22 2015 (r281897) @@ -169,7 +169,7 @@ acquire_lock(const char *name, int flags { int fd; - if ((fd = open(name, flags|O_RDONLY|O_EXLOCK|flags, 0666)) == -1) { + if ((fd = open(name, O_RDONLY|O_EXLOCK|flags, 0666)) == -1) { if (errno == EAGAIN || errno == EINTR) return (-1); err(EX_CANTCREAT, "cannot open %s", name); From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 15:26:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70AB17C2; Thu, 23 Apr 2015 15:26:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E2221CA2; Thu, 23 Apr 2015 15:26:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NFQ8o5027410; Thu, 23 Apr 2015 15:26:08 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NFQ8LU027409; Thu, 23 Apr 2015 15:26:08 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504231526.t3NFQ8LU027409@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 23 Apr 2015 15:26:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r281898 - stable/8/usr.bin/lockf X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 15:26:08 -0000 Author: bdrewery Date: Thu Apr 23 15:26:07 2015 New Revision: 281898 URL: https://svnweb.freebsd.org/changeset/base/281898 Log: MFC r281582: Remove extra flags from r250462. Modified: stable/8/usr.bin/lockf/lockf.c Directory Properties: stable/8/usr.bin/lockf/ (props changed) Modified: stable/8/usr.bin/lockf/lockf.c ============================================================================== --- stable/8/usr.bin/lockf/lockf.c Thu Apr 23 15:25:22 2015 (r281897) +++ stable/8/usr.bin/lockf/lockf.c Thu Apr 23 15:26:07 2015 (r281898) @@ -169,7 +169,7 @@ acquire_lock(const char *name, int flags { int fd; - if ((fd = open(name, flags|O_RDONLY|O_EXLOCK|flags, 0666)) == -1) { + if ((fd = open(name, O_RDONLY|O_EXLOCK|flags, 0666)) == -1) { if (errno == EAGAIN || errno == EINTR) return (-1); err(EX_CANTCREAT, "cannot open %s", name); From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 18:36:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 90A547D3; Thu, 23 Apr 2015 18:36:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6512512B9; Thu, 23 Apr 2015 18:36:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NIabOW022284; Thu, 23 Apr 2015 18:36:37 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NIaaEk022281; Thu, 23 Apr 2015 18:36:36 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201504231836.t3NIaaEk022281@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Thu, 23 Apr 2015 18:36:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281899 - head/sys/boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 18:36:37 -0000 Author: loos Date: Thu Apr 23 18:36:36 2015 New Revision: 281899 URL: https://svnweb.freebsd.org/changeset/base/281899 Log: Fix the gpio-leds node to match the LEDs on RPI2. The 'pwr' LED is connected to GPIO pin 35 (active high) and the 'act' LED is connected to GPIO pin 47 (active high). Remove the GPIO pin 47 from reserved pins list, previously it was used to signaling the SD Card presence and now it is used by act LED. Modified: head/sys/boot/fdt/dts/arm/bcm2836.dtsi head/sys/boot/fdt/dts/arm/rpi2.dts Modified: head/sys/boot/fdt/dts/arm/bcm2836.dtsi ============================================================================== --- head/sys/boot/fdt/dts/arm/bcm2836.dtsi Thu Apr 23 15:26:07 2015 (r281898) +++ head/sys/boot/fdt/dts/arm/bcm2836.dtsi Thu Apr 23 18:36:36 2015 (r281899) @@ -131,11 +131,11 @@ pinctrl-names = "default"; pinctrl-0 = <&pins_reserved>; - /* Pins that can short 3.3V to GND in output mode: 46-47 + /* Pins that can short 3.3V to GND in output mode: 46 * Pins used by VideoCore: 48-53 */ - broadcom,read-only = <46>, <47>, <48>, <49>, <50>, - <51>, <52>, <53>; + broadcom,read-only = <46>, <48>, <49>, <50>, + <51>, <52>, <53>; /* BSC0 */ pins_bsc0_a: bsc0_a { Modified: head/sys/boot/fdt/dts/arm/rpi2.dts ============================================================================== --- head/sys/boot/fdt/dts/arm/rpi2.dts Thu Apr 23 15:26:07 2015 (r281898) +++ head/sys/boot/fdt/dts/arm/rpi2.dts Thu Apr 23 18:36:36 2015 (r281899) @@ -322,18 +322,14 @@ leds { compatible = "gpio-leds"; - ok { - label = "ok"; - gpios = <&gpio 16 1>; - - /* Don't change this - it configures - * how the led driver determines if - * the led is on or off when it loads. - */ - default-state = "keep"; + pwr { + label = "pwr"; + gpios = <&gpio 35 0>; + }; - /* This is the real default state. */ - linux,default-trigger = "default-on"; + act { + label = "act"; + gpios = <&gpio 47 0>; }; }; From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 18:56:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 43DBDBE2 for ; Thu, 23 Apr 2015 18:56:56 +0000 (UTC) Received: from nm14-vm10.bullet.mail.gq1.yahoo.com (nm14-vm10.bullet.mail.gq1.yahoo.com [98.136.218.186]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 131141520 for ; Thu, 23 Apr 2015 18:56:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1429814992; bh=lz1Da5b/edlLLOHid6gbr9ijTz1FoXw2BgsG8g739sU=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject; b=lzRz8snVFXhH+5Pes0jL1DCGiB/hJ+8euUkLau3FZT0p29Zzyg8bMXAcf33yFqIpQiULEG85UqWErS2ydky/2VfT+GYLigJg5VANmlPG5/NWXJ4u6ERuw4AvXZilISyd6FLtOGBqwf3IzbDI46cQ9lK4nqaL1FtP4nnvjk6TbsstswWHgY+EczuE/iGGbp74+0rK3uKOiqbkCMagzoKQK2LkRjPxhv1+6tmoEOY7B5W3ry99OKOL3LXlDeBXye9XmdSiJ4peZXYEqMxz9mhxmuy+1SEjRH5ynB7oJL08LNsMMS1uknixMkUNHRkqm74YWMR8He8eP4WVy99Avuqjdg== Received: from [98.137.12.61] by nm14.bullet.mail.gq1.yahoo.com with NNFMP; 23 Apr 2015 18:49:52 -0000 Received: from [98.136.164.67] by tm6.bullet.mail.gq1.yahoo.com with NNFMP; 23 Apr 2015 18:49:52 -0000 Received: from [127.0.0.1] by smtp229.mail.gq1.yahoo.com with NNFMP; 23 Apr 2015 18:49:52 -0000 X-Yahoo-Newman-Id: 532243.9751.bm@smtp229.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: Qqlf0.IVM1lICLnaEt3QOieQLHst7rMLH6hsUniG8M9btP6 4caWCJE9rdYDnRNPU8Dwddw2GH7C7BlgsXBzDE_SC6dE5UiCkpkaPiiuw8Pr po.BsywCAUftexncpUhHeJCZL964ZNwT.fLlNdCi8M5lOHwWJFqCkkOoHIVr bOrivGLIevjhEUIS.g7Bgc8.FB8nyAxiQDxyA24E5pD4JptVP8o0nNxxO9yx gBh98YtqeEM7KTC8iAvyTBCzuvodtD7Ov5DOXTRpjOi0fWMpGWrSzf7wioPp 5jK9qJ6QaSRV6w5vemfkjo4oA8851.Y4lqd8iaZww.7qXI008vGHY4r0WYYR zG_D34VIov.HerglUnHz_1TU9HjxBaTIFm8hREsSVz7kJ83hIcMQ.rCu6gN. S_GApKUDP8UCeLVo_MuXle0pSed8ljK6EW1Ebc.EUzrBO60Vi4kIyBTDp3MT sFIeaegHQ1WBGRCjxeWjrV43m2q1NO9AvbIc.oi_esVrf85fnJlWS2jrSQ2G spPjCGwUeqBt77fVUdzOTvsGm3EWQX3lyoflA0WNm X-Yahoo-SMTP: clhABp.swBB7fs.LwIJpv3jkWgo2NU8- Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r281451 - head/sys/vm From: Scott Long In-Reply-To: <5B48434B-EA97-45B3-BC4E-B039A868186B@yahoo.com> Date: Thu, 23 Apr 2015 12:49:51 -0600 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <4E109480-FD27-4C7F-8B5F-B1DB2232CD3D@yahoo.com> References: <201504120621.t3C6LxAV095209@svn.freebsd.org> <5B48434B-EA97-45B3-BC4E-B039A868186B@yahoo.com> To: Dmitry Chagin X-Mailer: Apple Mail (2.2070.6) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 18:56:56 -0000 > On Apr 23, 2015, at 6:19 AM, Scott Long wrote: >=20 >>=20 >> On Apr 12, 2015, at 12:21 AM, Dmitry Chagin = wrote: >>=20 >> Author: dchagin >> Date: Sun Apr 12 06:21:58 2015 >> New Revision: 281451 >> URL: https://svnweb.freebsd.org/changeset/base/281451 >>=20 >> Log: >> Rework r281162. Indeed, the flexible array member is preferable here. >>=20 >> Suggested by: Justin T. Gibbs >>=20 >> MFC after: 3 days >>=20 >> Modified: >> head/sys/vm/uma_core.c >> head/sys/vm/uma_int.h >=20 > There=E2=80=99s still something wrong with this. I have a machine = with 28 cores (56 with hyperthreading) and 256GB of RAM, and ever since = you committed r281162, it panics early in boot with a failed assertion. = It looks like the first few members of a uma_slab_t are getting = overwritten accidentally, and somehow the padding of the extra member in = the uma_zone_t was previously protecting it. I don=E2=80=99t know the = exact cause yet, but I must ask that you revert to r281161 in HEAD and = stable/10 until the problem is resolved. >=20 I think the problem is that the masterzone_k and masterzone_z objects = that are statically allocated in uma_core.c no longer have space for the = uz_cpu field, but uma_zalloc_arg() always assumes that it=E2=80=99s = there. Early in boot when the =E2=80=98kegs' and =E2=80=98zones=E2=80=99 = zones are being initialized, there=E2=80=99s only 1 CPU so = pre-allocating 1 uz_cpu element in the uma_zone is enough. I can=E2=80=99= t see any way around this without significantly changing how = uma_zalloc_arg() treats per-cpu caches. I think it=E2=80=99s best to = revert this change. Scott From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 19:29:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 28A1D804; Thu, 23 Apr 2015 19:29:39 +0000 (UTC) Received: from heemeyer.club (heemeyer.club [IPv6:2001:19f0:6400:80a1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "heemeyer.club", Issuer "heemeyer.club" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D72A0188C; Thu, 23 Apr 2015 19:29:37 +0000 (UTC) Received: from dchagin.static.corbina.net (dchagin.static.corbina.ru [78.107.232.239]) by heemeyer.club (8.15.1/8.15.1) with ESMTPS id t3NJSR8u019804 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 23 Apr 2015 19:29:27 GMT (envelope-from dchagin@dchagin.static.corbina.net) X-Authentication-Warning: heemeyer.club: Host dchagin.static.corbina.ru [78.107.232.239] claimed to be dchagin.static.corbina.net Received: from dchagin.static.corbina.net (localhost [127.0.0.1]) by dchagin.static.corbina.net (8.15.1/8.15.1) with ESMTPS id t3NJSJb8013214 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 23 Apr 2015 22:28:26 +0300 (MSK) (envelope-from dchagin@dchagin.static.corbina.net) Received: (from dchagin@localhost) by dchagin.static.corbina.net (8.15.1/8.15.1/Submit) id t3NJSJn7013213; Thu, 23 Apr 2015 22:28:19 +0300 (MSK) (envelope-from dchagin) Date: Thu, 23 Apr 2015 22:28:19 +0300 From: Chagin Dmitry To: Scott Long Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281451 - head/sys/vm Message-ID: <20150423192819.GA13122@dchagin.static.corbina.net> References: <201504120621.t3C6LxAV095209@svn.freebsd.org> <5B48434B-EA97-45B3-BC4E-B039A868186B@yahoo.com> <4E109480-FD27-4C7F-8B5F-B1DB2232CD3D@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E109480-FD27-4C7F-8B5F-B1DB2232CD3D@yahoo.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 19:29:39 -0000 On Thu, Apr 23, 2015 at 12:49:51PM -0600, Scott Long wrote: > > > On Apr 23, 2015, at 6:19 AM, Scott Long wrote: > > > >> > >> On Apr 12, 2015, at 12:21 AM, Dmitry Chagin wrote: > >> > >> Author: dchagin > >> Date: Sun Apr 12 06:21:58 2015 > >> New Revision: 281451 > >> URL: https://svnweb.freebsd.org/changeset/base/281451 > >> > >> Log: > >> Rework r281162. Indeed, the flexible array member is preferable here. > >> > >> Suggested by: Justin T. Gibbs > >> > >> MFC after: 3 days > >> > >> Modified: > >> head/sys/vm/uma_core.c > >> head/sys/vm/uma_int.h > > > > There???s still something wrong with this. I have a machine with 28 cores (56 with hyperthreading) and 256GB of RAM, and ever since you committed r281162, it panics early in boot with a failed assertion. It looks like the first few members of a uma_slab_t are getting overwritten accidentally, and somehow the padding of the extra member in the uma_zone_t was previously protecting it. I don???t know the exact cause yet, but I must ask that you revert to r281161 in HEAD and stable/10 until the problem is resolved. > > > > I think the problem is that the masterzone_k and masterzone_z objects that are statically allocated in uma_core.c no longer have space for the uz_cpu field, but uma_zalloc_arg() always assumes that it???s there. Early in boot when the ???kegs' and ???zones??? zones are being initialized, there???s only 1 CPU so pre-allocating 1 uz_cpu element in the uma_zone is enough. I can???t see any way around this without significantly changing how uma_zalloc_arg() treats per-cpu caches. I think it???s best to revert this change. > Hi, they initialized in uma_startup() and not used before. I have a private converstion with a man which stable/10 hangs in vm_mem_init().\ with my commit. weird. I do not object to revert, but give me a chance to figure out what's going on. -- Have fun! chd From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 19:50:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 12C0ED75; Thu, 23 Apr 2015 19:50:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02DDC1ACA; Thu, 23 Apr 2015 19:50:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NJoMcr058934; Thu, 23 Apr 2015 19:50:22 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NJoMuF058933; Thu, 23 Apr 2015 19:50:22 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201504231950.t3NJoMuF058933@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Thu, 23 Apr 2015 19:50:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281900 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 19:50:23 -0000 Author: loos Date: Thu Apr 23 19:50:22 2015 New Revision: 281900 URL: https://svnweb.freebsd.org/changeset/base/281900 Log: Now that we have an U-Boot for RPI2, do not use the static DTB compiled into the kernel, which is used mostly on early development stages. On RPI(2) the DTB is loaded and modified by firmware and then handed to kernel via U-Boot and ubldr. The RPI firmware adds (or modify) a few valuable data to the in memory DTB, like: - System memory; - Ethernet MAC address; - framebuffer settings; - Board serial and revision; - clock-frequency for most of devices. Modified: head/sys/arm/conf/RPI2 Modified: head/sys/arm/conf/RPI2 ============================================================================== --- head/sys/arm/conf/RPI2 Thu Apr 23 18:36:36 2015 (r281899) +++ head/sys/arm/conf/RPI2 Thu Apr 23 19:50:22 2015 (r281900) @@ -137,6 +137,6 @@ device bcm2835_spi options FDT # Configure using FDT/DTB data # Note: DTB is normally loaded and modified by RPi boot loader, then # handed to kernel via U-Boot and ubldr. -options FDT_DTB_STATIC -makeoptions FDT_DTS_FILE=rpi2.dts +#options FDT_DTB_STATIC +#makeoptions FDT_DTS_FILE=rpi2.dts makeoptions MODULES_EXTRA=dtb/rpi From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 19:53:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C5F40FC8; Thu, 23 Apr 2015 19:53:21 +0000 (UTC) Received: from mail-wi0-x22c.google.com (mail-wi0-x22c.google.com [IPv6:2a00:1450:400c:c05::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 614AC1BB2; Thu, 23 Apr 2015 19:53:21 +0000 (UTC) Received: by wicmx19 with SMTP id mx19so20089742wic.1; Thu, 23 Apr 2015 12:53:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=QTp3cF1ezHrUVzke+LxSXFn7m7tOqcGvqVw/Sc1F7+I=; b=B+jeq3wb4DAX4lymORgqAGlApd15dR9018F8c7oJIJxBpaq+JXxVhEQyqX8/g6jeAl kgcplnlOwMdBv8QUQzLHIHDWWfhOPEk1U1Y4EvMUzEgFWR9ZvDzVxbLtmTzM7kmWTcR9 548aOrXnbVi4S3vDmiyRuG3LEE1LnyfxQG4NcM4eLuzz2+XGEFrNM6i4TzKqRxfjOOow 9XhCj2gfibM1MdgzEp3YtpP/Eq0zJyBshDHtz+SiFpefsClvM0coHDVjlTOrLW/tdYyg AE2H2H8K+d1wZ5/iWCL2jk/RKOEoIn0NoIgaYr5beMHlrolr42e/xnK6GgLEvhL8MgdM RRKA== MIME-Version: 1.0 X-Received: by 10.194.78.49 with SMTP id y17mr8817222wjw.131.1429818799981; Thu, 23 Apr 2015 12:53:19 -0700 (PDT) Sender: antoine.brodin.freebsd@gmail.com Received: by 10.194.87.100 with HTTP; Thu, 23 Apr 2015 12:53:19 -0700 (PDT) In-Reply-To: <201504111851.t3BIpgRS071392@svn.freebsd.org> References: <201504111851.t3BIpgRS071392@svn.freebsd.org> Date: Thu, 23 Apr 2015 21:53:19 +0200 X-Google-Sender-Auth: KJfD8v9khcaI4m3dGc6QWP5LjMI Message-ID: Subject: Re: svn commit: r281442 - head/sys/kern From: Antoine Brodin To: Will Andrews Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 19:53:21 -0000 On Sat, Apr 11, 2015 at 8:51 PM, Will Andrews wrote: > Author: will > Date: Sat Apr 11 18:51:41 2015 > New Revision: 281442 > URL: https://svnweb.freebsd.org/changeset/base/281442 > > Log: > uiomove_object_page(): Avoid instantiating pages in sparse regions on reads. > > Check whether the page being requested is either resident or on swap. If > not, read from the zero_region instead of instantiating an unnecessary page. > > This avoids consuming memory for sparse files on tmpfs, when they are read > by applications that do not use SEEK_HOLE/SEEK_DATA (which is most of them). > > Reviewed by: kib > MFC after: 1 week > Sponsored by: Spectra Logic Hi, We have a daily panic on one of the package builders: https://reviews.freebsd.org/P60 Reverting this commit seems to fix the panic. Cheers, Antoine From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 20:08:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5BE9501; Thu, 23 Apr 2015 20:08:50 +0000 (UTC) Received: from mail-ig0-x22c.google.com (mail-ig0-x22c.google.com [IPv6:2607:f8b0:4001:c05::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 8164D1CEA; Thu, 23 Apr 2015 20:08:50 +0000 (UTC) Received: by igblo3 with SMTP id lo3so32834576igb.1; Thu, 23 Apr 2015 13:08:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=9BWQfHXjammrhgKlF9nT5qHNfIbpJXIvVel232th8Ug=; b=l815lW3y36ZneSvKlXS977AexkVCb1Ue4lleXNfmPE09kf/DIF2MWdEAWbF8l6DwIf JpXj12z6cw5rPg2gduJ93ivDq1U6RldwBuyu0s4GrjQRKEb2WHAZY/9Ok9TvgpupIPhR BMsBnhKISMrnsACvll0eGSsY0GYljyRiyshHSEZ5dGhLZTVtmMVYff4Bm3b9wKHoY9P3 QcQsCLfDBLNt/+Qm7JneyFaGKW6OcYIDC7Kqp9bWEVUXTatxnCKWHxqLFvn6vEeioeC4 S3GGpysxhcNZNZdr1BAeOx/Pb5Ue6JSRH5ewakaBhf9E8Qkthh54ABEB7apSCFSgEatx fzxA== X-Received: by 10.50.30.130 with SMTP id s2mr56220igh.11.1429819725521; Thu, 23 Apr 2015 13:08:45 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.48.3 with HTTP; Thu, 23 Apr 2015 13:08:24 -0700 (PDT) In-Reply-To: <201504231453.t3NErk1t011353@svn.freebsd.org> References: <201504231453.t3NErk1t011353@svn.freebsd.org> From: Ed Maste Date: Thu, 23 Apr 2015 16:08:24 -0400 X-Google-Sender-Auth: nW9FETCH3ID6199fxcYAdLVMn8I Message-ID: Subject: Re: svn commit: r281889 - head/sys/dev/kbdmux To: "Pedro F. Giffuni" Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 20:08:50 -0000 On 23 April 2015 at 10:53, Pedro F. Giffuni wrote: > Author: pfg > Date: Thu Apr 23 14:53:45 2015 > New Revision: 281889 > URL: https://svnweb.freebsd.org/changeset/base/281889 accmap, fkeymap and keymap are passed to kbd_set_maps at line 1390. After r281889 kbd has references to these freed maps and the keyboard doesn't work. From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 20:26:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0AA21943; Thu, 23 Apr 2015 20:26:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF0A91EBB; Thu, 23 Apr 2015 20:26:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NKQM0x076541; Thu, 23 Apr 2015 20:26:22 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NKQM9R076540; Thu, 23 Apr 2015 20:26:22 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504232026.t3NKQM9R076540@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 23 Apr 2015 20:26:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281901 - head/sys/dev/kbdmux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 20:26:23 -0000 Author: emaste Date: Thu Apr 23 20:26:22 2015 New Revision: 281901 URL: https://svnweb.freebsd.org/changeset/base/281901 Log: Revert r281889, it broke keyboard input Modified: head/sys/dev/kbdmux/kbdmux.c Modified: head/sys/dev/kbdmux/kbdmux.c ============================================================================== --- head/sys/dev/kbdmux/kbdmux.c Thu Apr 23 19:50:22 2015 (r281900) +++ head/sys/dev/kbdmux/kbdmux.c Thu Apr 23 20:26:22 2015 (r281901) @@ -472,11 +472,6 @@ kbdmux_init(int unit, keyboard_t **kbdp, KBDMUX_UNLOCK(state); } - if (needfree) { - free(accmap, M_KBDMUX); - free(fkeymap, M_KBDMUX); - free(keymap, M_KBDMUX); - } return (0); bad: if (needfree) { From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 20:28:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE70AAB5; Thu, 23 Apr 2015 20:28:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C2561EDC; Thu, 23 Apr 2015 20:28:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NKSveW076921; Thu, 23 Apr 2015 20:28:57 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NKSvgg076919; Thu, 23 Apr 2015 20:28:57 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504232028.t3NKSvgg076919@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 23 Apr 2015 20:28:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281902 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 20:28:57 -0000 Author: andrew Date: Thu Apr 23 20:28:56 2015 New Revision: 281902 URL: https://svnweb.freebsd.org/changeset/base/281902 Log: Update the ODROIDC1 and VSATV102 to reduce the diff to the other armv6 kernel config files. Modified: head/sys/arm/conf/ODROIDC1 head/sys/arm/conf/VSATV102 Modified: head/sys/arm/conf/ODROIDC1 ============================================================================== --- head/sys/arm/conf/ODROIDC1 Thu Apr 23 20:26:22 2015 (r281901) +++ head/sys/arm/conf/ODROIDC1 Thu Apr 23 20:28:56 2015 (r281902) @@ -1,7 +1,7 @@ # ODROIDC1 -- Custom configuration for the HardKernel ODROID-C1 SBC # -# For more information on this file, please read the handbook section on -# Kernel Configuration Files: +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: # # http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html # @@ -19,50 +19,60 @@ ident ODROIDC1 -include "../amlogic/aml8726/std.odroidc1" +include "../amlogic/aml8726/std.odroidc1" -options HZ=100 -options SCHED_ULE # ULE scheduler -options PREEMPTION # Enable kernel thread preemption -options INET # InterNETworking -options INET6 # IPv6 communications protocols -options FFS # Berkeley Fast Filesystem -options SOFTUPDATES # Enable FFS soft updates support -options UFS_ACL # Support for access control lists -options UFS_DIRHASH # Improve performance on big directories -options PROCFS # Process filesystem (requires PSEUDOFS) -options PSEUDOFS # Pseudo-filesystem framework -options GEOM_PART_BSD # BSD partition scheme -options GEOM_PART_MBR # MBR partition scheme -options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI -options KTRACE # ktrace(1) support -options SYSVSHM # SYSV-style shared memory -options SYSVMSG # SYSV-style message queues -options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions -options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. -options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options LINUX_BOOT_ABI -options VFP # vfp/neon +options HZ=100 +options SCHED_ULE # ULE scheduler +options PREEMPTION # Enable kernel thread preemption +options INET # InterNETworking +options INET6 # IPv6 communications protocols +options SCTP # Stream Control Transmission Protocol +options FFS # Berkeley Fast Filesystem +options SOFTUPDATES # Enable FFS soft updates support +options UFS_ACL # Support for access control lists +options UFS_DIRHASH # Improve performance on big directories +options UFS_GJOURNAL # Enable gjournal-based UFS journaling +options QUOTA # Enable disk quotas for UFS +options NFSCL # Network Filesystem Client +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCL +options MSDOSFS # MSDOS Filesystem +options CD9660 # ISO 9660 Filesystem +options PROCFS # Process filesystem (requires PSEUDOFS) +options PSEUDOFS # Pseudo-filesystem framework +options TMPFS # Efficient memory filesystem +options GEOM_PART_GPT # GUID Partition Tables +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme +options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] +options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI +options KTRACE # ktrace(1) support +options SYSVSHM # SYSV-style shared memory +options SYSVMSG # SYSV-style message queues +options SYSVSEM # SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions +options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. +options KBD_INSTALL_CDEV # install a CDEV entry in /dev +options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) +options LINUX_BOOT_ABI +options VFP # Enable floating point hardware support # Debugging makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -options ALT_BREAK_TO_DEBUGGER +options ALT_BREAK_TO_DEBUGGER #options VERBOSE_SYSINIT # Enable verbose sysinit messages -options BOOTVERBOSE=1 -options KDB -options DDB # Enable the kernel debugger -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +options BOOTVERBOSE=1 +options KDB # Enable kernel debugger support +# For minimum debugger support (stable branch) use: +#options KDB_TRACE # Print a stack trace for a panic +# For full debugger support use this instead: +options DDB # Enable the kernel debugger +options INVARIANTS # Enable calls of extra sanity checking +options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +options WITNESS # Enable checks to detect deadlocks and cycles +options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options DIAGNOSTIC -# NFS support -#options NFSCL # New Network Filesystem Client -#options NFSLOCKD # Network Lock Manager -#options NFS_ROOT # NFS usable as /, requires NFSCL - # NFS root from boopt/dhcp #options BOOTP #options BOOTP_NFSROOT @@ -70,12 +80,12 @@ options WITNESS_SKIPSPIN # Don't run wi #options BOOTP_NFSV3 #options BOOTP_WIRED_TO=axe0 -# MMC/SD/SDIO card slot support +# MMC/SD/SDIO Card slot support device mmc # mmc/sd bus device mmcsd # mmc/sd flash cards # Boot device is 2nd slice on MMC/SD card -options ROOTDEVNAME=\"ufs:mmcsd0s2\" +options ROOTDEVNAME=\"ufs:mmcsd0s2\" # GPIO device gpio @@ -107,8 +117,8 @@ device bpf # Berkeley packet filter # USB support device usb # General USB code (mandatory for USB) device dwcotg # DWC OTG controller -options USB_HOST_ALIGN=64 # Cacheline size is 64 -options USB_DEBUG +options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. +options USB_DEBUG #options USB_REQ_DEBUG #options USB_VERBOSE @@ -125,9 +135,9 @@ device miibus # MII bus support # SoC Ethernet, requires miibus device dwc -# USB Ethernet, requires miibus +# USB Ethernet support, requires miibus device axe # ASIX Electronics USB Ethernet # Flattened Device Tree -options FDT -options FDT_DTB_STATIC +options FDT # Configure using FDT/DTB data +options FDT_DTB_STATIC Modified: head/sys/arm/conf/VSATV102 ============================================================================== --- head/sys/arm/conf/VSATV102 Thu Apr 23 20:26:22 2015 (r281901) +++ head/sys/arm/conf/VSATV102 Thu Apr 23 20:28:56 2015 (r281902) @@ -1,7 +1,7 @@ # VSATV102 -- Custom configuration for the Visson ATV-102 media player # -# For more information on this file, please read the handbook section on -# Kernel Configuration Files: +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: # # http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html # @@ -17,52 +17,62 @@ # # $FreeBSD$ -ident VSATV102 +ident ODROIDC1 -include "../amlogic/aml8726/std.vsatv102-m6" +include "../amlogic/aml8726/std.vsatv102-m6" -options HZ=100 -options SCHED_ULE # ULE scheduler -options PREEMPTION # Enable kernel thread preemption -options INET # InterNETworking -options INET6 # IPv6 communications protocols -options FFS # Berkeley Fast Filesystem -options SOFTUPDATES # Enable FFS soft updates support -options UFS_ACL # Support for access control lists -options UFS_DIRHASH # Improve performance on big directories -options PROCFS # Process filesystem (requires PSEUDOFS) -options PSEUDOFS # Pseudo-filesystem framework -options GEOM_PART_BSD # BSD partition scheme -options GEOM_PART_MBR # MBR partition scheme -options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI -options KTRACE # ktrace(1) support -options SYSVSHM # SYSV-style shared memory -options SYSVMSG # SYSV-style message queues -options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions -options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. -options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options LINUX_BOOT_ABI -options VFP # vfp/neon +options HZ=100 +options SCHED_ULE # ULE scheduler +options PREEMPTION # Enable kernel thread preemption +options INET # InterNETworking +options INET6 # IPv6 communications protocols +options SCTP # Stream Control Transmission Protocol +options FFS # Berkeley Fast Filesystem +options SOFTUPDATES # Enable FFS soft updates support +options UFS_ACL # Support for access control lists +options UFS_DIRHASH # Improve performance on big directories +options UFS_GJOURNAL # Enable gjournal-based UFS journaling +options QUOTA # Enable disk quotas for UFS +options NFSCL # Network Filesystem Client +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCL +options MSDOSFS # MSDOS Filesystem +options CD9660 # ISO 9660 Filesystem +options PROCFS # Process filesystem (requires PSEUDOFS) +options PSEUDOFS # Pseudo-filesystem framework +options TMPFS # Efficient memory filesystem +options GEOM_PART_GPT # GUID Partition Tables +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme +options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] +options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI +options KTRACE # ktrace(1) support +options SYSVSHM # SYSV-style shared memory +options SYSVMSG # SYSV-style message queues +options SYSVSEM # SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions +options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. +options KBD_INSTALL_CDEV # install a CDEV entry in /dev +options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) +options LINUX_BOOT_ABI +options VFP # Enable floating point hardware support # Debugging makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -options ALT_BREAK_TO_DEBUGGER +options ALT_BREAK_TO_DEBUGGER #options VERBOSE_SYSINIT # Enable verbose sysinit messages -options BOOTVERBOSE=1 -options KDB -options DDB # Enable the kernel debugger -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +options BOOTVERBOSE=1 +options KDB # Enable kernel debugger support +# For minimum debugger support (stable branch) use: +#options KDB_TRACE # Print a stack trace for a panic +# For full debugger support use this instead: +options DDB # Enable the kernel debugger +options INVARIANTS # Enable calls of extra sanity checking +options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +options WITNESS # Enable checks to detect deadlocks and cycles +options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options DIAGNOSTIC -# NFS support -#options NFSCL # New Network Filesystem Client -#options NFSLOCKD # Network Lock Manager -#options NFS_ROOT # NFS usable as /, requires NFSCL - # NFS root from boopt/dhcp #options BOOTP #options BOOTP_NFSROOT @@ -70,12 +80,12 @@ options WITNESS_SKIPSPIN # Don't run wi #options BOOTP_NFSV3 #options BOOTP_WIRED_TO=axe0 -# MMC/SD/SDIO card slot support +# MMC/SD/SDIO Card slot support device mmc # mmc/sd bus device mmcsd # mmc/sd flash cards # Boot device is 2nd slice on MMC/SD card -options ROOTDEVNAME=\"ufs:mmcsd0s2\" +options ROOTDEVNAME=\"ufs:mmcsd0s2\" # GPIO device gpio @@ -107,8 +117,8 @@ device bpf # Berkeley packet filter # USB support device usb # General USB code (mandatory for USB) device dwcotg # DWC OTG controller -options USB_HOST_ALIGN=64 # Cacheline size is 64 -options USB_DEBUG +options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. +options USB_DEBUG #options USB_REQ_DEBUG #options USB_VERBOSE @@ -125,9 +135,9 @@ device miibus # MII bus support # SoC Ethernet, requires miibus device dwc -# USB Ethernet, requires miibus +# USB Ethernet support, requires miibus device axe # ASIX Electronics USB Ethernet # Flattened Device Tree -options FDT -options FDT_DTB_STATIC +options FDT # Configure using FDT/DTB data +options FDT_DTB_STATIC From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 20:36:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EF607DD7 for ; Thu, 23 Apr 2015 20:36:08 +0000 (UTC) Received: from nm2-vm1.bullet.mail.bf1.yahoo.com (nm2-vm1.bullet.mail.bf1.yahoo.com [98.139.213.158]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A1D601FC9 for ; Thu, 23 Apr 2015 20:36:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1429821361; bh=oNVS3JE+pZEFzU1BdHg41Jtep7QVFXG2gfzKJPt3PPA=; h=Date:From:To:Subject:References:In-Reply-To:From:Subject; b=huy1yKhFNh0xmLE+BrsU06E4IkrmT8RvB3rns6lExprgyR2DqV6UX61Ff9QL/RE1nys8NGolPwcjodIaox9BSwMAgsintJamdLYWwA+iSdGMQ8MsGVwoytEjKafK1PelPKu7Y0CJ9WJBHzM2eoPv01dG+svoyHJsFkv7S2ll7YhDot7R8bidFMIJaN5FHKJlcVlYrkOccNsCKnQtIhv6CyOiOZB26GmgQPdfx9zZVk1Ft4CUNwUWZDvNVRuQhivzsNC67xUuLcgcU06Q3IbLknK2VYnopXiPgxocVZHdL/Lhi/4HPUzKyb5vrfh440Xs9RG4qYomIqOeqhXxlY72PQ== Received: from [98.139.214.32] by nm2.bullet.mail.bf1.yahoo.com with NNFMP; 23 Apr 2015 20:36:01 -0000 Received: from [68.142.230.64] by tm15.bullet.mail.bf1.yahoo.com with NNFMP; 23 Apr 2015 20:36:01 -0000 Received: from [127.0.0.1] by smtp221.mail.bf1.yahoo.com with NNFMP; 23 Apr 2015 20:36:01 -0000 X-Yahoo-Newman-Id: 664158.68205.bm@smtp221.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: MWJ2KnMVM1mjqkgpTWwo0TX6vdD4PfklXV9Xy_ot_I8.xA9 7bWp_H_mykqB5MfH4VCsvk0OLbV5DJd5wdMhPzBh2NW2Af5ZfrUGrMaZrTbY 3OnqtbJq62.YfKUl3MXpulFoJsjIusqSsn005LCaleu6sBT.9356oJwjyacq 2DKz7H.O2br_uVAfyIA004RIqKhgSFYnV1VVdMZSzrn.P9QrBG6SPUswRRR. gXoPoDgXXAwtslxUepsw_KQuR848n86KF0rSCrw6vOXg6iZWm8C0qgj3JOLH vRn157dUumKVtBQ5WZALsFQ.ws7IyuFjxt5l86sGH7pxjEYDdT1WSNlZWct. dEEKxXSXxOxu9d9dK2QHjSofA9sCG4zgzPcbS7b2gU2eorY1aj47r6d4UKd7 CT4a5yWfmcGopDndaEXHHUYy598VjsIcLMFWs6QLExh1dl_3p_KVxUefu5ny RuEQ4GTI3RxkIZErTgHdpfT7ZUOlqIdGkTjshCpvsnfDRKEaTZhb.kJU0SDo cyisABG1wPxduw9B8RPJ6ZvyZihk.Pk1w X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <553957B6.4020304@FreeBSD.org> Date: Thu, 23 Apr 2015 15:36:06 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Ed Maste , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281901 - head/sys/dev/kbdmux References: <201504232026.t3NKQM9R076540@svn.freebsd.org> In-Reply-To: <201504232026.t3NKQM9R076540@svn.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 20:36:09 -0000 Thank you! On 04/23/15 15:26, Ed Maste wrote: > Author: emaste > Date: Thu Apr 23 20:26:22 2015 > New Revision: 281901 > URL: https://svnweb.freebsd.org/changeset/base/281901 > > Log: > Revert r281889, it broke keyboard input > > Modified: > head/sys/dev/kbdmux/kbdmux.c For the record: I did test the patch and my keyboard is still working. Pedro. From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 20:39:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 05E03B0; Thu, 23 Apr 2015 20:39:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D03B61FEF; Thu, 23 Apr 2015 20:39:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NKdfmi082772; Thu, 23 Apr 2015 20:39:41 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NKdfss082769; Thu, 23 Apr 2015 20:39:41 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504232039.t3NKdfss082769@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 23 Apr 2015 20:39:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281903 - head/sys/arm/amlogic/aml8726 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 20:39:42 -0000 Author: andrew Date: Thu Apr 23 20:39:40 2015 New Revision: 281903 URL: https://svnweb.freebsd.org/changeset/base/281903 Log: - Move files selected in files.smp to files.aml8726 and remove it. - Remove a redundant file from files.aml8726 Deleted: head/sys/arm/amlogic/aml8726/files.smp Modified: head/sys/arm/amlogic/aml8726/files.aml8726 head/sys/arm/amlogic/aml8726/std.odroidc1 head/sys/arm/amlogic/aml8726/std.vsatv102-m6 Modified: head/sys/arm/amlogic/aml8726/files.aml8726 ============================================================================== --- head/sys/arm/amlogic/aml8726/files.aml8726 Thu Apr 23 20:28:56 2015 (r281902) +++ head/sys/arm/amlogic/aml8726/files.aml8726 Thu Apr 23 20:39:40 2015 (r281903) @@ -4,12 +4,13 @@ kern/kern_clocksource.c standard arm/arm/bus_space_base.c standard arm/arm/bus_space_generic.c standard -arm/arm/bus_space_asm_generic.S standard +arm/arm/gic.c standard arm/arm/pl310.c standard arm/amlogic/aml8726/aml8726_l2cache.c standard arm/amlogic/aml8726/aml8726_machdep.c standard +arm/amlogic/aml8726/aml8726_mp.c optional smp arm/amlogic/aml8726/aml8726_identsoc.c standard arm/amlogic/aml8726/aml8726_ccm.c standard arm/amlogic/aml8726/aml8726_clkmsr.c standard Modified: head/sys/arm/amlogic/aml8726/std.odroidc1 ============================================================================== --- head/sys/arm/amlogic/aml8726/std.odroidc1 Thu Apr 23 20:28:56 2015 (r281902) +++ head/sys/arm/amlogic/aml8726/std.odroidc1 Thu Apr 23 20:39:40 2015 (r281903) @@ -5,7 +5,6 @@ include "../amlogic/aml8726/std.aml8726 makeoptions FDT_DTS_FILE=odroidc1.dts options SMP # Enable multiple cores -files "../amlogic/aml8726/files.smp" # Physical memory starts at 0x00000000. We assume the kernel is loaded # at 0x00100000 by u-boot (which doesn't support ubldr since it's missing Modified: head/sys/arm/amlogic/aml8726/std.vsatv102-m6 ============================================================================== --- head/sys/arm/amlogic/aml8726/std.vsatv102-m6 Thu Apr 23 20:28:56 2015 (r281902) +++ head/sys/arm/amlogic/aml8726/std.vsatv102-m6 Thu Apr 23 20:39:40 2015 (r281903) @@ -5,7 +5,6 @@ include "../amlogic/aml8726/std.aml8726 makeoptions FDT_DTS_FILE=vsatv102-m6.dts options SMP # Enable multiple cores -files "../amlogic/aml8726/files.smp" # Physical memory starts at 0x80000000. We assume the kernel is loaded # at 0x80100000 by u-boot (which doesn't support ubldr since it's missing From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 20:43:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1E1B125F; Thu, 23 Apr 2015 20:43:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8B6610BA; Thu, 23 Apr 2015 20:43:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NKhPkG086932; Thu, 23 Apr 2015 20:43:25 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NKhPsT086929; Thu, 23 Apr 2015 20:43:25 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504232043.t3NKhPsT086929@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 23 Apr 2015 20:43:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281904 - head/sys/arm/amlogic/aml8726 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 20:43:26 -0000 Author: andrew Date: Thu Apr 23 20:43:24 2015 New Revision: 281904 URL: https://svnweb.freebsd.org/changeset/base/281904 Log: Move KERNVIRTADDR to the common std.aml8726. Modified: head/sys/arm/amlogic/aml8726/std.aml8726 head/sys/arm/amlogic/aml8726/std.odroidc1 head/sys/arm/amlogic/aml8726/std.vsatv102-m6 Modified: head/sys/arm/amlogic/aml8726/std.aml8726 ============================================================================== --- head/sys/arm/amlogic/aml8726/std.aml8726 Thu Apr 23 20:39:40 2015 (r281903) +++ head/sys/arm/amlogic/aml8726/std.aml8726 Thu Apr 23 20:43:24 2015 (r281904) @@ -4,6 +4,15 @@ cpu CPU_CORTEXA machine arm armv6 makeoptions CONF_CFLAGS="-march=armv7a" +# Physical memory starts at 0x80000000. We assume the kernel is loaded +# at 0x80100000 by u-boot (which doesn't support ubldr since it's missing +# CONFIG_API). The kernel must be supplied as a binary since u-boot is +# also missing CONFIG_CMD_ELF. +# +# +options KERNVIRTADDR=0xc0100000 # Used in ldscript.arm +makeoptions KERNVIRTADDR=0xc0100000 + device fdt_pinctrl files "../amlogic/aml8726/files.aml8726" Modified: head/sys/arm/amlogic/aml8726/std.odroidc1 ============================================================================== --- head/sys/arm/amlogic/aml8726/std.odroidc1 Thu Apr 23 20:39:40 2015 (r281903) +++ head/sys/arm/amlogic/aml8726/std.odroidc1 Thu Apr 23 20:43:24 2015 (r281904) @@ -5,12 +5,3 @@ include "../amlogic/aml8726/std.aml8726 makeoptions FDT_DTS_FILE=odroidc1.dts options SMP # Enable multiple cores - -# Physical memory starts at 0x00000000. We assume the kernel is loaded -# at 0x00100000 by u-boot (which doesn't support ubldr since it's missing -# CONFIG_API). The kernel must be supplied as a binary since u-boot is -# also missing CONFIG_CMD_ELF. -# -# -options KERNVIRTADDR=0xc0100000 # Used in ldscript.arm -makeoptions KERNVIRTADDR=0xc0100000 Modified: head/sys/arm/amlogic/aml8726/std.vsatv102-m6 ============================================================================== --- head/sys/arm/amlogic/aml8726/std.vsatv102-m6 Thu Apr 23 20:39:40 2015 (r281903) +++ head/sys/arm/amlogic/aml8726/std.vsatv102-m6 Thu Apr 23 20:43:24 2015 (r281904) @@ -5,12 +5,3 @@ include "../amlogic/aml8726/std.aml8726 makeoptions FDT_DTS_FILE=vsatv102-m6.dts options SMP # Enable multiple cores - -# Physical memory starts at 0x80000000. We assume the kernel is loaded -# at 0x80100000 by u-boot (which doesn't support ubldr since it's missing -# CONFIG_API). The kernel must be supplied as a binary since u-boot is -# also missing CONFIG_CMD_ELF. -# -# -options KERNVIRTADDR=0xc0100000 # Used in ldscript.arm -makeoptions KERNVIRTADDR=0xc0100000 From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 20:53:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3FFBF6D7; Thu, 23 Apr 2015 20:53:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15F8411CA; Thu, 23 Apr 2015 20:53:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NKrTN3092198; Thu, 23 Apr 2015 20:53:29 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NKrTow092196; Thu, 23 Apr 2015 20:53:29 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504232053.t3NKrTow092196@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 23 Apr 2015 20:53:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281905 - in head/sys/arm: amlogic/aml8726 conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 20:53:30 -0000 Author: andrew Date: Thu Apr 23 20:53:29 2015 New Revision: 281905 URL: https://svnweb.freebsd.org/changeset/base/281905 Log: Remove the need for board specific std files on aml8726 by moving the options they set to the main kernel config. Deleted: head/sys/arm/amlogic/aml8726/std.odroidc1 head/sys/arm/amlogic/aml8726/std.vsatv102-m6 Modified: head/sys/arm/conf/ODROIDC1 head/sys/arm/conf/VSATV102 Modified: head/sys/arm/conf/ODROIDC1 ============================================================================== --- head/sys/arm/conf/ODROIDC1 Thu Apr 23 20:43:24 2015 (r281904) +++ head/sys/arm/conf/ODROIDC1 Thu Apr 23 20:53:29 2015 (r281905) @@ -19,7 +19,7 @@ ident ODROIDC1 -include "../amlogic/aml8726/std.odroidc1" +include "../amlogic/aml8726/std.aml8726" options HZ=100 options SCHED_ULE # ULE scheduler @@ -56,6 +56,7 @@ options KBD_INSTALL_CDEV # install a CD options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) options LINUX_BOOT_ABI options VFP # Enable floating point hardware support +options SMP # Enable multiple cores # Debugging makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols @@ -141,3 +142,4 @@ device axe # ASIX Electronics USB Eth # Flattened Device Tree options FDT # Configure using FDT/DTB data options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=odroidc1.dts Modified: head/sys/arm/conf/VSATV102 ============================================================================== --- head/sys/arm/conf/VSATV102 Thu Apr 23 20:43:24 2015 (r281904) +++ head/sys/arm/conf/VSATV102 Thu Apr 23 20:53:29 2015 (r281905) @@ -19,7 +19,7 @@ ident ODROIDC1 -include "../amlogic/aml8726/std.vsatv102-m6" +include "../amlogic/aml8726/std.aml8726" options HZ=100 options SCHED_ULE # ULE scheduler @@ -56,6 +56,7 @@ options KBD_INSTALL_CDEV # install a CD options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) options LINUX_BOOT_ABI options VFP # Enable floating point hardware support +options SMP # Enable multiple cores # Debugging makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols @@ -141,3 +142,4 @@ device axe # ASIX Electronics USB Eth # Flattened Device Tree options FDT # Configure using FDT/DTB data options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=vsatv102-m6.dts From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 21:31:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6B2FD23D; Thu, 23 Apr 2015 21:31:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A29C168D; Thu, 23 Apr 2015 21:31:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NLV7ax012685; Thu, 23 Apr 2015 21:31:07 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NLV6q5012680; Thu, 23 Apr 2015 21:31:06 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504232131.t3NLV6q5012680@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 23 Apr 2015 21:31:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281906 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 21:31:07 -0000 Author: andrew Date: Thu Apr 23 21:31:06 2015 New Revision: 281906 URL: https://svnweb.freebsd.org/changeset/base/281906 Log: Pull out the common parts of the ODROIDC1 and VSATV102 kernels to a new kernel config. This also removes the per-board config files from universe. Added: head/sys/arm/conf/AML8726 (contents, props changed) Modified: head/sys/arm/conf/ODROIDC1 head/sys/arm/conf/VSATV102 Added: head/sys/arm/conf/AML8726 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/conf/AML8726 Thu Apr 23 21:31:06 2015 (r281906) @@ -0,0 +1,143 @@ +# +# Kernel configuration for Amlogic aml8726 boards. +# +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ + +ident AML8726 +include "../amlogic/aml8726/std.aml8726" + +options HZ=100 +options SCHED_ULE # ULE scheduler +options PREEMPTION # Enable kernel thread preemption +options INET # InterNETworking +options INET6 # IPv6 communications protocols +options SCTP # Stream Control Transmission Protocol +options FFS # Berkeley Fast Filesystem +options SOFTUPDATES # Enable FFS soft updates support +options UFS_ACL # Support for access control lists +options UFS_DIRHASH # Improve performance on big directories +options UFS_GJOURNAL # Enable gjournal-based UFS journaling +options QUOTA # Enable disk quotas for UFS +options NFSCL # Network Filesystem Client +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCL +options MSDOSFS # MSDOS Filesystem +options CD9660 # ISO 9660 Filesystem +options PROCFS # Process filesystem (requires PSEUDOFS) +options PSEUDOFS # Pseudo-filesystem framework +options TMPFS # Efficient memory filesystem +options GEOM_PART_GPT # GUID Partition Tables +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme +options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] +options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI +options KTRACE # ktrace(1) support +options SYSVSHM # SYSV-style shared memory +options SYSVMSG # SYSV-style message queues +options SYSVSEM # SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions +options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. +options KBD_INSTALL_CDEV # install a CDEV entry in /dev +options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) +options LINUX_BOOT_ABI +options VFP # Enable floating point hardware support +options SMP # Enable multiple cores + +# Debugging +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +options ALT_BREAK_TO_DEBUGGER +#options VERBOSE_SYSINIT # Enable verbose sysinit messages +options BOOTVERBOSE=1 +options KDB # Enable kernel debugger support +# For minimum debugger support (stable branch) use: +#options KDB_TRACE # Print a stack trace for a panic +# For full debugger support use this instead: +options DDB # Enable the kernel debugger +options INVARIANTS # Enable calls of extra sanity checking +options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +options WITNESS # Enable checks to detect deadlocks and cycles +options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +#options DIAGNOSTIC + +# NFS root from boopt/dhcp +#options BOOTP +#options BOOTP_NFSROOT +#options BOOTP_COMPAT +#options BOOTP_NFSV3 +#options BOOTP_WIRED_TO=axe0 + +# MMC/SD/SDIO Card slot support +device mmc # mmc/sd bus +device mmcsd # mmc/sd flash cards + +# Boot device is 2nd slice on MMC/SD card +options ROOTDEVNAME=\"ufs:mmcsd0s2\" + +# GPIO +device gpio +device gpioled + +# I2C support +device iicbus +device iicbb +device iic + +# vt is the default console driver, resembling an SCO console +device vt +#device kbdmux + +# Serial (COM) ports +device uart # Generic UART driver + +# Pseudo devices. +device loop # Network loopback +device random # Entropy device +device ether # Ethernet support +device pty # BSD-style compatibility pseudo ttys + +# The `bpf' device enables the Berkeley Packet Filter. +# Be aware of the administrative consequences of enabling this! +# Note that 'bpf' is required for DHCP. +device bpf # Berkeley packet filter + +# USB support +device usb # General USB code (mandatory for USB) +device dwcotg # DWC OTG controller +options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. +options USB_DEBUG +#options USB_REQ_DEBUG +#options USB_VERBOSE + +#device ukbd # USB keyboard +#device ums # USB mouse + +device scbus # SCSI bus (required for ATA/SCSI) +device da # Direct Access (disks) +device umass # Disks/Mass storage - Requires scbus and da + +# Ethernet support +device miibus # MII bus support + +# SoC Ethernet, requires miibus +device dwc + +# USB Ethernet support, requires miibus +device axe # ASIX Electronics USB Ethernet + +# Flattened Device Tree +options FDT # Configure using FDT/DTB data Modified: head/sys/arm/conf/ODROIDC1 ============================================================================== --- head/sys/arm/conf/ODROIDC1 Thu Apr 23 20:53:29 2015 (r281905) +++ head/sys/arm/conf/ODROIDC1 Thu Apr 23 21:31:06 2015 (r281906) @@ -17,129 +17,10 @@ # # $FreeBSD$ -ident ODROIDC1 - -include "../amlogic/aml8726/std.aml8726" - -options HZ=100 -options SCHED_ULE # ULE scheduler -options PREEMPTION # Enable kernel thread preemption -options INET # InterNETworking -options INET6 # IPv6 communications protocols -options SCTP # Stream Control Transmission Protocol -options FFS # Berkeley Fast Filesystem -options SOFTUPDATES # Enable FFS soft updates support -options UFS_ACL # Support for access control lists -options UFS_DIRHASH # Improve performance on big directories -options UFS_GJOURNAL # Enable gjournal-based UFS journaling -options QUOTA # Enable disk quotas for UFS -options NFSCL # Network Filesystem Client -options NFSLOCKD # Network Lock Manager -options NFS_ROOT # NFS usable as /, requires NFSCL -options MSDOSFS # MSDOS Filesystem -options CD9660 # ISO 9660 Filesystem -options PROCFS # Process filesystem (requires PSEUDOFS) -options PSEUDOFS # Pseudo-filesystem framework -options TMPFS # Efficient memory filesystem -options GEOM_PART_GPT # GUID Partition Tables -options GEOM_PART_BSD # BSD partition scheme -options GEOM_PART_MBR # MBR partition scheme -options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] -options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI -options KTRACE # ktrace(1) support -options SYSVSHM # SYSV-style shared memory -options SYSVMSG # SYSV-style message queues -options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions -options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. -options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) -options LINUX_BOOT_ABI -options VFP # Enable floating point hardware support -options SMP # Enable multiple cores - -# Debugging -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -options ALT_BREAK_TO_DEBUGGER -#options VERBOSE_SYSINIT # Enable verbose sysinit messages -options BOOTVERBOSE=1 -options KDB # Enable kernel debugger support -# For minimum debugger support (stable branch) use: -#options KDB_TRACE # Print a stack trace for a panic -# For full debugger support use this instead: -options DDB # Enable the kernel debugger -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options DIAGNOSTIC - -# NFS root from boopt/dhcp -#options BOOTP -#options BOOTP_NFSROOT -#options BOOTP_COMPAT -#options BOOTP_NFSV3 -#options BOOTP_WIRED_TO=axe0 - -# MMC/SD/SDIO Card slot support -device mmc # mmc/sd bus -device mmcsd # mmc/sd flash cards - -# Boot device is 2nd slice on MMC/SD card -options ROOTDEVNAME=\"ufs:mmcsd0s2\" - -# GPIO -device gpio -device gpioled - -# I2C support -device iicbus -device iicbb -device iic - -# vt is the default console driver, resembling an SCO console -device vt -#device kbdmux +#NO_UNIVERSE -# Serial (COM) ports -device uart # Generic UART driver - -# Pseudo devices. -device loop # Network loopback -device random # Entropy device -device ether # Ethernet support -device pty # BSD-style compatibility pseudo ttys - -# The `bpf' device enables the Berkeley Packet Filter. -# Be aware of the administrative consequences of enabling this! -# Note that 'bpf' is required for DHCP. -device bpf # Berkeley packet filter - -# USB support -device usb # General USB code (mandatory for USB) -device dwcotg # DWC OTG controller -options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. -options USB_DEBUG -#options USB_REQ_DEBUG -#options USB_VERBOSE - -#device ukbd # USB keyboard -#device ums # USB mouse - -device scbus # SCSI bus (required for ATA/SCSI) -device da # Direct Access (disks) -device umass # Disks/Mass storage - Requires scbus and da - -# Ethernet support -device miibus # MII bus support - -# SoC Ethernet, requires miibus -device dwc - -# USB Ethernet support, requires miibus -device axe # ASIX Electronics USB Ethernet +include "AML8726" +ident ODROIDC1 -# Flattened Device Tree -options FDT # Configure using FDT/DTB data options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=odroidc1.dts Modified: head/sys/arm/conf/VSATV102 ============================================================================== --- head/sys/arm/conf/VSATV102 Thu Apr 23 20:53:29 2015 (r281905) +++ head/sys/arm/conf/VSATV102 Thu Apr 23 21:31:06 2015 (r281906) @@ -17,129 +17,10 @@ # # $FreeBSD$ -ident ODROIDC1 +#NO_UNIVERSE -include "../amlogic/aml8726/std.aml8726" +include "AML8726" +ident VSATV102 -options HZ=100 -options SCHED_ULE # ULE scheduler -options PREEMPTION # Enable kernel thread preemption -options INET # InterNETworking -options INET6 # IPv6 communications protocols -options SCTP # Stream Control Transmission Protocol -options FFS # Berkeley Fast Filesystem -options SOFTUPDATES # Enable FFS soft updates support -options UFS_ACL # Support for access control lists -options UFS_DIRHASH # Improve performance on big directories -options UFS_GJOURNAL # Enable gjournal-based UFS journaling -options QUOTA # Enable disk quotas for UFS -options NFSCL # Network Filesystem Client -options NFSLOCKD # Network Lock Manager -options NFS_ROOT # NFS usable as /, requires NFSCL -options MSDOSFS # MSDOS Filesystem -options CD9660 # ISO 9660 Filesystem -options PROCFS # Process filesystem (requires PSEUDOFS) -options PSEUDOFS # Pseudo-filesystem framework -options TMPFS # Efficient memory filesystem -options GEOM_PART_GPT # GUID Partition Tables -options GEOM_PART_BSD # BSD partition scheme -options GEOM_PART_MBR # MBR partition scheme -options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] -options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI -options KTRACE # ktrace(1) support -options SYSVSHM # SYSV-style shared memory -options SYSVMSG # SYSV-style message queues -options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions -options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. -options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) -options LINUX_BOOT_ABI -options VFP # Enable floating point hardware support -options SMP # Enable multiple cores - -# Debugging -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -options ALT_BREAK_TO_DEBUGGER -#options VERBOSE_SYSINIT # Enable verbose sysinit messages -options BOOTVERBOSE=1 -options KDB # Enable kernel debugger support -# For minimum debugger support (stable branch) use: -#options KDB_TRACE # Print a stack trace for a panic -# For full debugger support use this instead: -options DDB # Enable the kernel debugger -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options DIAGNOSTIC - -# NFS root from boopt/dhcp -#options BOOTP -#options BOOTP_NFSROOT -#options BOOTP_COMPAT -#options BOOTP_NFSV3 -#options BOOTP_WIRED_TO=axe0 - -# MMC/SD/SDIO Card slot support -device mmc # mmc/sd bus -device mmcsd # mmc/sd flash cards - -# Boot device is 2nd slice on MMC/SD card -options ROOTDEVNAME=\"ufs:mmcsd0s2\" - -# GPIO -device gpio -device gpioled - -# I2C support -device iicbus -device iicbb -device iic - -# vt is the default console driver, resembling an SCO console -device vt -#device kbdmux - -# Serial (COM) ports -device uart # Generic UART driver - -# Pseudo devices. -device loop # Network loopback -device random # Entropy device -device ether # Ethernet support -device pty # BSD-style compatibility pseudo ttys - -# The `bpf' device enables the Berkeley Packet Filter. -# Be aware of the administrative consequences of enabling this! -# Note that 'bpf' is required for DHCP. -device bpf # Berkeley packet filter - -# USB support -device usb # General USB code (mandatory for USB) -device dwcotg # DWC OTG controller -options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. -options USB_DEBUG -#options USB_REQ_DEBUG -#options USB_VERBOSE - -#device ukbd # USB keyboard -#device ums # USB mouse - -device scbus # SCSI bus (required for ATA/SCSI) -device da # Direct Access (disks) -device umass # Disks/Mass storage - Requires scbus and da - -# Ethernet support -device miibus # MII bus support - -# SoC Ethernet, requires miibus -device dwc - -# USB Ethernet support, requires miibus -device axe # ASIX Electronics USB Ethernet - -# Flattened Device Tree -options FDT # Configure using FDT/DTB data options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=vsatv102-m6.dts From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 21:39:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38356478; Thu, 23 Apr 2015 21:39:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27AC016F6; Thu, 23 Apr 2015 21:39:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NLdXEL014345; Thu, 23 Apr 2015 21:39:33 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NLdWkh014343; Thu, 23 Apr 2015 21:39:32 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504232139.t3NLdWkh014343@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 23 Apr 2015 21:39:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281907 - head/sys/arm/freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 21:39:33 -0000 Author: andrew Date: Thu Apr 23 21:39:32 2015 New Revision: 281907 URL: https://svnweb.freebsd.org/changeset/base/281907 Log: Reduce the diff between files.imx51 and files.imx53 Modified: head/sys/arm/freescale/imx/files.imx51 head/sys/arm/freescale/imx/files.imx53 Modified: head/sys/arm/freescale/imx/files.imx51 ============================================================================== --- head/sys/arm/freescale/imx/files.imx51 Thu Apr 23 21:31:06 2015 (r281906) +++ head/sys/arm/freescale/imx/files.imx51 Thu Apr 23 21:39:32 2015 (r281907) @@ -9,9 +9,12 @@ arm/freescale/imx/imx_machdep.c standar arm/freescale/imx/imx51_machdep.c standard arm/arm/bus_space_base.c standard -# Dummy serial console +# Special serial console for debuging early boot code #arm/freescale/imx/console.c standard +# UART driver (includes serial console support) +dev/uart/uart_dev_imx.c optional uart + # TrustZone Interrupt Controller arm/freescale/imx/tzic.c standard @@ -30,9 +33,6 @@ arm/freescale/imx/imx51_ccm.c standard # i.MX5xx PATA controller dev/ata/chipsets/ata-fsl.c optional imxata -# UART driver -dev/uart/uart_dev_imx.c optional uart - # USB OH3 controller (1 OTG, 3 EHCI) arm/freescale/imx/imx_nop_usbphy.c optional ehci dev/usb/controller/ehci_imx.c optional ehci Modified: head/sys/arm/freescale/imx/files.imx53 ============================================================================== --- head/sys/arm/freescale/imx/files.imx53 Thu Apr 23 21:31:06 2015 (r281906) +++ head/sys/arm/freescale/imx/files.imx53 Thu Apr 23 21:39:32 2015 (r281907) @@ -13,7 +13,7 @@ arm/arm/bus_space_base.c standard #arm/freescale/imx/console.c standard # UART driver (includes serial console support) -dev/uart/uart_dev_imx.c optional uart +dev/uart/uart_dev_imx.c optional uart # TrustZone Interrupt Controller arm/freescale/imx/tzic.c standard From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 21:43:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0891F6E6; Thu, 23 Apr 2015 21:43:27 +0000 (UTC) Received: from esa-annu.net.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id 7F00917B8; Thu, 23 Apr 2015 21:43:25 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2D7AwC/ZjlV/95baINbg15hgxXDCwmBUYYEAoFvFAEBAQEBAQGBCoQhAQEEI1YbDgYEAgINGQJZBog+DbdclGUBAQEBAQEBAQEBAQEBAQEBAQEBFQSBIYoWhFA0B4JogUUFkSWEJodWg0WQZCOEECKBdYEAAQEB X-IronPort-AV: E=Sophos;i="5.11,634,1422939600"; d="scan'208";a="207649980" Received: from muskoka.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.222]) by esa-annu.net.uoguelph.ca with ESMTP; 23 Apr 2015 17:43:17 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 090D5B402F; Thu, 23 Apr 2015 17:43:17 -0400 (EDT) Date: Thu, 23 Apr 2015 17:43:17 -0400 (EDT) From: Rick Macklem To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Edward Tomasz Napierala Message-ID: <720283503.24818611.1429825397025.JavaMail.root@uoguelph.ca> In-Reply-To: <10554184.33BWS7eSAa@ralph.baldwin.cx> Subject: Re: svn commit: r281888 - head/usr.bin/nfsstat MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.95.12] X-Mailer: Zimbra 7.2.6_GA_2926 (ZimbraWebClient - FF3.0 (Win)/7.2.6_GA_2926) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 21:43:27 -0000 John Baldwin wrote: > On Thursday, April 23, 2015 02:36:02 PM Edward Tomasz Napierala > wrote: > > Author: trasz > > Date: Thu Apr 23 14:36:01 2015 > > New Revision: 281888 > > URL: https://svnweb.freebsd.org/changeset/base/281888 > > > > Log: > > Remove oldnfs support from nfsstat(1). > > > > Reviewed by: rmacklem@ (earlier version) > > Sponsored by: The FreeBSD Foundation > > > > Modified: > > head/usr.bin/nfsstat/nfsstat.1 > > head/usr.bin/nfsstat/nfsstat.c > > It might be nice to rename the "new" datastructure names as well, so > that > ext_nfsstats would just be nfsstats. > Actually, I hope to soon add a new revision of "nfsstats", so that the "iostat like stats" can be supported (D1626) and also make all the fields uint64_t, so they don't wrap. Maybe I can all that one "nfsstats"? ;-) Btw, if you have a suggestion for the best way to acquire this new structure from the kernel, please let me know. (I was planning on code that would copy this new one to ext_nfsstats when it is acquired by an old binary.) rick > -- > John Baldwin > > From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 22:06:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1B5BA2F7; Thu, 23 Apr 2015 22:06:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F0EC61A1D; Thu, 23 Apr 2015 22:06:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NM639N028935; Thu, 23 Apr 2015 22:06:03 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NM63Kp028933; Thu, 23 Apr 2015 22:06:03 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201504232206.t3NM63Kp028933@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 23 Apr 2015 22:06:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281908 - in stable: 10/contrib/llvm/lib/MC/MCParser 10/contrib/llvm/patches 9/contrib/llvm/lib/MC/MCParser 9/contrib/llvm/patches X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 22:06:04 -0000 Author: dim Date: Thu Apr 23 22:06:02 2015 New Revision: 281908 URL: https://svnweb.freebsd.org/changeset/base/281908 Log: MFC r281775: Pull in r229911 from upstream llvm trunk (by Benjamin Kramer): MC: Allow multiple comma-separated expressions on the .uleb128 directive. For compatiblity with GNU as. Binutils documents this as '.uleb128 expressions'. Subtle, isn't it? Reported by: sbruno PR: 199554 MFC r281777: Add llvm patch corresponding to r281775. Added: stable/10/contrib/llvm/patches/patch-r281775-llvm-r229911-uleb128-commas.diff - copied unchanged from r281777, head/contrib/llvm/patches/patch-13-llvm-r229911-uleb128-commas.diff Modified: stable/10/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Added: stable/9/contrib/llvm/patches/patch-r281775-llvm-r229911-uleb128-commas.diff - copied unchanged from r281777, head/contrib/llvm/patches/patch-13-llvm-r229911-uleb128-commas.diff Modified: stable/9/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) Modified: stable/10/contrib/llvm/lib/MC/MCParser/AsmParser.cpp ============================================================================== --- stable/10/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Thu Apr 23 21:39:32 2015 (r281907) +++ stable/10/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Thu Apr 23 22:06:02 2015 (r281908) @@ -3370,21 +3370,27 @@ bool AsmParser::parseDirectiveSpace(Stri } /// parseDirectiveLEB128 -/// ::= (.sleb128 | .uleb128) expression +/// ::= (.sleb128 | .uleb128) [ expression (, expression)* ] bool AsmParser::parseDirectiveLEB128(bool Signed) { checkForValidSection(); const MCExpr *Value; - if (parseExpression(Value)) - return true; + for (;;) { + if (parseExpression(Value)) + return true; - if (getLexer().isNot(AsmToken::EndOfStatement)) - return TokError("unexpected token in directive"); + if (Signed) + getStreamer().EmitSLEB128Value(Value); + else + getStreamer().EmitULEB128Value(Value); - if (Signed) - getStreamer().EmitSLEB128Value(Value); - else - getStreamer().EmitULEB128Value(Value); + if (getLexer().is(AsmToken::EndOfStatement)) + break; + + if (getLexer().isNot(AsmToken::Comma)) + return TokError("unexpected token in directive"); + Lex(); + } return false; } Copied: stable/10/contrib/llvm/patches/patch-r281775-llvm-r229911-uleb128-commas.diff (from r281777, head/contrib/llvm/patches/patch-13-llvm-r229911-uleb128-commas.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/llvm/patches/patch-r281775-llvm-r229911-uleb128-commas.diff Thu Apr 23 22:06:02 2015 (r281908, copy of r281777, head/contrib/llvm/patches/patch-13-llvm-r229911-uleb128-commas.diff) @@ -0,0 +1,77 @@ +Pull in r229911 from upstream llvm trunk (by Benjamin Kramer): + + MC: Allow multiple comma-separated expressions on the .uleb128 directive. + + For compatiblity with GNU as. Binutils documents this as + '.uleb128 expressions'. Subtle, isn't it? + +Introduced here: http://svnweb.freebsd.org/changeset/base/281775 + +Index: lib/MC/MCParser/AsmParser.cpp +=================================================================== +--- lib/MC/MCParser/AsmParser.cpp ++++ lib/MC/MCParser/AsmParser.cpp +@@ -3636,22 +3636,28 @@ bool AsmParser::parseDirectiveSpace(StringRef IDVa + } + + /// parseDirectiveLEB128 +-/// ::= (.sleb128 | .uleb128) expression ++/// ::= (.sleb128 | .uleb128) [ expression (, expression)* ] + bool AsmParser::parseDirectiveLEB128(bool Signed) { + checkForValidSection(); + const MCExpr *Value; + +- if (parseExpression(Value)) +- return true; ++ for (;;) { ++ if (parseExpression(Value)) ++ return true; + +- if (getLexer().isNot(AsmToken::EndOfStatement)) +- return TokError("unexpected token in directive"); ++ if (Signed) ++ getStreamer().EmitSLEB128Value(Value); ++ else ++ getStreamer().EmitULEB128Value(Value); + +- if (Signed) +- getStreamer().EmitSLEB128Value(Value); +- else +- getStreamer().EmitULEB128Value(Value); ++ if (getLexer().is(AsmToken::EndOfStatement)) ++ break; + ++ if (getLexer().isNot(AsmToken::Comma)) ++ return TokError("unexpected token in directive"); ++ Lex(); ++ } ++ + return false; + } + +Index: test/MC/ELF/uleb.s +=================================================================== +--- test/MC/ELF/uleb.s ++++ test/MC/ELF/uleb.s +@@ -11,16 +11,17 @@ foo: + .uleb128 128 + .uleb128 16383 + .uleb128 16384 ++ .uleb128 23, 42 + + // ELF_32: Name: .text + // ELF_32: SectionData ( +-// ELF_32: 0000: 00017F80 01FF7F80 8001 ++// ELF_32: 0000: 00017F80 01FF7F80 8001172A + // ELF_32: ) + // ELF_64: Name: .text + // ELF_64: SectionData ( +-// ELF_64: 0000: 00017F80 01FF7F80 8001 ++// ELF_64: 0000: 00017F80 01FF7F80 8001172A + // ELF_64: ) + // MACHO_32: ('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') +-// MACHO_32: ('_section_data', '00017f80 01ff7f80 8001') ++// MACHO_32: ('_section_data', '00017f80 01ff7f80 8001172a') + // MACHO_64: ('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') +-// MACHO_64: ('_section_data', '00017f80 01ff7f80 8001') ++// MACHO_64: ('_section_data', '00017f80 01ff7f80 8001172a') From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 22:06:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3347A2F4; Thu, 23 Apr 2015 22:06:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15D131A1C; Thu, 23 Apr 2015 22:06:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NM62ZU028928; Thu, 23 Apr 2015 22:06:02 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NM62lL028925; Thu, 23 Apr 2015 22:06:02 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201504232206.t3NM62lL028925@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 23 Apr 2015 22:06:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281908 - in stable: 10/contrib/llvm/lib/MC/MCParser 10/contrib/llvm/patches 9/contrib/llvm/lib/MC/MCParser 9/contrib/llvm/patches X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 22:06:03 -0000 Author: dim Date: Thu Apr 23 22:06:02 2015 New Revision: 281908 URL: https://svnweb.freebsd.org/changeset/base/281908 Log: MFC r281775: Pull in r229911 from upstream llvm trunk (by Benjamin Kramer): MC: Allow multiple comma-separated expressions on the .uleb128 directive. For compatiblity with GNU as. Binutils documents this as '.uleb128 expressions'. Subtle, isn't it? Reported by: sbruno PR: 199554 MFC r281777: Add llvm patch corresponding to r281775. Added: stable/9/contrib/llvm/patches/patch-r281775-llvm-r229911-uleb128-commas.diff - copied unchanged from r281777, head/contrib/llvm/patches/patch-13-llvm-r229911-uleb128-commas.diff Modified: stable/9/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) Changes in other areas also in this revision: Added: stable/10/contrib/llvm/patches/patch-r281775-llvm-r229911-uleb128-commas.diff - copied unchanged from r281777, head/contrib/llvm/patches/patch-13-llvm-r229911-uleb128-commas.diff Modified: stable/10/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Directory Properties: stable/10/ (props changed) Modified: stable/9/contrib/llvm/lib/MC/MCParser/AsmParser.cpp ============================================================================== --- stable/9/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Thu Apr 23 21:39:32 2015 (r281907) +++ stable/9/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Thu Apr 23 22:06:02 2015 (r281908) @@ -3370,21 +3370,27 @@ bool AsmParser::parseDirectiveSpace(Stri } /// parseDirectiveLEB128 -/// ::= (.sleb128 | .uleb128) expression +/// ::= (.sleb128 | .uleb128) [ expression (, expression)* ] bool AsmParser::parseDirectiveLEB128(bool Signed) { checkForValidSection(); const MCExpr *Value; - if (parseExpression(Value)) - return true; + for (;;) { + if (parseExpression(Value)) + return true; - if (getLexer().isNot(AsmToken::EndOfStatement)) - return TokError("unexpected token in directive"); + if (Signed) + getStreamer().EmitSLEB128Value(Value); + else + getStreamer().EmitULEB128Value(Value); - if (Signed) - getStreamer().EmitSLEB128Value(Value); - else - getStreamer().EmitULEB128Value(Value); + if (getLexer().is(AsmToken::EndOfStatement)) + break; + + if (getLexer().isNot(AsmToken::Comma)) + return TokError("unexpected token in directive"); + Lex(); + } return false; } Copied: stable/9/contrib/llvm/patches/patch-r281775-llvm-r229911-uleb128-commas.diff (from r281777, head/contrib/llvm/patches/patch-13-llvm-r229911-uleb128-commas.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/llvm/patches/patch-r281775-llvm-r229911-uleb128-commas.diff Thu Apr 23 22:06:02 2015 (r281908, copy of r281777, head/contrib/llvm/patches/patch-13-llvm-r229911-uleb128-commas.diff) @@ -0,0 +1,77 @@ +Pull in r229911 from upstream llvm trunk (by Benjamin Kramer): + + MC: Allow multiple comma-separated expressions on the .uleb128 directive. + + For compatiblity with GNU as. Binutils documents this as + '.uleb128 expressions'. Subtle, isn't it? + +Introduced here: http://svnweb.freebsd.org/changeset/base/281775 + +Index: lib/MC/MCParser/AsmParser.cpp +=================================================================== +--- lib/MC/MCParser/AsmParser.cpp ++++ lib/MC/MCParser/AsmParser.cpp +@@ -3636,22 +3636,28 @@ bool AsmParser::parseDirectiveSpace(StringRef IDVa + } + + /// parseDirectiveLEB128 +-/// ::= (.sleb128 | .uleb128) expression ++/// ::= (.sleb128 | .uleb128) [ expression (, expression)* ] + bool AsmParser::parseDirectiveLEB128(bool Signed) { + checkForValidSection(); + const MCExpr *Value; + +- if (parseExpression(Value)) +- return true; ++ for (;;) { ++ if (parseExpression(Value)) ++ return true; + +- if (getLexer().isNot(AsmToken::EndOfStatement)) +- return TokError("unexpected token in directive"); ++ if (Signed) ++ getStreamer().EmitSLEB128Value(Value); ++ else ++ getStreamer().EmitULEB128Value(Value); + +- if (Signed) +- getStreamer().EmitSLEB128Value(Value); +- else +- getStreamer().EmitULEB128Value(Value); ++ if (getLexer().is(AsmToken::EndOfStatement)) ++ break; + ++ if (getLexer().isNot(AsmToken::Comma)) ++ return TokError("unexpected token in directive"); ++ Lex(); ++ } ++ + return false; + } + +Index: test/MC/ELF/uleb.s +=================================================================== +--- test/MC/ELF/uleb.s ++++ test/MC/ELF/uleb.s +@@ -11,16 +11,17 @@ foo: + .uleb128 128 + .uleb128 16383 + .uleb128 16384 ++ .uleb128 23, 42 + + // ELF_32: Name: .text + // ELF_32: SectionData ( +-// ELF_32: 0000: 00017F80 01FF7F80 8001 ++// ELF_32: 0000: 00017F80 01FF7F80 8001172A + // ELF_32: ) + // ELF_64: Name: .text + // ELF_64: SectionData ( +-// ELF_64: 0000: 00017F80 01FF7F80 8001 ++// ELF_64: 0000: 00017F80 01FF7F80 8001172A + // ELF_64: ) + // MACHO_32: ('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') +-// MACHO_32: ('_section_data', '00017f80 01ff7f80 8001') ++// MACHO_32: ('_section_data', '00017f80 01ff7f80 8001172a') + // MACHO_64: ('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') +-// MACHO_64: ('_section_data', '00017f80 01ff7f80 8001') ++// MACHO_64: ('_section_data', '00017f80 01ff7f80 8001172a') From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 22:20:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD88E7C8; Thu, 23 Apr 2015 22:20:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB88D1B4C; Thu, 23 Apr 2015 22:20:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NMKjE3037091; Thu, 23 Apr 2015 22:20:45 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NMKhDX036421; Thu, 23 Apr 2015 22:20:43 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504232220.t3NMKhDX036421@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 23 Apr 2015 22:20:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281909 - in head/sys: arm/conf arm/freescale/imx conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 22:20:46 -0000 Author: andrew Date: Thu Apr 23 22:20:43 2015 New Revision: 281909 URL: https://svnweb.freebsd.org/changeset/base/281909 Log: Add the SOC_IMX51, SOC_IMX53, and SOC_IMX6 options. These are used to select which SoCs the kernel config will support. Use these options to merge files.imx51 and files.imx53. Added: head/sys/arm/freescale/imx/files.imx5 - copied, changed from r281907, head/sys/arm/freescale/imx/files.imx53 Deleted: head/sys/arm/freescale/imx/files.imx51 head/sys/arm/freescale/imx/files.imx53 Modified: head/sys/arm/conf/EFIKA_MX head/sys/arm/conf/IMX53 head/sys/arm/conf/IMX6 head/sys/arm/freescale/imx/std.imx51 head/sys/arm/freescale/imx/std.imx53 head/sys/conf/options.arm Modified: head/sys/arm/conf/EFIKA_MX ============================================================================== --- head/sys/arm/conf/EFIKA_MX Thu Apr 23 22:06:02 2015 (r281908) +++ head/sys/arm/conf/EFIKA_MX Thu Apr 23 22:20:43 2015 (r281909) @@ -24,6 +24,8 @@ include "../freescale/imx/std.imx51" makeoptions WITHOUT_MODULES="ahc" +options SOC_IMX51 + options SCHED_4BSD # 4BSD scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking Modified: head/sys/arm/conf/IMX53 ============================================================================== --- head/sys/arm/conf/IMX53 Thu Apr 23 22:06:02 2015 (r281908) +++ head/sys/arm/conf/IMX53 Thu Apr 23 22:20:43 2015 (r281909) @@ -22,6 +22,8 @@ ident IMX53 include "../freescale/imx/std.imx53" +options SOC_IMX53 + options SCHED_4BSD # 4BSD scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking Modified: head/sys/arm/conf/IMX6 ============================================================================== --- head/sys/arm/conf/IMX6 Thu Apr 23 22:06:02 2015 (r281908) +++ head/sys/arm/conf/IMX6 Thu Apr 23 22:20:43 2015 (r281909) @@ -21,6 +21,8 @@ ident IMX6 include "../freescale/imx/std.imx6" +options SOC_IMX6 + options HZ=500 # Scheduling quantum is 2 milliseconds. options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption Copied and modified: head/sys/arm/freescale/imx/files.imx5 (from r281907, head/sys/arm/freescale/imx/files.imx53) ============================================================================== --- head/sys/arm/freescale/imx/files.imx53 Thu Apr 23 21:39:32 2015 (r281907, copy source) +++ head/sys/arm/freescale/imx/files.imx5 Thu Apr 23 22:20:43 2015 (r281909) @@ -6,7 +6,8 @@ kern/kern_clocksource.c standard # Init arm/freescale/imx/imx_common.c standard arm/freescale/imx/imx_machdep.c standard -arm/freescale/imx/imx53_machdep.c standard +arm/freescale/imx/imx51_machdep.c optional soc_imx51 +arm/freescale/imx/imx53_machdep.c optional soc_imx53 arm/arm/bus_space_base.c standard # Special serial console for debuging early boot code Modified: head/sys/arm/freescale/imx/std.imx51 ============================================================================== --- head/sys/arm/freescale/imx/std.imx51 Thu Apr 23 22:06:02 2015 (r281908) +++ head/sys/arm/freescale/imx/std.imx51 Thu Apr 23 22:20:43 2015 (r281909) @@ -13,5 +13,4 @@ options PHYSADDR=0x90000000 device fdt_pinctrl -files "../freescale/imx/files.imx51" - +files "../freescale/imx/files.imx5" Modified: head/sys/arm/freescale/imx/std.imx53 ============================================================================== --- head/sys/arm/freescale/imx/std.imx53 Thu Apr 23 22:06:02 2015 (r281908) +++ head/sys/arm/freescale/imx/std.imx53 Thu Apr 23 22:20:43 2015 (r281909) @@ -13,5 +13,4 @@ options PHYSADDR=0x70000000 device fdt_pinctrl -files "../freescale/imx/files.imx53" - +files "../freescale/imx/files.imx5" Modified: head/sys/conf/options.arm ============================================================================== --- head/sys/conf/options.arm Thu Apr 23 22:06:02 2015 (r281908) +++ head/sys/conf/options.arm Thu Apr 23 22:20:43 2015 (r281909) @@ -40,6 +40,9 @@ PV_STATS opt_pmap.h QEMU_WORKAROUNDS opt_global.h SOC_BCM2835 opt_global.h SOC_BCM2836 opt_global.h +SOC_IMX51 opt_global.h +SOC_IMX53 opt_global.h +SOC_IMX6 opt_global.h SOC_MV_ARMADAXP opt_global.h SOC_MV_DISCOVERY opt_global.h SOC_MV_DOVE opt_global.h From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 22:39:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8BBE9D6F; Thu, 23 Apr 2015 22:39:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 79B0F1D62; Thu, 23 Apr 2015 22:39:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NMdXEo044166; Thu, 23 Apr 2015 22:39:33 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NMdXvF044165; Thu, 23 Apr 2015 22:39:33 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504232239.t3NMdXvF044165@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 23 Apr 2015 22:39:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281910 - in stable: 10/sys/dev/acpica 9/sys/dev/acpica X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 22:39:33 -0000 Author: jhb Date: Thu Apr 23 22:39:32 2015 New Revision: 281910 URL: https://svnweb.freebsd.org/changeset/base/281910 Log: MFC 281159: Move the message complaining about failed system resource allocations under bootverbose. Every example I've seen to date has been due to an ACPI system resource device reserving a range that overlaps with system memory (which ram0 attempts to reserve) or a local or I/O APIC (which apic0 attempts to reserve). These are always harmless but look scary to users. Modified: stable/9/sys/dev/acpica/acpi.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/acpica/acpi.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/dev/acpica/acpi.c ============================================================================== --- stable/9/sys/dev/acpica/acpi.c Thu Apr 23 22:20:43 2015 (r281909) +++ stable/9/sys/dev/acpica/acpi.c Thu Apr 23 22:39:32 2015 (r281910) @@ -1112,7 +1112,7 @@ acpi_sysres_alloc(device_t dev) if (res != NULL) { rman_manage_region(rm, rman_get_start(res), rman_get_end(res)); rle->res = res; - } else + } else if (bootverbose) device_printf(dev, "reservation of %lx, %lx (%d) failed\n", rle->start, rle->count, rle->type); } From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 22:39:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EBE52D6E; Thu, 23 Apr 2015 22:39:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D99821D61; Thu, 23 Apr 2015 22:39:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NMdWc1044160; Thu, 23 Apr 2015 22:39:32 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NMdW22044159; Thu, 23 Apr 2015 22:39:32 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504232239.t3NMdW22044159@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 23 Apr 2015 22:39:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281910 - in stable: 10/sys/dev/acpica 9/sys/dev/acpica X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 22:39:33 -0000 Author: jhb Date: Thu Apr 23 22:39:32 2015 New Revision: 281910 URL: https://svnweb.freebsd.org/changeset/base/281910 Log: MFC 281159: Move the message complaining about failed system resource allocations under bootverbose. Every example I've seen to date has been due to an ACPI system resource device reserving a range that overlaps with system memory (which ram0 attempts to reserve) or a local or I/O APIC (which apic0 attempts to reserve). These are always harmless but look scary to users. Modified: stable/10/sys/dev/acpica/acpi.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/dev/acpica/acpi.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/10/sys/dev/acpica/acpi.c ============================================================================== --- stable/10/sys/dev/acpica/acpi.c Thu Apr 23 22:20:43 2015 (r281909) +++ stable/10/sys/dev/acpica/acpi.c Thu Apr 23 22:39:32 2015 (r281910) @@ -1148,7 +1148,7 @@ acpi_sysres_alloc(device_t dev) if (res != NULL) { rman_manage_region(rm, rman_get_start(res), rman_get_end(res)); rle->res = res; - } else + } else if (bootverbose) device_printf(dev, "reservation of %lx, %lx (%d) failed\n", rle->start, rle->count, rle->type); } From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 02:12:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE66F958; Fri, 24 Apr 2015 02:12:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9AE5C1173; Fri, 24 Apr 2015 02:12:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3O2CQnU051986; Fri, 24 Apr 2015 02:12:26 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3O2CQpb051985; Fri, 24 Apr 2015 02:12:26 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201504240212.t3O2CQpb051985@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 24 Apr 2015 02:12:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281911 - stable/10/sys/netinet6 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 02:12:26 -0000 Author: ae Date: Fri Apr 24 02:12:25 2015 New Revision: 281911 URL: https://svnweb.freebsd.org/changeset/base/281911 Log: MFC r281380: Fix the IPV6_MULTICAST_IF sockopt handling. RFC 3493 says when the interface index is specified as zero, the system should select the interface to use for outgoing multicast packets. Even the comment for the in6p_set_multicast_if() function says about index of zero. But in fact for zero index the function just returns EADDRNOTAVAIL. I.e. if you first set some interface and then will try reset it with zero ifindex, you will get EADDRNOTAVAIL. Reset im6o_multicast_ifp to NULL when interface index specified as zero. Also return EINVAL in case when ifnet_byindex() returns NULL. This will be the same behaviour as when ifindex is bigger than V_if_index. And return EADDRNOTAVAIL only when interface is not multicast capable. Modified: stable/10/sys/netinet6/in6_mcast.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/in6_mcast.c ============================================================================== --- stable/10/sys/netinet6/in6_mcast.c Thu Apr 23 22:39:32 2015 (r281910) +++ stable/10/sys/netinet6/in6_mcast.c Fri Apr 24 02:12:25 2015 (r281911) @@ -2350,11 +2350,15 @@ in6p_set_multicast_if(struct inpcb *inp, return (error); if (V_if_index < ifindex) return (EINVAL); - - ifp = ifnet_byindex(ifindex); - if (ifp == NULL || (ifp->if_flags & IFF_MULTICAST) == 0) - return (EADDRNOTAVAIL); - + if (ifindex == 0) + ifp = NULL; + else { + ifp = ifnet_byindex(ifindex); + if (ifp == NULL) + return (EINVAL); + if ((ifp->if_flags & IFF_MULTICAST) == 0) + return (EADDRNOTAVAIL); + } imo = in6p_findmoptions(inp); imo->im6o_multicast_ifp = ifp; INP_WUNLOCK(inp); From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 02:14:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A80B5A9E; Fri, 24 Apr 2015 02:14:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 951961183; Fri, 24 Apr 2015 02:14:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3O2E23K052247; Fri, 24 Apr 2015 02:14:02 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3O2E2rH052246; Fri, 24 Apr 2015 02:14:02 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504240214.t3O2E2rH052246@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 24 Apr 2015 02:14:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281912 - stable/10/sys/fs/nfsclient X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 02:14:02 -0000 Author: pfg Date: Fri Apr 24 02:14:01 2015 New Revision: 281912 URL: https://svnweb.freebsd.org/changeset/base/281912 Log: MFC r281756: nfsrpc_createv4: fix double free. Reported by: Oliver Pinter, clang static checker Obtained from: HardenedBSD (63cac77c42c0c3fc67da62f97d5ab651d52ae707) Reviewed by: rmacklem Modified: stable/10/sys/fs/nfsclient/nfs_clrpcops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clrpcops.c Fri Apr 24 02:12:25 2015 (r281911) +++ stable/10/sys/fs/nfsclient/nfs_clrpcops.c Fri Apr 24 02:14:01 2015 (r281912) @@ -2153,8 +2153,10 @@ nfsrpc_createv4(vnode_t dvp, char *name, (void) nfs_catnap(PZERO, ret, "nfs_crt2"); } while (ret == NFSERR_DELAY); if (ret) { - if (dp != NULL) + if (dp != NULL) { FREE((caddr_t)dp, M_NFSCLDELEG); + dp = NULL; + } if (ret == NFSERR_STALECLIENTID || ret == NFSERR_STALEDONTRECOVER || ret == NFSERR_BADSESSION) From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 02:15:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 63E38C13; Fri, 24 Apr 2015 02:15:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 513251191; Fri, 24 Apr 2015 02:15:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3O2FFIH052510; Fri, 24 Apr 2015 02:15:15 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3O2FFCB052509; Fri, 24 Apr 2015 02:15:15 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504240215.t3O2FFCB052509@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 24 Apr 2015 02:15:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281913 - stable/9/sys/fs/nfsclient X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 02:15:15 -0000 Author: pfg Date: Fri Apr 24 02:15:14 2015 New Revision: 281913 URL: https://svnweb.freebsd.org/changeset/base/281913 Log: MFC r281756: nfsrpc_createv4: fix double free. Reported by: Oliver Pinter, clang static checker Obtained from: HardenedBSD (63cac77c42c0c3fc67da62f97d5ab651d52ae707) Reviewed by: rmacklem Modified: stable/9/sys/fs/nfsclient/nfs_clrpcops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- stable/9/sys/fs/nfsclient/nfs_clrpcops.c Fri Apr 24 02:14:01 2015 (r281912) +++ stable/9/sys/fs/nfsclient/nfs_clrpcops.c Fri Apr 24 02:15:14 2015 (r281913) @@ -2027,8 +2027,10 @@ nfsrpc_createv4(vnode_t dvp, char *name, (void) nfs_catnap(PZERO, ret, "nfs_crt2"); } while (ret == NFSERR_DELAY); if (ret) { - if (dp != NULL) + if (dp != NULL) { FREE((caddr_t)dp, M_NFSCLDELEG); + dp = NULL; + } if (ret == NFSERR_STALECLIENTID || ret == NFSERR_STALEDONTRECOVER) error = ret; From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 02:43:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 660EA15E; Fri, 24 Apr 2015 02:43:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53248146E; Fri, 24 Apr 2015 02:43:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3O2h3JG067078; Fri, 24 Apr 2015 02:43:03 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3O2h3BY067077; Fri, 24 Apr 2015 02:43:03 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201504240243.t3O2h3BY067077@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 24 Apr 2015 02:43:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281914 - stable/9/sys/netinet6 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 02:43:03 -0000 Author: ae Date: Fri Apr 24 02:43:02 2015 New Revision: 281914 URL: https://svnweb.freebsd.org/changeset/base/281914 Log: MFC r281380: Fix the IPV6_MULTICAST_IF sockopt handling. RFC 3493 says when the interface index is specified as zero, the system should select the interface to use for outgoing multicast packets. Even the comment for the in6p_set_multicast_if() function says about index of zero. But in fact for zero index the function just returns EADDRNOTAVAIL. I.e. if you first set some interface and then will try reset it with zero ifindex, you will get EADDRNOTAVAIL. Reset im6o_multicast_ifp to NULL when interface index specified as zero. Also return EINVAL in case when ifnet_byindex() returns NULL. This will be the same behaviour as when ifindex is bigger than V_if_index. And return EADDRNOTAVAIL only when interface is not multicast capable. Modified: stable/9/sys/netinet6/in6_mcast.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet6/in6_mcast.c ============================================================================== --- stable/9/sys/netinet6/in6_mcast.c Fri Apr 24 02:15:14 2015 (r281913) +++ stable/9/sys/netinet6/in6_mcast.c Fri Apr 24 02:43:02 2015 (r281914) @@ -2353,11 +2353,15 @@ in6p_set_multicast_if(struct inpcb *inp, return (error); if (ifindex < 0 || V_if_index < ifindex) return (EINVAL); - - ifp = ifnet_byindex(ifindex); - if (ifp == NULL || (ifp->if_flags & IFF_MULTICAST) == 0) - return (EADDRNOTAVAIL); - + if (ifindex == 0) + ifp = NULL; + else { + ifp = ifnet_byindex(ifindex); + if (ifp == NULL) + return (EINVAL); + if ((ifp->if_flags & IFF_MULTICAST) == 0) + return (EADDRNOTAVAIL); + } imo = in6p_findmoptions(inp); imo->im6o_multicast_ifp = ifp; INP_WUNLOCK(inp); From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 03:17:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D90EB85B; Fri, 24 Apr 2015 03:17:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BAABB1889; Fri, 24 Apr 2015 03:17:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3O3HMf2083782; Fri, 24 Apr 2015 03:17:22 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3O3HL0v083778; Fri, 24 Apr 2015 03:17:21 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201504240317.t3O3HL0v083778@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 24 Apr 2015 03:17:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281915 - in head: share/man/man9 sys/kern sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 03:17:23 -0000 Author: markj Date: Fri Apr 24 03:17:21 2015 New Revision: 281915 URL: https://svnweb.freebsd.org/changeset/base/281915 Log: Make vpanic() externally visible so that it can be called as part of the DTrace panic() action. Differential Revision: https://reviews.freebsd.org/D2349 Reviewed by: avg MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/share/man/man9/Makefile head/share/man/man9/panic.9 head/sys/kern/kern_shutdown.c head/sys/sys/systm.h Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Fri Apr 24 02:43:02 2015 (r281914) +++ head/share/man/man9/Makefile Fri Apr 24 03:17:21 2015 (r281915) @@ -1135,6 +1135,7 @@ MLINKS+=osd.9 osd_call.9 \ osd.9 osd_get.9 \ osd.9 osd_register.9 \ osd.9 osd_set.9 +MLINKS+=panic.9 vpanic.9 MLINKS+=pbuf.9 getpbuf.9 \ pbuf.9 relpbuf.9 \ pbuf.9 trypbuf.9 Modified: head/share/man/man9/panic.9 ============================================================================== --- head/share/man/man9/panic.9 Fri Apr 24 02:43:02 2015 (r281914) +++ head/share/man/man9/panic.9 Fri Apr 24 03:17:21 2015 (r281915) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 11, 1995 +.Dd April 23, 2015 .Dt PANIC 9 .Os .Sh NAME @@ -42,10 +42,14 @@ .In sys/systm.h .Ft void .Fn panic "const char *fmt" ... +.Ft void +.Fn vpanic "const char *fmt" "va_list ap" .Sh DESCRIPTION The .Fn panic -function terminates the running system. +and +.Fn vpanic +functions terminate the running system. The message .Fa fmt is a Modified: head/sys/kern/kern_shutdown.c ============================================================================== --- head/sys/kern/kern_shutdown.c Fri Apr 24 02:43:02 2015 (r281914) +++ head/sys/kern/kern_shutdown.c Fri Apr 24 03:17:21 2015 (r281915) @@ -154,7 +154,6 @@ static void poweroff_wait(void *, int); static void shutdown_halt(void *junk, int howto); static void shutdown_panic(void *junk, int howto); static void shutdown_reset(void *junk, int howto); -static void vpanic(const char *fmt, va_list ap) __dead2; /* register various local shutdown events */ static void @@ -676,7 +675,7 @@ panic(const char *fmt, ...) vpanic(fmt, ap); } -static void +void vpanic(const char *fmt, va_list ap) { #ifdef SMP Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Fri Apr 24 02:43:02 2015 (r281914) +++ head/sys/sys/systm.h Fri Apr 24 03:17:21 2015 (r281915) @@ -187,6 +187,7 @@ void *phashinit(int count, struct malloc void g_waitidle(void); void panic(const char *, ...) __dead2 __printflike(1, 2); +void vpanic(const char *, __va_list) __dead2 __printflike(1, 0); void cpu_boot(int); void cpu_flush_dcache(void *, size_t); From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 03:19:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7CE4D9B7; Fri, 24 Apr 2015 03:19:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68CEB189C; Fri, 24 Apr 2015 03:19:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3O3JWVl084135; Fri, 24 Apr 2015 03:19:32 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3O3JUNe084124; Fri, 24 Apr 2015 03:19:30 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201504240319.t3O3JUNe084124@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 24 Apr 2015 03:19:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281916 - in head/sys/cddl: contrib/opensolaris/uts/common/dtrace dev/dtrace dev/dtrace/amd64 dev/dtrace/arm dev/dtrace/i386 dev/dtrace/mips dev/dtrace/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 03:19:32 -0000 Author: markj Date: Fri Apr 24 03:19:30 2015 New Revision: 281916 URL: https://svnweb.freebsd.org/changeset/base/281916 Log: Fix DTrace's panic() action. It would previously call into some unfinished Solaris compatibility code and return without actually calling panic(9). The compatibility code is unneeded, however, so just remove it and have dtrace_panic() call vpanic(9) directly. Differential Revision: https://reviews.freebsd.org/D2349 Reviewed by: avg MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c head/sys/cddl/dev/dtrace/amd64/dtrace_asm.S head/sys/cddl/dev/dtrace/arm/dtrace_asm.S head/sys/cddl/dev/dtrace/dtrace_hacks.c head/sys/cddl/dev/dtrace/i386/dtrace_asm.S head/sys/cddl/dev/dtrace/mips/dtrace_asm.S head/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Fri Apr 24 03:17:21 2015 (r281915) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Fri Apr 24 03:19:30 2015 (r281916) @@ -611,7 +611,11 @@ dtrace_panic(const char *format, ...) va_list alist; va_start(alist, format); +#ifdef __FreeBSD__ + vpanic(format, alist); +#else dtrace_vpanic(format, alist); +#endif va_end(alist); } Modified: head/sys/cddl/dev/dtrace/amd64/dtrace_asm.S ============================================================================== --- head/sys/cddl/dev/dtrace/amd64/dtrace_asm.S Fri Apr 24 03:17:21 2015 (r281915) +++ head/sys/cddl/dev/dtrace/amd64/dtrace_asm.S Fri Apr 24 03:19:30 2015 (r281916) @@ -363,211 +363,3 @@ dtrace_interrupt_enable(dtrace_icookie_t popfq ret END(dtrace_interrupt_enable) - -/* - * The panic() and cmn_err() functions invoke vpanic() as a common entry point - * into the panic code implemented in panicsys(). vpanic() is responsible - * for passing through the format string and arguments, and constructing a - * regs structure on the stack into which it saves the current register - * values. If we are not dying due to a fatal trap, these registers will - * then be preserved in panicbuf as the current processor state. Before - * invoking panicsys(), vpanic() activates the first panic trigger (see - * common/os/panic.c) and switches to the panic_stack if successful. Note that - * DTrace takes a slightly different panic path if it must panic from probe - * context. Instead of calling panic, it calls into dtrace_vpanic(), which - * sets up the initial stack as vpanic does, calls dtrace_panic_trigger(), and - * branches back into vpanic(). - */ - -/* -void -vpanic(const char *format, va_list alist) -*/ - ENTRY(vpanic) /* Initial stack layout: */ - - pushq %rbp /* | %rip | 0x60 */ - movq %rsp, %rbp /* | %rbp | 0x58 */ - pushfq /* | rfl | 0x50 */ - pushq %r11 /* | %r11 | 0x48 */ - pushq %r10 /* | %r10 | 0x40 */ - pushq %rbx /* | %rbx | 0x38 */ - pushq %rax /* | %rax | 0x30 */ - pushq %r9 /* | %r9 | 0x28 */ - pushq %r8 /* | %r8 | 0x20 */ - pushq %rcx /* | %rcx | 0x18 */ - pushq %rdx /* | %rdx | 0x10 */ - pushq %rsi /* | %rsi | 0x8 alist */ - pushq %rdi /* | %rdi | 0x0 format */ - - movq %rsp, %rbx /* %rbx = current %rsp */ - - leaq panic_quiesce(%rip), %rdi /* %rdi = &panic_quiesce */ - call panic_trigger /* %eax = panic_trigger() */ - -vpanic_common: - /* - * The panic_trigger result is in %eax from the call above, and - * dtrace_panic places it in %eax before branching here. - * The rdmsr instructions that follow below will clobber %eax so - * we stash the panic_trigger result in %r11d. - */ - movl %eax, %r11d - cmpl $0, %r11d - je 0f - - /* - * If panic_trigger() was successful, we are the first to initiate a - * panic: we now switch to the reserved panic_stack before continuing. - */ - leaq panic_stack(%rip), %rsp - addq $PANICSTKSIZE, %rsp -0: subq $REGSIZE, %rsp - /* - * Now that we've got everything set up, store the register values as - * they were when we entered vpanic() to the designated location in - * the regs structure we allocated on the stack. - */ -#ifdef notyet - movq 0x0(%rbx), %rcx - movq %rcx, REGOFF_RDI(%rsp) - movq 0x8(%rbx), %rcx - movq %rcx, REGOFF_RSI(%rsp) - movq 0x10(%rbx), %rcx - movq %rcx, REGOFF_RDX(%rsp) - movq 0x18(%rbx), %rcx - movq %rcx, REGOFF_RCX(%rsp) - movq 0x20(%rbx), %rcx - - movq %rcx, REGOFF_R8(%rsp) - movq 0x28(%rbx), %rcx - movq %rcx, REGOFF_R9(%rsp) - movq 0x30(%rbx), %rcx - movq %rcx, REGOFF_RAX(%rsp) - movq 0x38(%rbx), %rcx - movq %rcx, REGOFF_RBX(%rsp) - movq 0x58(%rbx), %rcx - - movq %rcx, REGOFF_RBP(%rsp) - movq 0x40(%rbx), %rcx - movq %rcx, REGOFF_R10(%rsp) - movq 0x48(%rbx), %rcx - movq %rcx, REGOFF_R11(%rsp) - movq %r12, REGOFF_R12(%rsp) - - movq %r13, REGOFF_R13(%rsp) - movq %r14, REGOFF_R14(%rsp) - movq %r15, REGOFF_R15(%rsp) - - xorl %ecx, %ecx - movw %ds, %cx - movq %rcx, REGOFF_DS(%rsp) - movw %es, %cx - movq %rcx, REGOFF_ES(%rsp) - movw %fs, %cx - movq %rcx, REGOFF_FS(%rsp) - movw %gs, %cx - movq %rcx, REGOFF_GS(%rsp) - - movq $0, REGOFF_TRAPNO(%rsp) - - movq $0, REGOFF_ERR(%rsp) - leaq vpanic(%rip), %rcx - movq %rcx, REGOFF_RIP(%rsp) - movw %cs, %cx - movzwq %cx, %rcx - movq %rcx, REGOFF_CS(%rsp) - movq 0x50(%rbx), %rcx - movq %rcx, REGOFF_RFL(%rsp) - movq %rbx, %rcx - addq $0x60, %rcx - movq %rcx, REGOFF_RSP(%rsp) - movw %ss, %cx - movzwq %cx, %rcx - movq %rcx, REGOFF_SS(%rsp) - - /* - * panicsys(format, alist, rp, on_panic_stack) - */ - movq REGOFF_RDI(%rsp), %rdi /* format */ - movq REGOFF_RSI(%rsp), %rsi /* alist */ - movq %rsp, %rdx /* struct regs */ - movl %r11d, %ecx /* on_panic_stack */ - call panicsys - addq $REGSIZE, %rsp -#endif - popq %rdi - popq %rsi - popq %rdx - popq %rcx - popq %r8 - popq %r9 - popq %rax - popq %rbx - popq %r10 - popq %r11 - popfq - leave - ret - END(vpanic) - -/* -void -dtrace_vpanic(const char *format, va_list alist) -*/ - ENTRY(dtrace_vpanic) /* Initial stack layout: */ - - pushq %rbp /* | %rip | 0x60 */ - movq %rsp, %rbp /* | %rbp | 0x58 */ - pushfq /* | rfl | 0x50 */ - pushq %r11 /* | %r11 | 0x48 */ - pushq %r10 /* | %r10 | 0x40 */ - pushq %rbx /* | %rbx | 0x38 */ - pushq %rax /* | %rax | 0x30 */ - pushq %r9 /* | %r9 | 0x28 */ - pushq %r8 /* | %r8 | 0x20 */ - pushq %rcx /* | %rcx | 0x18 */ - pushq %rdx /* | %rdx | 0x10 */ - pushq %rsi /* | %rsi | 0x8 alist */ - pushq %rdi /* | %rdi | 0x0 format */ - - movq %rsp, %rbx /* %rbx = current %rsp */ - - leaq panic_quiesce(%rip), %rdi /* %rdi = &panic_quiesce */ - call dtrace_panic_trigger /* %eax = dtrace_panic_trigger() */ - jmp vpanic_common - - END(dtrace_vpanic) - -/* -int -panic_trigger(int *tp) -*/ - ENTRY(panic_trigger) - xorl %eax, %eax - movl $0xdefacedd, %edx - lock - xchgl %edx, (%rdi) - cmpl $0, %edx - je 0f - movl $0, %eax - ret -0: movl $1, %eax - ret - END(panic_trigger) - -/* -int -dtrace_panic_trigger(int *tp) -*/ - ENTRY(dtrace_panic_trigger) - xorl %eax, %eax - movl $0xdefacedd, %edx - lock - xchgl %edx, (%rdi) - cmpl $0, %edx - je 0f - movl $0, %eax - ret -0: movl $1, %eax - ret - END(dtrace_panic_trigger) Modified: head/sys/cddl/dev/dtrace/arm/dtrace_asm.S ============================================================================== --- head/sys/cddl/dev/dtrace/arm/dtrace_asm.S Fri Apr 24 03:17:21 2015 (r281915) +++ head/sys/cddl/dev/dtrace/arm/dtrace_asm.S Fri Apr 24 03:19:30 2015 (r281916) @@ -170,24 +170,6 @@ ENTRY(dtrace_copystr) END(dtrace_copystr) /* -void -vpanic(const char *format, va_list alist) -*/ -ENTRY(vpanic) /* Initial stack layout: */ -vpanic_common: - RET -END(vpanic) - -/* -void -dtrace_vpanic(const char *format, va_list alist) -*/ -ENTRY(dtrace_vpanic) /* Initial stack layout: */ - b vpanic - RET -END(dtrace_vpanic) /* Initial stack layout: */ - -/* uintptr_t dtrace_caller(int aframes) */ Modified: head/sys/cddl/dev/dtrace/dtrace_hacks.c ============================================================================== --- head/sys/cddl/dev/dtrace/dtrace_hacks.c Fri Apr 24 03:17:21 2015 (r281915) +++ head/sys/cddl/dev/dtrace/dtrace_hacks.c Fri Apr 24 03:19:30 2015 (r281916) @@ -3,9 +3,6 @@ dtrace_cacheid_t dtrace_predcache_id; -int panic_quiesce; -char panic_stack[PANICSTKSIZE]; - boolean_t priv_policy_only(const cred_t *a, int b, boolean_t c) { Modified: head/sys/cddl/dev/dtrace/i386/dtrace_asm.S ============================================================================== --- head/sys/cddl/dev/dtrace/i386/dtrace_asm.S Fri Apr 24 03:17:21 2015 (r281915) +++ head/sys/cddl/dev/dtrace/i386/dtrace_asm.S Fri Apr 24 03:19:30 2015 (r281916) @@ -355,167 +355,3 @@ void dtrace_interrupt_enable(dtrace_icoo popfl ret END(dtrace_interrupt_enable) - -/* - * The panic() and cmn_err() functions invoke vpanic() as a common entry point - * into the panic code implemented in panicsys(). vpanic() is responsible - * for passing through the format string and arguments, and constructing a - * regs structure on the stack into which it saves the current register - * values. If we are not dying due to a fatal trap, these registers will - * then be preserved in panicbuf as the current processor state. Before - * invoking panicsys(), vpanic() activates the first panic trigger (see - * common/os/panic.c) and switches to the panic_stack if successful. Note that - * DTrace takes a slightly different panic path if it must panic from probe - * context. Instead of calling panic, it calls into dtrace_vpanic(), which - * sets up the initial stack as vpanic does, calls dtrace_panic_trigger(), and - * branches back into vpanic(). - */ -/* -void vpanic(const char *format, va_list alist) -*/ - ENTRY(vpanic) /* Initial stack layout: */ - - pushl %ebp /* | %eip | 20 */ - movl %esp, %ebp /* | %ebp | 16 */ - pushl %eax /* | %eax | 12 */ - pushl %ebx /* | %ebx | 8 */ - pushl %ecx /* | %ecx | 4 */ - pushl %edx /* | %edx | 0 */ - - movl %esp, %ebx /* %ebx = current stack pointer */ - - lea panic_quiesce, %eax /* %eax = &panic_quiesce */ - pushl %eax /* push &panic_quiesce */ - call panic_trigger /* %eax = panic_trigger() */ - addl $4, %esp /* reset stack pointer */ - -vpanic_common: - cmpl $0, %eax /* if (%eax == 0) */ - je 0f /* goto 0f; */ - - /* - * If panic_trigger() was successful, we are the first to initiate a - * panic: we now switch to the reserved panic_stack before continuing. - */ - lea panic_stack, %esp /* %esp = panic_stack */ - addl $PANICSTKSIZE, %esp /* %esp += PANICSTKSIZE */ - -0: subl $REGSIZE, %esp /* allocate struct regs */ - - /* - * Now that we've got everything set up, store the register values as - * they were when we entered vpanic() to the designated location in - * the regs structure we allocated on the stack. - */ -#ifdef notyet - mov %gs, %edx - mov %edx, REGOFF_GS(%esp) - mov %fs, %edx - mov %edx, REGOFF_FS(%esp) - mov %es, %edx - mov %edx, REGOFF_ES(%esp) - mov %ds, %edx - mov %edx, REGOFF_DS(%esp) - movl %edi, REGOFF_EDI(%esp) - movl %esi, REGOFF_ESI(%esp) - movl 16(%ebx), %ecx - movl %ecx, REGOFF_EBP(%esp) - movl %ebx, %ecx - addl $20, %ecx - movl %ecx, REGOFF_ESP(%esp) - movl 8(%ebx), %ecx - movl %ecx, REGOFF_EBX(%esp) - movl 0(%ebx), %ecx - movl %ecx, REGOFF_EDX(%esp) - movl 4(%ebx), %ecx - movl %ecx, REGOFF_ECX(%esp) - movl 12(%ebx), %ecx - movl %ecx, REGOFF_EAX(%esp) - movl $0, REGOFF_TRAPNO(%esp) - movl $0, REGOFF_ERR(%esp) - lea vpanic, %ecx - movl %ecx, REGOFF_EIP(%esp) - mov %cs, %edx - movl %edx, REGOFF_CS(%esp) - pushfl - popl %ecx - movl %ecx, REGOFF_EFL(%esp) - movl $0, REGOFF_UESP(%esp) - mov %ss, %edx - movl %edx, REGOFF_SS(%esp) - - movl %esp, %ecx /* %ecx = ®s */ - pushl %eax /* push on_panic_stack */ - pushl %ecx /* push ®s */ - movl 12(%ebp), %ecx /* %ecx = alist */ - pushl %ecx /* push alist */ - movl 8(%ebp), %ecx /* %ecx = format */ - pushl %ecx /* push format */ - call panicsys /* panicsys(); */ - addl $16, %esp /* pop arguments */ - - addl $REGSIZE, %esp -#endif - popl %edx - popl %ecx - popl %ebx - popl %eax - leave - ret - END(vpanic) - -/* -void dtrace_vpanic(const char *format, va_list alist) -*/ - ENTRY(dtrace_vpanic) /* Initial stack layout: */ - - pushl %ebp /* | %eip | 20 */ - movl %esp, %ebp /* | %ebp | 16 */ - pushl %eax /* | %eax | 12 */ - pushl %ebx /* | %ebx | 8 */ - pushl %ecx /* | %ecx | 4 */ - pushl %edx /* | %edx | 0 */ - - movl %esp, %ebx /* %ebx = current stack pointer */ - - lea panic_quiesce, %eax /* %eax = &panic_quiesce */ - pushl %eax /* push &panic_quiesce */ - call dtrace_panic_trigger /* %eax = dtrace_panic_trigger() */ - addl $4, %esp /* reset stack pointer */ - jmp vpanic_common /* jump back to common code */ - - END(dtrace_vpanic) - -/* -int -panic_trigger(int *tp) -*/ - ENTRY(panic_trigger) - xorl %eax, %eax - movl $0xdefacedd, %edx - lock - xchgl %edx, (%edi) - cmpl $0, %edx - je 0f - movl $0, %eax - ret -0: movl $1, %eax - ret - END(panic_trigger) - -/* -int -dtrace_panic_trigger(int *tp) -*/ - ENTRY(dtrace_panic_trigger) - xorl %eax, %eax - movl $0xdefacedd, %edx - lock - xchgl %edx, (%edi) - cmpl $0, %edx - je 0f - movl $0, %eax - ret -0: movl $1, %eax - ret - END(dtrace_panic_trigger) Modified: head/sys/cddl/dev/dtrace/mips/dtrace_asm.S ============================================================================== --- head/sys/cddl/dev/dtrace/mips/dtrace_asm.S Fri Apr 24 03:17:21 2015 (r281915) +++ head/sys/cddl/dev/dtrace/mips/dtrace_asm.S Fri Apr 24 03:19:30 2015 (r281916) @@ -249,49 +249,6 @@ LEAF(dtrace_invop_uninit) END(dtrace_invop_uninit) /* - * The panic() and cmn_err() functions invoke vpanic() as a common entry point - * into the panic code implemented in panicsys(). vpanic() is responsible - * for passing through the format string and arguments, and constructing a - * regs structure on the stack into which it saves the current register - * values. If we are not dying due to a fatal trap, these registers will - * then be preserved in panicbuf as the current processor state. Before - * invoking panicsys(), vpanic() activates the first panic trigger (see - * common/os/panic.c) and switches to the panic_stack if successful. Note that - * DTrace takes a slightly different panic path if it must panic from probe - * context. Instead of calling panic, it calls into dtrace_vpanic(), which - * sets up the initial stack as vpanic does, calls dtrace_panic_trigger(), and - * branches back into vpanic(). - */ - -/* -void -vpanic(const char *format, va_list alist) -*/ -LEAF(vpanic) /* Initial stack layout: */ - -vpanic_common: - j ra - nop -END(vpanic) - - - -/* -void -dtrace_vpanic(const char *format, va_list alist) -*/ -LEAF(dtrace_vpanic) /* Initial stack layout: */ - -#if 0 - jal dtrace_panic_trigger /* %eax = dtrace_panic_trigger() */ - nop -#endif - j vpanic_common - nop - -END(dtrace_vpanic) - -/* uintptr_t dtrace_caller(int aframes) */ @@ -300,4 +257,3 @@ LEAF(dtrace_caller) j ra nop END(dtrace_caller) - Modified: head/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S ============================================================================== --- head/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S Fri Apr 24 03:17:21 2015 (r281915) +++ head/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S Fri Apr 24 03:19:30 2015 (r281916) @@ -161,45 +161,6 @@ ASENTRY_NOPROF(dtrace_copystr) END(dtrace_copystr) /* - * The panic() and cmn_err() functions invoke vpanic() as a common entry point - * into the panic code implemented in panicsys(). vpanic() is responsible - * for passing through the format string and arguments, and constructing a - * regs structure on the stack into which it saves the current register - * values. If we are not dying due to a fatal trap, these registers will - * then be preserved in panicbuf as the current processor state. Before - * invoking panicsys(), vpanic() activates the first panic trigger (see - * common/os/panic.c) and switches to the panic_stack if successful. Note that - * DTrace takes a slightly different panic path if it must panic from probe - * context. Instead of calling panic, it calls into dtrace_vpanic(), which - * sets up the initial stack as vpanic does, calls dtrace_panic_trigger(), and - * branches back into vpanic(). - */ - -/* -void -vpanic(const char *format, va_list alist) -*/ -ASENTRY_NOPROF(vpanic) /* Initial stack layout: */ - -vpanic_common: - blr -END(vpanic) - - - -/* -void -dtrace_vpanic(const char *format, va_list alist) -*/ -ASENTRY_NOPROF(dtrace_vpanic) /* Initial stack layout: */ - -#if 0 - bl dtrace_panic_trigger /* %eax = dtrace_panic_trigger() */ -#endif - b vpanic_common -END(dtrace_vpanic) - -/* uintptr_t dtrace_caller(int aframes) */ @@ -207,4 +168,3 @@ ASENTRY_NOPROF(dtrace_caller) li %r3, -1 blr END(dtrace_caller) - From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 03:23:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38F38B1D; Fri, 24 Apr 2015 03:23:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DB0D1960; Fri, 24 Apr 2015 03:23:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3O3NfZ2088328; Fri, 24 Apr 2015 03:23:41 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3O3NfSf088327; Fri, 24 Apr 2015 03:23:41 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201504240323.t3O3NfSf088327@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 24 Apr 2015 03:23:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281917 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 03:23:42 -0000 Author: markj Date: Fri Apr 24 03:23:41 2015 New Revision: 281917 URL: https://svnweb.freebsd.org/changeset/base/281917 Log: Add _.arm64.* to the svn:ignore property for head/. Modified: Directory Properties: head/ (props changed) From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 04:57:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53BF1B87; Fri, 24 Apr 2015 04:57:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 431FA11C7; Fri, 24 Apr 2015 04:57:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3O4vJa0033642; Fri, 24 Apr 2015 04:57:19 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3O4vJ47033641; Fri, 24 Apr 2015 04:57:19 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201504240457.t3O4vJ47033641@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Fri, 24 Apr 2015 04:57:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281918 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 04:57:19 -0000 Author: kevlo Date: Fri Apr 24 04:57:18 2015 New Revision: 281918 URL: https://svnweb.freebsd.org/changeset/base/281918 Log: - Fix the length of efuse content. - Replace the magic numbers with something more readable. Modified: head/sys/dev/usb/wlan/if_urtwn.c Modified: head/sys/dev/usb/wlan/if_urtwn.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtwn.c Fri Apr 24 03:23:41 2015 (r281917) +++ head/sys/dev/usb/wlan/if_urtwn.c Fri Apr 24 04:57:18 2015 (r281918) @@ -1236,9 +1236,11 @@ urtwn_efuse_read(struct urtwn_softc *sc) static void urtwn_efuse_switch_power(struct urtwn_softc *sc) { - uint8_t vol; uint32_t reg; + if (sc->chip & URTWN_CHIP_88E) + urtwn_write_1(sc, R92C_EFUSE_ACCESS, R92C_EFUSE_ACCESS_ON); + reg = urtwn_read_2(sc, R92C_SYS_ISO_CTRL); if (!(reg & R92C_SYS_ISO_CTRL_PWC_EV12V)) { urtwn_write_2(sc, R92C_SYS_ISO_CTRL, @@ -1256,11 +1258,15 @@ urtwn_efuse_switch_power(struct urtwn_so reg | R92C_SYS_CLKR_LOADER_EN | R92C_SYS_CLKR_ANA8M); } - /* Enable LDO 2.5V. */ - vol = urtwn_read_1(sc, R92C_EFUSE_TEST + 3); - vol &= 0x0f; - vol |= 0x30; - urtwn_write_1(sc, R92C_EFUSE_TEST + 3, (vol | 0x80)); + if (!(sc->chip & URTWN_CHIP_88E)) { + uint8_t vol; + + /* Enable LDO 2.5V. */ + vol = urtwn_read_1(sc, R92C_EFUSE_TEST + 3); + vol &= 0x0f; + vol |= 0x30; + urtwn_write_1(sc, R92C_EFUSE_TEST + 3, (vol | 0x80)); + } } static int @@ -1328,7 +1334,7 @@ urtwn_r88e_read_rom(struct urtwn_softc * /* Read full ROM image. */ memset(&sc->r88e_rom, 0xff, sizeof(sc->r88e_rom)); - while (addr < 1024) { + while (addr < 512) { reg = urtwn_efuse_read_1(sc, addr); if (reg == 0xff) break; @@ -1354,6 +1360,8 @@ urtwn_r88e_read_rom(struct urtwn_softc * } } + urtwn_write_1(sc, R92C_EFUSE_ACCESS, R92C_EFUSE_ACCESS_OFF); + addr = 0x10; for (i = 0; i < 6; i++) sc->cck_tx_pwr[i] = sc->r88e_rom[addr++]; @@ -2193,14 +2201,12 @@ urtwn_r92c_power_on(struct urtwn_softc * static int urtwn_r88e_power_on(struct urtwn_softc *sc) { - uint8_t val; uint32_t reg; int ntries; /* Wait for power ready bit. */ for (ntries = 0; ntries < 5000; ntries++) { - val = urtwn_read_1(sc, 0x6) & 0x2; - if (val == 0x2) + if (urtwn_read_4(sc, R92C_APS_FSMCO) & R92C_APS_FSMCO_SUS_HOST) break; urtwn_ms_delay(sc); } @@ -2215,17 +2221,23 @@ urtwn_r88e_power_on(struct urtwn_softc * urtwn_read_1(sc, R92C_SYS_FUNC_EN) & ~(R92C_SYS_FUNC_EN_BBRSTB | R92C_SYS_FUNC_EN_BB_GLB_RST)); - urtwn_write_1(sc, 0x26, urtwn_read_1(sc, 0x26) | 0x80); + urtwn_write_1(sc, R92C_AFE_XTAL_CTRL + 2, + urtwn_read_1(sc, R92C_AFE_XTAL_CTRL + 2) | 0x80); /* Disable HWPDN. */ - urtwn_write_1(sc, 0x5, urtwn_read_1(sc, 0x5) & ~0x80); + urtwn_write_2(sc, R92C_APS_FSMCO, + urtwn_read_2(sc, R92C_APS_FSMCO) & ~R92C_APS_FSMCO_APDM_HPDN); /* Disable WL suspend. */ - urtwn_write_1(sc, 0x5, urtwn_read_1(sc, 0x5) & ~0x18); + urtwn_write_2(sc, R92C_APS_FSMCO, + urtwn_read_2(sc, R92C_APS_FSMCO) & + ~(R92C_APS_FSMCO_AFSM_HSUS | R92C_APS_FSMCO_AFSM_PCIE)); - urtwn_write_1(sc, 0x5, urtwn_read_1(sc, 0x5) | 0x1); + urtwn_write_2(sc, R92C_APS_FSMCO, + urtwn_read_2(sc, R92C_APS_FSMCO) | R92C_APS_FSMCO_APFM_ONMAC); for (ntries = 0; ntries < 5000; ntries++) { - if (!(urtwn_read_1(sc, 0x5) & 0x1)) + if (!(urtwn_read_2(sc, R92C_APS_FSMCO) & + R92C_APS_FSMCO_APFM_ONMAC)) break; urtwn_ms_delay(sc); } @@ -2233,7 +2245,8 @@ urtwn_r88e_power_on(struct urtwn_softc * return (ETIMEDOUT); /* Enable LDO normal mode. */ - urtwn_write_1(sc, 0x23, urtwn_read_1(sc, 0x23) & ~0x10); + urtwn_write_1(sc, R92C_LPLDO_CTRL, + urtwn_read_1(sc, R92C_LPLDO_CTRL) & ~0x10); /* Enable MAC DMA/WMAC/SCHEDULE/SEC blocks. */ urtwn_write_2(sc, R92C_CR, 0); From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 05:00:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E08EF45; Fri, 24 Apr 2015 05:00:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D64E1202; Fri, 24 Apr 2015 05:00:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3O50wHA036447; Fri, 24 Apr 2015 05:00:58 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3O50wlq036425; Fri, 24 Apr 2015 05:00:58 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201504240500.t3O50wlq036425@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Fri, 24 Apr 2015 05:00:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281919 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 05:00:58 -0000 Author: kevlo Date: Fri Apr 24 05:00:57 2015 New Revision: 281919 URL: https://svnweb.freebsd.org/changeset/base/281919 Log: Plural fix. Modified: head/share/man/man4/urtwn.4 Modified: head/share/man/man4/urtwn.4 ============================================================================== --- head/share/man/man4/urtwn.4 Fri Apr 24 04:57:18 2015 (r281918) +++ head/share/man/man4/urtwn.4 Fri Apr 24 05:00:57 2015 (r281919) @@ -52,7 +52,7 @@ The driver supports USB 2.0 wireless network devices based on Realtek RTL8188CUS, RTL8188CE-VAU, RTL8188EUS, RTL8188RU and RTL8192CU chipsets. .Pp -The RTL8188CUS and RTL8188EUS are highly integrated 802.11n adapter that +The RTL8188CUS and RTL8188EUS are highly integrated 802.11n adapters that combine a MAC, a 1T1R capable baseband and an RF in a single chip. They operate in the 2GHz spectrum only. The RTL8188RU is a high-power variant of the RTL8188CUS. From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 05:27:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E8E185FC for ; Fri, 24 Apr 2015 05:27:05 +0000 (UTC) Received: from nm18-vm2.bullet.mail.gq1.yahoo.com (nm18-vm2.bullet.mail.gq1.yahoo.com [98.136.217.217]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B71971503 for ; Fri, 24 Apr 2015 05:27:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1429853218; bh=QxFoRR8yb6O49E8K5pMCQZQo3dm8gNnj/ahtKlaLysc=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject; b=Au4P903x4xhCnUnCwHDpX+z8Evj23FSLdLGyXSAusXimofuF9ryfVfg7Mm0OM4M34RYa/XKi10FUKCyQ51HAfl90pevhtYLRVzs7SLgf4Tc7gkWo3RAzsy3TN1booLrgk13wQ1ZOxHYVGssSDW+C9h454KI2SWzD1vrqGlJ7gQBePfD5L26WKhOWq+Hgz9zI1nqn0bXRzxWro1v8QrkGQcJh+XKnpM87pbbqkA38uzp6whu5eup6CXwNRbNmMPkdy6srahMYFia5N/duUA+hsM7bTDfFbGkqoCkw4L16s6RYSJnxq3j8RTFBYewnnUFvMr2JLXc5Gmo5mWUut24Amw== Received: from [98.137.12.189] by nm18.bullet.mail.gq1.yahoo.com with NNFMP; 24 Apr 2015 05:26:58 -0000 Received: from [208.71.42.200] by tm10.bullet.mail.gq1.yahoo.com with NNFMP; 24 Apr 2015 05:26:58 -0000 Received: from [127.0.0.1] by smtp211.mail.gq1.yahoo.com with NNFMP; 24 Apr 2015 05:26:58 -0000 X-Yahoo-Newman-Id: 473614.4371.bm@smtp211.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: e0FFuP8VM1kq1zSJx1m31DfNsFK5AAd7Zaa2gdeO6A.IWn3 KJNMgS9p5XzSLyqs2jPzkq2WUdxR0.tt5djquR0zErA3Evhnj8mnS8QV5c4i yY1oCYYO8cxNJ9oMvo8qxph28O.egTcDv18K1hEMZKfnzwTSl.lCDHZeyU6s yMrCVB8os.8v9.YK6FamobSjDg8fheNeCPRy9kCPz_zbyVOHHgeeqq4j1Qbr p5B8WgO87ZjIXr4dTuWGqnYI.nFAg3rvjWHmokIRkdZlS90cqldNJ2moAKXO oBX2SZul6N73CMx1JKjJ.I_DjPGH3_.gO_HyEScYasD0_CMNjIS223hEpIb2 DVZfYNpP_OjWWGYuY.5BARoJJI6QAMMUlQK_cRKGg2M4AJi39KGRw3W9vVxZ q1bno9je8t.yiaWCUGZE0lPkZdB_usuWdYshnroVGJYAvIMcJHf1rQ5xXXhL xl71dQMlTvUxGGbJAmF58xVxRIFdXE6VJpV7AUE3lUWavLDcDKgN.7wLkerN 4F8_J3FesHRo6t2wg.kAMnq5Hic5K3fxUFWgpsXC_ X-Yahoo-SMTP: clhABp.swBB7fs.LwIJpv3jkWgo2NU8- Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r281451 - head/sys/vm From: Scott Long In-Reply-To: <20150423192819.GA13122@dchagin.static.corbina.net> Date: Thu, 23 Apr 2015 23:26:55 -0600 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201504120621.t3C6LxAV095209@svn.freebsd.org> <5B48434B-EA97-45B3-BC4E-B039A868186B@yahoo.com> <4E109480-FD27-4C7F-8B5F-B1DB2232CD3D@yahoo.com> <20150423192819.GA13122@dchagin.static.corbina.net> To: Chagin Dmitry X-Mailer: Apple Mail (2.2070.6) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 05:27:06 -0000 > On Apr 23, 2015, at 1:28 PM, Chagin Dmitry = wrote: >=20 > On Thu, Apr 23, 2015 at 12:49:51PM -0600, Scott Long wrote: >>=20 >>> On Apr 23, 2015, at 6:19 AM, Scott Long = wrote: >>>=20 >>>>=20 >>>> On Apr 12, 2015, at 12:21 AM, Dmitry Chagin = wrote: >>>>=20 >>>> Author: dchagin >>>> Date: Sun Apr 12 06:21:58 2015 >>>> New Revision: 281451 >>>> URL: https://svnweb.freebsd.org/changeset/base/281451 >>>>=20 >>>> Log: >>>> Rework r281162. Indeed, the flexible array member is preferable = here. >>>>=20 >>>> Suggested by: Justin T. Gibbs >>>>=20 >>>> MFC after: 3 days >>>>=20 >>>> Modified: >>>> head/sys/vm/uma_core.c >>>> head/sys/vm/uma_int.h >>>=20 >>> There???s still something wrong with this. I have a machine with 28 = cores (56 with hyperthreading) and 256GB of RAM, and ever since you = committed r281162, it panics early in boot with a failed assertion. It = looks like the first few members of a uma_slab_t are getting overwritten = accidentally, and somehow the padding of the extra member in the = uma_zone_t was previously protecting it. I don???t know the exact cause = yet, but I must ask that you revert to r281161 in HEAD and stable/10 = until the problem is resolved. >>>=20 >>=20 >> I think the problem is that the masterzone_k and masterzone_z objects = that are statically allocated in uma_core.c no longer have space for the = uz_cpu field, but uma_zalloc_arg() always assumes that it???s there. = Early in boot when the ???kegs' and ???zones??? zones are being = initialized, there???s only 1 CPU so pre-allocating 1 uz_cpu element in = the uma_zone is enough. I can???t see any way around this without = significantly changing how uma_zalloc_arg() treats per-cpu caches. I = think it???s best to revert this change. >>=20 > Hi, > they initialized in uma_startup() and not used before. > I have a private converstion with a man which stable/10 hangs in = vm_mem_init().\ > with my commit. weird. >=20 > I do not object to revert, but give me a chance to figure out what's = going on. With INVARIANTS enabled, the system will panic. Without it, it will = spin in vm_mem_init(), as you noted. Even if it=E2=80=99s not happening = to everyone, it=E2=80=99s a serious problem for such a minor anticipated = benefit. I must insist that it be reverted. Scott From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 06:00:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31EB6CE8; Fri, 24 Apr 2015 06:00:19 +0000 (UTC) Received: from mail-ie0-x22f.google.com (mail-ie0-x22f.google.com [IPv6:2607:f8b0:4001:c03::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0239D1867; Fri, 24 Apr 2015 06:00:19 +0000 (UTC) Received: by iebrs15 with SMTP id rs15so76927477ieb.3; Thu, 23 Apr 2015 23:00:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=gHnhLvzhQf0I5x8tWCGWRwil018ZTB1aP1xpLnJDxXc=; b=uUmR2Pd6CE4A6hYVPvET6AfKZgsWDuO4wlm4eUcc9ZkXmaVE35SHBLEX4pG3U3tUiA T+1pf/kA78NOM5n6rWZlVko6gpe+h8xjKtbT23TGO4N6tBdnOtDKh49UHPx/E5s9W7R2 n7KvdIESb2OiMgnIc+5Vgwu3HuqyX4bcqX462Ny/xJV4P0+9ByAwFVlTCQiHzel9Rkf0 k9U86ag89qbbRMVieKsOTY5Cm3gI6Y8/5AR+cVOdqIfL67NnUFz4ykAu58FnyGfLl/nC qvoM8CWcwGFiZr1Aozxct+DZo7dhSvC8Kdq8B4/XQVUB1tFMaQe0l7A1itPTV7FlnBiH FNqQ== MIME-Version: 1.0 X-Received: by 10.107.136.25 with SMTP id k25mr8569479iod.88.1429855218034; Thu, 23 Apr 2015 23:00:18 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.38.133 with HTTP; Thu, 23 Apr 2015 23:00:17 -0700 (PDT) In-Reply-To: References: <201504120621.t3C6LxAV095209@svn.freebsd.org> <5B48434B-EA97-45B3-BC4E-B039A868186B@yahoo.com> <4E109480-FD27-4C7F-8B5F-B1DB2232CD3D@yahoo.com> <20150423192819.GA13122@dchagin.static.corbina.net> Date: Thu, 23 Apr 2015 23:00:17 -0700 X-Google-Sender-Auth: zr7-ilGzD7kwJH2J1vlqI-LuYWY Message-ID: Subject: Re: svn commit: r281451 - head/sys/vm From: Adrian Chadd To: Scott Long Cc: Chagin Dmitry , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 06:00:19 -0000 On 23 April 2015 at 22:26, Scott Long wrote: > >> On Apr 23, 2015, at 1:28 PM, Chagin Dmitry wrote: >> >> On Thu, Apr 23, 2015 at 12:49:51PM -0600, Scott Long wrote: >>> >>>> On Apr 23, 2015, at 6:19 AM, Scott Long wrote: >>>> >>>>> >>>>> On Apr 12, 2015, at 12:21 AM, Dmitry Chagin wro= te: >>>>> >>>>> Author: dchagin >>>>> Date: Sun Apr 12 06:21:58 2015 >>>>> New Revision: 281451 >>>>> URL: https://svnweb.freebsd.org/changeset/base/281451 >>>>> >>>>> Log: >>>>> Rework r281162. Indeed, the flexible array member is preferable here. >>>>> >>>>> Suggested by: Justin T. Gibbs >>>>> >>>>> MFC after: 3 days >>>>> >>>>> Modified: >>>>> head/sys/vm/uma_core.c >>>>> head/sys/vm/uma_int.h >>>> >>>> There???s still something wrong with this. I have a machine with 28 c= ores (56 with hyperthreading) and 256GB of RAM, and ever since you committe= d r281162, it panics early in boot with a failed assertion. It looks like = the first few members of a uma_slab_t are getting overwritten accidentally,= and somehow the padding of the extra member in the uma_zone_t was previous= ly protecting it. I don???t know the exact cause yet, but I must ask that = you revert to r281161 in HEAD and stable/10 until the problem is resolved. >>>> >>> >>> I think the problem is that the masterzone_k and masterzone_z objects t= hat are statically allocated in uma_core.c no longer have space for the uz_= cpu field, but uma_zalloc_arg() always assumes that it???s there. Early in= boot when the ???kegs' and ???zones??? zones are being initialized, there?= ??s only 1 CPU so pre-allocating 1 uz_cpu element in the uma_zone is enough= . I can???t see any way around this without significantly changing how uma= _zalloc_arg() treats per-cpu caches. I think it???s best to revert this ch= ange. >>> >> Hi, >> they initialized in uma_startup() and not used before. >> I have a private converstion with a man which stable/10 hangs in vm_mem_= init().\ >> with my commit. weird. >> >> I do not object to revert, but give me a chance to figure out what's goi= ng on. > > With INVARIANTS enabled, the system will panic. Without it, it will spin= in vm_mem_init(), as you noted. Even if it=E2=80=99s not happening to eve= ryone, it=E2=80=99s a serious problem for such a minor anticipated benefit.= I must insist that it be reverted. Hi, +1 - please revert the patch for now and figure it out locally. Having -HEAD broken is very annoying. -a From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 07:24:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4683BAC3; Fri, 24 Apr 2015 07:24:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 34F0410FE; Fri, 24 Apr 2015 07:24:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3O7OWK5006955; Fri, 24 Apr 2015 07:24:32 GMT (envelope-from takawata@FreeBSD.org) Received: (from takawata@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3O7OWHf006954; Fri, 24 Apr 2015 07:24:32 GMT (envelope-from takawata@FreeBSD.org) Message-Id: <201504240724.t3O7OWHf006954@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: takawata set sender to takawata@FreeBSD.org using -f From: Takanori Watanabe Date: Fri, 24 Apr 2015 07:24:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281920 - head/sys/dev/ichsmb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 07:24:32 -0000 Author: takawata Date: Fri Apr 24 07:24:31 2015 New Revision: 281920 URL: https://svnweb.freebsd.org/changeset/base/281920 Log: Add Lynx-Point LP smbus controller ID. Modified: head/sys/dev/ichsmb/ichsmb_pci.c Modified: head/sys/dev/ichsmb/ichsmb_pci.c ============================================================================== --- head/sys/dev/ichsmb/ichsmb_pci.c Fri Apr 24 05:00:57 2015 (r281919) +++ head/sys/dev/ichsmb/ichsmb_pci.c Fri Apr 24 07:24:31 2015 (r281920) @@ -88,6 +88,7 @@ __FBSDID("$FreeBSD$"); #define ID_AVOTON 0x1f3c8086 #define ID_COLETOCRK 0x23B08086 #define ID_LPT 0x8c228086 +#define ID_LPTLP 0x9c228086 #define ID_WCPT 0x8ca28086 #define ID_WCPTLP 0x9ca28086 @@ -199,6 +200,9 @@ ichsmb_pci_probe(device_t dev) case ID_LPT: device_set_desc(dev, "Intel Lynx Point SMBus controller"); break; + case ID_LPTLP: + device_set_desc(dev, "Intel Lynx Point-LP SMBus controller"); + break; case ID_WCPT: device_set_desc(dev, "Intel Wildcat Point SMBus controller"); break; From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 07:52:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E521B358; Fri, 24 Apr 2015 07:52:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D35FE1465; Fri, 24 Apr 2015 07:52:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3O7qLFR021761; Fri, 24 Apr 2015 07:52:21 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3O7qLLi021760; Fri, 24 Apr 2015 07:52:21 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201504240752.t3O7qLLi021760@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Fri, 24 Apr 2015 07:52:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281921 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 07:52:22 -0000 Author: bz Date: Fri Apr 24 07:52:21 2015 New Revision: 281921 URL: https://svnweb.freebsd.org/changeset/base/281921 Log: MFC r280786: Try to unbreak !SMP kernels broken in r280785 (head), r281657 by using the proper macros to access cc_cpu. Requested by: jmallett Pointyhat to: rrs Modified: stable/10/sys/kern/kern_timeout.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_timeout.c ============================================================================== --- stable/10/sys/kern/kern_timeout.c Fri Apr 24 07:24:31 2015 (r281920) +++ stable/10/sys/kern/kern_timeout.c Fri Apr 24 07:52:21 2015 (r281921) @@ -256,7 +256,7 @@ callout_callwheel_init(void *dummy) * XXX: Clip callout to result of previous function of maxusers * maximum 384. This is still huge, but acceptable. */ - memset(cc_cpu, 0, sizeof(cc_cpu)); + memset(CC_CPU(0), 0, sizeof(cc_cpu)); ncallout = imin(16 + maxproc + maxfiles, 18508); TUNABLE_INT_FETCH("kern.ncallout", &ncallout); @@ -927,7 +927,7 @@ callout_reset_sbt_on(struct callout *c, if (cpu == -1) { ignore_cpu = 1; } else if ((cpu >= MAXCPU) || - (cc_cpu[cpu].cc_inited == 0)) { + ((CC_CPU(cpu))->cc_inited == 0)) { /* Invalid CPU spec */ panic("Invalid CPU in callout %d", cpu); } From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 07:58:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D85E94EA; Fri, 24 Apr 2015 07:58:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6CA714A9; Fri, 24 Apr 2015 07:58:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3O7w07T022553; Fri, 24 Apr 2015 07:58:00 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3O7w0o1022549; Fri, 24 Apr 2015 07:58:00 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201504240758.t3O7w0o1022549@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 24 Apr 2015 07:58:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281922 - head/usr.bin/nfsstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 07:58:01 -0000 Author: trasz Date: Fri Apr 24 07:57:59 2015 New Revision: 281922 URL: https://svnweb.freebsd.org/changeset/base/281922 Log: Make nfsstat(1) build with WARNS=6. Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/nfsstat/Makefile head/usr.bin/nfsstat/nfsstat.c Modified: head/usr.bin/nfsstat/Makefile ============================================================================== --- head/usr.bin/nfsstat/Makefile Fri Apr 24 07:52:21 2015 (r281921) +++ head/usr.bin/nfsstat/Makefile Fri Apr 24 07:57:59 2015 (r281922) @@ -6,6 +6,4 @@ CFLAGS+=-DNFS LIBADD= kvm -WARNS?= 3 - .include Modified: head/usr.bin/nfsstat/nfsstat.c ============================================================================== --- head/usr.bin/nfsstat/nfsstat.c Fri Apr 24 07:52:21 2015 (r281921) +++ head/usr.bin/nfsstat/nfsstat.c Fri Apr 24 07:57:59 2015 (r281922) @@ -70,15 +70,6 @@ static const char rcsid[] = #include #include -struct nlist nl[] = { -#define N_NFSSTAT 0 - { .n_name = "nfsstats" }, -#define N_NFSRVSTAT 1 - { .n_name = "nfsrvstats" }, - { .n_name = NULL }, -}; -kvm_t *kd; - static int widemode = 0; static int zflag = 0; static int printtitle = 1; From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 09:47:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2FA2B31; Fri, 24 Apr 2015 09:47:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D03DB107A; Fri, 24 Apr 2015 09:47:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3O9lAds076145; Fri, 24 Apr 2015 09:47:10 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3O9lAIn076144; Fri, 24 Apr 2015 09:47:10 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504240947.t3O9lAIn076144@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 24 Apr 2015 09:47:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281923 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 09:47:11 -0000 Author: mav Date: Fri Apr 24 09:47:10 2015 New Revision: 281923 URL: https://svnweb.freebsd.org/changeset/base/281923 Log: Add link to mvs(4). MFC after: 1 week Modified: head/share/man/man4/ada.4 Modified: head/share/man/man4/ada.4 ============================================================================== --- head/share/man/man4/ada.4 Fri Apr 24 07:57:59 2015 (r281922) +++ head/share/man/man4/ada.4 Fri Apr 24 09:47:10 2015 (r281923) @@ -156,6 +156,7 @@ ATA device nodes .Xr ahci 4 , .Xr cam 4 , .Xr da 4 , +.Xr mvs 4 .Xr siis 4 .Sh HISTORY The From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 09:52:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C0E96CF0; Fri, 24 Apr 2015 09:52:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ADD65115A; Fri, 24 Apr 2015 09:52:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3O9qgAD080427; Fri, 24 Apr 2015 09:52:42 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3O9qgvZ080426; Fri, 24 Apr 2015 09:52:42 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504240952.t3O9qgvZ080426@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 24 Apr 2015 09:52:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281924 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 09:52:42 -0000 Author: mav Date: Fri Apr 24 09:52:41 2015 New Revision: 281924 URL: https://svnweb.freebsd.org/changeset/base/281924 Log: Oops, add missing comma. MFC after: 1 week Modified: head/share/man/man4/ada.4 Modified: head/share/man/man4/ada.4 ============================================================================== --- head/share/man/man4/ada.4 Fri Apr 24 09:47:10 2015 (r281923) +++ head/share/man/man4/ada.4 Fri Apr 24 09:52:41 2015 (r281924) @@ -156,7 +156,7 @@ ATA device nodes .Xr ahci 4 , .Xr cam 4 , .Xr da 4 , -.Xr mvs 4 +.Xr mvs 4 , .Xr siis 4 .Sh HISTORY The From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 10:17:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 985E4586; Fri, 24 Apr 2015 10:17:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B2091434; Fri, 24 Apr 2015 10:17:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OAHvPJ091023; Fri, 24 Apr 2015 10:17:57 GMT (envelope-from theraven@FreeBSD.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OAHuLl091015; Fri, 24 Apr 2015 10:17:56 GMT (envelope-from theraven@FreeBSD.org) Message-Id: <201504241017.t3OAHuLl091015@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: theraven set sender to theraven@FreeBSD.org using -f From: David Chisnall Date: Fri, 24 Apr 2015 10:17:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281925 - head/lib/libc/locale X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 10:17:57 -0000 Author: theraven Date: Fri Apr 24 10:17:55 2015 New Revision: 281925 URL: https://svnweb.freebsd.org/changeset/base/281925 Log: Small changes to locale-related man pages. Fix a missing .h and change the recommended include for the POSIX2008 functions from xlocale.h to locale.h. Including xlocale.h is for legacy / Darwin compatibility so should not be encouraged. Modified: head/lib/libc/locale/duplocale.3 head/lib/libc/locale/freelocale.3 head/lib/libc/locale/newlocale.3 head/lib/libc/locale/querylocale.3 head/lib/libc/locale/uselocale.3 Modified: head/lib/libc/locale/duplocale.3 ============================================================================== --- head/lib/libc/locale/duplocale.3 Fri Apr 24 09:52:41 2015 (r281924) +++ head/lib/libc/locale/duplocale.3 Fri Apr 24 10:17:55 2015 (r281925) @@ -36,7 +36,7 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In xlocale.h +.In locale.h .Ft locale_t .Fn duplocale "locale_t locale" .Sh DESCRIPTION Modified: head/lib/libc/locale/freelocale.3 ============================================================================== --- head/lib/libc/locale/freelocale.3 Fri Apr 24 09:52:41 2015 (r281924) +++ head/lib/libc/locale/freelocale.3 Fri Apr 24 10:17:55 2015 (r281925) @@ -38,7 +38,7 @@ or .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In xlocale.h +.In locale.h .Ft int .Fn freelocale "locale_t locale" .Sh DESCRIPTION Modified: head/lib/libc/locale/newlocale.3 ============================================================================== --- head/lib/libc/locale/newlocale.3 Fri Apr 24 09:52:41 2015 (r281924) +++ head/lib/libc/locale/newlocale.3 Fri Apr 24 10:17:55 2015 (r281925) @@ -35,7 +35,7 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In xlocale +.In locale.h .Ft locale_t .Fn newlocale "int mask" "const char * locale" "locale_t base" .Sh DESCRIPTION Modified: head/lib/libc/locale/querylocale.3 ============================================================================== --- head/lib/libc/locale/querylocale.3 Fri Apr 24 09:52:41 2015 (r281924) +++ head/lib/libc/locale/querylocale.3 Fri Apr 24 10:17:55 2015 (r281925) @@ -36,7 +36,7 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In xlocale.h +.In locale.h .Ft const char * .Fn querylocale "int mask" "locale_t locale" .Sh DESCRIPTION Modified: head/lib/libc/locale/uselocale.3 ============================================================================== --- head/lib/libc/locale/uselocale.3 Fri Apr 24 09:52:41 2015 (r281924) +++ head/lib/libc/locale/uselocale.3 Fri Apr 24 10:17:55 2015 (r281925) @@ -36,7 +36,7 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In xlocale.h +.In locale.h .Ft locale_t .Fn uselocale "locale_t locale" .Sh DESCRIPTION From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 10:21:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4E191848; Fri, 24 Apr 2015 10:21:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B7EE153B; Fri, 24 Apr 2015 10:21:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OALLSU094611; Fri, 24 Apr 2015 10:21:21 GMT (envelope-from theraven@FreeBSD.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OALLsi094610; Fri, 24 Apr 2015 10:21:21 GMT (envelope-from theraven@FreeBSD.org) Message-Id: <201504241021.t3OALLsi094610@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: theraven set sender to theraven@FreeBSD.org using -f From: David Chisnall Date: Fri, 24 Apr 2015 10:21:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281927 - head/lib/libc/locale X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 10:21:21 -0000 Author: theraven Date: Fri Apr 24 10:21:20 2015 New Revision: 281927 URL: https://svnweb.freebsd.org/changeset/base/281927 Log: __xlocale_C_ctype should not be const. It contains a reference count that is modified by newlocale / duplocale / freelocale. MFC after: 1 week Modified: head/lib/libc/locale/none.c Modified: head/lib/libc/locale/none.c ============================================================================== --- head/lib/libc/locale/none.c Fri Apr 24 10:18:41 2015 (r281926) +++ head/lib/libc/locale/none.c Fri Apr 24 10:21:20 2015 (r281927) @@ -209,7 +209,7 @@ struct xlocale_ctype __xlocale_global_ct 256 /* __mb_sb_limit */ }; -const struct xlocale_ctype __xlocale_C_ctype = { +struct xlocale_ctype __xlocale_C_ctype = { {{0}, "C"}, (_RuneLocale*)&_DefaultRuneLocale, _none_mbrtowc, From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 11:03:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8DB663FE; Fri, 24 Apr 2015 11:03:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7AD8219D5; Fri, 24 Apr 2015 11:03:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OB3m0F016020; Fri, 24 Apr 2015 11:03:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OB3m92016019; Fri, 24 Apr 2015 11:03:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504241103.t3OB3m92016019@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 24 Apr 2015 11:03:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281928 - head/lib/libmd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 11:03:48 -0000 Author: ngie Date: Fri Apr 24 11:03:47 2015 New Revision: 281928 URL: https://svnweb.freebsd.org/changeset/base/281928 Log: Avoid an infinite loop by ensuring that the amount of bytes read is greater than 0 in MDXFileChunk when calculating the checksum This edgecase can be triggered if the file is truncated while the checksum is being calculated (i.e. the EOF is reached) Differential Revision: https://reviews.freebsd.org/D2351 (patch by darius) PR: 196694 Reviewed by: delphij, ngie Submitted by: Daniel O'Connor Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libmd/mdXhl.c Modified: head/lib/libmd/mdXhl.c ============================================================================== --- head/lib/libmd/mdXhl.c Fri Apr 24 10:21:20 2015 (r281927) +++ head/lib/libmd/mdXhl.c Fri Apr 24 11:03:47 2015 (r281928) @@ -74,7 +74,7 @@ MDXFileChunk(const char *filename, char i = read(f, buffer, sizeof(buffer)); else i = read(f, buffer, n); - if (i < 0) + if (i <= 0) break; MDXUpdate(&ctx, buffer, i); n -= i; From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 11:08:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71F5767E; Fri, 24 Apr 2015 11:08:30 +0000 (UTC) Received: from elf.torek.net (mail.torek.net [96.90.199.121]) (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 531521A43; Fri, 24 Apr 2015 11:08:29 +0000 (UTC) Received: from elf.torek.net (localhost [127.0.0.1]) by elf.torek.net (8.14.9/8.14.9) with ESMTP id t3OB1Ovp029628; Fri, 24 Apr 2015 04:01:24 -0700 (PDT) (envelope-from torek@elf.torek.net) Received: (from torek@localhost) by elf.torek.net (8.14.9/8.14.9/Submit) id t3OB1O8Z029626; Fri, 24 Apr 2015 04:01:24 -0700 (PDT) (envelope-from torek) Date: Fri, 24 Apr 2015 04:01:24 -0700 (PDT) From: Chris Torek Message-Id: <201504241101.t3OB1O8Z029626@elf.torek.net> To: adrian@freebsd.org, scott4long@yahoo.com Subject: Re: svn commit: r281451 - head/sys/vm Cc: dchagin@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org In-Reply-To: X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (elf.torek.net [127.0.0.1]); Fri, 24 Apr 2015 04:01:24 -0700 (PDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 11:08:30 -0000 The problem seems likely to be related to odd compiler handling of alignment. Consider this code bit, which extracts the essentials: struct x { int x; } __attribute__((__aligned__(32))); struct s1 { int a; struct x b[1]; }; struct s2 { int a; struct x b[]; }; extern void test2(int); void test(void) { test2(sizeof(struct s1)); test2(sizeof(struct s2)); } Compiled, here are the two sizeof values (this particular compiler output is from clang but gcc and clang both agree on sizeof here): movl $64, %edi callq test2 movl $32, %edi popq %rbp jmp test2 # TAILCALL With the flexible array, (sizeof(struct uma_cache)) is going to be 32 bytes smaller than without it. (I have not looked closely enough to determine what the size should be.) Chris From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 11:31:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94696D10; Fri, 24 Apr 2015 11:31:33 +0000 (UTC) Received: from mail-wi0-x236.google.com (mail-wi0-x236.google.com [IPv6:2a00:1450:400c:c05::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2D0A11D58; Fri, 24 Apr 2015 11:31:33 +0000 (UTC) Received: by wizk4 with SMTP id k4so18288786wiz.1; Fri, 24 Apr 2015 04:31:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=Ni1webI4ABYWa3kPYPGfPsia0aKYXRtKoF990Lsv40E=; b=brIlbzlKu7ZJQlODftabi9uWVxcqu51pSZcG3S8REN58huPjZj6P9Zjafpb8vptwzT dg2+ukq8Hixxfic9/yKqoFFjHAbcuhbXbDz7sk/019khrVSOZ2zZHLly39d2woueVSt1 w1PWd1ZuDtJxgIMDZDCIZtrwcR50BrB3IKCmj2mHDBJOKPr0/h8QKkPSffhkiQAxmwbg 5gmTWhCu2D/ZUjHFCjmkF3LG2sYLM4d/ieZLYOxMjoDi428+bslV/cErD2zJaPCaFHSY C8stzox+4TuWlVSYp/+306aPVYLaIkA3ZCnxz4cZP1u+XMcuB69t5wVyGMJiVByG7X/c nk8Q== MIME-Version: 1.0 X-Received: by 10.194.236.33 with SMTP id ur1mr14625798wjc.77.1429875091637; Fri, 24 Apr 2015 04:31:31 -0700 (PDT) Sender: pluknet@gmail.com Received: by 10.27.80.202 with HTTP; Fri, 24 Apr 2015 04:31:31 -0700 (PDT) In-Reply-To: <201504240758.t3O7w0o1022549@svn.freebsd.org> References: <201504240758.t3O7w0o1022549@svn.freebsd.org> Date: Fri, 24 Apr 2015 14:31:31 +0300 X-Google-Sender-Auth: TnvLsQy4VZ460KRhU9FYllQ1cx4 Message-ID: Subject: Re: svn commit: r281922 - head/usr.bin/nfsstat From: Sergey Kandaurov To: Edward Tomasz Napierala Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 11:31:33 -0000 On 24 April 2015 at 10:58, Edward Tomasz Napierala wrote: > Author: trasz > Date: Fri Apr 24 07:57:59 2015 > New Revision: 281922 > URL: https://svnweb.freebsd.org/changeset/base/281922 > > Log: > Make nfsstat(1) build with WARNS=6. > > Sponsored by: The FreeBSD Foundation > > Modified: > head/usr.bin/nfsstat/Makefile > head/usr.bin/nfsstat/nfsstat.c > > Modified: head/usr.bin/nfsstat/Makefile > ============================================================================== > --- head/usr.bin/nfsstat/Makefile Fri Apr 24 07:52:21 2015 (r281921) > +++ head/usr.bin/nfsstat/Makefile Fri Apr 24 07:57:59 2015 (r281922) > @@ -6,6 +6,4 @@ CFLAGS+=-DNFS > > LIBADD= kvm > > -WARNS?= 3 > - > .include > > Modified: head/usr.bin/nfsstat/nfsstat.c > ============================================================================== > --- head/usr.bin/nfsstat/nfsstat.c Fri Apr 24 07:52:21 2015 (r281921) > +++ head/usr.bin/nfsstat/nfsstat.c Fri Apr 24 07:57:59 2015 (r281922) > @@ -70,15 +70,6 @@ static const char rcsid[] = > #include > #include > > -struct nlist nl[] = { > -#define N_NFSSTAT 0 > - { .n_name = "nfsstats" }, > -#define N_NFSRVSTAT 1 > - { .n_name = "nfsrvstats" }, > - { .n_name = NULL }, > -}; > -kvm_t *kd; > - > static int widemode = 0; > static int zflag = 0; > static int printtitle = 1; > Now that nfsstat no longer uses kvm to extract statistics, it could be further trimmed. - no longer link with kvm - un-document -M/-N options but still kept (?) for backward compatibility - cleanup from the previous sysctl/kvm usage. Index: Makefile =================================================================== --- Makefile (revision 281924) +++ Makefile (working copy) @@ -2,8 +2,5 @@ # $FreeBSD$ PROG= nfsstat -CFLAGS+=-DNFS -LIBADD= kvm - .include Index: nfsstat.1 =================================================================== --- nfsstat.1 (revision 281924) +++ nfsstat.1 (working copy) @@ -39,8 +39,6 @@ .Sh SYNOPSIS .Nm .Op Fl cemszW -.Op Fl M Ar core -.Op Fl N Ar system .Op Fl w Ar wait .Sh DESCRIPTION The @@ -60,19 +58,12 @@ .It Fl e Report the extra statistics collected by the NFS client and server for NFSv4. -.It Fl M -Extract values associated with the name list from the specified core -instead of the default -.Pa /dev/kmem . .It Fl m Report the mount options for all new NFS client mounts. This option overrides all others and .Nm will exit after completing the report. This option is only supported by the new NFS client. -.It Fl N -Extract the name list from the specified system instead of the default -.Pa /boot/kernel/kernel . .It Fl s Only display server side statistics. .It Fl W @@ -92,19 +83,11 @@ .It Fl z Reset statistics after displaying them. .El -.Sh FILES -.Bl -tag -width ".Pa /boot/kernel/kernel" -compact -.It Pa /boot/kernel/kernel -default kernel namelist -.It Pa /dev/kmem -default memory file -.El .Sh SEE ALSO .Xr fstat 1 , .Xr netstat 1 , .Xr ps 1 , .Xr systat 1 , -.Xr sysctl 3 , .Xr iostat 8 , .Xr nfsdumpstate 8 , .Xr pstat 8 , Index: nfsstat.c =================================================================== --- nfsstat.c (revision 281924) +++ nfsstat.c (working copy) @@ -48,26 +48,16 @@ #include #include #include -#include #include -#include -#include #include #include -#include -#include -#include #include -#include -#include -#include #include #include #include #include -#include #include static int widemode = 0; @@ -93,18 +83,15 @@ int clientOnly = -1; int serverOnly = -1; int ch; - char *memf, *nlistf; int mntlen, i; char buf[1024]; struct statfs *mntbuf; struct nfscl_dumpmntopts dumpmntopts; interval = 0; - memf = nlistf = NULL; while ((ch = getopt(argc, argv, "cesWM:mN:w:z")) != -1) switch(ch) { case 'M': - memf = optarg; break; case 'm': /* Display mount options for NFS mount points. */ @@ -128,7 +115,6 @@ } exit(0); case 'N': - nlistf = optarg; break; case 'W': widemode = 1; @@ -159,17 +145,6 @@ argc -= optind; argv += optind; -#define BACKWARD_COMPATIBILITY -#ifdef BACKWARD_COMPATIBILITY - if (*argv) { - interval = atoi(*argv); - if (*++argv) { - nlistf = *argv; - if (*++argv) - memf = *argv; - } - } -#endif if (modfind("nfscommon") < 0) errx(1, "NFS client/server not loaded"); -- wbr, pluknet From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 11:46:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 704693A5; Fri, 24 Apr 2015 11:46:25 +0000 (UTC) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2B3A71EBB; Fri, 24 Apr 2015 11:46:24 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::dd55:8565:6cfd:c136] (unknown [IPv6:2001:7b8:3a7:0:dd55:8565:6cfd:c136]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 959A65C37; Fri, 24 Apr 2015 13:46:13 +0200 (CEST) Subject: Re: svn commit: r281451 - head/sys/vm Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Content-Type: multipart/signed; boundary="Apple-Mail=_8DD2A96B-B49A-4354-B6F8-DA5E952FE9B0"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.5b6 From: Dimitry Andric In-Reply-To: <201504241101.t3OB1O8Z029626@elf.torek.net> Date: Fri, 24 Apr 2015 13:46:10 +0200 Cc: Adrian Chadd , scott4long@yahoo.com, dchagin@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <695B6002-002A-406C-B843-0DCFE24F81BD@FreeBSD.org> References: <201504241101.t3OB1O8Z029626@elf.torek.net> To: Chris Torek X-Mailer: Apple Mail (2.2098) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 11:46:25 -0000 --Apple-Mail=_8DD2A96B-B49A-4354-B6F8-DA5E952FE9B0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 24 Apr 2015, at 13:01, Chris Torek wrote: > > The problem seems likely to be related to odd compiler handling of > alignment. Consider this code bit, which extracts the essentials: > > struct x { > int x; > } __attribute__((__aligned__(32))); > > struct s1 { > int a; > struct x b[1]; > }; > > struct s2 { > int a; > struct x b[]; > }; > > extern void test2(int); > void test(void) { > test2(sizeof(struct s1)); > test2(sizeof(struct s2)); > } > > Compiled, here are the two sizeof values (this particular compiler > output is from clang but gcc and clang both agree on sizeof here): > > movl $64, %edi > callq test2 > movl $32, %edi > popq %rbp > jmp test2 # TAILCALL > > With the flexible array, (sizeof(struct uma_cache)) is going to be > 32 bytes smaller than without it. > > (I have not looked closely enough to determine what the size should be.) I'm not sure I would consider this odd. For purposes of sizeof(), the flexible array member declaration can be thought of as: struct x b[0]; so while both struct s1 and s2 have members that must be aligned at 32 bytes, the former has one extra, while the latter doesn't. Ergo, 2x32 bytes and 1x32 bytes. -Dimitry --Apple-Mail=_8DD2A96B-B49A-4354-B6F8-DA5E952FE9B0 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----- Version: GnuPG/MacGPG2 v2.0.27 iEYEARECAAYFAlU6LQUACgkQsF6jCi4glqNeDACgyo1jXpFzVxfNg/zHVgEuBuZf xjEAoLKT7Ltnjr0YIk7QQvawoQxwA808 =9NxY -----END PGP SIGNATURE----- --Apple-Mail=_8DD2A96B-B49A-4354-B6F8-DA5E952FE9B0-- From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 12:04:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 850848A3; Fri, 24 Apr 2015 12:04:02 +0000 (UTC) Received: from mail-wi0-x22c.google.com (mail-wi0-x22c.google.com [IPv6:2a00:1450:400c:c05::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 2082D10B6; Fri, 24 Apr 2015 12:04:02 +0000 (UTC) Received: by wiun10 with SMTP id n10so17608141wiu.1; Fri, 24 Apr 2015 05:04:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=xf69IgraeceZifT//y1ncAV5CPO2T+1celX9zUzBts4=; b=x0AgOKrpquUqwF0NcLfajQCO6erINGyX/LJWGKU01F6NVAhrFXDAUnCuEJ3gjXz9oW VvRLErX2G9hqlInZ8E+Ylrr0Ak8oCoX5k3duwDjLjmwj6ng7ROP9uu9vRSRRRNmiYa2+ K1LARAK5oTZ2hUgbgyAQJTqPTB5JAVLegfX6C40Lsqip9rdv8kJcoipR1khfxwGR6/vv 1/LWD/IXdYdwk5XLeeaJiEgCI01wrlCqRLsCg9cLRkW0UcHOvKEy6Z8g6HbiNeNEtFsA uyzccMqyLbbz8zkvdhZAZUeDUxyWKOrb39I3hEudMLFe1zZ42ZfC9AKimZ28ce9PSMl4 aLEw== X-Received: by 10.180.210.171 with SMTP id mv11mr3192726wic.61.1429877040626; Fri, 24 Apr 2015 05:04:00 -0700 (PDT) Received: from brick.home (adiw48.neoplus.adsl.tpnet.pl. [79.184.204.48]) by mx.google.com with ESMTPSA id kc4sm16620749wjc.2.2015.04.24.05.03.59 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Apr 2015 05:03:59 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Fri, 24 Apr 2015 14:03:57 +0200 From: Edward Tomasz Napierala To: Sergey Kandaurov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281922 - head/usr.bin/nfsstat Message-ID: <20150424120357.GA5210@brick.home> Mail-Followup-To: Sergey Kandaurov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201504240758.t3O7w0o1022549@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 12:04:02 -0000 On 0424T1431, Sergey Kandaurov wrote: > On 24 April 2015 at 10:58, Edward Tomasz Napierala wrote: > > Author: trasz > > Date: Fri Apr 24 07:57:59 2015 > > New Revision: 281922 > > URL: https://svnweb.freebsd.org/changeset/base/281922 > > > > Log: > > Make nfsstat(1) build with WARNS=6. > > > > Sponsored by: The FreeBSD Foundation > > > > Modified: > > head/usr.bin/nfsstat/Makefile > > head/usr.bin/nfsstat/nfsstat.c > > > > Modified: head/usr.bin/nfsstat/Makefile > > ============================================================================== > > --- head/usr.bin/nfsstat/Makefile Fri Apr 24 07:52:21 2015 (r281921) > > +++ head/usr.bin/nfsstat/Makefile Fri Apr 24 07:57:59 2015 (r281922) > > @@ -6,6 +6,4 @@ CFLAGS+=-DNFS > > > > LIBADD= kvm > > > > -WARNS?= 3 > > - > > .include > > > > Modified: head/usr.bin/nfsstat/nfsstat.c > > ============================================================================== > > --- head/usr.bin/nfsstat/nfsstat.c Fri Apr 24 07:52:21 2015 (r281921) > > +++ head/usr.bin/nfsstat/nfsstat.c Fri Apr 24 07:57:59 2015 (r281922) > > @@ -70,15 +70,6 @@ static const char rcsid[] = > > #include > > #include > > > > -struct nlist nl[] = { > > -#define N_NFSSTAT 0 > > - { .n_name = "nfsstats" }, > > -#define N_NFSRVSTAT 1 > > - { .n_name = "nfsrvstats" }, > > - { .n_name = NULL }, > > -}; > > -kvm_t *kd; > > - > > static int widemode = 0; > > static int zflag = 0; > > static int printtitle = 1; > > > > Now that nfsstat no longer uses kvm to extract statistics, it could be > further trimmed. > - no longer link with kvm > - un-document -M/-N options but still kept (?) for backward compatibility > - cleanup from the previous sysctl/kvm usage. > > Index: Makefile > =================================================================== > --- Makefile (revision 281924) > +++ Makefile (working copy) > @@ -2,8 +2,5 @@ > # $FreeBSD$ > > PROG= nfsstat > -CFLAGS+=-DNFS > > -LIBADD= kvm > - > .include > Index: nfsstat.1 > =================================================================== > --- nfsstat.1 (revision 281924) > +++ nfsstat.1 (working copy) > @@ -39,8 +39,6 @@ > .Sh SYNOPSIS > .Nm > .Op Fl cemszW > -.Op Fl M Ar core > -.Op Fl N Ar system > .Op Fl w Ar wait > .Sh DESCRIPTION > The > @@ -60,19 +58,12 @@ > .It Fl e > Report the extra statistics collected by the NFS client and > server for NFSv4. > -.It Fl M > -Extract values associated with the name list from the specified core > -instead of the default > -.Pa /dev/kmem . > .It Fl m > Report the mount options for all new NFS client mounts. > This option overrides all others and > .Nm > will exit after completing the report. > This option is only supported by the new NFS client. > -.It Fl N > -Extract the name list from the specified system instead of the default > -.Pa /boot/kernel/kernel . > .It Fl s > Only display server side statistics. > .It Fl W > @@ -92,19 +83,11 @@ > .It Fl z > Reset statistics after displaying them. > .El > -.Sh FILES > -.Bl -tag -width ".Pa /boot/kernel/kernel" -compact > -.It Pa /boot/kernel/kernel > -default kernel namelist > -.It Pa /dev/kmem > -default memory file > -.El > .Sh SEE ALSO > .Xr fstat 1 , > .Xr netstat 1 , > .Xr ps 1 , > .Xr systat 1 , > -.Xr sysctl 3 , > .Xr iostat 8 , > .Xr nfsdumpstate 8 , > .Xr pstat 8 , > Index: nfsstat.c > =================================================================== > --- nfsstat.c (revision 281924) > +++ nfsstat.c (working copy) > @@ -48,26 +48,16 @@ > #include > #include > #include > -#include > #include > -#include > -#include > #include > > #include > > -#include > -#include > -#include > #include > -#include > -#include > -#include > #include > #include > #include > #include > -#include > #include > > static int widemode = 0; > @@ -93,18 +83,15 @@ > int clientOnly = -1; > int serverOnly = -1; > int ch; > - char *memf, *nlistf; > int mntlen, i; > char buf[1024]; > struct statfs *mntbuf; > struct nfscl_dumpmntopts dumpmntopts; > > interval = 0; > - memf = nlistf = NULL; > while ((ch = getopt(argc, argv, "cesWM:mN:w:z")) != -1) > switch(ch) { > case 'M': > - memf = optarg; > break; > case 'm': > /* Display mount options for NFS mount points. */ > @@ -128,7 +115,6 @@ > } > exit(0); > case 'N': > - nlistf = optarg; > break; > case 'W': > widemode = 1; > @@ -159,17 +145,6 @@ > argc -= optind; > argv += optind; > > -#define BACKWARD_COMPATIBILITY > -#ifdef BACKWARD_COMPATIBILITY > - if (*argv) { > - interval = atoi(*argv); > - if (*++argv) { > - nlistf = *argv; > - if (*++argv) > - memf = *argv; > - } > - } > -#endif Doesn't this chunk break usage like "nfsstat 1"? From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 12:13:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2A9C0D1A; Fri, 24 Apr 2015 12:13:59 +0000 (UTC) Received: from mail-wg0-x236.google.com (mail-wg0-x236.google.com [IPv6:2a00:1450:400c:c00::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 C64BC11BD; Fri, 24 Apr 2015 12:13:58 +0000 (UTC) Received: by wgin8 with SMTP id n8so48502484wgi.0; Fri, 24 Apr 2015 05:13:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=vYOnOOSFYIHWkGBO+LlyGnaHRTiDzCjvFxmeNJ6KiLI=; b=SKqnJwAk3hrsyviNB2y7rbVX4NSmL4C15sMnliQY38t6nChejy2kFMV2NJlDWJQxHW a9FuTFENYtdd6989VtI4I4HTOa0zGLSW9hsrs0rz3ptfM9sxiDEKSYMTrbAkjwG8uGDQ 2BsdNT2L74p3R/5PQCngxJhnI55bbrEZ+kRMm0qBB7IPO3mreVoxQFxXPm4tQHUxx6Vn DD2X6EAlIL0mKSaqkPD7pAIIVCTbCdDRZ3XMkEyPP1U8vgY6B2E9lq9UPt/Jwo6nD/TE QRVvgmDt7uipZUsaBK3E8VwneDhhZ1gLmZAs2n2tKWYrkVb3TGExFDLnFv+Y6WRxTpLB 2MbA== MIME-Version: 1.0 X-Received: by 10.180.93.7 with SMTP id cq7mr3484109wib.24.1429877637303; Fri, 24 Apr 2015 05:13:57 -0700 (PDT) Sender: pluknet@gmail.com Received: by 10.27.80.202 with HTTP; Fri, 24 Apr 2015 05:13:57 -0700 (PDT) In-Reply-To: <20150424120357.GA5210@brick.home> References: <201504240758.t3O7w0o1022549@svn.freebsd.org> <20150424120357.GA5210@brick.home> Date: Fri, 24 Apr 2015 15:13:57 +0300 X-Google-Sender-Auth: M4bnxg7FD65p6hmaUJkueFTjLv4 Message-ID: Subject: Re: svn commit: r281922 - head/usr.bin/nfsstat From: Sergey Kandaurov To: Sergey Kandaurov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 12:13:59 -0000 On 24 April 2015 at 15:03, Edward Tomasz Napierala wrote: > On 0424T1431, Sergey Kandaurov wrote: [..] >> @@ -159,17 +145,6 @@ >> argc -= optind; >> argv += optind; >> >> -#define BACKWARD_COMPATIBILITY >> -#ifdef BACKWARD_COMPATIBILITY >> - if (*argv) { >> - interval = atoi(*argv); >> - if (*++argv) { >> - nlistf = *argv; >> - if (*++argv) >> - memf = *argv; >> - } >> - } >> -#endif > > Doesn't this chunk break usage like "nfsstat 1"? > Sure, thanks. -- wbr, pluknet From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 12:37:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5CE3E358; Fri, 24 Apr 2015 12:37:23 +0000 (UTC) Received: from elf.torek.net (mail.torek.net [96.90.199.121]) (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 403F71450; Fri, 24 Apr 2015 12:37:22 +0000 (UTC) Received: from elf.torek.net (localhost [127.0.0.1]) by elf.torek.net (8.14.9/8.14.9) with ESMTP id t3OCbLH7039665; Fri, 24 Apr 2015 05:37:21 -0700 (PDT) (envelope-from torek@elf.torek.net) Received: (from torek@localhost) by elf.torek.net (8.14.9/8.14.9/Submit) id t3OCbLmd039664; Fri, 24 Apr 2015 05:37:21 -0700 (PDT) (envelope-from torek) Date: Fri, 24 Apr 2015 05:37:21 -0700 (PDT) From: Chris Torek Message-Id: <201504241237.t3OCbLmd039664@elf.torek.net> To: dim@FreeBSD.org Subject: Re: svn commit: r281451 - head/sys/vm Cc: adrian@freebsd.org, dchagin@freebsd.org, scott4long@yahoo.com, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org In-Reply-To: <695B6002-002A-406C-B843-0DCFE24F81BD@FreeBSD.org> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (elf.torek.net [127.0.0.1]); Fri, 24 Apr 2015 05:37:22 -0700 (PDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 12:37:23 -0000 True, it's not actually odd, it's just surprising the first time one comes across it. Also, I goofed in the text: >> With the flexible array, (sizeof(struct uma_cache)) is going to be >> 32 bytes smaller than without it. It's `struct uma_zone` that shrinks by (potentially) more than one would expect. (The uma_cache struct is itself 32 bytes and is not changed, so the args.size value should be the same -- implying that some OTHER "sizeof(struct uma_zone)" is where things are going wrong.) Chris From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 12:48:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 07875573; Fri, 24 Apr 2015 12:48:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EAC981597; Fri, 24 Apr 2015 12:48:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OCmnwS065762; Fri, 24 Apr 2015 12:48:49 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OCmn5A065761; Fri, 24 Apr 2015 12:48:49 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201504241248.t3OCmn5A065761@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 24 Apr 2015 12:48:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281929 - head/sbin/growfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 12:48:50 -0000 Author: trasz Date: Fri Apr 24 12:48:48 2015 New Revision: 281929 URL: https://svnweb.freebsd.org/changeset/base/281929 Log: Fix growfs(8) build with debug enabled (make -DGFSDBG). PR: 199641 Submitted by: Willem Jan Withagen MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sbin/growfs/Makefile head/sbin/growfs/growfs.c Modified: head/sbin/growfs/Makefile ============================================================================== --- head/sbin/growfs/Makefile Fri Apr 24 11:03:47 2015 (r281928) +++ head/sbin/growfs/Makefile Fri Apr 24 12:48:48 2015 (r281929) @@ -4,8 +4,6 @@ # $FreeBSD$ # -#GFSDBG= - .include .PATH: ${.CURDIR}/../mount @@ -16,7 +14,9 @@ MAN= growfs.8 CFLAGS+=-I${.CURDIR}/../mount .if defined(GFSDBG) -SRCS+= debug.c +SRCS+= debug.c +CFLAGS+= -DFS_DEBUG +NO_WCAST_ALIGN= yes .endif LIBADD= util Modified: head/sbin/growfs/growfs.c ============================================================================== --- head/sbin/growfs/growfs.c Fri Apr 24 11:03:47 2015 (r281928) +++ head/sbin/growfs/growfs.c Fri Apr 24 12:48:48 2015 (r281929) @@ -161,7 +161,7 @@ growfs(int fsi, int fso, unsigned int Nf #ifdef FS_DEBUG { struct csum *dbg_csp; - int dbg_csc; + u_int32_t dbg_csc; char dbg_line[80]; dbg_csp = fscs; @@ -242,7 +242,7 @@ growfs(int fsi, int fso, unsigned int Nf #ifdef FS_DEBUG { struct csum *dbg_csp; - int dbg_csc; + u_int32_t dbg_csc; char dbg_line[80]; dbg_csp = fscs; From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 13:12:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E65D1AB7; Fri, 24 Apr 2015 13:12:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D60BE187E; Fri, 24 Apr 2015 13:12:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3ODC4YS079676; Fri, 24 Apr 2015 13:12:04 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3ODC4Zq079675; Fri, 24 Apr 2015 13:12:04 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504241312.t3ODC4Zq079675@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 24 Apr 2015 13:12:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281930 - head/sys/sparc64/pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 13:12:05 -0000 Author: jhb Date: Fri Apr 24 13:12:04 2015 New Revision: 281930 URL: https://svnweb.freebsd.org/changeset/base/281930 Log: Update this driver to not save copies of registers that are no longer used after r281874. While here, also update it to always write the parent's PCI bus number to the primary bus register. Modified: head/sys/sparc64/pci/apb.c Modified: head/sys/sparc64/pci/apb.c ============================================================================== --- head/sys/sparc64/pci/apb.c Fri Apr 24 12:48:48 2015 (r281929) +++ head/sys/sparc64/pci/apb.c Fri Apr 24 13:12:04 2015 (r281930) @@ -171,20 +171,14 @@ apb_attach(device_t dev) * Get current bridge configuration. */ sc->sc_bsc.ops_pcib_sc.domain = pci_get_domain(dev); - sc->sc_bsc.ops_pcib_sc.secstat = - pci_read_config(dev, PCIR_SECSTAT_1, 2); - sc->sc_bsc.ops_pcib_sc.command = - pci_read_config(dev, PCIR_COMMAND, 2); - sc->sc_bsc.ops_pcib_sc.pribus = - pci_read_config(dev, PCIR_PRIBUS_1, 1); + sc->sc_bsc.ops_pcib_sc.pribus = pci_get_bus(dev); + pci_write_config(dev, PCIR_PRIBUS_1, sc->sc_bsc.ops_pcib_sc.pribus, 1); sc->sc_bsc.ops_pcib_sc.bus.sec = pci_read_config(dev, PCIR_SECBUS_1, 1); sc->sc_bsc.ops_pcib_sc.bus.sub = pci_read_config(dev, PCIR_SUBBUS_1, 1); sc->sc_bsc.ops_pcib_sc.bridgectl = pci_read_config(dev, PCIR_BRIDGECTL_1, 2); - sc->sc_bsc.ops_pcib_sc.seclat = - pci_read_config(dev, PCIR_SECLAT_1, 1); sc->sc_iomap = pci_read_config(dev, APBR_IOMAP, 1); sc->sc_memmap = pci_read_config(dev, APBR_MEMMAP, 1); From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 14:36:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5012DA1A; Fri, 24 Apr 2015 14:36:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 24CA01253; Fri, 24 Apr 2015 14:36:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OEa86K021435; Fri, 24 Apr 2015 14:36:08 GMT (envelope-from joel@FreeBSD.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OEa70H021431; Fri, 24 Apr 2015 14:36:07 GMT (envelope-from joel@FreeBSD.org) Message-Id: <201504241436.t3OEa70H021431@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: joel set sender to joel@FreeBSD.org using -f From: Joel Dahl Date: Fri, 24 Apr 2015 14:36:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281931 - in head: sbin/camcontrol usr.sbin/iovctl usr.sbin/jail X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 14:36:08 -0000 Author: joel (doc committer) Date: Fri Apr 24 14:36:06 2015 New Revision: 281931 URL: https://svnweb.freebsd.org/changeset/base/281931 Log: Fix minor mdoc issues. Modified: head/sbin/camcontrol/camcontrol.8 head/usr.sbin/iovctl/iovctl.conf.5 head/usr.sbin/jail/jail.8 Modified: head/sbin/camcontrol/camcontrol.8 ============================================================================== --- head/sbin/camcontrol/camcontrol.8 Fri Apr 24 13:12:04 2015 (r281930) +++ head/sbin/camcontrol/camcontrol.8 Fri Apr 24 14:36:06 2015 (r281931) @@ -575,7 +575,6 @@ Most drives support this format. Print out the list in extended physical sector format. The extended format allows for ranges of blocks to be printed. .El -.Pp .It Fl G Print out the grown defect list. This is a list of bad blocks that have Modified: head/usr.sbin/iovctl/iovctl.conf.5 ============================================================================== --- head/usr.sbin/iovctl/iovctl.conf.5 Fri Apr 24 13:12:04 2015 (r281930) +++ head/usr.sbin/iovctl/iovctl.conf.5 Fri Apr 24 14:36:06 2015 (r281931) @@ -144,7 +144,7 @@ passthrough devices through the use of t VF-0 is not configured as a passthrough device as it explicitly overrides the default. VF-0 also sets a device-specific parameter named mac-addr. -.Bd -literal .offset ident +.Bd -literal -offset ident PF { device : "ix0"; num_vfs : 3; @@ -160,8 +160,8 @@ VF-0 { } .Ed .Sh SEE ALSO -.Xr iovctl 8 , -.Xr rc.conf 5 +.Xr rc.conf 5 , +.Xr iovctl 8 .Sh AUTHORS This manual page was written by .An Ryan Stone Aq Mt rstone@FreeBSD.org . Modified: head/usr.sbin/jail/jail.8 ============================================================================== --- head/usr.sbin/jail/jail.8 Fri Apr 24 13:12:04 2015 (r281930) +++ head/usr.sbin/jail/jail.8 Fri Apr 24 14:36:06 2015 (r281931) @@ -1221,7 +1221,6 @@ environment of the first jail. .Xr jls 8 , .Xr mount 8 , .Xr named 8 , -.Xr procfs 5 , .Xr reboot 8 , .Xr rpcbind 8 , .Xr sendmail 8 , From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 14:46:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C0C28EA0 for ; Fri, 24 Apr 2015 14:46:06 +0000 (UTC) Received: from mail-wi0-x22a.google.com (mail-wi0-x22a.google.com [IPv6:2a00:1450:400c:c05::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F6241390 for ; Fri, 24 Apr 2015 14:46:06 +0000 (UTC) Received: by widdi4 with SMTP id di4so22975251wid.0 for ; Fri, 24 Apr 2015 07:46:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=e4BZ+km6J70zxr5Cfff7mbPlVsrex5f4Y/o2GIRtKX4=; b=IG0WCKei8Wfl2hJTvj0M2ISvDfHC3cUvcH7XYOGxmlMyqoSbx1DjLZdXv14cHz3Z3+ DtG6IiuL1h02g70ELfORhEFyxgQmY3WYJYzztbLE+PrS9VbQ/30lm60BpKJKcJZyUXgK AnVlDnC3ZfvsvoK3QLdf0Ek/Hw6viOFQXgxxw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=e4BZ+km6J70zxr5Cfff7mbPlVsrex5f4Y/o2GIRtKX4=; b=Zn+l6E24hwlHg/cEGZf29VelrrKoJ4Z3F92zOpgVVaENRZE+UpZA/qnF7JA1/L35Uy ZSay2SNGOJKlsCPxPTCIPcyPa5O+BFp/BOHVUn9e4Zl+0q7rTzpdBmesoNx8K4mhGVdh ujoulgEcGEWIvTQHxHkQyBhxvJS7yGcQn2i94Zsv8YwBsfulpukpeUSl52gr4MVITIKN UVoKWMLNvOfQBFVJdMKjKHNj8NQ2s4vguzrPHK3vv7g8p3IIyztarBoUwIxXINyxBM2J fLl0mc9hJONbobVQqtW8nL/MFVVmJJ2p+ERomS5PNl409cIDAEH9LuH8RQKiO7XONll/ 1DgA== X-Gm-Message-State: ALoCoQmp/wNqatDavzP7E1rEtVGzPXBYzLZeEw8YToO947IKAKEyZVGQXms2P+ryGL8ItUH4Seou X-Received: by 10.180.216.103 with SMTP id op7mr4482090wic.90.1429886764755; Fri, 24 Apr 2015 07:46:04 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.28.20.75 with HTTP; Fri, 24 Apr 2015 07:45:34 -0700 (PDT) In-Reply-To: References: <201504240758.t3O7w0o1022549@svn.freebsd.org> From: Eitan Adler Date: Fri, 24 Apr 2015 07:45:34 -0700 X-Google-Sender-Auth: GD93f5Lb-wM2HgQyF18B48iV1cc Message-ID: Subject: Re: svn commit: r281922 - head/usr.bin/nfsstat To: Sergey Kandaurov Cc: Edward Tomasz Napierala , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 14:46:06 -0000 On 24 April 2015 at 04:31, Sergey Kandaurov wrote: > Now that nfsstat no longer uses kvm to extract statistics, it could be > further trimmed. > - no longer link with kvm > - un-document -M/-N options but still kept (?) for backward compatibility If we are keeping flags, they should documented as being kept for compat. If they are not documented, support for them should be removed as they are bugs. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 14:47:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C464912C; Fri, 24 Apr 2015 14:47:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B385813BE; Fri, 24 Apr 2015 14:47:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OElscF026705; Fri, 24 Apr 2015 14:47:54 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OElsmu026704; Fri, 24 Apr 2015 14:47:54 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504241447.t3OElsmu026704@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 24 Apr 2015 14:47:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281932 - head/sys/modules/oce X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 14:47:54 -0000 Author: jhb Date: Fri Apr 24 14:47:53 2015 New Revision: 281932 URL: https://svnweb.freebsd.org/changeset/base/281932 Log: Rename the kld for oce(4) to if_oce.ko. ifconfig(8) has special knowledge about kld filenames for network drivers that requires them to follow the pattern of if_. This also fixes the existing documentation in the manpage which says to use if_oce_load=YES in loader.conf. PR: 199095 MFC after: 1 week Modified: head/sys/modules/oce/Makefile Modified: head/sys/modules/oce/Makefile ============================================================================== --- head/sys/modules/oce/Makefile Fri Apr 24 14:36:06 2015 (r281931) +++ head/sys/modules/oce/Makefile Fri Apr 24 14:47:53 2015 (r281932) @@ -3,7 +3,7 @@ # .PATH: ${.CURDIR}/../../dev/oce -KMOD = oce +KMOD = if_oce SRCS = oce_if.c oce_hw.c oce_mbox.c oce_util.c oce_queue.c oce_sysctl.c SRCS += bus_if.h device_if.h pci_if.h opt_inet.h opt_inet6.h From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 15:03:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D8759B48; Fri, 24 Apr 2015 15:03:36 +0000 (UTC) Received: from bigwig.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 B301E16CA; Fri, 24 Apr 2015 15:03:36 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id A5D63B95E; Fri, 24 Apr 2015 11:03:35 -0400 (EDT) From: John Baldwin To: Sergey Kandaurov Cc: Edward Tomasz Napierala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281922 - head/usr.bin/nfsstat Date: Fri, 24 Apr 2015 10:33:56 -0400 Message-ID: <1589639.roM6gzoYx3@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: References: <201504240758.t3O7w0o1022549@svn.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.2.7 (bigwig.baldwin.cx); Fri, 24 Apr 2015 11:03:35 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 15:03:37 -0000 On Friday, April 24, 2015 02:31:31 PM Sergey Kandaurov wrote: > On 24 April 2015 at 10:58, Edward Tomasz Napierala wrote: > > Author: trasz > > Date: Fri Apr 24 07:57:59 2015 > > New Revision: 281922 > > URL: https://svnweb.freebsd.org/changeset/base/281922 > > > > Log: > > Make nfsstat(1) build with WARNS=6. > > > > Sponsored by: The FreeBSD Foundation > > > > Modified: > > head/usr.bin/nfsstat/Makefile > > head/usr.bin/nfsstat/nfsstat.c > > > > Modified: head/usr.bin/nfsstat/Makefile > > ============================================================================== > > --- head/usr.bin/nfsstat/Makefile Fri Apr 24 07:52:21 2015 (r281921) > > +++ head/usr.bin/nfsstat/Makefile Fri Apr 24 07:57:59 2015 (r281922) > > @@ -6,6 +6,4 @@ CFLAGS+=-DNFS > > > > LIBADD= kvm > > > > -WARNS?= 3 > > - > > .include > > > > Modified: head/usr.bin/nfsstat/nfsstat.c > > ============================================================================== > > --- head/usr.bin/nfsstat/nfsstat.c Fri Apr 24 07:52:21 2015 (r281921) > > +++ head/usr.bin/nfsstat/nfsstat.c Fri Apr 24 07:57:59 2015 (r281922) > > @@ -70,15 +70,6 @@ static const char rcsid[] = > > #include > > #include > > > > -struct nlist nl[] = { > > -#define N_NFSSTAT 0 > > - { .n_name = "nfsstats" }, > > -#define N_NFSRVSTAT 1 > > - { .n_name = "nfsrvstats" }, > > - { .n_name = NULL }, > > -}; > > -kvm_t *kd; > > - > > static int widemode = 0; > > static int zflag = 0; > > static int printtitle = 1; > > > > Now that nfsstat no longer uses kvm to extract statistics, it could be > further trimmed. > - no longer link with kvm > - un-document -M/-N options but still kept (?) for backward compatibility > - cleanup from the previous sysctl/kvm usage. If these are just global structures in the kernel it would be nice to keep -N/-M support for use in crash dump reporting. This just broke crashinfo (again), so please either restore KVM support for crash reporting, or remove nfsstat from crashinfo. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 15:17:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E628B422; Fri, 24 Apr 2015 15:17:44 +0000 (UTC) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [IPv6:2607:fc50:1000:7400:216:3eff:fe72:314f]) by mx1.freebsd.org (Postfix) with ESMTP id C96DB1891; Fri, 24 Apr 2015 15:17:44 +0000 (UTC) Received: from marvin.lab.vangyzen.net (c-73-147-253-17.hsd1.va.comcast.net [73.147.253.17]) by smtp.vangyzen.net (Postfix) with ESMTPSA id C907156467; Fri, 24 Apr 2015 10:17:43 -0500 (CDT) Message-ID: <553A5E9B.7090503@FreeBSD.org> Date: Fri, 24 Apr 2015 11:17:47 -0400 From: Eric van Gyzen User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: John Baldwin , Sergey Kandaurov CC: Edward Tomasz Napierala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281922 - head/usr.bin/nfsstat References: <201504240758.t3O7w0o1022549@svn.freebsd.org> <1589639.roM6gzoYx3@ralph.baldwin.cx> In-Reply-To: <1589639.roM6gzoYx3@ralph.baldwin.cx> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 15:17:45 -0000 On 04/24/2015 10:33, John Baldwin wrote: > On Friday, April 24, 2015 02:31:31 PM Sergey Kandaurov wrote: >> On 24 April 2015 at 10:58, Edward Tomasz Napierala wrote: >>> Author: trasz >>> Date: Fri Apr 24 07:57:59 2015 >>> New Revision: 281922 >>> URL: https://svnweb.freebsd.org/changeset/base/281922 >>> >>> Log: >>> Make nfsstat(1) build with WARNS=6. >>> >>> Sponsored by: The FreeBSD Foundation >>> >>> Modified: >>> head/usr.bin/nfsstat/Makefile >>> head/usr.bin/nfsstat/nfsstat.c >>> >>> Modified: head/usr.bin/nfsstat/Makefile >>> ============================================================================== >>> --- head/usr.bin/nfsstat/Makefile Fri Apr 24 07:52:21 2015 (r281921) >>> +++ head/usr.bin/nfsstat/Makefile Fri Apr 24 07:57:59 2015 (r281922) >>> @@ -6,6 +6,4 @@ CFLAGS+=-DNFS >>> >>> LIBADD= kvm >>> >>> -WARNS?= 3 >>> - >>> .include >>> >>> Modified: head/usr.bin/nfsstat/nfsstat.c >>> ============================================================================== >>> --- head/usr.bin/nfsstat/nfsstat.c Fri Apr 24 07:52:21 2015 (r281921) >>> +++ head/usr.bin/nfsstat/nfsstat.c Fri Apr 24 07:57:59 2015 (r281922) >>> @@ -70,15 +70,6 @@ static const char rcsid[] = >>> #include >>> #include >>> >>> -struct nlist nl[] = { >>> -#define N_NFSSTAT 0 >>> - { .n_name = "nfsstats" }, >>> -#define N_NFSRVSTAT 1 >>> - { .n_name = "nfsrvstats" }, >>> - { .n_name = NULL }, >>> -}; >>> -kvm_t *kd; >>> - >>> static int widemode = 0; >>> static int zflag = 0; >>> static int printtitle = 1; >>> >> >> Now that nfsstat no longer uses kvm to extract statistics, it could be >> further trimmed. >> - no longer link with kvm >> - un-document -M/-N options but still kept (?) for backward compatibility >> - cleanup from the previous sysctl/kvm usage. > > If these are just global structures in the kernel it would be nice to keep > -N/-M support for use in crash dump reporting. This just broke crashinfo > (again), so please either restore KVM support for crash reporting, or > remove nfsstat from crashinfo. ...or implement debugger scripts that provide similar functionality, and call those from crashinfo. Eric From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 15:32:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 51A3DA95; Fri, 24 Apr 2015 15:32:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3FC841AB7; Fri, 24 Apr 2015 15:32:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OFWDan051625; Fri, 24 Apr 2015 15:32:13 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OFWDX4051624; Fri, 24 Apr 2015 15:32:13 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504241532.t3OFWDX4051624@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 24 Apr 2015 15:32:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281933 - stable/10/sys/dev/vt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 15:32:13 -0000 Author: emaste Date: Fri Apr 24 15:32:12 2015 New Revision: 281933 URL: https://svnweb.freebsd.org/changeset/base/281933 Log: MFC r281537: Increase vt font limits to allow use of GNU Unifont PR: 199438 Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/vt/vt_font.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/vt_font.c ============================================================================== --- stable/10/sys/dev/vt/vt_font.c Fri Apr 24 14:47:53 2015 (r281932) +++ stable/10/sys/dev/vt/vt_font.c Fri Apr 24 15:32:12 2015 (r281933) @@ -41,8 +41,8 @@ __FBSDID("$FreeBSD$"); static MALLOC_DEFINE(M_VTFONT, "vtfont", "vt font"); /* Some limits to prevent abnormal fonts from being loaded. */ -#define VTFONT_MAXMAPPINGS 8192 -#define VTFONT_MAXGLYPHSIZE 1048576 +#define VTFONT_MAXMAPPINGS 65536 +#define VTFONT_MAXGLYPHSIZE 2097152 #define VTFONT_MAXDIMENSION 128 static uint16_t From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 15:34:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D987EC24; Fri, 24 Apr 2015 15:34:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7B901ADE; Fri, 24 Apr 2015 15:34:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OFYKnu052028; Fri, 24 Apr 2015 15:34:20 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OFYKne052026; Fri, 24 Apr 2015 15:34:20 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504241534.t3OFYKne052026@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 24 Apr 2015 15:34:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281934 - stable/9/sys/dev/vt X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 15:34:21 -0000 Author: emaste Date: Fri Apr 24 15:34:20 2015 New Revision: 281934 URL: https://svnweb.freebsd.org/changeset/base/281934 Log: MFC r281537: Increase vt font limits to allow use of GNU Unifont PR: 199438 Sponsored by: The FreeBSD Foundation Modified: stable/9/sys/dev/vt/vt_font.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/vt/vt_font.c ============================================================================== --- stable/9/sys/dev/vt/vt_font.c Fri Apr 24 15:32:12 2015 (r281933) +++ stable/9/sys/dev/vt/vt_font.c Fri Apr 24 15:34:20 2015 (r281934) @@ -41,8 +41,8 @@ __FBSDID("$FreeBSD$"); static MALLOC_DEFINE(M_VTFONT, "vtfont", "vt font"); /* Some limits to prevent abnormal fonts from being loaded. */ -#define VTFONT_MAXMAPPINGS 8192 -#define VTFONT_MAXGLYPHSIZE 1048576 +#define VTFONT_MAXMAPPINGS 65536 +#define VTFONT_MAXGLYPHSIZE 2097152 #define VTFONT_MAXDIMENSION 128 static uint16_t From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 15:36:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E0D9CE6F; Fri, 24 Apr 2015 15:36:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFBDA1B01; Fri, 24 Apr 2015 15:36:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OFawHx052606; Fri, 24 Apr 2015 15:36:58 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OFawMn052605; Fri, 24 Apr 2015 15:36:58 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504241536.t3OFawMn052605@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 24 Apr 2015 15:36:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281935 - stable/9/contrib/binutils/bfd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 15:36:59 -0000 Author: emaste Date: Fri Apr 24 15:36:58 2015 New Revision: 281935 URL: https://svnweb.freebsd.org/changeset/base/281935 Log: MFC r279301: GNU nm: Avoid NULL dereference bfd_dwarf2_find_line() calls find_line() with NULL functionname_ptr, which resulted in a crash on certain ELF objects. This change was implemented independently from upstream binutils, but I have checked that the crash does not happen there. Sponsored by: The FreeBSD Foundation Modified: stable/9/contrib/binutils/bfd/dwarf2.c Directory Properties: stable/9/contrib/binutils/ (props changed) Modified: stable/9/contrib/binutils/bfd/dwarf2.c ============================================================================== --- stable/9/contrib/binutils/bfd/dwarf2.c Fri Apr 24 15:34:20 2015 (r281934) +++ stable/9/contrib/binutils/bfd/dwarf2.c Fri Apr 24 15:36:58 2015 (r281935) @@ -2382,7 +2382,8 @@ find_line (bfd *abfd, else addr += section->vma; *filename_ptr = NULL; - *functionname_ptr = NULL; + if (!do_line) + *functionname_ptr = NULL; *linenumber_ptr = 0; if (! *pinfo) From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 15:48:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 986744F9; Fri, 24 Apr 2015 15:48:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8695C1C88; Fri, 24 Apr 2015 15:48:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OFmO1Y057985; Fri, 24 Apr 2015 15:48:24 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OFmOwP057984; Fri, 24 Apr 2015 15:48:24 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504241548.t3OFmOwP057984@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 24 Apr 2015 15:48:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281936 - stable/10/usr.bin/ar X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 15:48:24 -0000 Author: emaste Date: Fri Apr 24 15:48:23 2015 New Revision: 281936 URL: https://svnweb.freebsd.org/changeset/base/281936 Log: MFC r281311: ar: Disallow directory traversal Set ARCHIVE_EXTRACT_SECURE_SYMLINKS and ARCHIVE_EXTRACT_SECURE_NODOTDOT as in bsdtar to prevent extraction of archive entries whose pathnames contain .. or whose target directory would be altered by a symlink. Also disallow absolute pathnames. We don't currently provide an option to disable this behaviour (as bsdtar's -P does). It is unlikely to be a problem in practice for ar(1), but the -P option is not currently used and available if we want to consider it for this purpose. Obtained from: ELF tool chain ar, Ticket #474 Relnotes: Yes Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.bin/ar/read.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/ar/read.c ============================================================================== --- stable/10/usr.bin/ar/read.c Fri Apr 24 15:36:58 2015 (r281935) +++ stable/10/usr.bin/ar/read.c Fri Apr 24 15:48:23 2015 (r281936) @@ -186,7 +186,15 @@ read_archive(struct bsdar *bsdar, char m if (bsdar->options & AR_V) (void)fprintf(stdout, "x - %s\n", name); - flags = 0; + /* Disallow absolute paths. */ + if (name[0] == '/') { + bsdar_warnc(bsdar, 0, + "Absolute path '%s'", name); + continue; + } + /* Basic path security flags. */ + flags = ARCHIVE_EXTRACT_SECURE_SYMLINKS | \ + ARCHIVE_EXTRACT_SECURE_NODOTDOT; if (bsdar->options & AR_O) flags |= ARCHIVE_EXTRACT_TIME; From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 15:58:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26736AAC; Fri, 24 Apr 2015 15:58:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 14AEC1DE9; Fri, 24 Apr 2015 15:58:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OFwf0a063230; Fri, 24 Apr 2015 15:58:41 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OFwfpH063229; Fri, 24 Apr 2015 15:58:41 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504241558.t3OFwfpH063229@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 24 Apr 2015 15:58:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281937 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 15:58:42 -0000 Author: emaste Date: Fri Apr 24 15:58:41 2015 New Revision: 281937 URL: https://svnweb.freebsd.org/changeset/base/281937 Log: MFC r277464: Add missing R_X86_64_ constants to elf_common.h PR: 196918 Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/sys/elf_common.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/elf_common.h ============================================================================== --- stable/10/sys/sys/elf_common.h Fri Apr 24 15:48:23 2015 (r281936) +++ stable/10/sys/sys/elf_common.h Fri Apr 24 15:58:41 2015 (r281937) @@ -997,6 +997,19 @@ typedef struct { #define R_X86_64_DTPOFF32 21 /* Offset in TLS block */ #define R_X86_64_GOTTPOFF 22 /* PC relative offset to IE GOT entry */ #define R_X86_64_TPOFF32 23 /* Offset in static TLS block */ +#define R_X86_64_PC64 24 /* PC-relative 64 bit signed sym value. */ +#define R_X86_64_GOTOFF64 25 +#define R_X86_64_GOTPC32 26 +#define R_X86_64_GOT64 27 +#define R_X86_64_GOTPCREL64 28 +#define R_X86_64_GOTPC64 29 +#define R_X86_64_GOTPLT64 30 +#define R_X86_64_PLTOFF64 31 +#define R_X86_64_SIZE32 32 +#define R_X86_64_SIZE64 33 +#define R_X86_64_GOTPC32_TLSDESC 34 +#define R_X86_64_TLSDESC_CALL 35 +#define R_X86_64_TLSDESC 36 #define R_X86_64_IRELATIVE 37 From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 16:11:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 75217E89; Fri, 24 Apr 2015 16:11:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62B7F1F4F; Fri, 24 Apr 2015 16:11:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OGBOPO072436; Fri, 24 Apr 2015 16:11:24 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OGBNTV072428; Fri, 24 Apr 2015 16:11:23 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201504241611.t3OGBNTV072428@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Fri, 24 Apr 2015 16:11:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281938 - head/contrib/tcpdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 16:11:24 -0000 Author: brooks Date: Fri Apr 24 16:11:22 2015 New Revision: 281938 URL: https://svnweb.freebsd.org/changeset/base/281938 Log: Merge from CheriBSD: 1065cf515a7c2062598009c1318055aacbb39e80 Convert the pfsync dissector to use the netdissect framework. Differential Revision: https://reviews.freebsd.org/D2359 Reviewed by: glebius Sponsored by: DARPA, AFRL Modified: head/contrib/tcpdump/interface.h head/contrib/tcpdump/netdissect.h head/contrib/tcpdump/print-ip.c head/contrib/tcpdump/print-pfsync.c Modified: head/contrib/tcpdump/interface.h ============================================================================== --- head/contrib/tcpdump/interface.h Fri Apr 24 15:58:41 2015 (r281937) +++ head/contrib/tcpdump/interface.h Fri Apr 24 16:11:22 2015 (r281938) @@ -148,8 +148,6 @@ extern uint16_t create_osi_cksum(const u #include -extern void pfsync_ip_print(const u_char *, u_int); - extern char *q922_string(const u_char *); extern char *smb_errstr(int, int); extern const char *nt_errstr(uint32_t); Modified: head/contrib/tcpdump/netdissect.h ============================================================================== --- head/contrib/tcpdump/netdissect.h Fri Apr 24 15:58:41 2015 (r281937) +++ head/contrib/tcpdump/netdissect.h Fri Apr 24 16:11:22 2015 (r281938) @@ -540,6 +540,8 @@ extern void timed_print(netdissect_optio extern void m3ua_print(netdissect_options *, const u_char *, const u_int); extern void aoe_print(netdissect_options *, const u_char *, const u_int); +extern void pfsync_ip_print(netdissect_options *, const u_char *, u_int); + /* stuff that has not yet been rototiled */ #if 0 Modified: head/contrib/tcpdump/print-ip.c ============================================================================== --- head/contrib/tcpdump/print-ip.c Fri Apr 24 15:58:41 2015 (r281937) +++ head/contrib/tcpdump/print-ip.c Fri Apr 24 16:11:22 2015 (r281938) @@ -487,7 +487,7 @@ again: #if defined(HAVE_NET_PFVAR_H) case IPPROTO_PFSYNC: - pfsync_ip_print(ipds->cp, ipds->len); + pfsync_ip_print(ndo, ipds->cp, ipds->len); break; #endif Modified: head/contrib/tcpdump/print-pfsync.c ============================================================================== --- head/contrib/tcpdump/print-pfsync.c Fri Apr 24 15:58:41 2015 (r281937) +++ head/contrib/tcpdump/print-pfsync.c Fri Apr 24 16:11:22 2015 (r281938) @@ -47,10 +47,12 @@ #include "interface.h" #include "addrtoname.h" -static void pfsync_print(struct pfsync_header *, const u_char *, u_int); -static void print_src_dst(const struct pfsync_state_peer *, +static void pfsync_print(netdissect_options *, struct pfsync_header *, + const u_char *, u_int); +static void print_src_dst(netdissect_options *, + const struct pfsync_state_peer *, const struct pfsync_state_peer *, uint8_t); -static void print_state(struct pfsync_state *); +static void print_state(netdissect_options *, struct pfsync_state *); #ifdef notyet void @@ -62,7 +64,7 @@ pfsync_if_print(u_char *user, const stru ts_print(&h->ts); if (caplen < PFSYNC_HDRLEN) { - printf("[|pfsync]"); + ND_PRINT((ndo, "[|pfsync]")); goto out; } @@ -73,36 +75,36 @@ out: if (xflag) { default_print((const u_char *)p, caplen); } - putchar('\n'); + safeputchar(ndo, '\n'); } #endif /* notyet */ void -pfsync_ip_print(const u_char *bp, u_int len) +pfsync_ip_print(netdissect_options *ndo , const u_char *bp, u_int len) { struct pfsync_header *hdr = (struct pfsync_header *)bp; if (len < PFSYNC_HDRLEN) - printf("[|pfsync]"); + ND_PRINT((ndo, "[|pfsync]")); else - pfsync_print(hdr, bp + sizeof(struct pfsync_header), + pfsync_print(ndo, hdr, bp + sizeof(struct pfsync_header), len - sizeof(struct pfsync_header)); } struct pfsync_actions { const char *name; size_t len; - void (*print)(const void *); + void (*print)(netdissect_options *, const void *); }; -static void pfsync_print_clr(const void *); -static void pfsync_print_state(const void *); -static void pfsync_print_ins_ack(const void *); -static void pfsync_print_upd_c(const void *); -static void pfsync_print_upd_req(const void *); -static void pfsync_print_del_c(const void *); -static void pfsync_print_bus(const void *); -static void pfsync_print_tdb(const void *); +static void pfsync_print_clr(netdissect_options *, const void *); +static void pfsync_print_state(netdissect_options *, const void *); +static void pfsync_print_ins_ack(netdissect_options *, const void *); +static void pfsync_print_upd_c(netdissect_options *, const void *); +static void pfsync_print_upd_req(netdissect_options *, const void *); +static void pfsync_print_del_c(netdissect_options *, const void *); +static void pfsync_print_bus(netdissect_options *, const void *); +static void pfsync_print_tdb(netdissect_options *, const void *); struct pfsync_actions actions[] = { { "clear all", sizeof(struct pfsync_clr), pfsync_print_clr }, @@ -125,7 +127,8 @@ struct pfsync_actions actions[] = { }; static void -pfsync_print(struct pfsync_header *hdr, const u_char *bp, u_int len) +pfsync_print(netdissect_options *ndo, struct pfsync_header *hdr, + const u_char *bp, u_int len) { struct pfsync_subheader *subh; int count, plen, i; @@ -133,7 +136,7 @@ pfsync_print(struct pfsync_header *hdr, plen = ntohs(hdr->len); - printf("PFSYNCv%d len %d", hdr->version, plen); + ND_PRINT((ndo, "PFSYNCv%d len %d", hdr->version, plen)); if (hdr->version != PFSYNC_VERSION) return; @@ -150,19 +153,22 @@ pfsync_print(struct pfsync_header *hdr, plen -= sizeof(*subh); if (subh->action >= PFSYNC_ACT_MAX) { - printf("\n act UNKNOWN id %d", subh->action); + ND_PRINT((ndo, "\n act UNKNOWN id %d", + subh->action)); return; } count = ntohs(subh->count); - printf("\n %s count %d", actions[subh->action].name, count); + ND_PRINT((ndo, "\n %s count %d", actions[subh->action].name, + count)); alen = actions[subh->action].len; if (subh->action == PFSYNC_ACT_EOF) return; if (actions[subh->action].print == NULL) { - printf("\n unimplemented action %hhu", subh->action); + ND_PRINT((ndo, "\n unimplemented action %hhu", + subh->action)); return; } @@ -173,7 +179,7 @@ pfsync_print(struct pfsync_header *hdr, } if (vflag) - actions[subh->action].print(bp); + actions[subh->action].print(ndo, bp); bp += alen; len -= alen; @@ -182,78 +188,78 @@ pfsync_print(struct pfsync_header *hdr, } if (plen > 0) { - printf("\n ..."); + ND_PRINT((ndo, "\n ...")); return; } if (plen < 0) { - printf("\n invalid header length"); + ND_PRINT((ndo, "\n invalid header length")); return; } if (len > 0) - printf("\n invalid packet length"); + ND_PRINT((ndo, "\n invalid packet length")); } static void -pfsync_print_clr(const void *bp) +pfsync_print_clr(netdissect_options *ndo, const void *bp) { const struct pfsync_clr *clr = bp; - printf("\n\tcreatorid: %08x", htonl(clr->creatorid)); + ND_PRINT((ndo, "\n\tcreatorid: %08x", htonl(clr->creatorid))); if (clr->ifname[0] != '\0') - printf(" interface: %s", clr->ifname); + ND_PRINT((ndo, " interface: %s", clr->ifname)); } static void -pfsync_print_state(const void *bp) +pfsync_print_state(netdissect_options *ndo, const void *bp) { struct pfsync_state *st = (struct pfsync_state *)bp; - putchar('\n'); - print_state(st); + safeputchar(ndo, '\n'); + print_state(ndo, st); } static void -pfsync_print_ins_ack(const void *bp) +pfsync_print_ins_ack(netdissect_options *ndo, const void *bp) { const struct pfsync_ins_ack *iack = bp; - printf("\n\tid: %016jx creatorid: %08x", (uintmax_t )be64toh(iack->id), - ntohl(iack->creatorid)); + ND_PRINT((ndo, "\n\tid: %016jx creatorid: %08x", + (uintmax_t)be64toh(iack->id), ntohl(iack->creatorid))); } static void -pfsync_print_upd_c(const void *bp) +pfsync_print_upd_c(netdissect_options *ndo, const void *bp) { const struct pfsync_upd_c *u = bp; - printf("\n\tid: %016jx creatorid: %08x", (uintmax_t )be64toh(u->id), - ntohl(u->creatorid)); + ND_PRINT((ndo, "\n\tid: %016jx creatorid: %08x", + (uintmax_t)be64toh(u->id), ntohl(u->creatorid))); if (vflag > 2) { - printf("\n\tTCP? :"); - print_src_dst(&u->src, &u->dst, IPPROTO_TCP); + ND_PRINT((ndo, "\n\tTCP? :")); + print_src_dst(ndo, &u->src, &u->dst, IPPROTO_TCP); } } static void -pfsync_print_upd_req(const void *bp) +pfsync_print_upd_req(netdissect_options *ndo, const void *bp) { const struct pfsync_upd_req *ur = bp; - printf("\n\tid: %016jx creatorid: %08x", (uintmax_t )be64toh(ur->id), - ntohl(ur->creatorid)); + ND_PRINT((ndo, "\n\tid: %016jx creatorid: %08x", + (uintmax_t)be64toh(ur->id), ntohl(ur->creatorid))); } static void -pfsync_print_del_c(const void *bp) +pfsync_print_del_c(netdissect_options *ndo, const void *bp) { const struct pfsync_del_c *d = bp; - printf("\n\tid: %016jx creatorid: %08x", (uintmax_t )be64toh(d->id), - ntohl(d->creatorid)); + ND_PRINT((ndo, "\n\tid: %016jx creatorid: %08x", + (uintmax_t)be64toh(d->id), ntohl(d->creatorid))); } static void -pfsync_print_bus(const void *bp) +pfsync_print_bus(netdissect_options *ndo, const void *bp) { const struct pfsync_bus *b = bp; uint32_t endtime; @@ -278,95 +284,95 @@ pfsync_print_bus(const void *bp) break; } - printf("\n\tcreatorid: %08x age: %.2u:%.2u:%.2u status: %s", - htonl(b->creatorid), endtime, min, sec, status); + ND_PRINT((ndo, "\n\tcreatorid: %08x age: %.2u:%.2u:%.2u status: %s", + htonl(b->creatorid), endtime, min, sec, status)); } static void -pfsync_print_tdb(const void *bp) +pfsync_print_tdb(netdissect_options *ndo, const void *bp) { const struct pfsync_tdb *t = bp; - printf("\n\tspi: 0x%08x rpl: %ju cur_bytes: %ju", + ND_PRINT((ndo, "\n\tspi: 0x%08x rpl: %ju cur_bytes: %ju", ntohl(t->spi), (uintmax_t )be64toh(t->rpl), - (uintmax_t )be64toh(t->cur_bytes)); + (uintmax_t )be64toh(t->cur_bytes))); } static void -print_host(struct pf_addr *addr, uint16_t port, sa_family_t af, - const char *proto) +print_host(netdissect_options *ndo, struct pf_addr *addr, uint16_t port, + sa_family_t af, const char *proto) { char buf[48]; if (inet_ntop(af, addr, buf, sizeof(buf)) == NULL) - printf("?"); + ND_PRINT((ndo, "?")); else - printf("%s", buf); + ND_PRINT((ndo, "%s", buf)); if (port) - printf(".%hu", ntohs(port)); + ND_PRINT((ndo, ".%hu", ntohs(port))); } static void -print_seq(const struct pfsync_state_peer *p) +print_seq(netdissect_options *ndo, const struct pfsync_state_peer *p) { if (p->seqdiff) - printf("[%u + %u](+%u)", ntohl(p->seqlo), - ntohl(p->seqhi) - ntohl(p->seqlo), ntohl(p->seqdiff)); + ND_PRINT((ndo, "[%u + %u](+%u)", ntohl(p->seqlo), + ntohl(p->seqhi) - ntohl(p->seqlo), ntohl(p->seqdiff))); else - printf("[%u + %u]", ntohl(p->seqlo), - ntohl(p->seqhi) - ntohl(p->seqlo)); + ND_PRINT((ndo, "[%u + %u]", ntohl(p->seqlo), + ntohl(p->seqhi) - ntohl(p->seqlo))); } static void -print_src_dst(const struct pfsync_state_peer *src, +print_src_dst(netdissect_options *ndo, const struct pfsync_state_peer *src, const struct pfsync_state_peer *dst, uint8_t proto) { if (proto == IPPROTO_TCP) { if (src->state <= TCPS_TIME_WAIT && dst->state <= TCPS_TIME_WAIT) - printf(" %s:%s", tcpstates[src->state], - tcpstates[dst->state]); + ND_PRINT((ndo, " %s:%s", tcpstates[src->state], + tcpstates[dst->state])); else if (src->state == PF_TCPS_PROXY_SRC || dst->state == PF_TCPS_PROXY_SRC) - printf(" PROXY:SRC"); + ND_PRINT((ndo, " PROXY:SRC")); else if (src->state == PF_TCPS_PROXY_DST || dst->state == PF_TCPS_PROXY_DST) - printf(" PROXY:DST"); + ND_PRINT((ndo, " PROXY:DST")); else - printf(" ", - src->state, dst->state); + ND_PRINT((ndo, " ", + src->state, dst->state)); if (vflag > 1) { - printf("\n\t"); - print_seq(src); + ND_PRINT((ndo, "\n\t")); + print_seq(ndo, src); if (src->wscale && dst->wscale) - printf(" wscale %u", - src->wscale & PF_WSCALE_MASK); - printf(" "); - print_seq(dst); + ND_PRINT((ndo, " wscale %u", + src->wscale & PF_WSCALE_MASK)); + ND_PRINT((ndo, " ")); + print_seq(ndo, dst); if (src->wscale && dst->wscale) - printf(" wscale %u", - dst->wscale & PF_WSCALE_MASK); + ND_PRINT((ndo, " wscale %u", + dst->wscale & PF_WSCALE_MASK)); } } else if (proto == IPPROTO_UDP && src->state < PFUDPS_NSTATES && dst->state < PFUDPS_NSTATES) { const char *states[] = PFUDPS_NAMES; - printf(" %s:%s", states[src->state], states[dst->state]); + ND_PRINT((ndo, " %s:%s", states[src->state], states[dst->state])); } else if (proto != IPPROTO_ICMP && src->state < PFOTHERS_NSTATES && dst->state < PFOTHERS_NSTATES) { /* XXX ICMP doesn't really have state levels */ const char *states[] = PFOTHERS_NAMES; - printf(" %s:%s", states[src->state], states[dst->state]); + ND_PRINT((ndo, " %s:%s", states[src->state], states[dst->state])); } else { - printf(" %u:%u", src->state, dst->state); + ND_PRINT((ndo, " %u:%u", src->state, dst->state)); } } static void -print_state(struct pfsync_state *s) +print_state(netdissect_options *ndo, struct pfsync_state *s) { struct pfsync_state_peer *src, *dst; struct pfsync_state_key *sk, *nk; @@ -387,29 +393,29 @@ print_state(struct pfsync_state *s) if (s->proto == IPPROTO_ICMP || s->proto == IPPROTO_ICMPV6) sk->port[1] = nk->port[1]; } - printf("\t%s ", s->ifname); - printf("proto %u ", s->proto); + ND_PRINT((ndo, "\t%s ", s->ifname)); + ND_PRINT((ndo, "proto %u ", s->proto)); - print_host(&nk->addr[1], nk->port[1], s->af, NULL); + print_host(ndo, &nk->addr[1], nk->port[1], s->af, NULL); if (PF_ANEQ(&nk->addr[1], &sk->addr[1], s->af) || nk->port[1] != sk->port[1]) { - printf(" ("); - print_host(&sk->addr[1], sk->port[1], s->af, NULL); - printf(")"); + ND_PRINT((ndo, " (")); + print_host(ndo, &sk->addr[1], sk->port[1], s->af, NULL); + ND_PRINT((ndo, ")")); } if (s->direction == PF_OUT) - printf(" -> "); + ND_PRINT((ndo, " -> ")); else - printf(" <- "); - print_host(&nk->addr[0], nk->port[0], s->af, NULL); + ND_PRINT((ndo, " <- ")); + print_host(ndo, &nk->addr[0], nk->port[0], s->af, NULL); if (PF_ANEQ(&nk->addr[0], &sk->addr[0], s->af) || nk->port[0] != sk->port[0]) { - printf(" ("); - print_host(&sk->addr[0], sk->port[0], s->af, NULL); - printf(")"); + ND_PRINT((ndo, " (")); + print_host(ndo, &sk->addr[0], sk->port[0], s->af, NULL); + ND_PRINT((ndo, ")")); } - print_src_dst(src, dst, s->proto); + print_src_dst(ndo, src, dst, s->proto); if (vflag > 1) { uint64_t packets[2]; @@ -421,30 +427,30 @@ print_state(struct pfsync_state *s) creation /= 60; min = creation % 60; creation /= 60; - printf("\n\tage %.2u:%.2u:%.2u", creation, min, sec); + ND_PRINT((ndo, "\n\tage %.2u:%.2u:%.2u", creation, min, sec)); sec = expire % 60; expire /= 60; min = expire % 60; expire /= 60; - printf(", expires in %.2u:%.2u:%.2u", expire, min, sec); + ND_PRINT((ndo, ", expires in %.2u:%.2u:%.2u", expire, min, sec)); bcopy(s->packets[0], &packets[0], sizeof(uint64_t)); bcopy(s->packets[1], &packets[1], sizeof(uint64_t)); bcopy(s->bytes[0], &bytes[0], sizeof(uint64_t)); bcopy(s->bytes[1], &bytes[1], sizeof(uint64_t)); - printf(", %ju:%ju pkts, %ju:%ju bytes", + ND_PRINT((ndo, ", %ju:%ju pkts, %ju:%ju bytes", be64toh(packets[0]), be64toh(packets[1]), - be64toh(bytes[0]), be64toh(bytes[1])); + be64toh(bytes[0]), be64toh(bytes[1]))); if (s->anchor != ntohl(-1)) - printf(", anchor %u", ntohl(s->anchor)); + ND_PRINT((ndo, ", anchor %u", ntohl(s->anchor))); if (s->rule != ntohl(-1)) - printf(", rule %u", ntohl(s->rule)); + ND_PRINT((ndo, ", rule %u", ntohl(s->rule))); } if (vflag > 1) { uint64_t id; bcopy(&s->id, &id, sizeof(uint64_t)); - printf("\n\tid: %016jx creatorid: %08x", - (uintmax_t )be64toh(id), ntohl(s->creatorid)); + ND_PRINT((ndo, "\n\tid: %016jx creatorid: %08x", + (uintmax_t )be64toh(id), ntohl(s->creatorid))); } } From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 16:12:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78D00FE8; Fri, 24 Apr 2015 16:12:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 671CF1006; Fri, 24 Apr 2015 16:12:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OGCVYE072649; Fri, 24 Apr 2015 16:12:31 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OGCVj0072648; Fri, 24 Apr 2015 16:12:31 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504241612.t3OGCVj0072648@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 24 Apr 2015 16:12:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281939 - stable/9/sys/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 16:12:31 -0000 Author: emaste Date: Fri Apr 24 16:12:30 2015 New Revision: 281939 URL: https://svnweb.freebsd.org/changeset/base/281939 Log: MFC r277464: Add missing R_X86_64_ constants to elf_common.h PR: 196918 Sponsored by: The FreeBSD Foundation Modified: stable/9/sys/sys/elf_common.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/sys/elf_common.h ============================================================================== --- stable/9/sys/sys/elf_common.h Fri Apr 24 16:11:22 2015 (r281938) +++ stable/9/sys/sys/elf_common.h Fri Apr 24 16:12:30 2015 (r281939) @@ -979,6 +979,19 @@ typedef struct { #define R_X86_64_DTPOFF32 21 /* Offset in TLS block */ #define R_X86_64_GOTTPOFF 22 /* PC relative offset to IE GOT entry */ #define R_X86_64_TPOFF32 23 /* Offset in static TLS block */ +#define R_X86_64_PC64 24 /* PC-relative 64 bit signed sym value. */ +#define R_X86_64_GOTOFF64 25 +#define R_X86_64_GOTPC32 26 +#define R_X86_64_GOT64 27 +#define R_X86_64_GOTPCREL64 28 +#define R_X86_64_GOTPC64 29 +#define R_X86_64_GOTPLT64 30 +#define R_X86_64_PLTOFF64 31 +#define R_X86_64_SIZE32 32 +#define R_X86_64_SIZE64 33 +#define R_X86_64_GOTPC32_TLSDESC 34 +#define R_X86_64_TLSDESC_CALL 35 +#define R_X86_64_TLSDESC 36 #define R_X86_64_IRELATIVE 37 From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 16:20:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A4BEB653; Fri, 24 Apr 2015 16:20:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 919A0112E; Fri, 24 Apr 2015 16:20:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OGKvQQ075242; Fri, 24 Apr 2015 16:20:57 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OGKvpe075240; Fri, 24 Apr 2015 16:20:57 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504241620.t3OGKvpe075240@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 24 Apr 2015 16:20:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281940 - in head/sys: amd64/amd64 amd64/include conf i386/i386 i386/include i386/xen x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 16:20:57 -0000 Author: kib Date: Fri Apr 24 16:20:56 2015 New Revision: 281940 URL: https://svnweb.freebsd.org/changeset/base/281940 Log: Move common code from sys/i386/i386/mp_machdep.c and sys/amd64/amd64/mp_machdep.c, to the new common x86 source sys/x86/x86/mp_x86.c. Proposed and reviewed by: jhb Review: https://reviews.freebsd.org/D2347 Sponsored by: The FreeBSD Foundation Added: head/sys/x86/x86/mp_x86.c - copied, changed from r281937, head/sys/i386/i386/mp_machdep.c Modified: head/sys/amd64/amd64/mp_machdep.c head/sys/amd64/include/smp.h head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/conf/files.pc98 head/sys/i386/i386/mp_machdep.c head/sys/i386/include/smp.h head/sys/i386/xen/mp_machdep.c Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Fri Apr 24 16:12:30 2015 (r281939) +++ head/sys/amd64/amd64/mp_machdep.c Fri Apr 24 16:20:56 2015 (r281940) @@ -81,28 +81,11 @@ __FBSDID("$FreeBSD$"); #define BIOS_RESET (0x0f) #define BIOS_WARM (0x0a) -/* lock region used by kernel profiling */ -int mcount_lock; - -int mp_naps; /* # of Applications processors */ -int boot_cpu_id = -1; /* designated BSP */ - -extern struct pcpu __pcpu[]; - -/* AP uses this during bootstrap. Do not staticize. */ -char *bootSTK; -int bootAP; - -/* Free these after use */ -void *bootstacks[MAXCPU]; +extern struct pcpu __pcpu[]; /* Temporary variables for init_secondary() */ char *doublefault_stack; char *nmi_stack; -void *dpcpu; - -struct pcb stoppcbs[MAXCPU]; -struct susppcb **susppcbs; /* Variables needed for SMP tlb shootdown. */ vm_offset_t smp_tlb_addr2; @@ -112,309 +95,16 @@ uint64_t pcid_cr3; pmap_t smp_tlb_pmap; extern int invpcid_works; -#ifdef COUNT_IPIS -/* Interrupt counts. */ -static u_long *ipi_preempt_counts[MAXCPU]; -static u_long *ipi_ast_counts[MAXCPU]; -u_long *ipi_invltlb_counts[MAXCPU]; -u_long *ipi_invlrng_counts[MAXCPU]; -u_long *ipi_invlpg_counts[MAXCPU]; -u_long *ipi_invlcache_counts[MAXCPU]; -u_long *ipi_rendezvous_counts[MAXCPU]; -static u_long *ipi_hardclock_counts[MAXCPU]; -#endif - -/* Default cpu_ops implementation. */ -struct cpu_ops cpu_ops; - extern inthand_t IDTVEC(fast_syscall), IDTVEC(fast_syscall32); -extern int pmap_pcid_enabled; - /* * Local data and functions. */ -static volatile cpuset_t ipi_nmi_pending; - -/* used to hold the AP's until we are ready to release them */ -struct mtx ap_boot_mtx; - -/* Set to 1 once we're ready to let the APs out of the pen. */ -static volatile int aps_ready = 0; - -/* - * Store data from cpu_add() until later in the boot when we actually setup - * the APs. - */ -struct cpu_info { - int cpu_present:1; - int cpu_bsp:1; - int cpu_disabled:1; - int cpu_hyperthread:1; -} static cpu_info[MAX_APIC_ID + 1]; -int cpu_apic_ids[MAXCPU]; -int apic_cpuids[MAX_APIC_ID + 1]; - -/* Holds pending bitmap based IPIs per CPU */ -volatile u_int cpu_ipi_pending[MAXCPU]; - -static u_int boot_address; -static int cpu_logical; /* logical cpus per core */ -static int cpu_cores; /* cores per package */ - -static void assign_cpu_ids(void); -static void set_interrupt_apic_ids(void); static int start_ap(int apic_id); -static void release_aps(void *dummy); -static u_int hyperthreading_cpus; /* logical cpus sharing L1 cache */ -static int hyperthreading_allowed = 1; static u_int bootMP_size; - -static void -mem_range_AP_init(void) -{ - if (mem_range_softc.mr_op && mem_range_softc.mr_op->initAP) - mem_range_softc.mr_op->initAP(&mem_range_softc); -} - -static void -topo_probe_amd(void) -{ - int core_id_bits; - int id; - - /* AMD processors do not support HTT. */ - cpu_logical = 1; - - if ((amd_feature2 & AMDID2_CMP) == 0) { - cpu_cores = 1; - return; - } - - core_id_bits = (cpu_procinfo2 & AMDID_COREID_SIZE) >> - AMDID_COREID_SIZE_SHIFT; - if (core_id_bits == 0) { - cpu_cores = (cpu_procinfo2 & AMDID_CMP_CORES) + 1; - return; - } - - /* Fam 10h and newer should get here. */ - for (id = 0; id <= MAX_APIC_ID; id++) { - /* Check logical CPU availability. */ - if (!cpu_info[id].cpu_present || cpu_info[id].cpu_disabled) - continue; - /* Check if logical CPU has the same package ID. */ - if ((id >> core_id_bits) != (boot_cpu_id >> core_id_bits)) - continue; - cpu_cores++; - } -} - -/* - * Round up to the next power of two, if necessary, and then - * take log2. - * Returns -1 if argument is zero. - */ -static __inline int -mask_width(u_int x) -{ - - return (fls(x << (1 - powerof2(x))) - 1); -} - -static void -topo_probe_0x4(void) -{ - u_int p[4]; - int pkg_id_bits; - int core_id_bits; - int max_cores; - int max_logical; - int id; - - /* Both zero and one here mean one logical processor per package. */ - max_logical = (cpu_feature & CPUID_HTT) != 0 ? - (cpu_procinfo & CPUID_HTT_CORES) >> 16 : 1; - if (max_logical <= 1) - return; - - /* - * Because of uniformity assumption we examine only - * those logical processors that belong to the same - * package as BSP. Further, we count number of - * logical processors that belong to the same core - * as BSP thus deducing number of threads per core. - */ - if (cpu_high >= 0x4) { - cpuid_count(0x04, 0, p); - max_cores = ((p[0] >> 26) & 0x3f) + 1; - } else - max_cores = 1; - core_id_bits = mask_width(max_logical/max_cores); - if (core_id_bits < 0) - return; - pkg_id_bits = core_id_bits + mask_width(max_cores); - - for (id = 0; id <= MAX_APIC_ID; id++) { - /* Check logical CPU availability. */ - if (!cpu_info[id].cpu_present || cpu_info[id].cpu_disabled) - continue; - /* Check if logical CPU has the same package ID. */ - if ((id >> pkg_id_bits) != (boot_cpu_id >> pkg_id_bits)) - continue; - cpu_cores++; - /* Check if logical CPU has the same package and core IDs. */ - if ((id >> core_id_bits) == (boot_cpu_id >> core_id_bits)) - cpu_logical++; - } - - KASSERT(cpu_cores >= 1 && cpu_logical >= 1, - ("topo_probe_0x4 couldn't find BSP")); - - cpu_cores /= cpu_logical; - hyperthreading_cpus = cpu_logical; -} - -static void -topo_probe_0xb(void) -{ - u_int p[4]; - int bits; - int cnt; - int i; - int logical; - int type; - int x; - - /* We only support three levels for now. */ - for (i = 0; i < 3; i++) { - cpuid_count(0x0b, i, p); - - /* Fall back if CPU leaf 11 doesn't really exist. */ - if (i == 0 && p[1] == 0) { - topo_probe_0x4(); - return; - } - - bits = p[0] & 0x1f; - logical = p[1] &= 0xffff; - type = (p[2] >> 8) & 0xff; - if (type == 0 || logical == 0) - break; - /* - * Because of uniformity assumption we examine only - * those logical processors that belong to the same - * package as BSP. - */ - for (cnt = 0, x = 0; x <= MAX_APIC_ID; x++) { - if (!cpu_info[x].cpu_present || - cpu_info[x].cpu_disabled) - continue; - if (x >> bits == boot_cpu_id >> bits) - cnt++; - } - if (type == CPUID_TYPE_SMT) - cpu_logical = cnt; - else if (type == CPUID_TYPE_CORE) - cpu_cores = cnt; - } - if (cpu_logical == 0) - cpu_logical = 1; - cpu_cores /= cpu_logical; -} - -/* - * Both topology discovery code and code that consumes topology - * information assume top-down uniformity of the topology. - * That is, all physical packages must be identical and each - * core in a package must have the same number of threads. - * Topology information is queried only on BSP, on which this - * code runs and for which it can query CPUID information. - * Then topology is extrapolated on all packages using the - * uniformity assumption. - */ -static void -topo_probe(void) -{ - static int cpu_topo_probed = 0; - - if (cpu_topo_probed) - return; - - CPU_ZERO(&logical_cpus_mask); - if (mp_ncpus <= 1) - cpu_cores = cpu_logical = 1; - else if (cpu_vendor_id == CPU_VENDOR_AMD) - topo_probe_amd(); - else if (cpu_vendor_id == CPU_VENDOR_INTEL) { - /* - * See Intel(R) 64 Architecture Processor - * Topology Enumeration article for details. - * - * Note that 0x1 <= cpu_high < 4 case should be - * compatible with topo_probe_0x4() logic when - * CPUID.1:EBX[23:16] > 0 (cpu_cores will be 1) - * or it should trigger the fallback otherwise. - */ - if (cpu_high >= 0xb) - topo_probe_0xb(); - else if (cpu_high >= 0x1) - topo_probe_0x4(); - } - - /* - * Fallback: assume each logical CPU is in separate - * physical package. That is, no multi-core, no SMT. - */ - if (cpu_cores == 0 || cpu_logical == 0) - cpu_cores = cpu_logical = 1; - cpu_topo_probed = 1; -} - -struct cpu_group * -cpu_topo(void) -{ - int cg_flags; - - /* - * Determine whether any threading flags are - * necessry. - */ - topo_probe(); - if (cpu_logical > 1 && hyperthreading_cpus) - cg_flags = CG_FLAG_HTT; - else if (cpu_logical > 1) - cg_flags = CG_FLAG_SMT; - else - cg_flags = 0; - if (mp_ncpus % (cpu_cores * cpu_logical) != 0) { - printf("WARNING: Non-uniform processors.\n"); - printf("WARNING: Using suboptimal topology.\n"); - return (smp_topo_none()); - } - /* - * No multi-core or hyper-threaded. - */ - if (cpu_logical * cpu_cores == 1) - return (smp_topo_none()); - /* - * Only HTT no multi-core. - */ - if (cpu_logical > 1 && cpu_cores == 1) - return (smp_topo_1level(CG_SHARE_L1, cpu_logical, cg_flags)); - /* - * Only multi-core no HTT. - */ - if (cpu_cores > 1 && cpu_logical == 1) - return (smp_topo_1level(CG_SHARE_L2, cpu_cores, cg_flags)); - /* - * Both HTT and multi-core. - */ - return (smp_topo_2level(CG_SHARE_L2, cpu_cores, - CG_SHARE_L1, cpu_logical, cg_flags)); -} +static u_int boot_address; /* * Calculate usable address in base memory for AP trampoline code. @@ -433,85 +123,6 @@ mp_bootaddress(u_int basemem) return mptramp_pagetables; } -void -cpu_add(u_int apic_id, char boot_cpu) -{ - - if (apic_id > MAX_APIC_ID) { - panic("SMP: APIC ID %d too high", apic_id); - return; - } - KASSERT(cpu_info[apic_id].cpu_present == 0, ("CPU %d added twice", - apic_id)); - cpu_info[apic_id].cpu_present = 1; - if (boot_cpu) { - KASSERT(boot_cpu_id == -1, - ("CPU %d claims to be BSP, but CPU %d already is", apic_id, - boot_cpu_id)); - boot_cpu_id = apic_id; - cpu_info[apic_id].cpu_bsp = 1; - } - if (mp_ncpus < MAXCPU) { - mp_ncpus++; - mp_maxid = mp_ncpus - 1; - } - if (bootverbose) - printf("SMP: Added CPU %d (%s)\n", apic_id, boot_cpu ? "BSP" : - "AP"); -} - -void -cpu_mp_setmaxid(void) -{ - - /* - * mp_maxid should be already set by calls to cpu_add(). - * Just sanity check its value here. - */ - if (mp_ncpus == 0) - KASSERT(mp_maxid == 0, - ("%s: mp_ncpus is zero, but mp_maxid is not", __func__)); - else if (mp_ncpus == 1) - mp_maxid = 0; - else - KASSERT(mp_maxid >= mp_ncpus - 1, - ("%s: counters out of sync: max %d, count %d", __func__, - mp_maxid, mp_ncpus)); -} - -int -cpu_mp_probe(void) -{ - - /* - * Always record BSP in CPU map so that the mbuf init code works - * correctly. - */ - CPU_SETOF(0, &all_cpus); - if (mp_ncpus == 0) { - /* - * No CPUs were found, so this must be a UP system. Setup - * the variables to represent a system with a single CPU - * with an id of 0. - */ - mp_ncpus = 1; - return (0); - } - - /* At least one CPU was found. */ - if (mp_ncpus == 1) { - /* - * One CPU was found, so this must be a UP system with - * an I/O APIC. - */ - mp_maxid = 0; - return (0); - } - - /* At least two CPUs were found. */ - return (1); -} - /* * Initialize the IPI handlers and start up the AP's. */ @@ -575,47 +186,6 @@ cpu_mp_start(void) /* - * Print various information about the SMP system hardware and setup. - */ -void -cpu_mp_announce(void) -{ - const char *hyperthread; - int i; - - printf("FreeBSD/SMP: %d package(s) x %d core(s)", - mp_ncpus / (cpu_cores * cpu_logical), cpu_cores); - if (hyperthreading_cpus > 1) - printf(" x %d HTT threads", cpu_logical); - else if (cpu_logical > 1) - printf(" x %d SMT threads", cpu_logical); - printf("\n"); - - /* List active CPUs first. */ - printf(" cpu0 (BSP): APIC ID: %2d\n", boot_cpu_id); - for (i = 1; i < mp_ncpus; i++) { - if (cpu_info[cpu_apic_ids[i]].cpu_hyperthread) - hyperthread = "/HT"; - else - hyperthread = ""; - printf(" cpu%d (AP%s): APIC ID: %2d\n", i, hyperthread, - cpu_apic_ids[i]); - } - - /* List disabled CPUs last. */ - for (i = 0; i <= MAX_APIC_ID; i++) { - if (!cpu_info[i].cpu_present || !cpu_info[i].cpu_disabled) - continue; - if (cpu_info[i].cpu_hyperthread) - hyperthread = "/HT"; - else - hyperthread = ""; - printf(" cpu (AP%s): APIC ID: %2d (disabled)\n", hyperthread, - i); - } -} - -/* * AP CPU's call this to initialize themselves. */ void @@ -624,7 +194,6 @@ init_secondary(void) struct pcpu *pc; struct nmi_pcpu *np; u_int64_t msr, cr0; - u_int cpuid; int cpu, gsel_tss, x; struct region_descriptor ap_gdt; @@ -712,94 +281,7 @@ init_secondary(void) while (!aps_ready) ia32_pause(); - /* - * On real hardware, switch to x2apic mode if possible. Do it - * after aps_ready was signalled, to avoid manipulating the - * mode while BSP might still want to send some IPI to us - * (second startup IPI is ignored on modern hardware etc). - */ - lapic_xapic_mode(); - - /* Initialize the PAT MSR. */ - pmap_init_pat(); - - /* set up CPU registers and state */ - cpu_setregs(); - - /* set up SSE/NX */ - initializecpu(); - - /* set up FPU state on the AP */ - fpuinit(); - - if (cpu_ops.cpu_init) - cpu_ops.cpu_init(); - - /* A quick check from sanity claus */ - cpuid = PCPU_GET(cpuid); - if (PCPU_GET(apic_id) != lapic_id()) { - printf("SMP: cpuid = %d\n", cpuid); - printf("SMP: actual apic_id = %d\n", lapic_id()); - printf("SMP: correct apic_id = %d\n", PCPU_GET(apic_id)); - panic("cpuid mismatch! boom!!"); - } - - /* Initialize curthread. */ - KASSERT(PCPU_GET(idlethread) != NULL, ("no idle thread")); - PCPU_SET(curthread, PCPU_GET(idlethread)); - - mca_init(); - - mtx_lock_spin(&ap_boot_mtx); - - /* Init local apic for irq's */ - lapic_setup(1); - - /* Set memory range attributes for this CPU to match the BSP */ - mem_range_AP_init(); - - smp_cpus++; - - CTR1(KTR_SMP, "SMP: AP CPU #%d Launched", cpuid); - printf("SMP: AP CPU #%d Launched!\n", cpuid); - - /* Determine if we are a logical CPU. */ - /* XXX Calculation depends on cpu_logical being a power of 2, e.g. 2 */ - if (cpu_logical > 1 && PCPU_GET(apic_id) % cpu_logical != 0) - CPU_SET(cpuid, &logical_cpus_mask); - - if (bootverbose) - lapic_dump("AP"); - - if (smp_cpus == mp_ncpus) { - /* enable IPI's, tlb shootdown, freezes etc */ - atomic_store_rel_int(&smp_started, 1); - } - - /* - * Enable global pages TLB extension - * This also implicitly flushes the TLB - */ - - load_cr4(rcr4() | CR4_PGE); - if (pmap_pcid_enabled) - load_cr4(rcr4() | CR4_PCIDE); - load_ds(_udatasel); - load_es(_udatasel); - load_fs(_ufssel); - mtx_unlock_spin(&ap_boot_mtx); - - /* Wait until all the AP's are up. */ - while (smp_started == 0) - ia32_pause(); - - /* Start per-CPU event timers. */ - cpu_initclocks_ap(); - - sched_throw(NULL); - - panic("scheduler returned us to %s", __func__); - /* NOTREACHED */ + init_secondary_tail(); } /******************************************************************* @@ -807,108 +289,6 @@ init_secondary(void) */ /* - * We tell the I/O APIC code about all the CPUs we want to receive - * interrupts. If we don't want certain CPUs to receive IRQs we - * can simply not tell the I/O APIC code about them in this function. - * We also do not tell it about the BSP since it tells itself about - * the BSP internally to work with UP kernels and on UP machines. - */ -static void -set_interrupt_apic_ids(void) -{ - u_int i, apic_id; - - for (i = 0; i < MAXCPU; i++) { - apic_id = cpu_apic_ids[i]; - if (apic_id == -1) - continue; - if (cpu_info[apic_id].cpu_bsp) - continue; - if (cpu_info[apic_id].cpu_disabled) - continue; - - /* Don't let hyperthreads service interrupts. */ - if (cpu_logical > 1 && - apic_id % cpu_logical != 0) - continue; - - intr_add_cpu(i); - } -} - -/* - * Assign logical CPU IDs to local APICs. - */ -static void -assign_cpu_ids(void) -{ - u_int i; - - TUNABLE_INT_FETCH("machdep.hyperthreading_allowed", - &hyperthreading_allowed); - - /* Check for explicitly disabled CPUs. */ - for (i = 0; i <= MAX_APIC_ID; i++) { - if (!cpu_info[i].cpu_present || cpu_info[i].cpu_bsp) - continue; - - if (hyperthreading_cpus > 1 && i % hyperthreading_cpus != 0) { - cpu_info[i].cpu_hyperthread = 1; - - /* - * Don't use HT CPU if it has been disabled by a - * tunable. - */ - if (hyperthreading_allowed == 0) { - cpu_info[i].cpu_disabled = 1; - continue; - } - } - - /* Don't use this CPU if it has been disabled by a tunable. */ - if (resource_disabled("lapic", i)) { - cpu_info[i].cpu_disabled = 1; - continue; - } - } - - if (hyperthreading_allowed == 0 && hyperthreading_cpus > 1) { - hyperthreading_cpus = 0; - cpu_logical = 1; - } - - /* - * Assign CPU IDs to local APIC IDs and disable any CPUs - * beyond MAXCPU. CPU 0 is always assigned to the BSP. - * - * To minimize confusion for userland, we attempt to number - * CPUs such that all threads and cores in a package are - * grouped together. For now we assume that the BSP is always - * the first thread in a package and just start adding APs - * starting with the BSP's APIC ID. - */ - mp_ncpus = 1; - cpu_apic_ids[0] = boot_cpu_id; - apic_cpuids[boot_cpu_id] = 0; - for (i = boot_cpu_id + 1; i != boot_cpu_id; - i == MAX_APIC_ID ? i = 0 : i++) { - if (!cpu_info[i].cpu_present || cpu_info[i].cpu_bsp || - cpu_info[i].cpu_disabled) - continue; - - if (mp_ncpus < MAXCPU) { - cpu_apic_ids[mp_ncpus] = i; - apic_cpuids[i] = mp_ncpus; - mp_ncpus++; - } else - cpu_info[i].cpu_disabled = 1; - } - KASSERT(mp_maxid >= mp_ncpus - 1, - ("%s: counters out of sync: max %d, count %d", __func__, mp_maxid, - mp_ncpus)); -} - -/* * start each AP in our list */ int @@ -1026,129 +406,6 @@ start_ap(int apic_id) return 0; /* return FAILURE */ } -#ifdef COUNT_XINVLTLB_HITS -u_int xhits_gbl[MAXCPU]; -u_int xhits_pg[MAXCPU]; -u_int xhits_rng[MAXCPU]; -static SYSCTL_NODE(_debug, OID_AUTO, xhits, CTLFLAG_RW, 0, ""); -SYSCTL_OPAQUE(_debug_xhits, OID_AUTO, global, CTLFLAG_RW, &xhits_gbl, - sizeof(xhits_gbl), "IU", ""); -SYSCTL_OPAQUE(_debug_xhits, OID_AUTO, page, CTLFLAG_RW, &xhits_pg, - sizeof(xhits_pg), "IU", ""); -SYSCTL_OPAQUE(_debug_xhits, OID_AUTO, range, CTLFLAG_RW, &xhits_rng, - sizeof(xhits_rng), "IU", ""); - -u_int ipi_global; -u_int ipi_page; -u_int ipi_range; -u_int ipi_range_size; -SYSCTL_UINT(_debug_xhits, OID_AUTO, ipi_global, CTLFLAG_RW, &ipi_global, 0, ""); -SYSCTL_UINT(_debug_xhits, OID_AUTO, ipi_page, CTLFLAG_RW, &ipi_page, 0, ""); -SYSCTL_UINT(_debug_xhits, OID_AUTO, ipi_range, CTLFLAG_RW, &ipi_range, 0, ""); -SYSCTL_UINT(_debug_xhits, OID_AUTO, ipi_range_size, CTLFLAG_RW, - &ipi_range_size, 0, ""); - -u_int ipi_masked_global; -u_int ipi_masked_page; -u_int ipi_masked_range; -u_int ipi_masked_range_size; -SYSCTL_UINT(_debug_xhits, OID_AUTO, ipi_masked_global, CTLFLAG_RW, - &ipi_masked_global, 0, ""); -SYSCTL_UINT(_debug_xhits, OID_AUTO, ipi_masked_page, CTLFLAG_RW, - &ipi_masked_page, 0, ""); -SYSCTL_UINT(_debug_xhits, OID_AUTO, ipi_masked_range, CTLFLAG_RW, - &ipi_masked_range, 0, ""); -SYSCTL_UINT(_debug_xhits, OID_AUTO, ipi_masked_range_size, CTLFLAG_RW, - &ipi_masked_range_size, 0, ""); -#endif /* COUNT_XINVLTLB_HITS */ - -/* - * Init and startup IPI. - */ -void -ipi_startup(int apic_id, int vector) -{ - - /* - * This attempts to follow the algorithm described in the - * Intel Multiprocessor Specification v1.4 in section B.4. - * For each IPI, we allow the local APIC ~20us to deliver the - * IPI. If that times out, we panic. - */ - - /* - * first we do an INIT IPI: this INIT IPI might be run, resetting - * and running the target CPU. OR this INIT IPI might be latched (P5 - * bug), CPU waiting for STARTUP IPI. OR this INIT IPI might be - * ignored. - */ - lapic_ipi_raw(APIC_DEST_DESTFLD | APIC_TRIGMOD_LEVEL | - APIC_LEVEL_ASSERT | APIC_DESTMODE_PHY | APIC_DELMODE_INIT, apic_id); - lapic_ipi_wait(100); - - /* Explicitly deassert the INIT IPI. */ - lapic_ipi_raw(APIC_DEST_DESTFLD | APIC_TRIGMOD_LEVEL | - APIC_LEVEL_DEASSERT | APIC_DESTMODE_PHY | APIC_DELMODE_INIT, - apic_id); - - DELAY(10000); /* wait ~10mS */ - - /* - * next we do a STARTUP IPI: the previous INIT IPI might still be - * latched, (P5 bug) this 1st STARTUP would then terminate - * immediately, and the previously started INIT IPI would continue. OR - * the previous INIT IPI has already run. and this STARTUP IPI will - * run. OR the previous INIT IPI was ignored. and this STARTUP IPI - * will run. - */ - lapic_ipi_raw(APIC_DEST_DESTFLD | APIC_TRIGMOD_EDGE | - APIC_LEVEL_ASSERT | APIC_DESTMODE_PHY | APIC_DELMODE_STARTUP | - vector, apic_id); - if (!lapic_ipi_wait(100)) - panic("Failed to deliver first STARTUP IPI to APIC %d", - apic_id); - DELAY(200); /* wait ~200uS */ - - /* - * finally we do a 2nd STARTUP IPI: this 2nd STARTUP IPI should run IF - * the previous STARTUP IPI was cancelled by a latched INIT IPI. OR - * this STARTUP IPI will be ignored, as only ONE STARTUP IPI is - * recognized after hardware RESET or INIT IPI. - */ - lapic_ipi_raw(APIC_DEST_DESTFLD | APIC_TRIGMOD_EDGE | - APIC_LEVEL_ASSERT | APIC_DESTMODE_PHY | APIC_DELMODE_STARTUP | - vector, apic_id); - if (!lapic_ipi_wait(100)) - panic("Failed to deliver second STARTUP IPI to APIC %d", - apic_id); - - DELAY(200); /* wait ~200uS */ -} - -/* - * Send an IPI to specified CPU handling the bitmap logic. - */ -static void -ipi_send_cpu(int cpu, u_int ipi) -{ - u_int bitmap, old_pending, new_pending; - - KASSERT(cpu_apic_ids[cpu] != -1, ("IPI to non-existent CPU %d", cpu)); - - if (IPI_IS_BITMAPED(ipi)) { - bitmap = 1 << ipi; - ipi = IPI_BITMAP_VECTOR; - do { - old_pending = cpu_ipi_pending[cpu]; - new_pending = old_pending | bitmap; - } while (!atomic_cmpset_int(&cpu_ipi_pending[cpu], - old_pending, new_pending)); - if (old_pending) - return; - } - lapic_ipi_vectored(ipi, cpu_apic_ids[cpu]); -} - /* * Flush the TLB on all other CPU's */ @@ -1228,26 +485,6 @@ smp_targeted_tlb_shootdown(cpuset_t mask } void -smp_cache_flush(void) -{ - - if (smp_started) - smp_tlb_shootdown(IPI_INVLCACHE, NULL, 0, 0); -} - -void -smp_invltlb(pmap_t pmap) -{ - - if (smp_started) { - smp_tlb_shootdown(IPI_INVLTLB, pmap, 0, 0); -#ifdef COUNT_XINVLTLB_HITS - ipi_global++; -#endif - } -} - -void smp_invlpg(pmap_t pmap, vm_offset_t addr) { @@ -1312,210 +549,23 @@ smp_masked_invlpg_range(cpuset_t mask, p } void -ipi_bitmap_handler(struct trapframe frame) -{ - struct trapframe *oldframe; - struct thread *td; - int cpu = PCPU_GET(cpuid); - u_int ipi_bitmap; - - critical_enter(); - td = curthread; - td->td_intr_nesting_level++; - oldframe = td->td_intr_frame; - td->td_intr_frame = &frame; - ipi_bitmap = atomic_readandclear_int(&cpu_ipi_pending[cpu]); - if (ipi_bitmap & (1 << IPI_PREEMPT)) { -#ifdef COUNT_IPIS - (*ipi_preempt_counts[cpu])++; -#endif - sched_preempt(td); - } - if (ipi_bitmap & (1 << IPI_AST)) { -#ifdef COUNT_IPIS - (*ipi_ast_counts[cpu])++; -#endif - /* Nothing to do for AST */ - } - if (ipi_bitmap & (1 << IPI_HARDCLOCK)) { -#ifdef COUNT_IPIS - (*ipi_hardclock_counts[cpu])++; -#endif - hardclockintr(); - } - td->td_intr_frame = oldframe; - td->td_intr_nesting_level--; - critical_exit(); -} - -/* - * send an IPI to a set of cpus. - */ -void -ipi_selected(cpuset_t cpus, u_int ipi) -{ - int cpu; - - /* - * IPI_STOP_HARD maps to a NMI and the trap handler needs a bit - * of help in order to understand what is the source. - * Set the mask of receiving CPUs for this purpose. - */ - if (ipi == IPI_STOP_HARD) - CPU_OR_ATOMIC(&ipi_nmi_pending, &cpus); - - while ((cpu = CPU_FFS(&cpus)) != 0) { - cpu--; - CPU_CLR(cpu, &cpus); - CTR3(KTR_SMP, "%s: cpu: %d ipi: %x", __func__, cpu, ipi); - ipi_send_cpu(cpu, ipi); - } -} - -/* - * send an IPI to a specific CPU. - */ -void -ipi_cpu(int cpu, u_int ipi) -{ - - /* - * IPI_STOP_HARD maps to a NMI and the trap handler needs a bit - * of help in order to understand what is the source. - * Set the mask of receiving CPUs for this purpose. - */ - if (ipi == IPI_STOP_HARD) - CPU_SET_ATOMIC(cpu, &ipi_nmi_pending); - - CTR3(KTR_SMP, "%s: cpu: %d ipi: %x", __func__, cpu, ipi); - ipi_send_cpu(cpu, ipi); -} - -/* - * send an IPI to all CPUs EXCEPT myself - */ -void -ipi_all_but_self(u_int ipi) +smp_cache_flush(void) { - cpuset_t other_cpus; - - other_cpus = all_cpus; - CPU_CLR(PCPU_GET(cpuid), &other_cpus); - - if (IPI_IS_BITMAPED(ipi)) { - ipi_selected(other_cpus, ipi); - return; - } - - /* - * IPI_STOP_HARD maps to a NMI and the trap handler needs a bit - * of help in order to understand what is the source. - * Set the mask of receiving CPUs for this purpose. - */ - if (ipi == IPI_STOP_HARD) - CPU_OR_ATOMIC(&ipi_nmi_pending, &other_cpus); - CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); - lapic_ipi_vectored(ipi, APIC_IPI_DEST_OTHERS); + if (smp_started) + smp_tlb_shootdown(IPI_INVLCACHE, NULL, 0, 0); } -int -ipi_nmi_handler() -{ - u_int cpuid; - - /* - * As long as there is not a simple way to know about a NMI's - * source, if the bitmask for the current CPU is present in - * the global pending bitword an IPI_STOP_HARD has been issued - * and should be handled. - */ - cpuid = PCPU_GET(cpuid); - if (!CPU_ISSET(cpuid, &ipi_nmi_pending)) - return (1); - - CPU_CLR_ATOMIC(cpuid, &ipi_nmi_pending); - cpustop_handler(); - return (0); -} - -/* - * Handle an IPI_STOP by saving our current context and spinning until we - * are resumed. - */ void -cpustop_handler(void) -{ - u_int cpu; - - cpu = PCPU_GET(cpuid); - - savectx(&stoppcbs[cpu]); - - /* Indicate that we are stopped */ - CPU_SET_ATOMIC(cpu, &stopped_cpus); - - /* Wait for restart */ - while (!CPU_ISSET(cpu, &started_cpus)) - ia32_pause(); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 16:56:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6D9E5350; Fri, 24 Apr 2015 16:56:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BBC31574; Fri, 24 Apr 2015 16:56:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OGuPqH093259; Fri, 24 Apr 2015 16:56:25 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OGuOA9093255; Fri, 24 Apr 2015 16:56:24 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504241656.t3OGuOA9093255@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 24 Apr 2015 16:56:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281941 - head/sys/dev/ipmi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 16:56:25 -0000 Author: jhb Date: Fri Apr 24 16:56:23 2015 New Revision: 281941 URL: https://svnweb.freebsd.org/changeset/base/281941 Log: Watchdog drivers need to support rearming the watchdog in contexts which are not permitted to sleep. Only use the IPMI watchdog with backends which poll driver-initiated requests to meet this requirement. In practice this means that watchdogs will no longer be used on systems that use the SSIF backend. Differential Revision: https://reviews.freebsd.org/D2062 MFC after: 2 weeks Modified: head/sys/dev/ipmi/ipmi.c head/sys/dev/ipmi/ipmi_kcs.c head/sys/dev/ipmi/ipmi_smic.c head/sys/dev/ipmi/ipmivars.h Modified: head/sys/dev/ipmi/ipmi.c ============================================================================== --- head/sys/dev/ipmi/ipmi.c Fri Apr 24 16:20:56 2015 (r281940) +++ head/sys/dev/ipmi/ipmi.c Fri Apr 24 16:56:23 2015 (r281941) @@ -756,17 +756,22 @@ ipmi_startup(void *arg) } device_printf(dev, "Number of channels %d\n", i); - /* probe for watchdog */ - IPMI_INIT_DRIVER_REQUEST(req, IPMI_ADDR(IPMI_APP_REQUEST, 0), - IPMI_GET_WDOG, 0, 0); - - ipmi_submit_driver_request(sc, req, 0); - - if (req->ir_compcode == 0x00) { - device_printf(dev, "Attached watchdog\n"); - /* register the watchdog event handler */ - sc->ipmi_watchdog_tag = EVENTHANDLER_REGISTER(watchdog_list, - ipmi_wd_event, sc, 0); + /* + * Probe for watchdog, but only for backends which support + * polled driver requests. + */ + if (sc->ipmi_driver_requests_polled) { + IPMI_INIT_DRIVER_REQUEST(req, IPMI_ADDR(IPMI_APP_REQUEST, 0), + IPMI_GET_WDOG, 0, 0); + + ipmi_submit_driver_request(sc, req, 0); + + if (req->ir_compcode == 0x00) { + device_printf(dev, "Attached watchdog\n"); + /* register the watchdog event handler */ + sc->ipmi_watchdog_tag = EVENTHANDLER_REGISTER( + watchdog_list, ipmi_wd_event, sc, 0); + } } sc->ipmi_cdev = make_dev(&ipmi_cdevsw, device_get_unit(dev), Modified: head/sys/dev/ipmi/ipmi_kcs.c ============================================================================== --- head/sys/dev/ipmi/ipmi_kcs.c Fri Apr 24 16:20:56 2015 (r281940) +++ head/sys/dev/ipmi/ipmi_kcs.c Fri Apr 24 16:56:23 2015 (r281941) @@ -520,6 +520,7 @@ ipmi_kcs_attach(struct ipmi_softc *sc) sc->ipmi_startup = kcs_startup; sc->ipmi_enqueue_request = ipmi_polled_enqueue_request; sc->ipmi_driver_request = kcs_driver_request; + sc->ipmi_driver_requests_polled = 1; /* See if we can talk to the controller. */ status = INB(sc, KCS_CTL_STS); Modified: head/sys/dev/ipmi/ipmi_smic.c ============================================================================== --- head/sys/dev/ipmi/ipmi_smic.c Fri Apr 24 16:20:56 2015 (r281940) +++ head/sys/dev/ipmi/ipmi_smic.c Fri Apr 24 16:56:23 2015 (r281941) @@ -415,6 +415,7 @@ ipmi_smic_attach(struct ipmi_softc *sc) sc->ipmi_startup = smic_startup; sc->ipmi_enqueue_request = ipmi_polled_enqueue_request; sc->ipmi_driver_request = smic_driver_request; + sc->ipmi_driver_requests_polled = 1; /* See if we can talk to the controller. */ flags = INB(sc, SMIC_FLAGS); Modified: head/sys/dev/ipmi/ipmivars.h ============================================================================== --- head/sys/dev/ipmi/ipmivars.h Fri Apr 24 16:20:56 2015 (r281940) +++ head/sys/dev/ipmi/ipmivars.h Fri Apr 24 16:56:23 2015 (r281941) @@ -105,6 +105,7 @@ struct ipmi_softc { int ipmi_opened; struct cdev *ipmi_cdev; TAILQ_HEAD(,ipmi_request) ipmi_pending_requests; + int ipmi_driver_requests_polled; eventhandler_tag ipmi_watchdog_tag; int ipmi_watchdog_active; struct intr_config_hook ipmi_ich; From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 17:03:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB82F657; Fri, 24 Apr 2015 17:03:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9D8A167B; Fri, 24 Apr 2015 17:03:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OH3rk6097922; Fri, 24 Apr 2015 17:03:53 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OH3rpr097920; Fri, 24 Apr 2015 17:03:53 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201504241703.t3OH3rpr097920@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Fri, 24 Apr 2015 17:03:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281942 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 17:03:54 -0000 Author: scottl Date: Fri Apr 24 17:03:53 2015 New Revision: 281942 URL: https://svnweb.freebsd.org/changeset/base/281942 Log: Revert r281451. It causes a panic/hang early in boot for a number of users, myself included. The original code is likely papering over a larger bug that needs to be explored, but for now get things back to a working state. Obtained from: Netflix, Inc. MFC after: immediately Modified: head/sys/vm/uma_int.h Modified: head/sys/vm/uma_int.h ============================================================================== --- head/sys/vm/uma_int.h Fri Apr 24 16:56:23 2015 (r281941) +++ head/sys/vm/uma_int.h Fri Apr 24 17:03:53 2015 (r281942) @@ -311,7 +311,7 @@ struct uma_zone { * This HAS to be the last item because we adjust the zone size * based on NCPU and then allocate the space for the zones. */ - struct uma_cache uz_cpu[]; /* Per cpu caches */ + struct uma_cache uz_cpu[1]; /* Per cpu caches */ }; /* From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 17:05:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 970F7804; Fri, 24 Apr 2015 17:05:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84C5D168D; Fri, 24 Apr 2015 17:05:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OH5JeI098202; Fri, 24 Apr 2015 17:05:19 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OH5JoO098201; Fri, 24 Apr 2015 17:05:19 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201504241705.t3OH5JoO098201@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Fri, 24 Apr 2015 17:05:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281943 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 17:05:19 -0000 Author: scottl Date: Fri Apr 24 17:05:18 2015 New Revision: 281943 URL: https://svnweb.freebsd.org/changeset/base/281943 Log: Revert r281543. It causes a panic/hang early in boot for a number of users, myself included. The original code is likely papering over a larger bug that needs to be explored, but for now get things back to a working state. Obtained from: Netflix, Inc. Modified: stable/10/sys/vm/uma_int.h Modified: stable/10/sys/vm/uma_int.h ============================================================================== --- stable/10/sys/vm/uma_int.h Fri Apr 24 17:03:53 2015 (r281942) +++ stable/10/sys/vm/uma_int.h Fri Apr 24 17:05:18 2015 (r281943) @@ -311,7 +311,7 @@ struct uma_zone { * This HAS to be the last item because we adjust the zone size * based on NCPU and then allocate the space for the zones. */ - struct uma_cache uz_cpu[]; /* Per cpu caches */ + struct uma_cache uz_cpu[1]; /* Per cpu caches */ }; /* From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 17:36:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3F643507; Fri, 24 Apr 2015 17:36:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D2311B1C; Fri, 24 Apr 2015 17:36:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OHaR5j013329; Fri, 24 Apr 2015 17:36:27 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OHaR6c013328; Fri, 24 Apr 2015 17:36:27 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504241736.t3OHaR6c013328@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 24 Apr 2015 17:36:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281944 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 17:36:27 -0000 Author: emaste Date: Fri Apr 24 17:36:26 2015 New Revision: 281944 URL: https://svnweb.freebsd.org/changeset/base/281944 Log: vt(4): Simplify mouse area detection vt_is_cursor_in_area needs to return true if any part of the mouse cursor is visible in the rectangle area. Replace the existing test with a simpler version of a test for overlapping rectangles. Differential Revision: https://reviews.freebsd.org/D2356 Reviewed by: ray Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Fri Apr 24 17:05:18 2015 (r281943) +++ head/sys/dev/vt/vt_core.c Fri Apr 24 17:36:26 2015 (r281944) @@ -1029,7 +1029,7 @@ vt_determine_colors(term_char_t c, int c int vt_is_cursor_in_area(const struct vt_device *vd, const term_rect_t *area) { - unsigned int mx, my, x1, y1, x2, y2; + unsigned int mx, my; /* * We use the cursor position saved during the current refresh, @@ -1038,18 +1038,12 @@ vt_is_cursor_in_area(const struct vt_dev mx = vd->vd_mx_drawn + vd->vd_curwindow->vw_draw_area.tr_begin.tp_col; my = vd->vd_my_drawn + vd->vd_curwindow->vw_draw_area.tr_begin.tp_row; - x1 = area->tr_begin.tp_col; - y1 = area->tr_begin.tp_row; - x2 = area->tr_end.tp_col; - y2 = area->tr_end.tp_row; - - if (((mx >= x1 && x2 - 1 >= mx) || - (mx < x1 && mx + vd->vd_mcursor->width >= x1)) && - ((my >= y1 && y2 - 1 >= my) || - (my < y1 && my + vd->vd_mcursor->height >= y1))) - return (1); - - return (0); + if (mx >= area->tr_end.tp_col || + mx + vd->vd_mcursor->width <= area->tr_begin.tp_col || + my >= area->tr_end.tp_row || + my + vd->vd_mcursor->height <= area->tr_begin.tp_row) + return (0); + return (1); } static void From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 18:07:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2023C1B; Fri, 24 Apr 2015 18:07:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFCB91E65; Fri, 24 Apr 2015 18:07:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OI7Ypk028393; Fri, 24 Apr 2015 18:07:34 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OI7Yml028392; Fri, 24 Apr 2015 18:07:34 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504241807.t3OI7Yml028392@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 24 Apr 2015 18:07:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281945 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 18:07:35 -0000 Author: pfg Date: Fri Apr 24 18:07:34 2015 New Revision: 281945 URL: https://svnweb.freebsd.org/changeset/base/281945 Log: Add definition to support alloc_align attribute. gcc 4.9 added support for new alignment attribute alloc_align: The alloc_align attribute is used to tell the compiler that the function return value points to memory, where the returned pointer minimum alignment is given by one of the functions parameters. GCC uses this information to improve pointer alignment analysis. This attribute is not (yet) available on clang. Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Fri Apr 24 17:36:26 2015 (r281944) +++ head/sys/sys/cdefs.h Fri Apr 24 18:07:34 2015 (r281945) @@ -395,6 +395,12 @@ #define __alloc_size(x) #endif +#if __has_attribute(alloc_align) || __GNUC_PREREQ__(4, 9) +#define __alloc_align(x) __attribute__((__alloc_align__(x))) +#else +#define __alloc_align(x) +#endif + /* XXX: should use `#if __STDC_VERSION__ < 199901'. */ #if !__GNUC_PREREQ__(2, 7) && !defined(__INTEL_COMPILER) #define __func__ NULL From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 18:19:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70704F79 for ; Fri, 24 Apr 2015 18:19:43 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5356E1F9E for ; Fri, 24 Apr 2015 18:19:43 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OIJhjg019514 for ; Fri, 24 Apr 2015 18:19:43 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id t3OIJh1N019511 for svn-src-all@freebsd.org; Fri, 24 Apr 2015 18:19:43 GMT (envelope-from bdrewery) Received: (qmail 702 invoked from network); 24 Apr 2015 13:19:41 -0500 Received: from unknown (HELO ?10.10.1.139?) (freebsd@shatow.net@10.10.1.139) by sweb.xzibition.com with ESMTPA; 24 Apr 2015 13:19:41 -0500 Message-ID: <553A8942.3080205@FreeBSD.org> Date: Fri, 24 Apr 2015 13:19:46 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281942 - head/sys/vm References: <201504241703.t3OH3rpr097920@svn.freebsd.org> In-Reply-To: <201504241703.t3OH3rpr097920@svn.freebsd.org> OpenPGP: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="AU0SeX0GGVxQHDRlTvokvNngvdoh6a2RP" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 18:19:43 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --AU0SeX0GGVxQHDRlTvokvNngvdoh6a2RP Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 4/24/2015 12:03 PM, Scott Long wrote: > Author: scottl > Date: Fri Apr 24 17:03:53 2015 > New Revision: 281942 > URL: https://svnweb.freebsd.org/changeset/base/281942 >=20 > Log: > Revert r281451. It causes a panic/hang early in boot for a number of= The diff confused me at first. It is more proper to say revert r281451 _and_ r281162. I thought the sys/vm/uma_core.c change was missing at firs= t. Bryan --AU0SeX0GGVxQHDRlTvokvNngvdoh6a2RP 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 iQEcBAEBAgAGBQJVOolCAAoJEDXXcbtuRpfPBn8IAK6WOjZz/bBnfpsSph9U/2oc AkGryDkmp8Pzr1wP9tqcSExkXaT9+Xpt0U7kW+SRbOJydJ/TN8ly6Kzosugepehd 151eAproo6mRBmlO4nKegT1FpZHG+9BU4QQ6VxkPPzk9nNr2jTLJhEwfw0pKhUvX wwP2u3xTkghcrZwHdIUkXYJwXtIABAOSqmoY0hKlUVUxpYckUzcKcwv0gJNLGrra mC5yTaiaE9bL8nd91cV0wSnoeMDhQr++Qx0BEmF57pjlcPd416cmEhaLmS2mFAvP hFSlJNLGOgvh7LP1goCimbKXg/DMcljDrXQKpgOXbDqD/qaoUhSV3nDHJf8Vgws= =Gzeo -----END PGP SIGNATURE----- --AU0SeX0GGVxQHDRlTvokvNngvdoh6a2RP-- From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 19:15:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BADCA290; Fri, 24 Apr 2015 19:15:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9B5B5164C; Fri, 24 Apr 2015 19:15:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OJFdJW062984; Fri, 24 Apr 2015 19:15:39 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OJFd8K062983; Fri, 24 Apr 2015 19:15:39 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201504241915.t3OJFd8K062983@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Fri, 24 Apr 2015 19:15:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281946 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 19:15:39 -0000 Author: neel Date: Fri Apr 24 19:15:38 2015 New Revision: 281946 URL: https://svnweb.freebsd.org/changeset/base/281946 Log: Don't allow guest to modify readonly bits in the PCI config 'status' register. Reported by: Leon Dang (ldang@nahannisys.com) MFC after: 2 weeks Modified: head/usr.sbin/bhyve/pci_emul.c Modified: head/usr.sbin/bhyve/pci_emul.c ============================================================================== --- head/usr.sbin/bhyve/pci_emul.c Fri Apr 24 18:07:34 2015 (r281945) +++ head/usr.sbin/bhyve/pci_emul.c Fri Apr 24 19:15:38 2015 (r281946) @@ -59,17 +59,6 @@ __FBSDID("$FreeBSD$"); #define CONF1_ENABLE 0x80000000ul -#define CFGWRITE(pi,off,val,b) \ -do { \ - if ((b) == 1) { \ - pci_set_cfgdata8((pi),(off),(val)); \ - } else if ((b) == 2) { \ - pci_set_cfgdata16((pi),(off),(val)); \ - } else { \ - pci_set_cfgdata32((pi),(off),(val)); \ - } \ -} while (0) - #define MAXBUSES (PCI_BUSMAX + 1) #define MAXSLOTS (PCI_SLOTMAX + 1) #define MAXFUNCS (PCI_FUNCMAX + 1) @@ -124,6 +113,30 @@ static void pci_lintr_update(struct pci_ static void pci_cfgrw(struct vmctx *ctx, int vcpu, int in, int bus, int slot, int func, int coff, int bytes, uint32_t *val); +static __inline void +CFGWRITE(struct pci_devinst *pi, int coff, uint32_t val, int bytes) +{ + + if (bytes == 1) + pci_set_cfgdata8(pi, coff, val); + else if (bytes == 2) + pci_set_cfgdata16(pi, coff, val); + else + pci_set_cfgdata32(pi, coff, val); +} + +static __inline uint32_t +CFGREAD(struct pci_devinst *pi, int coff, int bytes) +{ + + if (bytes == 1) + return (pci_get_cfgdata8(pi, coff)); + else if (bytes == 2) + return (pci_get_cfgdata16(pi, coff)); + else + return (pci_get_cfgdata32(pi, coff)); +} + /* * I/O access */ @@ -1653,27 +1666,31 @@ pci_emul_hdrtype_fixup(int bus, int slot } } -static uint32_t -bits_changed(uint32_t old, uint32_t new, uint32_t mask) -{ - - return ((old ^ new) & mask); -} - static void -pci_emul_cmdwrite(struct pci_devinst *pi, uint32_t new, int bytes) +pci_emul_cmdsts_write(struct pci_devinst *pi, int coff, uint32_t new, int bytes) { - int i; - uint16_t old; + int i, rshift; + uint32_t cmd, cmd2, changed, old, readonly; + + cmd = pci_get_cfgdata16(pi, PCIR_COMMAND); /* stash old value */ /* - * The command register is at an offset of 4 bytes and thus the - * guest could write 1, 2 or 4 bytes starting at this offset. + * From PCI Local Bus Specification 3.0 sections 6.2.2 and 6.2.3. + * + * XXX Bits 8, 11, 12, 13, 14 and 15 in the status register are + * 'write 1 to clear'. However these bits are not set to '1' by + * any device emulation so it is simpler to treat them as readonly. */ + rshift = (coff & 0x3) * 8; + readonly = 0xFFFFF880 >> rshift; + + old = CFGREAD(pi, coff, bytes); + new &= ~readonly; + new |= (old & readonly); + CFGWRITE(pi, coff, new, bytes); /* update config */ - old = pci_get_cfgdata16(pi, PCIR_COMMAND); /* stash old value */ - CFGWRITE(pi, PCIR_COMMAND, new, bytes); /* update config */ - new = pci_get_cfgdata16(pi, PCIR_COMMAND); /* get updated value */ + cmd2 = pci_get_cfgdata16(pi, PCIR_COMMAND); /* get updated value */ + changed = cmd ^ cmd2; /* * If the MMIO or I/O address space decoding has changed then @@ -1686,7 +1703,7 @@ pci_emul_cmdwrite(struct pci_devinst *pi break; case PCIBAR_IO: /* I/O address space decoding changed? */ - if (bits_changed(old, new, PCIM_CMD_PORTEN)) { + if (changed & PCIM_CMD_PORTEN) { if (porten(pi)) register_bar(pi, i); else @@ -1696,7 +1713,7 @@ pci_emul_cmdwrite(struct pci_devinst *pi case PCIBAR_MEM32: case PCIBAR_MEM64: /* MMIO address space decoding changed? */ - if (bits_changed(old, new, PCIM_CMD_MEMEN)) { + if (changed & PCIM_CMD_MEMEN) { if (memen(pi)) register_bar(pi, i); else @@ -1776,14 +1793,8 @@ pci_cfgrw(struct vmctx *ctx, int vcpu, i needcfg = 1; } - if (needcfg) { - if (bytes == 1) - *eax = pci_get_cfgdata8(pi, coff); - else if (bytes == 2) - *eax = pci_get_cfgdata16(pi, coff); - else - *eax = pci_get_cfgdata32(pi, coff); - } + if (needcfg) + *eax = CFGREAD(pi, coff, bytes); pci_emul_hdrtype_fixup(bus, slot, coff, bytes, eax); } else { @@ -1853,8 +1864,8 @@ pci_cfgrw(struct vmctx *ctx, int vcpu, i } else if (pci_emul_iscap(pi, coff)) { pci_emul_capwrite(pi, coff, bytes, *eax); - } else if (coff == PCIR_COMMAND) { - pci_emul_cmdwrite(pi, *eax, bytes); + } else if (coff >= PCIR_COMMAND && coff < PCIR_REVID) { + pci_emul_cmdsts_write(pi, coff, *eax, bytes); } else { CFGWRITE(pi, coff, *eax, bytes); } From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 19:26:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BFE015A2; Fri, 24 Apr 2015 19:26:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ADCEF1756; Fri, 24 Apr 2015 19:26:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OJQ13R068027; Fri, 24 Apr 2015 19:26:01 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OJQ1hv068026; Fri, 24 Apr 2015 19:26:01 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504241926.t3OJQ1hv068026@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 24 Apr 2015 19:26:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281947 - stable/9/sys/dev/vt X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 19:26:01 -0000 Author: emaste Date: Fri Apr 24 19:26:01 2015 New Revision: 281947 URL: https://svnweb.freebsd.org/changeset/base/281947 Log: MFC r273973: vt(4): Fix keyboard allocation when kbdmux(4) isn't used The problem was that only the kbdmux keyboard index was saved in vd->vd_keyboard. This index is -1 when kbdmux isn't used. In this case, the keyboard was correctly allocated, but the returned index was discarded. PR: 196512 Modified: stable/9/sys/dev/vt/vt_core.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/vt/vt_core.c ============================================================================== --- stable/9/sys/dev/vt/vt_core.c Fri Apr 24 19:15:38 2015 (r281946) +++ stable/9/sys/dev/vt/vt_core.c Fri Apr 24 19:26:01 2015 (r281947) @@ -559,7 +559,6 @@ vt_allocate_keyboard(struct vt_device *v idx0 = kbd_allocate("kbdmux", -1, (void *)&vd->vd_keyboard, vt_kbdevent, vd); /* XXX: kb_token lost */ - vd->vd_keyboard = idx0; if (idx0 != -1) { DPRINTF(20, "%s: kbdmux allocated, idx = %d\n", __func__, idx0); k0 = kbd_get_keyboard(idx0); @@ -583,6 +582,7 @@ vt_allocate_keyboard(struct vt_device *v idx0 = kbd_allocate("*", -1, (void *)&vd->vd_keyboard, vt_kbdevent, vd); } + vd->vd_keyboard = idx0; DPRINTF(20, "%s: vd_keyboard = %d\n", __func__, vd->vd_keyboard); return (idx0); From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 20:29:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A0C07437; Fri, 24 Apr 2015 20:29:36 +0000 (UTC) Received: from mail-pa0-x236.google.com (mail-pa0-x236.google.com [IPv6:2607:f8b0:400e:c03::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 7B2D61E83; Fri, 24 Apr 2015 20:29:36 +0000 (UTC) Received: by pacyx8 with SMTP id yx8so57840152pac.1; Fri, 24 Apr 2015 13:29:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=mBW2CD/o6uvukK4iZJB0zmejCDUG33S0c0ZJoocUJRg=; b=VSCF9vU3/NUfKOawlWdk85KR5ldEJubAyc73hI3aXUdMbp5q7FoO6mM9Csc4OEC3Yo iY/32OBDH+ArVJ/X+/4DfbrNR4OUnRoOR+NEPtlaftO3DNETU7iwb0FfuVMrBBoyFVNB q2Ec4J1kr9k34oBc0mRIputziGaABB4DWkYobEb+Aoc15AjthZarPH9dTNnz1T7hAVGr XiCxBIc0QLDidWNaUnMdsg6zRy6UtF8JZ85/zOwbCKsoevzdK6EivP94IuA92vxkPSkW D+Cp39buqzfSTO5eCUjZJOw9KFpQSm2fkyI1ZCoEcNSF1AEboBLUKpDfK95SOiZE800E VJxQ== X-Received: by 10.66.145.133 with SMTP id su5mr339640pab.114.1429907375504; Fri, 24 Apr 2015 13:29:35 -0700 (PDT) Received: from [192.168.20.11] (c-98-247-240-204.hsd1.wa.comcast.net. [98.247.240.204]) by mx.google.com with ESMTPSA id fu7sm12035547pac.26.2015.04.24.13.29.34 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 24 Apr 2015 13:29:34 -0700 (PDT) References: <201504241447.t3OElsmu026704@svn.freebsd.org> Mime-Version: 1.0 (1.0) In-Reply-To: <201504241447.t3OElsmu026704@svn.freebsd.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <7CA7DCFB-65E7-49FC-9717-FFD26F12F6B9@gmail.com> Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" X-Mailer: iPhone Mail (12F70) From: Garrett Cooper Subject: Re: svn commit: r281932 - head/sys/modules/oce Date: Fri, 24 Apr 2015 13:29:32 -0700 To: John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 20:29:36 -0000 > On Apr 24, 2015, at 07:47, John Baldwin wrote: > > Author: jhb > Date: Fri Apr 24 14:47:53 2015 > New Revision: 281932 > URL: https://svnweb.freebsd.org/changeset/base/281932 > > Log: > Rename the kld for oce(4) to if_oce.ko. ifconfig(8) has special knowledge > about kld filenames for network drivers that requires them to follow the > pattern of if_. This also fixes the existing documentation in the > manpage which says to use if_oce_load=YES in loader.conf. > > PR: 199095 > MFC after: 1 week Does this deserve relnotes? From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 20:35:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8CABE744; Fri, 24 Apr 2015 20:35:05 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::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 008E31FBA; Fri, 24 Apr 2015 20:35:04 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t3OKYx76015966 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Fri, 24 Apr 2015 23:34:59 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t3OKYx76015966 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t3OKYxxo015965; Fri, 24 Apr 2015 23:34:59 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 24 Apr 2015 23:34:59 +0300 From: Konstantin Belousov To: Antoine Brodin Cc: Will Andrews , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281442 - head/sys/kern Message-ID: <20150424203459.GA2390@kib.kiev.ua> References: <201504111851.t3BIpgRS071392@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) 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.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 20:35:05 -0000 On Thu, Apr 23, 2015 at 09:53:19PM +0200, Antoine Brodin wrote: > On Sat, Apr 11, 2015 at 8:51 PM, Will Andrews wrote: > > Author: will > > Date: Sat Apr 11 18:51:41 2015 > > New Revision: 281442 > > URL: https://svnweb.freebsd.org/changeset/base/281442 > > > > Log: > > uiomove_object_page(): Avoid instantiating pages in sparse regions on reads. > > > > Check whether the page being requested is either resident or on swap. If > > not, read from the zero_region instead of instantiating an unnecessary page. > > > > This avoids consuming memory for sparse files on tmpfs, when they are read > > by applications that do not use SEEK_HOLE/SEEK_DATA (which is most of them). > > > > Reviewed by: kib > > MFC after: 1 week > > Sponsored by: Spectra Logic > > Hi, > > We have a daily panic on one of the package builders: > https://reviews.freebsd.org/P60 > > Reverting this commit seems to fix the panic. I already provided the following patch to gjb. I am waiting for a confirmation to commit. diff --git a/sys/kern/uipc_shm.c b/sys/kern/uipc_shm.c index 8410ed9..93c7ed1 100644 --- a/sys/kern/uipc_shm.c +++ b/sys/kern/uipc_shm.c @@ -170,7 +170,7 @@ uiomove_object_page(vm_object_t obj, size_t len, struct uio *uio) if (uio->uio_rw == UIO_READ && vm_page_lookup(obj, idx) == NULL && !vm_pager_has_page(obj, idx, NULL, NULL)) { VM_OBJECT_WUNLOCK(obj); - return (uiomove(__DECONST(void *, zero_region), len, uio)); + return (uiomove(__DECONST(void *, zero_region), tlen, uio)); } /* From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 20:40:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19813AA4; Fri, 24 Apr 2015 20:40:04 +0000 (UTC) Received: from bigwig.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 E87F51024; Fri, 24 Apr 2015 20:40:03 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E8D97B923; Fri, 24 Apr 2015 16:40:02 -0400 (EDT) From: John Baldwin To: Garrett Cooper Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r281932 - head/sys/modules/oce Date: Fri, 24 Apr 2015 16:40:01 -0400 Message-ID: <10317438.JIgLtq45SY@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <7CA7DCFB-65E7-49FC-9717-FFD26F12F6B9@gmail.com> References: <201504241447.t3OElsmu026704@svn.freebsd.org> <7CA7DCFB-65E7-49FC-9717-FFD26F12F6B9@gmail.com> 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.2.7 (bigwig.baldwin.cx); Fri, 24 Apr 2015 16:40:03 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 20:40:04 -0000 On Friday, April 24, 2015 01:29:32 PM Garrett Cooper wrote: > > > On Apr 24, 2015, at 07:47, John Baldwin wrote: > > > > Author: jhb > > Date: Fri Apr 24 14:47:53 2015 > > New Revision: 281932 > > URL: https://svnweb.freebsd.org/changeset/base/281932 > > > > Log: > > Rename the kld for oce(4) to if_oce.ko. ifconfig(8) has special knowledge > > about kld filenames for network drivers that requires them to follow the > > pattern of if_. This also fixes the existing documentation in the > > manpage which says to use if_oce_load=YES in loader.conf. > > > > PR: 199095 > > MFC after: 1 week > > Does this deserve relnotes? Not sure, possibly. I guess one should err on the side of caution and note it. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 21:05:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2DC4E317; Fri, 24 Apr 2015 21:05:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1DA88132A; Fri, 24 Apr 2015 21:05:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OL5Tsq021175; Fri, 24 Apr 2015 21:05:29 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OL5TRS021174; Fri, 24 Apr 2015 21:05:29 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201504242105.t3OL5TRS021174@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 24 Apr 2015 21:05:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281950 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 21:05:30 -0000 Author: ae Date: Fri Apr 24 21:05:29 2015 New Revision: 281950 URL: https://svnweb.freebsd.org/changeset/base/281950 Log: Fix possible reference leak. Sponsored by: Yandex LLC Modified: head/sys/netinet/tcp_subr.c Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Fri Apr 24 20:09:52 2015 (r281949) +++ head/sys/netinet/tcp_subr.c Fri Apr 24 21:05:29 2015 (r281950) @@ -2159,6 +2159,7 @@ tcp_signature_do_compute(struct mbuf *m, break; #endif default: + KEY_FREESAV(&sav); return (-1); /* NOTREACHED */ break; From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 21:38:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B76CBB9E; Fri, 24 Apr 2015 21:38:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A688516C5; Fri, 24 Apr 2015 21:38:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OLcJRi036608; Fri, 24 Apr 2015 21:38:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OLcJeW036607; Fri, 24 Apr 2015 21:38:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504242138.t3OLcJeW036607@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 24 Apr 2015 21:38:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281951 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 21:38:19 -0000 Author: ngie Date: Fri Apr 24 21:38:18 2015 New Revision: 281951 URL: https://svnweb.freebsd.org/changeset/base/281951 Log: Backport MHSIZE/MPKTHSIZE equivalents from head These macros are equivalent to the ones on head, except they are only exposed when _KERNEL is defined, i.e. to kernel code, whereas the code on head is exposed to userland as well This is for improved forwards compatibility with mbuf(9) macros in head@r277203+, and is required for a clean MFC of r279393 This is a direct commit to stable/10 MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D2126 Reviewed by: glebius, rwatson Sponsored by: EMC / Isilon Storage Division Modified: stable/10/sys/sys/mbuf.h Modified: stable/10/sys/sys/mbuf.h ============================================================================== --- stable/10/sys/sys/mbuf.h Fri Apr 24 21:05:29 2015 (r281950) +++ stable/10/sys/sys/mbuf.h Fri Apr 24 21:38:18 2015 (r281951) @@ -206,6 +206,16 @@ struct mbuf { #define m_pktdat M_dat.MH.MH_dat.MH_databuf #define m_dat M_dat.M_databuf +/* + * NOTE: forwards compatibility definitions for mbuf(9) + * + * These aren't 1:1 with the macros in r277203; in particular they're exposed + * to both userland and kernel, whereas this is exposed to just _KERNEL -- to + * avoid disruption with existing KBI/KPIs + */ +#define MHSIZE offsetof(struct mbuf, m_dat) +#define MPKTHSIZE offsetof(struct mbuf, m_pktdat) + /* * mbuf flags of global significance and layer crossing. * Those of only protocol/layer specific significance are to be mapped From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 22:04:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D9A0064C; Fri, 24 Apr 2015 22:04:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C92C819C5; Fri, 24 Apr 2015 22:04:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OM4xXd051461; Fri, 24 Apr 2015 22:04:59 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OM4xk1051459; Fri, 24 Apr 2015 22:04:59 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504242204.t3OM4xk1051459@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 24 Apr 2015 22:04:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281952 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 22:05:00 -0000 Author: emaste Date: Fri Apr 24 22:04:59 2015 New Revision: 281952 URL: https://svnweb.freebsd.org/changeset/base/281952 Log: Add LLDB to BROKEN_OPTIONS for arm prior to armv6 LLVM lacks support on FreeBSD for ARMv4/ARMv5 64-bit atomic operations. Sponsored by: The FreeBSD Foundation Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Fri Apr 24 21:38:18 2015 (r281951) +++ head/share/mk/src.opts.mk Fri Apr 24 22:04:59 2015 (r281952) @@ -235,6 +235,10 @@ __DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTST .if ${__T} == "aarch64" BROKEN_OPTIONS+=BINUTILS BINUTILS_BOOTSTRAP GDB .endif +# LLVM lacks support for FreeBSD 64-bit atomic operations for ARMv4/ARMv5 +.if ${__T} == "arm" || ${__T} == "armeb" +BROKEN_OPTIONS+=LLDB +.endif .include From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 22:05:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74873791; Fri, 24 Apr 2015 22:05:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6471119CA; Fri, 24 Apr 2015 22:05:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OM5D7Y051598; Fri, 24 Apr 2015 22:05:13 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OM5D3J051597; Fri, 24 Apr 2015 22:05:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504242205.t3OM5D3J051597@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 24 Apr 2015 22:05:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281953 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 22:05:13 -0000 Author: kib Date: Fri Apr 24 22:05:12 2015 New Revision: 281953 URL: https://svnweb.freebsd.org/changeset/base/281953 Log: Use correct length for sparse uiomove(). It must be the clipped to the page size, len is the total transfer length, which may be larger than zero_region. Reported and tested by: clusteradm (gjb) Sponsored by: The FreeBSD Foundation X-MFC-With: r281442 Modified: head/sys/kern/uipc_shm.c Modified: head/sys/kern/uipc_shm.c ============================================================================== --- head/sys/kern/uipc_shm.c Fri Apr 24 22:04:59 2015 (r281952) +++ head/sys/kern/uipc_shm.c Fri Apr 24 22:05:12 2015 (r281953) @@ -170,7 +170,7 @@ uiomove_object_page(vm_object_t obj, siz if (uio->uio_rw == UIO_READ && vm_page_lookup(obj, idx) == NULL && !vm_pager_has_page(obj, idx, NULL, NULL)) { VM_OBJECT_WUNLOCK(obj); - return (uiomove(__DECONST(void *, zero_region), len, uio)); + return (uiomove(__DECONST(void *, zero_region), tlen, uio)); } /* From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 22:18:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 592989D5; Fri, 24 Apr 2015 22:18:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 486031ADA; Fri, 24 Apr 2015 22:18:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OMIpik057022; Fri, 24 Apr 2015 22:18:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OMIp7D057021; Fri, 24 Apr 2015 22:18:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504242218.t3OMIp7D057021@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 24 Apr 2015 22:18:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281954 - stable/10/sys/dev/ixgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 22:18:51 -0000 Author: ngie Date: Fri Apr 24 22:18:50 2015 New Revision: 281954 URL: https://svnweb.freebsd.org/changeset/base/281954 Log: MFC r279393: Pad RX copy alignment calculation to avoid illegal memory accesses The optimization made in r239940 is valid for struct mbuf's current structure and size in FreeBSD, but hardcodes assumptions about sizes of struct mbuf, which are unfortunately broken if additional data is added to the beginning of struct mbuf X-MFC note (discussed with rwatson): This change requires the MPKTHSIZE definition, which is only available after head@r277203 and will not be MFCed as it breaks mbuf(9) KPI. A direct commit to stable/10 and merges to other branches to add the necessary definitions to work with the code as-is will be done to facilitate this MFC PR: 194314 Approved/Reviewed by: erj, jfv Sponsored by: EMC / Isilon Storage Division Modified: stable/10/sys/dev/ixgbe/ixgbe.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ixgbe/ixgbe.h ============================================================================== --- stable/10/sys/dev/ixgbe/ixgbe.h Fri Apr 24 22:05:12 2015 (r281953) +++ stable/10/sys/dev/ixgbe/ixgbe.h Fri Apr 24 22:18:50 2015 (r281954) @@ -160,8 +160,9 @@ * modern Intel CPUs, results in 40 bytes wasted and a significant drop * in observed efficiency of the optimization, 97.9% -> 81.8%. */ -#define IXGBE_RX_COPY_LEN 160 -#define IXGBE_RX_COPY_ALIGN (MHLEN - IXGBE_RX_COPY_LEN) +#define IXGBE_RX_COPY_HDR_PADDED ((((MPKTHSIZE - 1) / 32) + 1) * 32) +#define IXGBE_RX_COPY_LEN (MSIZE - IXGBE_RX_COPY_HDR_PADDED) +#define IXGBE_RX_COPY_ALIGN (IXGBE_RX_COPY_HDR_PADDED - MPKTHSIZE) /* Keep older OS drivers building... */ #if !defined(SYSCTL_ADD_UQUAD) From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 23:26:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 58B1F6C1; Fri, 24 Apr 2015 23:26:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4330C112B; Fri, 24 Apr 2015 23:26:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3ONQstA092073; Fri, 24 Apr 2015 23:26:54 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3ONQjJ8092036; Fri, 24 Apr 2015 23:26:45 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201504242326.t3ONQjJ8092036@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Fri, 24 Apr 2015 23:26:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281955 - in stable/10: share/man/man9 sys/dev/bxe sys/dev/cxgb sys/dev/cxgbe sys/dev/e1000 sys/dev/ixgbe sys/dev/ixl sys/dev/mxge sys/dev/netmap sys/dev/oce sys/dev/qlxgbe sys/dev/qlxg... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 23:26:54 -0000 Author: hiren Date: Fri Apr 24 23:26:44 2015 New Revision: 281955 URL: https://svnweb.freebsd.org/changeset/base/281955 Log: MFC r275358 r275483 r276982 - Removing M_FLOWID by hps@ r275358: Start process of removing the use of the deprecated "M_FLOWID" flag from the FreeBSD network code. The flag is still kept around in the "sys/mbuf.h" header file, but does no longer have any users. Instead the "m_pkthdr.rsstype" field in the mbuf structure is now used to decide the meaning of the "m_pkthdr.flowid" field. To modify the "m_pkthdr.rsstype" field please use the existing "M_HASHTYPE_XXX" macros as defined in the "sys/mbuf.h" header file. This patch introduces new behaviour in the transmit direction. Previously network drivers checked if "M_FLOWID" was set in "m_flags" before using the "m_pkthdr.flowid" field. This check has now now been replaced by checking if "M_HASHTYPE_GET(m)" is different from "M_HASHTYPE_NONE". In the future more hashtypes will be added, for example hashtypes for hardware dedicated flows. "M_HASHTYPE_OPAQUE" indicates that the "m_pkthdr.flowid" value is valid and has no particular type. This change removes the need for an "if" statement in TCP transmit code checking for the presence of a valid flowid value. The "if" statement mentioned above is now a direct variable assignment which is then later checked by the respective network drivers like before. r275483: Remove M_FLOWID from SCTP code. r276982: Remove no longer used "M_FLOWID" flag from mbuf.h and update the netisr manpage. Note: The FreeBSD version has been bumped. Reviewed by: hps, tuexen Sponsored by: Limelight Networks Modified: stable/10/share/man/man9/netisr.9 stable/10/sys/dev/bxe/bxe.c stable/10/sys/dev/cxgb/cxgb_sge.c stable/10/sys/dev/cxgbe/t4_main.c stable/10/sys/dev/cxgbe/t4_sge.c stable/10/sys/dev/e1000/if_igb.c stable/10/sys/dev/ixgbe/ixgbe.c stable/10/sys/dev/ixgbe/ixv.c stable/10/sys/dev/ixl/ixl_txrx.c stable/10/sys/dev/mxge/if_mxge.c stable/10/sys/dev/netmap/netmap_freebsd.c stable/10/sys/dev/oce/oce_if.c stable/10/sys/dev/qlxgbe/ql_isr.c stable/10/sys/dev/qlxgbe/ql_os.c stable/10/sys/dev/qlxge/qls_isr.c stable/10/sys/dev/qlxge/qls_os.c stable/10/sys/dev/sfxge/sfxge_rx.c stable/10/sys/dev/sfxge/sfxge_tx.c stable/10/sys/dev/virtio/network/if_vtnet.c stable/10/sys/dev/vmware/vmxnet3/if_vmx.c stable/10/sys/dev/vxge/vxge.c stable/10/sys/net/flowtable.c stable/10/sys/net/ieee8023ad_lacp.c stable/10/sys/net/if_lagg.c stable/10/sys/net/if_lagg.h stable/10/sys/net/netisr.c stable/10/sys/netinet/in_pcb.h stable/10/sys/netinet/ip_output.c stable/10/sys/netinet/sctp_indata.c stable/10/sys/netinet/sctp_input.c stable/10/sys/netinet/sctp_output.c stable/10/sys/netinet/sctp_pcb.c stable/10/sys/netinet/sctp_structs.h stable/10/sys/netinet/sctputil.c stable/10/sys/netinet/tcp_input.c stable/10/sys/netinet/tcp_syncache.c stable/10/sys/netinet6/sctp6_usrreq.c stable/10/sys/ofed/drivers/net/mlx4/en_rx.c stable/10/sys/ofed/drivers/net/mlx4/en_tx.c stable/10/sys/sys/mbuf.h stable/10/sys/sys/param.h Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man9/netisr.9 ============================================================================== --- stable/10/share/man/man9/netisr.9 Fri Apr 24 22:18:50 2015 (r281954) +++ stable/10/share/man/man9/netisr.9 Fri Apr 24 23:26:44 2015 (r281955) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 22, 2010 +.Dd January 11, 2015 .Dt NETISR 9 .Os .Sh NAME @@ -126,13 +126,13 @@ MIB names, so should not contain whitesp Protocol handler function that will be invoked on each packet received for the protocol. .It Vt netisr_m2flow_t Va nh_m2flow -Optional protocol function to generate a flow ID and set -.Dv M_FLOWID -for packets that do not enter +Optional protocol function to generate a flow ID and set a valid +hashtype for packets that enter the .Nm with -.Dv M_FLOWID -defined. +.Dv M_HASHTYPE_GET(m) +equal to +.Dv M_HASHTYPE_NONE . Will be used only with .Dv NETISR_POLICY_FLOW . .It Vt netisr_m2cpuid_t Va nh_m2cpuid Modified: stable/10/sys/dev/bxe/bxe.c ============================================================================== --- stable/10/sys/dev/bxe/bxe.c Fri Apr 24 22:18:50 2015 (r281954) +++ stable/10/sys/dev/bxe/bxe.c Fri Apr 24 23:26:44 2015 (r281955) @@ -3230,7 +3230,7 @@ bxe_tpa_stop(struct bxe_softc * #if __FreeBSD_version >= 800000 /* specify what RSS queue was used for this flow */ m->m_pkthdr.flowid = fp->index; - m->m_flags |= M_FLOWID; + M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE); #endif ifp->if_ipackets++; @@ -3469,7 +3469,7 @@ bxe_rxeof(struct bxe_softc *sc, #if __FreeBSD_version >= 800000 /* specify what RSS queue was used for this flow */ m->m_pkthdr.flowid = fp->index; - m->m_flags |= M_FLOWID; + M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE); #endif next_rx: @@ -6051,10 +6051,9 @@ bxe_tx_mq_start(struct ifnet *ifp, fp_index = 0; /* default is the first queue */ - /* change the queue if using flow ID */ - if ((m->m_flags & M_FLOWID) != 0) { + /* check if flowid is set */ + if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) fp_index = (m->m_pkthdr.flowid % sc->num_queues); - } fp = &sc->fp[fp_index]; Modified: stable/10/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- stable/10/sys/dev/cxgb/cxgb_sge.c Fri Apr 24 22:18:50 2015 (r281954) +++ stable/10/sys/dev/cxgb/cxgb_sge.c Fri Apr 24 23:26:44 2015 (r281955) @@ -1738,8 +1738,9 @@ cxgb_transmit(struct ifnet *ifp, struct m_freem(m); return (0); } - - if (m->m_flags & M_FLOWID) + + /* check if flowid is set */ + if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) qidx = (m->m_pkthdr.flowid % pi->nqsets) + pi->first_qset; qs = &pi->adapter->sge.qs[qidx]; @@ -2904,9 +2905,10 @@ process_responses(adapter_t *adap, struc eop = get_packet(adap, drop_thresh, qs, mh, r); if (eop) { - if (r->rss_hdr.hash_type && !adap->timestamp) - mh->mh_head->m_flags |= M_FLOWID; - mh->mh_head->m_pkthdr.flowid = rss_hash; + if (r->rss_hdr.hash_type && !adap->timestamp) { + M_HASHTYPE_SET(mh->mh_head, M_HASHTYPE_OPAQUE); + mh->mh_head->m_pkthdr.flowid = rss_hash; + } } ethpad = 2; Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Fri Apr 24 22:18:50 2015 (r281954) +++ stable/10/sys/dev/cxgbe/t4_main.c Fri Apr 24 23:26:44 2015 (r281955) @@ -1392,7 +1392,8 @@ cxgbe_transmit(struct ifnet *ifp, struct return (ENETDOWN); } - if (m->m_flags & M_FLOWID) + /* check if flowid is set */ + if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) txq += ((m->m_pkthdr.flowid % (pi->ntxq - pi->rsrv_noflowq)) + pi->rsrv_noflowq); br = txq->br; Modified: stable/10/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_sge.c Fri Apr 24 22:18:50 2015 (r281954) +++ stable/10/sys/dev/cxgbe/t4_sge.c Fri Apr 24 23:26:44 2015 (r281955) @@ -1742,7 +1742,7 @@ t4_eth_rx(struct sge_iq *iq, const struc m0->m_data += fl_pktshift; m0->m_pkthdr.rcvif = ifp; - m0->m_flags |= M_FLOWID; + M_HASHTYPE_SET(m0, M_HASHTYPE_OPAQUE); m0->m_pkthdr.flowid = be32toh(rss->hash_val); if (cpl->csum_calc && !cpl->err_vec) { Modified: stable/10/sys/dev/e1000/if_igb.c ============================================================================== --- stable/10/sys/dev/e1000/if_igb.c Fri Apr 24 22:18:50 2015 (r281954) +++ stable/10/sys/dev/e1000/if_igb.c Fri Apr 24 23:26:44 2015 (r281955) @@ -977,7 +977,7 @@ igb_mq_start(struct ifnet *ifp, struct m int i, err = 0; /* Which queue to use */ - if ((m->m_flags & M_FLOWID) != 0) + if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) i = m->m_pkthdr.flowid % adapter->num_queues; else i = curcpu % adapter->num_queues; @@ -4972,7 +4972,7 @@ igb_rxeof(struct igb_queue *que, int cou } #ifndef IGB_LEGACY_TX rxr->fmp->m_pkthdr.flowid = que->msix; - rxr->fmp->m_flags |= M_FLOWID; + M_HASHTYPE_SET(rxr->fmp, M_HASHTYPE_OPAQUE); #endif sendmp = rxr->fmp; /* Make sure to set M_PKTHDR. */ Modified: stable/10/sys/dev/ixgbe/ixgbe.c ============================================================================== --- stable/10/sys/dev/ixgbe/ixgbe.c Fri Apr 24 22:18:50 2015 (r281954) +++ stable/10/sys/dev/ixgbe/ixgbe.c Fri Apr 24 23:26:44 2015 (r281955) @@ -819,7 +819,7 @@ ixgbe_mq_start(struct ifnet *ifp, struct int i, err = 0; /* Which queue to use */ - if ((m->m_flags & M_FLOWID) != 0) + if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) i = m->m_pkthdr.flowid % adapter->num_queues; else i = curcpu % adapter->num_queues; @@ -4583,7 +4583,7 @@ ixgbe_rxeof(struct ix_queue *que) ixgbe_rx_checksum(staterr, sendmp, ptype); #if __FreeBSD_version >= 800000 sendmp->m_pkthdr.flowid = que->msix; - sendmp->m_flags |= M_FLOWID; + M_HASHTYPE_SET(sendmp, M_HASHTYPE_OPAQUE); #endif } next_desc: Modified: stable/10/sys/dev/ixgbe/ixv.c ============================================================================== --- stable/10/sys/dev/ixgbe/ixv.c Fri Apr 24 22:18:50 2015 (r281954) +++ stable/10/sys/dev/ixgbe/ixv.c Fri Apr 24 23:26:44 2015 (r281955) @@ -580,7 +580,7 @@ ixv_mq_start(struct ifnet *ifp, struct m int i = 0, err = 0; /* Which queue to use */ - if ((m->m_flags & M_FLOWID) != 0) + if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) i = m->m_pkthdr.flowid % adapter->num_queues; txr = &adapter->tx_rings[i]; @@ -3465,7 +3465,7 @@ ixv_rxeof(struct ix_queue *que, int coun ixv_rx_checksum(staterr, sendmp, ptype); #if __FreeBSD_version >= 800000 sendmp->m_pkthdr.flowid = que->msix; - sendmp->m_flags |= M_FLOWID; + M_HASHTYPE_SET(sendmp, M_HASHTYPE_OPAQUE); #endif } next_desc: Modified: stable/10/sys/dev/ixl/ixl_txrx.c ============================================================================== --- stable/10/sys/dev/ixl/ixl_txrx.c Fri Apr 24 22:18:50 2015 (r281954) +++ stable/10/sys/dev/ixl/ixl_txrx.c Fri Apr 24 23:26:44 2015 (r281955) @@ -66,8 +66,8 @@ ixl_mq_start(struct ifnet *ifp, struct m struct tx_ring *txr; int err, i; - /* Which queue to use */ - if ((m->m_flags & M_FLOWID) != 0) + /* check if flowid is set */ + if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) i = m->m_pkthdr.flowid % vsi->num_queues; else i = curcpu % vsi->num_queues; @@ -1543,7 +1543,7 @@ ixl_rxeof(struct ixl_queue *que, int cou if ((ifp->if_capenable & IFCAP_RXCSUM) != 0) ixl_rx_checksum(sendmp, status, error, ptype); sendmp->m_pkthdr.flowid = que->msix; - sendmp->m_flags |= M_FLOWID; + M_HASHTYPE_SET(sendmp, M_HASHTYPE_OPAQUE); } next_desc: bus_dmamap_sync(rxr->dma.tag, rxr->dma.map, Modified: stable/10/sys/dev/mxge/if_mxge.c ============================================================================== --- stable/10/sys/dev/mxge/if_mxge.c Fri Apr 24 22:18:50 2015 (r281954) +++ stable/10/sys/dev/mxge/if_mxge.c Fri Apr 24 23:26:44 2015 (r281955) @@ -2718,7 +2718,7 @@ mxge_rx_done_big(struct mxge_slice_state /* flowid only valid if RSS hashing is enabled */ if (sc->num_slices > 1) { m->m_pkthdr.flowid = (ss - sc->ss); - m->m_flags |= M_FLOWID; + M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE); } /* pass the frame up the stack */ (*ifp->if_input)(ifp, m); @@ -2786,7 +2786,7 @@ mxge_rx_done_small(struct mxge_slice_sta /* flowid only valid if RSS hashing is enabled */ if (sc->num_slices > 1) { m->m_pkthdr.flowid = (ss - sc->ss); - m->m_flags |= M_FLOWID; + M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE); } /* pass the frame up the stack */ (*ifp->if_input)(ifp, m); Modified: stable/10/sys/dev/netmap/netmap_freebsd.c ============================================================================== --- stable/10/sys/dev/netmap/netmap_freebsd.c Fri Apr 24 22:18:50 2015 (r281954) +++ stable/10/sys/dev/netmap/netmap_freebsd.c Fri Apr 24 23:26:44 2015 (r281955) @@ -204,7 +204,7 @@ netmap_catch_tx(struct netmap_generic_ad * of the transmission does not consume resources. * * On FreeBSD, and on multiqueue cards, we can force the queue using - * if ((m->m_flags & M_FLOWID) != 0) + * if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) * i = m->m_pkthdr.flowid % adapter->num_queues; * else * i = curcpu % adapter->num_queues; @@ -240,7 +240,7 @@ generic_xmit_frame(struct ifnet *ifp, st m->m_len = m->m_pkthdr.len = len; // inc refcount. All ours, we could skip the atomic atomic_fetchadd_int(PNT_MBUF_REFCNT(m), 1); - m->m_flags |= M_FLOWID; + M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE); m->m_pkthdr.flowid = ring_nr; m->m_pkthdr.rcvif = ifp; /* used for tx notification */ ret = NA(ifp)->if_transmit(ifp, m); Modified: stable/10/sys/dev/oce/oce_if.c ============================================================================== --- stable/10/sys/dev/oce/oce_if.c Fri Apr 24 22:18:50 2015 (r281954) +++ stable/10/sys/dev/oce/oce_if.c Fri Apr 24 23:26:44 2015 (r281955) @@ -563,7 +563,7 @@ oce_multiq_start(struct ifnet *ifp, stru int queue_index = 0; int status = 0; - if ((m->m_flags & M_FLOWID) != 0) + if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) queue_index = m->m_pkthdr.flowid % sc->nwqs; wq = sc->wq[queue_index]; @@ -1374,7 +1374,7 @@ oce_rx(struct oce_rq *rq, uint32_t rqe_i m->m_pkthdr.flowid = (rq->queue_index - 1); else m->m_pkthdr.flowid = rq->queue_index; - m->m_flags |= M_FLOWID; + M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE); #endif /* This deternies if vlan tag is Valid */ if (oce_cqe_vtp_valid(sc, cqe)) { Modified: stable/10/sys/dev/qlxgbe/ql_isr.c ============================================================================== --- stable/10/sys/dev/qlxgbe/ql_isr.c Fri Apr 24 22:18:50 2015 (r281954) +++ stable/10/sys/dev/qlxgbe/ql_isr.c Fri Apr 24 23:26:44 2015 (r281955) @@ -159,7 +159,7 @@ qla_rx_intr(qla_host_t *ha, qla_sgl_rcv_ ifp->if_ipackets++; mpf->m_pkthdr.flowid = sgc->rss_hash; - mpf->m_flags |= M_FLOWID; + M_HASHTYPE_SET(mpf, M_HASHTYPE_OPAQUE); (*ifp->if_input)(ifp, mpf); @@ -324,7 +324,7 @@ qla_lro_intr(qla_host_t *ha, qla_sgl_lro mpf->m_pkthdr.csum_data = 0xFFFF; mpf->m_pkthdr.flowid = sgc->rss_hash; - mpf->m_flags |= M_FLOWID; + M_HASHTYPE_SET(mpf, M_HASHTYPE_OPAQUE); ifp->if_ipackets++; Modified: stable/10/sys/dev/qlxgbe/ql_os.c ============================================================================== --- stable/10/sys/dev/qlxgbe/ql_os.c Fri Apr 24 22:18:50 2015 (r281954) +++ stable/10/sys/dev/qlxgbe/ql_os.c Fri Apr 24 23:26:44 2015 (r281955) @@ -1145,7 +1145,8 @@ qla_send(qla_host_t *ha, struct mbuf **m QL_DPRINT8(ha, (ha->pci_dev, "%s: enter\n", __func__)); - if (m_head->m_flags & M_FLOWID) + /* check if flowid is set */ + if (M_HASHTYPE_GET(m_head) != M_HASHTYPE_NONE) txr_idx = m_head->m_pkthdr.flowid & (ha->hw.num_tx_rings - 1); tx_idx = ha->hw.tx_cntxt[txr_idx].txr_next; Modified: stable/10/sys/dev/qlxge/qls_isr.c ============================================================================== --- stable/10/sys/dev/qlxge/qls_isr.c Fri Apr 24 22:18:50 2015 (r281954) +++ stable/10/sys/dev/qlxge/qls_isr.c Fri Apr 24 23:26:44 2015 (r281955) @@ -190,7 +190,7 @@ qls_rx_comp(qla_host_t *ha, uint32_t rxr if ((cq_e->flags1 & Q81_RX_FLAGS1_RSS_MATCH_MASK)) { rxr->rss_int++; mp->m_pkthdr.flowid = cq_e->rss; - mp->m_flags |= M_FLOWID; + M_HASHTYPE_SET(mp, M_HASHTYPE_OPAQUE); } if (cq_e->flags0 & (Q81_RX_FLAGS0_TE | Q81_RX_FLAGS0_NU | Q81_RX_FLAGS0_IE)) { Modified: stable/10/sys/dev/qlxge/qls_os.c ============================================================================== --- stable/10/sys/dev/qlxge/qls_os.c Fri Apr 24 22:18:50 2015 (r281954) +++ stable/10/sys/dev/qlxge/qls_os.c Fri Apr 24 23:26:44 2015 (r281955) @@ -1141,7 +1141,8 @@ qls_send(qla_host_t *ha, struct mbuf **m QL_DPRINT8((ha->pci_dev, "%s: enter\n", __func__)); - if (m_head->m_flags & M_FLOWID) + /* check if flowid is set */ + if (M_HASHTYPE_GET(m_head) != M_HASHTYPE_NONE) txr_idx = m_head->m_pkthdr.flowid & (ha->num_tx_rings - 1); tx_idx = ha->tx_ring[txr_idx].txr_next; Modified: stable/10/sys/dev/sfxge/sfxge_rx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_rx.c Fri Apr 24 22:18:50 2015 (r281954) +++ stable/10/sys/dev/sfxge/sfxge_rx.c Fri Apr 24 23:26:44 2015 (r281955) @@ -334,7 +334,7 @@ sfxge_rx_deliver(struct sfxge_softc *sc, if (rx_desc->flags & EFX_PKT_TCP) { m->m_pkthdr.flowid = EFX_RX_HASH_VALUE(EFX_RX_HASHALG_TOEPLITZ, mtod(m, uint8_t *)); - m->m_flags |= M_FLOWID; + M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE); } m->m_data += sc->rx_prefix_size; m->m_len = rx_desc->size - sc->rx_prefix_size; @@ -385,7 +385,7 @@ sfxge_lro_deliver(struct sfxge_lro_state } m->m_pkthdr.flowid = c->conn_hash; - m->m_flags |= M_FLOWID; + M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE); m->m_pkthdr.csum_flags = csum_flags; __sfxge_rx_deliver(sc, m); Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Fri Apr 24 22:18:50 2015 (r281954) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Fri Apr 24 23:26:44 2015 (r281955) @@ -702,7 +702,8 @@ sfxge_if_transmit(struct ifnet *ifp, str if (m->m_pkthdr.csum_flags & (CSUM_DELAY_DATA | CSUM_TSO)) { int index = 0; - if (m->m_flags & M_FLOWID) { + /* check if flowid is set */ + if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) { uint32_t hash = m->m_pkthdr.flowid; index = sc->rx_indir_table[hash % SFXGE_RX_SCALE_MAX]; Modified: stable/10/sys/dev/virtio/network/if_vtnet.c ============================================================================== --- stable/10/sys/dev/virtio/network/if_vtnet.c Fri Apr 24 22:18:50 2015 (r281954) +++ stable/10/sys/dev/virtio/network/if_vtnet.c Fri Apr 24 23:26:44 2015 (r281955) @@ -1703,7 +1703,7 @@ vtnet_rxq_input(struct vtnet_rxq *rxq, s } m->m_pkthdr.flowid = rxq->vtnrx_id; - m->m_flags |= M_FLOWID; + M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE); /* * BMV: FreeBSD does not have the UNNECESSARY and PARTIAL checksum @@ -2349,7 +2349,8 @@ vtnet_txq_mq_start(struct ifnet *ifp, st sc = ifp->if_softc; npairs = sc->vtnet_act_vq_pairs; - if (m->m_flags & M_FLOWID) + /* check if flowid is set */ + if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) i = m->m_pkthdr.flowid % npairs; else i = curcpu % npairs; Modified: stable/10/sys/dev/vmware/vmxnet3/if_vmx.c ============================================================================== --- stable/10/sys/dev/vmware/vmxnet3/if_vmx.c Fri Apr 24 22:18:50 2015 (r281954) +++ stable/10/sys/dev/vmware/vmxnet3/if_vmx.c Fri Apr 24 23:26:44 2015 (r281955) @@ -2059,7 +2059,7 @@ vmxnet3_rxq_input(struct vmxnet3_rxqueue } #else m->m_pkthdr.flowid = rxq->vxrxq_id; - m->m_flags |= M_FLOWID; + M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE); #endif if (!rxcd->no_csum) @@ -3002,7 +3002,8 @@ vmxnet3_txq_mq_start(struct ifnet *ifp, sc = ifp->if_softc; ntxq = sc->vmx_ntxqueues; - if (m->m_flags & M_FLOWID) + /* check if flowid is set */ + if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) i = m->m_pkthdr.flowid % ntxq; else i = curcpu % ntxq; Modified: stable/10/sys/dev/vxge/vxge.c ============================================================================== --- stable/10/sys/dev/vxge/vxge.c Fri Apr 24 22:18:50 2015 (r281954) +++ stable/10/sys/dev/vxge/vxge.c Fri Apr 24 23:26:44 2015 (r281955) @@ -660,7 +660,7 @@ vxge_mq_send(ifnet_t ifp, mbuf_t m_head) if (vdev->config.tx_steering) { i = vxge_vpath_get(vdev, m_head); - } else if ((m_head->m_flags & M_FLOWID) != 0) { + } else if (M_HASHTYPE_GET(m_head) != M_HASHTYPE_NONE) { i = m_head->m_pkthdr.flowid % vdev->no_of_vpath; } @@ -1070,7 +1070,7 @@ vxge_rx_compl(vxge_hal_vpath_h vpath_han vxge_rx_checksum(ext_info, mbuf_up); #if __FreeBSD_version >= 800000 - mbuf_up->m_flags |= M_FLOWID; + M_HASHTYPE_SET(mbuf_up, M_HASHTYPE_OPAQUE); mbuf_up->m_pkthdr.flowid = vpath->vp_index; #endif /* Post-Read sync for buffers */ Modified: stable/10/sys/net/flowtable.c ============================================================================== --- stable/10/sys/net/flowtable.c Fri Apr 24 22:18:50 2015 (r281954) +++ stable/10/sys/net/flowtable.c Fri Apr 24 23:26:44 2015 (r281955) @@ -688,8 +688,8 @@ flowtable_lookup(sa_family_t sa, struct if (fle == NULL) return (EHOSTUNREACH); - if (!(m->m_flags & M_FLOWID)) { - m->m_flags |= M_FLOWID; + if (M_HASHTYPE_GET(m) == M_HASHTYPE_NONE) { + M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE); m->m_pkthdr.flowid = fle->f_hash; } Modified: stable/10/sys/net/ieee8023ad_lacp.c ============================================================================== --- stable/10/sys/net/ieee8023ad_lacp.c Fri Apr 24 22:18:50 2015 (r281954) +++ stable/10/sys/net/ieee8023ad_lacp.c Fri Apr 24 23:26:44 2015 (r281955) @@ -883,7 +883,8 @@ lacp_select_tx_port(struct lagg_softc *s return (NULL); } - if (sc->use_flowid && (m->m_flags & M_FLOWID)) + if (sc->use_flowid && + M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) hash = m->m_pkthdr.flowid >> sc->flowid_shift; else hash = lagg_hashmbuf(sc, m, lsc->lsc_hashkey); Modified: stable/10/sys/net/if_lagg.c ============================================================================== --- stable/10/sys/net/if_lagg.c Fri Apr 24 22:18:50 2015 (r281954) +++ stable/10/sys/net/if_lagg.c Fri Apr 24 23:26:44 2015 (r281955) @@ -179,12 +179,12 @@ static int lagg_failover_rx_all = 0; /* SYSCTL_INT(_net_link_lagg, OID_AUTO, failover_rx_all, CTLFLAG_RW, &lagg_failover_rx_all, 0, "Accept input from any interface in a failover lagg"); -static int def_use_flowid = 1; /* Default value for using M_FLOWID */ +static int def_use_flowid = 1; /* Default value for using flowid */ TUNABLE_INT("net.link.lagg.default_use_flowid", &def_use_flowid); SYSCTL_INT(_net_link_lagg, OID_AUTO, default_use_flowid, CTLFLAG_RW, &def_use_flowid, 0, "Default setting for using flow id for load sharing"); -static int def_flowid_shift = 16; /* Default value for using M_FLOWID */ +static int def_flowid_shift = 16; /* Default value for using flow shift */ TUNABLE_INT("net.link.lagg.default_flowid_shift", &def_flowid_shift); SYSCTL_INT(_net_link_lagg, OID_AUTO, default_flowid_shift, CTLFLAG_RW, &def_flowid_shift, 0, @@ -1879,7 +1879,8 @@ lagg_lb_start(struct lagg_softc *sc, str struct lagg_port *lp = NULL; uint32_t p = 0; - if (sc->use_flowid && (m->m_flags & M_FLOWID)) + if (sc->use_flowid && + M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) p = m->m_pkthdr.flowid >> sc->flowid_shift; else p = lagg_hashmbuf(sc, m, lb->lb_key); Modified: stable/10/sys/net/if_lagg.h ============================================================================== --- stable/10/sys/net/if_lagg.h Fri Apr 24 22:18:50 2015 (r281954) +++ stable/10/sys/net/if_lagg.h Fri Apr 24 23:26:44 2015 (r281955) @@ -231,8 +231,8 @@ struct lagg_softc { struct callout sc_callout; struct sysctl_ctx_list ctx; /* sysctl variables */ struct sysctl_oid *sc_oid; /* sysctl tree oid */ - int use_flowid; /* use M_FLOWID */ - int flowid_shift; /* shift the flowid */ + int use_flowid; /* enable use of flowid */ + int flowid_shift; /* set flowid shift*/ }; struct lagg_port { Modified: stable/10/sys/net/netisr.c ============================================================================== --- stable/10/sys/net/netisr.c Fri Apr 24 22:18:50 2015 (r281954) +++ stable/10/sys/net/netisr.c Fri Apr 24 23:26:44 2015 (r281955) @@ -686,12 +686,13 @@ netisr_select_cpuid(struct netisr_proto } if (policy == NETISR_POLICY_FLOW) { - if (!(m->m_flags & M_FLOWID) && npp->np_m2flow != NULL) { + if (M_HASHTYPE_GET(m) == M_HASHTYPE_NONE && + npp->np_m2flow != NULL) { m = npp->np_m2flow(m, source); if (m == NULL) return (NULL); } - if (m->m_flags & M_FLOWID) { + if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) { *cpuidp = netisr_default_flow2cpu(m->m_pkthdr.flowid); return (m); Modified: stable/10/sys/netinet/in_pcb.h ============================================================================== --- stable/10/sys/netinet/in_pcb.h Fri Apr 24 22:18:50 2015 (r281954) +++ stable/10/sys/netinet/in_pcb.h Fri Apr 24 23:26:44 2015 (r281955) @@ -525,8 +525,8 @@ short inp_so_options(const struct inpcb #define INP_ONESBCAST 0x02000000 /* send all-ones broadcast */ #define INP_DROPPED 0x04000000 /* protocol drop flag */ #define INP_SOCKREF 0x08000000 /* strong socket reference */ -#define INP_SW_FLOWID 0x10000000 /* software generated flow id */ -#define INP_HW_FLOWID 0x20000000 /* hardware generated flow id */ +#define INP_RESERVED_0 0x10000000 /* reserved field */ +#define INP_RESERVED_1 0x20000000 /* reserved field */ #define IN6P_RFC2292 0x40000000 /* used RFC2292 API on the socket */ #define IN6P_MTU 0x80000000 /* receive path MTU */ Modified: stable/10/sys/netinet/ip_output.c ============================================================================== --- stable/10/sys/netinet/ip_output.c Fri Apr 24 22:18:50 2015 (r281954) +++ stable/10/sys/netinet/ip_output.c Fri Apr 24 23:26:44 2015 (r281955) @@ -144,9 +144,9 @@ ip_output(struct mbuf *m, struct mbuf *o if (inp != NULL) { INP_LOCK_ASSERT(inp); M_SETFIB(m, inp->inp_inc.inc_fibnum); - if (inp->inp_flags & (INP_HW_FLOWID|INP_SW_FLOWID)) { + if (inp->inp_flowtype != M_HASHTYPE_NONE) { m->m_pkthdr.flowid = inp->inp_flowid; - m->m_flags |= M_FLOWID; + M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE); } } @@ -796,11 +796,14 @@ smart_frag_failure: IPSTAT_INC(ips_odropped); goto done; } - /* make sure the flowid is the same for the fragmented mbufs */ + /* + * make sure the flowid and flowtype are the same for the + * fragmented mbufs + */ M_HASHTYPE_SET(m, M_HASHTYPE_GET(m0)); m->m_pkthdr.flowid = m0->m_pkthdr.flowid; - /* copy multicast and flowid flags, if any */ - m->m_flags |= (m0->m_flags & (M_MCAST | M_FLOWID)); + /* copy multicast flags, if any */ + m->m_flags |= (m0->m_flags & M_MCAST); /* * In the first mbuf, leave room for the link header, then * copy the original IP header including options. The payload Modified: stable/10/sys/netinet/sctp_indata.c ============================================================================== --- stable/10/sys/netinet/sctp_indata.c Fri Apr 24 22:18:50 2015 (r281954) +++ stable/10/sys/netinet/sctp_indata.c Fri Apr 24 23:26:44 2015 (r281955) @@ -2296,7 +2296,7 @@ sctp_process_data(struct mbuf **mm, int struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets *net, uint32_t * high_tsn, - uint8_t use_mflowid, uint32_t mflowid, + uint8_t mflowtype, uint32_t mflowid, uint32_t vrf_id, uint16_t port) { struct sctp_data_chunk *ch, chunk_buf; @@ -2391,7 +2391,7 @@ sctp_process_data(struct mbuf **mm, int stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_19; sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err, - use_mflowid, mflowid, + mflowtype, mflowid, vrf_id, port); return (2); } @@ -2406,7 +2406,7 @@ sctp_process_data(struct mbuf **mm, int stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_19; sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err, - use_mflowid, mflowid, + mflowtype, mflowid, vrf_id, port); return (2); } @@ -2475,7 +2475,7 @@ sctp_process_data(struct mbuf **mm, int m, iphlen, src, dst, sh, op_err, - use_mflowid, mflowid, + mflowtype, mflowid, vrf_id, port); return (2); } Modified: stable/10/sys/netinet/sctp_input.c ============================================================================== --- stable/10/sys/netinet/sctp_input.c Fri Apr 24 22:18:50 2015 (r281954) +++ stable/10/sys/netinet/sctp_input.c Fri Apr 24 23:26:44 2015 (r281955) @@ -86,7 +86,7 @@ sctp_handle_init(struct mbuf *m, int iph struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct sctp_init_chunk *cp, struct sctp_inpcb *inp, struct sctp_tcb *stcb, int *abort_no_unlock, - uint8_t use_mflowid, uint32_t mflowid, + uint8_t mflowtype, uint32_t mflowid, uint32_t vrf_id, uint16_t port) { struct sctp_init *init; @@ -101,7 +101,7 @@ sctp_handle_init(struct mbuf *m, int iph if (ntohs(cp->ch.chunk_length) < sizeof(struct sctp_init_chunk)) { op_err = sctp_generate_cause(SCTP_CAUSE_INVALID_PARAM, ""); sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err, - use_mflowid, mflowid, + mflowtype, mflowid, vrf_id, port); if (stcb) *abort_no_unlock = 1; @@ -113,7 +113,7 @@ sctp_handle_init(struct mbuf *m, int iph /* protocol error... send abort */ op_err = sctp_generate_cause(SCTP_CAUSE_INVALID_PARAM, ""); sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err, - use_mflowid, mflowid, + mflowtype, mflowid, vrf_id, port); if (stcb) *abort_no_unlock = 1; @@ -123,7 +123,7 @@ sctp_handle_init(struct mbuf *m, int iph /* invalid parameter... send abort */ op_err = sctp_generate_cause(SCTP_CAUSE_INVALID_PARAM, ""); sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err, - use_mflowid, mflowid, + mflowtype, mflowid, vrf_id, port); if (stcb) *abort_no_unlock = 1; @@ -133,7 +133,7 @@ sctp_handle_init(struct mbuf *m, int iph /* protocol error... send abort */ op_err = sctp_generate_cause(SCTP_CAUSE_INVALID_PARAM, ""); sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err, - use_mflowid, mflowid, + mflowtype, mflowid, vrf_id, port); if (stcb) *abort_no_unlock = 1; @@ -143,7 +143,7 @@ sctp_handle_init(struct mbuf *m, int iph /* protocol error... send abort */ op_err = sctp_generate_cause(SCTP_CAUSE_INVALID_PARAM, ""); sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err, - use_mflowid, mflowid, + mflowtype, mflowid, vrf_id, port); if (stcb) *abort_no_unlock = 1; @@ -155,7 +155,7 @@ sctp_handle_init(struct mbuf *m, int iph op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), "Problem with AUTH parameters"); sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err, - use_mflowid, mflowid, + mflowtype, mflowid, vrf_id, port); if (stcb) *abort_no_unlock = 1; @@ -186,7 +186,7 @@ sctp_handle_init(struct mbuf *m, int iph op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), "No listener"); sctp_send_abort(m, iphlen, src, dst, sh, 0, op_err, - use_mflowid, mflowid, + mflowtype, mflowid, vrf_id, port); } goto outnow; @@ -200,7 +200,7 @@ sctp_handle_init(struct mbuf *m, int iph SCTPDBG(SCTP_DEBUG_INPUT3, "sctp_handle_init: sending INIT-ACK\n"); sctp_send_initiate_ack(inp, stcb, m, iphlen, offset, src, dst, sh, cp, - use_mflowid, mflowid, + mflowtype, mflowid, vrf_id, port, ((stcb == NULL) ? SCTP_HOLDS_LOCK : SCTP_NOT_LOCKED)); } @@ -434,7 +434,7 @@ sctp_process_init_ack(struct mbuf *m, in struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct sctp_init_ack_chunk *cp, struct sctp_tcb *stcb, struct sctp_nets *net, int *abort_no_unlock, - uint8_t use_mflowid, uint32_t mflowid, + uint8_t mflowtype, uint32_t mflowid, uint32_t vrf_id) { struct sctp_association *asoc; @@ -474,7 +474,7 @@ sctp_process_init_ack(struct mbuf *m, in retval); sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen, src, dst, sh, op_err, - use_mflowid, mflowid, + mflowtype, mflowid, vrf_id, net->port); *abort_no_unlock = 1; return (-1); @@ -549,7 +549,7 @@ sctp_process_init_ack(struct mbuf *m, in } sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen, src, dst, sh, op_err, - use_mflowid, mflowid, + mflowtype, mflowid, vrf_id, net->port); *abort_no_unlock = 1; } @@ -1284,7 +1284,7 @@ sctp_handle_init_ack(struct mbuf *m, int struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct sctp_init_ack_chunk *cp, struct sctp_tcb *stcb, struct sctp_nets *net, int *abort_no_unlock, - uint8_t use_mflowid, uint32_t mflowid, + uint8_t mflowtype, uint32_t mflowid, uint32_t vrf_id) { struct sctp_init_ack *init_ack; @@ -1303,7 +1303,7 @@ sctp_handle_init_ack(struct mbuf *m, int op_err = sctp_generate_cause(SCTP_CAUSE_INVALID_PARAM, ""); sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen, src, dst, sh, op_err, - use_mflowid, mflowid, + mflowtype, mflowid, vrf_id, net->port); *abort_no_unlock = 1; return (-1); @@ -1315,7 +1315,7 @@ sctp_handle_init_ack(struct mbuf *m, int op_err = sctp_generate_cause(SCTP_CAUSE_INVALID_PARAM, ""); sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen, src, dst, sh, op_err, - use_mflowid, mflowid, + mflowtype, mflowid, vrf_id, net->port); *abort_no_unlock = 1; return (-1); @@ -1325,7 +1325,7 @@ sctp_handle_init_ack(struct mbuf *m, int op_err = sctp_generate_cause(SCTP_CAUSE_INVALID_PARAM, ""); sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen, src, dst, sh, op_err, - use_mflowid, mflowid, + mflowtype, mflowid, vrf_id, net->port); *abort_no_unlock = 1; return (-1); @@ -1335,7 +1335,7 @@ sctp_handle_init_ack(struct mbuf *m, int op_err = sctp_generate_cause(SCTP_CAUSE_INVALID_PARAM, ""); sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen, src, dst, sh, op_err, - use_mflowid, mflowid, + mflowtype, mflowid, vrf_id, net->port); *abort_no_unlock = 1; return (-1); @@ -1345,7 +1345,7 @@ sctp_handle_init_ack(struct mbuf *m, int op_err = sctp_generate_cause(SCTP_CAUSE_INVALID_PARAM, ""); sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen, src, dst, sh, op_err, - use_mflowid, mflowid, + mflowtype, mflowid, vrf_id, net->port); *abort_no_unlock = 1; return (-1); @@ -1370,7 +1370,7 @@ sctp_handle_init_ack(struct mbuf *m, int } if (sctp_process_init_ack(m, iphlen, offset, src, dst, sh, cp, stcb, net, abort_no_unlock, - use_mflowid, mflowid, + mflowtype, mflowid, vrf_id) < 0) { /* error in parsing parameters */ return (-1); @@ -1427,7 +1427,7 @@ sctp_process_cookie_new(struct mbuf *m, struct sctp_inpcb *inp, struct sctp_nets **netp, struct sockaddr *init_src, int *notification, int auth_skipped, uint32_t auth_offset, uint32_t auth_len, - uint8_t use_mflowid, uint32_t mflowid, + uint8_t mflowtype, uint32_t mflowid, uint32_t vrf_id, uint16_t port); @@ -1444,7 +1444,7 @@ sctp_process_cookie_existing(struct mbuf struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets **netp, struct sockaddr *init_src, int *notification, int auth_skipped, uint32_t auth_offset, uint32_t auth_len, - uint8_t use_mflowid, uint32_t mflowid, + uint8_t mflowtype, uint32_t mflowid, uint32_t vrf_id, uint16_t port) { struct sctp_association *asoc; @@ -1477,7 +1477,7 @@ sctp_process_cookie_existing(struct mbuf sctp_send_shutdown_ack(stcb, stcb->asoc.primary_destination); op_err = sctp_generate_cause(SCTP_CAUSE_COOKIE_IN_SHUTDOWN, ""); sctp_send_operr_to(src, dst, sh, cookie->peers_vtag, op_err, - use_mflowid, mflowid, + mflowtype, mflowid, vrf_id, net->port); if (how_indx < sizeof(asoc->cookie_how)) asoc->cookie_how[how_indx] = 2; @@ -1684,7 +1684,7 @@ sctp_process_cookie_existing(struct mbuf */ op_err = sctp_generate_cause(SCTP_CAUSE_NAT_COLLIDING_STATE, ""); sctp_send_abort(m, iphlen, src, dst, sh, 0, op_err, - use_mflowid, mflowid, + mflowtype, mflowid, vrf_id, port); return (NULL); } @@ -1856,7 +1856,7 @@ sctp_process_cookie_existing(struct mbuf sh, cookie, cookie_len, inp, netp, init_src, notification, auth_skipped, auth_offset, auth_len, - use_mflowid, mflowid, + mflowtype, mflowid, vrf_id, port)); } /* @@ -2012,7 +2012,7 @@ sctp_process_cookie_new(struct mbuf *m, struct sctp_inpcb *inp, struct sctp_nets **netp, struct sockaddr *init_src, int *notification, int auth_skipped, uint32_t auth_offset, uint32_t auth_len, - uint8_t use_mflowid, uint32_t mflowid, + uint8_t mflowtype, uint32_t mflowid, uint32_t vrf_id, uint16_t port) { struct sctp_tcb *stcb; @@ -2098,7 +2098,7 @@ sctp_process_cookie_new(struct mbuf *m, op_err = sctp_generate_cause(SCTP_CAUSE_OUT_OF_RESC, ""); sctp_abort_association(inp, (struct sctp_tcb *)NULL, m, iphlen, src, dst, sh, op_err, - use_mflowid, mflowid, + mflowtype, mflowid, vrf_id, port); return (NULL); } @@ -2126,7 +2126,7 @@ sctp_process_cookie_new(struct mbuf *m, op_err = sctp_generate_cause(SCTP_CAUSE_OUT_OF_RESC, ""); sctp_abort_association(inp, (struct sctp_tcb *)NULL, m, iphlen, src, dst, sh, op_err, - use_mflowid, mflowid, + mflowtype, mflowid, vrf_id, port); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_TCB_UNLOCK(stcb); @@ -2373,7 +2373,7 @@ sctp_handle_cookie_echo(struct mbuf *m, struct sctp_inpcb **inp_p, struct sctp_tcb **stcb, struct sctp_nets **netp, int auth_skipped, uint32_t auth_offset, uint32_t auth_len, struct sctp_tcb **locked_tcb, - uint8_t use_mflowid, uint32_t mflowid, + uint8_t mflowtype, uint32_t mflowid, uint32_t vrf_id, uint16_t port) { struct sctp_state_cookie *cookie; @@ -2560,7 +2560,7 @@ sctp_handle_cookie_echo(struct mbuf *m, tim = now.tv_usec - cookie->time_entered.tv_usec; scm->time_usec = htonl(tim); sctp_send_operr_to(src, dst, sh, cookie->peers_vtag, op_err, - use_mflowid, mflowid, + mflowtype, mflowid, vrf_id, port); return (NULL); } @@ -2650,7 +2650,7 @@ sctp_handle_cookie_echo(struct mbuf *m, cookie, cookie_len, *inp_p, netp, to, ¬ification, auth_skipped, auth_offset, auth_len, - use_mflowid, mflowid, + mflowtype, mflowid, vrf_id, port); } else { /* this is abnormal... cookie-echo on existing TCB */ @@ -2659,7 +2659,7 @@ sctp_handle_cookie_echo(struct mbuf *m, src, dst, sh, cookie, cookie_len, *inp_p, *stcb, netp, to, ¬ification, auth_skipped, auth_offset, auth_len, - use_mflowid, mflowid, + mflowtype, mflowid, vrf_id, port); } @@ -2667,11 +2667,8 @@ sctp_handle_cookie_echo(struct mbuf *m, /* still no TCB... must be bad cookie-echo */ return (NULL); } - if ((*netp != NULL) && (use_mflowid != 0)) { - (*netp)->flowid = mflowid; -#ifdef INVARIANTS - (*netp)->flowidset = 1; -#endif + if ((*netp != NULL) && (mflowtype != M_HASHTYPE_NONE)) { + (*netp)->flowtype = mflowtype; } /* * Ok, we built an association so confirm the address we sent the @@ -2742,7 +2739,7 @@ sctp_handle_cookie_echo(struct mbuf *m, op_err = sctp_generate_cause(SCTP_CAUSE_OUT_OF_RESC, ""); sctp_abort_association(*inp_p, NULL, m, iphlen, src, dst, sh, op_err, - use_mflowid, mflowid, + mflowtype, mflowid, vrf_id, port); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) pcb_so = SCTP_INP_SO(*inp_p); @@ -4394,7 +4391,7 @@ __attribute__((noinline)) struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct sctp_chunkhdr *ch, struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets **netp, int *fwd_tsn_seen, - uint8_t use_mflowid, uint32_t mflowid, + uint8_t mflowtype, uint32_t mflowid, uint32_t vrf_id, uint16_t port) { struct sctp_association *asoc; @@ -4558,7 +4555,7 @@ __attribute__((noinline)) msg); /* no association, so it's out of the blue... */ sctp_handle_ootb(m, iphlen, *offset, src, dst, sh, inp, op_err, - use_mflowid, mflowid, + mflowtype, mflowid, vrf_id, port); *offset = length; if (locked_tcb) { @@ -4602,7 +4599,7 @@ __attribute__((noinline)) msg); sctp_handle_ootb(m, iphlen, *offset, src, dst, sh, inp, op_err, - use_mflowid, mflowid, + mflowtype, mflowid, vrf_id, port); return (NULL); } @@ -4747,7 +4744,7 @@ process_control_chunks: "INIT not the only chunk"); sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err, - use_mflowid, mflowid, + mflowtype, mflowid, vrf_id, port); *offset = length; return (NULL); @@ -4757,7 +4754,7 @@ process_control_chunks: op_err = sctp_generate_cause(SCTP_CAUSE_OUT_OF_RESC, ""); sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err, - use_mflowid, mflowid, + mflowtype, mflowid, vrf_id, port); *offset = length; return (NULL); @@ -4765,7 +4762,7 @@ process_control_chunks: sctp_handle_init(m, iphlen, *offset, src, dst, sh, (struct sctp_init_chunk *)ch, inp, stcb, &abort_no_unlock, - use_mflowid, mflowid, + mflowtype, mflowid, vrf_id, port); *offset = length; if ((!abort_no_unlock) && (locked_tcb)) { @@ -4819,7 +4816,7 @@ process_control_chunks: (struct sctp_init_ack_chunk *)ch, stcb, *netp, &abort_no_unlock, - use_mflowid, mflowid, + mflowtype, mflowid, vrf_id); } else { ret = -1; @@ -5124,7 +5121,7 @@ process_control_chunks: op_err = sctp_generate_cause(SCTP_CAUSE_OUT_OF_RESC, ""); sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err, - use_mflowid, mflowid, + mflowtype, mflowid, vrf_id, port); } *offset = length; @@ -5159,7 +5156,7 @@ process_control_chunks: auth_offset, auth_len, &locked_tcb, - use_mflowid, + mflowtype, mflowid, vrf_id, port); @@ -5613,7 +5610,7 @@ sctp_common_input_processing(struct mbuf uint8_t compute_crc, #endif uint8_t ecn_bits, - uint8_t use_mflowid, uint32_t mflowid, + uint8_t mflowtype, uint32_t mflowid, uint32_t vrf_id, uint16_t port) { uint32_t high_tsn; @@ -5652,11 +5649,8 @@ sctp_common_input_processing(struct mbuf net->port = port; } #endif - if ((net != NULL) && (use_mflowid != 0)) { - net->flowid = mflowid; -#ifdef INVARIANTS - net->flowidset = 1; -#endif + if ((net != NULL) && (mflowtype != M_HASHTYPE_NONE)) { + net->flowtype = mflowtype; } if ((inp != NULL) && (stcb != NULL)) { sctp_send_packet_dropped(stcb, net, m, length, iphlen, 1); @@ -5685,11 +5679,8 @@ sctp_common_input_processing(struct mbuf net->port = port; } #endif - if ((net != NULL) && (use_mflowid != 0)) { - net->flowid = mflowid; -#ifdef INVARIANTS - net->flowidset = 1; -#endif + if ((net != NULL) && (mflowtype != M_HASHTYPE_NONE)) { + net->flowtype = mflowtype; } if (inp == NULL) { SCTP_STAT_INCR(sctps_noport); @@ -5698,7 +5689,7 @@ sctp_common_input_processing(struct mbuf } if (ch->chunk_type == SCTP_SHUTDOWN_ACK) { sctp_send_shutdown_complete2(src, dst, sh, - use_mflowid, mflowid, + mflowtype, mflowid, vrf_id, port); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 23:27:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7860E809; Fri, 24 Apr 2015 23:27:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65FF81133; Fri, 24 Apr 2015 23:27:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3ONRpjD092301; Fri, 24 Apr 2015 23:27:51 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3ONRo2V092297; Fri, 24 Apr 2015 23:27:50 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201504242327.t3ONRo2V092297@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Fri, 24 Apr 2015 23:27:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281956 - in head/sys/ufs: ffs ufs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 23:27:51 -0000 Author: mckusick Date: Fri Apr 24 23:27:50 2015 New Revision: 281956 URL: https://svnweb.freebsd.org/changeset/base/281956 Log: Limit the number of cylinder groups that will be searched when trying to build a cluster. The limit is tunable using the sysctl vfs.ffs.maxclustersearch. The current limit is 10 cylinder groups per block allocation. It was previously limited to the number of cylinder groups in the filesystem per block allocation. When there were no clusters of the needed size left, it repeatedly searched the whole filesystem for a non-existent cluster on every block allocation. The result was very slow filesystem allocation with 100% CPU utilization. The old behavior can be had by setting vfs.ffs.maxclustersearch to a huge number (1,000,000). This change affects only the layout policy routines so is not able to interfere with the integrity of the filesystem. Reported by: Dmitry Sivachenko (demon@) Tested by: Dmitry Sivachenko (demon@) MFC after: 2 weeks Modified: head/sys/ufs/ffs/ffs_alloc.c head/sys/ufs/ffs/ffs_vfsops.c head/sys/ufs/ufs/inode.h Modified: head/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- head/sys/ufs/ffs/ffs_alloc.c Fri Apr 24 23:26:44 2015 (r281955) +++ head/sys/ufs/ffs/ffs_alloc.c Fri Apr 24 23:27:50 2015 (r281956) @@ -112,8 +112,7 @@ static void ffs_blkfree_trim_task(void * #ifdef INVARIANTS static int ffs_checkblk(struct inode *, ufs2_daddr_t, long); #endif -static ufs2_daddr_t ffs_clusteralloc(struct inode *, u_int, ufs2_daddr_t, int, - int); +static ufs2_daddr_t ffs_clusteralloc(struct inode *, u_int, ufs2_daddr_t, int); static ino_t ffs_dirpref(struct inode *); static ufs2_daddr_t ffs_fragextend(struct inode *, u_int, ufs2_daddr_t, int, int); @@ -460,10 +459,16 @@ nospace: SYSCTL_NODE(_vfs, OID_AUTO, ffs, CTLFLAG_RW, 0, "FFS filesystem"); static int doasyncfree = 1; -SYSCTL_INT(_vfs_ffs, OID_AUTO, doasyncfree, CTLFLAG_RW, &doasyncfree, 0, ""); +SYSCTL_INT(_vfs_ffs, OID_AUTO, doasyncfree, CTLFLAG_RW, &doasyncfree, 0, +"do not force synchronous writes when blocks are reallocated"); static int doreallocblks = 1; -SYSCTL_INT(_vfs_ffs, OID_AUTO, doreallocblks, CTLFLAG_RW, &doreallocblks, 0, ""); +SYSCTL_INT(_vfs_ffs, OID_AUTO, doreallocblks, CTLFLAG_RW, &doreallocblks, 0, +"enable block reallocation"); + +static int maxclustersearch = 10; +SYSCTL_INT(_vfs_ffs, OID_AUTO, maxclustersearch, CTLFLAG_RW, &maxclustersearch, +0, "max number of cylinder group to search for contigous blocks"); #ifdef DEBUG static volatile int prtrealloc = 0; @@ -510,7 +515,7 @@ ffs_reallocblks_ufs1(ap) ufs1_daddr_t soff, newblk, blkno; ufs2_daddr_t pref; struct indir start_ap[NIADDR + 1], end_ap[NIADDR + 1], *idp; - int i, len, start_lvl, end_lvl, ssize; + int i, cg, len, start_lvl, end_lvl, ssize; vp = ap->a_vp; ip = VTOI(vp); @@ -597,18 +602,39 @@ ffs_reallocblks_ufs1(ap) ebap = (ufs1_daddr_t *)ebp->b_data; } /* - * Find the preferred location for the cluster. + * Find the preferred location for the cluster. If we have not + * previously failed at this endeavor, then follow our standard + * preference calculation. If we have failed at it, then pick up + * where we last ended our search. */ UFS_LOCK(ump); - pref = ffs_blkpref_ufs1(ip, start_lbn, soff, sbap); + if (ip->i_nextclustercg == -1) + pref = ffs_blkpref_ufs1(ip, start_lbn, soff, sbap); + else + pref = cgdata(fs, ip->i_nextclustercg); /* * Search the block map looking for an allocation of the desired size. + * To avoid wasting too much time, we limit the number of cylinder + * groups that we will search. + */ + cg = dtog(fs, pref); + for (i = min(maxclustersearch, fs->fs_ncg); i > 0; i--) { + if ((newblk = ffs_clusteralloc(ip, cg, pref, len)) != 0) + break; + cg += 1; + if (cg >= fs->fs_ncg) + cg = 0; + } + /* + * If we have failed in our search, record where we gave up for + * next time. Otherwise, fall back to our usual search citerion. */ - if ((newblk = ffs_hashalloc(ip, dtog(fs, pref), pref, - len, len, ffs_clusteralloc)) == 0) { + if (newblk == 0) { + ip->i_nextclustercg = cg; UFS_UNLOCK(ump); goto fail; } + ip->i_nextclustercg = -1; /* * We have found a new contiguous block. * @@ -737,7 +763,7 @@ ffs_reallocblks_ufs2(ap) ufs_lbn_t start_lbn, end_lbn; ufs2_daddr_t soff, newblk, blkno, pref; struct indir start_ap[NIADDR + 1], end_ap[NIADDR + 1], *idp; - int i, len, start_lvl, end_lvl, ssize; + int i, cg, len, start_lvl, end_lvl, ssize; vp = ap->a_vp; ip = VTOI(vp); @@ -824,18 +850,39 @@ ffs_reallocblks_ufs2(ap) ebap = (ufs2_daddr_t *)ebp->b_data; } /* - * Find the preferred location for the cluster. + * Find the preferred location for the cluster. If we have not + * previously failed at this endeavor, then follow our standard + * preference calculation. If we have failed at it, then pick up + * where we last ended our search. */ UFS_LOCK(ump); - pref = ffs_blkpref_ufs2(ip, start_lbn, soff, sbap); + if (ip->i_nextclustercg == -1) + pref = ffs_blkpref_ufs2(ip, start_lbn, soff, sbap); + else + pref = cgdata(fs, ip->i_nextclustercg); /* * Search the block map looking for an allocation of the desired size. + * To avoid wasting too much time, we limit the number of cylinder + * groups that we will search. + */ + cg = dtog(fs, pref); + for (i = min(maxclustersearch, fs->fs_ncg); i > 0; i--) { + if ((newblk = ffs_clusteralloc(ip, cg, pref, len)) != 0) + break; + cg += 1; + if (cg >= fs->fs_ncg) + cg = 0; + } + /* + * If we have failed in our search, record where we gave up for + * next time. Otherwise, fall back to our usual search citerion. */ - if ((newblk = ffs_hashalloc(ip, dtog(fs, pref), pref, - len, len, ffs_clusteralloc)) == 0) { + if (newblk == 0) { + ip->i_nextclustercg = cg; UFS_UNLOCK(ump); goto fail; } + ip->i_nextclustercg = -1; /* * We have found a new contiguous block. * @@ -1786,12 +1833,11 @@ gotit: * take the first one that we find following bpref. */ static ufs2_daddr_t -ffs_clusteralloc(ip, cg, bpref, len, unused) +ffs_clusteralloc(ip, cg, bpref, len) struct inode *ip; u_int cg; ufs2_daddr_t bpref; int len; - int unused; { struct fs *fs; struct cg *cgp; Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Fri Apr 24 23:26:44 2015 (r281955) +++ head/sys/ufs/ffs/ffs_vfsops.c Fri Apr 24 23:27:50 2015 (r281956) @@ -1688,6 +1688,7 @@ ffs_vgetf(mp, ino, flags, vpp, ffs_flags ip->i_dev = dev; ip->i_number = ino; ip->i_ea_refs = 0; + ip->i_nextclustercg = -1; #ifdef QUOTA { int i; Modified: head/sys/ufs/ufs/inode.h ============================================================================== --- head/sys/ufs/ufs/inode.h Fri Apr 24 23:26:44 2015 (r281955) +++ head/sys/ufs/ufs/inode.h Fri Apr 24 23:27:50 2015 (r281956) @@ -87,6 +87,8 @@ struct inode { daddr_t *snapblklist; /* Collect expunged snapshot blocks. */ } i_un; + int i_nextclustercg; /* last cg searched for cluster */ + /* * Data for extended attribute modification. */ From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 00:32:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B759FF2D; Sat, 25 Apr 2015 00:32:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A04641771; Sat, 25 Apr 2015 00:32:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3P0Wmxx027532; Sat, 25 Apr 2015 00:32:48 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3P0Wm3w027529; Sat, 25 Apr 2015 00:32:48 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201504250032.t3P0Wm3w027529@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 25 Apr 2015 00:32:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281957 - stable/10/sys/dev/hptnr X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 00:32:48 -0000 Author: delphij Date: Sat Apr 25 00:32:47 2015 New Revision: 281957 URL: https://svnweb.freebsd.org/changeset/base/281957 Log: MFC r281387: Merge changes from vendor driver version 1.1.1: v1.1.1 2015-03-26 * Support 4Kn drive. * Change the SCSI target ID of the disk to be the index of physical connetion to the HBA. * Support staggered drive spin up. * Fix a bug that command would be timeout because of improper interrupt service routine. * Error handling to avoid scsi command lost which caused system hang up. * Fix a bug that fail to get the devcie's serial number via FreeNAS WebGUI. Many thanks to HighPoint for continued support of FreeBSD! Relnotes: yes Modified: stable/10/sys/dev/hptnr/README stable/10/sys/dev/hptnr/amd64-elf.hptnr_lib.o.uu stable/10/sys/dev/hptnr/him.h stable/10/sys/dev/hptnr/hptintf.h stable/10/sys/dev/hptnr/hptnr_config.c stable/10/sys/dev/hptnr/hptnr_config.h stable/10/sys/dev/hptnr/hptnr_osm_bsd.c stable/10/sys/dev/hptnr/i386-elf.hptnr_lib.o.uu stable/10/sys/dev/hptnr/ldm.h stable/10/sys/dev/hptnr/os_bsd.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hptnr/README ============================================================================== --- stable/10/sys/dev/hptnr/README Fri Apr 24 23:27:50 2015 (r281956) +++ stable/10/sys/dev/hptnr/README Sat Apr 25 00:32:47 2015 (r281957) @@ -1,8 +1,16 @@ Rocket Controller Driver for FreeBSD -Copyright (C) 2014 HighPoint Technologies, Inc. All rights reserved. +Copyright (C) 2015 HighPoint Technologies, Inc. All rights reserved. ############################################################################# Revision History: + v1.1.1 2015-03-26 + * Support 4Kn drive. + * Change the SCSI target ID of the disk to be the index of physical connetion to the HBA. + * Support staggered drive spin up. + * Fix a bug that command would be timeout because of improper interrupt service routine. + * Error handling to avoid scsi command lost which caused system hang up. + * Fix a bug that fail to get the devcie's serial number via FreeNAS WebGUI. + v1.0.1 2014-8-19 * Do not retry the command and reset the disk when failed to enable or disable spin up feature. @@ -13,7 +21,7 @@ Revision History: * Support smartmontool for R750. v1.0 2013-7-3 - *First source code release + First source code release ############################################################################# @@ -49,7 +57,7 @@ Revision History: 2) Extract the driver files under the kernel source tree: # cd /usr/src/sys/ - # tar xvzf /your/path/to/hptnr_freebsd_src_v1.0.1_14_08_19.tgz + # tar xvzf /your/path/to/hptnr-freebsd-src-v1.0-130701.tgz 3) Update the kernel configuration file to include the HighPoint source. Assume the configure file is GENERIC, and new kernel configure file is Modified: stable/10/sys/dev/hptnr/amd64-elf.hptnr_lib.o.uu ============================================================================== --- stable/10/sys/dev/hptnr/amd64-elf.hptnr_lib.o.uu Fri Apr 24 23:27:50 2015 (r281956) +++ stable/10/sys/dev/hptnr/amd64-elf.hptnr_lib.o.uu Sat Apr 25 00:32:47 2015 (r281957) @@ -1,6297 +1,4969 @@ begin 644 hptnr_lib.o -M?T5,1@(!`0D```````````$`/@`!`````````````````````````+`#!@`` -M`````````$```````$``$``-`(G0Q@<(QD0/A!$"``!,B>_H`````$B)1"002(7`=15, -MB>9,B>_H`````+@`````Z>H!``!!QD0D.!I!QD0D.0A!QD0D.@A!QD0D.P!! -MQD0D//]!QD0D/0!!QD0D):M!#[=&.&9!B40D($V);"0H0<=$)#3_````0<>$ -M))0````(````2(M$)!!(BT`028E$)$A(!?\```!)B40D4$'&1"0P)$B+1"00 -M28E$)'A)QX0DH`````````!!QD0D)(!)C5PD6+X`````2(G?Z`````!(BT0D -M$$B+_H`````(3;=`Y!#[9$)"0\@'3=A,!T,4B-="003(GO -MZ`````!!#[=T)#))BWY0Z`````!,B>9,B>_H`````+@`````Z<<```!)QT0D -M>`````!,B>9,B>_H`````$B+1"002(M8$$$/MMP3H`````$&) -MQ,8#`,9#`0#&0P(`QD,#`$B)[DR)[^@`````2(U5.+@`````9F:0Q@00`$B# -MP`%(@_@0=?)!C40D!,9%.!7&13D1B$4\QD4]`$B-75A$#[;@1(EE-,>%E``` -M``````!(BU0D$$B+0A!(B45(2(E5>+X`````2(G?Z`````!(BT0D$$B+)(B=_H`````+@!````2(/$&%M=05Q!74%>05_#D)")\&:)=PC&1PX`9L=' -M#```9H7V=!^-4/^Y`````&9FD$B+!V:)%`A(@\$"@^H!9H/Z_W7L\\-F9F:0 -M9F:09F:008GP9HEW",9'#@%FQT<,``!FA?9T'KH`````N0````!(BP=FB10( -M@\(!2(/!`F9$.<)U[//#9F9FD&9FD&9FD(!_#@%U*@^W1PP/M\A(BQ`>`+_=1!F1(D`B$@"#[?&PV9FD&:0#[;1 -M00^W\.@`````#[?`PTB)^;@`````.%$"=1-F.3%U#L9!`O]FQP'__^L09F:0 -M@\`!2(/!!&8]@`!UVP^WP,-F9F:09F9FD&9F9I!F9I"X`````(G!.%2'`G4& -M9CDTAW0/@\$!2(/``4@]@````'7C9H'Y@`"X@`$```]$R`^WP<-F9F:09F:0 -M9F:09F:0#[9'.#P(=#X\*'0Z/*@/A/\````\B`^$.0$``#P*9I!T)#PJ="`\ -MJ@^$Y0```#R*#X0?`0``/"]T##R/9F9FD`^%E`$``#PO#X22````/"]W(CP* -M=%\\"G<*/`AF9F:0=43K43PH='@\*F9FD&9FD'4TZVP\CP^$V0```#R/9I!W -M%3R(#X3+````/(IF9F:0=13IO@```#RH9F9FD&9FD'1Q/*IT;;D`````N``` -M``#I$P$```^V1SK!X`@/ME<["=`/ME(0"=")P0^V1SSI[P```&9F -M9I!F9I`/ME(8#[9'.\'@$`G"#[9'/0G"#[9'/,'@"(G1"<$/MD<_P>`( -M#[970`G0Z;4````/ME(8#[9'.\'@$`G"#[9'/0G"#[9'/,'@"(G1"<$/ -MME<^P>(8#[9'/\'@$`G"#[9'00G"#[9'0,'@"`G0ZW,/ME`P2`G"#[9'04@)P@^V1SQ(P>`H2`G"#[9'/4C!X"!("<(/MD<^2,'@&$@) -MP@^V1S](P>`02`G"#[9'0$C!X`A(B=%("<$/ME="P>(8#[9'0\'@$`G"#[9' -M10G"#[9'1,'@"`G02(F/B````(F'D````&:#3R(!\\-F9F:0NO____]FA?9T -M,4B)^;\`````NO____])Q\``````9I`/M@$QT`^VP,'J"$$S%("#QP%(@\$! -M9CGW=>6)T,-FD$B#[&A$#[9/.T0/MD)^ -M__[_B9$$`0``)7[_\O](BU<(B0)(BU<(B4(,2(M7"(E"$$B+5PB)0A1(BU<( -MB4(82(M7"(E"!$B+!XN`5`$``(D%`````"7^`/__2(L7B8)4`0``PV9F9I!F -M9I!F9I!F9I")\4B+!XN0!`$``(D5``````^W1SQF/8!D=`QF/8"1=`9F/8"4 -M=1$/MLF#P0BX`0```-/@"<+K$$`/MLZ#P0RX`0```-/@"<)(BP>)D`0!``## -M9F9FD&9F9I!F9I!F9I")\4B+!XN0!`$``(D5``````^W1SQF/8!D=`QF/8"1 -M=`9F/8"4=1$/MLF#P0BX_O___]/`(<+K$$`/MLZ#P0RX_O___]/`(<)(BP>) -MD`0!``##9F9FD&9F9I!F9I!F9I")\4"`_O]T;T"`_A]W,HNW&`$``+H!```` -MT^*)T/?0(?")AQ@!``"+AU@!``")!0`````AT'1`B8=8`0``PV:0B[<<`0`` -M#[;!@^@@N@$```")P=/BB=#WT"'PB8<<`0``BX=@`0``B04`````(=!T!HF' -M8`$``//#9F9FD&9FD$B#["A(B5PD"$B);"003(ED)!A,B6PD($B)U8GP3(LO -M0(#^`P^&B0```$B-',4`````@>/X!P``38VD'0`"``!!QP0D#`$``+\0)P`` -MZ`````!)C9P=!`(```^V50/!XA@/MD4"P>`0"<(/MD4`"<(/MD4!P>`("<*) -M$T''!"00`0``OQ`G``#H``````^V50?!XA@/MD4&P>`0"<(/MD4$"<(/MD4% -MP>`("<*)$^F$````2(TZ`````"_$"<``.@`````B=Y,B>?H`````$B+7"0(3(MD -M)!!(@\08PY!!5T%6055!5%532(/L6$F)_XA4)%=(BQ>`?SX`#X0\`@``0;P` -M````0;W@____0;[P____0`^VQDB)1"1(2(V"@`$``$B)1"1`2(V*A`$``$B) -M3"0X2(V"H`$``$B)1"0P2(V*I`$``$B)3"0H2(V"4`(``$B)1"0@2(V*5`(` -M`$B)3"082(V"X`$``$B)1"002('"T`$``$B)5"0(9F:02(M$)$A$B>%(T_BH -M`0^$C0$``$2)Y8/]`W871(GJ2`-4)"B+`HD%`````(/@_HD"ZQN-%.T````` -MB=)(`U0D.(L"B04`````@^#^B0*_$"<``.@`````@'PD5P!TOC@_X#=CB-'/7@____B=M( -MC80K4`(``,<``````+\0)P``Z`````!(C9PK5`(``(L#B04`````@\@!B0/K -M-HT<]0````")VTB-A"M0`@``QP``````OQ`G``#H`````$B-G"M4`@``BP.) -M!0````"#R`&)`TB#Q`A;7<.0D)"0D)!(B?E(BS\/MX&P$@``@\`!9HF!L!(` -M`&8[@;02``!R"6;'@;`2``````^W@;`2``!(P>`"2`.!:!$``(L6B1`/MX&P -M$@``B8@0B`>)T,'H"(A'`8A7`L-%#[8$,KD'````ZZ)F9F:09F9F -MD&9F9I!F9I!(BX<($0``BQ"+4`2+4`B+0`R)!0````##9F9FD&9FD$B#[`A( -MBX:(````1`^V1T-%A,!T(@^V4`VY`````/;"`70,ZQ)(B=!(T_BH`74(@\$! -M1#C!=>[&1D(,Z`````!(@\0(PV9F9I!F9F:09F:02(/L"$B)^$B+/V;'0$X! -M`,9`0AU(B<;H`````$B#Q`C#9F9FD&9F9I!F9F:09F:02(/L"$B+/P^W]DC! -MY@-(`[>P"0``2(LV2(7V=#U(BQ@%#[?`C02%``,``(F"<`$``$B+$P^W3C*#X1^X`0```$C3X(F"=`$``,9& -M)"&Z`````$B)W^@`````08/%`4F#Q`@/MT-H1#GH#X]X____2(M%0$C'0&`` -M````]D5,!'492(G?Z`````!(BW5`N@$```!(B=_H`````$B+54`/MH+,```` -MC02`#[92`@'02)@/MH@`````#[93.@^VY(B=_H`````$TY?F`/A9#^__])QT9``````$B+`XN(6`$` -M`(D-`````(7)=`E(BP.)B%@!``!(@\0(6UU!7$%=05Y!7\-F9F:09F9FD$B# -M[`A,BP=!#[9P0T"$]G0U28V`N!(``+D`````2#GX=1KK(@^VP4B-%$!(C120 -M28V4T+@2``!(.?IT#X/!`4`X\77@ZP6Y``````^VP4B-%$!(C1202(T$U0`` -M``!)B[0`R!(``$B%]G1]]D8*`G1W28V$`+@2``!(.48@=6D/MD98A,!T"(/` -M`8A&6.M92(M62$B#ZCA(C4Y(2(U".$@YR'1$2(-Z$`!U+.L*9F:02(-Z$`!U -M(,9&6`$/MHJ[````28NXL!```$G'P`````#H`````.L12(M2.$B#ZCA(C4(X -M2#G(=`%2(M$"%`/MD`(ZTYF@?F!`'<<#[;`2(N7B`D``$AI -MP,@/``!(BT00"`^V0`CK*P^VP$B+EV`)``!(C03`2,'@!4B+A!"(````#[9` -M".L+9F:09F:0N/\```!(F$0/MJ0#Y@@``$B+=7A(A?9T"$B)W^@`````2(GN -M2(G?Z`````!!#[;$2(T\@$B-/+A(C;S[P`$``$R)[D'_E:````!(BUPD"$B+ -M;"003(MD)!A,BVPD($B#Q"C#9F9FD&9FD&9FD&9FD$%455-(B?5(B=-F@7XX -MX0%U$0^V1CJ#Z!%!O``````\`78T2(LW2(N^.`D```^W12"Z8)X!`&8]A0!W -M%P^WP`^VA`9@"```2(T40$B-%)!(P>(%3(TD%\9#!`6`8P7^@"/?N`````!F -M@7TXX0%U$0^V13J#Z`$\`0^6P`^VP&:0P>`'#[83@^)_"<*($P^VA98```"# -MX`'!X`:#XK\)PH@3]H66`````70.3(GGZ`````!FB4,(ZP1FB4L(#[=#"(A% -M)6:!?3CA`74E#[95.HU"_SP!=PH/ME4[@^(/ZRJ0C4+ON@\````\`78=9F9F -MD+H`````28-\)&``=`Q!#[:4)($```"#X@\/M@.#X/`)T(@#6UU!7,-F9F:0 -M9F9FD$B#[#A(B5PD"$B);"003(ED)!A,B6PD($R)="0H3(E\)#!)B?Q(B?-) -MB=8````/ -MMTL@9H'YA0`/A_($```/M\%!#[:\!&`(``")^$"`__]T;F:#^7]W(T`/MM=) -MBXPD.`D``$B-!%)(C02"2,'@!4B+1`A0#[9`".M%9H'Y@0!W'D`/ML=)BY0D -MB`D``$AIP,@/``!(BT00"`^V0`CK($`/ML=)BY0D8`D``$B-!,!(P>`%2(N$ -M$(@````/MD`(#[;`00^VA`3F"```2(T4@$B-%)!)C;34P`$``$F+E"2("0`` -M0`^VQTAIP,@/``!!O0````#V1`)=$`^%8`(``,9#)`1!QP<`````N`$```#I -M2P0```^W4R"Y_P```+C_____9H'ZA0`/AXL````/M\)!#[:T!&`(``")\$"` -M_O]T0`^VQDF+E"2("0``2&G`R`\``$B+1!`(#[9`".L@0`^V -MQDF+E"1@"0``2(T$P$C!X`5(BX00B`````^V0`A`#[;.1`^V\$ECQD$/MJP$ -MY@@``$B-1*T`2(U$A0!)C;3$P`$```^WP4B-%$!(C1202,'B!4F)U4T#K"0X -M"0``9H'_X0%U"P^V0SJ#Z`$\`78I9H'Y_P!T!T'V14L$=1O&0R0&0<<'```` -M`+@!````Z38#``!F9I!F9I!!#[952(G1@^$!="3VP@1T'T$/MD0D1$$Z1"1. -MT/A/<```"%R0^$[P```/;"!`^$Y@`` -M`$B)WDR)[^@`````A,!U%<9#)`1!QP<`````N`$```#IP@(``$&`O8,````? -M=A%!QP_H`````&:#^!\/AF -M0<<'`0```+@!````Z<@!``!!@?CA`1``#X0,`0``00^W16J`>SCA#X7]```` -M@'LY`0^%\P```$C1Z$B)PH/B`0^V0SJ#Z`8\"0^'Q@````^VP/\DQ0````!! -MN`$```"Y`0```$B)VDR)[DR)Y^@`````A,`/A;````!!QP<"````N`$```#I -M3@$``$&X`0```+D`````2(G:3(GN3(GGZ`````"$P`^%?@```$''!P(```"X -M`0```.D<`0``#[;*0;@!````2(G:3(GN3(GGZ`````"$P'520<<'`@```+@! -M````Z?`````/MLI!N`````!(B=I,B>Y,B>?H`````(3`=29!QP<"````N`$` -M``#IQ````,9#)`1!QP<`````N`$```#IKP```$F-O"2@#P``Z`````"$P'01 -M0<<'`0```+@!````Z8T```"`>SCA=4Z`>SD!9F:0=46`>SH/=3^`>ST!9F9F -MD'4U#[9S/,'F"`^V0SL!Q@^W]DR)Y^@`````2#M#:'4%2(7`=1+&0R0$0<<' -M`````+@!````ZSFX`````.LR9I!!#[:$).4)``!(C12`2(T4D$F-M-3``0`` -M28N4)(@)``"X.+@/`.F4^___9F:09I!(BUPD"$B+;"003(MD)!A,BVPD($R+ -M="0H3(M\)#!(@\0XPV9F9I!F9I!F9I!F9I!(@^P(2(L_Z`````!(@\0(PV9F -M9I!F9F:09F9FD&9FD$%7059!54%455-(@^Q828G]2(GU2(N?.!$``&;'1C+_ -M#TB-5"0LZ`````"$P'0)BT0D+.D."P``BT4X)?___P`]X0$0``^%Y0```+^( -M$P``Z``````/MTT@9H'YA0`/A[D*```/M\%!#[:T!6`(``")\$"`_O]T:V:# -M^7]W(D`/MM9)BXTX"0``2(T$4DB-!()(P>`%2(M$"%`/MD`(ZT-F@?F!`'<= -M0`^VQDF+E8@)``!(:<#(#P``2(M$$`@/MD`(ZQ]`#[;&28N58`D``$B-!,!( -MP>`%2(N$$(@````/MD`(#[;`00^VA`7F"```2(T4@$B-%)!-C;35P`$``$F+ -ME8@)``!`#[;&2&G`R`\``$@!PDB)5"002,=$)`@`````2,=$)!@`````Z7(! -M```/MU4@OO\```!F@?J%`'<,#[?"00^VM`5@"```#[=].&:!_^$!=0\/MD4Z -M@^@1/`$/AL8```!F@?J%`'=Z#[?"00^VA`5@"```//]T:F:#^G]W(0^VT$F+ -MC3@)``!(C0122(T$@DC!X`5(BT0(4`^V0`CK2&:!^H$`=QP/ML!)BY6("0`` -M2&G`R`\``$B+1!`(#[9`".LE#[;`28N58`D``$B-!,!(P>`%2(N$$(@````/ -MMD`(ZP6X_____P^VP$$/MH0%Y@@``$B-%(!(C12038VTU<`!```/M\9(C11` -M2(T4D$C!X@5)`Y4X"0``2(E4)`AF@?_A`75&ZS(/M\9(C03`2,'@!4D#A6`) -M``!(B40D&$R+L(@```!(QT0D"`````!(QT0D$`````#K1`^V53J-0N\\`78G -MC4+_/`%V(&:!_O\`=`M(BT0D"/9`2P1U#L9%)`:X`````.FV"```2,=$)!`` -M````2,=$)!@`````2(UT)$A,B>_H`````$&)QV:)13),B>_H`````$F)Q+@" -M````387D#X1W"```3(FE@````$$/M]=(B10D2&G"L`0``$B-'!A(C4,@22N% -M.!$``$D#A4`1``!(BU0D2(E"($C!Z"!(BU0D2(E")$F+1"082(M4)$B)0BA( -MP>@@2(M4)$B)0BQ(BT0D2&9$B7@(N`````#&!!@`2(/``4@]L`0``'7P9H%] -M..$!=50/MD4Z@^@1/`%W24B-3"0P2(M$)$@/ME`(2(GN2(M\)`CH`````$B- -M@R`$``!)*X4X$0``20.%0!$``$B+5"1(B4(02,'H($B+5"1(B4(4Z14!``!! -M#[96"O;"`74LBT4X)?___P`]X0$0``^$G````$B+3"0(#[9!2*@!#X2+```` -MJ`0/A(,```#VA98````@=`](C70D,$B)[^@`````ZQM(C4PD,$B+1"1(#[90 -M"$B)[DB+?"0(Z`````!(C8,@!```22N%.!$``$D#A4`1``!(BU0D2(E"$$C! -MZ"!(BU0D2(E"%$B)V$DKA3@1``!)`X5`$0``2(M4)$B)0AA(P>@@2(M4)$B) -M0ASK7/;"`G172(G822N%.!$``$D#A4`1``!(BU0D2(E"&$C!Z"!(BU0D2(E" -M'$B-@R`$``!)*X4X$0``20.%0!$``$B+5"1(B4(02,'H($B+5"1(B4(42(M$ -M)$B`2`$"#[9564B+1"1(9HE0`H!]60!T,[\`````B?A(C01`2,'@`DF+="00 -M2(M-8$B+%`A(B10&BU0("(E4!@B#QP$/MD59.?AWTHM5-$B+1"1(B5`,9H%] -M..$!=3\/MD4Z@^@1/`%W-$$/M\](BU0D2$B)[DR)]^@`````2(U,)#!(B=I( -MB>Y,B??H`````$&`9@S^Z8L$``!F9I!!#[9&"J@"#X0B!```2(M$)$C&0`;^ -M2(M$)$B`8`?^2(-\)`@`#X2X````2(M$)`@/ME!(2(G0@^`&2(/X!@^%GP`` -M`/;"`0^$E@```$$/M\](BU0D2$B)[DR)]^@`````]H66`````7002(M$)$@/ -MMT`(P>`#B$0D,4B-3"0P2(G:2(GN3(GWZ`````#VA98````!=`=!@$X,`>L% -M08!F#/[&`Z%(BU0D"`^V@NH```"#X`\/ME,!@^+P"<*(4P%(BTPD"`^W03B# -MP`%FP<`(9HE#`DF)S$F!Q-0```#I/0,``&:!?3CA`0^%)`(```^V13H\#W03 -M0;P`````/!`/A1L#``#IK@````^V53S!X@@/MD4[`<)(BT0D2,9`!`U(BT0D -M2(!@!?Z`3"1#"$B+="1(#[9%)4$/MHWN````T^!F"48(2(M,)$@/MD$!@^`? -M@\@@B$$!2(M%/DB)@S@$``!FP<((9HF31`0```^V13V(@T($``#&`Y%(BU0D -M"`^W0CB#P`%FP<`(9HE#`DB+3"0(#[:1Z@```(/B#P^V0P&#X/`)T(A#`4F) -MS$F!Q-0```#I:`(``$B+5"1(#[9%)4$/MHWN````T^!F"4((Q@.!9L=#`O__ -M2(M$)!`/MI"[````@^(/#[9#`8/@\`G0B$,!2(-]2`!U#L9%)"&X`````.GN -M`P``]D4[`70I3(ME4$V%Y'0@28N]L!```$R)YN@`````@^`/#[93`8/B\`G" -MB%,!ZP5,BV0D$$B+54@/MD(!OA`````\@`^$A@```#R`=Q\\%7<2/!!F9I!F -MD'-G@^@"/`%W1.M7/!=F9I!W.^M>/(5T+CR%9F:09F:0=Q`\@71#/()U(V9F -MD&9FD.LB/)!R%[XH````/))F9I!V-3R3=0>^C````.LJO@0```#K(P^V0@2- -M-(4(````D.L5O@@```#K#KX,````9I#K!;X<````B?+!Z@)(BT0D2(A0!$B+ -M3"1(9L'J"(/B`0^V006#X/X)T(A!!4B-NR`$``")\DB+=4CH`````.D-`0`` -M#[9%.(/H!#RK=T`/ML#_),4`````#[9%0,'@"`^V54&-#!"#^0UW&+@!```` -M2-/@J=@^``!T"4B+1"1(@$@!!$B+1"1(@$@!`>L)2(M$)$B`8`'[2(M$)$C& -M0`0-2(M$)$B`8`7^2(M4)$@/MD4E00^VC>X```#3X&8)0@A(BT0D2(!@`1_& -M@R`$```&3(MD)`A)@<34````2(V[(00``$R)YN@`````2(V[)00``$R)YN@` -M````2(M%.$B)@T0$``!(BT5`2(F#3`0``$B+5"0(2(N"W````$B)@S@$``#& -M`Y%(BTPD"`^VD>H```"#X@\/MD,!@^#P"="(0P$/MT$X@\`!9L'`"&:)0P)- -MA>1T8TF+!"1(B4,$ZUFH`71500^WSTB+5"1(2(GN3(GWZ`````#VA98````! -M=!!(BT0D2`^W0`C!X`.(1"0Q2(U,)#!(B=I(B>Y,B??H`````/:%E@````%T -M!T&`3@P!ZP5!@&8,_DF+A;`)``!(BQ0D2(DLT$2)^F;!Z@5%#[?G@>+_!P`` -M1(GA@^$?N`$```!(T^!!"825N`D``(M%."7___\`/>$!$`!U*4B-3"1`N@`` -M``!$B>9,B??H``````^V1"1#@^`?@\A`B$0D0^FD````9H%]..$!=3,/MD4Z -M@^@1/`%W*$B+="083(GOZ`````!(C4PD0$B+1"08#[904$2)YDR)]^@````` -MZVE(BW0D"$R)[^@`````2(U,)$!(BT0D"`^V4')$B>9,B??H`````$B+3"0( -M#[912$B)T(/@!DB#^`9U+O;"`70I#[9$)$.#X!^#R&"(1"1##[91?H`````$B)PTB# -M>'``=39(B>_H`````$B)0W!(A_H`````.G]````9F:09I`/ -MMW,X9H'^X0%U%0^V>SJ-1^\\`0^'[0```.L?9F9FD`^VPDB-%$!(C1202,'B -M!4F)U4P#K3@)``#K!XU'_SP!=C9F@?F``'0O9H'^X0%FD'4+#[9#.H/H$3P! -M=AM!]D5+!'44QD,D!DB)WDB)[^@`````Z8````!(B=Y(B>_H`````(/X`G<* -M@_@!_H`````&9FD.M&2(.[ -M@`````!T#TB-LX````!(B>_H`````$B-E?@```!(BX7X````2(E8"$B)`TB) -M4PA(B9WX````ZSA(B=Y(B>_H`````$PYI?@````/A3O^___K'@^VPDB-%$!( -MC1202,'B!4F)U4P#K3@)``#I%O___TB#Q`A;74%<05W#2(/L2$B)7"082(EL -M)"!,B60D*$R);"0P3(ET)#A,B7PD0$B)]4F)_4R+9U!-BS0D00^V1"0,J!!T -M#,:'Z`````;IC`(```^VE^@```"`^@$/A((```"`^@%R&H#Z!`^$HP```(#Z -M!@^%S0(``&9FD.E=`@``QH?H`````4B)_DR)]^@`````QD4D@4&`3"0,"$B# -MO8``````=`](C;6`````3(GWZ`````!)BX;X````2(EH"$B)10!)C8;X```` -M2(E%"$F)KO@```!,B??H`````.EB`@``@^#W08A$)`R`A^L````!QH?H```` -M`,9&)`),B??H`````$R)]^@`````Z3,"``#&A^L`````2(.^@`````!T#TB- -MMH````!,B??H`````$F+34!(A?H`````.FH`0``00^V1"0,@^#W@\@008A$ -M)`Q)BW582(7V=11!@'PD#@!U+.GE````9F9FD&9FD$$/MI6!````0;@````` -MN0(```!,B>?H`````.E:`0``0;\`````QD0D%P!)C40D8$B)1"0(2(M\)`CH -M`````$B)Q4F+1"1H28EL)&A(BU0D"$B)50!(B44(2(DH2(M50$B%TG0528NV -M\`@``+\%````Z`````"`34P"2(GJO@8```!,B>?H`````("]@P````!T-D&- -M7P%!@?]_EI@`=R9,B??H`````+\!````Z`````"`O8,`````=`N#PP&!^X&6 -MF`!UVD&)WX!$)!?H`````(#[_W4.3(GJ3(GF3(GWZ`````!,B??H -M`````$B+7"082(ML)"!,BV0D*$R+;"0P3(MT)#A,BWPD0$B#Q$C#9F:005=! -M5D%505154TB#["A(B?U)B?5(BX\X"0``N&">`0!F@7X@A0!W&P^W1B`/MH0' -M8`@``$B-%$!(C1202(G02,'@!4R-)`%(BY4($0``2('"0`@``$$/MD0D\02(N5"!$``$B!PD`(``!!#[9$)'+!X`A( -MF$@!PHM"!(D%`````(A$)!")PL'J"(A4)!'!Z!"(1"022(N5"!$``$B!PD`( -M``!!#[9$)'+!X`A(F$@!PHM""(D%`````(A$)!.)PL'J"(A4)!3!Z!"(1"05 -MQD0D%@#&1"07`(M,)!!!B?9!P>X800^VWT2+1"041(GRB=Y(Q\<`````N``` -M``#H`````(G8@_`!B<*#X@%T%$6$_W0/0<9%)`"X`````.FH`@``08!])(%F -M9I!U(4B-3"001(GRB=Y,B>_H`````$'&120"N`````#I?0(``$&+13@E____ -M`#WA`0X`=0]!QD4D(;@`````Z5X"``!!]H66`````74HA-)U)$&`?"1*_W0< -M2(U,)!!$B?*)WDR)[^@`````N`````#I+`(``$R)YDB)[^@`````3(GF2(GO -MZ`````!(BU4`00^W13)FP>@%#[?`C02%``,``(F"<`$``$B+10!!#[=-,H/A -M'[H!````2(G32-/CB9AT`0``00^W13)(P>`#2`.%L`D``$C'``````!!#[=- -M,HG(9L'H!27_!P``@^$?2(G62-/F2(GQ]]$AC(6X"0``00^W33*)R&;!Z`4E -M_P<``(/A'TC3XO?2(52%;$F+50!)BT4(2(E""$B)$$$/MW4R2(V]H`\``.@` -M````08"L)(,````!0<9%)(%)@[V``````'0/28VU@````$B)[^@`````28U$ -M)"!).40D(`^$"0$``$F)QDB-A:`/``!(B40D"$R-O?@```!F9F:09F:03(GW -MZ`````!(B<-(BU4`#[=`,F;!Z`4/M\"-!(4``P``B8)P`0``2(M%``^W2S*# -MX1^Z`0```$B)UDC3YHFP=`$```^W0S)(P>`#2`.%L`D``$C'```````/MTLR -MB@%)?\'``"#X1](B=9(T^9(B?'WT2&,A;@)```/MTLRB@%)?\' -M``"#X1](T^+WTB%4A6P/MW,R2(M\)`CH`````$&`K"2#`````4B#NX`````` -M=`](C;.`````2(GOZ`````!(BX7X````2(E8"$B)`TR)>PA(B9WX````33ET -M)"`/A13___]!@:64````___^_T'&A"3H````!$R)[DR)Y^@`````N`$```!( -M@\0H6UU!7$%=05Y!7\.02(/L6$B)7"0H2(EL)#!,B60D.$R);"1`3(ET)$A, -MB7PD4$B)5"002(LO3(N%.!$``$B%T@^$Q@(```^WUDAIPK`$``!*C0P`]D$A -M`G082(T$U0````!(`X6P"0``2(L`QD`D`NL62(T$U0````!(`X6P"0``2(L` -MQD`D(4R-%-4`````2(N%L`D``$P!T$B+$(M"."7___\`/>$!$``/A+`!```/ -MMT(@9CV%`'<2#[?`#[:$!6`(```\_W499F:03(G02`.%L`D``$B+`,9`)`;I -MR@@```^VP$B-%$!(C1202,'B!4R+G3@)``!)`=.`?"03`'EN00^V4TA(B="# -MX`9(@_@&=2/VP@%T'DB+10"+D%@!``")%0````"%TG0*2(M%`(F06`$``$B+ -M10"+@%`!``")!0````"#R`)(BU4`B8)0`0``2(M%`(N`!`$``(D%`````(#, -M_TB+50")@@0!``!F]T$@`@@/A.H```"`?4,`#X3@````NP````!!N0````!% -MB@4@^`!ZR5(BT4`2`70`0``C12-`````$ACTD@!T(L`B04` -M````P>@4@^`!A,!T"K@!````2-/@"<-!@\$!08U``3A%0W>!A-MT4CA?#75- -MB?!FP>@%)?\'``"+1(5LB?](T_BH`74R08"[Z`````)W"$'&@^@````# -M3(G02`.%L`D``$B+,$R)W^@`````Z4P'``!!NP````#V1"03`0^$.P<``$R) -MT$@#A;`)``!(BS#&1B0ABT8X)?___P`]X0$.``^$%P<``$B+E0@1``!(@<)` -M"```00^V0W+!X`A(F$@!PHL"B04`````2(N5"!$``$B!PD0(``!!#[9#`(2)A(`<*+`HD% -M`````$B)[^@`````Z:$&``"0#[?V2(T<]0````!(BX6P"0``2`'82(L09H%Z -M..$!#X4,`0``#[9Z.D"`_Q`/AVX&``"X`0```(GY2-/@J<`P```/A"0`#X06!@``2(M04$B%T@^$"08```^V03.(`NG^!0`` -M2&G&L`0``$J-#`!,C6$H2(G82`.%L`D``$B+$$$/MD0D`HA")$B)V$@#A;`) -M``!(BP!(@WA(``^$P04```^VN2$$``#H`````$B)VD@#E;`)``!(BPJ+430Y -MT`]'PHG"2(MY2$R)YN@`````Z8T%``!(B=A(`X6P"0``2(L`QD`D`.EW!0`` -M9F9FD&9FD$B)V$@#A;`)``!,BRA-BWUHN/____]F08%]((4`=QE(B=A(`X6P -M"0``2(L`#[=`(`^VA`5@"```#[;`2(T40$B-%)!(P>(%3(NE.`D``$D!U$'& -MA"3H`````$$/ME0D2$B)T(/@!DB#^`8/A9PB+$TR)[N@````` -MBP-)`<6+0P1(@\,0A`(2)A(`<*+ -M`HD%`````(G"P>H008B7FP```,'H&&9!B8>0````2(N5"!$``$B!PD0(``!! -M#[9$)'+!X`A(F$@!PHL2B14`````#[;"9D&)AY0````/ML9F08F'E@```(G0 -MP>@0#[;`9D&)AY@```#!ZAA!B)>:````2(N5"!$``$B!PDP(``!!#[9$)'+! -MX`A(F$@!PHL"B04`````#[;`9D&)AY(```#I:0,``$AIQK`$``!.C30`00^V -M1C.$P`^%T0```$B)V$@#A;`)``!(BP#&0"0`0?:%E@```!`/A#(#``!-A?\/ -MA"D#``!!#[9&,T&(AY(```!!]H>Q`````@^$#P,``$&#?30`#X0$`P``28._ -MN`````!U#DF#O\``````#X3L`@``38ME2$F+A[@```!(APB+$TR)YN@`````BP-)`<2+0P1(@\,0A<`/A8<"``#KW&9FD&:0/`(/A2@" -M``!!#[9.0$&+1CB)1"0D#[94)"`(08G400G$@^%_@/EQ=CS&1"0-`$&#_`%V#$$/MD9!@^`/B$0D#<9$)`X` -M08/\`G8)00^V3D*(3"0.08/\`W9F00^V1D.(1"0/ZV#&1"0-`$&#_`)V#$$/ -MMDY"@^$/B$PD#<9$)`X`QD0D#P!!@_P'=CE!#[9&1X/`"$$YQ$0/1^#&1"0. -M`$&#_`QV"4$/MD9,B$0D#D&#_`UV"T$/MDY-B$PD#^L%QD0D#P!(B=A(`X6P -M"0``2(L`@'@P`'1(187D=$/&0"0@2(G82`.%L`D``$B+``^V0#`/MM!$..!$ -M#T+B2(G82`.%L`D``$B+`$B+>%!(A?]T'T2)XDF-=D#H`````.L12(G82`.% -ML`D``$B+`,9`)"*`?"0-!'412(G82`.%L`D``$B+`,9`)`)).6TH#X02`0`` -M387_#X0)`0``0?:%E@```!!T0$$/MD8S08B'D@```$'VA[$````"="I!#[9% -M,$2)XD$XQ`]'T(32=!A)B[^H````2(7_=`P/MM))C79`Z`````"`?"0-"W=< -M#[9$)`W_),4`````0<:'L@````'IGP```(!\)`X$=12`?"0/`G4-0<:'L@`` -M`!'IA````$'&A[(````"ZWI!QH>R````$.MP0<:'L@````OK9D'&A[(````& -MZUQ!QH>R````#>M29I`\*'4G00^VA"2#````@^@!08B$)((```!(B=A(`X6P -M"0``2(L`QD`D@>LE/`AU"K\0)P``Z`````!(B=A(`X6P"0``2(L`QD`D(69F -MD&9FD$B+7"0H2(ML)#!,BV0D.$R+;"1`3(MT)$A,BWPD4$B#Q%C#9F9FD&9F -MD&9FD&9FD$%7059!54%455-(@>RH````2(G]2(E\)'`/MX>R$@``9HF$)(`` -M``!(BP>+@$`!``")!0````!F)?\/9HF'LA(``&8[A"2`````=7%(BP>+L%`! -M``")-0````!(BP>)L%`!``"X`````/?&`/__``^$!`D``$C'QP````"X```` -M`.@`````2(M\)'#H`````+@!````Z=\(``!F9I!F9I!(BT4`BX!``0``B04` -M````9B7_#V:)A;(2``#K)$B-EP@!``!(B50D:$B-CZ`/``!(B4PD8$B-M_@` -M``!(B70D6$B+A9@1``"+`(D%``````^WC;(2```E_P\```^WT3G0=9UF@?G_ -M#P^%P@<``.G2!P``3(N%.!$``&:#A"2``````0^WA"2`````9CN%MA(``+@` -M````#[>4)(`````/0]!FB90D@````$B+E9@1``!(@\($#[>$)(````"+#()! -MBD00?;!"`^$KP```$B+10"+D%`!``")%0````!(BT4`B9!0`0``]\(` -M__\`=&F`?4,`=&.)UO?&``$``'4NOP````#WQ@```0!T0.L?#[?7C4H(2(GP -M2-/XJ`%U%(U*$$B)\$C3^*@!=0?K'[\`````#[?'2(T4@$B-%)!(C9S5P`$` -M`$B%VW4=ZPR#QP$/MD5#9CGX=[9(BWPD<.@`````Z<4&``!(BWPD<.@````` -MB$,/Z;,&``!F9I")SF:!YO\/#[?&2&G0L`0``$V+1!`@2(T\Q0````!(BX6P -M"0``2`'X2(L82(7;#X5L`0``#[?VB?)(Q\<`````N`````#H`````&:#?6@` -M#X1;!@``QH0DGP````!F9I!$#[:T))\```!.C3SU`````$B+A;`)``!,`?A( -MBS!(A?8/A/D```!-:>:P!```3`.E.!$``$B+G=@0```/MDXE1`^VK"2?```` -M1(GJ2,?'`````+@`````Z`````!,B?A(`X6P"0``2(LXZ`````!!BXPD)`0` -M`$&+E"0@!```18N,)"P$``!%BX0D*`0``$2)[DC'QP````"X`````.@````` -M3(GP2,'@!D@!PXM#-(M[,$2+4RQ$BULH1(MC)$2+:R!$BW,<1(M[&(M+%(E, -M)'Q$BTL01(M##(M+"(M3!(LSB40D0(E\)#A$B50D,$2)7"0H1(ED)"!$B6PD -M&$2)="001(E\)`B+1"1\B00D2,?'`````+@`````Z`````"`A"2?`````0^V -MA"2?````9CM%:`^#%@4``.G!_O__D$'VP2`/A(@!``"`>R2!9I`/A5L!``#& -M0R0A#[=#,DC!X`-(`X6P"0``2,<```````^W2S*)R&;!Z`4E_P<``(/A'[H! -M````2(G62-/F2(GQ]]$AC(6X"0``#[=+,HG(9L'H!27_!P``@^$?2-/B]](A -M5(5L#[=S,DB+?"1@Z`````!(@[N``````'0/2(VS@````$B)[^@`````#[=3 -M(&:!^H4`#X?'````#[?"#[:$!6`(```\_P^$M````&:#^G]W(P^VP$B-%$!( -MC1202,'B!4@#E3@)``!(BT)0@'@(_P^5P.M9#[=#(&8]@0!W)@^WP`^VA`5@ -M"```2&G`R`\``$@#A8@)``!(BT`(@'@(_P^5P.LI#[=#(`^VA`5@"```2(T$ -MP$C!X`5(`X5@"0``2(N`B````(!X"/\/E<"$P'0N2(G>2(GOZ`````!(BX7X -M````2(E8"$B)`TB+1"182(E#"$B)G?@```#IGP,``$B+3"1H2(M1"$B-0Q!( -MB4$(2(E+$$B)4`A(B0+I?@,``(GP9L'H!40/M_!)8\8/M_9!B?=!@^ -M2(GOZ`````#I20(``$ACP@^VA`7F"```2(T4@$B-%)!(C;S5P`$``$V%P'0- -M0?;!`K@`````3`]$P/9'"@(/A%X!``!,B<+H`````$ECQHM$A6Q$B?E(T_BH -M`0^%]0$``(![)($/A8\````/MT,R2,'@`T@#A;`)``!(QP``````#[=+,HG* -M9L'J!8'B_P<``(/A'[@!````2-/@]]`AA)6X"0``#[=S,DB+?"1@Z`````!( -MB=Y(B>_H`````$B#NX``````=`](C;.`````2(GOZ`````!(BX7X````2(E8 -M"$B)`TB+="182(ES"$B)G?@```#I7`$``$B+A0@!``!(.T0D:'1?0;P````` -M08/$`4B+`$@Y1"1H=?)%A.1T1D&]`````$B+?"1HZ`````!(C4CP2(MT)&A( -MBU8(2(E&"$B),$B)4`A(B0)(.=FX`0```$0/1.A!@.P!=\```!( -MBT0D:$B+4`A(C4,02(M,)&A(B4$(2(E+$$B)4`A(B0))8]:X`0```$2)^4C3 -MX`F$E:P```#IM````$R)PN@`````2(N%"`$``$@[1"1H=%M!O`````!!@\0! -M2(L`2#E$)&AU\D6$Y'1"0;T`````2(M\)&CH`````$B-2/!(BW0D:$B+5@A( -MB48(2(DP2(E0"$B)`D@YV;@!````1`]$Z$&`[`%UR46$[75#@'LD@70]2(M$ -M)&A(BU`(2(U#$$B+3"1H2(E!"$B)2Q!(B5`(2(D"26/6N`$```!$B?E(T^`) -MA)6L````9F9FD&9FD`^WM"2`````9CFULA(```^%+OC__V:!O;(2``#_#W0C -M2(N%F!$``(L`B04`````)?\/```/MY6R$@``.=`/A<[W__](C84(`0``2#F% -M"`$``'1)2(G#2(G?Z`````!(C7#P#[=.,HG*9L'J!8'B_P<``(/A'[@!```` -M2-/@]]`AA)6L````N@````!(B>_H`````$@YG0@!``!UNDB)[^@`````N`$` -M``!(@<2H````6UU!7$%=05Y!7\-F9I!FD$B#["A(B5PD"$B);"003(ED)!A, -MB6PD($B+G_`(``!(BT,(1(LH1(DM`````$'WQ0```)!T>DB+0PA$B2CK<9!( -M@<.(%```2(L#BY!0`0``B14`````2(L#B9!0`0``A=)T//?"````$'0<2(L# -MQX!0`0``````$$B+`XN`4`$``(D%`````$B+`\>`4`$```$```!(B=_H```` -M`$$!Q(/%`8/]`G69ZQ=F9F:09F:00;P`````O0````#KBF9FD$6$Y`^5P$6% -M[0^5P@G0#[;`2(M<)`A(BVPD$$R+9"083(ML)"!(@\0HPV9FD&9FD$%7059! -M54%455-(@^PH28G\2(L'BY!0`0``B14`````2(L'B9!0`0``9F9FD&9FD/?" -M`/__``^$*`D``$&`?"1#``^$'`D``,9$)!``B=)(B50D"$0/MFPD$$&-30A( -MBT0D"$C3^*@!=11!C4T02(M$)`A(T_BH`0^$T0@``(!\)!`#=BM)BP0D2`6` -M`0``0HT4[0````!(8])(`="+`(D%`````,'H$X/@`>LI9F:028L$)$@%@`$` -M`$*-%.T`````2&/22`'0BP")!0````#!Z!.#X`&$P'0F3(GGZ`````!)8]5( -MC0122(T$@D&!C,3L$@`````(`&9F9I!F9I!)BQ0D@'PD$`-V)4*-!.T````` -M2)A(C80"@`$``(L`B04`````)0```0#K(V9F9I!"C03M`````$B82(V$`H`! -M``"+`(D%`````"4```$`A?H`````+^@A@$`Z`````"Z`"TQ`>L%ND!+3`!)8\5(C0Q` -M2(T,B$C!X0-*C30AB9;P$@``2,>&`!,````````/MD0D$$B-%$!(C12028V4 -MU+@2``!(B98($P``28VT#/`2``!)BWPD*.@`````9F:0@'PD$`-V/4*-%.T` -M````2&/228L$)$@%@`$``$@!T(L`B04`````28L$)$@%@`$``$@!PHL"B04` -M````P>@'@^`!ZSM"C13M`````$ACTDF+!"1(!8`!``!(`="+`(D%`````$F+ -M!"1(!8`!``!(`<*+`HD%`````,'H!X/@`83`='6`?"00`W8W0HT,[0````!( -M8\E)BP0D2`6$`0``2`'(BP")!0````!)BQ0D2('"A`$``$@!T0T```$`B0'K -M/D*-#.T`````2&/)28L$)$@%A`$``$@!R(L`B04`````28L4)$B!PH0!``!( -M`=$-```!`(D!ZR^`?"00`W8H28L$)$@%@`$``$*-%.T`````2&/22`'0BP") -M!0````#!Z!*#X`'K)DF+!"1(!8`!``!"C13M`````$ACTD@!T(L`B04````` -MP>@2@^`!A,`/A"("``"`?"00`W8W0HT,[0````!(8\E)BP0D2`6``0``2`'( -MBP")!0`````-```$`$F+%"1(@<*``0``2`'1B0'K-4*-#.T`````2&/)28L$ -M)$@%@`$``$@!R(L`B04`````#0``!`!)BQ0D2('"@`$``$@!T8D!26/%2(T4 -M0$B-%)!)BX34R!(``$B%P'0328G%2(-X0``/A:(```#IA`$``(!\)!`#=DI" -MC13M`````$ACTDF+!"1(!8`!``!(`="+"(D-`````$F+!"1(!8`!``!(C00" -MB0A)BP0D2`6``0``2`'"BP*)!0````#IT`,``$*-%.T`````2&/228L$)$@% -M@`$``$@!T(L(B0T`````28L$)$@%@`$``$B-!`*)"$F+!"1(!8`!``!(`<*+ -M`HD%`````.F&`P``9I!(BTA`#[=!3@^WT/;&`0^%TP```$B)S?;"`@^$QP`` -M`(/@_6:)04Y(C;'`````28M\)"CH`````,9$)!``@'T[`'1WQD0D$``/MD0D -M$$B+7,582(7;=%1(BU-`2(72=!9)B[0D\`@``+\%````Z`````"`2TP"2(G: -MO@8```!,B>_H`````("[@P````!T')!,B>?H`````+\!````Z`````"`NX,` -M````=>6`1"00`0^V1"00.$4[=X['A<````!`2TP`2,>%T`````````!(B:W8 -M````2(VUP````$F+?"0HZ`````"`?"00`W8R28L$)$@%@`$```^V5"002,'B -M`X'B^`<``$@!T(L`B04`````P>@(@^`!ZS!F9I!F9I!)BP0D2`6``0``#[94 -M)!!(P>(#@>+X!P``2`'0BP")!0````#!Z`B#X`&$P`^$%@$``(!\)!`#=BQ) -MBP0D2`6``0``#[94)!!(P>(#@>+X!P``2`'0BP")!0````"#\`&#X`'K*DF+ -M!"1(!8`!```/ME0D$$C!X@.!XO@'``!(`="+`(D%`````(/P`8/@`83`#X2Q -M````#[9$)!!(C11`2(T4D$F-E-2P$@``3(UZ"$F+1Q!(A<`/A(L```!)B<9( -MC7)`28M\)"CH`````$&`?@X`=%%!O0````!)C6Y@D$B)[^@`````2(G#2(M% -M"$B)70A(B2M(B4,(2(D82(M30$B%TG0628NT)/`(``"_!0```.@`````@$M, -M`D&#Q0%%.&X.=[I!QT`$G'1T@`````38E_4$F-=SA)BWPD*.@````` -M@'PD$`,/AG\````/MEPD$$C!XP.!X_@'``!)BP0D2`6``0``2`'8BQ")%0`` -M``!)BP0D2`6``0``2(T$`XD028L$)$@%@`$``$B-!`.+`(D%`````$F+!"1( -M!3`"``!(C00#QP``````OQ`G``#H`````$F+!"1(!30"``!(`<.+`XD%```` -M`.M]#[9<)!!(P>,#@>/X!P``28L$)$@%@`$``$@!V(L0B14`````28L$)$@% -M@`$``$B-!`.)$$F+!"1(!8`!``!(C00#BP")!0````!)BP0D2`50`@``2(T$ -M`\<``````+\0)P``Z`````!)BP0D2`54`@``2`'#BP.)!0````"`1"00`0^V -M1"0003A$)$,/A_#V__])BP0DBY!0`0``B14`````28L$)(F04`$``/?"`/__ -M`'0FZ:7V__]F9I!FD$ECU4B-!%)(C02"08&,Q.P2``````$`Z>CW__^X```` -M`$B#Q"A;74%<05U!7D%?PT%7059!54%455-(@^QH28G]0(AT)$M`#[;&B40D -M3$B82(T40$B-%)!(C1373(NZR!(```^VJL(2``!(BP=`@/X#=@S'@'`!``#$ -M`0``ZPK'@'`!``"H`0``2(E$)&!(!70!``!(B40D4$B+5"1@BX)T`0``B04` -M````BTPD3(/A`[L'````T^-!B=Q!"<1$B:)T`0``O^@#``#H`````/?31"'C -M2(M,)&")F70!``"`?"1+`W95BT0D3,'@`DB82(V4`=`!``"+`HD%`````(/( -M"(D"BUPD3,'C`TACVTB-A!D``@``QP`X````OQ`G``#H`````$B+5"1@2(V$ -M&@0"``#'``````#K6(M$)$S!X`)(F$B+3"1@2(V4`=`!``"+`HD%`````(/( -M"(D"BUPD3,'C`TACVTB-A!D``@``QP`X````OQ`G``#H`````$B+5"1@2(V$ -M&@0"``#'``````!-A?\/A%<(``!!@'U#`'0LNP`````/MLM!#[9'#4C3^*@! -M=`^Z`0```(G.3(GOZ`````"#PP%!.%U#=]E!]D<*`71G3(G^3(GOZ`````"+ -M="1,3(GOZ`````!(8T0D3$B-%$!(C12028V4U>`2``"+0@BI```0`'0()?__ -M[_^)0@A,B?Y,B>_H`````$AC1"1,2(T40$B-%)!)QX35R!(```````#IM@<` -M`$&`?U@`=!1)B[VP$```3(G^Z`````!!@&]8`4C'P/[___\/MDPD3$C3P$`@ -MZ(A$)%L/A+T"``"+="1,3(GOZ`````!(8T0D3$B-%$!(C12028V4U>`2``"+ -M0@BI```0`'0()?__[_^)0@@/MD0D6T&(1PU!@'U#``^$[P$``,=$)%P````` -M#[;02(E4)#!(BTPD8$B!P0`"``!(B4PD*$B+1"1@2`4$`@``2(E$)"`/ME0D -M6XE4)!Q(BTPD8$B!P=`!``!(B4PD$$0/MG0D7$$/MNY(BT0D,(GI2-/XJ`$/ -MA$T!``!(8\5(C11`2(T4D`^V1"1;08B$U<(2``!!@/X##X:5````C1SM```` -M`$ACVTB+1"0H2`'8QP`X````OQ`G``#H`````$@#7"0@BU0D'(D32(M,)&#' -M@7`!``#$`0``2(M4)%"+`HD%`````(GI@^$#NP<```#3XT&)W$$)Q$2)(K_H -M`P``Z`````#WTT0AXTB+3"10B1F-%*T`````2&/22`-4)!"+`HD%`````(/( -M"(D"Z98```"-'.T`````2&/;2(M$)"A(`=C'`#@```"_$"<``.@`````2`-< -M)""+1"0"<`$``*@!``!(BTPD4(L!B04`````B>F#X0.[!P`` -M`-/C08G<00G$2(M$)%!$B2"_Z`,``.@`````]]-!(=Q(BU0D4$2)(HT4K0`` -M``!(8])(`U0D$(L"B04`````@\@(B0*#1"1<`4&-1@%!.$5#=BSI@_[__TB) -MW^@`````2(UPR$B+4PA(B4,(2(D82(E0"$B)`DB#>-@`=!'K";X`````28U? -M2$DY7TAURDB%]G0XQD9:`$&`?4,`="VY`````+H`````00^V1PU(T_BH`70. -M#[;"B$P&<(!&6@&#P@&#P0%!.$U#=]VZ`````+Z!````3(G_Z`````!(8T0D -M3$B-%$!(C1202<>$U<@2````````08!]0P`/A9\#``#IP@0``+H`````O@8` -M``!,B?_H`````(MT)$Q,B>_H`````$AC1"1,2(T40$B-%)!)C935X!(``(M" -M"*D``!``=`@E___O_XE""$F-1TA).4=(#X0``@``2(D$)$B+/"3H`````$R- -M<,A(C5`02#E0$`^$PP$``$F-1DA(B40D"$B+?"0(Z`````!(C5CP@'M)#747 -M2(VP4`$``$B+0U!(BP!(BW@HZ`````!(BQ-(BT,(2(E""$B)$("[@P````!T -M'6:03(GOZ`````"_`0```.@`````@+N#`````'7E2(M#0$B%P`^$*@$``$C' -M0&``````@+N#``````^$IP```&9!@WUH``^$FP```+T`````0;P`````3(G@ -M20.%L`D``$B+,$B%]G1J#[=&(&8[0SAU8&8]A0!W6@^WP$&`O`5@"```_W1, -M28M5``^W1C)FP>@%#[?`C02%``,``(F"<`$``$F+50`/MTXR@^$?N`$```!( -MT^")@G0!``#&1B0AN@````!,B>_H`````&9FD&9FD(/%`4F#Q`A!#[=%:#GH -M#X]P____]D-,!'493(GOZ`````!(BW-`N@$```!,B>_H`````$B+0T`/ME`" -M#[9P`4C'QP````"X`````.@`````2(M30$F+M?`(``"_`0```.@`````2(M3 -M0$F+M?`(``"_!@```.@`````2,=#0`````!!@&\.`4&`;E@!2(G>3(GOZ``` -M``!(BU0D"$DY5D@/A4;^__]!@&\H`4R)]DR)[^@`````2(L,)$DY3T@/A03^ -M__])C4=@23E'8`^$$`$``+T`````28G$2LHB<5,B>_H`````+\!````Z`````"`NX,` -M````=`N#Q0&!_8&6F`!UVDB+0T!(A<`/A(\```!(QT!@`````/9#3`1U&4R) -M[^@`````2(MS0+H!````3(GOZ`````!(BU-`#[:"S````(T$@`^V4@(!T$B8 -M00^V#`9!#[95.D$/MG4Y2,?'`````+@`````Z`````!(BU-`28NU\`@``+\! -M````Z`````!(BU-`28NU\`@``+\&````Z`````!(QT-``````$&`;PX!2(G> -M3(GOZ`````!-.6=@#X7__O__3(G^3(GOZ`````!(8T0D3$B-%$!(C1202<>$ -MU<@2````````Z5;\__]!OP`````/MD0D6TB)1"1`2(M4)&!(@<+0`0``2(E4 -M)#A%B?Y!#[;O2(M$)$")Z4C3^*@!=0M$.'PD2P^%U0```$&`_@-V:$B+1"1@ -MQX!P`0``Q`$``$B+5"10BP*)!0````")Z8/A`XT,2;L'````T^-!B=Q!"<1$ -MB2*_Z`,``.@`````]]-$(>-(BTPD4(D9C12M`````$ACTD@#5"0XBP*)!0`` -M``"#R`B)`NMG2(M$)&#'@'`!``"H`0``2(M4)%"+`HD%`````(GI@^$#C0Q) -MNP<```#3XT&)W$$)Q$2)(K_H`P``Z`````#WTT$AW$B+3"101(DAC12M```` -M`$ACTD@#5"0XBP*)!0````"#R`B)`D&#QP%!C48!03A%0P^'^?[__TB#Q&A; -M74%<05U!7D%?PV9F9I!F9F:09F:09F:005154TF)_$B)]0^V=T-`A/9T)@^V -M50V[`````/;"`70.ZQ9(B=")V4C3^*@!=0^#PP%`./-U[.L%NP````#V10P" -M=0I(C45@2#E%8'5H2(GOZ`````"$P'113(GGZ`````!(B<9(A_H`````.L+#[;S3(GGZ`````!;74%@4@^`!A,!U"H/#`6:!^RP!=:A$B?9(B>_H`````$B)[^@`````26/& -M2(T40$B-%)!(C435`/:`P1(```%T#TB+L,@2``!(B>_H`````%M=05Q!74%> -MPV:0059!54%455-!B?5)B?Q$#[;V26/&2(T40$B-%)!(BZS7R!(``$B%[0^$ -ME@$``$C'P/[___]$B?%(T\"$10T/A8`!``!(C45(2#E%2'450;T`````2(U= -M8(!]#@!U(^GS`@``0`^VQDB-/$!(C3RX28V\_+@2``#H`````.G5`@``2(G? -MZ`````!(B<%(BT,(2(E+"$B)&4B)00A(B0B`>4D`#X4)`0``#[=!.$F#O,1@ -M!````'4+2(-Y0``/A-D````/MT$X28N$Q&`$``!(@[B```````^$IP```,:! -MZ``````/ME%(2(G0@^`&2(/X!G4M]L(!="C&04H%QD%+!`^VD8$```!(BW%8 -M2(MY4.@`````Z9@```!F9F:09F:0#[912$B)T(/@!DB#^`1U(/;"`70;QD%* -M`\9!2P1(B?H`````.MG9F:09F:0#[912$B)T(/@!DB#^`9U4?;"`75, -MQD%+!L9!2@5FQX'(``````!(B?H`````.LN2(M10$F+M"3P"```OP0` -M``#H`````.L6#[=1.$F+M"3P"```OP(```#H`````$&#Q0%$.&T.#X:7`0`` -MZ;W^__]"C02U`````$ACZ+L`````OQ`G``#H`````$&`_0-V'4F+!"1(!=`! -M``!(`>B+`(D%`````,'H%(/@`>L;28L$)$@%T`$``$@!Z(L`B04`````P>@4 -M@^`!A,!U"H/#`6:!^RP!=:I$B?9,B>?H`````$R)Y^@`````26/&2(T40$B- -M%)!)BZS4R!(``$B%[0^$_0```$&`?"1#`'0LNP`````/MLL/MD4-2-/XJ`%T -M#[H`````B?H`````(/#`4$X7"1#=]E!#[;%2(T40$B-%)!)C934N!(` -M`$B)52!(C45(2#E%2'4X2(U%8$@Y16!U+NM[9F:09I!(B=_H`````$B-<,A( -MBU,(2(E#"$B)&$B)4`A(B0)(@WC8`'01ZPF^`````$B-74A(.5U(=@4@^`!ZRVY```` -M`$F+`$@%T`$``$B-%(T`````@>+\`P``2`'0BP")!0````#!Z!2#X`&$P'00 -M#[;Q1(G*3(G'Z`````#K"P^V\4R)Q^@`````2(/$",-F9F:09F9FD$%7059! -M54%455-(@^P(2(GS28G^3(NGB````$F++"1!]D0D#!!T!,9'409!#[9&43P! -M='D\`7(5/`0/A)D````\!@^%2`,``.FZ`0``0<9&40%,B?9(B>_H`````,9# -M)(%!@$PD#`A(@[N``````'0/2(VS@````$B)[^@`````2(V5^````$B+A?@` -M``!(B5@(2(D#2(E3"$B)G?@```!(B>_H`````.GC`@``08!D)`SW08!&4@%! -MQD91`,9#)`)(B=Y(B>_H`````$B)[^@`````Z;<"``!!#[9$)`R#X/>#R!!! -MB$0D#$&+E@@!``"-0@%!B88(`0``@_H"#X<#`0``2(.[@`````!T#TB-LX`` -M``!(B>_H`````$B-E?@```!(BX7X````2(E8"$B)`TB)4PA(B9WX````08!^ -M0@!U&$&_`````$V-;"1@08!\)`X`=1[IG@```+H`````O@(```!,B>?H```` -M`&:0Z1L"``!,B>_H`````$B)PTF+10A)B5T(3(DK2(E#"$B)&$B+4T!(A=)T -M%4B+M?`(``"_!0```.@`````@$M,`DB)VKX&````3(GGZ`````"`NX,````` -M=")F9F:09F:02(GOZ`````"_`0```.@`````@+N#`````'7E08/'`44X?"0. -M#X=[____3(GWZ`````#IB0$``$&`9"0,]T''A@@!````````2(.[@`````!T -M#TB-LX````!(B>_H`````$B-E?@```!(BX7X````2(E8"$B)`TB)4PA(B9WX -M````N@````"^!@```$R)Y^@`````28U$)&!).40D8'1\28G%3(GOZ`````!( -MB<-(BT!`2(7`=%-(QT!@`````$B)[^@`````2(MS0+H!````2(GOZ`````!( -MBU-`2(NU\`@``+\!````Z`````!(BU-`2(NU\`@``+\&````Z`````!(QT-` -M`````$B)WDB)[^@`````33EL)&!UATR)]DB)[^@`````2<=$)$``````2(M% -M`(N06`$``(D5`````(72=`I(BT4`B9!8`0``0?9$)`H!=&N`?4,`="RY```` -M`$'V1"0-`705ZQUF9I!F9I!!#[9$)`U(T_BH`74/@\$!.$U#=^OK!;D````` -M#[;9B=Y(B>_H`````$R)YDB)[^@`````2&/;2(T$6TB-!(-(QX3%R!(````` -M``!F9I!FD$B#Q`A;74%<05U!7D%?PY!(@^PH2(E<)`A(B6PD$$R)9"083(EL -M)"!(B?-(B?U,BV]038ME``^W3C*)R&;!Z`4/M_!(8\9!BT2$;(/A'TC3^*@! -M#X5G`P``28L4)(T$M0`#``")@G`!``!)BP0DBY!T`0``B14`````QD,D(8M# -M."7___\`/>$!#P!U(TB)W^@`````N@````!(B=Y,B>?H`````.D6`P``9F:0 -M9F:0B=`/MTLR@^$?2-/XJ`%T$$B)W^@`````3(GGZ``````/MH7H````/`0/ -MA^$"```/ML#_),4`````QH7H`````;H!````2(G>3(GOZ`````#INP(``,:% -MZ`````*Z"````$B)WDR)[^@`````Z9\"``#&A>@````#2(GJOB$```!,B>_H -M`````$B+=5A(A?9T'P^VE8$```!!N`````"Y`0```$R)[^@`````Z6`"``!! -M#[9U#;H`````3(GGZ`````#I20(``,:%Z`````1(@WU8`'0S2(GJOB$```!, -MB>_H``````^VE8$```!(BW580;@`````N0(```!,B>_H`````.D(`@``N@`` -M``"^(0```$R)[^@`````00^V=0VZ`0```$R)Y^@`````Z=\!``"`?4K_=!5( -MB>J^!@```$R)[^@`````Z<0!``!(B>J^!@```$R)[^@`````2(M-0$B%R702 -MBU$$C4(!B4$$@_H%#X:9`0``QD5+`<9%2@"`O8,`````=!M,B>?H`````+\! -M````Z`````"`O8,`````=>5(@WU8`'092(M5$$B+11A(B4((2(D02(M%6(!H -M6`'K&4B+56!(A=)T$`^VA8$```!(QT3"6`````!(BU4`2(M%"$B)0@A(B1!! -M@&T.`4B+O2`!``!(A?]T$0^VM0T!``"Z`0```.@`````2(M]6$B%_W01#[:U -M@0```+H!````Z`````!(BT5`2(7`=')(QT!@`````$R)Y^@`````2(MU0+H! -M````3(GGZ`````!(BT5`#[90`@^V<`%(Q\<`````N`````#H`````$B+54!) -MB[0D\`@``+\!````Z`````!(BU5`28NT)/`(``"_!@```.@`````2,=%0``` -M``!(B>Y,B>?H`````$&`?0G_=%R]`````$&`?0X`=#F]`````$F-76!F9F:0 -M9F:02(G?Z`````!(BU,(2(E#"$B)&$B)4`A(B0*`>$K_=0F#Q0%!.&T.=]=! -M.&T.=Q%!QD4)_TR)[DR)Y^@`````D$B+7"0(2(ML)!!,BV0D&$R+;"0@2(/$ -M*,-F9F:09F:005=!5D%505154TB#[&A)B?](BX>(````2(E$)&!(BRA(BX68 -M$0``1(LP2(G^2(GOZ`````!!@']2`78%0<9'401)C5\H23E?*`^$4P$``$B) -MW^@`````2(E$)%A)BT4&3`'KBT,TBWLP1(M3+$2+6RA$BV,D1(MK((M3'(E4 -M)$R+2QB)3"10BU,4B50D5$2+2Q!$BT,,BTL(BU,$BS.)1"1`B7PD.$2)5"0P -M1(E<)"A$B60D($2);"08BUPD3(E<)!"+?"10B7PD"(M$)%2)!"1(Q\<````` -MN`````#H`````&:#?6@`=3OIZP$``$B+5"1@2(M"(`^V34$/ME4Z#[9U.4&Y -M____`$0/MD`(2,?'`````+@`````Z`````#I$0(``+L`````3(VEH`\``$R- -MK?@```!F9I!FD`^WPTC!X`-(`X6P"0``2(LP2(7V#X1V`0``#[=&(&9!.4=` -M#X5G`0``#[>5LA(``$$YUG10@\(!#[>%MA(``#G"N``````/0]"-0@%(P>`" -M2`.%F!$``(L`J0``"`!U(&8E_P]F.=AU%T@Y="18=15(B>_H`````.E\`0`` -M9F:01#GR=;`/MT8@9CV%`&9FD`^'^@````^WP("\!6`(``#_#X3I````2(M, -M)&"`>5@`#X7:````]D$*`0^$T````$B+50`/MT8R9L'H!0^WP(T$A0`#``") -M@G`!``!(BT4`#[=.,H/A'[H!````2(G72-/GB;AT`0``#[=&,DC!X`-(`X6P -M"0``2,<```````^W3C*)R&;!Z`4E_P<``(/A'TB)UTC3YTB)^??1(8R%N`D` -M``^W3C*)R&;!Z`4E_P<``(/A'TC3XO?2(52%;$@Y="18="=(BP9(BU8(2(E0 -M"$B)`DB+A?@```!(B7`(2(D&3(EN"$B)M?@````/MW8R3(GGZ`````!!@&]% -M`69F9I"#PP%F.5UH#X=C_O__2(M$)&#V0`H!=%%(BTPD6$B+$4B+00A(B4(( -M2(D02(G.3(G_Z`````#K,4B+7"1@2(M#(`^V34$/ME4Z#[9U.4&Y____`$0/ -MMD`(2,?'`````+@`````Z`````!(@\1H6UU!7$%=05Y!7\-F9F:09F9FD$%7 -M059!54%455-(@^PH28GX2(E4)"!,BR\/M_9(P>8#20.UL`D``$B++F:!?3CA -M`74N#[9%.H/H$3P!=R-,BW]`2,=$)!@`````2(72=6E!QD=1`$C'1"08```` -M`.M9D$F+C3@)``"X8)X!`&:!?2"%`'<<#[=%($$/MH0%8`@``$B-%$!(C120 -M2(G02,'@!4@!P4B)3"080;\`````2(-\)"``=1)(BT0D&,:`Z`````!!OP`` -M``"`?22!=05!@&`,]TB#?"0@``^%`@$``,9%)`#VA98````@#X2"!0``2(M% -M:$B%P`^$=04``$B)P_:`L0````)T'4B+N*````!(A?]T$4B+=4A(A?9T"(M5 -M-.@`````28N5"!$``$B!PD`(``!(BTPD&`^V07+!X`A(F$@!PHL"B04````` -MB<+!ZA"(DYL```#!Z!AFB8.0````28N5"!$``$B!PD0(```/MD%RP>`(2)A( -M`<*+$HD5``````^VPF:)@Y0````/ML9FB8.6````B=#!Z!`/ML!FB8.8```` -MP>H8B).:````28N5"!$``$B!PDP(```/MD%RP>`(2)A(`<*+`HD%``````^V -MP&:)@Y(```#ID00```^W13)(:<"P!```38NE.!$``$D!Q$F-G"0@!```@'TD -M@'4$QD4D(4B#?"08``^$F````$B+1"082(M00$B%TG1"#[:"S````(T$@`^V -M4@(!T$B8#[:(`````$$/ME4Z00^V=3E,BTPD($2+131(Q\<`````N`````#H -M`````.F#````BWTT2(M,)!A$#[:)@0```$F+0"!$#[9`"$$/MDU!00^V53I! -M#[9U.4B+1"0@2(E$)`B)/"1(Q\<`````N`````#H`````.L[387_=#9$BTTT -M28M`($0/MD`(00^V34%!#[95.D$/MG4Y2(M$)"!(B00D2,?'`````+@````` -MZ`````"+2P2+$P^W=3)$BTL,1(M#"$C'QP````"X`````.@`````0?9$)"(! -M='],C6583(NU@````$&+5"0$00^V="0!2,?'`````+@`````Z`````"`?5@` -M#X3R````NP`````/ML-(C01`2,'@`DF+5"0(2`'"20-&$(M*"$B+$@^V\T2+ -M2`A,BP!(Q\<`````N`````#H`````(/#`4$X'"0/AJ@```#KN6:008!\)"<` -M#XF8````#[=U,HGR9L'J!0^WT@^W]DC'QP````"X`````.@`````08N-P`D` -M`$&+E;P)``!!B[6X"0``18N%Q`D``$C'QP````"X`````.@`````#[=U,DC' -MQP````"X`````.@`````28M5``^W13)FP>@%#[?`C02%``,``(F"<`$``$F+ -M50`/MTTR@^$?N`$```!(T^")@G0!``!F@7TXX0%U&`^V13J#Z!$\`7<-3(G_ -MZ`````#I'@(```^V5"0C]L(!#X3N`0``BT4X)?___P`]X0$.``^$VP$``$F+ -ME0@1``!(@<)`"```2(M,)!@/MD%RP>`(2)A(`<)$BR)$B24`````28N5"!$` -M`$B!PD0(```/MD%RP>`(2)A(`<)$BS)$B34`````28N5"!$``$B!PD@(```/ -MMD%RP>`(2)A(`<*+&HD=`````$F+E0@1``!(@<),"```#[9!@0B(>;````1(G@P>@89HF'D````(G8 -MP>`(00^VU@'09HF'E````(G8L`!,B?$/MM4!T&:)AY8```")VL'J$,'B"$2) -M\,'H$`^VP`'"9HF7F````$F+E0@1``!(@<),"```2(M,)!@/MD%RP>`(2)A( -M`<*+,HDU`````$`/MO9FB;>2````#[>/E@````^WEY@````/M_9$#[>'E``` -M`$C'QP````"X`````.@`````28N5"!$``$B!PD`(``!(BTPD&`^V07+!X`A( -MF$@!PL<"`````.M:9H%]..$!=2(/MD4Z@^@:/`%W%TC'QP````"X`````.@` -M````QD4D(>LP2(GN3(GOZ`````#K(Y"$TGD>28M%`(N(6`$``(D-`````(7) -M=`I)BT4`B8A8`0``2(/$*%M=05Q!74%>05_#9F9FD&9F9I!F9F:09F:02(/L -M"`^V1CA(.7XH=4H\"'1E/"AT83RH=%T\B&9F9I!T53P*=%$\*G1-/*IF9F:0 -M=$4\BG1!2(N'^````$B)<`A(B09(C8?X````2(E&"$B)M_@```#K'TB+EP`! -M``!(B;<``0``2(V'^````$B)!DB)5@A(B3+H`````$B#Q`C#9F9FD&9F9I!F -M9F:09F:02(/L".@`````2(/$",-FD%-(@^Q@2(G[2(U,)%U(C50D7DB-="1? -M#[=_/$B-1"122(E$)#A(C40D5$B)1"0P2(U$)$Q(B40D*$B-1"1.2(E$)"!( -MC40D6$B)1"082(U$)%I(B40D$$B-1"1;2(E$)`A(C40D5DB)!"1,C4PD7$R- -M1"10Z``````/ME0D7P^V="1>2(U\)$CH``````^V1"1?2(T40$B-%)!(P>(% -M2(MS($B-NQ@)``"Y`0```.@`````#[94)%U(C1322,'B!4B+2&G2R`\``$B+(# -M2(MS($B-NV@*``"Y`0```.@`````#[94)%P/MT0D4$@/K]!(C1122,'B`DB+ -M(#2(MS($B- -MNS`+``"Y`0```.@`````#[=4)%A(`=)(BW,@2(V[>`\``+D!````Z``````/ -MME0D7T@!TDB+(+ -M2(MS($B-NZ@1``!!N`$```"Y"````.@`````2(MS($B-N]@1``!!N`$```"Y -M"````+H```@`Z``````/MU0D5DAITHP!``!(BW,@2('#"!(``$&X`0```+D( -M````2(G?Z`````"X`````$B#Q&!;PV9FD&:02(/L.$B)7"0(2(EL)!!,B60D -M&$R);"0@3(ET)"A,B7PD,$F)]TF)_4B+!TB)!"1,C6=(3(GGZ`````!(B<-, -MC7#(2(L\).@`````2(G%28M%4$F)75!-B68X28E&0$B)&+@!````2(7M='C& -M13CAQD4Y`<9%.A"`33L!28N'H````$B)16A(BT5P3(EX*$F-AY````!(B450 -MQD4ES$$/MD9;9HE%($F+10!(B44HQT4TD````$R)?4A(QX6@`````````$B- -M?5B^`````.@`````2(GN2(L\).@`````N`````!(BUPD"$B+;"003(MD)!A, -MBVPD($R+="0H3(M\)#!(@\0XPV9F9I!F9I!F9I!!5T%6055!5%532(/L&$B) -M_4C'1"00`````$B+1"00#[:4*.8(``"`^O\/A.H````/MLI(C02)2(T$@4B- -MA,7``0``2(E$)`@/MO)(8\9(C12`2(T4D("\U`#3(VT!2`"``!,C2PH2&/&2(T4@$B-%)!,C;S5P`$``$R) -M]^@`````2(G#28N%*`(``$F)G2@"``!,B3-(B4,(2(D82(M30$B%TG052(NU -M\`@``+\%````Z`````"`2TP"2(G:O@(```!(BWPD".@`````@+N#`````'0; -M2(GOZ`````"_`0```.@`````@+N#`````'7E08/$`44X9PX/AWO___](@T0D -M$`%(@WPD$`0/A>[^__](B>_H`````$B#Q!A;74%<05U!7D%?PV9F9I!F9I!F -M9I!F9I!!5T%6055!5%532(/L>$B)^\9'40#&1U``QD=/`,:':10```!(C9>X -M$@``N`````#&!!``2(/``4@]H`$``'7P2(V#^````$B)@_@```!(B8,``0`` -M2(V#"`$``$B)@P@!``!(B8,0`0``3(VC&`$``$R)HQ@!``!,B:,@`0``3(VK -M*`$``$R)JR@!``!,B:LP`0``2(V#.`$``$B)1"1(2(F#.`$``$B)@T`!``!( -MC8M(`0``2(E,)%!(B8M(`0``2(F+4`$``$R-LV@!``!,B;-H`0``3(FS<`$` -M`$B-LW@!``!(B70D0$B)LW@!``!(B;.``0``3(V[6`$``$R)NU@!``!,B;M@ -M`0``2(U,)&Y(C50D<$B-="1Q#[=[/$B-1"1R2(E$)#A(C40D=$B)1"0P2(U$ -M)&1(B40D*$B-1"1J2(E$)"!(C40D=DB)1"082(U$)&Q(B40D$$B-1"1M2(E$ -M)`A(C40D:$B)!"1,C4PD;TR-1"1FZ``````/MD0D<8A#1@^V1"1PB$-'#[9$ -M)&Z(@_$````/MT0D=F:)0V@/MT0D=&:)@[02```/MT0D(%2(72=!!(B`L``$B+DX`!``!(B8.``0`` -M2(M,)$!(B0A(B5`(2(D"@\4!#[9$)'%F.>AWPTB-NW@/``#H`````$B)@Y@/ -M``!(B8.@#P``#[=T)'9FB;.J#P``#[?V2(V[H`\``.@`````2(V[L`\``.@` -M````2(F#T`\``$B)@]@/```/MG0D<6:)L^(/```/M_9(C;O8#P``Z`````!( -MC;OH#P``Z`````!(B8,($```2(F#$!````^V="1N9HFS&A````^W]DB-NQ`0 -M``#H`````$B-NR`0``#H`````$B)@T`0``!(B8-($```#[9T)'!FB;-2$``` -M#[?V2(V[2!```.@`````2(V[6!```.@`````2(F#>!```$B)@X`0```/MD,^ -M9HF#BA````^V`A! -MQD`)`$B)F,`!``!!QD`.`,:`&`(```#&@.@!````QX!@`@```````$B-C!/P -M`0``2(F(\`$``$B)B/@!``!(C8P3"`(``$B)B`@"``!(B8@0`@``2(V4$R`" -M``!(B9`@`@``2(F0*`(``$'&0`H"@\$RV`$```````` -M2(G!2`.+.`D``$B-42!(B5$@2`.#.`D``$B-4"!(B5`H@\8!#[9$)'%F.?`/ -MAV____]FQX/L``````"X`````,:$&&`(``#_2(/``4@]A@```'7L@'PD<``/ -MA+T```"^``````^WQDAIP,@/``!(BY.("0``QD0"6`!(BY.("0``QD0060!( -MBY.("0``2,=$$!``````2(G!2`.+B`D``$B-41A(B5$82(G!2`.+B`D``$B- -M41A(B5$@2(G!2`.+B`D``$B-42A(B5$H2(G!2`.+B`D``$B-42A(B5$P2(N3 -MB`D``$R)1!`(2(G!2`.+B`D``$B-44A(B5%(2`.#B`D``$B-4$A(B5!0@\8! -M#[9$)'!F.?`/ATC____&@^\```"`@'PD;@`/A((```"^``````^WQDB-!,!( -MP>`%2(N38`D``&;'1`).!`!(BY-@"0``QD000@!(BY-@"0``QD001/](BY-@ -M"0``QD004/](B<%(`XM@"0``2(U1*$B)42A(B<%(`XM@"0``2(U1*$B)43!( -MBY-@"0``3(F$$(@```"#Q@$/MD0D;F8Y\'>#QH/P````@DB-L^`0``!(C;NX -M$```Z`````!(B8/8$```2(VS$!$``$B-N^@0``#H`````$B)@P@1``!(C;-` -M$0``2(V[&!$``.@`````2(F#.!$``$B-LW`1``!(C;M($0``Z`````!(B8-H -M$0``2(VSH!$``$B-NW@1``#H`````$B)@Y@1``!(C;/0$0``2(V[J!$``.@` -M````28G$2(F#R!$``$B+J]`1``"`?"1M`'120;T`````2(M\)$CH`````$R) -M8!!(B6@82(N30`$``$B)@T`!``!(BW0D2$B),$B)4`A(B0))@<0`"```2('% -M``@``$&#Q0$/MD0D;69$.>AWM$B-LP`2``!(C;O8$0``Z`````!)B<1(B8/X -M$0``2(NK`!(``$&]`````$B+?"10Z`````!,B6`02(EH&$B+DU`!``!(B8-0 -M`0``2(M,)%!(B0A(B5`(2(D"28'$```!`$B!Q0```0!!@\4!9D&#_0AUN$B- -MLS`2``!(C;L($@``Z`````!(B8,H$@``3(NC,!(``&:#?"1H`'1(2(G%0;4` -M3(G_Z`````!(B6@03(E@&$B+DV`!``!(B8-@`0``3(DX2(E0"$B)`DB!Q8P! -M``!)@<2,`0``08/%`69$.6PD:'>^2(/$>%M=05Q!74%>05_#9F9FD$%50515 -M4TB#[`A)B?U)B?1(BYZ(````#[961TB)_DB)W^@`````2(G%9D"1.$$&` -M?4,`=%FY`````/9##0%T#>M,#[9##4C3^*@!=0V#P0%!#[9%0V8YR'?H9H/Y -M`W8S28M%`$@%T`$``$B-%(T`````@>+\_P,`2`'0BP")!0````#!Z!2#\`&# -MX`'K,;D`````28M%`$@%T`$``$B-%(T`````@>+\_P,`2`'0BP")!0````#! -MZ!2#\`&#X`&$P'00#[;Q3(GOZ`````#IEP$``$B-0V!(.4-@#X09`0``2(7M -M#X00`0``#[:%@0```$G'1,18`````$B+50!(BT4(2(E""$B)$$B)ZKX&```` -M2(G?Z`````"`O8,`````=!M,B>_H`````+\!````Z`````"`O8,`````=>5( -MBT5`2(7`=$A(QT!@`````/9%3`1U"$R)[^@`````2(M50$F+M?`(``"_`0`` -M`.@`````2(M50$F+M?`(``"_!@```.@`````2,=%0`````"`:PX!2(GN3(GO -MZ`````!)BT4`BY!8`0``B14`````A=)T"DF+10")D%@!``!!QD0D0@!F08-D -M)$[O08!\)#L`="JZ``````^WPDF+1,182(7`=`J`>$K_#X5^````@\(!00^V -M1"0[9CG0=]M!@'PD3@!X#[T`````08!\)#L`=1'K2TR)YDR)[^@`````9I#K -M2@^WQ4F+7,182(7;="'V0TP"=!M(BU-`28NU\`@``+\&````Z`````"`8TS] -M9I"#Q0%!#[9$)#MF.>AWQ&9!QT0D3@(`08!D)$G]2(/$"%M=05Q!7<-F9I!F -M9I!F9I!!5T%6055!5%532(/L>$F)_TB)?"102(M'4$B)1"1P2(LH2(N%F!$` -M`$2+,$B)_DB)[^@`````08"_ZP````%V"$'&A^@````$28U'($C'1"1H```` -M`$DY1R!T*4F-7R!(B=_H`````$B)1"1H28M'($B+5"1H2(E0"$B)`DB)6@A) -MB5<@28-_0`!T4$&X____`$B#?"1H`'0*2(M,)&A$#[=!,DF+5T`/MH+,```` -MC02`#[92`@'02)@/MH@`````#[95.@^V=3E(Q\<`````N`````#H`````.M, -MO____P!(@WPD:`!T"4B+="1H#[=^,D4/MH^!````2(M4)'!(BT(@1`^V0`@/ -MMDU!#[95.@^V=3F)/"1(Q\<`````N`````#H`````$B#?"1H``^$S@,``$B+ -M3"1H1`^W:3)-:>6P!```3`.E.!$``$B+G=@0``!(B<_H`````$&+C"0D!``` -M08N4)"`$``!(BT0D:`^W<#)%BXPD+`0``$6+A"0H!```2,?'`````+@````` -MZ`````!)P>4&3`'KBT,TBWLP1(M3+$2+6RA$BV,D1(MK((M3'(E4)%R+2QB) -M3"1@BW,4B70D9$2+2Q!$BT,,BTL(BU,$BS.)1"1`B7PD.$2)5"0P1(E<)"A$ -MB60D($2);"08BT0D7(E$)!"+1"1@B40D"(M$)&2)!"1(Q\<`````N`````#H -M`````$R+9"1H28/$6$B+5"1H3(NJ@````$&+5"0$00^V="0!2,?'`````+@` -M````Z`````!!@'PD`0!T3KL`````9F9FD&9FD`^VPTB-!$!(P>`"28M4)`A( -M`<))`T40BTH(2(L2#[;S1(M("$R+`$C'QP````"X`````.@`````@\,!03A< -M)`%WOF:#?6@`#X0B`@``0;P`````3(VMH`\``$B-C?@```!(B4PD2$$/M\1( -MP>`#2`.%L`D``$B+&$B%VP^$WP$```^W0R!F03E'.`^%T`$```^WE;(2``!! -M.=9T;&9F9I"#P@$/MX6V$@``.<*X``````]#T(U"`4C!X`)(`X68$0``BP"I -M```(`'4X9B7_#V9$.>!U+D@Y7"1H=2Q(BT0D:`^W<#)(Q\<`````N`````#H -M`````$B)[^@`````Z9\!``!$.?)UF$B+5"1P@'I8``^%20$```^W0R!F/84` -M#X<[`0``#[?`@+P%8`@``/\/A"H!``!(@WPD4``/A`0!``!!#[9'2*@!#X3W -M````J`0/A.\```!(BU4`#[=#,F;!Z`4/M\"-!(4``P``B8)P`0``2(M%``^W -M2S*#X1^Z`0```$B)UDC3YHFP=`$```^W0S)(P>`#2`.%L`D``$C'```````/ -MMTLRB@%)?\'``"#X1](B=9(T^9(B?'WT2&,A;@)```/MTLRB@% -M)?\'``"#X1](T^+WTB%4A6Q(.UPD:'1%2(L32(M#"$B)0@A(B1!(@[N````` -M`'0/2(VS@````$B)[^@`````2(N%^````$B)6`A(B0-(BT0D2$B)0PA(B9WX -M````#[=S,DR)[^@`````08"O@P````'K&DB+5"1P]D(*`G0/2(G>3(G_Z``` -M``!F9F:008/$`69$.65H#X?W_?__2(-\)%``="M!#[9'2*@!="*H!'0>2(M, -M)&A(BQ%(BT$(2(E""$B)$$B)SDR)_^@`````2(/$>%M=05Q!74%>05_#D)"0 -MD)"0D)"0D)"0D)"02(M'4$R+"$&X`````$2-%!9##[:$"&`(```\_W1"#[;` -M2(T40$B-%)!(P>(%2(G020.!.`D``$`XL`X!``!U($@YN"`!``!U%T2(D`T! -M``!)BX$X"0``B(P"#`$``&:028/``4F!^(````!UI//#D$B+?U@/MH?````` -M/$]W,0^VP$B-!$!(P>`$`?*(E`?)````#[:'P````$B-!$!(P>`$B(P'R``` -M`("'P`````'SPV9F9I!F9F:09F:09F:00;C_____9H7V=$Q(B?I!N/____^_ -M`````&9F9I!F9I`/M@J-0=`\"7<;08#X_[@`````1`]$P$$/ML"-!(!$C41! -MT.L&08#X_W4,@\(%20.1.`D` -M`$@YNB`!``!U)4`XL@T!``!U'(3)=`Q(BX(8`0``28D#ZQE)BP-(B8(8`0`` -MZPU)@\`!28'X@````'6B3(G7N`````!F9I!F9I`/MI?(````@/H!=D2`^A=T -M/T`XM\D```!U-H3)=!9(F$B-!$!(P>`$28N$`M````!)B0/#2)A(C01`2,'@ -M!$F+$TF)E`+0````PV9FD&9FD(/``4B#QS"#^%!UI//#9I!!5D%505154TB# -M[!!)B?Y!B?%(B[\H`0``#[9'`L'@"`^V5P-$C00000^WP(/`!#T`"```#X_L -M````0(3V=$Q!#[:6$`$``+[@____(=8/MDM*#[97`;[@ -M____(=9!#[:&$`$``(/@#XG1@^$0"?`)R+X(````(=:#X/.)T8/A!`GP"E,B>I,B??H`````$B+1"0(2(/` -M!$B)1"0(@\,!3#G@O0````!,C6X$#[:#R````#P!=D$\%W0]1#BCR0```'4T -M00^V5P-(8\5(C01`2,'@!$F-O`;8````@/H@N"`````/1]`/MM),B>[H```` -M`&9FD&9FD(/%`4B#PS"#_5!UJ$B#Q`A;74%<05U!7D%?PV9FD&:02(/L2$B) -M7"082(EL)"!,B60D*$R);"0P3(ET)#A,B7PD0$F)_$&)UXG+3(D$)$"(="0/ -M2(M'4$R+,$R)]^@`````2(G%2(7`#X3V````3(GWZ`````!)B<5(A$F+11!(B45(BU0D"(E5 -M-$F-A"3L````2(E%4,9%,"!(QX6@`````````,9%.#S&13D"#[9$)`^(13I$ -MB?C!Z!"(13M,B?H/ML:(13Q$B'T]#[9%-HA%/@^V136(13\/MD0D"(A%0,9% -M00"^`````$B+?"00Z`````"+531)BW482(M\)!#H`````$B)[DR)]^@````` -M2(M<)!A(BVPD($R+9"0H3(ML)#!,BW0D.$R+?"1`2(/$2,-F9F:02(/L.$B) -M7"0(2(EL)!!,B60D&$R);"0@3(ET)"A,B7PD,$F)_$B+1U!,BSA(BY$F+1"002(E%2,=%-``(``!)C87L````2(E%4,9%,"!(QX6@```` -M`````,9%.!S&13D!1(A].L9%.PC&13P`O@````!(B=_H`````(M5-$F+="08 -M2(G?Z`````!(B>Y,B??H`````$B+7"0(2(ML)!!,BV0D&$R+;"0@3(MT)"A, -MBWPD,$B#Q#C#D$%7059!54%455-(@^P82(D\)$B+3D@/MD$"P>`(#[91`XT\ -M$`^WQX/`!`^W5C0YT`^/6@$``$R-:0@/M\=,C70!!$R);"0(0;P`````QT0D -M%`````!-.?4/@]D```!FD`^V1"04B$0D$T$/MD4"P>`(00^V50-$C3P000^W -M]TB+?"0(2(/'!.@`````B<$\_W5>00^WQTB+7"0(2(U4`P1(B=-).=8/AL\` -M``!!B7^__\/ME0D$TR)[DB+/"3H```` -M`.NI9I!(@\086UU!7$%=05Y!7\.005=!5D%505154TB#[`A)B?Y(BTY(#[9! -M`L'@"`^V40,!T`^WP(/`!`^W5C0YT`^/#`$``$B-40@/MG$!QD0D`P"Y```` -M``^V0@(`1"0##[9"`TB-5`($@\$!0#C.<^>`?"0#``^$O@```$B-:@1!OP`` -M``!!O0````#'1"0$``````^V5?U!`=4/MD7\/`%T!#P7=3M$B>LHTT$XW79Q -M#[9$)`2#P`%$#[;@9F:09I`/MDW\#[;S1(GB3(GWZ`````"#PP%$..MT1NOD -M9F9FD$F+1EB`N,$````!=#-$B>LHTT$XW78I#[9$)`2#P`%$#[;@#[9-_`^V -M\T2)XDR)]^@`````@\,!1#CK=>9F9I!!@\Y,B??H```` -M`.F)````2(U=6,9%):Q!#[=$)#AFB44@3(EU*,>%E`````@```!,B6UX28M% -M$$B)14C'130`"```28V$).P```!(B450QD4P($C'A:``````````QD4X',9% -M.0'&13H"QD4[",9%/`"^`````$B)W^@`````BU4T28MU&$B)W^@`````2(GN -M3(GWZ`````!(BQPD2(ML)`A,BV0D$$R+;"083(MT)"!(@\0HPV9F9I!F9I!( -M@^P82(D<)$B);"0(3(ED)!!(B?-)B?Q(BVYH#[=.(&:!^84`#X>E````#[?! -M#[:T!V`(``!`@/[_#X20````9H/Y?W`!T#$B-?H```` -M`$B)WDR)Y^@`````QT50_____TB)[_]52.MS9F:0A,!U.?:#E`````AT$TB+ -M?3"+4S1(BW-(Z`````!F9I#'15``````2(M5.$B%TG0%BT4@B0)(B>__54CK -M$\=%4/____](B>__54AF9I!F9I!(@WMX`'0,2(US>$R)Y^@`````2(G>3(GG -MZ`````!FD$B+'"1(BVPD"$R+9"002(/$&,-F9F:09F:09F:09F:02(/L*$B) -M7"0(2(EL)!!,B60D&$R);"0@2(GS28G\1`^V;B0/MT8@9CV%`'`%ZPQ(BX\X"0``N&">`0!(C2P! -M183M=2!FQX7(``````"`>S@<=1&`>SH"=0M(B=Y(B>_H`````$B#>W@`=`Q( -MC7-X3(GGZ`````!(B=Y,B>?H`````$&`_09T/4B-G6`!``!)BWPD*$B)WN@` -M````QX5@`0``@(0>`$C'A7`!````````2(FM>`$``$F+?"0H2(G>Z`````!( -MBUPD"$B+;"003(MD)!A,BVPD($B#Q"C#D$%7059!54%455-(@^P(28G_08G6 -M2(M'4$B+*$&\`````$R-;@Q!#[:$+&`(```\_W12#[;`2(T40$B-%)!(B=-( -MP>,%2(G?2`.].`D``$B!Q]0```"Z"````$R)[N@`````A,!T'DB+A3@)``!$ -MB+0##@$``$B+A3@)``!,B;P#(`$``$F#Q`%)@?R`````=91(@\0(6UU!7$%= -M05Y!7\-!5T%6055!5%532(/L&$B)?"0(2(M.2`^V00+!X`@/ME$#C3P0#[?' -M@\`$#[=6-#G0#X_F````2(U9"`^WQTB-3`$$2(E,)!!)B=U(.=D/AKH```!! -MO@````!F9I!F9I!$B?(/M@N$R0^(A0```(G(@^`//`9U?/9#`\!T!O9#!Y( -MBWPD".@`````2(/%'$&#Q`%$.&,"=^(/MD,!28U"A(B=[H`````,>%8`$``("$'@!(QX5P`0```````$B)K7@! -M``!(BT502(L`2(MX*$B)WN@`````QD5*_TN-!+])C02'2(M4)!"`O,+.`0`` -M``^$DP$``$&\`````$N-!+])C02'2,'@`TR-M`(@`@``2(T<$$R-J\`!``!, -MB??H`````$B)Q4B+@R@"``!(B:LH`@``3(EU`$B)10A(B2B`?4K_#X26```` -M@'U)``^%EP```$B)[H"]Z0`````/A%$B+?"00Z`````!(BW0D"$B+ -M?"00Z`````"`?"0G`'1M#[>%R````(/``6:)A<@```!F@_@*=@YFQX7(```` -M``#IQ?W__[X*````2(GOZ`````#K.4B+1"001`^VN.4)``!+C02_28T$ATB+ -M5"002(V$PL`!``!(B40D&$B+BC@)``"X8)X!`.F?_/__D$B#Q"A;74%<05U! -M7D%?PY!(A?]T2TB%]G1&2(72=$%(A6:!_R(A9I!T<&:!_U`'=6]F9F:09F:0ZV!F@?]$(719 -M9H'_1"%FD')69BT0)V:#^`%W3&9F9I#K0&:!_X(G=#EF@?^")V:0=Q)F@?\D -M)W0I9H'_@"=FD'4FZQYF@?^`D69F9I!F9I!T$&:!_X"4=`EF@?^``%2(N$$(@```!$#[9`"&9F9I!F -M9I!!#[;!2(N/.`D``$$XV'4C#[?`2(T40$B-%)!(P>(%#[9$"DBH`70+J`1T -M![@!````ZQ=!@\,!28/""&9!.?,/A0[___^X`````%M=PV9FD$B+1U!,BQ!- -MBYK8$```10^W2FBY`````$&X`````.M##[?Q28N"L`D``$B+%/!(A=)T+8M" -M."7___\`/>$!$`!T'@^W1SAF.T(@=11(B?!(P>`&9D8Y1!@(=`YF9I!FD(/! -M`69$.P"0``3(L$T$V% -MP'0K#[:W[@```$$/MD`EB?'3X`^W^$$/M]&X__\``-/@(<(YU[@`````3`]% *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 00:36:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 265BE126; Sat, 25 Apr 2015 00:36:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 131B7178F; Sat, 25 Apr 2015 00:36:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3P0ahm3028156; Sat, 25 Apr 2015 00:36:43 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3P0ahlP028155; Sat, 25 Apr 2015 00:36:43 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201504250036.t3P0ahlP028155@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 25 Apr 2015 00:36:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281958 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 00:36:44 -0000 Author: delphij Date: Sat Apr 25 00:36:43 2015 New Revision: 281958 URL: https://svnweb.freebsd.org/changeset/base/281958 Log: MFC r281667: Remove vfs.zfs.snapshot_list_prefetch, the corresponding code was gone in r248571 already. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Sat Apr 25 00:32:47 2015 (r281957) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Sat Apr 25 00:36:43 2015 (r281958) @@ -195,12 +195,6 @@ CTASSERT(sizeof(zfs_cmd_t) < IOCPARM_MAX); -static int snapshot_list_prefetch; -SYSCTL_DECL(_vfs_zfs); -TUNABLE_INT("vfs.zfs.snapshot_list_prefetch", &snapshot_list_prefetch); -SYSCTL_INT(_vfs_zfs, OID_AUTO, snapshot_list_prefetch, CTLFLAG_RW, - &snapshot_list_prefetch, 0, "Prefetch data when listing snapshots"); - static struct cdev *zfsdev; extern void zfs_init(void); From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 00:51:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1FDED2EC; Sat, 25 Apr 2015 00:51:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 000991932; Sat, 25 Apr 2015 00:51:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3P0piVc037356; Sat, 25 Apr 2015 00:51:44 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3P0pitf037355; Sat, 25 Apr 2015 00:51:44 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201504250051.t3P0pitf037355@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 25 Apr 2015 00:51:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281959 - head/usr.bin/whois X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 00:51:45 -0000 Author: delphij Date: Sat Apr 25 00:51:44 2015 New Revision: 281959 URL: https://svnweb.freebsd.org/changeset/base/281959 Log: Try alternate addresses more agressively. Attempt to connect to alternate addresses if the connect doesn't succeed in 180ms, and cut wait time between connection attempts in half for each additional, if no connection was established. Take the first connection to succeed and close the others. This makes whois more responsive when e.g. IPv6 service took long time or fail to respond. PR: 158125 Submitted by: Mark Andrews (with changes from me) MFC after: 2 weeks Modified: head/usr.bin/whois/whois.c Modified: head/usr.bin/whois/whois.c ============================================================================== --- head/usr.bin/whois/whois.c Sat Apr 25 00:36:43 2015 (r281958) +++ head/usr.bin/whois/whois.c Sat Apr 25 00:51:44 2015 (r281959) @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1980, 1993 * The Regents of the University of California. All rights reserved. * @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -55,6 +56,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #define ABUSEHOST "whois.abuse.net" #define NICHOST "whois.crsnic.net" @@ -280,21 +283,136 @@ whois(const char *query, const char *hos FILE *fp; struct addrinfo *hostres, *res; char *buf, *host, *nhost, *p; - int i, s; + int i, j, s = -1, count; size_t c, len; + struct pollfd *fds; + int timeout = 180; - s = -1; hostres = gethostinfo(hostname, 1); - for (res = hostres; res; res = res->ai_next) { - s = socket(res->ai_family, res->ai_socktype, res->ai_protocol); + for (res = hostres, count = 0; res; res = res->ai_next) + count++; + + fds = calloc(count, sizeof(*fds)); + if (fds == NULL) + err(EX_OSERR, "calloc()"); + + /* + * Traverse the result list elements and make non-block + * connection attempts. + */ + count = i = 0; + for (res = hostres; res != NULL; res = res->ai_next) { + s = socket(res->ai_family, res->ai_socktype | SOCK_NONBLOCK, + res->ai_protocol); if (s < 0) continue; - if (connect(s, res->ai_addr, res->ai_addrlen) == 0) - break; - close(s); + if (connect(s, res->ai_addr, res->ai_addrlen) < 0) { + if (errno == EINPROGRESS) { + /* Add the socket to poll list */ + fds[i].fd = s; + fds[i].events = POLLERR | POLLHUP | + POLLIN | POLLOUT; + count++; + i++; + } else { + close(s); + s = -1; + + /* + * Poll only if we have something to poll, + * otherwise just go ahead and try next + * address + */ + if (count == 0) + continue; + } + } else + goto done; + + /* + * If we are at the last address, poll until a connection is + * established or we failed all connection attempts. + */ + if (res->ai_next == NULL) + timeout = INFTIM; + + /* + * Poll the watched descriptors for successful connections: + * if we still have more untried resolved addresses, poll only + * once; otherwise, poll until all descriptors have errors, + * which will be considered as ETIMEDOUT later. + */ + do { + int n; + + n = poll(fds, i, timeout); + if (n == 0) { + /* + * No event reported in time. Try with a + * smaller timeout (but cap at 2-3ms) + * after a new host have been added. + */ + if (timeout >= 3) + timeout <<= 1; + + break; + } else if (n < 0) { + /* + * errno here can only be EINTR which we would want + * to clean up and bail out. + */ + s = -1; + goto done; + } + + /* + * Check for the event(s) we have seen. + */ + for (j = 0; j < i; j++) { + if (fds[j].fd == -1 || fds[j].events == 0 || + fds[j].revents == 0) + continue; + if (fds[j].revents & ~(POLLIN | POLLOUT)) { + close(s); + fds[j].fd = -1; + fds[j].events = 0; + count--; + continue; + } else if (fds[j].revents & (POLLIN | POLLOUT)) { + /* Connect succeeded. */ + s = fds[j].fd; + + goto done; + } + + } + } while (timeout == INFTIM && count != 0); } + + /* All attempts were failed */ + s = -1; + if (count == 0) + errno = ETIMEDOUT; + +done: + /* Close all watched fds except the succeeded one */ + for (j = 0; j < i; j++) + if (fds[j].fd != s && fds[j].fd != -1) + close(fds[j].fd); + + if (s != -1) { + /* Restore default blocking behavior. */ + if ((flags = fcntl(s, F_GETFL)) != -1) { + flags &= ~O_NONBLOCK; + if (fcntl(s, F_SETFL, flags) == -1) + err(EX_OSERR, "fcntl()"); + } else + err(EX_OSERR, "fcntl()"); + } + + free(fds); freeaddrinfo(hostres); - if (res == NULL) + if (s == -1) err(EX_OSERR, "connect()"); fp = fdopen(s, "r+"); From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 00:52:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E15247A; Sat, 25 Apr 2015 00:52:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E3661942; Sat, 25 Apr 2015 00:52:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3P0q3NT037483; Sat, 25 Apr 2015 00:52:03 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3P0q28U037478; Sat, 25 Apr 2015 00:52:02 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201504250052.t3P0q28U037478@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sat, 25 Apr 2015 00:52:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281960 - in head/sys: fs/nfs fs/nfsclient kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 00:52:03 -0000 Author: rmacklem Date: Sat Apr 25 00:52:01 2015 New Revision: 281960 URL: https://svnweb.freebsd.org/changeset/base/281960 Log: MAXBSIZE defines both the largest UFS block size and the largest size for a buffer in the buffer cache. This patch defines a new constant MAXBCACHEBUF, which is the largest size for a buffer in the buffer cache. Having a separate constant allows MAXBCACHEBUF to be set larger than MAXBSIZE on a per-architecture basis, so that NFS can do larger read/writes for these architectures. It modifies sys/param.h so that BKVASIZE can also be set on a per-architecture basis. A couple of cases where NFS used MAXBSIZE instead of NFS_MAXBSIZE is fixed as well. Differential Revision: https://reviews.freebsd.org/D2330 Reviewed by: mav, kib MFC after: 2 weeks Modified: head/sys/fs/nfs/nfsport.h head/sys/fs/nfsclient/nfs_clvfsops.c head/sys/kern/vfs_bio.c head/sys/sys/param.h Modified: head/sys/fs/nfs/nfsport.h ============================================================================== --- head/sys/fs/nfs/nfsport.h Sat Apr 25 00:51:44 2015 (r281959) +++ head/sys/fs/nfs/nfsport.h Sat Apr 25 00:52:01 2015 (r281960) @@ -950,7 +950,7 @@ struct nfsreq { }; #ifndef NFS_MAXBSIZE -#define NFS_MAXBSIZE MAXBSIZE +#define NFS_MAXBSIZE MAXBCACHEBUF #endif /* Modified: head/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvfsops.c Sat Apr 25 00:51:44 2015 (r281959) +++ head/sys/fs/nfsclient/nfs_clvfsops.c Sat Apr 25 00:52:01 2015 (r281960) @@ -201,16 +201,16 @@ newnfs_iosize(struct nfsmount *nmp) } if (nmp->nm_rsize > maxio || nmp->nm_rsize == 0) nmp->nm_rsize = maxio; - if (nmp->nm_rsize > MAXBSIZE) - nmp->nm_rsize = MAXBSIZE; + if (nmp->nm_rsize > NFS_MAXBSIZE) + nmp->nm_rsize = NFS_MAXBSIZE; if (nmp->nm_readdirsize > maxio || nmp->nm_readdirsize == 0) nmp->nm_readdirsize = maxio; if (nmp->nm_readdirsize > nmp->nm_rsize) nmp->nm_readdirsize = nmp->nm_rsize; if (nmp->nm_wsize > maxio || nmp->nm_wsize == 0) nmp->nm_wsize = maxio; - if (nmp->nm_wsize > MAXBSIZE) - nmp->nm_wsize = MAXBSIZE; + if (nmp->nm_wsize > NFS_MAXBSIZE) + nmp->nm_wsize = NFS_MAXBSIZE; /* * Calculate the size used for io buffers. Use the larger Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Sat Apr 25 00:51:44 2015 (r281959) +++ head/sys/kern/vfs_bio.c Sat Apr 25 00:52:01 2015 (r281960) @@ -805,6 +805,7 @@ bufinit(void) struct buf *bp; int i; + CTASSERT(MAXBCACHEBUF >= MAXBSIZE); mtx_init(&bqclean, "bufq clean lock", NULL, MTX_DEF); mtx_init(&bqdirty, "bufq dirty lock", NULL, MTX_DEF); mtx_init(&rbreqlock, "runningbufspace lock", NULL, MTX_DEF); @@ -846,8 +847,8 @@ bufinit(void) * by the system. */ maxbufspace = (long)nbuf * BKVASIZE; - hibufspace = lmax(3 * maxbufspace / 4, maxbufspace - MAXBSIZE * 10); - lobufspace = hibufspace - MAXBSIZE; + hibufspace = lmax(3 * maxbufspace / 4, maxbufspace - MAXBCACHEBUF * 10); + lobufspace = hibufspace - MAXBCACHEBUF; /* * Note: The 16 MiB upper limit for hirunningspace was chosen @@ -857,9 +858,9 @@ bufinit(void) * The lower 1 MiB limit is the historical upper limit for * hirunningspace. */ - hirunningspace = lmax(lmin(roundup(hibufspace / 64, MAXBSIZE), + hirunningspace = lmax(lmin(roundup(hibufspace / 64, MAXBCACHEBUF), 16 * 1024 * 1024), 1024 * 1024); - lorunningspace = roundup((hirunningspace * 2) / 3, MAXBSIZE); + lorunningspace = roundup((hirunningspace * 2) / 3, MAXBCACHEBUF); /* * Limit the amount of malloc memory since it is wired permanently into @@ -3073,8 +3074,9 @@ getblk(struct vnode *vp, daddr_t blkno, KASSERT((flags & (GB_UNMAPPED | GB_KVAALLOC)) != GB_KVAALLOC, ("GB_KVAALLOC only makes sense with GB_UNMAPPED")); ASSERT_VOP_LOCKED(vp, "getblk"); - if (size > MAXBSIZE) - panic("getblk: size(%d) > MAXBSIZE(%d)\n", size, MAXBSIZE); + if (size > MAXBCACHEBUF) + panic("getblk: size(%d) > MAXBCACHEBUF(%d)\n", size, + MAXBCACHEBUF); if (!unmapped_buf_allowed) flags &= ~(GB_UNMAPPED | GB_KVAALLOC); Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Sat Apr 25 00:51:44 2015 (r281959) +++ head/sys/sys/param.h Sat Apr 25 00:52:01 2015 (r281960) @@ -233,10 +233,19 @@ * and may be made smaller at the risk of not being able to use * filesystems which require a block size exceeding MAXBSIZE. * + * MAXBCACHEBUF - Maximum size of a buffer in the buffer cache. This must + * be >= MAXBSIZE and can be set differently for different + * architectures by defining it in . + * Making this larger allows NFS to do larger reads/writes. + * * BKVASIZE - Nominal buffer space per buffer, in bytes. BKVASIZE is the * minimum KVM memory reservation the kernel is willing to make. * Filesystems can of course request smaller chunks. Actual * backing memory uses a chunk size of a page (PAGE_SIZE). + * The default value here can be overridden on a per-architecture + * basis by defining it in . This should + * probably be done to increase its value, when MAXBCACHEBUF is + * defined as a larger value in . * * If you make BKVASIZE too small you risk seriously fragmenting * the buffer KVM map which may slow things down a bit. If you @@ -248,7 +257,12 @@ * normal UFS filesystem. */ #define MAXBSIZE 65536 /* must be power of 2 */ +#ifndef MAXBCACHEBUF +#define MAXBCACHEBUF MAXBSIZE /* must be a power of 2 >= MAXBSIZE */ +#endif +#ifndef BKVASIZE #define BKVASIZE 16384 /* must be power of 2 */ +#endif #define BKVAMASK (BKVASIZE-1) /* From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 00:58:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 305729F7; Sat, 25 Apr 2015 00:58:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D26E198E; Sat, 25 Apr 2015 00:58:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3P0wJ17038802; Sat, 25 Apr 2015 00:58:19 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3P0wJMM038801; Sat, 25 Apr 2015 00:58:19 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504250058.t3P0wJMM038801@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 25 Apr 2015 00:58:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281961 - stable/10/sys/cam/scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 00:58:20 -0000 Author: pfg Date: Sat Apr 25 00:58:19 2015 New Revision: 281961 URL: https://svnweb.freebsd.org/changeset/base/281961 Log: MFC r281795: scsi_parse_transportid_rdma(): fix mismatch in memory access size. Independently found by Coverity and gcc49. CID: 1230006 Reviewed by: ken Modified: stable/10/sys/cam/scsi/scsi_all.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/scsi/scsi_all.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_all.c Sat Apr 25 00:52:01 2015 (r281960) +++ stable/10/sys/cam/scsi/scsi_all.c Sat Apr 25 00:58:19 2015 (r281961) @@ -6039,7 +6039,7 @@ scsi_parse_transportid_rdma(char *id_str goto bailout; } *alloc_len = sizeof(*rdma); - bzero(rdma, sizeof(rdma)); + bzero(rdma, *alloc_len); rdma->format_protocol = SCSI_PROTO_RDMA | SCSI_TRN_RDMA_FORMAT_DEFAULT; bcopy(rdma_id, rdma->initiator_port_id, SCSI_TRN_RDMA_PORT_LEN); From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 00:58:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 24804B26; Sat, 25 Apr 2015 00:58:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 126DD1990; Sat, 25 Apr 2015 00:58:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3P0wO3R038855; Sat, 25 Apr 2015 00:58:24 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3P0wO6I038854; Sat, 25 Apr 2015 00:58:24 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201504250058.t3P0wO6I038854@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sat, 25 Apr 2015 00:58:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281962 - head/sys/fs/nfsserver X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 00:58:25 -0000 Author: rmacklem Date: Sat Apr 25 00:58:24 2015 New Revision: 281962 URL: https://svnweb.freebsd.org/changeset/base/281962 Log: Fix the NFS server's handling of a bogus NFSv2 ROOT RPC. The ROOT RPC is deprecated in the NFSv2 RFC, RFC-1094 and should never be used by a client. Tested by: thmu@freenet.de MFC after: 1 week Modified: head/sys/fs/nfsserver/nfs_nfsdkrpc.c Modified: head/sys/fs/nfsserver/nfs_nfsdkrpc.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdkrpc.c Sat Apr 25 00:58:19 2015 (r281961) +++ head/sys/fs/nfsserver/nfs_nfsdkrpc.c Sat Apr 25 00:58:24 2015 (r281962) @@ -117,7 +117,8 @@ nfssvc_program(struct svc_req *rqst, SVC memset(&nd, 0, sizeof(nd)); if (rqst->rq_vers == NFS_VER2) { - if (rqst->rq_proc > NFSV2PROC_STATFS) { + if (rqst->rq_proc > NFSV2PROC_STATFS || + newnfs_nfsv3_procid[rqst->rq_proc] == NFSPROC_NOOP) { svcerr_noproc(rqst); svc_freereq(rqst); goto out; From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 01:11:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB611E14; Sat, 25 Apr 2015 01:11:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B12B1B4A; Sat, 25 Apr 2015 01:11:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3P1BZ9l045638; Sat, 25 Apr 2015 01:11:35 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3P1BYOk045633; Sat, 25 Apr 2015 01:11:34 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201504250111.t3P1BYOk045633@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Sat, 25 Apr 2015 01:11:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281963 - stable/10/sys/dev/sound/pci/hda X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 01:11:35 -0000 Author: rpaulo Date: Sat Apr 25 01:11:33 2015 New Revision: 281963 URL: https://svnweb.freebsd.org/changeset/base/281963 Log: MFC r281544: snd_hda: add support for the Lenovo X1 20BS model. This requires a patch to redirect the output to a separate DAC when the headphones are used. While there, add device strings for Intel Broadwell HDA controllers and Realtek ALC292 codecs. Modified: stable/10/sys/dev/sound/pci/hda/hdaa_patches.c stable/10/sys/dev/sound/pci/hda/hdac.c stable/10/sys/dev/sound/pci/hda/hdac.h stable/10/sys/dev/sound/pci/hda/hdacc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/pci/hda/hdaa_patches.c ============================================================================== --- stable/10/sys/dev/sound/pci/hda/hdaa_patches.c Sat Apr 25 00:58:24 2015 (r281962) +++ stable/10/sys/dev/sound/pci/hda/hdaa_patches.c Sat Apr 25 01:11:33 2015 (r281963) @@ -392,6 +392,13 @@ hdac_pin_patch(struct hdaa_widget *w) patch = "as=1 seq=15"; break; } + } else if (id == HDA_CODEC_ALC292 && + subid == LENOVO_X120BS_SUBVENDOR) { + switch (nid) { + case 21: + patch = "as=1 seq=15"; + break; + } } if (patch != NULL) Modified: stable/10/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- stable/10/sys/dev/sound/pci/hda/hdac.c Sat Apr 25 00:58:24 2015 (r281962) +++ stable/10/sys/dev/sound/pci/hda/hdac.c Sat Apr 25 01:11:33 2015 (r281963) @@ -81,6 +81,8 @@ static const struct { { HDA_INTEL_HSW1, "Intel Haswell", 0, 0 }, { HDA_INTEL_HSW2, "Intel Haswell", 0, 0 }, { HDA_INTEL_HSW3, "Intel Haswell", 0, 0 }, + { HDA_INTEL_BDW1, "Intel Broadwell", 0, 0 }, + { HDA_INTEL_BDW2, "Intel Broadwell", 0, 0 }, { HDA_INTEL_CPT, "Intel Cougar Point", 0, 0 }, { HDA_INTEL_PATSBURG,"Intel Patsburg", 0, 0 }, { HDA_INTEL_PPT1, "Intel Panther Point", 0, 0 }, Modified: stable/10/sys/dev/sound/pci/hda/hdac.h ============================================================================== --- stable/10/sys/dev/sound/pci/hda/hdac.h Sat Apr 25 00:58:24 2015 (r281962) +++ stable/10/sys/dev/sound/pci/hda/hdac.h Sat Apr 25 01:11:33 2015 (r281963) @@ -46,6 +46,7 @@ #define HDA_INTEL_HSW1 HDA_MODEL_CONSTRUCT(INTEL, 0x0a0c) #define HDA_INTEL_HSW2 HDA_MODEL_CONSTRUCT(INTEL, 0x0c0c) #define HDA_INTEL_HSW3 HDA_MODEL_CONSTRUCT(INTEL, 0x0d0c) +#define HDA_INTEL_BDW1 HDA_MODEL_CONSTRUCT(INTEL, 0x160c) #define HDA_INTEL_CPT HDA_MODEL_CONSTRUCT(INTEL, 0x1c20) #define HDA_INTEL_PATSBURG HDA_MODEL_CONSTRUCT(INTEL, 0x1d20) #define HDA_INTEL_PPT1 HDA_MODEL_CONSTRUCT(INTEL, 0x1e20) @@ -67,6 +68,7 @@ #define HDA_INTEL_WELLS2 HDA_MODEL_CONSTRUCT(INTEL, 0x8d21) #define HDA_INTEL_LPTLP1 HDA_MODEL_CONSTRUCT(INTEL, 0x9c20) #define HDA_INTEL_LPTLP2 HDA_MODEL_CONSTRUCT(INTEL, 0x9c21) +#define HDA_INTEL_BDW2 HDA_MODEL_CONSTRUCT(INTEL, 0x9ca0) #define HDA_INTEL_ALL HDA_MODEL_CONSTRUCT(INTEL, 0xffff) /* Nvidia */ @@ -235,6 +237,7 @@ #define LENOVO_TCA55_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x1015) #define LENOVO_X1_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21e8) #define LENOVO_X1CRBN_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21f9) +#define LENOVO_X120BS_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x2227) #define LENOVO_X220_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21da) #define LENOVO_X300_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x20ac) #define LENOVO_T420_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21ce) @@ -337,6 +340,7 @@ #define HDA_CODEC_ALC273 HDA_CODEC_CONSTRUCT(REALTEK, 0x0273) #define HDA_CODEC_ALC275 HDA_CODEC_CONSTRUCT(REALTEK, 0x0275) #define HDA_CODEC_ALC276 HDA_CODEC_CONSTRUCT(REALTEK, 0x0276) +#define HDA_CODEC_ALC292 HDA_CODEC_CONSTRUCT(REALTEK, 0x0292) #define HDA_CODEC_ALC660 HDA_CODEC_CONSTRUCT(REALTEK, 0x0660) #define HDA_CODEC_ALC662 HDA_CODEC_CONSTRUCT(REALTEK, 0x0662) #define HDA_CODEC_ALC663 HDA_CODEC_CONSTRUCT(REALTEK, 0x0663) @@ -621,6 +625,7 @@ #define HDA_CODEC_INTELCPT HDA_CODEC_CONSTRUCT(INTEL, 0x2805) #define HDA_CODEC_INTELPPT HDA_CODEC_CONSTRUCT(INTEL, 0x2806) #define HDA_CODEC_INTELHSW HDA_CODEC_CONSTRUCT(INTEL, 0x2807) +#define HDA_CODEC_INTELBDW HDA_CODEC_CONSTRUCT(INTEL, 0x2808) #define HDA_CODEC_INTELCL HDA_CODEC_CONSTRUCT(INTEL, 0x29fb) #define HDA_CODEC_INTELXXXX HDA_CODEC_CONSTRUCT(INTEL, 0xffff) Modified: stable/10/sys/dev/sound/pci/hda/hdacc.c ============================================================================== --- stable/10/sys/dev/sound/pci/hda/hdacc.c Sat Apr 25 00:58:24 2015 (r281962) +++ stable/10/sys/dev/sound/pci/hda/hdacc.c Sat Apr 25 01:11:33 2015 (r281963) @@ -87,6 +87,7 @@ static const struct { { HDA_CODEC_ALC273, 0, "Realtek ALC273" }, { HDA_CODEC_ALC275, 0, "Realtek ALC275" }, { HDA_CODEC_ALC276, 0, "Realtek ALC276" }, + { HDA_CODEC_ALC292, 0, "Realtek ALC292" }, { HDA_CODEC_ALC660, 0, "Realtek ALC660-VD" }, { HDA_CODEC_ALC662, 0x0002, "Realtek ALC662 rev2" }, { HDA_CODEC_ALC662, 0, "Realtek ALC662" }, @@ -319,6 +320,7 @@ static const struct { { HDA_CODEC_INTELCPT, 0, "Intel Cougar Point" }, { HDA_CODEC_INTELPPT, 0, "Intel Panther Point" }, { HDA_CODEC_INTELHSW, 0, "Intel Haswell" }, + { HDA_CODEC_INTELBDW, 0, "Intel Broadwell" }, { HDA_CODEC_INTELCL, 0, "Intel Crestline" }, { HDA_CODEC_SII1390, 0, "Silicon Image SiI1390" }, { HDA_CODEC_SII1392, 0, "Silicon Image SiI1392" }, From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 01:23:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0721618F; Sat, 25 Apr 2015 01:23:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7DAE1C4B; Sat, 25 Apr 2015 01:23:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3P1NTHC053213; Sat, 25 Apr 2015 01:23:29 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3P1NTxG053212; Sat, 25 Apr 2015 01:23:29 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201504250123.t3P1NTxG053212@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Sat, 25 Apr 2015 01:23:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281964 - stable/10/sys/dev/atkbdc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 01:23:30 -0000 Author: rpaulo Date: Sat Apr 25 01:23:29 2015 New Revision: 281964 URL: https://svnweb.freebsd.org/changeset/base/281964 Log: MFC r281704: Synaptics: don't report the middle button when clickPad is used. Modified: stable/10/sys/dev/atkbdc/psm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/atkbdc/psm.c ============================================================================== --- stable/10/sys/dev/atkbdc/psm.c Sat Apr 25 01:11:33 2015 (r281963) +++ stable/10/sys/dev/atkbdc/psm.c Sat Apr 25 01:23:29 2015 (r281964) @@ -2746,7 +2746,8 @@ proc_synaptics(struct psm_softc *sc, pac touchpad_buttons |= MOUSE_BUTTON4DOWN; if ((pb->ipacket[3] ^ pb->ipacket[0]) & 0x02) touchpad_buttons |= MOUSE_BUTTON5DOWN; - } else if (sc->synhw.capExtended && sc->synhw.capMiddle) { + } else if (sc->synhw.capExtended && sc->synhw.capMiddle && + !sc->synhw.capClickPad) { /* Middle Button */ if ((pb->ipacket[0] ^ pb->ipacket[3]) & 0x01) touchpad_buttons |= MOUSE_BUTTON2DOWN; From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 04:30:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 33DCBE89; Sat, 25 Apr 2015 04:30:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2250A1E34; Sat, 25 Apr 2015 04:30:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3P4U2gr044479; Sat, 25 Apr 2015 04:30:02 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3P4U1FR044477; Sat, 25 Apr 2015 04:30:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504250430.t3P4U1FR044477@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 25 Apr 2015 04:30:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281966 - head/contrib/netbsd-tests/lib/libpthread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 04:30:02 -0000 Author: ngie Date: Sat Apr 25 04:30:01 2015 New Revision: 281966 URL: https://svnweb.freebsd.org/changeset/base/281966 Log: Add #include sys/types.h for register_t for mips MFC after: 3 days Modified: head/contrib/netbsd-tests/lib/libpthread/t_swapcontext.c Modified: head/contrib/netbsd-tests/lib/libpthread/t_swapcontext.c ============================================================================== --- head/contrib/netbsd-tests/lib/libpthread/t_swapcontext.c Sat Apr 25 01:29:40 2015 (r281965) +++ head/contrib/netbsd-tests/lib/libpthread/t_swapcontext.c Sat Apr 25 04:30:01 2015 (r281966) @@ -28,6 +28,9 @@ #include __RCSID("$NetBSD"); +#ifdef __FreeBSD__ +#include +#endif #include #include #include From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 04:35:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 49A5E97; Sat, 25 Apr 2015 04:35:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 388F81EF4; Sat, 25 Apr 2015 04:35:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3P4ZipQ048833; Sat, 25 Apr 2015 04:35:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3P4Zipv048832; Sat, 25 Apr 2015 04:35:44 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504250435.t3P4Zipv048832@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 25 Apr 2015 04:35:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281967 - head/lib/libc/tests/db X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 04:35:44 -0000 Author: ngie Date: Sat Apr 25 04:35:43 2015 New Revision: 281967 URL: https://svnweb.freebsd.org/changeset/base/281967 Log: Assuming a system has /bin/csh on it is a bad idea (especially it being optional on FreeBSD). Look for /bin/cat instead MFC after: 3 days Modified: head/lib/libc/tests/db/Makefile Directory Properties: head/ (props changed) Modified: head/lib/libc/tests/db/Makefile ============================================================================== --- head/lib/libc/tests/db/Makefile Sat Apr 25 04:30:01 2015 (r281966) +++ head/lib/libc/tests/db/Makefile Sat Apr 25 04:35:43 2015 (r281967) @@ -11,6 +11,7 @@ FILESDIR= ${TESTSDIR} FILES= README NETBSD_ATF_TESTS_SH+= db_test +ATF_TESTS_SH_SED_db_test= -e 's,/bin/csh,/bin/cat,g' .include "../Makefile.netbsd-tests" From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 04:40:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46D89228; Sat, 25 Apr 2015 04:40:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 357661F1F; Sat, 25 Apr 2015 04:40:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3P4e9cZ049524; Sat, 25 Apr 2015 04:40:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3P4e9bt049523; Sat, 25 Apr 2015 04:40:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504250440.t3P4e9bt049523@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 25 Apr 2015 04:40:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281968 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 04:40:09 -0000 Author: ngie Date: Sat Apr 25 04:40:08 2015 New Revision: 281968 URL: https://svnweb.freebsd.org/changeset/base/281968 Log: MFC r280475: The number of commands added when ddb(4) is enabled is 3, not 2 Sponsored by: EMC / Isilon Storage Division Modified: stable/10/share/man/man4/witness.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/witness.4 ============================================================================== --- stable/10/share/man/man4/witness.4 Sat Apr 25 04:35:43 2015 (r281967) +++ stable/10/share/man/man4/witness.4 Sat Apr 25 04:40:08 2015 (r281968) @@ -103,7 +103,7 @@ can be set via .Pp The .Nm -code also provides two extra +code also provides three extra .Xr ddb 4 commands if both .Nm From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 04:49:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D80173D1; Sat, 25 Apr 2015 04:49:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4B611FF4; Sat, 25 Apr 2015 04:49:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3P4nkX8054347; Sat, 25 Apr 2015 04:49:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3P4nk0s054345; Sat, 25 Apr 2015 04:49:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504250449.t3P4nk0s054345@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 25 Apr 2015 04:49:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281969 - stable/10/tools/regression/aio/aiotest X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 04:49:47 -0000 Author: ngie Date: Sat Apr 25 04:49:45 2015 New Revision: 281969 URL: https://svnweb.freebsd.org/changeset/base/281969 Log: MFC r280893: Cleanup and do minor refactoring before converting testcases to ATF - Convert errx(-1, ..) to errx(1, ..) - Move the aio(4) checks to a single function (aio_available); use modfind(2) instead of depending on SIGSYS (doesn't work when aio(4) support is missing, not documented in the aio syscall manpages). - Use aio_available liberally in the testcase functions - Use mkstemp(3) + unlink(2) instead of mktemp(3) - Fix some -Wunused warnings - Bump WARNS to 6 Submitted by: mjohnston [*] Sponsored by: EMC / Isilon Storage Division Modified: stable/10/tools/regression/aio/aiotest/Makefile stable/10/tools/regression/aio/aiotest/aiotest.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/regression/aio/aiotest/Makefile ============================================================================== --- stable/10/tools/regression/aio/aiotest/Makefile Sat Apr 25 04:40:08 2015 (r281968) +++ stable/10/tools/regression/aio/aiotest/Makefile Sat Apr 25 04:49:45 2015 (r281969) @@ -6,4 +6,6 @@ MAN= DPADD= ${LIBUTIL} LDADD= -lutil +WARNS?= 6 + .include Modified: stable/10/tools/regression/aio/aiotest/aiotest.c ============================================================================== --- stable/10/tools/regression/aio/aiotest/aiotest.c Sat Apr 25 04:40:08 2015 (r281968) +++ stable/10/tools/regression/aio/aiotest/aiotest.c Sat Apr 25 04:49:45 2015 (r281969) @@ -38,7 +38,8 @@ * basic operations work on some basic object types. */ -#include +#include +#include #include #include #include @@ -79,25 +80,15 @@ struct aio_context { }; static int aio_timedout; -static int aio_notpresent; - -/* - * Attempt to provide a cleaner failure mode in the event AIO support is not - * present by catching and reporting SIGSYS. - */ -static void -aio_sigsys(int sig) -{ - - aio_notpresent = 1; -} static void -aio_sigsys_setup(void) +aio_available(void) { - if (signal(SIGSYS, aio_sigsys) == SIG_ERR) - errx(-1, "FAIL: signal(SIGSYS): %s", strerror(errno)); + if (modfind("aio") == -1) + errx(0, + "aio support not available in the kernel; skipping " + "testcases"); } /* @@ -105,7 +96,7 @@ aio_sigsys_setup(void) * signal(3) and alarm(3) APIs to set this up. */ static void -aio_timeout_signal(int sig) +aio_timeout_signal(int sig __unused) { aio_timedout = 1; @@ -117,7 +108,7 @@ aio_timeout_start(const char *string1, c aio_timedout = 0; if (signal(SIGALRM, aio_timeout_signal) == SIG_ERR) - errx(-1, "FAIL: %s: %s: aio_timeout_set: signal(SIGALRM): %s", + errx(1, "FAIL: %s: %s: aio_timeout_set: signal(SIGALRM): %s", string1, string2, strerror(errno)); alarm(seconds); } @@ -127,7 +118,7 @@ aio_timeout_stop(const char *string1, co { if (signal(SIGALRM, NULL) == SIG_ERR) - errx(-1, "FAIL: %s: %s: aio_timeout_stop: signal(NULL): %s", + errx(1, "FAIL: %s: %s: aio_timeout_stop: signal(NULL): %s", string1, string2, strerror(errno)); alarm(0); } @@ -179,7 +170,7 @@ aio_context_init(struct aio_context *ac, { if (buflen > BUFFER_MAX) - errx(-1, "FAIL: %s: aio_context_init: buffer too large", + errx(1, "FAIL: %s: aio_context_init: buffer too large", test); bzero(ac, sizeof(*ac)); ac->ac_test = test; @@ -190,7 +181,7 @@ aio_context_init(struct aio_context *ac, ac->ac_seed = random(); aio_fill_buffer(ac->ac_buffer, buflen, ac->ac_seed); if (aio_test_buffer(ac->ac_buffer, buflen, ac->ac_seed) == 0) - errx(-1, "%s: aio_context_init: aio_test_buffer: internal " + errx(1, "%s: aio_context_init: aio_test_buffer: internal " "error", test); ac->ac_seconds = seconds; ac->ac_cleanup = cleanup; @@ -223,7 +214,8 @@ aio_write_test(struct aio_context *ac) { struct aiocb aio, *aiop; ssize_t len; - int error; + + aio_available(); bzero(&aio, sizeof(aio)); aio.aio_buf = ac->ac_buffer; @@ -235,33 +227,29 @@ aio_write_test(struct aio_context *ac) if (aio_write(&aio) < 0) { if (errno == EINTR) { - if (aio_notpresent) - errno = EOPNOTSUPP; if (aio_timedout) { aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_write_test: " + errx(1, "FAIL: %s: aio_write_test: " "aio_write: timed out", ac->ac_test); } } aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_write_test: aio_write: %s", + errx(1, "FAIL: %s: aio_write_test: aio_write: %s", ac->ac_test, strerror(errno)); } len = aio_waitcomplete(&aiop, NULL); if (len < 0) { if (errno == EINTR) { - if (aio_notpresent) - errno = EOPNOTSUPP; if (aio_timedout) { aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_write_test: " + errx(1, "FAIL: %s: aio_write_test: " "aio_waitcomplete: timed out", ac->ac_test); } } aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_write_test: aio_waitcomplete: %s", + errx(1, "FAIL: %s: aio_write_test: aio_waitcomplete: %s", ac->ac_test, strerror(errno)); } @@ -269,7 +257,7 @@ aio_write_test(struct aio_context *ac) if (len != ac->ac_buflen) { aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_write_test: aio_waitcomplete: short " + errx(1, "FAIL: %s: aio_write_test: aio_waitcomplete: short " "write (%jd)", ac->ac_test, (intmax_t)len); } } @@ -284,6 +272,8 @@ aio_read_test(struct aio_context *ac) struct aiocb aio, *aiop; ssize_t len; + aio_available(); + bzero(ac->ac_buffer, ac->ac_buflen); bzero(&aio, sizeof(aio)); aio.aio_buf = ac->ac_buffer; @@ -295,33 +285,29 @@ aio_read_test(struct aio_context *ac) if (aio_read(&aio) < 0) { if (errno == EINTR) { - if (aio_notpresent) - errno = EOPNOTSUPP; if (aio_timedout) { aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_read_test: " + errx(1, "FAIL: %s: aio_read_test: " "aio_read: timed out", ac->ac_test); } } aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_read_test: aio_read %s", ac->ac_test, + errx(1, "FAIL: %s: aio_read_test: aio_read %s", ac->ac_test, strerror(errno)); } len = aio_waitcomplete(&aiop, NULL); if (len < 0) { if (errno == EINTR) { - if (aio_notpresent) - errno = EOPNOTSUPP; if (aio_timedout) { aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_read_test: " + errx(1, "FAIL: %s: aio_read_test: " "aio_waitcomplete: timed out", ac->ac_test); } } aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_read_test: aio_waitcomplete: %s", + errx(1, "FAIL: %s: aio_read_test: aio_waitcomplete: %s", ac->ac_test, strerror(errno)); } @@ -329,13 +315,13 @@ aio_read_test(struct aio_context *ac) if (len != ac->ac_buflen) { aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_read_test: aio_waitcomplete: short " + errx(1, "FAIL: %s: aio_read_test: aio_waitcomplete: short " "read (%jd)", ac->ac_test, (intmax_t)len); } if (aio_test_buffer(ac->ac_buffer, ac->ac_buflen, ac->ac_seed) == 0) { aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_read_test: buffer mismatch", + errx(1, "FAIL: %s: aio_read_test: buffer mismatch", ac->ac_test); } } @@ -375,10 +361,12 @@ aio_file_test(void) struct aio_context ac; int fd; + aio_available(); + strcpy(pathname, PATH_TEMPLATE); fd = mkstemp(pathname); if (fd == -1) - errx(-1, "FAIL: aio_file_test: mkstemp: %s", + errx(1, "FAIL: aio_file_test: mkstemp: %s", strerror(errno)); arg.afa_fd = fd; @@ -423,15 +411,20 @@ aio_fifo_test(void) char pathname[PATH_MAX]; struct aio_context ac; + aio_available(); + /* - * In theory, mktemp() can return a name that is then collided with. + * In theory, mkstemp() can return a name that is then collided with. * Because this is a regression test, we treat that as a test failure * rather than retrying. */ strcpy(pathname, PATH_TEMPLATE); - mktemp(pathname); + if (mkstemp(pathname) == -1) + err(1, "FAIL: aio_fifo_test: mkstemp failed"); + if (unlink(pathname) == -1) + err(1, "FAIL: aio_fifo_test: unlink failed"); if (mkfifo(pathname, 0600) == -1) - errx(-1, "FAIL: aio_fifo_test: mkfifo: %s", strerror(errno)); + errx(1, "FAIL: aio_fifo_test: mkfifo: %s", strerror(errno)); arg.afa_pathname = pathname; arg.afa_read_fd = -1; arg.afa_write_fd = -1; @@ -441,7 +434,7 @@ aio_fifo_test(void) error = errno; aio_fifo_cleanup(&arg); errno = error; - errx(-1, "FAIL: aio_fifo_test: read_fd open: %s", + errx(1, "FAIL: aio_fifo_test: read_fd open: %s", strerror(errno)); } arg.afa_read_fd = read_fd; @@ -451,7 +444,7 @@ aio_fifo_test(void) error = errno; aio_fifo_cleanup(&arg); errno = error; - errx(-1, "FAIL: aio_fifo_test: write_fd open: %s", + errx(1, "FAIL: aio_fifo_test: write_fd open: %s", strerror(errno)); } arg.afa_write_fd = write_fd; @@ -489,8 +482,10 @@ aio_unix_socketpair_test(void) struct aio_context ac; int sockets[2]; + aio_available(); + if (socketpair(PF_UNIX, SOCK_STREAM, 0, sockets) < 0) - errx(-1, "FAIL: aio_socketpair_test: socketpair: %s", + errx(1, "FAIL: aio_socketpair_test: socketpair: %s", strerror(errno)); arg.asa_sockets[0] = sockets[0]; @@ -532,8 +527,10 @@ aio_pty_test(void) struct termios ts; int error; + aio_available(); + if (openpty(&read_fd, &write_fd, NULL, NULL, NULL) < 0) - errx(-1, "FAIL: aio_pty_test: openpty: %s", strerror(errno)); + errx(1, "FAIL: aio_pty_test: openpty: %s", strerror(errno)); arg.apa_read_fd = read_fd; arg.apa_write_fd = write_fd; @@ -542,7 +539,7 @@ aio_pty_test(void) error = errno; aio_pty_cleanup(&arg); errno = error; - errx(-1, "FAIL: aio_pty_test: tcgetattr: %s", + errx(1, "FAIL: aio_pty_test: tcgetattr: %s", strerror(errno)); } cfmakeraw(&ts); @@ -550,7 +547,7 @@ aio_pty_test(void) error = errno; aio_pty_cleanup(&arg); errno = error; - errx(-1, "FAIL: aio_pty_test: tcsetattr: %s", + errx(1, "FAIL: aio_pty_test: tcsetattr: %s", strerror(errno)); } @@ -581,8 +578,10 @@ aio_pipe_test(void) struct aio_context ac; int pipes[2]; + aio_available(); + if (pipe(pipes) < 0) - errx(-1, "FAIL: aio_pipe_test: pipe: %s", strerror(errno)); + errx(1, "FAIL: aio_pipe_test: pipe: %s", strerror(errno)); aio_context_init(&ac, "aio_file_test", pipes[0], pipes[1], PIPE_LEN, PIPE_TIMEOUT, aio_pipe_cleanup, pipes); @@ -633,15 +632,23 @@ aio_md_cleanup(void *arg) static void aio_md_test(void) { - int error, fd, i, mdctl_fd, unit; + int error, fd, mdctl_fd, unit; char pathname[PATH_MAX]; struct aio_md_arg arg; struct aio_context ac; struct md_ioctl mdio; + aio_available(); + + if (geteuid() != 0) { + fprintf(stderr, "WARNING: aio_md_test: skipped as euid " + "!= 0\n"); + return; + } + mdctl_fd = open("/dev/" MDCTL_NAME, O_RDWR, 0); if (mdctl_fd < 0) - errx(-1, "FAIL: aio_md_test: open(/dev/%s): %s", MDCTL_NAME, + errx(1, "FAIL: aio_md_test: open(/dev/%s): %s", MDCTL_NAME, strerror(errno)); bzero(&mdio, sizeof(mdio)); @@ -658,7 +665,7 @@ aio_md_test(void) error = errno; aio_md_cleanup(&arg); errno = error; - errx(-1, "FAIL: aio_md_test: MDIOCATTACH: %s", + errx(1, "FAIL: aio_md_test: MDIOCATTACH: %s", strerror(errno)); } @@ -669,7 +676,7 @@ aio_md_test(void) error = errno; aio_md_cleanup(&arg); errno = error; - errx(-1, "FAIL: aio_md_test: open(%s): %s", pathname, + errx(1, "FAIL: aio_md_test: open(%s): %s", pathname, strerror(errno)); } arg.ama_fd = fd; @@ -685,18 +692,15 @@ aio_md_test(void) } int -main(int argc, char *argv[]) +main(void) { - aio_sigsys_setup(); aio_file_test(); aio_fifo_test(); aio_unix_socketpair_test(); aio_pty_test(); aio_pipe_test(); - if (geteuid() == 0) - aio_md_test(); - else - fprintf(stderr, "WARNING: aio_md_test: skipped as euid " - "!= 0\n"); + aio_md_test(); + + return (0); } From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 04:58:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55C4663B; Sat, 25 Apr 2015 04:58:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 445C110DB; Sat, 25 Apr 2015 04:58:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3P4w9Ci059238; Sat, 25 Apr 2015 04:58:09 GMT (envelope-from sobomax@FreeBSD.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3P4w9Rw059237; Sat, 25 Apr 2015 04:58:09 GMT (envelope-from sobomax@FreeBSD.org) Message-Id: <201504250458.t3P4w9Rw059237@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sobomax set sender to sobomax@FreeBSD.org using -f From: Maxim Sobolev Date: Sat, 25 Apr 2015 04:58:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281970 - head/usr.bin/kdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 04:58:09 -0000 Author: sobomax Date: Sat Apr 25 04:58:08 2015 New Revision: 281970 URL: https://svnweb.freebsd.org/changeset/base/281970 Log: o Properly init prevtime, so that we don't print bogus value in the first entry reported by the relative mode (-R). o Properly print negative offsets, which I guess may happen if records get re-ordered somehow, possibly due to the locking. Right now we report huge bogus diff (i.e. 2 seconds or so). Modified: head/usr.bin/kdump/kdump.c Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Sat Apr 25 04:49:45 2015 (r281969) +++ head/usr.bin/kdump/kdump.c Sat Apr 25 04:58:08 2015 (r281970) @@ -586,6 +586,7 @@ dumpheader(struct ktr_header *kth) static char unknown[64]; static struct timeval prevtime, prevtime_e, temp; const char *type; + const char *sign; switch (kth->ktr_type) { case KTR_SYSCALL: @@ -662,10 +663,20 @@ dumpheader(struct ktr_header *kth) timevaladd(&kth->ktr_time, &prevtime_e); } if (timestamp & TIMESTAMP_RELATIVE) { + if (prevtime.tv_sec == 0) + prevtime = kth->ktr_time; temp = kth->ktr_time; timevalsub(&kth->ktr_time, &prevtime); - prevtime = temp; - printf("%jd.%06ld ", (intmax_t)kth->ktr_time.tv_sec, + if ((intmax_t)kth->ktr_time.tv_sec < 0) { + kth->ktr_time = prevtime; + prevtime = temp; + timevalsub(&kth->ktr_time, &prevtime); + sign = "-"; + } else { + prevtime = temp; + sign = ""; + } + printf("%s%jd.%06ld ", sign, (intmax_t)kth->ktr_time.tv_sec, kth->ktr_time.tv_usec); } } From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 05:05:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F3C37D3; Sat, 25 Apr 2015 05:05:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C7F2119A; Sat, 25 Apr 2015 05:05:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3P55OhB063939; Sat, 25 Apr 2015 05:05:24 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3P55Oww063936; Sat, 25 Apr 2015 05:05:24 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504250505.t3P55Oww063936@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 25 Apr 2015 05:05:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281971 - stable/9/tools/regression/aio/aiotest X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 05:05:24 -0000 Author: ngie Date: Sat Apr 25 05:05:23 2015 New Revision: 281971 URL: https://svnweb.freebsd.org/changeset/base/281971 Log: MFstable/10 r281969: MFC r280893: Cleanup and do minor refactoring before converting testcases to ATF - Convert errx(-1, ..) to errx(1, ..) - Move the aio(4) checks to a single function (aio_available); use modfind(2) instead of depending on SIGSYS (doesn't work when aio(4) support is missing, not documented in the aio syscall manpages). - Use aio_available liberally in the testcase functions - Use mkstemp(3) + unlink(2) instead of mktemp(3) - Fix some -Wunused warnings - Bump WARNS to 6 Submitted by: mjohnston [*] Sponsored by: EMC / Isilon Storage Division Modified: stable/9/tools/regression/aio/aiotest/Makefile stable/9/tools/regression/aio/aiotest/aiotest.c Directory Properties: stable/9/ (props changed) stable/9/tools/ (props changed) stable/9/tools/regression/ (props changed) stable/9/tools/regression/aio/aiotest/ (props changed) Modified: stable/9/tools/regression/aio/aiotest/Makefile ============================================================================== --- stable/9/tools/regression/aio/aiotest/Makefile Sat Apr 25 04:58:08 2015 (r281970) +++ stable/9/tools/regression/aio/aiotest/Makefile Sat Apr 25 05:05:23 2015 (r281971) @@ -6,4 +6,6 @@ NO_MAN= DPADD= ${LIBUTIL} LDADD= -lutil +WARNS?= 6 + .include Modified: stable/9/tools/regression/aio/aiotest/aiotest.c ============================================================================== --- stable/9/tools/regression/aio/aiotest/aiotest.c Sat Apr 25 04:58:08 2015 (r281970) +++ stable/9/tools/regression/aio/aiotest/aiotest.c Sat Apr 25 05:05:23 2015 (r281971) @@ -38,7 +38,8 @@ * basic operations work on some basic object types. */ -#include +#include +#include #include #include #include @@ -79,25 +80,15 @@ struct aio_context { }; static int aio_timedout; -static int aio_notpresent; - -/* - * Attempt to provide a cleaner failure mode in the event AIO support is not - * present by catching and reporting SIGSYS. - */ -static void -aio_sigsys(int sig) -{ - - aio_notpresent = 1; -} static void -aio_sigsys_setup(void) +aio_available(void) { - if (signal(SIGSYS, aio_sigsys) == SIG_ERR) - errx(-1, "FAIL: signal(SIGSYS): %s", strerror(errno)); + if (modfind("aio") == -1) + errx(0, + "aio support not available in the kernel; skipping " + "testcases"); } /* @@ -105,7 +96,7 @@ aio_sigsys_setup(void) * signal(3) and alarm(3) APIs to set this up. */ static void -aio_timeout_signal(int sig) +aio_timeout_signal(int sig __unused) { aio_timedout = 1; @@ -117,7 +108,7 @@ aio_timeout_start(const char *string1, c aio_timedout = 0; if (signal(SIGALRM, aio_timeout_signal) == SIG_ERR) - errx(-1, "FAIL: %s: %s: aio_timeout_set: signal(SIGALRM): %s", + errx(1, "FAIL: %s: %s: aio_timeout_set: signal(SIGALRM): %s", string1, string2, strerror(errno)); alarm(seconds); } @@ -127,7 +118,7 @@ aio_timeout_stop(const char *string1, co { if (signal(SIGALRM, NULL) == SIG_ERR) - errx(-1, "FAIL: %s: %s: aio_timeout_stop: signal(NULL): %s", + errx(1, "FAIL: %s: %s: aio_timeout_stop: signal(NULL): %s", string1, string2, strerror(errno)); alarm(0); } @@ -179,7 +170,7 @@ aio_context_init(struct aio_context *ac, { if (buflen > BUFFER_MAX) - errx(-1, "FAIL: %s: aio_context_init: buffer too large", + errx(1, "FAIL: %s: aio_context_init: buffer too large", test); bzero(ac, sizeof(*ac)); ac->ac_test = test; @@ -190,7 +181,7 @@ aio_context_init(struct aio_context *ac, ac->ac_seed = random(); aio_fill_buffer(ac->ac_buffer, buflen, ac->ac_seed); if (aio_test_buffer(ac->ac_buffer, buflen, ac->ac_seed) == 0) - errx(-1, "%s: aio_context_init: aio_test_buffer: internal " + errx(1, "%s: aio_context_init: aio_test_buffer: internal " "error", test); ac->ac_seconds = seconds; ac->ac_cleanup = cleanup; @@ -223,7 +214,8 @@ aio_write_test(struct aio_context *ac) { struct aiocb aio, *aiop; ssize_t len; - int error; + + aio_available(); bzero(&aio, sizeof(aio)); aio.aio_buf = ac->ac_buffer; @@ -235,33 +227,29 @@ aio_write_test(struct aio_context *ac) if (aio_write(&aio) < 0) { if (errno == EINTR) { - if (aio_notpresent) - errno = EOPNOTSUPP; if (aio_timedout) { aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_write_test: " + errx(1, "FAIL: %s: aio_write_test: " "aio_write: timed out", ac->ac_test); } } aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_write_test: aio_write: %s", + errx(1, "FAIL: %s: aio_write_test: aio_write: %s", ac->ac_test, strerror(errno)); } len = aio_waitcomplete(&aiop, NULL); if (len < 0) { if (errno == EINTR) { - if (aio_notpresent) - errno = EOPNOTSUPP; if (aio_timedout) { aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_write_test: " + errx(1, "FAIL: %s: aio_write_test: " "aio_waitcomplete: timed out", ac->ac_test); } } aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_write_test: aio_waitcomplete: %s", + errx(1, "FAIL: %s: aio_write_test: aio_waitcomplete: %s", ac->ac_test, strerror(errno)); } @@ -269,7 +257,7 @@ aio_write_test(struct aio_context *ac) if (len != ac->ac_buflen) { aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_write_test: aio_waitcomplete: short " + errx(1, "FAIL: %s: aio_write_test: aio_waitcomplete: short " "write (%jd)", ac->ac_test, (intmax_t)len); } } @@ -284,6 +272,8 @@ aio_read_test(struct aio_context *ac) struct aiocb aio, *aiop; ssize_t len; + aio_available(); + bzero(ac->ac_buffer, ac->ac_buflen); bzero(&aio, sizeof(aio)); aio.aio_buf = ac->ac_buffer; @@ -295,33 +285,29 @@ aio_read_test(struct aio_context *ac) if (aio_read(&aio) < 0) { if (errno == EINTR) { - if (aio_notpresent) - errno = EOPNOTSUPP; if (aio_timedout) { aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_read_test: " + errx(1, "FAIL: %s: aio_read_test: " "aio_read: timed out", ac->ac_test); } } aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_read_test: aio_read %s", ac->ac_test, + errx(1, "FAIL: %s: aio_read_test: aio_read %s", ac->ac_test, strerror(errno)); } len = aio_waitcomplete(&aiop, NULL); if (len < 0) { if (errno == EINTR) { - if (aio_notpresent) - errno = EOPNOTSUPP; if (aio_timedout) { aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_read_test: " + errx(1, "FAIL: %s: aio_read_test: " "aio_waitcomplete: timed out", ac->ac_test); } } aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_read_test: aio_waitcomplete: %s", + errx(1, "FAIL: %s: aio_read_test: aio_waitcomplete: %s", ac->ac_test, strerror(errno)); } @@ -329,13 +315,13 @@ aio_read_test(struct aio_context *ac) if (len != ac->ac_buflen) { aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_read_test: aio_waitcomplete: short " + errx(1, "FAIL: %s: aio_read_test: aio_waitcomplete: short " "read (%jd)", ac->ac_test, (intmax_t)len); } if (aio_test_buffer(ac->ac_buffer, ac->ac_buflen, ac->ac_seed) == 0) { aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_read_test: buffer mismatch", + errx(1, "FAIL: %s: aio_read_test: buffer mismatch", ac->ac_test); } } @@ -375,10 +361,12 @@ aio_file_test(void) struct aio_context ac; int fd; + aio_available(); + strcpy(pathname, PATH_TEMPLATE); fd = mkstemp(pathname); if (fd == -1) - errx(-1, "FAIL: aio_file_test: mkstemp: %s", + errx(1, "FAIL: aio_file_test: mkstemp: %s", strerror(errno)); arg.afa_fd = fd; @@ -423,15 +411,20 @@ aio_fifo_test(void) char pathname[PATH_MAX]; struct aio_context ac; + aio_available(); + /* - * In theory, mktemp() can return a name that is then collided with. + * In theory, mkstemp() can return a name that is then collided with. * Because this is a regression test, we treat that as a test failure * rather than retrying. */ strcpy(pathname, PATH_TEMPLATE); - mktemp(pathname); + if (mkstemp(pathname) == -1) + err(1, "FAIL: aio_fifo_test: mkstemp failed"); + if (unlink(pathname) == -1) + err(1, "FAIL: aio_fifo_test: unlink failed"); if (mkfifo(pathname, 0600) == -1) - errx(-1, "FAIL: aio_fifo_test: mkfifo: %s", strerror(errno)); + errx(1, "FAIL: aio_fifo_test: mkfifo: %s", strerror(errno)); arg.afa_pathname = pathname; arg.afa_read_fd = -1; arg.afa_write_fd = -1; @@ -441,7 +434,7 @@ aio_fifo_test(void) error = errno; aio_fifo_cleanup(&arg); errno = error; - errx(-1, "FAIL: aio_fifo_test: read_fd open: %s", + errx(1, "FAIL: aio_fifo_test: read_fd open: %s", strerror(errno)); } arg.afa_read_fd = read_fd; @@ -451,7 +444,7 @@ aio_fifo_test(void) error = errno; aio_fifo_cleanup(&arg); errno = error; - errx(-1, "FAIL: aio_fifo_test: write_fd open: %s", + errx(1, "FAIL: aio_fifo_test: write_fd open: %s", strerror(errno)); } arg.afa_write_fd = write_fd; @@ -489,8 +482,10 @@ aio_unix_socketpair_test(void) struct aio_context ac; int sockets[2]; + aio_available(); + if (socketpair(PF_UNIX, SOCK_STREAM, 0, sockets) < 0) - errx(-1, "FAIL: aio_socketpair_test: socketpair: %s", + errx(1, "FAIL: aio_socketpair_test: socketpair: %s", strerror(errno)); arg.asa_sockets[0] = sockets[0]; @@ -532,8 +527,10 @@ aio_pty_test(void) struct termios ts; int error; + aio_available(); + if (openpty(&read_fd, &write_fd, NULL, NULL, NULL) < 0) - errx(-1, "FAIL: aio_pty_test: openpty: %s", strerror(errno)); + errx(1, "FAIL: aio_pty_test: openpty: %s", strerror(errno)); arg.apa_read_fd = read_fd; arg.apa_write_fd = write_fd; @@ -542,7 +539,7 @@ aio_pty_test(void) error = errno; aio_pty_cleanup(&arg); errno = error; - errx(-1, "FAIL: aio_pty_test: tcgetattr: %s", + errx(1, "FAIL: aio_pty_test: tcgetattr: %s", strerror(errno)); } cfmakeraw(&ts); @@ -550,7 +547,7 @@ aio_pty_test(void) error = errno; aio_pty_cleanup(&arg); errno = error; - errx(-1, "FAIL: aio_pty_test: tcsetattr: %s", + errx(1, "FAIL: aio_pty_test: tcsetattr: %s", strerror(errno)); } @@ -581,8 +578,10 @@ aio_pipe_test(void) struct aio_context ac; int pipes[2]; + aio_available(); + if (pipe(pipes) < 0) - errx(-1, "FAIL: aio_pipe_test: pipe: %s", strerror(errno)); + errx(1, "FAIL: aio_pipe_test: pipe: %s", strerror(errno)); aio_context_init(&ac, "aio_file_test", pipes[0], pipes[1], PIPE_LEN, PIPE_TIMEOUT, aio_pipe_cleanup, pipes); @@ -633,15 +632,23 @@ aio_md_cleanup(void *arg) static void aio_md_test(void) { - int error, fd, i, mdctl_fd, unit; + int error, fd, mdctl_fd, unit; char pathname[PATH_MAX]; struct aio_md_arg arg; struct aio_context ac; struct md_ioctl mdio; + aio_available(); + + if (geteuid() != 0) { + fprintf(stderr, "WARNING: aio_md_test: skipped as euid " + "!= 0\n"); + return; + } + mdctl_fd = open("/dev/" MDCTL_NAME, O_RDWR, 0); if (mdctl_fd < 0) - errx(-1, "FAIL: aio_md_test: open(/dev/%s): %s", MDCTL_NAME, + errx(1, "FAIL: aio_md_test: open(/dev/%s): %s", MDCTL_NAME, strerror(errno)); bzero(&mdio, sizeof(mdio)); @@ -658,7 +665,7 @@ aio_md_test(void) error = errno; aio_md_cleanup(&arg); errno = error; - errx(-1, "FAIL: aio_md_test: MDIOCATTACH: %s", + errx(1, "FAIL: aio_md_test: MDIOCATTACH: %s", strerror(errno)); } @@ -669,7 +676,7 @@ aio_md_test(void) error = errno; aio_md_cleanup(&arg); errno = error; - errx(-1, "FAIL: aio_md_test: open(%s): %s", pathname, + errx(1, "FAIL: aio_md_test: open(%s): %s", pathname, strerror(errno)); } arg.ama_fd = fd; @@ -685,18 +692,15 @@ aio_md_test(void) } int -main(int argc, char *argv[]) +main(void) { - aio_sigsys_setup(); aio_file_test(); aio_fifo_test(); aio_unix_socketpair_test(); aio_pty_test(); aio_pipe_test(); - if (geteuid() == 0) - aio_md_test(); - else - fprintf(stderr, "WARNING: aio_md_test: skipped as euid " - "!= 0\n"); + aio_md_test(); + + return (0); } From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 05:08:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E594932; Sat, 25 Apr 2015 05:08:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D2EE11B1; Sat, 25 Apr 2015 05:08:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3P58V6H064463; Sat, 25 Apr 2015 05:08:31 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3P58VI6064462; Sat, 25 Apr 2015 05:08:31 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504250508.t3P58VI6064462@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 25 Apr 2015 05:08:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281972 - stable/9/share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 05:08:31 -0000 Author: ngie Date: Sat Apr 25 05:08:30 2015 New Revision: 281972 URL: https://svnweb.freebsd.org/changeset/base/281972 Log: MFstable/10 r281968: MFC r280475: The number of commands added when ddb(4) is enabled is 3, not 2 Sponsored by: EMC / Isilon Storage Division Modified: stable/9/share/man/man4/witness.4 Directory Properties: stable/9/ (props changed) stable/9/share/ (props changed) stable/9/share/man/ (props changed) stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/witness.4 ============================================================================== --- stable/9/share/man/man4/witness.4 Sat Apr 25 05:05:23 2015 (r281971) +++ stable/9/share/man/man4/witness.4 Sat Apr 25 05:08:30 2015 (r281972) @@ -106,7 +106,7 @@ can be set via .Pp The .Nm -code also provides two extra +code also provides three extra .Xr ddb 4 commands if both .Nm From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 05:32:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70C11F2C; Sat, 25 Apr 2015 05:32:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D0E61469; Sat, 25 Apr 2015 05:32:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3P5W3mE078993; Sat, 25 Apr 2015 05:32:03 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3P5Vrrn078878; Sat, 25 Apr 2015 05:31:53 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504250531.t3P5Vrrn078878@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 25 Apr 2015 05:31:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281974 - in stable/10/tools/regression/sockets: accept_fd_leak accf_data_attach fstat kqueue listen_backlog listenclose pr_atomic reconnect rtsocket sblock sendfile shutdown sigpipe so... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 05:32:03 -0000 Author: ngie Date: Sat Apr 25 05:31:52 2015 New Revision: 281974 URL: https://svnweb.freebsd.org/changeset/base/281974 Log: MFC r261550,r281354,r281355,r281356,r281358,r281359,r281360,r281361,r281362,r281391,r281392,r281393,r281394,r281395,r281397,r281398,r281399,r281400,r281401,r281402,r281403,r281404,r281407,r281408,r281409,r281410,r281411: r261550 (by glebius): Add test case for kern/181741. Right now test fails. PR: 181741 Sponsored by: Nginx, Inc. r281354: Fix warnings, fix a typo in a testcase description, bump WARNS to 3 - Remove argc/argv (-Wunused) - Cast len in comparison to size_t (-Wsign-compare) Sponsored by: EMC / Isilon Storage Division r281355: Fix -Wunused warnings, bump WARNS to 6 The testcase fails today on subtest # 9 The output is still broken if prove -rv is run and the testcase aborts prematurely (the testcase doesn't really conform to TAP protocol properly, except when it completes fully) Sponsored by: EMC / Isilon Storage Division r281356: Fix -Wunused warnings, bump WARNS to 6 The output is still broken if prove -rv is run and the testcase aborts prematurely with fail_assertion (the testcase doesn't really conform to TAP protocol properly, except when it completes fully) Sponsored by: EMC / Isilon Storage Division r281358: - Parameterize out the number of accept/connect attempts - Randomize the bind port to allow 2+ consecutive calls in < 10 minutes, and to also not fail if (for instance) there's a server already listening on port 8080 - Don't leak the listening socket / fds into the child process - Fix warnings: -- Remove argc/argv (-Wunused) -- Mark sig __unused (-Wunused) -- Mark quit static (-Wmissing-variable-declarations) Sponsored by: EMC / Isilon Storage Division r281359: Remove argc/argv (-Wunused) Sponsored by: EMC / Isilon Storage Division r281360: Fix warnings - Remove argc/argv (-Wunused) - Mark some parameters to socket_listen_update __unused (-Wunused) Sponsored by: EMC / Isilon Storage Division r281361: Remove argc/argv (-Wunused) Sponsored by: EMC / Isilon Storage Division r281362: Use _exit, not exit in forked process Sponsored by: EMC / Isilon Storage Division r281391: - Use static buffers for temporary file paths instead of strdup of constant strings - Don't use /tmp because it's outside ATF's prescribed sandbox - Use mkstemp instead of mktemp to eliminate warning Sponsored by: EMC / Isilon Storage Division r281392: - Garbage collect argc/argv (-Wunused) - Bump WARNS to 6 Sponsored by: EMC / Isilon Storage Division r281393: Fix warnings and bump WARNS to 6 - Garbage collect argc/argv (-Wunused) - sleep(3) will always return an unsigned int; don't check for return codes <0 (-Wsign-compare) Sponsored by: EMC / Isilon Storage Division r281394: - Don't use /tmp because it's outside ATF's prescribed sandbox - Replace a hardcoded PATH_MAX value with sizeof(path) - Use path like an array, not a pointer, and always try to unlink it in cleanup Sponsored by: EMC / Isilon Storage Division r281395: Fix a -Wuninitialized warning by setting the socket to -1 and bump WARNS to 6 Sponsored by: EMC / Isilon Storage Division r281397: Mark signum unused in signal_handler; bump WARNS to 6 Sponsored by: EMC / Isilon Storage Division r281398: Garbage collect argc/argv and bump WARNS to 6 Sponsored by: EMC / Isilon Storage Division r281399: Fix warnings and bump WARNS to 6 - Staticize variables as needed - Garbage collect argc/argv - Fix -Wsign-compare warnings by casting small sizeof to (int) Sponsored by: EMC / Isilon Storage Division r281400: - Garbage collect argc/argv; bump WARNS to 6 - Make the socket path random and move it out of /tmp as that's outside ATF's prescribed path Sponsored by: EMC / Isilon Storage Division r281401: - Garbage collect argc/argv - Use random paths instead of one in /tmp Sponsored by: EMC / Isilon Storage Division r281402: Garbage collect argc/argv and bump WARNS to 6 Sponsored by: EMC / Isilon Storage Division r281403: Garbage collect argc/argv and bump WARNS to 6 Sponsored by: EMC / Isilon Storage Division r281404: Generate temporary files with mkstemp instead of mktemp Sponsored by: EMC / Isilon Storage Division r281407: Fix the knob twiddling to work properly per src.opts.mk Sponsored by: EMC / Isilon Storage Division r281408: - Remove the .t wrapper and put the "magic" of determining the number of testcases into the .c file - Require root for now because it fails with SOCK_RAW without root privileges - Increment the test count properly on socket create failure Sponsored by: EMC / Isilon Storage Division r281409: Fix warnings, bump WARNS to 6, and use a temporary socket instead of one in /tmp Sponsored by: EMC / Isilon Storage Division r281410: Fix more warnings I didn't catch in the first go-around Sponsored by: EMC / Isilon Storage Division r281411: Fix even more warnings.. Sponsored by: EMC / Isilon Storage Division Deleted: stable/10/tools/regression/sockets/so_setfib/so_setfib.t Modified: stable/10/tools/regression/sockets/accept_fd_leak/Makefile stable/10/tools/regression/sockets/accept_fd_leak/accept_fd_leak.c stable/10/tools/regression/sockets/accf_data_attach/Makefile stable/10/tools/regression/sockets/accf_data_attach/accf_data_attach.c stable/10/tools/regression/sockets/fstat/Makefile stable/10/tools/regression/sockets/fstat/fstat.c stable/10/tools/regression/sockets/kqueue/Makefile stable/10/tools/regression/sockets/kqueue/kqueue.c stable/10/tools/regression/sockets/listen_backlog/Makefile stable/10/tools/regression/sockets/listen_backlog/listen_backlog.c stable/10/tools/regression/sockets/listenclose/Makefile stable/10/tools/regression/sockets/listenclose/listenclose.c stable/10/tools/regression/sockets/pr_atomic/Makefile stable/10/tools/regression/sockets/pr_atomic/pr_atomic.c stable/10/tools/regression/sockets/reconnect/Makefile stable/10/tools/regression/sockets/reconnect/reconnect.c stable/10/tools/regression/sockets/rtsocket/Makefile stable/10/tools/regression/sockets/rtsocket/rtsocket.c stable/10/tools/regression/sockets/sblock/Makefile stable/10/tools/regression/sockets/sblock/sblock.c stable/10/tools/regression/sockets/sendfile/sendfile.c stable/10/tools/regression/sockets/shutdown/Makefile stable/10/tools/regression/sockets/shutdown/shutdown.c stable/10/tools/regression/sockets/sigpipe/Makefile stable/10/tools/regression/sockets/sigpipe/sigpipe.c stable/10/tools/regression/sockets/so_setfib/Makefile stable/10/tools/regression/sockets/so_setfib/so_setfib.c stable/10/tools/regression/sockets/socketpair/Makefile stable/10/tools/regression/sockets/socketpair/socketpair.c stable/10/tools/regression/sockets/unix_bindconnect/Makefile stable/10/tools/regression/sockets/unix_bindconnect/unix_bindconnect.c stable/10/tools/regression/sockets/unix_close_race/Makefile stable/10/tools/regression/sockets/unix_close_race/unix_close_race.c stable/10/tools/regression/sockets/unix_passfd/Makefile stable/10/tools/regression/sockets/unix_passfd/unix_passfd.c stable/10/tools/regression/sockets/unix_sendtorace/Makefile stable/10/tools/regression/sockets/unix_sendtorace/unix_sendtorace.c stable/10/tools/regression/sockets/unix_socket/Makefile stable/10/tools/regression/sockets/unix_socket/unix_socket.c stable/10/tools/regression/sockets/unix_sorflush/Makefile stable/10/tools/regression/sockets/unix_sorflush/unix_sorflush.c stable/10/tools/regression/sockets/zerosend/zerosend.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/regression/sockets/accept_fd_leak/Makefile ============================================================================== --- stable/10/tools/regression/sockets/accept_fd_leak/Makefile Sat Apr 25 05:25:41 2015 (r281973) +++ stable/10/tools/regression/sockets/accept_fd_leak/Makefile Sat Apr 25 05:31:52 2015 (r281974) @@ -4,8 +4,6 @@ PROG= accept_fd_leak MAN= - -regress: - ./accept_fd_leak +WARNS?= 6 .include Modified: stable/10/tools/regression/sockets/accept_fd_leak/accept_fd_leak.c ============================================================================== --- stable/10/tools/regression/sockets/accept_fd_leak/accept_fd_leak.c Sat Apr 25 05:25:41 2015 (r281973) +++ stable/10/tools/regression/sockets/accept_fd_leak/accept_fd_leak.c Sat Apr 25 05:31:52 2015 (r281974) @@ -26,7 +26,7 @@ * $FreeBSD$ */ -#include +#include #include #include @@ -41,13 +41,16 @@ #include #include +#define BIND_ATTEMPTS 10 #define LOOPS 500 +#define NUM_ATTEMPTS 1000 -volatile int quit; +static volatile int quit; static void -child_died(int sig) +child_died(int sig __unused) { + quit = 1; } @@ -59,13 +62,12 @@ child_died(int sig) * briefly before beginning (not 100% reliable, but a good start). */ int -main(int argc, char *argv[]) +main(void) { struct sockaddr_in sin; socklen_t size; pid_t child; - int fd1, fd2, fd3, i, s; - int status; + int fd1, fd2, fd3, i, listen_port, s, status; printf("1..2\n"); @@ -85,10 +87,22 @@ main(int argc, char *argv[]) sin.sin_len = sizeof(sin); sin.sin_family = AF_INET; sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK); - sin.sin_port = htons(8080); - if (bind(s, (struct sockaddr *) &sin, sizeof(sin)) != 0) - errx(-1, "bind: %s", strerror(errno)); + srandomdev(); + + for (i = 0; i < BIND_ATTEMPTS; i++) { + /* Pick a random unprivileged port 1025-65535 */ + listen_port = MAX((int)random() % 65535, 1025); + sin.sin_port = htons(listen_port); + if (bind(s, (struct sockaddr *)&sin, sizeof(sin)) == 0) + break; + warn("bind with %d failed", listen_port); + usleep(1000); + } + if (i >= BIND_ATTEMPTS) { + printf("Bail out!\n"); + exit(1); + } if (listen(s, -1) != 0) errx(-1, "listen: %s", strerror(errno)); @@ -134,16 +148,20 @@ main(int argc, char *argv[]) errx(-1, "fork: %s", strerror(errno)); /* - * Child process does 1000 connect's. + * Child process does `NUM_ATTEMPTS` connects. */ if (child == 0) { + close(fd1); + close(fd2); + close(s); + bzero(&sin, sizeof(sin)); sin.sin_len = sizeof(sin); sin.sin_family = AF_INET; sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK); - sin.sin_port = htons(8080); + sin.sin_port = htons(listen_port); - for (i = 0; i < 1000; i++) { + for (i = 0; i < NUM_ATTEMPTS; i++) { s = socket(PF_INET, SOCK_STREAM, 0); if (s == -1) errx(-1, "socket: %s", strerror(errno)); @@ -152,7 +170,7 @@ main(int argc, char *argv[]) errx(-1, "connect: %s", strerror(errno)); close(s); } - exit(0); + _exit(0); } /* Reset back to a blocking socket. */ @@ -167,9 +185,9 @@ main(int argc, char *argv[]) errx(-1, "ioctl(F_GETFL): %s", strerror(errno)); if (i & O_NONBLOCK) errx(-1, "Failed to clear O_NONBLOCK (i=0x%x)\n", i); - - /* Do 1000 accept's with an invalid pointer. */ - for (i = 0; !quit && i < 1000; i++) { + + /* Do `NUM_ATTEMPTS` accepts with an invalid pointer. */ + for (i = 0; !quit && i < NUM_ATTEMPTS; i++) { size = sizeof(sin); if (accept(s, (struct sockaddr *)(uintptr_t)(0x100), &size) != -1) @@ -182,7 +200,7 @@ main(int argc, char *argv[]) errx(-1, "waitpid: %s", strerror(errno)); if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) warnx("child process died"); - + /* * Allocate a file descriptor and make sure it's fd2+2. 2 because * we allocate an fd for the socket. Modified: stable/10/tools/regression/sockets/accf_data_attach/Makefile ============================================================================== --- stable/10/tools/regression/sockets/accf_data_attach/Makefile Sat Apr 25 05:25:41 2015 (r281973) +++ stable/10/tools/regression/sockets/accf_data_attach/Makefile Sat Apr 25 05:31:52 2015 (r281974) @@ -4,8 +4,6 @@ PROG= accf_data_attach MAN= - -accf_data_attach: accf_data_attach.c - gcc -Wall -o accf_data_attach accf_data_attach.c +WARNS?= 6 .include Modified: stable/10/tools/regression/sockets/accf_data_attach/accf_data_attach.c ============================================================================== --- stable/10/tools/regression/sockets/accf_data_attach/accf_data_attach.c Sat Apr 25 05:25:41 2015 (r281973) +++ stable/10/tools/regression/sockets/accf_data_attach/accf_data_attach.c Sat Apr 25 05:31:52 2015 (r281974) @@ -58,7 +58,7 @@ * make sure it is removed. */ int -main(int argc, char *argv[]) +main(void) { struct accept_filter_arg afa; struct sockaddr_in sin; Modified: stable/10/tools/regression/sockets/fstat/Makefile ============================================================================== --- stable/10/tools/regression/sockets/fstat/Makefile Sat Apr 25 05:25:41 2015 (r281973) +++ stable/10/tools/regression/sockets/fstat/Makefile Sat Apr 25 05:31:52 2015 (r281974) @@ -4,6 +4,6 @@ PROG= fstat MAN= -WARNS?= 2 +WARNS?= 6 .include Modified: stable/10/tools/regression/sockets/fstat/fstat.c ============================================================================== --- stable/10/tools/regression/sockets/fstat/fstat.c Sat Apr 25 05:25:41 2015 (r281973) +++ stable/10/tools/regression/sockets/fstat/fstat.c Sat Apr 25 05:31:52 2015 (r281974) @@ -57,7 +57,7 @@ dotest(int domain, int type, int protoco } int -main(int argc, char *argv[]) +main(void) { dotest(PF_INET, SOCK_DGRAM, 0); Modified: stable/10/tools/regression/sockets/kqueue/Makefile ============================================================================== --- stable/10/tools/regression/sockets/kqueue/Makefile Sat Apr 25 05:25:41 2015 (r281973) +++ stable/10/tools/regression/sockets/kqueue/Makefile Sat Apr 25 05:31:52 2015 (r281974) @@ -4,5 +4,6 @@ PROG= kqueue MAN= +WARNS?= 6 .include Modified: stable/10/tools/regression/sockets/kqueue/kqueue.c ============================================================================== --- stable/10/tools/regression/sockets/kqueue/kqueue.c Sat Apr 25 05:25:41 2015 (r281973) +++ stable/10/tools/regression/sockets/kqueue/kqueue.c Sat Apr 25 05:31:52 2015 (r281974) @@ -250,9 +250,9 @@ test_evfilt_write(int kq, int fd[2], con * sockets, and confirm that we can register for various events on them. */ int -main(int argc, char *argv[]) +main(void) { - int i, kq, sv[2]; + int kq, sv[2]; printf("1..49\n"); Modified: stable/10/tools/regression/sockets/listen_backlog/Makefile ============================================================================== --- stable/10/tools/regression/sockets/listen_backlog/Makefile Sat Apr 25 05:25:41 2015 (r281973) +++ stable/10/tools/regression/sockets/listen_backlog/Makefile Sat Apr 25 05:31:52 2015 (r281974) @@ -1,7 +1,7 @@ # $FreeBSD$ PROG= listen_backlog -WARNS?= 3 MAN= +WARNS?= 6 .include Modified: stable/10/tools/regression/sockets/listen_backlog/listen_backlog.c ============================================================================== --- stable/10/tools/regression/sockets/listen_backlog/listen_backlog.c Sat Apr 25 05:25:41 2015 (r281973) +++ stable/10/tools/regression/sockets/listen_backlog/listen_backlog.c Sat Apr 25 05:31:52 2015 (r281974) @@ -218,7 +218,8 @@ test_defaults(void) * the first and second listen(). */ static int -socket_listen_update(int domain, int type, int protocol, int backlog, +socket_listen_update(int domain __unused, int type __unused, + int protocol __unused, int backlog, int update_backlog, int listen_backlog_assertion, int update_backlog_assertion, int *sockp, const char *domainstring, const char *typestring, const char *testclass, const char *test) @@ -365,7 +366,7 @@ test_set_qlimit(void) } int -main(int argc, char *argv[]) +main(void) { size_t len; Modified: stable/10/tools/regression/sockets/listenclose/Makefile ============================================================================== --- stable/10/tools/regression/sockets/listenclose/Makefile Sat Apr 25 05:25:41 2015 (r281973) +++ stable/10/tools/regression/sockets/listenclose/Makefile Sat Apr 25 05:31:52 2015 (r281974) @@ -4,6 +4,6 @@ PROG= listenclose MAN= -WARNS?= 2 +WARNS?= 6 .include Modified: stable/10/tools/regression/sockets/listenclose/listenclose.c ============================================================================== --- stable/10/tools/regression/sockets/listenclose/listenclose.c Sat Apr 25 05:25:41 2015 (r281973) +++ stable/10/tools/regression/sockets/listenclose/listenclose.c Sat Apr 25 05:31:52 2015 (r281974) @@ -52,7 +52,7 @@ */ int -main(int argc, char *argv[]) +main(void) { int listen_sock, connect_sock; struct sockaddr_in sin; Modified: stable/10/tools/regression/sockets/pr_atomic/Makefile ============================================================================== --- stable/10/tools/regression/sockets/pr_atomic/Makefile Sat Apr 25 05:25:41 2015 (r281973) +++ stable/10/tools/regression/sockets/pr_atomic/Makefile Sat Apr 25 05:31:52 2015 (r281974) @@ -2,6 +2,6 @@ PROG= pr_atomic MAN= -WARNS?= 3 +WARNS?= 6 .include Modified: stable/10/tools/regression/sockets/pr_atomic/pr_atomic.c ============================================================================== --- stable/10/tools/regression/sockets/pr_atomic/pr_atomic.c Sat Apr 25 05:25:41 2015 (r281973) +++ stable/10/tools/regression/sockets/pr_atomic/pr_atomic.c Sat Apr 25 05:31:52 2015 (r281974) @@ -42,31 +42,31 @@ #include #include -#define TEST_SOCKET "/tmp/test_socket" +static char socket_path[] = "tmp.XXXXXX"; static jmp_buf myjmpbuf; -void handle_sigalrm(int signo); - -void handle_sigalrm(int signo) +static void handle_sigalrm(int signo __unused) { longjmp(myjmpbuf, 1); } int -main(int argc, char *argv[]) +main(void) { struct sockaddr_un un; pid_t pid; int s; + if (mkstemp(socket_path) == -1) + err(1, "mkstemp"); s = socket(PF_LOCAL, SOCK_DGRAM, 0); if (s == -1) errx(-1, "socket"); memset(&un, 0, sizeof(un)); un.sun_family = AF_LOCAL; - unlink(TEST_SOCKET); - strcpy(un.sun_path, TEST_SOCKET); + unlink(socket_path); + strcpy(un.sun_path, socket_path); if (bind(s, (struct sockaddr *)&un, sizeof(un)) == -1) errx(-1, "bind"); pid = fork(); Modified: stable/10/tools/regression/sockets/reconnect/Makefile ============================================================================== --- stable/10/tools/regression/sockets/reconnect/Makefile Sat Apr 25 05:25:41 2015 (r281973) +++ stable/10/tools/regression/sockets/reconnect/Makefile Sat Apr 25 05:31:52 2015 (r281974) @@ -4,6 +4,6 @@ PROG= reconnect MAN= -WARNS?= 2 +WARNS?= 6 .include Modified: stable/10/tools/regression/sockets/reconnect/reconnect.c ============================================================================== --- stable/10/tools/regression/sockets/reconnect/reconnect.c Sat Apr 25 05:25:41 2015 (r281973) +++ stable/10/tools/regression/sockets/reconnect/reconnect.c Sat Apr 25 05:31:52 2015 (r281974) @@ -45,12 +45,12 @@ #include #include -static char *uds_name1 = NULL; -static char *uds_name2 = NULL; +static char uds_name1[] = "reconnect.XXXXXXXX"; +static char uds_name2[] = "reconnect.XXXXXXXX"; #define sstosa(ss) ((struct sockaddr *)(ss)) -void +static void prepare_ifsun(struct sockaddr_un *ifsun, const char *path) { @@ -62,7 +62,7 @@ prepare_ifsun(struct sockaddr_un *ifsun, strcpy(ifsun->sun_path, path); } -int +static int create_uds_server(const char *path) { struct sockaddr_un ifsun; @@ -82,7 +82,7 @@ create_uds_server(const char *path) return sock; } -void +static void connect_uds_server(int sock, const char *path) { struct sockaddr_un ifsun; @@ -95,14 +95,12 @@ connect_uds_server(int sock, const char err(1, "can't connect to a socket"); } -void +static void cleanup(void) { - if (uds_name1 != NULL) - unlink(uds_name1); - if (uds_name2 != NULL) - unlink(uds_name2); + unlink(uds_name1); + unlink(uds_name2); } int @@ -112,20 +110,14 @@ main() atexit(cleanup); - uds_name1 = strdup("/tmp/reconnect.XXXXXX"); - if (uds_name1 == NULL) - err(1, "can't allocate memory"); - uds_name1 = mktemp(uds_name1); - if (uds_name1 == NULL) - err(1, "mktemp(3) failed"); + if (mkstemp(uds_name1) == -1) + err(1, "mkstemp"); + unlink(uds_name1); s_sock1 = create_uds_server(uds_name1); - uds_name2 = strdup("/tmp/reconnect.XXXXXX"); - if (uds_name2 == NULL) - err(1, "can't allocate memory"); - uds_name2 = mktemp(uds_name2); - if (uds_name2 == NULL) - err(1, "mktemp(3) failed"); + if (mkstemp(uds_name2) == -1) + err(1, "mkstemp"); + unlink(uds_name2); s_sock2 = create_uds_server(uds_name2); c_sock = socket(PF_LOCAL, SOCK_DGRAM, 0); Modified: stable/10/tools/regression/sockets/rtsocket/Makefile ============================================================================== --- stable/10/tools/regression/sockets/rtsocket/Makefile Sat Apr 25 05:25:41 2015 (r281973) +++ stable/10/tools/regression/sockets/rtsocket/Makefile Sat Apr 25 05:31:52 2015 (r281974) @@ -2,6 +2,6 @@ PROG= rtsocket MAN= -WARNS?= 3 +WARNS?= 6 .include Modified: stable/10/tools/regression/sockets/rtsocket/rtsocket.c ============================================================================== --- stable/10/tools/regression/sockets/rtsocket/rtsocket.c Sat Apr 25 05:25:41 2015 (r281973) +++ stable/10/tools/regression/sockets/rtsocket/rtsocket.c Sat Apr 25 05:31:52 2015 (r281974) @@ -41,7 +41,7 @@ #include int -main(int argc, char *argv[]) +main(void) { int sock, socks[2]; Modified: stable/10/tools/regression/sockets/sblock/Makefile ============================================================================== --- stable/10/tools/regression/sockets/sblock/Makefile Sat Apr 25 05:25:41 2015 (r281973) +++ stable/10/tools/regression/sockets/sblock/Makefile Sat Apr 25 05:31:52 2015 (r281974) @@ -4,6 +4,6 @@ PROG= sblock MAN= -WARNS?= 2 +WARNS?= 6 .include Modified: stable/10/tools/regression/sockets/sblock/sblock.c ============================================================================== --- stable/10/tools/regression/sockets/sblock/sblock.c Sat Apr 25 05:25:41 2015 (r281973) +++ stable/10/tools/regression/sockets/sblock/sblock.c Sat Apr 25 05:31:52 2015 (r281974) @@ -54,7 +54,7 @@ static int interrupted; static void -signal_handler(int signum) +signal_handler(int signum __unused) { interrupted++; @@ -95,7 +95,7 @@ locking_recver(int fd) ssize_t len; char ch; - if (sleep(1) < 0) + if (sleep(1) != 0) err(-1, "FAIL: locking_recver: sleep"); len = recv(fd, &ch, sizeof(ch), 0); if (len < 0 && errno != EINTR) @@ -116,7 +116,7 @@ signaller(pid_t locking_recver_pid, int ssize_t len; char ch; - if (sleep(2) < 0) { + if (sleep(2) != 0) { warn("signaller sleep(2)"); return; } @@ -124,7 +124,7 @@ signaller(pid_t locking_recver_pid, int warn("signaller kill(%d)", locking_recver_pid); return; } - if (sleep(1) < 0) { + if (sleep(1) != 0) { warn("signaller sleep(1)"); return; } @@ -141,14 +141,14 @@ signaller(pid_t locking_recver_pid, int warn("signaller close"); return; } - if (sleep(1) < 0) { + if (sleep(1) != 0) { warn("signaller sleep(1)"); return; } } int -main(int argc, char *argv[]) +main(void) { int error, fds[2], recver_fd, sender_fd; pid_t blocking_recver_pid; Modified: stable/10/tools/regression/sockets/sendfile/sendfile.c ============================================================================== --- stable/10/tools/regression/sockets/sendfile/sendfile.c Sat Apr 25 05:25:41 2015 (r281973) +++ stable/10/tools/regression/sockets/sendfile/sendfile.c Sat Apr 25 05:31:52 2015 (r281974) @@ -452,8 +452,8 @@ run_parent(void) static void cleanup(void) { - if (*path != '\0') - unlink(path); + + unlink(path); } int @@ -461,12 +461,12 @@ main(int argc, char *argv[]) { int pagesize; - *path = '\0'; + path[0] = '\0'; pagesize = getpagesize(); if (argc == 1) { - snprintf(path, PATH_MAX, "/tmp/sendfile.XXXXXXXXXXXX"); + snprintf(path, sizeof(path), "sendfile.XXXXXXXXXXXX"); file_fd = mkstemp(path); if (file_fd == -1) FAIL_ERR("mkstemp"); Modified: stable/10/tools/regression/sockets/shutdown/Makefile ============================================================================== --- stable/10/tools/regression/sockets/shutdown/Makefile Sat Apr 25 05:25:41 2015 (r281973) +++ stable/10/tools/regression/sockets/shutdown/Makefile Sat Apr 25 05:31:52 2015 (r281974) @@ -4,6 +4,6 @@ PROG= shutdown MAN= -WARNS?= 2 +WARNS?= 6 .include Modified: stable/10/tools/regression/sockets/shutdown/shutdown.c ============================================================================== --- stable/10/tools/regression/sockets/shutdown/shutdown.c Sat Apr 25 05:25:41 2015 (r281973) +++ stable/10/tools/regression/sockets/shutdown/shutdown.c Sat Apr 25 05:31:52 2015 (r281974) @@ -45,6 +45,8 @@ main(void) int listen_sock, connect_sock; u_short port; + listen_sock = -1; + /* Shutdown(2) on an invalid file descriptor has to return EBADF. */ if ((shutdown(listen_sock, SHUT_RDWR) != -1) && (errno != EBADF)) errx(-1, "shutdown() for invalid file descriptor does not " Modified: stable/10/tools/regression/sockets/sigpipe/Makefile ============================================================================== --- stable/10/tools/regression/sockets/sigpipe/Makefile Sat Apr 25 05:25:41 2015 (r281973) +++ stable/10/tools/regression/sockets/sigpipe/Makefile Sat Apr 25 05:31:52 2015 (r281974) @@ -4,6 +4,6 @@ PROG= sigpipe MAN= -WARNS?= 2 +WARNS?= 6 .include Modified: stable/10/tools/regression/sockets/sigpipe/sigpipe.c ============================================================================== --- stable/10/tools/regression/sockets/sigpipe/sigpipe.c Sat Apr 25 05:25:41 2015 (r281973) +++ stable/10/tools/regression/sockets/sigpipe/sigpipe.c Sat Apr 25 05:31:52 2015 (r281974) @@ -69,7 +69,7 @@ got_signal(void) } static void -signal_handler(int signum) +signal_handler(int signum __unused) { signaled = 1; Modified: stable/10/tools/regression/sockets/so_setfib/Makefile ============================================================================== --- stable/10/tools/regression/sockets/so_setfib/Makefile Sat Apr 25 05:25:41 2015 (r281973) +++ stable/10/tools/regression/sockets/so_setfib/Makefile Sat Apr 25 05:31:52 2015 (r281974) @@ -1,14 +1,16 @@ # $FreeBSD$ +.include + PROG= so_setfib MAN= WARNS?= 6 -.ifdef INET6 -CFLAGS+= -DINET6 -.endif -.ifdef INET +.if ${MK_INET} != "no" CFLAGS+= -DINET .endif +.if ${MK_INET6} != "no" +CFLAGS+= -DINET6 +.endif .include Modified: stable/10/tools/regression/sockets/so_setfib/so_setfib.c ============================================================================== --- stable/10/tools/regression/sockets/so_setfib/so_setfib.c Sat Apr 25 05:25:41 2015 (r281973) +++ stable/10/tools/regression/sockets/so_setfib/so_setfib.c Sat Apr 25 05:31:52 2015 (r281974) @@ -45,6 +45,7 @@ * 5. Repeat for next domain family and type from (2) on. */ +#include #include #include #include @@ -143,6 +144,7 @@ t(u_int dom, u_int type) if (s == -1) { printf("not ok %d %s_%s # socket(): %s\n", testno, t_dom[dom].name, t_type[type].name, strerror(errno)); + testno++; return; } @@ -168,6 +170,11 @@ main(int argc __unused, char *argv[] __u u_int i, j; size_t s; + if (geteuid() != 0) { + printf("1..0 # SKIP: must be root"); + return (0); + } + /* Initalize randomness. */ srandomdev(); @@ -175,6 +182,10 @@ main(int argc __unused, char *argv[] __u s = sizeof(rt_numfibs); if (sysctlbyname("net.fibs", &rt_numfibs, &s, NULL, 0) == -1) err(1, "sysctlbyname(net.fibs, ..)"); + + printf("1..%lu\n", + (nitems(t_dom) - 1) * nitems(t_type) * (2 + rt_numfibs + 2 + 3)); + /* Adjust from number to index. */ rt_numfibs -= 1; Modified: stable/10/tools/regression/sockets/socketpair/Makefile ============================================================================== --- stable/10/tools/regression/sockets/socketpair/Makefile Sat Apr 25 05:25:41 2015 (r281973) +++ stable/10/tools/regression/sockets/socketpair/Makefile Sat Apr 25 05:31:52 2015 (r281974) @@ -4,6 +4,6 @@ PROG= socketpair MAN= -WARNS?= 2 +WARNS?= 6 .include Modified: stable/10/tools/regression/sockets/socketpair/socketpair.c ============================================================================== --- stable/10/tools/regression/sockets/socketpair/socketpair.c Sat Apr 25 05:25:41 2015 (r281973) +++ stable/10/tools/regression/sockets/socketpair/socketpair.c Sat Apr 25 05:31:52 2015 (r281974) @@ -47,7 +47,7 @@ * right places. */ int -main(int argc, char *argv[]) +main(void) { int fd1, fd2, fd3; int sv[2]; Modified: stable/10/tools/regression/sockets/unix_bindconnect/Makefile ============================================================================== --- stable/10/tools/regression/sockets/unix_bindconnect/Makefile Sat Apr 25 05:25:41 2015 (r281973) +++ stable/10/tools/regression/sockets/unix_bindconnect/Makefile Sat Apr 25 05:31:52 2015 (r281974) @@ -2,6 +2,6 @@ PROG= unix_bindconnect MAN= -WARNS?= 2 +WARNS?= 6 .include Modified: stable/10/tools/regression/sockets/unix_bindconnect/unix_bindconnect.c ============================================================================== --- stable/10/tools/regression/sockets/unix_bindconnect/unix_bindconnect.c Sat Apr 25 05:25:41 2015 (r281973) +++ stable/10/tools/regression/sockets/unix_bindconnect/unix_bindconnect.c Sat Apr 25 05:31:52 2015 (r281974) @@ -54,8 +54,8 @@ #define UNWIND_MAX 1024 -int unwind_len; -struct unwind { +static int unwind_len; +static struct unwind { char u_path[PATH_MAX]; } unwind_list[UNWIND_MAX]; @@ -105,7 +105,7 @@ bind_test(const char *directory_path) sun.sun_len = sizeof(sun); sun.sun_family = AF_UNIX; if (snprintf(sun.sun_path, sizeof(sun.sun_path), "%s", socket_path) - >= sizeof(sun.sun_path)) { + >= (int)sizeof(sun.sun_path)) { warn("bind_test: snprintf(sun.sun_path)"); close(sock1); return (-1); @@ -216,7 +216,7 @@ connect_test(const char *directory_path) sun.sun_len = sizeof(sun); sun.sun_family = AF_UNIX; if (snprintf(sun.sun_path, sizeof(sun.sun_path), "%s", socket_path) - >= sizeof(sun.sun_path)) { + >= (int)sizeof(sun.sun_path)) { warn("connect_test: snprintf(sun.sun_path)"); close(sock1); return (-1); @@ -298,7 +298,7 @@ connect_test(const char *directory_path) return (0); } int -main(int argc, char *argv[]) +main(void) { char directory_path[PATH_MAX]; int error; Modified: stable/10/tools/regression/sockets/unix_close_race/Makefile ============================================================================== --- stable/10/tools/regression/sockets/unix_close_race/Makefile Sat Apr 25 05:25:41 2015 (r281973) +++ stable/10/tools/regression/sockets/unix_close_race/Makefile Sat Apr 25 05:31:52 2015 (r281974) @@ -2,6 +2,6 @@ PROG= unix_close_race MAN= -WARNS?= 3 +WARNS?= 6 .include Modified: stable/10/tools/regression/sockets/unix_close_race/unix_close_race.c ============================================================================== --- stable/10/tools/regression/sockets/unix_close_race/unix_close_race.c Sat Apr 25 05:25:41 2015 (r281973) +++ stable/10/tools/regression/sockets/unix_close_race/unix_close_race.c Sat Apr 25 05:31:52 2015 (r281974) @@ -54,12 +54,13 @@ #include #include -#define UNIXSTR_PATH "/tmp/mytest.socket" +static char socket_path[] = "tmp.XXXXXXXX"; + #define USLEEP 100 #define LOOPS 100000 int -main(int argc, char **argv) +main(void) { struct sockaddr_un servaddr; int listenfd, connfd, pid; @@ -74,16 +75,20 @@ main(int argc, char **argv) if (ncpus < 2) warnx("SMP not present, test may be unable to trigger race"); + if (mkstemp(socket_path) == -1) + err(1, "mkstemp failed"); + unlink(socket_path); + /* * Create a UNIX domain socket that the child will repeatedly * accept() from, and that the parent will repeatedly connect() to. */ if ((listenfd = socket(AF_LOCAL, SOCK_STREAM, 0)) < 0) err(1, "parent: socket error"); - (void)unlink(UNIXSTR_PATH); + (void)unlink(socket_path); bzero(&servaddr, sizeof(servaddr)); servaddr.sun_family = AF_LOCAL; - strcpy(servaddr.sun_path, UNIXSTR_PATH); + strcpy(servaddr.sun_path, socket_path); if (bind(listenfd, (struct sockaddr *) &servaddr, sizeof(servaddr)) < 0) err(1, "parent: bind error"); @@ -102,7 +107,7 @@ main(int argc, char **argv) sleep(1); bzero(&servaddr, sizeof(servaddr)); servaddr.sun_family = AF_LOCAL; - strcpy(servaddr.sun_path, UNIXSTR_PATH); + strcpy(servaddr.sun_path, socket_path); for (counter = 0; counter < LOOPS; counter++) { if ((connfd = socket(AF_LOCAL, SOCK_STREAM, 0)) < 0) { (void)kill(pid, SIGTERM); Modified: stable/10/tools/regression/sockets/unix_passfd/Makefile ============================================================================== --- stable/10/tools/regression/sockets/unix_passfd/Makefile Sat Apr 25 05:25:41 2015 (r281973) +++ stable/10/tools/regression/sockets/unix_passfd/Makefile Sat Apr 25 05:31:52 2015 (r281974) @@ -2,6 +2,6 @@ PROG= unix_passfd MAN= -WARNS?= 2 +WARNS?= 3 .include Modified: stable/10/tools/regression/sockets/unix_passfd/unix_passfd.c ============================================================================== --- stable/10/tools/regression/sockets/unix_passfd/unix_passfd.c Sat Apr 25 05:25:41 2015 (r281973) +++ stable/10/tools/regression/sockets/unix_passfd/unix_passfd.c Sat Apr 25 05:31:52 2015 (r281974) @@ -29,11 +29,14 @@ #include #include #include +#include +#include #include #include #include #include +#include #include #include @@ -106,11 +109,10 @@ samefile(const char *test, struct stat * } static void -sendfd(const char *test, int sockfd, int sendfd) +sendfd_payload(const char *test, int sockfd, int sendfd, + void *payload, size_t paylen) { struct iovec iovec; - char ch; - char message[CMSG_SPACE(sizeof(int))]; struct cmsghdr *cmsghdr; struct msghdr msghdr; @@ -118,13 +120,12 @@ sendfd(const char *test, int sockfd, int bzero(&msghdr, sizeof(msghdr)); bzero(&message, sizeof(message)); - ch = 0; msghdr.msg_control = message; msghdr.msg_controllen = sizeof(message); - iovec.iov_base = &ch; - iovec.iov_len = sizeof(ch); + iovec.iov_base = payload; + iovec.iov_len = paylen; msghdr.msg_iov = &iovec; msghdr.msg_iovlen = 1; @@ -138,33 +139,35 @@ sendfd(const char *test, int sockfd, int len = sendmsg(sockfd, &msghdr, 0); if (len < 0) err(-1, "%s: sendmsg", test); - if (len != sizeof(ch)) + if ((size_t)len != paylen) errx(-1, "%s: sendmsg: %zd bytes sent", test, len); } static void -recvfd(const char *test, int sockfd, int *recvfd) +sendfd(const char *test, int sockfd, int sendfd) +{ + char ch; + + return (sendfd_payload(test, sockfd, sendfd, &ch, sizeof(ch))); +} + +static void +recvfd_payload(const char *test, int sockfd, int *recvfd, + void *buf, size_t buflen) { struct cmsghdr *cmsghdr; - char message[CMSG_SPACE(sizeof(int))]; + char message[CMSG_SPACE(SOCKCREDSIZE(CMGROUP_MAX)) + sizeof(int)]; struct msghdr msghdr; struct iovec iovec; ssize_t len; - char ch; bzero(&msghdr, sizeof(msghdr)); - ch = 0; msghdr.msg_control = message; msghdr.msg_controllen = sizeof(message); - iovec.iov_base = &ch; - iovec.iov_len = sizeof(ch); - - msghdr.msg_iov = &iovec; - msghdr.msg_iovlen = 1; - - iovec.iov_len = sizeof(ch); + iovec.iov_base = buf; + iovec.iov_len = buflen; msghdr.msg_iov = &iovec; msghdr.msg_iovlen = 1; @@ -172,23 +175,37 @@ recvfd(const char *test, int sockfd, int len = recvmsg(sockfd, &msghdr, 0); if (len < 0) err(-1, "%s: recvmsg", test); - if (len != sizeof(ch)) + if ((size_t)len != buflen) errx(-1, "%s: recvmsg: %zd bytes received", test, len); + cmsghdr = CMSG_FIRSTHDR(&msghdr); if (cmsghdr == NULL) errx(-1, "%s: recvmsg: did not receive control message", test); - if (cmsghdr->cmsg_len != CMSG_LEN(sizeof(int)) || - cmsghdr->cmsg_level != SOL_SOCKET || - cmsghdr->cmsg_type != SCM_RIGHTS) + *recvfd = -1; + for (; cmsghdr != NULL; cmsghdr = CMSG_NXTHDR(&msghdr, cmsghdr)) { + if (cmsghdr->cmsg_level == SOL_SOCKET && + cmsghdr->cmsg_type == SCM_RIGHTS && + cmsghdr->cmsg_len == CMSG_LEN(sizeof(int))) { + *recvfd = *(int *)CMSG_DATA(cmsghdr); + if (*recvfd == -1) + errx(-1, "%s: recvmsg: received fd -1", test); + } + } + if (*recvfd == -1) errx(-1, "%s: recvmsg: did not receive single-fd message", test); - *recvfd = *(int *)CMSG_DATA(cmsghdr); - if (*recvfd == -1) - errx(-1, "%s: recvmsg: received fd -1", test); +} + +static void +recvfd(const char *test, int sockfd, int *recvfd) +{ + char ch; + + return (recvfd_payload(test, sockfd, recvfd, &ch, sizeof(ch))); } int -main(int argc, char *argv[]) +main(void) { struct stat putfd_1_stat, putfd_2_stat, getfd_1_stat, getfd_2_stat; int fd[2], putfd_1, putfd_2, getfd_1, getfd_2; @@ -330,6 +347,43 @@ main(int argc, char *argv[]) closesocketpair(fd); printf("%s passed\n", test); + + /* + * Test for PR 181741. Receiver sets LOCAL_CREDS, and kernel + * prepends a control message to the data. Sender sends large + * payload. Payload + SCM_RIGHTS + LOCAL_CREDS hit socket buffer + * limit, and receiver receives truncated data. + */ + test = "test8-rights+creds+payload"; + printf("beginning %s\n", test); + + { + const int on = 1; + u_long sendspace; + size_t len; + void *buf; + + len = sizeof(sendspace); + if (sysctlbyname("net.local.stream.sendspace", &sendspace, + &len, NULL, 0) < 0) + err(-1, "%s: sysctlbyname(net.local.stream.sendspace)", + test); + + if ((buf = malloc(sendspace)) == NULL) + err(-1, "%s: malloc", test); + + domainsocketpair(test, fd); + if (setsockopt(fd[1], 0, LOCAL_CREDS, &on, sizeof(on)) < 0) + err(-1, "%s: setsockopt(LOCAL_CREDS)", test); + tempfile(test, &putfd_1); + sendfd_payload(test, fd[0], putfd_1, buf, sendspace); + recvfd_payload(test, fd[1], &getfd_1, buf, sendspace); + close(putfd_1); + close(getfd_1); + closesocketpair(fd); + } + + printf("%s passed\n", test); return (0); } Modified: stable/10/tools/regression/sockets/unix_sendtorace/Makefile ============================================================================== --- stable/10/tools/regression/sockets/unix_sendtorace/Makefile Sat Apr 25 05:25:41 2015 (r281973) +++ stable/10/tools/regression/sockets/unix_sendtorace/Makefile Sat Apr 25 05:31:52 2015 (r281974) @@ -2,6 +2,6 @@ PROG= unix_sendtorace MAN= -WARNS?= 3 +WARNS?= 6 .include Modified: stable/10/tools/regression/sockets/unix_sendtorace/unix_sendtorace.c ============================================================================== --- stable/10/tools/regression/sockets/unix_sendtorace/unix_sendtorace.c Sat Apr 25 05:25:41 2015 (r281973) +++ stable/10/tools/regression/sockets/unix_sendtorace/unix_sendtorace.c Sat Apr 25 05:31:52 2015 (r281974) @@ -45,9 +45,10 @@ #include #include -#define PATH "/tmp/123" #define ITERATIONS 1000000 +static char socket_path[] = "tmp.XXXXXX"; + static void stream_server(int listenfd) { @@ -75,7 +76,7 @@ stream_client(void) bzero(&sun, sizeof(sun)); sun.sun_len = sizeof(sun); sun.sun_family = AF_UNIX; - strcpy(sun.sun_path, PATH); + strcpy(sun.sun_path, socket_path); for (i = 0; i < ITERATIONS; i++) { fd = socket(PF_UNIX, SOCK_STREAM, 0); if (fd < 0) { @@ -104,7 +105,7 @@ stream_test(void) bzero(&sun, sizeof(sun)); sun.sun_len = sizeof(sun); sun.sun_family = AF_UNIX; - strcpy(sun.sun_path, PATH); + strcpy(sun.sun_path, socket_path); if (bind(listenfd, (struct sockaddr *)&sun, sizeof(sun)) < 0) err(-1, "stream_test: bind"); @@ -124,7 +125,7 @@ stream_test(void) } else stream_server(listenfd); - (void)unlink(PATH); + (void)unlink(socket_path); } static void @@ -151,7 +152,7 @@ datagram_client(void) bzero(&sun, sizeof(sun)); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 06:49:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 22428B79; Sat, 25 Apr 2015 06:49:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 105C21AC8; Sat, 25 Apr 2015 06:49:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3P6nIjc014823; Sat, 25 Apr 2015 06:49:18 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3P6nIAx014822; Sat, 25 Apr 2015 06:49:18 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504250649.t3P6nIAx014822@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 25 Apr 2015 06:49:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281976 - stable/10/sys/dev/virtio/block X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 06:49:19 -0000 Author: mav Date: Sat Apr 25 06:49:18 2015 New Revision: 281976 URL: https://svnweb.freebsd.org/changeset/base/281976 Log: MFC r281698: Do not report stripe size if it is equal to sector size. Modified: stable/10/sys/dev/virtio/block/virtio_blk.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/virtio/block/virtio_blk.c ============================================================================== --- stable/10/sys/dev/virtio/block/virtio_blk.c Sat Apr 25 06:07:19 2015 (r281975) +++ stable/10/sys/dev/virtio/block/virtio_blk.c Sat Apr 25 06:49:18 2015 (r281976) @@ -712,7 +712,8 @@ vtblk_alloc_disk(struct vtblk_softc *sc, dp->d_fwheads = blkcfg->geometry.heads; } - if (virtio_with_feature(dev, VIRTIO_BLK_F_TOPOLOGY)) { + if (virtio_with_feature(dev, VIRTIO_BLK_F_TOPOLOGY) && + blkcfg->topology.physical_block_exp > 0) { dp->d_stripesize = dp->d_sectorsize * (1 << blkcfg->topology.physical_block_exp); dp->d_stripeoffset = (dp->d_stripesize - From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 06:50:16 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A39E2CAB; Sat, 25 Apr 2015 06:50:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 914C21ACD; Sat, 25 Apr 2015 06:50:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3P6oGur015570; Sat, 25 Apr 2015 06:50:16 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3P6oGbP015569; Sat, 25 Apr 2015 06:50:16 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504250650.t3P6oGbP015569@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 25 Apr 2015 06:50:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281977 - stable/9/sys/dev/virtio/block X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 06:50:16 -0000 Author: mav Date: Sat Apr 25 06:50:15 2015 New Revision: 281977 URL: https://svnweb.freebsd.org/changeset/base/281977 Log: MFC r281698: Do not report stripe size if it is equal to sector size. Modified: stable/9/sys/dev/virtio/block/virtio_blk.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/virtio/block/virtio_blk.c ============================================================================== --- stable/9/sys/dev/virtio/block/virtio_blk.c Sat Apr 25 06:49:18 2015 (r281976) +++ stable/9/sys/dev/virtio/block/virtio_blk.c Sat Apr 25 06:50:15 2015 (r281977) @@ -728,7 +728,8 @@ vtblk_alloc_disk(struct vtblk_softc *sc, dp->d_fwheads = blkcfg->geometry.heads; } - if (virtio_with_feature(dev, VIRTIO_BLK_F_TOPOLOGY)) { + if (virtio_with_feature(dev, VIRTIO_BLK_F_TOPOLOGY) && + blkcfg->topology.physical_block_exp > 0) { dp->d_stripesize = dp->d_sectorsize * (1 << blkcfg->topology.physical_block_exp); dp->d_stripeoffset = (dp->d_stripesize - From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 07:07:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE804FC1; Sat, 25 Apr 2015 07:07:40 +0000 (UTC) Received: from heemeyer.club (heemeyer.club [IPv6:2001:19f0:6400:80a1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "heemeyer.club", Issuer "heemeyer.club" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 807CD1C9D; Sat, 25 Apr 2015 07:07:39 +0000 (UTC) Received: from dchagin.static.corbina.net (dchagin.static.corbina.ru [78.107.232.239]) by heemeyer.club (8.15.1/8.15.1) with ESMTPS id t3P77DbL046092 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 25 Apr 2015 07:07:27 GMT (envelope-from dchagin@dchagin.static.corbina.net) X-Authentication-Warning: heemeyer.club: Host dchagin.static.corbina.ru [78.107.232.239] claimed to be dchagin.static.corbina.net Received: from dchagin.static.corbina.net (localhost [127.0.0.1]) by dchagin.static.corbina.net (8.15.1/8.15.1) with ESMTPS id t3P774YH003471 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 25 Apr 2015 10:07:09 +0300 (MSK) (envelope-from dchagin@dchagin.static.corbina.net) Received: (from dchagin@localhost) by dchagin.static.corbina.net (8.15.1/8.15.1/Submit) id t3P7732X003470; Sat, 25 Apr 2015 10:07:03 +0300 (MSK) (envelope-from dchagin) Date: Sat, 25 Apr 2015 10:06:58 +0300 From: Chagin Dmitry To: Chris Torek Cc: dim@FreeBSD.org, adrian@freebsd.org, scott4long@yahoo.com, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281451 - head/sys/vm Message-ID: <20150425070658.GA3442@dchagin.static.corbina.net> References: <695B6002-002A-406C-B843-0DCFE24F81BD@FreeBSD.org> <201504241237.t3OCbLmd039664@elf.torek.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201504241237.t3OCbLmd039664@elf.torek.net> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 07:07:40 -0000 On Fri, Apr 24, 2015 at 05:37:21AM -0700, Chris Torek wrote: > True, it's not actually odd, it's just surprising the first time > one comes across it. > > Also, I goofed in the text: > > >> With the flexible array, (sizeof(struct uma_cache)) is going to be > >> 32 bytes smaller than without it. > > It's `struct uma_zone` that shrinks by (potentially) more than one > would expect. (The uma_cache struct is itself 32 bytes and is not > changed, so the args.size value should be the same -- implying that > some OTHER "sizeof(struct uma_zone)" is where things are going wrong.) > vm_mem_init() called before uma init. unfortunately, we have not seen a proper info about panic from scottl -- Have fun! chd From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 07:20:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C4CA2C9; Sat, 25 Apr 2015 07:20:38 +0000 (UTC) Received: from heemeyer.club (heemeyer.club [IPv6:2001:19f0:6400:80a1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "heemeyer.club", Issuer "heemeyer.club" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 1DDD81D6F; Sat, 25 Apr 2015 07:20:38 +0000 (UTC) Received: from dchagin.static.corbina.net (dchagin.static.corbina.ru [78.107.232.239]) by heemeyer.club (8.15.1/8.15.1) with ESMTPS id t3P7KLZp046134 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 25 Apr 2015 07:20:32 GMT (envelope-from dchagin@dchagin.static.corbina.net) X-Authentication-Warning: heemeyer.club: Host dchagin.static.corbina.ru [78.107.232.239] claimed to be dchagin.static.corbina.net Received: from dchagin.static.corbina.net (localhost [127.0.0.1]) by dchagin.static.corbina.net (8.15.1/8.15.1) with ESMTPS id t3P7KKig003525 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 25 Apr 2015 10:20:20 +0300 (MSK) (envelope-from dchagin@dchagin.static.corbina.net) Received: (from dchagin@localhost) by dchagin.static.corbina.net (8.15.1/8.15.1/Submit) id t3P7KK4v003524; Sat, 25 Apr 2015 10:20:20 +0300 (MSK) (envelope-from dchagin) Date: Sat, 25 Apr 2015 10:20:15 +0300 From: Chagin Dmitry To: Scott Long Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281942 - head/sys/vm Message-ID: <20150425072015.GA3506@dchagin.static.corbina.net> References: <201504241703.t3OH3rpr097920@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201504241703.t3OH3rpr097920@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 07:20:38 -0000 On Fri, Apr 24, 2015 at 05:03:53PM +0000, Scott Long wrote: > Author: scottl > Date: Fri Apr 24 17:03:53 2015 > New Revision: 281942 > URL: https://svnweb.freebsd.org/changeset/base/281942 > > Log: > Revert r281451. It causes a panic/hang early in boot for a number of > users, myself included. The original code is likely papering over a > larger bug that needs to be explored, but for now get things back to > a working state. > > Obtained from: Netflix, Inc. > MFC after: immediately ouch, you're so nervous, may I ask you to revert clang3.6 import as after that my workstation panics so often that I can't do anything? please, read "dblfault panic r277611" topic in current@ )) seroiusly, you could at least show what happens. -- Have fun! chd From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 08:03:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 66A0BFC7; Sat, 25 Apr 2015 08:03:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54B4011EF; Sat, 25 Apr 2015 08:03:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3P83bwK054763; Sat, 25 Apr 2015 08:03:37 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3P83b3K054762; Sat, 25 Apr 2015 08:03:37 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504250803.t3P83b3K054762@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 25 Apr 2015 08:03:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281978 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 08:03:37 -0000 Author: kib Date: Sat Apr 25 08:03:36 2015 New Revision: 281978 URL: https://svnweb.freebsd.org/changeset/base/281978 Log: MFC r281883: Handle incorrect ELF images specifying size for PT_GNU_STACK not being multiple of page size. Modified: stable/10/sys/kern/kern_exec.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_exec.c ============================================================================== --- stable/10/sys/kern/kern_exec.c Sat Apr 25 06:50:15 2015 (r281977) +++ stable/10/sys/kern/kern_exec.c Sat Apr 25 08:03:36 2015 (r281978) @@ -1089,7 +1089,7 @@ exec_new_vmspace(imgp, sv) /* Allocate a new stack */ if (imgp->stack_sz != 0) { - ssiz = imgp->stack_sz; + ssiz = trunc_page(imgp->stack_sz); PROC_LOCK(p); lim_rlimit(p, RLIMIT_STACK, &rlim_stack); PROC_UNLOCK(p); From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 08:06:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 700711AF; Sat, 25 Apr 2015 08:06:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5DF8E120B; Sat, 25 Apr 2015 08:06:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3P86MH7055217; Sat, 25 Apr 2015 08:06:22 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3P86M9Q055216; Sat, 25 Apr 2015 08:06:22 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504250806.t3P86M9Q055216@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 25 Apr 2015 08:06:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281979 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 08:06:22 -0000 Author: kib Date: Sat Apr 25 08:06:21 2015 New Revision: 281979 URL: https://svnweb.freebsd.org/changeset/base/281979 Log: MFC r281696: Initialize td_sel in the thread_init(). PR: 199518 Modified: stable/10/sys/kern/kern_thread.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_thread.c ============================================================================== --- stable/10/sys/kern/kern_thread.c Sat Apr 25 08:03:36 2015 (r281978) +++ stable/10/sys/kern/kern_thread.c Sat Apr 25 08:06:21 2015 (r281979) @@ -210,6 +210,7 @@ thread_init(void *mem, int size, int fla td->td_sched = (struct td_sched *)&td[1]; umtx_thread_init(td); td->td_kstack = 0; + td->td_sel = NULL; return (0); } From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 08:09:16 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 45C9635C; Sat, 25 Apr 2015 08:09:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33E961233; Sat, 25 Apr 2015 08:09:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3P89Gnk055673; Sat, 25 Apr 2015 08:09:16 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3P89Gxt055672; Sat, 25 Apr 2015 08:09:16 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504250809.t3P89Gxt055672@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 25 Apr 2015 08:09:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281980 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 08:09:16 -0000 Author: kib Date: Sat Apr 25 08:09:15 2015 New Revision: 281980 URL: https://svnweb.freebsd.org/changeset/base/281980 Log: MFC r281696: Initialize td_sel in the thread_init(). PR: 199518 Modified: stable/9/sys/kern/kern_thread.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_thread.c ============================================================================== --- stable/9/sys/kern/kern_thread.c Sat Apr 25 08:06:21 2015 (r281979) +++ stable/9/sys/kern/kern_thread.c Sat Apr 25 08:09:15 2015 (r281980) @@ -212,6 +212,7 @@ thread_init(void *mem, int size, int fla td->td_sched = (struct td_sched *)&td[1]; umtx_thread_init(td); td->td_kstack = 0; + td->td_sel = NULL; return (0); } From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 08:14:11 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 705A9529; Sat, 25 Apr 2015 08:14:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BC8F1305; Sat, 25 Apr 2015 08:14:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3P8EBsH060003; Sat, 25 Apr 2015 08:14:11 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3P8E9i5059992; Sat, 25 Apr 2015 08:14:09 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504250814.t3P8E9i5059992@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 25 Apr 2015 08:14:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281981 - in stable/10: lib/libc/gen lib/libc/include lib/libc/sys lib/libthr/thread share/man/man3 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 08:14:11 -0000 Author: kib Date: Sat Apr 25 08:14:08 2015 New Revision: 281981 URL: https://svnweb.freebsd.org/changeset/base/281981 Log: MFC r281712: Make wait6(2), waitid(3) and ppoll(2) cancellation points. Added: stable/10/lib/libc/sys/ppoll.c - copied unchanged from r281712, head/lib/libc/sys/ppoll.c stable/10/lib/libc/sys/wait6.c - copied unchanged from r281712, head/lib/libc/sys/wait6.c Modified: stable/10/lib/libc/gen/waitid.c stable/10/lib/libc/include/libc_private.h stable/10/lib/libc/sys/Makefile.inc stable/10/lib/libc/sys/interposing_table.c stable/10/lib/libthr/thread/thr_syscalls.c stable/10/share/man/man3/pthread_testcancel.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/gen/waitid.c ============================================================================== --- stable/10/lib/libc/gen/waitid.c Sat Apr 25 08:09:15 2015 (r281980) +++ stable/10/lib/libc/gen/waitid.c Sat Apr 25 08:14:08 2015 (r281981) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include "un-namespace.h" +#include "libc_private.h" int __waitid(idtype_t idtype, id_t id, siginfo_t *info, int flags) @@ -44,7 +45,9 @@ __waitid(idtype_t idtype, id_t id, sigin int status; pid_t ret; - ret = _wait6(idtype, id, &status, flags, NULL, info); + ret = ((pid_t (*)(idtype_t, id_t, int *, int, struct __wrusage *, + siginfo_t *))__libc_interposing[INTERPOS_wait6])(idtype, id, + &status, flags, NULL, info); /* * According to SUSv4, waitid() shall not return a PID when a Modified: stable/10/lib/libc/include/libc_private.h ============================================================================== --- stable/10/lib/libc/include/libc_private.h Sat Apr 25 08:09:15 2015 (r281980) +++ stable/10/lib/libc/include/libc_private.h Sat Apr 25 08:14:08 2015 (r281981) @@ -222,6 +222,8 @@ enum { INTERPOS_spinlock, INTERPOS_spinunlock, INTERPOS_kevent, + INTERPOS_wait6, + INTERPOS_ppoll, INTERPOS_MAX }; @@ -305,6 +307,8 @@ struct timeval; struct timezone; struct __siginfo; struct __ucontext; +struct __wrusage; +enum idtype; int __sys_aio_suspend(const struct aiocb * const[], int, const struct timespec *); int __sys_accept(int, struct sockaddr *, __socklen_t *); @@ -329,6 +333,8 @@ int __sys_pselect(int, struct fd_set *, struct fd_set *, const struct timespec *, const __sigset_t *); int __sys_poll(struct pollfd *, unsigned, int); +int __sys_ppoll(struct pollfd *, unsigned, const struct timespec *, + const __sigset_t *); __ssize_t __sys_pread(int, void *, __size_t, __off_t); __ssize_t __sys_pwrite(int, const void *, __size_t, __off_t); __ssize_t __sys_read(int, void *, __size_t); @@ -357,6 +363,8 @@ int __sys_thr_kill(long, int); int __sys_thr_self(long *); int __sys_truncate(const char *, __off_t); __pid_t __sys_wait4(__pid_t, int *, int, struct rusage *); +__pid_t __sys_wait6(enum idtype, __id_t, int *, int, + struct __wrusage *, struct __siginfo *); __ssize_t __sys_write(int, const void *, __size_t); __ssize_t __sys_writev(int, const struct iovec *, int); Modified: stable/10/lib/libc/sys/Makefile.inc ============================================================================== --- stable/10/lib/libc/sys/Makefile.inc Sat Apr 25 08:09:15 2015 (r281980) +++ stable/10/lib/libc/sys/Makefile.inc Sat Apr 25 08:14:08 2015 (r281981) @@ -53,6 +53,7 @@ INTERPOSED = \ open \ openat \ poll \ + ppoll \ pselect \ read \ readv \ @@ -69,6 +70,7 @@ INTERPOSED = \ sigwaitinfo \ swapcontext \ wait4 \ + wait6 \ write \ writev Modified: stable/10/lib/libc/sys/interposing_table.c ============================================================================== --- stable/10/lib/libc/sys/interposing_table.c Sat Apr 25 08:09:15 2015 (r281980) +++ stable/10/lib/libc/sys/interposing_table.c Sat Apr 25 08:14:08 2015 (r281981) @@ -76,6 +76,8 @@ interpos_func_t __libc_interposing[INTER SLOT(spinlock, __libc_spinlock_stub), SLOT(spinunlock, __libc_spinunlock_stub), SLOT(kevent, __sys_kevent), + SLOT(wait6, __sys_wait6), + SLOT(ppoll, __sys_ppoll), }; #undef SLOT Copied: stable/10/lib/libc/sys/ppoll.c (from r281712, head/lib/libc/sys/ppoll.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/sys/ppoll.c Sat Apr 25 08:14:08 2015 (r281981, copy of r281712, head/lib/libc/sys/ppoll.c) @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2015 The FreeBSD Foundation. + * All rights reserved. + * + * Portions of this software were developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice(s), this list of conditions and the following disclaimer as + * the first lines of this file unmodified other than the possible + * addition of one or more copyright notices. + * 2. Redistributions in binary form must reproduce the above copyright + * notice(s), 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 HOLDER(S) ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) 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 "libc_private.h" + +__weak_reference(__sys_ppoll, __ppoll); + +#pragma weak ppoll +int +ppoll(struct pollfd pfd[], nfds_t nfds, const struct timespec *__restrict + timeout, const sigset_t *__restrict newsigmask) +{ + + return (((int (*)(struct pollfd *, nfds_t, const struct timespec *, + const sigset_t *)) __libc_interposing[INTERPOS_ppoll])(pfd, nfds, + timeout, newsigmask)); +} Copied: stable/10/lib/libc/sys/wait6.c (from r281712, head/lib/libc/sys/wait6.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/sys/wait6.c Sat Apr 25 08:14:08 2015 (r281981, copy of r281712, head/lib/libc/sys/wait6.c) @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2015 The FreeBSD Foundation. + * All rights reserved. + * + * Portions of this software were developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice(s), this list of conditions and the following disclaimer as + * the first lines of this file unmodified other than the possible + * addition of one or more copyright notices. + * 2. Redistributions in binary form must reproduce the above copyright + * notice(s), 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 HOLDER(S) ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) 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 "libc_private.h" + +__weak_reference(__sys_wait6, __wait6); + +#pragma weak wait6 +pid_t +wait6(idtype_t idtype, id_t id, int *status, int options, struct __wrusage *ru, + siginfo_t *infop) +{ + + return (((pid_t (*)(idtype_t, id_t, int *, int, struct __wrusage *, + siginfo_t *))__libc_interposing[INTERPOS_wait6])(idtype, id, + status, options, ru, infop)); +} Modified: stable/10/lib/libthr/thread/thr_syscalls.c ============================================================================== --- stable/10/lib/libthr/thread/thr_syscalls.c Sat Apr 25 08:09:15 2015 (r281980) +++ stable/10/lib/libthr/thread/thr_syscalls.c Sat Apr 25 08:14:08 2015 (r281981) @@ -327,6 +327,26 @@ __thr_poll(struct pollfd *fds, unsigned * the thread is not canceled. */ static int +__thr_ppoll(struct pollfd pfd[], nfds_t nfds, const struct timespec * + timeout, const sigset_t *newsigmask) +{ + struct pthread *curthread; + int ret; + + curthread = _get_curthread(); + _thr_cancel_enter(curthread); + ret = __sys_ppoll(pfd, nfds, timeout, newsigmask); + _thr_cancel_leave(curthread, ret == -1); + + return (ret); +} + +/* + * Cancellation behavior: + * Thread may be canceled at start, but if the system call returns something, + * the thread is not canceled. + */ +static int __thr_pselect(int count, fd_set *rfds, fd_set *wfds, fd_set *efds, const struct timespec *timo, const sigset_t *mask) { @@ -545,6 +565,25 @@ __thr_wait4(pid_t pid, int *status, int /* * Cancellation behavior: + * Thread may be canceled at start, but if the system call returns + * a child pid, the thread is not canceled. + */ +static pid_t +__thr_wait6(idtype_t idtype, id_t id, int *status, int options, + struct __wrusage *ru, siginfo_t *infop) +{ + struct pthread *curthread; + pid_t ret; + + curthread = _get_curthread(); + _thr_cancel_enter(curthread); + ret = __sys_wait6(idtype, id, status, options, ru, infop); + _thr_cancel_leave(curthread, ret <= 0); + return (ret); +} + +/* + * Cancellation behavior: * Thread may be canceled at start, but if the thread wrote some data, * it is not canceled. */ @@ -623,6 +662,8 @@ __thr_interpose_libc(void) SLOT(spinlock); SLOT(spinunlock); SLOT(kevent); + SLOT(wait6); + SLOT(ppoll); #undef SLOT *(__libc_interposing_slot( INTERPOS__pthread_mutex_init_calloc_cb)) = Modified: stable/10/share/man/man3/pthread_testcancel.3 ============================================================================== --- stable/10/share/man/man3/pthread_testcancel.3 Sat Apr 25 08:09:15 2015 (r281980) +++ stable/10/share/man/man3/pthread_testcancel.3 Sat Apr 25 08:14:08 2015 (r281981) @@ -1,5 +1,5 @@ .\" $FreeBSD$ -.Dd March 29, 2015 +.Dd April 16, 2015 .Dt PTHREAD_TESTCANCEL 3 .Os .Sh NAME @@ -132,6 +132,7 @@ argument is non-zero. .It Fn openat .It Fn pause .It Fn poll +.It Fn ppoll .It Fn pselect .It Fn pthread_cond_timedwait .It Fn pthread_cond_wait @@ -159,6 +160,8 @@ argument is non-zero. .It Fn wait .It Fn wait3 .It Fn wait4 +.It Fn wait6 +.It Fn waitid .It Fn waitpid .It Fn write .It Fn writev From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 08:31:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 379257A8; Sat, 25 Apr 2015 08:31:06 +0000 (UTC) Received: from heemeyer.club (heemeyer.club [IPv6:2001:19f0:6400:80a1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "heemeyer.club", Issuer "heemeyer.club" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 09436147A; Sat, 25 Apr 2015 08:31:05 +0000 (UTC) Received: from dchagin.static.corbina.net (dchagin.static.corbina.ru [78.107.232.239]) by heemeyer.club (8.15.1/8.15.1) with ESMTPS id t3P8UrX8049392 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 25 Apr 2015 08:31:01 GMT (envelope-from dchagin@dchagin.static.corbina.net) X-Authentication-Warning: heemeyer.club: Host dchagin.static.corbina.ru [78.107.232.239] claimed to be dchagin.static.corbina.net Received: from dchagin.static.corbina.net (localhost [127.0.0.1]) by dchagin.static.corbina.net (8.15.1/8.15.1) with ESMTPS id t3P8UaaH003726 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 25 Apr 2015 11:30:46 +0300 (MSK) (envelope-from dchagin@dchagin.static.corbina.net) Received: (from dchagin@localhost) by dchagin.static.corbina.net (8.15.1/8.15.1/Submit) id t3P8UZ1v003725; Sat, 25 Apr 2015 11:30:35 +0300 (MSK) (envelope-from dchagin) Date: Sat, 25 Apr 2015 11:30:30 +0300 From: Chagin Dmitry To: Scott Long Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281942 - head/sys/vm Message-ID: <20150425083030.GA3555@dchagin.static.corbina.net> References: <201504241703.t3OH3rpr097920@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201504241703.t3OH3rpr097920@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 08:31:06 -0000 On Fri, Apr 24, 2015 at 05:03:53PM +0000, Scott Long wrote: > Author: scottl > Date: Fri Apr 24 17:03:53 2015 > New Revision: 281942 > URL: https://svnweb.freebsd.org/changeset/base/281942 > > Log: > Revert r281451. It causes a panic/hang early in boot for a number of > users, myself included. The original code is likely papering over a > larger bug that needs to be explored, but for now get things back to > a working state. > > Obtained from: Netflix, Inc. > MFC after: immediately > in my POV, at vm_mem_init stage vm_map_init() call uma_zcreate() that uses uinitialized zones (which initialized in uma_startup()). I bet zones contains garbage. I see very similar bug that appears in kern_clocksource.c:579. The per cpu et_hw_mtx contains some garbage data before mtx_init(), it seems that something corrupts the kernel memory after teh kernel is loaded. Unfortunately, I did not succeed to catch the intruder. It is strange, that hw breakpoints does not help. -- Have fun! chd From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 08:47:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E7BB1A4F; Sat, 25 Apr 2015 08:47:42 +0000 (UTC) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 93D6A163C; Sat, 25 Apr 2015 08:47:42 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id E33DE428126; Sat, 25 Apr 2015 18:47:33 +1000 (AEST) Date: Sat, 25 Apr 2015 18:47:32 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Garrett Cooper cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281966 - head/contrib/netbsd-tests/lib/libpthread In-Reply-To: <201504250430.t3P4U1FR044477@svn.freebsd.org> Message-ID: <20150425175312.T972@besplex.bde.org> References: <201504250430.t3P4U1FR044477@svn.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.1 cv=A5NVYcmG c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=Gkr5MAAsbZnOi7l2F54A:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 08:47:43 -0000 On Sat, 25 Apr 2015, Garrett Cooper wrote: > Log: > Add #include sys/types.h for register_t for mips Why not fix mips? > Modified: head/contrib/netbsd-tests/lib/libpthread/t_swapcontext.c > ============================================================================== > --- head/contrib/netbsd-tests/lib/libpthread/t_swapcontext.c Sat Apr 25 01:29:40 2015 (r281965) > +++ head/contrib/netbsd-tests/lib/libpthread/t_swapcontext.c Sat Apr 25 04:30:01 2015 (r281966) > @@ -28,6 +28,9 @@ > #include > __RCSID("$NetBSD"); > > +#ifdef __FreeBSD__ > +#include > +#endif > #include > #include > #include The test detected that ucontext.h is broken on mips, but was shot instead of mips. has massive namespace pollution, but not enough to declare register_t. /usr/include/ucontext.h has its own namespace pollution, and it includes machine/ucontext.h which has massively more on some arches. i386/include/ucontext.h used to be careful about this. It used the basic type corresponding to register_t (int) to avoid any dependencies. amd64/include/ucontext.h was and is not so careful. It used and uses __register_t, so it depends on or though not on . i386 ucontext.h has been unimproved by merging with amd64. Now the basic type cannot be used, since register_t is MD and in fact varies between i386 and amd64. i386 ucontext.h uses __register_t even its own compatibility part that cannot be merged. mips is not careful about this. Its ucontext.h uses register_t. Its ucontext.h has many even larger bugs. The non-broken MD ucontext.h's don't include any _types.h file to get __register_t defined, but that is correct since it is an error to include directly except possibly in the kernel. Applications must include Nearby namespace pollution: only uc_* and ss_* are reserved in POSIX , at least in old versions, but FreeBSD has the following: - some at the . See the enclosed patch which does't really fix it. - arm: seems to be perfectly correct. It uses underscores a lot. It is just ugly to use "unsigned int" instead of something shorter. The BSD spelling u_int cannot be used in standard user headers since it would be namespace pollution. __register_t isn't really right on i386 or amd64, since this is one of the few places where unsigned types should be used. Using plain int for __register_t is just an old bug in i386 (from 386BSD?) copied to amd64. - arm64: very broken. It never uses underscores, so pollutes the following the following namespaces: gp*, gp*, mc_*. It also uses u_int, uint32_t and uint64_t. Better yet, it uses the long long abomination instead of uint64_t in some places. - mips: mc_*, sr (a field in struct __mcontext that doesn't even have an mc_ prefix), mullo, mulhi (like sr), register_t, f_register_t, int32_t, uint32_t, mcontext32_t (only mcontext_t is allowed (and required, but pollution in the mc* namespace is limited), SZREG, UCTX_REG(), UCR_*. - powerpc: mc_*, uint32_t, register_t, uint64_t (POSIX allows foo_t to be declared, but only a low quality implementation would declare it). - sparc64: uint64_t, mc_* - x86: mc_*. As well as __register_t, x86 is careful to use __uintN_t instead of uintN_t. Old changes to document and partially reduce the pollution at the top level: X Index: ucontext.h X =================================================================== X RCS file: /home/ncvs/src/sys/sys/ucontext.h,v X retrieving revision 1.11 X diff -u -2 -r1.11 ucontext.h X --- ucontext.h 9 Nov 2003 20:31:04 -0000 1.11 X +++ ucontext.h 10 Nov 2003 09:38:33 -0000 X @@ -32,5 +32,11 @@ X #define _SYS_UCONTEXT_H_ X X +#ifdef _KERNEL X +#include X +#else X +/* XXX need stack_t as well as sigset_t. */ X #include X +#endif X + X #include X POSIX requires stack_t, and in old versions didn't alow anything else from . Newer versions of POSIX tend to break things like this by allowing but not requiring all the symbols in a header like X @@ -50,6 +56,7 @@ X stack_t uc_stack; X int uc_flags; X +/* XXX namespace pollution. */ X #define UCF_SWAPPED 0x00000001 /* Used by swapcontext(3). */ X - int __spare__[4]; X + int uc_spare[4]; X } ucontext_t; X Names like UCF_SWAPPED bogotify more careful naming for _MC*. So do names the mc_*. All the underscores for __spare__ are bogus, and without a uc_ prefix it isn't clear what this field is spare for. X @@ -61,27 +68,22 @@ X struct ucontext4 *uc_link; X stack_t uc_stack; X - int __spare__[8]; X + int uc_spare[8]; X }; X -#else /* __i386__ || __alpha__ */ X +#else /* __i386__ || __alpha__ */ X #define ucontext4 ucontext X -#endif /* __i386__ || __alpha__ */ X -#endif /* _KERNEL */ X +#endif /* __i386__ || __alpha__ */ X +#endif /* _KERNEL */ X X #ifndef _KERNEL X - X __BEGIN_DECLS X - X int getcontext(ucontext_t *); X -int setcontext(const ucontext_t *); X void makecontext(ucontext_t *, void (*)(void), int, ...); X -int signalcontext(ucontext_t *, int, __sighandler_t *); X +int setcontext(const ucontext_t *); X +int signalcontext(ucontext_t *, int, void (*)(int)); X int swapcontext(ucontext_t *, const ucontext_t *); X - X __END_DECLS X X #else /* _KERNEL */ X X -struct thread; X - X /* X * Flags for get_mcontext(). The low order 4 bits (i.e a mask of 0x0f) are X @@ -91,8 +93,8 @@ X #define GET_MC_CLEAR_RET 1 X X -/* Machine-dependent functions: */ X +struct thread; X + X int get_mcontext(struct thread *, mcontext_t *, int); X int set_mcontext(struct thread *, const mcontext_t *); X - X #endif /* !_KERNEL */ X Bruce From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 13:34:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C96AA672; Sat, 25 Apr 2015 13:34:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B80F71012; Sat, 25 Apr 2015 13:34:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3PDYQHN016984; Sat, 25 Apr 2015 13:34:26 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3PDYQAM016983; Sat, 25 Apr 2015 13:34:26 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201504251334.t3PDYQAM016983@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sat, 25 Apr 2015 13:34:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281982 - head/bin/sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 13:34:26 -0000 Author: jilles Date: Sat Apr 25 13:34:25 2015 New Revision: 281982 URL: https://svnweb.freebsd.org/changeset/base/281982 Log: sh: Pass along SIGINT from a child if job control is enabled, even when not interactive. I added the interactive check in r208881 to be safe, but in actual use (scripts in set -m mode) passing along SIGINT seems best. Discussed with: bdrewery Modified: head/bin/sh/jobs.c Modified: head/bin/sh/jobs.c ============================================================================== --- head/bin/sh/jobs.c Sat Apr 25 08:14:08 2015 (r281981) +++ head/bin/sh/jobs.c Sat Apr 25 13:34:25 2015 (r281982) @@ -1057,7 +1057,7 @@ waitforjob(struct job *jp, int *origstat CLEAR_PENDING_INT; } #if JOBS - else if (rootshell && iflag && propagate_int && + else if (rootshell && propagate_int && WIFSIGNALED(status) && WTERMSIG(status) == SIGINT) kill(getpid(), SIGINT); #endif From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 14:52:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CAB197C5 for ; Sat, 25 Apr 2015 14:52:31 +0000 (UTC) Received: from mo6-p00-ob.smtp.rzone.de (mo6-p00-ob.smtp.rzone.de [IPv6:2a01:238:20a:202:5300::4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.smtp.rzone.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6A4DE178C for ; Sat, 25 Apr 2015 14:52:31 +0000 (UTC) X-RZG-AUTH: :JiIXek6mfvEEUpFQdo7Fj1/zg48CFjWjQv0cW+St/nW/auYssS93kCQ1uZfxmQ== X-RZG-CLASS-ID: mo00 Received: from britannica.bec.de (ip-2-202-70-200.web.vodafone.de [2.202.70.200]) by smtp.strato.de (RZmta 37.5 DYNA|AUTH) with ESMTPSA id i066cfr3PEpo6Bq (using TLSv1 with cipher AES256-SHA (256 bits)) (Client did not present a certificate) for ; Sat, 25 Apr 2015 16:51:50 +0200 (CEST) Received: by britannica.bec.de (sSMTP sendmail emulation); Sat, 25 Apr 2015 16:51:49 +0200 Date: Sat, 25 Apr 2015 16:51:49 +0200 From: Joerg Sonnenberger To: svn-src-all@freebsd.org Subject: Re: svn commit: r281959 - head/usr.bin/whois Message-ID: <20150425145149.GB25518@britannica.bec.de> References: <201504250051.t3P0pitf037355@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201504250051.t3P0pitf037355@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 14:52:31 -0000 On Sat, Apr 25, 2015 at 12:51:44AM +0000, Xin LI wrote: > Attempt to connect to alternate addresses if the connect doesn't > succeed in 180ms, and cut wait time between connection attempts > in half for each additional, if no connection was established. 180ms is very short. I have such latency over 2G, 3G and 4G most of the time, soo wouldn't this make whois pretty much useless on such connections? Joerg From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 15:43:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6332EBDE; Sat, 25 Apr 2015 15:43:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5239C1C12; Sat, 25 Apr 2015 15:43:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3PFhD5f081456; Sat, 25 Apr 2015 15:43:13 GMT (envelope-from rwatson@FreeBSD.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3PFhDFZ081455; Sat, 25 Apr 2015 15:43:13 GMT (envelope-from rwatson@FreeBSD.org) Message-Id: <201504251543.t3PFhDFZ081455@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rwatson set sender to rwatson@FreeBSD.org using -f From: Robert Watson Date: Sat, 25 Apr 2015 15:43:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281983 - head/sys/cddl/dev/profile X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 15:43:13 -0000 Author: rwatson Date: Sat Apr 25 15:43:12 2015 New Revision: 281983 URL: https://svnweb.freebsd.org/changeset/base/281983 Log: Adjust PROF_ARTIFICIAL_FRAMES in the DTrace profile provider on ARM to skip 10, rather than 9, frames. This appears to work quite well in practice on the BeagleBone Black, so remove a comment about the value being bogus and replace it with a slightly less negative one. However, the number of frames to skip is quite sensitive to details of the timer and interrupt handling paths, so this is necessarily fragile -- but no more so than on x86. Sponsored by: DARPA, AFRL Modified: head/sys/cddl/dev/profile/profile.c Modified: head/sys/cddl/dev/profile/profile.c ============================================================================== --- head/sys/cddl/dev/profile/profile.c Sat Apr 25 13:34:25 2015 (r281982) +++ head/sys/cddl/dev/profile/profile.c Sat Apr 25 15:43:12 2015 (r281983) @@ -134,8 +134,10 @@ struct profile_probe_percpu; #endif #ifdef __arm__ -/* bogus */ -#define PROF_ARTIFICIAL_FRAMES 9 +/* + * At least on ARMv7, this appears to work quite well. + */ +#define PROF_ARTIFICIAL_FRAMES 10 #endif typedef struct profile_probe { From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 16:12:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DAAF33C8; Sat, 25 Apr 2015 16:12:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF7401EF2; Sat, 25 Apr 2015 16:12:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3PGC78k096100; Sat, 25 Apr 2015 16:12:07 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3PGC7nF096099; Sat, 25 Apr 2015 16:12:07 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201504251612.t3PGC7nF096099@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Sat, 25 Apr 2015 16:12:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281984 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 16:12:08 -0000 Author: hiren Date: Sat Apr 25 16:12:06 2015 New Revision: 281984 URL: https://svnweb.freebsd.org/changeset/base/281984 Log: Currently there is no easy way to specify net.isr.maxthreads = all cpus. We need to specify exact number of cpus in loader.conf which get annoying when you have mix of machines which don't have equal number of total cpus. I propose "-1" as that value. When loader.conf has net.isr.maxthreads = -1, netisr will use all available cpus. In collaboration with: davide Reviewed by: gnn Differential Revision: https://reviews.freebsd.org/D2318 MFC after: 2 weeks Sponsored by: Limelight Networks Modified: head/sys/net/netisr.c Modified: head/sys/net/netisr.c ============================================================================== --- head/sys/net/netisr.c Sat Apr 25 15:43:12 2015 (r281983) +++ head/sys/net/netisr.c Sat Apr 25 16:12:06 2015 (r281984) @@ -156,10 +156,13 @@ SYSCTL_PROC(_net_isr, OID_AUTO, dispatch /* * Allow the administrator to limit the number of threads (CPUs) to use for * netisr. We don't check netisr_maxthreads before creating the thread for - * CPU 0, so in practice we ignore values <= 1. This must be set at boot. - * We will create at most one thread per CPU. + * CPU 0. This must be set at boot. We will create at most one thread per CPU. + * By default we initialize this to 1 which would assign just 1 cpu (cpu0) and + * therefore only 1 workstream. If set to -1, netisr would use all cpus + * (mp_ncpus) and therefore would have those many workstreams. One workstream + * per thread (CPU). */ -static int netisr_maxthreads = -1; /* Max number of threads. */ +static int netisr_maxthreads = 1; /* Max number of threads. */ SYSCTL_INT(_net_isr, OID_AUTO, maxthreads, CTLFLAG_RDTUN, &netisr_maxthreads, 0, "Use at most this many CPUs for netisr processing"); @@ -1120,8 +1123,10 @@ netisr_init(void *arg) KASSERT(curcpu == 0, ("%s: not on CPU 0", __func__)); NETISR_LOCK_INIT(); - if (netisr_maxthreads < 1) - netisr_maxthreads = 1; + if (netisr_maxthreads == 0 || netisr_maxthreads < -1 ) + netisr_maxthreads = 1; /* default behavior */ + else if (netisr_maxthreads == -1) + netisr_maxthreads = mp_ncpus; /* use max cpus */ if (netisr_maxthreads > mp_ncpus) { printf("netisr_init: forcing maxthreads from %d to %d\n", netisr_maxthreads, mp_ncpus); From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 16:15:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4E239634; Sat, 25 Apr 2015 16:15:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B0FD1F0E; Sat, 25 Apr 2015 16:15:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3PGF4jp096955; Sat, 25 Apr 2015 16:15:04 GMT (envelope-from grembo@FreeBSD.org) Received: (from grembo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3PGF2Z1096937; Sat, 25 Apr 2015 16:15:02 GMT (envelope-from grembo@FreeBSD.org) Message-Id: <201504251615.t3PGF2Z1096937@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: grembo set sender to grembo@FreeBSD.org using -f From: Michael Gmelin Date: Sat, 25 Apr 2015 16:15:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281985 - in head: share/man/man4 sys/dev/smbus usr.sbin/smbmsg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 16:15:04 -0000 Author: grembo (ports committer) Date: Sat Apr 25 16:15:01 2015 New Revision: 281985 URL: https://svnweb.freebsd.org/changeset/base/281985 Log: Expand SMBUS API to add smbus_trans() function. Differential Revision: https://reviews.freebsd.org/D1955 Reviewed by: adrian, jhb, wblock Approved by: adrian, jhb Modified: head/share/man/man4/smb.4 head/sys/dev/smbus/smb.c head/sys/dev/smbus/smb.h head/sys/dev/smbus/smbconf.h head/sys/dev/smbus/smbus.c head/sys/dev/smbus/smbus.h head/sys/dev/smbus/smbus_if.m head/usr.sbin/smbmsg/smbmsg.c Modified: head/share/man/man4/smb.4 ============================================================================== --- head/share/man/man4/smb.4 Sat Apr 25 16:12:06 2015 (r281984) +++ head/share/man/man4/smb.4 Sat Apr 25 16:15:01 2015 (r281985) @@ -1,5 +1,6 @@ .\" Copyright (c) 1998, Nicolas Souchu .\" Copyright (c) 2004, Joerg Wunsch +.\" Copyright (c) 2015, Michael Gmelin .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 6, 2009 +.Dd April 25, 2015 .Dt SMB 4 .Os .Sh NAME @@ -49,21 +50,24 @@ as its argument. #include struct smbcmd { - char cmd; - int count; - u_char slave; + u_char cmd; + u_char reserved; + u_short op; union { - char byte; - short word; - - char *byte_ptr; - short *word_ptr; - - struct { - short sdata; - short *rdata; - } process; - } data; + char byte; + char buf[2]; + short word; + } wdata; + union { + char byte; + char buf[2]; + short word; + } rdata; + int slave; + char *wbuf; /* use wdata if NULL */ + int wcount; + char *rbuf; /* use rdata if NULL */ + int rcount; }; .Ed .Pp @@ -107,14 +111,14 @@ The command first sends the byte from the .Fa cmd field to the device, followed by the byte given in -.Fa data.byte . +.Fa wdata.byte . .It Dv SMB_WRITEW Ta The .Em WriteWord command first sends the byte from the .Fa cmd field to the device, followed by the word given in -.Fa data.word . +.Fa wdata.word . Note that the SMBus byte-order is little-endian by definition. .It Dv SMB_READB Ta The @@ -123,8 +127,8 @@ command first sends the byte from the .Fa cmd field to the device, and then reads one byte of data from the device. -The returned data will be stored in the location pointed to by -.Fa data.byte_ptr . +The returned data will be stored in +.Fa rdata.byte . .It Dv SMB_READW Ta The .Em ReadWord @@ -132,29 +136,33 @@ command first sends the byte from the .Fa cmd field to the device, and then reads one word of data from the device. -The returned data will be stored in the location pointed to by -.Fa data.word_ptr . +The returned data will be stored in +.Fa rdata.word . .It Dv SMB_PCALL Ta The .Em ProcedureCall command first sends the byte from the .Fa cmd field to the device, followed by the word provided in -.Fa data.process.sdata . +.Fa wdata.word . It then reads one word of data from the device, and returns it -in the location pointed to by -.Fa data.process.rdata . +in +.Fa rdata.word . .It Dv SMB_BWRITE Ta The .Em BlockWrite command first sends the byte from the .Fa cmd field to the device, followed by -.Fa count +.Fa wcount bytes of data that are taken from the buffer pointed to by -.Fa data.byte_ptr . +.Fa wbuf . The SMBus specification mandates that no more than 32 bytes of -data can be transferred in a single block read or write command. +data can be transferred in a single block read or write command, +but since +.Xr smbus 4 +is also used to access I2C devices, the limit has been increased +to 1024. This value is available in the constant .Dv SMB_MAXBLOCKSIZE . .It Dv SMB_BREAD Ta @@ -163,10 +171,38 @@ The command first sends the byte from the .Fa cmd field to the device, and then reads -.Fa count +.Fa rcount bytes of data that from the device. These data will be returned in the buffer pointed to by -.Fa data.byte_ptr . +.Fa rbuf . +.It Dv SMB_TRANS Ta +The +.Em Trans +command sends an SMB roll-up transaction with flags that also allow it to +be used for (mostly) I2C pass-through and with with 10-bit addresses. +This function can be used to roll up all of the above functions. +It first sends the byte from the +.Fa cmd +field to the device, followed by +.Fa wcount +bytes of data that are taken from the buffer pointed to by +.Fa wbuf , +then reads +.Fa rcount +bytes of data that from the device. +These data will be returned in the buffer pointed to by +.Fa rbuf . +.Pp +The following flags are allowed in +.Fa op : +.Pp +.Bd -literal -compact +SMB_TRANS_NOSTOP Do not send STOP at end +SMB_TRANS_NOCMD Ignore cmd field (do not tx) +SMB_TRANS_NOCNT Do not tx or rx count field +SMB_TRANS_7BIT Change address mode to 7-bit +SMB_TRANS_10BIT Change address mode to 10-bit +.Ed .El .Pp The @@ -201,4 +237,7 @@ manual page first appeared in .Sh AUTHORS This manual page was written by -.An Nicolas Souchu . +.An Nicolas Souchu +and extended by +.An Michael Gmelin Aq freebsd@grem.de +. Modified: head/sys/dev/smbus/smb.c ============================================================================== --- head/sys/dev/smbus/smb.c Sat Apr 25 16:12:06 2015 (r281984) +++ head/sys/dev/smbus/smb.c Sat Apr 25 16:15:01 2015 (r281985) @@ -26,10 +26,6 @@ * $FreeBSD$ */ -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include "opt_compat.h" -#endif - #include #include #include @@ -104,19 +100,24 @@ smb_identify(driver_t *driver, device_t static int smb_probe(device_t dev) { - device_set_desc(dev, "SMBus generic I/O"); + if (smbus_get_addr(dev) != -1) + return (ENXIO); - return (0); + device_set_desc(dev, "SMBus generic I/O"); + return (BUS_PROBE_NOWILDCARD); } static int smb_attach(device_t dev) { struct smb_softc *sc = device_get_softc(dev); - + int unit; + + unit = device_get_unit(dev); sc->sc_dev = dev; - sc->sc_devnode = make_dev(&smb_cdevsw, device_get_unit(dev), - UID_ROOT, GID_WHEEL, 0600, "smb%d", device_get_unit(dev)); + + sc->sc_devnode = make_dev(&smb_cdevsw, unit, UID_ROOT, GID_WHEEL, + 0600, "smb%d", unit); sc->sc_devnode->si_drv1 = sc; mtx_init(&sc->sc_lock, device_get_nameunit(dev), NULL, MTX_DEF); @@ -174,9 +175,16 @@ smbioctl(struct cdev *dev, u_long cmd, c struct smb_softc *sc = dev->si_drv1; device_t smbdev = sc->sc_dev; int error; - short w; - u_char count; - char c; + int unit; + u_char bcount; + + /* + * If a specific slave device is being used, override any passed-in + * slave. + */ + unit = dev2unit(dev); + if (unit & 0x0400) + s->slave = unit & 0x03ff; parent = device_get_parent(smbdev); @@ -208,77 +216,101 @@ smbioctl(struct cdev *dev, u_long cmd, c case SMB_WRITEB: error = smbus_error(smbus_writeb(parent, s->slave, s->cmd, - s->data.byte)); + s->wdata.byte)); break; case SMB_WRITEW: error = smbus_error(smbus_writew(parent, s->slave, - s->cmd, s->data.word)); + s->cmd, s->wdata.word)); break; case SMB_READB: - if (s->data.byte_ptr) { - error = smbus_error(smbus_readb(parent, s->slave, - s->cmd, &c)); - if (error) - break; - error = copyout(&c, s->data.byte_ptr, - sizeof(*(s->data.byte_ptr))); + error = smbus_error(smbus_readb(parent, s->slave, s->cmd, + &s->rdata.byte)); + if (error) + break; + if (s->rbuf && s->rcount >= 1) { + error = copyout(&s->rdata.byte, s->rbuf, 1); + s->rcount = 1; } break; case SMB_READW: - if (s->data.word_ptr) { - error = smbus_error(smbus_readw(parent, s->slave, - s->cmd, &w)); - if (error == 0) { - error = copyout(&w, s->data.word_ptr, - sizeof(*(s->data.word_ptr))); - } + error = smbus_error(smbus_readw(parent, s->slave, s->cmd, + &s->rdata.word)); + if (error) + break; + if (s->rbuf && s->rcount >= 2) { + buf[0] = (u_char)s->rdata.word; + buf[1] = (u_char)(s->rdata.word >> 8); + error = copyout(buf, s->rbuf, 2); + s->rcount = 2; } break; case SMB_PCALL: - if (s->data.process.rdata) { - - error = smbus_error(smbus_pcall(parent, s->slave, s->cmd, - s->data.process.sdata, &w)); - if (error) - break; - error = copyout(&w, s->data.process.rdata, - sizeof(*(s->data.process.rdata))); + error = smbus_error(smbus_pcall(parent, s->slave, s->cmd, + s->wdata.word, &s->rdata.word)); + if (error) + break; + if (s->rbuf && s->rcount >= 2) { + buf[0] = (u_char)s->rdata.word; + buf[1] = (u_char)(s->rdata.word >> 8); + error = copyout(buf, s->rbuf, 2); + s->rcount = 2; } - + break; case SMB_BWRITE: - if (s->count && s->data.byte_ptr) { - if (s->count > SMB_MAXBLOCKSIZE) - s->count = SMB_MAXBLOCKSIZE; - error = copyin(s->data.byte_ptr, buf, s->count); - if (error) - break; - error = smbus_error(smbus_bwrite(parent, s->slave, - s->cmd, s->count, buf)); + if (s->wcount < 0) { + error = EINVAL; + break; } + if (s->wcount > SMB_MAXBLOCKSIZE) + s->wcount = SMB_MAXBLOCKSIZE; + if (s->wcount) + error = copyin(s->wbuf, buf, s->wcount); + if (error) + break; + error = smbus_error(smbus_bwrite(parent, s->slave, s->cmd, + s->wcount, buf)); break; -#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || defined(COMPAT_FREEBSD6) - case SMB_OLD_BREAD: -#endif case SMB_BREAD: - if (s->count && s->data.byte_ptr) { - count = min(s->count, SMB_MAXBLOCKSIZE); - error = smbus_error(smbus_bread(parent, s->slave, - s->cmd, &count, buf)); - if (error) - break; - error = copyout(buf, s->data.byte_ptr, - min(count, s->count)); - s->count = count; + if (s->rcount < 0) { + error = EINVAL; + break; + } + if (s->rcount > SMB_MAXBLOCKSIZE) + s->rcount = SMB_MAXBLOCKSIZE; + error = smbus_error(smbus_bread(parent, s->slave, s->cmd, + &bcount, buf)); + if (error) + break; + if (s->rcount > bcount) + s->rcount = bcount; + error = copyout(buf, s->rbuf, s->rcount); + break; + + case SMB_TRANS: + if (s->rcount < 0 || s->wcount < 0) { + error = EINVAL; + break; } + if (s->rcount > SMB_MAXBLOCKSIZE) + s->rcount = SMB_MAXBLOCKSIZE; + if (s->wcount > SMB_MAXBLOCKSIZE) + s->wcount = SMB_MAXBLOCKSIZE; + if (s->wcount) + error = copyin(s->wbuf, buf, s->wcount); + if (error) + break; + error = smbus_error(smbus_trans(parent, s->slave, s->cmd, + s->op, buf, s->wcount, buf, s->rcount, &s->rcount)); + if (error == 0) + error = copyout(buf, s->rbuf, s->rcount); break; - default: error = ENOTTY; } Modified: head/sys/dev/smbus/smb.h ============================================================================== --- head/sys/dev/smbus/smb.h Sat Apr 25 16:12:06 2015 (r281984) +++ head/sys/dev/smbus/smb.h Sat Apr 25 16:15:01 2015 (r281985) @@ -32,27 +32,33 @@ #include struct smbcmd { - char cmd; - int count; - u_char slave; + u_char cmd; + u_char reserved; + u_short op; union { - char byte; - short word; - - char *byte_ptr; - short *word_ptr; - - struct { - short sdata; - short *rdata; - } process; - } data; + char byte; + char buf[2]; + short word; + } wdata; + union { + char byte; + char buf[2]; + short word; + } rdata; + int slave; + char *wbuf; /* use wdata if NULL */ + int wcount; + char *rbuf; /* use rdata if NULL */ + int rcount; }; /* * SMBus spec 2.0 says block transfers may be at most 32 bytes. + * We use SMBus for i2c as well, make the size limit something more + * reasonable. Keep in mind that a char buf array is declared on the + * kernel stack. */ -#define SMB_MAXBLOCKSIZE 32 +#define SMB_MAXBLOCKSIZE 1024 #define SMB_QUICK_WRITE _IOW('i', 1, struct smbcmd) #define SMB_QUICK_READ _IOW('i', 2, struct smbcmd) @@ -66,5 +72,6 @@ struct smbcmd { #define SMB_BWRITE _IOW('i', 10, struct smbcmd) #define SMB_OLD_BREAD _IOW('i', 11, struct smbcmd) #define SMB_BREAD _IOWR('i', 11, struct smbcmd) +#define SMB_TRANS _IOWR('i', 12, struct smbcmd) #endif Modified: head/sys/dev/smbus/smbconf.h ============================================================================== --- head/sys/dev/smbus/smbconf.h Sat Apr 25 16:12:06 2015 (r281984) +++ head/sys/dev/smbus/smbconf.h Sat Apr 25 16:15:01 2015 (r281985) @@ -68,9 +68,30 @@ #define SMB_QREAD 0x1 /* + * smbus transction op with pass-thru capabilities + * + * This smbus function is capable of doing a smbus command transaction + * (read or write), and can be flagged to not issue the 'cmd' and/or + * issue or expect a count field as well as flagged for chaining (no STOP), + * which gives it an i2c pass-through capability. + * + * NOSTOP- Caller chaining transactions, do not issue STOP + * NOCMD- Do not transmit the command field + * NOCNT- Do not transmit (wr) or expect (rd) the count field + */ +#define SMB_TRANS_NOSTOP 0x0001 /* do not send STOP at end */ +#define SMB_TRANS_NOCMD 0x0002 /* ignore cmd field (do not tx) */ +#define SMB_TRANS_NOCNT 0x0004 /* do not tx or rx count field */ +#define SMB_TRANS_7BIT 0x0008 /* change address mode to 7-bit */ +#define SMB_TRANS_10BIT 0x0010 /* change address mode to 10-bit */ +#define SMB_TRANS_NOREPORT 0x0020 /* do not report errors */ + +/* * ivars codes */ -#define SMBUS_IVAR_ADDR 0x1 /* slave address of the device */ +enum smbus_ivars { + SMBUS_IVAR_ADDR, /* slave address of the device */ +}; int smbus_request_bus(device_t, device_t, int); int smbus_release_bus(device_t, device_t); @@ -79,7 +100,12 @@ int smbus_error(int error); void smbus_intr(device_t, u_char, char low, char high, int error); -u_char smbus_get_addr(device_t); +#define SMBUS_ACCESSOR(var, ivar, type) \ + __BUS_ACCESSOR(smbus, var, SMBUS, ivar, type) + +SMBUS_ACCESSOR(addr, ADDR, int) + +#undef SMBUS_ACCESSOR extern driver_t smbus_driver; extern devclass_t smbus_devclass; @@ -104,6 +130,9 @@ extern devclass_t smbus_devclass; (SMBUS_BWRITE(device_get_parent(bus), slave, cmd, count, buf)) #define smbus_bread(bus,slave,cmd,count,buf) \ (SMBUS_BREAD(device_get_parent(bus), slave, cmd, count, buf)) +#define smbus_trans(bus,slave,cmd,op,wbuf,wcount,rbuf,rcount,actualp) \ + (SMBUS_TRANS(device_get_parent(bus), slave, cmd, op, \ + wbuf, wcount, rbuf, rcount, actualp)) #define SMBUS_MODVER 1 #define SMBUS_MINVER 1 Modified: head/sys/dev/smbus/smbus.c ============================================================================== --- head/sys/dev/smbus/smbus.c Sat Apr 25 16:12:06 2015 (r281984) +++ head/sys/dev/smbus/smbus.c Sat Apr 25 16:15:01 2015 (r281985) @@ -33,11 +33,15 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include +#include "smbus_if.h" +#include "bus_if.h" + + /* * Autoconfiguration and support routines for System Management bus */ @@ -49,6 +53,13 @@ static int smbus_probe(device_t); static int smbus_attach(device_t); static int smbus_detach(device_t); +static int smbus_child_location_str(device_t parent, device_t child, + char *buf, size_t buflen); +static int smbus_print_child(device_t parent, device_t child); +static void smbus_probe_device(device_t dev, u_char* addr); +static int smbus_read_ivar(device_t parent, device_t child, int which, + uintptr_t *result); + static device_method_t smbus_methods[] = { /* device interface */ DEVMETHOD(device_probe, smbus_probe), @@ -57,6 +68,10 @@ static device_method_t smbus_methods[] = /* bus interface */ DEVMETHOD(bus_add_child, bus_generic_add_child), + DEVMETHOD(bus_child_location_str, smbus_child_location_str), + DEVMETHOD(bus_driver_added, bus_generic_driver_added), + DEVMETHOD(bus_print_child, smbus_print_child), + DEVMETHOD(bus_read_ivar, smbus_read_ivar), DEVMETHOD_END }; @@ -87,9 +102,14 @@ static int smbus_attach(device_t dev) { struct smbus_softc *sc = device_get_softc(dev); + unsigned char addr; mtx_init(&sc->lock, device_get_nameunit(dev), "smbus", MTX_DEF); bus_generic_probe(dev); + for (addr = SMBUS_ADDR_MIN; addr < SMBUS_ADDR_MAX; ++addr) { + sc->addrs[addr] = addr; + smbus_probe_device(dev, &sc->addrs[addr]); + } bus_generic_attach(dev); return (0); @@ -114,4 +134,70 @@ smbus_generic_intr(device_t dev, u_char { } +static void +smbus_probe_device(device_t dev, u_char* addr) +{ + device_t child; + int error; + u_char cmd; + u_char buf[2]; + + cmd = 0x01; + error = smbus_trans(dev, *addr, cmd, + SMB_TRANS_NOCNT | SMB_TRANS_NOREPORT, + NULL, 0, buf, 1, NULL); + if (error == 0) { + if (bootverbose) + device_printf(dev, "Probed address 0x%02x\n", *addr); + child = device_add_child(dev, NULL, -1); + device_set_ivars(child, addr); + } +} + +static int +smbus_child_location_str(device_t parent, device_t child, char *buf, + size_t buflen) +{ + unsigned char *addr; + + addr = device_get_ivars(child); + if (addr) + snprintf(buf, buflen, "addr=0x%x", *addr); + else if (buflen) + buf[0] = 0; + return (0); +} + +static int +smbus_print_child(device_t parent, device_t child) +{ + unsigned char *addr; + int retval; + + addr = device_get_ivars(child); + retval = bus_print_child_header(parent, child); + if (addr) + retval += printf(" at addr 0x%x", *addr); + retval += bus_print_child_footer(parent, child); + + return (retval); +} + +static int +smbus_read_ivar(device_t parent, device_t child, int which, + uintptr_t *result) +{ + unsigned char *addr; + + addr = device_get_ivars(child); + switch (which) { + case SMBUS_IVAR_ADDR: + *result = (addr == NULL) ? -1 : *addr; + break; + default: + return (ENOENT); + } + return (0); +} + MODULE_VERSION(smbus, SMBUS_MODVER); Modified: head/sys/dev/smbus/smbus.h ============================================================================== --- head/sys/dev/smbus/smbus.h Sat Apr 25 16:12:06 2015 (r281984) +++ head/sys/dev/smbus/smbus.h Sat Apr 25 16:15:01 2015 (r281985) @@ -29,9 +29,13 @@ #ifndef __SMBUS_H #define __SMBUS_H +#define SMBUS_ADDR_MIN 0x10 +#define SMBUS_ADDR_MAX 0x70 + struct smbus_softc { device_t owner; /* smbus owner device structure */ struct mtx lock; + unsigned char addrs[SMBUS_ADDR_MAX]; }; void smbus_generic_intr(device_t dev, u_char devaddr, char low, char high, int err); Modified: head/sys/dev/smbus/smbus_if.m ============================================================================== --- head/sys/dev/smbus/smbus_if.m Sat Apr 25 16:12:06 2015 (r281984) +++ head/sys/dev/smbus/smbus_if.m Sat Apr 25 16:15:01 2015 (r281985) @@ -149,3 +149,20 @@ METHOD int bread { u_char *count; char *buf; }; + +# +# SMB roll-up transaction with flags that also allow it to be +# used for (mostly) i2c pass-through and with 10-bit addresses. +# This function can be used to roll-up all of the above functions. +# +METHOD int trans { + device_t dev; + int slave; + char cmd; + int op; + char *wbuf; + int wcount; + char *rbuf; + int rcount; + int *actualp; +}; Modified: head/usr.sbin/smbmsg/smbmsg.c ============================================================================== --- head/usr.sbin/smbmsg/smbmsg.c Sat Apr 25 16:12:06 2015 (r281984) +++ head/usr.sbin/smbmsg/smbmsg.c Sat Apr 25 16:15:01 2015 (r281985) @@ -163,7 +163,8 @@ do_io(void) } if (iflag == 1 && oflag == -1) { /* command + 1 byte input: read byte op. */ - c.data.byte_ptr = ibuf; + c.rbuf = ibuf; + c.rcount = iflag; if (ioctl(fd, SMB_READB, &c) == -1) return (-1); printf(fmt, (int)(unsigned char)ibuf[0]); @@ -171,11 +172,12 @@ do_io(void) return (0); } else if (iflag == -1 && oflag == 1) { /* command + 1 byte output: write byte op. */ - c.data.byte = obuf[0]; + c.wdata.byte = obuf[0]; return (ioctl(fd, SMB_WRITEB, &c)); } else if (wflag && iflag == 2 && oflag == -1) { /* command + 2 bytes input: read word op. */ - c.data.word_ptr = &iword; + c.rbuf = (char*) &iword; + c.rcount = iflag; if (ioctl(fd, SMB_READW, &c) == -1) return (-1); printf(fmt, (int)(unsigned short)iword); @@ -183,15 +185,16 @@ do_io(void) return (0); } else if (wflag && iflag == -1 && oflag == 2) { /* command + 2 bytes output: write word op. */ - c.data.word = oword; + c.wdata.word = oword; return (ioctl(fd, SMB_WRITEW, &c)); } else if (wflag && iflag == 2 && oflag == 2) { /* * command + 2 bytes output + 2 bytes input: * "process call" op. */ - c.data.process.sdata = oword; - c.data.process.rdata = &iword; + c.wdata.word = oword; + c.rbuf = (char*) &iword; + c.rcount = iflag; if (ioctl(fd, SMB_PCALL, &c) == -1) return (-1); printf(fmt, (int)(unsigned short)iword); @@ -199,8 +202,8 @@ do_io(void) return (0); } else if (iflag > 1 && oflag == -1) { /* command + > 1 bytes of input: block read */ - c.data.byte_ptr = ibuf; - c.count = iflag; + c.rbuf = ibuf; + c.rcount = iflag; if (ioctl(fd, SMB_BREAD, &c) == -1) return (-1); for (i = 0; i < iflag; i++) { @@ -212,8 +215,8 @@ do_io(void) return (0); } else if (iflag == -1 && oflag > 1) { /* command + > 1 bytes of output: block write */ - c.data.byte_ptr = obuf; - c.count = oflag; + c.wbuf = obuf; + c.wcount = oflag; return (ioctl(fd, SMB_BWRITE, &c)); } From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 18:01:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CB66638F for ; Sat, 25 Apr 2015 18:01:32 +0000 (UTC) Received: from mail-vn0-f47.google.com (mail-vn0-f47.google.com [209.85.216.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8830E1A32 for ; Sat, 25 Apr 2015 18:01:32 +0000 (UTC) Received: by vnbf1 with SMTP id f1so7264855vnb.5 for ; Sat, 25 Apr 2015 11:01:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:organization:content-type:mime-version; bh=lC/fpY61BBH3CD1AYgPXDq6x+u8S5TpnljKkpe3UQSA=; b=hyzfQdDqaiGPiLP+Qei44UZzShmB8MXfr+EOGiqOJmg2dIFlblDufXK1m9odlxAfuf 6JYyvv6Po7X6xUTl0MNnlTbQJ4541ajS3M6E6tJDESP3GLOiNaPyN6bc6uHkeKB3Vg9c EsPZa7b2hRLE6nxIGiDGJ3dvoMNXawhae8dZXSMiCxWdY3a2/Sl2memZVbROy6C6Fz97 y11Z74uh7vjTbNZndR4EpiGnSUmI9jhWy/+g+pCFnhKu7bhjKUz7Mw4F7EzOaihgnsiV JfYZgrvu7g1V58/AMk0eawwNk6ANuT20QdwRTx/wTYw2N8BAFMT0gAoHdbwquKkJoOII VQog== X-Gm-Message-State: ALoCoQnnEKaE8wi9E1cRxKpEuoP2xVB3CsHD00ewEaveBF93vlyNM7sK84rtis1VN+ExyYhu6bvr X-Received: by 10.52.112.36 with SMTP id in4mr8125720vdb.3.1429974292332; Sat, 25 Apr 2015 08:04:52 -0700 (PDT) Received: from ?IPv6:2601:a:1380:1046:55f3:e04d:91a9:85f0? ([2601:a:1380:1046:55f3:e04d:91a9:85f0]) by mx.google.com with ESMTPSA id wp5sm10488423vdb.18.2015.04.25.08.04.50 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 25 Apr 2015 08:04:50 -0700 (PDT) Message-ID: <1429974286.5017.1.camel@hardenedbsd.org> Subject: Re: svn commit: r281959 - head/usr.bin/whois From: Shawn Webb To: Joerg Sonnenberger Cc: svn-src-all@freebsd.org Date: Sat, 25 Apr 2015 11:04:46 -0400 In-Reply-To: <20150425145149.GB25518@britannica.bec.de> References: <201504250051.t3P0pitf037355@svn.freebsd.org> <20150425145149.GB25518@britannica.bec.de> Organization: HardenedBSD Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-+mK6hzNtMXfAEx9T8XEV" X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 Mime-Version: 1.0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 18:01:33 -0000 --=-+mK6hzNtMXfAEx9T8XEV Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, 2015-04-25 at 16:51 +0200, Joerg Sonnenberger wrote: > On Sat, Apr 25, 2015 at 12:51:44AM +0000, Xin LI wrote: > > Attempt to connect to alternate addresses if the connect doesn't > > succeed in 180ms, and cut wait time between connection attempts > > in half for each additional, if no connection was established. >=20 > 180ms is very short. I have such latency over 2G, 3G and 4G most of the > time, soo wouldn't this make whois pretty much useless on such > connections? Google Chromium/Chrome uses a 300ms timeout when falling back from IPv6 to IPv4. Maybe the 180ms timeout should be increased to match? Thanks, Shawn --=-+mK6hzNtMXfAEx9T8XEV Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCgAGBQJVO60RAAoJEGqEZY9SRW7uiK4P/RIK8/rXSteaupXqxA+T04oK OtfwOC0nXelyGN07zmqv1caAQMVE7I3AIOKooanGRjyzl0yifh9eYR8QXFovc8a6 3m/yExHuHvvraiRGW8CeEN+q0fDV8kJ1BQ2wmuYVE+d3TBn51meCZcOXcLornQl5 7J72Ta79WILSY51Y0eijQaZaJqUQkWwYDjkz4udIEnNe5a1c/H53I7jkJX+ZQGbL qW0js99BvuSxhfFpLdgdRgzlU/mbmoWoxEu+Pln5dyCmZ1eoyFBC5tyO7EC67jPJ Gwy02v8BNem0Ny/PWy2z4ptlzNXwisIBRxcI5J6UnyiZrUHu9Yvhyjg3ueGD3dTm 79pJUtjWljNxWfF9ss0XuKtQ5qclJEMGLYU66D6pYSWIypGaGlfE7uTwmEbvC9yV JRe+R6n+THECUD3GtmIHT2S3hvKs/kiPqpFUS4M52Yuck8ykhONaIyVNa78zWtXD ZR9TV+RRDceY/uQ3u2ayCG3bYiJrxfmgEPjcWyW1RBN5oJDeHe5zGQPN5G5LA+QB lDF1SzksZ28xnEwJhAMdflkiFiasoQR5TegRAlVCzPMmnTtWuw1UndajBYtONav2 sI688h/uC5Xl6wtmmy4HAA9BHyHeqjMnKsAA3wShX1oN4O6b2FhkxGRkrvnhE0vV 96zsb0ZBsBkNyRRKCBia =SrFr -----END PGP SIGNATURE----- --=-+mK6hzNtMXfAEx9T8XEV-- From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 18:17:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 57AE6601; Sat, 25 Apr 2015 18:17:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C0C71B3B; Sat, 25 Apr 2015 18:17:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3PIH9TE060177; Sat, 25 Apr 2015 18:17:09 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3PIH9In060176; Sat, 25 Apr 2015 18:17:09 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504251817.t3PIH9In060176@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 25 Apr 2015 18:17:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281986 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 18:17:09 -0000 Author: pfg Date: Sat Apr 25 18:17:08 2015 New Revision: 281986 URL: https://svnweb.freebsd.org/changeset/base/281986 Log: Cleanup a bit the clang attributes for type safety checking. Cleanup r281861 by moving the definitions to their own section but still leave the definitions out of lint. In addition to the 'argument_with_type_tag' attribute, bring 'type_tag_for_datatype' which is necessary for annotating the data types. Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Sat Apr 25 16:15:01 2015 (r281985) +++ head/sys/sys/cdefs.h Sat Apr 25 18:17:08 2015 (r281986) @@ -212,7 +212,6 @@ #define __unused #define __packed #define __aligned(x) -#define __arg_type_tag(arg_kind, arg_idx, type_tag_idx) #define __section(x) #define __weak #else @@ -237,12 +236,6 @@ #define __aligned(x) __attribute__((__aligned__(x))) #define __section(x) __attribute__((__section__(x))) #endif -#if __has_attribute(argument_with_type_tag) -#define __arg_type_tag(arg_kind, arg_idx, type_tag_idx) \ - __attribute__((__argument_with_type_tag__(arg_kind, arg_idx, type_tag_idx))) -#else -#define __arg_type_tag(arg_kind, arg_idx, type_tag_idx) -#endif #if defined(__INTEL_COMPILER) #define __dead2 __attribute__((__noreturn__)) #define __pure2 __attribute__((__const__)) @@ -776,6 +769,24 @@ #endif /* + * Type Safety Checking + * + * Clang provides additional attributes to enable checking type safety + * properties that cannot be enforced by the C type system. + */ + +#if __has_attribute(argument_with_type_tag) && \ + __has_attribute(type_tag_for_datatype) && !defined(lint) +#define __arg_type_tag(arg_kind, arg_idx, type_tag_idx) \ + __attribute__((__argument_with_type_tag__(arg_kind, arg_idx, type_tag_idx))) +#define __datatype_type_tag(kind, type) \ + __attribute__((__type_tag_for_datatype__(kind, type))) +#else +#define __arg_type_tag(arg_kind, arg_idx, type_tag_idx) +#define __datatype_type_tag(kind, type) +#endif + +/* * Lock annotations. * * Clang provides support for doing basic thread-safety tests at From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 19:02:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B7A9C1FC; Sat, 25 Apr 2015 19:02:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A59791FC4; Sat, 25 Apr 2015 19:02:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3PJ27PH084588; Sat, 25 Apr 2015 19:02:07 GMT (envelope-from tychon@FreeBSD.org) Received: (from tychon@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3PJ27eN084587; Sat, 25 Apr 2015 19:02:07 GMT (envelope-from tychon@FreeBSD.org) Message-Id: <201504251902.t3PJ27eN084587@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tychon set sender to tychon@FreeBSD.org using -f From: Tycho Nightingale Date: Sat, 25 Apr 2015 19:02:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281987 - head/sys/amd64/vmm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 19:02:07 -0000 Author: tychon Date: Sat Apr 25 19:02:06 2015 New Revision: 281987 URL: https://svnweb.freebsd.org/changeset/base/281987 Log: STOS/STOSB/STOSW/STOSD/STOSQ instruction emulation. Reviewed by: neel Modified: head/sys/amd64/vmm/vmm_instruction_emul.c Modified: head/sys/amd64/vmm/vmm_instruction_emul.c ============================================================================== --- head/sys/amd64/vmm/vmm_instruction_emul.c Sat Apr 25 18:17:08 2015 (r281986) +++ head/sys/amd64/vmm/vmm_instruction_emul.c Sat Apr 25 19:02:06 2015 (r281987) @@ -72,6 +72,7 @@ enum { VIE_OP_TYPE_POP, VIE_OP_TYPE_MOVS, VIE_OP_TYPE_GROUP1, + VIE_OP_TYPE_STOS, VIE_OP_TYPE_LAST }; @@ -146,6 +147,16 @@ static const struct vie_op one_byte_opco .op_type = VIE_OP_TYPE_MOVS, .op_flags = VIE_OP_F_NO_MODRM | VIE_OP_F_NO_GLA_VERIFICATION }, + [0xAA] = { + .op_byte = 0xAA, + .op_type = VIE_OP_TYPE_STOS, + .op_flags = VIE_OP_F_NO_MODRM | VIE_OP_F_NO_GLA_VERIFICATION + }, + [0xAB] = { + .op_byte = 0xAB, + .op_type = VIE_OP_TYPE_STOS, + .op_flags = VIE_OP_F_NO_MODRM | VIE_OP_F_NO_GLA_VERIFICATION + }, [0xC6] = { /* XXX Group 11 extended opcode - not just MOV */ .op_byte = 0xC6, @@ -803,6 +814,68 @@ done: } static int +emulate_stos(void *vm, int vcpuid, uint64_t gpa, struct vie *vie, + struct vm_guest_paging *paging, mem_region_read_t memread, + mem_region_write_t memwrite, void *arg) +{ + int error, opsize, repeat; + uint64_t val; + uint64_t rcx, rdi, rflags; + + opsize = (vie->op.op_byte == 0xAA) ? 1 : vie->opsize; + repeat = vie->repz_present | vie->repnz_present; + + if (repeat) { + error = vie_read_register(vm, vcpuid, VM_REG_GUEST_RCX, &rcx); + KASSERT(!error, ("%s: error %d getting rcx", __func__, error)); + + /* + * The count register is %rcx, %ecx or %cx depending on the + * address size of the instruction. + */ + if ((rcx & vie_size2mask(vie->addrsize)) == 0) + return (0); + } + + error = vie_read_register(vm, vcpuid, VM_REG_GUEST_RAX, &val); + KASSERT(!error, ("%s: error %d getting rax", __func__, error)); + + error = memwrite(vm, vcpuid, gpa, val, opsize, arg); + if (error) + return (error); + + error = vie_read_register(vm, vcpuid, VM_REG_GUEST_RDI, &rdi); + KASSERT(error == 0, ("%s: error %d getting rdi", __func__, error)); + + error = vie_read_register(vm, vcpuid, VM_REG_GUEST_RFLAGS, &rflags); + KASSERT(error == 0, ("%s: error %d getting rflags", __func__, error)); + + if (rflags & PSL_D) + rdi -= opsize; + else + rdi += opsize; + + error = vie_update_register(vm, vcpuid, VM_REG_GUEST_RDI, rdi, + vie->addrsize); + KASSERT(error == 0, ("%s: error %d updating rdi", __func__, error)); + + if (repeat) { + rcx = rcx - 1; + error = vie_update_register(vm, vcpuid, VM_REG_GUEST_RCX, + rcx, vie->addrsize); + KASSERT(!error, ("%s: error %d updating rcx", __func__, error)); + + /* + * Repeat the instruction if the count register is not zero. + */ + if ((rcx & vie_size2mask(vie->addrsize)) != 0) + vm_restart_instruction(vm, vcpuid); + } + + return (0); +} + +static int emulate_and(void *vm, int vcpuid, uint64_t gpa, struct vie *vie, mem_region_read_t memread, mem_region_write_t memwrite, void *arg) { @@ -1302,6 +1375,10 @@ vmm_emulate_instruction(void *vm, int vc error = emulate_movs(vm, vcpuid, gpa, vie, paging, memread, memwrite, memarg); break; + case VIE_OP_TYPE_STOS: + error = emulate_stos(vm, vcpuid, gpa, vie, paging, memread, + memwrite, memarg); + break; case VIE_OP_TYPE_AND: error = emulate_and(vm, vcpuid, gpa, vie, memread, memwrite, memarg); From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 19:10:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B64BB47E for ; Sat, 25 Apr 2015 19:10:56 +0000 (UTC) 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 6FAD31FF7 for ; Sat, 25 Apr 2015 19:10:56 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1Ym5TR-000Mls-2X; Sat, 25 Apr 2015 22:10:45 +0300 Date: Sat, 25 Apr 2015 22:10:45 +0300 From: Slawa Olhovchenkov To: Shawn Webb Cc: Joerg Sonnenberger , svn-src-all@freebsd.org Subject: Re: svn commit: r281959 - head/usr.bin/whois Message-ID: <20150425191044.GW1394@zxy.spb.ru> References: <201504250051.t3P0pitf037355@svn.freebsd.org> <20150425145149.GB25518@britannica.bec.de> <1429974286.5017.1.camel@hardenedbsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1429974286.5017.1.camel@hardenedbsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 19:10:56 -0000 On Sat, Apr 25, 2015 at 11:04:46AM -0400, Shawn Webb wrote: > On Sat, 2015-04-25 at 16:51 +0200, Joerg Sonnenberger wrote: > > On Sat, Apr 25, 2015 at 12:51:44AM +0000, Xin LI wrote: > > > Attempt to connect to alternate addresses if the connect doesn't > > > succeed in 180ms, and cut wait time between connection attempts > > > in half for each additional, if no connection was established. > > > > 180ms is very short. I have such latency over 2G, 3G and 4G most of the > > time, soo wouldn't this make whois pretty much useless on such > > connections? > > Google Chromium/Chrome uses a 300ms timeout when falling back from IPv6 > to IPv4. Maybe the 180ms timeout should be increased to match? Acceptable timeout must be 2000ms minimum (two satelite link with some reserve). Independently from google/chrome/microsoft/ibm/etc. From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 19:34:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D0AD5736 for ; Sat, 25 Apr 2015 19:34:58 +0000 (UTC) Received: from nm20-vm5.bullet.mail.gq1.yahoo.com (nm20-vm5.bullet.mail.gq1.yahoo.com [98.136.217.36]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68C7C1266 for ; Sat, 25 Apr 2015 19:34:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1429990096; bh=Auf/+jyp9UpbPtJMzlRn1FlbVXrzrd0Dy5svHeoDoMI=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject; b=NeEX4Al/6jjiFwmxrOCJsXdLGVK6HactzT9X8S4Udi/5ar8xQ4ODE4TmA5pypPxtAlkmzv2UTXmGlYPd6j+bra/e1XrgW7VM8dhBMzVvrrom1bTCguSfzZGohp3uFvvj06ySQ2Lkr/YuSgHt0r8+dZiJZH4KrjzbeXUYmx2cRfDyuhUT3qzZRjOFjvpkJMfNIgJ+6eVQe1z7/TEUFPTVaNef5yhxlhqUvjP0mayj7RzGBofMc37mKqqgsQ4vCGNhrkuf6S5NZ5idSpXqdBEYPOWdQQg4+uVCgZ+PuVz7r/n1HoZ6l2aAKP/BQgJLLyJ2nRyfEVdQDFFCTETwzrPD0g== Received: from [216.39.60.182] by nm20.bullet.mail.gq1.yahoo.com with NNFMP; 25 Apr 2015 19:28:16 -0000 Received: from [98.136.164.69] by tm18.bullet.mail.gq1.yahoo.com with NNFMP; 25 Apr 2015 19:28:15 -0000 Received: from [127.0.0.1] by smtp231.mail.gq1.yahoo.com with NNFMP; 25 Apr 2015 19:28:15 -0000 X-Yahoo-Newman-Id: 867034.69309.bm@smtp231.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: OcNdHLkVM1nkOxG5MTkJYDbjEVfoh9uksmA1QJgGoFmIlzW jIRXbcYnm5gknzhzCSlLw6b99pqJ5Icn9Kw5OUhi0UKuz3AHhT9lwyiUroGc 2uIyy_XbjKgtKVy2qzIRhhsPXseOjiene6JUnMJcRzExmg5CqeNlrCXQFhz_ r9nvvlXT0sg9eReJCGPAZL4HyKlCQebN3YMy9ztFEU8PImOp_smcg3_wMzJT F0Wfgj5DXTWqJjpwzih9y442d72QQfxfxzlEQXn1DUORAs83Wc_pNmyPfCEo cl5os3FgeiUHYo1n2_gCbsIX5fwNLrqOnDDqs7NCubqmjrfz1_D_QK6KMDF. LX7obzOUfyL8bbJpIftfbPogasHghtRlZS2dlQIQTSJHumfl9CsRcoSgBToM 3_WjSQaJlJFTyJbt_9eJ8egIPYq0PtAAwJHZs6I7swygpExBwGyK.RO3zwt0 EJ9q9.4GUj8luleF9JAYnva0g471cDzOLc_xjSyBlNo1OVxgSN7IynCrFV63 1_rn8FZMon8ioXyEWw_0K5SgLYw2lTg7W4.6rkovK X-Yahoo-SMTP: clhABp.swBB7fs.LwIJpv3jkWgo2NU8- Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r281451 - head/sys/vm From: Scott Long In-Reply-To: <20150425070658.GA3442@dchagin.static.corbina.net> Date: Sat, 25 Apr 2015 13:28:12 -0600 Cc: Chris Torek , dim@FreeBSD.org, adrian@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <198D109A-08C1-4D02-87A2-5CAC4CBD069E@yahoo.com> References: <695B6002-002A-406C-B843-0DCFE24F81BD@FreeBSD.org> <201504241237.t3OCbLmd039664@elf.torek.net> <20150425070658.GA3442@dchagin.static.corbina.net> To: Chagin Dmitry X-Mailer: Apple Mail (2.2070.6) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 19:34:58 -0000 > On Apr 25, 2015, at 1:06 AM, Chagin Dmitry wrote: > > On Fri, Apr 24, 2015 at 05:37:21AM -0700, Chris Torek wrote: >> True, it's not actually odd, it's just surprising the first time >> one comes across it. >> >> Also, I goofed in the text: >> >>>> With the flexible array, (sizeof(struct uma_cache)) is going to be >>>> 32 bytes smaller than without it. >> >> It's `struct uma_zone` that shrinks by (potentially) more than one >> would expect. (The uma_cache struct is itself 32 bytes and is not >> changed, so the args.size value should be the same -- implying that >> some OTHER "sizeof(struct uma_zone)" is where things are going wrong.) >> > vm_mem_init() called before uma init. unfortunately, we have not seen > a proper info about panic from scottl > -- > Have fun! > chd Too early in boot to get a crashdump. From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 20:04:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F3D4D9C6; Sat, 25 Apr 2015 20:04:00 +0000 (UTC) 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 708FE154F; Sat, 25 Apr 2015 20:03:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.5/8.14.5) with ESMTP id t3PJxllw048501; Sat, 25 Apr 2015 22:59:47 +0300 (MSK) (envelope-from marck@rinet.ru) Date: Sat, 25 Apr 2015 22:59:47 +0300 (MSK) From: Dmitry Morozovsky To: Scott Long cc: Chagin Dmitry , adrian@freebsd.org, src-committers@freebsd.org, Chris Torek , svn-src-all@freebsd.org, dim@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281451 - head/sys/vm In-Reply-To: <198D109A-08C1-4D02-87A2-5CAC4CBD069E@yahoo.com> Message-ID: References: <695B6002-002A-406C-B843-0DCFE24F81BD@FreeBSD.org> <201504241237.t3OCbLmd039664@elf.torek.net> <20150425070658.GA3442@dchagin.static.corbina.net> <198D109A-08C1-4D02-87A2-5CAC4CBD069E@yahoo.com> 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]); Sat, 25 Apr 2015 23:00:47 +0300 (MSK) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 20:04:01 -0000 On Sat, 25 Apr 2015, Scott Long via svn-src-all wrote: > >> True, it's not actually odd, it's just surprising the first time > >> one comes across it. > >> > >> Also, I goofed in the text: > >> > >>>> With the flexible array, (sizeof(struct uma_cache)) is going to be > >>>> 32 bytes smaller than without it. > >> > >> It's `struct uma_zone` that shrinks by (potentially) more than one > >> would expect. (The uma_cache struct is itself 32 bytes and is not > >> changed, so the args.size value should be the same -- implying that > >> some OTHER "sizeof(struct uma_zone)" is where things are going wrong.) > >> > > vm_mem_init() called before uma init. unfortunately, we have not seen > > a proper info about panic from scottl > Too early in boot to get a crashdump. ... and even console not set up enough to have a backtrace/some debugging printfs displayed? -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 20:10:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3974EB59 for ; Sat, 25 Apr 2015 20:10:13 +0000 (UTC) Received: from nm18-vm2.bullet.mail.gq1.yahoo.com (nm18-vm2.bullet.mail.gq1.yahoo.com [98.136.217.217]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05A561592 for ; Sat, 25 Apr 2015 20:10:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1429992606; bh=o/OdhauQ3IAV3PxXT6rybcUGYxLrZMff1fJcQk9ILhk=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject; b=H02ioIFMbrU9sugtfbsSZWwE+sfil3ZE0EI9wpG6UaR+yT2zn48CPH+/yBcY3Irrtlc4AvmQMj2oy62bapbOLF4BOHpqg1kVrh7o74RZ32btY49qnHTLodPPsejwo0E9JGWRv/NQKGXUjfIBT+EFMn4QTgCtn5My7L5anRb1CL52wZ4owuk3PS9pW2dMzVDDyMVomkSryUTZ0IqNUKRlzLjFcql1tbnuACzjCHsTLEk3wwLJ9O7FExTyxIpcccXiO2IS3WP/2gcBv65DEFGgnss9fyVvdJ7um3CmldGkBQTvkj08LT260Fy9zVvtfk/XdoFDpJ8xxPIesJyLsqZaJQ== Received: from [98.137.12.175] by nm18.bullet.mail.gq1.yahoo.com with NNFMP; 25 Apr 2015 20:10:06 -0000 Received: from [98.136.164.73] by tm14.bullet.mail.gq1.yahoo.com with NNFMP; 25 Apr 2015 20:10:06 -0000 Received: from [127.0.0.1] by smtp235.mail.gq1.yahoo.com with NNFMP; 25 Apr 2015 20:10:06 -0000 X-Yahoo-Newman-Id: 596064.53946.bm@smtp235.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: uR2x4W0VM1kFLYfG3x7KzYLfrXNqoxD0K.oQHVkOtSjirbS HJgBF3XjLVebUTdnefywWx8bG0GCItqOfTMJu.rXi14Pa7QIXcghjPUJZ8SZ VmP1BBNhv2Le6RS4f_7ycU289aaRZwQwdQE2Yz4OETIfW2gLKPhLcs.a8yMc 4n5Mu83Jrn57D2trN1l2uWNh15vxvk.L_c1b22ZpiynJqdfvRPT5zfChYx3E G.IWmKzHcbxoeb88hesL7GKVjQOggQSCMDwlgRPkbT795jJo9.psqQkFjav8 LqDU_4c4QC4g6LpporDTE4dnXkl4.vDal_Q623Unq5AkMwH6yqpxDDcxV1gl sbwKFhoktuyem6kT2CsJT2T0mCGxL43jWXbXo5supmxopYbhm.GieX1D7DeM A0fFcvLXib5NwbZaoKBYJxWasOW7u.IREYzd6PBovr_2fWYSekDZ56Kd_hN5 P2dylbqZPyZ7Tsx2qP1a8HDw3ierd77dAb0VxNRP0Fzfn3mr2gLi9cdtXgR_ zkyvjuhnoRRtD7CoNAOthEjNzVgKzhQ-- X-Yahoo-SMTP: clhABp.swBB7fs.LwIJpv3jkWgo2NU8- Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r281451 - head/sys/vm From: Scott Long In-Reply-To: Date: Sat, 25 Apr 2015 14:10:03 -0600 Cc: Chagin Dmitry , adrian@freebsd.org, src-committers@freebsd.org, Chris Torek , svn-src-all@freebsd.org, dim@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <1D0056BB-EC90-4560-AFDE-6143957435EE@yahoo.com> References: <695B6002-002A-406C-B843-0DCFE24F81BD@FreeBSD.org> <201504241237.t3OCbLmd039664@elf.torek.net> <20150425070658.GA3442@dchagin.static.corbina.net> <198D109A-08C1-4D02-87A2-5CAC4CBD069E@yahoo.com> To: Dmitry Morozovsky X-Mailer: Apple Mail (2.2070.6) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 20:10:13 -0000 > On Apr 25, 2015, at 1:59 PM, Dmitry Morozovsky wrote: >=20 > On Sat, 25 Apr 2015, Scott Long via svn-src-all wrote: >=20 >>>> True, it's not actually odd, it's just surprising the first time >>>> one comes across it. >>>>=20 >>>> Also, I goofed in the text: >>>>=20 >>>>>> With the flexible array, (sizeof(struct uma_cache)) is going to = be >>>>>> 32 bytes smaller than without it. >>>>=20 >>>> It's `struct uma_zone` that shrinks by (potentially) more than one >>>> would expect. (The uma_cache struct is itself 32 bytes and is not >>>> changed, so the args.size value should be the same -- implying that >>>> some OTHER "sizeof(struct uma_zone)" is where things are going = wrong.) >>>>=20 >>> vm_mem_init() called before uma init. unfortunately, we have not = seen >>> a proper info about panic from scottl >=20 >> Too early in boot to get a crashdump. >=20 > ... and even console not set up enough to have a backtrace/some = debugging=20 > printfs displayed? Maybe you didn=E2=80=99t see the backtrace that was printed and = included? What debugging printfs should I have predicted that you would = want? Scott From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 21:19:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3699C580 for ; Sat, 25 Apr 2015 21:19:43 +0000 (UTC) Received: from nm8-vm2.bullet.mail.gq1.yahoo.com (nm8-vm2.bullet.mail.gq1.yahoo.com [98.136.218.225]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0173E1BD9 for ; Sat, 25 Apr 2015 21:19:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1429996776; bh=xxiS1alm5Zbwqd83uAsCbftxT6t7NKH5j8wKLogLwgI=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject; b=nzSoOwNa022ni9qnlV299ZdXkKvhiNsZUxzkl6T9RPFdLmULWLQffyOW7KsydTYRd5XeHnE8P7uhmqvtDIMHgYIgd+0ei3aYxTW4AsHpJ/AO/O6OsRoFYkrvvvKcbbxem5zozvhJutPPVWG2iFZso92WHsm9+b6mcyVt5Mx9Mjzq+9xvfk2rHxUzHdaj1s6EQ2gT8kO3Y9ne/H9iyqXY1AHCbT7oP+DemV2jWLpPTejkM6GqsGQQlT2XhWtLX9Gi98hIKGOkzTspJHcf3x6MStXh5e4uboGlJ91j7BqPGBVDXXss855eISCloOJDOV389J6cyFkfto7Qd3R/z348dw== Received: from [98.137.12.188] by nm8.bullet.mail.gq1.yahoo.com with NNFMP; 25 Apr 2015 21:19:36 -0000 Received: from [98.136.164.64] by tm9.bullet.mail.gq1.yahoo.com with NNFMP; 25 Apr 2015 21:19:36 -0000 Received: from [127.0.0.1] by smtp226.mail.gq1.yahoo.com with NNFMP; 25 Apr 2015 21:19:36 -0000 X-Yahoo-Newman-Id: 667705.80295.bm@smtp226.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: 9p3E2GgVM1ndM8nfJKxxG4zCJ.k4qw21yCcyTW4uim6kTAw sNINEydO01n5GpwVWsNTxqi9RSYSwHA1.8e3oxenHIf4LBEPOnmakuq_FvTf OUrer9UOm7Luv6huFHSPLTXD6yvRMSGJWlg08A5CyPwtBZBOKX778vuku4YC 6aJj0KnZy0j.6Atr6O6Kld1FWIJ2PZFrgfAHqC5FbwVtuO7R6WA22oMUv7du q0WeI_n.rievidMIAEfokbAfgibvM95XlEuYX_7BpFzZ9ewXubSQ6NocEyMl Awdn6blOpiNe98Pq412LsFDY9KZkNA6VyqPCe38AdFT2VRy7VPTDXzJKuWeW hf6S9ENZ3KqR6xinHVRitpz9BHq.x3IrtHRqYnxCsWxhntUFa_0Qexs.jOco wFEV5dQvwFq7PUiZtLpGZjVqhAGLxdsAXwSwfQFFZwyEdvzoQ0f7Iy2NemPY sygAH0ShX43xgfWTSX8VK9p7v3gOl5v_lwcDkePMghJhbEfjYTvvvArLzJtR DEaJShM9tq5xQrMzKd3jX3f0.1PSgGTcWZN.uoULO X-Yahoo-SMTP: clhABp.swBB7fs.LwIJpv3jkWgo2NU8- Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r281942 - head/sys/vm From: Scott Long In-Reply-To: <20150425083030.GA3555@dchagin.static.corbina.net> Date: Sat, 25 Apr 2015 15:19:34 -0600 Cc: Scott Long , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <99BAA5F2-AF62-426A-A79D-A0466B7B5E74@yahoo.com> References: <201504241703.t3OH3rpr097920@svn.freebsd.org> <20150425083030.GA3555@dchagin.static.corbina.net> To: Chagin Dmitry X-Mailer: Apple Mail (2.2070.6) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 21:19:43 -0000 > On Apr 25, 2015, at 2:30 AM, Chagin Dmitry = wrote: >=20 > On Fri, Apr 24, 2015 at 05:03:53PM +0000, Scott Long wrote: >> Author: scottl >> Date: Fri Apr 24 17:03:53 2015 >> New Revision: 281942 >> URL: https://svnweb.freebsd.org/changeset/base/281942 >>=20 >> Log: >> Revert r281451. It causes a panic/hang early in boot for a number = of >> users, myself included. The original code is likely papering over a >> larger bug that needs to be explored, but for now get things back to >> a working state. >>=20 >> Obtained from: Netflix, Inc. >> MFC after: immediately >>=20 > in my POV, at vm_mem_init stage vm_map_init() call > uma_zcreate() that uses uinitialized zones (which initialized > in uma_startup()). I bet zones contains garbage. >=20 I don=E2=80=99t follow. vm_mem_init() is called at SI_SUB_VM sysinit, = and vm_map_init() is called much later at SI_SUB_INTRINSIC. vm_mem_init() calls = uma_startup() almost immediately, which will then call zone_ctor() on the =E2=80=9Ckegs=E2= =80=9D and =E2=80=9Czones=E2=80=9D that were allocated from bss. I don=E2=80=99t think that they=E2=80=99re = being used prior to that. The problem that I see is that both of these zones are allocated = statically, and contain no storage for the uz_cpu member when that member is declared as = a zero-length array. All other zones are created dynamically and include = space for these members. uma_startup() is initializing these zones at the right = time, before their first use, but isn=E2=80=99t giving them enough room. According to the stack trace I posted, the problem triggers in the = second call to uma_zcreate() from uma_startup(). I think what happens is that the = first call to uma_zcreate() winds up writing to the zero-length uz_cpu member of masterzone_z from inside of uma_zalloc_args(). This overwrites the = adjacent =E2=80=9Ckegs=E2=80=9D and =E2=80=9Czones=E2=80=9D pointers in the bss. = The next call to uma_zcreate() then follows a path of trying to look in the kegs, and eventually blows up. = I=E2=80=99m not entirely certain on this chain of events though as it=E2=80=99s a bit = twisty inside of uma_zcreate() and I=E2=80=99m not sure I=E2=80=99ve found a link to = where it calls uma_zalloc_args(). Scott From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 21:25:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1D2DE7B8; Sat, 25 Apr 2015 21:25:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0BB451CA6; Sat, 25 Apr 2015 21:25:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3PLP0R6053905; Sat, 25 Apr 2015 21:25:00 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3PLP0G1053904; Sat, 25 Apr 2015 21:25:00 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201504252125.t3PLP0G1053904@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sat, 25 Apr 2015 21:25:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281988 - head/lib/libarchive X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 21:25:01 -0000 Author: jilles Date: Sat Apr 25 21:25:00 2015 New Revision: 281988 URL: https://svnweb.freebsd.org/changeset/base/281988 Log: libarchive: Allow setting nanosecond timestamps. Modified: head/lib/libarchive/config_freebsd.h Modified: head/lib/libarchive/config_freebsd.h ============================================================================== --- head/lib/libarchive/config_freebsd.h Sat Apr 25 19:02:06 2015 (r281987) +++ head/lib/libarchive/config_freebsd.h Sat Apr 25 21:25:00 2015 (r281988) @@ -25,6 +25,8 @@ * $FreeBSD$ */ +#include + /* FreeBSD 5.0 and later have ACL and extattr support. */ #if __FreeBSD__ > 4 #define HAVE_ACL_CREATE_ENTRY 1 @@ -220,6 +222,11 @@ #define HAVE_ZLIB_H 1 #define TIME_WITH_SYS_TIME 1 +#if __FreeBSD_version >= 1100056 +#define HAVE_FUTIMENS 1 +#define HAVE_UTIMENSAT 1 +#endif + /* FreeBSD 4 and earlier lack intmax_t/uintmax_t */ #if __FreeBSD__ < 5 #define intmax_t int64_t From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 21:43:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 149FAA2A; Sat, 25 Apr 2015 21:43:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA1F01E42; Sat, 25 Apr 2015 21:43:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3PLhTso063537; Sat, 25 Apr 2015 21:43:29 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3PLhTqP063536; Sat, 25 Apr 2015 21:43:29 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201504252143.t3PLhTqP063536@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 25 Apr 2015 21:43:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281989 - head/sys/dev/iicbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 21:43:30 -0000 Author: loos Date: Sat Apr 25 21:43:29 2015 New Revision: 281989 URL: https://svnweb.freebsd.org/changeset/base/281989 Log: Make the pcf8563 RTC work on FDT systems and on interrupt based i2c controllers. Call iicbus_transfer() from the device context and not from the iicbus context. I am committing a slightly different patch, so if something break, it is probably my fault. PR: 199496 Submitted by: Juraj Lutter Modified: head/sys/dev/iicbus/pcf8563.c Modified: head/sys/dev/iicbus/pcf8563.c ============================================================================== --- head/sys/dev/iicbus/pcf8563.c Sat Apr 25 21:25:00 2015 (r281988) +++ head/sys/dev/iicbus/pcf8563.c Sat Apr 25 21:43:29 2015 (r281989) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2012 Marius Strobl + * Copyright (c) 2015 Juraj Lutter * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,6 +32,8 @@ __FBSDID("$FreeBSD$"); * Driver for NXP PCF8563 real-time clock/calendar */ +#include "opt_platform.h" + #include #include #include @@ -41,6 +44,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifdef FDT +#include +#include +#include +#endif #include "clock_if.h" #include "iicbus_if.h" @@ -48,6 +56,7 @@ __FBSDID("$FreeBSD$"); #define PCF8563_NCLOCKREGS (PCF8563_R_YEAR - PCF8563_R_CS1 + 1) struct pcf8563_softc { + struct intr_config_hook enum_hook; uint32_t sc_flags; #define PCF8563_CPOL (1 << 0) /* PCF8563_R_MONTH_C means 19xx */ uint16_t sc_addr; /* PCF8563 slave address */ @@ -58,30 +67,62 @@ static device_attach_t pcf8563_attach; static device_probe_t pcf8563_probe; static clock_gettime_t pcf8563_gettime; static clock_settime_t pcf8563_settime; +static void pcf8563_start(void *); static int pcf8563_probe(device_t dev) { +#ifdef FDT + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "nxp,pcf8563") && + !ofw_bus_is_compatible(dev, "philips,pcf8563") && + !ofw_bus_is_compatible(dev, "pcf8563")) + return (ENXIO); +#endif device_set_desc(dev, "NXP PCF8563 RTC"); - return (BUS_PROBE_NOWILDCARD); + + return (BUS_PROBE_DEFAULT); } static int pcf8563_attach(device_t dev) { + struct pcf8563_softc *sc; + + sc = device_get_softc(dev); + sc->sc_addr = iicbus_get_addr(dev); + if (sc->sc_addr == 0) + sc->sc_addr = PCF8563_ADDR; + sc->sc_year0 = 1900; + sc->enum_hook.ich_func = pcf8563_start; + sc->enum_hook.ich_arg = dev; + + /* + * We have to wait until interrupts are enabled. Sometimes I2C read + * and write only works when the interrupts are available. + */ + if (config_intrhook_establish(&sc->enum_hook) != 0) + return (ENOMEM); + + return (0); +} + +static void +pcf8563_start(void *xdev) +{ + device_t dev; uint8_t reg = PCF8563_R_SECOND, val; struct iic_msg msgs[] = { { 0, IIC_M_WR, sizeof(reg), ® }, { 0, IIC_M_RD, sizeof(val), &val } }; struct pcf8563_softc *sc; - int error; + dev = (device_t)xdev; sc = device_get_softc(dev); - sc->sc_addr = iicbus_get_addr(dev); - if (sc->sc_addr == 0) - sc->sc_addr = PCF8563_ADDR; + config_intrhook_disestablish(&sc->enum_hook); /* * NB: PCF8563_R_SECOND_VL doesn't automatically clear when VDD @@ -94,18 +135,14 @@ pcf8563_attach(device_t dev) * as a side-effect. */ msgs[0].slave = msgs[1].slave = sc->sc_addr; - error = iicbus_transfer(device_get_parent(dev), msgs, sizeof(msgs) / - sizeof(*msgs)); - if (error != 0) { + if (iicbus_transfer(dev, msgs, nitems(msgs)) != 0) { device_printf(dev, "%s: cannot read RTC\n", __func__); - return (error); + return; } if ((val & PCF8563_R_SECOND_VL) != 0) device_printf(dev, "%s: battery low\n", __func__); - sc->sc_year0 = 1900; clock_register(dev, 1000000); /* 1 second resolution */ - return (0); } static int @@ -122,8 +159,7 @@ pcf8563_gettime(device_t dev, struct tim sc = device_get_softc(dev); msgs[0].slave = msgs[1].slave = sc->sc_addr; - error = iicbus_transfer(device_get_parent(dev), msgs, sizeof(msgs) / - sizeof(*msgs)); + error = iicbus_transfer(dev, msgs, nitems(msgs)); if (error != 0) { device_printf(dev, "%s: cannot read RTC\n", __func__); return (error); @@ -145,6 +181,7 @@ pcf8563_gettime(device_t dev, struct tim sc->sc_flags |= PCF8563_CPOL; } else if (ct.year < 100 + sc->sc_year0) sc->sc_flags |= PCF8563_CPOL; + return (clock_ct_to_ts(&ct, ts)); } @@ -180,10 +217,10 @@ pcf8563_settime(device_t dev, struct tim val[PCF8563_R_MONTH] |= PCF8563_R_MONTH_C; msgs[0].slave = sc->sc_addr; - error = iicbus_transfer(device_get_parent(dev), msgs, sizeof(msgs) / - sizeof(*msgs)); + error = iicbus_transfer(dev, msgs, nitems(msgs)); if (error != 0) device_printf(dev, "%s: cannot write RTC\n", __func__); + return (error); } From owner-svn-src-all@FreeBSD.ORG Sat Apr 25 22:42:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CF5CAE97; Sat, 25 Apr 2015 22:42:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BDA3C1320; Sat, 25 Apr 2015 22:42:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3PMg4kO093283; Sat, 25 Apr 2015 22:42:04 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3PMg4Mv093281; Sat, 25 Apr 2015 22:42:04 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201504252242.t3PMg4Mv093281@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 25 Apr 2015 22:42:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281991 - in head/sys/arm: allwinner broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 22:42:04 -0000 Author: loos Date: Sat Apr 25 22:42:03 2015 New Revision: 281991 URL: https://svnweb.freebsd.org/changeset/base/281991 Log: Set ARM_L2_PIPT for A10 and RPI2, they are probably missing by accident. Noted by: Michal Meloun Modified: head/sys/arm/allwinner/std.a10 head/sys/arm/broadcom/bcm2835/std.bcm2836 Modified: head/sys/arm/allwinner/std.a10 ============================================================================== --- head/sys/arm/allwinner/std.a10 Sat Apr 25 22:05:48 2015 (r281990) +++ head/sys/arm/allwinner/std.a10 Sat Apr 25 22:42:03 2015 (r281991) @@ -17,5 +17,7 @@ options KERNPHYSADDR=0x40200000 makeoptions KERNVIRTADDR=0xc0200000 options KERNVIRTADDR=0xc0200000 +options ARM_L2_PIPT + files "../allwinner/files.allwinner" files "../allwinner/files.a10" Modified: head/sys/arm/broadcom/bcm2835/std.bcm2836 ============================================================================== --- head/sys/arm/broadcom/bcm2835/std.bcm2836 Sat Apr 25 22:05:48 2015 (r281990) +++ head/sys/arm/broadcom/bcm2835/std.bcm2836 Sat Apr 25 22:42:03 2015 (r281991) @@ -5,6 +5,8 @@ cpu CPU_CORTEXA makeoptions CONF_CFLAGS="-march=armv7a" options SOC_BCM2836 +options ARM_L2_PIPT + files "../broadcom/bcm2835/files.bcm2836" files "../broadcom/bcm2835/files.bcm283x"