From owner-svn-src-vendor@FreeBSD.ORG Tue Aug 20 13:19:36 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AEAE31C6; Tue, 20 Aug 2013 13:19:36 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 822302E0A; Tue, 20 Aug 2013 13:19:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7KDJact022187; Tue, 20 Aug 2013 13:19:36 GMT (envelope-from cy@svn.freebsd.org) Received: (from cy@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7KDJZV4022186; Tue, 20 Aug 2013 13:19:35 GMT (envelope-from cy@svn.freebsd.org) Message-Id: <201308201319.r7KDJZV4022186@svn.freebsd.org> From: Cy Schubert Date: Tue, 20 Aug 2013 13:19:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r254560 - vendor/ipfilter/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Aug 2013 13:19:36 -0000 Author: cy Date: Tue Aug 20 13:19:35 2013 New Revision: 254560 URL: http://svnweb.freebsd.org/changeset/base/254560 Log: Document the FreeBSD use of IP-FIlter under the previously existing non-GPL license. Approved by: Darren Reed (IP-Filter author) glebius (mentor) Added: vendor/ipfilter/dist/IPFILTER.LICENCE.FreeBSD Added: vendor/ipfilter/dist/IPFILTER.LICENCE.FreeBSD ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ipfilter/dist/IPFILTER.LICENCE.FreeBSD Tue Aug 20 13:19:35 2013 (r254560) @@ -0,0 +1,83 @@ +Received: from slippy (localhost [127.0.0.1]) + by slippy.cwsent.com (8.14.7/8.14.7) with ESMTP id r68DreQv004291 + for ; Mon, 8 Jul 2013 06:53:40 -0700 (PDT) + (envelope-from Cy.Schubert@komquats.com) +X-Original-To: slippy +Delivered-To: slippy@komquats.com +Received: from cwfw [10.1.1.254] + by slippy with POP3 (fetchmail-6.3.22) + for (single-drop); Mon, 08 Jul 2013 06:53:40 -0700 (PDT) +Received: by spqr.komquats.com (Postfix, from userid 1000) + id 377821BC; Mon, 8 Jul 2013 06:53:38 -0700 (PDT) +X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on cwfw.cwsent.com +X-Spam-Level: +X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,MY_DSL,SMILEY + autolearn=no version=3.3.2 +X-Original-To: Cy.Schubert@komquats.com +Delivered-To: Cy.Schubert@komquats.com +Received: from mail.ipfilter.com.au (dsl-202-45-110-141-static.VIC.netspace.net.au [202.45.110.141]) + by spqr.komquats.com (Postfix) with ESMTP id C69AE18D + for ; Mon, 8 Jul 2013 06:53:31 -0700 (PDT) +Received: (from root@localhost) + by firewall.reed.wattle.id.au (8.12.10/8.11.0) id r68DrJF8001558; + Mon, 8 Jul 2013 23:53:19 +1000 (EST) +Message-ID: <51DAC488.1050700@reed.wattle.id.au> +Date: Mon, 08 Jul 2013 23:54:16 +1000 +From: Darren Reed +Reply-To: darrenr@reed.wattle.id.au +User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 +MIME-Version: 1.0 +To: Cy Schubert +CC: Gleb Smirnoff , Andre Oppermann , + Pedro Giffuni +Subject: Re: IP Filter 5.1.2 License +References: <201307011513.r61FD9IK005944@slippy.cwsent.com> +In-Reply-To: <201307011513.r61FD9IK005944@slippy.cwsent.com> +X-Enigmail-Version: 1.5.1 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 7bit +X-UIDL: NC"#!o_F!!BlL!!bL6!! + +On 2/07/2013 1:13 AM, Cy Schubert wrote: +> In message <51D19503.2090805@reed.wattle.id.au>, Darren Reed writes: +>> On 25/06/2013 11:03 AM, Cy Schubert wrote: +>>> Hi Darren, +>>> +>>> I'm not sure if you remember me or not but I'm a committer at the FreeBSD +>>> Project. I've been a long time IPF user, both under FreeBSD and Solaris. +>>> I've volunteered to maintain IP Filter in the src/ tree. I noticed that the +>> +>>> IP Filter license changed from the previous IP Filter license to GPLv2 +>>> somewhere between 4.1.34 and 4.1.35. I was planning on importing 5.1.2 +>>> however upon discovering it was GPL I decided to update the FreeBSD IPF +>>> from 4.1.28 to 4.1.34 until it was brought to my attention a few days ago +>>> that IPF 5.1.2 was imported into NetBSD. I'm not sure what kind of policy +>>> the NetBSD folks have toward GPL so I thought it best to ask you directly +>>> under what license you imported IPF into NetBSD? If I can I'd like to +>>> import 5.1.2. As IPF author and owner of the code, what are your thoughts. +>> +>>> Can I import IPF 5.1.2 into FreeBSD under a different license from GPL? +>> I imported IPF into NetBSD under the same license that has had previously. +>> When I eventually update FreeBSD, I'll publish the code under the same +>> license that it has now. +>> + +[...] + +> +> When we import into FreeBSD we will not touch the IPFILTER.LICENSE file +> keeping the license as before in our tree. +> +> I don't mind doing the work if you won't mind. + +Not at all. + +Ok, I think there's one important thing for me to say here: + +I, Darren Reed, authorise Cy Schubert to use the IP-Filter source code from CVS on sourceforge in the FreeBSD source code tree using the existing license that currently covers IP-Filter in FreeBSD . + +I think something like that should cover you. + +Cheers, +Darren + From owner-svn-src-vendor@FreeBSD.ORG Tue Aug 20 13:22:22 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 971AA385; Tue, 20 Aug 2013 13:22:22 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8350D2E7A; Tue, 20 Aug 2013 13:22:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7KDMMUr024877; Tue, 20 Aug 2013 13:22:22 GMT (envelope-from cy@svn.freebsd.org) Received: (from cy@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7KDMMO5024873; Tue, 20 Aug 2013 13:22:22 GMT (envelope-from cy@svn.freebsd.org) Message-Id: <201308201322.r7KDMMO5024873@svn.freebsd.org> From: Cy Schubert Date: Tue, 20 Aug 2013 13:22:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r254561 - vendor-sys/ipfilter/dist/netinet X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Aug 2013 13:22:22 -0000 Author: cy Date: Tue Aug 20 13:22:21 2013 New Revision: 254561 URL: http://svnweb.freebsd.org/changeset/base/254561 Log: Revert to the previous IP-Filter license which was inadvertently overwritten by the new GPL license for IP-Filter. ` Document the FreeBSD use of IP-FIlter under the previously existing non-GPL license. Approved by: Darren Reed (IP-Filter author) glebius (mentor) Added: vendor-sys/ipfilter/dist/netinet/IPFILTER.LICENCE.FreeBSD Modified: vendor-sys/ipfilter/dist/netinet/IPFILTER.LICENCE Modified: vendor-sys/ipfilter/dist/netinet/IPFILTER.LICENCE ============================================================================== --- vendor-sys/ipfilter/dist/netinet/IPFILTER.LICENCE Tue Aug 20 13:19:35 2013 (r254560) +++ vendor-sys/ipfilter/dist/netinet/IPFILTER.LICENCE Tue Aug 20 13:22:21 2013 (r254561) @@ -1,340 +1,29 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. +/* + * Copyright (C) 1993-2001 by Darren Reed. + * + * The author accepts no responsibility for the use of this software and + * provides it on an ``as is'' basis without express or implied warranty. + * + * Redistribution and use, with or without modification, in source and binary + * forms, are permitted provided that this notice is preserved in its entirety + * and due credit is given to the original author and the contributors. + * + * The licence and distribution terms for any publically available version or + * derivative of this code cannot be changed. i.e. this code cannot simply be + * copied, in part or in whole, and put under another distribution licence + * [including the GNU Public Licence.] + * + * 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. + * + * I hate legalese, don't you ? + */ Added: vendor-sys/ipfilter/dist/netinet/IPFILTER.LICENCE.FreeBSD ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/ipfilter/dist/netinet/IPFILTER.LICENCE.FreeBSD Tue Aug 20 13:22:21 2013 (r254561) @@ -0,0 +1,83 @@ +Received: from slippy (localhost [127.0.0.1]) + by slippy.cwsent.com (8.14.7/8.14.7) with ESMTP id r68DreQv004291 + for ; Mon, 8 Jul 2013 06:53:40 -0700 (PDT) + (envelope-from Cy.Schubert@komquats.com) +X-Original-To: slippy +Delivered-To: slippy@komquats.com +Received: from cwfw [10.1.1.254] + by slippy with POP3 (fetchmail-6.3.22) + for (single-drop); Mon, 08 Jul 2013 06:53:40 -0700 (PDT) +Received: by spqr.komquats.com (Postfix, from userid 1000) + id 377821BC; Mon, 8 Jul 2013 06:53:38 -0700 (PDT) +X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on cwfw.cwsent.com +X-Spam-Level: +X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,MY_DSL,SMILEY + autolearn=no version=3.3.2 +X-Original-To: Cy.Schubert@komquats.com +Delivered-To: Cy.Schubert@komquats.com +Received: from mail.ipfilter.com.au (dsl-202-45-110-141-static.VIC.netspace.net.au [202.45.110.141]) + by spqr.komquats.com (Postfix) with ESMTP id C69AE18D + for ; Mon, 8 Jul 2013 06:53:31 -0700 (PDT) +Received: (from root@localhost) + by firewall.reed.wattle.id.au (8.12.10/8.11.0) id r68DrJF8001558; + Mon, 8 Jul 2013 23:53:19 +1000 (EST) +Message-ID: <51DAC488.1050700@reed.wattle.id.au> +Date: Mon, 08 Jul 2013 23:54:16 +1000 +From: Darren Reed +Reply-To: darrenr@reed.wattle.id.au +User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 +MIME-Version: 1.0 +To: Cy Schubert +CC: Gleb Smirnoff , Andre Oppermann , + Pedro Giffuni +Subject: Re: IP Filter 5.1.2 License +References: <201307011513.r61FD9IK005944@slippy.cwsent.com> +In-Reply-To: <201307011513.r61FD9IK005944@slippy.cwsent.com> +X-Enigmail-Version: 1.5.1 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 7bit +X-UIDL: NC"#!o_F!!BlL!!bL6!! + +On 2/07/2013 1:13 AM, Cy Schubert wrote: +> In message <51D19503.2090805@reed.wattle.id.au>, Darren Reed writes: +>> On 25/06/2013 11:03 AM, Cy Schubert wrote: +>>> Hi Darren, +>>> +>>> I'm not sure if you remember me or not but I'm a committer at the FreeBSD +>>> Project. I've been a long time IPF user, both under FreeBSD and Solaris. +>>> I've volunteered to maintain IP Filter in the src/ tree. I noticed that the +>> +>>> IP Filter license changed from the previous IP Filter license to GPLv2 +>>> somewhere between 4.1.34 and 4.1.35. I was planning on importing 5.1.2 +>>> however upon discovering it was GPL I decided to update the FreeBSD IPF +>>> from 4.1.28 to 4.1.34 until it was brought to my attention a few days ago +>>> that IPF 5.1.2 was imported into NetBSD. I'm not sure what kind of policy +>>> the NetBSD folks have toward GPL so I thought it best to ask you directly +>>> under what license you imported IPF into NetBSD? If I can I'd like to +>>> import 5.1.2. As IPF author and owner of the code, what are your thoughts. +>> +>>> Can I import IPF 5.1.2 into FreeBSD under a different license from GPL? +>> I imported IPF into NetBSD under the same license that has had previously. +>> When I eventually update FreeBSD, I'll publish the code under the same +>> license that it has now. +>> + +[...] + +> +> When we import into FreeBSD we will not touch the IPFILTER.LICENSE file +> keeping the license as before in our tree. +> +> I don't mind doing the work if you won't mind. + +Not at all. + +Ok, I think there's one important thing for me to say here: + +I, Darren Reed, authorise Cy Schubert to use the IP-Filter source code from CVS on sourceforge in the FreeBSD source code tree using the existing license that currently covers IP-Filter in FreeBSD . + +I think something like that should cover you. + +Cheers, +Darren + From owner-svn-src-vendor@FreeBSD.ORG Tue Aug 20 13:24:45 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F352C6A8; Tue, 20 Aug 2013 13:24:44 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E03E32E9F; Tue, 20 Aug 2013 13:24:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7KDOi3b025412; Tue, 20 Aug 2013 13:24:44 GMT (envelope-from cy@svn.freebsd.org) Received: (from cy@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7KDOiOr025410; Tue, 20 Aug 2013 13:24:44 GMT (envelope-from cy@svn.freebsd.org) Message-Id: <201308201324.r7KDOiOr025410@svn.freebsd.org> From: Cy Schubert Date: Tue, 20 Aug 2013 13:24:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r254562 - vendor-sys/ipfilter/dist/netinet X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Aug 2013 13:24:45 -0000 Author: cy Date: Tue Aug 20 13:24:44 2013 New Revision: 254562 URL: http://svnweb.freebsd.org/changeset/base/254562 Log: Add kernel sources from IP-Filter 5.1.2 to vendor-sys/ branch. Approved by: glebius (mentor) Added: vendor-sys/ipfilter/dist/netinet/ip_dstlist.c (contents, props changed) vendor-sys/ipfilter/dist/netinet/ip_dstlist.h vendor-sys/ipfilter/dist/netinet/ipf_rb.h vendor-sys/ipfilter/dist/netinet/radix_ipf.c (contents, props changed) vendor-sys/ipfilter/dist/netinet/radix_ipf.h Added: vendor-sys/ipfilter/dist/netinet/ip_dstlist.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/ipfilter/dist/netinet/ip_dstlist.c Tue Aug 20 13:24:44 2013 (r254562) @@ -0,0 +1,1351 @@ +/* + * Copyright (C) 2012 by Darren Reed. + * + * See the IPFILTER.LICENCE file for details on licencing. + */ +#if defined(KERNEL) || defined(_KERNEL) +# undef KERNEL +# undef _KERNEL +# define KERNEL 1 +# define _KERNEL 1 +#endif +#if defined(__osf__) +# define _PROTO_NET_H_ +#endif +#include +#include +#include +#include +#if !defined(_KERNEL) && !defined(__KERNEL__) +# include +# include +# include +# define _KERNEL +# ifdef __OpenBSD__ +struct file; +# endif +# include +# undef _KERNEL +#else +# include +# if defined(NetBSD) && (__NetBSD_Version__ >= 104000000) +# include +# endif +#endif +#include +#if !defined(linux) +# include +#endif +#include +#if defined(_KERNEL) && (!defined(__SVR4) && !defined(__svr4__)) +# include +#endif +#if defined(__SVR4) || defined(__svr4__) +# include +# include +# ifdef _KERNEL +# include +# endif +# include +# include +#endif +#if defined(__FreeBSD_version) && (__FreeBSD_version >= 300000) +# include +#endif + +#include +#include + +#include "netinet/ip_compat.h" +#include "netinet/ip_fil.h" +#include "netinet/ip_nat.h" +#include "netinet/ip_lookup.h" +#include "netinet/ip_dstlist.h" + +/* END OF INCLUDES */ + +#ifdef HAS_SYS_MD5_H +# include +#else +# include "md5.h" +#endif + +#if !defined(lint) +static const char rcsid[] = "@(#)$Id: ip_dstlist.c,v 1.13.2.12 2012/07/20 08:40:19 darren_r Exp $"; +#endif + +typedef struct ipf_dstl_softc_s { + ippool_dst_t *dstlist[LOOKUP_POOL_SZ]; + ippool_dst_t **tails[LOOKUP_POOL_SZ]; + ipf_dstl_stat_t stats; +} ipf_dstl_softc_t; + + +static void *ipf_dstlist_soft_create __P((ipf_main_softc_t *)); +static void ipf_dstlist_soft_destroy __P((ipf_main_softc_t *, void *)); +static int ipf_dstlist_soft_init __P((ipf_main_softc_t *, void *)); +static void ipf_dstlist_soft_fini __P((ipf_main_softc_t *, void *)); +static int ipf_dstlist_addr_find __P((ipf_main_softc_t *, void *, int, + void *, u_int)); +static size_t ipf_dstlist_flush __P((ipf_main_softc_t *, void *, + iplookupflush_t *)); +static int ipf_dstlist_iter_deref __P((ipf_main_softc_t *, void *, int, int, + void *)); +static int ipf_dstlist_iter_next __P((ipf_main_softc_t *, void *, ipftoken_t *, + ipflookupiter_t *)); +static int ipf_dstlist_node_add __P((ipf_main_softc_t *, void *, + iplookupop_t *, int)); +static int ipf_dstlist_node_del __P((ipf_main_softc_t *, void *, + iplookupop_t *, int)); +static int ipf_dstlist_stats_get __P((ipf_main_softc_t *, void *, + iplookupop_t *)); +static int ipf_dstlist_table_add __P((ipf_main_softc_t *, void *, + iplookupop_t *)); +static int ipf_dstlist_table_del __P((ipf_main_softc_t *, void *, + iplookupop_t *)); +static int ipf_dstlist_table_deref __P((ipf_main_softc_t *, void *, void *)); +static void *ipf_dstlist_table_find __P((void *, int, char *)); +static void ipf_dstlist_table_free __P((ipf_dstl_softc_t *, ippool_dst_t *)); +static void ipf_dstlist_table_remove __P((ipf_main_softc_t *, + ipf_dstl_softc_t *, ippool_dst_t *)); +static void ipf_dstlist_table_clearnodes __P((ipf_dstl_softc_t *, + ippool_dst_t *)); +static ipf_dstnode_t *ipf_dstlist_select __P((fr_info_t *, ippool_dst_t *)); +static void *ipf_dstlist_select_ref __P((void *, int, char *)); +static void ipf_dstlist_node_free __P((ipf_dstl_softc_t *, ippool_dst_t *, ipf_dstnode_t *)); +static int ipf_dstlist_node_deref __P((void *, ipf_dstnode_t *)); +static void ipf_dstlist_expire __P((ipf_main_softc_t *, void *)); +static void ipf_dstlist_sync __P((ipf_main_softc_t *, void *)); + +ipf_lookup_t ipf_dstlist_backend = { + IPLT_DSTLIST, + ipf_dstlist_soft_create, + ipf_dstlist_soft_destroy, + ipf_dstlist_soft_init, + ipf_dstlist_soft_fini, + ipf_dstlist_addr_find, + ipf_dstlist_flush, + ipf_dstlist_iter_deref, + ipf_dstlist_iter_next, + ipf_dstlist_node_add, + ipf_dstlist_node_del, + ipf_dstlist_stats_get, + ipf_dstlist_table_add, + ipf_dstlist_table_del, + ipf_dstlist_table_deref, + ipf_dstlist_table_find, + ipf_dstlist_select_ref, + ipf_dstlist_select_node, + ipf_dstlist_expire, + ipf_dstlist_sync +}; + + +/* ------------------------------------------------------------------------ */ +/* Function: ipf_dstlist_soft_create */ +/* Returns: int - 0 = success, else error */ +/* Parameters: softc(I) - pointer to soft context main structure */ +/* */ +/* Allocating a chunk of memory filled with 0's is enough for the current */ +/* soft context used with destination lists. */ +/* ------------------------------------------------------------------------ */ +static void * +ipf_dstlist_soft_create(softc) + ipf_main_softc_t *softc; +{ + ipf_dstl_softc_t *softd; + int i; + + KMALLOC(softd, ipf_dstl_softc_t *); + if (softd == NULL) { + IPFERROR(120028); + return NULL; + } + + bzero((char *)softd, sizeof(*softd)); + for (i = 0; i <= IPL_LOGMAX; i++) + softd->tails[i] = &softd->dstlist[i]; + + return softd; +} + + +/* ------------------------------------------------------------------------ */ +/* Function: ipf_dstlist_soft_destroy */ +/* Returns: Nil */ +/* Parameters: softc(I) - pointer to soft context main structure */ +/* arg(I) - pointer to local context to use */ +/* */ +/* For destination lists, the only thing we have to do when destroying the */ +/* soft context is free it! */ +/* ------------------------------------------------------------------------ */ +static void +ipf_dstlist_soft_destroy(softc, arg) + ipf_main_softc_t *softc; + void *arg; +{ + ipf_dstl_softc_t *softd = arg; + + KFREE(softd); +} + + +/* ------------------------------------------------------------------------ */ +/* Function: ipf_dstlist_soft_init */ +/* Returns: int - 0 = success, else error */ +/* Parameters: softc(I) - pointer to soft context main structure */ +/* arg(I) - pointer to local context to use */ +/* */ +/* There is currently no soft context for destination list management. */ +/* ------------------------------------------------------------------------ */ +static int +ipf_dstlist_soft_init(softc, arg) + ipf_main_softc_t *softc; + void *arg; +{ + return 0; +} + + +/* ------------------------------------------------------------------------ */ +/* Function: ipf_dstlist_soft_fini */ +/* Returns: Nil */ +/* Parameters: softc(I) - pointer to soft context main structure */ +/* arg(I) - pointer to local context to use */ +/* */ +/* There is currently no soft context for destination list management. */ +/* ------------------------------------------------------------------------ */ +static void +ipf_dstlist_soft_fini(softc, arg) + ipf_main_softc_t *softc; + void *arg; +{ + ipf_dstl_softc_t *softd = arg; + int i; + + for (i = -1; i <= IPL_LOGMAX; i++) { + while (softd->dstlist[i + 1] != NULL) { + ipf_dstlist_table_remove(softc, softd, + softd->dstlist[i + 1]); + } + } + + ASSERT(softd->stats.ipls_numderefnodes == 0); +} + + +/* ------------------------------------------------------------------------ */ +/* Function: ipf_dstlist_addr_find */ +/* Returns: int - 0 = success, else error */ +/* Parameters: softc(I) - pointer to soft context main structure */ +/* arg1(I) - pointer to local context to use */ +/* arg2(I) - pointer to local context to use */ +/* arg3(I) - pointer to local context to use */ +/* arg4(I) - pointer to local context to use */ +/* */ +/* There is currently no such thing as searching a destination list for an */ +/* address so this function becomes a no-op. Its presence is required as */ +/* ipf_lookup_res_name() stores the "addr_find" function pointer in the */ +/* pointer passed in to it as funcptr, although it could be a generic null- */ +/* op function rather than a specific one. */ +/* ------------------------------------------------------------------------ */ +/*ARGSUSED*/ +static int +ipf_dstlist_addr_find(softc, arg1, arg2, arg3, arg4) + ipf_main_softc_t *softc; + void *arg1, *arg3; + int arg2; + u_int arg4; +{ + return -1; +} + + +/* ------------------------------------------------------------------------ */ +/* Function: ipf_dstlist_flush */ +/* Returns: int - number of objects deleted */ +/* Parameters: softc(I) - pointer to soft context main structure */ +/* arg(I) - pointer to local context to use */ +/* fop(I) - pointer to lookup flush operation data */ +/* */ +/* Flush all of the destination tables that match the data passed in with */ +/* the iplookupflush_t. There are two ways to match objects: the device for */ +/* which they are to be used with and their name. */ +/* ------------------------------------------------------------------------ */ +static size_t +ipf_dstlist_flush(softc, arg, fop) + ipf_main_softc_t *softc; + void *arg; + iplookupflush_t *fop; +{ + ipf_dstl_softc_t *softd = arg; + ippool_dst_t *node, *next; + int n, i; + + for (n = 0, i = -1; i <= IPL_LOGMAX; i++) { + if (fop->iplf_unit != IPLT_ALL && fop->iplf_unit != i) + continue; + for (node = softd->dstlist[i + 1]; node != NULL; node = next) { + next = node->ipld_next; + + if ((*fop->iplf_name != '\0') && + strncmp(fop->iplf_name, node->ipld_name, + FR_GROUPLEN)) + continue; + + ipf_dstlist_table_remove(softc, softd, node); + n++; + } + } + return n; +} + + +/* ------------------------------------------------------------------------ */ +/* Function: ipf_dstlist_iter_deref */ +/* Returns: int - 0 = success, else error */ +/* Parameters: softc(I) - pointer to soft context main structure */ +/* arg(I) - pointer to local context to use */ +/* otype(I) - type of data structure to iterate through */ +/* unit(I) - device we are working with */ +/* data(I) - address of object in kernel space */ +/* */ +/* This function is called when the iteration token is being free'd and is */ +/* responsible for dropping the reference count of the structure it points */ +/* to. */ +/* ------------------------------------------------------------------------ */ +static int +ipf_dstlist_iter_deref(softc, arg, otype, unit, data) + ipf_main_softc_t *softc; + void *arg; + int otype, unit; + void *data; +{ + if (data == NULL) { + IPFERROR(120001); + return EINVAL; + } + + if (unit < -1 || unit > IPL_LOGMAX) { + IPFERROR(120002); + return EINVAL; + } + + switch (otype) + { + case IPFLOOKUPITER_LIST : + ipf_dstlist_table_deref(softc, arg, (ippool_dst_t *)data); + break; + + case IPFLOOKUPITER_NODE : + ipf_dstlist_node_deref(arg, (ipf_dstnode_t *)data); + break; + } + + return 0; +} + + +/* ------------------------------------------------------------------------ */ +/* Function: ipf_dstlist_iter_next */ +/* Returns: int - 0 = success, else error */ +/* Parameters: softc(I) - pointer to soft context main structure */ +/* arg(I) - pointer to local context to use */ +/* op(I) - pointer to lookup operation data */ +/* uid(I) - uid of process doing the ioctl */ +/* */ +/* This function is responsible for either selecting the next destination */ +/* list or node on a destination list to be returned as a user process */ +/* iterates through the list of destination lists or nodes. */ +/* ------------------------------------------------------------------------ */ +static int +ipf_dstlist_iter_next(softc, arg, token, iter) + ipf_main_softc_t *softc; + void *arg; + ipftoken_t *token; + ipflookupiter_t *iter; +{ + ipf_dstnode_t zn, *nextnode = NULL, *node = NULL; + ippool_dst_t zero, *next = NULL, *dsttab = NULL; + ipf_dstl_softc_t *softd = arg; + int err = 0; + void *hint; + + switch (iter->ili_otype) + { + case IPFLOOKUPITER_LIST : + dsttab = token->ipt_data; + if (dsttab == NULL) { + next = softd->dstlist[(int)iter->ili_unit + 1]; + } else { + next = dsttab->ipld_next; + } + + if (next != NULL) { + ATOMIC_INC32(next->ipld_ref); + token->ipt_data = next; + hint = next->ipld_next; + } else { + bzero((char *)&zero, sizeof(zero)); + next = &zero; + token->ipt_data = NULL; + hint = NULL; + } + break; + + case IPFLOOKUPITER_NODE : + node = token->ipt_data; + if (node == NULL) { + dsttab = ipf_dstlist_table_find(arg, iter->ili_unit, + iter->ili_name); + if (dsttab == NULL) { + IPFERROR(120004); + err = ESRCH; + nextnode = NULL; + } else { + if (dsttab->ipld_dests == NULL) + nextnode = NULL; + else + nextnode = *dsttab->ipld_dests; + dsttab = NULL; + } + } else { + nextnode = node->ipfd_next; + } + + if (nextnode != NULL) { + MUTEX_ENTER(&nextnode->ipfd_lock); + nextnode->ipfd_ref++; + MUTEX_EXIT(&nextnode->ipfd_lock); + token->ipt_data = nextnode; + hint = nextnode->ipfd_next; + } else { + bzero((char *)&zn, sizeof(zn)); + nextnode = &zn; + token->ipt_data = NULL; + hint = NULL; + } + break; + default : + IPFERROR(120003); + err = EINVAL; + break; + } + + if (err != 0) + return err; + + switch (iter->ili_otype) + { + case IPFLOOKUPITER_LIST : + if (dsttab != NULL) + ipf_dstlist_table_deref(softc, arg, dsttab); + err = COPYOUT(next, iter->ili_data, sizeof(*next)); + if (err != 0) { + IPFERROR(120005); + err = EFAULT; + } + break; + + case IPFLOOKUPITER_NODE : + if (node != NULL) + ipf_dstlist_node_deref(arg, node); + err = COPYOUT(nextnode, iter->ili_data, sizeof(*nextnode)); + if (err != 0) { + IPFERROR(120006); + err = EFAULT; + } + break; + } + + if (hint == NULL) + ipf_token_mark_complete(token); + + return err; +} + + +/* ------------------------------------------------------------------------ */ +/* Function: ipf_dstlist_node_add */ +/* Returns: int - 0 = success, else error */ +/* Parameters: softc(I) - pointer to soft context main structure */ +/* arg(I) - pointer to local context to use */ +/* op(I) - pointer to lookup operation data */ +/* uid(I) - uid of process doing the ioctl */ +/* Locks: WRITE(ipf_poolrw) */ +/* */ +/* Add a new node to a destination list. To do this, we only copy in the */ +/* frdest_t structure because that contains the only data required from the */ +/* application to create a new node. The frdest_t doesn't contain the name */ +/* itself. When loading filter rules, fd_name is a 'pointer' to the name. */ +/* In this case, the 'pointer' does not work, instead it is the length of */ +/* the name and the name is immediately following the frdest_t structure. */ +/* fd_name must include the trailing \0, so it should be strlen(str) + 1. */ +/* For simple sanity checking, an upper bound on the size of fd_name is */ +/* imposed - 128. */ +/* ------------------------------------------------------------------------ */ +static int +ipf_dstlist_node_add(softc, arg, op, uid) + ipf_main_softc_t *softc; + void *arg; + iplookupop_t *op; + int uid; +{ + ipf_dstl_softc_t *softd = arg; + ipf_dstnode_t *node, **nodes; + ippool_dst_t *d; + frdest_t dest; + int err; + + if (op->iplo_size < sizeof(frdest_t)) { + IPFERROR(120007); + return EINVAL; + } + + err = COPYIN(op->iplo_struct, &dest, sizeof(dest)); + if (err != 0) { + IPFERROR(120009); + return EFAULT; + } + + d = ipf_dstlist_table_find(arg, op->iplo_unit, op->iplo_name); + if (d == NULL) { + IPFERROR(120010); + return ESRCH; + } + + switch (dest.fd_addr.adf_family) + { + case AF_INET : + case AF_INET6 : + break; + default : + IPFERROR(120019); + return EINVAL; + } + + if (dest.fd_name < -1 || dest.fd_name > 128) { + IPFERROR(120018); + return EINVAL; + } + + KMALLOCS(node, ipf_dstnode_t *, sizeof(*node) + dest.fd_name); + if (node == NULL) { + softd->stats.ipls_nomem++; + IPFERROR(120008); + return ENOMEM; + } + bzero((char *)node, sizeof(*node) + dest.fd_name); + + bcopy(&dest, &node->ipfd_dest, sizeof(dest)); + node->ipfd_size = sizeof(*node) + dest.fd_name; + + if (dest.fd_name > 0) { + /* + * fd_name starts out as the length of the string to copy + * in (including \0) and ends up being the offset from + * fd_names (0). + */ + err = COPYIN((char *)op->iplo_struct + sizeof(dest), + node->ipfd_names, dest.fd_name); + if (err != 0) { + IPFERROR(120017); + KFREES(node, node->ipfd_size); + return EFAULT; + } + node->ipfd_dest.fd_name = 0; + } else { + node->ipfd_dest.fd_name = -1; + } + + if (d->ipld_nodes == d->ipld_maxnodes) { + KMALLOCS(nodes, ipf_dstnode_t **, + sizeof(*nodes) * (d->ipld_maxnodes + 1)); + if (nodes == NULL) { + softd->stats.ipls_nomem++; + IPFERROR(120022); + KFREES(node, node->ipfd_size); + return ENOMEM; + } + if (d->ipld_dests != NULL) { + bcopy(d->ipld_dests, nodes, + sizeof(*nodes) * d->ipld_maxnodes); + KFREES(d->ipld_dests, sizeof(*nodes) * d->ipld_nodes); + nodes[0]->ipfd_pnext = nodes; + } + d->ipld_dests = nodes; + d->ipld_maxnodes++; + } + d->ipld_dests[d->ipld_nodes] = node; + d->ipld_nodes++; + + if (d->ipld_nodes == 1) { + node->ipfd_pnext = d->ipld_dests; + } else if (d->ipld_nodes > 1) { + node->ipfd_pnext = &d->ipld_dests[d->ipld_nodes - 2]->ipfd_next; + } + *node->ipfd_pnext = node; + + MUTEX_INIT(&node->ipfd_lock, "ipf dst node lock"); + node->ipfd_uid = uid; + node->ipfd_ref = 1; + if (node->ipfd_dest.fd_name == 0) + (void) ipf_resolvedest(softc, node->ipfd_names, + &node->ipfd_dest, AF_INET); +#ifdef USE_INET6 + if (node->ipfd_dest.fd_name == 0 && + node->ipfd_dest.fd_ptr == (void *)-1) + (void) ipf_resolvedest(softc, node->ipfd_names, + &node->ipfd_dest, AF_INET6); +#endif + + softd->stats.ipls_numnodes++; + + return 0; +} + + +/* ------------------------------------------------------------------------ */ +/* Function: ipf_dstlist_node_deref */ +/* Returns: int - 0 = success, else error */ +/* Parameters: arg(I) - pointer to local context to use */ +/* node(I) - pointer to destionation node to free */ +/* */ +/* Dereference the use count by one. If it drops to zero then we can assume */ +/* that it has been removed from any lists/tables and is ripe for freeing. */ +/* The pointer to context is required for the purpose of maintaining */ +/* statistics. */ +/* ------------------------------------------------------------------------ */ +static int +ipf_dstlist_node_deref(arg, node) + void *arg; + ipf_dstnode_t *node; +{ + ipf_dstl_softc_t *softd = arg; + int ref; + + MUTEX_ENTER(&node->ipfd_lock); + ref = --node->ipfd_ref; + MUTEX_EXIT(&node->ipfd_lock); + + if (ref > 0) + return 0; + + if ((node->ipfd_flags & IPDST_DELETE) != 0) + softd->stats.ipls_numderefnodes--; + MUTEX_DESTROY(&node->ipfd_lock); + KFREES(node, node->ipfd_size); + softd->stats.ipls_numnodes--; + + return 0; +} + + +/* ------------------------------------------------------------------------ */ +/* Function: ipf_dstlist_node_del */ +/* Returns: int - 0 = success, else error */ +/* Parameters: softc(I) - pointer to soft context main structure */ +/* arg(I) - pointer to local context to use */ +/* op(I) - pointer to lookup operation data */ +/* uid(I) - uid of process doing the ioctl */ +/* */ +/* Look for a matching destination node on the named table and free it if */ +/* found. Because the name embedded in the frdest_t is variable in length, */ +/* it is necessary to allocate some memory locally, to complete this op. */ +/* ------------------------------------------------------------------------ */ +static int +ipf_dstlist_node_del(softc, arg, op, uid) + ipf_main_softc_t *softc; + void *arg; + iplookupop_t *op; + int uid; +{ + ipf_dstl_softc_t *softd = arg; + ipf_dstnode_t *node; + frdest_t frd, *temp; + ippool_dst_t *d; + size_t size; + int err; + + d = ipf_dstlist_table_find(arg, op->iplo_unit, op->iplo_name); + if (d == NULL) { + IPFERROR(120012); + return ESRCH; + } + + err = COPYIN(op->iplo_struct, &frd, sizeof(frd)); + if (err != 0) { + IPFERROR(120011); + return EFAULT; + } + + size = sizeof(*temp) + frd.fd_name; + KMALLOCS(temp, frdest_t *, size); + if (temp == NULL) { + softd->stats.ipls_nomem++; + IPFERROR(120026); + return ENOMEM; + } + + err = COPYIN(op->iplo_struct, temp, size); + if (err != 0) { + IPFERROR(120027); + return EFAULT; + } + + MUTEX_ENTER(&d->ipld_lock); + for (node = *d->ipld_dests; node != NULL; node = node->ipfd_next) { + if ((uid != 0) && (node->ipfd_uid != uid)) + continue; + if (node->ipfd_size != size) + continue; + if (!bcmp(&node->ipfd_dest.fd_ip6, &frd.fd_ip6, + size - offsetof(frdest_t, fd_ip6))) { + ipf_dstlist_node_free(softd, d, node); + MUTEX_EXIT(&d->ipld_lock); + KFREES(temp, size); + return 0; + } + } + MUTEX_EXIT(&d->ipld_lock); + KFREES(temp, size); + + return ESRCH; +} + + +/* ------------------------------------------------------------------------ */ +/* Function: ipf_dstlist_node_free */ +/* Returns: Nil */ +/* Parameters: softd(I) - pointer to the destination list context */ +/* d(I) - pointer to destination list */ +/* node(I) - pointer to node to free */ +/* Locks: MUTEX(ipld_lock) or WRITE(ipf_poolrw) */ +/* */ +/* Free the destination node by first removing it from any lists and then */ +/* checking if this was the last reference held to the object. While the */ +/* array of pointers to nodes is compacted, its size isn't reduced (by way */ +/* of allocating a new smaller one and copying) because the belief is that */ +/* it is likely the array will again reach that size. */ +/* ------------------------------------------------------------------------ */ +static void +ipf_dstlist_node_free(softd, d, node) + ipf_dstl_softc_t *softd; + ippool_dst_t *d; + ipf_dstnode_t *node; +{ + int i; + + /* + * Compact the array of pointers to nodes. + */ + for (i = 0; i < d->ipld_nodes; i++) + if (d->ipld_dests[i] == node) + break; + if (d->ipld_nodes - i > 1) { + bcopy(&d->ipld_dests[i + 1], &d->ipld_dests[i], + sizeof(*d->ipld_dests) * (d->ipld_nodes - i - 1)); + } + d->ipld_nodes--; + + if (node->ipfd_pnext != NULL) + *node->ipfd_pnext = node->ipfd_next; + if (node->ipfd_next != NULL) + node->ipfd_next->ipfd_pnext = node->ipfd_pnext; + node->ipfd_pnext = NULL; + node->ipfd_next = NULL; + + if ((node->ipfd_flags & IPDST_DELETE) == 0) { + softd->stats.ipls_numderefnodes++; + node->ipfd_flags |= IPDST_DELETE; + } + + ipf_dstlist_node_deref(softd, node); +} + + +/* ------------------------------------------------------------------------ */ +/* Function: ipf_dstlist_stats_get */ +/* Returns: int - 0 = success, else error */ +/* Parameters: softc(I) - pointer to soft context main structure */ +/* arg(I) - pointer to local context to use */ +/* op(I) - pointer to lookup operation data */ +/* */ +/* Return the current statistics for destination lists. This may be for all */ +/* of them or just information pertaining to a particular table. */ +/* ------------------------------------------------------------------------ */ +/*ARGSUSED*/ +static int +ipf_dstlist_stats_get(softc, arg, op) + ipf_main_softc_t *softc; + void *arg; + iplookupop_t *op; +{ + ipf_dstl_softc_t *softd = arg; + ipf_dstl_stat_t stats; + int unit, i, err = 0; + + if (op->iplo_size != sizeof(ipf_dstl_stat_t)) { + IPFERROR(120023); + return EINVAL; + } + + stats = softd->stats; + unit = op->iplo_unit; + if (unit == IPL_LOGALL) { + for (i = 0; i <= IPL_LOGMAX; i++) + stats.ipls_list[i] = softd->dstlist[i]; + } else if (unit >= 0 && unit <= IPL_LOGMAX) { + void *ptr; + + if (op->iplo_name[0] != '\0') + ptr = ipf_dstlist_table_find(softd, unit, + op->iplo_name); + else + ptr = softd->dstlist[unit + 1]; + stats.ipls_list[unit] = ptr; + } else { + IPFERROR(120024); + err = EINVAL; + } + + if (err == 0) { + err = COPYOUT(&stats, op->iplo_struct, sizeof(stats)); + if (err != 0) { + IPFERROR(120025); + return EFAULT; + } + } + return 0; +} + + +/* ------------------------------------------------------------------------ */ +/* Function: ipf_dstlist_table_add */ +/* Returns: int - 0 = success, else error */ +/* Parameters: softc(I) - pointer to soft context main structure */ +/* arg(I) - pointer to local context to use */ +/* op(I) - pointer to lookup operation data */ +/* */ +/* Add a new destination table to the list of those available for the given */ +/* device. Because we seldom operate on these objects (find/add/delete), */ +/* they are just kept in a simple linked list. */ +/* ------------------------------------------------------------------------ */ +static int +ipf_dstlist_table_add(softc, arg, op) + ipf_main_softc_t *softc; + void *arg; + iplookupop_t *op; +{ + ipf_dstl_softc_t *softd = arg; + ippool_dst_t user, *d, *new; + int unit, err; + + d = ipf_dstlist_table_find(arg, op->iplo_unit, op->iplo_name); + if (d != NULL) { + IPFERROR(120013); + return EEXIST; + } + + err = COPYIN(op->iplo_struct, &user, sizeof(user)); + if (err != 0) { + IPFERROR(120021); + return EFAULT; + } + + KMALLOC(new, ippool_dst_t *); + if (new == NULL) { + softd->stats.ipls_nomem++; + IPFERROR(120014); + return ENOMEM; + } + bzero((char *)new, sizeof(*new)); + + MUTEX_INIT(&new->ipld_lock, "ipf dst table lock"); + + strncpy(new->ipld_name, op->iplo_name, FR_GROUPLEN); + unit = op->iplo_unit; + new->ipld_unit = unit; + new->ipld_policy = user.ipld_policy; + new->ipld_seed = ipf_random(); + new->ipld_ref = 1; + + new->ipld_pnext = softd->tails[unit + 1]; + *softd->tails[unit + 1] = new; + softd->tails[unit + 1] = &new->ipld_next; + softd->stats.ipls_numlists++; + + return 0; +} + + +/* ------------------------------------------------------------------------ */ +/* Function: ipf_dstlist_table_del */ +/* Returns: int - 0 = success, else error */ +/* Parameters: softc(I) - pointer to soft context main structure */ +/* arg(I) - pointer to local context to use */ +/* op(I) - pointer to lookup operation data */ +/* */ +/* Find a named destinstion list table and delete it. If there are other */ +/* references to it, the caller isn't told. */ +/* ------------------------------------------------------------------------ */ +static int +ipf_dstlist_table_del(softc, arg, op) + ipf_main_softc_t *softc; + void *arg; + iplookupop_t *op; +{ + ippool_dst_t *d; + + d = ipf_dstlist_table_find(arg, op->iplo_unit, op->iplo_name); + if (d == NULL) { + IPFERROR(120015); + return ESRCH; + } + + if (d->ipld_dests != NULL) { + IPFERROR(120016); + return EBUSY; + } + + ipf_dstlist_table_remove(softc, arg, d); + + return 0; +} + + +/* ------------------------------------------------------------------------ */ +/* Function: ipf_dstlist_table_remove */ +/* Returns: Nil */ +/* Parameters: softc(I) - pointer to soft context main structure */ +/* softd(I) - pointer to the destination list context */ +/* d(I) - pointer to destination list */ +/* */ +/* Remove a given destination list from existance. While the IPDST_DELETE */ +/* flag is set every time we call this function and the reference count is */ +/* non-zero, the "numdereflists" counter is always incremented because the */ +/* decision about whether it will be freed or not is not made here. This */ +/* means that the only action the code can take here is to treat it as if */ +/* it will become a detached. */ +/* ------------------------------------------------------------------------ */ +static void +ipf_dstlist_table_remove(softc, softd, d) + ipf_main_softc_t *softc; + ipf_dstl_softc_t *softd; + ippool_dst_t *d; +{ + + if (softd->tails[d->ipld_unit + 1] == &d->ipld_next) + softd->tails[d->ipld_unit + 1] = d->ipld_pnext; + + if (d->ipld_pnext != NULL) + *d->ipld_pnext = d->ipld_next; + if (d->ipld_next != NULL) + d->ipld_next->ipld_pnext = d->ipld_pnext; + d->ipld_pnext = NULL; + d->ipld_next = NULL; + + ipf_dstlist_table_clearnodes(softd, d); + + softd->stats.ipls_numdereflists++; + d->ipld_flags |= IPDST_DELETE; + + ipf_dstlist_table_deref(softc, softd, d); +} + + +/* ------------------------------------------------------------------------ */ +/* Function: ipf_dstlist_table_free */ +/* Returns: Nil */ +/* Parameters: softd(I) - pointer to the destination list context */ +/* d(I) - pointer to destination list */ +/* */ +/* Free up a destination list data structure and any other memory that was */ +/* directly allocated as part of creating it. Individual destination list */ +/* nodes are not freed. It is assumed the caller will have already emptied */ +/* the destination list. */ +/* ------------------------------------------------------------------------ */ +static void +ipf_dstlist_table_free(softd, d) + ipf_dstl_softc_t *softd; + ippool_dst_t *d; +{ + MUTEX_DESTROY(&d->ipld_lock); + + if ((d->ipld_flags & IPDST_DELETE) != 0) + softd->stats.ipls_numdereflists--; + softd->stats.ipls_numlists--; + + if (d->ipld_dests != NULL) { + KFREES(d->ipld_dests, + d->ipld_maxnodes * sizeof(*d->ipld_dests)); + } + + KFREE(d); +} + + +/* ------------------------------------------------------------------------ */ +/* Function: ipf_dstlist_table_deref */ +/* Returns: int - 0 = success, else error */ +/* Parameters: softc(I) - pointer to soft context main structure */ +/* arg(I) - pointer to local context to use */ +/* op(I) - pointer to lookup operation data */ +/* */ +/* Drops the reference count on a destination list table object and free's */ +/* it if 0 has been reached. */ +/* ------------------------------------------------------------------------ */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Tue Aug 20 13:38:41 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6529BCD0; Tue, 20 Aug 2013 13:38:41 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 51FE72F82; Tue, 20 Aug 2013 13:38:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7KDcfkU030634; Tue, 20 Aug 2013 13:38:41 GMT (envelope-from cy@svn.freebsd.org) Received: (from cy@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7KDcfno030633; Tue, 20 Aug 2013 13:38:41 GMT (envelope-from cy@svn.freebsd.org) Message-Id: <201308201338.r7KDcfno030633@svn.freebsd.org> From: Cy Schubert Date: Tue, 20 Aug 2013 13:38:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r254563 - vendor/ipfilter/5.1.2 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Aug 2013 13:38:41 -0000 Author: cy Date: Tue Aug 20 13:38:40 2013 New Revision: 254563 URL: http://svnweb.freebsd.org/changeset/base/254563 Log: Tag authorization to use IP-Filter under old license. Approved by: glebius (mentor) Added: vendor/ipfilter/5.1.2/IPFILTER.LICENCE.FreeBSD - copied unchanged from r254562, vendor/ipfilter/dist/IPFILTER.LICENCE.FreeBSD Copied: vendor/ipfilter/5.1.2/IPFILTER.LICENCE.FreeBSD (from r254562, vendor/ipfilter/dist/IPFILTER.LICENCE.FreeBSD) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ipfilter/5.1.2/IPFILTER.LICENCE.FreeBSD Tue Aug 20 13:38:40 2013 (r254563, copy of r254562, vendor/ipfilter/dist/IPFILTER.LICENCE.FreeBSD) @@ -0,0 +1,83 @@ +Received: from slippy (localhost [127.0.0.1]) + by slippy.cwsent.com (8.14.7/8.14.7) with ESMTP id r68DreQv004291 + for ; Mon, 8 Jul 2013 06:53:40 -0700 (PDT) + (envelope-from Cy.Schubert@komquats.com) +X-Original-To: slippy +Delivered-To: slippy@komquats.com +Received: from cwfw [10.1.1.254] + by slippy with POP3 (fetchmail-6.3.22) + for (single-drop); Mon, 08 Jul 2013 06:53:40 -0700 (PDT) +Received: by spqr.komquats.com (Postfix, from userid 1000) + id 377821BC; Mon, 8 Jul 2013 06:53:38 -0700 (PDT) +X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on cwfw.cwsent.com +X-Spam-Level: +X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,MY_DSL,SMILEY + autolearn=no version=3.3.2 +X-Original-To: Cy.Schubert@komquats.com +Delivered-To: Cy.Schubert@komquats.com +Received: from mail.ipfilter.com.au (dsl-202-45-110-141-static.VIC.netspace.net.au [202.45.110.141]) + by spqr.komquats.com (Postfix) with ESMTP id C69AE18D + for ; Mon, 8 Jul 2013 06:53:31 -0700 (PDT) +Received: (from root@localhost) + by firewall.reed.wattle.id.au (8.12.10/8.11.0) id r68DrJF8001558; + Mon, 8 Jul 2013 23:53:19 +1000 (EST) +Message-ID: <51DAC488.1050700@reed.wattle.id.au> +Date: Mon, 08 Jul 2013 23:54:16 +1000 +From: Darren Reed +Reply-To: darrenr@reed.wattle.id.au +User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 +MIME-Version: 1.0 +To: Cy Schubert +CC: Gleb Smirnoff , Andre Oppermann , + Pedro Giffuni +Subject: Re: IP Filter 5.1.2 License +References: <201307011513.r61FD9IK005944@slippy.cwsent.com> +In-Reply-To: <201307011513.r61FD9IK005944@slippy.cwsent.com> +X-Enigmail-Version: 1.5.1 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 7bit +X-UIDL: NC"#!o_F!!BlL!!bL6!! + +On 2/07/2013 1:13 AM, Cy Schubert wrote: +> In message <51D19503.2090805@reed.wattle.id.au>, Darren Reed writes: +>> On 25/06/2013 11:03 AM, Cy Schubert wrote: +>>> Hi Darren, +>>> +>>> I'm not sure if you remember me or not but I'm a committer at the FreeBSD +>>> Project. I've been a long time IPF user, both under FreeBSD and Solaris. +>>> I've volunteered to maintain IP Filter in the src/ tree. I noticed that the +>> +>>> IP Filter license changed from the previous IP Filter license to GPLv2 +>>> somewhere between 4.1.34 and 4.1.35. I was planning on importing 5.1.2 +>>> however upon discovering it was GPL I decided to update the FreeBSD IPF +>>> from 4.1.28 to 4.1.34 until it was brought to my attention a few days ago +>>> that IPF 5.1.2 was imported into NetBSD. I'm not sure what kind of policy +>>> the NetBSD folks have toward GPL so I thought it best to ask you directly +>>> under what license you imported IPF into NetBSD? If I can I'd like to +>>> import 5.1.2. As IPF author and owner of the code, what are your thoughts. +>> +>>> Can I import IPF 5.1.2 into FreeBSD under a different license from GPL? +>> I imported IPF into NetBSD under the same license that has had previously. +>> When I eventually update FreeBSD, I'll publish the code under the same +>> license that it has now. +>> + +[...] + +> +> When we import into FreeBSD we will not touch the IPFILTER.LICENSE file +> keeping the license as before in our tree. +> +> I don't mind doing the work if you won't mind. + +Not at all. + +Ok, I think there's one important thing for me to say here: + +I, Darren Reed, authorise Cy Schubert to use the IP-Filter source code from CVS on sourceforge in the FreeBSD source code tree using the existing license that currently covers IP-Filter in FreeBSD . + +I think something like that should cover you. + +Cheers, +Darren + From owner-svn-src-vendor@FreeBSD.ORG Tue Aug 20 13:50:37 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 56D2D40D; Tue, 20 Aug 2013 13:50:37 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 42BFF2096; Tue, 20 Aug 2013 13:50:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7KDobaE037827; Tue, 20 Aug 2013 13:50:37 GMT (envelope-from cy@svn.freebsd.org) Received: (from cy@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7KDobMn037824; Tue, 20 Aug 2013 13:50:37 GMT (envelope-from cy@svn.freebsd.org) Message-Id: <201308201350.r7KDobMn037824@svn.freebsd.org> From: Cy Schubert Date: Tue, 20 Aug 2013 13:50:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r254564 - vendor-sys/ipfilter/5-1-2/netinet X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Aug 2013 13:50:37 -0000 Author: cy Date: Tue Aug 20 13:50:36 2013 New Revision: 254564 URL: http://svnweb.freebsd.org/changeset/base/254564 Log: Tag authorization to use IP-Filter under old license. Tag additional kernel sources from IP-Filter 5.1.2 tarball. Approved by: glebius Added: vendor-sys/ipfilter/5-1-2/netinet/IPFILTER.LICENCE.FreeBSD - copied unchanged from r254563, vendor-sys/ipfilter/dist/netinet/IPFILTER.LICENCE.FreeBSD vendor-sys/ipfilter/5-1-2/netinet/ip_dstlist.c - copied unchanged from r254563, vendor-sys/ipfilter/dist/netinet/ip_dstlist.c vendor-sys/ipfilter/5-1-2/netinet/ip_dstlist.h - copied unchanged from r254563, vendor-sys/ipfilter/dist/netinet/ip_dstlist.h vendor-sys/ipfilter/5-1-2/netinet/ipf_rb.h - copied unchanged from r254563, vendor-sys/ipfilter/dist/netinet/ipf_rb.h vendor-sys/ipfilter/5-1-2/netinet/radix_ipf.c - copied unchanged from r254563, vendor-sys/ipfilter/dist/netinet/radix_ipf.c vendor-sys/ipfilter/5-1-2/netinet/radix_ipf.h - copied unchanged from r254563, vendor-sys/ipfilter/dist/netinet/radix_ipf.h Copied: vendor-sys/ipfilter/5-1-2/netinet/IPFILTER.LICENCE.FreeBSD (from r254563, vendor-sys/ipfilter/dist/netinet/IPFILTER.LICENCE.FreeBSD) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/ipfilter/5-1-2/netinet/IPFILTER.LICENCE.FreeBSD Tue Aug 20 13:50:36 2013 (r254564, copy of r254563, vendor-sys/ipfilter/dist/netinet/IPFILTER.LICENCE.FreeBSD) @@ -0,0 +1,83 @@ +Received: from slippy (localhost [127.0.0.1]) + by slippy.cwsent.com (8.14.7/8.14.7) with ESMTP id r68DreQv004291 + for ; Mon, 8 Jul 2013 06:53:40 -0700 (PDT) + (envelope-from Cy.Schubert@komquats.com) +X-Original-To: slippy +Delivered-To: slippy@komquats.com +Received: from cwfw [10.1.1.254] + by slippy with POP3 (fetchmail-6.3.22) + for (single-drop); Mon, 08 Jul 2013 06:53:40 -0700 (PDT) +Received: by spqr.komquats.com (Postfix, from userid 1000) + id 377821BC; Mon, 8 Jul 2013 06:53:38 -0700 (PDT) +X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on cwfw.cwsent.com +X-Spam-Level: +X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,MY_DSL,SMILEY + autolearn=no version=3.3.2 +X-Original-To: Cy.Schubert@komquats.com +Delivered-To: Cy.Schubert@komquats.com +Received: from mail.ipfilter.com.au (dsl-202-45-110-141-static.VIC.netspace.net.au [202.45.110.141]) + by spqr.komquats.com (Postfix) with ESMTP id C69AE18D + for ; Mon, 8 Jul 2013 06:53:31 -0700 (PDT) +Received: (from root@localhost) + by firewall.reed.wattle.id.au (8.12.10/8.11.0) id r68DrJF8001558; + Mon, 8 Jul 2013 23:53:19 +1000 (EST) +Message-ID: <51DAC488.1050700@reed.wattle.id.au> +Date: Mon, 08 Jul 2013 23:54:16 +1000 +From: Darren Reed +Reply-To: darrenr@reed.wattle.id.au +User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 +MIME-Version: 1.0 +To: Cy Schubert +CC: Gleb Smirnoff , Andre Oppermann , + Pedro Giffuni +Subject: Re: IP Filter 5.1.2 License +References: <201307011513.r61FD9IK005944@slippy.cwsent.com> +In-Reply-To: <201307011513.r61FD9IK005944@slippy.cwsent.com> +X-Enigmail-Version: 1.5.1 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 7bit +X-UIDL: NC"#!o_F!!BlL!!bL6!! + +On 2/07/2013 1:13 AM, Cy Schubert wrote: +> In message <51D19503.2090805@reed.wattle.id.au>, Darren Reed writes: +>> On 25/06/2013 11:03 AM, Cy Schubert wrote: +>>> Hi Darren, +>>> +>>> I'm not sure if you remember me or not but I'm a committer at the FreeBSD +>>> Project. I've been a long time IPF user, both under FreeBSD and Solaris. +>>> I've volunteered to maintain IP Filter in the src/ tree. I noticed that the +>> +>>> IP Filter license changed from the previous IP Filter license to GPLv2 +>>> somewhere between 4.1.34 and 4.1.35. I was planning on importing 5.1.2 +>>> however upon discovering it was GPL I decided to update the FreeBSD IPF +>>> from 4.1.28 to 4.1.34 until it was brought to my attention a few days ago +>>> that IPF 5.1.2 was imported into NetBSD. I'm not sure what kind of policy +>>> the NetBSD folks have toward GPL so I thought it best to ask you directly +>>> under what license you imported IPF into NetBSD? If I can I'd like to +>>> import 5.1.2. As IPF author and owner of the code, what are your thoughts. +>> +>>> Can I import IPF 5.1.2 into FreeBSD under a different license from GPL? +>> I imported IPF into NetBSD under the same license that has had previously. +>> When I eventually update FreeBSD, I'll publish the code under the same +>> license that it has now. +>> + +[...] + +> +> When we import into FreeBSD we will not touch the IPFILTER.LICENSE file +> keeping the license as before in our tree. +> +> I don't mind doing the work if you won't mind. + +Not at all. + +Ok, I think there's one important thing for me to say here: + +I, Darren Reed, authorise Cy Schubert to use the IP-Filter source code from CVS on sourceforge in the FreeBSD source code tree using the existing license that currently covers IP-Filter in FreeBSD . + +I think something like that should cover you. + +Cheers, +Darren + Copied: vendor-sys/ipfilter/5-1-2/netinet/ip_dstlist.c (from r254563, vendor-sys/ipfilter/dist/netinet/ip_dstlist.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/ipfilter/5-1-2/netinet/ip_dstlist.c Tue Aug 20 13:50:36 2013 (r254564, copy of r254563, vendor-sys/ipfilter/dist/netinet/ip_dstlist.c) @@ -0,0 +1,1351 @@ +/* + * Copyright (C) 2012 by Darren Reed. + * + * See the IPFILTER.LICENCE file for details on licencing. + */ +#if defined(KERNEL) || defined(_KERNEL) +# undef KERNEL +# undef _KERNEL +# define KERNEL 1 +# define _KERNEL 1 +#endif +#if defined(__osf__) +# define _PROTO_NET_H_ +#endif +#include +#include +#include +#include +#if !defined(_KERNEL) && !defined(__KERNEL__) +# include +# include +# include +# define _KERNEL +# ifdef __OpenBSD__ +struct file; +# endif +# include +# undef _KERNEL +#else +# include +# if defined(NetBSD) && (__NetBSD_Version__ >= 104000000) +# include +# endif +#endif +#include +#if !defined(linux) +# include +#endif +#include +#if defined(_KERNEL) && (!defined(__SVR4) && !defined(__svr4__)) +# include +#endif +#if defined(__SVR4) || defined(__svr4__) +# include +# include +# ifdef _KERNEL +# include +# endif +# include +# include +#endif +#if defined(__FreeBSD_version) && (__FreeBSD_version >= 300000) +# include +#endif + +#include +#include + +#include "netinet/ip_compat.h" +#include "netinet/ip_fil.h" +#include "netinet/ip_nat.h" +#include "netinet/ip_lookup.h" +#include "netinet/ip_dstlist.h" + +/* END OF INCLUDES */ + +#ifdef HAS_SYS_MD5_H +# include +#else +# include "md5.h" +#endif + +#if !defined(lint) +static const char rcsid[] = "@(#)$Id: ip_dstlist.c,v 1.13.2.12 2012/07/20 08:40:19 darren_r Exp $"; +#endif + +typedef struct ipf_dstl_softc_s { + ippool_dst_t *dstlist[LOOKUP_POOL_SZ]; + ippool_dst_t **tails[LOOKUP_POOL_SZ]; + ipf_dstl_stat_t stats; +} ipf_dstl_softc_t; + + +static void *ipf_dstlist_soft_create __P((ipf_main_softc_t *)); +static void ipf_dstlist_soft_destroy __P((ipf_main_softc_t *, void *)); +static int ipf_dstlist_soft_init __P((ipf_main_softc_t *, void *)); +static void ipf_dstlist_soft_fini __P((ipf_main_softc_t *, void *)); +static int ipf_dstlist_addr_find __P((ipf_main_softc_t *, void *, int, + void *, u_int)); +static size_t ipf_dstlist_flush __P((ipf_main_softc_t *, void *, + iplookupflush_t *)); +static int ipf_dstlist_iter_deref __P((ipf_main_softc_t *, void *, int, int, + void *)); +static int ipf_dstlist_iter_next __P((ipf_main_softc_t *, void *, ipftoken_t *, + ipflookupiter_t *)); +static int ipf_dstlist_node_add __P((ipf_main_softc_t *, void *, + iplookupop_t *, int)); +static int ipf_dstlist_node_del __P((ipf_main_softc_t *, void *, + iplookupop_t *, int)); +static int ipf_dstlist_stats_get __P((ipf_main_softc_t *, void *, + iplookupop_t *)); +static int ipf_dstlist_table_add __P((ipf_main_softc_t *, void *, + iplookupop_t *)); +static int ipf_dstlist_table_del __P((ipf_main_softc_t *, void *, + iplookupop_t *)); +static int ipf_dstlist_table_deref __P((ipf_main_softc_t *, void *, void *)); +static void *ipf_dstlist_table_find __P((void *, int, char *)); +static void ipf_dstlist_table_free __P((ipf_dstl_softc_t *, ippool_dst_t *)); +static void ipf_dstlist_table_remove __P((ipf_main_softc_t *, + ipf_dstl_softc_t *, ippool_dst_t *)); +static void ipf_dstlist_table_clearnodes __P((ipf_dstl_softc_t *, + ippool_dst_t *)); +static ipf_dstnode_t *ipf_dstlist_select __P((fr_info_t *, ippool_dst_t *)); +static void *ipf_dstlist_select_ref __P((void *, int, char *)); +static void ipf_dstlist_node_free __P((ipf_dstl_softc_t *, ippool_dst_t *, ipf_dstnode_t *)); +static int ipf_dstlist_node_deref __P((void *, ipf_dstnode_t *)); +static void ipf_dstlist_expire __P((ipf_main_softc_t *, void *)); +static void ipf_dstlist_sync __P((ipf_main_softc_t *, void *)); + +ipf_lookup_t ipf_dstlist_backend = { + IPLT_DSTLIST, + ipf_dstlist_soft_create, + ipf_dstlist_soft_destroy, + ipf_dstlist_soft_init, + ipf_dstlist_soft_fini, + ipf_dstlist_addr_find, + ipf_dstlist_flush, + ipf_dstlist_iter_deref, + ipf_dstlist_iter_next, + ipf_dstlist_node_add, + ipf_dstlist_node_del, + ipf_dstlist_stats_get, + ipf_dstlist_table_add, + ipf_dstlist_table_del, + ipf_dstlist_table_deref, + ipf_dstlist_table_find, + ipf_dstlist_select_ref, + ipf_dstlist_select_node, + ipf_dstlist_expire, + ipf_dstlist_sync +}; + + +/* ------------------------------------------------------------------------ */ +/* Function: ipf_dstlist_soft_create */ +/* Returns: int - 0 = success, else error */ +/* Parameters: softc(I) - pointer to soft context main structure */ +/* */ +/* Allocating a chunk of memory filled with 0's is enough for the current */ +/* soft context used with destination lists. */ +/* ------------------------------------------------------------------------ */ +static void * +ipf_dstlist_soft_create(softc) + ipf_main_softc_t *softc; +{ + ipf_dstl_softc_t *softd; + int i; + + KMALLOC(softd, ipf_dstl_softc_t *); + if (softd == NULL) { + IPFERROR(120028); + return NULL; + } + + bzero((char *)softd, sizeof(*softd)); + for (i = 0; i <= IPL_LOGMAX; i++) + softd->tails[i] = &softd->dstlist[i]; + + return softd; +} + + +/* ------------------------------------------------------------------------ */ +/* Function: ipf_dstlist_soft_destroy */ +/* Returns: Nil */ +/* Parameters: softc(I) - pointer to soft context main structure */ +/* arg(I) - pointer to local context to use */ +/* */ +/* For destination lists, the only thing we have to do when destroying the */ +/* soft context is free it! */ +/* ------------------------------------------------------------------------ */ +static void +ipf_dstlist_soft_destroy(softc, arg) + ipf_main_softc_t *softc; + void *arg; +{ + ipf_dstl_softc_t *softd = arg; + + KFREE(softd); +} + + +/* ------------------------------------------------------------------------ */ +/* Function: ipf_dstlist_soft_init */ +/* Returns: int - 0 = success, else error */ +/* Parameters: softc(I) - pointer to soft context main structure */ +/* arg(I) - pointer to local context to use */ +/* */ +/* There is currently no soft context for destination list management. */ +/* ------------------------------------------------------------------------ */ +static int +ipf_dstlist_soft_init(softc, arg) + ipf_main_softc_t *softc; + void *arg; +{ + return 0; +} + + +/* ------------------------------------------------------------------------ */ +/* Function: ipf_dstlist_soft_fini */ +/* Returns: Nil */ +/* Parameters: softc(I) - pointer to soft context main structure */ +/* arg(I) - pointer to local context to use */ +/* */ +/* There is currently no soft context for destination list management. */ +/* ------------------------------------------------------------------------ */ +static void +ipf_dstlist_soft_fini(softc, arg) + ipf_main_softc_t *softc; + void *arg; +{ + ipf_dstl_softc_t *softd = arg; + int i; + + for (i = -1; i <= IPL_LOGMAX; i++) { + while (softd->dstlist[i + 1] != NULL) { + ipf_dstlist_table_remove(softc, softd, + softd->dstlist[i + 1]); + } + } + + ASSERT(softd->stats.ipls_numderefnodes == 0); +} + + +/* ------------------------------------------------------------------------ */ +/* Function: ipf_dstlist_addr_find */ +/* Returns: int - 0 = success, else error */ +/* Parameters: softc(I) - pointer to soft context main structure */ +/* arg1(I) - pointer to local context to use */ +/* arg2(I) - pointer to local context to use */ +/* arg3(I) - pointer to local context to use */ +/* arg4(I) - pointer to local context to use */ +/* */ +/* There is currently no such thing as searching a destination list for an */ +/* address so this function becomes a no-op. Its presence is required as */ +/* ipf_lookup_res_name() stores the "addr_find" function pointer in the */ +/* pointer passed in to it as funcptr, although it could be a generic null- */ +/* op function rather than a specific one. */ +/* ------------------------------------------------------------------------ */ +/*ARGSUSED*/ +static int +ipf_dstlist_addr_find(softc, arg1, arg2, arg3, arg4) + ipf_main_softc_t *softc; + void *arg1, *arg3; + int arg2; + u_int arg4; +{ + return -1; +} + + +/* ------------------------------------------------------------------------ */ +/* Function: ipf_dstlist_flush */ +/* Returns: int - number of objects deleted */ +/* Parameters: softc(I) - pointer to soft context main structure */ +/* arg(I) - pointer to local context to use */ +/* fop(I) - pointer to lookup flush operation data */ +/* */ +/* Flush all of the destination tables that match the data passed in with */ +/* the iplookupflush_t. There are two ways to match objects: the device for */ +/* which they are to be used with and their name. */ +/* ------------------------------------------------------------------------ */ +static size_t +ipf_dstlist_flush(softc, arg, fop) + ipf_main_softc_t *softc; + void *arg; + iplookupflush_t *fop; +{ + ipf_dstl_softc_t *softd = arg; + ippool_dst_t *node, *next; + int n, i; + + for (n = 0, i = -1; i <= IPL_LOGMAX; i++) { + if (fop->iplf_unit != IPLT_ALL && fop->iplf_unit != i) + continue; + for (node = softd->dstlist[i + 1]; node != NULL; node = next) { + next = node->ipld_next; + + if ((*fop->iplf_name != '\0') && + strncmp(fop->iplf_name, node->ipld_name, + FR_GROUPLEN)) + continue; + + ipf_dstlist_table_remove(softc, softd, node); + n++; + } + } + return n; +} + + +/* ------------------------------------------------------------------------ */ +/* Function: ipf_dstlist_iter_deref */ +/* Returns: int - 0 = success, else error */ +/* Parameters: softc(I) - pointer to soft context main structure */ +/* arg(I) - pointer to local context to use */ +/* otype(I) - type of data structure to iterate through */ +/* unit(I) - device we are working with */ +/* data(I) - address of object in kernel space */ +/* */ +/* This function is called when the iteration token is being free'd and is */ +/* responsible for dropping the reference count of the structure it points */ +/* to. */ +/* ------------------------------------------------------------------------ */ +static int +ipf_dstlist_iter_deref(softc, arg, otype, unit, data) + ipf_main_softc_t *softc; + void *arg; + int otype, unit; + void *data; +{ + if (data == NULL) { + IPFERROR(120001); + return EINVAL; + } + + if (unit < -1 || unit > IPL_LOGMAX) { + IPFERROR(120002); + return EINVAL; + } + + switch (otype) + { + case IPFLOOKUPITER_LIST : + ipf_dstlist_table_deref(softc, arg, (ippool_dst_t *)data); + break; + + case IPFLOOKUPITER_NODE : + ipf_dstlist_node_deref(arg, (ipf_dstnode_t *)data); + break; + } + + return 0; +} + + +/* ------------------------------------------------------------------------ */ +/* Function: ipf_dstlist_iter_next */ +/* Returns: int - 0 = success, else error */ +/* Parameters: softc(I) - pointer to soft context main structure */ +/* arg(I) - pointer to local context to use */ +/* op(I) - pointer to lookup operation data */ +/* uid(I) - uid of process doing the ioctl */ +/* */ +/* This function is responsible for either selecting the next destination */ +/* list or node on a destination list to be returned as a user process */ +/* iterates through the list of destination lists or nodes. */ +/* ------------------------------------------------------------------------ */ +static int +ipf_dstlist_iter_next(softc, arg, token, iter) + ipf_main_softc_t *softc; + void *arg; + ipftoken_t *token; + ipflookupiter_t *iter; +{ + ipf_dstnode_t zn, *nextnode = NULL, *node = NULL; + ippool_dst_t zero, *next = NULL, *dsttab = NULL; + ipf_dstl_softc_t *softd = arg; + int err = 0; + void *hint; + + switch (iter->ili_otype) + { + case IPFLOOKUPITER_LIST : + dsttab = token->ipt_data; + if (dsttab == NULL) { + next = softd->dstlist[(int)iter->ili_unit + 1]; + } else { + next = dsttab->ipld_next; + } + + if (next != NULL) { + ATOMIC_INC32(next->ipld_ref); + token->ipt_data = next; + hint = next->ipld_next; + } else { + bzero((char *)&zero, sizeof(zero)); + next = &zero; + token->ipt_data = NULL; + hint = NULL; + } + break; + + case IPFLOOKUPITER_NODE : + node = token->ipt_data; + if (node == NULL) { + dsttab = ipf_dstlist_table_find(arg, iter->ili_unit, + iter->ili_name); + if (dsttab == NULL) { + IPFERROR(120004); + err = ESRCH; + nextnode = NULL; + } else { + if (dsttab->ipld_dests == NULL) + nextnode = NULL; + else + nextnode = *dsttab->ipld_dests; + dsttab = NULL; + } + } else { + nextnode = node->ipfd_next; + } + + if (nextnode != NULL) { + MUTEX_ENTER(&nextnode->ipfd_lock); + nextnode->ipfd_ref++; + MUTEX_EXIT(&nextnode->ipfd_lock); + token->ipt_data = nextnode; + hint = nextnode->ipfd_next; + } else { + bzero((char *)&zn, sizeof(zn)); + nextnode = &zn; + token->ipt_data = NULL; + hint = NULL; + } + break; + default : + IPFERROR(120003); + err = EINVAL; + break; + } + + if (err != 0) + return err; + + switch (iter->ili_otype) + { + case IPFLOOKUPITER_LIST : + if (dsttab != NULL) + ipf_dstlist_table_deref(softc, arg, dsttab); + err = COPYOUT(next, iter->ili_data, sizeof(*next)); + if (err != 0) { + IPFERROR(120005); + err = EFAULT; + } + break; + + case IPFLOOKUPITER_NODE : + if (node != NULL) + ipf_dstlist_node_deref(arg, node); + err = COPYOUT(nextnode, iter->ili_data, sizeof(*nextnode)); + if (err != 0) { + IPFERROR(120006); + err = EFAULT; + } + break; + } + + if (hint == NULL) + ipf_token_mark_complete(token); + + return err; +} + + +/* ------------------------------------------------------------------------ */ +/* Function: ipf_dstlist_node_add */ +/* Returns: int - 0 = success, else error */ +/* Parameters: softc(I) - pointer to soft context main structure */ +/* arg(I) - pointer to local context to use */ +/* op(I) - pointer to lookup operation data */ +/* uid(I) - uid of process doing the ioctl */ +/* Locks: WRITE(ipf_poolrw) */ +/* */ +/* Add a new node to a destination list. To do this, we only copy in the */ +/* frdest_t structure because that contains the only data required from the */ +/* application to create a new node. The frdest_t doesn't contain the name */ +/* itself. When loading filter rules, fd_name is a 'pointer' to the name. */ +/* In this case, the 'pointer' does not work, instead it is the length of */ +/* the name and the name is immediately following the frdest_t structure. */ +/* fd_name must include the trailing \0, so it should be strlen(str) + 1. */ +/* For simple sanity checking, an upper bound on the size of fd_name is */ +/* imposed - 128. */ +/* ------------------------------------------------------------------------ */ +static int +ipf_dstlist_node_add(softc, arg, op, uid) + ipf_main_softc_t *softc; + void *arg; + iplookupop_t *op; + int uid; +{ + ipf_dstl_softc_t *softd = arg; + ipf_dstnode_t *node, **nodes; + ippool_dst_t *d; + frdest_t dest; + int err; + + if (op->iplo_size < sizeof(frdest_t)) { + IPFERROR(120007); + return EINVAL; + } + + err = COPYIN(op->iplo_struct, &dest, sizeof(dest)); + if (err != 0) { + IPFERROR(120009); + return EFAULT; + } + + d = ipf_dstlist_table_find(arg, op->iplo_unit, op->iplo_name); + if (d == NULL) { + IPFERROR(120010); + return ESRCH; + } + + switch (dest.fd_addr.adf_family) + { + case AF_INET : + case AF_INET6 : + break; + default : + IPFERROR(120019); + return EINVAL; + } + + if (dest.fd_name < -1 || dest.fd_name > 128) { + IPFERROR(120018); + return EINVAL; + } + + KMALLOCS(node, ipf_dstnode_t *, sizeof(*node) + dest.fd_name); + if (node == NULL) { + softd->stats.ipls_nomem++; + IPFERROR(120008); + return ENOMEM; + } + bzero((char *)node, sizeof(*node) + dest.fd_name); + + bcopy(&dest, &node->ipfd_dest, sizeof(dest)); + node->ipfd_size = sizeof(*node) + dest.fd_name; + + if (dest.fd_name > 0) { + /* + * fd_name starts out as the length of the string to copy + * in (including \0) and ends up being the offset from + * fd_names (0). + */ + err = COPYIN((char *)op->iplo_struct + sizeof(dest), + node->ipfd_names, dest.fd_name); + if (err != 0) { + IPFERROR(120017); + KFREES(node, node->ipfd_size); + return EFAULT; + } + node->ipfd_dest.fd_name = 0; + } else { + node->ipfd_dest.fd_name = -1; + } + + if (d->ipld_nodes == d->ipld_maxnodes) { + KMALLOCS(nodes, ipf_dstnode_t **, + sizeof(*nodes) * (d->ipld_maxnodes + 1)); + if (nodes == NULL) { + softd->stats.ipls_nomem++; + IPFERROR(120022); + KFREES(node, node->ipfd_size); + return ENOMEM; + } + if (d->ipld_dests != NULL) { + bcopy(d->ipld_dests, nodes, + sizeof(*nodes) * d->ipld_maxnodes); + KFREES(d->ipld_dests, sizeof(*nodes) * d->ipld_nodes); + nodes[0]->ipfd_pnext = nodes; + } + d->ipld_dests = nodes; + d->ipld_maxnodes++; + } + d->ipld_dests[d->ipld_nodes] = node; + d->ipld_nodes++; + + if (d->ipld_nodes == 1) { + node->ipfd_pnext = d->ipld_dests; + } else if (d->ipld_nodes > 1) { + node->ipfd_pnext = &d->ipld_dests[d->ipld_nodes - 2]->ipfd_next; + } + *node->ipfd_pnext = node; + + MUTEX_INIT(&node->ipfd_lock, "ipf dst node lock"); + node->ipfd_uid = uid; + node->ipfd_ref = 1; + if (node->ipfd_dest.fd_name == 0) + (void) ipf_resolvedest(softc, node->ipfd_names, + &node->ipfd_dest, AF_INET); +#ifdef USE_INET6 + if (node->ipfd_dest.fd_name == 0 && + node->ipfd_dest.fd_ptr == (void *)-1) + (void) ipf_resolvedest(softc, node->ipfd_names, + &node->ipfd_dest, AF_INET6); +#endif + + softd->stats.ipls_numnodes++; + + return 0; +} + + +/* ------------------------------------------------------------------------ */ +/* Function: ipf_dstlist_node_deref */ +/* Returns: int - 0 = success, else error */ +/* Parameters: arg(I) - pointer to local context to use */ +/* node(I) - pointer to destionation node to free */ +/* */ +/* Dereference the use count by one. If it drops to zero then we can assume */ +/* that it has been removed from any lists/tables and is ripe for freeing. */ +/* The pointer to context is required for the purpose of maintaining */ +/* statistics. */ +/* ------------------------------------------------------------------------ */ +static int +ipf_dstlist_node_deref(arg, node) + void *arg; + ipf_dstnode_t *node; +{ + ipf_dstl_softc_t *softd = arg; + int ref; + + MUTEX_ENTER(&node->ipfd_lock); + ref = --node->ipfd_ref; + MUTEX_EXIT(&node->ipfd_lock); + + if (ref > 0) + return 0; + + if ((node->ipfd_flags & IPDST_DELETE) != 0) + softd->stats.ipls_numderefnodes--; + MUTEX_DESTROY(&node->ipfd_lock); + KFREES(node, node->ipfd_size); + softd->stats.ipls_numnodes--; + + return 0; +} + + +/* ------------------------------------------------------------------------ */ +/* Function: ipf_dstlist_node_del */ +/* Returns: int - 0 = success, else error */ +/* Parameters: softc(I) - pointer to soft context main structure */ +/* arg(I) - pointer to local context to use */ +/* op(I) - pointer to lookup operation data */ +/* uid(I) - uid of process doing the ioctl */ +/* */ +/* Look for a matching destination node on the named table and free it if */ +/* found. Because the name embedded in the frdest_t is variable in length, */ +/* it is necessary to allocate some memory locally, to complete this op. */ +/* ------------------------------------------------------------------------ */ +static int +ipf_dstlist_node_del(softc, arg, op, uid) + ipf_main_softc_t *softc; + void *arg; + iplookupop_t *op; + int uid; +{ + ipf_dstl_softc_t *softd = arg; + ipf_dstnode_t *node; + frdest_t frd, *temp; + ippool_dst_t *d; + size_t size; + int err; + + d = ipf_dstlist_table_find(arg, op->iplo_unit, op->iplo_name); + if (d == NULL) { + IPFERROR(120012); + return ESRCH; + } + + err = COPYIN(op->iplo_struct, &frd, sizeof(frd)); + if (err != 0) { + IPFERROR(120011); + return EFAULT; + } + + size = sizeof(*temp) + frd.fd_name; + KMALLOCS(temp, frdest_t *, size); + if (temp == NULL) { + softd->stats.ipls_nomem++; + IPFERROR(120026); + return ENOMEM; + } + + err = COPYIN(op->iplo_struct, temp, size); + if (err != 0) { + IPFERROR(120027); + return EFAULT; + } + + MUTEX_ENTER(&d->ipld_lock); + for (node = *d->ipld_dests; node != NULL; node = node->ipfd_next) { + if ((uid != 0) && (node->ipfd_uid != uid)) + continue; + if (node->ipfd_size != size) + continue; + if (!bcmp(&node->ipfd_dest.fd_ip6, &frd.fd_ip6, + size - offsetof(frdest_t, fd_ip6))) { + ipf_dstlist_node_free(softd, d, node); + MUTEX_EXIT(&d->ipld_lock); + KFREES(temp, size); + return 0; + } + } + MUTEX_EXIT(&d->ipld_lock); + KFREES(temp, size); + + return ESRCH; +} + + +/* ------------------------------------------------------------------------ */ +/* Function: ipf_dstlist_node_free */ +/* Returns: Nil */ +/* Parameters: softd(I) - pointer to the destination list context */ +/* d(I) - pointer to destination list */ +/* node(I) - pointer to node to free */ +/* Locks: MUTEX(ipld_lock) or WRITE(ipf_poolrw) */ +/* */ +/* Free the destination node by first removing it from any lists and then */ +/* checking if this was the last reference held to the object. While the */ +/* array of pointers to nodes is compacted, its size isn't reduced (by way */ +/* of allocating a new smaller one and copying) because the belief is that */ +/* it is likely the array will again reach that size. */ +/* ------------------------------------------------------------------------ */ +static void +ipf_dstlist_node_free(softd, d, node) + ipf_dstl_softc_t *softd; + ippool_dst_t *d; + ipf_dstnode_t *node; +{ + int i; + + /* + * Compact the array of pointers to nodes. + */ + for (i = 0; i < d->ipld_nodes; i++) + if (d->ipld_dests[i] == node) + break; + if (d->ipld_nodes - i > 1) { + bcopy(&d->ipld_dests[i + 1], &d->ipld_dests[i], + sizeof(*d->ipld_dests) * (d->ipld_nodes - i - 1)); + } + d->ipld_nodes--; + + if (node->ipfd_pnext != NULL) + *node->ipfd_pnext = node->ipfd_next; + if (node->ipfd_next != NULL) + node->ipfd_next->ipfd_pnext = node->ipfd_pnext; + node->ipfd_pnext = NULL; + node->ipfd_next = NULL; + + if ((node->ipfd_flags & IPDST_DELETE) == 0) { + softd->stats.ipls_numderefnodes++; + node->ipfd_flags |= IPDST_DELETE; + } + + ipf_dstlist_node_deref(softd, node); +} + + +/* ------------------------------------------------------------------------ */ +/* Function: ipf_dstlist_stats_get */ +/* Returns: int - 0 = success, else error */ +/* Parameters: softc(I) - pointer to soft context main structure */ +/* arg(I) - pointer to local context to use */ +/* op(I) - pointer to lookup operation data */ +/* */ +/* Return the current statistics for destination lists. This may be for all */ +/* of them or just information pertaining to a particular table. */ +/* ------------------------------------------------------------------------ */ +/*ARGSUSED*/ +static int +ipf_dstlist_stats_get(softc, arg, op) + ipf_main_softc_t *softc; + void *arg; + iplookupop_t *op; +{ + ipf_dstl_softc_t *softd = arg; + ipf_dstl_stat_t stats; + int unit, i, err = 0; + + if (op->iplo_size != sizeof(ipf_dstl_stat_t)) { + IPFERROR(120023); + return EINVAL; + } + + stats = softd->stats; + unit = op->iplo_unit; + if (unit == IPL_LOGALL) { + for (i = 0; i <= IPL_LOGMAX; i++) + stats.ipls_list[i] = softd->dstlist[i]; + } else if (unit >= 0 && unit <= IPL_LOGMAX) { + void *ptr; + + if (op->iplo_name[0] != '\0') + ptr = ipf_dstlist_table_find(softd, unit, + op->iplo_name); + else + ptr = softd->dstlist[unit + 1]; + stats.ipls_list[unit] = ptr; + } else { + IPFERROR(120024); + err = EINVAL; + } + + if (err == 0) { + err = COPYOUT(&stats, op->iplo_struct, sizeof(stats)); + if (err != 0) { + IPFERROR(120025); + return EFAULT; + } + } + return 0; +} + + +/* ------------------------------------------------------------------------ */ +/* Function: ipf_dstlist_table_add */ +/* Returns: int - 0 = success, else error */ +/* Parameters: softc(I) - pointer to soft context main structure */ +/* arg(I) - pointer to local context to use */ +/* op(I) - pointer to lookup operation data */ +/* */ +/* Add a new destination table to the list of those available for the given */ +/* device. Because we seldom operate on these objects (find/add/delete), */ +/* they are just kept in a simple linked list. */ +/* ------------------------------------------------------------------------ */ +static int +ipf_dstlist_table_add(softc, arg, op) + ipf_main_softc_t *softc; + void *arg; + iplookupop_t *op; +{ + ipf_dstl_softc_t *softd = arg; + ippool_dst_t user, *d, *new; + int unit, err; + + d = ipf_dstlist_table_find(arg, op->iplo_unit, op->iplo_name); + if (d != NULL) { + IPFERROR(120013); + return EEXIST; + } + + err = COPYIN(op->iplo_struct, &user, sizeof(user)); + if (err != 0) { + IPFERROR(120021); + return EFAULT; + } + + KMALLOC(new, ippool_dst_t *); + if (new == NULL) { + softd->stats.ipls_nomem++; + IPFERROR(120014); + return ENOMEM; + } + bzero((char *)new, sizeof(*new)); + + MUTEX_INIT(&new->ipld_lock, "ipf dst table lock"); + + strncpy(new->ipld_name, op->iplo_name, FR_GROUPLEN); + unit = op->iplo_unit; + new->ipld_unit = unit; + new->ipld_policy = user.ipld_policy; + new->ipld_seed = ipf_random(); + new->ipld_ref = 1; + + new->ipld_pnext = softd->tails[unit + 1]; + *softd->tails[unit + 1] = new; + softd->tails[unit + 1] = &new->ipld_next; + softd->stats.ipls_numlists++; + + return 0; +} + + +/* ------------------------------------------------------------------------ */ +/* Function: ipf_dstlist_table_del */ +/* Returns: int - 0 = success, else error */ +/* Parameters: softc(I) - pointer to soft context main structure */ +/* arg(I) - pointer to local context to use */ +/* op(I) - pointer to lookup operation data */ +/* */ +/* Find a named destinstion list table and delete it. If there are other */ +/* references to it, the caller isn't told. */ +/* ------------------------------------------------------------------------ */ +static int +ipf_dstlist_table_del(softc, arg, op) + ipf_main_softc_t *softc; + void *arg; + iplookupop_t *op; +{ + ippool_dst_t *d; + + d = ipf_dstlist_table_find(arg, op->iplo_unit, op->iplo_name); + if (d == NULL) { + IPFERROR(120015); + return ESRCH; + } + + if (d->ipld_dests != NULL) { + IPFERROR(120016); + return EBUSY; + } + + ipf_dstlist_table_remove(softc, arg, d); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Tue Aug 20 13:55:50 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2029D8D3; Tue, 20 Aug 2013 13:55:50 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F36F520F6; Tue, 20 Aug 2013 13:55:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7KDtn2O039300; Tue, 20 Aug 2013 13:55:49 GMT (envelope-from cy@svn.freebsd.org) Received: (from cy@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7KDtn2J039299; Tue, 20 Aug 2013 13:55:49 GMT (envelope-from cy@svn.freebsd.org) Message-Id: <201308201355.r7KDtn2J039299@svn.freebsd.org> From: Cy Schubert Date: Tue, 20 Aug 2013 13:55:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r254565 - vendor-sys/ipfilter/5-1-2/netinet X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Aug 2013 13:55:50 -0000 Author: cy Date: Tue Aug 20 13:55:49 2013 New Revision: 254565 URL: http://svnweb.freebsd.org/changeset/base/254565 Log: Tag the revert of IP-Filter 5.1.2 licence to the old licence currently used under FreeBSD. Approved by: Darren Reed (IP-Filter author) glebius (mentor) Modified: vendor-sys/ipfilter/5-1-2/netinet/IPFILTER.LICENCE (contents, props changed) Modified: vendor-sys/ipfilter/5-1-2/netinet/IPFILTER.LICENCE ============================================================================== --- vendor-sys/ipfilter/5-1-2/netinet/IPFILTER.LICENCE Tue Aug 20 13:50:36 2013 (r254564) +++ vendor-sys/ipfilter/5-1-2/netinet/IPFILTER.LICENCE Tue Aug 20 13:55:49 2013 (r254565) @@ -1,340 +1,29 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. +/* + * Copyright (C) 1993-2001 by Darren Reed. + * + * The author accepts no responsibility for the use of this software and + * provides it on an ``as is'' basis without express or implied warranty. + * + * Redistribution and use, with or without modification, in source and binary + * forms, are permitted provided that this notice is preserved in its entirety + * and due credit is given to the original author and the contributors. + * + * The licence and distribution terms for any publically available version or + * derivative of this code cannot be changed. i.e. this code cannot simply be + * copied, in part or in whole, and put under another distribution licence + * [including the GNU Public Licence.] + * + * 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. + * + * I hate legalese, don't you ? + */ From owner-svn-src-vendor@FreeBSD.ORG Thu Aug 22 16:31:21 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7B3C6C28; Thu, 22 Aug 2013 16:31:21 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6810229B2; Thu, 22 Aug 2013 16:31:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7MGVLEC091522; Thu, 22 Aug 2013 16:31:21 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7MGVJmN091510; Thu, 22 Aug 2013 16:31:19 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201308221631.r7MGVJmN091510@svn.freebsd.org> From: Ed Maste Date: Thu, 22 Aug 2013 16:31:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r254661 - in vendor/NetBSD/libexecinfo: . dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Aug 2013 16:31:21 -0000 Author: emaste Date: Thu Aug 22 16:31:19 2013 New Revision: 254661 URL: http://svnweb.freebsd.org/changeset/base/254661 Log: Vendor import of NetBSD's libexecinfo at 2013-08-22 Added: vendor/NetBSD/libexecinfo/ vendor/NetBSD/libexecinfo/dist/ vendor/NetBSD/libexecinfo/dist/backtrace.3 vendor/NetBSD/libexecinfo/dist/backtrace.c vendor/NetBSD/libexecinfo/dist/builtin.c vendor/NetBSD/libexecinfo/dist/execinfo.h vendor/NetBSD/libexecinfo/dist/symtab.c vendor/NetBSD/libexecinfo/dist/symtab.h vendor/NetBSD/libexecinfo/dist/unwind.c vendor/NetBSD/libexecinfo/dist/unwind.h vendor/NetBSD/libexecinfo/dist/unwind_arm_ehabi_stub.c Added: vendor/NetBSD/libexecinfo/dist/backtrace.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/libexecinfo/dist/backtrace.3 Thu Aug 22 16:31:19 2013 (r254661) @@ -0,0 +1,159 @@ +.\" $NetBSD: backtrace.3,v 1.4 2012/06/10 00:24:36 christos Exp $ +.\" +.\" Copyright (c) 2012 The NetBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to The NetBSD Foundation +.\" by Christos Zoulas +.\" +.\" 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. +.\" +.Dd May 26, 2012 +.Dt BACKTRACE 3 +.Os +.Sh NAME +.Nm backtrace +.Nd fill in the backtrace of the currently executing thread +.Sh LIBRARY +.Lb libexecinfo +.Sh SYNOPSIS +.In execinfo.h +.Ft size_t +.Fn backtrace "void **addrlist" "size_t len" +.Ft "char **" +.Fn backtrace_symbols "void * const *addrlist" "size_t len" +.Ft int +.Fn backtrace_symbols_fd "void * const *addrlist" "size_t len" "int fd" +.Ft "char **" +.Fn backtrace_symbols_fmt "void * const *addrlist" "size_t len" "const char *fmt" +.Ft int +.Fn backtrace_symbols_fmt_fd "void * const *addrlist" "size_t len" "const char *fmt" "int fd" +.Sh DESCRIPTION +The +.Fn backtrace +function places into the array pointed by +.Fa addrlist +the array of the values of the program counter for each frame called up to +.Fa len +frames. +The number of frames found (which can be fewer than +.Fa len ) +is returned. +.Pp +The +.Fn backtrace_symbols_fmt +function takes an array of previously filled addresses from +.Fn backtrace +in +.Fa addrlist +of +.Fa len +elements, and uses +.Fa fmt +to format them. +The formatting characters available are: +.Bl -tag -width a -offset indent +.It Dv a +The numeric address of each element as would be printed using %p. +.It Dv n +The name of the nearest function symbol (smaller than the address element) +as determined by +.Xr dladdr 3 +if the symbol was dynamic, or looked up in the executable if static and +the /proc filesystem is available to determine the executable path. +.It Dv d +The difference of the symbol address and the address element printed +using 0x%tx. +.It Dv D +The difference of the symbol addresss and the address element printed using ++0x%tx if non-zero, or nothing if zero. +.It Dv f +The filename of the symbol as determined by +.Xr dladdr 3 . +.El +.Pp +The array of formatted strings is returned as a contiguous memory address which +can be freed by a single +.Xr free 3 . +.Pp +The +.Fn backtrace_symbols +function is equivalent of calling +.Fn backtrace_symbols_fmt +with a format argument of +.Dv "%a <%n%D> at %f" +.Pp +The +.Fn backtrace_symbols_fd +and +.Fn backtrace_symbols_fmt_fd +are similar to the non _fd named functions, only instead of returning +an array or strings, they print a new-line separated array of strings in +fd, and return +.Dv 0 +on success and +.Dv \-1 +on failure. +.Sh RETURN VALUES +The +.Fn backtrace +function returns the number of elements tht were filled in the backtrace. +The +.Fn backtrace_symbols +and +.Fn backtrace_symbols_fmt +return a string array on success, and +.Dv NULL +on failure, setting +.Va errno . +Diagnostic output may also be produced by the ELF symbol lookup functions. +.Sh SEE ALSO +.Xr dladdr 3 , +.Xr elf 3 +.Sh HISTORY +The +.Fn backtrace +library of functions first appeared in +.Nx 7.0 . +.Sh BUGS +.Bl -enum +.It +Errors should not be printed but communicated to the caller differently. +.It +Because these functions use +.Xr elf 3 +this is a separate library instead of being part of libc/libutil +so that no library dependencies are introduced. +.It +The Linux versions of the functions (there are no _fmt variants) use +.Ft int +instead of +.Ft size_t +arguments. +.It +Since +.Xr dladdr 3 +only deals with dynamic symbols, we need to find the symbols from the main +portion of the program. +For that we need to locate the executable, and we use procfs for +finding it, which is not portable. +.El Added: vendor/NetBSD/libexecinfo/dist/backtrace.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/libexecinfo/dist/backtrace.c Thu Aug 22 16:31:19 2013 (r254661) @@ -0,0 +1,229 @@ +/* $NetBSD: backtrace.c,v 1.2 2012/07/09 03:11:59 christos Exp $ */ + +/*- + * Copyright (c) 2012 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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 +__RCSID("$NetBSD: backtrace.c,v 1.2 2012/07/09 03:11:59 christos Exp $"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "execinfo.h" +#include "symtab.h" + +#ifdef __linux__ +#define SELF "/proc/self/exe" +#else +#define SELF "/proc/curproc/file" +#endif + +static int __printflike(4, 5) +rasprintf(char **buf, size_t *bufsiz, size_t offs, const char *fmt, ...) +{ + for (;;) { + size_t nbufsiz; + char *nbuf; + + if (*buf && offs < *bufsiz) { + va_list ap; + int len; + + va_start(ap, fmt); + len = vsnprintf(*buf + offs, *bufsiz - offs, fmt, ap); + va_end(ap); + + if (len < 0 || (size_t)len < *bufsiz - offs) + return len; + nbufsiz = MAX(*bufsiz + 512, (size_t)len + 1); + } else + nbufsiz = MAX(offs, *bufsiz) + 512; + + nbuf = realloc(*buf, nbufsiz); + if (nbuf == NULL) + return -1; + *buf = nbuf; + *bufsiz = nbufsiz; + } +} + +/* + * format specifiers: + * %a = address + * %n = symbol_name + * %d = symbol_address - address + * %D = if symbol_address == address "" else +%d + * %f = filename + */ +static ssize_t +format_string(char **buf, size_t *bufsiz, size_t offs, const char *fmt, + Dl_info *dli, const void *addr) +{ + ptrdiff_t diff = (const char *)addr - (const char *)dli->dli_saddr; + size_t o = offs; + int len; + + for (; *fmt; fmt++) { + if (*fmt != '%') + goto printone; + switch (*++fmt) { + case 'a': + len = rasprintf(buf, bufsiz, o, "%p", addr); + break; + case 'n': + len = rasprintf(buf, bufsiz, o, "%s", dli->dli_sname); + break; + case 'D': + if (diff) + len = rasprintf(buf, bufsiz, o, "+0x%tx", diff); + else + len = 0; + break; + case 'd': + len = rasprintf(buf, bufsiz, o, "0x%tx", diff); + break; + case 'f': + len = rasprintf(buf, bufsiz, o, "%s", dli->dli_fname); + break; + default: + printone: + len = rasprintf(buf, bufsiz, o, "%c", *fmt); + break; + } + if (len == -1) + return -1; + o += len; + } + return o - offs; +} + +static ssize_t +format_address(symtab_t *st, char **buf, size_t *bufsiz, size_t offs, + const char *fmt, const void *addr) +{ + Dl_info dli; + + memset(&dli, 0, sizeof(dli)); + (void)dladdr(addr, &dli); + if (st) + symtab_find(st, addr, &dli); + + if (dli.dli_sname == NULL) + dli.dli_sname = "???"; + if (dli.dli_fname == NULL) + dli.dli_fname = "???"; + if (dli.dli_saddr == NULL) + dli.dli_saddr = (void *)(intptr_t)addr; + + return format_string(buf, bufsiz, offs, fmt, &dli, addr); +} + +char ** +backtrace_symbols_fmt(void *const *trace, size_t len, const char *fmt) +{ + + static const size_t slen = sizeof(char *) + 64; /* estimate */ + char *ptr; + symtab_t *st; + int fd; + + if ((fd = open(SELF, O_RDONLY)) != -1) + st = symtab_create(fd, -1, STT_FUNC); + else + st = NULL; + + if ((ptr = calloc(len, slen)) == NULL) + goto out; + + size_t psize = len * slen; + size_t offs = len * sizeof(char *); + + /* We store only offsets in the first pass because of realloc */ + for (size_t i = 0; i < len; i++) { + ssize_t x; + ((char **)(void *)ptr)[i] = (void *)offs; + x = format_address(st, &ptr, &psize, offs, fmt, trace[i]); + if (x == -1) { + free(ptr); + ptr = NULL; + goto out; + } + offs += x; + ptr[offs++] = '\0'; + assert(offs < psize); + } + + /* Change offsets to pointers */ + for (size_t j = 0; j < len; j++) + ((char **)(void *)ptr)[j] += (intptr_t)ptr; + +out: + symtab_destroy(st); + if (fd != -1) + (void)close(fd); + + return (void *)ptr; +} + +int +backtrace_symbols_fd_fmt(void *const *trace, size_t len, int fd, + const char *fmt) +{ + char **s = backtrace_symbols_fmt(trace, len, fmt); + if (s == NULL) + return -1; + for (size_t i = 0; i < len; i++) + if (dprintf(fd, "%s\n", s[i]) < 0) + break; + free(s); + return 0; +} + +static const char fmt[] = "%a <%n%D> at %f"; + +char ** +backtrace_symbols(void *const *trace, size_t len) +{ + return backtrace_symbols_fmt(trace, len, fmt); +} + +int +backtrace_symbols_fd(void *const *trace, size_t len, int fd) +{ + return backtrace_symbols_fd_fmt(trace, len, fd, fmt); +} Added: vendor/NetBSD/libexecinfo/dist/builtin.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/libexecinfo/dist/builtin.c Thu Aug 22 16:31:19 2013 (r254661) @@ -0,0 +1,68 @@ +/* $NetBSD: builtin.c,v 1.1 2012/05/26 22:02:29 christos Exp $ */ + +/*- + * Copyright (c) 2012 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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 +__RCSID("$NetBSD: builtin.c,v 1.1 2012/05/26 22:02:29 christos Exp $"); + +#include +#include + +#include "execinfo.h" + +#ifdef __MACHINE_STACK_GROWS_UP +#define BELOW > +#else +#define BELOW < +#endif + +#ifdef __lint__ +#define __builtin_frame_address(a) ((void *)a) +#endif + +struct frameinfo { + struct frameinfo *next; + void *return_address; +}; + +size_t +backtrace(void **trace, size_t len) +{ + const struct frameinfo *frame = __builtin_frame_address(0); + void *stack = &stack; + + for (size_t i = 0; i < len; i++) { + if ((const void *)frame BELOW stack) + return i; + trace[i] = frame->return_address; + frame = frame->next; + } + + return len; +} Added: vendor/NetBSD/libexecinfo/dist/execinfo.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/libexecinfo/dist/execinfo.h Thu Aug 22 16:31:19 2013 (r254661) @@ -0,0 +1,44 @@ +/* $NetBSD: execinfo.h,v 1.2 2012/06/09 21:22:17 christos Exp $ */ + +/*- + * Copyright (c) 2012 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. + */ +#ifndef _EXECINFO_H_ +#define _EXECINFO_H_ + +#include + +__BEGIN_DECLS +size_t backtrace(void **, size_t); +char **backtrace_symbols(void *const *, size_t); +int backtrace_symbols_fd(void *const *, size_t, int); +char **backtrace_symbols_fmt(void *const *, size_t, const char *); +int backtrace_symbols_fd_fmt(void *const *, size_t, int, const char *); +__END_DECLS + +#endif /* _EXECINFO_H_ */ Added: vendor/NetBSD/libexecinfo/dist/symtab.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/libexecinfo/dist/symtab.c Thu Aug 22 16:31:19 2013 (r254661) @@ -0,0 +1,192 @@ +/* $NetBSD: symtab.c,v 1.1 2012/05/26 22:02:29 christos Exp $ */ + +/*- + * Copyright (c) 2012 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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 +__RCSID("$NetBSD: symtab.c,v 1.1 2012/05/26 22:02:29 christos Exp $"); + +#include +#include +#include +#include +#include + +#include +#include +#ifndef ELF_ST_BIND +#define ELF_ST_BIND(x) ((x) >> 4) +#endif +#ifndef ELF_ST_TYPE +#define ELF_ST_TYPE(x) (((unsigned int)x) & 0xf) +#endif + + +#include "symtab.h" + +struct symbol { + char *st_name; + uintptr_t st_value; + uintptr_t st_info; +}; + +struct symtab { + size_t nsymbols; + struct symbol *symbols; +}; + +static int +address_compare(const void *a, const void *b) +{ + const struct symbol *sa = a; + const struct symbol *sb = b; + return (int)(intmax_t)(sa->st_value - sb->st_value); +} + +void +symtab_destroy(symtab_t *s) +{ + if (s == NULL) + return; + for (size_t i = 0; i < s->nsymbols; i++) + free(s->symbols[i].st_name); + free(s->symbols); + free(s); +} + +symtab_t * +symtab_create(int fd, int bind, int type) +{ + Elf *elf; + symtab_t *st; + Elf_Scn *scn = NULL; + + if (elf_version(EV_CURRENT) == EV_NONE) { + warnx("Elf Library is out of date."); + return NULL; + } + + elf = elf_begin(fd, ELF_C_READ, NULL); + if (elf == NULL) { + warnx("Error opening elf file: %s", elf_errmsg(elf_errno())); + return NULL; + } + st = calloc(1, sizeof(*st)); + if (st == NULL) { + warnx("Error allocating symbol table"); + elf_end(elf); + return NULL; + } + + while ((scn = elf_nextscn(elf, scn)) != NULL) { + GElf_Shdr shdr; + Elf_Data *edata; + size_t ns; + struct symbol *s; + + gelf_getshdr(scn, &shdr); + if(shdr.sh_type != SHT_SYMTAB) + continue; + + edata = elf_getdata(scn, NULL); + ns = shdr.sh_size / shdr.sh_entsize; + s = calloc(ns, sizeof(*s)); + if (s == NULL) { + warn("Cannot allocate %zu symbols", ns); + goto out; + } + st->symbols = s; + + for (size_t i = 0; i < ns; i++) { + GElf_Sym sym; + gelf_getsym(edata, (int)i, &sym); + + if (bind != -1 && + (unsigned)bind != ELF_ST_BIND(sym.st_info)) + continue; + + if (type != -1 && + (unsigned)type != ELF_ST_TYPE(sym.st_info)) + continue; + + s->st_value = sym.st_value; + s->st_info = sym.st_info; + s->st_name = strdup( + elf_strptr(elf, shdr.sh_link, sym.st_name)); + if (s->st_name == NULL) + goto out; + s++; + } + st->nsymbols = s - st->symbols; + if (st->nsymbols == 0) { + warnx("No symbols found"); + goto out; + } + qsort(st->symbols, st->nsymbols, sizeof(*st->symbols), + address_compare); + elf_end(elf); + return st; + } +out: + symtab_destroy(st); + elf_end(elf); + return NULL; +} + + +int +symtab_find(const symtab_t *st, const void *p, Dl_info *dli) +{ + struct symbol *s = st->symbols; + size_t ns = st->nsymbols; + size_t hi = ns; + size_t lo = 0; + size_t mid = ns / 2; + uintptr_t dd, sd, me = (uintptr_t)p; + + for (;;) { + if (s[mid].st_value < me) + lo = mid; + else if (s[mid].st_value > me) + hi = mid; + else + break; + if (hi - lo == 1) { + mid = lo; + break; + } + mid = (hi + lo) / 2; + } + dd = me - (uintptr_t)dli->dli_saddr; + sd = me - s[mid].st_value; + if (dd > sd) { + dli->dli_saddr = (void *)s[mid].st_value; + dli->dli_sname = s[mid].st_name; + } + return 1; +} Added: vendor/NetBSD/libexecinfo/dist/symtab.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/libexecinfo/dist/symtab.h Thu Aug 22 16:31:19 2013 (r254661) @@ -0,0 +1,42 @@ +/* $NetBSD: symtab.h,v 1.1 2012/05/26 22:02:29 christos Exp $ */ + +/*- + * Copyright (c) 2012 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. + */ +#ifndef _SYMTAB_H_ +#define _SYMTAB_H_ + +__BEGIN_DECLS +typedef struct symtab symtab_t; + +void symtab_destroy(symtab_t *); +symtab_t * symtab_create(int, int, int); +int symtab_find(const symtab_t *, const void *, Dl_info *); +__END_DECLS + +#endif /* _SYMTAB_H_ */ Added: vendor/NetBSD/libexecinfo/dist/unwind.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/libexecinfo/dist/unwind.c Thu Aug 22 16:31:19 2013 (r254661) @@ -0,0 +1,72 @@ +/* $NetBSD: unwind.c,v 1.1 2012/05/26 22:02:29 christos Exp $ */ + +/*- + * Copyright (c) 2012 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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 +#include +#include + +#include "unwind.h" +#include "execinfo.h" + +struct tracer_context { + void **arr; + size_t len; + size_t n; +}; + +static _Unwind_Reason_Code +tracer(struct _Unwind_Context *ctx, void *arg) +{ + struct tracer_context *t = arg; + if (t->n == (size_t)~0) { + /* Skip backtrace frame */ + t->n = 0; + return 0; + } + if (t->n < t->len) + t->arr[t->n++] = _Unwind_GetIP(ctx); + return 0; +} + +size_t +backtrace(void **arr, size_t len) +{ + struct tracer_context ctx; + + ctx.arr = arr; + ctx.len = len; + ctx.n = (size_t)~0; + + _Unwind_Backtrace(tracer, &ctx); + if (ctx.n != (size_t)~0 && ctx.n > 0) + ctx.arr[--ctx.n] = NULL; /* Skip frame below __start */ + + return ctx.n; +} Added: vendor/NetBSD/libexecinfo/dist/unwind.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/libexecinfo/dist/unwind.h Thu Aug 22 16:31:19 2013 (r254661) @@ -0,0 +1,68 @@ +/* $NetBSD: unwind.h,v 1.1 2012/05/26 22:02:29 christos Exp $ */ + +/*- + * Copyright (c) 2012 The NetBSD Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. + */ +#ifndef _UNWIND_H_ +#define _UNWIND_H_ + +__BEGIN_DECLS +struct _Unwind_Context; +struct _Unwind_Exception; +typedef int _Unwind_Reason_Code; +typedef void *_Unwind_Ptr; +typedef long _Unwind_Word; + +typedef _Unwind_Reason_Code + (*_Unwind_Trace_Fn)(struct _Unwind_Context *, void *); +#ifdef notyet +typedef _Unwind_Reason_Code + (*_Unwind_Stop_Fn)(struct _Unwind_Context *, void *); +#endif + +_Unwind_Reason_Code _Unwind_Backtrace(_Unwind_Trace_Fn, void *); +void _Unwind_DeleteException(struct _Unwind_Exception *); +void *_Unwind_FindEnclosingFunction(void *); +#ifdef notyet +_Unwind_Reason_Code _Unwind_ForcedUnwind(struct _Unwind_Exception *, + _Unwind_Stop_fn, void *); +#endif +_Unwind_Word _Unwind_GetCFA(struct _Unwind_Context *); +_Unwind_Ptr _Unwind_GetDataRelBase(struct _Unwind_Context *); +_Unwind_Word _Unwind_GetGR(struct _Unwind_Context *, int); +_Unwind_Ptr _Unwind_GetIP(struct _Unwind_Context *); +_Unwind_Ptr _Unwind_GetIPInfo(struct _Unwind_Context *, int *); +void *_Unwind_GetLanguageSpecificData( + struct _Unwind_Context *); +_Unwind_Ptr _Unwind_GetRegionStart(struct _Unwind_Context *); +_Unwind_Ptr _Unwind_GetTextRelBase(struct _Unwind_Context *); +_Unwind_Reason_Code _Unwind_RaiseException(struct _Unwind_Exception *); +void _Unwind_Resume(struct _Unwind_Exception *); +_Unwind_Reason_Code _Unwind_Resume_or_Rethrow(struct _Unwind_Exception *); +void _Unwind_SetGR(struct _Unwind_Context *, int, + _Unwind_Ptr); +void _Unwind_SetIP(struct _Unwind_Context *, _Unwind_Ptr); +__END_DECLS +#endif /* _UNWIND_H_ */ Added: vendor/NetBSD/libexecinfo/dist/unwind_arm_ehabi_stub.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/libexecinfo/dist/unwind_arm_ehabi_stub.c Thu Aug 22 16:31:19 2013 (r254661) @@ -0,0 +1,61 @@ +/*- + * Copyright (c) 2013 The NetBSD Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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 +#include +#include "unwind.h" + +void _Unwind_VRS_Get(struct _Unwind_Context *, int, _Unwind_Word, int, void *); +void _Unwind_VRS_Set(struct _Unwind_Context *, int, _Unwind_Word, int, void *); + +_Unwind_Word +_Unwind_GetGR(struct _Unwind_Context *context, int regno) +{ + _Unwind_Word val; + _Unwind_VRS_Get(context, 0 /*_UVRSC_CORE*/, regno, 0 /*_UVRSD_UINT32*/, + &val); + + return val; +} + +_Unwind_Ptr +_Unwind_GetIP(struct _Unwind_Context *context) +{ + return (_Unwind_Ptr)(_Unwind_GetGR (context, 15) & ~(_Unwind_Word)1); +} + +_Unwind_Ptr +_Unwind_GetIPInfo(struct _Unwind_Context *context, int *p) +{ + *p = 0; + return _Unwind_GetIP(context); +} + +void +_Unwind_SetGR(struct _Unwind_Context *context, int reg, _Unwind_Ptr val) +{ + _Unwind_VRS_Set(context, 0 /*_UVRSC_CORE*/, reg, 0 /*_UVRSD_UINT32*/, + &val); +} From owner-svn-src-vendor@FreeBSD.ORG Thu Aug 22 16:34:03 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AE2ABD3F; Thu, 22 Aug 2013 16:34:03 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 83FC529DB; Thu, 22 Aug 2013 16:34:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7MGY3wO092382; Thu, 22 Aug 2013 16:34:03 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7MGY3jq092381; Thu, 22 Aug 2013 16:34:03 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201308221634.r7MGY3jq092381@svn.freebsd.org> From: Ed Maste Date: Thu, 22 Aug 2013 16:34:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r254662 - vendor/NetBSD/libexecinfo/20130822 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Aug 2013 16:34:03 -0000 Author: emaste Date: Thu Aug 22 16:34:03 2013 New Revision: 254662 URL: http://svnweb.freebsd.org/changeset/base/254662 Log: Tag libexecinfo 2013-08-22 Added: vendor/NetBSD/libexecinfo/20130822/ - copied from r254661, vendor/NetBSD/libexecinfo/dist/ From owner-svn-src-vendor@FreeBSD.ORG Fri Aug 23 17:46:41 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7647C262; Fri, 23 Aug 2013 17:46:41 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5F43F26F4; Fri, 23 Aug 2013 17:46:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7NHkfjT087175; Fri, 23 Aug 2013 17:46:41 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7NHkdg8087163; Fri, 23 Aug 2013 17:46:39 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201308231746.r7NHkdg8087163@svn.freebsd.org> From: Ed Maste Date: Fri, 23 Aug 2013 17:46:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r254721 - in vendor/lldb: . dist dist/include dist/include/lldb dist/include/lldb/API dist/include/lldb/Breakpoint dist/include/lldb/Core dist/include/lldb/DataFormatters dist/include/l... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Aug 2013 17:46:41 -0000 Author: emaste Date: Fri Aug 23 17:46:38 2013 New Revision: 254721 URL: http://svnweb.freebsd.org/changeset/base/254721 Log: Import lldb as of SVN r188801 (A number of files not required for the FreeBSD build have been removed.) Sponsored by: DARPA, AFRL Added: vendor/lldb/ vendor/lldb/dist/ vendor/lldb/dist/LICENSE.TXT vendor/lldb/dist/include/ vendor/lldb/dist/include/lldb/ vendor/lldb/dist/include/lldb/API/ vendor/lldb/dist/include/lldb/API/LLDB.h vendor/lldb/dist/include/lldb/API/SBAddress.h vendor/lldb/dist/include/lldb/API/SBBlock.h vendor/lldb/dist/include/lldb/API/SBBreakpoint.h vendor/lldb/dist/include/lldb/API/SBBreakpointLocation.h vendor/lldb/dist/include/lldb/API/SBBroadcaster.h vendor/lldb/dist/include/lldb/API/SBCommandInterpreter.h vendor/lldb/dist/include/lldb/API/SBCommandReturnObject.h vendor/lldb/dist/include/lldb/API/SBCommunication.h vendor/lldb/dist/include/lldb/API/SBCompileUnit.h vendor/lldb/dist/include/lldb/API/SBData.h vendor/lldb/dist/include/lldb/API/SBDebugger.h vendor/lldb/dist/include/lldb/API/SBDeclaration.h vendor/lldb/dist/include/lldb/API/SBDefines.h vendor/lldb/dist/include/lldb/API/SBError.h vendor/lldb/dist/include/lldb/API/SBEvent.h vendor/lldb/dist/include/lldb/API/SBExpressionOptions.h vendor/lldb/dist/include/lldb/API/SBFileSpec.h vendor/lldb/dist/include/lldb/API/SBFileSpecList.h vendor/lldb/dist/include/lldb/API/SBFrame.h vendor/lldb/dist/include/lldb/API/SBFunction.h vendor/lldb/dist/include/lldb/API/SBHostOS.h vendor/lldb/dist/include/lldb/API/SBInputReader.h vendor/lldb/dist/include/lldb/API/SBInstruction.h vendor/lldb/dist/include/lldb/API/SBInstructionList.h vendor/lldb/dist/include/lldb/API/SBLineEntry.h vendor/lldb/dist/include/lldb/API/SBListener.h vendor/lldb/dist/include/lldb/API/SBModule.h vendor/lldb/dist/include/lldb/API/SBModuleSpec.h vendor/lldb/dist/include/lldb/API/SBProcess.h vendor/lldb/dist/include/lldb/API/SBSection.h vendor/lldb/dist/include/lldb/API/SBSourceManager.h vendor/lldb/dist/include/lldb/API/SBStream.h vendor/lldb/dist/include/lldb/API/SBStringList.h vendor/lldb/dist/include/lldb/API/SBSymbol.h vendor/lldb/dist/include/lldb/API/SBSymbolContext.h vendor/lldb/dist/include/lldb/API/SBSymbolContextList.h vendor/lldb/dist/include/lldb/API/SBTarget.h vendor/lldb/dist/include/lldb/API/SBThread.h vendor/lldb/dist/include/lldb/API/SBType.h vendor/lldb/dist/include/lldb/API/SBTypeCategory.h vendor/lldb/dist/include/lldb/API/SBTypeFilter.h vendor/lldb/dist/include/lldb/API/SBTypeFormat.h vendor/lldb/dist/include/lldb/API/SBTypeNameSpecifier.h vendor/lldb/dist/include/lldb/API/SBTypeSummary.h vendor/lldb/dist/include/lldb/API/SBTypeSynthetic.h vendor/lldb/dist/include/lldb/API/SBValue.h vendor/lldb/dist/include/lldb/API/SBValueList.h vendor/lldb/dist/include/lldb/API/SBWatchpoint.h vendor/lldb/dist/include/lldb/Breakpoint/ vendor/lldb/dist/include/lldb/Breakpoint/Breakpoint.h vendor/lldb/dist/include/lldb/Breakpoint/BreakpointID.h vendor/lldb/dist/include/lldb/Breakpoint/BreakpointIDList.h vendor/lldb/dist/include/lldb/Breakpoint/BreakpointList.h vendor/lldb/dist/include/lldb/Breakpoint/BreakpointLocation.h vendor/lldb/dist/include/lldb/Breakpoint/BreakpointLocationCollection.h vendor/lldb/dist/include/lldb/Breakpoint/BreakpointLocationList.h vendor/lldb/dist/include/lldb/Breakpoint/BreakpointOptions.h vendor/lldb/dist/include/lldb/Breakpoint/BreakpointResolver.h vendor/lldb/dist/include/lldb/Breakpoint/BreakpointResolverAddress.h vendor/lldb/dist/include/lldb/Breakpoint/BreakpointResolverFileLine.h vendor/lldb/dist/include/lldb/Breakpoint/BreakpointResolverFileRegex.h vendor/lldb/dist/include/lldb/Breakpoint/BreakpointResolverName.h vendor/lldb/dist/include/lldb/Breakpoint/BreakpointSite.h vendor/lldb/dist/include/lldb/Breakpoint/BreakpointSiteList.h vendor/lldb/dist/include/lldb/Breakpoint/Stoppoint.h vendor/lldb/dist/include/lldb/Breakpoint/StoppointCallbackContext.h vendor/lldb/dist/include/lldb/Breakpoint/StoppointLocation.h vendor/lldb/dist/include/lldb/Breakpoint/Watchpoint.h vendor/lldb/dist/include/lldb/Breakpoint/WatchpointList.h vendor/lldb/dist/include/lldb/Breakpoint/WatchpointOptions.h vendor/lldb/dist/include/lldb/Core/ vendor/lldb/dist/include/lldb/Core/Address.h vendor/lldb/dist/include/lldb/Core/AddressRange.h vendor/lldb/dist/include/lldb/Core/AddressResolver.h vendor/lldb/dist/include/lldb/Core/AddressResolverFileLine.h vendor/lldb/dist/include/lldb/Core/AddressResolverName.h vendor/lldb/dist/include/lldb/Core/ArchSpec.h vendor/lldb/dist/include/lldb/Core/Baton.h vendor/lldb/dist/include/lldb/Core/Broadcaster.h vendor/lldb/dist/include/lldb/Core/ClangForward.h vendor/lldb/dist/include/lldb/Core/Communication.h vendor/lldb/dist/include/lldb/Core/Connection.h vendor/lldb/dist/include/lldb/Core/ConnectionFileDescriptor.h vendor/lldb/dist/include/lldb/Core/ConnectionMachPort.h vendor/lldb/dist/include/lldb/Core/ConnectionSharedMemory.h vendor/lldb/dist/include/lldb/Core/ConstString.h vendor/lldb/dist/include/lldb/Core/DataBuffer.h vendor/lldb/dist/include/lldb/Core/DataBufferHeap.h vendor/lldb/dist/include/lldb/Core/DataBufferMemoryMap.h vendor/lldb/dist/include/lldb/Core/DataEncoder.h vendor/lldb/dist/include/lldb/Core/DataExtractor.h vendor/lldb/dist/include/lldb/Core/Debugger.h vendor/lldb/dist/include/lldb/Core/Disassembler.h vendor/lldb/dist/include/lldb/Core/EmulateInstruction.h vendor/lldb/dist/include/lldb/Core/Error.h vendor/lldb/dist/include/lldb/Core/Event.h vendor/lldb/dist/include/lldb/Core/FileLineResolver.h vendor/lldb/dist/include/lldb/Core/FileSpecList.h vendor/lldb/dist/include/lldb/Core/Flags.h vendor/lldb/dist/include/lldb/Core/History.h vendor/lldb/dist/include/lldb/Core/IOStreamMacros.h vendor/lldb/dist/include/lldb/Core/InputReader.h vendor/lldb/dist/include/lldb/Core/InputReaderEZ.h vendor/lldb/dist/include/lldb/Core/InputReaderStack.h vendor/lldb/dist/include/lldb/Core/Language.h vendor/lldb/dist/include/lldb/Core/Listener.h vendor/lldb/dist/include/lldb/Core/Log.h vendor/lldb/dist/include/lldb/Core/Mangled.h vendor/lldb/dist/include/lldb/Core/MappedHash.h vendor/lldb/dist/include/lldb/Core/Module.h vendor/lldb/dist/include/lldb/Core/ModuleChild.h vendor/lldb/dist/include/lldb/Core/ModuleList.h vendor/lldb/dist/include/lldb/Core/ModuleSpec.h vendor/lldb/dist/include/lldb/Core/Opcode.h vendor/lldb/dist/include/lldb/Core/PluginInterface.h vendor/lldb/dist/include/lldb/Core/PluginManager.h vendor/lldb/dist/include/lldb/Core/RangeMap.h vendor/lldb/dist/include/lldb/Core/RegisterValue.h vendor/lldb/dist/include/lldb/Core/RegularExpression.h vendor/lldb/dist/include/lldb/Core/STLUtils.h vendor/lldb/dist/include/lldb/Core/Scalar.h vendor/lldb/dist/include/lldb/Core/SearchFilter.h vendor/lldb/dist/include/lldb/Core/Section.h vendor/lldb/dist/include/lldb/Core/SourceManager.h vendor/lldb/dist/include/lldb/Core/State.h vendor/lldb/dist/include/lldb/Core/Stream.h vendor/lldb/dist/include/lldb/Core/StreamAsynchronousIO.h vendor/lldb/dist/include/lldb/Core/StreamBuffer.h vendor/lldb/dist/include/lldb/Core/StreamCallback.h vendor/lldb/dist/include/lldb/Core/StreamFile.h vendor/lldb/dist/include/lldb/Core/StreamString.h vendor/lldb/dist/include/lldb/Core/StreamTee.h vendor/lldb/dist/include/lldb/Core/StringList.h vendor/lldb/dist/include/lldb/Core/ThreadSafeSTLMap.h vendor/lldb/dist/include/lldb/Core/ThreadSafeValue.h vendor/lldb/dist/include/lldb/Core/Timer.h vendor/lldb/dist/include/lldb/Core/UUID.h vendor/lldb/dist/include/lldb/Core/UniqueCStringMap.h vendor/lldb/dist/include/lldb/Core/UserID.h vendor/lldb/dist/include/lldb/Core/UserSettingsController.h vendor/lldb/dist/include/lldb/Core/VMRange.h vendor/lldb/dist/include/lldb/Core/Value.h vendor/lldb/dist/include/lldb/Core/ValueObject.h vendor/lldb/dist/include/lldb/Core/ValueObjectCast.h vendor/lldb/dist/include/lldb/Core/ValueObjectChild.h vendor/lldb/dist/include/lldb/Core/ValueObjectConstResult.h vendor/lldb/dist/include/lldb/Core/ValueObjectConstResultChild.h vendor/lldb/dist/include/lldb/Core/ValueObjectConstResultImpl.h vendor/lldb/dist/include/lldb/Core/ValueObjectDynamicValue.h vendor/lldb/dist/include/lldb/Core/ValueObjectList.h vendor/lldb/dist/include/lldb/Core/ValueObjectMemory.h vendor/lldb/dist/include/lldb/Core/ValueObjectRegister.h vendor/lldb/dist/include/lldb/Core/ValueObjectSyntheticFilter.h vendor/lldb/dist/include/lldb/Core/ValueObjectVariable.h vendor/lldb/dist/include/lldb/Core/dwarf.h vendor/lldb/dist/include/lldb/DataFormatters/ vendor/lldb/dist/include/lldb/DataFormatters/CXXFormatterFunctions.h vendor/lldb/dist/include/lldb/DataFormatters/DataVisualization.h vendor/lldb/dist/include/lldb/DataFormatters/FormatCache.h vendor/lldb/dist/include/lldb/DataFormatters/FormatClasses.h vendor/lldb/dist/include/lldb/DataFormatters/FormatManager.h vendor/lldb/dist/include/lldb/DataFormatters/FormatNavigator.h vendor/lldb/dist/include/lldb/DataFormatters/TypeCategory.h vendor/lldb/dist/include/lldb/DataFormatters/TypeCategoryMap.h vendor/lldb/dist/include/lldb/DataFormatters/TypeFormat.h vendor/lldb/dist/include/lldb/DataFormatters/TypeSummary.h vendor/lldb/dist/include/lldb/DataFormatters/TypeSynthetic.h vendor/lldb/dist/include/lldb/Expression/ vendor/lldb/dist/include/lldb/Expression/ASTDumper.h vendor/lldb/dist/include/lldb/Expression/ASTResultSynthesizer.h vendor/lldb/dist/include/lldb/Expression/ASTStructExtractor.h vendor/lldb/dist/include/lldb/Expression/ClangASTSource.h vendor/lldb/dist/include/lldb/Expression/ClangExpression.h vendor/lldb/dist/include/lldb/Expression/ClangExpressionDeclMap.h vendor/lldb/dist/include/lldb/Expression/ClangExpressionParser.h vendor/lldb/dist/include/lldb/Expression/ClangExpressionVariable.h vendor/lldb/dist/include/lldb/Expression/ClangFunction.h vendor/lldb/dist/include/lldb/Expression/ClangPersistentVariables.h vendor/lldb/dist/include/lldb/Expression/ClangUserExpression.h vendor/lldb/dist/include/lldb/Expression/ClangUtilityFunction.h vendor/lldb/dist/include/lldb/Expression/DWARFExpression.h vendor/lldb/dist/include/lldb/Expression/ExpressionSourceCode.h vendor/lldb/dist/include/lldb/Expression/IRDynamicChecks.h vendor/lldb/dist/include/lldb/Expression/IRExecutionUnit.h vendor/lldb/dist/include/lldb/Expression/IRForTarget.h vendor/lldb/dist/include/lldb/Expression/IRInterpreter.h vendor/lldb/dist/include/lldb/Expression/IRMemoryMap.h vendor/lldb/dist/include/lldb/Expression/IRToDWARF.h vendor/lldb/dist/include/lldb/Expression/Materializer.h vendor/lldb/dist/include/lldb/Host/ vendor/lldb/dist/include/lldb/Host/Condition.h vendor/lldb/dist/include/lldb/Host/Config.h vendor/lldb/dist/include/lldb/Host/DynamicLibrary.h vendor/lldb/dist/include/lldb/Host/Endian.h vendor/lldb/dist/include/lldb/Host/File.h vendor/lldb/dist/include/lldb/Host/FileSpec.h vendor/lldb/dist/include/lldb/Host/Host.h vendor/lldb/dist/include/lldb/Host/Mutex.h vendor/lldb/dist/include/lldb/Host/Predicate.h vendor/lldb/dist/include/lldb/Host/ProcessRunLock.h vendor/lldb/dist/include/lldb/Host/SocketAddress.h vendor/lldb/dist/include/lldb/Host/Symbols.h vendor/lldb/dist/include/lldb/Host/Terminal.h vendor/lldb/dist/include/lldb/Host/TimeValue.h vendor/lldb/dist/include/lldb/Host/freebsd/ vendor/lldb/dist/include/lldb/Host/freebsd/Config.h vendor/lldb/dist/include/lldb/Interpreter/ vendor/lldb/dist/include/lldb/Interpreter/Args.h vendor/lldb/dist/include/lldb/Interpreter/CommandCompletions.h vendor/lldb/dist/include/lldb/Interpreter/CommandHistory.h vendor/lldb/dist/include/lldb/Interpreter/CommandInterpreter.h vendor/lldb/dist/include/lldb/Interpreter/CommandObject.h vendor/lldb/dist/include/lldb/Interpreter/CommandObjectMultiword.h vendor/lldb/dist/include/lldb/Interpreter/CommandObjectRegexCommand.h vendor/lldb/dist/include/lldb/Interpreter/CommandReturnObject.h vendor/lldb/dist/include/lldb/Interpreter/OptionGroupArchitecture.h vendor/lldb/dist/include/lldb/Interpreter/OptionGroupBoolean.h vendor/lldb/dist/include/lldb/Interpreter/OptionGroupFile.h vendor/lldb/dist/include/lldb/Interpreter/OptionGroupFormat.h vendor/lldb/dist/include/lldb/Interpreter/OptionGroupOutputFile.h vendor/lldb/dist/include/lldb/Interpreter/OptionGroupPlatform.h vendor/lldb/dist/include/lldb/Interpreter/OptionGroupString.h vendor/lldb/dist/include/lldb/Interpreter/OptionGroupUInt64.h vendor/lldb/dist/include/lldb/Interpreter/OptionGroupUUID.h vendor/lldb/dist/include/lldb/Interpreter/OptionGroupValueObjectDisplay.h vendor/lldb/dist/include/lldb/Interpreter/OptionGroupVariable.h vendor/lldb/dist/include/lldb/Interpreter/OptionGroupWatchpoint.h vendor/lldb/dist/include/lldb/Interpreter/OptionValue.h vendor/lldb/dist/include/lldb/Interpreter/OptionValueArch.h vendor/lldb/dist/include/lldb/Interpreter/OptionValueArgs.h vendor/lldb/dist/include/lldb/Interpreter/OptionValueArray.h vendor/lldb/dist/include/lldb/Interpreter/OptionValueBoolean.h vendor/lldb/dist/include/lldb/Interpreter/OptionValueDictionary.h vendor/lldb/dist/include/lldb/Interpreter/OptionValueEnumeration.h vendor/lldb/dist/include/lldb/Interpreter/OptionValueFileSpec.h vendor/lldb/dist/include/lldb/Interpreter/OptionValueFileSpecList.h vendor/lldb/dist/include/lldb/Interpreter/OptionValueFormat.h vendor/lldb/dist/include/lldb/Interpreter/OptionValuePathMappings.h vendor/lldb/dist/include/lldb/Interpreter/OptionValueProperties.h vendor/lldb/dist/include/lldb/Interpreter/OptionValueRegex.h vendor/lldb/dist/include/lldb/Interpreter/OptionValueSInt64.h vendor/lldb/dist/include/lldb/Interpreter/OptionValueString.h vendor/lldb/dist/include/lldb/Interpreter/OptionValueUInt64.h vendor/lldb/dist/include/lldb/Interpreter/OptionValueUUID.h vendor/lldb/dist/include/lldb/Interpreter/OptionValues.h vendor/lldb/dist/include/lldb/Interpreter/Options.h vendor/lldb/dist/include/lldb/Interpreter/Property.h vendor/lldb/dist/include/lldb/Interpreter/PythonDataObjects.h vendor/lldb/dist/include/lldb/Interpreter/ScriptInterpreter.h vendor/lldb/dist/include/lldb/Interpreter/ScriptInterpreterNone.h vendor/lldb/dist/include/lldb/Interpreter/ScriptInterpreterPython.h vendor/lldb/dist/include/lldb/Symbol/ vendor/lldb/dist/include/lldb/Symbol/Block.h vendor/lldb/dist/include/lldb/Symbol/ClangASTContext.h vendor/lldb/dist/include/lldb/Symbol/ClangASTImporter.h vendor/lldb/dist/include/lldb/Symbol/ClangASTType.h vendor/lldb/dist/include/lldb/Symbol/ClangExternalASTSourceCallbacks.h vendor/lldb/dist/include/lldb/Symbol/ClangExternalASTSourceCommon.h vendor/lldb/dist/include/lldb/Symbol/ClangNamespaceDecl.h vendor/lldb/dist/include/lldb/Symbol/CompileUnit.h vendor/lldb/dist/include/lldb/Symbol/DWARFCallFrameInfo.h vendor/lldb/dist/include/lldb/Symbol/Declaration.h vendor/lldb/dist/include/lldb/Symbol/FuncUnwinders.h vendor/lldb/dist/include/lldb/Symbol/Function.h vendor/lldb/dist/include/lldb/Symbol/LineEntry.h vendor/lldb/dist/include/lldb/Symbol/LineTable.h vendor/lldb/dist/include/lldb/Symbol/ObjectContainer.h vendor/lldb/dist/include/lldb/Symbol/ObjectFile.h vendor/lldb/dist/include/lldb/Symbol/Symbol.h vendor/lldb/dist/include/lldb/Symbol/SymbolContext.h vendor/lldb/dist/include/lldb/Symbol/SymbolContextScope.h vendor/lldb/dist/include/lldb/Symbol/SymbolFile.h vendor/lldb/dist/include/lldb/Symbol/SymbolVendor.h vendor/lldb/dist/include/lldb/Symbol/Symtab.h vendor/lldb/dist/include/lldb/Symbol/TaggedASTType.h vendor/lldb/dist/include/lldb/Symbol/Type.h vendor/lldb/dist/include/lldb/Symbol/TypeList.h vendor/lldb/dist/include/lldb/Symbol/TypeVendor.h vendor/lldb/dist/include/lldb/Symbol/UnwindPlan.h vendor/lldb/dist/include/lldb/Symbol/UnwindTable.h vendor/lldb/dist/include/lldb/Symbol/Variable.h vendor/lldb/dist/include/lldb/Symbol/VariableList.h vendor/lldb/dist/include/lldb/Symbol/VerifyDecl.h vendor/lldb/dist/include/lldb/Target/ vendor/lldb/dist/include/lldb/Target/ABI.h vendor/lldb/dist/include/lldb/Target/CPPLanguageRuntime.h vendor/lldb/dist/include/lldb/Target/DynamicLoader.h vendor/lldb/dist/include/lldb/Target/ExecutionContext.h vendor/lldb/dist/include/lldb/Target/ExecutionContextScope.h vendor/lldb/dist/include/lldb/Target/LanguageRuntime.h vendor/lldb/dist/include/lldb/Target/Memory.h vendor/lldb/dist/include/lldb/Target/ObjCLanguageRuntime.h vendor/lldb/dist/include/lldb/Target/OperatingSystem.h vendor/lldb/dist/include/lldb/Target/PathMappingList.h vendor/lldb/dist/include/lldb/Target/Platform.h vendor/lldb/dist/include/lldb/Target/Process.h vendor/lldb/dist/include/lldb/Target/RegisterContext.h vendor/lldb/dist/include/lldb/Target/SectionLoadList.h vendor/lldb/dist/include/lldb/Target/StackFrame.h vendor/lldb/dist/include/lldb/Target/StackFrameList.h vendor/lldb/dist/include/lldb/Target/StackID.h vendor/lldb/dist/include/lldb/Target/StopInfo.h vendor/lldb/dist/include/lldb/Target/Target.h vendor/lldb/dist/include/lldb/Target/TargetList.h vendor/lldb/dist/include/lldb/Target/Thread.h vendor/lldb/dist/include/lldb/Target/ThreadList.h vendor/lldb/dist/include/lldb/Target/ThreadPlan.h vendor/lldb/dist/include/lldb/Target/ThreadPlanBase.h vendor/lldb/dist/include/lldb/Target/ThreadPlanCallFunction.h vendor/lldb/dist/include/lldb/Target/ThreadPlanCallUserExpression.h vendor/lldb/dist/include/lldb/Target/ThreadPlanRunToAddress.h vendor/lldb/dist/include/lldb/Target/ThreadPlanShouldStopHere.h vendor/lldb/dist/include/lldb/Target/ThreadPlanStepInRange.h vendor/lldb/dist/include/lldb/Target/ThreadPlanStepInstruction.h vendor/lldb/dist/include/lldb/Target/ThreadPlanStepOut.h vendor/lldb/dist/include/lldb/Target/ThreadPlanStepOverBreakpoint.h vendor/lldb/dist/include/lldb/Target/ThreadPlanStepOverRange.h vendor/lldb/dist/include/lldb/Target/ThreadPlanStepRange.h vendor/lldb/dist/include/lldb/Target/ThreadPlanStepThrough.h vendor/lldb/dist/include/lldb/Target/ThreadPlanStepUntil.h vendor/lldb/dist/include/lldb/Target/ThreadPlanTracer.h vendor/lldb/dist/include/lldb/Target/ThreadSpec.h vendor/lldb/dist/include/lldb/Target/UnixSignals.h vendor/lldb/dist/include/lldb/Target/Unwind.h vendor/lldb/dist/include/lldb/Target/UnwindAssembly.h vendor/lldb/dist/include/lldb/Utility/ vendor/lldb/dist/include/lldb/Utility/AnsiTerminal.h vendor/lldb/dist/include/lldb/Utility/CleanUp.h vendor/lldb/dist/include/lldb/Utility/PriorityPointerPair.h vendor/lldb/dist/include/lldb/Utility/PseudoTerminal.h vendor/lldb/dist/include/lldb/Utility/PythonPointer.h vendor/lldb/dist/include/lldb/Utility/Range.h vendor/lldb/dist/include/lldb/Utility/RefCounter.h vendor/lldb/dist/include/lldb/Utility/SharedCluster.h vendor/lldb/dist/include/lldb/Utility/SharingPtr.h vendor/lldb/dist/include/lldb/Utility/Utils.h vendor/lldb/dist/include/lldb/lldb-defines.h vendor/lldb/dist/include/lldb/lldb-enumerations.h vendor/lldb/dist/include/lldb/lldb-forward.h vendor/lldb/dist/include/lldb/lldb-private-enumerations.h vendor/lldb/dist/include/lldb/lldb-private-interfaces.h vendor/lldb/dist/include/lldb/lldb-private-log.h vendor/lldb/dist/include/lldb/lldb-private-types.h vendor/lldb/dist/include/lldb/lldb-private.h vendor/lldb/dist/include/lldb/lldb-public.h vendor/lldb/dist/include/lldb/lldb-python.h vendor/lldb/dist/include/lldb/lldb-types.h vendor/lldb/dist/include/lldb/lldb-versioning.h vendor/lldb/dist/source/ vendor/lldb/dist/source/API/ vendor/lldb/dist/source/API/SBAddress.cpp vendor/lldb/dist/source/API/SBBlock.cpp vendor/lldb/dist/source/API/SBBreakpoint.cpp vendor/lldb/dist/source/API/SBBreakpointLocation.cpp vendor/lldb/dist/source/API/SBBroadcaster.cpp vendor/lldb/dist/source/API/SBCommandInterpreter.cpp vendor/lldb/dist/source/API/SBCommandReturnObject.cpp vendor/lldb/dist/source/API/SBCommunication.cpp vendor/lldb/dist/source/API/SBCompileUnit.cpp vendor/lldb/dist/source/API/SBData.cpp vendor/lldb/dist/source/API/SBDebugger.cpp vendor/lldb/dist/source/API/SBDeclaration.cpp vendor/lldb/dist/source/API/SBError.cpp vendor/lldb/dist/source/API/SBEvent.cpp vendor/lldb/dist/source/API/SBExpressionOptions.cpp vendor/lldb/dist/source/API/SBFileSpec.cpp vendor/lldb/dist/source/API/SBFileSpecList.cpp vendor/lldb/dist/source/API/SBFrame.cpp vendor/lldb/dist/source/API/SBFunction.cpp vendor/lldb/dist/source/API/SBHostOS.cpp vendor/lldb/dist/source/API/SBInputReader.cpp vendor/lldb/dist/source/API/SBInstruction.cpp vendor/lldb/dist/source/API/SBInstructionList.cpp vendor/lldb/dist/source/API/SBLineEntry.cpp vendor/lldb/dist/source/API/SBListener.cpp vendor/lldb/dist/source/API/SBModule.cpp vendor/lldb/dist/source/API/SBModuleSpec.cpp vendor/lldb/dist/source/API/SBProcess.cpp vendor/lldb/dist/source/API/SBSection.cpp vendor/lldb/dist/source/API/SBSourceManager.cpp vendor/lldb/dist/source/API/SBStream.cpp vendor/lldb/dist/source/API/SBStringList.cpp vendor/lldb/dist/source/API/SBSymbol.cpp vendor/lldb/dist/source/API/SBSymbolContext.cpp vendor/lldb/dist/source/API/SBSymbolContextList.cpp vendor/lldb/dist/source/API/SBTarget.cpp vendor/lldb/dist/source/API/SBThread.cpp vendor/lldb/dist/source/API/SBType.cpp vendor/lldb/dist/source/API/SBTypeCategory.cpp vendor/lldb/dist/source/API/SBTypeFilter.cpp vendor/lldb/dist/source/API/SBTypeFormat.cpp vendor/lldb/dist/source/API/SBTypeNameSpecifier.cpp vendor/lldb/dist/source/API/SBTypeSummary.cpp vendor/lldb/dist/source/API/SBTypeSynthetic.cpp vendor/lldb/dist/source/API/SBValue.cpp vendor/lldb/dist/source/API/SBValueList.cpp vendor/lldb/dist/source/API/SBWatchpoint.cpp vendor/lldb/dist/source/Breakpoint/ vendor/lldb/dist/source/Breakpoint/Breakpoint.cpp vendor/lldb/dist/source/Breakpoint/BreakpointID.cpp vendor/lldb/dist/source/Breakpoint/BreakpointIDList.cpp vendor/lldb/dist/source/Breakpoint/BreakpointList.cpp vendor/lldb/dist/source/Breakpoint/BreakpointLocation.cpp vendor/lldb/dist/source/Breakpoint/BreakpointLocationCollection.cpp vendor/lldb/dist/source/Breakpoint/BreakpointLocationList.cpp vendor/lldb/dist/source/Breakpoint/BreakpointOptions.cpp vendor/lldb/dist/source/Breakpoint/BreakpointResolver.cpp vendor/lldb/dist/source/Breakpoint/BreakpointResolverAddress.cpp vendor/lldb/dist/source/Breakpoint/BreakpointResolverFileLine.cpp vendor/lldb/dist/source/Breakpoint/BreakpointResolverFileRegex.cpp vendor/lldb/dist/source/Breakpoint/BreakpointResolverName.cpp vendor/lldb/dist/source/Breakpoint/BreakpointSite.cpp vendor/lldb/dist/source/Breakpoint/BreakpointSiteList.cpp vendor/lldb/dist/source/Breakpoint/Stoppoint.cpp vendor/lldb/dist/source/Breakpoint/StoppointCallbackContext.cpp vendor/lldb/dist/source/Breakpoint/StoppointLocation.cpp vendor/lldb/dist/source/Breakpoint/Watchpoint.cpp vendor/lldb/dist/source/Breakpoint/WatchpointList.cpp vendor/lldb/dist/source/Breakpoint/WatchpointOptions.cpp vendor/lldb/dist/source/Commands/ vendor/lldb/dist/source/Commands/CommandCompletions.cpp vendor/lldb/dist/source/Commands/CommandObjectApropos.cpp vendor/lldb/dist/source/Commands/CommandObjectApropos.h vendor/lldb/dist/source/Commands/CommandObjectArgs.cpp vendor/lldb/dist/source/Commands/CommandObjectArgs.h vendor/lldb/dist/source/Commands/CommandObjectBreakpoint.cpp vendor/lldb/dist/source/Commands/CommandObjectBreakpoint.h vendor/lldb/dist/source/Commands/CommandObjectBreakpointCommand.cpp vendor/lldb/dist/source/Commands/CommandObjectBreakpointCommand.h vendor/lldb/dist/source/Commands/CommandObjectCommands.cpp vendor/lldb/dist/source/Commands/CommandObjectCommands.h vendor/lldb/dist/source/Commands/CommandObjectDisassemble.cpp vendor/lldb/dist/source/Commands/CommandObjectDisassemble.h vendor/lldb/dist/source/Commands/CommandObjectExpression.cpp vendor/lldb/dist/source/Commands/CommandObjectExpression.h vendor/lldb/dist/source/Commands/CommandObjectFrame.cpp vendor/lldb/dist/source/Commands/CommandObjectFrame.h vendor/lldb/dist/source/Commands/CommandObjectHelp.cpp vendor/lldb/dist/source/Commands/CommandObjectHelp.h vendor/lldb/dist/source/Commands/CommandObjectLog.cpp vendor/lldb/dist/source/Commands/CommandObjectLog.h vendor/lldb/dist/source/Commands/CommandObjectMemory.cpp vendor/lldb/dist/source/Commands/CommandObjectMemory.h vendor/lldb/dist/source/Commands/CommandObjectMultiword.cpp vendor/lldb/dist/source/Commands/CommandObjectPlatform.cpp vendor/lldb/dist/source/Commands/CommandObjectPlatform.h vendor/lldb/dist/source/Commands/CommandObjectPlugin.cpp vendor/lldb/dist/source/Commands/CommandObjectPlugin.h vendor/lldb/dist/source/Commands/CommandObjectProcess.cpp vendor/lldb/dist/source/Commands/CommandObjectProcess.h vendor/lldb/dist/source/Commands/CommandObjectQuit.cpp vendor/lldb/dist/source/Commands/CommandObjectQuit.h vendor/lldb/dist/source/Commands/CommandObjectRegister.cpp vendor/lldb/dist/source/Commands/CommandObjectRegister.h vendor/lldb/dist/source/Commands/CommandObjectSettings.cpp vendor/lldb/dist/source/Commands/CommandObjectSettings.h vendor/lldb/dist/source/Commands/CommandObjectSource.cpp vendor/lldb/dist/source/Commands/CommandObjectSource.h vendor/lldb/dist/source/Commands/CommandObjectSyntax.cpp vendor/lldb/dist/source/Commands/CommandObjectSyntax.h vendor/lldb/dist/source/Commands/CommandObjectTarget.cpp vendor/lldb/dist/source/Commands/CommandObjectTarget.h vendor/lldb/dist/source/Commands/CommandObjectThread.cpp vendor/lldb/dist/source/Commands/CommandObjectThread.h vendor/lldb/dist/source/Commands/CommandObjectType.cpp vendor/lldb/dist/source/Commands/CommandObjectType.h vendor/lldb/dist/source/Commands/CommandObjectVersion.cpp vendor/lldb/dist/source/Commands/CommandObjectVersion.h vendor/lldb/dist/source/Commands/CommandObjectWatchpoint.cpp vendor/lldb/dist/source/Commands/CommandObjectWatchpoint.h vendor/lldb/dist/source/Commands/CommandObjectWatchpointCommand.cpp vendor/lldb/dist/source/Commands/CommandObjectWatchpointCommand.h vendor/lldb/dist/source/Core/ vendor/lldb/dist/source/Core/Address.cpp vendor/lldb/dist/source/Core/AddressRange.cpp vendor/lldb/dist/source/Core/AddressResolver.cpp vendor/lldb/dist/source/Core/AddressResolverFileLine.cpp vendor/lldb/dist/source/Core/AddressResolverName.cpp vendor/lldb/dist/source/Core/ArchSpec.cpp vendor/lldb/dist/source/Core/Baton.cpp vendor/lldb/dist/source/Core/Broadcaster.cpp vendor/lldb/dist/source/Core/Communication.cpp vendor/lldb/dist/source/Core/Connection.cpp vendor/lldb/dist/source/Core/ConnectionFileDescriptor.cpp vendor/lldb/dist/source/Core/ConnectionMachPort.cpp vendor/lldb/dist/source/Core/ConnectionSharedMemory.cpp vendor/lldb/dist/source/Core/ConstString.cpp vendor/lldb/dist/source/Core/DataBufferHeap.cpp vendor/lldb/dist/source/Core/DataBufferMemoryMap.cpp vendor/lldb/dist/source/Core/DataEncoder.cpp vendor/lldb/dist/source/Core/DataExtractor.cpp vendor/lldb/dist/source/Core/Debugger.cpp vendor/lldb/dist/source/Core/Disassembler.cpp vendor/lldb/dist/source/Core/DynamicLoader.cpp vendor/lldb/dist/source/Core/EmulateInstruction.cpp vendor/lldb/dist/source/Core/Error.cpp vendor/lldb/dist/source/Core/Event.cpp vendor/lldb/dist/source/Core/FileLineResolver.cpp vendor/lldb/dist/source/Core/FileSpecList.cpp vendor/lldb/dist/source/Core/History.cpp vendor/lldb/dist/source/Core/InputReader.cpp vendor/lldb/dist/source/Core/InputReaderEZ.cpp vendor/lldb/dist/source/Core/InputReaderStack.cpp vendor/lldb/dist/source/Core/Language.cpp vendor/lldb/dist/source/Core/Listener.cpp vendor/lldb/dist/source/Core/Log.cpp vendor/lldb/dist/source/Core/Mangled.cpp vendor/lldb/dist/source/Core/Module.cpp vendor/lldb/dist/source/Core/ModuleChild.cpp vendor/lldb/dist/source/Core/ModuleList.cpp vendor/lldb/dist/source/Core/Opcode.cpp vendor/lldb/dist/source/Core/PluginManager.cpp vendor/lldb/dist/source/Core/RegisterValue.cpp vendor/lldb/dist/source/Core/RegularExpression.cpp vendor/lldb/dist/source/Core/Scalar.cpp vendor/lldb/dist/source/Core/SearchFilter.cpp vendor/lldb/dist/source/Core/Section.cpp vendor/lldb/dist/source/Core/SourceManager.cpp vendor/lldb/dist/source/Core/State.cpp vendor/lldb/dist/source/Core/Stream.cpp vendor/lldb/dist/source/Core/StreamAsynchronousIO.cpp vendor/lldb/dist/source/Core/StreamCallback.cpp vendor/lldb/dist/source/Core/StreamFile.cpp vendor/lldb/dist/source/Core/StreamString.cpp vendor/lldb/dist/source/Core/StringList.cpp vendor/lldb/dist/source/Core/Timer.cpp vendor/lldb/dist/source/Core/UUID.cpp vendor/lldb/dist/source/Core/UserID.cpp vendor/lldb/dist/source/Core/UserSettingsController.cpp vendor/lldb/dist/source/Core/VMRange.cpp vendor/lldb/dist/source/Core/Value.cpp vendor/lldb/dist/source/Core/ValueObject.cpp vendor/lldb/dist/source/Core/ValueObjectCast.cpp vendor/lldb/dist/source/Core/ValueObjectChild.cpp vendor/lldb/dist/source/Core/ValueObjectConstResult.cpp vendor/lldb/dist/source/Core/ValueObjectConstResultChild.cpp vendor/lldb/dist/source/Core/ValueObjectConstResultImpl.cpp vendor/lldb/dist/source/Core/ValueObjectDynamicValue.cpp vendor/lldb/dist/source/Core/ValueObjectList.cpp vendor/lldb/dist/source/Core/ValueObjectMemory.cpp vendor/lldb/dist/source/Core/ValueObjectRegister.cpp vendor/lldb/dist/source/Core/ValueObjectSyntheticFilter.cpp vendor/lldb/dist/source/Core/ValueObjectVariable.cpp vendor/lldb/dist/source/DataFormatters/ vendor/lldb/dist/source/DataFormatters/CF.cpp vendor/lldb/dist/source/DataFormatters/CXXFormatterFunctions.cpp vendor/lldb/dist/source/DataFormatters/Cocoa.cpp vendor/lldb/dist/source/DataFormatters/DataVisualization.cpp vendor/lldb/dist/source/DataFormatters/FormatCache.cpp vendor/lldb/dist/source/DataFormatters/FormatClasses.cpp vendor/lldb/dist/source/DataFormatters/FormatManager.cpp vendor/lldb/dist/source/DataFormatters/LibCxx.cpp vendor/lldb/dist/source/DataFormatters/LibCxxList.cpp vendor/lldb/dist/source/DataFormatters/LibCxxMap.cpp vendor/lldb/dist/source/DataFormatters/LibStdcpp.cpp vendor/lldb/dist/source/DataFormatters/NSArray.cpp vendor/lldb/dist/source/DataFormatters/NSDictionary.cpp vendor/lldb/dist/source/DataFormatters/NSSet.cpp vendor/lldb/dist/source/DataFormatters/TypeCategory.cpp vendor/lldb/dist/source/DataFormatters/TypeCategoryMap.cpp vendor/lldb/dist/source/DataFormatters/TypeFormat.cpp vendor/lldb/dist/source/DataFormatters/TypeSummary.cpp vendor/lldb/dist/source/DataFormatters/TypeSynthetic.cpp vendor/lldb/dist/source/Expression/ vendor/lldb/dist/source/Expression/ASTDumper.cpp vendor/lldb/dist/source/Expression/ASTResultSynthesizer.cpp vendor/lldb/dist/source/Expression/ASTStructExtractor.cpp vendor/lldb/dist/source/Expression/ClangASTSource.cpp vendor/lldb/dist/source/Expression/ClangExpressionDeclMap.cpp vendor/lldb/dist/source/Expression/ClangExpressionParser.cpp vendor/lldb/dist/source/Expression/ClangExpressionVariable.cpp vendor/lldb/dist/source/Expression/ClangFunction.cpp vendor/lldb/dist/source/Expression/ClangPersistentVariables.cpp vendor/lldb/dist/source/Expression/ClangUserExpression.cpp vendor/lldb/dist/source/Expression/ClangUtilityFunction.cpp vendor/lldb/dist/source/Expression/DWARFExpression.cpp vendor/lldb/dist/source/Expression/ExpressionSourceCode.cpp vendor/lldb/dist/source/Expression/IRDynamicChecks.cpp vendor/lldb/dist/source/Expression/IRExecutionUnit.cpp vendor/lldb/dist/source/Expression/IRForTarget.cpp vendor/lldb/dist/source/Expression/IRInterpreter.cpp vendor/lldb/dist/source/Expression/IRMemoryMap.cpp vendor/lldb/dist/source/Expression/Materializer.cpp vendor/lldb/dist/source/Host/ vendor/lldb/dist/source/Host/common/ vendor/lldb/dist/source/Host/common/Condition.cpp vendor/lldb/dist/source/Host/common/DynamicLibrary.cpp vendor/lldb/dist/source/Host/common/File.cpp vendor/lldb/dist/source/Host/common/FileSpec.cpp vendor/lldb/dist/source/Host/common/Host.cpp vendor/lldb/dist/source/Host/common/Mutex.cpp vendor/lldb/dist/source/Host/common/SocketAddress.cpp vendor/lldb/dist/source/Host/common/Symbols.cpp vendor/lldb/dist/source/Host/common/Terminal.cpp vendor/lldb/dist/source/Host/common/TimeValue.cpp vendor/lldb/dist/source/Host/freebsd/ vendor/lldb/dist/source/Host/freebsd/Host.cpp vendor/lldb/dist/source/Interpreter/ vendor/lldb/dist/source/Interpreter/Args.cpp vendor/lldb/dist/source/Interpreter/CommandHistory.cpp vendor/lldb/dist/source/Interpreter/CommandInterpreter.cpp vendor/lldb/dist/source/Interpreter/CommandObject.cpp vendor/lldb/dist/source/Interpreter/CommandObjectRegexCommand.cpp vendor/lldb/dist/source/Interpreter/CommandObjectScript.cpp vendor/lldb/dist/source/Interpreter/CommandObjectScript.h vendor/lldb/dist/source/Interpreter/CommandReturnObject.cpp vendor/lldb/dist/source/Interpreter/OptionGroupArchitecture.cpp vendor/lldb/dist/source/Interpreter/OptionGroupBoolean.cpp vendor/lldb/dist/source/Interpreter/OptionGroupFile.cpp vendor/lldb/dist/source/Interpreter/OptionGroupFormat.cpp vendor/lldb/dist/source/Interpreter/OptionGroupOutputFile.cpp vendor/lldb/dist/source/Interpreter/OptionGroupPlatform.cpp vendor/lldb/dist/source/Interpreter/OptionGroupString.cpp vendor/lldb/dist/source/Interpreter/OptionGroupUInt64.cpp vendor/lldb/dist/source/Interpreter/OptionGroupUUID.cpp vendor/lldb/dist/source/Interpreter/OptionGroupValueObjectDisplay.cpp vendor/lldb/dist/source/Interpreter/OptionGroupVariable.cpp vendor/lldb/dist/source/Interpreter/OptionGroupWatchpoint.cpp vendor/lldb/dist/source/Interpreter/OptionValue.cpp vendor/lldb/dist/source/Interpreter/OptionValueArch.cpp vendor/lldb/dist/source/Interpreter/OptionValueArgs.cpp vendor/lldb/dist/source/Interpreter/OptionValueArray.cpp vendor/lldb/dist/source/Interpreter/OptionValueBoolean.cpp vendor/lldb/dist/source/Interpreter/OptionValueDictionary.cpp vendor/lldb/dist/source/Interpreter/OptionValueEnumeration.cpp vendor/lldb/dist/source/Interpreter/OptionValueFileSpec.cpp vendor/lldb/dist/source/Interpreter/OptionValueFileSpecLIst.cpp vendor/lldb/dist/source/Interpreter/OptionValueFormat.cpp vendor/lldb/dist/source/Interpreter/OptionValuePathMappings.cpp vendor/lldb/dist/source/Interpreter/OptionValueProperties.cpp vendor/lldb/dist/source/Interpreter/OptionValueRegex.cpp vendor/lldb/dist/source/Interpreter/OptionValueSInt64.cpp vendor/lldb/dist/source/Interpreter/OptionValueString.cpp vendor/lldb/dist/source/Interpreter/OptionValueUInt64.cpp vendor/lldb/dist/source/Interpreter/OptionValueUUID.cpp vendor/lldb/dist/source/Interpreter/Options.cpp vendor/lldb/dist/source/Interpreter/Property.cpp vendor/lldb/dist/source/Interpreter/PythonDataObjects.cpp vendor/lldb/dist/source/Interpreter/ScriptInterpreter.cpp vendor/lldb/dist/source/Interpreter/ScriptInterpreterNone.cpp vendor/lldb/dist/source/Interpreter/ScriptInterpreterPython.cpp vendor/lldb/dist/source/Interpreter/embedded_interpreter.py vendor/lldb/dist/source/Plugins/ vendor/lldb/dist/source/Plugins/ABI/ vendor/lldb/dist/source/Plugins/ABI/MacOSX-arm/ vendor/lldb/dist/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp vendor/lldb/dist/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h vendor/lldb/dist/source/Plugins/ABI/MacOSX-i386/ vendor/lldb/dist/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp vendor/lldb/dist/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h vendor/lldb/dist/source/Plugins/ABI/SysV-x86_64/ vendor/lldb/dist/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp vendor/lldb/dist/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h vendor/lldb/dist/source/Plugins/Disassembler/ vendor/lldb/dist/source/Plugins/Disassembler/llvm/ vendor/lldb/dist/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp vendor/lldb/dist/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h vendor/lldb/dist/source/Plugins/DynamicLoader/ vendor/lldb/dist/source/Plugins/DynamicLoader/POSIX-DYLD/ vendor/lldb/dist/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp vendor/lldb/dist/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.h vendor/lldb/dist/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp vendor/lldb/dist/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.h vendor/lldb/dist/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp vendor/lldb/dist/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h vendor/lldb/dist/source/Plugins/DynamicLoader/Static/ vendor/lldb/dist/source/Plugins/DynamicLoader/Static/DynamicLoaderStatic.cpp vendor/lldb/dist/source/Plugins/DynamicLoader/Static/DynamicLoaderStatic.h vendor/lldb/dist/source/Plugins/Instruction/ vendor/lldb/dist/source/Plugins/Instruction/ARM/ vendor/lldb/dist/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp vendor/lldb/dist/source/Plugins/Instruction/ARM/EmulateInstructionARM.h vendor/lldb/dist/source/Plugins/Instruction/ARM/EmulationStateARM.cpp vendor/lldb/dist/source/Plugins/Instruction/ARM/EmulationStateARM.h vendor/lldb/dist/source/Plugins/LanguageRuntime/ vendor/lldb/dist/source/Plugins/LanguageRuntime/CPlusPlus/ vendor/lldb/dist/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ vendor/lldb/dist/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp vendor/lldb/dist/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h vendor/lldb/dist/source/Plugins/ObjectContainer/ vendor/lldb/dist/source/Plugins/ObjectContainer/BSD-Archive/ vendor/lldb/dist/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp vendor/lldb/dist/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h vendor/lldb/dist/source/Plugins/ObjectFile/ vendor/lldb/dist/source/Plugins/ObjectFile/ELF/ vendor/lldb/dist/source/Plugins/ObjectFile/ELF/ELFHeader.cpp vendor/lldb/dist/source/Plugins/ObjectFile/ELF/ELFHeader.h vendor/lldb/dist/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp vendor/lldb/dist/source/Plugins/ObjectFile/ELF/ObjectFileELF.h vendor/lldb/dist/source/Plugins/OperatingSystem/ vendor/lldb/dist/source/Plugins/OperatingSystem/Python/ vendor/lldb/dist/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp vendor/lldb/dist/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h vendor/lldb/dist/source/Plugins/Platform/ vendor/lldb/dist/source/Plugins/Platform/FreeBSD/ vendor/lldb/dist/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp vendor/lldb/dist/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h vendor/lldb/dist/source/Plugins/Platform/gdb-server/ vendor/lldb/dist/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp vendor/lldb/dist/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h vendor/lldb/dist/source/Plugins/Process/ vendor/lldb/dist/source/Plugins/Process/FreeBSD/ vendor/lldb/dist/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp vendor/lldb/dist/source/Plugins/Process/FreeBSD/ProcessFreeBSD.h vendor/lldb/dist/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp vendor/lldb/dist/source/Plugins/Process/FreeBSD/ProcessMonitor.h vendor/lldb/dist/source/Plugins/Process/POSIX/ vendor/lldb/dist/source/Plugins/Process/POSIX/POSIXStopInfo.cpp vendor/lldb/dist/source/Plugins/Process/POSIX/POSIXStopInfo.h vendor/lldb/dist/source/Plugins/Process/POSIX/POSIXThread.cpp vendor/lldb/dist/source/Plugins/Process/POSIX/POSIXThread.h vendor/lldb/dist/source/Plugins/Process/POSIX/ProcessMessage.cpp vendor/lldb/dist/source/Plugins/Process/POSIX/ProcessMessage.h vendor/lldb/dist/source/Plugins/Process/POSIX/ProcessPOSIX.cpp vendor/lldb/dist/source/Plugins/Process/POSIX/ProcessPOSIX.h vendor/lldb/dist/source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp vendor/lldb/dist/source/Plugins/Process/POSIX/ProcessPOSIXLog.h vendor/lldb/dist/source/Plugins/Process/POSIX/RegisterContextFreeBSD_x86_64.cpp vendor/lldb/dist/source/Plugins/Process/POSIX/RegisterContextFreeBSD_x86_64.h vendor/lldb/dist/source/Plugins/Process/POSIX/RegisterContextLinux_x86_64.cpp vendor/lldb/dist/source/Plugins/Process/POSIX/RegisterContextLinux_x86_64.h vendor/lldb/dist/source/Plugins/Process/POSIX/RegisterContextPOSIX.h vendor/lldb/dist/source/Plugins/Process/POSIX/RegisterContext_i386.cpp vendor/lldb/dist/source/Plugins/Process/POSIX/RegisterContext_i386.h vendor/lldb/dist/source/Plugins/Process/POSIX/RegisterContext_x86.h vendor/lldb/dist/source/Plugins/Process/POSIX/RegisterContext_x86_64.cpp vendor/lldb/dist/source/Plugins/Process/POSIX/RegisterContext_x86_64.h vendor/lldb/dist/source/Plugins/Process/Utility/ vendor/lldb/dist/source/Plugins/Process/Utility/ARMDefines.h vendor/lldb/dist/source/Plugins/Process/Utility/ARMUtils.h vendor/lldb/dist/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp vendor/lldb/dist/source/Plugins/Process/Utility/DynamicRegisterInfo.h vendor/lldb/dist/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp vendor/lldb/dist/source/Plugins/Process/Utility/InferiorCallPOSIX.h vendor/lldb/dist/source/Plugins/Process/Utility/InstructionUtils.h vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextDarwin_arm.h vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextDarwin_i386.h vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.h vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextDummy.cpp vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextDummy.h vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextLLDB.cpp vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextLLDB.h vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.cpp vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.h vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextMach_arm.cpp vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextMach_arm.h vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextMach_i386.cpp vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextMach_i386.h vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextMach_x86_64.cpp vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextMach_x86_64.h vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextMemory.cpp vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextMemory.h vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextThreadMemory.cpp vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextThreadMemory.h vendor/lldb/dist/source/Plugins/Process/Utility/StopInfoMachException.cpp vendor/lldb/dist/source/Plugins/Process/Utility/StopInfoMachException.h vendor/lldb/dist/source/Plugins/Process/Utility/ThreadMemory.cpp vendor/lldb/dist/source/Plugins/Process/Utility/ThreadMemory.h vendor/lldb/dist/source/Plugins/Process/Utility/UnwindLLDB.cpp vendor/lldb/dist/source/Plugins/Process/Utility/UnwindLLDB.h vendor/lldb/dist/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp vendor/lldb/dist/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.h vendor/lldb/dist/source/Plugins/Process/elf-core/ vendor/lldb/dist/source/Plugins/Process/elf-core/ProcessElfCore.cpp vendor/lldb/dist/source/Plugins/Process/elf-core/ProcessElfCore.h vendor/lldb/dist/source/Plugins/Process/elf-core/RegisterContextCoreFreeBSD_x86_64.cpp vendor/lldb/dist/source/Plugins/Process/elf-core/RegisterContextCoreFreeBSD_x86_64.h vendor/lldb/dist/source/Plugins/Process/elf-core/RegisterContextCoreLinux_x86_64.cpp vendor/lldb/dist/source/Plugins/Process/elf-core/RegisterContextCoreLinux_x86_64.h vendor/lldb/dist/source/Plugins/Process/elf-core/ThreadElfCore.cpp vendor/lldb/dist/source/Plugins/Process/elf-core/ThreadElfCore.h vendor/lldb/dist/source/Plugins/Process/gdb-remote/ vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.h vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h vendor/lldb/dist/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h vendor/lldb/dist/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.h vendor/lldb/dist/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/ThreadGDBRemote.h vendor/lldb/dist/source/Plugins/SymbolFile/ vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/ vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.h vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFAttribute.h vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDIECollection.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDIECollection.h vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDebugAbbrev.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDebugAbbrev.h vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.h vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.h vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfo.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfo.h vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfoEntry.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfoEntry.h vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.h vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.h vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.h vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.h vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDefines.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDefines.h vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFLocationDescription.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFLocationDescription.h vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFLocationList.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFLocationList.h vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.h vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/NameToDIE.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/NameToDIE.h vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/UniqueDWARFASTType.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/UniqueDWARFASTType.h vendor/lldb/dist/source/Plugins/SymbolFile/Symtab/ vendor/lldb/dist/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp vendor/lldb/dist/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h vendor/lldb/dist/source/Plugins/SymbolVendor/ vendor/lldb/dist/source/Plugins/SymbolVendor/ELF/ vendor/lldb/dist/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp vendor/lldb/dist/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.h vendor/lldb/dist/source/Plugins/UnwindAssembly/ vendor/lldb/dist/source/Plugins/UnwindAssembly/InstEmulation/ vendor/lldb/dist/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp vendor/lldb/dist/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h vendor/lldb/dist/source/Plugins/UnwindAssembly/x86/ vendor/lldb/dist/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp vendor/lldb/dist/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.h vendor/lldb/dist/source/Symbol/ vendor/lldb/dist/source/Symbol/Block.cpp vendor/lldb/dist/source/Symbol/ClangASTContext.cpp vendor/lldb/dist/source/Symbol/ClangASTImporter.cpp vendor/lldb/dist/source/Symbol/ClangASTType.cpp vendor/lldb/dist/source/Symbol/ClangExternalASTSourceCallbacks.cpp vendor/lldb/dist/source/Symbol/ClangExternalASTSourceCommon.cpp vendor/lldb/dist/source/Symbol/ClangNamespaceDecl.cpp vendor/lldb/dist/source/Symbol/CompileUnit.cpp vendor/lldb/dist/source/Symbol/DWARFCallFrameInfo.cpp vendor/lldb/dist/source/Symbol/Declaration.cpp vendor/lldb/dist/source/Symbol/FuncUnwinders.cpp vendor/lldb/dist/source/Symbol/Function.cpp vendor/lldb/dist/source/Symbol/LineEntry.cpp vendor/lldb/dist/source/Symbol/LineTable.cpp vendor/lldb/dist/source/Symbol/ObjectFile.cpp vendor/lldb/dist/source/Symbol/Symbol.cpp vendor/lldb/dist/source/Symbol/SymbolContext.cpp vendor/lldb/dist/source/Symbol/SymbolFile.cpp vendor/lldb/dist/source/Symbol/SymbolVendor.cpp vendor/lldb/dist/source/Symbol/Symtab.cpp vendor/lldb/dist/source/Symbol/Type.cpp vendor/lldb/dist/source/Symbol/TypeList.cpp vendor/lldb/dist/source/Symbol/UnwindPlan.cpp vendor/lldb/dist/source/Symbol/UnwindTable.cpp vendor/lldb/dist/source/Symbol/Variable.cpp vendor/lldb/dist/source/Symbol/VariableList.cpp vendor/lldb/dist/source/Symbol/VerifyDecl.cpp vendor/lldb/dist/source/Target/ vendor/lldb/dist/source/Target/ABI.cpp vendor/lldb/dist/source/Target/CPPLanguageRuntime.cpp vendor/lldb/dist/source/Target/ExecutionContext.cpp vendor/lldb/dist/source/Target/LanguageRuntime.cpp vendor/lldb/dist/source/Target/Memory.cpp vendor/lldb/dist/source/Target/ObjCLanguageRuntime.cpp vendor/lldb/dist/source/Target/OperatingSystem.cpp vendor/lldb/dist/source/Target/PathMappingList.cpp vendor/lldb/dist/source/Target/Platform.cpp vendor/lldb/dist/source/Target/Process.cpp vendor/lldb/dist/source/Target/RegisterContext.cpp vendor/lldb/dist/source/Target/SectionLoadList.cpp vendor/lldb/dist/source/Target/StackFrame.cpp vendor/lldb/dist/source/Target/StackFrameList.cpp vendor/lldb/dist/source/Target/StackID.cpp vendor/lldb/dist/source/Target/StopInfo.cpp vendor/lldb/dist/source/Target/Target.cpp vendor/lldb/dist/source/Target/TargetList.cpp vendor/lldb/dist/source/Target/Thread.cpp vendor/lldb/dist/source/Target/ThreadList.cpp vendor/lldb/dist/source/Target/ThreadPlan.cpp vendor/lldb/dist/source/Target/ThreadPlanBase.cpp vendor/lldb/dist/source/Target/ThreadPlanCallFunction.cpp vendor/lldb/dist/source/Target/ThreadPlanCallUserExpression.cpp vendor/lldb/dist/source/Target/ThreadPlanRunToAddress.cpp vendor/lldb/dist/source/Target/ThreadPlanShouldStopHere.cpp vendor/lldb/dist/source/Target/ThreadPlanStepInRange.cpp vendor/lldb/dist/source/Target/ThreadPlanStepInstruction.cpp vendor/lldb/dist/source/Target/ThreadPlanStepOut.cpp vendor/lldb/dist/source/Target/ThreadPlanStepOverBreakpoint.cpp vendor/lldb/dist/source/Target/ThreadPlanStepOverRange.cpp vendor/lldb/dist/source/Target/ThreadPlanStepRange.cpp vendor/lldb/dist/source/Target/ThreadPlanStepThrough.cpp vendor/lldb/dist/source/Target/ThreadPlanStepUntil.cpp vendor/lldb/dist/source/Target/ThreadPlanTracer.cpp vendor/lldb/dist/source/Target/ThreadSpec.cpp vendor/lldb/dist/source/Target/UnixSignals.cpp vendor/lldb/dist/source/Target/UnwindAssembly.cpp vendor/lldb/dist/source/Utility/ vendor/lldb/dist/source/Utility/ARM_DWARF_Registers.cpp vendor/lldb/dist/source/Utility/ARM_DWARF_Registers.h vendor/lldb/dist/source/Utility/ARM_GCC_Registers.h vendor/lldb/dist/source/Utility/KQueue.cpp vendor/lldb/dist/source/Utility/KQueue.h vendor/lldb/dist/source/Utility/PseudoTerminal.cpp vendor/lldb/dist/source/Utility/Range.cpp vendor/lldb/dist/source/Utility/RefCounter.cpp vendor/lldb/dist/source/Utility/SharingPtr.cpp vendor/lldb/dist/source/Utility/StringExtractor.cpp vendor/lldb/dist/source/Utility/StringExtractor.h vendor/lldb/dist/source/Utility/StringExtractorGDBRemote.cpp vendor/lldb/dist/source/Utility/StringExtractorGDBRemote.h vendor/lldb/dist/source/Utility/TimeSpecTimeout.cpp vendor/lldb/dist/source/Utility/TimeSpecTimeout.h vendor/lldb/dist/source/Utility/UuidCompatibility.h vendor/lldb/dist/source/lldb-log.cpp vendor/lldb/dist/source/lldb.cpp vendor/lldb/dist/tools/ vendor/lldb/dist/tools/driver/ vendor/lldb/dist/tools/driver/Driver.cpp vendor/lldb/dist/tools/driver/Driver.h vendor/lldb/dist/tools/driver/IOChannel.cpp vendor/lldb/dist/tools/driver/IOChannel.h Added: vendor/lldb/dist/LICENSE.TXT ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/LICENSE.TXT Fri Aug 23 17:46:38 2013 (r254721) @@ -0,0 +1,38 @@ +University of Illinois/NCSA +Open Source License + +Copyright (c) 2010 Apple Inc. +All rights reserved. + +Developed by: + + LLDB Team + + http://lldb.llvm.org/ + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal with +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimers. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimers in the + documentation and/or other materials provided with the distribution. + + * Neither the names of the LLDB Team, copyright holders, nor the names of + its contributors may be used to endorse or promote products derived from + this Software without specific prior written permission. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +SOFTWARE. + Added: vendor/lldb/dist/include/lldb/API/LLDB.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/include/lldb/API/LLDB.h Fri Aug 23 17:46:38 2013 (r254721) @@ -0,0 +1,54 @@ +//===-- LLDB.h --------------------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_LLDB_h_ +#define LLDB_LLDB_h_ + +// C Includes +// C++ Includes +// Other libraries and framework includes +// Project includes +#include "lldb/API/SBDefines.h" +#include "lldb/API/SBAddress.h" +#include "lldb/API/SBBlock.h" +#include "lldb/API/SBBreakpoint.h" +#include "lldb/API/SBBreakpointLocation.h" +#include "lldb/API/SBBroadcaster.h" +#include "lldb/API/SBCommandInterpreter.h" +#include "lldb/API/SBCommandReturnObject.h" +#include "lldb/API/SBCommunication.h" +#include "lldb/API/SBCompileUnit.h" +#include "lldb/API/SBData.h" +#include "lldb/API/SBDebugger.h" +#include "lldb/API/SBDeclaration.h" +#include "lldb/API/SBError.h" +#include "lldb/API/SBEvent.h" +#include "lldb/API/SBFileSpec.h" +#include "lldb/API/SBFrame.h" +#include "lldb/API/SBFunction.h" +#include "lldb/API/SBHostOS.h" +#include "lldb/API/SBInputReader.h" +#include "lldb/API/SBInstruction.h" +#include "lldb/API/SBInstructionList.h" +#include "lldb/API/SBLineEntry.h" +#include "lldb/API/SBListener.h" +#include "lldb/API/SBModule.h" +#include "lldb/API/SBProcess.h" +#include "lldb/API/SBSourceManager.h" +#include "lldb/API/SBStream.h" +#include "lldb/API/SBStringList.h" +#include "lldb/API/SBSymbol.h" +#include "lldb/API/SBSymbolContext.h" +#include "lldb/API/SBTarget.h" +#include "lldb/API/SBThread.h" +#include "lldb/API/SBType.h" +#include "lldb/API/SBValue.h" +#include "lldb/API/SBValueList.h" + +#endif // LLDB_LLDB_h_ Added: vendor/lldb/dist/include/lldb/API/SBAddress.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/include/lldb/API/SBAddress.h Fri Aug 23 17:46:38 2013 (r254721) @@ -0,0 +1,150 @@ +//===-- SBAddress.h ---------------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBAddress_h_ +#define LLDB_SBAddress_h_ + +#include "lldb/API/SBDefines.h" +#include "lldb/API/SBModule.h" + +namespace lldb { + +class SBAddress +{ +public: + + SBAddress (); + + SBAddress (const lldb::SBAddress &rhs); + + SBAddress (lldb::SBSection section, lldb::addr_t offset); + + // Create an address by resolving a load address using the supplied target + SBAddress (lldb::addr_t load_addr, lldb::SBTarget &target); + + ~SBAddress (); + + const lldb::SBAddress & + operator = (const lldb::SBAddress &rhs); + + bool + IsValid () const; + + void + Clear (); + + addr_t + GetFileAddress () const; + + addr_t + GetLoadAddress (const lldb::SBTarget &target) const; + + void + SetAddress (lldb::SBSection section, lldb::addr_t offset); + + void + SetLoadAddress (lldb::addr_t load_addr, + lldb::SBTarget &target); + bool + OffsetAddress (addr_t offset); + + bool + GetDescription (lldb::SBStream &description); + + // The following queries can lookup symbol information for a given address. + // An address might refer to code or data from an existing module, or it + // might refer to something on the stack or heap. The following functions + // will only return valid values if the address has been resolved to a code + // or data address using "void SBAddress::SetLoadAddress(...)" or + // "lldb::SBAddress SBTarget::ResolveLoadAddress (...)". + lldb::SBSymbolContext + GetSymbolContext (uint32_t resolve_scope); + + + // The following functions grab individual objects for a given address and + // are less efficient if you want more than one symbol related objects. + // Use one of the following when you want multiple debug symbol related + // objects for an address: + // lldb::SBSymbolContext SBAddress::GetSymbolContext (uint32_t resolve_scope); + // lldb::SBSymbolContext SBTarget::ResolveSymbolContextForAddress (const SBAddress &addr, uint32_t resolve_scope); + // One or more bits from the SymbolContextItem enumerations can be logically + // OR'ed together to more efficiently retrieve multiple symbol objects. + + lldb::SBSection + GetSection (); + + lldb::addr_t + GetOffset (); + + lldb::SBModule + GetModule (); + + lldb::SBCompileUnit + GetCompileUnit (); + + lldb::SBFunction + GetFunction (); + + lldb::SBBlock + GetBlock (); + + lldb::SBSymbol + GetSymbol (); + + lldb::SBLineEntry + GetLineEntry (); + + lldb::AddressClass + GetAddressClass (); + +protected: + + friend class SBBlock; + friend class SBBreakpointLocation; + friend class SBFrame; + friend class SBFunction; + friend class SBLineEntry; + friend class SBInstruction; + friend class SBModule; + friend class SBSection; + friend class SBSymbol; + friend class SBSymbolContext; + friend class SBTarget; + friend class SBThread; + friend class SBValue; + + lldb_private::Address * + operator->(); + + const lldb_private::Address * + operator->() const; + + lldb_private::Address * + get (); + + lldb_private::Address & + ref(); + + const lldb_private::Address & + ref() const; + + SBAddress (const lldb_private::Address *lldb_object_ptr); + + void + SetAddress (const lldb_private::Address *lldb_object_ptr); + +private: + + std::unique_ptr m_opaque_ap; +}; + + +} // namespace lldb + +#endif // LLDB_SBAddress_h_ Added: vendor/lldb/dist/include/lldb/API/SBBlock.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/include/lldb/API/SBBlock.h Fri Aug 23 17:46:38 2013 (r254721) @@ -0,0 +1,123 @@ +//===-- SBBlock.h -----------------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBBlock_h_ +#define LLDB_SBBlock_h_ + +#include "lldb/API/SBDefines.h" +#include "lldb/API/SBFrame.h" +#include "lldb/API/SBTarget.h" +#include "lldb/API/SBValueList.h" + +namespace lldb { + +class SBBlock +{ +public: + + SBBlock (); + + SBBlock (const lldb::SBBlock &rhs); + + ~SBBlock (); + + const lldb::SBBlock & + operator = (const lldb::SBBlock &rhs); + + bool + IsInlined () const; + + bool + IsValid () const; + + const char * + GetInlinedName () const; + + lldb::SBFileSpec + GetInlinedCallSiteFile () const; + + uint32_t + GetInlinedCallSiteLine () const; + + uint32_t + GetInlinedCallSiteColumn () const; + + lldb::SBBlock + GetParent (); + + lldb::SBBlock + GetSibling (); + + lldb::SBBlock + GetFirstChild (); + + uint32_t + GetNumRanges (); + + lldb::SBAddress + GetRangeStartAddress (uint32_t idx); + + lldb::SBAddress + GetRangeEndAddress (uint32_t idx); + + uint32_t + GetRangeIndexForBlockAddress (lldb::SBAddress block_addr); + + lldb::SBValueList + GetVariables (lldb::SBFrame& frame, + bool arguments, + bool locals, + bool statics, + lldb::DynamicValueType use_dynamic); + + lldb::SBValueList + GetVariables (lldb::SBTarget& target, + bool arguments, + bool locals, + bool statics); + //------------------------------------------------------------------ + /// Get the inlined block that contains this block. + /// + /// @return + /// If this block is inlined, it will return this block, else + /// parent blocks will be searched to see if any contain this + /// block and are themselves inlined. An invalid SBBlock will + /// be returned if this block nor any parent blocks are inlined + /// function blocks. + //------------------------------------------------------------------ + lldb::SBBlock + GetContainingInlinedBlock (); + + bool + GetDescription (lldb::SBStream &description); + +private: + friend class SBAddress; + friend class SBFrame; + friend class SBFunction; + friend class SBSymbolContext; + + lldb_private::Block * + GetPtr (); + + void + SetPtr (lldb_private::Block *lldb_object_ptr); + + SBBlock (lldb_private::Block *lldb_object_ptr); + + void + AppendVariables (bool can_create, bool get_parent_variables, lldb_private::VariableList *var_list); + + lldb_private::Block *m_opaque_ptr; +}; + + +} // namespace lldb + +#endif // LLDB_SBBlock_h_ Added: vendor/lldb/dist/include/lldb/API/SBBreakpoint.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/include/lldb/API/SBBreakpoint.h Fri Aug 23 17:46:38 2013 (r254721) @@ -0,0 +1,175 @@ +//===-- SBBreakpoint.h ------------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBBreakpoint_h_ +#define LLDB_SBBreakpoint_h_ + +#include "lldb/API/SBDefines.h" + +namespace lldb { + +class SBBreakpoint +{ +public: + + typedef bool (*BreakpointHitCallback) (void *baton, + SBProcess &process, + SBThread &thread, + lldb::SBBreakpointLocation &location); + + SBBreakpoint (); + + SBBreakpoint (const lldb::SBBreakpoint& rhs); + + ~SBBreakpoint(); + + const lldb::SBBreakpoint & + operator = (const lldb::SBBreakpoint& rhs); + + // Tests to see if the opaque breakpoint object in this object matches the + // opaque breakpoint object in "rhs". + bool + operator == (const lldb::SBBreakpoint& rhs); + + bool + operator != (const lldb::SBBreakpoint& rhs); + + break_id_t + GetID () const; + + bool + IsValid() const; + + void + ClearAllBreakpointSites (); + + lldb::SBBreakpointLocation + FindLocationByAddress (lldb::addr_t vm_addr); + + lldb::break_id_t + FindLocationIDByAddress (lldb::addr_t vm_addr); + + lldb::SBBreakpointLocation + FindLocationByID (lldb::break_id_t bp_loc_id); + + lldb::SBBreakpointLocation + GetLocationAtIndex (uint32_t index); + + void + SetEnabled (bool enable); + + bool + IsEnabled (); + + void + SetOneShot (bool one_shot); + + bool + IsOneShot () const; + + bool + IsInternal (); + + uint32_t + GetHitCount () const; + + void + SetIgnoreCount (uint32_t count); + + uint32_t + GetIgnoreCount () const; + + void + SetCondition (const char *condition); + + const char * + GetCondition (); + + void + SetThreadID (lldb::tid_t sb_thread_id); + + lldb::tid_t + GetThreadID (); + + void + SetThreadIndex (uint32_t index); + + uint32_t + GetThreadIndex() const; + + void + SetThreadName (const char *thread_name); + + const char * + GetThreadName () const; + + void + SetQueueName (const char *queue_name); + + const char * + GetQueueName () const; + + void + SetCallback (BreakpointHitCallback callback, void *baton); + + size_t + GetNumResolvedLocations() const; + + size_t + GetNumLocations() const; + + bool + GetDescription (lldb::SBStream &description); + + static bool + EventIsBreakpointEvent (const lldb::SBEvent &event); + + static lldb::BreakpointEventType + GetBreakpointEventTypeFromEvent (const lldb::SBEvent& event); + + static lldb::SBBreakpoint + GetBreakpointFromEvent (const lldb::SBEvent& event); + + static lldb::SBBreakpointLocation + GetBreakpointLocationAtIndexFromEvent (const lldb::SBEvent& event, uint32_t loc_idx); + + static uint32_t + GetNumBreakpointLocationsFromEvent (const lldb::SBEvent &event_sp); + + +private: + friend class SBBreakpointLocation; + friend class SBTarget; + + SBBreakpoint (const lldb::BreakpointSP &bp_sp); + + lldb_private::Breakpoint * + operator->() const; + + lldb_private::Breakpoint * + get() const; + + lldb::BreakpointSP & + operator *(); + + const lldb::BreakpointSP & + operator *() const; + + static bool + PrivateBreakpointHitCallback (void *baton, + lldb_private::StoppointCallbackContext *context, + lldb::user_id_t break_id, + lldb::user_id_t break_loc_id); + + lldb::BreakpointSP m_opaque_sp; +}; + +} // namespace lldb + +#endif // LLDB_SBBreakpoint_h_ Added: vendor/lldb/dist/include/lldb/API/SBBreakpointLocation.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/include/lldb/API/SBBreakpointLocation.h Fri Aug 23 17:46:38 2013 (r254721) @@ -0,0 +1,110 @@ +//===-- SBBreakpointLocation.h ----------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBBreakpointLocation_h_ +#define LLDB_SBBreakpointLocation_h_ + +#include "lldb/API/SBDefines.h" +#include "lldb/API/SBBreakpoint.h" + +namespace lldb { + +class SBBreakpointLocation +{ +public: + + SBBreakpointLocation (); + + SBBreakpointLocation (const lldb::SBBreakpointLocation &rhs); + + ~SBBreakpointLocation (); + + const lldb::SBBreakpointLocation & + operator = (const lldb::SBBreakpointLocation &rhs); + + break_id_t + GetID (); + + bool + IsValid() const; + + lldb::SBAddress + GetAddress (); + + lldb::addr_t + GetLoadAddress (); + + void + SetEnabled(bool enabled); + + bool + IsEnabled (); + + uint32_t + GetIgnoreCount (); + + void + SetIgnoreCount (uint32_t n); + + void + SetCondition (const char *condition); + + const char * + GetCondition (); + + void + SetThreadID (lldb::tid_t sb_thread_id); + + lldb::tid_t + GetThreadID (); + + void + SetThreadIndex (uint32_t index); + + uint32_t + GetThreadIndex() const; + + void + SetThreadName (const char *thread_name); + + const char * + GetThreadName () const; + + void + SetQueueName (const char *queue_name); + + const char * + GetQueueName () const; + + bool + IsResolved (); + + bool + GetDescription (lldb::SBStream &description, DescriptionLevel level); + + SBBreakpoint + GetBreakpoint (); + + SBBreakpointLocation (const lldb::BreakpointLocationSP &break_loc_sp); + +private: + friend class SBBreakpoint; +#ifndef LLDB_DISABLE_PYTHON + friend class lldb_private::ScriptInterpreterPython; +#endif + void + SetLocation (const lldb::BreakpointLocationSP &break_loc_sp); + + lldb::BreakpointLocationSP m_opaque_sp; + +}; + +} // namespace lldb + +#endif // LLDB_SBBreakpointLocation_h_ Added: vendor/lldb/dist/include/lldb/API/SBBroadcaster.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/include/lldb/API/SBBroadcaster.h Fri Aug 23 17:46:38 2013 (r254721) @@ -0,0 +1,97 @@ +//===-- SBBroadcaster.h -----------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBBroadcaster_h_ +#define LLDB_SBBroadcaster_h_ + +#include "lldb/API/SBDefines.h" + +namespace lldb { + +class SBBroadcaster +{ +public: + SBBroadcaster (); + + SBBroadcaster (const char *name); + + SBBroadcaster (const SBBroadcaster &rhs); + + const SBBroadcaster & + operator = (const SBBroadcaster &rhs); + + ~SBBroadcaster(); + + bool + IsValid () const; + + void + Clear (); + + void + BroadcastEventByType (uint32_t event_type, bool unique = false); + + void + BroadcastEvent (const lldb::SBEvent &event, bool unique = false); + + void + AddInitialEventsToListener (const lldb::SBListener &listener, uint32_t requested_events); + + uint32_t + AddListener (const lldb::SBListener &listener, uint32_t event_mask); + + const char * + GetName () const; + + bool + EventTypeHasListeners (uint32_t event_type); + + bool + RemoveListener (const lldb::SBListener &listener, uint32_t event_mask = UINT32_MAX); + + // This comparison is checking if the internal opaque pointer value + // is equal to that in "rhs". + bool + operator == (const lldb::SBBroadcaster &rhs) const; + + // This comparison is checking if the internal opaque pointer value + // is not equal to that in "rhs". + bool + operator != (const lldb::SBBroadcaster &rhs) const; + + // This comparison is checking if the internal opaque pointer value + // is less than that in "rhs" so SBBroadcaster objects can be contained + // in ordered containers. + bool + operator < (const lldb::SBBroadcaster &rhs) const; + +protected: + friend class SBCommandInterpreter; + friend class SBCommunication; + friend class SBEvent; + friend class SBListener; + friend class SBProcess; + friend class SBTarget; + + SBBroadcaster (lldb_private::Broadcaster *broadcaster, bool owns); + + lldb_private::Broadcaster * + get () const; + + void + reset (lldb_private::Broadcaster *broadcaster, bool owns); + +private: + lldb::BroadcasterSP m_opaque_sp; + lldb_private::Broadcaster *m_opaque_ptr; +}; + +} // namespace lldb + +#endif // LLDB_SBBroadcaster_h_ Added: vendor/lldb/dist/include/lldb/API/SBCommandInterpreter.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/include/lldb/API/SBCommandInterpreter.h Fri Aug 23 17:46:38 2013 (r254721) @@ -0,0 +1,193 @@ +//===-- SBCommandInterpreter.h ----------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBCommandInterpreter_h_ +#define LLDB_SBCommandInterpreter_h_ + +#include "lldb/API/SBDefines.h" +#include "lldb/API/SBDebugger.h" + +namespace lldb { + +class SBCommandInterpreter +{ +public: + enum + { + eBroadcastBitThreadShouldExit = (1 << 0), + eBroadcastBitResetPrompt = (1 << 1), + eBroadcastBitQuitCommandReceived = (1 << 2), // User entered quit + eBroadcastBitAsynchronousOutputData = (1 << 3), + eBroadcastBitAsynchronousErrorData = (1 << 4) + }; + + SBCommandInterpreter (const lldb::SBCommandInterpreter &rhs); + + const lldb::SBCommandInterpreter & + operator = (const lldb::SBCommandInterpreter &rhs); + + ~SBCommandInterpreter (); + + static const char * + GetArgumentTypeAsCString (const lldb::CommandArgumentType arg_type); + + static const char * + GetArgumentDescriptionAsCString (const lldb::CommandArgumentType arg_type); + + bool + IsValid() const; + + bool + CommandExists (const char *cmd); + + bool + AliasExists (const char *cmd); + + lldb::SBBroadcaster + GetBroadcaster (); + + static const char * + GetBroadcasterClass (); + + bool + HasCommands (); + + bool + HasAliases (); + + bool + HasAliasOptions (); + + lldb::SBProcess + GetProcess (); + + lldb::SBDebugger + GetDebugger (); + + lldb::SBCommand + AddMultiwordCommand (const char* name, const char* help); + + lldb::SBCommand + AddCommand (const char* name, lldb::SBCommandPluginInterface *impl, const char* help); + + void + SourceInitFileInHomeDirectory (lldb::SBCommandReturnObject &result); + + void + SourceInitFileInCurrentWorkingDirectory (lldb::SBCommandReturnObject &result); + + lldb::ReturnStatus + HandleCommand (const char *command_line, lldb::SBCommandReturnObject &result, bool add_to_history = false); + + // The pointer based interface is not useful in SWIG, since the cursor & last_char arguments are string pointers INTO current_line + // and you can't do that in a scripting language interface in general... + + // In either case, the way this works is that the you give it a line and cursor position in the line. The function + // will return the number of completions. The matches list will contain number_of_completions + 1 elements. The first + // element is the common substring after the cursor position for all the matches. The rest of the elements are the + // matches. The first element is useful if you are emulating the common shell behavior where the tab completes + // to the string that is common among all the matches, then you should first check if the first element is non-empty, + // and if so just insert it and move the cursor to the end of the insertion. The next tab will return an empty + // common substring, and a list of choices (if any), at which point you should display the choices and let the user + // type further to disambiguate. + + int + HandleCompletion (const char *current_line, + const char *cursor, + const char *last_char, + int match_start_point, + int max_return_elements, + lldb::SBStringList &matches); + + int + HandleCompletion (const char *current_line, + uint32_t cursor_pos, + int match_start_point, + int max_return_elements, + lldb::SBStringList &matches); + + // Catch commands before they execute by registering a callback that will + // get called when the command gets executed. This allows GUI or command + // line interfaces to intercept a command and stop it from happening + bool + SetCommandOverrideCallback (const char *command_name, + lldb::CommandOverrideCallback callback, + void *baton); + + SBCommandInterpreter (lldb_private::CommandInterpreter *interpreter_ptr = NULL); // Access using SBDebugger::GetCommandInterpreter(); + +protected: + + lldb_private::CommandInterpreter & + ref (); + + lldb_private::CommandInterpreter * + get (); + + void + reset (lldb_private::CommandInterpreter *); +private: + friend class SBDebugger; + + static void + InitializeSWIG (); + + lldb_private::CommandInterpreter *m_opaque_ptr; +}; + +class SBCommandPluginInterface +{ +public: + virtual bool + DoExecute (lldb::SBDebugger debugger, + char** command, + lldb::SBCommandReturnObject &result) + { + return false; + } + + virtual + ~SBCommandPluginInterface () + {} +}; + +class SBCommand +{ +public: + + SBCommand (); + + bool + IsValid (); + + const char* + GetName (); + + const char* + GetHelp (); + + lldb::SBCommand + AddMultiwordCommand (const char* name, const char* help = NULL); + + lldb::SBCommand + AddCommand (const char* name, lldb::SBCommandPluginInterface* impl, const char* help = NULL); + +private: + + friend class SBDebugger; + friend class SBCommandInterpreter; + + SBCommand (lldb::CommandObjectSP cmd_sp); + + lldb::CommandObjectSP m_opaque_sp; +}; + +} // namespace lldb + +#endif // LLDB_SBCommandInterpreter_h_ Added: vendor/lldb/dist/include/lldb/API/SBCommandReturnObject.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/include/lldb/API/SBCommandReturnObject.h Fri Aug 23 17:46:38 2013 (r254721) @@ -0,0 +1,133 @@ +//===-- SBCommandReturnObject.h ---------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBCommandReturnObject_h_ +#define LLDB_SBCommandReturnObject_h_ + +#include + +#include "lldb/API/SBDefines.h" + +namespace lldb { + +class SBCommandReturnObject +{ +public: + + SBCommandReturnObject (); + + SBCommandReturnObject (const lldb::SBCommandReturnObject &rhs); + + const lldb::SBCommandReturnObject & + operator = (const lldb::SBCommandReturnObject &rhs); + + + SBCommandReturnObject (lldb_private::CommandReturnObject *ptr); + + lldb_private::CommandReturnObject * *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Fri Aug 23 17:52:02 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 36BC5576; Fri, 23 Aug 2013 17:52:02 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0A65C274A; Fri, 23 Aug 2013 17:52:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7NHq1gr090789; Fri, 23 Aug 2013 17:52:01 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7NHq14u090788; Fri, 23 Aug 2013 17:52:01 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201308231752.r7NHq14u090788@svn.freebsd.org> From: Ed Maste Date: Fri, 23 Aug 2013 17:52:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r254723 - vendor/lldb/lldb-r188801 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Aug 2013 17:52:02 -0000 Author: emaste Date: Fri Aug 23 17:52:01 2013 New Revision: 254723 URL: http://svnweb.freebsd.org/changeset/base/254723 Log: Tag (stripped) lldb r188801 Added: vendor/lldb/lldb-r188801/ - copied from r254722, vendor/lldb/dist/ From owner-svn-src-vendor@FreeBSD.ORG Fri Aug 23 18:02:03 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 06572775; Fri, 23 Aug 2013 18:02:03 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E4BE827DB; Fri, 23 Aug 2013 18:02:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7NI22v4095859; Fri, 23 Aug 2013 18:02:02 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7NI1wPv095805; Fri, 23 Aug 2013 18:01:58 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201308231801.r7NI1wPv095805@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 23 Aug 2013 18:01:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r254724 - in vendor-sys/acpica/dist: . generate/unix/acpidump source/common source/compiler source/components/debugger source/components/events source/components/hardware source/compone... X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Aug 2013 18:02:03 -0000 Author: jkim Date: Fri Aug 23 18:01:58 2013 New Revision: 254724 URL: http://svnweb.freebsd.org/changeset/base/254724 Log: Import ACPICA 20130823. Added: vendor-sys/acpica/dist/source/os_specific/service_layers/osunixmap.c (contents, props changed) Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/generate/unix/acpidump/Makefile vendor-sys/acpica/dist/source/common/adisasm.c vendor-sys/acpica/dist/source/common/adwalk.c vendor-sys/acpica/dist/source/common/dmextern.c vendor-sys/acpica/dist/source/common/dmtable.c vendor-sys/acpica/dist/source/compiler/aslcompile.c vendor-sys/acpica/dist/source/compiler/aslglobal.h vendor-sys/acpica/dist/source/compiler/aslload.c vendor-sys/acpica/dist/source/compiler/aslmain.c vendor-sys/acpica/dist/source/compiler/asloptions.c vendor-sys/acpica/dist/source/compiler/dtcompile.c vendor-sys/acpica/dist/source/components/debugger/dbcmds.c vendor-sys/acpica/dist/source/components/debugger/dbfileio.c vendor-sys/acpica/dist/source/components/debugger/dbinput.c vendor-sys/acpica/dist/source/components/debugger/dbnames.c vendor-sys/acpica/dist/source/components/events/evgpeutil.c vendor-sys/acpica/dist/source/components/events/evmisc.c vendor-sys/acpica/dist/source/components/events/evregion.c vendor-sys/acpica/dist/source/components/events/evsci.c vendor-sys/acpica/dist/source/components/events/evxface.c vendor-sys/acpica/dist/source/components/hardware/hwxface.c vendor-sys/acpica/dist/source/components/namespace/nsaccess.c vendor-sys/acpica/dist/source/components/namespace/nsdump.c vendor-sys/acpica/dist/source/components/namespace/nsxfeval.c vendor-sys/acpica/dist/source/components/tables/tbinstal.c vendor-sys/acpica/dist/source/components/tables/tbprint.c vendor-sys/acpica/dist/source/components/tables/tbxfroot.c vendor-sys/acpica/dist/source/components/utilities/utdebug.c vendor-sys/acpica/dist/source/components/utilities/utglobal.c vendor-sys/acpica/dist/source/include/acdebug.h vendor-sys/acpica/dist/source/include/acdisasm.h vendor-sys/acpica/dist/source/include/acevents.h vendor-sys/acpica/dist/source/include/acexcep.h vendor-sys/acpica/dist/source/include/acglobal.h vendor-sys/acpica/dist/source/include/aclocal.h vendor-sys/acpica/dist/source/include/acnamesp.h vendor-sys/acpica/dist/source/include/acpiosxf.h vendor-sys/acpica/dist/source/include/acpixf.h vendor-sys/acpica/dist/source/include/actypes.h vendor-sys/acpica/dist/source/include/platform/aclinux.h vendor-sys/acpica/dist/source/os_specific/service_layers/osfreebsdtbl.c vendor-sys/acpica/dist/source/os_specific/service_layers/oslinuxtbl.c vendor-sys/acpica/dist/source/os_specific/service_layers/osunixdir.c vendor-sys/acpica/dist/source/os_specific/service_layers/osunixxf.c vendor-sys/acpica/dist/source/os_specific/service_layers/oswintbl.c vendor-sys/acpica/dist/source/os_specific/service_layers/oswinxf.c vendor-sys/acpica/dist/source/tools/acpibin/abmain.c vendor-sys/acpica/dist/source/tools/acpidump/acpidump.h vendor-sys/acpica/dist/source/tools/acpidump/apdump.c vendor-sys/acpica/dist/source/tools/acpidump/apfiles.c vendor-sys/acpica/dist/source/tools/acpidump/apmain.c vendor-sys/acpica/dist/source/tools/acpiexec/aehandlers.c vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c vendor-sys/acpica/dist/source/tools/acpiexec/aetables.c vendor-sys/acpica/dist/source/tools/acpihelp/ahmain.c vendor-sys/acpica/dist/source/tools/acpinames/anmain.c vendor-sys/acpica/dist/source/tools/acpinames/antables.c vendor-sys/acpica/dist/source/tools/acpisrc/asmain.c vendor-sys/acpica/dist/source/tools/acpisrc/astable.c vendor-sys/acpica/dist/source/tools/acpixtract/axmain.c vendor-sys/acpica/dist/tests/misc/grammar.asl Modified: vendor-sys/acpica/dist/changes.txt ============================================================================== --- vendor-sys/acpica/dist/changes.txt Fri Aug 23 17:52:01 2013 (r254723) +++ vendor-sys/acpica/dist/changes.txt Fri Aug 23 18:01:58 2013 (r254724) @@ -1,4 +1,88 @@ ---------------------------------------- +23 August 2013. Summary of changes for version 20130823: + +1) ACPICA kernel-resident subsystem: + +Implemented support for host-installed System Control Interrupt (SCI) +handlers. Certain ACPI functionality requires the host to handle raw +SCIs. For example, the "SCI Doorbell" that is defined for memory power +state support requires the host device driver to handle SCIs to examine +if the doorbell has been activated. Multiple SCI handlers can be +installed to allow for future expansion. New external interfaces are +AcpiInstallSciHandler, AcpiRemoveSciHandler; see the ACPICA reference for +details. Lv Zheng, Bob Moore. ACPICA BZ 1032. + +Operation region support: Never locally free the handler "context" +pointer. This change removes some dangerous code that attempts to free +the handler context pointer in some (rare) circumstances. The owner of +the handler owns this pointer and the ACPICA code should never touch it. +Although not seen to be an issue in any kernel, it did show up as a +problem (fault) under AcpiExec. Also, set the internal storage field for +the context pointer to zero when the region is deactivated, simply for +sanity. David Box. ACPICA BZ 1039. + +AcpiRead: On error, do not modify the return value target location. If an +error happens in the middle of a split 32/32 64-bit I/O operation, do not +modify the target of the return value pointer. Makes the code consistent +with the rest of ACPICA. Bjorn Helgaas. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 96.7K Code, 27.1K Data, 123.9K Total + Debug Version: 184.4K Code, 76.8K Data, 261.2K Total + Previous Release: + Non-Debug Version: 96.2K Code, 27.1K Data, 123.3K Total + Debug Version: 185.4K Code, 77.1K Data, 262.5K Total + + +2) iASL Compiler/Disassembler and Tools: + +AcpiDump: Implemented several new features and fixed some problems: +1) Added support to dump the RSDP, RSDT, and XSDT tables. +2) Added support for multiple table instances (SSDT, UEFI). +3) Added option to dump "customized" (overridden) tables (-c). +4) Fixed a problem where some table filenames were improperly +constructed. +5) Improved some error messages, removed some unnecessary messages. + +iASL: Implemented additional support for disassembly of ACPI tables that +contain invocations of external control methods. The -fe option +allows the import of a file that specifies the external methods along +with the required number of arguments for each -- allowing for the +correct disassembly of the table. This is a workaround for a limitation +of AML code where the disassembler often cannot determine the number of +arguments required for an external control method and generates incorrect +ASL code. See the iASL reference for details. ACPICA BZ 1030. + +Debugger: Implemented a new command (paths) that displays the full +pathnames (namepaths) and object types of all objects in the namespace. +This is an alternative to the namespace command. + +Debugger: Implemented a new command (sci) that invokes the SCI dispatch +mechanism and any installed handlers. + +iASL: Fixed a possible segfault for "too many parent prefixes" condition. +This can occur if there are too many parent prefixes in a namepath (for +example, ^^^^^^PCI0.ECRD). ACPICA BZ 1035. + +Application OSLs: Set the return value for the PCI read functions. These +functions simply return AE_OK, but should set the return value to zero +also. This change implements this. ACPICA BZ 1038. + +Debugger: Prevent possible command line buffer overflow. Increase the +size of a couple of the debugger line buffers, and ensure that overflow +cannot happen. ACPICA BZ 1037. + +iASL: Changed to abort immediately on serious errors during the parsing +phase. Due to the nature of ASL, there is no point in attempting to +compile these types of errors, and they typically end up causing a +cascade of hundreds of errors which obscure the original problem. + +---------------------------------------- 25 July 2013. Summary of changes for version 20130725: 1) ACPICA kernel-resident subsystem: Modified: vendor-sys/acpica/dist/generate/unix/acpidump/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/acpidump/Makefile Fri Aug 23 17:52:01 2013 (r254723) +++ vendor-sys/acpica/dist/generate/unix/acpidump/Makefile Fri Aug 23 18:01:58 2013 (r254724) @@ -31,6 +31,8 @@ OBJECTS = \ $(OBJDIR)/apdump.o\ $(OBJDIR)/apfiles.o\ $(OBJDIR)/apmain.o\ + $(OBJDIR)/osunixdir.o\ + $(OBJDIR)/osunixmap.o\ $(OBJDIR)/tbprint.o\ $(OBJDIR)/tbxfroot.o\ $(OBJDIR)/utbuffer.o\ Modified: vendor-sys/acpica/dist/source/common/adisasm.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adisasm.c Fri Aug 23 17:52:01 2013 (r254723) +++ vendor-sys/acpica/dist/source/common/adisasm.c Fri Aug 23 18:01:58 2013 (r254724) @@ -341,6 +341,10 @@ AdAmlDisassemble ( { AcpiDmClearExternalList (); } + + /* Load any externals defined in the optional external ref file */ + + AcpiDmGetExternalsFromFile (); } else { Modified: vendor-sys/acpica/dist/source/common/adwalk.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adwalk.c Fri Aug 23 17:52:01 2013 (r254723) +++ vendor-sys/acpica/dist/source/common/adwalk.c Fri Aug 23 18:01:58 2013 (r254724) @@ -373,10 +373,18 @@ AcpiDmDumpDescending ( switch (Op->Common.AmlOpcode) { case AML_BYTE_OP: + + AcpiOsPrintf ("%2.2X", (UINT32) Op->Common.Value.Integer); + break; + case AML_WORD_OP: + + AcpiOsPrintf ("%4.4X", (UINT32) Op->Common.Value.Integer); + break; + case AML_DWORD_OP: - AcpiOsPrintf ("%X", (UINT32) Op->Common.Value.Integer); + AcpiOsPrintf ("%8.8X", (UINT32) Op->Common.Value.Integer); break; case AML_QWORD_OP: Modified: vendor-sys/acpica/dist/source/common/dmextern.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmextern.c Fri Aug 23 17:52:01 2013 (r254723) +++ vendor-sys/acpica/dist/source/common/dmextern.c Fri Aug 23 18:01:58 2013 (r254724) @@ -46,7 +46,9 @@ #include "amlcode.h" #include "acnamesp.h" #include "acdisasm.h" +#include "aslcompiler.h" #include +#include /* @@ -87,6 +89,8 @@ static const char *AcpiGbl_DmT /* 19 */ ", FieldUnitObj" }; +#define METHOD_SEPARATORS " \t,()\n" + /* Local prototypes */ @@ -99,6 +103,12 @@ AcpiDmNormalizeParentPrefix ( ACPI_PARSE_OBJECT *Op, char *Path); +static void +AcpiDmAddToExternalListFromFile ( + char *Path, + UINT8 Type, + UINT32 Value); + /******************************************************************************* * @@ -444,7 +454,7 @@ AcpiDmAddToExternalList ( (NextExternal->Value != Value)) { ACPI_ERROR ((AE_INFO, - "Argument count mismatch for method %s %u %u", + "External method arg count mismatch %s: Current %u, attempted %u", NextExternal->Path, NextExternal->Value, Value)); } @@ -536,6 +546,275 @@ AcpiDmAddToExternalList ( /******************************************************************************* * + * FUNCTION: AcpiDmGetExternalsFromFile + * + * PARAMETERS: None + * + * RETURN: None + * + * DESCRIPTION: Process the optional external reference file. + * + * Each line in the file should be of the form: + * External (, MethodObj, ) + * + * Example: + * External (_SB_.PCI0.XHC_.PS0X, MethodObj, 4) + * + ******************************************************************************/ + +void +AcpiDmGetExternalsFromFile ( + void) +{ + FILE *ExternalRefFile; + char *Token; + char *MethodName; + UINT32 ArgCount; + UINT32 ImportCount = 0; + + + if (!Gbl_ExternalRefFilename) + { + return; + } + + /* Open the file */ + + ExternalRefFile = fopen (Gbl_ExternalRefFilename, "r"); + if (!ExternalRefFile) + { + fprintf (stderr, "Could not open external reference file \"%s\"\n", + Gbl_ExternalRefFilename); + return; + } + + /* Each line defines a method */ + + while (fgets (StringBuffer, ASL_MSG_BUFFER_SIZE, ExternalRefFile)) + { + Token = strtok (StringBuffer, METHOD_SEPARATORS); /* "External" */ + if (!Token) continue; + if (strcmp (Token, "External")) continue; + + MethodName = strtok (NULL, METHOD_SEPARATORS); /* Method namepath */ + if (!MethodName) continue; + + Token = strtok (NULL, METHOD_SEPARATORS); /* "MethodObj" */ + if (!Token) continue; + if (strcmp (Token, "MethodObj")) continue; + + Token = strtok (NULL, METHOD_SEPARATORS); /* Arg count */ + if (!Token) continue; + + /* Convert arg count string to an integer */ + + errno = 0; + ArgCount = strtoul (Token, NULL, 0); + if (errno) + { + fprintf (stderr, "Invalid argument count (%s)\n", Token); + continue; + } + if (ArgCount > 7) + { + fprintf (stderr, "Invalid argument count (%u)\n", ArgCount); + continue; + } + + /* Add this external to the global list */ + + AcpiOsPrintf ("%s: Importing method external (%u arguments) %s\n", + Gbl_ExternalRefFilename, ArgCount, MethodName); + + AcpiDmAddToExternalListFromFile (MethodName, ACPI_TYPE_METHOD, ArgCount | 0x80); + ImportCount++; + } + + if (!ImportCount) + { + fprintf (stderr, "Did not find any external methods in reference file \"%s\"\n", + Gbl_ExternalRefFilename); + } + else + { + /* Add the external(s) to the namespace */ + + AcpiDmAddExternalsToNamespace (); + + AcpiOsPrintf ("%s: Imported %u external method definitions\n", + Gbl_ExternalRefFilename, ImportCount); + } + + fclose (ExternalRefFile); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiDmAddToExternalListFromFile + * + * PARAMETERS: Path - Internal (AML) path to the object + * Type - ACPI object type to be added + * Value - Arg count if adding a Method object + * + * RETURN: None + * + * DESCRIPTION: Insert a new name into the global list of Externals which + * will in turn be later emitted as an External() declaration + * in the disassembled output. + * + ******************************************************************************/ + +static void +AcpiDmAddToExternalListFromFile ( + char *Path, + UINT8 Type, + UINT32 Value) +{ + char *InternalPath; + char *ExternalPath; + ACPI_EXTERNAL_LIST *NewExternal; + ACPI_EXTERNAL_LIST *NextExternal; + ACPI_EXTERNAL_LIST *PrevExternal = NULL; + ACPI_STATUS Status; + BOOLEAN Resolved = FALSE; + + + if (!Path) + { + return; + } + + /* TBD: Add a flags parameter */ + + if (Type == ACPI_TYPE_METHOD) + { + if (Value & 0x80) + { + Resolved = TRUE; + } + Value &= 0x07; + } + + /* + * We don't want External() statements to contain a leading '\'. + * This prevents duplicate external statements of the form: + * + * External (\ABCD) + * External (ABCD) + * + * This would cause a compile time error when the disassembled + * output file is recompiled. + */ + if ((*Path == AML_ROOT_PREFIX) && (Path[1])) + { + Path++; + } + + /* Check all existing externals to ensure no duplicates */ + + NextExternal = AcpiGbl_ExternalList; + while (NextExternal) + { + if (!ACPI_STRCMP (Path, NextExternal->Path)) + { + /* Duplicate method, check that the Value (ArgCount) is the same */ + + if ((NextExternal->Type == ACPI_TYPE_METHOD) && + (NextExternal->Value != Value)) + { + ACPI_ERROR ((AE_INFO, + "(File) External method arg count mismatch %s: Current %u, override to %u", + NextExternal->Path, NextExternal->Value, Value)); + + /* Override, since new value came from external reference file */ + + NextExternal->Value = Value; + } + + /* Allow upgrade of type from ANY */ + + else if (NextExternal->Type == ACPI_TYPE_ANY) + { + NextExternal->Type = Type; + NextExternal->Value = Value; + } + + return; + } + + NextExternal = NextExternal->Next; + } + + /* Get the internal pathname (AML format) */ + + Status = AcpiNsInternalizeName (Path, &InternalPath); + if (ACPI_FAILURE (Status)) + { + return; + } + + /* Allocate and init a new External() descriptor */ + + NewExternal = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_EXTERNAL_LIST)); + if (!NewExternal) + { + ACPI_FREE (InternalPath); + return; + } + + /* Must copy and normalize the input path */ + + AcpiNsExternalizeName (ACPI_UINT32_MAX, InternalPath, NULL, &ExternalPath); + + NewExternal->Path = ExternalPath; + NewExternal->Type = Type; + NewExternal->Value = Value; + NewExternal->Resolved = Resolved; + NewExternal->Length = (UINT16) ACPI_STRLEN (Path); + NewExternal->InternalPath = InternalPath; + + /* Set flag to indicate External->InternalPath needs to be freed */ + + NewExternal->Flags |= ACPI_IPATH_ALLOCATED | ACPI_FROM_REFERENCE_FILE; + + /* Link the new descriptor into the global list, alphabetically ordered */ + + NextExternal = AcpiGbl_ExternalList; + while (NextExternal) + { + if (AcpiUtStricmp (NewExternal->Path, NextExternal->Path) < 0) + { + if (PrevExternal) + { + PrevExternal->Next = NewExternal; + } + else + { + AcpiGbl_ExternalList = NewExternal; + } + + NewExternal->Next = NextExternal; + return; + } + + PrevExternal = NextExternal; + NextExternal = NextExternal->Next; + } + + if (PrevExternal) + { + PrevExternal->Next = NewExternal; + } + else + { + AcpiGbl_ExternalList = NewExternal; + } +} + + +/******************************************************************************* + * * FUNCTION: AcpiDmAddExternalsToNamespace * * PARAMETERS: None @@ -563,7 +842,7 @@ AcpiDmAddExternalsToNamespace ( Status = AcpiNsLookup (NULL, External->InternalPath, External->Type, ACPI_IMODE_LOAD_PASS1, - ACPI_NS_EXTERNAL | ACPI_NS_DONT_OPEN_SCOPE, + ACPI_NS_ERROR_IF_FOUND | ACPI_NS_EXTERNAL | ACPI_NS_DONT_OPEN_SCOPE, NULL, &Node); if (ACPI_FAILURE (Status)) @@ -731,7 +1010,8 @@ AcpiDmEmitExternals ( NextExternal->Path, AcpiDmGetObjectTypeName (NextExternal->Type)); - AcpiOsPrintf (") // Warning: Unresolved Method, " + AcpiOsPrintf ( + ") // Warning: Unresolved Method, " "guessing %u arguments (may be incorrect, see warning above)\n", NextExternal->Value); @@ -743,9 +1023,45 @@ AcpiDmEmitExternals ( AcpiOsPrintf ("\n"); + + /* Emit externals that were imported from a file */ + + if (Gbl_ExternalRefFilename) + { + AcpiOsPrintf ( + " /*\n * External declarations that were imported from\n" + " * the reference file [%s]\n */\n", + Gbl_ExternalRefFilename); + + NextExternal = AcpiGbl_ExternalList; + while (NextExternal) + { + if (!NextExternal->Emitted && (NextExternal->Flags & ACPI_FROM_REFERENCE_FILE)) + { + AcpiOsPrintf (" External (%s%s", + NextExternal->Path, + AcpiDmGetObjectTypeName (NextExternal->Type)); + + if (NextExternal->Type == ACPI_TYPE_METHOD) + { + AcpiOsPrintf (") // %u Arguments\n", + NextExternal->Value); + } + else + { + AcpiOsPrintf (")\n"); + } + NextExternal->Emitted = TRUE; + } + + NextExternal = NextExternal->Next; + } + + AcpiOsPrintf ("\n"); + } + /* - * Walk the list of externals (unresolved references) - * found during the AML parsing + * Walk the list of externals found during the AML parsing */ while (AcpiGbl_ExternalList) { Modified: vendor-sys/acpica/dist/source/common/dmtable.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtable.c Fri Aug 23 17:52:01 2013 (r254723) +++ vendor-sys/acpica/dist/source/common/dmtable.c Fri Aug 23 18:01:58 2013 (r254724) @@ -446,7 +446,7 @@ AcpiDmDumpDataTable ( Length = Table->Length; AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoFacs); } - else if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_RSDP)) + else if (ACPI_VALIDATE_RSDP_SIG (Table->Signature)) { Length = AcpiDmDumpRsdp (Table); } Modified: vendor-sys/acpica/dist/source/compiler/aslcompile.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompile.c Fri Aug 23 17:52:01 2013 (r254723) +++ vendor-sys/acpica/dist/source/compiler/aslcompile.c Fri Aug 23 18:01:58 2013 (r254724) @@ -593,10 +593,15 @@ CmDoCompile ( AslCompilerparse(); UtEndEvent (Event); - /* Flush out any remaining source after parse tree is complete */ + /* Check for parse errors */ - Event = UtBeginEvent ("Flush source input"); - CmFlushSourceCode (); + Status = AslCheckForErrorExit (); + if (ACPI_FAILURE (Status)) + { + fprintf (stderr, "Compiler aborting due to parser-detected syntax error(s)\n"); + LsDumpParseTree (); + goto ErrorExit; + } /* Did the parse tree get successfully constructed? */ @@ -606,16 +611,18 @@ CmDoCompile ( * If there are no errors, then we have some sort of * internal problem. */ - Status = AslCheckForErrorExit (); - if (Status == AE_OK) - { - AslError (ASL_ERROR, ASL_MSG_COMPILER_INTERNAL, - NULL, "- Could not resolve parse tree root node"); - } + AslError (ASL_ERROR, ASL_MSG_COMPILER_INTERNAL, + NULL, "- Could not resolve parse tree root node"); goto ErrorExit; } + + /* Flush out any remaining source after parse tree is complete */ + + Event = UtBeginEvent ("Flush source input"); + CmFlushSourceCode (); + /* Optional parse tree dump, compiler debug output only */ LsDumpParseTree (); Modified: vendor-sys/acpica/dist/source/compiler/aslglobal.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslglobal.h Fri Aug 23 17:52:01 2013 (r254723) +++ vendor-sys/acpica/dist/source/compiler/aslglobal.h Fri Aug 23 18:01:58 2013 (r254724) @@ -186,6 +186,7 @@ ASL_EXTERN char ASL_ ASL_EXTERN char ASL_INIT_GLOBAL (*Gbl_OutputFilenamePrefix, NULL); ASL_EXTERN ASL_INCLUDE_DIR ASL_INIT_GLOBAL (*Gbl_IncludeDirList, NULL); ASL_EXTERN char *Gbl_CurrentInputFilename; +ASL_EXTERN char ASL_INIT_GLOBAL (*Gbl_ExternalRefFilename, NULL); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_HasIncludeFiles, FALSE); Modified: vendor-sys/acpica/dist/source/compiler/aslload.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslload.c Fri Aug 23 17:52:01 2013 (r254723) +++ vendor-sys/acpica/dist/source/compiler/aslload.c Fri Aug 23 18:01:58 2013 (r254724) @@ -487,6 +487,10 @@ LdNamespace1Begin ( ACPI_TYPE_LOCAL_SCOPE, ACPI_IMODE_LOAD_PASS1, Flags, WalkState, &(Node)); + if (ACPI_FAILURE (Status)) + { + return_ACPI_STATUS (Status); + } /* * However, this is an error -- primarily because the MS Modified: vendor-sys/acpica/dist/source/compiler/aslmain.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmain.c Fri Aug 23 17:52:01 2013 (r254723) +++ vendor-sys/acpica/dist/source/compiler/aslmain.c Fri Aug 23 18:01:58 2013 (r254724) @@ -138,6 +138,7 @@ Usage ( ACPI_OPTION ("-dc ", "Disassemble AML and immediately compile it"); ACPI_OPTION ("", " (Obtain DSDT from current system if no input file)"); ACPI_OPTION ("-e ", "Include ACPI table(s) for external symbol resolution"); + ACPI_OPTION ("-fe ", "Specify external symbol declaration file"); ACPI_OPTION ("-g", "Get ACPI tables and write to files (*.dat)"); ACPI_OPTION ("-in", "Ignore NoOp opcodes"); ACPI_OPTION ("-vt", "Dump binary table data in hex format within output file"); Modified: vendor-sys/acpica/dist/source/compiler/asloptions.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asloptions.c Fri Aug 23 17:52:01 2013 (r254723) +++ vendor-sys/acpica/dist/source/compiler/asloptions.c Fri Aug 23 18:01:58 2013 (r254724) @@ -68,7 +68,7 @@ AslDoResponseFile ( #define ASL_TOKEN_SEPARATORS " \t\n" -#define ASL_SUPPORTED_OPTIONS "@:b|c|d^D:e:fgh^i|I:l^m:no|p:P^r:s|t|T+G^v^w|x:z" +#define ASL_SUPPORTED_OPTIONS "@:b|c|d^D:e:f^gh^i|I:l^m:no|p:P^r:s|t|T+G^v^w|x:z" /******************************************************************************* @@ -136,8 +136,7 @@ AslCommandLine ( if (BadCommandLine) { - printf ("\n"); - Usage (); + printf ("Use -h option for help information\n"); exit (1); } @@ -276,9 +275,30 @@ AslDoOptions ( } break; - case 'f': /* Ignore errors and force creation of aml file */ + case 'f': + + switch (AcpiGbl_Optarg[0]) + { + case '^': /* Ignore errors and force creation of aml file */ + + Gbl_IgnoreErrors = TRUE; + break; + + case 'e': /* Disassembler: Get external declaration file */ + + if (AcpiGetoptArgument (argc, argv)) + { + return (-1); + } + + Gbl_ExternalRefFilename = AcpiGbl_Optarg; + break; - Gbl_IgnoreErrors = TRUE; + default: + + printf ("Unknown option: -f%s\n", AcpiGbl_Optarg); + return (-1); + } break; case 'G': Modified: vendor-sys/acpica/dist/source/compiler/dtcompile.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/dtcompile.c Fri Aug 23 17:52:01 2013 (r254723) +++ vendor-sys/acpica/dist/source/compiler/dtcompile.c Fri Aug 23 18:01:58 2013 (r254724) @@ -317,7 +317,7 @@ DtCompileDataTable ( DtSetTableLength (); return (Status); } - else if (ACPI_COMPARE_NAME (Signature, ACPI_SIG_RSDP)) + else if (ACPI_VALIDATE_RSDP_SIG (Signature)) { Status = DtCompileRsdp (FieldList); return (Status); Modified: vendor-sys/acpica/dist/source/components/debugger/dbcmds.c ============================================================================== --- vendor-sys/acpica/dist/source/components/debugger/dbcmds.c Fri Aug 23 17:52:01 2013 (r254723) +++ vendor-sys/acpica/dist/source/components/debugger/dbcmds.c Fri Aug 23 18:01:58 2013 (r254724) @@ -1211,6 +1211,14 @@ AcpiDbGenerateGpe ( (void) AcpiEvGpeDispatch (NULL, GpeEventInfo, GpeNumber); } + +void +AcpiDbGenerateSci ( + void) +{ + AcpiEvSciDispatch (); +} + #endif /* !ACPI_REDUCED_HARDWARE */ #endif /* ACPI_DEBUGGER */ Modified: vendor-sys/acpica/dist/source/components/debugger/dbfileio.c ============================================================================== --- vendor-sys/acpica/dist/source/components/debugger/dbfileio.c Fri Aug 23 17:52:01 2013 (r254723) +++ vendor-sys/acpica/dist/source/components/debugger/dbfileio.c Fri Aug 23 18:01:58 2013 (r254724) @@ -142,7 +142,8 @@ AcpiDbOpenDebugFile ( } AcpiOsPrintf ("Debug output file %s opened\n", Name); - ACPI_STRCPY (AcpiGbl_DbDebugFilename, Name); + ACPI_STRNCPY (AcpiGbl_DbDebugFilename, Name, + sizeof (AcpiGbl_DbDebugFilename)); AcpiGbl_DbOutputToFile = TRUE; #endif @@ -274,11 +275,9 @@ AcpiDbReadTable ( fseek (fp, 0, SEEK_SET); - /* The RSDT, FACS and S3PT tables do not have standard ACPI headers */ + /* The RSDP table does not have standard ACPI header */ - if (ACPI_COMPARE_NAME (TableHeader.Signature, "RSD ") || - ACPI_COMPARE_NAME (TableHeader.Signature, "FACS") || - ACPI_COMPARE_NAME (TableHeader.Signature, "S3PT")) + if (ACPI_COMPARE_NAME (TableHeader.Signature, "RSD ")) { *TableLength = FileSize; StandardHeader = FALSE; Modified: vendor-sys/acpica/dist/source/components/debugger/dbinput.c ============================================================================== --- vendor-sys/acpica/dist/source/components/debugger/dbinput.c Fri Aug 23 17:52:01 2013 (r254723) +++ vendor-sys/acpica/dist/source/components/debugger/dbinput.c Fri Aug 23 18:01:58 2013 (r254724) @@ -132,12 +132,14 @@ enum AcpiExDebuggerCommands CMD_OPEN, CMD_OSI, CMD_OWNER, + CMD_PATHS, CMD_PREDEFINED, CMD_PREFIX, CMD_QUIT, CMD_REFERENCES, CMD_RESOURCES, CMD_RESULTS, + CMD_SCI, CMD_SET, CMD_SLEEP, CMD_STATS, @@ -203,12 +205,14 @@ static const ACPI_DB_COMMAND_INFO Acpi {"OPEN", 1}, {"OSI", 0}, {"OWNER", 1}, + {"PATHS", 0}, {"PREDEFINED", 0}, {"PREFIX", 0}, {"QUIT", 0}, {"REFERENCES", 1}, {"RESOURCES", 0}, {"RESULTS", 0}, + {"SCI", 0}, {"SET", 3}, {"SLEEP", 0}, {"STATS", 1}, @@ -259,22 +263,19 @@ static const ACPI_DB_COMMAND_HELP Acpi {0, "\nNamespace Access Commands:", "\n"}, {1, " Businfo", "Display system bus info\n"}, {1, " Disassemble ", "Disassemble a control method\n"}, - {1, " Event ", "Generate AcpiEvent (Fixed/GPE)\n"}, {1, " Find (? is wildcard)", "Find ACPI name(s) with wildcards\n"}, - {1, " Gpe ", "Simulate a GPE\n"}, - {1, " Gpes", "Display info on all GPEs\n"}, {1, " Integrity", "Validate namespace integrity\n"}, {1, " Methods", "Display list of loaded control methods\n"}, {1, " Namespace [Object] [Depth]", "Display loaded namespace tree/subtree\n"}, {1, " Notify ", "Send a notification on Object\n"}, {1, " Objects ", "Display all objects of the given type\n"}, {1, " Owner [Depth]", "Display loaded namespace by object owner\n"}, + {1, " Paths", "Display full pathnames of namespace objects\n"}, {1, " Predefined", "Check all predefined names\n"}, {1, " Prefix []", "Set or Get current execution prefix\n"}, {1, " References ", "Find all references to object at addr\n"}, {1, " Resources [DeviceName]", "Display Device resources (no arg = all devices)\n"}, {1, " Set N ", "Set value for named integer\n"}, - {1, " Sleep [SleepState]", "Simulate sleep/wake sequence(s) (0-5)\n"}, {1, " Template ", "Format/dump a Buffer/ResourceTemplate\n"}, {1, " Terminate", "Delete namespace and all internal objects\n"}, {1, " Type ", "Display object type\n"}, @@ -288,7 +289,7 @@ static const ACPI_DB_COMMAND_HELP Acpi {5, " Execute [Arguments]", "Execute control method\n"}, {1, " Hex Integer", "Integer method argument\n"}, {1, " \"Ascii String\"", "String method argument\n"}, - {1, " (Byte List)", "Buffer method argument\n"}, + {1, " (Hex Byte List)", "Buffer method argument\n"}, {1, " [Package Element List]", "Package method argument\n"}, {1, " Go", "Allow method to run to completion\n"}, {1, " Information", "Display info about the current method\n"}, @@ -303,6 +304,13 @@ static const ACPI_DB_COMMAND_HELP Acpi {1, " Tree", "Display control method calling tree\n"}, {1, " ", "Single step next AML opcode (over calls)\n"}, + {0, "\nHardware Related Commands:", "\n"}, + {1, " Event ", "Generate AcpiEvent (Fixed/GPE)\n"}, + {1, " Gpe ", "Simulate a GPE\n"}, + {1, " Gpes", "Display info on all GPEs\n"}, + {1, " Sci", "Generate an SCI\n"}, + {1, " Sleep [SleepState]", "Simulate sleep/wake sequence(s) (0-5)\n"}, + {0, "\nFile I/O Commands:", "\n"}, {1, " Close", "Close debug output file\n"}, {1, " Load ", "Load ACPI table from a file\n"}, @@ -1002,6 +1010,11 @@ AcpiDbCommandDispatch ( AcpiDbDumpNamespaceByOwner (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]); break; + case CMD_PATHS: + + AcpiDbDumpNamespacePaths (); + break; + case CMD_PREDEFINED: AcpiDbCheckPredefinedNames (); @@ -1027,6 +1040,11 @@ AcpiDbCommandDispatch ( AcpiDbDisplayResults (); break; + case CMD_SCI: + + AcpiDbGenerateSci (); + break; + case CMD_SET: AcpiDbSetMethodData (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2], Modified: vendor-sys/acpica/dist/source/components/debugger/dbnames.c ============================================================================== --- vendor-sys/acpica/dist/source/components/debugger/dbnames.c Fri Aug 23 17:52:01 2013 (r254723) +++ vendor-sys/acpica/dist/source/components/debugger/dbnames.c Fri Aug 23 18:01:58 2013 (r254724) @@ -256,6 +256,37 @@ AcpiDbDumpNamespace ( /******************************************************************************* * + * FUNCTION: AcpiDbDumpNamespacePaths + * + * PARAMETERS: None + * + * RETURN: None + * + * DESCRIPTION: Dump entire namespace with full object pathnames and object + * type information. Alternative to "namespace" command. + * + ******************************************************************************/ + +void +AcpiDbDumpNamespacePaths ( + void) +{ + + AcpiDbSetOutputDestination (ACPI_DB_DUPLICATE_OUTPUT); + AcpiOsPrintf ("ACPI Namespace (from root):\n"); + + /* Display the entire namespace */ + + AcpiDbSetOutputDestination (ACPI_DB_REDIRECTABLE_OUTPUT); + AcpiNsDumpObjectPaths (ACPI_TYPE_ANY, ACPI_DISPLAY_SUMMARY, + ACPI_UINT32_MAX, ACPI_OWNER_ID_MAX, AcpiGbl_RootNode); + + AcpiDbSetOutputDestination (ACPI_DB_CONSOLE_OUTPUT); +} + + +/******************************************************************************* + * * FUNCTION: AcpiDbDumpNamespaceByOwner * * PARAMETERS: OwnerArg - Owner ID whose nodes will be displayed Modified: vendor-sys/acpica/dist/source/components/events/evgpeutil.c ============================================================================== --- vendor-sys/acpica/dist/source/components/events/evgpeutil.c Fri Aug 23 17:52:01 2013 (r254723) +++ vendor-sys/acpica/dist/source/components/events/evgpeutil.c Fri Aug 23 18:01:58 2013 (r254724) @@ -216,7 +216,7 @@ AcpiEvGetGpeDevice ( * * FUNCTION: AcpiEvGetGpeXruptBlock * - * PARAMETERS: InterruptNumber - Interrupt for a GPE block + * PARAMETERS: InterruptNumber - Interrupt for a GPE block * * RETURN: A GPE interrupt block * Modified: vendor-sys/acpica/dist/source/components/events/evmisc.c ============================================================================== --- vendor-sys/acpica/dist/source/components/events/evmisc.c Fri Aug 23 17:52:01 2013 (r254723) +++ vendor-sys/acpica/dist/source/components/events/evmisc.c Fri Aug 23 18:01:58 2013 (r254724) @@ -292,15 +292,6 @@ AcpiEvTerminate ( Status = AcpiEvWalkGpeList (AcpiHwDisableGpeBlock, NULL); - /* Remove SCI handler */ - - Status = AcpiEvRemoveSciHandler (); - if (ACPI_FAILURE(Status)) - { - ACPI_ERROR ((AE_INFO, - "Could not remove SCI handler")); - } - Status = AcpiEvRemoveGlobalLockHandler (); if (ACPI_FAILURE(Status)) { @@ -311,6 +302,15 @@ AcpiEvTerminate ( AcpiGbl_EventsInitialized = FALSE; } + /* Remove SCI handlers */ + + Status = AcpiEvRemoveAllSciHandlers (); + if (ACPI_FAILURE(Status)) + { + ACPI_ERROR ((AE_INFO, + "Could not remove SCI handler")); + } + /* Deallocate all handler objects installed within GPE info structs */ Status = AcpiEvWalkGpeList (AcpiEvDeleteGpeHandlers, NULL); Modified: vendor-sys/acpica/dist/source/components/events/evregion.c ============================================================================== --- vendor-sys/acpica/dist/source/components/events/evregion.c Fri Aug 23 17:52:01 2013 (r254723) +++ vendor-sys/acpica/dist/source/components/events/evregion.c Fri Aug 23 18:01:58 2013 (r254724) @@ -234,18 +234,12 @@ AcpiEvAddressSpaceDispatch ( { RegionObj->Region.Flags |= AOPOBJ_SETUP_COMPLETE; - if (RegionObj2->Extra.RegionContext) - { - /* The handler for this region was already installed */ - - ACPI_FREE (RegionContext); - } - else + /* + * Save the returned context for use in all accesses to + * the handler for this particular region + */ + if (!(RegionObj2->Extra.RegionContext)) { - /* - * Save the returned context for use in all accesses to - * this particular region - */ RegionObj2->Extra.RegionContext = RegionContext; } } @@ -261,7 +255,6 @@ AcpiEvAddressSpaceDispatch ( ACPI_FORMAT_NATIVE_UINT (RegionObj->Region.Address + RegionOffset), AcpiUtGetRegionName (RegionObj->Region.SpaceId))); - /* * Special handling for GenericSerialBus and GeneralPurposeIo: * There are three extra parameters that must be passed to the @@ -424,6 +417,15 @@ AcpiEvDetachRegion( Status = RegionSetup (RegionObj, ACPI_REGION_DEACTIVATE, HandlerObj->AddressSpace.Context, RegionContext); + /* + * RegionContext should have been released by the deactivate + * operation. We don't need access to it anymore here. + */ + if (RegionContext) + { + *RegionContext = NULL; + } + /* Init routine may fail, Just ignore errors */ if (ACPI_FAILURE (Status)) Modified: vendor-sys/acpica/dist/source/components/events/evsci.c ============================================================================== --- vendor-sys/acpica/dist/source/components/events/evsci.c Fri Aug 23 17:52:01 2013 (r254723) +++ vendor-sys/acpica/dist/source/components/events/evsci.c Fri Aug 23 18:01:58 2013 (r254724) @@ -61,6 +61,57 @@ AcpiEvSciXruptHandler ( /******************************************************************************* * + * FUNCTION: AcpiEvSciDispatch + * + * PARAMETERS: None + * + * RETURN: Status code indicates whether interrupt was handled. + * + * DESCRIPTION: Dispatch the SCI to all host-installed SCI handlers. + * + ******************************************************************************/ + +UINT32 +AcpiEvSciDispatch ( + void) +{ + ACPI_SCI_HANDLER_INFO *SciHandler; + ACPI_CPU_FLAGS Flags; + UINT32 IntStatus = ACPI_INTERRUPT_NOT_HANDLED; + + + ACPI_FUNCTION_NAME (EvSciDispatch); + + + /* Are there any host-installed SCI handlers? */ + + if (!AcpiGbl_SciHandlerList) + { + return (IntStatus); + } + + Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock); + + /* Invoke all host-installed SCI handlers */ + + SciHandler = AcpiGbl_SciHandlerList; + while (SciHandler) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Fri Aug 23 18:02:40 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8FCEF8A3; Fri, 23 Aug 2013 18:02:40 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 639C727E5; Fri, 23 Aug 2013 18:02:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7NI2eY5096073; Fri, 23 Aug 2013 18:02:40 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7NI2eHl096072; Fri, 23 Aug 2013 18:02:40 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201308231802.r7NI2eHl096072@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 23 Aug 2013 18:02:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r254726 - vendor-sys/acpica/20130823 X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Aug 2013 18:02:40 -0000 Author: jkim Date: Fri Aug 23 18:02:39 2013 New Revision: 254726 URL: http://svnweb.freebsd.org/changeset/base/254726 Log: Tag ACPICA 20130823. Added: vendor-sys/acpica/20130823/ - copied from r254724, vendor-sys/acpica/dist/ From owner-svn-src-vendor@FreeBSD.ORG Fri Aug 23 23:34:55 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7F27D54B; Fri, 23 Aug 2013 23:34:55 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6ABC32C17; Fri, 23 Aug 2013 23:34:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7NNYtKZ067410; Fri, 23 Aug 2013 23:34:55 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7NNYtRx067409; Fri, 23 Aug 2013 23:34:55 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201308232334.r7NNYtRx067409@svn.freebsd.org> From: Xin LI Date: Fri, 23 Aug 2013 23:34:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r254746 - vendor/illumos/dist/lib/libctf/common X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Aug 2013 23:34:55 -0000 Author: delphij Date: Fri Aug 23 23:34:54 2013 New Revision: 254746 URL: http://svnweb.freebsd.org/changeset/base/254746 Log: Update vendor/illumos/dist to 14148:fe28bd725808: Illumos DTrace issues: 4005 libctf can't deal with extended sections Modified: vendor/illumos/dist/lib/libctf/common/ctf_lib.c Modified: vendor/illumos/dist/lib/libctf/common/ctf_lib.c ============================================================================== --- vendor/illumos/dist/lib/libctf/common/ctf_lib.c Fri Aug 23 23:25:58 2013 (r254745) +++ vendor/illumos/dist/lib/libctf/common/ctf_lib.c Fri Aug 23 23:34:54 2013 (r254746) @@ -193,6 +193,7 @@ ctf_fdopen(int fd, int *errp) { ctf_sect_t ctfsect, symsect, strsect; ctf_file_t *fp = NULL; + size_t shstrndx, shnum; struct stat64 st; ssize_t nbytes; @@ -255,11 +256,10 @@ ctf_fdopen(int fd, int *errp) #else uchar_t order = ELFDATA2LSB; #endif - GElf_Half i, n; GElf_Shdr *sp; void *strs_map; - size_t strs_mapsz; + size_t strs_mapsz, i; const char *strs; if (hdr.e32.e_ident[EI_DATA] != order) @@ -275,11 +275,38 @@ ctf_fdopen(int fd, int *errp) ehdr_to_gelf(&e32, &hdr.e64); } - if (hdr.e64.e_shstrndx >= hdr.e64.e_shnum) + shnum = hdr.e64.e_shnum; + shstrndx = hdr.e64.e_shstrndx; + + /* Extended ELF sections */ + if ((shstrndx == SHN_XINDEX) || (shnum == 0)) { + if (hdr.e32.e_ident[EI_CLASS] == ELFCLASS32) { + Elf32_Shdr x32; + + if (pread64(fd, &x32, sizeof (x32), + hdr.e64.e_shoff) != sizeof (x32)) + return (ctf_set_open_errno(errp, + errno)); + + shnum = x32.sh_size; + shstrndx = x32.sh_link; + } else { + Elf64_Shdr x64; + + if (pread64(fd, &x64, sizeof (x64), + hdr.e64.e_shoff) != sizeof (x64)) + return (ctf_set_open_errno(errp, + errno)); + + shnum = x64.sh_size; + shstrndx = x64.sh_link; + } + } + + if (shstrndx >= shnum) return (ctf_set_open_errno(errp, ECTF_CORRUPT)); - n = hdr.e64.e_shnum; - nbytes = sizeof (GElf_Shdr) * n; + nbytes = sizeof (GElf_Shdr) * shnum; if ((sp = malloc(nbytes)) == NULL) return (ctf_set_open_errno(errp, errno)); @@ -291,7 +318,7 @@ ctf_fdopen(int fd, int *errp) if (hdr.e32.e_ident[EI_CLASS] == ELFCLASS32) { Elf32_Shdr *sp32; - nbytes = sizeof (Elf32_Shdr) * n; + nbytes = sizeof (Elf32_Shdr) * shnum; if ((sp32 = malloc(nbytes)) == NULL || pread64(fd, sp32, nbytes, hdr.e64.e_shoff) != nbytes) { @@ -299,7 +326,7 @@ ctf_fdopen(int fd, int *errp) return (ctf_set_open_errno(errp, errno)); } - for (i = 0; i < n; i++) + for (i = 0; i < shnum; i++) shdr_to_gelf(&sp32[i], &sp[i]); free(sp32); @@ -313,14 +340,14 @@ ctf_fdopen(int fd, int *errp) * Now mmap the section header strings section so that we can * perform string comparison on the section names. */ - strs_mapsz = sp[hdr.e64.e_shstrndx].sh_size + - (sp[hdr.e64.e_shstrndx].sh_offset & ~_PAGEMASK); + strs_mapsz = sp[shstrndx].sh_size + + (sp[shstrndx].sh_offset & ~_PAGEMASK); strs_map = mmap64(NULL, strs_mapsz, PROT_READ, MAP_PRIVATE, - fd, sp[hdr.e64.e_shstrndx].sh_offset & _PAGEMASK); + fd, sp[shstrndx].sh_offset & _PAGEMASK); strs = (const char *)strs_map + - (sp[hdr.e64.e_shstrndx].sh_offset & ~_PAGEMASK); + (sp[shstrndx].sh_offset & ~_PAGEMASK); if (strs_map == MAP_FAILED) { free(sp); @@ -331,15 +358,15 @@ ctf_fdopen(int fd, int *errp) * Iterate over the section header array looking for the CTF * section and symbol table. The strtab is linked to symtab. */ - for (i = 0; i < n; i++) { + for (i = 0; i < shnum; i++) { const GElf_Shdr *shp = &sp[i]; const GElf_Shdr *lhp = &sp[shp->sh_link]; - if (shp->sh_link >= hdr.e64.e_shnum) + if (shp->sh_link >= shnum) continue; /* corrupt sh_link field */ - if (shp->sh_name >= sp[hdr.e64.e_shstrndx].sh_size || - lhp->sh_name >= sp[hdr.e64.e_shstrndx].sh_size) + if (shp->sh_name >= sp[shstrndx].sh_size || + lhp->sh_name >= sp[shstrndx].sh_size) continue; /* corrupt sh_name field */ if (shp->sh_type == SHT_PROGBITS && From owner-svn-src-vendor@FreeBSD.ORG Fri Aug 23 23:36:29 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CDBA9670; Fri, 23 Aug 2013 23:36:29 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9C2D02C1E; Fri, 23 Aug 2013 23:36:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7NNaTkx067923; Fri, 23 Aug 2013 23:36:29 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7NNaRv1067915; Fri, 23 Aug 2013 23:36:28 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201308232336.r7NNaRv1067915@svn.freebsd.org> From: Xin LI Date: Fri, 23 Aug 2013 23:36:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r254747 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Aug 2013 23:36:29 -0000 Author: delphij Date: Fri Aug 23 23:36:27 2013 New Revision: 254747 URL: http://svnweb.freebsd.org/changeset/base/254747 Log: Update vendor-sys/illumos/dist to 14151:189ec27885ae: Illumos DTrace issues: 4047 panic from dbuf_free_range() from dmu_free_object() while doing zfs receive Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_destroy.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dnode.h Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Fri Aug 23 23:34:54 2013 (r254746) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Fri Aug 23 23:36:27 2013 (r254747) @@ -40,6 +40,12 @@ #include #include +/* + * Number of times that zfs_free_range() took the slow path while doing + * a zfs receive. A nonzero value indicates a potential performance problem. + */ +uint64_t zfs_free_range_recv_miss; + static void dbuf_destroy(dmu_buf_impl_t *db); static boolean_t dbuf_undirty(dmu_buf_impl_t *db, dmu_tx_t *tx); static void dbuf_write(dbuf_dirty_record_t *dr, arc_buf_t *data, dmu_tx_t *tx); @@ -819,20 +825,22 @@ dbuf_free_range(dnode_t *dn, uint64_t st } dprintf_dnode(dn, "start=%llu end=%llu\n", start, end); - if (dmu_objset_is_receiving(dn->dn_objset)) { + mutex_enter(&dn->dn_dbufs_mtx); + if (start >= dn->dn_unlisted_l0_blkid * dn->dn_datablksz) { + /* There can't be any dbufs in this range; no need to search. */ + mutex_exit(&dn->dn_dbufs_mtx); + return; + } else if (dmu_objset_is_receiving(dn->dn_objset)) { /* - * When processing a free record from a zfs receive, - * there should have been no previous modifications to the - * data in this range. Therefore there should be no dbufs - * in the range. Searching dn_dbufs for these non-existent - * dbufs can be very expensive, so simply ignore this. + * If we are receiving, we expect there to be no dbufs in + * the range to be freed, because receive modifies each + * block at most once, and in offset order. If this is + * not the case, it can lead to performance problems, + * so note that we unexpectedly took the slow path. */ - VERIFY3P(dbuf_find(dn, 0, start), ==, NULL); - VERIFY3P(dbuf_find(dn, 0, end), ==, NULL); - return; + atomic_inc_64(&zfs_free_range_recv_miss); } - mutex_enter(&dn->dn_dbufs_mtx); for (db = list_head(&dn->dn_dbufs); db; db = db_next) { db_next = list_next(&dn->dn_dbufs, db); ASSERT(db->db_blkid != DMU_BONUS_BLKID); @@ -1720,6 +1728,9 @@ dbuf_create(dnode_t *dn, uint8_t level, return (odb); } list_insert_head(&dn->dn_dbufs, db); + if (db->db_level == 0 && db->db_blkid >= + dn->dn_unlisted_l0_blkid) + dn->dn_unlisted_l0_blkid = db->db_blkid + 1; db->db_state = DB_UNCACHED; mutex_exit(&dn->dn_dbufs_mtx); arc_space_consume(sizeof (dmu_buf_impl_t), ARC_SPACE_OTHER); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c Fri Aug 23 23:34:54 2013 (r254746) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c Fri Aug 23 23:36:27 2013 (r254747) @@ -569,98 +569,93 @@ dmu_prefetch(objset_t *os, uint64_t obje * the end so that the file gets shorter over time (if we crashes in the * middle, this will leave us in a better state). We find allocated file * data by simply searching the allocated level 1 indirects. + * + * On input, *start should be the first offset that does not need to be + * freed (e.g. "offset + length"). On return, *start will be the first + * offset that should be freed. */ static int -get_next_chunk(dnode_t *dn, uint64_t *start, uint64_t limit) +get_next_chunk(dnode_t *dn, uint64_t *start, uint64_t minimum) { - uint64_t len = *start - limit; - uint64_t blkcnt = 0; - uint64_t maxblks = DMU_MAX_ACCESS / (1ULL << (dn->dn_indblkshift + 1)); + uint64_t maxblks = DMU_MAX_ACCESS >> (dn->dn_indblkshift + 1); + /* bytes of data covered by a level-1 indirect block */ uint64_t iblkrange = dn->dn_datablksz * EPB(dn->dn_indblkshift, SPA_BLKPTRSHIFT); - ASSERT(limit <= *start); + ASSERT3U(minimum, <=, *start); - if (len <= iblkrange * maxblks) { - *start = limit; + if (*start - minimum <= iblkrange * maxblks) { + *start = minimum; return (0); } ASSERT(ISP2(iblkrange)); - while (*start > limit && blkcnt < maxblks) { + for (uint64_t blks = 0; *start > minimum && blks < maxblks; blks++) { int err; - /* find next allocated L1 indirect */ + /* + * dnode_next_offset(BACKWARDS) will find an allocated L1 + * indirect block at or before the input offset. We must + * decrement *start so that it is at the end of the region + * to search. + */ + (*start)--; err = dnode_next_offset(dn, DNODE_FIND_BACKWARDS, start, 2, 1, 0); - /* if there are no more, then we are done */ + /* if there are no indirect blocks before start, we are done */ if (err == ESRCH) { - *start = limit; - return (0); - } else if (err) { + *start = minimum; + break; + } else if (err != 0) { return (err); } - blkcnt += 1; - /* reset offset to end of "next" block back */ + /* set start to the beginning of this L1 indirect */ *start = P2ALIGN(*start, iblkrange); - if (*start <= limit) - *start = limit; - else - *start -= 1; } + if (*start < minimum) + *start = minimum; return (0); } static int dmu_free_long_range_impl(objset_t *os, dnode_t *dn, uint64_t offset, - uint64_t length, boolean_t free_dnode) + uint64_t length) { - dmu_tx_t *tx; - uint64_t object_size, start, end, len; - boolean_t trunc = (length == DMU_OBJECT_END); - int align, err; - - align = 1 << dn->dn_datablkshift; - ASSERT(align > 0); - object_size = align == 1 ? dn->dn_datablksz : - (dn->dn_maxblkid + 1) << dn->dn_datablkshift; - - end = offset + length; - if (trunc || end > object_size) - end = object_size; - if (end <= offset) + uint64_t object_size = (dn->dn_maxblkid + 1) * dn->dn_datablksz; + int err; + + if (offset >= object_size) return (0); - length = end - offset; - while (length) { - start = end; - /* assert(offset <= start) */ - err = get_next_chunk(dn, &start, offset); + if (length == DMU_OBJECT_END || offset + length > object_size) + length = object_size - offset; + + while (length != 0) { + uint64_t chunk_end, chunk_begin; + + chunk_end = chunk_begin = offset + length; + + /* move chunk_begin backwards to the beginning of this chunk */ + err = get_next_chunk(dn, &chunk_begin, offset); if (err) return (err); - len = trunc ? DMU_OBJECT_END : end - start; + ASSERT3U(chunk_begin, >=, offset); + ASSERT3U(chunk_begin, <=, chunk_end); - tx = dmu_tx_create(os); - dmu_tx_hold_free(tx, dn->dn_object, start, len); + dmu_tx_t *tx = dmu_tx_create(os); + dmu_tx_hold_free(tx, dn->dn_object, + chunk_begin, chunk_end - chunk_begin); err = dmu_tx_assign(tx, TXG_WAIT); if (err) { dmu_tx_abort(tx); return (err); } - - dnode_free_range(dn, start, trunc ? -1 : len, tx); - - if (start == 0 && free_dnode) { - ASSERT(trunc); - dnode_free(dn, tx); - } - - length -= end - start; - + dnode_free_range(dn, chunk_begin, chunk_end - chunk_begin, tx); dmu_tx_commit(tx); - end = start; + + length -= chunk_end - chunk_begin; } return (0); } @@ -675,38 +670,32 @@ dmu_free_long_range(objset_t *os, uint64 err = dnode_hold(os, object, FTAG, &dn); if (err != 0) return (err); - err = dmu_free_long_range_impl(os, dn, offset, length, FALSE); + err = dmu_free_long_range_impl(os, dn, offset, length); dnode_rele(dn, FTAG); return (err); } int -dmu_free_object(objset_t *os, uint64_t object) +dmu_free_long_object(objset_t *os, uint64_t object) { - dnode_t *dn; dmu_tx_t *tx; int err; - err = dnode_hold_impl(os, object, DNODE_MUST_BE_ALLOCATED, - FTAG, &dn); + err = dmu_free_long_range(os, object, 0, DMU_OBJECT_END); if (err != 0) return (err); - if (dn->dn_nlevels == 1) { - tx = dmu_tx_create(os); - dmu_tx_hold_bonus(tx, object); - dmu_tx_hold_free(tx, dn->dn_object, 0, DMU_OBJECT_END); - err = dmu_tx_assign(tx, TXG_WAIT); - if (err == 0) { - dnode_free_range(dn, 0, DMU_OBJECT_END, tx); - dnode_free(dn, tx); - dmu_tx_commit(tx); - } else { - dmu_tx_abort(tx); - } + + tx = dmu_tx_create(os); + dmu_tx_hold_bonus(tx, object); + dmu_tx_hold_free(tx, object, 0, DMU_OBJECT_END); + err = dmu_tx_assign(tx, TXG_WAIT); + if (err == 0) { + err = dmu_object_free(os, object, tx); + dmu_tx_commit(tx); } else { - err = dmu_free_long_range_impl(os, dn, 0, DMU_OBJECT_END, TRUE); + dmu_tx_abort(tx); } - dnode_rele(dn, FTAG); + return (err); } Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Fri Aug 23 23:34:54 2013 (r254746) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Fri Aug 23 23:36:27 2013 (r254747) @@ -1232,7 +1232,7 @@ restore_freeobjects(struct restorearg *r if (dmu_object_info(os, obj, NULL) != 0) continue; - err = dmu_free_object(os, obj); + err = dmu_free_long_object(os, obj); if (err != 0) return (err); } Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c Fri Aug 23 23:34:54 2013 (r254746) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c Fri Aug 23 23:36:27 2013 (r254747) @@ -615,7 +615,8 @@ dmu_tx_hold_free(dmu_tx_t *tx, uint64_t * if they are blocksize-aligned. */ if (dn->dn_datablkshift == 0) { - dmu_tx_count_write(txh, off, len); + if (off != 0 || len < dn->dn_datablksz) + dmu_tx_count_write(txh, off, len); } else { /* first block will be modified if it is not aligned */ if (!IS_P2ALIGNED(off, 1 << dn->dn_datablkshift)) Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c Fri Aug 23 23:34:54 2013 (r254746) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c Fri Aug 23 23:36:27 2013 (r254747) @@ -115,6 +115,7 @@ dnode_cons(void *arg, void *unused, int dn->dn_id_flags = 0; dn->dn_dbufs_count = 0; + dn->dn_unlisted_l0_blkid = 0; list_create(&dn->dn_dbufs, sizeof (dmu_buf_impl_t), offsetof(dmu_buf_impl_t, db_link)); @@ -167,6 +168,7 @@ dnode_dest(void *arg, void *unused) ASSERT0(dn->dn_id_flags); ASSERT0(dn->dn_dbufs_count); + ASSERT0(dn->dn_unlisted_l0_blkid); list_destroy(&dn->dn_dbufs); } @@ -472,6 +474,7 @@ dnode_destroy(dnode_t *dn) dn->dn_newuid = 0; dn->dn_newgid = 0; dn->dn_id_flags = 0; + dn->dn_unlisted_l0_blkid = 0; dmu_zfetch_rele(&dn->dn_zfetch); kmem_cache_free(dnode_cache, dn); @@ -702,6 +705,7 @@ dnode_move_impl(dnode_t *odn, dnode_t *n ASSERT(list_is_empty(&ndn->dn_dbufs)); list_move_tail(&ndn->dn_dbufs, &odn->dn_dbufs); ndn->dn_dbufs_count = odn->dn_dbufs_count; + ndn->dn_unlisted_l0_blkid = odn->dn_unlisted_l0_blkid; ndn->dn_bonus = odn->dn_bonus; ndn->dn_have_spill = odn->dn_have_spill; ndn->dn_zio = odn->dn_zio; @@ -736,6 +740,7 @@ dnode_move_impl(dnode_t *odn, dnode_t *n list_create(&odn->dn_dbufs, sizeof (dmu_buf_impl_t), offsetof(dmu_buf_impl_t, db_link)); odn->dn_dbufs_count = 0; + odn->dn_unlisted_l0_blkid = 0; odn->dn_bonus = NULL; odn->dn_zfetch.zf_dnode = NULL; @@ -1523,7 +1528,7 @@ dnode_free_range(dnode_t *dn, uint64_t o blkshift = dn->dn_datablkshift; epbs = dn->dn_indblkshift - SPA_BLKPTRSHIFT; - if (len == -1ULL) { + if (len == DMU_OBJECT_END) { len = UINT64_MAX - off; trunc = TRUE; } Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_destroy.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_destroy.c Fri Aug 23 23:34:54 2013 (r254746) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_destroy.c Fri Aug 23 23:36:27 2013 (r254747) @@ -896,7 +896,7 @@ dsl_destroy_head(const char *name) for (uint64_t obj = 0; error == 0; error = dmu_object_next(os, &obj, FALSE, prev_snap_txg)) - (void) dmu_free_object(os, obj); + (void) dmu_free_long_object(os, obj); /* sync out all frees */ txg_wait_synced(dmu_objset_pool(os), 0); dmu_objset_disown(os, FTAG); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h Fri Aug 23 23:34:54 2013 (r254746) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h Fri Aug 23 23:36:27 2013 (r254747) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. */ @@ -581,7 +581,7 @@ int dmu_free_range(objset_t *os, uint64_ uint64_t size, dmu_tx_t *tx); int dmu_free_long_range(objset_t *os, uint64_t object, uint64_t offset, uint64_t size); -int dmu_free_object(objset_t *os, uint64_t object); +int dmu_free_long_object(objset_t *os, uint64_t object); /* * Convenience functions. Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dnode.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dnode.h Fri Aug 23 23:34:54 2013 (r254746) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dnode.h Fri Aug 23 23:36:27 2013 (r254747) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. */ #ifndef _SYS_DNODE_H @@ -188,6 +188,8 @@ typedef struct dnode { /* protected by dn_dbufs_mtx; declared here to fill 32-bit hole */ uint32_t dn_dbufs_count; /* count of dn_dbufs */ + /* There are no level-0 blocks of this blkid or higher in dn_dbufs */ + uint64_t dn_unlisted_l0_blkid; /* protected by os_lock: */ list_node_t dn_dirty_link[TXG_SIZE]; /* next on dataset's dirty */ From owner-svn-src-vendor@FreeBSD.ORG Fri Aug 23 23:37:56 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 72FDB7B0; Fri, 23 Aug 2013 23:37:56 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5FD9B2C32; Fri, 23 Aug 2013 23:37:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7NNbuwi068406; Fri, 23 Aug 2013 23:37:56 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7NNbuTX068405; Fri, 23 Aug 2013 23:37:56 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201308232337.r7NNbuTX068405@svn.freebsd.org> From: Xin LI Date: Fri, 23 Aug 2013 23:37:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r254748 - vendor/illumos/dist/lib/libzfs/common X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Aug 2013 23:37:56 -0000 Author: delphij Date: Fri Aug 23 23:37:55 2013 New Revision: 254748 URL: http://svnweb.freebsd.org/changeset/base/254748 Log: Update vendor/illumos/dist to 14152:46f5fb0b0d36: Illumos DTrace issues: 4061 libzfs: memory leak in iter_dependents_cb() Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_iter.c Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_iter.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_iter.c Fri Aug 23 23:36:27 2013 (r254747) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_iter.c Fri Aug 23 23:37:55 2013 (r254748) @@ -21,8 +21,8 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright 2010 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright 2013 Nexenta Systems, Inc. All rights reserved. */ #include @@ -443,8 +443,12 @@ iter_dependents_cb(zfs_handle_t *zhp, vo err = zfs_iter_snapshots(zhp, iter_dependents_cb, ida); ida->stack = isf.next; } + if (!first && err == 0) err = ida->func(zhp, ida->data); + else + zfs_close(zhp); + return (err); } From owner-svn-src-vendor@FreeBSD.ORG Fri Aug 23 23:40:26 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 761FB990; Fri, 23 Aug 2013 23:40:26 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5437D2C59; Fri, 23 Aug 2013 23:40:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7NNeQeX070645; Fri, 23 Aug 2013 23:40:26 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7NNePE1070642; Fri, 23 Aug 2013 23:40:25 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201308232340.r7NNePE1070642@svn.freebsd.org> From: Xin LI Date: Fri, 23 Aug 2013 23:40:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r254749 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Aug 2013 23:40:26 -0000 Author: delphij Date: Fri Aug 23 23:40:25 2013 New Revision: 254749 URL: http://svnweb.freebsd.org/changeset/base/254749 Log: Update vendor-sys/illumos/dist to 14157:85f7bb2246ca: Illumos ZFS issues: 4046 dsl_dataset_t ds_dir->dd_lock is highly contended Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dir.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Fri Aug 23 23:37:55 2013 (r254748) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Fri Aug 23 23:40:25 2013 (r254749) @@ -100,9 +100,8 @@ dsl_dataset_block_born(dsl_dataset_t *ds used, compressed, uncompressed); return; } - dmu_buf_will_dirty(ds->ds_dbuf, tx); - mutex_enter(&ds->ds_dir->dd_lock); + dmu_buf_will_dirty(ds->ds_dbuf, tx); mutex_enter(&ds->ds_lock); delta = parent_delta(ds, used); ds->ds_phys->ds_referenced_bytes += used; @@ -114,7 +113,6 @@ dsl_dataset_block_born(dsl_dataset_t *ds compressed, uncompressed, tx); dsl_dir_transfer_space(ds->ds_dir, used - delta, DD_USED_REFRSRV, DD_USED_HEAD, tx); - mutex_exit(&ds->ds_dir->dd_lock); } int @@ -149,7 +147,6 @@ dsl_dataset_block_kill(dsl_dataset_t *ds dprintf_bp(bp, "freeing ds=%llu", ds->ds_object); dsl_free(tx->tx_pool, tx->tx_txg, bp); - mutex_enter(&ds->ds_dir->dd_lock); mutex_enter(&ds->ds_lock); ASSERT(ds->ds_phys->ds_unique_bytes >= used || !DS_UNIQUE_IS_ACCURATE(ds)); @@ -160,7 +157,6 @@ dsl_dataset_block_kill(dsl_dataset_t *ds delta, -compressed, -uncompressed, tx); dsl_dir_transfer_space(ds->ds_dir, -used - delta, DD_USED_REFRSRV, DD_USED_HEAD, tx); - mutex_exit(&ds->ds_dir->dd_lock); } else { dprintf_bp(bp, "putting on dead list: %s", ""); if (async) { @@ -591,31 +587,6 @@ dsl_dataset_name(dsl_dataset_t *ds, char } } -static int -dsl_dataset_namelen(dsl_dataset_t *ds) -{ - int result; - - if (ds == NULL) { - result = 3; /* "mos" */ - } else { - result = dsl_dir_namelen(ds->ds_dir); - VERIFY0(dsl_dataset_get_snapname(ds)); - if (ds->ds_snapname[0]) { - ++result; /* adding one for the @-sign */ - if (!MUTEX_HELD(&ds->ds_lock)) { - mutex_enter(&ds->ds_lock); - result += strlen(ds->ds_snapname); - mutex_exit(&ds->ds_lock); - } else { - result += strlen(ds->ds_snapname); - } - } - } - - return (result); -} - void dsl_dataset_rele(dsl_dataset_t *ds, void *tag) { Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dir.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dir.c Fri Aug 23 23:37:55 2013 (r254748) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dir.c Fri Aug 23 23:40:25 2013 (r254749) @@ -841,11 +841,21 @@ dsl_dir_diduse_space(dsl_dir_t *dd, dd_u int64_t used, int64_t compressed, int64_t uncompressed, dmu_tx_t *tx) { int64_t accounted_delta; + + /* + * dsl_dataset_set_refreservation_sync_impl() calls this with + * dd_lock held, so that it can atomically update + * ds->ds_reserved and the dsl_dir accounting, so that + * dsl_dataset_check_quota() can see dataset and dir accounting + * consistently. + */ boolean_t needlock = !MUTEX_HELD(&dd->dd_lock); ASSERT(dmu_tx_is_syncing(tx)); ASSERT(type < DD_USED_NUM); + dmu_buf_will_dirty(dd->dd_dbuf, tx); + if (needlock) mutex_enter(&dd->dd_lock); accounted_delta = parent_delta(dd, dd->dd_phys->dd_used_bytes, used); @@ -854,7 +864,6 @@ dsl_dir_diduse_space(dsl_dir_t *dd, dd_u dd->dd_phys->dd_compressed_bytes >= -compressed); ASSERT(uncompressed >= 0 || dd->dd_phys->dd_uncompressed_bytes >= -uncompressed); - dmu_buf_will_dirty(dd->dd_dbuf, tx); dd->dd_phys->dd_used_bytes += used; dd->dd_phys->dd_uncompressed_bytes += uncompressed; dd->dd_phys->dd_compressed_bytes += compressed; @@ -887,8 +896,6 @@ void dsl_dir_transfer_space(dsl_dir_t *dd, int64_t delta, dd_used_t oldtype, dd_used_t newtype, dmu_tx_t *tx) { - boolean_t needlock = !MUTEX_HELD(&dd->dd_lock); - ASSERT(dmu_tx_is_syncing(tx)); ASSERT(oldtype < DD_USED_NUM); ASSERT(newtype < DD_USED_NUM); @@ -896,17 +903,15 @@ dsl_dir_transfer_space(dsl_dir_t *dd, in if (delta == 0 || !(dd->dd_phys->dd_flags & DD_FLAG_USED_BREAKDOWN)) return; - if (needlock) - mutex_enter(&dd->dd_lock); + dmu_buf_will_dirty(dd->dd_dbuf, tx); + mutex_enter(&dd->dd_lock); ASSERT(delta > 0 ? dd->dd_phys->dd_used_breakdown[oldtype] >= delta : dd->dd_phys->dd_used_breakdown[newtype] >= -delta); ASSERT(dd->dd_phys->dd_used_bytes >= ABS(delta)); - dmu_buf_will_dirty(dd->dd_dbuf, tx); dd->dd_phys->dd_used_breakdown[oldtype] -= delta; dd->dd_phys->dd_used_breakdown[newtype] += delta; - if (needlock) - mutex_exit(&dd->dd_lock); + mutex_exit(&dd->dd_lock); } typedef struct dsl_dir_set_qr_arg { From owner-svn-src-vendor@FreeBSD.ORG Fri Aug 23 23:46:28 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 17ABCAE6; Fri, 23 Aug 2013 23:46:28 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 023BB2C9B; Fri, 23 Aug 2013 23:46:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7NNkRDT072967; Fri, 23 Aug 2013 23:46:27 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7NNkRqk072964; Fri, 23 Aug 2013 23:46:27 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201308232346.r7NNkRqk072964@svn.freebsd.org> From: Xin LI Date: Fri, 23 Aug 2013 23:46:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r254750 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/lib/libzfs/common vendor/illumos... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Aug 2013 23:46:28 -0000 Author: delphij Date: Fri Aug 23 23:46:27 2013 New Revision: 254750 URL: http://svnweb.freebsd.org/changeset/base/254750 Log: Update vendor/illumos/dist and vendor-sys/illumos/dist to 14159:dc75c925d8aa: Illumos ZFS issues: 2932 support crash dumps to raidz, etc. pools Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c vendor/illumos/dist/man/man1m/zfs.1m vendor/illumos/dist/man/man5/zpool-features.5 Changes in other areas also in this revision: Added: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/vdev_raidz.h (contents, props changed) Modified: vendor-sys/illumos/dist/common/zfs/zfeature_common.c vendor-sys/illumos/dist/common/zfs/zfeature_common.h vendor-sys/illumos/dist/common/zfs/zfs_prop.c vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/vdev_disk.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zio.h vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_disk.c vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_raidz.c vendor-sys/illumos/dist/uts/common/fs/zfs/zio_checksum.c vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c Fri Aug 23 23:40:25 2013 (r254749) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c Fri Aug 23 23:46:27 2013 (r254750) @@ -23,6 +23,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ #include @@ -3958,9 +3959,7 @@ supported_dump_vdev_type(libzfs_handle_t uint_t children, c; verify(nvlist_lookup_string(config, ZPOOL_CONFIG_TYPE, &type) == 0); - if (strcmp(type, VDEV_TYPE_RAIDZ) == 0 || - strcmp(type, VDEV_TYPE_FILE) == 0 || - strcmp(type, VDEV_TYPE_LOG) == 0 || + if (strcmp(type, VDEV_TYPE_FILE) == 0 || strcmp(type, VDEV_TYPE_HOLE) == 0 || strcmp(type, VDEV_TYPE_MISSING) == 0) { zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, @@ -3979,8 +3978,12 @@ supported_dump_vdev_type(libzfs_handle_t } /* - * check if this zvol is allowable for use as a dump device; zero if - * it is, > 0 if it isn't, < 0 if it isn't a zvol + * Check if this zvol is allowable for use as a dump device; zero if + * it is, > 0 if it isn't, < 0 if it isn't a zvol. + * + * Allowable storage configurations include mirrors, all raidz variants, and + * pools with log, cache, and spare devices. Pools which are backed by files or + * have missing/hole vdevs are not suitable. */ int zvol_check_dump_config(char *arg) @@ -4042,12 +4045,6 @@ zvol_check_dump_config(char *arg) verify(nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN, &top, &toplevels) == 0); - if (toplevels != 1) { - zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "'%s' has multiple top level vdevs"), poolname); - (void) zfs_error(hdl, EZFS_DEVOVERFLOW, errbuf); - goto out; - } if (!supported_dump_vdev_type(hdl, top[0], errbuf)) { goto out; Modified: vendor/illumos/dist/man/man1m/zfs.1m ============================================================================== --- vendor/illumos/dist/man/man1m/zfs.1m Fri Aug 23 23:40:25 2013 (r254749) +++ vendor/illumos/dist/man/man1m/zfs.1m Fri Aug 23 23:46:27 2013 (r254750) @@ -23,9 +23,9 @@ .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. .\" Copyright 2011 Joshua M. Clulow .\" Copyright (c) 2012 by Delphix. All rights reserved. -.\" Copyright (c) 2012, Joyent, Inc. All rights reserved. .\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved. .\" Copyright 2013 Nexenta Systems, Inc. All Rights Reserved. +.\" Copyright (c) 2013, Joyent, Inc. All rights reserved. .\" .TH ZFS 1M "Jan 26, 2013" .SH NAME @@ -106,7 +106,7 @@ zfs \- configures ZFS file systems .LP .nf -\fBzfs\fR \fBget\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR][\fB-Hp\fR][\fB-o\fR \fIfield\fR[,\fIfield\fR]...] [\fB-t\fR \fItype\fR[,\fItype\fR]...] +\fBzfs\fR \fBget\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR][\fB-Hp\fR][\fB-o\fR \fIfield\fR[,\fIfield\fR]...] [\fB-t\fR \fItype\fR[,\fItype\fR]...] [\fB-s\fR \fIsource\fR[,\fIsource\fR]...] \fBall\fR | \fIproperty\fR[,\fIproperty\fR]... \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR... .fi @@ -934,15 +934,18 @@ This property is not inherited. .ne 2 .na \fB\fBchecksum\fR=\fBon\fR | \fBoff\fR | \fBfletcher2\fR | \fBfletcher4\fR | -\fBsha256\fR\fR +\fBsha256\fR | \fBnoparity\fR \fR .ad .sp .6 .RS 4n Controls the checksum used to verify data integrity. The default value is \fBon\fR, which automatically selects an appropriate algorithm (currently, \fBfletcher4\fR, but this may change in future releases). The value \fBoff\fR -disables integrity checking on user data. Disabling checksums is \fBNOT\fR a -recommended practice. +disables integrity checking on user data. The value \fBnoparity\fR not only +disables integrity but also disables maintaining parity for user data. This +setting is used internally by a dump device residing on a RAID-Z pool and should +not be used by any other dataset. Disabling checksums is \fBNOT\fR a recommended +practice. .sp Changing this property affects only newly-written data. .RE Modified: vendor/illumos/dist/man/man5/zpool-features.5 ============================================================================== --- vendor/illumos/dist/man/man5/zpool-features.5 Fri Aug 23 23:40:25 2013 (r254749) +++ vendor/illumos/dist/man/man5/zpool-features.5 Fri Aug 23 23:46:27 2013 (r254750) @@ -1,6 +1,7 @@ '\" te .\" Copyright (c) 2012 by Delphix. All rights reserved. .\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved. +.\" Copyright (c) 2013, Joyent, Inc. All rights reserved. .\" The contents of this file are subject to the terms of the Common Development .\" and Distribution License (the "License"). You may not use this file except .\" in compliance with the License. You can obtain a copy of the license at @@ -231,5 +232,26 @@ moment, this operation cannot be reverse .RE +.sp +.ne 2 +.na +\fB\fBmulti_vdev_crash_dump\fR\fR +.ad +.RS 4n +.TS +l l . +GUID com.joyent:multi_vdev_crash_dump +READ\-ONLY COMPATIBLE no +DEPENDENCIES none +.TE + +This feature allows a dump device to be configured with a pool comprised +of multiple vdevs. Those vdevs may be arranged in any mirrored or raidz +configuration. + +When the \fBmulti_vdev_crash_dump\fR feature is set to \fBenabled\fR, +the administrator can use the \fBdumpadm\fR(1M) command to configure a +dump device on a pool comprised of multiple vdevs. + .SH "SEE ALSO" \fBzpool\fR(1M) From owner-svn-src-vendor@FreeBSD.ORG Fri Aug 23 23:46:30 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A4C65AE7; Fri, 23 Aug 2013 23:46:30 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8E6EC2C9C; Fri, 23 Aug 2013 23:46:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7NNkUX6072990; Fri, 23 Aug 2013 23:46:30 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7NNkSLO072973; Fri, 23 Aug 2013 23:46:28 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201308232346.r7NNkSLO072973@svn.freebsd.org> From: Xin LI Date: Fri, 23 Aug 2013 23:46:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r254750 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/lib/libzfs/common vendor/illumos... X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Aug 2013 23:46:30 -0000 Author: delphij Date: Fri Aug 23 23:46:27 2013 New Revision: 254750 URL: http://svnweb.freebsd.org/changeset/base/254750 Log: Update vendor/illumos/dist and vendor-sys/illumos/dist to 14159:dc75c925d8aa: Illumos ZFS issues: 2932 support crash dumps to raidz, etc. pools Added: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/vdev_raidz.h (contents, props changed) Modified: vendor-sys/illumos/dist/common/zfs/zfeature_common.c vendor-sys/illumos/dist/common/zfs/zfeature_common.h vendor-sys/illumos/dist/common/zfs/zfs_prop.c vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/vdev_disk.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zio.h vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_disk.c vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_raidz.c vendor-sys/illumos/dist/uts/common/fs/zfs/zio_checksum.c vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c Changes in other areas also in this revision: Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c vendor/illumos/dist/man/man1m/zfs.1m vendor/illumos/dist/man/man5/zpool-features.5 Modified: vendor-sys/illumos/dist/common/zfs/zfeature_common.c ============================================================================== --- vendor-sys/illumos/dist/common/zfs/zfeature_common.c Fri Aug 23 23:40:25 2013 (r254749) +++ vendor-sys/illumos/dist/common/zfs/zfeature_common.c Fri Aug 23 23:46:27 2013 (r254750) @@ -22,6 +22,7 @@ /* * Copyright (c) 2012 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ #ifdef _KERNEL @@ -160,4 +161,7 @@ zpool_feature_init(void) zfeature_register(SPA_FEATURE_LZ4_COMPRESS, "org.illumos:lz4_compress", "lz4_compress", "LZ4 compression algorithm support.", B_FALSE, B_FALSE, NULL); + zfeature_register(SPA_FEATURE_MULTI_VDEV_CRASH_DUMP, + "com.joyent:multi_vdev_crash_dump", "multi_vdev_crash_dump", + "Crash dumps to multiple vdev pools.", B_FALSE, B_FALSE, NULL); } Modified: vendor-sys/illumos/dist/common/zfs/zfeature_common.h ============================================================================== --- vendor-sys/illumos/dist/common/zfs/zfeature_common.h Fri Aug 23 23:40:25 2013 (r254749) +++ vendor-sys/illumos/dist/common/zfs/zfeature_common.h Fri Aug 23 23:46:27 2013 (r254750) @@ -22,6 +22,7 @@ /* * Copyright (c) 2012 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ #ifndef _ZFEATURE_COMMON_H @@ -54,6 +55,7 @@ enum spa_feature { SPA_FEATURE_ASYNC_DESTROY, SPA_FEATURE_EMPTY_BPOBJ, SPA_FEATURE_LZ4_COMPRESS, + SPA_FEATURE_MULTI_VDEV_CRASH_DUMP, SPA_FEATURES } spa_feature_t; Modified: vendor-sys/illumos/dist/common/zfs/zfs_prop.c ============================================================================== --- vendor-sys/illumos/dist/common/zfs/zfs_prop.c Fri Aug 23 23:40:25 2013 (r254749) +++ vendor-sys/illumos/dist/common/zfs/zfs_prop.c Fri Aug 23 23:46:27 2013 (r254750) @@ -22,6 +22,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ /* Portions Copyright 2010 Robert Milkowski */ @@ -69,6 +70,7 @@ zfs_prop_init(void) { "fletcher2", ZIO_CHECKSUM_FLETCHER_2 }, { "fletcher4", ZIO_CHECKSUM_FLETCHER_4 }, { "sha256", ZIO_CHECKSUM_SHA256 }, + { "noparity", ZIO_CHECKSUM_NOPARITY }, { NULL } }; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Fri Aug 23 23:40:25 2013 (r254749) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Fri Aug 23 23:46:27 2013 (r254750) @@ -23,6 +23,7 @@ * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ #include @@ -2751,7 +2752,8 @@ dbuf_write(dbuf_dirty_record_t *dr, arc_ dr->dt.dl.dr_copies, dr->dt.dl.dr_nopwrite); mutex_exit(&db->db_mtx); } else if (db->db_state == DB_NOFILL) { - ASSERT(zp.zp_checksum == ZIO_CHECKSUM_OFF); + ASSERT(zp.zp_checksum == ZIO_CHECKSUM_OFF || + zp.zp_checksum == ZIO_CHECKSUM_NOPARITY); dr->dr_zio = zio_write(zio, os->os_spa, txg, db->db_blkptr, NULL, db->db.db_size, &zp, dbuf_write_nofill_ready, dbuf_write_nofill_done, db, Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c Fri Aug 23 23:40:25 2013 (r254749) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c Fri Aug 23 23:46:27 2013 (r254750) @@ -22,8 +22,8 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. */ - /* Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ +/* Copyright (c) 2013, Joyent, Inc. All rights reserved. */ #include #include @@ -1597,7 +1597,7 @@ dmu_write_policy(objset_t *os, dnode_t * * pipeline. */ compress = ZIO_COMPRESS_OFF; - checksum = ZIO_CHECKSUM_OFF; + checksum = ZIO_CHECKSUM_NOPARITY; } else { compress = zio_compress_select(dn->dn_compress, compress); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/vdev_disk.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/vdev_disk.h Fri Aug 23 23:40:25 2013 (r254749) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/vdev_disk.h Fri Aug 23 23:46:27 2013 (r254750) @@ -21,13 +21,12 @@ /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * Copyright (c) 2013 Joyent, Inc. All rights reserved. */ #ifndef _SYS_VDEV_DISK_H #define _SYS_VDEV_DISK_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include #ifdef _KERNEL #include @@ -40,14 +39,23 @@ extern "C" { #endif +#ifdef _KERNEL typedef struct vdev_disk { ddi_devid_t vd_devid; char *vd_minor; ldi_handle_t vd_lh; } vdev_disk_t; +#endif +extern int vdev_disk_physio(vdev_t *, + caddr_t, size_t, uint64_t, int, boolean_t); + +/* + * Since vdev_disk.c is not compiled into libzpool, this function should only be + * defined in the zfs kernel module. + */ #ifdef _KERNEL -extern int vdev_disk_physio(ldi_handle_t, caddr_t, size_t, uint64_t, int); +extern int vdev_disk_ldi_physio(ldi_handle_t, caddr_t, size_t, uint64_t, int); #endif #ifdef __cplusplus } Added: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/vdev_raidz.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/vdev_raidz.h Fri Aug 23 23:46:27 2013 (r254750) @@ -0,0 +1,48 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright (c) 2013, Joyent, Inc. All rights reserved. + */ + +#ifndef _SYS_VDEV_RAIDZ_H +#define _SYS_VDEV_RAIDZ_H + +#include +#include +#ifdef _KERNEL +#include +#include +#include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef _KERNEL +extern int vdev_raidz_physio(vdev_t *, + caddr_t, size_t, uint64_t, uint64_t, boolean_t, boolean_t); +#endif +#ifdef __cplusplus +} +#endif + +#endif /* _SYS_VDEV_RAIDZ_H */ Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zio.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zio.h Fri Aug 23 23:40:25 2013 (r254749) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zio.h Fri Aug 23 23:46:27 2013 (r254750) @@ -24,6 +24,7 @@ * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2012 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ #ifndef _ZIO_H @@ -79,6 +80,7 @@ enum zio_checksum { ZIO_CHECKSUM_FLETCHER_4, ZIO_CHECKSUM_SHA256, ZIO_CHECKSUM_ZILOG2, + ZIO_CHECKSUM_NOPARITY, ZIO_CHECKSUM_FUNCTIONS }; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_disk.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_disk.c Fri Aug 23 23:40:25 2013 (r254749) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_disk.c Fri Aug 23 23:46:27 2013 (r254750) @@ -22,6 +22,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright 2013 Nexenta Systems, Inc. All rights reserved. + * Copyright 2013 Joyent, Inc. All rights reserved. */ #include @@ -426,8 +427,29 @@ vdev_disk_close(vdev_t *vd) } int -vdev_disk_physio(ldi_handle_t vd_lh, caddr_t data, size_t size, - uint64_t offset, int flags) +vdev_disk_physio(vdev_t *vd, caddr_t data, + size_t size, uint64_t offset, int flags, boolean_t isdump) +{ + vdev_disk_t *dvd = vd->vdev_tsd; + + ASSERT(vd->vdev_ops == &vdev_disk_ops); + + /* + * If in the context of an active crash dump, use the ldi_dump(9F) + * call instead of ldi_strategy(9F) as usual. + */ + if (isdump) { + ASSERT3P(dvd, !=, NULL); + return (ldi_dump(dvd->vd_lh, data, lbtodb(offset), + lbtodb(size))); + } + + return (vdev_disk_ldi_physio(dvd->vd_lh, data, size, offset, flags)); +} + +int +vdev_disk_ldi_physio(ldi_handle_t vd_lh, caddr_t data, + size_t size, uint64_t offset, int flags) { buf_t *bp; int error = 0; @@ -675,7 +697,7 @@ vdev_disk_read_rootlabel(char *devpath, /* read vdev label */ offset = vdev_label_offset(size, l, 0); - if (vdev_disk_physio(vd_lh, (caddr_t)label, + if (vdev_disk_ldi_physio(vd_lh, (caddr_t)label, VDEV_SKIP_SIZE + VDEV_PHYS_SIZE, offset, B_READ) != 0) continue; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_raidz.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_raidz.c Fri Aug 23 23:40:25 2013 (r254749) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_raidz.c Fri Aug 23 23:46:27 2013 (r254750) @@ -22,11 +22,15 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ #include #include #include +#include +#include +#include #include #include #include @@ -154,6 +158,8 @@ typedef struct raidz_map { VDEV_RAIDZ_64MUL_2((x), mask); \ } +#define VDEV_LABEL_OFFSET(x) (x + VDEV_LABEL_START_SIZE) + /* * Force reconstruction to use the general purpose method. */ @@ -435,14 +441,14 @@ static const zio_vsd_ops_t vdev_raidz_vs * the number of children in the target vdev. */ static raidz_map_t * -vdev_raidz_map_alloc(zio_t *zio, uint64_t unit_shift, uint64_t dcols, - uint64_t nparity) +vdev_raidz_map_alloc(caddr_t data, uint64_t size, uint64_t offset, + uint64_t unit_shift, uint64_t dcols, uint64_t nparity) { raidz_map_t *rm; /* The starting RAIDZ (parent) vdev sector of the block. */ - uint64_t b = zio->io_offset >> unit_shift; + uint64_t b = offset >> unit_shift; /* The zio's size in units of the vdev's minimum sector size. */ - uint64_t s = zio->io_size >> unit_shift; + uint64_t s = size >> unit_shift; /* The first column for this stripe. */ uint64_t f = b % dcols; /* The starting byte offset on each child vdev. */ @@ -533,7 +539,7 @@ vdev_raidz_map_alloc(zio_t *zio, uint64_ for (c = 0; c < rm->rm_firstdatacol; c++) rm->rm_col[c].rc_data = zio_buf_alloc(rm->rm_col[c].rc_size); - rm->rm_col[c].rc_data = zio->io_data; + rm->rm_col[c].rc_data = data; for (c = c + 1; c < acols; c++) rm->rm_col[c].rc_data = (char *)rm->rm_col[c - 1].rc_data + @@ -562,7 +568,7 @@ vdev_raidz_map_alloc(zio_t *zio, uint64_ ASSERT(rm->rm_cols >= 2); ASSERT(rm->rm_col[0].rc_size == rm->rm_col[1].rc_size); - if (rm->rm_firstdatacol == 1 && (zio->io_offset & (1ULL << 20))) { + if (rm->rm_firstdatacol == 1 && (offset & (1ULL << 20))) { devidx = rm->rm_col[0].rc_devidx; o = rm->rm_col[0].rc_offset; rm->rm_col[0].rc_devidx = rm->rm_col[1].rc_devidx; @@ -574,8 +580,6 @@ vdev_raidz_map_alloc(zio_t *zio, uint64_ rm->rm_skipstart = 1; } - zio->io_vsd = rm; - zio->io_vsd_ops = &vdev_raidz_vsd_ops; return (rm); } @@ -985,12 +989,9 @@ vdev_raidz_reconstruct_pq(raidz_map_t *r * ~~ ~~ * __ __ * | 1 1 1 1 1 1 1 1 | - * | 128 64 32 16 8 4 2 1 | * | 19 205 116 29 64 16 4 1 | * | 1 0 0 0 0 0 0 0 | - * | 0 1 0 0 0 0 0 0 | - * (V|I)' = | 0 0 1 0 0 0 0 0 | - * | 0 0 0 1 0 0 0 0 | + * (V|I)' = | 0 0 0 1 0 0 0 0 | * | 0 0 0 0 1 0 0 0 | * | 0 0 0 0 0 1 0 0 | * | 0 0 0 0 0 0 1 0 | @@ -1522,6 +1523,152 @@ vdev_raidz_close(vdev_t *vd) vdev_close(vd->vdev_child[c]); } +/* + * Handle a read or write I/O to a RAID-Z dump device. + * + * The dump device is in a unique situation compared to other ZFS datasets: + * writing to this device should be as simple and fast as possible. In + * addition, durability matters much less since the dump will be extracted + * once the machine reboots. For that reason, this function eschews parity for + * performance and simplicity. The dump device uses the checksum setting + * ZIO_CHECKSUM_NOPARITY to indicate that parity is not maintained for this + * dataset. + * + * Blocks of size 128 KB have been preallocated for this volume. I/Os less than + * 128 KB will not fill an entire block; in addition, they may not be properly + * aligned. In that case, this function uses the preallocated 128 KB block and + * omits reading or writing any "empty" portions of that block, as opposed to + * allocating a fresh appropriately-sized block. + * + * Looking at an example of a 32 KB I/O to a RAID-Z vdev with 5 child vdevs: + * + * vdev_raidz_io_start(data, size: 32 KB, offset: 64 KB) + * + * If this were a standard RAID-Z dataset, a block of at least 40 KB would be + * allocated which spans all five child vdevs. 8 KB of data would be written to + * each of four vdevs, with the fifth containing the parity bits. + * + * parity data data data data + * | PP | XX | XX | XX | XX | + * ^ ^ ^ ^ ^ + * | | | | | + * 8 KB parity ------8 KB data blocks------ + * + * However, when writing to the dump device, the behavior is different: + * + * vdev_raidz_physio(data, size: 32 KB, offset: 64 KB) + * + * Unlike the normal RAID-Z case in which the block is allocated based on the + * I/O size, reads and writes here always use a 128 KB logical I/O size. If the + * I/O size is less than 128 KB, only the actual portions of data are written. + * In this example the data is written to the third data vdev since that vdev + * contains the offset [64 KB, 96 KB). + * + * parity data data data data + * | | | | XX | | + * ^ + * | + * 32 KB data block + * + * As a result, an individual I/O may not span all child vdevs; moreover, a + * small I/O may only operate on a single child vdev. + * + * Note that since there are no parity bits calculated or written, this format + * remains the same no matter how many parity bits are used in a normal RAID-Z + * stripe. On a RAID-Z3 configuration with seven child vdevs, the example above + * would look like: + * + * parity parity parity data data data data + * | | | | | | XX | | + * ^ + * | + * 32 KB data block + */ +int +vdev_raidz_physio(vdev_t *vd, caddr_t data, size_t size, + uint64_t offset, uint64_t origoffset, boolean_t doread, boolean_t isdump) +{ + vdev_t *tvd = vd->vdev_top; + vdev_t *cvd; + raidz_map_t *rm; + raidz_col_t *rc; + int c, err = 0; + + uint64_t start, end, colstart, colend; + uint64_t coloffset, colsize, colskip; + + int flags = doread ? B_READ : B_WRITE; + +#ifdef _KERNEL + + /* + * Don't write past the end of the block + */ + VERIFY3U(offset + size, <=, origoffset + SPA_MAXBLOCKSIZE); + + start = offset; + end = start + size; + + /* + * Allocate a RAID-Z map for this block. Note that this block starts + * from the "original" offset, this is, the offset of the extent which + * contains the requisite offset of the data being read or written. + * + * Even if this I/O operation doesn't span the full block size, let's + * treat the on-disk format as if the only blocks are the complete 128 + * KB size. + */ + rm = vdev_raidz_map_alloc(data - (offset - origoffset), + SPA_MAXBLOCKSIZE, origoffset, tvd->vdev_ashift, vd->vdev_children, + vd->vdev_nparity); + + coloffset = origoffset; + + for (c = rm->rm_firstdatacol; c < rm->rm_cols; + c++, coloffset += rc->rc_size) { + rc = &rm->rm_col[c]; + cvd = vd->vdev_child[rc->rc_devidx]; + + /* + * Find the start and end of this column in the RAID-Z map, + * keeping in mind that the stated size and offset of the + * operation may not fill the entire column for this vdev. + * + * If any portion of the data spans this column, issue the + * appropriate operation to the vdev. + */ + if (coloffset + rc->rc_size <= start) + continue; + if (coloffset >= end) + continue; + + colstart = MAX(coloffset, start); + colend = MIN(end, coloffset + rc->rc_size); + colsize = colend - colstart; + colskip = colstart - coloffset; + + VERIFY3U(colsize, <=, rc->rc_size); + VERIFY3U(colskip, <=, rc->rc_size); + + /* + * Note that the child vdev will have a vdev label at the start + * of its range of offsets, hence the need for + * VDEV_LABEL_OFFSET(). See zio_vdev_child_io() for another + * example of why this calculation is needed. + */ + if ((err = vdev_disk_physio(cvd, + ((char *)rc->rc_data) + colskip, colsize, + VDEV_LABEL_OFFSET(rc->rc_offset) + colskip, + flags, isdump)) != 0) + break; + } + + vdev_raidz_map_free(rm); +#endif /* KERNEL */ + + return (err); +} + static uint64_t vdev_raidz_asize(vdev_t *vd, uint64_t psize) { @@ -1574,9 +1721,13 @@ vdev_raidz_io_start(zio_t *zio) raidz_col_t *rc; int c, i; - rm = vdev_raidz_map_alloc(zio, tvd->vdev_ashift, vd->vdev_children, + rm = vdev_raidz_map_alloc(zio->io_data, zio->io_size, zio->io_offset, + tvd->vdev_ashift, vd->vdev_children, vd->vdev_nparity); + zio->io_vsd = rm; + zio->io_vsd_ops = &vdev_raidz_vsd_ops; + ASSERT3U(rm->rm_asize, ==, vdev_psize_to_asize(vd, zio->io_size)); if (zio->io_type == ZIO_TYPE_WRITE) { @@ -1707,6 +1858,13 @@ raidz_parity_verify(zio_t *zio, raidz_ma int c, ret = 0; raidz_col_t *rc; + blkptr_t *bp = zio->io_bp; + enum zio_checksum checksum = (bp == NULL ? zio->io_prop.zp_checksum : + (BP_IS_GANG(bp) ? ZIO_CHECKSUM_GANG_HEADER : BP_GET_CHECKSUM(bp))); + + if (checksum == ZIO_CHECKSUM_NOPARITY) + return (ret); + for (c = 0; c < rm->rm_firstdatacol; c++) { rc = &rm->rm_col[c]; if (!rc->rc_tried || rc->rc_error != 0) Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zio_checksum.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zio_checksum.c Fri Aug 23 23:40:25 2013 (r254749) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zio_checksum.c Fri Aug 23 23:46:27 2013 (r254750) @@ -21,6 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ #include @@ -78,6 +79,7 @@ zio_checksum_info_t zio_checksum_table[Z {{fletcher_4_native, fletcher_4_byteswap}, 1, 0, 0, "fletcher4"}, {{zio_checksum_SHA256, zio_checksum_SHA256}, 1, 0, 1, "sha256"}, {{fletcher_4_native, fletcher_4_byteswap}, 0, 1, 0, "zilog2"}, + {{zio_checksum_off, zio_checksum_off}, 0, 0, 0, "noparity"}, }; enum zio_checksum Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c Fri Aug 23 23:40:25 2013 (r254749) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c Fri Aug 23 23:46:27 2013 (r254750) @@ -25,6 +25,7 @@ * * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ /* @@ -54,6 +55,7 @@ #include #include #include +#include #include #include #include @@ -77,10 +79,14 @@ #include #include #include +#include #include #include #include #include +#include +#include +#include #include "zfs_namecheck.h" @@ -1101,27 +1107,28 @@ zvol_log_write(zvol_state_t *zv, dmu_tx_ } static int -zvol_dumpio_vdev(vdev_t *vd, void *addr, uint64_t offset, uint64_t size, - boolean_t doread, boolean_t isdump) +zvol_dumpio_vdev(vdev_t *vd, void *addr, uint64_t offset, uint64_t origoffset, + uint64_t size, boolean_t doread, boolean_t isdump) { vdev_disk_t *dvd; int c; int numerrors = 0; - for (c = 0; c < vd->vdev_children; c++) { - ASSERT(vd->vdev_ops == &vdev_mirror_ops || - vd->vdev_ops == &vdev_replacing_ops || - vd->vdev_ops == &vdev_spare_ops); - int err = zvol_dumpio_vdev(vd->vdev_child[c], - addr, offset, size, doread, isdump); - if (err != 0) { - numerrors++; - } else if (doread) { - break; + if (vd->vdev_ops == &vdev_mirror_ops || + vd->vdev_ops == &vdev_replacing_ops || + vd->vdev_ops == &vdev_spare_ops) { + for (c = 0; c < vd->vdev_children; c++) { + int err = zvol_dumpio_vdev(vd->vdev_child[c], + addr, offset, origoffset, size, doread, isdump); + if (err != 0) { + numerrors++; + } else if (doread) { + break; + } } } - if (!vd->vdev_ops->vdev_op_leaf) + if (!vd->vdev_ops->vdev_op_leaf && vd->vdev_ops != &vdev_raidz_ops) return (numerrors < vd->vdev_children ? 0 : EIO); if (doread && !vdev_readable(vd)) @@ -1129,19 +1136,26 @@ zvol_dumpio_vdev(vdev_t *vd, void *addr, else if (!doread && !vdev_writeable(vd)) return (SET_ERROR(EIO)); - dvd = vd->vdev_tsd; - ASSERT3P(dvd, !=, NULL); + if (vd->vdev_ops == &vdev_raidz_ops) { + return (vdev_raidz_physio(vd, + addr, size, offset, origoffset, doread, isdump)); + } + offset += VDEV_LABEL_START_SIZE; if (ddi_in_panic() || isdump) { ASSERT(!doread); if (doread) return (SET_ERROR(EIO)); + dvd = vd->vdev_tsd; + ASSERT3P(dvd, !=, NULL); return (ldi_dump(dvd->vd_lh, addr, lbtodb(offset), lbtodb(size))); } else { - return (vdev_disk_physio(dvd->vd_lh, addr, size, offset, - doread ? B_READ : B_WRITE)); + dvd = vd->vdev_tsd; + ASSERT3P(dvd, !=, NULL); + return (vdev_disk_ldi_physio(dvd->vd_lh, addr, size, + offset, doread ? B_READ : B_WRITE)); } } @@ -1176,7 +1190,8 @@ zvol_dumpio(zvol_state_t *zv, void *addr vd = vdev_lookup_top(spa, DVA_GET_VDEV(&ze->ze_dva)); offset += DVA_GET_OFFSET(&ze->ze_dva); - error = zvol_dumpio_vdev(vd, addr, offset, size, doread, isdump); + error = zvol_dumpio_vdev(vd, addr, offset, DVA_GET_OFFSET(&ze->ze_dva), + size, doread, isdump); if (!ddi_in_panic()) spa_config_exit(spa, SCL_STATE, FTAG); @@ -1196,7 +1211,7 @@ zvol_strategy(buf_t *bp) rl_t *rl; int error = 0; boolean_t doread = bp->b_flags & B_READ; - boolean_t is_dump; + boolean_t is_dumpified; boolean_t sync; if (getminor(bp->b_edev) == 0) { @@ -1239,11 +1254,11 @@ zvol_strategy(buf_t *bp) return (0); } - is_dump = zv->zv_flags & ZVOL_DUMPIFIED; + is_dumpified = zv->zv_flags & ZVOL_DUMPIFIED; sync = ((!(bp->b_flags & B_ASYNC) && !(zv->zv_flags & ZVOL_WCE)) || (zv->zv_objset->os_sync == ZFS_SYNC_ALWAYS)) && - !doread && !is_dump; + !doread && !is_dumpified; /* * There must be no buffer changes when doing a dmu_sync() because @@ -1254,7 +1269,7 @@ zvol_strategy(buf_t *bp) while (resid != 0 && off < volsize) { size_t size = MIN(resid, zvol_maxphys); - if (is_dump) { + if (is_dumpified) { size = MIN(size, P2END(off, zv->zv_volblocksize) - off); error = zvol_dumpio(zv, addr, off, size, doread, B_FALSE); @@ -1813,21 +1828,67 @@ zvol_fini(void) ddi_soft_state_fini(&zfsdev_state); } +/*ARGSUSED*/ +static int +zfs_mvdev_dump_feature_check(void *arg, dmu_tx_t *tx) +{ + spa_t *spa = dmu_tx_pool(tx)->dp_spa; + + if (spa_feature_is_active(spa, + &spa_feature_table[SPA_FEATURE_MULTI_VDEV_CRASH_DUMP])) + return (1); + return (0); +} + +/*ARGSUSED*/ +static void +zfs_mvdev_dump_activate_feature_sync(void *arg, dmu_tx_t *tx) +{ + spa_t *spa = dmu_tx_pool(tx)->dp_spa; + + spa_feature_incr(spa, + &spa_feature_table[SPA_FEATURE_MULTI_VDEV_CRASH_DUMP], tx); +} + static int zvol_dump_init(zvol_state_t *zv, boolean_t resize) { dmu_tx_t *tx; - int error = 0; + int error; objset_t *os = zv->zv_objset; + spa_t *spa = dmu_objset_spa(os); + vdev_t *vd = spa->spa_root_vdev; nvlist_t *nv = NULL; - uint64_t version = spa_version(dmu_objset_spa(zv->zv_objset)); + uint64_t version = spa_version(spa); + enum zio_checksum checksum; ASSERT(MUTEX_HELD(&zfsdev_state_lock)); + ASSERT(vd->vdev_ops == &vdev_root_ops); + error = dmu_free_long_range(zv->zv_objset, ZVOL_OBJ, 0, DMU_OBJECT_END); /* wait for dmu_free_long_range to actually free the blocks */ txg_wait_synced(dmu_objset_pool(zv->zv_objset), 0); + /* + * If the pool on which the dump device is being initialized has more + * than one child vdev, check that the MULTI_VDEV_CRASH_DUMP feature is + * enabled. If so, bump that feature's counter to indicate that the + * feature is active. We also check the vdev type to handle the + * following case: + * # zpool create test raidz disk1 disk2 disk3 + * Now have spa_root_vdev->vdev_children == 1 (the raidz vdev), + * the raidz vdev itself has 3 children. + */ + if (vd->vdev_children > 1 || vd->vdev_ops == &vdev_raidz_ops) { + if (!spa_feature_is_enabled(spa, + &spa_feature_table[SPA_FEATURE_MULTI_VDEV_CRASH_DUMP])) + return (SET_ERROR(ENOTSUP)); + (void) dsl_sync_task(spa_name(spa), + zfs_mvdev_dump_feature_check, + zfs_mvdev_dump_activate_feature_sync, NULL, 2); + } + tx = dmu_tx_create(os); dmu_tx_hold_zap(tx, ZVOL_ZAP_OBJ, TRUE, NULL); dmu_tx_hold_bonus(tx, ZVOL_OBJ); @@ -1838,6 +1899,14 @@ zvol_dump_init(zvol_state_t *zv, boolean } /* + * If MULTI_VDEV_CRASH_DUMP is active, use the NOPARITY checksum + * function. Otherwise, use the old default -- OFF. + */ + checksum = spa_feature_is_active(spa, + &spa_feature_table[SPA_FEATURE_MULTI_VDEV_CRASH_DUMP]) ? + ZIO_CHECKSUM_NOPARITY : ZIO_CHECKSUM_OFF; + + /* * If we are resizing the dump device then we only need to * update the refreservation to match the newly updated * zvolsize. Otherwise, we save off the original state of the @@ -1900,7 +1969,7 @@ zvol_dump_init(zvol_state_t *zv, boolean ZIO_COMPRESS_OFF) == 0); VERIFY(nvlist_add_uint64(nv, zfs_prop_to_name(ZFS_PROP_CHECKSUM), - ZIO_CHECKSUM_OFF) == 0); + checksum) == 0); if (version >= SPA_VERSION_DEDUP) { VERIFY(nvlist_add_uint64(nv, zfs_prop_to_name(ZFS_PROP_DEDUP), From owner-svn-src-vendor@FreeBSD.ORG Fri Aug 23 23:47:59 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 91676D4F; Fri, 23 Aug 2013 23:47:59 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7EADA2CB5; Fri, 23 Aug 2013 23:47:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7NNlx3R073487; Fri, 23 Aug 2013 23:47:59 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7NNlx3a073486; Fri, 23 Aug 2013 23:47:59 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201308232347.r7NNlx3a073486@svn.freebsd.org> From: Xin LI Date: Fri, 23 Aug 2013 23:47:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r254751 - vendor/illumos/dist/cmd/zpool X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Aug 2013 23:47:59 -0000 Author: delphij Date: Fri Aug 23 23:47:59 2013 New Revision: 254751 URL: http://svnweb.freebsd.org/changeset/base/254751 Log: Update vendor/illumos/dist to 14160:734110b9882f: Illumos ZFS issues: 1765 assert triggered in libzfs_import.c trying to import pool name beginning with a number Modified: vendor/illumos/dist/cmd/zpool/zpool_main.c Modified: vendor/illumos/dist/cmd/zpool/zpool_main.c ============================================================================== --- vendor/illumos/dist/cmd/zpool/zpool_main.c Fri Aug 23 23:46:27 2013 (r254750) +++ vendor/illumos/dist/cmd/zpool/zpool_main.c Fri Aug 23 23:47:59 2013 (r254751) @@ -24,6 +24,7 @@ * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2012 by Delphix. All rights reserved. * Copyright (c) 2012 by Frederik Wessels. All rights reserved. + * Copyright (c) 2013 by Prasad Joshi (sTec). All rights reserved. */ #include @@ -1988,8 +1989,10 @@ zpool_do_import(int argc, char **argv) errno = 0; searchguid = strtoull(argv[0], &endptr, 10); - if (errno != 0 || *endptr != '\0') + if (errno != 0 || *endptr != '\0') { searchname = argv[0]; + searchguid = 0; + } found_config = NULL; /*