From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 00:34:11 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5E67115F; Sun, 11 Nov 2012 00:34:11 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 43E328FC0A; Sun, 11 Nov 2012 00:34:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAB0YB8H052473; Sun, 11 Nov 2012 00:34:11 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAB0YBFn052472; Sun, 11 Nov 2012 00:34:11 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201211110034.qAB0YBFn052472@svn.freebsd.org> From: Adrian Chadd Date: Sun, 11 Nov 2012 00:34:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242881 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 00:34:11 -0000 Author: adrian Date: Sun Nov 11 00:34:10 2012 New Revision: 242881 URL: http://svnweb.freebsd.org/changeset/base/242881 Log: Don't call av_set_tim() if it's NULL. This happens during a scan in STA mode; any queued data frames will be power save queued but as there's no TIM in STA mode, it panics. This was introduced by me when I disabled my driver-aware power save handling support. Modified: head/sys/dev/ath/if_ath_tx.c Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Sat Nov 10 22:37:06 2012 (r242880) +++ head/sys/dev/ath/if_ath_tx.c Sun Nov 11 00:34:10 2012 (r242881) @@ -1236,6 +1236,8 @@ ath_tx_setds(struct ath_softc *sc, struc struct ath_desc *ds = bf->bf_desc; struct ath_hal *ah = sc->sc_ah; + bzero(bf->bf_desc, sc->sc_tx_desclen * bf->bf_nseg); + ath_hal_setuptxdesc(ah, ds , bf->bf_state.bfs_pktlen /* packet length */ , bf->bf_state.bfs_hdrlen /* header length */ From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 04:04:15 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D1109C51; Sun, 11 Nov 2012 04:04:15 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 682DC8FC0C; Sun, 11 Nov 2012 04:04:14 +0000 (UTC) Received: by mail-lb0-f182.google.com with SMTP id gg13so270538lbb.13 for ; Sat, 10 Nov 2012 20:04:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=1L76toRMUUranp6a+NWLIMW2shAu8btr5XP6RfCXt/w=; b=dPVs+RRHIz/HPj6GPL5nnUqUKTF0ctmkwezecaVTmjR87ZBOrDmSxrXbT121tWyPsK OWXX9VSFMQSzviOj9lTWIQCxD7ChJCjKsDPrw52PYScnOQBHdama9RBP4NKzr9qfMl0F GcAfouemoOjbYODQeKgEVQ7VdvFGx4nHXYjTbAfo9kYzbZLTrdJ+iD56A/FO9tqX9B+z MV2PyZXK6ZyRhwxRrCvAXWaJny1vw+4pOHBPB5a5UK+CHlows7hkogYR9IEOAAaE/Rp+ C9E4rOSF9I2cTFhhkJDdVUU6wQzcyoyDHiK7d7Fv/VSVEw9glcj4y9WQmBOLMopteNIL wIew== MIME-Version: 1.0 Received: by 10.112.43.34 with SMTP id t2mr6257477lbl.109.1352606653199; Sat, 10 Nov 2012 20:04:13 -0800 (PST) Received: by 10.152.111.100 with HTTP; Sat, 10 Nov 2012 20:04:13 -0800 (PST) In-Reply-To: <509EC0E5.6040109@FreeBSD.org> References: <201211100032.qAA0Wlvw090497@svn.freebsd.org> <509EC0E5.6040109@FreeBSD.org> Date: Sat, 10 Nov 2012 20:04:13 -0800 Message-ID: Subject: Re: svn commit: r242842 - in head/sys: conf modules/mthca From: Xin LI To: Dimitry Andric Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Xin LI X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 04:04:16 -0000 Would you please commit them then? I am frustrated with the fact that -HEAD is not buildable for so long time and nobody seems to care doing tinderbox build pre-commit, which is not acceptable to be honest. On Saturday, November 10, 2012, Dimitry Andric wrote: > On 2012-11-10 01:32, Xin LI wrote: > >> Author: delphij >> Date: Sat Nov 10 00:32:47 2012 >> New Revision: 242842 >> URL: http://svnweb.freebsd.org/**changeset/base/242842 >> >> Log: >> Attempt toward a buildable universe by silenting a few warnings for >> OFED. >> > ... > >> -OFEDNOERR= -Wno-cast-qual -Wno-pointer-arith -fms-extensions >> +OFEDNOERR= -Wno-cast-qual -Wno-pointer-arith -fms-extensions >> -Wno-switch -Wno-sometimes-uninitialized -Wno-conversion >> -Wno-initializer-overrides >> > > A few of these warnings point to real bugs, e.g. the uninitialized > packet_length variable in ib_ud_header_init(), and the incorrect value > passed to rdma_notify() in sdp_rx_comp_work(). The others are not that > severe, but very easy to fix, as you can see from the attached diff. > > If anything, I hope the maintainer(s) will check with upstream whether > these bugs are already fixed? Meanwhile, I see no reason why we could > not do a local fix. > -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 04:33:51 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6B8ED495; Sun, 11 Nov 2012 04:33:51 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from argol.doit.wisc.edu (argol.doit.wisc.edu [144.92.197.212]) by mx1.freebsd.org (Postfix) with ESMTP id 35FD78FC15; Sun, 11 Nov 2012 04:33:50 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Received: from avs-daemon.smtpauth3.wiscmail.wisc.edu by smtpauth3.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) id <0MDB000003C83900@smtpauth3.wiscmail.wisc.edu>; Sat, 10 Nov 2012 22:33:44 -0600 (CST) Received: from comporellon.tachypleus.net (adsl-71-150-249-157.dsl.mdsnwi.sbcglobal.net [71.150.249.157]) by smtpauth3.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) with ESMTPSA id <0MDB00ERI3C60F20@smtpauth3.wiscmail.wisc.edu>; Sat, 10 Nov 2012 22:33:43 -0600 (CST) Date: Sat, 10 Nov 2012 22:33:42 -0600 From: Nathan Whitehorn Subject: Re: svn commit: r242835 - head/contrib/llvm/lib/Target/X86 In-reply-to: <201211091856.qA9IuRxX035169@svn.freebsd.org> To: Dimitry Andric Message-id: <509F2AA6.9050509@freebsd.org> X-Spam-Report: AuthenticatedSender=yes, SenderIP=71.150.249.157 X-Spam-PmxInfo: Server=avs-14, Version=5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.11.11.42417, SenderIP=71.150.249.157 References: <201211091856.qA9IuRxX035169@svn.freebsd.org> User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:16.0) Gecko/20121103 Thunderbird/16.0.2 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 04:33:51 -0000 On 11/09/12 12:56, Dimitry Andric wrote: > Author: dim > Date: Fri Nov 9 18:56:27 2012 > New Revision: 242835 > URL: http://svnweb.freebsd.org/changeset/base/242835 > > Log: > Reduce LLVM's default stack alignment for i386 from 16 to 4 bytes, as > the FreeBSD ABI requires. This is essentially a revert of upstream llvm > commit r126226, and it will be reverted by upstream too. > > MFC after: 1 week > > Modified: > head/contrib/llvm/lib/Target/X86/X86Subtarget.cpp > > Modified: head/contrib/llvm/lib/Target/X86/X86Subtarget.cpp > ============================================================================== > --- head/contrib/llvm/lib/Target/X86/X86Subtarget.cpp Fri Nov 9 18:23:38 2012 (r242834) > +++ head/contrib/llvm/lib/Target/X86/X86Subtarget.cpp Fri Nov 9 18:56:27 2012 (r242835) > @@ -416,12 +416,12 @@ X86Subtarget::X86Subtarget(const std::st > assert((!In64BitMode || HasX86_64) && > "64-bit code requested on a subtarget that doesn't support it!"); > > - // Stack alignment is 16 bytes on Darwin, FreeBSD, Linux and Solaris (both > - // 32 and 64 bit) and for all 64-bit targets. > + // Stack alignment is 16 bytes on Darwin, Linux and Solaris (both 32 and 64 > + // bit) and for all 64-bit targets. > if (StackAlignOverride) > stackAlignment = StackAlignOverride; > - else if (isTargetDarwin() || isTargetFreeBSD() || isTargetLinux() || > - isTargetSolaris() || In64BitMode) > + else if (isTargetDarwin() || isTargetLinux() || isTargetSolaris() || > + In64BitMode) > stackAlignment = 16; > } > I'd like to object to this. We have an identical ABI to Linux (and Solaris, as far as I know). Splitting this by platform will only propagate the stack alignment breakage further -- what we need is LLVM/our C library to handle different alignments. Please fix this for real instead of balkanizing the ABI support in LLVM and introducing different ABIs for LLVM and GCC to FreeBSD. -Nathan From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 05:55:19 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DAAE9DD9 for ; Sun, 11 Nov 2012 05:55:19 +0000 (UTC) (envelope-from peter@wemm.org) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 425308FC15 for ; Sun, 11 Nov 2012 05:55:18 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id e12so4910775lag.13 for ; Sat, 10 Nov 2012 21:55:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=edDcg5PWSV6IbotOys6Mk+XRK26rSSdoMwWckqZeIJM=; b=G2grn7u9DIZThOJ4lHyuj6hD15eDAxR3+eUIMfpUhfUA530ZHiSOfnmna7XU0CWIC6 w6q7++xTqK+pnUQxj8dkVvMFKw0Z2WxHYteXCijpHHsqXLtIzPRhllIuMlorpx9mqzG6 978CXBKxIxMSk3nQ3XHUPFWqtd6YV0LjeqWuo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=edDcg5PWSV6IbotOys6Mk+XRK26rSSdoMwWckqZeIJM=; b=gkbDlepIuHnRtw2kXyH79LlAEnFJXZ0fLRmLQuQS4MSWqkVb54kdJWA0RydEfi3CTF jQH5DluH09t7HdB9Qu8NOq/beXIuP3zu6Qc6oJlWMu6K50iI6ujffm8E8bpSGVrmnabr wLWfwAw7YhGmZPrymRAZe2uZbXZRWgbk9k7eHGw6rNt2pO6PZDRuA/OIbhdMCEjMqKs1 4Moh4ro2s40jERkS3Ntjj7B+ECAAdFmOPDkVtd4ucY/l/oMh28Qc1f9hshnm2Tue78HI +SHqIaKcMHW7BFQdm6wmx8bRVNvMdXyUOBKJ8SYaUKs11qe9YDus4v7vmQJulAfI1NZx Ma3Q== MIME-Version: 1.0 Received: by 10.112.39.105 with SMTP id o9mr2802721lbk.123.1352613317777; Sat, 10 Nov 2012 21:55:17 -0800 (PST) Received: by 10.112.100.230 with HTTP; Sat, 10 Nov 2012 21:55:17 -0800 (PST) In-Reply-To: <509EA869.6030407@freebsd.org> References: <201211100208.qAA28e0v004842@svn.freebsd.org> <509DC25E.5030306@mu.org> <509E3162.5020702@FreeBSD.org> <509E7E7C.9000104@mu.org> <509E830D.5080006@mu.org> <509E847E.30509@mu.org> <509E8930.50800@mu.org> <509EA869.6030407@freebsd.org> Date: Sat, 10 Nov 2012 21:55:17 -0800 Message-ID: Subject: Re: svn commit: r242847 - in head/sys: i386/include kern From: Peter Wemm To: Andre Oppermann Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQlT/vNg4guPTHFd+7DIM88V+VDK+SFzopaq2rah69pzvYPBmeAgmEGFZv5N4inP/GMjmNom Cc: src-committers@freebsd.org, Eitan Adler , Alfred Perlstein , svn-src-all@freebsd.org, Alfred Perlstein , svn-src-head@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 05:55:19 -0000 On Sat, Nov 10, 2012 at 11:18 AM, Andre Oppermann wrote: > On 10.11.2012 19:04, Peter Wemm wrote: >> >> On Sat, Nov 10, 2012 at 9:48 AM, Eitan Adler wrote: >>> >>> On 10 November 2012 12:45, Peter Wemm wrote: >>>> >>>> On Sat, Nov 10, 2012 at 9:33 AM, Eitan Adler wrote: >>>>> >>>>> On 10 November 2012 12:04, Alfred Perlstein wrote: >>>>>> >>>>>> Sure, if you'd like you can help me craft that comment now? >>>>> >>>>> >>>>> I think this is short and clear: >>>>> === >>>>> Limit the amount of kernel address space used to a fixed cap. >>>>> 384 is an arbitrarily chosen value that leaves 270 MB of KVA available >>>>> of the 2 MB total. On systems with large amount of memory reduce the >>>>> the slope of the function in order to avoiding exhausting KVA. >>>>> === >>>> >>>> >>>> That's actually completely 100% incorrect... >>> >>> >>> okay. I'm going by the log messages posted so far. I have no idea how >>> this works. Can you explain it better? >> >> >> That's exactly my point.. >> >> You get 1 maxuser per 2MB of physical ram. >> If you get more than 384 maxusers (ie: 192GB of ram) we scale it >> differently for the part past 192GB. I have no idea how the hell to > > > Rather past 768MB of RAM. You're right. It is 768M ram before the slope of the cap changes. maxusers = physpages / (2 * 1024 * 1024 / PAGE_SIZE); This is simple math. physpages is units of pages. (2 * 1024 * 1024 / PAGE_SIZE) = 2MB, converted to pages. So maxusers = 1 per 2MB of physical ram. 20MB of ram calculates maxusers = 10. 768M ram gives maxusers = 384. Above 768M, one maxuser is allocated per 2 * 8 = 16MB of ram. 4G gives maxusers = 592. 16G gives maxusers = 1360. >> calculate that. >> You get an unlimited number of regular mbufs. >> You get 64 clusters per maxuser (128k) >> Unless I fubared the numbers, this currently works out to be 6%, or 1/16. >> >> Each MD backend gets to provide a cap for maxusers, which is in units >> of 2MB. For an i386 PAE machine you have a finite amount of KVA space >> (1GB, but this is adjustable.. you can easily configure it for 3GB kva >> with one compile option for the kernel). The backends where the >> nmbclusters comes out of KVA should calculate the number of 2MB units >> to avoid running out of KVA. >> >> amd64 does a mixture of direct map and kva allocations. eg: mbufs and >> clusters come from direct map, the jumbo clusters come from kva. I'm aware of this. Behavior of how to set a "Don't die" exhaustion is MD. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV "All of this is for nothing if we don't go to the stars" - JMS/B5 "If Java had true garbage collection, most programs would delete themselves upon execution." -- Robert Sewell From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 06:22:55 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F327819E for ; Sun, 11 Nov 2012 06:22:54 +0000 (UTC) (envelope-from peter@wemm.org) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 5897C8FC0A for ; Sun, 11 Nov 2012 06:22:53 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id e12so4918221lag.13 for ; Sat, 10 Nov 2012 22:22:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=bQyCu1ZXMLmd0sYcFgwUzssX568q584UEmm/4ecMmpQ=; b=ZLNi0Fxkl3ibv+IFI4TsafKBGN/SsojldjDUvoVHGcK3HF9hWoDAzzu7iY2DMRRWfR cTtMbf/aLZpXgaxl06umz3fT76yVJQRSlWFroG0xSEaNd5i4SWKbnK+FQNguLfz9NWtR 3NWCGXYZAHkT5n3QOeK/gk8jRXOc2N+96Fkbk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=bQyCu1ZXMLmd0sYcFgwUzssX568q584UEmm/4ecMmpQ=; b=aREGllviB0Yla5/rAzYsFVWXJZJMnlqpe7H7MF0abBXz1ZgWk0ianJ95OchVGm/6jR VIpTfhOAwEVFNPPSxp4QaeqIkWBLndARbkW9a2eNy5HieXSxKeXaRl9LBQnsMKiDe7tP 2z8mSHDEgjrZlwITCKx5RgqkrdFcJGVF3DeyHvRSgfWNUIpX7PR5faEAV+YttH7liobo xD4dPrsn+ozaV6hvljYvf1C/91Bki0n/LAPlWMlziNUdSttpglAQcdyIs9WcmDzg5+GY fE1b8+LHVcyYqv0UugLL6UPjIE57PW1QvmBLEWmr+Edc0XgMqrEK0YDUwDpbdgngaK8d q/1w== MIME-Version: 1.0 Received: by 10.152.148.8 with SMTP id to8mr15049899lab.2.1352614972951; Sat, 10 Nov 2012 22:22:52 -0800 (PST) Received: by 10.112.100.230 with HTTP; Sat, 10 Nov 2012 22:22:52 -0800 (PST) In-Reply-To: <20121111061517.H1208@besplex.bde.org> References: <201211100208.qAA28e0v004842@svn.freebsd.org> <509DC25E.5030306@mu.org> <509E3162.5020702@FreeBSD.org> <509E7E7C.9000104@mu.org> <509E830D.5080006@mu.org> <1352568275.17290.85.camel@revolution.hippie.lan> <20121111061517.H1208@besplex.bde.org> Date: Sat, 10 Nov 2012 22:22:52 -0800 Message-ID: Subject: Re: svn commit: r242847 - in head/sys: i386/include kern From: Peter Wemm To: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQnWZD8V0efgu095NfyBmRK662xgexCahUeFJHlvvEGU/TDX2QeDRvy734aRDYtQO71Ql2of X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 06:22:55 -0000 On Sat, Nov 10, 2012 at 11:32 AM, Bruce Evans wrote: > On Sat, 10 Nov 2012, Peter Wemm wrote: > >> On Sat, Nov 10, 2012 at 9:24 AM, Ian Lepore >> wrote: >>> >>> On Sat, 2012-11-10 at 08:38 -0800, Alfred Perlstein wrote: >>>> >>>> It probably could be added, but then a bunch of other people would >>>> complain about the comment being too wordy or "not in English". >>> >>> >>> The fact that such a thing could happen explains much about the current >>> state of the code. An outsider could easily come to the conclusion that >>> the FreeBSD motto is something along the lines of "It should be as hard >>> to read as it was to write." >> >> >> Don't forget to explain that you get 1 maxusers per 2MB of physical >> memory which turns into 64 x 2k clusters and a whole series of side >> effects. >> >> Wouldn't it be nice if we could write "By default, mbuf clusters are >> capped at 6% of physical ram or 6% of kernel address space, whichever >> is smaller" ? >> >> That's a little easier than trying to explain >> maxusers = physpages / (2 * 1024 * 1024 / PAGE_SIZE) >> if (maxusers > 384) >> maxusers = 384 + ((maxusers - 384) / 8); >> nmbclusters = 1024 + maxusers * 64; >> >> I'd sure prefer to explain: >> >> /* pick smaller of kva pages or physical pages */ >> if ((physpages / 16) < (kvapages / 16)) >> nmbclusters = physpages / 16; >> else >> nmbclusters = kvapages / 16; >> >> Leave maxusers for calculating maxproc. > > > I prefer to write clear code and not echo it in comments: > > nmbclusters = min(physpages, kvapages) / 16; > > The most interesting point (the reason why 6% was chosen) is not > documented by either. The divide by 16 was based on observation of existing behavior, notwithstanding my confusion over the point that the slope change kicks in. nmbclusters = 1024 + maxusers * 64; Aside from the elevated starting point, that is 64 x 2K clusters per maxuser bogo-unit. Before the slope change, 2MB ram gives 1 maxuser bogo-unit, which gives 128K of clusters. 2M / 128K = 16, or 6.25%. After the slope change, 16MB ram gives 1 maxuser bogo-unit. 16M / 128k = 128.. or 0.78%. ie: current autoconfiguration is roughly 6% of ram below 768MB, and less than 1% of ram above 768MB. Given that the allocator has changed significantly over the last few years and is a cap now, not a fixed reservation, we should be setting these limits to a comfortable safe limit. Back when it was a fixed reservation we had far more in the way of constraints. Telling people "increase maxusers 10x" is silly. "maxusers" sets two things directly. maxproc and nmbclusers. maxproc = maxusers * 16. Having people increase maxproc as a side effect of trying to increase network buffers is not helpful. Having people do post-defaults tuning in understandable units is much more likely to give predictable results. Which is easier? Q: "How do I get an extra 2MB of clusters?" A1: "increase kern.ipc.nmbclusters by 1000" A2: "well, 2MB is 1000 clusters, and since you have mode than 768M of ram, you divide that 1000 clusters by 16 to get 62, then multiply that by 8 to reverse the maxusers slope factor above 768M, so you need to find the maxusers value you have and add 496 to it. That will probably increase your clusters by 2MB. Maybe." We've had kern.ipc.nmbclusters for years. It is simple to understand, easy to predict the outcome of a change, is runtime adjustable, is a *cap* and not a reservation (like it used to be) and does not require a reboot like maxusers tweaking would, and doesn't change maxproc as a side effect. Tune the caps sensibly by default and move on. maxusers must die. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV "All of this is for nothing if we don't go to the stars" - JMS/B5 "If Java had true garbage collection, most programs would delete themselves upon execution." -- Robert Sewell From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 07:33:52 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 826E58F7; Sun, 11 Nov 2012 07:33:52 +0000 (UTC) Date: Sun, 11 Nov 2012 07:33:52 +0000 From: Alexey Dokuchaev To: Peter Wemm Subject: Re: svn commit: r242847 - in head/sys: i386/include kern Message-ID: <20121111073352.GA96046@FreeBSD.org> References: <509DC25E.5030306@mu.org> <509E3162.5020702@FreeBSD.org> <509E7E7C.9000104@mu.org> <509E830D.5080006@mu.org> <1352568275.17290.85.camel@revolution.hippie.lan> <20121111061517.H1208@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 07:33:52 -0000 On Sat, Nov 10, 2012 at 10:22:52PM -0800, Peter Wemm wrote: > We've had kern.ipc.nmbclusters for years. It is simple to understand, > easy to predict the outcome of a change, is runtime adjustable, is a > *cap* and not a reservation (like it used to be) and does not require > a reboot like maxusers tweaking would, and doesn't change maxproc as a > side effect. > > Tune the caps sensibly by default and move on. maxusers must die. Big +1. I would also like to get rid of maxusers altogether. ./danfe From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 08:16:34 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5E6EEE76; Sun, 11 Nov 2012 08:16:34 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4159F8FC12; Sun, 11 Nov 2012 08:16:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAB8GYMB037034; Sun, 11 Nov 2012 08:16:34 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAB8GYD2037032; Sun, 11 Nov 2012 08:16:34 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201211110816.qAB8GYD2037032@svn.freebsd.org> From: Rui Paulo Date: Sun, 11 Nov 2012 08:16:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242887 - head/usr.bin/top X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 08:16:34 -0000 Author: rpaulo Date: Sun Nov 11 08:16:33 2012 New Revision: 242887 URL: http://svnweb.freebsd.org/changeset/base/242887 Log: Add the PID column to the list of sort keys. Modified: head/usr.bin/top/machine.c Modified: head/usr.bin/top/machine.c ============================================================================== --- head/usr.bin/top/machine.c Sun Nov 11 06:29:59 2012 (r242886) +++ head/usr.bin/top/machine.c Sun Nov 11 08:16:33 2012 (r242887) @@ -225,7 +225,7 @@ long percentages(); char *ordernames[] = { "cpu", "size", "res", "time", "pri", "threads", "total", "read", "write", "fault", "vcsw", "ivcsw", - "jid", NULL + "jid", "pid", NULL }; #endif From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 08:22:58 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9232A91; Sun, 11 Nov 2012 08:22:58 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 77C208FC0A; Sun, 11 Nov 2012 08:22:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAB8MwQm038351; Sun, 11 Nov 2012 08:22:58 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAB8Mwh0038350; Sun, 11 Nov 2012 08:22:58 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201211110822.qAB8Mwh0038350@svn.freebsd.org> From: Rui Paulo Date: Sun, 11 Nov 2012 08:22:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242888 - head/contrib/top X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 08:22:58 -0000 Author: rpaulo Date: Sun Nov 11 08:22:58 2012 New Revision: 242888 URL: http://svnweb.freebsd.org/changeset/base/242888 Log: Add "pid" to the help menu (sort keys section). Modified: head/contrib/top/commands.c Modified: head/contrib/top/commands.c ============================================================================== --- head/contrib/top/commands.c Sun Nov 11 08:16:33 2012 (r242887) +++ head/contrib/top/commands.c Sun Nov 11 08:22:58 2012 (r242888) @@ -80,11 +80,11 @@ n or # - change number of processes to #ifdef ORDER if (displaymode == DISP_CPU) fputs("\ -o - specify sort order (pri, size, res, cpu, time, threads, jid)\n", +o - specify sort order (pri, size, res, cpu, time, threads, jid, pid)\n", stdout); else fputs("\ -o - specify sort order (vcsw, ivcsw, read, write, fault, total, jid)\n", +o - specify sort order (vcsw, ivcsw, read, write, fault, total, jid, pid)\n", stdout); #endif fputs("\ From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 09:41:12 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 401E17C3; Sun, 11 Nov 2012 09:41:12 +0000 (UTC) (envelope-from bright@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 198658FC0C; Sun, 11 Nov 2012 09:41:11 +0000 (UTC) Received: from Alfreds-MacBook-Pro-5.local (c-67-180-208-218.hsd1.ca.comcast.net [67.180.208.218]) by elvis.mu.org (Postfix) with ESMTPSA id 3FE631A3C1E; Sun, 11 Nov 2012 01:41:05 -0800 (PST) Message-ID: <509F72B0.90201@mu.org> Date: Sun, 11 Nov 2012 01:41:04 -0800 From: Alfred Perlstein User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 MIME-Version: 1.0 To: Alexey Dokuchaev Subject: Re: svn commit: r242847 - in head/sys: i386/include kern References: <509DC25E.5030306@mu.org> <509E3162.5020702@FreeBSD.org> <509E7E7C.9000104@mu.org> <509E830D.5080006@mu.org> <1352568275.17290.85.camel@revolution.hippie.lan> <20121111061517.H1208@besplex.bde.org> <20121111073352.GA96046@FreeBSD.org> In-Reply-To: <20121111073352.GA96046@FreeBSD.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Peter Wemm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 09:41:12 -0000 On 11/10/12 11:33 PM, Alexey Dokuchaev wrote: > On Sat, Nov 10, 2012 at 10:22:52PM -0800, Peter Wemm wrote: >> We've had kern.ipc.nmbclusters for years. It is simple to understand, >> easy to predict the outcome of a change, is runtime adjustable, is a >> *cap* and not a reservation (like it used to be) and does not require >> a reboot like maxusers tweaking would, and doesn't change maxproc as a >> side effect. >> >> Tune the caps sensibly by default and move on. maxusers must die. > Big +1. I would also like to get rid of maxusers altogether. > > ./danfe You aren't really understanding it. The contrived examples Peter are giving are *wrong*. > Q: "How do I get an extra 2MB of clusters?" > A1: "increase kern.ipc.nmbclusters by 1000" > A2: "well, 2MB is 1000 clusters, and since you have mode than 768M of > ram, you divide that 1000 clusters by 16 to get 62, then multiply that > by 8 to reverse the maxusers slope factor above 768M, so you need to > find the maxusers value you have and add 496 to it. That will > probably increase your clusters by 2MB. Maybe." I am 100% aware that nmbclusters can override maxusers values, in fact it does. The real conversation goes like this: user: "Why is my box seeing terrible network performance?" bsdguy: "Increase nmbclusters." user: "what is that?" bsdguy: "Oh those are the mbufs, just tell me your current value." user: "oh it's like 128000" bsdguy: "hmm try doubling that, go sysctl kern.ipc.nmbclusters=512000 on the command line." user: "ok" .... an hour passes ... user: "hmm now I can't fork any more copies of apache.." bsdguy: "oh, ok, you need to increase maxproc for that." user: "so sysctl kern.ipc.maxproc=10000?" bsdguy: "no... one second..." .... bsdguy: "ok, so that's sysctl kern.maxproc=10000" user: "ok... bbiaf" .... user: "so now i'm getting log messages about can't open sockets..." bsdguy: "oh you need to increase sockets bro... one second..." user: "sysctl kern.maxsockets?" bsdguy: "oh no.. it's actually back to kern.ipc.maxsockets" user: "alrighty then.." .... .... bsdguy: "so how is freebsd since I helped you tune it?" user: "well i kept hitting other resource limits, boss made me switch to Linux, it works out of the box and doesn't require an expert tuner to run a large scale server. Y'know as a last ditch effort I looked around for this 'maxusers' thing but it seems like some eggheads retired it and instead of putting my job at risk, I just went with Linux, no one gets fired for using Linux." bsdguy: "managers are lame!" user: "yeah! managers..." -Alfred From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 10:09:44 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7198CD0C for ; Sun, 11 Nov 2012 10:09:44 +0000 (UTC) (envelope-from peter@wemm.org) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id D58CE8FC0C for ; Sun, 11 Nov 2012 10:09:43 +0000 (UTC) Received: by mail-lb0-f182.google.com with SMTP id gg13so371476lbb.13 for ; Sun, 11 Nov 2012 02:09:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=b52Xg+7pLkc9ECsBIwNQmR/zNcXqgbh+I3SXYgupD2I=; b=wmSdeeQEpqHomOS5QPabwzy/CUElf7aA7OJvVWSCYwrpBaf27oibL6wqeTNfdms+mH IPGoRsl1dQh18W5P0+CF6oznSk6mgUJ524XxN57CACeNbI4CN4Ta3G5eJnFsn4ajMQWg ADkummmI7mZ86mwQfxRhQiD8R/kPRum2eEkQA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=b52Xg+7pLkc9ECsBIwNQmR/zNcXqgbh+I3SXYgupD2I=; b=aPGWH+1n0xuVKbCextD09ZFDXW3lPIB0RMbgslIHhP68Hj1TRKLgTQ1IM10D8XTVP4 mO5VncstBKXf62K1pebvbrDvT5y3plXqMNfwn1rw6l8p/JEQc+9y9wEvaFdvBHWwSWKY UyPfzeJ8fBvcozabAq6mLT+vQzGWW3UDQxGFMHL+N3yDIHvGaCRtlEAuoGgxnGy49/pB 3bsG/TEslWH/Y9a7hNu9xF9fzLO6KxLfQ7SdbkrYtdxDxdd0v9iLB7wT6noquYGAscu+ vBXFry8sPt4g7cZS1XctYKPzkYy971ibRGyPyKm95uHkeRjxszKJva86er+cgjnWcRfG IuZA== MIME-Version: 1.0 Received: by 10.152.106.79 with SMTP id gs15mr15293865lab.31.1352628582723; Sun, 11 Nov 2012 02:09:42 -0800 (PST) Received: by 10.112.7.41 with HTTP; Sun, 11 Nov 2012 02:09:42 -0800 (PST) In-Reply-To: <509F72B0.90201@mu.org> References: <509DC25E.5030306@mu.org> <509E3162.5020702@FreeBSD.org> <509E7E7C.9000104@mu.org> <509E830D.5080006@mu.org> <1352568275.17290.85.camel@revolution.hippie.lan> <20121111061517.H1208@besplex.bde.org> <20121111073352.GA96046@FreeBSD.org> <509F72B0.90201@mu.org> Date: Sun, 11 Nov 2012 02:09:42 -0800 Message-ID: Subject: Re: svn commit: r242847 - in head/sys: i386/include kern From: Peter Wemm To: Alfred Perlstein Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQkAOQpdxOhKzLu6b/SLTCTnXzXVmej2qcuqflvTTsso2o8Il24gpD65fUGrNWvla8yGJW8O Cc: svn-src-head@freebsd.org, Alexey Dokuchaev , src-committers@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 10:09:44 -0000 On Sun, Nov 11, 2012 at 1:41 AM, Alfred Perlstein wrote: > On 11/10/12 11:33 PM, Alexey Dokuchaev wrote: >> >> On Sat, Nov 10, 2012 at 10:22:52PM -0800, Peter Wemm wrote: >>> >>> We've had kern.ipc.nmbclusters for years. It is simple to understand, >>> easy to predict the outcome of a change, is runtime adjustable, is a >>> *cap* and not a reservation (like it used to be) and does not require >>> a reboot like maxusers tweaking would, and doesn't change maxproc as a >>> side effect. >>> >>> Tune the caps sensibly by default and move on. maxusers must die. >> >> Big +1. I would also like to get rid of maxusers altogether. >> >> ./danfe > > You aren't really understanding it. > > The contrived examples Peter are giving are *wrong*. What are the correct numbers then? -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV "All of this is for nothing if we don't go to the stars" - JMS/B5 "If Java had true garbage collection, most programs would delete themselves upon execution." -- Robert Sewell From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 10:42:34 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B8DB840C; Sun, 11 Nov 2012 10:42:34 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9DBF88FC08; Sun, 11 Nov 2012 10:42:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qABAgYfi066340; Sun, 11 Nov 2012 10:42:34 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qABAgYk4066339; Sun, 11 Nov 2012 10:42:34 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <201211111042.qABAgYk4066339@svn.freebsd.org> From: Roman Divacky Date: Sun, 11 Nov 2012 10:42:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242889 - head/sys/dev/xen/netback X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 10:42:34 -0000 Author: rdivacky Date: Sun Nov 11 10:42:34 2012 New Revision: 242889 URL: http://svnweb.freebsd.org/changeset/base/242889 Log: Change the XNB_ASSERT from a statement expression to do-while(0) as its result is never used. Modified: head/sys/dev/xen/netback/netback_unit_tests.c Modified: head/sys/dev/xen/netback/netback_unit_tests.c ============================================================================== --- head/sys/dev/xen/netback/netback_unit_tests.c Sun Nov 11 08:22:58 2012 (r242888) +++ head/sys/dev/xen/netback/netback_unit_tests.c Sun Nov 11 10:42:34 2012 (r242889) @@ -62,7 +62,7 @@ __FBSDID("$FreeBSD$"); * iff the assertion failed. Note the implied parameters buffer and * buflen */ -#define XNB_ASSERT(cond) ({ \ +#define XNB_ASSERT(cond) do ( \ int passed = (cond); \ char *_buffer = (buffer); \ size_t _buflen = (buflen); \ @@ -71,7 +71,7 @@ __FBSDID("$FreeBSD$"); strlcat(_buffer, ":" TOSTRING(__LINE__) \ " Assertion Error: " #cond "\n", _buflen); \ } \ - ! passed; }) + } while (0) /** From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 10:45:22 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 460C8620; Sun, 11 Nov 2012 10:45:22 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 287868FC12; Sun, 11 Nov 2012 10:45:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qABAjMgw066957; Sun, 11 Nov 2012 10:45:22 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qABAjMZn066956; Sun, 11 Nov 2012 10:45:22 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <201211111045.qABAjMZn066956@svn.freebsd.org> From: Roman Divacky Date: Sun, 11 Nov 2012 10:45:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242890 - head/sys/dev/xen/netback X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 10:45:22 -0000 Author: rdivacky Date: Sun Nov 11 10:45:21 2012 New Revision: 242890 URL: http://svnweb.freebsd.org/changeset/base/242890 Log: Fix a typo. Modified: head/sys/dev/xen/netback/netback_unit_tests.c Modified: head/sys/dev/xen/netback/netback_unit_tests.c ============================================================================== --- head/sys/dev/xen/netback/netback_unit_tests.c Sun Nov 11 10:42:34 2012 (r242889) +++ head/sys/dev/xen/netback/netback_unit_tests.c Sun Nov 11 10:45:21 2012 (r242890) @@ -62,7 +62,7 @@ __FBSDID("$FreeBSD$"); * iff the assertion failed. Note the implied parameters buffer and * buflen */ -#define XNB_ASSERT(cond) do ( \ +#define XNB_ASSERT(cond) do { \ int passed = (cond); \ char *_buffer = (buffer); \ size_t _buflen = (buflen); \ From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 10:53:35 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A1FBB7EF for ; Sun, 11 Nov 2012 10:53:35 +0000 (UTC) (envelope-from peter@wemm.org) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 0C4578FC12 for ; Sun, 11 Nov 2012 10:53:34 +0000 (UTC) Received: by mail-lb0-f182.google.com with SMTP id gg13so385679lbb.13 for ; Sun, 11 Nov 2012 02:53:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Hx8awx8rkQh9kRHYXo0aHqdgTdemN+nZTgWfzIWkWB0=; b=gRgMm1j5WkZc86uqjqfPxbb9YAGTb/Rqtsv+frFl9npa7Bi431zxK1Agxdvp8/AVK3 0+U8/BQTQj0QAl0g8YxU0Aj0D32xQ3AuWAxz1hH/SFaTm90GDHC7twhAfhUgrXpKK97x UApg95ogvYt4Iws4Yyl13Do0PjJzigty8FQvc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=Hx8awx8rkQh9kRHYXo0aHqdgTdemN+nZTgWfzIWkWB0=; b=jsRDvhKioVoPGGqbwWX+lgzopXUltrarnnGS3w2vArFgh4tCj04/Xcwk90hNXLK2dp lMadFaLi+XIyukG66olw44QW7TdSUZ5bMN0JP9O7isaMkckwLcVx0IqehBkbrVX2M5DR O9FXZr2jEBRWi/lcPcQrlFksCIoxHwCvxwqUmymdJXMio7c67AMG96s5FAS8t4sAkdKA 8baeAhuRooVVhhgKS+dFeQJOE9xu4SlOn/jiEt6yzkkHJJPdgMCNBcIf3w58IkY0IfUV uufTrcZrFd0cLQLIcVmmf131iABfmtebjUdViOyo6TwkVEEHmwXO6PmELnnwYHIEcfdx ahew== MIME-Version: 1.0 Received: by 10.152.108.37 with SMTP id hh5mr15332512lab.52.1352631213508; Sun, 11 Nov 2012 02:53:33 -0800 (PST) Received: by 10.112.7.41 with HTTP; Sun, 11 Nov 2012 02:53:33 -0800 (PST) In-Reply-To: <509F72B0.90201@mu.org> References: <509DC25E.5030306@mu.org> <509E3162.5020702@FreeBSD.org> <509E7E7C.9000104@mu.org> <509E830D.5080006@mu.org> <1352568275.17290.85.camel@revolution.hippie.lan> <20121111061517.H1208@besplex.bde.org> <20121111073352.GA96046@FreeBSD.org> <509F72B0.90201@mu.org> Date: Sun, 11 Nov 2012 02:53:33 -0800 Message-ID: Subject: Re: svn commit: r242847 - in head/sys: i386/include kern From: Peter Wemm To: Alfred Perlstein Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQkh4R6jlwjV1TE4eSBNWcPspOsIX4nn5H6FOieaUjSSa4oQ+MIfPAPp0jmflBlH3yy5UdhZ Cc: svn-src-head@freebsd.org, Alexey Dokuchaev , src-committers@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 10:53:35 -0000 On Sun, Nov 11, 2012 at 1:41 AM, Albert Perlstein wrote: > The real conversation goes like this: > > user: "Why is my box seeing terrible network performance?" > bsdguy: "Increase nmbclusters." > user: "what is that?" > bsdguy: "Oh those are the mbufs, just tell me your current value." > user: "oh it's like 128000" > bsdguy: "hmm try doubling that, go sysctl kern.ipc.nmbclusters=512000 on the > command line." > user: "ok" > .... an hour passes ... > user: "hmm now I can't fork any more copies of apache.." > bsdguy: "oh, ok, you need to increase maxproc for that." > user: "so sysctl kern.ipc.maxproc=10000?" > bsdguy: "no... one second..." > .... > bsdguy: "ok, so that's sysctl kern.maxproc=10000" > user: "ok... bbiaf" > .... > user: "so now i'm getting log messages about can't open sockets..." > bsdguy: "oh you need to increase sockets bro... one second..." > user: "sysctl kern.maxsockets?" > bsdguy: "oh no.. it's actually back to kern.ipc.maxsockets" > user: "alrighty then.." > .... > .... > bsdguy: "so how is freebsd since I helped you tune it?" > user: "well i kept hitting other resource limits, boss made me switch to > Linux, it works out of the box and doesn't require an expert tuner to run a > large scale server. Y'know as a last ditch effort I looked around for this > 'maxusers' thing but it seems like some eggheads retired it and instead of > putting my job at risk, I just went with Linux, no one gets fired for using > Linux." > bsdguy: "managers are lame!" > user: "yeah! managers..." > > -Alfred Now Albert.. I know that deliberately playing dumb is fun, but there is no network difference between doubling "kern.maxusers" in loader.conf (the only place it can be set, it isn't runtime tuneable) and doubling "kern.ipc.nmbclusters" in the same place. We've always allowed people to fine-tune derived settings at runtime where it is possible. My position still is that instead of trying to dick around with maxusers curve slopes to try and somehow get the scaling right, we should instead be setting sensibly right from the start, by default. The current scaling was written when we had severe kva constraints, did reservations, etc. Now they're a cap on dynamic allocators on most platforms. "Sensible" defaults would be *way* higher than the current maxusers derived scaling curves. My quick survey: 8G ram -> 65088 clusters -> clusters capped at 6.2% of physical ram (running head) 3.5G ram -> 25600 clusters -> clusters capped at 5.0% of physical ram (running an old head) 32G ram -> 25600 clusters -> clusters capped at 1.5% of physical ram (running 9.1-stable) 72G ram -> 25600 clusters -> clusters capped at 0.06% of physical ram (9.1-stable again) As I've been saying from the beginning.. As these are limits on dynamic allocators, not reservations, they should be as high as we can comfortably set them without risking running out of other resources. As the code stands now.. the derived limits for 4k, 9k and 16k jumbo clusters is approximately the same space as 2K clusters. (ie: 1 x 4k cluster per 2 x 2k clusters, 1 x 16k cluster per 8 2k clusters, and so on). If we set a constant 6% for nmbclusters (since that's roughly where we're at now for smaller machines after albert's changes), then the worse case scenarios for 4k, 9k and 16k clusters are 6% each. ie: 24% of wired, physical ram. Plus all the other values derived from the nmbclusters tunable at boot. I started writing this with the intention of suggesting 10% but that might be a bit high given that: kern_mbuf.c: nmbjumbop = nmbclusters / 2; kern_mbuf.c: nmbjumbo9 = nmbclusters / 4; kern_mbuf.c: nmbjumbo16 = nmbclusters / 8; .. basically quadruples the worst case limits. Out of the box, 6% is infinitely better than we 0.06% we currently get on a 9-stable machine with 72G ram. But I object to dicking around with "maxusers" to derive network buffer space default limits. If we settle on something like 6%, then it should be 6%. That's easy to document and explain the meaning of the tunable. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV "All of this is for nothing if we don't go to the stars" - JMS/B5 "If Java had true garbage collection, most programs would delete themselves upon execution." -- Robert Sewell From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 11:54:00 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8B670222; Sun, 11 Nov 2012 11:54:00 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail04.syd.optusnet.com.au (mail04.syd.optusnet.com.au [211.29.132.185]) by mx1.freebsd.org (Postfix) with ESMTP id 1DC498FC08; Sun, 11 Nov 2012 11:53:59 +0000 (UTC) Received: from c122-106-175-26.carlnfd1.nsw.optusnet.com.au (c122-106-175-26.carlnfd1.nsw.optusnet.com.au [122.106.175.26]) by mail04.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id qABBrmQC012948 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 11 Nov 2012 22:53:50 +1100 Date: Sun, 11 Nov 2012 22:53:48 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Nathan Whitehorn Subject: Re: svn commit: r242835 - head/contrib/llvm/lib/Target/X86 In-Reply-To: <509F2AA6.9050509@freebsd.org> Message-ID: <20121111214908.P938@besplex.bde.org> References: <201211091856.qA9IuRxX035169@svn.freebsd.org> <509F2AA6.9050509@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-Cloudmark-Score: 0 X-Optus-Cloudmark-Analysis: v=2.0 cv=XbrRV/F5 c=1 sm=1 a=B4V2Pwk6IZ0A:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=Bex9lGB9SJoA:10 a=cu9qFN3gEOE4zR8DDUUA:9 a=CjuIK1q_8ugA:10 a=bxQHXO5Py4tHmhUgaywp5w==:117 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 11:54:00 -0000 On Sat, 10 Nov 2012, Nathan Whitehorn wrote: > On 11/09/12 12:56, Dimitry Andric wrote: >> Log: >> Reduce LLVM's default stack alignment for i386 from 16 to 4 bytes, as >> the FreeBSD ABI requires. This is essentially a revert of upstream llvm >> commit r126226, and it will be reverted by upstream too. >> MFC after: 1 week >> >> Modified: >> head/contrib/llvm/lib/Target/X86/X86Subtarget.cpp >> >> Modified: head/contrib/llvm/lib/Target/X86/X86Subtarget.cpp >> ============================================================================== >> --- head/contrib/llvm/lib/Target/X86/X86Subtarget.cpp Fri Nov 9 18:23:38 >> 2012 (r242834) >> +++ head/contrib/llvm/lib/Target/X86/X86Subtarget.cpp Fri Nov 9 18:56:27 >> 2012 (r242835) >> @@ -416,12 +416,12 @@ X86Subtarget::X86Subtarget(const std::st >> assert((!In64BitMode || HasX86_64) && >> "64-bit code requested on a subtarget that doesn't support >> it!"); >> - // Stack alignment is 16 bytes on Darwin, FreeBSD, Linux and Solaris >> (both >> - // 32 and 64 bit) and for all 64-bit targets. >> + // Stack alignment is 16 bytes on Darwin, Linux and Solaris (both 32 and >> 64 >> + // bit) and for all 64-bit targets. >> if (StackAlignOverride) >> stackAlignment = StackAlignOverride; >> - else if (isTargetDarwin() || isTargetFreeBSD() || isTargetLinux() || >> - isTargetSolaris() || In64BitMode) >> + else if (isTargetDarwin() || isTargetLinux() || isTargetSolaris() || >> + In64BitMode) >> stackAlignment = 16; >> } >> > > I'd like to object to this. We have an identical ABI to Linux (and Solaris, > as far as I know). Splitting this by platform will only propagate the stack > alignment breakage further -- what we need is LLVM/our C library to handle > different alignments. Please fix this for real instead of balkanizing the ABI > support in LLVM and introducing different ABIs for LLVM and GCC to FreeBSD. I'm not sure if either of us knows exactly what this does, but I like this change. clang does stack alignment correctly, so it doesn't need the gcc pessimization of aligning in the caller. clang aligns in the callee if necessary (except if is lied to about the ABI, then it doesn't know what is necessaary). It is rarely necessary, since most variables are 32 bits or smaller. (Necessary includes when an alignment attribute says so and for optimal alignment of long longs and doubles. The i386 ABI doesn't require alignment for the latter, but optimization doesn't, and when the variables aren't in structs the ABI doesn't prevent them being aligned for optimization.) Always aligning in the caller wastes an average of not quite 8 bytes of stack and cache space per function call, plus sometimes an extra instruction or 2 to do the unnecessary alignment. gcc's alignment in callers doesn't even work, because gcc assumes that it is enough and never does it in callees even when it is necessary: auto int32_t foo[8] __aligned[32]; gcc fails to do the necessary alignment. clang does it. auto int32_t foo[8] __aligned[16]; Both gcc and (hopefully only without the above fix) clang fail to do the necessary alignment. The ABI doesn't require the stack to be 16-byte aligned, so alignment is necessary (unless -mpreferred-stack-boundary was used to explictly modify the ABI). gcc only aligns the stack in main(), only to the alignment specified by -mpreferred-stack-boundary, and laboriously passes it down to all functions. clang doesn't do any special alignment in main(), but assumes that crtso did it. clang also doesn't support -mpreferred-stack-boundary, so it is incompatible with nonstandard ABI's like the one given by always using -mpreferred-stack-boundary=32. auto int32_t foo[8] __aligned[8]; Both gcc and (hopefully only without the above fix) clang fail to do the necessary alignment. gcc doesn't even do it if you compile this with -mpreferred-stack-boundary=2, which should tell it not to assume 16-byte alignment. Re-quoting most of the above: > as far as I know). Splitting this by platform will only propagate the stack > alignment breakage further -- what we need is LLVM/our C library to handle > different alignments. Please fix this for real instead of balkanizing the ABI > support in LLVM and introducing different ABIs for LLVM and GCC to FreeBSD. Yes, we need clang/our libraries to handle different alignments and not assume that callers do more than the ABI requires and pessimize on behalf of the libraries. Outside of libraries, the problem is small provided -mpreferred-stack-boundary works, since you can compile everything with the same -mpreferred-stack-boundary. Bruce From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 13:07:57 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5985CC02; Sun, 11 Nov 2012 13:07:57 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by mx1.freebsd.org (Postfix) with ESMTP id DD9EA8FC13; Sun, 11 Nov 2012 13:07:56 +0000 (UTC) Received: from c122-106-175-26.carlnfd1.nsw.optusnet.com.au (c122-106-175-26.carlnfd1.nsw.optusnet.com.au [122.106.175.26]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id qABD7kbA023648 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 12 Nov 2012 00:07:47 +1100 Date: Mon, 12 Nov 2012 00:07:46 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Dimitry Andric Subject: Re: svn commit: r242879 - in head/lib: libc/gen msun/src In-Reply-To: <509ED25E.3070302@FreeBSD.org> Message-ID: <20121111230817.G1155@besplex.bde.org> References: <201211102122.qAALMAnO014246@svn.freebsd.org> <20121110214345.GT73505@kib.kiev.ua> <509ED25E.3070302@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-Cloudmark-Score: 0 X-Optus-Cloudmark-Analysis: v=2.0 cv=F/YP7ddN c=1 sm=1 a=3cd0u8GmRs4A:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=4PLq0TcHr_4A:10 a=6I5d2MoRAAAA:8 a=T6VA_bUZr2SbhECIzhkA:9 a=CjuIK1q_8ugA:10 a=bxQHXO5Py4tHmhUgaywp5w==:117 Cc: Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 13:07:57 -0000 On Sat, 10 Nov 2012, Dimitry Andric wrote: > On 2012-11-10 22:43, Konstantin Belousov wrote: >> On Sat, Nov 10, 2012 at 09:22:10PM +0000, Dimitry Andric wrote: > ... >>> Author: dim >>> Date: Sat Nov 10 21:22:10 2012 >>> New Revision: 242879 >>> URL: http://svnweb.freebsd.org/changeset/base/242879 >>> >>> Log: >>> Only define isnan, isnanf, __isnan and __isnanf in libc.so, not in >>> libc.a and libc_p.a. In addition, define isnan in libm.a and libm_p.a, >>> but not in libm.so. >>> >>> This makes it possible to statically link executables using both isnan >>> and isnanf with libc and libm. > ... >> So you broke ABI for libm ? > > No, both libc.so and libm.so are the same as before. Only the .a files > are changed. > > I should probably have made the commit message more clear, sorry about > that. Hopefully "fixed" instead of "broke" (except the .so files are unchanged so they are still broken). I use the hack of ifdefing out the definition of __isnanf() in libm. isnan() is already ifdefed out there. I didn't touch the compatibility cruft weak references to isnanf() there -- libc has it too, so it is not needed any more than isnan() here. The pessimality of these functions is another problem. C99 only requires the isnan() API, and only requires it to be a macro. gcc-4.2.1 and clang (but not gcc-3.3.3 which I often test with) provide good builtins for these functions. But the FreeBSD implementation destroys use of the builtins with some help from the ABI: - if you compile isnan*(x) calls using gcc _without_ including , then everything works right -- they builtins are used and are optimal - if you compile isnan*(x) calls using gcc _without_ including , then you get annoying (and broken) warnings about implicit function declarations being invalid in C99. This is a bug in clang. These functions are reserved in C99, so some other warning for them would be correct, but things warning is wrong in several ways: - implicit function declarations are not invalid in C9 - the same warning is printed for -ffreestanding, but these functions are not reserved by C99 then. After turning off the broken warning using -Wno-implicit-function-declarations, everything works right for these function calls, but of course not for others for which you want this warning. So for clang you must include for calling these functions, and of course for other FP library features, omitting the include is even more impractical. This gives the pessimizations: - the isnan() macro translates to isnan() for doubles, __isnanf() for floats and __isnanfl() for long doubles. The null translation for doubles gives the builtin and it works as above, but the other translations give the library functions with their underscored spelling. Compilers don't understand this spelling, so they don't give the builtins. So isnan() is pessimized when applied to floats and long doubles. OTOH, if you forget that isnan() is type-generic and spell it isnanf() or isnanl(), then the float and long double cases mostly work right again: - same behaviour if is not included (and -O is used) - if is included, then it declares isnanf() but not isnanl(), since only the former is compatibility cruft and has an extern function. So isnanf() always works and the builtin is always used with -O and and the extern function is used without -O. But isnanl() causes the following problems: - -Wimplicit* warning - linkage failure without -O. Another problem is that the extern __isnanl() is broken on x86, but the builtin works. The extern functions do bit tests that are rather slow but not slow enough to be correct (they don't check for pseudo-numbers which the hardware treats as NaNs), but the builtin does a simple x != x test which is probably optimal, and works. Similarly for some other macros (they convert to spelling that compilers don't understand, and at least the classification macros are broken on psudo-numbers, but now the broken cases are mostly ones for which the builtins don't exist or is broken). Fixing the pessimizations would reduce the ABI problems. Both libc and libm should translate to the builtin if it exists and is a real builtin (not a libcall). This seems reasonable even without -O, since C99 doesn't require any functions to exist so nothing should take their addresses or try to call them as non-macros ('(isnan)(x)'). already has complications to use builtins for 1 set of interfaces only. The only problems are that it is that it is hard to tell if builtins exist and are real (there are compiler predefines for the set that uses builtins but not for most sets). With this, the library functions are never used by new compiles and are only needed by old applications. All static copies of them can be removed, but the .so ones are still needed until the ABI is changed. When will the library isnanf() have been deprecated long enough to remove in .so's too? Maybe it never needed to be preserved, since old applications will link to old libraries that have it. Bruce From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 13:28:04 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E0C19F80; Sun, 11 Nov 2012 13:28:04 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C373A8FC08; Sun, 11 Nov 2012 13:28:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qABDS4BH095125; Sun, 11 Nov 2012 13:28:04 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qABDS4TV095124; Sun, 11 Nov 2012 13:28:04 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201211111328.qABDS4TV095124@svn.freebsd.org> From: Dimitry Andric Date: Sun, 11 Nov 2012 13:28:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242894 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 13:28:05 -0000 Author: dim Date: Sun Nov 11 13:28:04 2012 New Revision: 242894 URL: http://svnweb.freebsd.org/changeset/base/242894 Log: Add an explanatory comment to lib/libc/gen/isnan.c about the fix to make static linking with libc and libm work. Requested by: jilles MFC after: 1 week X-MFC-With: 242879 Modified: head/lib/libc/gen/isnan.c Modified: head/lib/libc/gen/isnan.c ============================================================================== --- head/lib/libc/gen/isnan.c Sun Nov 11 12:21:51 2012 (r242893) +++ head/lib/libc/gen/isnan.c Sun Nov 11 13:28:04 2012 (r242894) @@ -33,6 +33,11 @@ /* * XXX These routines belong in libm, but they must remain in libc for * binary compat until we can bump libm's major version number. + * + * Note this only applies to the dynamic versions of libm and libc, so + * for the static and profiled versions we stub out the definitions. + * Otherwise you cannot link statically to libm and libc at the same + * time, when calling both functions. */ #ifdef PIC From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 13:50:02 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B9FE3607; Sun, 11 Nov 2012 13:50:02 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) by mx1.freebsd.org (Postfix) with ESMTP id 7081D8FC14; Sun, 11 Nov 2012 13:50:02 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:9d32:5200:f533:2e10] (unknown [IPv6:2001:7b8:3a7:0:9d32:5200:f533:2e10]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 467105C59; Sun, 11 Nov 2012 14:50:01 +0100 (CET) Message-ID: <509FAD08.10400@FreeBSD.org> Date: Sun, 11 Nov 2012 14:50:00 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Nathan Whitehorn Subject: Re: svn commit: r242835 - head/contrib/llvm/lib/Target/X86 References: <201211091856.qA9IuRxX035169@svn.freebsd.org> <509F2AA6.9050509@freebsd.org> In-Reply-To: <509F2AA6.9050509@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 13:50:02 -0000 On 2012-11-11 05:33, Nathan Whitehorn wrote: > On 11/09/12 12:56, Dimitry Andric wrote: >> Author: dim >> Date: Fri Nov 9 18:56:27 2012 >> New Revision: 242835 >> URL: http://svnweb.freebsd.org/changeset/base/242835 >> >> Log: >> Reduce LLVM's default stack alignment for i386 from 16 to 4 bytes, as >> the FreeBSD ABI requires. This is essentially a revert of upstream llvm >> commit r126226, and it will be reverted by upstream too. ... > I'd like to object to this. We have an identical ABI to Linux (and > Solaris, as far as I know). Apparently Linux has standardized on 16-byte stack alignment for 32-bit x86, somewhere in the past. That is, it seems they were forced to do so by the gcc maintainers. Please read: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38496 for all the details. > Splitting this by platform will only > propagate the stack alignment breakage further Apparently, that breakage seems to have existed since the beginning. I don't think it can be fixed anymore; it is probably better to migrate to x86_64 anyway, and repeat all the mistakes of the past once again. :-) > -- what we need is > LLVM/our C library to handle different alignments. It seems like we need this for all our 32-bit x86 executables and shared libraries, not only our system libraries. At least, that is what I have been told. > Please fix this for > real instead of balkanizing the ABI support in LLVM and introducing > different ABIs for LLVM and GCC to FreeBSD. The balkanization was already there, since FreeBSD's ABI for 32-bit x86 executables has always used 4 byte stack alignment. If anything, Linux is the cause of the balkanization, since they switched from 4 to 16 byte alignment somewhere along the road, and purposefully (or accidentally) lost backwards compatibility. If anything, we should probably send patches to upstream gcc to make them aware of FreeBSD's specific stack alignment, if they are using 16 byte stack alignment now. From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 14:17:05 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 40FB4DD6; Sun, 11 Nov 2012 14:17:05 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) by mx1.freebsd.org (Postfix) with ESMTP id B759C8FC12; Sun, 11 Nov 2012 14:17:04 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:9d32:5200:f533:2e10] (unknown [IPv6:2001:7b8:3a7:0:9d32:5200:f533:2e10]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id F16AE5C59; Sun, 11 Nov 2012 15:17:03 +0100 (CET) Message-ID: <509FB35F.1010801@FreeBSD.org> Date: Sun, 11 Nov 2012 15:17:03 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Bruce Evans Subject: Re: svn commit: r242835 - head/contrib/llvm/lib/Target/X86 References: <201211091856.qA9IuRxX035169@svn.freebsd.org> <509F2AA6.9050509@freebsd.org> <20121111214908.P938@besplex.bde.org> In-Reply-To: <20121111214908.P938@besplex.bde.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Nathan Whitehorn X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 14:17:05 -0000 On 2012-11-11 12:53, Bruce Evans wrote: > On Sat, 10 Nov 2012, Nathan Whitehorn wrote: >> On 11/09/12 12:56, Dimitry Andric wrote: >>> Log: >>> Reduce LLVM's default stack alignment for i386 from 16 to 4 bytes, as >>> the FreeBSD ABI requires. This is essentially a revert of upstream llvm >>> commit r126226, and it will be reverted by upstream too. >>> MFC after: 1 week ... >> I'd like to object to this. We have an identical ABI to Linux (and Solaris, >> as far as I know). Splitting this by platform will only propagate the stack >> alignment breakage further -- what we need is LLVM/our C library to handle >> different alignments. Please fix this for real instead of balkanizing the ABI >> support in LLVM and introducing different ABIs for LLVM and GCC to FreeBSD. > > I'm not sure if either of us knows exactly what this does, but I like > this change. clang does stack alignment correctly, so it doesn't need > the gcc pessimization of aligning in the caller. clang aligns in the > callee if necessary (except if is lied to about the ABI, then it doesn't > know what is necessaary). It is rarely necessary, since most variables > are 32 bits or smaller. (Necessary includes when an alignment attribute > says so and for optimal alignment of long longs and doubles. The i386 > ABI doesn't require alignment for the latter, but optimization doesn't, > and when the variables aren't in structs the ABI doesn't prevent them > being aligned for optimization.) Always aligning in the caller wastes > an average of not quite 8 bytes of stack and cache space per function > call, plus sometimes an extra instruction or 2 to do the unnecessary > alignment. gcc's alignment in callers doesn't even work, because gcc > assumes that it is enough and never does it in callees even when it > is necessary: > > auto int32_t foo[8] __aligned[32]; > > gcc fails to do the necessary alignment. clang does it. > > auto int32_t foo[8] __aligned[16]; > > Both gcc and (hopefully only without the above fix) clang fail to do the > necessary alignment. It works just fine now with clang. For the first example, I get: pushl %ebp movl %esp, %ebp andl $-32, %esp as prolog, and for the second: pushl %ebp movl %esp, %ebp andl $-16, %esp > The ABI doesn't require the stack to be 16-byte > aligned, so alignment is necessary (unless -mpreferred-stack-boundary was > used to explictly modify the ABI). gcc only aligns the stack in main(), > only to the alignment specified by -mpreferred-stack-boundary, and > laboriously passes it down to all functions. clang doesn't do any > special alignment in main(), but assumes that crtso did it. clang also > doesn't support -mpreferred-stack-boundary, so it is incompatible with > nonstandard ABI's like the one given by always using > -mpreferred-stack-boundary=32. Apparently upstream never saw the need for this option. I strongly doubt it is used very often outside FreeBSD... ... >> as far as I know). Splitting this by platform will only propagate the stack >> alignment breakage further -- what we need is LLVM/our C library to handle >> different alignments. Please fix this for real instead of balkanizing the ABI >> support in LLVM and introducing different ABIs for LLVM and GCC to FreeBSD. > > Yes, we need clang/our libraries to handle different alignments and > not assume that callers do more than the ABI requires and pessimize > on behalf of the libraries. Outside of libraries, the problem is small > provided -mpreferred-stack-boundary works, since you can compile > everything with the same -mpreferred-stack-boundary. As far as I can see, with the 4 byte stack alignment that has been the default, and is now also clang's default, our libraries should handle any "incoming" stack alignment of >= 4 bytes. I don't think anybody uses lower stack alignment, except maybe for the special case of boot loaders, or extremely size-optimized code. From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 15:01:52 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 19BB775B; Sun, 11 Nov 2012 15:01:52 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail04.syd.optusnet.com.au (mail04.syd.optusnet.com.au [211.29.132.185]) by mx1.freebsd.org (Postfix) with ESMTP id 9A52F8FC08; Sun, 11 Nov 2012 15:01:51 +0000 (UTC) Received: from c122-106-175-26.carlnfd1.nsw.optusnet.com.au (c122-106-175-26.carlnfd1.nsw.optusnet.com.au [122.106.175.26]) by mail04.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id qABF1lfe024758 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 12 Nov 2012 02:01:49 +1100 Date: Mon, 12 Nov 2012 02:01:47 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Dimitry Andric Subject: Re: svn commit: r242835 - head/contrib/llvm/lib/Target/X86 In-Reply-To: <509FB35F.1010801@FreeBSD.org> Message-ID: <20121112014417.O1675@besplex.bde.org> References: <201211091856.qA9IuRxX035169@svn.freebsd.org> <509F2AA6.9050509@freebsd.org> <20121111214908.P938@besplex.bde.org> <509FB35F.1010801@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-Cloudmark-Score: 0 X-Optus-Cloudmark-Analysis: v=2.0 cv=JdTkNj2V c=1 sm=1 a=B4V2Pwk6IZ0A:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=Bex9lGB9SJoA:10 a=e1J0XFQeW5S4DCYVn3QA:9 a=CjuIK1q_8ugA:10 a=bxQHXO5Py4tHmhUgaywp5w==:117 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Nathan Whitehorn , Bruce Evans X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 15:01:52 -0000 On Sun, 11 Nov 2012, Dimitry Andric wrote: > On 2012-11-11 12:53, Bruce Evans wrote: >> >> I'm not sure if either of us knows exactly what this does, but I like >> this change. clang does stack alignment correctly, so it doesn't need >> the gcc pessimization of aligning in the caller. clang aligns in the Apparently we did know. >> ... >> alignment. gcc's alignment in callers doesn't even work, because gcc >> assumes that it is enough and never does it in callees even when it >> is necessary: >> >> auto int32_t foo[8] __aligned[32]; >> >> gcc fails to do the necessary alignment. clang does it. >> >> auto int32_t foo[8] __aligned[16]; >> >> Both gcc and (hopefully only without the above fix) clang fail to do the >> necessary alignment. > > It works just fine now with clang. For the first example, I get: > > pushl %ebp > movl %esp, %ebp > andl $-32, %esp > > as prolog, and for the second: > > pushl %ebp > movl %esp, %ebp > andl $-16, %esp Good. The andl executes very fast. Perhaps not as fast as subl on %esp, because subl is normal so more likely to be optimized (they nominally have the same speeds, but %esp is magic). Unfortunately, it seems to be impossible to both align the stack and reserve some space on it in 1 instruction -- the andl might not reserve any. >> special alignment in main(), but assumes that crtso did it. clang also >> doesn't support -mpreferred-stack-boundary, so it is incompatible with >> nonstandard ABI's like the one given by always using >> -mpreferred-stack-boundary=32. > > Apparently upstream never saw the need for this option. I strongly > doubt it is used very often outside FreeBSD... It is most useful for working around gcc's behaviour. Hmm, the kernel and boot blocks uses -mpreferred-stack-boundary=2 on i386 to save space. This must have been turned off for clang, so the versions that did 16-bit alignment must have come close to blowing the kernel stack. In boot blocks, I think there is plenty of stack but alignment wastes code space. I'd like to try -mpreferred-stack-boundary=3 in amd64 kernels, but this is an i386-only option. >> Yes, we need clang/our libraries to handle different alignments and >> not assume that callers do more than the ABI requires and pessimize >> on behalf of the libraries. Outside of libraries, the problem is small >> provided -mpreferred-stack-boundary works, since you can compile >> everything with the same -mpreferred-stack-boundary. > > As far as I can see, with the 4 byte stack alignment that has been the > default, and is now also clang's default, our libraries should handle > any "incoming" stack alignment of >= 4 bytes. I don't think anybody > uses lower stack alignment, except maybe for the special case of boot > loaders, or extremely size-optimized code. -Os could reasonably generate lower stack alignment, but that rarely saves space. -Os generally doesn't give enough control over alignment for space-time tradeoffs. I made some minor changes in FreeBSD's gcc to make it _not_ give misaligned 32-bit variables (?) since -Os should only optimize for space if it doesn't cost much time for small savings in space. But if you only care about space, it would be useful to minimize the alignment of everything. Bruce From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 15:11:39 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7CB01B24; Sun, 11 Nov 2012 15:11:39 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) by mx1.freebsd.org (Postfix) with ESMTP id CD2C28FC08; Sun, 11 Nov 2012 15:11:35 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:9d32:5200:f533:2e10] (unknown [IPv6:2001:7b8:3a7:0:9d32:5200:f533:2e10]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 9352E5C59; Sun, 11 Nov 2012 16:11:34 +0100 (CET) Message-ID: <509FC025.9070703@FreeBSD.org> Date: Sun, 11 Nov 2012 16:11:33 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Bruce Evans Subject: Re: svn commit: r242879 - in head/lib: libc/gen msun/src References: <201211102122.qAALMAnO014246@svn.freebsd.org> <20121110214345.GT73505@kib.kiev.ua> <509ED25E.3070302@FreeBSD.org> <20121111230817.G1155@besplex.bde.org> In-Reply-To: <20121111230817.G1155@besplex.bde.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 15:11:39 -0000 On 2012-11-11 14:07, Bruce Evans wrote: > On Sat, 10 Nov 2012, Dimitry Andric wrote: >> On 2012-11-10 22:43, Konstantin Belousov wrote: >>> On Sat, Nov 10, 2012 at 09:22:10PM +0000, Dimitry Andric wrote: >> ... >>>> Author: dim >>>> Date: Sat Nov 10 21:22:10 2012 >>>> New Revision: 242879 >>>> URL: http://svnweb.freebsd.org/changeset/base/242879 >>>> >>>> Log: >>>> Only define isnan, isnanf, __isnan and __isnanf in libc.so, not in >>>> libc.a and libc_p.a. In addition, define isnan in libm.a and libm_p.a, >>>> but not in libm.so. >>>> >>>> This makes it possible to statically link executables using both isnan >>>> and isnanf with libc and libm. >> ... >>> So you broke ABI for libm ? >> >> No, both libc.so and libm.so are the same as before. Only the .a files >> are changed. >> >> I should probably have made the commit message more clear, sorry about >> that. > > Hopefully "fixed" instead of "broke" (except the .so files are unchanged > so they are still broken). I use the hack of ifdefing out the definition > of __isnanf() in libm. isnan() is already ifdefed out there. I didn't > touch the compatibility cruft weak references to isnanf() there -- libc > has it too, so it is not needed any more than isnan() here. > > The pessimality of these functions is another problem. C99 only requires > the isnan() API, and only requires it to be a macro. gcc-4.2.1 and clang > (but not gcc-3.3.3 which I often test with) provide good builtins for > these functions. But the FreeBSD implementation destroys use of the > builtins with some help from the ABI: > - if you compile isnan*(x) calls using gcc _without_ including , > then everything works right -- they builtins are used and are optimal > - if you compile isnan*(x) calls using gcc _without_ including , > then you get annoying (and broken) warnings about implicit function > declarations being invalid in C99. This is a bug in clang. These > functions are reserved in C99, so some other warning for them would > be correct, but things warning is wrong in several ways: > - implicit function declarations are not invalid in C9 Implicit function declarations are invalid in C99, not in C89. Clang defaults to C99. Whether the function is reserved or not, should not matter. > - the same warning is printed for -ffreestanding, but these functions > are not reserved by C99 then. Again, I don't agree. Reserved or not is not relevant. If the above reasoning was followed, we would never have to include either, because all those prototypes would already be implicitly there? :-) > After turning off the broken warning using > -Wno-implicit-function-declarations, everything works right for these > function calls, but of course not for others for which you want this > warning. > So for clang you must include for calling these functions, No, according to the C99 standard you must include . Quoting 7.12.3.4: Synopsis: #include int isnan(real-floating x); The synopses of all math functions explicitly have the the #include at the top. > and > of course for other FP library features, omitting the include is even > more impractical. This gives the pessimizations: > - the isnan() macro translates to isnan() for doubles, __isnanf() for > floats and __isnanfl() for long doubles. The null translation for > doubles gives the builtin and it works as above, but the other > translations give the library functions with their underscored > spelling. Compilers don't understand this spelling, so they don't > give the builtins. So isnan() is pessimized when applied to floats > and long doubles. Yes, this is rather unfortunate. Though I originally assumed that the libm authors found all the compiler builtins inferior in some way, and therefore supplied their own implementations. :-) > OTOH, if you forget that isnan() is type-generic and spell it isnanf() > or isnanl(), then the float and long double cases mostly work right > again: > - same behaviour if is not included (and -O is used) > - if is included, then it declares isnanf() but not isnanl(), > since only the former is compatibility cruft and has an extern function. > So isnanf() always works and the builtin is always used with -O and > and the extern function is used without -O. But isnanl() causes the > following problems: > - -Wimplicit* warning > - linkage failure without -O. > > Another problem is that the extern __isnanl() is broken on x86, but the > builtin works. The extern functions do bit tests that are rather slow > but not slow enough to be correct (they don't check for pseudo-numbers > which the hardware treats as NaNs), but the builtin does a simple x != x > test which is probably optimal, and works. > > Similarly for some other macros (they convert to spelling that compilers > don't understand, and at least the classification macros are broken on > psudo-numbers, but now the broken cases are mostly ones for which the > builtins don't exist or is broken). In short, maybe just: #define isnan __builtin_isnan ? That should cover all cases. With a fallback for !gcc && !clang, obviously. The functions stay behind for backwards compatibility. > Fixing the pessimizations would reduce the ABI problems. Both libc > and libm should translate to the builtin if it exists and is a real > builtin (not a libcall). This seems reasonable even without -O, since > C99 doesn't require any functions to exist so nothing should take their > addresses or try to call them as non-macros ('(isnan)(x)'). > already has complications to use builtins for 1 set of interfaces only. > The only problems are that it is that it is hard to tell if builtins > exist and are real (there are compiler predefines for the set that > uses builtins but not for most sets). How is it hard to tell? Both gcc and clang support those builtins, unless you want to support very old versions of gcc, which might not have them. > With this, the library functions are never used by new compiles and > are only needed by old applications. All static copies of them can > be removed, but the .so ones are still needed until the ABI is changed. > > When will the library isnanf() have been deprecated long enough to > remove in .so's too? Maybe it never needed to be preserved, since > old applications will link to old libraries that have it. I don't think we can ever remove them from libc.so anymore, unless version bumps are reintroduced. :-) From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 15:13:37 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CDF16CA9; Sun, 11 Nov 2012 15:13:37 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by mx1.freebsd.org (Postfix) with ESMTP id B4C388FC18; Sun, 11 Nov 2012 15:13:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qABFDP1F013340; Sun, 11 Nov 2012 15:13:25 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qABFDOEB013338; Sun, 11 Nov 2012 15:13:24 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201211111513.qABFDOEB013338@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 11 Nov 2012 15:13:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242895 - head/bin/sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 15:13:37 -0000 Author: jilles Date: Sun Nov 11 15:13:24 2012 New Revision: 242895 URL: http://svnweb.freebsd.org/changeset/base/242895 Log: sh: Forward-declare struct alias instead of giving up type safety via void * Modified: head/bin/sh/input.c head/bin/sh/input.h Modified: head/bin/sh/input.c ============================================================================== --- head/bin/sh/input.c Sun Nov 11 13:28:04 2012 (r242894) +++ head/bin/sh/input.c Sun Nov 11 15:13:24 2012 (r242895) @@ -350,7 +350,7 @@ pungetc(void) * We handle aliases this way. */ void -pushstring(char *s, int len, void *ap) +pushstring(char *s, int len, struct alias *ap) { struct strpush *sp; @@ -365,9 +365,9 @@ pushstring(char *s, int len, void *ap) sp->prevstring = parsenextc; sp->prevnleft = parsenleft; sp->prevlleft = parselleft; - sp->ap = (struct alias *)ap; + sp->ap = ap; if (ap) - ((struct alias *)ap)->flag |= ALIASINUSE; + ap->flag |= ALIASINUSE; parsenextc = s; parsenleft = len; INTON; Modified: head/bin/sh/input.h ============================================================================== --- head/bin/sh/input.h Sun Nov 11 13:28:04 2012 (r242894) +++ head/bin/sh/input.h Sun Nov 11 15:13:24 2012 (r242895) @@ -45,6 +45,7 @@ extern int parsenleft; /* number of cha extern char *parsenextc; /* next character in input buffer */ extern int init_editline; /* 0 == not setup, 1 == OK, -1 == failed */ +struct alias; struct parsefile; char *pfgets(char *, int); @@ -52,7 +53,7 @@ int pgetc(void); int preadbuffer(void); int preadateof(void); void pungetc(void); -void pushstring(char *, int, void *); +void pushstring(char *, int, struct alias *); void setinputfile(const char *, int); void setinputfd(int, int); void setinputstring(char *, int); From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 15:35:14 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D95E74D2; Sun, 11 Nov 2012 15:35:14 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by mx1.freebsd.org (Postfix) with ESMTP id C09D08FC12; Sun, 11 Nov 2012 15:35:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qABFYxE3015493; Sun, 11 Nov 2012 15:34:59 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qABFYx56015492; Sun, 11 Nov 2012 15:34:59 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211111534.qABFYx56015492@svn.freebsd.org> From: Eitan Adler Date: Sun, 11 Nov 2012 15:34:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242896 - head/usr.bin/ssh-copy-id X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 15:35:14 -0000 Author: eadler Date: Sun Nov 11 15:34:58 2012 New Revision: 242896 URL: http://svnweb.freebsd.org/changeset/base/242896 Log: Add the standard exit status to the ssh-copy-id man page. Approved by: bcr (mentor) MFC after: 3 days Modified: head/usr.bin/ssh-copy-id/ssh-copy-id.1 Modified: head/usr.bin/ssh-copy-id/ssh-copy-id.1 ============================================================================== --- head/usr.bin/ssh-copy-id/ssh-copy-id.1 Sun Nov 11 15:13:24 2012 (r242895) +++ head/usr.bin/ssh-copy-id/ssh-copy-id.1 Sun Nov 11 15:34:58 2012 (r242896) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 3, 2012 +.Dd November 11, 2012 .Dt SSH-COPY-ID 1 .Os .Sh NAME @@ -71,6 +71,8 @@ default. .Pp The remaining arguments are a list of remote hosts to connect to, each one optionally qualified by a user name. +.Sh EXIT STATUS +.Ex -std .Sh HISTORY The .Nm From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 16:52:53 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 070C616CA; Sun, 11 Nov 2012 16:52:53 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id AFB718FCF5; Sun, 11 Nov 2012 16:52:49 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id wz17so2261069pbc.13 for ; Sun, 11 Nov 2012 08:52:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=vCrYs+YuTJar1J77EaA0tSeGfGKZO15HhwqJyjiyCxA=; b=pCGFsJLKi83OUOGEUXQvOPrYwxHaokBnwcOKW4j0d1VpeMKICwvVW6MhRER8OnFfS3 O3gx4UmDtNdjuYXWJy2AW6hemrKTraPuVonzBhpAAJKWth/2hSS7LUfg38m5JvLCuDNR hsO6QwugnSv8tdGyvSszibGg2mt2NAThZVM7NS8A5iG9QwFFhJ6oR7NoVSs5vG7ZQWn0 D5aScd2KAQ1bnylrbX53fMDFrmikx5zx+yfi1ioqm6oFkk1zrJyA1tJoT4X49QOwpr8l iJEg36RTRmhRE+xOn0oWh8N0EXpAro4bn54XOEgam5q87iPVDdFtAZhhZ+cEGJp7XM+5 DcxQ== MIME-Version: 1.0 Received: by 10.66.87.132 with SMTP id ay4mr47842921pab.67.1352652769008; Sun, 11 Nov 2012 08:52:49 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.68.124.130 with HTTP; Sun, 11 Nov 2012 08:52:48 -0800 (PST) In-Reply-To: <509F72B0.90201@mu.org> References: <509DC25E.5030306@mu.org> <509E3162.5020702@FreeBSD.org> <509E7E7C.9000104@mu.org> <509E830D.5080006@mu.org> <1352568275.17290.85.camel@revolution.hippie.lan> <20121111061517.H1208@besplex.bde.org> <20121111073352.GA96046@FreeBSD.org> <509F72B0.90201@mu.org> Date: Sun, 11 Nov 2012 08:52:48 -0800 X-Google-Sender-Auth: 4XzOLL5-hDsmrIJDYENPt54i4hY Message-ID: Subject: Re: svn commit: r242847 - in head/sys: i386/include kern From: Adrian Chadd To: Alfred Perlstein Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, Alexey Dokuchaev , src-committers@freebsd.org, svn-src-all@freebsd.org, Peter Wemm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 16:52:53 -0000 Alfred, You're thinking about it one step ahead, not 5 steps ahead. One step ahead: "let's fix maxuser scaling." 5 steps ahead: "Let's find all of the non-dynamic things that maxusers scales, figure out how to make them run-time tunable, and then make a maxusers.sh user-land script that scales these values when you type 'maxusers 512'." Then you can fiddle in userland in your hearts content with how to scale these things. The only recent time I've seen the need for ridiculously large non-default values for mbuf clusters is for one of the 10ge NICs that preallocates them at device startup time, and fails to attach right if they're not all available. With everything dynamically tunable and the maxusers script in userland, you can: * fondle the curves as you want; * export usage stats for all the things that the above tuning does affect (which you've been doing with netstat and mbuf allocation hangs, thankyou!) * start looking at providing much better inspection and auto-tuning tools, which allow the sysadmin to actually start controlling what spirally death their server decides to visit, versus just "spirally death." Adrian From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 16:53:54 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 48E2D185E; Sun, 11 Nov 2012 16:53:54 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by mx1.freebsd.org (Postfix) with ESMTP id A5E108FC9B; Sun, 11 Nov 2012 16:46:29 +0000 (UTC) Received: by mail-pa0-f54.google.com with SMTP id bi1so3971448pad.13 for ; Sun, 11 Nov 2012 08:46:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=RAT0p+89bi6Ka9pbL9+kGXkwLzPlCHbnJth9Lk16UlQ=; b=fCSrO65p6R+6zkKo9r+VhYGni0LT1tkBh2VRIAQyagPEgnCRz+j3wBUA7srAg3rT8J 4V1+Xol8A629O3dIxzPL3nsl7SbIeSGToi0RTiFbM4GmK87T7WHFU6T98EAKGcSyD7ji ICTspgxvk+NfFc6rrJM3uR/XgVYAZ9Amu6YYX4Q1GVcQKI8+vvoc7x098FiH0AAZ3Gv8 kgnpQfQcyUcT/MiIu1uCMbn12wtmHDPX5J+Uyuo6eK+jpJRgjbCL8albA/w2/xeGMbg8 bFM7XpF5pjjG2dpDkp17NIyUIepmJcDqlcnpb67h3FgqN6vbXbsRpF2Ol6fOEnYU9vwM ReSA== MIME-Version: 1.0 Received: by 10.66.73.230 with SMTP id o6mr48249161pav.45.1352652389132; Sun, 11 Nov 2012 08:46:29 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.68.124.130 with HTTP; Sun, 11 Nov 2012 08:46:29 -0800 (PST) In-Reply-To: References: <201211110034.qAB0YBFn052472@svn.freebsd.org> Date: Sun, 11 Nov 2012 08:46:29 -0800 X-Google-Sender-Auth: 2d-16KtEFzj1j63H6lLE4x5xNZQ Message-ID: Subject: Re: svn commit: r242881 - head/sys/dev/ath From: Adrian Chadd To: 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 16:53:54 -0000 On 11 November 2012 08:39, Adrian Chadd wrote: > Damnit, I commited the wrong file. I meant if_ath.c instead of if_ath_tx.c. > > Thanks for pointing it out. I'll commit the fix when svn.freebsd.org works again. Adrian From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 16:53:54 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 666861869; Sun, 11 Nov 2012 16:53:54 +0000 (UTC) (envelope-from bright@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id F35DD8FC9A; Sun, 11 Nov 2012 16:47:29 +0000 (UTC) Received: from [10.0.1.17] (c-67-180-208-218.hsd1.ca.comcast.net [67.180.208.218]) by elvis.mu.org (Postfix) with ESMTPSA id 8C68D1A3C1E; Sun, 11 Nov 2012 08:47:27 -0800 (PST) References: <509DC25E.5030306@mu.org> <509E3162.5020702@FreeBSD.org> <509E7E7C.9000104@mu.org> <509E830D.5080006@mu.org> <1352568275.17290.85.camel@revolution.hippie.lan> <20121111061517.H1208@besplex.bde.org> <20121111073352.GA96046@FreeBSD.org> <509F72B0.90201@mu.org> In-Reply-To: Mime-Version: 1.0 (1.0) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Message-Id: <15512D0F-D403-4341-92D7-DFA03FDC2D88@mu.org> X-Mailer: iPhone Mail (9B206) From: Alfred Perlstein Subject: Re: svn commit: r242847 - in head/sys: i386/include kern Date: Sun, 11 Nov 2012 08:47:24 -0800 To: Peter Wemm Cc: "svn-src-head@freebsd.org" , Alexey Dokuchaev , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 16:53:54 -0000 I think there are two issue here.=20 One: you have much better idea of how to tune nmbclusters than I do. Cool! P= lease put that into the code. I really think that's great and the time you'v= e pit into giving it serious thought is helpful to all.=20 Two: you want to divorce nmbclusters (and therefor maxsockets and some other= tunables) from maxusers even though that has been the way to flip a big swi= tch for ages now. This is think is very wrong.=20 "oh you only have to change 1 thing!" Wait... What was that sound? Oh it was the flushing of a toilet that was fl= ushing down 15 years of mailing list information, FAQs and user knowledge do= wn the toilet because the word "maxusers" is no longer hip to the community.= That is bad. Please don't do that.=20 On Nov 11, 2012, at 2:53 AM, Peter Wemm wrote: > On Sun, Nov 11, 2012 at 1:41 AM, Albert Perlstein wrote: >> The real conversation goes like this: >>=20 >> user: "Why is my box seeing terrible network performance?" >> bsdguy: "Increase nmbclusters." >> user: "what is that?" >> bsdguy: "Oh those are the mbufs, just tell me your current value." >> user: "oh it's like 128000" >> bsdguy: "hmm try doubling that, go sysctl kern.ipc.nmbclusters=3D512000 o= n the >> command line." >> user: "ok" >> .... an hour passes ... >> user: "hmm now I can't fork any more copies of apache.." >> bsdguy: "oh, ok, you need to increase maxproc for that." >> user: "so sysctl kern.ipc.maxproc=3D10000?" >> bsdguy: "no... one second..." >> .... >> bsdguy: "ok, so that's sysctl kern.maxproc=3D10000" >> user: "ok... bbiaf" >> .... >> user: "so now i'm getting log messages about can't open sockets..." >> bsdguy: "oh you need to increase sockets bro... one second..." >> user: "sysctl kern.maxsockets?" >> bsdguy: "oh no.. it's actually back to kern.ipc.maxsockets" >> user: "alrighty then.." >> .... >> .... >> bsdguy: "so how is freebsd since I helped you tune it?" >> user: "well i kept hitting other resource limits, boss made me switch to >> Linux, it works out of the box and doesn't require an expert tuner to run= a >> large scale server. Y'know as a last ditch effort I looked around for th= is >> 'maxusers' thing but it seems like some eggheads retired it and instead o= f >> putting my job at risk, I just went with Linux, no one gets fired for usi= ng >> Linux." >> bsdguy: "managers are lame!" >> user: "yeah! managers..." >>=20 >> -Alfred >=20 > Now Albert.. I know that deliberately playing dumb is fun, but there > is no network difference between doubling "kern.maxusers" in > loader.conf (the only place it can be set, it isn't runtime tuneable) > and doubling "kern.ipc.nmbclusters" in the same place. We've always > allowed people to fine-tune derived settings at runtime where it is > possible. >=20 > My position still is that instead of trying to dick around with > maxusers curve slopes to try and somehow get the scaling right, we > should instead be setting sensibly right from the start, by default. >=20 > The current scaling was written when we had severe kva constraints, > did reservations, etc. Now they're a cap on dynamic allocators on > most platforms. >=20 > "Sensible" defaults would be *way* higher than the current maxusers > derived scaling curves. >=20 > My quick survey: > 8G ram -> 65088 clusters -> clusters capped at 6.2% of physical ram > (running head) > 3.5G ram -> 25600 clusters -> clusters capped at 5.0% of physical ram > (running an old head) > 32G ram -> 25600 clusters -> clusters capped at 1.5% of physical ram > (running 9.1-stable) > 72G ram -> 25600 clusters -> clusters capped at 0.06% of physical ram > (9.1-stable again) >=20 > As I've been saying from the beginning.. As these are limits on > dynamic allocators, not reservations, they should be as high as we can > comfortably set them without risking running out of other resources. >=20 > As the code stands now.. the derived limits for 4k, 9k and 16k jumbo > clusters is approximately the same space as 2K clusters. (ie: 1 x 4k > cluster per 2 x 2k clusters, 1 x 16k cluster per 8 2k clusters, and so > on). If we set a constant 6% for nmbclusters (since that's roughly > where we're at now for smaller machines after albert's changes), then > the worse case scenarios for 4k, 9k and 16k clusters are 6% each. ie: > 24% of wired, physical ram. >=20 > Plus all the other values derived from the nmbclusters tunable at boot. >=20 > I started writing this with the intention of suggesting 10% but that > might be a bit high given that: > kern_mbuf.c: nmbjumbop =3D nmbclusters / 2; > kern_mbuf.c: nmbjumbo9 =3D nmbclusters / 4; > kern_mbuf.c: nmbjumbo16 =3D nmbclusters / 8; > .. basically quadruples the worst case limits. >=20 > Out of the box, 6% is infinitely better than we 0.06% we currently get > on a 9-stable machine with 72G ram. >=20 > But I object to dicking around with "maxusers" to derive network > buffer space default limits. If we settle on something like 6%, then > it should be 6%. That's easy to document and explain the meaning of > the tunable. > --=20 > Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJ= V > "All of this is for nothing if we don't go to the stars" - JMS/B5 > "If Java had true garbage collection, most programs would delete > themselves upon execution." -- Robert Sewell From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 16:53:54 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D02D81884; Sun, 11 Nov 2012 16:53:54 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from fallbackmx09.syd.optusnet.com.au (fallbackmx09.syd.optusnet.com.au [211.29.132.242]) by mx1.freebsd.org (Postfix) with ESMTP id 2D3528FC6B; Sun, 11 Nov 2012 16:47:40 +0000 (UTC) Received: from mail03.syd.optusnet.com.au (mail03.syd.optusnet.com.au [211.29.132.184]) by fallbackmx09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id qABGldOO014943; Mon, 12 Nov 2012 03:47:39 +1100 Received: from c122-106-175-26.carlnfd1.nsw.optusnet.com.au (c122-106-175-26.carlnfd1.nsw.optusnet.com.au [122.106.175.26]) by mail03.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id qABGlSUq005809 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 12 Nov 2012 03:47:30 +1100 Date: Mon, 12 Nov 2012 03:47:28 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Dimitry Andric Subject: Re: svn commit: r242879 - in head/lib: libc/gen msun/src In-Reply-To: <509FC025.9070703@FreeBSD.org> Message-ID: <20121112024108.W1858@besplex.bde.org> References: <201211102122.qAALMAnO014246@svn.freebsd.org> <20121110214345.GT73505@kib.kiev.ua> <509ED25E.3070302@FreeBSD.org> <20121111230817.G1155@besplex.bde.org> <509FC025.9070703@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-Cloudmark-Score: 0 X-Optus-Cloudmark-Analysis: v=2.0 cv=JdTkNj2V c=1 sm=1 a=3cd0u8GmRs4A:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=4PLq0TcHr_4A:10 a=pcNIaovmKlT530XI9BEA:9 a=CjuIK1q_8ugA:10 a=bxQHXO5Py4tHmhUgaywp5w==:117 Cc: Konstantin Belousov , svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Bruce Evans X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 16:53:54 -0000 On Sun, 11 Nov 2012, Dimitry Andric wrote: > On 2012-11-11 14:07, Bruce Evans wrote: >> ... >> The pessimality of these functions is another problem. C99 only requires >> ... >> - if you compile isnan*(x) calls using gcc _without_ including , >> then you get annoying (and broken) warnings about implicit function >> declarations being invalid in C99. This is a bug in clang. These >> functions are reserved in C99, so some other warning for them would >> be correct, but things warning is wrong in several ways: >> - implicit function declarations are not invalid in C9 > > Implicit function declarations are invalid in C99, not in C89. Clang > defaults to C99. Whether the function is reserved or not, should not > matter. > >> - the same warning is printed for -ffreestanding, but these functions >> are not reserved by C99 then. > > Again, I don't agree. Reserved or not is not relevant. If the above > reasoning was followed, we would never have to include either, > because all those prototypes would already be implicitly there? :-) Oops, I thought it was removed later. >> After turning off the broken warning using >> -Wno-implicit-function-declarations, everything works right for these >> function calls, but of course not for others for which you want this >> warning. >> So for clang you must include for calling these functions, > > No, according to the C99 standard you must include . Quoting > 7.12.3.4: > > Synopsis: > > #include > int isnan(real-floating x); > > The synopses of all math functions explicitly have the the #include at > the top. Except with -ffreestanding, isnan() is not reserved and might not exist. gcc and clang handle this correctly by not converting isnan*() into a builtin. >> [... isnan() gets turned into an extern function that bypasses better >> builtins] > In short, maybe just: > > #define isnan __builtin_isnan > > ? That should cover all cases. With a fallback for !gcc && !clang, > obviously. The functions stay behind for backwards compatibility. This fails for gcc-3.3.3 which I test on (gcc-3.3.3 produces better libm code in some cases). >> Fixing the pessimizations would reduce the ABI problems. Both libc >> and libm should translate to the builtin if it exists and is a real >> builtin (not a libcall). This seems reasonable even without -O, since >> C99 doesn't require any functions to exist so nothing should take their >> addresses or try to call them as non-macros ('(isnan)(x)'). >> already has complications to use builtins for 1 set of interfaces only. >> The only problems are that it is that it is hard to tell if builtins >> exist and are real (there are compiler predefines for the set that >> uses builtins but not for most sets). > > How is it hard to tell? Both gcc and clang support those builtins, > unless you want to support very old versions of gcc, which might not > have them. It is easy to hard-code ifdefs on the compiler name, but only for a couple of compiler/version combinations, and this is ugly. Then there is the problem that some builtins just gives libcalls so they are useless. In general, whether a builtin gives a libcall is MD. __builtin_fma() should be an example. It should give hardware fma on ia64 but doesn't. It should give hardware fma on any future x86 that has fma. Currently it always gives a libcall so it is useless. >> With this, the library functions are never used by new compiles and >> are only needed by old applications. All static copies of them can >> be removed, but the .so ones are still needed until the ABI is changed. >> >> When will the library isnanf() have been deprecated long enough to >> remove in .so's too? Maybe it never needed to be preserved, since >> old applications will link to old libraries that have it. > > I don't think we can ever remove them from libc.so anymore, unless > version bumps are reintroduced. :-) Sigh, the version has been bumped twice since isnanf() was deprecated. First from 5 to 6 in 2004 just 3 months days after the deprecation. Then from 6 to 7 in 2006. The log message says that isnan() and others are done in the "hard" way instead of relying on fpclassify(), for binary compatibility since we have never bumpled libm's major number, but that has also been bumped twice since the deprecation. Using fpclassify() would actually be the hard way for isnan(), since there is no builtin for it. Of the functions referred to in the log message, isinf() is easy using its builtin and isfinite() and isnormal() are "hard" since they don't have a builtin in gcc. Summary of the libm builtins: - isnan(): good but not always used - isinf(): like isnan() - isfinite(): only in clang (I don't know if it is more than a libcall) - isnormal(): like isfinite() - signbit(): like isnan() - significand(): only in gcc, and seems to be just a libcall. This one is a nonstandard old-IEEE API while the others are C99. - fma(): builtin but useless since it is always (?) a libcall. - sin(), cos(), ...: only in clang, and useless since they are libcalls at best. clang seems to have builtins that expand to libcalls for most libc and libm functions. Bruce From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 17:11:15 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E4241700; Sun, 11 Nov 2012 17:11:15 +0000 (UTC) (envelope-from bright@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id BB0C98FC08; Sun, 11 Nov 2012 17:11:12 +0000 (UTC) Received: from Alfreds-MacBook-Pro-5.local (c-67-180-208-218.hsd1.ca.comcast.net [67.180.208.218]) by elvis.mu.org (Postfix) with ESMTPSA id 6771E1A3C1E; Sun, 11 Nov 2012 09:11:12 -0800 (PST) Message-ID: <509FDC30.6090504@mu.org> Date: Sun, 11 Nov 2012 09:11:12 -0800 From: Alfred Perlstein User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: svn commit: r242847 - in head/sys: i386/include kern References: <509DC25E.5030306@mu.org> <509E3162.5020702@FreeBSD.org> <509E7E7C.9000104@mu.org> <509E830D.5080006@mu.org> <1352568275.17290.85.camel@revolution.hippie.lan> <20121111061517.H1208@besplex.bde.org> <20121111073352.GA96046@FreeBSD.org> <509F72B0.90201@mu.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Alexey Dokuchaev , src-committers@freebsd.org, svn-src-all@freebsd.org, Peter Wemm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 17:11:16 -0000 Oh, OK, I didn't know it was so involved. I probably don't have anything to worry about then. :) -Alfred On 11/11/12 8:52 AM, Adrian Chadd wrote: > Alfred, > > You're thinking about it one step ahead, not 5 steps ahead. > > One step ahead: "let's fix maxuser scaling." > > 5 steps ahead: "Let's find all of the non-dynamic things that maxusers > scales, figure out how to make them run-time tunable, and then make a > maxusers.sh user-land script that scales these values when you type > 'maxusers 512'." > > Then you can fiddle in userland in your hearts content with how to > scale these things. > > The only recent time I've seen the need for ridiculously large > non-default values for mbuf clusters is for one of the 10ge NICs that > preallocates them at device startup time, and fails to attach right if > they're not all available. > > With everything dynamically tunable and the maxusers script in > userland, you can: > > * fondle the curves as you want; > * export usage stats for all the things that the above tuning does > affect (which you've been doing with netstat and mbuf allocation > hangs, thankyou!) > * start looking at providing much better inspection and auto-tuning > tools, which allow the sysadmin to actually start controlling what > spirally death their server decides to visit, versus just "spirally > death." > > > > > Adrian From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 17:18:51 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 148041E7E; Sun, 11 Nov 2012 17:18:51 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by mx1.freebsd.org (Postfix) with ESMTP id 54DBE8FC95; Sun, 11 Nov 2012 16:39:58 +0000 (UTC) Received: by mail-pa0-f54.google.com with SMTP id bi1so3969766pad.13 for ; Sun, 11 Nov 2012 08:39:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=c8LCpaAnw2Ji0Z6To+STrpcSFkFsUZa9NZXGI7fp1F4=; b=Mj7gDjWhzsNPVe6+cVx1qZMgNtXn/dzVcWLNwKwMbmkRyDtmZ/pPDoYUSj6CkPhw2S znidP/QPEn4Ns+OTH2O9kkWI0Tp4KXZc3FjAutqNvorIFEE0CavP4D3l8AJEzTp1d40Y SK0wlywRhjNFKvGATfPTRkNE3UlOWEu6u2TshC7gz7buXvtvkY3wnQNFUKi8cq3tJscc p0I50n+4fvdBi20H45YzXaWSQJJIEpCeYLuA4S5N5g4l7dmRwhxSjngfP79XKGqjpXqq dlQNKKh0DF6uYPVBG3lvPVDp5Q1vNTp4DlfFNgMC16o53lU5mvfEKvNTPzZsQySXXWsa U8mw== MIME-Version: 1.0 Received: by 10.68.137.41 with SMTP id qf9mr50298621pbb.103.1352651997958; Sun, 11 Nov 2012 08:39:57 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.68.124.130 with HTTP; Sun, 11 Nov 2012 08:39:57 -0800 (PST) In-Reply-To: <201211110034.qAB0YBFn052472@svn.freebsd.org> References: <201211110034.qAB0YBFn052472@svn.freebsd.org> Date: Sun, 11 Nov 2012 08:39:57 -0800 X-Google-Sender-Auth: bYKR7OkWuIgaUVsgE9MwcrJuBRI Message-ID: Subject: Re: svn commit: r242881 - head/sys/dev/ath From: Adrian Chadd To: 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 17:18:51 -0000 Damnit, I commited the wrong file. I meant if_ath.c instead of if_ath_tx.c. Thanks for pointing it out. Adrian On 10 November 2012 16:34, Adrian Chadd wrote: > Author: adrian > Date: Sun Nov 11 00:34:10 2012 > New Revision: 242881 > URL: http://svnweb.freebsd.org/changeset/base/242881 > > Log: > Don't call av_set_tim() if it's NULL. > > This happens during a scan in STA mode; any queued data frames will > be power save queued but as there's no TIM in STA mode, it panics. > > This was introduced by me when I disabled my driver-aware power save > handling support. > > Modified: > head/sys/dev/ath/if_ath_tx.c > > Modified: head/sys/dev/ath/if_ath_tx.c > ============================================================================== > --- head/sys/dev/ath/if_ath_tx.c Sat Nov 10 22:37:06 2012 (r242880) > +++ head/sys/dev/ath/if_ath_tx.c Sun Nov 11 00:34:10 2012 (r242881) > @@ -1236,6 +1236,8 @@ ath_tx_setds(struct ath_softc *sc, struc > struct ath_desc *ds = bf->bf_desc; > struct ath_hal *ah = sc->sc_ah; > > + bzero(bf->bf_desc, sc->sc_tx_desclen * bf->bf_nseg); > + > ath_hal_setuptxdesc(ah, ds > , bf->bf_state.bfs_pktlen /* packet length */ > , bf->bf_state.bfs_hdrlen /* header length */ From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 18:26:28 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 93177195; Sun, 11 Nov 2012 18:26:28 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id F0A208FC0C; Sun, 11 Nov 2012 18:26:27 +0000 (UTC) Received: from tom.home (localhost [127.0.0.1]) by kib.kiev.ua (8.14.5/8.14.5) with ESMTP id qABIQIlr096510; Sun, 11 Nov 2012 20:26:18 +0200 (EET) (envelope-from kostikbel@gmail.com) X-DKIM: OpenDKIM Filter v2.5.2 kib.kiev.ua qABIQIlr096510 Received: (from kostik@localhost) by tom.home (8.14.5/8.14.5/Submit) id qABIQIDc096509; Sun, 11 Nov 2012 20:26:18 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 11 Nov 2012 20:26:18 +0200 From: Konstantin Belousov To: Bruce Evans Subject: Re: svn commit: r242835 - head/contrib/llvm/lib/Target/X86 Message-ID: <20121111182618.GV73505@kib.kiev.ua> References: <201211091856.qA9IuRxX035169@svn.freebsd.org> <509F2AA6.9050509@freebsd.org> <20121111214908.P938@besplex.bde.org> <509FB35F.1010801@FreeBSD.org> <20121112014417.O1675@besplex.bde.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1PQyblS8X/PkxCw+" Content-Disposition: inline In-Reply-To: <20121112014417.O1675@besplex.bde.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=0.2 required=5.0 tests=ALL_TRUSTED, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric , Nathan Whitehorn X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 18:26:28 -0000 --1PQyblS8X/PkxCw+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 12, 2012 at 02:01:47AM +1100, Bruce Evans wrote: > On Sun, 11 Nov 2012, Dimitry Andric wrote: >=20 > > On 2012-11-11 12:53, Bruce Evans wrote: > >>=20 > >> I'm not sure if either of us knows exactly what this does, but I like > >> this change. clang does stack alignment correctly, so it doesn't need > >> the gcc pessimization of aligning in the caller. clang aligns in the >=20 > Apparently we did know. >=20 > >> ... > >> alignment. gcc's alignment in callers doesn't even work, because gcc > >> assumes that it is enough and never does it in callees even when it > >> is necessary: > >>=20 > >> auto int32_t foo[8] __aligned[32]; > >>=20 > >> gcc fails to do the necessary alignment. clang does it. > >>=20 > >> auto int32_t foo[8] __aligned[16]; > >>=20 > >> Both gcc and (hopefully only without the above fix) clang fail to do t= he > >> necessary alignment. > > > > It works just fine now with clang. For the first example, I get: > > > > pushl %ebp > > movl %esp, %ebp > > andl $-32, %esp > > > > as prolog, and for the second: > > > > pushl %ebp > > movl %esp, %ebp > > andl $-16, %esp >=20 > Good. >=20 > The andl executes very fast. Perhaps not as fast as subl on %esp, > because subl is normal so more likely to be optimized (they nominally > have the same speeds, but %esp is magic). Unfortunately, it seems to > be impossible to both align the stack and reserve some space on it in > 1 instruction -- the andl might not reserve any. I think the biggest hit from the andl instruction is due to the spoiling of the stack engine presented on all Intel processors starting from Pentium Pro. Most likely, predictor cannot handle such change of %esp without throwing the hands up. >=20 > >> special alignment in main(), but assumes that crtso did it. clang also > >> doesn't support -mpreferred-stack-boundary, so it is incompatible with > >> nonstandard ABI's like the one given by always using > >> -mpreferred-stack-boundary=3D32. > > > > Apparently upstream never saw the need for this option. I strongly > > doubt it is used very often outside FreeBSD... >=20 > It is most useful for working around gcc's behaviour. Hmm, the kernel > and boot blocks uses -mpreferred-stack-boundary=3D2 on i386 to save space. > This must have been turned off for clang, so the versions that did > 16-bit alignment must have come close to blowing the kernel stack. In > boot blocks, I think there is plenty of stack but alignment wastes code > space. >=20 > I'd like to try -mpreferred-stack-boundary=3D3 in amd64 kernels, but this > is an i386-only option. >=20 > >> Yes, we need clang/our libraries to handle different alignments and > >> not assume that callers do more than the ABI requires and pessimize > >> on behalf of the libraries. Outside of libraries, the problem is small > >> provided -mpreferred-stack-boundary works, since you can compile > >> everything with the same -mpreferred-stack-boundary. > > > > As far as I can see, with the 4 byte stack alignment that has been the > > default, and is now also clang's default, our libraries should handle > > any "incoming" stack alignment of >=3D 4 bytes. I don't think anybody > > uses lower stack alignment, except maybe for the special case of boot > > loaders, or extremely size-optimized code. The i386 ABI requires 4 byte alignment, but does not require any larger. I do not see how can we even pretend to support stable ABI while allowing such gratitious changes. >=20 > -Os could reasonably generate lower stack alignment, but that rarely > saves space. -Os generally doesn't give enough control over alignment > for space-time tradeoffs. I made some minor changes in FreeBSD's gcc > to make it _not_ give misaligned 32-bit variables (?) since -Os should > only optimize for space if it doesn't cost much time for small savings > in space. But if you only care about space, it would be useful to > minimize the alignment of everything. >=20 > Bruce --1PQyblS8X/PkxCw+ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlCf7coACgkQC3+MBN1Mb4hhdwCgqXoBIt8uSJE+77MFXCnwseaS 9O0AoOwyODi7SP9F6I0yWLhr0dj/WTLk =t/VH -----END PGP SIGNATURE----- --1PQyblS8X/PkxCw+-- From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 19:49:50 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9472192D; Sun, 11 Nov 2012 19:49:50 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id EF94B8FC13; Sun, 11 Nov 2012 19:49:49 +0000 (UTC) Received: from tom.home (localhost [127.0.0.1]) by kib.kiev.ua (8.14.5/8.14.5) with ESMTP id qABJnfMA004343; Sun, 11 Nov 2012 21:49:41 +0200 (EET) (envelope-from kostikbel@gmail.com) X-DKIM: OpenDKIM Filter v2.5.2 kib.kiev.ua qABJnfMA004343 Received: (from kostik@localhost) by tom.home (8.14.5/8.14.5/Submit) id qABJnft3004342; Sun, 11 Nov 2012 21:49:41 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 11 Nov 2012 21:49:41 +0200 From: Konstantin Belousov To: Roman Divacky Subject: Re: svn commit: r242889 - head/sys/dev/xen/netback Message-ID: <20121111194941.GW73505@kib.kiev.ua> References: <201211111042.qABAgYk4066339@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HECHSKL9QsOKTVdc" Content-Disposition: inline In-Reply-To: <201211111042.qABAgYk4066339@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=0.2 required=5.0 tests=ALL_TRUSTED, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 19:49:50 -0000 --HECHSKL9QsOKTVdc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 11, 2012 at 10:42:34AM +0000, Roman Divacky wrote: > Author: rdivacky > Date: Sun Nov 11 10:42:34 2012 > New Revision: 242889 > URL: http://svnweb.freebsd.org/changeset/base/242889 >=20 > Log: > Change the XNB_ASSERT from a statement expression to do-while(0) as its > result is never used. >=20 > Modified: > head/sys/dev/xen/netback/netback_unit_tests.c >=20 > Modified: head/sys/dev/xen/netback/netback_unit_tests.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/dev/xen/netback/netback_unit_tests.c Sun Nov 11 08:22:58 201= 2 (r242888) > +++ head/sys/dev/xen/netback/netback_unit_tests.c Sun Nov 11 10:42:34 201= 2 (r242889) > @@ -62,7 +62,7 @@ __FBSDID("$FreeBSD$"); > * iff the assertion failed. Note the implied parameters buffer and > * buflen > */ > -#define XNB_ASSERT(cond) ({ \ > +#define XNB_ASSERT(cond) do ( \ > int passed =3D (cond); \ > char *_buffer =3D (buffer); \ > size_t _buflen =3D (buflen); \ > @@ -71,7 +71,7 @@ __FBSDID("$FreeBSD$"); > strlcat(_buffer, ":" TOSTRING(__LINE__) \ > " Assertion Error: " #cond "\n", _buflen); \ > } \ > - ! passed; }) > + } while (0) > =20 > =20 > /** Look at r240747. --HECHSKL9QsOKTVdc Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlCgAVUACgkQC3+MBN1Mb4hXIgCgy/cm8gA3aLndTR4xEFwvyGio HH0AoJDMvFelLECsRPhc99UFXoorRTNI =xJNq -----END PGP SIGNATURE----- --HECHSKL9QsOKTVdc-- From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 20:16:15 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1C63ABF3; Sun, 11 Nov 2012 20:16:15 +0000 (UTC) (envelope-from marc@msys.ch) Received: from sleipnir.msys.ch (unknown [IPv6:2001:4060:c0de:f000::3]) by mx1.freebsd.org (Postfix) with ESMTP id 9F6178FC17; Sun, 11 Nov 2012 20:16:14 +0000 (UTC) Received: from mail.msys.ch (smtp.msys.ch [157.161.101.10]) by sleipnir.msys.ch (8.14.3/8.14.3) with ESMTP id qABKGC5f021994 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 11 Nov 2012 21:16:12 +0100 (CET) Received: from macbook-mb-wlan.vnode.ch (macbook-mb-wlan.vnode.ch [87.102.253.81]) (authenticated bits=0) by mail.msys.ch (8.14.3/8.14.1) with ESMTP id qABKGBbg006627 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Sun, 11 Nov 2012 21:16:12 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: Re: svn commit: r242849 - head/usr.bin/calendar/calendars From: Marc Balmer In-Reply-To: <201211100449.qAA4n98l029415@svn.freebsd.org> Date: Sun, 11 Nov 2012 21:16:11 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201211100449.qAA4n98l029415@svn.freebsd.org> To: Greg Lehey X-Mailer: Apple Mail (2.1499) X-SMTP-Vilter-Version: 1.3.6 X-Spamd-Symbols: AWL,RCVD_IN_DNSWL_LOW Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 20:16:15 -0000 The date of the encounter is not clear at all. Some sources list oct. = 27, some oct. 28, and some nov. 10 = (http://en.wikipedia.org/wiki/Henry_Morton_Stanley). So this should be researched a bit more. From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 20:31:24 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D3DB4E8E; Sun, 11 Nov 2012 20:31:24 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 862A78FC08; Sun, 11 Nov 2012 20:31:24 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id wz17so2316942pbc.13 for ; Sun, 11 Nov 2012 12:31:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=Ca2NDfbQfYxppUnCAd/wgHmgl3V0+1T2j/VGv4rk/VM=; b=wI/uPYfs4pAD9dsRFqgQHTsD7LYe11SrBuHPXbc7TiWBWeREnbWqmJn6phhojk68uF yqw4Iz8/FaFFEsrBxY5uUG78X+uTXZxk1nOOayZ2iy3DvkuC7PGcyb7rXwblvjolMBdI KXPWQG+u2M1ZJweyURjoRnJcn+UkUvSP8qN3EKFT4uk0uAkRtlBQu3nN5rCGbImQHV4O 2Fc0rbZSH5rPhLy97wvEGqaaKt7Lfh3I6MsM+pb3cY8ZCxyasfXLgBqcKwUxgU6peHdp SdlrhBbvu+mSoQ5HYzkSfx8E5vRpuoYopLwbciyYCq7p8+F/L+RW6EZvwjRRiS7UOGHP sKCw== MIME-Version: 1.0 Received: by 10.69.0.8 with SMTP id au8mr45148935pbd.58.1352665883369; Sun, 11 Nov 2012 12:31:23 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.68.124.130 with HTTP; Sun, 11 Nov 2012 12:31:23 -0800 (PST) In-Reply-To: <509FDC30.6090504@mu.org> References: <509DC25E.5030306@mu.org> <509E3162.5020702@FreeBSD.org> <509E7E7C.9000104@mu.org> <509E830D.5080006@mu.org> <1352568275.17290.85.camel@revolution.hippie.lan> <20121111061517.H1208@besplex.bde.org> <20121111073352.GA96046@FreeBSD.org> <509F72B0.90201@mu.org> <509FDC30.6090504@mu.org> Date: Sun, 11 Nov 2012 12:31:23 -0800 X-Google-Sender-Auth: S48AxVO0hEi_oG_w7PAonNye7xY Message-ID: Subject: Re: svn commit: r242847 - in head/sys: i386/include kern From: Adrian Chadd To: Alfred Perlstein Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, Alexey Dokuchaev , src-committers@freebsd.org, svn-src-all@freebsd.org, Peter Wemm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 20:31:24 -0000 On 11 November 2012 09:11, Alfred Perlstein wrote: > Oh, OK, I didn't know it was so involved. I probably don't have anything to > worry about then. :) Nono - I want you to worry about it. But _I_ want there to be a slightly longer term goal that's less about dictating policy in the kernel and more about providing both the flexibility _and_ the feedback so you and others can do this kind of thing in userspace without needing to hack the kernel or recompile. So Alfred - are you up to the challenge? :) Enumerate _every_ thing that maxusers tunes at startup time and make sure it's tunable at run-time? Once that's done, we can turn maxusers into a userland _command_ that can be run _anytime_, and you all can bikeshed over the tuning of _that_ thing until we die from heat death. That way everyone wins. :) adrian From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 20:39:30 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B00EA289; Sun, 11 Nov 2012 20:39:30 +0000 (UTC) (envelope-from bright@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 7EBDA8FC08; Sun, 11 Nov 2012 20:39:30 +0000 (UTC) Received: from Alfreds-MacBook-Pro-5.local (c-67-180-208-218.hsd1.ca.comcast.net [67.180.208.218]) by elvis.mu.org (Postfix) with ESMTPSA id ABFE61A3C72; Sun, 11 Nov 2012 12:39:28 -0800 (PST) Message-ID: <50A00D00.5010901@mu.org> Date: Sun, 11 Nov 2012 12:39:28 -0800 From: Alfred Perlstein User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: svn commit: r242847 - in head/sys: i386/include kern References: <509DC25E.5030306@mu.org> <509E3162.5020702@FreeBSD.org> <509E7E7C.9000104@mu.org> <509E830D.5080006@mu.org> <1352568275.17290.85.camel@revolution.hippie.lan> <20121111061517.H1208@besplex.bde.org> <20121111073352.GA96046@FreeBSD.org> <509F72B0.90201@mu.org> <509FDC30.6090504@mu.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Alexey Dokuchaev , src-committers@freebsd.org, svn-src-all@freebsd.org, Peter Wemm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 20:39:30 -0000 On 11/11/12 12:31 PM, Adrian Chadd wrote: > On 11 November 2012 09:11, Alfred Perlstein wrote: >> Oh, OK, I didn't know it was so involved. I probably don't have anything to >> worry about then. :) > Nono - I want you to worry about it. But _I_ want there to be a > slightly longer term goal that's less about dictating policy in the > kernel and more about providing both the flexibility _and_ the > feedback so you and others can do this kind of thing in userspace > without needing to hack the kernel or recompile. > > So Alfred - are you up to the challenge? :) Enumerate _every_ thing > that maxusers tunes at startup time and make sure it's tunable at > run-time? Once that's done, we can turn maxusers into a userland > _command_ that can be run _anytime_, and you all can bikeshed over the > tuning of _that_ thing until we die from heat death. > > That way everyone wins. > > :) > > > > adrian Not really, I'm kind of stuck figuring out the following things: 1) why if_lagg doesn't get full bandwidth when in point to point mode. 2) why nfs has regressed with forced unmounts. 3) other critical performance issues wrt nfs,zfs,io. 4) ... other stuff more important. I can't devote any further effort to this maxusers thing, as I see it, I've submitted a fix that is a big step forward for all. If people want to run with this and get excited about it, I am glad. Unfortunately just because I found a light switch and turned it on, doesn't suddenly mean that I owe the community a fancy new vanity installed. After all, it is just a toilet, now that I don't have to worry about everyone pissing all over the seat, my job is done. There are more important goals. I'm not playing the "you touched it, it's your responsibility game" any longer. this is why no one has bothered to fix it, because the community feels that it is ok to saddle someone making a small incremental change with an impossibly hard halting problem of nonsense. So, yeah feel free to install that vanity, but don't make me sorry I flipped a switch. This is why we all carry flashlights around (our personal sysctl.conf), because we're afraid of this community reaction and wonder why there's piss on the seat. I think Bruce said it best: > But don't ask alfred to fix all the old mistakes. This will be my last email on this issue. -Alfred From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 21:52:19 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0C8AC10A; Sun, 11 Nov 2012 21:52:19 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E66978FC14; Sun, 11 Nov 2012 21:52:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qABLqIfk005093; Sun, 11 Nov 2012 21:52:18 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qABLqIol005092; Sun, 11 Nov 2012 21:52:18 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201211112152.qABLqIol005092@svn.freebsd.org> From: Glen Barber Date: Sun, 11 Nov 2012 21:52:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242897 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 21:52:19 -0000 Author: gjb (doc,ports committer) Date: Sun Nov 11 21:52:18 2012 New Revision: 242897 URL: http://svnweb.freebsd.org/changeset/base/242897 Log: Prevent including .zfs snapshot directories in the src.txz distribution. This can happen if the src/ tree checkout is within its own ZFS dataset, and the 'snapdir' ZFS property is set to 'visible.' Approved by: hrs MFC after: 3 days X-MFC-To: stable/9 only Modified: head/release/Makefile Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Sun Nov 11 15:34:58 2012 (r242896) +++ head/release/Makefile Sun Nov 11 21:52:18 2012 (r242897) @@ -83,7 +83,7 @@ kernel.txz: src.txz: mkdir -p ${DISTDIR}/usr ln -fs ${WORLDDIR} ${DISTDIR}/usr/src - cd ${DISTDIR} && tar cLvJf ${.OBJDIR}/src.txz --exclude .svn \ + cd ${DISTDIR} && tar cLvJf ${.OBJDIR}/src.txz --exclude .svn --exclude .zfs \ --exclude CVS --exclude @ --exclude usr/src/release/dist usr/src ports.txz: From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 21:57:19 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 753DB2DC; Sun, 11 Nov 2012 21:57:19 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 57A3C8FC12; Sun, 11 Nov 2012 21:57:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qABLvJZx005664; Sun, 11 Nov 2012 21:57:19 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qABLvJGT005663; Sun, 11 Nov 2012 21:57:19 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201211112157.qABLvJGT005663@svn.freebsd.org> From: Adrian Chadd Date: Sun, 11 Nov 2012 21:57:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242898 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 21:57:19 -0000 Author: adrian Date: Sun Nov 11 21:57:18 2012 New Revision: 242898 URL: http://svnweb.freebsd.org/changeset/base/242898 Log: Remove this; i incorrectly committed the wrong (debug) changes in my previous commit. Modified: head/sys/dev/ath/if_ath_tx.c Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Sun Nov 11 21:52:18 2012 (r242897) +++ head/sys/dev/ath/if_ath_tx.c Sun Nov 11 21:57:18 2012 (r242898) @@ -1236,8 +1236,6 @@ ath_tx_setds(struct ath_softc *sc, struc struct ath_desc *ds = bf->bf_desc; struct ath_hal *ah = sc->sc_ah; - bzero(bf->bf_desc, sc->sc_tx_desclen * bf->bf_nseg); - ath_hal_setuptxdesc(ah, ds , bf->bf_state.bfs_pktlen /* packet length */ , bf->bf_state.bfs_hdrlen /* header length */ From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 21:58:19 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 39F9D450; Sun, 11 Nov 2012 21:58:19 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1D8308FC13; Sun, 11 Nov 2012 21:58:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qABLwIcp005817; Sun, 11 Nov 2012 21:58:18 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qABLwIod005815; Sun, 11 Nov 2012 21:58:18 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201211112158.qABLwIod005815@svn.freebsd.org> From: Adrian Chadd Date: Sun, 11 Nov 2012 21:58:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242899 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 21:58:19 -0000 Author: adrian Date: Sun Nov 11 21:58:18 2012 New Revision: 242899 URL: http://svnweb.freebsd.org/changeset/base/242899 Log: Correctly fix the 'scan during STA mode' crash. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Sun Nov 11 21:57:18 2012 (r242898) +++ head/sys/dev/ath/if_ath.c Sun Nov 11 21:58:18 2012 (r242899) @@ -5598,6 +5598,13 @@ ath_node_set_tim(struct ieee80211_node * #else struct ath_vap *avp = ATH_VAP(ni->ni_vap); + /* + * Some operating omdes don't set av_set_tim(), so don't + * update it here. + */ + if (avp->av_set_tim == NULL) + return (0); + return (avp->av_set_tim(ni, enable)); #endif /* ATH_SW_PSQ */ } From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 22:25:50 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 449A8794; Sun, 11 Nov 2012 22:25:50 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [64.62.153.212]) by mx1.freebsd.org (Postfix) with ESMTP id 229A18FC13; Sun, 11 Nov 2012 22:25:49 +0000 (UTC) Received: from Xins-MacBook-Pro.local (c-67-188-85-47.hsd1.ca.comcast.net [67.188.85.47]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by anubis.delphij.net (Postfix) with ESMTPSA id 2AE63218A2; Sun, 11 Nov 2012 14:25:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=delphij.net; s=anubis; t=1352672749; bh=yxJ1nTSn6oLDwec/GDa1sGuR81q7FkjwDU4TiG0cITQ=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=khS3OL+cOUR4I9hgX+3oGNnujZVpJ0wdyS87UV0eMNdgPDHHSfDkOQwLRKmls7G+P 7ZoUeyjwJN+P4zSb0XG/tZ/w1oj/ImQN6JfKGgHj1vxkBHHxKcuKIkuSHz4a3kdpbQ EheIvDHSEZG50tvbiHhkwRFjE22p1EFyRFaBYdEc= Message-ID: <50A025EC.1000002@delphij.net> Date: Sun, 11 Nov 2012 14:25:48 -0800 From: Xin Li Organization: The FreeBSD Project MIME-Version: 1.0 To: Glen Barber Subject: Re: svn commit: r242897 - head/release References: <201211112152.qABLqIol005092@svn.freebsd.org> In-Reply-To: <201211112152.qABLqIol005092@svn.freebsd.org> X-Enigmail-Version: 1.4.5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: d@delphij.net List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 22:25:50 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 11/11/12 1:52 PM, Glen Barber wrote: > Author: gjb (doc,ports committer) Date: Sun Nov 11 21:52:18 2012 > New Revision: 242897 URL: > http://svnweb.freebsd.org/changeset/base/242897 > > Log: Prevent including .zfs snapshot directories in the src.txz > distribution. This can happen if the src/ tree checkout is within > its own ZFS dataset, and the 'snapdir' ZFS property is set to > 'visible.' Since snapdir=visible is non-standard setting, will it be sensible to exclude .snap as well? (maybe also .git?) Cheers, > Approved by: hrs MFC after: 3 days X-MFC-To: stable/9 only > > Modified: head/release/Makefile > > Modified: head/release/Makefile > ============================================================================== > > > - --- head/release/Makefile Sun Nov 11 15:34:58 2012 (r242896) > +++ head/release/Makefile Sun Nov 11 21:52:18 2012 (r242897) @@ > -83,7 +83,7 @@ kernel.txz: src.txz: mkdir -p ${DISTDIR}/usr ln -fs > ${WORLDDIR} ${DISTDIR}/usr/src - cd ${DISTDIR} && tar cLvJf > ${.OBJDIR}/src.txz --exclude .svn \ + cd ${DISTDIR} && tar cLvJf > ${.OBJDIR}/src.txz --exclude .svn --exclude .zfs \ --exclude CVS > --exclude @ --exclude usr/src/release/dist usr/src > > ports.txz: > -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJQoCXsAAoJEG80Jeu8UPuzlHQH/iB1qtSH4QcDwxUtIM1gZysI 7xJIcP47dq00W6X9v97p30s149x6VzJP+Ps1zfAt7cgwozTrD5XQGIUcJn/56rUH 4geVwfvkDTK9EqM9yPeederiio+fcSXG9mIQGuW3W345IuUHk9p8wfh6w9rQMKCR Vor/s9gQ5q5bCb3t6NZ0rAoq1LGs7pWPfU9WckHa/4Ekjw21WziwkiEfOOH4UeJl z9Di+td1Jd9pzYxh74ZFzEDY4l28/A0Pmmtj0GtNjIFtGJiXGWUgADrSuXozBwPg 7aArwKcoeL/pFsVWhll3IQ/IznMU8BwVLQkDOs5wwSLGqNoKJJvQeNWs+K2f7g4= =nLZI -----END PGP SIGNATURE----- From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 22:31:01 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4E76ABAF; Sun, 11 Nov 2012 22:31:01 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from onyx.glenbarber.us (onyx.glenbarber.us [IPv6:2607:fc50:1000:c200::face]) by mx1.freebsd.org (Postfix) with ESMTP id 164A48FC08; Sun, 11 Nov 2012 22:31:01 +0000 (UTC) Received: from glenbarber.us (unknown [IPv6:2001:470:8:1205:2:2:0:100]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: gjb) by onyx.glenbarber.us (Postfix) with ESMTPSA id 4CF6023F654; Sun, 11 Nov 2012 17:30:59 -0500 (EST) Date: Sun, 11 Nov 2012 17:30:56 -0500 From: Glen Barber To: d@delphij.net Subject: Re: svn commit: r242897 - head/release Message-ID: <20121111223056.GC1389@glenbarber.us> References: <201211112152.qABLqIol005092@svn.freebsd.org> <50A025EC.1000002@delphij.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="B4IIlcmfBL/1gGOG" Content-Disposition: inline In-Reply-To: <50A025EC.1000002@delphij.net> X-Operating-System: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 22:31:01 -0000 --B4IIlcmfBL/1gGOG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 11, 2012 at 02:25:48PM -0800, Xin Li wrote: > > Log: Prevent including .zfs snapshot directories in the src.txz=20 > > distribution. This can happen if the src/ tree checkout is within=20 > > its own ZFS dataset, and the 'snapdir' ZFS property is set to=20 > > 'visible.' >=20 > Since snapdir=3Dvisible is non-standard setting, will it be sensible to > exclude .snap as well? (maybe also .git?) >=20 Yes, I think so. This was mentioned yesterday, but I had already sent this patch for review. I do intend to exclude more dot-dirs. Glen --B4IIlcmfBL/1gGOG Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQEcBAEBCAAGBQJQoCcgAAoJEFJPDDeguUajIGsIAKGrX2GdVr0+DlxTAG3ap6yH pAt2UQ/EdCHXWAL3YWUD/jVcbrmST1AqP9zikaQn9USom9ZKNiZTP/L6JpGi3lKD 3nYETTfuWCq1p097nbt7Mi0Ag/quVpJyVepGdKlU98eSHWGHrX+VOPwf9/OKQFQj nYcfpllJUm/77HQXcQqHiYPlMmRhbVyHYzCdb/7oj1nRYu5nuUbXf04pvH8OgSHz sxkteph++U/DXKWxlWAZaet79MOLh8U68E0720jrThutfOcR9uuaRqms0f0NFWVh ekJkTUUyGTFwVhY7TxWeSQhJdkDEW+9Guc7WM/U4bROA+rgr0GomKioDasx66JA= =/zuD -----END PGP SIGNATURE----- --B4IIlcmfBL/1gGOG-- From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 22:43:36 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8CBCDDC3; Sun, 11 Nov 2012 22:43:36 +0000 (UTC) (envelope-from grog@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6E8DC8FC0C; Sun, 11 Nov 2012 22:43:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qABMhaIc011083; Sun, 11 Nov 2012 22:43:36 GMT (envelope-from grog@svn.freebsd.org) Received: (from grog@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qABMhaAU011082; Sun, 11 Nov 2012 22:43:36 GMT (envelope-from grog@svn.freebsd.org) Message-Id: <201211112243.qABMhaAU011082@svn.freebsd.org> From: Greg Lehey Date: Sun, 11 Nov 2012 22:43:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242900 - head/usr.bin/calendar/calendars X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 22:43:36 -0000 Author: grog Date: Sun Nov 11 22:43:36 2012 New Revision: 242900 URL: http://svnweb.freebsd.org/changeset/base/242900 Log: Correct date of Stanley's encounter with Livingstone. Obtained from: Henry Morton Stanley, "How I met Livingstone", http://www.gutenberg.org/dirs/5/1/5/5157/5157-h/5157-h.htm MFC after: 14 days Modified: head/usr.bin/calendar/calendars/calendar.history Modified: head/usr.bin/calendar/calendars/calendar.history ============================================================================== --- head/usr.bin/calendar/calendars/calendar.history Sun Nov 11 21:58:18 2012 (r242899) +++ head/usr.bin/calendar/calendars/calendar.history Sun Nov 11 22:43:36 2012 (r242900) @@ -383,7 +383,6 @@ 10/23 Swallows leave Capistrano 10/25 The UN removes Taiwan and admits the People's Republic of China, 1971 10/26 UN's World Health Organization declares smallpox eradicated, 1978 -10/27 Henry Stanley asks David Livingstone, "Dr. Livingstone, I presume?", 1871 10/27 New York's Boss Tweed is arrested on fraud charges, 1871 10/27 The first New York Subway is opened, 1904 10/28 Columbus discovers Cuba, 1492 @@ -412,6 +411,7 @@ 11/09 Roosevelt establishes the Civil Works Administration, 1933 11/10 41 Women arrested in suffragette demonstrations near White House, 1917 11/10 Cpt. Wirz, commandant of Andersonville Prison hanged, 1865 +11/10 Henry Stanley asks David Livingstone, "Dr. Livingstone, I presume?", 1871 11/11 Washington becomes the 42nd state, 1889 11/12 Dr. Sun Yat-sen's Birthday in Taiwan 11/12 USA first exports oil to Europe, 1861 From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 23:25:48 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8BD892C7; Sun, 11 Nov 2012 23:25:48 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 669E28FC12; Sun, 11 Nov 2012 23:25:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qABNPmcR016062; Sun, 11 Nov 2012 23:25:48 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qABNPmhl016060; Sun, 11 Nov 2012 23:25:48 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201211112325.qABNPmhl016060@svn.freebsd.org> From: Attilio Rao Date: Sun, 11 Nov 2012 23:25:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242901 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 23:25:48 -0000 Author: attilio Date: Sun Nov 11 23:25:47 2012 New Revision: 242901 URL: http://svnweb.freebsd.org/changeset/base/242901 Log: Tweak comments. In collabouration with: alc Modified: head/sys/sys/_mutex.h head/sys/sys/_rwlock.h Modified: head/sys/sys/_mutex.h ============================================================================== --- head/sys/sys/_mutex.h Sun Nov 11 22:43:36 2012 (r242900) +++ head/sys/sys/_mutex.h Sun Nov 11 23:25:47 2012 (r242901) @@ -36,12 +36,11 @@ /* * Sleep/spin mutex. * - * The layout of the first 2 members of struct mtx* is considered fixed. - * More specifically, it is assumed that there is a member called mtx_lock - * for every struct mtx* and that other locking primitive structures are - * not allowed to use such name for their members. - * If this needs to change, the bits in the mutex implementation might be - * modified appropriately. + * All mutex implementations must always have a member called mtx_lock. + * Other locking primitive structures are not allowed to use this name + * for their members. + * If this rule needs to change, the bits in the mutex implementation must + * be modified appropriately. */ struct mtx { struct lock_object lock_object; /* Common lock properties. */ @@ -50,11 +49,12 @@ struct mtx { /* * Members of struct mtx_padalign must mirror members of struct mtx. - * mtx_padalign mutexes can use mtx(9) KPI transparently, without modifies. - * When using pad-aligned mutexes within structures, they should generally - * stay as the first member of the struct. This is because otherwise the - * compiler can generate ever more padding for the struct to keep a correct - * alignment for the mutex. + * mtx_padalign mutexes can use the mtx(9) API transparently without + * modification. + * Pad-aligned mutexes used within structures should generally be the + * first member of the struct. Otherwise, the compiler can generate + * additional padding for the struct to keep a correct alignment for + * the mutex. */ struct mtx_padalign { struct lock_object lock_object; /* Common lock properties. */ Modified: head/sys/sys/_rwlock.h ============================================================================== --- head/sys/sys/_rwlock.h Sun Nov 11 22:43:36 2012 (r242900) +++ head/sys/sys/_rwlock.h Sun Nov 11 23:25:47 2012 (r242901) @@ -37,12 +37,11 @@ /* * Reader/writer lock. * - * The layout of the first 2 members of struct rwlock* is considered fixed. - * More specifically, it is assumed that there is a member called rw_lock - * for every struct rwlock* and that other locking primitive structures are - * not allowed to use such name for their members. - * If this needs to change, the bits in the rwlock implementation might be - * modified appropriately. + * All reader/writer lock implementations must always have a member + * called rw_lock. Other locking primitive structures are not allowed to + * use this name for their members. + * If this rule needs to change, the bits in the reader/writer lock + * implementation must be modified appropriately. */ struct rwlock { struct lock_object lock_object; @@ -51,12 +50,12 @@ struct rwlock { /* * Members of struct rwlock_padalign must mirror members of struct rwlock. - * rwlock_padalign rwlocks can use rwlock(9) KPI transparently, without - * modifies. - * When using pad-aligned rwlocks within structures, they should generally - * stay as the first member of the struct. This is because otherwise the - * compiler can generate ever more padding for the struct to keep a correct - * alignment for the rwlock. + * rwlock_padalign rwlocks can use the rwlock(9) API transparently without + * modification. + * Pad-aligned rwlocks used within structures should generally be the + * first member of the struct. Otherwise, the compiler can generate + * additional padding for the struct to keep a correct alignment for + * the rwlock. */ struct rwlock_padalign { struct lock_object lock_object; From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 23:39:39 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B62186C4; Sun, 11 Nov 2012 23:39:39 +0000 (UTC) (envelope-from grog@lemis.com) Received: from w3.lemis.com (w3.lemis.com [208.86.224.149]) by mx1.freebsd.org (Postfix) with ESMTP id 7E2458FC0C; Sun, 11 Nov 2012 23:39:38 +0000 (UTC) Received: from eureka.lemis.com (1032.x.rootbsd.net [208.86.224.149]) by w3.lemis.com (Postfix) with ESMTP id D34633B86E; Sun, 11 Nov 2012 23:39:31 +0000 (UTC) Received: by eureka.lemis.com (Postfix, from userid 1004) id D59C7F78BA; Mon, 12 Nov 2012 10:39:28 +1100 (EST) Date: Mon, 12 Nov 2012 10:39:28 +1100 From: Greg 'groggy' Lehey To: Marc Balmer Subject: Re: svn commit: r242849 - head/usr.bin/calendar/calendars Message-ID: <20121111233928.GC10902@eureka.lemis.com> References: <201211100449.qAA4n98l029415@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jy6Sn24JjFx/iggw" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Organization: The FreeBSD Project Phone: +61-3-5346-1370 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 23:39:39 -0000 --jy6Sn24JjFx/iggw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sunday, 11 November 2012 at 21:16:11 +0100, Marc Balmer wrote: > > The date of the encounter is not clear at all. Some sources list > oct. 27, some oct. 28, and some nov. 10 > (http://en.wikipedia.org/wiki/Henry_Morton_Stanley). I took my information from Wikipedia, the source of all wisdom. It's a pity that the German and English Wikipedias can't even agree on a date, and that other documentation says 10 November. > So this should be researched a bit more. I've done a bit of Googling and come up with Stanley's book "How I found Livingstone", http://www.gutenberg.org/dirs/5/1/5/5157/5157-h/5157-h.htm It states clearly and in great detail that the encounter was on 10 November, though it contains the confusing statement: This was that famous letter bag marked 'November 1, 1870,' which was now delivered into the Doctor's hand 365 days after it left Zanzibar! That would mean 1 November. I've updated the calendar and the English and German Wikipedias, so I thought the matter was done and dusted. But that was the book, not the diary. And then I read in http://en.wikipedia.org/wiki/Henry_Morton_Stanley#Finding_Livingstone : This famous phrase may be a fabrication, as Stanley tore out of his diary the pages relating to the encounter. The diary is available too, but not online. I'll check. And all this for what was really just a spelling error! Greg -- Sent from my desktop computer. Finger grog@FreeBSD.org for PGP public key. See complete headers for address and phone numbers. This message is digitally signed. If your Microsoft MUA reports problems, please read http://tinyurl.com/broken-mua --jy6Sn24JjFx/iggw Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlCgNy8ACgkQIubykFB6QiMxQgCZAXTMGJ7xyYtyEb7mx8BqCyfk vHoAoJWfl1uMBnYfZLSBwiqph4o0S81k =0ENh -----END PGP SIGNATURE----- --jy6Sn24JjFx/iggw-- From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 23:54:31 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DCBA28A4; Sun, 11 Nov 2012 23:54:31 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id 106F88FC08; Sun, 11 Nov 2012 23:54:29 +0000 (UTC) Received: from ur.dons.net.au (ppp118-210-218-164.lns20.adl6.internode.on.net [118.210.218.164]) (authenticated bits=0) by cain.gsoft.com.au (8.14.4/8.14.3) with ESMTP id qABNs20X093349 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 12 Nov 2012 10:24:08 +1030 (CST) (envelope-from doconnor@gsoft.com.au) Subject: Re: svn commit: r242897 - head/release Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Content-Type: multipart/signed; boundary="Apple-Mail=_3E915C41-0B6D-48A0-893B-189090512144"; protocol="application/pkcs7-signature"; micalg=sha1 From: "Daniel O'Connor" In-Reply-To: <20121111223056.GC1389@glenbarber.us> Date: Mon, 12 Nov 2012 10:24:02 +1030 Message-Id: References: <201211112152.qABLqIol005092@svn.freebsd.org> <50A025EC.1000002@delphij.net> <20121111223056.GC1389@glenbarber.us> To: Glen Barber X-Mailer: Apple Mail (2.1499) X-Spam-Score: 0.163 () BAYES_00,RDNS_DYNAMIC X-Scanned-By: MIMEDefang 2.67 on 203.31.81.10 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, d@delphij.net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 23:54:32 -0000 --Apple-Mail=_3E915C41-0B6D-48A0-893B-189090512144 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 12/11/2012, at 9:00, Glen Barber wrote: >> Since snapdir=3Dvisible is non-standard setting, will it be sensible = to >> exclude .snap as well? (maybe also .git?) >>=20 >=20 > Yes, I think so. This was mentioned yesterday, but I had already sent > this patch for review. I do intend to exclude more dot-dirs. Why not just exclude '.??*' ? I doubt the source tree will ever grow a top level directory whose name = starts with a dot. -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --Apple-Mail=_3E915C41-0B6D-48A0-893B-189090512144-- From owner-svn-src-head@FreeBSD.ORG Sun Nov 11 23:58:20 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 79446A3B; Sun, 11 Nov 2012 23:58:20 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from onyx.glenbarber.us (onyx.glenbarber.us [IPv6:2607:fc50:1000:c200::face]) by mx1.freebsd.org (Postfix) with ESMTP id 3B9378FC08; Sun, 11 Nov 2012 23:58:20 +0000 (UTC) Received: from glenbarber.us (unknown [IPv6:2001:470:8:1205:2:2:0:100]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: gjb) by onyx.glenbarber.us (Postfix) with ESMTPSA id 10BAD23F654; Sun, 11 Nov 2012 18:58:13 -0500 (EST) Date: Sun, 11 Nov 2012 18:57:55 -0500 From: Glen Barber To: Daniel O'Connor Subject: Re: svn commit: r242897 - head/release Message-ID: <20121111235755.GA1372@glenbarber.us> References: <201211112152.qABLqIol005092@svn.freebsd.org> <50A025EC.1000002@delphij.net> <20121111223056.GC1389@glenbarber.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ikeVEW9yuYc//A+q" Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, d@delphij.net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 23:58:20 -0000 --ikeVEW9yuYc//A+q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 12, 2012 at 10:24:02AM +1030, Daniel O'Connor wrote: >=20 > On 12/11/2012, at 9:00, Glen Barber wrote: > >> Since snapdir=3Dvisible is non-standard setting, will it be sensible to > >> exclude .snap as well? (maybe also .git?) > >>=20 > >=20 > > Yes, I think so. This was mentioned yesterday, but I had already sent > > this patch for review. I do intend to exclude more dot-dirs. >=20 >=20 > Why not just exclude '.??*' ? >=20 Because I have not yet had a chance to test such a change. Glen --ikeVEW9yuYc//A+q Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQEcBAEBCAAGBQJQoDuDAAoJEFJPDDeguUajf6AH/0FBMO8G4zGca21vcKz6MRWy PPI7cUTlpwnCC/zHupNcO7PZjjTyiSw8CNeuuKS9rGKgScX3IKJ/KCKobmJCNNnh EvM2ov+ScSIyCYQyGC5Qbmuz/JILkZX1rwWzoCxWZPpfcpwifCzugFn+xQFADVyi CHt3qVXWklcGitxoSsZJ40tPjlT7Rv4RCo547ddrWyoXv+H+58/ppSx7O/rMcMML Mgk+412w904PL671XcEnHEbAfOW02mZ7sRNpgbsSoEnC9ldJcb6if7QgvbsYlLfO 7azOKAJ5qnPrh77TZgX4Iy2kAb5ZA/qR/T7tyEkUs6oD01jbGhdoopzoTtgKj08= =vFH/ -----END PGP SIGNATURE----- --ikeVEW9yuYc//A+q-- From owner-svn-src-head@FreeBSD.ORG Mon Nov 12 00:24:12 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 436E6D4A; Mon, 12 Nov 2012 00:24:12 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 3EE008FC12; Mon, 12 Nov 2012 00:24:10 +0000 (UTC) Received: by mail-we0-f182.google.com with SMTP id x43so3225220wey.13 for ; Sun, 11 Nov 2012 16:24:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=K6IruKjTYd6pM+x3jrVZVE6v+0/FaoQceN94zoqXtkE=; b=mc00KIUXVrMzoJFUj0bW6kpbPoHjv6TVv4sguDYFj0hHlesB0CLFLHYjEAwrOtgh2H O08514NHWv7htUWrn4FakO6Iu1TZdiT9n+vNUygCkvEy7SCAUs1H6tbtk1SofT9sOApy 6By6Wrh/OiX5DOu7IeYWGq7XaW3B+1Zsk0a4oDvP7WOYPP+vd3ypgfOawK9vxxMPeZv0 5ujEsMjp/WLIeto2/8dg0ZEL5jpCrdyJHrknmdPTX0UOAJ2BkREcZF+FwEjDpQTM9Tig cTy8cTQYfml2adzm6OtbBwDar7mk1StobEUxxkvsCcU/cZStCLJQiH2bnIG4xYy6I25s Xfag== Received: by 10.180.94.226 with SMTP id df2mr12379274wib.11.1352679849839; Sun, 11 Nov 2012 16:24:09 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPS id s12sm12510624wik.11.2012.11.11.16.24.07 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 11 Nov 2012 16:24:08 -0800 (PST) Date: Mon, 12 Nov 2012 01:23:57 +0100 From: Mateusz Guzik To: Peter Jeremy Subject: Re: svn commit: r234352 - in head/sys: amd64/linux32 compat/linux i386/linux kern Message-ID: <20121112002357.GA28689@dft-labs.eu> References: <201204162122.q3GLM23E051048@svn.freebsd.org> <20120628213626.GA23256@server.rulingia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20120628213626.GA23256@server.rulingia.com> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Jung-uk Kim X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Nov 2012 00:24:12 -0000 On Fri, Jun 29, 2012 at 07:36:26AM +1000, Peter Jeremy wrote: > On 2012-Apr-16 21:22:02 +0000, Jung-uk Kim wrote: > >Log: > > - Implement pipe2 syscall for Linuxulator. This syscall appeared in 2.6.27 > > but GNU libc used it without checking its kernel version, e. g., Fedora 10. > > Recent versions of flash are complaining about the lack of pipe2(). > Do you have any plans to MFC this? I've had a quick look but there > are non-trivial conflicts in kern/sys_pipe.c on both 8.x & 9.x and > I don't want to spend time resolving them if you have already done so. > Conflicts at least for 9.x were not that scary after all. My only intervention is here: http://people.freebsd.org/~mjg/patches/stable9-pipe2-sys_pipe.diff I'm happy to merge this to stable/9 once someone reviews this. Full path with regenerated syscall.master for easier testing: http://people.freebsd.org/~mjg/patches/stable9-pipe2-full.diff -- Mateusz Guzik From owner-svn-src-head@FreeBSD.ORG Mon Nov 12 00:30:41 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 12B34FEC; Mon, 12 Nov 2012 00:30:41 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id ED04E8FC08; Mon, 12 Nov 2012 00:30:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAC0Uecs024606; Mon, 12 Nov 2012 00:30:40 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAC0UeS9024605; Mon, 12 Nov 2012 00:30:40 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201211120030.qAC0UeS9024605@svn.freebsd.org> From: Attilio Rao Date: Mon, 12 Nov 2012 00:30:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242903 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Nov 2012 00:30:41 -0000 Author: attilio Date: Mon Nov 12 00:30:40 2012 New Revision: 242903 URL: http://svnweb.freebsd.org/changeset/base/242903 Log: Fix DDB command "show map XXX": - Check that an argument is always available, otherwise current map printing before to recurse is garbage. - Spit out a message if an argument is not provided. - Remove unread nlines variable. - Use an explicit recursive function, disassociated from the DB_SHOW_COMMAND() body, in order to make clear prototype and recursion of the above mentioned function. The code results now much less obscure. Submitted by: gianni Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Sun Nov 11 23:29:45 2012 (r242902) +++ head/sys/vm/vm_map.c Mon Nov 12 00:30:40 2012 (r242903) @@ -3975,32 +3975,20 @@ vm_map_lookup_done(vm_map_t map, vm_map_ #include -/* - * vm_map_print: [ debug ] - */ -DB_SHOW_COMMAND(map, vm_map_print) +static void +vm_map_print(vm_map_t map) { - static int nlines; - /* XXX convert args. */ - vm_map_t map = (vm_map_t)addr; - boolean_t full = have_addr; - vm_map_entry_t entry; db_iprintf("Task map %p: pmap=%p, nentries=%d, version=%u\n", (void *)map, (void *)map->pmap, map->nentries, map->timestamp); - nlines++; - - if (!full && db_indent) - return; db_indent += 2; for (entry = map->header.next; entry != &map->header; entry = entry->next) { db_iprintf("map entry %p: start=%p, end=%p\n", (void *)entry, (void *)entry->start, (void *)entry->end); - nlines++; { static char *inheritance_name[4] = {"share", "copy", "none", "donate_copy"}; @@ -4016,14 +4004,11 @@ DB_SHOW_COMMAND(map, vm_map_print) db_printf(", share=%p, offset=0x%jx\n", (void *)entry->object.sub_map, (uintmax_t)entry->offset); - nlines++; if ((entry->prev == &map->header) || (entry->prev->object.sub_map != entry->object.sub_map)) { db_indent += 2; - vm_map_print((db_expr_t)(intptr_t) - entry->object.sub_map, - full, 0, (char *)0); + vm_map_print((vm_map_t)entry->object.sub_map); db_indent -= 2; } } else { @@ -4040,7 +4025,6 @@ DB_SHOW_COMMAND(map, vm_map_print) db_printf(", copy (%s)", (entry->eflags & MAP_ENTRY_NEEDS_COPY) ? "needed" : "done"); db_printf("\n"); - nlines++; if ((entry->prev == &map->header) || (entry->prev->object.vm_object != @@ -4048,17 +4032,23 @@ DB_SHOW_COMMAND(map, vm_map_print) db_indent += 2; vm_object_print((db_expr_t)(intptr_t) entry->object.vm_object, - full, 0, (char *)0); - nlines += 4; + 1, 0, (char *)0); db_indent -= 2; } } } db_indent -= 2; - if (db_indent == 0) - nlines = 0; } +DB_SHOW_COMMAND(map, map) +{ + + if (!have_addr) { + db_printf("usage: show map \n"); + return; + } + vm_map_print((vm_map_t)addr); +} DB_SHOW_COMMAND(procvm, procvm) { @@ -4074,7 +4064,7 @@ DB_SHOW_COMMAND(procvm, procvm) (void *)p, (void *)p->p_vmspace, (void *)&p->p_vmspace->vm_map, (void *)vmspace_pmap(p->p_vmspace)); - vm_map_print((db_expr_t)(intptr_t)&p->p_vmspace->vm_map, 1, 0, NULL); + vm_map_print((vm_map_t)&p->p_vmspace->vm_map); } #endif /* DDB */ From owner-svn-src-head@FreeBSD.ORG Mon Nov 12 06:15:55 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5F162578; Mon, 12 Nov 2012 06:15:55 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4516F8FC0C; Mon, 12 Nov 2012 06:15:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAC6FtqO066503; Mon, 12 Nov 2012 06:15:55 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAC6FtVD066502; Mon, 12 Nov 2012 06:15:55 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201211120615.qAC6FtVD066502@svn.freebsd.org> From: Rui Paulo Date: Mon, 12 Nov 2012 06:15:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242904 - head/sys/powerpc/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Nov 2012 06:15:55 -0000 Author: rpaulo Date: Mon Nov 12 06:15:54 2012 New Revision: 242904 URL: http://svnweb.freebsd.org/changeset/base/242904 Log: Allow this file to be used in LOCORE sections of the kernel. Modified: head/sys/powerpc/include/bat.h Modified: head/sys/powerpc/include/bat.h ============================================================================== --- head/sys/powerpc/include/bat.h Mon Nov 12 00:30:40 2012 (r242903) +++ head/sys/powerpc/include/bat.h Mon Nov 12 06:15:54 2012 (r242904) @@ -71,10 +71,12 @@ #ifndef _MACHINE_BAT_H_ #define _MACHINE_BAT_H_ +#ifndef LOCORE struct bat { u_int32_t batu; u_int32_t batl; }; +#endif /* Lower BAT bits (all but PowerPC 601): */ #define BAT_PBS 0xfffe0000 /* physical block start */ @@ -165,7 +167,7 @@ struct bat { #define BATL601(pa, size, v) \ (((pa) & BAT601_PBN) | (v) | (size)) -#ifdef _KERNEL +#if defined(_KERNEL) && !defined(LOCORE) extern struct bat battable[16]; #endif From owner-svn-src-head@FreeBSD.ORG Mon Nov 12 07:25:52 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 702EDB72; Mon, 12 Nov 2012 07:25:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3CB968FC14; Mon, 12 Nov 2012 07:25:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAC7PqQZ075491; Mon, 12 Nov 2012 07:25:52 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAC7PqB4075489; Mon, 12 Nov 2012 07:25:52 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201211120725.qAC7PqB4075489@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 12 Nov 2012 07:25:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242906 - in head/sys/dev/usb: . serial X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Nov 2012 07:25:52 -0000 Author: hselasky Date: Mon Nov 12 07:25:51 2012 New Revision: 242906 URL: http://svnweb.freebsd.org/changeset/base/242906 Log: Add new USB IDs. MFC after: 1 week PR: usb/173503 Modified: head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Mon Nov 12 07:25:47 2012 (r242905) +++ head/sys/dev/usb/serial/u3g.c Mon Nov 12 07:25:51 2012 (r242906) @@ -319,6 +319,10 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(HUAWEI, E1820, U3GINIT_HUAWEISCSI), U3G_DEV(HUAWEI, K3765, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, K3765_INIT, U3GINIT_HUAWEISCSI), + U3G_DEV(HUAWEI, K3770, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, K3770_INIT, U3GINIT_HUAWEISCSI), + U3G_DEV(HUAWEI, K4505, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, K4505_INIT, U3GINIT_HUAWEISCSI), U3G_DEV(HUAWEI, ETS2055, U3GINIT_HUAWEI), U3G_DEV(KYOCERA2, CDMA_MSM_K, 0), U3G_DEV(KYOCERA2, KPC680, 0), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Mon Nov 12 07:25:47 2012 (r242905) +++ head/sys/dev/usb/usbdevs Mon Nov 12 07:25:51 2012 (r242906) @@ -2189,12 +2189,16 @@ product HUAWEI E143D 0x143d 3G modem product HUAWEI E143E 0x143e 3G modem product HUAWEI E143F 0x143f 3G modem product HUAWEI E1752 0x1446 3G modem +product HUAWEI K4505 0x1464 3G modem product HUAWEI K3765 0x1465 3G modem product HUAWEI E1820 0x14ac E1820 HSPA+ USB Slider +product HUAWEI K3770 0x14c9 3G modem +product HUAWEI K3770_INIT 0x14d1 K3770 Initial product HUAWEI E3131_INIT 0x14fe 3G modem initial product HUAWEI E392 0x1505 LTE modem product HUAWEI E3131 0x1506 3G modem product HUAWEI K3765_INIT 0x1520 K3765 Initial +product HUAWEI K4505_INIT 0x1521 K4505 Initial product HUAWEI ETS2055 0x1803 CDMA modem product HUAWEI E173 0x1c05 3G modem product HUAWEI E173_INIT 0x1c0b 3G modem initial From owner-svn-src-head@FreeBSD.ORG Mon Nov 12 11:05:05 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0587872D; Mon, 12 Nov 2012 11:05:05 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail03.syd.optusnet.com.au (mail03.syd.optusnet.com.au [211.29.132.184]) by mx1.freebsd.org (Postfix) with ESMTP id 1A6538FC08; Mon, 12 Nov 2012 11:05:03 +0000 (UTC) Received: from c122-106-175-26.carlnfd1.nsw.optusnet.com.au (c122-106-175-26.carlnfd1.nsw.optusnet.com.au [122.106.175.26]) by mail03.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id qACB4w6S009451 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 12 Nov 2012 22:04:59 +1100 Date: Mon, 12 Nov 2012 22:04:58 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bruce Evans Subject: Re: svn commit: r242835 - head/contrib/llvm/lib/Target/X86 In-Reply-To: <20121112014417.O1675@besplex.bde.org> Message-ID: <20121112213445.W1247@besplex.bde.org> References: <201211091856.qA9IuRxX035169@svn.freebsd.org> <509F2AA6.9050509@freebsd.org> <20121111214908.P938@besplex.bde.org> <509FB35F.1010801@FreeBSD.org> <20121112014417.O1675@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-Cloudmark-Score: 0 X-Optus-Cloudmark-Analysis: v=2.0 cv=I9g936cg c=1 sm=1 a=B4V2Pwk6IZ0A:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=Bex9lGB9SJoA:10 a=HI2N3_CjzdjmQ36RSUMA:9 a=CjuIK1q_8ugA:10 a=bxQHXO5Py4tHmhUgaywp5w==:117 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Dimitry Andric , Nathan Whitehorn X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Nov 2012 11:05:05 -0000 On Mon, 12 Nov 2012, Bruce Evans wrote: > On Sun, 11 Nov 2012, Dimitry Andric wrote: >> It works just fine now with clang. For the first example, I get: >> >> pushl %ebp >> movl %esp, %ebp >> andl $-32, %esp >> >> as prolog, and for the second: >> >> pushl %ebp >> movl %esp, %ebp >> andl $-16, %esp > > Good. > > The andl executes very fast. Perhaps not as fast as subl on %esp, > because subl is normal so more likely to be optimized (they nominally > have the same speeds, but %esp is magic). Unfortunately, it seems to > be impossible to both align the stack and reserve some space on it in > 1 instruction -- the andl might not reserve any. I lost kib's reply to this. He said something agreeeing about %esp being magic on Intel CPUs starting with PentiumPro. The following quick test shows no problems on Xeon 5650 (freefall) or Athlon64: @ asm(" \n\ @ .globl main \n\ @ main: \n\ @ movl $266681734,%eax \n\ @ # movl $201017002,%eax \n\ @ 1: \n\ @ call foo1 \n\ @ decl %eax \n\ @ jne 1b \n\ @ ret \n\ @ \n\ @ foo1: \n\ @ pushl %ebp \n\ @ movl %esp,%ebp \n\ @ andl $-16,%esp \n\ @ call foo2 \n\ @ movl %ebp,%esp \n\ @ popl %ebp \n\ @ ret \n\ @ \n\ @ foo2: \n\ @ pushl %ebp \n\ @ movl %esp,%ebp \n\ @ andl $-16,%esp \n\ @ call foo3 \n\ @ movl %ebp,%esp \n\ @ popl %ebp \n\ @ ret \n\ @ \n\ @ foo3: \n\ @ pushl %ebp \n\ @ movl %esp,%ebp \n\ @ andl $-16,%esp \n\ @ call foo4 \n\ @ movl %ebp,%esp \n\ @ popl %ebp \n\ @ ret \n\ @ \n\ @ foo4: \n\ @ pushl %ebp \n\ @ movl %esp,%ebp \n\ @ andl $-16,%esp \n\ @ call foo5 \n\ @ movl %ebp,%esp \n\ @ popl %ebp \n\ @ ret \n\ @ \n\ @ foo5: \n\ @ pushl %ebp \n\ @ movl %esp,%ebp \n\ @ andl $-16,%esp \n\ @ call foo6 \n\ @ movl %ebp,%esp \n\ @ popl %ebp \n\ @ ret \n\ @ \n\ @ foo6: \n\ @ pushl %ebp \n\ @ movl %esp,%ebp \n\ @ andl $-16,%esp \n\ @ call foo7 \n\ @ movl %ebp,%esp \n\ @ popl %ebp \n\ @ ret \n\ @ \n\ @ foo7: \n\ @ pushl %ebp \n\ @ movl %esp,%ebp \n\ @ andl $-16,%esp \n\ @ call foo8 \n\ @ movl %ebp,%esp \n\ @ popl %ebp \n\ @ ret \n\ @ \n\ @ foo8: \n\ @ pushl %ebp \n\ @ movl %esp,%ebp \n\ @ andl $-16,%esp \n\ @ # call foo9 \n\ @ movl %ebp,%esp \n\ @ popl %ebp \n\ @ ret \n\ @ "); Build this on an i386 system so that it is 32-bit mode. This takes 56-57 cycles/iteration on Athlon64 and 50-51 cycles/iteration on X6560. Changing the andls to subls of 16 doesn't change this. Removing all the andls and subls doesn't change this on Athlon64, but on X6560 it is 4-5 cycles faster. This shows that the gcc pessimization is largest on X6560 :-). Adding "pushl %eax; popl %eax" before the calls to foo[2-8] adds 35-36 cycles/iteration on Athlon64 but only 6-7 on X6560. I know some Athlons don't optimize pushl/popl well (maybe when they are close together or near a stack pointer change as here). Apparently Athlon64 is one such. Bruce From owner-svn-src-head@FreeBSD.ORG Mon Nov 12 14:16:39 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E8413EDB; Mon, 12 Nov 2012 14:16:39 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CD9278FC12; Mon, 12 Nov 2012 14:16:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qACEGd2O031476; Mon, 12 Nov 2012 14:16:39 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qACEGdiR031474; Mon, 12 Nov 2012 14:16:39 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211121416.qACEGdiR031474@svn.freebsd.org> From: Eitan Adler Date: Mon, 12 Nov 2012 14:16:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242918 - head/usr.bin/ssh-copy-id X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Nov 2012 14:16:40 -0000 Author: eadler Date: Mon Nov 12 14:16:39 2012 New Revision: 242918 URL: http://svnweb.freebsd.org/changeset/base/242918 Log: Clarify where the authorized_key file lives. Approved by: bcr (mentor) MFC after: 3 days Modified: head/usr.bin/ssh-copy-id/ssh-copy-id.1 Modified: head/usr.bin/ssh-copy-id/ssh-copy-id.1 ============================================================================== --- head/usr.bin/ssh-copy-id/ssh-copy-id.1 Mon Nov 12 14:14:01 2012 (r242917) +++ head/usr.bin/ssh-copy-id/ssh-copy-id.1 Mon Nov 12 14:16:39 2012 (r242918) @@ -42,8 +42,8 @@ The .Nm utility copies public keys to a remote host's -.Pa authorized_keys -file. +.Pa ~/.ssh/authorized_keys +file (creating the file and directory, if required). .Pp The following options are available: .Bl -tag -width indent From owner-svn-src-head@FreeBSD.ORG Mon Nov 12 18:09:25 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9D893A02; Mon, 12 Nov 2012 18:09:25 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 808238FC0C; Mon, 12 Nov 2012 18:09:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qACI9Pxt072914; Mon, 12 Nov 2012 18:09:25 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qACI9PvT072913; Mon, 12 Nov 2012 18:09:25 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201211121809.qACI9PvT072913@svn.freebsd.org> From: Sean Bruno Date: Mon, 12 Nov 2012 18:09:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242922 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Nov 2012 18:09:25 -0000 Author: sbruno Date: Mon Nov 12 18:09:25 2012 New Revision: 242922 URL: http://svnweb.freebsd.org/changeset/base/242922 Log: Update MAX_TASKS to scale a bit based on MAXCPU This alleviates issues on newer Sandy/Ivy Bridge gear that seems to require boatloads more ACPI resources than before. Reviewed by: avg@ Obtained from: Yahoo! Inc. MFC after: 2 weeks Modified: head/sys/dev/acpica/acpivar.h Modified: head/sys/dev/acpica/acpivar.h ============================================================================== --- head/sys/dev/acpica/acpivar.h Mon Nov 12 15:17:25 2012 (r242921) +++ head/sys/dev/acpica/acpivar.h Mon Nov 12 18:09:25 2012 (r242922) @@ -476,7 +476,7 @@ ACPI_HANDLE acpi_GetReference(ACPI_HANDL /* Default maximum number of tasks to enqueue. */ #ifndef ACPI_MAX_TASKS -#define ACPI_MAX_TASKS 32 +#define ACPI_MAX_TASKS MAX(32, MAXCPU * 2) #endif /* Default number of task queue threads to start. */ From owner-svn-src-head@FreeBSD.ORG Mon Nov 12 18:38:55 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1AB8BDC; Mon, 12 Nov 2012 18:38:55 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id F2B268FC0C; Mon, 12 Nov 2012 18:38:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qACIcs2l078479; Mon, 12 Nov 2012 18:38:54 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qACIcsGV078478; Mon, 12 Nov 2012 18:38:54 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201211121838.qACIcsGV078478@svn.freebsd.org> From: Devin Teske Date: Mon, 12 Nov 2012 18:38:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242923 - head/sys/boot/forth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Nov 2012 18:38:55 -0000 Author: dteske Date: Mon Nov 12 18:38:54 2012 New Revision: 242923 URL: http://svnweb.freebsd.org/changeset/base/242923 Log: Fix a stack leak in [unused] cycle_menuitem function while we're here (required misconfiguration and/or missing environment vars to occur). Reviewed by: peterj, adrian (co-mentor) Approved by: adrian (co-mentor) Modified: head/sys/boot/forth/menu.4th Modified: head/sys/boot/forth/menu.4th ============================================================================== --- head/sys/boot/forth/menu.4th Mon Nov 12 18:09:25 2012 (r242922) +++ head/sys/boot/forth/menu.4th Mon Nov 12 18:38:54 2012 (r242923) @@ -342,6 +342,7 @@ create init_text8 255 allot \ sure that things move along smoothly, allocate \ a temporary NULL string + drop ( getenv cruft ) s" " then then From owner-svn-src-head@FreeBSD.ORG Mon Nov 12 19:53:56 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0034DCA2; Mon, 12 Nov 2012 19:53:55 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D9D968FC08; Mon, 12 Nov 2012 19:53:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qACJrtJo092155; Mon, 12 Nov 2012 19:53:55 GMT (envelope-from jeff@svn.freebsd.org) Received: (from jeff@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qACJrtQD092153; Mon, 12 Nov 2012 19:53:55 GMT (envelope-from jeff@svn.freebsd.org) Message-Id: <201211121953.qACJrtQD092153@svn.freebsd.org> From: Jeff Roberson Date: Mon, 12 Nov 2012 19:53:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242924 - head/sys/ufs/ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Nov 2012 19:53:56 -0000 Author: jeff Date: Mon Nov 12 19:53:55 2012 New Revision: 242924 URL: http://svnweb.freebsd.org/changeset/base/242924 Log: - Fix a bug that has existed since the original softdep implementation. When a background copy of a cg is written we complete any work associated with that bmsafemap. If new work has been added to the non-background copy of the buffer it will be completed before the next write happens. The solution is to do the rollbacks when we make the copy so only those dependencies that were present at the time of writing will be completed when the background write completes. This would've resulted in various bitmap related corruptions and panics. It also would've expired journal entries early causing journal replay to miss some records. MFC after: 2 weeks Modified: head/sys/ufs/ffs/ffs_softdep.c Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Mon Nov 12 18:38:54 2012 (r242923) +++ head/sys/ufs/ffs/ffs_softdep.c Mon Nov 12 19:53:55 2012 (r242924) @@ -977,7 +977,7 @@ static struct freework *newfreework(stru struct freework *, ufs_lbn_t, ufs2_daddr_t, int, int, int); static int jwait(struct worklist *, int); static struct inodedep *inodedep_lookup_ip(struct inode *); -static int bmsafemap_rollbacks(struct bmsafemap *); +static int bmsafemap_backgroundwrite(struct bmsafemap *, struct buf *); static struct freefile *handle_bufwait(struct inodedep *, struct workhead *); static void handle_jwork(struct workhead *); static struct mkdir *setup_newdir(struct diradd *, ino_t, ino_t, struct buf *, @@ -1795,7 +1795,7 @@ softdep_move_dependencies(oldbp, newbp) while ((wk = LIST_FIRST(&oldbp->b_dep)) != NULL) { LIST_REMOVE(wk, wk_list); if (wk->wk_type == D_BMSAFEMAP && - bmsafemap_rollbacks(WK_BMSAFEMAP(wk))) + bmsafemap_backgroundwrite(WK_BMSAFEMAP(wk), newbp)) dirty = 1; if (wktail == 0) LIST_INSERT_HEAD(&newbp->b_dep, wk, wk_list); @@ -5173,9 +5173,15 @@ jnewblk_merge(new, old, wkhd) return (new); /* Replace a jfreefrag with a jnewblk. */ if (new->wk_type == D_JFREEFRAG) { + if (WK_JNEWBLK(old)->jn_blkno != WK_JFREEFRAG(new)->fr_blkno) + panic("jnewblk_merge: blkno mismatch: %p, %p", + old, new); cancel_jfreefrag(WK_JFREEFRAG(new)); return (old); } + if (old->wk_type != D_JNEWBLK || new->wk_type != D_JNEWBLK) + panic("jnewblk_merge: Bad type: old %d new %d\n", + old->wk_type, new->wk_type); /* * Handle merging of two jnewblk records that describe * different sets of fragments in the same block. @@ -10504,7 +10510,7 @@ initiate_write_bmsafemap(bmsafemap, bp) ino_t ino; if (bmsafemap->sm_state & IOSTARTED) - panic("initiate_write_bmsafemap: Already started\n"); + return; bmsafemap->sm_state |= IOSTARTED; /* * Clear any inode allocations which are pending journal writes. @@ -10515,10 +10521,6 @@ initiate_write_bmsafemap(bmsafemap, bp) inosused = cg_inosused(cgp); LIST_FOREACH(jaddref, &bmsafemap->sm_jaddrefhd, ja_bmdeps) { ino = jaddref->ja_ino % fs->fs_ipg; - /* - * If this is a background copy the inode may not - * be marked used yet. - */ if (isset(inosused, ino)) { if ((jaddref->ja_mode & IFMT) == IFDIR) cgp->cg_cs.cs_ndir--; @@ -10527,7 +10529,7 @@ initiate_write_bmsafemap(bmsafemap, bp) jaddref->ja_state &= ~ATTACHED; jaddref->ja_state |= UNDONE; stat_jaddref++; - } else if ((bp->b_xflags & BX_BKGRDMARKER) == 0) + } else panic("initiate_write_bmsafemap: inode %ju " "marked free", (uintmax_t)jaddref->ja_ino); } @@ -10542,9 +10544,8 @@ initiate_write_bmsafemap(bmsafemap, bp) LIST_FOREACH(jnewblk, &bmsafemap->sm_jnewblkhd, jn_deps) { if (jnewblk_rollback(jnewblk, fs, cgp, blksfree)) continue; - if ((bp->b_xflags & BX_BKGRDMARKER) == 0) - panic("initiate_write_bmsafemap: block %jd " - "marked free", jnewblk->jn_blkno); + panic("initiate_write_bmsafemap: block %jd " + "marked free", jnewblk->jn_blkno); } } /* @@ -11279,12 +11280,24 @@ diradd_inode_written(dap, inodedep) * only be called with lk and the buf lock on the cg held. */ static int -bmsafemap_rollbacks(bmsafemap) +bmsafemap_backgroundwrite(bmsafemap, bp) struct bmsafemap *bmsafemap; + struct buf *bp; { + int dirty; - return (!LIST_EMPTY(&bmsafemap->sm_jaddrefhd) | - !LIST_EMPTY(&bmsafemap->sm_jnewblkhd)); + dirty = !LIST_EMPTY(&bmsafemap->sm_jaddrefhd) | + !LIST_EMPTY(&bmsafemap->sm_jnewblkhd); + /* + * If we're initiating a background write we need to process the + * rollbacks as they exist now, not as they exist when IO starts. + * No other consumers will look at the contents of the shadowed + * buf so this is safe to do here. + */ + if (bp->b_xflags & BX_BKGRDMARKER) + initiate_write_bmsafemap(bmsafemap, bp); + + return (dirty); } /* From owner-svn-src-head@FreeBSD.ORG Mon Nov 12 20:44:59 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C8DC99BA; Mon, 12 Nov 2012 20:44:59 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 939958FC0C; Mon, 12 Nov 2012 20:44:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qACKixUh001646; Mon, 12 Nov 2012 20:44:59 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qACKixDb001643; Mon, 12 Nov 2012 20:44:59 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201211122044.qACKixDb001643@svn.freebsd.org> From: Edwin Groothuis Date: Mon, 12 Nov 2012 20:44:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242927 - head/contrib/tzdata X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Nov 2012 20:44:59 -0000 Author: edwin Date: Mon Nov 12 20:44:59 2012 New Revision: 242927 URL: http://svnweb.freebsd.org/changeset/base/242927 Log: Merge of vendor import of 242925, tzdata2012i Update to tzdata2012i: - Cuba is changing back to Standard Time on 4 November 2012. Modified: head/contrib/tzdata/asia head/contrib/tzdata/northamerica Directory Properties: head/contrib/tzdata/ (props changed) Modified: head/contrib/tzdata/asia ============================================================================== --- head/contrib/tzdata/asia Mon Nov 12 20:42:08 2012 (r242926) +++ head/contrib/tzdata/asia Mon Nov 12 20:44:59 2012 (r242927) @@ -1204,7 +1204,7 @@ Rule Zion 2012 only - Sep 23 2:00 0 S # past, approved sending the proposed June 2011 changes to the Time # Decree Law back to the Knesset for second and third (final) votes # before the upcoming elections on Jan. 22, 2013. Hence, although the -# changes are not yet law, they are expected to be so before Februray 2013. +# changes are not yet law, they are expected to be so before February 2013. # # As of 2013, DST starts at 02:00 on the Friday before the last Sunday in March. # DST ends at 02:00 on the first Sunday after October 1, unless it occurs on the Modified: head/contrib/tzdata/northamerica ============================================================================== --- head/contrib/tzdata/northamerica Mon Nov 12 20:42:08 2012 (r242926) +++ head/contrib/tzdata/northamerica Mon Nov 12 20:44:59 2012 (r242927) @@ -2797,6 +2797,13 @@ Zone America/Costa_Rica -5:36:20 - LMT 1 # http://www.timeanddate.com/news/time/cuba-starts-dst-2012.html # +# From Steffen Thorsen (2012-11-03): +# Radio Reloj and many other sources report that Cuba is changing back +# to standard time on 2012-11-04: +# http://www.radioreloj.cu/index.php/noticias-radio-reloj/36-nacionales/9961-regira-horario-normal-en-cuba-desde-el-domingo-cuatro-de-noviembre +# From Paul Eggert (2012-11-03): +# For now, assume the future rule is first Sunday in November. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Cuba 1928 only - Jun 10 0:00 1:00 D Rule Cuba 1928 only - Oct 10 0:00 0 S @@ -2834,7 +2841,7 @@ Rule Cuba 2009 2010 - Mar Sun>=8 0:00s 1 Rule Cuba 2011 only - Mar Sun>=15 0:00s 1:00 D Rule Cuba 2011 only - Nov 13 0:00s 0 S Rule Cuba 2012 only - Apr 1 0:00s 1:00 D -Rule Cuba 2012 max - Oct lastSun 0:00s 0 S +Rule Cuba 2012 max - Nov Sun>=1 0:00s 0 S Rule Cuba 2013 max - Mar Sun>=8 0:00s 1:00 D # Zone NAME GMTOFF RULES FORMAT [UNTIL] From owner-svn-src-head@FreeBSD.ORG Mon Nov 12 20:50:12 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1CF94FCE; Mon, 12 Nov 2012 20:50:12 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 02D838FC08; Mon, 12 Nov 2012 20:50:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qACKoBYM002770; Mon, 12 Nov 2012 20:50:11 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qACKoBQX002769; Mon, 12 Nov 2012 20:50:11 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201211122050.qACKoBQX002769@svn.freebsd.org> From: Dimitry Andric Date: Mon, 12 Nov 2012 20:50:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242931 - head/sys/i386/xen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Nov 2012 20:50:12 -0000 Author: dim Date: Mon Nov 12 20:50:11 2012 New Revision: 242931 URL: http://svnweb.freebsd.org/changeset/base/242931 Log: Fix a minor warning in sys/i386/xen/clock.c. MFC after: 3 days Modified: head/sys/i386/xen/clock.c Modified: head/sys/i386/xen/clock.c ============================================================================== --- head/sys/i386/xen/clock.c Mon Nov 12 20:48:52 2012 (r242930) +++ head/sys/i386/xen/clock.c Mon Nov 12 20:50:11 2012 (r242931) @@ -516,7 +516,7 @@ startrtclock() __cpu_khz = 1000000ULL << 32; info = &HYPERVISOR_shared_info->vcpu_info[0].time; - do_div(__cpu_khz, info->tsc_to_system_mul); + (void)do_div(__cpu_khz, info->tsc_to_system_mul); if ( info->tsc_shift < 0 ) cpu_khz = __cpu_khz << -info->tsc_shift; else From owner-svn-src-head@FreeBSD.ORG Mon Nov 12 22:01:30 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 676024E1; Mon, 12 Nov 2012 22:01:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 428F68FC0C; Mon, 12 Nov 2012 22:01:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qACM1USo015465; Mon, 12 Nov 2012 22:01:30 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qACM1T1u015459; Mon, 12 Nov 2012 22:01:29 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201211122201.qACM1T1u015459@svn.freebsd.org> From: Dimitry Andric Date: Mon, 12 Nov 2012 22:01:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242933 - in head/sys: conf modules/mthca ofed/drivers/infiniband/core ofed/drivers/infiniband/ulp/sdp ofed/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Nov 2012 22:01:30 -0000 Author: dim Date: Mon Nov 12 22:01:29 2012 New Revision: 242933 URL: http://svnweb.freebsd.org/changeset/base/242933 Log: Redo r242842, now actually fixing the warnings, as follows: - In sys/ofed/drivers/infiniband/core/cma.c, an enum struct member is interpreted as an int, so cast it to an int. - In sys/ofed/drivers/infiniband/core/ud_header.c, initialize the packet_length variable in ib_ud_header_init(), to prevent undefined behaviour. - In sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c, call rdma_notify() with the correct enum type and value. - In sys/ofed/include/linux/pci.h, change the PCI_DEVICE and PCI_VDEVICE macros to use C99 struct initializers, so additional members can be overridden. Reviewed by: delphij, Garrett Cooper MFC after: 1 week Modified: head/sys/conf/kern.pre.mk head/sys/modules/mthca/Makefile head/sys/ofed/drivers/infiniband/core/cma.c head/sys/ofed/drivers/infiniband/core/ud_header.c head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c head/sys/ofed/include/linux/pci.h Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Mon Nov 12 20:50:15 2012 (r242932) +++ head/sys/conf/kern.pre.mk Mon Nov 12 22:01:29 2012 (r242933) @@ -156,7 +156,7 @@ NORMAL_LINT= ${LINT} ${LINTFLAGS} ${CFLA # Infiniband C flags. Correct include paths and omit errors that linux # does not honor. OFEDINCLUDES= -I$S/ofed/include/ -OFEDNOERR= -Wno-cast-qual -Wno-pointer-arith -fms-extensions -Wno-switch -Wno-sometimes-uninitialized -Wno-conversion -Wno-initializer-overrides +OFEDNOERR= -Wno-cast-qual -Wno-pointer-arith -fms-extensions OFEDCFLAGS= ${CFLAGS:N-I*} ${OFEDINCLUDES} ${CFLAGS:M-I*} ${OFEDNOERR} OFED_C_NOIMP= ${CC} -c -o ${.TARGET} ${OFEDCFLAGS} ${WERROR} ${PROF} OFED_C= ${OFED_C_NOIMP} ${.IMPSRC} Modified: head/sys/modules/mthca/Makefile ============================================================================== --- head/sys/modules/mthca/Makefile Mon Nov 12 20:50:15 2012 (r242932) +++ head/sys/modules/mthca/Makefile Mon Nov 12 22:01:29 2012 (r242933) @@ -28,4 +28,4 @@ opt_inet6.h: .include -CFLAGS+= -Wno-cast-qual -Wno-pointer-arith -fms-extensions -Wno-switch -Wno-sometimes-uninitialized -Wno-conversion -Wno-initializer-overrides +CFLAGS+= -Wno-cast-qual -Wno-pointer-arith -fms-extensions Modified: head/sys/ofed/drivers/infiniband/core/cma.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/cma.c Mon Nov 12 20:50:15 2012 (r242932) +++ head/sys/ofed/drivers/infiniband/core/cma.c Mon Nov 12 22:01:29 2012 (r242933) @@ -1312,7 +1312,7 @@ static int cma_iw_handler(struct iw_cm_i *sin = iw_event->local_addr; sin = (struct sockaddr_in *) &id_priv->id.route.addr.dst_addr; *sin = iw_event->remote_addr; - switch (iw_event->status) { + switch ((int)iw_event->status) { case 0: event.event = RDMA_CM_EVENT_ESTABLISHED; break; Modified: head/sys/ofed/drivers/infiniband/core/ud_header.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ud_header.c Mon Nov 12 20:50:15 2012 (r242932) +++ head/sys/ofed/drivers/infiniband/core/ud_header.c Mon Nov 12 22:01:29 2012 (r242933) @@ -230,7 +230,7 @@ void ib_ud_header_init(int pay int immediate_present, struct ib_ud_header *header) { - u16 packet_length; + u16 packet_length = 0; memset(header, 0, sizeof *header); Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c Mon Nov 12 20:50:15 2012 (r242932) +++ head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c Mon Nov 12 22:01:29 2012 (r242933) @@ -590,7 +590,7 @@ sdp_rx_comp_work(struct work_struct *wor if (unlikely(!ssk->poll_cq)) { struct rdma_cm_id *id = ssk->id; if (id && id->qp) - rdma_notify(id, RDMA_CM_EVENT_ESTABLISHED); + rdma_notify(id, IB_EVENT_COMM_EST); goto out; } Modified: head/sys/ofed/include/linux/pci.h ============================================================================== --- head/sys/ofed/include/linux/pci.h Mon Nov 12 20:50:15 2012 (r242932) +++ head/sys/ofed/include/linux/pci.h Mon Nov 12 22:01:29 2012 (r242933) @@ -73,10 +73,12 @@ struct pci_device_id { #define PCI_DEVICE_ID_MELLANOX_SINAI 0x6274 -#define PCI_VDEVICE(vendor, device) \ - PCI_VENDOR_ID_##vendor, (device), PCI_ANY_ID, PCI_ANY_ID, 0, 0 -#define PCI_DEVICE(vendor, device) \ - (vendor), (device), PCI_ANY_ID, PCI_ANY_ID, 0, 0 +#define PCI_VDEVICE(_vendor, _device) \ + .vendor = PCI_VENDOR_ID_##_vendor, .device = (_device), \ + .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID +#define PCI_DEVICE(_vendor, _device) \ + .vendor = (_vendor), .device = (_device), \ + .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID #define to_pci_dev(n) container_of(n, struct pci_dev, dev) From owner-svn-src-head@FreeBSD.ORG Mon Nov 12 22:28:32 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9B848C7C; Mon, 12 Nov 2012 22:28:32 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7F7BB8FC16; Mon, 12 Nov 2012 22:28:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qACMSW3q020518; Mon, 12 Nov 2012 22:28:32 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qACMSWbs020517; Mon, 12 Nov 2012 22:28:32 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201211122228.qACMSWbs020517@svn.freebsd.org> From: Dimitry Andric Date: Mon, 12 Nov 2012 22:28:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242934 - head/sys/dev/xen/netback X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Nov 2012 22:28:32 -0000 Author: dim Date: Mon Nov 12 22:28:32 2012 New Revision: 242934 URL: http://svnweb.freebsd.org/changeset/base/242934 Log: Redo r242889, now using the method from projects/amd64_xen_pv r240747. Reminded by: kib MFC after: 3 days Modified: head/sys/dev/xen/netback/netback_unit_tests.c Modified: head/sys/dev/xen/netback/netback_unit_tests.c ============================================================================== --- head/sys/dev/xen/netback/netback_unit_tests.c Mon Nov 12 22:01:29 2012 (r242933) +++ head/sys/dev/xen/netback/netback_unit_tests.c Mon Nov 12 22:28:32 2012 (r242934) @@ -58,11 +58,11 @@ __FBSDID("$FreeBSD$"); #define TOSTRING(x) STRINGIFY(x) /** - * Writes an error message to buffer if cond is false, and returns true - * iff the assertion failed. Note the implied parameters buffer and + * Writes an error message to buffer if cond is false + * Note the implied parameters buffer and * buflen */ -#define XNB_ASSERT(cond) do { \ +#define XNB_ASSERT(cond) ({ \ int passed = (cond); \ char *_buffer = (buffer); \ size_t _buflen = (buflen); \ @@ -71,7 +71,7 @@ __FBSDID("$FreeBSD$"); strlcat(_buffer, ":" TOSTRING(__LINE__) \ " Assertion Error: " #cond "\n", _buflen); \ } \ - } while (0) + }) /** From owner-svn-src-head@FreeBSD.ORG Mon Nov 12 22:38:54 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C303DF9B; Mon, 12 Nov 2012 22:38:54 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A7FC48FC12; Mon, 12 Nov 2012 22:38:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qACMcsQ6022231; Mon, 12 Nov 2012 22:38:54 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qACMcsbd022228; Mon, 12 Nov 2012 22:38:54 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201211122238.qACMcsbd022228@svn.freebsd.org> From: Neel Natu Date: Mon, 12 Nov 2012 22:38:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242935 - in head/sys/boot/userboot: . test userboot X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Nov 2012 22:38:54 -0000 Author: neel Date: Mon Nov 12 22:38:54 2012 New Revision: 242935 URL: http://svnweb.freebsd.org/changeset/base/242935 Log: Add a callback function to userboot.so to fetch a list of environment variables and pass them to the kernel. Reviewed by: dfr Modified: head/sys/boot/userboot/test/test.c head/sys/boot/userboot/userboot.h head/sys/boot/userboot/userboot/main.c Modified: head/sys/boot/userboot/test/test.c ============================================================================== --- head/sys/boot/userboot/test/test.c Mon Nov 12 22:28:32 2012 (r242934) +++ head/sys/boot/userboot/test/test.c Mon Nov 12 22:38:54 2012 (r242935) @@ -364,6 +364,18 @@ test_getmem(void *arg, uint64_t *lowmem, *highmem = 0; } +const char * +test_getenv(void *arg, int idx) +{ + static const char *vars[] = { + "foo=bar", + "bar=barbar", + NULL + }; + + return (vars[idx]); +} + struct loader_callbacks cb = { .putc = test_putc, .getc = test_getc, @@ -391,6 +403,8 @@ struct loader_callbacks cb = { .delay = test_delay, .exit = test_exit, .getmem = test_getmem, + + .getenv = test_getenv, }; void @@ -450,5 +464,5 @@ main(int argc, char** argv) term.c_lflag &= ~(ICANON|ECHO); tcsetattr(0, TCSAFLUSH, &term); - func(&cb, NULL, USERBOOT_VERSION_2, disk_fd >= 0); + func(&cb, NULL, USERBOOT_VERSION_3, disk_fd >= 0); } Modified: head/sys/boot/userboot/userboot.h ============================================================================== --- head/sys/boot/userboot/userboot.h Mon Nov 12 22:28:32 2012 (r242934) +++ head/sys/boot/userboot/userboot.h Mon Nov 12 22:38:54 2012 (r242935) @@ -31,6 +31,7 @@ */ #define USERBOOT_VERSION_1 1 #define USERBOOT_VERSION_2 2 +#define USERBOOT_VERSION_3 3 /* * Exit codes from the loader @@ -176,9 +177,22 @@ struct loader_callbacks { */ void (*getmem)(void *arg, uint64_t *lowmem, uint64_t *highmem); + /* * ioctl interface to the disk device */ int (*diskioctl)(void *arg, int unit, u_long cmd, void *data); + + /* + * Returns an environment variable in the form "name=value". + * + * If there are no more variables that need to be set in the + * loader environment then return NULL. + * + * 'num' is used as a handle for the callback to identify which + * environment variable to return next. It will begin at 0 and + * each invocation will add 1 to the previous value of 'num'. + */ + const char * (*getenv)(void *arg, int num); }; Modified: head/sys/boot/userboot/userboot/main.c ============================================================================== --- head/sys/boot/userboot/userboot/main.c Mon Nov 12 22:28:32 2012 (r242934) +++ head/sys/boot/userboot/userboot/main.c Mon Nov 12 22:38:54 2012 (r242935) @@ -36,7 +36,7 @@ __FBSDID("$FreeBSD$"); #include "disk.h" #include "libuserboot.h" -#define USERBOOT_VERSION USERBOOT_VERSION_2 +#define USERBOOT_VERSION USERBOOT_VERSION_3 struct loader_callbacks *callbacks; void *callbacks_arg; @@ -70,6 +70,7 @@ void loader_main(struct loader_callbacks *cb, void *arg, int version, int ndisks) { static char malloc[512*1024]; + const char *var; int i; if (version != USERBOOT_VERSION) @@ -107,6 +108,17 @@ loader_main(struct loader_callbacks *cb, setenv("LINES", "24", 1); /* optional */ + /* + * Set custom environment variables + */ + i = 0; + while (1) { + var = CALLBACK(getenv, i++); + if (var == NULL) + break; + putenv(var); + } + archsw.arch_autoload = userboot_autoload; archsw.arch_getdev = userboot_getdev; archsw.arch_copyin = userboot_copyin; From owner-svn-src-head@FreeBSD.ORG Mon Nov 12 22:57:05 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 174EE6D8; Mon, 12 Nov 2012 22:57:05 +0000 (UTC) (envelope-from minimarmot@gmail.com) Received: from mail-da0-f54.google.com (mail-da0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id C58A08FC17; Mon, 12 Nov 2012 22:57:04 +0000 (UTC) Received: by mail-da0-f54.google.com with SMTP id z9so3057521dad.13 for ; Mon, 12 Nov 2012 14:57:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=QbaOhZ0TCNO7OGleR+Y5rntS8UYP06Vp27bif2NCEjg=; b=gB0T0wYhHUuucFydtP2KOu4JTzksY5d3wr9AIKByF53F9RXc+Lm1JQUnMQO269N46C NM+RspC1Nas8etULQkZhorz90nQPZTiQPt7oKVtRtLlc6rfU8tVZc8uWxcb2AYGFoXKo C9BYUHnCQ0BHGOOpSLFijYsaRhal5efXHG8RRM5gedhKE5tO+G+ZMkt7V8lVHR7T6Exy YNXxPesORDsovfhEXgEnohTNvQQlvO/GVPDbIqJOrZtEf/FyfwuEZvfqWx74PmAlzCkX P0NdfndMnbG3gjriDfG83pWxGFl2eV7ly3HfHgsOQb501zjYCCJL97M67go/lU+J6wFU RyWQ== MIME-Version: 1.0 Received: by 10.68.197.101 with SMTP id it5mr62504989pbc.91.1352761024288; Mon, 12 Nov 2012 14:57:04 -0800 (PST) Received: by 10.66.148.227 with HTTP; Mon, 12 Nov 2012 14:57:04 -0800 (PST) In-Reply-To: <201211122228.qACMSWbs020517@svn.freebsd.org> References: <201211122228.qACMSWbs020517@svn.freebsd.org> Date: Mon, 12 Nov 2012 17:57:04 -0500 Message-ID: Subject: Re: svn commit: r242934 - head/sys/dev/xen/netback From: Ben Kaduk To: Dimitry Andric Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Nov 2012 22:57:05 -0000 On Mon, Nov 12, 2012 at 5:28 PM, Dimitry Andric wrote: > Author: dim > Date: Mon Nov 12 22:28:32 2012 > New Revision: 242934 > URL: http://svnweb.freebsd.org/changeset/base/242934 > > Log: > Redo r242889, now using the method from projects/amd64_xen_pv r240747. > > Reminded by: kib > MFC after: 3 days > > Modified: > head/sys/dev/xen/netback/netback_unit_tests.c > > Modified: head/sys/dev/xen/netback/netback_unit_tests.c > ============================================================================== > --- head/sys/dev/xen/netback/netback_unit_tests.c Mon Nov 12 22:01:29 2012 (r242933) > +++ head/sys/dev/xen/netback/netback_unit_tests.c Mon Nov 12 22:28:32 2012 (r242934) > @@ -58,11 +58,11 @@ __FBSDID("$FreeBSD$"); > #define TOSTRING(x) STRINGIFY(x) > > /** > - * Writes an error message to buffer if cond is false, and returns true > - * iff the assertion failed. Note the implied parameters buffer and > + * Writes an error message to buffer if cond is false > + * Note the implied parameters buffer and At risk of being Bruce, aren't comments like this supposed to be complete sentences and end with a full stop? -Ben Kaduk From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 00:29:07 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 664) id 97FEF2C6; Tue, 13 Nov 2012 00:29:07 +0000 (UTC) Date: Mon, 12 Nov 2012 16:29:07 -0800 From: David O'Brien To: Warner Losh Subject: Re: svn commit: r241933 - head/sys/conf Message-ID: <20121113002907.GA98994@dragon.NUXI.org> References: <201210231458.q9NEwPRd090442@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201210231458.q9NEwPRd090442@svn.freebsd.org> X-Operating-System: FreeBSD 10.0-CURRENT X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: obrien@freebsd.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 00:29:07 -0000 On Tue, Oct 23, 2012 at 02:58:25PM +0000, Warner Losh wrote: > Log: > Start a clean-room implementation of files.mips. This is sufficient > for SWARM64 and SWARM64_SMP to compile. Other kernels will be layered > in. > Modified: > head/sys/conf/files.mips ... > -# Copyright (c) 2001, 2004-2005, Juniper Networks, Inc. > -# All rights reserved. > -# JNPR: files.mips,v 1.11 2007/08/09 12:25:35 katta Hi Warner, What is the purpose of this? $ diff -Bbw files.mips.r241680,sorted files.mips.r241933,sorted | egrep -v '^(\+|-|@@)' | wc -l 43 So some of the content did "filter through" the clean room. Who did the "clean-room" implementation? If you, is it really a clean-room reimplementation? You're so familiar with this file are you really able to do such a thing? -- -- David (obrien@FreeBSD.org) From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 00:47:13 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 664) id 82217504; Tue, 13 Nov 2012 00:47:13 +0000 (UTC) Date: Mon, 12 Nov 2012 16:47:13 -0800 From: David O'Brien To: Warner Losh Subject: Re: svn commit: r241933 - head/sys/conf Message-ID: <20121113004712.GA99118@dragon.NUXI.org> References: <201210231458.q9NEwPRd090442@svn.freebsd.org> <20121113002907.GA98994@dragon.NUXI.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20121113002907.GA98994@dragon.NUXI.org> X-Operating-System: FreeBSD 10.0-CURRENT X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: obrien@freebsd.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 00:47:13 -0000 On Mon, Nov 12, 2012 at 04:29:07PM -0800, David O'Brien (@FreeBSD) wrote: > $ diff -Bbw files.mips.r241680,sorted files.mips.r241933,sorted | egrep -v '^(\+|-|@@)' | wc -l > 43 Sorry, should have better ensured all input lines appeared in the output. $ diff -u999 -Bbw files.mips.r241680,sorted files.mips.r241933,sorted | egrep -v '^(\+|-|@@)' | wc -l 61 Using your immediate r241936 follow on commit: $ diff -u999 -Bbw files.mips.r241680,sorted files.mips.r241936,sorted | egrep -v '^(\+|-|@@)' | wc -l 68 And by end of the day (r242031, all your commits to this file on the 23rd): $ diff -u999 -Bbw files.mips.r241680,sorted files.mips.r241986,sorted | egrep -v '^(\+|-|@@)' | wc -l 84 -- -- David (obrien@FreeBSD.org) From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 00:54:57 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2E0B5888; Tue, 13 Nov 2012 00:54:57 +0000 (UTC) (envelope-from minimarmot@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id D93988FC08; Tue, 13 Nov 2012 00:54:56 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id wz17so3217344pbc.13 for ; Mon, 12 Nov 2012 16:54:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=YKC2Odiuc8AohQjX0ohdjN220M99a1ADT/cVDxD5LeY=; b=y7FALzRrnZy+XmhLaW+Q/HxH8OfHO8hJvmXoucQ6bdlhlDJrBBf6XGmzU5sY6N/c4d rik6f0AmLyvxIyiz8KmE/oXApnw1CutsivGZIL86A/gfl4w+d3EwOhNqnAZ+ULKh4P2R 05lKwAuTeB5R326szGzK1kszQp6GeLgMyen6BFAnHV9vTs4k2pL3xgoWbsLRs7q0vT2+ JXduq/1nDrKdGFBxCVRSWRzVXK4/EudsQHNvCgk3nGTqmdQKr4pAUmnp95OTyRSfjqzy 86MD6HHxQlfFgh+IvdI00M/6YNTwbFZEymWWixJQu5RpGzUjeXEsxzDiZ1ezCDHEBsfy ROEg== MIME-Version: 1.0 Received: by 10.66.87.105 with SMTP id w9mr59977373paz.5.1352768096267; Mon, 12 Nov 2012 16:54:56 -0800 (PST) Received: by 10.66.148.227 with HTTP; Mon, 12 Nov 2012 16:54:56 -0800 (PST) In-Reply-To: <20121113004712.GA99118@dragon.NUXI.org> References: <201210231458.q9NEwPRd090442@svn.freebsd.org> <20121113002907.GA98994@dragon.NUXI.org> <20121113004712.GA99118@dragon.NUXI.org> Date: Mon, 12 Nov 2012 19:54:56 -0500 Message-ID: Subject: Re: svn commit: r241933 - head/sys/conf From: Ben Kaduk To: obrien@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 00:54:57 -0000 On Mon, Nov 12, 2012 at 7:47 PM, David O'Brien wrote: > On Mon, Nov 12, 2012 at 04:29:07PM -0800, David O'Brien (@FreeBSD) wrote: >> $ diff -Bbw files.mips.r241680,sorted files.mips.r241933,sorted | egrep -v '^(\+|-|@@)' | wc -l >> 43 > > Sorry, should have better ensured all input lines appeared in the output. > > $ diff -u999 -Bbw files.mips.r241680,sorted files.mips.r241933,sorted | egrep -v '^(\+|-|@@)' | wc -l > 61 > > Using your immediate r241936 follow on commit: > $ diff -u999 -Bbw files.mips.r241680,sorted files.mips.r241936,sorted | egrep -v '^(\+|-|@@)' | wc -l > 68 > > And by end of the day (r242031, all your commits to this file on the 23rd): > $ diff -u999 -Bbw files.mips.r241680,sorted files.mips.r241986,sorted | egrep -v '^(\+|-|@@)' | wc -l My reading was that the idea was to start from scratch with a files.mips and get one that works for all configurations, instead of having a balkanized regime where each board (or nearly so) had its own files file. I don't see that there's a way for the traditional meaning of "clean room" for licensing concerns to apply here. -Ben From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 01:21:18 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5449AD5E; Tue, 13 Nov 2012 01:21:18 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 36EEB8FC08; Tue, 13 Nov 2012 01:21:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAD1LIUG052784; Tue, 13 Nov 2012 01:21:18 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAD1LHGn052773; Tue, 13 Nov 2012 01:21:17 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201211130121.qAD1LHGn052773@svn.freebsd.org> From: Ed Maste Date: Tue, 13 Nov 2012 01:21:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242936 - head/contrib/gdb/gdb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 01:21:18 -0000 Author: emaste Date: Tue Nov 13 01:21:17 2012 New Revision: 242936 URL: http://svnweb.freebsd.org/changeset/base/242936 Log: Set optimized_out instead of reporting an error. This provides a better display when debugging code compiled with optimization on. GDB git revision e8395b4efd184f745070afb953f451f99e922be7 (prior to GDB's switch to GPLv3), modified for the interfaces provided by GDB 6.1.1. 2005-02-28 Daniel Jacobowitz * dwarf2loc.c (loclist_read_variable): Set optimized_out instead of reporting an error. * valprint.c (value_check_printable): New function. (common_val_print): New function. Use value_check_printable. (value_print): Use value_check_printable. * value.h (common_val_print): Add prototype. * c-valprint.c (c_val_print): Use common_val_print. * cp-valprint.c (cp_print_value_fields): Likewise. (cp_print_hpacc_virtual_table_entries): Likewise. * f-valprint.c (f_val_print): Likewise. * jv-valprint.c (java_value_print, java_print_value_fields): Likewise. * scm-valprint.c (scm_value_print): Likewise. * stack.c (print_frame_args): Likewise. * varobj.c (c_value_of_variable): Likewise. * p-valprint.c (pascal_val_print, pascal_value_print): Likewise. (pascal_object_print_value_fields): Likewise. Update call to pascal_object_print_static_field. (pascal_object_print_static_field): Remove TYPE argument. Use common_val_print. Sponsored by: ADARA Networks MFC after: 1 month Modified: head/contrib/gdb/gdb/c-valprint.c head/contrib/gdb/gdb/cp-valprint.c head/contrib/gdb/gdb/dwarf2loc.c head/contrib/gdb/gdb/f-valprint.c head/contrib/gdb/gdb/jv-valprint.c head/contrib/gdb/gdb/p-valprint.c head/contrib/gdb/gdb/scm-valprint.c head/contrib/gdb/gdb/stack.c head/contrib/gdb/gdb/valprint.c head/contrib/gdb/gdb/value.h head/contrib/gdb/gdb/varobj.c Modified: head/contrib/gdb/gdb/c-valprint.c ============================================================================== --- head/contrib/gdb/gdb/c-valprint.c Mon Nov 12 22:38:54 2012 (r242935) +++ head/contrib/gdb/gdb/c-valprint.c Tue Nov 13 01:21:17 2012 (r242936) @@ -232,9 +232,8 @@ c_val_print (struct type *type, char *va wtype = TYPE_TARGET_TYPE (type); } vt_val = value_at (wtype, vt_address, NULL); - val_print (VALUE_TYPE (vt_val), VALUE_CONTENTS (vt_val), 0, - VALUE_ADDRESS (vt_val), stream, format, - deref_ref, recurse + 1, pretty); + common_val_print (vt_val, stream, format, + deref_ref, recurse + 1, pretty); if (pretty) { fprintf_filtered (stream, "\n"); @@ -283,15 +282,8 @@ c_val_print (struct type *type, char *va unpack_pointer (lookup_pointer_type (builtin_type_void), valaddr + embedded_offset), NULL); - val_print (VALUE_TYPE (deref_val), - VALUE_CONTENTS (deref_val), - 0, - VALUE_ADDRESS (deref_val), - stream, - format, - deref_ref, - recurse, - pretty); + common_val_print (deref_val, stream, format, deref_ref, + recurse, pretty); } else fputs_filtered ("???", stream); Modified: head/contrib/gdb/gdb/cp-valprint.c ============================================================================== --- head/contrib/gdb/gdb/cp-valprint.c Mon Nov 12 22:38:54 2012 (r242935) +++ head/contrib/gdb/gdb/cp-valprint.c Tue Nov 13 01:21:17 2012 (r242936) @@ -361,8 +361,7 @@ cp_print_value_fields (struct type *type (TYPE_FIELD_TYPE (type, i), unpack_field_as_long (type, valaddr + offset, i)); - val_print (TYPE_FIELD_TYPE (type, i), VALUE_CONTENTS (v), - 0, 0, stream, format, 0, recurse + 1, pretty); + common_val_print (v, stream, format, 0, recurse + 1, pretty); } } else @@ -426,8 +425,7 @@ cp_print_value_fields (struct type *type v = value_from_pointer (lookup_pointer_type (builtin_type_unsigned_long), *(unsigned long *) (valaddr + offset)); - val_print (VALUE_TYPE (v), VALUE_CONTENTS (v), 0, 0, - stream, format, 0, recurse + 1, pretty); + common_val_print (v, stream, format, 0, recurse + 1, pretty); fields_seen = 1; if (vtblprint) @@ -791,8 +789,7 @@ cp_print_hpacc_virtual_table_entries (st VALUE_TYPE (vf) = VALUE_TYPE (v); /* make it a pointer */ /* print out the entry */ - val_print (VALUE_TYPE (vf), VALUE_CONTENTS (vf), 0, 0, - stream, format, 0, recurse + 1, pretty); + common_val_print (vf, stream, format, 0, recurse + 1, pretty); field_physname = TYPE_FN_FIELD_PHYSNAME (TYPE_FN_FIELDLIST1 (type, fn), oi); /* pai: (temp) FIXME Maybe this should be DMGL_ANSI */ Modified: head/contrib/gdb/gdb/dwarf2loc.c ============================================================================== --- head/contrib/gdb/gdb/dwarf2loc.c Mon Nov 12 22:38:54 2012 (r242935) +++ head/contrib/gdb/gdb/dwarf2loc.c Tue Nov 13 01:21:17 2012 (r242936) @@ -492,9 +492,14 @@ loclist_read_variable (struct symbol *sy data = find_location_expression (dlbaton, &size, frame ? get_frame_pc (frame) : 0); if (data == NULL) - error ("Variable \"%s\" is not available.", SYMBOL_NATURAL_NAME (symbol)); - - val = dwarf2_evaluate_loc_desc (symbol, frame, data, size, dlbaton->objfile); + { + val = allocate_value (SYMBOL_TYPE (symbol)); + VALUE_LVAL (val) = not_lval; + VALUE_OPTIMIZED_OUT (val) = 1; + } + else + val = dwarf2_evaluate_loc_desc (symbol, frame, data, size, + dlbaton->objfile); return val; } Modified: head/contrib/gdb/gdb/f-valprint.c ============================================================================== --- head/contrib/gdb/gdb/f-valprint.c Mon Nov 12 22:38:54 2012 (r242935) +++ head/contrib/gdb/gdb/f-valprint.c Tue Nov 13 01:21:17 2012 (r242936) @@ -444,15 +444,8 @@ f_val_print (struct type *type, char *va unpack_pointer (lookup_pointer_type (builtin_type_void), valaddr + embedded_offset), NULL); - val_print (VALUE_TYPE (deref_val), - VALUE_CONTENTS (deref_val), - 0, - VALUE_ADDRESS (deref_val), - stream, - format, - deref_ref, - recurse, - pretty); + common_val_print (deref_val, stream, format, deref_ref, recurse, + pretty); } else fputs_filtered ("???", stream); Modified: head/contrib/gdb/gdb/jv-valprint.c ============================================================================== --- head/contrib/gdb/gdb/jv-valprint.c Mon Nov 12 22:38:54 2012 (r242935) +++ head/contrib/gdb/gdb/jv-valprint.c Tue Nov 13 01:21:17 2012 (r242936) @@ -189,8 +189,7 @@ java_value_print (struct value *val, str else fprintf_filtered (stream, "%d..%d: ", i, i + reps - 1); - val_print (VALUE_TYPE (v), VALUE_CONTENTS (v), 0, 0, - stream, format, 2, 1, pretty); + common_val_print (v, stream, format, 2, 1, pretty); things_printed++; i += reps; @@ -242,8 +241,7 @@ java_value_print (struct value *val, str return 0; } - return (val_print (type, VALUE_CONTENTS (val), 0, address, - stream, format, 1, 0, pretty)); + return common_val_print (val, stream, format, 1, 0, pretty); } /* TYPE, VALADDR, ADDRESS, STREAM, RECURSE, and PRETTY have the @@ -391,8 +389,7 @@ java_print_value_fields (struct type *ty v = value_from_longest (TYPE_FIELD_TYPE (type, i), unpack_field_as_long (type, valaddr, i)); - val_print (TYPE_FIELD_TYPE (type, i), VALUE_CONTENTS (v), 0, - 0, stream, format, 0, recurse + 1, pretty); + common_val_print (v, stream, format, 0, recurse + 1, pretty); } } else @@ -411,9 +408,8 @@ java_print_value_fields (struct type *ty struct type *t = check_typedef (VALUE_TYPE (v)); if (TYPE_CODE (t) == TYPE_CODE_STRUCT) v = value_addr (v); - val_print (VALUE_TYPE (v), - VALUE_CONTENTS (v), 0, VALUE_ADDRESS (v), - stream, format, 0, recurse + 1, pretty); + common_val_print (v, stream, format, 0, recurse + 1, + pretty); } } else if (TYPE_FIELD_TYPE (type, i) == NULL) Modified: head/contrib/gdb/gdb/p-valprint.c ============================================================================== --- head/contrib/gdb/gdb/p-valprint.c Mon Nov 12 22:38:54 2012 (r242935) +++ head/contrib/gdb/gdb/p-valprint.c Tue Nov 13 01:21:17 2012 (r242936) @@ -238,9 +238,8 @@ pascal_val_print (struct type *type, cha wtype = TYPE_TARGET_TYPE (type); } vt_val = value_at (wtype, vt_address, NULL); - val_print (VALUE_TYPE (vt_val), VALUE_CONTENTS (vt_val), 0, - VALUE_ADDRESS (vt_val), stream, format, - deref_ref, recurse + 1, pretty); + common_val_print (vt_val, stream, format, deref_ref, + recurse + 1, pretty); if (pretty) { fprintf_filtered (stream, "\n"); @@ -291,10 +290,8 @@ pascal_val_print (struct type *type, cha unpack_pointer (lookup_pointer_type (builtin_type_void), valaddr + embedded_offset), NULL); - val_print (VALUE_TYPE (deref_val), - VALUE_CONTENTS (deref_val), 0, - VALUE_ADDRESS (deref_val), stream, format, - deref_ref, recurse + 1, pretty); + common_val_print (deref_val, stream, format, deref_ref, + recurse + 1, pretty); } else fputs_filtered ("???", stream); @@ -565,9 +562,7 @@ pascal_value_print (struct value *val, s fprintf_filtered (stream, ") "); } } - return val_print (type, VALUE_CONTENTS (val), VALUE_EMBEDDED_OFFSET (val), - VALUE_ADDRESS (val) + VALUE_OFFSET (val), - stream, format, 1, 0, pretty); + return common_val_print (val, stream, format, 1, 0, pretty); } @@ -583,7 +578,7 @@ static int pascal_static_field_print; /* static struct obstack dont_print_vb_obstack; static struct obstack dont_print_statmem_obstack; -static void pascal_object_print_static_field (struct type *, struct value *, +static void pascal_object_print_static_field (struct value *, struct ui_file *, int, int, enum val_prettyprint); @@ -844,8 +839,7 @@ pascal_object_print_value_fields (struct v = value_from_longest (TYPE_FIELD_TYPE (type, i), unpack_field_as_long (type, valaddr, i)); - val_print (TYPE_FIELD_TYPE (type, i), VALUE_CONTENTS (v), 0, 0, - stream, format, 0, recurse + 1, pretty); + common_val_print (v, stream, format, 0, recurse + 1, pretty); } } else @@ -864,9 +858,8 @@ pascal_object_print_value_fields (struct if (v == NULL) fputs_filtered ("", stream); else - pascal_object_print_static_field (TYPE_FIELD_TYPE (type, i), v, - stream, format, recurse + 1, - pretty); + pascal_object_print_static_field (v, stream, format, + recurse + 1, pretty); } else { @@ -1005,14 +998,16 @@ pascal_object_print_value (struct type * static member classes in an obstack and refuse to print them more than once. - VAL contains the value to print, TYPE, STREAM, RECURSE, and PRETTY + VAL contains the value to print, STREAM, RECURSE, and PRETTY have the same meanings as in c_val_print. */ static void -pascal_object_print_static_field (struct type *type, struct value *val, +pascal_object_print_static_field (struct value *val, struct ui_file *stream, int format, int recurse, enum val_prettyprint pretty) { + struct type *type = VALUE_TYPE (val); + if (TYPE_CODE (type) == TYPE_CODE_STRUCT) { CORE_ADDR *first_dont_print; @@ -1041,8 +1036,7 @@ pascal_object_print_static_field (struct stream, format, recurse, pretty, NULL, 1); return; } - val_print (type, VALUE_CONTENTS (val), 0, VALUE_ADDRESS (val), - stream, format, 0, recurse, pretty); + common_val_print (val, stream, format, 0, recurse, pretty); } void Modified: head/contrib/gdb/gdb/scm-valprint.c ============================================================================== --- head/contrib/gdb/gdb/scm-valprint.c Mon Nov 12 22:38:54 2012 (r242935) +++ head/contrib/gdb/gdb/scm-valprint.c Tue Nov 13 01:21:17 2012 (r242936) @@ -390,6 +390,5 @@ int scm_value_print (struct value *val, struct ui_file *stream, int format, enum val_prettyprint pretty) { - return (val_print (VALUE_TYPE (val), VALUE_CONTENTS (val), 0, - VALUE_ADDRESS (val), stream, format, 1, 0, pretty)); + return (common_val_print (val, stream, format, 1, 0, pretty)); } Modified: head/contrib/gdb/gdb/stack.c ============================================================================== --- head/contrib/gdb/gdb/stack.c Mon Nov 12 22:38:54 2012 (r242935) +++ head/contrib/gdb/gdb/stack.c Tue Nov 13 01:21:17 2012 (r242936) @@ -354,9 +354,7 @@ print_frame_args (struct symbol *func, s if (val) { - val_print (VALUE_TYPE (val), VALUE_CONTENTS (val), 0, - VALUE_ADDRESS (val), - stb->stream, 0, 0, 2, Val_no_prettyprint); + common_val_print (val, stb->stream, 0, 0, 2, Val_no_prettyprint); ui_out_field_stream (uiout, "value", stb); } else Modified: head/contrib/gdb/gdb/valprint.c ============================================================================== --- head/contrib/gdb/gdb/valprint.c Mon Nov 12 22:38:54 2012 (r242935) +++ head/contrib/gdb/gdb/valprint.c Tue Nov 13 01:21:17 2012 (r242936) @@ -150,25 +150,66 @@ val_print (struct type *type, char *vala stream, format, deref_ref, recurse, pretty)); } -/* Print the value VAL in C-ish syntax on stream STREAM. - FORMAT is a format-letter, or 0 for print in natural format of data type. - If the object printed is a string pointer, returns - the number of string bytes printed. */ +/* Check whether the value VAL is printable. Return 1 if it is; + return 0 and print an appropriate error message to STREAM if it + is not. */ -int -value_print (struct value *val, struct ui_file *stream, int format, - enum val_prettyprint pretty) +static int +value_check_printable (struct value *val, struct ui_file *stream) { if (val == 0) { - printf_filtered ("
"); + fprintf_filtered (stream, "
"); return 0; } + if (VALUE_OPTIMIZED_OUT (val)) { - printf_filtered (""); + fprintf_filtered (stream, ""); return 0; } + + return 1; +} + +/* Print the value VAL onto stream STREAM according to FORMAT (a + letter, or 0 for natural format using TYPE). + + If DEREF_REF is nonzero, then dereference references, otherwise just print + them like pointers. + + The PRETTY parameter controls prettyprinting. + + If the data are a string pointer, returns the number of string characters + printed. + + This is a preferable interface to val_print, above, because it uses + GDB's value mechanism. */ + +int +common_val_print (struct value *val, struct ui_file *stream, int format, + int deref_ref, int recurse, enum val_prettyprint pretty) +{ + if (!value_check_printable (val, stream)) + return 0; + + return val_print (VALUE_TYPE(val), VALUE_CONTENTS_ALL (val), + VALUE_EMBEDDED_OFFSET (val), VALUE_ADDRESS (val), + stream, format, deref_ref, recurse, pretty); +} + +/* Print the value VAL in C-ish syntax on stream STREAM. + FORMAT is a format-letter, or 0 for print in natural format of data type. + If the object printed is a string pointer, returns + the number of string bytes printed. */ + +int +value_print (struct value *val, struct ui_file *stream, int format, + enum val_prettyprint pretty) +{ + if (!value_check_printable (val, stream)) + return 0; + return LA_VALUE_PRINT (val, stream, format, pretty); } Modified: head/contrib/gdb/gdb/value.h ============================================================================== --- head/contrib/gdb/gdb/value.h Mon Nov 12 22:38:54 2012 (r242935) +++ head/contrib/gdb/gdb/value.h Tue Nov 13 01:21:17 2012 (r242936) @@ -523,6 +523,11 @@ extern int val_print (struct type * type int deref_ref, int recurse, enum val_prettyprint pretty); +extern int common_val_print (struct value *val, + struct ui_file *stream, int format, + int deref_ref, int recurse, + enum val_prettyprint pretty); + extern int val_print_string (CORE_ADDR addr, int len, int width, struct ui_file *stream); extern void print_variable_value (struct symbol * var, Modified: head/contrib/gdb/gdb/varobj.c ============================================================================== --- head/contrib/gdb/gdb/varobj.c Mon Nov 12 22:38:54 2012 (r242935) +++ head/contrib/gdb/gdb/varobj.c Tue Nov 13 01:21:17 2012 (r242936) @@ -2093,10 +2093,8 @@ c_value_of_variable (struct varobj *var) if (VALUE_LAZY (var->value)) gdb_value_fetch_lazy (var->value); - val_print (VALUE_TYPE (var->value), - VALUE_CONTENTS_RAW (var->value), 0, - VALUE_ADDRESS (var->value), stb, - format_code[(int) var->format], 1, 0, 0); + common_val_print (var->value, stb, + format_code[(int) var->format], 1, 0, 0); thevalue = ui_file_xstrdup (stb, &dummy); do_cleanups (old_chain); return thevalue; From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 01:48:01 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 119C4404; Tue, 13 Nov 2012 01:48:01 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id EACEA8FC14; Tue, 13 Nov 2012 01:48:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAD1m0Ed056348; Tue, 13 Nov 2012 01:48:00 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAD1m0xW056347; Tue, 13 Nov 2012 01:48:00 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201211130148.qAD1m0xW056347@svn.freebsd.org> From: "David E. O'Brien" Date: Tue, 13 Nov 2012 01:48:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242938 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 01:48:01 -0000 Author: obrien Date: Tue Nov 13 01:48:00 2012 New Revision: 242938 URL: http://svnweb.freebsd.org/changeset/base/242938 Log: Use consistent style. Modified: head/sys/netinet6/in6_src.c Modified: head/sys/netinet6/in6_src.c ============================================================================== --- head/sys/netinet6/in6_src.c Tue Nov 13 01:46:56 2012 (r242937) +++ head/sys/netinet6/in6_src.c Tue Nov 13 01:48:00 2012 (r242938) @@ -140,7 +140,7 @@ static void init_policy_queue(void); static int add_addrsel_policyent(struct in6_addrpolicy *); static int delete_addrsel_policyent(struct in6_addrpolicy *); static int walk_addrsel_policy(int (*)(struct in6_addrpolicy *, void *), - void *); + void *); static int dump_addrsel_policyent(struct in6_addrpolicy *, void *); static struct in6_addrpolicy *match_addrsel_policy(struct sockaddr_in6 *); @@ -1103,8 +1103,7 @@ delete_addrsel_policyent(struct in6_addr } static int -walk_addrsel_policy(int (*callback)(struct in6_addrpolicy *, void *), - void *w) +walk_addrsel_policy(int (*callback)(struct in6_addrpolicy *, void *), void *w) { struct addrsel_policyent *pol; int error = 0; From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 02:11:41 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 664) id 5F0B6784; Tue, 13 Nov 2012 02:11:41 +0000 (UTC) Date: Mon, 12 Nov 2012 18:11:40 -0800 From: David O'Brien To: Gleb Smirnoff Subject: Re: svn commit: r240494 - in head: contrib/pf/man contrib/pf/pfctl include sbin/pfctl sbin/pfctl/missing share/man/man4 share/man/man5 sys/conf sys/contrib/pf sys/modules/dummynet sys/modules/ipfw sys/... Message-ID: <20121113021140.GB260@dragon.NUXI.org> References: <201209141151.q8EBppm1014858@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201209141151.q8EBppm1014858@svn.freebsd.org> X-Operating-System: FreeBSD 10.0-CURRENT X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: obrien@freebsd.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 02:11:41 -0000 On Fri, Sep 14, 2012 at 11:51:51AM +0000, Gleb Smirnoff wrote: > Log: > o Create directory sys/netpfil, where all packet filters should > reside, and move there ipfw(4) and pf(4). > o Move most modified parts of pf out of contrib. Why didn't contrib/ipfilter/ move to sys/netpfil/ as well? Having 1/3 of our packet filters not there (sys/netpfil) might suggest we shouldn't create sys/netpfil/ -- -- David (obrien@FreeBSD.org) From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 02:41:32 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1AE5FCA4 for ; Tue, 13 Nov 2012 02:41:32 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ie0-f182.google.com (mail-ie0-f182.google.com [209.85.223.182]) by mx1.freebsd.org (Postfix) with ESMTP id C70AA8FC17 for ; Tue, 13 Nov 2012 02:41:31 +0000 (UTC) Received: by mail-ie0-f182.google.com with SMTP id k10so13055786iea.13 for ; Mon, 12 Nov 2012 18:41:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=hm7nvMdmML08iEBcpq5XUaihNgrXfRR2ENi/E2q7iL4=; b=VnViK6iFEvk/1DBByuE1k+YBC/bdmTfQKyvBD5gaI2bywQDWSY5/aGwBhPTi+ozFXn tMugPQwstbh579cctqmc+cGnkD0NabHqmiakNngaNkVnzSiNCwxeHUYKulARyc/NiRb9 AFbhbANjtka8gnONHPS6v5ypsuN8merr3gW36MW5sDcNaZxKS7WOAGUR2BKPqPsyU6eo VC4kcdgUUDdZxhAEg9SIt5SzuuFG/obSExOxQXLMyO9RvgQr1F+TOPNMV9m0vrV52hVE VUB6L1hw9ShAwwoS27WRx78/71E3tLGi6652Tw9Basa+NYCrzYK22yxpDV6fpSxWmZVa ITnw== Received: by 10.50.150.235 with SMTP id ul11mr9478971igb.31.1352774491244; Mon, 12 Nov 2012 18:41:31 -0800 (PST) Received: from 53.imp.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPS id ff4sm9664546igc.13.2012.11.12.18.41.29 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 12 Nov 2012 18:41:30 -0800 (PST) Sender: Warner Losh Subject: Re: svn commit: r241933 - head/sys/conf Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <20121113002907.GA98994@dragon.NUXI.org> Date: Mon, 12 Nov 2012 19:41:28 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <092962CE-23AB-46C9-91C5-D3E2A302A6AA@bsdimp.com> References: <201210231458.q9NEwPRd090442@svn.freebsd.org> <20121113002907.GA98994@dragon.NUXI.org> To: obrien@freebsd.org X-Mailer: Apple Mail (2.1085) X-Gm-Message-State: ALoCoQkaLU53os5GqZ0kA8drIo4BagjVxQdPD7fX8tdOOiQCrHYjQ4rAaKbCq33ic6DvPECzMWu+ Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 02:41:32 -0000 On Nov 12, 2012, at 5:29 PM, David O'Brien wrote: > On Tue, Oct 23, 2012 at 02:58:25PM +0000, Warner Losh wrote: >> Log: >> Start a clean-room implementation of files.mips. This is sufficient >> for SWARM64 and SWARM64_SMP to compile. Other kernels will be = layered >> in. >> Modified: >> head/sys/conf/files.mips > ... >> -# Copyright (c) 2001, 2004-2005, Juniper Networks, Inc. >> -# All rights reserved. >> -# JNPR: files.mips,v 1.11 2007/08/09 12:25:35 katta >=20 > Hi Warner, > What is the purpose of this? A complete rewrite from scratch, starting with an empty file and fixing = things that config/buildkernel complained about. > $ diff -Bbw files.mips.r241680,sorted files.mips.r241933,sorted | = egrep -v '^(\+|-|@@)' | wc -l > 43 >=20 > So some of the content did "filter through" the clean room. No, it did not. You are mistaken. Sometimes, there's only one way to = list files. > Who did the "clean-room" implementation? I did. > If you, is it really a clean-room reimplementation? Yes. > You're so familiar with this file are you really able to do such a = thing? Yes. This file is so simple that there's really only one way that a 'find = sys/mips -name \*.c' can be expressed. Warner= From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 02:50:40 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 379614F8; Tue, 13 Nov 2012 02:50:40 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1DD208FC14; Tue, 13 Nov 2012 02:50:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAD2oe7W065273; Tue, 13 Nov 2012 02:50:40 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAD2odEw065268; Tue, 13 Nov 2012 02:50:39 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201211130250.qAD2odEw065268@svn.freebsd.org> From: Alan Cox Date: Tue, 13 Nov 2012 02:50:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242941 - in head/sys: sys vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 02:50:40 -0000 Author: alc Date: Tue Nov 13 02:50:39 2012 New Revision: 242941 URL: http://svnweb.freebsd.org/changeset/base/242941 Log: Replace the single, global page queues lock with per-queue locks on the active and inactive paging queues. Reviewed by: kib Modified: head/sys/sys/vmmeter.h head/sys/vm/vm_fault.c head/sys/vm/vm_page.c head/sys/vm/vm_page.h head/sys/vm/vm_pageout.c Modified: head/sys/sys/vmmeter.h ============================================================================== --- head/sys/sys/vmmeter.h Tue Nov 13 02:42:31 2012 (r242940) +++ head/sys/sys/vmmeter.h Tue Nov 13 02:50:39 2012 (r242941) @@ -46,7 +46,7 @@ * c - constant after initialization * f - locked by vm_page_queue_free_mtx * p - locked by being in the PCPU and atomicity respect to interrupts - * q - locked by vm_page_queue_mtx + * q - changes are synchronized by the corresponding vm_pagequeue lock */ struct vmmeter { /* @@ -76,7 +76,7 @@ struct vmmeter { u_int v_intrans; /* (p) intransit blocking page faults */ u_int v_reactivated; /* (f) pages reactivated from free list */ u_int v_pdwakeups; /* (f) times daemon has awaken from sleep */ - u_int v_pdpages; /* (q) pages analyzed by daemon */ + u_int v_pdpages; /* (p) pages analyzed by daemon */ u_int v_tcached; /* (p) total pages cached */ u_int v_dfree; /* (p) pages freed by daemon */ Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Tue Nov 13 02:42:31 2012 (r242940) +++ head/sys/vm/vm_fault.c Tue Nov 13 02:50:39 2012 (r242941) @@ -388,7 +388,7 @@ RetryFault:; vm_object_deallocate(fs.first_object); goto RetryFault; } - vm_pageq_remove(fs.m); + vm_page_remque(fs.m); vm_page_unlock(fs.m); /* Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Tue Nov 13 02:42:31 2012 (r242940) +++ head/sys/vm/vm_page.c Tue Nov 13 02:50:39 2012 (r242941) @@ -63,10 +63,16 @@ /* * GENERAL RULES ON VM_PAGE MANIPULATION * - * - a pageq mutex is required when adding or removing a page from a - * page queue (vm_page_queue[]), regardless of other mutexes or the + * - A page queue lock is required when adding or removing a page from a + * page queue (vm_pagequeues[]), regardless of other locks or the * busy state of a page. * + * * In general, no thread besides the page daemon can acquire or + * hold more than one page queue lock at a time. + * + * * The page daemon can acquire and hold any pair of page queue + * locks in any order. + * * - The object mutex is held when inserting or removing * pages from an object (vm_page_insert() or vm_page_remove()). * @@ -115,8 +121,20 @@ __FBSDID("$FreeBSD$"); * page structure. */ -struct vpgqueues vm_page_queues[PQ_COUNT]; -struct mtx_padalign vm_page_queue_mtx; +struct vm_pagequeue vm_pagequeues[PQ_COUNT] = { + [PQ_INACTIVE] = { + .pq_pl = TAILQ_HEAD_INITIALIZER( + vm_pagequeues[PQ_INACTIVE].pq_pl), + .pq_cnt = &cnt.v_inactive_count, + .pq_name = "vm inactive pagequeue" + }, + [PQ_ACTIVE] = { + .pq_pl = TAILQ_HEAD_INITIALIZER( + vm_pagequeues[PQ_ACTIVE].pq_pl), + .pq_cnt = &cnt.v_active_count, + .pq_name = "vm active pagequeue" + } +}; struct mtx_padalign vm_page_queue_free_mtx; struct mtx_padalign pa_lock[PA_LOCK_COUNT]; @@ -139,7 +157,6 @@ static uma_zone_t fakepg_zone; static struct vnode *vm_page_alloc_init(vm_page_t m); static void vm_page_clear_dirty_mask(vm_page_t m, vm_page_bits_t pagebits); -static void vm_page_queue_remove(int queue, vm_page_t m); static void vm_page_enqueue(int queue, vm_page_t m); static void vm_page_init_fakepg(void *dummy); @@ -294,20 +311,11 @@ vm_page_startup(vm_offset_t vaddr) /* * Initialize the page and queue locks. */ - mtx_init(&vm_page_queue_mtx, "vm page queue", NULL, MTX_DEF | - MTX_RECURSE); mtx_init(&vm_page_queue_free_mtx, "vm page free queue", NULL, MTX_DEF); for (i = 0; i < PA_LOCK_COUNT; i++) mtx_init(&pa_lock[i], "vm page", NULL, MTX_DEF); - - /* - * Initialize the queue headers for the hold queue, the active queue, - * and the inactive queue. - */ for (i = 0; i < PQ_COUNT; i++) - TAILQ_INIT(&vm_page_queues[i].pl); - vm_page_queues[PQ_INACTIVE].cnt = &cnt.v_inactive_count; - vm_page_queues[PQ_ACTIVE].cnt = &cnt.v_active_count; + vm_pagequeue_init_lock(&vm_pagequeues[i]); /* * Allocate memory for use when boot strapping the kernel memory @@ -1867,61 +1875,109 @@ vm_waitpfault(void) } /* - * vm_page_queue_remove: + * vm_page_dequeue: * - * Remove the given page from the specified queue. + * Remove the given page from its current page queue. * - * The page and page queues must be locked. + * The page must be locked. */ -static __inline void -vm_page_queue_remove(int queue, vm_page_t m) +void +vm_page_dequeue(vm_page_t m) { - struct vpgqueues *pq; + struct vm_pagequeue *pq; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); vm_page_lock_assert(m, MA_OWNED); - pq = &vm_page_queues[queue]; - TAILQ_REMOVE(&pq->pl, m, pageq); - (*pq->cnt)--; + KASSERT(m->queue != PQ_NONE, + ("vm_page_dequeue: page %p is not queued", m)); + pq = &vm_pagequeues[m->queue]; + vm_pagequeue_lock(pq); + m->queue = PQ_NONE; + TAILQ_REMOVE(&pq->pq_pl, m, pageq); + (*pq->pq_cnt)--; + vm_pagequeue_unlock(pq); } /* - * vm_pageq_remove: + * vm_page_dequeue_locked: * - * Remove a page from its queue. + * Remove the given page from its current page queue. * - * The given page must be locked. + * The page and page queue must be locked. */ void -vm_pageq_remove(vm_page_t m) +vm_page_dequeue_locked(vm_page_t m) { - int queue; + struct vm_pagequeue *pq; vm_page_lock_assert(m, MA_OWNED); - if ((queue = m->queue) != PQ_NONE) { - vm_page_lock_queues(); - m->queue = PQ_NONE; - vm_page_queue_remove(queue, m); - vm_page_unlock_queues(); - } + pq = &vm_pagequeues[m->queue]; + vm_pagequeue_assert_locked(pq); + m->queue = PQ_NONE; + TAILQ_REMOVE(&pq->pq_pl, m, pageq); + (*pq->pq_cnt)--; } /* * vm_page_enqueue: * - * Add the given page to the specified queue. + * Add the given page to the specified page queue. * - * The page queues must be locked. + * The page must be locked. */ static void vm_page_enqueue(int queue, vm_page_t m) { - struct vpgqueues *vpq; + struct vm_pagequeue *pq; - vpq = &vm_page_queues[queue]; + vm_page_lock_assert(m, MA_OWNED); + pq = &vm_pagequeues[queue]; + vm_pagequeue_lock(pq); m->queue = queue; - TAILQ_INSERT_TAIL(&vpq->pl, m, pageq); - ++*vpq->cnt; + TAILQ_INSERT_TAIL(&pq->pq_pl, m, pageq); + ++*pq->pq_cnt; + vm_pagequeue_unlock(pq); +} + +/* + * vm_page_requeue: + * + * Move the given page to the tail of its current page queue. + * + * The page must be locked. + */ +void +vm_page_requeue(vm_page_t m) +{ + struct vm_pagequeue *pq; + + vm_page_lock_assert(m, MA_OWNED); + KASSERT(m->queue != PQ_NONE, + ("vm_page_requeue: page %p is not queued", m)); + pq = &vm_pagequeues[m->queue]; + vm_pagequeue_lock(pq); + TAILQ_REMOVE(&pq->pq_pl, m, pageq); + TAILQ_INSERT_TAIL(&pq->pq_pl, m, pageq); + vm_pagequeue_unlock(pq); +} + +/* + * vm_page_requeue_locked: + * + * Move the given page to the tail of its current page queue. + * + * The page queue must be locked. + */ +void +vm_page_requeue_locked(vm_page_t m) +{ + struct vm_pagequeue *pq; + + KASSERT(m->queue != PQ_NONE, + ("vm_page_requeue_locked: page %p is not queued", m)); + pq = &vm_pagequeues[m->queue]; + vm_pagequeue_assert_locked(pq); + TAILQ_REMOVE(&pq->pq_pl, m, pageq); + TAILQ_INSERT_TAIL(&pq->pq_pl, m, pageq); } /* @@ -1944,11 +2000,9 @@ vm_page_activate(vm_page_t m) if (m->wire_count == 0 && (m->oflags & VPO_UNMANAGED) == 0) { if (m->act_count < ACT_INIT) m->act_count = ACT_INIT; - vm_page_lock_queues(); if (queue != PQ_NONE) - vm_page_queue_remove(queue, m); + vm_page_dequeue(m); vm_page_enqueue(PQ_ACTIVE, m); - vm_page_unlock_queues(); } else KASSERT(queue == PQ_NONE, ("vm_page_activate: wired page %p is queued", m)); @@ -2008,7 +2062,9 @@ vm_page_free_toq(vm_page_t m) vm_page_lock_assert(m, MA_OWNED); KASSERT(!pmap_page_is_mapped(m), ("vm_page_free_toq: freeing mapped page %p", m)); - } + } else + KASSERT(m->queue == PQ_NONE, + ("vm_page_free_toq: unmanaged page %p is queued", m)); PCPU_INC(cnt.v_tfree); if (VM_PAGE_IS_FREE(m)) @@ -2022,8 +2078,7 @@ vm_page_free_toq(vm_page_t m) * callback routine until after we've put the page on the * appropriate free queue. */ - if ((m->oflags & VPO_UNMANAGED) == 0) - vm_pageq_remove(m); + vm_page_remque(m); vm_page_remove(m); /* @@ -2101,8 +2156,10 @@ vm_page_wire(vm_page_t m) return; } if (m->wire_count == 0) { - if ((m->oflags & VPO_UNMANAGED) == 0) - vm_pageq_remove(m); + KASSERT((m->oflags & VPO_UNMANAGED) == 0 || + m->queue == PQ_NONE, + ("vm_page_wire: unmanaged page %p is queued", m)); + vm_page_remque(m); atomic_add_int(&cnt.v_wire_count, 1); } m->wire_count++; @@ -2145,9 +2202,7 @@ vm_page_unwire(vm_page_t m, int activate return; if (!activate) m->flags &= ~PG_WINATCFLS; - vm_page_lock_queues(); vm_page_enqueue(activate ? PQ_ACTIVE : PQ_INACTIVE, m); - vm_page_unlock_queues(); } } else panic("vm_page_unwire: page %p's wire count is zero", m); @@ -2176,6 +2231,7 @@ vm_page_unwire(vm_page_t m, int activate static inline void _vm_page_deactivate(vm_page_t m, int athead) { + struct vm_pagequeue *pq; int queue; vm_page_lock_assert(m, MA_OWNED); @@ -2186,19 +2242,18 @@ _vm_page_deactivate(vm_page_t m, int ath if ((queue = m->queue) == PQ_INACTIVE) return; if (m->wire_count == 0 && (m->oflags & VPO_UNMANAGED) == 0) { - m->flags &= ~PG_WINATCFLS; - vm_page_lock_queues(); if (queue != PQ_NONE) - vm_page_queue_remove(queue, m); + vm_page_dequeue(m); + m->flags &= ~PG_WINATCFLS; + pq = &vm_pagequeues[PQ_INACTIVE]; + vm_pagequeue_lock(pq); + m->queue = PQ_INACTIVE; if (athead) - TAILQ_INSERT_HEAD(&vm_page_queues[PQ_INACTIVE].pl, m, - pageq); + TAILQ_INSERT_HEAD(&pq->pq_pl, m, pageq); else - TAILQ_INSERT_TAIL(&vm_page_queues[PQ_INACTIVE].pl, m, - pageq); - m->queue = PQ_INACTIVE; + TAILQ_INSERT_TAIL(&pq->pq_pl, m, pageq); cnt.v_inactive_count++; - vm_page_unlock_queues(); + vm_pagequeue_unlock(pq); } } @@ -2298,7 +2353,7 @@ vm_page_cache(vm_page_t m) /* * Remove the page from the paging queues. */ - vm_pageq_remove(m); + vm_page_remque(m); /* * Remove the page from the object's collection of resident @@ -3039,7 +3094,7 @@ DB_SHOW_COMMAND(pageq, vm_page_print_pag db_printf("\n"); db_printf("PQ_ACTIVE: %d, PQ_INACTIVE: %d\n", - *vm_page_queues[PQ_ACTIVE].cnt, - *vm_page_queues[PQ_INACTIVE].cnt); + *vm_pagequeues[PQ_ACTIVE].pq_cnt, + *vm_pagequeues[PQ_INACTIVE].pq_cnt); } #endif /* DDB */ Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Tue Nov 13 02:42:31 2012 (r242940) +++ head/sys/vm/vm_page.h Tue Nov 13 02:50:39 2012 (r242941) @@ -92,7 +92,7 @@ * In general, operations on this structure's mutable fields are * synchronized using either one of or a combination of the lock on the * object that the page belongs to (O), the pool lock for the page (P), - * or the lock for either the free or paging queues (Q). If a field is + * or the lock for either the free or paging queue (Q). If a field is * annotated below with two of these locks, then holding either lock is * sufficient for read access, but both locks are required for write * access. @@ -111,8 +111,6 @@ * field is encapsulated in vm_page_clear_dirty_mask(). */ -TAILQ_HEAD(pglist, vm_page); - #if PAGE_SIZE == 4096 #define VM_PAGE_BITS_ALL 0xffu typedef uint8_t vm_page_bits_t; @@ -128,7 +126,7 @@ typedef uint64_t vm_page_bits_t; #endif struct vm_page { - TAILQ_ENTRY(vm_page) pageq; /* queue info for FIFO queue or free list (Q) */ + TAILQ_ENTRY(vm_page) pageq; /* page queue or free list (Q) */ TAILQ_ENTRY(vm_page) listq; /* pages in same object (O) */ struct vm_page *left; /* splay tree link (O) */ struct vm_page *right; /* splay tree link (O) */ @@ -180,12 +178,22 @@ struct vm_page { #define PQ_ACTIVE 1 #define PQ_COUNT 2 -struct vpgqueues { - struct pglist pl; - int *cnt; -}; +TAILQ_HEAD(pglist, vm_page); -extern struct vpgqueues vm_page_queues[PQ_COUNT]; +struct vm_pagequeue { + struct mtx pq_mutex; + struct pglist pq_pl; + int *const pq_cnt; + const char *const pq_name; +} __aligned(CACHE_LINE_SIZE); + +extern struct vm_pagequeue vm_pagequeues[PQ_COUNT]; + +#define vm_pagequeue_assert_locked(pq) mtx_assert(&(pq)->pq_mutex, MA_OWNED) +#define vm_pagequeue_init_lock(pq) mtx_init(&(pq)->pq_mutex, \ + (pq)->pq_name, "vm pagequeue", MTX_DEF | MTX_DUPOK); +#define vm_pagequeue_lock(pq) mtx_lock(&(pq)->pq_mutex) +#define vm_pagequeue_unlock(pq) mtx_unlock(&(pq)->pq_mutex) extern struct mtx_padalign vm_page_queue_free_mtx; extern struct mtx_padalign pa_lock[]; @@ -320,11 +328,6 @@ vm_page_t vm_phys_paddr_to_vm_page(vm_pa vm_page_t PHYS_TO_VM_PAGE(vm_paddr_t pa); -extern struct mtx_padalign vm_page_queue_mtx; - -#define vm_page_lock_queues() mtx_lock(&vm_page_queue_mtx) -#define vm_page_unlock_queues() mtx_unlock(&vm_page_queue_mtx) - /* page allocation classes: */ #define VM_ALLOC_NORMAL 0 #define VM_ALLOC_INTERRUPT 1 @@ -354,8 +357,6 @@ void vm_page_free(vm_page_t m); void vm_page_free_zero(vm_page_t m); void vm_page_wakeup(vm_page_t m); -void vm_pageq_remove(vm_page_t m); - void vm_page_activate (vm_page_t); vm_page_t vm_page_alloc (vm_object_t, vm_pindex_t, int); vm_page_t vm_page_alloc_contig(vm_object_t object, vm_pindex_t pindex, int req, @@ -370,6 +371,8 @@ int vm_page_try_to_cache (vm_page_t); int vm_page_try_to_free (vm_page_t); void vm_page_dontneed(vm_page_t); void vm_page_deactivate (vm_page_t); +void vm_page_dequeue(vm_page_t m); +void vm_page_dequeue_locked(vm_page_t m); vm_page_t vm_page_find_least(vm_object_t, vm_pindex_t); vm_page_t vm_page_getfake(vm_paddr_t paddr, vm_memattr_t memattr); void vm_page_initfake(vm_page_t m, vm_paddr_t paddr, vm_memattr_t memattr); @@ -384,6 +387,8 @@ void vm_page_readahead_finish(vm_page_t void vm_page_reference(vm_page_t m); void vm_page_remove (vm_page_t); void vm_page_rename (vm_page_t, vm_object_t, vm_pindex_t); +void vm_page_requeue(vm_page_t m); +void vm_page_requeue_locked(vm_page_t m); void vm_page_set_valid_range(vm_page_t m, int base, int size); void vm_page_sleep(vm_page_t m, const char *msg); vm_page_t vm_page_splay(vm_pindex_t, vm_page_t); @@ -512,6 +517,22 @@ vm_page_dirty(vm_page_t m) } /* + * vm_page_remque: + * + * If the given page is in a page queue, then remove it from that page + * queue. + * + * The page must be locked. + */ +static inline void +vm_page_remque(vm_page_t m) +{ + + if (m->queue != PQ_NONE) + vm_page_dequeue(m); +} + +/* * vm_page_sleep_if_busy: * * Sleep and release the page queues lock if VPO_BUSY is set or, Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Tue Nov 13 02:42:31 2012 (r242940) +++ head/sys/vm/vm_pageout.c Tue Nov 13 02:50:39 2012 (r242941) @@ -218,7 +218,6 @@ static void vm_req_vmdaemon(int req); #endif static boolean_t vm_pageout_page_lock(vm_page_t, vm_page_t *); static void vm_pageout_page_stats(void); -static void vm_pageout_requeue(vm_page_t m); /* * Initialize a dummy page for marking the caller's place in the specified @@ -255,29 +254,29 @@ static boolean_t vm_pageout_fallback_object_lock(vm_page_t m, vm_page_t *next) { struct vm_page marker; + struct vm_pagequeue *pq; boolean_t unchanged; u_short queue; vm_object_t object; queue = m->queue; vm_pageout_init_marker(&marker, queue); + pq = &vm_pagequeues[queue]; object = m->object; - TAILQ_INSERT_AFTER(&vm_page_queues[queue].pl, - m, &marker, pageq); - vm_page_unlock_queues(); + TAILQ_INSERT_AFTER(&pq->pq_pl, m, &marker, pageq); + vm_pagequeue_unlock(pq); vm_page_unlock(m); VM_OBJECT_LOCK(object); vm_page_lock(m); - vm_page_lock_queues(); + vm_pagequeue_lock(pq); /* Page queue might have changed. */ *next = TAILQ_NEXT(&marker, pageq); unchanged = (m->queue == queue && m->object == object && &marker == TAILQ_NEXT(m, pageq)); - TAILQ_REMOVE(&vm_page_queues[queue].pl, - &marker, pageq); + TAILQ_REMOVE(&pq->pq_pl, &marker, pageq); return (unchanged); } @@ -294,27 +293,27 @@ static boolean_t vm_pageout_page_lock(vm_page_t m, vm_page_t *next) { struct vm_page marker; + struct vm_pagequeue *pq; boolean_t unchanged; u_short queue; vm_page_lock_assert(m, MA_NOTOWNED); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); - if (vm_page_trylock(m)) return (TRUE); queue = m->queue; vm_pageout_init_marker(&marker, queue); + pq = &vm_pagequeues[queue]; - TAILQ_INSERT_AFTER(&vm_page_queues[queue].pl, m, &marker, pageq); - vm_page_unlock_queues(); + TAILQ_INSERT_AFTER(&pq->pq_pl, m, &marker, pageq); + vm_pagequeue_unlock(pq); vm_page_lock(m); - vm_page_lock_queues(); + vm_pagequeue_lock(pq); /* Page queue might have changed. */ *next = TAILQ_NEXT(&marker, pageq); unchanged = (m->queue == queue && &marker == TAILQ_NEXT(m, pageq)); - TAILQ_REMOVE(&vm_page_queues[queue].pl, &marker, pageq); + TAILQ_REMOVE(&pq->pq_pl, &marker, pageq); return (unchanged); } @@ -565,13 +564,15 @@ static boolean_t vm_pageout_launder(int queue, int tries, vm_paddr_t low, vm_paddr_t high) { struct mount *mp; + struct vm_pagequeue *pq; struct vnode *vp; vm_object_t object; vm_paddr_t pa; vm_page_t m, m_tmp, next; - vm_page_lock_queues(); - TAILQ_FOREACH_SAFE(m, &vm_page_queues[queue].pl, pageq, next) { + pq = &vm_pagequeues[queue]; + vm_pagequeue_lock(pq); + TAILQ_FOREACH_SAFE(m, &pq->pq_pl, pageq, next) { KASSERT(m->queue == queue, ("vm_pageout_launder: page %p's queue is not %d", m, queue)); @@ -603,7 +604,7 @@ vm_pageout_launder(int queue, int tries, continue; } if (object->type == OBJT_VNODE) { - vm_page_unlock_queues(); + vm_pagequeue_unlock(pq); vp = object->handle; vm_object_reference_locked(object); VM_OBJECT_UNLOCK(object); @@ -618,7 +619,7 @@ vm_pageout_launder(int queue, int tries, return (TRUE); } else if (object->type == OBJT_SWAP || object->type == OBJT_DEFAULT) { - vm_page_unlock_queues(); + vm_pagequeue_unlock(pq); m_tmp = m; vm_pageout_flush(&m_tmp, 1, VM_PAGER_PUT_SYNC, 0, NULL, NULL); @@ -626,12 +627,17 @@ vm_pageout_launder(int queue, int tries, return (TRUE); } } else { + /* + * Dequeue here to prevent lock recursion in + * vm_page_cache(). + */ + vm_page_dequeue_locked(m); vm_page_cache(m); vm_page_unlock(m); } VM_OBJECT_UNLOCK(object); } - vm_page_unlock_queues(); + vm_pagequeue_unlock(pq); return (FALSE); } @@ -745,19 +751,14 @@ vm_pageout_object_deactivate_pages(pmap_ p->act_count == 0)) { pmap_remove_all(p); vm_page_deactivate(p); - } else { - vm_page_lock_queues(); - vm_pageout_requeue(p); - vm_page_unlock_queues(); - } + } else + vm_page_requeue(p); } else { vm_page_activate(p); if (p->act_count < ACT_MAX - ACT_ADVANCE) p->act_count += ACT_ADVANCE; - vm_page_lock_queues(); - vm_pageout_requeue(p); - vm_page_unlock_queues(); + vm_page_requeue(p); } } else if (p->queue == PQ_INACTIVE) pmap_remove_all(p); @@ -853,26 +854,6 @@ vm_pageout_map_deactivate_pages(map, des #endif /* !defined(NO_SWAPPING) */ /* - * vm_pageout_requeue: - * - * Move the specified page to the tail of its present page queue. - * - * The page queues must be locked. - */ -static void -vm_pageout_requeue(vm_page_t m) -{ - struct vpgqueues *vpq; - - mtx_assert(&vm_page_queue_mtx, MA_OWNED); - KASSERT(m->queue != PQ_NONE, - ("vm_pageout_requeue: page %p is not queued", m)); - vpq = &vm_page_queues[m->queue]; - TAILQ_REMOVE(&vpq->pl, m, pageq); - TAILQ_INSERT_TAIL(&vpq->pl, m, pageq); -} - -/* * vm_pageout_scan does the dirty work for the pageout daemon. */ static void @@ -880,6 +861,7 @@ vm_pageout_scan(int pass) { vm_page_t m, next; struct vm_page marker; + struct vm_pagequeue *pq; int page_shortage, maxscan, pcount; int addl_page_shortage; vm_object_t object; @@ -888,6 +870,8 @@ vm_pageout_scan(int pass) int maxlaunder; boolean_t queues_locked; + vm_pageout_init_marker(&marker, PQ_INACTIVE); + /* * Decrease registered cache sizes. */ @@ -911,15 +895,7 @@ vm_pageout_scan(int pass) */ page_shortage = vm_paging_target() + addl_page_shortage; - vm_pageout_init_marker(&marker, PQ_INACTIVE); - /* - * Start scanning the inactive queue for pages we can move to the - * cache or free. The scan will stop when the target is reached or - * we have scanned the entire inactive queue. Note that m->act_count - * is not used to form decisions for the inactive queue, only for the - * active queue. - * * maxlaunder limits the number of dirty pages we flush per scan. * For most systems a smaller value (16 or 32) is more robust under * extreme memory and disk pressure because any unnecessary writes @@ -933,18 +909,27 @@ vm_pageout_scan(int pass) maxlaunder = 1; if (pass) maxlaunder = 10000; - vm_page_lock_queues(); - queues_locked = TRUE; + maxscan = cnt.v_inactive_count; - for (m = TAILQ_FIRST(&vm_page_queues[PQ_INACTIVE].pl); + /* + * Start scanning the inactive queue for pages we can move to the + * cache or free. The scan will stop when the target is reached or + * we have scanned the entire inactive queue. Note that m->act_count + * is not used to form decisions for the inactive queue, only for the + * active queue. + */ + pq = &vm_pagequeues[PQ_INACTIVE]; + vm_pagequeue_lock(pq); + queues_locked = TRUE; + for (m = TAILQ_FIRST(&pq->pq_pl); m != NULL && maxscan-- > 0 && page_shortage > 0; m = next) { + vm_pagequeue_assert_locked(pq); KASSERT(queues_locked, ("unlocked queues")); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); KASSERT(m->queue == PQ_INACTIVE, ("Inactive queue %p", m)); - cnt.v_pdpages++; + PCPU_INC(cnt.v_pdpages); next = TAILQ_NEXT(m, pageq); /* @@ -991,13 +976,12 @@ vm_pageout_scan(int pass) } /* - * We unlock vm_page_queue_mtx, invalidating the + * We unlock the inactive page queue, invalidating the * 'next' pointer. Use our marker to remember our * place. */ - TAILQ_INSERT_AFTER(&vm_page_queues[PQ_INACTIVE].pl, - m, &marker, pageq); - vm_page_unlock_queues(); + TAILQ_INSERT_AFTER(&pq->pq_pl, m, &marker, pageq); + vm_pagequeue_unlock(pq); queues_locked = FALSE; /* @@ -1098,9 +1082,9 @@ vm_pageout_scan(int pass) * the thrash point for a heavily loaded machine. */ m->flags |= PG_WINATCFLS; - vm_page_lock_queues(); + vm_pagequeue_lock(pq); queues_locked = TRUE; - vm_pageout_requeue(m); + vm_page_requeue_locked(m); } else if (maxlaunder > 0) { /* * We always want to try to flush some dirty pages if @@ -1127,11 +1111,11 @@ vm_pageout_scan(int pass) * Those objects are in a "rundown" state. */ if (!swap_pageouts_ok || (object->flags & OBJ_DEAD)) { - vm_page_lock_queues(); + vm_pagequeue_lock(pq); vm_page_unlock(m); VM_OBJECT_UNLOCK(object); queues_locked = TRUE; - vm_pageout_requeue(m); + vm_page_requeue_locked(m); goto relock_queues; } @@ -1184,7 +1168,7 @@ vm_pageout_scan(int pass) } VM_OBJECT_LOCK(object); vm_page_lock(m); - vm_page_lock_queues(); + vm_pagequeue_lock(pq); queues_locked = TRUE; /* * The page might have been moved to another @@ -1218,12 +1202,12 @@ vm_pageout_scan(int pass) */ if (m->hold_count) { vm_page_unlock(m); - vm_pageout_requeue(m); + vm_page_requeue_locked(m); if (object->flags & OBJ_MIGHTBEDIRTY) vnodes_skipped++; goto unlock_and_continue; } - vm_page_unlock_queues(); + vm_pagequeue_unlock(pq); queues_locked = FALSE; } @@ -1246,7 +1230,7 @@ unlock_and_continue: VM_OBJECT_UNLOCK(object); if (mp != NULL) { if (queues_locked) { - vm_page_unlock_queues(); + vm_pagequeue_unlock(pq); queues_locked = FALSE; } if (vp != NULL) @@ -1261,13 +1245,13 @@ unlock_and_continue: VM_OBJECT_UNLOCK(object); relock_queues: if (!queues_locked) { - vm_page_lock_queues(); + vm_pagequeue_lock(pq); queues_locked = TRUE; } next = TAILQ_NEXT(&marker, pageq); - TAILQ_REMOVE(&vm_page_queues[PQ_INACTIVE].pl, - &marker, pageq); + TAILQ_REMOVE(&pq->pq_pl, &marker, pageq); } + vm_pagequeue_unlock(pq); /* * Compute the number of pages we want to try to move from the @@ -1283,9 +1267,9 @@ relock_queues: * deactivation candidates. */ pcount = cnt.v_active_count; - m = TAILQ_FIRST(&vm_page_queues[PQ_ACTIVE].pl); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); - + pq = &vm_pagequeues[PQ_ACTIVE]; + vm_pagequeue_lock(pq); + m = TAILQ_FIRST(&pq->pq_pl); while ((m != NULL) && (pcount-- > 0) && (page_shortage > 0)) { KASSERT(m->queue == PQ_ACTIVE, @@ -1322,7 +1306,7 @@ relock_queues: (m->hold_count != 0)) { vm_page_unlock(m); VM_OBJECT_UNLOCK(object); - vm_pageout_requeue(m); + vm_page_requeue_locked(m); m = next; continue; } @@ -1331,7 +1315,7 @@ relock_queues: * The count for pagedaemon pages is done after checking the * page for eligibility... */ - cnt.v_pdpages++; + PCPU_INC(cnt.v_pdpages); /* * Check to see "how much" the page has been used. @@ -1358,14 +1342,16 @@ relock_queues: * Only if an object is currently being used, do we use the * page activation count stats. */ - if (actcount && (object->ref_count != 0)) { - vm_pageout_requeue(m); - } else { + if (actcount != 0 && object->ref_count != 0) + vm_page_requeue_locked(m); + else { m->act_count -= min(m->act_count, ACT_DECLINE); if (vm_pageout_algorithm || object->ref_count == 0 || m->act_count == 0) { page_shortage--; + /* Dequeue to avoid later lock recursion. */ + vm_page_dequeue_locked(m); if (object->ref_count == 0) { KASSERT(!pmap_page_is_mapped(m), ("vm_pageout_scan: page %p is mapped", m)); @@ -1376,15 +1362,14 @@ relock_queues: } else { vm_page_deactivate(m); } - } else { - vm_pageout_requeue(m); - } + } else + vm_page_requeue_locked(m); } vm_page_unlock(m); VM_OBJECT_UNLOCK(object); m = next; } - vm_page_unlock_queues(); + vm_pagequeue_unlock(pq); #if !defined(NO_SWAPPING) /* * Idle process swapout -- run once per second. @@ -1529,6 +1514,7 @@ vm_pageout_oom(int shortage) static void vm_pageout_page_stats() { + struct vm_pagequeue *pq; vm_object_t object; vm_page_t m,next; int pcount,tpcount; /* Number of pages to check */ @@ -1542,7 +1528,6 @@ vm_pageout_page_stats() if (page_shortage <= 0) return; - vm_page_lock_queues(); pcount = cnt.v_active_count; fullintervalcount += vm_pageout_stats_interval; if (fullintervalcount < vm_pageout_full_stats_interval) { @@ -1554,7 +1539,9 @@ vm_pageout_page_stats() fullintervalcount = 0; } - m = TAILQ_FIRST(&vm_page_queues[PQ_ACTIVE].pl); + pq = &vm_pagequeues[PQ_ACTIVE]; + vm_pagequeue_lock(pq); + m = TAILQ_FIRST(&pq->pq_pl); while ((m != NULL) && (pcount-- > 0)) { int actcount; @@ -1589,7 +1576,7 @@ vm_pageout_page_stats() (m->hold_count != 0)) { vm_page_unlock(m); VM_OBJECT_UNLOCK(object); - vm_pageout_requeue(m); + vm_page_requeue_locked(m); m = next; continue; } @@ -1605,7 +1592,7 @@ vm_pageout_page_stats() m->act_count += ACT_ADVANCE + actcount; if (m->act_count > ACT_MAX) m->act_count = ACT_MAX; - vm_pageout_requeue(m); + vm_page_requeue_locked(m); } else { if (m->act_count == 0) { /* @@ -1618,17 +1605,19 @@ vm_pageout_page_stats() * of doing the operation. */ pmap_remove_all(m); + /* Dequeue to avoid later lock recursion. */ + vm_page_dequeue_locked(m); vm_page_deactivate(m); } else { m->act_count -= min(m->act_count, ACT_DECLINE); - vm_pageout_requeue(m); + vm_page_requeue_locked(m); } } vm_page_unlock(m); VM_OBJECT_UNLOCK(object); m = next; } - vm_page_unlock_queues(); + vm_pagequeue_unlock(pq); } /* From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 03:05:29 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 17DE7C46; Tue, 13 Nov 2012 03:05:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D7C548FC15; Tue, 13 Nov 2012 03:05:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAD35Sqc067902; Tue, 13 Nov 2012 03:05:28 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAD35ScC067901; Tue, 13 Nov 2012 03:05:28 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201211130305.qAD35ScC067901@svn.freebsd.org> From: Ed Maste Date: Tue, 13 Nov 2012 03:05:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242943 - head/contrib/gdb/gdb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 03:05:29 -0000 Author: emaste Date: Tue Nov 13 03:05:28 2012 New Revision: 242943 URL: http://svnweb.freebsd.org/changeset/base/242943 Log: Do not unwind past a zero PC frame. This improves GDB usability when debugging code compiled with optimization. Upstream GDB revision f0031b6d3ae9b164b3747986ab898190bd4dcf8c (prior to GDB's switch to GPLv3), with frame_debug_got_null_frame expanded inline. | 2004-12-12 Andrew Cagney | | * frame.c (get_prev_frame): When unwinding normal frames, check | that the PC isn't zero. Sponsored by: ADARA Networks MFC After: 1 month Modified: head/contrib/gdb/gdb/frame.c Modified: head/contrib/gdb/gdb/frame.c ============================================================================== --- head/contrib/gdb/gdb/frame.c Tue Nov 13 03:00:01 2012 (r242942) +++ head/contrib/gdb/gdb/frame.c Tue Nov 13 03:05:28 2012 (r242943) @@ -1846,6 +1846,23 @@ get_prev_frame (struct frame_info *this_ return NULL; } + /* Assume that the only way to get a zero PC is through something + like a SIGSEGV or a dummy frame, and hence that NORMAL frames + will never unwind a zero PC. */ + if (this_frame->level > 0 + && get_frame_type (this_frame) == NORMAL_FRAME + && get_frame_type (get_next_frame (this_frame)) == NORMAL_FRAME + && get_frame_pc (this_frame) == 0) + { + if (frame_debug) + { + fprintf_unfiltered (gdb_stdlog, "-> "); + fprint_frame (gdb_stdlog, this_frame->prev); + fprintf_unfiltered (gdb_stdlog, " // zero PC \n"); + } + return NULL; + } + /* Only try to do the unwind once. */ if (this_frame->prev_p) { From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 03:09:26 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D19F1EC2; Tue, 13 Nov 2012 03:09:26 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9DACA8FC08; Tue, 13 Nov 2012 03:09:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAD39Q9V068718; Tue, 13 Nov 2012 03:09:26 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAD39Qlc068717; Tue, 13 Nov 2012 03:09:26 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201211130309.qAD39Qlc068717@svn.freebsd.org> From: "David E. O'Brien" Date: Tue, 13 Nov 2012 03:09:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242944 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 03:09:27 -0000 Author: obrien Date: Tue Nov 13 03:09:26 2012 New Revision: 242944 URL: http://svnweb.freebsd.org/changeset/base/242944 Log: Garbage collect the explicit "compile-with", they are no longer needed. Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Nov 13 03:05:28 2012 (r242943) +++ head/sys/conf/files Tue Nov 13 03:09:26 2012 (r242944) @@ -274,20 +274,14 @@ compat/freebsd32/freebsd32_ioctl.c optio compat/freebsd32/freebsd32_misc.c optional compat_freebsd32 compat/freebsd32/freebsd32_syscalls.c optional compat_freebsd32 compat/freebsd32/freebsd32_sysent.c optional compat_freebsd32 -contrib/altq/altq/altq_cbq.c optional altq \ - compile-with "${NORMAL_C}" -contrib/altq/altq/altq_cdnr.c optional altq -contrib/altq/altq/altq_hfsc.c optional altq \ - compile-with "${NORMAL_C}" -contrib/altq/altq/altq_priq.c optional altq \ - compile-with "${NORMAL_C}" -contrib/altq/altq/altq_red.c optional altq \ - compile-with "${NORMAL_C}" -contrib/altq/altq/altq_rio.c optional altq \ - compile-with "${NORMAL_C}" -contrib/altq/altq/altq_rmclass.c optional altq -contrib/altq/altq/altq_subr.c optional altq \ - compile-with "${NORMAL_C}" +contrib/altq/altq/altq_cbq.c optional altq +contrib/altq/altq/altq_cdnr.c optional altq +contrib/altq/altq/altq_hfsc.c optional altq +contrib/altq/altq/altq_priq.c optional altq +contrib/altq/altq/altq_red.c optional altq +contrib/altq/altq/altq_rio.c optional altq +contrib/altq/altq/altq_rmclass.c optional altq +contrib/altq/altq/altq_subr.c optional altq contrib/dev/acpica/components/debugger/dbcmds.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbdisply.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbexec.c optional acpi acpi_debug From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 03:27:44 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 46FD7198; Tue, 13 Nov 2012 03:27:44 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2C79E8FC0C; Tue, 13 Nov 2012 03:27:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAD3RioE071923; Tue, 13 Nov 2012 03:27:44 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAD3RhZG071902; Tue, 13 Nov 2012 03:27:43 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201211130327.qAD3RhZG071902@svn.freebsd.org> From: David Chisnall Date: Tue, 13 Nov 2012 03:27:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242945 - in head/contrib/libc++: include include/ext src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 03:27:44 -0000 Author: theraven Date: Tue Nov 13 03:27:43 2012 New Revision: 242945 URL: http://svnweb.freebsd.org/changeset/base/242945 Log: Import new version of libc++ into base. Modified: head/contrib/libc++/include/__config head/contrib/libc++/include/__functional_base head/contrib/libc++/include/__functional_base_03 head/contrib/libc++/include/__locale head/contrib/libc++/include/__mutex_base head/contrib/libc++/include/algorithm head/contrib/libc++/include/cmath head/contrib/libc++/include/complex head/contrib/libc++/include/condition_variable head/contrib/libc++/include/cstddef head/contrib/libc++/include/ext/__hash head/contrib/libc++/include/future head/contrib/libc++/include/ios head/contrib/libc++/include/istream head/contrib/libc++/include/iterator head/contrib/libc++/include/locale head/contrib/libc++/include/memory head/contrib/libc++/include/ostream head/contrib/libc++/include/random head/contrib/libc++/include/streambuf head/contrib/libc++/include/string head/contrib/libc++/include/system_error head/contrib/libc++/include/tuple head/contrib/libc++/include/type_traits head/contrib/libc++/include/utility head/contrib/libc++/include/valarray head/contrib/libc++/include/vector head/contrib/libc++/src/memory.cpp Directory Properties: head/contrib/libc++/ (props changed) Modified: head/contrib/libc++/include/__config ============================================================================== --- head/contrib/libc++/include/__config Tue Nov 13 03:09:26 2012 (r242944) +++ head/contrib/libc++/include/__config Tue Nov 13 03:27:43 2012 (r242945) @@ -415,11 +415,11 @@ template struct __static_asse #endif #ifdef _LIBCPP_HAS_NO_STRONG_ENUMS -#define _LIBCPP_DECLARE_STRONG_ENUM(x) struct _LIBCPP_VISIBLE x { enum _ +#define _LIBCPP_DECLARE_STRONG_ENUM(x) struct _LIBCPP_VISIBLE x { enum __lx #define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) \ - _ __v_; \ - _LIBCPP_ALWAYS_INLINE x(_ __v) : __v_(__v) {} \ - _LIBCPP_ALWAYS_INLINE explicit x(int __v) : __v_(static_cast<_>(__v)) {} \ + __lx __v_; \ + _LIBCPP_ALWAYS_INLINE x(__lx __v) : __v_(__v) {} \ + _LIBCPP_ALWAYS_INLINE explicit x(int __v) : __v_(static_cast<__lx>(__v)) {} \ _LIBCPP_ALWAYS_INLINE operator int() const {return __v_;} \ }; #else // _LIBCPP_HAS_NO_STRONG_ENUMS @@ -427,6 +427,10 @@ template struct __static_asse #define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) #endif // _LIBCPP_HAS_NO_STRONG_ENUMS +#ifndef _LIBCPP_EXTERN_TEMPLATE +#define _LIBCPP_EXTERN_TEMPLATE(...) extern template __VA_ARGS__; +#endif + #if __APPLE__ || __FreeBSD__ || _WIN32 || __sun__ #define _LIBCPP_LOCALE__L_EXTENSIONS 1 #endif Modified: head/contrib/libc++/include/__functional_base ============================================================================== --- head/contrib/libc++/include/__functional_base Tue Nov 13 03:09:26 2012 (r242944) +++ head/contrib/libc++/include/__functional_base Tue Nov 13 03:27:43 2012 (r242945) @@ -43,7 +43,7 @@ template struct __has_result_type { private: - struct __two {char _; char __;}; + struct __two {char __lx; char __lxx;}; template static __two __test(...); template static char __test(typename _Up::result_type* = 0); public: @@ -69,7 +69,7 @@ template struct __derives_from_unary_function { private: - struct __two {char _; char __;}; + struct __two {char __lx; char __lxx;}; static __two __test(...); template static unary_function<_Ap, _Rp> @@ -83,7 +83,7 @@ template struct __derives_from_binary_function { private: - struct __two {char _; char __;}; + struct __two {char __lx; char __lxx;}; static __two __test(...); template static binary_function<_A1, _A2, _Rp> Modified: head/contrib/libc++/include/__functional_base_03 ============================================================================== --- head/contrib/libc++/include/__functional_base_03 Tue Nov 13 03:09:26 2012 (r242944) +++ head/contrib/libc++/include/__functional_base_03 Tue Nov 13 03:27:43 2012 (r242945) @@ -19,7 +19,7 @@ template struct __derives_from_unary_function { private: - struct __two {char _; char __;}; + struct __two {char __lx; char __lxx;}; static __two __test(...); template static unary_function<_Ap, _Rp> @@ -33,7 +33,7 @@ template struct __derives_from_binary_function { private: - struct __two {char _; char __;}; + struct __two {char __lx; char __lxx;}; static __two __test(...); template static binary_function<_A1, _A2, _Rp> @@ -943,7 +943,7 @@ template struct __has_type { private: - struct __two {char _; char __;}; + struct __two {char __lx; char __lxx;}; template static __two __test(...); template static char __test(typename _Up::type* = 0); public: Modified: head/contrib/libc++/include/__locale ============================================================================== --- head/contrib/libc++/include/__locale Tue Nov 13 03:09:26 2012 (r242944) +++ head/contrib/libc++/include/__locale Tue Nov 13 03:27:43 2012 (r242945) @@ -254,8 +254,8 @@ collate<_CharT>::do_hash(const char_type return static_cast(__h); } -extern template class _LIBCPP_VISIBLE collate; -extern template class _LIBCPP_VISIBLE collate; +_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_VISIBLE collate) +_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_VISIBLE collate) // template class collate_byname; @@ -1135,10 +1135,10 @@ codecvt_byname<_InternT, _ExternT, _Stat { } -extern template class codecvt_byname; -extern template class codecvt_byname; -extern template class codecvt_byname; -extern template class codecvt_byname; +_LIBCPP_EXTERN_TEMPLATE(class codecvt_byname) +_LIBCPP_EXTERN_TEMPLATE(class codecvt_byname) +_LIBCPP_EXTERN_TEMPLATE(class codecvt_byname) +_LIBCPP_EXTERN_TEMPLATE(class codecvt_byname) _LIBCPP_VISIBLE void __throw_runtime_error(const char*); Modified: head/contrib/libc++/include/__mutex_base ============================================================================== --- head/contrib/libc++/include/__mutex_base Tue Nov 13 03:09:26 2012 (r242944) +++ head/contrib/libc++/include/__mutex_base Tue Nov 13 03:27:43 2012 (r242945) @@ -287,14 +287,14 @@ swap(unique_lock<_Mutex>& __x, unique_lo struct _LIBCPP_VISIBLE cv_status { - enum _ { + enum __lx { no_timeout, timeout }; - _ __v_; + __lx __v_; - _LIBCPP_INLINE_VISIBILITY cv_status(_ __v) : __v_(__v) {} + _LIBCPP_INLINE_VISIBILITY cv_status(__lx __v) : __v_(__v) {} _LIBCPP_INLINE_VISIBILITY operator int() const {return __v_;} }; Modified: head/contrib/libc++/include/algorithm ============================================================================== --- head/contrib/libc++/include/algorithm Tue Nov 13 03:09:26 2012 (r242944) +++ head/contrib/libc++/include/algorithm Tue Nov 13 03:27:43 2012 (r242945) @@ -3782,39 +3782,39 @@ sort(__wrap_iter<_Tp*> __first, __wrap_i #pragma warning( push ) #pragma warning( disable: 4231) #endif // _MSC_VER -extern template void __sort<__less&, char*>(char*, char*, __less&); -extern template void __sort<__less&, wchar_t*>(wchar_t*, wchar_t*, __less&); -extern template void __sort<__less&, signed char*>(signed char*, signed char*, __less&); -extern template void __sort<__less&, unsigned char*>(unsigned char*, unsigned char*, __less&); -extern template void __sort<__less&, short*>(short*, short*, __less&); -extern template void __sort<__less&, unsigned short*>(unsigned short*, unsigned short*, __less&); -extern template void __sort<__less&, int*>(int*, int*, __less&); -extern template void __sort<__less&, unsigned*>(unsigned*, unsigned*, __less&); -extern template void __sort<__less&, long*>(long*, long*, __less&); -extern template void __sort<__less&, unsigned long*>(unsigned long*, unsigned long*, __less&); -extern template void __sort<__less&, long long*>(long long*, long long*, __less&); -extern template void __sort<__less&, unsigned long long*>(unsigned long long*, unsigned long long*, __less&); -extern template void __sort<__less&, float*>(float*, float*, __less&); -extern template void __sort<__less&, double*>(double*, double*, __less&); -extern template void __sort<__less&, long double*>(long double*, long double*, __less&); - -extern template bool __insertion_sort_incomplete<__less&, char*>(char*, char*, __less&); -extern template bool __insertion_sort_incomplete<__less&, wchar_t*>(wchar_t*, wchar_t*, __less&); -extern template bool __insertion_sort_incomplete<__less&, signed char*>(signed char*, signed char*, __less&); -extern template bool __insertion_sort_incomplete<__less&, unsigned char*>(unsigned char*, unsigned char*, __less&); -extern template bool __insertion_sort_incomplete<__less&, short*>(short*, short*, __less&); -extern template bool __insertion_sort_incomplete<__less&, unsigned short*>(unsigned short*, unsigned short*, __less&); -extern template bool __insertion_sort_incomplete<__less&, int*>(int*, int*, __less&); -extern template bool __insertion_sort_incomplete<__less&, unsigned*>(unsigned*, unsigned*, __less&); -extern template bool __insertion_sort_incomplete<__less&, long*>(long*, long*, __less&); -extern template bool __insertion_sort_incomplete<__less&, unsigned long*>(unsigned long*, unsigned long*, __less&); -extern template bool __insertion_sort_incomplete<__less&, long long*>(long long*, long long*, __less&); -extern template bool __insertion_sort_incomplete<__less&, unsigned long long*>(unsigned long long*, unsigned long long*, __less&); -extern template bool __insertion_sort_incomplete<__less&, float*>(float*, float*, __less&); -extern template bool __insertion_sort_incomplete<__less&, double*>(double*, double*, __less&); -extern template bool __insertion_sort_incomplete<__less&, long double*>(long double*, long double*, __less&); +_LIBCPP_EXTERN_TEMPLATE(void __sort<__less&, char*>(char*, char*, __less&)) +_LIBCPP_EXTERN_TEMPLATE(void __sort<__less&, wchar_t*>(wchar_t*, wchar_t*, __less&)) +_LIBCPP_EXTERN_TEMPLATE(void __sort<__less&, signed char*>(signed char*, signed char*, __less&)) +_LIBCPP_EXTERN_TEMPLATE(void __sort<__less&, unsigned char*>(unsigned char*, unsigned char*, __less&)) +_LIBCPP_EXTERN_TEMPLATE(void __sort<__less&, short*>(short*, short*, __less&)) +_LIBCPP_EXTERN_TEMPLATE(void __sort<__less&, unsigned short*>(unsigned short*, unsigned short*, __less&)) +_LIBCPP_EXTERN_TEMPLATE(void __sort<__less&, int*>(int*, int*, __less&)) +_LIBCPP_EXTERN_TEMPLATE(void __sort<__less&, unsigned*>(unsigned*, unsigned*, __less&)) +_LIBCPP_EXTERN_TEMPLATE(void __sort<__less&, long*>(long*, long*, __less&)) +_LIBCPP_EXTERN_TEMPLATE(void __sort<__less&, unsigned long*>(unsigned long*, unsigned long*, __less&)) +_LIBCPP_EXTERN_TEMPLATE(void __sort<__less&, long long*>(long long*, long long*, __less&)) +_LIBCPP_EXTERN_TEMPLATE(void __sort<__less&, unsigned long long*>(unsigned long long*, unsigned long long*, __less&)) +_LIBCPP_EXTERN_TEMPLATE(void __sort<__less&, float*>(float*, float*, __less&)) +_LIBCPP_EXTERN_TEMPLATE(void __sort<__less&, double*>(double*, double*, __less&)) +_LIBCPP_EXTERN_TEMPLATE(void __sort<__less&, long double*>(long double*, long double*, __less&)) + +_LIBCPP_EXTERN_TEMPLATE(bool __insertion_sort_incomplete<__less&, char*>(char*, char*, __less&)) +_LIBCPP_EXTERN_TEMPLATE(bool __insertion_sort_incomplete<__less&, wchar_t*>(wchar_t*, wchar_t*, __less&)) +_LIBCPP_EXTERN_TEMPLATE(bool __insertion_sort_incomplete<__less&, signed char*>(signed char*, signed char*, __less&)) +_LIBCPP_EXTERN_TEMPLATE(bool __insertion_sort_incomplete<__less&, unsigned char*>(unsigned char*, unsigned char*, __less&)) +_LIBCPP_EXTERN_TEMPLATE(bool __insertion_sort_incomplete<__less&, short*>(short*, short*, __less&)) +_LIBCPP_EXTERN_TEMPLATE(bool __insertion_sort_incomplete<__less&, unsigned short*>(unsigned short*, unsigned short*, __less&)) +_LIBCPP_EXTERN_TEMPLATE(bool __insertion_sort_incomplete<__less&, int*>(int*, int*, __less&)) +_LIBCPP_EXTERN_TEMPLATE(bool __insertion_sort_incomplete<__less&, unsigned*>(unsigned*, unsigned*, __less&)) +_LIBCPP_EXTERN_TEMPLATE(bool __insertion_sort_incomplete<__less&, long*>(long*, long*, __less&)) +_LIBCPP_EXTERN_TEMPLATE(bool __insertion_sort_incomplete<__less&, unsigned long*>(unsigned long*, unsigned long*, __less&)) +_LIBCPP_EXTERN_TEMPLATE(bool __insertion_sort_incomplete<__less&, long long*>(long long*, long long*, __less&)) +_LIBCPP_EXTERN_TEMPLATE(bool __insertion_sort_incomplete<__less&, unsigned long long*>(unsigned long long*, unsigned long long*, __less&)) +_LIBCPP_EXTERN_TEMPLATE(bool __insertion_sort_incomplete<__less&, float*>(float*, float*, __less&)) +_LIBCPP_EXTERN_TEMPLATE(bool __insertion_sort_incomplete<__less&, double*>(double*, double*, __less&)) +_LIBCPP_EXTERN_TEMPLATE(bool __insertion_sort_incomplete<__less&, long double*>(long double*, long double*, __less&)) -extern template unsigned __sort5<__less&, long double*>(long double*, long double*, long double*, long double*, long double*, __less&); +_LIBCPP_EXTERN_TEMPLATE(unsigned __sort5<__less&, long double*>(long double*, long double*, long double*, long double*, long double*, __less&)) #ifdef _MSC_VER #pragma warning( pop ) #endif // _MSC_VER Modified: head/contrib/libc++/include/cmath ============================================================================== --- head/contrib/libc++/include/cmath Tue Nov 13 03:09:26 2012 (r242944) +++ head/contrib/libc++/include/cmath Tue Nov 13 03:27:43 2012 (r242945) @@ -1202,7 +1202,9 @@ fdim(_A1 __x, _A2 __y) _NOEXCEPT // fma inline _LIBCPP_INLINE_VISIBILITY float fmaf(float __x, float __y, float __z) _NOEXCEPT {return (float)((double)__x*__y + __z);} +#ifndef FP_FAST_FMAF #define FP_FAST_FMAF +#endif using ::fma; Modified: head/contrib/libc++/include/complex ============================================================================== --- head/contrib/libc++/include/complex Tue Nov 13 03:09:26 2012 (r242944) +++ head/contrib/libc++/include/complex Tue Nov 13 03:27:43 2012 (r242945) @@ -1249,10 +1249,12 @@ acosh(const complex<_Tp>& __x) if (isnan(__x.imag())) return complex<_Tp>(abs(__x.real()), __x.imag()); if (isinf(__x.imag())) + { if (__x.real() > 0) return complex<_Tp>(__x.real(), copysign(__pi * _Tp(0.25), __x.imag())); else return complex<_Tp>(-__x.real(), copysign(__pi * _Tp(0.75), __x.imag())); + } if (__x.real() < 0) return complex<_Tp>(-__x.real(), copysign(__pi, __x.imag())); return complex<_Tp>(__x.real(), copysign(_Tp(0), __x.imag())); Modified: head/contrib/libc++/include/condition_variable ============================================================================== --- head/contrib/libc++/include/condition_variable Tue Nov 13 03:09:26 2012 (r242944) +++ head/contrib/libc++/include/condition_variable Tue Nov 13 03:27:43 2012 (r242945) @@ -163,7 +163,7 @@ inline _LIBCPP_INLINE_VISIBILITY void condition_variable_any::notify_one() _NOEXCEPT { - {lock_guard _(*__mut_);} + {lock_guard __lx(*__mut_);} __cv_.notify_one(); } @@ -171,7 +171,7 @@ inline _LIBCPP_INLINE_VISIBILITY void condition_variable_any::notify_all() _NOEXCEPT { - {lock_guard _(*__mut_);} + {lock_guard __lx(*__mut_);} __cv_.notify_all(); } @@ -188,8 +188,8 @@ condition_variable_any::wait(_Lock& __lo shared_ptr __mut = __mut_; unique_lock __lk(*__mut); __lock.unlock(); - unique_ptr<_Lock, __lock_external> __(&__lock); - lock_guard > _(__lk, adopt_lock); + unique_ptr<_Lock, __lock_external> __lxx(&__lock); + lock_guard > __lx(__lk, adopt_lock); __cv_.wait(__lk); } // __mut_.unlock(), __lock.lock() @@ -210,8 +210,8 @@ condition_variable_any::wait_until(_Lock shared_ptr __mut = __mut_; unique_lock __lk(*__mut); __lock.unlock(); - unique_ptr<_Lock, __lock_external> __(&__lock); - lock_guard > _(__lk, adopt_lock); + unique_ptr<_Lock, __lock_external> __lxx(&__lock); + lock_guard > __lx(__lk, adopt_lock); return __cv_.wait_until(__lk, __t); } // __mut_.unlock(), __lock.lock() Modified: head/contrib/libc++/include/cstddef ============================================================================== --- head/contrib/libc++/include/cstddef Tue Nov 13 03:09:26 2012 (r242944) +++ head/contrib/libc++/include/cstddef Tue Nov 13 03:27:43 2012 (r242945) @@ -58,12 +58,12 @@ typedef long double max_align_t; struct _LIBCPP_VISIBLE nullptr_t { - void* _; + void* __lx; struct __nat {int __for_bool_;}; - _LIBCPP_ALWAYS_INLINE _LIBCPP_CONSTEXPR nullptr_t() : _(0) {} - _LIBCPP_ALWAYS_INLINE _LIBCPP_CONSTEXPR nullptr_t(int __nat::*) : _(0) {} + _LIBCPP_ALWAYS_INLINE _LIBCPP_CONSTEXPR nullptr_t() : __lx(0) {} + _LIBCPP_ALWAYS_INLINE _LIBCPP_CONSTEXPR nullptr_t(int __nat::*) : __lx(0) {} _LIBCPP_ALWAYS_INLINE _LIBCPP_CONSTEXPR operator int __nat::*() const {return 0;} Modified: head/contrib/libc++/include/ext/__hash ============================================================================== --- head/contrib/libc++/include/ext/__hash Tue Nov 13 03:09:26 2012 (r242944) +++ head/contrib/libc++/include/ext/__hash Tue Nov 13 03:27:43 2012 (r242945) @@ -43,4 +43,4 @@ template <> struct _LIBCPP_VISIBLE hash< }; } -#endif _LIBCPP_EXT_HASH +#endif // _LIBCPP_EXT_HASH Modified: head/contrib/libc++/include/future ============================================================================== --- head/contrib/libc++/include/future Tue Nov 13 03:09:26 2012 (r242944) +++ head/contrib/libc++/include/future Tue Nov 13 03:27:43 2012 (r242945) @@ -391,7 +391,7 @@ struct _LIBCPP_VISIBLE is_error_code_enu #ifdef _LIBCPP_HAS_NO_STRONG_ENUMS template <> -struct _LIBCPP_VISIBLE is_error_code_enum : public true_type { }; +struct _LIBCPP_VISIBLE is_error_code_enum : public true_type { }; #endif //enum class launch Modified: head/contrib/libc++/include/ios ============================================================================== --- head/contrib/libc++/include/ios Tue Nov 13 03:09:26 2012 (r242944) +++ head/contrib/libc++/include/ios Tue Nov 13 03:27:43 2012 (r242945) @@ -384,7 +384,7 @@ struct _LIBCPP_VISIBLE is_error_code_enu #ifdef _LIBCPP_HAS_NO_STRONG_ENUMS template <> -struct _LIBCPP_VISIBLE is_error_code_enum : public true_type { }; +struct _LIBCPP_VISIBLE is_error_code_enum : public true_type { }; #endif _LIBCPP_VISIBLE Modified: head/contrib/libc++/include/istream ============================================================================== --- head/contrib/libc++/include/istream Tue Nov 13 03:09:26 2012 (r242944) +++ head/contrib/libc++/include/istream Tue Nov 13 03:27:43 2012 (r242945) @@ -1189,7 +1189,11 @@ basic_istream<_CharT, _Traits>::peek() #endif // _LIBCPP_NO_EXCEPTIONS sentry __sen(*this, true); if (__sen) + { __r = this->rdbuf()->sgetc(); + if (traits_type::eq_int_type(__r, traits_type::eof())) + this->setstate(ios_base::eofbit); + } #ifndef _LIBCPP_NO_EXCEPTIONS } catch (...) @@ -1706,9 +1710,9 @@ operator>>(basic_istream<_CharT, _Traits return __is; } -extern template class basic_istream; -extern template class basic_istream; -extern template class basic_iostream; +_LIBCPP_EXTERN_TEMPLATE(class basic_istream) +_LIBCPP_EXTERN_TEMPLATE(class basic_istream) +_LIBCPP_EXTERN_TEMPLATE(class basic_iostream) _LIBCPP_END_NAMESPACE_STD Modified: head/contrib/libc++/include/iterator ============================================================================== --- head/contrib/libc++/include/iterator Tue Nov 13 03:09:26 2012 (r242944) +++ head/contrib/libc++/include/iterator Tue Nov 13 03:27:43 2012 (r242945) @@ -337,7 +337,7 @@ template struct __has_iterator_category { private: - struct __two {char _; char __;}; + struct __two {char __lx; char __lxx;}; template static __two __test(...); template static char __test(typename _Up::iterator_category* = 0); public: Modified: head/contrib/libc++/include/locale ============================================================================== --- head/contrib/libc++/include/locale Tue Nov 13 03:09:26 2012 (r242944) +++ head/contrib/libc++/include/locale Tue Nov 13 03:27:43 2012 (r242945) @@ -692,8 +692,8 @@ __num_get<_CharT>::__stage2_float_loop(_ return 0; } -extern template struct __num_get; -extern template struct __num_get; +_LIBCPP_EXTERN_TEMPLATE(struct __num_get) +_LIBCPP_EXTERN_TEMPLATE(struct __num_get) template > class _LIBCPP_VISIBLE num_get @@ -1314,8 +1314,8 @@ num_get<_CharT, _InputIterator>::do_get( return __b; } -extern template class num_get; -extern template class num_get; +_LIBCPP_EXTERN_TEMPLATE(class num_get) +_LIBCPP_EXTERN_TEMPLATE(class num_get) struct __num_put_base { @@ -1464,8 +1464,8 @@ __num_put<_CharT>::__widen_and_group_flo __op = __ob + (__np - __nb); } -extern template struct __num_put; -extern template struct __num_put; +_LIBCPP_EXTERN_TEMPLATE(struct __num_put) +_LIBCPP_EXTERN_TEMPLATE(struct __num_put) template > class _LIBCPP_VISIBLE num_put @@ -1938,8 +1938,8 @@ num_put<_CharT, _OutputIterator>::do_put return __pad_and_output(__s, __o, __op, __oe, __iob, __fl); } -extern template class num_put; -extern template class num_put; +_LIBCPP_EXTERN_TEMPLATE(class num_put) +_LIBCPP_EXTERN_TEMPLATE(class num_put) template _LIBCPP_HIDDEN @@ -2605,8 +2605,8 @@ time_get<_CharT, _InputIterator>::do_get return __b; } -extern template class time_get; -extern template class time_get; +_LIBCPP_EXTERN_TEMPLATE(class time_get) +_LIBCPP_EXTERN_TEMPLATE(class time_get) class __time_get { @@ -2688,8 +2688,8 @@ private: virtual const string_type& __X() const {return this->__X_;} }; -extern template class time_get_byname; -extern template class time_get_byname; +_LIBCPP_EXTERN_TEMPLATE(class time_get_byname) +_LIBCPP_EXTERN_TEMPLATE(class time_get_byname) class __time_put { @@ -2801,8 +2801,8 @@ time_put<_CharT, _OutputIterator>::do_pu return _VSTD::copy(__nb, __ne, __s); } -extern template class time_put; -extern template class time_put; +_LIBCPP_EXTERN_TEMPLATE(class time_put) +_LIBCPP_EXTERN_TEMPLATE(class time_put) template > class _LIBCPP_VISIBLE time_put_byname @@ -2822,8 +2822,8 @@ protected: ~time_put_byname() {} }; -extern template class time_put_byname; -extern template class time_put_byname; +_LIBCPP_EXTERN_TEMPLATE(class time_put_byname) +_LIBCPP_EXTERN_TEMPLATE(class time_put_byname) // money_base @@ -2885,10 +2885,10 @@ template ::id; -extern template class moneypunct; -extern template class moneypunct; -extern template class moneypunct; -extern template class moneypunct; +_LIBCPP_EXTERN_TEMPLATE(class moneypunct) +_LIBCPP_EXTERN_TEMPLATE(class moneypunct) +_LIBCPP_EXTERN_TEMPLATE(class moneypunct) +_LIBCPP_EXTERN_TEMPLATE(class moneypunct) // moneypunct_byname @@ -2942,10 +2942,10 @@ template<> void moneypunct_byname void moneypunct_byname::init(const char*); template<> void moneypunct_byname::init(const char*); -extern template class moneypunct_byname; -extern template class moneypunct_byname; -extern template class moneypunct_byname; -extern template class moneypunct_byname; +_LIBCPP_EXTERN_TEMPLATE(class moneypunct_byname) +_LIBCPP_EXTERN_TEMPLATE(class moneypunct_byname) +_LIBCPP_EXTERN_TEMPLATE(class moneypunct_byname) +_LIBCPP_EXTERN_TEMPLATE(class moneypunct_byname) // money_get @@ -3001,8 +3001,8 @@ __money_get<_CharT>::__gather_info(bool } } -extern template class __money_get; -extern template class __money_get; +_LIBCPP_EXTERN_TEMPLATE(class __money_get) +_LIBCPP_EXTERN_TEMPLATE(class __money_get) template > class _LIBCPP_VISIBLE money_get @@ -3382,8 +3382,8 @@ money_get<_CharT, _InputIterator>::do_ge return __b; } -extern template class money_get; -extern template class money_get; +_LIBCPP_EXTERN_TEMPLATE(class money_get) +_LIBCPP_EXTERN_TEMPLATE(class money_get) // money_put @@ -3557,8 +3557,8 @@ __money_put<_CharT>::__format(char_type* __mi = __mb; } -extern template class __money_put; -extern template class __money_put; +_LIBCPP_EXTERN_TEMPLATE(class __money_put) +_LIBCPP_EXTERN_TEMPLATE(class __money_put) template > class _LIBCPP_VISIBLE money_put @@ -3714,8 +3714,8 @@ money_put<_CharT, _OutputIterator>::do_p return __pad_and_output(__s, __mb, __mi, __me, __iob, __fl); } -extern template class money_put; -extern template class money_put; +_LIBCPP_EXTERN_TEMPLATE(class money_put) +_LIBCPP_EXTERN_TEMPLATE(class money_put) // messages @@ -3824,8 +3824,8 @@ messages<_CharT>::do_close(catalog __c) #endif // !_WIN32 } -extern template class messages; -extern template class messages; +_LIBCPP_EXTERN_TEMPLATE(class messages) +_LIBCPP_EXTERN_TEMPLATE(class messages) template class _LIBCPP_VISIBLE messages_byname @@ -3848,8 +3848,8 @@ protected: ~messages_byname() {} }; -extern template class messages_byname; -extern template class messages_byname; +_LIBCPP_EXTERN_TEMPLATE(class messages_byname) +_LIBCPP_EXTERN_TEMPLATE(class messages_byname) template, Modified: head/contrib/libc++/include/memory ============================================================================== --- head/contrib/libc++/include/memory Tue Nov 13 03:09:26 2012 (r242944) +++ head/contrib/libc++/include/memory Tue Nov 13 03:27:43 2012 (r242945) @@ -694,7 +694,7 @@ template struct __has_element_type { private: - struct __two {char _; char __;}; + struct __two {char __lx; char __lxx;}; template static __two __test(...); template static char __test(typename _Up::element_type* = 0); public: @@ -782,7 +782,7 @@ template struct __has_difference_type { private: - struct __two {char _; char __;}; + struct __two {char __lx; char __lxx;}; template static __two __test(...); template static char __test(typename _Up::difference_type* = 0); public: @@ -805,7 +805,7 @@ template struct __has_rebind { private: - struct __two {char _; char __;}; + struct __two {char __lx; char __lxx;}; template static __two __test(...); template static char __test(typename _Xp::template rebind<_Up>* = 0); public: @@ -998,7 +998,7 @@ template struct __has_const_pointer { private: - struct __two {char _; char __;}; + struct __two {char __lx; char __lxx;}; template static __two __test(...); template static char __test(typename _Up::const_pointer* = 0); public: @@ -1025,7 +1025,7 @@ template struct __has_void_pointer { private: - struct __two {char _; char __;}; + struct __two {char __lx; char __lxx;}; template static __two __test(...); template static char __test(typename _Up::void_pointer* = 0); public: @@ -1052,7 +1052,7 @@ template struct __has_const_void_pointer { private: - struct __two {char _; char __;}; + struct __two {char __lx; char __lxx;}; template static __two __test(...); template static char __test(typename _Up::const_void_pointer* = 0); public: @@ -1095,7 +1095,7 @@ template struct __has_size_type { private: - struct __two {char _; char __;}; + struct __two {char __lx; char __lxx;}; template static __two __test(...); template static char __test(typename _Up::size_type* = 0); public: @@ -1118,7 +1118,7 @@ template struct __has_propagate_on_container_copy_assignment { private: - struct __two {char _; char __;}; + struct __two {char __lx; char __lxx;}; template static __two __test(...); template static char __test(typename _Up::propagate_on_container_copy_assignment* = 0); public: @@ -1141,7 +1141,7 @@ template struct __has_propagate_on_container_move_assignment { private: - struct __two {char _; char __;}; + struct __two {char __lx; char __lxx;}; template static __two __test(...); template static char __test(typename _Up::propagate_on_container_move_assignment* = 0); public: @@ -1164,7 +1164,7 @@ template struct __has_propagate_on_container_swap { private: - struct __two {char _; char __;}; + struct __two {char __lx; char __lxx;}; template static __two __test(...); template static char __test(typename _Up::propagate_on_container_swap* = 0); public: @@ -1187,7 +1187,7 @@ template static __two __test(...); template static char __test(typename _Xp::template rebind<_Up>::other* = 0); public: @@ -5268,7 +5268,7 @@ operator<<(basic_ostream<_CharT, _Traits class __sp_mut { - void* _; + void* __lx; public: void lock() _NOEXCEPT; void unlock() _NOEXCEPT; @@ -5395,17 +5395,17 @@ atomic_compare_exchange_weak_explicit(sh //enum class struct _LIBCPP_VISIBLE pointer_safety { - enum _ + enum __lx { relaxed, preferred, strict }; - _ __v_; + __lx __v_; _LIBCPP_INLINE_VISIBILITY - pointer_safety(_ __v) : __v_(__v) {} + pointer_safety(__lx __v) : __v_(__v) {} _LIBCPP_INLINE_VISIBILITY operator int() const {return __v_;} }; Modified: head/contrib/libc++/include/ostream ============================================================================== --- head/contrib/libc++/include/ostream Tue Nov 13 03:09:26 2012 (r242944) +++ head/contrib/libc++/include/ostream Tue Nov 13 03:27:43 2012 (r242945) @@ -1287,8 +1287,8 @@ operator<<(basic_ostream<_CharT, _Traits use_facet >(__os.getloc()).widen('1')); } -extern template class basic_ostream; -extern template class basic_ostream; +_LIBCPP_EXTERN_TEMPLATE(class basic_ostream) +_LIBCPP_EXTERN_TEMPLATE(class basic_ostream) _LIBCPP_END_NAMESPACE_STD Modified: head/contrib/libc++/include/random ============================================================================== --- head/contrib/libc++/include/random Tue Nov 13 03:09:26 2012 (r242944) +++ head/contrib/libc++/include/random Tue Nov 13 03:27:43 2012 (r242945) @@ -1991,7 +1991,7 @@ basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const linear_congruential_engine<_UIntType, __a, __c, __m>& __x) { - __save_flags<_CharT, _Traits> _(__os); + __save_flags<_CharT, _Traits> __lx(__os); __os.flags(ios_base::dec | ios_base::left); __os.fill(__os.widen(' ')); return __os << __x.__x_; @@ -2003,7 +2003,7 @@ basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __is, linear_congruential_engine<_UIntType, __a, __c, __m>& __x) { - __save_flags<_CharT, _Traits> _(__is); + __save_flags<_CharT, _Traits> __lx(__is); __is.flags(ios_base::dec | ios_base::skipws); _UIntType __t; __is >> __t; @@ -2377,7 +2377,7 @@ operator<<(basic_ostream<_CharT, _Traits const mersenne_twister_engine<_UI, _Wp, _Np, _Mp, _Rp, _Ap, _Up, _Dp, _Sp, _Bp, _Tp, _Cp, _Lp, _Fp>& __x) { - __save_flags<_CharT, _Traits> _(__os); + __save_flags<_CharT, _Traits> __lx(__os); __os.flags(ios_base::dec | ios_base::left); _CharT __sp = __os.widen(' '); __os.fill(__sp); @@ -2398,7 +2398,7 @@ operator>>(basic_istream<_CharT, _Traits mersenne_twister_engine<_UI, _Wp, _Np, _Mp, _Rp, _Ap, _Up, _Dp, _Sp, _Bp, _Tp, _Cp, _Lp, _Fp>& __x) { - __save_flags<_CharT, _Traits> _(__is); + __save_flags<_CharT, _Traits> __lx(__is); __is.flags(ios_base::dec | ios_base::skipws); _UI __t[_Np]; for (size_t __i = 0; __i < _Np; ++__i) @@ -2684,7 +2684,7 @@ basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const subtract_with_carry_engine<_UI, _Wp, _Sp, _Rp>& __x) { - __save_flags<_CharT, _Traits> _(__os); + __save_flags<_CharT, _Traits> __lx(__os); __os.flags(ios_base::dec | ios_base::left); _CharT __sp = __os.widen(' '); __os.fill(__sp); @@ -2703,7 +2703,7 @@ basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __is, subtract_with_carry_engine<_UI, _Wp, _Sp, _Rp>& __x) { - __save_flags<_CharT, _Traits> _(__is); + __save_flags<_CharT, _Traits> __lx(__is); __is.flags(ios_base::dec | ios_base::skipws); _UI __t[_Rp+1]; for (size_t __i = 0; __i < _Rp+1; ++__i) @@ -2859,7 +2859,7 @@ basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const discard_block_engine<_Eng, _Pp, _Rp>& __x) { - __save_flags<_CharT, _Traits> _(__os); + __save_flags<_CharT, _Traits> __lx(__os); __os.flags(ios_base::dec | ios_base::left); _CharT __sp = __os.widen(' '); __os.fill(__sp); @@ -2872,7 +2872,7 @@ basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __is, discard_block_engine<_Eng, _Pp, _Rp>& __x) { - __save_flags<_CharT, _Traits> _(__is); + __save_flags<_CharT, _Traits> __lx(__is); __is.flags(ios_base::dec | ios_base::skipws); _Eng __e; int __n; @@ -3340,7 +3340,7 @@ basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const shuffle_order_engine<_Eng, _Kp>& __x) { - __save_flags<_CharT, _Traits> _(__os); + __save_flags<_CharT, _Traits> __lx(__os); __os.flags(ios_base::dec | ios_base::left); _CharT __sp = __os.widen(' '); __os.fill(__sp); @@ -3357,7 +3357,7 @@ operator>>(basic_istream<_CharT, _Traits shuffle_order_engine<_Eng, _Kp>& __x) { typedef typename shuffle_order_engine<_Eng, _Kp>::result_type result_type; - __save_flags<_CharT, _Traits> _(__is); + __save_flags<_CharT, _Traits> __lx(__is); __is.flags(ios_base::dec | ios_base::skipws); _Eng __e; result_type _Vp[_Kp+1]; @@ -3561,7 +3561,7 @@ basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const uniform_int_distribution<_IT>& __x) { - __save_flags<_CharT, _Traits> _(__os); + __save_flags<_CharT, _Traits> __lx(__os); __os.flags(ios_base::dec | ios_base::left); _CharT __sp = __os.widen(' '); __os.fill(__sp); @@ -3576,7 +3576,7 @@ operator>>(basic_istream<_CharT, _Traits typedef uniform_int_distribution<_IT> _Eng; typedef typename _Eng::result_type result_type; typedef typename _Eng::param_type param_type; - __save_flags<_CharT, _Traits> _(__is); + __save_flags<_CharT, _Traits> __lx(__is); __is.flags(ios_base::dec | ios_base::skipws); result_type __a; result_type __b; @@ -3682,7 +3682,7 @@ basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const uniform_real_distribution<_RT>& __x) { - __save_flags<_CharT, _Traits> _(__os); + __save_flags<_CharT, _Traits> __lx(__os); __os.flags(ios_base::dec | ios_base::left | ios_base::fixed | ios_base::scientific); _CharT __sp = __os.widen(' '); @@ -3698,7 +3698,7 @@ operator>>(basic_istream<_CharT, _Traits typedef uniform_real_distribution<_RT> _Eng; typedef typename _Eng::result_type result_type; typedef typename _Eng::param_type param_type; - __save_flags<_CharT, _Traits> _(__is); + __save_flags<_CharT, _Traits> __lx(__is); __is.flags(ios_base::dec | ios_base::skipws); result_type __a; result_type __b; @@ -3793,7 +3793,7 @@ template basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const bernoulli_distribution& __x) { - __save_flags<_CharT, _Traits> _(__os); + __save_flags<_CharT, _Traits> __lx(__os); __os.flags(ios_base::dec | ios_base::left | ios_base::fixed | ios_base::scientific); _CharT __sp = __os.widen(' '); @@ -3807,7 +3807,7 @@ operator>>(basic_istream<_CharT, _Traits { typedef bernoulli_distribution _Eng; typedef typename _Eng::param_type param_type; - __save_flags<_CharT, _Traits> _(__is); + __save_flags<_CharT, _Traits> __lx(__is); __is.flags(ios_base::dec | ios_base::skipws); double __p; __is >> __p; @@ -3955,7 +3955,7 @@ basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const binomial_distribution<_IntType>& __x) { - __save_flags<_CharT, _Traits> _(__os); + __save_flags<_CharT, _Traits> __lx(__os); __os.flags(ios_base::dec | ios_base::left | ios_base::fixed | ios_base::scientific); _CharT __sp = __os.widen(' '); @@ -3971,7 +3971,7 @@ operator>>(basic_istream<_CharT, _Traits typedef binomial_distribution<_IntType> _Eng; typedef typename _Eng::result_type result_type; typedef typename _Eng::param_type param_type; - __save_flags<_CharT, _Traits> _(__is); + __save_flags<_CharT, _Traits> __lx(__is); __is.flags(ios_base::dec | ios_base::skipws); result_type __t; double __p; @@ -4073,7 +4073,7 @@ basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const exponential_distribution<_RealType>& __x) { - __save_flags<_CharT, _Traits> _(__os); + __save_flags<_CharT, _Traits> __lx(__os); __os.flags(ios_base::dec | ios_base::left | ios_base::fixed | ios_base::scientific); return __os << __x.lambda(); @@ -4087,7 +4087,7 @@ operator>>(basic_istream<_CharT, _Traits typedef exponential_distribution<_RealType> _Eng; typedef typename _Eng::result_type result_type; typedef typename _Eng::param_type param_type; - __save_flags<_CharT, _Traits> _(__is); + __save_flags<_CharT, _Traits> __lx(__is); __is.flags(ios_base::dec | ios_base::skipws); result_type __lambda; __is >> __lambda; @@ -4227,7 +4227,7 @@ basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const normal_distribution<_RT>& __x) { - __save_flags<_CharT, _Traits> _(__os); + __save_flags<_CharT, _Traits> __lx(__os); __os.flags(ios_base::dec | ios_base::left | ios_base::fixed | ios_base::scientific); _CharT __sp = __os.widen(' '); @@ -4246,7 +4246,7 @@ operator>>(basic_istream<_CharT, _Traits typedef normal_distribution<_RT> _Eng; typedef typename _Eng::result_type result_type; typedef typename _Eng::param_type param_type; - __save_flags<_CharT, _Traits> _(__is); + __save_flags<_CharT, _Traits> __lx(__is); __is.flags(ios_base::dec | ios_base::skipws); result_type __mean; result_type __stddev; @@ -4598,7 +4598,7 @@ basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const poisson_distribution<_IntType>& __x) { - __save_flags<_CharT, _Traits> _(__os); + __save_flags<_CharT, _Traits> __lx(__os); __os.flags(ios_base::dec | ios_base::left | ios_base::fixed | ios_base::scientific); return __os << __x.mean(); @@ -4611,7 +4611,7 @@ operator>>(basic_istream<_CharT, _Traits { typedef poisson_distribution<_IntType> _Eng; typedef typename _Eng::param_type param_type; - __save_flags<_CharT, _Traits> _(__is); + __save_flags<_CharT, _Traits> __lx(__is); __is.flags(ios_base::dec | ios_base::skipws); double __mean; __is >> __mean; @@ -4709,7 +4709,7 @@ basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const weibull_distribution<_RT>& __x) { - __save_flags<_CharT, _Traits> _(__os); + __save_flags<_CharT, _Traits> __lx(__os); __os.flags(ios_base::dec | ios_base::left | ios_base::fixed | ios_base::scientific); _CharT __sp = __os.widen(' '); @@ -4726,7 +4726,7 @@ operator>>(basic_istream<_CharT, _Traits typedef weibull_distribution<_RT> _Eng; typedef typename _Eng::result_type result_type; typedef typename _Eng::param_type param_type; - __save_flags<_CharT, _Traits> _(__is); + __save_flags<_CharT, _Traits> __lx(__is); __is.flags(ios_base::dec | ios_base::skipws); result_type __a; result_type __b; @@ -4828,7 +4828,7 @@ basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const extreme_value_distribution<_RT>& __x) { - __save_flags<_CharT, _Traits> _(__os); + __save_flags<_CharT, _Traits> __lx(__os); __os.flags(ios_base::dec | ios_base::left | ios_base::fixed | ios_base::scientific); _CharT __sp = __os.widen(' '); @@ -4845,7 +4845,7 @@ operator>>(basic_istream<_CharT, _Traits typedef extreme_value_distribution<_RT> _Eng; typedef typename _Eng::result_type result_type; typedef typename _Eng::param_type param_type; - __save_flags<_CharT, _Traits> _(__is); + __save_flags<_CharT, _Traits> __lx(__is); __is.flags(ios_base::dec | ios_base::skipws); result_type __a; result_type __b; @@ -5000,7 +5000,7 @@ basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const gamma_distribution<_RT>& __x) { - __save_flags<_CharT, _Traits> _(__os); + __save_flags<_CharT, _Traits> __lx(__os); __os.flags(ios_base::dec | ios_base::left | ios_base::fixed | ios_base::scientific); _CharT __sp = __os.widen(' '); @@ -5017,7 +5017,7 @@ operator>>(basic_istream<_CharT, _Traits typedef gamma_distribution<_RT> _Eng; typedef typename _Eng::result_type result_type; typedef typename _Eng::param_type param_type; - __save_flags<_CharT, _Traits> _(__is); + __save_flags<_CharT, _Traits> __lx(__is); __is.flags(ios_base::dec | ios_base::skipws); result_type __alpha; result_type __beta; @@ -5136,7 +5136,7 @@ basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const negative_binomial_distribution<_IntType>& __x) { - __save_flags<_CharT, _Traits> _(__os); + __save_flags<_CharT, _Traits> __lx(__os); __os.flags(ios_base::dec | ios_base::left | ios_base::fixed | ios_base::scientific); _CharT __sp = __os.widen(' '); @@ -5152,7 +5152,7 @@ operator>>(basic_istream<_CharT, _Traits typedef negative_binomial_distribution<_IntType> _Eng; typedef typename _Eng::result_type result_type; typedef typename _Eng::param_type param_type; - __save_flags<_CharT, _Traits> _(__is); + __save_flags<_CharT, _Traits> __lx(__is); __is.flags(ios_base::dec | ios_base::skipws); result_type __k; double __p; @@ -5242,7 +5242,7 @@ basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const geometric_distribution<_IntType>& __x) { - __save_flags<_CharT, _Traits> _(__os); + __save_flags<_CharT, _Traits> __lx(__os); __os.flags(ios_base::dec | ios_base::left | ios_base::fixed | ios_base::scientific); return __os << __x.p(); @@ -5255,7 +5255,7 @@ operator>>(basic_istream<_CharT, _Traits { typedef geometric_distribution<_IntType> _Eng; typedef typename _Eng::param_type param_type; - __save_flags<_CharT, _Traits> _(__is); + __save_flags<_CharT, _Traits> __lx(__is); __is.flags(ios_base::dec | ios_base::skipws); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 05:58:52 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 83C8B42A; Tue, 13 Nov 2012 05:58:52 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 697348FC0C; Tue, 13 Nov 2012 05:58:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAD5wqQI093268; Tue, 13 Nov 2012 05:58:52 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAD5wqOc093267; Tue, 13 Nov 2012 05:58:52 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201211130558.qAD5wqOc093267@svn.freebsd.org> From: Kevin Lo Date: Tue, 13 Nov 2012 05:58:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242947 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 05:58:52 -0000 Author: kevlo Date: Tue Nov 13 05:58:52 2012 New Revision: 242947 URL: http://svnweb.freebsd.org/changeset/base/242947 Log: Check the return value of uiomove(9). Modified: head/sys/dev/iicbus/iic.c Modified: head/sys/dev/iicbus/iic.c ============================================================================== --- head/sys/dev/iicbus/iic.c Tue Nov 13 03:56:50 2012 (r242946) +++ head/sys/dev/iicbus/iic.c Tue Nov 13 05:58:52 2012 (r242947) @@ -221,7 +221,11 @@ iicwrite(struct cdev *dev, struct uio * } count = min(uio->uio_resid, BUFSIZE); - uiomove(sc->sc_buffer, count, uio); + error = uiomove(sc->sc_buffer, count, uio); + if (error) { + IIC_UNLOCK(sc); + return (error); + } error = iicbus_block_write(device_get_parent(iicdev), sc->sc_addr, sc->sc_buffer, count, &sent); From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 06:03:44 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 272245DF; Tue, 13 Nov 2012 06:03:44 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 07CB68FC16; Tue, 13 Nov 2012 06:03:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAD63hjL094235; Tue, 13 Nov 2012 06:03:43 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAD63h37094234; Tue, 13 Nov 2012 06:03:43 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201211130603.qAD63h37094234@svn.freebsd.org> From: Kevin Lo Date: Tue, 13 Nov 2012 06:03:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242948 - head/sys/dev/adb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 06:03:44 -0000 Author: kevlo Date: Tue Nov 13 06:03:43 2012 New Revision: 242948 URL: http://svnweb.freebsd.org/changeset/base/242948 Log: Use uiomove return value instead of returning 0. Modified: head/sys/dev/adb/adb_mouse.c Modified: head/sys/dev/adb/adb_mouse.c ============================================================================== --- head/sys/dev/adb/adb_mouse.c Tue Nov 13 05:58:52 2012 (r242947) +++ head/sys/dev/adb/adb_mouse.c Tue Nov 13 06:03:43 2012 (r242948) @@ -569,9 +569,9 @@ ams_read(struct cdev *dev, struct uio *u mtx_unlock(&sc->sc_mtx); - uiomove(outpacket,len,uio); + error = uiomove(outpacket,len,uio); - return (0); + return (error); } From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 06:07:14 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7EFAD808; Tue, 13 Nov 2012 06:07:14 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 63E2F8FC12; Tue, 13 Nov 2012 06:07:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAD67EI3094945; Tue, 13 Nov 2012 06:07:14 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAD67ERV094944; Tue, 13 Nov 2012 06:07:14 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201211130607.qAD67ERV094944@svn.freebsd.org> From: "David E. O'Brien" Date: Tue, 13 Nov 2012 06:07:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242949 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 06:07:14 -0000 Author: obrien Date: Tue Nov 13 06:07:13 2012 New Revision: 242949 URL: http://svnweb.freebsd.org/changeset/base/242949 Log: Be more consistent. Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Nov 13 06:03:43 2012 (r242948) +++ head/sys/conf/files Tue Nov 13 06:07:13 2012 (r242949) @@ -270,10 +270,10 @@ cddl/contrib/opensolaris/uts/common/zmod cddl/contrib/opensolaris/uts/common/zmod/zmod.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/zmod/zmod_subr.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/zmod/zutil.c optional zfs compile-with "${ZFS_C}" -compat/freebsd32/freebsd32_ioctl.c optional compat_freebsd32 -compat/freebsd32/freebsd32_misc.c optional compat_freebsd32 -compat/freebsd32/freebsd32_syscalls.c optional compat_freebsd32 -compat/freebsd32/freebsd32_sysent.c optional compat_freebsd32 +compat/freebsd32/freebsd32_ioctl.c optional compat_freebsd32 +compat/freebsd32/freebsd32_misc.c optional compat_freebsd32 +compat/freebsd32/freebsd32_syscalls.c optional compat_freebsd32 +compat/freebsd32/freebsd32_sysent.c optional compat_freebsd32 contrib/altq/altq/altq_cbq.c optional altq contrib/altq/altq/altq_cdnr.c optional altq contrib/altq/altq/altq_hfsc.c optional altq @@ -462,12 +462,12 @@ contrib/ipfilter/netinet/ip_sync.c optio compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/mlfk_ipl.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" -contrib/libfdt/fdt.c optional fdt -contrib/libfdt/fdt_ro.c optional fdt -contrib/libfdt/fdt_rw.c optional fdt -contrib/libfdt/fdt_strerror.c optional fdt -contrib/libfdt/fdt_sw.c optional fdt -contrib/libfdt/fdt_wip.c optional fdt +contrib/libfdt/fdt.c optional fdt +contrib/libfdt/fdt_ro.c optional fdt +contrib/libfdt/fdt_rw.c optional fdt +contrib/libfdt/fdt_strerror.c optional fdt +contrib/libfdt/fdt_sw.c optional fdt +contrib/libfdt/fdt_wip.c optional fdt contrib/ngatm/netnatm/api/cc_conn.c optional ngatm_ccatm \ compile-with "${NORMAL_C_NOWERROR} -I$S/contrib/ngatm" contrib/ngatm/netnatm/api/cc_data.c optional ngatm_ccatm \ @@ -512,10 +512,10 @@ contrib/ngatm/netnatm/sig/sig_unimsgcpy. compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/sig/sig_verify.c optional ngatm_uni \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" -crypto/blowfish/bf_ecb.c optional ipsec -crypto/blowfish/bf_skey.c optional crypto | ipsec -crypto/camellia/camellia.c optional crypto | ipsec -crypto/camellia/camellia-api.c optional crypto | ipsec +crypto/blowfish/bf_ecb.c optional ipsec +crypto/blowfish/bf_skey.c optional crypto | ipsec +crypto/camellia/camellia.c optional crypto | ipsec +crypto/camellia/camellia-api.c optional crypto | ipsec crypto/des/des_ecb.c optional crypto | ipsec crypto/des/des_setkey.c optional crypto | ipsec crypto/rc4/rc4.c optional netgraph_mppc_encryption | kgssapi @@ -527,26 +527,26 @@ crypto/sha1.c optional carp | crypto | netgraph_mppc_encryption | sctp crypto/sha2/sha2.c optional crypto | geom_bde | ipsec | random | \ sctp | zfs -ddb/db_access.c optional ddb -ddb/db_break.c optional ddb -ddb/db_capture.c optional ddb -ddb/db_command.c optional ddb -ddb/db_examine.c optional ddb -ddb/db_expr.c optional ddb -ddb/db_input.c optional ddb -ddb/db_lex.c optional ddb -ddb/db_main.c optional ddb -ddb/db_output.c optional ddb -ddb/db_print.c optional ddb -ddb/db_ps.c optional ddb -ddb/db_run.c optional ddb -ddb/db_script.c optional ddb -ddb/db_sym.c optional ddb -ddb/db_thread.c optional ddb -ddb/db_textdump.c optional ddb -ddb/db_variables.c optional ddb -ddb/db_watch.c optional ddb -ddb/db_write_cmd.c optional ddb +ddb/db_access.c optional ddb +ddb/db_break.c optional ddb +ddb/db_capture.c optional ddb +ddb/db_command.c optional ddb +ddb/db_examine.c optional ddb +ddb/db_expr.c optional ddb +ddb/db_input.c optional ddb +ddb/db_lex.c optional ddb +ddb/db_main.c optional ddb +ddb/db_output.c optional ddb +ddb/db_print.c optional ddb +ddb/db_ps.c optional ddb +ddb/db_run.c optional ddb +ddb/db_script.c optional ddb +ddb/db_sym.c optional ddb +ddb/db_thread.c optional ddb +ddb/db_textdump.c optional ddb +ddb/db_variables.c optional ddb +ddb/db_watch.c optional ddb +ddb/db_write_cmd.c optional ddb #dev/dpt/dpt_control.c optional dpt dev/aac/aac.c optional aac dev/aac/aac_cam.c optional aacp aac @@ -611,7 +611,7 @@ dev/advansys/adwmcode.c optional adw dev/ae/if_ae.c optional ae pci dev/age/if_age.c optional age pci dev/agp/agp.c optional agp pci -dev/agp/agp_if.m optional agp pci +dev/agp/agp_if.m optional agp pci dev/aha/aha.c optional aha dev/aha/aha_isa.c optional aha isa dev/aha/aha_mca.c optional aha mca @@ -933,30 +933,30 @@ dev/ath/ath_hal/ar9001/ar9160_attach.c o compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # ar9280 (depends on ar5416) dev/ath/ath_hal/ar9002/ar9280_attach.c optional ath_hal | ath_ar9280 | \ - ath_ar9285 \ + ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9280_olc.c optional ath_hal | ath_ar9280 | \ - ath_ar9285 \ + ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # ar9285 (depends on ar5416 and ar9280) -dev/ath/ath_hal/ar9002/ar9285_attach.c optional ath_hal | ath_ar9285 \ +dev/ath/ath_hal/ar9002/ar9285_attach.c optional ath_hal | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" -dev/ath/ath_hal/ar9002/ar9285_reset.c optional ath_hal | ath_ar9285 \ +dev/ath/ath_hal/ar9002/ar9285_reset.c optional ath_hal | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" -dev/ath/ath_hal/ar9002/ar9285_cal.c optional ath_hal | ath_ar9285 \ +dev/ath/ath_hal/ar9002/ar9285_cal.c optional ath_hal | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" -dev/ath/ath_hal/ar9002/ar9285_phy.c optional ath_hal | ath_ar9285 \ +dev/ath/ath_hal/ar9002/ar9285_phy.c optional ath_hal | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" -dev/ath/ath_hal/ar9002/ar9285_diversity.c optional ath_hal | ath_ar9285 \ +dev/ath/ath_hal/ar9002/ar9285_diversity.c optional ath_hal | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # ar9287 (depends on ar5416) -dev/ath/ath_hal/ar9002/ar9287_attach.c optional ath_hal | ath_ar9287 \ +dev/ath/ath_hal/ar9002/ar9287_attach.c optional ath_hal | ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" -dev/ath/ath_hal/ar9002/ar9287_reset.c optional ath_hal | ath_ar9287 \ +dev/ath/ath_hal/ar9002/ar9287_reset.c optional ath_hal | ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" -dev/ath/ath_hal/ar9002/ar9287_cal.c optional ath_hal | ath_ar9287 \ +dev/ath/ath_hal/ar9002/ar9287_cal.c optional ath_hal | ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" -dev/ath/ath_hal/ar9002/ar9287_olc.c optional ath_hal | ath_ar9287 \ +dev/ath/ath_hal/ar9002/ar9287_olc.c optional ath_hal | ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # rf backends @@ -991,9 +991,9 @@ dev/ath/ath_rate/onoe/onoe.c optional at dev/ath/ath_rate/sample/sample.c optional ath_rate_sample \ compile-with "${NORMAL_C} -I$S/dev/ath" # ath DFS modules -dev/ath/ath_dfs/null/dfs_null.c optional ath \ +dev/ath/ath_dfs/null/dfs_null.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" -# +# dev/bce/if_bce.c optional bce dev/bfe/if_bfe.c optional bfe dev/bge/if_bge.c optional bge @@ -1055,7 +1055,7 @@ dev/cxgb/common/cxgb_xgmac.c optional cx dev/cxgb/common/cxgb_t3_hw.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/common/cxgb_tn1010.c optional cxgb pci \ - compile-with "${NORMAL_C} -I$S/dev/cxgb" + compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/sys/uipc_mvec.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/cxgb_t3fw.c optional cxgb cxgb_t3fw \ @@ -1255,12 +1255,12 @@ dev/etherswitch/arswitch/arswitch_8216.c dev/etherswitch/arswitch/arswitch_8226.c optional arswitch dev/etherswitch/arswitch/arswitch_8316.c optional arswitch dev/etherswitch/arswitch/arswitch_7240.c optional arswitch -dev/etherswitch/etherswitch.c optional etherswitch +dev/etherswitch/etherswitch.c optional etherswitch dev/etherswitch/etherswitch_if.m optional etherswitch -dev/etherswitch/mdio_if.m optional miiproxy -dev/etherswitch/mdio.c optional miiproxy -dev/etherswitch/miiproxy.c optional miiproxy -dev/etherswitch/rtl8366/rtl8366rb.c optional rtl8366rb +dev/etherswitch/mdio_if.m optional miiproxy +dev/etherswitch/mdio.c optional miiproxy +dev/etherswitch/miiproxy.c optional miiproxy +dev/etherswitch/rtl8366/rtl8366rb.c optional rtl8366rb dev/ex/if_ex.c optional ex dev/ex/if_ex_isa.c optional ex isa dev/ex/if_ex_pccard.c optional ex pccard @@ -1772,7 +1772,7 @@ dev/oce/oce_util.c optional oce pci dev/ofw/ofw_bus_if.m optional fdt dev/ofw/ofw_bus_subr.c optional fdt dev/ofw/ofw_fdt.c optional fdt -dev/ofw/ofw_if.m optional fdt +dev/ofw/ofw_if.m optional fdt dev/ofw/openfirm.c optional fdt dev/ofw/openfirmio.c optional fdt dev/patm/if_patm.c optional patm pci @@ -2573,7 +2573,7 @@ kern/clock_if.m standard kern/cpufreq_if.m standard kern/device_if.m standard kern/imgact_elf.c standard -kern/imgact_elf32.c optional compat_freebsd32 +kern/imgact_elf32.c optional compat_freebsd32 kern/imgact_shell.c standard kern/inflate.c optional gzip kern/init_main.c standard @@ -3156,9 +3156,9 @@ netnatm/natm_proto.c optional natm netpfil/ipfw/dn_heap.c optional inet dummynet netpfil/ipfw/dn_sched_fifo.c optional inet dummynet netpfil/ipfw/dn_sched_prio.c optional inet dummynet -netpfil/ipfw/dn_sched_qfq.c optional inet dummynet +netpfil/ipfw/dn_sched_qfq.c optional inet dummynet netpfil/ipfw/dn_sched_rr.c optional inet dummynet -netpfil/ipfw/dn_sched_wf2q.c optional inet dummynet +netpfil/ipfw/dn_sched_wf2q.c optional inet dummynet netpfil/ipfw/ip_dummynet.c optional inet dummynet netpfil/ipfw/ip_dn_io.c optional inet dummynet netpfil/ipfw/ip_dn_glue.c optional inet dummynet @@ -3214,7 +3214,7 @@ ofed/include/linux/linux_radix.c option no-depend compile-with "${OFED_C}" ofed/drivers/infiniband/core/addr.c optional ofed \ no-depend \ - compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/agent.c optional ofed \ no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" @@ -3556,9 +3556,9 @@ security/mac/mac_sysv_sem.c optional mac security/mac/mac_sysv_shm.c optional mac security/mac/mac_vfs.c optional mac security/mac_biba/mac_biba.c optional mac_biba -security/mac_bsdextended/mac_bsdextended.c optional mac_bsdextended -security/mac_bsdextended/ugidfw_system.c optional mac_bsdextended -security/mac_bsdextended/ugidfw_vnode.c optional mac_bsdextended +security/mac_bsdextended/mac_bsdextended.c optional mac_bsdextended +security/mac_bsdextended/ugidfw_system.c optional mac_bsdextended +security/mac_bsdextended/ugidfw_vnode.c optional mac_bsdextended security/mac_ifoff/mac_ifoff.c optional mac_ifoff security/mac_lomac/mac_lomac.c optional mac_lomac security/mac_mls/mac_mls.c optional mac_mls From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 06:28:57 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 852FD1A6; Tue, 13 Nov 2012 06:28:57 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 69CD88FC15; Tue, 13 Nov 2012 06:28:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAD6SvUA098455; Tue, 13 Nov 2012 06:28:57 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAD6Svn9098454; Tue, 13 Nov 2012 06:28:57 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201211130628.qAD6Svn9098454@svn.freebsd.org> From: Adrian Chadd Date: Tue, 13 Nov 2012 06:28:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242951 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 06:28:57 -0000 Author: adrian Date: Tue Nov 13 06:28:57 2012 New Revision: 242951 URL: http://svnweb.freebsd.org/changeset/base/242951 Log: Add some debugging to try and catch an invalid TX rate (0x0) that is being reported. Modified: head/sys/dev/ath/if_ath_tx.c Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Tue Nov 13 06:12:26 2012 (r242950) +++ head/sys/dev/ath/if_ath_tx.c Tue Nov 13 06:28:57 2012 (r242951) @@ -528,11 +528,19 @@ ath_tx_setds_11n(struct ath_softc *sc, s __func__, bf_first->bf_state.bfs_nframes, bf_first->bf_state.bfs_al); + bf = bf_first; + + if (bf->bf_state.bfs_txrate0 == 0) + device_printf(sc->sc_dev, "%s: bf=%p, txrate0=%d\n", + __func__, bf, 0); + if (bf->bf_state.bfs_rc[0].ratecode == 0) + device_printf(sc->sc_dev, "%s: bf=%p, rix0=%d\n", + __func__, bf, 0); + /* * Setup all descriptors of all subframes - this will * call ath_hal_set11naggrmiddle() on every frame. */ - bf = bf_first; while (bf != NULL) { DPRINTF(sc, ATH_DEBUG_SW_TX_AGGR, "%s: bf=%p, nseg=%d, pktlen=%d, seqno=%d\n", @@ -1236,6 +1244,10 @@ ath_tx_setds(struct ath_softc *sc, struc struct ath_desc *ds = bf->bf_desc; struct ath_hal *ah = sc->sc_ah; + if (bf->bf_state.bfs_txrate0 == 0) + device_printf(sc->sc_dev, "%s: bf=%p, txrate0=%d\n", + __func__, bf, 0); + ath_hal_setuptxdesc(ah, ds , bf->bf_state.bfs_pktlen /* packet length */ , bf->bf_state.bfs_hdrlen /* header length */ From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 07:01:32 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9F9D9727; Tue, 13 Nov 2012 07:01:32 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 590278FC08; Tue, 13 Nov 2012 07:01:32 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:7d1a:da9d:a8b2:d0aa] (unknown [IPv6:2001:7b8:3a7:0:7d1a:da9d:a8b2:d0aa]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id CF5295C59; Tue, 13 Nov 2012 08:01:30 +0100 (CET) Message-ID: <50A1F049.3070800@FreeBSD.org> Date: Tue, 13 Nov 2012 08:01:29 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Ben Kaduk Subject: Re: svn commit: r242934 - head/sys/dev/xen/netback References: <201211122228.qACMSWbs020517@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 07:01:32 -0000 On 2012-11-12 23:57, Ben Kaduk wrote:> On Mon, Nov 12, 2012 at 5:28 PM, Dimitry Andric wrote: >> Author: dim >> Date: Mon Nov 12 22:28:32 2012 >> New Revision: 242934 >> URL: http://svnweb.freebsd.org/changeset/base/242934 >> >> Log: >> Redo r242889, now using the method from projects/amd64_xen_pv r240747. >> >> Reminded by: kib >> MFC after: 3 days >> >> Modified: >> head/sys/dev/xen/netback/netback_unit_tests.c >> >> Modified: head/sys/dev/xen/netback/netback_unit_tests.c >> ============================================================================== >> --- head/sys/dev/xen/netback/netback_unit_tests.c Mon Nov 12 22:01:29 2012 (r242933) >> +++ head/sys/dev/xen/netback/netback_unit_tests.c Mon Nov 12 22:28:32 2012 (r242934) >> @@ -58,11 +58,11 @@ __FBSDID("$FreeBSD$"); >> #define TOSTRING(x) STRINGIFY(x) >> >> /** >> - * Writes an error message to buffer if cond is false, and returns true >> - * iff the assertion failed. Note the implied parameters buffer and >> + * Writes an error message to buffer if cond is false >> + * Note the implied parameters buffer and > > At risk of being Bruce, aren't comments like this supposed to be > complete sentences and end with a full stop? Yes, but I purposely copied what was in the projects/amd64_xen_pv branch, to make it easier for those people to merge back. Please take up comment comments with them, thanks. ;-) From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 07:33:46 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1329DE8D; Tue, 13 Nov 2012 07:33:46 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D3ADF8FC13; Tue, 13 Nov 2012 07:33:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAD7Xjsh008294; Tue, 13 Nov 2012 07:33:45 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAD7XjHg008293; Tue, 13 Nov 2012 07:33:45 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201211130733.qAD7XjHg008293@svn.freebsd.org> From: Juli Mallett Date: Tue, 13 Nov 2012 07:33:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242952 - head/sys/contrib/octeon-sdk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 07:33:46 -0000 Author: jmallett Date: Tue Nov 13 07:33:45 2012 New Revision: 242952 URL: http://svnweb.freebsd.org/changeset/base/242952 Log: Fix build for FreeBSD kernel. Modified: head/sys/contrib/octeon-sdk/octeon-pci-console.c Modified: head/sys/contrib/octeon-sdk/octeon-pci-console.c ============================================================================== --- head/sys/contrib/octeon-sdk/octeon-pci-console.c Tue Nov 13 06:28:57 2012 (r242951) +++ head/sys/contrib/octeon-sdk/octeon-pci-console.c Tue Nov 13 07:33:45 2012 (r242952) @@ -75,7 +75,7 @@ /* The following code is only used in standalone CVMX applications. It does not apply for kernel or Linux programming */ -#if defined(OCTEON_TARGET) && !defined(__linux__) +#if defined(OCTEON_TARGET) && !defined(__linux__) && !defined(CVMX_BUILD_FOR_LINUX_KERNEL) static int cvmx_pci_console_num = 0; static int per_core_pci_consoles = 0; @@ -110,14 +110,14 @@ int __cvmx_pci_console_write (int fd, c #if !defined(CONFIG_OCTEON_U_BOOT) || (defined(CONFIG_OCTEON_U_BOOT) && (defined(CFG_PCI_CONSOLE) || defined(CONFIG_SYS_PCI_CONSOLE))) -int octeon_pci_console_buffer_free_bytes(uint32_t buffer_size, uint32_t wr_idx, uint32_t rd_idx) +static int octeon_pci_console_buffer_free_bytes(uint32_t buffer_size, uint32_t wr_idx, uint32_t rd_idx) { if (rd_idx >= buffer_size || wr_idx >= buffer_size) return -1; return (((buffer_size -1) - (wr_idx - rd_idx))%buffer_size); } -int octeon_pci_console_buffer_avail_bytes(uint32_t buffer_size, uint32_t wr_idx, uint32_t rd_idx) +static int octeon_pci_console_buffer_avail_bytes(uint32_t buffer_size, uint32_t wr_idx, uint32_t rd_idx) { if (rd_idx >= buffer_size || wr_idx >= buffer_size) return -1; @@ -287,7 +287,7 @@ int octeon_pci_console_host_read_avail(u /* This code is only available in a kernel or CVMX standalone. It can't be used from userspace */ -#if (!defined(CONFIG_OCTEON_U_BOOT) && (!defined(__linux__) || defined(__KERNEL__))) || (defined(CONFIG_OCTEON_U_BOOT) && (defined(CFG_PCI_CONSOLE) || defined(CONFIG_SYS_PCI_CONSOLE))) +#if (!defined(CONFIG_OCTEON_U_BOOT) && (!defined(__linux__) || defined(__KERNEL__))) || (defined(CONFIG_OCTEON_U_BOOT) && (defined(CFG_PCI_CONSOLE) || defined(CONFIG_SYS_PCI_CONSOLE))) || defined(CVMX_BUILD_FOR_LINUX_KERNEL) static octeon_pci_console_t *octeon_pci_console_get_ptr(uint64_t console_desc_addr, unsigned int console_num) { From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 07:34:47 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6E8E4107; Tue, 13 Nov 2012 07:34:47 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 54ACD8FC1A; Tue, 13 Nov 2012 07:34:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAD7Ylxr008458; Tue, 13 Nov 2012 07:34:47 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAD7YlVo008457; Tue, 13 Nov 2012 07:34:47 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201211130734.qAD7YlVo008457@svn.freebsd.org> From: Juli Mallett Date: Tue, 13 Nov 2012 07:34:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242953 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 07:34:47 -0000 Author: jmallett Date: Tue Nov 13 07:34:46 2012 New Revision: 242953 URL: http://svnweb.freebsd.org/changeset/base/242953 Log: Add some useful options to consider. Modified: head/sys/mips/conf/OCTEON1 Modified: head/sys/mips/conf/OCTEON1 ============================================================================== --- head/sys/mips/conf/OCTEON1 Tue Nov 13 07:33:45 2012 (r242952) +++ head/sys/mips/conf/OCTEON1 Tue Nov 13 07:34:46 2012 (r242953) @@ -261,6 +261,9 @@ device firmware # firmware assist modul # Note that 'bpf' is required for DHCP. device bpf # Berkeley packet filter +# Hardware watchdog support. +#device octeon_wdog # Octeon hardware watchdog + # USB support options USB_DEBUG # enable debug msgs device octusb # Cavium Octeon on-board USB interface (USB 2.0) @@ -297,3 +300,14 @@ device rum # Ralink Technology RT2501U device uath # Atheros AR5523 wireless NICs device ural # Ralink Technology RT2500USB wireless NICs device zyd # ZyDAS zd1211/zd1211b wireless NICs + +# crypto subsystem +device crypto # core crypto support +device cryptodev # /dev/crypto for access to h/w +device cryptocteon # Octeon coprocessor 2 crypto offload + +# GPIO support +#device gpio + +# PMC support +#device hwpmc From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 07:39:49 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8DF7A42C; Tue, 13 Nov 2012 07:39:49 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 744F78FC13; Tue, 13 Nov 2012 07:39:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAD7dnRm009256; Tue, 13 Nov 2012 07:39:49 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAD7dnDU009254; Tue, 13 Nov 2012 07:39:49 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201211130739.qAD7dnDU009254@svn.freebsd.org> From: Juli Mallett Date: Tue, 13 Nov 2012 07:39:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242955 - head/sys/mips/cavium X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 07:39:49 -0000 Author: jmallett Date: Tue Nov 13 07:39:49 2012 New Revision: 242955 URL: http://svnweb.freebsd.org/changeset/base/242955 Log: Add preliminary Octeon PCI console support. Radisys-specific PCI console support may follow soon (it uses a proprietary memory layout, but operation looks pretty trivial.) Added: head/sys/mips/cavium/octeon_pci_console.c (contents, props changed) Modified: head/sys/mips/cavium/files.octeon1 Modified: head/sys/mips/cavium/files.octeon1 ============================================================================== --- head/sys/mips/cavium/files.octeon1 Tue Nov 13 07:39:05 2012 (r242954) +++ head/sys/mips/cavium/files.octeon1 Tue Nov 13 07:39:49 2012 (r242955) @@ -45,6 +45,8 @@ mips/cavium/octe/octebus.c optional oc mips/cavium/octopci.c optional pci mips/cavium/octopci_bus_space.c optional pci +mips/cavium/octeon_pci_console.c optional pci +contrib/octeon-sdk/octeon-pci-console.c optional pci mips/cavium/usb/octusb.c optional usb octusb mips/cavium/usb/octusb_octeon.c optional usb octusb Added: head/sys/mips/cavium/octeon_pci_console.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/cavium/octeon_pci_console.c Tue Nov 13 07:39:49 2012 (r242955) @@ -0,0 +1,122 @@ +/*- + * Copyright (c) 2012 Juli Mallett + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +static cn_probe_t opcic_cnprobe; +static cn_init_t opcic_cninit; +static cn_term_t opcic_cnterm; +static cn_getc_t opcic_cngetc; +static cn_putc_t opcic_cnputc; +static cn_grab_t opcic_cngrab; +static cn_ungrab_t opcic_cnungrab; + +CONSOLE_DRIVER(opcic); + +static void +opcic_cnprobe(struct consdev *cp) +{ + const struct cvmx_bootmem_named_block_desc *pci_console_block; + + cp->cn_pri = CN_DEAD; + + pci_console_block = cvmx_bootmem_find_named_block(OCTEON_PCI_CONSOLE_BLOCK_NAME); + if (pci_console_block == NULL) + return; + + cp->cn_arg = (void *)(uintptr_t)pci_console_block->base_addr; + snprintf(cp->cn_name, sizeof cp->cn_name, "opcic@%p", cp->cn_arg); + cp->cn_pri = (boothowto & RB_SERIAL) ? CN_REMOTE : CN_NORMAL; +} + +static void +opcic_cninit(struct consdev *cp) +{ + (void)cp; +} + +static void +opcic_cnterm(struct consdev *cp) +{ + (void)cp; +} + +static int +opcic_cngetc(struct consdev *cp) +{ + uint64_t console_desc_addr; + char ch; + int rv; + + console_desc_addr = (uintptr_t)cp->cn_arg; + + rv = octeon_pci_console_read(console_desc_addr, 0, &ch, 1, OCT_PCI_CON_FLAG_NONBLOCK); + if (rv != 1) + return (-1); + return (ch); +} + +static void +opcic_cnputc(struct consdev *cp, int c) +{ + uint64_t console_desc_addr; + char ch; + int rv; + + console_desc_addr = (uintptr_t)cp->cn_arg; + ch = c; + + rv = octeon_pci_console_write(console_desc_addr, 0, &ch, 1, 0); + if (rv == -1) + panic("%s: octeon_pci_console_write failed.", __func__); +} + +static void +opcic_cngrab(struct consdev *cp) +{ + (void)cp; +} + +static void +opcic_cnungrab(struct consdev *cp) +{ + (void)cp; +} From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 07:49:53 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CF4DB7D8 for ; Tue, 13 Nov 2012 07:49:53 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 5A7858FC16 for ; Tue, 13 Nov 2012 07:49:52 +0000 (UTC) Received: (qmail 23217 invoked from network); 13 Nov 2012 09:24:00 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 13 Nov 2012 09:24:00 -0000 Message-ID: <50A1FB96.3050300@freebsd.org> Date: Tue, 13 Nov 2012 08:49:42 +0100 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: Alan Cox Subject: Re: svn commit: r242941 - in head/sys: sys vm References: <201211130250.qAD2odEw065268@svn.freebsd.org> In-Reply-To: <201211130250.qAD2odEw065268@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 07:49:53 -0000 On 13.11.2012 03:50, Alan Cox wrote: > Author: alc > Date: Tue Nov 13 02:50:39 2012 > New Revision: 242941 > URL: http://svnweb.freebsd.org/changeset/base/242941 > > Log: > Replace the single, global page queues lock with per-queue locks on the > active and inactive paging queues. Hear hear! Now if only the cache-poisining splay tree would go as well... I still have some patches that macrotize it so it can rather easily be replaced with something else, eg. an RB tree or such. -- Andre From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 09:17:15 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6F689AA; Tue, 13 Nov 2012 09:17:15 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id D95A38FC12; Tue, 13 Nov 2012 09:17:14 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id qAD9HDX1065894; Tue, 13 Nov 2012 13:17:13 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id qAD9HDwJ065871; Tue, 13 Nov 2012 13:17:13 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 13 Nov 2012 13:17:13 +0400 From: Gleb Smirnoff To: "David O'Brien" Subject: Re: svn commit: r240494 - in head: contrib/pf/man contrib/pf/pfctl include sbin/pfctl sbin/pfctl/missing share/man/man4 share/man/man5 sys/conf sys/contrib/pf sys/modules/dummynet sys/modules/ipfw sys/... Message-ID: <20121113091713.GF27927@FreeBSD.org> References: <201209141151.q8EBppm1014858@svn.freebsd.org> <20121113021140.GB260@dragon.NUXI.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20121113021140.GB260@dragon.NUXI.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 09:17:15 -0000 On Mon, Nov 12, 2012 at 06:11:40PM -0800, David O'Brien wrote: D> On Fri, Sep 14, 2012 at 11:51:51AM +0000, Gleb Smirnoff wrote: D> > Log: D> > o Create directory sys/netpfil, where all packet filters should D> > reside, and move there ipfw(4) and pf(4). D> > o Move most modified parts of pf out of contrib. D> D> Why didn't contrib/ipfilter/ move to sys/netpfil/ as well? D> D> Having 1/3 of our packet filters not there (sys/netpfil) might suggest we D> shouldn't create sys/netpfil/ ipfilter is really selfcontained and is a contrib code. Bjoern has plans to add more pfil(9) concumers, and they will go to sys/netpfil. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 10:21:22 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CC00197A for ; Tue, 13 Nov 2012 10:21:22 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 24C498FC0C for ; Tue, 13 Nov 2012 10:21:21 +0000 (UTC) Received: (qmail 23795 invoked from network); 13 Nov 2012 11:55:32 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 13 Nov 2012 11:55:32 -0000 Message-ID: <50A21F1B.5090607@freebsd.org> Date: Tue, 13 Nov 2012 11:21:15 +0100 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: svn commit: r240494 - in head: contrib/pf/man contrib/pf/pfctl include sbin/pfctl sbin/pfctl/missing share/man/man4 share/man/man5 sys/conf sys/contrib/pf sys/modules/dummynet sys/modules/ipfw sys/... References: <201209141151.q8EBppm1014858@svn.freebsd.org> <20121113021140.GB260@dragon.NUXI.org> <20121113091713.GF27927@FreeBSD.org> In-Reply-To: <20121113091713.GF27927@FreeBSD.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, freebsd-net@freebsd.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, David O'Brien X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 10:21:22 -0000 On 13.11.2012 10:17, Gleb Smirnoff wrote: > On Mon, Nov 12, 2012 at 06:11:40PM -0800, David O'Brien wrote: > D> On Fri, Sep 14, 2012 at 11:51:51AM +0000, Gleb Smirnoff wrote: > D> > Log: > D> > o Create directory sys/netpfil, where all packet filters should > D> > reside, and move there ipfw(4) and pf(4). > D> > o Move most modified parts of pf out of contrib. > D> > D> Why didn't contrib/ipfilter/ move to sys/netpfil/ as well? > D> > D> Having 1/3 of our packet filters not there (sys/netpfil) might suggest we > D> shouldn't create sys/netpfil/ > > ipfilter is really selfcontained and is a contrib code. Though it can't decide whether to really live in contrib or as part of FreeBSD. Also it hasn't been updated in a long time and the official version has progressed quite a bit. IMHO the version we have should either go away and be replaced with a fresh up to date import through the vendor channel, or move to netpfil. Would be a great task for a junior kernel hacker. -- Andre From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 10:24:35 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 18DD5D03; Tue, 13 Nov 2012 10:24:35 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 7FF6D8FC12; Tue, 13 Nov 2012 10:24:34 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id qADAOQXJ020351; Tue, 13 Nov 2012 14:24:26 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id qADAOQlN020350; Tue, 13 Nov 2012 14:24:26 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 13 Nov 2012 14:24:26 +0400 From: Gleb Smirnoff To: Andre Oppermann Subject: Re: svn commit: r240494 - in head: contrib/pf/man contrib/pf/pfctl include sbin/pfctl sbin/pfctl/missing share/man/man4 share/man/man5 sys/conf sys/contrib/pf sys/modules/dummynet sys/modules/ipfw sys/... Message-ID: <20121113102426.GA20289@FreeBSD.org> References: <201209141151.q8EBppm1014858@svn.freebsd.org> <20121113021140.GB260@dragon.NUXI.org> <20121113091713.GF27927@FreeBSD.org> <50A21F1B.5090607@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <50A21F1B.5090607@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, freebsd-net@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, David O'Brien X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 10:24:35 -0000 On Tue, Nov 13, 2012 at 11:21:15AM +0100, Andre Oppermann wrote: A> On 13.11.2012 10:17, Gleb Smirnoff wrote: A> > On Mon, Nov 12, 2012 at 06:11:40PM -0800, David O'Brien wrote: A> > D> On Fri, Sep 14, 2012 at 11:51:51AM +0000, Gleb Smirnoff wrote: A> > D> > Log: A> > D> > o Create directory sys/netpfil, where all packet filters should A> > D> > reside, and move there ipfw(4) and pf(4). A> > D> > o Move most modified parts of pf out of contrib. A> > D> A> > D> Why didn't contrib/ipfilter/ move to sys/netpfil/ as well? A> > D> A> > D> Having 1/3 of our packet filters not there (sys/netpfil) might suggest we A> > D> shouldn't create sys/netpfil/ A> > A> > ipfilter is really selfcontained and is a contrib code. A> A> Though it can't decide whether to really live in contrib or A> as part of FreeBSD. Also it hasn't been updated in a long A> time and the official version has progressed quite a bit. A> A> IMHO the version we have should either go away and be replaced A> with a fresh up to date import through the vendor channel, or A> move to netpfil. A> A> Would be a great task for a junior kernel hacker. I don't see any reason to remove it since it builds fine and isn't any obstacle in further development of FreeBSD. Let it be there while it works. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 11:29:08 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 90765D30; Tue, 13 Nov 2012 11:29:08 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 74A6B8FC1D; Tue, 13 Nov 2012 11:29:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qADBT8v5038302; Tue, 13 Nov 2012 11:29:08 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qADBT8pG038301; Tue, 13 Nov 2012 11:29:08 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201211131129.qADBT8pG038301@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 13 Nov 2012 11:29:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242957 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 11:29:08 -0000 Author: trasz Date: Tue Nov 13 11:29:08 2012 New Revision: 242957 URL: http://svnweb.freebsd.org/changeset/base/242957 Log: Don't divide by zero. Tested by: swills Modified: head/sys/kern/kern_racct.c Modified: head/sys/kern/kern_racct.c ============================================================================== --- head/sys/kern/kern_racct.c Tue Nov 13 08:35:25 2012 (r242956) +++ head/sys/kern/kern_racct.c Tue Nov 13 11:29:08 2012 (r242957) @@ -921,9 +921,12 @@ racct_proc_exit(struct proc *p) #endif microuptime(&wallclock); timevalsub(&wallclock, &p->p_stats->p_start); - pct_estimate = (1000000 * runtime * 100) / - ((uint64_t)wallclock.tv_sec * 1000000 + - wallclock.tv_usec); + if (wallclock.tv_sec > 0 || wallclock.tv_usec > 0) { + pct_estimate = (1000000 * runtime * 100) / + ((uint64_t)wallclock.tv_sec * 1000000 + + wallclock.tv_usec); + } else + pct_estimate = 0; pct = racct_getpcpu(p, pct_estimate); mtx_lock(&racct_lock); @@ -1136,9 +1139,12 @@ racctd(void) runtime = p->p_prev_runtime; #endif p->p_prev_runtime = runtime; - pct_estimate = (1000000 * runtime * 100) / - ((uint64_t)wallclock.tv_sec * 1000000 + - wallclock.tv_usec); + if (wallclock.tv_sec > 0 || wallclock.tv_usec > 0) { + pct_estimate = (1000000 * runtime * 100) / + ((uint64_t)wallclock.tv_sec * 1000000 + + wallclock.tv_usec); + } else + pct_estimate = 0; pct = racct_getpcpu(p, pct_estimate); mtx_lock(&racct_lock); racct_set_force_locked(p, RACCT_PCTCPU, pct); From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 12:52:32 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9BCD061F; Tue, 13 Nov 2012 12:52:32 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7FB658FC08; Tue, 13 Nov 2012 12:52:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qADCqWgd048126; Tue, 13 Nov 2012 12:52:32 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qADCqWWp048112; Tue, 13 Nov 2012 12:52:32 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201211131252.qADCqWWp048112@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 13 Nov 2012 12:52:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242958 - in head/sys: bsm cddl/contrib/opensolaris/uts/common/sys compat/freebsd32 kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 12:52:32 -0000 Author: kib Date: Tue Nov 13 12:52:31 2012 New Revision: 242958 URL: http://svnweb.freebsd.org/changeset/base/242958 Log: Add the wait6(2) system call. It takes POSIX waitid()-like process designator to select a process which is waited for. The system call optionally returns siginfo_t which would be otherwise provided to SIGCHLD handler, as well as extended structure accounting for child and cumulative grandchild resource usage. Allow to get the current rusage information for non-exited processes as well, similar to Solaris. The explicit WEXITED flag is required to wait for exited processes, allowing for more fine-grained control of the events the waiter is interested in. Fix the handling of siginfo for WNOWAIT option for all wait*(2) family, by not removing the queued signal state. PR: standards/170346 Submitted by: "Jukka A. Ukkonen" MFC after: 1 month Modified: head/sys/bsm/audit_kevents.h head/sys/cddl/contrib/opensolaris/uts/common/sys/procset.h head/sys/compat/freebsd32/freebsd32.h head/sys/compat/freebsd32/freebsd32_misc.c head/sys/compat/freebsd32/syscalls.master head/sys/kern/kern_exit.c head/sys/kern/sys_procdesc.c head/sys/kern/syscalls.master head/sys/sys/proc.h head/sys/sys/resource.h head/sys/sys/syscallsubr.h head/sys/sys/types.h head/sys/sys/wait.h Modified: head/sys/bsm/audit_kevents.h ============================================================================== --- head/sys/bsm/audit_kevents.h Tue Nov 13 11:29:08 2012 (r242957) +++ head/sys/bsm/audit_kevents.h Tue Nov 13 12:52:31 2012 (r242958) @@ -602,6 +602,7 @@ #define AUE_PDKILL 43198 /* FreeBSD. */ #define AUE_PDGETPID 43199 /* FreeBSD. */ #define AUE_PDWAIT 43200 /* FreeBSD. */ +#define AUE_WAIT6 43201 /* FreeBSD. */ /* * Darwin BSM uses a number of AUE_O_* definitions, which are aliased to the Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/procset.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/sys/procset.h Tue Nov 13 11:29:08 2012 (r242957) +++ head/sys/cddl/contrib/opensolaris/uts/common/sys/procset.h Tue Nov 13 12:52:31 2012 (r242958) @@ -51,6 +51,7 @@ extern "C" { #define P_INITUID 0 #define P_INITPGID 0 +#ifndef _IDTYPE_T_DECLARED /* * The following defines the values for an identifier type. It @@ -81,6 +82,9 @@ typedef enum P_PSETID /* Processor set identifier */ } idtype_t; +#define _IDTYPE_T_DECLARED + +#endif /* * The following defines the operations which can be performed to Modified: head/sys/compat/freebsd32/freebsd32.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32.h Tue Nov 13 11:29:08 2012 (r242957) +++ head/sys/compat/freebsd32/freebsd32.h Tue Nov 13 12:52:31 2012 (r242958) @@ -88,6 +88,11 @@ struct rusage32 { int32_t ru_nivcsw; }; +struct wrusage32 { + struct rusage32 wru_self; + struct rusage32 wru_children; +}; + struct itimerval32 { struct timeval32 it_interval; struct timeval32 it_value; Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Tue Nov 13 11:29:08 2012 (r242957) +++ head/sys/compat/freebsd32/freebsd32_misc.c Tue Nov 13 12:52:31 2012 (r242958) @@ -180,6 +180,44 @@ freebsd32_wait4(struct thread *td, struc return (error); } +int +freebsd32_wait6(struct thread *td, struct freebsd32_wait6_args *uap) +{ + struct wrusage32 wru32; + struct __wrusage wru, *wrup; + struct siginfo32 si32; + struct __siginfo si, *sip; + int error, status; + + if (uap->wrusage != NULL) + wrup = &wru; + else + wrup = NULL; + + if (uap->info != NULL) { + sip = &si; + bzero(sip, sizeof(*sip)); + } else + sip = NULL; + + error = kern_wait6(td, uap->idtype, uap->id, &status, uap->options, + wrup, sip); + if (error != 0) + return (error); + if (uap->status != NULL) + error = copyout(&status, uap->status, sizeof(status)); + if (uap->wrusage != NULL && error == 0) { + freebsd32_rusage_out(&wru.wru_self, &wru32.wru_self); + freebsd32_rusage_out(&wru.wru_children, &wru32.wru_children); + error = copyout(&wru32, uap->wrusage, sizeof(wru32)); + } + if (uap->info != NULL && error == 0) { + siginfo_to_siginfo32 (&si, &si32); + error = copyout(&si32, uap->info, sizeof(si32)); + } + return (error); +} + #ifdef COMPAT_FREEBSD4 static void copy_statfs(struct statfs *in, struct statfs32 *out) Modified: head/sys/compat/freebsd32/syscalls.master ============================================================================== --- head/sys/compat/freebsd32/syscalls.master Tue Nov 13 11:29:08 2012 (r242957) +++ head/sys/compat/freebsd32/syscalls.master Tue Nov 13 12:52:31 2012 (r242958) @@ -1000,3 +1000,8 @@ uint32_t offset1, uint32_t offset2,\ uint32_t len1, uint32_t len2, \ int advice); } +532 AUE_WAIT6 STD { int freebsd32_wait6(int idtype, int id, \ + int *status, int options, \ + struct wrusage32 *wrusage, \ + siginfo_t *info); } + Modified: head/sys/kern/kern_exit.c ============================================================================== --- head/sys/kern/kern_exit.c Tue Nov 13 11:29:08 2012 (r242957) +++ head/sys/kern/kern_exit.c Tue Nov 13 12:52:31 2012 (r242958) @@ -143,7 +143,7 @@ exit1(struct thread *td, int rv) * XXX in case we're rebooting we just let init die in order to * work around an unsolved stack overflow seen very late during * shutdown on sparc64 when the gmirror worker process exists. - */ + */ if (p == initproc && rebooting == 0) { printf("init died (signal %d, exit %d)\n", WTERMSIG(rv), WEXITSTATUS(rv)); @@ -617,7 +617,7 @@ sys_abort2(struct thread *td, struct abo sbuf_clear(sb); sbuf_printf(sb, "%s(pid %d uid %d) aborted: ", p->p_comm, p->p_pid, td->td_ucred->cr_uid); - /* + /* * Since we can't return from abort2(), send SIGKILL in cases, where * abort2() was called improperly */ @@ -689,7 +689,7 @@ owait(struct thread *td, struct owait_ar * The dirty work is handled by kern_wait(). */ int -sys_wait4(struct thread *td, struct wait_args *uap) +sys_wait4(struct thread *td, struct wait4_args *uap) { struct rusage ru, *rup; int error, status; @@ -706,14 +706,51 @@ sys_wait4(struct thread *td, struct wait return (error); } +int +sys_wait6(struct thread *td, struct wait6_args *uap) +{ + struct __wrusage wru, *wrup; + siginfo_t si, *sip; + int error, status; + idtype_t idtype; + id_t id; + + idtype = uap->idtype; + id = uap->id; + + if (uap->wrusage != NULL) + wrup = &wru; + else + wrup = NULL; + + if (uap->info != NULL) { + sip = &si; + bzero(sip, sizeof(*sip)); + } else + sip = NULL; + + /* + * We expect all callers of wait6() to know about WEXITED and + * WTRAPPED. + */ + error = kern_wait6(td, idtype, id, &status, uap->options, wrup, sip); + + if (uap->status != NULL && error == 0) + error = copyout(&status, uap->status, sizeof(status)); + if (uap->wrusage != NULL && error == 0) + error = copyout(&wru, uap->wrusage, sizeof(wru)); + if (uap->info != NULL && error == 0) + error = copyout(&si, uap->info, sizeof(si)); + return (error); +} + /* * Reap the remains of a zombie process and optionally return status and * rusage. Asserts and will release both the proctree_lock and the process * lock as part of its work. */ void -proc_reap(struct thread *td, struct proc *p, int *status, int options, - struct rusage *rusage) +proc_reap(struct thread *td, struct proc *p, int *status, int options) { struct proc *q, *t; @@ -723,10 +760,7 @@ proc_reap(struct thread *td, struct proc KASSERT(p->p_state == PRS_ZOMBIE, ("proc_reap: !PRS_ZOMBIE")); q = td->td_proc; - if (rusage) { - *rusage = p->p_ru; - calcru(p, &rusage->ru_utime, &rusage->ru_stime); - } + PROC_SUNLOCK(p); td->td_retval[0] = p->p_pid; if (status) @@ -839,24 +873,78 @@ proc_reap(struct thread *td, struct proc } static int -proc_to_reap(struct thread *td, struct proc *p, pid_t pid, int *status, - int options, struct rusage *rusage) +proc_to_reap(struct thread *td, struct proc *p, idtype_t idtype, id_t id, + int *status, int options, struct __wrusage *wrusage, siginfo_t *siginfo) { struct proc *q; + struct rusage *rup; sx_assert(&proctree_lock, SA_XLOCKED); q = td->td_proc; PROC_LOCK(p); - if (pid != WAIT_ANY && p->p_pid != pid && p->p_pgid != -pid) { + + switch (idtype) { + case P_ALL: + break; + case P_PID: + if (p->p_pid != (pid_t)id) { + PROC_UNLOCK(p); + return (0); + } + break; + case P_PGID: + if (p->p_pgid != (pid_t)id) { + PROC_UNLOCK(p); + return (0); + } + break; + case P_SID: + if (p->p_session->s_sid != (pid_t)id) { + PROC_UNLOCK(p); + return (0); + } + break; + case P_UID: + if (p->p_ucred->cr_uid != (uid_t)id) { + PROC_UNLOCK(p); + return (0); + } + break; + case P_GID: + if (p->p_ucred->cr_gid != (gid_t)id) { + PROC_UNLOCK(p); + return (0); + } + break; + case P_JAILID: + if (p->p_ucred->cr_prison == NULL || + (p->p_ucred->cr_prison->pr_id != (int)id)) { + PROC_UNLOCK(p); + return (0); + } + break; + /* + * It seems that the thread structures get zeroed out + * at process exit. This makes it impossible to + * support P_SETID, P_CID or P_CPUID. + */ + default: PROC_UNLOCK(p); return (0); + break; } + if (p_canwait(td, p)) { PROC_UNLOCK(p); return (0); } + if (((options & WEXITED) == 0) && (p->p_state == PRS_ZOMBIE)) { + PROC_UNLOCK(p); + return (0); + } + /* * This special case handles a kthread spawned by linux_clone * (see linux_misc.c). The linux_wait4 and linux_waitpid @@ -872,8 +960,59 @@ proc_to_reap(struct thread *td, struct p } PROC_SLOCK(p); + + if (siginfo != NULL) { + bzero (siginfo, sizeof (*siginfo)); + siginfo->si_errno = 0; + + /* + * SUSv4 requires that the si_signo value is always + * SIGCHLD. Obey it despite the rfork(2) interface + * allows to request other signal for child exit + * notification. + */ + siginfo->si_signo = SIGCHLD; + + /* + * This is still a rough estimate. We will fix the + * cases TRAPPED, STOPPED, and CONTINUED later. + */ + if (WCOREDUMP(p->p_xstat)) + siginfo->si_code = CLD_DUMPED; + else if (WIFSIGNALED(p->p_xstat)) + siginfo->si_code = CLD_KILLED; + else + siginfo->si_code = CLD_EXITED; + + siginfo->si_pid = p->p_pid; + siginfo->si_uid = p->p_ucred->cr_uid; + siginfo->si_status = p->p_xstat; + + /* + * The si_addr field would be useful additional + * detail, but apparently the PC value may be lost + * when we reach this point. bzero() above sets + * siginfo->si_addr to NULL. + */ + } + + /* + * There should be no reason to limit resources usage info to + * exited processes only. A snapshot about any resources used + * by a stopped process may be exactly what is needed. + */ + if (wrusage != NULL) { + rup = &wrusage->wru_self; + *rup = p->p_ru; + calcru(p, &rup->ru_utime, &rup->ru_stime); + + rup = &wrusage->wru_children; + *rup = p->p_stats->p_cru; + calccru(p, &rup->ru_utime, &rup->ru_stime); + } + if (p->p_state == PRS_ZOMBIE) { - proc_reap(td, p, status, options, rusage); + proc_reap(td, p, status, options); return (-1); } PROC_SUNLOCK(p); @@ -885,21 +1024,71 @@ int kern_wait(struct thread *td, pid_t pid, int *status, int options, struct rusage *rusage) { + struct __wrusage wru, *wrup; + idtype_t idtype; + id_t id; + int ret; + + if (pid == WAIT_ANY) { + idtype = P_ALL; + id = 0; + } + else if (pid <= 0) { + idtype = P_PGID; + id = (id_t)-pid; + } + else { + idtype = P_PID; + id = (id_t)pid; + } + if (rusage != NULL) + wrup = &wru; + else + wrup = NULL; + /* + * For backward compatibility we implicitly add flags WEXITED + * and WTRAPPED here. + */ + options |= WEXITED | WTRAPPED; + ret = kern_wait6(td, idtype, id, status, options, wrup, NULL); + if (rusage != NULL) + *rusage = wru.wru_self; + return (ret); +} + +int +kern_wait6(struct thread *td, idtype_t idtype, id_t id, int *status, + int options, struct __wrusage *wrusage, siginfo_t *siginfo) +{ struct proc *p, *q; int error, nfound, ret; - AUDIT_ARG_PID(pid); + AUDIT_ARG_VALUE((int)idtype); /* XXX - This is likely wrong! */ + AUDIT_ARG_PID((pid_t)id); /* XXX - This may be wrong! */ AUDIT_ARG_VALUE(options); q = td->td_proc; - if (pid == 0) { - PROC_LOCK(q); - pid = -q->p_pgid; - PROC_UNLOCK(q); + + if ((pid_t)id == WAIT_MYPGRP && + (idtype == P_PID || idtype == P_PGID)) { + id = (id_t)q->p_pgid; + idtype = P_PGID; } + /* If we don't know the option, just return. */ - if (options & ~(WUNTRACED|WNOHANG|WCONTINUED|WNOWAIT|WLINUXCLONE)) + if ((options & ~(WUNTRACED | WNOHANG | WCONTINUED | WNOWAIT | + WEXITED | WTRAPPED | WLINUXCLONE)) != 0) + return (EINVAL); + if ((options & (WEXITED | WUNTRACED | WCONTINUED | WTRAPPED)) == 0) { + /* + * We will be unable to find any matching processes, + * because there are no known events to look for. + * Prefer to return error instead of blocking + * indefinitely. + */ return (EINVAL); + } + loop: if (q->p_flag & P_STATCHILD) { PROC_LOCK(q); @@ -909,7 +1098,8 @@ loop: nfound = 0; sx_xlock(&proctree_lock); LIST_FOREACH(p, &q->p_children, p_sibling) { - ret = proc_to_reap(td, p, pid, status, options, rusage); + ret = proc_to_reap(td, p, idtype, id, status, options, + wrusage, siginfo); if (ret == 0) continue; else if (ret == 1) @@ -919,37 +1109,77 @@ loop: PROC_LOCK(p); PROC_SLOCK(p); - if ((p->p_flag & P_STOPPED_SIG) && + + if ((options & WTRAPPED) != 0 && + (p->p_flag & P_TRACED) != 0 && + (p->p_flag & (P_STOPPED_TRACE | P_STOPPED_SIG)) != 0 && (p->p_suspcount == p->p_numthreads) && - (p->p_flag & P_WAITED) == 0 && - (p->p_flag & P_TRACED || options & WUNTRACED)) { + ((p->p_flag & P_WAITED) == 0)) { PROC_SUNLOCK(p); - p->p_flag |= P_WAITED; + if ((options & WNOWAIT) == 0) + p->p_flag |= P_WAITED; sx_xunlock(&proctree_lock); td->td_retval[0] = p->p_pid; - if (status) + + if (status != NULL) *status = W_STOPCODE(p->p_xstat); + if (siginfo != NULL) { + siginfo->si_status = p->p_xstat; + siginfo->si_code = CLD_TRAPPED; + } + if ((options & WNOWAIT) == 0) { + PROC_LOCK(q); + sigqueue_take(p->p_ksi); + PROC_UNLOCK(q); + } - PROC_LOCK(q); - sigqueue_take(p->p_ksi); - PROC_UNLOCK(q); PROC_UNLOCK(p); + return (0); + } + if ((options & WUNTRACED) != 0 && + (p->p_flag & P_STOPPED_SIG) != 0 && + (p->p_suspcount == p->p_numthreads) && + ((p->p_flag & P_WAITED) == 0)) { + PROC_SUNLOCK(p); + if ((options & WNOWAIT) == 0) + p->p_flag |= P_WAITED; + sx_xunlock(&proctree_lock); + td->td_retval[0] = p->p_pid; + + if (status != NULL) + *status = W_STOPCODE(p->p_xstat); + if (siginfo != NULL) { + siginfo->si_status = p->p_xstat; + siginfo->si_code = CLD_STOPPED; + } + if ((options & WNOWAIT) == 0) { + PROC_LOCK(q); + sigqueue_take(p->p_ksi); + PROC_UNLOCK(q); + } + PROC_UNLOCK(p); return (0); } PROC_SUNLOCK(p); - if (options & WCONTINUED && (p->p_flag & P_CONTINUED)) { + if ((options & WCONTINUED) != 0 && + (p->p_flag & P_CONTINUED) != 0) { sx_xunlock(&proctree_lock); td->td_retval[0] = p->p_pid; - p->p_flag &= ~P_CONTINUED; - - PROC_LOCK(q); - sigqueue_take(p->p_ksi); - PROC_UNLOCK(q); + if ((options & WNOWAIT) == 0) { + p->p_flag &= ~P_CONTINUED; + PROC_LOCK(q); + sigqueue_take(p->p_ksi); + PROC_UNLOCK(q); + } PROC_UNLOCK(p); - if (status) + if (status != NULL) *status = SIGCONT; + if (siginfo != NULL) { + siginfo->si_status = SIGCONT; + siginfo->si_code = CLD_CONTINUED; + } return (0); } PROC_UNLOCK(p); @@ -968,7 +1198,8 @@ loop: * to successfully wait until the child becomes a zombie. */ LIST_FOREACH(p, &q->p_orphans, p_orphan) { - ret = proc_to_reap(td, p, pid, status, options, rusage); + ret = proc_to_reap(td, p, idtype, id, status, options, + wrusage, siginfo); if (ret == 0) continue; else if (ret == 1) @@ -994,7 +1225,7 @@ loop: error = msleep(q, &q->p_mtx, PWAIT | PCATCH, "wait", 0); PROC_UNLOCK(q); if (error) - return (error); + return (error); goto loop; } Modified: head/sys/kern/sys_procdesc.c ============================================================================== --- head/sys/kern/sys_procdesc.c Tue Nov 13 11:29:08 2012 (r242957) +++ head/sys/kern/sys_procdesc.c Tue Nov 13 12:52:31 2012 (r242958) @@ -374,7 +374,7 @@ procdesc_close(struct file *fp, struct t */ PROC_LOCK(p); PROC_SLOCK(p); - proc_reap(curthread, p, NULL, 0, NULL); + proc_reap(curthread, p, NULL, 0); } else { /* * If the process is not yet dead, we need to kill it, but we Modified: head/sys/kern/syscalls.master ============================================================================== --- head/sys/kern/syscalls.master Tue Nov 13 11:29:08 2012 (r242957) +++ head/sys/kern/syscalls.master Tue Nov 13 12:52:31 2012 (r242958) @@ -71,8 +71,7 @@ ; XXX man page says `mode_t mode'. 6 AUE_CLOSE STD { int close(int fd); } 7 AUE_WAIT4 STD { int wait4(int pid, int *status, \ - int options, struct rusage *rusage); } \ - wait4 wait_args int + int options, struct rusage *rusage); } 8 AUE_CREAT COMPAT { int creat(char *path, int mode); } 9 AUE_LINK STD { int link(char *path, char *link); } 10 AUE_UNLINK STD { int unlink(char *path); } @@ -952,5 +951,9 @@ off_t offset, off_t len); } 531 AUE_NULL STD { int posix_fadvise(int fd, off_t offset, \ off_t len, int advice); } +532 AUE_WAIT6 STD { int wait6(int idtype, int id, \ + int *status, int options, \ + struct __wrusage *wrusage, \ + siginfo_t *info); } ; Please copy any additions and changes to the following compatability tables: ; sys/compat/freebsd32/syscalls.master Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Tue Nov 13 11:29:08 2012 (r242957) +++ head/sys/sys/proc.h Tue Nov 13 12:52:31 2012 (r242958) @@ -885,8 +885,7 @@ int proc_getenvv(struct thread *td, stru void procinit(void); void proc_linkup0(struct proc *p, struct thread *td); void proc_linkup(struct proc *p, struct thread *td); -void proc_reap(struct thread *td, struct proc *p, int *status, int options, - struct rusage *rusage); +void proc_reap(struct thread *td, struct proc *p, int *status, int options); void proc_reparent(struct proc *child, struct proc *newparent); struct pstats *pstats_alloc(void); void pstats_fork(struct pstats *src, struct pstats *dst); Modified: head/sys/sys/resource.h ============================================================================== --- head/sys/sys/resource.h Tue Nov 13 11:29:08 2012 (r242957) +++ head/sys/sys/resource.h Tue Nov 13 12:52:31 2012 (r242958) @@ -79,6 +79,13 @@ struct rusage { #define ru_last ru_nivcsw }; +#if __BSD_VISIBLE +struct __wrusage { + struct rusage wru_self; + struct rusage wru_children; +}; +#endif + /* * Resource limits */ Modified: head/sys/sys/syscallsubr.h ============================================================================== --- head/sys/sys/syscallsubr.h Tue Nov 13 11:29:08 2012 (r242957) +++ head/sys/sys/syscallsubr.h Tue Nov 13 12:52:31 2012 (r242958) @@ -43,6 +43,7 @@ struct msghdr; struct msqid_ds; struct rlimit; struct rusage; +struct __wrusage; union semun; struct sockaddr; struct stat; @@ -234,6 +235,8 @@ int kern_utimesat(struct thread *td, int enum uio_seg pathseg, struct timeval *tptr, enum uio_seg tptrseg); int kern_wait(struct thread *td, pid_t pid, int *status, int options, struct rusage *rup); +int kern_wait6(struct thread *td, idtype_t idtype, id_t id, int *status, + int options, struct __wrusage *wrup, siginfo_t *sip); int kern_writev(struct thread *td, int fd, struct uio *auio); int kern_socketpair(struct thread *td, int domain, int type, int protocol, int *rsv); Modified: head/sys/sys/types.h ============================================================================== --- head/sys/sys/types.h Tue Nov 13 11:29:08 2012 (r242957) +++ head/sys/sys/types.h Tue Nov 13 12:52:31 2012 (r242958) @@ -141,6 +141,46 @@ typedef __id_t id_t; /* can hold a uid #define _ID_T_DECLARED #endif +#ifndef _IDTYPE_T_DECLARED + +typedef enum +#if defined(__BSD_VISIBLE) + idtype /* pollutes XPG4.2 namespace */ +#endif + { + /* + * These names were mostly lifted from Solaris source code and + * still use Solaris style naming to avoid breaking any + * OpenSolaris code which has been ported to FreeBSD. There + * is no clear FreeBSD counterpart for all of the names, but + * some have a clear correspondence to FreeBSD entities. + */ + P_PID, /* A process identifier. */ + P_PPID, /* A parent process identifier. */ + P_PGID, /* A process group identifier. */ + P_SID, /* A session identifier. */ + P_CID, /* A scheduling class identifier. */ + P_UID, /* A user identifier. */ + P_GID, /* A group identifier. */ + P_ALL, /* All processes. */ + P_LWPID, /* An LWP identifier. */ + P_TASKID, /* A task identifier. */ + P_PROJID, /* A project identifier. */ + P_POOLID, /* A pool identifier. */ + P_JAILID, /* A zone identifier. */ + P_CTID, /* A (process) contract identifier. */ + P_CPUID, /* CPU identifier. */ + P_PSETID /* Processor set identifier */ +} idtype_t; /* The type of id_t we are using. */ + +#if defined(__BSD_VISIBLE) +#define P_ZONEID P_JAILID +#endif + +#define _IDTYPE_T_DECLARED +#endif + + #ifndef _INO_T_DECLARED typedef __ino_t ino_t; /* inode number */ #define _INO_T_DECLARED Modified: head/sys/sys/wait.h ============================================================================== --- head/sys/sys/wait.h Tue Nov 13 11:29:08 2012 (r242957) +++ head/sys/sys/wait.h Tue Nov 13 12:52:31 2012 (r242958) @@ -80,6 +80,9 @@ #define WSTOPPED WUNTRACED /* SUS compatibility */ #define WCONTINUED 4 /* Report a job control continued process. */ #define WNOWAIT 8 /* Poll only. Don't delete the proc entry. */ +#define WEXITED 16 /* Wait for exited processes. */ +#define WTRAPPED 32 /* Wait for a process to hit a trap or + a breakpoint. */ #if __BSD_VISIBLE #define WLINUXCLONE 0x80000000 /* Wait for kthread spawned from linux_clone. */ @@ -87,6 +90,8 @@ /* * Tokens for special values of the "pid" parameter to wait4. + * Extended struct __wrusage to collect rusage for both the target + * process and its children within one wait6() call. */ #if __BSD_VISIBLE #define WAIT_ANY (-1) /* any process */ @@ -97,12 +102,19 @@ #include __BEGIN_DECLS +struct __siginfo; pid_t wait(int *); pid_t waitpid(pid_t, int *, int); +#if __POSIX_VISIBLE >= 200112 +int waitid(idtype_t, id_t, struct __siginfo *, int); +#endif #if __BSD_VISIBLE struct rusage; +struct __wrusage; pid_t wait3(int *, int, struct rusage *); pid_t wait4(pid_t, int *, int, struct rusage *); +pid_t wait6(idtype_t, id_t, int *, int, struct __wrusage *, + struct __siginfo *); #endif __END_DECLS #endif /* !_KERNEL */ From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 12:53:42 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8AAC3849; Tue, 13 Nov 2012 12:53:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7036F8FC19; Tue, 13 Nov 2012 12:53:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qADCrgYN048296; Tue, 13 Nov 2012 12:53:42 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qADCrgV7048285; Tue, 13 Nov 2012 12:53:42 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201211131253.qADCrgV7048285@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 13 Nov 2012 12:53:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242959 - in head/sys: compat/freebsd32 kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 12:53:42 -0000 Author: kib Date: Tue Nov 13 12:53:41 2012 New Revision: 242959 URL: http://svnweb.freebsd.org/changeset/base/242959 Log: Regen Modified: head/sys/compat/freebsd32/freebsd32_proto.h head/sys/compat/freebsd32/freebsd32_syscall.h head/sys/compat/freebsd32/freebsd32_syscalls.c head/sys/compat/freebsd32/freebsd32_sysent.c head/sys/compat/freebsd32/freebsd32_systrace_args.c head/sys/kern/init_sysent.c head/sys/kern/syscalls.c head/sys/kern/systrace_args.c head/sys/sys/syscall.h head/sys/sys/syscall.mk head/sys/sys/sysproto.h Modified: head/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_proto.h Tue Nov 13 12:52:31 2012 (r242958) +++ head/sys/compat/freebsd32/freebsd32_proto.h Tue Nov 13 12:53:41 2012 (r242959) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 239347 2012-08-17 02:26:31Z davidxu + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 242958 2012-11-13 12:52:31Z kib */ #ifndef _FREEBSD32_SYSPROTO_H_ @@ -589,6 +589,14 @@ struct freebsd32_posix_fadvise_args { char len2_l_[PADL_(uint32_t)]; uint32_t len2; char len2_r_[PADR_(uint32_t)]; char advice_l_[PADL_(int)]; int advice; char advice_r_[PADR_(int)]; }; +struct freebsd32_wait6_args { + char idtype_l_[PADL_(int)]; int idtype; char idtype_r_[PADR_(int)]; + char id_l_[PADL_(int)]; int id; char id_r_[PADR_(int)]; + char status_l_[PADL_(int *)]; int * status; char status_r_[PADR_(int *)]; + char options_l_[PADL_(int)]; int options; char options_r_[PADR_(int)]; + char wrusage_l_[PADL_(struct wrusage32 *)]; struct wrusage32 * wrusage; char wrusage_r_[PADR_(struct wrusage32 *)]; + char info_l_[PADL_(siginfo_t *)]; siginfo_t * info; char info_r_[PADR_(siginfo_t *)]; +}; #if !defined(PAD64_REQUIRED) && (defined(__powerpc__) || defined(__mips__)) #define PAD64_REQUIRED #endif @@ -700,6 +708,7 @@ int freebsd32_shmctl(struct thread *, st int freebsd32_pselect(struct thread *, struct freebsd32_pselect_args *); int freebsd32_posix_fallocate(struct thread *, struct freebsd32_posix_fallocate_args *); int freebsd32_posix_fadvise(struct thread *, struct freebsd32_posix_fadvise_args *); +int freebsd32_wait6(struct thread *, struct freebsd32_wait6_args *); #ifdef COMPAT_43 @@ -1076,6 +1085,7 @@ int freebsd7_freebsd32_shmctl(struct thr #define FREEBSD32_SYS_AUE_freebsd32_pselect AUE_SELECT #define FREEBSD32_SYS_AUE_freebsd32_posix_fallocate AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_posix_fadvise AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_wait6 AUE_WAIT6 #undef PAD_ #undef PADL_ Modified: head/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscall.h Tue Nov 13 12:52:31 2012 (r242958) +++ head/sys/compat/freebsd32/freebsd32_syscall.h Tue Nov 13 12:53:41 2012 (r242959) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 239347 2012-08-17 02:26:31Z davidxu + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 242958 2012-11-13 12:52:31Z kib */ #define FREEBSD32_SYS_syscall 0 @@ -429,4 +429,5 @@ #define FREEBSD32_SYS_rctl_remove_rule 529 #define FREEBSD32_SYS_freebsd32_posix_fallocate 530 #define FREEBSD32_SYS_freebsd32_posix_fadvise 531 -#define FREEBSD32_SYS_MAXSYSCALL 532 +#define FREEBSD32_SYS_freebsd32_wait6 532 +#define FREEBSD32_SYS_MAXSYSCALL 533 Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscalls.c Tue Nov 13 12:52:31 2012 (r242958) +++ head/sys/compat/freebsd32/freebsd32_syscalls.c Tue Nov 13 12:53:41 2012 (r242959) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 239347 2012-08-17 02:26:31Z davidxu + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 242958 2012-11-13 12:52:31Z kib */ const char *freebsd32_syscallnames[] = { @@ -555,4 +555,5 @@ const char *freebsd32_syscallnames[] = { "rctl_remove_rule", /* 529 = rctl_remove_rule */ "freebsd32_posix_fallocate", /* 530 = freebsd32_posix_fallocate */ "freebsd32_posix_fadvise", /* 531 = freebsd32_posix_fadvise */ + "freebsd32_wait6", /* 532 = freebsd32_wait6 */ }; Modified: head/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_sysent.c Tue Nov 13 12:52:31 2012 (r242958) +++ head/sys/compat/freebsd32/freebsd32_sysent.c Tue Nov 13 12:53:41 2012 (r242959) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 239347 2012-08-17 02:26:31Z davidxu + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 242958 2012-11-13 12:52:31Z kib */ #include "opt_compat.h" @@ -592,4 +592,5 @@ struct sysent freebsd32_sysent[] = { { AS(rctl_remove_rule_args), (sy_call_t *)sys_rctl_remove_rule, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 529 = rctl_remove_rule */ { AS(freebsd32_posix_fallocate_args), (sy_call_t *)freebsd32_posix_fallocate, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 530 = freebsd32_posix_fallocate */ { AS(freebsd32_posix_fadvise_args), (sy_call_t *)freebsd32_posix_fadvise, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 531 = freebsd32_posix_fadvise */ + { AS(freebsd32_wait6_args), (sy_call_t *)freebsd32_wait6, AUE_WAIT6, NULL, 0, 0, 0, SY_THR_STATIC }, /* 532 = freebsd32_wait6 */ }; Modified: head/sys/compat/freebsd32/freebsd32_systrace_args.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_systrace_args.c Tue Nov 13 12:52:31 2012 (r242958) +++ head/sys/compat/freebsd32/freebsd32_systrace_args.c Tue Nov 13 12:53:41 2012 (r242959) @@ -3076,6 +3076,18 @@ systrace_args(int sysnum, void *params, *n_args = 6; break; } + /* freebsd32_wait6 */ + case 532: { + struct freebsd32_wait6_args *p = params; + iarg[0] = p->idtype; /* int */ + iarg[1] = p->id; /* int */ + uarg[2] = (intptr_t) p->status; /* int * */ + iarg[3] = p->options; /* int */ + uarg[4] = (intptr_t) p->wrusage; /* struct wrusage32 * */ + uarg[5] = (intptr_t) p->info; /* siginfo_t * */ + *n_args = 6; + break; + } default: *n_args = 0; break; @@ -8206,6 +8218,31 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; + /* freebsd32_wait6 */ + case 532: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + case 2: + p = "int *"; + break; + case 3: + p = "int"; + break; + case 4: + p = "struct wrusage32 *"; + break; + case 5: + p = "siginfo_t *"; + break; + default: + break; + }; + break; default: break; }; @@ -9963,6 +10000,11 @@ systrace_return_setargdesc(int sysnum, i if (ndx == 0 || ndx == 1) p = "int"; break; + /* freebsd32_wait6 */ + case 532: + if (ndx == 0 || ndx == 1) + p = "int"; + break; default: break; }; Modified: head/sys/kern/init_sysent.c ============================================================================== --- head/sys/kern/init_sysent.c Tue Nov 13 12:52:31 2012 (r242958) +++ head/sys/kern/init_sysent.c Tue Nov 13 12:53:41 2012 (r242959) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 239347 2012-08-17 02:26:31Z davidxu + * created from FreeBSD: head/sys/kern/syscalls.master 242958 2012-11-13 12:52:31Z kib */ #include "opt_compat.h" @@ -41,7 +41,7 @@ struct sysent sysent[] = { { AS(write_args), (sy_call_t *)sys_write, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 4 = write */ { AS(open_args), (sy_call_t *)sys_open, AUE_OPEN_RWTC, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 5 = open */ { AS(close_args), (sy_call_t *)sys_close, AUE_CLOSE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 6 = close */ - { AS(wait_args), (sy_call_t *)sys_wait4, AUE_WAIT4, NULL, 0, 0, 0, SY_THR_STATIC }, /* 7 = wait4 */ + { AS(wait4_args), (sy_call_t *)sys_wait4, AUE_WAIT4, NULL, 0, 0, 0, SY_THR_STATIC }, /* 7 = wait4 */ { compat(AS(ocreat_args),creat), AUE_CREAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 8 = old creat */ { AS(link_args), (sy_call_t *)sys_link, AUE_LINK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 9 = link */ { AS(unlink_args), (sy_call_t *)sys_unlink, AUE_UNLINK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 10 = unlink */ @@ -566,4 +566,5 @@ struct sysent sysent[] = { { AS(rctl_remove_rule_args), (sy_call_t *)sys_rctl_remove_rule, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 529 = rctl_remove_rule */ { AS(posix_fallocate_args), (sy_call_t *)sys_posix_fallocate, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 530 = posix_fallocate */ { AS(posix_fadvise_args), (sy_call_t *)sys_posix_fadvise, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 531 = posix_fadvise */ + { AS(wait6_args), (sy_call_t *)sys_wait6, AUE_WAIT6, NULL, 0, 0, 0, SY_THR_STATIC }, /* 532 = wait6 */ }; Modified: head/sys/kern/syscalls.c ============================================================================== --- head/sys/kern/syscalls.c Tue Nov 13 12:52:31 2012 (r242958) +++ head/sys/kern/syscalls.c Tue Nov 13 12:53:41 2012 (r242959) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 239347 2012-08-17 02:26:31Z davidxu + * created from FreeBSD: head/sys/kern/syscalls.master 242958 2012-11-13 12:52:31Z kib */ const char *syscallnames[] = { @@ -539,4 +539,5 @@ const char *syscallnames[] = { "rctl_remove_rule", /* 529 = rctl_remove_rule */ "posix_fallocate", /* 530 = posix_fallocate */ "posix_fadvise", /* 531 = posix_fadvise */ + "wait6", /* 532 = wait6 */ }; Modified: head/sys/kern/systrace_args.c ============================================================================== --- head/sys/kern/systrace_args.c Tue Nov 13 12:52:31 2012 (r242958) +++ head/sys/kern/systrace_args.c Tue Nov 13 12:53:41 2012 (r242959) @@ -64,7 +64,7 @@ systrace_args(int sysnum, void *params, } /* wait4 */ case 7: { - struct wait_args *p = params; + struct wait4_args *p = params; iarg[0] = p->pid; /* int */ uarg[1] = (intptr_t) p->status; /* int * */ iarg[2] = p->options; /* int */ @@ -3274,6 +3274,18 @@ systrace_args(int sysnum, void *params, *n_args = 4; break; } + /* wait6 */ + case 532: { + struct wait6_args *p = params; + iarg[0] = p->idtype; /* int */ + iarg[1] = p->id; /* int */ + uarg[2] = (intptr_t) p->status; /* int * */ + iarg[3] = p->options; /* int */ + uarg[4] = (intptr_t) p->wrusage; /* struct __wrusage * */ + uarg[5] = (intptr_t) p->info; /* siginfo_t * */ + *n_args = 6; + break; + } default: *n_args = 0; break; @@ -8708,6 +8720,31 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; + /* wait6 */ + case 532: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + case 2: + p = "int *"; + break; + case 3: + p = "int"; + break; + case 4: + p = "struct __wrusage *"; + break; + case 5: + p = "siginfo_t *"; + break; + default: + break; + }; + break; default: break; }; @@ -10596,6 +10633,11 @@ systrace_return_setargdesc(int sysnum, i if (ndx == 0 || ndx == 1) p = "int"; break; + /* wait6 */ + case 532: + if (ndx == 0 || ndx == 1) + p = "int"; + break; default: break; }; Modified: head/sys/sys/syscall.h ============================================================================== --- head/sys/sys/syscall.h Tue Nov 13 12:52:31 2012 (r242958) +++ head/sys/sys/syscall.h Tue Nov 13 12:53:41 2012 (r242959) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 239347 2012-08-17 02:26:31Z davidxu + * created from FreeBSD: head/sys/kern/syscalls.master 242958 2012-11-13 12:52:31Z kib */ #define SYS_syscall 0 @@ -451,4 +451,5 @@ #define SYS_rctl_remove_rule 529 #define SYS_posix_fallocate 530 #define SYS_posix_fadvise 531 -#define SYS_MAXSYSCALL 532 +#define SYS_wait6 532 +#define SYS_MAXSYSCALL 533 Modified: head/sys/sys/syscall.mk ============================================================================== --- head/sys/sys/syscall.mk Tue Nov 13 12:52:31 2012 (r242958) +++ head/sys/sys/syscall.mk Tue Nov 13 12:53:41 2012 (r242959) @@ -1,7 +1,7 @@ # FreeBSD system call names. # DO NOT EDIT-- this file is automatically generated. # $FreeBSD$ -# created from FreeBSD: head/sys/kern/syscalls.master 239347 2012-08-17 02:26:31Z davidxu +# created from FreeBSD: head/sys/kern/syscalls.master 242958 2012-11-13 12:52:31Z kib MIASM = \ syscall.o \ exit.o \ @@ -399,4 +399,5 @@ MIASM = \ rctl_add_rule.o \ rctl_remove_rule.o \ posix_fallocate.o \ - posix_fadvise.o + posix_fadvise.o \ + wait6.o Modified: head/sys/sys/sysproto.h ============================================================================== --- head/sys/sys/sysproto.h Tue Nov 13 12:52:31 2012 (r242958) +++ head/sys/sys/sysproto.h Tue Nov 13 12:53:41 2012 (r242959) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 239347 2012-08-17 02:26:31Z davidxu + * created from FreeBSD: head/sys/kern/syscalls.master 242958 2012-11-13 12:52:31Z kib */ #ifndef _SYS_SYSPROTO_H_ @@ -60,7 +60,7 @@ struct open_args { struct close_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; }; -struct wait_args { +struct wait4_args { char pid_l_[PADL_(int)]; int pid; char pid_r_[PADR_(int)]; char status_l_[PADL_(int *)]; int * status; char status_r_[PADR_(int *)]; char options_l_[PADL_(int)]; int options; char options_r_[PADR_(int)]; @@ -1754,6 +1754,14 @@ struct posix_fadvise_args { char len_l_[PADL_(off_t)]; off_t len; char len_r_[PADR_(off_t)]; char advice_l_[PADL_(int)]; int advice; char advice_r_[PADR_(int)]; }; +struct wait6_args { + char idtype_l_[PADL_(int)]; int idtype; char idtype_r_[PADR_(int)]; + char id_l_[PADL_(int)]; int id; char id_r_[PADR_(int)]; + char status_l_[PADL_(int *)]; int * status; char status_r_[PADR_(int *)]; + char options_l_[PADL_(int)]; int options; char options_r_[PADR_(int)]; + char wrusage_l_[PADL_(struct __wrusage *)]; struct __wrusage * wrusage; char wrusage_r_[PADR_(struct __wrusage *)]; + char info_l_[PADL_(siginfo_t *)]; siginfo_t * info; char info_r_[PADR_(siginfo_t *)]; +}; int nosys(struct thread *, struct nosys_args *); void sys_sys_exit(struct thread *, struct sys_exit_args *); int sys_fork(struct thread *, struct fork_args *); @@ -1761,7 +1769,7 @@ int sys_read(struct thread *, struct rea int sys_write(struct thread *, struct write_args *); int sys_open(struct thread *, struct open_args *); int sys_close(struct thread *, struct close_args *); -int sys_wait4(struct thread *, struct wait_args *); +int sys_wait4(struct thread *, struct wait4_args *); int sys_link(struct thread *, struct link_args *); int sys_unlink(struct thread *, struct unlink_args *); int sys_chdir(struct thread *, struct chdir_args *); @@ -2135,6 +2143,7 @@ int sys_rctl_add_rule(struct thread *, s int sys_rctl_remove_rule(struct thread *, struct rctl_remove_rule_args *); int sys_posix_fallocate(struct thread *, struct posix_fallocate_args *); int sys_posix_fadvise(struct thread *, struct posix_fadvise_args *); +int sys_wait6(struct thread *, struct wait6_args *); #ifdef COMPAT_43 @@ -2830,6 +2839,7 @@ int freebsd7_shmctl(struct thread *, str #define SYS_AUE_rctl_remove_rule AUE_NULL #define SYS_AUE_posix_fallocate AUE_NULL #define SYS_AUE_posix_fadvise AUE_NULL +#define SYS_AUE_wait6 AUE_WAIT6 #undef PAD_ #undef PADL_ From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 12:55:52 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CD1799E3; Tue, 13 Nov 2012 12:55:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B1ABC8FC08; Tue, 13 Nov 2012 12:55:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qADCtqAE048675; Tue, 13 Nov 2012 12:55:52 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qADCtqbK048669; Tue, 13 Nov 2012 12:55:52 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201211131255.qADCtqbK048669@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 13 Nov 2012 12:55:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242960 - in head/lib/libc: gen include sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 12:55:52 -0000 Author: kib Date: Tue Nov 13 12:55:52 2012 New Revision: 242960 URL: http://svnweb.freebsd.org/changeset/base/242960 Log: Implement the waitid() SUSv4 function using wait6() system call. PR: standards/170346 Submitted by: "Jukka A. Ukkonen" MFC after: 1 month Added: head/lib/libc/gen/waitid.c (contents, props changed) Modified: head/lib/libc/gen/Makefile.inc head/lib/libc/gen/Symbol.map head/lib/libc/include/namespace.h head/lib/libc/include/un-namespace.h head/lib/libc/sys/Symbol.map Modified: head/lib/libc/gen/Makefile.inc ============================================================================== --- head/lib/libc/gen/Makefile.inc Tue Nov 13 12:53:41 2012 (r242959) +++ head/lib/libc/gen/Makefile.inc Tue Nov 13 12:55:52 2012 (r242960) @@ -34,7 +34,7 @@ SRCS+= __getosreldate.c __xuname.c \ syslog.c telldir.c termios.c time.c times.c timezone.c tls.c \ ttyname.c ttyslot.c ualarm.c ulimit.c uname.c unvis.c \ usleep.c utime.c utxdb.c valloc.c vis.c wait.c wait3.c waitpid.c \ - wordexp.c + waitid.c wordexp.c .PATH: ${.CURDIR}/../../contrib/libc-pwcache SRCS+= pwcache.c pwcache.h Modified: head/lib/libc/gen/Symbol.map ============================================================================== --- head/lib/libc/gen/Symbol.map Tue Nov 13 12:53:41 2012 (r242959) +++ head/lib/libc/gen/Symbol.map Tue Nov 13 12:55:52 2012 (r242960) @@ -391,6 +391,7 @@ FBSD_1.3 { pwcache_userdb; pwcache_groupdb; uid_from_user; + waitid; }; FBSDprivate_1.0 { Added: head/lib/libc/gen/waitid.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/gen/waitid.c Tue Nov 13 12:55:52 2012 (r242960) @@ -0,0 +1,65 @@ +/*- + * Copyright (c) 2012 Jukka A. Ukkonen + * All rights reserved. + * + * This software was developed by Jukka Ukkonen for FreeBSD. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "namespace.h" +#include +#include +#include +#include +#include +#include +#include "un-namespace.h" + +int +__waitid(idtype_t idtype, id_t id, siginfo_t *info, int flags) +{ + int status; + pid_t ret; + + ret = _wait6(idtype, id, &status, flags, NULL, info); + + /* + * According to SUSv4, waitid() shall not return a PID when a + * process is found, but only 0. If a process was actually + * found, siginfo_t fields si_signo and si_pid will be + * non-zero. In case WNOHANG was set in the flags and no + * process was found those fields are set to zero using + * memset() below. + */ + if (ret == 0 && info != NULL) + memset(info, 0, sizeof(*info)); + else if (ret > 0) + ret = 0; + return (ret); +} + +__weak_reference(__waitid, waitid); +__weak_reference(__waitid, _waitid); Modified: head/lib/libc/include/namespace.h ============================================================================== --- head/lib/libc/include/namespace.h Tue Nov 13 12:53:41 2012 (r242959) +++ head/lib/libc/include/namespace.h Tue Nov 13 12:55:52 2012 (r242960) @@ -229,6 +229,7 @@ #define socketpair _socketpair #define usleep _usleep #define wait4 _wait4 +#define wait6 _wait6 #define waitpid _waitpid #define write _write #define writev _writev Modified: head/lib/libc/include/un-namespace.h ============================================================================== --- head/lib/libc/include/un-namespace.h Tue Nov 13 12:53:41 2012 (r242959) +++ head/lib/libc/include/un-namespace.h Tue Nov 13 12:55:52 2012 (r242960) @@ -210,6 +210,7 @@ #undef socketpair #undef usleep #undef wait4 +#undef wait6 #undef waitpid #undef write #undef writev Modified: head/lib/libc/sys/Symbol.map ============================================================================== --- head/lib/libc/sys/Symbol.map Tue Nov 13 12:53:41 2012 (r242959) +++ head/lib/libc/sys/Symbol.map Tue Nov 13 12:55:52 2012 (r242960) @@ -384,6 +384,7 @@ FBSD_1.3 { ffclock_getestimate; ffclock_setestimate; posix_fadvise; + wait6; }; FBSDprivate_1.0 { @@ -1019,6 +1020,8 @@ FBSDprivate_1.0 { __sys_vadvise; _wait4; __sys_wait4; + _wait6; + __sys_wait6; _write; __sys_write; _writev; From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 12:56:43 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 051E0B6C; Tue, 13 Nov 2012 12:56:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C6F4D8FC1B; Tue, 13 Nov 2012 12:56:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qADCugqB048830; Tue, 13 Nov 2012 12:56:42 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qADCugRt048828; Tue, 13 Nov 2012 12:56:42 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201211131256.qADCugRt048828@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 13 Nov 2012 12:56:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242961 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 12:56:43 -0000 Author: kib Date: Tue Nov 13 12:56:42 2012 New Revision: 242961 URL: http://svnweb.freebsd.org/changeset/base/242961 Log: Document wait6() and waitid(). PR: standards/170346 Submitted by: "Jukka A. Ukkonen" MFC after: 1 month Modified: head/lib/libc/sys/Makefile.inc head/lib/libc/sys/wait.2 Modified: head/lib/libc/sys/Makefile.inc ============================================================================== --- head/lib/libc/sys/Makefile.inc Tue Nov 13 12:55:52 2012 (r242960) +++ head/lib/libc/sys/Makefile.inc Tue Nov 13 12:56:42 2012 (r242961) @@ -217,5 +217,6 @@ MLINKS+=timer_settime.2 timer_getoverrun MLINKS+=truncate.2 ftruncate.2 MLINKS+=unlink.2 unlinkat.2 MLINKS+=utimes.2 futimes.2 utimes.2 futimesat.2 utimes.2 lutimes.2 -MLINKS+=wait.2 wait3.2 wait.2 wait4.2 wait.2 waitpid.2 +MLINKS+=wait.2 wait3.2 wait.2 wait4.2 wait.2 waitpid.2 \ + wait.2 waitid.2 wait.2 wait6.2 MLINKS+=write.2 pwrite.2 write.2 pwritev.2 write.2 writev.2 Modified: head/lib/libc/sys/wait.2 ============================================================================== --- head/lib/libc/sys/wait.2 Tue Nov 13 12:55:52 2012 (r242960) +++ head/lib/libc/sys/wait.2 Tue Nov 13 12:56:42 2012 (r242961) @@ -28,15 +28,17 @@ .\" @(#)wait.2 8.2 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd November 12, 2005 +.Dd November 10, 2012 .Dt WAIT 2 .Os .Sh NAME .Nm wait , +.Nm waitid , .Nm waitpid , +.Nm wait3 , .Nm wait4 , -.Nm wait3 -.Nd wait for process termination +.Nm wait6 +.Nd wait for processes to change status .Sh LIBRARY .Lb libc .Sh SYNOPSIS @@ -46,12 +48,17 @@ .Fn wait "int *status" .Ft pid_t .Fn waitpid "pid_t wpid" "int *status" "int options" +.In sys/signal.h +.Ft int +.Fn waitid "idtype_t idtype" "id_t id" "siginfo_t *info" "int options" .In sys/time.h .In sys/resource.h .Ft pid_t .Fn wait3 "int *status" "int options" "struct rusage *rusage" .Ft pid_t .Fn wait4 "pid_t wpid" "int *status" "int options" "struct rusage *rusage" +.Ft pid_t +.Fn wait6 "idtype_t idtype" "id_t id" "int *status" "int options" "struct __wrusage *wrusage" "siginfo_t *infop" .Sh DESCRIPTION The .Fn wait @@ -86,28 +93,172 @@ system call provides a more general inte that need to wait for certain child processes, that need resource utilization statistics accumulated by child processes, or that require options. -The other wait functions are implemented using -.Fn wait4 . .Pp -The +The broadest interface of all functions in this family is +.Fn wait6 +which is otherwise very much like +.Fn wait4 +but with a few very important distinctions. +To wait for exited processes, the option flag +.Dv WEXITED +need to be explicitly specified. +This allows for waiting for processes which have experienced other +status changes without having to handle also the exit status from +the terminated processes. +Instead of the traditional +.Dv rusage +argument, a pointer to a new structure +.Bd -literal +struct __wrusage { + struct rusage wru_self; + struct rusage wru_children; +}; +.Ed +can be passed. +This allows the calling process to collect resource usage statistics +from both its own child process as well as from its grand children. +When no resource usage statistics are needed this pointer can be +.Dv NULL . +The last argument +.Fa infop +must be either +.Dv NULL +or a pointer to a +.Fa siginfo_t +structure. +When specified, the structure is filled the same as for +.Dv SIGNCHLD +signal, delivered at the process state change. +.br +The process, which state is queried, is specified by two arguments +.Fa idtype +and +.Fa id . +The separate +.Fa idtype +and +.Fa id +arguments allows to support many other types of +IDs as well in addition to PID and PGID. +.Bl -bullet -offset indent +.It +If +.Fa idtype +is +.Dv P_PID , +.Fn waitid +and +.Fn wait6 +wait for the child process with a process ID equal to +.Dv (pid_t)id . +.It +If +.Fa idtype +is +.Dv P_PGID , +.Fn waitid +and +.Fn wait6 +wait for the child process with a process group ID equal to +.Dv (pid_t)id . +.It +If +.Fa idtype +is +.Dv P_ALL , +.Fn waitid +and +.Fn wait6 +wait for any child process and the +.Dv id +is ignored. +.It +If +.Fa idtype +is +.Dv P_PID +or +.Dv P_PGID +and the +.Dv id +is zero, +.Fn waitid +and +.Fn wait6 +wait for any child process in the same process group as the caller. +.El +.Pp +Non-standard specifiers for the process to wait for, supported by this +implementation of +.Fn waitid +and +.Fn wait6 , +are: +.Bl -bullet -offset indent +.It +The +.Fa idtype +value +.Dv P_UID +waits for processes which effective UID is equal to +.Dv (uid_t)id . +.It +The +.Fa idtype +value +.Dv P_GID +waits for processes which effective GID is equal to +.Dv (gid_t)id . +.It +The +.Fa idtype +value +.Dv P_SID +waits for processes which session ID is equal to +.Dv id . +In case the child process started its own new session, +SID will be the same as its own PID. +Otherwise the SID of a child process will match the caller's SID. +.It +The +.Fa idtype +value +.Dv P_JAILID +waits for processes within a jail which jail identifier is equal +to +.Dv id . +.El +.Pp +For +.Fn wait , +.Fn wait3 , +and +.Fn wait4 +functions, the single .Fa wpid argument specifies the set of child processes for which to wait. +.Bl -bullet -offset indent +.It If .Fa wpid is -1, the call waits for any child process. +.It If .Fa wpid is 0, the call waits for any child process in the process group of the caller. +.It If .Fa wpid is greater than zero, the call waits for the process with process id .Fa wpid . +.It If .Fa wpid is less than -1, the call waits for any process whose process group id equals the absolute value of .Fa wpid . +.El .Pp The .Fa status @@ -116,41 +267,102 @@ argument is defined below. The .Fa options argument contains the bitwise OR of any of the following options. -The -.Dv WCONTINUED -option indicates that children of the current process that +.Bl -tag -width Ds +.It Dv WCONTINUED +indicates that children of the current process that have continued from a job control stop, by receiving a .Dv SIGCONT signal, should also have their status reported. -The -.Dv WNOHANG -option -is used to indicate that the call should not block if -there are no processes that wish to report status. -If the -.Dv WUNTRACED -option is set, -children of the current process that are stopped +.It Dv WNOHANG +is used to indicate that the call should not block when +there are no processes wishing to report status. +.It Dv WUNTRACED +indicates that children of the current process which are stopped due to a .Dv SIGTTIN , SIGTTOU , SIGTSTP , or .Dv SIGSTOP -signal also have their status reported. -The -.Dv WSTOPPED -option is an alias for +signal shall have their status reported. +.It Dv WSTOPPED +is an alias for .Dv WUNTRACED . -The -.Dv WNOWAIT -option keeps the process whose status is returned in a waitable state. +.It Dv WTRAPPED +allows waiting for processes which have trapped or reached a breakpoint. +.It Dv WEXITED +indicates that the caller is wants to receive status reports from +terminated processes. +This flag is implicitly set for the functions +.Fn wait , +.Fn waitpid , +.Fn wait3 , +and +.Fn wait4 . +.br +For the +.Fn waitid +and +.Fn wait6 +functions, the flag has to be explicitly included in the +.Fa options , +if status reports from terminated processes are expected. +.It Dv WNOWAIT +keeps the process whose status is returned in a waitable state. The process may be waited for again after this call completes. +.El +.sp +For the +.Fn waitid +and +.Fn wait6 +functions, at least one of the options +.Dv WEXITED , +.Dv WUNTRACED , +.Dv WSTOPPED , +.Dv WTRAPPED , +or +.Dv WCONTINUED +must be specified. +Otherwise there will be no events for the call to report. +To avoid hanging indefinitely in such a case these functions +return -1 with +.Dv errno +set to +.Dv EINVAL . .Pp If .Fa rusage -is non-zero, a summary of the resources used by the terminated -process and all its -children is returned (this information is currently not available -for stopped or continued processes). +is non-NULL, a summary of the resources used by the terminated +process and all its children is returned. +.Pp +If +.Fa wrusage +argument is non-NULL, a resource usage statistics +from both its own child process as well as from its grand children +is returned. +.Pp +If +.Fa infop +is non-NULL, it must point to a +.Dv siginfo_t +structure which is filled on return such that the +.Dv si_signo +field is always +.Dv SIGCHLD +and the field +.Dv si_pid +if be non-zero, if there is a status change to report. +If there are no status changes to report and WNOHANG is applied, +both of these fields are returned zero. +When using the +.Fn waitid +function with the +.Dv WNOHANG +option set, checking these fields is the only way to know whether +there were any status changes to report, because the return value +from +.Fn waitid +is be zero as it is for any successful return from +.Fn waitid . .Pp When the .Dv WNOHANG @@ -175,6 +387,20 @@ call is the same as with a .Fa wpid value of -1. +The +.Fn wait6 +call, with the bits +.Dv WEXITED +and +.Dv WTRAPPED +set in the +.Fa options +and with +.Fa infop +set to +.Dv NULL , +is similar to +.Fn wait4 . .Pp The following macros may be used to test the manner of exit of the process. One of the first four macros will evaluate to a non-zero (true) value: @@ -284,6 +510,7 @@ is returned and is set to indicate the error. .Pp If +.Fn wait6 , .Fn wait4 , .Fn wait3 , or @@ -306,6 +533,18 @@ a value of -1 is returned and .Va errno is set to indicate the error. +.Pp +If +.Fn waitid +returns because one or more processes have a state change to report, +0 is returned. +To indicate an error, -1 will be returned and +.Dv errno +set to an appropriate value. +If +.Dv WNOHANG +was used, 0 can be returned indicating no error, but no processes +may have changed state either, if si_signo and/or si_pid are zero. .Sh ERRORS The .Fn wait @@ -335,6 +574,14 @@ The call was interrupted by a caught sig or the signal did not have the .Dv SA_RESTART flag set. +.It Bq Er EINVAL +An invalid value was specified for +.Fa options , +or +.Fa idtype +and +.Fa id +do not specify a valid set of processes. .El .Sh SEE ALSO .Xr _exit 2 , @@ -344,11 +591,13 @@ flag set. .Xr siginfo 3 .Sh STANDARDS The -.Fn wait +.Fn wait , +.Fn waitpid , and -.Fn waitpid +.Fn waitid functions are defined by POSIX; -.Fn wait4 +.Fn wait6 , +.Fn wait4 , and .Fn wait3 are not specified by POSIX. From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 13:06:57 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A0D081A7; Tue, 13 Nov 2012 13:06:57 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 867198FC14; Tue, 13 Nov 2012 13:06:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qADD6vbN050292; Tue, 13 Nov 2012 13:06:57 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qADD6vB2050290; Tue, 13 Nov 2012 13:06:57 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211131306.qADD6vB2050290@svn.freebsd.org> From: Eitan Adler Date: Tue, 13 Nov 2012 13:06:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242962 - head/usr.bin/ssh-copy-id X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 13:06:57 -0000 Author: eadler Date: Tue Nov 13 13:06:57 2012 New Revision: 242962 URL: http://svnweb.freebsd.org/changeset/base/242962 Log: Add examples to the ssh-copy-id script. Approved by: bcr (mentor) MFC after: 3 days Modified: head/usr.bin/ssh-copy-id/ssh-copy-id.1 Modified: head/usr.bin/ssh-copy-id/ssh-copy-id.1 ============================================================================== --- head/usr.bin/ssh-copy-id/ssh-copy-id.1 Tue Nov 13 12:56:42 2012 (r242961) +++ head/usr.bin/ssh-copy-id/ssh-copy-id.1 Tue Nov 13 13:06:57 2012 (r242962) @@ -73,6 +73,9 @@ The remaining arguments are a list of re each one optionally qualified by a user name. .Sh EXIT STATUS .Ex -std +.Sh EXAMPLES +To send a specific key to multiple hosts: +.Dl $ ssh-copy-id -i /path/to/keyfile.pub user@host1 user@host2 user@host3 .Sh HISTORY The .Nm From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 18:24:48 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 52632606; Tue, 13 Nov 2012 18:24:48 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 370B38FC08; Tue, 13 Nov 2012 18:24:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qADIOm8V095959; Tue, 13 Nov 2012 18:24:48 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qADIOmqx095958; Tue, 13 Nov 2012 18:24:48 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201211131824.qADIOmqx095958@svn.freebsd.org> From: Attilio Rao Date: Tue, 13 Nov 2012 18:24:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242988 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 18:24:48 -0000 Author: attilio Date: Tue Nov 13 18:24:47 2012 New Revision: 242988 URL: http://svnweb.freebsd.org/changeset/base/242988 Log: Remove unused/obsolete macros. MFC after: 3 days Modified: head/sys/sys/lock.h Modified: head/sys/sys/lock.h ============================================================================== --- head/sys/sys/lock.h Tue Nov 13 17:16:03 2012 (r242987) +++ head/sys/sys/lock.h Tue Nov 13 18:24:47 2012 (r242988) @@ -304,16 +304,5 @@ void witness_thread_exit(struct thread * #define WITNESS_LINE(lock) (0) #endif /* WITNESS */ -/* - * Helper macros to allow developers to add explicit lock order checks - * wherever they please without having to actually grab a lock to do so. - */ -#define witness_check(l) \ - WITNESS_CHECKORDER(&(l)->lock_object, LOP_EXCLUSIVE, LOCK_FILE, \ - LOCK_LINE, NULL) - -#define witness_check_shared(l) \ - WITNESS_CHECKORDER(&(l)->lock_object, 0, LOCK_FILE, LOCK_LINE, NULL) - #endif /* _KERNEL */ #endif /* _SYS_LOCK_H_ */ From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 19:01:53 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6E63B2B0; Tue, 13 Nov 2012 19:01:53 +0000 (UTC) (envelope-from alc@rice.edu) Received: from mh11.mail.rice.edu (mh11.mail.rice.edu [128.42.199.30]) by mx1.freebsd.org (Postfix) with ESMTP id 395388FC18; Tue, 13 Nov 2012 19:01:52 +0000 (UTC) Received: from mh11.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh11.mail.rice.edu (Postfix) with ESMTP id 345824C027E; Tue, 13 Nov 2012 13:01:46 -0600 (CST) Received: from mh11.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh11.mail.rice.edu (Postfix) with ESMTP id 328924C027B; Tue, 13 Nov 2012 13:01:46 -0600 (CST) X-Virus-Scanned: by amavis-2.7.0 at mh11.mail.rice.edu, auth channel Received: from mh11.mail.rice.edu ([127.0.0.1]) by mh11.mail.rice.edu (mh11.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id iyXKjCaXFu_n; Tue, 13 Nov 2012 13:01:46 -0600 (CST) Received: from adsl-216-63-78-18.dsl.hstntx.swbell.net (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh11.mail.rice.edu (Postfix) with ESMTPSA id 1C29A4C025C; Tue, 13 Nov 2012 13:01:45 -0600 (CST) Message-ID: <50A29918.3000002@rice.edu> Date: Tue, 13 Nov 2012 13:01:44 -0600 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:16.0) Gecko/20121111 Thunderbird/16.0.2 MIME-Version: 1.0 To: Andre Oppermann Subject: Re: svn commit: r242941 - in head/sys: sys vm References: <201211130250.qAD2odEw065268@svn.freebsd.org> <50A1FB96.3050300@freebsd.org> In-Reply-To: <50A1FB96.3050300@freebsd.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Alan Cox , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 19:01:53 -0000 On 11/13/2012 01:49, Andre Oppermann wrote: > On 13.11.2012 03:50, Alan Cox wrote: >> Author: alc >> Date: Tue Nov 13 02:50:39 2012 >> New Revision: 242941 >> URL: http://svnweb.freebsd.org/changeset/base/242941 >> >> Log: >> Replace the single, global page queues lock with per-queue locks >> on the >> active and inactive paging queues. > > Hear hear! Now if only the cache-poisining splay tree would > go as well... I still have some patches that macrotize it > so it can rather easily be replaced with something else, eg. > an RB tree or such. > Honestly, this particular change is not going to have that much of an effect. For some time, in the machine-independent VM layer, the global page queues lock had only been used as a lock on the active, inactive, and hold page queues. Aside from the page daemon, nothing in the machine-independent VM layer acquired and held that lock for more than the time it takes to enqueue or dequeue a single page. There was no reason to have an actual hold queue, so that queue was recently eliminated. The more consequential changes occurred from June to October when I eliminated the use of the global page queues lock from the various pmap implementations, except for PowerPC, which was done by Nathan. Some functions, notably pmap_remove_pages(), held the global page queues lock for quite some time or were so frequently called, notably pmap_enter(), that they created most of the contention for that lock. Right now, the primary issue that I see with the page queue locking is that the page daemon can hold the lock on the active queue for a long time. This may block concurrent page faults from completing because they must typically add the page to the active queue. As for the inactive queue, Kostik already made changes over the summer that now in combination with this change prevent the page daemon from holding the inactive queue lock for a long period of time. As for the splay tree of pages in the VM object, Attilio has been working on-and-off on a path-compressed trie implementation. (The work is in SVN under /user/attilio.) I think it is more likely than not that this work will be in 10.0 when it ships. Alan From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 19:03:14 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7998C4C8; Tue, 13 Nov 2012 19:03:14 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5E42F8FC18; Tue, 13 Nov 2012 19:03:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qADJ3Eh9001842; Tue, 13 Nov 2012 19:03:14 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qADJ3EAu001841; Tue, 13 Nov 2012 19:03:14 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201211131903.qADJ3EAu001841@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 13 Nov 2012 19:03:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242989 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 19:03:14 -0000 Author: pluknet Date: Tue Nov 13 19:03:13 2012 New Revision: 242989 URL: http://svnweb.freebsd.org/changeset/base/242989 Log: Correct rmlock(9) xref and add a missing comma. Modified: head/share/man/man9/pfil.9 Modified: head/share/man/man9/pfil.9 ============================================================================== --- head/share/man/man9/pfil.9 Tue Nov 13 18:24:47 2012 (r242988) +++ head/share/man/man9/pfil.9 Tue Nov 13 19:03:13 2012 (r242989) @@ -203,8 +203,8 @@ function might sleep! .Sh SEE ALSO .Xr bpf 4 , -.Xr if_bridge 4 -.Xr rmlock 4 +.Xr if_bridge 4 , +.Xr rmlock 9 .Sh HISTORY The .Nm From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 19:21:52 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 36FA7A65; Tue, 13 Nov 2012 19:21:52 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1C1F08FC08; Tue, 13 Nov 2012 19:21:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qADJLpax005205; Tue, 13 Nov 2012 19:21:51 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qADJLpJv005204; Tue, 13 Nov 2012 19:21:51 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201211131921.qADJLpJv005204@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 13 Nov 2012 19:21:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242992 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 19:21:52 -0000 Author: pluknet Date: Tue Nov 13 19:21:51 2012 New Revision: 242992 URL: http://svnweb.freebsd.org/changeset/base/242992 Log: Avoid an ambiguous reference to mtx_lock(9). MFC after: 3 days Modified: head/share/man/man9/mi_switch.9 Modified: head/share/man/man9/mi_switch.9 ============================================================================== --- head/share/man/man9/mi_switch.9 Tue Nov 13 19:20:57 2012 (r242991) +++ head/share/man/man9/mi_switch.9 Tue Nov 13 19:21:51 2012 (r242992) @@ -60,7 +60,7 @@ can be enumerated as follows: .It From within a function such as .Xr cv_wait 9 , -.Xr mtx_lock , +.Xr mtx_lock 9 , or .Xr tsleep 9 when the current thread From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 19:45:14 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1646B1D2; Tue, 13 Nov 2012 19:45:14 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id EEC4A8FC0C; Tue, 13 Nov 2012 19:45:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qADJjD1T008632; Tue, 13 Nov 2012 19:45:13 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qADJjDQt008631; Tue, 13 Nov 2012 19:45:13 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201211131945.qADJjDQt008631@svn.freebsd.org> From: Adrian Chadd Date: Tue, 13 Nov 2012 19:45:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242993 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 19:45:14 -0000 Author: adrian Date: Tue Nov 13 19:45:13 2012 New Revision: 242993 URL: http://svnweb.freebsd.org/changeset/base/242993 Log: Place 'dev.ath.X.debug' back under ATH_DEBUG, rather than ATH_DEBUG_ALQ. Modified: head/sys/dev/ath/if_ath_sysctl.c Modified: head/sys/dev/ath/if_ath_sysctl.c ============================================================================== --- head/sys/dev/ath/if_ath_sysctl.c Tue Nov 13 19:21:51 2012 (r242992) +++ head/sys/dev/ath/if_ath_sysctl.c Tue Nov 13 19:45:13 2012 (r242993) @@ -569,10 +569,12 @@ ath_sysctlattach(struct ath_softc *sc) SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "regdomain", CTLFLAG_RD, &sc->sc_eerd, 0, "EEPROM regdomain code"); -#ifdef ATH_DEBUG_ALQ +#ifdef ATH_DEBUG SYSCTL_ADD_QUAD(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "debug", CTLFLAG_RW, &sc->sc_debug, "control debugging printfs"); +#endif +#ifdef ATH_DEBUG_ALQ SYSCTL_ADD_QUAD(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "ktrdebug", CTLFLAG_RW, &sc->sc_ktrdebug, "control debugging KTR"); From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 20:07:35 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 52FD8B12; Tue, 13 Nov 2012 20:07:35 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3918F8FC13; Tue, 13 Nov 2012 20:07:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qADK7Z4v012187; Tue, 13 Nov 2012 20:07:35 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qADK7ZYr012185; Tue, 13 Nov 2012 20:07:35 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201211132007.qADK7ZYr012185@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 13 Nov 2012 20:07:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242995 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 20:07:35 -0000 Author: pluknet Date: Tue Nov 13 20:07:34 2012 New Revision: 242995 URL: http://svnweb.freebsd.org/changeset/base/242995 Log: - Lowercase a cross reference to make. - Sort SEE ALSO cross references. MFC after: 3 days Modified: head/share/man/man9/firmware.9 Modified: head/share/man/man9/firmware.9 ============================================================================== --- head/share/man/man9/firmware.9 Tue Nov 13 19:48:51 2012 (r242994) +++ head/share/man/man9/firmware.9 Tue Nov 13 20:07:34 2012 (r242995) @@ -255,11 +255,11 @@ IxNpeMicrocode.dat Note that generating the firmware modules in this way requires the availability of the following tools: .Xr awk , -.Xr Make , +.Xr make , the compiler and the linker. .Sh SEE ALSO -.Xr module 9 , -.Xr kld 4 +.Xr kld 4 , +.Xr module 9 .Pp .Pa /usr/share/examples/kld/firmware .Sh HISTORY From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 20:35:29 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EA62C56C for ; Tue, 13 Nov 2012 20:35:28 +0000 (UTC) (envelope-from postmaster@mailpod.hostingplatform.com) Received: from atl4mhob05.myregisteredsite.com (atl4mhob05.myregisteredsite.com [209.17.115.43]) by mx1.freebsd.org (Postfix) with ESMTP id 8EB948FC13 for ; Tue, 13 Nov 2012 20:35:28 +0000 (UTC) Received: from mailpod1.hostingplatform.com (mailpod1.networksolutionsemail.com [206.188.198.65]) by atl4mhob05.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qADKZMZK013911 for ; Tue, 13 Nov 2012 15:35:22 -0500 Received: (qmail 32095 invoked by uid 0); 13 Nov 2012 20:35:02 -0000 Received: (qmail 6385 invoked by uid 0); 13 Nov 2012 19:45:29 -0000 Received: from unknown (HELO atl4mhib50.myregisteredsite.com) (209) by 0 with SMTP; 13 Nov 2012 19:45:29 -0000 Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by atl4mhib50.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qADJjO8w025612 for ; Tue, 13 Nov 2012 14:45:27 -0500 Received: from hub.freebsd.org (hub.FreeBSD.org [8.8.178.136]) by mx2.freebsd.org (Postfix) with ESMTP id AA12B3B69DF; Tue, 13 Nov 2012 19:45:20 +0000 (UTC) Received: from hub.freebsd.org (hub.freebsd.org [8.8.178.136]) by hub.freebsd.org (Postfix) with ESMTP id 5BD462FF; Tue, 13 Nov 2012 19:45:20 +0000 (UTC) (envelope-from owner-svn-src-all@freebsd.org) Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1646B1D2; Tue, 13 Nov 2012 19:45:14 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id EEC4A8FC0C; Tue, 13 Nov 2012 19:45:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qADJjD1T008632; Tue, 13 Nov 2012 19:45:13 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qADJjDQt008631; Tue, 13 Nov 2012 19:45:13 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201211131945.qADJjDQt008631@svn.freebsd.org> From: Adrian Chadd Date: Tue, 13 Nov 2012 19:45:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242993 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: owner-svn-src-all@freebsd.org Sender: owner-svn-src-all@freebsd.org X-SpamScore: 0 X-MailHub-Apparently-To: mjm@michaelmeltzer.com X-MailHub-Forwarded: Yes X-BeenThere: svn-src-head@freebsd.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 20:35:29 -0000 Author: adrian Date: Tue Nov 13 19:45:13 2012 New Revision: 242993 URL: http://svnweb.freebsd.org/changeset/base/242993 Log: Place 'dev.ath.X.debug' back under ATH_DEBUG, rather than ATH_DEBUG_ALQ. Modified: head/sys/dev/ath/if_ath_sysctl.c Modified: head/sys/dev/ath/if_ath_sysctl.c ============================================================================== --- head/sys/dev/ath/if_ath_sysctl.c Tue Nov 13 19:21:51 2012 (r242992) +++ head/sys/dev/ath/if_ath_sysctl.c Tue Nov 13 19:45:13 2012 (r242993) @@ -569,10 +569,12 @@ ath_sysctlattach(struct ath_softc *sc) SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "regdomain", CTLFLAG_RD, &sc->sc_eerd, 0, "EEPROM regdomain code"); -#ifdef ATH_DEBUG_ALQ +#ifdef ATH_DEBUG SYSCTL_ADD_QUAD(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "debug", CTLFLAG_RW, &sc->sc_debug, "control debugging printfs"); +#endif +#ifdef ATH_DEBUG_ALQ SYSCTL_ADD_QUAD(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "ktrdebug", CTLFLAG_RW, &sc->sc_ktrdebug, "control debugging KTR"); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 20:38:56 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 44FAD8C5; Tue, 13 Nov 2012 20:38:56 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2A6258FC16; Tue, 13 Nov 2012 20:38:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qADKcuRt016703; Tue, 13 Nov 2012 20:38:56 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qADKcuY2016702; Tue, 13 Nov 2012 20:38:56 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211132038.qADKcuY2016702@svn.freebsd.org> From: Eitan Adler Date: Tue, 13 Nov 2012 20:38:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242996 - head/sys/dev/sio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 20:38:56 -0000 Author: eadler Date: Tue Nov 13 20:38:55 2012 New Revision: 242996 URL: http://svnweb.freebsd.org/changeset/base/242996 Log: Add support for CIR1000 - Cirrus Logic V34 to the sio driver PR: kern/44267 Submitted by: Michail Vidiassov Arrival-Date: Sat Oct 19 07:30:00 PDT 2002 Approved by: cperciva (implicit) MFC after: 1 week Modified: head/sys/dev/sio/sio_isa.c Modified: head/sys/dev/sio/sio_isa.c ============================================================================== --- head/sys/dev/sio/sio_isa.c Tue Nov 13 20:07:34 2012 (r242995) +++ head/sys/dev/sio/sio_isa.c Tue Nov 13 20:38:55 2012 (r242996) @@ -83,6 +83,7 @@ static struct isa_pnp_id sio_ids[] = { {0x0034490a, NULL}, /* BRI3400 - Internal ACF Modem */ {0x0094490a, NULL}, /* BRI9400 - Boca K56Flex PnP */ {0x00b4490a, NULL}, /* BRIB400 - Boca 56k PnP */ + {0x0010320d, NULL}, /* CIR1000 - Cirrus Logic V34 */ {0x0030320d, NULL}, /* CIR3000 - Cirrus Logic V43 */ {0x0100440e, NULL}, /* CRD0001 - Cardinal MVP288IV ? */ {0x01308c0e, NULL}, /* CTL3001 - Creative Labs Phoneblaster */ From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 20:41:37 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C75BCBEB; Tue, 13 Nov 2012 20:41:37 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id AC9128FC16; Tue, 13 Nov 2012 20:41:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qADKfb5o017132; Tue, 13 Nov 2012 20:41:37 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qADKfa5Q017107; Tue, 13 Nov 2012 20:41:36 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201211132041.qADKfa5Q017107@svn.freebsd.org> From: Joel Dahl Date: Tue, 13 Nov 2012 20:41:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242997 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 20:41:37 -0000 Author: joel (doc committer) Date: Tue Nov 13 20:41:36 2012 New Revision: 242997 URL: http://svnweb.freebsd.org/changeset/base/242997 Log: Updates for netgraph node manual pages. Discussed with: glebius Submitted by: Mamontov Roman Modified: head/share/man/man4/ng_UI.4 head/share/man/man4/ng_async.4 head/share/man/man4/ng_atmllc.4 head/share/man/man4/ng_bluetooth.4 head/share/man/man4/ng_bpf.4 head/share/man/man4/ng_bridge.4 head/share/man/man4/ng_bt3c.4 head/share/man/man4/ng_btsocket.4 head/share/man/man4/ng_car.4 head/share/man/man4/ng_ccatm.4 head/share/man/man4/ng_cisco.4 head/share/man/man4/ng_deflate.4 head/share/man/man4/ng_eiface.4 head/share/man/man4/ng_etf.4 head/share/man/man4/ng_ether.4 head/share/man/man4/ng_fec.4 head/share/man/man4/ng_frame_relay.4 head/share/man/man4/ng_gif.4 head/share/man/man4/ng_gif_demux.4 head/share/man/man4/ng_h4.4 head/share/man/man4/ng_hci.4 head/share/man/man4/ng_hole.4 head/share/man/man4/ng_hub.4 head/share/man/man4/ng_iface.4 head/share/man/man4/ng_ksocket.4 head/share/man/man4/ng_l2cap.4 head/share/man/man4/ng_l2tp.4 head/share/man/man4/ng_lmi.4 head/share/man/man4/ng_mppc.4 head/share/man/man4/ng_nat.4 head/share/man/man4/ng_netflow.4 head/share/man/man4/ng_one2many.4 head/share/man/man4/ng_patch.4 head/share/man/man4/ng_ppp.4 head/share/man/man4/ng_pppoe.4 head/share/man/man4/ng_pptpgre.4 head/share/man/man4/ng_pred1.4 head/share/man/man4/ng_rfc1490.4 head/share/man/man4/ng_source.4 head/share/man/man4/ng_split.4 head/share/man/man4/ng_sppp.4 head/share/man/man4/ng_sscfu.4 head/share/man/man4/ng_sscop.4 head/share/man/man4/ng_tag.4 head/share/man/man4/ng_tcpmss.4 head/share/man/man4/ng_tee.4 head/share/man/man4/ng_tty.4 head/share/man/man4/ng_ubt.4 head/share/man/man4/ng_uni.4 head/share/man/man4/ng_vjc.4 head/share/man/man4/ng_vlan.4 Modified: head/share/man/man4/ng_UI.4 ============================================================================== --- head/share/man/man4/ng_UI.4 Tue Nov 13 20:38:55 2012 (r242996) +++ head/share/man/man4/ng_UI.4 Tue Nov 13 20:41:36 2012 (r242997) @@ -65,12 +65,12 @@ will have a 0x03 byte prepended to them hook. .Sh HOOKS This node type supports the following hooks: -.Bl -tag -width foobar -.It Dv downstream +.Bl -tag -width ".Va downstream" +.It Va downstream Downstream connection. Packets on this side of the node have a 0x03 as their first byte. -.It Dv upstream +.It Va upstream Upstream connection. Packets on this side of the node have the initial 0x03 byte stripped off. Modified: head/share/man/man4/ng_async.4 ============================================================================== --- head/share/man/man4/ng_async.4 Tue Nov 13 20:38:55 2012 (r242996) +++ head/share/man/man4/ng_async.4 Tue Nov 13 20:41:36 2012 (r242997) @@ -35,7 +35,7 @@ .\" $FreeBSD$ .\" $Whistle: ng_async.8,v 1.6 1999/01/25 23:46:25 archie Exp $ .\" -.Dd January 19, 1999 +.Dd November 13, 2012 .Dt NG_ASYNC 4 .Os .Sh NAME @@ -88,13 +88,13 @@ Flag sharing between frames is disabled idle time. .Sh HOOKS This node type supports the following hooks: -.Bl -tag -width foobar -.It Dv async +.Bl -tag -width ".Va async" +.It Va async Asynchronous connection. Typically this hook would be connected to a .Xr ng_tty 4 node, which handles transmission of serial data over a tty device. -.It Dv sync +.It Va sync Synchronous connection. This hook sends and receives synchronous frames. For PPP, these frames should contain address, control, and protocol fields, @@ -106,24 +106,17 @@ type node. .Sh CONTROL MESSAGES This node type supports the generic control messages, plus the following: .Bl -tag -width foo -.It Dv NGM_ASYNC_CMD_GET_STATS -This command returns a -.Dv "struct ng_async_stat" -containing node statistics for packet, octet, and error counts. -.It Dv NGM_ASYNC_CMD_CLR_STATS -Clears the node statistics. -.It Dv NGM_ASYNC_CMD_SET_CONFIG +.It Dv NGM_ASYNC_CMD_SET_CONFIG Pq Ic setconfig Sets the node configuration, which is described by a .Dv "struct ng_async_cfg" : .Bd -literal -offset 4n struct ng_async_cfg { - u_char enabled; /* Turn encoding on/off */ - uint16_t amru; /* Max receive async frame len */ - uint16_t smru; /* Max receive sync frame len */ - uint32_t accm; /* ACCM encoding */ + u_char enabled; /* Turn encoding on/off */ + uint16_t amru; /* Max receive async frame length */ + uint16_t smru; /* Max receive sync frame length */ + uint32_t accm; /* ACCM encoding */ }; .Ed -.Pp The .Dv enabled field enables or disables all encoding/decoding functions (default disabled). @@ -142,8 +135,15 @@ The .Dv accm field is the asynchronous character control map, which controls the escaping of characters 0x00 thorough 0x1f (default 0xffffffff). -.It Dv NGM_ASYNC_CMD_GET_CONFIG +.It Dv NGM_ASYNC_CMD_GET_CONFIG Pq Ic getconfig This command returns the current configuration structure. +.It Dv NGM_ASYNC_CMD_GET_STATS Pq Ic getstats +This command returns a +.Dv "struct ng_async_stat" +containing node statistics for packet, octet, and error counts. +.It Dv NGM_ASYNC_CMD_CLR_STATS Pq Ic clrstats +Clears the node statistics. +.Pp .El .Sh SHUTDOWN This node shuts down upon receipt of a Modified: head/share/man/man4/ng_atmllc.4 ============================================================================== --- head/share/man/man4/ng_atmllc.4 Tue Nov 13 20:38:55 2012 (r242996) +++ head/share/man/man4/ng_atmllc.4 Tue Nov 13 20:41:36 2012 (r242997) @@ -60,7 +60,7 @@ encapsulated into a PDU and transmitted hook. .Sh HOOKS This node type supports the following hooks: -.Bl -tag -width indent +.Bl -tag -width ".Va ether" .It Va atm ATM connection. Typically, this hook would be connected to a Modified: head/share/man/man4/ng_bluetooth.4 ============================================================================== --- head/share/man/man4/ng_bluetooth.4 Tue Nov 13 20:38:55 2012 (r242996) +++ head/share/man/man4/ng_bluetooth.4 Tue Nov 13 20:41:36 2012 (r242997) @@ -43,7 +43,7 @@ All Bluetooth variables can be examined .Ss Bluetooth Variables Below is the description of default variables. Each Bluetooth module might add its own variables to the tree. -.Bl -tag -width indent +.Bl -tag -width foo .It Va net.bluetooth.version A read-only integer variable that shows the current version of the Bluetooth stack. Modified: head/share/man/man4/ng_bpf.4 ============================================================================== --- head/share/man/man4/ng_bpf.4 Tue Nov 13 20:38:55 2012 (r242996) +++ head/share/man/man4/ng_bpf.4 Tue Nov 13 20:41:36 2012 (r242997) @@ -35,7 +35,7 @@ .\" $FreeBSD$ .\" $Whistle: ng_bpf.8,v 1.2 1999/12/03 01:57:12 archie Exp $ .\" -.Dd May 30, 2007 +.Dd November 13, 2012 .Dt NG_BPF 4 .Os .Sh NAME @@ -81,7 +81,7 @@ This node type supports any number of ho .Sh CONTROL MESSAGES This node type supports the generic control messages, plus the following: .Bl -tag -width foo -.It Dv NGM_BPF_SET_PROGRAM +.It Dv NGM_BPF_SET_PROGRAM Pq Ic setprogram This command sets the filter program that will be applied to incoming data on a hook. The following structure must be supplied as an argument: @@ -90,7 +90,7 @@ struct ng_bpf_hookprog { char thisHook[NG_HOOKSIZ]; /* name of hook */ char ifMatch[NG_HOOKSIZ]; /* match dest hook */ char ifNotMatch[NG_HOOKSIZ]; /* !match dest hook */ - int32_t bpf_prog_len; /* #isns in program */ + int32_t bpf_prog_len; /* #insns in program */ struct bpf_insn bpf_prog[]; /* bpf program */ }; .Ed @@ -112,25 +112,25 @@ The program must be a valid program or else .Er EINVAL is returned. -.It Dv NGM_BPF_GET_PROGRAM +.It Dv NGM_BPF_GET_PROGRAM Pq Ic getprogram This command takes an .Tn ASCII string argument, the hook name, and returns the corresponding .Dv "struct ng_bpf_hookprog" as shown above. -.It Dv NGM_BPF_GET_STATS +.It Dv NGM_BPF_GET_STATS Pq Ic getstats This command takes an .Tn ASCII string argument, the hook name, and returns the statistics associated with the hook as a .Dv "struct ng_bpf_hookstat" . -.It Dv NGM_BPF_CLR_STATS +.It Dv NGM_BPF_CLR_STATS Pq Ic clrstats This command takes an .Tn ASCII string argument, the hook name, and clears the statistics associated with the hook. -.It Dv NGM_BPF_GETCLR_STATS +.It Dv NGM_BPF_GETCLR_STATS Pq Ic getclrstats This command is identical to .Dv NGM_BPF_GET_STATS , except that the statistics are also atomically cleared. Modified: head/share/man/man4/ng_bridge.4 ============================================================================== --- head/share/man/man4/ng_bridge.4 Tue Nov 13 20:38:55 2012 (r242996) +++ head/share/man/man4/ng_bridge.4 Tue Nov 13 20:41:36 2012 (r242997) @@ -98,7 +98,7 @@ node to the bridge node. This node type supports the generic control messages, plus the following: .Bl -tag -width foo -.It Dv NGM_BRIDGE_SET_CONFIG +.It Dv NGM_BRIDGE_SET_CONFIG Pq Ic setconfig Set the node configuration. This command takes a .Dv "struct ng_bridge_config" @@ -140,13 +140,13 @@ determines how quickly a host must jump before we declare a loopback condition. The default is one second. .Pp -.It Dv NGM_BRIDGE_GET_CONFIG +.It Dv NGM_BRIDGE_GET_CONFIG Pq Ic getconfig Returns the current configuration as a .Dv "struct ng_bridge_config" . -.It Dv NGM_BRIDGE_RESET +.It Dv NGM_BRIDGE_RESET Pq Ic reset Causes the node to forget all hosts and unmute all links. The node configuration is not changed. -.It Dv NGM_BRIDGE_GET_STATS +.It Dv NGM_BRIDGE_GET_STATS Pq Ic getstats This command takes a four byte link number as an argument and returns a .Dv "struct ng_bridge_link_stats" @@ -171,17 +171,17 @@ struct ng_bridge_link_stats { uint64_t memoryFailures; /* times couldn't get mem or mbuf */ }; .Ed -.It Dv NGM_BRIDGE_CLR_STATS +.It Dv NGM_BRIDGE_CLR_STATS Pq Ic clrstats This command takes a four byte link number as an argument and clears the statistics for that link. -.It Dv NGM_BRIDGE_GETCLR_STATS +.It Dv NGM_BRIDGE_GETCLR_STATS Pq Ic getclrstats Same as .Dv NGM_BRIDGE_GET_STATS , but also atomically clears the statistics as well. -.It Dv NGM_BRIDGE_GET_TABLE +.It Dv NGM_BRIDGE_GET_TABLE Pq Ic gettable Returns the current host mapping table used to direct packets, in a .Dv "struct ng_bridge_host_ary" . -.It Dv NGM_BRIDGE_SET_PERSISTENT +.It Dv NGM_BRIDGE_SET_PERSISTENT Pq Ic setpersistent This command sets the persistent flag on the node, and takes no arguments. .El .Sh SHUTDOWN Modified: head/share/man/man4/ng_bt3c.4 ============================================================================== --- head/share/man/man4/ng_bt3c.4 Tue Nov 13 20:38:55 2012 (r242996) +++ head/share/man/man4/ng_bt3c.4 Tue Nov 13 20:41:36 2012 (r242997) @@ -74,34 +74,34 @@ The driver provides support for the 3Com/HP 3CRWB6096-A PCCARD bluetooth adapter. .Sh HOOKS This node type supports the following hooks: -.Bl -tag -width indent -.It Dv hook +.Bl -tag -width ".Va hook" +.It Va hook single HCI frame contained in single .Vt mbuf structure. .El .Sh CONTROL MESSAGES This node type supports the generic control messages, plus the following: -.Bl -tag -width indent -.It Dv NGM_BT3C_NODE_GET_STATE +.Bl -tag -width foo +.It Dv NGM_BT3C_NODE_GET_STATE Pq Ic get_state Returns the current receiving state for the node. -.It Dv NGM_BT3C_NODE_GET_DEBUG -Returns an integer containing the current debug level for the node. -.It Dv NGM_BT3C_NODE_SET_DEBUG +.It Dv NGM_BT3C_NODE_SET_DEBUG Pq Ic set_debug This command takes an integer argument and sets the current debug level for the node. -.It Dv NGM_BT3C_NODE_GET_QLEN +.It Dv NGM_BT3C_NODE_GET_DEBUG Pq Ic get_debug +Returns an integer containing the current debug level for the node. +.It Dv NGM_BT3C_NODE_GET_QLEN Pq Ic get_qlen This command takes a parameter that specifies queue number and returns the current length of the queue for the node. -.It Dv NGM_BT3C_NODE_SET_QLEN +.It Dv NGM_BT3C_NODE_SET_QLEN Pq Ic set_qlen This command takes two parameters that specify the queue number and the maximum length of the queue and sets the maximum length of the queue for the node. -.It Dv NGM_BT3C_NODE_GET_STAT +.It Dv NGM_BT3C_NODE_GET_STAT Pq Ic get_stat Returns various statistic information for the node, such as: number of bytes (frames) sent, number of bytes (frames) received and number of input (output) errors. -.It Dv NGM_BT3C_NODE_RESET_STAT +.It Dv NGM_BT3C_NODE_RESET_STAT Pq Ic reset_stat Reset all statistic counters to zero. .It Dv NGM_BT3C_NODE_DOWNLOAD_FIRMWARE Download card firmware. Modified: head/share/man/man4/ng_btsocket.4 ============================================================================== --- head/share/man/man4/ng_btsocket.4 Tue Nov 13 20:38:55 2012 (r242996) +++ head/share/man/man4/ng_btsocket.4 Tue Nov 13 20:41:36 2012 (r242997) @@ -25,7 +25,7 @@ .\" $Id: ng_btsocket.4,v 1.7 2003/05/21 19:37:35 max Exp $ .\" $FreeBSD$ .\" -.Dd July 8, 2002 +.Dd November 13, 2012 .Dt NG_BTSOCKET 4 .Os .Sh NAME @@ -65,14 +65,14 @@ The Bluetooth raw HCI socket address is struct sockaddr_hci { u_char hci_len; /* total length */ u_char hci_family; /* address family */ - char hci_node[16]; /* HCI node name */ + char hci_node[32]; /* address (size == NG_NODESIZ ) */ }; .Ed .Pp Raw HCI sockets support a number of .Xr ioctl 2 requests such as: -.Bl -tag -width indent +.Bl -tag -width foo .It Dv SIOC_HCI_RAW_NODE_GET_STATE Returns current state for the HCI node. .It Dv SIOC_HCI_RAW_NODE_INIT @@ -174,7 +174,7 @@ request. Raw L2CAP sockets support number of .Xr ioctl 2 requests such as: -.Bl -tag -width indent +.Bl -tag -width foo .It Dv SIOC_L2CAP_NODE_GET_FLAGS Returns current state for the L2CAP node. .It Dv SIOC_L2CAP_NODE_GET_DEBUG @@ -243,7 +243,7 @@ level which can be set with .Xr setsockopt 2 and tested with .Xr getsockopt 2 : -.Bl -tag -width indent +.Bl -tag -width foo .It Dv SO_L2CAP_IMTU Get (set) maximum payload size the local socket is capable of accepting. .It Dv SO_L2CAP_OMTU @@ -312,7 +312,7 @@ The following options, which can be test call, are defined at .Dv SOL_RFCOMM level for RFCOMM sockets: -.Bl -tag -width indent +.Bl -tag -width foo .It Dv SO_RFCOMM_MTU Returns the maximum transfer unit size (in bytes) for the underlying RFCOMM channel. Modified: head/share/man/man4/ng_car.4 ============================================================================== --- head/share/man/man4/ng_car.4 Tue Nov 13 20:38:55 2012 (r242996) +++ head/share/man/man4/ng_car.4 Tue Nov 13 20:41:36 2012 (r242997) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 11, 2007 +.Dd November 13, 2012 .Dt NG_CAR 4 .Os .Sh NAME @@ -50,7 +50,7 @@ Traffic shaping with RED. .El .Sh HOOKS This node type supports the following hooks: -.Bl -tag -width indent +.Bl -tag -width ".Va upper" .It Va upper Hook leading to upper layer protocols. .It Va lower @@ -73,7 +73,7 @@ is considered traffic. .Sh MODES OF OPERATION Each hook can operate in one of the following modes: -.Bl -tag -width indent +.Bl -tag -width foo .It Dv NG_CAR_SINGLE_RATE Single rate three color marker as described in RFC 2697. Committed burst packets are counted as green, extended burst packets are @@ -114,24 +114,24 @@ rates are measured in packets per second .Sh CONTROL MESSAGES This node type supports the generic control messages and the following specific messages. -.Bl -tag -width indent -.It Dv NGM_CAR_SET_CONF Pq Li setconf +.Bl -tag -width foo +.It Dv NGM_CAR_SET_CONF Pq Ic setconf Set node configuration to the specified at .Vt "struct ng_car_bulkconf" -.It Dv NGM_CAR_GET_CONF Pq Li getconf +.It Dv NGM_CAR_GET_CONF Pq Ic getconf Return current node configuration as .Vt "struct ng_car_bulkconf" .Bd -literal struct ng_car_hookconf { - uint64_t cbs; /* Committed burst size */ - uint64_t ebs; /* Exceeded/Peak burst size */ - uint64_t cir; /* Committed information rate */ - uint64_t pir; /* Peak information rate */ + uint64_t cbs; /* Commited burst size (bytes) */ + uint64_t ebs; /* Exceeded/Peak burst size (bytes) */ + uint64_t cir; /* Commited information rate (bits/s) */ + uint64_t pir; /* Peak information rate (bits/s) */ uint8_t green_action; /* Action for green packets */ uint8_t yellow_action; /* Action for yellow packets */ uint8_t red_action; /* Action for red packets */ - uint8_t mode; /* operation mode */ - uint8_t opt; /* mode options */ + uint8_t mode; /* single/double rate, ... */ + uint8_t opt; /* color-aware or color-blind */ }; /* possible actions (..._action) */ @@ -156,17 +156,17 @@ struct ng_car_bulkconf { struct ng_car_hookconf downstream; }; .Ed -.It Dv NGM_CAR_GET_STATS Pq Li getstats +.It Dv NGM_CAR_GET_STATS Pq Ic getstats Return node statistics as .Vt "struct ng_car_bulkstats" .Bd -literal struct ng_car_hookstats { - uint64_t passed_pkts; - uint64_t droped_pkts; - uint64_t green_pkts; - uint64_t yellow_pkts; - uint64_t red_pkts; - uint64_t errors; + uint64_t passed_pkts; /* Counter for passed packets */ + uint64_t droped_pkts; /* Counter for droped packets */ + uint64_t green_pkts; /* Counter for green packets */ + uint64_t yellow_pkts; /* Counter for yellow packets */ + uint64_t red_pkts; /* Counter for red packets */ + uint64_t errors; /* Counter for operation errors */ }; struct ng_car_bulkstats { @@ -174,9 +174,9 @@ struct ng_car_bulkstats { struct ng_car_hookstats downstream; }; .Ed -.It Dv NGM_CAR_CLR_STATS Pq Li clrstats +.It Dv NGM_CAR_CLR_STATS Pq Ic clrstats Clear node statistics. -.It Dv NGM_CAR_GETCLR_STATS Pq Li getclrstats +.It Dv NGM_CAR_GETCLR_STATS Pq Ic getclrstats Atomically return and clear node statistics. .El .Sh SHUTDOWN Modified: head/share/man/man4/ng_ccatm.4 ============================================================================== --- head/share/man/man4/ng_ccatm.4 Tue Nov 13 20:38:55 2012 (r242996) +++ head/share/man/man4/ng_ccatm.4 Tue Nov 13 20:41:36 2012 (r242997) @@ -146,7 +146,7 @@ enum atmop { .Pp These codes correspond directly to the operations specified in the ATM Forum document with the following exceptions: -.Bl -tag -width indent +.Bl -tag -width foo .It Dv ATMOP_RESP As discussed in .Xr ng_uni 4 , @@ -191,12 +191,12 @@ listening hooks or rejected. .Sh CONTROL MESSAGES Besides the generic messages the node understands the following special messages: -.Bl -tag -width indent -.It Dv NGM_CCATM_DUMP +.Bl -tag -width foo +.It Dv NGM_CCATM_DUMP Pq Ic dump This causes the internal state of the node to be dumped in ASCII to the .Va dump hook. -.It Dv NGM_CCATM_STOP +.It Dv NGM_CCATM_STOP Pq Ic stop This message causes all connections on that port to be aborted (not released!\&) and all ATM endpoints which are bound to that port to be closed. It stops processing of all messages from the UNI stack on that port UNI stack. @@ -207,17 +207,17 @@ struct ngm_ccatm_port { }; .Ed .Pp -.It Dv NGM_CCATM_START +.It Dv NGM_CCATM_START Pq Ic start Start processing on the port. The argument is a .Vt ngm_ccatm_port structure. -.It Dv NGM_CCATM_CLEAR +.It Dv NGM_CCATM_CLEAR Pq Ic clear This message takes a .Vt ngm_ccatm_port structure and clears all prefixes and addresses on that port. If the port number is zero, all ports are cleared. -.It Dv NGM_CCATM_GET_ADDRESSES +.It Dv NGM_CCATM_GET_ADDRESSES Pq Ic get_addresses Get the list of all registered addresses on the given port. The argument is a .Vt ngm_ccatm_port @@ -243,7 +243,7 @@ If it is not zero, only the addresses on The number of addresses is returned in the .Va count field. -.It Dv NGM_CCATM_ADDRESS_REGISTERED +.It Dv NGM_CCATM_ADDRESS_REGISTERED Pq Ic address_reg This message is used by ILMI to inform the .Nm node that a previous address registration request was successful. @@ -251,7 +251,7 @@ This causes the node to activate that ad The argument to the message is a .Vt ngm_ccatm_address_req structure. -.It Dv NGM_CCATM_ADDRESS_UNREGISTERED +.It Dv NGM_CCATM_ADDRESS_UNREGISTERED Pq Ic address_unreg This message is used by ILMI to inform the .Nm node that an address has been unregistered. @@ -259,7 +259,7 @@ The node clears that address from its ta The argument is a .Vt ngm_ccatm_address_req structure. -.It Dv NGM_CCATM_SET_PORT_PARAM +.It Dv NGM_CCATM_SET_PORT_PARAM Pq Ic set_port_param This request sets the parameters on the given port. The argument is a .Bd -literal @@ -281,13 +281,13 @@ address and prefix tables of that port a The .Va num_addr field is ignored. -.It Dv NGM_CCATM_GET_PORT_PARAM +.It Dv NGM_CCATM_GET_PORT_PARAM Pq Ic get_port_param Retrieve the parameters of the given port. The argument is a .Vt ngm_ccatm_port and the result a .Vt ngm_ccatm_atm_port . -.It Dv NGM_CCATM_GET_PORTLIST +.It Dv NGM_CCATM_GET_PORTLIST Pq Ic get_portlist Get a list of all available ports on that node. This is returned as a .Bd -literal @@ -296,20 +296,20 @@ struct ngm_ccatm_portlist { uint32_t ports[]; }; .Ed -.It Dv NGM_CCATM_GETSTATE +.It Dv NGM_CCATM_GETSTATE Pq Ic getstate Return the state of a port. The argument is a .Vt "struct ngm_ccatm_port" and the return values as a .Vt uint32_t . -.It Dv NGM_CCATM_SETLOG +.It Dv NGM_CCATM_SETLOG Pq Ic setlog This requests sets a new logging level and returns the previous one. The argument is either a .Vt uint32_t in which case it specifies the new logging level, or may be empty in which case just the old level is returned as a .Vt uint32_t . -.It Dv NGM_CCATM_RESET +.It Dv NGM_CCATM_RESET Pq Ic reset Reset the node. This is allowed only if the number of user hooks and connected UNI stacks is zero. Modified: head/share/man/man4/ng_cisco.4 ============================================================================== --- head/share/man/man4/ng_cisco.4 Tue Nov 13 20:38:55 2012 (r242996) +++ head/share/man/man4/ng_cisco.4 Tue Nov 13 20:41:36 2012 (r242997) @@ -114,28 +114,28 @@ understands the message. .Sh HOOKS This node type supports the following hooks: -.Bl -tag -width foobarbazio -.It Dv downstream +.Bl -tag -width ".Va downstream" +.It Va downstream The connection to the synchronous line. -.It Dv inet +.It Va inet IP hook. -.It Dv inet6 +.It Va inet6 IPv6 hook. -.It Dv atalk +.It Va atalk AppleTalk hook. -.It Dv ipx -IPX hook +.It Va ipx +IPX hook. .El .Sh CONTROL MESSAGES This node type supports the generic control messages, plus the following: .Bl -tag -width foo -.It Dv NGM_CISCO_SET_IPADDR +.It Dv NGM_CISCO_SET_IPADDR Pq Ic setipaddr This command takes an array of two .Dv "struct in_addr" arguments. The first is the IP address of the corresponding interface and the second is the netmask. -.It Dv NGM_CISCO_GET_IPADDR +.It Dv NGM_CISCO_GET_IPADDR Pq Ic getipaddr This command returns the IP configuration in the same format used by .Dv NGM_CISCO_SET_IPADDR . This command is also @@ -143,13 +143,13 @@ This command is also by this node type to the .Dv inet peer whenever an IP address inquiry packet is received. -.It Dv NGM_CISCO_GET_STATUS +.It Dv NGM_CISCO_GET_STATUS Pq Ic getstats Returns a .Dv "struct ngciscostat" : .Bd -literal -offset 4n struct ngciscostat { - uint32_t seq_retries; /* # unack'd retries */ - uint32_t keepalive_period; /* in seconds */ + uint32_t seqRetries; /* # unack'd retries */ + uint32_t keepAlivePeriod; /* in seconds */ }; .Ed .El Modified: head/share/man/man4/ng_deflate.4 ============================================================================== --- head/share/man/man4/ng_deflate.4 Tue Nov 13 20:38:55 2012 (r242996) +++ head/share/man/man4/ng_deflate.4 Tue Nov 13 20:41:36 2012 (r242997) @@ -61,7 +61,7 @@ mode to permit sending uncompressed fram .Sh HOOKS This node type supports the following hooks: .Pp -.Bl -tag -compact -width decomp +.Bl -tag -compact -width ".Va decomp" .It Va comp Connection to .Xr ng_ppp 4 @@ -82,7 +82,7 @@ operation mode. .Sh CONTROL MESSAGES This node type supports the generic control messages, plus the following: .Bl -tag -width foo -.It Dv NGM_DEFLATE_CONFIG Pq Li config +.It Dv NGM_DEFLATE_CONFIG Pq Ic config This command resets and configures the node for a session (i.e., for compression or decompression). This command takes a @@ -101,7 +101,7 @@ The .Fa windowBits specify compression windows size as negotiated by the Compression Control Protocol (CCP) in PPP. -.It Dv NGM_DEFLATE_RESETREQ Pq Li resetreq +.It Dv NGM_DEFLATE_RESETREQ Pq Ic resetreq This message contains no arguments, and is bi-directional. If an error is detected during decompression, this message is sent by the node to the originator of the @@ -113,7 +113,7 @@ This message may also be received by thi or Reset-Ack is received by the local PPP entity. The node will respond by flushing its compression state so the sides can resynchronize. -.It Dv NGM_DEFLATE_GET_STATS Pq Li getstats +.It Dv NGM_DEFLATE_GET_STATS Pq Ic getstats This control message obtains statistics for a given hook. The statistics are returned in .Vt "struct ng_deflate_stats" : @@ -127,9 +127,9 @@ struct ng_deflate_stats { uint64_t Errors; }; .Ed -.It Dv NGM_DEFLATE_CLR_STATS Pq Li clrstats +.It Dv NGM_DEFLATE_CLR_STATS Pq Ic clrstats This control message clears statistics for a given hook. -.It Dv NGM_DEFLATE_GETCLR_STATS Pq Li getclrstats +.It Dv NGM_DEFLATE_GETCLR_STATS Pq Ic getclrstats This control message obtains and clears statistics for a given hook. .El .Sh SHUTDOWN Modified: head/share/man/man4/ng_eiface.4 ============================================================================== --- head/share/man/man4/ng_eiface.4 Tue Nov 13 20:38:55 2012 (r242996) +++ head/share/man/man4/ng_eiface.4 Tue Nov 13 20:41:36 2012 (r242997) @@ -63,8 +63,8 @@ Similarly, packets received on the hook packets received by any real Ethernet interface. .Sh CONTROL MESSAGES This node type supports the generic control messages, plus the following: -.Bl -tag -width indent -.It Dv NGM_EIFACE_SET Pq Li set +.Bl -tag -width foo +.It Dv NGM_EIFACE_SET Pq Ic set Set link-level address of the interface. Requires .Vt "struct ether_addr" @@ -76,7 +76,7 @@ version, called which requires as an argument an .Tn ASCII string consisting of 6 colon-separated hex digits. -.It Dv NGM_EIFACE_GET_IFNAME Pq Li getifname +.It Dv NGM_EIFACE_GET_IFNAME Pq Ic getifname Return the name of the associated interface as a .Dv NUL Ns -terminated .Tn ASCII Modified: head/share/man/man4/ng_etf.4 ============================================================================== --- head/share/man/man4/ng_etf.4 Tue Nov 13 20:38:55 2012 (r242996) +++ head/share/man/man4/ng_etf.4 Tue Nov 13 20:41:36 2012 (r242997) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 16, 2006 +.Dd November 13, 2012 .Dt NG_ETF 4 .Os .Sh NAME @@ -66,7 +66,7 @@ than those configured by the control mes hook. .Sh HOOKS This node type supports the following hooks: -.Bl -tag -width ".Em downstream" +.Bl -tag -width ".Aq Em any legal name" .It Em downstream Typically this hook would be connected to a .Xr ng_ether 4 @@ -89,11 +89,11 @@ with a particular set of ethertypes. .Sh CONTROL MESSAGES This node type supports the generic control messages, plus the following: .Bl -tag -width 4n -.It Dv NGM_ETF_GET_STATUS +.It Dv NGM_ETF_GET_STATUS Pq Ic getstatus This command returns a .Vt "struct ng_etfstat" containing node statistics for packet counts. -.It Dv NGM_ETF_SET_FILTER +.It Dv NGM_ETF_SET_FILTER Pq Ic setfilter Sets the a new ethertype filter into the node and specifies the hook to and from which packets of that type should use. The hook and ethertype @@ -101,8 +101,8 @@ are specified in a structure of type .Vt "struct ng_etffilter" : .Bd -literal -offset 4n struct ng_etffilter { - char matchhook[NG_HOOKSIZ]; /* hook name */ - uint16_t ethertype; /* catch these */ + char matchhook[NG_HOOKSIZ]; /* hook name */ + uint16_t ethertype; /* this ethertype to this hook */ }; .Ed .El Modified: head/share/man/man4/ng_ether.4 ============================================================================== --- head/share/man/man4/ng_ether.4 Tue Nov 13 20:38:55 2012 (r242996) +++ head/share/man/man4/ng_ether.4 Tue Nov 13 20:41:36 2012 (r242997) @@ -124,36 +124,36 @@ but only receives unrecognized packets. .El .Sh CONTROL MESSAGES This node type supports the generic control messages, plus the following: -.Bl -tag -width indent -.It Dv NGM_ETHER_GET_IFNAME Pq Li getifname +.Bl -tag -width foo +.It Dv NGM_ETHER_GET_IFNAME Pq Ic getifname Returns the name of the associated interface as a .Dv NUL Ns -terminated .Tn ASCII string. Normally this is the same as the name of the node. -.It Dv NGM_ETHER_GET_IFINDEX Pq Li getifindex +.It Dv NGM_ETHER_GET_IFINDEX Pq Ic getifindex Returns the global index of the associated interface as a 32 bit integer. -.It Dv NGM_ETHER_GET_ENADDR Pq Li getenaddr +.It Dv NGM_ETHER_GET_ENADDR Pq Ic getenaddr Returns the device's unique six byte Ethernet address. -.It Dv NGM_ETHER_SET_ENADDR Pq Li setenaddr +.It Dv NGM_ETHER_SET_ENADDR Pq Ic setenaddr Sets the device's unique six byte Ethernet address. This control message is equivalent to using the .Dv SIOCSIFLLADDR .Xr ioctl 2 system call. -.It Dv NGM_ETHER_SET_PROMISC Pq Li setpromisc +.It Dv NGM_ETHER_SET_PROMISC Pq Ic setpromisc Enable or disable promiscuous mode. This message includes a single 32 bit integer flag that enables or disables promiscuous mode on the interface. Any non-zero value enables promiscuous mode. -.It Dv NGM_ETHER_GET_PROMISC Pq Li getpromisc +.It Dv NGM_ETHER_GET_PROMISC Pq Ic getpromisc Get the current value of the node's promiscuous flag. The returned value is always either one or zero. Note that this flag reflects the node's own promiscuous setting and does not necessarily reflect the promiscuous state of the actual interface, which can be affected by other means (e.g., .Xr bpf 4 ) . -.It Dv NGM_ETHER_SET_AUTOSRC Pq Li setautosrc +.It Dv NGM_ETHER_SET_AUTOSRC Pq Ic setautosrc Sets the automatic source address override flag. This message includes a single 32 bit integer flag that causes all outgoing packets to have their source Ethernet @@ -161,22 +161,22 @@ address field overwritten with the devic If this flag is set to zero, the source address in outgoing packets is not modified. The default setting for this flag is disabled. -.It Dv NGM_ETHER_GET_AUTOSRC Pq Li getautosrc +.It Dv NGM_ETHER_GET_AUTOSRC Pq Ic getautosrc Get the current value of the node's source address override flag. The returned value is always either one or zero. -.It Dv NGM_ETHER_ADD_MULTI Pq Li addmulti +.It Dv NGM_ETHER_ADD_MULTI Pq Ic addmulti Join Ethernet multicast group. This control message is equivalent to using the .Dv SIOCADDMULTI .Xr ioctl 2 system call. -.It Dv NGM_ETHER_DEL_MULTI Pq Li delmulti +.It Dv NGM_ETHER_DEL_MULTI Pq Ic delmulti Leave Ethernet multicast group. This control message is equivalent to using the .Dv SIOCDELMULTI .Xr ioctl 2 system call. -.It Dv NGM_ETHER_DETACH Pq Li detach +.It Dv NGM_ETHER_DETACH Pq Ic detach Detach from underlying Ethernet interface and shut down node. .El .Sh SHUTDOWN Modified: head/share/man/man4/ng_fec.4 ============================================================================== --- head/share/man/man4/ng_fec.4 Tue Nov 13 20:38:55 2012 (r242996) +++ head/share/man/man4/ng_fec.4 Tue Nov 13 20:41:36 2012 (r242997) @@ -57,20 +57,20 @@ node should not have any hooks. .Sh CONTROL MESSAGES Interface membership in the FEC group is configured with the following control messages: -.Bl -tag -width indent -.It Dv NGM_FEC_ADD_IFACE Pq Dq Li add_iface +.Bl -tag -width foo +.It Dv NGM_FEC_ADD_IFACE Pq Ic add_iface Attach interface to the FEC group. The target interface name is passed as a string argument. -.It Dv NGM_FEC_DEL_IFACE Pq Dq Li del_iface +.It Dv NGM_FEC_DEL_IFACE Pq Ic del_iface Remove interface from the trunk. The target interface name is passed as a string argument. .El .Pp The following control messages define the forwarding method for a node: -.Bl -tag -width indent -.It Dv NGM_FEC_SET_MODE_MAC Pq Dq Li set_mode_mac +.Bl -tag -width foo +.It Dv NGM_FEC_SET_MODE_MAC Pq Ic set_mode_mac Forwarding decisions will be based on the link-layer MAC address of the destination. -.It Dv NGM_FEC_SET_MODE_INET Pq Dq Li set_mode_inet +.It Dv NGM_FEC_SET_MODE_INET Pq Ic set_mode_inet Forwarding decisions will be based on the IP address of the destination. .El .Sh SHUTDOWN Modified: head/share/man/man4/ng_frame_relay.4 ============================================================================== --- head/share/man/man4/ng_frame_relay.4 Tue Nov 13 20:38:55 2012 (r242996) +++ head/share/man/man4/ng_frame_relay.4 Tue Nov 13 20:41:36 2012 (r242997) @@ -63,10 +63,10 @@ through are available to connect to each of the DLCI channels. .Sh HOOKS This node type supports the following hooks: -.Bl -tag -width foobar -.It Dv downstream +.Bl -tag -width ".Va downstream" +.It Va downstream The connection to the synchronous line. -.It Dv dlciX +.It Va dlciX Here X is a decimal number from 0 to 1023. This hook corresponds to the DLCI X frame relay virtual channel. Modified: head/share/man/man4/ng_gif.4 ============================================================================== --- head/share/man/man4/ng_gif.4 Tue Nov 13 20:38:55 2012 (r242996) +++ head/share/man/man4/ng_gif.4 Tue Nov 13 20:41:36 2012 (r242997) @@ -99,10 +99,10 @@ packet attached to the front. When no hooks are connected, packets flow normally upwards and downwards. .Sh HOOKS This node type supports the following hooks: -.Bl -tag -width ".Dv orphans" -.It Dv lower +.Bl -tag -width ".Va orphans" +.It Va lower Connection to the lower device link layer. -.It Dv orphans +.It Va orphans Like .Dv lower , but only receives unrecognized packets. Modified: head/share/man/man4/ng_gif_demux.4 ============================================================================== --- head/share/man/man4/ng_gif_demux.4 Tue Nov 13 20:38:55 2012 (r242996) +++ head/share/man/man4/ng_gif_demux.4 Tue Nov 13 20:41:36 2012 (r242997) @@ -70,7 +70,7 @@ hook. .Sh HOOKS This node type supports the following hooks: .Bl -tag -width ".Dv inet6" -.It Dv gif +.It Va gif Connection to the .Dv lower or @@ -78,19 +78,19 @@ or hook of an .Xr ng_gif 4 node. -.It Dv inet +.It Va inet Hook for input and output of IP frames. -.It Dv inet6 +.It Va inet6 Hook for input and output of IPv6 frames. -.It Dv atalk +.It Va atalk Hook for input and output of AppleTalk frames. -.It Dv ipx +.It Va ipx Hook for input and output of IPX frames. -.It Dv atm +.It Va atm Hook for input and output of ATM frames. -.It Dv natm +.It Va natm Hook for input and output of NATM frames. -.It Dv ns +.It Va ns Hook for input and output of NS frames. .El .Sh CONTROL MESSAGES Modified: head/share/man/man4/ng_h4.4 ============================================================================== --- head/share/man/man4/ng_h4.4 Tue Nov 13 20:38:55 2012 (r242996) +++ head/share/man/man4/ng_h4.4 Tue Nov 13 20:41:36 2012 (r242997) @@ -71,15 +71,15 @@ similar to the control message. .Sh HOOKS This node type supports the following hooks: -.Bl -tag -width indent -.It Dv hook +.Bl -tag -width ".Va hook" +.It Va hook single HCI frame contained in single .Vt mbuf structure. .El .Sh CONTROL MESSAGES This node type supports the generic control messages, plus the following: -.Bl -tag -width indent +.Bl -tag -width foo .It Dv NGM_H4_NODE_RESET Reset the node. .It Dv NGM_H4_NODE_GET_STATE Modified: head/share/man/man4/ng_hci.4 ============================================================================== --- head/share/man/man4/ng_hci.4 Tue Nov 13 20:38:55 2012 (r242996) +++ head/share/man/man4/ng_hci.4 Tue Nov 13 20:41:36 2012 (r242997) @@ -191,7 +191,7 @@ Host Controller. .Sh HCI INITIALIZATION On initialization, HCI control application must issue the following HCI commands (in any order). -.Bl -tag -width indent +.Bl -tag -width foo .It Dv Read_BD_ADDR To obtain BD_ADDR of the Bluetooth unit. .It Dv Read_Local_Supported_Features @@ -250,23 +250,23 @@ typedef struct { .Ed .Sh HOOKS This node type supports the following hooks: -.Bl -tag -width indent -.It Dv drv +.Bl -tag -width ".Va drv" +.It Va drv Bluetooth Host Controller Transport Layer hook. Single HCI packet contained in single .Vt mbuf structure. -.It Dv acl +.It Va acl Upper layer protocol/node is connected to the hook. Single HCI ACL data packet contained in single .Vt mbuf structure. -.It Dv sco +.It Va sco Upper layer protocol/node is connected to the hook. Single HCI SCO data packet contained in single .Vt mbuf structure. -.It Dv raw +.It Va raw Raw hook. Every HCI frame (including HCI command frame) that goes in or out will be delivered to the hook. @@ -276,7 +276,7 @@ Single HCI frame contained in single structure. .El .Sh BLUETOOTH UPPER LAYER PROTOCOLS INTERFACE (LP CONTROL MESSAGES) -.Bl -tag -width indent +.Bl -tag -width foo .It Dv NGM_HCI_LP_CON_REQ Requests the lower protocol to create a connection. If a physical link @@ -311,7 +311,7 @@ agreement. .El .Sh NETGRAPH CONTROL MESSAGES This node type supports the generic control messages, plus the following: -.Bl -tag -width indent +.Bl -tag -width foo .It Dv NGM_HCI_NODE_GET_STATE Returns current state for the node. .It Dv NGM_HCI_NODE_INIT Modified: head/share/man/man4/ng_hole.4 ============================================================================== --- head/share/man/man4/ng_hole.4 Tue Nov 13 20:38:55 2012 (r242996) +++ head/share/man/man4/ng_hole.4 Tue Nov 13 20:41:36 2012 (r242997) @@ -57,19 +57,19 @@ as long as the name is unique. .Sh CONTROL MESSAGES This node type supports the generic control messages, plus the following: -.Bl -tag -width indent -.It Dv NGM_HOLE_GET_STATS +.Bl -tag -width foo +.It Dv NGM_HOLE_GET_STATS Pq Ic getstats This command takes an .Tn ASCII string argument, the hook name, and returns the statistics associated with the hook as a .Vt "struct ng_hole_hookstat" . -.It Dv NGM_HOLE_CLR_STATS +.It Dv NGM_HOLE_CLR_STATS Pq Ic clrstats This command takes an .Tn ASCII string argument, the hook name, and clears the statistics associated with the hook. -.It Dv NGM_HOLE_GETCLR_STATS +.It Dv NGM_HOLE_GETCLR_STATS Pq Ic getclrstats This command is identical to .Dv NGM_HOLE_GET_STATS , except that the statistics are also atomically cleared. Modified: head/share/man/man4/ng_hub.4 ============================================================================== --- head/share/man/man4/ng_hub.4 Tue Nov 13 20:38:55 2012 (r242996) +++ head/share/man/man4/ng_hub.4 Tue Nov 13 20:41:36 2012 (r242997) @@ -48,7 +48,7 @@ as long as the name is unique. This node type supports the generic control messages, plus the following: .Bl -tag -width foo *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 20:47:30 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8C112FD8; Tue, 13 Nov 2012 20:47:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 4ABA08FC14; Tue, 13 Nov 2012 20:47:28 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id WAA13045; Tue, 13 Nov 2012 22:47:27 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1TYNOJ-000Gs3-2c; Tue, 13 Nov 2012 22:47:27 +0200 Message-ID: <50A2B1DD.80902@FreeBSD.org> Date: Tue, 13 Nov 2012 22:47:25 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:16.0) Gecko/20121030 Thunderbird/16.0.2 MIME-Version: 1.0 To: Eitan Adler Subject: Re: svn commit: r242996 - head/sys/dev/sio References: <201211132038.qADKcuY2016702@svn.freebsd.org> In-Reply-To: <201211132038.qADKcuY2016702@svn.freebsd.org> X-Enigmail-Version: 1.4.5 Mail-Followup-To: Eitan Adler , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 20:47:30 -0000 on 13/11/2012 22:38 Eitan Adler said the following: > Author: eadler > Date: Tue Nov 13 20:38:55 2012 > New Revision: 242996 > URL: http://svnweb.freebsd.org/changeset/base/242996 > > Log: > Add support for CIR1000 - Cirrus Logic V34 to the sio driver > > PR: kern/44267 > Submitted by: Michail Vidiassov > Arrival-Date: Sat Oct 19 07:30:00 PDT 2002 > Approved by: cperciva (implicit) > MFC after: 1 week Isn't sio superseded by uart? Does it make sense to add new hardware support to sio? > Modified: > head/sys/dev/sio/sio_isa.c > > Modified: head/sys/dev/sio/sio_isa.c > ============================================================================== > --- head/sys/dev/sio/sio_isa.c Tue Nov 13 20:07:34 2012 (r242995) > +++ head/sys/dev/sio/sio_isa.c Tue Nov 13 20:38:55 2012 (r242996) > @@ -83,6 +83,7 @@ static struct isa_pnp_id sio_ids[] = { > {0x0034490a, NULL}, /* BRI3400 - Internal ACF Modem */ > {0x0094490a, NULL}, /* BRI9400 - Boca K56Flex PnP */ > {0x00b4490a, NULL}, /* BRIB400 - Boca 56k PnP */ > + {0x0010320d, NULL}, /* CIR1000 - Cirrus Logic V34 */ > {0x0030320d, NULL}, /* CIR3000 - Cirrus Logic V43 */ > {0x0100440e, NULL}, /* CRD0001 - Cardinal MVP288IV ? */ > {0x01308c0e, NULL}, /* CTL3001 - Creative Labs Phoneblaster */ > -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 20:52:18 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 235E34FA; Tue, 13 Nov 2012 20:52:18 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 096678FC15; Tue, 13 Nov 2012 20:52:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qADKqHQf018632; Tue, 13 Nov 2012 20:52:17 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qADKqHWn018631; Tue, 13 Nov 2012 20:52:17 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201211132052.qADKqHWn018631@svn.freebsd.org> From: Andre Oppermann Date: Tue, 13 Nov 2012 20:52:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242998 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 20:52:18 -0000 Author: andre Date: Tue Nov 13 20:52:17 2012 New Revision: 242998 URL: http://svnweb.freebsd.org/changeset/base/242998 Log: Remove description of deprecated IP fragment checksum support. Since SMPng it wasn't really supported anymore and if it worked then only by chance. Only very few drivers ever supported it. Discussed with: yongari MFC after: 2 weeks Modified: head/share/man/man9/mbuf.9 Modified: head/share/man/man9/mbuf.9 ============================================================================== --- head/share/man/man9/mbuf.9 Tue Nov 13 20:41:36 2012 (r242997) +++ head/share/man/man9/mbuf.9 Tue Nov 13 20:52:17 2012 (r242998) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 18, 2011 +.Dd November 13, 2012 .Dt MBUF 9 .Os .\" @@ -1063,45 +1063,6 @@ In this case, the checksum field will be set by the TCP/IP module to the checksum of the pseudo header defined by the TCP and UDP specifications. .Pp -For outbound packets which have been fragmented -by the host CPU, the following will also be true, -regardless of the checksum flag settings: -.Bl -bullet -offset indent -.It -all fragments will have the flag -.Dv M_FRAG -set in their -.Va m_flags -field; -.It -the first and the last fragments in the chain will have -.Dv M_FIRSTFRAG -or -.Dv M_LASTFRAG -set in their -.Va m_flags , -correspondingly; -.It -the first fragment in the chain will have the total number -of fragments contained in its -.Va csum_data -field. -.El -.Pp -The last rule for fragmented packets takes precedence over the one -for a TCP or UDP checksum. -Nevertheless, offloading a TCP or UDP checksum is possible for a -fragmented packet if the flag -.Dv CSUM_IP_FRAGS -is set in the field -.Va ifnet.if_data.ifi_hwassist -associated with the network interface. -However, in this case the interface is expected to figure out -the location of the checksum field within the sequence of fragments -by itself because -.Va csum_data -contains a fragment count instead of a checksum offset value. -.Pp On input, an interface indicates the actions it has performed on a packet by setting one or more of the following flags in .Va csum_flags @@ -1147,22 +1108,6 @@ It is a peculiarity of the algorithm use calculated over any valid packet will be .Li 0xFFFF as long as the original checksum field is included. -.Pp -For inbound packets which are IP fragments, all -.Va csum_data -fields will be summed during reassembly to obtain the final checksum -value passed to an upper layer in the -.Va csum_data -field of the reassembled packet. -The -.Va csum_flags -fields of all fragments will be consolidated using logical AND -to obtain the final value for -.Va csum_flags . -Thus, in order to successfully -offload checksum computation for fragmented data, -all fragments should have the same value of -.Va csum_flags . .Sh STRESS TESTING When running a kernel compiled with the option .Dv MBUF_STRESS_TEST , From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 20:59:52 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D7E35A88; Tue, 13 Nov 2012 20:59:52 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail09.syd.optusnet.com.au (mail09.syd.optusnet.com.au [211.29.132.190]) by mx1.freebsd.org (Postfix) with ESMTP id 6A20C8FC12; Tue, 13 Nov 2012 20:59:51 +0000 (UTC) Received: from c122-106-175-26.carlnfd1.nsw.optusnet.com.au (c122-106-175-26.carlnfd1.nsw.optusnet.com.au [122.106.175.26]) by mail09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id qADKxmOX004463 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 14 Nov 2012 07:59:50 +1100 Date: Wed, 14 Nov 2012 07:59:48 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Attilio Rao Subject: Re: svn commit: r242988 - head/sys/sys In-Reply-To: <201211131824.qADIOmqx095958@svn.freebsd.org> Message-ID: <20121114074101.S3274@besplex.bde.org> References: <201211131824.qADIOmqx095958@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-Cloudmark-Score: 0 X-Optus-Cloudmark-Analysis: v=2.0 cv=I9g936cg c=1 sm=1 a=YwJJsOro7M4A:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=FSHVhTTuonsA:10 a=JmXgxbBXa1p9hI0StDUA:9 a=CjuIK1q_8ugA:10 a=bxQHXO5Py4tHmhUgaywp5w==:117 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 20:59:53 -0000 > Log: > Remove unused/obsolete macros. Many more style bugs to fix are visible in the patch: > Modified: head/sys/sys/lock.h > ============================================================================== > --- head/sys/sys/lock.h Tue Nov 13 17:16:03 2012 (r242987) > +++ head/sys/sys/lock.h Tue Nov 13 18:24:47 2012 (r242988) > @@ -304,16 +304,5 @@ void witness_thread_exit(struct thread * > #define WITNESS_LINE(lock) (0) 1. space instead of tab before the value 2. bogus parentheses around a single token. All the nearby stub macros have similar low quality. Bugs in the others include: A. gross indentation for (void)0 B. missing parentheses around (void)0 C. non-bug: some plain 0's really are plain and are preceded by a tab D. space instead of tab in the line before the above E. these 2 lines with their space for indentation don't line up the value with the grossly indented values or the plain 0 values. > #endif /* WITNESS */ 3. tab before comment on ifdef. > > -/* > - * Helper macros to allow developers to add explicit lock order checks > - * wherever they please without having to actually grab a lock to do so. > - */ > -#define witness_check(l) \ > - WITNESS_CHECKORDER(&(l)->lock_object, LOP_EXCLUSIVE, LOCK_FILE, \ > - LOCK_LINE, NULL) > - > -#define witness_check_shared(l) \ > - WITNESS_CHECKORDER(&(l)->lock_object, 0, LOCK_FILE, LOCK_LINE, NULL) > - > #endif /* _KERNEL */ > #endif /* _SYS_LOCK_H_ */ > 4. 2 more instances of tab before comment on endif. 5. no blank line before the final endif to match the one for its bracketing ifdef (or rather the define for this. This blank line is also needed to provide one after the _KERNEL endif, to match the one before the bracketing kernel ifdef. 6. backwards comment on final endif. The WITNESS #else and #endif are also missing blank lines to match the ones for the WITNESS #ifdef. The density of style bugs in sys/lock.h is otherwise not very high, exceot for unsorted prototypes and macros. Bruce From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 21:04:35 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D8831EA9; Tue, 13 Nov 2012 21:04:35 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B9F428FC14; Tue, 13 Nov 2012 21:04:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qADL4ZgS020760; Tue, 13 Nov 2012 21:04:35 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qADL4Z9b020759; Tue, 13 Nov 2012 21:04:35 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211132104.qADL4Z9b020759@svn.freebsd.org> From: Eitan Adler Date: Tue, 13 Nov 2012 21:04:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243000 - head/sys/dev/uart X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 21:04:36 -0000 Author: eadler Date: Tue Nov 13 21:04:35 2012 New Revision: 243000 URL: http://svnweb.freebsd.org/changeset/base/243000 Log: Add support for CIR1000 - Cirrus Logic V34 to the uart driver Approved by: cperciva (implicit) MFC after: 1 week Modified: head/sys/dev/uart/uart_bus_isa.c Modified: head/sys/dev/uart/uart_bus_isa.c ============================================================================== --- head/sys/dev/uart/uart_bus_isa.c Tue Nov 13 21:03:32 2012 (r242999) +++ head/sys/dev/uart/uart_bus_isa.c Tue Nov 13 21:04:35 2012 (r243000) @@ -79,6 +79,7 @@ static struct isa_pnp_id isa_ns8250_ids[ {0x0034490a, NULL}, /* BRI3400 - Internal ACF Modem */ {0x0094490a, NULL}, /* BRI9400 - Boca K56Flex PnP */ {0x00b4490a, NULL}, /* BRIB400 - Boca 56k PnP */ + {0x0010320d, NULL}, /* CIR1000 - Cirrus Logic V34 */ {0x0030320d, NULL}, /* CIR3000 - Cirrus Logic V43 */ {0x0100440e, NULL}, /* CRD0001 - Cardinal MVP288IV ? */ {0x01308c0e, NULL}, /* CTL3001 - Creative Labs Phoneblaster */ From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 21:08:49 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A48C7370; Tue, 13 Nov 2012 21:08:49 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 87C018FC0C; Tue, 13 Nov 2012 21:08:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qADL8nhc021587; Tue, 13 Nov 2012 21:08:49 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qADL8neh021586; Tue, 13 Nov 2012 21:08:49 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201211132108.qADL8neh021586@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 13 Nov 2012 21:08:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243002 - head/cddl/contrib/opensolaris/cmd/zpool X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 21:08:49 -0000 Author: pluknet Date: Tue Nov 13 21:08:49 2012 New Revision: 243002 URL: http://svnweb.freebsd.org/changeset/base/243002 Log: Fix an apparent typo in the manual section number in .Dt: it should be 5. Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.5 Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.5 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.5 Tue Nov 13 21:05:41 2012 (r243001) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.5 Tue Nov 13 21:08:49 2012 (r243002) @@ -22,7 +22,7 @@ .\" $FreeBSD$ .\" .Dd Aug 28, 2012 -.Dt ZPOOL-FEATURES 8 +.Dt ZPOOL-FEATURES 5 .Os .Sh NAME .Nm zpool-features From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 21:10:51 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1624A5D4; Tue, 13 Nov 2012 21:10:51 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id F16BD8FC08; Tue, 13 Nov 2012 21:10:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qADLAopQ022038; Tue, 13 Nov 2012 21:10:50 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qADLAoUO022031; Tue, 13 Nov 2012 21:10:50 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201211132110.qADLAoUO022031@svn.freebsd.org> From: Edwin Groothuis Date: Tue, 13 Nov 2012 21:10:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243003 - head/contrib/tzdata X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 21:10:51 -0000 Author: edwin Date: Tue Nov 13 21:10:50 2012 New Revision: 243003 URL: http://svnweb.freebsd.org/changeset/base/243003 Log: Merge of vendor import of 242999, tzdata2012j - Libya went to Standard Time on 10 November 2012 Modified: head/contrib/tzdata/africa head/contrib/tzdata/asia head/contrib/tzdata/australasia head/contrib/tzdata/europe head/contrib/tzdata/northamerica head/contrib/tzdata/southamerica Directory Properties: head/contrib/tzdata/ (props changed) Modified: head/contrib/tzdata/africa ============================================================================== --- head/contrib/tzdata/africa Tue Nov 13 21:08:49 2012 (r243002) +++ head/contrib/tzdata/africa Tue Nov 13 21:10:50 2012 (r243003) @@ -4,7 +4,7 @@ # This data is by no means authoritative; if you think you know better, # go ahead and edit the file (and please send any changes to -# tz@elsie.nci.nih.gov for general use in the future). +# tz@iana.org for general use in the future). # From Paul Eggert (2006-03-22): # @@ -424,6 +424,20 @@ Zone Africa/Monrovia -0:43:08 - LMT 1882 # Libya +# From Even Scharning (2012-11-10): +# Libya set their time one hour back at 02:00 on Saturday November 10. +# http://www.libyaherald.com/2012/11/04/clocks-to-go-back-an-hour-on-saturday/ +# Here is an official source [in Arabic]: http://ls.ly/fb6Yc +# +# Steffen Thorsen forwarded a translation (2012-11-10) in +# http://mm.icann.org/pipermail/tz/2012-November/018451.html +# +# From Tim Parenti (2012-11-11): +# Treat the 2012-11-10 change as a zone change from UTC+2 to UTC+1. +# The DST rules planned for 2013 and onward roughly mirror those of Europe +# (either two days before them or five days after them, so as to fall on +# lastFri instead of lastSun). + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Libya 1951 only - Oct 14 2:00 1:00 S Rule Libya 1952 only - Jan 1 0:00 0 - @@ -438,17 +452,21 @@ Rule Libya 1986 only - Apr 4 0:00 1:00 Rule Libya 1986 only - Oct 3 0:00 0 - Rule Libya 1987 1989 - Apr 1 0:00 1:00 S Rule Libya 1987 1989 - Oct 1 0:00 0 - +Rule Libya 1997 only - Apr 4 0:00 1:00 S +Rule Libya 1997 only - Oct 4 0:00 0 - +Rule Libya 2013 max - Mar lastFri 1:00 1:00 S +Rule Libya 2013 max - Oct lastFri 2:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Tripoli 0:52:44 - LMT 1920 1:00 Libya CE%sT 1959 2:00 - EET 1982 1:00 Libya CE%sT 1990 May 4 -# The following entries are from Shanks & Pottenger; +# The 1996 and 1997 entries are from Shanks & Pottenger; # the IATA SSIM data contain some obvious errors. 2:00 - EET 1996 Sep 30 - 1:00 - CET 1997 Apr 4 - 1:00 1:00 CEST 1997 Oct 4 - 2:00 - EET + 1:00 Libya CE%sT 1997 Oct 4 + 2:00 - EET 2012 Nov 10 2:00 + 1:00 Libya CE%sT # Madagascar # Zone NAME GMTOFF RULES FORMAT [UNTIL] Modified: head/contrib/tzdata/asia ============================================================================== --- head/contrib/tzdata/asia Tue Nov 13 21:08:49 2012 (r243002) +++ head/contrib/tzdata/asia Tue Nov 13 21:10:50 2012 (r243003) @@ -4,7 +4,7 @@ # This data is by no means authoritative; if you think you know better, # go ahead and edit the file (and please send any changes to -# tz@elsie.nci.nih.gov for general use in the future). +# tz@iana.org for general use in the future). # From Paul Eggert (2006-03-22): # @@ -1199,7 +1199,6 @@ Rule Zion 2012 only - Mar Fri>=26 2:00 1 Rule Zion 2012 only - Sep 23 2:00 0 S # From Ephraim Silverberg (2012-10-18): - # Yesterday, the Interior Ministry Committee, after more than a year # past, approved sending the proposed June 2011 changes to the Time # Decree Law back to the Knesset for second and third (final) votes @@ -1212,6 +1211,10 @@ Rule Zion 2012 only - Sep 23 2:00 0 S # later (i.e. at 02:00 the first Monday after October 2). # [Rosh Hashana holidays are factored in until 2100.] +# From Ephraim Silverberg (2012-11-05): +# The Knesset passed today (in second and final readings) the amendment to the +# Time Decree Law making the changes ... law. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Zion 2013 max - Mar Fri>=23 2:00 1:00 D Rule Zion 2013 2026 - Oct Sun>=2 2:00 0 S @@ -2049,8 +2052,7 @@ Zone Asia/Karachi 4:28:12 - LMT 1907 # occurred before our cutoff date of 1970. # However, as we get more information, we may need to add entries # for parts of the West Bank as they transitioned from Israel's rules -# to Palestine's rules. If you have more info about this, please -# send it to tz@elsie.nci.nih.gov for incorporation into future editions. +# to Palestine's rules. # From IINS News Service - Israel - 1998-03-23 10:38:07 Israel time, # forwarded by Ephraim Silverberg: Modified: head/contrib/tzdata/australasia ============================================================================== --- head/contrib/tzdata/australasia Tue Nov 13 21:08:49 2012 (r243002) +++ head/contrib/tzdata/australasia Tue Nov 13 21:10:50 2012 (r243003) @@ -780,7 +780,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901 # This data is by no means authoritative; if you think you know better, # go ahead and edit the file (and please send any changes to -# tz@elsie.nci.nih.gov for general use in the future). +# tz@iana.org for general use in the future). # From Paul Eggert (2006-03-22): # A good source for time zone historical data outside the U.S. is Modified: head/contrib/tzdata/europe ============================================================================== --- head/contrib/tzdata/europe Tue Nov 13 21:08:49 2012 (r243002) +++ head/contrib/tzdata/europe Tue Nov 13 21:10:50 2012 (r243003) @@ -4,7 +4,7 @@ # This data is by no means authoritative; if you think you know better, # go ahead and edit the file (and please send any changes to -# tz@elsie.nci.nih.gov for general use in the future). +# tz@iana.org for general use in the future). # From Paul Eggert (2006-03-22): # A good source for time zone historical data outside the U.S. is Modified: head/contrib/tzdata/northamerica ============================================================================== --- head/contrib/tzdata/northamerica Tue Nov 13 21:08:49 2012 (r243002) +++ head/contrib/tzdata/northamerica Tue Nov 13 21:10:50 2012 (r243003) @@ -6,7 +6,7 @@ # This data is by no means authoritative; if you think you know better, # go ahead and edit the file (and please send any changes to -# tz@elsie.nci.nih.gov for general use in the future). +# tz@iana.org for general use in the future). # From Paul Eggert (1999-03-22): # A reliable and entertaining source about time zones is Modified: head/contrib/tzdata/southamerica ============================================================================== --- head/contrib/tzdata/southamerica Tue Nov 13 21:08:49 2012 (r243002) +++ head/contrib/tzdata/southamerica Tue Nov 13 21:10:50 2012 (r243003) @@ -4,7 +4,7 @@ # This data is by no means authoritative; if you think you know better, # go ahead and edit the file (and please send any changes to -# tz@elsie.nci.nih.gov for general use in the future). +# tz@iana.org for general use in the future). # From Paul Eggert (2006-03-22): # A good source for time zone historical data outside the U.S. is From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 22:01:26 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4B55FEA1; Tue, 13 Nov 2012 22:01:26 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 30C138FC0C; Tue, 13 Nov 2012 22:01:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qADM1QtH030227; Tue, 13 Nov 2012 22:01:26 GMT (envelope-from mjg@svn.freebsd.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qADM1QjH030226; Tue, 13 Nov 2012 22:01:26 GMT (envelope-from mjg@svn.freebsd.org) Message-Id: <201211132201.qADM1QjH030226@svn.freebsd.org> From: Mateusz Guzik Date: Tue, 13 Nov 2012 22:01:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243007 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 22:01:26 -0000 Author: mjg Date: Tue Nov 13 22:01:25 2012 New Revision: 243007 URL: http://svnweb.freebsd.org/changeset/base/243007 Log: enterpgrp: get rid of pgrp2 variable and use KASSERT directly on pgfind result. pgrp2 was used only for debugging, but pgrp2 = pgfind(..) was present in compiled code even for kernels without INVARIANTS Approved by: trasz (mentor) MFC after: 1 week Modified: head/sys/kern/kern_proc.c Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Tue Nov 13 21:20:30 2012 (r243006) +++ head/sys/kern/kern_proc.c Tue Nov 13 22:01:25 2012 (r243007) @@ -421,17 +421,13 @@ enterpgrp(p, pgid, pgrp, sess) struct pgrp *pgrp; struct session *sess; { - struct pgrp *pgrp2; sx_assert(&proctree_lock, SX_XLOCKED); KASSERT(pgrp != NULL, ("enterpgrp: pgrp == NULL")); KASSERT(p->p_pid == pgid, ("enterpgrp: new pgrp and pid != pgid")); - - pgrp2 = pgfind(pgid); - - KASSERT(pgrp2 == NULL, + KASSERT(pgfind(pgid) == NULL, ("enterpgrp: pgrp with pgid exists")); KASSERT(!SESS_LEADER(p), ("enterpgrp: session leader attempted setpgrp")); From owner-svn-src-head@FreeBSD.ORG Wed Nov 14 01:16:30 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 123A2593; Wed, 14 Nov 2012 01:16:30 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E168D8FC12; Wed, 14 Nov 2012 01:16:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAE1GTME063369; Wed, 14 Nov 2012 01:16:29 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAE1GTeH063364; Wed, 14 Nov 2012 01:16:29 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201211140116.qAE1GTeH063364@svn.freebsd.org> From: Martin Matuska Date: Wed, 14 Nov 2012 01:16:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243014 - in head: . cddl/contrib/opensolaris/cmd/zpool cddl/sbin/zpool X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 01:16:30 -0000 Author: mm Date: Wed Nov 14 01:16:29 2012 New Revision: 243014 URL: http://svnweb.freebsd.org/changeset/base/243014 Log: Move zpool-features manual page from section 5 to section 7 and fix references Reported by: pluknet MFC after: 1 week Added: head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 - copied, changed from r243013, head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.5 Deleted: head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.5 Modified: head/ObsoleteFiles.inc head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c head/cddl/sbin/zpool/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Wed Nov 14 00:43:27 2012 (r243013) +++ head/ObsoleteFiles.inc Wed Nov 14 01:16:29 2012 (r243014) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20121114: zpool-features manual page moved from section 5 to 7 +OLD_FILES+=usr/share/man/man5/zpool-features.5.gz # 20121022: VFS_LOCK_GIANT elimination OLD_FILES+=usr/share/man/man9/VFS_LOCK_GIANT.9.gz OLD_FILES+=usr/share/man/man9/VFS_UNLOCK_GIANT.9.gz Copied and modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 (from r243013, head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.5) ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.5 Wed Nov 14 00:43:27 2012 (r243013, copy source) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Wed Nov 14 01:16:29 2012 (r243014) @@ -22,7 +22,7 @@ .\" $FreeBSD$ .\" .Dd Aug 28, 2012 -.Dt ZPOOL-FEATURES 5 +.Dt ZPOOL-FEATURES 7 .Os .Sh NAME .Nm zpool-features Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Wed Nov 14 00:43:27 2012 (r243013) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Wed Nov 14 01:16:29 2012 (r243014) @@ -567,7 +567,7 @@ Total size of the storage pool. .It Sy unsupported@ Ns Ar feature_guid Information about unsupported features that are enabled on the pool. See -.Xr zpool-features 5 +.Xr zpool-features 7 for details. .It Sy used Amount of storage space used within the pool. @@ -717,7 +717,7 @@ which moves .Ar feature_name to the enabled state. See -.Xr zpool-features 5 +.Xr zpool-features 7 for details on feature states. .It Sy listsnaps Ns = Ns Cm on No | Cm off Controls whether information about snapshots associated with this pool is @@ -915,7 +915,7 @@ with the .Fl o option. See -.Xr zpool-features 5 +.Xr zpool-features 7 for details about feature properties. .It Xo .Fl o Ar property Ns = Ns Ar value @@ -1651,7 +1651,7 @@ Displays legacy .Tn ZFS versions supported by the current software. See -.Xr zpool-features.5 +.Xr zpool-features 7 for a description of feature flags features supported by the current software. .El .It Xo @@ -1665,7 +1665,7 @@ Enables all supported features on the gi Once this is done, the pool will no longer be accessible on systems that do not support feature flags. See -.Xr zpool-features.5 +.Xr zpool-features 7 for details on compatability with system sthat support feature flags, but do not support all features enabled on the pool. .Bl -tag -width indent @@ -1928,7 +1928,7 @@ Discarded approximately 29 seconds of tr .El .Sh SEE ALSO .Xr zfs 8 -.Xr zpool-features 5 +.Xr zpool-features 7 .Sh AUTHORS This manual page is a .Xr mdoc 7 Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Wed Nov 14 00:43:27 2012 (r243013) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Wed Nov 14 01:16:29 2012 (r243014) @@ -345,7 +345,7 @@ usage(boolean_t requested) (void) fprintf(fp, "YES disabled | enabled | active\n"); (void) fprintf(fp, gettext("\nThe feature@ properties must be " - "appended with a feature name.\nSee zpool-features(5).\n")); + "appended with a feature name.\nSee zpool-features(7).\n")); } /* @@ -4170,7 +4170,7 @@ status_callback(zpool_handle_t *zhp, voi (void) printf(gettext("action: Enable all features using " "'zpool upgrade'. Once this is done,\n\tthe pool may no " "longer be accessible by software that does not support\n\t" - "the features. See zpool-features(5) for details.\n")); + "the features. See zpool-features(7) for details.\n")); break; case ZPOOL_STATUS_UNSUP_FEAT_READ: @@ -4630,7 +4630,7 @@ upgrade_list_disabled_cb(zpool_handle_t "pool may become incompatible with " "software\nthat does not support " "the feature. See " - "zpool-features(5) for " + "zpool-features(7) for " "details.\n\n")); (void) printf(gettext("POOL " "FEATURE\n")); Modified: head/cddl/sbin/zpool/Makefile ============================================================================== --- head/cddl/sbin/zpool/Makefile Wed Nov 14 00:43:27 2012 (r243013) +++ head/cddl/sbin/zpool/Makefile Wed Nov 14 01:16:29 2012 (r243014) @@ -5,7 +5,7 @@ .PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs PROG= zpool -MAN= zpool.8 zpool-features.5 +MAN= zpool.8 zpool-features.7 SRCS= zpool_main.c zpool_vdev.c zpool_iter.c zpool_util.c zfs_comutil.c SRCS+= timestamp.c From owner-svn-src-head@FreeBSD.ORG Wed Nov 14 01:45:10 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BF5DFD41; Wed, 14 Nov 2012 01:45:10 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A50F28FC08; Wed, 14 Nov 2012 01:45:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAE1jAUI067696; Wed, 14 Nov 2012 01:45:10 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAE1jAgn067695; Wed, 14 Nov 2012 01:45:10 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201211140145.qAE1jAgn067695@svn.freebsd.org> From: Kevin Lo Date: Wed, 14 Nov 2012 01:45:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243015 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 01:45:10 -0000 Author: kevlo Date: Wed Nov 14 01:45:10 2012 New Revision: 243015 URL: http://svnweb.freebsd.org/changeset/base/243015 Log: Document that sendfile(2) can fail with ENOBUFS. Reviewed by: glebius Modified: head/lib/libc/sys/sendfile.2 Modified: head/lib/libc/sys/sendfile.2 ============================================================================== --- head/lib/libc/sys/sendfile.2 Wed Nov 14 01:16:29 2012 (r243014) +++ head/lib/libc/sys/sendfile.2 Wed Nov 14 01:45:10 2012 (r243015) @@ -265,6 +265,8 @@ is negative. .It Bq Er EIO An error occurred while reading from .Fa fd . +.It Bq Er ENOBUFS +The system was unable to allocate an internal buffer. .It Bq Er ENOTCONN The .Fa s From owner-svn-src-head@FreeBSD.ORG Wed Nov 14 06:23:32 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ABA414E3; Wed, 14 Nov 2012 06:23:32 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 91F1D8FC0C; Wed, 14 Nov 2012 06:23:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAE6NWcS014553; Wed, 14 Nov 2012 06:23:32 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAE6NW6Q014552; Wed, 14 Nov 2012 06:23:32 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201211140623.qAE6NW6Q014552@svn.freebsd.org> From: Kevin Lo Date: Wed, 14 Nov 2012 06:23:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243016 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 06:23:32 -0000 Author: kevlo Date: Wed Nov 14 06:23:32 2012 New Revision: 243016 URL: http://svnweb.freebsd.org/changeset/base/243016 Log: Mention the IEEE 802.1AX. Reviewed by: thompsa Modified: head/share/man/man4/lagg.4 Modified: head/share/man/man4/lagg.4 ============================================================================== --- head/share/man/man4/lagg.4 Wed Nov 14 01:45:10 2012 (r243015) +++ head/share/man/man4/lagg.4 Wed Nov 14 06:23:32 2012 (r243016) @@ -92,8 +92,8 @@ This is an alias for .Ic loadbalance mode. .It Ic lacp -Supports the IEEE 802.3ad Link Aggregation Control Protocol (LACP) and the -Marker Protocol. +Supports the IEEE 802.1AX (formerly 802.3ad) Link Aggregation Control Protocol +(LACP) and the Marker Protocol. LACP will negotiate a set of aggregable links with the peer in to one or more Link Aggregated Groups. Each LAG is composed of ports of the same speed, set to full-duplex operation. @@ -150,7 +150,7 @@ The default for new interfaces is set vi .Va net.link.lagg.default_use_flowid .Xr sysctl 8 . .Sh EXAMPLES -Create a 802.3ad link aggregation using LACP with two +Create a link aggregation using LACP with two .Xr bge 4 Gigabit Ethernet interfaces: .Bd -literal -offset indent From owner-svn-src-head@FreeBSD.ORG Wed Nov 14 06:31:48 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 30D3A706; Wed, 14 Nov 2012 06:31:48 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id F045C8FC12; Wed, 14 Nov 2012 06:31:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAE6Vlqv015986; Wed, 14 Nov 2012 06:31:47 GMT (envelope-from jeff@svn.freebsd.org) Received: (from jeff@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAE6Vl7t015984; Wed, 14 Nov 2012 06:31:47 GMT (envelope-from jeff@svn.freebsd.org) Message-Id: <201211140631.qAE6Vl7t015984@svn.freebsd.org> From: Jeff Roberson Date: Wed, 14 Nov 2012 06:31:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243017 - head/sbin/fsck_ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 06:31:48 -0000 Author: jeff Date: Wed Nov 14 06:31:47 2012 New Revision: 243017 URL: http://svnweb.freebsd.org/changeset/base/243017 Log: - blk_equals() is too strict. If the journal entry defines more frags than we're claiming it should still be considered an exact match. This would previously leak frags that had been extended. - If there is a sequence number problem in the journal print the sequence numbers we've seen so far for debugging. - Clean up the block mask related debuging printfs. Some are redundant. MFC after: 1 week Modified: head/sbin/fsck_ffs/suj.c Modified: head/sbin/fsck_ffs/suj.c ============================================================================== --- head/sbin/fsck_ffs/suj.c Wed Nov 14 06:23:32 2012 (r243016) +++ head/sbin/fsck_ffs/suj.c Wed Nov 14 06:31:47 2012 (r243017) @@ -504,7 +504,7 @@ blk_equals(struct jblkrec *brec, ino_t i return (0); if (brec->jb_blkno + brec->jb_oldfrags != start) return (0); - if (brec->jb_frags != frags) + if (brec->jb_frags < frags) return (0); return (1); } @@ -551,7 +551,6 @@ blk_freemask(ufs2_daddr_t blk, ino_t ino brec = (struct jblkrec *)srec->sr_rec; /* * If the block overlaps but does not match - * exactly it's a new allocation. If it matches * exactly this record refers to the current * location. */ @@ -648,7 +647,8 @@ blk_free(ufs2_daddr_t bno, int mask, int uint8_t *blksfree; if (debug) - printf("Freeing %d frags at blk %jd\n", frags, bno); + printf("Freeing %d frags at blk %jd mask 0x%x\n", + frags, bno, mask); cg = dtog(fs, bno); sc = cg_lookup(cg); cgp = sc->sc_cgp; @@ -1143,12 +1143,8 @@ ino_adjblks(struct suj_ino *sino) static void blk_free_visit(ino_t ino, ufs_lbn_t lbn, ufs2_daddr_t blk, int frags) { - int mask; - mask = blk_freemask(blk, ino, lbn, frags); - if (debug) - printf("blk %jd freemask 0x%X\n", blk, mask); - blk_free(blk, mask, frags); + blk_free(blk, blk_freemask(blk, ino, lbn, frags), frags); } /* @@ -1163,8 +1159,6 @@ blk_free_lbn(ufs2_daddr_t blk, ino_t ino int mask; mask = blk_freemask(blk, ino, lbn, frags); - if (debug) - printf("blk %jd freemask 0x%X\n", blk, mask); resid = 0; if (lbn <= -NDADDR && follow && mask == 0) indir_visit(ino, lbn, blk, &resid, blk_free_visit, VISIT_INDIR); @@ -2334,6 +2328,10 @@ suj_prune(void) } if (newseq != oldseq) { + TAILQ_FOREACH(seg, &allsegs, ss_next) { + printf("%jd, ", seg->ss_rec.jsr_seq); + } + printf("\n"); err_suj("Journal file sequence mismatch %jd != %jd\n", newseq, oldseq); } From owner-svn-src-head@FreeBSD.ORG Wed Nov 14 06:37:44 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3F138A1C; Wed, 14 Nov 2012 06:37:44 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1E9C78FC16; Wed, 14 Nov 2012 06:37:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAE6bhpw016912; Wed, 14 Nov 2012 06:37:43 GMT (envelope-from jeff@svn.freebsd.org) Received: (from jeff@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAE6bhpp016910; Wed, 14 Nov 2012 06:37:43 GMT (envelope-from jeff@svn.freebsd.org) Message-Id: <201211140637.qAE6bhpp016910@svn.freebsd.org> From: Jeff Roberson Date: Wed, 14 Nov 2012 06:37:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243018 - head/sys/ufs/ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 06:37:44 -0000 Author: jeff Date: Wed Nov 14 06:37:43 2012 New Revision: 243018 URL: http://svnweb.freebsd.org/changeset/base/243018 Log: - Fix a truncation bug with softdep journaling that could leak blocks on crash. When truncating a file that never made it to disk we use the canceled allocation dependencies to hold the journal records until the truncation completes. Previously allocdirect dependencies on the id_bufwait list were not considered and their journal space could expire before the bitmaps were written. Cancel them and attach them to the freeblks as we do for other allocdirects. - Add KTR traces that were used to debug this problem. - When adding jsegdeps, always use jwork_insert() so we don't have more than one segdep on a given jwork list. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/ufs/ffs/ffs_softdep.c Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Wed Nov 14 06:31:47 2012 (r243017) +++ head/sys/ufs/ffs/ffs_softdep.c Wed Nov 14 06:37:43 2012 (r243018) @@ -60,6 +60,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -92,6 +93,8 @@ __FBSDID("$FreeBSD$"); #include +#define KTR_SUJ 0 /* Define to KTR_SPARE. */ + #ifndef SOFTUPDATES int @@ -770,6 +773,34 @@ struct pagedep_hashhead; struct bmsafemap_hashhead; /* + * Private journaling structures. + */ +struct jblocks { + struct jseglst jb_segs; /* TAILQ of current segments. */ + struct jseg *jb_writeseg; /* Next write to complete. */ + struct jseg *jb_oldestseg; /* Oldest segment with valid entries. */ + struct jextent *jb_extent; /* Extent array. */ + uint64_t jb_nextseq; /* Next sequence number. */ + uint64_t jb_oldestwrseq; /* Oldest written sequence number. */ + uint8_t jb_needseg; /* Need a forced segment. */ + uint8_t jb_suspended; /* Did journal suspend writes? */ + int jb_avail; /* Available extents. */ + int jb_used; /* Last used extent. */ + int jb_head; /* Allocator head. */ + int jb_off; /* Allocator extent offset. */ + int jb_blocks; /* Total disk blocks covered. */ + int jb_free; /* Total disk blocks free. */ + int jb_min; /* Minimum free space. */ + int jb_low; /* Low on space. */ + int jb_age; /* Insertion time of oldest rec. */ +}; + +struct jextent { + ufs2_daddr_t je_daddr; /* Disk block address. */ + int je_blocks; /* Disk block count. */ +}; + +/* * Internal function prototypes. */ static void softdep_error(char *, int); @@ -2268,19 +2299,15 @@ static void indirblk_insert(freework) struct freework *freework; { - struct freeblks *freeblks; - struct jsegdep *jsegdep; - struct worklist *wk; + struct jblocks *jblocks; + struct jseg *jseg; - freeblks = freework->fw_freeblks; - LIST_FOREACH(wk, &freeblks->fb_jwork, wk_list) - if (wk->wk_type == D_JSEGDEP) - break; - if (wk == NULL) + jblocks = VFSTOUFS(freework->fw_list.wk_mp)->softdep_jblocks; + jseg = TAILQ_LAST(&jblocks->jb_segs, jseglst); + if (jseg == NULL) return; - jsegdep = WK_JSEGDEP(wk); - LIST_INSERT_HEAD(&jsegdep->jd_seg->js_indirs, freework, fw_segs); + LIST_INSERT_HEAD(&jseg->js_indirs, freework, fw_segs); TAILQ_INSERT_HEAD(INDIR_HASH(freework->fw_list.wk_mp, freework->fw_blkno), freework, fw_next); freework->fw_state &= ~DEPCOMPLETE; @@ -2433,31 +2460,6 @@ softdep_unmount(mp) journal_unmount(mp); } -struct jblocks { - struct jseglst jb_segs; /* TAILQ of current segments. */ - struct jseg *jb_writeseg; /* Next write to complete. */ - struct jseg *jb_oldestseg; /* Oldest segment with valid entries. */ - struct jextent *jb_extent; /* Extent array. */ - uint64_t jb_nextseq; /* Next sequence number. */ - uint64_t jb_oldestwrseq; /* Oldest written sequence number. */ - uint8_t jb_needseg; /* Need a forced segment. */ - uint8_t jb_suspended; /* Did journal suspend writes? */ - int jb_avail; /* Available extents. */ - int jb_used; /* Last used extent. */ - int jb_head; /* Allocator head. */ - int jb_off; /* Allocator extent offset. */ - int jb_blocks; /* Total disk blocks covered. */ - int jb_free; /* Total disk blocks free. */ - int jb_min; /* Minimum free space. */ - int jb_low; /* Low on space. */ - int jb_age; /* Insertion time of oldest rec. */ -}; - -struct jextent { - ufs2_daddr_t je_daddr; /* Disk block address. */ - int je_blocks; /* Disk block count. */ -}; - static struct jblocks * jblocks_create(void) { @@ -3663,7 +3665,7 @@ handle_written_jnewblk(jnewblk) */ freefrag = WK_FREEFRAG(jnewblk->jn_dep); freefrag->ff_jdep = NULL; - WORKLIST_INSERT(&freefrag->ff_jwork, &jsegdep->jd_list); + jwork_insert(&freefrag->ff_jwork, jsegdep); break; case D_FREEWORK: /* @@ -3671,8 +3673,7 @@ handle_written_jnewblk(jnewblk) */ freework = WK_FREEWORK(jnewblk->jn_dep); freework->fw_jnewblk = NULL; - WORKLIST_INSERT(&freework->fw_freeblks->fb_jwork, - &jsegdep->jd_list); + jwork_insert(&freework->fw_freeblks->fb_jwork, jsegdep); break; default: panic("handle_written_jnewblk: Unknown type %d.", @@ -3702,6 +3703,7 @@ cancel_jfreefrag(jfreefrag) jfreefrag->fr_freefrag = NULL; free_jfreefrag(jfreefrag); freefrag->ff_state |= DEPCOMPLETE; + CTR1(KTR_SUJ, "cancel_jfreefrag: blkno %jd", freefrag->ff_blkno); } /* @@ -3765,7 +3767,7 @@ handle_written_jblkdep(jblkdep) jblkdep->jb_jsegdep = NULL; freeblks = jblkdep->jb_freeblks; LIST_REMOVE(jblkdep, jb_deps); - WORKLIST_INSERT(&freeblks->fb_jwork, &jsegdep->jd_list); + jwork_insert(&freeblks->fb_jwork, jsegdep); /* * If the freeblks is all journaled, we can add it to the worklist. */ @@ -3968,6 +3970,7 @@ cancel_jfreeblk(freeblks, blkno) } if (jblkdep == NULL) return; + CTR1(KTR_SUJ, "cancel_jfreeblk: blkno %jd", blkno); free_jsegdep(jblkdep->jb_jsegdep); LIST_REMOVE(jblkdep, jb_deps); WORKITEM_FREE(jfreeblk, D_JFREEBLK); @@ -4208,6 +4211,7 @@ cancel_jnewblk(jnewblk, wkhd) { struct jsegdep *jsegdep; + CTR1(KTR_SUJ, "cancel_jnewblk: blkno %jd", jnewblk->jn_blkno); jsegdep = jnewblk->jn_jsegdep; if (jnewblk->jn_jsegdep == NULL || jnewblk->jn_dep == NULL) panic("cancel_jnewblk: Invalid state"); @@ -4899,6 +4903,10 @@ softdep_setup_blkmapdep(bp, mp, newblkno } #endif } + + CTR3(KTR_SUJ, + "softdep_setup_blkmapdep: blkno %jd frags %d oldfrags %d", + newblkno, frags, oldfrags); ACQUIRE_LOCK(&lk); if (newblk_lookup(mp, newblkno, DEPALLOC, &newblk) != 0) panic("softdep_setup_blkmapdep: found block"); @@ -5060,6 +5068,10 @@ softdep_setup_allocdirect(ip, off, newbl else freefrag = NULL; + CTR6(KTR_SUJ, + "softdep_setup_allocdirect: ino %d blkno %jd oldblkno %jd " + "off %jd newsize %ld oldsize %d", + ip->i_number, newblkno, oldblkno, off, newsize, oldsize); ACQUIRE_LOCK(&lk); if (off >= NDADDR) { if (lbn > 0) @@ -5338,6 +5350,8 @@ newfreefrag(ip, blkno, size, lbn) struct freefrag *freefrag; struct fs *fs; + CTR4(KTR_SUJ, "newfreefrag: ino %d blkno %jd size %ld lbn %jd", + ip->i_number, blkno, size, lbn); fs = ip->i_fs; if (fragnum(fs, blkno) + numfrags(fs, size) > fs->fs_frag) panic("newfreefrag: frag size"); @@ -5373,6 +5387,9 @@ handle_workitem_freefrag(freefrag) struct ufsmount *ump = VFSTOUFS(freefrag->ff_list.wk_mp); struct workhead wkhd; + CTR3(KTR_SUJ, + "handle_workitem_freefrag: ino %d blkno %jd size %ld", + freefrag->ff_inum, freefrag->ff_blkno, freefrag->ff_fragsize); /* * It would be illegal to add new completion items to the * freefrag after it was schedule to be done so it must be @@ -5591,6 +5608,9 @@ softdep_setup_allocindir_page(ip, lbn, b if (lbn != nbp->b_lblkno) panic("softdep_setup_allocindir_page: lbn %jd != lblkno %jd", lbn, bp->b_lblkno); + CTR4(KTR_SUJ, + "softdep_setup_allocindir_page: ino %d blkno %jd oldblkno %jd " + "lbn %jd", ip->i_number, newblkno, oldblkno, lbn); ASSERT_VOP_LOCKED(ITOV(ip), "softdep_setup_allocindir_page"); mp = UFSTOVFS(ip->i_ump); aip = newallocindir(ip, ptrno, newblkno, oldblkno, lbn); @@ -5629,6 +5649,9 @@ softdep_setup_allocindir_meta(nbp, ip, b ufs_lbn_t lbn; int dflags; + CTR3(KTR_SUJ, + "softdep_setup_allocindir_meta: ino %d blkno %jd ptrno %d", + ip->i_number, newblkno, ptrno); lbn = nbp->b_lblkno; ASSERT_VOP_LOCKED(ITOV(ip), "softdep_setup_allocindir_meta"); aip = newallocindir(ip, ptrno, newblkno, 0, lbn); @@ -6233,6 +6256,7 @@ softdep_journal_freeblocks(ip, cred, len int flags; /* IO_EXT and/or IO_NORMAL */ { struct freeblks *freeblks, *fbn; + struct worklist *wk, *wkn; struct inodedep *inodedep; struct jblkdep *jblkdep; struct allocdirect *adp, *adpn; @@ -6267,6 +6291,8 @@ softdep_journal_freeblocks(ip, cred, len if ((inodedep->id_state & (UNLINKED | DEPCOMPLETE)) == UNLINKED && length == 0) needj = 0; + CTR3(KTR_SUJ, "softdep_journal_freeblks: ip %d length %ld needj %d", + ip->i_number, length, needj); FREE_LOCK(&lk); /* * Calculate the lbn that we are truncating to. This results in -1 @@ -6420,6 +6446,21 @@ softdep_journal_freeblocks(ip, cred, len cancel_allocdirect(&inodedep->id_extupdt, adp, freeblks); /* + * Scan the bufwait list for newblock dependencies that will never + * make it to disk. + */ + LIST_FOREACH_SAFE(wk, &inodedep->id_bufwait, wk_list, wkn) { + if (wk->wk_type != D_ALLOCDIRECT) + continue; + adp = WK_ALLOCDIRECT(wk); + if (((flags & IO_NORMAL) != 0 && (adp->ad_offset > iboff)) || + ((flags & IO_EXT) != 0 && (adp->ad_state & EXTDATA))) { + cancel_jfreeblk(freeblks, adp->ad_newblkno); + cancel_newblk(WK_NEWBLK(wk), NULL, &freeblks->fb_jwork); + WORKLIST_INSERT(&freeblks->fb_freeworkhd, wk); + } + } + /* * Add journal work. */ LIST_FOREACH(jblkdep, &freeblks->fb_jblkdephd, jb_deps) @@ -6558,6 +6599,8 @@ softdep_setup_freeblocks(ip, length, fla ufs_lbn_t tmpval; ufs_lbn_t lbn; + CTR2(KTR_SUJ, "softdep_setup_freeblks: ip %d length %ld", + ip->i_number, length); fs = ip->i_fs; mp = UFSTOVFS(ip->i_ump); if (length != 0) @@ -7083,6 +7126,8 @@ cancel_newblk(newblk, wk, wkhd) { struct jnewblk *jnewblk; + CTR1(KTR_SUJ, "cancel_newblk: blkno %jd", newblk->nb_newblkno); + newblk->nb_state |= GOINGAWAY; /* * Previously we traversed the completedhd on each indirdep @@ -7451,6 +7496,9 @@ freework_freeblock(freework) } FREE_LOCK(&lk); freeblks_free(ump, freeblks, btodb(bsize)); + CTR4(KTR_SUJ, + "freework_freeblock: ino %d blkno %jd lbn %jd size %ld", + freeblks->fb_inum, freework->fw_blkno, freework->fw_lbn, bsize); ffs_blkfree(ump, fs, freeblks->fb_devvp, freework->fw_blkno, bsize, freeblks->fb_inum, freeblks->fb_vtype, &wkhd); ACQUIRE_LOCK(&lk); @@ -7884,6 +7932,9 @@ indir_trunc(freework, dbn, lbn) &freedep->fd_list); freedeps++; } + CTR3(KTR_SUJ, + "indir_trunc: ino %d blkno %jd size %ld", + freeblks->fb_inum, nb, fs->fs_bsize); ffs_blkfree(ump, fs, freeblks->fb_devvp, nb, fs->fs_bsize, freeblks->fb_inum, freeblks->fb_vtype, &wkhd); @@ -7919,6 +7970,9 @@ indir_trunc(freework, dbn, lbn) * If we're not journaling we can free the indirect now. */ dbn = dbtofsb(fs, dbn); + CTR3(KTR_SUJ, + "indir_trunc 2: ino %d blkno %jd size %ld", + freeblks->fb_inum, dbn, fs->fs_bsize); ffs_blkfree(ump, fs, freeblks->fb_devvp, dbn, fs->fs_bsize, freeblks->fb_inum, freeblks->fb_vtype, NULL); /* Non SUJ softdep does single-threaded truncations. */ @@ -10356,6 +10410,10 @@ softdep_setup_blkfree(mp, bp, blkno, fra int i; #endif + CTR3(KTR_SUJ, + "softdep_setup_blkfree: blkno %jd frags %d wk head %p", + blkno, frags, wkhd); + ACQUIRE_LOCK(&lk); /* Lookup the bmsafemap so we track when it is dirty. */ fs = VFSTOUFS(mp)->um_fs; @@ -10367,6 +10425,9 @@ softdep_setup_blkfree(mp, bp, blkno, fra */ if (wkhd) { while ((wk = LIST_FIRST(wkhd)) != NULL) { + CTR2(KTR_SUJ, + "softdep_setup_blkfree: blkno %jd wk type %d", + blkno, wk->wk_type); WORKLIST_REMOVE(wk); if (wk->wk_type != D_JNEWBLK) { WORKLIST_INSERT(&bmsafemap->sm_freehd, wk); From owner-svn-src-head@FreeBSD.ORG Wed Nov 14 08:05:22 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 83C6EB31; Wed, 14 Nov 2012 08:05:22 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 695568FC0C; Wed, 14 Nov 2012 08:05:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAE85MKu031101; Wed, 14 Nov 2012 08:05:22 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAE85MHU031099; Wed, 14 Nov 2012 08:05:22 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201211140805.qAE85MHU031099@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 14 Nov 2012 08:05:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243019 - head/sbin/route X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 08:05:22 -0000 Author: glebius Date: Wed Nov 14 08:05:21 2012 New Revision: 243019 URL: http://svnweb.freebsd.org/changeset/base/243019 Log: Remove remnants of classful addressing. These magic transformations of supplied arguments is not what a modern sysadmin expect. Modified: head/sbin/route/route.c Modified: head/sbin/route/route.c ============================================================================== --- head/sbin/route/route.c Wed Nov 14 06:37:43 2012 (r243018) +++ head/sbin/route/route.c Wed Nov 14 08:05:21 2012 (r243019) @@ -422,7 +422,7 @@ routename(struct sockaddr *sa) /* * Return the name of the network whose address is given. - * The address is assumed to be that of a net or subnet, not a host. + * The address is assumed to be that of a net, not a host. */ const char * netname(struct sockaddr *sa) @@ -430,9 +430,8 @@ netname(struct sockaddr *sa) const char *cp = NULL; static char line[MAXHOSTNAMELEN + 1]; struct netent *np = NULL; - u_long net, mask; u_long i; - int n, subnetshift; + int n; switch (sa->sa_family) { @@ -444,28 +443,7 @@ netname(struct sockaddr *sa) if (in.s_addr == 0) cp = "default"; else if (!nflag) { - if (IN_CLASSA(i)) { - mask = IN_CLASSA_NET; - subnetshift = 8; - } else if (IN_CLASSB(i)) { - mask = IN_CLASSB_NET; - subnetshift = 8; - } else { - mask = IN_CLASSC_NET; - subnetshift = 4; - } - /* - * If there are more bits than the standard mask - * would suggest, subnets must be in use. - * Guess at the subnet mask, assuming reasonable - * width subnet fields. - */ - while (in.s_addr & ~mask) - mask |= mask >> subnetshift; - net = in.s_addr & mask; - while ((mask & 1) == 0) - mask >>= 1, net >>= 1; - np = getnetbyaddr(net, AF_INET); + np = getnetbyaddr(i, AF_INET); if (np != NULL) cp = np->n_name; } @@ -810,30 +788,19 @@ newroute(int argc, char **argv) static void inet_makenetandmask(u_long net, struct sockaddr_in *sin, u_long bits) { - u_long addr, mask = 0; + u_long mask = 0; char *cp; rtm_addrs |= RTA_NETMASK; - /* - * XXX: This approach unable to handle 0.0.0.1/32 correctly - * as inet_network() converts 0.0.0.1 and 1 equally. - */ - if (net <= 0xff) - addr = net << IN_CLASSA_NSHIFT; - else if (net <= 0xffff) - addr = net << IN_CLASSB_NSHIFT; - else if (net <= 0xffffff) - addr = net << IN_CLASSC_NSHIFT; - else - addr = net; + /* * If no /xx was specified we must calculate the * CIDR address. */ - if ((bits == 0) && (addr != 0)) { + if ((bits == 0) && (net != 0)) { u_long i, j; for(i=0,j=0xff; i<4; i++) { - if (addr & j) { + if (net & j) { break; } j <<= 8; @@ -844,7 +811,7 @@ inet_makenetandmask(u_long net, struct s if (bits != 0) mask = 0xffffffff << (32 - bits); - sin->sin_addr.s_addr = htonl(addr); + sin->sin_addr.s_addr = htonl(net); sin = &so_mask.sin; sin->sin_addr.s_addr = htonl(mask); sin->sin_len = 0; From owner-svn-src-head@FreeBSD.ORG Wed Nov 14 09:30:35 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 48D14F46 for ; Wed, 14 Nov 2012 09:30:35 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id C4C538FC1F for ; Wed, 14 Nov 2012 09:30:34 +0000 (UTC) Received: (qmail 30188 invoked from network); 14 Nov 2012 11:04:30 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 14 Nov 2012 11:04:30 -0000 Message-ID: <50A364AE.6060205@freebsd.org> Date: Wed, 14 Nov 2012 10:30:22 +0100 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: svn commit: r243019 - head/sbin/route References: <201211140805.qAE85MHU031099@svn.freebsd.org> In-Reply-To: <201211140805.qAE85MHU031099@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 09:30:35 -0000 On 14.11.2012 09:05, Gleb Smirnoff wrote: > Author: glebius > Date: Wed Nov 14 08:05:21 2012 > New Revision: 243019 > URL: http://svnweb.freebsd.org/changeset/base/243019 > > Log: > Remove remnants of classful addressing. These magic transformations > of supplied arguments is not what a modern sysadmin expect. Can the IN_CLASS[A-C]_NET... definitions go away as well? -- Andre From owner-svn-src-head@FreeBSD.ORG Wed Nov 14 09:32:39 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F39C1164; Wed, 14 Nov 2012 09:32:38 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 70E1A8FC16; Wed, 14 Nov 2012 09:32:38 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id qAE9WaFU029360; Wed, 14 Nov 2012 13:32:36 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id qAE9Walb029359; Wed, 14 Nov 2012 13:32:36 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 14 Nov 2012 13:32:36 +0400 From: Gleb Smirnoff To: Andre Oppermann Subject: Re: svn commit: r243019 - head/sbin/route Message-ID: <20121114093236.GJ28213@FreeBSD.org> References: <201211140805.qAE85MHU031099@svn.freebsd.org> <50A364AE.6060205@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <50A364AE.6060205@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 09:32:39 -0000 On Wed, Nov 14, 2012 at 10:30:22AM +0100, Andre Oppermann wrote: A> On 14.11.2012 09:05, Gleb Smirnoff wrote: A> > Author: glebius A> > Date: Wed Nov 14 08:05:21 2012 A> > New Revision: 243019 A> > URL: http://svnweb.freebsd.org/changeset/base/243019 A> > A> > Log: A> > Remove remnants of classful addressing. These magic transformations A> > of supplied arguments is not what a modern sysadmin expect. A> A> Can the IN_CLASS[A-C]_NET... definitions go away as well? They are defines that don't generate any code. Also, on this mailing list I've promised once not to remove them :) -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Wed Nov 14 10:32:12 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E4E5466A; Wed, 14 Nov 2012 10:32:12 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C8B138FC13; Wed, 14 Nov 2012 10:32:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAEAWCCj052982; Wed, 14 Nov 2012 10:32:12 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAEAWCk7052981; Wed, 14 Nov 2012 10:32:12 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201211141032.qAEAWCk7052981@svn.freebsd.org> From: Baptiste Daroussin Date: Wed, 14 Nov 2012 10:32:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243021 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 10:32:13 -0000 Author: bapt Date: Wed Nov 14 10:32:12 2012 New Revision: 243021 URL: http://svnweb.freebsd.org/changeset/base/243021 Log: return ERANGE if the buffer is too small to contain the login as documented in the manpage Reviewed by: cognet, kib MFC after: 1 month Modified: head/sys/kern/kern_prot.c Modified: head/sys/kern/kern_prot.c ============================================================================== --- head/sys/kern/kern_prot.c Wed Nov 14 10:06:50 2012 (r243020) +++ head/sys/kern/kern_prot.c Wed Nov 14 10:32:12 2012 (r243021) @@ -2084,6 +2084,8 @@ sys_getlogin(struct thread *td, struct g bcopy(p->p_session->s_login, login, uap->namelen); SESS_UNLOCK(p->p_session); PROC_UNLOCK(p); + if (strlen(login) + 1 > uap->namelen) + return (ERANGE); error = copyout(login, uap->namebuf, uap->namelen); return(error); } From owner-svn-src-head@FreeBSD.ORG Wed Nov 14 10:33:12 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ED9D27ED; Wed, 14 Nov 2012 10:33:12 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D2E428FC18; Wed, 14 Nov 2012 10:33:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAEAXCb0053135; Wed, 14 Nov 2012 10:33:12 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAEAXC5h053134; Wed, 14 Nov 2012 10:33:12 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201211141033.qAEAXC5h053134@svn.freebsd.org> From: Baptiste Daroussin Date: Wed, 14 Nov 2012 10:33:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243022 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 10:33:13 -0000 Author: bapt Date: Wed Nov 14 10:33:12 2012 New Revision: 243022 URL: http://svnweb.freebsd.org/changeset/base/243022 Log: Style fix MFC after: 1 day Modified: head/sys/kern/kern_prot.c Modified: head/sys/kern/kern_prot.c ============================================================================== --- head/sys/kern/kern_prot.c Wed Nov 14 10:32:12 2012 (r243021) +++ head/sys/kern/kern_prot.c Wed Nov 14 10:33:12 2012 (r243022) @@ -2087,7 +2087,7 @@ sys_getlogin(struct thread *td, struct g if (strlen(login) + 1 > uap->namelen) return (ERANGE); error = copyout(login, uap->namebuf, uap->namelen); - return(error); + return (error); } /* From owner-svn-src-head@FreeBSD.ORG Wed Nov 14 10:58:12 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8841A21C; Wed, 14 Nov 2012 10:58:12 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6C4128FC12; Wed, 14 Nov 2012 10:58:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAEAwCHI056633; Wed, 14 Nov 2012 10:58:12 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAEAwCfg056632; Wed, 14 Nov 2012 10:58:12 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201211141058.qAEAwCfg056632@svn.freebsd.org> From: Baptiste Daroussin Date: Wed, 14 Nov 2012 10:58:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243023 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 10:58:12 -0000 Author: bapt Date: Wed Nov 14 10:58:12 2012 New Revision: 243023 URL: http://svnweb.freebsd.org/changeset/base/243023 Log: Allow usernames up to 32 chars PR: kern/161091 [1], misc/133926 [2] Submitted by: Stephane Lapie [1], Chris Dillon [2] Reviewed by: cognet, kib Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Wed Nov 14 10:33:12 2012 (r243022) +++ head/sys/sys/param.h Wed Nov 14 10:58:12 2012 (r243023) @@ -96,7 +96,7 @@ #define MAXCOMLEN 19 /* max command name remembered */ #define MAXINTERP PATH_MAX /* max interpreter file name length */ -#define MAXLOGNAME 17 /* max login name length (incl. NUL) */ +#define MAXLOGNAME 33 /* max login name length (incl. NUL) */ #define MAXUPRC CHILD_MAX /* max simultaneous processes */ #define NCARGS ARG_MAX /* max bytes for an exec function */ #define NGROUPS (NGROUPS_MAX+1) /* max number groups */ From owner-svn-src-head@FreeBSD.ORG Wed Nov 14 10:59:43 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 37D9D511; Wed, 14 Nov 2012 10:59:43 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1E1F68FC13; Wed, 14 Nov 2012 10:59:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAEAxguC056922; Wed, 14 Nov 2012 10:59:42 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAEAxgL2056921; Wed, 14 Nov 2012 10:59:42 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <201211141059.qAEAxgL2056921@svn.freebsd.org> From: Olivier Houchard Date: Wed, 14 Nov 2012 10:59:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243024 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 10:59:43 -0000 Author: cognet Date: Wed Nov 14 10:59:42 2012 New Revision: 243024 URL: http://svnweb.freebsd.org/changeset/base/243024 Log: Use the arrmv7 version for flushID too, as it does something different for SMP. Submitted by: Giovanni Trematerra Modified: head/sys/arm/arm/cpufunc.c Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Wed Nov 14 10:58:12 2012 (r243023) +++ head/sys/arm/arm/cpufunc.c Wed Nov 14 10:59:42 2012 (r243024) @@ -1047,7 +1047,7 @@ struct cpu_functions cortexa_cpufuncs = /* TLB functions */ - arm11_tlb_flushID, /* tlb_flushID */ + armv7_tlb_flushID, /* tlb_flushID */ armv7_tlb_flushID_SE, /* tlb_flushID_SE */ arm11_tlb_flushI, /* tlb_flushI */ arm11_tlb_flushI_SE, /* tlb_flushI_SE */ From owner-svn-src-head@FreeBSD.ORG Wed Nov 14 11:05:17 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4BF7F7E0; Wed, 14 Nov 2012 11:05:17 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 169E88FC13; Wed, 14 Nov 2012 11:05:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAEB5GmA058138; Wed, 14 Nov 2012 11:05:16 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAEB5G85058137; Wed, 14 Nov 2012 11:05:16 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201211141105.qAEB5G85058137@svn.freebsd.org> From: Andriy Gapon Date: Wed, 14 Nov 2012 11:05:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243025 - head/sys/boot/i386/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 11:05:17 -0000 Author: avg Date: Wed Nov 14 11:05:16 2012 New Revision: 243025 URL: http://svnweb.freebsd.org/changeset/base/243025 Log: boot: use packed attribute for edd_params* structures and their substructures The sole purpose of this change is to make sure that sizeof produces "canonical" sizes for these structures. This is to avoid triggering bugs in the BIOSes that properly handle only the canonical values of input length provided to INT 13h AH=48h. The canonical sizes are: 30 for v2, 66 for v3, etc. Buggy BIOS code probably looks like: if (input_length > 30) { /* > v2 */ assume that input length is 66 /* assume v3 or later */ } This should fix boot problems at least on Supermicro X8DT6 and possibly on P410i Smart Array Controller (as found in e.g. HP DL360 G7). Reported by: gnn, np, rstone Debugged by: rstone Discussed with: ae, np, rstone MFC after: 4 days Modified: head/sys/boot/i386/common/edd.h Modified: head/sys/boot/i386/common/edd.h ============================================================================== --- head/sys/boot/i386/common/edd.h Wed Nov 14 10:59:42 2012 (r243024) +++ head/sys/boot/i386/common/edd.h Wed Nov 14 11:05:16 2012 (r243025) @@ -62,7 +62,7 @@ struct edd_params { uint16_t sector_size; uint16_t edd_params_seg; uint16_t edd_params_off; -}; +} __packed; struct edd_device_path_v3 { uint16_t key; @@ -74,12 +74,12 @@ struct edd_device_path_v3 { uint64_t device_path; uint8_t reserved2[1]; uint8_t checksum; -}; +} __packed; struct edd_params_v3 { struct edd_params params; struct edd_device_path_v3 device_path; -}; +} __packed; struct edd_device_path_v4 { uint16_t key; @@ -91,12 +91,12 @@ struct edd_device_path_v4 { uint64_t device_path[2]; uint8_t reserved2[1]; uint8_t checksum; -}; +} __packed; struct edd_params_v4 { struct edd_params params; struct edd_device_path_v4 device_path; -}; +} __packed; #define EDD_FLAGS_DMA_BOUNDARY_HANDLING 0x0001 #define EDD_FLAGS_REMOVABLE_MEDIA 0x0002 From owner-svn-src-head@FreeBSD.ORG Wed Nov 14 12:11:24 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7B395E7D; Wed, 14 Nov 2012 12:11:24 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 60C3B8FC16; Wed, 14 Nov 2012 12:11:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAECBODK068699; Wed, 14 Nov 2012 12:11:24 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAECBO5q068698; Wed, 14 Nov 2012 12:11:24 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <201211141211.qAECBO5q068698@svn.freebsd.org> From: Olivier Houchard Date: Wed, 14 Nov 2012 12:11:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243026 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 12:11:24 -0000 Author: cognet Date: Wed Nov 14 12:11:23 2012 New Revision: 243026 URL: http://svnweb.freebsd.org/changeset/base/243026 Log: Make it clear the L2 ops are filled for any cpu using a PL310 cache, not just the omap4. Spotted out by: Giovanni Trematerra Modified: head/sys/arm/arm/cpufunc.c Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Wed Nov 14 11:05:16 2012 (r243025) +++ head/sys/arm/arm/cpufunc.c Wed Nov 14 12:11:23 2012 (r243026) @@ -1067,7 +1067,8 @@ struct cpu_functions cortexa_cpufuncs = armv7_idcache_wbinv_all, /* idcache_wbinv_all */ armv7_idcache_wbinv_range, /* idcache_wbinv_range */ - /* Note: From OMAP4 the L2 ops are filled in when the + /* + * Note: For CPUs using the PL310 the L2 ops are filled in when the * L2 cache controller is actually enabled. */ cpufunc_nullop, /* l2cache_wbinv_all */ From owner-svn-src-head@FreeBSD.ORG Wed Nov 14 14:08:24 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CA8FA2FD; Wed, 14 Nov 2012 14:08:24 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B013C8FC0C; Wed, 14 Nov 2012 14:08:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAEE8Ocf084074; Wed, 14 Nov 2012 14:08:24 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAEE8O3P084072; Wed, 14 Nov 2012 14:08:24 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201211141408.qAEE8O3P084072@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 14 Nov 2012 14:08:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243027 - head/bin/sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 14:08:24 -0000 Author: jilles Date: Wed Nov 14 14:08:24 2012 New Revision: 243027 URL: http://svnweb.freebsd.org/changeset/base/243027 Log: sh: Remove an unused variable. Modified: head/bin/sh/input.c head/bin/sh/input.h Modified: head/bin/sh/input.c ============================================================================== --- head/bin/sh/input.c Wed Nov 14 12:11:23 2012 (r243026) +++ head/bin/sh/input.c Wed Nov 14 14:08:24 2012 (r243027) @@ -99,7 +99,6 @@ char *parsenextc; /* copy of parsefile- MKINIT struct parsefile basepf; /* top level input file */ char basebuf[BUFSIZ + 1]; /* buffer for top level input file */ static struct parsefile *parsefile = &basepf; /* current input file */ -int init_editline = 0; /* editline library initialized? */ int whichprompt; /* 1 == PS1, 2 == PS2 */ EditLine *el; /* cookie for editline package */ Modified: head/bin/sh/input.h ============================================================================== --- head/bin/sh/input.h Wed Nov 14 12:11:23 2012 (r243026) +++ head/bin/sh/input.h Wed Nov 14 14:08:24 2012 (r243027) @@ -43,7 +43,6 @@ extern int plinno; extern int parsenleft; /* number of characters left in input buffer */ extern char *parsenextc; /* next character in input buffer */ -extern int init_editline; /* 0 == not setup, 1 == OK, -1 == failed */ struct alias; struct parsefile; From owner-svn-src-head@FreeBSD.ORG Wed Nov 14 16:00:07 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BCF98C14; Wed, 14 Nov 2012 16:00:07 +0000 (UTC) (envelope-from edschouten@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 122938FC13; Wed, 14 Nov 2012 16:00:07 +0000 (UTC) Received: by mail-ob0-f182.google.com with SMTP id 16so710205obc.13 for ; Wed, 14 Nov 2012 08:00:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=smLq3bh6hNTei6x9RpehMjfb2KOoGN9GaziSq8vfYbk=; b=hT2huNbG7tyjb516YrKkql/ddb2VGlogI86lnxb2evqCMM+Y1aqiEoFr/WmJRgieUs xvKr01Am2+hxcZL9yAZkrBun/xWl6XkxRpz3g5bxmTmonX9lsd72rMbxDRNmryU5JTs9 ybnSRTWSVBN7dEFoGCemiqiCtPHDnMqAoGYFio8oXjuZKsL+kKX/GWzZ9+HqXMIZLn9g 4IjNWBJAIN/9UsbbT8KvqrYHLcd7rfCeIEUc5hHBjmO4TV6LH+qxn5M2mVXOKeuEMYp7 vNhIEoRJXwJONyJ9tGd3RREbUA+3SD0CWa5hNMQ/Kxowudj4ImcN6wmDOs/K/nHfRJY5 tJqw== MIME-Version: 1.0 Received: by 10.182.1.72 with SMTP id 8mr20952220obk.61.1352908805790; Wed, 14 Nov 2012 08:00:05 -0800 (PST) Sender: edschouten@gmail.com Received: by 10.76.151.39 with HTTP; Wed, 14 Nov 2012 08:00:05 -0800 (PST) In-Reply-To: <201211141058.qAEAwCfg056632@svn.freebsd.org> References: <201211141058.qAEAwCfg056632@svn.freebsd.org> Date: Wed, 14 Nov 2012 17:00:05 +0100 X-Google-Sender-Auth: 19XpwN7I4k2497afiSpshrMG_mg Message-ID: Subject: Re: svn commit: r243023 - head/sys/sys From: Ed Schouten To: Baptiste Daroussin Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 16:00:07 -0000 2012/11/14 Baptiste Daroussin : > Allow usernames up to 32 chars Thanks! -- Ed Schouten From owner-svn-src-head@FreeBSD.ORG Wed Nov 14 16:12:29 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 75397E2; Wed, 14 Nov 2012 16:12:29 +0000 (UTC) (envelope-from minimarmot@gmail.com) Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by mx1.freebsd.org (Postfix) with ESMTP id 2D63A8FC08; Wed, 14 Nov 2012 16:12:28 +0000 (UTC) Received: by mail-pa0-f54.google.com with SMTP id kp6so420984pab.13 for ; Wed, 14 Nov 2012 08:12:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=bb2sDOLO1wPZWgqRsgR98IFRKFCA+fnjeVQQG0Vhcao=; b=cFoaAuEoZQSX+dz5jhKaVrs0R7S94BvfHsY/Es9jsBMQiJ6fgTZZ/LaxQY7RSYgl56 UXvwxZVB55ZUc0dect1ejSlveVOjZ3MqFdTdmoQHWr8oJmY7+aRK1+Q5OmeWj7+7shsm mhYQKXjrIGQahO6z7GTDq6ZuCdBCOBcjkkPz7tfsy9tbmGRoNAdt9ZmFDoshln37kzT6 GpfcJCt32/2qdDfOBCyI1A4JRmjfq1I1u4oHClCBhJwTSNWepUuPKOBDdWwH+8ZQ3kEZ wU+yXbUNn8luiQr9hiRtPBfvVGe9BYcfZJwH5bD45K0FP232c1+n4RHKALlMtH7uDwB9 9V2w== MIME-Version: 1.0 Received: by 10.69.1.9 with SMTP id bc9mr79271000pbd.61.1352909548826; Wed, 14 Nov 2012 08:12:28 -0800 (PST) Received: by 10.66.148.227 with HTTP; Wed, 14 Nov 2012 08:12:28 -0800 (PST) In-Reply-To: <20121114093236.GJ28213@FreeBSD.org> References: <201211140805.qAE85MHU031099@svn.freebsd.org> <50A364AE.6060205@freebsd.org> <20121114093236.GJ28213@FreeBSD.org> Date: Wed, 14 Nov 2012 11:12:28 -0500 Message-ID: Subject: Re: svn commit: r243019 - head/sbin/route From: Ben Kaduk To: Gleb Smirnoff Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Andre Oppermann X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 16:12:29 -0000 On Wed, Nov 14, 2012 at 4:32 AM, Gleb Smirnoff wrote: > A> Can the IN_CLASS[A-C]_NET... definitions go away as well? > > They are defines that don't generate any code. > > Also, on this mailing list I've promised once not to remove them :) I'm glad you remember :) Andre, they are used (for better or for worse) in a multi-site database synchronization protocol that currently works portably across operating systems. Removing them would change the semantics of that protocol in a subtle way that might introduce breakage. -Ben Kaduk From owner-svn-src-head@FreeBSD.ORG Wed Nov 14 16:27:37 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D6E7333B for ; Wed, 14 Nov 2012 16:27:37 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3BC748FC13 for ; Wed, 14 Nov 2012 16:27:36 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id j13so625434lah.13 for ; Wed, 14 Nov 2012 08:27:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=ACkUCZHIXUa8x9PYVOnQq9TgyiHpBwBhRVXs75O3jPw=; b=nZ27AGASWclH9fIQMc1hKIoupQlK7evL7bpYrpG/ARKxKU3K84zJdNUAoopuRpZJ4f fXcxcY7AJHrzAW55xlxJrPFakEy3btISNgQWQD8rWyOMGDTeb1coooVZt0cc4ry8I82y jgJy1SQ4BmLXAhZHFVidAI59ubr8gAKgjwEBc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=ACkUCZHIXUa8x9PYVOnQq9TgyiHpBwBhRVXs75O3jPw=; b=SzxVAhCzRGdl5O9MKuvmgWs/oZjN9yvCsZHT1CgcegCzzpHFe14NAyLndEfZYP56HA jPTWp0nr6355BPZbU6Xw8C+CADXEDUB9k9za888A+zvDSLOiR4DY9TptzyCLhnCOiORD q/Mom7vKrcRDVM3DqxGNx5fIg0nf51qhCIGDPTL8/Xoo6iwAg7TGsyCT2/JXYsS0SixZ mhAKVVpcU/1b7fdLdEqxIHH6qJD9nu8mOblbRPqwFyqwyIBF4DfjHnOk/NpqWF2kaIc2 Baa19UN4w//g0GYxZFnOJLLE9jyP/fIGsKUPMX5bgWPuNehMZL5MklBK4uqF88IgqtLT IrEg== Received: by 10.112.13.140 with SMTP id h12mr11125725lbc.12.1352910456084; Wed, 14 Nov 2012 08:27:36 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.112.25.166 with HTTP; Wed, 14 Nov 2012 08:27:05 -0800 (PST) In-Reply-To: References: <201211140805.qAE85MHU031099@svn.freebsd.org> <50A364AE.6060205@freebsd.org> <20121114093236.GJ28213@FreeBSD.org> From: Eitan Adler Date: Wed, 14 Nov 2012 11:27:05 -0500 X-Google-Sender-Auth: JH6xCm5Qg8MUFjG9FOJQip2_dOk Message-ID: Subject: Re: svn commit: r243019 - head/sbin/route To: Ben Kaduk Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQm+M8oFmL0jDT6zdPirQjQEFAKAdtVaikREWaN7e5Fw758KtLAEOoZ/+IL/l8QTrfgoRMwm Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , Andre Oppermann , src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 16:27:38 -0000 On 14 November 2012 11:12, Ben Kaduk wrote: > On Wed, Nov 14, 2012 at 4:32 AM, Gleb Smirnoff wrote: >> A> Can the IN_CLASS[A-C]_NET... definitions go away as well? >> >> They are defines that don't generate any code. >> >> Also, on this mailing list I've promised once not to remove them :) > > I'm glad you remember :) Perhaps a comment indicating they shouldn't be removed should be added? > Andre, they are used (for better or for worse) in a multi-site > database synchronization protocol that currently works portably across > operating systems. Removing them would change the semantics of that > protocol in a subtle way that might introduce breakage. Which one? -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@FreeBSD.ORG Wed Nov 14 17:14:04 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4843ECD7; Wed, 14 Nov 2012 17:14:04 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2D99B8FC14; Wed, 14 Nov 2012 17:14:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAEHE4hC015023; Wed, 14 Nov 2012 17:14:04 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAEHE46n015022; Wed, 14 Nov 2012 17:14:04 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201211141714.qAEHE46n015022@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Wed, 14 Nov 2012 17:14:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243028 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 17:14:04 -0000 Author: ae Date: Wed Nov 14 17:14:03 2012 New Revision: 243028 URL: http://svnweb.freebsd.org/changeset/base/243028 Log: zoneid has unsigned type. MFC after: 1 week Modified: head/sys/netinet6/scope6.c Modified: head/sys/netinet6/scope6.c ============================================================================== --- head/sys/netinet6/scope6.c Wed Nov 14 14:08:24 2012 (r243027) +++ head/sys/netinet6/scope6.c Wed Nov 14 17:14:03 2012 (r243028) @@ -388,7 +388,7 @@ sa6_recoverscope(struct sockaddr_in6 *si zoneid = ntohs(sin6->sin6_addr.s6_addr16[1]); if (zoneid) { /* sanity check */ - if (zoneid < 0 || V_if_index < zoneid) + if (V_if_index < zoneid) return (ENXIO); if (!ifnet_byindex(zoneid)) return (ENXIO); From owner-svn-src-head@FreeBSD.ORG Wed Nov 14 17:23:49 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9D787EF9; Wed, 14 Nov 2012 17:23:49 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 65BF68FC08; Wed, 14 Nov 2012 17:23:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAEHNn2Z016370; Wed, 14 Nov 2012 17:23:49 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAEHNn6A016369; Wed, 14 Nov 2012 17:23:49 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201211141723.qAEHNn6A016369@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Wed, 14 Nov 2012 17:23:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243029 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 17:23:49 -0000 Author: ae Date: Wed Nov 14 17:23:48 2012 New Revision: 243029 URL: http://svnweb.freebsd.org/changeset/base/243029 Log: SCOPE6_LOCK protects V_sid_default, no need to acquire it without any access to V_sid_default. Sponsored by: Yandex LLC MFC after: 1 week Modified: head/sys/netinet6/scope6.c Modified: head/sys/netinet6/scope6.c ============================================================================== --- head/sys/netinet6/scope6.c Wed Nov 14 17:14:03 2012 (r243028) +++ head/sys/netinet6/scope6.c Wed Nov 14 17:23:48 2012 (r243029) @@ -139,7 +139,6 @@ scope6_set(struct ifnet *ifp, struct sco * interface addresses, routing table entries, PCB entries... */ - SCOPE6_LOCK(); for (i = 0; i < 16; i++) { if (idlist->s6id_list[i] && idlist->s6id_list[i] != sid->s6id_list[i]) { @@ -150,7 +149,6 @@ scope6_set(struct ifnet *ifp, struct sco if (i == IPV6_ADDR_SCOPE_INTFACELOCAL && idlist->s6id_list[i] != ifp->if_index) { IF_AFDATA_UNLOCK(ifp); - SCOPE6_UNLOCK(); return (EINVAL); } @@ -163,7 +161,6 @@ scope6_set(struct ifnet *ifp, struct sco * safety in later use. */ IF_AFDATA_UNLOCK(ifp); - SCOPE6_UNLOCK(); return (EINVAL); } @@ -175,7 +172,6 @@ scope6_set(struct ifnet *ifp, struct sco sid->s6id_list[i] = idlist->s6id_list[i]; } } - SCOPE6_UNLOCK(); IF_AFDATA_UNLOCK(ifp); return (error); @@ -193,9 +189,7 @@ scope6_get(struct ifnet *ifp, struct sco return (EINVAL); } - SCOPE6_LOCK(); *idlist = *sid; - SCOPE6_UNLOCK(); IF_AFDATA_UNLOCK(ifp); return (0); @@ -442,8 +436,6 @@ in6_setscope(struct in6_addr *in6, struc } scope = in6_addrscope(in6); - - SCOPE6_LOCK(); switch (scope) { case IPV6_ADDR_SCOPE_INTFACELOCAL: /* should be interface index */ zoneid = sid->s6id_list[IPV6_ADDR_SCOPE_INTFACELOCAL]; @@ -465,7 +457,6 @@ in6_setscope(struct in6_addr *in6, struc zoneid = 0; /* XXX: treat as global. */ break; } - SCOPE6_UNLOCK(); IF_AFDATA_UNLOCK(ifp); if (ret_id != NULL) From owner-svn-src-head@FreeBSD.ORG Wed Nov 14 17:28:23 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 664) id C22BE23D; Wed, 14 Nov 2012 17:28:23 +0000 (UTC) Date: Wed, 14 Nov 2012 09:28:23 -0800 From: David O'Brien To: "Simon J. Gerraty" Subject: Re: svn commit: r242102 - in head: contrib/bmake usr.bin/bmake Message-ID: <20121114172823.GA20127@dragon.NUXI.org> References: <201210252318.q9PNI6IQ069461@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201210252318.q9PNI6IQ069461@svn.freebsd.org> X-Operating-System: FreeBSD 10.0-CURRENT X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: obrien@freebsd.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 17:28:23 -0000 On Thu, Oct 25, 2012 at 11:18:06PM +0000, Simon J. Gerraty wrote: > Log: > Merge bmake-20121010 Hi Simon, I was kicking the tires on this and noticed bmake is dynamically linked. Can you change it to being statically linked? This issue most recently came up in freebsd-current. See thread pieces http://lists.freebsd.org/pipermail/freebsd-current/2012-April/033460.html http://lists.freebsd.org/pipermail/freebsd-current/2012-April/033472.html http://lists.freebsd.org/pipermail/freebsd-current/2012-April/033473.html -- -- David (obrien@FreeBSD.org) From owner-svn-src-head@FreeBSD.ORG Wed Nov 14 17:33:01 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6812345B; Wed, 14 Nov 2012 17:33:01 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4CF1B8FC15; Wed, 14 Nov 2012 17:33:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAEHX1eY017685; Wed, 14 Nov 2012 17:33:01 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAEHX126017682; Wed, 14 Nov 2012 17:33:01 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201211141733.qAEHX126017682@svn.freebsd.org> From: Alan Cox Date: Wed, 14 Nov 2012 17:33:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243030 - in head/sys/mips: include mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 17:33:01 -0000 Author: alc Date: Wed Nov 14 17:33:00 2012 New Revision: 243030 URL: http://svnweb.freebsd.org/changeset/base/243030 Log: The function pmap_alloc_direct_page() unconditionally zeroes the returned page. Therefore, it is really inappropriate for use by the function uma_small_alloc(). The effect of using it was that every page was zeroed at least once and possibly twice if M_ZERO was passed as a "wait" flag. Modified: head/sys/mips/include/pmap.h head/sys/mips/mips/pmap.c head/sys/mips/mips/uma_machdep.c Modified: head/sys/mips/include/pmap.h ============================================================================== --- head/sys/mips/include/pmap.h Wed Nov 14 17:23:48 2012 (r243029) +++ head/sys/mips/include/pmap.h Wed Nov 14 17:33:00 2012 (r243030) @@ -179,7 +179,6 @@ void pmap_kenter_temporary_free(vm_paddr void pmap_flush_pvcache(vm_page_t m); int pmap_emulate_modified(pmap_t pmap, vm_offset_t va); void pmap_grow_direct_page_cache(void); -vm_page_t pmap_alloc_direct_page(unsigned int index, int req); #endif /* _KERNEL */ Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Wed Nov 14 17:23:48 2012 (r243029) +++ head/sys/mips/mips/pmap.c Wed Nov 14 17:33:00 2012 (r243030) @@ -163,6 +163,7 @@ static vm_page_t pmap_pv_reclaim(pmap_t static void pmap_pvh_free(struct md_page *pvh, pmap_t pmap, vm_offset_t va); static pv_entry_t pmap_pvh_remove(struct md_page *pvh, pmap_t pmap, vm_offset_t va); +static vm_page_t pmap_alloc_direct_page(unsigned int index, int req); static vm_page_t pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, vm_page_t mpte); static int pmap_remove_pte(struct pmap *pmap, pt_entry_t *ptq, vm_offset_t va, @@ -1041,7 +1042,7 @@ pmap_grow_direct_page_cache() #endif } -vm_page_t +static vm_page_t pmap_alloc_direct_page(unsigned int index, int req) { vm_page_t m; Modified: head/sys/mips/mips/uma_machdep.c ============================================================================== --- head/sys/mips/mips/uma_machdep.c Wed Nov 14 17:23:48 2012 (r243029) +++ head/sys/mips/mips/uma_machdep.c Wed Nov 14 17:33:00 2012 (r243030) @@ -50,12 +50,14 @@ uma_small_alloc(uma_zone_t zone, int byt *flags = UMA_SLAB_PRIV; if ((wait & (M_NOWAIT|M_USE_RESERVE)) == M_NOWAIT) - pflags = VM_ALLOC_INTERRUPT; + pflags = VM_ALLOC_INTERRUPT | VM_ALLOC_WIRED; else - pflags = VM_ALLOC_SYSTEM; + pflags = VM_ALLOC_SYSTEM | VM_ALLOC_WIRED; + if (wait & M_ZERO) + pflags |= VM_ALLOC_ZERO; for (;;) { - m = pmap_alloc_direct_page(0, pflags); + m = vm_page_alloc_freelist(VM_FREELIST_DIRECT, pflags); if (m == NULL) { if (wait & M_NOWAIT) return (NULL); From owner-svn-src-head@FreeBSD.ORG Wed Nov 14 17:36:07 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4334D5F4; Wed, 14 Nov 2012 17:36:07 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 27B948FC12; Wed, 14 Nov 2012 17:36:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAEHa7o1018139; Wed, 14 Nov 2012 17:36:07 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAEHa7FG018138; Wed, 14 Nov 2012 17:36:07 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201211141736.qAEHa7FG018138@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Wed, 14 Nov 2012 17:36:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243031 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 17:36:07 -0000 Author: ae Date: Wed Nov 14 17:36:06 2012 New Revision: 243031 URL: http://svnweb.freebsd.org/changeset/base/243031 Log: if_afdata lock was converted from mutex to rwlock a long ago, so we can replace IF_AFDATA_LOCK() macro depending to the access type. Sponsored by: Yandex LLC MFC after: 1 week Modified: head/sys/netinet6/scope6.c Modified: head/sys/netinet6/scope6.c ============================================================================== --- head/sys/netinet6/scope6.c Wed Nov 14 17:33:00 2012 (r243030) +++ head/sys/netinet6/scope6.c Wed Nov 14 17:36:06 2012 (r243031) @@ -121,11 +121,11 @@ scope6_set(struct ifnet *ifp, struct sco int error = 0; struct scope6_id *sid = NULL; - IF_AFDATA_LOCK(ifp); + IF_AFDATA_WLOCK(ifp); sid = SID(ifp); if (!sid) { /* paranoid? */ - IF_AFDATA_UNLOCK(ifp); + IF_AFDATA_WUNLOCK(ifp); return (EINVAL); } @@ -148,7 +148,7 @@ scope6_set(struct ifnet *ifp, struct sco */ if (i == IPV6_ADDR_SCOPE_INTFACELOCAL && idlist->s6id_list[i] != ifp->if_index) { - IF_AFDATA_UNLOCK(ifp); + IF_AFDATA_WUNLOCK(ifp); return (EINVAL); } @@ -160,7 +160,7 @@ scope6_set(struct ifnet *ifp, struct sco * IDs, but we check the consistency for * safety in later use. */ - IF_AFDATA_UNLOCK(ifp); + IF_AFDATA_WUNLOCK(ifp); return (EINVAL); } @@ -172,7 +172,7 @@ scope6_set(struct ifnet *ifp, struct sco sid->s6id_list[i] = idlist->s6id_list[i]; } } - IF_AFDATA_UNLOCK(ifp); + IF_AFDATA_WUNLOCK(ifp); return (error); } @@ -180,18 +180,19 @@ scope6_set(struct ifnet *ifp, struct sco int scope6_get(struct ifnet *ifp, struct scope6_id *idlist) { - /* We only need to lock the interface's afdata for SID() to work. */ - IF_AFDATA_LOCK(ifp); - struct scope6_id *sid = SID(ifp); + struct scope6_id *sid; + /* We only need to lock the interface's afdata for SID() to work. */ + IF_AFDATA_RLOCK(ifp); + sid = SID(ifp); if (sid == NULL) { /* paranoid? */ - IF_AFDATA_UNLOCK(ifp); + IF_AFDATA_RUNLOCK(ifp); return (EINVAL); } *idlist = *sid; - IF_AFDATA_UNLOCK(ifp); + IF_AFDATA_RUNLOCK(ifp); return (0); } @@ -408,7 +409,7 @@ in6_setscope(struct in6_addr *in6, struc u_int32_t zoneid = 0; struct scope6_id *sid; - IF_AFDATA_LOCK(ifp); + IF_AFDATA_RLOCK(ifp); sid = SID(ifp); @@ -425,12 +426,12 @@ in6_setscope(struct in6_addr *in6, struc */ if (IN6_IS_ADDR_LOOPBACK(in6)) { if (!(ifp->if_flags & IFF_LOOPBACK)) { - IF_AFDATA_UNLOCK(ifp); + IF_AFDATA_RUNLOCK(ifp); return (EINVAL); } else { if (ret_id != NULL) *ret_id = 0; /* there's no ambiguity */ - IF_AFDATA_UNLOCK(ifp); + IF_AFDATA_RUNLOCK(ifp); return (0); } } @@ -457,7 +458,7 @@ in6_setscope(struct in6_addr *in6, struc zoneid = 0; /* XXX: treat as global. */ break; } - IF_AFDATA_UNLOCK(ifp); + IF_AFDATA_RUNLOCK(ifp); if (ret_id != NULL) *ret_id = zoneid; From owner-svn-src-head@FreeBSD.ORG Wed Nov 14 17:44:38 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 814677F8; Wed, 14 Nov 2012 17:44:38 +0000 (UTC) (envelope-from demon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 624938FC12; Wed, 14 Nov 2012 17:44:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAEHicmg019356; Wed, 14 Nov 2012 17:44:38 GMT (envelope-from demon@svn.freebsd.org) Received: (from demon@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAEHicPI019355; Wed, 14 Nov 2012 17:44:38 GMT (envelope-from demon@svn.freebsd.org) Message-Id: <201211141744.qAEHicPI019355@svn.freebsd.org> From: Dmitry Sivachenko Date: Wed, 14 Nov 2012 17:44:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243032 - head/include/xlocale X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 17:44:38 -0000 Author: demon (ports committer) Date: Wed Nov 14 17:44:37 2012 New Revision: 243032 URL: http://svnweb.freebsd.org/changeset/base/243032 Log: Use defined() to test macro definitions. Approved by: theraven Modified: head/include/xlocale/_ctype.h Modified: head/include/xlocale/_ctype.h ============================================================================== --- head/include/xlocale/_ctype.h Wed Nov 14 17:36:06 2012 (r243031) +++ head/include/xlocale/_ctype.h Wed Nov 14 17:44:37 2012 (r243032) @@ -53,7 +53,7 @@ _RuneLocale *__runes_for_locale(locale_t #endif #ifndef _XLOCALE_INLINE -#if __GNUC__ && !__GNUC_STDC_INLINE__ +#if defined(__GNUC__) && !defined(__GNUC_STDC_INLINE__) /* GNU89 inline has nonstandard semantics. */ #define _XLOCALE_INLINE extern __inline #else From owner-svn-src-head@FreeBSD.ORG Wed Nov 14 18:43:59 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 38F4029B; Wed, 14 Nov 2012 18:43:59 +0000 (UTC) (envelope-from davide@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1F4F38FC18; Wed, 14 Nov 2012 18:43:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAEIhw22028379; Wed, 14 Nov 2012 18:43:58 GMT (envelope-from davide@svn.freebsd.org) Received: (from davide@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAEIhwI9028378; Wed, 14 Nov 2012 18:43:58 GMT (envelope-from davide@svn.freebsd.org) Message-Id: <201211141843.qAEIhwI9028378@svn.freebsd.org> From: Davide Italiano Date: Wed, 14 Nov 2012 18:43:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243033 - head/sys/fs/smbfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 18:43:59 -0000 Author: davide Date: Wed Nov 14 18:43:58 2012 New Revision: 243033 URL: http://svnweb.freebsd.org/changeset/base/243033 Log: Fix the lookup in the DOTDOT case in the same way as other filesystems do, i.e. inlining the vn_vget_ino() algorithm. Sponsored by: iXsystems inc. Modified: head/sys/fs/smbfs/smbfs_vnops.c Modified: head/sys/fs/smbfs/smbfs_vnops.c ============================================================================== --- head/sys/fs/smbfs/smbfs_vnops.c Wed Nov 14 17:44:37 2012 (r243032) +++ head/sys/fs/smbfs/smbfs_vnops.c Wed Nov 14 18:43:58 2012 (r243033) @@ -1278,9 +1278,30 @@ smbfs_lookup(ap) goto out; } if (flags & ISDOTDOT) { + mp = dvp->v_mount; + error = vfs_busy(mp, MBF_NOWAIT); + if (error != 0) { + vfs_ref(mp); + VOP_UNLOCK(dvp, 0); + error = vfs_busy(mp, 0); + vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY); + vfs_rel(mp); + if (error) + return (ENOENT); + if ((dvp->v_iflag & VI_DOOMED) != 0) { + vfs_unbusy(mp); + return (ENOENT); + } + } VOP_UNLOCK(dvp, 0); error = smbfs_nget(mp, dvp, name, nmlen, NULL, &vp); + vfs_unbusy(mp); vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY); + if ((dvp->v_iflag & VI_DOOMED) != 0) { + if (error == 0) + vput(vp); + error = ENOENT; + } if (error) goto out; *vpp = vp; From owner-svn-src-head@FreeBSD.ORG Wed Nov 14 18:48:49 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A0A5C465; Wed, 14 Nov 2012 18:48:49 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 06D598FC0C; Wed, 14 Nov 2012 18:48:48 +0000 (UTC) Received: from tom.home (localhost [127.0.0.1]) by kib.kiev.ua (8.14.5/8.14.5) with ESMTP id qAEImbIH035390; Wed, 14 Nov 2012 20:48:37 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.7.1 kib.kiev.ua qAEImbIH035390 Received: (from kostik@localhost) by tom.home (8.14.5/8.14.5/Submit) id qAEImbsT035389; Wed, 14 Nov 2012 20:48:37 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 14 Nov 2012 20:48:37 +0200 From: Konstantin Belousov To: "David O'Brien" Subject: Re: svn commit: r242102 - in head: contrib/bmake usr.bin/bmake Message-ID: <20121114184837.GA73505@kib.kiev.ua> References: <201210252318.q9PNI6IQ069461@svn.freebsd.org> <20121114172823.GA20127@dragon.NUXI.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xgpTOYv2eOcVlqnL" Content-Disposition: inline In-Reply-To: <20121114172823.GA20127@dragon.NUXI.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=0.2 required=5.0 tests=ALL_TRUSTED, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: "Simon J. Gerraty" , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 18:48:49 -0000 --xgpTOYv2eOcVlqnL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 14, 2012 at 09:28:23AM -0800, David O'Brien wrote: > On Thu, Oct 25, 2012 at 11:18:06PM +0000, Simon J. Gerraty wrote: > > Log: > > Merge bmake-20121010 >=20 > Hi Simon, > I was kicking the tires on this and noticed bmake is dynamically linked. >=20 > Can you change it to being statically linked? >=20 >=20 > This issue most recently came up in freebsd-current. See thread pieces > http://lists.freebsd.org/pipermail/freebsd-current/2012-April/033460.html > http://lists.freebsd.org/pipermail/freebsd-current/2012-April/033472.html > http://lists.freebsd.org/pipermail/freebsd-current/2012-April/033473.html As you see, I prefer to not introduce new statically linked binaries into b= ase. If, for unfortunate turns of events, bmake is changed to be statically link= ed, please obey WITH_SHARED_TOOLCHAIN. --xgpTOYv2eOcVlqnL Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlCj54QACgkQC3+MBN1Mb4j2KwCdFCeKZwbsayD3Iwd3SYh4cQU6 JbUAnjE86zXlqyHrlfNe+SG/In+Wd7+M =mvPo -----END PGP SIGNATURE----- --xgpTOYv2eOcVlqnL-- From owner-svn-src-head@FreeBSD.ORG Wed Nov 14 18:49:03 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DBF405D3; Wed, 14 Nov 2012 18:49:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C23D48FC0C; Wed, 14 Nov 2012 18:49:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAEIn3mF029156; Wed, 14 Nov 2012 18:49:03 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAEIn3QI029155; Wed, 14 Nov 2012 18:49:03 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201211141849.qAEIn3QI029155@svn.freebsd.org> From: Dimitry Andric Date: Wed, 14 Nov 2012 18:49:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243034 - head/crypto/heimdal/lib/sl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 18:49:03 -0000 Author: dim Date: Wed Nov 14 18:49:03 2012 New Revision: 243034 URL: http://svnweb.freebsd.org/changeset/base/243034 Log: In crypto/heimdal/lib/sl/slc-lex.l, don't define YY_NO_INPUT, since %option nounput is already specified. MFC after: 3 days Modified: head/crypto/heimdal/lib/sl/slc-lex.l Modified: head/crypto/heimdal/lib/sl/slc-lex.l ============================================================================== --- head/crypto/heimdal/lib/sl/slc-lex.l Wed Nov 14 18:43:58 2012 (r243033) +++ head/crypto/heimdal/lib/sl/slc-lex.l Wed Nov 14 18:49:03 2012 (r243034) @@ -47,8 +47,6 @@ unsigned lineno = 1; static void handle_comment(void); static char * handle_string(void); -#define YY_NO_UNPUT - #undef ECHO %} From owner-svn-src-head@FreeBSD.ORG Wed Nov 14 18:51:13 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0EC567B0; Wed, 14 Nov 2012 18:51:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E77DE8FC15; Wed, 14 Nov 2012 18:51:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAEIpCbh029533; Wed, 14 Nov 2012 18:51:12 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAEIpCP5029532; Wed, 14 Nov 2012 18:51:12 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201211141851.qAEIpCP5029532@svn.freebsd.org> From: Dimitry Andric Date: Wed, 14 Nov 2012 18:51:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243035 - head/usr.bin/mkcsmapper X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 18:51:13 -0000 Author: dim Date: Wed Nov 14 18:51:12 2012 New Revision: 243035 URL: http://svnweb.freebsd.org/changeset/base/243035 Log: For mkcsmapper, conditionalize gcc-specific compile flags. MFC after: 3 days Modified: head/usr.bin/mkcsmapper/Makefile.inc Modified: head/usr.bin/mkcsmapper/Makefile.inc ============================================================================== --- head/usr.bin/mkcsmapper/Makefile.inc Wed Nov 14 18:49:03 2012 (r243034) +++ head/usr.bin/mkcsmapper/Makefile.inc Wed Nov 14 18:51:12 2012 (r243035) @@ -1,7 +1,11 @@ # $FreeBSD$ +.include + SRCS+= lex.l yacc.y CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../mkcsmapper \ -I${.CURDIR}/../../lib/libc/iconv \ - -I${.CURDIR}/../../lib/libiconv_modules/mapper_std \ - --param max-inline-insns-single=64 + -I${.CURDIR}/../../lib/libiconv_modules/mapper_std +.if ${COMPILER_TYPE} == "gcc" +CFLAGS+= --param max-inline-insns-single=64 +.endif From owner-svn-src-head@FreeBSD.ORG Wed Nov 14 18:52:37 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B605492B; Wed, 14 Nov 2012 18:52:37 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9AFB38FC14; Wed, 14 Nov 2012 18:52:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAEIqbbH029789; Wed, 14 Nov 2012 18:52:37 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAEIqbsl029788; Wed, 14 Nov 2012 18:52:37 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201211141852.qAEIqbsl029788@svn.freebsd.org> From: Dimitry Andric Date: Wed, 14 Nov 2012 18:52:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243036 - head/games/fortune/fortune X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 18:52:37 -0000 Author: dim Date: Wed Nov 14 18:52:37 2012 New Revision: 243036 URL: http://svnweb.freebsd.org/changeset/base/243036 Log: In games/fortune/fortune/fortune.c, make 'Debug' the correct type (it is *not* a boolean). MFC after: 3 days Modified: head/games/fortune/fortune/fortune.c Modified: head/games/fortune/fortune/fortune.c ============================================================================== --- head/games/fortune/fortune/fortune.c Wed Nov 14 18:51:12 2012 (r243035) +++ head/games/fortune/fortune/fortune.c Wed Nov 14 18:52:37 2012 (r243036) @@ -109,7 +109,7 @@ static bool Equal_probs = FALSE; /* scat static bool Match = FALSE; /* dump fortunes matching a pattern */ static bool WriteToDisk = false; /* use files on disk to save state */ #ifdef DEBUG -static bool Debug = FALSE; /* print debug messages */ +static int Debug = 0; /* print debug messages */ #endif static char *Fortbuf = NULL; /* fortune buffer for -m */ From owner-svn-src-head@FreeBSD.ORG Wed Nov 14 18:54:08 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A97B4BAE; Wed, 14 Nov 2012 18:54:08 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8E1108FC08; Wed, 14 Nov 2012 18:54:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAEIs8kr030062; Wed, 14 Nov 2012 18:54:08 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAEIs8kl030061; Wed, 14 Nov 2012 18:54:08 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201211141854.qAEIs8kl030061@svn.freebsd.org> From: Dimitry Andric Date: Wed, 14 Nov 2012 18:54:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243037 - head/sys/dev/aic7xxx/aicasm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 18:54:08 -0000 Author: dim Date: Wed Nov 14 18:54:08 2012 New Revision: 243037 URL: http://svnweb.freebsd.org/changeset/base/243037 Log: Fix a bug in aicasm_gram.y, noted by a newer clang 3.2 snapshot: it compared an enum scope_type against a yacc-generated define, so the condition would always be false. MFC after: 3 days Modified: head/sys/dev/aic7xxx/aicasm/aicasm_gram.y Modified: head/sys/dev/aic7xxx/aicasm/aicasm_gram.y ============================================================================== --- head/sys/dev/aic7xxx/aicasm/aicasm_gram.y Wed Nov 14 18:52:37 2012 (r243036) +++ head/sys/dev/aic7xxx/aicasm/aicasm_gram.y Wed Nov 14 18:54:08 2012 (r243037) @@ -1076,7 +1076,7 @@ conditional: last_scope = TAILQ_LAST(&scope_context->inner_scope, scope_tailq); if (last_scope == NULL - || last_scope->type == T_ELSE) { + || last_scope->type == SCOPE_ELSE) { stop("'else if' without leading 'if'", EX_DATAERR); /* NOTREACHED */ From owner-svn-src-head@FreeBSD.ORG Wed Nov 14 19:10:51 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 35BAE2DA; Wed, 14 Nov 2012 19:10:51 +0000 (UTC) (envelope-from davide@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id F42048FC13; Wed, 14 Nov 2012 19:10:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAEJAonm033372; Wed, 14 Nov 2012 19:10:50 GMT (envelope-from davide@svn.freebsd.org) Received: (from davide@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAEJAoMG033370; Wed, 14 Nov 2012 19:10:50 GMT (envelope-from davide@svn.freebsd.org) Message-Id: <201211141910.qAEJAoMG033370@svn.freebsd.org> From: Davide Italiano Date: Wed, 14 Nov 2012 19:10:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243038 - head/sys/fs/smbfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 19:10:51 -0000 Author: davide Date: Wed Nov 14 19:10:50 2012 New Revision: 243038 URL: http://svnweb.freebsd.org/changeset/base/243038 Log: Get rid of some old debug code. It provides checks similar to the one offered by RedZone so there's no need to keep it. Sponsored by: iXsystems inc. Modified: head/sys/fs/smbfs/smbfs_node.c head/sys/fs/smbfs/smbfs_vnops.c Modified: head/sys/fs/smbfs/smbfs_node.c ============================================================================== --- head/sys/fs/smbfs/smbfs_node.c Wed Nov 14 18:54:08 2012 (r243037) +++ head/sys/fs/smbfs/smbfs_node.c Wed Nov 14 19:10:50 2012 (r243038) @@ -70,18 +70,8 @@ smbfs_name_alloc(const u_char *name, int u_char *cp; nmlen++; -#ifdef SMBFS_NAME_DEBUG - cp = malloc(nmlen + 2 + sizeof(int), M_SMBNODENAME, M_WAITOK); - *(int*)cp = nmlen; - cp += sizeof(int); - cp[0] = 0xfc; - cp++; - bcopy(name, cp, nmlen - 1); - cp[nmlen] = 0xfe; -#else cp = malloc(nmlen, M_SMBNODENAME, M_WAITOK); bcopy(name, cp, nmlen - 1); -#endif cp[nmlen - 1] = 0; return cp; } @@ -89,26 +79,8 @@ smbfs_name_alloc(const u_char *name, int static void smbfs_name_free(u_char *name) { -#ifdef SMBFS_NAME_DEBUG - int nmlen, slen; - u_char *cp; - cp = name; - cp--; - if (*cp != 0xfc) - panic("First byte of name entry '%s' corrupted", name); - cp -= sizeof(int); - nmlen = *(int*)cp; - slen = strlen(name) + 1; - if (nmlen != slen) - panic("Name length mismatch: was %d, now %d name '%s'", - nmlen, slen, name); - if (name[nmlen] != 0xfe) - panic("Last byte of name entry '%s' corrupted\n", name); - free(cp, M_SMBNODENAME); -#else free(name, M_SMBNODENAME); -#endif } static int __inline Modified: head/sys/fs/smbfs/smbfs_vnops.c ============================================================================== --- head/sys/fs/smbfs/smbfs_vnops.c Wed Nov 14 18:54:08 2012 (r243037) +++ head/sys/fs/smbfs/smbfs_vnops.c Wed Nov 14 19:10:50 2012 (r243038) @@ -1135,18 +1135,6 @@ smbfs_lookup(ap) SMBFSERR("invalid '..'\n"); return EIO; } -#ifdef SMB_VNODE_DEBUG - { - char *cp, c; - - cp = name + nmlen; - c = *cp; - *cp = 0; - SMBVDEBUG("%d '%s' in '%s' id=d\n", nameiop, name, - VTOSMB(dvp)->n_name); - *cp = c; - } -#endif islastcn = flags & ISLASTCN; if (islastcn && (mp->mnt_flag & MNT_RDONLY) && (nameiop != LOOKUP)) return EROFS; From owner-svn-src-head@FreeBSD.ORG Wed Nov 14 19:27:52 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9913D6A2; Wed, 14 Nov 2012 19:27:52 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6D7448FC0C; Wed, 14 Nov 2012 19:27:51 +0000 (UTC) Received: by mail-bk0-f54.google.com with SMTP id jm19so452830bkc.13 for ; Wed, 14 Nov 2012 11:27:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=CHY+QVZdmTJNwlZl3jD7nxz3rm2CGGzydSCkmjvtUWM=; b=zu6eHDAyFjtsaB00J5CAglJ8VvGZFefUEUZFaooMdtLFvKKdhUh4jrUevymDvJ+3BQ reA06/OlC7HVfvrPeLVSkm2DwvkHOlNoI//1iGNdWnoWhT+5ws84p5ENLWk/8JEJMm7X BYfTr5cG8g37v2v3O/GmpPtAJLZ11Unmh7cCXSywupttCYyBPjYqwIv8nKPyt/JfM+wA wYLEAbDvcFrZDdVTvg1dR9glTStE+n9z0XNVlRQ/hden8dikDax3QGzDfxIIp0yqyVor iUe6J6MIoyYw174YiIobRB8/O1xsw7r0ZKcHD+NPPzaqAHgrdITSN2ewEGYQE2mW0m3E 97ww== MIME-Version: 1.0 Received: by 10.204.11.208 with SMTP id u16mr5370996bku.81.1352921270131; Wed, 14 Nov 2012 11:27:50 -0800 (PST) Received: by 10.204.50.197 with HTTP; Wed, 14 Nov 2012 11:27:49 -0800 (PST) Received: by 10.204.50.197 with HTTP; Wed, 14 Nov 2012 11:27:49 -0800 (PST) In-Reply-To: <20121114184837.GA73505@kib.kiev.ua> References: <201210252318.q9PNI6IQ069461@svn.freebsd.org> <20121114172823.GA20127@dragon.NUXI.org> <20121114184837.GA73505@kib.kiev.ua> Date: Wed, 14 Nov 2012 19:27:49 +0000 Message-ID: Subject: Re: svn commit: r242102 - in head: contrib/bmake usr.bin/bmake From: Chris Rees To: Konstantin Belousov Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: svn-src-head@freebsd.org, "Simon J. Gerraty" , svn-src-all@freebsd.org, src-committers@freebsd.org, "David E. O'Brien" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 19:27:52 -0000 On 14 Nov 2012 18:49, "Konstantin Belousov" wrote: > > On Wed, Nov 14, 2012 at 09:28:23AM -0800, David O'Brien wrote: > > On Thu, Oct 25, 2012 at 11:18:06PM +0000, Simon J. Gerraty wrote: > > > Log: > > > Merge bmake-20121010 > > > > Hi Simon, > > I was kicking the tires on this and noticed bmake is dynamically linked. > > > > Can you change it to being statically linked? > > > > > > This issue most recently came up in freebsd-current. See thread pieces > > http://lists.freebsd.org/pipermail/freebsd-current/2012-April/033460.html > > http://lists.freebsd.org/pipermail/freebsd-current/2012-April/033472.html > > http://lists.freebsd.org/pipermail/freebsd-current/2012-April/033473.html > > As you see, I prefer to not introduce new statically linked binaries into base. > If, for unfortunate turns of events, bmake is changed to be statically linked, > please obey WITH_SHARED_TOOLCHAIN. Or a /rescue/bmake for when speed is a concern would also be acceptable. Chris From owner-svn-src-head@FreeBSD.ORG Wed Nov 14 19:50:22 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3AF11CA0; Wed, 14 Nov 2012 19:50:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1DF138FC12; Wed, 14 Nov 2012 19:50:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAEJoLvW039487; Wed, 14 Nov 2012 19:50:21 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAEJoLaS039486; Wed, 14 Nov 2012 19:50:21 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201211141950.qAEJoLaS039486@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 14 Nov 2012 19:50:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243039 - head/sys/fs/devfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 19:50:22 -0000 Author: kib Date: Wed Nov 14 19:50:21 2012 New Revision: 243039 URL: http://svnweb.freebsd.org/changeset/base/243039 Log: Remove M_USE_RESERVE from the devfs cdp allocator, which is one of two uses of M_USE_RESERVE in the kernel. This allocation is not special. Reviewed by: alc Tested by: pho MFC after: 2 weeks Modified: head/sys/fs/devfs/devfs_devs.c Modified: head/sys/fs/devfs/devfs_devs.c ============================================================================== --- head/sys/fs/devfs/devfs_devs.c Wed Nov 14 19:10:50 2012 (r243038) +++ head/sys/fs/devfs/devfs_devs.c Wed Nov 14 19:50:21 2012 (r243039) @@ -121,7 +121,7 @@ devfs_alloc(int flags) struct cdev *cdev; struct timespec ts; - cdp = malloc(sizeof *cdp, M_CDEVP, M_USE_RESERVE | M_ZERO | + cdp = malloc(sizeof *cdp, M_CDEVP, M_ZERO | ((flags & MAKEDEV_NOWAIT) ? M_NOWAIT : M_WAITOK)); if (cdp == NULL) return (NULL); From owner-svn-src-head@FreeBSD.ORG Wed Nov 14 20:01:41 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0148593; Wed, 14 Nov 2012 20:01:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id DA3698FC17; Wed, 14 Nov 2012 20:01:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAEK1eUb041354; Wed, 14 Nov 2012 20:01:40 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAEK1eNg041343; Wed, 14 Nov 2012 20:01:40 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201211142001.qAEK1eNg041343@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 14 Nov 2012 20:01:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243040 - in head/sys: amd64/amd64 arm/arm ia64/ia64 mips/mips powerpc/aim sparc64/sparc64 vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 20:01:41 -0000 Author: kib Date: Wed Nov 14 20:01:40 2012 New Revision: 243040 URL: http://svnweb.freebsd.org/changeset/base/243040 Log: Flip the semantic of M_NOWAIT to only require the allocation to not sleep, and perform the page allocations with VM_ALLOC_SYSTEM class. Previously, the allocation was also allowed to completely drain the reserve of the free pages, being translated to VM_ALLOC_INTERRUPT request class for vm_page_alloc() and similar functions. Allow the caller of malloc* to request the 'deep drain' semantic by providing M_USE_RESERVE flag, now translated to VM_ALLOC_INTERRUPT class. Previously, it resulted in less aggressive VM_ALLOC_SYSTEM allocation class. Centralize the translation of the M_* malloc(9) flags in the single inline function malloc2vm_flags(). Discussion started by: "Sears, Steven" Reviewed by: alc, mdf (previous version) Tested by: pho (previous version) MFC after: 2 weeks Modified: head/sys/amd64/amd64/uma_machdep.c head/sys/arm/arm/vm_machdep.c head/sys/ia64/ia64/uma_machdep.c head/sys/mips/mips/uma_machdep.c head/sys/powerpc/aim/mmu_oea64.c head/sys/powerpc/aim/slb.c head/sys/powerpc/aim/uma_machdep.c head/sys/sparc64/sparc64/vm_machdep.c head/sys/vm/vm_kern.c head/sys/vm/vm_page.h Modified: head/sys/amd64/amd64/uma_machdep.c ============================================================================== --- head/sys/amd64/amd64/uma_machdep.c Wed Nov 14 19:50:21 2012 (r243039) +++ head/sys/amd64/amd64/uma_machdep.c Wed Nov 14 20:01:40 2012 (r243040) @@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -48,12 +49,7 @@ uma_small_alloc(uma_zone_t zone, int byt int pflags; *flags = UMA_SLAB_PRIV; - if ((wait & (M_NOWAIT|M_USE_RESERVE)) == M_NOWAIT) - pflags = VM_ALLOC_INTERRUPT | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED; - else - pflags = VM_ALLOC_SYSTEM | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED; - if (wait & M_ZERO) - pflags |= VM_ALLOC_ZERO; + pflags = malloc2vm_flags(wait) | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED; for (;;) { m = vm_page_alloc(NULL, 0, pflags); if (m == NULL) { Modified: head/sys/arm/arm/vm_machdep.c ============================================================================== --- head/sys/arm/arm/vm_machdep.c Wed Nov 14 19:50:21 2012 (r243039) +++ head/sys/arm/arm/vm_machdep.c Wed Nov 14 20:01:40 2012 (r243040) @@ -651,12 +651,7 @@ uma_small_alloc(uma_zone_t zone, int byt ret = ((void *)kmem_malloc(kmem_map, bytes, M_NOWAIT)); return (ret); } - if ((wait & (M_NOWAIT|M_USE_RESERVE)) == M_NOWAIT) - pflags = VM_ALLOC_INTERRUPT | VM_ALLOC_WIRED; - else - pflags = VM_ALLOC_SYSTEM | VM_ALLOC_WIRED; - if (wait & M_ZERO) - pflags |= VM_ALLOC_ZERO; + pflags = malloc2vm_flags(wait) | VM_ALLOC_WIRED; for (;;) { m = vm_page_alloc(NULL, 0, pflags | VM_ALLOC_NOOBJ); if (m == NULL) { Modified: head/sys/ia64/ia64/uma_machdep.c ============================================================================== --- head/sys/ia64/ia64/uma_machdep.c Wed Nov 14 19:50:21 2012 (r243039) +++ head/sys/ia64/ia64/uma_machdep.c Wed Nov 14 20:01:40 2012 (r243040) @@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -46,12 +47,7 @@ uma_small_alloc(uma_zone_t zone, int byt int pflags; *flags = UMA_SLAB_PRIV; - if ((wait & (M_NOWAIT|M_USE_RESERVE)) == M_NOWAIT) - pflags = VM_ALLOC_INTERRUPT | VM_ALLOC_WIRED; - else - pflags = VM_ALLOC_SYSTEM | VM_ALLOC_WIRED; - if (wait & M_ZERO) - pflags |= VM_ALLOC_ZERO; + pflags = malloc2vm_flags(wait) | VM_ALLOC_WIRED; for (;;) { m = vm_page_alloc(NULL, 0, pflags | VM_ALLOC_NOOBJ); Modified: head/sys/mips/mips/uma_machdep.c ============================================================================== --- head/sys/mips/mips/uma_machdep.c Wed Nov 14 19:50:21 2012 (r243039) +++ head/sys/mips/mips/uma_machdep.c Wed Nov 14 20:01:40 2012 (r243040) @@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -48,13 +49,7 @@ uma_small_alloc(uma_zone_t zone, int byt void *va; *flags = UMA_SLAB_PRIV; - - if ((wait & (M_NOWAIT|M_USE_RESERVE)) == M_NOWAIT) - pflags = VM_ALLOC_INTERRUPT | VM_ALLOC_WIRED; - else - pflags = VM_ALLOC_SYSTEM | VM_ALLOC_WIRED; - if (wait & M_ZERO) - pflags |= VM_ALLOC_ZERO; + pflags = malloc2vm_flags(wait) | VM_ALLOC_WIRED; for (;;) { m = vm_page_alloc_freelist(VM_FREELIST_DIRECT, pflags); Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Wed Nov 14 19:50:21 2012 (r243039) +++ head/sys/powerpc/aim/mmu_oea64.c Wed Nov 14 20:01:40 2012 (r243040) @@ -119,6 +119,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -1368,13 +1369,7 @@ moea64_uma_page_alloc(uma_zone_t zone, i *flags = UMA_SLAB_PRIV; needed_lock = !PMAP_LOCKED(kernel_pmap); - - if ((wait & (M_NOWAIT|M_USE_RESERVE)) == M_NOWAIT) - pflags = VM_ALLOC_INTERRUPT | VM_ALLOC_WIRED; - else - pflags = VM_ALLOC_SYSTEM | VM_ALLOC_WIRED; - if (wait & M_ZERO) - pflags |= VM_ALLOC_ZERO; + pflags = malloc2vm_flags(wait) | VM_ALLOC_WIRED; for (;;) { m = vm_page_alloc(NULL, 0, pflags | VM_ALLOC_NOOBJ); Modified: head/sys/powerpc/aim/slb.c ============================================================================== --- head/sys/powerpc/aim/slb.c Wed Nov 14 19:50:21 2012 (r243039) +++ head/sys/powerpc/aim/slb.c Wed Nov 14 20:01:40 2012 (r243040) @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -483,12 +484,7 @@ slb_uma_real_alloc(uma_zone_t zone, int realmax = platform_real_maxaddr(); *flags = UMA_SLAB_PRIV; - if ((wait & (M_NOWAIT | M_USE_RESERVE)) == M_NOWAIT) - pflags = VM_ALLOC_INTERRUPT | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED; - else - pflags = VM_ALLOC_SYSTEM | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED; - if (wait & M_ZERO) - pflags |= VM_ALLOC_ZERO; + pflags = malloc2vm_flags(wait) | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED; for (;;) { m = vm_page_alloc_contig(NULL, 0, pflags, 1, 0, realmax, Modified: head/sys/powerpc/aim/uma_machdep.c ============================================================================== --- head/sys/powerpc/aim/uma_machdep.c Wed Nov 14 19:50:21 2012 (r243039) +++ head/sys/powerpc/aim/uma_machdep.c Wed Nov 14 20:01:40 2012 (r243040) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -56,12 +57,7 @@ uma_small_alloc(uma_zone_t zone, int byt int pflags; *flags = UMA_SLAB_PRIV; - if ((wait & (M_NOWAIT|M_USE_RESERVE)) == M_NOWAIT) - pflags = VM_ALLOC_INTERRUPT | VM_ALLOC_WIRED; - else - pflags = VM_ALLOC_SYSTEM | VM_ALLOC_WIRED; - if (wait & M_ZERO) - pflags |= VM_ALLOC_ZERO; + pflags = malloc2vm_flags(wait) | VM_ALLOC_WIRED; for (;;) { m = vm_page_alloc(NULL, 0, pflags | VM_ALLOC_NOOBJ); Modified: head/sys/sparc64/sparc64/vm_machdep.c ============================================================================== --- head/sys/sparc64/sparc64/vm_machdep.c Wed Nov 14 19:50:21 2012 (r243039) +++ head/sys/sparc64/sparc64/vm_machdep.c Wed Nov 14 20:01:40 2012 (r243040) @@ -501,14 +501,7 @@ uma_small_alloc(uma_zone_t zone, int byt PMAP_STATS_INC(uma_nsmall_alloc); *flags = UMA_SLAB_PRIV; - - if ((wait & (M_NOWAIT|M_USE_RESERVE)) == M_NOWAIT) - pflags = VM_ALLOC_INTERRUPT | VM_ALLOC_WIRED; - else - pflags = VM_ALLOC_SYSTEM | VM_ALLOC_WIRED; - - if (wait & M_ZERO) - pflags |= VM_ALLOC_ZERO; + pflags = malloc2vm_flags(wait) | VM_ALLOC_WIRED; for (;;) { m = vm_page_alloc(NULL, 0, pflags | VM_ALLOC_NOOBJ); Modified: head/sys/vm/vm_kern.c ============================================================================== --- head/sys/vm/vm_kern.c Wed Nov 14 19:50:21 2012 (r243039) +++ head/sys/vm/vm_kern.c Wed Nov 14 20:01:40 2012 (r243040) @@ -222,12 +222,7 @@ kmem_alloc_attr(vm_map_t map, vm_size_t vm_object_reference(object); vm_map_insert(map, object, offset, addr, addr + size, VM_PROT_ALL, VM_PROT_ALL, 0); - if ((flags & (M_NOWAIT | M_USE_RESERVE)) == M_NOWAIT) - pflags = VM_ALLOC_INTERRUPT | VM_ALLOC_NOBUSY; - else - pflags = VM_ALLOC_SYSTEM | VM_ALLOC_NOBUSY; - if (flags & M_ZERO) - pflags |= VM_ALLOC_ZERO; + pflags = malloc2vm_flags(flags) | VM_ALLOC_NOBUSY; VM_OBJECT_LOCK(object); end_offset = offset + size; for (; offset < end_offset; offset += PAGE_SIZE) { @@ -296,14 +291,7 @@ kmem_alloc_contig(vm_map_t map, vm_size_ vm_object_reference(object); vm_map_insert(map, object, offset, addr, addr + size, VM_PROT_ALL, VM_PROT_ALL, 0); - if ((flags & (M_NOWAIT | M_USE_RESERVE)) == M_NOWAIT) - pflags = VM_ALLOC_INTERRUPT | VM_ALLOC_NOBUSY; - else - pflags = VM_ALLOC_SYSTEM | VM_ALLOC_NOBUSY; - if (flags & M_ZERO) - pflags |= VM_ALLOC_ZERO; - if (flags & M_NODUMP) - pflags |= VM_ALLOC_NODUMP; + pflags = malloc2vm_flags(flags) | VM_ALLOC_NOBUSY; VM_OBJECT_LOCK(object); tries = 0; retry: @@ -487,15 +475,7 @@ kmem_back(vm_map_t map, vm_offset_t addr entry->wired_count == 0 && (entry->eflags & MAP_ENTRY_IN_TRANSITION) == 0, ("kmem_back: entry not found or misaligned")); - if ((flags & (M_NOWAIT|M_USE_RESERVE)) == M_NOWAIT) - pflags = VM_ALLOC_INTERRUPT | VM_ALLOC_WIRED; - else - pflags = VM_ALLOC_SYSTEM | VM_ALLOC_WIRED; - - if (flags & M_ZERO) - pflags |= VM_ALLOC_ZERO; - if (flags & M_NODUMP) - pflags |= VM_ALLOC_NODUMP; + pflags = malloc2vm_flags(flags) | VM_ALLOC_WIRED; VM_OBJECT_LOCK(kmem_object); for (i = 0; i < size; i += PAGE_SIZE) { Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Wed Nov 14 19:50:21 2012 (r243039) +++ head/sys/vm/vm_page.h Wed Nov 14 20:01:40 2012 (r243040) @@ -347,6 +347,22 @@ vm_page_t PHYS_TO_VM_PAGE(vm_paddr_t pa) #define VM_ALLOC_COUNT_SHIFT 16 #define VM_ALLOC_COUNT(count) ((count) << VM_ALLOC_COUNT_SHIFT) +#ifdef M_NOWAIT +static inline int +malloc2vm_flags(int malloc_flags) +{ + int pflags; + + pflags = (malloc_flags & M_USE_RESERVE) != 0 ? VM_ALLOC_INTERRUPT : + VM_ALLOC_SYSTEM; + if ((malloc_flags & M_ZERO) != 0) + pflags |= VM_ALLOC_ZERO; + if ((malloc_flags & M_NODUMP) != 0) + pflags |= VM_ALLOC_NODUMP; + return (pflags); +} +#endif + void vm_page_busy(vm_page_t m); void vm_page_flash(vm_page_t m); void vm_page_io_start(vm_page_t m); From owner-svn-src-head@FreeBSD.ORG Wed Nov 14 21:39:59 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0394D5CA; Wed, 14 Nov 2012 21:39:59 +0000 (UTC) (envelope-from minimarmot@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 39AD18FC08; Wed, 14 Nov 2012 21:39:58 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id wz12so721341pbc.13 for ; Wed, 14 Nov 2012 13:39:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=QPcdpYY4ZvWj6dbYs2+vKEgOZHzXZaTZNFLBsbxAI+U=; b=YDM2bIfSlbChvtnUCps0FOEeWzUH0yLL2ItRTmnsQg2DEMlUreHpH3p3D7tgaX8ZA1 6afCFpXMpfUVYDqN41bkPv/2GyWjVqghbrNVE1j5fkIzRkf96wtSNWieqUv6KgyMqa41 4d+gWNS502CKm2RU1FhjeCb2HCAi9MFTNw9mKuFBmBCwUKR1/Y2qQh3MCbJjeRlBIHZL 4BX6IFe4Oepb98wMdDpVbJ5MGVDACl3DDXvwkPa2yN2Wu6vek/smRUxH17oUW+/t6RlP PWgCyNikIZeUvNY31eBTwYtEpCeASg6X5EYrsBIYGkdX4rd54IizvfoVIF/IDPBnZJ9M jbtQ== MIME-Version: 1.0 Received: by 10.68.238.34 with SMTP id vh2mr82885595pbc.6.1352929192777; Wed, 14 Nov 2012 13:39:52 -0800 (PST) Received: by 10.66.148.227 with HTTP; Wed, 14 Nov 2012 13:39:52 -0800 (PST) In-Reply-To: References: <201211140805.qAE85MHU031099@svn.freebsd.org> <50A364AE.6060205@freebsd.org> <20121114093236.GJ28213@FreeBSD.org> Date: Wed, 14 Nov 2012 16:39:52 -0500 Message-ID: Subject: Re: svn commit: r243019 - head/sbin/route From: Ben Kaduk To: Eitan Adler Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 21:39:59 -0000 On Wed, Nov 14, 2012 at 11:27 AM, Eitan Adler wrote: > On 14 November 2012 11:12, Ben Kaduk wrote: >> Andre, they are used (for better or for worse) in a multi-site >> database synchronization protocol that currently works portably across >> operating systems. Removing them would change the semantics of that >> protocol in a subtle way that might introduce breakage. > > Which one? OpenAFS. In particular, the logic to determine the sychronization site for the ubik databases uses classful addressing. -Ben From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 00:51:58 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 13D35363; Thu, 15 Nov 2012 00:51:58 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E4E9D8FC0C; Thu, 15 Nov 2012 00:51:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAF0pva2081849; Thu, 15 Nov 2012 00:51:57 GMT (envelope-from jeff@svn.freebsd.org) Received: (from jeff@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAF0pv4g081839; Thu, 15 Nov 2012 00:51:57 GMT (envelope-from jeff@svn.freebsd.org) Message-Id: <201211150051.qAF0pv4g081839@svn.freebsd.org> From: Jeff Roberson Date: Thu, 15 Nov 2012 00:51:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243046 - in head: sys/kern sys/sparc64/include sys/sys usr.bin/ktrdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 00:51:58 -0000 Author: jeff Date: Thu Nov 15 00:51:57 2012 New Revision: 243046 URL: http://svnweb.freebsd.org/changeset/base/243046 Log: - Implement run-time expansion of the KTR buffer via sysctl. - Implement a function to ensure that all preempted threads have switched back out at least once. Use this to make sure there are no stale references to the old ktr_buf or the lock profiling buffers before updating them. Reviewed by: marius (sparc64 parts), attilio (earlier patch) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/kern/kern_ktr.c head/sys/kern/subr_lock.c head/sys/kern/subr_smp.c head/sys/sparc64/include/ktr.h head/sys/sys/ktr.h head/sys/sys/smp.h head/usr.bin/ktrdump/ktrdump.c Modified: head/sys/kern/kern_ktr.c ============================================================================== --- head/sys/kern/kern_ktr.c Wed Nov 14 22:21:03 2012 (r243045) +++ head/sys/kern/kern_ktr.c Thu Nov 15 00:51:57 2012 (r243046) @@ -47,7 +47,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include +#include #include +#include #include #include #include @@ -66,6 +70,9 @@ __FBSDID("$FreeBSD$"); #define KTR_ENTRIES 1024 #endif +/* Limit the allocations to something manageable. */ +#define KTR_ENTRIES_MAX (8 * 1024 * 1024) + #ifndef KTR_MASK #define KTR_MASK (0) #endif @@ -82,30 +89,31 @@ __FBSDID("$FreeBSD$"); #define KTR_CPU PCPU_GET(cpuid) #endif -FEATURE(ktr, "Kernel support for KTR kernel tracing facility"); +static MALLOC_DEFINE(M_KTR, "KTR", "KTR"); -static SYSCTL_NODE(_debug, OID_AUTO, ktr, CTLFLAG_RD, 0, "KTR options"); +FEATURE(ktr, "Kernel support for KTR kernel tracing facility"); +volatile int ktr_idx = 0; int ktr_mask = KTR_MASK; +int ktr_compile = KTR_COMPILE; +int ktr_entries = KTR_ENTRIES; +int ktr_version = KTR_VERSION; +struct ktr_entry ktr_buf_init[KTR_ENTRIES]; +struct ktr_entry *ktr_buf = ktr_buf_init; +cpuset_t ktr_cpumask = CPUSET_T_INITIALIZER(KTR_CPUMASK); +static char ktr_cpumask_str[CPUSETBUFSIZ]; + TUNABLE_INT("debug.ktr.mask", &ktr_mask); -SYSCTL_INT(_debug_ktr, OID_AUTO, mask, CTLFLAG_RW, - &ktr_mask, 0, "Bitmask of KTR event classes for which logging is enabled"); -int ktr_compile = KTR_COMPILE; -SYSCTL_INT(_debug_ktr, OID_AUTO, compile, CTLFLAG_RD, - &ktr_compile, 0, "Bitmask of KTR event classes compiled into the kernel"); +TUNABLE_STR("debug.ktr.cpumask", ktr_cpumask_str, sizeof(ktr_cpumask_str)); -int ktr_entries = KTR_ENTRIES; -SYSCTL_INT(_debug_ktr, OID_AUTO, entries, CTLFLAG_RD, - &ktr_entries, 0, "Number of entries in the KTR buffer"); +static SYSCTL_NODE(_debug, OID_AUTO, ktr, CTLFLAG_RD, 0, "KTR options"); -int ktr_version = KTR_VERSION; SYSCTL_INT(_debug_ktr, OID_AUTO, version, CTLFLAG_RD, &ktr_version, 0, "Version of the KTR interface"); -cpuset_t ktr_cpumask = CPUSET_T_INITIALIZER(KTR_CPUMASK); -static char ktr_cpumask_str[CPUSETBUFSIZ]; -TUNABLE_STR("debug.ktr.cpumask", ktr_cpumask_str, sizeof(ktr_cpumask_str)); +SYSCTL_INT(_debug_ktr, OID_AUTO, compile, CTLFLAG_RD, + &ktr_compile, 0, "Bitmask of KTR event classes compiled into the kernel"); static void ktr_cpumask_initializer(void *dummy __unused) @@ -145,9 +153,6 @@ SYSCTL_PROC(_debug_ktr, OID_AUTO, cpumas sysctl_debug_ktr_cpumask, "S", "Bitmask of CPUs on which KTR logging is enabled"); -volatile int ktr_idx = 0; -struct ktr_entry ktr_buf[KTR_ENTRIES]; - static int sysctl_debug_ktr_clear(SYSCTL_HANDLER_ARGS) { @@ -159,7 +164,7 @@ sysctl_debug_ktr_clear(SYSCTL_HANDLER_AR return (error); if (clear) { - bzero(ktr_buf, sizeof(ktr_buf)); + bzero(ktr_buf, sizeof(*ktr_buf) * ktr_entries); ktr_idx = 0; } @@ -168,6 +173,67 @@ sysctl_debug_ktr_clear(SYSCTL_HANDLER_AR SYSCTL_PROC(_debug_ktr, OID_AUTO, clear, CTLTYPE_INT|CTLFLAG_RW, 0, 0, sysctl_debug_ktr_clear, "I", "Clear KTR Buffer"); +/* + * This is a sysctl proc so that it is serialized as !MPSAFE along with + * the other ktr sysctl procs. + */ +static int +sysctl_debug_ktr_mask(SYSCTL_HANDLER_ARGS) +{ + int mask, error; + + mask = ktr_mask; + error = sysctl_handle_int(oidp, &mask, 0, req); + if (error || !req->newptr) + return (error); + ktr_mask = mask; + return (error); +} + +SYSCTL_PROC(_debug_ktr, OID_AUTO, mask, CTLTYPE_INT|CTLFLAG_RW, 0, 0, + sysctl_debug_ktr_mask, "I", + "Bitmask of KTR event classes for which logging is enabled"); + +static int +sysctl_debug_ktr_entries(SYSCTL_HANDLER_ARGS) +{ + int entries, error, mask; + struct ktr_entry *buf, *oldbuf; + + entries = ktr_entries; + error = sysctl_handle_int(oidp, &entries, 0, req); + if (error || !req->newptr) + return (error); + if (entries > KTR_ENTRIES_MAX) + return (ERANGE); + /* Disable ktr temporarily. */ + mask = ktr_mask; + atomic_store_rel_int(&ktr_mask, 0); + /* Wait for threads to go idle. */ + if ((error = quiesce_all_cpus("ktrent", PCATCH)) != 0) { + ktr_mask = mask; + return (error); + } + if (ktr_buf != ktr_buf_init) + oldbuf = ktr_buf; + else + oldbuf = NULL; + /* Allocate a new buffer. */ + buf = malloc(sizeof(*buf) * entries, M_KTR, M_WAITOK | M_ZERO); + /* Install the new buffer and restart ktr. */ + ktr_buf = buf; + ktr_entries = entries; + ktr_idx = 0; + atomic_store_rel_int(&ktr_mask, mask); + if (oldbuf != NULL) + free(oldbuf, M_KTR); + + return (error); +} + +SYSCTL_PROC(_debug_ktr, OID_AUTO, entries, CTLTYPE_INT|CTLFLAG_RW, 0, 0, + sysctl_debug_ktr_entries, "I", "Number of entries in the KTR buffer"); + #ifdef KTR_VERBOSE int ktr_verbose = KTR_VERBOSE; TUNABLE_INT("debug.ktr.verbose", &ktr_verbose); @@ -249,7 +315,7 @@ ktr_tracepoint(u_int mask, const char *f if (panicstr) return; - if ((ktr_mask & mask) == 0) + if ((ktr_mask & mask) == 0 || ktr_buf == NULL) return; cpu = KTR_CPU; if (!CPU_ISSET(cpu, &ktr_cpumask)) @@ -281,7 +347,7 @@ ktr_tracepoint(u_int mask, const char *f { do { saveindex = ktr_idx; - newindex = (saveindex + 1) % KTR_ENTRIES; + newindex = (saveindex + 1) % ktr_entries; } while (atomic_cmpset_rel_int(&ktr_idx, saveindex, newindex) == 0); entry = &ktr_buf[saveindex]; } @@ -336,7 +402,7 @@ static int db_mach_vtrace(void); DB_SHOW_COMMAND(ktr, db_ktr_all) { - tstate.cur = (ktr_idx - 1) % KTR_ENTRIES; + tstate.cur = (ktr_idx - 1) % ktr_entries; tstate.first = -1; db_ktr_verbose = 0; db_ktr_verbose |= (strchr(modif, 'v') != NULL) ? 2 : 0; @@ -358,7 +424,7 @@ db_mach_vtrace(void) { struct ktr_entry *kp; - if (tstate.cur == tstate.first) { + if (tstate.cur == tstate.first || ktr_buf == NULL) { db_printf("--- End of trace buffer ---\n"); return (0); } @@ -390,7 +456,7 @@ db_mach_vtrace(void) tstate.first = tstate.cur; if (--tstate.cur < 0) - tstate.cur = KTR_ENTRIES - 1; + tstate.cur = ktr_entries - 1; return (1); } Modified: head/sys/kern/subr_lock.c ============================================================================== --- head/sys/kern/subr_lock.c Wed Nov 14 22:21:03 2012 (r243045) +++ head/sys/kern/subr_lock.c Thu Nov 15 00:51:57 2012 (r243046) @@ -240,34 +240,13 @@ lock_prof_init(void *arg) } SYSINIT(lockprof, SI_SUB_SMP, SI_ORDER_ANY, lock_prof_init, NULL); -/* - * To be certain that lock profiling has idled on all cpus before we - * reset, we schedule the resetting thread on all active cpus. Since - * all operations happen within critical sections we can be sure that - * it is safe to zero the profiling structures. - */ -static void -lock_prof_idle(void) -{ - struct thread *td; - int cpu; - - td = curthread; - thread_lock(td); - CPU_FOREACH(cpu) { - sched_bind(td, cpu); - } - sched_unbind(td); - thread_unlock(td); -} - static void lock_prof_reset_wait(void) { /* - * Spin relinquishing our cpu so that lock_prof_idle may - * run on it. + * Spin relinquishing our cpu so that quiesce_all_cpus may + * complete. */ while (lock_prof_resetting) sched_relinquish(curthread); @@ -289,7 +268,7 @@ lock_prof_reset(void) atomic_store_rel_int(&lock_prof_resetting, 1); enabled = lock_prof_enable; lock_prof_enable = 0; - lock_prof_idle(); + quiesce_all_cpus("profreset", 0); /* * Some objects may have migrated between CPUs. Clear all links * before we zero the structures. Some items may still be linked @@ -401,7 +380,7 @@ dump_lock_prof_stats(SYSCTL_HANDLER_ARGS "max", "wait_max", "total", "wait_total", "count", "avg", "wait_avg", "cnt_hold", "cnt_lock", "name"); enabled = lock_prof_enable; lock_prof_enable = 0; - lock_prof_idle(); + quiesce_all_cpus("profstat", 0); t = ticks; for (cpu = 0; cpu <= mp_maxid; cpu++) { if (lp_cpu[cpu] == NULL) Modified: head/sys/kern/subr_smp.c ============================================================================== --- head/sys/kern/subr_smp.c Wed Nov 14 22:21:03 2012 (r243045) +++ head/sys/kern/subr_smp.c Thu Nov 15 00:51:57 2012 (r243046) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -734,3 +735,52 @@ smp_no_rendevous_barrier(void *dummy) KASSERT((!smp_started),("smp_no_rendevous called and smp is started")); #endif } + +/* + * Wait specified idle threads to switch once. This ensures that even + * preempted threads have cycled through the switch function once, + * exiting their codepaths. This allows us to change global pointers + * with no other synchronization. + */ +int +quiesce_cpus(cpuset_t map, const char *wmesg, int prio) +{ + struct pcpu *pcpu; + u_int gen[MAXCPU]; + int error; + int cpu; + + error = 0; + for (cpu = 0; cpu <= mp_maxid; cpu++) { + if (!CPU_ISSET(cpu, &map) || CPU_ABSENT(cpu)) + continue; + pcpu = pcpu_find(cpu); + gen[cpu] = pcpu->pc_idlethread->td_generation; + } + for (cpu = 0; cpu <= mp_maxid; cpu++) { + if (!CPU_ISSET(cpu, &map) || CPU_ABSENT(cpu)) + continue; + pcpu = pcpu_find(cpu); + thread_lock(curthread); + sched_bind(curthread, cpu); + thread_unlock(curthread); + while (gen[cpu] == pcpu->pc_idlethread->td_generation) { + error = tsleep(quiesce_cpus, prio, wmesg, 1); + if (error) + goto out; + } + } +out: + thread_lock(curthread); + sched_unbind(curthread); + thread_unlock(curthread); + + return (error); +} + +int +quiesce_all_cpus(const char *wmesg, int prio) +{ + + return quiesce_cpus(all_cpus, wmesg, prio); +} Modified: head/sys/sparc64/include/ktr.h ============================================================================== --- head/sys/sparc64/include/ktr.h Wed Nov 14 22:21:03 2012 (r243045) +++ head/sys/sparc64/include/ktr.h Thu Nov 15 00:51:57 2012 (r243046) @@ -58,6 +58,7 @@ l2: add r2, 1, r3 ; \ bne %icc, l2 ## b ; \ mov r3, r2 ; \ SET(ktr_buf, r3, r1) ; \ + ldx [r1], r1 ; \ mulx r2, KTR_SIZEOF, r2 ; \ add r1, r2, r1 ; \ rd %tick, r2 ; \ Modified: head/sys/sys/ktr.h ============================================================================== --- head/sys/sys/ktr.h Wed Nov 14 22:21:03 2012 (r243045) +++ head/sys/sys/ktr.h Thu Nov 15 00:51:57 2012 (r243046) @@ -116,7 +116,7 @@ extern int ktr_entries; extern int ktr_verbose; extern volatile int ktr_idx; -extern struct ktr_entry ktr_buf[]; +extern struct ktr_entry *ktr_buf; #ifdef KTR Modified: head/sys/sys/smp.h ============================================================================== --- head/sys/sys/smp.h Wed Nov 14 22:21:03 2012 (r243045) +++ head/sys/sys/smp.h Thu Nov 15 00:51:57 2012 (r243046) @@ -167,10 +167,14 @@ int stop_cpus_hard(cpuset_t); #if defined(__amd64__) || defined(__i386__) int suspend_cpus(cpuset_t); #endif + void smp_rendezvous_action(void); extern struct mtx smp_ipi_mtx; #endif /* SMP */ + +int quiesce_all_cpus(const char *, int); +int quiesce_cpus(cpuset_t, const char *, int); void smp_no_rendevous_barrier(void *); void smp_rendezvous(void (*)(void *), void (*)(void *), Modified: head/usr.bin/ktrdump/ktrdump.c ============================================================================== --- head/usr.bin/ktrdump/ktrdump.c Wed Nov 14 22:21:03 2012 (r243045) +++ head/usr.bin/ktrdump/ktrdump.c Thu Nov 15 00:51:57 2012 (r243046) @@ -86,6 +86,7 @@ main(int ac, char **av) u_long parms[KTR_PARMS]; struct ktr_entry *buf; uintmax_t tlast, tnow; + unsigned long bufptr; struct stat sb; kvm_t *kd; FILE *out; @@ -179,8 +180,9 @@ main(int ac, char **av) if ((buf = malloc(sizeof(*buf) * entries)) == NULL) err(1, NULL); if (kvm_read(kd, nl[2].n_value, &index, sizeof(index)) == -1 || - kvm_read(kd, nl[3].n_value, buf, sizeof(*buf) * entries) - == -1) + kvm_read(kd, nl[3].n_value, &bufptr, + sizeof(bufptr)) == -1 || + kvm_read(kd, bufptr, buf, sizeof(*buf) * entries) == -1) errx(1, "%s", kvm_geterr(kd)); } From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 03:00:49 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 896B85A2; Thu, 15 Nov 2012 03:00:49 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6BC008FC18; Thu, 15 Nov 2012 03:00:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAF30nlx001744; Thu, 15 Nov 2012 03:00:49 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAF30nmY001743; Thu, 15 Nov 2012 03:00:49 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201211150300.qAF30nmY001743@svn.freebsd.org> From: Adrian Chadd Date: Thu, 15 Nov 2012 03:00:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243047 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 03:00:49 -0000 Author: adrian Date: Thu Nov 15 03:00:49 2012 New Revision: 243047 URL: http://svnweb.freebsd.org/changeset/base/243047 Log: Make sure the final descriptor in an aggregate has rate control information. This was broken by me when merging the 802.11n aggregate descriptor chain setup with the default descriptor chain setup, in preparation for supporting AR9380 NICs. The corner case here is quite specific - if you queue an aggregate frame with >1 frames in it, and the last subframe has only one descriptor making it up, then that descriptor won't have the rate control information copied into it. Look at what happens inside ar5416FillTxDesc() if both firstSeg and lastSeg are set to 1. Then when ar5416ProcTxDesc() goes to fill out ts_rate based on the transmit index, it looks at the rate control fields in that descriptor and dutifully sets it to be 0. It doesn't happen for non-aggregate frames - if they have one descriptor, the first descriptor already has rate control info. I removed the call to ath_hal_setuplasttxdesc() when I migrated the code to use the "new" style aggregate chain routines from the HAL. But I missed this particular corner case. This is a bit inefficient with MIPS boards as it involves a few redundant writes into non-cachable memory. I'll chase that up when it matters. Tested: * AR9280 STA mode, TCP iperf traffic * Rui Paulo first reported this and has verified it on his AR9160 based AP. PR: kern/173636 Modified: head/sys/dev/ath/if_ath_tx.c Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Thu Nov 15 00:51:57 2012 (r243046) +++ head/sys/dev/ath/if_ath_tx.c Thu Nov 15 03:00:49 2012 (r243047) @@ -623,6 +623,31 @@ ath_tx_setds_11n(struct ath_softc *sc, s */ bf_first->bf_last = bf_prev; + /* + * For non-AR9300 NICs, which require the rate control + * in the final descriptor - let's set that up now. + * + * This is because the filltxdesc() HAL call doesn't + * populate the last segment with rate control information + * if firstSeg is also true. For non-aggregate frames + * that is fine, as the first frame already has rate control + * info. But if the last frame in an aggregate has one + * descriptor, both firstseg and lastseg will be true and + * the rate info isn't copied. + * + * This is inefficient on MIPS/ARM platforms that have + * non-cachable memory for TX descriptors, but we'll just + * make do for now. + * + * As to why the rate table is stashed in the last descriptor + * rather than the first descriptor? Because proctxdesc() + * is called on the final descriptor in an MPDU or A-MPDU - + * ie, the one that gets updated by the hardware upon + * completion. That way proctxdesc() doesn't need to know + * about the first _and_ last TX descriptor. + */ + ath_hal_setuplasttxdesc(sc->sc_ah, bf_prev->bf_lastds, ds0); + DPRINTF(sc, ATH_DEBUG_SW_TX_AGGR, "%s: end\n", __func__); } From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 03:22:51 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 83CE991A; Thu, 15 Nov 2012 03:22:51 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 68D688FC0C; Thu, 15 Nov 2012 03:22:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAF3MpoY005620; Thu, 15 Nov 2012 03:22:51 GMT (envelope-from jmg@svn.freebsd.org) Received: (from jmg@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAF3Mo9G005617; Thu, 15 Nov 2012 03:22:50 GMT (envelope-from jmg@svn.freebsd.org) Message-Id: <201211150322.qAF3Mo9G005617@svn.freebsd.org> From: John-Mark Gurney Date: Thu, 15 Nov 2012 03:22:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243048 - head/games/fortune/datfiles X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 03:22:51 -0000 Author: jmg Date: Thu Nov 15 03:22:50 2012 New Revision: 243048 URL: http://svnweb.freebsd.org/changeset/base/243048 Log: fix a couple of spelling errors... Modified: head/games/fortune/datfiles/fortunes Modified: head/games/fortune/datfiles/fortunes ============================================================================== --- head/games/fortune/datfiles/fortunes Thu Nov 15 03:00:49 2012 (r243047) +++ head/games/fortune/datfiles/fortunes Thu Nov 15 03:22:50 2012 (r243048) @@ -901,7 +901,7 @@ to add. This will take at least two wee "Even that is too much to expect," insisted the manager, "I will be satisfied if you simply tell me when the program is complete." The programmer agreed to this. - Several years slated, the manager retired. On the way to his + Several years later, the manager retired. On the way to his retirement lunch, he discovered the programmer asleep at his terminal. He had been programming all night. -- Geoffrey James, "The Tao of Programming" @@ -7947,7 +7947,7 @@ the same mistake twice without getting n A well-known friend is a treasure. % A well-used door needs no oil on its hinges. -A swift-flowing steam does no grow stagnant. +A swift-flowing stream does not grow stagnant. Neither sound nor thoughts can travel through a vacuum. Software rots if not used. From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 03:39:21 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C4862B7F; Thu, 15 Nov 2012 03:39:21 +0000 (UTC) (envelope-from grog@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id AA0FB8FC08; Thu, 15 Nov 2012 03:39:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAF3dL5C008024; Thu, 15 Nov 2012 03:39:21 GMT (envelope-from grog@svn.freebsd.org) Received: (from grog@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAF3dLel008022; Thu, 15 Nov 2012 03:39:21 GMT (envelope-from grog@svn.freebsd.org) Message-Id: <201211150339.qAF3dLel008022@svn.freebsd.org> From: Greg Lehey Date: Thu, 15 Nov 2012 03:39:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243049 - head/bin/df X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 03:39:21 -0000 Author: grog Date: Thu Nov 15 03:39:21 2012 New Revision: 243049 URL: http://svnweb.freebsd.org/changeset/base/243049 Log: Add , (comma) option to print sizes grouped and separated by thousands using the non-monetary separator returned by localeconv(3), typically a comma or period. MFC after: 14 days Modified: head/bin/df/df.1 head/bin/df/df.c Modified: head/bin/df/df.1 ============================================================================== --- head/bin/df/df.1 Thu Nov 15 03:22:50 2012 (r243048) +++ head/bin/df/df.1 Thu Nov 15 03:39:21 2012 (r243049) @@ -66,16 +66,14 @@ flag. This is implied for file systems specified on the command line. .It Fl b Use 512-byte blocks rather than the default. -Note that -this overrides the +This overrides the .Ev BLOCKSIZE specification from the environment. .It Fl c Display a grand total. .It Fl g Use 1073741824-byte (1-Gbyte) blocks rather than the default. -Note that -this overrides the +This overrides the .Ev BLOCKSIZE specification from the environment. .It Fl H @@ -97,16 +95,16 @@ are always printed in base 10. Include statistics on the number of free inodes. .It Fl k Use 1024-byte (1-Kbyte) blocks rather than the default. -Note that -this overrides the +This overrides the .Ev BLOCKSIZE -specification from the environment. +specification from the environment and the +.Fl P +option. .It Fl l Only display information about locally-mounted file systems. .It Fl m Use 1048576-byte (1-Mbyte) blocks rather than the default. -Note that -this overrides the +This overrides the .Ev BLOCKSIZE specification from the environment. .It Fl n @@ -120,9 +118,12 @@ will not request new statistics from the with the possibly stale statistics that were previously obtained. .It Fl P Use POSIX compliant output of 512-byte blocks rather than the default. -Note that this overrides the +This overrides the .Ev BLOCKSIZE specification from the environment. +The +.Fl k +option overrides this option. .It Fl t Only print out statistics for file systems of the specified types. More than one type may be specified in a comma separated list. @@ -148,6 +149,13 @@ command can be used to find out the type that are available on the system. .It Fl T Include file system type. +.It Fl , +(Comma) Print sizes grouped and separated by thousands using the +non-monetary separator returned by +.Xr localeconv 3 , +typically a comma or period. +If no locale is set, or the locale does not have a non-monetary separator, this +option has no effect. .El .Sh ENVIRONMENT .Bl -tag -width BLOCKSIZE @@ -165,9 +173,21 @@ is set, the block counts will be display .Xr getfsstat 2 , .Xr statfs 2 , .Xr getmntinfo 3 , +.Xr localeconv 3 , .Xr fstab 5 , .Xr mount 8 , .Xr quot 8 +.Sh STANDARDS +With the exception of most options, +the +.Nm +utility conforms to +.St -p1003.1-2004 , +which defines only the +.Fl k , P +and +.Fl t +options. .Sh HISTORY A .Nm Modified: head/bin/df/df.c ============================================================================== --- head/bin/df/df.c Thu Nov 15 03:22:50 2012 (r243048) +++ head/bin/df/df.c Thu Nov 15 03:39:21 2012 (r243049) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -95,6 +96,7 @@ imax(int a, int b) } static int aflag = 0, cflag, hflag, iflag, kflag, lflag = 0, nflag, Tflag; +static int thousands; static struct ufs_args mdev; int @@ -111,12 +113,12 @@ main(int argc, char *argv[]) int ch, rv; fstype = "ufs"; - + (void)setlocale(LC_ALL, ""); memset(&totalbuf, 0, sizeof(totalbuf)); totalbuf.f_bsize = DEV_BSIZE; strlcpy(totalbuf.f_mntfromname, "total", MNAMELEN); vfslist = NULL; - while ((ch = getopt(argc, argv, "abcgHhiklmnPt:T")) != -1) + while ((ch = getopt(argc, argv, "abcgHhiklmnPt:T,")) != -1) switch (ch) { case 'a': aflag = 1; @@ -180,6 +182,9 @@ main(int argc, char *argv[]) case 'T': Tflag = 1; break; + case ',': + thousands = 1; + break; case '?': default: usage(); @@ -410,10 +415,18 @@ prtstat(struct statfs *sfsp, struct maxw static int headerlen, timesthrough = 0; static const char *header; int64_t used, availblks, inodes; + const char *format; if (++timesthrough == 1) { mwp->mntfrom = imax(mwp->mntfrom, (int)strlen("Filesystem")); mwp->fstype = imax(mwp->fstype, (int)strlen("Type")); + if (thousands) { /* make space for commas */ + mwp->total += (mwp->total - 1) / 3; + mwp->used += (mwp->used - 1) / 3; + mwp->avail += (mwp->avail - 1) / 3; + mwp->iused += (mwp->iused - 1) / 3; + mwp->ifree += (mwp->ifree - 1) / 3; + } if (hflag) { header = " Size"; mwp->total = mwp->used = mwp->avail = @@ -428,7 +441,7 @@ prtstat(struct statfs *sfsp, struct maxw (void)printf("%-*s", mwp->mntfrom, "Filesystem"); if (Tflag) (void)printf(" %-*s", mwp->fstype, "Type"); - (void)printf(" %-*s %*s %*s Capacity", mwp->total, header, + (void)printf(" %*s %*s %*s Capacity", mwp->total, header, mwp->used, "Used", mwp->avail, "Avail"); if (iflag) { mwp->iused = imax(hflag ? 0 : mwp->iused, @@ -448,7 +461,11 @@ prtstat(struct statfs *sfsp, struct maxw if (hflag) { prthuman(sfsp, used); } else { - (void)printf(" %*jd %*jd %*jd", + if (thousands) + format = " %*j'd %*j'd %*j'd"; + else + format = " %*jd %*jd %*jd"; + (void)printf(format, mwp->total, fsbtoblk(sfsp->f_blocks, sfsp->f_bsize, blocksize), mwp->used, fsbtoblk(used, sfsp->f_bsize, blocksize), @@ -465,7 +482,11 @@ prtstat(struct statfs *sfsp, struct maxw prthumanvalinode(used); prthumanvalinode(sfsp->f_ffree); } else { - (void)printf(" %*jd %*jd", mwp->iused, (intmax_t)used, + if (thousands) + format = " %*j'd %*j'd"; + else + format = " %*jd %*jd"; + (void)printf(format, mwp->iused, (intmax_t)used, mwp->ifree, (intmax_t)sfsp->f_ffree); } (void)printf(" %4.0f%% ", inodes == 0 ? 100.0 : @@ -542,7 +563,7 @@ usage(void) { (void)fprintf(stderr, -"usage: df [-b | -g | -H | -h | -k | -m | -P] [-acilnT] [-t type] [file | filesystem ...]\n"); +"usage: df [-b | -g | -H | -h | -k | -m | -P] [-acilnT] [-t type] [-,] [file | filesystem ...]\n"); exit(EX_USAGE); } From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 04:24:18 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 29597140; Thu, 15 Nov 2012 04:24:18 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0E8DA8FC12; Thu, 15 Nov 2012 04:24:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAF4OH3t015454; Thu, 15 Nov 2012 04:24:17 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAF4OHZT015453; Thu, 15 Nov 2012 04:24:17 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201211150424.qAF4OHZT015453@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 15 Nov 2012 04:24:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243050 - head/contrib/atf/doc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 04:24:18 -0000 Author: marcel Date: Thu Nov 15 04:24:17 2012 New Revision: 243050 URL: http://svnweb.freebsd.org/changeset/base/243050 Log: Remove redundant text describing the cleanup routine. Upstreamed: http://code.google.com/p/kyua/issues/detail?id=43 Submitted by: Garrett Cooper Modified: head/contrib/atf/doc/atf-test-case.4 Modified: head/contrib/atf/doc/atf-test-case.4 ============================================================================== --- head/contrib/atf/doc/atf-test-case.4 Thu Nov 15 03:39:21 2012 (r243049) +++ head/contrib/atf/doc/atf-test-case.4 Thu Nov 15 04:24:17 2012 (r243050) @@ -61,7 +61,7 @@ failures. This body is only executed if the abstract conditions specified by the header are met. The -.Em cleanup routine +.Em cleanup routine is a piece of code always executed after the body, regardless of the exit status of the test case. It can be used to undo side-effects of the test case. From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 04:29:13 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 624A9392; Thu, 15 Nov 2012 04:29:13 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4783B8FC15; Thu, 15 Nov 2012 04:29:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAF4TDP8016248; Thu, 15 Nov 2012 04:29:13 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAF4TDeH016247; Thu, 15 Nov 2012 04:29:13 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201211150429.qAF4TDeH016247@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 15 Nov 2012 04:29:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243051 - head/contrib/atf/atf-sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 04:29:13 -0000 Author: marcel Date: Thu Nov 15 04:29:12 2012 New Revision: 243051 URL: http://svnweb.freebsd.org/changeset/base/243051 Log: Fix typos in description for exp{err,out}_mismatch_head. Upstreamed: http://code.google.com/p/kyua/issues/detail?id=44 Submitted by: Garrett Cooper Modified: head/contrib/atf/atf-sh/atf_check_test.sh Modified: head/contrib/atf/atf-sh/atf_check_test.sh ============================================================================== --- head/contrib/atf/atf-sh/atf_check_test.sh Thu Nov 15 04:24:17 2012 (r243050) +++ head/contrib/atf/atf-sh/atf_check_test.sh Thu Nov 15 04:29:12 2012 (r243051) @@ -54,7 +54,7 @@ atf_test_case expout_mismatch expout_mismatch_head() { atf_set "descr" "Verifies that atf_check prints a diff of the" \ - "stdout and the expected stdout if the two do no" \ + "stdout and the expected stdout of the two do not" \ "match" } expout_mismatch_body() @@ -79,7 +79,7 @@ atf_test_case experr_mismatch experr_mismatch_head() { atf_set "descr" "Verifies that atf_check prints a diff of the" \ - "stderr and the expected stderr if the two do no" \ + "stderr and the expected stderr of the two do not" \ "match" } experr_mismatch_body() From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 04:32:55 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9A69B65B; Thu, 15 Nov 2012 04:32:55 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7C4648FC0C; Thu, 15 Nov 2012 04:32:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAF4Wt7F016974; Thu, 15 Nov 2012 04:32:55 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAF4Wtah016973; Thu, 15 Nov 2012 04:32:55 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201211150432.qAF4Wtah016973@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 15 Nov 2012 04:32:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243052 - head/contrib/atf/atf-run X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 04:32:55 -0000 Author: marcel Date: Thu Nov 15 04:32:55 2012 New Revision: 243052 URL: http://svnweb.freebsd.org/changeset/base/243052 Log: Add support for DragonFly and FreeBSD. Upstreamed: http://code.google.com/p/kyua/issues/detail?id=45 Submitted by: Garrett Cooper Modified: head/contrib/atf/atf-run/requirements_test.cpp Modified: head/contrib/atf/atf-run/requirements_test.cpp ============================================================================== --- head/contrib/atf/atf-run/requirements_test.cpp Thu Nov 15 04:29:12 2012 (r243051) +++ head/contrib/atf/atf-run/requirements_test.cpp Thu Nov 15 04:32:55 2012 (r243052) @@ -239,7 +239,8 @@ ATF_TEST_CASE_WITHOUT_HEAD(require_memor ATF_TEST_CASE_BODY(require_memory_not_enough) { atf::tests::vars_map metadata; metadata["require.memory"] = "128t"; -#if defined(__APPLE__) || defined(__NetBSD__) +#if defined(__APPLE__) || defined(__DragonFly__) || \ + defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) do_check("Not enough memory; needed 140737488355328, available [0-9]*", metadata); #else From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 04:39:23 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8F45D821; Thu, 15 Nov 2012 04:39:23 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 746498FC0C; Thu, 15 Nov 2012 04:39:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAF4dNc2018105; Thu, 15 Nov 2012 04:39:23 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAF4dN7d018104; Thu, 15 Nov 2012 04:39:23 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201211150439.qAF4dN7d018104@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 15 Nov 2012 04:39:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243053 - head/tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 04:39:23 -0000 Author: marcel Date: Thu Nov 15 04:39:23 2012 New Revision: 243053 URL: http://svnweb.freebsd.org/changeset/base/243053 Log: Don't install atf.test.mk if MK_ATF == no. Submitted by: Garrett Cooper Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Thu Nov 15 04:32:55 2012 (r243052) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Thu Nov 15 04:39:23 2012 (r243053) @@ -133,6 +133,7 @@ OLD_FILES+=usr/share/man/man3/atf-sh-api OLD_FILES+=usr/share/man/man4/atf-test-case.4.gz OLD_FILES+=usr/share/man/man5/atf-formats.5.gz OLD_FILES+=usr/share/man/man7/atf.7.gz +OLD_FILES+=usr/share/mk/atf.test.mk OLD_DIRS+=usr/share/xml/atf OLD_FILES+=usr/share/xml/atf/tests-results.dtd OLD_DIRS+=usr/share/xsl/atf From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 04:42:30 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E82479D1; Thu, 15 Nov 2012 04:42:30 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CCA568FC12; Thu, 15 Nov 2012 04:42:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAF4gUmi018719; Thu, 15 Nov 2012 04:42:30 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAF4gUg6018718; Thu, 15 Nov 2012 04:42:30 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201211150442.qAF4gUg6018718@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 15 Nov 2012 04:42:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243054 - head/contrib/atf/atf-c X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 04:42:31 -0000 Author: marcel Date: Thu Nov 15 04:42:30 2012 New Revision: 243054 URL: http://svnweb.freebsd.org/changeset/base/243054 Log: The *_STR* macros use strcmp() to check their arguments. Include string.h to have this definition available. Upstream commit: 1dc1884f778f88811583e6a54610a6d7e421ca63 Submitted by: Garrett Cooper Modified: head/contrib/atf/atf-c/macros.h Modified: head/contrib/atf/atf-c/macros.h ============================================================================== --- head/contrib/atf/atf-c/macros.h Thu Nov 15 04:39:23 2012 (r243053) +++ head/contrib/atf/atf-c/macros.h Thu Nov 15 04:42:30 2012 (r243054) @@ -30,6 +30,8 @@ #if !defined(ATF_C_MACROS_H) #define ATF_C_MACROS_H +#include + #include #include #include From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 04:51:38 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 978A2BD1; Thu, 15 Nov 2012 04:51:38 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 638498FC08; Thu, 15 Nov 2012 04:51:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAF4pbiW020594; Thu, 15 Nov 2012 04:51:37 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAF4pbjx020592; Thu, 15 Nov 2012 04:51:37 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201211150451.qAF4pbjx020592@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 15 Nov 2012 04:51:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243055 - head/contrib/atf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 04:51:38 -0000 Author: marcel Date: Thu Nov 15 04:51:37 2012 New Revision: 243055 URL: http://svnweb.freebsd.org/changeset/base/243055 Log: Add ATF update instructions and file exclude list. Submitted by: Garrett Cooper Added: head/contrib/atf/FREEBSD-Xlist (contents, props changed) head/contrib/atf/FREEBSD-upgrade (contents, props changed) Added: head/contrib/atf/FREEBSD-Xlist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/atf/FREEBSD-Xlist Thu Nov 15 04:51:37 2012 (r243055) @@ -0,0 +1,8 @@ +bootstrap/ +config.log +config.status +libtool +Makefile +stamp-h1 +*/*/.deps/ +*/.deps/ Added: head/contrib/atf/FREEBSD-upgrade ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/atf/FREEBSD-upgrade Thu Nov 15 04:51:37 2012 (r243055) @@ -0,0 +1,28 @@ +$FreeBSD$ + +atf + +The source code is hosted on GoogleCode as a subcomponent of the Kyua project: + + http://code.google.com/p/kyua/downloads/list + +For the contrib directory, the sources were initially prepared like so: + + ./configure --prefix=/ --exec-prefix=/usr --datarootdir=/usr/share + +For the contrib directory, files and directories were pruned by: + +sh -c 'for F in `cat FREEBSD-Xlist`; do rm -rf ./$F ; done' + +You may check if there are any new files that we don't need. + +The instructions for importing new release and merging to HEAD can be found +at FreeBSD wiki: + + http://wiki.freebsd.org/SubversionPrimer/VendorImports + +To make local changes to atf, simply patch and commit to the trunk +branch (aka HEAD). Never make local changes on the vendor branch. + +gcooper@FreeBSD.org +5-August-2012 From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 05:05:55 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B72AD73; Thu, 15 Nov 2012 05:05:55 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) by mx1.freebsd.org (Postfix) with ESMTP id 820AC8FC08; Thu, 15 Nov 2012 05:05:55 +0000 (UTC) Received: from JRE-MBP-2.local (c-50-143-149-146.hsd1.ca.comcast.net [50.143.149.146]) (authenticated bits=0) by vps1.elischer.org (8.14.5/8.14.5) with ESMTP id qAF55rVK008130 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Wed, 14 Nov 2012 21:05:54 -0800 (PST) (envelope-from julian@freebsd.org) Message-ID: <50A4782C.6060206@freebsd.org> Date: Wed, 14 Nov 2012 21:05:48 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 MIME-Version: 1.0 To: Jeff Roberson Subject: Re: svn commit: r243046 - in head: sys/kern sys/sparc64/include sys/sys usr.bin/ktrdump References: <201211150051.qAF0pv4g081839@svn.freebsd.org> In-Reply-To: <201211150051.qAF0pv4g081839@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 05:05:55 -0000 On 11/14/12 4:51 PM, Jeff Roberson wrote: > Author: jeff > Date: Thu Nov 15 00:51:57 2012 > New Revision: 243046 > URL: http://svnweb.freebsd.org/changeset/base/243046 > > Log: > - Implement run-time expansion of the KTR buffer via sysctl. on the fly? ooooooohhhh! nice > - Implement a function to ensure that all preempted threads have switched > back out at least once. Use this to make sure there are no stale > references to the old ktr_buf or the lock profiling buffers before > updating them. > > Reviewed by: marius (sparc64 parts), attilio (earlier patch) > Sponsored by: EMC / Isilon Storage Division > > > From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 06:58:18 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A663B51B; Thu, 15 Nov 2012 06:58:18 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8BF338FC13; Thu, 15 Nov 2012 06:58:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAF6wIq6039522; Thu, 15 Nov 2012 06:58:18 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAF6wIds039521; Thu, 15 Nov 2012 06:58:18 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201211150658.qAF6wIds039521@svn.freebsd.org> From: Rui Paulo Date: Thu, 15 Nov 2012 06:58:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243066 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 06:58:18 -0000 Author: rpaulo Date: Thu Nov 15 06:58:18 2012 New Revision: 243066 URL: http://svnweb.freebsd.org/changeset/base/243066 Log: Enable back the clang warning in if_ath.c. Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Nov 15 06:04:39 2012 (r243065) +++ head/sys/conf/files Thu Nov 15 06:58:18 2012 (r243066) @@ -701,9 +701,8 @@ dev/ath/if_ath_pci.c optional ath_pci p dev/ath/if_ath_ahb.c optional ath_ahb \ compile-with "${NORMAL_C} -I$S/dev/ath" # -# XXX Work around clang warning, until maintainer approves fix. dev/ath/if_ath.c optional ath \ - compile-with "${NORMAL_C} ${NO_WSOMETIMES_UNINITIALIZED} -I$S/dev/ath" + compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_beacon.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_debug.c optional ath \ From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 07:17:21 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 417508BD; Thu, 15 Nov 2012 07:17:21 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from fallbackmx08.syd.optusnet.com.au (fallbackmx08.syd.optusnet.com.au [211.29.132.10]) by mx1.freebsd.org (Postfix) with ESMTP id 8CD668FC13; Thu, 15 Nov 2012 07:17:20 +0000 (UTC) Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au [211.29.132.187]) by fallbackmx08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id qAF77cEJ004300; Thu, 15 Nov 2012 18:07:38 +1100 Received: from c122-106-175-26.carlnfd1.nsw.optusnet.com.au (c122-106-175-26.carlnfd1.nsw.optusnet.com.au [122.106.175.26]) by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id qAF77Ram030013 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 15 Nov 2012 18:07:28 +1100 Date: Thu, 15 Nov 2012 18:07:27 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Chris Rees Subject: Re: svn commit: r242102 - in head: contrib/bmake usr.bin/bmake In-Reply-To: Message-ID: <20121115151622.J1179@besplex.bde.org> References: <201210252318.q9PNI6IQ069461@svn.freebsd.org> <20121114172823.GA20127@dragon.NUXI.org> <20121114184837.GA73505@kib.kiev.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-Cloudmark-Score: 0 X-Optus-Cloudmark-Analysis: v=2.0 cv=eqGHVfVX c=1 sm=1 a=LhF6lwMfGFUA:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=EQ3kxGokzWMA:10 a=pGLkceISAAAA:8 a=6I5d2MoRAAAA:8 a=tU91T1cjR5qzGl9ao7sA:9 a=CjuIK1q_8ugA:10 a=IoZZiS_b4mgA:10 a=luWIg1Eyx_IA:10 a=Av-Y3828VJIA:10 a=MSl-tDqOz04A:10 a=bxQHXO5Py4tHmhUgaywp5w==:117 Cc: src-committers@FreeBSD.org, "Simon J. Gerraty" , svn-src-all@FreeBSD.org, "David E. O'Brien" , svn-src-head@FreeBSD.org, Konstantin Belousov X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 07:17:21 -0000 On Wed, 14 Nov 2012, Chris Rees wrote: > On 14 Nov 2012 18:49, "Konstantin Belousov" wrote: >> >> On Wed, Nov 14, 2012 at 09:28:23AM -0800, David O'Brien wrote: >>> On Thu, Oct 25, 2012 at 11:18:06PM +0000, Simon J. Gerraty wrote: >>>> Log: >>>> Merge bmake-20121010 >>> >>> Hi Simon, >>> I was kicking the tires on this and noticed bmake is dynamically linked. >>> >>> Can you change it to being statically linked? >>> >>> This issue most recently came up in freebsd-current. See thread pieces >>> > http://lists.freebsd.org/pipermail/freebsd-current/2012-April/033460.html >>> > http://lists.freebsd.org/pipermail/freebsd-current/2012-April/033472.html >>> > http://lists.freebsd.org/pipermail/freebsd-current/2012-April/033473.html >> >> As you see, I prefer to not introduce new statically linked binaries into > base. >> If, for unfortunate turns of events, bmake is changed to be statically > linked, >> please obey WITH_SHARED_TOOLCHAIN. > > Or a /rescue/bmake for when speed is a concern would also be acceptable. Yes, the big rescue executable is probably even better than dynamic linkage for pessimizing speeds. Sizes on freefall now: % text data bss dec hex filename % 130265 1988 9992 142245 22ba5 /bin/sh % 5256762 133964 2220464 7611190 742336 /rescue/sh % -r--r--r-- 1 root wheel 3738610 Nov 11 06:48 /usr/lib/libc.a The dynamically-linked /bin/sh is deceptively small, although it is larger than the statically linked /bin/sh in FreeBSD-1 for few new features. When executed, it expands to 16.5MB with 10MB RSS. I don't know how much of that is malloc bloat that wouldn't need to be copied on fork, but it is a lot just to map. /rescue/sh starts at 5MB and expands to 15.5MB with 9.25MB when executed. So it is slightly smaller, and its slowness is determined by its non-locality. Perhaps its non-locality is not as good for pessimization as libc's. I don't use dynamic linkage of course. /bin/sh is bloated by static linkage (or rather libc) in the FreeBSD-~5.2 that I usually run: text data bss dec hex filename 649623 8192 64056 721871 b03cf /bin/sh but this "only" expands to 864K with 580K RSS when executed. This can be forked a little faster than 10MB RSS. In practice the timings for time whatever/sh -c 'for i in $(jot 1000 1); do echo -n; done' are: freefall /bin/sh: 6.93 real 1.69 user 5.16 sys freefall /rescue/sh: 6.86 real 1.65 user 5.13 sys local /bin/sh: 0.21 real 0.01 user 0.18 sys freefall: FreeBSD 10.0-CURRENT #4 r242881M: Sun Nov 11 05:30:05 UTC 2012 root@freefall.freebsd.org:/usr/obj/usr/src/sys/FREEFALL amd64 CPU: Intel(R) Xeon(R) CPU X5650 @ 2.67GHz (2666.82-MHz K8-class CPU) Origin = "GenuineIntel" Id = 0x206c2 Family = 0x6 Model = 0x2c Stepping = 2 local: FreeBSD 5.2-CURRENT #4395: Sun Apr 8 12:15:03 EST 2012 bde@besplex.bde.org:/c/obj/usr/src/sys/compile/BESPLEX.fw ... CPU: AMD Athlon(tm) 64 Processor 3200+ (2010.05-MHz 686-class CPU) Origin = "AuthenticAMD" Id = 0xf48 Stepping = 8 freefall may be pessimized by INVARIANTS. It is pessimized by /bin/echo being dynamically linked. Normally shells use builtin echo so the speed of /bin/echo is unimportant. There is also some strangeness in the timing for /bin/echo specifically. Changing 'echo -n' to '/bin/rm -f /etc/nonesuch' or /usr/bin/true reduces the times on freefall by almost a factor of 2, although rm is larger and has to do more: freefall: text data bss dec hex filename 2661 540 8 3209 c89 /bin/echo 11026 884 152 12062 2f1e /bin/rm 1420 484 8 1912 778 /usr/bin/true (all dynamically linked to libc only. truss verifies that rm does a little more). freefall /bin/sh echo: 6.93 real 1.69 user 5.16 sys freefall /bin/sh rm: 3.83 real 0.91 user 2.84 sys freefall /bin/sh true: 3.68 real 0.75 user 2.85 sys freefall /rescue/sh echo: 6.86 real 1.65 user 5.13 sys freefall /rescue/sh rm: 3.69 real 0.83 user 2.78 sys freefall /rescue/sh true: 3.67 real 0.85 user 2.74 sys local /bin/sh echo: 0.21 real 0.01 user 0.18 sys local /bin/sh rm: 0.22 real 0.02 user 0.19 sys local /bin/sh true: 0.18 real 0.01 user 0.17 sys local: text data bss dec hex filename 11926 60 768 12754 31d2 /bin/echo 380758 6752 61772 449282 6db02 /bin/rm 1639 40 604 2283 8eb /usr/bin/true (all statically linked. I managed to debloat crtso and libc enough for /usr/bin/true to be small. The sources for /bin/echo are excessively optimized for space in the executable -- they have contortions to avoid using printf. But this is useless in -current, since crtso and libc drag in printf, so that the null program int main(){} has size: freefall (amd64): text data bss dec hex filename 316370 12156 55184 383710 5dade null-static 1452 484 8 1944 798 null-dynamic local (i386): text data bss dec hex filename 1490 40 604 2134 856 null-static 1203 208 32 1443 5a3 null-dynamic Putting this null program in the jot loop gives a truer indication of the cost of a statically linked shell: freefall /bin/sh null-static: 6.36 real 1.51 user 4.45 sys freefall /bin/sh null-dynamic: 3.92 real 0.85 user 2.71 sys local /bin/sh null-static: 0.18 real 0.00 user 0.18 sys local /bin/sh null-dynamic: 0.58 real 0.09 user 0.49 sys The last 2 lines show the expected large cost of dynamic linkage for a small program (3 times slower), but the freefall lines show strangeness -- static linkage is almost twice as slow, and almost as slow as /bin/echo -n. So to get a truer indication of the cost of a statically linked shell, test with my favourite small program: %%% #include .globl _start _start: movl $SYS_sync,%eax int $0x80 pushl $0 # only to look like a sync library call (?) pushl $0 movl $SYS_exit,%eax int $0x80 %%% This is my sync.S source file for sync(1) on x86 (must build on i386 using cc -o sync sync.S -nostdlib). local: text data bss dec hex filename 18 0 0 18 12 sync It does the same amount of error checking as /usr/src/bin/sync.c (none), which compiles to: freefall: text data bss dec hex filename 316330 12092 55184 383606 5da76 sync-static 1503 492 8 2003 7d3 sync-dynamic Putting this in the jot loop gives: local /bin/sh sync: 0.65 real 0.01 user 0.63 sys but since is a heavyweight instruction and I don't want to exercise freefalls's disks, remove the syscall from the program, so it just does _exit(0): text data bss dec hex filename 11 0 0 18 12 syncfree-sync freefall /bin/sh syncfree-sync: 0.29 real 0.01 user 0.11 sys local /bin/sh syncfree-sync: 0.17 real 0.00 user 0.17 sys This shows that most of freefall's enormous slowness is for execing its bloated executables, perhaps especially when they are on nfs (oops). Another test of null-static after copying it to /tmp shows that nfs makes little difference. However, syncfree-sync is much faster when copied to /tmp (<= 0.08 seconds real. Test not done, but this result is read off from a later test). Next, try bloating syncfree-sync with padding to the same size as null-static: %%% #include .text .globl _start _start: pushl $0 pushl $0 movl $SYS_exit,%eax int $0x80 .space 316370-11 .data .space 12156 .bss .space 55184 %%% text data bss dec hex filename 316370 12156 55184 383710 5dade bloated-syncfree-sync freefall /bin/sh bloated-syncfree-sync: 0.08 real 0.00 user 0.08 sys (zfs) freefall /bin/sh bloated-syncfree-sync: 0.30 real 0.00 user 0.13 sys (nfs) local /bin/sh bloated-syncfree-sync: 0.21 real 0.00 user 0.21 sys (ffs) This shows that the the kernel is still quite fast and enormous slowness on freefall is mainly in crtso. I blame malloc() for this. malloc() first increases the size of a null statically linked program from ~1K text to 310K text. Then it increases the startup time by a factor of 50 or so. For small utilities like echo and rm, the increases are similar. A small utility only needs to allocate about 8K of data (for stdio buffers). Since execing bloated-syncfree-sync is fast, a small utility could do this allocation a few thousand times in the time that crtso now takes to start up (the 300+K of padding only gives enough for statically allocating 40 x 8K. Expanding the padding by a factor of 50 might slow down the exec to the crtso time, but gives 2000 x 8K. Of course, actually using the allocated areas will slow down both the statically allocated and the dynamically allocated cases a lot. More tests with a large program on small data (put 'cc -c null.c' in the jot loop, where null.c is int main(){}): freefall /bin/sh clang: 22.53 real 6.35 user 12.15 sys (nfs) freefall /bin/sh gcc: 35.28 real 13.14 user 17.45 sys (nfs) local /bin/sh cc: 17.50 real 6.72 user 2.64 sys (ffs) The crtso slowness seems to be very significant even here. Assume that it is 6 seconds (divided by 1000) per exec. clang is monolithic and does only 1 exec per cc -c. gcc is a small driver program that execs cc1 and as (it used to exec a separate cpp too). So gcc does 3 execs per cc -c, and 6 seconds extra for the 2 extra execs accounts almost exactly for clang being 12.75 seconds faster. The `local' time apparently shows a large accounting bug. Actually, it is because I left a shell loop for testing this running in the background. All the other 'local' times are not much affected by this, since the background loop has low priority, and scheduling works so that it is rarely run in competition with the tiny programs in the other tests. But here the cc's compete with it significantly. After fixing this and also running the freefall tests on zfs: freefall /bin/sh clang: 19.69 real 6.74 user 12.82 sys (zfs) freefall /bin/sh gcc: 28.51 real 12.75 user 15.47 sys (zfs, gcc-4.2.1) local /bin/sh cc: 8.95 real 6.17 user 2.74 sys (ffs, gcc-3.3.3) gcc-4.2.1 is only 35% slower than gcc-3.3.3 on larger source files when it is run locally: local /bin/sh gcc: 120.1 real 112.4 user 7.4 sys (ffs, gcc-3.3.3 -O1 -S) local /bin/sh gcc: 164.6 real 155.8 user 8.1 sys (ffs, gcc-3.3.3 -O2 -S) local /bin/sh gcc: 161.9 real 148.0 user 8.1 sys (ffs, gcc-4.2.1 -O1 -S) local /bin/sh gcc: 202.4 real 193.6 user 8.0 sys (ffs, gcc-4.2.1 -O2 -S) Maybe malloc() would be faster with MALLOC_PRODUCTION. I use /etc/malloc.conf -> aj locally. freefall doesn't have /etc/malloc.conf. MALLOC_OPTIONS no longer works, and MALLOC_CONF is too large for me to understand, so I don't know how to turn off non-production features dynamically. Bruce From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 08:48:20 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F0F34DFC; Thu, 15 Nov 2012 08:48:19 +0000 (UTC) (envelope-from fullermd@over-yonder.net) Received: from thyme.infocus-llc.com (server.infocus-llc.com [206.156.254.44]) by mx1.freebsd.org (Postfix) with ESMTP id A83488FC15; Thu, 15 Nov 2012 08:48:19 +0000 (UTC) Received: from draco.over-yonder.net (c-75-65-60-66.hsd1.ms.comcast.net [75.65.60.66]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by thyme.infocus-llc.com (Postfix) with ESMTPSA id A9E6537B70D; Thu, 15 Nov 2012 02:41:22 -0600 (CST) Received: by draco.over-yonder.net (Postfix, from userid 100) id 3Y2GJL0TlWzXlF; Thu, 15 Nov 2012 02:41:22 -0600 (CST) Date: Thu, 15 Nov 2012 02:41:22 -0600 From: "Matthew D. Fuller" To: Bruce Evans Subject: Re: svn commit: r242102 - in head: contrib/bmake usr.bin/bmake Message-ID: <20121115084121.GI66994@over-yonder.net> References: <201210252318.q9PNI6IQ069461@svn.freebsd.org> <20121114172823.GA20127@dragon.NUXI.org> <20121114184837.GA73505@kib.kiev.ua> <20121115151622.J1179@besplex.bde.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="M9NhX3UHpAaciwkO" Content-Disposition: inline In-Reply-To: <20121115151622.J1179@besplex.bde.org> X-Editor: vi X-OS: FreeBSD User-Agent: Mutt/1.5.21-fullermd.4 (2010-09-15) X-Virus-Scanned: clamav-milter 0.97.6 at thyme.infocus-llc.com X-Virus-Status: Clean X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: Konstantin Belousov , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, "David E. O'Brien" , svn-src-head@FreeBSD.org, "Simon J. Gerraty" , Chris Rees X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 08:48:20 -0000 --M9NhX3UHpAaciwkO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Nov 15, 2012 at 06:07:27PM +1100 I heard the voice of Bruce Evans, and lo! it spake thus: > > Maybe malloc() would be faster with MALLOC_PRODUCTION. I use > /etc/malloc.conf -> aj locally. freefall doesn't have > /etc/malloc.conf. MALLOC_OPTIONS no longer works, and MALLOC_CONF > is too large for me to understand, so I don't know how to turn off > non-production features dynamically. FWIW, I suspected MALLOC_PRODUCTION in some massive slowdowns I see from time to time on my -CURRENT box. Most vividly around running portupgrade-related bits (portupgrade, pkgdb, etc). I got annoyed by it enough a few weeks ago to write up a quickie to bang malloc() around and see what happened. Attached, just for grins. It allocates a big array, frees every other element, allocates another, frees every other, hops back and forth filling in the holes, then hopes around free'ing everything. Doesn't put anything in the pages, just allocates, so it doesn't call on the VM subsystem for much. i.e., "just beat the snot out of malloc" ;) Here are some quick comparative runs on two systems I have here locally, one running stable/9 (late Jun), the other head (mid Oct). Same binary on both, so it's not a compiler difference either. stable/9: 1.594u 0.142s 0:01.73 100.0% 5+2767k 0+0io 0pf+0w 1.586u 0.157s 0:01.74 99.4% 5+2792k 0+0io 0pf+0w 1.567u 0.156s 0:01.72 99.4% 5+2786k 0+0io 0pf+0w 1.583u 0.211s 0:01.79 100.0% 5+2783k 0+0io 0pf+0w 1.599u 0.126s 0:01.72 99.4% 5+2786k 0+0io 0pf+0w head: 12.748u 0.165s 0:12.91 99.9% 5+167k 0+0io 0pf+0w 12.755u 0.157s 0:12.91 99.9% 5+167k 0+0io 0pf+0w 12.778u 0.157s 0:12.94 99.8% 5+167k 0+0io 0pf+0w 12.657u 0.204s 0:12.86 99.9% 5+167k 0+0io 0pf+0w 12.733u 0.173s 0:12.98 99.3% 5+167k 0+0io 0pf+0w Neither system is entirely quiescent, but they're both largely idle. The CPU's are from the same model series, though the -CURRENT box is 500MHz faster, and has faster memory. So, yeah, it's a safe bet that non-_PRODUCTION malloc() can hurt you quite a lot when you're malloc()-heavy. -- Matthew Fuller (MF4839) | fullermd@over-yonder.net Systems/Network Administrator | http://www.over-yonder.net/~fullermd/ On the Internet, nobody can hear you scream. --M9NhX3UHpAaciwkO-- From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 10:13:00 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0486DAF; Thu, 15 Nov 2012 10:13:00 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from exprod7og105.obsmtp.com (exprod7og105.obsmtp.com [64.18.2.163]) by mx1.freebsd.org (Postfix) with ESMTP id 043AC8FC13; Thu, 15 Nov 2012 10:12:58 +0000 (UTC) Received: from P-EMHUB01-HQ.jnpr.net ([66.129.224.36]) (using TLSv1) by exprod7ob105.postini.com ([64.18.6.12]) with SMTP ID DSNKUKTAKnBCn7KMWOQow1SrxWdQ+Wxdbo25@postini.com; Thu, 15 Nov 2012 02:12:59 PST Received: from magenta.juniper.net (172.17.27.123) by P-EMHUB01-HQ.jnpr.net (172.24.192.33) with Microsoft SMTP Server (TLS) id 8.3.213.0; Thu, 15 Nov 2012 02:09:09 -0800 Received: from chaos.jnpr.net (chaos.jnpr.net [172.24.29.229]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id qAF7js391716; Wed, 14 Nov 2012 23:45:54 -0800 (PST) (envelope-from sjg@juniper.net) Received: from chaos.jnpr.net (localhost [127.0.0.1]) by chaos.jnpr.net (Postfix) with ESMTP id E930F58094; Wed, 14 Nov 2012 23:45:53 -0800 (PST) To: Chris Rees Subject: Re: svn commit: r242102 - in head: contrib/bmake usr.bin/bmake In-Reply-To: References: <201210252318.q9PNI6IQ069461@svn.freebsd.org> <20121114172823.GA20127@dragon.NUXI.org> <20121114184837.GA73505@kib.kiev.ua> Comments: In-reply-to: Chris Rees message dated "Wed, 14 Nov 2012 19:27:49 +0000." From: "Simon J. Gerraty" X-Mailer: MH-E 7.82+cvs; nmh 1.3; GNU Emacs 22.3.1 Date: Wed, 14 Nov 2012 23:45:53 -0800 Message-ID: <20121115074553.E930F58094@chaos.jnpr.net> MIME-Version: 1.0 Content-Type: text/plain Cc: Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, "David E. O'Brien" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 10:13:00 -0000 I aim to import bmake-20121109 soon (once I sort out svn 1.7.7 bug), will loook at this as well. On Wed, 14 Nov 2012 19:27:49 +0000, Chris Rees writes: >> > I was kicking the tires on this and noticed bmake is dynamically linked. >> > >> > Can you change it to being statically linked? From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 10:58:06 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CDA3D156; Thu, 15 Nov 2012 10:58:06 +0000 (UTC) (envelope-from ray@ddteam.net) Received: from smtp.dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id 7BAD28FC13; Thu, 15 Nov 2012 10:58:05 +0000 (UTC) Received: from terran.dlink.ua (unknown [192.168.10.90]) (Authenticated sender: ray) by smtp.dlink.ua (Postfix) with ESMTPSA id C3859C4935; Thu, 15 Nov 2012 12:57:56 +0200 (EET) Date: Thu, 15 Nov 2012 12:59:58 +0200 From: Aleksandr Rybalko To: Alan Cox Subject: Re: svn commit: r243030 - in head/sys/mips: include mips Message-Id: <20121115125958.c8fe031258c233ff359223d6@ddteam.net> In-Reply-To: <201211141733.qAEHX126017682@svn.freebsd.org> References: <201211141733.qAEHX126017682@svn.freebsd.org> X-Mailer: Sylpheed 3.2.0 (GTK+ 2.24.6; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 10:58:07 -0000 On Wed, 14 Nov 2012 17:33:01 +0000 (UTC) Alan Cox wrote: > Author: alc > Date: Wed Nov 14 17:33:00 2012 > New Revision: 243030 > URL: http://svnweb.freebsd.org/changeset/base/243030 > > Log: > The function pmap_alloc_direct_page() unconditionally zeroes the returned > page. Therefore, it is really inappropriate for use by the function > uma_small_alloc(). The effect of using it was that every page was zeroed > at least once and possibly twice if M_ZERO was passed as a "wait" flag. Many thanks Alan! No I able to store 8MB fw image on tmpfs. Bot only once :) > > Modified: > head/sys/mips/include/pmap.h > head/sys/mips/mips/pmap.c > head/sys/mips/mips/uma_machdep.c > > Modified: head/sys/mips/include/pmap.h > ============================================================================== > --- head/sys/mips/include/pmap.h Wed Nov 14 17:23:48 2012 (r243029) > +++ head/sys/mips/include/pmap.h Wed Nov 14 17:33:00 2012 (r243030) > @@ -179,7 +179,6 @@ void pmap_kenter_temporary_free(vm_paddr > void pmap_flush_pvcache(vm_page_t m); > int pmap_emulate_modified(pmap_t pmap, vm_offset_t va); > void pmap_grow_direct_page_cache(void); > -vm_page_t pmap_alloc_direct_page(unsigned int index, int req); > > #endif /* _KERNEL */ > > > Modified: head/sys/mips/mips/pmap.c > ============================================================================== > --- head/sys/mips/mips/pmap.c Wed Nov 14 17:23:48 2012 (r243029) > +++ head/sys/mips/mips/pmap.c Wed Nov 14 17:33:00 2012 (r243030) > @@ -163,6 +163,7 @@ static vm_page_t pmap_pv_reclaim(pmap_t > static void pmap_pvh_free(struct md_page *pvh, pmap_t pmap, vm_offset_t va); > static pv_entry_t pmap_pvh_remove(struct md_page *pvh, pmap_t pmap, > vm_offset_t va); > +static vm_page_t pmap_alloc_direct_page(unsigned int index, int req); > static vm_page_t pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, > vm_page_t m, vm_prot_t prot, vm_page_t mpte); > static int pmap_remove_pte(struct pmap *pmap, pt_entry_t *ptq, vm_offset_t va, > @@ -1041,7 +1042,7 @@ pmap_grow_direct_page_cache() > #endif > } > > -vm_page_t > +static vm_page_t > pmap_alloc_direct_page(unsigned int index, int req) > { > vm_page_t m; > > Modified: head/sys/mips/mips/uma_machdep.c > ============================================================================== > --- head/sys/mips/mips/uma_machdep.c Wed Nov 14 17:23:48 2012 (r243029) > +++ head/sys/mips/mips/uma_machdep.c Wed Nov 14 17:33:00 2012 (r243030) > @@ -50,12 +50,14 @@ uma_small_alloc(uma_zone_t zone, int byt > *flags = UMA_SLAB_PRIV; > > if ((wait & (M_NOWAIT|M_USE_RESERVE)) == M_NOWAIT) > - pflags = VM_ALLOC_INTERRUPT; > + pflags = VM_ALLOC_INTERRUPT | VM_ALLOC_WIRED; > else > - pflags = VM_ALLOC_SYSTEM; > + pflags = VM_ALLOC_SYSTEM | VM_ALLOC_WIRED; > + if (wait & M_ZERO) > + pflags |= VM_ALLOC_ZERO; > > for (;;) { > - m = pmap_alloc_direct_page(0, pflags); > + m = vm_page_alloc_freelist(VM_FREELIST_DIRECT, pflags); > if (m == NULL) { > if (wait & M_NOWAIT) > return (NULL); -- Aleksandr Rybalko From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 14:10:51 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 94DADFB; Thu, 15 Nov 2012 14:10:51 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7AAEA8FC15; Thu, 15 Nov 2012 14:10:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFEAp0t095347; Thu, 15 Nov 2012 14:10:51 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFEAp5M095346; Thu, 15 Nov 2012 14:10:51 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201211151410.qAFEAp5M095346@svn.freebsd.org> From: Alexander Motin Date: Thu, 15 Nov 2012 14:10:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243069 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 14:10:51 -0000 Author: mav Date: Thu Nov 15 14:10:51 2012 New Revision: 243069 URL: http://svnweb.freebsd.org/changeset/base/243069 Log: Fix bug in r242852 that prevented CPU from becoming idle if kernel built without SMP support. Modified: head/sys/kern/sched_ule.c Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Thu Nov 15 07:48:44 2012 (r243068) +++ head/sys/kern/sched_ule.c Thu Nov 15 14:10:51 2012 (r243069) @@ -2636,8 +2636,10 @@ sched_idletd(void *dummy) if (tdq_idled(tdq) == 0) continue; } -#endif switchcnt = tdq->tdq_switchcnt + tdq->tdq_oldswitchcnt; +#else + oldswitchcnt = switchcnt; +#endif /* * If we're switching very frequently, spin while checking * for load rather than entering a low power state that From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 14:11:34 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E4D22284; Thu, 15 Nov 2012 14:11:34 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C65CD8FC15; Thu, 15 Nov 2012 14:11:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFEBYQb095546; Thu, 15 Nov 2012 14:11:34 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFEBYh9095545; Thu, 15 Nov 2012 14:11:34 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201211151411.qAFEBYh9095545@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 15 Nov 2012 14:11:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243070 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 14:11:35 -0000 Author: trasz Date: Thu Nov 15 14:11:34 2012 New Revision: 243070 URL: http://svnweb.freebsd.org/changeset/base/243070 Log: Fix kassert that's not really valid for %CPU accounting. The problem here is race between decaying the resource usage in containers, and updating per-process usage; basically, the former may cause per-container usage to get smaller than per-process usage. Submitted by: Rudo Tomori Modified: head/sys/kern/kern_racct.c Modified: head/sys/kern/kern_racct.c ============================================================================== --- head/sys/kern/kern_racct.c Thu Nov 15 14:10:51 2012 (r243069) +++ head/sys/kern/kern_racct.c Thu Nov 15 14:11:34 2012 (r243070) @@ -403,7 +403,7 @@ racct_sub_racct(struct racct *dest, cons * Update resource usage in dest. */ for (i = 0; i <= RACCT_MAX; i++) { - if (!RACCT_IS_SLOPPY(i)) { + if (!RACCT_IS_SLOPPY(i) && !RACCT_IS_DECAYING(i)) { KASSERT(dest->r_resources[i] >= 0, ("racct propagation meltdown: dest < 0")); KASSERT(src->r_resources[i] >= 0, @@ -414,7 +414,8 @@ racct_sub_racct(struct racct *dest, cons if (RACCT_CAN_DROP(i)) { dest->r_resources[i] -= src->r_resources[i]; if (dest->r_resources[i] < 0) { - KASSERT(RACCT_IS_SLOPPY(i), + KASSERT(RACCT_IS_SLOPPY(i) || + RACCT_IS_DECAYING(i), ("racct_sub_racct: usage < 0")); dest->r_resources[i] = 0; } From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 15:05:48 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AE14C160; Thu, 15 Nov 2012 15:05:48 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 93C468FC12; Thu, 15 Nov 2012 15:05:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFF5mHp003622; Thu, 15 Nov 2012 15:05:48 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFF5m5w003621; Thu, 15 Nov 2012 15:05:48 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211151505.qAFF5m5w003621@svn.freebsd.org> From: Eitan Adler Date: Thu, 15 Nov 2012 15:05:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243071 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 15:05:48 -0000 Author: eadler Date: Thu Nov 15 15:05:47 2012 New Revision: 243071 URL: http://svnweb.freebsd.org/changeset/base/243071 Log: Finish removing obsolete man pages (add them to ObsoleteFiles.inc) Submitted by: many Approved by: cperciva MFC after: 3 days Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Nov 15 14:11:34 2012 (r243070) +++ head/ObsoleteFiles.inc Thu Nov 15 15:05:47 2012 (r243071) @@ -40,6 +40,10 @@ # 20121114: zpool-features manual page moved from section 5 to 7 OLD_FILES+=usr/share/man/man5/zpool-features.5.gz +# 20121022: remove harp, hfa and idt man page +OLD_FILES+=share/man/man4/harp.4 +OLD_FILES+=share/man/man4/hfa.4 +OLD_FILES+=share/man/man4/idt.4 # 20121022: VFS_LOCK_GIANT elimination OLD_FILES+=usr/share/man/man9/VFS_LOCK_GIANT.9.gz OLD_FILES+=usr/share/man/man9/VFS_UNLOCK_GIANT.9.gz From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 15:05:51 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C6B6D163; Thu, 15 Nov 2012 15:05:51 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id ABA2B8FC14; Thu, 15 Nov 2012 15:05:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFF5pj3003660; Thu, 15 Nov 2012 15:05:51 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFF5pVc003659; Thu, 15 Nov 2012 15:05:51 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211151505.qAFF5pVc003659@svn.freebsd.org> From: Eitan Adler Date: Thu, 15 Nov 2012 15:05:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243072 - head/bin/mv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 15:05:51 -0000 Author: eadler Date: Thu Nov 15 15:05:51 2012 New Revision: 243072 URL: http://svnweb.freebsd.org/changeset/base/243072 Log: Follow the behavior as specified in POSIX: if (exists AND (NOT f_option) AND ((not_writable AND input_is_terminal) OR i_option)) prompt in particular, add the test for input_is_terminal PR: bin/173039 Submitted by: Mark Johnston Approved by: cperciva MFC after: 3 days Modified: head/bin/mv/mv.c Modified: head/bin/mv/mv.c ============================================================================== --- head/bin/mv/mv.c Thu Nov 15 15:05:47 2012 (r243071) +++ head/bin/mv/mv.c Thu Nov 15 15:05:51 2012 (r243072) @@ -199,7 +199,7 @@ do_move(const char *from, const char *to } else if (iflg) { (void)fprintf(stderr, "overwrite %s? %s", to, YESNO); ask = 1; - } else if (access(to, W_OK) && !stat(to, &sb)) { + } else if (access(to, W_OK) && !stat(to, &sb) && isatty(STDIN_FILENO)) { strmode(sb.st_mode, modep); (void)fprintf(stderr, "override %s%s%s/%s for %s? %s", modep + 1, modep[9] == ' ' ? "" : " ", From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 15:05:54 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BF376267; Thu, 15 Nov 2012 15:05:54 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A57E78FC08; Thu, 15 Nov 2012 15:05:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFF5snY003709; Thu, 15 Nov 2012 15:05:54 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFF5sXI003708; Thu, 15 Nov 2012 15:05:54 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211151505.qAFF5sXI003708@svn.freebsd.org> From: Eitan Adler Date: Thu, 15 Nov 2012 15:05:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243073 - head/share/termcap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 15:05:54 -0000 Author: eadler Date: Thu Nov 15 15:05:54 2012 New Revision: 243073 URL: http://svnweb.freebsd.org/changeset/base/243073 Log: Some software, notably dialog(1), can understand back-tab, which is typically bound to Shift-Tab. syscons produces ^]]Z for Shift-Tab, like many VT100-like terminal (emulators). The plain xterm does not produce this sequence, but ^I for both Tab and Shift-Tab. PR: conf/162787 PR: bin/151229 Submitted by: Stefan Bethke Submitted by: Bruce Cran Approved by: cperciva MFC after: 3 days Modified: head/share/termcap/termcap.src Modified: head/share/termcap/termcap.src ============================================================================== --- head/share/termcap/termcap.src Thu Nov 15 15:05:51 2012 (r243072) +++ head/share/termcap/termcap.src Thu Nov 15 15:05:54 2012 (r243073) @@ -2825,7 +2825,7 @@ xterm-basic|modern xterm common:\ :as=\E(0:bl=^G:cd=\E[J:ce=\E[K:cl=\E[H\E[2J:\ :cm=\E[%i%d;%dH:cs=\E[%i%d;%dr:ct=\E[3g:dc=\E[P:dl=\E[M:\ :ei=\E[4l:ho=\E[H:im=\E[4h:is=\E[!p\E[?3;4l\E[4l\E>:\ - :kD=\E[3~:kb=^H:ke=\E[?1l\E>:ks=\E[?1h\E=:le=^H:md=\E[1m:\ + :kD=\E[3~:kb=^H:ke=\E[?1l\E>:ks=\E[?1h\E=:kB=\E[Z:le=^H:md=\E[1m:\ :me=\E[m:ml=\El:mr=\E[7m:mu=\Em:nd=\E[C:op=\E[39;49m:\ :rc=\E8:rs=\E[!p\E[?3;4l\E[4l\E>:sc=\E7:se=\E[27m:sf=^J:\ :so=\E[7m:sr=\EM:st=\EH:\ From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 15:05:57 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AF25A27F; Thu, 15 Nov 2012 15:05:57 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 94C538FC12; Thu, 15 Nov 2012 15:05:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFF5vrt003748; Thu, 15 Nov 2012 15:05:57 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFF5vFY003747; Thu, 15 Nov 2012 15:05:57 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211151505.qAFF5vFY003747@svn.freebsd.org> From: Eitan Adler Date: Thu, 15 Nov 2012 15:05:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243074 - head/usr.sbin/ndiscvt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 15:05:57 -0000 Author: eadler Date: Thu Nov 15 15:05:57 2012 New Revision: 243074 URL: http://svnweb.freebsd.org/changeset/base/243074 Log: Add a missing check for fread Approved by: cperciva MFC after: 3 days Modified: head/usr.sbin/ndiscvt/ndiscvt.c Modified: head/usr.sbin/ndiscvt/ndiscvt.c ============================================================================== --- head/usr.sbin/ndiscvt/ndiscvt.c Thu Nov 15 15:05:54 2012 (r243073) +++ head/usr.sbin/ndiscvt/ndiscvt.c Thu Nov 15 15:05:57 2012 (r243074) @@ -325,6 +325,8 @@ main(int argc, char *argv[]) rewind (fp); img = calloc(fsize, 1); n = fread (img, fsize, 1, fp); + if (n == 0) + err(1, "reading .SYS file '%s' failed", sysfile); fclose(fp); From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 15:06:00 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CAC4B380; Thu, 15 Nov 2012 15:06:00 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8E4048FC08; Thu, 15 Nov 2012 15:06:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFF60L5003805; Thu, 15 Nov 2012 15:06:00 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFF60BO003804; Thu, 15 Nov 2012 15:06:00 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211151506.qAFF60BO003804@svn.freebsd.org> From: Eitan Adler Date: Thu, 15 Nov 2012 15:06:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243075 - head/usr.bin/bc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 15:06:00 -0000 Author: eadler Date: Thu Nov 15 15:06:00 2012 New Revision: 243075 URL: http://svnweb.freebsd.org/changeset/base/243075 Log: Make definition match declaration Approved by: cperciva MFC after: 3 days Modified: head/usr.bin/bc/bc.y Modified: head/usr.bin/bc/bc.y ============================================================================== --- head/usr.bin/bc/bc.y Thu Nov 15 15:05:57 2012 (r243074) +++ head/usr.bin/bc/bc.y Thu Nov 15 15:06:00 2012 (r243075) @@ -1084,7 +1084,7 @@ escape(const char *str) } /* ARGSUSED */ -void +static void sigchld(int signo) { pid_t pid; From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 15:06:03 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9BBB83CF; Thu, 15 Nov 2012 15:06:03 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 80F098FC14; Thu, 15 Nov 2012 15:06:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFF633c003849; Thu, 15 Nov 2012 15:06:03 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFF63v0003848; Thu, 15 Nov 2012 15:06:03 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211151506.qAFF63v0003848@svn.freebsd.org> From: Eitan Adler Date: Thu, 15 Nov 2012 15:06:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243076 - head/usr.sbin/chkgrp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 15:06:03 -0000 Author: eadler Date: Thu Nov 15 15:06:03 2012 New Revision: 243076 URL: http://svnweb.freebsd.org/changeset/base/243076 Log: Check the range of the gid Approved by: cperciva MFC after: 1 week Modified: head/usr.sbin/chkgrp/chkgrp.c Modified: head/usr.sbin/chkgrp/chkgrp.c ============================================================================== --- head/usr.sbin/chkgrp/chkgrp.c Thu Nov 15 15:06:00 2012 (r243075) +++ head/usr.sbin/chkgrp/chkgrp.c Thu Nov 15 15:06:03 2012 (r243076) @@ -30,7 +30,10 @@ __FBSDID("$FreeBSD$"); #include +#include #include +#include +#include #include #include #include @@ -150,6 +153,18 @@ main(int argc, char *argv[]) warnx("%s: line %d: GID is not numeric", gfn, n); e++; } + + /* check the range of the group id */ + errno = 0; + unsigned long groupid = strtoul(f[2], NULL, 10); + if (errno != 0) { + warnx("%s: line %d: strtoul failed", gfn, n); + } + else if (groupid > GID_MAX) { + warnx("%s: line %d: group id is too large (> %ju)", + gfn, n, (uintmax_t)GID_MAX); + e++; + } #if 0 /* entry is correct, so print it */ From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 15:06:07 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1CCA44CF; Thu, 15 Nov 2012 15:06:06 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 766148FC15; Thu, 15 Nov 2012 15:06:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFF66hr003900; Thu, 15 Nov 2012 15:06:06 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFF66Kf003899; Thu, 15 Nov 2012 15:06:06 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211151506.qAFF66Kf003899@svn.freebsd.org> From: Eitan Adler Date: Thu, 15 Nov 2012 15:06:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243077 - head/usr.sbin/chkgrp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 15:06:07 -0000 Author: eadler Date: Thu Nov 15 15:06:06 2012 New Revision: 243077 URL: http://svnweb.freebsd.org/changeset/base/243077 Log: Fix error code if file isn't readable. Approved by: cperciva MFC after: 1 week Modified: head/usr.sbin/chkgrp/chkgrp.c Modified: head/usr.sbin/chkgrp/chkgrp.c ============================================================================== --- head/usr.sbin/chkgrp/chkgrp.c Thu Nov 15 15:06:03 2012 (r243076) +++ head/usr.sbin/chkgrp/chkgrp.c Thu Nov 15 15:06:06 2012 (r243077) @@ -73,7 +73,7 @@ main(int argc, char *argv[]) /* open group file */ if ((gf = fopen(gfn, "r")) == NULL) - err(EX_IOERR, "%s", gfn); /* XXX - is IO_ERR the correct exit code? */ + err(EX_NOINPUT, "%s", gfn); /* check line by line */ while (++n) { From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 15:06:09 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A2B59523; Thu, 15 Nov 2012 15:06:09 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 887DA8FC13; Thu, 15 Nov 2012 15:06:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFF69XX003942; Thu, 15 Nov 2012 15:06:09 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFF69YE003941; Thu, 15 Nov 2012 15:06:09 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211151506.qAFF69YE003941@svn.freebsd.org> From: Eitan Adler Date: Thu, 15 Nov 2012 15:06:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243078 - head/sys/dev/mfi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 15:06:09 -0000 Author: eadler Date: Thu Nov 15 15:06:09 2012 New Revision: 243078 URL: http://svnweb.freebsd.org/changeset/base/243078 Log: Add deviceid to the disk output on boot to help debugging. PR: kern/173290 Submitted by: Steven Hartland Approved by: cperciva MFC after: 1 week Modified: head/sys/dev/mfi/mfi_syspd.c Modified: head/sys/dev/mfi/mfi_syspd.c ============================================================================== --- head/sys/dev/mfi/mfi_syspd.c Thu Nov 15 15:06:06 2012 (r243077) +++ head/sys/dev/mfi/mfi_syspd.c Thu Nov 15 15:06:09 2012 (r243078) @@ -122,8 +122,8 @@ mfi_syspd_attach(device_t dev) break; } mtx_unlock(&sc->pd_controller->mfi_io_lock); - device_printf(dev, "%juMB (%ju sectors) SYSPD volume\n", - sectors / (1024 * 1024 / secsize), sectors); + device_printf(dev, "%juMB (%ju sectors) SYSPD volume (deviceid: %d)\n", + sectors / (1024 * 1024 / secsize), sectors, sc->pd_id); sc->pd_disk = disk_alloc(); sc->pd_disk->d_drv1 = sc; sc->pd_disk->d_maxsize = sc->pd_controller->mfi_max_io * secsize; From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 15:06:13 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5D106627; Thu, 15 Nov 2012 15:06:12 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8EAFB8FC14; Thu, 15 Nov 2012 15:06:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFF6C8k003990; Thu, 15 Nov 2012 15:06:12 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFF6CQn003988; Thu, 15 Nov 2012 15:06:12 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211151506.qAFF6CQn003988@svn.freebsd.org> From: Eitan Adler Date: Thu, 15 Nov 2012 15:06:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243079 - head/usr.bin/ministat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 15:06:13 -0000 Author: eadler Date: Thu Nov 15 15:06:12 2012 New Revision: 243079 URL: http://svnweb.freebsd.org/changeset/base/243079 Log: Add option to suppress just the plot in ministat while still retaining the relative comparison (i.e., useful part). Approved by: cperciva MFC after: 3 days Modified: head/usr.bin/ministat/ministat.1 head/usr.bin/ministat/ministat.c Modified: head/usr.bin/ministat/ministat.1 ============================================================================== --- head/usr.bin/ministat/ministat.1 Thu Nov 15 15:06:09 2012 (r243078) +++ head/usr.bin/ministat/ministat.1 Thu Nov 15 15:06:12 2012 (r243079) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 28, 2010 +.Dd November 10, 2012 .Dt MINISTAT 1 .Os .Sh NAME @@ -33,7 +33,7 @@ .Nd statistics utility .Sh SYNOPSIS .Nm -.Op Fl ns +.Op Fl Ans .Op Fl C Ar column .Op Fl c Ar confidence_level .Op Fl d Ar delimiter @@ -47,6 +47,9 @@ in the specified files or, if no file is .Pp The options are as follows: .Bl -tag -width Fl +.It Fl A +Just report the statistics of the input and relative comparisons, +suppress the ASCII-art plot. .It Fl n Just report the raw statistics of the input, suppress the ASCII-art plot and the relative comparisons. Modified: head/usr.bin/ministat/ministat.c ============================================================================== --- head/usr.bin/ministat/ministat.c Thu Nov 15 15:06:09 2012 (r243078) +++ head/usr.bin/ministat/ministat.c Thu Nov 15 15:06:12 2012 (r243079) @@ -509,7 +509,7 @@ usage(char const *whine) fprintf(stderr, "%s\n", whine); fprintf(stderr, - "Usage: ministat [-C column] [-c confidence] [-d delimiter(s)] [-ns] [-w width] [file [file ...]]\n"); + "Usage: ministat [-C column] [-c confidence] [-d delimiter(s)] [-Ans] [-w width] [file [file ...]]\n"); fprintf(stderr, "\tconfidence = {"); for (i = 0; i < NCONF; i++) { fprintf(stderr, "%s%g%%", @@ -517,6 +517,7 @@ usage(char const *whine) studentpct[i]); } fprintf(stderr, "}\n"); + fprintf(stderr, "\t-A : print statistics only. suppress the graph.\n"); fprintf(stderr, "\t-C : column number to extract (starts and defaults to 1)\n"); fprintf(stderr, "\t-d : delimiter(s) string, default to \" \\t\"\n"); fprintf(stderr, "\t-n : print summary statistics only, no graph/test\n"); @@ -538,6 +539,7 @@ main(int argc, char **argv) int flag_s = 0; int flag_n = 0; int termwidth = 74; + int suppress_plot = 0; if (isatty(STDOUT_FILENO)) { struct winsize wsz; @@ -550,8 +552,11 @@ main(int argc, char **argv) } ci = -1; - while ((c = getopt(argc, argv, "C:c:d:snw:")) != -1) + while ((c = getopt(argc, argv, "AC:c:d:snw:")) != -1) switch (c) { + case 'A': + suppress_plot = 1; + break; case 'C': column = strtol(optarg, &p, 10); if (p != NULL && *p != '\0') @@ -610,7 +615,7 @@ main(int argc, char **argv) for (i = 0; i < nds; i++) printf("%c %s\n", symbol[i+1], ds[i]->name); - if (!flag_n) { + if (!flag_n && !suppress_plot) { SetupPlot(termwidth, flag_s, nds); for (i = 0; i < nds; i++) DimPlot(ds[i]); From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 15:06:15 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B0518644; Thu, 15 Nov 2012 15:06:15 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 95C158FC0C; Thu, 15 Nov 2012 15:06:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFF6Fbk004034; Thu, 15 Nov 2012 15:06:15 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFF6FuS004033; Thu, 15 Nov 2012 15:06:15 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211151506.qAFF6FuS004033@svn.freebsd.org> From: Eitan Adler Date: Thu, 15 Nov 2012 15:06:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243080 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 15:06:15 -0000 Author: eadler Date: Thu Nov 15 15:06:15 2012 New Revision: 243080 URL: http://svnweb.freebsd.org/changeset/base/243080 Log: Only pass ip[46].addr when _addrl contains a value Submitted by: crees Reviewed by: Mike Jakubik Approved by: cperciva MFC after: 2 weeks Modified: head/etc/rc.d/jail Modified: head/etc/rc.d/jail ============================================================================== --- head/etc/rc.d/jail Thu Nov 15 15:06:12 2012 (r243079) +++ head/etc/rc.d/jail Thu Nov 15 15:06:15 2012 (r243080) @@ -656,7 +656,8 @@ jail_start() done eval ${_setfib} jail -n ${_jail} ${_flags} -i -c path=${_rootdir} host.hostname=${_hostname} \ - ip4.addr=\"${_addrl}\" ip6.addr=\"${_addr6l}\" ${_parameters} command=${_exec_start} > ${_tmp_jail} 2>&1 \ + ${_addrl:+ip4.addr=\"${_addrl}\"} ${_addr6l:+ip6.addr=\"${_addr6l}\"} \ + ${_parameters} command=${_exec_start} > ${_tmp_jail} 2>&1 \ Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CE6FF74B; Thu, 15 Nov 2012 15:06:18 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 86C188FC13; Thu, 15 Nov 2012 15:06:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFF6IBA004079; Thu, 15 Nov 2012 15:06:18 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFF6IBk004078; Thu, 15 Nov 2012 15:06:18 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211151506.qAFF6IBk004078@svn.freebsd.org> From: Eitan Adler Date: Thu, 15 Nov 2012 15:06:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243081 - head/usr.bin/chpass X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 15:06:18 -0000 Author: eadler Date: Thu Nov 15 15:06:18 2012 New Revision: 243081 URL: http://svnweb.freebsd.org/changeset/base/243081 Log: Avoid possible null deref if ypclnt_new returns null PR: bin/172979 Submitted by: Erik Cederstrand Approved by: cperciva MFC after: 3 days Modified: head/usr.bin/chpass/chpass.c Modified: head/usr.bin/chpass/chpass.c ============================================================================== --- head/usr.bin/chpass/chpass.c Thu Nov 15 15:06:15 2012 (r243080) +++ head/usr.bin/chpass/chpass.c Thu Nov 15 15:06:18 2012 (r243081) @@ -241,8 +241,11 @@ main(int argc, char *argv[]) #ifdef YP case _PWF_NIS: ypclnt = ypclnt_new(yp_domain, "passwd.byname", yp_host); - if (ypclnt == NULL || - ypclnt_connect(ypclnt) == -1 || + if (ypclnt == NULL) { + warnx("ypclnt_new failed"); + exit(1); + } + if (ypclnt_connect(ypclnt) == -1 || ypclnt_passwd(ypclnt, pw, password) == -1) { warnx("%s", ypclnt->error); ypclnt_free(ypclnt); From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 15:06:21 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B1A36797; Thu, 15 Nov 2012 15:06:21 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7D7738FC12; Thu, 15 Nov 2012 15:06:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFF6L71004123; Thu, 15 Nov 2012 15:06:21 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFF6LLt004122; Thu, 15 Nov 2012 15:06:21 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211151506.qAFF6LLt004122@svn.freebsd.org> From: Eitan Adler Date: Thu, 15 Nov 2012 15:06:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243082 - head/sbin/umount X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 15:06:21 -0000 Author: eadler Date: Thu Nov 15 15:06:21 2012 New Revision: 243082 URL: http://svnweb.freebsd.org/changeset/base/243082 Log: Fix memory leak in umount.c PR: bin/172553 Submitted by: Erik Cederstrand Approved by: cperciva MFC after: 3 days Modified: head/sbin/umount/umount.c Modified: head/sbin/umount/umount.c ============================================================================== --- head/sbin/umount/umount.c Thu Nov 15 15:06:18 2012 (r243081) +++ head/sbin/umount/umount.c Thu Nov 15 15:06:21 2012 (r243082) @@ -359,8 +359,10 @@ umountfs(struct statfs *sfs) do_rpc = 1; } - if (!namematch(ai)) + if (!namematch(ai)) { + free(orignfsdirname); return (1); + } /* First try to unmount using the file system ID. */ snprintf(fsidbuf, sizeof(fsidbuf), "FSID:%d:%d", sfs->f_fsid.val[0], sfs->f_fsid.val[1]); @@ -369,13 +371,16 @@ umountfs(struct statfs *sfs) if (errno != ENOENT || sfs->f_fsid.val[0] != 0 || sfs->f_fsid.val[1] != 0) warn("unmount of %s failed", sfs->f_mntonname); - if (errno != ENOENT) + if (errno != ENOENT) { + free(orignfsdirname); return (1); + } /* Compatibility for old kernels. */ if (sfs->f_fsid.val[0] != 0 || sfs->f_fsid.val[1] != 0) warnx("retrying using path instead of file system ID"); if (unmount(sfs->f_mntonname, fflag) != 0) { warn("unmount of %s failed", sfs->f_mntonname); + free(orignfsdirname); return (1); } } @@ -393,6 +398,7 @@ umountfs(struct statfs *sfs) if (clp == NULL) { warnx("%s: %s", hostp, clnt_spcreateerror("MOUNTPROG")); + free(orignfsdirname); return (1); } clp->cl_auth = authsys_create_default(); @@ -403,6 +409,7 @@ umountfs(struct statfs *sfs) if (clnt_stat != RPC_SUCCESS) { warnx("%s: %s", hostp, clnt_sperror(clp, "RPCMNT_UMOUNT")); + free(orignfsdirname); return (1); } /* @@ -415,10 +422,10 @@ umountfs(struct statfs *sfs) hostp, nfsdirname); free_mtab(); } - free(orignfsdirname); auth_destroy(clp->cl_auth); clnt_destroy(clp); } + free(orignfsdirname); return (0); } From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 15:06:24 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AC4808B7; Thu, 15 Nov 2012 15:06:24 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 78D768FC17; Thu, 15 Nov 2012 15:06:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFF6OtY004168; Thu, 15 Nov 2012 15:06:24 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFF6OEE004167; Thu, 15 Nov 2012 15:06:24 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211151506.qAFF6OEE004167@svn.freebsd.org> From: Eitan Adler Date: Thu, 15 Nov 2012 15:06:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243083 - head/usr.sbin/chkgrp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 15:06:24 -0000 Author: eadler Date: Thu Nov 15 15:06:24 2012 New Revision: 243083 URL: http://svnweb.freebsd.org/changeset/base/243083 Log: Be declarative about if an error has occured. Fixes overflow on very large group files with lots of errors. This is unlikely to occur in practice. Approved by: cperciva MFC after: 1 week Modified: head/usr.sbin/chkgrp/chkgrp.c Modified: head/usr.sbin/chkgrp/chkgrp.c ============================================================================== --- head/usr.sbin/chkgrp/chkgrp.c Thu Nov 15 15:06:21 2012 (r243082) +++ head/usr.sbin/chkgrp/chkgrp.c Thu Nov 15 15:06:24 2012 (r243083) @@ -81,7 +81,7 @@ main(int argc, char *argv[]) break; if (len > 0 && line[len - 1] != '\n') { warnx("%s: line %d: no newline character", gfn, n); - e++; + e = 1; } while (len && isspace(line[len-1])) len--; @@ -114,14 +114,14 @@ main(int argc, char *argv[]) warnx("%s: line %d: missing field(s)", gfn, n); for ( ; k < 4; k++) f[k] = empty; - e++; + e = 1; } for (cp = f[0] ; *cp ; cp++) { if (!isalnum(*cp) && *cp != '.' && *cp != '_' && *cp != '-' && (cp > f[0] || *cp != '+')) { warnx("%s: line %d: '%c' invalid character", gfn, n, *cp); - e++; + e = 1; } } @@ -129,14 +129,14 @@ main(int argc, char *argv[]) if (!isalnum(*cp) && *cp != '.' && *cp != '_' && *cp != '-' && *cp != ',') { warnx("%s: line %d: '%c' invalid character", gfn, n, *cp); - e++; + e = 1; } } /* check if fourth field ended with a colon */ if (i < len) { warnx("%s: line %d: too many fields", gfn, n); - e++; + e = 1; } /* check that none of the fields contain whitespace */ @@ -144,14 +144,14 @@ main(int argc, char *argv[]) if (strcspn(f[k], " \t") != strlen(f[k])) { warnx("%s: line %d: field %d contains whitespace", gfn, n, k+1); - e++; + e = 1; } } /* check that the GID is numeric */ if (strspn(f[2], "0123456789") != strlen(f[2])) { warnx("%s: line %d: GID is not numeric", gfn, n); - e++; + e = 1; } /* check the range of the group id */ @@ -163,7 +163,7 @@ main(int argc, char *argv[]) else if (groupid > GID_MAX) { warnx("%s: line %d: group id is too large (> %ju)", gfn, n, (uintmax_t)GID_MAX); - e++; + e = 1; } #if 0 From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 15:16:51 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 867F817D2; Thu, 15 Nov 2012 15:16:51 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 679B48FC08; Thu, 15 Nov 2012 15:16:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFFGpbV005964; Thu, 15 Nov 2012 15:16:51 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFFGp38005962; Thu, 15 Nov 2012 15:16:51 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211151516.qAFFGp38005962@svn.freebsd.org> From: Eitan Adler Date: Thu, 15 Nov 2012 15:16:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243084 - head/usr.sbin/chkgrp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 15:16:51 -0000 Author: eadler Date: Thu Nov 15 15:16:50 2012 New Revision: 243084 URL: http://svnweb.freebsd.org/changeset/base/243084 Log: Add support for a -q flag. While here make the custom argument parsing use getopt instead of hacking on it more. This change also fixes the method of silencing the compiler warning about gfn being used uninitialized. Approved by: cperciva MFC after: 1 week Modified: head/usr.sbin/chkgrp/chkgrp.8 head/usr.sbin/chkgrp/chkgrp.c Modified: head/usr.sbin/chkgrp/chkgrp.8 ============================================================================== --- head/usr.sbin/chkgrp/chkgrp.8 Thu Nov 15 15:06:24 2012 (r243083) +++ head/usr.sbin/chkgrp/chkgrp.8 Thu Nov 15 15:16:50 2012 (r243084) @@ -34,6 +34,7 @@ .Nd check the syntax of the group file .Sh SYNOPSIS .Nm +.Op Fl q .Op Ar groupfile .Sh DESCRIPTION The @@ -47,6 +48,12 @@ contains whitespace, and that the third numeric. It will also check for invalid characters in the group names and group members. +The following options are available: +.Bl -tag -width indent +.It Fl q +This option disables printing of text when the group format +is correct. +.El .Sh FILES .Bl -tag -width /etc/group -compact .It Pa /etc/group Modified: head/usr.sbin/chkgrp/chkgrp.c ============================================================================== --- head/usr.sbin/chkgrp/chkgrp.c Thu Nov 15 15:06:24 2012 (r243083) +++ head/usr.sbin/chkgrp/chkgrp.c Thu Nov 15 15:16:50 2012 (r243084) @@ -37,11 +37,12 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include static char empty[] = { 0 }; -static void +static void __dead2 usage(void) { fprintf(stderr, "usage: chkgrp [groupfile]\n"); @@ -53,24 +54,33 @@ main(int argc, char *argv[]) { unsigned int i; size_t len; + int quiet; + int ch; int n = 0, k, e = 0; char *line, *f[4], *p; const char *cp, *gfn; FILE *gf; - /* check arguments */ - switch (argc) { - case 1: - gfn = "/etc/group"; - break; - case 2: - gfn = argv[1]; - break; - default: - gfn = NULL; /* silence compiler */ - usage(); + quiet = 0; + while ((ch = getopt(argc, argv, "q")) != -1) { + switch (ch) { + case 'q': + quiet = 1; + break; + case '?': + default: + printf("hello\n"); + usage(); + } } + if (optind == argc) + gfn = "/etc/group"; + else if (optind == argc - 1) + gfn = argv[optind]; + else + usage(); + /* open group file */ if ((gf = fopen(gfn, "r")) == NULL) err(EX_NOINPUT, "%s", gfn); @@ -178,7 +188,7 @@ main(int argc, char *argv[]) /* done */ fclose(gf); - if (e == 0) + if (e == 0 && quiet == 0) printf("%s is fine\n", gfn); exit(e ? EX_DATAERR : EX_OK); } From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 15:18:58 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0E4191959 for ; Thu, 15 Nov 2012 15:18:58 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 716628FC14 for ; Thu, 15 Nov 2012 15:18:57 +0000 (UTC) Received: by mail-lb0-f182.google.com with SMTP id gg13so1714930lbb.13 for ; Thu, 15 Nov 2012 07:18:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=M4/2o530IOEU2M86rTC1ptudWw25xzVwV14+f0M2qsA=; b=DD3tc43HsYOb05yfxjHyIzD40vUy2caksoVVYSYvGQ3h50ym6iuPInMhH1CnBB8JHg BF7MpYSF3caL3ZGmJatRyiOJHVE+Qb+qlPZef5YTNa11KuoUg1nMrKwYO/O5hmwe6nxE p0BMGTKypjYrtiq4vRTlK1C0BZdmACNmZ7BMw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type :x-gm-message-state; bh=M4/2o530IOEU2M86rTC1ptudWw25xzVwV14+f0M2qsA=; b=Arq9pV0gY0gLvkn3HFdePzrgKiijFf7vhzM9t6kaG4rLk+kvZlBatRHYpaQKeKxS5P Pvhoi3lrzzyA7zcA8Ry57M9CJ5vj2OwL4uN+lH5EWgj3cBzChDisWo9h3pf7bojd3QRz 9gw8tX6IyjrdLSS+PfzdpF5LWJzcSQbJIqseeCdtxufO539+TXZ4aiBEycUbz76oxxv2 MQA5rTGo4cdfWHlNooyTBW07jm6WVH/0Vi2pQ3w9TpTLrqE9MQehWaMoffHb9uhLkwEF B5pdFICh9omeARSHJeva0K6Au+B9rNpdgViVOqUE/+ZXHMWVm6JdGkWy8bpdfmPjPTmy Hqmw== Received: by 10.112.103.136 with SMTP id fw8mr758048lbb.18.1352992736325; Thu, 15 Nov 2012 07:18:56 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.112.25.166 with HTTP; Thu, 15 Nov 2012 07:18:25 -0800 (PST) In-Reply-To: <201211151516.qAFFGp38005962@svn.freebsd.org> References: <201211151516.qAFFGp38005962@svn.freebsd.org> From: Eitan Adler Date: Thu, 15 Nov 2012 10:18:25 -0500 X-Google-Sender-Auth: 7UafQ3j7jM_ek-2FH_2xMfTQDoU Message-ID: Subject: Re: svn commit: r243084 - head/usr.sbin/chkgrp To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQmAvMb4iKgyyZs0nukm201/rPhr+XXtsbDEUSVigZwRfDtf+MHPX+FBX4S/rWe2sQ9pC34h X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 15:18:58 -0000 On 15 November 2012 10:16, Eitan Adler wrote: > + printf("hello\n"); oops - grabbed the wrong commit - fixing now -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 15:21:58 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 841391C3A; Thu, 15 Nov 2012 15:21:58 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6910F8FC13; Thu, 15 Nov 2012 15:21:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFFLwd4006778; Thu, 15 Nov 2012 15:21:58 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFFLwJW006777; Thu, 15 Nov 2012 15:21:58 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211151521.qAFFLwJW006777@svn.freebsd.org> From: Eitan Adler Date: Thu, 15 Nov 2012 15:21:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243085 - head/usr.sbin/chkgrp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 15:21:58 -0000 Author: eadler Date: Thu Nov 15 15:21:58 2012 New Revision: 243085 URL: http://svnweb.freebsd.org/changeset/base/243085 Log: This wasn't supposed to be in there - I committed the wrong patch. Approved by: cperciva (implicit) Modified: head/usr.sbin/chkgrp/chkgrp.c Modified: head/usr.sbin/chkgrp/chkgrp.c ============================================================================== --- head/usr.sbin/chkgrp/chkgrp.c Thu Nov 15 15:16:50 2012 (r243084) +++ head/usr.sbin/chkgrp/chkgrp.c Thu Nov 15 15:21:58 2012 (r243085) @@ -69,7 +69,6 @@ main(int argc, char *argv[]) break; case '?': default: - printf("hello\n"); usage(); } } From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 15:30:48 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8A3E11EC6; Thu, 15 Nov 2012 15:30:48 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 966708FC0C; Thu, 15 Nov 2012 15:30:44 +0000 (UTC) Received: from tom.home (localhost [127.0.0.1]) by kib.kiev.ua (8.14.5/8.14.5) with ESMTP id qAFFUUNj055266; Thu, 15 Nov 2012 17:30:30 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.7.1 kib.kiev.ua qAFFUUNj055266 Received: (from kostik@localhost) by tom.home (8.14.5/8.14.5/Submit) id qAFFUUiV055265; Thu, 15 Nov 2012 17:30:30 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 15 Nov 2012 17:30:30 +0200 From: Konstantin Belousov To: Eitan Adler Subject: Re: svn commit: r243076 - head/usr.sbin/chkgrp Message-ID: <20121115153030.GD73505@kib.kiev.ua> References: <201211151506.qAFF63v0003848@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vAuP2vENPacJU4tn" Content-Disposition: inline In-Reply-To: <201211151506.qAFF63v0003848@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=0.2 required=5.0 tests=ALL_TRUSTED, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 15:30:48 -0000 --vAuP2vENPacJU4tn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 15, 2012 at 03:06:03PM +0000, Eitan Adler wrote: > Author: eadler > Date: Thu Nov 15 15:06:03 2012 > New Revision: 243076 > URL: http://svnweb.freebsd.org/changeset/base/243076 >=20 > Log: > Check the range of the gid > =20 > Approved by: cperciva > MFC after: 1 week >=20 > Modified: > head/usr.sbin/chkgrp/chkgrp.c >=20 > Modified: head/usr.sbin/chkgrp/chkgrp.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.sbin/chkgrp/chkgrp.c Thu Nov 15 15:06:00 2012 (r243075) > +++ head/usr.sbin/chkgrp/chkgrp.c Thu Nov 15 15:06:03 2012 (r243076) > @@ -30,7 +30,10 @@ > __FBSDID("$FreeBSD$"); > =20 > #include > +#include > #include > +#include > +#include > #include > #include > #include > @@ -150,6 +153,18 @@ main(int argc, char *argv[]) > warnx("%s: line %d: GID is not numeric", gfn, n); > e++; > } > + > + /* check the range of the group id */ > + errno =3D 0; > + unsigned long groupid =3D strtoul(f[2], NULL, 10); And this violates style. The checks for strtoul failure are not exhaustive. > + if (errno !=3D 0) { > + warnx("%s: line %d: strtoul failed", gfn, n); > + } > + else if (groupid > GID_MAX) { > + warnx("%s: line %d: group id is too large (> %ju)", > + gfn, n, (uintmax_t)GID_MAX); > + e++; > + } > =09 > #if 0 > /* entry is correct, so print it */ --vAuP2vENPacJU4tn Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlClCpYACgkQC3+MBN1Mb4h+UQCdFCogE7/C8sllwbqEsB/TQcRG UFUAoJql4ZcK0jdkFsz/tt04dhITk6Bu =bXBb -----END PGP SIGNATURE----- --vAuP2vENPacJU4tn-- From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 15:55:50 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2779F7F0; Thu, 15 Nov 2012 15:55:50 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0D5F18FC0C; Thu, 15 Nov 2012 15:55:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFFtnoF011725; Thu, 15 Nov 2012 15:55:49 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFFtn1J011724; Thu, 15 Nov 2012 15:55:49 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201211151555.qAFFtn1J011724@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 15 Nov 2012 15:55:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243088 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 15:55:50 -0000 Author: trasz Date: Thu Nov 15 15:55:49 2012 New Revision: 243088 URL: http://svnweb.freebsd.org/changeset/base/243088 Log: Improve KASSERT messages in racct, to make it clear which resource caused the problem. Submitted by: mjg Modified: head/sys/kern/kern_racct.c Modified: head/sys/kern/kern_racct.c ============================================================================== --- head/sys/kern/kern_racct.c Thu Nov 15 15:49:37 2012 (r243087) +++ head/sys/kern/kern_racct.c Thu Nov 15 15:55:49 2012 (r243088) @@ -385,9 +385,11 @@ racct_add_racct(struct racct *dest, cons */ for (i = 0; i <= RACCT_MAX; i++) { KASSERT(dest->r_resources[i] >= 0, - ("racct propagation meltdown: dest < 0")); + ("%s: resource %d propagation meltdown: dest < 0", + __func__, i)); KASSERT(src->r_resources[i] >= 0, - ("racct propagation meltdown: src < 0")); + ("%s: resource %d propagation meltdown: src < 0", + __func__, i)); dest->r_resources[i] += src->r_resources[i]; } } @@ -405,18 +407,21 @@ racct_sub_racct(struct racct *dest, cons for (i = 0; i <= RACCT_MAX; i++) { if (!RACCT_IS_SLOPPY(i) && !RACCT_IS_DECAYING(i)) { KASSERT(dest->r_resources[i] >= 0, - ("racct propagation meltdown: dest < 0")); + ("%s: resource %d propagation meltdown: dest < 0", + __func__, i)); KASSERT(src->r_resources[i] >= 0, - ("racct propagation meltdown: src < 0")); + ("%s: resource %d propagation meltdown: src < 0", + __func__, i)); KASSERT(src->r_resources[i] <= dest->r_resources[i], - ("racct propagation meltdown: src > dest")); + ("%s: resource %d propagation meltdown: src > dest", + __func__, i)); } if (RACCT_CAN_DROP(i)) { dest->r_resources[i] -= src->r_resources[i]; if (dest->r_resources[i] < 0) { KASSERT(RACCT_IS_SLOPPY(i) || RACCT_IS_DECAYING(i), - ("racct_sub_racct: usage < 0")); + ("%s: resource %d usage < 0", __func__, i)); dest->r_resources[i] = 0; } } @@ -487,7 +492,7 @@ racct_alloc_resource(struct racct *racct racct->r_resources[resource] += amount; if (racct->r_resources[resource] < 0) { KASSERT(RACCT_IS_SLOPPY(resource) || RACCT_IS_DECAYING(resource), - ("racct_alloc_resource: usage < 0")); + ("%s: resource %d usage < 0", __func__, resource)); racct->r_resources[resource] = 0; } @@ -633,7 +638,7 @@ racct_set_locked(struct proc *p, int res diff_cred = diff_proc; #ifdef notyet KASSERT(diff_proc >= 0 || RACCT_CAN_DROP(resource), - ("racct_set: usage of non-droppable resource %d dropping", + ("%s: usage of non-droppable resource %d dropping", __func__, resource)); #endif #ifdef RCTL @@ -782,12 +787,12 @@ racct_sub(struct proc *p, int resource, */ PROC_LOCK_ASSERT(p, MA_OWNED); KASSERT(RACCT_CAN_DROP(resource), - ("racct_sub: called for non-droppable resource %d", resource)); + ("%s: called for non-droppable resource %d", __func__, resource)); mtx_lock(&racct_lock); KASSERT(amount <= p->p_racct->r_resources[resource], - ("racct_sub: freeing %ju of resource %d, which is more " - "than allocated %jd for %s (pid %d)", amount, resource, + ("%s: freeing %ju of resource %d, which is more " + "than allocated %jd for %s (pid %d)", __func__, amount, resource, (intmax_t)p->p_racct->r_resources[resource], p->p_comm, p->p_pid)); racct_alloc_resource(p->p_racct, resource, -amount); @@ -805,7 +810,7 @@ racct_sub_cred_locked(struct ucred *cred #ifdef notyet KASSERT(RACCT_CAN_DROP(resource), - ("racct_sub_cred: called for resource %d which can not drop", + ("%s: called for resource %d which can not drop", __func__, resource)); #endif From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 16:21:36 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ADEAC6A for ; Thu, 15 Nov 2012 16:21:36 +0000 (UTC) (envelope-from postmaster@mailpod.hostingplatform.com) Received: from atl4mhob11.myregisteredsite.com (atl4mhob11.myregisteredsite.com [209.17.115.49]) by mx1.freebsd.org (Postfix) with ESMTP id 5EBE08FC12 for ; Thu, 15 Nov 2012 16:21:36 +0000 (UTC) Received: from mailpod1.hostingplatform.com (mailpod1.networksolutionsemail.com [206.188.198.65]) by atl4mhob11.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAFGLZ13011704 for ; Thu, 15 Nov 2012 11:21:35 -0500 Received: (qmail 16150 invoked by uid 0); 15 Nov 2012 16:01:49 -0000 Received: (qmail 12711 invoked by uid 0); 15 Nov 2012 15:06:49 -0000 Received: from unknown (HELO atl4mhib22.myregisteredsite.com) (209) by 0 with SMTP; 15 Nov 2012 15:06:49 -0000 Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by atl4mhib22.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAFF6mjG018743 for ; Thu, 15 Nov 2012 10:06:48 -0500 Received: from hub.freebsd.org (hub.FreeBSD.org [8.8.178.136]) by mx2.freebsd.org (Postfix) with ESMTP id 77E793B6D62; Thu, 15 Nov 2012 15:06:22 +0000 (UTC) Received: from hub.FreeBSD.org (hub.FreeBSD.org [8.8.178.136]) by hub.freebsd.org (Postfix) with ESMTP id 4D842501; Thu, 15 Nov 2012 15:06:07 +0000 (UTC) (envelope-from owner-svn-src-all@freebsd.org) Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C6B6D163; Thu, 15 Nov 2012 15:05:51 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id ABA2B8FC14; Thu, 15 Nov 2012 15:05:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFF5pj3003660; Thu, 15 Nov 2012 15:05:51 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFF5pVc003659; Thu, 15 Nov 2012 15:05:51 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211151505.qAFF5pVc003659@svn.freebsd.org> From: Eitan Adler Date: Thu, 15 Nov 2012 15:05:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243072 - head/bin/mv X-SVN-Group: head MIME-Version: 1.0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: owner-svn-src-all@freebsd.org Sender: owner-svn-src-all@freebsd.org X-SpamScore: 0 X-MailHub-Apparently-To: mjm@michaelmeltzer.com X-MailHub-Forwarded: Yes X-BeenThere: svn-src-head@freebsd.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 16:21:36 -0000 Author: eadler Date: Thu Nov 15 15:05:51 2012 New Revision: 243072 URL: http://svnweb.freebsd.org/changeset/base/243072 Log: Follow the behavior as specified in POSIX: if (exists AND (NOT f_option) AND ((not_writable AND input_is_terminal) OR i_option)) prompt in particular, add the test for input_is_terminal PR: bin/173039 Submitted by: Mark Johnston Approved by: cperciva MFC after: 3 days Modified: head/bin/mv/mv.c Modified: head/bin/mv/mv.c ============================================================================== --- head/bin/mv/mv.c Thu Nov 15 15:05:47 2012 (r243071) +++ head/bin/mv/mv.c Thu Nov 15 15:05:51 2012 (r243072) @@ -199,7 +199,7 @@ do_move(const char *from, const char *to } else if (iflg) { (void)fprintf(stderr, "overwrite %s? %s", to, YESNO); ask = 1; - } else if (access(to, W_OK) && !stat(to, &sb)) { + } else if (access(to, W_OK) && !stat(to, &sb) && isatty(STDIN_FILENO)) { strmode(sb.st_mode, modep); (void)fprintf(stderr, "override %s%s%s/%s for %s? %s", modep + 1, modep[9] == ' ' ? "" : " ", _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 16:26:43 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3AF2133C for ; Thu, 15 Nov 2012 16:26:43 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 9F2238FC17 for ; Thu, 15 Nov 2012 16:26:42 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id j13so1715028lah.13 for ; Thu, 15 Nov 2012 08:26:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=k1QC+tqawrBpaU+mvEs7MpFeXqBf3krJc6KjbpYjuE4=; b=TM0MMgKjE8lZb8RqopMXBOAL6DPv60S4kumoNM+E9S8nOFCYt0rQGD2p7TjK9sR0jr LBrAmZAo58b97MvnEWS6FPrGbiSPNWVGaBJlGBwN866zNGaWBKCSZdjib7WEJ40cOT9r O2ULJWTUEH8ZIE6yljk5Ihl2LkndbScSMc6g0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=k1QC+tqawrBpaU+mvEs7MpFeXqBf3krJc6KjbpYjuE4=; b=aLUoZsKWIUGtQdts5TlpOkMphMGQFXBEzZ/xmuHP8jPbbqQxYLCCPm8LrtcjbGvw6+ WPmyKiE7g3aUPznH/1u4uxGi1D6q20yEhn+ZxrJQBwIzMr6oU2Hw30Iyrr+lZv4mNCra p3WcS7Kx9ZF0p53GVQtlbuFPIa/uMbHJRIWk5WV8pmMWfQC76ADDHVnBIE+vbX5lXlch UutdIqEtk5/+sLi8dMAFxDuiswIlODQDIMcgjXeGGioDbswvfTvd7pU5pn3MMthakIIA 1TVVZkgECibqLflhwBP405XsDjJX7SYsyIDGDEXPOkflMNxPXlvyArt9XRU2ubuGT32E ZEsg== Received: by 10.112.100.102 with SMTP id ex6mr809644lbb.130.1352996801168; Thu, 15 Nov 2012 08:26:41 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.112.25.166 with HTTP; Thu, 15 Nov 2012 08:26:10 -0800 (PST) In-Reply-To: <20121115153030.GD73505@kib.kiev.ua> References: <201211151506.qAFF63v0003848@svn.freebsd.org> <20121115153030.GD73505@kib.kiev.ua> From: Eitan Adler Date: Thu, 15 Nov 2012 11:26:10 -0500 X-Google-Sender-Auth: B2o9YISObvKAxMOUiXKRBcKSeys Message-ID: Subject: Re: svn commit: r243076 - head/usr.sbin/chkgrp To: Konstantin Belousov Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQkMxV2MhT6iYwobM1vaRAah4D7XyySXVrtL1DyUAoIu/qtOKld5hNLcjeMc7cVJyGnsKiEg Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 16:26:43 -0000 On 15 November 2012 10:30, Konstantin Belousov wrote: > On Thu, Nov 15, 2012 at 03:06:03PM +0000, Eitan Adler wrote: >> Author: eadler >> Date: Thu Nov 15 15:06:03 2012 >> New Revision: 243076 >> URL: http://svnweb.freebsd.org/changeset/base/243076 >> >> Log: >> Check the range of the gid >> >> Approved by: cperciva >> MFC after: 1 week >> >> Modified: >> head/usr.sbin/chkgrp/chkgrp.c >> >> Modified: head/usr.sbin/chkgrp/chkgrp.c >> ============================================================================== >> --- head/usr.sbin/chkgrp/chkgrp.c Thu Nov 15 15:06:00 2012 (r243075) >> +++ head/usr.sbin/chkgrp/chkgrp.c Thu Nov 15 15:06:03 2012 (r243076) >> @@ -30,7 +30,10 @@ >> __FBSDID("$FreeBSD$"); >> >> #include >> +#include >> #include >> +#include >> +#include >> #include >> #include >> #include >> @@ -150,6 +153,18 @@ main(int argc, char *argv[]) >> warnx("%s: line %d: GID is not numeric", gfn, n); >> e++; >> } >> + >> + /* check the range of the group id */ >> + errno = 0; >> + unsigned long groupid = strtoul(f[2], NULL, 10); > And this violates style. > The checks for strtoul failure are not exhaustive. from the strtoul man page: ==== ... In all cases, errno is set to ERANGE. If no conversion could be performed, 0 is returned and the global variable errno is set to EINVAL (the last feature is not por- table across all platforms). === What is missing? Is there a case where strtoul fails but errno == 0 ? -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 16:33:47 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CDA9866B for ; Thu, 15 Nov 2012 16:33:47 +0000 (UTC) (envelope-from postmaster@mailpod.hostingplatform.com) Received: from atl4mhfb01.myregisteredsite.com (atl4mhfb01.myregisteredsite.com [209.17.115.55]) by mx1.freebsd.org (Postfix) with ESMTP id 7AC748FC13 for ; Thu, 15 Nov 2012 16:33:47 +0000 (UTC) Received: from atl4mhob06.myregisteredsite.com (atl4mhob06.myregisteredsite.com [209.17.115.44]) by atl4mhfb01.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAFGXfUm028200 for ; Thu, 15 Nov 2012 11:33:41 -0500 Received: from mailpod1.hostingplatform.com (mailpod1.networksolutionsemail.com [206.188.198.65]) by atl4mhob06.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAFGXZfK029428 for ; Thu, 15 Nov 2012 11:33:35 -0500 Received: (qmail 23129 invoked by uid 0); 15 Nov 2012 15:51:48 -0000 Received: (qmail 16352 invoked by uid 0); 15 Nov 2012 15:06:58 -0000 Received: from unknown (HELO atl4mhib28.myregisteredsite.com) (209) by 0 with SMTP; 15 Nov 2012 15:06:58 -0000 Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by atl4mhib28.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAFF6vMP006664 for ; Thu, 15 Nov 2012 10:06:57 -0500 Received: from hub.freebsd.org (hub.FreeBSD.org [8.8.178.136]) by mx2.freebsd.org (Postfix) with ESMTP id BD8113B6F52; Thu, 15 Nov 2012 15:06:46 +0000 (UTC) Received: from hub.FreeBSD.org (hub.FreeBSD.org [8.8.178.136]) by hub.freebsd.org (Postfix) with ESMTP id 037B1776; Thu, 15 Nov 2012 15:06:19 +0000 (UTC) (envelope-from owner-svn-src-all@freebsd.org) Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BF376267; Thu, 15 Nov 2012 15:05:54 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A57E78FC08; Thu, 15 Nov 2012 15:05:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFF5snY003709; Thu, 15 Nov 2012 15:05:54 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFF5sXI003708; Thu, 15 Nov 2012 15:05:54 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211151505.qAFF5sXI003708@svn.freebsd.org> From: Eitan Adler Date: Thu, 15 Nov 2012 15:05:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243073 - head/share/termcap X-SVN-Group: head MIME-Version: 1.0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: owner-svn-src-all@freebsd.org Sender: owner-svn-src-all@freebsd.org X-SpamScore: 0 X-MailHub-Apparently-To: mjm@michaelmeltzer.com X-MailHub-Forwarded: Yes X-BeenThere: svn-src-head@freebsd.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 16:33:48 -0000 Author: eadler Date: Thu Nov 15 15:05:54 2012 New Revision: 243073 URL: http://svnweb.freebsd.org/changeset/base/243073 Log: Some software, notably dialog(1), can understand back-tab, which is typically bound to Shift-Tab. syscons produces ^]]Z for Shift-Tab, like many VT100-like terminal (emulators). The plain xterm does not produce this sequence, but ^I for both Tab and Shift-Tab. PR: conf/162787 PR: bin/151229 Submitted by: Stefan Bethke Submitted by: Bruce Cran Approved by: cperciva MFC after: 3 days Modified: head/share/termcap/termcap.src Modified: head/share/termcap/termcap.src ============================================================================== --- head/share/termcap/termcap.src Thu Nov 15 15:05:51 2012 (r243072) +++ head/share/termcap/termcap.src Thu Nov 15 15:05:54 2012 (r243073) @@ -2825,7 +2825,7 @@ xterm-basic|modern xterm common:\ :as=\E(0:bl=^G:cd=\E[J:ce=\E[K:cl=\E[H\E[2J:\ :cm=\E[%i%d;%dH:cs=\E[%i%d;%dr:ct=\E[3g:dc=\E[P:dl=\E[M:\ :ei=\E[4l:ho=\E[H:im=\E[4h:is=\E[!p\E[?3;4l\E[4l\E>:\ - :kD=\E[3~:kb=^H:ke=\E[?1l\E>:ks=\E[?1h\E=:le=^H:md=\E[1m:\ + :kD=\E[3~:kb=^H:ke=\E[?1l\E>:ks=\E[?1h\E=:kB=\E[Z:le=^H:md=\E[1m:\ :me=\E[m:ml=\El:mr=\E[7m:mu=\Em:nd=\E[C:op=\E[39;49m:\ :rc=\E8:rs=\E[!p\E[?3;4l\E[4l\E>:sc=\E7:se=\E[27m:sf=^J:\ :so=\E[7m:sr=\EM:st=\EH:\ _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 16:40:59 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 24233AE4 for ; Thu, 15 Nov 2012 16:40:59 +0000 (UTC) (envelope-from postmaster@mailpod.hostingplatform.com) Received: from atl4mhob09.myregisteredsite.com (atl4mhob09.myregisteredsite.com [209.17.115.47]) by mx1.freebsd.org (Postfix) with ESMTP id C585C8FC12 for ; Thu, 15 Nov 2012 16:40:58 +0000 (UTC) Received: from mailpod1.hostingplatform.com (mailpod1.networksolutionsemail.com [206.188.198.65]) by atl4mhob09.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAFGevrT026350 for ; Thu, 15 Nov 2012 11:40:57 -0500 Received: (qmail 14584 invoked by uid 0); 15 Nov 2012 15:59:34 -0000 Received: (qmail 31924 invoked by uid 0); 15 Nov 2012 15:08:15 -0000 Received: from unknown (HELO atl4mhib24.myregisteredsite.com) (209) by 0 with SMTP; 15 Nov 2012 15:08:15 -0000 Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by atl4mhib24.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAFF7W1k000554 for ; Thu, 15 Nov 2012 10:07:32 -0500 Received: from hub.freebsd.org (hub.FreeBSD.org [8.8.178.136]) by mx2.freebsd.org (Postfix) with ESMTP id F35473B72B1; Thu, 15 Nov 2012 15:07:09 +0000 (UTC) Received: from hub.FreeBSD.org (hub.FreeBSD.org [8.8.178.136]) by hub.freebsd.org (Postfix) with ESMTP id 437F7DD3; Thu, 15 Nov 2012 15:06:48 +0000 (UTC) (envelope-from owner-svn-src-all@freebsd.org) Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9BBB83CF; Thu, 15 Nov 2012 15:06:03 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 80F098FC14; Thu, 15 Nov 2012 15:06:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFF633c003849; Thu, 15 Nov 2012 15:06:03 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFF63v0003848; Thu, 15 Nov 2012 15:06:03 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211151506.qAFF63v0003848@svn.freebsd.org> From: Eitan Adler Date: Thu, 15 Nov 2012 15:06:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243076 - head/usr.sbin/chkgrp X-SVN-Group: head MIME-Version: 1.0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: owner-svn-src-all@freebsd.org Sender: owner-svn-src-all@freebsd.org X-SpamScore: 0 X-MailHub-Apparently-To: mjm@michaelmeltzer.com X-MailHub-Forwarded: Yes X-BeenThere: svn-src-head@freebsd.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 16:40:59 -0000 Author: eadler Date: Thu Nov 15 15:06:03 2012 New Revision: 243076 URL: http://svnweb.freebsd.org/changeset/base/243076 Log: Check the range of the gid Approved by: cperciva MFC after: 1 week Modified: head/usr.sbin/chkgrp/chkgrp.c Modified: head/usr.sbin/chkgrp/chkgrp.c ============================================================================== --- head/usr.sbin/chkgrp/chkgrp.c Thu Nov 15 15:06:00 2012 (r243075) +++ head/usr.sbin/chkgrp/chkgrp.c Thu Nov 15 15:06:03 2012 (r243076) @@ -30,7 +30,10 @@ __FBSDID("$FreeBSD$"); #include +#include #include +#include +#include #include #include #include @@ -150,6 +153,18 @@ main(int argc, char *argv[]) warnx("%s: line %d: GID is not numeric", gfn, n); e++; } + + /* check the range of the group id */ + errno = 0; + unsigned long groupid = strtoul(f[2], NULL, 10); + if (errno != 0) { + warnx("%s: line %d: strtoul failed", gfn, n); + } + else if (groupid > GID_MAX) { + warnx("%s: line %d: group id is too large (> %ju)", + gfn, n, (uintmax_t)GID_MAX); + e++; + } #if 0 /* entry is correct, so print it */ _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 16:41:10 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D06CCC02 for ; Thu, 15 Nov 2012 16:41:10 +0000 (UTC) (envelope-from postmaster@mailpod.hostingplatform.com) Received: from atl4mhob05.myregisteredsite.com (atl4mhob05.myregisteredsite.com [209.17.115.43]) by mx1.freebsd.org (Postfix) with ESMTP id 82FD38FC1A for ; Thu, 15 Nov 2012 16:41:10 +0000 (UTC) Received: from mailpod1.hostingplatform.com (mailpod1.networksolutionsemail.com [206.188.198.65]) by atl4mhob05.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAFGfA9d015968 for ; Thu, 15 Nov 2012 11:41:10 -0500 Received: (qmail 30493 invoked by uid 0); 15 Nov 2012 16:06:35 -0000 Received: (qmail 11257 invoked by uid 0); 15 Nov 2012 15:06:42 -0000 Received: from unknown (HELO atl4mhib45.myregisteredsite.com) (209) by 0 with SMTP; 15 Nov 2012 15:06:42 -0000 Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by atl4mhib45.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAFF6fm3027023 for ; Thu, 15 Nov 2012 10:06:41 -0500 Received: from hub.freebsd.org (hub.FreeBSD.org [8.8.178.136]) by mx2.freebsd.org (Postfix) with ESMTP id 417763B6BD1; Thu, 15 Nov 2012 15:06:07 +0000 (UTC) Received: from hub.FreeBSD.org (hub.FreeBSD.org [8.8.178.136]) by hub.freebsd.org (Postfix) with ESMTP id 2FEC83B2; Thu, 15 Nov 2012 15:06:01 +0000 (UTC) (envelope-from owner-svn-src-all@freebsd.org) Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AE14C160; Thu, 15 Nov 2012 15:05:48 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 93C468FC12; Thu, 15 Nov 2012 15:05:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFF5mHp003622; Thu, 15 Nov 2012 15:05:48 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFF5m5w003621; Thu, 15 Nov 2012 15:05:48 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211151505.qAFF5m5w003621@svn.freebsd.org> From: Eitan Adler Date: Thu, 15 Nov 2012 15:05:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243071 - head X-SVN-Group: head MIME-Version: 1.0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: owner-svn-src-all@freebsd.org Sender: owner-svn-src-all@freebsd.org X-SpamScore: 0 X-MailHub-Apparently-To: mjm@michaelmeltzer.com X-MailHub-Forwarded: Yes X-BeenThere: svn-src-head@freebsd.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 16:41:11 -0000 Author: eadler Date: Thu Nov 15 15:05:47 2012 New Revision: 243071 URL: http://svnweb.freebsd.org/changeset/base/243071 Log: Finish removing obsolete man pages (add them to ObsoleteFiles.inc) Submitted by: many Approved by: cperciva MFC after: 3 days Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Nov 15 14:11:34 2012 (r243070) +++ head/ObsoleteFiles.inc Thu Nov 15 15:05:47 2012 (r243071) @@ -40,6 +40,10 @@ # 20121114: zpool-features manual page moved from section 5 to 7 OLD_FILES+=usr/share/man/man5/zpool-features.5.gz +# 20121022: remove harp, hfa and idt man page +OLD_FILES+=share/man/man4/harp.4 +OLD_FILES+=share/man/man4/hfa.4 +OLD_FILES+=share/man/man4/idt.4 # 20121022: VFS_LOCK_GIANT elimination OLD_FILES+=usr/share/man/man9/VFS_LOCK_GIANT.9.gz OLD_FILES+=usr/share/man/man9/VFS_UNLOCK_GIANT.9.gz _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 16:53:03 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 53C4BF87; Thu, 15 Nov 2012 16:53:03 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au [211.29.132.187]) by mx1.freebsd.org (Postfix) with ESMTP id D49E98FC12; Thu, 15 Nov 2012 16:53:02 +0000 (UTC) Received: from c122-106-175-26.carlnfd1.nsw.optusnet.com.au (c122-106-175-26.carlnfd1.nsw.optusnet.com.au [122.106.175.26]) by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id qAFGqwKg030658 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 16 Nov 2012 03:52:59 +1100 Date: Fri, 16 Nov 2012 03:52:58 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Eitan Adler Subject: Re: svn commit: r243076 - head/usr.sbin/chkgrp In-Reply-To: Message-ID: <20121116032851.I44199@besplex.bde.org> References: <201211151506.qAFF63v0003848@svn.freebsd.org> <20121115153030.GD73505@kib.kiev.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-Cloudmark-Score: 0 X-Optus-Cloudmark-Analysis: v=2.0 cv=XbrRV/F5 c=1 sm=1 a=IpyuoPnKT5oA:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=hf-KJMUURdMA:10 a=pGLkceISAAAA:8 a=6I5d2MoRAAAA:8 a=bIPi5WGLedxrlG5P314A:9 a=CjuIK1q_8ugA:10 a=MSl-tDqOz04A:10 a=5swDdGOMujkHuVB2:21 a=RFbyZM59x8Qu5x2j:21 a=bxQHXO5Py4tHmhUgaywp5w==:117 Cc: Konstantin Belousov , svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 16:53:03 -0000 On Thu, 15 Nov 2012, Eitan Adler wrote: > On 15 November 2012 10:30, Konstantin Belousov wrote: >> On Thu, Nov 15, 2012 at 03:06:03PM +0000, Eitan Adler wrote: >>> Author: eadler >>> Date: Thu Nov 15 15:06:03 2012 >>> New Revision: 243076 >>> URL: http://svnweb.freebsd.org/changeset/base/243076 >>> >>> Log: >>> Check the range of the gid >>> >>> Approved by: cperciva >>> MFC after: 1 week >>> >>> Modified: >>> head/usr.sbin/chkgrp/chkgrp.c >>> >>> Modified: head/usr.sbin/chkgrp/chkgrp.c >>> ============================================================================== >>> --- head/usr.sbin/chkgrp/chkgrp.c Thu Nov 15 15:06:00 2012 (r243075) >>> +++ head/usr.sbin/chkgrp/chkgrp.c Thu Nov 15 15:06:03 2012 (r243076) >>> @@ -30,7 +30,10 @@ >>> __FBSDID("$FreeBSD$"); >>> >>> #include >>> +#include >>> #include >>> +#include >>> +#include >>> #include >>> #include >>> #include >>> @@ -150,6 +153,18 @@ main(int argc, char *argv[]) >>> warnx("%s: line %d: GID is not numeric", gfn, n); >>> e++; >>> } >>> + >>> + /* check the range of the group id */ >>> + errno = 0; >>> + unsigned long groupid = strtoul(f[2], NULL, 10); >> And this violates style. I see about 5 style violations here and 5 in other lines. >> The checks for strtoul failure are not exhaustive. > > from the strtoul man page: > > ==== > ... In all cases, errno is set to ERANGE. > If no conversion could be performed, 0 is returned and > the global variable errno is set to EINVAL (the last feature is not por- > table across all platforms). > === > > What is missing? Is there a case where strtoul fails but errno == 0 ? strtoul("1garbage", NULL, 10) succeeds and returns value 1, but the input is garbage. As the man page says, the EINVAL feature is unportable. It is almost useless, since to detect garbage after the number you have to pass an endptr to strtoul(), and then the check for no conversion (that is, for garbage at the beginning) is just as easy as the check for garbage at the end. The error handling is poor. First, warnx() is used instead of warn() so as to not tell the user about the errno that we are depending on. Fully correct and laborious strto*() error reporting has to use warnx() only for the case(s) where the input is garbage but strtoul() doesn't set errno. High quality strto*() error reporting also avoids using strerror(errno) in other cases to get a uniform style of error messages. The only portable other case is ERANGE for a range error. strerror(errno) is quite good for that. However, we do another range check later and should use the same error message for both. strerror(EINVAL) is cryptic for garbage at the beginning of the input as well as unportable. Second, we continue using the garbage value after detecting that it is garbage. strtonum() and expand_number() handle some of these problems internally but create others. For example, if you don't like the error string created by strtonum(), then you have to parse it to see what it says in order to write a better one. This is much more work than doing your own range checking. Bruce From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 16:54:14 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BC87F1AA; Thu, 15 Nov 2012 16:54:14 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9DEBC8FC16; Thu, 15 Nov 2012 16:54:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFGsEHb020928; Thu, 15 Nov 2012 16:54:14 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFGsEaU020926; Thu, 15 Nov 2012 16:54:14 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201211151654.qAFGsEaU020926@svn.freebsd.org> From: Joel Dahl Date: Thu, 15 Nov 2012 16:54:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243091 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 16:54:15 -0000 Author: joel (doc committer) Date: Thu Nov 15 16:54:14 2012 New Revision: 243091 URL: http://svnweb.freebsd.org/changeset/base/243091 Log: Remove trailing whitespace. Modified: head/share/man/man4/lagg.4 Modified: head/share/man/man4/lagg.4 ============================================================================== --- head/share/man/man4/lagg.4 Thu Nov 15 16:42:12 2012 (r243090) +++ head/share/man/man4/lagg.4 Thu Nov 15 16:54:14 2012 (r243091) @@ -92,7 +92,7 @@ This is an alias for .Ic loadbalance mode. .It Ic lacp -Supports the IEEE 802.1AX (formerly 802.3ad) Link Aggregation Control Protocol +Supports the IEEE 802.1AX (formerly 802.3ad) Link Aggregation Control Protocol (LACP) and the Marker Protocol. LACP will negotiate a set of aggregable links with the peer in to one or more Link Aggregated Groups. From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 17:06:11 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1F56A4BD for ; Thu, 15 Nov 2012 17:06:11 +0000 (UTC) (envelope-from postmaster@mailpod.hostingplatform.com) Received: from atl4mhob12.myregisteredsite.com (atl4mhob12.myregisteredsite.com [209.17.115.50]) by mx1.freebsd.org (Postfix) with ESMTP id C39098FC0C for ; Thu, 15 Nov 2012 17:06:10 +0000 (UTC) Received: from mailpod1.hostingplatform.com (mailpod1.networksolutionsemail.com [206.188.198.65]) by atl4mhob12.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAFH63rx010809 for ; Thu, 15 Nov 2012 12:06:03 -0500 Received: (qmail 6157 invoked by uid 0); 15 Nov 2012 16:03:10 -0000 Received: (qmail 22092 invoked by uid 0); 15 Nov 2012 15:09:50 -0000 Received: from unknown (HELO atl4mhib22.myregisteredsite.com) (209) by 0 with SMTP; 15 Nov 2012 15:09:50 -0000 Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by atl4mhib22.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAFF7f7f023594 for ; Thu, 15 Nov 2012 10:07:41 -0500 Received: from hub.freebsd.org (hub.FreeBSD.org [8.8.178.136]) by mx2.freebsd.org (Postfix) with ESMTP id 8E54E3B7858; Thu, 15 Nov 2012 15:07:24 +0000 (UTC) Received: from hub.FreeBSD.org (hub.FreeBSD.org [8.8.178.136]) by hub.freebsd.org (Postfix) with ESMTP id C3962123F; Thu, 15 Nov 2012 15:07:24 +0000 (UTC) (envelope-from owner-svn-src-all@freebsd.org) Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5D106627; Thu, 15 Nov 2012 15:06:12 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8EAFB8FC14; Thu, 15 Nov 2012 15:06:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFF6C8k003990; Thu, 15 Nov 2012 15:06:12 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFF6CQn003988; Thu, 15 Nov 2012 15:06:12 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211151506.qAFF6CQn003988@svn.freebsd.org> From: Eitan Adler Date: Thu, 15 Nov 2012 15:06:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243079 - head/usr.bin/ministat X-SVN-Group: head MIME-Version: 1.0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: owner-svn-src-all@freebsd.org Sender: owner-svn-src-all@freebsd.org X-SpamScore: 0 X-MailHub-Apparently-To: mjm@michaelmeltzer.com X-MailHub-Forwarded: Yes X-BeenThere: svn-src-head@freebsd.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 17:06:11 -0000 Author: eadler Date: Thu Nov 15 15:06:12 2012 New Revision: 243079 URL: http://svnweb.freebsd.org/changeset/base/243079 Log: Add option to suppress just the plot in ministat while still retaining the relative comparison (i.e., useful part). Approved by: cperciva MFC after: 3 days Modified: head/usr.bin/ministat/ministat.1 head/usr.bin/ministat/ministat.c Modified: head/usr.bin/ministat/ministat.1 ============================================================================== --- head/usr.bin/ministat/ministat.1 Thu Nov 15 15:06:09 2012 (r243078) +++ head/usr.bin/ministat/ministat.1 Thu Nov 15 15:06:12 2012 (r243079) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 28, 2010 +.Dd November 10, 2012 .Dt MINISTAT 1 .Os .Sh NAME @@ -33,7 +33,7 @@ .Nd statistics utility .Sh SYNOPSIS .Nm -.Op Fl ns +.Op Fl Ans .Op Fl C Ar column .Op Fl c Ar confidence_level .Op Fl d Ar delimiter @@ -47,6 +47,9 @@ in the specified files or, if no file is .Pp The options are as follows: .Bl -tag -width Fl +.It Fl A +Just report the statistics of the input and relative comparisons, +suppress the ASCII-art plot. .It Fl n Just report the raw statistics of the input, suppress the ASCII-art plot and the relative comparisons. Modified: head/usr.bin/ministat/ministat.c ============================================================================== --- head/usr.bin/ministat/ministat.c Thu Nov 15 15:06:09 2012 (r243078) +++ head/usr.bin/ministat/ministat.c Thu Nov 15 15:06:12 2012 (r243079) @@ -509,7 +509,7 @@ usage(char const *whine) fprintf(stderr, "%s\n", whine); fprintf(stderr, - "Usage: ministat [-C column] [-c confidence] [-d delimiter(s)] [-ns] [-w width] [file [file ...]]\n"); + "Usage: ministat [-C column] [-c confidence] [-d delimiter(s)] [-Ans] [-w width] [file [file ...]]\n"); fprintf(stderr, "\tconfidence = {"); for (i = 0; i < NCONF; i++) { fprintf(stderr, "%s%g%%", @@ -517,6 +517,7 @@ usage(char const *whine) studentpct[i]); } fprintf(stderr, "}\n"); + fprintf(stderr, "\t-A : print statistics only. suppress the graph.\n"); fprintf(stderr, "\t-C : column number to extract (starts and defaults to 1)\n"); fprintf(stderr, "\t-d : delimiter(s) string, default to \" \\t\"\n"); fprintf(stderr, "\t-n : print summary statistics only, no graph/test\n"); @@ -538,6 +539,7 @@ main(int argc, char **argv) int flag_s = 0; int flag_n = 0; int termwidth = 74; + int suppress_plot = 0; if (isatty(STDOUT_FILENO)) { struct winsize wsz; @@ -550,8 +552,11 @@ main(int argc, char **argv) } ci = -1; - while ((c = getopt(argc, argv, "C:c:d:snw:")) != -1) + while ((c = getopt(argc, argv, "AC:c:d:snw:")) != -1) switch (c) { + case 'A': + suppress_plot = 1; + break; case 'C': column = strtol(optarg, &p, 10); if (p != NULL && *p != '\0') @@ -610,7 +615,7 @@ main(int argc, char **argv) for (i = 0; i < nds; i++) printf("%c %s\n", symbol[i+1], ds[i]->name); - if (!flag_n) { + if (!flag_n && !suppress_plot) { SetupPlot(termwidth, flag_s, nds); for (i = 0; i < nds; i++) DimPlot(ds[i]); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 17:23:58 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2C0DF914 for ; Thu, 15 Nov 2012 17:23:58 +0000 (UTC) (envelope-from postmaster@mailpod.hostingplatform.com) Received: from atl4mhob06.myregisteredsite.com (atl4mhob06.myregisteredsite.com [209.17.115.44]) by mx1.freebsd.org (Postfix) with ESMTP id D13F18FC12 for ; Thu, 15 Nov 2012 17:23:57 +0000 (UTC) Received: from mailpod1.hostingplatform.com (mailpod1.networksolutionsemail.com [206.188.198.65]) by atl4mhob06.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAFHNu9C012454 for ; Thu, 15 Nov 2012 12:23:56 -0500 Received: (qmail 3643 invoked by uid 0); 15 Nov 2012 15:58:53 -0000 Received: (qmail 26453 invoked by uid 0); 15 Nov 2012 15:07:47 -0000 Received: from unknown (HELO atl4mhib47.myregisteredsite.com) (209) by 0 with SMTP; 15 Nov 2012 15:07:47 -0000 Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by atl4mhib47.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAFF7kDw027486 for ; Thu, 15 Nov 2012 10:07:46 -0500 Received: from hub.freebsd.org (hub.FreeBSD.org [8.8.178.136]) by mx2.freebsd.org (Postfix) with ESMTP id 9563B3B78AB; Thu, 15 Nov 2012 15:07:29 +0000 (UTC) Received: from hub.FreeBSD.org (hub.FreeBSD.org [8.8.178.136]) by hub.freebsd.org (Postfix) with ESMTP id 3F45A1289; Thu, 15 Nov 2012 15:07:30 +0000 (UTC) (envelope-from owner-svn-src-all@freebsd.org) Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B0518644; Thu, 15 Nov 2012 15:06:15 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 95C158FC0C; Thu, 15 Nov 2012 15:06:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFF6Fbk004034; Thu, 15 Nov 2012 15:06:15 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFF6FuS004033; Thu, 15 Nov 2012 15:06:15 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211151506.qAFF6FuS004033@svn.freebsd.org> From: Eitan Adler Date: Thu, 15 Nov 2012 15:06:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243080 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: owner-svn-src-all@freebsd.org Sender: owner-svn-src-all@freebsd.org X-SpamScore: 0 X-MailHub-Apparently-To: mjm@michaelmeltzer.com X-MailHub-Forwarded: Yes X-BeenThere: svn-src-head@freebsd.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 17:23:58 -0000 Author: eadler Date: Thu Nov 15 15:06:15 2012 New Revision: 243080 URL: http://svnweb.freebsd.org/changeset/base/243080 Log: Only pass ip[46].addr when _addrl contains a value Submitted by: crees Reviewed by: Mike Jakubik Approved by: cperciva MFC after: 2 weeks Modified: head/etc/rc.d/jail Modified: head/etc/rc.d/jail ============================================================================== --- head/etc/rc.d/jail Thu Nov 15 15:06:12 2012 (r243079) +++ head/etc/rc.d/jail Thu Nov 15 15:06:15 2012 (r243080) @@ -656,7 +656,8 @@ jail_start() done eval ${_setfib} jail -n ${_jail} ${_flags} -i -c path=${_rootdir} host.hostname=${_hostname} \ - ip4.addr=\"${_addrl}\" ip6.addr=\"${_addr6l}\" ${_parameters} command=${_exec_start} > ${_tmp_jail} 2>&1 \ + ${_addrl:+ip4.addr=\"${_addrl}\"} ${_addr6l:+ip6.addr=\"${_addr6l}\"} \ + ${_parameters} command=${_exec_start} > ${_tmp_jail} 2>&1 \ Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EDDA5F5B for ; Thu, 15 Nov 2012 18:07:17 +0000 (UTC) (envelope-from postmaster@mailpod.hostingplatform.com) Received: from atl4mhob08.myregisteredsite.com (atl4mhob08.myregisteredsite.com [209.17.115.46]) by mx1.freebsd.org (Postfix) with ESMTP id 9CC378FC15 for ; Thu, 15 Nov 2012 18:07:17 +0000 (UTC) Received: from mailpod1.hostingplatform.com (mailpod1.networksolutionsemail.com [206.188.198.65]) by atl4mhob08.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAFI7GJT028620 for ; Thu, 15 Nov 2012 13:07:16 -0500 Received: (qmail 32364 invoked by uid 0); 15 Nov 2012 16:07:40 -0000 Received: (qmail 29391 invoked by uid 0); 15 Nov 2012 14:33:41 -0000 Received: (qmail 16611 invoked by uid 0); 15 Nov 2012 14:11:50 -0000 Received: from unknown (HELO atl4mhib39.myregisteredsite.com) (209) by 0 with SMTP; 15 Nov 2012 14:11:50 -0000 Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by atl4mhib39.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAFEBnq3029037 for ; Thu, 15 Nov 2012 09:11:49 -0500 Received: from hub.freebsd.org (hub.FreeBSD.org [8.8.178.136]) by mx2.freebsd.org (Postfix) with ESMTP id 87FFC3B6AD6; Thu, 15 Nov 2012 14:11:46 +0000 (UTC) Received: from hub.freebsd.org (hub.freebsd.org [8.8.178.136]) by hub.freebsd.org (Postfix) with ESMTP id DEDB13C7; Thu, 15 Nov 2012 14:11:46 +0000 (UTC) (envelope-from owner-svn-src-all@freebsd.org) Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E4D22284; Thu, 15 Nov 2012 14:11:34 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C65CD8FC15; Thu, 15 Nov 2012 14:11:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFEBYQb095546; Thu, 15 Nov 2012 14:11:34 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFEBYh9095545; Thu, 15 Nov 2012 14:11:34 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201211151411.qAFEBYh9095545@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 15 Nov 2012 14:11:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243070 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: owner-svn-src-all@freebsd.org Sender: owner-svn-src-all@freebsd.org X-SpamScore: 0 X-MailHub-Apparently-To: mjm@michaelmeltzer.com X-MailHub-Forwarded: Yes X-BeenThere: svn-src-head@freebsd.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 18:07:18 -0000 Author: trasz Date: Thu Nov 15 14:11:34 2012 New Revision: 243070 URL: http://svnweb.freebsd.org/changeset/base/243070 Log: Fix kassert that's not really valid for %CPU accounting. The problem here is race between decaying the resource usage in containers, and updating per-process usage; basically, the former may cause per-container usage to get smaller than per-process usage. Submitted by: Rudo Tomori Modified: head/sys/kern/kern_racct.c Modified: head/sys/kern/kern_racct.c ============================================================================== --- head/sys/kern/kern_racct.c Thu Nov 15 14:10:51 2012 (r243069) +++ head/sys/kern/kern_racct.c Thu Nov 15 14:11:34 2012 (r243070) @@ -403,7 +403,7 @@ racct_sub_racct(struct racct *dest, cons * Update resource usage in dest. */ for (i = 0; i <= RACCT_MAX; i++) { - if (!RACCT_IS_SLOPPY(i)) { + if (!RACCT_IS_SLOPPY(i) && !RACCT_IS_DECAYING(i)) { KASSERT(dest->r_resources[i] >= 0, ("racct propagation meltdown: dest < 0")); KASSERT(src->r_resources[i] >= 0, @@ -414,7 +414,8 @@ racct_sub_racct(struct racct *dest, cons if (RACCT_CAN_DROP(i)) { dest->r_resources[i] -= src->r_resources[i]; if (dest->r_resources[i] < 0) { - KASSERT(RACCT_IS_SLOPPY(i), + KASSERT(RACCT_IS_SLOPPY(i) || + RACCT_IS_DECAYING(i), ("racct_sub_racct: usage < 0")); dest->r_resources[i] = 0; } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 18:17:29 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4A611625 for ; Thu, 15 Nov 2012 18:17:29 +0000 (UTC) (envelope-from postmaster@mailpod.hostingplatform.com) Received: from atl4mhob06.myregisteredsite.com (atl4mhob06.myregisteredsite.com [209.17.115.44]) by mx1.freebsd.org (Postfix) with ESMTP id EB0FE8FC13 for ; Thu, 15 Nov 2012 18:17:28 +0000 (UTC) Received: from mailpod1.hostingplatform.com (mailpod1.networksolutionsemail.com [206.188.198.65]) by atl4mhob06.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAFIHSWK024897 for ; Thu, 15 Nov 2012 13:17:28 -0500 Received: (qmail 7094 invoked by uid 0); 15 Nov 2012 15:38:54 -0000 Received: (qmail 21469 invoked by uid 0); 15 Nov 2012 15:17:07 -0000 Received: from unknown (HELO atl4mhib08.myregisteredsite.com) (209) by 0 with SMTP; 15 Nov 2012 15:17:07 -0000 Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by atl4mhib08.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAFFH5tF021279 for ; Thu, 15 Nov 2012 10:17:05 -0500 Received: from hub.freebsd.org (hub.FreeBSD.org [8.8.178.136]) by mx2.freebsd.org (Postfix) with ESMTP id 9CEAC3B6A3C; Thu, 15 Nov 2012 15:17:00 +0000 (UTC) Received: from hub.FreeBSD.org (hub.FreeBSD.org [8.8.178.136]) by hub.freebsd.org (Postfix) with ESMTP id 776111902; Thu, 15 Nov 2012 15:16:58 +0000 (UTC) (envelope-from owner-svn-src-all@freebsd.org) Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 867F817D2; Thu, 15 Nov 2012 15:16:51 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 679B48FC08; Thu, 15 Nov 2012 15:16:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFFGpbV005964; Thu, 15 Nov 2012 15:16:51 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFFGp38005962; Thu, 15 Nov 2012 15:16:51 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211151516.qAFFGp38005962@svn.freebsd.org> From: Eitan Adler Date: Thu, 15 Nov 2012 15:16:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243084 - head/usr.sbin/chkgrp X-SVN-Group: head MIME-Version: 1.0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: owner-svn-src-all@freebsd.org Sender: owner-svn-src-all@freebsd.org X-SpamScore: 0 X-MailHub-Apparently-To: mjm@michaelmeltzer.com X-MailHub-Forwarded: Yes X-BeenThere: svn-src-head@freebsd.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 18:17:29 -0000 Author: eadler Date: Thu Nov 15 15:16:50 2012 New Revision: 243084 URL: http://svnweb.freebsd.org/changeset/base/243084 Log: Add support for a -q flag. While here make the custom argument parsing use getopt instead of hacking on it more. This change also fixes the method of silencing the compiler warning about gfn being used uninitialized. Approved by: cperciva MFC after: 1 week Modified: head/usr.sbin/chkgrp/chkgrp.8 head/usr.sbin/chkgrp/chkgrp.c Modified: head/usr.sbin/chkgrp/chkgrp.8 ============================================================================== --- head/usr.sbin/chkgrp/chkgrp.8 Thu Nov 15 15:06:24 2012 (r243083) +++ head/usr.sbin/chkgrp/chkgrp.8 Thu Nov 15 15:16:50 2012 (r243084) @@ -34,6 +34,7 @@ .Nd check the syntax of the group file .Sh SYNOPSIS .Nm +.Op Fl q .Op Ar groupfile .Sh DESCRIPTION The @@ -47,6 +48,12 @@ contains whitespace, and that the third numeric. It will also check for invalid characters in the group names and group members. +The following options are available: +.Bl -tag -width indent +.It Fl q +This option disables printing of text when the group format +is correct. +.El .Sh FILES .Bl -tag -width /etc/group -compact .It Pa /etc/group Modified: head/usr.sbin/chkgrp/chkgrp.c ============================================================================== --- head/usr.sbin/chkgrp/chkgrp.c Thu Nov 15 15:06:24 2012 (r243083) +++ head/usr.sbin/chkgrp/chkgrp.c Thu Nov 15 15:16:50 2012 (r243084) @@ -37,11 +37,12 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include static char empty[] = { 0 }; -static void +static void __dead2 usage(void) { fprintf(stderr, "usage: chkgrp [groupfile]\n"); @@ -53,24 +54,33 @@ main(int argc, char *argv[]) { unsigned int i; size_t len; + int quiet; + int ch; int n = 0, k, e = 0; char *line, *f[4], *p; const char *cp, *gfn; FILE *gf; - /* check arguments */ - switch (argc) { - case 1: - gfn = "/etc/group"; - break; - case 2: - gfn = argv[1]; - break; - default: - gfn = NULL; /* silence compiler */ - usage(); + quiet = 0; + while ((ch = getopt(argc, argv, "q")) != -1) { + switch (ch) { + case 'q': + quiet = 1; + break; + case '?': + default: + printf("hello\n"); + usage(); + } } + if (optind == argc) + gfn = "/etc/group"; + else if (optind == argc - 1) + gfn = argv[optind]; + else + usage(); + /* open group file */ if ((gf = fopen(gfn, "r")) == NULL) err(EX_NOINPUT, "%s", gfn); @@ -178,7 +188,7 @@ main(int argc, char *argv[]) /* done */ fclose(gf); - if (e == 0) + if (e == 0 && quiet == 0) printf("%s is fine\n", gfn); exit(e ? EX_DATAERR : EX_OK); } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 18:49:17 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DDE63575; Thu, 15 Nov 2012 18:49:17 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B852B8FC0C; Thu, 15 Nov 2012 18:49:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFInHJR039097; Thu, 15 Nov 2012 18:49:17 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFInHeU039083; Thu, 15 Nov 2012 18:49:17 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211151849.qAFInHeU039083@svn.freebsd.org> From: Eitan Adler Date: Thu, 15 Nov 2012 18:49:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243095 - head/sys/dev/agp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 18:49:17 -0000 Author: eadler Date: Thu Nov 15 18:49:17 2012 New Revision: 243095 URL: http://svnweb.freebsd.org/changeset/base/243095 Log: Remove unneeded header from agp: opt_bus.h Tested with "make universe" Approved by: cperciva MFC after: 1 week Modified: head/sys/dev/agp/agp.c head/sys/dev/agp/agp_ali.c head/sys/dev/agp/agp_amd.c head/sys/dev/agp/agp_amd64.c head/sys/dev/agp/agp_apple.c head/sys/dev/agp/agp_ati.c head/sys/dev/agp/agp_i810.c head/sys/dev/agp/agp_intel.c head/sys/dev/agp/agp_nvidia.c head/sys/dev/agp/agp_sis.c head/sys/dev/agp/agp_via.c Modified: head/sys/dev/agp/agp.c ============================================================================== --- head/sys/dev/agp/agp.c Thu Nov 15 18:05:38 2012 (r243094) +++ head/sys/dev/agp/agp.c Thu Nov 15 18:49:17 2012 (r243095) @@ -28,7 +28,6 @@ __FBSDID("$FreeBSD$"); #include "opt_agp.h" -#include "opt_bus.h" #include #include Modified: head/sys/dev/agp/agp_ali.c ============================================================================== --- head/sys/dev/agp/agp_ali.c Thu Nov 15 18:05:38 2012 (r243094) +++ head/sys/dev/agp/agp_ali.c Thu Nov 15 18:49:17 2012 (r243095) @@ -27,8 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_bus.h" - #include #include #include Modified: head/sys/dev/agp/agp_amd.c ============================================================================== --- head/sys/dev/agp/agp_amd.c Thu Nov 15 18:05:38 2012 (r243094) +++ head/sys/dev/agp/agp_amd.c Thu Nov 15 18:49:17 2012 (r243095) @@ -27,8 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_bus.h" - #include #include #include Modified: head/sys/dev/agp/agp_amd64.c ============================================================================== --- head/sys/dev/agp/agp_amd64.c Thu Nov 15 18:05:38 2012 (r243094) +++ head/sys/dev/agp/agp_amd64.c Thu Nov 15 18:49:17 2012 (r243095) @@ -27,8 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_bus.h" - #include #include #include Modified: head/sys/dev/agp/agp_apple.c ============================================================================== --- head/sys/dev/agp/agp_apple.c Thu Nov 15 18:05:38 2012 (r243094) +++ head/sys/dev/agp/agp_apple.c Thu Nov 15 18:49:17 2012 (r243095) @@ -27,8 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_bus.h" - #include #include #include Modified: head/sys/dev/agp/agp_ati.c ============================================================================== --- head/sys/dev/agp/agp_ati.c Thu Nov 15 18:05:38 2012 (r243094) +++ head/sys/dev/agp/agp_ati.c Thu Nov 15 18:49:17 2012 (r243095) @@ -29,8 +29,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_bus.h" - #include #include #include Modified: head/sys/dev/agp/agp_i810.c ============================================================================== --- head/sys/dev/agp/agp_i810.c Thu Nov 15 18:05:38 2012 (r243094) +++ head/sys/dev/agp/agp_i810.c Thu Nov 15 18:49:17 2012 (r243095) @@ -40,8 +40,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_bus.h" - #if 0 #define KTR_AGP_I810 KTR_DEV #else Modified: head/sys/dev/agp/agp_intel.c ============================================================================== --- head/sys/dev/agp/agp_intel.c Thu Nov 15 18:05:38 2012 (r243094) +++ head/sys/dev/agp/agp_intel.c Thu Nov 15 18:49:17 2012 (r243095) @@ -27,8 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_bus.h" - #include #include #include Modified: head/sys/dev/agp/agp_nvidia.c ============================================================================== --- head/sys/dev/agp/agp_nvidia.c Thu Nov 15 18:05:38 2012 (r243094) +++ head/sys/dev/agp/agp_nvidia.c Thu Nov 15 18:49:17 2012 (r243095) @@ -32,8 +32,6 @@ __FBSDID("$FreeBSD$"); * NVIDIA nForce/nForce2 AGPGART Linux Kernel Patch. */ -#include "opt_bus.h" - #include #include #include Modified: head/sys/dev/agp/agp_sis.c ============================================================================== --- head/sys/dev/agp/agp_sis.c Thu Nov 15 18:05:38 2012 (r243094) +++ head/sys/dev/agp/agp_sis.c Thu Nov 15 18:49:17 2012 (r243095) @@ -27,8 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_bus.h" - #include #include #include Modified: head/sys/dev/agp/agp_via.c ============================================================================== --- head/sys/dev/agp/agp_via.c Thu Nov 15 18:05:38 2012 (r243094) +++ head/sys/dev/agp/agp_via.c Thu Nov 15 18:49:17 2012 (r243095) @@ -27,8 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_bus.h" - #include #include #include From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 18:53:19 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7422478D for ; Thu, 15 Nov 2012 18:53:19 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id D44358FC18 for ; Thu, 15 Nov 2012 18:53:18 +0000 (UTC) Received: by mail-lb0-f182.google.com with SMTP id gg13so1948548lbb.13 for ; Thu, 15 Nov 2012 10:53:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=uH6ZBjAfLlSRKHMijgXCoP+JGS8/wq84wSoLBThPQ9w=; b=Y4stiXKVIhKywsBG7nv94ZFvRuVu+JFj1oq1Sa9gk6soxWGn/zPDTqk45wCjJPTGVc NLg9/Eun+KubMqHyY2izrMdfQFaV3aQv/0OZiXTKr7ie/96WbjPDF3OmiPzV03Urnqgx mpzNLPMsOM2p5dLzAP8j6aWPrwpWjuanNd+sE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=uH6ZBjAfLlSRKHMijgXCoP+JGS8/wq84wSoLBThPQ9w=; b=VX1VvA5MNbnT3I7pAeGFGSojU8Z03+BcigYP/yaOCvD8nbJRXqh3ilk/HWS1RrhxS6 HbMqDzt3VRKplvzmY3PmhpZsW+L4+A6jkAZMWD1Xlhv82p8/SiU+7GGJ6gMJlSwLdFQ2 61Gd+RpSZrQDPRM39MpXHHt53NcbJpy1KV4ydJE6G7JuEpdSajhliM7idoNRk8k/hD4m iJg0Yjv6QIk2PN1uxKsxlCTkAWbhnUUfPr1vSsPamCI3idO+hQdkGyrq83Cr6xwMiG33 FX44emWlY8EIvbdOMT4G7YkF3Ond5cbIdw4rmkjIkEXNZdTB7FnEsMNhIM1+1wKFVGH9 kEOw== Received: by 10.112.54.40 with SMTP id g8mr1011225lbp.49.1353005597564; Thu, 15 Nov 2012 10:53:17 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.112.25.166 with HTTP; Thu, 15 Nov 2012 10:52:46 -0800 (PST) In-Reply-To: <20121116032851.I44199@besplex.bde.org> References: <201211151506.qAFF63v0003848@svn.freebsd.org> <20121115153030.GD73505@kib.kiev.ua> <20121116032851.I44199@besplex.bde.org> From: Eitan Adler Date: Thu, 15 Nov 2012 13:52:46 -0500 X-Google-Sender-Auth: moJfvAvd2Bz9pTOVQDopkjjDLAc Message-ID: Subject: Re: svn commit: r243076 - head/usr.sbin/chkgrp To: Bruce Evans Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQnLYEgHExarMieolY/e6hjGvxJ1fXun7VwuqcbhWq75LXHJli9WtelTU+snzqYe205RFclh Cc: Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 18:53:19 -0000 On 15 November 2012 11:52, Bruce Evans wrote: > strtoul("1garbage", NULL, 10) succeeds and returns value 1, but the input > is garbage. This case is covered earlier 160 /* check that the GID is numeric */ 161 if (strspn(f[2], "0123456789") != strlen(f[2])) { 162 warnx("%s: line %d: GID is not numeric", gfn, n); > As the man page says, the EINVAL feature is unportable. It is almost > useless, since to detect garbage after the number you have to pass an > endptr to strtoul(), and then the check for no conversion (that is, > for garbage at the beginning) is just as easy as the check for garbage > at the end. This patch doesn't care about EINVAL or ERANGE. It just cares strtoul returned an error. I even considered just ignoring the error case because the data is mostly sanity checked prior. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 19:00:02 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D670EAE5; Thu, 15 Nov 2012 19:00:02 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 353AF8FC0C; Thu, 15 Nov 2012 19:00:02 +0000 (UTC) Received: from tom.home (localhost [127.0.0.1]) by kib.kiev.ua (8.14.5/8.14.5) with ESMTP id qAFIxwX3075328; Thu, 15 Nov 2012 20:59:58 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.7.1 kib.kiev.ua qAFIxwX3075328 Received: (from kostik@localhost) by tom.home (8.14.5/8.14.5/Submit) id qAFIxwFZ075327; Thu, 15 Nov 2012 20:59:58 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 15 Nov 2012 20:59:58 +0200 From: Konstantin Belousov To: Eitan Adler Subject: Re: svn commit: r243076 - head/usr.sbin/chkgrp Message-ID: <20121115185958.GG73505@kib.kiev.ua> References: <201211151506.qAFF63v0003848@svn.freebsd.org> <20121115153030.GD73505@kib.kiev.ua> <20121116032851.I44199@besplex.bde.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="WGeo2zNsisDTqWWq" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=0.2 required=5.0 tests=ALL_TRUSTED, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Evans X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 19:00:02 -0000 --WGeo2zNsisDTqWWq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 15, 2012 at 01:52:46PM -0500, Eitan Adler wrote: > On 15 November 2012 11:52, Bruce Evans wrote: > > strtoul("1garbage", NULL, 10) succeeds and returns value 1, but the inp= ut > > is garbage. >=20 > This case is covered earlier > 160 /* check that the GID is numeric */ > 161 if (strspn(f[2], "0123456789") !=3D strlen(f[2])) { > 162 warnx("%s: line %d: GID is not numeric", gfn, n); So this code shall be removed, if you are introducing strtoul() to check for errors at all. >=20 > > As the man page says, the EINVAL feature is unportable. It is almost > > useless, since to detect garbage after the number you have to pass an > > endptr to strtoul(), and then the check for no conversion (that is, > > for garbage at the beginning) is just as easy as the check for garbage > > at the end. >=20 > This patch doesn't care about EINVAL or ERANGE. It just cares strtoul > returned an error. > I even considered just ignoring the error case because the data is > mostly sanity checked prior. >=20 >=20 > --=20 > Eitan Adler > Source, Ports, Doc committer > Bugmeister, Ports Security teams --WGeo2zNsisDTqWWq Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlClO6wACgkQC3+MBN1Mb4j68gCcCkKuzH+Duqtd6L47zhlq7OUB WdUAn2R7YHYJDcDMK9t6C588f1KRr4+S =iJkd -----END PGP SIGNATURE----- --WGeo2zNsisDTqWWq-- From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 19:23:00 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8054E279; Thu, 15 Nov 2012 19:23:00 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id EFB778FC12; Thu, 15 Nov 2012 19:22:59 +0000 (UTC) Received: from tom.home (localhost [127.0.0.1]) by kib.kiev.ua (8.14.5/8.14.5) with ESMTP id qAFJMtix077759; Thu, 15 Nov 2012 21:22:55 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.7.1 kib.kiev.ua qAFJMtix077759 Received: (from kostik@localhost) by tom.home (8.14.5/8.14.5/Submit) id qAFJMtQM077758; Thu, 15 Nov 2012 21:22:55 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 15 Nov 2012 21:22:55 +0200 From: Konstantin Belousov To: Eitan Adler Subject: Re: svn commit: r243095 - head/sys/dev/agp Message-ID: <20121115192255.GH73505@kib.kiev.ua> References: <201211151849.qAFInHeU039083@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jb7C7uZ/dsJO9et2" Content-Disposition: inline In-Reply-To: <201211151849.qAFInHeU039083@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=0.2 required=5.0 tests=ALL_TRUSTED, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 19:23:00 -0000 --jb7C7uZ/dsJO9et2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 15, 2012 at 06:49:17PM +0000, Eitan Adler wrote: > Author: eadler > Date: Thu Nov 15 18:49:17 2012 > New Revision: 243095 > URL: http://svnweb.freebsd.org/changeset/base/243095 >=20 > Log: > Remove unneeded header from agp: opt_bus.h > =20 > Tested with "make universe" make universe cannot prove anything about usefulness of the removed include, just because *_opt.h files contains only defines, which are used later by the code like #ifdef OPTION do something #endif. If you are removing the option include, the module Makefile should be adjusted too. --jb7C7uZ/dsJO9et2 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlClQQ4ACgkQC3+MBN1Mb4i6owCgwUAuPEipzaSOwc1NUeHOU4fO FswAnRUD+STV1aDBlhQcz+WiGedJCmVQ =g3Bd -----END PGP SIGNATURE----- --jb7C7uZ/dsJO9et2-- From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 20:25:10 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B3FE9744; Thu, 15 Nov 2012 20:25:10 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 96CD18FC08; Thu, 15 Nov 2012 20:25:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFKP9Em050653; Thu, 15 Nov 2012 20:25:09 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFKP9SR050652; Thu, 15 Nov 2012 20:25:09 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211152025.qAFKP9SR050652@svn.freebsd.org> From: Eitan Adler Date: Thu, 15 Nov 2012 20:25:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243100 - head/sys/modules/agp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 20:25:10 -0000 Author: eadler Date: Thu Nov 15 20:25:09 2012 New Revision: 243100 URL: http://svnweb.freebsd.org/changeset/base/243100 Log: Finish removing unneeded header from agp: opt_bus.h Approved by: cperciva MFC after: 1 week Modified: head/sys/modules/agp/Makefile Modified: head/sys/modules/agp/Makefile ============================================================================== --- head/sys/modules/agp/Makefile Thu Nov 15 20:06:07 2012 (r243099) +++ head/sys/modules/agp/Makefile Thu Nov 15 20:25:09 2012 (r243100) @@ -18,7 +18,7 @@ SRCS+= agp_amd64.c agp_i810.c agp_via.c SRCS+= agp_apple.c .endif SRCS+= device_if.h bus_if.h agp_if.h pci_if.h -SRCS+= opt_agp.h opt_bus.h +SRCS+= opt_agp.h MFILES= kern/device_if.m kern/bus_if.m dev/agp/agp_if.m dev/pci/pci_if.m WERROR= From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 20:26:09 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 65F448B9 for ; Thu, 15 Nov 2012 20:26:09 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id C9A588FC0C for ; Thu, 15 Nov 2012 20:26:08 +0000 (UTC) Received: by mail-lb0-f182.google.com with SMTP id gg13so2041833lbb.13 for ; Thu, 15 Nov 2012 12:26:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=kTHr20RO0ZUJ8Y+eTfMzTOp8AqE7mYqvwmwr9t9ZB18=; b=dI9GuKB99y8Ik4cjnsVmTppThbsvXwXfJAlycnlwcY874HfYgVlfM8dFQXrabh9QD7 ap1QZjw4T3wz7muwUMl2ZLED+qN+FmLM1iniV6G1gGmWvlm4Jq5tQCXNWP0UlnSh1yKV YFFGA1VLNyR+FHmDAqqooXkMH8J+aU4Tu3Hfw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=kTHr20RO0ZUJ8Y+eTfMzTOp8AqE7mYqvwmwr9t9ZB18=; b=OyjSsQ1f69SpFz1U0NG5x2PPRgNIRWH3rzIVJL4ZPb2gMPxkUhp4CRJHJJQpCldnZ8 lRc0iLH3ww0Kp/MGpAYwAliscPL8k0hgL2CU/YkrQuPkINrb7L9OUllO/vb4EDo10kc0 GiO5uh0lGWJxTQtB8wtREevBHUcf052Xnh+WQXvylnfKFt6OF+yxY1DOj/RfG+ftX1q3 2WQsP3PckNgk2LrMIms4/k+HSamfKYSDOHZsHMACS0v+m/hIbX0IrDCqhAHLxxNA7QWD ddagyqikPvAkjFrTvlHQWzUQf3UHiYMqHOiic+2a/svGTzRqoyjlpK9Rp3QWo4YbwOTR 8mVQ== Received: by 10.112.104.2 with SMTP id ga2mr1106513lbb.48.1353011167116; Thu, 15 Nov 2012 12:26:07 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.112.25.166 with HTTP; Thu, 15 Nov 2012 12:25:35 -0800 (PST) In-Reply-To: <20121115192255.GH73505@kib.kiev.ua> References: <201211151849.qAFInHeU039083@svn.freebsd.org> <20121115192255.GH73505@kib.kiev.ua> From: Eitan Adler Date: Thu, 15 Nov 2012 15:25:35 -0500 X-Google-Sender-Auth: WidrpgXdyGSCVNHOaxXECLrdmHg Message-ID: Subject: Re: svn commit: r243095 - head/sys/dev/agp To: Konstantin Belousov Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQmiKFbTGEQieLf9Qwp+FXdavrz+WXRA+BKzLxjS382+TCpXEN5EkaQbAIKl1e6A4SEkKgLR Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 20:26:09 -0000 On 15 November 2012 14:22, Konstantin Belousov wrote: > On Thu, Nov 15, 2012 at 06:49:17PM +0000, Eitan Adler wrote: >> Author: eadler >> Date: Thu Nov 15 18:49:17 2012 >> New Revision: 243095 >> URL: http://svnweb.freebsd.org/changeset/base/243095 >> >> Log: >> Remove unneeded header from agp: opt_bus.h >> >> Tested with "make universe" > make universe cannot prove anything about usefulness of the removed include, > just because *_opt.h files contains only defines, which are used later > by the code like This is a good point. In this case I had done the manual review as well. "make universe" was an additional check. > If you are removing the option include, the module Makefile should be > adjusted too. :-\ I had sent this to Colin but forgot to include it in my final commit. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 20:37:38 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BEF3AB2A; Thu, 15 Nov 2012 20:37:38 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A35248FC08; Thu, 15 Nov 2012 20:37:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFKbco3051981; Thu, 15 Nov 2012 20:37:38 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFKbc6h051980; Thu, 15 Nov 2012 20:37:38 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211152037.qAFKbc6h051980@svn.freebsd.org> From: Eitan Adler Date: Thu, 15 Nov 2012 20:37:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243101 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 20:37:38 -0000 Author: eadler Date: Thu Nov 15 20:37:38 2012 New Revision: 243101 URL: http://svnweb.freebsd.org/changeset/base/243101 Log: Using set -x produces output on stderr instead of stdout. It also doesn't work with make -s. Prefer the use of builtin make features. PR: misc/126312 Reported by: Nejc Skoberne Submitted by: bdrewery Approved by: cperciva MFC after: 1 week Modified: head/etc/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Thu Nov 15 20:25:09 2012 (r243100) +++ head/etc/Makefile Thu Nov 15 20:37:38 2012 (r243101) @@ -220,8 +220,7 @@ distribution: cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0500 \ ${BSM_ETC_EXEC_FILES} ${BSM_ETC_DIR} .if ${MK_BIND_MTREE} != "no" - @if [ ! -e ${DESTDIR}/etc/namedb ]; then \ - set -x; \ + if [ ! -e ${DESTDIR}/etc/namedb ]; then \ ln -s ../var/named/etc/namedb ${DESTDIR}/etc/namedb; \ fi .endif @@ -267,9 +266,8 @@ distribution: .if ${MK_MAIL} != "no" cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${ETCMAIL} ${DESTDIR}/etc/mail - @if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \ + if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \ ! -f ${DESTDIR}/etc/aliases ]; then \ - set -x; \ ln -s mail/aliases ${DESTDIR}/etc/aliases; \ fi .endif From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 20:50:19 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2AFEF245; Thu, 15 Nov 2012 20:50:19 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0E29E8FC08; Thu, 15 Nov 2012 20:50:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFKoIjH053378; Thu, 15 Nov 2012 20:50:18 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFKoIEH053377; Thu, 15 Nov 2012 20:50:18 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201211152050.qAFKoIEH053377@svn.freebsd.org> From: Sergey Kandaurov Date: Thu, 15 Nov 2012 20:50:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243102 - head/cddl/contrib/opensolaris/cmd/zpool X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 20:50:19 -0000 Author: pluknet Date: Thu Nov 15 20:50:18 2012 New Revision: 243102 URL: http://svnweb.freebsd.org/changeset/base/243102 Log: Sort SEE ALSO xrefs by the manual section number and add a missing comma. Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Thu Nov 15 20:37:38 2012 (r243101) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Thu Nov 15 20:50:18 2012 (r243102) @@ -1927,8 +1927,8 @@ Discarded approximately 29 seconds of tr .Ed .El .Sh SEE ALSO +.Xr zpool-features 7 , .Xr zfs 8 -.Xr zpool-features 7 .Sh AUTHORS This manual page is a .Xr mdoc 7 From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 21:22:50 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D3D17DCD; Thu, 15 Nov 2012 21:22:50 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B5CEB8FC08; Thu, 15 Nov 2012 21:22:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFLMoSc058195; Thu, 15 Nov 2012 21:22:50 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFLMoHm058193; Thu, 15 Nov 2012 21:22:50 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201211152122.qAFLMoHm058193@svn.freebsd.org> From: Sergey Kandaurov Date: Thu, 15 Nov 2012 21:22:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243104 - head/bin/df X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 21:22:51 -0000 Author: pluknet Date: Thu Nov 15 21:22:50 2012 New Revision: 243104 URL: http://svnweb.freebsd.org/changeset/base/243104 Log: Fix section number for pstat and swapinfo cross references. MFC after: 3 days Modified: head/bin/df/df.1 Modified: head/bin/df/df.1 ============================================================================== --- head/bin/df/df.1 Thu Nov 15 20:51:57 2012 (r243103) +++ head/bin/df/df.1 Thu Nov 15 21:22:50 2012 (r243104) @@ -166,9 +166,7 @@ is set, the block counts will be display .El .Sh SEE ALSO .Xr lsvfs 1 , -.Xr pstat 1 , .Xr quota 1 , -.Xr swapinfo 1 , .Xr fstatfs 2 , .Xr getfsstat 2 , .Xr statfs 2 , @@ -176,7 +174,9 @@ is set, the block counts will be display .Xr localeconv 3 , .Xr fstab 5 , .Xr mount 8 , -.Xr quot 8 +.Xr pstat 8 , +.Xr quot 8 , +.Xr swapinfo 8 .Sh STANDARDS With the exception of most options, the From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 22:31:23 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C47A6624; Thu, 15 Nov 2012 22:31:23 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8B3B88FC14; Thu, 15 Nov 2012 22:31:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFMVN71067299; Thu, 15 Nov 2012 22:31:23 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFMVNd2067298; Thu, 15 Nov 2012 22:31:23 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <201211152231.qAFMVNd2067298@svn.freebsd.org> From: Olivier Houchard Date: Thu, 15 Nov 2012 22:31:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243107 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 22:31:23 -0000 Author: cognet Date: Thu Nov 15 22:31:23 2012 New Revision: 243107 URL: http://svnweb.freebsd.org/changeset/base/243107 Log: Use the "inner shareable" variations of flush/invalidate functions for SMP. Submitted by: Giovanni Trematerra Modified: head/sys/arm/arm/cpufunc_asm_armv7.S Modified: head/sys/arm/arm/cpufunc_asm_armv7.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_armv7.S Thu Nov 15 22:05:18 2012 (r243106) +++ head/sys/arm/arm/cpufunc_asm_armv7.S Thu Nov 15 22:31:23 2012 (r243107) @@ -70,7 +70,11 @@ ENTRY(armv7_setttb) orr r0, r0, #PT_ATTR mcr p15, 0, r0, c2, c0, 0 /* Translation Table Base Register 0 (TTBR0) */ +#ifdef SMP + mcr p15, 0, r0, c8, c3, 0 /* invalidate I+D TLBs Inner Shareable*/ +#else mcr p15, 0, r0, c8, c7, 0 /* invalidate I+D TLBs */ +#endif dsb isb RET @@ -78,11 +82,12 @@ ENTRY(armv7_setttb) ENTRY(armv7_tlb_flushID) dsb #ifdef SMP - mcr p15, 0, r0, c8, c3, 0 + mcr p15, 0, r0, c8, c3, 0 /* flush I+D tlb */ + mcr p15, 0, r0, c7, c1, 6 /* flush BTB */ #else mcr p15, 0, r0, c8, c7, 0 /* flush I+D tlb */ -#endif mcr p15, 0, r0, c7, c5, 6 /* flush BTB */ +#endif dsb isb mov pc, lr @@ -91,11 +96,12 @@ ENTRY(armv7_tlb_flushID_SE) ldr r1, .Lpage_mask bic r0, r0, r1 #ifdef SMP - mcr p15, 0, r0, c8, c3, 1 /* flush D tlb single entry */ + mcr p15, 0, r0, c8, c3, 1 /* flush D tlb single entry Inner Shareable*/ + mcr p15, 0, r0, c7, c1, 6 /* flush BTB Inner Shareable */ #else mcr p15, 0, r0, c8, c7, 1 /* flush D tlb single entry */ -#endif mcr p15, 0, r0, c7, c5, 6 /* flush BTB */ +#endif dsb isb mov pc, lr @@ -155,7 +161,11 @@ Finished: ENTRY(armv7_idcache_wbinv_all) stmdb sp!, {lr} bl armv7_dcache_wbinv_all +#ifdef SMP + mcr p15, 0, r0, c7, c1, 0 /* Invalidate all I caches to PoU (ICIALLUIS) */ +#else mcr p15, 0, r0, c7, c5, 0 /* Invalidate all I caches to PoU (ICIALLU) */ +#endif dsb isb ldmia sp!, {lr} @@ -251,7 +261,11 @@ ENTRY(armv7_context_switch) orr r0, r0, #PT_ATTR mcr p15, 0, r0, c2, c0, 0 /* set the new TTB */ +#ifdef SMP + mcr p15, 0, r0, c8, c3, 0 /* and flush the I+D tlbs Inner Sharable */ +#else mcr p15, 0, r0, c8, c7, 0 /* and flush the I+D tlbs */ +#endif dsb isb RET From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 23:49:08 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EC122998; Thu, 15 Nov 2012 23:49:07 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CCBEC8FC13; Thu, 15 Nov 2012 23:49:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFNn7Xr078236; Thu, 15 Nov 2012 23:49:07 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFNn75t078235; Thu, 15 Nov 2012 23:49:07 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <201211152349.qAFNn75t078235@svn.freebsd.org> From: Olivier Houchard Date: Thu, 15 Nov 2012 23:49:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243108 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 23:49:08 -0000 Author: cognet Date: Thu Nov 15 23:49:07 2012 New Revision: 243108 URL: http://svnweb.freebsd.org/changeset/base/243108 Log: Remove a useless printf Modified: head/sys/arm/arm/busdma_machdep-v6.c Modified: head/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- head/sys/arm/arm/busdma_machdep-v6.c Thu Nov 15 22:31:23 2012 (r243107) +++ head/sys/arm/arm/busdma_machdep-v6.c Thu Nov 15 23:49:07 2012 (r243108) @@ -1463,7 +1463,6 @@ add_bounce_page(bus_dma_tag_t dmat, bus_ struct bounce_zone *bz; struct bounce_page *bpage; - printf("add bounce page\n"); KASSERT(dmat->bounce_zone != NULL, ("no bounce zone in dma tag")); KASSERT(map != NULL, ("add_bounce_page: bad map %p", map)); From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 00:14:02 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B1A857D; Fri, 16 Nov 2012 00:14:02 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 97A108FC12; Fri, 16 Nov 2012 00:14:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAG0E2hc082593; Fri, 16 Nov 2012 00:14:02 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAG0E2qC082592; Fri, 16 Nov 2012 00:14:02 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <201211160014.qAG0E2qC082592@svn.freebsd.org> From: Olivier Houchard Date: Fri, 16 Nov 2012 00:14:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243109 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 00:14:02 -0000 Author: cognet Date: Fri Nov 16 00:14:02 2012 New Revision: 243109 URL: http://svnweb.freebsd.org/changeset/base/243109 Log: Don't forget to unlock the pmap lock on failure. Modified: head/sys/arm/arm/pmap-v6.c Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Thu Nov 15 23:49:07 2012 (r243108) +++ head/sys/arm/arm/pmap-v6.c Fri Nov 16 00:14:02 2012 (r243109) @@ -2361,8 +2361,10 @@ pmap_change_attr(vm_offset_t sva, vm_siz * Only supported on kernel virtual addresses, including the direct * map but excluding the recursive map. */ - if (base < DMAP_MIN_ADDRESS) + if (base < DMAP_MIN_ADDRESS) { + PMAP_UNLOCK(kernel_pmap); return (EINVAL); + } #endif for (tmpva = base; tmpva < base + size; ) { next_bucket = L2_NEXT_BUCKET(tmpva); @@ -2377,8 +2379,10 @@ pmap_change_attr(vm_offset_t sva, vm_siz ptep = &l2b->l2b_kva[l2pte_index(tmpva)]; - if (*ptep == 0) + if (*ptep == 0) { + PMAP_UNLOCK(kernel_pmap); return(EINVAL); + } pte = *ptep &~ L2_S_CACHE_MASK; cpu_idcache_wbinv_range(tmpva, PAGE_SIZE); From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 00:21:54 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E108143D; Fri, 16 Nov 2012 00:21:54 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C59BA8FC08; Fri, 16 Nov 2012 00:21:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAG0Ls2n083506; Fri, 16 Nov 2012 00:21:54 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAG0Ls0m083505; Fri, 16 Nov 2012 00:21:54 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201211160021.qAG0Ls0m083505@svn.freebsd.org> From: Navdeep Parhar Date: Fri, 16 Nov 2012 00:21:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243110 - head/sys/dev/cxgbe/tom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 00:21:55 -0000 Author: np Date: Fri Nov 16 00:21:54 2012 New Revision: 243110 URL: http://svnweb.freebsd.org/changeset/base/243110 Log: cxgbe/tom: Plug mbuf leak. MFC after: 3 days Modified: head/sys/dev/cxgbe/tom/t4_listen.c Modified: head/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_listen.c Fri Nov 16 00:14:02 2012 (r243109) +++ head/sys/dev/cxgbe/tom/t4_listen.c Fri Nov 16 00:21:54 2012 (r243110) @@ -559,8 +559,10 @@ t4_syncache_respond(struct toedev *tod, struct tcphdr *th = (void *)(ip + 1); wr = (struct wrqe *)atomic_readandclear_ptr(&synqe->wr); - if (wr == NULL) + if (wr == NULL) { + m_freem(m); return (EALREADY); + } bzero(&to, sizeof(to)); tcp_dooptions(&to, (void *)(th + 1), (th->th_off << 2) - sizeof(*th), From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 00:52:12 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F18B292A for ; Fri, 16 Nov 2012 00:52:11 +0000 (UTC) (envelope-from postmaster@mailpod.hostingplatform.com) Received: from atl4mhob04.myregisteredsite.com (atl4mhob04.myregisteredsite.com [209.17.115.42]) by mx1.freebsd.org (Postfix) with ESMTP id 84C5A8FC12 for ; Fri, 16 Nov 2012 00:52:11 +0000 (UTC) Received: from mailpod1.hostingplatform.com (mailpod1.networksolutionsemail.com [206.188.198.65]) by atl4mhob04.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAG0qBLr013994 for ; Thu, 15 Nov 2012 19:52:11 -0500 Received: (qmail 16438 invoked by uid 0); 16 Nov 2012 00:52:10 -0000 Received: (qmail 2603 invoked by uid 0); 15 Nov 2012 15:51:29 -0000 Received: (qmail 2525 invoked by uid 0); 15 Nov 2012 15:12:46 -0000 Received: from unknown (HELO atl4mhib29.myregisteredsite.com) (209) by 0 with SMTP; 15 Nov 2012 15:12:46 -0000 Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by atl4mhib29.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAFF8H7X006506 for ; Thu, 15 Nov 2012 10:08:17 -0500 Received: from hub.freebsd.org (hub.FreeBSD.org [8.8.178.136]) by mx2.freebsd.org (Postfix) with ESMTP id 9D7943B5E65; Thu, 15 Nov 2012 15:08:06 +0000 (UTC) Received: from hub.FreeBSD.org (hub.FreeBSD.org [8.8.178.136]) by hub.freebsd.org (Postfix) with ESMTP id 3631213EE; Thu, 15 Nov 2012 15:08:07 +0000 (UTC) (envelope-from owner-svn-src-all@freebsd.org) Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AC4808B7; Thu, 15 Nov 2012 15:06:24 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 78D768FC17; Thu, 15 Nov 2012 15:06:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFF6OtY004168; Thu, 15 Nov 2012 15:06:24 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFF6OEE004167; Thu, 15 Nov 2012 15:06:24 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211151506.qAFF6OEE004167@svn.freebsd.org> From: Eitan Adler Date: Thu, 15 Nov 2012 15:06:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243083 - head/usr.sbin/chkgrp X-SVN-Group: head MIME-Version: 1.0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: owner-svn-src-all@freebsd.org Sender: owner-svn-src-all@freebsd.org X-SpamScore: 0 X-MailHub-Apparently-To: mjm@michaelmeltzer.com X-MailHub-Forwarded: Yes X-BeenThere: svn-src-head@freebsd.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 00:52:12 -0000 Author: eadler Date: Thu Nov 15 15:06:24 2012 New Revision: 243083 URL: http://svnweb.freebsd.org/changeset/base/243083 Log: Be declarative about if an error has occured. Fixes overflow on very large group files with lots of errors. This is unlikely to occur in practice. Approved by: cperciva MFC after: 1 week Modified: head/usr.sbin/chkgrp/chkgrp.c Modified: head/usr.sbin/chkgrp/chkgrp.c ============================================================================== --- head/usr.sbin/chkgrp/chkgrp.c Thu Nov 15 15:06:21 2012 (r243082) +++ head/usr.sbin/chkgrp/chkgrp.c Thu Nov 15 15:06:24 2012 (r243083) @@ -81,7 +81,7 @@ main(int argc, char *argv[]) break; if (len > 0 && line[len - 1] != '\n') { warnx("%s: line %d: no newline character", gfn, n); - e++; + e = 1; } while (len && isspace(line[len-1])) len--; @@ -114,14 +114,14 @@ main(int argc, char *argv[]) warnx("%s: line %d: missing field(s)", gfn, n); for ( ; k < 4; k++) f[k] = empty; - e++; + e = 1; } for (cp = f[0] ; *cp ; cp++) { if (!isalnum(*cp) && *cp != '.' && *cp != '_' && *cp != '-' && (cp > f[0] || *cp != '+')) { warnx("%s: line %d: '%c' invalid character", gfn, n, *cp); - e++; + e = 1; } } @@ -129,14 +129,14 @@ main(int argc, char *argv[]) if (!isalnum(*cp) && *cp != '.' && *cp != '_' && *cp != '-' && *cp != ',') { warnx("%s: line %d: '%c' invalid character", gfn, n, *cp); - e++; + e = 1; } } /* check if fourth field ended with a colon */ if (i < len) { warnx("%s: line %d: too many fields", gfn, n); - e++; + e = 1; } /* check that none of the fields contain whitespace */ @@ -144,14 +144,14 @@ main(int argc, char *argv[]) if (strcspn(f[k], " \t") != strlen(f[k])) { warnx("%s: line %d: field %d contains whitespace", gfn, n, k+1); - e++; + e = 1; } } /* check that the GID is numeric */ if (strspn(f[2], "0123456789") != strlen(f[2])) { warnx("%s: line %d: GID is not numeric", gfn, n); - e++; + e = 1; } /* check the range of the group id */ @@ -163,7 +163,7 @@ main(int argc, char *argv[]) else if (groupid > GID_MAX) { warnx("%s: line %d: group id is too large (> %ju)", gfn, n, (uintmax_t)GID_MAX); - e++; + e = 1; } #if 0 _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 00:57:00 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 49034C2B for ; Fri, 16 Nov 2012 00:57:00 +0000 (UTC) (envelope-from postmaster@mailpod.hostingplatform.com) Received: from atl4mhob08.myregisteredsite.com (atl4mhob08.myregisteredsite.com [209.17.115.46]) by mx1.freebsd.org (Postfix) with ESMTP id EE44B8FC0C for ; Fri, 16 Nov 2012 00:56:59 +0000 (UTC) Received: from mailpod1.hostingplatform.com (mailpod1.networksolutionsemail.com [206.188.198.65]) by atl4mhob08.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAG0uxEL030143 for ; Thu, 15 Nov 2012 19:56:59 -0500 Received: (qmail 11521 invoked by uid 0); 16 Nov 2012 00:56:59 -0000 Received: (qmail 3306 invoked by uid 0); 15 Nov 2012 15:49:33 -0000 Received: (qmail 6494 invoked by uid 0); 15 Nov 2012 15:07:40 -0000 Received: from unknown (HELO atl4mhib41.myregisteredsite.com) (209) by 0 with SMTP; 15 Nov 2012 15:07:40 -0000 Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by atl4mhib41.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAFF7c3j022831 for ; Thu, 15 Nov 2012 10:07:38 -0500 Received: from hub.freebsd.org (hub.FreeBSD.org [8.8.178.136]) by mx2.freebsd.org (Postfix) with ESMTP id B66113B77A5; Thu, 15 Nov 2012 15:07:18 +0000 (UTC) Received: from hub.FreeBSD.org (hub.FreeBSD.org [8.8.178.136]) by hub.freebsd.org (Postfix) with ESMTP id E04AE11AC; Thu, 15 Nov 2012 15:07:08 +0000 (UTC) (envelope-from owner-svn-src-all@freebsd.org) Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A2B59523; Thu, 15 Nov 2012 15:06:09 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 887DA8FC13; Thu, 15 Nov 2012 15:06:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFF69XX003942; Thu, 15 Nov 2012 15:06:09 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFF69YE003941; Thu, 15 Nov 2012 15:06:09 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211151506.qAFF69YE003941@svn.freebsd.org> From: Eitan Adler Date: Thu, 15 Nov 2012 15:06:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243078 - head/sys/dev/mfi X-SVN-Group: head MIME-Version: 1.0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: owner-svn-src-all@freebsd.org Sender: owner-svn-src-all@freebsd.org X-SpamScore: 0 X-MailHub-Apparently-To: mjm@michaelmeltzer.com X-MailHub-Forwarded: Yes X-BeenThere: svn-src-head@freebsd.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 00:57:00 -0000 Author: eadler Date: Thu Nov 15 15:06:09 2012 New Revision: 243078 URL: http://svnweb.freebsd.org/changeset/base/243078 Log: Add deviceid to the disk output on boot to help debugging. PR: kern/173290 Submitted by: Steven Hartland Approved by: cperciva MFC after: 1 week Modified: head/sys/dev/mfi/mfi_syspd.c Modified: head/sys/dev/mfi/mfi_syspd.c ============================================================================== --- head/sys/dev/mfi/mfi_syspd.c Thu Nov 15 15:06:06 2012 (r243077) +++ head/sys/dev/mfi/mfi_syspd.c Thu Nov 15 15:06:09 2012 (r243078) @@ -122,8 +122,8 @@ mfi_syspd_attach(device_t dev) break; } mtx_unlock(&sc->pd_controller->mfi_io_lock); - device_printf(dev, "%juMB (%ju sectors) SYSPD volume\n", - sectors / (1024 * 1024 / secsize), sectors); + device_printf(dev, "%juMB (%ju sectors) SYSPD volume (deviceid: %d)\n", + sectors / (1024 * 1024 / secsize), sectors, sc->pd_id); sc->pd_disk = disk_alloc(); sc->pd_disk->d_drv1 = sc; sc->pd_disk->d_maxsize = sc->pd_controller->mfi_max_io * secsize; _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 00:58:00 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E587AD4F for ; Fri, 16 Nov 2012 00:58:00 +0000 (UTC) (envelope-from postmaster@mailpod.hostingplatform.com) Received: from atl4mhob05.myregisteredsite.com (atl4mhob05.myregisteredsite.com [209.17.115.43]) by mx1.freebsd.org (Postfix) with ESMTP id 946A88FC08 for ; Fri, 16 Nov 2012 00:58:00 +0000 (UTC) Received: from mailpod1.hostingplatform.com (mailpod1.networksolutionsemail.com [206.188.198.65]) by atl4mhob05.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAG0w0wM019301 for ; Thu, 15 Nov 2012 19:58:00 -0500 Received: (qmail 20858 invoked by uid 0); 16 Nov 2012 00:57:59 -0000 Received: (qmail 27346 invoked by uid 0); 15 Nov 2012 20:26:59 -0000 Received: from unknown (HELO atl4mhib01.myregisteredsite.com) (209) by 0 with SMTP; 15 Nov 2012 20:26:59 -0000 Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by atl4mhib01.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAFKPLEK005512 for ; Thu, 15 Nov 2012 15:25:21 -0500 Received: from hub.freebsd.org (hub.FreeBSD.org [8.8.178.136]) by mx2.freebsd.org (Postfix) with ESMTP id 9D8C13B6A3B; Thu, 15 Nov 2012 20:25:17 +0000 (UTC) Received: from hub.FreeBSD.org (hub.FreeBSD.org [8.8.178.136]) by hub.freebsd.org (Postfix) with ESMTP id 44FAC884; Thu, 15 Nov 2012 20:25:18 +0000 (UTC) (envelope-from owner-svn-src-all@freebsd.org) Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B3FE9744; Thu, 15 Nov 2012 20:25:10 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 96CD18FC08; Thu, 15 Nov 2012 20:25:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFKP9Em050653; Thu, 15 Nov 2012 20:25:09 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFKP9SR050652; Thu, 15 Nov 2012 20:25:09 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211152025.qAFKP9SR050652@svn.freebsd.org> From: Eitan Adler Date: Thu, 15 Nov 2012 20:25:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243100 - head/sys/modules/agp X-SVN-Group: head MIME-Version: 1.0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: owner-svn-src-all@freebsd.org Sender: owner-svn-src-all@freebsd.org X-SpamScore: 0 X-MailHub-Apparently-To: mjm@michaelmeltzer.com X-MailHub-Forwarded: Yes X-BeenThere: svn-src-head@freebsd.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 00:58:01 -0000 Author: eadler Date: Thu Nov 15 20:25:09 2012 New Revision: 243100 URL: http://svnweb.freebsd.org/changeset/base/243100 Log: Finish removing unneeded header from agp: opt_bus.h Approved by: cperciva MFC after: 1 week Modified: head/sys/modules/agp/Makefile Modified: head/sys/modules/agp/Makefile ============================================================================== --- head/sys/modules/agp/Makefile Thu Nov 15 20:06:07 2012 (r243099) +++ head/sys/modules/agp/Makefile Thu Nov 15 20:25:09 2012 (r243100) @@ -18,7 +18,7 @@ SRCS+= agp_amd64.c agp_i810.c agp_via.c SRCS+= agp_apple.c .endif SRCS+= device_if.h bus_if.h agp_if.h pci_if.h -SRCS+= opt_agp.h opt_bus.h +SRCS+= opt_agp.h MFILES= kern/device_if.m kern/bus_if.m dev/agp/agp_if.m dev/pci/pci_if.m WERROR= _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 00:59:13 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 77AC0E99; Fri, 16 Nov 2012 00:59:13 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 56EF38FC0C; Fri, 16 Nov 2012 00:59:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAG0xDEN087969; Fri, 16 Nov 2012 00:59:13 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAG0xCsR087925; Fri, 16 Nov 2012 00:59:12 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201211160059.qAG0xCsR087925@svn.freebsd.org> From: Devin Teske Date: Fri, 16 Nov 2012 00:59:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243112 - in head/usr.sbin/bsdconfig: . console diskmgmt docsinstall dot mouse networking password security share startup timezone ttys usermgmt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 00:59:13 -0000 Author: dteske Date: Fri Nov 16 00:59:11 2012 New Revision: 243112 URL: http://svnweb.freebsd.org/changeset/base/243112 Log: Replicate a feature from sysinstall documented in stable/9/usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below): If /usr/sbin/sysinstall is linked to another filename, say `/usr/local/bin/configPackages', then the basename will be used as an implicit command name. To get a list of modules you can link to, see `bsdconfig -h' output. Approved by: adrian (co-mentor) (implicit) Modified: head/usr.sbin/bsdconfig/bsdconfig head/usr.sbin/bsdconfig/console/console head/usr.sbin/bsdconfig/console/font head/usr.sbin/bsdconfig/console/keymap head/usr.sbin/bsdconfig/console/repeat head/usr.sbin/bsdconfig/console/saver head/usr.sbin/bsdconfig/console/screenmap head/usr.sbin/bsdconfig/console/ttys head/usr.sbin/bsdconfig/diskmgmt/diskmgmt head/usr.sbin/bsdconfig/docsinstall/docsinstall head/usr.sbin/bsdconfig/dot/dot head/usr.sbin/bsdconfig/mouse/disable head/usr.sbin/bsdconfig/mouse/enable head/usr.sbin/bsdconfig/mouse/flags head/usr.sbin/bsdconfig/mouse/mouse head/usr.sbin/bsdconfig/mouse/port head/usr.sbin/bsdconfig/mouse/type head/usr.sbin/bsdconfig/networking/defaultrouter head/usr.sbin/bsdconfig/networking/devices head/usr.sbin/bsdconfig/networking/hostname head/usr.sbin/bsdconfig/networking/nameservers head/usr.sbin/bsdconfig/networking/networking head/usr.sbin/bsdconfig/password/password head/usr.sbin/bsdconfig/security/kern_securelevel head/usr.sbin/bsdconfig/security/security head/usr.sbin/bsdconfig/share/common.subr head/usr.sbin/bsdconfig/startup/misc head/usr.sbin/bsdconfig/startup/rcadd head/usr.sbin/bsdconfig/startup/rcconf head/usr.sbin/bsdconfig/startup/rcdelete head/usr.sbin/bsdconfig/startup/rcedit head/usr.sbin/bsdconfig/startup/rcvar head/usr.sbin/bsdconfig/startup/startup head/usr.sbin/bsdconfig/timezone/timezone head/usr.sbin/bsdconfig/ttys/ttys head/usr.sbin/bsdconfig/usermgmt/groupadd head/usr.sbin/bsdconfig/usermgmt/groupdel head/usr.sbin/bsdconfig/usermgmt/groupedit head/usr.sbin/bsdconfig/usermgmt/groupinput head/usr.sbin/bsdconfig/usermgmt/useradd head/usr.sbin/bsdconfig/usermgmt/userdel head/usr.sbin/bsdconfig/usermgmt/useredit head/usr.sbin/bsdconfig/usermgmt/userinput head/usr.sbin/bsdconfig/usermgmt/usermgmt Modified: head/usr.sbin/bsdconfig/bsdconfig ============================================================================== --- head/usr.sbin/bsdconfig/bsdconfig Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/bsdconfig Fri Nov 16 00:59:11 2012 (r243112) @@ -202,6 +202,16 @@ dialog_menu_main() ############################################################ MAIN # +# If $0 is not "bsdconfig", interpret it as a keyword to a menuitem +# +if [ "$pgm" != "bsdconfig" ] && + indexfile=$( f_index_file "$pgm" ) && + cmd=$( f_index_menusel_command "$indexfile" "$pgm" ) +then + exec "$cmd" "$@" || exit 1 +fi + +# # Process command-line arguments # while getopts hSX flag; do @@ -244,51 +254,18 @@ if [ "$1" ]; then esac # - # Find the INDEX (possibly i18n) claiming this keyword + # Find the INDEX (possibly i18n) claiming this keyword and get the + # command to execute from the menu_selection line. # - lang="${LANG:-$LC_ALL}" - if [ "$lang" ]; then - sel=$( grep "^menu_selection=\"$1|" */INDEX.$lang \ - 2> /dev/null | tail -1 ) - - # Fall-back to non-i18n sources if nothing was found - [ "$sel" ] || - sel=$( grep "^menu_selection=\"$1|" */INDEX | tail -1 ) - else - sel=$( grep "^menu_selection=\"$1|" */INDEX | tail -1 ) - fi - - # - # If no matches, display usage (which shows valid keywords) - # - if [ ! "$sel" ]; then + if ! { indexfile=$( f_index_file "$1" ) && + cmd=$( f_index_menusel_command "$indexfile" "$1" ) + }; then + # no matches, display usage (which shows valid keywords) f_err "%s: %s: $msg_not_found\n" "$pgm" "$1" usage fi - # - # The command to execute is after the pipe-character (|) in the - # menu_selection property of the INDEX file for the menuitem. - # - cmd="${sel#*|}" - cmd="${cmd%\"}" - if [ ! "$cmd" ]; then - echo "$pgm: $1: $msg_not_found" - usage - fi shift - - # - # If the command pathname is not fully qualified fix-up/force to be - # relative to the menuitem directory. - # - case "$cmd" in - /*) : already fully qualified ;; - *) - dir="${sel%%/*}" - cmd="$dir/$cmd" - esac - exec $cmd ${USE_XDIALOG:+-X} "$@" || exit 1 fi Modified: head/usr.sbin/bsdconfig/console/console ============================================================================== --- head/usr.sbin/bsdconfig/console/console Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/console/console Fri Nov 16 00:59:11 2012 (r243112) @@ -36,7 +36,7 @@ f_include $BSDCFG_SHARE/mustberoot.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="080.console" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ FUNCTIONS Modified: head/usr.sbin/bsdconfig/console/font ============================================================================== --- head/usr.sbin/bsdconfig/console/font Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/console/font Fri Nov 16 00:59:11 2012 (r243112) @@ -37,7 +37,7 @@ f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="080.console" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ FUNCTIONS Modified: head/usr.sbin/bsdconfig/console/keymap ============================================================================== --- head/usr.sbin/bsdconfig/console/keymap Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/console/keymap Fri Nov 16 00:59:11 2012 (r243112) @@ -37,7 +37,7 @@ f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="080.console" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ CONFIGURATION Modified: head/usr.sbin/bsdconfig/console/repeat ============================================================================== --- head/usr.sbin/bsdconfig/console/repeat Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/console/repeat Fri Nov 16 00:59:11 2012 (r243112) @@ -37,7 +37,7 @@ f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="080.console" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ FUNCTIONS Modified: head/usr.sbin/bsdconfig/console/saver ============================================================================== --- head/usr.sbin/bsdconfig/console/saver Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/console/saver Fri Nov 16 00:59:11 2012 (r243112) @@ -37,7 +37,7 @@ f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="080.console" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ FUNCTIONS Modified: head/usr.sbin/bsdconfig/console/screenmap ============================================================================== --- head/usr.sbin/bsdconfig/console/screenmap Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/console/screenmap Fri Nov 16 00:59:11 2012 (r243112) @@ -37,7 +37,7 @@ f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="080.console" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ FUNCTIONS Modified: head/usr.sbin/bsdconfig/console/ttys ============================================================================== --- head/usr.sbin/bsdconfig/console/ttys Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/console/ttys Fri Nov 16 00:59:11 2012 (r243112) @@ -37,7 +37,7 @@ f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="080.console" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ CONFIGURATION Modified: head/usr.sbin/bsdconfig/diskmgmt/diskmgmt ============================================================================== --- head/usr.sbin/bsdconfig/diskmgmt/diskmgmt Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/diskmgmt/diskmgmt Fri Nov 16 00:59:11 2012 (r243112) @@ -36,7 +36,7 @@ f_include $BSDCFG_SHARE/mustberoot.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="050.diskmgmt" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ CONFIGURATION Modified: head/usr.sbin/bsdconfig/docsinstall/docsinstall ============================================================================== --- head/usr.sbin/bsdconfig/docsinstall/docsinstall Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/docsinstall/docsinstall Fri Nov 16 00:59:11 2012 (r243112) @@ -36,7 +36,7 @@ f_include $BSDCFG_SHARE/mustberoot.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="020.docsinstall" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ CONFIGURATION Modified: head/usr.sbin/bsdconfig/dot/dot ============================================================================== --- head/usr.sbin/bsdconfig/dot/dot Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/dot/dot Fri Nov 16 00:59:11 2012 (r243112) @@ -35,7 +35,7 @@ BSDCFG_LIBE="/usr/libexec/bsdconfig" APP f_include_lang $BSDCFG_LIBE/include/messages.subr f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ CONFIGURATION Modified: head/usr.sbin/bsdconfig/mouse/disable ============================================================================== --- head/usr.sbin/bsdconfig/mouse/disable Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/mouse/disable Fri Nov 16 00:59:11 2012 (r243112) @@ -37,7 +37,7 @@ f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="110.mouse" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ CONFIGURATION Modified: head/usr.sbin/bsdconfig/mouse/enable ============================================================================== --- head/usr.sbin/bsdconfig/mouse/enable Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/mouse/enable Fri Nov 16 00:59:11 2012 (r243112) @@ -37,7 +37,7 @@ f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="110.mouse" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ CONFIGURATION Modified: head/usr.sbin/bsdconfig/mouse/flags ============================================================================== --- head/usr.sbin/bsdconfig/mouse/flags Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/mouse/flags Fri Nov 16 00:59:11 2012 (r243112) @@ -37,7 +37,7 @@ f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="110.mouse" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ CONFIGURATION Modified: head/usr.sbin/bsdconfig/mouse/mouse ============================================================================== --- head/usr.sbin/bsdconfig/mouse/mouse Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/mouse/mouse Fri Nov 16 00:59:11 2012 (r243112) @@ -36,7 +36,7 @@ f_include $BSDCFG_SHARE/mustberoot.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="110.mouse" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ FUNCTIONS Modified: head/usr.sbin/bsdconfig/mouse/port ============================================================================== --- head/usr.sbin/bsdconfig/mouse/port Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/mouse/port Fri Nov 16 00:59:11 2012 (r243112) @@ -37,7 +37,7 @@ f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="110.mouse" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ FUNCTIONS Modified: head/usr.sbin/bsdconfig/mouse/type ============================================================================== --- head/usr.sbin/bsdconfig/mouse/type Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/mouse/type Fri Nov 16 00:59:11 2012 (r243112) @@ -37,7 +37,7 @@ f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="110.mouse" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ FUNCTIONS Modified: head/usr.sbin/bsdconfig/networking/defaultrouter ============================================================================== --- head/usr.sbin/bsdconfig/networking/defaultrouter Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/networking/defaultrouter Fri Nov 16 00:59:11 2012 (r243112) @@ -37,7 +37,7 @@ f_include $BSDCFG_SHARE/networking/routi BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="120.networking" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ MAIN Modified: head/usr.sbin/bsdconfig/networking/devices ============================================================================== --- head/usr.sbin/bsdconfig/networking/devices Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/networking/devices Fri Nov 16 00:59:11 2012 (r243112) @@ -41,7 +41,7 @@ f_include $BSDCFG_SHARE/networking/netma BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="120.networking" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ MAIN Modified: head/usr.sbin/bsdconfig/networking/hostname ============================================================================== --- head/usr.sbin/bsdconfig/networking/hostname Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/networking/hostname Fri Nov 16 00:59:11 2012 (r243112) @@ -37,7 +37,7 @@ f_include $BSDCFG_SHARE/networking/hostn BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="120.networking" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ MAIN Modified: head/usr.sbin/bsdconfig/networking/nameservers ============================================================================== --- head/usr.sbin/bsdconfig/networking/nameservers Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/networking/nameservers Fri Nov 16 00:59:11 2012 (r243112) @@ -37,7 +37,7 @@ f_include $BSDCFG_SHARE/networking/resol BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="120.networking" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ MAIN Modified: head/usr.sbin/bsdconfig/networking/networking ============================================================================== --- head/usr.sbin/bsdconfig/networking/networking Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/networking/networking Fri Nov 16 00:59:11 2012 (r243112) @@ -36,7 +36,7 @@ f_include $BSDCFG_SHARE/mustberoot.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="120.networking" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ FUNCTIONS Modified: head/usr.sbin/bsdconfig/password/password ============================================================================== --- head/usr.sbin/bsdconfig/password/password Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/password/password Fri Nov 16 00:59:11 2012 (r243112) @@ -36,7 +36,7 @@ f_include $BSDCFG_SHARE/password/passwor BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="040.password" -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ CONFIGURATION Modified: head/usr.sbin/bsdconfig/security/kern_securelevel ============================================================================== --- head/usr.sbin/bsdconfig/security/kern_securelevel Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/security/kern_securelevel Fri Nov 16 00:59:11 2012 (r243112) @@ -39,7 +39,7 @@ f_include_lang $BSDCFG_LIBE/$APP_DIR/inc SECURELEVEL_HELPFILE=$BSDCFG_LIBE/$APP_DIR/include/securelevel.hlp -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ FUNCTIONS Modified: head/usr.sbin/bsdconfig/security/security ============================================================================== --- head/usr.sbin/bsdconfig/security/security Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/security/security Fri Nov 16 00:59:11 2012 (r243112) @@ -37,7 +37,7 @@ f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="130.security" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ FUNCTIONS Modified: head/usr.sbin/bsdconfig/share/common.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/common.subr Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/share/common.subr Fri Nov 16 00:59:11 2012 (r243112) @@ -271,50 +271,186 @@ f_usage() exit $FAILURE } -# f_index_menu_selection $file $pgm +# f_index_file $keyword +# +# Process all INDEX files known to bsdconfig and return the path to first file +# containing a menu_selection line with a keyword portion matching $keyword. +# +# If $LANG or $LC_ALL (in order of preference, respectively) is set, +# "INDEX.encoding" files will be searched first. +# +# If no file is found, error status is returned along with the NULL string. +# +# This function is a two-parter. Below is the awk(1) portion of the function, +# afterward is the sh(1) function which utilizes the below awk script. +# +f_index_file_awk=' +# Variables that should be defined on the invocation line: +# -v keyword="keyword" +BEGIN { found = 0 } +( $0 ~ "^menu_selection=\"" keyword "\\|" ) { + print FILENAME + found++ + exit +} +END { exit ! found } +' +f_index_file() +{ + local keyword="$1" + local lang="${LANG:-$LC_ALL}" + + f_dprintf "lang=[$lang]" + + if [ "$lang" ]; then + awk -v keyword="$keyword" "$f_index_file_awk" \ + $BSDCFG_LIBE${BSDCFG_LIBE:+/}*/INDEX.$lang && + return + # No match, fall-thru to non-i18n sources + fi + awk -v keyword="$keyword" "$f_index_file_awk" \ + $BSDCFG_LIBE${BSDCFG_LIBE:+/}*/INDEX +} + +# f_index_menusel_keyword $indexfile $pgm +# +# Process $indexfile and return only the keyword portion of the menu_selection +# line with a command portion matching $pgm. # -# Process $file looking for $menu_selection values that correspond to $pgm. # This function is for internationalization (i18n) mapping of the on-disk # scriptname ($pgm) into the localized language (given language-specific -# $file). If $LANG or $LC_ALL (in orderder of preference, respectively) is set, -# ".encoding" will automatically be appended as a suffix to the provided $file -# pathname. -# -# If, within $file, multiple $menu_selection values map to $pgm, only the first -# one will be returned. If no mapping can be made, the NULL string is returned. +# $indexfile). If $LANG or $LC_ALL (in orderder of preference, respectively) is +# set, ".encoding" will automatically be appended as a suffix to the provided +# $indexfile pathname. +# +# If, within $indexfile, multiple $menu_selection values map to $pgm, only the +# first one will be returned. If no mapping can be made, the NULL string is +# returned. # -# If $file does not exist, error status is returned along with the NULL string. +# If $indexfile does not exist, error status is returned with NULL. # # This function is a two-parter. Below is the awk(1) portion of the function, # afterward is the sh(1) function which utilizes the below awk script. # -f_index_menusel_awk=' +f_index_menusel_keyword_awk=' # Variables that should be defined on the invocation line: # -v pgm="program_name" # -( $0 ~ "^menu_selection=.*\\|" pgm "\"" ) { - sub(/\|.*/, "") - sub(/^menu_selection="/, "") - print - exit +BEGIN { + prefix = "menu_selection=\"" + plen = length(prefix) + found = 0 +} +{ + if (!match($0, "^" prefix ".*\\|.*\"")) next + + keyword = command = substr($0, plen + 1, RLENGTH - plen - 1) + sub(/^.*\|/, "", command) + sub(/\|.*$/, "", keyword) + + if ( command == pgm ) + { + print keyword + found++ + exit + } } +END { exit ! found } ' -f_index_menu_selection() +f_index_menusel_keyword() { - local file="$1" pgm="$2" + local indexfile="$1" pgm="$2" local lang="${LANG:-$LC_ALL}" f_dprintf "lang=[$lang]" - if [ -f "$file.$lang" ]; then - awk -v pgm="$pgm" "$f_index_menusel_awk" "$file.$lang" || - exit $FAILURE - elif [ -f "$file" ]; then - awk -v pgm="$pgm" "$f_index_menusel_awk" "$file" || - exit $FAILURE + if [ -f "$indexfile.$lang" ]; then + awk -v pgm="$pgm" \ + "$f_index_menusel_keyword_awk" \ + "$indexfile.$lang" + elif [ -f "$indexfile" ]; then + awk -v pgm="$pgm" \ + "$f_index_menusel_keyword_awk" \ + "$indexfile" + fi +} + +# f_index_menusel_command $indexfile $keyword +# +# Process $indexfile and return only the command portion of the menu_selection +# line with a keyword portion matching $keyword. +# +# This function is for mapping [possibly international] keywords into the +# command to be executed. If $LANG or $LC_ALL (order of preference) is set, +# ".encoding" will automatically be appended as a suffix to the provided +# $indexfile pathname. +# +# If, within $indexfile, multiple $menu_selection values map to $keyword, only +# the first one will be returned. If no mapping can be made, the NULL string is +# returned. +# +# If $indexfile doesn't exist, error status is returned with NULL. +# +# This function is a two-parter. Below is the awk(1) portion of the function, +# afterward is the sh(1) function which utilizes the below awk script. +# +f_index_menusel_command_awk=' +# Variables that should be defined on the invocation line: +# -v key="keyword" +# +BEGIN { + prefix = "menu_selection=\"" + plen = length(prefix) + found = 0 +} +{ + if (!match($0, "^" prefix ".*\\|.*\"")) next + + keyword = command = substr($0, plen + 1, RLENGTH - plen - 1) + sub(/^.*\|/, "", command) + sub(/\|.*$/, "", keyword) + + if ( keyword == key ) + { + print command + found++ + exit + } +} +END { exit ! found } +' +f_index_menusel_command() +{ + local indexfile="$1" keyword="$2" command + local lang="${LANG:-$LC_ALL}" + + f_dprintf "lang=[$lang]" + + if [ -f "$indexfile.$lang" ]; then + command=$( awk -v key="$keyword" \ + "$f_index_menusel_command_awk" \ + "$indexfile.$lang" ) || return $FAILURE + elif [ -f "$indexfile" ]; then + command=$( awk -v key="$keyword" \ + "$f_index_menusel_command_awk" \ + "$indexfile" ) || return $FAILURE else return $FAILURE fi + + # + # If the command pathname is not fully qualified fix-up/force to be + # relative to the $indexfile directory. + # + case "$command" in + /*) : already fully qualified ;; + *) + local indexdir="${indexfile%/*}" + [ "$indexdir" != "$indexfile" ] || indexdir="." + command="$indexdir/$command" + esac + + echo "$command" } ############################################################ MAIN Modified: head/usr.sbin/bsdconfig/startup/misc ============================================================================== --- head/usr.sbin/bsdconfig/startup/misc Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/startup/misc Fri Nov 16 00:59:11 2012 (r243112) @@ -37,7 +37,7 @@ f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="140.startup" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ GLOBALS Modified: head/usr.sbin/bsdconfig/startup/rcadd ============================================================================== --- head/usr.sbin/bsdconfig/startup/rcadd Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/startup/rcadd Fri Nov 16 00:59:11 2012 (r243112) @@ -37,7 +37,7 @@ f_include $BSDCFG_SHARE/startup/rcconf.s BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="140.startup" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ GLOBALS Modified: head/usr.sbin/bsdconfig/startup/rcconf ============================================================================== --- head/usr.sbin/bsdconfig/startup/rcconf Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/startup/rcconf Fri Nov 16 00:59:11 2012 (r243112) @@ -38,7 +38,7 @@ f_include $BSDCFG_SHARE/startup/rcconf.s BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="140.startup" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ GLOBALS Modified: head/usr.sbin/bsdconfig/startup/rcdelete ============================================================================== --- head/usr.sbin/bsdconfig/startup/rcdelete Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/startup/rcdelete Fri Nov 16 00:59:11 2012 (r243112) @@ -38,7 +38,7 @@ f_include $BSDCFG_SHARE/startup/rcconf.s BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="140.startup" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ GLOBALS Modified: head/usr.sbin/bsdconfig/startup/rcedit ============================================================================== --- head/usr.sbin/bsdconfig/startup/rcedit Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/startup/rcedit Fri Nov 16 00:59:11 2012 (r243112) @@ -37,7 +37,7 @@ f_include $BSDCFG_SHARE/startup/rcedit.s BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="140.startup" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ MAIN Modified: head/usr.sbin/bsdconfig/startup/rcvar ============================================================================== --- head/usr.sbin/bsdconfig/startup/rcvar Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/startup/rcvar Fri Nov 16 00:59:11 2012 (r243112) @@ -38,7 +38,7 @@ f_include $BSDCFG_SHARE/startup/rcvar.su BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="140.startup" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ GLOBALS Modified: head/usr.sbin/bsdconfig/startup/startup ============================================================================== --- head/usr.sbin/bsdconfig/startup/startup Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/startup/startup Fri Nov 16 00:59:11 2012 (r243112) @@ -36,7 +36,7 @@ f_include $BSDCFG_SHARE/mustberoot.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="140.startup" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ FUNCTIONS Modified: head/usr.sbin/bsdconfig/timezone/timezone ============================================================================== --- head/usr.sbin/bsdconfig/timezone/timezone Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/timezone/timezone Fri Nov 16 00:59:11 2012 (r243112) @@ -42,7 +42,7 @@ f_include $BSDCFG_SHARE/timezone/zones.s BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="090.timezone" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ CONFIGURATION Modified: head/usr.sbin/bsdconfig/ttys/ttys ============================================================================== --- head/usr.sbin/bsdconfig/ttys/ttys Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/ttys/ttys Fri Nov 16 00:59:11 2012 (r243112) @@ -36,7 +36,7 @@ f_include $BSDCFG_SHARE/mustberoot.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="150.ttys" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ CONFIGURATION Modified: head/usr.sbin/bsdconfig/usermgmt/groupadd ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/groupadd Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/usermgmt/groupadd Fri Nov 16 00:59:11 2012 (r243112) @@ -35,7 +35,7 @@ f_include $BSDCFG_SHARE/dialog.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="070.usermgmt" -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ MAIN Modified: head/usr.sbin/bsdconfig/usermgmt/groupdel ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/groupdel Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/usermgmt/groupdel Fri Nov 16 00:59:11 2012 (r243112) @@ -38,7 +38,7 @@ f_include $BSDCFG_SHARE/usermgmt/group_i BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="070.usermgmt" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ MAIN Modified: head/usr.sbin/bsdconfig/usermgmt/groupedit ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/groupedit Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/usermgmt/groupedit Fri Nov 16 00:59:11 2012 (r243112) @@ -38,7 +38,7 @@ f_include $BSDCFG_SHARE/usermgmt/group_i BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="070.usermgmt" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ MAIN Modified: head/usr.sbin/bsdconfig/usermgmt/groupinput ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/groupinput Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/usermgmt/groupinput Fri Nov 16 00:59:11 2012 (r243112) @@ -38,7 +38,7 @@ f_include $BSDCFG_SHARE/usermgmt/group_i BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="070.usermgmt" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ CONFIGURATION Modified: head/usr.sbin/bsdconfig/usermgmt/useradd ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/useradd Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/usermgmt/useradd Fri Nov 16 00:59:11 2012 (r243112) @@ -35,7 +35,7 @@ f_include $BSDCFG_SHARE/dialog.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="070.usermgmt" -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ MAIN Modified: head/usr.sbin/bsdconfig/usermgmt/userdel ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/userdel Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/usermgmt/userdel Fri Nov 16 00:59:11 2012 (r243112) @@ -38,7 +38,7 @@ f_include $BSDCFG_SHARE/usermgmt/user_in BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="070.usermgmt" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ MAIN Modified: head/usr.sbin/bsdconfig/usermgmt/useredit ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/useredit Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/usermgmt/useredit Fri Nov 16 00:59:11 2012 (r243112) @@ -38,7 +38,7 @@ f_include $BSDCFG_SHARE/usermgmt/user_in BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="070.usermgmt" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ MAIN Modified: head/usr.sbin/bsdconfig/usermgmt/userinput ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/userinput Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/usermgmt/userinput Fri Nov 16 00:59:11 2012 (r243112) @@ -38,7 +38,7 @@ f_include $BSDCFG_SHARE/usermgmt/user_in BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="070.usermgmt" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ CONFIGURATION Modified: head/usr.sbin/bsdconfig/usermgmt/usermgmt ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/usermgmt Fri Nov 16 00:23:23 2012 (r243111) +++ head/usr.sbin/bsdconfig/usermgmt/usermgmt Fri Nov 16 00:59:11 2012 (r243112) @@ -39,7 +39,7 @@ f_include_lang $BSDCFG_LIBE/$APP_DIR/inc USERMGMT_HELPFILE=$BSDCFG_LIBE/$APP_DIR/include/usermgmt.hlp -ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) +ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" ############################################################ FUNCTIONS From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 01:04:10 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0DA5B158 for ; Fri, 16 Nov 2012 01:04:10 +0000 (UTC) (envelope-from postmaster@mailpod.hostingplatform.com) Received: from atl4mhob04.myregisteredsite.com (atl4mhob04.myregisteredsite.com [209.17.115.42]) by mx1.freebsd.org (Postfix) with ESMTP id B3CEA8FC12 for ; Fri, 16 Nov 2012 01:04:09 +0000 (UTC) Received: from mailpod1.hostingplatform.com (mailpod1.networksolutionsemail.com [206.188.198.65]) by atl4mhob04.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAG149v5003620 for ; Thu, 15 Nov 2012 20:04:09 -0500 Received: (qmail 20273 invoked by uid 0); 16 Nov 2012 01:04:08 -0000 Received: (qmail 18969 invoked by uid 0); 15 Nov 2012 15:46:36 -0000 Received: (qmail 6284 invoked by uid 0); 15 Nov 2012 15:07:38 -0000 Received: from unknown (HELO atl4mhib33.myregisteredsite.com) (209) by 0 with SMTP; 15 Nov 2012 15:07:38 -0000 Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by atl4mhib33.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAFF7bML018813 for ; Thu, 15 Nov 2012 10:07:37 -0500 Received: from hub.freebsd.org (hub.FreeBSD.org [8.8.178.136]) by mx2.freebsd.org (Postfix) with ESMTP id 6EF6B3B775E; Thu, 15 Nov 2012 15:07:16 +0000 (UTC) Received: from hub.FreeBSD.org (hub.FreeBSD.org [8.8.178.136]) by hub.freebsd.org (Postfix) with ESMTP id 708C4115E; Thu, 15 Nov 2012 15:07:04 +0000 (UTC) (envelope-from owner-svn-src-all@freebsd.org) Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1CCA44CF; Thu, 15 Nov 2012 15:06:06 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 766148FC15; Thu, 15 Nov 2012 15:06:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFF66hr003900; Thu, 15 Nov 2012 15:06:06 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFF66Kf003899; Thu, 15 Nov 2012 15:06:06 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211151506.qAFF66Kf003899@svn.freebsd.org> From: Eitan Adler Date: Thu, 15 Nov 2012 15:06:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243077 - head/usr.sbin/chkgrp X-SVN-Group: head MIME-Version: 1.0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: owner-svn-src-all@freebsd.org Sender: owner-svn-src-all@freebsd.org X-SpamScore: 0 X-MailHub-Apparently-To: mjm@michaelmeltzer.com X-MailHub-Forwarded: Yes X-BeenThere: svn-src-head@freebsd.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 01:04:10 -0000 Author: eadler Date: Thu Nov 15 15:06:06 2012 New Revision: 243077 URL: http://svnweb.freebsd.org/changeset/base/243077 Log: Fix error code if file isn't readable. Approved by: cperciva MFC after: 1 week Modified: head/usr.sbin/chkgrp/chkgrp.c Modified: head/usr.sbin/chkgrp/chkgrp.c ============================================================================== --- head/usr.sbin/chkgrp/chkgrp.c Thu Nov 15 15:06:03 2012 (r243076) +++ head/usr.sbin/chkgrp/chkgrp.c Thu Nov 15 15:06:06 2012 (r243077) @@ -73,7 +73,7 @@ main(int argc, char *argv[]) /* open group file */ if ((gf = fopen(gfn, "r")) == NULL) - err(EX_IOERR, "%s", gfn); /* XXX - is IO_ERR the correct exit code? */ + err(EX_NOINPUT, "%s", gfn); /* check line by line */ while (++n) { _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 01:16:14 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3FA94435 for ; Fri, 16 Nov 2012 01:16:14 +0000 (UTC) (envelope-from postmaster@mailpod.hostingplatform.com) Received: from atl4mhob15.myregisteredsite.com (atl4mhob15.myregisteredsite.com [209.17.115.53]) by mx1.freebsd.org (Postfix) with ESMTP id E6A208FC17 for ; Fri, 16 Nov 2012 01:16:13 +0000 (UTC) Received: from mailpod1.hostingplatform.com (mailpod1.networksolutionsemail.com [206.188.198.65]) by atl4mhob15.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAG1GDVD012478 for ; Thu, 15 Nov 2012 20:16:13 -0500 Received: (qmail 24200 invoked by uid 0); 16 Nov 2012 01:16:13 -0000 Received: (qmail 18252 invoked by uid 0); 15 Nov 2012 15:50:27 -0000 Received: (qmail 8102 invoked by uid 0); 15 Nov 2012 15:07:48 -0000 Received: from unknown (HELO atl4mhib43.myregisteredsite.com) (209) by 0 with SMTP; 15 Nov 2012 15:07:48 -0000 Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by atl4mhib43.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAFF7iNC003730 for ; Thu, 15 Nov 2012 10:07:45 -0500 Received: from hub.freebsd.org (hub.FreeBSD.org [8.8.178.136]) by mx2.freebsd.org (Postfix) with ESMTP id 331D53B5E86; Thu, 15 Nov 2012 15:07:40 +0000 (UTC) Received: from hub.FreeBSD.org (hub.FreeBSD.org [8.8.178.136]) by hub.freebsd.org (Postfix) with ESMTP id D1C2D1305; Thu, 15 Nov 2012 15:07:40 +0000 (UTC) (envelope-from owner-svn-src-all@freebsd.org) Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CE6FF74B; Thu, 15 Nov 2012 15:06:18 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 86C188FC13; Thu, 15 Nov 2012 15:06:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFF6IBA004079; Thu, 15 Nov 2012 15:06:18 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFF6IBk004078; Thu, 15 Nov 2012 15:06:18 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211151506.qAFF6IBk004078@svn.freebsd.org> From: Eitan Adler Date: Thu, 15 Nov 2012 15:06:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243081 - head/usr.bin/chpass X-SVN-Group: head MIME-Version: 1.0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: owner-svn-src-all@freebsd.org Sender: owner-svn-src-all@freebsd.org X-SpamScore: 0 X-MailHub-Apparently-To: mjm@michaelmeltzer.com X-MailHub-Forwarded: Yes X-BeenThere: svn-src-head@freebsd.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 01:16:14 -0000 Author: eadler Date: Thu Nov 15 15:06:18 2012 New Revision: 243081 URL: http://svnweb.freebsd.org/changeset/base/243081 Log: Avoid possible null deref if ypclnt_new returns null PR: bin/172979 Submitted by: Erik Cederstrand Approved by: cperciva MFC after: 3 days Modified: head/usr.bin/chpass/chpass.c Modified: head/usr.bin/chpass/chpass.c ============================================================================== --- head/usr.bin/chpass/chpass.c Thu Nov 15 15:06:15 2012 (r243080) +++ head/usr.bin/chpass/chpass.c Thu Nov 15 15:06:18 2012 (r243081) @@ -241,8 +241,11 @@ main(int argc, char *argv[]) #ifdef YP case _PWF_NIS: ypclnt = ypclnt_new(yp_domain, "passwd.byname", yp_host); - if (ypclnt == NULL || - ypclnt_connect(ypclnt) == -1 || + if (ypclnt == NULL) { + warnx("ypclnt_new failed"); + exit(1); + } + if (ypclnt_connect(ypclnt) == -1 || ypclnt_passwd(ypclnt, pw, password) == -1) { warnx("%s", ypclnt->error); ypclnt_free(ypclnt); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 01:16:44 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5D73A5F0 for ; Fri, 16 Nov 2012 01:16:44 +0000 (UTC) (envelope-from postmaster@mailpod.hostingplatform.com) Received: from atl4mhob06.myregisteredsite.com (atl4mhob06.myregisteredsite.com [209.17.115.44]) by mx1.freebsd.org (Postfix) with ESMTP id EEA1A8FC13 for ; Fri, 16 Nov 2012 01:16:43 +0000 (UTC) Received: from mailpod1.hostingplatform.com (mailpod1.networksolutionsemail.com [206.188.198.65]) by atl4mhob06.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAG1GhYj020764 for ; Thu, 15 Nov 2012 20:16:43 -0500 Received: (qmail 1431 invoked by uid 0); 16 Nov 2012 01:16:43 -0000 Received: (qmail 24839 invoked by uid 0); 15 Nov 2012 15:40:36 -0000 Received: from unknown (HELO atl4mhib23.myregisteredsite.com) (209) by 0 with SMTP; 15 Nov 2012 15:40:36 -0000 Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by atl4mhib23.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAFFJCVJ010082 for ; Thu, 15 Nov 2012 10:19:12 -0500 Received: from hub.freebsd.org (hub.FreeBSD.org [8.8.178.136]) by mx2.freebsd.org (Postfix) with ESMTP id 2E5B23B6965; Thu, 15 Nov 2012 15:19:10 +0000 (UTC) Received: from hub.FreeBSD.org (hub.FreeBSD.org [8.8.178.136]) by hub.freebsd.org (Postfix) with ESMTP id BD5CB1AB9; Thu, 15 Nov 2012 15:19:10 +0000 (UTC) (envelope-from owner-svn-src-all@freebsd.org) Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 256FE195A for ; Thu, 15 Nov 2012 15:18:58 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 8F1018FC16 for ; Thu, 15 Nov 2012 15:18:57 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id j13so1638298lah.13 for ; Thu, 15 Nov 2012 07:18:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=M4/2o530IOEU2M86rTC1ptudWw25xzVwV14+f0M2qsA=; b=DD3tc43HsYOb05yfxjHyIzD40vUy2caksoVVYSYvGQ3h50ym6iuPInMhH1CnBB8JHg BF7MpYSF3caL3ZGmJatRyiOJHVE+Qb+qlPZef5YTNa11KuoUg1nMrKwYO/O5hmwe6nxE p0BMGTKypjYrtiq4vRTlK1C0BZdmACNmZ7BMw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type :x-gm-message-state; bh=M4/2o530IOEU2M86rTC1ptudWw25xzVwV14+f0M2qsA=; b=b1R7LN0VCGBgYE93EMAAcKrIZLpz90WAx1vJbblW9QC73FywzWHD8/EVaP+b81HCX3 QHn7tTYoMs4LJzghUc4SJ6S39WZz+b3vPn07jd0M2lUvsNiaTtjx0snLzHZmuLq/f71N XEADtsVhlZihf0sPPJqoa1CfCN/TO5McnCYOVh1LKyNDNBYo7/Pl8yC3Z7ogCyOB3RvV lUk5E6Uvmqzo8aY+n3GjfbVtDdlOaw0VezzebQLTWOgh6oKq401rRkomf6/FoFailqr2 PZ2oBqsbht8WwMMPQkES5ScWCy0zZOhkzVDAH8rhWkpTArBw2Gk7s5/uL2DlT9Ga9IfC liYg== Received: by 10.112.103.136 with SMTP id fw8mr758048lbb.18.1352992736325; Thu, 15 Nov 2012 07:18:56 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.25.166 with HTTP; Thu, 15 Nov 2012 07:18:25 -0800 (PST) In-Reply-To: <201211151516.qAFFGp38005962@svn.freebsd.org> References: <201211151516.qAFFGp38005962@svn.freebsd.org> From: Eitan Adler Date: Thu, 15 Nov 2012 10:18:25 -0500 X-Google-Sender-Auth: 7UafQ3j7jM_ek-2FH_2xMfTQDoU Message-ID: Subject: Re: svn commit: r243084 - head/usr.sbin/chkgrp To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Gm-Message-State: ALoCoQk8IwbnChwezdW70YGIZICjthRZ5D4vqmI/ibfiWmkEsWOG9gutiSQUNTECbgydWbNaAkwT X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: owner-svn-src-all@freebsd.org Sender: owner-svn-src-all@freebsd.org X-SpamScore: 0 X-MailHub-Apparently-To: mjm@michaelmeltzer.com X-MailHub-Forwarded: Yes X-BeenThere: svn-src-head@freebsd.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 01:16:44 -0000 On 15 November 2012 10:16, Eitan Adler wrote: > + printf("hello\n"); oops - grabbed the wrong commit - fixing now -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 01:22:57 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 613E1751; Fri, 16 Nov 2012 01:22:57 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 452BD8FC08; Fri, 16 Nov 2012 01:22:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAG1MveW091328; Fri, 16 Nov 2012 01:22:57 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAG1MvX9091326; Fri, 16 Nov 2012 01:22:57 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211160122.qAG1MvX9091326@svn.freebsd.org> From: Eitan Adler Date: Fri, 16 Nov 2012 01:22:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243113 - head/share/man/man7 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 01:22:57 -0000 Author: eadler Date: Fri Nov 16 01:22:56 2012 New Revision: 243113 URL: http://svnweb.freebsd.org/changeset/base/243113 Log: Remove quite a bit of stale data from the tuning.7 While here fix some style issues. Submitted by: many (via the SystemTuning wiki page) Approved by: bcr (mentor) MFC after: 3 days Modified: head/share/man/man7/tuning.7 Modified: head/share/man/man7/tuning.7 ============================================================================== --- head/share/man/man7/tuning.7 Fri Nov 16 00:59:11 2012 (r243112) +++ head/share/man/man7/tuning.7 Fri Nov 16 01:22:56 2012 (r243113) @@ -23,50 +23,26 @@ .\" .\" $FreeBSD$ .\" -.Dd May 11, 2012 +.Dd October 20, 2012 .Dt TUNING 7 .Os .Sh NAME .Nm tuning .Nd performance tuning under FreeBSD .Sh SYSTEM SETUP - DISKLABEL, NEWFS, TUNEFS, SWAP -When using -.Xr bsdlabel 8 -or -.Xr sysinstall 8 -to lay out your file systems on a hard disk it is important to remember -that hard drives can transfer data much more quickly from outer tracks -than they can from inner tracks. -To take advantage of this you should -try to pack your smaller file systems and swap closer to the outer tracks, -follow with the larger file systems, and end with the largest file systems. -It is also important to size system standard file systems such that you -will not be forced to resize them later as you scale the machine up. -I usually create, in order, a 128M root, 1G swap, 128M -.Pa /var , -128M -.Pa /var/tmp , -3G -.Pa /usr , -and use any remaining space for -.Pa /home . -.Pp -You should typically size your swap space to approximately 2x main memory -for systems with less than 2GB of RAM, or approximately 1x main memory +The swap partition should typically be approximately 2x the size of +main memory +for systems with less than 4GB of RAM, or approximately equal to +the size of main memory if you have more. -If you do not have a lot of RAM, though, you will generally want a lot -more swap. -It is not recommended that you configure any less than -256M of swap on a system and you should keep in mind future memory +Keep in mind future memory expansion when sizing the swap partition. -The kernel's VM paging algorithms are tuned to perform best when there is -at least 2x swap versus main memory. Configuring too little swap can lead to inefficiencies in the VM page scanning code as well as create issues later on if you add more memory to your machine. -Finally, on larger systems +On larger systems with multiple SCSI disks (or multiple IDE disks operating on different -controllers), we strongly recommend that you configure swap on each drive. +controllers), configure swap on each drive. The swap partitions on the drives should be approximately the same size. The kernel can handle arbitrary sizes but internal data structures scale to 4 times the largest swap partition. @@ -79,100 +55,7 @@ little, swap space is the saving grace o and even if you do not normally use much swap, it can give you more time to recover from a runaway program before being forced to reboot. .Pp -How you size your -.Pa /var -partition depends heavily on what you intend to use the machine for. -This -partition is primarily used to hold mailboxes, the print spool, and log -files. -Some people even make -.Pa /var/log -its own partition (but except for extreme cases it is not worth the waste -of a partition ID). -If your machine is intended to act as a mail -or print server, -or you are running a heavily visited web server, you should consider -creating a much larger partition \(en perhaps a gig or more. -It is very easy -to underestimate log file storage requirements. -.Pp -Sizing -.Pa /var/tmp -depends on the kind of temporary file usage you think you will need. -128M is -the minimum we recommend. -Also note that sysinstall will create a -.Pa /tmp -directory. -Dedicating a partition for temporary file storage is important for -two reasons: first, it reduces the possibility of file system corruption -in a crash, and second it reduces the chance of a runaway process that -fills up -.Oo Pa /var Oc Ns Pa /tmp -from blowing up more critical subsystems (mail, -logging, etc). -Filling up -.Oo Pa /var Oc Ns Pa /tmp -is a very common problem to have. -.Pp -In the old days there were differences between -.Pa /tmp -and -.Pa /var/tmp , -but the introduction of -.Pa /var -(and -.Pa /var/tmp ) -led to massive confusion -by program writers so today programs haphazardly use one or the -other and thus no real distinction can be made between the two. -So it makes sense to have just one temporary directory and -softlink to it from the other -.Pa tmp -directory locations. -However you handle -.Pa /tmp , -the one thing you do not want to do is leave it sitting -on the root partition where it might cause root to fill up or possibly -corrupt root in a crash/reboot situation. -.Pp -The -.Pa /usr -partition holds the bulk of the files required to support the system and -a subdirectory within it called -.Pa /usr/local -holds the bulk of the files installed from the -.Xr ports 7 -hierarchy. -If you do not use ports all that much and do not intend to keep -system source -.Pq Pa /usr/src -on the machine, you can get away with -a 1 GB -.Pa /usr -partition. -However, if you install a lot of ports -(especially window managers and Linux-emulated binaries), we recommend -at least a 2 GB -.Pa /usr -and if you also intend to keep system source -on the machine, we recommend a 3 GB -.Pa /usr . -Do not underestimate the -amount of space you will need in this partition, it can creep up and -surprise you! -.Pp -The -.Pa /home -partition is typically used to hold user-specific data. -I usually size it to the remainder of the disk. -.Pp -Why partition at all? -Why not create one big -.Pa / -partition and be done with it? -Then I do not have to worry about undersizing things! -Well, there are several reasons this is not a good idea. +It is not a good idea to make one large partition. First, each partition has different operational characteristics and separating them allows the file system to tune itself to those characteristics. @@ -181,113 +64,23 @@ the root and .Pa /usr partitions are read-mostly, with very little writing, while a lot of reading and writing could occur in -.Pa /var -and .Pa /var/tmp . By properly partitioning your system fragmentation introduced in the smaller more heavily write-loaded partitions will not bleed over into the mostly-read partitions. -Additionally, keeping the write-loaded partitions closer to -the edge of the disk (i.e., before the really big partitions instead of after -in the partition table) will increase I/O performance in the partitions -where you need it the most. -Now it is true that you might also need I/O -performance in the larger partitions, but they are so large that shifting -them more towards the edge of the disk will not lead to a significant -performance improvement whereas moving -.Pa /var -to the edge can have a huge impact. -Finally, there are safety concerns. -Having a small neat root partition that -is essentially read-only gives it a greater chance of surviving a bad crash -intact. .Pp Properly partitioning your system also allows you to tune .Xr newfs 8 , and .Xr tunefs 8 parameters. -Tuning -.Xr newfs 8 -requires more experience but can lead to significant improvements in -performance. -There are three parameters that are relatively safe to tune: -.Em blocksize , bytes/i-node , -and -.Em cylinders/group . -.Pp -.Fx -performs best when using 16K or 32K file system block sizes. -The default file system block size is 32K, -which provides best performance for most applications, -with the exception of those that perform random access on large files -(such as database server software). -Such applications tend to perform better with a smaller block size, -although modern disk characteristics are such that the performance -gain from using a smaller block size may not be worth consideration. -Using a block size larger than 32K -can cause fragmentation of the buffer cache and -lead to lower performance. -.Pp -The defaults may be unsuitable -for a file system that requires a very large number of i-nodes -or is intended to hold a large number of very small files. -Such a file system should be created with an 4K, 8K, or 16K block size. -This also requires you to specify a smaller -fragment size. -We recommend always using a fragment size that is 1/8 -the block size (less testing has been done on other fragment size factors). -The -.Xr newfs 8 -options for this would be -.Dq Li "newfs -f 1024 -b 8192 ..." . -.Pp -If a large partition is intended to be used to hold fewer, larger files, such -as database files, you can increase the -.Em bytes/i-node -ratio which reduces the number of i-nodes (maximum number of files and -directories that can be created) for that partition. -Decreasing the number -of i-nodes in a file system can greatly reduce -.Xr fsck 8 -recovery times after a crash. -Do not use this option -unless you are actually storing large files on the partition, because if you -overcompensate you can wind up with a file system that has lots of free -space remaining but cannot accommodate any more files. -Using 65536, 131072, or 262144 bytes/i-node is recommended. -You can go higher but -it will have only incremental effects on -.Xr fsck 8 -recovery times. -For example, -.Dq Li "newfs -i 65536 ..." . -.Pp -.Xr tunefs 8 -may be used to further tune a file system. -This command can be run in -single-user mode without having to reformat the file system. -However, this is possibly the most abused program in the system. -Many people attempt to -increase available file system space by setting the min-free percentage to 0. -This can lead to severe file system fragmentation and we do not recommend -that you do this. -Really the only +The only .Xr tunefs 8 -option worthwhile here is turning on +option worthwhile turning on is .Em softupdates with .Dq Li "tunefs -n enable /filesystem" . -(Note: in -.Fx 4.5 -and later, softupdates can be turned on using the -.Fl U -option to -.Xr newfs 8 , -and -.Xr sysinstall 8 -will typically enable softupdates automatically for non-root file systems). Softupdates drastically improves meta-data performance, mainly file creation and deletion. We recommend enabling softupdates on most file systems; however, there @@ -301,7 +94,7 @@ than otherwise. Secondly, softupdates delays the freeing of file system blocks. If you have a file system (such as the root file system) which is -close to full, doing a major update of it, e.g.\& +close to full, doing a major update of it, e.g.,\& .Dq Li "make installworld" , can run it out of space and cause the update to fail. For this reason, softupdates will not be enabled on the root file system @@ -516,7 +309,7 @@ Note that setting too high a value (exceeding the buffer cache's write threshold) can lead to extremely bad clustering performance. Do not set this value arbitrarily high! -Higher write queueing values may also add latency to reads occurring at +Higher write queuing values may also add latency to reads occurring at the same time. .Pp The @@ -645,7 +438,7 @@ With delayed acks turned off, the acknowledgement may be sent in its own packet, before the remote service has a chance to echo the data it just received. This same concept also -applies to any interactive protocol (e.g.\& SMTP, WWW, POP3), and can cut the +applies to any interactive protocol (e.g.,\& SMTP, WWW, POP3), and can cut the number of tiny packets flowing across the network in half. The .Fx @@ -756,7 +549,7 @@ connections in a heavily loaded web serv For such environments, we recommend increasing this value to 1024 or higher. The service daemon -may itself limit the listen queue size (e.g.\& +may itself limit the listen queue size (e.g.,\& .Xr sendmail 8 , apache) but will often have a directive in its configuration file to adjust the queue size up. @@ -947,42 +740,12 @@ timebase, and even device operations. Additionally, higher-end CPUs support 4MB MMU pages, which the kernel uses to map the kernel itself into memory, increasing its efficiency under heavy syscall loads. -.Sh IDE WRITE CACHING -.Fx 4.3 -flirted with turning off IDE write caching. -This reduced write bandwidth -to IDE disks but was considered necessary due to serious data consistency -issues introduced by hard drive vendors. -Basically the problem is that -IDE drives lie about when a write completes. -With IDE write caching turned -on, IDE hard drives will not only write data to disk out of order, they -will sometimes delay some of the blocks indefinitely under heavy disk -load. -A crash or power failure can result in serious file system -corruption. -So our default was changed to be safe. -Unfortunately, the -result was such a huge loss in performance that we caved in and changed the -default back to on after the release. -You should check the default on -your system by observing the -.Va hw.ata.wc -sysctl variable. -If IDE write caching is turned off, you can turn it back -on by setting the -.Va hw.ata.wc -loader tunable to 1. -More information on tuning the ATA driver system may be found in the -.Xr ata 4 -manual page. -If you need performance, go with SCSI. .Sh CPU, MEMORY, DISK, NETWORK The type of tuning you do depends heavily on where your system begins to bottleneck as load increases. If your system runs out of CPU (idle times -are perpetually 0%) then you need to consider upgrading the CPU or moving to -an SMP motherboard (multiple CPU's), or perhaps you need to revisit the +are perpetually 0%) then you need to consider upgrading the CPU +or perhaps you need to revisit the programs that are causing the load and try to optimize them. If your system is paging to swap a lot you need to consider adding more memory. @@ -1001,21 +764,15 @@ IDE drives compare with SCSI in raw sequ start seeking around the disk SCSI drives usually win. .Pp Finally, you might run out of network suds. -The first line of defense for -improving network performance is to make sure you are using switches instead -of hubs, especially these days where switches are almost as cheap. -Hubs -have severe problems under heavy loads due to collision back-off and one bad -host can severely degrade the entire LAN. -Second, optimize the network path +Optimize the network path as much as possible. For example, in .Xr firewall 7 we describe a firewall protecting internal hosts with a topology where the externally visible hosts are not routed through it. -Use 100BaseT rather -than 10BaseT, or use 1000BaseT rather than 100BaseT, depending on your needs. -Most bottlenecks occur at the WAN link (e.g.\& +Use 1000BaseT rather +than 100BaseT, depending on your needs. +Most bottlenecks occur at the WAN link (e.g.,\& modem, T1, DSL, whatever). If expanding the link is not an option it may be possible to use the .Xr dummynet 4 @@ -1041,6 +798,7 @@ over services you export from your box ( .Xr hier 7 , .Xr ports 7 , .Xr boot 8 , +.Xr bsdinstall 8 , .Xr bsdlabel 8 , .Xr ccdconfig 8 , .Xr config 8 , @@ -1055,7 +813,6 @@ over services you export from your box ( .Xr newfs 8 , .Xr route 8 , .Xr sysctl 8 , -.Xr sysinstall 8 , .Xr tunefs 8 .Sh HISTORY The @@ -1066,3 +823,5 @@ and first appeared in .Fx 4.3 , May 2001. +The manual page was greatly modified by +.An Eitan Adler Aq eadler@FreeBSD.org From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 01:24:11 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9B7AC8CD; Fri, 16 Nov 2012 01:24:11 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8011D8FC14; Fri, 16 Nov 2012 01:24:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAG1OBgu091502; Fri, 16 Nov 2012 01:24:11 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAG1OBAA091500; Fri, 16 Nov 2012 01:24:11 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201211160124.qAG1OBAA091500@svn.freebsd.org> From: Devin Teske Date: Fri, 16 Nov 2012 01:24:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243114 - head/sys/boot/forth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 01:24:11 -0000 Author: dteske Date: Fri Nov 16 01:24:11 2012 New Revision: 243114 URL: http://svnweb.freebsd.org/changeset/base/243114 Log: + This patch does not change user experience or functionality + Cleanup syntax, slim-down code, and make things more readable + Introduce new +c! operator and ilk to reduce heap usage/allocations + Add safemode_enabled? safemode_enable and safemode_disable functions + Add singleuser_enabled? singleuser_enable singleuser_disable functions + Add verbose_enabled? verbose_enable and verbose_disable functions + Centralize strings (also to reduce heap usage) Reviewed by: peterj, adrian (co-mentor) Approved by: adrian (co-mentor) Modified: head/sys/boot/forth/menu-commands.4th head/sys/boot/forth/menu.4th Modified: head/sys/boot/forth/menu-commands.4th ============================================================================== --- head/sys/boot/forth/menu-commands.4th Fri Nov 16 01:22:56 2012 (r243113) +++ head/sys/boot/forth/menu-commands.4th Fri Nov 16 01:24:11 2012 (r243114) @@ -31,6 +31,10 @@ include /boot/menusets.4th variable kernel_state variable root_state +\ +\ ACPI +\ + : acpi_enable ( -- ) s" set acpi_load=YES" evaluate \ XXX deprecated but harmless s" set hint.acpi.0.disabled=0" evaluate @@ -58,9 +62,38 @@ variable root_state TRUE \ loop menu again ; +\ +\ Safe Mode +\ + +: safemode_enabled? ( -- flag ) + s" kern.smp.disabled" getenv -1 <> dup if + swap drop ( c-addr flag -- flag ) + then +; + +: safemode_enable ( -- ) + s" set kern.smp.disabled=1" evaluate + s" set hw.ata.ata_dma=0" evaluate + s" set hw.ata.atapi_dma=0" evaluate + s" set hw.ata.wc=0" evaluate + s" set hw.eisa_slots=0" evaluate + s" set kern.eventtimer.periodic=1" evaluate + s" set kern.geom.part.check_integrity=0" evaluate +; + +: safemode_disable ( -- ) + s" kern.smp.disabled" unsetenv + s" hw.ata.ata_dma" unsetenv + s" hw.ata.atapi_dma" unsetenv + s" hw.ata.wc" unsetenv + s" hw.eisa_slots" unsetenv + s" kern.eventtimer.periodic" unsetenv + s" kern.geom.part.check_integrity" unsetenv +; + : init_safemode ( N -- N ) - s" kern.smp.disabled" getenv -1 <> if - drop ( n c-addr -- n ) \ unused + safemode_enabled? if toggle_menuitem ( n -- n ) then ; @@ -70,25 +103,10 @@ variable root_state \ Now we're going to make the change effective - s" toggle_stateN @" \ base name of toggle state var - -rot 2dup 12 + c! rot \ replace 'N' with ASCII numeral - - evaluate 0= if - s" kern.smp.disabled" unsetenv - s" hw.ata.ata_dma" unsetenv - s" hw.ata.atapi_dma" unsetenv - s" hw.ata.wc" unsetenv - s" hw.eisa_slots" unsetenv - s" kern.eventtimer.periodic" unsetenv - s" kern.geom.part.check_integrity" unsetenv + dup toggle_stateN @ 0= if + safemode_disable else - s" set kern.smp.disabled=1" evaluate - s" set hw.ata.ata_dma=0" evaluate - s" set hw.ata.atapi_dma=0" evaluate - s" set hw.ata.wc=0" evaluate - s" set hw.eisa_slots=0" evaluate - s" set kern.eventtimer.periodic=1" evaluate - s" set kern.geom.part.check_integrity=0" evaluate + safemode_enable then menu-redraw @@ -96,9 +114,26 @@ variable root_state TRUE \ loop menu again ; +\ +\ Single User Mode +\ + +: singleuser_enabled? ( -- flag ) + s" boot_single" getenv -1 <> dup if + swap drop ( c-addr flag -- flag ) + then +; + +: singleuser_enable ( -- ) + s" set boot_single=YES" evaluate +; + +: singleuser_disable ( -- ) + s" boot_single" unsetenv +; + : init_singleuser ( N -- N ) - s" boot_single" getenv -1 <> if - drop ( n c-addr -- n ) \ unused + singleuser_enabled? if toggle_menuitem ( n -- n ) then ; @@ -109,21 +144,35 @@ variable root_state \ Now we're going to make the change effective - s" toggle_stateN @" \ base name of toggle state var - -rot 2dup 12 + c! rot \ replace 'N' with ASCII numeral - - evaluate 0= if - s" boot_single" unsetenv + dup toggle_stateN @ 0= if + singleuser_disable else - s" set boot_single=YES" evaluate + singleuser_enable then TRUE \ loop menu again ; +\ +\ Verbose Boot +\ + +: verbose_enabled? ( -- flag ) + s" boot_verbose" getenv -1 <> dup if + swap drop ( c-addr flag -- flag ) + then +; + +: verbose_enable ( -- ) + s" set boot_verbose=YES" evaluate +; + +: verbose_disable ( -- ) + s" boot_verbose" unsetenv +; + : init_verbose ( N -- N ) - s" boot_verbose" getenv -1 <> if - drop ( n c-addr -- n ) \ unused + verbose_enabled? if toggle_menuitem ( n -- n ) then ; @@ -134,18 +183,19 @@ variable root_state \ Now we're going to make the change effective - s" toggle_stateN @" \ base name of toggle state var - -rot 2dup 12 + c! rot \ replace 'N' with ASCII numeral - - evaluate 0= if - s" boot_verbose" unsetenv + dup toggle_stateN @ 0= if + verbose_disable else - s" set boot_verbose=YES" evaluate + verbose_enable then TRUE \ loop menu again ; +\ +\ Escape to Prompt +\ + : goto_prompt ( N -- N FALSE ) s" set autoboot_delay=NO" evaluate @@ -158,11 +208,12 @@ variable root_state FALSE \ exit the menu ; +\ +\ Cyclestate (used by kernel/root below) +\ + : init_cyclestate ( N K -- N ) - over ( n k -- n k n ) - s" cycle_stateN" ( n k n -- n k n c-addr u ) - -rot tuck 11 + c! swap ( n k n c-addr u -- n k c-addr u ) - evaluate ( n k c-addr u -- n k addr ) + over cycle_stateN ( n k -- n k addr ) begin tuck @ ( n k addr -- n addr k c ) over <> ( n addr k c -- n addr k 0|-1 ) @@ -174,6 +225,10 @@ variable root_state 2drop ( n k addr -- n ) ; +\ +\ Kernel +\ + : init_kernel ( N -- N ) kernel_state @ ( n -- n k ) init_cyclestate ( n k -- n ) @@ -185,21 +240,21 @@ variable root_state \ Now we're going to make the change effective - s" cycle_stateN" \ base name of array state var - -rot 2dup 11 + c! rot \ replace 'N' with ASCII numeral - evaluate \ translate name into address - @ \ dereference address into value + dup cycle_stateN @ dup kernel_state ! \ save a copy for re-initialization 48 + \ convert to ASCII numeral s" set kernel=${kernel_prefix}${kernel[N]}${kernel_suffix}" - \ command to assemble full kernel-path - -rot tuck 36 + c! swap \ replace 'N' with array index value - evaluate \ sets $kernel to full kernel-path + 36 +c! \ replace 'N' with ASCII numeral + evaluate \ sets $kernel to full kernel-path TRUE \ loop menu again ; +\ +\ Root +\ + : init_root ( N -- N ) root_state @ ( n -- n k ) init_cyclestate ( n k -- n ) @@ -211,21 +266,21 @@ variable root_state \ Now we're going to make the change effective - s" cycle_stateN" \ base name of array state var - -rot 2dup 11 + c! rot \ replace 'N' with ASCII numeral - evaluate \ translate name into address - @ \ dereference address into value + dup cycle_stateN @ dup root_state ! \ save a copy for re-initialization 48 + \ convert to ASCII numeral s" set root=${root_prefix}${root[N]}${root_suffix}" - \ command to assemble root image-path - -rot tuck 30 + c! swap \ replace 'N' with array index value - evaluate \ sets $kernel to full kernel-path + 30 +c! \ replace 'N' with ASCII numeral + evaluate \ sets $root to full root-path TRUE \ loop menu again ; +\ +\ Menusets +\ + : goto_menu ( N M -- N TRUE ) menu-unset menuset-loadsetnum ( n m -- n ) Modified: head/sys/boot/forth/menu.4th ============================================================================== --- head/sys/boot/forth/menu.4th Fri Nov 16 01:22:56 2012 (r243113) +++ head/sys/boot/forth/menu.4th Fri Nov 16 01:24:11 2012 (r243114) @@ -116,6 +116,48 @@ create init_text6 255 allot create init_text7 255 allot create init_text8 255 allot +: +c! ( N C-ADDR/U K -- C-ADDR/U ) + 3 pick 3 pick ( n c-addr/u k -- n c-addr/u k n c-addr ) + rot + c! ( n c-addr/u k n c-addr -- n c-addr/u ) + rot drop ( n c-addr/u -- c-addr/u ) +; + +: menukeyN ( N -- ADDR ) s" menukeyN" 7 +c! evaluate ; +: init_stateN ( N -- ADDR ) s" init_stateN" 10 +c! evaluate ; +: toggle_stateN ( N -- ADDR ) s" toggle_stateN" 12 +c! evaluate ; +: cycle_stateN ( N -- ADDR ) s" cycle_stateN" 11 +c! evaluate ; +: init_textN ( N -- C-ADDR ) s" init_textN" 9 +c! evaluate ; + +: str_loader_menu_title ( -- C-ADDR/U ) s" loader_menu_title" ; +: str_loader_menu_timeout_x ( -- C-ADDR/U ) s" loader_menu_timeout_x" ; +: str_loader_menu_timeout_y ( -- C-ADDR/U ) s" loader_menu_timeout_y" ; +: str_menu_init ( -- C-ADDR/U ) s" menu_init" ; +: str_menu_timeout_command ( -- C-ADDR/U ) s" menu_timeout_command" ; +: str_menu_reboot ( -- C-ADDR/U ) s" menu_reboot" ; +: str_menu_acpi ( -- C-ADDR/U ) s" menu_acpi" ; +: str_menu_options ( -- C-ADDR/U ) s" menu_options" ; +: str_menu_optionstext ( -- C-ADDR/U ) s" menu_optionstext" ; + +: str_menu_init[x] ( -- C-ADDR/U ) s" menu_init[x]" ; +: str_menu_command[x] ( -- C-ADDR/U ) s" menu_command[x]" ; +: str_menu_caption[x] ( -- C-ADDR/U ) s" menu_caption[x]" ; +: str_ansi_caption[x] ( -- C-ADDR/U ) s" ansi_caption[x]" ; +: str_menu_keycode[x] ( -- C-ADDR/U ) s" menu_keycode[x]" ; +: str_toggled_text[x] ( -- C-ADDR/U ) s" toggled_text[x]" ; +: str_toggled_ansi[x] ( -- C-ADDR/U ) s" toggled_ansi[x]" ; +: str_menu_caption[x][y] ( -- C-ADDR/U ) s" menu_caption[x][y]" ; +: str_ansi_caption[x][y] ( -- C-ADDR/U ) s" ansi_caption[x][y]" ; + +: menu_init[x] ( N -- C-ADDR/U ) str_menu_init[x] 10 +c! ; +: menu_command[x] ( N -- C-ADDR/U ) str_menu_command[x] 13 +c! ; +: menu_caption[x] ( N -- C-ADDR/U ) str_menu_caption[x] 13 +c! ; +: ansi_caption[x] ( N -- C-ADDR/U ) str_ansi_caption[x] 13 +c! ; +: menu_keycode[x] ( N -- C-ADDR/U ) str_menu_keycode[x] 13 +c! ; +: toggled_text[x] ( N -- C-ADDR/U ) str_toggled_text[x] 13 +c! ; +: toggled_ansi[x] ( N -- C-ADDR/U ) str_toggled_ansi[x] 13 +c! ; +: menu_caption[x][y] ( N M -- C-ADDR/U ) str_menu_caption[x][y] 16 +c! 13 +c! ; +: ansi_caption[x][y] ( N M -- C-ADDR/U ) str_ansi_caption[x][y] 16 +c! 13 +c! ; + : arch-i386? ( -- BOOL ) \ Returns TRUE (-1) on i386, FALSE (0) otherwise. s" arch-i386" environment? dup if drop @@ -172,10 +214,7 @@ create init_text8 255 allot \ ASCII numeral equal to user-selected menu item must be on the stack. \ We do not modify the stack, so the ASCII numeral is left on top. - s" init_textN" \ base name of buffer - -rot 2dup 9 + c! rot \ replace 'N' with ASCII num - - evaluate c@ 0= if + dup init_textN c@ 0= if \ NOTE: no need to check toggle_stateN since the first time we \ are called, we will populate init_textN. Further, we don't \ need to test whether menu_caption[x] (ansi_caption[x] when @@ -183,19 +222,16 @@ create init_text8 255 allot \ called if the caption was NULL. \ base name of environment variable + dup ( n -- n n ) \ key pressed loader_color? if - s" ansi_caption[x]" + ansi_caption[x] else - s" menu_caption[x]" + menu_caption[x] then - -rot 2dup 13 + c! rot \ replace 'x' with ASCII numeral - getenv dup -1 <> if - s" init_textN" \ base name of buffer - 4 pick \ copy ASCII num to top - rot tuck 9 + c! swap \ replace 'N' with ASCII num - evaluate + 2 pick ( n c-addr/u -- n c-addr/u n ) + init_textN ( n c-addr/u n -- n c-addr/u c-addr ) \ now we have the buffer c-addr on top \ ( followed by c-addr/u of current caption ) @@ -227,67 +263,49 @@ create init_text8 255 allot \ negate the toggled state so that we reverse the flow on subsequent \ calls. - s" toggle_stateN @" \ base name of toggle state var - -rot 2dup 12 + c! rot \ replace 'N' with ASCII numeral - - evaluate 0= if + dup toggle_stateN @ 0= if \ state is OFF, toggle to ON - \ base name of toggled text var + dup ( n -- n n ) \ key pressed loader_color? if - s" toggled_ansi[x]" + toggled_ansi[x] else - s" toggled_text[x]" + toggled_text[x] then - -rot 2dup 13 + c! rot \ replace 'x' with ASCII num - getenv dup -1 <> if \ Assign toggled text to menu caption - - \ base name of caption var + 2 pick ( n c-addr/u -- n c-addr/u n ) \ key pressed loader_color? if - s" ansi_caption[x]" + ansi_caption[x] else - s" menu_caption[x]" + menu_caption[x] then - 4 pick \ copy ASCII num to top - rot tuck 13 + c! swap \ replace 'x' with ASCII num - - setenv \ set new caption + setenv else \ No toggled text, keep the same caption - - drop + drop ( n -1 -- n ) \ getenv cruft then true \ new value of toggle state var (to be stored later) else \ state is ON, toggle to OFF - s" init_textN" \ base name of initial text buffer - -rot 2dup 9 + c! rot \ replace 'N' with ASCII numeral - evaluate \ convert string to c-addr - count \ convert c-addr to c-addr/u + dup init_textN count ( n -- n c-addr/u ) - \ base name of caption var + \ Assign init_textN text to menu caption + 2 pick ( n c-addr/u -- n c-addr/u n ) \ key pressed loader_color? if - s" ansi_caption[x]" + ansi_caption[x] else - s" menu_caption[x]" + menu_caption[x] then - 4 pick \ copy ASCII num to top - rot tuck 13 + c! swap \ replace 'x' with ASCII numeral + setenv - setenv \ set new caption - false \ new value of toggle state var (to be stored below) + false \ new value of toggle state var (to be stored below) then \ now we'll store the new toggle state (on top of stack) - s" toggle_stateN" \ base name of toggle state var - 3 pick \ copy ASCII numeral to top - rot tuck 12 + c! swap \ replace 'N' with ASCII numeral - evaluate \ convert string to addr - ! \ store new value + over toggle_stateN ! ; : cycle_menuitem ( N -- N ) \ cycles through array of choices for a menuitem @@ -295,28 +313,23 @@ create init_text8 255 allot \ ASCII numeral equal to user-selected menu item must be on the stack. \ We do not modify the stack, so the ASCII numeral is left on top. - s" cycle_stateN" \ base name of array state var - -rot 2dup 11 + c! rot \ replace 'N' with ASCII numeral - - evaluate \ we now have a pointer to the proper variable - dup @ \ resolve the pointer (but leave it on the stack) - 1+ \ increment the value + dup cycle_stateN dup @ 1+ \ get value and increment \ Before assigning the (incremented) value back to the pointer, \ let's test for the existence of this particular array element. \ If the element exists, we'll store index value and move on. \ Otherwise, we'll loop around to zero and store that. - dup 48 + \ duplicate Array index and convert to ASCII numeral + dup 48 + ( n addr k -- n addr k k' ) + \ duplicate array index and convert to ASCII numeral - \ base name of array caption text + 3 pick swap ( n addr k k' -- n addr k n k' ) \ (n,k') as (x,y) loader_color? if - s" ansi_caption[x][y]" + ansi_caption[x][y] else - s" menu_caption[x][y]" + menu_caption[x][y] then - -rot tuck 16 + c! swap \ replace 'y' with Array index - 4 pick rot tuck 13 + c! swap \ replace 'x' with menu choice + ( n addr k n k' -- n addr k c-addr/u ) \ Now test for the existence of our incremented array index in the \ form of $menu_caption[x][y] ($ansi_caption[x][y] with loader_color @@ -325,49 +338,47 @@ create init_text8 255 allot getenv dup -1 = if \ No caption set for this array index. Loop back to zero. - drop ( getenv cruft ) - drop ( incremented array index ) - 0 ( new array index that will be stored later ) + drop ( n addr k -1 -- n addr k ) \ getenv cruft + drop 0 ( n addr k -- n addr 0 ) \ new value to store later - \ base name of caption var + 2 pick [char] 0 ( n addr 0 -- n addr 0 n 48 ) \ (n,48) as (x,y) loader_color? if - s" ansi_caption[x][0]" + ansi_caption[x][y] else - s" menu_caption[x][0]" + menu_caption[x][y] then - 4 pick rot tuck 13 + c! swap \ replace 'x' with menu choice - + ( n addr 0 n 48 -- n addr 0 c-addr/u ) getenv dup -1 = if \ This is highly unlikely to occur, but to make \ sure that things move along smoothly, allocate \ a temporary NULL string - drop ( getenv cruft ) - s" " + drop ( n addr 0 -1 -- n addr 0 ) \ getenv cruft + s" " ( n addr 0 -- n addr 0 c-addr/u ) then then \ At this point, we should have the following on the stack (in order, \ from bottom to top): \ - \ N - Ascii numeral representing the menu choice (inherited) - \ Addr - address of our internal cycle_stateN variable - \ N - zero-based number we intend to store to the above - \ C-Addr - string value we intend to store to menu_caption[x] - \ (or ansi_caption[x] with loader_color enabled) + \ n - Ascii numeral representing the menu choice (inherited) + \ addr - address of our internal cycle_stateN variable + \ k - zero-based number we intend to store to the above + \ c-addr/u - string value we intend to store to menu_caption[x] + \ (or ansi_caption[x] with loader_color enabled) \ \ Let's perform what we need to with the above. - \ base name of menuitem caption var + \ Assign array value text to menu caption + 4 pick ( n addr k c-addr/u -- n addr k c-addr/u n ) loader_color? if - s" ansi_caption[x]" + ansi_caption[x] else - s" menu_caption[x]" + menu_caption[x] then - 6 pick rot tuck 13 + c! swap \ replace 'x' with menu choice - setenv \ set the new caption + setenv - swap ! \ update array state variable + swap ! ( n addr k -- n ) \ update array state variable ; : acpipresent? ( -- flag ) \ Returns TRUE if ACPI is present, FALSE otherwise @@ -401,15 +412,15 @@ create init_text8 255 allot acpipresent? if acpienabled? if loader_color? if - s" toggled_ansi[x]" + str_toggled_ansi[x] else - s" toggled_text[x]" + str_toggled_text[x] then else loader_color? if - s" ansi_caption[x]" + str_ansi_caption[x] else - s" menu_caption[x]" + str_menu_caption[x] then then else @@ -427,7 +438,7 @@ create init_text8 255 allot : menu-create ( -- ) \ Print the frame caption at (x,y) - s" loader_menu_title" getenv dup -1 = if + str_loader_menu_title getenv dup -1 = if drop s" Welcome to FreeBSD" then 24 over 2 / - 9 at-xy type @@ -436,7 +447,7 @@ create init_text8 255 allot \ constructed dynamically -- as this function could conceivably set \ the remaining environment variables to construct the menu entirely). \ - s" menu_init" getenv dup -1 <> if + str_menu_init getenv dup -1 <> if evaluate else drop @@ -461,7 +472,7 @@ create init_text8 255 allot \ Initialize the ACPI option status. \ 0 menuacpi ! - s" menu_acpi" getenv -1 <> if + str_menu_acpi getenv -1 <> if c@ dup 48 > over 57 < and if ( '1' <= c1 <= '8' ) menuacpi ! arch-i386? if acpipresent? if @@ -469,10 +480,7 @@ create init_text8 255 allot \ Set menu toggle state to active state \ (required by generic toggle_menuitem) \ - menuacpi @ - s" acpienabled? toggle_stateN !" - -rot tuck 25 + c! swap - evaluate + acpienabled? menuacpi @ toggle_stateN ! then then else drop @@ -483,7 +491,7 @@ create init_text8 255 allot \ Initialize the menu_options visual separator. \ 0 menuoptions ! - s" menu_options" getenv -1 <> if + str_menu_options getenv -1 <> if c@ dup 48 > over 57 < and if ( '1' <= c1 <= '8' ) menuoptions ! else @@ -503,7 +511,7 @@ create init_text8 255 allot \ If the "Options:" separator, print it. dup menuoptions @ = if \ Optionally add a reboot option to the menu - s" menu_reboot" getenv -1 <> if + str_menu_reboot getenv -1 <> if drop s" Reboot" printmenuitem menureboot ! true menurebootadded ! @@ -513,7 +521,7 @@ create init_text8 255 allot menurow @ 2 + menurow ! menurow @ menuY @ + at-xy - s" menu_optionstext" getenv dup -1 <> if + str_menu_optionstext getenv dup -1 <> if type else drop ." Options:" @@ -522,17 +530,21 @@ create init_text8 255 allot \ If this is the ACPI menu option, act accordingly. dup menuacpi @ = if - acpimenuitem ( -- C-Addr/U | -1 ) + dup acpimenuitem ( n -- n n c-addr/u | n n -1 ) + dup -1 <> if + 13 +c! ( n n c-addr/u -- n c-addr/u ) + \ replace 'x' with n + else + swap drop ( n n -1 -- n -1 ) + over menu_command[x] unsetenv + then else \ make sure we have not already initialized this item - s" init_stateN" - -rot 2dup 10 + c! rot \ repace 'N' - evaluate dup @ 0= if + dup init_stateN dup @ 0= if 1 swap ! \ If this menuitem has an initializer, run it - s" menu_init[x]" - -rot 2dup 10 + c! rot \ replace 'x' + dup menu_init[x] getenv dup -1 <> if evaluate else @@ -542,35 +554,24 @@ create init_text8 255 allot drop then + dup loader_color? if - s" ansi_caption[x]" + ansi_caption[x] else - s" menu_caption[x]" + menu_caption[x] then then - ( C-Addr/U | -1 ) dup -1 <> if - \ replace 'x' with current iteration - -rot 2dup 13 + c! rot - \ test for environment variable getenv dup -1 <> if - printmenuitem ( C-Addr/U -- N ) - - s" menukeyN !" \ generate cmd to store result - -rot 2dup 7 + c! rot - - evaluate + printmenuitem ( c-addr/u -- n ) + dup menukeyN ! else drop then else drop - - s" menu_command[x]" - -rot 2dup 13 + c! rot ( replace 'x' ) - unsetenv then 1+ dup 56 > \ add 1 to iterator, continue if less than 57 @@ -579,7 +580,7 @@ create init_text8 255 allot \ Optionally add a reboot option to the menu menurebootadded @ true <> if - s" menu_reboot" getenv -1 <> if + str_menu_reboot getenv -1 <> if drop \ no need for the value s" Reboot" \ menu caption (required by printmenuitem) @@ -597,45 +598,22 @@ create init_text8 255 allot \ : menu-timeout-update ( N -- ) - dup 9 > if ( N N 9 -- N ) - drop ( N -- ) - 9 ( maximum: -- N ) - then - - dup 0 < if ( N N 0 -- N ) - drop ( N -- ) - 0 ( minimum: -- N ) - then - - 48 + ( convert single-digit numeral to ASCII: N 48 -- N ) - - s" Autoboot in N seconds. [Space] to pause" ( N -- N Addr C ) - - 2 pick 48 - 0> if ( N Addr C N 48 -- N Addr C ) - - \ Modify 'N' (Addr+12) above to reflect time-left - - -rot ( N Addr C -- C N Addr ) - tuck ( C N Addr -- C Addr N Addr ) - 12 + ( C Addr N Addr -- C Addr N Addr2 ) - c! ( C Addr N Addr2 -- C Addr ) - swap ( C Addr -- Addr C ) - - menu_timeout_x @ - menu_timeout_y @ - at-xy ( position cursor: Addr C N N -- Addr C ) - - type ( print message: Addr C -- ) - - else ( N Addr C N -- N Addr C ) - - menu_timeout_x @ - menu_timeout_y @ - at-xy ( position cursor: N Addr C N N -- N Addr C ) - - spaces ( erase message: N Addr C -- N Addr ) - 2drop ( N Addr -- ) + \ Enforce minimum/maximum + dup 9 > if drop 9 then + dup 0 < if drop 0 then + + s" Autoboot in N seconds. [Space] to pause" ( n -- n c-addr/u ) + + 2 pick 0> if + rot 48 + -rot ( n c-addr/u -- n' c-addr/u ) \ convert to ASCII + 12 +c! ( n' c-addr/u -- c-addr/u ) \ replace 'N' above + menu_timeout_x @ menu_timeout_y @ at-xy \ position cursor + type ( c-addr/u -- ) \ print message + else + menu_timeout_x @ menu_timeout_y @ at-xy \ position cursor + spaces ( n c-addr/u -- n c-addr ) \ erase message + 2drop ( n c-addr -- ) then 0 25 at-xy ( position cursor back at bottom-left ) @@ -683,7 +661,7 @@ create init_text8 255 allot \ (user did not cancel by pressing ANY \ key) - s" menu_timeout_command" getenv dup + str_menu_timeout_command getenv dup -1 = if drop \ clean-up else @@ -766,7 +744,7 @@ create init_text8 255 allot 0 menu_timeout_enabled ! \ start with automatic timeout disabled \ check indication that automatic execution after delay is requested - s" menu_timeout_command" getenv -1 <> if ( Addr C -1 -- | Addr ) + str_menu_timeout_command getenv -1 <> if ( Addr C -1 -- | Addr ) drop ( just testing existence right now: Addr -- ) \ initialize state variables @@ -802,7 +780,7 @@ create init_text8 255 allot menu_timeout_enabled @ 1 = if \ read custom column position (if set) - s" loader_menu_timeout_x" getenv dup -1 = if + str_loader_menu_timeout_x getenv dup -1 = if drop \ no custom column position menu_timeout_default_x \ use default setting else @@ -814,7 +792,7 @@ create init_text8 255 allot menu_timeout_x ! ( store value on stack from above ) \ read custom row position (if set) - s" loader_menu_timeout_y" getenv dup -1 = if + str_loader_menu_timeout_y getenv dup -1 = if drop \ no custom row position menu_timeout_default_y \ use default setting else @@ -853,12 +831,8 @@ create init_text8 255 allot 49 \ Iterator start (loop range 49 to 56; ASCII '1' to '8') begin - s" menukeyN @" - - \ replace 'N' with current iteration - -rot 2dup 7 + c! rot - - evaluate rot tuck = if + dup menukeyN @ + rot tuck = if \ Adjust for missing ACPI menuitem on non-i386 arch-i386? true <> menuacpi @ 0<> and if @@ -869,13 +843,8 @@ create init_text8 255 allot then then - \ base env name for the value (x is a number) - s" menu_command[x]" - - \ Copy ASCII number to string at offset 13 - -rot 2dup 13 + c! rot - \ Test for the environment variable + dup menu_command[x] getenv dup -1 <> if \ Execute the stored procedure evaluate @@ -910,16 +879,14 @@ create init_text8 255 allot \ \ Check for menu keycode shortcut(s) \ - s" menu_keycode[x]" - -rot 2dup 13 + c! rot + dup menu_keycode[x] getenv dup -1 = if drop else ?number 0<> if rot tuck = if swap - s" menu_command[x]" - -rot 2dup 13 + c! rot + dup menu_command[x] getenv dup -1 <> if evaluate 0= if @@ -951,100 +918,43 @@ create init_text8 255 allot 49 \ Iterator start (loop range 49 to 56; ASCII '1' to '8') begin - \ Unset variables in-order of appearance in menu.4th(8) + dup menu_init[x] unsetenv \ menu initializer + dup menu_command[x] unsetenv \ menu command + dup menu_caption[x] unsetenv \ menu caption + dup ansi_caption[x] unsetenv \ ANSI caption + dup menu_keycode[x] unsetenv \ menu keycode + dup toggled_text[x] unsetenv \ toggle_menuitem caption + dup toggled_ansi[x] unsetenv \ toggle_menuitem ANSI caption - s" menu_caption[x]" \ basename for caption variable - -rot 2dup 13 + c! rot \ replace 'x' with current iteration - unsetenv \ not erroneous to unset unknown var - - s" menu_command[x]" \ command basename - -rot 2dup 13 + c! rot \ replace 'x' - unsetenv - - s" menu_init[x]" \ initializer basename - -rot 2dup 10 + c! rot \ replace 'x' - unsetenv - - s" menu_keycode[x]" \ keycode basename - -rot 2dup 13 + c! rot \ replace 'x' - unsetenv - - s" ansi_caption[x]" \ ANSI caption basename - -rot 2dup 13 + c! rot \ replace 'x' - unsetenv - - s" toggled_text[x]" \ toggle_menuitem caption basename - -rot 2dup 13 + c! rot \ replace 'x' - unsetenv - - s" toggled_ansi[x]" \ toggle_menuitem ANSI caption basename - -rot 2dup 13 + c! rot \ replace 'x' - unsetenv - - s" menu_caption[x][y]" \ cycle_menuitem caption - -rot 2dup 13 + c! rot \ replace 'x' - 48 -rot + 48 \ Iterator start (inner range 48 to 57; ASCII '0' to '9') begin - 16 2over rot + c! \ replace 'y' - 2dup unsetenv - - rot 1+ dup 57 > 2swap rot + \ cycle_menuitem caption and ANSI caption + 2dup menu_caption[x][y] unsetenv + 2dup ansi_caption[x][y] unsetenv + 1+ dup 57 > until - 2drop drop + drop \ inner iterator - s" ansi_caption[x][y]" \ cycle_menuitem ANSI caption - -rot 2dup 13 + c! rot \ replace 'x' - 48 -rot - begin - 16 2over rot + c! \ replace 'y' - 2dup unsetenv - - rot 1+ dup 57 > 2swap rot - until - 2drop drop - - s" 0 menukeyN !" \ basename for key association var - -rot 2dup 9 + c! rot \ replace 'N' with current iteration - evaluate \ assign zero (0) to key assoc. var - - s" 0 init_stateN !" \ used by menu-create - -rot 2dup 12 + c! rot \ replace 'N' - evaluate - - s" 0 toggle_stateN !" \ used by toggle_menuitem - -rot 2dup 14 + c! rot \ replace 'N' - evaluate - - s" 0 cycle_stateN !" \ used by cycle_menuitem - -rot 2dup 13 + c! rot \ replace 'N' - evaluate - - s" 0 init_textN c!" \ used by toggle_menuitem - -rot 2dup 11 + c! rot \ replace 'N' - evaluate + 0 over menukeyN ! \ used by menu-create, menu-display + 0 over init_stateN ! \ used by menu-create + 0 over toggle_stateN ! \ used by toggle_menuitem + 0 over init_textN c! \ used by toggle_menuitem + 0 over cycle_stateN ! \ used by cycle_menuitem 1+ dup 56 > \ increment, continue if less than 57 until drop \ iterator - \ unset the timeout command - s" menu_timeout_command" unsetenv + str_menu_timeout_command unsetenv \ menu timeout command + str_menu_reboot unsetenv \ Reboot menu option flag + str_menu_acpi unsetenv \ ACPI menu option flag + str_menu_options unsetenv \ Options separator flag + str_menu_optionstext unsetenv \ separator display text + str_menu_init unsetenv \ menu initializer - \ clear the "Reboot" menu option flag - s" menu_reboot" unsetenv 0 menureboot ! - - \ clear the ACPI menu option flag - s" menu_acpi" unsetenv 0 menuacpi ! - - \ clear the "Options" menu separator flag - s" menu_options" unsetenv - s" menu_optionstext" unsetenv 0 menuoptions ! - - \ clear the menu initializer - s" menu_init" unsetenv ; \ This function both unsets menu variables and visually erases the menu area From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 01:27:54 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 29971A87 for ; Fri, 16 Nov 2012 01:27:54 +0000 (UTC) (envelope-from postmaster@mailpod.hostingplatform.com) Received: from atl4mhob15.myregisteredsite.com (atl4mhob15.myregisteredsite.com [209.17.115.53]) by mx1.freebsd.org (Postfix) with ESMTP id CC8A78FC13 for ; Fri, 16 Nov 2012 01:27:53 +0000 (UTC) Received: from mailpod1.hostingplatform.com (mailpod1.networksolutionsemail.com [206.188.198.65]) by atl4mhob15.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAG1Rrff029335 for ; Thu, 15 Nov 2012 20:27:53 -0500 Received: (qmail 938 invoked by uid 0); 16 Nov 2012 01:27:53 -0000 Received: (qmail 20431 invoked by uid 0); 15 Nov 2012 23:49:22 -0000 Received: from unknown (HELO atl4mhib32.myregisteredsite.com) (209) by 0 with SMTP; 15 Nov 2012 23:49:22 -0000 Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by atl4mhib32.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAFNnKYc023688 for ; Thu, 15 Nov 2012 18:49:21 -0500 Received: from hub.freebsd.org (hub.FreeBSD.org [8.8.178.136]) by mx2.freebsd.org (Postfix) with ESMTP id AD01A3B6AA5; Thu, 15 Nov 2012 23:49:15 +0000 (UTC) Received: from hub.FreeBSD.org (hub.FreeBSD.org [8.8.178.136]) by hub.freebsd.org (Postfix) with ESMTP id ECC07ADA; Thu, 15 Nov 2012 23:49:14 +0000 (UTC) (envelope-from owner-svn-src-all@freebsd.org) Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EC122998; Thu, 15 Nov 2012 23:49:07 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CCBEC8FC13; Thu, 15 Nov 2012 23:49:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFNn7Xr078236; Thu, 15 Nov 2012 23:49:07 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFNn75t078235; Thu, 15 Nov 2012 23:49:07 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <201211152349.qAFNn75t078235@svn.freebsd.org> From: Olivier Houchard Date: Thu, 15 Nov 2012 23:49:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243108 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: owner-svn-src-all@freebsd.org Sender: owner-svn-src-all@freebsd.org X-SpamScore: 0 X-MailHub-Apparently-To: mjm@michaelmeltzer.com X-MailHub-Forwarded: Yes X-BeenThere: svn-src-head@freebsd.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 01:27:54 -0000 Author: cognet Date: Thu Nov 15 23:49:07 2012 New Revision: 243108 URL: http://svnweb.freebsd.org/changeset/base/243108 Log: Remove a useless printf Modified: head/sys/arm/arm/busdma_machdep-v6.c Modified: head/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- head/sys/arm/arm/busdma_machdep-v6.c Thu Nov 15 22:31:23 2012 (r243107) +++ head/sys/arm/arm/busdma_machdep-v6.c Thu Nov 15 23:49:07 2012 (r243108) @@ -1463,7 +1463,6 @@ add_bounce_page(bus_dma_tag_t dmat, bus_ struct bounce_zone *bz; struct bounce_page *bpage; - printf("add bounce page\n"); KASSERT(dmat->bounce_zone != NULL, ("no bounce zone in dma tag")); KASSERT(map != NULL, ("add_bounce_page: bad map %p", map)); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 01:37:26 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 50A1CE03; Fri, 16 Nov 2012 01:37:26 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 29F578FC13; Fri, 16 Nov 2012 01:37:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAG1bQAT092971; Fri, 16 Nov 2012 01:37:26 GMT (envelope-from sjg@svn.freebsd.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAG1bPdZ092958; Fri, 16 Nov 2012 01:37:25 GMT (envelope-from sjg@svn.freebsd.org) Message-Id: <201211160137.qAG1bPdZ092958@svn.freebsd.org> From: "Simon J. Gerraty" Date: Fri, 16 Nov 2012 01:37:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243115 - in head: contrib/bmake 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 01:37:26 -0000 Author: sjg Date: Fri Nov 16 01:37:25 2012 New Revision: 243115 URL: http://svnweb.freebsd.org/changeset/base/243115 Log: Merge bmake-20121111 Also pay attention to MK_SHARED_TOOLCHAIN. Approved by: marcel (mentor) Added: head/contrib/bmake/unit-tests/order - copied unchanged from r243106, vendor/NetBSD/bmake/dist/unit-tests/order Modified: head/contrib/bmake/ChangeLog head/contrib/bmake/FILES head/contrib/bmake/Makefile.in head/contrib/bmake/cond.c head/contrib/bmake/make.c head/contrib/bmake/unit-tests/Makefile.in head/contrib/bmake/unit-tests/test.exp head/usr.bin/bmake/Makefile head/usr.bin/bmake/Makefile.inc head/usr.bin/bmake/unit-tests/Makefile Directory Properties: head/contrib/bmake/ (props changed) Modified: head/contrib/bmake/ChangeLog ============================================================================== --- head/contrib/bmake/ChangeLog Fri Nov 16 01:24:11 2012 (r243114) +++ head/contrib/bmake/ChangeLog Fri Nov 16 01:37:25 2012 (r243115) @@ -1,3 +1,28 @@ +2012-11-11 Simon J. Gerraty + + * Makefile.in (MAKE_VERSION): 20121111 + fix generation of bmake.cat1 + +2012-11-09 Simon J. Gerraty + + * Makefile.in (MAKE_VERSION): 20121109 + Merge with NetBSD make, pick up + o make.c: MakeBuildChild: return 0 so search continues if a + .ORDER dependency is detected. + o unit-tests/order: test the above + +2012-11-02 Simon J. Gerraty + + * Makefile.in (MAKE_VERSION): 20121102 + Merge with NetBSD make, pick up + o cond.c: allow cond_state[] to grow. + In meta mode with a very large tree, we can hit the limit + while processing dirdeps. + +2012-10-25 Simon J. Gerraty + + * Makefile.in: we need to use ${srcdir} not ${.CURDIR} + 2012-10-10 Simon J. Gerraty * Makefile.in (MAKE_VERSION): 20121010 Modified: head/contrib/bmake/FILES ============================================================================== --- head/contrib/bmake/FILES Fri Nov 16 01:24:11 2012 (r243114) +++ head/contrib/bmake/FILES Fri Nov 16 01:37:25 2012 (r243115) @@ -110,6 +110,7 @@ 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 Modified: head/contrib/bmake/Makefile.in ============================================================================== --- head/contrib/bmake/Makefile.in Fri Nov 16 01:24:11 2012 (r243114) +++ head/contrib/bmake/Makefile.in Fri Nov 16 01:37:25 2012 (r243115) @@ -1,7 +1,7 @@ # $NetBSD: Makefile,v 1.56 2012/05/30 21:54:23 sjg Exp $ # @(#)Makefile 5.2 (Berkeley) 12/28/90 -# $Id: Makefile.in,v 1.174 2012/10/10 18:46:24 sjg Exp $ +# $Id: Makefile.in,v 1.178 2012/11/15 16:48:59 sjg Exp $ PROG= bmake SRCS= arch.c buf.c compat.c cond.c dir.c for.c hash.c job.c main.c \ @@ -21,7 +21,7 @@ srcdir= @srcdir@ CC?= @CC@ # Base version on src date -MAKE_VERSION= 20121010 +MAKE_VERSION= 20121111 MACHINE=@machine@ MACHINE_ARCH=@machine_arch@ DEFAULT_SYS_PATH = @default_sys_path@ @@ -114,7 +114,7 @@ ${MAN}: make.1 my.history @echo making ${PROG}.1 @sed -e 's/^.Nx/NetBSD/' -e '/^.Nm/s/make/${PROG}/' \ -e '/^.Sh HISTORY/rmy.history' \ - -e '/^.Sh HISTORY/,$$s,^.Nm,make,' ${.CURDIR}/make.1 > $@ + -e '/^.Sh HISTORY/,$$s,^.Nm,make,' ${srcdir}/make.1 > $@ .endif Modified: head/contrib/bmake/cond.c ============================================================================== --- head/contrib/bmake/cond.c Fri Nov 16 01:24:11 2012 (r243114) +++ head/contrib/bmake/cond.c Fri Nov 16 01:37:25 2012 (r243115) @@ -1,4 +1,4 @@ -/* $NetBSD: cond.c,v 1.64 2012/06/12 19:21:50 joerg Exp $ */ +/* $NetBSD: cond.c,v 1.67 2012/11/03 13:59:27 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: cond.c,v 1.64 2012/06/12 19:21:50 joerg Exp $"; +static char rcsid[] = "$NetBSD: cond.c,v 1.67 2012/11/03 13:59:27 christos Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)cond.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: cond.c,v 1.64 2012/06/12 19:21:50 joerg Exp $"); +__RCSID("$NetBSD: cond.c,v 1.67 2012/11/03 13:59:27 christos Exp $"); #endif #endif /* not lint */ #endif @@ -1227,7 +1227,8 @@ do_Cond_EvalExpression(Boolean *value) int Cond_Eval(char *line) { - #define MAXIF 128 /* maximum depth of .if'ing */ +#define MAXIF 128 /* maximum depth of .if'ing */ +#define MAXIF_BUMP 32 /* how much to grow by */ enum if_states { IF_ACTIVE, /* .if or .elif part active */ ELSE_ACTIVE, /* .else part active */ @@ -1235,7 +1236,8 @@ Cond_Eval(char *line) SKIP_TO_ELSE, /* has been true, but not seen '.else' */ SKIP_TO_ENDIF /* nothing else to execute */ }; - static enum if_states cond_state[MAXIF + 1] = { IF_ACTIVE }; + static enum if_states *cond_state = NULL; + static unsigned int max_if_depth = MAXIF; const struct If *ifp; Boolean isElif; @@ -1244,7 +1246,10 @@ Cond_Eval(char *line) enum if_states state; level = PARSE_FATAL; - + if (!cond_state) { + cond_state = bmake_malloc(max_if_depth * sizeof(*cond_state)); + cond_state[0] = IF_ACTIVE; + } /* skip leading character (the '.') and any whitespace */ for (line++; *line == ' ' || *line == '\t'; line++) continue; @@ -1261,8 +1266,6 @@ Cond_Eval(char *line) } /* Return state for previous conditional */ cond_depth--; - if (cond_depth > MAXIF) - return COND_SKIP; return cond_state[cond_depth] <= ELSE_ACTIVE ? COND_PARSE : COND_SKIP; } @@ -1275,8 +1278,6 @@ Cond_Eval(char *line) return COND_PARSE; } - if (cond_depth > MAXIF) - return COND_SKIP; state = cond_state[cond_depth]; switch (state) { case SEARCH_FOR_ELIF: @@ -1325,9 +1326,6 @@ Cond_Eval(char *line) Parse_Error(level, "if-less elif"); return COND_PARSE; } - if (cond_depth > MAXIF) - /* Error reported when we saw the .if ... */ - return COND_SKIP; state = cond_state[cond_depth]; if (state == SKIP_TO_ENDIF || state == ELSE_ACTIVE) { Parse_Error(PARSE_WARNING, "extra elif"); @@ -1341,10 +1339,15 @@ Cond_Eval(char *line) } } else { /* Normal .if */ - if (cond_depth >= MAXIF) { - cond_depth++; - Parse_Error(PARSE_FATAL, "Too many nested if's. %d max.", MAXIF); - return COND_SKIP; + if (cond_depth + 1 >= max_if_depth) { + /* + * This is rare, but not impossible. + * In meta mode, dirdeps.mk (only runs at level 0) + * can need more than the default. + */ + max_if_depth += MAXIF_BUMP; + cond_state = bmake_realloc(cond_state, max_if_depth * + sizeof(*cond_state)); } state = cond_state[cond_depth]; cond_depth++; Modified: head/contrib/bmake/make.c ============================================================================== --- head/contrib/bmake/make.c Fri Nov 16 01:24:11 2012 (r243114) +++ head/contrib/bmake/make.c Fri Nov 16 01:37:25 2012 (r243115) @@ -1,4 +1,4 @@ -/* $NetBSD: make.c,v 1.87 2012/06/12 19:21:51 joerg Exp $ */ +/* $NetBSD: make.c,v 1.88 2012/11/09 18:53:05 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: make.c,v 1.87 2012/06/12 19:21:51 joerg Exp $"; +static char rcsid[] = "$NetBSD: make.c,v 1.88 2012/11/09 18:53:05 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)make.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: make.c,v 1.87 2012/06/12 19:21:51 joerg Exp $"); +__RCSID("$NetBSD: make.c,v 1.88 2012/11/09 18:53:05 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -1032,7 +1032,7 @@ MakeBuildChild(void *v_cn, void *toBeMad if (cn->order_pred && Lst_ForEach(cn->order_pred, MakeCheckOrder, 0)) { /* Can't build this (or anything else in this child list) yet */ cn->made = DEFERRED; - return 1; + return 0; /* but keep looking */ } if (DEBUG(MAKE)) @@ -1055,7 +1055,7 @@ MakeBuildChild(void *v_cn, void *toBeMad return cn->type & OP_WAIT && cn->unmade > 0; } -/* When a .ORDER RHS node completes we do this on each LHS */ +/* When a .ORDER LHS node completes we do this on each RHS */ static int MakeBuildParent(void *v_pn, void *toBeMade_next) { Modified: head/contrib/bmake/unit-tests/Makefile.in ============================================================================== --- head/contrib/bmake/unit-tests/Makefile.in Fri Nov 16 01:24:11 2012 (r243114) +++ head/contrib/bmake/unit-tests/Makefile.in Fri Nov 16 01:37:25 2012 (r243115) @@ -1,6 +1,6 @@ -# $Id: Makefile.in,v 1.38 2012/06/19 23:38:48 sjg Exp $ +# $Id: Makefile.in,v 1.39 2012/11/09 19:16:10 sjg Exp $ # -# $NetBSD: Makefile,v 1.34 2012/06/19 23:25:53 sjg Exp $ +# $NetBSD: Makefile,v 1.35 2012/11/09 19:08:28 sjg Exp $ # # Unit tests for make(1) # The main targets are: @@ -40,6 +40,7 @@ SUBFILES= \ modorder \ modts \ modword \ + order \ phony-end \ posix \ qequals \ @@ -52,6 +53,7 @@ SUBFILES= \ all: ${SUBFILES} flags.doterror= +flags.order=-j1 # the tests are actually done with sub-makes. .PHONY: ${SUBFILES} Copied: head/contrib/bmake/unit-tests/order (from r243106, vendor/NetBSD/bmake/dist/unit-tests/order) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/bmake/unit-tests/order Fri Nov 16 01:37:25 2012 (r243115, copy of r243106, vendor/NetBSD/bmake/dist/unit-tests/order) @@ -0,0 +1,20 @@ +# $NetBSD: order,v 1.1 2012/11/09 19:08:28 sjg Exp $ + +# Test that .ORDER is handled correctly. +# The explicit dependency the.o: the.h will make us examine the.h +# the .ORDER will prevent us building it immediately, +# we should then examine the.c rather than stop. + +all: the.o + +.ORDER: the.c the.h + +the.c the.h: + @echo Making $@ + +.SUFFIXES: .o .c + +.c.o: + @echo Making $@ from $? + +the.o: the.h Modified: head/contrib/bmake/unit-tests/test.exp ============================================================================== --- head/contrib/bmake/unit-tests/test.exp Fri Nov 16 01:24:11 2012 (r243114) +++ head/contrib/bmake/unit-tests/test.exp Fri Nov 16 01:37:25 2012 (r243115) @@ -310,6 +310,9 @@ LIST:tw:C/ /,/g="one two three four five LIST:tw:C/ /,/1g="one two three four five six" LIST:tw:tW:C/ /,/="one,two three four five six" LIST:tW:tw:C/ /,/="one two three four five six" +Making the.c +Making the.h +Making the.o from the.h the.c .TARGET="phony" .PREFIX="phony" .IMPSRC="" .TARGET="all" .PREFIX="all" .IMPSRC="" .TARGET="ok" .PREFIX="ok" .IMPSRC="" Modified: head/usr.bin/bmake/Makefile ============================================================================== --- head/usr.bin/bmake/Makefile Fri Nov 16 01:24:11 2012 (r243114) +++ head/usr.bin/bmake/Makefile Fri Nov 16 01:37:25 2012 (r243115) @@ -13,7 +13,7 @@ CFLAGS+= -I${.CURDIR} # $NetBSD: Makefile,v 1.56 2012/05/30 21:54:23 sjg Exp $ # @(#)Makefile 5.2 (Berkeley) 12/28/90 -# $Id: Makefile.in,v 1.174 2012/10/10 18:46:24 sjg Exp $ +# $Id: Makefile.in,v 1.178 2012/11/15 16:48:59 sjg Exp $ PROG?= ${.CURDIR:T} SRCS= arch.c buf.c compat.c cond.c dir.c for.c hash.c job.c main.c \ @@ -33,7 +33,7 @@ srcdir= ${SRCTOP}/contrib/bmake CC?= gcc # Base version on src date -MAKE_VERSION= 20121010 +MAKE_VERSION= 20121111 DEFAULT_SYS_PATH = .../share/mk:/usr/share/mk CPPFLAGS+= Modified: head/usr.bin/bmake/Makefile.inc ============================================================================== --- head/usr.bin/bmake/Makefile.inc Fri Nov 16 01:24:11 2012 (r243114) +++ head/usr.bin/bmake/Makefile.inc Fri Nov 16 01:37:25 2012 (r243115) @@ -11,4 +11,8 @@ PROG= make .endif +.if ${MK_SHARED_TOOLCHAIN} == "no" +NO_SHARED?= YES +.endif + WARNS=3 Modified: head/usr.bin/bmake/unit-tests/Makefile ============================================================================== --- head/usr.bin/bmake/unit-tests/Makefile Fri Nov 16 01:24:11 2012 (r243114) +++ head/usr.bin/bmake/unit-tests/Makefile Fri Nov 16 01:37:25 2012 (r243115) @@ -5,9 +5,9 @@ SRCTOP?= ${.CURDIR:H:H:H} -# $Id: Makefile.in,v 1.38 2012/06/19 23:38:48 sjg Exp $ +# $Id: Makefile.in,v 1.39 2012/11/09 19:16:10 sjg Exp $ # -# $NetBSD: Makefile,v 1.34 2012/06/19 23:25:53 sjg Exp $ +# $NetBSD: Makefile,v 1.35 2012/11/09 19:08:28 sjg Exp $ # # Unit tests for make(1) # The main targets are: @@ -47,6 +47,7 @@ SUBFILES= \ modorder \ modts \ modword \ + order \ phony-end \ posix \ qequals \ @@ -59,6 +60,7 @@ SUBFILES= \ all: ${SUBFILES} flags.doterror= +flags.order=-j1 # the tests are actually done with sub-makes. .PHONY: ${SUBFILES} From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 01:41:43 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1952DF96; Fri, 16 Nov 2012 01:41:42 +0000 (UTC) (envelope-from grog@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B63168FC08; Fri, 16 Nov 2012 01:41:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAG1fg9A093485; Fri, 16 Nov 2012 01:41:42 GMT (envelope-from grog@svn.freebsd.org) Received: (from grog@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAG1fg8d093484; Fri, 16 Nov 2012 01:41:42 GMT (envelope-from grog@svn.freebsd.org) Message-Id: <201211160141.qAG1fg8d093484@svn.freebsd.org> From: Greg Lehey Date: Fri, 16 Nov 2012 01:41:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243116 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 01:41:43 -0000 Author: grog Date: Fri Nov 16 01:41:42 2012 New Revision: 243116 URL: http://svnweb.freebsd.org/changeset/base/243116 Log: Complete man page. MFC after: 2 weeks Modified: head/lib/libc/gen/getbsize.3 Modified: head/lib/libc/gen/getbsize.3 ============================================================================== --- head/lib/libc/gen/getbsize.3 Fri Nov 16 01:37:25 2012 (r243115) +++ head/lib/libc/gen/getbsize.3 Fri Nov 16 01:41:42 2012 (r243116) @@ -28,12 +28,12 @@ .\" @(#)getbsize.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd November 16, 2012 .Dt GETBSIZE 3 .Os .Sh NAME .Nm getbsize -.Nd get user block size +.Nd get preferred block size .Sh LIBRARY .Lb libc .Sh SYNOPSIS @@ -43,11 +43,31 @@ .Sh DESCRIPTION The .Fn getbsize -function determines the user's preferred block size based on the value of the -.Dq BLOCKSIZE -environment variable; see -.Xr environ 7 -for details on its use and format. +function returns a preferred block size for reporting by system utilities +.Xr df 1 , +.Xr du 1 , +.Xr ls 1 +and +.Xr systat 1 , +based on the value of the +.En BLOCKSIZE +environment variable. +.En BLOCKSIZE +may be specified directly in bytes, or in multiples of a kilobyte by +specifying a number followed by ``K'' or ``k'', in multiples of a +megabyte by specifying a number followed by ``M'' or ``m'' or in +multiples of a gigabyte by specifying a number followed by ``G'' or +``g''. +Multiples must be integers. +.Pp +Valid values of +.En BLOCKSIZE +are 512 bytes to 1 gigabyte. +Sizes less than 512 bytes are rounded up to 512 bytes, and sizes +greater than 1 GB are rounded down to 1 GB. +In each case +.Fn getbsize +produces a warning message. .Pp The .Fn getbsize @@ -61,10 +81,6 @@ terminating null). The memory referenced by .Fa blocksizep is filled in with block size, in bytes. -.Pp -If the user's block size is unreasonable, a warning message is -written to standard error and the returned information reflects -a block size of 512 bytes. .Sh SEE ALSO .Xr df 1 , .Xr du 1 , From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 01:43:23 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 99EB0218; Fri, 16 Nov 2012 01:43:23 +0000 (UTC) (envelope-from grog@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 790BC8FC12; Fri, 16 Nov 2012 01:43:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAG1hNOp093702; Fri, 16 Nov 2012 01:43:23 GMT (envelope-from grog@svn.freebsd.org) Received: (from grog@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAG1hNMg093701; Fri, 16 Nov 2012 01:43:23 GMT (envelope-from grog@svn.freebsd.org) Message-Id: <201211160143.qAG1hNMg093701@svn.freebsd.org> From: Greg Lehey Date: Fri, 16 Nov 2012 01:43:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243117 - head/share/man/man7 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 01:43:23 -0000 Author: grog Date: Fri Nov 16 01:43:23 2012 New Revision: 243117 URL: http://svnweb.freebsd.org/changeset/base/243117 Log: Move detailed description of BLOCKSIZE to getbsize(3). MFC after: 2 weeks. Modified: head/share/man/man7/environ.7 Modified: head/share/man/man7/environ.7 ============================================================================== --- head/share/man/man7/environ.7 Fri Nov 16 01:41:42 2012 (r243116) +++ head/share/man/man7/environ.7 Fri Nov 16 01:43:23 2012 (r243117) @@ -56,13 +56,9 @@ The size of the block units used by seve .Xr du 1 and .Xr ls 1 . -.Ev BLOCKSIZE -may be specified in units of a byte by specifying a number, -in units of a kilobyte by specifying a number followed by ``K'' or -``k'', in units of a megabyte by specifying a number followed by ``M'' -or ``m'' and in units of a gigabyte by specifying a number followed -by ``G'' or ``g''. -Sizes less than 512 bytes or greater than a gigabyte are ignored. +This variable is processed by the +.Xr getbsize 3 +function. .It Ev COLUMNS The user's preferred width in column positions for the terminal. Utilities such as @@ -259,6 +255,7 @@ built-in command in .Xr execve 2 , .Xr execle 3 , .Xr getenv 3 , +.Xr getbsize 3 , .Xr setenv 3 , .Xr setlocale 3 , .Xr system 3 , From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 01:47:55 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E31414A7 for ; Fri, 16 Nov 2012 01:47:55 +0000 (UTC) (envelope-from postmaster@mailpod.hostingplatform.com) Received: from atl4mhob06.myregisteredsite.com (atl4mhob06.myregisteredsite.com [209.17.115.44]) by mx1.freebsd.org (Postfix) with ESMTP id 965438FC0C for ; Fri, 16 Nov 2012 01:47:55 +0000 (UTC) Received: from mailpod1.hostingplatform.com (mailpod1.networksolutionsemail.com [206.188.198.65]) by atl4mhob06.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAG1lsar018240 for ; Thu, 15 Nov 2012 20:47:54 -0500 Received: (qmail 11229 invoked by uid 0); 16 Nov 2012 01:47:54 -0000 Received: (qmail 12512 invoked by uid 0); 15 Nov 2012 20:50:31 -0000 Received: from unknown (HELO atl4mhib45.myregisteredsite.com) (209) by 0 with SMTP; 15 Nov 2012 20:50:31 -0000 Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by atl4mhib45.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAFKoUTg005725 for ; Thu, 15 Nov 2012 15:50:30 -0500 Received: from hub.freebsd.org (hub.FreeBSD.org [8.8.178.136]) by mx2.freebsd.org (Postfix) with ESMTP id B56E73B6062; Thu, 15 Nov 2012 20:50:25 +0000 (UTC) Received: from hub.FreeBSD.org (hub.FreeBSD.org [8.8.178.136]) by hub.freebsd.org (Postfix) with ESMTP id 4D737388; Thu, 15 Nov 2012 20:50:26 +0000 (UTC) (envelope-from owner-svn-src-all@freebsd.org) Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2AFEF245; Thu, 15 Nov 2012 20:50:19 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0E29E8FC08; Thu, 15 Nov 2012 20:50:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFKoIjH053378; Thu, 15 Nov 2012 20:50:18 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFKoIEH053377; Thu, 15 Nov 2012 20:50:18 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201211152050.qAFKoIEH053377@svn.freebsd.org> From: Sergey Kandaurov Date: Thu, 15 Nov 2012 20:50:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243102 - head/cddl/contrib/opensolaris/cmd/zpool X-SVN-Group: head MIME-Version: 1.0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: owner-svn-src-all@freebsd.org Sender: owner-svn-src-all@freebsd.org X-SpamScore: 0 X-MailHub-Apparently-To: mjm@michaelmeltzer.com X-MailHub-Forwarded: Yes X-BeenThere: svn-src-head@freebsd.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 01:47:56 -0000 Author: pluknet Date: Thu Nov 15 20:50:18 2012 New Revision: 243102 URL: http://svnweb.freebsd.org/changeset/base/243102 Log: Sort SEE ALSO xrefs by the manual section number and add a missing comma. Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Thu Nov 15 20:37:38 2012 (r243101) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Thu Nov 15 20:50:18 2012 (r243102) @@ -1927,8 +1927,8 @@ Discarded approximately 29 seconds of tr .Ed .El .Sh SEE ALSO +.Xr zpool-features 7 , .Xr zfs 8 -.Xr zpool-features 7 .Sh AUTHORS This manual page is a .Xr mdoc 7 _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 02:36:39 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C7C04EE6 for ; Fri, 16 Nov 2012 02:36:39 +0000 (UTC) (envelope-from postmaster@mailpod.hostingplatform.com) Received: from atl4mhob14.myregisteredsite.com (atl4mhob14.myregisteredsite.com [209.17.115.52]) by mx1.freebsd.org (Postfix) with ESMTP id 61E9C8FC13 for ; Fri, 16 Nov 2012 02:36:39 +0000 (UTC) Received: from mailpod1.hostingplatform.com (mailpod1.networksolutionsemail.com [206.188.198.65]) by atl4mhob14.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAG2acoQ002145 for ; Thu, 15 Nov 2012 21:36:38 -0500 Received: (qmail 10924 invoked by uid 0); 16 Nov 2012 02:36:38 -0000 Received: (qmail 3549 invoked by uid 0); 15 Nov 2012 18:53:37 -0000 Received: from unknown (HELO atl4mhib24.myregisteredsite.com) (209) by 0 with SMTP; 15 Nov 2012 18:53:37 -0000 Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by atl4mhib24.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAFIraav014268 for ; Thu, 15 Nov 2012 13:53:36 -0500 Received: from hub.freebsd.org (hub.FreeBSD.org [8.8.178.136]) by mx2.freebsd.org (Postfix) with ESMTP id 228EA3B6B12; Thu, 15 Nov 2012 18:53:27 +0000 (UTC) Received: from hub.FreeBSD.org (hub.FreeBSD.org [8.8.178.136]) by hub.freebsd.org (Postfix) with ESMTP id CDAED8D2; Thu, 15 Nov 2012 18:53:27 +0000 (UTC) (envelope-from owner-svn-src-all@freebsd.org) Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 73BD478C for ; Thu, 15 Nov 2012 18:53:19 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id D1FAC8FC17 for ; Thu, 15 Nov 2012 18:53:18 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id j13so1871093lah.13 for ; Thu, 15 Nov 2012 10:53:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=uH6ZBjAfLlSRKHMijgXCoP+JGS8/wq84wSoLBThPQ9w=; b=Y4stiXKVIhKywsBG7nv94ZFvRuVu+JFj1oq1Sa9gk6soxWGn/zPDTqk45wCjJPTGVc NLg9/Eun+KubMqHyY2izrMdfQFaV3aQv/0OZiXTKr7ie/96WbjPDF3OmiPzV03Urnqgx mpzNLPMsOM2p5dLzAP8j6aWPrwpWjuanNd+sE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=uH6ZBjAfLlSRKHMijgXCoP+JGS8/wq84wSoLBThPQ9w=; b=IiHLqETTmeZbIYfLovgJlzQdYcjSer4Clfm0KQD50Re+Cq8fjSnOaFJmVV6msLfnvu CeJ0tAOIiBWQXIvwL9WUidh1+sqD/IB3ivIxCSZg7LPZzGT4sZNgmW1CRxmDx/6FuUnm cxlDdsDJGiKdgzaiK8ZJcqL+i3NhEB/HQkwBRcfNtlyLW382dvDJfOuPoBZBEYiMvS2N HIhXkC2RUIgEa4uWicOlMYOqIN6JpFSFwDw5dgV9jR/gOPbYHYGkBGb+cMVsZps5ytoq TO+/+REYYHyI+xhxGtB1rSM0gdhVeTq2Fg+hdgnMZ+VafdXouvzqanDBERO0E2B1lQpq h9GQ== Received: by 10.112.54.40 with SMTP id g8mr1011225lbp.49.1353005597564; Thu, 15 Nov 2012 10:53:17 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.25.166 with HTTP; Thu, 15 Nov 2012 10:52:46 -0800 (PST) In-Reply-To: <20121116032851.I44199@besplex.bde.org> References: <201211151506.qAFF63v0003848@svn.freebsd.org> <20121115153030.GD73505@kib.kiev.ua> <20121116032851.I44199@besplex.bde.org> From: Eitan Adler Date: Thu, 15 Nov 2012 13:52:46 -0500 X-Google-Sender-Auth: moJfvAvd2Bz9pTOVQDopkjjDLAc Message-ID: Subject: Re: svn commit: r243076 - head/usr.sbin/chkgrp To: Bruce Evans X-Gm-Message-State: ALoCoQlvBDsnxDZStKK5rbqdmHm86mz1GmOxptvE6JSeRuPqrBH88ShfThYkdgo88MKJngLpCtGF X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: owner-svn-src-all@freebsd.org Sender: owner-svn-src-all@freebsd.org X-SpamScore: 0 X-MailHub-Apparently-To: mjm@michaelmeltzer.com X-MailHub-Forwarded: Yes Cc: Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 02:36:39 -0000 On 15 November 2012 11:52, Bruce Evans wrote: > strtoul("1garbage", NULL, 10) succeeds and returns value 1, but the input > is garbage. This case is covered earlier 160 /* check that the GID is numeric */ 161 if (strspn(f[2], "0123456789") != strlen(f[2])) { 162 warnx("%s: line %d: GID is not numeric", gfn, n); > As the man page says, the EINVAL feature is unportable. It is almost > useless, since to detect garbage after the number you have to pass an > endptr to strtoul(), and then the check for no conversion (that is, > for garbage at the beginning) is just as easy as the check for garbage > at the end. This patch doesn't care about EINVAL or ERANGE. It just cares strtoul returned an error. I even considered just ignoring the error case because the data is mostly sanity checked prior. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 02:46:00 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5D8E4288 for ; Fri, 16 Nov 2012 02:46:00 +0000 (UTC) (envelope-from postmaster@mailpod.hostingplatform.com) Received: from atl4mhob13.myregisteredsite.com (atl4mhob13.myregisteredsite.com [209.17.115.51]) by mx1.freebsd.org (Postfix) with ESMTP id 0CBA68FC12 for ; Fri, 16 Nov 2012 02:45:59 +0000 (UTC) Received: from mailpod1.hostingplatform.com (mailpod1.networksolutionsemail.com [206.188.198.65]) by atl4mhob13.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAG2jwas027369 for ; Thu, 15 Nov 2012 21:45:58 -0500 Received: (qmail 1572 invoked by uid 0); 16 Nov 2012 02:45:58 -0000 Received: (qmail 27058 invoked by uid 0); 15 Nov 2012 21:23:01 -0000 Received: from unknown (HELO atl4mhib26.myregisteredsite.com) (209) by 0 with SMTP; 15 Nov 2012 21:23:01 -0000 Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by atl4mhib26.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAFLN0Kx020188 for ; Thu, 15 Nov 2012 16:23:00 -0500 Received: from hub.freebsd.org (hub.FreeBSD.org [8.8.178.136]) by mx2.freebsd.org (Postfix) with ESMTP id 565553B608E; Thu, 15 Nov 2012 21:22:57 +0000 (UTC) Received: from hub.freebsd.org (hub.freebsd.org [8.8.178.136]) by hub.freebsd.org (Postfix) with ESMTP id 046FEEFD; Thu, 15 Nov 2012 21:22:58 +0000 (UTC) (envelope-from owner-svn-src-all@freebsd.org) Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D3D17DCD; Thu, 15 Nov 2012 21:22:50 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B5CEB8FC08; Thu, 15 Nov 2012 21:22:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFLMoSc058195; Thu, 15 Nov 2012 21:22:50 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFLMoHm058193; Thu, 15 Nov 2012 21:22:50 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201211152122.qAFLMoHm058193@svn.freebsd.org> From: Sergey Kandaurov Date: Thu, 15 Nov 2012 21:22:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243104 - head/bin/df X-SVN-Group: head MIME-Version: 1.0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: owner-svn-src-all@freebsd.org Sender: owner-svn-src-all@freebsd.org X-SpamScore: 0 X-MailHub-Apparently-To: mjm@michaelmeltzer.com X-MailHub-Forwarded: Yes X-BeenThere: svn-src-head@freebsd.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 02:46:00 -0000 Author: pluknet Date: Thu Nov 15 21:22:50 2012 New Revision: 243104 URL: http://svnweb.freebsd.org/changeset/base/243104 Log: Fix section number for pstat and swapinfo cross references. MFC after: 3 days Modified: head/bin/df/df.1 Modified: head/bin/df/df.1 ============================================================================== --- head/bin/df/df.1 Thu Nov 15 20:51:57 2012 (r243103) +++ head/bin/df/df.1 Thu Nov 15 21:22:50 2012 (r243104) @@ -166,9 +166,7 @@ is set, the block counts will be display .El .Sh SEE ALSO .Xr lsvfs 1 , -.Xr pstat 1 , .Xr quota 1 , -.Xr swapinfo 1 , .Xr fstatfs 2 , .Xr getfsstat 2 , .Xr statfs 2 , @@ -176,7 +174,9 @@ is set, the block counts will be display .Xr localeconv 3 , .Xr fstab 5 , .Xr mount 8 , -.Xr quot 8 +.Xr pstat 8 , +.Xr quot 8 , +.Xr swapinfo 8 .Sh STANDARDS With the exception of most options, the _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 03:33:34 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 87724681; Fri, 16 Nov 2012 03:33:34 +0000 (UTC) (envelope-from grog@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6DAF28FC14; Fri, 16 Nov 2012 03:33:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAG3XYcV009453; Fri, 16 Nov 2012 03:33:34 GMT (envelope-from grog@svn.freebsd.org) Received: (from grog@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAG3XYDp009451; Fri, 16 Nov 2012 03:33:34 GMT (envelope-from grog@svn.freebsd.org) Message-Id: <201211160333.qAG3XYDp009451@svn.freebsd.org> From: Greg Lehey Date: Fri, 16 Nov 2012 03:33:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243129 - head/bin/df X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 03:33:34 -0000 Author: grog Date: Fri Nov 16 03:33:34 2012 New Revision: 243129 URL: http://svnweb.freebsd.org/changeset/base/243129 Log: Update man pages and clarify a number of options. Rework block count calculations to work correctly with small "block" sizes. MFC after: 14 days Modified: head/bin/df/df.1 head/bin/df/df.c Modified: head/bin/df/df.1 ============================================================================== --- head/bin/df/df.1 Fri Nov 16 03:08:23 2012 (r243128) +++ head/bin/df/df.1 Fri Nov 16 03:33:34 2012 (r243129) @@ -29,7 +29,7 @@ .\" @(#)df.1 8.3 (Berkeley) 5/8/95 .\" $FreeBSD$ .\" -.Dd March 3, 2012 +.Dd November 16, 2012 .Dt DF 1 .Os .Sh NAME @@ -50,7 +50,8 @@ displays statistics about the amount of or on the file system of which .Ar file is a part. -Values are displayed in 512-byte per block counts. +By default block counts are displayed with an assumed block size of +512 bytes. If neither a file or a file system operand is specified, statistics for all mounted file systems are displayed (subject to the @@ -65,46 +66,54 @@ Show all mount points, including those t flag. This is implied for file systems specified on the command line. .It Fl b -Use 512-byte blocks rather than the default. -This overrides the +Explicitly use 512 byte blocks, overriding any .Ev BLOCKSIZE specification from the environment. +This is the same as the +.Fl P +option. +The +.Fl k +option overrides this option. .It Fl c Display a grand total. .It Fl g -Use 1073741824-byte (1-Gbyte) blocks rather than the default. -This overrides the +Use 1073741824 byte (1 Gibibyte) blocks rather than the default. +This overrides any .Ev BLOCKSIZE specification from the environment. .It Fl H .Dq Human-readable output. -Use unit suffixes: Byte, Kilobyte, Megabyte, -Gigabyte, Terabyte and Petabyte in order to reduce the number of -digits to four or fewer using base 10 for sizes. +Use unit suffixes: Byte, Kibibyte, Mebibyte, Gibibyte, Tebibyte and +Pebibyte (based on powers of 1024) in order to reduce the number of +digits to four or fewer. .It Fl h .Dq Human-readable output. Use unit suffixes: Byte, Kilobyte, Megabyte, -Gigabyte, Terabyte and Petabyte in order to reduce the number of -digits to four or fewer using base 2 for sizes. -Inodes statistics, if enabled with -.Fl i , -are always printed in base 10. +Gigabyte, Terabyte and Petabyte (based on powers of 1000) in order to +reduce the number of +digits to four or fewer. .It Fl i -Include statistics on the number of free inodes. +Include statistics on the number of free and used inodes. +In conjunction with the +.Fl h +or +.Fl H +options, the number of inodes is scaled by powers of 1000. .It Fl k -Use 1024-byte (1-Kbyte) blocks rather than the default. +Use 1024 byte (1 Kibibyte) blocks rather than the default. This overrides the -.Ev BLOCKSIZE -specification from the environment and the .Fl P -option. +option and any +.Ev BLOCKSIZE +specification from the environment. .It Fl l Only display information about locally-mounted file systems. .It Fl m -Use 1048576-byte (1-Mbyte) blocks rather than the default. -This overrides the +Use 1048576 byte (1 Mebibyte) blocks rather than the default. +This overrides any .Ev BLOCKSIZE specification from the environment. .It Fl n @@ -117,10 +126,12 @@ When this option is specified, will not request new statistics from the file systems, but will respond with the possibly stale statistics that were previously obtained. .It Fl P -Use POSIX compliant output of 512-byte blocks rather than the default. -This overrides the +Explicitly use 512 byte blocks, overriding any .Ev BLOCKSIZE specification from the environment. +This is the same as the +.Fl b +option. The .Fl k option overrides this option. @@ -160,9 +171,18 @@ option has no effect. .Sh ENVIRONMENT .Bl -tag -width BLOCKSIZE .It Ev BLOCKSIZE -If the environment variable -.Ev BLOCKSIZE -is set, the block counts will be displayed in units of that size block. +Specifies the units in which to report block counts. +This uses +.Xr getbsize 3 , +which allows units of bytes or numbers scaled with the letters +.Em k +(for multiples of 1024 bytes), +.Em m +(for multiples of 1048576 bytes) or +.Em g +(for gibibytes). +The allowed range is 512 bytes to 1 GB. +If the value is outside, it will be set to the appropriate limit. .El .Sh SEE ALSO .Xr lsvfs 1 , @@ -170,13 +190,12 @@ is set, the block counts will be display .Xr fstatfs 2 , .Xr getfsstat 2 , .Xr statfs 2 , +.Xr getbsize 3 , .Xr getmntinfo 3 , .Xr localeconv 3 , .Xr fstab 5 , .Xr mount 8 , -.Xr pstat 8 , -.Xr quot 8 , -.Xr swapinfo 8 +.Xr quot 8 . .Sh STANDARDS With the exception of most options, the @@ -200,3 +219,13 @@ flag is ignored if a file or file system Also, if a mount point is not accessible by the user, it is possible that the file system information could be stale. +.Pp +The +.Fl b +and +.Fl P +options are identical. +The former comes from the BSD tradition, and the latter is required +for +.St -p1003.1-2004 +conformity. Modified: head/bin/df/df.c ============================================================================== --- head/bin/df/df.c Fri Nov 16 03:08:23 2012 (r243128) +++ head/bin/df/df.c Fri Nov 16 03:33:34 2012 (r243129) @@ -393,16 +393,11 @@ prthumanvalinode(int64_t bytes) /* * Convert statfs returned file system size into BLOCKSIZE units. - * Attempts to avoid overflow for large file systems. */ static intmax_t fsbtoblk(int64_t num, uint64_t fsbs, u_long bs) { - - if (fsbs != 0 && fsbs < bs) - return (num / (intmax_t)(bs / fsbs)); - else - return (num * (intmax_t)(fsbs / bs)); + return (num * (intmax_t) fsbs / bs); } /* @@ -453,6 +448,12 @@ prtstat(struct statfs *sfsp, struct maxw } (void)printf(" Mounted on\n"); } + /* Check for 0 block size. Can this happen? */ + if (sfsp->f_bsize == 0) { + warnx ("File system %s does not have a block size, assuming 512.", + sfsp->f_mntonname); + sfsp->f_bsize = 512; + } (void)printf("%-*s", mwp->mntfrom, sfsp->f_mntfromname); if (Tflag) (void)printf(" %-*s", mwp->fstype, sfsp->f_fstypename); From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 04:25:36 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F007AD02; Fri, 16 Nov 2012 04:25:35 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CE5538FC08; Fri, 16 Nov 2012 04:25:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAG4PZuv016576; Fri, 16 Nov 2012 04:25:35 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAG4PZ8I016575; Fri, 16 Nov 2012 04:25:35 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211160425.qAG4PZ8I016575@svn.freebsd.org> From: Eitan Adler Date: Fri, 16 Nov 2012 04:25:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243130 - head/etc/root X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 04:25:36 -0000 Author: eadler Date: Fri Nov 16 04:25:35 2012 New Revision: 243130 URL: http://svnweb.freebsd.org/changeset/base/243130 Log: dot.login is supposed to be for bourne shell, not csh Pointyhat to: me Approved by: cperciva (implicit) Modified: head/etc/root/dot.login Modified: head/etc/root/dot.login ============================================================================== --- head/etc/root/dot.login Fri Nov 16 03:33:34 2012 (r243129) +++ head/etc/root/dot.login Fri Nov 16 04:25:35 2012 (r243130) @@ -6,4 +6,4 @@ # # Uncomment to display a random cookie each login: -# if ( -x /usr/games/fortune ) /usr/games/fortune -s +# [ -x /usr/games/fortune ] && /usr/games/fortune -s From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 04:29:02 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 40984EA0 for ; Fri, 16 Nov 2012 04:29:02 +0000 (UTC) (envelope-from postmaster@mailpod.hostingplatform.com) Received: from atl4mhob12.myregisteredsite.com (atl4mhob12.myregisteredsite.com [209.17.115.50]) by mx1.freebsd.org (Postfix) with ESMTP id E56D78FC0C for ; Fri, 16 Nov 2012 04:29:01 +0000 (UTC) Received: from mailpod1.hostingplatform.com (mailpod1.networksolutionsemail.com [206.188.198.65]) by atl4mhob12.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAG4T0Ea007703 for ; Thu, 15 Nov 2012 23:29:00 -0500 Received: (qmail 26174 invoked by uid 0); 16 Nov 2012 04:28:50 -0000 Received: (qmail 9179 invoked by uid 0); 15 Nov 2012 22:31:40 -0000 Received: from unknown (HELO atl4mhib42.myregisteredsite.com) (209) by 0 with SMTP; 15 Nov 2012 22:31:40 -0000 Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by atl4mhib42.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAFMVdF6004423 for ; Thu, 15 Nov 2012 17:31:39 -0500 Received: from hub.freebsd.org (hub.FreeBSD.org [8.8.178.136]) by mx2.freebsd.org (Postfix) with ESMTP id 5341E3B6836; Thu, 15 Nov 2012 22:31:34 +0000 (UTC) Received: from hub.freebsd.org (hub.freebsd.org [8.8.178.136]) by hub.freebsd.org (Postfix) with ESMTP id F1DAB77D; Thu, 15 Nov 2012 22:31:34 +0000 (UTC) (envelope-from owner-svn-src-all@freebsd.org) Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C47A6624; Thu, 15 Nov 2012 22:31:23 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8B3B88FC14; Thu, 15 Nov 2012 22:31:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFMVN71067299; Thu, 15 Nov 2012 22:31:23 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFMVNd2067298; Thu, 15 Nov 2012 22:31:23 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <201211152231.qAFMVNd2067298@svn.freebsd.org> From: Olivier Houchard Date: Thu, 15 Nov 2012 22:31:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243107 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: owner-svn-src-all@freebsd.org Sender: owner-svn-src-all@freebsd.org X-SpamScore: 0 X-MailHub-Apparently-To: mjm@michaelmeltzer.com X-MailHub-Forwarded: Yes X-BeenThere: svn-src-head@freebsd.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 04:29:02 -0000 Author: cognet Date: Thu Nov 15 22:31:23 2012 New Revision: 243107 URL: http://svnweb.freebsd.org/changeset/base/243107 Log: Use the "inner shareable" variations of flush/invalidate functions for SMP. Submitted by: Giovanni Trematerra Modified: head/sys/arm/arm/cpufunc_asm_armv7.S Modified: head/sys/arm/arm/cpufunc_asm_armv7.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_armv7.S Thu Nov 15 22:05:18 2012 (r243106) +++ head/sys/arm/arm/cpufunc_asm_armv7.S Thu Nov 15 22:31:23 2012 (r243107) @@ -70,7 +70,11 @@ ENTRY(armv7_setttb) orr r0, r0, #PT_ATTR mcr p15, 0, r0, c2, c0, 0 /* Translation Table Base Register 0 (TTBR0) */ +#ifdef SMP + mcr p15, 0, r0, c8, c3, 0 /* invalidate I+D TLBs Inner Shareable*/ +#else mcr p15, 0, r0, c8, c7, 0 /* invalidate I+D TLBs */ +#endif dsb isb RET @@ -78,11 +82,12 @@ ENTRY(armv7_setttb) ENTRY(armv7_tlb_flushID) dsb #ifdef SMP - mcr p15, 0, r0, c8, c3, 0 + mcr p15, 0, r0, c8, c3, 0 /* flush I+D tlb */ + mcr p15, 0, r0, c7, c1, 6 /* flush BTB */ #else mcr p15, 0, r0, c8, c7, 0 /* flush I+D tlb */ -#endif mcr p15, 0, r0, c7, c5, 6 /* flush BTB */ +#endif dsb isb mov pc, lr @@ -91,11 +96,12 @@ ENTRY(armv7_tlb_flushID_SE) ldr r1, .Lpage_mask bic r0, r0, r1 #ifdef SMP - mcr p15, 0, r0, c8, c3, 1 /* flush D tlb single entry */ + mcr p15, 0, r0, c8, c3, 1 /* flush D tlb single entry Inner Shareable*/ + mcr p15, 0, r0, c7, c1, 6 /* flush BTB Inner Shareable */ #else mcr p15, 0, r0, c8, c7, 1 /* flush D tlb single entry */ -#endif mcr p15, 0, r0, c7, c5, 6 /* flush BTB */ +#endif dsb isb mov pc, lr @@ -155,7 +161,11 @@ Finished: ENTRY(armv7_idcache_wbinv_all) stmdb sp!, {lr} bl armv7_dcache_wbinv_all +#ifdef SMP + mcr p15, 0, r0, c7, c1, 0 /* Invalidate all I caches to PoU (ICIALLUIS) */ +#else mcr p15, 0, r0, c7, c5, 0 /* Invalidate all I caches to PoU (ICIALLU) */ +#endif dsb isb ldmia sp!, {lr} @@ -251,7 +261,11 @@ ENTRY(armv7_context_switch) orr r0, r0, #PT_ATTR mcr p15, 0, r0, c2, c0, 0 /* set the new TTB */ +#ifdef SMP + mcr p15, 0, r0, c8, c3, 0 /* and flush the I+D tlbs Inner Sharable */ +#else mcr p15, 0, r0, c8, c7, 0 /* and flush the I+D tlbs */ +#endif dsb isb RET _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 05:14:23 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A4D41361 for ; Fri, 16 Nov 2012 05:14:23 +0000 (UTC) (envelope-from lwang998@gmail.com) Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by mx1.freebsd.org (Postfix) with ESMTP id 779AA8FC08 for ; Fri, 16 Nov 2012 05:14:23 +0000 (UTC) Received: by mail-pa0-f54.google.com with SMTP id kp6so1720631pab.13 for ; Thu, 15 Nov 2012 21:14:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=SItoFU/Hk0YtMnfNKB+2OJWZ0cepHESdRPGfCgyvS1M=; b=JShgv18AHMvVLxBixZwVE50qFDQ2pyIsXTWjMpiJxTvIrq7orYjmPDOCGQntTdq0Lu D8HHlxG8woB6XGgbrcw8al8kq0QCpnpPit/FQYmzTro8hkbIscasfBYqRFOz/Se680RJ hmjpvckM6Rid+AzN+fN7lYM1Mm7kcyUEUQvw7Lysvuv4+EqQqcSUPq6lOBdk6BArd7pJ olg+zDircbM27pPgI7nndvGL7DHdGlXB5rh+1gVlHvU2NQhLySP4fsFQoo62aB96pYAB OYve7aofRN8ACejKkWyLMjteI7XMLlEy4/r4fuDXwgTnoJcJF3hbqswRhLFAWayh0R9j eEJQ== MIME-Version: 1.0 Received: by 10.68.137.131 with SMTP id qi3mr1393219pbb.114.1353042863226; Thu, 15 Nov 2012 21:14:23 -0800 (PST) Sender: lwang998@gmail.com Received: by 10.66.7.72 with HTTP; Thu, 15 Nov 2012 21:14:22 -0800 (PST) Date: Thu, 15 Nov 2012 21:14:22 -0800 X-Google-Sender-Auth: l-R3T3hcCaq6i_pkqrfQ17MQots Message-ID: Subject: From: "lingwang@altaitechnologies.com" To: boxiong@altaitechnologies.com, riswan@altaitechnologies.com, svn-src-head@freebsd.org, tridge@samba.org, philhuang@altaitechnologies.com Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 05:14:23 -0000 http://www.arqrodriguezz.com/wp-content/plugins/akismet/google235.html From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 05:49:56 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C155C685; Fri, 16 Nov 2012 05:49:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A777C8FC13; Fri, 16 Nov 2012 05:49:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAG5nu81027280; Fri, 16 Nov 2012 05:49:56 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAG5nuWd027279; Fri, 16 Nov 2012 05:49:56 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201211160549.qAG5nuWd027279@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 16 Nov 2012 05:49:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243131 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 05:49:56 -0000 Author: kib Date: Fri Nov 16 05:49:56 2012 New Revision: 243131 URL: http://svnweb.freebsd.org/changeset/base/243131 Log: Explicitely state that M_USE_RESERVE requires M_NOWAIT, using assertion. Reviewed by: alc MFC after: 2 weeks Modified: head/sys/vm/vm_page.h Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Fri Nov 16 04:25:35 2012 (r243130) +++ head/sys/vm/vm_page.h Fri Nov 16 05:49:56 2012 (r243131) @@ -353,6 +353,9 @@ malloc2vm_flags(int malloc_flags) { int pflags; + KASSERT((malloc_flags & M_USE_RESERVE) == 0 || + (malloc_flags & M_NOWAIT) != 0, + ("M_USE_RESERVE requires M_NOWAIT")); pflags = (malloc_flags & M_USE_RESERVE) != 0 ? VM_ALLOC_INTERRUPT : VM_ALLOC_SYSTEM; if ((malloc_flags & M_ZERO) != 0) From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 05:55:57 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 69473810; Fri, 16 Nov 2012 05:55:57 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4EF468FC08; Fri, 16 Nov 2012 05:55:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAG5tvbN028040; Fri, 16 Nov 2012 05:55:57 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAG5tuYv028033; Fri, 16 Nov 2012 05:55:56 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201211160555.qAG5tuYv028033@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 16 Nov 2012 05:55:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243132 - in head/sys: amd64/amd64 arm/arm sparc64/sparc64 vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 05:55:57 -0000 Author: kib Date: Fri Nov 16 05:55:56 2012 New Revision: 243132 URL: http://svnweb.freebsd.org/changeset/base/243132 Log: Move the declaration of vm_phys_paddr_to_vm_page() from vm/vm_page.h to vm/vm_phys.h, where it belongs. Requested and reviewed by: alc MFC after: 2 weeks Modified: head/sys/amd64/amd64/minidump_machdep.c head/sys/arm/arm/pmap.c head/sys/sparc64/sparc64/pmap.c head/sys/vm/device_pager.c head/sys/vm/sg_pager.c head/sys/vm/vm_page.h head/sys/vm/vm_phys.h Modified: head/sys/amd64/amd64/minidump_machdep.c ============================================================================== --- head/sys/amd64/amd64/minidump_machdep.c Fri Nov 16 05:49:56 2012 (r243131) +++ head/sys/amd64/amd64/minidump_machdep.c Fri Nov 16 05:55:56 2012 (r243132) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/arm/arm/pmap.c ============================================================================== --- head/sys/arm/arm/pmap.c Fri Nov 16 05:49:56 2012 (r243131) +++ head/sys/arm/arm/pmap.c Fri Nov 16 05:55:56 2012 (r243132) @@ -165,6 +165,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/sparc64/sparc64/pmap.c ============================================================================== --- head/sys/sparc64/sparc64/pmap.c Fri Nov 16 05:49:56 2012 (r243131) +++ head/sys/sparc64/sparc64/pmap.c Fri Nov 16 05:55:56 2012 (r243132) @@ -83,6 +83,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/vm/device_pager.c ============================================================================== --- head/sys/vm/device_pager.c Fri Nov 16 05:49:56 2012 (r243131) +++ head/sys/vm/device_pager.c Fri Nov 16 05:55:56 2012 (r243132) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include static void dev_pager_init(void); Modified: head/sys/vm/sg_pager.c ============================================================================== --- head/sys/vm/sg_pager.c Fri Nov 16 05:49:56 2012 (r243131) +++ head/sys/vm/sg_pager.c Fri Nov 16 05:55:56 2012 (r243132) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include static vm_object_t sg_pager_alloc(void *, vm_ooffset_t, vm_prot_t, Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Fri Nov 16 05:49:56 2012 (r243131) +++ head/sys/vm/vm_page.h Fri Nov 16 05:55:56 2012 (r243132) @@ -324,8 +324,6 @@ extern long first_page; /* first physi #define VM_PAGE_TO_PHYS(entry) ((entry)->phys_addr) -vm_page_t vm_phys_paddr_to_vm_page(vm_paddr_t pa); - vm_page_t PHYS_TO_VM_PAGE(vm_paddr_t pa); /* page allocation classes: */ Modified: head/sys/vm/vm_phys.h ============================================================================== --- head/sys/vm/vm_phys.h Fri Nov 16 05:49:56 2012 (r243131) +++ head/sys/vm/vm_phys.h Fri Nov 16 05:55:56 2012 (r243132) @@ -64,6 +64,7 @@ vm_page_t vm_phys_fictitious_to_vm_page( void vm_phys_free_contig(vm_page_t m, u_long npages); void vm_phys_free_pages(vm_page_t m, int order); void vm_phys_init(void); +vm_page_t vm_phys_paddr_to_vm_page(vm_paddr_t pa); void vm_phys_set_pool(int pool, vm_page_t m, int order); boolean_t vm_phys_unfree_page(vm_page_t m); boolean_t vm_phys_zero_pages_idle(void); From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 06:15:34 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 394DDB21; Fri, 16 Nov 2012 06:15:34 +0000 (UTC) (envelope-from jbeich@tormail.org) Received: from outgoing.tormail.org (outgoing.tormail.org [82.221.96.22]) by mx1.freebsd.org (Postfix) with ESMTP id C94DB8FC08; Fri, 16 Nov 2012 06:15:33 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=internal.tormail.org) by outgoing.tormail.org with esmtp (Exim 4.72) (envelope-from ) id 1TZFD8-0003rf-TR; Fri, 16 Nov 2012 09:15:31 +0300 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tormail.org; s=tm; h=Message-Id:X-TorMail-User:Content-Type:MIME-Version:References:Date:In-Reply-To:Subject:Cc:To:From; bh=9DgsnFsEvj9AIzXvNZcytScU450OQqJiS5xsexw4Mts=; b=C96cBXdhqowSmsYXSO/JzqcU53LE14WyXw8Mkfv8PT04uqA6QTc2xYbd8dMX89xRzuD7/4WUDuVNlWg3vOiyVwBt0kGyWt5nqciko83DB5yOysA0XiGeBW+/LRqEn+TS7nFMO09UvXnithNkDi9wWmXPaurvARrwlvLEwvYh/xk=; Received: from jbeich by internal.tormail.org with local (Exim 4.63) (envelope-from ) id 1TZFBU-0005S6-1s; Fri, 16 Nov 2012 06:13:55 +0000 From: Jan Beich To: Eitan Adler Subject: Re: svn commit: r243130 - head/etc/root In-Reply-To: <201211160425.qAG4PZ8I016575__14550.9199741811$1353039960$gmane$org@svn.freebsd.org> (Eitan Adler's message of "Fri, 16 Nov 2012 04:25:35 +0000 (UTC)") Date: Fri, 16 Nov 2012 02:04:59 -0400 References: <201211160425.qAG4PZ8I016575__14550.9199741811$1353039960$gmane$org@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain X-TorMail-User: jbeich Message-Id: <1TZFBU-0005S6-1s@internal.tormail.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 06:15:34 -0000 Eitan Adler writes: > Author: eadler > Date: Fri Nov 16 04:25:35 2012 > New Revision: 243130 > URL: http://svnweb.freebsd.org/changeset/base/243130 > > Log: > dot.login is supposed to be for bourne shell, not csh Can you explain better or point to the reference? sh(1) mentions ~/.profile while csh(1) mentions ~/.login for commands executed once per login. Besides, dot.login is not installed WITHOUT_TCSH. # /usr/src/etc/Makefile .if ${MK_TCSH} != "no" cd ${.CURDIR}/root; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ dot.cshrc ${DESTDIR}/root/.cshrc; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ dot.login ${DESTDIR}/root/.login; \ rm -f ${DESTDIR}/.cshrc; \ ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc .endif > > Pointyhat to: me > Approved by: cperciva (implicit) > > Modified: > head/etc/root/dot.login > > Modified: head/etc/root/dot.login > ============================================================================== > --- head/etc/root/dot.login Fri Nov 16 03:33:34 2012 (r243129) > +++ head/etc/root/dot.login Fri Nov 16 04:25:35 2012 (r243130) > @@ -6,4 +6,4 @@ > # > > # Uncomment to display a random cookie each login: > -# if ( -x /usr/games/fortune ) /usr/games/fortune -s > +# [ -x /usr/games/fortune ] && /usr/games/fortune -s From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 06:22:15 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6846ECAC; Fri, 16 Nov 2012 06:22:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3072B8FC14; Fri, 16 Nov 2012 06:22:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAG6MF9p031678; Fri, 16 Nov 2012 06:22:15 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAG6MF0B031676; Fri, 16 Nov 2012 06:22:15 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201211160622.qAG6MF0B031676@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 16 Nov 2012 06:22:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243133 - in head/sys: compat/freebsd32 kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 06:22:15 -0000 Author: kib Date: Fri Nov 16 06:22:14 2012 New Revision: 243133 URL: http://svnweb.freebsd.org/changeset/base/243133 Log: Style fixes for r242958. Reported and reviewed by: bde MFC after: 28 days Modified: head/sys/compat/freebsd32/freebsd32_misc.c head/sys/kern/kern_exit.c Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Fri Nov 16 05:55:56 2012 (r243132) +++ head/sys/compat/freebsd32/freebsd32_misc.c Fri Nov 16 06:22:14 2012 (r243133) @@ -193,13 +193,11 @@ freebsd32_wait6(struct thread *td, struc wrup = &wru; else wrup = NULL; - if (uap->info != NULL) { sip = &si; bzero(sip, sizeof(*sip)); } else sip = NULL; - error = kern_wait6(td, uap->idtype, uap->id, &status, uap->options, wrup, sip); if (error != 0) Modified: head/sys/kern/kern_exit.c ============================================================================== --- head/sys/kern/kern_exit.c Fri Nov 16 05:55:56 2012 (r243132) +++ head/sys/kern/kern_exit.c Fri Nov 16 06:22:14 2012 (r243133) @@ -710,10 +710,10 @@ int sys_wait6(struct thread *td, struct wait6_args *uap) { struct __wrusage wru, *wrup; - siginfo_t si, *sip; - int error, status; + siginfo_t si, *sip; idtype_t idtype; id_t id; + int error, status; idtype = uap->idtype; id = uap->id; @@ -932,7 +932,6 @@ proc_to_reap(struct thread *td, struct p default: PROC_UNLOCK(p); return (0); - break; } if (p_canwait(td, p)) { @@ -962,7 +961,7 @@ proc_to_reap(struct thread *td, struct p PROC_SLOCK(p); if (siginfo != NULL) { - bzero (siginfo, sizeof (*siginfo)); + bzero(siginfo, sizeof(*siginfo)); siginfo->si_errno = 0; /* @@ -1046,8 +1045,8 @@ kern_wait(struct thread *td, pid_t pid, else wrup = NULL; /* - * For backward compatibility we implicitly add flags WEXITED - * and WTRAPPED here. + * For backward compatibility we implicitly add flags WEXITED + * and WTRAPPED here. */ options |= WEXITED | WTRAPPED; ret = kern_wait6(td, idtype, id, status, options, wrup, NULL); @@ -1069,8 +1068,7 @@ kern_wait6(struct thread *td, idtype_t i q = td->td_proc; - if ((pid_t)id == WAIT_MYPGRP && - (idtype == P_PID || idtype == P_PGID)) { + if ((pid_t)id == WAIT_MYPGRP && (idtype == P_PID || idtype == P_PGID)) { id = (id_t)q->p_pgid; idtype = P_PGID; } From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 06:25:21 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5DB47E27; Fri, 16 Nov 2012 06:25:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4278F8FC0C; Fri, 16 Nov 2012 06:25:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAG6PLXj032063; Fri, 16 Nov 2012 06:25:21 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAG6PLd2032062; Fri, 16 Nov 2012 06:25:21 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201211160625.qAG6PLd2032062@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 16 Nov 2012 06:25:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243134 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 06:25:21 -0000 Author: kib Date: Fri Nov 16 06:25:20 2012 New Revision: 243134 URL: http://svnweb.freebsd.org/changeset/base/243134 Log: Alphabetically reorder the forward-declarations of the structures. Add the declaration for enum idtype, to be used later. Reported and reviewed by: bde MFC after: 28 days Modified: head/sys/sys/syscallsubr.h Modified: head/sys/sys/syscallsubr.h ============================================================================== --- head/sys/sys/syscallsubr.h Fri Nov 16 06:22:14 2012 (r243133) +++ head/sys/sys/syscallsubr.h Fri Nov 16 06:25:20 2012 (r243134) @@ -35,25 +35,26 @@ #include struct file; +enum idtype; struct itimerval; struct image_args; struct jail; +struct kevent; +struct kevent_copyops; +struct kld_file_stat; +struct ksiginfo; struct mbuf; struct msghdr; struct msqid_ds; +struct ogetdirentries_args; struct rlimit; struct rusage; -struct __wrusage; union semun; +struct sendfile_args; struct sockaddr; struct stat; -struct kevent; -struct kevent_copyops; -struct kld_file_stat; -struct ksiginfo; -struct sendfile_args; struct thr_param; -struct ogetdirentries_args; +struct __wrusage; int kern___getcwd(struct thread *td, u_char *buf, enum uio_seg bufseg, u_int buflen); From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 06:29:52 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D8433FA5; Fri, 16 Nov 2012 06:29:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B18768FC08; Fri, 16 Nov 2012 06:29:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAG6TqPO032576; Fri, 16 Nov 2012 06:29:52 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAG6Tqq1032573; Fri, 16 Nov 2012 06:29:52 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201211160629.qAG6Tqq1032573@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 16 Nov 2012 06:29:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243135 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 06:29:52 -0000 Author: kib Date: Fri Nov 16 06:29:52 2012 New Revision: 243135 URL: http://svnweb.freebsd.org/changeset/base/243135 Log: Move the definition of the idtype_t from sys/types.h to sys/wait.h. Fix the bug, use #if __BSD_VISIBLE instead of #if defined(__BSD_VISIBLE), since __BSD_VISIBLE is always defined. Reformat the comments from the Solaris style to KNF. Reported and reviewed by: bde MFC after: 28 days Modified: head/sys/sys/syscallsubr.h head/sys/sys/types.h head/sys/sys/wait.h Modified: head/sys/sys/syscallsubr.h ============================================================================== --- head/sys/sys/syscallsubr.h Fri Nov 16 06:25:20 2012 (r243134) +++ head/sys/sys/syscallsubr.h Fri Nov 16 06:29:52 2012 (r243135) @@ -236,7 +236,7 @@ int kern_utimesat(struct thread *td, int enum uio_seg pathseg, struct timeval *tptr, enum uio_seg tptrseg); int kern_wait(struct thread *td, pid_t pid, int *status, int options, struct rusage *rup); -int kern_wait6(struct thread *td, idtype_t idtype, id_t id, int *status, +int kern_wait6(struct thread *td, enum idtype idtype, id_t id, int *status, int options, struct __wrusage *wrup, siginfo_t *sip); int kern_writev(struct thread *td, int fd, struct uio *auio); int kern_socketpair(struct thread *td, int domain, int type, int protocol, Modified: head/sys/sys/types.h ============================================================================== --- head/sys/sys/types.h Fri Nov 16 06:25:20 2012 (r243134) +++ head/sys/sys/types.h Fri Nov 16 06:29:52 2012 (r243135) @@ -141,46 +141,6 @@ typedef __id_t id_t; /* can hold a uid #define _ID_T_DECLARED #endif -#ifndef _IDTYPE_T_DECLARED - -typedef enum -#if defined(__BSD_VISIBLE) - idtype /* pollutes XPG4.2 namespace */ -#endif - { - /* - * These names were mostly lifted from Solaris source code and - * still use Solaris style naming to avoid breaking any - * OpenSolaris code which has been ported to FreeBSD. There - * is no clear FreeBSD counterpart for all of the names, but - * some have a clear correspondence to FreeBSD entities. - */ - P_PID, /* A process identifier. */ - P_PPID, /* A parent process identifier. */ - P_PGID, /* A process group identifier. */ - P_SID, /* A session identifier. */ - P_CID, /* A scheduling class identifier. */ - P_UID, /* A user identifier. */ - P_GID, /* A group identifier. */ - P_ALL, /* All processes. */ - P_LWPID, /* An LWP identifier. */ - P_TASKID, /* A task identifier. */ - P_PROJID, /* A project identifier. */ - P_POOLID, /* A pool identifier. */ - P_JAILID, /* A zone identifier. */ - P_CTID, /* A (process) contract identifier. */ - P_CPUID, /* CPU identifier. */ - P_PSETID /* Processor set identifier */ -} idtype_t; /* The type of id_t we are using. */ - -#if defined(__BSD_VISIBLE) -#define P_ZONEID P_JAILID -#endif - -#define _IDTYPE_T_DECLARED -#endif - - #ifndef _INO_T_DECLARED typedef __ino_t ino_t; /* inode number */ #define _INO_T_DECLARED Modified: head/sys/sys/wait.h ============================================================================== --- head/sys/sys/wait.h Fri Nov 16 06:25:20 2012 (r243134) +++ head/sys/sys/wait.h Fri Nov 16 06:29:52 2012 (r243135) @@ -88,6 +88,46 @@ #define WLINUXCLONE 0x80000000 /* Wait for kthread spawned from linux_clone. */ #endif +#ifndef _IDTYPE_T_DECLARED +typedef enum +#if __BSD_VISIBLE + idtype /* pollutes XPG4.2 namespace */ +#endif + { + /* + * These names were mostly lifted from Solaris source code and + * still use Solaris style naming to avoid breaking any + * OpenSolaris code which has been ported to FreeBSD. There + * is no clear FreeBSD counterpart for all of the names, but + * some have a clear correspondence to FreeBSD entities. + * + * The numerical values are kept synchronized with the Solaris + * values. + */ + P_PID, /* A process identifier. */ + P_PPID, /* A parent process identifier. */ + P_PGID, /* A process group identifier. */ + P_SID, /* A session identifier. */ + P_CID, /* A scheduling class identifier. */ + P_UID, /* A user identifier. */ + P_GID, /* A group identifier. */ + P_ALL, /* All processes. */ + P_LWPID, /* An LWP identifier. */ + P_TASKID, /* A task identifier. */ + P_PROJID, /* A project identifier. */ + P_POOLID, /* A pool identifier. */ + P_JAILID, /* A zone identifier. */ + P_CTID, /* A (process) contract identifier. */ + P_CPUID, /* CPU identifier. */ + P_PSETID /* Processor set identifier. */ +} idtype_t; /* The type of id_t we are using. */ + +#if __BSD_VISIBLE +#define P_ZONEID P_JAILID +#endif +#define _IDTYPE_T_DECLARED +#endif + /* * Tokens for special values of the "pid" parameter to wait4. * Extended struct __wrusage to collect rusage for both the target From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 06:32:39 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 67FCE226; Fri, 16 Nov 2012 06:32:39 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4DE9E8FC08; Fri, 16 Nov 2012 06:32:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAG6Wdhf032965; Fri, 16 Nov 2012 06:32:39 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAG6WdAo032964; Fri, 16 Nov 2012 06:32:39 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201211160632.qAG6WdAo032964@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 16 Nov 2012 06:32:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243136 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 06:32:39 -0000 Author: kib Date: Fri Nov 16 06:32:38 2012 New Revision: 243136 URL: http://svnweb.freebsd.org/changeset/base/243136 Log: Restore the proper handling of the pid 0 for waitpid(2). Fix the style around. Reported and reviewed by: bde (previous version) MFC after: 28 days Modified: head/sys/kern/kern_exit.c Modified: head/sys/kern/kern_exit.c ============================================================================== --- head/sys/kern/kern_exit.c Fri Nov 16 06:29:52 2012 (r243135) +++ head/sys/kern/kern_exit.c Fri Nov 16 06:32:38 2012 (r243136) @@ -1024,6 +1024,7 @@ kern_wait(struct thread *td, pid_t pid, struct rusage *rusage) { struct __wrusage wru, *wrup; + struct proc *q; idtype_t idtype; id_t id; int ret; @@ -1031,12 +1032,16 @@ kern_wait(struct thread *td, pid_t pid, if (pid == WAIT_ANY) { idtype = P_ALL; id = 0; - } - else if (pid <= 0) { + } else if (pid == WAIT_MYPGRP) { + idtype = P_PGID; + q = td->td_proc; + PROC_LOCK(q); + id = (id_t)q->p_pgid; + PROC_UNLOCK(q); + } else if (pid < 0) { idtype = P_PGID; id = (id_t)-pid; - } - else { + } else { idtype = P_PID; id = (id_t)pid; } From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 06:40:41 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 11F684BB; Fri, 16 Nov 2012 06:40:41 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id EB1318FC0C; Fri, 16 Nov 2012 06:40:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAG6ee5u033959; Fri, 16 Nov 2012 06:40:40 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAG6eeW1033958; Fri, 16 Nov 2012 06:40:40 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201211160640.qAG6eeW1033958@svn.freebsd.org> From: Alan Cox Date: Fri, 16 Nov 2012 06:40:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243137 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 06:40:41 -0000 Author: alc Date: Fri Nov 16 06:40:40 2012 New Revision: 243137 URL: http://svnweb.freebsd.org/changeset/base/243137 Log: M_USE_RESERVE is no longer deprecated. It is once again supported. Reviewed by: kib Modified: head/share/man/man9/malloc.9 Modified: head/share/man/man9/malloc.9 ============================================================================== --- head/share/man/man9/malloc.9 Fri Nov 16 06:32:38 2012 (r243136) +++ head/share/man/man9/malloc.9 Fri Nov 16 06:40:40 2012 (r243137) @@ -29,7 +29,7 @@ .\" $NetBSD: malloc.9,v 1.3 1996/11/11 00:05:11 lukem Exp $ .\" $FreeBSD$ .\" -.Dd January 28, 2012 +.Dd November 15, 2012 .Dt MALLOC 9 .Os .Sh NAME @@ -153,13 +153,12 @@ if .Dv M_WAITOK is specified. .It Dv M_USE_RESERVE -Indicates that the system can dig into its reserve in order to obtain the -requested memory. -This option used to be called -.Dv M_KERNEL -but has been renamed to something more obvious. -This option has been deprecated and is slowly being removed from the kernel, -and so should not be used with any new programming. +Indicates that the system can use its reserve of memory to satisfy the +request. +This option should only be used in combination with +.Dv M_NOWAIT +when an allocation failure cannot be tolerated by the caller without +catastrophic effects on the system. .El .Pp Exactly one of either From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 07:05:58 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 84E6593C; Fri, 16 Nov 2012 07:05:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6880E8FC08; Fri, 16 Nov 2012 07:05:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAG75wUM037309; Fri, 16 Nov 2012 07:05:58 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAG75w87037305; Fri, 16 Nov 2012 07:05:58 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201211160705.qAG75w87037305@svn.freebsd.org> From: Alexander Motin Date: Fri, 16 Nov 2012 07:05:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243138 - head/sys/dev/sound/pcm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 07:05:58 -0000 Author: mav Date: Fri Nov 16 07:05:57 2012 New Revision: 243138 URL: http://svnweb.freebsd.org/changeset/base/243138 Log: For some more completeness add matrixes for 3.1 and 7.0 channel setups. Modified: head/sys/dev/sound/pcm/channel.c head/sys/dev/sound/pcm/feeder_matrix.c head/sys/dev/sound/pcm/matrix.h head/sys/dev/sound/pcm/matrix_map.h Modified: head/sys/dev/sound/pcm/channel.c ============================================================================== --- head/sys/dev/sound/pcm/channel.c Fri Nov 16 06:40:40 2012 (r243137) +++ head/sys/dev/sound/pcm/channel.c Fri Nov 16 07:05:57 2012 (r243138) @@ -1037,12 +1037,14 @@ static const struct { { "2.0", "2", "stereo", SND_CHN_MATRIX_2_0 }, { "2.1", NULL, NULL, SND_CHN_MATRIX_2_1 }, { "3.0", "3", NULL, SND_CHN_MATRIX_3_0 }, + { "3.1", NULL, NULL, SND_CHN_MATRIX_3_1 }, { "4.0", "4", "quad", SND_CHN_MATRIX_4_0 }, { "4.1", NULL, NULL, SND_CHN_MATRIX_4_1 }, { "5.0", "5", NULL, SND_CHN_MATRIX_5_0 }, { "5.1", "6", NULL, SND_CHN_MATRIX_5_1 }, { "6.0", NULL, NULL, SND_CHN_MATRIX_6_0 }, { "6.1", "7", NULL, SND_CHN_MATRIX_6_1 }, + { "7.0", NULL, NULL, SND_CHN_MATRIX_7_0 }, { "7.1", "8", NULL, SND_CHN_MATRIX_7_1 }, { NULL, NULL, NULL, SND_CHN_MATRIX_UNKNOWN } }; Modified: head/sys/dev/sound/pcm/feeder_matrix.c ============================================================================== --- head/sys/dev/sound/pcm/feeder_matrix.c Fri Nov 16 06:40:40 2012 (r243137) +++ head/sys/dev/sound/pcm/feeder_matrix.c Fri Nov 16 07:05:57 2012 (r243138) @@ -86,12 +86,14 @@ static struct pcmchan_matrix feeder_matr [SND_CHN_MATRIX_2_0] = SND_CHN_MATRIX_MAP_2_0, [SND_CHN_MATRIX_2_1] = SND_CHN_MATRIX_MAP_2_1, [SND_CHN_MATRIX_3_0] = SND_CHN_MATRIX_MAP_3_0, + [SND_CHN_MATRIX_3_1] = SND_CHN_MATRIX_MAP_3_1, [SND_CHN_MATRIX_4_0] = SND_CHN_MATRIX_MAP_4_0, [SND_CHN_MATRIX_4_1] = SND_CHN_MATRIX_MAP_4_1, [SND_CHN_MATRIX_5_0] = SND_CHN_MATRIX_MAP_5_0, [SND_CHN_MATRIX_5_1] = SND_CHN_MATRIX_MAP_5_1, [SND_CHN_MATRIX_6_0] = SND_CHN_MATRIX_MAP_6_0, [SND_CHN_MATRIX_6_1] = SND_CHN_MATRIX_MAP_6_1, + [SND_CHN_MATRIX_7_0] = SND_CHN_MATRIX_MAP_7_0, [SND_CHN_MATRIX_7_1] = SND_CHN_MATRIX_MAP_7_1 }; Modified: head/sys/dev/sound/pcm/matrix.h ============================================================================== --- head/sys/dev/sound/pcm/matrix.h Fri Nov 16 06:40:40 2012 (r243137) +++ head/sys/dev/sound/pcm/matrix.h Fri Nov 16 07:05:57 2012 (r243138) @@ -134,29 +134,31 @@ #define SND_CHN_MATRIX_3_0 3 #define SND_CHN_MATRIX_3 SND_CHN_MATRIX_3_0 -/* 4 @ 4.0 Quadraphonic */ -#define SND_CHN_MATRIX_4_0 4 +/* 4 @ 3.1 (lfe), 4.0 (Quadraphonic, DEFAULT) */ +#define SND_CHN_MATRIX_3_1 4 +#define SND_CHN_MATRIX_4_0 5 #define SND_CHN_MATRIX_4 SND_CHN_MATRIX_4_0 /* 5 @ 4.1 (lfe), 5.0 (center, DEFAULT) */ -#define SND_CHN_MATRIX_4_1 5 -#define SND_CHN_MATRIX_5_0 6 +#define SND_CHN_MATRIX_4_1 6 +#define SND_CHN_MATRIX_5_0 7 #define SND_CHN_MATRIX_5 SND_CHN_MATRIX_5_0 /* 6 @ 5.1 (lfe, DEFAULT), 6.0 (rear center) */ -#define SND_CHN_MATRIX_5_1 7 -#define SND_CHN_MATRIX_6_0 8 +#define SND_CHN_MATRIX_5_1 8 +#define SND_CHN_MATRIX_6_0 9 #define SND_CHN_MATRIX_6 SND_CHN_MATRIX_5_1 -/* 7 @ 6.1 (lfe) */ -#define SND_CHN_MATRIX_6_1 9 +/* 7 @ 6.1 (lfe, DEFAULT), 7.0 */ +#define SND_CHN_MATRIX_6_1 10 +#define SND_CHN_MATRIX_7_0 11 #define SND_CHN_MATRIX_7 SND_CHN_MATRIX_6_1 /* 8 @ 7.1 (lfe) */ -#define SND_CHN_MATRIX_7_1 10 +#define SND_CHN_MATRIX_7_1 12 #define SND_CHN_MATRIX_8 SND_CHN_MATRIX_7_1 -#define SND_CHN_MATRIX_MAX 11 +#define SND_CHN_MATRIX_MAX 13 #define SND_CHN_MATRIX_BEGIN SND_CHN_MATRIX_1_0 #define SND_CHN_MATRIX_END SND_CHN_MATRIX_7_1 Modified: head/sys/dev/sound/pcm/matrix_map.h ============================================================================== --- head/sys/dev/sound/pcm/matrix_map.h Fri Nov 16 06:40:40 2012 (r243137) +++ head/sys/dev/sound/pcm/matrix_map.h Fri Nov 16 07:05:57 2012 (r243138) @@ -195,6 +195,49 @@ -1, -1, -1, -1, -1, -1, -1, -1, -1 } \ } +#define SND_CHN_MATRIX_MAP_3_1 { \ + .id = SND_CHN_MATRIX_3_1, \ + .channels = 4, \ + .ext = 1, \ + .map = { \ + /* Left */ \ + [0] = { \ + .type = SND_CHN_T_FL, \ + .members = \ + SND_CHN_T_MASK_FL | SND_CHN_T_MASK_FC | \ + SND_CHN_T_MASK_SL \ + }, \ + /* Right */ \ + [1] = { \ + .type = SND_CHN_T_FR, \ + .members = \ + SND_CHN_T_MASK_FR | SND_CHN_T_MASK_FC | \ + SND_CHN_T_MASK_SR \ + }, \ + /* LFE */ \ + [2] = { \ + .type = SND_CHN_T_LF, \ + .members = SND_CHN_T_MASK_LF \ + }, \ + /* Rear Center */ \ + [3] = { \ + .type = SND_CHN_T_BC, \ + .members = \ + SND_CHN_T_MASK_BL | SND_CHN_T_MASK_BR | \ + SND_CHN_T_MASK_BC | \ + SND_CHN_T_MASK_SL | SND_CHN_T_MASK_SR \ + }, \ + [4] = { \ + .type = SND_CHN_T_MAX, \ + .members = 0 \ + } \ + }, \ + .mask = SND_CHN_T_MASK_FL | SND_CHN_T_MASK_FR | \ + SND_CHN_T_MASK_LF | SND_CHN_T_MASK_BC, \ + .offset = { 0, 1, -1, 2, -1, -1, -1, -1, 3, \ + -1, -1, -1, -1, -1, -1, -1, -1, -1 } \ +} + #define SND_CHN_MATRIX_MAP_4_0 { \ .id = SND_CHN_MATRIX_4_0, \ .channels = 4, \ @@ -504,6 +547,68 @@ -1, -1, -1, -1, -1, -1, -1, -1, -1 } \ } +#define SND_CHN_MATRIX_MAP_7_0 { \ + .id = SND_CHN_MATRIX_7_0, \ + .channels = 7, \ + .ext = 0, \ + .map = { \ + /* Left */ \ + [0] = { \ + .type = SND_CHN_T_FL, \ + .members = \ + SND_CHN_T_MASK_FL | SND_CHN_T_MASK_LF \ + }, \ + /* Right */ \ + [1] = { \ + .type = SND_CHN_T_FR, \ + .members = \ + SND_CHN_T_MASK_FR | SND_CHN_T_MASK_LF \ + }, \ + /* Rear Left */ \ + [2] = { \ + .type = SND_CHN_T_BL, \ + .members = \ + SND_CHN_T_MASK_BL | SND_CHN_T_MASK_BC | \ + SND_CHN_T_MASK_LF \ + }, \ + /* Rear Right */ \ + [3] = { \ + .type = SND_CHN_T_BR, \ + .members = \ + SND_CHN_T_MASK_BR | SND_CHN_T_MASK_BC | \ + SND_CHN_T_MASK_LF \ + }, \ + /* Center */ \ + [4] = { \ + .type = SND_CHN_T_FC, \ + .members = \ + SND_CHN_T_MASK_FC | SND_CHN_T_MASK_LF \ + }, \ + /* Side Left */ \ + [5] = { \ + .type = SND_CHN_T_SL, \ + .members = \ + SND_CHN_T_MASK_SL | SND_CHN_T_MASK_LF \ + }, \ + /* Side Right */ \ + [6] = { \ + .type = SND_CHN_T_SR, \ + .members = \ + SND_CHN_T_MASK_SR | SND_CHN_T_MASK_LF \ + }, \ + [7] = { \ + .type = SND_CHN_T_MAX, \ + .members = 0 \ + } \ + }, \ + .mask = SND_CHN_T_MASK_FL | SND_CHN_T_MASK_FR | \ + SND_CHN_T_MASK_BL | SND_CHN_T_MASK_BR | \ + SND_CHN_T_MASK_FC | \ + SND_CHN_T_MASK_SL | SND_CHN_T_MASK_SR, \ + .offset = { 0, 1, 4, -1, 2, 3, -1, -1, -1, \ + 5, 6, -1, -1, -1, -1, -1, -1, -1 } \ +} + #define SND_CHN_MATRIX_MAP_7_1 { \ .id = SND_CHN_MATRIX_7_1, \ .channels = 8, \ From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 08:25:07 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 247F3EC2; Fri, 16 Nov 2012 08:25:07 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id F3DE08FC08; Fri, 16 Nov 2012 08:25:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAG8P66K047510; Fri, 16 Nov 2012 08:25:06 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAG8P6v6047507; Fri, 16 Nov 2012 08:25:06 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201211160825.qAG8P6v6047507@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 16 Nov 2012 08:25:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243142 - in head/sys: 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 08:25:07 -0000 Author: kib Date: Fri Nov 16 08:25:06 2012 New Revision: 243142 URL: http://svnweb.freebsd.org/changeset/base/243142 Log: In pget(9), if PGET_NOTWEXIT flag is not specified, also search the zombie list for the pid. This allows several kern.proc sysctls to report useful information for zombies. Hold the allproc_lock around all searches instead of relocking it. Remove private pfind_locked() from the new nfs client code. Requested and reviewed by: pjd Tested by: pho MFC after: 3 weeks Modified: head/sys/fs/nfsclient/nfs_clport.c head/sys/kern/kern_proc.c head/sys/sys/proc.h Modified: head/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clport.c Fri Nov 16 07:30:38 2012 (r243141) +++ head/sys/fs/nfsclient/nfs_clport.c Fri Nov 16 08:25:06 2012 (r243142) @@ -1150,31 +1150,6 @@ nfscl_maperr(struct thread *td, int erro } /* - * Locate a process by number; return only "live" processes -- i.e., neither - * zombies nor newly born but incompletely initialized processes. By not - * returning processes in the PRS_NEW state, we allow callers to avoid - * testing for that condition to avoid dereferencing p_ucred, et al. - * Identical to pfind() in kern_proc.c, except it assume the list is - * already locked. - */ -static struct proc * -pfind_locked(pid_t pid) -{ - struct proc *p; - - LIST_FOREACH(p, PIDHASH(pid), p_hash) - if (p->p_pid == pid) { - PROC_LOCK(p); - if (p->p_state == PRS_NEW) { - PROC_UNLOCK(p); - p = NULL; - } - break; - } - return (p); -} - -/* * Check to see if the process for this owner exists. Return 1 if it doesn't * and 0 otherwise. */ Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Fri Nov 16 07:30:38 2012 (r243141) +++ head/sys/kern/kern_proc.c Fri Nov 16 08:25:06 2012 (r243142) @@ -137,6 +137,7 @@ static void proc_dtor(void *mem, int siz static int proc_init(void *mem, int size, int flags); static void proc_fini(void *mem, int size); static void pargs_free(struct pargs *pa); +static struct proc *zpfind_locked(pid_t pid); /* * Other process lists @@ -284,20 +285,13 @@ inferior(p) return (1); } -/* - * Locate a process by number; return only "live" processes -- i.e., neither - * zombies nor newly born but incompletely initialized processes. By not - * returning processes in the PRS_NEW state, we allow callers to avoid - * testing for that condition to avoid dereferencing p_ucred, et al. - */ struct proc * -pfind(pid) - register pid_t pid; +pfind_locked(pid_t pid) { - register struct proc *p; + struct proc *p; - sx_slock(&allproc_lock); - LIST_FOREACH(p, PIDHASH(pid), p_hash) + sx_assert(&allproc_lock, SX_LOCKED); + LIST_FOREACH(p, PIDHASH(pid), p_hash) { if (p->p_pid == pid) { PROC_LOCK(p); if (p->p_state == PRS_NEW) { @@ -306,17 +300,34 @@ pfind(pid) } break; } + } + return (p); +} + +/* + * Locate a process by number; return only "live" processes -- i.e., neither + * zombies nor newly born but incompletely initialized processes. By not + * returning processes in the PRS_NEW state, we allow callers to avoid + * testing for that condition to avoid dereferencing p_ucred, et al. + */ +struct proc * +pfind(pid_t pid) +{ + struct proc *p; + + sx_slock(&allproc_lock); + p = pfind_locked(pid); sx_sunlock(&allproc_lock); return (p); } static struct proc * -pfind_tid(pid_t tid) +pfind_tid_locked(pid_t tid) { struct proc *p; struct thread *td; - sx_slock(&allproc_lock); + sx_assert(&allproc_lock, SX_LOCKED); FOREACH_PROC_IN_SYSTEM(p) { PROC_LOCK(p); if (p->p_state == PRS_NEW) { @@ -330,7 +341,6 @@ pfind_tid(pid_t tid) PROC_UNLOCK(p); } found: - sx_sunlock(&allproc_lock); return (p); } @@ -364,12 +374,16 @@ pget(pid_t pid, int flags, struct proc * struct proc *p; int error; + sx_slock(&allproc_lock); if (pid <= PID_MAX) - p = pfind(pid); + p = pfind_locked(pid); else if ((flags & PGET_NOTID) == 0) - p = pfind_tid(pid); + p = pfind_tid_locked(pid); else p = NULL; + if (p == NULL && (flags & PGET_NOTWEXIT) == 0) + p = zpfind_locked(pid); + sx_sunlock(&allproc_lock); if (p == NULL) return (ESRCH); if ((flags & PGET_CANSEE) != 0) { @@ -1044,6 +1058,21 @@ pstats_free(struct pstats *ps) free(ps, M_SUBPROC); } +static struct proc * +zpfind_locked(pid_t pid) +{ + struct proc *p; + + sx_assert(&allproc_lock, SX_LOCKED); + LIST_FOREACH(p, &zombproc, p_list) { + if (p->p_pid == pid) { + PROC_LOCK(p); + break; + } + } + return (p); +} + /* * Locate a zombie process by number */ @@ -1053,11 +1082,7 @@ zpfind(pid_t pid) struct proc *p; sx_slock(&allproc_lock); - LIST_FOREACH(p, &zombproc, p_list) - if (p->p_pid == pid) { - PROC_LOCK(p); - break; - } + p = zpfind_locked(pid); sx_sunlock(&allproc_lock); return (p); } Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Fri Nov 16 07:30:38 2012 (r243141) +++ head/sys/sys/proc.h Fri Nov 16 08:25:06 2012 (r243142) @@ -835,6 +835,7 @@ extern struct proc *initproc, *pageproc; extern struct uma_zone *proc_zone; struct proc *pfind(pid_t); /* Find process by id. */ +struct proc *pfind_locked(pid_t pid); struct pgrp *pgfind(pid_t); /* Find process group by id. */ struct proc *zpfind(pid_t); /* Find zombie process by id. */ From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 09:56:25 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BFBD4591; Fri, 16 Nov 2012 09:56:25 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A3BE28FC08; Fri, 16 Nov 2012 09:56:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAG9uP6b060673; Fri, 16 Nov 2012 09:56:25 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAG9uPN3060672; Fri, 16 Nov 2012 09:56:25 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201211160956.qAG9uPN3060672@svn.freebsd.org> From: Kevin Lo Date: Fri, 16 Nov 2012 09:56:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243144 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 09:56:25 -0000 Author: kevlo Date: Fri Nov 16 09:56:25 2012 New Revision: 243144 URL: http://svnweb.freebsd.org/changeset/base/243144 Log: Document that rtprio(2) and rtprio_thread(2) can fail with EFAULT due to the invoked copyout(9). Reviewed by: davidxu Modified: head/lib/libc/sys/rtprio.2 Modified: head/lib/libc/sys/rtprio.2 ============================================================================== --- head/lib/libc/sys/rtprio.2 Fri Nov 16 09:15:15 2012 (r243143) +++ head/lib/libc/sys/rtprio.2 Fri Nov 16 09:56:25 2012 (r243144) @@ -145,13 +145,21 @@ Higher real/idle priority threads preempt lower real/idle priority threads. Threads of equal real/idle priority are run round-robin. .Sh RETURN VALUES -.Rv -std rtprio +.Rv -std rtprio rtprio_thread .Sh ERRORS The .Fn rtprio -system call +and +.Fn rtprio_thread +system calls will fail if: .Bl -tag -width Er +.It Bq Er EFAULT +The rtp pointer passed to +.Fn rtprio +or +.Fn rtprio_thread +was invalid. .It Bq Er EINVAL The specified .Fa prio From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 11:38:36 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 75F6F44A; Fri, 16 Nov 2012 11:38:36 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail10.syd.optusnet.com.au (mail10.syd.optusnet.com.au [211.29.132.191]) by mx1.freebsd.org (Postfix) with ESMTP id 03BA28FC14; Fri, 16 Nov 2012 11:38:34 +0000 (UTC) Received: from c122-106-175-26.carlnfd1.nsw.optusnet.com.au (c122-106-175-26.carlnfd1.nsw.optusnet.com.au [122.106.175.26]) by mail10.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id qAGBcUnI023673 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 16 Nov 2012 22:38:32 +1100 Date: Fri, 16 Nov 2012 22:38:30 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov Subject: Re: svn commit: r243076 - head/usr.sbin/chkgrp In-Reply-To: <20121115185958.GG73505@kib.kiev.ua> Message-ID: <20121116220347.S1856@besplex.bde.org> References: <201211151506.qAFF63v0003848@svn.freebsd.org> <20121115153030.GD73505@kib.kiev.ua> <20121116032851.I44199@besplex.bde.org> <20121115185958.GG73505@kib.kiev.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-Cloudmark-Score: 0 X-Optus-Cloudmark-Analysis: v=2.0 cv=JdTkNj2V c=1 sm=1 a=IpyuoPnKT5oA:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=hf-KJMUURdMA:10 a=S9hVmbsOi-6G55ARAw8A:9 a=CjuIK1q_8ugA:10 a=NWVoK91CQyQA:10 a=bxQHXO5Py4tHmhUgaywp5w==:117 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Eitan Adler , Bruce Evans X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 11:38:36 -0000 On Thu, 15 Nov 2012, Konstantin Belousov wrote: > On Thu, Nov 15, 2012 at 01:52:46PM -0500, Eitan Adler wrote: >> On 15 November 2012 11:52, Bruce Evans wrote: >>> strtoul("1garbage", NULL, 10) succeeds and returns value 1, but the input >>> is garbage. >> >> This case is covered earlier >> 160 /* check that the GID is numeric */ >> 161 if (strspn(f[2], "0123456789") != strlen(f[2])) { >> 162 warnx("%s: line %d: GID is not numeric", gfn, n); > So this code shall be removed, if you are introducing strtoul() to check > for errors at all. It is indeed strange to mix methods like this, and the check is more strict that usual since it doesn't allow leading spaces. I think leading spaces are normally allowed for numeric args. This normally happens automatically, via bad programs using atoi() and better programs using strto*(). Extra work like the above has to be done to reject leading spaces. >>> As the man page says, the EINVAL feature is unportable. It is almost >>> useless, since to detect garbage after the number you have to pass an >>> endptr to strtoul(), and then the check for no conversion (that is, >>> for garbage at the beginning) is just as easy as the check for garbage >>> at the end. >> >> This patch doesn't care about EINVAL or ERANGE. It just cares strtoul >> returned an error. The only possible error for strtol() on a string of digits is ERANGE. >> I even considered just ignoring the error case because the data is >> mostly sanity checked prior. The prior checking doesn't detect range errors. The later checking detects range errors on 64-bit systems but not on 32-bit ones, since strtoul() returns ULONG_MAX for range errors and that is a valid gid (GID_MAX) on 32-bit systems. Bruce From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 11:56:53 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BEB2581A; Fri, 16 Nov 2012 11:56:53 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A3C188FC08; Fri, 16 Nov 2012 11:56:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAGBurGl079751; Fri, 16 Nov 2012 11:56:53 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAGBurDo079750; Fri, 16 Nov 2012 11:56:53 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201211161156.qAGBurDo079750@svn.freebsd.org> From: Joel Dahl Date: Fri, 16 Nov 2012 11:56:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243145 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 11:56:53 -0000 Author: joel (doc committer) Date: Fri Nov 16 11:56:53 2012 New Revision: 243145 URL: http://svnweb.freebsd.org/changeset/base/243145 Log: Remove trailing whitespace. Modified: head/share/man/man9/malloc.9 Modified: head/share/man/man9/malloc.9 ============================================================================== --- head/share/man/man9/malloc.9 Fri Nov 16 09:56:25 2012 (r243144) +++ head/share/man/man9/malloc.9 Fri Nov 16 11:56:53 2012 (r243145) @@ -155,7 +155,7 @@ is specified. .It Dv M_USE_RESERVE Indicates that the system can use its reserve of memory to satisfy the request. -This option should only be used in combination with +This option should only be used in combination with .Dv M_NOWAIT when an allocation failure cannot be tolerated by the caller without catastrophic effects on the system. From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 12:03:51 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0BC8BD09; Fri, 16 Nov 2012 12:03:51 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E59378FC15; Fri, 16 Nov 2012 12:03:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAGC3ooK080858; Fri, 16 Nov 2012 12:03:50 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAGC3odN080857; Fri, 16 Nov 2012 12:03:50 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201211161203.qAGC3odN080857@svn.freebsd.org> From: Joel Dahl Date: Fri, 16 Nov 2012 12:03:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243146 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 12:03:51 -0000 Author: joel (doc committer) Date: Fri Nov 16 12:03:50 2012 New Revision: 243146 URL: http://svnweb.freebsd.org/changeset/base/243146 Log: mdoc: Use the Ev macro for environmental variables. Modified: head/lib/libc/gen/getbsize.3 Modified: head/lib/libc/gen/getbsize.3 ============================================================================== --- head/lib/libc/gen/getbsize.3 Fri Nov 16 11:56:53 2012 (r243145) +++ head/lib/libc/gen/getbsize.3 Fri Nov 16 12:03:50 2012 (r243146) @@ -50,9 +50,9 @@ function returns a preferred block size and .Xr systat 1 , based on the value of the -.En BLOCKSIZE +.Ev BLOCKSIZE environment variable. -.En BLOCKSIZE +.Ev BLOCKSIZE may be specified directly in bytes, or in multiples of a kilobyte by specifying a number followed by ``K'' or ``k'', in multiples of a megabyte by specifying a number followed by ``M'' or ``m'' or in @@ -61,7 +61,7 @@ multiples of a gigabyte by specifying a Multiples must be integers. .Pp Valid values of -.En BLOCKSIZE +.Ev BLOCKSIZE are 512 bytes to 1 gigabyte. Sizes less than 512 bytes are rounded up to 512 bytes, and sizes greater than 1 GB are rounded down to 1 GB. From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 12:05:11 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6D267E9D; Fri, 16 Nov 2012 12:05:11 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 52C548FC12; Fri, 16 Nov 2012 12:05:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAGC5BmJ081146; Fri, 16 Nov 2012 12:05:11 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAGC5Bwr081144; Fri, 16 Nov 2012 12:05:11 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201211161205.qAGC5Bwr081144@svn.freebsd.org> From: Andre Oppermann Date: Fri, 16 Nov 2012 12:05:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243147 - head/usr.bin/fetch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 12:05:11 -0000 Author: andre Date: Fri Nov 16 12:05:10 2012 New Revision: 243147 URL: http://svnweb.freebsd.org/changeset/base/243147 Log: Change fetch(1) to: o Report the instantaneous bandwidth instead of an average since the beginning of the download. o At the finish of the download report the average bandwidth and also the total time it took instead of 00m00s. Reviewed by: des MFC after: 1 week Modified: head/usr.bin/fetch/fetch.c Modified: head/usr.bin/fetch/fetch.c ============================================================================== --- head/usr.bin/fetch/fetch.c Fri Nov 16 12:03:50 2012 (r243146) +++ head/usr.bin/fetch/fetch.c Fri Nov 16 12:05:10 2012 (r243147) @@ -115,11 +115,13 @@ sig_handler(int sig) struct xferstat { char name[64]; - struct timeval start; - struct timeval last; - off_t size; - off_t offset; - off_t rcvd; + struct timeval start; /* start of transfer */ + struct timeval last; /* time of last update */ + struct timeval last2; /* time of previous last update */ + off_t size; /* size of file per HTTP hdr */ + off_t offset; /* starting offset in file */ + off_t rcvd; /* bytes already received */ + off_t lastrcvd; /* bytes received since last update */ }; /* @@ -139,9 +141,12 @@ stat_eta(struct xferstat *xs) if (eta > 3600) snprintf(str, sizeof str, "%02ldh%02ldm", eta / 3600, (eta % 3600) / 60); - else + else if (eta > 0) snprintf(str, sizeof str, "%02ldm%02lds", eta / 60, eta % 60); + else + snprintf(str, sizeof str, "%02ldm%02lds", + elapsed / 60, elapsed % 60); return (str); } @@ -173,11 +178,12 @@ stat_bps(struct xferstat *xs) double delta, bps; delta = (xs->last.tv_sec + (xs->last.tv_usec / 1.e6)) - - (xs->start.tv_sec + (xs->start.tv_usec / 1.e6)); + - (xs->last2.tv_sec + (xs->last2.tv_usec / 1.e6)); + if (delta == 0.0) { snprintf(str, sizeof str, "?? Bps"); } else { - bps = (xs->rcvd - xs->offset) / delta; + bps = (xs->rcvd - xs->lastrcvd - xs->offset) / delta; snprintf(str, sizeof str, "%sps", stat_bytes((off_t)bps)); } return (str); @@ -200,6 +206,7 @@ stat_display(struct xferstat *xs, int fo gettimeofday(&now, NULL); if (!force && now.tv_sec <= xs->last.tv_sec) return; + xs->last2 = xs->last; xs->last = now; fprintf(stderr, "\r%-46.46s", xs->name); @@ -214,10 +221,16 @@ stat_display(struct xferstat *xs, int fo (int)((100.0 * xs->rcvd) / xs->size), stat_bytes(xs->size)); } + if (force == 2) { + xs->lastrcvd = xs->offset; + xs->last2 = xs->start; + } fprintf(stderr, " %s", stat_bps(xs)); - if (xs->size > 0 && xs->rcvd > 0 && - xs->last.tv_sec >= xs->start.tv_sec + 10) + if ((xs->size > 0 && xs->rcvd > 0 && + xs->last.tv_sec >= xs->start.tv_sec + 3) || + force == 2) fprintf(stderr, " %s", stat_eta(xs)); + xs->lastrcvd = xs->rcvd; } /* @@ -232,6 +245,7 @@ stat_start(struct xferstat *xs, const ch xs->size = size; xs->offset = offset; xs->rcvd = offset; + xs->lastrcvd = offset; if (v_tty && v_level > 0) stat_display(xs, 1); else if (v_level > 0) @@ -257,7 +271,7 @@ stat_end(struct xferstat *xs) { gettimeofday(&xs->last, NULL); if (v_tty && v_level > 0) { - stat_display(xs, 1); + stat_display(xs, 2); putc('\n', stderr); } else if (v_level > 0) { fprintf(stderr, " %s %s\n", From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 12:12:03 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 33F972C1; Fri, 16 Nov 2012 12:12:03 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0FD6B8FC0C; Fri, 16 Nov 2012 12:12:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAGCC25X082485; Fri, 16 Nov 2012 12:12:02 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAGCC2KA082480; Fri, 16 Nov 2012 12:12:02 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201211161212.qAGCC2KA082480@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Fri, 16 Nov 2012 12:12:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243148 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 12:12:03 -0000 Author: ae Date: Fri Nov 16 12:12:02 2012 New Revision: 243148 URL: http://svnweb.freebsd.org/changeset/base/243148 Log: Reduce the overhead of locking, use IF_AFDATA_RLOCK() when we are doing simple lookups. Sponsored by: Yandex LLC MFC after: 1 week Modified: head/sys/netinet6/icmp6.c head/sys/netinet6/in6_src.c head/sys/netinet6/ip6_input.c head/sys/netinet6/nd6.c head/sys/netinet6/nd6_rtr.c Modified: head/sys/netinet6/icmp6.c ============================================================================== --- head/sys/netinet6/icmp6.c Fri Nov 16 12:05:10 2012 (r243147) +++ head/sys/netinet6/icmp6.c Fri Nov 16 12:12:02 2012 (r243148) @@ -2677,9 +2677,9 @@ icmp6_redirect_output(struct mbuf *m0, s struct nd_opt_hdr *nd_opt; char *lladdr; - IF_AFDATA_LOCK(ifp); + IF_AFDATA_RLOCK(ifp); ln = nd6_lookup(router_ll6, 0, ifp); - IF_AFDATA_UNLOCK(ifp); + IF_AFDATA_RUNLOCK(ifp); if (ln == NULL) goto nolladdropt; Modified: head/sys/netinet6/in6_src.c ============================================================================== --- head/sys/netinet6/in6_src.c Fri Nov 16 12:05:10 2012 (r243147) +++ head/sys/netinet6/in6_src.c Fri Nov 16 12:12:02 2012 (r243148) @@ -609,9 +609,9 @@ selectroute(struct sockaddr_in6 *dstsock rt = ron->ro_rt; ifp = rt->rt_ifp; - IF_AFDATA_LOCK(ifp); + IF_AFDATA_RLOCK(ifp); la = lla_lookup(LLTABLE6(ifp), 0, (struct sockaddr *)&sin6_next->sin6_addr); - IF_AFDATA_UNLOCK(ifp); + IF_AFDATA_RUNLOCK(ifp); if (la != NULL) LLE_RUNLOCK(la); else { Modified: head/sys/netinet6/ip6_input.c ============================================================================== --- head/sys/netinet6/ip6_input.c Fri Nov 16 12:05:10 2012 (r243147) +++ head/sys/netinet6/ip6_input.c Fri Nov 16 12:12:02 2012 (r243148) @@ -686,10 +686,10 @@ passin: dst6.sin6_len = sizeof(struct sockaddr_in6); dst6.sin6_addr = ip6->ip6_dst; ifp = m->m_pkthdr.rcvif; - IF_AFDATA_LOCK(ifp); + IF_AFDATA_RLOCK(ifp); lle = lla_lookup(LLTABLE6(ifp), 0, (struct sockaddr *)&dst6); - IF_AFDATA_UNLOCK(ifp); + IF_AFDATA_RUNLOCK(ifp); if ((lle != NULL) && (lle->la_flags & LLE_IFADDR)) { struct ifaddr *ifa; struct in6_ifaddr *ia6; Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Fri Nov 16 12:05:10 2012 (r243147) +++ head/sys/netinet6/nd6.c Fri Nov 16 12:12:02 2012 (r243148) @@ -975,12 +975,12 @@ nd6_is_addr_neighbor(struct sockaddr_in6 * Even if the address matches none of our addresses, it might be * in the neighbor cache. */ - IF_AFDATA_LOCK(ifp); + IF_AFDATA_RLOCK(ifp); if ((lle = nd6_lookup(&addr->sin6_addr, 0, ifp)) != NULL) { LLE_RUNLOCK(lle); rc = 1; } - IF_AFDATA_UNLOCK(ifp); + IF_AFDATA_RUNLOCK(ifp); return (rc); } @@ -1480,9 +1480,9 @@ nd6_ioctl(u_long cmd, caddr_t data, stru if ((error = in6_setscope(&nb_addr, ifp, NULL)) != 0) return (error); - IF_AFDATA_LOCK(ifp); + IF_AFDATA_RLOCK(ifp); ln = nd6_lookup(&nb_addr, 0, ifp); - IF_AFDATA_UNLOCK(ifp); + IF_AFDATA_RUNLOCK(ifp); if (ln == NULL) { error = EINVAL; @@ -2198,9 +2198,9 @@ nd6_storelladdr(struct ifnet *ifp, struc /* * the entry should have been created in nd6_store_lladdr */ - IF_AFDATA_LOCK(ifp); + IF_AFDATA_RLOCK(ifp); ln = lla_lookup(LLTABLE6(ifp), 0, dst); - IF_AFDATA_UNLOCK(ifp); + IF_AFDATA_RUNLOCK(ifp); if ((ln == NULL) || !(ln->la_flags & LLE_VALID)) { if (ln != NULL) LLE_RUNLOCK(ln); Modified: head/sys/netinet6/nd6_rtr.c ============================================================================== --- head/sys/netinet6/nd6_rtr.c Fri Nov 16 12:05:10 2012 (r243147) +++ head/sys/netinet6/nd6_rtr.c Fri Nov 16 12:12:02 2012 (r243148) @@ -637,13 +637,13 @@ defrouter_select(void) * the ordering rule of the list described in defrtrlist_update(). */ TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) { - IF_AFDATA_LOCK(dr->ifp); + IF_AFDATA_RLOCK(dr->ifp); if (selected_dr == NULL && (ln = nd6_lookup(&dr->rtaddr, 0, dr->ifp)) && ND6_IS_LLINFO_PROBREACH(ln)) { selected_dr = dr; } - IF_AFDATA_UNLOCK(dr->ifp); + IF_AFDATA_RUNLOCK(dr->ifp); if (ln != NULL) { LLE_RUNLOCK(ln); ln = NULL; @@ -671,13 +671,13 @@ defrouter_select(void) else selected_dr = TAILQ_NEXT(installed_dr, dr_entry); } else if (installed_dr) { - IF_AFDATA_LOCK(installed_dr->ifp); + IF_AFDATA_RLOCK(installed_dr->ifp); if ((ln = nd6_lookup(&installed_dr->rtaddr, 0, installed_dr->ifp)) && ND6_IS_LLINFO_PROBREACH(ln) && rtpref(selected_dr) <= rtpref(installed_dr)) { selected_dr = installed_dr; } - IF_AFDATA_UNLOCK(installed_dr->ifp); + IF_AFDATA_RUNLOCK(installed_dr->ifp); if (ln != NULL) LLE_RUNLOCK(ln); } @@ -1301,9 +1301,9 @@ find_pfxlist_reachable_router(struct nd_ int canreach; LIST_FOREACH(pfxrtr, &pr->ndpr_advrtrs, pfr_entry) { - IF_AFDATA_LOCK(pfxrtr->router->ifp); + IF_AFDATA_RLOCK(pfxrtr->router->ifp); ln = nd6_lookup(&pfxrtr->router->rtaddr, 0, pfxrtr->router->ifp); - IF_AFDATA_UNLOCK(pfxrtr->router->ifp); + IF_AFDATA_RUNLOCK(pfxrtr->router->ifp); if (ln == NULL) continue; canreach = ND6_IS_LLINFO_PROBREACH(ln); From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 12:31:44 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 079D7715; Fri, 16 Nov 2012 12:31:44 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E1F8F8FC08; Fri, 16 Nov 2012 12:31:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAGCVhCh085258; Fri, 16 Nov 2012 12:31:43 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAGCVh0I085256; Fri, 16 Nov 2012 12:31:43 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201211161231.qAGCVh0I085256@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Fri, 16 Nov 2012 12:31:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243149 - head/lib/libfetch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 12:31:44 -0000 Author: des Date: Fri Nov 16 12:31:43 2012 New Revision: 243149 URL: http://svnweb.freebsd.org/changeset/base/243149 Log: Fix weird indentation. Modified: head/lib/libfetch/http.c Modified: head/lib/libfetch/http.c ============================================================================== --- head/lib/libfetch/http.c Fri Nov 16 12:12:02 2012 (r243148) +++ head/lib/libfetch/http.c Fri Nov 16 12:31:43 2012 (r243149) @@ -1752,11 +1752,11 @@ http_request(struct url *URL, const char /* get headers. http_next_header expects one line readahead */ if (fetch_getln(conn) == -1) { - fetch_syserr(); - goto ouch; + fetch_syserr(); + goto ouch; } do { - switch ((h = http_next_header(conn, &headerbuf, &p))) { + switch ((h = http_next_header(conn, &headerbuf, &p))) { case hdr_syserror: fetch_syserr(); goto ouch; @@ -1785,7 +1785,7 @@ http_request(struct url *URL, const char conn->err != HTTP_USE_PROXY) { n = 1; break; - } + } if (new) free(new); if (verbose) From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 14:00:28 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 688F4A74; Fri, 16 Nov 2012 14:00:28 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 43FF18FC14; Fri, 16 Nov 2012 14:00:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAGE0Sft099159; Fri, 16 Nov 2012 14:00:28 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAGE0SYB099158; Fri, 16 Nov 2012 14:00:28 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201211161400.qAGE0SYB099158@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 16 Nov 2012 14:00:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243151 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 14:00:28 -0000 Author: glebius Date: Fri Nov 16 14:00:27 2012 New Revision: 243151 URL: http://svnweb.freebsd.org/changeset/base/243151 Log: o Remove meaningless PROTOCOLS section. o Describe passing file descriptors as separate section. - Descriptors can be passed through any protocol of the UNIX family, not SOCK_STREAM and SOCK_SEQPACKET only. [1] o Describe socket options as separate section. - Move LOCAL_PEERCRED option to this section. - Describe struct xucred. - In LOCAL_CREDS section mention that credentials are passed only on the first read on non-datagram sockets. o Xref all mentioned system calls. Noticed by: Igor Sysoev [1] Modified: head/share/man/man4/unix.4 Modified: head/share/man/man4/unix.4 ============================================================================== --- head/share/man/man4/unix.4 Fri Nov 16 13:35:53 2012 (r243150) +++ head/share/man/man4/unix.4 Fri Nov 16 14:00:27 2012 (r243151) @@ -32,7 +32,7 @@ .\" @(#)unix.4 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd October 5, 2009 +.Dd November 16, 2012 .Dt UNIX 4 .Os .Sh NAME @@ -123,20 +123,10 @@ of a or .Xr sendto 2 must be writable. -.Sh PROTOCOLS +.Sh PASSING FILE DESCRIPTORS The .Ux Ns -domain -protocol family is comprised of simple -transport protocols that support the -.Dv SOCK_STREAM , -.Dv SOCK_SEQPACKET , -and -.Dv SOCK_DGRAM -abstractions. -.Dv SOCK_STREAM -and -.Dv SOCK_SEQPACKET -sockets also support the communication of +sockets support the communication of .Ux file descriptors through the use of the .Va msg_control @@ -173,36 +163,7 @@ passed to a receiver. Descriptors that are awaiting delivery, or that are purposely not received, are automatically closed by the system when the destination socket is closed. -.Pp -The effective credentials (i.e., the user ID and group list) of a -peer on a -.Dv SOCK_STREAM -socket may be obtained using the -.Dv LOCAL_PEERCRED -socket option. -This may be used by a server to obtain and verify the credentials of -its client, and vice versa by the client to verify the credentials -of the server. -These will arrive in the form of a filled in -.Vt "struct xucred" -(defined in -.In sys/ucred.h ) . -The credentials presented to the server (the -.Xr listen 2 -caller) are those of the client when it called -.Xr connect 2 ; -the credentials presented to the client (the -.Xr connect 2 -caller) are those of the server when it called -.Xr listen 2 . -This mechanism is reliable; there is no way for either party to influence -the credentials presented to its peer except by calling the appropriate -system call (e.g., -.Xr connect 2 -or -.Xr listen 2 ) -under different effective credentials. -.Pp +.Sh SOCKET OPTIONS .Tn UNIX domain sockets support a number of socket options which can be set with .Xr setsockopt 2 @@ -256,6 +217,13 @@ cmsg_len = CMSG_LEN(SOCKCREDSIZE(ngroups cmsg_level = SOL_SOCKET cmsg_type = SCM_CREDS .Ed +.Pp +On +.Dv SOCK_STREAM +and +.Dv SOCK_SEQPACKET +sockets credentials are passed only on the first read from a socket, +then system clears the option on socket. .It Dv LOCAL_CONNWAIT Used with .Dv SOCK_STREAM @@ -264,8 +232,62 @@ sockets, this option causes the function to block until .Xr accept 2 has been called on the listening socket. +.It Dv LOCAL_PEERCRED +Requested via +.Xr getsockopt 2 +on a +.Dv SOCK_STREAM +socket returns credentials of the remote side. +These will arrive in the form of a filled in +.Vt xucred +structure, defined in +.In sys/ucred.h +as follows: +.Bd -literal +struct xucred { + u_int cr_version; /* structure layout version */ + uid_t cr_uid; /* effective user id */ + short cr_ngroups; /* number of groups */ + gid_t cr_groups[XU_NGROUPS]; /* groups */ +}; +.Ed +The +.Vt cr_version +fields should be checked against +.Dv XUCRED_VERSION +define. +.Pp +The credentials presented to the server (the +.Xr listen 2 +caller) are those of the client when it called +.Xr connect 2 ; +the credentials presented to the client (the +.Xr connect 2 +caller) are those of the server when it called +.Xr listen 2 . +This mechanism is reliable; there is no way for either party to influence +the credentials presented to its peer except by calling the appropriate +system call (e.g., +.Xr connect 2 +or +.Xr listen 2 ) +under different effective credentials. +.Pp +To reliably obtain peer credentials on a +.Dv SOCK_DGRAM +socket refer to the +.Dv LOCAL_CREDS +socket option. .El .Sh SEE ALSO +.Xr connect 2 , +.Xr dup 2 , +.Xr fcntl 2 , +.Xr getsockopt 2 , +.Xr listen 2 , +.Xr recvmsg 2 , +.Xr sendto 2 , +.Xr setsockopt 2 , .Xr socket 2 , .Xr intro 4 .Rs From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 14:00:55 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3F3FEBE6; Fri, 16 Nov 2012 14:00:55 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 236078FC13; Fri, 16 Nov 2012 14:00:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAGE0tEM099259; Fri, 16 Nov 2012 14:00:55 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAGE0tth099258; Fri, 16 Nov 2012 14:00:55 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201211161400.qAGE0tth099258@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 16 Nov 2012 14:00:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243152 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 14:00:55 -0000 Author: glebius Date: Fri Nov 16 14:00:54 2012 New Revision: 243152 URL: http://svnweb.freebsd.org/changeset/base/243152 Log: Update comment. Modified: head/sys/kern/uipc_usrreq.c Modified: head/sys/kern/uipc_usrreq.c ============================================================================== --- head/sys/kern/uipc_usrreq.c Fri Nov 16 14:00:27 2012 (r243151) +++ head/sys/kern/uipc_usrreq.c Fri Nov 16 14:00:54 2012 (r243152) @@ -926,7 +926,8 @@ uipc_send(struct socket *so, int flags, SOCKBUF_LOCK(&so2->so_rcv); if (unp2->unp_flags & UNP_WANTCRED) { /* - * Credentials are passed only once on SOCK_STREAM. + * Credentials are passed only once on SOCK_STREAM + * and SOCK_SEQPACKET. */ unp2->unp_flags &= ~UNP_WANTCRED; control = unp_addsockcred(td, control); From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 14:22:18 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EF19B5EC for ; Fri, 16 Nov 2012 14:22:18 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 5D42A8FC08 for ; Fri, 16 Nov 2012 14:22:17 +0000 (UTC) Received: by mail-lb0-f182.google.com with SMTP id go10so65339lbb.13 for ; Fri, 16 Nov 2012 06:22:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=/xiLv8DdQ2LC1Bme/v0SqbBbISYrm09SO+XZMEtdag0=; b=DkXdlUIMeFokrbSrurkdHtlWcDQcRkHcqqPgfwET6RdQS8gDcSPY/QnY5QHvwwmVqD OfnmumfE8c3ND9nt2lIgrrYi942tmZkMqoOm+Erpt8dk5G6Cj9u9z4RgE8oYdCiuOGiW acU1AzZUMIXPZ6rsDFkUnkIVqGng8RAJtFoTs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=/xiLv8DdQ2LC1Bme/v0SqbBbISYrm09SO+XZMEtdag0=; b=cDyiomD39qDK8eQTdkB00l9wSHAfVfIzwOyzxFQVuAkNOPcMm7gh1+GRToGG82mfHv h73ZKlv+YbalpLJEWU4BG/etiyJdKJW3om0xqJEJCFth8h6buX4irunQSJHzPR8rn+UQ XiZA3ZdMaU8Zay3tSqa6SuvbU4eI3DatjgbKL9ntUBf7grOvrqHrcQwO1zDABz6QLcAT CRhCAhZwlVjOTIaH+7V0UudbCozVyVeQ0oxdj4mFVxHLV/4H36ZgOte0PlD2Nj+jY1eT c93AbHXeQqMBBnBSXK0XOHxL5qCRDisYASSpkGcbWVp/vEloOtae221qaDTcAFiI0YxL FzNQ== Received: by 10.112.100.102 with SMTP id ex6mr2055734lbb.130.1353075736830; Fri, 16 Nov 2012 06:22:16 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.112.25.166 with HTTP; Fri, 16 Nov 2012 06:21:46 -0800 (PST) In-Reply-To: <1TZFBU-0005S6-1s@internal.tormail.org> References: <201211160425.qAG4PZ8I016575__14550.9199741811$1353039960$gmane$org@svn.freebsd.org> <1TZFBU-0005S6-1s@internal.tormail.org> From: Eitan Adler Date: Fri, 16 Nov 2012 09:21:46 -0500 X-Google-Sender-Auth: 0zFrRBKdngjwUVFLc1FxqTnFEis Message-ID: Subject: Re: svn commit: r243130 - head/etc/root To: Jan Beich Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQmHTdOHd/9jlCDkowVUQNvO/tSpVBuBgC+tM29/Xgc6Xsayt81zTsoHVSAAN+DVRuCV5iY+ Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 14:22:19 -0000 On 16 November 2012 01:04, Jan Beich wrote: > Eitan Adler writes: > >> Author: eadler >> Date: Fri Nov 16 04:25:35 2012 >> New Revision: 243130 >> URL: http://svnweb.freebsd.org/changeset/base/243130 >> >> Log: >> dot.login is supposed to be for bourne shell, not csh > > Can you explain better or point to the reference? sh(1) mentions > ~/.profile while csh(1) mentions ~/.login for commands executed > once per login. ugh. I was really tired when looking at this. I was right the first time. Sorry for the noise. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 14:25:13 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B9E5B81D; Fri, 16 Nov 2012 14:25:13 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9F1CA8FC08; Fri, 16 Nov 2012 14:25:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAGEPDsZ003930; Fri, 16 Nov 2012 14:25:13 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAGEPDgZ003929; Fri, 16 Nov 2012 14:25:13 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211161425.qAGEPDgZ003929@svn.freebsd.org> From: Eitan Adler Date: Fri, 16 Nov 2012 14:25:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243153 - head/etc/root X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 14:25:13 -0000 Author: eadler Date: Fri Nov 16 14:25:13 2012 New Revision: 243153 URL: http://svnweb.freebsd.org/changeset/base/243153 Log: last commit was a mistake Pointyhat to: me (for real) Approved by: cperciva (implicit) Modified: head/etc/root/dot.login Modified: head/etc/root/dot.login ============================================================================== --- head/etc/root/dot.login Fri Nov 16 14:00:54 2012 (r243152) +++ head/etc/root/dot.login Fri Nov 16 14:25:13 2012 (r243153) @@ -6,4 +6,4 @@ # # Uncomment to display a random cookie each login: -# [ -x /usr/games/fortune ] && /usr/games/fortune -s +# if ( -x /usr/games/fortune ) /usr/games/fortune -s From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 14:30:41 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 326D99EF; Fri, 16 Nov 2012 14:30:41 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 170EC8FC12; Fri, 16 Nov 2012 14:30:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAGEUeVk004728; Fri, 16 Nov 2012 14:30:40 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAGEUeWM004726; Fri, 16 Nov 2012 14:30:40 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201211161430.qAGEUeWM004726@svn.freebsd.org> From: Joel Dahl Date: Fri, 16 Nov 2012 14:30:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243154 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 14:30:41 -0000 Author: joel (doc committer) Date: Fri Nov 16 14:30:40 2012 New Revision: 243154 URL: http://svnweb.freebsd.org/changeset/base/243154 Log: Remove trailing whitespace. Modified: head/share/man/man4/unix.4 Modified: head/share/man/man4/unix.4 ============================================================================== --- head/share/man/man4/unix.4 Fri Nov 16 14:25:13 2012 (r243153) +++ head/share/man/man4/unix.4 Fri Nov 16 14:30:40 2012 (r243154) @@ -235,7 +235,7 @@ has been called on the listening socket. .It Dv LOCAL_PEERCRED Requested via .Xr getsockopt 2 -on a +on a .Dv SOCK_STREAM socket returns credentials of the remote side. These will arrive in the form of a filled in From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 14:46:32 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A35AFFC1; Fri, 16 Nov 2012 14:46:32 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 852398FC13; Fri, 16 Nov 2012 14:46:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAGEkWkl007093; Fri, 16 Nov 2012 14:46:32 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAGEkW2K007092; Fri, 16 Nov 2012 14:46:32 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211161446.qAGEkW2K007092@svn.freebsd.org> From: Eitan Adler Date: Fri, 16 Nov 2012 14:46:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243155 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 14:46:32 -0000 Author: eadler Date: Fri Nov 16 14:46:32 2012 New Revision: 243155 URL: http://svnweb.freebsd.org/changeset/base/243155 Log: Correct spelling of "lily" [0] Correct spelling of Camellia PR: misc/173655 [0] Submitted by: John Ryan [0] Approved by: cperciva MFC after: 1 week Modified: head/share/misc/flowers (contents, props changed) Modified: head/share/misc/flowers ============================================================================== --- head/share/misc/flowers Fri Nov 16 14:30:40 2012 (r243154) +++ head/share/misc/flowers Fri Nov 16 14:46:32 2012 (r243155) @@ -6,7 +6,7 @@ African violet:Such worth is rare. Apple blossom:Preference. Bachelor's button:Celibacy. Bay leaf:I change but in death. -Camelia:Reflected loveliness. +Camellia:Reflected loveliness. Chrysanthemum, other color:Slighted love. Chrysanthemum, red:I love. Chrysanthemum, white:Truth. @@ -21,8 +21,8 @@ Ivy:Friendship, fidelity, marriage. Jasmine:Amiability, transports of joy, sensuality. Leaves (dead):Melancholy. Lilac:Youthful innocence. -Lilly of the valley:Return of happiness. -Lilly:Purity, sweetness. +Lily of the valley:Return of happiness. +Lily:Purity, sweetness. Magnolia:Dignity, perseverance. Marigold:Jealousy. Mint:Virtue. From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 15:02:35 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C95BF8F2; Fri, 16 Nov 2012 15:02:35 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 950CB8FC14; Fri, 16 Nov 2012 15:02:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAGF2ZNo009515; Fri, 16 Nov 2012 15:02:35 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAGF2Z0K009511; Fri, 16 Nov 2012 15:02:35 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201211161502.qAGF2Z0K009511@svn.freebsd.org> From: Kevin Lo Date: Fri, 16 Nov 2012 15:02:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243156 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 15:02:35 -0000 Author: kevlo Date: Fri Nov 16 15:02:35 2012 New Revision: 243156 URL: http://svnweb.freebsd.org/changeset/base/243156 Log: - the preferred way to write a NULL pointer constant is with NULL - whitespace nit Reviewed by: glebius Modified: head/lib/libc/net/getnetent.3 head/lib/libc/net/getprotoent.3 head/lib/libc/net/getservent.3 Modified: head/lib/libc/net/getnetent.3 ============================================================================== --- head/lib/libc/net/getnetent.3 Fri Nov 16 14:46:32 2012 (r243155) +++ head/lib/libc/net/getnetent.3 Fri Nov 16 15:02:35 2012 (r243156) @@ -73,7 +73,7 @@ The order of the lookups is controlled b `networks' entry in .Xr nsswitch.conf 5 . .Bd -literal -offset indent -struct netent { +struct netent { char *n_name; /* official name of net */ char **n_aliases; /* alias list */ int n_addrtype; /* net number type */ @@ -142,8 +142,7 @@ Network numbers are supplied in host ord .It Pa /etc/resolv.conf .El .Sh DIAGNOSTICS -Null pointer -(0) returned on +Null pointer returned on .Dv EOF or error. .Sh SEE ALSO Modified: head/lib/libc/net/getprotoent.3 ============================================================================== --- head/lib/libc/net/getprotoent.3 Fri Nov 16 14:46:32 2012 (r243155) +++ head/lib/libc/net/getprotoent.3 Fri Nov 16 15:02:35 2012 (r243156) @@ -65,7 +65,7 @@ containing the broken-out fields of a line in the network protocol data base, .Pa /etc/protocols . .Bd -literal -offset indent -struct protoent { +struct protoent { char *p_name; /* official name of protocol */ char **p_aliases; /* alias list */ int p_proto; /* protocol number */ @@ -117,8 +117,7 @@ or until .Dv EOF is encountered. .Sh RETURN VALUES -Null pointer -(0) returned on +Null pointer returned on .Dv EOF or error. .Sh FILES Modified: head/lib/libc/net/getservent.3 ============================================================================== --- head/lib/libc/net/getservent.3 Fri Nov 16 14:46:32 2012 (r243155) +++ head/lib/libc/net/getservent.3 Fri Nov 16 15:02:35 2012 (r243156) @@ -65,7 +65,7 @@ containing the broken-out fields of a line in the network services data base, .Pa /etc/services . .Bd -literal -offset indent -struct servent { +struct servent { char *s_name; /* official name of service */ char **s_aliases; /* alias list */ int s_port; /* port service resides at */ @@ -130,8 +130,7 @@ searches must also match the protocol. .It Pa /etc/services .El .Sh DIAGNOSTICS -Null pointer -(0) returned on +Null pointer returned on .Dv EOF or error. .Sh SEE ALSO From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 16:02:40 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C6B2D172; Fri, 16 Nov 2012 16:02:40 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-da0-f54.google.com (mail-da0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id 83A258FC14; Fri, 16 Nov 2012 16:02:39 +0000 (UTC) Received: by mail-da0-f54.google.com with SMTP id z9so1288847dad.13 for ; Fri, 16 Nov 2012 08:02:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=qVjNt7bSyK2A3WGwmOvd+revgsmE23PViBIvsHsvgkw=; b=kmKitn+1siCZNFYUv/mUm7DMX79dJy8sKtMC6iyJK03HoFmQyrjSONNKX0Ft50Plio 200ZV5h/pbi35NozDxH9NGGHMDEwhrKYPLDX1FDtGUozPAzoPNmvuNrT0TuJpeIYd1ih HEbrMgvhTuDPWdfG0O7+XWZ9nVKwtIpkgN/vdWrvKSB08axECrM2MyVlwE2MfI7tW9wv HJbB1wY0WU1MAJYVBYI6qp058RZ2l5gi32duSgZ2fn2jbE2uyvJ9iBQOvL5OyWurxOcR 77zv/z3h3ifLBXKYisOECoDNtorYkdtmKT0TzQ8UsQH19171PIhtDgrcbIxk1DyH7o0K F0pQ== MIME-Version: 1.0 Received: by 10.68.245.169 with SMTP id xp9mr16336498pbc.142.1353081759266; Fri, 16 Nov 2012 08:02:39 -0800 (PST) Sender: mdf356@gmail.com Received: by 10.68.132.136 with HTTP; Fri, 16 Nov 2012 08:02:39 -0800 (PST) In-Reply-To: <201211160625.qAG6PLd2032062@svn.freebsd.org> References: <201211160625.qAG6PLd2032062@svn.freebsd.org> Date: Fri, 16 Nov 2012 08:02:39 -0800 X-Google-Sender-Auth: 1u2PnjJ2Q_92JY5TqyU4dmIxoeI Message-ID: Subject: Re: svn commit: r243134 - head/sys/sys From: mdf@FreeBSD.org To: Konstantin Belousov Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 16:02:40 -0000 On Thu, Nov 15, 2012 at 10:25 PM, Konstantin Belousov wrote: > Author: kib > Date: Fri Nov 16 06:25:20 2012 > New Revision: 243134 > URL: http://svnweb.freebsd.org/changeset/base/243134 > > Log: > Alphabetically reorder the forward-declarations of the structures. > Add the declaration for enum idtype, to be used later. Forward declarations of enums isn't an ISO C feature, but a gcc extension. While the kernel uses many gcc extensions, it hides most under a #define so unsupported compilers can continue along. This unsupported feature can't be hidden. Does the forward declaration prevent another warning? Thanks, matthew > Reported and reviewed by: bde > MFC after: 28 days > > Modified: > head/sys/sys/syscallsubr.h > > Modified: head/sys/sys/syscallsubr.h > ============================================================================== > --- head/sys/sys/syscallsubr.h Fri Nov 16 06:22:14 2012 (r243133) > +++ head/sys/sys/syscallsubr.h Fri Nov 16 06:25:20 2012 (r243134) > @@ -35,25 +35,26 @@ > #include > > struct file; > +enum idtype; > struct itimerval; > struct image_args; > struct jail; > +struct kevent; > +struct kevent_copyops; > +struct kld_file_stat; > +struct ksiginfo; > struct mbuf; > struct msghdr; > struct msqid_ds; > +struct ogetdirentries_args; > struct rlimit; > struct rusage; > -struct __wrusage; > union semun; > +struct sendfile_args; > struct sockaddr; > struct stat; > -struct kevent; > -struct kevent_copyops; > -struct kld_file_stat; > -struct ksiginfo; > -struct sendfile_args; > struct thr_param; > -struct ogetdirentries_args; > +struct __wrusage; > > int kern___getcwd(struct thread *td, u_char *buf, enum uio_seg bufseg, > u_int buflen); From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 16:05:44 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5FAF331E; Fri, 16 Nov 2012 16:05:44 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id B64AB8FC16; Fri, 16 Nov 2012 16:05:43 +0000 (UTC) Received: from tom.home (localhost [127.0.0.1]) by kib.kiev.ua (8.14.5/8.14.5) with ESMTP id qAGG5eBS098445; Fri, 16 Nov 2012 18:05:40 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.7.1 kib.kiev.ua qAGG5eBS098445 Received: (from kostik@localhost) by tom.home (8.14.5/8.14.5/Submit) id qAGG5dF6098444; Fri, 16 Nov 2012 18:05:40 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 16 Nov 2012 18:05:39 +0200 From: Konstantin Belousov To: mdf@FreeBSD.org Subject: Re: svn commit: r243134 - head/sys/sys Message-ID: <20121116160539.GN73505@kib.kiev.ua> References: <201211160625.qAG6PLd2032062@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sG3ZcHdzWW76U2Qm" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=0.2 required=5.0 tests=ALL_TRUSTED, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 16:05:44 -0000 --sG3ZcHdzWW76U2Qm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 16, 2012 at 08:02:39AM -0800, mdf@FreeBSD.org wrote: > On Thu, Nov 15, 2012 at 10:25 PM, Konstantin Belousov w= rote: > > Author: kib > > Date: Fri Nov 16 06:25:20 2012 > > New Revision: 243134 > > URL: http://svnweb.freebsd.org/changeset/base/243134 > > > > Log: > > Alphabetically reorder the forward-declarations of the structures. > > Add the declaration for enum idtype, to be used later. >=20 > Forward declarations of enums isn't an ISO C feature, but a gcc > extension. While the kernel uses many gcc extensions, it hides most > under a #define so unsupported compilers can continue along. This > unsupported feature can't be hidden. >=20 > Does the forward declaration prevent another warning? It allows to prevent the namespace pollution from sys/wait.h idtype_t, need= ed due to the kern_wait6() declaration. --sG3ZcHdzWW76U2Qm Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlCmZFMACgkQC3+MBN1Mb4hItACfYuqhdfALdxSbitgA0I9NDXFn 5EYAnA+am6ZfjA6AAg50rYDQoNzMlNw4 =LJWv -----END PGP SIGNATURE----- --sG3ZcHdzWW76U2Qm-- From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 17:24:23 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 13DC988D; Fri, 16 Nov 2012 17:24:23 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from fallbackmx06.syd.optusnet.com.au (fallbackmx06.syd.optusnet.com.au [211.29.132.8]) by mx1.freebsd.org (Postfix) with ESMTP id 93EEF8FC12; Fri, 16 Nov 2012 17:24:22 +0000 (UTC) Received: from mail17.syd.optusnet.com.au (mail17.syd.optusnet.com.au [211.29.132.198]) by fallbackmx06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id qAGHOFJL028439; Sat, 17 Nov 2012 04:24:15 +1100 Received: from c122-106-175-26.carlnfd1.nsw.optusnet.com.au (c122-106-175-26.carlnfd1.nsw.optusnet.com.au [122.106.175.26]) by mail17.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id qAGHO6e2005420 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 17 Nov 2012 04:24:07 +1100 Date: Sat, 17 Nov 2012 04:24:06 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov Subject: Re: svn commit: r243134 - head/sys/sys In-Reply-To: <20121116160539.GN73505@kib.kiev.ua> Message-ID: <20121117040901.I3439@besplex.bde.org> References: <201211160625.qAG6PLd2032062@svn.freebsd.org> <20121116160539.GN73505@kib.kiev.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-Cloudmark-Score: 0 X-Optus-Cloudmark-Analysis: v=2.0 cv=eqGHVfVX c=1 sm=1 a=zCgzHOi_n5gA:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=FSHVhTTuonsA:10 a=6I5d2MoRAAAA:8 a=lhpCGoIDFwqhNO8tG2kA:9 a=CjuIK1q_8ugA:10 a=SV7veod9ZcQA:10 a=bxQHXO5Py4tHmhUgaywp5w==:117 Cc: svn-src-head@freebsd.org, mdf@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 17:24:23 -0000 On Fri, 16 Nov 2012, Konstantin Belousov wrote: > On Fri, Nov 16, 2012 at 08:02:39AM -0800, mdf@FreeBSD.org wrote: >> On Thu, Nov 15, 2012 at 10:25 PM, Konstantin Belousov wrote: >>> Author: kib >>> Date: Fri Nov 16 06:25:20 2012 >>> New Revision: 243134 >>> URL: http://svnweb.freebsd.org/changeset/base/243134 >>> >>> Log: >>> Alphabetically reorder the forward-declarations of the structures. >>> Add the declaration for enum idtype, to be used later. >> >> Forward declarations of enums isn't an ISO C feature, but a gcc >> extension. While the kernel uses many gcc extensions, it hides most >> under a #define so unsupported compilers can continue along. This >> unsupported feature can't be hidden. Ugh. We discussed the unportability of enums in APIs when cleaning this up. kib said that the size of an enum type is an ABI standard for i386 and amd64. I don't quite agree for i386, and we didn't discuss other arches. The size of an enum type must be fixed for the gcc extension to be possible. gcc -std=c99 -pedantic generates a warning for forward enum declaration. Long ago, I routinely tested with -pedantic and committed fixes for all the things that it found if they were not too hard to fix. >> Does the forward declaration prevent another warning? > > It allows to prevent the namespace pollution from sys/wait.h idtype_t, needed > due to the kern_wait6() declaration. syscallsubr.h and especially sysproto.h have lots of other namespace pollution. My version of sysproto.h reduces the pollution to just using 6 #define hacks and 1 clean #include change to reduce 5 polluting headers and 1 non-polluting one to 1 different non-polluting one. The #define hacks can't work for enums. When I worked on reducing the pollution in sysproto.h in its automatic generation, I got it down to and not much more. because available later, but -current still has the full pollution of and much more. Non-auto-generated headers like syscallsubr.h are easier to clean. Bruce From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 19:39:10 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BE2C085F; Fri, 16 Nov 2012 19:39:10 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A37D88FC12; Fri, 16 Nov 2012 19:39:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAGJdA0m050572; Fri, 16 Nov 2012 19:39:10 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAGJdAai050565; Fri, 16 Nov 2012 19:39:10 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201211161939.qAGJdAai050565@svn.freebsd.org> From: Michael Tuexen Date: Fri, 16 Nov 2012 19:39:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243157 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 19:39:10 -0000 Author: tuexen Date: Fri Nov 16 19:39:10 2012 New Revision: 243157 URL: http://svnweb.freebsd.org/changeset/base/243157 Log: Get the accounting working. We now have counters how many chunks for each SCTP outgoing stream are in the send and sent queue. While there, improve the naming of NR-SACK related constants recently introduced. MFC after: 1 week Modified: head/sys/netinet/sctp_constants.h head/sys/netinet/sctp_indata.c head/sys/netinet/sctp_input.c head/sys/netinet/sctp_output.c head/sys/netinet/sctp_pcb.c head/sys/netinet/sctp_timer.c head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctp_constants.h ============================================================================== --- head/sys/netinet/sctp_constants.h Fri Nov 16 15:02:35 2012 (r243156) +++ head/sys/netinet/sctp_constants.h Fri Nov 16 19:39:10 2012 (r243157) @@ -370,7 +370,7 @@ __FBSDID("$FreeBSD$"); #define SCTP_DATAGRAM_ACKED 10010 #define SCTP_DATAGRAM_MARKED 20010 #define SCTP_FORWARD_TSN_SKIP 30010 -#define SCTP_DATAGRAM_NR_MARKED 40010 +#define SCTP_DATAGRAM_NR_ACKED 40010 /* chunk output send from locations */ #define SCTP_OUTPUT_FROM_USR_SEND 0 Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Fri Nov 16 15:02:35 2012 (r243156) +++ head/sys/netinet/sctp_indata.c Fri Nov 16 19:39:10 2012 (r243157) @@ -2976,7 +2976,7 @@ sctp_process_segment_range(struct sctp_t * (leave PR-SCTP ones that are to skip alone though) */ if ((tp1->sent != SCTP_FORWARD_TSN_SKIP) && - (tp1->sent != SCTP_DATAGRAM_NR_MARKED)) { + (tp1->sent != SCTP_DATAGRAM_NR_ACKED)) { tp1->sent = SCTP_DATAGRAM_MARKED; } if (tp1->rec.data.chunk_was_revoked) { @@ -2985,8 +2985,16 @@ sctp_process_segment_range(struct sctp_t tp1->rec.data.chunk_was_revoked = 0; } /* NR Sack code here */ - if (nr_sacking) { - tp1->sent = SCTP_DATAGRAM_NR_MARKED; + if (nr_sacking && + (tp1->sent != SCTP_DATAGRAM_NR_ACKED)) { + if (stcb->asoc.strmout[tp1->rec.data.stream_number].chunks_on_queues > 0) { + stcb->asoc.strmout[tp1->rec.data.stream_number].chunks_on_queues--; +#ifdef INVARIANTS + } else { + panic("No chunks on the queues for sid %u.", tp1->rec.data.stream_number); +#endif + } + tp1->sent = SCTP_DATAGRAM_NR_ACKED; if (tp1->data) { /* * sa_ignore @@ -3091,7 +3099,6 @@ sctp_check_for_revoked(struct sctp_tcb * uint32_t biggest_tsn_acked) { struct sctp_tmit_chunk *tp1; - int tot_revoked = 0; TAILQ_FOREACH(tp1, &asoc->sent_queue, sctp_next) { if (SCTP_TSN_GT(tp1->rec.data.TSN_seq, cumack)) { @@ -3126,7 +3133,6 @@ sctp_check_for_revoked(struct sctp_tcb * * artificial inflation of the flight_size. */ tp1->whoTo->cwnd += tp1->book_size; - tot_revoked++; if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_SACK_LOGGING_ENABLE) { sctp_log_sack(asoc->last_acked_seq, cumack, @@ -3603,13 +3609,13 @@ sctp_try_advance_peer_ack_point(struct s TAILQ_FOREACH_SAFE(tp1, &asoc->sent_queue, sctp_next, tp2) { if (tp1->sent != SCTP_FORWARD_TSN_SKIP && tp1->sent != SCTP_DATAGRAM_RESEND && - tp1->sent != SCTP_DATAGRAM_NR_MARKED) { + tp1->sent != SCTP_DATAGRAM_NR_ACKED) { /* no chance to advance, out of here */ break; } if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOG_TRY_ADVANCE) { if ((tp1->sent == SCTP_FORWARD_TSN_SKIP) || - (tp1->sent == SCTP_DATAGRAM_NR_MARKED)) { + (tp1->sent == SCTP_DATAGRAM_NR_ACKED)) { sctp_misc_ints(SCTP_FWD_TSN_CHECK, asoc->advanced_peer_ack_point, tp1->rec.data.TSN_seq, 0, 0); @@ -3658,7 +3664,7 @@ sctp_try_advance_peer_ack_point(struct s * the next chunk. */ if ((tp1->sent == SCTP_FORWARD_TSN_SKIP) || - (tp1->sent == SCTP_DATAGRAM_NR_MARKED)) { + (tp1->sent == SCTP_DATAGRAM_NR_ACKED)) { /* advance PeerAckPoint goes forward */ if (SCTP_TSN_GT(tp1->rec.data.TSN_seq, asoc->advanced_peer_ack_point)) { asoc->advanced_peer_ack_point = tp1->rec.data.TSN_seq; @@ -3963,7 +3969,7 @@ sctp_express_handle_sack(struct sctp_tcb tp1->whoTo->cwnd -= tp1->book_size; tp1->rec.data.chunk_was_revoked = 0; } - if (tp1->sent != SCTP_DATAGRAM_NR_MARKED) { + if (tp1->sent != SCTP_DATAGRAM_NR_ACKED) { if (asoc->strmout[tp1->rec.data.stream_number].chunks_on_queues > 0) { asoc->strmout[tp1->rec.data.stream_number].chunks_on_queues--; #ifdef INVARIANTS @@ -4630,7 +4636,9 @@ sctp_handle_sack(struct mbuf *m, int off tp1->whoTo->cwnd -= tp1->book_size; tp1->rec.data.chunk_was_revoked = 0; } - tp1->sent = SCTP_DATAGRAM_ACKED; + if (tp1->sent != SCTP_DATAGRAM_NR_ACKED) { + tp1->sent = SCTP_DATAGRAM_ACKED; + } } } else { break; @@ -4707,7 +4715,7 @@ sctp_handle_sack(struct mbuf *m, int off if (SCTP_TSN_GT(tp1->rec.data.TSN_seq, cum_ack)) { break; } - if (tp1->sent != SCTP_DATAGRAM_NR_MARKED) { + if (tp1->sent != SCTP_DATAGRAM_NR_ACKED) { if (asoc->strmout[tp1->rec.data.stream_number].chunks_on_queues > 0) { asoc->strmout[tp1->rec.data.stream_number].chunks_on_queues--; #ifdef INVARIANTS Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Fri Nov 16 15:02:35 2012 (r243156) +++ head/sys/netinet/sctp_input.c Fri Nov 16 19:39:10 2012 (r243157) @@ -1948,6 +1948,7 @@ sctp_process_cookie_existing(struct mbuf sctp_report_all_outbound(stcb, 0, 1, SCTP_SO_NOT_LOCKED); for (i = 0; i < stcb->asoc.streamoutcnt; i++) { + stcb->asoc.strmout[i].chunks_on_queues = 0; stcb->asoc.strmout[i].stream_no = i; stcb->asoc.strmout[i].next_sequence_send = 0; stcb->asoc.strmout[i].last_msg_incomplete = 0; Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Fri Nov 16 15:02:35 2012 (r243156) +++ head/sys/netinet/sctp_output.c Fri Nov 16 19:39:10 2012 (r243157) @@ -3513,8 +3513,9 @@ sctp_process_cmsgs_for_init(struct sctp_ stcb->asoc.pre_open_streams = stcb->asoc.streamoutcnt; } for (i = 0; i < stcb->asoc.streamoutcnt; i++) { - stcb->asoc.strmout[i].next_sequence_send = 0; TAILQ_INIT(&stcb->asoc.strmout[i].outqueue); + stcb->asoc.strmout[i].chunks_on_queues = 0; + stcb->asoc.strmout[i].next_sequence_send = 0; stcb->asoc.strmout[i].stream_no = i; stcb->asoc.strmout[i].last_msg_incomplete = 0; stcb->asoc.ss_functions.sctp_ss_init_stream(&stcb->asoc.strmout[i], NULL); @@ -7494,6 +7495,7 @@ dont_do_it: *locked = 1; } asoc->chunks_on_out_queue++; + strq->chunks_on_queues++; TAILQ_INSERT_TAIL(&asoc->send_queue, chk, sctp_next); asoc->send_queue_cnt++; out_of: @@ -10153,7 +10155,7 @@ sctp_fill_in_rest: TAILQ_FOREACH(at, &asoc->sent_queue, sctp_next) { if ((at->sent != SCTP_FORWARD_TSN_SKIP) && - (at->sent != SCTP_DATAGRAM_NR_MARKED)) { + (at->sent != SCTP_DATAGRAM_NR_ACKED)) { /* no more to look at */ break; } @@ -11793,6 +11795,7 @@ sctp_send_str_reset_req(struct sctp_tcb stcb->asoc.ss_functions.sctp_ss_clear(stcb, &stcb->asoc, 0, 1); for (i = 0; i < stcb->asoc.streamoutcnt; i++) { TAILQ_INIT(&stcb->asoc.strmout[i].outqueue); + stcb->asoc.strmout[i].chunks_on_queues = oldstream[i].chunks_on_queues; stcb->asoc.strmout[i].next_sequence_send = oldstream[i].next_sequence_send; stcb->asoc.strmout[i].last_msg_incomplete = oldstream[i].last_msg_incomplete; stcb->asoc.strmout[i].stream_no = i; @@ -11813,8 +11816,9 @@ sctp_send_str_reset_req(struct sctp_tcb /* now the new streams */ stcb->asoc.ss_functions.sctp_ss_init(stcb, &stcb->asoc, 1); for (i = stcb->asoc.streamoutcnt; i < (stcb->asoc.streamoutcnt + adding_o); i++) { - stcb->asoc.strmout[i].next_sequence_send = 0x0; TAILQ_INIT(&stcb->asoc.strmout[i].outqueue); + stcb->asoc.strmout[i].chunks_on_queues = 0; + stcb->asoc.strmout[i].next_sequence_send = 0x0; stcb->asoc.strmout[i].stream_no = i; stcb->asoc.strmout[i].last_msg_incomplete = 0; stcb->asoc.ss_functions.sctp_ss_init_stream(&stcb->asoc.strmout[i], NULL); Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Fri Nov 16 15:02:35 2012 (r243156) +++ head/sys/netinet/sctp_pcb.c Fri Nov 16 19:39:10 2012 (r243157) @@ -4925,6 +4925,13 @@ sctp_free_assoc(struct sctp_inpcb *inp, } /* pending send queue SHOULD be empty */ TAILQ_FOREACH_SAFE(chk, &asoc->send_queue, sctp_next, nchk) { + if (asoc->strmout[chk->rec.data.stream_number].chunks_on_queues > 0) { + asoc->strmout[chk->rec.data.stream_number].chunks_on_queues--; +#ifdef INVARIANTS + } else { + panic("No chunks on the queues for sid %u.", chk->rec.data.stream_number); +#endif + } TAILQ_REMOVE(&asoc->send_queue, chk, sctp_next); if (chk->data) { if (so) { @@ -4949,7 +4956,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, } /* sent queue SHOULD be empty */ TAILQ_FOREACH_SAFE(chk, &asoc->sent_queue, sctp_next, nchk) { - if (chk->sent != SCTP_DATAGRAM_NR_MARKED) { + if (chk->sent != SCTP_DATAGRAM_NR_ACKED) { if (asoc->strmout[chk->rec.data.stream_number].chunks_on_queues > 0) { asoc->strmout[chk->rec.data.stream_number].chunks_on_queues--; #ifdef INVARIANTS @@ -4977,6 +4984,13 @@ sctp_free_assoc(struct sctp_inpcb *inp, SCTP_DECR_CHK_COUNT(); /* sa_ignore FREED_MEMORY */ } +#ifdef INVARIANTS + for (i = 0; i < stcb->asoc.streamoutcnt; i++) { + if (stcb->asoc.strmout[i].chunks_on_queues > 0) { + panic("%u chunks left for stream %u.", stcb->asoc.strmout[i].chunks_on_queues, i); + } + } +#endif /* control queue MAY not be empty */ TAILQ_FOREACH_SAFE(chk, &asoc->control_send_queue, sctp_next, nchk) { TAILQ_REMOVE(&asoc->control_send_queue, chk, sctp_next); Modified: head/sys/netinet/sctp_timer.c ============================================================================== --- head/sys/netinet/sctp_timer.c Fri Nov 16 15:02:35 2012 (r243156) +++ head/sys/netinet/sctp_timer.c Fri Nov 16 19:39:10 2012 (r243157) @@ -440,7 +440,7 @@ sctp_recover_sent_list(struct sctp_tcb * if (SCTP_TSN_GE(asoc->last_acked_seq, chk->rec.data.TSN_seq)) { SCTP_PRINTF("Found chk:%p tsn:%x <= last_acked_seq:%x\n", (void *)chk, chk->rec.data.TSN_seq, asoc->last_acked_seq); - if (chk->sent != SCTP_DATAGRAM_NR_MARKED) { + if (chk->sent != SCTP_DATAGRAM_NR_ACKED) { if (asoc->strmout[chk->rec.data.stream_number].chunks_on_queues > 0) { asoc->strmout[chk->rec.data.stream_number].chunks_on_queues--; } Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Fri Nov 16 15:02:35 2012 (r243156) +++ head/sys/netinet/sctputil.c Fri Nov 16 19:39:10 2012 (r243157) @@ -1054,6 +1054,7 @@ sctp_init_asoc(struct sctp_inpcb *m, str */ asoc->strmout[i].next_sequence_send = 0x0; TAILQ_INIT(&asoc->strmout[i].outqueue); + asoc->strmout[i].chunks_on_queues = 0; asoc->strmout[i].stream_no = i; asoc->strmout[i].last_msg_incomplete = 0; asoc->ss_functions.sctp_ss_init_stream(&asoc->strmout[i], NULL); @@ -3727,7 +3728,7 @@ sctp_report_all_outbound(struct sctp_tcb TAILQ_FOREACH_SAFE(chk, &asoc->sent_queue, sctp_next, nchk) { TAILQ_REMOVE(&asoc->sent_queue, chk, sctp_next); asoc->sent_queue_cnt--; - if (chk->sent != SCTP_DATAGRAM_NR_MARKED) { + if (chk->sent != SCTP_DATAGRAM_NR_ACKED) { if (asoc->strmout[chk->rec.data.stream_number].chunks_on_queues > 0) { asoc->strmout[chk->rec.data.stream_number].chunks_on_queues--; #ifdef INVARIANTS From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 19:39:29 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E2C8A9E0; Fri, 16 Nov 2012 19:39:29 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C90048FC08; Fri, 16 Nov 2012 19:39:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAGJdTfk050644; Fri, 16 Nov 2012 19:39:29 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAGJdTQa050642; Fri, 16 Nov 2012 19:39:29 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201211161939.qAGJdTQa050642@svn.freebsd.org> From: Adrian Chadd Date: Fri, 16 Nov 2012 19:39:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243158 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 19:39:30 -0000 Author: adrian Date: Fri Nov 16 19:39:29 2012 New Revision: 243158 URL: http://svnweb.freebsd.org/changeset/base/243158 Log: ath(4) ALQ logging improvements. * Add a new method which allows the driver to push the MAC/phy/hal info into the logging stream. * Add a new ALQ logging entry which logs the mac/phy/hal information. * Modify the ALQ startup path to log the MAC/phy/hal information so the decoder knows which HAL/chip is generating this information. * Convert the header and mac/phy/hal information to use be32, rather than host order. I'd like to make this stuff endian-agnostic so I can decode MIPS generated logs on a PC. This requires some further driver modifications to correctly log the right initial chip information. Also - although noone bar me is currently using this, I've shifted the debug bitmask around a bit. Consider yourself warned! Modified: head/sys/dev/ath/if_ath_alq.c head/sys/dev/ath/if_ath_alq.h Modified: head/sys/dev/ath/if_ath_alq.c ============================================================================== --- head/sys/dev/ath/if_ath_alq.c Fri Nov 16 19:39:10 2012 (r243157) +++ head/sys/dev/ath/if_ath_alq.c Fri Nov 16 19:39:29 2012 (r243158) @@ -43,6 +43,7 @@ #include #include #include +#include #include @@ -77,6 +78,18 @@ if_ath_alq_init(struct if_ath_alq *alq, } void +if_ath_alq_setcfg(struct if_ath_alq *alq, uint32_t macVer, + uint32_t macRev, uint32_t phyRev, uint32_t halMagic) +{ + + /* Store these in network order */ + alq->sc_alq_cfg.sc_mac_version = htobe32(macVer); + alq->sc_alq_cfg.sc_mac_revision = htobe32(macRev); + alq->sc_alq_cfg.sc_phy_rev = htobe32(phyRev); + alq->sc_alq_cfg.sc_hal_magic = htobe32(halMagic); +} + +void if_ath_alq_tidyup(struct if_ath_alq *alq) { @@ -106,6 +119,9 @@ if_ath_alq_start(struct if_ath_alq *alq) } else { printf("%s (%s): opened\n", __func__, alq->sc_alq_devname); alq->sc_alq_isactive = 1; + if_ath_alq_post(alq, ATH_ALQ_INIT_STATE, + sizeof (struct if_ath_alq_init_state), + (char *) &alq->sc_alq_cfg); } return (error); } @@ -155,17 +171,17 @@ if_ath_alq_post(struct if_ath_alq *alq, return; ap = (struct if_ath_alq_hdr *) ale->ae_data; - ap->threadid = (uint64_t) curthread->td_tid; - ap->tstamp = (uint32_t) ticks; - ap->op = op; - ap->len = len; + ap->threadid = htobe64((uint64_t) curthread->td_tid); + ap->tstamp = htobe32((uint32_t) ticks); + ap->op = htobe16(op); + ap->len = htobe16(len); /* * Copy the payload _after_ the header field. */ memcpy(((char *) ap) + sizeof(struct if_ath_alq_hdr), buf, - ap->len); + len); alq_post(alq->sc_alq_alq, ale); } Modified: head/sys/dev/ath/if_ath_alq.h ============================================================================== --- head/sys/dev/ath/if_ath_alq.h Fri Nov 16 19:39:10 2012 (r243157) +++ head/sys/dev/ath/if_ath_alq.h Fri Nov 16 19:39:29 2012 (r243158) @@ -31,6 +31,23 @@ #ifndef __IF_ATH_ALQ_H__ #define __IF_ATH_ALQ_H__ +#define ATH_ALQ_INIT_STATE 1 +struct if_ath_alq_init_state { + uint32_t sc_mac_version; + uint32_t sc_mac_revision; + uint32_t sc_phy_rev; + uint32_t sc_hal_magic; +}; + +#define ATH_ALQ_EDMA_TXSTATUS 2 +#define ATH_ALQ_EDMA_RXSTATUS 3 +#define ATH_ALQ_EDMA_TXDESC 4 + +/* + * These will always be logged, regardless. + */ +#define ATH_ALQ_LOG_ALWAYS_MASK 0x00000001 + #define ATH_ALQ_FILENAME_LEN 128 #define ATH_ALQ_DEVNAME_LEN 32 @@ -42,12 +59,9 @@ struct if_ath_alq { int sc_alq_isactive; char sc_alq_devname[ATH_ALQ_DEVNAME_LEN]; char sc_alq_filename[ATH_ALQ_FILENAME_LEN]; + struct if_ath_alq_init_state sc_alq_cfg; }; -#define ATH_ALQ_EDMA_TXSTATUS 1 -#define ATH_ALQ_EDMA_RXSTATUS 2 -#define ATH_ALQ_EDMA_TXDESC 3 - /* 128 bytes in total */ #define ATH_ALQ_PAYLOAD_LEN 112 @@ -68,10 +82,13 @@ static inline int if_ath_alq_checkdebug(struct if_ath_alq *alq, uint16_t op) { - return (alq->sc_alq_debug & (1 << (op - 1))); + return ((alq->sc_alq_debug | ATH_ALQ_LOG_ALWAYS_MASK) + & (1 << (op - 1))); } extern void if_ath_alq_init(struct if_ath_alq *alq, const char *devname); +extern void if_ath_alq_setcfg(struct if_ath_alq *alq, uint32_t macVer, + uint32_t macRev, uint32_t phyRev, uint32_t halMagic); extern void if_ath_alq_tidyup(struct if_ath_alq *alq); extern int if_ath_alq_start(struct if_ath_alq *alq); extern int if_ath_alq_stop(struct if_ath_alq *alq); From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 19:57:16 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BC1BF299; Fri, 16 Nov 2012 19:57:16 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 90CBE8FC0C; Fri, 16 Nov 2012 19:57:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAGJvGXI053089; Fri, 16 Nov 2012 19:57:16 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAGJvGEk053083; Fri, 16 Nov 2012 19:57:16 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201211161957.qAGJvGEk053083@svn.freebsd.org> From: Adrian Chadd Date: Fri, 16 Nov 2012 19:57:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243162 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 19:57:17 -0000 Author: adrian Date: Fri Nov 16 19:57:16 2012 New Revision: 243162 URL: http://svnweb.freebsd.org/changeset/base/243162 Log: ALQ logging enhancements: * upon setup, tell the alq code what the chip information is. * add TX/RX path logging for legacy chips. * populate the tx/rx descriptor length fields with a best-estimate. It's overly big (96 bytes when AH_SUPPORT_AR5416 is enabled) but it'll do for now. Whilst I'm here, add CURVNET_RESTORE() here during probe/attach as a partial solution to fixing crashes during attach when the attach fails. There are other attach failures that I have to deal with; those'll come later. Modified: head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_ath_rx.c head/sys/dev/ath/if_ath_tx.c head/sys/dev/ath/if_ath_tx.h Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Fri Nov 16 19:55:58 2012 (r243161) +++ head/sys/dev/ath/if_ath.c Fri Nov 16 19:57:16 2012 (r243162) @@ -296,6 +296,7 @@ ath_attach(u_int16_t devid, struct ath_s if (ifp == NULL) { device_printf(sc->sc_dev, "can not if_alloc()\n"); error = ENOSPC; + CURVNET_RESTORE(); goto bad; } ic = ifp->if_l2com; @@ -890,6 +891,11 @@ ath_attach(u_int16_t devid, struct ath_s */ #ifdef ATH_DEBUG_ALQ if_ath_alq_init(&sc->sc_alq, device_get_nameunit(sc->sc_dev)); + if_ath_alq_setcfg(&sc->sc_alq, + sc->sc_ah->ah_macVersion, + sc->sc_ah->ah_macRev, + sc->sc_ah->ah_phyRev, + sc->sc_ah->ah_magic); #endif /* @@ -3768,6 +3774,14 @@ ath_tx_processq(struct ath_softc *sc, st ath_printtxbuf(sc, bf, txq->axq_qnum, 0, status == HAL_OK); #endif +#ifdef ATH_DEBUG_ALQ + if (if_ath_alq_checkdebug(&sc->sc_alq, + ATH_ALQ_EDMA_TXSTATUS)) { + if_ath_alq_post(&sc->sc_alq, ATH_ALQ_EDMA_TXSTATUS, + sc->sc_tx_statuslen, + (char *) ds); + } +#endif if (status == HAL_EINPROGRESS) { ATH_KTR(sc, ATH_KTR_TXCOMP, 3, Modified: head/sys/dev/ath/if_ath_rx.c ============================================================================== --- head/sys/dev/ath/if_ath_rx.c Fri Nov 16 19:55:58 2012 (r243161) +++ head/sys/dev/ath/if_ath_rx.c Fri Nov 16 19:57:16 2012 (r243162) @@ -895,6 +895,13 @@ ath_rx_proc(struct ath_softc *sc, int re if (sc->sc_debug & ATH_DEBUG_RECV_DESC) ath_printrxbuf(sc, bf, 0, status == HAL_OK); #endif + +#ifdef ATH_DEBUG_ALQ + if (if_ath_alq_checkdebug(&sc->sc_alq, ATH_ALQ_EDMA_RXSTATUS)) + if_ath_alq_post(&sc->sc_alq, ATH_ALQ_EDMA_RXSTATUS, + sc->sc_rx_statuslen, (char *) ds); +#endif /* ATH_DEBUG_ALQ */ + if (status == HAL_EINPROGRESS) break; @@ -1120,7 +1127,11 @@ ath_recv_setup_legacy(struct ath_softc * { /* Sensible legacy defaults */ - sc->sc_rx_statuslen = 0; + /* + * XXX this should be changed to properly support the + * exact RX descriptor size for each HAL. + */ + sc->sc_rx_statuslen = sizeof(struct ath_desc); sc->sc_rx.recv_start = ath_legacy_startrecv; sc->sc_rx.recv_stop = ath_legacy_stoprecv; Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Fri Nov 16 19:55:58 2012 (r243161) +++ head/sys/dev/ath/if_ath_tx.c Fri Nov 16 19:57:16 2012 (r243162) @@ -130,6 +130,35 @@ static struct ath_buf * ath_tx_retry_clone(struct ath_softc *sc, struct ath_node *an, struct ath_tid *tid, struct ath_buf *bf); +#ifdef ATH_DEBUG_ALQ +void +ath_tx_alq_post(struct ath_softc *sc, struct ath_buf *bf_first) +{ + struct ath_buf *bf; + int i, n; + const char *ds; + + /* XXX we should skip out early if debugging isn't enabled! */ + bf = bf_first; + + while (bf != NULL) { + /* XXX should ensure bf_nseg > 0! */ + if (bf->bf_nseg == 0) + break; + n = ((bf->bf_nseg - 1) / sc->sc_tx_nmaps) + 1; + for (i = 0, ds = (const char *) bf->bf_desc; + i < n; + i++, ds += sc->sc_tx_desclen) { + if_ath_alq_post(&sc->sc_alq, + ATH_ALQ_EDMA_TXDESC, + sc->sc_tx_desclen, + ds); + } + bf = bf->bf_next; + } +} +#endif /* ATH_DEBUG_ALQ */ + /* * Whether to use the 11n rate scenario functions or not */ @@ -913,6 +942,11 @@ ath_legacy_xmit_handoff(struct ath_softc { ATH_TXQ_LOCK_ASSERT(txq); +#ifdef ATH_DEBUG_ALQ + if (if_ath_alq_checkdebug(&sc->sc_alq, ATH_ALQ_EDMA_TXDESC)) + ath_tx_alq_post(sc, bf); +#endif + if (txq->axq_qnum == ATH_TXQ_SWQ) ath_tx_handoff_mcast(sc, txq, bf); else @@ -5490,7 +5524,7 @@ ath_xmit_setup_legacy(struct ath_softc * * worry about extracting the real length out of the HAL later. */ sc->sc_tx_desclen = sizeof(struct ath_desc); - sc->sc_tx_statuslen = 0; + sc->sc_tx_statuslen = sizeof(struct ath_desc); sc->sc_tx_nmaps = 1; /* only one buffer per TX desc */ sc->sc_tx.xmit_setup = ath_legacy_dma_txsetup; Modified: head/sys/dev/ath/if_ath_tx.h ============================================================================== --- head/sys/dev/ath/if_ath_tx.h Fri Nov 16 19:55:58 2012 (r243161) +++ head/sys/dev/ath/if_ath_tx.h Fri Nov 16 19:57:16 2012 (r243162) @@ -131,6 +131,13 @@ extern void ath_tx_node_wakeup(struct at extern int ath_tx_node_is_asleep(struct ath_softc *sc, struct ath_node *an); /* + * Misc debugging stuff + */ +#ifdef ATH_DEBUG_ALQ +extern void ath_tx_alq_post(struct ath_softc *sc, struct ath_buf *bf_first); +#endif /* ATH_DEBUG_ALQ */ + +/* * Setup path */ #define ath_txdma_setup(_sc) \ From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 19:58:15 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EF24E414; Fri, 16 Nov 2012 19:58:15 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C9F368FC12; Fri, 16 Nov 2012 19:58:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAGJwF1S053228; Fri, 16 Nov 2012 19:58:15 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAGJwFdL053227; Fri, 16 Nov 2012 19:58:15 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201211161958.qAGJwFdL053227@svn.freebsd.org> From: Adrian Chadd Date: Fri, 16 Nov 2012 19:58:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243163 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 19:58:16 -0000 Author: adrian Date: Fri Nov 16 19:58:15 2012 New Revision: 243163 URL: http://svnweb.freebsd.org/changeset/base/243163 Log: * Remove a duplicate TX ALQ post routine! * For CABQ traffic, I -can- chain them together using the next pointer and just push that particular chain head to the CABQ. However, this doesn't magically make EDMA TX CABQ work - I have to do some further hoop jumping. Modified: head/sys/dev/ath/if_ath_tx_edma.c Modified: head/sys/dev/ath/if_ath_tx_edma.c ============================================================================== --- head/sys/dev/ath/if_ath_tx_edma.c Fri Nov 16 19:57:16 2012 (r243162) +++ head/sys/dev/ath/if_ath_tx_edma.c Fri Nov 16 19:58:15 2012 (r243163) @@ -136,37 +136,6 @@ MALLOC_DECLARE(M_ATHDEV); static void ath_edma_tx_processq(struct ath_softc *sc, int dosched); -#ifdef ATH_DEBUG_ALQ -static void -ath_edma_tx_alq_post(struct ath_softc *sc, struct ath_buf *bf_first) -{ - struct ath_buf *bf; - int i, n; - const char *ds; - - /* XXX we should skip out early if debugging isn't enabled! */ - bf = bf_first; - - while (bf != NULL) { - /* XXX assume nmaps = 4! */ - /* XXX should ensure bf_nseg > 0! */ - if (bf->bf_nseg == 0) - break; - n = ((bf->bf_nseg - 1) / 4) + 1; - for (i = 0, ds = (const char *) bf->bf_desc; - i < n; - i++, ds += sc->sc_tx_desclen) { - if_ath_alq_post(&sc->sc_alq, - ATH_ALQ_EDMA_TXDESC, - 96, - ds); - } - - bf = bf->bf_next; - } -} -#endif /* ATH_DEBUG_ALQ */ - static void ath_edma_tx_fifo_fill(struct ath_softc *sc, struct ath_txq *txq) { @@ -187,7 +156,7 @@ ath_edma_tx_fifo_fill(struct ath_softc * #endif/* ATH_DEBUG */ #ifdef ATH_DEBUG_ALQ if (if_ath_alq_checkdebug(&sc->sc_alq, ATH_ALQ_EDMA_TXDESC)) - ath_edma_tx_alq_post(sc, bf); + ath_tx_alq_post(sc, bf); #endif /* ATH_DEBUG_ALQ */ txq->axq_fifo_depth++; i++; @@ -260,7 +229,7 @@ ath_edma_xmit_handoff_hw(struct ath_soft #endif /* ATH_DEBUG */ #ifdef ATH_DEBUG_ALQ if (if_ath_alq_checkdebug(&sc->sc_alq, ATH_ALQ_EDMA_TXDESC)) - ath_edma_tx_alq_post(sc, bf); + ath_tx_alq_post(sc, bf); #endif /* ATH_DEBUG_ALQ */ ath_hal_puttxbuf(ah, txq->axq_qnum, bf->bf_daddr); txq->axq_fifo_depth++; @@ -271,16 +240,9 @@ ath_edma_xmit_handoff_hw(struct ath_soft /* * Hand off this frame to a multicast software queue. * - * Unlike legacy DMA, this doesn't chain together frames via the - * link pointer. Instead, they're just added to the queue. - * When it comes time to populate the CABQ, these frames should - * be individually pushed into the FIFO as appropriate. - * - * Yes, this does mean that I'll eventually have to flesh out some - * replacement code to handle populating the CABQ, rather than - * what's done in ath_beacon_generate(). It'll have to push each - * frame from the HW CABQ to the FIFO rather than just appending - * it to the existing TXQ and kicking off DMA. + * The EDMA TX CABQ will get a list of chained frames, chained + * together using the next pointer. The single head of that + * particular queue is pushed to the hardware CABQ. */ static void ath_edma_xmit_handoff_mcast(struct ath_softc *sc, struct ath_txq *txq, @@ -307,7 +269,13 @@ ath_edma_xmit_handoff_mcast(struct ath_s BUS_DMASYNC_PREWRITE); } +#ifdef ATH_DEBUG_ALQ + if (if_ath_alq_checkdebug(&sc->sc_alq, ATH_ALQ_EDMA_TXDESC)) + ath_tx_alq_post(sc, bf); +#endif /* ATH_DEBUG_ALQ */ + ATH_TXQ_INSERT_TAIL(txq, bf, bf_list); + ath_hal_gettxdesclinkptr(sc->sc_ah, bf->bf_lastds, &txq->axq_link); } /* From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 20:04:47 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0795F611; Fri, 16 Nov 2012 20:04:47 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id DAA708FC17; Fri, 16 Nov 2012 20:04:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAGK4j24054315; Fri, 16 Nov 2012 20:04:45 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAGK4jKn054314; Fri, 16 Nov 2012 20:04:45 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201211162004.qAGK4jKn054314@svn.freebsd.org> From: Adrian Chadd Date: Fri, 16 Nov 2012 20:04:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243164 - head/sys/dev/ath/ath_hal/ar5416 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 20:04:47 -0000 Author: adrian Date: Fri Nov 16 20:04:45 2012 New Revision: 243164 URL: http://svnweb.freebsd.org/changeset/base/243164 Log: I'm not sure why ah_desc.h was required here, but it doesn't _need_ to be. So, just toss it. There's no options or ah_desc fields in here. Whilst I'm here, fix up the #ifdef and #define to mach. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416desc.h Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416desc.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416desc.h Fri Nov 16 19:58:15 2012 (r243163) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416desc.h Fri Nov 16 20:04:45 2012 (r243164) @@ -17,12 +17,11 @@ * $FreeBSD$ */ #ifndef _ATH_AR5416_DESC_H_ -#define _ATH_AR5416_DESC_H +#define _ATH_AR5416_DESC_H_ /* * Hardware-specific descriptor structures. */ -#include "ah_desc.h" /* XXX Need to replace this with a dynamic * method of determining Owl2 if possible From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 20:32:47 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9FC119C5; Fri, 16 Nov 2012 20:32:47 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id E9B868FC13; Fri, 16 Nov 2012 20:32:46 +0000 (UTC) Received: from tom.home (localhost [127.0.0.1]) by kib.kiev.ua (8.14.5/8.14.5) with ESMTP id qAGKWbq7024403; Fri, 16 Nov 2012 22:32:37 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.7.1 kib.kiev.ua qAGKWbq7024403 Received: (from kostik@localhost) by tom.home (8.14.5/8.14.5/Submit) id qAGKWbew024402; Fri, 16 Nov 2012 22:32:37 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 16 Nov 2012 22:32:37 +0200 From: Konstantin Belousov To: Bruce Evans Subject: Re: svn commit: r243134 - head/sys/sys Message-ID: <20121116203237.GO73505@kib.kiev.ua> References: <201211160625.qAG6PLd2032062@svn.freebsd.org> <20121116160539.GN73505@kib.kiev.ua> <20121117040901.I3439@besplex.bde.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zqRs+0AMW4nH7Axv" Content-Disposition: inline In-Reply-To: <20121117040901.I3439@besplex.bde.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=0.2 required=5.0 tests=ALL_TRUSTED, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-head@freebsd.org, mdf@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 20:32:47 -0000 --zqRs+0AMW4nH7Axv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Nov 17, 2012 at 04:24:06AM +1100, Bruce Evans wrote: > On Fri, 16 Nov 2012, Konstantin Belousov wrote: >=20 > > On Fri, Nov 16, 2012 at 08:02:39AM -0800, mdf@FreeBSD.org wrote: > >> On Thu, Nov 15, 2012 at 10:25 PM, Konstantin Belousov wrote: > >>> Author: kib > >>> Date: Fri Nov 16 06:25:20 2012 > >>> New Revision: 243134 > >>> URL: http://svnweb.freebsd.org/changeset/base/243134 > >>> > >>> Log: > >>> Alphabetically reorder the forward-declarations of the structures. > >>> Add the declaration for enum idtype, to be used later. > >> > >> Forward declarations of enums isn't an ISO C feature, but a gcc > >> extension. While the kernel uses many gcc extensions, it hides most > >> under a #define so unsupported compilers can continue along. This > >> unsupported feature can't be hidden. >=20 > Ugh. We discussed the unportability of enums in APIs when cleaning this > up. kib said that the size of an enum type is an ABI standard for i386 > and amd64. I don't quite agree for i386, and we didn't discuss other > arches. The size of an enum type must be fixed for the gcc extension > to be possible. In my copy of the SVID rev 4, document abi386, it is stated absolutely clear that Integral enum types are represented as the signed word with sizeof 4 and alignment 4. This is in Figure 3-1 Scalar Types, page 28. For amd64, in the ABI document 0.99.6, enums are again specified in the figure 3.1 as having signed fourbyte representation with the alighnment 4. Now, there is a footnote stating "C++ and some implementations of C permit enums larger than an int. The underlying type is bumped to an unsigned int, long int or unsigned long int, in that order. " But I think that the complain is not about the ABI, but regarding the use of the extension. I see three routes forward: - Keep the things as is. The only downside is the use of the extension which is supported by both gcc and clang. - Change idtype_t to int and use #defines to introduce P_XXX constants. This is not easy since Solaris contrib code uses enum, and enum was selected to not introduce unneeded incompatibility, at least for the kernel code. - Include sys/wait.h from sys/syscallsubr.h. A modification is to put idtype_h into a private header and include the header from syscallsubr.h and wait.h. My preference is to keep the things as is, but I am open for discussion. >=20 > gcc -std=3Dc99 -pedantic generates a warning for forward enum declaration. > Long ago, I routinely tested with -pedantic and committed fixes for all > the things that it found if they were not too hard to fix. >=20 > >> Does the forward declaration prevent another warning? > > > > It allows to prevent the namespace pollution from sys/wait.h idtype_t, = needed > > due to the kern_wait6() declaration. >=20 > syscallsubr.h and especially sysproto.h have lots of other namespace > pollution. My version of sysproto.h reduces the pollution to just > using 6 #define hacks and 1 clean #include change to > reduce 5 polluting headers and 1 non-polluting one to 1 different > non-polluting one. The #define hacks can't work for enums. >=20 > When I worked on reducing the pollution in sysproto.h in its automatic > generation, I got it down to and not much more. > because available later, but -current still has the > full pollution of and much more. Non-auto-generated > headers like syscallsubr.h are easier to clean. >=20 > Bruce --zqRs+0AMW4nH7Axv Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlCmouQACgkQC3+MBN1Mb4iexgCfcVUVFgE8+PXap+QXiNJR/vz8 eecAnRvbRnVvWin9puq8/3zdE1qkqR3t =nn5D -----END PGP SIGNATURE----- --zqRs+0AMW4nH7Axv-- From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 21:38:44 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DABB05B9; Fri, 16 Nov 2012 21:38:44 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vps.rulingia.com (host-122-100-2-194.octopus.com.au [122.100.2.194]) by mx1.freebsd.org (Postfix) with ESMTP id 374278FC08; Fri, 16 Nov 2012 21:38:43 +0000 (UTC) Received: from server.rulingia.com (c220-239-241-202.belrs5.nsw.optusnet.com.au [220.239.241.202]) by vps.rulingia.com (8.14.5/8.14.5) with ESMTP id qAGLcehJ088806 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 17 Nov 2012 08:38:41 +1100 (EST) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.14.5/8.14.5) with ESMTP id qAGLcWr4095829 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 17 Nov 2012 08:38:33 +1100 (EST) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.14.5/8.14.5/Submit) id qAGLcVcT095827; Sat, 17 Nov 2012 08:38:31 +1100 (EST) (envelope-from peter) Date: Sat, 17 Nov 2012 08:38:31 +1100 From: Peter Jeremy To: Dimitry Andric Subject: Re: svn commit: r242625 - in head/sys: dev/ale dev/ata dev/ata/chipsets dev/ath/ath_hal/ar5212 dev/bge dev/cas dev/dc dev/flash dev/fxp dev/gem dev/lge dev/mii dev/nge dev/pci dev/re dev/sis dev/ste de... Message-ID: <20121116213831.GW36898@server.rulingia.com> References: <201211051916.qA5JGRDr064585@svn.freebsd.org> <5098416C.3040802@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="O8XZ+2Hy8Kj8wLPZ" Content-Disposition: inline In-Reply-To: <5098416C.3040802@FreeBSD.org> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, Adrian Chadd , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 21:38:45 -0000 --O8XZ+2Hy8Kj8wLPZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2012-Nov-05 23:45:00 +0100, Dimitry Andric wrote: >On 2012-11-05 23:36, Adrian Chadd wrote: >> I'm fine with the change, but why didn't you run this by the various >> driver owners first before doing a drive-by commit? > >The change was trivial, and did not cause any binary difference. I see >no reason to bother 20 different maintainers with something like this, >except bureaucratic ones... :) A bit belated but I think you've missed the most important reason why you should warn maintainers: You can be creating additional effort for maintainers. There is an ongoing push to make head more stable by pushing experimental development into "private" branches which can then be merged back to head once the functionality is stable. Whilst there may not be a binary difference, you are creating source changes. If you've changed something that a maintainer is actively working on, they need to take the time to work out if the change is still relevant and whether it impacts the testing they have done. --=20 Peter Jeremy --O8XZ+2Hy8Kj8wLPZ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlCmslcACgkQ/opHv/APuIcjhQCfdfojhFm65IzT8IwUrn09pxHb cT0AnRkrdRX97DAF1WSlD9YpEhpwZDiG =PLKu -----END PGP SIGNATURE----- --O8XZ+2Hy8Kj8wLPZ-- From owner-svn-src-head@FreeBSD.ORG Sat Nov 17 00:07:29 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EE734F2A; Sat, 17 Nov 2012 00:07:28 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D0BC78FC12; Sat, 17 Nov 2012 00:07:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAH07SQR088353; Sat, 17 Nov 2012 00:07:28 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAH07STw088352; Sat, 17 Nov 2012 00:07:28 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201211170007.qAH07STw088352@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 17 Nov 2012 00:07:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243165 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2012 00:07:29 -0000 Author: marcel Date: Sat Nov 17 00:07:28 2012 New Revision: 243165 URL: http://svnweb.freebsd.org/changeset/base/243165 Log: Install bsd.progs.mk, needed by bsd.test.mk and thus by atf.test.mk. Modified: head/share/mk/Makefile Modified: head/share/mk/Makefile ============================================================================== --- head/share/mk/Makefile Fri Nov 16 20:04:45 2012 (r243164) +++ head/share/mk/Makefile Sat Nov 17 00:07:28 2012 (r243165) @@ -32,6 +32,7 @@ FILES= \ bsd.port.pre.mk \ bsd.port.subdir.mk \ bsd.prog.mk \ + bsd.progs.mk \ bsd.snmpmod.mk \ bsd.subdir.mk \ bsd.symver.mk \ From owner-svn-src-head@FreeBSD.ORG Sat Nov 17 01:11:00 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D84689B4; Sat, 17 Nov 2012 01:11:00 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id BB15A8FC08; Sat, 17 Nov 2012 01:11:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAH1B0eG096352; Sat, 17 Nov 2012 01:11:00 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAH1B0Bb096346; Sat, 17 Nov 2012 01:11:00 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201211170111.qAH1B0Bb096346@svn.freebsd.org> From: Adrian Chadd Date: Sat, 17 Nov 2012 01:11:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243166 - head/tools/tools/ath/athalq X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2012 01:11:00 -0000 Author: adrian Date: Sat Nov 17 01:11:00 2012 New Revision: 243166 URL: http://svnweb.freebsd.org/changeset/base/243166 Log: Implement a basic data decoder for the data produced by if_ath_alq. This decodes the AR5416 family 11n TX and RX descriptors. Added: head/tools/tools/ath/athalq/ head/tools/tools/ath/athalq/Makefile (contents, props changed) head/tools/tools/ath/athalq/ar5416_ds.c (contents, props changed) head/tools/tools/ath/athalq/ar5416_ds.h (contents, props changed) head/tools/tools/ath/athalq/main.c (contents, props changed) Added: head/tools/tools/ath/athalq/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/ath/athalq/Makefile Sat Nov 17 01:11:00 2012 (r243166) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +PROG= athalq +NOMAN= yes + +SRCS= main.c ar5416_ds.c + +.include <../Makefile.inc> + +.include Added: head/tools/tools/ath/athalq/ar5416_ds.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/ath/athalq/ar5416_ds.c Sat Nov 17 01:11:00 2012 (r243166) @@ -0,0 +1,356 @@ +/* + * Copyright (c) 2012 Adrian Chadd + * All Rights Reserved. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include "ar5416_ds.h" + +#define MS(_v, _f) ( ((_v) & (_f)) >> _f##_S ) +#define MF(_v, _f) ( !! ((_v) & (_f))) + +static void +ar5416_decode_txstatus(struct if_ath_alq_payload *a) +{ + struct ar5416_desc txs; + + /* XXX assumes txs is smaller than PAYLOAD_LEN! */ + memcpy(&txs, &a->payload, sizeof(struct ar5416_desc)); + + printf("[%u] [%llu] TXSTATUS\n", + (unsigned int) be32toh(a->hdr.tstamp), + (unsigned long long) be64toh(a->hdr.threadid)); + + /* ds_txstatus0 */ + printf(" RX RSSI 0 [%d %d %d]\n", + MS(txs.u.tx.status[0], AR_TxRSSIAnt00), + MS(txs.u.tx.status[0], AR_TxRSSIAnt01), + MS(txs.u.tx.status[0], AR_TxRSSIAnt02)); + printf(" BA Valid=%d\n", + MF(txs.u.tx.status[0], AR_TxBaStatus)); + + /* ds_txstatus1 */ + printf(" Frmok=%d, xretries=%d, fifounderrun=%d, filt=%d\n", + MF(txs.u.tx.status[1], AR_FrmXmitOK), + MF(txs.u.tx.status[1], AR_ExcessiveRetries), + MF(txs.u.tx.status[1], AR_FIFOUnderrun), + MF(txs.u.tx.status[1], AR_Filtered)); + printf(" DelimUnderrun=%d, DataUnderun=%d, DescCfgErr=%d," + " TxTimerExceeded=%d\n", + MF(txs.u.tx.status[1], AR_TxDelimUnderrun), + MF(txs.u.tx.status[1], AR_TxDataUnderrun), + MF(txs.u.tx.status[1], AR_DescCfgErr), + MF(txs.u.tx.status[1], AR_TxTimerExpired)); + + printf(" RTScnt=%d, FailCnt=%d, VRetryCnt=%d\n", + MS(txs.u.tx.status[1], AR_RTSFailCnt), + MS(txs.u.tx.status[1], AR_DataFailCnt), + MS(txs.u.tx.status[1], AR_VirtRetryCnt)); + + /* ds_txstatus2 */ + printf(" TxTimestamp=0x%08x\n", txs.u.tx.status[2]); + + /* ds_txstatus3 */ + /* ds_txstatus4 */ + printf(" BALow=0x%08x\n", txs.u.tx.status[3]); + printf(" BAHigh=0x%08x\n", txs.u.tx.status[4]); + + /* ds_txstatus5 */ + printf(" RX RSSI 1 [%d %d %d] Comb=%d\n", + MS(txs.u.tx.status[5], AR_TxRSSIAnt10), + MS(txs.u.tx.status[5], AR_TxRSSIAnt11), + MS(txs.u.tx.status[5], AR_TxRSSIAnt12), + MS(txs.u.tx.status[5], AR_TxRSSICombined)); + + /* ds_txstatus6 */ + /* ds_txstatus7 */ + /* ds_txstatus8 */ + printf(" TxEVM[0]=0x%08x, TxEVM[1]=0x%08x, TxEVM[2]=0x%08x\n", + txs.u.tx.status[6], + txs.u.tx.status[7], + txs.u.tx.status[8]); + + /* ds_txstatus9 */ + printf(" TxDone=%d, SeqNum=0x%04x, TxOpExceeded=%d, FinalTsIdx=%d\n", + MF(txs.u.tx.status[9], AR_TxDone), + MS(txs.u.tx.status[9], AR_SeqNum), + MF(txs.u.tx.status[9], AR_TxOpExceeded), + MS(txs.u.tx.status[9], AR_FinalTxIdx)); + printf(" PowerMgmt=%d, TxTid=%d\n", + MF(txs.u.tx.status[9], AR_PowerMgmt), + MS(txs.u.tx.status[9], AR_TxTid)); + + printf("\n ------\n"); +} + +static void +ar5416_decode_txdesc(struct if_ath_alq_payload *a) +{ + struct ar5416_desc txc; + + /* XXX assumes txs is smaller than PAYLOAD_LEN! */ + memcpy(&txc, &a->payload, sizeof(struct ar5416_desc)); + + printf("[%u] [%llu] TXD\n", + (unsigned int) be32toh(a->hdr.tstamp), + (unsigned long long) be64toh(a->hdr.threadid)); + + printf(" link=0x%08x, data=0x%08x\n", + txc.ds_link, + txc.ds_data); + + /* ds_ctl0 */ + printf(" Frame Len=%d, VMF=%d\n", + txc.ds_ctl0 & AR_FrameLen, + MF(txc.ds_ctl0, AR_VirtMoreFrag)); + printf(" TX power0=%d, RtsEna=%d, Veol=%d, ClrDstMask=%d\n", + MS(txc.ds_ctl0, AR_XmitPower), + MF(txc.ds_ctl0, AR_RTSEnable), + MF(txc.ds_ctl0, AR_VEOL), + MF(txc.ds_ctl0, AR_ClrDestMask)); + printf(" TxIntrReq=%d, DestIdxValid=%d, CtsEnable=%d\n", + MF(txc.ds_ctl0, AR_TxIntrReq), + MF(txc.ds_ctl0, AR_DestIdxValid), + MF(txc.ds_ctl0, AR_CTSEnable)); + + /* ds_ctl1 */ + printf(" BufLen=%d, TxMore=%d, DestIdx=%d," + " FrType=0x%x\n", + txc.ds_ctl1 & AR_BufLen, + MF(txc.ds_ctl1, AR_TxMore), + MS(txc.ds_ctl1, AR_DestIdx), + MS(txc.ds_ctl1, AR_FrameType)); + printf(" NoAck=%d, InsertTs=%d, CorruptFcs=%d, ExtOnly=%d," + " ExtAndCtl=%d\n", + MF(txc.ds_ctl1, AR_NoAck), + MF(txc.ds_ctl1, AR_InsertTS), + MF(txc.ds_ctl1, AR_CorruptFCS), + MF(txc.ds_ctl1, AR_ExtOnly), + MF(txc.ds_ctl1, AR_ExtAndCtl)); + printf(" MoreAggr=%d, IsAggr=%d, MoreRifs=%d\n", + MF(txc.ds_ctl1, AR_MoreAggr), + MF(txc.ds_ctl1, AR_IsAggr), + MF(txc.ds_ctl1, AR_MoreRifs)); + + /* ds_ctl2 */ + printf(" DurUpEna=%d, Burstdur=0x%04x\n", + MF(txc.ds_ctl2, AR_DurUpdateEn), + MS(txc.ds_ctl2, AR_BurstDur)); + printf(" Try0=%d, Try1=%d, Try2=%d, Try3=%d\n", + MS(txc.ds_ctl2, AR_XmitDataTries0), + MS(txc.ds_ctl2, AR_XmitDataTries1), + MS(txc.ds_ctl2, AR_XmitDataTries2), + MS(txc.ds_ctl2, AR_XmitDataTries3)); + + /* ds_ctl3 */ + printf(" rate0=0x%02x, rate1=0x%02x, rate2=0x%02x, rate3=0x%02x\n", + MS(txc.ds_ctl3, AR_XmitRate0), + MS(txc.ds_ctl3, AR_XmitRate1), + MS(txc.ds_ctl3, AR_XmitRate2), + MS(txc.ds_ctl3, AR_XmitRate3)); + + /* ds_ctl4 */ + printf(" try 0: PktDur=%d, RTS/CTS ena=%d\n", + MS(txc.ds_ctl4, AR_PacketDur0), + MF(txc.ds_ctl4, AR_RTSCTSQual0)); + printf(" try 1: PktDur=%d, RTS/CTS ena=%d\n", + MS(txc.ds_ctl4, AR_PacketDur1), + MF(txc.ds_ctl4, AR_RTSCTSQual1)); + + /* ds_ctl5 */ + printf(" try 2: PktDur=%d, RTS/CTS ena=%d\n", + MS(txc.ds_ctl5, AR_PacketDur2), + MF(txc.ds_ctl5, AR_RTSCTSQual2)); + printf(" try 3: PktDur=%d, RTS/CTS ena=%d\n", + MS(txc.ds_ctl5, AR_PacketDur3), + MF(txc.ds_ctl5, AR_RTSCTSQual3)); + + /* ds_ctl6 */ + printf(" AggrLen=%d, PadDelim=%d, EncrType=%d\n", + MS(txc.ds_ctl6, AR_AggrLen), + MS(txc.ds_ctl6, AR_PadDelim), + MS(txc.ds_ctl6, AR_EncrType)); + + /* ds_ctl7 */ + printf(" try 0: chainMask=0x%x, GI=%d, 2040=%d, STBC=%d\n", + MS(txc.ds_ctl7, AR_ChainSel0), + MF(txc.ds_ctl7, AR_GI0), + MF(txc.ds_ctl7, AR_2040_0), + MF(txc.ds_ctl7, AR_STBC0)); + printf(" try 1: chainMask=0x%x, GI=%d, 2040=%d, STBC=%d\n", + MS(txc.ds_ctl7, AR_ChainSel1), + MF(txc.ds_ctl7, AR_GI1), + MF(txc.ds_ctl7, AR_2040_1), + MF(txc.ds_ctl7, AR_STBC1)); + printf(" try 2: chainMask=0x%x, GI=%d, 2040=%d, STBC=%d\n", + MS(txc.ds_ctl7, AR_ChainSel2), + MF(txc.ds_ctl7, AR_GI2), + MF(txc.ds_ctl7, AR_2040_2), + MF(txc.ds_ctl7, AR_STBC2)); + printf(" try 3: chainMask=0x%x, GI=%d, 2040=%d, STBC=%d\n", + MS(txc.ds_ctl7, AR_ChainSel3), + MF(txc.ds_ctl7, AR_GI3), + MF(txc.ds_ctl7, AR_2040_3), + MF(txc.ds_ctl7, AR_STBC3)); + + /* ds_ctl8 */ + printf(" try 0: ant=0x%08x\n", txc.ds_ctl8 & AR_AntCtl0); + + /* ds_ctl9 */ + printf(" try 1: TxPower=%d, ant=0x%08x\n", + MS(txc.ds_ctl9, AR_XmitPower1), + txc.ds_ctl9 & AR_AntCtl1); + + /* ds_ctl10 */ + printf(" try 2: TxPower=%d, ant=0x%08x\n", + MS(txc.ds_ctl10, AR_XmitPower2), + txc.ds_ctl10 & AR_AntCtl2); + + /* ds_ctl11 */ + printf(" try 3: TxPower=%d, ant=0x%08x\n", + MS(txc.ds_ctl11, AR_XmitPower3), + txc.ds_ctl11 & AR_AntCtl3); + + printf("\n ------ \n"); +} + +static void +ar5416_decode_rxstatus(struct if_ath_alq_payload *a) +{ + struct ar5416_desc rxs; + + /* XXX assumes rxs is smaller than PAYLOAD_LEN! */ + memcpy(&rxs, &a->payload, sizeof(struct ar5416_desc)); + + printf("[%u] [%llu] RXSTATUS\n", + (unsigned int) be32toh(a->hdr.tstamp), + (unsigned long long) be64toh(a->hdr.threadid)); + + printf(" link=0x%08x, data=0x%08x, ctl0=0x%08x, ctl2=0x%08x\n", + rxs.ds_link, + rxs.ds_data, + rxs.ds_ctl0, + rxs.ds_ctl1); + + /* status0 */ + /* + * XXX TODO: For AR9285, the chain 1 and chain 2 RSSI values + * acutally contain the RX mixer configuration + */ + printf(" RSSICtl[0]=%d, RSSICtl[1]=%d, RSSICtl[2]=%d\n", + MS(rxs.ds_rxstatus0, AR_RxRSSIAnt00), + MS(rxs.ds_rxstatus0, AR_RxRSSIAnt01), + MS(rxs.ds_rxstatus0, AR_RxRSSIAnt02)); + + /* status1 */ + printf(" DataLen=%d, RxMore=%d, NumDelim=%d\n", + rxs.ds_rxstatus1 & AR_DataLen, + MF(rxs.ds_rxstatus1, AR_RxMore), + MS(rxs.ds_rxstatus1, AR_NumDelim)); + + /* status2 */ + printf(" RxTimestamp=0x%08x\n", rxs.ds_rxstatus2); + + /* status3 - RxRate however is for Owl 2.0 */ + printf(" GI=%d, 2040=%d, RxRate=0x%02x, DupFrame=%d, RxAnt=0x%08x\n", + MF(rxs.ds_rxstatus3, AR_GI), + MF(rxs.ds_rxstatus3, AR_2040), + MS(rxs.ds_rxstatus0, AR_RxRate), + MF(rxs.ds_rxstatus3, AR_DupFrame), + MS(rxs.ds_rxstatus3, AR_RxAntenna)); + + /* status4 */ + printf(" RSSIExt[0]=%d, RSSIExt[1]=%d, RSSIExt[2]=%d, RSSIComb=%d\n", + MS(rxs.ds_rxstatus4, AR_RxRSSIAnt10), + MS(rxs.ds_rxstatus4, AR_RxRSSIAnt11), + MS(rxs.ds_rxstatus4, AR_RxRSSIAnt12), + MS(rxs.ds_rxstatus4, AR_RxRSSICombined)); + + /* status5 */ + /* status6 */ + /* status7 */ + printf(" RxEvm0=0x%08x, RxEvm1=0x%08x, RxEvm2=0x%08x\n", + rxs.ds_rxstatus5, + rxs.ds_rxstatus6, + rxs.ds_rxstatus7); + + /* status8 */ + printf(" RxDone=%d, RxFrameOk=%d, CrcErr=%d, DecryptCrcErr=%d\n", + MF(rxs.ds_rxstatus8, AR_RxDone), + MF(rxs.ds_rxstatus8, AR_RxFrameOK), + MF(rxs.ds_rxstatus8, AR_CRCErr), + MF(rxs.ds_rxstatus8, AR_DecryptCRCErr)); + printf(" PhyErr=%d, MichaelErr=%d, PreDelimCRCErr=%d, KeyIdxValid=%d\n", + MF(rxs.ds_rxstatus8, AR_PHYErr), + MF(rxs.ds_rxstatus8, AR_MichaelErr), + MF(rxs.ds_rxstatus8, AR_PreDelimCRCErr), + MF(rxs.ds_rxstatus8, AR_RxKeyIdxValid)); + + /* If PHY error, print that out. Otherwise, the key index */ + if (MF(rxs.ds_rxstatus8, AR_PHYErr)) + printf(" PhyErrCode=0x%02x\n", + MS(rxs.ds_rxstatus8, AR_PHYErrCode)); + else + printf(" KeyIdx=0x%02x\n", + MS(rxs.ds_rxstatus8, AR_KeyIdx)); + + printf(" RxMoreAggr=%d, RxAggr=%d, PostDelimCRCErr=%d, HiRxChain=%d\n", + MF(rxs.ds_rxstatus8, AR_RxMoreAggr), + MF(rxs.ds_rxstatus8, AR_RxAggr), + MF(rxs.ds_rxstatus8, AR_PostDelimCRCErr), + MF(rxs.ds_rxstatus8, AR_HiRxChain)); + printf(" KeyMiss=%d\n", + MF(rxs.ds_rxstatus8, AR_KeyMiss)); + + printf("\n ------\n"); +} + +void +ar5416_alq_payload(struct if_ath_alq_payload *a) +{ + + switch (be16toh(a->hdr.op)) { + case ATH_ALQ_EDMA_TXSTATUS: /* TXSTATUS */ + ar5416_decode_txstatus(a); + break; + case ATH_ALQ_EDMA_RXSTATUS: /* RXSTATUS */ + ar5416_decode_rxstatus(a); + break; + case ATH_ALQ_EDMA_TXDESC: /* TXDESC */ + ar5416_decode_txdesc(a); + break; + default: + printf("[%d] [%lld] op: %d; len %d\n", + be32toh(a->hdr.tstamp), + be64toh(a->hdr.threadid), + be16toh(a->hdr.op), be16toh(a->hdr.len)); + } +} Added: head/tools/tools/ath/athalq/ar5416_ds.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/ath/athalq/ar5416_ds.h Sat Nov 17 01:11:00 2012 (r243166) @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2012 Adrian Chadd + * All Rights Reserved. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $FreeBSD$ + */ +#ifndef __AR5416_DS_H__ +#define __AR5416_DS_H__ + +extern void ar5416_alq_payload(struct if_ath_alq_payload *a); + +#endif /* __AR5416_DS_H__ */ Added: head/tools/tools/ath/athalq/main.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/ath/athalq/main.c Sat Nov 17 01:11:00 2012 (r243166) @@ -0,0 +1,139 @@ +/* + * Copyright (c) 2012 Adrian Chadd + * All Rights Reserved. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#if 0 +#include "ar9300_ds.h" +#endif +#include "ar5416_ds.h" + +#define AR5210_MAGIC 0x19980124 +#define AR5211_MAGIC 0x19570405 +#define AR5212_MAGIC 0x19541014 +#define AR5416_MAGIC 0x20065416 +#define AR9300_MAGIC 0x19741014 + +#define READBUF_SIZE 1024 + +struct if_ath_alq_init_state hdr; + +static void +ath_alq_print_hdr(struct if_ath_alq_init_state *hdr) +{ + printf("macVersion=%d.%d, PHY=%d, Magic=%08x\n", + be32toh(hdr->sc_mac_version), + be32toh(hdr->sc_mac_revision), + be32toh(hdr->sc_phy_rev), + be32toh(hdr->sc_hal_magic)); +} + +int +main(int argc, const char *argv[]) +{ + const char *file = argv[1]; + int fd; + struct if_ath_alq_payload *a; + int r; + char buf[READBUF_SIZE]; + int buflen = 0; + + if (argc < 2) { + printf("usage: %s \n", argv[0]); + exit(127); + } + + fd = open(file, O_RDONLY); + if (fd < 0) { + perror("open"); + exit(127); + } + + /* + * The payload structure is now no longer a fixed + * size. So, hoops are jumped through. Really + * terrible, infficient hoops. + */ + while (1) { + if (buflen < 512) { /* XXX Eww */ + r = read(fd, buf + buflen, READBUF_SIZE - buflen); + if (r <= 0) + break; + buflen += r; + //printf("read %d bytes, buflen now %d\n", r, buflen); + } + + a = (struct if_ath_alq_payload *) &buf[0]; + + /* + * XXX sanity check that len is within the left over + * size of buf. + */ + if (be16toh(a->hdr.len) > buflen) { + fprintf(stderr, "%s: len=%d, buf=%d, tsk!\n", + argv[0], be16toh(a->hdr.len), + buflen); + break; + } + + switch (be16toh(a->hdr.op)) { + case ATH_ALQ_INIT_STATE: + /* XXX should double check length! */ + memcpy(&hdr, a->payload, sizeof(hdr)); + ath_alq_print_hdr(&hdr); + break; + default: +#if 0 + if (be32toh(hdr.sc_hal_magic) == AR9300_MAGIC) + ar9300_alq_payload(a); +#endif + if (be32toh(hdr.sc_hal_magic) == AR5416_MAGIC) + ar5416_alq_payload(a); + else + printf("[%d] [%lld] op: %d; len %d\n", + be32toh(a->hdr.tstamp), + be64toh(a->hdr.threadid), + be16toh(a->hdr.op), + be16toh(a->hdr.len)); + } + + /* + * a.len is minus the header size, so.. + */ + buflen -= (be16toh(a->hdr.len) + + sizeof(struct if_ath_alq_hdr)); + memmove(&buf[0], + &buf[be16toh(a->hdr.len) + sizeof(struct if_ath_alq_hdr)], + READBUF_SIZE - (be16toh(a->hdr.len) + + sizeof(struct if_ath_alq_hdr))); + //printf(" buflen is now %d\n", buflen); + } + close(fd); +} From owner-svn-src-head@FreeBSD.ORG Sat Nov 17 01:57:45 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A83E072; Sat, 17 Nov 2012 01:57:45 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8C3188FC12; Sat, 17 Nov 2012 01:57:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAH1vjR2001775; Sat, 17 Nov 2012 01:57:45 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAH1vjuH001771; Sat, 17 Nov 2012 01:57:45 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201211170157.qAH1vjuH001771@svn.freebsd.org> From: Adrian Chadd Date: Sat, 17 Nov 2012 01:57:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243167 - head/tools/tools/ath/athalq X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2012 01:57:45 -0000 Author: adrian Date: Sat Nov 17 01:57:45 2012 New Revision: 243167 URL: http://svnweb.freebsd.org/changeset/base/243167 Log: Add AR5212 frame decoding support. Added: head/tools/tools/ath/athalq/ar5212_ds.c (contents, props changed) head/tools/tools/ath/athalq/ar5212_ds.h (contents, props changed) Modified: head/tools/tools/ath/athalq/Makefile head/tools/tools/ath/athalq/main.c Modified: head/tools/tools/ath/athalq/Makefile ============================================================================== --- head/tools/tools/ath/athalq/Makefile Sat Nov 17 01:11:00 2012 (r243166) +++ head/tools/tools/ath/athalq/Makefile Sat Nov 17 01:57:45 2012 (r243167) @@ -3,7 +3,8 @@ PROG= athalq NOMAN= yes -SRCS= main.c ar5416_ds.c +SRCS= main.c ar5212_ds.c ar5416_ds.c +# SRCS+= ar9300_ds.c .include <../Makefile.inc> Added: head/tools/tools/ath/athalq/ar5212_ds.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/ath/athalq/ar5212_ds.c Sat Nov 17 01:57:45 2012 (r243167) @@ -0,0 +1,218 @@ +/* + * Copyright (c) 2012 Adrian Chadd + * All Rights Reserved. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include "ar5212_ds.h" + +#define MS(_v, _f) ( ((_v) & (_f)) >> _f##_S ) +#define MF(_v, _f) ( !! ((_v) & (_f))) + +static void +ar5212_decode_txstatus(struct if_ath_alq_payload *a) +{ + struct ar5212_desc txs; + + /* XXX assumes txs is smaller than PAYLOAD_LEN! */ + memcpy(&txs, &a->payload, sizeof(struct ar5212_desc)); + + printf("[%u] [%llu] TXSTATUS\n", + (unsigned int) be32toh(a->hdr.tstamp), + (unsigned long long) be64toh(a->hdr.threadid)); + + /* ds_txstatus0 */ + printf(" Frmok=%d, xretries=%d, fifounderrun=%d, filt=%d\n", + MF(txs.u.tx.status0, AR_FrmXmitOK), + MF(txs.u.tx.status0, AR_ExcessiveRetries), + MF(txs.u.tx.status0, AR_FIFOUnderrun), + MF(txs.u.tx.status0, AR_Filtered)); + printf(" RTScnt=%d, FailCnt=%d, VCollCnt=%d\n", + MS(txs.u.tx.status0, AR_RTSFailCnt), + MS(txs.u.tx.status0, AR_DataFailCnt), + MS(txs.u.tx.status0, AR_VirtCollCnt)); + printf(" SndTimestamp=0x%04x\n", + MS(txs.u.tx.status0, AR_SendTimestamp)); + + /* ds_txstatus1 */ + printf(" Done=%d, SeqNum=0x%04x, AckRSSI=%d, FinalTSI=%d\n", + MF(txs.u.tx.status1, AR_Done), + MS(txs.u.tx.status1, AR_SeqNum), + MS(txs.u.tx.status1, AR_AckSigStrength), + MS(txs.u.tx.status1, AR_FinalTSIndex)); + printf(" CompSuccess=%d, XmitAntenna=%d\n", + MF(txs.u.tx.status1, AR_CompSuccess), + MF(txs.u.tx.status1, AR_XmitAtenna)); + + printf("\n ------\n"); +} + +static void +ar5212_decode_txdesc(struct if_ath_alq_payload *a) +{ + struct ar5212_desc txc; + + /* XXX assumes txs is smaller than PAYLOAD_LEN! */ + memcpy(&txc, &a->payload, sizeof(struct ar5212_desc)); + + printf("[%u] [%llu] TXD\n", + (unsigned int) be32toh(a->hdr.tstamp), + (unsigned long long) be64toh(a->hdr.threadid)); + + printf(" link=0x%08x, data=0x%08x\n", + txc.ds_link, + txc.ds_data); + + /* ds_ctl0 */ + printf(" Frame Len=%d\n", txc.ds_ctl0 & AR_FrameLen); + printf(" TX power0=%d, RtsEna=%d, Veol=%d, ClrDstMask=%d AntModeXmit=0x%02x\n", + MS(txc.ds_ctl0, AR_XmitPower), + MF(txc.ds_ctl0, AR_RTSCTSEnable), + MF(txc.ds_ctl0, AR_VEOL), + MF(txc.ds_ctl0, AR_ClearDestMask), + MF(txc.ds_ctl0, AR_AntModeXmit)); + printf(" TxIntrReq=%d, DestIdxValid=%d, CtsEnable=%d\n", + MF(txc.ds_ctl0, AR_TxInterReq), + MF(txc.ds_ctl0, AR_DestIdxValid), + MF(txc.ds_ctl0, AR_CTSEnable)); + + /* ds_ctl1 */ + printf(" BufLen=%d, TxMore=%d, DestIdx=%d," + " FrType=0x%x\n", + txc.ds_ctl1 & AR_BufLen, + MF(txc.ds_ctl1, AR_More), + MS(txc.ds_ctl1, AR_DestIdx), + MS(txc.ds_ctl1, AR_FrmType)); + printf(" NoAck=%d, CompProc=%d, CompIVLen=%d, CompICVLen=%d\n", + MF(txc.ds_ctl1, AR_NoAck), + MS(txc.ds_ctl1, AR_CompProc), + MS(txc.ds_ctl1, AR_CompIVLen), + MS(txc.ds_ctl1, AR_CompICVLen)); + + /* ds_ctl2 */ + printf(" DurUpEna=%d, Burstdur=0x%04x\n", + MF(txc.ds_ctl2, AR_DurUpdateEna), + MS(txc.ds_ctl2, AR_RTSCTSDuration)); + printf(" Try0=%d, Try1=%d, Try2=%d, Try3=%d\n", + MS(txc.ds_ctl2, AR_XmitDataTries0), + MS(txc.ds_ctl2, AR_XmitDataTries1), + MS(txc.ds_ctl2, AR_XmitDataTries2), + MS(txc.ds_ctl2, AR_XmitDataTries3)); + + /* ds_ctl3 */ + printf(" rate0=0x%02x, rate1=0x%02x, rate2=0x%02x, rate3=0x%02x\n", + MS(txc.ds_ctl3, AR_XmitRate0), + MS(txc.ds_ctl3, AR_XmitRate1), + MS(txc.ds_ctl3, AR_XmitRate2), + MS(txc.ds_ctl3, AR_XmitRate3)); + printf(" RtsCtsRate=0x%02x\n", + MS(txc.ds_ctl3, AR_RTSCTSRate)); + + printf("\n ------ \n"); +} + +static void +ar5212_decode_rxstatus(struct if_ath_alq_payload *a) +{ + struct ar5212_desc rxs; + + /* XXX assumes rxs is smaller than PAYLOAD_LEN! */ + memcpy(&rxs, &a->payload, sizeof(struct ar5212_desc)); + + printf("[%u] [%llu] RXSTATUS\n", + (unsigned int) be32toh(a->hdr.tstamp), + (unsigned long long) be64toh(a->hdr.threadid)); + + printf(" link=0x%08x, data=0x%08x, ctl0=0x%08x, ctl2=0x%08x\n", + rxs.ds_link, + rxs.ds_data, + rxs.ds_ctl0, + rxs.ds_ctl1); + + /* ds_rxstatus0 */ + printf(" DataLen=%d, ArMore=%d, DecompCrcError=%d, RcvRate=0x%02x\n", + rxs.ds_rxstatus0 & AR_DataLen, + MF(rxs.ds_rxstatus0, AR_More), + MF(rxs.ds_rxstatus0, AR_DecompCRCErr), + MS(rxs.ds_rxstatus0, AR_RcvRate)); + printf(" RSSI=%d, RcvAntenna=0x%x\n", + MS(rxs.ds_rxstatus0, AR_RcvSigStrength), + MS(rxs.ds_rxstatus0, AR_RcvAntenna)); + + /* ds_rxstatus1 */ + printf(" RxDone=%d, RxFrameOk=%d, CrcErr=%d, DecryptCrcErr=%d\n", + MF(rxs.ds_rxstatus1, AR_Done), + MF(rxs.ds_rxstatus1, AR_FrmRcvOK), + MF(rxs.ds_rxstatus1, AR_CRCErr), + MF(rxs.ds_rxstatus1, AR_DecryptCRCErr)); + printf(" PhyErr=%d, MichaelErr=%d, KeyIdxValid=%d\n", + MF(rxs.ds_rxstatus1, AR_PHYErr), + MF(rxs.ds_rxstatus1, AR_MichaelErr), + MF(rxs.ds_rxstatus1, AR_KeyIdxValid)); + + /* If PHY error, print that out. Otherwise, the key index */ + if (MF(rxs.ds_rxstatus1, AR_PHYErr)) + printf(" PhyErrCode=0x%02x\n", + MS(rxs.ds_rxstatus1, AR_PHYErrCode)); + else + printf(" KeyIdx=0x%02x\n", + MS(rxs.ds_rxstatus1, AR_KeyIdx)); + + printf(" KeyMiss=%d\n", + MF(rxs.ds_rxstatus1, AR_KeyCacheMiss)); + + printf(" Timetamp: 0x%05x\n", + MS(rxs.ds_rxstatus1, AR_RcvTimestamp)); + + printf("\n ------\n"); +} + +void +ar5212_alq_payload(struct if_ath_alq_payload *a) +{ + + switch (be16toh(a->hdr.op)) { + case ATH_ALQ_EDMA_TXSTATUS: /* TXSTATUS */ + ar5212_decode_txstatus(a); + break; + case ATH_ALQ_EDMA_RXSTATUS: /* RXSTATUS */ + ar5212_decode_rxstatus(a); + break; + case ATH_ALQ_EDMA_TXDESC: /* TXDESC */ + ar5212_decode_txdesc(a); + break; + default: + printf("[%d] [%lld] op: %d; len %d\n", + be32toh(a->hdr.tstamp), + be64toh(a->hdr.threadid), + be16toh(a->hdr.op), be16toh(a->hdr.len)); + } +} Added: head/tools/tools/ath/athalq/ar5212_ds.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/ath/athalq/ar5212_ds.h Sat Nov 17 01:57:45 2012 (r243167) @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2012 Adrian Chadd + * All Rights Reserved. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $FreeBSD$ + */ +#ifndef __AR5212_DS_H__ +#define __AR5212_DS_H__ + +extern void ar5212_alq_payload(struct if_ath_alq_payload *a); + +#endif /* __AR5212_DS_H__ */ Modified: head/tools/tools/ath/athalq/main.c ============================================================================== --- head/tools/tools/ath/athalq/main.c Sat Nov 17 01:11:00 2012 (r243166) +++ head/tools/tools/ath/athalq/main.c Sat Nov 17 01:57:45 2012 (r243167) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #if 0 #include "ar9300_ds.h" #endif +#include "ar5212_ds.h" #include "ar5416_ds.h" #define AR5210_MAGIC 0x19980124 @@ -110,12 +111,14 @@ main(int argc, const char *argv[]) ath_alq_print_hdr(&hdr); break; default: + if (be32toh(hdr.sc_hal_magic) == AR5212_MAGIC) + ar5212_alq_payload(a); + else if (be32toh(hdr.sc_hal_magic) == AR5416_MAGIC) + ar5416_alq_payload(a); #if 0 - if (be32toh(hdr.sc_hal_magic) == AR9300_MAGIC) + else if (be32toh(hdr.sc_hal_magic) == AR9300_MAGIC) ar9300_alq_payload(a); #endif - if (be32toh(hdr.sc_hal_magic) == AR5416_MAGIC) - ar5416_alq_payload(a); else printf("[%d] [%lld] op: %d; len %d\n", be32toh(a->hdr.tstamp), From owner-svn-src-head@FreeBSD.ORG Sat Nov 17 02:00:34 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2FF1D1F7; Sat, 17 Nov 2012 02:00:34 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 116D18FC12; Sat, 17 Nov 2012 02:00:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAH20X9J002186; Sat, 17 Nov 2012 02:00:33 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAH20Xv4002185; Sat, 17 Nov 2012 02:00:33 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201211170200.qAH20Xv4002185@svn.freebsd.org> From: Adrian Chadd Date: Sat, 17 Nov 2012 02:00:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243168 - head/sys/dev/ath/ath_hal/ar5212 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2012 02:00:34 -0000 Author: adrian Date: Sat Nov 17 02:00:33 2012 New Revision: 243168 URL: http://svnweb.freebsd.org/changeset/base/243168 Log: Remove the ah_desc.h reference; it's not needed. I'm using these descriptor header files in userland and I'm trying to avoid populating a compatibility ah_desc.h file. Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212desc.h Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212desc.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212desc.h Sat Nov 17 01:57:45 2012 (r243167) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212desc.h Sat Nov 17 02:00:33 2012 (r243168) @@ -22,7 +22,6 @@ /* * Hardware-specific descriptor structures. */ -#include "ah_desc.h" /* * AR5212-specific tx/rx descriptor definition. From owner-svn-src-head@FreeBSD.ORG Sat Nov 17 02:02:36 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D7A74370; Sat, 17 Nov 2012 02:02:36 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id BAB1B8FC0C; Sat, 17 Nov 2012 02:02:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAH22a9Z002567; Sat, 17 Nov 2012 02:02:36 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAH22aB8002565; Sat, 17 Nov 2012 02:02:36 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201211170202.qAH22aB8002565@svn.freebsd.org> From: Adrian Chadd Date: Sat, 17 Nov 2012 02:02:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243169 - head/sys/dev/ath/ath_hal/ar5212 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2012 02:02:37 -0000 Author: adrian Date: Sat Nov 17 02:02:36 2012 New Revision: 243169 URL: http://svnweb.freebsd.org/changeset/base/243169 Log: .. include ah_desc.h here now. Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c head/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c Sat Nov 17 02:00:33 2012 (r243168) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c Sat Nov 17 02:02:36 2012 (r243169) @@ -20,6 +20,7 @@ #include "ah.h" #include "ah_internal.h" +#include "ah_desc.h" #include "ar5212/ar5212.h" #include "ar5212/ar5212reg.h" Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c Sat Nov 17 02:00:33 2012 (r243168) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c Sat Nov 17 02:02:36 2012 (r243169) @@ -20,6 +20,7 @@ #include "ah.h" #include "ah_internal.h" +#include "ah_desc.h" #include "ar5212/ar5212.h" #include "ar5212/ar5212reg.h" From owner-svn-src-head@FreeBSD.ORG Sat Nov 17 02:14:51 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 67B756DF; Sat, 17 Nov 2012 02:14:51 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 45C838FC13; Sat, 17 Nov 2012 02:14:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAH2EoXA004385; Sat, 17 Nov 2012 02:14:51 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAH2Eosc004381; Sat, 17 Nov 2012 02:14:50 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201211170214.qAH2Eosc004381@svn.freebsd.org> From: Adrian Chadd Date: Sat, 17 Nov 2012 02:14:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243170 - head/tools/tools/ath/athalq X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2012 02:14:51 -0000 Author: adrian Date: Sat Nov 17 02:14:50 2012 New Revision: 243170 URL: http://svnweb.freebsd.org/changeset/base/243170 Log: Add AR5211 descriptor decoding support. Added: head/tools/tools/ath/athalq/ar5211_ds.c (contents, props changed) head/tools/tools/ath/athalq/ar5211_ds.h (contents, props changed) Modified: head/tools/tools/ath/athalq/Makefile head/tools/tools/ath/athalq/main.c Modified: head/tools/tools/ath/athalq/Makefile ============================================================================== --- head/tools/tools/ath/athalq/Makefile Sat Nov 17 02:02:36 2012 (r243169) +++ head/tools/tools/ath/athalq/Makefile Sat Nov 17 02:14:50 2012 (r243170) @@ -3,7 +3,7 @@ PROG= athalq NOMAN= yes -SRCS= main.c ar5212_ds.c ar5416_ds.c +SRCS= main.c ar5211_ds.c ar5212_ds.c ar5416_ds.c # SRCS+= ar9300_ds.c .include <../Makefile.inc> Added: head/tools/tools/ath/athalq/ar5211_ds.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/ath/athalq/ar5211_ds.c Sat Nov 17 02:14:50 2012 (r243170) @@ -0,0 +1,176 @@ +/* + * Copyright (c) 2012 Adrian Chadd + * All Rights Reserved. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include "ar5211_ds.h" + +#define MS(_v, _f) ( ((_v) & (_f)) >> _f##_S ) +#define MF(_v, _f) ( !! ((_v) & (_f))) + +static void +ar5211_decode_txstatus(struct if_ath_alq_payload *a) +{ + struct ar5211_desc txs; + + /* XXX assumes txs is smaller than PAYLOAD_LEN! */ + memcpy(&txs, &a->payload, sizeof(struct ar5211_desc)); + + printf("[%u] [%llu] TXSTATUS\n", + (unsigned int) be32toh(a->hdr.tstamp), + (unsigned long long) be64toh(a->hdr.threadid)); + + /* ds_txstatus0 */ + printf(" Frmok=%d, xretries=%d, fifounderrun=%d, filt=%d\n", + MF(txs.ds_status0, AR_FrmXmitOK), + MF(txs.ds_status0, AR_ExcessiveRetries), + MF(txs.ds_status0, AR_FIFOUnderrun), + MF(txs.ds_status0, AR_Filtered)); + printf(" LongRetryCnt=%d, ShortRetryCnt=%d, VCollCnt=%d\n", + MS(txs.ds_status0, AR_LongRetryCnt), + MS(txs.ds_status0, AR_ShortRetryCnt), + MS(txs.ds_status0, AR_VirtCollCnt)); + printf(" SndTimestamp=0x%04x\n", + MS(txs.ds_status0, AR_SendTimestamp)); + + /* ds_txstatus1 */ + printf(" Done=%d, SeqNum=0x%04x, AckRSSI=%d\n", + MF(txs.ds_status1, AR_Done), + MS(txs.ds_status1, AR_SeqNum), + MS(txs.ds_status1, AR_AckSigStrength)); + + printf("\n ------\n"); +} + +static void +ar5211_decode_txdesc(struct if_ath_alq_payload *a) +{ + struct ar5211_desc txc; + + /* XXX assumes txs is smaller than PAYLOAD_LEN! */ + memcpy(&txc, &a->payload, sizeof(struct ar5211_desc)); + + printf("[%u] [%llu] TXD\n", + (unsigned int) be32toh(a->hdr.tstamp), + (unsigned long long) be64toh(a->hdr.threadid)); + + printf(" link=0x%08x, data=0x%08x\n", + txc.ds_link, + txc.ds_data); + + /* ds_ctl0 */ + printf(" Frame Len=%d\n", txc.ds_ctl0 & AR_FrameLen); + printf(" TX Rate=0x%02x, RtsEna=%d, Veol=%d, ClrDstMask=%d AntModeXmit=0x%02x\n", + MS(txc.ds_ctl0, AR_XmitRate), + MF(txc.ds_ctl0, AR_RTSCTSEnable), + MF(txc.ds_ctl0, AR_VEOL), + MF(txc.ds_ctl0, AR_ClearDestMask), + MF(txc.ds_ctl0, AR_AntModeXmit)); + printf(" TxIntrReq=%d\n", + MF(txc.ds_ctl0, AR_TxInterReq)); + + /* ds_ctl1 */ + printf(" BufLen=%d, TxMore=%d, EncryptKeyIdx=%d,FrType=0x%x\n", + txc.ds_ctl1 & AR_BufLen, + MF(txc.ds_ctl1, AR_More), + MS(txc.ds_ctl1, AR_EncryptKeyIdx), + MS(txc.ds_ctl1, AR_FrmType)); + printf(" NoAck=%d\n", MF(txc.ds_ctl1, AR_NoAck)); + + printf("\n ------ \n"); +} + +static void +ar5211_decode_rxstatus(struct if_ath_alq_payload *a) +{ + struct ar5211_desc rxs; + + /* XXX assumes rxs is smaller than PAYLOAD_LEN! */ + memcpy(&rxs, &a->payload, sizeof(struct ar5211_desc)); + + printf("[%u] [%llu] RXSTATUS\n", + (unsigned int) be32toh(a->hdr.tstamp), + (unsigned long long) be64toh(a->hdr.threadid)); + + printf(" link=0x%08x, data=0x%08x\n", + rxs.ds_link, + rxs.ds_data); + + /* ds_rxstatus0 */ + printf(" DataLen=%d, ArMore=%d, RSSI=%d, RcvAntenna=0x%x\n", + rxs.ds_status0 & AR_DataLen, + MF(rxs.ds_status0, AR_More), + MS(rxs.ds_status0, AR_RcvSigStrength), + MS(rxs.ds_status0, AR_RcvAntenna)); + + /* ds_rxstatus1 */ + printf(" RxDone=%d, RxFrameOk=%d, CrcErr=%d, DecryptCrcErr=%d\n", + MF(rxs.ds_status1, AR_Done), + MF(rxs.ds_status1, AR_FrmRcvOK), + MF(rxs.ds_status1, AR_CRCErr), + MF(rxs.ds_status1, AR_DecryptCRCErr)); + printf(" KeyIdxValid=%d\n", + MF(rxs.ds_status1, AR_KeyIdxValid)); + + printf(" PhyErrCode=0x%02x\n", + MS(rxs.ds_status1, AR_PHYErr)); + + printf(" KeyMiss=%d\n", + MF(rxs.ds_status1, AR_KeyCacheMiss)); + + printf(" Timetamp: 0x%05x\n", + MS(rxs.ds_status1, AR_RcvTimestamp)); + + printf("\n ------\n"); +} + +void +ar5211_alq_payload(struct if_ath_alq_payload *a) +{ + + switch (be16toh(a->hdr.op)) { + case ATH_ALQ_EDMA_TXSTATUS: /* TXSTATUS */ + ar5211_decode_txstatus(a); + break; + case ATH_ALQ_EDMA_RXSTATUS: /* RXSTATUS */ + ar5211_decode_rxstatus(a); + break; + case ATH_ALQ_EDMA_TXDESC: /* TXDESC */ + ar5211_decode_txdesc(a); + break; + default: + printf("[%d] [%lld] op: %d; len %d\n", + be32toh(a->hdr.tstamp), + be64toh(a->hdr.threadid), + be16toh(a->hdr.op), be16toh(a->hdr.len)); + } +} Added: head/tools/tools/ath/athalq/ar5211_ds.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/ath/athalq/ar5211_ds.h Sat Nov 17 02:14:50 2012 (r243170) @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2012 Adrian Chadd + * All Rights Reserved. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $FreeBSD$ + */ +#ifndef __AR5211_DS_H__ +#define __AR5211_DS_H__ + +extern void ar5211_alq_payload(struct if_ath_alq_payload *a); + +#endif /* __AR5211_DS_H__ */ Modified: head/tools/tools/ath/athalq/main.c ============================================================================== --- head/tools/tools/ath/athalq/main.c Sat Nov 17 02:02:36 2012 (r243169) +++ head/tools/tools/ath/athalq/main.c Sat Nov 17 02:14:50 2012 (r243170) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #if 0 #include "ar9300_ds.h" #endif +#include "ar5211_ds.h" #include "ar5212_ds.h" #include "ar5416_ds.h" @@ -111,7 +112,9 @@ main(int argc, const char *argv[]) ath_alq_print_hdr(&hdr); break; default: - if (be32toh(hdr.sc_hal_magic) == AR5212_MAGIC) + if (be32toh(hdr.sc_hal_magic) == AR5211_MAGIC) + ar5211_alq_payload(a); + else if (be32toh(hdr.sc_hal_magic) == AR5212_MAGIC) ar5212_alq_payload(a); else if (be32toh(hdr.sc_hal_magic) == AR5416_MAGIC) ar5416_alq_payload(a); From owner-svn-src-head@FreeBSD.ORG Sat Nov 17 02:37:25 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9E70CCB7; Sat, 17 Nov 2012 02:37:25 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7C8BD8FC08; Sat, 17 Nov 2012 02:37:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAH2bP50007195; Sat, 17 Nov 2012 02:37:25 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAH2bPPn007191; Sat, 17 Nov 2012 02:37:25 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201211170237.qAH2bPPn007191@svn.freebsd.org> From: Adrian Chadd Date: Sat, 17 Nov 2012 02:37:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243171 - head/tools/tools/ath/athalq X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2012 02:37:25 -0000 Author: adrian Date: Sat Nov 17 02:37:25 2012 New Revision: 243171 URL: http://svnweb.freebsd.org/changeset/base/243171 Log: Implement AR5210 descriptor decoding. Added: head/tools/tools/ath/athalq/ar5210_ds.c (contents, props changed) head/tools/tools/ath/athalq/ar5210_ds.h (contents, props changed) Modified: head/tools/tools/ath/athalq/Makefile head/tools/tools/ath/athalq/main.c Modified: head/tools/tools/ath/athalq/Makefile ============================================================================== --- head/tools/tools/ath/athalq/Makefile Sat Nov 17 02:14:50 2012 (r243170) +++ head/tools/tools/ath/athalq/Makefile Sat Nov 17 02:37:25 2012 (r243171) @@ -3,7 +3,7 @@ PROG= athalq NOMAN= yes -SRCS= main.c ar5211_ds.c ar5212_ds.c ar5416_ds.c +SRCS= main.c ar5210_ds.c ar5211_ds.c ar5212_ds.c ar5416_ds.c # SRCS+= ar9300_ds.c .include <../Makefile.inc> Added: head/tools/tools/ath/athalq/ar5210_ds.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/ath/athalq/ar5210_ds.c Sat Nov 17 02:37:25 2012 (r243171) @@ -0,0 +1,175 @@ +/* + * Copyright (c) 2012 Adrian Chadd + * All Rights Reserved. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include "ar5210_ds.h" + +#define MS(_v, _f) ( ((_v) & (_f)) >> _f##_S ) +#define MF(_v, _f) ( !! ((_v) & (_f))) + +static void +ar5210_decode_txstatus(struct if_ath_alq_payload *a) +{ + struct ar5210_desc txs; + + /* XXX assumes txs is smaller than PAYLOAD_LEN! */ + memcpy(&txs, &a->payload, sizeof(struct ar5210_desc)); + + printf("[%u] [%llu] TXSTATUS\n", + (unsigned int) be32toh(a->hdr.tstamp), + (unsigned long long) be64toh(a->hdr.threadid)); + + /* ds_txstatus0 */ + printf(" Frmok=%d, xretries=%d, fifounderrun=%d, filt=%d\n", + MF(txs.ds_status0, AR_FrmXmitOK), + MF(txs.ds_status0, AR_ExcessiveRetries), + MF(txs.ds_status0, AR_FIFOUnderrun), + MF(txs.ds_status0, AR_Filtered)); + printf(" LongRetryCnt=%d, ShortRetryCnt=%d\n", + MS(txs.ds_status0, AR_LongRetryCnt), + MS(txs.ds_status0, AR_ShortRetryCnt)); + printf(" SndTimestamp=0x%04x\n", + MS(txs.ds_status0, AR_SendTimestamp)); + + /* ds_txstatus1 */ + printf(" Done=%d, SeqNum=0x%04x, AckRSSI=%d\n", + MF(txs.ds_status1, AR_Done), + txs.ds_status1 & AR_SeqNum, + MS(txs.ds_status1, AR_AckSigStrength)); + + printf("\n ------\n"); +} + +static void +ar5210_decode_txdesc(struct if_ath_alq_payload *a) +{ + struct ar5210_desc txc; + + /* XXX assumes txs is smaller than PAYLOAD_LEN! */ + memcpy(&txc, &a->payload, sizeof(struct ar5210_desc)); + + printf("[%u] [%llu] TXD\n", + (unsigned int) be32toh(a->hdr.tstamp), + (unsigned long long) be64toh(a->hdr.threadid)); + + printf(" link=0x%08x, data=0x%08x\n", + txc.ds_link, + txc.ds_data); + + /* ds_ctl0 */ + printf(" Frame Len=%d\n", txc.ds_ctl0 & AR_FrameLen); + printf(" TX Rate=0x%02x, RtsEna=%d, ClrDstMask=%d AntModeXmit=0x%02x\n", + MS(txc.ds_ctl0, AR_XmitRate), + MF(txc.ds_ctl0, AR_RTSCTSEnable), + MF(txc.ds_ctl0, AR_ClearDestMask), + MF(txc.ds_ctl0, AR_AntModeXmit)); + printf(" FrmType=0x%02x, TxIntrReq=%d\n", + MS(txc.ds_ctl0, AR_FrmType), + MF(txc.ds_ctl0, AR_TxInterReq)); + printf(" LongPkt=%d\n", MF(txc.ds_ctl0, AR_LongPkt)); + + /* ds_ctl1 */ + printf(" BufLen=%d, TxMore=%d, EncryptKeyIdx=%d, RtsDuration=%d\n", + txc.ds_ctl1 & AR_BufLen, + MF(txc.ds_ctl1, AR_More), + MS(txc.ds_ctl1, AR_EncryptKeyIdx), + MS(txc.ds_ctl1, AR_RTSDuration)); + + printf("\n ------ \n"); +} + +static void +ar5210_decode_rxstatus(struct if_ath_alq_payload *a) +{ + struct ar5210_desc rxs; + + /* XXX assumes rxs is smaller than PAYLOAD_LEN! */ + memcpy(&rxs, &a->payload, sizeof(struct ar5210_desc)); + + printf("[%u] [%llu] RXSTATUS\n", + (unsigned int) be32toh(a->hdr.tstamp), + (unsigned long long) be64toh(a->hdr.threadid)); + + printf(" link=0x%08x, data=0x%08x\n", + rxs.ds_link, + rxs.ds_data); + + /* ds_rxstatus0 */ + printf(" DataLen=%d, ArMore=%d, RSSI=%d, RcvAntenna=0x%x\n", + rxs.ds_status0 & AR_DataLen, + MF(rxs.ds_status0, AR_More), + MS(rxs.ds_status0, AR_RcvSigStrength), + MS(rxs.ds_status0, AR_RcvAntenna)); + + /* ds_rxstatus1 */ + printf(" RxDone=%d, RxFrameOk=%d, CrcErr=%d, DecryptCrcErr=%d\n", + MF(rxs.ds_status1, AR_Done), + MF(rxs.ds_status1, AR_FrmRcvOK), + MF(rxs.ds_status1, AR_CRCErr), + MF(rxs.ds_status1, AR_DecryptCRCErr)); + printf(" KeyIdxValid=%d\n", + MF(rxs.ds_status1, AR_KeyIdxValid)); + + printf(" PhyErrCode=0x%02x\n", + MS(rxs.ds_status1, AR_PHYErr)); + + printf(" KeyMiss=%d\n", + MF(rxs.ds_status1, AR_KeyCacheMiss)); + + printf(" Timetamp: 0x%05x\n", + MS(rxs.ds_status1, AR_RcvTimestamp)); + + printf("\n ------\n"); +} + +void +ar5210_alq_payload(struct if_ath_alq_payload *a) +{ + + switch (be16toh(a->hdr.op)) { + case ATH_ALQ_EDMA_TXSTATUS: /* TXSTATUS */ + ar5210_decode_txstatus(a); + break; + case ATH_ALQ_EDMA_RXSTATUS: /* RXSTATUS */ + ar5210_decode_rxstatus(a); + break; + case ATH_ALQ_EDMA_TXDESC: /* TXDESC */ + ar5210_decode_txdesc(a); + break; + default: + printf("[%d] [%lld] op: %d; len %d\n", + be32toh(a->hdr.tstamp), + be64toh(a->hdr.threadid), + be16toh(a->hdr.op), be16toh(a->hdr.len)); + } +} Added: head/tools/tools/ath/athalq/ar5210_ds.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/ath/athalq/ar5210_ds.h Sat Nov 17 02:37:25 2012 (r243171) @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2012 Adrian Chadd + * All Rights Reserved. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $FreeBSD$ + */ +#ifndef __AR5210_DS_H__ +#define __AR5210_DS_H__ + +extern void ar5210_alq_payload(struct if_ath_alq_payload *a); + +#endif /* __AR5210_DS_H__ */ Modified: head/tools/tools/ath/athalq/main.c ============================================================================== --- head/tools/tools/ath/athalq/main.c Sat Nov 17 02:14:50 2012 (r243170) +++ head/tools/tools/ath/athalq/main.c Sat Nov 17 02:37:25 2012 (r243171) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #if 0 #include "ar9300_ds.h" #endif +#include "ar5210_ds.h" #include "ar5211_ds.h" #include "ar5212_ds.h" #include "ar5416_ds.h" @@ -112,7 +113,9 @@ main(int argc, const char *argv[]) ath_alq_print_hdr(&hdr); break; default: - if (be32toh(hdr.sc_hal_magic) == AR5211_MAGIC) + if (be32toh(hdr.sc_hal_magic) == AR5210_MAGIC) + ar5210_alq_payload(a); + else if (be32toh(hdr.sc_hal_magic) == AR5211_MAGIC) ar5211_alq_payload(a); else if (be32toh(hdr.sc_hal_magic) == AR5212_MAGIC) ar5212_alq_payload(a); From owner-svn-src-head@FreeBSD.ORG Sat Nov 17 02:38:36 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9BF90F3A; Sat, 17 Nov 2012 02:38:36 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8179D8FC19; Sat, 17 Nov 2012 02:38:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAH2caq2007364; Sat, 17 Nov 2012 02:38:36 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAH2caVY007363; Sat, 17 Nov 2012 02:38:36 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201211170238.qAH2caVY007363@svn.freebsd.org> From: Adrian Chadd Date: Sat, 17 Nov 2012 02:38:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243172 - head/tools/tools/ath/athalq X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2012 02:38:36 -0000 Author: adrian Date: Sat Nov 17 02:38:36 2012 New Revision: 243172 URL: http://svnweb.freebsd.org/changeset/base/243172 Log: Make this a flag. Modified: head/tools/tools/ath/athalq/ar5210_ds.c Modified: head/tools/tools/ath/athalq/ar5210_ds.c ============================================================================== --- head/tools/tools/ath/athalq/ar5210_ds.c Sat Nov 17 02:37:25 2012 (r243171) +++ head/tools/tools/ath/athalq/ar5210_ds.c Sat Nov 17 02:38:36 2012 (r243172) @@ -129,7 +129,7 @@ ar5210_decode_rxstatus(struct if_ath_alq rxs.ds_status0 & AR_DataLen, MF(rxs.ds_status0, AR_More), MS(rxs.ds_status0, AR_RcvSigStrength), - MS(rxs.ds_status0, AR_RcvAntenna)); + MF(rxs.ds_status0, AR_RcvAntenna)); /* ds_rxstatus1 */ printf(" RxDone=%d, RxFrameOk=%d, CrcErr=%d, DecryptCrcErr=%d\n", From owner-svn-src-head@FreeBSD.ORG Sat Nov 17 02:39:09 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 88B8B12D; Sat, 17 Nov 2012 02:39:09 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6E1548FC12; Sat, 17 Nov 2012 02:39:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAH2d9DW007470; Sat, 17 Nov 2012 02:39:09 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAH2d94t007469; Sat, 17 Nov 2012 02:39:09 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201211170239.qAH2d94t007469@svn.freebsd.org> From: Adrian Chadd Date: Sat, 17 Nov 2012 02:39:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243173 - head/sys/dev/ath/ath_hal/ar5210 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2012 02:39:09 -0000 Author: adrian Date: Sat Nov 17 02:39:09 2012 New Revision: 243173 URL: http://svnweb.freebsd.org/changeset/base/243173 Log: * Remove ah_desc.h, it's not needed * Add some shifts that I'm using in userspace (athalq.) However, this exposes a fun little bug.. Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210desc.h Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210desc.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210desc.h Sat Nov 17 02:38:36 2012 (r243172) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210desc.h Sat Nov 17 02:39:09 2012 (r243173) @@ -19,8 +19,6 @@ #ifndef _DEV_ATH_AR5210DESC_H #define _DEV_ATH_AR5210DESC_H -#include "ah_desc.h" - /* * Defintions for the DMA descriptors used by the Atheros * AR5210/AR5211 and AR5110 Wireless Lan controller parts. @@ -57,6 +55,7 @@ struct ar5210_desc { #define AR_ClearDestMask 0x01000000 /* Clear destination mask bit */ #define AR_AntModeXmit 0x02000000 /* TX antenna seslection */ #define AR_FrmType 0x1c000000 /* frame type indication */ +#define AR_FrmType_S 26 #define AR_Frm_Normal 0x00000000 /* normal frame */ #define AR_Frm_ATIM 0x04000000 /* ATIM frame */ #define AR_Frm_PSPOLL 0x08000000 /* PS poll frame */ @@ -71,6 +70,7 @@ struct ar5210_desc { #define AR_EncryptKeyIdx 0x0007e000 /* ecnrypt key table index */ #define AR_EncryptKeyIdx_S 13 #define AR_RTSDuration 0xfff80000 /* lower 13bit of duration */ +#define AR_RTSDuration_S 19 /* RX ds_ctl1 */ /* AR_BufLen 0x00000fff data buffer length */ From owner-svn-src-head@FreeBSD.ORG Sat Nov 17 02:39:38 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4DF7529D; Sat, 17 Nov 2012 02:39:38 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 33A0D8FC0C; Sat, 17 Nov 2012 02:39:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAH2dcLQ007561; Sat, 17 Nov 2012 02:39:38 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAH2dc42007560; Sat, 17 Nov 2012 02:39:38 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201211170239.qAH2dc42007560@svn.freebsd.org> From: Adrian Chadd Date: Sat, 17 Nov 2012 02:39:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243174 - head/sys/dev/ath/ath_hal/ar5210 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2012 02:39:38 -0000 Author: adrian Date: Sat Nov 17 02:39:37 2012 New Revision: 243174 URL: http://svnweb.freebsd.org/changeset/base/243174 Log: Correctly populate the RTS field. Tested: * AR5210, STA mode, RTS enabled Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210_xmit.c Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210_xmit.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210_xmit.c Sat Nov 17 02:39:09 2012 (r243173) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210_xmit.c Sat Nov 17 02:39:37 2012 (r243174) @@ -518,7 +518,8 @@ ar5210SetupTxDesc(struct ath_hal *ah, st ads->ds_ctl1 = 0; if (flags & HAL_TXDESC_RTSENA) { ads->ds_ctl0 |= AR_RTSCTSEnable; - ads->ds_ctl1 |= rtsctsDuration & AR_RTSDuration; + ads->ds_ctl1 |= (rtsctsDuration << AR_RTSDuration_S) + & AR_RTSDuration; } return AH_TRUE; } From owner-svn-src-head@FreeBSD.ORG Sat Nov 17 04:00:20 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 54FCDFBE; Sat, 17 Nov 2012 04:00:20 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 392C78FC14; Sat, 17 Nov 2012 04:00:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAH40KiN022148; Sat, 17 Nov 2012 04:00:20 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAH40Kjp022147; Sat, 17 Nov 2012 04:00:20 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201211170400.qAH40Kjp022147@svn.freebsd.org> From: Alan Cox Date: Sat, 17 Nov 2012 04:00:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243176 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2012 04:00:20 -0000 Author: alc Date: Sat Nov 17 04:00:19 2012 New Revision: 243176 URL: http://svnweb.freebsd.org/changeset/base/243176 Log: Update a comment to reflect the elimination of the hold queue in r242300. Modified: head/sys/vm/vm_page.h Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Sat Nov 17 02:55:47 2012 (r243175) +++ head/sys/vm/vm_page.h Sat Nov 17 04:00:19 2012 (r243176) @@ -288,7 +288,7 @@ extern struct mtx_padalign pa_lock[]; #include /* - * Each pageable resident page falls into one of five lists: + * Each pageable resident page falls into one of four lists: * * free * Available for allocation now. @@ -297,10 +297,6 @@ extern struct mtx_padalign pa_lock[]; * Almost available for allocation. Still associated with * an object, but clean and immediately freeable. * - * hold - * Will become free after a pending I/O operation - * completes. - * * The following lists are LRU sorted: * * inactive From owner-svn-src-head@FreeBSD.ORG Sat Nov 17 04:05:47 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 19F802DF; Sat, 17 Nov 2012 04:05:47 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id F15978FC14; Sat, 17 Nov 2012 04:05:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAH45kFF023443; Sat, 17 Nov 2012 04:05:46 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAH45kFt023438; Sat, 17 Nov 2012 04:05:46 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201211170405.qAH45kFt023438@svn.freebsd.org> From: Adrian Chadd Date: Sat, 17 Nov 2012 04:05:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243177 - in head/sys/mips: atheros conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2012 04:05:47 -0000 Author: adrian Date: Sat Nov 17 04:05:46 2012 New Revision: 243177 URL: http://svnweb.freebsd.org/changeset/base/243177 Log: Migrate the AR71xx UART (an 8250 derivative) to hide behind uart_ar71xx. The AR9330/AR9331 UART is a totally different thing, so having it included with 'uart' is not going to work out. Modified: head/sys/mips/atheros/files.ar71xx head/sys/mips/conf/AR71XX_BASE head/sys/mips/conf/AR724X_BASE head/sys/mips/conf/AR91XX_BASE head/sys/mips/conf/PB92 Modified: head/sys/mips/atheros/files.ar71xx ============================================================================== --- head/sys/mips/atheros/files.ar71xx Sat Nov 17 04:00:19 2012 (r243176) +++ head/sys/mips/atheros/files.ar71xx Sat Nov 17 04:05:46 2012 (r243177) @@ -12,8 +12,8 @@ mips/atheros/ar71xx_spi.c optional ar71x mips/atheros/pcf2123_rtc.c optional pcf2123_rtc ar71xx_spi mips/atheros/ar71xx_wdog.c optional ar71xx_wdog mips/atheros/if_arge.c optional arge -mips/atheros/uart_bus_ar71xx.c optional uart -mips/atheros/uart_cpu_ar71xx.c optional uart +mips/atheros/uart_bus_ar71xx.c optional uart_ar71xx +mips/atheros/uart_cpu_ar71xx.c optional uart_ar71xx mips/atheros/ar71xx_bus_space_reversed.c standard mips/mips/intr_machdep.c standard mips/mips/tick.c standard Modified: head/sys/mips/conf/AR71XX_BASE ============================================================================== --- head/sys/mips/conf/AR71XX_BASE Sat Nov 17 04:00:19 2012 (r243176) +++ head/sys/mips/conf/AR71XX_BASE Sat Nov 17 04:05:46 2012 (r243177) @@ -108,6 +108,7 @@ device mx25l device ar71xx_wdog device uart +device uart_ar71xx device loop device ether Modified: head/sys/mips/conf/AR724X_BASE ============================================================================== --- head/sys/mips/conf/AR724X_BASE Sat Nov 17 04:00:19 2012 (r243176) +++ head/sys/mips/conf/AR724X_BASE Sat Nov 17 04:05:46 2012 (r243177) @@ -117,6 +117,7 @@ device mx25l device ar71xx_wdog device uart +device uart_ar71xx device loop device ether Modified: head/sys/mips/conf/AR91XX_BASE ============================================================================== --- head/sys/mips/conf/AR91XX_BASE Sat Nov 17 04:00:19 2012 (r243176) +++ head/sys/mips/conf/AR91XX_BASE Sat Nov 17 04:05:46 2012 (r243177) @@ -105,6 +105,7 @@ device mx25l device ar71xx_wdog device uart +device uart_ar71xx device loop device ether Modified: head/sys/mips/conf/PB92 ============================================================================== --- head/sys/mips/conf/PB92 Sat Nov 17 04:00:19 2012 (r243176) +++ head/sys/mips/conf/PB92 Sat Nov 17 04:05:46 2012 (r243177) @@ -124,6 +124,7 @@ device ar71xx_wdog # Serial device uart +device uart_ar71xx # Network twiddling device loop From owner-svn-src-head@FreeBSD.ORG Sat Nov 17 04:09:29 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 04DB547A; Sat, 17 Nov 2012 04:09:29 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id DDA138FC0C; Sat, 17 Nov 2012 04:09:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAH49SSG024108; Sat, 17 Nov 2012 04:09:28 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAH49SWN024106; Sat, 17 Nov 2012 04:09:28 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201211170409.qAH49SWN024106@svn.freebsd.org> From: Adrian Chadd Date: Sat, 17 Nov 2012 04:09:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243178 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2012 04:09:29 -0000 Author: adrian Date: Sat Nov 17 04:09:28 2012 New Revision: 243178 URL: http://svnweb.freebsd.org/changeset/base/243178 Log: make the MIPS24k HWPMC support require hwpmc_mips24k as well as hwpmc. This way non-MIPS24k platforms (eg Octeon) can have separate PMC support. Requested by: juli Modified: head/sys/conf/files.mips Modified: head/sys/conf/files.mips ============================================================================== --- head/sys/conf/files.mips Sat Nov 17 04:05:46 2012 (r243177) +++ head/sys/conf/files.mips Sat Nov 17 04:09:28 2012 (r243178) @@ -81,4 +81,4 @@ dev/nvram2env/nvram2env.c optional nvra # hwpmc support dev/hwpmc/hwpmc_mips.c optional hwpmc -dev/hwpmc/hwpmc_mips24k.c optional hwpmc +dev/hwpmc/hwpmc_mips24k.c optional hwpmc_mips24k From owner-svn-src-head@FreeBSD.ORG Sat Nov 17 04:10:43 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5F0165EC; Sat, 17 Nov 2012 04:10:43 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 453808FC0C; Sat, 17 Nov 2012 04:10:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAH4AhjB024387; Sat, 17 Nov 2012 04:10:43 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAH4Ahr1024386; Sat, 17 Nov 2012 04:10:43 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201211170410.qAH4Ahr1024386@svn.freebsd.org> From: Adrian Chadd Date: Sat, 17 Nov 2012 04:10:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243179 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2012 04:10:43 -0000 Author: adrian Date: Sat Nov 17 04:10:42 2012 New Revision: 243179 URL: http://svnweb.freebsd.org/changeset/base/243179 Log: Make MIPS24k PMC optional on "hwpmc_mips24k." Requested by: juli Modified: head/sys/mips/atheros/files.ar71xx Modified: head/sys/mips/atheros/files.ar71xx ============================================================================== --- head/sys/mips/atheros/files.ar71xx Sat Nov 17 04:09:28 2012 (r243178) +++ head/sys/mips/atheros/files.ar71xx Sat Nov 17 04:10:42 2012 (r243179) @@ -23,4 +23,4 @@ mips/atheros/ar724x_chip.c standard mips/atheros/ar91xx_chip.c standard mips/atheros/ar71xx_fixup.c optional ar71xx_ath_eeprom -dev/hwpmc/hwpmc_mips24k.c optional hwpmc +dev/hwpmc/hwpmc_mips24k.c optional hwpmc_mips24k From owner-svn-src-head@FreeBSD.ORG Sat Nov 17 04:11:58 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6337D761; Sat, 17 Nov 2012 04:11:58 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 483538FC12; Sat, 17 Nov 2012 04:11:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAH4Bwv2024675; Sat, 17 Nov 2012 04:11:58 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAH4BwFA024674; Sat, 17 Nov 2012 04:11:58 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201211170411.qAH4BwFA024674@svn.freebsd.org> From: Adrian Chadd Date: Sat, 17 Nov 2012 04:11:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243180 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2012 04:11:58 -0000 Author: adrian Date: Sat Nov 17 04:11:57 2012 New Revision: 243180 URL: http://svnweb.freebsd.org/changeset/base/243180 Log: Ensure hwpmc support is correctly included. Modified: head/sys/mips/conf/AR91XX_BASE Modified: head/sys/mips/conf/AR91XX_BASE ============================================================================== --- head/sys/mips/conf/AR91XX_BASE Sat Nov 17 04:10:42 2012 (r243179) +++ head/sys/mips/conf/AR91XX_BASE Sat Nov 17 04:11:57 2012 (r243180) @@ -36,6 +36,7 @@ options _KPOSIX_PRIORITY_SCHEDULING #Po # PMC options HWPMC_HOOKS device hwpmc +device hwpmc_mips24k # options NFS_LEGACYRPC # Debugging for use in -current From owner-svn-src-head@FreeBSD.ORG Sat Nov 17 04:15:27 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A10F58F7 for ; Sat, 17 Nov 2012 04:15:27 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: from mail-gg0-f182.google.com (mail-gg0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 504A68FC12 for ; Sat, 17 Nov 2012 04:15:26 +0000 (UTC) Received: by mail-gg0-f182.google.com with SMTP id l1so679673ggn.13 for ; Fri, 16 Nov 2012 20:15:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=FfbxYFJaXa4O6PALU/Kyp+f+gGlIGmb4RrZw1z7JkU0=; b=bRZHC7Axcx9CNz5ZXmUD6SBAWeLKq5gcph2ZS+YIkGjZC1DwriDzn3wflY3BVW61V8 j4pYic77fCivfpiTfU9gB9pyjTXfnNGo93iKrj/ZEWEjZJgzo/IxT+s8XRPWnmgwfJOr jM5EUU9joD32MVFoCoyLDd/y/Y/kYV4g2Hg1v1OCoGqqsnxI0CQ5mSPBAGmXiVsZR2oG SjV/R71IC6dFNMiYzVdNoaiJK9x38GV/f+0koEHcdvt4Zuv4B3UE3xki9FtfpDwAPL1B KD4l8Az6O3ELTTdUIrn4Xl9oggMi5gTR/NHsf2eHZWZYxBnJpmN8ZNRQG3u7Az33mqwu Xf+Q== Received: by 10.236.150.130 with SMTP id z2mr6219344yhj.115.1353125726309; Fri, 16 Nov 2012 20:15:26 -0800 (PST) MIME-Version: 1.0 Sender: juli@clockworksquid.com Received: by 10.147.83.18 with HTTP; Fri, 16 Nov 2012 20:15:06 -0800 (PST) In-Reply-To: <201211170410.qAH4Ahr1024386@svn.freebsd.org> References: <201211170410.qAH4Ahr1024386@svn.freebsd.org> From: Juli Mallett Date: Fri, 16 Nov 2012 20:15:06 -0800 X-Google-Sender-Auth: T5j1sloXkDt1jl4P-Vls0-PDgsQ Message-ID: Subject: Re: svn commit: r243179 - head/sys/mips/atheros To: Adrian Chadd X-Gm-Message-State: ALoCoQnatJJhsuqSuwUdFkg/QyvAzbewCwo9nvxGPGFpE3BFUnFQXYgorVptzY7Q+aFW2NLypNNn Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2012 04:15:27 -0000 On Fri, Nov 16, 2012 at 8:10 PM, Adrian Chadd wrote: > Author: adrian > Date: Sat Nov 17 04:10:42 2012 > New Revision: 243179 > URL: http://svnweb.freebsd.org/changeset/base/243179 > > Log: > Make MIPS24k PMC optional on "hwpmc_mips24k." > I think having it in files.mips should be sufficient? Thanks so much for doing this! > Requested by: juli > > Modified: > head/sys/mips/atheros/files.ar71xx > > Modified: head/sys/mips/atheros/files.ar71xx > > ============================================================================== > --- head/sys/mips/atheros/files.ar71xx Sat Nov 17 04:09:28 2012 > (r243178) > +++ head/sys/mips/atheros/files.ar71xx Sat Nov 17 04:10:42 2012 > (r243179) > @@ -23,4 +23,4 @@ mips/atheros/ar724x_chip.c standard > mips/atheros/ar91xx_chip.c standard > mips/atheros/ar71xx_fixup.c optional ar71xx_ath_eeprom > > -dev/hwpmc/hwpmc_mips24k.c optional hwpmc > +dev/hwpmc/hwpmc_mips24k.c optional hwpmc_mips24k > From owner-svn-src-head@FreeBSD.ORG Sat Nov 17 06:33:14 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7C6C3697; Sat, 17 Nov 2012 06:33:14 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6212A8FC13; Sat, 17 Nov 2012 06:33:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAH6XEWl045792; Sat, 17 Nov 2012 06:33:14 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAH6XEDO045791; Sat, 17 Nov 2012 06:33:14 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201211170633.qAH6XEDO045791@svn.freebsd.org> From: Alexander Motin Date: Sat, 17 Nov 2012 06:33:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243181 - head/sys/dev/sound/pci/hda X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2012 06:33:14 -0000 Author: mav Date: Sat Nov 17 06:33:13 2012 New Revision: 243181 URL: http://svnweb.freebsd.org/changeset/base/243181 Log: Summarize information about connected analog pins and EDID-like data received from HDMI/DisplayPort devices in form of general connection status and sound(4)-style channel matrix. Now that information is only reported in readable form to verbose logs, but potentially could be used by sound(4) to correctly choose default devices and configure vchans. Fix rear and side channels swap on analog 7.1 outputs. As soon as there is a huge mess in industry about naming and using of these channels, duplicate rear channels of 4 and 5.1 streams to both read and side speakers. Modified: head/sys/dev/sound/pci/hda/hdaa.c Modified: head/sys/dev/sound/pci/hda/hdaa.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdaa.c Sat Nov 17 04:11:57 2012 (r243180) +++ head/sys/dev/sound/pci/hda/hdaa.c Sat Nov 17 06:33:13 2012 (r243181) @@ -238,6 +238,142 @@ hdaa_audio_ctl_amp_get(struct hdaa_devin return (NULL); } +static const struct matrix { + struct pcmchan_matrix m; + int analog; +} matrixes[] = { + { SND_CHN_MATRIX_MAP_1_0, 1 }, + { SND_CHN_MATRIX_MAP_2_0, 1 }, + { SND_CHN_MATRIX_MAP_2_1, 0 }, + { SND_CHN_MATRIX_MAP_3_0, 0 }, + { SND_CHN_MATRIX_MAP_3_1, 0 }, + { SND_CHN_MATRIX_MAP_4_0, 1 }, + { SND_CHN_MATRIX_MAP_4_1, 0 }, + { SND_CHN_MATRIX_MAP_5_0, 0 }, + { SND_CHN_MATRIX_MAP_5_1, 1 }, + { SND_CHN_MATRIX_MAP_6_0, 0 }, + { SND_CHN_MATRIX_MAP_6_1, 0 }, + { SND_CHN_MATRIX_MAP_7_0, 0 }, + { SND_CHN_MATRIX_MAP_7_1, 1 }, +}; + +static const char *channel_names[] = SND_CHN_T_NAMES; + +/* + * Connected channels change handler. + */ +static void +hdaa_channels_handler(struct hdaa_audio_as *as) +{ + struct hdaa_pcm_devinfo *pdevinfo = as->pdevinfo; + struct hdaa_devinfo *devinfo = pdevinfo->devinfo; + struct hdaa_chan *ch = &devinfo->chans[as->chans[0]]; + struct hdaa_widget *w; + uint8_t *eld; + int i, total, sub, assume, channels; + uint16_t cpins, upins, tpins; + + cpins = upins = 0; + eld = NULL; + for (i = 0; i < 16; i++) { + if (as->pins[i] <= 0) + continue; + w = hdaa_widget_get(devinfo, as->pins[i]); + if (w == NULL) + continue; + if (w->wclass.pin.connected == 1) + cpins |= (1 << i); + else if (w->wclass.pin.connected != 0) + upins |= (1 << i); + if (w->eld != NULL && w->eld_len >= 8) + eld = w->eld; + } + tpins = cpins | upins; + if (as->hpredir >= 0) + tpins &= 0x7fff; + if (tpins == 0) + tpins = as->pinset; + + total = sub = assume = channels = 0; + if (eld) { + /* Map CEA speakers to sound(4) channels. */ + if (eld[7] & 0x01) /* Front Left/Right */ + channels |= SND_CHN_T_MASK_FL | SND_CHN_T_MASK_FR; + if (eld[7] & 0x02) /* Low Frequency Effect */ + channels |= SND_CHN_T_MASK_LF; + if (eld[7] & 0x04) /* Front Center */ + channels |= SND_CHN_T_MASK_FC; + if (eld[7] & 0x08) { /* Rear Left/Right */ + /* If we have both RLR and RLRC, report RLR as side. */ + if (eld[7] & 0x40) /* Rear Left/Right Center */ + channels |= SND_CHN_T_MASK_SL | SND_CHN_T_MASK_SR; + else + channels |= SND_CHN_T_MASK_BL | SND_CHN_T_MASK_BR; + } + if (eld[7] & 0x10) /* Rear center */ + channels |= SND_CHN_T_MASK_BC; + if (eld[7] & 0x20) /* Front Left/Right Center */ + channels |= SND_CHN_T_MASK_FLC | SND_CHN_T_MASK_FRC; + if (eld[7] & 0x40) /* Rear Left/Right Center */ + channels |= SND_CHN_T_MASK_BL | SND_CHN_T_MASK_BR; + } else if (as->pinset != 0 && (tpins & 0xffe0) == 0) { + /* Map UAA speakers to sound(4) channels. */ + if (tpins & 0x0001) + channels |= SND_CHN_T_MASK_FL | SND_CHN_T_MASK_FR; + if (tpins & 0x0002) + channels |= SND_CHN_T_MASK_FC | SND_CHN_T_MASK_LF; + if (tpins & 0x0004) + channels |= SND_CHN_T_MASK_BL | SND_CHN_T_MASK_BR; + if (tpins & 0x0008) + channels |= SND_CHN_T_MASK_FLC | SND_CHN_T_MASK_FRC; + if (tpins & 0x0010) { + /* If there is no back pin, report side as back. */ + if ((as->pinset & 0x0004) == 0) + channels |= SND_CHN_T_MASK_BL | SND_CHN_T_MASK_BR; + else + channels |= SND_CHN_T_MASK_SL | SND_CHN_T_MASK_SR; + } + } else if (as->mixed) { + /* Mixed assoc can be only stereo or theoretically mono. */ + if (ch->channels == 1) + channels |= SND_CHN_T_MASK_FC; + else + channels |= SND_CHN_T_MASK_FL | SND_CHN_T_MASK_FR; + } + if (channels) { /* We have some usable channels info. */ + HDA_BOOTVERBOSE( + device_printf(pdevinfo->dev, "%s channel set is: ", + as->dir == HDAA_CTL_OUT ? "Playback" : "Recording"); + for (i = 0; i < SND_CHN_T_MAX; i++) + if (channels & (1 << i)) + printf("%s, ", channel_names[i]); + printf("\n"); + ); + /* Look for maximal fitting matrix. */ + for (i = 0; i < sizeof(matrixes) / sizeof(struct matrix); i++) { + if (as->pinset != 0 && matrixes[i].analog == 0) + continue; + if ((matrixes[i].m.mask & ~channels) == 0) { + total = matrixes[i].m.channels; + sub = matrixes[i].m.ext; + } + } + } + if (total == 0) { + assume = 1; + total = ch->channels; + sub = (total == 6 || total == 8) ? 1 : 0; + } + HDA_BOOTVERBOSE( + device_printf(pdevinfo->dev, + "%s channel matrix is: %s%d.%d (%s)\n", + as->dir == HDAA_CTL_OUT ? "Playback" : "Recording", + assume ? "unknown, assuming " : "", total - sub, sub, + cpins != 0 ? "connected" : + (upins != 0 ? "unknown" : "disconnected")); + ); +} + /* * Headphones redirection change handler. */ @@ -431,6 +567,8 @@ hdaa_presence_handler(struct hdaa_widget hdaa_hpredir_handler(w); if (as->dir == HDAA_CTL_IN && old != 2) hdaa_autorecsrc_handler(as, w); + if (old != 2) + hdaa_channels_handler(as); } /* @@ -598,6 +736,7 @@ hdaa_eld_handler(struct hdaa_widget *w) HDA_BOOTVERBOSE( hdaa_eld_dump(w); ); + hdaa_channels_handler(&devinfo->as[w->bindas]); } /* @@ -1455,14 +1594,17 @@ hdaa_audio_setup(struct hdaa_chan *ch) uint16_t fmt, dfmt; /* Mapping channel pairs to codec pins/converters. */ const static uint16_t convmap[2][5] = - {{ 0x0010, 0x0001, 0x0201, 0x0231, 0x0231 }, /* 5.1 */ - { 0x0010, 0x0001, 0x2001, 0x2031, 0x2431 }};/* 7.1 */ + /* 1.0 2.0 4.0 5.1 7.1 */ + {{ 0x0010, 0x0001, 0x0201, 0x0231, 0x4231 }, /* no dup. */ + { 0x0010, 0x0001, 0x2201, 0x2231, 0x4231 }}; /* side dup. */ /* Mapping formats to HDMI channel allocations. */ const static uint8_t hdmica[2][8] = + /* 1 2 3 4 5 6 7 8 */ {{ 0x02, 0x00, 0x04, 0x08, 0x0a, 0x0e, 0x12, 0x12 }, /* x.0 */ { 0x01, 0x03, 0x01, 0x03, 0x09, 0x0b, 0x0f, 0x13 }}; /* x.1 */ /* Mapping formats to HDMI channels order. */ const static uint32_t hdmich[2][8] = + /* 1 / 5 2 / 6 3 / 7 4 / 8 */ {{ 0xFFFF0F00, 0xFFFFFF10, 0xFFF2FF10, 0xFF32FF10, 0xFF324F10, 0xF5324F10, 0x54326F10, 0x54326F10 }, /* x.0 */ { 0xFFFFF000, 0xFFFF0100, 0xFFFFF210, 0xFFFF2310, @@ -1482,10 +1624,9 @@ hdaa_audio_setup(struct hdaa_chan *ch) fmt = hdaa_stream_format(ch); /* Set channels to I/O converters mapping for known speaker setups. */ - if ((as->pinset == 0x0007 || as->pinset == 0x0013)) /* Standard 5.1 */ - convmapid = 0; - else if (as->pinset == 0x0017) /* Standard 7.1 */ - convmapid = 1; + if ((as->pinset == 0x0007 || as->pinset == 0x0013) || /* Standard 5.1 */ + (as->pinset == 0x0017)) /* Standard 7.1 */ + convmapid = (ch->dir == PCMDIR_PLAY); dfmt = HDA_CMD_SET_DIGITAL_CONV_FMT1_DIGEN; if (ch->fmt & AFMT_AC3) @@ -6750,12 +6891,17 @@ hdaa_pcm_attach(device_t dev) if (pdevinfo->mixer != NULL) { hdaa_audio_ctl_set_defaults(pdevinfo); + hdaa_lock(devinfo); + if (pdevinfo->playas >= 0) { + as = &devinfo->as[pdevinfo->playas]; + hdaa_channels_handler(as); + } if (pdevinfo->recas >= 0) { as = &devinfo->as[pdevinfo->recas]; - hdaa_lock(devinfo); hdaa_autorecsrc_handler(as, NULL); - hdaa_unlock(devinfo); + hdaa_channels_handler(as); } + hdaa_unlock(devinfo); } snprintf(status, SND_STATUSLEN, "on %s %s", From owner-svn-src-head@FreeBSD.ORG Sat Nov 17 14:18:58 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 19DEE920; Sat, 17 Nov 2012 14:18:58 +0000 (UTC) (envelope-from gprspb@mail.ru) Received: from fallback8.mail.ru (fallback8.mail.ru [94.100.176.136]) by mx1.freebsd.org (Postfix) with ESMTP id 9424D8FC12; Sat, 17 Nov 2012 14:18:57 +0000 (UTC) Received: from smtp5.mail.ru (smtp5.mail.ru [94.100.176.132]) by fallback8.mail.ru (mPOP.Fallback_MX) with ESMTP id EFF8BD4A362; Sat, 17 Nov 2012 18:16:59 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=7RgstDUSzFQUWkRck5ELrL9JQ3sUJIzpdjiUpfr8Ixc=; b=YZz6in6e0pAFQ0nOqfjozn+Xno7vvB11rsGHc/W7CXdPNgdA7b1eBhkKbNf7rzdHFu/Fx9bwcbgPPlnem6igS54LaP/dvoHaKjYjuBM0nBEv9yqkRqDvtxj8g8p7BSJF; Received: from [93.185.182.46] (port=5836 helo=gpr.nnz-home.ru) by smtp5.mail.ru with esmtpa (envelope-from ) id 1TZjCV-00020Z-FT; Sat, 17 Nov 2012 18:16:51 +0400 Received: from gpr by gpr.nnz-home.ru with local (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1TZjCO-0000GV-Fc; Sat, 17 Nov 2012 18:16:44 +0400 Date: Sat, 17 Nov 2012 18:16:44 +0400 From: Gennady Proskurin To: Hiroki Sato Subject: Re: svn commit: r242184 - in head: etc share/man/man5 Message-ID: <20121117141644.GA923@gpr.nnz-home.ru> References: <201210271909.q9RJ99fi039297@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201210271909.q9RJ99fi039297@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam: Not detected X-Mras: Ok Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2012 14:18:58 -0000 Now squid startup script is unable to start squid # pkg info -x ^squid squid-3.2.3_1 HTTP Caching Proxy # sysctl net.fibs net.fibs: 1 # grep squid /etc/rc.conf squid_enable="YES" squid_pidfile="/var/squid/squid.pid" squid_chdir="/var/squid" # /usr/local/etc/rc.d/squid start Starting squid. setfib: NONE: invalid FIB (max 0) Exit 1 /usr/local/etc/rc.d/squid: WARNING: failed to start squid Exit 1 # sh -x /usr/local/etc/rc.d/squid start ... [skip] ... + debug 'run_rc_command: start_precmd: squid_setfib ' + eval 'squid_setfib ' + squid_setfib + sysctl net.fibs + [ xNONE != xNONE ] + return 0 + _return=0 + [ 0 -ne 0 ] + check_required_after start + local _f _args + return 0 + return 0 + check_startmsgs + [ -n '' ] + return 0 + echo 'Starting squid.' Starting squid. + [ -n '' ] + _doit='cd /var/squid && setfib -F NONE /usr/local/sbin/squid -f /usr/local/etc/squid/squid.conf' + [ -n squid ] + _doit='su -m squid -c '\''sh -c "cd /var/squid && setfib -F NONE /usr/local/sbin/squid -f /usr/local/etc/squid/squid.conf"'\' + [ -n '' ] + _run_rc_doit 'su -m squid -c '\''sh -c "cd /var/squid && setfib -F NONE /usr/local/sbin/squid -f /usr/local/etc/squid/squid.conf"'\' + debug 'run_rc_command: doit: su -m squid -c '\''sh -c "cd /var/squid && setfib -F NONE /usr/local/sbin/squid -f /usr/local/etc/squid/squid.conf"'\' + eval 'su -m squid -c '\''sh -c "cd /var/squid && setfib -F NONE /usr/local/sbin/squid -f /usr/local/etc/squid/squid.conf"'\' + su -m squid -c 'sh -c "cd /var/squid && setfib -F NONE /usr/local/sbin/squid -f /usr/local/etc/squid/squid.conf"' setfib: NONE: invalid FIB (max 0) Exit 1 + _return=1 + [ 1 -ne 0 ] + [ -z '' ] + return 1 + warn 'failed to start squid' + [ -x /usr/bin/logger ] + logger '/usr/local/etc/rc.d/squid: WARNING: failed to start squid' + echo '/usr/local/etc/rc.d/squid: WARNING: failed to start squid' /usr/local/etc/rc.d/squid: WARNING: failed to start squid + return 1 Exit 1 On Sat, Oct 27, 2012 at 07:09:09PM +0000, Hiroki Sato wrote: > Author: hrs > Date: Sat Oct 27 19:09:09 2012 > New Revision: 242184 > URL: http://svn.freebsd.org/changeset/base/242184 > > Log: > Add setfib(1) support for services as _fib in rc.conf. > > Modified: > head/etc/rc.subr > head/share/man/man5/rc.conf.5 > > Modified: head/etc/rc.subr > ============================================================================== > --- head/etc/rc.subr Sat Oct 27 17:43:30 2012 (r242183) > +++ head/etc/rc.subr Sat Oct 27 19:09:09 2012 (r242184) > @@ -462,6 +462,8 @@ check_startmsgs() > # NOTE: $flags from the parent environment > # can be used to override this. > # > +# ${name}_fib n Routing table number to run ${command} with. > +# > # ${name}_nice n Nice level to run ${command} at. > # > # ${name}_user n User to run ${command} as, using su(1) if not > @@ -640,7 +642,8 @@ run_rc_command() > fi > eval _chdir=\$${name}_chdir _chroot=\$${name}_chroot \ > _nice=\$${name}_nice _user=\$${name}_user \ > - _group=\$${name}_group _groups=\$${name}_groups > + _group=\$${name}_group _groups=\$${name}_groups \ > + _fib=\$${name}_fib > > if [ -n "$_user" ]; then # unset $_user if running as that user > if [ "$_user" = "$(eval $IDCMD)" ]; then > @@ -721,11 +724,13 @@ run_rc_command() > if [ -n "$_chroot" ]; then > _doit="\ > ${_nice:+nice -n $_nice }\ > +${_fib:+setfib -F $_fib }\ > chroot ${_user:+-u $_user }${_group:+-g $_group }${_groups:+-G $_groups }\ > $_chroot $command $rc_flags $command_args" > else > _doit="\ > ${_chdir:+cd $_chdir && }\ > +${_fib:+setfib -F $_fib }\ > $command $rc_flags $command_args" > if [ -n "$_user" ]; then > _doit="su -m $_user -c 'sh -c \"$_doit\"'" > > Modified: head/share/man/man5/rc.conf.5 > ============================================================================== > --- head/share/man/man5/rc.conf.5 Sat Oct 27 17:43:30 2012 (r242183) > +++ head/share/man/man5/rc.conf.5 Sat Oct 27 19:09:09 2012 (r242184) > @@ -24,7 +24,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd July 22, 2012 > +.Dd October 27, 2012 > .Dt RC.CONF 5 > .Os > .Sh NAME > @@ -179,6 +179,11 @@ Run the service under this user account. > .Pq Vt str > Run the chrooted service under this system group. Unlike the _user > setting, this setting has no effect if the service is not chrooted. > +.It Ao Ar name Ac Ns Va _fib > +.Pq Vt int > +The > +.Xr setfib 1 > +value to run the service under. > .It Ao Ar name Ac Ns Va _nice > .Pq Vt int > The > _______________________________________________ > svn-src-head@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > From owner-svn-src-head@FreeBSD.ORG Sat Nov 17 16:16:30 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 26DFF105; Sat, 17 Nov 2012 16:16:30 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from mouf.net (mouf.net [IPv6:2607:fc50:0:4400:216:3eff:fe69:33b3]) by mx1.freebsd.org (Postfix) with ESMTP id 9BE4A8FC13; Sat, 17 Nov 2012 16:16:29 +0000 (UTC) Received: from meatwad.mouf.net (cpe-024-162-230-236.nc.res.rr.com [24.162.230.236]) (authenticated bits=0) by mouf.net (8.14.5/8.14.5) with ESMTP id qAHGGJ5f040629 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NOT); Sat, 17 Nov 2012 11:16:24 -0500 (EST) (envelope-from swills@FreeBSD.org) Message-ID: <50A7B84B.5080909@FreeBSD.org> Date: Sat, 17 Nov 2012 11:16:11 -0500 From: Steve Wills User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:16.0) Gecko/20121110 Thunderbird/16.0.2 MIME-Version: 1.0 To: Greg Lehey Subject: Re: svn commit: r242743 - head/usr.bin/locale References: <201211080255.qA82tUQc088806@svn.freebsd.org> In-Reply-To: <201211080255.qA82tUQc088806@svn.freebsd.org> X-Enigmail-Version: 1.4.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mouf.net [199.48.129.64]); Sat, 17 Nov 2012 11:16:25 -0500 (EST) X-Spam-Status: No, score=0.0 required=4.5 tests=none autolearn=unavailable version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mouf.net X-Virus-Scanned: clamav-milter 0.97.5 at mouf.net X-Virus-Status: Clean Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2012 16:16:30 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I think this commit may have broken building the print/system-config-printer port. It uses xmlto to generate it's documentation, which calls "locale charmap". On at least 8.3 (only place I've tested), this returns simply "US-ASCII", which works fine. But now it returns the full list: # locale charmap LANG= LC_CTYPE="C" LC_COLLATE="C" LC_TIME="C" LC_NUMERIC="C" LC_MONETARY="C" LC_MESSAGES="C" LC_ALL= # which is fine, but this gets put into an xml file and then fails to parse. I guess we need to patch xmlto to call something else? Any advice you can offer would be appreciated. Thanks, Steve On 11/07/12 21:55, Greg Lehey wrote: > Author: grog Date: Thu Nov 8 02:55:30 2012 New Revision: 242743 > URL: http://svnweb.freebsd.org/changeset/base/242743 > > Log: Make parameters to -c and -k options optional. If no > parameters are supplied, print information for all keywords. > > Improve output of -c option, in particular in conjunction with -k > option. > > MFC after: 14 days > > Modified: head/usr.bin/locale/locale.1 > head/usr.bin/locale/locale.c > > Modified: head/usr.bin/locale/locale.1 > ============================================================================== > > - --- head/usr.bin/locale/locale.1 Thu Nov 8 02:29:16 2012 (r242742) > +++ head/usr.bin/locale/locale.1 Thu Nov 8 02:55:30 2012 > (r242743) @@ -40,7 +40,7 @@ .Op Ar prefix .Nm .Op Fl ck -.Ar > keyword ... +.Op Ar keyword ... .Sh DESCRIPTION The .Nm @@ -74,8 > +74,12 @@ directory. Print names of all available charmaps. .It Fl > k Print the names and values of all selected keywords. +If no > keywords are selected, print the names and values of all defined > +keywords. .It Fl c Print the category name for all selected > keywords. +If no keywords are selected, print the category name for > all defined +keywords. .El .Sh IMPLEMENTATION NOTES The special > > Modified: head/usr.bin/locale/locale.c > ============================================================================== > > - --- head/usr.bin/locale/locale.c Thu Nov 8 02:29:16 2012 (r242742) > +++ head/usr.bin/locale/locale.c Thu Nov 8 02:55:30 2012 > (r242743) @@ -253,12 +253,10 @@ main(int argc, char *argv[]) /* > validate arguments */ if (all_locales && all_charmaps) usage(); - > if ((all_locales || all_charmaps) && argc > 0) + if ((all_locales > || all_charmaps) && argc > 0) usage(); if ((all_locales || > all_charmaps) && (prt_categories || prt_keywords)) usage(); - if > ((prt_categories || prt_keywords) && argc <= 0) - usage(); > > /* process '-a' */ if (all_locales) { @@ -282,13 +280,19 @@ > main(int argc, char *argv[]) } > > /* process '-c' and/or '-k' */ - if (prt_categories || prt_keywords > || argc > 0) { - setlocale(LC_ALL, ""); - while (argc > 0) { - > showdetails(*argv); - argv++; - argc--; - } + if > (prt_categories || prt_keywords) { + if (argc > 0) { + > setlocale(LC_ALL, ""); + while (argc > 0) { > + showdetails(*argv); + argv++; + > argc--; + } + } else { + > uint i; + for (i = 0; i < sizeof (kwinfo) / > sizeof (struct _kwinfo); i++) + showdetails ((char *)kwinfo > [i].name); + } exit(0); } > > @@ -303,7 +307,7 @@ usage(void) { printf("Usage: locale [ -a | -m > ]\n" " locale -k list [prefix]\n" - " > locale [ -ck ] keyword ...\n"); + " locale [ > -ck ] [keyword ...]\n"); exit(1); } > > @@ -612,7 +616,10 @@ showdetails(char *kw) } > > if (prt_categories) { - printf("%s\n", lookup_localecat(cat)); + > if (prt_keywords) + printf("%-20s ", lookup_localecat(cat)); + > else + printf("%-20s\t%s\n", kw, > lookup_localecat(cat)); } > > if (prt_keywords) { > _______________________________________________ > svn-src-head@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-head To > unsubscribe, send any mail to > "svn-src-head-unsubscribe@freebsd.org" > -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQEcBAEBAgAGBQJQp7hLAAoJEPXPYrMgexuhYyAIAI480Lksvd9w8zD4JkaOr9+g 01qann/a3pIyOofEThfrlK4aiNm6yAvsy+i58dAbuUFxEjr/QWr1gHuoyUQOAuXz nh6VeGIQLOHbR7SyQPPkKI2+6o76QtLsruixAtNxcOM7AjqWaksqLS022MPG3Wmr VxSEdva6YVTxcLQyq0C0XGWl5yLJGF/6MpkJP5CxZfLxqBQXUWg14Ei386PtmbOk v1aEVo2l2mubOC2V5to0OwvuHg4TQNQX3EMcYkm5FHKE6qZG1Mork38Wu63J3eb6 I5mjTMIgLdXbLdxHamSsb7gt2+9SsZ6oLOJUsLstWi/ce6GCxmGKf76OSVcA4qk= =9BY2 -----END PGP SIGNATURE----- From owner-svn-src-head@FreeBSD.ORG Sat Nov 17 16:47:05 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EB4AB801; Sat, 17 Nov 2012 16:47:05 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D085E8FC08; Sat, 17 Nov 2012 16:47:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAHGl5TY040991; Sat, 17 Nov 2012 16:47:05 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAHGl59T040989; Sat, 17 Nov 2012 16:47:05 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201211171647.qAHGl59T040989@svn.freebsd.org> From: Ed Schouten Date: Sat, 17 Nov 2012 16:47:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243183 - head/usr.bin/w X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2012 16:47:06 -0000 Author: ed Date: Sat Nov 17 16:47:05 2012 New Revision: 243183 URL: http://svnweb.freebsd.org/changeset/base/243183 Log: Fix whitespace. MFC after: 1 week Modified: head/usr.bin/w/extern.h head/usr.bin/w/proc_compare.c Modified: head/usr.bin/w/extern.h ============================================================================== --- head/usr.bin/w/extern.h Sat Nov 17 11:55:19 2012 (r243182) +++ head/usr.bin/w/extern.h Sat Nov 17 16:47:05 2012 (r243183) @@ -30,7 +30,6 @@ * $FreeBSD$ */ - extern int use_ampm; struct kinfo_proc; Modified: head/usr.bin/w/proc_compare.c ============================================================================== --- head/usr.bin/w/proc_compare.c Sat Nov 17 11:55:19 2012 (r243182) +++ head/usr.bin/w/proc_compare.c Sat Nov 17 16:47:05 2012 (r243183) @@ -62,11 +62,11 @@ __FBSDID("$FreeBSD$"); * TODO - consider whether pctcpu should be used. */ -#define ISRUN(p) (((p)->ki_stat == SRUN) || ((p)->ki_stat == SIDL)) -#define TESTAB(a, b) ((a)<<1 | (b)) -#define ONLYA 2 -#define ONLYB 1 -#define BOTH 3 +#define ISRUN(p) (((p)->ki_stat == SRUN) || ((p)->ki_stat == SIDL)) +#define TESTAB(a, b) ((a)<<1 | (b)) +#define ONLYA 2 +#define ONLYB 1 +#define BOTH 3 int proc_compare(struct kinfo_proc *p1, struct kinfo_proc *p2) @@ -93,7 +93,7 @@ proc_compare(struct kinfo_proc *p1, stru return (p2->ki_pid > p1->ki_pid); /* tie - return highest pid */ } /* - * weed out zombies + * weed out zombies */ switch (TESTAB(p1->ki_stat == SZOMB, p2->ki_stat == SZOMB)) { case ONLYA: From owner-svn-src-head@FreeBSD.ORG Sat Nov 17 18:06:24 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CB448A48; Sat, 17 Nov 2012 18:06:24 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id C248A8FC12; Sat, 17 Nov 2012 18:06:23 +0000 (UTC) Received: by mail-bk0-f54.google.com with SMTP id je9so717590bkc.13 for ; Sat, 17 Nov 2012 10:06:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=mrn4nhHz+Uy9zSsnz24OMYNwWLnRwKoR7R03u4y8Zlc=; b=haasqflASyIGwj5BnzKhEcpHXpFipum1YZG8YZtlxY+CSUslGYKDQsUAuOAJAURfFo qi19XkMYNgwXPZo/fCAqe5U7EQQLteeTaObe9kCkzkYgJQtfMWhv/IBmfkaJYlM6p9s3 34hrNxn206sDLhZ72ve9Qa+vybhbF1o2hKaCN72qLVQs/8iydQdvKoeNuAoL/5ceJduW hR/w/TzGmYIe5hR+T717Jr0OiBqpX+zzUIRP4iW1nVFF0XnvIOFE0fxPoo5nktOU4OjW faChoWZeZpTq4YswCMXAK8nrccTcFkpQ1EQ4YkA94o6IGW9J/nD+x8PtxbobXc7zlylI jghw== MIME-Version: 1.0 Received: by 10.204.11.208 with SMTP id u16mr3413664bku.81.1353175582305; Sat, 17 Nov 2012 10:06:22 -0800 (PST) Received: by 10.204.50.197 with HTTP; Sat, 17 Nov 2012 10:06:22 -0800 (PST) Received: by 10.204.50.197 with HTTP; Sat, 17 Nov 2012 10:06:22 -0800 (PST) In-Reply-To: <20121117141644.GA923@gpr.nnz-home.ru> References: <201210271909.q9RJ99fi039297@svn.freebsd.org> <20121117141644.GA923@gpr.nnz-home.ru> Date: Sat, 17 Nov 2012 18:06:22 +0000 Message-ID: Subject: Re: svn commit: r242184 - in head: etc share/man/man5 From: Chris Rees To: Gennady Proskurin Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Hiroki Sato X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2012 18:06:24 -0000 This is because the squid rc script processes fib itself; that needs wrapping in a test for the function. I can fix it tomorrow. As a workaround, remove the line start_precmd=squid_setfib from the squid rc script. Chris On 17 Nov 2012 14:19, "Gennady Proskurin" wrote: > Now squid startup script is unable to start squid > > # pkg info -x ^squid > squid-3.2.3_1 HTTP Caching Proxy > > # sysctl net.fibs > net.fibs: 1 > > # grep squid /etc/rc.conf > squid_enable="YES" > squid_pidfile="/var/squid/squid.pid" > squid_chdir="/var/squid" > > # /usr/local/etc/rc.d/squid start > Starting squid. > setfib: NONE: invalid FIB (max 0) > Exit 1 > /usr/local/etc/rc.d/squid: WARNING: failed to start squid > Exit 1 > > # sh -x /usr/local/etc/rc.d/squid start > ... [skip] ... > + debug 'run_rc_command: start_precmd: squid_setfib ' > + eval 'squid_setfib ' > + squid_setfib > + sysctl net.fibs > + [ xNONE != xNONE ] > + return 0 > + _return=0 > + [ 0 -ne 0 ] > + check_required_after start > + local _f _args > + return 0 > + return 0 > + check_startmsgs > + [ -n '' ] > + return 0 > + echo 'Starting squid.' > Starting squid. > + [ -n '' ] > + _doit='cd /var/squid && setfib -F NONE /usr/local/sbin/squid -f > /usr/local/etc/squid/squid.conf' > + [ -n squid ] > + _doit='su -m squid -c '\''sh -c "cd /var/squid && setfib -F NONE > /usr/local/sbin/squid -f /usr/local/etc/squid/squid.conf"'\' > + [ -n '' ] > + _run_rc_doit 'su -m squid -c '\''sh -c "cd /var/squid && setfib -F NONE > /usr/local/sbin/squid -f /usr/local/etc/squid/squid.conf"'\' > + debug 'run_rc_command: doit: su -m squid -c '\''sh -c "cd /var/squid && > setfib -F NONE /usr/local/sbin/squid -f /usr/local/etc/squid/squid.conf"'\' > + eval 'su -m squid -c '\''sh -c "cd /var/squid && setfib -F NONE > /usr/local/sbin/squid -f /usr/local/etc/squid/squid.conf"'\' > + su -m squid -c 'sh -c "cd /var/squid && setfib -F NONE > /usr/local/sbin/squid -f /usr/local/etc/squid/squid.conf"' > setfib: NONE: invalid FIB (max 0) > Exit 1 > + _return=1 > + [ 1 -ne 0 ] > + [ -z '' ] > + return 1 > + warn 'failed to start squid' > + [ -x /usr/bin/logger ] > + logger '/usr/local/etc/rc.d/squid: WARNING: failed to start squid' > + echo '/usr/local/etc/rc.d/squid: WARNING: failed to start squid' > /usr/local/etc/rc.d/squid: WARNING: failed to start squid > + return 1 > Exit 1 > > > On Sat, Oct 27, 2012 at 07:09:09PM +0000, Hiroki Sato wrote: > > Author: hrs > > Date: Sat Oct 27 19:09:09 2012 > > New Revision: 242184 > > URL: http://svn.freebsd.org/changeset/base/242184 > > > > Log: > > Add setfib(1) support for services as _fib in rc.conf. > > > > Modified: > > head/etc/rc.subr > > head/share/man/man5/rc.conf.5 > > > > Modified: head/etc/rc.subr > > > ============================================================================== > > --- head/etc/rc.subr Sat Oct 27 17:43:30 2012 (r242183) > > +++ head/etc/rc.subr Sat Oct 27 19:09:09 2012 (r242184) > > @@ -462,6 +462,8 @@ check_startmsgs() > > # NOTE: $flags from the parent environment > > # can be used to override this. > > # > > +# ${name}_fib n Routing table number to run ${command} > with. > > +# > > # ${name}_nice n Nice level to run ${command} at. > > # > > # ${name}_user n User to run ${command} as, using su(1) if > not > > @@ -640,7 +642,8 @@ run_rc_command() > > fi > > eval _chdir=\$${name}_chdir _chroot=\$${name}_chroot \ > > _nice=\$${name}_nice _user=\$${name}_user \ > > - _group=\$${name}_group _groups=\$${name}_groups > > + _group=\$${name}_group _groups=\$${name}_groups \ > > + _fib=\$${name}_fib > > > > if [ -n "$_user" ]; then # unset $_user if running as that > user > > if [ "$_user" = "$(eval $IDCMD)" ]; then > > @@ -721,11 +724,13 @@ run_rc_command() > > if [ -n "$_chroot" ]; then > > _doit="\ > > ${_nice:+nice -n $_nice }\ > > +${_fib:+setfib -F $_fib }\ > > chroot ${_user:+-u $_user }${_group:+-g $_group }${_groups:+-G $_groups > }\ > > $_chroot $command $rc_flags $command_args" > > else > > _doit="\ > > ${_chdir:+cd $_chdir && }\ > > +${_fib:+setfib -F $_fib }\ > > $command $rc_flags $command_args" > > if [ -n "$_user" ]; then > > _doit="su -m $_user -c 'sh -c > \"$_doit\"'" > > > > Modified: head/share/man/man5/rc.conf.5 > > > ============================================================================== > > --- head/share/man/man5/rc.conf.5 Sat Oct 27 17:43:30 2012 > (r242183) > > +++ head/share/man/man5/rc.conf.5 Sat Oct 27 19:09:09 2012 > (r242184) > > @@ -24,7 +24,7 @@ > > .\" > > .\" $FreeBSD$ > > .\" > > -.Dd July 22, 2012 > > +.Dd October 27, 2012 > > .Dt RC.CONF 5 > > .Os > > .Sh NAME > > @@ -179,6 +179,11 @@ Run the service under this user account. > > .Pq Vt str > > Run the chrooted service under this system group. Unlike the _user > > setting, this setting has no effect if the service is not chrooted. > > +.It Ao Ar name Ac Ns Va _fib > > +.Pq Vt int > > +The > > +.Xr setfib 1 > > +value to run the service under. > > .It Ao Ar name Ac Ns Va _nice > > .Pq Vt int > > The > > _______________________________________________ > > svn-src-head@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/svn-src-head > > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > > > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" > > From owner-svn-src-head@FreeBSD.ORG Sat Nov 17 18:11:11 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 53F86DBF; Sat, 17 Nov 2012 18:11:11 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3A03E8FC08; Sat, 17 Nov 2012 18:11:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAHIBBpx055508; Sat, 17 Nov 2012 18:11:11 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAHIBBDF055507; Sat, 17 Nov 2012 18:11:11 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201211171811.qAHIBBDF055507@svn.freebsd.org> From: Hiroki Sato Date: Sat, 17 Nov 2012 18:11:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243184 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2012 18:11:11 -0000 Author: hrs Date: Sat Nov 17 18:11:10 2012 New Revision: 243184 URL: http://svnweb.freebsd.org/changeset/base/243184 Log: Add check_namevarlist() to check if ${name}_var is reserved in rc.subr or not. Modified: head/etc/rc.subr Modified: head/etc/rc.subr ============================================================================== --- head/etc/rc.subr Sat Nov 17 16:47:05 2012 (r243183) +++ head/etc/rc.subr Sat Nov 17 18:11:10 2012 (r243184) @@ -1724,6 +1724,23 @@ check_kern_features() fi } +# check_namevarlist var +# Return "0" if ${name}_var is reserved in rc.subr. + +_rc_namevarlist="program chroot chdir flags fib nice user group groups" +check_namevarlist() +{ + local _v + + for _v in $_rc_namevarlist; do + case $1 in + $_v) return 0 ;; + esac + done + + return 1 +} + # _echoonce var msg mode # mode=0: Echo $msg if ${$var} is empty. # After doing echo, a string is set to ${$var}. From owner-svn-src-head@FreeBSD.ORG Sat Nov 17 19:54:23 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DEBFD3C1; Sat, 17 Nov 2012 19:54:23 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C23A38FC12; Sat, 17 Nov 2012 19:54:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAHJsNHJ071717; Sat, 17 Nov 2012 19:54:23 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAHJsN5C071714; Sat, 17 Nov 2012 19:54:23 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201211171954.qAHJsN5C071714@svn.freebsd.org> From: Hiroki Sato Date: Sat, 17 Nov 2012 19:54:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243185 - head/sbin/route X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2012 19:54:24 -0000 Author: hrs Date: Sat Nov 17 19:54:23 2012 New Revision: 243185 URL: http://svnweb.freebsd.org/changeset/base/243185 Log: Add -fib modifier to specify FIB number. The FIB number can be in a comma-separated list and/or range specification: # route add -inet 192.0.2.0/24 198.51.100.1 -fib 1,3-5,6 Although all of the subcommands supports the modifier, "monitor" does not support the list or range specification at this moment. Reviewed by: bz Modified: head/sbin/route/keywords head/sbin/route/route.8 head/sbin/route/route.c Modified: head/sbin/route/keywords ============================================================================== --- head/sbin/route/keywords Sat Nov 17 18:11:10 2012 (r243184) +++ head/sbin/route/keywords Sat Nov 17 19:54:23 2012 (r243185) @@ -10,6 +10,7 @@ del delete dst expire +fib flush gateway genmask Modified: head/sbin/route/route.8 ============================================================================== --- head/sbin/route/route.8 Sat Nov 17 18:11:10 2012 (r243184) +++ head/sbin/route/route.8 Sat Nov 17 19:54:23 2012 (r243185) @@ -28,7 +28,7 @@ .\" @(#)route.8 8.3 (Berkeley) 3/19/94 .\" $FreeBSD$ .\" -.Dd March 24, 2012 +.Dd November 17, 2012 .Dt ROUTE 8 .Os .Sh NAME @@ -118,16 +118,14 @@ The monitor command has the syntax: .Bd -ragged -offset indent -compact .Nm .Op Fl n -.Cm monitor +.Cm monitor Op Fl fib Ar number .Ed .Pp The flush command has the syntax: .Pp .Bd -ragged -offset indent -compact .Nm -.Op Fl n -.Cm flush -.Op Ar family +.Oo Fl n Cm flush Oc Oo Ar family Oc Op Fl fib Ar number .Ed .Pp If the @@ -144,6 +142,11 @@ or .Fl inet modifiers, only routes having destinations with addresses in the delineated family will be deleted. +When a +.Fl fib +option is specified, the operation will be applied to +the specified FIB +.Pq routing table . .Pp The other commands have the following syntax: .Pp @@ -154,6 +157,7 @@ The other commands have the following sy .Op Fl net No \&| Fl host .Ar destination gateway .Op Ar netmask +.Op Fl fib Ar number .Ed .Pp where @@ -210,9 +214,15 @@ A .Ar destination of .Ar default -is a synonym for -.Fl net Li 0.0.0.0 , -which is the default route. +is a synonym for the default route. +For +.Li IPv4 +it is +.Fl net Fl inet Li 0.0.0.0 , +and for +.Li IPv6 +it is +.Fl net Fl inet6 Li :: . .Pp If the destination is directly reachable via an interface requiring @@ -314,6 +324,33 @@ specify that all ensuing metrics may be .Fl lockrest meta-modifier. .Pp +The optional modifier +.Fl fib Ar number +specifies that the command will be applied to a non-default FIB. +The +.Ar number +must be smaller than the +.Va net.fibs +.Xr sysctl 8 +MIB. +When this modifier is not specified, +or a negative number is specified, +the default FIB shown in the +.Va net.my_fibnum +.Xr sysctl 8 +MIB will be used. +.Pp +The +.Ar number +allows multiple FIBs by a comma-separeted list and/or range +specification. +The +.Qq Fl fib Li 2,4,6 +means the FIB number 2, 4, and 6. +The +.Qq Fl fib Li 1,3-5,6 +means the 1, 3, 4, 5, and 6. +.Pp In a .Cm change or Modified: head/sbin/route/route.c ============================================================================== --- head/sbin/route/route.c Sat Nov 17 18:11:10 2012 (r243184) +++ head/sbin/route/route.c Sat Nov 17 19:54:23 2012 (r243185) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -77,7 +78,6 @@ struct keytab { {0, 0} }; -struct ortentry route; union sockunion { struct sockaddr sa; struct sockaddr_in sin; @@ -99,11 +99,14 @@ int locking, lockrest, debugonly; struct rt_metrics rt_metrics; u_long rtm_inits; uid_t uid; +static int defaultfib; +static int numfibs; static int atalk_aton(const char *, struct at_addr *); static char *atalk_ntoa(struct at_addr); static void bprintf(FILE *, int, u_char *); static void flushroutes(int argc, char *argv[]); +static int flushroutes_fib(int); static int getaddr(int, char *, struct hostent **); static int keyword(const char *); static void inet_makenetandmask(u_long, struct sockaddr_in *, u_long); @@ -112,21 +115,36 @@ static int inet6_makenetandmask(struct s #endif static void interfaces(void); static void mask_addr(void); -static void monitor(void); +static void monitor(int, char*[]); static const char *netname(struct sockaddr *); static void newroute(int, char **); +static int newroute_fib(int, char *, int); static void pmsg_addrs(char *, int, size_t); static void pmsg_common(struct rt_msghdr *, size_t); static int prefixlen(const char *); -static void print_getmsg(struct rt_msghdr *, int); +static void print_getmsg(struct rt_msghdr *, int, int); static void print_rtmsg(struct rt_msghdr *, size_t); static const char *routename(struct sockaddr *); -static int rtmsg(int, int); +static int rtmsg(int, int, int); static void set_metric(char *, int); +static int set_sofib(int); +static int set_procfib(int); static void sockaddr(char *, struct sockaddr *); static void sodump(sup, const char *); extern char *iso_ntoa(void); +struct fibl { + TAILQ_ENTRY(fibl) fl_next; + + int fl_num; + int fl_error; + int fl_errno; +}; +TAILQ_HEAD(fibl_head_t, fibl) fibl_head; + +static int fiboptlist_csv(const char *, struct fibl_head_t *); +static int fiboptlist_range(const char *, struct fibl_head_t *); + static void usage(const char *) __dead2; void @@ -144,6 +162,7 @@ int main(int argc, char **argv) { int ch; + size_t len; if (argc < 2) usage(NULL); @@ -180,6 +199,17 @@ main(int argc, char **argv) s = socket(PF_ROUTE, SOCK_RAW, 0); if (s < 0) err(EX_OSERR, "socket"); + + len = sizeof(numfibs); + if (sysctlbyname("net.fibs", (void *)&numfibs, &len, NULL, 0) == -1) + numfibs = -1; + + len = sizeof(defaultfib); + if (numfibs != -1 && + sysctlbyname("net.my_fibnum", (void *)&defaultfib, &len, NULL, + 0) == -1) + defaultfib = -1; + if (*argv != NULL) switch (keyword(*argv)) { case K_GET: @@ -195,7 +225,7 @@ main(int argc, char **argv) /* NOTREACHED */ case K_MONITOR: - monitor(); + monitor(argc, argv); /* NOTREACHED */ case K_FLUSH: @@ -207,6 +237,124 @@ main(int argc, char **argv) /* NOTREACHED */ } +static int +set_sofib(int fib) +{ + + if (fib < 0) + return (0); + return (setsockopt(s, SOL_SOCKET, SO_SETFIB, (void *)&fib, + sizeof(fib))); +} + +static int +set_procfib(int fib) +{ + + if (fib < 0) + return (0); + return (setfib(fib)); +} + +static int +fiboptlist_range(const char *arg, struct fibl_head_t *flh) +{ + struct fibl *fl; + char *str, *token, *endptr; + int fib[2], i, error; + + str = strdup(arg); + error = 0; + i = 0; + while ((token = strsep(&str, "-")) != NULL) { + switch (i) { + case 0: + case 1: + fib[i] = strtol(token, &endptr, 0); + if (*endptr != '\0' || (fib[i] == 0 && + (errno == EINVAL || errno == ERANGE))) + error = 1; + break; + default: + error = 1; + } + if (error) + goto fiboptlist_range_ret; + i++; + } + if (fib[0] >= fib[1]) { + error = 1; + goto fiboptlist_range_ret; + } + for (i = fib[0]; i <= fib[1]; i++) { + fl = calloc(1, sizeof(*fl)); + if (fl == NULL) { + error = 1; + goto fiboptlist_range_ret; + } + fl->fl_num = i; + TAILQ_INSERT_TAIL(flh, fl, fl_next); + } +fiboptlist_range_ret: + free(str); + return (error); +} + +#define ALLSTRLEN 64 +static int +fiboptlist_csv(const char *arg, struct fibl_head_t *flh) +{ + struct fibl *fl; + char *str, *token, *endptr; + int fib, error; + + if (strcmp("all", arg) == 0) { + str = calloc(1, ALLSTRLEN); + if (str == NULL) { + error = 1; + goto fiboptlist_csv_ret; + } + if (numfibs > 1) + snprintf(str, ALLSTRLEN - 1, "%d-%d", 0, numfibs - 1); + else + snprintf(str, ALLSTRLEN - 1, "%d", 0); + } else if (strcmp("default", arg) == 0) { + str = calloc(1, ALLSTRLEN); + if (str == NULL) { + error = 1; + goto fiboptlist_csv_ret; + } + snprintf(str, ALLSTRLEN - 1, "%d", defaultfib); + } else + str = strdup(arg); + + error = 0; + while ((token = strsep(&str, ",")) != NULL) { + if (*token != '-' && strchr(token, '-') != NULL) { + error = fiboptlist_range(token, flh); + if (error) + goto fiboptlist_csv_ret; + } else { + fib = strtol(token, &endptr, 0); + if (*endptr != '\0' || (fib == 0 && + (errno == EINVAL || errno == ERANGE))) { + error = 1; + goto fiboptlist_csv_ret; + } + fl = calloc(1, sizeof(*fl)); + if (fl == NULL) { + error = 1; + goto fiboptlist_csv_ret; + } + fl->fl_num = fib; + TAILQ_INSERT_TAIL(flh, fl, fl_next); + } + } +fiboptlist_csv_ret: + free(str); + return (error); +} + /* * Purge all entries in the routing tables not * associated with network interfaces. @@ -214,38 +362,71 @@ main(int argc, char **argv) static void flushroutes(int argc, char *argv[]) { - size_t needed; - int mib[6], rlen, seqno, count = 0; - char *buf, *next, *lim; - struct rt_msghdr *rtm; + struct fibl *fl; + int error; if (uid != 0 && !debugonly) { errx(EX_NOPERM, "must be root to alter routing table"); } shutdown(s, SHUT_RD); /* Don't want to read back our messages */ - if (argc > 1) { + + TAILQ_INIT(&fibl_head); + while (argc > 1) { + argc--; argv++; - if (argc == 2 && **argv == '-') - switch (keyword(*argv + 1)) { - case K_INET: - af = AF_INET; - break; + if (**argv != '-') + usage(*argv); + switch (keyword(*argv + 1)) { + case K_INET: + af = AF_INET; + break; #ifdef INET6 - case K_INET6: - af = AF_INET6; - break; + case K_INET6: + af = AF_INET6; + break; #endif - case K_ATALK: - af = AF_APPLETALK; - break; - case K_LINK: - af = AF_LINK; - break; - default: - goto bad; - } else -bad: usage(*argv); + case K_ATALK: + af = AF_APPLETALK; + break; + case K_LINK: + af = AF_LINK; + break; + case K_FIB: + if (!--argc) + usage(*argv); + error = fiboptlist_csv(*++argv, &fibl_head); + if (error) + usage(*argv); + break; + default: + usage(*argv); + } + } + if (TAILQ_EMPTY(&fibl_head)) { + error = fiboptlist_csv("default", &fibl_head); + if (error) + errx(EX_OSERR, "fiboptlist_csv failed."); } + TAILQ_FOREACH(fl, &fibl_head, fl_next) + flushroutes_fib(fl->fl_num); +} + +static int +flushroutes_fib(int fib) +{ + struct rt_msghdr *rtm; + size_t needed; + char *buf, *next, *lim; + int mib[6], rlen, seqno, count = 0; + int error; + + error = set_sofib(fib); + error += set_procfib(fib); + if (error) { + warn("fib number %d is ignored", fib); + return (error); + } + retry: mib[0] = CTL_NET; mib[1] = PF_ROUTE; @@ -303,13 +484,17 @@ retry: print_rtmsg(rtm, rlen); else { struct sockaddr *sa = (struct sockaddr *)(rtm + 1); - (void) printf("%-20.20s ", rtm->rtm_flags & RTF_HOST ? + + printf("%-20.20s ", rtm->rtm_flags & RTF_HOST ? routename(sa) : netname(sa)); sa = (struct sockaddr *)(SA_SIZE(sa) + (char *)sa); - (void) printf("%-20.20s ", routename(sa)); - (void) printf("done\n"); + printf("%-20.20s ", routename(sa)); + if (fib >= 0) + printf("-fib %-3d ", fib); + printf("done\n"); } } + return (error); } const char * @@ -551,18 +736,32 @@ set_metric(char *value, int key) *valp = atoi(value); } +#define F_ISHOST 0x01 +#define F_FORCENET 0x02 +#define F_FORCEHOST 0x04 +#define F_PROXY 0x08 +#define F_INTERFACE 0x10 + static void newroute(int argc, char **argv) { + struct hostent *hp; + struct fibl *fl; char *cmd; - const char *dest = "", *gateway = "", *errmsg; - int ishost = 0, proxy = 0, ret, attempts, oerrno, flags = RTF_STATIC; - int key; - struct hostent *hp = 0; + const char *dest, *gateway, *errmsg; + int key, error, flags, nrflags, fibnum; if (uid != 0) { errx(EX_NOPERM, "must be root to alter routing table"); } + + dest = NULL; + gateway = NULL; + flags = RTF_STATIC; + nrflags = 0; + hp = NULL; + TAILQ_INIT(&fibl_head); + cmd = argv[0]; if (*cmd != 'g' && *cmd != 's') shutdown(s, SHUT_RD); /* Don't want to read back our messages */ @@ -594,7 +793,7 @@ newroute(int argc, char **argv) break; case K_IFACE: case K_INTERFACE: - iflag++; + nrflags |= F_INTERFACE; break; case K_NOSTATIC: flags &= ~RTF_STATIC; @@ -606,7 +805,7 @@ newroute(int argc, char **argv) lockrest = 1; break; case K_HOST: - forcehost++; + nrflags |= F_FORCEHOST; break; case K_REJECT: flags |= RTF_REJECT; @@ -621,7 +820,7 @@ newroute(int argc, char **argv) flags |= RTF_PROTO2; break; case K_PROXY: - proxy = 1; + nrflags |= F_PROXY; break; case K_XRESOLVE: flags |= RTF_XRESOLVE; @@ -635,6 +834,13 @@ newroute(int argc, char **argv) case K_NOSTICK: flags &= ~RTF_STICKY; break; + case K_FIB: + if (!--argc) + usage(NULL); + error = fiboptlist_csv(*++argv, &fibl_head); + if (error) + usage(NULL); + break; case K_IFA: if (!--argc) usage(NULL); @@ -658,7 +864,8 @@ newroute(int argc, char **argv) case K_DST: if (!--argc) usage(NULL); - ishost = getaddr(RTA_DST, *++argv, &hp); + if (getaddr(RTA_DST, *++argv, &hp)) + nrflags |= F_ISHOST; dest = *argv; break; case K_NETMASK: @@ -667,17 +874,17 @@ newroute(int argc, char **argv) (void) getaddr(RTA_NETMASK, *++argv, 0); /* FALLTHROUGH */ case K_NET: - forcenet++; + nrflags |= F_FORCENET; break; case K_PREFIXLEN: if (!--argc) usage(NULL); if (prefixlen(*++argv) == -1) { - forcenet = 0; - ishost = 1; + nrflags &= ~F_FORCENET; + nrflags |= F_ISHOST; } else { - forcenet = 1; - ishost = 0; + nrflags |= F_FORCENET; + nrflags &= ~F_ISHOST; } break; case K_MTU: @@ -699,18 +906,20 @@ newroute(int argc, char **argv) } else { if ((rtm_addrs & RTA_DST) == 0) { dest = *argv; - ishost = getaddr(RTA_DST, *argv, &hp); + if (getaddr(RTA_DST, *argv, &hp)) + nrflags |= F_ISHOST; } else if ((rtm_addrs & RTA_GATEWAY) == 0) { gateway = *argv; (void) getaddr(RTA_GATEWAY, *argv, &hp); } else { (void) getaddr(RTA_NETMASK, *argv, 0); - forcenet = 1; + nrflags |= F_FORCENET; } } } - if (forcehost) { - ishost = 1; + + if (nrflags & F_FORCEHOST) { + nrflags |= F_ISHOST; #ifdef INET6 if (af == AF_INET6) { rtm_addrs &= ~RTA_NETMASK; @@ -718,71 +927,125 @@ newroute(int argc, char **argv) } #endif } - if (forcenet) - ishost = 0; + if (nrflags & F_FORCENET) + nrflags &= ~F_ISHOST; flags |= RTF_UP; - if (ishost) + if (nrflags & F_ISHOST) flags |= RTF_HOST; - if (iflag == 0) + if ((nrflags & F_INTERFACE) == 0) flags |= RTF_GATEWAY; - if (proxy) { + if (nrflags & F_PROXY) { so_dst.sinarp.sin_other = SIN_PROXY; flags |= RTF_ANNOUNCE; } - for (attempts = 1; ; attempts++) { - errno = 0; - if ((ret = rtmsg(*cmd, flags)) == 0) - break; - if (errno != ENETUNREACH && errno != ESRCH) - break; - if (af == AF_INET && *gateway != '\0' && - hp != NULL && hp->h_addr_list[1] != NULL) { - hp->h_addr_list++; - memmove(&so_gate.sin.sin_addr, hp->h_addr_list[0], - MIN((size_t)hp->h_length, - sizeof(so_gate.sin.sin_addr))); - } else - break; + if (dest == NULL) + dest = ""; + if (gateway == NULL) + gateway = ""; + + if (TAILQ_EMPTY(&fibl_head)) { + error = fiboptlist_csv("default", &fibl_head); + if (error) + errx(EX_OSERR, "fiboptlist_csv failed."); + } + error = 0; + TAILQ_FOREACH(fl, &fibl_head, fl_next) { + fl->fl_error = newroute_fib(fl->fl_num, cmd, flags); + if (fl->fl_error) + fl->fl_errno = errno; + error += fl->fl_error; } if (*cmd == 'g' || *cmd == 's') - exit(ret != 0); + exit(error); + + error = 0; if (!qflag) { - oerrno = errno; - (void) printf("%s %s %s", cmd, ishost? "host" : "net", dest); - if (*gateway) { - (void) printf(": gateway %s", gateway); - if (attempts > 1 && ret == 0 && af == AF_INET) - (void) printf(" (%s)", - inet_ntoa(((struct sockaddr_in *)&route.rt_gateway)->sin_addr)); + fibnum = 0; + TAILQ_FOREACH(fl, &fibl_head, fl_next) { + if (fl->fl_error == 0) + fibnum++; + } + if (fibnum > 0) { + int firstfib = 1; + + printf("%s %s %s", cmd, + (nrflags & F_ISHOST) ? "host" : "net", dest); + if (*gateway) + printf(": gateway %s", gateway); + + if (numfibs > 1) { + TAILQ_FOREACH(fl, &fibl_head, fl_next) { + if (fl->fl_error == 0 + && fl->fl_num >= 0) { + if (firstfib) { + printf(" fib "); + firstfib = 0; + } + printf("%d", fl->fl_num); + if (fibnum-- > 1) + printf(","); + } + } + } + printf("\n"); } - if (ret == 0) { - (void) printf("\n"); - } else { - switch (oerrno) { - case ESRCH: - errmsg = "not in table"; - break; - case EBUSY: - errmsg = "entry in use"; - break; - case ENOBUFS: - errmsg = "not enough memory"; - break; - case EADDRINUSE: - /* handle recursion avoidance in rt_setgate() */ - errmsg = "gateway uses the same route"; - break; - case EEXIST: - errmsg = "route already in table"; - break; - default: - errmsg = strerror(oerrno); - break; + + fibnum = 0; + TAILQ_FOREACH(fl, &fibl_head, fl_next) { + if (fl->fl_error != 0) { + printf("%s %s %s", cmd, (nrflags & F_ISHOST) + ? "host" : "net", dest); + if (*gateway) + printf(": gateway %s", gateway); + + if (fl->fl_num >= 0) + printf(" fib %d", fl->fl_num); + + switch (fl->fl_errno) { + case ESRCH: + errmsg = "not in table"; + break; + case EBUSY: + errmsg = "entry in use"; + break; + case ENOBUFS: + errmsg = "not enough memory"; + break; + case EADDRINUSE: + /* + * handle recursion avoidance + * in rt_setgate() + */ + errmsg = "gateway uses the same route"; + break; + case EEXIST: + errmsg = "route already in table"; + break; + default: + errmsg = strerror(fl->fl_errno); + break; + } + printf(": %s\n", errmsg); + error = 1; } - (void) printf(": %s\n", errmsg); } } - exit(ret != 0); + exit(error); +} + +static int +newroute_fib(int fib, char *cmd, int flags) +{ + int error; + + error = set_sofib(fib); + if (error) { + warn("fib number %d is ignored", fib); + return (error); + } + + error = rtmsg(*cmd, flags, fib); + return (error); } static void @@ -1132,10 +1395,33 @@ retry2: } static void -monitor(void) +monitor(int argc, char *argv[]) { - int n; - char msg[2048]; + int n, fib, error; + char msg[2048], *endptr; + + fib = defaultfib; + while (argc > 1) { + argc--; + argv++; + if (**argv != '-') + usage(*argv); + switch (keyword(*argv + 1)) { + case K_FIB: + if (!--argc) + usage(*argv); + fib = strtol(*++argv, &endptr, 0); + if (*endptr != '\0' || (fib == 0 && + (errno == EINVAL || errno == ERANGE))) + usage(*argv); + break; + default: + usage(*argv); + } + } + error = set_sofib(fib); + if (error) + errx(EX_USAGE, "invalid fib number: %d", fib); verbose = 1; if (debugonly) { @@ -1157,7 +1443,7 @@ struct { } m_rtmsg; static int -rtmsg(int cmd, int flags) +rtmsg(int cmd, int flags, int fib) { static int seq; int rlen; @@ -1220,7 +1506,7 @@ rtmsg(int cmd, int flags) if (l < 0) warn("read from routing socket"); else - print_getmsg(&rtm, l); + print_getmsg(&rtm, l, fib); } #undef rtm return (0); @@ -1397,7 +1683,7 @@ badlen: } static void -print_getmsg(struct rt_msghdr *rtm, int msglen) +print_getmsg(struct rt_msghdr *rtm, int msglen, int fib) { struct sockaddr *dst = NULL, *gate = NULL, *mask = NULL; struct sockaddr_dl *ifp = NULL; @@ -1457,6 +1743,8 @@ print_getmsg(struct rt_msghdr *rtm, int } if (gate && rtm->rtm_flags & RTF_GATEWAY) (void)printf(" gateway: %s\n", routename(gate)); + if (fib >= 0) + (void)printf(" fib: %u\n", (unsigned int)fib); if (ifp) (void)printf(" interface: %.*s\n", ifp->sdl_nlen, ifp->sdl_data); From owner-svn-src-head@FreeBSD.ORG Sat Nov 17 20:04:05 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 29B65C62; Sat, 17 Nov 2012 20:04:05 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0DFF68FC13; Sat, 17 Nov 2012 20:04:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAHK44dL073425; Sat, 17 Nov 2012 20:04:04 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAHK44gF073418; Sat, 17 Nov 2012 20:04:04 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201211172004.qAHK44gF073418@svn.freebsd.org> From: Michael Tuexen Date: Sat, 17 Nov 2012 20:04:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243186 - in head/sys: netinet netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2012 20:04:05 -0000 Author: tuexen Date: Sat Nov 17 20:04:04 2012 New Revision: 243186 URL: http://svnweb.freebsd.org/changeset/base/243186 Log: Add support for SCTP/UDP/IPV6. This completes the support of http://tools.ietf.org/html/draft-ietf-tsvwg-sctp-udp-encaps MFC after: 1 week Modified: head/sys/netinet/sctp_pcb.h head/sys/netinet/sctp_sysctl.c head/sys/netinet/sctputil.c head/sys/netinet/sctputil.h head/sys/netinet6/sctp6_usrreq.c head/sys/netinet6/sctp6_var.h Modified: head/sys/netinet/sctp_pcb.h ============================================================================== --- head/sys/netinet/sctp_pcb.h Sat Nov 17 19:54:23 2012 (r243185) +++ head/sys/netinet/sctp_pcb.h Sat Nov 17 20:04:04 2012 (r243186) @@ -144,7 +144,12 @@ struct sctp_tagblock { struct sctp_epinfo { - struct socket *udp_tun_socket; +#ifdef INET + struct socket *udp4_tun_socket; +#endif +#ifdef INET6 + struct socket *udp6_tun_socket; +#endif struct sctpasochead *sctp_asochash; u_long hashasocmark; Modified: head/sys/netinet/sctp_sysctl.c ============================================================================== --- head/sys/netinet/sctp_sysctl.c Sat Nov 17 19:54:23 2012 (r243185) +++ head/sys/netinet/sctp_sysctl.c Sat Nov 17 20:04:04 2012 (r243186) @@ -549,8 +549,6 @@ skip: if ((var) < (min)) { (var) = (min); } \ else if ((var) > (max)) { (var) = (max); } -/* XXX: Remove the #if after tunneling over IPv6 works also on FreeBSD. */ -#if !defined(__FreeBSD__) || defined(INET) static int sysctl_sctp_udp_tunneling_check(SYSCTL_HANDLER_ARGS) { @@ -582,8 +580,6 @@ out: return (error); } -#endif - static int sysctl_sctp_check(SYSCTL_HANDLER_ARGS) @@ -1067,12 +1063,9 @@ SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUT "Clear SCTP Logging buffer"); #endif -/* XXX: Remove the #if after tunneling over IPv6 works also on FreeBSD. */ -#if !defined(__FreeBSD__) || defined(INET) SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, udp_tunneling_port, CTLTYPE_UINT | CTLFLAG_RW, &SCTP_BASE_SYSCTL(sctp_udp_tunneling_port), 0, sysctl_sctp_udp_tunneling_check, "IU", SCTPCTL_UDP_TUNNELING_PORT_DESC); -#endif SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, enable_sack_immediately, CTLTYPE_UINT | CTLFLAG_RW, &SCTP_BASE_SYSCTL(sctp_enable_sack_immediately), 0, sysctl_sctp_check, "IU", Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Sat Nov 17 19:54:23 2012 (r243185) +++ head/sys/netinet/sctputil.c Sat Nov 17 20:04:04 2012 (r243186) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include #ifdef INET6 +#include #endif #include #include @@ -48,6 +49,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include +#include #ifndef KTR_SCTP @@ -6769,24 +6773,15 @@ sctp_log_trace(uint32_t subsys, const ch } #endif -/* XXX: Remove the #ifdef after tunneling over IPv6 works also on FreeBSD. */ -#ifdef INET -/* We will need to add support - * to bind the ports and such here - * so we can do UDP tunneling. In - * the mean-time, we return error - */ -#include -#include -#include -#ifdef INET6 -#include -#endif - static void sctp_recv_udp_tunneled_packet(struct mbuf *m, int off, struct inpcb *ignored) { struct ip *iph; + +#ifdef INET6 + struct ip6_hdr *ip6; + +#endif struct mbuf *sp, *last; struct udphdr *uhdr; uint16_t port; @@ -6836,10 +6831,10 @@ sctp_recv_udp_tunneled_packet(struct mbu #endif #ifdef INET6 case IPV6_VERSION >> 4: - /* Not yet supported. */ - goto out; + ip6 = mtod(m, struct ip6_hdr *); + ip6->ip6_plen = htons(ntohs(ip6->ip6_plen) - sizeof(struct udphdr)); + sctp6_input_with_port(&m, &off, port); break; - #endif default: goto out; @@ -6853,19 +6848,22 @@ out: void sctp_over_udp_stop(void) { - struct socket *sop; - /* * This function assumes sysctl caller holds sctp_sysctl_info_lock() * for writting! */ - if (SCTP_BASE_INFO(udp_tun_socket) == NULL) { - /* Nothing to do */ - return; +#ifdef INET + if (SCTP_BASE_INFO(udp4_tun_socket) != NULL) { + soclose(SCTP_BASE_INFO(udp4_tun_socket)); + SCTP_BASE_INFO(udp4_tun_socket) = NULL; } - sop = SCTP_BASE_INFO(udp_tun_socket); - soclose(sop); - SCTP_BASE_INFO(udp_tun_socket) = NULL; +#endif +#ifdef INET6 + if (SCTP_BASE_INFO(udp6_tun_socket) != NULL) { + soclose(SCTP_BASE_INFO(udp6_tun_socket)); + SCTP_BASE_INFO(udp6_tun_socket) = NULL; + } +#endif } int @@ -6873,53 +6871,83 @@ sctp_over_udp_start(void) { uint16_t port; int ret; + +#ifdef INET struct sockaddr_in sin; - struct socket *sop = NULL; - struct thread *th; - struct ucred *cred; +#endif +#ifdef INET6 + struct sockaddr_in6 sin6; + +#endif /* * This function assumes sysctl caller holds sctp_sysctl_info_lock() * for writting! */ port = SCTP_BASE_SYSCTL(sctp_udp_tunneling_port); - if (port == 0) { + if (ntohs(port) == 0) { /* Must have a port set */ return (EINVAL); } - if (SCTP_BASE_INFO(udp_tun_socket) != NULL) { +#ifdef INET + if (SCTP_BASE_INFO(udp4_tun_socket) != NULL) { + /* Already running -- must stop first */ + return (EALREADY); + } +#endif +#ifdef INET6 + if (SCTP_BASE_INFO(udp6_tun_socket) != NULL) { /* Already running -- must stop first */ return (EALREADY); } - th = curthread; - cred = th->td_ucred; - if ((ret = socreate(PF_INET, &sop, - SOCK_DGRAM, IPPROTO_UDP, cred, th))) { +#endif +#ifdef INET + if ((ret = socreate(PF_INET, &SCTP_BASE_INFO(udp4_tun_socket), + SOCK_DGRAM, IPPROTO_UDP, + curthread->td_ucred, curthread))) { + sctp_over_udp_stop(); return (ret); } - SCTP_BASE_INFO(udp_tun_socket) = sop; - /* call the special UDP hook */ - ret = udp_set_kernel_tunneling(sop, sctp_recv_udp_tunneled_packet); - if (ret) { - goto exit_stage_left; - } - /* Ok we have a socket, bind it to the port */ - memset(&sin, 0, sizeof(sin)); - sin.sin_len = sizeof(sin); + /* Call the special UDP hook. */ + if ((ret = udp_set_kernel_tunneling(SCTP_BASE_INFO(udp4_tun_socket), + sctp_recv_udp_tunneled_packet))) { + sctp_over_udp_stop(); + return (ret); + } + /* Ok, we have a socket, bind it to the port. */ + memset(&sin, 0, sizeof(struct sockaddr_in)); + sin.sin_len = sizeof(struct sockaddr_in); sin.sin_family = AF_INET; sin.sin_port = htons(port); - ret = sobind(sop, (struct sockaddr *)&sin, th); - if (ret) { - /* Close up we cant get the port */ -exit_stage_left: + if ((ret = sobind(SCTP_BASE_INFO(udp4_tun_socket), + (struct sockaddr *)&sin, curthread))) { sctp_over_udp_stop(); return (ret); } - /* - * Ok we should now get UDP packets directly to our input routine - * sctp_recv_upd_tunneled_packet(). - */ +#endif +#ifdef INET6 + if ((ret = socreate(PF_INET6, &SCTP_BASE_INFO(udp6_tun_socket), + SOCK_DGRAM, IPPROTO_UDP, + curthread->td_ucred, curthread))) { + sctp_over_udp_stop(); + return (ret); + } + /* Call the special UDP hook. */ + if ((ret = udp_set_kernel_tunneling(SCTP_BASE_INFO(udp6_tun_socket), + sctp_recv_udp_tunneled_packet))) { + sctp_over_udp_stop(); + return (ret); + } + /* Ok, we have a socket, bind it to the port. */ + memset(&sin6, 0, sizeof(struct sockaddr_in6)); + sin6.sin6_len = sizeof(struct sockaddr_in6); + sin6.sin6_family = AF_INET6; + sin6.sin6_port = htons(port); + if ((ret = sobind(SCTP_BASE_INFO(udp6_tun_socket), + (struct sockaddr *)&sin6, curthread))) { + sctp_over_udp_stop(); + return (ret); + } +#endif return (0); } - -#endif Modified: head/sys/netinet/sctputil.h ============================================================================== --- head/sys/netinet/sctputil.h Sat Nov 17 19:54:23 2012 (r243185) +++ head/sys/netinet/sctputil.h Sat Nov 17 20:04:04 2012 (r243186) @@ -323,13 +323,9 @@ do { \ } while (0) /* functions to start/stop udp tunneling */ -/* XXX: Remove the #ifdef after tunneling over IPv6 works also on FreeBSD. */ -#ifdef INET void sctp_over_udp_stop(void); int sctp_over_udp_start(void); -#endif - int sctp_soreceive(struct socket *so, struct sockaddr **psa, struct uio *uio, Modified: head/sys/netinet6/sctp6_usrreq.c ============================================================================== --- head/sys/netinet6/sctp6_usrreq.c Sat Nov 17 19:54:23 2012 (r243185) +++ head/sys/netinet6/sctp6_usrreq.c Sat Nov 17 20:04:04 2012 (r243186) @@ -66,7 +66,7 @@ __FBSDID("$FreeBSD$"); extern struct protosw inetsw[]; int -sctp6_input(struct mbuf **i_pak, int *offp, int proto) +sctp6_input_with_port(struct mbuf **i_pak, int *offp, uint16_t port) { struct mbuf *m; int iphlen; @@ -84,7 +84,6 @@ sctp6_input(struct mbuf **i_pak, int *of #endif uint32_t mflowid; uint8_t use_mflowid; - uint16_t port = 0; iphlen = *offp; if (SCTP_GET_PKT_VRFID(*i_pak, vrf_id)) { @@ -195,6 +194,12 @@ out: } +int +sctp6_input(struct mbuf **i_pak, int *offp, int proto SCTP_UNUSED) +{ + return (sctp6_input_with_port(i_pak, offp, 0)); +} + static void sctp6_notify_mbuf(struct sctp_inpcb *inp, struct icmp6_hdr *icmp6, struct sctphdr *sh, struct sctp_tcb *stcb, struct sctp_nets *net) Modified: head/sys/netinet6/sctp6_var.h ============================================================================== --- head/sys/netinet6/sctp6_var.h Sat Nov 17 19:54:23 2012 (r243185) +++ head/sys/netinet6/sctp6_var.h Sat Nov 17 20:04:04 2012 (r243186) @@ -42,6 +42,7 @@ SYSCTL_DECL(_net_inet6_sctp6); extern struct pr_usrreqs sctp6_usrreqs; int sctp6_input(struct mbuf **, int *, int); +int sctp6_input_with_port(struct mbuf **, int *, uint16_t); int sctp6_output(struct sctp_inpcb *, struct mbuf *, struct sockaddr *, struct mbuf *, struct proc *); From owner-svn-src-head@FreeBSD.ORG Sat Nov 17 20:19:01 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0C4C542A; Sat, 17 Nov 2012 20:19:01 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D6C398FC13; Sat, 17 Nov 2012 20:19:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAHKJ0GT075905; Sat, 17 Nov 2012 20:19:00 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAHKJ06R075900; Sat, 17 Nov 2012 20:19:00 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201211172019.qAHKJ06R075900@svn.freebsd.org> From: Hiroki Sato Date: Sat, 17 Nov 2012 20:19:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243187 - in head: sbin/ifconfig sbin/route sys/net usr.bin/netstat usr.sbin/rpcbind X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2012 20:19:01 -0000 Author: hrs Date: Sat Nov 17 20:19:00 2012 New Revision: 243187 URL: http://svnweb.freebsd.org/changeset/base/243187 Log: Fill sin6_scope_id in sockaddr_in6 before passing it from the kernel to userland via routing socket or sysctl. This eliminates the following KAME-specific sin6_scope_id handling routine from each userland utility: sin6.sin6_scope_id = ntohs(*(u_int16_t *)&sin6.sin6_addr.s6_addr[2]); This behavior can be controlled by net.inet6.ip6.deembed_scopeid. This is set to 1 by default (sin6_scope_id will be filled in the kernel). Reviewed by: bz Modified: head/sbin/ifconfig/af_inet6.c head/sbin/route/route.c head/sys/net/rtsock.c head/usr.bin/netstat/route.c head/usr.sbin/rpcbind/util.c Modified: head/sbin/ifconfig/af_inet6.c ============================================================================== --- head/sbin/ifconfig/af_inet6.c Sat Nov 17 20:04:04 2012 (r243186) +++ head/sbin/ifconfig/af_inet6.c Sat Nov 17 20:19:00 2012 (r243187) @@ -62,7 +62,6 @@ static struct in6_aliasreq in6_addreq = .ifra_lifetime = { 0, 0, ND6_INFINITE_LIFETIME, ND6_INFINITE_LIFETIME } }; static int ip6lifetime; -static void in6_fillscopeid(struct sockaddr_in6 *sin6); static int prefix(void *, int); static char *sec2str(time_t); static int explicit_prefix = 0; @@ -166,18 +165,6 @@ setip6eui64(const char *cmd, int dummy _ } static void -in6_fillscopeid(struct sockaddr_in6 *sin6) -{ -#if defined(__KAME__) && defined(KAME_SCOPEID) - if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) { - sin6->sin6_scope_id = - ntohs(*(u_int16_t *)&sin6->sin6_addr.s6_addr[2]); - sin6->sin6_addr.s6_addr[2] = sin6->sin6_addr.s6_addr[3] = 0; - } -#endif -} - -static void in6_status(int s __unused, const struct ifaddrs *ifa) { struct sockaddr_in6 *sin, null_sin; @@ -187,7 +174,6 @@ in6_status(int s __unused, const struct struct in6_addrlifetime lifetime; time_t t = time(NULL); int error; - u_int32_t scopeid; memset(&null_sin, 0, sizeof(null_sin)); @@ -217,18 +203,6 @@ in6_status(int s __unused, const struct lifetime = ifr6.ifr_ifru.ifru_lifetime; close(s6); - /* XXX: embedded link local addr check */ - if (IN6_IS_ADDR_LINKLOCAL(&sin->sin6_addr) && - *(u_short *)&sin->sin6_addr.s6_addr[2] != 0) { - u_short index; - - index = *(u_short *)&sin->sin6_addr.s6_addr[2]; - *(u_short *)&sin->sin6_addr.s6_addr[2] = 0; - if (sin->sin6_scope_id == 0) - sin->sin6_scope_id = ntohs(index); - } - scopeid = sin->sin6_scope_id; - error = getnameinfo((struct sockaddr *)sin, sin->sin6_len, addr_buf, sizeof(addr_buf), NULL, 0, NI_NUMERICHOST); if (error != 0) @@ -245,17 +219,6 @@ in6_status(int s __unused, const struct if (sin != NULL && sin->sin6_family == AF_INET6) { int error; - /* XXX: embedded link local addr check */ - if (IN6_IS_ADDR_LINKLOCAL(&sin->sin6_addr) && - *(u_short *)&sin->sin6_addr.s6_addr[2] != 0) { - u_short index; - - index = *(u_short *)&sin->sin6_addr.s6_addr[2]; - *(u_short *)&sin->sin6_addr.s6_addr[2] = 0; - if (sin->sin6_scope_id == 0) - sin->sin6_scope_id = ntohs(index); - } - error = getnameinfo((struct sockaddr *)sin, sin->sin6_len, addr_buf, sizeof(addr_buf), NULL, 0, @@ -288,8 +251,8 @@ in6_status(int s __unused, const struct if ((flags6 & IN6_IFF_TEMPORARY) != 0) printf("temporary "); - if (scopeid) - printf("scopeid 0x%x ", scopeid); + if (sin->sin6_scope_id) + printf("scopeid 0x%x ", sin->sin6_scope_id); if (ip6lifetime && (lifetime.ia6t_preferred || lifetime.ia6t_expire)) { printf("pltime "); @@ -458,7 +421,6 @@ in6_status_tunnel(int s) return; if (sa->sa_family != AF_INET6) return; - in6_fillscopeid(&in6_ifr.ifr_addr); if (getnameinfo(sa, sa->sa_len, src, sizeof(src), 0, 0, NI_NUMERICHOST) != 0) src[0] = '\0'; @@ -467,7 +429,6 @@ in6_status_tunnel(int s) return; if (sa->sa_family != AF_INET6) return; - in6_fillscopeid(&in6_ifr.ifr_addr); if (getnameinfo(sa, sa->sa_len, dst, sizeof(dst), 0, 0, NI_NUMERICHOST) != 0) dst[0] = '\0'; Modified: head/sbin/route/route.c ============================================================================== --- head/sbin/route/route.c Sat Nov 17 20:04:04 2012 (r243186) +++ head/sbin/route/route.c Sat Nov 17 20:19:00 2012 (r243187) @@ -557,18 +557,6 @@ routename(struct sockaddr *sa) memcpy(&sin6, sa, sa->sa_len); sin6.sin6_len = sizeof(struct sockaddr_in6); sin6.sin6_family = AF_INET6; -#ifdef __KAME__ - if (sa->sa_len == sizeof(struct sockaddr_in6) && - (IN6_IS_ADDR_LINKLOCAL(&sin6.sin6_addr) || - IN6_IS_ADDR_MC_LINKLOCAL(&sin6.sin6_addr) || - IN6_IS_ADDR_MC_NODELOCAL(&sin6.sin6_addr)) && - sin6.sin6_scope_id == 0) { - sin6.sin6_scope_id = - ntohs(*(u_int16_t *)&sin6.sin6_addr.s6_addr[2]); - sin6.sin6_addr.s6_addr[2] = 0; - sin6.sin6_addr.s6_addr[3] = 0; - } -#endif if (nflag) niflags |= NI_NUMERICHOST; if (getnameinfo((struct sockaddr *)&sin6, sin6.sin6_len, @@ -661,18 +649,6 @@ netname(struct sockaddr *sa) memcpy(&sin6, sa, sa->sa_len); sin6.sin6_len = sizeof(struct sockaddr_in6); sin6.sin6_family = AF_INET6; -#ifdef __KAME__ - if (sa->sa_len == sizeof(struct sockaddr_in6) && - (IN6_IS_ADDR_LINKLOCAL(&sin6.sin6_addr) || - IN6_IS_ADDR_MC_LINKLOCAL(&sin6.sin6_addr) || - IN6_IS_ADDR_MC_NODELOCAL(&sin6.sin6_addr)) && - sin6.sin6_scope_id == 0) { - sin6.sin6_scope_id = - ntohs(*(u_int16_t *)&sin6.sin6_addr.s6_addr[2]); - sin6.sin6_addr.s6_addr[2] = 0; - sin6.sin6_addr.s6_addr[3] = 0; - } -#endif if (nflag) niflags |= NI_NUMERICHOST; if (getnameinfo((struct sockaddr *)&sin6, sin6.sin6_len, @@ -1232,16 +1208,6 @@ getaddr(int which, char *str, struct hos exit(1); } memcpy(&su->sin6, res->ai_addr, sizeof(su->sin6)); -#ifdef __KAME__ - if ((IN6_IS_ADDR_LINKLOCAL(&su->sin6.sin6_addr) || - IN6_IS_ADDR_MC_LINKLOCAL(&su->sin6.sin6_addr) || - IN6_IS_ADDR_MC_NODELOCAL(&su->sin6.sin6_addr)) && - su->sin6.sin6_scope_id) { - *(u_int16_t *)&su->sin6.sin6_addr.s6_addr[2] = - htons(su->sin6.sin6_scope_id); - su->sin6.sin6_scope_id = 0; - } -#endif freeaddrinfo(res); if (q != NULL) *q++ = '/'; Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Sat Nov 17 20:04:04 2012 (r243186) +++ head/sys/net/rtsock.c Sat Nov 17 20:19:00 2012 (r243187) @@ -175,6 +175,14 @@ MTX_SYSINIT(rtsock, &rtsock_mtx, "rtsock #define RTSOCK_LOCK_ASSERT() mtx_assert(&rtsock_mtx, MA_OWNED) static SYSCTL_NODE(_net, OID_AUTO, route, CTLFLAG_RD, 0, ""); +#ifdef INET6 +static VNET_DEFINE(int, deembed_scopeid) = 1; +#define V_deembed_scopeid VNET(deembed_scopeid) +SYSCTL_DECL(_net_inet6_ip6); +SYSCTL_VNET_INT(_net_inet6_ip6, OID_AUTO, deembed_scopeid, CTLFLAG_RW, + &VNET_NAME(deembed_scopeid), 0, + "Extract embedded zone ID and set it to sin6_scope_id in sockaddr_in6."); +#endif struct walkarg { int w_tmemsize; @@ -563,6 +571,11 @@ route_output(struct mbuf *m, struct sock struct rtentry *rt = NULL; struct radix_node_head *rnh; struct rt_addrinfo info; +#ifdef INET6 + struct sockaddr_storage ss_dst; + struct sockaddr_storage ss_gw; + struct sockaddr_in6 *sin6; +#endif int len, error = 0; struct ifnet *ifp = NULL; union sockaddr_union saun; @@ -790,7 +803,31 @@ route_output(struct mbuf *m, struct sock senderr(ESRCH); } info.rti_info[RTAX_DST] = rt_key(rt); +#ifdef INET6 + switch (rt_key(rt)->sa_family) { + case AF_INET6: + if (V_deembed_scopeid == 0) + break; + sin6 = (struct sockaddr_in6 *)&ss_dst; + bcopy(rt_key(rt), sin6, sizeof(*sin6)); + if (sa6_recoverscope(sin6) == 0) + info.rti_info[RTAX_DST] = + (struct sockaddr *)sin6; + break; + } +#endif info.rti_info[RTAX_GATEWAY] = rt->rt_gateway; +#ifdef INET6 + switch (rt->rt_gateway->sa_family) { + case AF_INET6: + sin6 = (struct sockaddr_in6 *)&ss_gw; + bcopy(rt->rt_gateway, sin6, sizeof(*sin6)); + if (sa6_recoverscope(sin6) == 0) + info.rti_info[RTAX_GATEWAY] = + (struct sockaddr *)sin6; + break; + } +#endif info.rti_info[RTAX_NETMASK] = rt_mask(rt); info.rti_info[RTAX_GENMASK] = 0; if (rtm->rtm_addrs & (RTA_IFP | RTA_IFA)) { @@ -1041,6 +1078,10 @@ rt_msg1(int type, struct rt_addrinfo *rt struct mbuf *m; int i; struct sockaddr *sa; +#ifdef INET6 + struct sockaddr_storage ss; + struct sockaddr_in6 *sin6; +#endif int len, dlen; switch (type) { @@ -1088,6 +1129,18 @@ rt_msg1(int type, struct rt_addrinfo *rt continue; rtinfo->rti_addrs |= (1 << i); dlen = SA_SIZE(sa); +#ifdef INET6 + switch (sa->sa_family) { + case AF_INET6: + if (V_deembed_scopeid == 0) + break; + sin6 = (struct sockaddr_in6 *)&ss; + bcopy(sa, sin6, sizeof(*sin6)); + if (sa6_recoverscope(sin6) == 0) + sa = (struct sockaddr *)sin6; + break; + } +#endif m_copyback(m, len, dlen, (caddr_t)sa); len += dlen; } @@ -1110,6 +1163,10 @@ rt_msg2(int type, struct rt_addrinfo *rt int i; int len, dlen, second_time = 0; caddr_t cp0; +#ifdef INET6 + struct sockaddr_storage ss; + struct sockaddr_in6 *sin6; +#endif rtinfo->rti_addrs = 0; again: @@ -1161,6 +1218,18 @@ again: continue; rtinfo->rti_addrs |= (1 << i); dlen = SA_SIZE(sa); +#ifdef INET6 + switch (sa->sa_family) { + case AF_INET6: + if (V_deembed_scopeid == 0) + break; + sin6 = (struct sockaddr_in6 *)&ss; + bcopy(sa, sin6, sizeof(*sin6)); + if (sa6_recoverscope(sin6) == 0) + sa = (struct sockaddr *)sin6; + break; + } +#endif if (cp) { bcopy((caddr_t)sa, cp, (unsigned)dlen); cp += dlen; @@ -1501,6 +1570,11 @@ sysctl_dumpentry(struct radix_node *rn, struct rtentry *rt = (struct rtentry *)rn; int error = 0, size; struct rt_addrinfo info; +#ifdef INET6 + struct sockaddr_storage ss[RTAX_MAX]; + struct sockaddr_in6 *sin6; +#endif + int i; if (w->w_op == NET_RT_FLAGS && !(rt->rt_flags & w->w_arg)) return 0; @@ -1519,6 +1593,22 @@ sysctl_dumpentry(struct radix_node *rn, if (rt->rt_ifp->if_flags & IFF_POINTOPOINT) info.rti_info[RTAX_BRD] = rt->rt_ifa->ifa_dstaddr; } +#ifdef INET6 + for (i = 0; i < RTAX_MAX; i++) { + if (info.rti_info[i] == NULL) + continue; + switch (info.rti_info[i]->sa_family) { + case AF_INET6: + if (V_deembed_scopeid == 0) + break; + sin6 = (struct sockaddr_in6 *)&ss[i]; + bcopy(info.rti_info[i], sin6, sizeof(*sin6)); + if (sa6_recoverscope(sin6) == 0) + info.rti_info[i] = (struct sockaddr *)sin6; + break; + } + } +#endif size = rt_msg2(RTM_GET, &info, NULL, w); if (w->w_req && w->w_tmem) { struct rt_msghdr *rtm = (struct rt_msghdr *)w->w_tmem; Modified: head/usr.bin/netstat/route.c ============================================================================== --- head/usr.bin/netstat/route.c Sat Nov 17 20:04:04 2012 (r243186) +++ head/usr.bin/netstat/route.c Sat Nov 17 20:19:00 2012 (r243187) @@ -637,6 +637,12 @@ fmt_sockaddr(struct sockaddr *sa, struct { struct sockaddr_in6 *sa6 = (struct sockaddr_in6 *)sa; + /* + * The sa6->sin6_scope_id must be filled here because + * this sockaddr is extracted from kmem(4) directly + * and has KAME-specific embedded scope id in + * sa6->sin6_addr.s6_addr[2]. + */ in6_fillscopeid(sa6); if (flags & RTF_HOST) Modified: head/usr.sbin/rpcbind/util.c ============================================================================== --- head/usr.sbin/rpcbind/util.c Sat Nov 17 20:04:04 2012 (r243186) +++ head/usr.sbin/rpcbind/util.c Sat Nov 17 20:19:00 2012 (r243187) @@ -57,9 +57,6 @@ static struct sockaddr_in6 *local_in6; #endif static int bitmaskcmp(void *, void *, void *, int); -#ifdef INET6 -static void in6_fillscopeid(struct sockaddr_in6 *); -#endif /* * For all bits set in "mask", compare the corresponding bits in @@ -79,26 +76,6 @@ bitmaskcmp(void *dst, void *src, void *m } /* - * Similar to code in ifconfig.c. Fill in the scope ID for link-local - * addresses returned by getifaddrs(). - */ -#ifdef INET6 -static void -in6_fillscopeid(struct sockaddr_in6 *sin6) -{ - u_int16_t ifindex; - - if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) { - ifindex = ntohs(*(u_int16_t *)&sin6->sin6_addr.s6_addr[2]); - if (sin6->sin6_scope_id == 0 && ifindex != 0) { - sin6->sin6_scope_id = ifindex; - *(u_int16_t *)&sin6->sin6_addr.s6_addr[2] = 0; - } - } -} -#endif - -/* * Find a server address that can be used by `caller' to contact * the local service specified by `serv_uaddr'. If `clnt_uaddr' is * non-NULL, it is used instead of `caller' as a hint suggesting @@ -202,7 +179,6 @@ addrmerge(struct netbuf *caller, char *s * a link-local address then use the scope id to see * which one. */ - in6_fillscopeid(SA2SIN6(ifsa)); if (IN6_IS_ADDR_LINKLOCAL(&SA2SIN6ADDR(ifsa)) && IN6_IS_ADDR_LINKLOCAL(&SA2SIN6ADDR(caller_sa)) && IN6_IS_ADDR_LINKLOCAL(&SA2SIN6ADDR(hint_sa))) { From owner-svn-src-head@FreeBSD.ORG Sat Nov 17 21:44:02 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E501A340; Sat, 17 Nov 2012 21:44:02 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C9FF48FC0C; Sat, 17 Nov 2012 21:44:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAHLi228089164; Sat, 17 Nov 2012 21:44:02 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAHLi2VS089163; Sat, 17 Nov 2012 21:44:02 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201211172144.qAHLi2VS089163@svn.freebsd.org> From: Hiroki Sato Date: Sat, 17 Nov 2012 21:44:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243188 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2012 21:44:03 -0000 Author: hrs Date: Sat Nov 17 21:44:02 2012 New Revision: 243188 URL: http://svnweb.freebsd.org/changeset/base/243188 Log: Use -fib N modifier to add/delete a route to/from multiple FIBs. Modified: head/etc/rc.d/routing Modified: head/etc/rc.d/routing ============================================================================== --- head/etc/rc.d/routing Sat Nov 17 20:19:00 2012 (r243187) +++ head/etc/rc.d/routing Sat Nov 17 21:44:02 2012 (r243188) @@ -139,29 +139,20 @@ static_inet() static_inet6() { - local _action i fibs + local _action fibmod fibs _action=$1 # get the number of FIBs supported. - fibs=`sysctl -n net.fibs` - : ${fibs:=1} + fibs=$((`${SYSCTL_N} net.fibs` - 1)) + if [ -n "$fibs" ]; then + fibmod="-fib 0-$fibs" + else + fibmod= + fi # disallow "internal" addresses to appear on the wire - route ${_action} -inet6 ::ffff:0.0.0.0 -prefixlen 96 ::1 -reject - route ${_action} -inet6 ::0.0.0.0 -prefixlen 96 ::1 -reject - i=1 - if test ${i} -lt ${fibs}; then - printf "Also installing reject routes for FIBs" - while test ${i} -lt ${fibs}; do - setfib -F ${i} route -q ${_action} \ - -inet6 ::ffff:0.0.0.0 -prefixlen 96 ::1 -reject - setfib -F ${i} route -q ${_action} \ - -inet6 ::0.0.0.0 -prefixlen 96 ::1 -reject - printf " %d" ${i} - i=$((i + 1)) - done - printf "\n" - fi + route ${_action} -inet6 ::ffff:0.0.0.0 -prefixlen 96 ::1 -reject ${fibmod} + route ${_action} -inet6 ::0.0.0.0 -prefixlen 96 ::1 -reject ${fibmod} case ${ipv6_defaultrouter} in [Nn][Oo] | '') @@ -233,21 +224,8 @@ static_inet6() # for the host case, you will allow to omit the identifiers. # Under this configuration, the packets will go to the default # interface. - route ${_action} -inet6 fe80:: -prefixlen 10 ::1 -reject - route ${_action} -inet6 ff02:: -prefixlen 16 ::1 -reject - i=1 - if test ${i} -lt ${fibs}; then - printf "Also installing reject routes for FIBs" - while test ${i} -lt ${fibs}; do - setfib -F ${i} route -q ${_action} \ - -inet6 fe80:: -prefixlen 10 ::1 -reject - setfib -F ${i} route -q ${_action} \ - -inet6 ff02:: -prefixlen 16 ::1 -reject - printf " %d" ${i} - i=$((i + 1)) - done - printf "\n" - fi + route ${_action} -inet6 fe80:: -prefixlen 10 ::1 -reject ${fibmod} + route ${_action} -inet6 ff02:: -prefixlen 16 ::1 -reject ${fibmod} case ${ipv6_default_interface} in '') From owner-svn-src-head@FreeBSD.ORG Sat Nov 17 21:55:49 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9127BB94; Sat, 17 Nov 2012 21:55:49 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 75ED28FC08; Sat, 17 Nov 2012 21:55:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAHLtnBj091062; Sat, 17 Nov 2012 21:55:49 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAHLtneY091061; Sat, 17 Nov 2012 21:55:49 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201211172155.qAHLtneY091061@svn.freebsd.org> From: Adrian Chadd Date: Sat, 17 Nov 2012 21:55:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243189 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2012 21:55:49 -0000 Author: adrian Date: Sat Nov 17 21:55:49 2012 New Revision: 243189 URL: http://svnweb.freebsd.org/changeset/base/243189 Log: Just compile the whole ath chipset support in. Modified: head/sys/arm/conf/CAMBRIA Modified: head/sys/arm/conf/CAMBRIA ============================================================================== --- head/sys/arm/conf/CAMBRIA Sat Nov 17 21:44:02 2012 (r243188) +++ head/sys/arm/conf/CAMBRIA Sat Nov 17 21:55:49 2012 (r243189) @@ -126,26 +126,15 @@ device ath # Atheros NICs device ath_pci # Atheros pci/cardbus glue options ATH_DEBUG options ATH_DIAGAPI +options ATH_ENABLE_DFS +options ATH_ENABLE_11N #options ATH_TX99_DIAG device ath_rate_sample # SampleRate tx rate control for ath -#options AH_DEBUG -#options AH_ASSERT +options AH_DEBUG options AH_PRIVATE_DIAG -#device ath_ar5210 -#device ath_ar5211 -# -device ath_ar5212 -#device ath_rf2413 -#device ath_rf2425 # NB:supports 2417 too -#device ath_rf5111 -device ath_rf5112 -device ath_rf5413 -# -#device ath_ar5416 options AH_SUPPORT_AR5416 # NB: for 11n descriptor format -#device ath_ar9160 -#device ath_ar9280 +device ath_hal # NB: 2 USB 2.0 ports standard device usb From owner-svn-src-head@FreeBSD.ORG Sat Nov 17 23:06:01 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 42BE8646; Sat, 17 Nov 2012 23:06:01 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 282FB8FC12; Sat, 17 Nov 2012 23:06:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAHN61nY002863; Sat, 17 Nov 2012 23:06:01 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAHN61sl002861; Sat, 17 Nov 2012 23:06:01 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201211172306.qAHN61sl002861@svn.freebsd.org> From: Andrew Turner Date: Sat, 17 Nov 2012 23:06:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243194 - head/sys/arm/xscale/i80321 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2012 23:06:01 -0000 Author: andrew Date: Sat Nov 17 23:06:00 2012 New Revision: 243194 URL: http://svnweb.freebsd.org/changeset/base/243194 Log: Clean up the two i80321 copies of initarm to be closer to one another. Modified: head/sys/arm/xscale/i80321/ep80219_machdep.c head/sys/arm/xscale/i80321/iq31244_machdep.c Modified: head/sys/arm/xscale/i80321/ep80219_machdep.c ============================================================================== --- head/sys/arm/xscale/i80321/ep80219_machdep.c Sat Nov 17 23:05:18 2012 (r243193) +++ head/sys/arm/xscale/i80321/ep80219_machdep.c Sat Nov 17 23:06:00 2012 (r243194) @@ -95,11 +95,11 @@ __FBSDID("$FreeBSD$"); #include #include -#define KERNEL_PT_SYS 0 /* Page table for mapping proc0 zero page */ -#define KERNEL_PT_IOPXS 1 -#define KERNEL_PT_BEFOREKERN 2 -#define KERNEL_PT_AFKERNEL 3 /* L2 table for mapping after kernel */ -#define KERNEL_PT_AFKERNEL_NUM 9 +#define KERNEL_PT_SYS 0 /* Page table for mapping proc0 zero page */ +#define KERNEL_PT_IOPXS 1 +#define KERNEL_PT_BEFOREKERN 2 +#define KERNEL_PT_AFKERNEL 3 /* L2 table for mapping after kernel */ +#define KERNEL_PT_AFKERNEL_NUM 9 /* this should be evenly divisable by PAGE_SIZE / L2_TABLE_SIZE_REAL (or 4) */ #define NUM_KERNEL_PTS (KERNEL_PT_AFKERNEL + KERNEL_PT_AFKERNEL_NUM) @@ -184,10 +184,13 @@ initarm(struct arm_boot_params *abp) pcpu_init(pcpup, 0, sizeof(struct pcpu)); PCPU_SET(curthread, &thread0); + /* Do basic tuning, hz etc */ + init_param1(); + freemempos = 0xa0200000; /* Define a macro to simplify memory allocation */ #define valloc_pages(var, np) \ - alloc_pages((var).pv_pa, (np)); \ + alloc_pages((var).pv_pa, (np)); \ (var).pv_va = (var).pv_pa + 0x20000000; #define alloc_pages(var, np) \ @@ -195,16 +198,13 @@ initarm(struct arm_boot_params *abp) (var) = freemempos; \ memset((char *)(var), 0, ((np) * PAGE_SIZE)); - /* Do basic tuning, hz etc */ - init_param1(); - while (((freemempos - L1_TABLE_SIZE) & (L1_TABLE_SIZE - 1)) != 0) freemempos -= PAGE_SIZE; valloc_pages(kernel_l1pt, L1_TABLE_SIZE / PAGE_SIZE); for (loop = 0; loop < NUM_KERNEL_PTS; ++loop) { if (!(loop % (PAGE_SIZE / L2_TABLE_SIZE_REAL))) { valloc_pages(kernel_pt_table[loop], - L2_TABLE_SIZE / PAGE_SIZE); + L2_TABLE_SIZE / PAGE_SIZE); } else { kernel_pt_table[loop].pv_pa = freemempos + (loop % (PAGE_SIZE / L2_TABLE_SIZE_REAL)) * @@ -237,15 +237,14 @@ initarm(struct arm_boot_params *abp) freemempos -= PAGE_SIZE; freemem_pt = trunc_page(freemem_pt); freemem_after = freemempos - ((freemem_pt - 0xa0100000) / - PAGE_SIZE) * sizeof(struct arm_small_page); - arm_add_smallalloc_pages((void *)(freemem_after + 0x20000000) - , (void *)0xc0100000, freemem_pt - 0xa0100000, 1); + PAGE_SIZE) * sizeof(struct arm_small_page); + arm_add_smallalloc_pages((void *)(freemem_after + 0x20000000), + (void *)0xc0100000, freemem_pt - 0xa0100000, 1); freemem_after -= ((freemem_after - 0xa0001000) / PAGE_SIZE) * sizeof(struct arm_small_page); arm_add_smallalloc_pages((void *)(freemem_after + 0x20000000), - (void *)0xc0001000, - trunc_page(freemem_after) - 0xa0001000, 0); - + (void *)0xc0001000, trunc_page(freemem_after) - 0xa0001000, 0); + freemempos = trunc_page(freemem_after); freemempos -= PAGE_SIZE; #endif @@ -265,27 +264,27 @@ initarm(struct arm_boot_params *abp) /* Map the L2 pages tables in the L1 page table */ pmap_link_l2pt(l1pagetable, ARM_VECTORS_HIGH & ~(0x00100000 - 1), - &kernel_pt_table[KERNEL_PT_SYS]); + &kernel_pt_table[KERNEL_PT_SYS]); pmap_link_l2pt(l1pagetable, IQ80321_IOPXS_VBASE, - &kernel_pt_table[KERNEL_PT_IOPXS]); + &kernel_pt_table[KERNEL_PT_IOPXS]); pmap_link_l2pt(l1pagetable, KERNBASE, - &kernel_pt_table[KERNEL_PT_BEFOREKERN]); + &kernel_pt_table[KERNEL_PT_BEFOREKERN]); pmap_map_chunk(l1pagetable, KERNBASE, IQ80321_SDRAM_START, 0x100000, - VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); + VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); pmap_map_chunk(l1pagetable, KERNBASE + 0x100000, IQ80321_SDRAM_START + 0x100000, - 0x100000, VM_PROT_READ|VM_PROT_WRITE, PTE_PAGETABLE); + 0x100000, VM_PROT_READ|VM_PROT_WRITE, PTE_PAGETABLE); pmap_map_chunk(l1pagetable, KERNBASE + 0x200000, IQ80321_SDRAM_START + 0x200000, - (((uint32_t)(lastaddr) - KERNBASE - 0x200000) + L1_S_SIZE) & ~(L1_S_SIZE - 1), - VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); + (((uint32_t)(lastaddr) - KERNBASE - 0x200000) + L1_S_SIZE) & ~(L1_S_SIZE - 1), + VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); freemem_after = ((int)lastaddr + PAGE_SIZE) & ~(PAGE_SIZE - 1); afterkern = round_page(((vm_offset_t)lastaddr + L1_S_SIZE) & ~(L1_S_SIZE - - 1)); + - 1)); for (i = 0; i < KERNEL_PT_AFKERNEL_NUM; i++) { pmap_link_l2pt(l1pagetable, afterkern + i * 0x00100000, - &kernel_pt_table[KERNEL_PT_AFKERNEL + i]); + &kernel_pt_table[KERNEL_PT_AFKERNEL + i]); } pmap_map_entry(l1pagetable, afterkern, minidataclean.pv_pa, - VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); + VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); #ifdef ARM_USE_SMALL_ALLOC @@ -299,11 +298,11 @@ initarm(struct arm_boot_params *abp) /* Map the Mini-Data cache clean area. */ xscale_setup_minidata(l1pagetable, afterkern, - minidataclean.pv_pa); + minidataclean.pv_pa); /* Map the vector page. */ pmap_map_entry(l1pagetable, ARM_VECTORS_HIGH, systempage.pv_pa, - VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); + VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); pmap_devmap_bootstrap(l1pagetable, ep80219_devmap); /* * Give the XScale global cache clean code an appropriately @@ -360,10 +359,15 @@ initarm(struct arm_boot_params *abp) arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL); pmap_curmaxkvaddr = afterkern + PAGE_SIZE; + /* + * ARM_USE_SMALL_ALLOC uses dump_avail, so it must be filled before + * calling pmap_bootstrap. + */ dump_avail[0] = 0xa0000000; dump_avail[1] = 0xa0000000 + memsize; dump_avail[2] = 0; dump_avail[3] = 0; + pmap_bootstrap(pmap_curmaxkvaddr, 0xd0000000, &kernel_l1pt); msgbufp = (void*)msgbufpv.pv_va; Modified: head/sys/arm/xscale/i80321/iq31244_machdep.c ============================================================================== --- head/sys/arm/xscale/i80321/iq31244_machdep.c Sat Nov 17 23:05:18 2012 (r243193) +++ head/sys/arm/xscale/i80321/iq31244_machdep.c Sat Nov 17 23:06:00 2012 (r243194) @@ -95,10 +95,10 @@ __FBSDID("$FreeBSD$"); #include #include -#define KERNEL_PT_SYS 0 /* Page table for mapping proc0 zero page */ +#define KERNEL_PT_SYS 0 /* Page table for mapping proc0 zero page */ #define KERNEL_PT_IOPXS 1 -#define KERNEL_PT_BEFOREKERN 2 -#define KERNEL_PT_AFKERNEL 3 /* L2 table for mapping after kernel */ +#define KERNEL_PT_BEFOREKERN 2 +#define KERNEL_PT_AFKERNEL 3 /* L2 table for mapping after kernel */ #define KERNEL_PT_AFKERNEL_NUM 9 /* this should be evenly divisable by PAGE_SIZE / L2_TABLE_SIZE_REAL (or 4) */ @@ -187,7 +187,7 @@ initarm(struct arm_boot_params *abp) /* Do basic tuning, hz etc */ init_param1(); - + freemempos = 0xa0200000; /* Define a macro to simplify memory allocation */ #define valloc_pages(var, np) \ @@ -239,12 +239,13 @@ initarm(struct arm_boot_params *abp) freemem_pt = trunc_page(freemem_pt); freemem_after = freemempos - ((freemem_pt - 0xa0100000) / PAGE_SIZE) * sizeof(struct arm_small_page); - arm_add_smallalloc_pages((void *)(freemem_after + 0x20000000) - , (void *)0xc0100000, freemem_pt - 0xa0100000, 1); + arm_add_smallalloc_pages((void *)(freemem_after + 0x20000000), + (void *)0xc0100000, freemem_pt - 0xa0100000, 1); freemem_after -= ((freemem_after - 0xa0001000) / PAGE_SIZE) * sizeof(struct arm_small_page); - arm_add_smallalloc_pages((void *)(freemem_after + 0x20000000) - , (void *)0xc0001000, trunc_page(freemem_after) - 0xa0001000, 0); + arm_add_smallalloc_pages((void *)(freemem_after + 0x20000000), + (void *)0xc0001000, trunc_page(freemem_after) - 0xa0001000, 0); + freemempos = trunc_page(freemem_after); freemempos -= PAGE_SIZE; #endif @@ -266,7 +267,7 @@ initarm(struct arm_boot_params *abp) pmap_link_l2pt(l1pagetable, ARM_VECTORS_HIGH & ~(0x00100000 - 1), &kernel_pt_table[KERNEL_PT_SYS]); pmap_link_l2pt(l1pagetable, IQ80321_IOPXS_VBASE, - &kernel_pt_table[KERNEL_PT_IOPXS]); + &kernel_pt_table[KERNEL_PT_IOPXS]); pmap_link_l2pt(l1pagetable, KERNBASE, &kernel_pt_table[KERNEL_PT_BEFOREKERN]); pmap_map_chunk(l1pagetable, KERNBASE, SDRAM_START, 0x100000, @@ -274,7 +275,7 @@ initarm(struct arm_boot_params *abp) pmap_map_chunk(l1pagetable, KERNBASE + 0x100000, SDRAM_START + 0x100000, 0x100000, VM_PROT_READ|VM_PROT_WRITE, PTE_PAGETABLE); pmap_map_chunk(l1pagetable, KERNBASE + 0x200000, SDRAM_START + 0x200000, - (((uint32_t)(lastaddr) - KERNBASE - 0x200000) + L1_S_SIZE) & ~(L1_S_SIZE - 1), + (((uint32_t)(lastaddr) - KERNBASE - 0x200000) + L1_S_SIZE) & ~(L1_S_SIZE - 1), VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); freemem_after = ((int)lastaddr + PAGE_SIZE) & ~(PAGE_SIZE - 1); afterkern = round_page(((vm_offset_t)lastaddr + L1_S_SIZE) & ~(L1_S_SIZE @@ -358,9 +359,6 @@ initarm(struct arm_boot_params *abp) /* Enable MMU, I-cache, D-cache, write buffer. */ arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL); - - - pmap_curmaxkvaddr = afterkern + PAGE_SIZE; /* * ARM_USE_SMALL_ALLOC uses dump_avail, so it must be filled before @@ -396,7 +394,6 @@ initarm(struct arm_boot_params *abp) sizeof(struct pcb))); } - extern int machdep_pci_route_interrupt(device_t pcib, device_t dev, int pin) { From owner-svn-src-head@FreeBSD.ORG Sat Nov 17 23:49:20 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CBD93D56; Sat, 17 Nov 2012 23:49:20 +0000 (UTC) (envelope-from grog@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B195B8FC12; Sat, 17 Nov 2012 23:49:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAHNnKvH009531; Sat, 17 Nov 2012 23:49:20 GMT (envelope-from grog@svn.freebsd.org) Received: (from grog@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAHNnKpC009530; Sat, 17 Nov 2012 23:49:20 GMT (envelope-from grog@svn.freebsd.org) Message-Id: <201211172349.qAHNnKpC009530@svn.freebsd.org> From: Greg Lehey Date: Sat, 17 Nov 2012 23:49:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243201 - head/usr.bin/locale X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2012 23:49:20 -0000 Author: grog Date: Sat Nov 17 23:49:20 2012 New Revision: 243201 URL: http://svnweb.freebsd.org/changeset/base/243201 Log: Correctly handle keywords without options. Reported by: swills@ MFC after: 14 days Modified: head/usr.bin/locale/locale.c Modified: head/usr.bin/locale/locale.c ============================================================================== --- head/usr.bin/locale/locale.c Sat Nov 17 23:44:01 2012 (r243200) +++ head/usr.bin/locale/locale.c Sat Nov 17 23:49:20 2012 (r243201) @@ -279,8 +279,8 @@ main(int argc, char *argv[]) exit(0); } - /* process '-c' and/or '-k' */ - if (prt_categories || prt_keywords) { + /* process '-c', '-k', or command line arguments. */ + if (prt_categories || prt_keywords || argc > 0) { if (argc > 0) { setlocale(LC_ALL, ""); while (argc > 0) { From owner-svn-src-head@FreeBSD.ORG Sat Nov 17 23:51:55 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F0A45F6; Sat, 17 Nov 2012 23:51:54 +0000 (UTC) (envelope-from grog@lemis.com) Received: from w3.lemis.com (w3.lemis.com [208.86.224.149]) by mx1.freebsd.org (Postfix) with ESMTP id B96378FC12; Sat, 17 Nov 2012 23:51:54 +0000 (UTC) Received: from eureka.lemis.com (1032.x.rootbsd.net [208.86.224.149]) by w3.lemis.com (Postfix) with ESMTP id 635273B751; Sat, 17 Nov 2012 23:51:47 +0000 (UTC) Received: by eureka.lemis.com (Postfix, from userid 1004) id 26003F78BA; Sun, 18 Nov 2012 10:51:44 +1100 (EST) Date: Sun, 18 Nov 2012 10:51:44 +1100 From: Greg 'groggy' Lehey To: Steve Wills Subject: Re: svn commit: r242743 - head/usr.bin/locale Message-ID: <20121117235144.GW85693@eureka.lemis.com> References: <201211080255.qA82tUQc088806@svn.freebsd.org> <50A7B84B.5080909@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tpZe61tYkA9f+p/0" Content-Disposition: inline In-Reply-To: <50A7B84B.5080909@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Organization: The FreeBSD Project Phone: +61-3-5346-1370 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2012 23:51:55 -0000 --tpZe61tYkA9f+p/0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Saturday, 17 November 2012 at 11:16:11 -0500, Steve Wills wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > I think this commit may have broken building the > print/system-config-printer port. It uses xmlto to generate it's > documentation, which calls "locale charmap". On at least 8.3 (only > place I've tested), this returns simply "US-ASCII", which works fine. > But now it returns the full list: > > # locale charmap > LANG= > LC_CTYPE="C" > LC_COLLATE="C" > LC_TIME="C" > LC_NUMERIC="C" > LC_MONETARY="C" > LC_MESSAGES="C" > LC_ALL= > # > > which is fine, but this gets put into an xml file and then fails to > parse. I guess we need to patch xmlto to call something else? Any > advice you can offer would be appreciated. Sorry, my bad. Revision 243201 should fix it. Greg -- Sent from my desktop computer. Finger grog@FreeBSD.org for PGP public key. See complete headers for address and phone numbers. This message is digitally signed. If your Microsoft MUA reports problems, please read http://tinyurl.com/broken-mua --tpZe61tYkA9f+p/0 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlCoIw4ACgkQIubykFB6QiOiUgCfdpK9jRcWtpckaLw1UimcdNwc 1zEAoKxDq9VUoh4HhLJBLwcnGW9XrDA1 =kz0P -----END PGP SIGNATURE----- --tpZe61tYkA9f+p/0-- From owner-svn-src-head@FreeBSD.ORG Sat Nov 17 23:52:39 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6B9CC267; Sat, 17 Nov 2012 23:52:39 +0000 (UTC) (envelope-from grog@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 35CF98FC12; Sat, 17 Nov 2012 23:52:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAHNqd8o010059; Sat, 17 Nov 2012 23:52:39 GMT (envelope-from grog@svn.freebsd.org) Received: (from grog@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAHNqdPY010058; Sat, 17 Nov 2012 23:52:39 GMT (envelope-from grog@svn.freebsd.org) Message-Id: <201211172352.qAHNqdPY010058@svn.freebsd.org> From: Greg Lehey Date: Sat, 17 Nov 2012 23:52:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243202 - head/usr.bin/locale X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2012 23:52:39 -0000 Author: grog Date: Sat Nov 17 23:52:38 2012 New Revision: 243202 URL: http://svnweb.freebsd.org/changeset/base/243202 Log: Sort options. Add comment on standards conformity. MFC after: 14 days Modified: head/usr.bin/locale/locale.1 Modified: head/usr.bin/locale/locale.1 ============================================================================== --- head/usr.bin/locale/locale.1 Sat Nov 17 23:49:20 2012 (r243201) +++ head/usr.bin/locale/locale.1 Sat Nov 17 23:52:38 2012 (r243202) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 1, 2005 +.Dd November 18, 2012 .Dt LOCALE 1 .Os .Sh NAME @@ -70,16 +70,16 @@ will respect the .Ev PATH_LOCALE environment variable, and use it instead of the system's default locale directory. -.It Fl m -Print names of all available charmaps. -.It Fl k -Print the names and values of all selected keywords. -If no keywords are selected, print the names and values of all defined -keywords. .It Fl c Print the category name for all selected keywords. If no keywords are selected, print the category name for all defined keywords. +.It Fl k +Print the names and values of all selected keywords. +If no keywords are selected, print the names and values of all defined +keywords. +.It Fl m +Print names of all available charmaps. .El .Sh IMPLEMENTATION NOTES The special @@ -93,6 +93,17 @@ a prefix string can be defined to limit .Ex -std .Sh SEE ALSO .Xr setlocale 3 +.Sh STANDARDS +The +.Nm +utility conforms to +.St -p1003.1-2004 . +The +.Ev LC_CTYPE , +.Ev LC_MESSAGES +and +.Ev NLSPATH +environment variables are not interpreted. .Sh BUGS Since .Fx From owner-svn-src-head@FreeBSD.ORG Sat Nov 17 23:53:12 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9979F3E0; Sat, 17 Nov 2012 23:53:12 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7F0B28FC19; Sat, 17 Nov 2012 23:53:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAHNrCSj010198; Sat, 17 Nov 2012 23:53:12 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAHNrC8d010197; Sat, 17 Nov 2012 23:53:12 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201211172353.qAHNrC8d010197@svn.freebsd.org> From: Juli Mallett Date: Sat, 17 Nov 2012 23:53:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243203 - head/sys/mips/mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2012 23:53:12 -0000 Author: jmallett Date: Sat Nov 17 23:53:12 2012 New Revision: 243203 URL: http://svnweb.freebsd.org/changeset/base/243203 Log: Remove one wholly-unused and buggy routine and some nearby alternative symbols. While here, also correct a comment that seems to imply that this file is NetBSD's all-singing, all-dancing locore.S, rather than our conservative set of assembly support routines. Modified: head/sys/mips/mips/support.S Modified: head/sys/mips/mips/support.S ============================================================================== --- head/sys/mips/mips/support.S Sat Nov 17 23:52:38 2012 (r243202) +++ head/sys/mips/mips/support.S Sat Nov 17 23:53:12 2012 (r243203) @@ -83,8 +83,7 @@ */ /* - * Contains code that is the first executed at boot time plus - * assembly language support routines. + * Contains assembly language support routines. */ #include "opt_ddb.h" @@ -289,7 +288,6 @@ END(copyerr) #ifdef __mips_n64 LEAF(fuword64) ALEAF(fuword) -ALEAF(fuiword) PTR_LA v0, fswberr blt a0, zero, fswberr # make sure address is in user space nop @@ -305,7 +303,6 @@ END(fuword64) LEAF(fuword32) #ifndef __mips_n64 ALEAF(fuword) -ALEAF(fuiword) #endif PTR_LA v0, fswberr blt a0, zero, fswberr # make sure address is in user space @@ -319,7 +316,6 @@ ALEAF(fuiword) END(fuword32) LEAF(fusword) -ALEAF(fuisword) PTR_LA v0, fswberr blt a0, zero, fswberr # make sure address is in user space nop @@ -332,7 +328,6 @@ ALEAF(fuisword) END(fusword) LEAF(fubyte) -ALEAF(fuibyte) PTR_LA v0, fswberr blt a0, zero, fswberr # make sure address is in user space nop @@ -441,30 +436,10 @@ XLEAF(casuword) END(casuword64) #endif -#if 0 - /* unused in FreeBSD */ -/* - * Have to flush instruction cache afterwards. - */ -LEAF(suiword) - PTR_LA v0, fswberr - blt a0, zero, fswberr # make sure address is in user space - nop - GET_CPU_PCPU(v1) - PTR_L v1, PC_CURPCB(v1) - PTR_S v0, U_PCB_ONFAULT(v1) - sw a1, 0(a0) # store word - PTR_S zero, U_PCB_ONFAULT(v1) - j _C_LABEL(Mips_SyncICache) # FlushICache sets v0 = 0. (Ugly) - li a1, 4 # size of word -END(suiword) -#endif - /* * Will have to flush the instruction cache if byte merging is done in hardware. */ LEAF(susword) -ALEAF(suisword) PTR_LA v0, fswberr blt a0, zero, fswberr # make sure address is in user space nop @@ -478,7 +453,6 @@ ALEAF(suisword) END(susword) LEAF(subyte) -ALEAF(suibyte) PTR_LA v0, fswberr blt a0, zero, fswberr # make sure address is in user space nop @@ -1140,39 +1114,6 @@ LEAF(longjmp) li v0, 1 # longjmp return END(longjmp) -LEAF(fusufault) - GET_CPU_PCPU(t0) - lw t0, PC_CURTHREAD(t0) - lw t0, TD_PCB(t0) - li v0, -1 - j ra -END(fusufault) - - /* Define a new md function 'casuptr'. This atomically compares and sets - a pointer that is in user space. It will be used as the basic primitive - for a kernel supported user space lock implementation. */ -LEAF(casuptr) - PTR_LI t0, VM_MAXUSER_ADDRESS /* verify address validity */ - blt a0, t0, fusufault /* trap faults */ - nop - - GET_CPU_PCPU(t1) - lw t1, PC_CURTHREAD(t1) - lw t1, TD_PCB(t1) - - PTR_LA t2, fusufault - PTR_S t2, U_PCB_ONFAULT(t1) -1: - ll v0, 0(a0) /* try to load the old value */ - beq v0, a1, 2f /* compare */ - move t0, a2 /* setup value to write */ - sc t0, 0(a0) /* write if address still locked */ - beq t0, zero, 1b /* if it failed, spin */ -2: - PTR_S zero, U_PCB_ONFAULT(t1) /* clean up */ - j ra -END(casuptr) - LEAF(mips3_ld) .set push .set noreorder