From owner-svn-src-projects@FreeBSD.ORG Sun Sep 16 00:12:22 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7A3AD106566C; Sun, 16 Sep 2012 00:12:22 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id F00408FC08; Sun, 16 Sep 2012 00:12:20 +0000 (UTC) Received: by lbbgg13 with SMTP id gg13so4270554lbb.13 for ; Sat, 15 Sep 2012 17:12:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=R5qTMj6oMtP+ynIZrVL23BGJNqCp6SCa0UuruvIJ0a4=; b=UmsLxPTeIuZhTT4v89LeB6ZjNZ+CsTcVJTzGSPmXO2QL46Qj1+ZPxN0tToSWihliw7 RCVPlCIG95sxQbyDC3dw8lcrKAk9TvVnym0eHrZQLoJ0oT1AoH0bQdIQkd9E/TrWmtIc RK1pQb9Jv5Fu1KxMpQb82/n79/ce+uffQu8yX0WhpuC2cWYu28fEQYS7m5A1rGyNmcP2 YSS2oBuNuba21WYrEqog/Zf2ambo9zcX79DtcMWuoTeW3pqJwMemUe+UAItLqrAbjao+ jUl+kVGruQ+3cqej68v7ADv/4pDTb+zjJ5Fjc9FYnkQSDBZo3mkKtAkNLjVrUI+L5CPw y2jw== MIME-Version: 1.0 Received: by 10.152.131.68 with SMTP id ok4mr6280736lab.47.1347754339760; Sat, 15 Sep 2012 17:12:19 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.102.39 with HTTP; Sat, 15 Sep 2012 17:12:19 -0700 (PDT) In-Reply-To: <505514D5.90800@FreeBSD.org> References: <201207301350.q6UDobCI099069@svn.freebsd.org> <201209130910.50876.jhb@freebsd.org> <201209131132.21103.jhb@freebsd.org> <505514D5.90800@FreeBSD.org> Date: Sun, 16 Sep 2012 01:12:19 +0100 X-Google-Sender-Auth: cvN7fZW8slH6BfDInflu3G0SmrY Message-ID: From: Attilio Rao To: John Baldwin Content-Type: text/plain; charset=UTF-8 Cc: Davide Italiano , mlaier@freebsd.org, svn-src-projects@freebsd.org, Konstantin Belousov , src-committers@freebsd.org, Stephan Uphoff Subject: Re: svn commit: r238907 - projects/calloutng/sys/kern X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Sep 2012 00:12:22 -0000 On Sun, Sep 16, 2012 at 12:52 AM, John Baldwin wrote: > On 9/14/12 6:32 PM, Attilio Rao wrote: >> On Thu, Sep 13, 2012 at 5:20 PM, Attilio Rao wrote: >>> On 9/13/12, John Baldwin wrote: >>>> On Thursday, September 13, 2012 10:38:54 am Attilio Rao wrote: >>>>> On Thu, Sep 13, 2012 at 2:10 PM, John Baldwin wrote: >>>>>> On Wednesday, September 12, 2012 9:36:58 pm Attilio Rao wrote: >>>>>>> On Thu, Aug 2, 2012 at 10:07 PM, John Baldwin wrote: >>>>>>>> On Thursday, August 02, 2012 4:56:03 pm Attilio Rao wrote: >>>>>>>>> On 7/30/12, John Baldwin wrote: >>>>>>>>>> --- //depot/projects/smpng/sys/kern/kern_rmlock.c 2012-03-25 >>>>>>>>>> 18:45:29.000000000 0000 >>>>>>>>>> +++ //depot/user/jhb/lock/kern/kern_rmlock.c 2012-06-18 >>>>>>>>>> 21:20:58.000000000 >>>>>>>>>> 0000 >>>>>>>>>> @@ -70,6 +70,9 @@ >>>>>>>>>> } >>>>>>>>>> >>>>>>>>>> static void assert_rm(const struct lock_object *lock, int >>>>>>>>>> what); >>>>>>>>>> +#ifdef DDB >>>>>>>>>> +static void db_show_rm(const struct lock_object *lock); >>>>>>>>>> +#endif >>>>>>>>>> static void lock_rm(struct lock_object *lock, int how); >>>>>>>>>> #ifdef KDTRACE_HOOKS >>>>>>>>>> static int owner_rm(const struct lock_object *lock, struct >>>>>>>>>> thread >>>>>>>>>> **owner); >>>>>>>>> >>>>>>>>> While here, did you consider also: >>>>>>>>> - Abstracting compiler_memory_barrier() into a MI, compiler >>>>>>>>> dependent function? >>>>>>>>> - Fix rm_queue with DCPU possibly >>>>>>>> >>>>>>>> Mostly I just wanted to fill in missing functionality and fixup the >>>>>>>> RM_SLEEPABLE bits a bit. >>>>>>> >>>>>>> So what do you think about the following patch? If you agree I will >>>>>>> send to pho@ for testing in a batch with other patches. >>>>>> >>>>>> It's not super clear to me that having it be static vs dynamic is all >>>>>> that >>>>>> big of a deal. However, your approach in general is better, and it >>>>>> certainly >>>>>> should have been using PCPU_GET() for the curcpu case all along rather >>>>>> than >>>>>> inlining pcpu_find(). >>>>> >>>>> You mean what is the performance difference between static vs dynamic? >>>>> Or you mean, why we want such patch at all? >>>>> In the former question there is a further indirection (pc_dynamic >>>>> access), for the latter question the patched code avoids namespace >>>>> pollution at all and makes the code more readable. >>>> >>>> More why we want it. I think most of your readability fixes would work >>>> just >>>> as well if it remained static and we used PCPU_GET(). However, I think >>>> your >>>> changes are fine. >>> >>> Well, the namespace pollution cannot be avoided without using the >>> dynamic approach, and that is the important part of the patch. >>> >>>> FYI, much of subr_rmlock.c goes out of its way to optimize for performance >>>> (such as inlining critical_enter(), critical_exit(), and pcpu_find()), so >>>> adding the new indirection goes against the grain of that. >>> >> >> I've thought about it and I think that avoiding the indirection is >> sensitive in that codepath. I've then came up with this patch which >> should avoid namespace pollution and the indirection. >> >> What do you think about it? > > Why not just move rm_queue to _rmlock.h and make pcpu.h include that? > > Barring that, make a _rmlock_queue.h and have both headers include that. > However, I think that having _rmlock.h in pcpu.h is fine. Did you read the git commit log? _rmlock.h brings along a lot of other dependencies so it will result anyway in (a different type) of namespace pollution. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-projects@FreeBSD.ORG Sun Sep 16 00:22:34 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6E94106564A; Sun, 16 Sep 2012 00:22:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 96F008FC15; Sun, 16 Sep 2012 00:22:34 +0000 (UTC) Received: from John-Baldwins-MacBook-Air.local (c-68-39-198-164.hsd1.de.comcast.net [68.39.198.164]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id CBC1BB949; Sat, 15 Sep 2012 20:22:33 -0400 (EDT) Message-ID: <50551BCA.4020303@FreeBSD.org> Date: Sat, 15 Sep 2012 20:22:34 -0400 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:15.0) Gecko/20120824 Thunderbird/15.0 MIME-Version: 1.0 To: attilio@FreeBSD.org References: <201207301350.q6UDobCI099069@svn.freebsd.org> <201209130910.50876.jhb@freebsd.org> <201209131132.21103.jhb@freebsd.org> <505514D5.90800@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Sat, 15 Sep 2012 20:22:34 -0400 (EDT) Cc: Davide Italiano , mlaier@freebsd.org, svn-src-projects@freebsd.org, Konstantin Belousov , src-committers@freebsd.org, Stephan Uphoff Subject: Re: svn commit: r238907 - projects/calloutng/sys/kern X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Sep 2012 00:22:34 -0000 On 9/15/12 8:12 PM, Attilio Rao wrote: > On Sun, Sep 16, 2012 at 12:52 AM, John Baldwin wrote: >> On 9/14/12 6:32 PM, Attilio Rao wrote: >>> On Thu, Sep 13, 2012 at 5:20 PM, Attilio Rao wrote: >>>> On 9/13/12, John Baldwin wrote: >>>>> On Thursday, September 13, 2012 10:38:54 am Attilio Rao wrote: >>>>>> On Thu, Sep 13, 2012 at 2:10 PM, John Baldwin wrote: >>>>>>> On Wednesday, September 12, 2012 9:36:58 pm Attilio Rao wrote: >>>>>>>> On Thu, Aug 2, 2012 at 10:07 PM, John Baldwin wrote: >>>>>>>>> On Thursday, August 02, 2012 4:56:03 pm Attilio Rao wrote: >>>>>>>>>> On 7/30/12, John Baldwin wrote: >>>>>>>>>>> --- //depot/projects/smpng/sys/kern/kern_rmlock.c 2012-03-25 >>>>>>>>>>> 18:45:29.000000000 0000 >>>>>>>>>>> +++ //depot/user/jhb/lock/kern/kern_rmlock.c 2012-06-18 >>>>>>>>>>> 21:20:58.000000000 >>>>>>>>>>> 0000 >>>>>>>>>>> @@ -70,6 +70,9 @@ >>>>>>>>>>> } >>>>>>>>>>> >>>>>>>>>>> static void assert_rm(const struct lock_object *lock, int >>>>>>>>>>> what); >>>>>>>>>>> +#ifdef DDB >>>>>>>>>>> +static void db_show_rm(const struct lock_object *lock); >>>>>>>>>>> +#endif >>>>>>>>>>> static void lock_rm(struct lock_object *lock, int how); >>>>>>>>>>> #ifdef KDTRACE_HOOKS >>>>>>>>>>> static int owner_rm(const struct lock_object *lock, struct >>>>>>>>>>> thread >>>>>>>>>>> **owner); >>>>>>>>>> >>>>>>>>>> While here, did you consider also: >>>>>>>>>> - Abstracting compiler_memory_barrier() into a MI, compiler >>>>>>>>>> dependent function? >>>>>>>>>> - Fix rm_queue with DCPU possibly >>>>>>>>> >>>>>>>>> Mostly I just wanted to fill in missing functionality and fixup the >>>>>>>>> RM_SLEEPABLE bits a bit. >>>>>>>> >>>>>>>> So what do you think about the following patch? If you agree I will >>>>>>>> send to pho@ for testing in a batch with other patches. >>>>>>> >>>>>>> It's not super clear to me that having it be static vs dynamic is all >>>>>>> that >>>>>>> big of a deal. However, your approach in general is better, and it >>>>>>> certainly >>>>>>> should have been using PCPU_GET() for the curcpu case all along rather >>>>>>> than >>>>>>> inlining pcpu_find(). >>>>>> >>>>>> You mean what is the performance difference between static vs dynamic? >>>>>> Or you mean, why we want such patch at all? >>>>>> In the former question there is a further indirection (pc_dynamic >>>>>> access), for the latter question the patched code avoids namespace >>>>>> pollution at all and makes the code more readable. >>>>> >>>>> More why we want it. I think most of your readability fixes would work >>>>> just >>>>> as well if it remained static and we used PCPU_GET(). However, I think >>>>> your >>>>> changes are fine. >>>> >>>> Well, the namespace pollution cannot be avoided without using the >>>> dynamic approach, and that is the important part of the patch. >>>> >>>>> FYI, much of subr_rmlock.c goes out of its way to optimize for performance >>>>> (such as inlining critical_enter(), critical_exit(), and pcpu_find()), so >>>>> adding the new indirection goes against the grain of that. >>>> >>> >>> I've thought about it and I think that avoiding the indirection is >>> sensitive in that codepath. I've then came up with this patch which >>> should avoid namespace pollution and the indirection. >>> >>> What do you think about it? >> >> Why not just move rm_queue to _rmlock.h and make pcpu.h include that? >> >> Barring that, make a _rmlock_queue.h and have both headers include that. >> However, I think that having _rmlock.h in pcpu.h is fine. > > Did you read the git commit log? _rmlock.h brings along a lot of other > dependencies so it will result anyway in (a different type) of > namespace pollution. It brings in a few structs, yes. However, I don't think we have considered that level of pollution harmful. That is why we have a _rmlock.h separate from rmlock.h. -- John Baldwin From owner-svn-src-projects@FreeBSD.ORG Sun Sep 16 01:01:16 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7553F1065672; Sun, 16 Sep 2012 01:01:16 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id DBF828FC14; Sun, 16 Sep 2012 01:01:14 +0000 (UTC) Received: by lage12 with SMTP id e12so4226777lag.13 for ; Sat, 15 Sep 2012 18:01:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=Lec9PxwDTSCYpPEHvQ4/2uKSb2XQPN77uMDHBtHZqaE=; b=qSyEO8ZoiOQNhAcvttgcMlfCp+F7jAB+f2MWkG7zaFLyuRezJmdLb2mnDMIoDFUCnw Z0XSCRmzcZkGe8mWy58WBa5SgcDijk9msTG89v/8nSQmGj0O3pNk0psnL1cbUCvqWeYv BEB1JsxayUFdk5wd6/EpF1CZROP86qR3GLk6hOsFmDf1jhC/C4WkNSKW3vQ7EcqQ3OXb wk/zCtHVZE3F85FhYEeO/43ejE31CX3GxEzdUj2ZfHEhbCo/Xv2rLaZtZjevssm7etdZ dmLIaD1if3ANOPsVNW+2VcJ5VMHzDEeH/4i8Dw9WPXL4nRGibtU18xfAdDd5fH/Z4oyU JqJQ== MIME-Version: 1.0 Received: by 10.112.83.97 with SMTP id p1mr2616404lby.94.1347757273519; Sat, 15 Sep 2012 18:01:13 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.102.39 with HTTP; Sat, 15 Sep 2012 18:01:13 -0700 (PDT) In-Reply-To: <50551BCA.4020303@FreeBSD.org> References: <201207301350.q6UDobCI099069@svn.freebsd.org> <201209130910.50876.jhb@freebsd.org> <201209131132.21103.jhb@freebsd.org> <505514D5.90800@FreeBSD.org> <50551BCA.4020303@FreeBSD.org> Date: Sun, 16 Sep 2012 02:01:13 +0100 X-Google-Sender-Auth: NCd_5gITAjRSGQAsjZNe4iXa0dI Message-ID: From: Attilio Rao To: John Baldwin Content-Type: text/plain; charset=UTF-8 Cc: Davide Italiano , mlaier@freebsd.org, svn-src-projects@freebsd.org, Konstantin Belousov , src-committers@freebsd.org, Stephan Uphoff Subject: Re: svn commit: r238907 - projects/calloutng/sys/kern X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Sep 2012 01:01:16 -0000 On Sun, Sep 16, 2012 at 1:22 AM, John Baldwin wrote: > On 9/15/12 8:12 PM, Attilio Rao wrote: >> On Sun, Sep 16, 2012 at 12:52 AM, John Baldwin wrote: >>> On 9/14/12 6:32 PM, Attilio Rao wrote: >>>> On Thu, Sep 13, 2012 at 5:20 PM, Attilio Rao wrote: >>>>> On 9/13/12, John Baldwin wrote: >>>>>> On Thursday, September 13, 2012 10:38:54 am Attilio Rao wrote: >>>>>>> On Thu, Sep 13, 2012 at 2:10 PM, John Baldwin wrote: >>>>>>>> On Wednesday, September 12, 2012 9:36:58 pm Attilio Rao wrote: >>>>>>>>> On Thu, Aug 2, 2012 at 10:07 PM, John Baldwin wrote: >>>>>>>>>> On Thursday, August 02, 2012 4:56:03 pm Attilio Rao wrote: >>>>>>>>>>> On 7/30/12, John Baldwin wrote: >>>>>>>>>>>> --- //depot/projects/smpng/sys/kern/kern_rmlock.c 2012-03-25 >>>>>>>>>>>> 18:45:29.000000000 0000 >>>>>>>>>>>> +++ //depot/user/jhb/lock/kern/kern_rmlock.c 2012-06-18 >>>>>>>>>>>> 21:20:58.000000000 >>>>>>>>>>>> 0000 >>>>>>>>>>>> @@ -70,6 +70,9 @@ >>>>>>>>>>>> } >>>>>>>>>>>> >>>>>>>>>>>> static void assert_rm(const struct lock_object *lock, int >>>>>>>>>>>> what); >>>>>>>>>>>> +#ifdef DDB >>>>>>>>>>>> +static void db_show_rm(const struct lock_object *lock); >>>>>>>>>>>> +#endif >>>>>>>>>>>> static void lock_rm(struct lock_object *lock, int how); >>>>>>>>>>>> #ifdef KDTRACE_HOOKS >>>>>>>>>>>> static int owner_rm(const struct lock_object *lock, struct >>>>>>>>>>>> thread >>>>>>>>>>>> **owner); >>>>>>>>>>> >>>>>>>>>>> While here, did you consider also: >>>>>>>>>>> - Abstracting compiler_memory_barrier() into a MI, compiler >>>>>>>>>>> dependent function? >>>>>>>>>>> - Fix rm_queue with DCPU possibly >>>>>>>>>> >>>>>>>>>> Mostly I just wanted to fill in missing functionality and fixup the >>>>>>>>>> RM_SLEEPABLE bits a bit. >>>>>>>>> >>>>>>>>> So what do you think about the following patch? If you agree I will >>>>>>>>> send to pho@ for testing in a batch with other patches. >>>>>>>> >>>>>>>> It's not super clear to me that having it be static vs dynamic is all >>>>>>>> that >>>>>>>> big of a deal. However, your approach in general is better, and it >>>>>>>> certainly >>>>>>>> should have been using PCPU_GET() for the curcpu case all along rather >>>>>>>> than >>>>>>>> inlining pcpu_find(). >>>>>>> >>>>>>> You mean what is the performance difference between static vs dynamic? >>>>>>> Or you mean, why we want such patch at all? >>>>>>> In the former question there is a further indirection (pc_dynamic >>>>>>> access), for the latter question the patched code avoids namespace >>>>>>> pollution at all and makes the code more readable. >>>>>> >>>>>> More why we want it. I think most of your readability fixes would work >>>>>> just >>>>>> as well if it remained static and we used PCPU_GET(). However, I think >>>>>> your >>>>>> changes are fine. >>>>> >>>>> Well, the namespace pollution cannot be avoided without using the >>>>> dynamic approach, and that is the important part of the patch. >>>>> >>>>>> FYI, much of subr_rmlock.c goes out of its way to optimize for performance >>>>>> (such as inlining critical_enter(), critical_exit(), and pcpu_find()), so >>>>>> adding the new indirection goes against the grain of that. >>>>> >>>> >>>> I've thought about it and I think that avoiding the indirection is >>>> sensitive in that codepath. I've then came up with this patch which >>>> should avoid namespace pollution and the indirection. >>>> >>>> What do you think about it? >>> >>> Why not just move rm_queue to _rmlock.h and make pcpu.h include that? >>> >>> Barring that, make a _rmlock_queue.h and have both headers include that. >>> However, I think that having _rmlock.h in pcpu.h is fine. >> >> Did you read the git commit log? _rmlock.h brings along a lot of other >> dependencies so it will result anyway in (a different type) of >> namespace pollution. > > It brings in a few structs, yes. However, I don't think we have > considered that level of pollution harmful. That is why we have a > _rmlock.h separate from rmlock.h. This is the patch to have _rmlock.h in pcpu.h. If nobody has objections I can commit monday night. I think this or the previous version are both good to go. Thanks, Attilio Index: sys/sys/_rmlock.h =================================================================== --- sys/sys/_rmlock.h (revision 240545) +++ sys/sys/_rmlock.h (working copy) @@ -32,17 +32,17 @@ #ifndef _SYS__RMLOCK_H_ #define _SYS__RMLOCK_H_ -/* - * XXXUPS remove as soon as we have per cpu variable - * linker sets and can define rm_queue in _rm_lock.h -*/ -#include /* * Mostly reader/occasional writer lock. */ LIST_HEAD(rmpriolist,rm_priotracker); +struct rm_queue { + struct rm_queue *volatile rmq_next; + struct rm_queue *volatile rmq_prev; +}; + struct rmlock { struct lock_object lock_object; volatile cpuset_t rm_writecpus; Index: sys/sys/pcpu.h =================================================================== --- sys/sys/pcpu.h (revision 240545) +++ sys/sys/pcpu.h (working copy) @@ -38,7 +38,11 @@ #endif #include +#include +#include +#include #include +#include #include #include #include @@ -137,15 +141,6 @@ extern uintptr_t dpcpu_off[]; #endif /* _KERNEL */ -/* - * XXXUPS remove as soon as we have per cpu variable - * linker sets and can define rm_queue in _rm_lock.h - */ -struct rm_queue { - struct rm_queue* volatile rmq_next; - struct rm_queue* volatile rmq_prev; -}; - /* * This structure maps out the global data that needs to be kept on a * per-cpu basis. The members are accessed via the PCPU_GET/SET/PTR @@ -169,15 +164,7 @@ struct pcpu { void *pc_netisr; /* netisr SWI cookie */ int pc_dnweight; /* vm_page_dontneed() */ int pc_domain; /* Memory domain. */ - - /* - * Stuff for read mostly lock - * - * XXXUPS remove as soon as we have per cpu variable - * linker sets. - */ - struct rm_queue pc_rm_queue; - + struct rm_queue pc_rm_queue; /* rmlock list of trackers */ uintptr_t pc_dynamic; /* Dynamic per-cpu data area */ /* From owner-svn-src-projects@FreeBSD.ORG Sun Sep 16 15:35:08 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28FB0106566B; Sun, 16 Sep 2012 15:35:08 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B7FF8FC08; Sun, 16 Sep 2012 15:35:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8GFZ73A019173; Sun, 16 Sep 2012 15:35:07 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8GFZ7dN019160; Sun, 16 Sep 2012 15:35:07 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201209161535.q8GFZ7dN019160@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 16 Sep 2012 15:35:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240564 - in projects/pseries: amd64/acpica amd64/amd64 amd64/conf amd64/ia32 amd64/include amd64/linux32 arm/arm arm/at91 arm/broadcom arm/conf arm/econa arm/include arm/lpc arm/mv arm... X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Sep 2012 15:35:08 -0000 Author: nwhitehorn Date: Sun Sep 16 15:35:05 2012 New Revision: 240564 URL: http://svn.freebsd.org/changeset/base/240564 Log: IFC @ 240562 Added: projects/pseries/amd64/include/vdso.h - copied unchanged from r240562, head/sys/amd64/include/vdso.h projects/pseries/arm/arm/busdma_machdep-v6.c - copied unchanged from r240562, head/sys/arm/arm/busdma_machdep-v6.c projects/pseries/arm/arm/cpufunc_asm_armv6.S - copied unchanged from r240562, head/sys/arm/arm/cpufunc_asm_armv6.S projects/pseries/arm/arm/cpufunc_asm_armv7.S - copied unchanged from r240562, head/sys/arm/arm/cpufunc_asm_armv7.S projects/pseries/arm/arm/cpufunc_asm_pj4b.S - copied unchanged from r240562, head/sys/arm/arm/cpufunc_asm_pj4b.S projects/pseries/arm/arm/gic.c - copied unchanged from r240562, head/sys/arm/arm/gic.c projects/pseries/arm/arm/mp_machdep.c - copied unchanged from r240562, head/sys/arm/arm/mp_machdep.c projects/pseries/arm/arm/mpcore_timer.c - copied unchanged from r240562, head/sys/arm/arm/mpcore_timer.c projects/pseries/arm/arm/pl310.c - copied unchanged from r240562, head/sys/arm/arm/pl310.c projects/pseries/arm/arm/pmap-v6.c - copied unchanged from r240562, head/sys/arm/arm/pmap-v6.c projects/pseries/arm/arm/sc_machdep.c - copied unchanged from r240562, head/sys/arm/arm/sc_machdep.c projects/pseries/arm/arm/vfp.c - copied unchanged from r240562, head/sys/arm/arm/vfp.c projects/pseries/arm/at91/at91_pio_sam9g45.h - copied unchanged from r240562, head/sys/arm/at91/at91_pio_sam9g45.h projects/pseries/arm/at91/at91rm9200_devices.c - copied unchanged from r240562, head/sys/arm/at91/at91rm9200_devices.c projects/pseries/arm/at91/at91rm9200var.h - copied unchanged from r240562, head/sys/arm/at91/at91rm9200var.h projects/pseries/arm/at91/at91sam9g45.c - copied unchanged from r240562, head/sys/arm/at91/at91sam9g45.c projects/pseries/arm/at91/at91sam9g45reg.h - copied unchanged from r240562, head/sys/arm/at91/at91sam9g45reg.h projects/pseries/arm/at91/at91sam9x5.c - copied unchanged from r240562, head/sys/arm/at91/at91sam9x5.c projects/pseries/arm/at91/at91sam9x5reg.h - copied unchanged from r240562, head/sys/arm/at91/at91sam9x5reg.h projects/pseries/arm/at91/at91soc.c - copied unchanged from r240562, head/sys/arm/at91/at91soc.c projects/pseries/arm/at91/at91soc.h - copied unchanged from r240562, head/sys/arm/at91/at91soc.h projects/pseries/arm/at91/board_eb9200.c - copied unchanged from r240562, head/sys/arm/at91/board_eb9200.c projects/pseries/arm/at91/board_ethernut5.c - copied unchanged from r240562, head/sys/arm/at91/board_ethernut5.c projects/pseries/arm/at91/board_sam9260ek.c - copied unchanged from r240562, head/sys/arm/at91/board_sam9260ek.c projects/pseries/arm/at91/board_sam9x25ek.c - copied unchanged from r240562, head/sys/arm/at91/board_sam9x25ek.c projects/pseries/arm/at91/board_sn9g45.c - copied unchanged from r240562, head/sys/arm/at91/board_sn9g45.c projects/pseries/arm/at91/std.at91sam9g45 - copied unchanged from r240562, head/sys/arm/at91/std.at91sam9g45 projects/pseries/arm/at91/std.atmel - copied unchanged from r240562, head/sys/arm/at91/std.atmel projects/pseries/arm/at91/std.eb9200 - copied unchanged from r240562, head/sys/arm/at91/std.eb9200 projects/pseries/arm/at91/std.ethernut5 - copied unchanged from r240562, head/sys/arm/at91/std.ethernut5 projects/pseries/arm/at91/std.sam9260ek - copied unchanged from r240562, head/sys/arm/at91/std.sam9260ek projects/pseries/arm/at91/std.sam9x25ek - copied unchanged from r240562, head/sys/arm/at91/std.sam9x25ek projects/pseries/arm/at91/std.sn9g45 - copied unchanged from r240562, head/sys/arm/at91/std.sn9g45 projects/pseries/arm/at91/uart_cpu_at91usart.c - copied unchanged from r240562, head/sys/arm/at91/uart_cpu_at91usart.c projects/pseries/arm/broadcom/ - copied from r240562, head/sys/arm/broadcom/ projects/pseries/arm/conf/ARMADAXP - copied unchanged from r240562, head/sys/arm/conf/ARMADAXP projects/pseries/arm/conf/ATMEL - copied unchanged from r240562, head/sys/arm/conf/ATMEL projects/pseries/arm/conf/BEAGLEBONE - copied unchanged from r240562, head/sys/arm/conf/BEAGLEBONE projects/pseries/arm/conf/EA3250 - copied unchanged from r240562, head/sys/arm/conf/EA3250 projects/pseries/arm/conf/EA3250.hints - copied unchanged from r240562, head/sys/arm/conf/EA3250.hints projects/pseries/arm/conf/EB9200 - copied unchanged from r240562, head/sys/arm/conf/EB9200 projects/pseries/arm/conf/EB9200.hints - copied unchanged from r240562, head/sys/arm/conf/EB9200.hints projects/pseries/arm/conf/ETHERNUT5 - copied unchanged from r240562, head/sys/arm/conf/ETHERNUT5 projects/pseries/arm/conf/ETHERNUT5.hints - copied unchanged from r240562, head/sys/arm/conf/ETHERNUT5.hints projects/pseries/arm/conf/GUMSTIX-QEMU - copied unchanged from r240562, head/sys/arm/conf/GUMSTIX-QEMU projects/pseries/arm/conf/PANDABOARD - copied unchanged from r240562, head/sys/arm/conf/PANDABOARD projects/pseries/arm/conf/PANDABOARD.hints - copied unchanged from r240562, head/sys/arm/conf/PANDABOARD.hints projects/pseries/arm/conf/RPI-B - copied unchanged from r240562, head/sys/arm/conf/RPI-B projects/pseries/arm/conf/SAM9260EK - copied unchanged from r240562, head/sys/arm/conf/SAM9260EK projects/pseries/arm/conf/SAM9260EK.hints - copied unchanged from r240562, head/sys/arm/conf/SAM9260EK.hints projects/pseries/arm/conf/SAM9X25EK - copied unchanged from r240562, head/sys/arm/conf/SAM9X25EK projects/pseries/arm/conf/SAM9X25EK.hints - copied unchanged from r240562, head/sys/arm/conf/SAM9X25EK.hints projects/pseries/arm/conf/SN9G45 - copied unchanged from r240562, head/sys/arm/conf/SN9G45 projects/pseries/arm/conf/genboardid.awk - copied unchanged from r240562, head/sys/arm/conf/genboardid.awk projects/pseries/arm/conf/mach-types - copied unchanged from r240562, head/sys/arm/conf/mach-types projects/pseries/arm/include/atags.h - copied unchanged from r240562, head/sys/arm/include/atags.h projects/pseries/arm/include/board.h - copied unchanged from r240562, head/sys/arm/include/board.h projects/pseries/arm/include/pl310.h - copied unchanged from r240562, head/sys/arm/include/pl310.h projects/pseries/arm/include/sc_machdep.h - copied unchanged from r240562, head/sys/arm/include/sc_machdep.h projects/pseries/arm/include/vdso.h - copied unchanged from r240562, head/sys/arm/include/vdso.h projects/pseries/arm/include/vfp.h - copied unchanged from r240562, head/sys/arm/include/vfp.h projects/pseries/arm/lpc/ - copied from r240562, head/sys/arm/lpc/ projects/pseries/arm/mv/armadaxp/ - copied from r240562, head/sys/arm/mv/armadaxp/ projects/pseries/arm/mv/mpic.c - copied unchanged from r240562, head/sys/arm/mv/mpic.c projects/pseries/arm/mv/mv_localbus.c - copied unchanged from r240562, head/sys/arm/mv/mv_localbus.c projects/pseries/arm/mv/mv_ts.c - copied unchanged from r240562, head/sys/arm/mv/mv_ts.c projects/pseries/arm/mv/std-pj4b.mv - copied unchanged from r240562, head/sys/arm/mv/std-pj4b.mv projects/pseries/arm/tegra/ - copied from r240562, head/sys/arm/tegra/ projects/pseries/arm/ti/ - copied from r240562, head/sys/arm/ti/ projects/pseries/arm/xscale/std.xscale-be - copied unchanged from r240562, head/sys/arm/xscale/std.xscale-be projects/pseries/boot/common/part.c - copied unchanged from r240562, head/sys/boot/common/part.c projects/pseries/boot/common/part.h - copied unchanged from r240562, head/sys/boot/common/part.h projects/pseries/boot/fdt/dts/bcm2835-rpi-b.dts - copied unchanged from r240562, head/sys/boot/fdt/dts/bcm2835-rpi-b.dts projects/pseries/boot/fdt/dts/beaglebone.dts - copied unchanged from r240562, head/sys/boot/fdt/dts/beaglebone.dts projects/pseries/boot/fdt/dts/bindings-localbus.txt - copied unchanged from r240562, head/sys/boot/fdt/dts/bindings-localbus.txt projects/pseries/boot/fdt/dts/db78460.dts - copied unchanged from r240562, head/sys/boot/fdt/dts/db78460.dts projects/pseries/boot/fdt/dts/ea3250.dts - copied unchanged from r240562, head/sys/boot/fdt/dts/ea3250.dts projects/pseries/boot/fdt/dts/p2041rdb.dts - copied unchanged from r240562, head/sys/boot/fdt/dts/p2041rdb.dts projects/pseries/boot/fdt/dts/p2041si.dtsi - copied unchanged from r240562, head/sys/boot/fdt/dts/p2041si.dtsi projects/pseries/boot/fdt/dts/p3041si.dtsi - copied unchanged from r240562, head/sys/boot/fdt/dts/p3041si.dtsi projects/pseries/boot/fdt/dts/p5020ds.dts - copied unchanged from r240562, head/sys/boot/fdt/dts/p5020ds.dts projects/pseries/boot/fdt/dts/p5020si.dtsi - copied unchanged from r240562, head/sys/boot/fdt/dts/p5020si.dtsi projects/pseries/boot/fdt/dts/pandaboard.dts - copied unchanged from r240562, head/sys/boot/fdt/dts/pandaboard.dts projects/pseries/boot/fdt/dts/trimslice.dts - copied unchanged from r240562, head/sys/boot/fdt/dts/trimslice.dts projects/pseries/boot/i386/btx/lib/btxcsu.S - copied unchanged from r240562, head/sys/boot/i386/btx/lib/btxcsu.S projects/pseries/boot/i386/cdboot/cdboot.S - copied unchanged from r240562, head/sys/boot/i386/cdboot/cdboot.S projects/pseries/boot/i386/common/bootargs.h - copied unchanged from r240562, head/sys/boot/i386/common/bootargs.h projects/pseries/boot/pc98/btx/lib/btxcsu.S - copied unchanged from r240562, head/sys/boot/pc98/btx/lib/btxcsu.S projects/pseries/boot/pc98/cdboot/cdboot.S - copied unchanged from r240562, head/sys/boot/pc98/cdboot/cdboot.S projects/pseries/boot/sparc64/zfsboot/ - copied from r240562, head/sys/boot/sparc64/zfsboot/ projects/pseries/boot/sparc64/zfsloader/ - copied from r240562, head/sys/boot/sparc64/zfsloader/ projects/pseries/boot/zfs/devicename_stubs.c - copied unchanged from r240562, head/sys/boot/zfs/devicename_stubs.c projects/pseries/boot/zfs/libzfs.h - copied unchanged from r240562, head/sys/boot/zfs/libzfs.h projects/pseries/cam/scsi/scsi_enc.c - copied unchanged from r240562, head/sys/cam/scsi/scsi_enc.c projects/pseries/cam/scsi/scsi_enc.h - copied unchanged from r240562, head/sys/cam/scsi/scsi_enc.h projects/pseries/cam/scsi/scsi_enc_internal.h - copied unchanged from r240562, head/sys/cam/scsi/scsi_enc_internal.h projects/pseries/cam/scsi/scsi_enc_safte.c - copied unchanged from r240562, head/sys/cam/scsi/scsi_enc_safte.c projects/pseries/cam/scsi/scsi_enc_ses.c - copied unchanged from r240562, head/sys/cam/scsi/scsi_enc_ses.c projects/pseries/cddl/compat/opensolaris/sys/assfail.h - copied unchanged from r240562, head/sys/cddl/compat/opensolaris/sys/assfail.h projects/pseries/cddl/contrib/opensolaris/common/nvpair/fnvpair.c - copied unchanged from r240562, head/sys/cddl/contrib/opensolaris/common/nvpair/fnvpair.c projects/pseries/cddl/contrib/opensolaris/common/zfs/zfeature_common.c - copied unchanged from r240562, head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c projects/pseries/cddl/contrib/opensolaris/common/zfs/zfeature_common.h - copied unchanged from r240562, head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c - copied unchanged from r240562, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/bptree.h - copied unchanged from r240562, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/bptree.h projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfeature.h - copied unchanged from r240562, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfeature.h projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/zfeature.c - copied unchanged from r240562, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfeature.c projects/pseries/compat/linux/check_error.d - copied unchanged from r240562, head/sys/compat/linux/check_error.d projects/pseries/compat/linux/check_internal_locks.d - copied unchanged from r240562, head/sys/compat/linux/check_internal_locks.d projects/pseries/compat/linux/linux_dtrace.h - copied unchanged from r240562, head/sys/compat/linux/linux_dtrace.h projects/pseries/compat/linux/stats_timing.d - copied unchanged from r240562, head/sys/compat/linux/stats_timing.d projects/pseries/compat/linux/trace_futexes.d - copied unchanged from r240562, head/sys/compat/linux/trace_futexes.d projects/pseries/contrib/dev/acpica/common/ahpredef.c - copied unchanged from r240562, head/sys/contrib/dev/acpica/common/ahpredef.c projects/pseries/contrib/dev/acpica/compiler/aslsupport.l - copied unchanged from r240562, head/sys/contrib/dev/acpica/compiler/aslsupport.l projects/pseries/contrib/dev/acpica/components/tables/tbxfload.c - copied unchanged from r240562, head/sys/contrib/dev/acpica/components/tables/tbxfload.c projects/pseries/contrib/dev/acpica/components/utilities/utexcep.c - copied unchanged from r240562, head/sys/contrib/dev/acpica/components/utilities/utexcep.c projects/pseries/contrib/dev/acpica/components/utilities/utxfinit.c - copied unchanged from r240562, head/sys/contrib/dev/acpica/components/utilities/utxfinit.c projects/pseries/contrib/dev/acpica/include/acbuffer.h - copied unchanged from r240562, head/sys/contrib/dev/acpica/include/acbuffer.h projects/pseries/contrib/dev/iwn/iwlwifi-6000g2a-17.168.5.3.fw.uu - copied unchanged from r240562, head/sys/contrib/dev/iwn/iwlwifi-6000g2a-17.168.5.3.fw.uu projects/pseries/contrib/dev/iwn/iwlwifi-6000g2b-18.168.6.1.fw.uu - copied unchanged from r240562, head/sys/contrib/dev/iwn/iwlwifi-6000g2b-18.168.6.1.fw.uu projects/pseries/contrib/libfdt/fdt_empty_tree.c - copied unchanged from r240562, head/sys/contrib/libfdt/fdt_empty_tree.c projects/pseries/dev/acpi_support/acpi_asus_wmi.c - copied unchanged from r240562, head/sys/dev/acpi_support/acpi_asus_wmi.c projects/pseries/dev/agp/agp_i810.h - copied unchanged from r240562, head/sys/dev/agp/agp_i810.h projects/pseries/dev/ahci/ahciem.c - copied unchanged from r240562, head/sys/dev/ahci/ahciem.c projects/pseries/dev/altera/ - copied from r240562, head/sys/dev/altera/ projects/pseries/dev/ath/ath_hal/ar5416/ar5416_btcoex.c - copied unchanged from r240562, head/sys/dev/ath/ath_hal/ar5416/ar5416_btcoex.c projects/pseries/dev/ath/ath_hal/ar5416/ar5416_btcoex.h - copied unchanged from r240562, head/sys/dev/ath/ath_hal/ar5416/ar5416_btcoex.h projects/pseries/dev/ath/ath_hal/ar9002/ar9285_btcoex.c - copied unchanged from r240562, head/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c projects/pseries/dev/ath/ath_hal/ar9003/ar9300_btcoex.h - copied unchanged from r240562, head/sys/dev/ath/ath_hal/ar9003/ar9300_btcoex.h projects/pseries/dev/ath/ath_hal/ar9003/ar9300_devid.h - copied unchanged from r240562, head/sys/dev/ath/ath_hal/ar9003/ar9300_devid.h projects/pseries/dev/ath/if_ath_beacon.c - copied unchanged from r240562, head/sys/dev/ath/if_ath_beacon.c projects/pseries/dev/ath/if_ath_beacon.h - copied unchanged from r240562, head/sys/dev/ath/if_ath_beacon.h projects/pseries/dev/ath/if_ath_rx.c - copied unchanged from r240562, head/sys/dev/ath/if_ath_rx.c projects/pseries/dev/ath/if_ath_rx.h - copied unchanged from r240562, head/sys/dev/ath/if_ath_rx.h projects/pseries/dev/ath/if_ath_rx_edma.c - copied unchanged from r240562, head/sys/dev/ath/if_ath_rx_edma.c projects/pseries/dev/ath/if_ath_rx_edma.h - copied unchanged from r240562, head/sys/dev/ath/if_ath_rx_edma.h projects/pseries/dev/ath/if_ath_tdma.c - copied unchanged from r240562, head/sys/dev/ath/if_ath_tdma.c projects/pseries/dev/ath/if_ath_tdma.h - copied unchanged from r240562, head/sys/dev/ath/if_ath_tdma.h projects/pseries/dev/ath/if_ath_tsf.h - copied unchanged from r240562, head/sys/dev/ath/if_ath_tsf.h projects/pseries/dev/ath/if_ath_tx_edma.c - copied unchanged from r240562, head/sys/dev/ath/if_ath_tx_edma.c projects/pseries/dev/ath/if_ath_tx_edma.h - copied unchanged from r240562, head/sys/dev/ath/if_ath_tx_edma.h projects/pseries/dev/cxgb/ulp/iw_cxgb/iw_cxgb_ib_intfc.h - copied unchanged from r240562, head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_ib_intfc.h projects/pseries/dev/cxgbe/firmware/t4fw-1.6.2.0.bin.uu - copied unchanged from r240562, head/sys/dev/cxgbe/firmware/t4fw-1.6.2.0.bin.uu projects/pseries/dev/cxgbe/tom/ - copied from r240562, head/sys/dev/cxgbe/tom/ projects/pseries/dev/drm2/ - copied from r240562, head/sys/dev/drm2/ projects/pseries/dev/e1000/e1000_i210.c - copied unchanged from r240562, head/sys/dev/e1000/e1000_i210.c projects/pseries/dev/e1000/e1000_i210.h - copied unchanged from r240562, head/sys/dev/e1000/e1000_i210.h projects/pseries/dev/etherswitch/ - copied from r240562, head/sys/dev/etherswitch/ projects/pseries/dev/fdt/fdt_slicer.c - copied unchanged from r240562, head/sys/dev/fdt/fdt_slicer.c projects/pseries/dev/filemon/ - copied from r240562, head/sys/dev/filemon/ projects/pseries/dev/gxemul/ - copied from r240562, head/sys/dev/gxemul/ projects/pseries/dev/iicbus/ds1631.c - copied unchanged from r240562, head/sys/dev/iicbus/ds1631.c projects/pseries/dev/iicbus/pcf8563.c - copied unchanged from r240562, head/sys/dev/iicbus/pcf8563.c projects/pseries/dev/iicbus/pcf8563reg.h - copied unchanged from r240562, head/sys/dev/iicbus/pcf8563reg.h projects/pseries/dev/iicbus/s35390a.c - copied unchanged from r240562, head/sys/dev/iicbus/s35390a.c projects/pseries/dev/isf/ - copied from r240562, head/sys/dev/isf/ projects/pseries/dev/mii/smscphy.c - copied unchanged from r240562, head/sys/dev/mii/smscphy.c projects/pseries/dev/nand/ - copied from r240562, head/sys/dev/nand/ projects/pseries/dev/netmap/netmap_mem1.c - copied unchanged from r240562, head/sys/dev/netmap/netmap_mem1.c projects/pseries/dev/netmap/netmap_mem2.c - copied unchanged from r240562, head/sys/dev/netmap/netmap_mem2.c projects/pseries/dev/ral/rt2860.c - copied unchanged from r240562, head/sys/dev/ral/rt2860.c projects/pseries/dev/ral/rt2860reg.h - copied unchanged from r240562, head/sys/dev/ral/rt2860reg.h projects/pseries/dev/ral/rt2860var.h - copied unchanged from r240562, head/sys/dev/ral/rt2860var.h projects/pseries/dev/random/ivy.c - copied unchanged from r240562, head/sys/dev/random/ivy.c projects/pseries/dev/sound/macio/onyx.c - copied unchanged from r240562, head/sys/dev/sound/macio/onyx.c projects/pseries/dev/terasic/ - copied from r240562, head/sys/dev/terasic/ projects/pseries/dev/uart/uart_cpu_x86.c - copied unchanged from r240562, head/sys/dev/uart/uart_cpu_x86.c projects/pseries/dev/uart/uart_dev_lpc.c - copied unchanged from r240562, head/sys/dev/uart/uart_dev_lpc.c projects/pseries/dev/uart/uart_dev_pl011.c - copied unchanged from r240562, head/sys/dev/uart/uart_dev_pl011.c projects/pseries/dev/usb/controller/dwc_otgreg.h - copied unchanged from r240562, head/sys/dev/usb/controller/dwc_otgreg.h projects/pseries/dev/usb/controller/ehci_fsl.c - copied unchanged from r240562, head/sys/dev/usb/controller/ehci_fsl.c projects/pseries/dev/usb/net/if_smsc.c - copied unchanged from r240562, head/sys/dev/usb/net/if_smsc.c projects/pseries/dev/usb/net/if_smscreg.h - copied unchanged from r240562, head/sys/dev/usb/net/if_smscreg.h projects/pseries/fs/nandfs/ - copied from r240562, head/sys/fs/nandfs/ projects/pseries/geom/geom_flashmap.c - copied unchanged from r240562, head/sys/geom/geom_flashmap.c projects/pseries/geom/raid/md_ddf.c - copied unchanged from r240562, head/sys/geom/raid/md_ddf.c projects/pseries/geom/raid/md_ddf.h - copied unchanged from r240562, head/sys/geom/raid/md_ddf.h projects/pseries/geom/raid/tr_raid5.c - copied unchanged from r240562, head/sys/geom/raid/tr_raid5.c projects/pseries/i386/include/vdso.h - copied unchanged from r240562, head/sys/i386/include/vdso.h projects/pseries/ia64/ia64/physmem.c - copied unchanged from r240562, head/sys/ia64/ia64/physmem.c projects/pseries/ia64/include/vdso.h - copied unchanged from r240562, head/sys/ia64/include/vdso.h projects/pseries/kern/dtio_kdtrace.c - copied unchanged from r240562, head/sys/kern/dtio_kdtrace.c projects/pseries/kern/kern_rangelock.c - copied unchanged from r240562, head/sys/kern/kern_rangelock.c projects/pseries/kern/kern_sharedpage.c - copied unchanged from r240562, head/sys/kern/kern_sharedpage.c projects/pseries/kern/subr_dummy_vdso_tc.c - copied unchanged from r240562, head/sys/kern/subr_dummy_vdso_tc.c projects/pseries/libkern/jenkins_hash.c - copied unchanged from r240562, head/sys/libkern/jenkins_hash.c projects/pseries/mips/atheros/ar71xx_fixup.c - copied unchanged from r240562, head/sys/mips/atheros/ar71xx_fixup.c projects/pseries/mips/atheros/ar71xx_fixup.h - copied unchanged from r240562, head/sys/mips/atheros/ar71xx_fixup.h projects/pseries/mips/beri/ - copied from r240562, head/sys/mips/beri/ projects/pseries/mips/conf/AP91 - copied unchanged from r240562, head/sys/mips/conf/AP91 projects/pseries/mips/conf/AP91.hints - copied unchanged from r240562, head/sys/mips/conf/AP91.hints projects/pseries/mips/conf/AP93 - copied unchanged from r240562, head/sys/mips/conf/AP93 projects/pseries/mips/conf/AP93.hints - copied unchanged from r240562, head/sys/mips/conf/AP93.hints projects/pseries/mips/conf/AP94 - copied unchanged from r240562, head/sys/mips/conf/AP94 projects/pseries/mips/conf/AP94.hints - copied unchanged from r240562, head/sys/mips/conf/AP94.hints projects/pseries/mips/conf/AP96 - copied unchanged from r240562, head/sys/mips/conf/AP96 projects/pseries/mips/conf/AP96.hints - copied unchanged from r240562, head/sys/mips/conf/AP96.hints projects/pseries/mips/conf/AR724X_BASE - copied unchanged from r240562, head/sys/mips/conf/AR724X_BASE projects/pseries/mips/conf/AR724X_BASE.hints - copied unchanged from r240562, head/sys/mips/conf/AR724X_BASE.hints projects/pseries/mips/conf/BERI_DE4.hints - copied unchanged from r240562, head/sys/mips/conf/BERI_DE4.hints projects/pseries/mips/conf/BERI_DE4_MDROOT - copied unchanged from r240562, head/sys/mips/conf/BERI_DE4_MDROOT projects/pseries/mips/conf/BERI_DE4_SDROOT - copied unchanged from r240562, head/sys/mips/conf/BERI_DE4_SDROOT projects/pseries/mips/conf/BERI_SIM.hints - copied unchanged from r240562, head/sys/mips/conf/BERI_SIM.hints projects/pseries/mips/conf/BERI_SIM_MDROOT - copied unchanged from r240562, head/sys/mips/conf/BERI_SIM_MDROOT projects/pseries/mips/conf/BERI_TEMPLATE - copied unchanged from r240562, head/sys/mips/conf/BERI_TEMPLATE projects/pseries/mips/conf/BERI_TPAD.hints - copied unchanged from r240562, head/sys/mips/conf/BERI_TPAD.hints projects/pseries/mips/conf/DIR-825 - copied unchanged from r240562, head/sys/mips/conf/DIR-825 projects/pseries/mips/conf/DIR-825.hints - copied unchanged from r240562, head/sys/mips/conf/DIR-825.hints projects/pseries/mips/conf/GXEMUL - copied unchanged from r240562, head/sys/mips/conf/GXEMUL projects/pseries/mips/conf/GXEMUL.hints - copied unchanged from r240562, head/sys/mips/conf/GXEMUL.hints projects/pseries/mips/gxemul/ - copied from r240562, head/sys/mips/gxemul/ projects/pseries/mips/include/sc_machdep.h - copied unchanged from r240562, head/sys/mips/include/sc_machdep.h projects/pseries/mips/include/vdso.h - copied unchanged from r240562, head/sys/mips/include/vdso.h projects/pseries/mips/mips/sc_machdep.c - copied unchanged from r240562, head/sys/mips/mips/sc_machdep.c projects/pseries/modules/acpi/acpi_asus_wmi/ - copied from r240562, head/sys/modules/acpi/acpi_asus_wmi/ projects/pseries/modules/cpsw/ - copied from r240562, head/sys/modules/cpsw/ projects/pseries/modules/ct/ - copied from r240562, head/sys/modules/ct/ projects/pseries/modules/cxgbe/tom/ - copied from r240562, head/sys/modules/cxgbe/tom/ projects/pseries/modules/drm2/ - copied from r240562, head/sys/modules/drm2/ projects/pseries/modules/dtrace/dtio/ - copied from r240562, head/sys/modules/dtrace/dtio/ projects/pseries/modules/filemon/ - copied from r240562, head/sys/modules/filemon/ projects/pseries/modules/nand/ - copied from r240562, head/sys/modules/nand/ projects/pseries/modules/nandfs/ - copied from r240562, head/sys/modules/nandfs/ projects/pseries/modules/nandsim/ - copied from r240562, head/sys/modules/nandsim/ projects/pseries/modules/netmap/ - copied from r240562, head/sys/modules/netmap/ projects/pseries/modules/toecore/ - copied from r240562, head/sys/modules/toecore/ projects/pseries/modules/usb/smsc/ - copied from r240562, head/sys/modules/usb/smsc/ projects/pseries/net/if_pflog.h - copied unchanged from r240562, head/sys/net/if_pflog.h projects/pseries/net/if_pfsync.h - copied unchanged from r240562, head/sys/net/if_pfsync.h projects/pseries/net/pf_mtag.h - copied unchanged from r240562, head/sys/net/pf_mtag.h projects/pseries/net/pfvar.h - copied unchanged from r240562, head/sys/net/pfvar.h projects/pseries/netinet/toecore.c - copied unchanged from r240562, head/sys/netinet/toecore.c projects/pseries/netinet/toecore.h - copied unchanged from r240562, head/sys/netinet/toecore.h projects/pseries/netpfil/ - copied from r240562, head/sys/netpfil/ projects/pseries/pc98/include/vdso.h - copied unchanged from r240562, head/sys/pc98/include/vdso.h projects/pseries/powerpc/booke/machdep_e500.c - copied unchanged from r240562, head/sys/powerpc/booke/machdep_e500.c projects/pseries/powerpc/booke/machdep_ppc4xx.c - copied unchanged from r240562, head/sys/powerpc/booke/machdep_ppc4xx.c projects/pseries/powerpc/include/machdep.h - copied unchanged from r240562, head/sys/powerpc/include/machdep.h projects/pseries/powerpc/include/vdso.h - copied unchanged from r240562, head/sys/powerpc/include/vdso.h projects/pseries/powerpc/mpc85xx/fsl_sdhc.c - copied unchanged from r240562, head/sys/powerpc/mpc85xx/fsl_sdhc.c projects/pseries/powerpc/mpc85xx/fsl_sdhc.h - copied unchanged from r240562, head/sys/powerpc/mpc85xx/fsl_sdhc.h projects/pseries/powerpc/powermac/nvbl.c - copied unchanged from r240562, head/sys/powerpc/powermac/nvbl.c projects/pseries/powerpc/powerpc/openpic_fdt.c - copied unchanged from r240562, head/sys/powerpc/powerpc/openpic_fdt.c projects/pseries/powerpc/wii/ - copied from r240562, head/sys/powerpc/wii/ projects/pseries/sparc64/include/vdso.h - copied unchanged from r240562, head/sys/sparc64/include/vdso.h projects/pseries/sys/rangelock.h - copied unchanged from r240562, head/sys/sys/rangelock.h projects/pseries/sys/slicer.h - copied unchanged from r240562, head/sys/sys/slicer.h projects/pseries/sys/vdso.h - copied unchanged from r240562, head/sys/sys/vdso.h projects/pseries/x86/acpica/acpi_wakeup.c - copied unchanged from r240562, head/sys/x86/acpica/acpi_wakeup.c projects/pseries/x86/include/vdso.h - copied unchanged from r240562, head/sys/x86/include/vdso.h Replaced: projects/pseries/arm/conf/HL201.hints - copied unchanged from r240562, head/sys/arm/conf/HL201.hints Deleted: projects/pseries/amd64/acpica/acpi_switch.S projects/pseries/amd64/acpica/acpi_wakeup.c projects/pseries/arm/at91/at91_pio_rm9200.h projects/pseries/arm/at91/files.at91sam9 projects/pseries/arm/at91/hints.at91rm9200 projects/pseries/arm/at91/hints.at91sam9261 projects/pseries/arm/at91/uart_cpu_at91rm9200usart.c projects/pseries/boot/i386/btx/lib/btxcsu.s projects/pseries/boot/i386/cdboot/cdboot.s projects/pseries/boot/pc98/btx/lib/btxcsu.s projects/pseries/boot/pc98/cdboot/cdboot.s projects/pseries/cam/scsi/scsi_low_pisa.c projects/pseries/cam/scsi/scsi_low_pisa.h projects/pseries/cam/scsi/scsi_ses.c projects/pseries/compat/netbsd/physio_proc.h projects/pseries/contrib/pf/ projects/pseries/dev/cxgb/cxgb_offload.c projects/pseries/dev/cxgb/t3cdev.h projects/pseries/dev/cxgb/ulp/toecore/ projects/pseries/dev/cxgb/ulp/tom/cxgb_cpl_socket.c projects/pseries/dev/cxgb/ulp/tom/cxgb_ddp.c projects/pseries/dev/cxgb/ulp/tom/cxgb_defs.h projects/pseries/dev/cxgb/ulp/tom/cxgb_t3_ddp.h projects/pseries/dev/cxgb/ulp/tom/cxgb_tcp.h projects/pseries/dev/cxgb/ulp/tom/cxgb_tcp_offload.c projects/pseries/dev/cxgb/ulp/tom/cxgb_tcp_offload.h projects/pseries/dev/cxgb/ulp/tom/cxgb_tom_sysctl.c projects/pseries/dev/netmap/head.diff projects/pseries/dev/random/nehemiah.h projects/pseries/dev/uart/uart_cpu_amd64.c projects/pseries/dev/uart/uart_cpu_i386.c projects/pseries/i386/acpica/acpi_wakeup.c projects/pseries/ia64/conf/SKI projects/pseries/ia64/ia64/ssc.c projects/pseries/ia64/ia64/sscdisk.c projects/pseries/libkern/jenkins.h projects/pseries/modules/cxgb/toecore/ projects/pseries/netinet/ipfw/ projects/pseries/netinet/toedev.h projects/pseries/powerpc/mpc85xx/openpic_fdt.c projects/pseries/powerpc/powerpc/atomic.S projects/pseries/sys/device_port.h projects/pseries/vm/vm_contig.c Modified: projects/pseries/amd64/acpica/acpi_machdep.c projects/pseries/amd64/acpica/acpi_wakecode.S projects/pseries/amd64/amd64/cpu_switch.S projects/pseries/amd64/amd64/db_disasm.c projects/pseries/amd64/amd64/elf_machdep.c projects/pseries/amd64/amd64/fpu.c projects/pseries/amd64/amd64/genassym.c projects/pseries/amd64/amd64/identcpu.c projects/pseries/amd64/amd64/initcpu.c projects/pseries/amd64/amd64/machdep.c projects/pseries/amd64/amd64/mem.c projects/pseries/amd64/amd64/minidump_machdep.c projects/pseries/amd64/amd64/mp_machdep.c projects/pseries/amd64/amd64/pmap.c projects/pseries/amd64/amd64/ptrace_machdep.c projects/pseries/amd64/amd64/trap.c projects/pseries/amd64/amd64/vm_machdep.c projects/pseries/amd64/conf/GENERIC projects/pseries/amd64/conf/NOTES projects/pseries/amd64/conf/XENHVM projects/pseries/amd64/ia32/ia32_sigtramp.S projects/pseries/amd64/ia32/ia32_syscall.c projects/pseries/amd64/include/atomic.h projects/pseries/amd64/include/cpufunc.h projects/pseries/amd64/include/elf.h projects/pseries/amd64/include/fpu.h projects/pseries/amd64/include/in_cksum.h projects/pseries/amd64/include/intr_machdep.h projects/pseries/amd64/include/md_var.h projects/pseries/amd64/include/param.h projects/pseries/amd64/include/pcb.h projects/pseries/amd64/include/pcpu.h projects/pseries/amd64/include/pmap.h projects/pseries/amd64/include/smp.h projects/pseries/amd64/include/vmparam.h projects/pseries/amd64/linux32/linux.h projects/pseries/amd64/linux32/linux32_dummy.c projects/pseries/amd64/linux32/linux32_machdep.c projects/pseries/amd64/linux32/linux32_proto.h projects/pseries/amd64/linux32/linux32_syscall.h projects/pseries/amd64/linux32/linux32_syscalls.c projects/pseries/amd64/linux32/linux32_sysent.c projects/pseries/amd64/linux32/linux32_systrace_args.c projects/pseries/amd64/linux32/syscalls.master projects/pseries/arm/arm/bcopyinout.S projects/pseries/arm/arm/bcopyinout_xscale.S projects/pseries/arm/arm/bootconfig.c projects/pseries/arm/arm/bus_space_asm_generic.S projects/pseries/arm/arm/busdma_machdep.c projects/pseries/arm/arm/copystr.S projects/pseries/arm/arm/cpufunc.c projects/pseries/arm/arm/cpufunc_asm.S projects/pseries/arm/arm/cpufunc_asm_arm10.S projects/pseries/arm/arm/cpufunc_asm_arm11.S projects/pseries/arm/arm/cpufunc_asm_arm7tdmi.S projects/pseries/arm/arm/cpufunc_asm_arm8.S projects/pseries/arm/arm/cpufunc_asm_arm9.S projects/pseries/arm/arm/cpufunc_asm_armv4.S projects/pseries/arm/arm/cpufunc_asm_armv5.S projects/pseries/arm/arm/cpufunc_asm_sa1.S projects/pseries/arm/arm/cpufunc_asm_xscale.S projects/pseries/arm/arm/cpufunc_asm_xscale_c3.S projects/pseries/arm/arm/db_disasm.c projects/pseries/arm/arm/db_interface.c projects/pseries/arm/arm/db_trace.c projects/pseries/arm/arm/disassem.c projects/pseries/arm/arm/dump_machdep.c projects/pseries/arm/arm/elf_trampoline.c projects/pseries/arm/arm/exception.S projects/pseries/arm/arm/fusu.S projects/pseries/arm/arm/gdb_machdep.c projects/pseries/arm/arm/genassym.c projects/pseries/arm/arm/identcpu.c projects/pseries/arm/arm/in_cksum.c projects/pseries/arm/arm/intr.c projects/pseries/arm/arm/irq_dispatch.S projects/pseries/arm/arm/locore.S projects/pseries/arm/arm/machdep.c projects/pseries/arm/arm/mem.c projects/pseries/arm/arm/nexus.c projects/pseries/arm/arm/pmap.c projects/pseries/arm/arm/support.S projects/pseries/arm/arm/swtch.S projects/pseries/arm/arm/sys_machdep.c projects/pseries/arm/arm/trap.c projects/pseries/arm/arm/undefined.c projects/pseries/arm/arm/vectors.S projects/pseries/arm/arm/vm_machdep.c projects/pseries/arm/at91/at91.c projects/pseries/arm/at91/at91_machdep.c projects/pseries/arm/at91/at91_mci.c projects/pseries/arm/at91/at91_mcireg.h projects/pseries/arm/at91/at91_pio.c projects/pseries/arm/at91/at91_pioreg.h projects/pseries/arm/at91/at91_piovar.h projects/pseries/arm/at91/at91_pit.c projects/pseries/arm/at91/at91_pitreg.h projects/pseries/arm/at91/at91_pmc.c projects/pseries/arm/at91/at91_pmcreg.h projects/pseries/arm/at91/at91_pmcvar.h projects/pseries/arm/at91/at91_reset.S projects/pseries/arm/at91/at91_rst.c projects/pseries/arm/at91/at91_rstreg.h projects/pseries/arm/at91/at91_spi.c projects/pseries/arm/at91/at91_spireg.h projects/pseries/arm/at91/at91_ssc.c projects/pseries/arm/at91/at91_st.c projects/pseries/arm/at91/at91_streg.h projects/pseries/arm/at91/at91_twi.c projects/pseries/arm/at91/at91_twireg.h projects/pseries/arm/at91/at91_wdt.c projects/pseries/arm/at91/at91_wdtreg.h projects/pseries/arm/at91/at91board.h projects/pseries/arm/at91/at91reg.h projects/pseries/arm/at91/at91rm9200.c projects/pseries/arm/at91/at91rm92reg.h projects/pseries/arm/at91/at91sam9260.c projects/pseries/arm/at91/at91sam9260reg.h projects/pseries/arm/at91/at91sam9g20.c projects/pseries/arm/at91/at91sam9g20reg.h projects/pseries/arm/at91/at91var.h projects/pseries/arm/at91/board_bwct.c projects/pseries/arm/at91/board_hl200.c projects/pseries/arm/at91/board_hl201.c projects/pseries/arm/at91/board_kb920x.c projects/pseries/arm/at91/board_qila9g20.c projects/pseries/arm/at91/board_sam9g20ek.c projects/pseries/arm/at91/board_tsc4370.c projects/pseries/arm/at91/files.at91 projects/pseries/arm/at91/if_ate.c projects/pseries/arm/at91/if_macb.c projects/pseries/arm/at91/std.at91 projects/pseries/arm/at91/std.at91sam9 projects/pseries/arm/at91/std.hl200 projects/pseries/arm/at91/std.hl201 projects/pseries/arm/at91/std.kb920x projects/pseries/arm/at91/std.qila9g20 projects/pseries/arm/at91/std.sam9g20ek projects/pseries/arm/at91/uart_bus_at91usart.c projects/pseries/arm/at91/uart_dev_at91usart.c projects/pseries/arm/conf/AVILA projects/pseries/arm/conf/AVILA.hints projects/pseries/arm/conf/BWCT projects/pseries/arm/conf/CAMBRIA projects/pseries/arm/conf/CAMBRIA.hints projects/pseries/arm/conf/CNS11XXNAS projects/pseries/arm/conf/CRB projects/pseries/arm/conf/DB-78XXX projects/pseries/arm/conf/DB-88F6XXX projects/pseries/arm/conf/DEFAULTS projects/pseries/arm/conf/EP80219 projects/pseries/arm/conf/GUMSTIX projects/pseries/arm/conf/HL200 projects/pseries/arm/conf/HL201 projects/pseries/arm/conf/IQ31244 projects/pseries/arm/conf/KB920X projects/pseries/arm/conf/LN2410SBC projects/pseries/arm/conf/NSLU projects/pseries/arm/conf/QILA9G20 projects/pseries/arm/conf/QILA9G20.hints projects/pseries/arm/conf/SAM9G20EK projects/pseries/arm/conf/SAM9G20EK.hints projects/pseries/arm/conf/SHEEVAPLUG projects/pseries/arm/conf/SIMICS projects/pseries/arm/econa/econa.c projects/pseries/arm/econa/econa_machdep.c projects/pseries/arm/econa/std.econa projects/pseries/arm/include/_stdint.h projects/pseries/arm/include/_types.h projects/pseries/arm/include/armreg.h projects/pseries/arm/include/asm.h projects/pseries/arm/include/asmacros.h projects/pseries/arm/include/atomic.h projects/pseries/arm/include/blockio.h projects/pseries/arm/include/cpu.h projects/pseries/arm/include/cpuconf.h projects/pseries/arm/include/cpufunc.h projects/pseries/arm/include/elf.h projects/pseries/arm/include/endian.h projects/pseries/arm/include/fdt.h projects/pseries/arm/include/fp.h projects/pseries/arm/include/frame.h projects/pseries/arm/include/ieee.h projects/pseries/arm/include/in_cksum.h projects/pseries/arm/include/intr.h projects/pseries/arm/include/katelib.h projects/pseries/arm/include/kdb.h projects/pseries/arm/include/machdep.h projects/pseries/arm/include/md_var.h projects/pseries/arm/include/param.h projects/pseries/arm/include/pcb.h projects/pseries/arm/include/pcpu.h projects/pseries/arm/include/pmap.h projects/pseries/arm/include/pmc_mdep.h projects/pseries/arm/include/profile.h projects/pseries/arm/include/pte.h projects/pseries/arm/include/resource.h projects/pseries/arm/include/smp.h projects/pseries/arm/include/stack.h projects/pseries/arm/include/sysarch.h projects/pseries/arm/include/vmparam.h projects/pseries/arm/mv/common.c projects/pseries/arm/mv/discovery/discovery.c projects/pseries/arm/mv/discovery/files.db78xxx projects/pseries/arm/mv/files.mv projects/pseries/arm/mv/gpio.c projects/pseries/arm/mv/ic.c projects/pseries/arm/mv/kirkwood/files.kirkwood projects/pseries/arm/mv/kirkwood/kirkwood.c projects/pseries/arm/mv/mv_machdep.c projects/pseries/arm/mv/mv_pci.c projects/pseries/arm/mv/mv_sata.c projects/pseries/arm/mv/mvreg.h projects/pseries/arm/mv/mvvar.h projects/pseries/arm/mv/mvwin.h projects/pseries/arm/mv/orion/files.db88f5xxx projects/pseries/arm/mv/orion/files.ts7800 projects/pseries/arm/mv/std.mv projects/pseries/arm/mv/timer.c projects/pseries/arm/mv/twsi.c projects/pseries/arm/s3c2xx0/s3c2410reg.h projects/pseries/arm/s3c2xx0/s3c2440reg.h projects/pseries/arm/s3c2xx0/s3c24x0.c projects/pseries/arm/s3c2xx0/s3c24x0_machdep.c projects/pseries/arm/s3c2xx0/s3c24x0reg.h projects/pseries/arm/s3c2xx0/std.ln2410sbc projects/pseries/arm/s3c2xx0/std.s3c2410 projects/pseries/arm/sa11x0/assabet_machdep.c projects/pseries/arm/sa11x0/sa11x0.c projects/pseries/arm/sa11x0/sa11x0_gpioreg.h projects/pseries/arm/sa11x0/sa11x0_io_asm.S projects/pseries/arm/sa11x0/sa11x0_irq.S projects/pseries/arm/sa11x0/sa11x0_ost.c projects/pseries/arm/sa11x0/sa11x0_ostreg.h projects/pseries/arm/sa11x0/sa11x0_var.h projects/pseries/arm/sa11x0/std.sa11x0 projects/pseries/arm/sa11x0/uart_dev_sa1110.c projects/pseries/arm/xscale/i80321/ep80219_machdep.c projects/pseries/arm/xscale/i80321/i80321.c projects/pseries/arm/xscale/i80321/i80321_aau.c projects/pseries/arm/xscale/i80321/i80321_dma.c projects/pseries/arm/xscale/i80321/i80321_intr.h projects/pseries/arm/xscale/i80321/i80321_pci.c projects/pseries/arm/xscale/i80321/i80321_space.c projects/pseries/arm/xscale/i80321/i80321_timer.c projects/pseries/arm/xscale/i80321/i80321reg.h projects/pseries/arm/xscale/i80321/iq31244_7seg.c projects/pseries/arm/xscale/i80321/iq31244_machdep.c projects/pseries/arm/xscale/i80321/iq80321.c projects/pseries/arm/xscale/i80321/obio.c projects/pseries/arm/xscale/i80321/std.i80219 projects/pseries/arm/xscale/i80321/std.i80321 projects/pseries/arm/xscale/i8134x/crb_machdep.c projects/pseries/arm/xscale/i8134x/i81342.c projects/pseries/arm/xscale/i8134x/i81342_mcu.c projects/pseries/arm/xscale/i8134x/i81342_pci.c projects/pseries/arm/xscale/i8134x/i81342_space.c projects/pseries/arm/xscale/i8134x/i81342reg.h projects/pseries/arm/xscale/i8134x/iq81342_7seg.c projects/pseries/arm/xscale/i8134x/obio.c projects/pseries/arm/xscale/i8134x/std.i81342 projects/pseries/arm/xscale/i8134x/uart_cpu_i81342.c projects/pseries/arm/xscale/ixp425/avila_ata.c projects/pseries/arm/xscale/ixp425/avila_gpio.c projects/pseries/arm/xscale/ixp425/avila_machdep.c projects/pseries/arm/xscale/ixp425/cambria_exp_space.c projects/pseries/arm/xscale/ixp425/cambria_gpio.c projects/pseries/arm/xscale/ixp425/if_npe.c projects/pseries/arm/xscale/ixp425/if_npereg.h projects/pseries/arm/xscale/ixp425/ixp425.c projects/pseries/arm/xscale/ixp425/ixp425_iic.c projects/pseries/arm/xscale/ixp425/ixp425_npe.c projects/pseries/arm/xscale/ixp425/ixp425_npereg.h projects/pseries/arm/xscale/ixp425/ixp425_pci.c projects/pseries/arm/xscale/ixp425/ixp425_pci_space.c projects/pseries/arm/xscale/ixp425/ixp425_qmgr.c projects/pseries/arm/xscale/ixp425/ixp425_qmgr.h projects/pseries/arm/xscale/ixp425/ixp425reg.h projects/pseries/arm/xscale/ixp425/std.ixp425 projects/pseries/arm/xscale/ixp425/std.ixp435 projects/pseries/arm/xscale/pxa/if_smc_smi.c projects/pseries/arm/xscale/pxa/pxa_machdep.c projects/pseries/arm/xscale/pxa/pxa_obio.c projects/pseries/arm/xscale/pxa/pxareg.h projects/pseries/arm/xscale/pxa/std.pxa projects/pseries/arm/xscale/pxa/uart_bus_pxa.c projects/pseries/arm/xscale/std.xscale projects/pseries/boot/Makefile.ia64 projects/pseries/boot/Makefile.sparc64 projects/pseries/boot/arm/at91/boot0spi/main.c projects/pseries/boot/arm/at91/boot2/boot2.c projects/pseries/boot/arm/at91/bootspi/ee.c projects/pseries/boot/arm/at91/libat91/Makefile projects/pseries/boot/arm/at91/libat91/at91rm9200.h projects/pseries/boot/arm/at91/libat91/at91rm9200_lowlevel.c projects/pseries/boot/arm/at91/libat91/eeprom.c projects/pseries/boot/arm/at91/libat91/emac_init.c projects/pseries/boot/arm/at91/libat91/lib_AT91RM9200.h projects/pseries/boot/arm/at91/libat91/spi_flash.c projects/pseries/boot/arm/at91/linker.cfg projects/pseries/boot/arm/ixp425/boot2/boot2.c projects/pseries/boot/arm/uboot/Makefile projects/pseries/boot/arm/uboot/conf.c projects/pseries/boot/arm/uboot/ldscript.arm projects/pseries/boot/arm/uboot/start.S projects/pseries/boot/arm/uboot/version projects/pseries/boot/common/Makefile.inc projects/pseries/boot/common/boot.c projects/pseries/boot/common/bootstrap.h projects/pseries/boot/common/disk.c projects/pseries/boot/common/disk.h projects/pseries/boot/common/gpt.c projects/pseries/boot/common/load_elf.c projects/pseries/boot/common/load_elf_obj.c projects/pseries/boot/common/loader.8 projects/pseries/boot/common/module.c projects/pseries/boot/common/ufsread.c projects/pseries/boot/efi/Makefile.inc projects/pseries/boot/fdt/dts/db78100.dts projects/pseries/boot/fdt/dts/db88f6281.dts projects/pseries/boot/fdt/dts/p3041ds.dts projects/pseries/boot/fdt/dts/sheevaplug.dts projects/pseries/boot/fdt/dts/xlp-basic.dts projects/pseries/boot/fdt/fdt_loader_cmd.c projects/pseries/boot/ficl/Makefile projects/pseries/boot/forth/beastie.4th projects/pseries/boot/forth/beastie.4th.8 projects/pseries/boot/forth/brand.4th projects/pseries/boot/forth/brand.4th.8 projects/pseries/boot/forth/check-password.4th projects/pseries/boot/forth/check-password.4th.8 projects/pseries/boot/forth/color.4th projects/pseries/boot/forth/color.4th.8 projects/pseries/boot/forth/delay.4th projects/pseries/boot/forth/delay.4th.8 projects/pseries/boot/forth/menu-commands.4th projects/pseries/boot/forth/menu.4th projects/pseries/boot/forth/menu.4th.8 projects/pseries/boot/forth/shortcuts.4th projects/pseries/boot/forth/version.4th projects/pseries/boot/forth/version.4th.8 projects/pseries/boot/i386/boot2/boot2.c projects/pseries/boot/i386/btx/btx/Makefile projects/pseries/boot/i386/btx/btx/btx.S projects/pseries/boot/i386/btx/btxldr/Makefile projects/pseries/boot/i386/btx/btxldr/btxldr.S projects/pseries/boot/i386/btx/lib/Makefile projects/pseries/boot/i386/cdboot/Makefile projects/pseries/boot/i386/efi/Makefile projects/pseries/boot/i386/efi/reloc.c projects/pseries/boot/i386/gptboot/gptboot.c projects/pseries/boot/i386/libi386/Makefile projects/pseries/boot/i386/libi386/biosdisk.c projects/pseries/boot/i386/libi386/biospnp.c projects/pseries/boot/i386/libi386/devicename.c projects/pseries/boot/i386/libi386/libi386.h projects/pseries/boot/i386/libi386/pxe.c projects/pseries/boot/i386/libi386/pxe.h projects/pseries/boot/i386/loader/Makefile projects/pseries/boot/i386/loader/conf.c projects/pseries/boot/i386/loader/main.c projects/pseries/boot/i386/pmbr/pmbr.s projects/pseries/boot/i386/pxeldr/Makefile projects/pseries/boot/i386/pxeldr/pxeldr.S projects/pseries/boot/i386/zfsboot/zfsboot.c projects/pseries/boot/ia64/Makefile projects/pseries/boot/ofw/libofw/Makefile projects/pseries/boot/ofw/libofw/devicename.c projects/pseries/boot/ofw/libofw/libofw.h projects/pseries/boot/ofw/libofw/ofw_disk.c projects/pseries/boot/pc98/boot2/boot2.c projects/pseries/boot/pc98/btx/btx/Makefile projects/pseries/boot/pc98/btx/btx/btx.S projects/pseries/boot/pc98/btx/btxldr/Makefile projects/pseries/boot/pc98/btx/btxldr/btxldr.S projects/pseries/boot/pc98/btx/lib/Makefile projects/pseries/boot/pc98/cdboot/Makefile projects/pseries/boot/pc98/libpc98/Makefile projects/pseries/boot/pc98/libpc98/biosdisk.c projects/pseries/boot/pc98/loader/main.c projects/pseries/boot/powerpc/boot1.chrp/boot1.c projects/pseries/boot/powerpc/uboot/Makefile projects/pseries/boot/sparc64/Makefile projects/pseries/boot/sparc64/boot1/Makefile projects/pseries/boot/sparc64/boot1/boot1.c projects/pseries/boot/sparc64/loader/Makefile projects/pseries/boot/sparc64/loader/main.c projects/pseries/boot/uboot/common/main.c projects/pseries/boot/uboot/common/metadata.c projects/pseries/boot/uboot/lib/Makefile projects/pseries/boot/uboot/lib/api_public.h projects/pseries/boot/uboot/lib/copy.c projects/pseries/boot/uboot/lib/devicename.c projects/pseries/boot/uboot/lib/disk.c projects/pseries/boot/uboot/lib/elf_freebsd.c projects/pseries/boot/uboot/lib/glue.c projects/pseries/boot/uboot/lib/libuboot.h projects/pseries/boot/userboot/libstand/Makefile projects/pseries/boot/userboot/test/test.c projects/pseries/boot/userboot/userboot.h projects/pseries/boot/userboot/userboot/Makefile projects/pseries/boot/userboot/userboot/bootinfo32.c projects/pseries/boot/userboot/userboot/copy.c projects/pseries/boot/userboot/userboot/devicename.c projects/pseries/boot/userboot/userboot/main.c projects/pseries/boot/userboot/userboot/userboot_disk.c projects/pseries/boot/zfs/Makefile projects/pseries/boot/zfs/zfs.c projects/pseries/boot/zfs/zfsimpl.c projects/pseries/cam/ata/ata_all.c projects/pseries/cam/ata/ata_all.h projects/pseries/cam/ata/ata_da.c projects/pseries/cam/ata/ata_pmp.c projects/pseries/cam/ata/ata_xpt.c projects/pseries/cam/cam.h projects/pseries/cam/cam_ccb.h projects/pseries/cam/cam_debug.h projects/pseries/cam/cam_periph.c projects/pseries/cam/cam_periph.h projects/pseries/cam/cam_sim.h projects/pseries/cam/cam_xpt.c projects/pseries/cam/cam_xpt.h projects/pseries/cam/cam_xpt_periph.h projects/pseries/cam/cam_xpt_sim.h projects/pseries/cam/ctl/ctl.c projects/pseries/cam/ctl/ctl_backend.c projects/pseries/cam/ctl/ctl_cmd_table.c projects/pseries/cam/ctl/ctl_error.c projects/pseries/cam/ctl/ctl_frontend.c projects/pseries/cam/ctl/ctl_frontend_cam_sim.c projects/pseries/cam/ctl/ctl_frontend_internal.c projects/pseries/cam/ctl/ctl_private.h projects/pseries/cam/ctl/scsi_ctl.c projects/pseries/cam/scsi/scsi_all.c projects/pseries/cam/scsi/scsi_all.h projects/pseries/cam/scsi/scsi_cd.c projects/pseries/cam/scsi/scsi_ch.c projects/pseries/cam/scsi/scsi_da.c projects/pseries/cam/scsi/scsi_da.h projects/pseries/cam/scsi/scsi_low.c projects/pseries/cam/scsi/scsi_low.h projects/pseries/cam/scsi/scsi_pass.c projects/pseries/cam/scsi/scsi_pt.c projects/pseries/cam/scsi/scsi_sa.c projects/pseries/cam/scsi/scsi_ses.h projects/pseries/cam/scsi/scsi_sg.c projects/pseries/cam/scsi/scsi_target.c projects/pseries/cam/scsi/scsi_xpt.c projects/pseries/cddl/boot/zfs/zfsimpl.h projects/pseries/cddl/compat/opensolaris/kern/opensolaris_cmn_err.c projects/pseries/cddl/compat/opensolaris/sys/debug.h projects/pseries/cddl/compat/opensolaris/sys/sid.h projects/pseries/cddl/contrib/opensolaris/common/zfs/zpool_prop.c projects/pseries/cddl/contrib/opensolaris/uts/common/Makefile.files projects/pseries/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deleg.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_synctask.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/bpobj.h projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_impl.h projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_traverse.h projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_scan.h projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/txg.h projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap.h projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_debug.h projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_impl.h projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_missing.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_root.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_debug.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_rlock.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c projects/pseries/cddl/contrib/opensolaris/uts/common/sys/debug.h projects/pseries/cddl/contrib/opensolaris/uts/common/sys/dtrace.h projects/pseries/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h projects/pseries/cddl/contrib/opensolaris/uts/common/sys/nvpair.h projects/pseries/cddl/dev/dtrace/amd64/dis_tables.c projects/pseries/cddl/dev/dtrace/amd64/dtrace_subr.c projects/pseries/cddl/dev/dtrace/i386/dis_tables.c projects/pseries/cddl/dev/dtrace/i386/dtrace_subr.c projects/pseries/compat/freebsd32/freebsd32.h projects/pseries/compat/freebsd32/freebsd32_misc.c projects/pseries/compat/freebsd32/freebsd32_proto.h projects/pseries/compat/freebsd32/freebsd32_syscall.h projects/pseries/compat/freebsd32/freebsd32_syscalls.c projects/pseries/compat/freebsd32/freebsd32_sysent.c projects/pseries/compat/freebsd32/freebsd32_systrace_args.c projects/pseries/compat/freebsd32/syscalls.master projects/pseries/compat/ia32/ia32_sysvec.c projects/pseries/compat/ia32/ia32_util.h projects/pseries/compat/linux/linux_emul.c projects/pseries/compat/linux/linux_emul.h projects/pseries/compat/linux/linux_file.c projects/pseries/compat/linux/linux_fork.c projects/pseries/compat/linux/linux_futex.c projects/pseries/compat/linux/linux_mib.c projects/pseries/compat/linux/linux_misc.c projects/pseries/compat/linux/linux_sysctl.c projects/pseries/compat/linux/linux_time.c projects/pseries/compat/linux/linux_uid16.c projects/pseries/compat/linux/linux_util.c projects/pseries/compat/linux/linux_util.h projects/pseries/compat/ndis/subr_ntoskrnl.c projects/pseries/conf/Makefile.amd64 projects/pseries/conf/Makefile.arm projects/pseries/conf/Makefile.powerpc projects/pseries/conf/NOTES projects/pseries/conf/files projects/pseries/conf/files.amd64 projects/pseries/conf/files.arm projects/pseries/conf/files.i386 projects/pseries/conf/files.ia64 projects/pseries/conf/files.mips projects/pseries/conf/files.powerpc projects/pseries/conf/files.sparc64 projects/pseries/conf/kern.mk projects/pseries/conf/kern.post.mk projects/pseries/conf/kern.pre.mk projects/pseries/conf/kmod.mk projects/pseries/conf/ldscript.arm projects/pseries/conf/makeLINT.mk projects/pseries/conf/newvers.sh projects/pseries/conf/options projects/pseries/conf/options.amd64 projects/pseries/conf/options.arm projects/pseries/conf/options.i386 projects/pseries/conf/options.ia64 projects/pseries/conf/options.mips projects/pseries/conf/options.powerpc projects/pseries/contrib/altq/altq/altq_cbq.c projects/pseries/contrib/altq/altq/altq_hfsc.c projects/pseries/contrib/altq/altq/altq_priq.c projects/pseries/contrib/altq/altq/altq_subr.c projects/pseries/contrib/dev/acpica/acpica_prep.sh projects/pseries/contrib/dev/acpica/changes.txt (contents, props changed) projects/pseries/contrib/dev/acpica/common/adfile.c projects/pseries/contrib/dev/acpica/common/adisasm.c projects/pseries/contrib/dev/acpica/common/adwalk.c projects/pseries/contrib/dev/acpica/common/dmextern.c projects/pseries/contrib/dev/acpica/common/dmrestag.c projects/pseries/contrib/dev/acpica/common/dmtable.c projects/pseries/contrib/dev/acpica/common/dmtbdump.c projects/pseries/contrib/dev/acpica/common/dmtbinfo.c projects/pseries/contrib/dev/acpica/compiler/aslcompile.c projects/pseries/contrib/dev/acpica/compiler/aslcompiler.h projects/pseries/contrib/dev/acpica/compiler/aslcompiler.l projects/pseries/contrib/dev/acpica/compiler/aslcompiler.y projects/pseries/contrib/dev/acpica/compiler/aslerror.c projects/pseries/contrib/dev/acpica/compiler/aslfiles.c projects/pseries/contrib/dev/acpica/compiler/aslfold.c projects/pseries/contrib/dev/acpica/compiler/aslglobal.h projects/pseries/contrib/dev/acpica/compiler/asllookup.c projects/pseries/contrib/dev/acpica/compiler/aslmain.c projects/pseries/contrib/dev/acpica/compiler/aslmap.c projects/pseries/contrib/dev/acpica/compiler/aslmessages.h projects/pseries/contrib/dev/acpica/compiler/aslrestype1.c projects/pseries/contrib/dev/acpica/compiler/aslstartup.c projects/pseries/contrib/dev/acpica/compiler/asltree.c projects/pseries/contrib/dev/acpica/compiler/aslutils.c projects/pseries/contrib/dev/acpica/compiler/dtio.c projects/pseries/contrib/dev/acpica/compiler/dttemplate.c projects/pseries/contrib/dev/acpica/compiler/preprocess.h projects/pseries/contrib/dev/acpica/compiler/prscan.c projects/pseries/contrib/dev/acpica/compiler/prutils.c projects/pseries/contrib/dev/acpica/components/debugger/dbcmds.c projects/pseries/contrib/dev/acpica/components/debugger/dbdisply.c projects/pseries/contrib/dev/acpica/components/debugger/dbexec.c projects/pseries/contrib/dev/acpica/components/debugger/dbfileio.c projects/pseries/contrib/dev/acpica/components/debugger/dbinput.c projects/pseries/contrib/dev/acpica/components/debugger/dbstats.c projects/pseries/contrib/dev/acpica/components/debugger/dbutils.c projects/pseries/contrib/dev/acpica/components/disassembler/dmbuffer.c projects/pseries/contrib/dev/acpica/components/disassembler/dmopcode.c projects/pseries/contrib/dev/acpica/components/disassembler/dmwalk.c projects/pseries/contrib/dev/acpica/components/dispatcher/dsfield.c projects/pseries/contrib/dev/acpica/components/dispatcher/dsopcode.c projects/pseries/contrib/dev/acpica/components/dispatcher/dswload.c projects/pseries/contrib/dev/acpica/components/dispatcher/dswload2.c projects/pseries/contrib/dev/acpica/components/events/evgpe.c projects/pseries/contrib/dev/acpica/components/events/evgpeutil.c projects/pseries/contrib/dev/acpica/components/events/evmisc.c projects/pseries/contrib/dev/acpica/components/events/evxface.c projects/pseries/contrib/dev/acpica/components/events/evxfgpe.c projects/pseries/contrib/dev/acpica/components/executer/exconfig.c projects/pseries/contrib/dev/acpica/components/executer/exdump.c projects/pseries/contrib/dev/acpica/components/executer/exprep.c projects/pseries/contrib/dev/acpica/components/executer/exresolv.c projects/pseries/contrib/dev/acpica/components/executer/exstore.c projects/pseries/contrib/dev/acpica/components/executer/exutils.c projects/pseries/contrib/dev/acpica/components/hardware/hwesleep.c projects/pseries/contrib/dev/acpica/components/hardware/hwgpe.c projects/pseries/contrib/dev/acpica/components/hardware/hwsleep.c projects/pseries/contrib/dev/acpica/components/hardware/hwxfsleep.c projects/pseries/contrib/dev/acpica/components/namespace/nsdump.c projects/pseries/contrib/dev/acpica/components/namespace/nspredef.c projects/pseries/contrib/dev/acpica/components/parser/psxface.c projects/pseries/contrib/dev/acpica/components/resources/rscreate.c projects/pseries/contrib/dev/acpica/components/resources/rsutils.c projects/pseries/contrib/dev/acpica/components/tables/tbfadt.c projects/pseries/contrib/dev/acpica/components/tables/tbinstal.c projects/pseries/contrib/dev/acpica/components/tables/tbutils.c projects/pseries/contrib/dev/acpica/components/tables/tbxface.c projects/pseries/contrib/dev/acpica/components/tables/tbxfroot.c projects/pseries/contrib/dev/acpica/components/utilities/utdecode.c projects/pseries/contrib/dev/acpica/components/utilities/utdelete.c projects/pseries/contrib/dev/acpica/components/utilities/utglobal.c projects/pseries/contrib/dev/acpica/components/utilities/utmisc.c projects/pseries/contrib/dev/acpica/components/utilities/utobject.c projects/pseries/contrib/dev/acpica/components/utilities/utosi.c projects/pseries/contrib/dev/acpica/components/utilities/utresrc.c projects/pseries/contrib/dev/acpica/components/utilities/uttrack.c projects/pseries/contrib/dev/acpica/components/utilities/utxface.c projects/pseries/contrib/dev/acpica/components/utilities/utxferror.c projects/pseries/contrib/dev/acpica/include/acdebug.h projects/pseries/contrib/dev/acpica/include/acdisasm.h projects/pseries/contrib/dev/acpica/include/acexcep.h projects/pseries/contrib/dev/acpica/include/acglobal.h projects/pseries/contrib/dev/acpica/include/achware.h projects/pseries/contrib/dev/acpica/include/aclocal.h projects/pseries/contrib/dev/acpica/include/acmacros.h projects/pseries/contrib/dev/acpica/include/acnames.h projects/pseries/contrib/dev/acpica/include/acobject.h projects/pseries/contrib/dev/acpica/include/acoutput.h projects/pseries/contrib/dev/acpica/include/acpiosxf.h projects/pseries/contrib/dev/acpica/include/acpixf.h projects/pseries/contrib/dev/acpica/include/acpredef.h projects/pseries/contrib/dev/acpica/include/actbl.h projects/pseries/contrib/dev/acpica/include/actbl1.h projects/pseries/contrib/dev/acpica/include/actbl2.h projects/pseries/contrib/dev/acpica/include/actbl3.h projects/pseries/contrib/dev/acpica/include/actypes.h projects/pseries/contrib/dev/acpica/include/acutils.h projects/pseries/contrib/dev/acpica/include/platform/acenv.h projects/pseries/contrib/dev/acpica/os_specific/service_layers/osunixxf.c projects/pseries/contrib/libfdt/fdt.c projects/pseries/contrib/libfdt/fdt_ro.c projects/pseries/contrib/libfdt/fdt_rw.c projects/pseries/contrib/libfdt/libfdt.h projects/pseries/contrib/libfdt/libfdt_env.h projects/pseries/contrib/libfdt/libfdt_internal.h projects/pseries/contrib/rdma/krping/krping.c projects/pseries/contrib/rdma/krping/krping.h projects/pseries/contrib/rdma/krping/krping_dev.c projects/pseries/contrib/rdma/rdma_addr.c projects/pseries/contrib/rdma/rdma_cache.c projects/pseries/contrib/rdma/rdma_cma.c projects/pseries/ddb/db_main.c projects/pseries/dev/aac/aac_disk.c projects/pseries/dev/acpi_support/acpi_ibm.c projects/pseries/dev/acpica/Osd/OsdSchedule.c projects/pseries/dev/acpica/Osd/OsdSynch.c projects/pseries/dev/acpica/acpi.c projects/pseries/dev/acpica/acpi_cpu.c projects/pseries/dev/acpica/acpi_ec.c projects/pseries/dev/acpica/acpi_hpet.c projects/pseries/dev/acpica/acpi_powerres.c projects/pseries/dev/acpica/acpi_smbat.c projects/pseries/dev/acpica/acpi_video.c projects/pseries/dev/acpica/acpivar.h projects/pseries/dev/adb/adb_kbd.c projects/pseries/dev/ae/if_ae.c projects/pseries/dev/agp/agp.c projects/pseries/dev/agp/agp_i810.c projects/pseries/dev/agp/agp_if.m projects/pseries/dev/agp/agppriv.h projects/pseries/dev/agp/agpreg.h projects/pseries/dev/agp/agpvar.h projects/pseries/dev/ahci/ahci.c projects/pseries/dev/ahci/ahci.h projects/pseries/dev/aic7xxx/aic79xx.c projects/pseries/dev/aic7xxx/aic79xx_osm.c projects/pseries/dev/aic7xxx/aic7xxx.c projects/pseries/dev/aic7xxx/aic7xxx_osm.c projects/pseries/dev/aic7xxx/aic_osm_lib.c projects/pseries/dev/aic7xxx/aicasm/Makefile projects/pseries/dev/aic7xxx/aicasm/aicasm.c projects/pseries/dev/ale/if_ale.c projects/pseries/dev/amr/amr.c projects/pseries/dev/amr/amrvar.h projects/pseries/dev/arcmsr/arcmsr.c projects/pseries/dev/arcmsr/arcmsr.h projects/pseries/dev/asr/asr.c projects/pseries/dev/ata/ata-all.c projects/pseries/dev/ata/ata-lowlevel.c projects/pseries/dev/ata/ata-pci.h projects/pseries/dev/ata/chipsets/ata-ite.c projects/pseries/dev/ata/chipsets/ata-jmicron.c projects/pseries/dev/ata/chipsets/ata-via.c projects/pseries/dev/ath/ah_osdep.c projects/pseries/dev/ath/ah_osdep.h projects/pseries/dev/ath/ath_dfs/null/dfs_null.c projects/pseries/dev/ath/ath_hal/ah.c projects/pseries/dev/ath/ath_hal/ah.h projects/pseries/dev/ath/ath_hal/ah_debug.h projects/pseries/dev/ath/ath_hal/ah_decode.h projects/pseries/dev/ath/ath_hal/ah_desc.h projects/pseries/dev/ath/ath_hal/ah_devid.h projects/pseries/dev/ath/ath_hal/ah_diagcodes.h projects/pseries/dev/ath/ath_hal/ah_eeprom.h projects/pseries/dev/ath/ath_hal/ah_eeprom_9287.c projects/pseries/dev/ath/ath_hal/ah_eeprom_v4k.c projects/pseries/dev/ath/ath_hal/ah_internal.h projects/pseries/dev/ath/ath_hal/ar5210/ar5210.h projects/pseries/dev/ath/ath_hal/ar5210/ar5210_attach.c projects/pseries/dev/ath/ath_hal/ar5210/ar5210_misc.c projects/pseries/dev/ath/ath_hal/ar5210/ar5210_recv.c projects/pseries/dev/ath/ath_hal/ar5210/ar5210_reset.c projects/pseries/dev/ath/ath_hal/ar5210/ar5210_xmit.c projects/pseries/dev/ath/ath_hal/ar5211/ar5211.h projects/pseries/dev/ath/ath_hal/ar5211/ar5211_attach.c projects/pseries/dev/ath/ath_hal/ar5211/ar5211_misc.c projects/pseries/dev/ath/ath_hal/ar5211/ar5211_recv.c projects/pseries/dev/ath/ath_hal/ar5211/ar5211_reset.c projects/pseries/dev/ath/ath_hal/ar5211/ar5211_xmit.c projects/pseries/dev/ath/ath_hal/ar5212/ar5212.h projects/pseries/dev/ath/ath_hal/ar5212/ar5212_attach.c projects/pseries/dev/ath/ath_hal/ar5212/ar5212_misc.c projects/pseries/dev/ath/ath_hal/ar5212/ar5212_recv.c projects/pseries/dev/ath/ath_hal/ar5212/ar5212_reset.c projects/pseries/dev/ath/ath_hal/ar5212/ar5212_xmit.c projects/pseries/dev/ath/ath_hal/ar5212/ar5212phy.h projects/pseries/dev/ath/ath_hal/ar5312/ar5312_reset.c projects/pseries/dev/ath/ath_hal/ar5416/ar5416.h projects/pseries/dev/ath/ath_hal/ar5416/ar5416_ani.c projects/pseries/dev/ath/ath_hal/ar5416/ar5416_attach.c projects/pseries/dev/ath/ath_hal/ar5416/ar5416_gpio.c projects/pseries/dev/ath/ath_hal/ar5416/ar5416_interrupts.c projects/pseries/dev/ath/ath_hal/ar5416/ar5416_misc.c projects/pseries/dev/ath/ath_hal/ar5416/ar5416_power.c projects/pseries/dev/ath/ath_hal/ar5416/ar5416_radar.c projects/pseries/dev/ath/ath_hal/ar5416/ar5416_recv.c projects/pseries/dev/ath/ath_hal/ar5416/ar5416_reset.c projects/pseries/dev/ath/ath_hal/ar5416/ar5416_xmit.c projects/pseries/dev/ath/ath_hal/ar5416/ar5416phy.h projects/pseries/dev/ath/ath_hal/ar5416/ar5416reg.h projects/pseries/dev/ath/ath_hal/ar9002/ar9280.c projects/pseries/dev/ath/ath_hal/ar9002/ar9280_attach.c projects/pseries/dev/ath/ath_hal/ar9002/ar9285.h projects/pseries/dev/ath/ath_hal/ar9002/ar9285_attach.c projects/pseries/dev/ath/ath_hal/ar9002/ar9285_diversity.c projects/pseries/dev/ath/ath_hal/ar9002/ar9287_attach.c projects/pseries/dev/ath/ath_hal/ar9002/ar9287_reset.c projects/pseries/dev/ath/ath_rate/amrr/amrr.c projects/pseries/dev/ath/ath_rate/onoe/onoe.c projects/pseries/dev/ath/ath_rate/sample/sample.c projects/pseries/dev/ath/ath_rate/sample/sample.h projects/pseries/dev/ath/ath_rate/sample/tx_schedules.h projects/pseries/dev/ath/if_ath.c projects/pseries/dev/ath/if_ath_ahb.c projects/pseries/dev/ath/if_ath_debug.c projects/pseries/dev/ath/if_ath_debug.h projects/pseries/dev/ath/if_ath_led.c projects/pseries/dev/ath/if_ath_misc.h projects/pseries/dev/ath/if_ath_pci.c projects/pseries/dev/ath/if_ath_sysctl.c projects/pseries/dev/ath/if_ath_tx.c projects/pseries/dev/ath/if_ath_tx.h projects/pseries/dev/ath/if_ath_tx_ht.c projects/pseries/dev/ath/if_athdfs.h projects/pseries/dev/ath/if_athioctl.h projects/pseries/dev/ath/if_athrate.h projects/pseries/dev/ath/if_athvar.h projects/pseries/dev/atkbdc/atkbdc_isa.c projects/pseries/dev/atkbdc/psm.c projects/pseries/dev/bce/if_bce.c projects/pseries/dev/bce/if_bcereg.h projects/pseries/dev/bge/if_bge.c projects/pseries/dev/bge/if_bgereg.h projects/pseries/dev/buslogic/bt.c projects/pseries/dev/bwi/bwimac.c projects/pseries/dev/bwi/bwiphy.c projects/pseries/dev/bwi/bwirf.c projects/pseries/dev/bwi/if_bwi.c projects/pseries/dev/bwi/if_bwi_pci.c projects/pseries/dev/bxe/if_bxe.c projects/pseries/dev/cesa/cesa.c projects/pseries/dev/ct/bshw_machdep.c projects/pseries/dev/ct/ct.c projects/pseries/dev/ct/ct_isa.c projects/pseries/dev/ct/ct_machdep.h projects/pseries/dev/ct/ctvar.h projects/pseries/dev/cxgb/common/cxgb_ctl_defs.h projects/pseries/dev/cxgb/cxgb_adapter.h projects/pseries/dev/cxgb/cxgb_main.c projects/pseries/dev/cxgb/cxgb_offload.h projects/pseries/dev/cxgb/cxgb_osdep.h projects/pseries/dev/cxgb/cxgb_sge.c projects/pseries/dev/cxgb/sys/mvec.h projects/pseries/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c projects/pseries/dev/cxgb/ulp/iw_cxgb/iw_cxgb.h projects/pseries/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c projects/pseries/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.h projects/pseries/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cq.c projects/pseries/dev/cxgb/ulp/iw_cxgb/iw_cxgb_dbg.c projects/pseries/dev/cxgb/ulp/iw_cxgb/iw_cxgb_ev.c projects/pseries/dev/cxgb/ulp/iw_cxgb/iw_cxgb_hal.c projects/pseries/dev/cxgb/ulp/iw_cxgb/iw_cxgb_hal.h projects/pseries/dev/cxgb/ulp/iw_cxgb/iw_cxgb_mem.c projects/pseries/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c projects/pseries/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.h projects/pseries/dev/cxgb/ulp/iw_cxgb/iw_cxgb_qp.c projects/pseries/dev/cxgb/ulp/iw_cxgb/iw_cxgb_resource.c projects/pseries/dev/cxgb/ulp/iw_cxgb/iw_cxgb_user.h projects/pseries/dev/cxgb/ulp/iw_cxgb/iw_cxgb_wr.h projects/pseries/dev/cxgb/ulp/tom/cxgb_cpl_io.c projects/pseries/dev/cxgb/ulp/tom/cxgb_l2t.c projects/pseries/dev/cxgb/ulp/tom/cxgb_l2t.h projects/pseries/dev/cxgb/ulp/tom/cxgb_listen.c projects/pseries/dev/cxgb/ulp/tom/cxgb_toepcb.h projects/pseries/dev/cxgb/ulp/tom/cxgb_tom.c projects/pseries/dev/cxgb/ulp/tom/cxgb_tom.h projects/pseries/dev/cxgbe/adapter.h projects/pseries/dev/cxgbe/common/common.h projects/pseries/dev/cxgbe/common/t4_hw.c projects/pseries/dev/cxgbe/common/t4_hw.h projects/pseries/dev/cxgbe/common/t4_msg.h projects/pseries/dev/cxgbe/firmware/t4fw_cfg.txt projects/pseries/dev/cxgbe/firmware/t4fw_cfg_uwire.txt projects/pseries/dev/cxgbe/firmware/t4fw_interface.h projects/pseries/dev/cxgbe/offload.h projects/pseries/dev/cxgbe/osdep.h projects/pseries/dev/cxgbe/t4_l2t.c projects/pseries/dev/cxgbe/t4_l2t.h projects/pseries/dev/cxgbe/t4_main.c projects/pseries/dev/cxgbe/t4_sge.c projects/pseries/dev/dc/if_dc.c projects/pseries/dev/dpt/dpt.h projects/pseries/dev/drm/drm_fops.c projects/pseries/dev/e1000/e1000_82541.c projects/pseries/dev/e1000/e1000_82543.c projects/pseries/dev/e1000/e1000_82571.c projects/pseries/dev/e1000/e1000_82575.c projects/pseries/dev/e1000/e1000_api.c projects/pseries/dev/e1000/e1000_api.h projects/pseries/dev/e1000/e1000_defines.h projects/pseries/dev/e1000/e1000_hw.h projects/pseries/dev/e1000/e1000_ich8lan.c projects/pseries/dev/e1000/e1000_mac.c projects/pseries/dev/e1000/e1000_mac.h projects/pseries/dev/e1000/e1000_manage.c projects/pseries/dev/e1000/e1000_manage.h projects/pseries/dev/e1000/e1000_phy.c projects/pseries/dev/e1000/e1000_phy.h projects/pseries/dev/e1000/e1000_regs.h projects/pseries/dev/e1000/if_em.c projects/pseries/dev/e1000/if_igb.c projects/pseries/dev/e1000/if_igb.h projects/pseries/dev/e1000/if_lem.c projects/pseries/dev/esp/ncr53c9x.c projects/pseries/dev/fb/fbreg.h projects/pseries/dev/fb/s3_pci.c projects/pseries/dev/fb/vesa.c projects/pseries/dev/fb/vga.c projects/pseries/dev/fdt/fdt_common.c projects/pseries/dev/fdt/fdt_common.h projects/pseries/dev/fdt/fdt_pci.c projects/pseries/dev/fdt/fdtbus.c projects/pseries/dev/fdt/simplebus.c projects/pseries/dev/firewire/sbp_targ.c projects/pseries/dev/flash/at45d.c projects/pseries/dev/flash/mx25l.c projects/pseries/dev/fxp/if_fxp.c projects/pseries/dev/gpio/gpioc.c projects/pseries/dev/hptiop/hptiop.c projects/pseries/dev/hptmv/entry.c projects/pseries/dev/hptrr/hptrr_osm_bsd.c projects/pseries/dev/hwpmc/hwpmc_arm.c projects/pseries/dev/hwpmc/hwpmc_core.c projects/pseries/dev/hwpmc/hwpmc_core.h projects/pseries/dev/hwpmc/hwpmc_intel.c projects/pseries/dev/hwpmc/hwpmc_mips.c projects/pseries/dev/hwpmc/hwpmc_powerpc.c projects/pseries/dev/hwpmc/hwpmc_x86.c projects/pseries/dev/hwpmc/pmc_events.h projects/pseries/dev/ida/ida.c projects/pseries/dev/ida/ida_disk.c projects/pseries/dev/ida/ida_eisa.c projects/pseries/dev/ida/ida_pci.c projects/pseries/dev/ida/idavar.h projects/pseries/dev/iicbus/ad7417.c projects/pseries/dev/iicbus/ds1374.c projects/pseries/dev/iicbus/ds1775.c projects/pseries/dev/iicbus/max6690.c projects/pseries/dev/ipmi/ipmi.c projects/pseries/dev/ipmi/ipmivars.h projects/pseries/dev/isci/isci.c projects/pseries/dev/isci/isci.h projects/pseries/dev/isci/isci_controller.c projects/pseries/dev/isci/isci_interrupt.c projects/pseries/dev/isci/isci_io_request.c projects/pseries/dev/isci/isci_remote_device.c projects/pseries/dev/isci/scil/sati.c projects/pseries/dev/isci/scil/sati_callbacks.h projects/pseries/dev/isci/scil/sati_inquiry.c projects/pseries/dev/isci/scil/sati_unmap.c projects/pseries/dev/isci/scil/sati_util.c projects/pseries/dev/isci/scil/sati_write_buffer.c projects/pseries/dev/isci/scil/sci_base_controller.h projects/pseries/dev/isci/scil/sci_base_domain.h projects/pseries/dev/isci/scil/sci_base_phy.h projects/pseries/dev/isci/scil/sci_base_remote_device.h projects/pseries/dev/isci/scil/scic_io_request.h projects/pseries/dev/isci/scil/scic_sds_phy.c projects/pseries/dev/isci/scil/scic_sds_port.h projects/pseries/dev/isci/scil/scic_sds_remote_device.h projects/pseries/dev/isci/scil/scic_sds_remote_node_context.h projects/pseries/dev/isci/scil/scic_sds_request.c projects/pseries/dev/isci/scil/scif_sas_sati_binding.h projects/pseries/dev/isci/scil/scif_sas_stp_io_request.c projects/pseries/dev/isci/scil/scu_bios_definitions.h projects/pseries/dev/iscsi/initiator/isc_subr.c projects/pseries/dev/iscsi/initiator/iscsi.c projects/pseries/dev/iscsi/initiator/iscsi_subr.c projects/pseries/dev/iscsi/initiator/iscsivar.h projects/pseries/dev/isp/isp.c projects/pseries/dev/isp/isp_freebsd.c projects/pseries/dev/isp/isp_freebsd.h projects/pseries/dev/isp/isp_library.c projects/pseries/dev/isp/isp_library.h projects/pseries/dev/isp/isp_pci.c projects/pseries/dev/isp/isp_sbus.c projects/pseries/dev/isp/isp_stds.h projects/pseries/dev/isp/isp_target.c projects/pseries/dev/isp/isp_target.h projects/pseries/dev/isp/ispmbox.h projects/pseries/dev/isp/ispreg.h projects/pseries/dev/isp/ispvar.h projects/pseries/dev/ispfw/asm_2300.h projects/pseries/dev/ispfw/asm_2400.h projects/pseries/dev/ispfw/asm_2500.h projects/pseries/dev/iwn/if_iwn.c projects/pseries/dev/ixgbe/ixgbe.c projects/pseries/dev/ixgbe/ixgbe.h projects/pseries/dev/ixgbe/ixgbe_82598.c projects/pseries/dev/ixgbe/ixgbe_82598.h projects/pseries/dev/ixgbe/ixgbe_82599.c projects/pseries/dev/ixgbe/ixgbe_api.c projects/pseries/dev/ixgbe/ixgbe_api.h projects/pseries/dev/ixgbe/ixgbe_common.c projects/pseries/dev/ixgbe/ixgbe_common.h projects/pseries/dev/ixgbe/ixgbe_osdep.h projects/pseries/dev/ixgbe/ixgbe_phy.c projects/pseries/dev/ixgbe/ixgbe_type.h projects/pseries/dev/ixgbe/ixgbe_vf.c projects/pseries/dev/ixgbe/ixgbe_x540.c projects/pseries/dev/ixgbe/ixv.c projects/pseries/dev/jme/if_jme.c projects/pseries/dev/ksyms/ksyms.c projects/pseries/dev/md/md.c projects/pseries/dev/mfi/mfi.c projects/pseries/dev/mfi/mfi_cam.c projects/pseries/dev/mfi/mfi_debug.c projects/pseries/dev/mfi/mfi_disk.c projects/pseries/dev/mfi/mfi_ioctl.h projects/pseries/dev/mfi/mfi_tbolt.c projects/pseries/dev/mfi/mfireg.h projects/pseries/dev/mfi/mfivar.h projects/pseries/dev/mge/if_mge.c projects/pseries/dev/mge/if_mgevar.h projects/pseries/dev/mii/ciphy.c projects/pseries/dev/mii/e1000phy.c projects/pseries/dev/mii/miidevs projects/pseries/dev/mii/smcphy.c projects/pseries/dev/mlx/mlxvar.h projects/pseries/dev/mmc/mmc.c projects/pseries/dev/mmc/mmcbrvar.h projects/pseries/dev/mmc/mmcreg.h projects/pseries/dev/mmc/mmcsd.c projects/pseries/dev/mmc/mmcvar.h projects/pseries/dev/mps/mpi/mpi2.h projects/pseries/dev/mps/mpi/mpi2_cnfg.h projects/pseries/dev/mps/mpi/mpi2_hbd.h projects/pseries/dev/mps/mpi/mpi2_history.txt projects/pseries/dev/mps/mpi/mpi2_init.h projects/pseries/dev/mps/mpi/mpi2_ioc.h projects/pseries/dev/mps/mpi/mpi2_ra.h projects/pseries/dev/mps/mpi/mpi2_raid.h projects/pseries/dev/mps/mpi/mpi2_sas.h projects/pseries/dev/mps/mpi/mpi2_targ.h projects/pseries/dev/mps/mpi/mpi2_tool.h projects/pseries/dev/mps/mpi/mpi2_type.h projects/pseries/dev/mps/mps.c projects/pseries/dev/mps/mps_config.c projects/pseries/dev/mps/mps_ioctl.h projects/pseries/dev/mps/mps_mapping.c projects/pseries/dev/mps/mps_mapping.h projects/pseries/dev/mps/mps_sas.c projects/pseries/dev/mps/mps_sas.h projects/pseries/dev/mps/mps_sas_lsi.c projects/pseries/dev/mps/mps_table.c projects/pseries/dev/mps/mps_user.c projects/pseries/dev/mps/mpsvar.h projects/pseries/dev/mpt/mpt_cam.c projects/pseries/dev/mpt/mpt_pci.c projects/pseries/dev/msk/if_msk.c projects/pseries/dev/mvs/mvs.c projects/pseries/dev/mvs/mvs.h projects/pseries/dev/mvs/mvs_soc.c projects/pseries/dev/mwl/if_mwl.c projects/pseries/dev/mwl/if_mwlvar.h projects/pseries/dev/mxge/eth_z8e.h projects/pseries/dev/mxge/ethp_z8e.h projects/pseries/dev/mxge/rss_eth_z8e.h projects/pseries/dev/mxge/rss_ethp_z8e.h projects/pseries/dev/ncv/ncr53c500.c projects/pseries/dev/ncv/ncr53c500_pccard.c projects/pseries/dev/ncv/ncr53c500hw.h projects/pseries/dev/ncv/ncr53c500var.h projects/pseries/dev/netmap/if_em_netmap.h projects/pseries/dev/netmap/if_igb_netmap.h projects/pseries/dev/netmap/if_re_netmap.h projects/pseries/dev/netmap/ixgbe_netmap.h projects/pseries/dev/netmap/netmap.c projects/pseries/dev/netmap/netmap_kern.h projects/pseries/dev/nsp/nsp.c projects/pseries/dev/nsp/nsp_pccard.c projects/pseries/dev/nsp/nspvar.h projects/pseries/dev/nxge/if_nxge.c projects/pseries/dev/ofw/ofw_bus_subr.c projects/pseries/dev/ofw/ofw_bus_subr.h projects/pseries/dev/ofw/ofw_iicbus.c projects/pseries/dev/ofw/openfirm.c projects/pseries/dev/ofw/openfirm.h projects/pseries/dev/pccard/pccard.c projects/pseries/dev/pccard/pccardvarp.h projects/pseries/dev/pccbb/pccbb_pci.c projects/pseries/dev/pci/pci.c projects/pseries/dev/pci/pci_pci.c projects/pseries/dev/pci/pcireg.h projects/pseries/dev/pci/vga_pci.c projects/pseries/dev/powermac_nvram/powermac_nvram.c projects/pseries/dev/puc/pucdata.c projects/pseries/dev/qlxgb/qla_os.c projects/pseries/dev/ral/if_ral_pci.c projects/pseries/dev/random/nehemiah.c projects/pseries/dev/random/probe.c projects/pseries/dev/re/if_re.c projects/pseries/dev/sdhci/sdhci.c projects/pseries/dev/sec/sec.c projects/pseries/dev/sec/sec.h projects/pseries/dev/sf/if_sf.c projects/pseries/dev/sfxge/sfxge_rx.c projects/pseries/dev/siis/siis.c projects/pseries/dev/sio/sio.c projects/pseries/dev/smc/if_smc.c projects/pseries/dev/sound/macio/snapper.c projects/pseries/dev/sound/pci/hda/hdaa.c projects/pseries/dev/sound/pci/hda/hdaa_patches.c projects/pseries/dev/sound/pci/hda/hdac.c projects/pseries/dev/sound/pci/hda/hdac.h projects/pseries/dev/sound/pci/hdspe.c projects/pseries/dev/sound/pcm/sndstat.c projects/pseries/dev/sound/usb/uaudio.c projects/pseries/dev/sound/usb/uaudioreg.h projects/pseries/dev/spibus/spi.h projects/pseries/dev/stg/tmc18c30.c projects/pseries/dev/stg/tmc18c30_isa.c projects/pseries/dev/stg/tmc18c30_pccard.c projects/pseries/dev/stg/tmc18c30_pci.c projects/pseries/dev/stg/tmc18c30_subr.c projects/pseries/dev/stg/tmc18c30var.h projects/pseries/dev/sym/sym_conf.h projects/pseries/dev/sym/sym_hipd.c projects/pseries/dev/syscons/schistory.c projects/pseries/dev/syscons/scterm-teken.c projects/pseries/dev/syscons/syscons.c projects/pseries/dev/tsec/if_tsec.c projects/pseries/dev/twa/tw_osl_cam.c projects/pseries/dev/twe/twe.c projects/pseries/dev/twe/twe_compat.h projects/pseries/dev/twe/twe_freebsd.c projects/pseries/dev/twe/twevar.h projects/pseries/dev/uart/uart.h projects/pseries/dev/uart/uart_bus.h projects/pseries/dev/uart/uart_bus_fdt.c projects/pseries/dev/uart/uart_core.c projects/pseries/dev/uart/uart_if.m projects/pseries/dev/uart/uart_subr.c projects/pseries/dev/usb/controller/at91dci.c projects/pseries/dev/usb/controller/at91dci_atmelarm.c projects/pseries/dev/usb/controller/atmegadci.c projects/pseries/dev/usb/controller/avr32dci.c projects/pseries/dev/usb/controller/dwc_otg.c projects/pseries/dev/usb/controller/dwc_otg.h projects/pseries/dev/usb/controller/ehci.c projects/pseries/dev/usb/controller/ehci_pci.c projects/pseries/dev/usb/controller/musb_otg.c projects/pseries/dev/usb/controller/ohci.c projects/pseries/dev/usb/controller/ohci_atmelarm.c projects/pseries/dev/usb/controller/ohci_pci.c projects/pseries/dev/usb/controller/uhci.c projects/pseries/dev/usb/controller/usb_controller.c projects/pseries/dev/usb/controller/uss820dci.c projects/pseries/dev/usb/controller/xhci.c projects/pseries/dev/usb/controller/xhci.h projects/pseries/dev/usb/controller/xhci_pci.c projects/pseries/dev/usb/controller/xhcireg.h projects/pseries/dev/usb/input/atp.c projects/pseries/dev/usb/input/uep.c projects/pseries/dev/usb/input/uhid.c projects/pseries/dev/usb/input/ukbd.c projects/pseries/dev/usb/input/ums.c projects/pseries/dev/usb/misc/ufm.c projects/pseries/dev/usb/net/if_aue.c projects/pseries/dev/usb/net/if_axe.c projects/pseries/dev/usb/net/if_cdce.c projects/pseries/dev/usb/net/if_cue.c projects/pseries/dev/usb/net/if_ipheth.c projects/pseries/dev/usb/net/if_kue.c projects/pseries/dev/usb/net/if_rue.c projects/pseries/dev/usb/net/if_udav.c projects/pseries/dev/usb/net/if_udavreg.h projects/pseries/dev/usb/net/if_usie.c projects/pseries/dev/usb/net/ruephy.c projects/pseries/dev/usb/net/uhso.c projects/pseries/dev/usb/quirk/usb_quirk.c projects/pseries/dev/usb/serial/u3g.c projects/pseries/dev/usb/serial/uark.c projects/pseries/dev/usb/serial/ubsa.c projects/pseries/dev/usb/serial/ubser.c projects/pseries/dev/usb/serial/uchcom.c projects/pseries/dev/usb/serial/ucycom.c projects/pseries/dev/usb/serial/ufoma.c projects/pseries/dev/usb/serial/uftdi.c projects/pseries/dev/usb/serial/uftdi_reg.h projects/pseries/dev/usb/serial/ugensa.c projects/pseries/dev/usb/serial/uipaq.c projects/pseries/dev/usb/serial/ulpt.c projects/pseries/dev/usb/serial/umcs.c projects/pseries/dev/usb/serial/umct.c projects/pseries/dev/usb/serial/umodem.c projects/pseries/dev/usb/serial/umoscom.c projects/pseries/dev/usb/serial/uplcom.c projects/pseries/dev/usb/serial/usb_serial.c projects/pseries/dev/usb/serial/usb_serial.h projects/pseries/dev/usb/serial/uslcom.c projects/pseries/dev/usb/serial/uvisor.c projects/pseries/dev/usb/serial/uvscom.c projects/pseries/dev/usb/storage/umass.c projects/pseries/dev/usb/storage/urio.c projects/pseries/dev/usb/storage/ustorage_fs.c projects/pseries/dev/usb/template/usb_template.c projects/pseries/dev/usb/usb.h projects/pseries/dev/usb/usb_busdma.c projects/pseries/dev/usb/usb_compat_linux.c projects/pseries/dev/usb/usb_controller.h projects/pseries/dev/usb/usb_core.h projects/pseries/dev/usb/usb_debug.c projects/pseries/dev/usb/usb_dev.c projects/pseries/dev/usb/usb_device.c projects/pseries/dev/usb/usb_device.h projects/pseries/dev/usb/usb_freebsd.h projects/pseries/dev/usb/usb_generic.c projects/pseries/dev/usb/usb_handle_request.c projects/pseries/dev/usb/usb_hid.c projects/pseries/dev/usb/usb_hub.c projects/pseries/dev/usb/usb_hub.h projects/pseries/dev/usb/usb_ioctl.h projects/pseries/dev/usb/usb_msctest.c projects/pseries/dev/usb/usb_pf.c projects/pseries/dev/usb/usb_request.c projects/pseries/dev/usb/usb_request.h projects/pseries/dev/usb/usb_transfer.c projects/pseries/dev/usb/usbdevs projects/pseries/dev/usb/usbdi.h projects/pseries/dev/usb/usbhid.h projects/pseries/dev/usb/wlan/if_rum.c projects/pseries/dev/usb/wlan/if_run.c projects/pseries/dev/usb/wlan/if_uath.c projects/pseries/dev/usb/wlan/if_upgt.c projects/pseries/dev/usb/wlan/if_ural.c projects/pseries/dev/usb/wlan/if_urtw.c projects/pseries/dev/usb/wlan/if_zyd.c projects/pseries/dev/viawd/viawd.c projects/pseries/dev/virtio/balloon/virtio_balloon.c projects/pseries/dev/virtio/balloon/virtio_balloon.h projects/pseries/dev/virtio/block/virtio_blk.c projects/pseries/dev/virtio/block/virtio_blk.h projects/pseries/dev/virtio/network/if_vtnet.c projects/pseries/dev/virtio/network/virtio_net.h projects/pseries/dev/virtio/pci/virtio_pci.c projects/pseries/dev/virtio/pci/virtio_pci.h projects/pseries/dev/virtio/virtio.c projects/pseries/dev/virtio/virtio.h projects/pseries/dev/virtio/virtio_ring.h projects/pseries/dev/virtio/virtqueue.c projects/pseries/dev/virtio/virtqueue.h projects/pseries/dev/vr/if_vr.c projects/pseries/dev/vr/if_vrreg.h projects/pseries/dev/vxge/include/vxgehal-ll.h projects/pseries/dev/vxge/vxgehal/vxgehal-channel.h projects/pseries/dev/wbwd/wbwd.c projects/pseries/dev/wpi/if_wpi.c projects/pseries/dev/wtap/if_wtap.c projects/pseries/dev/xen/balloon/balloon.c projects/pseries/dev/xen/blkfront/blkfront.c projects/pseries/dev/xen/netback/netback_unit_tests.c projects/pseries/dev/xl/if_xl.c projects/pseries/fs/cd9660/cd9660_node.c projects/pseries/fs/cd9660/cd9660_vfsops.c projects/pseries/fs/coda/coda_subr.c projects/pseries/fs/deadfs/dead_vnops.c projects/pseries/fs/devfs/devfs_int.h projects/pseries/fs/devfs/devfs_vnops.c projects/pseries/fs/ext2fs/ext2_bmap.c projects/pseries/fs/ext2fs/ext2_dinode.h projects/pseries/fs/ext2fs/ext2_inode.c projects/pseries/fs/ext2fs/ext2_lookup.c projects/pseries/fs/ext2fs/ext2_vfsops.c projects/pseries/fs/ext2fs/ext2_vnops.c projects/pseries/fs/ext2fs/ext2fs.h projects/pseries/fs/ext2fs/inode.h projects/pseries/fs/fifofs/fifo_vnops.c projects/pseries/fs/hpfs/hpfs_vnops.c projects/pseries/fs/msdosfs/denode.h projects/pseries/fs/msdosfs/msdosfs_denode.c projects/pseries/fs/msdosfs/msdosfs_lookup.c projects/pseries/fs/msdosfs/msdosfs_vfsops.c projects/pseries/fs/msdosfs/msdosfs_vnops.c projects/pseries/fs/nfs/nfs_commonacl.c projects/pseries/fs/nfs/nfs_commonport.c projects/pseries/fs/nfs/nfscl.h projects/pseries/fs/nfsclient/nfs_clbio.c projects/pseries/fs/nfsclient/nfs_clnode.c projects/pseries/fs/nfsclient/nfs_clrpcops.c projects/pseries/fs/nfsclient/nfs_clsubs.c projects/pseries/fs/nfsclient/nfs_clvfsops.c projects/pseries/fs/nfsclient/nfs_clvnops.c projects/pseries/fs/nfsclient/nfsnode.h projects/pseries/fs/nfsserver/nfs_nfsdport.c projects/pseries/fs/nfsserver/nfs_nfsdstate.c projects/pseries/fs/ntfs/ntfs.h projects/pseries/fs/ntfs/ntfs_subr.c projects/pseries/fs/ntfs/ntfs_subr.h projects/pseries/fs/ntfs/ntfs_vfsops.c projects/pseries/fs/ntfs/ntfs_vnops.c projects/pseries/fs/nullfs/null.h projects/pseries/fs/nullfs/null_subr.c projects/pseries/fs/nullfs/null_vfsops.c projects/pseries/fs/nullfs/null_vnops.c projects/pseries/fs/nwfs/nwfs_io.c projects/pseries/fs/portalfs/portal_vnops.c projects/pseries/fs/smbfs/smbfs_io.c projects/pseries/fs/smbfs/smbfs_node.c projects/pseries/fs/tmpfs/tmpfs.h projects/pseries/fs/tmpfs/tmpfs_subr.c projects/pseries/fs/tmpfs/tmpfs_vfsops.c projects/pseries/fs/tmpfs/tmpfs_vnops.c projects/pseries/fs/udf/udf_vfsops.c projects/pseries/fs/unionfs/union_subr.c projects/pseries/fs/unionfs/union_vfsops.c projects/pseries/fs/unionfs/union_vnops.c projects/pseries/gdb/gdb_main.c projects/pseries/geom/bde/g_bde.c projects/pseries/geom/eli/g_eli.c projects/pseries/geom/eli/g_eli.h projects/pseries/geom/eli/g_eli_ctl.c projects/pseries/geom/eli/g_eli_integrity.c projects/pseries/geom/eli/g_eli_key.c projects/pseries/geom/eli/g_eli_key_cache.c projects/pseries/geom/gate/g_gate.c projects/pseries/geom/gate/g_gate.h projects/pseries/geom/geom.h projects/pseries/geom/geom_aes.c projects/pseries/geom/geom_dev.c projects/pseries/geom/geom_disk.c projects/pseries/geom/geom_disk.h projects/pseries/geom/geom_event.c projects/pseries/geom/geom_io.c projects/pseries/geom/geom_map.c projects/pseries/geom/geom_slice.c projects/pseries/geom/geom_subr.c projects/pseries/geom/geom_vfs.c projects/pseries/geom/label/g_label_ufs.c projects/pseries/geom/mirror/g_mirror.c projects/pseries/geom/mirror/g_mirror.h projects/pseries/geom/mirror/g_mirror_ctl.c projects/pseries/geom/mountver/g_mountver.c projects/pseries/geom/multipath/g_multipath.c projects/pseries/geom/nop/g_nop.c projects/pseries/geom/nop/g_nop.h projects/pseries/geom/part/g_part.c projects/pseries/geom/part/g_part.h projects/pseries/geom/part/g_part_apm.c projects/pseries/geom/part/g_part_bsd.c projects/pseries/geom/part/g_part_gpt.c projects/pseries/geom/part/g_part_mbr.c projects/pseries/geom/part/g_part_vtoc8.c projects/pseries/geom/raid/g_raid.c projects/pseries/geom/raid/g_raid.h projects/pseries/geom/raid/g_raid_ctl.c projects/pseries/geom/raid/g_raid_md_if.m projects/pseries/geom/raid/md_intel.c projects/pseries/geom/raid/md_jmicron.c projects/pseries/geom/raid/md_nvidia.c projects/pseries/geom/raid/md_promise.c projects/pseries/geom/raid/md_sii.c projects/pseries/geom/raid/tr_concat.c projects/pseries/geom/raid/tr_raid0.c projects/pseries/geom/raid/tr_raid1.c projects/pseries/geom/raid/tr_raid1e.c projects/pseries/geom/raid3/g_raid3.c projects/pseries/geom/uncompress/g_uncompress.c projects/pseries/geom/uzip/g_uzip.c projects/pseries/geom/virstor/g_virstor.c projects/pseries/gnu/fs/reiserfs/reiserfs_inode.c projects/pseries/gnu/fs/reiserfs/reiserfs_vfsops.c projects/pseries/gnu/fs/xfs/FreeBSD/xfs_buf.c projects/pseries/gnu/fs/xfs/FreeBSD/xfs_ioctl.c projects/pseries/gnu/fs/xfs/FreeBSD/xfs_mountops.c projects/pseries/gnu/fs/xfs/FreeBSD/xfs_stats.c projects/pseries/gnu/fs/xfs/FreeBSD/xfs_super.c projects/pseries/gnu/fs/xfs/xfs_alloc.c projects/pseries/gnu/fs/xfs/xfs_vfsops.c projects/pseries/i386/acpica/acpi_machdep.c projects/pseries/i386/acpica/acpi_wakecode.S projects/pseries/i386/bios/smapi_bios.S projects/pseries/i386/conf/GENERIC projects/pseries/i386/conf/NOTES projects/pseries/i386/conf/PAE projects/pseries/i386/conf/XEN projects/pseries/i386/conf/XENHVM (contents, props changed) projects/pseries/i386/i386/apic_vector.s projects/pseries/i386/i386/bios.c projects/pseries/i386/i386/elf_machdep.c projects/pseries/i386/i386/genassym.c projects/pseries/i386/i386/identcpu.c projects/pseries/i386/i386/initcpu.c projects/pseries/i386/i386/machdep.c projects/pseries/i386/i386/mem.c projects/pseries/i386/i386/minidump_machdep.c projects/pseries/i386/i386/mp_machdep.c projects/pseries/i386/i386/pmap.c projects/pseries/i386/i386/ptrace_machdep.c projects/pseries/i386/i386/swtch.s projects/pseries/i386/i386/trap.c projects/pseries/i386/i386/vm86.c projects/pseries/i386/i386/vm_machdep.c projects/pseries/i386/include/apicvar.h projects/pseries/i386/include/atomic.h projects/pseries/i386/include/bootinfo.h projects/pseries/i386/include/cpufunc.h projects/pseries/i386/include/elf.h projects/pseries/i386/include/in_cksum.h projects/pseries/i386/include/intr_machdep.h projects/pseries/i386/include/md_var.h projects/pseries/i386/include/npx.h projects/pseries/i386/include/param.h projects/pseries/i386/include/pcb.h projects/pseries/i386/include/pcpu.h projects/pseries/i386/include/pmap.h projects/pseries/i386/include/smp.h projects/pseries/i386/include/vmparam.h projects/pseries/i386/include/xen/xen-os.h projects/pseries/i386/isa/npx.c projects/pseries/i386/linux/linux.h projects/pseries/i386/linux/linux_dummy.c projects/pseries/i386/linux/linux_machdep.c projects/pseries/i386/linux/linux_proto.h projects/pseries/i386/linux/linux_syscall.h projects/pseries/i386/linux/linux_syscalls.c projects/pseries/i386/linux/linux_sysent.c projects/pseries/i386/linux/linux_systrace_args.c projects/pseries/i386/linux/syscalls.master projects/pseries/i386/xen/pmap.c projects/pseries/ia64/acpica/acpi_wakeup.c projects/pseries/ia64/conf/NOTES projects/pseries/ia64/ia32/ia32_trap.c projects/pseries/ia64/ia64/busdma_machdep.c projects/pseries/ia64/ia64/machdep.c projects/pseries/ia64/ia64/mem.c projects/pseries/ia64/ia64/mp_machdep.c projects/pseries/ia64/ia64/nexus.c projects/pseries/ia64/ia64/pmap.c projects/pseries/ia64/ia64/trap.c projects/pseries/ia64/include/_stdint.h projects/pseries/ia64/include/_types.h projects/pseries/ia64/include/elf.h projects/pseries/ia64/include/in_cksum.h projects/pseries/ia64/include/md_var.h projects/pseries/ia64/include/param.h projects/pseries/ia64/include/pcb.h projects/pseries/ia64/include/pmap.h projects/pseries/kern/bus_if.m projects/pseries/kern/capabilities.conf projects/pseries/kern/imgact_aout.c projects/pseries/kern/imgact_elf.c projects/pseries/kern/imgact_gzip.c projects/pseries/kern/init_main.c projects/pseries/kern/init_sysent.c projects/pseries/kern/kern_acct.c projects/pseries/kern/kern_clock.c projects/pseries/kern/kern_clocksource.c projects/pseries/kern/kern_condvar.c projects/pseries/kern/kern_conf.c projects/pseries/kern/kern_cpuset.c projects/pseries/kern/kern_descrip.c projects/pseries/kern/kern_environment.c projects/pseries/kern/kern_event.c projects/pseries/kern/kern_exec.c projects/pseries/kern/kern_exit.c projects/pseries/kern/kern_fork.c projects/pseries/kern/kern_intr.c projects/pseries/kern/kern_jail.c projects/pseries/kern/kern_kthread.c projects/pseries/kern/kern_ktr.c projects/pseries/kern/kern_ktrace.c projects/pseries/kern/kern_linker.c projects/pseries/kern/kern_lock.c projects/pseries/kern/kern_malloc.c projects/pseries/kern/kern_mbuf.c projects/pseries/kern/kern_mib.c projects/pseries/kern/kern_module.c projects/pseries/kern/kern_mutex.c projects/pseries/kern/kern_ntptime.c projects/pseries/kern/kern_proc.c projects/pseries/kern/kern_racct.c projects/pseries/kern/kern_rctl.c projects/pseries/kern/kern_rmlock.c projects/pseries/kern/kern_rwlock.c projects/pseries/kern/kern_shutdown.c projects/pseries/kern/kern_sig.c projects/pseries/kern/kern_sx.c projects/pseries/kern/kern_synch.c projects/pseries/kern/kern_tc.c projects/pseries/kern/kern_thr.c projects/pseries/kern/kern_thread.c projects/pseries/kern/kern_time.c projects/pseries/kern/kern_timeout.c projects/pseries/kern/kern_umtx.c projects/pseries/kern/ksched.c projects/pseries/kern/sched_4bsd.c projects/pseries/kern/sched_ule.c projects/pseries/kern/subr_acl_nfs4.c projects/pseries/kern/subr_bus.c projects/pseries/kern/subr_devstat.c projects/pseries/kern/subr_firmware.c projects/pseries/kern/subr_hints.c projects/pseries/kern/subr_kdb.c projects/pseries/kern/subr_param.c projects/pseries/kern/subr_rman.c projects/pseries/kern/subr_sleepqueue.c projects/pseries/kern/subr_smp.c projects/pseries/kern/subr_syscall.c projects/pseries/kern/subr_taskqueue.c projects/pseries/kern/subr_trap.c projects/pseries/kern/subr_turnstile.c projects/pseries/kern/subr_uio.c projects/pseries/kern/subr_unit.c projects/pseries/kern/subr_witness.c projects/pseries/kern/sys_capability.c projects/pseries/kern/sys_generic.c projects/pseries/kern/sys_pipe.c projects/pseries/kern/sys_procdesc.c projects/pseries/kern/sys_process.c projects/pseries/kern/syscalls.c projects/pseries/kern/syscalls.master projects/pseries/kern/systrace_args.c projects/pseries/kern/tty.c projects/pseries/kern/uipc_mqueue.c projects/pseries/kern/uipc_shm.c projects/pseries/kern/uipc_socket.c projects/pseries/kern/uipc_syscalls.c projects/pseries/kern/uipc_usrreq.c projects/pseries/kern/vfs_bio.c projects/pseries/kern/vfs_cluster.c projects/pseries/kern/vfs_default.c projects/pseries/kern/vfs_lookup.c projects/pseries/kern/vfs_mount.c projects/pseries/kern/vfs_subr.c projects/pseries/kern/vfs_syscalls.c projects/pseries/kern/vfs_vnops.c projects/pseries/libkern/iconv.c projects/pseries/libkern/iconv_ucs.c projects/pseries/mips/atheros/ar71xx_chip.c projects/pseries/mips/atheros/ar71xx_chip.h projects/pseries/mips/atheros/ar71xx_cpudef.h projects/pseries/mips/atheros/ar71xx_gpio.c projects/pseries/mips/atheros/ar71xx_pci.c projects/pseries/mips/atheros/ar71xxreg.h projects/pseries/mips/atheros/ar724x_chip.c projects/pseries/mips/atheros/ar724x_pci.c projects/pseries/mips/atheros/ar91xx_chip.c projects/pseries/mips/atheros/files.ar71xx projects/pseries/mips/atheros/if_arge.c projects/pseries/mips/atheros/if_argevar.h projects/pseries/mips/cavium/octeon_gpio.c projects/pseries/mips/cavium/uart_bus_octeonusart.c projects/pseries/mips/conf/OCTEON1 projects/pseries/mips/conf/PB47 projects/pseries/mips/conf/PB92 projects/pseries/mips/conf/ROUTERSTATION projects/pseries/mips/conf/RSPRO projects/pseries/mips/conf/RSPRO.hints projects/pseries/mips/conf/RSPRO_STANDALONE projects/pseries/mips/conf/TP-WN1043ND projects/pseries/mips/conf/TP-WN1043ND.hints projects/pseries/mips/include/_stdint.h projects/pseries/mips/include/_types.h projects/pseries/mips/include/elf.h projects/pseries/mips/include/in_cksum.h projects/pseries/mips/include/pcb.h projects/pseries/mips/include/pmap.h projects/pseries/mips/include/pte.h projects/pseries/mips/mips/bus_space_generic.c projects/pseries/mips/mips/busdma_machdep.c projects/pseries/mips/mips/machdep.c projects/pseries/mips/mips/nexus.c projects/pseries/mips/mips/pmap.c projects/pseries/mips/mips/trap.c projects/pseries/mips/mips/uma_machdep.c projects/pseries/mips/nlm/board.c projects/pseries/mips/nlm/bus_space_rmi.c projects/pseries/mips/nlm/dev/net/mdio.c projects/pseries/mips/nlm/hal/mdio.h projects/pseries/mips/nlm/xlp.h projects/pseries/mips/nlm/xlp_machdep.c projects/pseries/mips/nlm/xlp_pci.c projects/pseries/mips/rmi/rootfs_list.txt projects/pseries/mips/rt305x/rt305x_gpio.c projects/pseries/modules/Makefile projects/pseries/modules/acpi/Makefile projects/pseries/modules/acpi/acpi/Makefile projects/pseries/modules/aesni/Makefile projects/pseries/modules/agp/Makefile projects/pseries/modules/ahci/Makefile projects/pseries/modules/ath/Makefile projects/pseries/modules/bwi/Makefile projects/pseries/modules/bwn/Makefile projects/pseries/modules/cam/Makefile projects/pseries/modules/cxgb/Makefile projects/pseries/modules/cxgb/cxgb/Makefile projects/pseries/modules/cxgb/iw_cxgb/Makefile projects/pseries/modules/cxgb/tom/Makefile projects/pseries/modules/cxgbe/Makefile projects/pseries/modules/cxgbe/firmware/Makefile projects/pseries/modules/cxgbe/if_cxgbe/Makefile projects/pseries/modules/dtrace/Makefile projects/pseries/modules/dtrace/dtraceall/Makefile projects/pseries/modules/dtrace/dtraceall/dtraceall.c projects/pseries/modules/dummynet/Makefile projects/pseries/modules/em/Makefile projects/pseries/modules/geom/geom_raid/Makefile projects/pseries/modules/igb/Makefile projects/pseries/modules/ipfw/Makefile projects/pseries/modules/ipfw_nat/Makefile projects/pseries/modules/ips/Makefile projects/pseries/modules/ixgbe/Makefile projects/pseries/modules/linux/Makefile projects/pseries/modules/mii/Makefile projects/pseries/modules/mlx4/Makefile projects/pseries/modules/mlx4ib/Makefile projects/pseries/modules/mlxen/Makefile projects/pseries/modules/mmcsd/Makefile projects/pseries/modules/mps/Makefile projects/pseries/modules/mthca/Makefile projects/pseries/modules/mwl/Makefile projects/pseries/modules/pf/Makefile projects/pseries/modules/pflog/Makefile projects/pseries/modules/pfsync/Makefile projects/pseries/modules/ral/Makefile projects/pseries/modules/random/Makefile projects/pseries/modules/rdma/krping/Makefile projects/pseries/modules/scsi_low/Makefile projects/pseries/modules/uart/Makefile projects/pseries/modules/wpi/Makefile projects/pseries/modules/xfs/Makefile projects/pseries/modules/zfs/Makefile projects/pseries/net/bpf.c projects/pseries/net/bpf.h projects/pseries/net/bpf_buffer.c projects/pseries/net/bpf_buffer.h projects/pseries/net/bpf_zerocopy.c projects/pseries/net/bpfdesc.h projects/pseries/net/bridgestp.c projects/pseries/net/bridgestp.h projects/pseries/net/flowtable.c projects/pseries/net/ieee8023ad_lacp.c projects/pseries/net/if.c projects/pseries/net/if.h projects/pseries/net/if_bridge.c projects/pseries/net/if_clone.c projects/pseries/net/if_dl.h projects/pseries/net/if_epair.c projects/pseries/net/if_ethersubr.c projects/pseries/net/if_gif.c projects/pseries/net/if_lagg.c projects/pseries/net/if_llatbl.c projects/pseries/net/if_llatbl.h projects/pseries/net/if_loop.c projects/pseries/net/if_media.h projects/pseries/net/if_stf.c projects/pseries/net/if_tap.c projects/pseries/net/if_var.h projects/pseries/net/if_vlan.c projects/pseries/net/netmap.h projects/pseries/net/netmap_user.h projects/pseries/net/route.h projects/pseries/net/rtsock.c projects/pseries/net80211/_ieee80211.h projects/pseries/net80211/ieee80211.h projects/pseries/net80211/ieee80211_action.c projects/pseries/net80211/ieee80211_ddb.c projects/pseries/net80211/ieee80211_ht.c projects/pseries/net80211/ieee80211_ht.h projects/pseries/net80211/ieee80211_hwmp.c projects/pseries/net80211/ieee80211_input.c projects/pseries/net80211/ieee80211_ioctl.h projects/pseries/net80211/ieee80211_mesh.c projects/pseries/net80211/ieee80211_mesh.h projects/pseries/net80211/ieee80211_node.c projects/pseries/net80211/ieee80211_node.h projects/pseries/net80211/ieee80211_output.c projects/pseries/net80211/ieee80211_radiotap.c projects/pseries/net80211/ieee80211_regdomain.c projects/pseries/net80211/ieee80211_superg.c projects/pseries/net80211/ieee80211_var.h projects/pseries/netgraph/bluetooth/drivers/ubt/ng_ubt.c projects/pseries/netgraph/netflow/netflow.c projects/pseries/netgraph/netflow/netflow_v9.c projects/pseries/netgraph/netflow/ng_netflow.c projects/pseries/netgraph/netflow/ng_netflow.h projects/pseries/netgraph/ng_ether.c projects/pseries/netgraph/ng_ipfw.c projects/pseries/netgraph/ng_ksocket.c projects/pseries/netgraph/ng_patch.c projects/pseries/netgraph/ng_pptpgre.c projects/pseries/netgraph/ng_source.c projects/pseries/netinet/icmp_var.h projects/pseries/netinet/if_ether.c projects/pseries/netinet/if_ether.h projects/pseries/netinet/igmp.c projects/pseries/netinet/in.c projects/pseries/netinet/in.h projects/pseries/netinet/in_cksum.c projects/pseries/netinet/in_gif.c projects/pseries/netinet/in_pcb.c projects/pseries/netinet/in_pcb.h projects/pseries/netinet/in_var.h projects/pseries/netinet/ip.h projects/pseries/netinet/ip_carp.c projects/pseries/netinet/ip_dummynet.h projects/pseries/netinet/ip_icmp.c projects/pseries/netinet/ip_input.c projects/pseries/netinet/ip_mroute.c projects/pseries/netinet/ip_mroute.h projects/pseries/netinet/ip_output.c projects/pseries/netinet/ip_var.h projects/pseries/netinet/khelp/h_ertt.c projects/pseries/netinet/libalias/alias_sctp.h projects/pseries/netinet/libalias/libalias.3 projects/pseries/netinet/raw_ip.c projects/pseries/netinet/sctp.h projects/pseries/netinet/sctp_asconf.c projects/pseries/netinet/sctp_asconf.h projects/pseries/netinet/sctp_auth.c projects/pseries/netinet/sctp_auth.h projects/pseries/netinet/sctp_bsd_addr.c projects/pseries/netinet/sctp_bsd_addr.h projects/pseries/netinet/sctp_cc_functions.c projects/pseries/netinet/sctp_constants.h projects/pseries/netinet/sctp_crc32.c projects/pseries/netinet/sctp_crc32.h projects/pseries/netinet/sctp_dtrace_declare.h projects/pseries/netinet/sctp_dtrace_define.h projects/pseries/netinet/sctp_header.h projects/pseries/netinet/sctp_indata.c projects/pseries/netinet/sctp_indata.h projects/pseries/netinet/sctp_input.c projects/pseries/netinet/sctp_input.h projects/pseries/netinet/sctp_lock_bsd.h projects/pseries/netinet/sctp_os.h projects/pseries/netinet/sctp_os_bsd.h projects/pseries/netinet/sctp_output.c projects/pseries/netinet/sctp_output.h projects/pseries/netinet/sctp_pcb.c projects/pseries/netinet/sctp_pcb.h projects/pseries/netinet/sctp_peeloff.c projects/pseries/netinet/sctp_peeloff.h projects/pseries/netinet/sctp_ss_functions.c projects/pseries/netinet/sctp_structs.h projects/pseries/netinet/sctp_sysctl.c projects/pseries/netinet/sctp_sysctl.h projects/pseries/netinet/sctp_timer.c projects/pseries/netinet/sctp_timer.h projects/pseries/netinet/sctp_uio.h projects/pseries/netinet/sctp_usrreq.c projects/pseries/netinet/sctp_var.h projects/pseries/netinet/sctputil.c projects/pseries/netinet/sctputil.h projects/pseries/netinet/tcp_hostcache.c projects/pseries/netinet/tcp_input.c projects/pseries/netinet/tcp_lro.c projects/pseries/netinet/tcp_lro.h projects/pseries/netinet/tcp_offload.c projects/pseries/netinet/tcp_offload.h projects/pseries/netinet/tcp_output.c projects/pseries/netinet/tcp_subr.c projects/pseries/netinet/tcp_syncache.c projects/pseries/netinet/tcp_syncache.h projects/pseries/netinet/tcp_timer.c projects/pseries/netinet/tcp_timewait.c projects/pseries/netinet/tcp_usrreq.c projects/pseries/netinet/tcp_var.h projects/pseries/netinet/udp_usrreq.c projects/pseries/netinet6/frag6.c projects/pseries/netinet6/icmp6.c projects/pseries/netinet6/in6.c projects/pseries/netinet6/in6.h projects/pseries/netinet6/in6_cksum.c projects/pseries/netinet6/in6_gif.c projects/pseries/netinet6/in6_src.c projects/pseries/netinet6/ip6_forward.c projects/pseries/netinet6/ip6_input.c projects/pseries/netinet6/ip6_ipsec.c projects/pseries/netinet6/ip6_mroute.c projects/pseries/netinet6/ip6_mroute.h projects/pseries/netinet6/ip6_output.c projects/pseries/netinet6/ip6_var.h projects/pseries/netinet6/mld6.c projects/pseries/netinet6/nd6.c projects/pseries/netinet6/nd6.h projects/pseries/netinet6/nd6_nbr.c projects/pseries/netinet6/route6.c projects/pseries/netinet6/scope6.c projects/pseries/netinet6/scope6_var.h projects/pseries/netinet6/sctp6_usrreq.c projects/pseries/netinet6/sctp6_var.h projects/pseries/netinet6/udp6_usrreq.c projects/pseries/netipsec/ipsec_input.c projects/pseries/netipsec/ipsec_output.c projects/pseries/netipsec/key.c projects/pseries/netipsec/xform_ipip.c projects/pseries/netncp/ncp_nls.h projects/pseries/netsmb/smb_dev.c projects/pseries/netsmb/smb_trantcp.c projects/pseries/nfs/bootp_subr.c projects/pseries/nfsclient/nfs_bio.c projects/pseries/nfsclient/nfs_node.c projects/pseries/nfsclient/nfs_subs.c projects/pseries/nfsclient/nfs_vfsops.c projects/pseries/nfsclient/nfs_vnops.c projects/pseries/nfsclient/nfsnode.h projects/pseries/nlm/nlm_advlock.c projects/pseries/ofed/drivers/infiniband/core/addr.c projects/pseries/ofed/drivers/infiniband/core/cma.c projects/pseries/ofed/drivers/infiniband/core/iwcm.c projects/pseries/ofed/drivers/infiniband/ulp/ipoib/ipoib.h projects/pseries/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c projects/pseries/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c projects/pseries/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c projects/pseries/ofed/drivers/net/mlx4/en_frag.c projects/pseries/ofed/drivers/net/mlx4/en_netdev.c projects/pseries/ofed/drivers/net/mlx4/en_port.c projects/pseries/ofed/drivers/net/mlx4/en_port.h projects/pseries/ofed/drivers/net/mlx4/en_rx.c projects/pseries/ofed/include/linux/gfp.h projects/pseries/ofed/include/linux/in.h projects/pseries/ofed/include/linux/in6.h projects/pseries/ofed/include/linux/linux_compat.c projects/pseries/ofed/include/linux/net.h projects/pseries/ofed/include/linux/workqueue.h projects/pseries/ofed/include/net/ip.h projects/pseries/ofed/include/net/ipv6.h projects/pseries/ofed/include/net/netevent.h projects/pseries/ofed/include/rdma/iw_cm.h projects/pseries/pc98/conf/GENERIC projects/pseries/pc98/pc98/machdep.c projects/pseries/pci/intpm.c projects/pseries/powerpc/aim/locore32.S projects/pseries/powerpc/aim/locore64.S projects/pseries/powerpc/aim/machdep.c projects/pseries/powerpc/aim/mmu_oea.c projects/pseries/powerpc/aim/mmu_oea64.c projects/pseries/powerpc/aim/moea64_native.c projects/pseries/powerpc/aim/slb.c projects/pseries/powerpc/aim/swtch32.S projects/pseries/powerpc/aim/swtch64.S projects/pseries/powerpc/aim/trap.c projects/pseries/powerpc/booke/locore.S projects/pseries/powerpc/booke/machdep.c projects/pseries/powerpc/booke/platform_bare.c projects/pseries/powerpc/booke/pmap.c projects/pseries/powerpc/booke/trap.c projects/pseries/powerpc/booke/trap_subr.S projects/pseries/powerpc/conf/DEFAULTS projects/pseries/powerpc/conf/GENERIC projects/pseries/powerpc/conf/GENERIC64 projects/pseries/powerpc/conf/MPC85XX projects/pseries/powerpc/conf/NOTES projects/pseries/powerpc/include/_stdint.h projects/pseries/powerpc/include/_types.h projects/pseries/powerpc/include/atomic.h projects/pseries/powerpc/include/cpu.h projects/pseries/powerpc/include/cpufunc.h projects/pseries/powerpc/include/elf.h projects/pseries/powerpc/include/hid.h projects/pseries/powerpc/include/in_cksum.h projects/pseries/powerpc/include/pcpu.h projects/pseries/powerpc/include/pio.h projects/pseries/powerpc/include/pmap.h projects/pseries/powerpc/include/profile.h projects/pseries/powerpc/include/psl.h projects/pseries/powerpc/include/pte.h projects/pseries/powerpc/include/spr.h projects/pseries/powerpc/include/tlb.h projects/pseries/powerpc/include/trap.h projects/pseries/powerpc/include/ucontext.h projects/pseries/powerpc/include/vmparam.h projects/pseries/powerpc/mpc85xx/i2c.c projects/pseries/powerpc/mpc85xx/lbc.c projects/pseries/powerpc/mpc85xx/lbc.h projects/pseries/powerpc/mpc85xx/mpc85xx.c projects/pseries/powerpc/mpc85xx/nexus.c projects/pseries/powerpc/mpc85xx/pci_fdt.c projects/pseries/powerpc/ofw/ofw_syscons.c projects/pseries/powerpc/powermac/atibl.c projects/pseries/powerpc/powermac/hrowpic.c projects/pseries/powerpc/powerpc/bus_machdep.c projects/pseries/powerpc/powerpc/busdma_machdep.c projects/pseries/powerpc/powerpc/cpu.c projects/pseries/powerpc/powerpc/db_trace.c projects/pseries/powerpc/powerpc/exec_machdep.c projects/pseries/powerpc/powerpc/gdb_machdep.c projects/pseries/powerpc/powerpc/genassym.c projects/pseries/powerpc/powerpc/mmu_if.m projects/pseries/powerpc/powerpc/platform.c projects/pseries/powerpc/powerpc/pmap_dispatch.c projects/pseries/rpc/auth.h projects/pseries/rpc/clnt_vc.c projects/pseries/rpc/rpc_com.h projects/pseries/rpc/rpcb_clnt.c projects/pseries/rpc/xdr.h projects/pseries/security/mac/mac_net.c projects/pseries/security/mac/mac_syscalls.c projects/pseries/security/mac_mls/mac_mls.c projects/pseries/sparc64/conf/GENERIC projects/pseries/sparc64/include/_stdint.h projects/pseries/sparc64/include/_types.h projects/pseries/sparc64/include/elf.h projects/pseries/sparc64/include/fsr.h projects/pseries/sparc64/include/in_cksum.h projects/pseries/sparc64/include/intr_machdep.h projects/pseries/sparc64/include/pcb.h projects/pseries/sparc64/include/pmap.h projects/pseries/sparc64/include/smp.h projects/pseries/sparc64/include/vmparam.h projects/pseries/sparc64/pci/fire.c projects/pseries/sparc64/pci/schizo.c projects/pseries/sparc64/sparc64/ata_machdep.c projects/pseries/sparc64/sparc64/intr_machdep.c projects/pseries/sparc64/sparc64/machdep.c projects/pseries/sparc64/sparc64/mp_machdep.c projects/pseries/sparc64/sparc64/pmap.c projects/pseries/sparc64/sparc64/support.S projects/pseries/sparc64/sparc64/tick.c projects/pseries/sparc64/sparc64/trap.c projects/pseries/sparc64/sparc64/tsb.c projects/pseries/sys/_cpuset.h projects/pseries/sys/_types.h projects/pseries/sys/agpio.h projects/pseries/sys/apm.h projects/pseries/sys/ata.h projects/pseries/sys/buf.h projects/pseries/sys/bus.h projects/pseries/sys/callout.h projects/pseries/sys/cdefs.h projects/pseries/sys/conf.h projects/pseries/sys/disklabel.h projects/pseries/sys/diskmbr.h projects/pseries/sys/dtrace_bsd.h projects/pseries/sys/elf_common.h projects/pseries/sys/fcntl.h projects/pseries/sys/file.h projects/pseries/sys/filedesc.h projects/pseries/sys/gpt.h projects/pseries/sys/hash.h projects/pseries/sys/iconv.h projects/pseries/sys/imgact_aout.h projects/pseries/sys/kdb.h projects/pseries/sys/kernel.h projects/pseries/sys/ktrace.h projects/pseries/sys/mbuf.h projects/pseries/sys/mdioctl.h projects/pseries/sys/mman.h projects/pseries/sys/mount.h projects/pseries/sys/param.h projects/pseries/sys/pipe.h projects/pseries/sys/pmc.h projects/pseries/sys/pmckern.h projects/pseries/sys/proc.h projects/pseries/sys/queue.h projects/pseries/sys/refcount.h projects/pseries/sys/sdt.h projects/pseries/sys/smp.h projects/pseries/sys/stat.h projects/pseries/sys/stdint.h projects/pseries/sys/syscall.h projects/pseries/sys/syscall.mk projects/pseries/sys/syscallsubr.h projects/pseries/sys/sysent.h projects/pseries/sys/sysproto.h projects/pseries/sys/systm.h projects/pseries/sys/time.h projects/pseries/sys/ucontext.h projects/pseries/sys/umtx.h projects/pseries/sys/unistd.h projects/pseries/sys/user.h projects/pseries/sys/vmmeter.h projects/pseries/sys/vnode.h projects/pseries/sys/vtoc.h projects/pseries/ufs/ffs/ffs_alloc.c projects/pseries/ufs/ffs/ffs_extern.h projects/pseries/ufs/ffs/ffs_inode.c projects/pseries/ufs/ffs/ffs_snapshot.c projects/pseries/ufs/ffs/ffs_softdep.c projects/pseries/ufs/ffs/ffs_vfsops.c projects/pseries/ufs/ffs/ffs_vnops.c projects/pseries/ufs/ufs/inode.h projects/pseries/ufs/ufs/quota.h projects/pseries/ufs/ufs/ufs_bmap.c projects/pseries/ufs/ufs/ufs_extattr.c projects/pseries/ufs/ufs/ufs_inode.c projects/pseries/ufs/ufs/ufs_lookup.c projects/pseries/ufs/ufs/ufs_quota.c projects/pseries/ufs/ufs/ufs_vnops.c projects/pseries/ufs/ufs/ufsmount.h projects/pseries/vm/device_pager.c projects/pseries/vm/memguard.c projects/pseries/vm/memguard.h projects/pseries/vm/pmap.h projects/pseries/vm/sg_pager.c projects/pseries/vm/swap_pager.c projects/pseries/vm/uma_core.c projects/pseries/vm/vm.h projects/pseries/vm/vm_fault.c projects/pseries/vm/vm_glue.c projects/pseries/vm/vm_kern.c projects/pseries/vm/vm_map.c projects/pseries/vm/vm_map.h projects/pseries/vm/vm_mmap.c projects/pseries/vm/vm_object.c projects/pseries/vm/vm_object.h projects/pseries/vm/vm_page.c projects/pseries/vm/vm_page.h projects/pseries/vm/vm_pageout.c projects/pseries/vm/vm_pageout.h projects/pseries/vm/vm_pager.c projects/pseries/vm/vm_pager.h projects/pseries/vm/vm_phys.c projects/pseries/vm/vm_phys.h projects/pseries/vm/vm_reserv.c projects/pseries/vm/vnode_pager.c projects/pseries/x86/include/_limits.h projects/pseries/x86/include/_stdint.h projects/pseries/x86/include/_types.h projects/pseries/x86/include/float.h projects/pseries/x86/include/mca.h projects/pseries/x86/include/ptrace.h projects/pseries/x86/include/specialreg.h projects/pseries/x86/pci/pci_bus.c projects/pseries/x86/x86/busdma_machdep.c projects/pseries/x86/x86/dump_machdep.c projects/pseries/x86/x86/intr_machdep.c projects/pseries/x86/x86/local_apic.c projects/pseries/x86/x86/mca.c projects/pseries/x86/x86/tsc.c Directory Properties: projects/pseries/ (props changed) projects/pseries/boot/ (props changed) projects/pseries/boot/i386/efi/ (props changed) projects/pseries/boot/powerpc/boot1.chrp/ (props changed) projects/pseries/cddl/contrib/opensolaris/ (props changed) projects/pseries/conf/ (props changed) projects/pseries/contrib/dev/acpica/ (props changed) projects/pseries/contrib/dev/acpica/common/ (props changed) projects/pseries/contrib/dev/acpica/compiler/ (props changed) projects/pseries/contrib/dev/acpica/components/debugger/ (props changed) projects/pseries/contrib/dev/acpica/components/disassembler/ (props changed) projects/pseries/contrib/dev/acpica/components/dispatcher/ (props changed) projects/pseries/contrib/dev/acpica/components/events/ (props changed) projects/pseries/contrib/dev/acpica/components/executer/ (props changed) projects/pseries/contrib/dev/acpica/components/hardware/ (props changed) projects/pseries/contrib/dev/acpica/components/namespace/ (props changed) projects/pseries/contrib/dev/acpica/components/parser/ (props changed) projects/pseries/contrib/dev/acpica/components/resources/ (props changed) projects/pseries/contrib/dev/acpica/components/tables/ (props changed) projects/pseries/contrib/dev/acpica/components/utilities/ (props changed) projects/pseries/contrib/dev/acpica/include/ (props changed) projects/pseries/contrib/dev/acpica/os_specific/ (props changed) projects/pseries/contrib/libfdt/ (props changed) Modified: projects/pseries/amd64/acpica/acpi_machdep.c ============================================================================== --- projects/pseries/amd64/acpica/acpi_machdep.c Sun Sep 16 15:22:15 2012 (r240563) +++ projects/pseries/amd64/acpica/acpi_machdep.c Sun Sep 16 15:35:05 2012 (r240564) @@ -44,8 +44,6 @@ __FBSDID("$FreeBSD$"); #include -SYSCTL_DECL(_debug_acpi); - int acpi_resume_beep; TUNABLE_INT("debug.acpi.resume_beep", &acpi_resume_beep); SYSCTL_INT(_debug_acpi, OID_AUTO, resume_beep, CTLFLAG_RW, &acpi_resume_beep, Modified: projects/pseries/amd64/acpica/acpi_wakecode.S ============================================================================== --- projects/pseries/amd64/acpica/acpi_wakecode.S Sun Sep 16 15:22:15 2012 (r240563) +++ projects/pseries/amd64/acpica/acpi_wakecode.S Sun Sep 16 15:35:05 2012 (r240564) @@ -219,10 +219,14 @@ wakeup_64: mov $bootdata64 - bootgdt, %eax mov %ax, %ds - /* Restore arguments and return. */ - movq wakeup_kpml4 - wakeup_start(%rbx), %rdi - movq wakeup_ctx - wakeup_start(%rbx), %rsi - movq wakeup_retaddr - wakeup_start(%rbx), %rax + /* Restore arguments. */ + movq wakeup_pcb - wakeup_start(%rbx), %rdi + movq wakeup_ret - wakeup_start(%rbx), %rax + + /* Restore GDT. */ + lgdt wakeup_gdt - wakeup_start(%rbx) + + /* Jump to return address. */ jmp *%rax .data @@ -268,34 +272,11 @@ bootgdtdesc: .long bootgdt - wakeup_start /* Offset plus %ds << 4 */ ALIGN_DATA -wakeup_retaddr: - .quad 0 -wakeup_kpml4: - .quad 0 - -wakeup_ctx: - .quad 0 wakeup_pcb: .quad 0 -wakeup_fpusave: +wakeup_ret: .quad 0 wakeup_gdt: .word 0 .quad 0 - - ALIGN_DATA -wakeup_efer: - .quad 0 -wakeup_star: - .quad 0 -wakeup_lstar: - .quad 0 -wakeup_cstar: - .quad 0 -wakeup_sfmask: - .quad 0 -wakeup_xsmask: - .quad 0 -wakeup_cpu: - .long 0 dummy: Modified: projects/pseries/amd64/amd64/cpu_switch.S ============================================================================== --- projects/pseries/amd64/amd64/cpu_switch.S Sun Sep 16 15:22:15 2012 (r240563) +++ projects/pseries/amd64/amd64/cpu_switch.S Sun Sep 16 15:35:05 2012 (r240564) @@ -122,8 +122,10 @@ done_store_dr: 1: movq %rdx,%rcx movl xsave_mask,%eax movl xsave_mask+4,%edx -/* xsave (%r8) */ - .byte 0x41,0x0f,0xae,0x20 + .globl ctx_switch_xsave +ctx_switch_xsave: + /* This is patched to xsaveopt if supported, see fpuinit_bsp1() */ + xsave (%r8) movq %rcx,%rdx 2: smsw %ax orb $CR0_TS,%al @@ -357,6 +359,30 @@ ENTRY(savectx) rdmsr movl %eax,PCB_KGSBASE(%rdi) movl %edx,PCB_KGSBASE+4(%rdi) + movl $MSR_EFER,%ecx + rdmsr + movl %eax,PCB_EFER(%rdi) + movl %edx,PCB_EFER+4(%rdi) + movl $MSR_STAR,%ecx + rdmsr + movl %eax,PCB_STAR(%rdi) + movl %edx,PCB_STAR+4(%rdi) + movl $MSR_LSTAR,%ecx + rdmsr + movl %eax,PCB_LSTAR(%rdi) + movl %edx,PCB_LSTAR+4(%rdi) + movl $MSR_CSTAR,%ecx + rdmsr + movl %eax,PCB_CSTAR(%rdi) + movl %edx,PCB_CSTAR+4(%rdi) + movl $MSR_SF_MASK,%ecx + rdmsr + movl %eax,PCB_SFMASK(%rdi) + movl %edx,PCB_SFMASK+4(%rdi) + movl xsave_mask,%eax + movl %eax,PCB_XSMASK(%rdi) + movl xsave_mask+4,%eax + movl %eax,PCB_XSMASK+4(%rdi) sgdt PCB_GDT(%rdi) sidt PCB_IDT(%rdi) @@ -370,6 +396,140 @@ ENTRY(savectx) END(savectx) /* + * resumectx(pcb) + * Resuming processor state from pcb. + */ +ENTRY(resumectx) + /* Switch to KPML4phys. */ + movq KPML4phys,%rax + movq %rax,%cr3 + + /* Force kernel segment registers. */ + movl $KDSEL,%eax + movw %ax,%ds + movw %ax,%es + movw %ax,%ss + movl $KUF32SEL,%eax + movw %ax,%fs + movl $KUG32SEL,%eax + movw %ax,%gs + + movl $MSR_FSBASE,%ecx + movl PCB_FSBASE(%rdi),%eax + movl 4 + PCB_FSBASE(%rdi),%edx + wrmsr + movl $MSR_GSBASE,%ecx + movl PCB_GSBASE(%rdi),%eax + movl 4 + PCB_GSBASE(%rdi),%edx + wrmsr + movl $MSR_KGSBASE,%ecx + movl PCB_KGSBASE(%rdi),%eax + movl 4 + PCB_KGSBASE(%rdi),%edx + wrmsr + + /* Restore EFER. */ + movl $MSR_EFER,%ecx + movl PCB_EFER(%rdi),%eax + wrmsr + + /* Restore fast syscall stuff. */ + movl $MSR_STAR,%ecx + movl PCB_STAR(%rdi),%eax + movl 4 + PCB_STAR(%rdi),%edx + wrmsr + movl $MSR_LSTAR,%ecx + movl PCB_LSTAR(%rdi),%eax + movl 4 + PCB_LSTAR(%rdi),%edx + wrmsr + movl $MSR_CSTAR,%ecx + movl PCB_CSTAR(%rdi),%eax + movl 4 + PCB_CSTAR(%rdi),%edx + wrmsr + movl $MSR_SF_MASK,%ecx + movl PCB_SFMASK(%rdi),%eax + wrmsr + + /* Restore CR0 except for FPU mode. */ + movq PCB_CR0(%rdi),%rax + andq $~(CR0_EM | CR0_TS),%rax + movq %rax,%cr0 + + /* Restore CR2, CR4 and CR3. */ + movq PCB_CR2(%rdi),%rax + movq %rax,%cr2 + movq PCB_CR4(%rdi),%rax + movq %rax,%cr4 + movq PCB_CR3(%rdi),%rax + movq %rax,%cr3 + + /* Restore descriptor tables. */ + lidt PCB_IDT(%rdi) + lldt PCB_LDT(%rdi) + +#define SDT_SYSTSS 9 +#define SDT_SYSBSY 11 + + /* Clear "task busy" bit and reload TR. */ + movq PCPU(TSS),%rax + andb $(~SDT_SYSBSY | SDT_SYSTSS),5(%rax) + movw PCB_TR(%rdi),%ax + ltr %ax + +#undef SDT_SYSTSS +#undef SDT_SYSBSY + + /* Restore debug registers. */ + movq PCB_DR0(%rdi),%rax + movq %rax,%dr0 + movq PCB_DR1(%rdi),%rax + movq %rax,%dr1 + movq PCB_DR2(%rdi),%rax + movq %rax,%dr2 + movq PCB_DR3(%rdi),%rax + movq %rax,%dr3 + movq PCB_DR6(%rdi),%rax + movq %rax,%dr6 + movq PCB_DR7(%rdi),%rax + movq %rax,%dr7 + + /* Restore FPU state. */ + fninit + movq PCB_FPUSUSPEND(%rdi),%rbx + movq PCB_XSMASK(%rdi),%rax + testq %rax,%rax + jz 1f + movq %rax,%rdx + shrq $32,%rdx + movl $XCR0,%ecx + xsetbv + xrstor (%rbx) + jmp 2f +1: + fxrstor (%rbx) +2: + + /* Reload CR0. */ + movq PCB_CR0(%rdi),%rax + movq %rax,%cr0 + + /* Restore other callee saved registers. */ + movq PCB_R15(%rdi),%r15 + movq PCB_R14(%rdi),%r14 + movq PCB_R13(%rdi),%r13 + movq PCB_R12(%rdi),%r12 + movq PCB_RBP(%rdi),%rbp + movq PCB_RSP(%rdi),%rsp + movq PCB_RBX(%rdi),%rbx + + /* Restore return address. */ + movq PCB_RIP(%rdi),%rax + movq %rax,(%rsp) + + xorl %eax,%eax + ret +END(resumectx) + +/* * Wrapper around fpusave to care about TS0_CR. */ ENTRY(ctx_fpusave) Modified: projects/pseries/amd64/amd64/db_disasm.c ============================================================================== --- projects/pseries/amd64/amd64/db_disasm.c Sun Sep 16 15:22:15 2012 (r240563) +++ projects/pseries/amd64/amd64/db_disasm.c Sun Sep 16 15:35:05 2012 (r240564) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); * Instruction disassembler. */ #include +#include #include #include @@ -47,7 +48,9 @@ __FBSDID("$FreeBSD$"); #define DBLR 5 #define EXTR 6 #define SDEP 7 -#define NONE 8 +#define ADEP 8 +#define ESC 9 +#define NONE 10 /* * REX prefix and bits @@ -67,6 +70,7 @@ __FBSDID("$FreeBSD$"); #define Eb 4 /* address, byte size */ #define R 5 /* register, in 'reg' field */ #define Rw 6 /* word register, in 'reg' field */ +#define Rq 39 /* quad register, in 'reg' field */ #define Ri 7 /* register in instruction */ #define S 8 /* segment reg, in 'reg' field */ #define Si 9 /* segment reg, in instruction */ @@ -120,6 +124,45 @@ struct finst { (or pointer to table) */ }; +static const struct inst db_inst_0f388x[] = { +/*80*/ { "", TRUE, SDEP, op2(E, Rq), "invept" }, +/*81*/ { "", TRUE, SDEP, op2(E, Rq), "invvpid" }, +/*82*/ { "", FALSE, NONE, 0, 0 }, +/*83*/ { "", FALSE, NONE, 0, 0 }, +/*84*/ { "", FALSE, NONE, 0, 0 }, +/*85*/ { "", FALSE, NONE, 0, 0 }, +/*86*/ { "", FALSE, NONE, 0, 0 }, +/*87*/ { "", FALSE, NONE, 0, 0 }, + +/*88*/ { "", FALSE, NONE, 0, 0 }, +/*89*/ { "", FALSE, NONE, 0, 0 }, +/*8a*/ { "", FALSE, NONE, 0, 0 }, +/*8b*/ { "", FALSE, NONE, 0, 0 }, +/*8c*/ { "", FALSE, NONE, 0, 0 }, +/*8d*/ { "", FALSE, NONE, 0, 0 }, +/*8e*/ { "", FALSE, NONE, 0, 0 }, +/*8f*/ { "", FALSE, NONE, 0, 0 }, +}; + +static const struct inst * const db_inst_0f38[] = { + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + db_inst_0f388x, + 0, + 0, + 0, + 0, + 0, + 0, + 0 +}; + static const char * const db_Grp6[] = { "sldt", "str", @@ -160,8 +203,8 @@ static const char * const db_Grp9[] = { "", "", "", - "", - "" + "vmptrld", + "vmptrst" }; static const char * const db_Grp15[] = { @@ -169,9 +212,9 @@ static const char * const db_Grp15[] = { "fxrstor", "ldmxcsr", "stmxcsr", - "", - "", - "", + "xsave", + "xrstor", + "xsaveopt", "clflush" }; @@ -236,7 +279,7 @@ static const struct inst db_inst_0f3x[] /*36*/ { "", FALSE, NONE, 0, 0 }, /*37*/ { "getsec",FALSE, NONE, 0, 0 }, -/*38*/ { "", FALSE, NONE, 0, 0 }, +/*38*/ { "", FALSE, ESC, 0, db_inst_0f38 }, /*39*/ { "", FALSE, NONE, 0, 0 }, /*3a*/ { "", FALSE, NONE, 0, 0 }, /*3b*/ { "", FALSE, NONE, 0, 0 }, @@ -266,6 +309,26 @@ static const struct inst db_inst_0f4x[] /*4f*/ { "cmovnle",TRUE, NONE, op2(E, R), 0 }, }; +static const struct inst db_inst_0f7x[] = { +/*70*/ { "", FALSE, NONE, 0, 0 }, +/*71*/ { "", FALSE, NONE, 0, 0 }, +/*72*/ { "", FALSE, NONE, 0, 0 }, +/*73*/ { "", FALSE, NONE, 0, 0 }, +/*74*/ { "", FALSE, NONE, 0, 0 }, +/*75*/ { "", FALSE, NONE, 0, 0 }, +/*76*/ { "", FALSE, NONE, 0, 0 }, +/*77*/ { "", FALSE, NONE, 0, 0 }, + +/*78*/ { "vmread", TRUE, NONE, op2(Rq, E), 0 }, +/*79*/ { "vmwrite",TRUE, NONE, op2(E, Rq), 0 }, +/*7a*/ { "", FALSE, NONE, 0, 0 }, +/*7b*/ { "", FALSE, NONE, 0, 0 }, +/*7c*/ { "", FALSE, NONE, 0, 0 }, +/*7d*/ { "", FALSE, NONE, 0, 0 }, +/*7e*/ { "", FALSE, NONE, 0, 0 }, +/*7f*/ { "", FALSE, NONE, 0, 0 }, +}; + static const struct inst db_inst_0f8x[] = { /*80*/ { "jo", FALSE, NONE, op1(Dl), 0 }, /*81*/ { "jno", FALSE, NONE, op1(Dl), 0 }, @@ -373,7 +436,7 @@ static const struct inst * const db_inst db_inst_0f4x, 0, 0, - 0, + db_inst_0f7x, db_inst_0f8x, db_inst_0f9x, db_inst_0fax, @@ -582,7 +645,7 @@ static const struct inst db_inst_table[2 /*0c*/ { "or", FALSE, BYTE, op2(I, A), 0 }, /*0d*/ { "or", FALSE, LONG, op2(I, A), 0 }, /*0e*/ { "push", FALSE, NONE, op1(Si), 0 }, -/*0f*/ { "", FALSE, NONE, 0, 0 }, +/*0f*/ { "", FALSE, ESC, 0, db_inst_0f }, /*10*/ { "adc", TRUE, BYTE, op2(R, E), 0 }, /*11*/ { "adc", TRUE, LONG, op2(R, E), 0 }, @@ -738,8 +801,8 @@ static const struct inst db_inst_table[2 /*96*/ { "xchg", FALSE, LONG, op2(A, Ri), 0 }, /*97*/ { "xchg", FALSE, LONG, op2(A, Ri), 0 }, -/*98*/ { "cbw", FALSE, SDEP, 0, "cwde" }, /* cbw/cwde */ -/*99*/ { "cwd", FALSE, SDEP, 0, "cdq" }, /* cwd/cdq */ +/*98*/ { "cwde", FALSE, SDEP, 0, "cbw" }, +/*99*/ { "cdq", FALSE, SDEP, 0, "cwd" }, /*9a*/ { "lcall", FALSE, NONE, op1(OS), 0 }, /*9b*/ { "wait", FALSE, NONE, 0, 0 }, /*9c*/ { "pushf", FALSE, LONG, 0, 0 }, @@ -822,7 +885,7 @@ static const struct inst db_inst_table[2 /*e0*/ { "loopne",FALSE, NONE, op1(Db), 0 }, /*e1*/ { "loope", FALSE, NONE, op1(Db), 0 }, /*e2*/ { "loop", FALSE, NONE, op1(Db), 0 }, -/*e3*/ { "jcxz", FALSE, SDEP, op1(Db), "jecxz" }, +/*e3*/ { "jrcxz", FALSE, ADEP, op1(Db), "jecxz" }, /*e4*/ { "in", FALSE, BYTE, op2(Ib, A), 0 }, /*e5*/ { "in", FALSE, LONG, op2(Ib, A) , 0 }, /*e6*/ { "out", FALSE, BYTE, op2(A, Ib), 0 }, @@ -1208,14 +1271,6 @@ db_disasm(loc, altfmt) if (prefix) { get_value_inc(inst, loc, 1, FALSE); } - if (rep == TRUE) { - if (inst == 0x90) { - db_printf("pause\n"); - return (loc); - } - db_printf("repe "); /* XXX repe VS rep */ - rep = FALSE; - } } while (prefix); if (inst >= 0xd8 && inst <= 0xdf) { @@ -1224,9 +1279,10 @@ db_disasm(loc, altfmt) return (loc); } - if (inst == 0x0f) { + ip = &db_inst_table[inst]; + while (ip->i_size == ESC) { get_value_inc(inst, loc, 1, FALSE); - ip = db_inst_0f[inst>>4]; + ip = ((const struct inst * const *)ip->i_extra)[inst>>4]; if (ip == 0) { ip = &db_bad_inst; } @@ -1234,8 +1290,6 @@ db_disasm(loc, altfmt) ip = &ip[inst&0xf]; } } - else - ip = &db_inst_table[inst]; if (ip->i_has_modrm) { get_value_inc(regmodrm, loc, 1, FALSE); @@ -1269,6 +1323,26 @@ db_disasm(loc, altfmt) /* Special cases that don't fit well in the tables. */ if (ip->i_extra == db_Grp7 && f_mod(rex, regmodrm) == 3) { switch (regmodrm) { + case 0xc1: + i_name = "vmcall"; + i_size = NONE; + i_mode = 0; + break; + case 0xc2: + i_name = "vmlaunch"; + i_size = NONE; + i_mode = 0; + break; + case 0xc3: + i_name = "vmresume"; + i_size = NONE; + i_mode = 0; + break; + case 0xc4: + i_name = "vmxoff"; + i_size = NONE; + i_mode = 0; + break; case 0xc8: i_name = "monitor"; i_size = NONE; @@ -1279,11 +1353,26 @@ db_disasm(loc, altfmt) i_size = NONE; i_mode = 0; break; + case 0xd0: + i_name = "xgetbv"; + i_size = NONE; + i_mode = 0; + break; + case 0xd1: + i_name = "xsetbv"; + i_size = NONE; + i_mode = 0; + break; case 0xf8: i_name = "swapgs"; i_size = NONE; i_mode = 0; break; + case 0xf9: + i_name = "rdtscp"; + i_size = NONE; + i_mode = 0; + break; } } if (ip->i_extra == db_Grp15 && f_mod(rex, regmodrm) == 3) { @@ -1292,8 +1381,42 @@ db_disasm(loc, altfmt) i_mode = 0; } + /* Handle instructions identified by mandatory prefixes. */ + if (rep == TRUE) { + if (inst == 0x90) { + i_name = "pause"; + i_size = NONE; + i_mode = 0; + rep = FALSE; + } else if (ip->i_extra == db_Grp9 && f_mod(rex, regmodrm) != 3 && + f_reg(rex, regmodrm) == 0x6) { + i_name = "vmxon"; + rep = FALSE; + } + } + if (size == WORD) { + if (ip->i_extra == db_Grp9 && f_mod(rex, regmodrm) != 3 && + f_reg(rex, regmodrm) == 0x6) { + i_name = "vmclear"; + } + } + if (rex & REX_W) { + if (strcmp(i_name, "cwde") == 0) + i_name = "cdqe"; + else if (strcmp(i_name, "cmpxchg8b") == 0) + i_name = "cmpxchg16b"; + } + + if (rep == TRUE) + db_printf("repe "); /* XXX repe VS rep */ + if (i_size == SDEP) { - if (size == WORD) + if (size == LONG) + db_printf("%s", i_name); + else + db_printf("%s", (const char *)ip->i_extra); + } else if (i_size == ADEP) { + if (short_addr == FALSE) db_printf("%s", i_name); else db_printf("%s", (const char *)ip->i_extra); @@ -1366,6 +1489,10 @@ db_disasm(loc, altfmt) db_printf("%s", db_reg[rex != 0 ? 1 : 0][WORD][f_reg(rex, regmodrm)]); break; + case Rq: + db_printf("%s", db_reg[rex != 0 ? 1 : 0][QUAD][f_reg(rex, regmodrm)]); + break; + case Ri: db_printf("%s", db_reg[0][QUAD][f_rm(rex, inst)]); break; Modified: projects/pseries/amd64/amd64/elf_machdep.c ============================================================================== --- projects/pseries/amd64/amd64/elf_machdep.c Sun Sep 16 15:22:15 2012 (r240563) +++ projects/pseries/amd64/amd64/elf_machdep.c Sun Sep 16 15:35:05 2012 (r240564) @@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: projects/pseries/amd64/amd64/fpu.c ============================================================================== --- projects/pseries/amd64/amd64/fpu.c Sun Sep 16 15:22:15 2012 (r240563) +++ projects/pseries/amd64/amd64/fpu.c Sun Sep 16 15:35:05 2012 (r240564) @@ -73,10 +73,7 @@ __FBSDID("$FreeBSD$"); #define fxrstor(addr) __asm __volatile("fxrstor %0" : : "m" (*(addr))) #define fxsave(addr) __asm __volatile("fxsave %0" : "=m" (*(addr))) #define ldmxcsr(csr) __asm __volatile("ldmxcsr %0" : : "m" (csr)) -#define start_emulating() __asm __volatile( \ - "smsw %%ax; orb %0,%%al; lmsw %%ax" \ - : : "n" (CR0_TS) : "ax") -#define stop_emulating() __asm __volatile("clts") +#define stmxcsr(addr) __asm __volatile("stmxcsr %0" : : "m" (*(addr))) static __inline void xrstor(char *addr, uint64_t mask) @@ -85,9 +82,7 @@ xrstor(char *addr, uint64_t mask) low = mask; hi = mask >> 32; - /* xrstor (%rdi) */ - __asm __volatile(".byte 0x0f,0xae,0x2f" : : - "a" (low), "d" (hi), "D" (addr)); + __asm __volatile("xrstor %0" : : "m" (*addr), "a" (low), "d" (hi)); } static __inline void @@ -97,20 +92,8 @@ xsave(char *addr, uint64_t mask) low = mask; hi = mask >> 32; - /* xsave (%rdi) */ - __asm __volatile(".byte 0x0f,0xae,0x27" : : - "a" (low), "d" (hi), "D" (addr) : "memory"); -} - -static __inline void -xsetbv(uint32_t reg, uint64_t val) -{ - uint32_t low, hi; - - low = val; - hi = val >> 32; - __asm __volatile(".byte 0x0f,0x01,0xd1" : : - "c" (reg), "a" (low), "d" (hi)); + __asm __volatile("xsave %0" : "=m" (*addr) : "a" (low), "d" (hi) : + "memory"); } #else /* !(__GNUCLIKE_ASM && !lint) */ @@ -123,16 +106,14 @@ void fnstsw(caddr_t addr); void fxsave(caddr_t addr); void fxrstor(caddr_t addr); void ldmxcsr(u_int csr); -void start_emulating(void); -void stop_emulating(void); +void stmxcsr(u_int *csr); void xrstor(char *addr, uint64_t mask); void xsave(char *addr, uint64_t mask); -void xsetbv(uint32_t reg, uint64_t val); #endif /* __GNUCLIKE_ASM && !lint */ -#define GET_FPU_CW(thread) ((thread)->td_pcb->pcb_save->sv_env.en_cw) -#define GET_FPU_SW(thread) ((thread)->td_pcb->pcb_save->sv_env.en_sw) +#define start_emulating() load_cr0(rcr0() | CR0_TS) +#define stop_emulating() clts() CTASSERT(sizeof(struct savefpu) == 512); CTASSERT(sizeof(struct xstate_hdr) == 64); @@ -141,7 +122,7 @@ CTASSERT(sizeof(struct savefpu_ymm) == 8 /* * This requirement is to make it easier for asm code to calculate * offset of the fpu save area from the pcb address. FPU save area - * must by 64-bytes aligned. + * must be 64-byte aligned. */ CTASSERT(sizeof(struct pcb) % XSAVE_AREA_ALIGN == 0); @@ -150,10 +131,16 @@ static void fpu_clean_state(void); SYSCTL_INT(_hw, HW_FLOATINGPT, floatingpoint, CTLFLAG_RD, NULL, 1, "Floating point instructions executed in hardware"); +static int use_xsaveopt; int use_xsave; /* non-static for cpu_switch.S */ uint64_t xsave_mask; /* the same */ static struct savefpu *fpu_initialstate; +struct xsave_area_elm_descr { + u_int offset; + u_int size; +} *xsave_area_desc; + void fpusave(void *addr) { @@ -200,6 +187,17 @@ fpuinit_bsp1(void) TUNABLE_ULONG_FETCH("hw.xsave_mask", &xsave_mask_user); xsave_mask_user |= XFEATURE_ENABLED_X87 | XFEATURE_ENABLED_SSE; xsave_mask &= xsave_mask_user; + + cpuid_count(0xd, 0x1, cp); + if ((cp[0] & CPUID_EXTSTATE_XSAVEOPT) != 0) { + /* + * Patch the XSAVE instruction in the cpu_switch code + * to XSAVEOPT. We assume that XSAVE encoding used + * REX byte, and set the bit 4 of the r/m byte. + */ + ctx_switch_xsave[3] |= 0x10; + use_xsaveopt = 1; + } } /* @@ -238,7 +236,7 @@ fpuinit(void) if (use_xsave) { load_cr4(rcr4() | CR4_XSAVE); - xsetbv(XCR0, xsave_mask); + load_xcr(XCR0, xsave_mask); } /* @@ -270,6 +268,7 @@ static void fpuinitstate(void *arg __unused) { register_t saveintr; + int cp[4], i, max_ext_n; fpu_initialstate = malloc(cpu_max_ext_state_size, M_DEVBUF, M_WAITOK | M_ZERO); @@ -291,6 +290,28 @@ fpuinitstate(void *arg __unused) */ bzero(&fpu_initialstate->sv_xmm[0], sizeof(struct xmmacc)); + /* + * Create a table describing the layout of the CPU Extended + * Save Area. + */ + if (use_xsaveopt) { + max_ext_n = flsl(xsave_mask); + xsave_area_desc = malloc(max_ext_n * sizeof(struct + xsave_area_elm_descr), M_DEVBUF, M_WAITOK | M_ZERO); + /* x87 state */ + xsave_area_desc[0].offset = 0; + xsave_area_desc[0].size = 160; + /* XMM */ + xsave_area_desc[1].offset = 160; + xsave_area_desc[1].size = 288 - 160; + + for (i = 2; i < max_ext_n; i++) { + cpuid_count(0xd, i, cp); + xsave_area_desc[i].offset = cp[1]; + xsave_area_desc[i].size = cp[0]; + } + } + start_emulating(); intr_restore(saveintr); } @@ -306,7 +327,7 @@ fpuexit(struct thread *td) critical_enter(); if (curthread == PCPU_GET(fpcurthread)) { stop_emulating(); - fpusave(PCPU_GET(curpcb)->pcb_save); + fpusave(curpcb->pcb_save); start_emulating(); PCPU_SET(fpcurthread, 0); } @@ -492,25 +513,26 @@ static char fpetable[128] = { }; /* - * Preserve the FP status word, clear FP exceptions, then generate a SIGFPE. + * Read the FP status and control words, then generate si_code value + * for SIGFPE. The error code chosen will be one of the + * FPE_... macros. It will be sent as the second argument to old + * BSD-style signal handlers and as "siginfo_t->si_code" (second + * argument) to SA_SIGINFO signal handlers. * - * Clearing exceptions is necessary mainly to avoid IRQ13 bugs. We now - * depend on longjmp() restoring a usable state. Restoring the state - * or examining it might fail if we didn't clear exceptions. + * Some time ago, we cleared the x87 exceptions with FNCLEX there. + * Clearing exceptions was necessary mainly to avoid IRQ13 bugs. The + * usermode code which understands the FPU hardware enough to enable + * the exceptions, can also handle clearing the exception state in the + * handler. The only consequence of not clearing the exception is the + * rethrow of the SIGFPE on return from the signal handler and + * reexecution of the corresponding instruction. * - * The error code chosen will be one of the FPE_... macros. It will be - * sent as the second argument to old BSD-style signal handlers and as - * "siginfo_t->si_code" (second argument) to SA_SIGINFO signal handlers. - * - * XXX the FP state is not preserved across signal handlers. So signal - * handlers cannot afford to do FP unless they preserve the state or - * longjmp() out. Both preserving the state and longjmp()ing may be - * destroyed by IRQ13 bugs. Clearing FP exceptions is not an acceptable - * solution for signals other than SIGFPE. + * For XMM traps, the exceptions were never cleared. */ int -fputrap() +fputrap_x87(void) { + struct savefpu *pcb_save; u_short control, status; critical_enter(); @@ -521,19 +543,32 @@ fputrap() * wherever they are. */ if (PCPU_GET(fpcurthread) != curthread) { - control = GET_FPU_CW(curthread); - status = GET_FPU_SW(curthread); + pcb_save = curpcb->pcb_save; + control = pcb_save->sv_env.en_cw; + status = pcb_save->sv_env.en_sw; } else { fnstcw(&control); fnstsw(&status); } - if (PCPU_GET(fpcurthread) == curthread) - fnclex(); critical_exit(); return (fpetable[status & ((~control & 0x3f) | 0x40)]); } +int +fputrap_sse(void) +{ + u_int mxcsr; + + critical_enter(); + if (PCPU_GET(fpcurthread) != curthread) + mxcsr = curpcb->pcb_save->sv_env.en_mxcsr; + else + stmxcsr(&mxcsr); + critical_exit(); + return (fpetable[(mxcsr & (~mxcsr >> 7)) & 0x3f]); +} + /* * Implement device not available (DNA) exception * @@ -547,7 +582,6 @@ static int err_count = 0; void fpudna(void) { - struct pcb *pcb; critical_enter(); if (PCPU_GET(fpcurthread) == curthread) { @@ -569,26 +603,31 @@ fpudna(void) * Record new context early in case frstor causes a trap. */ PCPU_SET(fpcurthread, curthread); - pcb = PCPU_GET(curpcb); fpu_clean_state(); - if ((pcb->pcb_flags & PCB_FPUINITDONE) == 0) { + if ((curpcb->pcb_flags & PCB_FPUINITDONE) == 0) { /* * This is the first time this thread has used the FPU or * the PCB doesn't contain a clean FPU state. Explicitly * load an initial state. + * + * We prefer to restore the state from the actual save + * area in PCB instead of directly loading from + * fpu_initialstate, to ignite the XSAVEOPT + * tracking engine. */ - fpurestore(fpu_initialstate); - if (pcb->pcb_initial_fpucw != __INITIAL_FPUCW__) - fldcw(pcb->pcb_initial_fpucw); - if (PCB_USER_FPU(pcb)) - set_pcb_flags(pcb, + bcopy(fpu_initialstate, curpcb->pcb_save, cpu_max_ext_state_size); + fpurestore(curpcb->pcb_save); + if (curpcb->pcb_initial_fpucw != __INITIAL_FPUCW__) + fldcw(curpcb->pcb_initial_fpucw); + if (PCB_USER_FPU(curpcb)) + set_pcb_flags(curpcb, PCB_FPUINITDONE | PCB_USERFPUINITDONE); else - set_pcb_flags(pcb, PCB_FPUINITDONE); + set_pcb_flags(curpcb, PCB_FPUINITDONE); } else - fpurestore(pcb->pcb_save); + fpurestore(curpcb->pcb_save); critical_exit(); } @@ -614,6 +653,9 @@ int fpugetregs(struct thread *td) { struct pcb *pcb; + uint64_t *xstate_bv, bit; + char *sa; + int max_ext_n, i; pcb = td->td_pcb; if ((pcb->pcb_flags & PCB_USERFPUINITDONE) == 0) { @@ -631,6 +673,25 @@ fpugetregs(struct thread *td) return (_MC_FPOWNED_FPU); } else { critical_exit(); + if (use_xsaveopt) { + /* + * Handle partially saved state. + */ + sa = (char *)get_pcb_user_save_pcb(pcb); + xstate_bv = (uint64_t *)(sa + sizeof(struct savefpu) + + offsetof(struct xstate_hdr, xstate_bv)); + max_ext_n = flsl(xsave_mask); + for (i = 0; i < max_ext_n; i++) { + bit = 1 << i; + if ((*xstate_bv & bit) != 0) + continue; + bcopy((char *)fpu_initialstate + + xsave_area_desc[i].offset, + sa + xsave_area_desc[i].offset, + xsave_area_desc[i].size); + *xstate_bv |= bit; + } + } return (_MC_FPOWNED_PCB); } } @@ -900,16 +961,14 @@ fpu_kern_leave(struct thread *td, struct int fpu_kern_thread(u_int flags) { - struct pcb *pcb; - pcb = PCPU_GET(curpcb); KASSERT((curthread->td_pflags & TDP_KTHREAD) != 0, ("Only kthread may use fpu_kern_thread")); - KASSERT(pcb->pcb_save == get_pcb_user_save_pcb(pcb), + KASSERT(curpcb->pcb_save == get_pcb_user_save_pcb(curpcb), ("mangled pcb_save")); - KASSERT(PCB_USER_FPU(pcb), ("recursive call")); + KASSERT(PCB_USER_FPU(curpcb), ("recursive call")); - set_pcb_flags(pcb, PCB_KERNFPU); + set_pcb_flags(curpcb, PCB_KERNFPU); return (0); } @@ -919,5 +978,5 @@ is_fpu_kern_thread(u_int flags) if ((curthread->td_pflags & TDP_KTHREAD) == 0) return (0); - return ((PCPU_GET(curpcb)->pcb_flags & PCB_KERNFPU) != 0); + return ((curpcb->pcb_flags & PCB_KERNFPU) != 0); } Modified: projects/pseries/amd64/amd64/genassym.c ============================================================================== --- projects/pseries/amd64/amd64/genassym.c Sun Sep 16 15:22:15 2012 (r240563) +++ projects/pseries/amd64/amd64/genassym.c Sun Sep 16 15:35:05 2012 (r240564) @@ -157,6 +157,13 @@ ASSYM(PCB_TSSP, offsetof(struct pcb, pcb ASSYM(PCB_SAVEFPU, offsetof(struct pcb, pcb_save)); ASSYM(PCB_SAVEFPU_SIZE, sizeof(struct savefpu)); ASSYM(PCB_USERFPU, sizeof(struct pcb)); +ASSYM(PCB_EFER, offsetof(struct pcb, pcb_efer)); +ASSYM(PCB_STAR, offsetof(struct pcb, pcb_star)); +ASSYM(PCB_LSTAR, offsetof(struct pcb, pcb_lstar)); +ASSYM(PCB_CSTAR, offsetof(struct pcb, pcb_cstar)); +ASSYM(PCB_SFMASK, offsetof(struct pcb, pcb_sfmask)); +ASSYM(PCB_XSMASK, offsetof(struct pcb, pcb_xsmask)); +ASSYM(PCB_FPUSUSPEND, offsetof(struct pcb, pcb_fpususpend)); ASSYM(PCB_SIZE, sizeof(struct pcb)); ASSYM(PCB_FULL_IRET, PCB_FULL_IRET); ASSYM(PCB_DBREGS, PCB_DBREGS); Modified: projects/pseries/amd64/amd64/identcpu.c ============================================================================== --- projects/pseries/amd64/amd64/identcpu.c Sun Sep 16 15:22:15 2012 (r240563) +++ projects/pseries/amd64/amd64/identcpu.c Sun Sep 16 15:35:05 2012 (r240564) @@ -303,7 +303,7 @@ printcpuinfo(void) "\034OSXSAVE" /* OS-Enabled State Management*/ "\035AVX" /* Advanced Vector Extensions */ "\036F16C" /* Half-precision conversions */ - "\037" + "\037RDRAND" /* RDRAND Instruction */ "\040HV" /* Hypervisor */ ); } Modified: projects/pseries/amd64/amd64/initcpu.c ============================================================================== --- projects/pseries/amd64/amd64/initcpu.c Sun Sep 16 15:22:15 2012 (r240563) +++ projects/pseries/amd64/amd64/initcpu.c Sun Sep 16 15:35:05 2012 (r240564) @@ -91,11 +91,17 @@ init_amd(void) * * http://support.amd.com/us/Processor_TechDocs/41322_10h_Rev_Gd.pdf * http://support.amd.com/us/Processor_TechDocs/44739_12h_Rev_Gd.pdf + * + * Hypervisors do not provide access to the errata MSR, + * causing #GP exception on attempt to apply the errata. The + * MSR write shall be done on host and persist globally + * anyway, so do not try to do it when under virtualization. */ switch (CPUID_TO_FAMILY(cpu_id)) { case 0x10: case 0x12: - wrmsr(0xc0011029, rdmsr(0xc0011029) | 1); + if ((cpu_feature2 & CPUID2_HV) == 0) + wrmsr(0xc0011029, rdmsr(0xc0011029) | 1); break; } } Modified: projects/pseries/amd64/amd64/machdep.c ============================================================================== --- projects/pseries/amd64/amd64/machdep.c Sun Sep 16 15:22:15 2012 (r240563) +++ projects/pseries/amd64/amd64/machdep.c Sun Sep 16 15:35:05 2012 (r240564) @@ -74,6 +74,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -206,6 +207,8 @@ struct pcpu __pcpu[MAXCPU]; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Mon Sep 17 03:12:43 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CF34106564A; Mon, 17 Sep 2012 03:12:43 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 188128FC1C; Mon, 17 Sep 2012 03:12:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8H3CguD036498; Mon, 17 Sep 2012 03:12:42 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8H3CgOX036496; Mon, 17 Sep 2012 03:12:42 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201209170312.q8H3CgOX036496@svn.freebsd.org> From: Attilio Rao Date: Mon, 17 Sep 2012 03:12:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240591 - projects/fuse/sys/fs/fuse X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2012 03:12:43 -0000 Author: attilio Date: Mon Sep 17 03:12:42 2012 New Revision: 240591 URL: http://svn.freebsd.org/changeset/base/240591 Log: Disable the revoking mechanism as it is still not ready to be used and add a comment explaining that it needs further love. In collaboration with: pho Modified: projects/fuse/sys/fs/fuse/fuse_vnops.c Modified: projects/fuse/sys/fs/fuse/fuse_vnops.c ============================================================================== --- projects/fuse/sys/fs/fuse/fuse_vnops.c Mon Sep 17 02:50:16 2012 (r240590) +++ projects/fuse/sys/fs/fuse/fuse_vnops.c Mon Sep 17 03:12:42 2012 (r240591) @@ -179,7 +179,11 @@ int fuse_lookup_cache_enable = 1; SYSCTL_INT(_vfs_fuse, OID_AUTO, lookup_cache_enable, CTLFLAG_RW, &fuse_lookup_cache_enable, 0, ""); -static int fuse_reclaim_revoked = 1; +/* + * XXX: This feature is highly experimental and can bring to instabilities, + * needs revisiting before to be enabled by default. + */ +static int fuse_reclaim_revoked = 0; SYSCTL_INT(_vfs_fuse, OID_AUTO, reclaim_revoked, CTLFLAG_RW, &fuse_reclaim_revoked, 0, ""); From owner-svn-src-projects@FreeBSD.ORG Mon Sep 17 03:21:19 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 019791065670; Mon, 17 Sep 2012 03:21:19 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DC9738FC14; Mon, 17 Sep 2012 03:21:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8H3LIsQ037702; Mon, 17 Sep 2012 03:21:18 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8H3LIHl037684; Mon, 17 Sep 2012 03:21:18 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201209170321.q8H3LIHl037684@svn.freebsd.org> From: Attilio Rao Date: Mon, 17 Sep 2012 03:21:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240593 - in projects/fuse: . bin/sh cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/cmd/ztest cddl/contrib/opensolaris/lib/libuutil/common ... X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2012 03:21:19 -0000 Author: attilio Date: Mon Sep 17 03:21:17 2012 New Revision: 240593 URL: http://svn.freebsd.org/changeset/base/240593 Log: MFC Added: projects/fuse/sbin/pfctl/parse.y - copied unchanged from r240591, head/sbin/pfctl/parse.y projects/fuse/sbin/pfctl/pf_print_state.c - copied unchanged from r240591, head/sbin/pfctl/pf_print_state.c projects/fuse/sbin/pfctl/pfctl.8 - copied unchanged from r240591, head/sbin/pfctl/pfctl.8 projects/fuse/sbin/pfctl/pfctl.c - copied unchanged from r240591, head/sbin/pfctl/pfctl.c projects/fuse/sbin/pfctl/pfctl.h - copied unchanged from r240591, head/sbin/pfctl/pfctl.h projects/fuse/sbin/pfctl/pfctl_altq.c - copied unchanged from r240591, head/sbin/pfctl/pfctl_altq.c projects/fuse/sbin/pfctl/pfctl_optimize.c - copied unchanged from r240591, head/sbin/pfctl/pfctl_optimize.c projects/fuse/sbin/pfctl/pfctl_osfp.c - copied unchanged from r240591, head/sbin/pfctl/pfctl_osfp.c projects/fuse/sbin/pfctl/pfctl_parser.c - copied unchanged from r240591, head/sbin/pfctl/pfctl_parser.c projects/fuse/sbin/pfctl/pfctl_parser.h - copied unchanged from r240591, head/sbin/pfctl/pfctl_parser.h projects/fuse/sbin/pfctl/pfctl_qstats.c - copied unchanged from r240591, head/sbin/pfctl/pfctl_qstats.c projects/fuse/sbin/pfctl/pfctl_radix.c - copied unchanged from r240591, head/sbin/pfctl/pfctl_radix.c projects/fuse/sbin/pfctl/pfctl_table.c - copied unchanged from r240591, head/sbin/pfctl/pfctl_table.c projects/fuse/share/man/man4/pf.4 - copied unchanged from r240591, head/share/man/man4/pf.4 projects/fuse/share/man/man4/pflog.4 - copied unchanged from r240591, head/share/man/man4/pflog.4 projects/fuse/share/man/man4/pfsync.4 - copied unchanged from r240591, head/share/man/man4/pfsync.4 projects/fuse/share/man/man5/pf.conf.5 - copied unchanged from r240591, head/share/man/man5/pf.conf.5 projects/fuse/share/man/man5/pf.os.5 - copied unchanged from r240591, head/share/man/man5/pf.os.5 projects/fuse/share/mk/bsd.compiler.mk - copied unchanged from r240591, head/share/mk/bsd.compiler.mk projects/fuse/sys/arm/broadcom/bcm2835/dwc_otg_brcm.c - copied unchanged from r240591, head/sys/arm/broadcom/bcm2835/dwc_otg_brcm.c projects/fuse/sys/boot/fdt/dts/db78460.dts - copied unchanged from r240591, head/sys/boot/fdt/dts/db78460.dts projects/fuse/sys/cddl/compat/opensolaris/sys/assfail.h - copied unchanged from r240591, head/sys/cddl/compat/opensolaris/sys/assfail.h projects/fuse/sys/dev/cxgbe/firmware/t4fw-1.6.2.0.bin.uu - copied unchanged from r240591, head/sys/dev/cxgbe/firmware/t4fw-1.6.2.0.bin.uu projects/fuse/sys/net/if_pflog.h - copied unchanged from r240591, head/sys/net/if_pflog.h projects/fuse/sys/net/if_pfsync.h - copied unchanged from r240591, head/sys/net/if_pfsync.h projects/fuse/sys/net/pf_mtag.h - copied unchanged from r240591, head/sys/net/pf_mtag.h projects/fuse/sys/net/pfvar.h - copied unchanged from r240591, head/sys/net/pfvar.h projects/fuse/sys/netpfil/ - copied from r240591, head/sys/netpfil/ Deleted: projects/fuse/contrib/bzip2/Makefile projects/fuse/contrib/bzip2/Makefile-libbz2_so projects/fuse/contrib/bzip2/dlltest.c projects/fuse/contrib/bzip2/makefile.msc projects/fuse/contrib/pf/man/ projects/fuse/contrib/pf/pfctl/ projects/fuse/sbin/pfctl/missing/ projects/fuse/share/examples/cvsup/doc-supfile projects/fuse/share/examples/cvsup/www-supfile projects/fuse/sys/boot/fdt/dts/db88f78160.dts projects/fuse/sys/cam/scsi/scsi_low_pisa.c projects/fuse/sys/cam/scsi/scsi_low_pisa.h projects/fuse/sys/compat/netbsd/physio_proc.h projects/fuse/sys/contrib/pf/ projects/fuse/sys/netinet/ipfw/ projects/fuse/tools/diag/ac/ projects/fuse/tools/tools/backout_commit/ projects/fuse/tools/tools/mfc/ Modified: projects/fuse/MAINTAINERS (contents, props changed) projects/fuse/Makefile projects/fuse/Makefile.inc1 projects/fuse/ObsoleteFiles.inc projects/fuse/UPDATING projects/fuse/bin/sh/cd.c projects/fuse/bin/sh/eval.c projects/fuse/bin/sh/histedit.c projects/fuse/bin/sh/jobs.c projects/fuse/bin/sh/main.c projects/fuse/bin/sh/options.c projects/fuse/bin/sh/sh.1 projects/fuse/bin/sh/var.c projects/fuse/cddl/contrib/opensolaris/cmd/zfs/zfs.8 projects/fuse/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c projects/fuse/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c projects/fuse/cddl/contrib/opensolaris/cmd/ztest/ztest.c projects/fuse/cddl/contrib/opensolaris/lib/libuutil/common/uu_misc.c projects/fuse/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c projects/fuse/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h projects/fuse/cddl/lib/libzpool/Makefile projects/fuse/cddl/usr.bin/ztest/Makefile projects/fuse/cddl/usr.sbin/zdb/Makefile projects/fuse/cddl/usr.sbin/zhack/Makefile projects/fuse/contrib/bsnmp/snmpd/main.c projects/fuse/contrib/bsnmp/snmpd/trans_lsock.c projects/fuse/contrib/bsnmp/snmpd/trans_udp.c projects/fuse/contrib/byacc/CHANGES projects/fuse/contrib/byacc/VERSION projects/fuse/contrib/byacc/defs.h projects/fuse/contrib/byacc/lr0.c projects/fuse/contrib/byacc/main.c projects/fuse/contrib/byacc/mkpar.c projects/fuse/contrib/byacc/output.c projects/fuse/contrib/byacc/package/byacc.spec projects/fuse/contrib/byacc/package/debian/changelog projects/fuse/contrib/byacc/reader.c projects/fuse/contrib/byacc/symtab.c projects/fuse/contrib/byacc/verbose.c projects/fuse/contrib/bzip2/FREEBSD-Xlist projects/fuse/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp projects/fuse/contrib/sendmail/include/libmilter/mfapi.h projects/fuse/contrib/tzdata/africa projects/fuse/contrib/tzdata/antarctica projects/fuse/contrib/tzdata/asia projects/fuse/contrib/tzdata/australasia projects/fuse/contrib/tzdata/backward projects/fuse/contrib/tzdata/etcetera projects/fuse/contrib/tzdata/europe projects/fuse/contrib/tzdata/factory projects/fuse/contrib/tzdata/leapseconds projects/fuse/contrib/tzdata/northamerica projects/fuse/contrib/tzdata/pacificnew projects/fuse/contrib/tzdata/southamerica projects/fuse/contrib/tzdata/systemv projects/fuse/contrib/tzdata/yearistype.sh projects/fuse/contrib/tzdata/zone.tab projects/fuse/crypto/openssl/crypto/opensslv.h projects/fuse/etc/rc.d/FILESYSTEMS projects/fuse/etc/rc.d/Makefile projects/fuse/etc/rc.d/addswap projects/fuse/etc/rc.d/amd projects/fuse/etc/rc.d/cleanvar projects/fuse/etc/rc.d/cron projects/fuse/etc/rc.d/dmesg projects/fuse/etc/rc.d/ftpd projects/fuse/etc/rc.d/inetd projects/fuse/etc/rc.d/ipmon projects/fuse/etc/rc.d/jail projects/fuse/etc/rc.d/ldconfig projects/fuse/etc/rc.d/mixer projects/fuse/etc/rc.d/mountcritremote projects/fuse/etc/rc.d/moused projects/fuse/etc/rc.d/mrouted projects/fuse/etc/rc.d/named projects/fuse/etc/rc.d/netif projects/fuse/etc/rc.d/newsyslog projects/fuse/etc/rc.d/ntpd projects/fuse/etc/rc.d/pflog projects/fuse/etc/rc.d/postrandom projects/fuse/etc/rc.d/power_profile projects/fuse/etc/rc.d/random projects/fuse/etc/rc.d/rarpd projects/fuse/etc/rc.d/resolv projects/fuse/etc/rc.d/sendmail projects/fuse/etc/rc.d/sshd projects/fuse/etc/rc.d/syslogd projects/fuse/etc/rc.d/utx projects/fuse/etc/rc.d/var projects/fuse/etc/rc.d/watchdogd projects/fuse/include/Makefile projects/fuse/include/mqueue.h projects/fuse/include/time.h projects/fuse/include/unistd.h projects/fuse/lib/libc/gen/rand48.3 projects/fuse/lib/libc/stdio/scanf_l.3 projects/fuse/lib/libc/stdlib/ptsname.3 projects/fuse/lib/libc/stdlib/ptsname.c projects/fuse/lib/libc/stdlib/random.3 projects/fuse/lib/libc/stdlib/realpath.c projects/fuse/lib/libc/sys/recv.2 projects/fuse/lib/libfetch/Makefile projects/fuse/lib/libfetch/file.c projects/fuse/lib/libfetch/http.c projects/fuse/lib/libkvm/kvm_i386.c projects/fuse/lib/libmagic/Makefile projects/fuse/lib/libmagic/config.h projects/fuse/lib/libpam/modules/pam_lastlog/pam_lastlog.8 projects/fuse/lib/libutil/humanize_number.c projects/fuse/lib/msun/i387/s_cos.S projects/fuse/lib/msun/i387/s_sin.S projects/fuse/lib/msun/i387/s_tan.S projects/fuse/lib/msun/man/cexp.3 projects/fuse/libexec/comsat/comsat.8 projects/fuse/libexec/ftpd/ftpd.8 projects/fuse/release/doc/de_DE.ISO8859-1/early-adopter/article.sgml projects/fuse/release/doc/de_DE.ISO8859-1/errata/article.sgml projects/fuse/release/doc/de_DE.ISO8859-1/hardware/alpha/article.sgml projects/fuse/release/doc/de_DE.ISO8859-1/hardware/i386/article.sgml projects/fuse/release/doc/de_DE.ISO8859-1/hardware/ia64/article.sgml projects/fuse/release/doc/de_DE.ISO8859-1/hardware/pc98/article.sgml projects/fuse/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.sgml projects/fuse/release/doc/de_DE.ISO8859-1/installation/alpha/article.sgml projects/fuse/release/doc/de_DE.ISO8859-1/installation/common/install.sgml projects/fuse/release/doc/de_DE.ISO8859-1/installation/common/layout.sgml projects/fuse/release/doc/de_DE.ISO8859-1/installation/i386/article.sgml projects/fuse/release/doc/de_DE.ISO8859-1/installation/ia64/article.sgml projects/fuse/release/doc/de_DE.ISO8859-1/installation/pc98/article.sgml projects/fuse/release/doc/de_DE.ISO8859-1/installation/sparc64/article.sgml projects/fuse/release/doc/de_DE.ISO8859-1/readme/article.sgml projects/fuse/release/doc/de_DE.ISO8859-1/relnotes/alpha/article.sgml projects/fuse/release/doc/de_DE.ISO8859-1/relnotes/i386/article.sgml projects/fuse/release/doc/de_DE.ISO8859-1/relnotes/ia64/article.sgml projects/fuse/release/doc/de_DE.ISO8859-1/relnotes/pc98/article.sgml projects/fuse/release/doc/de_DE.ISO8859-1/relnotes/sparc64/article.sgml projects/fuse/release/doc/en_US.ISO8859-1/errata/article.sgml projects/fuse/release/doc/en_US.ISO8859-1/hardware/article.sgml projects/fuse/release/doc/en_US.ISO8859-1/readme/article.sgml projects/fuse/release/doc/en_US.ISO8859-1/relnotes/article.sgml projects/fuse/release/doc/fr_FR.ISO8859-1/early-adopter/article.sgml projects/fuse/release/doc/fr_FR.ISO8859-1/errata/article.sgml projects/fuse/release/doc/fr_FR.ISO8859-1/hardware/alpha/article.sgml projects/fuse/release/doc/fr_FR.ISO8859-1/hardware/common/dev.sgml projects/fuse/release/doc/fr_FR.ISO8859-1/hardware/i386/article.sgml projects/fuse/release/doc/fr_FR.ISO8859-1/hardware/ia64/article.sgml projects/fuse/release/doc/fr_FR.ISO8859-1/hardware/pc98/article.sgml projects/fuse/release/doc/fr_FR.ISO8859-1/hardware/sparc64/article.sgml projects/fuse/release/doc/fr_FR.ISO8859-1/installation/alpha/article.sgml projects/fuse/release/doc/fr_FR.ISO8859-1/installation/common/install.sgml projects/fuse/release/doc/fr_FR.ISO8859-1/installation/common/layout.sgml projects/fuse/release/doc/fr_FR.ISO8859-1/installation/common/trouble.sgml projects/fuse/release/doc/fr_FR.ISO8859-1/installation/common/upgrade.sgml projects/fuse/release/doc/fr_FR.ISO8859-1/installation/i386/article.sgml projects/fuse/release/doc/fr_FR.ISO8859-1/installation/pc98/article.sgml projects/fuse/release/doc/fr_FR.ISO8859-1/installation/sparc64/article.sgml projects/fuse/release/doc/fr_FR.ISO8859-1/installation/sparc64/install.sgml projects/fuse/release/doc/fr_FR.ISO8859-1/relnotes/alpha/article.sgml projects/fuse/release/doc/fr_FR.ISO8859-1/relnotes/common/new.sgml projects/fuse/release/doc/fr_FR.ISO8859-1/relnotes/i386/article.sgml projects/fuse/release/generate-release.sh projects/fuse/sbin/fsck_ffs/fsck.h projects/fuse/sbin/fsck_ffs/fsutil.c projects/fuse/sbin/fsck_ffs/main.c projects/fuse/sbin/fsck_ffs/suj.c projects/fuse/sbin/geom/class/raid/graid.8 projects/fuse/sbin/ipfw/nat.c projects/fuse/sbin/pfctl/Makefile projects/fuse/share/examples/Makefile projects/fuse/share/examples/cvsup/cvs-supfile projects/fuse/share/examples/cvsup/refuse projects/fuse/share/examples/cvsup/refuse.README projects/fuse/share/examples/cvsup/stable-supfile projects/fuse/share/examples/diskless/README.BOOTP projects/fuse/share/examples/etc/make.conf projects/fuse/share/man/man3/Makefile projects/fuse/share/man/man3/queue.3 projects/fuse/share/man/man3/siginfo.3 projects/fuse/share/man/man3/sysexits.3 projects/fuse/share/man/man4/Makefile projects/fuse/share/man/man4/acpi.4 projects/fuse/share/man/man4/ip.4 projects/fuse/share/man/man5/Makefile projects/fuse/share/man/man5/make.conf.5 projects/fuse/share/man/man5/rc.conf.5 projects/fuse/share/man/man5/src.conf.5 projects/fuse/share/man/man7/hier.7 projects/fuse/share/man/man7/release.7 projects/fuse/share/man/man9/VFS.9 projects/fuse/share/man/man9/pfil.9 projects/fuse/share/misc/committers-doc.dot projects/fuse/share/misc/committers-ports.dot projects/fuse/share/misc/committers-src.dot projects/fuse/share/misc/organization.dot projects/fuse/share/mk/Makefile projects/fuse/share/mk/bsd.own.mk projects/fuse/share/mk/bsd.sys.mk projects/fuse/sys/amd64/amd64/pmap.c projects/fuse/sys/amd64/amd64/trap.c projects/fuse/sys/amd64/conf/GENERIC projects/fuse/sys/arm/arm/cpufunc.c projects/fuse/sys/arm/arm/identcpu.c projects/fuse/sys/arm/arm/pmap-v6.c projects/fuse/sys/arm/arm/pmap.c projects/fuse/sys/arm/arm/vm_machdep.c projects/fuse/sys/arm/broadcom/bcm2835/files.bcm2835 projects/fuse/sys/arm/conf/ARMADAXP projects/fuse/sys/arm/conf/BEAGLEBONE projects/fuse/sys/arm/conf/CNS11XXNAS projects/fuse/sys/arm/conf/DOCKSTAR projects/fuse/sys/arm/conf/EA3250 projects/fuse/sys/arm/conf/GUMSTIX-QEMU projects/fuse/sys/arm/conf/HL201 projects/fuse/sys/arm/conf/KB920X projects/fuse/sys/arm/conf/LN2410SBC projects/fuse/sys/arm/conf/PANDABOARD projects/fuse/sys/arm/conf/QILA9G20 projects/fuse/sys/arm/conf/RPI-B projects/fuse/sys/arm/conf/SAM9G20EK projects/fuse/sys/arm/conf/SAM9X25EK projects/fuse/sys/arm/conf/SHEEVAPLUG projects/fuse/sys/arm/conf/SN9G45 projects/fuse/sys/arm/conf/TS7800 projects/fuse/sys/arm/include/armreg.h projects/fuse/sys/arm/include/intr.h projects/fuse/sys/arm/mv/armadaxp/armadaxp.c projects/fuse/sys/arm/mv/common.c projects/fuse/sys/arm/mv/mpic.c projects/fuse/sys/arm/mv/mv_pci.c projects/fuse/sys/arm/mv/mvreg.h projects/fuse/sys/arm/mv/mvvar.h projects/fuse/sys/arm/mv/mvwin.h projects/fuse/sys/arm/mv/timer.c projects/fuse/sys/arm/tegra/common.c projects/fuse/sys/arm/tegra/std.tegra2 projects/fuse/sys/arm/tegra/tegra2_machdep.c projects/fuse/sys/arm/ti/cpsw/if_cpsw.c projects/fuse/sys/arm/ti/ti_scm.c projects/fuse/sys/boot/arm/uboot/Makefile projects/fuse/sys/boot/common/load_elf.c projects/fuse/sys/boot/common/module.c projects/fuse/sys/boot/common/part.c projects/fuse/sys/boot/i386/libi386/pxe.c projects/fuse/sys/boot/i386/libi386/pxe.h projects/fuse/sys/boot/i386/loader/conf.c projects/fuse/sys/boot/i386/loader/main.c projects/fuse/sys/boot/powerpc/uboot/Makefile projects/fuse/sys/boot/sparc64/loader/main.c projects/fuse/sys/boot/uboot/common/main.c projects/fuse/sys/boot/uboot/lib/Makefile projects/fuse/sys/boot/uboot/lib/devicename.c projects/fuse/sys/boot/uboot/lib/disk.c projects/fuse/sys/boot/uboot/lib/libuboot.h projects/fuse/sys/boot/zfs/zfs.c projects/fuse/sys/boot/zfs/zfsimpl.c projects/fuse/sys/cam/scsi/scsi_enc.c projects/fuse/sys/cam/scsi/scsi_low.c projects/fuse/sys/cam/scsi/scsi_low.h projects/fuse/sys/cddl/boot/zfs/zfsimpl.h projects/fuse/sys/cddl/compat/opensolaris/kern/opensolaris_cmn_err.c projects/fuse/sys/cddl/compat/opensolaris/sys/debug.h projects/fuse/sys/cddl/contrib/opensolaris/common/nvpair/fnvpair.c projects/fuse/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c projects/fuse/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c projects/fuse/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c projects/fuse/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c projects/fuse/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c projects/fuse/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c projects/fuse/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c projects/fuse/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c projects/fuse/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c projects/fuse/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c projects/fuse/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c projects/fuse/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c projects/fuse/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_synctask.c projects/fuse/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c projects/fuse/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c projects/fuse/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c projects/fuse/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c projects/fuse/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c projects/fuse/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c projects/fuse/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c projects/fuse/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c projects/fuse/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_debug.c projects/fuse/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c projects/fuse/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_rlock.c projects/fuse/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c projects/fuse/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c projects/fuse/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c projects/fuse/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c projects/fuse/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c projects/fuse/sys/cddl/contrib/opensolaris/uts/common/sys/debug.h projects/fuse/sys/compat/linux/linux_file.c projects/fuse/sys/conf/Makefile.amd64 projects/fuse/sys/conf/Makefile.arm projects/fuse/sys/conf/Makefile.powerpc projects/fuse/sys/conf/files projects/fuse/sys/conf/files.amd64 projects/fuse/sys/conf/files.i386 projects/fuse/sys/conf/kern.mk projects/fuse/sys/conf/kern.pre.mk projects/fuse/sys/conf/kmod.mk projects/fuse/sys/conf/newvers.sh projects/fuse/sys/conf/options.amd64 projects/fuse/sys/conf/options.i386 projects/fuse/sys/contrib/altq/altq/altq_cbq.c projects/fuse/sys/contrib/altq/altq/altq_hfsc.c projects/fuse/sys/contrib/altq/altq/altq_priq.c projects/fuse/sys/contrib/altq/altq/altq_subr.c projects/fuse/sys/dev/acpica/acpi_hpet.c projects/fuse/sys/dev/ahci/ahci.c projects/fuse/sys/dev/altera/jtag_uart/altera_jtag_uart_cons.c projects/fuse/sys/dev/ath/ath_hal/ah.c projects/fuse/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c projects/fuse/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c projects/fuse/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c projects/fuse/sys/dev/ath/ath_hal/ar5416/ar5416reg.h projects/fuse/sys/dev/ath/ath_hal/ar9002/ar9280.c projects/fuse/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c projects/fuse/sys/dev/ath/ath_rate/sample/sample.c projects/fuse/sys/dev/ath/if_ath.c projects/fuse/sys/dev/ath/if_ath_debug.h projects/fuse/sys/dev/ath/if_ath_tx.c projects/fuse/sys/dev/ath/if_ath_tx_ht.c projects/fuse/sys/dev/ath/if_athvar.h projects/fuse/sys/dev/buslogic/bt.c projects/fuse/sys/dev/ct/bshw_machdep.c projects/fuse/sys/dev/ct/ct.c projects/fuse/sys/dev/ct/ct_isa.c projects/fuse/sys/dev/ct/ct_machdep.h projects/fuse/sys/dev/ct/ctvar.h projects/fuse/sys/dev/cxgbe/common/common.h projects/fuse/sys/dev/cxgbe/firmware/t4fw_interface.h projects/fuse/sys/dev/cxgbe/osdep.h projects/fuse/sys/dev/cxgbe/t4_l2t.h projects/fuse/sys/dev/cxgbe/t4_main.c projects/fuse/sys/dev/cxgbe/tom/t4_ddp.c projects/fuse/sys/dev/drm2/drm_gem.c projects/fuse/sys/dev/drm2/i915/i915_drv.h projects/fuse/sys/dev/e1000/e1000_82575.c projects/fuse/sys/dev/e1000/e1000_ich8lan.c projects/fuse/sys/dev/fdt/fdt_common.c projects/fuse/sys/dev/fdt/fdt_common.h projects/fuse/sys/dev/fdt/fdt_pci.c projects/fuse/sys/dev/hwpmc/hwpmc_arm.c projects/fuse/sys/dev/hwpmc/hwpmc_x86.c projects/fuse/sys/dev/isci/scil/sati.c projects/fuse/sys/dev/isci/scil/sati_callbacks.h projects/fuse/sys/dev/isci/scil/sati_util.c projects/fuse/sys/dev/isci/scil/sati_write_buffer.c projects/fuse/sys/dev/isci/scil/sci_base_controller.h projects/fuse/sys/dev/isci/scil/sci_base_domain.h projects/fuse/sys/dev/isci/scil/sci_base_phy.h projects/fuse/sys/dev/isci/scil/sci_base_remote_device.h projects/fuse/sys/dev/isci/scil/scic_io_request.h projects/fuse/sys/dev/isci/scil/scic_sds_phy.c projects/fuse/sys/dev/isci/scil/scic_sds_port.h projects/fuse/sys/dev/isci/scil/scic_sds_remote_device.h projects/fuse/sys/dev/isci/scil/scic_sds_remote_node_context.h projects/fuse/sys/dev/isci/scil/scic_sds_request.c projects/fuse/sys/dev/isci/scil/scu_bios_definitions.h projects/fuse/sys/dev/isp/isp_freebsd.c projects/fuse/sys/dev/ixgbe/ixgbe.c projects/fuse/sys/dev/ixgbe/ixgbe_osdep.h projects/fuse/sys/dev/mps/mps_sas.c projects/fuse/sys/dev/ncv/ncr53c500.c projects/fuse/sys/dev/ncv/ncr53c500_pccard.c projects/fuse/sys/dev/ncv/ncr53c500hw.h projects/fuse/sys/dev/ncv/ncr53c500var.h projects/fuse/sys/dev/nsp/nsp.c projects/fuse/sys/dev/nsp/nsp_pccard.c projects/fuse/sys/dev/nsp/nspvar.h projects/fuse/sys/dev/pci/pcireg.h projects/fuse/sys/dev/random/ivy.c projects/fuse/sys/dev/random/probe.c projects/fuse/sys/dev/stg/tmc18c30.c projects/fuse/sys/dev/stg/tmc18c30_isa.c projects/fuse/sys/dev/stg/tmc18c30_pccard.c projects/fuse/sys/dev/stg/tmc18c30_pci.c projects/fuse/sys/dev/stg/tmc18c30_subr.c projects/fuse/sys/dev/stg/tmc18c30var.h projects/fuse/sys/dev/usb/controller/at91dci.c projects/fuse/sys/dev/usb/controller/at91dci_atmelarm.c projects/fuse/sys/dev/usb/controller/dwc_otg.c projects/fuse/sys/dev/usb/controller/dwc_otg.h projects/fuse/sys/dev/usb/controller/dwc_otgreg.h projects/fuse/sys/dev/usb/controller/usb_controller.c projects/fuse/sys/dev/usb/serial/ufoma.c projects/fuse/sys/dev/virtio/virtio.h projects/fuse/sys/dev/virtio/virtqueue.c projects/fuse/sys/dev/vxge/include/vxgehal-ll.h projects/fuse/sys/dev/xen/netback/netback_unit_tests.c projects/fuse/sys/fs/deadfs/dead_vnops.c projects/fuse/sys/fs/devfs/devfs_int.h projects/fuse/sys/fs/ext2fs/ext2_inode.c projects/fuse/sys/fs/nandfs/bmap.c projects/fuse/sys/fs/nfs/nfs_commonport.c projects/fuse/sys/fs/nfs/nfscl.h projects/fuse/sys/fs/nfsclient/nfs_clrpcops.c projects/fuse/sys/fs/ntfs/ntfs_vfsops.c projects/fuse/sys/fs/nullfs/null.h projects/fuse/sys/fs/nullfs/null_subr.c projects/fuse/sys/fs/nullfs/null_vfsops.c projects/fuse/sys/fs/nullfs/null_vnops.c projects/fuse/sys/geom/mirror/g_mirror.c projects/fuse/sys/geom/raid/g_raid.c projects/fuse/sys/geom/raid/g_raid.h projects/fuse/sys/geom/raid/md_ddf.c projects/fuse/sys/geom/raid/md_intel.c projects/fuse/sys/geom/raid/md_jmicron.c projects/fuse/sys/geom/raid/md_nvidia.c projects/fuse/sys/geom/raid/md_promise.c projects/fuse/sys/geom/raid/md_sii.c projects/fuse/sys/geom/raid/tr_concat.c projects/fuse/sys/geom/raid/tr_raid0.c projects/fuse/sys/geom/raid/tr_raid1.c projects/fuse/sys/geom/raid/tr_raid1e.c projects/fuse/sys/geom/raid/tr_raid5.c projects/fuse/sys/geom/raid3/g_raid3.c projects/fuse/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c projects/fuse/sys/i386/conf/GENERIC projects/fuse/sys/i386/i386/pmap.c projects/fuse/sys/i386/i386/trap.c projects/fuse/sys/i386/include/xen/xen-os.h projects/fuse/sys/i386/xen/pmap.c projects/fuse/sys/ia64/ia32/ia32_trap.c projects/fuse/sys/ia64/ia64/trap.c projects/fuse/sys/kern/kern_condvar.c projects/fuse/sys/kern/kern_exit.c projects/fuse/sys/kern/kern_fork.c projects/fuse/sys/kern/kern_lock.c projects/fuse/sys/kern/kern_mutex.c projects/fuse/sys/kern/kern_rmlock.c projects/fuse/sys/kern/kern_rwlock.c projects/fuse/sys/kern/kern_sig.c projects/fuse/sys/kern/kern_sx.c projects/fuse/sys/kern/kern_thread.c projects/fuse/sys/kern/sched_ule.c projects/fuse/sys/kern/subr_sleepqueue.c projects/fuse/sys/kern/subr_syscall.c projects/fuse/sys/kern/subr_trap.c projects/fuse/sys/kern/subr_turnstile.c projects/fuse/sys/kern/subr_unit.c projects/fuse/sys/kern/vfs_lookup.c projects/fuse/sys/kern/vfs_mount.c projects/fuse/sys/kern/vfs_subr.c projects/fuse/sys/libkern/jenkins_hash.c projects/fuse/sys/mips/mips/pmap.c projects/fuse/sys/mips/mips/trap.c projects/fuse/sys/modules/Makefile projects/fuse/sys/modules/cxgbe/firmware/Makefile projects/fuse/sys/modules/dummynet/Makefile projects/fuse/sys/modules/ipfw/Makefile projects/fuse/sys/modules/ipfw_nat/Makefile projects/fuse/sys/modules/pf/Makefile projects/fuse/sys/modules/pflog/Makefile projects/fuse/sys/modules/pfsync/Makefile projects/fuse/sys/modules/scsi_low/Makefile projects/fuse/sys/net/if.c projects/fuse/sys/net80211/ieee80211_mesh.c projects/fuse/sys/net80211/ieee80211_node.c projects/fuse/sys/netgraph/ng_ipfw.c projects/fuse/sys/netinet/in_gif.c projects/fuse/sys/netinet/ip_icmp.c projects/fuse/sys/netinet/raw_ip.c projects/fuse/sys/netinet/sctp_asconf.c projects/fuse/sys/netinet/sctp_input.c projects/fuse/sys/netinet/sctp_pcb.c projects/fuse/sys/netinet/sctputil.c projects/fuse/sys/netinet/tcp_subr.c projects/fuse/sys/netinet6/icmp6.c projects/fuse/sys/netinet6/in6_gif.c projects/fuse/sys/netipsec/ipsec_input.c projects/fuse/sys/netipsec/ipsec_output.c projects/fuse/sys/netipsec/key.c projects/fuse/sys/netipsec/xform_ipip.c projects/fuse/sys/powerpc/aim/trap.c projects/fuse/sys/powerpc/booke/trap.c projects/fuse/sys/powerpc/wii/wii_bus.c projects/fuse/sys/sparc64/sparc64/ata_machdep.c projects/fuse/sys/sparc64/sparc64/trap.c projects/fuse/sys/sys/cdefs.h projects/fuse/sys/sys/mbuf.h projects/fuse/sys/sys/mount.h projects/fuse/sys/sys/param.h projects/fuse/sys/sys/queue.h projects/fuse/sys/vm/vm_pageout.c projects/fuse/tools/build/Makefile projects/fuse/tools/diag/README projects/fuse/tools/kerneldoc/subsys/common-Doxyfile projects/fuse/tools/test/hwpmc/pmctest.py projects/fuse/tools/tools/README projects/fuse/tools/tools/ath/athratestats/Makefile projects/fuse/tools/tools/ath/athratestats/main.c projects/fuse/usr.bin/Makefile projects/fuse/usr.bin/calendar/calendars/calendar.freebsd projects/fuse/usr.bin/chat/chat.8 projects/fuse/usr.bin/fetch/Makefile projects/fuse/usr.bin/find/find.1 projects/fuse/usr.bin/finger/finger.1 projects/fuse/usr.bin/last/last.1 projects/fuse/usr.bin/last/last.c projects/fuse/usr.bin/lex/NEWS projects/fuse/usr.bin/mkcsmapper/lex.l projects/fuse/usr.bin/mkesdb/lex.l projects/fuse/usr.bin/ncplist/ncplist.1 projects/fuse/usr.bin/netstat/if.c projects/fuse/usr.bin/printf/printf.c projects/fuse/usr.bin/procstat/procstat_auxv.c projects/fuse/usr.bin/rctl/rctl.8 projects/fuse/usr.bin/sort/sort.1.in projects/fuse/usr.bin/stdbuf/Makefile projects/fuse/usr.bin/talk/talk.1 projects/fuse/usr.bin/truss/amd64-fbsd.c projects/fuse/usr.bin/truss/amd64-fbsd32.c projects/fuse/usr.bin/truss/amd64-linux32.c projects/fuse/usr.bin/truss/i386-fbsd.c projects/fuse/usr.bin/truss/i386-linux.c projects/fuse/usr.bin/truss/ia64-fbsd.c projects/fuse/usr.bin/truss/main.c projects/fuse/usr.bin/truss/mips-fbsd.c projects/fuse/usr.bin/truss/powerpc-fbsd.c projects/fuse/usr.bin/truss/powerpc64-fbsd.c projects/fuse/usr.bin/truss/setup.c projects/fuse/usr.bin/truss/sparc64-fbsd.c projects/fuse/usr.bin/truss/syscalls.c projects/fuse/usr.bin/truss/truss.h projects/fuse/usr.bin/users/users.1 projects/fuse/usr.bin/w/w.1 projects/fuse/usr.bin/xlint/lint1/makeman projects/fuse/usr.sbin/ac/ac.8 projects/fuse/usr.sbin/adduser/adduser.8 projects/fuse/usr.sbin/authpf/Makefile projects/fuse/usr.sbin/bsdconfig/networking/include/media.subr projects/fuse/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_scalars.c projects/fuse/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_swrun_tbl.c projects/fuse/usr.sbin/bsnmpd/modules/snmp_pf/BEGEMOT-PF-MIB.txt projects/fuse/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c projects/fuse/usr.sbin/bsnmpd/modules/snmp_pf/pf_tree.def projects/fuse/usr.sbin/ftp-proxy/ftp-proxy/Makefile projects/fuse/usr.sbin/jail/jail.8 projects/fuse/usr.sbin/lpr/lpd/printjob.c projects/fuse/usr.sbin/pciconf/cap.c projects/fuse/usr.sbin/pciconf/err.c projects/fuse/usr.sbin/pkg_install/add/add.h projects/fuse/usr.sbin/pkg_install/add/extract.c projects/fuse/usr.sbin/pkg_install/add/futil.c projects/fuse/usr.sbin/pkg_install/add/perform.c projects/fuse/usr.sbin/pkg_install/lib/lib.h projects/fuse/usr.sbin/ppp/ppp.8.m4 projects/fuse/usr.sbin/rpc.lockd/lockd_lock.c projects/fuse/usr.sbin/rwhod/rwhod.8 projects/fuse/usr.sbin/syslogd/syslog.conf.5 projects/fuse/usr.sbin/syslogd/syslogd.c projects/fuse/usr.sbin/tcpdump/tcpdump/tcpdump.1 projects/fuse/usr.sbin/timed/timed/timed.c Directory Properties: projects/fuse/ (props changed) projects/fuse/cddl/contrib/opensolaris/ (props changed) projects/fuse/cddl/contrib/opensolaris/cmd/zfs/ (props changed) projects/fuse/cddl/contrib/opensolaris/lib/libzfs/ (props changed) projects/fuse/contrib/byacc/ (props changed) projects/fuse/contrib/bzip2/ (props changed) projects/fuse/contrib/llvm/ (props changed) projects/fuse/contrib/pf/ (props changed) projects/fuse/contrib/sendmail/ (props changed) projects/fuse/contrib/tzdata/ (props changed) projects/fuse/crypto/openssl/ (props changed) projects/fuse/lib/libc/ (props changed) projects/fuse/lib/libutil/ (props changed) projects/fuse/sbin/ (props changed) projects/fuse/sbin/ipfw/ (props changed) projects/fuse/share/man/man4/ (props changed) projects/fuse/sys/ (props changed) projects/fuse/sys/boot/ (props changed) projects/fuse/sys/cddl/contrib/opensolaris/ (props changed) projects/fuse/sys/conf/ (props changed) projects/fuse/usr.bin/calendar/ (props changed) projects/fuse/usr.bin/procstat/ (props changed) projects/fuse/usr.sbin/jail/ (props changed) Modified: projects/fuse/MAINTAINERS ============================================================================== --- projects/fuse/MAINTAINERS Mon Sep 17 03:17:42 2012 (r240592) +++ projects/fuse/MAINTAINERS Mon Sep 17 03:21:17 2012 (r240593) @@ -3,7 +3,7 @@ $FreeBSD$ Please note that the content of this file is strictly advisory. No locks listed here are valid. The only strict review requirements are granted by core. These are documented in head/LOCKS and enforced -by CVSROOT/approvers. +by svnadmin/conf/approvers. The source tree is a community effort. However, some folks go to the trouble of looking after particular areas of the tree. In return for Modified: projects/fuse/Makefile ============================================================================== --- projects/fuse/Makefile Mon Sep 17 03:17:42 2012 (r240592) +++ projects/fuse/Makefile Mon Sep 17 03:21:17 2012 (r240593) @@ -216,7 +216,7 @@ ${TGTS}: .MAIN: all STARTTIME!= LC_ALL=C date -CHECK_TIME!= find ${.CURDIR}/sys/sys/param.h -mtime -0s +CHECK_TIME!= find ${.CURDIR}/sys/sys/param.h -mtime -0s ; echo .if !empty(CHECK_TIME) .error check your date/time: ${STARTTIME} .endif Modified: projects/fuse/Makefile.inc1 ============================================================================== --- projects/fuse/Makefile.inc1 Mon Sep 17 03:17:42 2012 (r240592) +++ projects/fuse/Makefile.inc1 Mon Sep 17 03:21:17 2012 (r240593) @@ -46,6 +46,7 @@ TARGET_ARCH=${TARGET} .include .include +.include # We must do share/info early so that installation of info `dir' # entries works correctly. Do it first since it is less likely to @@ -235,7 +236,8 @@ BMAKEENV= INSTALL="sh ${.CURDIR}/tools/i PATH=${BPATH}:${PATH} \ WORLDTMP=${WORLDTMP} \ VERSION="${VERSION}" \ - MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" + MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" \ + COMPILER_TYPE=${COMPILER_TYPE} BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \ ${BMAKEENV} ${MAKE} -f Makefile.inc1 \ DESTDIR= \ @@ -270,6 +272,16 @@ WMAKEENV= ${CROSSENV} \ .if ${MK_CDDL} == "no" WMAKEENV+= NO_CTF=1 .endif +.if ${CC:T:Mgcc} == "gcc" +WMAKE_COMPILER_TYPE= gcc +.elif ${CC:T:Mclang} == "clang" +WMAKE_COMPILER_TYPE= clang +.elif ${MK_CLANG_IS_CC} == "no" +WMAKE_COMPILER_TYPE= gcc +.else +WMAKE_COMPILER_TYPE= clang +.endif +WMAKEENV+= COMPILER_TYPE=${WMAKE_COMPILER_TYPE} WMAKE= ${WMAKEENV} ${MAKE} -f Makefile.inc1 DESTDIR=${WORLDTMP} .if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" @@ -313,7 +325,8 @@ LIB32WMAKEENV+= MAKEOBJDIRPREFIX=${OBJTR CC="${CC} ${LIB32FLAGS}" \ CXX="${CXX} ${LIB32FLAGS}" \ LIBDIR=/usr/lib32 \ - SHLIBDIR=/usr/lib32 + SHLIBDIR=/usr/lib32 \ + COMPILER_TYPE=${WMAKE_COMPILER_TYPE} LIB32WMAKE= ${LIB32WMAKEENV} ${MAKE} -DNO_CPU_CFLAGS -DCOMPAT_32BIT \ -DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_INFO \ @@ -1558,7 +1571,7 @@ DTBOUTPUTPATH= ${KRNLOBJDIR}/${KERNCONF} .if !defined(FDT_DTS_FILE) || empty(FDT_DTS_FILE) .if exists(${KERNCONFDIR}/${KERNCONF}) FDT_DTS_FILE!= awk 'BEGIN {FS="="} /^makeoptions[[:space:]]+FDT_DTS_FILE/ {print $$2}' \ - ${KERNCONFDIR}/${KERNCONF} + ${KERNCONFDIR}/${KERNCONF} ; echo .endif .endif Modified: projects/fuse/ObsoleteFiles.inc ============================================================================== --- projects/fuse/ObsoleteFiles.inc Mon Sep 17 03:17:42 2012 (r240592) +++ projects/fuse/ObsoleteFiles.inc Mon Sep 17 03:21:17 2012 (r240593) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20120908: pf cleanup +OLD_FILES+=usr/include/net/if_pflow.h # 20120816: new clang import which bumps version from 3.1 to 3.2 OLD_FILES+=usr/bin/llvm-ld OLD_FILES+=usr/bin/llvm-stub Modified: projects/fuse/UPDATING ============================================================================== --- projects/fuse/UPDATING Mon Sep 17 03:17:42 2012 (r240592) +++ projects/fuse/UPDATING Mon Sep 17 03:21:17 2012 (r240593) @@ -24,6 +24,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20120908: + The pf(4) packet filter ABI has been changed. pfctl(8) and + snmp_pf module need to be recompiled to work with new kernel. + 20120828: A new ZFS feature flag "com.delphix:empty_bpobj" has been merged to -HEAD. Pools that have empty_bpobj in active state can not be Modified: projects/fuse/bin/sh/cd.c ============================================================================== --- projects/fuse/bin/sh/cd.c Mon Sep 17 03:17:42 2012 (r240592) +++ projects/fuse/bin/sh/cd.c Mon Sep 17 03:21:17 2012 (r240593) @@ -79,7 +79,7 @@ static char *prevdir; /* previous worki static char *cdcomppath; int -cdcmd(int argc, char **argv) +cdcmd(int argc __unused, char **argv __unused) { const char *dest; const char *path; @@ -89,9 +89,8 @@ cdcmd(int argc, char **argv) int rc; int errno1 = ENOENT; - optreset = 1; optind = 1; opterr = 0; /* initialize getopt */ phys = Pflag; - while ((ch = getopt(argc, argv, "eLP")) != -1) { + while ((ch = nextopt("eLP")) != '\0') { switch (ch) { case 'e': getcwderr = 1; @@ -102,18 +101,13 @@ cdcmd(int argc, char **argv) case 'P': phys = 1; break; - default: - error("unknown option: -%c", optopt); - break; } } - argc -= optind; - argv += optind; - if (argc > 1) + if (*argptr != NULL && argptr[1] != NULL) error("too many arguments"); - if ((dest = *argv) == NULL && (dest = bltinlookup("HOME", 1)) == NULL) + if ((dest = *argptr) == NULL && (dest = bltinlookup("HOME", 1)) == NULL) error("HOME not set"); if (*dest == '\0') dest = "."; @@ -330,14 +324,13 @@ updatepwd(char *dir) } int -pwdcmd(int argc, char **argv) +pwdcmd(int argc __unused, char **argv __unused) { char *p; int ch, phys; - optreset = 1; optind = 1; opterr = 0; /* initialize getopt */ phys = Pflag; - while ((ch = getopt(argc, argv, "LP")) != -1) { + while ((ch = nextopt("LP")) != '\0') { switch (ch) { case 'L': phys = 0; @@ -345,15 +338,10 @@ pwdcmd(int argc, char **argv) case 'P': phys = 1; break; - default: - error("unknown option: -%c", optopt); - break; } } - argc -= optind; - argv += optind; - if (argc != 0) + if (*argptr != NULL) error("too many arguments"); if (!phys && getpwd()) { Modified: projects/fuse/bin/sh/eval.c ============================================================================== --- projects/fuse/bin/sh/eval.c Mon Sep 17 03:17:42 2012 (r240592) +++ projects/fuse/bin/sh/eval.c Mon Sep 17 03:21:17 2012 (r240593) @@ -1223,7 +1223,7 @@ breakcmd(int argc, char **argv) * The `command' command. */ int -commandcmd(int argc, char **argv) +commandcmd(int argc __unused, char **argv __unused) { const char *path; int ch; @@ -1231,9 +1231,7 @@ commandcmd(int argc, char **argv) path = bltinlookup("PATH", 1); - optind = optreset = 1; - opterr = 0; - while ((ch = getopt(argc, argv, "pvV")) != -1) { + while ((ch = nextopt("pvV")) != '\0') { switch (ch) { case 'p': path = _PATH_STDPATH; @@ -1244,20 +1242,15 @@ commandcmd(int argc, char **argv) case 'V': cmd = TYPECMD_BIGV; break; - case '?': - default: - error("unknown option: -%c", optopt); } } - argc -= optind; - argv += optind; if (cmd != -1) { - if (argc != 1) + if (*argptr == NULL || argptr[1] != NULL) error("wrong number of arguments"); - return typecmd_impl(2, argv - 1, cmd, path); + return typecmd_impl(2, argptr - 1, cmd, path); } - if (argc != 0) + if (*argptr != NULL) error("commandcmd bad call"); /* Modified: projects/fuse/bin/sh/histedit.c ============================================================================== --- projects/fuse/bin/sh/histedit.c Mon Sep 17 03:17:42 2012 (r240592) +++ projects/fuse/bin/sh/histedit.c Mon Sep 17 03:21:17 2012 (r240593) @@ -182,7 +182,7 @@ setterm(const char *term) } int -histcmd(int argc, char **argv) +histcmd(int argc, char **argv __unused) { int ch; const char *editor = NULL; @@ -206,13 +206,10 @@ histcmd(int argc, char **argv) if (argc == 1) error("missing history argument"); - optreset = 1; optind = 1; /* initialize getopt */ - opterr = 0; - while (not_fcnumber(argv[optind]) && - (ch = getopt(argc, argv, ":e:lnrs")) != -1) + while (not_fcnumber(*argptr) && (ch = nextopt("e:lnrs")) != '\0') switch ((char)ch) { case 'e': - editor = optarg; + editor = shoptarg; break; case 'l': lflg = 1; @@ -226,13 +223,7 @@ histcmd(int argc, char **argv) case 's': sflg = 1; break; - case ':': - error("option -%c expects argument", optopt); - case '?': - default: - error("unknown option: -%c", optopt); } - argc -= optind, argv += optind; savehandler = handler; /* @@ -276,31 +267,26 @@ histcmd(int argc, char **argv) /* * If executing, parse [old=new] now */ - if (lflg == 0 && argc > 0 && - ((repl = strchr(argv[0], '=')) != NULL)) { - pat = argv[0]; + if (lflg == 0 && *argptr != NULL && + ((repl = strchr(*argptr, '=')) != NULL)) { + pat = *argptr; *repl++ = '\0'; - argc--, argv++; + argptr++; } /* * determine [first] and [last] */ - switch (argc) { - case 0: + if (*argptr == NULL) { firststr = lflg ? "-16" : "-1"; laststr = "-1"; - break; - case 1: - firststr = argv[0]; - laststr = lflg ? "-1" : argv[0]; - break; - case 2: - firststr = argv[0]; - laststr = argv[1]; - break; - default: + } else if (argptr[1] == NULL) { + firststr = argptr[0]; + laststr = lflg ? "-1" : argptr[0]; + } else if (argptr[2] == NULL) { + firststr = argptr[0]; + laststr = argptr[1]; + } else error("too many arguments"); - } /* * Turn into event numbers. */ Modified: projects/fuse/bin/sh/jobs.c ============================================================================== --- projects/fuse/bin/sh/jobs.c Mon Sep 17 03:17:42 2012 (r240592) +++ projects/fuse/bin/sh/jobs.c Mon Sep 17 03:21:17 2012 (r240593) @@ -250,15 +250,13 @@ restartjob(struct job *jp) int -jobscmd(int argc, char *argv[]) +jobscmd(int argc __unused, char *argv[] __unused) { char *id; int ch, mode; - optind = optreset = 1; - opterr = 0; mode = SHOWJOBS_DEFAULT; - while ((ch = getopt(argc, argv, "lps")) != -1) { + while ((ch = nextopt("lps")) != '\0') { switch (ch) { case 'l': mode = SHOWJOBS_VERBOSE; @@ -269,18 +267,13 @@ jobscmd(int argc, char *argv[]) case 's': mode = SHOWJOBS_PIDS; break; - case '?': - default: - error("unknown option: -%c", optopt); } } - argc -= optind; - argv += optind; - if (argc == 0) + if (*argptr == NULL) showjobs(0, mode); else - while ((id = *argv++) != NULL) + while ((id = *argptr++) != NULL) showjob(getjob(id), mode); return (0); Modified: projects/fuse/bin/sh/main.c ============================================================================== --- projects/fuse/bin/sh/main.c Mon Sep 17 03:17:42 2012 (r240592) +++ projects/fuse/bin/sh/main.c Mon Sep 17 03:21:17 2012 (r240593) @@ -266,14 +266,7 @@ read_profile(char *name) void readcmdfile(const char *name) { - int fd; - - INTOFF; - if ((fd = open(name, O_RDONLY)) >= 0) - setinputfd(fd, 1); - else - error("cannot open %s: %s", name, strerror(errno)); - INTON; + setinputfile(name, 1); cmdloop(0); popfile(); } Modified: projects/fuse/bin/sh/options.c ============================================================================== --- projects/fuse/bin/sh/options.c Mon Sep 17 03:17:42 2012 (r240592) +++ projects/fuse/bin/sh/options.c Mon Sep 17 03:21:17 2012 (r240593) @@ -531,10 +531,6 @@ out: } /* - * XXX - should get rid of. have all builtins use getopt(3). the - * library getopt must have the BSD extension static variable "optreset" - * otherwise it can't be used within the shell safely. - * * Standard option processing (a la getopt) for builtin routines. The * only argument that is passed to nextopt is the option string; the * other arguments are unnecessary. It return the character, or '\0' on Modified: projects/fuse/bin/sh/sh.1 ============================================================================== --- projects/fuse/bin/sh/sh.1 Mon Sep 17 03:17:42 2012 (r240592) +++ projects/fuse/bin/sh/sh.1 Mon Sep 17 03:21:17 2012 (r240593) @@ -487,8 +487,9 @@ and backslash The backslash inside double quotes is historically weird. It remains literal unless it precedes the following characters, which it serves to quote: +.Pp .Bl -column "XXX" "XXX" "XXX" "XXX" "XXX" -offset center -compact -.It Li $ Ta Li ` Ta Li \&" Ta Li \e\ Ta Li \en +.It Li $ Ta Li ` Ta Li \&" Ta Li \e Ta Li \en .El .It Backslash A backslash preserves the literal meaning of the following Modified: projects/fuse/bin/sh/var.c ============================================================================== --- projects/fuse/bin/sh/var.c Mon Sep 17 03:17:42 2012 (r240592) +++ projects/fuse/bin/sh/var.c Mon Sep 17 03:21:17 2012 (r240593) @@ -640,10 +640,11 @@ showvarscmd(int argc __unused, char **ar */ int -exportcmd(int argc, char **argv) +exportcmd(int argc __unused, char **argv) { struct var **vpp; struct var *vp; + char **ap; char *name; char *p; char *cmdname; @@ -651,26 +652,19 @@ exportcmd(int argc, char **argv) int flag = argv[0][0] == 'r'? VREADONLY : VEXPORT; cmdname = argv[0]; - optreset = optind = 1; - opterr = 0; values = 0; - while ((ch = getopt(argc, argv, "p")) != -1) { + while ((ch = nextopt("p")) != '\0') { switch (ch) { case 'p': values = 1; break; - case '?': - default: - error("unknown option: -%c", optopt); } } - argc -= optind; - argv += optind; - if (values && argc != 0) + if (values && *argptr != NULL) error("-p requires no arguments"); - if (argc != 0) { - while ((name = *argv++) != NULL) { + if (*argptr != NULL) { + for (ap = argptr; (name = *ap) != NULL; ap++) { if ((p = strchr(name, '=')) != NULL) { p++; } else { Modified: projects/fuse/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- projects/fuse/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Mon Sep 17 03:17:42 2012 (r240592) +++ projects/fuse/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Mon Sep 17 03:21:17 2012 (r240593) @@ -137,17 +137,21 @@ .Fl a | Ar filesystem .Nm .Cm userspace -.Op Fl niHp +.Op Fl Hinp .Op Fl o Ar field Ns Op , Ns Ar ... -.Op Fl sS Ar field +.Op Fl s Ar field +.Ar ... +.Op Fl S Ar field .Ar ... .Op Fl t Ar type Ns Op , Ns Ar ... .Ar filesystem Ns | Ns Ar snapshot .Nm .Cm groupspace -.Op Fl niHp +.Op Fl Hinp .Op Fl o Ar field Ns Op , Ns Ar ... -.Op Fl sS Ar field +.Op Fl s Ar field +.Ar ... +.Op Fl S Ar field .Ar ... .Op Fl t Ar type Ns Op , Ns Ar ... .Ar filesystem Ns | Ns Ar snapshot @@ -1987,9 +1991,11 @@ Upgrade the specified file system. .It Xo .Nm .Cm userspace -.Op Fl niHp +.Op Fl Hinp .Op Fl o Ar field Ns Op , Ns Ar ... -.Op Fl sS Ar field +.Op Fl s Ar field +.Ar ... +.Op Fl S Ar field .Ar ... .Op Fl t Ar type Ns Op , Ns Ar ... .Ar filesystem Ns | Ns Ar snapshot @@ -2007,9 +2013,9 @@ Print numeric ID instead of user/group n .It Fl H Do not print headers, use tab-delimited output. .It Fl p -Use exact (parseable) numeric output. +Use exact (parsable) numeric output. .It Fl o Ar field Ns Op , Ns Ar ... -Display only the specified fields from the following set, +Display only the specified fields from the following set: .Sy type,name,used,quota . The default is to display all fields. .It Fl s Ar field @@ -2024,7 +2030,7 @@ another. The default is Sort by this field in reverse order. See .Fl s . .It Fl t Ar type Ns Op , Ns Ar ... -Print only the specified types from the following set, +Print only the specified types from the following set: .Sy all,posixuser,smbuser,posixgroup,smbgroup . .Pp The default is @@ -2038,9 +2044,11 @@ Translate SID to POSIX ID. This flag cur .It Xo .Nm .Cm groupspace -.Op Fl niHp +.Op Fl Hinp .Op Fl o Ar field Ns Op , Ns Ar ... -.Op Fl sS Ar field +.Op Fl s Ar field +.Ar ... +.Op Fl S Ar field .Ar ... .Op Fl t Ar type Ns Op , Ns Ar ... .Ar filesystem Ns | Ns Ar snapshot Modified: projects/fuse/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- projects/fuse/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Mon Sep 17 03:17:42 2012 (r240592) +++ projects/fuse/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Mon Sep 17 03:21:17 2012 (r240593) @@ -304,13 +304,13 @@ get_usage(zfs_help_t idx) "\tunallow [-r] -s @setname [[,...]] " "\n")); case HELP_USERSPACE: - return (gettext("\tuserspace [-niHp] [-o field[,...]] " - "[-sS field] ... [-t type[,...]]\n" - "\t \n")); + return (gettext("\tuserspace [-Hinp] [-o field[,...]] " + "[-s field] ...\n\t[-S field] ... " + "[-t type[,...]] \n")); case HELP_GROUPSPACE: - return (gettext("\tgroupspace [-niHp] [-o field[,...]] " - "[-sS field] ... [-t type[,...]]\n" - "\t \n")); + return (gettext("\tgroupspace [-Hinp] [-o field[,...]] " + "[-s field] ...\n\t[-S field] ... " + "[-t type[,...]] \n")); case HELP_HOLD: return (gettext("\thold [-r] ...\n")); case HELP_HOLDS: @@ -2068,30 +2068,52 @@ zfs_do_upgrade(int argc, char **argv) return (ret); } -#define USTYPE_USR_BIT (0) -#define USTYPE_GRP_BIT (1) -#define USTYPE_PSX_BIT (2) -#define USTYPE_SMB_BIT (3) - -#define USTYPE_USR (1 << USTYPE_USR_BIT) -#define USTYPE_GRP (1 << USTYPE_GRP_BIT) - -#define USTYPE_PSX (1 << USTYPE_PSX_BIT) -#define USTYPE_SMB (1 << USTYPE_SMB_BIT) - -#define USTYPE_PSX_USR (USTYPE_PSX | USTYPE_USR) -#define USTYPE_SMB_USR (USTYPE_SMB | USTYPE_USR) -#define USTYPE_PSX_GRP (USTYPE_PSX | USTYPE_GRP) -#define USTYPE_SMB_GRP (USTYPE_SMB | USTYPE_GRP) -#define USTYPE_ALL (USTYPE_PSX_USR | USTYPE_SMB_USR \ - | USTYPE_PSX_GRP | USTYPE_SMB_GRP) +/* + * zfs userspace [-Hinp] [-o field[,...]] [-s field [-s field]...] + * [-S field [-S field]...] [-t type[,...]] filesystem | snapshot + * zfs groupspace [-Hinp] [-o field[,...]] [-s field [-s field]...] + * [-S field [-S field]...] [-t type[,...]] filesystem | snapshot + * + * -H Scripted mode; elide headers and separate columns by tabs. + * -i Translate SID to POSIX ID. + * -n Print numeric ID instead of user/group name. + * -o Control which fields to display. + * -p Use exact (parseable) numeric output. + * -s Specify sort columns, descending order. + * -S Specify sort columns, ascending order. + * -t Control which object types to display. + * + * Displays space consumed by, and quotas on, each user in the specified + * filesystem or snapshot. + */ +/* us_field_types, us_field_hdr and us_field_names should be kept in sync */ +enum us_field_types { + USFIELD_TYPE, + USFIELD_NAME, + USFIELD_USED, + USFIELD_QUOTA +}; +static char *us_field_hdr[] = { "TYPE", "NAME", "USED", "QUOTA" }; +static char *us_field_names[] = { "type", "name", "used", "quota" }; +#define USFIELD_LAST (sizeof (us_field_names) / sizeof (char *)) -#define USPROP_USED_BIT (0) -#define USPROP_QUOTA_BIT (1) +#define USTYPE_PSX_GRP (1 << 0) +#define USTYPE_PSX_USR (1 << 1) +#define USTYPE_SMB_GRP (1 << 2) +#define USTYPE_SMB_USR (1 << 3) +#define USTYPE_ALL \ + (USTYPE_PSX_GRP | USTYPE_PSX_USR | USTYPE_SMB_GRP | USTYPE_SMB_USR) -#define USPROP_USED (1 << USPROP_USED_BIT) -#define USPROP_QUOTA (1 << USPROP_QUOTA_BIT) +static int us_type_bits[] = { + USTYPE_PSX_GRP, + USTYPE_PSX_USR, + USTYPE_SMB_GRP, + USTYPE_SMB_USR, + USTYPE_ALL +}; +static char *us_type_names[] = { "posixgroup", "posxiuser", "smbgroup", + "smbuser", "all" }; typedef struct us_node { nvlist_t *usn_nvl; @@ -2100,37 +2122,49 @@ typedef struct us_node { } us_node_t; typedef struct us_cbdata { - nvlist_t **cb_nvlp; - uu_avl_pool_t *cb_avl_pool; - uu_avl_t *cb_avl; - boolean_t cb_numname; - boolean_t cb_nicenum; - boolean_t cb_sid2posix; - zfs_userquota_prop_t cb_prop; - zfs_sort_column_t *cb_sortcol; - size_t cb_max_typelen; - size_t cb_max_namelen; - size_t cb_max_usedlen; - size_t cb_max_quotalen; + nvlist_t **cb_nvlp; + uu_avl_pool_t *cb_avl_pool; + uu_avl_t *cb_avl; + boolean_t cb_numname; + boolean_t cb_nicenum; + boolean_t cb_sid2posix; + zfs_userquota_prop_t cb_prop; + zfs_sort_column_t *cb_sortcol; + size_t cb_width[USFIELD_LAST]; } us_cbdata_t; +static boolean_t us_populated = B_FALSE; + typedef struct { zfs_sort_column_t *si_sortcol; - boolean_t si_num_name; - boolean_t si_parsable; + boolean_t si_numname; } us_sort_info_t; static int +us_field_index(char *field) +{ + int i; + + for (i = 0; i < USFIELD_LAST; i++) { + if (strcmp(field, us_field_names[i]) == 0) + return (i); + } + + return (-1); +} + +static int us_compare(const void *larg, const void *rarg, void *unused) { const us_node_t *l = larg; const us_node_t *r = rarg; - int rc = 0; us_sort_info_t *si = (us_sort_info_t *)unused; zfs_sort_column_t *sortcol = si->si_sortcol; - boolean_t num_name = si->si_num_name; + boolean_t numname = si->si_numname; nvlist_t *lnvl = l->usn_nvl; nvlist_t *rnvl = r->usn_nvl; + int rc = 0; + boolean_t lvb, rvb; for (; sortcol != NULL; sortcol = sortcol->sc_next) { char *lvstr = ""; @@ -2149,17 +2183,17 @@ us_compare(const void *larg, const void (void) nvlist_lookup_uint32(lnvl, propname, &lv32); (void) nvlist_lookup_uint32(rnvl, propname, &rv32); if (rv32 != lv32) - rc = (rv32 > lv32) ? 1 : -1; + rc = (rv32 < lv32) ? 1 : -1; break; case ZFS_PROP_NAME: propname = "name"; - if (num_name) { - (void) nvlist_lookup_uint32(lnvl, propname, - &lv32); - (void) nvlist_lookup_uint32(rnvl, propname, - &rv32); - if (rv32 != lv32) - rc = (rv32 > lv32) ? 1 : -1; + if (numname) { + (void) nvlist_lookup_uint64(lnvl, propname, + &lv64); + (void) nvlist_lookup_uint64(rnvl, propname, + &rv64); + if (rv64 != lv64) + rc = (rv64 < lv64) ? 1 : -1; } else { (void) nvlist_lookup_string(lnvl, propname, &lvstr); @@ -2168,27 +2202,40 @@ us_compare(const void *larg, const void rc = strcmp(lvstr, rvstr); } break; - case ZFS_PROP_USED: case ZFS_PROP_QUOTA: - if (ZFS_PROP_USED == prop) + if (!us_populated) + break; + if (prop == ZFS_PROP_USED) propname = "used"; else propname = "quota"; (void) nvlist_lookup_uint64(lnvl, propname, &lv64); (void) nvlist_lookup_uint64(rnvl, propname, &rv64); if (rv64 != lv64) - rc = (rv64 > lv64) ? 1 : -1; + rc = (rv64 < lv64) ? 1 : -1; + break; } - if (rc) + if (rc != 0) { if (rc < 0) return (reverse ? 1 : -1); else return (reverse ? -1 : 1); + } } - return (rc); + /* + * If entries still seem to be the same, check if they are of the same + * type (smbentity is added only if we are doing SID to POSIX ID + * translation where we can have duplicate type/name combinations). + */ + if (nvlist_lookup_boolean_value(lnvl, "smbentity", &lvb) == 0 && + nvlist_lookup_boolean_value(rnvl, "smbentity", &rvb) == 0 && + lvb != rvb) + return (lvb < rvb ? -1 : 1); + + return (0); } static inline const char * @@ -2208,9 +2255,6 @@ us_type2str(unsigned field_type) } } -/* - * zfs userspace - */ static int userspace_cb(void *arg, const char *domain, uid_t rid, uint64_t space) { @@ -2218,7 +2262,6 @@ userspace_cb(void *arg, const char *doma zfs_userquota_prop_t prop = cb->cb_prop; char *name = NULL; char *propname; - char namebuf[32]; char sizebuf[32]; us_node_t *node; uu_avl_pool_t *avl_pool = cb->cb_avl_pool; @@ -2232,32 +2275,30 @@ userspace_cb(void *arg, const char *doma size_t namelen; size_t typelen; size_t sizelen; + int typeidx, nameidx, sizeidx; us_sort_info_t sortinfo = { sortcol, cb->cb_numname }; + boolean_t smbentity = B_FALSE; - if (domain == NULL || domain[0] == '\0') { - /* POSIX */ - if (prop == ZFS_PROP_GROUPUSED || prop == ZFS_PROP_GROUPQUOTA) { - type = USTYPE_PSX_GRP; - struct group *g = getgrgid(rid); - if (g) - name = g->gr_name; - } else { - type = USTYPE_PSX_USR; - struct passwd *p = getpwuid(rid); - if (p) - name = p->pw_name; - } - } else { - char sid[ZFS_MAXNAMELEN+32]; + if (nvlist_alloc(&props, NV_UNIQUE_NAME, 0) != 0) + nomem(); + node = safe_malloc(sizeof (us_node_t)); + uu_avl_node_init(node, &node->usn_avlnode, avl_pool); + node->usn_nvl = props; + + if (domain != NULL && domain[0] != '\0') { + /* SMB */ + char sid[ZFS_MAXNAMELEN + 32]; uid_t id; uint64_t classes; #ifdef sun - int err = 0; + int err; directory_error_t e; #endif + smbentity = B_TRUE; + (void) snprintf(sid, sizeof (sid), "%s-%u", domain, rid); - /* SMB */ + if (prop == ZFS_PROP_GROUPUSED || prop == ZFS_PROP_GROUPQUOTA) { type = USTYPE_SMB_GRP; #ifdef sun @@ -2273,217 +2314,139 @@ userspace_cb(void *arg, const char *doma #ifdef sun if (err == 0) { rid = id; - - e = directory_name_from_sid(NULL, sid, &name, &classes); - if (e != NULL) { - directory_error_free(e); - return (NULL); + if (!cb->cb_sid2posix) { + e = directory_name_from_sid(NULL, sid, &name, + &classes); + if (e != NULL) + directory_error_free(e); + if (name == NULL) + name = sid; } - - if (name == NULL) - name = sid; } #endif } -/* - * if (prop == ZFS_PROP_GROUPUSED || prop == ZFS_PROP_GROUPQUOTA) - * ug = "group"; - * else - * ug = "user"; - */ - - if (prop == ZFS_PROP_USERUSED || prop == ZFS_PROP_GROUPUSED) - propname = "used"; - else - propname = "quota"; - - (void) snprintf(namebuf, sizeof (namebuf), "%u", rid); - if (name == NULL) - name = namebuf; - - if (cb->cb_nicenum) - zfs_nicenum(space, sizebuf, sizeof (sizebuf)); - else - (void) sprintf(sizebuf, "%llu", space); + if (cb->cb_sid2posix || domain == NULL || domain[0] == '\0') { + /* POSIX or -i */ + if (prop == ZFS_PROP_GROUPUSED || prop == ZFS_PROP_GROUPQUOTA) { + type = USTYPE_PSX_GRP; + if (!cb->cb_numname) { + struct group *g; - node = safe_malloc(sizeof (us_node_t)); - uu_avl_node_init(node, &node->usn_avlnode, avl_pool); + if ((g = getgrgid(rid)) != NULL) + name = g->gr_name; + } + } else { + type = USTYPE_PSX_USR; + if (!cb->cb_numname) { + struct passwd *p; - if (nvlist_alloc(&props, NV_UNIQUE_NAME, 0) != 0) { - free(node); - return (-1); + if ((p = getpwuid(rid)) != NULL) + name = p->pw_name; + } + } } + /* + * Make sure that the type/name combination is unique when doing + * SID to POSIX ID translation (hence changing the type from SMB to + * POSIX). + */ + if (cb->cb_sid2posix && + nvlist_add_boolean_value(props, "smbentity", smbentity) != 0) + nomem(); + + /* Calculate/update width of TYPE field */ + typestr = us_type2str(type); + typelen = strlen(gettext(typestr)); + typeidx = us_field_index("type"); + if (typelen > cb->cb_width[typeidx]) + cb->cb_width[typeidx] = typelen; if (nvlist_add_uint32(props, "type", type) != 0) nomem(); - if (cb->cb_numname) { - if (nvlist_add_uint32(props, "name", rid) != 0) + /* Calculate/update width of NAME field */ + if ((cb->cb_numname && cb->cb_sid2posix) || name == NULL) { + if (nvlist_add_uint64(props, "name", rid) != 0) nomem(); - namelen = strlen(namebuf); + namelen = snprintf(NULL, 0, "%u", rid); } else { if (nvlist_add_string(props, "name", name) != 0) nomem(); namelen = strlen(name); } + nameidx = us_field_index("name"); + if (namelen > cb->cb_width[nameidx]) + cb->cb_width[nameidx] = namelen; - typestr = us_type2str(type); - typelen = strlen(gettext(typestr)); - if (typelen > cb->cb_max_typelen) - cb->cb_max_typelen = typelen; - - if (namelen > cb->cb_max_namelen) - cb->cb_max_namelen = namelen; - - sizelen = strlen(sizebuf); - if (0 == strcmp(propname, "used")) { - if (sizelen > cb->cb_max_usedlen) - cb->cb_max_usedlen = sizelen; - } else { - if (sizelen > cb->cb_max_quotalen) - cb->cb_max_quotalen = sizelen; - } - - node->usn_nvl = props; - - n = uu_avl_find(avl, node, &sortinfo, &idx); - if (n == NULL) + /* + * Check if this type/name combination is in the list and update it; + * otherwise add new node to the list. + */ + if ((n = uu_avl_find(avl, node, &sortinfo, &idx)) == NULL) { uu_avl_insert(avl, node, idx); - else { + } else { nvlist_free(props); free(node); node = n; props = node->usn_nvl; } + /* Calculate/update width of USED/QUOTA fields */ + if (cb->cb_nicenum) + zfs_nicenum(space, sizebuf, sizeof (sizebuf)); + else + (void) snprintf(sizebuf, sizeof (sizebuf), "%llu", space); + sizelen = strlen(sizebuf); + if (prop == ZFS_PROP_USERUSED || prop == ZFS_PROP_GROUPUSED) { + propname = "used"; + if (!nvlist_exists(props, "quota")) + (void) nvlist_add_uint64(props, "quota", 0); + } else { + propname = "quota"; + if (!nvlist_exists(props, "used")) + (void) nvlist_add_uint64(props, "used", 0); + } + sizeidx = us_field_index(propname); + if (sizelen > cb->cb_width[sizeidx]) + cb->cb_width[sizeidx] = sizelen; + if (nvlist_add_uint64(props, propname, space) != 0) nomem(); return (0); } -static inline boolean_t -usprop_check(zfs_userquota_prop_t p, unsigned types, unsigned props) -{ - unsigned type; - unsigned prop; - - switch (p) { - case ZFS_PROP_USERUSED: - type = USTYPE_USR; - prop = USPROP_USED; - break; - case ZFS_PROP_USERQUOTA: - type = USTYPE_USR; - prop = USPROP_QUOTA; - break; - case ZFS_PROP_GROUPUSED: - type = USTYPE_GRP; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Mon Sep 17 07:25:53 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DCF5106567B for ; Mon, 17 Sep 2012 07:25:53 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 7F5128FC19 for ; Mon, 17 Sep 2012 07:25:51 +0000 (UTC) Received: (qmail 25822 invoked from network); 17 Sep 2012 09:10:22 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 17 Sep 2012 09:10:22 -0000 Message-ID: <5056D078.3020904@freebsd.org> Date: Mon, 17 Sep 2012 09:25:44 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120824 Thunderbird/15.0 MIME-Version: 1.0 To: attilio@FreeBSD.org References: <201207301350.q6UDobCI099069@svn.freebsd.org> <201207301732.33474.jhb@freebsd.org> <201208021707.22356.jhb@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Davide Italiano , mlaier@freebsd.org, svn-src-projects@freebsd.org, John Baldwin , Konstantin Belousov , src-committers@freebsd.org, Stephan Uphoff Subject: Re: svn commit: r238907 - projects/calloutng/sys/kern X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2012 07:25:53 -0000 Hello Attilio, could you integrate and test this patch from Isilon as well: Add INVARIANT and WITNESS support to rm_lock locks and optimize the synchronization path by replacing a LIST of active readers with a TAILQ. Obtained from: Isilon Submitted by: mlaier http://svn.freebsd.org/changeset/base/234648 You're far deeper into locking than I am. Thanks -- Andre On 13.09.2012 03:36, Attilio Rao wrote: > On Thu, Aug 2, 2012 at 10:07 PM, John Baldwin wrote: >> On Thursday, August 02, 2012 4:56:03 pm Attilio Rao wrote: >>> On 7/30/12, John Baldwin wrote: >>>> --- //depot/projects/smpng/sys/kern/kern_rmlock.c 2012-03-25 >>>> 18:45:29.000000000 0000 >>>> +++ //depot/user/jhb/lock/kern/kern_rmlock.c 2012-06-18 21:20:58.000000000 >>>> 0000 >>>> @@ -70,6 +70,9 @@ >>>> } >>>> >>>> static void assert_rm(const struct lock_object *lock, int what); >>>> +#ifdef DDB >>>> +static void db_show_rm(const struct lock_object *lock); >>>> +#endif >>>> static void lock_rm(struct lock_object *lock, int how); >>>> #ifdef KDTRACE_HOOKS >>>> static int owner_rm(const struct lock_object *lock, struct thread >>>> **owner); >>> >>> While here, did you consider also: >>> - Abstracting compiler_memory_barrier() into a MI, compiler dependent function? >>> - Fix rm_queue with DCPU possibly >> >> Mostly I just wanted to fill in missing functionality and fixup the >> RM_SLEEPABLE bits a bit. > > So what do you think about the following patch? If you agree I will > send to pho@ for testing in a batch with other patches. > > Thanks, > Attilio > > > Subject: [PATCH 7/7] Reimplement pc_rm_queue as a dynamic entry for per-cpu > members. > > Sparse notes: > o rm_tracker_remove() doesn't seem to need the pc argument also > in the current code > o The stop ptr value changes from &pc->pc_rm_queue to NULL when > scanning the cpus list > > Signed-off-by: Attilio Rao > --- > sys/kern/kern_rmlock.c | 42 ++++++++++++++++++++++-------------------- > sys/kern/subr_pcpu.c | 2 -- > sys/sys/_rmlock.h | 10 +++++----- > sys/sys/pcpu.h | 18 ------------------ > 4 files changed, 27 insertions(+), 45 deletions(-) > > diff --git a/sys/kern/kern_rmlock.c b/sys/kern/kern_rmlock.c > index ef1920b..c6ba65a 100644 > --- a/sys/kern/kern_rmlock.c > +++ b/sys/kern/kern_rmlock.c > @@ -76,6 +76,8 @@ static int owner_rm(const struct lock_object > *lock, struct thread **owner); > #endif > static int unlock_rm(struct lock_object *lock); > > +static DPCPU_DEFINE(struct rm_queue, rm_queue); > + > struct lock_class lock_class_rm = { > .lc_name = "rm", > .lc_flags = LC_SLEEPLOCK | LC_RECURSABLE, > @@ -133,24 +135,24 @@ MTX_SYSINIT(rm_spinlock, &rm_spinlock, > "rm_spinlock", MTX_SPIN); > * interrupt on the *local* cpu. > */ > static void inline > -rm_tracker_add(struct pcpu *pc, struct rm_priotracker *tracker) > +rm_tracker_add(struct rm_queue *pcpu_rm_queue, struct rm_priotracker *tracker) > { > struct rm_queue *next; > > /* Initialize all tracker pointers */ > - tracker->rmp_cpuQueue.rmq_prev = &pc->pc_rm_queue; > - next = pc->pc_rm_queue.rmq_next; > + tracker->rmp_cpuQueue.rmq_prev = NULL; > + next = pcpu_rm_queue->rmq_next; > tracker->rmp_cpuQueue.rmq_next = next; > > /* rmq_prev is not used during froward traversal. */ > next->rmq_prev = &tracker->rmp_cpuQueue; > > /* Update pointer to first element. */ > - pc->pc_rm_queue.rmq_next = &tracker->rmp_cpuQueue; > + pcpu_rm_queue->rmq_next = &tracker->rmp_cpuQueue; > } > > static void inline > -rm_tracker_remove(struct pcpu *pc, struct rm_priotracker *tracker) > +rm_tracker_remove(struct rm_priotracker *tracker) > { > struct rm_queue *next, *prev; > > @@ -167,13 +169,12 @@ rm_tracker_remove(struct pcpu *pc, struct > rm_priotracker *tracker) > static void > rm_cleanIPI(void *arg) > { > - struct pcpu *pc; > struct rmlock *rm = arg; > struct rm_priotracker *tracker; > - struct rm_queue *queue; > - pc = pcpu_find(curcpu); > + struct rm_queue *queue, *pcpu_rm_queue; > + pcpu_rm_queue = DPCPU_PTR(rm_queue); > > - for (queue = pc->pc_rm_queue.rmq_next; queue != &pc->pc_rm_queue; > + for (queue = pcpu_rm_queue->rmq_next; queue != NULL; > queue = queue->rmq_next) { > tracker = (struct rm_priotracker *)queue; > if (tracker->rmp_rmlock == rm && tracker->rmp_flags == 0) { > @@ -256,11 +257,12 @@ static int > _rm_rlock_hard(struct rmlock *rm, struct rm_priotracker *tracker, int trylock) > { > struct pcpu *pc; > - struct rm_queue *queue; > + struct rm_queue *queue, *pcpu_rm_queue; > struct rm_priotracker *atracker; > > critical_enter(); > pc = pcpu_find(curcpu); > + pcpu_rm_queue = DPCPU_PTR(rm_queue); > > /* Check if we just need to do a proper critical_exit. */ > if (!CPU_ISSET(pc->pc_cpuid, &rm->rm_writecpus)) { > @@ -269,12 +271,12 @@ _rm_rlock_hard(struct rmlock *rm, struct > rm_priotracker *tracker, int trylock) > } > > /* Remove our tracker from the per-cpu list. */ > - rm_tracker_remove(pc, tracker); > + rm_tracker_remove(tracker); > > /* Check to see if the IPI granted us the lock after all. */ > if (tracker->rmp_flags) { > /* Just add back tracker - we hold the lock. */ > - rm_tracker_add(pc, tracker); > + rm_tracker_add(pcpu_rm_queue, tracker); > critical_exit(); > return (1); > } > @@ -288,8 +290,8 @@ _rm_rlock_hard(struct rmlock *rm, struct > rm_priotracker *tracker, int trylock) > * Just grant the lock if this thread already has a tracker > * for this lock on the per-cpu queue. > */ > - for (queue = pc->pc_rm_queue.rmq_next; > - queue != &pc->pc_rm_queue; queue = queue->rmq_next) { > + for (queue = pcpu_rm_queue->rmq_next; queue != NULL; > + queue = queue->rmq_next) { > atracker = (struct rm_priotracker *)queue; > if ((atracker->rmp_rmlock == rm) && > (atracker->rmp_thread == tracker->rmp_thread)) { > @@ -298,7 +300,7 @@ _rm_rlock_hard(struct rmlock *rm, struct > rm_priotracker *tracker, int trylock) > tracker, rmp_qentry); > tracker->rmp_flags = RMPF_ONQUEUE; > mtx_unlock_spin(&rm_spinlock); > - rm_tracker_add(pc, tracker); > + rm_tracker_add(pcpu_rm_queue, tracker); > critical_exit(); > return (1); > } > @@ -326,7 +328,7 @@ _rm_rlock_hard(struct rmlock *rm, struct > rm_priotracker *tracker, int trylock) > critical_enter(); > pc = pcpu_find(curcpu); > CPU_CLR(pc->pc_cpuid, &rm->rm_writecpus); > - rm_tracker_add(pc, tracker); > + rm_tracker_add(pcpu_rm_queue, tracker); > sched_pin(); > critical_exit(); > > @@ -342,6 +344,7 @@ int > _rm_rlock(struct rmlock *rm, struct rm_priotracker *tracker, int trylock) > { > struct thread *td = curthread; > + struct rm_queue *pcpu_rm_queue; > struct pcpu *pc; > > if (SCHEDULER_STOPPED()) > @@ -356,8 +359,9 @@ _rm_rlock(struct rmlock *rm, struct rm_priotracker > *tracker, int trylock) > compiler_memory_barrier(); > > pc = cpuid_to_pcpu[td->td_oncpu]; /* pcpu_find(td->td_oncpu); */ > + pcpu_rm_queue = DPCPU_ID_PTR(td->td_oncpu, rm_queue); > > - rm_tracker_add(pc, tracker); > + rm_tracker_add(pcpu_rm_queue, tracker); > > sched_pin(); > > @@ -413,15 +417,13 @@ _rm_unlock_hard(struct thread *td,struct > rm_priotracker *tracker) > void > _rm_runlock(struct rmlock *rm, struct rm_priotracker *tracker) > { > - struct pcpu *pc; > struct thread *td = tracker->rmp_thread; > > if (SCHEDULER_STOPPED()) > return; > > td->td_critnest++; /* critical_enter(); */ > - pc = cpuid_to_pcpu[td->td_oncpu]; /* pcpu_find(td->td_oncpu); */ > - rm_tracker_remove(pc, tracker); > + rm_tracker_remove(tracker); > td->td_critnest--; > sched_unpin(); > > diff --git a/sys/kern/subr_pcpu.c b/sys/kern/subr_pcpu.c > index 505a4df..279295e 100644 > --- a/sys/kern/subr_pcpu.c > +++ b/sys/kern/subr_pcpu.c > @@ -90,8 +90,6 @@ pcpu_init(struct pcpu *pcpu, int cpuid, size_t size) > cpuid_to_pcpu[cpuid] = pcpu; > STAILQ_INSERT_TAIL(&cpuhead, pcpu, pc_allcpu); > cpu_pcpu_init(pcpu, cpuid, size); > - pcpu->pc_rm_queue.rmq_next = &pcpu->pc_rm_queue; > - pcpu->pc_rm_queue.rmq_prev = &pcpu->pc_rm_queue; > } > > void > diff --git a/sys/sys/_rmlock.h b/sys/sys/_rmlock.h > index 15d6c49..51bb03e 100644 > --- a/sys/sys/_rmlock.h > +++ b/sys/sys/_rmlock.h > @@ -32,11 +32,6 @@ > #ifndef _SYS__RMLOCK_H_ > #define _SYS__RMLOCK_H_ > > -/* > - * XXXUPS remove as soon as we have per cpu variable > - * linker sets and can define rm_queue in _rm_lock.h > -*/ > -#include > /* > * Mostly reader/occasional writer lock. > */ > @@ -55,6 +50,11 @@ struct rmlock { > #define rm_lock_mtx _rm_lock._rm_lock_mtx > #define rm_lock_sx _rm_lock._rm_lock_sx > > +struct rm_queue { > + struct rm_queue *volatile rmq_next; > + struct rm_queue *volatile rmq_prev; > +}; > + > struct rm_priotracker { > struct rm_queue rmp_cpuQueue; /* Must be first */ > struct rmlock *rmp_rmlock; > diff --git a/sys/sys/pcpu.h b/sys/sys/pcpu.h > index 4a4ec00..78ba04a 100644 > --- a/sys/sys/pcpu.h > +++ b/sys/sys/pcpu.h > @@ -137,15 +137,6 @@ extern uintptr_t dpcpu_off[]; > > #endif /* _KERNEL */ > > -/* > - * XXXUPS remove as soon as we have per cpu variable > - * linker sets and can define rm_queue in _rm_lock.h > - */ > -struct rm_queue { > - struct rm_queue* volatile rmq_next; > - struct rm_queue* volatile rmq_prev; > -}; > - > /* > * This structure maps out the global data that needs to be kept on a > * per-cpu basis. The members are accessed via the PCPU_GET/SET/PTR > @@ -169,15 +160,6 @@ struct pcpu { > void *pc_netisr; /* netisr SWI cookie */ > int pc_dnweight; /* vm_page_dontneed() */ > int pc_domain; /* Memory domain. */ > - > - /* > - * Stuff for read mostly lock > - * > - * XXXUPS remove as soon as we have per cpu variable > - * linker sets. > - */ > - struct rm_queue pc_rm_queue; > - > uintptr_t pc_dynamic; /* Dynamic per-cpu data area */ > > /* > From owner-svn-src-projects@FreeBSD.ORG Mon Sep 17 13:29:39 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D8B1E106564A; Mon, 17 Sep 2012 13:29:39 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 220AE8FC0C; Mon, 17 Sep 2012 13:29:37 +0000 (UTC) Received: by lage12 with SMTP id e12so5094390lag.13 for ; Mon, 17 Sep 2012 06:29:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=ZMbxA1LHCnz4nK8hw4KY+pER4n24VkvWu3XqxDv4REs=; b=bNzcGikxZW6uM4NtqqY24WYk68NvWDGwOLmrz/nIhy37bB8uQbvNcXVYyViwyNJd5P sAgzv0eSRWrYHe+R4QRuuSVyzptkLevn7VCqCl7xXBE6bY4rIjlPA20WdqjQfLXdseXg 89GHRpezWIBZRaOtvY9OG8Miz2rqu4MA/I+c7vIqzMo3MOcKaBrf9dx1P4MYTCXiFfwc tgreRZiwP5R1+q7wV38cJjAiIHlNDtHuI2OamlZM1G6S4aPax+8tKQavc32OsJCyilMV hcIjPoYfEC8AtcpImIHHs/yil0akMRul+mUvatmb42CtOfaIJXErmN+CLXcOA1DzmEZX fLXw== MIME-Version: 1.0 Received: by 10.112.30.34 with SMTP id p2mr3912316lbh.85.1347888575943; Mon, 17 Sep 2012 06:29:35 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.102.39 with HTTP; Mon, 17 Sep 2012 06:29:35 -0700 (PDT) In-Reply-To: <5056D078.3020904@freebsd.org> References: <201207301350.q6UDobCI099069@svn.freebsd.org> <201207301732.33474.jhb@freebsd.org> <201208021707.22356.jhb@freebsd.org> <5056D078.3020904@freebsd.org> Date: Mon, 17 Sep 2012 14:29:35 +0100 X-Google-Sender-Auth: Jp4an8o1fwY4zZnwvVL4CHloJZg Message-ID: From: Attilio Rao To: Andre Oppermann Content-Type: text/plain; charset=UTF-8 Cc: Davide Italiano , mlaier@freebsd.org, svn-src-projects@freebsd.org, John Baldwin , Konstantin Belousov , src-committers@freebsd.org, Stephan Uphoff Subject: Re: svn commit: r238907 - projects/calloutng/sys/kern X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2012 13:29:40 -0000 On 9/17/12, Andre Oppermann wrote: > Hello Attilio, > > could you integrate and test this patch from Isilon as well: I'll look into that as soon as possible, thanks a lot to you and Max/Isilon to share this. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-projects@FreeBSD.ORG Mon Sep 17 15:14:07 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 075B710656FA; Mon, 17 Sep 2012 15:14:07 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id CB8E88FC18; Mon, 17 Sep 2012 15:14:06 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 25735B9BC; Mon, 17 Sep 2012 11:14:06 -0400 (EDT) From: John Baldwin To: Andre Oppermann Date: Mon, 17 Sep 2012 11:13:06 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <201207301350.q6UDobCI099069@svn.freebsd.org> <5056D078.3020904@freebsd.org> In-Reply-To: <5056D078.3020904@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201209171113.06861.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 17 Sep 2012 11:14:06 -0400 (EDT) Cc: Davide Italiano , mlaier@freebsd.org, svn-src-projects@freebsd.org, attilio@freebsd.org, Konstantin Belousov , src-committers@freebsd.org, Stephan Uphoff Subject: Re: svn commit: r238907 - projects/calloutng/sys/kern X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2012 15:14:07 -0000 On Monday, September 17, 2012 3:25:44 am Andre Oppermann wrote: > Hello Attilio, > > could you integrate and test this patch from Isilon as well: > > Add INVARIANT and WITNESS support to rm_lock locks and optimize the > synchronization path by replacing a LIST of active readers with a > TAILQ. > > Obtained from: Isilon > Submitted by: mlaier > > http://svn.freebsd.org/changeset/base/234648 > > You're far deeper into locking than I am. Some of this is already in the tree, and their WITNESS changes don't quite work correctly. I have several fixes (including some of these already) that I am just waiting to develop a good test for. Having an _rm_assert() to pull from will be good though. -- John Baldwin From owner-svn-src-projects@FreeBSD.ORG Tue Sep 18 00:13:11 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6431B1065670; Tue, 18 Sep 2012 00:13:11 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id C057B8FC14; Tue, 18 Sep 2012 00:13:09 +0000 (UTC) Received: by lage12 with SMTP id e12so5634424lag.13 for ; Mon, 17 Sep 2012 17:13:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=NfqlORclN0PjcwO8lb/zRFpxe0VbSffIlClsPT2IscM=; b=rSNxg3tn5rUUwuzN6TsjhtT+XMtQlWEhpzqS+kUCxAGlcEYAGjmsok+xnBGB3iCXLC bNvZm6ApsJ06f9sutPtyW6PrLjVwSNTdv0YvUm6NmBEPB2nsgClLZrDtlVmHh/QQy07s HXOhOFDBOgz2h2Bn0IQ/43n0bMS9QpVOwFJi3d1heVUhJtSNxnR8p7zd34u+jY+1Dgkh c+GlZl0Yk6CXeeYDD+VapmSQT+6wRLSXPh063zmhEMU+Lxfk+TzW3CSKMDE9tVlE/P5Z Bnfq19UOPMXVV10Kct/Jfv21rSKATJ2zXz+N6pib966JnTHV7os+7sLSeX44/dINn3Ca 6pmw== MIME-Version: 1.0 Received: by 10.152.131.37 with SMTP id oj5mr3364500lab.14.1347927188271; Mon, 17 Sep 2012 17:13:08 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.102.39 with HTTP; Mon, 17 Sep 2012 17:13:08 -0700 (PDT) In-Reply-To: References: <201207301350.q6UDobCI099069@svn.freebsd.org> <201207301732.33474.jhb@freebsd.org> Date: Tue, 18 Sep 2012 01:13:08 +0100 X-Google-Sender-Auth: 9XtQZ_frBKUxyN5FAIsFAX9_A0w Message-ID: From: Attilio Rao To: John Baldwin Content-Type: text/plain; charset=UTF-8 Cc: Davide Italiano , src-committers@freebsd.org, Jeff Roberson , Dimitry Andric , svn-src-projects@freebsd.org, Konstantin Belousov Subject: Re: svn commit: r238907 - projects/calloutng/sys/kern X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2012 00:13:11 -0000 On Thu, Aug 2, 2012 at 9:56 PM, Attilio Rao wrote: > On 7/30/12, John Baldwin wrote: [ trimm ] >> --- //depot/projects/smpng/sys/kern/kern_rmlock.c 2012-03-25 >> 18:45:29.000000000 0000 >> +++ //depot/user/jhb/lock/kern/kern_rmlock.c 2012-06-18 21:20:58.000000000 >> 0000 >> @@ -70,6 +70,9 @@ >> } >> >> static void assert_rm(const struct lock_object *lock, int what); >> +#ifdef DDB >> +static void db_show_rm(const struct lock_object *lock); >> +#endif >> static void lock_rm(struct lock_object *lock, int how); >> #ifdef KDTRACE_HOOKS >> static int owner_rm(const struct lock_object *lock, struct thread >> **owner); > > While here, did you consider also: > - Abstracting compiler_memory_barrier() into a MI, compiler dependent function? So what do you think about this patch? (Please double-check the GIT log). Thanks, Attilio Subject: [PATCH 11/11] Add an unified macro to deny ability from the compiler to reorder instruction loads/stores at its will. The macro is called __compiler_membar() and it is currently supported for both gcc and clang (sharing the same __GNUC__ tag). Signed-off-by: Attilio Rao --- sys/amd64/include/atomic.h | 4 ++-- sys/gnu/fs/xfs/FreeBSD/xfs_compat.h | 4 ---- sys/gnu/fs/xfs/FreeBSD/xfs_freebsd.h | 2 +- sys/i386/include/atomic.h | 4 ++-- sys/kern/kern_rmlock.c | 8 ++------ sys/mips/include/cpufunc.h | 2 +- sys/pc98/include/bus.h | 2 +- sys/sparc64/include/atomic.h | 6 +++--- sys/sys/cdefs.h | 7 +++++++ sys/x86/include/bus.h | 2 +- 10 files changed, 20 insertions(+), 21 deletions(-) diff --git a/sys/amd64/include/atomic.h b/sys/amd64/include/atomic.h index 99a94b7..91c33e6 100644 --- a/sys/amd64/include/atomic.h +++ b/sys/amd64/include/atomic.h @@ -226,7 +226,7 @@ atomic_fetchadd_long(volatile u_long *p, u_long v) static __inline void \ atomic_store_rel_##TYPE(volatile u_##TYPE *p, u_##TYPE v)\ { \ - __asm __volatile("" : : : "memory"); \ + __compiler_membar(); \ *p = v; \ } \ struct __hack @@ -240,7 +240,7 @@ atomic_load_acq_##TYPE(volatile u_##TYPE *p) \ u_##TYPE tmp; \ \ tmp = *p; \ - __asm __volatile("" : : : "memory"); \ + __compiler_membar(); \ return (tmp); \ } \ struct __hack diff --git a/sys/gnu/fs/xfs/FreeBSD/xfs_compat.h b/sys/gnu/fs/xfs/FreeBSD/xfs_compat.h index 7229f27..55a03c9 100644 --- a/sys/gnu/fs/xfs/FreeBSD/xfs_compat.h +++ b/sys/gnu/fs/xfs/FreeBSD/xfs_compat.h @@ -129,10 +129,6 @@ typedef dev_t os_dev_t; #define copy_from_user(dst, src, len) copyin((src), (dst), (len)) #endif -#ifndef barrier -#define barrier() __asm__ __volatile__("": : :"memory") -#endif - /* * Map simple global vairables to FreeBSD kernel equivalents */ diff --git a/sys/gnu/fs/xfs/FreeBSD/xfs_freebsd.h b/sys/gnu/fs/xfs/FreeBSD/xfs_freebsd.h index a47c413..cc1d8df 100644 --- a/sys/gnu/fs/xfs/FreeBSD/xfs_freebsd.h +++ b/sys/gnu/fs/xfs/FreeBSD/xfs_freebsd.h @@ -162,7 +162,7 @@ */ #define EFSCORRUPTED 990 /* Filesystem is corrupted */ -#define SYNCHRONIZE() barrier() +#define SYNCHRONIZE() __compiler_membar() #define __return_address __builtin_return_address(0) /* diff --git a/sys/i386/include/atomic.h b/sys/i386/include/atomic.h index 6ef5962..3b9d001 100644 --- a/sys/i386/include/atomic.h +++ b/sys/i386/include/atomic.h @@ -296,7 +296,7 @@ atomic_fetchadd_int(volatile u_int *p, u_int v) static __inline void \ atomic_store_rel_##TYPE(volatile u_##TYPE *p, u_##TYPE v)\ { \ - __asm __volatile("" : : : "memory"); \ + __compiler_membar(); \ *p = v; \ } \ struct __hack @@ -310,7 +310,7 @@ atomic_load_acq_##TYPE(volatile u_##TYPE *p) \ u_##TYPE tmp; \ \ tmp = *p; \ - __asm __volatile("" : : : "memory"); \ + __compiler_membar(); \ return (tmp); \ } \ struct __hack diff --git a/sys/kern/kern_rmlock.c b/sys/kern/kern_rmlock.c index ef1920b..30400b1 100644 --- a/sys/kern/kern_rmlock.c +++ b/sys/kern/kern_rmlock.c @@ -65,10 +65,6 @@ __FBSDID("$FreeBSD$"); * does not seem very useful */ -static __inline void compiler_memory_barrier(void) { - __asm __volatile("":::"memory"); -} - static void assert_rm(const struct lock_object *lock, int what); static void lock_rm(struct lock_object *lock, int how); #ifdef KDTRACE_HOOKS @@ -353,7 +349,7 @@ _rm_rlock(struct rmlock *rm, struct rm_priotracker *tracker, int trylock) td->td_critnest++; /* critical_enter(); */ - compiler_memory_barrier(); + __compiler_membar(); pc = cpuid_to_pcpu[td->td_oncpu]; /* pcpu_find(td->td_oncpu); */ @@ -361,7 +357,7 @@ _rm_rlock(struct rmlock *rm, struct rm_priotracker *tracker, int trylock) sched_pin(); - compiler_memory_barrier(); + __compiler_membar(); td->td_critnest--; diff --git a/sys/mips/include/cpufunc.h b/sys/mips/include/cpufunc.h index 513237f..3611d6e 100644 --- a/sys/mips/include/cpufunc.h +++ b/sys/mips/include/cpufunc.h @@ -70,7 +70,7 @@ static __inline void mips_barrier(void) { #if defined(CPU_CNMIPS) || defined(CPU_RMI) || defined(CPU_NLM) - __asm __volatile("" : : : "memory"); + __compiler_membar(); #else __asm __volatile (".set noreorder\n\t" "nop\n\t" diff --git a/sys/pc98/include/bus.h b/sys/pc98/include/bus.h index 69e80f0..46d1a1b 100644 --- a/sys/pc98/include/bus.h +++ b/sys/pc98/include/bus.h @@ -593,7 +593,7 @@ bus_space_barrier(bus_space_tag_t tag, bus_space_handle_t bsh, if (flags & BUS_SPACE_BARRIER_READ) __asm __volatile("lock; addl $0,0(%%esp)" : : : "memory"); else - __asm __volatile("" : : : "memory"); + __compiler_membar(); } #ifdef BUS_SPACE_NO_LEGACY diff --git a/sys/sparc64/include/atomic.h b/sys/sparc64/include/atomic.h index 06a1984..447880a 100644 --- a/sys/sparc64/include/atomic.h +++ b/sys/sparc64/include/atomic.h @@ -97,7 +97,7 @@ #define atomic_cas_acq(p, e, s, sz) ({ \ itype(sz) v; \ v = atomic_cas((p), (e), (s), sz); \ - __asm __volatile("" : : : "memory"); \ + __compiler_membar(); \ v; \ }) @@ -122,7 +122,7 @@ #define atomic_op_acq(p, op, v, sz) ({ \ itype(sz) t; \ t = atomic_op((p), op, (v), sz); \ - __asm __volatile("" : : : "memory"); \ + __compiler_membar(); \ t; \ }) @@ -139,7 +139,7 @@ #define atomic_load_acq(p, sz) ({ \ itype(sz) v; \ v = atomic_load((p), sz); \ - __asm __volatile("" : : : "memory"); \ + __compiler_membar(); \ v; \ }) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 8224672..fc6a75f 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -114,6 +114,13 @@ #endif /* + * Compiler memory barriers, specific to gcc and clang. + */ +#if defined(__GNUC__) +#define __compiler_membar() __asm __volatile(" " : : : "memory") +#endif + +/* * The __CONCAT macro is used to concatenate parts of symbol names, e.g. * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. * The __CONCAT macro is a bit tricky to use if it must work in non-ANSI diff --git a/sys/x86/include/bus.h b/sys/x86/include/bus.h index 3b4342a..fb5babf 100644 --- a/sys/x86/include/bus.h +++ b/sys/x86/include/bus.h @@ -1014,7 +1014,7 @@ bus_space_barrier(bus_space_tag_t tag __unused, bus_space_handle_t bsh __unused, __asm __volatile("lock; addl $0,0(%%esp)" : : : "memory"); #endif - __asm __volatile("" : : : "memory"); + __compiler_membar(); #endif } -- 1.7.7.4 From owner-svn-src-projects@FreeBSD.ORG Tue Sep 18 08:33:38 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82F0B1065670; Tue, 18 Sep 2012 08:33:38 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id C7D6B8FC0C; Tue, 18 Sep 2012 08:33:37 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q8I8XbgE082313; Tue, 18 Sep 2012 11:33:37 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q8I8XO56043450; Tue, 18 Sep 2012 11:33:24 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q8I8XOkh043449; Tue, 18 Sep 2012 11:33:24 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 18 Sep 2012 11:33:24 +0300 From: Konstantin Belousov To: Attilio Rao Message-ID: <20120918083324.GX37286@deviant.kiev.zoral.com.ua> References: <201207301350.q6UDobCI099069@svn.freebsd.org> <201207301732.33474.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="umhhH1MY3lvPZrwj" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Davide Italiano , src-committers@freebsd.org, John Baldwin , Jeff Roberson , Dimitry Andric , svn-src-projects@freebsd.org Subject: Re: svn commit: r238907 - projects/calloutng/sys/kern X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2012 08:33:38 -0000 --umhhH1MY3lvPZrwj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 18, 2012 at 01:13:08AM +0100, Attilio Rao wrote: > diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h > index 8224672..fc6a75f 100644 > --- a/sys/sys/cdefs.h > +++ b/sys/sys/cdefs.h > @@ -114,6 +114,13 @@ > #endif >=20 > /* > + * Compiler memory barriers, specific to gcc and clang. > + */ > +#if defined(__GNUC__) > +#define __compiler_membar() __asm __volatile(" " : : : "memor= y") > +#endif > + > +/* Traditionally, we do provide the fallback for non-GNUC compilers, by defining extern function with the compatible signature. In this case, the empty function just works for the purpose, although with higher overhead than the GNUC case. --umhhH1MY3lvPZrwj Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAlBYMdQACgkQC3+MBN1Mb4g3TACfSn6vAfoXsGD4n/EbkUUHWZIx 93IAnj5bMxUgI7FmdgvzyFsqMyVOvfCQ =jceA -----END PGP SIGNATURE----- --umhhH1MY3lvPZrwj-- From owner-svn-src-projects@FreeBSD.ORG Tue Sep 18 10:16:00 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52B50106566C; Tue, 18 Sep 2012 10:16:00 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 057FC8FC12; Tue, 18 Sep 2012 10:16:00 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:ecff:a137:3a22:244] (unknown [IPv6:2001:7b8:3a7:0:ecff:a137:3a22:244]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 25CD75C59; Tue, 18 Sep 2012 12:15:58 +0200 (CEST) Message-ID: <505849DB.3090704@FreeBSD.org> Date: Tue, 18 Sep 2012 12:15:55 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20120905 Thunderbird/16.0 MIME-Version: 1.0 To: attilio@FreeBSD.org References: <201207301350.q6UDobCI099069@svn.freebsd.org> <201207301732.33474.jhb@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Davide Italiano , src-committers@freebsd.org, John Baldwin , Jeff Roberson , svn-src-projects@freebsd.org, Konstantin Belousov Subject: Re: svn commit: r238907 - projects/calloutng/sys/kern X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2012 10:16:00 -0000 On 2012-09-18 02:13, Attilio Rao wrote: > On Thu, Aug 2, 2012 at 9:56 PM, Attilio Rao wrote: >> On 7/30/12, John Baldwin wrote: ... >> While here, did you consider also: >> - Abstracting compiler_memory_barrier() into a MI, compiler dependent function? > > So what do you think about this patch? (Please double-check the GIT log). ... > diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h > index 8224672..fc6a75f 100644 > --- a/sys/sys/cdefs.h > +++ b/sys/sys/cdefs.h > @@ -114,6 +114,13 @@ > #endif > > /* > + * Compiler memory barriers, specific to gcc and clang. > + */ > +#if defined(__GNUC__) > +#define __compiler_membar() __asm __volatile(" " : : : "memory") > +#endif > + > +/* > * The __CONCAT macro is used to concatenate parts of symbol names, e.g. > * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. > * The __CONCAT macro is a bit tricky to use if it must work in non-ANSI Please use gcc's __sync_synchronize() builtin[1] instead, which is specifically for this purpose. Clang also supports it. The builtin will emit actual memory barrier instructions, if the target architecture supports it, otherwise it will emit the same asm statement you show above. See contrib/gcc/builtins.c, around line 5584, function expand_builtin_synchronize(). -Dimitry [1]: From owner-svn-src-projects@FreeBSD.ORG Tue Sep 18 10:22:48 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7FF971065678; Tue, 18 Sep 2012 10:22:48 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 137D28FC12; Tue, 18 Sep 2012 10:22:47 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q8IAMptO092801; Tue, 18 Sep 2012 13:22:51 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q8IAMbc9057901; Tue, 18 Sep 2012 13:22:37 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q8IAMbPL057900; Tue, 18 Sep 2012 13:22:37 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 18 Sep 2012 13:22:37 +0300 From: Konstantin Belousov To: Dimitry Andric Message-ID: <20120918102237.GA37286@deviant.kiev.zoral.com.ua> References: <201207301350.q6UDobCI099069@svn.freebsd.org> <201207301732.33474.jhb@freebsd.org> <505849DB.3090704@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yQrIXZbGokyKU1X6" Content-Disposition: inline In-Reply-To: <505849DB.3090704@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Davide Italiano , src-committers@freebsd.org, John Baldwin , Jeff Roberson , attilio@freebsd.org, svn-src-projects@freebsd.org Subject: Re: svn commit: r238907 - projects/calloutng/sys/kern X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2012 10:22:48 -0000 --yQrIXZbGokyKU1X6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 18, 2012 at 12:15:55PM +0200, Dimitry Andric wrote: > On 2012-09-18 02:13, Attilio Rao wrote: > > On Thu, Aug 2, 2012 at 9:56 PM, Attilio Rao wrote: > >> On 7/30/12, John Baldwin wrote: > ... > >> While here, did you consider also: > >> - Abstracting compiler_memory_barrier() into a MI, compiler dependent = function? > > > > So what do you think about this patch? (Please double-check the GIT log= ). > ... >=20 > > diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h > > index 8224672..fc6a75f 100644 > > --- a/sys/sys/cdefs.h > > +++ b/sys/sys/cdefs.h > > @@ -114,6 +114,13 @@ > > #endif > > > > /* > > + * Compiler memory barriers, specific to gcc and clang. > > + */ > > +#if defined(__GNUC__) > > +#define __compiler_membar() __asm __volatile(" " : : : "mem= ory") > > +#endif > > + > > +/* > > * The __CONCAT macro is used to concatenate parts of symbol names, e= =2Eg. > > * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfo= o. > > * The __CONCAT macro is a bit tricky to use if it must work in non-A= NSI >=20 > Please use gcc's __sync_synchronize() builtin[1] instead, which is > specifically for this purpose. Clang also supports it. >=20 > The builtin will emit actual memory barrier instructions, if the target > architecture supports it, otherwise it will emit the same asm statement > you show above. See contrib/gcc/builtins.c, around line 5584, function > expand_builtin_synchronize(). We do not need CPU barriers there, which are already handled by the atomic asms. It is only to prevent compiler from exploiting the reorder. >=20 > -Dimitry >=20 > [1]: --yQrIXZbGokyKU1X6 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAlBYS20ACgkQC3+MBN1Mb4iHmACbBBAd6zNW3q8hljmDuh3LJ5dk MHoAn0pEpqLcpmF8/Z5eUkMuvWGnbvbP =DOak -----END PGP SIGNATURE----- --yQrIXZbGokyKU1X6-- From owner-svn-src-projects@FreeBSD.ORG Tue Sep 18 10:29:34 2012 Return-Path: Delivered-To: svn-src-projects@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 788E7106566B; Tue, 18 Sep 2012 10:29:34 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) by mx1.freebsd.org (Postfix) with ESMTP id 127668FC08; Tue, 18 Sep 2012 10:29:33 +0000 (UTC) Received: from c120.sec.cl.cam.ac.uk (c120.sec.cl.cam.ac.uk [128.232.18.120]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id q8IATUa5077578 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Tue, 18 Sep 2012 10:29:30 GMT (envelope-from theraven@FreeBSD.org) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: David Chisnall In-Reply-To: <505849DB.3090704@FreeBSD.org> Date: Tue, 18 Sep 2012 11:29:31 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201207301350.q6UDobCI099069@svn.freebsd.org> <201207301732.33474.jhb@freebsd.org> <505849DB.3090704@FreeBSD.org> To: Dimitry Andric X-Mailer: Apple Mail (2.1278) Cc: Davide Italiano , src-committers@FreeBSD.org, John Baldwin , Jeff Roberson , attilio@FreeBSD.org, svn-src-projects@FreeBSD.org, Konstantin Belousov Subject: Re: svn commit: r238907 - projects/calloutng/sys/kern X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2012 10:29:34 -0000 On 18 Sep 2012, at 11:15, Dimitry Andric wrote: > Please use gcc's __sync_synchronize() builtin[1] instead, which is > specifically for this purpose. Clang also supports it. >=20 > The builtin will emit actual memory barrier instructions, if the = target > architecture supports it, otherwise it will emit the same asm = statement > you show above. See contrib/gcc/builtins.c, around line 5584, = function > expand_builtin_synchronize(). =46rom Attilio's description of the problem in IRC, I believe that = atomic_signal_fence() is the correct thing to use here. He stated that = he cares about reordering of memory access with regard to the current = CPU, but not with regard to other CPUs / threads. He also said that he = only cares about the compiler performing the reordering, not about the = CPU, but I suspect that is incorrect as there are numerous subtle bugs = that can creep in on weakly-ordered architectures (e.g. Alpha, ARMv8) if = you only have a compiler barrier. That said, this is likely to be incorrect, because it's very unusual for = that to actually be the requirement, especially in multithreaded code = (where the atomic.h stuff is actually important). In most of the cases = where __compiler_membar() is being used, you actually want at least a = partial barrier. =20 On 18 Sep 2012, at 11:22, Konstantin Belousov wrote: > We do not need CPU barriers there, which are already handled by the = atomic > asms. It is only to prevent compiler from exploiting the reorder. If the atomic asm does not state that it clobbers memory, then it is a = bug. If it does clobber memory, then following it with an empty asm = statement that also clobbers memory is redundant. Looking in atomic.h = on amd64, they all do already clobber memory... The atomic operations are memory barriers themselves, although our = versions are often much stronger barriers than are required. I would = like to see us slowly deprecate atomic.h in favour of stdatomic.h, which = has three significant advantages: 1) It's part of the C standard 2) It provides a well-defined set of barrier types for every operation 3) It's implemented with compiler assistance (including GCC 4.2.1 = support in our current version, although that version always enforces = sequentially consistent ordering) and allows the compiler more freedom = to perform safe optimisations around it David= From owner-svn-src-projects@FreeBSD.ORG Tue Sep 18 10:53:32 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F22141065672; Tue, 18 Sep 2012 10:53:31 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 6BD6D8FC0C; Tue, 18 Sep 2012 10:53:30 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q8IArar5095775; Tue, 18 Sep 2012 13:53:36 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q8IArOVF034124; Tue, 18 Sep 2012 13:53:24 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q8IArOpg034123; Tue, 18 Sep 2012 13:53:24 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 18 Sep 2012 13:53:24 +0300 From: Konstantin Belousov To: David Chisnall Message-ID: <20120918105323.GB37286@deviant.kiev.zoral.com.ua> References: <201207301350.q6UDobCI099069@svn.freebsd.org> <201207301732.33474.jhb@freebsd.org> <505849DB.3090704@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PsEZZJjWpOB92CxQ" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Davide Italiano , src-committers@freebsd.org, John Baldwin , Jeff Roberson , Dimitry Andric , attilio@freebsd.org, svn-src-projects@freebsd.org Subject: Re: svn commit: r238907 - projects/calloutng/sys/kern X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2012 10:53:32 -0000 --PsEZZJjWpOB92CxQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 18, 2012 at 11:29:31AM +0100, David Chisnall wrote: > On 18 Sep 2012, at 11:15, Dimitry Andric wrote: >=20 > > Please use gcc's __sync_synchronize() builtin[1] instead, which is > > specifically for this purpose. Clang also supports it. > >=20 > > The builtin will emit actual memory barrier instructions, if the target > > architecture supports it, otherwise it will emit the same asm statement > > you show above. See contrib/gcc/builtins.c, around line 5584, function > > expand_builtin_synchronize(). >=20 > >From Attilio's description of the problem in IRC, I believe that > atomic_signal_fence() is the correct thing to use here. He stated that > he cares about reordering of memory access with regard to the current > CPU, but not with regard to other CPUs / threads. He also said that he > only cares about the compiler performing the reordering, not about the > CPU, but I suspect that is incorrect as there are numerous subtle bugs > that can creep in on weakly-ordered architectures (e.g. Alpha, ARMv8) > if you only have a compiler barrier. > How can atomic_SIGNAL_fence be even remotely conceptually right for the kernel execution environment ? The fact that current implementation happens to offer similar guarantees is a coincidense. > That said, this is likely to be incorrect, because it's very unusual > for that to actually be the requirement, especially in multithreaded > code (where the atomic.h stuff is actually important). In most of the > cases where __compiler_membar() is being used, you actually want at > least a partial barrier. > > On 18 Sep 2012, at 11:22, Konstantin Belousov wrote: > > > We do not need CPU barriers there, which are already handled by the > > atomic asms. It is only to prevent compiler from exploiting the > > reorder. > > If the atomic asm does not state that it clobbers memory, then it is > a bug. If it does clobber memory, then following it with an empty asm > statement that also clobbers memory is redundant. Looking in atomic.h > on amd64, they all do already clobber memory... Agreed, but you did not looked at atomic.h. The memory clobbering is only performed for atomics which do not need asm. The load acquire and store release are implemented as the normal load and stores on x86, due to existing architecture guarantees. > > The atomic operations are memory barriers themselves, although our > versions are often much stronger barriers than are required. I would Exactly which atomic operations for x86 do you reference there ? Are you aware about e.g. AMD recommendations for the barrier/lock prefix use (look into atomic.h) ? > like to see us slowly deprecate atomic.h in favour of stdatomic.h, > which has three significant advantages: > > 1) It's part of the C standard 2) It provides a well-defined set of > barrier types for every operation 3) It's implemented with compiler > assistance (including GCC 4.2.1 support in our current version, > although that version always enforces sequentially consistent > ordering) and allows the compiler more freedom to perform safe > optimisations around it > > David --PsEZZJjWpOB92CxQ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAlBYUqMACgkQC3+MBN1Mb4jaIgCfRZeM2FFP2yjmOvqCndf2QZPi OmcAn0JXZeBN3AkuMRw2V2V/bVi1sL9G =w8rI -----END PGP SIGNATURE----- --PsEZZJjWpOB92CxQ-- From owner-svn-src-projects@FreeBSD.ORG Tue Sep 18 12:15:04 2012 Return-Path: Delivered-To: svn-src-projects@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5B7231065670; Tue, 18 Sep 2012 12:15:04 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) by mx1.freebsd.org (Postfix) with ESMTP id ED02A8FC12; Tue, 18 Sep 2012 12:15:03 +0000 (UTC) Received: from c120.sec.cl.cam.ac.uk (c120.sec.cl.cam.ac.uk [128.232.18.120]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id q8ICF0ST077916 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Tue, 18 Sep 2012 12:15:00 GMT (envelope-from theraven@FreeBSD.org) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: David Chisnall In-Reply-To: <20120918105323.GB37286@deviant.kiev.zoral.com.ua> Date: Tue, 18 Sep 2012 13:15:01 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201207301350.q6UDobCI099069@svn.freebsd.org> <201207301732.33474.jhb@freebsd.org> <505849DB.3090704@FreeBSD.org> <20120918105323.GB37286@deviant.kiev.zoral.com.ua> To: Konstantin Belousov X-Mailer: Apple Mail (2.1278) Cc: Davide Italiano , src-committers@FreeBSD.org, John Baldwin , Jeff Roberson , Dimitry Andric , attilio@FreeBSD.org, svn-src-projects@FreeBSD.org Subject: Re: svn commit: r238907 - projects/calloutng/sys/kern X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2012 12:15:04 -0000 On 18 Sep 2012, at 11:53, Konstantin Belousov wrote: > How can atomic_SIGNAL_fence be even remotely conceptually right for = the > kernel execution environment ? The fact that current implementation > happens to offer similar guarantees is a coincidense. atomic_signal_fence() is a barrier that enforces ordering with respect = to memory accesses within the same thread, but in the presence of = asynchronous events. The fact that it contains the word signal is = irrelevant. You may substitute interrupt for signal when reading it if = it makes you happier. > Agreed, but you did not looked at atomic.h. The memory clobbering is > only performed for atomics which do not need asm. The load acquire and > store release are implemented as the normal load and stores on x86, = due > to existing architecture guarantees. Ah, that makes sense, although, again, we have too strong a requirement = here. With a signal fence with an explicit acquire or release memory = ordering (or, better, an atomic_load_explicit() / = atomic_store_explicit() with an associated barrier), on x86 we will get = the single load or store instruction, and the compiler will be free to = reorder instructions except where doing so would conflict with the = barrier semantics. > Exactly which atomic operations for x86 do you reference there ? > Are you aware about e.g. AMD recommendations for the barrier/lock > prefix use (look into atomic.h) ? All of the operations that require inline assembly are, from the = perspective of the compiler, full barriers. They do not need to be = preventing reordering with respect to operations that do not touch = memory. Similarly, where we have acquire or release barriers, the = compiler should be free to either reorder stores or loads in one = direction across the barrier, but is prevented from doing so by the = memory clobber. =20 David= From owner-svn-src-projects@FreeBSD.ORG Tue Sep 18 12:34:54 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1C12D10657FC; Tue, 18 Sep 2012 12:34:54 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id DEF9D8FC14; Tue, 18 Sep 2012 12:34:53 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 3760EB968; Tue, 18 Sep 2012 08:34:53 -0400 (EDT) From: John Baldwin To: David Chisnall Date: Tue, 18 Sep 2012 08:32:50 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <201207301350.q6UDobCI099069@svn.freebsd.org> <505849DB.3090704@FreeBSD.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201209180832.50694.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 18 Sep 2012 08:34:53 -0400 (EDT) Cc: Davide Italiano , src-committers@freebsd.org, Jeff Roberson , Dimitry Andric , attilio@freebsd.org, svn-src-projects@freebsd.org, Konstantin Belousov Subject: Re: svn commit: r238907 - projects/calloutng/sys/kern X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2012 12:34:54 -0000 On Tuesday, September 18, 2012 6:29:31 am David Chisnall wrote: > On 18 Sep 2012, at 11:15, Dimitry Andric wrote: > > > Please use gcc's __sync_synchronize() builtin[1] instead, which is > > specifically for this purpose. Clang also supports it. > > > > The builtin will emit actual memory barrier instructions, if the target > > architecture supports it, otherwise it will emit the same asm statement > > you show above. See contrib/gcc/builtins.c, around line 5584, function > > expand_builtin_synchronize(). > > From Attilio's description of the problem in IRC, I believe that atomic_signal_fence() is the correct thing to use here. He stated that he cares about reordering of memory access with regard to the current CPU, but not with regard to other CPUs / threads. He also said that he only cares about the compiler performing the reordering, not about the CPU, but I suspect that is incorrect as there are numerous subtle bugs that can creep in on weakly-ordered architectures (e.g. Alpha, ARMv8) if you only have a compiler barrier. Not true. Barriers only affect the order that writes are posted to external viewers (e.g. other processors and devices that perform DMA). On a single CPU barriers are completely meaningless. The types of barriers Attilio is worried about are things like RAW and WAR hazards. CPUs generally handle these things internally (except for ia64 and it's stop bits on bundles, but the compiler is required to insert those to ensure that things still complete in "program order"). Specifically, CPUs will only reorder instructions in a way that does not violate a RAW or WAR hazard. Compilers have similar constraints (they can move constants out of a loop because it is not a WAR). Given that I think your last comment is largely bollocks. :) > That said, this is likely to be incorrect, because it's very unusual for that to actually be the requirement, especially in multithreaded code (where the atomic.h stuff is actually important). In most of the cases where __compiler_membar() is being used, you actually want at least a partial barrier. The specific cases where Attilio wants to use a pure compiler barrier without a full atomic op (that will include appropriate barriers already) are attempting to force the compiler to safely order actions that are sensitive to preemption (e.g. ensuring that td_pinned and td_critnest are properly set before a critical section is entered so that any interrupt that occurs is guaranteed to "see" the result of sched_pin() or critical_enter() before any protected accesses are performed, and similarly to ensure that any protected accesses are completed before the weak "lock" is released via sched_unpin() or critical_exit()). You can think of these as WAR or RAW hazards that the compiler simply has no way of knowing about (and can't). However, assuming the compiler is correct, there are no WAR or RAW hazards that are not visible to the CPU. This is actually very similar to signal handling in userland (signals are basically interrupts for userland), so it may be that atomic_signal_fence() is in fact be correct. -- John Baldwin From owner-svn-src-projects@FreeBSD.ORG Tue Sep 18 12:47:34 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36CE6106566B; Tue, 18 Sep 2012 12:47:34 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id BBDAE8FC17; Tue, 18 Sep 2012 12:47:33 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q8IClfh9007013; Tue, 18 Sep 2012 15:47:41 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q8IClTOn034729; Tue, 18 Sep 2012 15:47:29 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q8IClTlq034728; Tue, 18 Sep 2012 15:47:29 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 18 Sep 2012 15:47:29 +0300 From: Konstantin Belousov To: David Chisnall Message-ID: <20120918124729.GD37286@deviant.kiev.zoral.com.ua> References: <201207301350.q6UDobCI099069@svn.freebsd.org> <201207301732.33474.jhb@freebsd.org> <505849DB.3090704@FreeBSD.org> <20120918105323.GB37286@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tEHm/81IqsjXUEYk" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Davide Italiano , src-committers@freebsd.org, John Baldwin , Jeff Roberson , Dimitry Andric , attilio@freebsd.org, svn-src-projects@freebsd.org Subject: Re: svn commit: r238907 - projects/calloutng/sys/kern X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2012 12:47:34 -0000 --tEHm/81IqsjXUEYk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Can you finally fix your MUA ? On Tue, Sep 18, 2012 at 01:15:01PM +0100, David Chisnall wrote: > On 18 Sep 2012, at 11:53, Konstantin Belousov wrote: >=20 > > How can atomic_SIGNAL_fence be even remotely conceptually right for the > > kernel execution environment ? The fact that current implementation > > happens to offer similar guarantees is a coincidense. >=20 > atomic_signal_fence() is a barrier that enforces ordering with respect > to memory accesses within the same thread, but in the presence of > asynchronous events. The fact that it contains the word signal is > irrelevant. You may substitute interrupt for signal when reading it if > it makes you happier. The standard (or rather, my copy of the committee draft from april 2011) is absolutely unambiguous there, it only talks about signal handlers. >=20 > > Agreed, but you did not looked at atomic.h. The memory clobbering is > > only performed for atomics which do not need asm. The load acquire and > > store release are implemented as the normal load and stores on x86, due > > to existing architecture guarantees. >=20 > Ah, that makes sense, although, again, we have too strong a requirement here. With a signal fence with an explicit acquire or release memory ordering (or, better, an atomic_load_explicit() / atomic_store_explicit() with an associated barrier), on x86 we will get the single load or store instruction, and the compiler will be free to reorder instructions except where doing so would conflict with the barrier semantics. So it is down to allow the compiler to move operations. >=20 > > Exactly which atomic operations for x86 do you reference there ? > > Are you aware about e.g. AMD recommendations for the barrier/lock > > prefix use (look into atomic.h) ? >=20 > All of the operations that require inline assembly are, from the perspect= ive of the compiler, full barriers. They do not need to be preventing reor= dering with respect to operations that do not touch memory. Similarly, whe= re we have acquire or release barriers, the compiler should be free to eith= er reorder stores or loads in one direction across the barrier, but is prev= ented from doing so by the memory clobber. =20 Again, this is down to the compiler' move of operations. I think that we might find a use there for operations like __atomic_compiler_{acq,rel} which would inform the compiler about allowed moves. And no, use of stdatomic.h in or instead of atomic.h cannot be an option. First, stdatomic.h presence is not required for freestanding environment. Second, implementation is allowed to block to guarantee atomicity (with lock free testing functions and related horror). So std conformance is complete moot for our use of atomic.h. --tEHm/81IqsjXUEYk Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAlBYbWEACgkQC3+MBN1Mb4iPAQCgvm1r0U/SXeTE3jZlVwBiYnfn 00QAoJ2z3GcM+68rv/+WERbp0BxprD6/ =Jhqb -----END PGP SIGNATURE----- --tEHm/81IqsjXUEYk-- From owner-svn-src-projects@FreeBSD.ORG Tue Sep 18 14:00:21 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F024D106564A; Tue, 18 Sep 2012 14:00:12 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D9F0E8FC0C; Tue, 18 Sep 2012 14:00:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8IE0BLW005868; Tue, 18 Sep 2012 14:00:11 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8IE0BVQ005867; Tue, 18 Sep 2012 14:00:11 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201209181400.q8IE0BVQ005867@svn.freebsd.org> From: Brooks Davis Date: Tue, 18 Sep 2012 14:00:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240652 - projects/mtree X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2012 14:00:21 -0000 Author: brooks Date: Tue Sep 18 14:00:11 2012 New Revision: 240652 URL: http://svn.freebsd.org/changeset/base/240652 Log: Create a workspace for the merge of NetBSD's mtree and install. Added: - copied from r240651, head/ Directory Properties: projects/mtree/ (props changed) From owner-svn-src-projects@FreeBSD.ORG Tue Sep 18 14:33:28 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2ACE1106566C; Tue, 18 Sep 2012 14:33:28 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 136528FC08; Tue, 18 Sep 2012 14:33:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8IEXSeo010273; Tue, 18 Sep 2012 14:33:28 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8IEXRGn010268; Tue, 18 Sep 2012 14:33:27 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201209181433.q8IEXRGn010268@svn.freebsd.org> From: Brooks Davis Date: Tue, 18 Sep 2012 14:33:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240654 - in projects/mtree: include lib/libc/gen X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2012 14:33:28 -0000 Author: brooks Date: Tue Sep 18 14:33:27 2012 New Revision: 240654 URL: http://svn.freebsd.org/changeset/base/240654 Log: Replace our (un)vis(3) implementation with the one NetBSD. The NetBSD versions are: vis.c 1.44 vis.3 1.27 unvis.c 1.39 unvis.3 1.23 vis.h 1.19 This version breaks the build due to use of VIS_GLOB in our mtree. Modified: projects/mtree/include/vis.h projects/mtree/lib/libc/gen/unvis.3 projects/mtree/lib/libc/gen/unvis.c projects/mtree/lib/libc/gen/vis.3 projects/mtree/lib/libc/gen/vis.c Modified: projects/mtree/include/vis.h ============================================================================== --- projects/mtree/include/vis.h Tue Sep 18 14:05:35 2012 (r240653) +++ projects/mtree/include/vis.h Tue Sep 18 14:33:27 2012 (r240654) @@ -1,3 +1,5 @@ +/* $NetBSD: vis.h,v 1.19 2011/03/12 19:52:45 christos Exp $ */ + /*- * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. @@ -27,41 +29,39 @@ * SUCH DAMAGE. * * @(#)vis.h 8.1 (Berkeley) 6/2/93 - * $FreeBSD$ */ #ifndef _VIS_H_ #define _VIS_H_ -#include - -#ifndef _SIZE_T_DECLARED -typedef __size_t size_t; -#define _SIZE_T_DECLARED -#endif +#include /* * to select alternate encoding format */ -#define VIS_OCTAL 0x01 /* use octal \ddd format */ -#define VIS_CSTYLE 0x02 /* use \[nrft0..] where appropriate */ +#define VIS_OCTAL 0x001 /* use octal \ddd format */ +#define VIS_CSTYLE 0x002 /* use \[nrft0..] where appropiate */ /* * to alter set of characters encoded (default is to encode all * non-graphic except space, tab, and newline). */ -#define VIS_SP 0x04 /* also encode space */ -#define VIS_TAB 0x08 /* also encode tab */ -#define VIS_NL 0x10 /* also encode newline */ +#define VIS_SP 0x004 /* also encode space */ +#define VIS_TAB 0x008 /* also encode tab */ +#define VIS_NL 0x010 /* also encode newline */ #define VIS_WHITE (VIS_SP | VIS_TAB | VIS_NL) -#define VIS_SAFE 0x20 /* only encode "unsafe" characters */ +#define VIS_SAFE 0x020 /* only encode "unsafe" characters */ /* * other */ -#define VIS_NOSLASH 0x40 /* inhibit printing '\' */ -#define VIS_HTTPSTYLE 0x80 /* http-style escape % HEX HEX */ -#define VIS_GLOB 0x100 /* encode glob(3) magics */ +#define VIS_NOSLASH 0x040 /* inhibit printing '\' */ +#define VIS_HTTP1808 0x080 /* http-style escape % hex hex */ +#define VIS_HTTPSTYLE 0x080 /* http-style escape % hex hex */ +#define VIS_MIMESTYLE 0x100 /* mime-style escape = HEX HEX */ +#define VIS_HTTP1866 0x200 /* http-style &#num; or &string; */ +#define VIS_NOESCAPE 0x400 /* don't decode `\' */ +#define _VIS_END 0x800 /* for unvis */ /* * unvis return codes @@ -75,17 +75,38 @@ typedef __size_t size_t; /* * unvis flags */ -#define UNVIS_END 1 /* no more characters */ +#define UNVIS_END _VIS_END /* no more characters */ #include __BEGIN_DECLS char *vis(char *, int, int, int); +char *nvis(char *, size_t, int, int, int); + +char *svis(char *, int, int, int, const char *); +char *snvis(char *, size_t, int, int, int, const char *); + int strvis(char *, const char *, int); +int strnvis(char *, size_t, const char *, int); + +int strsvis(char *, const char *, int, const char *); +int strsnvis(char *, size_t, const char *, int, const char *); + int strvisx(char *, const char *, size_t, int); +int strnvisx(char *, size_t, const char *, size_t, int); + +int strsvisx(char *, const char *, size_t, int, const char *); +int strsnvisx(char *, size_t, const char *, size_t, int, const char *); + int strunvis(char *, const char *); +int strnunvis(char *, size_t, const char *); + int strunvisx(char *, const char *, int); -int unvis(char *, int, int *, int); +int strnunvisx(char *, size_t, const char *, int); + +#ifndef __LIBC12_SOURCE__ +int unvis(char *, int, int *, int) __RENAME(__unvis50); +#endif __END_DECLS #endif /* !_VIS_H_ */ Modified: projects/mtree/lib/libc/gen/unvis.3 ============================================================================== --- projects/mtree/lib/libc/gen/unvis.3 Tue Sep 18 14:05:35 2012 (r240653) +++ projects/mtree/lib/libc/gen/unvis.3 Tue Sep 18 14:33:27 2012 (r240654) @@ -1,3 +1,5 @@ +.\" $NetBSD: unvis.3,v 1.23 2011/03/17 14:06:29 wiz Exp $ +.\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -9,7 +11,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 4. Neither the name of the University nor the names of its contributors +.\" 3. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" @@ -26,9 +28,8 @@ .\" SUCH DAMAGE. .\" .\" @(#)unvis.3 8.2 (Berkeley) 12/11/93 -.\" $FreeBSD$ .\" -.Dd December 11, 1993 +.Dd March 12, 2011 .Dt UNVIS 3 .Os .Sh NAME @@ -44,7 +45,11 @@ .Ft int .Fn strunvis "char *dst" "const char *src" .Ft int +.Fn strnunvis "char *dst" "size_t dlen" "const char *src" +.Ft int .Fn strunvisx "char *dst" "const char *src" "int flag" +.Ft int +.Fn strnunvisx "char *dst" "size_t dlen" "const char *src" "int flag" .Sh DESCRIPTION The .Fn unvis , @@ -57,37 +62,37 @@ by the .Xr vis 3 function, back into the original form. -Unvis is called with successive characters in -.Fa c -until a valid -sequence is recognized, at which time the decoded character is -available at the character pointed to by -.Fa cp . -Strunvis decodes the -characters pointed to by -.Fa src -into the buffer pointed to by -.Fa dst . +.Pp +The +.Fn unvis +function is called with successive characters in +.Ar c +until a valid sequence is recognized, at which time the decoded +character is available at the character pointed to by +.Ar cp . .Pp The .Fn strunvis -function -simply copies -.Fa src +function decodes the characters pointed to by +.Ar src +into the buffer pointed to by +.Ar dst . +The +.Fn strunvis +function simply copies +.Ar src to -.Fa dst , +.Ar dst , decoding any escape sequences along the way, and returns the number of characters placed into -.Fa dst , +.Ar dst , or \-1 if an invalid escape sequence was detected. The size of -.Fa dst -should be -equal to the size of -.Fa src -(that is, no expansion takes place during -decoding). +.Ar dst +should be equal to the size of +.Ar src +(that is, no expansion takes place during decoding). .Pp The .Fn strunvisx @@ -95,32 +100,29 @@ function does the same as the .Fn strunvis function, but it allows you to add a flag that specifies the style the string -.Fa src +.Ar src is encoded with. -Currently, the only supported flag is -.Dv VIS_HTTPSTYLE . +Currently, the supported flags are: +.Dv VIS_HTTPSTYLE +and +.Dv VIS_MIMESTYLE . .Pp The .Fn unvis -function -implements a state machine that can be used to decode an arbitrary -stream of bytes. -All state associated with the bytes being decoded -is stored outside the +function implements a state machine that can be used to decode an +arbitrary stream of bytes. +All state associated with the bytes being decoded is stored outside the .Fn unvis function (that is, a pointer to the state is passed in), so calls decoding different streams can be freely intermixed. -To -start decoding a stream of bytes, first initialize an integer -to zero. +To start decoding a stream of bytes, first initialize an integer to zero. Call .Fn unvis with each successive byte, along with a pointer to this integer, and a pointer to a destination character. The .Fn unvis -function -has several return codes that must be handled properly. +function has several return codes that must be handled properly. They are: .Bl -tag -width UNVIS_VALIDPUSH .It Li \&0 (zero) @@ -134,29 +136,39 @@ pointed to by cp; however, the character be passed in again. .It Dv UNVIS_NOCHAR A valid sequence was detected, but no character was produced. -This -return code is necessary to indicate a logical break between characters. +This return code is necessary to indicate a logical break between characters. .It Dv UNVIS_SYNBAD -An invalid escape sequence was detected, or the decoder is in an -unknown state. +An invalid escape sequence was detected, or the decoder is in an unknown state. The decoder is placed into the starting state. .El .Pp When all bytes in the stream have been processed, call .Fn unvis -one more time with -.Fa flag -set to +one more time with flag set to .Dv UNVIS_END to extract any remaining character (the character passed in is ignored). .Pp The -.Fa flag +.Ar flag argument is also used to specify the encoding style of the source. If set to -.Dv VIS_HTTPSTYLE , +.Dv VIS_HTTPSTYLE +or +.Dv VIS_HTTP1808 , .Fn unvis will decode URI strings as specified in RFC 1808. +If set to +.Dv VIS_HTTP1866 , +.Fn unvis +will decode URI strings as specified in RFC 1866. +If set to +.Dv VIS_MIMESTYLE , +.Fn unvis +will decode MIME Quoted-Printable strings as specified in RFC 2045. +If set to +.Dv VIS_NOESCAPE , +.Fn unvis +will not decode \e quoted characters. .Pp The following code fragment illustrates a proper use of .Fn unvis . @@ -166,25 +178,51 @@ char out; while ((ch = getchar()) != EOF) { again: - switch(unvis(&out, ch, &state, 0)) { + switch(unvis(\*[Am]out, ch, \*[Am]state, 0)) { case 0: case UNVIS_NOCHAR: break; case UNVIS_VALID: - (void) putchar(out); + (void)putchar(out); break; case UNVIS_VALIDPUSH: - (void) putchar(out); + (void)putchar(out); goto again; case UNVIS_SYNBAD: - (void)fprintf(stderr, "bad sequence!\en"); - exit(1); + errx(EXIT_FAILURE, "Bad character sequence!"); } } -if (unvis(&out, (char)0, &state, UNVIS_END) == UNVIS_VALID) - (void) putchar(out); +if (unvis(\*[Am]out, '\e0', \*[Am]state, UNVIS_END) == UNVIS_VALID) + (void)putchar(out); .Ed +.Sh ERRORS +The functions +.Fn strunvis , +.Fn strnunvis , +.Fn strunvisx , +and +.Fn strnunvisx +will return \-1 on error and set +.Va errno +to: +.Bl -tag -width Er +.It Bq Er EINVAL +An invalid escape sequence was detected, or the decoder is in an unknown state. +.El +.Pp +In addition the functions +.Fn strnunvis +and +.Fn strnunvisx +will can also set +.Va errno +on error to: +.Bl -tag -width Er +.It Bq Er ENOSPC +Not enough space to perform the conversion. +.El .Sh SEE ALSO +.Xr unvis 1 , .Xr vis 1 , .Xr vis 3 .Rs @@ -198,3 +236,9 @@ The function first appeared in .Bx 4.4 . +The +.Fn strnunvis +and +.Fn strnunvisx +functions appeared in +.Nx 6.0 . Modified: projects/mtree/lib/libc/gen/unvis.c ============================================================================== --- projects/mtree/lib/libc/gen/unvis.c Tue Sep 18 14:05:35 2012 (r240653) +++ projects/mtree/lib/libc/gen/unvis.c Tue Sep 18 14:33:27 2012 (r240654) @@ -1,3 +1,5 @@ +/* $NetBSD: unvis.c,v 1.39 2012/03/13 21:13:37 christos Exp $ */ + /*- * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. @@ -10,7 +12,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -27,16 +29,30 @@ * SUCH DAMAGE. */ +#include #if defined(LIBC_SCCS) && !defined(lint) +#if 0 static char sccsid[] = "@(#)unvis.c 8.1 (Berkeley) 6/4/93"; +#else +__RCSID("$NetBSD: unvis.c,v 1.39 2012/03/13 21:13:37 christos Exp $"); +#endif #endif /* LIBC_SCCS and not lint */ -#include -__FBSDID("$FreeBSD$"); +#include "namespace.h" #include + +#include #include +#include +#include +#include #include +#ifdef __weak_alias +__weak_alias(strnunvisx,_strnunvisx) +#endif + +#if !HAVE_VIS /* * decode driven by state machine */ @@ -47,12 +63,128 @@ __FBSDID("$FreeBSD$"); #define S_CTRL 4 /* control char started (^) */ #define S_OCTAL2 5 /* octal digit 2 */ #define S_OCTAL3 6 /* octal digit 3 */ -#define S_HEX2 7 /* hex digit 2 */ - -#define S_HTTP 0x080 /* %HEXHEX escape */ +#define S_HEX 7 /* mandatory hex digit */ +#define S_HEX1 8 /* http hex digit */ +#define S_HEX2 9 /* http hex digit 2 */ +#define S_MIME1 10 /* mime hex digit 1 */ +#define S_MIME2 11 /* mime hex digit 2 */ +#define S_EATCRNL 12 /* mime eating CRNL */ +#define S_AMP 13 /* seen & */ +#define S_NUMBER 14 /* collecting number */ +#define S_STRING 15 /* collecting string */ #define isoctal(c) (((u_char)(c)) >= '0' && ((u_char)(c)) <= '7') -#define ishex(c) ((((u_char)(c)) >= '0' && ((u_char)(c)) <= '9') || (((u_char)(c)) >= 'a' && ((u_char)(c)) <= 'f')) +#define xtod(c) (isdigit(c) ? (c - '0') : ((tolower(c) - 'a') + 10)) +#define XTOD(c) (isdigit(c) ? (c - '0') : ((c - 'A') + 10)) + +/* + * RFC 1866 + */ +static const struct nv { + const char *name; + uint8_t value; +} nv[] = { + { "AElig", 198 }, /* capital AE diphthong (ligature) */ + { "Aacute", 193 }, /* capital A, acute accent */ + { "Acirc", 194 }, /* capital A, circumflex accent */ + { "Agrave", 192 }, /* capital A, grave accent */ + { "Aring", 197 }, /* capital A, ring */ + { "Atilde", 195 }, /* capital A, tilde */ + { "Auml", 196 }, /* capital A, dieresis or umlaut mark */ + { "Ccedil", 199 }, /* capital C, cedilla */ + { "ETH", 208 }, /* capital Eth, Icelandic */ + { "Eacute", 201 }, /* capital E, acute accent */ + { "Ecirc", 202 }, /* capital E, circumflex accent */ + { "Egrave", 200 }, /* capital E, grave accent */ + { "Euml", 203 }, /* capital E, dieresis or umlaut mark */ + { "Iacute", 205 }, /* capital I, acute accent */ + { "Icirc", 206 }, /* capital I, circumflex accent */ + { "Igrave", 204 }, /* capital I, grave accent */ + { "Iuml", 207 }, /* capital I, dieresis or umlaut mark */ + { "Ntilde", 209 }, /* capital N, tilde */ + { "Oacute", 211 }, /* capital O, acute accent */ + { "Ocirc", 212 }, /* capital O, circumflex accent */ + { "Ograve", 210 }, /* capital O, grave accent */ + { "Oslash", 216 }, /* capital O, slash */ + { "Otilde", 213 }, /* capital O, tilde */ + { "Ouml", 214 }, /* capital O, dieresis or umlaut mark */ + { "THORN", 222 }, /* capital THORN, Icelandic */ + { "Uacute", 218 }, /* capital U, acute accent */ + { "Ucirc", 219 }, /* capital U, circumflex accent */ + { "Ugrave", 217 }, /* capital U, grave accent */ + { "Uuml", 220 }, /* capital U, dieresis or umlaut mark */ + { "Yacute", 221 }, /* capital Y, acute accent */ + { "aacute", 225 }, /* small a, acute accent */ + { "acirc", 226 }, /* small a, circumflex accent */ + { "acute", 180 }, /* acute accent */ + { "aelig", 230 }, /* small ae diphthong (ligature) */ + { "agrave", 224 }, /* small a, grave accent */ + { "amp", 38 }, /* ampersand */ + { "aring", 229 }, /* small a, ring */ + { "atilde", 227 }, /* small a, tilde */ + { "auml", 228 }, /* small a, dieresis or umlaut mark */ + { "brvbar", 166 }, /* broken (vertical) bar */ + { "ccedil", 231 }, /* small c, cedilla */ + { "cedil", 184 }, /* cedilla */ + { "cent", 162 }, /* cent sign */ + { "copy", 169 }, /* copyright sign */ + { "curren", 164 }, /* general currency sign */ + { "deg", 176 }, /* degree sign */ + { "divide", 247 }, /* divide sign */ + { "eacute", 233 }, /* small e, acute accent */ + { "ecirc", 234 }, /* small e, circumflex accent */ + { "egrave", 232 }, /* small e, grave accent */ + { "eth", 240 }, /* small eth, Icelandic */ + { "euml", 235 }, /* small e, dieresis or umlaut mark */ + { "frac12", 189 }, /* fraction one-half */ + { "frac14", 188 }, /* fraction one-quarter */ + { "frac34", 190 }, /* fraction three-quarters */ + { "gt", 62 }, /* greater than */ + { "iacute", 237 }, /* small i, acute accent */ + { "icirc", 238 }, /* small i, circumflex accent */ + { "iexcl", 161 }, /* inverted exclamation mark */ + { "igrave", 236 }, /* small i, grave accent */ + { "iquest", 191 }, /* inverted question mark */ + { "iuml", 239 }, /* small i, dieresis or umlaut mark */ + { "laquo", 171 }, /* angle quotation mark, left */ + { "lt", 60 }, /* less than */ + { "macr", 175 }, /* macron */ + { "micro", 181 }, /* micro sign */ + { "middot", 183 }, /* middle dot */ + { "nbsp", 160 }, /* no-break space */ + { "not", 172 }, /* not sign */ + { "ntilde", 241 }, /* small n, tilde */ + { "oacute", 243 }, /* small o, acute accent */ + { "ocirc", 244 }, /* small o, circumflex accent */ + { "ograve", 242 }, /* small o, grave accent */ + { "ordf", 170 }, /* ordinal indicator, feminine */ + { "ordm", 186 }, /* ordinal indicator, masculine */ + { "oslash", 248 }, /* small o, slash */ + { "otilde", 245 }, /* small o, tilde */ + { "ouml", 246 }, /* small o, dieresis or umlaut mark */ + { "para", 182 }, /* pilcrow (paragraph sign) */ + { "plusmn", 177 }, /* plus-or-minus sign */ + { "pound", 163 }, /* pound sterling sign */ + { "quot", 34 }, /* double quote */ + { "raquo", 187 }, /* angle quotation mark, right */ + { "reg", 174 }, /* registered sign */ + { "sect", 167 }, /* section sign */ + { "shy", 173 }, /* soft hyphen */ + { "sup1", 185 }, /* superscript one */ + { "sup2", 178 }, /* superscript two */ + { "sup3", 179 }, /* superscript three */ + { "szlig", 223 }, /* small sharp s, German (sz ligature) */ + { "thorn", 254 }, /* small thorn, Icelandic */ + { "times", 215 }, /* multiply sign */ + { "uacute", 250 }, /* small u, acute accent */ + { "ucirc", 251 }, /* small u, circumflex accent */ + { "ugrave", 249 }, /* small u, grave accent */ + { "uml", 168 }, /* umlaut (dieresis) */ + { "uuml", 252 }, /* small u, dieresis or umlaut mark */ + { "yacute", 253 }, /* small y, acute accent */ + { "yen", 165 }, /* yen sign */ + { "yuml", 255 }, /* small y, dieresis or umlaut mark */ +}; /* * unvis - decode characters previously encoded by vis @@ -60,234 +192,362 @@ __FBSDID("$FreeBSD$"); int unvis(char *cp, int c, int *astate, int flag) { + unsigned char uc = (unsigned char)c; + unsigned char st, ia, is, lc; + +/* + * Bottom 8 bits of astate hold the state machine state. + * Top 8 bits hold the current character in the http 1866 nv string decoding + */ +#define GS(a) ((a) & 0xff) +#define SS(a, b) (((uint32_t)(a) << 24) | (b)) +#define GI(a) ((uint32_t)(a) >> 24) + + _DIAGASSERT(cp != NULL); + _DIAGASSERT(astate != NULL); + st = GS(*astate); if (flag & UNVIS_END) { - if (*astate == S_OCTAL2 || *astate == S_OCTAL3) { - *astate = S_GROUND; - return (UNVIS_VALID); + switch (st) { + case S_OCTAL2: + case S_OCTAL3: + case S_HEX2: + *astate = SS(0, S_GROUND); + return UNVIS_VALID; + case S_GROUND: + return UNVIS_NOCHAR; + default: + return UNVIS_SYNBAD; } - return (*astate == S_GROUND ? UNVIS_NOCHAR : UNVIS_SYNBAD); } - switch (*astate & ~S_HTTP) { + switch (st) { case S_GROUND: *cp = 0; - if (c == '\\') { - *astate = S_START; - return (0); - } - if (flag & VIS_HTTPSTYLE && c == '%') { - *astate = S_START | S_HTTP; - return (0); + if ((flag & VIS_NOESCAPE) == 0 && c == '\\') { + *astate = SS(0, S_START); + return UNVIS_NOCHAR; + } + if ((flag & VIS_HTTP1808) && c == '%') { + *astate = SS(0, S_HEX1); + return UNVIS_NOCHAR; + } + if ((flag & VIS_HTTP1866) && c == '&') { + *astate = SS(0, S_AMP); + return UNVIS_NOCHAR; + } + if ((flag & VIS_MIMESTYLE) && c == '=') { + *astate = SS(0, S_MIME1); + return UNVIS_NOCHAR; } *cp = c; - return (UNVIS_VALID); + return UNVIS_VALID; case S_START: - if (*astate & S_HTTP) { - if (ishex(tolower(c))) { - *cp = isdigit(c) ? (c - '0') : (tolower(c) - 'a'); - *astate = S_HEX2; - return (0); - } - } switch(c) { case '\\': *cp = c; - *astate = S_GROUND; - return (UNVIS_VALID); + *astate = SS(0, S_GROUND); + return UNVIS_VALID; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': *cp = (c - '0'); - *astate = S_OCTAL2; - return (0); + *astate = SS(0, S_OCTAL2); + return UNVIS_NOCHAR; case 'M': - *cp = 0200; - *astate = S_META; - return (0); + *cp = (char)0200; + *astate = SS(0, S_META); + return UNVIS_NOCHAR; case '^': - *astate = S_CTRL; - return (0); + *astate = SS(0, S_CTRL); + return UNVIS_NOCHAR; case 'n': *cp = '\n'; - *astate = S_GROUND; - return (UNVIS_VALID); + *astate = SS(0, S_GROUND); + return UNVIS_VALID; case 'r': *cp = '\r'; - *astate = S_GROUND; - return (UNVIS_VALID); + *astate = SS(0, S_GROUND); + return UNVIS_VALID; case 'b': *cp = '\b'; - *astate = S_GROUND; - return (UNVIS_VALID); + *astate = SS(0, S_GROUND); + return UNVIS_VALID; case 'a': *cp = '\007'; - *astate = S_GROUND; - return (UNVIS_VALID); + *astate = SS(0, S_GROUND); + return UNVIS_VALID; case 'v': *cp = '\v'; - *astate = S_GROUND; - return (UNVIS_VALID); + *astate = SS(0, S_GROUND); + return UNVIS_VALID; case 't': *cp = '\t'; - *astate = S_GROUND; - return (UNVIS_VALID); + *astate = SS(0, S_GROUND); + return UNVIS_VALID; case 'f': *cp = '\f'; - *astate = S_GROUND; - return (UNVIS_VALID); + *astate = SS(0, S_GROUND); + return UNVIS_VALID; case 's': *cp = ' '; - *astate = S_GROUND; - return (UNVIS_VALID); + *astate = SS(0, S_GROUND); + return UNVIS_VALID; case 'E': *cp = '\033'; - *astate = S_GROUND; - return (UNVIS_VALID); + *astate = SS(0, S_GROUND); + return UNVIS_VALID; + case 'x': + *astate = SS(0, S_HEX); + return UNVIS_NOCHAR; case '\n': /* * hidden newline */ - *astate = S_GROUND; - return (UNVIS_NOCHAR); + *astate = SS(0, S_GROUND); + return UNVIS_NOCHAR; case '$': /* * hidden marker */ - *astate = S_GROUND; - return (UNVIS_NOCHAR); + *astate = SS(0, S_GROUND); + return UNVIS_NOCHAR; } - *astate = S_GROUND; - return (UNVIS_SYNBAD); + goto bad; case S_META: if (c == '-') - *astate = S_META1; + *astate = SS(0, S_META1); else if (c == '^') - *astate = S_CTRL; - else { - *astate = S_GROUND; - return (UNVIS_SYNBAD); - } - return (0); + *astate = SS(0, S_CTRL); + else + goto bad; + return UNVIS_NOCHAR; case S_META1: - *astate = S_GROUND; + *astate = SS(0, S_GROUND); *cp |= c; - return (UNVIS_VALID); + return UNVIS_VALID; case S_CTRL: if (c == '?') *cp |= 0177; else *cp |= c & 037; - *astate = S_GROUND; - return (UNVIS_VALID); + *astate = SS(0, S_GROUND); + return UNVIS_VALID; case S_OCTAL2: /* second possible octal digit */ - if (isoctal(c)) { + if (isoctal(uc)) { /* * yes - and maybe a third */ *cp = (*cp << 3) + (c - '0'); - *astate = S_OCTAL3; - return (0); + *astate = SS(0, S_OCTAL3); + return UNVIS_NOCHAR; } /* * no - done with current sequence, push back passed char */ - *astate = S_GROUND; - return (UNVIS_VALIDPUSH); + *astate = SS(0, S_GROUND); + return UNVIS_VALIDPUSH; case S_OCTAL3: /* third possible octal digit */ - *astate = S_GROUND; - if (isoctal(c)) { + *astate = SS(0, S_GROUND); + if (isoctal(uc)) { *cp = (*cp << 3) + (c - '0'); - return (UNVIS_VALID); + return UNVIS_VALID; } /* * we were done, push back passed char */ - return (UNVIS_VALIDPUSH); + return UNVIS_VALIDPUSH; - case S_HEX2: /* second mandatory hex digit */ - if (ishex(tolower(c))) { - *cp = (isdigit(c) ? (*cp << 4) + (c - '0') : (*cp << 4) + (tolower(c) - 'a' + 10)); + case S_HEX: + if (!isxdigit(uc)) + goto bad; + /*FALLTHROUGH*/ + case S_HEX1: + if (isxdigit(uc)) { + *cp = xtod(uc); + *astate = SS(0, S_HEX2); + return UNVIS_NOCHAR; } + /* + * no - done with current sequence, push back passed char + */ + *astate = SS(0, S_GROUND); + return UNVIS_VALIDPUSH; + + case S_HEX2: *astate = S_GROUND; - return (UNVIS_VALID); + if (isxdigit(uc)) { + *cp = xtod(uc) | (*cp << 4); + return UNVIS_VALID; + } + return UNVIS_VALIDPUSH; + + case S_MIME1: + if (uc == '\n' || uc == '\r') { + *astate = SS(0, S_EATCRNL); + return UNVIS_NOCHAR; + } + if (isxdigit(uc) && (isdigit(uc) || isupper(uc))) { + *cp = XTOD(uc); + *astate = SS(0, S_MIME2); + return UNVIS_NOCHAR; + } + goto bad; + + case S_MIME2: + if (isxdigit(uc) && (isdigit(uc) || isupper(uc))) { + *astate = SS(0, S_GROUND); + *cp = XTOD(uc) | (*cp << 4); + return UNVIS_VALID; + } + goto bad; + + case S_EATCRNL: + switch (uc) { + case '\r': + case '\n': + return UNVIS_NOCHAR; + case '=': + *astate = SS(0, S_MIME1); + return UNVIS_NOCHAR; + default: + *cp = uc; + *astate = SS(0, S_GROUND); + return UNVIS_VALID; + } + + case S_AMP: + *cp = 0; + if (uc == '#') { + *astate = SS(0, S_NUMBER); + return UNVIS_NOCHAR; + } + *astate = SS(0, S_STRING); + /*FALLTHROUGH*/ + + case S_STRING: + ia = *cp; /* index in the array */ + is = GI(*astate); /* index in the string */ + lc = is == 0 ? 0 : nv[ia].name[is - 1]; /* last character */ + + if (uc == ';') + uc = '\0'; + + for (; ia < __arraycount(nv); ia++) { + if (is != 0 && nv[ia].name[is - 1] != lc) + goto bad; + if (nv[ia].name[is] == uc) + break; + } + + if (ia == __arraycount(nv)) + goto bad; + + if (uc != 0) { + *cp = ia; + *astate = SS(is + 1, S_STRING); + return UNVIS_NOCHAR; + } + + *cp = nv[ia].value; + *astate = SS(0, S_GROUND); + return UNVIS_VALID; + + case S_NUMBER: + if (uc == ';') + return UNVIS_VALID; + if (!isdigit(uc)) + goto bad; + *cp += (*cp * 10) + uc - '0'; + return UNVIS_NOCHAR; default: + bad: /* * decoder in unknown state - (probably uninitialized) */ - *astate = S_GROUND; - return (UNVIS_SYNBAD); + *astate = SS(0, S_GROUND); + return UNVIS_SYNBAD; } } /* - * strunvis - decode src into dst + * strnunvisx - decode src into dst * * Number of chars decoded into dst is returned, -1 on error. * Dst is null terminated. */ int -strunvis(char *dst, const char *src) +strnunvisx(char *dst, size_t dlen, const char *src, int flag) { char c; - char *start = dst; + char t = '\0', *start = dst; int state = 0; - while ( (c = *src++) ) { - again: - switch (unvis(dst, c, &state, 0)) { + _DIAGASSERT(src != NULL); + _DIAGASSERT(dst != NULL); +#define CHECKSPACE() \ + do { \ + if (dlen-- == 0) { \ + errno = ENOSPC; \ + return -1; \ + } \ + } while (/*CONSTCOND*/0) + + while ((c = *src++) != '\0') { + again: + switch (unvis(&t, c, &state, flag)) { case UNVIS_VALID: - dst++; + CHECKSPACE(); + *dst++ = t; break; case UNVIS_VALIDPUSH: - dst++; + CHECKSPACE(); + *dst++ = t; goto again; case 0: case UNVIS_NOCHAR: break; + case UNVIS_SYNBAD: + errno = EINVAL; + return -1; default: - return (-1); + _DIAGASSERT(/*CONSTCOND*/0); + errno = EINVAL; + return -1; } } - if (unvis(dst, c, &state, UNVIS_END) == UNVIS_VALID) - dst++; + if (unvis(&t, c, &state, UNVIS_END) == UNVIS_VALID) { + CHECKSPACE(); + *dst++ = t; + } + CHECKSPACE(); *dst = '\0'; - return (dst - start); + return (int)(dst - start); } int strunvisx(char *dst, const char *src, int flag) { - char c; - char *start = dst; - int state = 0; - - while ( (c = *src++) ) { - again: - switch (unvis(dst, c, &state, flag)) { - case UNVIS_VALID: - dst++; - break; - case UNVIS_VALIDPUSH: - dst++; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Tue Sep 18 15:30:59 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70C8D106564A; Tue, 18 Sep 2012 15:30:59 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id CBB968FC08; Tue, 18 Sep 2012 15:30:57 +0000 (UTC) Received: by lbbgg13 with SMTP id gg13so117939lbb.13 for ; Tue, 18 Sep 2012 08:30:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=klxUElMZ5fHhpEttMNMvAfZgeIDjIPwYXiyLQx/keKE=; b=TcVOyF/BafIidfKm//bRBRZE/LwPRCMU7gcl/qLY2C+s6aqpyhr7Y0an/iv5/fTSe8 KQsSbEVsyK+1RlnKYjQe3vuAzNwp6z7rKlyd96iDfU0jMIZ7rVgbG+SNFbawlad2kTad brRu1ZcyvvTt18WraQx0VXZIZ/ZbYXOMpNA0sxZj9R0mkegCZQEDZGfssIQRN2pTdHmo zKN8kZwajlo7p8Cq1/W8mEi2HhBMsFi7sSDjfZyr7ID0fLGbxcyPYS+Hjy208C7/4BHl +/4ExdpEoCUFZd/rsQlXKWVmv8PvlweidYl/aJ01S0DT2vUeeTwxhSVTkJ8MDUssWOeT ibOg== MIME-Version: 1.0 Received: by 10.152.144.2 with SMTP id si2mr169230lab.26.1347982256293; Tue, 18 Sep 2012 08:30:56 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.102.39 with HTTP; Tue, 18 Sep 2012 08:30:56 -0700 (PDT) In-Reply-To: <20120918083324.GX37286@deviant.kiev.zoral.com.ua> References: <201207301350.q6UDobCI099069@svn.freebsd.org> <201207301732.33474.jhb@freebsd.org> <20120918083324.GX37286@deviant.kiev.zoral.com.ua> Date: Tue, 18 Sep 2012 16:30:56 +0100 X-Google-Sender-Auth: _eIgAW_HzzeZcnLfkKj4Mobt8Ws Message-ID: From: Attilio Rao To: Konstantin Belousov Content-Type: text/plain; charset=UTF-8 Cc: Davide Italiano , src-committers@freebsd.org, John Baldwin , Jeff Roberson , Dimitry Andric , svn-src-projects@freebsd.org Subject: Re: svn commit: r238907 - projects/calloutng/sys/kern X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2012 15:30:59 -0000 On 9/18/12, Konstantin Belousov wrote: > On Tue, Sep 18, 2012 at 01:13:08AM +0100, Attilio Rao wrote: >> diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h >> index 8224672..fc6a75f 100644 >> --- a/sys/sys/cdefs.h >> +++ b/sys/sys/cdefs.h >> @@ -114,6 +114,13 @@ >> #endif >> >> /* >> + * Compiler memory barriers, specific to gcc and clang. >> + */ >> +#if defined(__GNUC__) >> +#define __compiler_membar() __asm __volatile(" " : : : >> "memory") >> +#endif >> + >> +/* > > Traditionally, we do provide the fallback for non-GNUC compilers, by > defining extern function with the compatible signature. In this case, > the empty function just works for the purpose, although with higher > overhead than the GNUC case. I agree, we need a fallback here. Unfortunately I'm buried with job stuff but I will provide an errata patch ASAP. Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-projects@FreeBSD.ORG Tue Sep 18 15:39:58 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B302E1065675; Tue, 18 Sep 2012 15:39:58 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id EE9508FC1B; Tue, 18 Sep 2012 15:39:56 +0000 (UTC) Received: by lbbgg13 with SMTP id gg13so127823lbb.13 for ; Tue, 18 Sep 2012 08:39:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=PTEdgrneNafq+yU3tzH3SLeSbBbGZayTGHvPU4SIZro=; b=ij/xjf1Az6yg6RpRolpLnBW7hFRU6CjZP5CGCtDZrGL9a0xfGnKk4KdPQYyOlpgUe3 mO2SWypJ6f6J+eqBl1QjpY8dbEYRCz3G+pBBa5OV8EpwWW6mGe78PmIHwfFTp2pCdfUX izGxnL9D3f43JCaYe8+chy2X/TI3sCMHwvgKj8ok31uX7Xd0If26SlesMv8JZK7TvrgA K+BYioTpSWGmLhB0buiJ6dWy6Lq2w4GcfLKHJzAh4LrxkaWNeh6PEqF1bc0UD3kAK8sW EpvrevTLFsRHw49FMS/KoA4hf76O9StkogKplZbFwQ3iwS8yNr0MJkIbJeWk5ye2ep7I bMGA== MIME-Version: 1.0 Received: by 10.112.103.71 with SMTP id fu7mr86296lbb.21.1347982795671; Tue, 18 Sep 2012 08:39:55 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.102.39 with HTTP; Tue, 18 Sep 2012 08:39:55 -0700 (PDT) In-Reply-To: <201209180832.50694.jhb@freebsd.org> References: <201207301350.q6UDobCI099069@svn.freebsd.org> <505849DB.3090704@FreeBSD.org> <201209180832.50694.jhb@freebsd.org> Date: Tue, 18 Sep 2012 16:39:55 +0100 X-Google-Sender-Auth: vu_nnb2WId7s-RTe-XGJyRpyUzI Message-ID: From: Attilio Rao To: John Baldwin Content-Type: text/plain; charset=UTF-8 Cc: Davide Italiano , src-committers@freebsd.org, David Chisnall , Jeff Roberson , Dimitry Andric , svn-src-projects@freebsd.org, Konstantin Belousov Subject: Re: svn commit: r238907 - projects/calloutng/sys/kern X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2012 15:39:58 -0000 On 9/18/12, John Baldwin wrote: > On Tuesday, September 18, 2012 6:29:31 am David Chisnall wrote: >> On 18 Sep 2012, at 11:15, Dimitry Andric wrote: >> >> > Please use gcc's __sync_synchronize() builtin[1] instead, which is >> > specifically for this purpose. Clang also supports it. >> > >> > The builtin will emit actual memory barrier instructions, if the target >> > architecture supports it, otherwise it will emit the same asm statement >> > you show above. See contrib/gcc/builtins.c, around line 5584, function >> > expand_builtin_synchronize(). >> >> From Attilio's description of the problem in IRC, I believe that > atomic_signal_fence() is the correct thing to use here. He stated that he > cares about reordering of memory access with regard to the current CPU, but > > not with regard to other CPUs / threads. He also said that he only cares > about the compiler performing the reordering, not about the CPU, but I > suspect > that is incorrect as there are numerous subtle bugs that can creep in on > weakly-ordered architectures (e.g. Alpha, ARMv8) if you only have a compiler > > barrier. > > Not true. Barriers only affect the order that writes are posted to > external > viewers (e.g. other processors and devices that perform DMA). On a single > CPU barriers are completely meaningless. The types of barriers Attilio is > worried about are things like RAW and WAR hazards. CPUs generally handle > these things internally (except for ia64 and it's stop bits on bundles, but > the compiler is required to insert those to ensure that things still > complete > in "program order"). > > Specifically, CPUs will only reorder instructions in a way that does not > violate a RAW or WAR hazard. Compilers have similar constraints (they can > move constants out of a loop because it is not a WAR). Given that I think > your last comment is largely bollocks. :) > >> That said, this is likely to be incorrect, because it's very unusual for > that to actually be the requirement, especially in multithreaded code (where > > the atomic.h stuff is actually important). In most of the cases where > __compiler_membar() is being used, you actually want at least a partial > barrier. > > The specific cases where Attilio wants to use a pure compiler barrier > without a full atomic op (that will include appropriate barriers already) > are attempting to force the compiler to safely order actions that are > sensitive to preemption (e.g. ensuring that td_pinned and td_critnest are > properly set before a critical section is entered so that any interrupt > that occurs is guaranteed to "see" the result of sched_pin() or > critical_enter() before any protected accesses are performed, and similarly > to ensure that any protected accesses are completed before the weak "lock" > is released via sched_unpin() or critical_exit()). You can think of these > as WAR or RAW hazards that the compiler simply has no way of knowing about > (and can't). However, assuming the compiler is correct, there are no > WAR or RAW hazards that are not visible to the CPU. > > This is actually very similar to signal handling in userland (signals are > basically interrupts for userland), so it may be that atomic_signal_fence() > is > in fact be correct. Per standard description, atomic_signal_fence() seems being very similar to hw memory barrier semantic rather than compiler memory barrier. Also, the standard specifically mention signal handler, besides our interpretation of it being applicable to interrupts in kernel context too. In general one may argue we use stdatomic.h rather than atomic.h but I completely agree with kib@ on his later e-mail on the topic. In definitive, I think that the patch I proposed is still fully valid, modulo the fallback. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-projects@FreeBSD.ORG Tue Sep 18 16:23:23 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E4338106566B; Tue, 18 Sep 2012 16:23:23 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CF4D28FC12; Tue, 18 Sep 2012 16:23:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8IGNNVK023968; Tue, 18 Sep 2012 16:23:23 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8IGNNbK023964; Tue, 18 Sep 2012 16:23:23 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201209181623.q8IGNNbK023964@svn.freebsd.org> From: Brooks Davis Date: Tue, 18 Sep 2012 16:23:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240658 - in projects/mtree: include lib/libc/gen X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2012 16:23:24 -0000 Author: brooks Date: Tue Sep 18 16:23:23 2012 New Revision: 240658 URL: http://svn.freebsd.org/changeset/base/240658 Log: Work around the lack of some NetBSD macros from sys/cdefs.h. Modified: projects/mtree/include/vis.h projects/mtree/lib/libc/gen/unvis.c projects/mtree/lib/libc/gen/vis.c Modified: projects/mtree/include/vis.h ============================================================================== --- projects/mtree/include/vis.h Tue Sep 18 16:01:25 2012 (r240657) +++ projects/mtree/include/vis.h Tue Sep 18 16:23:23 2012 (r240658) @@ -105,7 +105,7 @@ int strunvisx(char *, const char *, int) int strnunvisx(char *, size_t, const char *, int); #ifndef __LIBC12_SOURCE__ -int unvis(char *, int, int *, int) __RENAME(__unvis50); +int unvis(char *, int, int *, int); #endif __END_DECLS Modified: projects/mtree/lib/libc/gen/unvis.c ============================================================================== --- projects/mtree/lib/libc/gen/unvis.c Tue Sep 18 16:01:25 2012 (r240657) +++ projects/mtree/lib/libc/gen/unvis.c Tue Sep 18 16:23:23 2012 (r240658) @@ -48,6 +48,14 @@ __RCSID("$NetBSD: unvis.c,v 1.39 2012/03 #include #include +#define _DIAGASSERT(x) assert(x) + +/* + * Return the number of elements in a statically-allocated array, + * __x. + */ +#define __arraycount(__x) (sizeof(__x) / sizeof(__x[0])) + #ifdef __weak_alias __weak_alias(strnunvisx,_strnunvisx) #endif Modified: projects/mtree/lib/libc/gen/vis.c ============================================================================== --- projects/mtree/lib/libc/gen/vis.c Tue Sep 18 16:01:25 2012 (r240657) +++ projects/mtree/lib/libc/gen/vis.c Tue Sep 18 16:23:23 2012 (r240658) @@ -78,6 +78,8 @@ __weak_alias(strvisx,_strvisx) #include #include +#define _DIAGASSERT(x) assert(x) + static char *do_svis(char *, size_t *, int, int, int, const char *); #undef BELL From owner-svn-src-projects@FreeBSD.ORG Tue Sep 18 19:00:52 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0EE68106564A; Tue, 18 Sep 2012 19:00:52 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 5CAD68FC12; Tue, 18 Sep 2012 19:00:49 +0000 (UTC) Received: by lahe6 with SMTP id e6so7139lah.13 for ; Tue, 18 Sep 2012 12:00:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=CuR34U0p/4G2mmwNAeNjJnB+b8PUx8v5rVPXGGl+Ubo=; b=B1ngsx2rLNG6lAA6a8IEwdrlpQHEU8IOW3a+BIeaG07Y0CpbjsMQraUvnJ4g75BFUZ kx7neDFOq+9BqqMc0QM4Lvo4VvY3r0q6aPfff8n3DAYfzegf0QIdh7cMJMfGSG3pc5kG vzpajRyqCUZND/o/Yn1x4bqnAuRBOgrPD0WC+jX8eCVmUDizv/L5ppuLa+HSVOhlS5vT vkPKXFojVOaHTG23ZFreeOEMWlk6clw7fiSv5VTP9wHztJsuK/ZCVRQc68/6UXMBzpZu RTwuR3D5qs4R6nZy3pn0deJBs96akg79dz8T+RMgOoNndA9muouDHDN4O3O01/7fF/vO zzmw== MIME-Version: 1.0 Received: by 10.152.131.68 with SMTP id ok4mr589903lab.47.1347994848689; Tue, 18 Sep 2012 12:00:48 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.102.39 with HTTP; Tue, 18 Sep 2012 12:00:48 -0700 (PDT) In-Reply-To: References: <201207301350.q6UDobCI099069@svn.freebsd.org> <201207301732.33474.jhb@freebsd.org> <20120918083324.GX37286@deviant.kiev.zoral.com.ua> Date: Tue, 18 Sep 2012 20:00:48 +0100 X-Google-Sender-Auth: 82XaShVBfQZMvfG9kLpp8RBDVF8 Message-ID: From: Attilio Rao To: Konstantin Belousov Content-Type: text/plain; charset=UTF-8 Cc: Davide Italiano , src-committers@freebsd.org, John Baldwin , Jeff Roberson , Dimitry Andric , svn-src-projects@freebsd.org Subject: Re: svn commit: r238907 - projects/calloutng/sys/kern X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2012 19:00:52 -0000 On Tue, Sep 18, 2012 at 4:30 PM, Attilio Rao wrote: > On 9/18/12, Konstantin Belousov wrote: >> On Tue, Sep 18, 2012 at 01:13:08AM +0100, Attilio Rao wrote: >>> diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h >>> index 8224672..fc6a75f 100644 >>> --- a/sys/sys/cdefs.h >>> +++ b/sys/sys/cdefs.h >>> @@ -114,6 +114,13 @@ >>> #endif >>> >>> /* >>> + * Compiler memory barriers, specific to gcc and clang. >>> + */ >>> +#if defined(__GNUC__) >>> +#define __compiler_membar() __asm __volatile(" " : : : >>> "memory") >>> +#endif >>> + >>> +/* >> >> Traditionally, we do provide the fallback for non-GNUC compilers, by >> defining extern function with the compatible signature. In this case, >> the empty function just works for the purpose, although with higher >> overhead than the GNUC case. > > I agree, we need a fallback here. Unfortunately I'm buried with job > stuff but I will provide an errata patch ASAP. Here is the patch. I didn't use a real extern function body for it, but just went with an empty macro. Attilio Index: sys/sparc64/include/atomic.h =================================================================== --- sys/sparc64/include/atomic.h (revisione 240672) +++ sys/sparc64/include/atomic.h (copia locale) @@ -97,7 +97,7 @@ #define atomic_cas_acq(p, e, s, sz) ({ \ itype(sz) v; \ v = atomic_cas((p), (e), (s), sz); \ - __asm __volatile("" : : : "memory"); \ + __compiler_membar(); \ v; \ }) @@ -122,7 +122,7 @@ #define atomic_op_acq(p, op, v, sz) ({ \ itype(sz) t; \ t = atomic_op((p), op, (v), sz); \ - __asm __volatile("" : : : "memory"); \ + __compiler_membar(); \ t; \ }) @@ -139,7 +139,7 @@ #define atomic_load_acq(p, sz) ({ \ itype(sz) v; \ v = atomic_load((p), sz); \ - __asm __volatile("" : : : "memory"); \ + __compiler_membar(); \ v; \ }) Index: sys/pc98/include/bus.h =================================================================== --- sys/pc98/include/bus.h (revisione 240672) +++ sys/pc98/include/bus.h (copia locale) @@ -593,7 +593,7 @@ bus_space_barrier(bus_space_tag_t tag, bus_space_h if (flags & BUS_SPACE_BARRIER_READ) __asm __volatile("lock; addl $0,0(%%esp)" : : : "memory"); else - __asm __volatile("" : : : "memory"); + __compiler_membar(); } #ifdef BUS_SPACE_NO_LEGACY Index: sys/i386/include/atomic.h =================================================================== --- sys/i386/include/atomic.h (revisione 240672) +++ sys/i386/include/atomic.h (copia locale) @@ -296,7 +296,7 @@ atomic_fetchadd_int(volatile u_int *p, u_int v) static __inline void \ atomic_store_rel_##TYPE(volatile u_##TYPE *p, u_##TYPE v)\ { \ - __asm __volatile("" : : : "memory"); \ + __compiler_membar(); \ *p = v; \ } \ struct __hack @@ -310,7 +310,7 @@ atomic_load_acq_##TYPE(volatile u_##TYPE *p) \ u_##TYPE tmp; \ \ tmp = *p; \ - __asm __volatile("" : : : "memory"); \ + __compiler_membar(); \ return (tmp); \ } \ struct __hack Index: sys/amd64/include/atomic.h =================================================================== --- sys/amd64/include/atomic.h (revisione 240672) +++ sys/amd64/include/atomic.h (copia locale) @@ -226,7 +226,7 @@ atomic_fetchadd_long(volatile u_long *p, u_long v) static __inline void \ atomic_store_rel_##TYPE(volatile u_##TYPE *p, u_##TYPE v)\ { \ - __asm __volatile("" : : : "memory"); \ + __compiler_membar(); \ *p = v; \ } \ struct __hack @@ -240,7 +240,7 @@ atomic_load_acq_##TYPE(volatile u_##TYPE *p) \ u_##TYPE tmp; \ \ tmp = *p; \ - __asm __volatile("" : : : "memory"); \ + __compiler_membar(); \ return (tmp); \ } \ struct __hack Index: sys/sys/cdefs.h =================================================================== --- sys/sys/cdefs.h (revisione 240672) +++ sys/sys/cdefs.h (copia locale) @@ -487,6 +487,15 @@ #define __GLOBL1(sym) __asm__(".globl " #sym) #define __GLOBL(sym) __GLOBL1(sym) +/* + * Compiler memory barriers, specific to gcc and clang. + */ +#if defined(__GNUC__) +#define __compiler_membar() __asm __volatile(" " : : : "memory") +#else +#define __compiler_membar() struct __hack +#endif + #if defined(__GNUC__) || defined(__INTEL_COMPILER) #define __IDSTRING(name,string) __asm__(".ident\t\"" string "\"") #else Index: sys/gnu/fs/xfs/FreeBSD/xfs_freebsd.h =================================================================== --- sys/gnu/fs/xfs/FreeBSD/xfs_freebsd.h (revisione 240672) +++ sys/gnu/fs/xfs/FreeBSD/xfs_freebsd.h (copia locale) @@ -162,7 +162,7 @@ */ #define EFSCORRUPTED 990 /* Filesystem is corrupted */ -#define SYNCHRONIZE() barrier() +#define SYNCHRONIZE() __compiler_membar() #define __return_address __builtin_return_address(0) /* Index: sys/gnu/fs/xfs/FreeBSD/xfs_compat.h =================================================================== --- sys/gnu/fs/xfs/FreeBSD/xfs_compat.h (revisione 240672) +++ sys/gnu/fs/xfs/FreeBSD/xfs_compat.h (copia locale) @@ -129,10 +129,6 @@ typedef dev_t os_dev_t; #define copy_from_user(dst, src, len) copyin((src), (dst), (len)) #endif -#ifndef barrier -#define barrier() __asm__ __volatile__("": : :"memory") -#endif - /* * Map simple global vairables to FreeBSD kernel equivalents */ Index: sys/kern/kern_rmlock.c =================================================================== --- sys/kern/kern_rmlock.c (revisione 240672) +++ sys/kern/kern_rmlock.c (copia locale) @@ -65,10 +65,6 @@ __FBSDID("$FreeBSD$"); * does not seem very useful */ -static __inline void compiler_memory_barrier(void) { - __asm __volatile("":::"memory"); -} - static void assert_rm(const struct lock_object *lock, int what); static void lock_rm(struct lock_object *lock, int how); #ifdef KDTRACE_HOOKS @@ -353,7 +349,7 @@ _rm_rlock(struct rmlock *rm, struct rm_priotracker td->td_critnest++; /* critical_enter(); */ - compiler_memory_barrier(); + __compiler_membar(); pc = cpuid_to_pcpu[td->td_oncpu]; /* pcpu_find(td->td_oncpu); */ @@ -361,7 +357,7 @@ _rm_rlock(struct rmlock *rm, struct rm_priotracker sched_pin(); - compiler_memory_barrier(); + __compiler_membar(); td->td_critnest--; Index: sys/mips/include/cpufunc.h =================================================================== --- sys/mips/include/cpufunc.h (revisione 240672) +++ sys/mips/include/cpufunc.h (copia locale) @@ -70,7 +70,7 @@ static __inline void mips_barrier(void) { #if defined(CPU_CNMIPS) || defined(CPU_RMI) || defined(CPU_NLM) - __asm __volatile("" : : : "memory"); + __compiler_membar(); #else __asm __volatile (".set noreorder\n\t" "nop\n\t" Index: sys/x86/include/bus.h =================================================================== --- sys/x86/include/bus.h (revisione 240672) +++ sys/x86/include/bus.h (copia locale) @@ -1014,7 +1014,7 @@ bus_space_barrier(bus_space_tag_t tag __unused, bu __asm __volatile("lock; addl $0,0(%%esp)" : : : "memory"); #endif else - __asm __volatile("" : : : "memory"); + __compiler_membar(); #endif } From owner-svn-src-projects@FreeBSD.ORG Tue Sep 18 20:28:01 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9155106566B; Tue, 18 Sep 2012 20:28:01 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A3DC08FC14; Tue, 18 Sep 2012 20:28:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8IKS1DX056827; Tue, 18 Sep 2012 20:28:01 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8IKS1lK056820; Tue, 18 Sep 2012 20:28:01 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201209182028.q8IKS1lK056820@svn.freebsd.org> From: Brooks Davis Date: Tue, 18 Sep 2012 20:28:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240675 - in projects/mtree: include lib/libc/gen X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2012 20:28:01 -0000 Author: brooks Date: Tue Sep 18 20:28:01 2012 New Revision: 240675 URL: http://svn.freebsd.org/changeset/base/240675 Log: Implement VIS_GLOB support including compatibilty symbols required by overlapping flags between FreeBSD and NetBSD. Add a compatibility symbol for unvis() due to NetBSD's allocation of a flag value for UNVIS_END rather than just using 1. Add symbol version entries for new vis and unvis functions. Added: projects/mtree/lib/libc/gen/unvis-compat.c projects/mtree/lib/libc/gen/vis-compat.c Modified: projects/mtree/include/vis.h projects/mtree/lib/libc/gen/Makefile.inc projects/mtree/lib/libc/gen/Symbol.map projects/mtree/lib/libc/gen/vis.c Modified: projects/mtree/include/vis.h ============================================================================== --- projects/mtree/include/vis.h Tue Sep 18 20:20:29 2012 (r240674) +++ projects/mtree/include/vis.h Tue Sep 18 20:28:01 2012 (r240675) @@ -62,6 +62,7 @@ #define VIS_HTTP1866 0x200 /* http-style &#num; or &string; */ #define VIS_NOESCAPE 0x400 /* don't decode `\' */ #define _VIS_END 0x800 /* for unvis */ +#define VIS_GLOB 0x1000 /* encode glob(3) magics */ /* * unvis return codes Modified: projects/mtree/lib/libc/gen/Makefile.inc ============================================================================== --- projects/mtree/lib/libc/gen/Makefile.inc Tue Sep 18 20:20:29 2012 (r240674) +++ projects/mtree/lib/libc/gen/Makefile.inc Tue Sep 18 20:28:01 2012 (r240675) @@ -32,8 +32,9 @@ SRCS+= __getosreldate.c __xuname.c \ sigsetops.c sleep.c srand48.c statvfs.c stringlist.c strtofflags.c \ sysconf.c sysctl.c sysctlbyname.c sysctlnametomib.c \ syslog.c telldir.c termios.c time.c times.c timezone.c tls.c \ - ttyname.c ttyslot.c ualarm.c ulimit.c uname.c unvis.c \ - usleep.c utime.c utxdb.c valloc.c vis.c wait.c wait3.c waitpid.c \ + ttyname.c ttyslot.c ualarm.c ulimit.c uname.c unvis.c unvis-compat.c \ + usleep.c utime.c utxdb.c valloc.c vis.c vis-compat.c \ + wait.c wait3.c waitpid.c \ wordexp.c MISRCS+=modf.c Modified: projects/mtree/lib/libc/gen/Symbol.map ============================================================================== --- projects/mtree/lib/libc/gen/Symbol.map Tue Sep 18 20:20:29 2012 (r240674) +++ projects/mtree/lib/libc/gen/Symbol.map Tue Sep 18 20:28:01 2012 (r240675) @@ -298,15 +298,9 @@ FBSD_1.0 { ualarm; ulimit; uname; - unvis; - strunvis; - strunvisx; usleep; utime; valloc; - vis; - strvis; - strvisx; wait; wait3; waitpid; @@ -387,6 +381,23 @@ FBSD_1.3 { fdlopen; __FreeBSD_libc_enter_restricted_mode; getcontextx; + nvis; + snvis; + strnunvis; + strnunvisx; + strunvis; + strunvisx; + strnvis; + strnvisx; + strsnvis; + strsnvisx; + strsvis; + strsvisx; + strvis; + strvisx; + svis; + unvis; + vis; }; FBSDprivate_1.0 { Added: projects/mtree/lib/libc/gen/unvis-compat.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/mtree/lib/libc/gen/unvis-compat.c Tue Sep 18 20:28:01 2012 (r240675) @@ -0,0 +1,46 @@ +/*- + * Copyright (c) 2012 SRI International + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include + +#define _UNVIS_END 1 + +int +__unvis_44bsd(char *cp, int c, int *astate, int flag) +{ + + if (flag & _UNVIS_END) + flag = (flag & ~_UNVIS_END) ^ UNVIS_END; + return unvis(cp, c, astate, flag); +} + +__sym_compat(unvis, __vis_44bsd, FBSD_1.0); Added: projects/mtree/lib/libc/gen/vis-compat.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/mtree/lib/libc/gen/vis-compat.c Tue Sep 18 20:28:01 2012 (r240675) @@ -0,0 +1,66 @@ +/*- + * Copyright (c) 2012 SRI International + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include + +#define _VIS_OGLOB 0x100 + +char * +__vis_oglob(char *dst, int c, int flag, int nextc) +{ + + if (flag & _VIS_OGLOB) + flag = (flag & ~_VIS_OGLOB) ^ VIS_GLOB; + return vis(dst, c, flag, nextc); +} + +int +__strvis_oglob(char *dst, const char *src, int flag) +{ + + if (flag & _VIS_OGLOB) + flag = (flag & ~_VIS_OGLOB) ^ VIS_GLOB; + return strvis(dst, src, flag); +} + +int +__strvisx_oglob(char *dst, const char *src, size_t len, int flag) +{ + + if (flag & _VIS_OGLOB) + flag = (flag & ~_VIS_OGLOB) ^ VIS_GLOB; + return strvisx(dst, src, len, flag); +} + +__sym_compat(vis, __vis_oglob, FBSD_1.0); +__sym_compat(strvis, __strvis_oglob, FBSD_1.0); +__sym_compat(strvisx, __strvisx_oglob, FBSD_1.0); Modified: projects/mtree/lib/libc/gen/vis.c ============================================================================== --- projects/mtree/lib/libc/gen/vis.c Tue Sep 18 20:20:29 2012 (r240674) +++ projects/mtree/lib/libc/gen/vis.c Tue Sep 18 20:28:01 2012 (r240675) @@ -91,7 +91,7 @@ static char *do_svis(char *, size_t *, i #define xtoa(c) "0123456789abcdef"[c] #define XTOA(c) "0123456789ABCDEF"[c] -#define MAXEXTRAS 5 +#define MAXEXTRAS 9 #define MAKEEXTRALIST(flag, extra, orig_str) \ do { \ @@ -105,6 +105,12 @@ do { \ for (o = orig, e = extra; (*e++ = *o++) != '\0';) \ continue; \ e--; \ + if (flag & VIS_GLOB) { \ + *e++ = '*'; \ + *e++ = '?'; \ + *e++ = '['; \ + *e++ = '#'; \ + } \ if (flag & VIS_SP) *e++ = ' '; \ if (flag & VIS_TAB) *e++ = '\t'; \ if (flag & VIS_NL) *e++ = '\n'; \ From owner-svn-src-projects@FreeBSD.ORG Tue Sep 18 21:26:00 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4939E106564A; Tue, 18 Sep 2012 21:26:00 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 32C6D8FC08; Tue, 18 Sep 2012 21:26:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8ILQ09d065442; Tue, 18 Sep 2012 21:26:00 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8ILQ0bv065434; Tue, 18 Sep 2012 21:26:00 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201209182126.q8ILQ0bv065434@svn.freebsd.org> From: Brooks Davis Date: Tue, 18 Sep 2012 21:25:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240678 - in projects/mtree: include lib/libc/gen X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2012 21:26:00 -0000 Author: brooks Date: Tue Sep 18 21:25:59 2012 New Revision: 240678 URL: http://svn.freebsd.org/changeset/base/240678 Log: Replace our pwcache(3) with NetBSD's version. This adds the functions uid_from_user(), gid_from_group(), pwcache_userdb(), and pwcache_groupdb(). Imported versions are: pwcache.c 1.31 pwcache.3 1.17 pwcache.h 1.5 Added: projects/mtree/lib/libc/gen/pwcache.h Modified: projects/mtree/include/grp.h projects/mtree/include/pwd.h projects/mtree/lib/libc/gen/Makefile.inc projects/mtree/lib/libc/gen/Symbol.map projects/mtree/lib/libc/gen/pwcache.3 projects/mtree/lib/libc/gen/pwcache.c Modified: projects/mtree/include/grp.h ============================================================================== --- projects/mtree/include/grp.h Tue Sep 18 20:33:04 2012 (r240677) +++ projects/mtree/include/grp.h Tue Sep 18 21:25:59 2012 (r240678) @@ -69,6 +69,10 @@ struct group *getgrgid(gid_t); struct group *getgrnam(const char *); #if __BSD_VISIBLE const char *group_from_gid(gid_t, int); +int gid_from_group(const char *, gid_t *); +int pwcache_groupdb(int (*)(int), void (*)(void), + struct group * (*)(const char *), + struct group * (*)(gid_t)); #endif #if __BSD_VISIBLE || __XSI_VISIBLE /* XXX IEEE Std 1003.1, 2003 specifies `void setgrent(void)' */ Modified: projects/mtree/include/pwd.h ============================================================================== --- projects/mtree/include/pwd.h Tue Sep 18 20:33:04 2012 (r240677) +++ projects/mtree/include/pwd.h Tue Sep 18 21:25:59 2012 (r240678) @@ -165,6 +165,10 @@ int getpwuid_r(uid_t, struct passwd *, int getpwent_r(struct passwd *, char *, size_t, struct passwd **); int setpassent(int); const char *user_from_uid(uid_t, int); +int uid_from_user(const char *, uid_t *); +int pwcache_userdb(int (*)(int), void (*)(void), + struct passwd * (*)(const char *), + struct passwd * (*)(uid_t)); #endif __END_DECLS Modified: projects/mtree/lib/libc/gen/Makefile.inc ============================================================================== --- projects/mtree/lib/libc/gen/Makefile.inc Tue Sep 18 20:33:04 2012 (r240677) +++ projects/mtree/lib/libc/gen/Makefile.inc Tue Sep 18 21:25:59 2012 (r240678) @@ -24,7 +24,7 @@ SRCS+= __getosreldate.c __xuname.c \ lockf.c lrand48.c mrand48.c nftw.c nice.c \ nlist.c nrand48.c opendir.c \ pause.c pmadvise.c popen.c posix_spawn.c \ - psignal.c pututxline.c pw_scan.c pwcache.c \ + psignal.c pututxline.c pw_scan.c pwcache.c pwcache.h \ raise.c readdir.c readpassphrase.c rewinddir.c \ scandir.c seed48.c seekdir.c semctl.c \ setdomainname.c sethostname.c setjmperr.c setmode.c \ Modified: projects/mtree/lib/libc/gen/Symbol.map ============================================================================== --- projects/mtree/lib/libc/gen/Symbol.map Tue Sep 18 20:33:04 2012 (r240677) +++ projects/mtree/lib/libc/gen/Symbol.map Tue Sep 18 21:25:59 2012 (r240678) @@ -381,7 +381,10 @@ FBSD_1.3 { fdlopen; __FreeBSD_libc_enter_restricted_mode; getcontextx; + gid_from_group; nvis; + pwcache_userdb; + pwcache_groupdb; snvis; strnunvis; strnunvisx; @@ -396,6 +399,7 @@ FBSD_1.3 { strvis; strvisx; svis; + uid_from_user; unvis; vis; }; Modified: projects/mtree/lib/libc/gen/pwcache.3 ============================================================================== --- projects/mtree/lib/libc/gen/pwcache.3 Tue Sep 18 20:33:04 2012 (r240677) +++ projects/mtree/lib/libc/gen/pwcache.3 Tue Sep 18 21:25:59 2012 (r240678) @@ -1,3 +1,6 @@ +.\" $NetBSD: pwcache.3,v 1.17 2008/05/02 18:11:04 martin Exp $ +.\" $FreeBSD$ +.\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -9,7 +12,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 4. Neither the name of the University nor the names of its contributors +.\" 3. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" @@ -25,14 +28,41 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" +.\" +.\" Copyright (c) 2002 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. +.\" +.\" .\" @(#)pwcache.3 8.1 (Berkeley) 6/9/93 -.\" $FreeBSD$ .\" -.Dd March 22, 2002 +.Dd January 24, 2002 .Dt PWCACHE 3 .Os .Sh NAME -.Nm pwcache +.Nm pwcache , +.Nm user_from_uid , +.Nm group_from_gid .Nd cache password and group entries .Sh LIBRARY .Lb libc @@ -40,9 +70,17 @@ .In pwd.h .Ft const char * .Fn user_from_uid "uid_t uid" "int nouser" +.Ft int +.Fn uid_from_user "const char *name" "uid_t *uid" +.Ft int +.Fn pwcache_userdb "int (*setpassent)(int)" "void (*endpwent)(void)" "struct passwd * (*getpwnam)(const char *)" "struct passwd * (*getpwuid)(uid_t)" .In grp.h .Ft const char * .Fn group_from_gid "gid_t gid" "int nogroup" +.Ft int +.Fn gid_from_group "const char *name" "gid_t *gid" +.Ft int +.Fn pwcache_groupdb "int (*setgroupent)(int)" "void (*endgrent)(void)" "struct group * (*getgrnam)(const char *)" "struct group * (*getgrgid)(gid_t)" .Sh DESCRIPTION The .Fn user_from_uid @@ -81,8 +119,84 @@ unless the argument is non-zero, in which case a .Dv NULL pointer is returned. +.Pp +The +.Fn uid_from_user +function returns the uid associated with the argument +.Fa name . +The uid is cached so that multiple calls with the same +.Fa name +do not require additional calls to +.Xr getpwnam 3 . +If there is no uid associated with the +.Fa name , +the +.Fn uid_from_user +function returns \-1; otherwise it stores the uid at the location pointed to by +.Fa uid +and returns 0. +.Pp +The +.Fn gid_from_group +function returns the gid associated with the argument +.Fa name . +The gid is cached so that multiple calls with the same +.Fa name +do not require additional calls to +.Xr getgrnam 3 . +If there is no gid associated with the +.Fa name , +the +.Fn gid_from_group +function returns \-1; otherwise it stores the gid at the location pointed to by +.Fa gid +and returns 0. +.Pp +The +.Fn pwcache_userdb +function changes the user database access routines which +.Fn user_from_uid +and +.Fn uid_from_user +call to search for users. +The caches are flushed and the existing +.Fn endpwent +method is called before switching to the new routines. +.Fa getpwnam +and +.Fa getpwuid +must be provided, and +.Fa setpassent +and +.Fa endpwent +may be +.Dv NULL +pointers. +.Pp +The +.Fn pwcache_groupdb +function changes the group database access routines which +.Fn group_from_gid +and +.Fn gid_from_group +call to search for groups. +The caches are flushed and the existing +.Fn endgrent +method is called before switching to the new routines. +.Fa getgrnam +and +.Fa getgrgid +must be provided, and +.Fa setgroupent +and +.Fa endgrent +may be +.Dv NULL +pointers. .Sh SEE ALSO .Xr getgrgid 3 , +.Xr getgrnam 3 , +.Xr getpwnam 3 , .Xr getpwuid 3 .Sh HISTORY The @@ -91,3 +205,17 @@ and .Fn group_from_gid functions first appeared in .Bx 4.4 . +.Pp +The +.Fn uid_from_user +and +.Fn gid_from_group +functions first appeared in +.Nx 1.4 . +.Pp +The +.Fn pwcache_userdb +and +.Fn pwcache_groupdb +functions first appeared in +.Nx 1.6 . Modified: projects/mtree/lib/libc/gen/pwcache.c ============================================================================== --- projects/mtree/lib/libc/gen/pwcache.c Tue Sep 18 20:33:04 2012 (r240677) +++ projects/mtree/lib/libc/gen/pwcache.c Tue Sep 18 21:25:59 2012 (r240678) @@ -1,7 +1,13 @@ -/* - * Copyright (c) 1989, 1993 +/* $NetBSD: pwcache.c,v 1.31 2010/03/23 20:28:59 drochner Exp $ */ + +/*- + * Copyright (c) 1992 Keith Muller. + * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. * + * This code is derived from software contributed to Berkeley by + * Keith Muller of the University of California, San Diego. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -10,7 +16,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -27,87 +33,614 @@ * SUCH DAMAGE. */ +/*- + * Copyright (c) 2002 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. + */ + +#if HAVE_NBTOOL_CONFIG_H +#include "nbtool_config.h" +/* + * XXX Undefine the renames of these functions so that we don't + * XXX rename the versions found in the host's by mistake! + */ +#undef group_from_gid +#undef user_from_uid +#endif + +#include #if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)pwcache.c 8.1 (Berkeley) 6/4/93"; +#if 0 +static char sccsid[] = "@(#)cache.c 8.1 (Berkeley) 5/31/93"; +#else +__RCSID("$NetBSD: pwcache.c,v 1.31 2010/03/23 20:28:59 drochner Exp $"); +#endif #endif /* LIBC_SCCS and not lint */ -#include __FBSDID("$FreeBSD$"); -#include +#include "namespace.h" + #include +#include +#include #include #include #include +#include #include +#include + +#define _DIAGASSERT(x) assert((x)) + +#if HAVE_NBTOOL_CONFIG_H +/* XXX Now, re-apply the renaming that we undid above. */ +#define group_from_gid __nbcompat_group_from_gid +#define user_from_uid __nbcompat_user_from_uid +#endif + +#ifdef __weak_alias +__weak_alias(user_from_uid,_user_from_uid) +__weak_alias(group_from_gid,_group_from_gid) +__weak_alias(pwcache_groupdb,_pwcache_groupdb) +#endif + +#if !HAVE_PWCACHE_USERDB || HAVE_NBTOOL_CONFIG_H +#include "pwcache.h" + +/* + * routines that control user, group, uid and gid caches (for the archive + * member print routine). + * IMPORTANT: + * these routines cache BOTH hits and misses, a major performance improvement + */ + +/* + * function pointers to various name lookup routines. + * these may be changed as necessary. + */ +static int (*_pwcache_setgroupent)(int) = setgroupent; +static void (*_pwcache_endgrent)(void) = endgrent; +static struct group * (*_pwcache_getgrnam)(const char *) = getgrnam; +static struct group * (*_pwcache_getgrgid)(gid_t) = getgrgid; +static int (*_pwcache_setpassent)(int) = setpassent; +static void (*_pwcache_endpwent)(void) = endpwent; +static struct passwd * (*_pwcache_getpwnam)(const char *) = getpwnam; +static struct passwd * (*_pwcache_getpwuid)(uid_t) = getpwuid; + +/* + * internal state + */ +static int pwopn; /* is password file open */ +static int gropn; /* is group file open */ +static UIDC **uidtb; /* uid to name cache */ +static GIDC **gidtb; /* gid to name cache */ +static UIDC **usrtb; /* user name to uid cache */ +static GIDC **grptb; /* group name to gid cache */ + +static int uidtb_fail; /* uidtb_start() failed ? */ +static int gidtb_fail; /* gidtb_start() failed ? */ +static int usrtb_fail; /* usrtb_start() failed ? */ +static int grptb_fail; /* grptb_start() failed ? */ + + +static u_int st_hash(const char *, size_t, int); +static int uidtb_start(void); +static int gidtb_start(void); +static int usrtb_start(void); +static int grptb_start(void); -#define NCACHE 64 /* power of 2 */ -#define MASK (NCACHE - 1) /* bits to store with */ +static u_int +st_hash(const char *name, size_t len, int tabsz) +{ + u_int key = 0; + + _DIAGASSERT(name != NULL); + + while (len--) { + key += *name++; + key = (key << 8) | (key >> 24); + } + + return (key % tabsz); +} + +/* + * uidtb_start + * creates an an empty uidtb + * Return: + * 0 if ok, -1 otherwise + */ +static int +uidtb_start(void) +{ + + if (uidtb != NULL) + return (0); + if (uidtb_fail) + return (-1); + if ((uidtb = (UIDC **)calloc(UID_SZ, sizeof(UIDC *))) == NULL) { + ++uidtb_fail; + return (-1); + } + return (0); +} + +/* + * gidtb_start + * creates an an empty gidtb + * Return: + * 0 if ok, -1 otherwise + */ +static int +gidtb_start(void) +{ + + if (gidtb != NULL) + return (0); + if (gidtb_fail) + return (-1); + if ((gidtb = (GIDC **)calloc(GID_SZ, sizeof(GIDC *))) == NULL) { + ++gidtb_fail; + return (-1); + } + return (0); +} + +/* + * usrtb_start + * creates an an empty usrtb + * Return: + * 0 if ok, -1 otherwise + */ +static int +usrtb_start(void) +{ + + if (usrtb != NULL) + return (0); + if (usrtb_fail) + return (-1); + if ((usrtb = (UIDC **)calloc(UNM_SZ, sizeof(UIDC *))) == NULL) { + ++usrtb_fail; + return (-1); + } + return (0); +} + +/* + * grptb_start + * creates an an empty grptb + * Return: + * 0 if ok, -1 otherwise + */ +static int +grptb_start(void) +{ + + if (grptb != NULL) + return (0); + if (grptb_fail) + return (-1); + if ((grptb = (GIDC **)calloc(GNM_SZ, sizeof(GIDC *))) == NULL) { + ++grptb_fail; + return (-1); + } + return (0); +} + +/* + * user_from_uid() + * caches the name (if any) for the uid. If noname clear, we always + * return the stored name (if valid or invalid match). + * We use a simple hash table. + * Return + * Pointer to stored name (or a empty string) + */ const char * -user_from_uid(uid_t uid, int nouser) +user_from_uid(uid_t uid, int noname) { - static struct ncache { - uid_t uid; - int found; - char name[MAXLOGNAME]; - } c_uid[NCACHE]; - static int pwopen; struct passwd *pw; - struct ncache *cp; + UIDC *ptr, **pptr; + + if ((uidtb == NULL) && (uidtb_start() < 0)) + return (NULL); + + /* + * see if we have this uid cached + */ + pptr = uidtb + (uid % UID_SZ); + ptr = *pptr; - cp = c_uid + (uid & MASK); - if (cp->uid != uid || !*cp->name) { - if (pwopen == 0) { - setpassent(1); - pwopen = 1; - } - pw = getpwuid(uid); - cp->uid = uid; - if (pw != NULL) { - cp->found = 1; - (void)strncpy(cp->name, pw->pw_name, MAXLOGNAME - 1); - cp->name[MAXLOGNAME - 1] = '\0'; - } else { - cp->found = 0; - (void)snprintf(cp->name, MAXLOGNAME - 1, "%u", uid); - if (nouser) - return (NULL); - } + if ((ptr != NULL) && (ptr->valid > 0) && (ptr->uid == uid)) { + /* + * have an entry for this uid + */ + if (!noname || (ptr->valid == VALID)) + return (ptr->name); + return (NULL); } - return ((nouser && !cp->found) ? NULL : cp->name); + + /* + * No entry for this uid, we will add it + */ + if (!pwopn) { + if (_pwcache_setpassent != NULL) + (*_pwcache_setpassent)(1); + ++pwopn; + } + + if (ptr == NULL) + *pptr = ptr = (UIDC *)malloc(sizeof(UIDC)); + + if ((pw = (*_pwcache_getpwuid)(uid)) == NULL) { + /* + * no match for this uid in the local password file + * a string that is the uid in numeric format + */ + if (ptr == NULL) + return (NULL); + ptr->uid = uid; + (void)snprintf(ptr->name, UNMLEN, "%lu", (long) uid); + ptr->valid = INVALID; + if (noname) + return (NULL); + } else { + /* + * there is an entry for this uid in the password file + */ + if (ptr == NULL) + return (pw->pw_name); + ptr->uid = uid; + (void)strlcpy(ptr->name, pw->pw_name, UNMLEN); + ptr->valid = VALID; + } + return (ptr->name); } +/* + * group_from_gid() + * caches the name (if any) for the gid. If noname clear, we always + * return the stored name (if valid or invalid match). + * We use a simple hash table. + * Return + * Pointer to stored name (or a empty string) + */ const char * -group_from_gid(gid_t gid, int nogroup) +group_from_gid(gid_t gid, int noname) { - static struct ncache { - gid_t gid; - int found; - char name[MAXLOGNAME]; - } c_gid[NCACHE]; - static int gropen; struct group *gr; - struct ncache *cp; + GIDC *ptr, **pptr; + + if ((gidtb == NULL) && (gidtb_start() < 0)) + return (NULL); + + /* + * see if we have this gid cached + */ + pptr = gidtb + (gid % GID_SZ); + ptr = *pptr; + + if ((ptr != NULL) && (ptr->valid > 0) && (ptr->gid == gid)) { + /* + * have an entry for this gid + */ + if (!noname || (ptr->valid == VALID)) + return (ptr->name); + return (NULL); + } - cp = c_gid + (gid & MASK); - if (cp->gid != gid || !*cp->name) { - if (gropen == 0) { - setgroupent(1); - gropen = 1; - } - gr = getgrgid(gid); - cp->gid = gid; - if (gr != NULL) { - cp->found = 1; - (void)strncpy(cp->name, gr->gr_name, MAXLOGNAME - 1); - cp->name[MAXLOGNAME - 1] = '\0'; - } else { - cp->found = 0; - (void)snprintf(cp->name, MAXLOGNAME - 1, "%u", gid); - if (nogroup) - return (NULL); - } + /* + * No entry for this gid, we will add it + */ + if (!gropn) { + if (_pwcache_setgroupent != NULL) + (*_pwcache_setgroupent)(1); + ++gropn; } - return ((nogroup && !cp->found) ? NULL : cp->name); + + if (ptr == NULL) + *pptr = ptr = (GIDC *)malloc(sizeof(GIDC)); + + if ((gr = (*_pwcache_getgrgid)(gid)) == NULL) { + /* + * no match for this gid in the local group file, put in + * a string that is the gid in numberic format + */ + if (ptr == NULL) + return (NULL); + ptr->gid = gid; + (void)snprintf(ptr->name, GNMLEN, "%lu", (long) gid); + ptr->valid = INVALID; + if (noname) + return (NULL); + } else { + /* + * there is an entry for this group in the group file + */ + if (ptr == NULL) + return (gr->gr_name); + ptr->gid = gid; + (void)strlcpy(ptr->name, gr->gr_name, GNMLEN); + ptr->valid = VALID; + } + return (ptr->name); +} + +/* + * uid_from_user() + * caches the uid for a given user name. We use a simple hash table. + * Return + * the uid (if any) for a user name, or a -1 if no match can be found + */ +int +uid_from_user(const char *name, uid_t *uid) +{ + struct passwd *pw; + UIDC *ptr, **pptr; + size_t namelen; + + /* + * return -1 for mangled names + */ + if (name == NULL || ((namelen = strlen(name)) == 0)) + return (-1); + if ((usrtb == NULL) && (usrtb_start() < 0)) + return (-1); + + /* + * look up in hash table, if found and valid return the uid, + * if found and invalid, return a -1 + */ + pptr = usrtb + st_hash(name, namelen, UNM_SZ); + ptr = *pptr; + + if ((ptr != NULL) && (ptr->valid > 0) && !strcmp(name, ptr->name)) { + if (ptr->valid == INVALID) + return (-1); + *uid = ptr->uid; + return (0); + } + + if (!pwopn) { + if (_pwcache_setpassent != NULL) + (*_pwcache_setpassent)(1); + ++pwopn; + } + + if (ptr == NULL) + *pptr = ptr = (UIDC *)malloc(sizeof(UIDC)); + + /* + * no match, look it up, if no match store it as an invalid entry, + * or store the matching uid + */ + if (ptr == NULL) { + if ((pw = (*_pwcache_getpwnam)(name)) == NULL) + return (-1); + *uid = pw->pw_uid; + return (0); + } + (void)strlcpy(ptr->name, name, UNMLEN); + if ((pw = (*_pwcache_getpwnam)(name)) == NULL) { + ptr->valid = INVALID; + return (-1); + } + ptr->valid = VALID; + *uid = ptr->uid = pw->pw_uid; + return (0); +} + +/* + * gid_from_group() + * caches the gid for a given group name. We use a simple hash table. + * Return + * the gid (if any) for a group name, or a -1 if no match can be found + */ +int +gid_from_group(const char *name, gid_t *gid) +{ + struct group *gr; + GIDC *ptr, **pptr; + size_t namelen; + + /* + * return -1 for mangled names + */ + if (name == NULL || ((namelen = strlen(name)) == 0)) + return (-1); + if ((grptb == NULL) && (grptb_start() < 0)) + return (-1); + + /* + * look up in hash table, if found and valid return the uid, + * if found and invalid, return a -1 + */ + pptr = grptb + st_hash(name, namelen, GID_SZ); + ptr = *pptr; + + if ((ptr != NULL) && (ptr->valid > 0) && !strcmp(name, ptr->name)) { + if (ptr->valid == INVALID) + return (-1); + *gid = ptr->gid; + return (0); + } + + if (!gropn) { + if (_pwcache_setgroupent != NULL) + (*_pwcache_setgroupent)(1); + ++gropn; + } + + if (ptr == NULL) + *pptr = ptr = (GIDC *)malloc(sizeof(GIDC)); + + /* + * no match, look it up, if no match store it as an invalid entry, + * or store the matching gid + */ + if (ptr == NULL) { + if ((gr = (*_pwcache_getgrnam)(name)) == NULL) + return (-1); + *gid = gr->gr_gid; + return (0); + } + + (void)strlcpy(ptr->name, name, GNMLEN); + if ((gr = (*_pwcache_getgrnam)(name)) == NULL) { + ptr->valid = INVALID; + return (-1); + } + ptr->valid = VALID; + *gid = ptr->gid = gr->gr_gid; + return (0); +} + +#define FLUSHTB(arr, len, fail) \ + do { \ + if (arr != NULL) { \ + for (i = 0; i < len; i++) \ + if (arr[i] != NULL) \ + free(arr[i]); \ + arr = NULL; \ + } \ + fail = 0; \ + } while (/* CONSTCOND */0); + +int +pwcache_userdb( + int (*a_setpassent)(int), + void (*a_endpwent)(void), + struct passwd * (*a_getpwnam)(const char *), + struct passwd * (*a_getpwuid)(uid_t)) +{ + int i; + + /* a_setpassent and a_endpwent may be NULL */ + if (a_getpwnam == NULL || a_getpwuid == NULL) + return (-1); + + if (_pwcache_endpwent != NULL) + (*_pwcache_endpwent)(); + FLUSHTB(uidtb, UID_SZ, uidtb_fail); + FLUSHTB(usrtb, UNM_SZ, usrtb_fail); + pwopn = 0; + _pwcache_setpassent = a_setpassent; + _pwcache_endpwent = a_endpwent; + _pwcache_getpwnam = a_getpwnam; + _pwcache_getpwuid = a_getpwuid; + + return (0); +} + +int +pwcache_groupdb( + int (*a_setgroupent)(int), + void (*a_endgrent)(void), + struct group * (*a_getgrnam)(const char *), + struct group * (*a_getgrgid)(gid_t)) +{ + int i; + + /* a_setgroupent and a_endgrent may be NULL */ + if (a_getgrnam == NULL || a_getgrgid == NULL) + return (-1); + + if (_pwcache_endgrent != NULL) + (*_pwcache_endgrent)(); + FLUSHTB(gidtb, GID_SZ, gidtb_fail); + FLUSHTB(grptb, GNM_SZ, grptb_fail); + gropn = 0; + _pwcache_setgroupent = a_setgroupent; + _pwcache_endgrent = a_endgrent; + _pwcache_getgrnam = a_getgrnam; + _pwcache_getgrgid = a_getgrgid; + + return (0); +} + + +#ifdef TEST_PWCACHE + +struct passwd * +test_getpwnam(const char *name) +{ + static struct passwd foo; + + memset(&foo, 0, sizeof(foo)); + if (strcmp(name, "toor") == 0) { + foo.pw_uid = 666; + return &foo; + } + return (getpwnam(name)); +} + +int +main(int argc, char *argv[]) +{ + uid_t u; + int r, i; + + printf("pass 1 (default userdb)\n"); + for (i = 1; i < argc; i++) { + printf("i: %d, pwopn %d usrtb_fail %d usrtb %p\n", + i, pwopn, usrtb_fail, usrtb); + r = uid_from_user(argv[i], &u); + if (r == -1) + printf(" uid_from_user %s: failed\n", argv[i]); + else + printf(" uid_from_user %s: %d\n", argv[i], u); + } + printf("pass 1 finish: pwopn %d usrtb_fail %d usrtb %p\n", + pwopn, usrtb_fail, usrtb); + + puts(""); + printf("pass 2 (replacement userdb)\n"); + printf("pwcache_userdb returned %d\n", + pwcache_userdb(setpassent, test_getpwnam, getpwuid)); + printf("pwopn %d usrtb_fail %d usrtb %p\n", pwopn, usrtb_fail, usrtb); + + for (i = 1; i < argc; i++) { + printf("i: %d, pwopn %d usrtb_fail %d usrtb %p\n", + i, pwopn, usrtb_fail, usrtb); + u = -1; + r = uid_from_user(argv[i], &u); + if (r == -1) + printf(" uid_from_user %s: failed\n", argv[i]); + else + printf(" uid_from_user %s: %d\n", argv[i], u); + } + printf("pass 2 finish: pwopn %d usrtb_fail %d usrtb %p\n", + pwopn, usrtb_fail, usrtb); + + puts(""); + printf("pass 3 (null pointers)\n"); + printf("pwcache_userdb returned %d\n", + pwcache_userdb(NULL, NULL, NULL)); + + return (0); } +#endif /* TEST_PWCACHE */ +#endif /* !HAVE_PWCACHE_USERDB */ Added: projects/mtree/lib/libc/gen/pwcache.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/mtree/lib/libc/gen/pwcache.h Tue Sep 18 21:25:59 2012 (r240678) @@ -0,0 +1,73 @@ +/* $NetBSD: pwcache.h,v 1.5 2003/11/10 08:51:51 wiz Exp $ */ +/* $FreeBSD$ */ + +/*- + * Copyright (c) 1992 Keith Muller. + * Copyright (c) 1992, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Keith Muller of the University of California, San Diego. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)cache.h 8.1 (Berkeley) 5/31/93 + */ + +/* + * Constants and data structures used to implement group and password file + * caches. Traditional passwd/group cache routines perform quite poorly with + * archives. The chances of hitting a valid lookup with an archive is quite a + * bit worse than with files already resident on the file system. These misses + * create a MAJOR performance cost. To address this problem, these routines + * cache both hits and misses. + * + * NOTE: name lengths must be as large as those stored in ANY PROTOCOL and + * as stored in the passwd and group files. CACHE SIZES MUST BE PRIME + */ +#define UNMLEN 32 /* >= user name found in any protocol */ +#define GNMLEN 32 /* >= group name found in any protocol */ +#define UID_SZ 317 /* size of uid to user_name cache */ +#define UNM_SZ 317 /* size of user_name to uid cache */ +#define GID_SZ 251 /* size of gid to group_name cache */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Tue Sep 18 21:36:25 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12DE51065670; Tue, 18 Sep 2012 21:36:25 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EF5C08FC18; Tue, 18 Sep 2012 21:36:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8ILaOx8066930; Tue, 18 Sep 2012 21:36:24 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8ILaOqE066925; Tue, 18 Sep 2012 21:36:24 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201209182136.q8ILaOqE066925@svn.freebsd.org> From: Brooks Davis Date: Tue, 18 Sep 2012 21:36:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240679 - projects/mtree/contrib/mtree X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2012 21:36:25 -0000 Author: brooks Date: Tue Sep 18 21:36:24 2012 New Revision: 240679 URL: http://svn.freebsd.org/changeset/base/240679 Log: Virgin import of NetBSD's mtree. Added: projects/mtree/contrib/mtree/ projects/mtree/contrib/mtree/Makefile projects/mtree/contrib/mtree/compare.c projects/mtree/contrib/mtree/crc.c projects/mtree/contrib/mtree/create.c projects/mtree/contrib/mtree/excludes.c projects/mtree/contrib/mtree/extern.h projects/mtree/contrib/mtree/getid.c projects/mtree/contrib/mtree/misc.c projects/mtree/contrib/mtree/mtree.8 projects/mtree/contrib/mtree/mtree.c projects/mtree/contrib/mtree/mtree.h projects/mtree/contrib/mtree/spec.c projects/mtree/contrib/mtree/verify.c Added: projects/mtree/contrib/mtree/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/mtree/contrib/mtree/Makefile Tue Sep 18 21:36:24 2012 (r240679) @@ -0,0 +1,20 @@ +# $NetBSD: Makefile,v 1.32 2009/04/22 15:23:05 lukem Exp $ +# from: @(#)Makefile 8.2 (Berkeley) 4/27/95 + +.include + +PROG= mtree +#CPPFLAGS+=-DDEBUG +CPPFLAGS+= -DMTREE +MAN= mtree.8 +SRCS= compare.c crc.c create.c excludes.c misc.c mtree.c spec.c verify.c \ + getid.c pack_dev.c +.if (${HOSTPROG:U} == "") +DPADD+= ${LIBUTIL} +LDADD+= -lutil +.endif + +CPPFLAGS+= -I${NETBSDSRCDIR}/sbin/mknod +.PATH: ${NETBSDSRCDIR}/sbin/mknod + +.include Added: projects/mtree/contrib/mtree/compare.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/mtree/contrib/mtree/compare.c Tue Sep 18 21:36:24 2012 (r240679) @@ -0,0 +1,525 @@ +/* $NetBSD: compare.c,v 1.52 2008/12/28 19:36:30 christos Exp $ */ + +/*- + * Copyright (c) 1989, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if HAVE_NBTOOL_CONFIG_H +#include "nbtool_config.h" +#endif + +#include +#if defined(__RCSID) && !defined(lint) +#if 0 +static char sccsid[] = "@(#)compare.c 8.1 (Berkeley) 6/6/93"; +#else +__RCSID("$NetBSD: compare.c,v 1.52 2008/12/28 19:36:30 christos Exp $"); +#endif +#endif /* not lint */ + +#include + +#include +#include +#include +#include +#include +#include +#include + +#ifndef NO_MD5 +#include +#endif +#ifndef NO_RMD160 +#include +#endif +#ifndef NO_SHA1 +#include +#endif +#ifndef NO_SHA2 +#include +#endif + +#include "extern.h" + +#define INDENTNAMELEN 8 +#define MARK \ +do { \ + len = printf("%s: ", RP(p)); \ + if (len > INDENTNAMELEN) { \ + tab = "\t"; \ + printf("\n"); \ + } else { \ + tab = ""; \ + printf("%*s", INDENTNAMELEN - (int)len, ""); \ + } \ +} while (0) +#define LABEL if (!label++) MARK + +#if HAVE_STRUCT_STAT_ST_FLAGS + + +#define CHANGEFLAGS \ + if (flags != p->fts_statp->st_flags) { \ + char *sf; \ + if (!label) { \ + MARK; \ + sf = flags_to_string(p->fts_statp->st_flags, "none"); \ + printf("%sflags (\"%s\"", tab, sf); \ + free(sf); \ + } \ + if (lchflags(p->fts_accpath, flags)) { \ + label++; \ + printf(", not modified: %s)\n", \ + strerror(errno)); \ + } else { \ + sf = flags_to_string(flags, "none"); \ + printf(", modified to \"%s\")\n", sf); \ + free(sf); \ + } \ + } + +/* SETFLAGS: + * given pflags, additionally set those flags specified in s->st_flags and + * selected by mask (the other flags are left unchanged). + */ +#define SETFLAGS(pflags, mask) \ +do { \ + flags = (s->st_flags & (mask)) | (pflags); \ + CHANGEFLAGS; \ +} while (0) + +/* CLEARFLAGS: + * given pflags, reset the flags specified in s->st_flags and selected by mask + * (the other flags are left unchanged). + */ +#define CLEARFLAGS(pflags, mask) \ +do { \ + flags = (~(s->st_flags & (mask)) & CH_MASK) & (pflags); \ + CHANGEFLAGS; \ +} while (0) +#endif /* HAVE_STRUCT_STAT_ST_FLAGS */ + +int +compare(NODE *s, FTSENT *p) +{ + u_int32_t len, val, flags; + int fd, label; + const char *cp, *tab; +#if !defined(NO_MD5) || !defined(NO_RMD160) || !defined(NO_SHA1) || !defined(NO_SHA2) + char *digestbuf; +#endif + + tab = NULL; + label = 0; + switch(s->type) { + case F_BLOCK: + if (!S_ISBLK(p->fts_statp->st_mode)) + goto typeerr; + break; + case F_CHAR: + if (!S_ISCHR(p->fts_statp->st_mode)) + goto typeerr; + break; + case F_DIR: + if (!S_ISDIR(p->fts_statp->st_mode)) + goto typeerr; + break; + case F_FIFO: + if (!S_ISFIFO(p->fts_statp->st_mode)) + goto typeerr; + break; + case F_FILE: + if (!S_ISREG(p->fts_statp->st_mode)) + goto typeerr; + break; + case F_LINK: + if (!S_ISLNK(p->fts_statp->st_mode)) + goto typeerr; + break; +#ifdef S_ISSOCK + case F_SOCK: + if (!S_ISSOCK(p->fts_statp->st_mode)) + goto typeerr; + break; +#endif +typeerr: LABEL; + printf("\ttype (%s, %s)\n", + nodetype(s->type), inotype(p->fts_statp->st_mode)); + return (label); + } + if (mtree_Wflag) + goto afterpermwhack; +#if HAVE_STRUCT_STAT_ST_FLAGS + if (iflag && !uflag) { + if (s->flags & F_FLAGS) + SETFLAGS(p->fts_statp->st_flags, SP_FLGS); + return (label); + } + if (mflag && !uflag) { + if (s->flags & F_FLAGS) + CLEARFLAGS(p->fts_statp->st_flags, SP_FLGS); + return (label); + } +#endif + if (s->flags & F_DEV && + (s->type == F_BLOCK || s->type == F_CHAR) && + s->st_rdev != p->fts_statp->st_rdev) { + LABEL; + printf("%sdevice (%#llx, %#llx", + tab, (long long)s->st_rdev, + (long long)p->fts_statp->st_rdev); + if (uflag) { + if ((unlink(p->fts_accpath) == -1) || + (mknod(p->fts_accpath, + s->st_mode | nodetoino(s->type), + s->st_rdev) == -1) || + (lchown(p->fts_accpath, p->fts_statp->st_uid, + p->fts_statp->st_gid) == -1) ) + printf(", not modified: %s)\n", + strerror(errno)); + else + printf(", modified)\n"); + } else + printf(")\n"); + tab = "\t"; + } + /* Set the uid/gid first, then set the mode. */ + if (s->flags & (F_UID | F_UNAME) && s->st_uid != p->fts_statp->st_uid) { + LABEL; + printf("%suser (%lu, %lu", + tab, (u_long)s->st_uid, (u_long)p->fts_statp->st_uid); + if (uflag) { + if (lchown(p->fts_accpath, s->st_uid, -1)) + printf(", not modified: %s)\n", + strerror(errno)); + else + printf(", modified)\n"); + } else + printf(")\n"); + tab = "\t"; + } + if (s->flags & (F_GID | F_GNAME) && s->st_gid != p->fts_statp->st_gid) { + LABEL; + printf("%sgid (%lu, %lu", + tab, (u_long)s->st_gid, (u_long)p->fts_statp->st_gid); + if (uflag) { + if (lchown(p->fts_accpath, -1, s->st_gid)) + printf(", not modified: %s)\n", + strerror(errno)); + else + printf(", modified)\n"); + } + else + printf(")\n"); + tab = "\t"; + } + if (s->flags & F_MODE && + s->st_mode != (p->fts_statp->st_mode & MBITS)) { + if (lflag) { + mode_t tmode, mode; + + tmode = s->st_mode; + mode = p->fts_statp->st_mode & MBITS; + /* + * if none of the suid/sgid/etc bits are set, + * then if the mode is a subset of the target, + * skip. + */ + if (!((tmode & ~(S_IRWXU|S_IRWXG|S_IRWXO)) || + (mode & ~(S_IRWXU|S_IRWXG|S_IRWXO)))) + if ((mode | tmode) == tmode) + goto skip; + } + + LABEL; + printf("%spermissions (%#lo, %#lo", + tab, (u_long)s->st_mode, + (u_long)p->fts_statp->st_mode & MBITS); + if (uflag) { + if (lchmod(p->fts_accpath, s->st_mode)) + printf(", not modified: %s)\n", + strerror(errno)); + else + printf(", modified)\n"); + } + else + printf(")\n"); + tab = "\t"; + skip: ; + } + if (s->flags & F_NLINK && s->type != F_DIR && + s->st_nlink != p->fts_statp->st_nlink) { + LABEL; + printf("%slink count (%lu, %lu)\n", + tab, (u_long)s->st_nlink, (u_long)p->fts_statp->st_nlink); + tab = "\t"; + } + if (s->flags & F_SIZE && s->st_size != p->fts_statp->st_size) { + LABEL; + printf("%ssize (%lld, %lld)\n", + tab, (long long)s->st_size, + (long long)p->fts_statp->st_size); + tab = "\t"; + } + /* + * XXX + * Since utimes(2) only takes a timeval, there's no point in + * comparing the low bits of the timespec nanosecond field. This + * will only result in mismatches that we can never fix. + * + * Doesn't display microsecond differences. + */ + if (s->flags & F_TIME) { + struct timeval tv[2]; + struct stat *ps = p->fts_statp; + time_t smtime = s->st_mtimespec.tv_sec; + +#if defined(BSD4_4) && !defined(HAVE_NBTOOL_CONFIG_H) + time_t pmtime = ps->st_mtimespec.tv_sec; + + TIMESPEC_TO_TIMEVAL(&tv[0], &s->st_mtimespec); + TIMESPEC_TO_TIMEVAL(&tv[1], &ps->st_mtimespec); +#else + time_t pmtime = (time_t)ps->st_mtime; + + tv[0].tv_sec = smtime; + tv[0].tv_usec = 0; + tv[1].tv_sec = pmtime; + tv[1].tv_usec = 0; +#endif + + if (tv[0].tv_sec != tv[1].tv_sec || + tv[0].tv_usec != tv[1].tv_usec) { + LABEL; + printf("%smodification time (%.24s, ", + tab, ctime(&smtime)); + printf("%.24s", ctime(&pmtime)); + if (tflag) { + tv[1] = tv[0]; + if (utimes(p->fts_accpath, tv)) + printf(", not modified: %s)\n", + strerror(errno)); + else + printf(", modified)\n"); + } else + printf(")\n"); + tab = "\t"; + } + } +#if HAVE_STRUCT_STAT_ST_FLAGS + /* + * XXX + * since lchflags(2) will reset file times, the utimes() above + * may have been useless! oh well, we'd rather have correct + * flags, rather than times? + */ + if ((s->flags & F_FLAGS) && ((s->st_flags != p->fts_statp->st_flags) + || mflag || iflag)) { + if (s->st_flags != p->fts_statp->st_flags) { + char *f_s; + LABEL; + f_s = flags_to_string(s->st_flags, "none"); + printf("%sflags (\"%s\" is not ", tab, f_s); + free(f_s); + f_s = flags_to_string(p->fts_statp->st_flags, "none"); + printf("\"%s\"", f_s); + free(f_s); + } + if (uflag) { + if (iflag) + SETFLAGS(0, CH_MASK); + else if (mflag) + CLEARFLAGS(0, SP_FLGS); + else + SETFLAGS(0, (~SP_FLGS & CH_MASK)); + } else + printf(")\n"); + tab = "\t"; + } +#endif /* HAVE_STRUCT_STAT_ST_FLAGS */ + + /* + * from this point, no more permission checking or whacking + * occurs, only checking of stuff like checksums and symlinks. + */ + afterpermwhack: + if (s->flags & F_CKSUM) { + if ((fd = open(p->fts_accpath, O_RDONLY, 0)) < 0) { + LABEL; + printf("%scksum: %s: %s\n", + tab, p->fts_accpath, strerror(errno)); + tab = "\t"; + } else if (crc(fd, &val, &len)) { + close(fd); + LABEL; + printf("%scksum: %s: %s\n", + tab, p->fts_accpath, strerror(errno)); + tab = "\t"; + } else { + close(fd); + if (s->cksum != val) { + LABEL; + printf("%scksum (%lu, %lu)\n", + tab, s->cksum, (unsigned long)val); + } + tab = "\t"; + } + } +#ifndef NO_MD5 + if (s->flags & F_MD5) { + if ((digestbuf = MD5File(p->fts_accpath, NULL)) == NULL) { + LABEL; + printf("%smd5: %s: %s\n", + tab, p->fts_accpath, strerror(errno)); + tab = "\t"; + } else { + if (strcmp(s->md5digest, digestbuf)) { + LABEL; + printf("%smd5 (0x%s, 0x%s)\n", + tab, s->md5digest, digestbuf); + } + tab = "\t"; + free(digestbuf); + } + } +#endif /* ! NO_MD5 */ +#ifndef NO_RMD160 + if (s->flags & F_RMD160) { + if ((digestbuf = RMD160File(p->fts_accpath, NULL)) == NULL) { + LABEL; + printf("%srmd160: %s: %s\n", + tab, p->fts_accpath, strerror(errno)); + tab = "\t"; + } else { + if (strcmp(s->rmd160digest, digestbuf)) { + LABEL; + printf("%srmd160 (0x%s, 0x%s)\n", + tab, s->rmd160digest, digestbuf); + } + tab = "\t"; + free(digestbuf); + } + } +#endif /* ! NO_RMD160 */ +#ifndef NO_SHA1 + if (s->flags & F_SHA1) { + if ((digestbuf = SHA1File(p->fts_accpath, NULL)) == NULL) { + LABEL; + printf("%ssha1: %s: %s\n", + tab, p->fts_accpath, strerror(errno)); + tab = "\t"; + } else { + if (strcmp(s->sha1digest, digestbuf)) { + LABEL; + printf("%ssha1 (0x%s, 0x%s)\n", + tab, s->sha1digest, digestbuf); + } + tab = "\t"; + free(digestbuf); + } + } +#endif /* ! NO_SHA1 */ +#ifndef NO_SHA2 + if (s->flags & F_SHA256) { + if ((digestbuf = SHA256_File(p->fts_accpath, NULL)) == NULL) { + LABEL; + printf("%ssha256: %s: %s\n", + tab, p->fts_accpath, strerror(errno)); + tab = "\t"; + } else { + if (strcmp(s->sha256digest, digestbuf)) { + LABEL; + printf("%ssha256 (0x%s, 0x%s)\n", + tab, s->sha256digest, digestbuf); + } + tab = "\t"; + free(digestbuf); + } + } + if (s->flags & F_SHA384) { + if ((digestbuf = SHA384_File(p->fts_accpath, NULL)) == NULL) { + LABEL; + printf("%ssha384: %s: %s\n", + tab, p->fts_accpath, strerror(errno)); + tab = "\t"; + } else { + if (strcmp(s->sha384digest, digestbuf)) { + LABEL; + printf("%ssha384 (0x%s, 0x%s)\n", + tab, s->sha384digest, digestbuf); + } + tab = "\t"; + free(digestbuf); + } + } + if (s->flags & F_SHA512) { + if ((digestbuf = SHA512_File(p->fts_accpath, NULL)) == NULL) { + LABEL; + printf("%ssha512: %s: %s\n", + tab, p->fts_accpath, strerror(errno)); + tab = "\t"; + } else { + if (strcmp(s->sha512digest, digestbuf)) { + LABEL; + printf("%ssha512 (0x%s, 0x%s)\n", + tab, s->sha512digest, digestbuf); + } + tab = "\t"; + free(digestbuf); + } + } +#endif /* ! NO_SHA2 */ + if (s->flags & F_SLINK && + strcmp(cp = rlink(p->fts_accpath), s->slink)) { + LABEL; + printf("%slink ref (%s, %s", tab, cp, s->slink); + if (uflag) { + if ((unlink(p->fts_accpath) == -1) || + (symlink(s->slink, p->fts_accpath) == -1) ) + printf(", not modified: %s)\n", + strerror(errno)); + else + printf(", modified)\n"); + } else + printf(")\n"); + } + return (label); +} + +const char * +rlink(const char *name) +{ + static char lbuf[MAXPATHLEN]; + int len; + + if ((len = readlink(name, lbuf, sizeof(lbuf) - 1)) == -1) + mtree_err("%s: %s", name, strerror(errno)); + lbuf[len] = '\0'; + return (lbuf); +} Added: projects/mtree/contrib/mtree/crc.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/mtree/contrib/mtree/crc.c Tue Sep 18 21:36:24 2012 (r240679) @@ -0,0 +1,164 @@ +/* $NetBSD: crc.c,v 1.8 2005/06/02 06:04:46 lukem Exp $ */ + +/*- + * Copyright (c) 1991, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * James W. Williams of NASA Goddard Space Flight Center. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if HAVE_NBTOOL_CONFIG_H +#include "nbtool_config.h" +#endif + +#include +#if defined(__RCSID) && !defined(lint) +#if 0 +static char sccsid[] = "@(#)crc.c 8.1 (Berkeley) 6/17/93"; +#else +__RCSID("$NetBSD: crc.c,v 1.8 2005/06/02 06:04:46 lukem Exp $"); +#endif +#endif /* not lint */ + +#include + +#include +#include +#include + +#include "extern.h" + +static const u_int32_t crctab[] = { + 0x0, + 0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b, + 0x1a864db2, 0x1e475005, 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, + 0x2b4bcb61, 0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd, + 0x4c11db70, 0x48d0c6c7, 0x4593e01e, 0x4152fda9, 0x5f15adac, + 0x5bd4b01b, 0x569796c2, 0x52568b75, 0x6a1936c8, 0x6ed82b7f, + 0x639b0da6, 0x675a1011, 0x791d4014, 0x7ddc5da3, 0x709f7b7a, + 0x745e66cd, 0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, 0x95609039, + 0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 0x8664e6e5, 0xbe2b5b58, + 0xbaea46ef, 0xb7a96036, 0xb3687d81, 0xad2f2d84, 0xa9ee3033, + 0xa4ad16ea, 0xa06c0b5d, 0xd4326d90, 0xd0f37027, 0xddb056fe, + 0xd9714b49, 0xc7361b4c, 0xc3f706fb, 0xceb42022, 0xca753d95, + 0xf23a8028, 0xf6fb9d9f, 0xfbb8bb46, 0xff79a6f1, 0xe13ef6f4, + 0xe5ffeb43, 0xe8bccd9a, 0xec7dd02d, 0x34867077, 0x30476dc0, + 0x3d044b19, 0x39c556ae, 0x278206ab, 0x23431b1c, 0x2e003dc5, + 0x2ac12072, 0x128e9dcf, 0x164f8078, 0x1b0ca6a1, 0x1fcdbb16, + 0x018aeb13, 0x054bf6a4, 0x0808d07d, 0x0cc9cdca, 0x7897ab07, + 0x7c56b6b0, 0x71159069, 0x75d48dde, 0x6b93dddb, 0x6f52c06c, + 0x6211e6b5, 0x66d0fb02, 0x5e9f46bf, 0x5a5e5b08, 0x571d7dd1, + 0x53dc6066, 0x4d9b3063, 0x495a2dd4, 0x44190b0d, 0x40d816ba, + 0xaca5c697, 0xa864db20, 0xa527fdf9, 0xa1e6e04e, 0xbfa1b04b, + 0xbb60adfc, 0xb6238b25, 0xb2e29692, 0x8aad2b2f, 0x8e6c3698, + 0x832f1041, 0x87ee0df6, 0x99a95df3, 0x9d684044, 0x902b669d, + 0x94ea7b2a, 0xe0b41de7, 0xe4750050, 0xe9362689, 0xedf73b3e, + 0xf3b06b3b, 0xf771768c, 0xfa325055, 0xfef34de2, 0xc6bcf05f, + 0xc27dede8, 0xcf3ecb31, 0xcbffd686, 0xd5b88683, 0xd1799b34, + 0xdc3abded, 0xd8fba05a, 0x690ce0ee, 0x6dcdfd59, 0x608edb80, + 0x644fc637, 0x7a089632, 0x7ec98b85, 0x738aad5c, 0x774bb0eb, + 0x4f040d56, 0x4bc510e1, 0x46863638, 0x42472b8f, 0x5c007b8a, + 0x58c1663d, 0x558240e4, 0x51435d53, 0x251d3b9e, 0x21dc2629, + 0x2c9f00f0, 0x285e1d47, 0x36194d42, 0x32d850f5, 0x3f9b762c, + 0x3b5a6b9b, 0x0315d626, 0x07d4cb91, 0x0a97ed48, 0x0e56f0ff, + 0x1011a0fa, 0x14d0bd4d, 0x19939b94, 0x1d528623, 0xf12f560e, + 0xf5ee4bb9, 0xf8ad6d60, 0xfc6c70d7, 0xe22b20d2, 0xe6ea3d65, + 0xeba91bbc, 0xef68060b, 0xd727bbb6, 0xd3e6a601, 0xdea580d8, + 0xda649d6f, 0xc423cd6a, 0xc0e2d0dd, 0xcda1f604, 0xc960ebb3, + 0xbd3e8d7e, 0xb9ff90c9, 0xb4bcb610, 0xb07daba7, 0xae3afba2, + 0xaafbe615, 0xa7b8c0cc, 0xa379dd7b, 0x9b3660c6, 0x9ff77d71, + 0x92b45ba8, 0x9675461f, 0x8832161a, 0x8cf30bad, 0x81b02d74, + 0x857130c3, 0x5d8a9099, 0x594b8d2e, 0x5408abf7, 0x50c9b640, + 0x4e8ee645, 0x4a4ffbf2, 0x470cdd2b, 0x43cdc09c, 0x7b827d21, + 0x7f436096, 0x7200464f, 0x76c15bf8, 0x68860bfd, 0x6c47164a, + 0x61043093, 0x65c52d24, 0x119b4be9, 0x155a565e, 0x18197087, + 0x1cd86d30, 0x029f3d35, 0x065e2082, 0x0b1d065b, 0x0fdc1bec, + 0x3793a651, 0x3352bbe6, 0x3e119d3f, 0x3ad08088, 0x2497d08d, + 0x2056cd3a, 0x2d15ebe3, 0x29d4f654, 0xc5a92679, 0xc1683bce, + 0xcc2b1d17, 0xc8ea00a0, 0xd6ad50a5, 0xd26c4d12, 0xdf2f6bcb, + 0xdbee767c, 0xe3a1cbc1, 0xe760d676, 0xea23f0af, 0xeee2ed18, + 0xf0a5bd1d, 0xf464a0aa, 0xf9278673, 0xfde69bc4, 0x89b8fd09, + 0x8d79e0be, 0x803ac667, 0x84fbdbd0, 0x9abc8bd5, 0x9e7d9662, + 0x933eb0bb, 0x97ffad0c, 0xafb010b1, 0xab710d06, 0xa6322bdf, + 0xa2f33668, 0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4 +}; + +/* + * Compute a POSIX 1003.2 checksum. This routine has been broken out so that + * other programs can use it. It takes a file descriptor to read from and + * locations to store the crc and the number of bytes read. It returns 0 on + * success and 1 on failure. Errno is set on failure. + */ +extern int sflag; +u_int32_t crc_total = ~0; /* The crc over a number of files. */ + +int +crc(int fd, u_int32_t *cval, u_int32_t *clen) +{ + u_char *p; + int nr; + u_int32_t thecrc, len; + u_int32_t crctot; + u_char buf[16 * 1024]; + +#define COMPUTE(var, ch) (var) = (var) << 8 ^ crctab[(var) >> 24 ^ (ch)] + + thecrc = len = crctot = 0; + if (sflag) + crctot = ~crc_total; + while ((nr = read(fd, buf, sizeof(buf))) > 0) + if (sflag) { + for (len += nr, p = buf; nr--; ++p) { + COMPUTE(thecrc, *p); + COMPUTE(crctot, *p); + } + } else { + for (len += nr, p = buf; nr--; ++p) + COMPUTE(thecrc, *p); + } + if (nr < 0) + return 1; + + *clen = len; + + /* Include the length of the file. */ + if (sflag) { + for (; len != 0; len >>= 8) { + COMPUTE(thecrc, len & 0xff); + COMPUTE(crctot, len & 0xff); + } + } else { + for (; len != 0; len >>= 8) + COMPUTE(thecrc, len & 0xff); + } + + *cval = ~thecrc; + if (sflag) + crc_total = ~crctot; + return 0; +} Added: projects/mtree/contrib/mtree/create.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/mtree/contrib/mtree/create.c Tue Sep 18 21:36:24 2012 (r240679) @@ -0,0 +1,427 @@ +/* $NetBSD: create.c,v 1.59 2012/07/15 09:08:29 spz Exp $ */ + +/*- + * Copyright (c) 1989, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if HAVE_NBTOOL_CONFIG_H +#include "nbtool_config.h" +#endif + +#include +#if defined(__RCSID) && !defined(lint) +#if 0 +static char sccsid[] = "@(#)create.c 8.1 (Berkeley) 6/6/93"; +#else +__RCSID("$NetBSD: create.c,v 1.59 2012/07/15 09:08:29 spz Exp $"); +#endif +#endif /* not lint */ + +#include +#include + +#if ! HAVE_NBTOOL_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef NO_MD5 +#include +#endif +#ifndef NO_RMD160 +#include +#endif +#ifndef NO_SHA1 +#include +#endif +#ifndef NO_SHA2 +#include +#endif + +#include "extern.h" + +#define INDENTNAMELEN 15 +#define MAXLINELEN 80 + +static gid_t gid; +static uid_t uid; +static mode_t mode; +static u_long flags; + +static int dcmp(const FTSENT **, const FTSENT **); +static void output(int *, const char *, ...) + __attribute__((__format__(__printf__, 2, 3))); +static int statd(FTS *, FTSENT *, uid_t *, gid_t *, mode_t *, u_long *); +static void statf(FTSENT *); + +void +cwalk(void) +{ + FTS *t; + FTSENT *p; + time_t clocktime; + char host[MAXHOSTNAMELEN + 1]; + const char *user; + char *argv[2]; + char dot[] = "."; + + argv[0] = dot; + argv[1] = NULL; + + time(&clocktime); + gethostname(host, sizeof(host)); + host[sizeof(host) - 1] = '\0'; + if ((user = getlogin()) == NULL) { + struct passwd *pw; + user = (pw = getpwuid(getuid())) == NULL ? pw->pw_name : + ""; + } + + printf( + "#\t user: %s\n#\tmachine: %s\n#\t tree: %s\n#\t date: %s", + user, host, fullpath, ctime(&clocktime)); + + if ((t = fts_open(argv, ftsoptions, dcmp)) == NULL) + mtree_err("fts_open: %s", strerror(errno)); + while ((p = fts_read(t)) != NULL) { + if (check_excludes(p->fts_name, p->fts_path)) { + fts_set(t, p, FTS_SKIP); + continue; + } + switch(p->fts_info) { + case FTS_D: + printf("\n# %s\n", p->fts_path); + statd(t, p, &uid, &gid, &mode, &flags); + statf(p); + break; + case FTS_DP: + if (p->fts_level > 0) + printf("# %s\n..\n\n", p->fts_path); + break; + case FTS_DNR: + case FTS_ERR: + case FTS_NS: + mtree_err("%s: %s", + p->fts_path, strerror(p->fts_errno)); + break; + default: + if (!dflag) + statf(p); + break; + + } + } + fts_close(t); + if (sflag && keys & F_CKSUM) + mtree_err("%s checksum: %u", fullpath, crc_total); +} + +static void +statf(FTSENT *p) +{ + u_int32_t len, val; + int fd, indent; + const char *name; +#if !defined(NO_MD5) || !defined(NO_RMD160) || !defined(NO_SHA1) || !defined(NO_SHA2) + char *digestbuf; +#endif + + indent = printf("%s%s", + S_ISDIR(p->fts_statp->st_mode) ? "" : " ", vispath(p->fts_name)); + + if (indent > INDENTNAMELEN) + indent = MAXLINELEN; + else + indent += printf("%*s", INDENTNAMELEN - indent, ""); + + if (!S_ISREG(p->fts_statp->st_mode)) + output(&indent, "type=%s", inotype(p->fts_statp->st_mode)); + if (keys & (F_UID | F_UNAME) && p->fts_statp->st_uid != uid) { + if (keys & F_UNAME && + (name = user_from_uid(p->fts_statp->st_uid, 1)) != NULL) + output(&indent, "uname=%s", name); + else /* if (keys & F_UID) */ + output(&indent, "uid=%u", p->fts_statp->st_uid); + } + if (keys & (F_GID | F_GNAME) && p->fts_statp->st_gid != gid) { + if (keys & F_GNAME && + (name = group_from_gid(p->fts_statp->st_gid, 1)) != NULL) + output(&indent, "gname=%s", name); + else /* if (keys & F_GID) */ + output(&indent, "gid=%u", p->fts_statp->st_gid); + } + if (keys & F_MODE && (p->fts_statp->st_mode & MBITS) != mode) + output(&indent, "mode=%#o", p->fts_statp->st_mode & MBITS); + if (keys & F_DEV && + (S_ISBLK(p->fts_statp->st_mode) || S_ISCHR(p->fts_statp->st_mode))) + output(&indent, "device=%#llx", + (long long)p->fts_statp->st_rdev); + if (keys & F_NLINK && p->fts_statp->st_nlink != 1) + output(&indent, "nlink=%u", p->fts_statp->st_nlink); + if (keys & F_SIZE && S_ISREG(p->fts_statp->st_mode)) + output(&indent, "size=%lld", (long long)p->fts_statp->st_size); + if (keys & F_TIME) +#if defined(BSD4_4) && !defined(HAVE_NBTOOL_CONFIG_H) + output(&indent, "time=%ld.%ld", + (long)p->fts_statp->st_mtimespec.tv_sec, + p->fts_statp->st_mtimespec.tv_nsec); +#else + output(&indent, "time=%ld.%ld", + (long)p->fts_statp->st_mtime, (long)0); +#endif + if (keys & F_CKSUM && S_ISREG(p->fts_statp->st_mode)) { + if ((fd = open(p->fts_accpath, O_RDONLY, 0)) < 0 || + crc(fd, &val, &len)) + mtree_err("%s: %s", p->fts_accpath, strerror(errno)); + close(fd); + output(&indent, "cksum=%lu", (long)val); + } +#ifndef NO_MD5 + if (keys & F_MD5 && S_ISREG(p->fts_statp->st_mode)) { + if ((digestbuf = MD5File(p->fts_accpath, NULL)) == NULL) + mtree_err("%s: MD5File failed: %s", p->fts_accpath, strerror(errno)); + output(&indent, "md5=%s", digestbuf); + free(digestbuf); + } +#endif /* ! NO_MD5 */ +#ifndef NO_RMD160 + if (keys & F_RMD160 && S_ISREG(p->fts_statp->st_mode)) { + if ((digestbuf = RMD160File(p->fts_accpath, NULL)) == NULL) + mtree_err("%s: RMD160File failed: %s", p->fts_accpath, strerror(errno)); + output(&indent, "rmd160=%s", digestbuf); + free(digestbuf); + } +#endif /* ! NO_RMD160 */ +#ifndef NO_SHA1 + if (keys & F_SHA1 && S_ISREG(p->fts_statp->st_mode)) { + if ((digestbuf = SHA1File(p->fts_accpath, NULL)) == NULL) + mtree_err("%s: SHA1File failed: %s", p->fts_accpath, strerror(errno)); + output(&indent, "sha1=%s", digestbuf); + free(digestbuf); + } +#endif /* ! NO_SHA1 */ +#ifndef NO_SHA2 + if (keys & F_SHA256 && S_ISREG(p->fts_statp->st_mode)) { + if ((digestbuf = SHA256_File(p->fts_accpath, NULL)) == NULL) + mtree_err("%s: SHA256_File failed: %s", p->fts_accpath, strerror(errno)); + output(&indent, "sha256=%s", digestbuf); + free(digestbuf); + } + if (keys & F_SHA384 && S_ISREG(p->fts_statp->st_mode)) { + if ((digestbuf = SHA384_File(p->fts_accpath, NULL)) == NULL) + mtree_err("%s: SHA384_File failed: %s", p->fts_accpath, strerror(errno)); + output(&indent, "sha384=%s", digestbuf); + free(digestbuf); + } + if (keys & F_SHA512 && S_ISREG(p->fts_statp->st_mode)) { + if ((digestbuf = SHA512_File(p->fts_accpath, NULL)) == NULL) + mtree_err("%s: SHA512_File failed: %s", p->fts_accpath, strerror(errno)); + output(&indent, "sha512=%s", digestbuf); + free(digestbuf); + } +#endif /* ! NO_SHA2 */ + if (keys & F_SLINK && + (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) + output(&indent, "link=%s", vispath(rlink(p->fts_accpath))); +#if HAVE_STRUCT_STAT_ST_FLAGS + if (keys & F_FLAGS && p->fts_statp->st_flags != flags) { + char *str = flags_to_string(p->fts_statp->st_flags, "none"); + output(&indent, "flags=%s", str); + free(str); + } +#endif + putchar('\n'); +} + +/* XXX + * FLAGS2INDEX will fail once the user and system settable bits need more + * than one byte, respectively. + */ +#define FLAGS2INDEX(x) (((x >> 8) & 0x0000ff00) | (x & 0x000000ff)) + +#define MTREE_MAXGID 5000 +#define MTREE_MAXUID 5000 +#define MTREE_MAXMODE (MBITS + 1) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Tue Sep 18 22:08:52 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 28F06106566B; Tue, 18 Sep 2012 22:08:52 +0000 (UTC) (envelope-from cherry@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 151578FC21; Tue, 18 Sep 2012 22:08:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8IM8pAf071002; Tue, 18 Sep 2012 22:08:51 GMT (envelope-from cherry@svn.freebsd.org) Received: (from cherry@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8IM8pEU071000; Tue, 18 Sep 2012 22:08:51 GMT (envelope-from cherry@svn.freebsd.org) Message-Id: <201209182208.q8IM8pEU071000@svn.freebsd.org> From: "Cherry G. Mathew" Date: Tue, 18 Sep 2012 22:08:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240681 - projects/amd64_xen_pv/sys/amd64/include X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2012 22:08:52 -0000 Author: cherry Date: Tue Sep 18 22:08:51 2012 New Revision: 240681 URL: http://svn.freebsd.org/changeset/base/240681 Log: Add relevant "FLAGS", @TYPE directives to the .note assembler directive. This fixes notes section breakage with clang compiled binaries. Approved by: gibbs (implicit) Modified: projects/amd64_xen_pv/sys/amd64/include/asmacros.h Modified: projects/amd64_xen_pv/sys/amd64/include/asmacros.h ============================================================================== --- projects/amd64_xen_pv/sys/amd64/include/asmacros.h Tue Sep 18 22:04:59 2012 (r240680) +++ projects/amd64_xen_pv/sys/amd64/include/asmacros.h Tue Sep 18 22:08:51 2012 (r240681) @@ -203,7 +203,7 @@ #ifdef __STDC__ #define ELFNOTE(name, type, desctype, descdata...) \ -.pushsection .note.name ; \ +.pushsection .note.name, "", @note ; \ .align 4 ; \ .long 2f - 1f /* namesz */ ; \ .long 4f - 3f /* descsz */ ; \ @@ -215,7 +215,7 @@ .popsection #else /* !__STDC__, i.e. -traditional */ #define ELFNOTE(name, type, desctype, descdata) \ -.pushsection .note.name ; \ +.pushsection .note.name, "", @note ; \ .align 4 ; \ .long 2f - 1f /* namesz */ ; \ .long 4f - 3f /* descsz */ ; \ From owner-svn-src-projects@FreeBSD.ORG Wed Sep 19 00:27:51 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8075E106564A; Wed, 19 Sep 2012 00:27:51 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 666028FC0C; Wed, 19 Sep 2012 00:27:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8J0Rpin090541; Wed, 19 Sep 2012 00:27:51 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8J0RoUP090509; Wed, 19 Sep 2012 00:27:50 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201209190027.q8J0RoUP090509@svn.freebsd.org> From: Attilio Rao Date: Wed, 19 Sep 2012 00:27:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240685 - in projects/fuse: bin/ps etc/mtree include sbin sbin/ipfw sbin/nvmecontrol share/man/man4 sys/amd64/conf sys/arm/conf sys/boot/fdt/dts sys/boot/i386/loader sys/boot/ofw/libofw... X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2012 00:27:51 -0000 Author: attilio Date: Wed Sep 19 00:27:50 2012 New Revision: 240685 URL: http://svn.freebsd.org/changeset/base/240685 Log: MFC Added: projects/fuse/sbin/nvmecontrol/ - copied from r240684, head/sbin/nvmecontrol/ projects/fuse/sys/arm/conf/AC100 - copied unchanged from r240684, head/sys/arm/conf/AC100 projects/fuse/sys/boot/fdt/dts/tegra20-paz00.dts - copied unchanged from r240684, head/sys/boot/fdt/dts/tegra20-paz00.dts projects/fuse/sys/boot/fdt/dts/tegra20.dtsi - copied unchanged from r240684, head/sys/boot/fdt/dts/tegra20.dtsi projects/fuse/sys/dev/nvd/ - copied from r240684, head/sys/dev/nvd/ projects/fuse/sys/dev/nvme/ - copied from r240684, head/sys/dev/nvme/ projects/fuse/sys/modules/nvd/ - copied from r240684, head/sys/modules/nvd/ projects/fuse/sys/modules/nvme/ - copied from r240684, head/sys/modules/nvme/ projects/fuse/usr.sbin/bsdconfig/networking/share/ - copied from r240684, head/usr.sbin/bsdconfig/networking/share/ projects/fuse/usr.sbin/bsdconfig/password/share/ - copied from r240684, head/usr.sbin/bsdconfig/password/share/ projects/fuse/usr.sbin/bsdconfig/share/ - copied from r240684, head/usr.sbin/bsdconfig/share/ projects/fuse/usr.sbin/bsdconfig/startup/share/ - copied from r240684, head/usr.sbin/bsdconfig/startup/share/ projects/fuse/usr.sbin/bsdconfig/timezone/share/ - copied from r240684, head/usr.sbin/bsdconfig/timezone/share/ projects/fuse/usr.sbin/bsdconfig/usermgmt/share/ - copied from r240684, head/usr.sbin/bsdconfig/usermgmt/share/ Deleted: projects/fuse/usr.sbin/bsdconfig/include/common.subr projects/fuse/usr.sbin/bsdconfig/include/dialog.subr projects/fuse/usr.sbin/bsdconfig/include/mustberoot.subr projects/fuse/usr.sbin/bsdconfig/include/strings.subr projects/fuse/usr.sbin/bsdconfig/include/sysrc.subr projects/fuse/usr.sbin/bsdconfig/networking/include/common.subr projects/fuse/usr.sbin/bsdconfig/networking/include/device.subr projects/fuse/usr.sbin/bsdconfig/networking/include/hostname.subr projects/fuse/usr.sbin/bsdconfig/networking/include/ipaddr.subr projects/fuse/usr.sbin/bsdconfig/networking/include/media.subr projects/fuse/usr.sbin/bsdconfig/networking/include/netmask.subr projects/fuse/usr.sbin/bsdconfig/networking/include/resolv.subr projects/fuse/usr.sbin/bsdconfig/networking/include/routing.subr projects/fuse/usr.sbin/bsdconfig/password/include/password.subr projects/fuse/usr.sbin/bsdconfig/startup/include/rcconf.subr projects/fuse/usr.sbin/bsdconfig/startup/include/rcedit.subr projects/fuse/usr.sbin/bsdconfig/startup/include/rcvar.subr projects/fuse/usr.sbin/bsdconfig/timezone/include/continents.subr projects/fuse/usr.sbin/bsdconfig/timezone/include/countries.subr projects/fuse/usr.sbin/bsdconfig/timezone/include/iso3166.subr projects/fuse/usr.sbin/bsdconfig/timezone/include/menus.subr projects/fuse/usr.sbin/bsdconfig/timezone/include/zones.subr projects/fuse/usr.sbin/bsdconfig/usermgmt/include/group_input.subr projects/fuse/usr.sbin/bsdconfig/usermgmt/include/user_input.subr Modified: projects/fuse/bin/ps/keyword.c projects/fuse/bin/ps/ps.1 projects/fuse/etc/mtree/BSD.include.dist projects/fuse/include/Makefile projects/fuse/sbin/Makefile.amd64 projects/fuse/sbin/Makefile.i386 projects/fuse/sbin/ipfw/ipfw.8 projects/fuse/share/man/man4/pf.4 projects/fuse/share/man/man4/usb_quirk.4 projects/fuse/sys/amd64/conf/NOTES projects/fuse/sys/boot/i386/loader/main.c projects/fuse/sys/boot/ofw/libofw/devicename.c projects/fuse/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c projects/fuse/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_debug.h projects/fuse/sys/conf/NOTES projects/fuse/sys/conf/files.amd64 projects/fuse/sys/conf/files.i386 projects/fuse/sys/conf/options projects/fuse/sys/contrib/altq/altq/altq_hfsc.c projects/fuse/sys/contrib/altq/altq/altq_priq.c projects/fuse/sys/contrib/altq/altq/altq_rmclass.c projects/fuse/sys/dev/acpica/acpi_cpu.c projects/fuse/sys/dev/alc/if_alc.c projects/fuse/sys/dev/ata/ata-lowlevel.c projects/fuse/sys/dev/ath/ath_hal/ah.c projects/fuse/sys/dev/ath/ath_hal/ah.h projects/fuse/sys/dev/ath/ath_hal/ah_internal.h projects/fuse/sys/dev/ath/if_ath_sysctl.c projects/fuse/sys/dev/ath/if_ath_tx.c projects/fuse/sys/dev/ath/if_athioctl.h projects/fuse/sys/dev/bge/if_bge.c projects/fuse/sys/dev/cxgb/cxgb_main.c projects/fuse/sys/dev/cxgb/cxgb_osdep.h projects/fuse/sys/dev/cxgbe/osdep.h projects/fuse/sys/dev/cxgbe/t4_main.c projects/fuse/sys/dev/e1000/if_em.c projects/fuse/sys/dev/et/if_et.c projects/fuse/sys/dev/hwpmc/hwpmc_amd.c projects/fuse/sys/dev/jme/if_jme.c projects/fuse/sys/dev/mlx/mlx.c projects/fuse/sys/dev/mlx/mlx_disk.c projects/fuse/sys/dev/mlx/mlx_pci.c projects/fuse/sys/dev/mlx/mlxreg.h projects/fuse/sys/dev/mlx/mlxvar.h projects/fuse/sys/dev/mly/mly.c projects/fuse/sys/dev/pci/pci.c projects/fuse/sys/dev/pci/pcireg.h projects/fuse/sys/dev/re/if_re.c projects/fuse/sys/dev/sound/usb/uaudio.c projects/fuse/sys/dev/sound/usb/uaudioreg.h projects/fuse/sys/dev/usb/input/ums.c projects/fuse/sys/dev/usb/net/uhso.c projects/fuse/sys/dev/usb/quirk/usb_quirk.c projects/fuse/sys/dev/usb/quirk/usb_quirk.h projects/fuse/sys/dev/usb/usbdevs projects/fuse/sys/geom/geom_disk.c projects/fuse/sys/i386/conf/NOTES projects/fuse/sys/modules/Makefile projects/fuse/sys/net/pfvar.h projects/fuse/sys/netipsec/xform_ipip.c projects/fuse/sys/netpfil/pf/pf.c projects/fuse/sys/netpfil/pf/pf_ioctl.c projects/fuse/sys/netpfil/pf/pf_lb.c projects/fuse/sys/ofed/include/linux/pci.h projects/fuse/sys/powerpc/mpc85xx/pci_fdt.c projects/fuse/sys/sys/_rmlock.h projects/fuse/sys/sys/pcpu.h projects/fuse/sys/vm/uma_core.c projects/fuse/usr.bin/systat/cmds.c projects/fuse/usr.bin/systat/extern.h projects/fuse/usr.bin/systat/icmp.c projects/fuse/usr.bin/systat/icmp6.c projects/fuse/usr.bin/systat/ip.c projects/fuse/usr.bin/systat/ip6.c projects/fuse/usr.bin/systat/keyboard.c projects/fuse/usr.bin/systat/main.c projects/fuse/usr.bin/systat/systat.1 projects/fuse/usr.bin/systat/tcp.c projects/fuse/usr.bin/yes/yes.1 projects/fuse/usr.sbin/bsdconfig/Makefile projects/fuse/usr.sbin/bsdconfig/bsdconfig projects/fuse/usr.sbin/bsdconfig/console/console projects/fuse/usr.sbin/bsdconfig/console/font projects/fuse/usr.sbin/bsdconfig/console/keymap projects/fuse/usr.sbin/bsdconfig/console/repeat projects/fuse/usr.sbin/bsdconfig/console/saver projects/fuse/usr.sbin/bsdconfig/console/screenmap projects/fuse/usr.sbin/bsdconfig/console/ttys projects/fuse/usr.sbin/bsdconfig/diskmgmt/diskmgmt projects/fuse/usr.sbin/bsdconfig/docsinstall/docsinstall projects/fuse/usr.sbin/bsdconfig/dot/dot projects/fuse/usr.sbin/bsdconfig/include/Makefile projects/fuse/usr.sbin/bsdconfig/mouse/disable projects/fuse/usr.sbin/bsdconfig/mouse/enable projects/fuse/usr.sbin/bsdconfig/mouse/flags projects/fuse/usr.sbin/bsdconfig/mouse/mouse projects/fuse/usr.sbin/bsdconfig/mouse/port projects/fuse/usr.sbin/bsdconfig/mouse/type projects/fuse/usr.sbin/bsdconfig/networking/Makefile projects/fuse/usr.sbin/bsdconfig/networking/defaultrouter projects/fuse/usr.sbin/bsdconfig/networking/devices projects/fuse/usr.sbin/bsdconfig/networking/hostname projects/fuse/usr.sbin/bsdconfig/networking/include/Makefile projects/fuse/usr.sbin/bsdconfig/networking/nameservers projects/fuse/usr.sbin/bsdconfig/networking/networking projects/fuse/usr.sbin/bsdconfig/password/Makefile projects/fuse/usr.sbin/bsdconfig/password/include/Makefile projects/fuse/usr.sbin/bsdconfig/password/password projects/fuse/usr.sbin/bsdconfig/security/kern_securelevel projects/fuse/usr.sbin/bsdconfig/security/security projects/fuse/usr.sbin/bsdconfig/startup/Makefile projects/fuse/usr.sbin/bsdconfig/startup/include/Makefile projects/fuse/usr.sbin/bsdconfig/startup/misc projects/fuse/usr.sbin/bsdconfig/startup/rcadd projects/fuse/usr.sbin/bsdconfig/startup/rcconf projects/fuse/usr.sbin/bsdconfig/startup/rcdelete projects/fuse/usr.sbin/bsdconfig/startup/rcedit projects/fuse/usr.sbin/bsdconfig/startup/rcvar projects/fuse/usr.sbin/bsdconfig/startup/startup projects/fuse/usr.sbin/bsdconfig/timezone/Makefile projects/fuse/usr.sbin/bsdconfig/timezone/include/Makefile projects/fuse/usr.sbin/bsdconfig/timezone/timezone projects/fuse/usr.sbin/bsdconfig/ttys/ttys projects/fuse/usr.sbin/bsdconfig/usermgmt/Makefile projects/fuse/usr.sbin/bsdconfig/usermgmt/groupadd projects/fuse/usr.sbin/bsdconfig/usermgmt/groupdel projects/fuse/usr.sbin/bsdconfig/usermgmt/groupedit projects/fuse/usr.sbin/bsdconfig/usermgmt/groupinput projects/fuse/usr.sbin/bsdconfig/usermgmt/include/Makefile projects/fuse/usr.sbin/bsdconfig/usermgmt/useradd projects/fuse/usr.sbin/bsdconfig/usermgmt/userdel projects/fuse/usr.sbin/bsdconfig/usermgmt/useredit projects/fuse/usr.sbin/bsdconfig/usermgmt/userinput projects/fuse/usr.sbin/bsdconfig/usermgmt/usermgmt projects/fuse/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c projects/fuse/usr.sbin/pciconf/cap.c projects/fuse/usr.sbin/pciconf/err.c projects/fuse/usr.sbin/pkg_install/add/main.c projects/fuse/usr.sbin/pkg_install/create/perform.c projects/fuse/usr.sbin/pkg_install/info/info.h projects/fuse/usr.sbin/pkg_install/info/perform.c projects/fuse/usr.sbin/pkg_install/info/show.c projects/fuse/usr.sbin/pkg_install/lib/lib.h projects/fuse/usr.sbin/pkg_install/lib/plist.c projects/fuse/usr.sbin/pkg_install/version/perform.c Directory Properties: projects/fuse/ (props changed) projects/fuse/sbin/ (props changed) projects/fuse/sbin/ipfw/ (props changed) projects/fuse/share/man/man4/ (props changed) projects/fuse/sys/ (props changed) projects/fuse/sys/boot/ (props changed) projects/fuse/sys/cddl/contrib/opensolaris/ (props changed) projects/fuse/sys/conf/ (props changed) Modified: projects/fuse/bin/ps/keyword.c ============================================================================== --- projects/fuse/bin/ps/keyword.c Tue Sep 18 22:28:42 2012 (r240684) +++ projects/fuse/bin/ps/keyword.c Wed Sep 19 00:27:50 2012 (r240685) @@ -79,6 +79,7 @@ static VAR var[] = { {"cow", "COW", NULL, 0, kvar, KOFF(ki_cow), UINT, "u", 0}, {"cpu", "CPU", NULL, 0, kvar, KOFF(ki_estcpu), UINT, "d", 0}, {"cputime", "", "time", 0, NULL, 0, CHAR, NULL, 0}, + {"dsiz", "DSIZ", NULL, 0, kvar, KOFF(ki_dsize), PGTOK, "ld", 0}, {"egid", "", "gid", 0, NULL, 0, CHAR, NULL, 0}, {"egroup", "", "group", 0, NULL, 0, CHAR, NULL, 0}, {"emul", "EMUL", NULL, LJUST, emulname, 0, CHAR, NULL, 0}, @@ -141,6 +142,7 @@ static VAR var[] = { UINT, "x", 0}, {"sigmask", "BLOCKED", NULL, 0, kvar, KOFF(ki_sigmask), UINT, "x", 0}, {"sl", "SL", NULL, INF127, kvar, KOFF(ki_slptime), UINT, "d", 0}, + {"ssiz", "SSIZ", NULL, 0, kvar, KOFF(ki_ssize), PGTOK, "ld", 0}, {"start", "STARTED", NULL, LJUST|USER, started, 0, CHAR, NULL, 0}, {"stat", "", "state", 0, NULL, 0, CHAR, NULL, 0}, {"state", "STAT", NULL, LJUST, state, 0, CHAR, NULL, 0}, Modified: projects/fuse/bin/ps/ps.1 ============================================================================== --- projects/fuse/bin/ps/ps.1 Tue Sep 18 22:28:42 2012 (r240684) +++ projects/fuse/bin/ps/ps.1 Wed Sep 19 00:27:50 2012 (r240685) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd May 20, 2012 +.Dd September 18, 2012 .Dt PS 1 .Os .Sh NAME @@ -500,6 +500,8 @@ command and arguments number of copy-on-write faults .It Cm cpu short-term CPU usage factor (for scheduling) +.It Cm dsiz +data size (in Kbytes) .It Cm emul system-call emulation environment .It Cm etime @@ -610,6 +612,8 @@ blocked signals (alias .Cm blocked ) .It Cm sl sleep time (in seconds; 127 = infinity) +.It Cm ssiz +stack size (in Kbytes) .It Cm start time started .It Cm state Modified: projects/fuse/etc/mtree/BSD.include.dist ============================================================================== --- projects/fuse/etc/mtree/BSD.include.dist Tue Sep 18 22:28:42 2012 (r240684) +++ projects/fuse/etc/mtree/BSD.include.dist Wed Sep 19 00:27:50 2012 (r240685) @@ -126,6 +126,8 @@ .. nand .. + nvme + .. ofw .. pbio Modified: projects/fuse/include/Makefile ============================================================================== --- projects/fuse/include/Makefile Tue Sep 18 22:28:42 2012 (r240684) +++ projects/fuse/include/Makefile Wed Sep 19 00:27:50 2012 (r240685) @@ -40,8 +40,8 @@ LDIRS= bsm cam geom net net80211 netatal LSUBDIRS= cam/ata cam/scsi \ dev/acpica dev/an dev/bktr dev/ciss dev/filemon dev/firewire dev/hwpmc \ - dev/ic dev/iicbus ${_dev_ieee488} dev/io dev/lmc dev/mfi dev/ofw \ - dev/pbio ${_dev_powermac_nvram} dev/ppbus dev/smbus \ + dev/ic dev/iicbus ${_dev_ieee488} dev/io dev/lmc dev/mfi dev/nvme \ + dev/ofw dev/pbio ${_dev_powermac_nvram} dev/ppbus dev/smbus \ dev/speaker dev/usb dev/utopia dev/vkbd dev/wi \ fs/devfs fs/fdescfs fs/msdosfs fs/nandfs fs/nfs fs/ntfs fs/nullfs \ ${_fs_nwfs} fs/portalfs fs/procfs fs/smbfs fs/udf fs/unionfs \ Modified: projects/fuse/sbin/Makefile.amd64 ============================================================================== --- projects/fuse/sbin/Makefile.amd64 Tue Sep 18 22:28:42 2012 (r240684) +++ projects/fuse/sbin/Makefile.amd64 Wed Sep 19 00:27:50 2012 (r240685) @@ -2,3 +2,4 @@ SUBDIR += bsdlabel SUBDIR += fdisk +SUBDIR += nvmecontrol Modified: projects/fuse/sbin/Makefile.i386 ============================================================================== --- projects/fuse/sbin/Makefile.i386 Tue Sep 18 22:28:42 2012 (r240684) +++ projects/fuse/sbin/Makefile.i386 Wed Sep 19 00:27:50 2012 (r240685) @@ -2,4 +2,5 @@ SUBDIR += bsdlabel SUBDIR += fdisk +SUBDIR += nvmecontrol SUBDIR += sconfig Modified: projects/fuse/sbin/ipfw/ipfw.8 ============================================================================== --- projects/fuse/sbin/ipfw/ipfw.8 Tue Sep 18 22:28:42 2012 (r240684) +++ projects/fuse/sbin/ipfw/ipfw.8 Wed Sep 19 00:27:50 2012 (r240685) @@ -141,7 +141,7 @@ the firewall will have a .Em stateful behaviour, i.e., upon a match it will create .Em dynamic rules , -i.e. rules that match packets with the same 5-tuple +i.e., rules that match packets with the same 5-tuple (protocol, source and destination addresses and ports) as the packet which caused their creation. Dynamic rules, which have a limited lifetime, are checked @@ -223,14 +223,15 @@ When listing and is specified, also show expired dynamic rules. .It Fl f Do not ask for confirmation for commands that can cause problems -if misused, -.No i.e. Cm flush . +if misused, i.e., +.Cm flush . If there is no tty associated with the process, this is implied. .It Fl i When listing a table (see the .Sx LOOKUP TABLES section below for more information on lookup tables), format values -as IP addresses. By default, values are shown as integers. +as IP addresses. +By default, values are shown as integers. .It Fl n Only check syntax of the command strings, without actually passing them to the kernel. @@ -421,7 +422,7 @@ Keywords are case-sensitive, whereas arg or may not be case-sensitive depending on their nature (e.g.\& uid's are, hostnames are not). .Pp -Some arguments (e.g. port or address lists) are comma-separated +Some arguments (e.g., port or address lists) are comma-separated lists of values. In this case, spaces after commas ',' are allowed to make the line more readable. @@ -873,7 +874,8 @@ Takes rule number saved to internal stac action and returns ruleset processing to the first rule with number greater than number of corresponding .Cm call -rule. See description of the +rule. +See description of the .Cm call action for more details. .Pp @@ -955,28 +957,36 @@ actions. The packet is tagged so as to use the FIB (routing table) .Ar fibnum in any subsequent forwarding decisions. -Initially this is limited to the values 0 through 15, see -.Xr setfib 1 . +In the current implementation, this is limited to the values 0 through 15, see +.Xr setfib 2 . Processing continues at the next rule. It is possible to use the .Cm tablearg -keyword with a setfib. If tablearg value is not within compiled FIB range packet fib is set to 0. +keyword with setfib. +If the tablearg value is not within the compiled range of fibs, +the packet's fib is set to 0. .It Cm reass -Queue and reassemble ip fragments. -If the packet is not fragmented, counters are updated and processing continues with the next rule. +Queue and reassemble IP fragments. +If the packet is not fragmented, counters are updated and +processing continues with the next rule. If the packet is the last logical fragment, the packet is reassembled and, if .Va net.inet.ip.fw.one_pass -is set to 0, processing continues with the next rule, else packet is allowed to pass and search terminates. -If the packet is a fragment in the middle, it is consumed and processing stops immediately. +is set to 0, processing continues with the next rule. +Otherwise, the packet is allowed to pass and the search terminates. +If the packet is a fragment in the middle of a logical group of fragments, +it is consumed and +processing stops immediately. .Pp -Fragments handling can be tuned via +Fragment handling can be tuned via .Va net.inet.ip.maxfragpackets and .Va net.inet.ip.maxfragsperpacket -which limit, respectively, the maximum number of processable fragments (default: 800) and +which limit, respectively, the maximum number of processable +fragments (default: 800) and the maximum number of fragments per packet (default: 16). .Pp -NOTA BENE: since fragments do not contain port numbers, they should be avoided with the +NOTA BENE: since fragments do not contain port numbers, +they should be avoided with the .Nm reass rule. Alternatively, direction-based (like @@ -1596,7 +1606,8 @@ This is the short form of .It Cm sockarg Matches packets that are associated to a local socket and for which the SO_USER_COOKIE socket option has been set -to a non-zero value. As a side effect, the value of the +to a non-zero value. +As a side effect, the value of the option is made available as .Cm tablearg value, which in turn can be used as @@ -1746,7 +1757,7 @@ connected networks instead of all source .El .Sh LOOKUP TABLES Lookup tables are useful to handle large sparse sets of -addresses or other search keys (e.g. ports, jail IDs, interface names). +addresses or other search keys (e.g., ports, jail IDs, interface names). In the rest of this section we will use the term ``address''. There may be up to 65535 different lookup tables, numbered 0 to 65534. .Pp @@ -1784,7 +1795,8 @@ the routing table (see .Xr route 4 ) . .Pp Lookup tables currently support only ports, jail IDs, IPv4/IPv6 addresses -and interface names. Wildcards is not supported for interface names. +and interface names. +Wildcards is not supported for interface names. .Pp The .Cm tablearg @@ -1813,7 +1825,8 @@ Section for example usage of tables and When used with the .Cm skipto action, the user should be aware that the code will walk the ruleset -up to a rule equal to, or past, the given number, and should therefore try keep the +up to a rule equal to, or past, the given number, +and should therefore try keep the ruleset compact between the skipto and the target rules. .Sh SETS OF RULES Each rule belongs to one of 32 different @@ -2021,10 +2034,12 @@ As an example, using ``src-ip 0xffffff00 for each /24 destination subnet. .Pp The FLOW_MASK, together with the SCHED_MASK, is used to split -packets into flows. As an example, using +packets into flows. +As an example, using ``src-ip 0x000000ff'' together with the previous SCHED_MASK makes a flow for -each individual source address. In turn, flows for each /24 +each individual source address. +In turn, flows for each /24 subnet will be sent to the same scheduler instance. .Pp The above diagram holds even for the @@ -2143,12 +2158,13 @@ A file specifying the additional overhea of a packet on the link. .Pp Some link types introduce extra delays in the transmission -of a packet, e.g. because of MAC level framing, contention on +of a packet, e.g., because of MAC level framing, contention on the use of the channel, MAC level retransmissions and so on. From our point of view, the channel is effectively unavailable for this extra time, which is constant or variable depending -on the link type. Additionally, packets may be dropped after this -time (e.g. on a wireless link after too many retransmissions). +on the link type. +Additionally, packets may be dropped after this +time (e.g., on a wireless link after too many retransmissions). We can model the additional delay with an empirical curve that represents its distribution. .Bd -literal -offset indent @@ -2184,7 +2200,7 @@ If not specified here, it must be presen explicitly as a configuration parameter for the pipe; .It Cm loss-level Ar L the probability above which packets are lost. -(0.0 <= L <= 1.0, default 1.0 i.e. no loss); +(0.0 <= L <= 1.0, default 1.0 i.e., no loss); .It Cm samples Ar N the number of samples used in the internal representation of the curve (2..1024; default 100); @@ -2249,7 +2265,8 @@ but gives no service guarantees. .It Cm wf2q+ implements the WF2Q+ algorithm, which is a Weighted Fair Queueing algorithm which permits flows to share bandwidth according to -their weights. Note that weights are not priorities; even a flow +their weights. +Note that weights are not priorities; even a flow with a minuscule weight will never starve. WF2Q+ has O(log N) per-packet processing cost, where N is the number of flows, and is the default algorithm used by previous versions @@ -2535,7 +2552,8 @@ in .Xr natd 8 for more information. .It Cm tablearg -Uses argument supplied in lookup table. See +Uses argument supplied in lookup table. +See .Sx LOOKUP TABLES section below for more information on lookup tables. .El @@ -2597,11 +2615,13 @@ or before ipfw module gets loaded. .Bl -tag -width indent .It Va net.inet.ip.fw.default_to_accept: No 0 -Defines ipfw last rule behavior. This value overrides +Defines ipfw last rule behavior. +This value overrides .Cd "options IPFW_DEFAULT_TO_(ACCEPT|DENY)" from kernel configuration file. .It Va net.inet.ip.fw.tables_max: No 128 -Defines number of tables available in ipfw. Number cannot exceed 65534. +Defines number of tables available in ipfw. +Number cannot exceed 65534. .El .Sh SYSCTL VARIABLES A set of @@ -2631,12 +2651,14 @@ Option 1 should never be selected as thi An attacker can establish multiple fake associations by sending AddIP messages. .It Va net.inet.ip.alias.sctp.chunk_proc_limit: No 5 -Defines the maximum number of chunks in an SCTP packet that will be parsed for a +Defines the maximum number of chunks in an SCTP packet that will be +parsed for a packet that matches an existing association. This value is enforced to be greater or equal than .Cm net.inet.ip.alias.sctp.initialising_chunk_proc_limit . A high value is -a DoS risk yet setting too low a value may result in important control chunks in +a DoS risk yet setting too low a value may result in +important control chunks in the packet not being located and parsed. .It Va net.inet.ip.alias.sctp.error_on_ootb: No 1 Defines when the @@ -2658,7 +2680,8 @@ This value is only useful if the .Nm nat is tracking global IP addresses. .It Cm 3 -ErrorM is sent in response to all OOTB packets on both the local and global side +ErrorM is sent in response to all OOTB packets on both +the local and global side (DoS risk). .El .Pp @@ -2709,12 +2732,14 @@ will only be an INIT or ASCONF-AddIP pac A higher value may become a DoS risk as malformed packets can consume processing resources. .It Va net.inet.ip.alias.sctp.param_proc_limit: No 25 -Defines the maximum number of parameters within a chunk that will be parsed in a +Defines the maximum number of parameters within a chunk that will be +parsed in a packet. As for other similar sysctl variables, larger values pose a DoS risk. .It Va net.inet.ip.alias.sctp.log_level: No 0 Level of detail in the system log messages (0 \- minimal, 1 \- event, -2 \- info, 3 \- detail, 4 \- debug, 5 \- max debug). May be a good +2 \- info, 3 \- detail, 4 \- debug, 5 \- max debug). +May be a good option in high loss environments. .It Va net.inet.ip.alias.sctp.shutdown_time: No 15 Timeout value while waiting for SHUTDOWN-COMPLETE. @@ -2733,7 +2758,8 @@ association is limited to this value .El .Pp This variable is fully dynamic, the new value will be adopted for all newly -arriving associations, existing associations are treated as they were previously. +arriving associations, existing associations are treated +as they were previously. Global tracking will decrease the number of collisions within the .Nm nat at a cost @@ -3280,7 +3306,8 @@ Some early work (1999-2000) on the traffic shaper supported by Akamba Corp. .Pp The ipfw core (ipfw2) has been completely redesigned and -reimplemented by Luigi Rizzo in summer 2002. Further +reimplemented by Luigi Rizzo in summer 2002. +Further actions and options have been added by various developer over the years. .Pp Modified: projects/fuse/share/man/man4/pf.4 ============================================================================== --- projects/fuse/share/man/man4/pf.4 Tue Sep 18 22:28:42 2012 (r240684) +++ projects/fuse/share/man/man4/pf.4 Wed Sep 19 00:27:50 2012 (r240685) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 29 2012 +.Dd September 18 2012 .Dt PF 4 .Os .Sh NAME @@ -36,6 +36,7 @@ .Nd packet filter .Sh SYNOPSIS .Cd "device pf" +.Cd "options PF_DEFAULT_TO_DROP" .Sh DESCRIPTION Packet filtering takes place in the kernel. A pseudo-device, @@ -94,6 +95,15 @@ Read only .Xr sysctl 8 variables with matching names are provided to obtain current values at runtime. +.Sh KERNEL OPTIONS +The following options in the kernel configuration file are related to +.Nm +operation: +.Pp +.Bl -tag -width ".Dv PF_DEFAULT_TO_DROP" -compact +.It Dv PF_DEFAULT_TO_DROP +Change default policy to drop by default +.El .Sh IOCTL INTERFACE .Nm supports the following Modified: projects/fuse/share/man/man4/usb_quirk.4 ============================================================================== --- projects/fuse/share/man/man4/usb_quirk.4 Tue Sep 18 22:28:42 2012 (r240684) +++ projects/fuse/share/man/man4/usb_quirk.4 Wed Sep 19 00:27:50 2012 (r240685) @@ -66,6 +66,8 @@ device should be ignored by hid class device should be ignored by kbd class .It UQ_KBD_BOOTPROTO device should set the boot protocol +.It UQ_UMS_IGNORE +device should be ignored by ums class .It UQ_MS_BAD_CLASS doesn't identify properly .It UQ_MS_LEADING_BYTE Modified: projects/fuse/sys/amd64/conf/NOTES ============================================================================== --- projects/fuse/sys/amd64/conf/NOTES Tue Sep 18 22:28:42 2012 (r240684) +++ projects/fuse/sys/amd64/conf/NOTES Wed Sep 19 00:27:50 2012 (r240685) @@ -428,6 +428,11 @@ device isci options ISCI_LOGGING # enable debugging in isci HAL # +# NVM Express (NVMe) support +device nvme # base NVMe driver +device nvd # expose NVMe namespaces as disks, depends on nvme + +# # SafeNet crypto driver: can be moved to the MI NOTES as soon as # it's tested on a big-endian machine # Copied: projects/fuse/sys/arm/conf/AC100 (from r240684, head/sys/arm/conf/AC100) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/fuse/sys/arm/conf/AC100 Wed Sep 19 00:27:50 2012 (r240685, copy of r240684, head/sys/arm/conf/AC100) @@ -0,0 +1,96 @@ +# +# Custom kernel for Toshiba AC100 +# +# $FreeBSD$ +# + +ident AC100 +include "../tegra/std.tegra2" + +makeoptions MODULES_OVERRIDE="" + +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +makeoptions WERROR="-Werror" + +#options SCHED_ULE #ULE scheduler +options SCHED_4BSD #4BSD scheduler +options INET #InterNETworking +#options INET6 #IPv6 communications protocols +options FFS #Berkeley Fast Filesystem +#options NFSCL #Network Filesystem Client +#options NFSLOCKD #Network Lock Manager +#options NFS_ROOT #NFS usable as /, requires NFSCLIENT +#options BOOTP +#options BOOTP_NFSROOT +#options BOOTP_NFSV3 +#options BOOTP_WIRED_TO=mge0 + +options GEOM_PART_GPT +options ROOTDEVNAME=\"ufs:/dev/da0p1\" + +options SYSVSHM #SYSV-style shared memory +options SYSVMSG #SYSV-style message queues +options SYSVSEM #SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions +options MUTEX_NOINLINE +options RWLOCK_NOINLINE +options NO_FFS_SNAPSHOT +options NO_SWAPPING + +#options SMP + +# Debugging +options VERBOSE_SYSINIT +#options ALT_BREAK_TO_DEBUGGER +options DDB +options GDB +options DIAGNOSTIC +options INVARIANTS #Enable calls of extra sanity checking +options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +options KDB +options KDB_TRACE +#options KTR +#options KTR_VERBOSE=0 +#options KTR_ENTRIES=16384 +#options KTR_MASK=(KTR_SPARE2) +#options KTR_COMPILE=KTR_ALL +options WITNESS #Enable checks to detect deadlocks and cycles +options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed +#options WITNESS_KDB +options MUTEX_DEBUG + +# Pseudo devices +device random +device pty +device loop +device md + +# USB +#options USB_DEBUG # enable debug msgs +#device usb +#device ehci +#device umass +#device scbus +#device pass +#device da + +# SATA +#device ata +#device atadisk +#device mvs + +# Serial ports +device uart + +# I2C (TWSI) +#device iic +#device iicbus + +#Network +device ether + +#FDT +options FDT +options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=tegra20-paz00.dts + Copied: projects/fuse/sys/boot/fdt/dts/tegra20-paz00.dts (from r240684, head/sys/boot/fdt/dts/tegra20-paz00.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/fuse/sys/boot/fdt/dts/tegra20-paz00.dts Wed Sep 19 00:27:50 2012 (r240685, copy of r240684, head/sys/boot/fdt/dts/tegra20-paz00.dts) @@ -0,0 +1,58 @@ +/*- + * Copyright (c) 2011 The FreeBSD Foundation + * Copyright (c) 2012 Andrew Turner + * All rights reserved. + * + * Developed by Damjan Marion + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ +/dts-v1/; + +/include/ "tegra20.dtsi" + +/ { + model = "Toshiba AC100 / Dynabook AZ"; + + aliases { + serial0 = &serial0; + soc = &SOC; + }; + + memory { + device_type = "memory"; + reg = < 0x00000000 0x20000000 >; /* 512MB RAM at 0x0 */ + }; + + chosen { + stdin = "serial0"; + stdout = "serial0"; + }; + + SOC: tegra20@0 { + serial0: serial@70006000 { + }; + }; +}; + Copied: projects/fuse/sys/boot/fdt/dts/tegra20.dtsi (from r240684, head/sys/boot/fdt/dts/tegra20.dtsi) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/fuse/sys/boot/fdt/dts/tegra20.dtsi Wed Sep 19 00:27:50 2012 (r240685, copy of r240684, head/sys/boot/fdt/dts/tegra20.dtsi) @@ -0,0 +1,74 @@ +/*- + * Copyright (c) 2011 The FreeBSD Foundation + * Copyright (c) 2012 Andrew Turner + * All rights reserved. + * + * Developed by Damjan Marion + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/ { + compatible = "compal,paz00", "nvidia,tegra20"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&GIC>; + + SOC: tegra20@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "simple-bus"; + ranges; + bus-frequency = <0>; + + GIC: interrupt-controller@50041000 { + compatible = "arm,gic"; + reg = < 0x50041000 0x1000 >, /* Distributor Registers */ + < 0x50040100 0x0100 >; /* CPU Interface Registers */ + interrupt-controller; + #interrupt-cells = <1>; + }; + + mp_tmr@50040200 { + compatible = "arm,mpcore-timers"; + clock-frequency = < 50040200 >; + #address-cells = <1>; + #size-cells = <0>; + reg = < 0x50040200 0x100 >, /* Global Timer Registers */ + < 0x50040600 0x100 >; /* Private Timer Registers */ + interrupts = < 27 29 >; + interrupt-parent = <&GIC>; + }; + + serial@70006000 { + compatible = "ns16550"; + reg = <0x70006000 0x40>; + reg-shift = <2>; + interrupts = < 68 >; + interrupt-parent = <&GIC>; + clock-frequency = < 215654400 >; + }; + }; +}; + Modified: projects/fuse/sys/boot/i386/loader/main.c ============================================================================== --- projects/fuse/sys/boot/i386/loader/main.c Tue Sep 18 22:28:42 2012 (r240684) +++ projects/fuse/sys/boot/i386/loader/main.c Wed Sep 19 00:27:50 2012 (r240685) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -321,34 +322,19 @@ command_heap(int argc, char *argv[]) return(CMD_OK); } -/* ISA bus access functions for PnP, derived from */ +/* ISA bus access functions for PnP. */ static int isa_inb(int port) { - u_char data; - if (__builtin_constant_p(port) && - (((port) & 0xffff) < 0x100) && - ((port) < 0x10000)) { - __asm __volatile("inb %1,%0" : "=a" (data) : "id" ((u_short)(port))); - } else { - __asm __volatile("inb %%dx,%0" : "=a" (data) : "d" (port)); - } - return(data); + return (inb(port)); } static void isa_outb(int port, int value) { - u_char al = value; - if (__builtin_constant_p(port) && - (((port) & 0xffff) < 0x100) && - ((port) < 0x10000)) { - __asm __volatile("outb %0,%1" : : "a" (al), "id" ((u_short)(port))); - } else { - __asm __volatile("outb %0,%%dx" : : "a" (al), "d" (port)); - } + outb(port, value); } #ifdef LOADER_ZFS_SUPPORT Modified: projects/fuse/sys/boot/ofw/libofw/devicename.c ============================================================================== --- projects/fuse/sys/boot/ofw/libofw/devicename.c Tue Sep 18 22:28:42 2012 (r240684) +++ projects/fuse/sys/boot/ofw/libofw/devicename.c Wed Sep 19 00:27:50 2012 (r240685) @@ -105,7 +105,7 @@ ofw_parsedev(struct ofw_devdesc **dev, c return(ENOENT); found: - if (path != NULL && *s != '\0') + if (path != NULL) *path = s; idev = malloc(sizeof(struct ofw_devdesc)); if (idev == NULL) { Modified: projects/fuse/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c ============================================================================== --- projects/fuse/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Tue Sep 18 22:28:42 2012 (r240684) +++ projects/fuse/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Wed Sep 19 00:27:50 2012 (r240685) @@ -578,7 +578,7 @@ sa_find_sizes(sa_os_t *sa, sa_bulk_attr_ for (i = 0; i != attr_count; i++) { boolean_t is_var_sz; - *total += attr_desc[i].sa_length; + *total += P2ROUNDUP(attr_desc[i].sa_length, 8); if (done) goto next; @@ -713,6 +713,8 @@ sa_build_layouts(sa_handle_t *hdl, sa_bu length = SA_REGISTERED_LEN(sa, attrs[i]); if (length == 0) length = attr_desc[i].sa_length; + else + VERIFY(length == attr_desc[i].sa_length); if (buf_space < length) { /* switch to spill buffer */ VERIFY(bonustype == DMU_OT_SA); @@ -742,6 +744,7 @@ sa_build_layouts(sa_handle_t *hdl, sa_bu if (sa->sa_attr_table[attrs[i]].sa_length == 0) { sahdr->sa_lengths[len_idx++] = length; } + VERIFY((uintptr_t)data_start % 8 == 0); data_start = (void *)P2ROUNDUP(((uintptr_t)data_start + length), 8); buf_space -= P2ROUNDUP(length, 8); Modified: projects/fuse/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_debug.h ============================================================================== --- projects/fuse/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_debug.h Tue Sep 18 22:28:42 2012 (r240684) +++ projects/fuse/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_debug.h Wed Sep 19 00:27:50 2012 (r240685) @@ -43,8 +43,10 @@ extern "C" { */ #if defined(DEBUG) || !defined(_KERNEL) +#if !defined(ZFS_DEBUG) #define ZFS_DEBUG #endif +#endif extern int zfs_flags; Modified: projects/fuse/sys/conf/NOTES ============================================================================== --- projects/fuse/sys/conf/NOTES Tue Sep 18 22:28:42 2012 (r240684) +++ projects/fuse/sys/conf/NOTES Wed Sep 19 00:27:50 2012 (r240685) @@ -918,6 +918,8 @@ device lagg # packets without touching the TTL). This can be useful to hide firewalls # from traceroute and similar tools. # +# PF_DEFAULT_TO_DROP causes the default pf(4) rule to deny everything. +# # TCPDEBUG enables code which keeps traces of the TCP state machine # for sockets with the SO_DEBUG option set, which can then be examined # using the trpt(8) utility. @@ -937,6 +939,7 @@ options IPFILTER_LOG #ipfilter logging options IPFILTER_LOOKUP #ipfilter pools options IPFILTER_DEFAULT_BLOCK #block all packets by default options IPSTEALTH #support for stealth forwarding +options PF_DEFAULT_TO_DROP #drop everything by default options TCPDEBUG options RADIX_MPATH Modified: projects/fuse/sys/conf/files.amd64 ============================================================================== --- projects/fuse/sys/conf/files.amd64 Tue Sep 18 22:28:42 2012 (r240684) +++ projects/fuse/sys/conf/files.amd64 Wed Sep 19 00:27:50 2012 (r240685) @@ -212,7 +212,17 @@ dev/kbd/kbd.c optional atkbd | sc | uk dev/lindev/full.c optional lindev dev/lindev/lindev.c optional lindev dev/nfe/if_nfe.c optional nfe pci +dev/nvd/nvd.c optional nvd nvme dev/nve/if_nve.c optional nve pci +dev/nvme/nvme.c optional nvme +dev/nvme/nvme_ctrlr.c optional nvme +dev/nvme/nvme_ctrlr_cmd.c optional nvme +dev/nvme/nvme_ns.c optional nvme +dev/nvme/nvme_ns_cmd.c optional nvme +dev/nvme/nvme_qpair.c optional nvme +dev/nvme/nvme_sysctl.c optional nvme +dev/nvme/nvme_test.c optional nvme +dev/nvme/nvme_uio.c optional nvme dev/nvram/nvram.c optional nvram isa dev/random/ivy.c optional random rdrand_rng dev/random/nehemiah.c optional random padlock_rng Modified: projects/fuse/sys/conf/files.i386 ============================================================================== --- projects/fuse/sys/conf/files.i386 Tue Sep 18 22:28:42 2012 (r240684) +++ projects/fuse/sys/conf/files.i386 Wed Sep 19 00:27:50 2012 (r240685) @@ -224,7 +224,17 @@ dev/lindev/lindev.c optional lindev dev/mse/mse.c optional mse dev/mse/mse_isa.c optional mse isa dev/nfe/if_nfe.c optional nfe pci +dev/nvd/nvd.c optional nvd nvme dev/nve/if_nve.c optional nve pci +dev/nvme/nvme.c optional nvme +dev/nvme/nvme_ctrlr.c optional nvme +dev/nvme/nvme_ctrlr_cmd.c optional nvme +dev/nvme/nvme_ns.c optional nvme +dev/nvme/nvme_ns_cmd.c optional nvme +dev/nvme/nvme_qpair.c optional nvme +dev/nvme/nvme_sysctl.c optional nvme +dev/nvme/nvme_test.c optional nvme +dev/nvme/nvme_uio.c optional nvme dev/nvram/nvram.c optional nvram isa dev/pcf/pcf_isa.c optional pcf dev/random/ivy.c optional random rdrand_rng Modified: projects/fuse/sys/conf/options ============================================================================== --- projects/fuse/sys/conf/options Tue Sep 18 22:28:42 2012 (r240684) +++ projects/fuse/sys/conf/options Wed Sep 19 00:27:50 2012 (r240685) @@ -431,6 +431,7 @@ NCP NETATALK opt_atalk.h NFSLOCKD PCBGROUP opt_pcbgroup.h +PF_DEFAULT_TO_DROP opt_pf.h RADIX_MPATH opt_mpath.h ROUTETABLES opt_route.h SLIP_IFF_OPTS opt_slip.h Modified: projects/fuse/sys/contrib/altq/altq/altq_hfsc.c ============================================================================== --- projects/fuse/sys/contrib/altq/altq/altq_hfsc.c Tue Sep 18 22:28:42 2012 (r240684) +++ projects/fuse/sys/contrib/altq/altq/altq_hfsc.c Wed Sep 19 00:27:50 2012 (r240685) @@ -400,15 +400,13 @@ hfsc_class_create(struct hfsc_if *hif, s } #endif - cl = malloc(sizeof(struct hfsc_class), M_DEVBUF, M_WAITOK); + cl = malloc(sizeof(struct hfsc_class), M_DEVBUF, M_NOWAIT | M_ZERO); if (cl == NULL) return (NULL); - bzero(cl, sizeof(struct hfsc_class)); - cl->cl_q = malloc(sizeof(class_queue_t), M_DEVBUF, M_WAITOK); + cl->cl_q = malloc(sizeof(class_queue_t), M_DEVBUF, M_NOWAIT | M_ZERO); if (cl->cl_q == NULL) goto err_ret; - bzero(cl->cl_q, sizeof(class_queue_t)); cl->cl_actc = actlist_alloc(); if (cl->cl_actc == NULL) @@ -466,7 +464,7 @@ hfsc_class_create(struct hfsc_if *hif, s if (rsc != NULL && (rsc->m1 != 0 || rsc->m2 != 0)) { cl->cl_rsc = malloc(sizeof(struct internal_sc), - M_DEVBUF, M_WAITOK); + M_DEVBUF, M_NOWAIT); if (cl->cl_rsc == NULL) goto err_ret; sc2isc(rsc, cl->cl_rsc); @@ -475,7 +473,7 @@ hfsc_class_create(struct hfsc_if *hif, s } if (fsc != NULL && (fsc->m1 != 0 || fsc->m2 != 0)) { cl->cl_fsc = malloc(sizeof(struct internal_sc), - M_DEVBUF, M_WAITOK); + M_DEVBUF, M_NOWAIT); if (cl->cl_fsc == NULL) goto err_ret; sc2isc(fsc, cl->cl_fsc); @@ -483,7 +481,7 @@ hfsc_class_create(struct hfsc_if *hif, s } if (usc != NULL && (usc->m1 != 0 || usc->m2 != 0)) { cl->cl_usc = malloc(sizeof(struct internal_sc), - M_DEVBUF, M_WAITOK); + M_DEVBUF, M_NOWAIT); if (cl->cl_usc == NULL) goto err_ret; sc2isc(usc, cl->cl_usc); Modified: projects/fuse/sys/contrib/altq/altq/altq_priq.c ============================================================================== --- projects/fuse/sys/contrib/altq/altq/altq_priq.c Tue Sep 18 22:28:42 2012 (r240684) +++ projects/fuse/sys/contrib/altq/altq/altq_priq.c Wed Sep 19 00:27:50 2012 (r240685) @@ -316,17 +316,15 @@ priq_class_create(struct priq_if *pif, i red_destroy(cl->cl_red); #endif } else { - cl = malloc(sizeof(struct priq_class), - M_DEVBUF, M_WAITOK); + cl = malloc(sizeof(struct priq_class), M_DEVBUF, + M_NOWAIT | M_ZERO); if (cl == NULL) return (NULL); - bzero(cl, sizeof(struct priq_class)); - cl->cl_q = malloc(sizeof(class_queue_t), - M_DEVBUF, M_WAITOK); + cl->cl_q = malloc(sizeof(class_queue_t), M_DEVBUF, + M_NOWAIT | M_ZERO); if (cl->cl_q == NULL) goto err_ret; - bzero(cl->cl_q, sizeof(class_queue_t)); } pif->pif_classes[pri] = cl; Modified: projects/fuse/sys/contrib/altq/altq/altq_rmclass.c ============================================================================== --- projects/fuse/sys/contrib/altq/altq/altq_rmclass.c Tue Sep 18 22:28:42 2012 (r240684) +++ projects/fuse/sys/contrib/altq/altq/altq_rmclass.c Wed Sep 19 00:27:50 2012 (r240685) @@ -218,19 +218,15 @@ rmc_newclass(int pri, struct rm_ifdat *i } #endif - cl = malloc(sizeof(struct rm_class), - M_DEVBUF, M_WAITOK); + cl = malloc(sizeof(struct rm_class), M_DEVBUF, M_NOWAIT | M_ZERO); if (cl == NULL) return (NULL); - bzero(cl, sizeof(struct rm_class)); CALLOUT_INIT(&cl->callout_); - cl->q_ = malloc(sizeof(class_queue_t), - M_DEVBUF, M_WAITOK); + cl->q_ = malloc(sizeof(class_queue_t), M_DEVBUF, M_NOWAIT | M_ZERO); if (cl->q_ == NULL) { free(cl, M_DEVBUF); return (NULL); } - bzero(cl->q_, sizeof(class_queue_t)); /* * Class initialization. Modified: projects/fuse/sys/dev/acpica/acpi_cpu.c ============================================================================== --- projects/fuse/sys/dev/acpica/acpi_cpu.c Tue Sep 18 22:28:42 2012 (r240684) +++ projects/fuse/sys/dev/acpica/acpi_cpu.c Wed Sep 19 00:27:50 2012 (r240685) @@ -1063,6 +1063,8 @@ acpi_cpu_notify(ACPI_HANDLE h, UINT32 no ACPI_SERIAL_BEGIN(cpu); acpi_cpu_set_cx_lowest(sc); ACPI_SERIAL_END(cpu); + + acpi_UserNotify("PROCESSOR", sc->cpu_handle, notify); } static int Modified: projects/fuse/sys/dev/alc/if_alc.c ============================================================================== --- projects/fuse/sys/dev/alc/if_alc.c Tue Sep 18 22:28:42 2012 (r240684) +++ projects/fuse/sys/dev/alc/if_alc.c Wed Sep 19 00:27:50 2012 (r240685) @@ -683,7 +683,7 @@ alc_aspm(struct alc_softc *sc, int media if ((sc->alc_flags & (ALC_FLAG_APS | ALC_FLAG_PCIE)) == (ALC_FLAG_APS | ALC_FLAG_PCIE)) linkcfg = CSR_READ_2(sc, sc->alc_expcap + - PCIR_EXPRESS_LINK_CTL); + PCIER_LINK_CTL); else linkcfg = 0; pmcfg &= ~PM_CFG_SERDES_PD_EX_L1; @@ -698,7 +698,7 @@ alc_aspm(struct alc_softc *sc, int media if (sc->alc_ident->deviceid == DEVICEID_ATHEROS_AR8152_B && sc->alc_rev == ATHEROS_AR8152_B_V10) linkcfg |= 0x80; - CSR_WRITE_2(sc, sc->alc_expcap + PCIR_EXPRESS_LINK_CTL, + CSR_WRITE_2(sc, sc->alc_expcap + PCIER_LINK_CTL, linkcfg); pmcfg &= ~(PM_CFG_EN_BUFS_RX_L0S | PM_CFG_SA_DLY_ENB | PM_CFG_HOTRST); @@ -798,10 +798,10 @@ alc_attach(device_t dev) if (pci_find_cap(dev, PCIY_EXPRESS, &base) == 0) { sc->alc_flags |= ALC_FLAG_PCIE; sc->alc_expcap = base; - burst = CSR_READ_2(sc, base + PCIR_EXPRESS_DEVICE_CTL); + burst = CSR_READ_2(sc, base + PCIER_DEVICE_CTL); sc->alc_dma_rd_burst = - (burst & PCIM_EXP_CTL_MAX_READ_REQUEST) >> 12; - sc->alc_dma_wr_burst = (burst & PCIM_EXP_CTL_MAX_PAYLOAD) >> 5; + (burst & PCIEM_CTL_MAX_READ_REQUEST) >> 12; + sc->alc_dma_wr_burst = (burst & PCIEM_CTL_MAX_PAYLOAD) >> 5; if (bootverbose) { device_printf(dev, "Read request size : %u bytes.\n", alc_dma_burst[sc->alc_dma_rd_burst]); @@ -831,9 +831,9 @@ alc_attach(device_t dev) CSR_WRITE_4(sc, ALC_PCIE_PHYMISC2, val); } /* Disable ASPM L0S and L1. */ - cap = CSR_READ_2(sc, base + PCIR_EXPRESS_LINK_CAP); - if ((cap & PCIM_LINK_CAP_ASPM) != 0) { - ctl = CSR_READ_2(sc, base + PCIR_EXPRESS_LINK_CTL); + cap = CSR_READ_2(sc, base + PCIER_LINK_CAP); + if ((cap & PCIEM_LINK_CAP_ASPM) != 0) { + ctl = CSR_READ_2(sc, base + PCIER_LINK_CTL); if ((ctl & 0x08) != 0) sc->alc_rcb = DMA_CFG_RCB_128; if (bootverbose) Modified: projects/fuse/sys/dev/ata/ata-lowlevel.c ============================================================================== --- projects/fuse/sys/dev/ata/ata-lowlevel.c Tue Sep 18 22:28:42 2012 (r240684) +++ projects/fuse/sys/dev/ata/ata-lowlevel.c Wed Sep 19 00:27:50 2012 (r240685) @@ -370,7 +370,6 @@ ata_end_transaction(struct ata_request * "%s trying to write on read buffer\n", ata_cmd2str(request)); goto end_finished; - break; } ata_pio_write(request, length); request->donecount += length; Modified: projects/fuse/sys/dev/ath/ath_hal/ah.c ============================================================================== --- projects/fuse/sys/dev/ath/ath_hal/ah.c Tue Sep 18 22:28:42 2012 (r240684) +++ projects/fuse/sys/dev/ath/ath_hal/ah.c Wed Sep 19 00:27:50 2012 (r240685) @@ -1053,7 +1053,7 @@ ath_hal_getChanNoise(struct ath_hal *ah, * populated with values from NOISE_FLOOR[] + ath_hal_getNfAdjust(). * * The caller must supply ctl/ext NF arrays which are at least - * AH_MIMO_MAX_CHAINS entries long. + * AH_MAX_CHAINS entries long. */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Wed Sep 19 04:18:16 2012 Return-Path: Delivered-To: svn-src-projects@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08448106564A; Wed, 19 Sep 2012 04:18:16 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 911A98FC12; Wed, 19 Sep 2012 04:18:14 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q8J4INDA093360; Wed, 19 Sep 2012 07:18:23 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q8J4IBxl040165; Wed, 19 Sep 2012 07:18:11 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q8J4IB7r040164; Wed, 19 Sep 2012 07:18:11 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 19 Sep 2012 07:18:11 +0300 From: Konstantin Belousov To: Attilio Rao Message-ID: <20120919041811.GM37286@deviant.kiev.zoral.com.ua> References: <201207301350.q6UDobCI099069@svn.freebsd.org> <201207301732.33474.jhb@freebsd.org> <20120918083324.GX37286@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="nw7Js0ltx4YC415X" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Davide Italiano , src-committers@FreeBSD.org, John Baldwin , Jeff Roberson , Dimitry Andric , svn-src-projects@FreeBSD.org Subject: Re: svn commit: r238907 - projects/calloutng/sys/kern X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2012 04:18:16 -0000 --nw7Js0ltx4YC415X Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 18, 2012 at 08:00:48PM +0100, Attilio Rao wrote: > On Tue, Sep 18, 2012 at 4:30 PM, Attilio Rao wrote: > > On 9/18/12, Konstantin Belousov wrote: > >> Traditionally, we do provide the fallback for non-GNUC compilers, by > >> defining extern function with the compatible signature. In this case, > >> the empty function just works for the purpose, although with higher > >> overhead than the GNUC case. > > > > I agree, we need a fallback here. Unfortunately I'm buried with job > > stuff but I will provide an errata patch ASAP. >=20 > Here is the patch. I didn't use a real extern function body for it, > but just went with an empty macro. >=20 > Attilio > +/* > + * Compiler memory barriers, specific to gcc and clang. > + */ > +#if defined(__GNUC__) > +#define __compiler_membar() __asm __volatile(" " : : : "memor= y") > +#else > +#define __compiler_membar() struct __hack > +#endif I would not call this an empty macro. If this works at all, it requires c99 compiler. Why not just do extern void __compiler_membar(void); for !GNUC. Note that we never supplied actual implementation for the placeholders, as evidenced e.g. by cpufunc.h or fpu.c. --nw7Js0ltx4YC415X Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAlBZR4MACgkQC3+MBN1Mb4hxdwCg4wHPl+zVhvePEf2jQEmTETjD 72MAoN7T5BjU8vrkX2AdVvMsFz0MVeZq =znf+ -----END PGP SIGNATURE----- --nw7Js0ltx4YC415X-- From owner-svn-src-projects@FreeBSD.ORG Wed Sep 19 07:37:08 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 67359106564A; Wed, 19 Sep 2012 07:37:08 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id D30C88FC12; Wed, 19 Sep 2012 07:37:06 +0000 (UTC) Received: by lahe6 with SMTP id e6so414972lah.13 for ; Wed, 19 Sep 2012 00:37:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=rCVENcCI+062W3jBeHKRWjQrPE1++z1EIETCB/WnfGc=; b=pV8YcBm/gPynHCwSpPAjJMhTdEDTbHi5ibLZlyYQ5j40ybqGk24xkLsyfwo0BO/RoO kr9yEHhmZHciPinNHxWgBPWIjVMaYqwXxzlcX/U8/kLIodkm4o4danyFeEE0Jx/37A6G zwSQ4ZCHNCGfWe7fcIx2/RHqXAZU3qgfd1TUgmf1yU0XjBOoH4+OKbBF6NsBzlA8f4mz Vh8Xox8H94N9EPXii7Vw+Cvk9LY7ZLIJFBSM92GRXEhEAkIe5Mh2VeTFr0m9oTuvoL5M uHCWU1Et9yD5jlyu3awI5AuZqEwKlsqOef3NY3Kh/OgnAkGvnJhyVPGcDijoN3ISuUOW bOag== MIME-Version: 1.0 Received: by 10.152.112.233 with SMTP id it9mr1884479lab.40.1348040225765; Wed, 19 Sep 2012 00:37:05 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.102.39 with HTTP; Wed, 19 Sep 2012 00:37:05 -0700 (PDT) In-Reply-To: <20120919041811.GM37286@deviant.kiev.zoral.com.ua> References: <201207301350.q6UDobCI099069@svn.freebsd.org> <201207301732.33474.jhb@freebsd.org> <20120918083324.GX37286@deviant.kiev.zoral.com.ua> <20120919041811.GM37286@deviant.kiev.zoral.com.ua> Date: Wed, 19 Sep 2012 08:37:05 +0100 X-Google-Sender-Auth: ON5BQb_mdKuQnROSAcojsZqbYp0 Message-ID: From: Attilio Rao To: Konstantin Belousov Content-Type: text/plain; charset=UTF-8 Cc: Davide Italiano , src-committers@freebsd.org, John Baldwin , Jeff Roberson , Dimitry Andric , svn-src-projects@freebsd.org Subject: Re: svn commit: r238907 - projects/calloutng/sys/kern X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2012 07:37:08 -0000 On Wed, Sep 19, 2012 at 5:18 AM, Konstantin Belousov wrote: > On Tue, Sep 18, 2012 at 08:00:48PM +0100, Attilio Rao wrote: >> On Tue, Sep 18, 2012 at 4:30 PM, Attilio Rao wrote: >> > On 9/18/12, Konstantin Belousov wrote: >> >> Traditionally, we do provide the fallback for non-GNUC compilers, by >> >> defining extern function with the compatible signature. In this case, >> >> the empty function just works for the purpose, although with higher >> >> overhead than the GNUC case. >> > >> > I agree, we need a fallback here. Unfortunately I'm buried with job >> > stuff but I will provide an errata patch ASAP. >> >> Here is the patch. I didn't use a real extern function body for it, >> but just went with an empty macro. >> >> Attilio > >> +/* >> + * Compiler memory barriers, specific to gcc and clang. >> + */ >> +#if defined(__GNUC__) >> +#define __compiler_membar() __asm __volatile(" " : : : "memory") >> +#else >> +#define __compiler_membar() struct __hack >> +#endif > > I would not call this an empty macro. If this works at all, it requires > c99 compiler. Why not just do > extern void __compiler_membar(void); > for !GNUC. Note that we never supplied actual implementation for the > placeholders, as evidenced e.g. by cpufunc.h or fpu.c. So the main reason for this is to keep compliancy with c'89? Are you sure it is so important nowadays? I'm always under the impression that we are already using c'99 specific features, like structs initializers, etc. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-projects@FreeBSD.ORG Wed Sep 19 09:14:29 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E85811065670; Wed, 19 Sep 2012 09:14:29 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail16.syd.optusnet.com.au (mail16.syd.optusnet.com.au [211.29.132.197]) by mx1.freebsd.org (Postfix) with ESMTP id 72E7C8FC0A; Wed, 19 Sep 2012 09:14:28 +0000 (UTC) Received: from c122-106-157-84.carlnfd1.nsw.optusnet.com.au (c122-106-157-84.carlnfd1.nsw.optusnet.com.au [122.106.157.84]) by mail16.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q8J9EHem012584 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 19 Sep 2012 19:14:19 +1000 Date: Wed, 19 Sep 2012 19:14:17 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Attilio Rao In-Reply-To: Message-ID: <20120919190309.R1306@besplex.bde.org> References: <201207301350.q6UDobCI099069@svn.freebsd.org> <201207301732.33474.jhb@freebsd.org> <20120918083324.GX37286@deviant.kiev.zoral.com.ua> <20120919041811.GM37286@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Davide Italiano , src-committers@freebsd.org, John Baldwin , Jeff Roberson , Dimitry Andric , svn-src-projects@freebsd.org, Konstantin Belousov Subject: Re: svn commit: r238907 - projects/calloutng/sys/kern X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2012 09:14:30 -0000 On Wed, 19 Sep 2012, Attilio Rao wrote: > On Wed, Sep 19, 2012 at 5:18 AM, Konstantin Belousov > wrote: >> On Tue, Sep 18, 2012 at 08:00:48PM +0100, Attilio Rao wrote: >>> ... >>> Here is the patch. I didn't use a real extern function body for it, >>> but just went with an empty macro. >>> ... >>> +/* >>> + * Compiler memory barriers, specific to gcc and clang. >>> + */ >>> +#if defined(__GNUC__) >>> +#define __compiler_membar() __asm __volatile(" " : : : "memory") >>> +#else >>> +#define __compiler_membar() struct __hack >>> +#endif >> >> I would not call this an empty macro. If this works at all, it requires >> c99 compiler. Why not just do >> extern void __compiler_membar(void); >> for !GNUC. Note that we never supplied actual implementation for the >> placeholders, as evidenced e.g. by cpufunc.h or fpu.c. > > So the main reason for this is to keep compliancy with c'89? Are you > sure it is so important nowadays? > I'm always under the impression that we are already using c'99 > specific features, like structs initializers, etc. 'struct __hack' requires a c83 compiler. It is used extensively and worked in 1993. One point of using an extern function is to break properly when a feature is missing. For a random compiler, you wouldn't know if it needs the feature. OTOH, your original version with no support breaks even better, by giving a spew of error messages (at least with -Wmumble-prototypes). Many of the features in sys/cdefs.h are handled in this way. E.g., using __packed is a syntax error unless it is known to work (for __GNUC_PREREQ(2, 7) || __INTEL_COMPILER), except for lint it is bogusly stubbed out so that it is not properly broken for line. Bruce From owner-svn-src-projects@FreeBSD.ORG Wed Sep 19 09:23:14 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AA3A6106566B; Wed, 19 Sep 2012 09:23:14 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 213918FC0C; Wed, 19 Sep 2012 09:23:12 +0000 (UTC) Received: by lahe6 with SMTP id e6so484301lah.13 for ; Wed, 19 Sep 2012 02:23:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=bk5Ah7dDKA0Ymr0QmpJ9u2T1mapCYlmLRzKjmAYSBoA=; b=XUsxOzpy3nv5cUvQGdN+/OtJIRWAfmYZVChK1rq1/KX6fmfWmXkXcasUf4NmtjLZJY YYHDMg2ZZtqzSLKsa/wleSLaMGXpMWndSElYH/u+TzSpV2Zu38CVH8QAQjJGnFoaOdNF zf83LIxkJ5qXCNDR2uNWIzKL2PbBaaPomskZoRtbiKnS/6b+G7l8q28aDvdw9n21u3MN Qmhl1jlZBuU8nba8joMJ4JoUtxczsaAT5+Uri0dI6yfTcMVkSjY6b+xDry+QpXV9jY9x BKzgIbebx1MKc2oRxIP19JKsexajMLoCMv1VCX4WXMzvhUNwleZS107FpMOJ8nOqFcQq g5nQ== MIME-Version: 1.0 Received: by 10.152.131.68 with SMTP id ok4mr2141459lab.47.1348046590995; Wed, 19 Sep 2012 02:23:10 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.102.39 with HTTP; Wed, 19 Sep 2012 02:23:10 -0700 (PDT) In-Reply-To: <20120919190309.R1306@besplex.bde.org> References: <201207301350.q6UDobCI099069@svn.freebsd.org> <201207301732.33474.jhb@freebsd.org> <20120918083324.GX37286@deviant.kiev.zoral.com.ua> <20120919041811.GM37286@deviant.kiev.zoral.com.ua> <20120919190309.R1306@besplex.bde.org> Date: Wed, 19 Sep 2012 10:23:10 +0100 X-Google-Sender-Auth: wXxuReArvFwvODcndQftcCSUVSQ Message-ID: From: Attilio Rao To: Bruce Evans Content-Type: text/plain; charset=UTF-8 Cc: Davide Italiano , src-committers@freebsd.org, John Baldwin , Jeff Roberson , Dimitry Andric , svn-src-projects@freebsd.org, Konstantin Belousov Subject: Re: svn commit: r238907 - projects/calloutng/sys/kern X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2012 09:23:14 -0000 On 9/19/12, Bruce Evans wrote: > On Wed, 19 Sep 2012, Attilio Rao wrote: > >> On Wed, Sep 19, 2012 at 5:18 AM, Konstantin Belousov >> wrote: >>> On Tue, Sep 18, 2012 at 08:00:48PM +0100, Attilio Rao wrote: >>>> ... >>>> Here is the patch. I didn't use a real extern function body for it, >>>> but just went with an empty macro. >>>> ... >>>> +/* >>>> + * Compiler memory barriers, specific to gcc and clang. >>>> + */ >>>> +#if defined(__GNUC__) >>>> +#define __compiler_membar() __asm __volatile(" " : : : >>>> "memory") >>>> +#else >>>> +#define __compiler_membar() struct __hack >>>> +#endif >>> >>> I would not call this an empty macro. If this works at all, it requires >>> c99 compiler. Why not just do >>> extern void __compiler_membar(void); >>> for !GNUC. Note that we never supplied actual implementation for the >>> placeholders, as evidenced e.g. by cpufunc.h or fpu.c. >> >> So the main reason for this is to keep compliancy with c'89? Are you >> sure it is so important nowadays? >> I'm always under the impression that we are already using c'99 >> specific features, like structs initializers, etc. > > 'struct __hack' requires a c83 compiler. It is used extensively and worked > in 1993. > > One point of using an extern function is to break properly when a feature > is missing. For a random compiler, you wouldn't know if it needs the > feature. OTOH, your original version with no support breaks even better, > by giving a spew of error messages (at least with -Wmumble-prototypes). > Many of the features in sys/cdefs.h are handled in this way. E.g., > using __packed is a syntax error unless it is known to work (for > __GNUC_PREREQ(2, 7) || __INTEL_COMPILER), except for lint it is bogusly > stubbed out so that it is not properly broken for line. I see. So definitively what version do you prefer? The one using the external definition or the one without anything? Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-projects@FreeBSD.ORG Wed Sep 19 19:16:08 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EA0BE106564A; Wed, 19 Sep 2012 19:16:08 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D4E518FC15; Wed, 19 Sep 2012 19:16:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8JJG8eD051971; Wed, 19 Sep 2012 19:16:08 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8JJG8lH051969; Wed, 19 Sep 2012 19:16:08 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201209191916.q8JJG8lH051969@svn.freebsd.org> From: Brooks Davis Date: Wed, 19 Sep 2012 19:16:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240703 - projects/mtree/contrib/mknod X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2012 19:16:09 -0000 Author: brooks Date: Wed Sep 19 19:16:08 2012 New Revision: 240703 URL: http://svn.freebsd.org/changeset/base/240703 Log: Virgin import of the pack_dev.* portion of NetBSD's mknod for mtree's use. Added: projects/mtree/contrib/mknod/ projects/mtree/contrib/mknod/pack_dev.c projects/mtree/contrib/mknod/pack_dev.h Added: projects/mtree/contrib/mknod/pack_dev.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/mtree/contrib/mknod/pack_dev.c Wed Sep 19 19:16:08 2012 (r240703) @@ -0,0 +1,290 @@ +/* $NetBSD: pack_dev.c,v 1.11 2011/08/27 18:37:41 joerg Exp $ */ + +/*- + * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Charles M. Hannum. + * + * 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. + */ + +#if HAVE_NBTOOL_CONFIG_H +#include "nbtool_config.h" +#endif + +#include +#if !defined(lint) +__RCSID("$NetBSD: pack_dev.c,v 1.11 2011/08/27 18:37:41 joerg Exp $"); +#endif /* not lint */ + +#include +#include + +#include +#include +#include +#include +#include + +#include "pack_dev.h" + +static pack_t pack_netbsd; +static pack_t pack_freebsd; +static pack_t pack_8_8; +static pack_t pack_12_20; +static pack_t pack_14_18; +static pack_t pack_8_24; +static pack_t pack_bsdos; +static int compare_format(const void *, const void *); + +static const char iMajorError[] = "invalid major number"; +static const char iMinorError[] = "invalid minor number"; +static const char tooManyFields[] = "too many fields for format"; + + /* exported */ +portdev_t +pack_native(int n, u_long numbers[], const char **error) +{ + portdev_t dev = 0; + + if (n == 2) { + dev = makedev(numbers[0], numbers[1]); + if ((u_long)major(dev) != numbers[0]) + *error = iMajorError; + else if ((u_long)minor(dev) != numbers[1]) + *error = iMinorError; + } else + *error = tooManyFields; + return (dev); +} + + +static portdev_t +pack_netbsd(int n, u_long numbers[], const char **error) +{ + portdev_t dev = 0; + + if (n == 2) { + dev = makedev_netbsd(numbers[0], numbers[1]); + if ((u_long)major_netbsd(dev) != numbers[0]) + *error = iMajorError; + else if ((u_long)minor_netbsd(dev) != numbers[1]) + *error = iMinorError; + } else + *error = tooManyFields; + return (dev); +} + + +#define major_freebsd(x) ((int32_t)(((x) & 0x0000ff00) >> 8)) +#define minor_freebsd(x) ((int32_t)(((x) & 0xffff00ff) >> 0)) +#define makedev_freebsd(x,y) ((portdev_t)((((x) << 8) & 0x0000ff00) | \ + (((y) << 0) & 0xffff00ff))) + +static portdev_t +pack_freebsd(int n, u_long numbers[], const char **error) +{ + portdev_t dev = 0; + + if (n == 2) { + dev = makedev_freebsd(numbers[0], numbers[1]); + if ((u_long)major_freebsd(dev) != numbers[0]) + *error = iMajorError; + if ((u_long)minor_freebsd(dev) != numbers[1]) + *error = iMinorError; + } else + *error = tooManyFields; + return (dev); +} + + +#define major_8_8(x) ((int32_t)(((x) & 0x0000ff00) >> 8)) +#define minor_8_8(x) ((int32_t)(((x) & 0x000000ff) >> 0)) +#define makedev_8_8(x,y) ((portdev_t)((((x) << 8) & 0x0000ff00) | \ + (((y) << 0) & 0x000000ff))) + +static portdev_t +pack_8_8(int n, u_long numbers[], const char **error) +{ + portdev_t dev = 0; + + if (n == 2) { + dev = makedev_8_8(numbers[0], numbers[1]); + if ((u_long)major_8_8(dev) != numbers[0]) + *error = iMajorError; + if ((u_long)minor_8_8(dev) != numbers[1]) + *error = iMinorError; + } else + *error = tooManyFields; + return (dev); +} + + +#define major_12_20(x) ((int32_t)(((x) & 0xfff00000) >> 20)) +#define minor_12_20(x) ((int32_t)(((x) & 0x000fffff) >> 0)) +#define makedev_12_20(x,y) ((portdev_t)((((x) << 20) & 0xfff00000) | \ + (((y) << 0) & 0x000fffff))) + +static portdev_t +pack_12_20(int n, u_long numbers[], const char **error) +{ + portdev_t dev = 0; + + if (n == 2) { + dev = makedev_12_20(numbers[0], numbers[1]); + if ((u_long)major_12_20(dev) != numbers[0]) + *error = iMajorError; + if ((u_long)minor_12_20(dev) != numbers[1]) + *error = iMinorError; + } else + *error = tooManyFields; + return (dev); +} + + +#define major_14_18(x) ((int32_t)(((x) & 0xfffc0000) >> 18)) +#define minor_14_18(x) ((int32_t)(((x) & 0x0003ffff) >> 0)) +#define makedev_14_18(x,y) ((portdev_t)((((x) << 18) & 0xfffc0000) | \ + (((y) << 0) & 0x0003ffff))) + +static portdev_t +pack_14_18(int n, u_long numbers[], const char **error) +{ + portdev_t dev = 0; + + if (n == 2) { + dev = makedev_14_18(numbers[0], numbers[1]); + if ((u_long)major_14_18(dev) != numbers[0]) + *error = iMajorError; + if ((u_long)minor_14_18(dev) != numbers[1]) + *error = iMinorError; + } else + *error = tooManyFields; + return (dev); +} + + +#define major_8_24(x) ((int32_t)(((x) & 0xff000000) >> 24)) +#define minor_8_24(x) ((int32_t)(((x) & 0x00ffffff) >> 0)) +#define makedev_8_24(x,y) ((portdev_t)((((x) << 24) & 0xff000000) | \ + (((y) << 0) & 0x00ffffff))) + +static portdev_t +pack_8_24(int n, u_long numbers[], const char **error) +{ + portdev_t dev = 0; + + if (n == 2) { + dev = makedev_8_24(numbers[0], numbers[1]); + if ((u_long)major_8_24(dev) != numbers[0]) + *error = iMajorError; + if ((u_long)minor_8_24(dev) != numbers[1]) + *error = iMinorError; + } else + *error = tooManyFields; + return (dev); +} + + +#define major_12_12_8(x) ((int32_t)(((x) & 0xfff00000) >> 20)) +#define unit_12_12_8(x) ((int32_t)(((x) & 0x000fff00) >> 8)) +#define subunit_12_12_8(x) ((int32_t)(((x) & 0x000000ff) >> 0)) +#define makedev_12_12_8(x,y,z) ((portdev_t)((((x) << 20) & 0xfff00000) | \ + (((y) << 8) & 0x000fff00) | \ + (((z) << 0) & 0x000000ff))) + +static portdev_t +pack_bsdos(int n, u_long numbers[], const char **error) +{ + portdev_t dev = 0; + + if (n == 2) { + dev = makedev_12_20(numbers[0], numbers[1]); + if ((u_long)major_12_20(dev) != numbers[0]) + *error = iMajorError; + if ((u_long)minor_12_20(dev) != numbers[1]) + *error = iMinorError; + } else if (n == 3) { + dev = makedev_12_12_8(numbers[0], numbers[1], numbers[2]); + if ((u_long)major_12_12_8(dev) != numbers[0]) + *error = iMajorError; + if ((u_long)unit_12_12_8(dev) != numbers[1]) + *error = "invalid unit number"; + if ((u_long)subunit_12_12_8(dev) != numbers[2]) + *error = "invalid subunit number"; + } else + *error = tooManyFields; + return (dev); +} + + + /* list of formats and pack functions */ + /* this list must be sorted lexically */ +static struct format { + const char *name; + pack_t *pack; +} formats[] = { + {"386bsd", pack_8_8}, + {"4bsd", pack_8_8}, + {"bsdos", pack_bsdos}, + {"freebsd", pack_freebsd}, + {"hpux", pack_8_24}, + {"isc", pack_8_8}, + {"linux", pack_8_8}, + {"native", pack_native}, + {"netbsd", pack_netbsd}, + {"osf1", pack_12_20}, + {"sco", pack_8_8}, + {"solaris", pack_14_18}, + {"sunos", pack_8_8}, + {"svr3", pack_8_8}, + {"svr4", pack_14_18}, + {"ultrix", pack_8_8}, +}; + +static int +compare_format(const void *key, const void *element) +{ + const char *name; + const struct format *format; + + name = key; + format = element; + + return (strcmp(name, format->name)); +} + + +pack_t * +pack_find(const char *name) +{ + struct format *format; + + format = bsearch(name, formats, + sizeof(formats)/sizeof(formats[0]), + sizeof(formats[0]), compare_format); + if (format == 0) + return (NULL); + return (format->pack); +} Added: projects/mtree/contrib/mknod/pack_dev.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/mtree/contrib/mknod/pack_dev.h Wed Sep 19 19:16:08 2012 (r240703) @@ -0,0 +1,52 @@ +/* $NetBSD: pack_dev.h,v 1.7 2008/04/28 20:23:09 martin Exp $ */ + +/*- + * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Charles M. Hannum. + * + * 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 _PACK_DEV_H +#define _PACK_DEV_H + +#ifdef __CYGWIN__ +typedef __dev32_t portdev_t; +#else +typedef dev_t portdev_t; +#endif +typedef portdev_t pack_t(int, u_long [], const char **); + +pack_t *pack_find(const char *); +pack_t pack_native; + +#define major_netbsd(x) ((int32_t)((((x) & 0x000fff00) >> 8))) +#define minor_netbsd(x) ((int32_t)((((x) & 0xfff00000) >> 12) | \ + (((x) & 0x000000ff) >> 0))) +#define makedev_netbsd(x,y) ((dev_t)((((x) << 8) & 0x000fff00) | \ + (((y) << 12) & 0xfff00000) | \ + (((y) << 0) & 0x000000ff))) + +#endif /* _PACK_DEV_H */ From owner-svn-src-projects@FreeBSD.ORG Wed Sep 19 19:42:56 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31ED91065674; Wed, 19 Sep 2012 19:42:56 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id C16F08FC15; Wed, 19 Sep 2012 19:42:55 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id BFFD23592DA; Wed, 19 Sep 2012 21:42:54 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id 9F99F2847B; Wed, 19 Sep 2012 21:42:54 +0200 (CEST) Date: Wed, 19 Sep 2012 21:42:54 +0200 From: Jilles Tjoelker To: Brooks Davis Message-ID: <20120919194254.GA75105@stack.nl> References: <201209182028.q8IKS1lK056820@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201209182028.q8IKS1lK056820@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-projects@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r240675 - in projects/mtree: include lib/libc/gen X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2012 19:42:56 -0000 On Tue, Sep 18, 2012 at 08:28:01PM +0000, Brooks Davis wrote: > Author: brooks > Date: Tue Sep 18 20:28:01 2012 > New Revision: 240675 > URL: http://svn.freebsd.org/changeset/base/240675 > Log: > Implement VIS_GLOB support including compatibilty symbols required by > overlapping flags between FreeBSD and NetBSD. > Add a compatibility symbol for unvis() due to NetBSD's allocation of > a flag value for UNVIS_END rather than just using 1. > Add symbol version entries for new vis and unvis functions. > [snip] > Modified: projects/mtree/include/vis.h > ============================================================================== > --- projects/mtree/include/vis.h Tue Sep 18 20:20:29 2012 (r240674) > +++ projects/mtree/include/vis.h Tue Sep 18 20:28:01 2012 (r240675) > @@ -62,6 +62,7 @@ > #define VIS_HTTP1866 0x200 /* http-style &#num; or &string; */ > #define VIS_NOESCAPE 0x400 /* don't decode `\' */ > #define _VIS_END 0x800 /* for unvis */ > +#define VIS_GLOB 0x1000 /* encode glob(3) magics */ > > /* > * unvis return codes > > [snip] Is it really necessary to be binary compatible with NetBSD in the VIS_* constants or is it possible to keep our values for the VIS_* constants we already have? While symbol versioning works, it leaves additional code around forever, which would not be necessary if compatibility had been kept. -- Jilles Tjoelker From owner-svn-src-projects@FreeBSD.ORG Wed Sep 19 19:59:16 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0BF971065677; Wed, 19 Sep 2012 19:59:16 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EBAE08FC0A; Wed, 19 Sep 2012 19:59:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8JJxF78059297; Wed, 19 Sep 2012 19:59:15 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8JJxFm0059291; Wed, 19 Sep 2012 19:59:15 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201209191959.q8JJxFm0059291@svn.freebsd.org> From: Brooks Davis Date: Wed, 19 Sep 2012 19:59:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240706 - projects/mtree/contrib/mtree X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2012 19:59:16 -0000 Author: brooks Date: Wed Sep 19 19:59:15 2012 New Revision: 240706 URL: http://svn.freebsd.org/changeset/base/240706 Log: FreeBSD porting tweaks: - The compat function in fts_open takes (const FTSENT * const *) arguments in FreeBSD rather than the historic (const FTSENT **). - __dead is spelled __dead2 here. - Include sys/stat.h rather than picking it up via namespace polution. - Add a way to disable SHA384 since we don't have it. - Don't double declare the sflag extern. Modified: projects/mtree/contrib/mtree/compare.c projects/mtree/contrib/mtree/crc.c projects/mtree/contrib/mtree/create.c projects/mtree/contrib/mtree/extern.h projects/mtree/contrib/mtree/mtree.c Modified: projects/mtree/contrib/mtree/compare.c ============================================================================== --- projects/mtree/contrib/mtree/compare.c Wed Sep 19 19:22:24 2012 (r240705) +++ projects/mtree/contrib/mtree/compare.c Wed Sep 19 19:59:15 2012 (r240706) @@ -43,6 +43,7 @@ __RCSID("$NetBSD: compare.c,v 1.52 2008/ #endif /* not lint */ #include +#include #include #include @@ -462,6 +463,7 @@ typeerr: LABEL; free(digestbuf); } } +#ifndef NO_SHA384 if (s->flags & F_SHA384) { if ((digestbuf = SHA384_File(p->fts_accpath, NULL)) == NULL) { LABEL; @@ -478,6 +480,7 @@ typeerr: LABEL; free(digestbuf); } } +#endif /* ! NO_SHA384 */ if (s->flags & F_SHA512) { if ((digestbuf = SHA512_File(p->fts_accpath, NULL)) == NULL) { LABEL; Modified: projects/mtree/contrib/mtree/crc.c ============================================================================== --- projects/mtree/contrib/mtree/crc.c Wed Sep 19 19:22:24 2012 (r240705) +++ projects/mtree/contrib/mtree/crc.c Wed Sep 19 19:59:15 2012 (r240706) @@ -114,7 +114,6 @@ static const u_int32_t crctab[] = { * locations to store the crc and the number of bytes read. It returns 0 on * success and 1 on failure. Errno is set on failure. */ -extern int sflag; u_int32_t crc_total = ~0; /* The crc over a number of files. */ int Modified: projects/mtree/contrib/mtree/create.c ============================================================================== --- projects/mtree/contrib/mtree/create.c Wed Sep 19 19:22:24 2012 (r240705) +++ projects/mtree/contrib/mtree/create.c Wed Sep 19 19:59:15 2012 (r240706) @@ -83,7 +83,7 @@ static uid_t uid; static mode_t mode; static u_long flags; -static int dcmp(const FTSENT **, const FTSENT **); +static int dcmp(const FTSENT * const *, const FTSENT * const *); static void output(int *, const char *, ...) __attribute__((__format__(__printf__, 2, 3))); static int statd(FTS *, FTSENT *, uid_t *, gid_t *, mode_t *, u_long *); @@ -242,12 +242,14 @@ statf(FTSENT *p) output(&indent, "sha256=%s", digestbuf); free(digestbuf); } +#ifndef NO_SHA384 if (keys & F_SHA384 && S_ISREG(p->fts_statp->st_mode)) { if ((digestbuf = SHA384_File(p->fts_accpath, NULL)) == NULL) mtree_err("%s: SHA384_File failed: %s", p->fts_accpath, strerror(errno)); output(&indent, "sha384=%s", digestbuf); free(digestbuf); } +#endif if (keys & F_SHA512 && S_ISREG(p->fts_statp->st_mode)) { if ((digestbuf = SHA512_File(p->fts_accpath, NULL)) == NULL) mtree_err("%s: SHA512_File failed: %s", p->fts_accpath, strerror(errno)); @@ -398,7 +400,7 @@ statd(FTS *t, FTSENT *parent, uid_t *pui * Keep this in sync with nodecmp() in spec.c. */ static int -dcmp(const FTSENT **a, const FTSENT **b) +dcmp(const FTSENT * const *a, const FTSENT * const *b) { if (S_ISDIR((*a)->fts_statp->st_mode)) { Modified: projects/mtree/contrib/mtree/extern.h ============================================================================== --- projects/mtree/contrib/mtree/extern.h Wed Sep 19 19:22:24 2012 (r240705) +++ projects/mtree/contrib/mtree/extern.h Wed Sep 19 19:59:15 2012 (r240706) @@ -60,7 +60,7 @@ void cwalk(void); void dump_nodes(const char *, NODE *, int); void init_excludes(void); int matchtags(NODE *); -__dead __printflike(1,2) void mtree_err(const char *, ...); +__dead2 __printflike(1,2) void mtree_err(const char *, ...); const char *nodetype(u_int); u_int parsekey(const char *, int *); void parsetags(slist_t *, char *); Modified: projects/mtree/contrib/mtree/mtree.c ============================================================================== --- projects/mtree/contrib/mtree/mtree.c Wed Sep 19 19:22:24 2012 (r240705) +++ projects/mtree/contrib/mtree/mtree.c Wed Sep 19 19:59:15 2012 (r240706) @@ -63,7 +63,7 @@ int cflag, Cflag, dflag, Dflag, eflag, i rflag, sflag, tflag, uflag, Uflag; char fullpath[MAXPATHLEN]; -__dead static void usage(void); +__dead2 static void usage(void); int main(int argc, char **argv) From owner-svn-src-projects@FreeBSD.ORG Wed Sep 19 20:43:24 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90A89106566B; Wed, 19 Sep 2012 20:43:24 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 71A8E8FC15; Wed, 19 Sep 2012 20:43:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8JKhOVH066867; Wed, 19 Sep 2012 20:43:24 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8JKhOTx066858; Wed, 19 Sep 2012 20:43:24 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201209192043.q8JKhOTx066858@svn.freebsd.org> From: Brooks Davis Date: Wed, 19 Sep 2012 20:43:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240709 - in projects/mtree/usr.sbin: . nmtree X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2012 20:43:24 -0000 Author: brooks Date: Wed Sep 19 20:43:23 2012 New Revision: 240709 URL: http://svn.freebsd.org/changeset/base/240709 Log: Hook NetBSD's mtree up to the build as nmtree (no manpage for now). Reduce required diffs with shim headers and a simple implmementation of flags_to_string() and string_to_flags() as wrappers around fflagstostr() and strtofflags(). Added: projects/mtree/usr.sbin/nmtree/ projects/mtree/usr.sbin/nmtree/Makefile projects/mtree/usr.sbin/nmtree/rmd160.h projects/mtree/usr.sbin/nmtree/sha1.h projects/mtree/usr.sbin/nmtree/sha2.h projects/mtree/usr.sbin/nmtree/util.c projects/mtree/usr.sbin/nmtree/util.h Modified: projects/mtree/usr.sbin/Makefile Modified: projects/mtree/usr.sbin/Makefile ============================================================================== --- projects/mtree/usr.sbin/Makefile Wed Sep 19 20:42:55 2012 (r240708) +++ projects/mtree/usr.sbin/Makefile Wed Sep 19 20:43:23 2012 (r240709) @@ -56,6 +56,7 @@ SUBDIR= adduser \ nfsdumpstate \ nfsrevoke \ nfsuserd \ + nmtree \ nologin \ pc-sysinstall \ pciconf \ Added: projects/mtree/usr.sbin/nmtree/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/mtree/usr.sbin/nmtree/Makefile Wed Sep 19 20:43:23 2012 (r240709) @@ -0,0 +1,22 @@ +# $NetBSD: Makefile,v 1.32 2009/04/22 15:23:05 lukem Exp $ +# from: @(#)Makefile 8.2 (Berkeley) 4/27/95 + +.include + +.PATH: ${.CURDIR}/../../contrib/mtree + +PROG= nmtree +CFLAGS+= -DMTREE +CFLAGS+= -DNO_SHA384 -I${.CURDIR} +LDADD+= -lmd -lutil +#MAN= mtree.8 +MAN= +SRCS= compare.c crc.c create.c excludes.c misc.c mtree.c spec.c verify.c \ + getid.c pack_dev.c + +SRCS+= sha1.h sha2.h util.c util.h + +CFLAGS+= -I${.CURDIR}/../../contrib/mknod +.PATH: ${.CURDIR}/../../contrib/mknod + +.include Added: projects/mtree/usr.sbin/nmtree/rmd160.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/mtree/usr.sbin/nmtree/rmd160.h Wed Sep 19 20:43:23 2012 (r240709) @@ -0,0 +1,5 @@ +/* $FreeBSD$ */ + +#include + +#define RMD160File RIPEMD160_File Added: projects/mtree/usr.sbin/nmtree/sha1.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/mtree/usr.sbin/nmtree/sha1.h Wed Sep 19 20:43:23 2012 (r240709) @@ -0,0 +1,4 @@ +/* $FreeBSD$ */ + +#include +#define SHA1File SHA1_File Added: projects/mtree/usr.sbin/nmtree/sha2.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/mtree/usr.sbin/nmtree/sha2.h Wed Sep 19 20:43:23 2012 (r240709) @@ -0,0 +1,4 @@ +/* $FreeBSD$ */ + +#include +#include Added: projects/mtree/usr.sbin/nmtree/util.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/mtree/usr.sbin/nmtree/util.c Wed Sep 19 20:43:23 2012 (r240709) @@ -0,0 +1,59 @@ +/*- + * Copyright (c) 2012 SRI International + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include + +#include +#include +#include +#include + +char * +flags_to_string(u_long flags, const char *def) +{ + char *str; + + str = fflagstostr(flags); + if (*str == '\0') { + free(str); + str = strdup(def); + } + return (str); +} + +int +string_to_flags(char **stringp, u_long *setp, u_long *clrp) +{ + + return strtofflags(stringp, setp, clrp); +} Added: projects/mtree/usr.sbin/nmtree/util.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/mtree/usr.sbin/nmtree/util.h Wed Sep 19 20:43:23 2012 (r240709) @@ -0,0 +1,11 @@ +/* $FreeBSD$ */ + +#ifndef _UTIL_H_ +#define _UTIL_H_ + +#include + +char *flags_to_string(u_long flags, const char *def); +int string_to_flags(char **stringp, u_long *setp, u_long *clrp); + +#endif /* _UTIL_H_ */ From owner-svn-src-projects@FreeBSD.ORG Wed Sep 19 20:52:43 2012 Return-Path: Delivered-To: svn-src-projects@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A41951065679; Wed, 19 Sep 2012 20:52:43 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) by mx1.freebsd.org (Postfix) with ESMTP id 6E1E18FC0A; Wed, 19 Sep 2012 20:52:42 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.5/8.14.5) with ESMTP id q8JKqgoY004898; Wed, 19 Sep 2012 15:52:42 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.5/8.14.5/Submit) id q8JKqgtE004897; Wed, 19 Sep 2012 15:52:42 -0500 (CDT) (envelope-from brooks) Date: Wed, 19 Sep 2012 15:52:42 -0500 From: Brooks Davis To: Jilles Tjoelker Message-ID: <20120919205242.GD3067@lor.one-eyed-alien.net> References: <201209182028.q8IKS1lK056820@svn.freebsd.org> <20120919194254.GA75105@stack.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qtZFehHsKgwS5rPz" Content-Disposition: inline In-Reply-To: <20120919194254.GA75105@stack.nl> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-projects@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r240675 - in projects/mtree: include lib/libc/gen X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2012 20:52:43 -0000 --qtZFehHsKgwS5rPz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 19, 2012 at 09:42:54PM +0200, Jilles Tjoelker wrote: > On Tue, Sep 18, 2012 at 08:28:01PM +0000, Brooks Davis wrote: > > Author: brooks > > Date: Tue Sep 18 20:28:01 2012 > > New Revision: 240675 > > URL: http://svn.freebsd.org/changeset/base/240675 >=20 > > Log: > > Implement VIS_GLOB support including compatibilty symbols required by > > overlapping flags between FreeBSD and NetBSD. >=20 > > Add a compatibility symbol for unvis() due to NetBSD's allocation of > > a flag value for UNVIS_END rather than just using 1. >=20 > > Add symbol version entries for new vis and unvis functions. >=20 > > [snip] > > Modified: projects/mtree/include/vis.h > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- projects/mtree/include/vis.h Tue Sep 18 20:20:29 2012 (r240674) > > +++ projects/mtree/include/vis.h Tue Sep 18 20:28:01 2012 (r240675) > > @@ -62,6 +62,7 @@ > > #define VIS_HTTP1866 0x200 /* http-style &#num; or &string; */ > > #define VIS_NOESCAPE 0x400 /* don't decode `\' */ > > #define _VIS_END 0x800 /* for unvis */ > > +#define VIS_GLOB 0x1000 /* encode glob(3) magics */ > > =20 > > /* > > * unvis return codes > >=20 > > [snip] >=20 > Is it really necessary to be binary compatible with NetBSD in the VIS_* > constants or is it possible to keep our values for the VIS_* constants > we already have? >=20 > While symbol versioning works, it leaves additional code around forever, > which would not be necessary if compatibility had been kept. For the vis(3) functions we could instead alter all the flags to retain compatibility to avoid the (very trivial) wrapper. Unfortunately, I think we should adopt their UNVIS_END change since it is obviously more correct and that does require a version change. There is probably an argument for splitting the difference. I argued with my self a fair bit before decided to go the versioned route since that would reduce diffs to the upstream, but it could go ether way. -- Brooks --qtZFehHsKgwS5rPz Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD8DBQFQWjCZXY6L6fI4GtQRAi18AJ9xS1ztQMSGeXESvoOnW0lb8O9hUgCeOBrk 4yfHXW63hetQY6S9XakFMV8= =xMTf -----END PGP SIGNATURE----- --qtZFehHsKgwS5rPz-- From owner-svn-src-projects@FreeBSD.ORG Wed Sep 19 21:50:18 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AF52E106566B; Wed, 19 Sep 2012 21:50:18 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9AE898FC0A; Wed, 19 Sep 2012 21:50:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8JLoIOi077716; Wed, 19 Sep 2012 21:50:18 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8JLoISi077714; Wed, 19 Sep 2012 21:50:18 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201209192150.q8JLoISi077714@svn.freebsd.org> From: Brooks Davis Date: Wed, 19 Sep 2012 21:50:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240711 - projects/mtree/lib/libc/gen X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2012 21:50:18 -0000 Author: brooks Date: Wed Sep 19 21:50:18 2012 New Revision: 240711 URL: http://svn.freebsd.org/changeset/base/240711 Log: Document VIS_GLOB Obtained from: FreeBSD Modified: projects/mtree/lib/libc/gen/vis.3 Modified: projects/mtree/lib/libc/gen/vis.3 ============================================================================== --- projects/mtree/lib/libc/gen/vis.3 Wed Sep 19 21:44:39 2012 (r240710) +++ projects/mtree/lib/libc/gen/vis.3 Wed Sep 19 21:50:18 2012 (r240711) @@ -219,6 +219,14 @@ except space, tab, and newline are encod The following flags alter this: .Bl -tag -width VIS_WHITEX +.It Dv VIS_GLOB +Also encode magic characters +.Ql ( * , +.Ql \&? , +.Ql \&[ +and +.Ql # ) +recognized by glob(3). .It Dv VIS_SP Also encode space. .It Dv VIS_TAB @@ -408,6 +416,7 @@ The destination buffer size is not large .Sh SEE ALSO .Xr unvis 1 , .Xr vis 1 , +.Xr glob 3 , .Xr unvis 3 .Rs .%A T. Berners-Lee From owner-svn-src-projects@FreeBSD.ORG Wed Sep 19 22:26:06 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94093106564A; Wed, 19 Sep 2012 22:26:06 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 656F58FC1D; Wed, 19 Sep 2012 22:26:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8JMQ6js084133; Wed, 19 Sep 2012 22:26:06 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8JMQ6Oj084129; Wed, 19 Sep 2012 22:26:06 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201209192226.q8JMQ6Oj084129@svn.freebsd.org> From: Brooks Davis Date: Wed, 19 Sep 2012 22:26:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240714 - in projects/mtree: include lib/libc/gen X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2012 22:26:06 -0000 Author: brooks Date: Wed Sep 19 22:26:05 2012 New Revision: 240714 URL: http://svn.freebsd.org/changeset/base/240714 Log: Switch to redefining the value of VIS_* flags to preseve FreeBSD's ABI rather than using wrapper functions. The added merge cost is minimal. Suggested by: jilles Deleted: projects/mtree/lib/libc/gen/vis-compat.c Modified: projects/mtree/include/vis.h projects/mtree/lib/libc/gen/Makefile.inc projects/mtree/lib/libc/gen/Symbol.map Modified: projects/mtree/include/vis.h ============================================================================== --- projects/mtree/include/vis.h Wed Sep 19 22:24:09 2012 (r240713) +++ projects/mtree/include/vis.h Wed Sep 19 22:26:05 2012 (r240714) @@ -55,14 +55,14 @@ /* * other */ -#define VIS_NOSLASH 0x040 /* inhibit printing '\' */ -#define VIS_HTTP1808 0x080 /* http-style escape % hex hex */ -#define VIS_HTTPSTYLE 0x080 /* http-style escape % hex hex */ -#define VIS_MIMESTYLE 0x100 /* mime-style escape = HEX HEX */ -#define VIS_HTTP1866 0x200 /* http-style &#num; or &string; */ -#define VIS_NOESCAPE 0x400 /* don't decode `\' */ -#define _VIS_END 0x800 /* for unvis */ -#define VIS_GLOB 0x1000 /* encode glob(3) magics */ +#define VIS_NOSLASH 0x0040 /* inhibit printing '\' */ +#define VIS_HTTP1808 0x0080 /* http-style escape % hex hex */ +#define VIS_HTTPSTYLE 0x0080 /* http-style escape % hex hex */ +#define VIS_GLOB 0x0100 /* encode glob(3) magics */ +#define VIS_MIMESTYLE 0x0200 /* mime-style escape = HEX HEX */ +#define VIS_HTTP1866 0x0400 /* http-style &#num; or &string; */ +#define VIS_NOESCAPE 0x0800 /* don't decode `\' */ +#define _VIS_END 0x1000 /* for unvis */ /* * unvis return codes Modified: projects/mtree/lib/libc/gen/Makefile.inc ============================================================================== --- projects/mtree/lib/libc/gen/Makefile.inc Wed Sep 19 22:24:09 2012 (r240713) +++ projects/mtree/lib/libc/gen/Makefile.inc Wed Sep 19 22:26:05 2012 (r240714) @@ -33,7 +33,7 @@ SRCS+= __getosreldate.c __xuname.c \ sysconf.c sysctl.c sysctlbyname.c sysctlnametomib.c \ syslog.c telldir.c termios.c time.c times.c timezone.c tls.c \ ttyname.c ttyslot.c ualarm.c ulimit.c uname.c unvis.c unvis-compat.c \ - usleep.c utime.c utxdb.c valloc.c vis.c vis-compat.c \ + usleep.c utime.c utxdb.c valloc.c vis.c \ wait.c wait3.c waitpid.c \ wordexp.c Modified: projects/mtree/lib/libc/gen/Symbol.map ============================================================================== --- projects/mtree/lib/libc/gen/Symbol.map Wed Sep 19 22:24:09 2012 (r240713) +++ projects/mtree/lib/libc/gen/Symbol.map Wed Sep 19 22:26:05 2012 (r240714) @@ -301,6 +301,9 @@ FBSD_1.0 { usleep; utime; valloc; + vis; + strvis; + strvisx; wait; wait3; waitpid; @@ -396,12 +399,9 @@ FBSD_1.3 { strsnvisx; strsvis; strsvisx; - strvis; - strvisx; svis; uid_from_user; unvis; - vis; }; FBSDprivate_1.0 { From owner-svn-src-projects@FreeBSD.ORG Thu Sep 20 14:38:22 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B3A9D1065672; Thu, 20 Sep 2012 14:38:22 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 954128FC15; Thu, 20 Sep 2012 14:38:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8KEcMqx036122; Thu, 20 Sep 2012 14:38:22 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8KEcMu9036117; Thu, 20 Sep 2012 14:38:22 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201209201438.q8KEcMu9036117@svn.freebsd.org> From: Brooks Davis Date: Thu, 20 Sep 2012 14:38:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240746 - projects/mtree/contrib/mtree X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2012 14:38:22 -0000 Author: brooks Date: Thu Sep 20 14:38:21 2012 New Revision: 240746 URL: http://svn.freebsd.org/changeset/base/240746 Log: Implement ripemd160digest as a synonym for rmd160. Emit ripemd160digest in output on FreeBSD for improved compatability with FreeBSD mtree versions. Modified: projects/mtree/contrib/mtree/compare.c projects/mtree/contrib/mtree/misc.c projects/mtree/contrib/mtree/mtree.8 projects/mtree/contrib/mtree/spec.c Modified: projects/mtree/contrib/mtree/compare.c ============================================================================== --- projects/mtree/contrib/mtree/compare.c Thu Sep 20 10:28:44 2012 (r240745) +++ projects/mtree/contrib/mtree/compare.c Thu Sep 20 14:38:21 2012 (r240746) @@ -414,13 +414,22 @@ typeerr: LABEL; if (s->flags & F_RMD160) { if ((digestbuf = RMD160File(p->fts_accpath, NULL)) == NULL) { LABEL; +#ifndef __FreeBSD__ printf("%srmd160: %s: %s\n", +#else + printf("%sripemd160digest: %s: %s\n", +#endif + tab, p->fts_accpath, strerror(errno)); tab = "\t"; } else { if (strcmp(s->rmd160digest, digestbuf)) { LABEL; +#ifndef __FreeBSD__ printf("%srmd160 (0x%s, 0x%s)\n", +#else + printf("%sripemd160digest (0x%s, 0x%s)\n", +#endif tab, s->rmd160digest, digestbuf); } tab = "\t"; Modified: projects/mtree/contrib/mtree/misc.c ============================================================================== --- projects/mtree/contrib/mtree/misc.c Thu Sep 20 10:28:44 2012 (r240745) +++ projects/mtree/contrib/mtree/misc.c Thu Sep 20 14:38:21 2012 (r240746) @@ -72,6 +72,7 @@ static KEY keylist[] = { {"mode", F_MODE, NEEDVALUE}, {"nlink", F_NLINK, NEEDVALUE}, {"optional", F_OPT, 0}, + {"ripemd160digest", F_RMD160, NEEDVALUE}, {"rmd160", F_RMD160, NEEDVALUE}, {"rmd160digest",F_RMD160, NEEDVALUE}, {"sha1", F_SHA1, NEEDVALUE}, Modified: projects/mtree/contrib/mtree/mtree.8 ============================================================================== --- projects/mtree/contrib/mtree/mtree.8 Thu Sep 20 10:28:44 2012 (r240745) +++ projects/mtree/contrib/mtree/mtree.8 Thu Sep 20 14:38:21 2012 (r240746) @@ -414,6 +414,9 @@ The number of hard links the file is exp .It Sy optional The file is optional; don't complain about the file if it's not in the file hierarchy. +.It Sy ripemd160digest +Synonym for +.Sy rmd160 . .It Sy rmd160 The .Tn RMD-160 Modified: projects/mtree/contrib/mtree/spec.c ============================================================================== --- projects/mtree/contrib/mtree/spec.c Thu Sep 20 10:28:44 2012 (r240745) +++ projects/mtree/contrib/mtree/spec.c Thu Sep 20 14:38:21 2012 (r240746) @@ -366,7 +366,12 @@ dump_nodes(const char *dir, NODE *root, if (MATCHFLAG(F_MD5)) appendfield(pathlast, "md5=%s", cur->md5digest); if (MATCHFLAG(F_RMD160)) +#ifndef __FreeBSD__ appendfield(pathlast, "rmd160=%s", cur->rmd160digest); +#else + appendfield(pathlast, "ripemd160digest=%s", + cur->rmd160digest); +#endif if (MATCHFLAG(F_SHA1)) appendfield(pathlast, "sha1=%s", cur->sha1digest); if (MATCHFLAG(F_SHA256)) From owner-svn-src-projects@FreeBSD.ORG Thu Sep 20 14:52:51 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82BC91065670; Thu, 20 Sep 2012 14:52:51 +0000 (UTC) (envelope-from cherry@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6DE748FC12; Thu, 20 Sep 2012 14:52:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8KEqplJ038202; Thu, 20 Sep 2012 14:52:51 GMT (envelope-from cherry@svn.freebsd.org) Received: (from cherry@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8KEqp9b038200; Thu, 20 Sep 2012 14:52:51 GMT (envelope-from cherry@svn.freebsd.org) Message-Id: <201209201452.q8KEqp9b038200@svn.freebsd.org> From: "Cherry G. Mathew" Date: Thu, 20 Sep 2012 14:52:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240747 - projects/amd64_xen_pv/sys/dev/xen/netback X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2012 14:52:51 -0000 Author: cherry Date: Thu Sep 20 14:52:50 2012 New Revision: 240747 URL: http://svn.freebsd.org/changeset/base/240747 Log: Alter file scoped macro semantics to fit usecases, in order to fix build on llvm. An alternate fix would have been an inline private function instead, but given that there are no consumers of the return value of the expression - Occam's Razor was applied. Reported by Bret Ketchum . Modified: projects/amd64_xen_pv/sys/dev/xen/netback/netback_unit_tests.c Modified: projects/amd64_xen_pv/sys/dev/xen/netback/netback_unit_tests.c ============================================================================== --- projects/amd64_xen_pv/sys/dev/xen/netback/netback_unit_tests.c Thu Sep 20 14:38:21 2012 (r240746) +++ projects/amd64_xen_pv/sys/dev/xen/netback/netback_unit_tests.c Thu Sep 20 14:52:50 2012 (r240747) @@ -58,8 +58,8 @@ __FBSDID("$FreeBSD$"); #define TOSTRING(x) STRINGIFY(x) /** - * Writes an error message to buffer if cond is false, and returns true - * iff the assertion failed. Note the implied parameters buffer and + * Writes an error message to buffer if cond is false + * Note the implied parameters buffer and * buflen */ #define XNB_ASSERT(cond) ({ \ @@ -71,7 +71,7 @@ __FBSDID("$FreeBSD$"); strlcat(_buffer, ":" TOSTRING(__LINE__) \ " Assertion Error: " #cond "\n", _buflen); \ } \ - ! passed; }) + }) /** From owner-svn-src-projects@FreeBSD.ORG Thu Sep 20 14:55:33 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F3780106566C; Thu, 20 Sep 2012 14:55:32 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DEF888FC12; Thu, 20 Sep 2012 14:55:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8KEtWLj038728; Thu, 20 Sep 2012 14:55:32 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8KEtWe2038723; Thu, 20 Sep 2012 14:55:32 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201209201455.q8KEtWe2038723@svn.freebsd.org> From: Brooks Davis Date: Thu, 20 Sep 2012 14:55:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240748 - projects/mtree/contrib/mtree X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2012 14:55:33 -0000 Author: brooks Date: Thu Sep 20 14:55:32 2012 New Revision: 240748 URL: http://svn.freebsd.org/changeset/base/240748 Log: Implement FreeBSD's -n option which supresses comments. Modified: projects/mtree/contrib/mtree/create.c projects/mtree/contrib/mtree/extern.h projects/mtree/contrib/mtree/mtree.8 projects/mtree/contrib/mtree/mtree.c Modified: projects/mtree/contrib/mtree/create.c ============================================================================== --- projects/mtree/contrib/mtree/create.c Thu Sep 20 14:52:50 2012 (r240747) +++ projects/mtree/contrib/mtree/create.c Thu Sep 20 14:55:32 2012 (r240748) @@ -112,9 +112,11 @@ cwalk(void) ""; } - printf( - "#\t user: %s\n#\tmachine: %s\n#\t tree: %s\n#\t date: %s", - user, host, fullpath, ctime(&clocktime)); + if (!nflag) + printf( + "#\t user: %s\n#\tmachine: %s\n#\t tree: %s\n" + "#\t date: %s", + user, host, fullpath, ctime(&clocktime)); if ((t = fts_open(argv, ftsoptions, dcmp)) == NULL) mtree_err("fts_open: %s", strerror(errno)); @@ -125,12 +127,13 @@ cwalk(void) } switch(p->fts_info) { case FTS_D: - printf("\n# %s\n", p->fts_path); + if (!nflag) + printf("\n# %s\n", p->fts_path); statd(t, p, &uid, &gid, &mode, &flags); statf(p); break; case FTS_DP: - if (p->fts_level > 0) + if (!nflag && p->fts_level > 0) printf("# %s\n..\n\n", p->fts_path); break; case FTS_DNR: Modified: projects/mtree/contrib/mtree/extern.h ============================================================================== --- projects/mtree/contrib/mtree/extern.h Thu Sep 20 14:52:50 2012 (r240747) +++ projects/mtree/contrib/mtree/extern.h Thu Sep 20 14:55:32 2012 (r240748) @@ -69,7 +69,8 @@ void read_excludes_file(const char *); const char *rlink(const char *); int verify(void); -extern int dflag, eflag, iflag, lflag, mflag, rflag, sflag, tflag, uflag; +extern int dflag, eflag, iflag, lflag, mflag, + nflag, rflag, sflag, tflag, uflag; extern int mtree_Mflag, mtree_Sflag, mtree_Wflag; extern size_t mtree_lineno; extern u_int32_t crc_total; Modified: projects/mtree/contrib/mtree/mtree.8 ============================================================================== --- projects/mtree/contrib/mtree/mtree.8 Thu Sep 20 14:52:50 2012 (r240747) +++ projects/mtree/contrib/mtree/mtree.8 Thu Sep 20 14:55:32 2012 (r240748) @@ -202,6 +202,13 @@ mode). See .Xr init 8 for information on security levels. +.It Fl n +Do not emit pathname comments when creating a specification. +Normally +a comment is emitted before each directory and before the close of that +directory when using the +.Fl c +option. .It Fl N Ar dbdir Use the user database text file .Pa master.passwd Modified: projects/mtree/contrib/mtree/mtree.c ============================================================================== --- projects/mtree/contrib/mtree/mtree.c Thu Sep 20 14:52:50 2012 (r240747) +++ projects/mtree/contrib/mtree/mtree.c Thu Sep 20 14:55:32 2012 (r240748) @@ -60,7 +60,7 @@ __RCSID("$NetBSD: mtree.c,v 1.37 2011/08 int ftsoptions = FTS_PHYSICAL; int cflag, Cflag, dflag, Dflag, eflag, iflag, lflag, mflag, - rflag, sflag, tflag, uflag, Uflag; + nflag, rflag, sflag, tflag, uflag, Uflag; char fullpath[MAXPATHLEN]; __dead2 static void usage(void); @@ -77,7 +77,7 @@ main(int argc, char **argv) init_excludes(); while ((ch = getopt(argc, argv, - "cCdDeE:f:I:ik:K:lLmMN:p:PrR:s:StuUWxX:")) + "cCdDeE:f:I:ik:K:lLmMnN:p:PrR:s:StuUWxX:")) != -1) { switch((char)ch) { case 'c': @@ -132,6 +132,9 @@ main(int argc, char **argv) case 'M': mtree_Mflag = 1; break; + case 'n': + nflag = 1; + break; case 'N': if (! setup_getid(optarg)) mtree_err( @@ -225,7 +228,7 @@ usage(void) { fprintf(stderr, - "usage: %s [-CcDdeLlMPrSUuWx] [-i|-m] [-E tags] [-f spec]\n" + "usage: %s [-CcDdeLlMnPrSUuWx] [-i|-m] [-E tags] [-f spec]\n" "\t\t[-I tags] [-K keywords] [-k keywords] [-N dbdir] [-p path]\n" "\t\t[-R keywords] [-s seed] [-X exclude-file]\n", getprogname()); From owner-svn-src-projects@FreeBSD.ORG Thu Sep 20 15:05:58 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54328106564A; Thu, 20 Sep 2012 15:05:58 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F5288FC17; Thu, 20 Sep 2012 15:05:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8KF5wRD040199; Thu, 20 Sep 2012 15:05:58 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8KF5wU2040193; Thu, 20 Sep 2012 15:05:58 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201209201505.q8KF5wU2040193@svn.freebsd.org> From: Brooks Davis Date: Thu, 20 Sep 2012 15:05:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240749 - projects/mtree/contrib/mtree X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2012 15:05:58 -0000 Author: brooks Date: Thu Sep 20 15:05:57 2012 New Revision: 240749 URL: http://svn.freebsd.org/changeset/base/240749 Log: Add -q. This will cause the warning messages about missing directories to not be printed. Obtained from: OpenBSD Modified: projects/mtree/contrib/mtree/extern.h projects/mtree/contrib/mtree/mtree.8 projects/mtree/contrib/mtree/mtree.c projects/mtree/contrib/mtree/verify.c Modified: projects/mtree/contrib/mtree/extern.h ============================================================================== --- projects/mtree/contrib/mtree/extern.h Thu Sep 20 14:55:32 2012 (r240748) +++ projects/mtree/contrib/mtree/extern.h Thu Sep 20 15:05:57 2012 (r240749) @@ -70,7 +70,7 @@ const char *rlink(const char *); int verify(void); extern int dflag, eflag, iflag, lflag, mflag, - nflag, rflag, sflag, tflag, uflag; + nflag, qflag, rflag, sflag, tflag, uflag; extern int mtree_Mflag, mtree_Sflag, mtree_Wflag; extern size_t mtree_lineno; extern u_int32_t crc_total; Modified: projects/mtree/contrib/mtree/mtree.8 ============================================================================== --- projects/mtree/contrib/mtree/mtree.8 Thu Sep 20 14:55:32 2012 (r240748) +++ projects/mtree/contrib/mtree/mtree.8 Thu Sep 20 15:05:57 2012 (r240749) @@ -229,6 +229,12 @@ This is the default. Use the file hierarchy rooted in .Ar path , instead of the current directory. +.It Fl q +Quiet mode. +Do not complain when a +.Dq missing +directory cannot be created because it already exists. +This occurs when the directory is a symbolic link. .It Fl R Ar keywords Remove the specified (whitespace or comma separated) keywords from the current set of keywords. Modified: projects/mtree/contrib/mtree/mtree.c ============================================================================== --- projects/mtree/contrib/mtree/mtree.c Thu Sep 20 14:55:32 2012 (r240748) +++ projects/mtree/contrib/mtree/mtree.c Thu Sep 20 15:05:57 2012 (r240749) @@ -60,7 +60,7 @@ __RCSID("$NetBSD: mtree.c,v 1.37 2011/08 int ftsoptions = FTS_PHYSICAL; int cflag, Cflag, dflag, Dflag, eflag, iflag, lflag, mflag, - nflag, rflag, sflag, tflag, uflag, Uflag; + nflag, qflag, rflag, sflag, tflag, uflag, Uflag; char fullpath[MAXPATHLEN]; __dead2 static void usage(void); @@ -77,7 +77,7 @@ main(int argc, char **argv) init_excludes(); while ((ch = getopt(argc, argv, - "cCdDeE:f:I:ik:K:lLmMnN:p:PrR:s:StuUWxX:")) + "cCdDeE:f:I:ik:K:lLmMnN:p:PqrR:s:StuUWxX:")) != -1) { switch((char)ch) { case 'c': @@ -148,6 +148,9 @@ main(int argc, char **argv) ftsoptions &= ~FTS_LOGICAL; ftsoptions |= FTS_PHYSICAL; break; + case 'q': + qflag = 1; + break; case 'r': rflag = 1; break; Modified: projects/mtree/contrib/mtree/verify.c ============================================================================== --- projects/mtree/contrib/mtree/verify.c Thu Sep 20 14:55:32 2012 (r240748) +++ projects/mtree/contrib/mtree/verify.c Thu Sep 20 15:05:57 2012 (r240749) @@ -175,8 +175,16 @@ miss(NODE *p, char *tail) if (p->type != F_DIR && (dflag || p->flags & F_VISIT)) continue; strcpy(tail, p->name); - if (!(p->flags & F_VISIT)) - printf("missing: %s", path); + if (!(p->flags & F_VISIT)) { + /* Don't print missing message if file exists as a + symbolic link and the -q flag is set. */ + struct stat statbuf; + + if (qflag && stat(path, &statbuf) == 0) + p->flags |= F_VISIT; + else + (void)printf("%s missing", path); + } switch (p->type) { case F_BLOCK: case F_CHAR: From owner-svn-src-projects@FreeBSD.ORG Thu Sep 20 15:19:01 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C544C106566C; Thu, 20 Sep 2012 15:19:01 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B07578FC08; Thu, 20 Sep 2012 15:19:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8KFJ1tA042085; Thu, 20 Sep 2012 15:19:01 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8KFJ1aB042082; Thu, 20 Sep 2012 15:19:01 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201209201519.q8KFJ1aB042082@svn.freebsd.org> From: Brooks Davis Date: Thu, 20 Sep 2012 15:19:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240751 - projects/mtree/contrib/mtree X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2012 15:19:01 -0000 Author: brooks Date: Thu Sep 20 15:19:01 2012 New Revision: 240751 URL: http://svn.freebsd.org/changeset/base/240751 Log: Ignore the -w option for compatibility with FreeBSD's mtree. This version produces the same output as FreeBSD's with -w except for not emitting a warning. Modified: projects/mtree/contrib/mtree/mtree.8 projects/mtree/contrib/mtree/mtree.c Modified: projects/mtree/contrib/mtree/mtree.8 ============================================================================== --- projects/mtree/contrib/mtree/mtree.8 Thu Sep 20 15:11:59 2012 (r240750) +++ projects/mtree/contrib/mtree/mtree.8 Thu Sep 20 15:19:01 2012 (r240751) @@ -295,6 +295,9 @@ is given, these flags will be reset. Exit with a status of 0 on success, 2 if the file hierarchy did not match the specification, and 1 if any other error occurred. +.It Fl w +Ignored for compatibility with FreeBSD versions of +.Nm . .It Fl W Don't attempt to set various file attributes such as the ownership, mode, flags, or time Modified: projects/mtree/contrib/mtree/mtree.c ============================================================================== --- projects/mtree/contrib/mtree/mtree.c Thu Sep 20 15:11:59 2012 (r240750) +++ projects/mtree/contrib/mtree/mtree.c Thu Sep 20 15:19:01 2012 (r240751) @@ -77,7 +77,7 @@ main(int argc, char **argv) init_excludes(); while ((ch = getopt(argc, argv, - "cCdDeE:f:I:ik:K:lLmMnN:p:PqrR:s:StuUWxX:")) + "cCdDeE:f:I:ik:K:lLmMnN:p:PqrR:s:StuUwWxX:")) != -1) { switch((char)ch) { case 'c': @@ -177,6 +177,9 @@ main(int argc, char **argv) case 'U': Uflag = uflag = 1; break; + case 'w': + /* Ignored for compatibility with FreeBSD's mtree. */ + break; case 'W': mtree_Wflag = 1; break; From owner-svn-src-projects@FreeBSD.ORG Thu Sep 20 15:50:28 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 870AB106566C; Thu, 20 Sep 2012 15:50:28 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F1178FC18; Thu, 20 Sep 2012 15:50:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8KFoS37046614; Thu, 20 Sep 2012 15:50:28 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8KFoSWx046609; Thu, 20 Sep 2012 15:50:28 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201209201550.q8KFoSWx046609@svn.freebsd.org> From: Attilio Rao Date: Thu, 20 Sep 2012 15:50:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240752 - in projects/fuse/sbin: . mount_fusefs X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2012 15:50:28 -0000 Author: attilio Date: Thu Sep 20 15:50:27 2012 New Revision: 240752 URL: http://svn.freebsd.org/changeset/base/240752 Log: Add the mount support for fusefs volumes. This is almost entirely based on the port fusefs-kmod sources. Submitted by: people working on the fusefs-kmod Added: projects/fuse/sbin/mount_fusefs/ projects/fuse/sbin/mount_fusefs/Makefile (contents, props changed) projects/fuse/sbin/mount_fusefs/mount_fusefs.8 (contents, props changed) projects/fuse/sbin/mount_fusefs/mount_fusefs.c (contents, props changed) Modified: projects/fuse/sbin/Makefile Modified: projects/fuse/sbin/Makefile ============================================================================== --- projects/fuse/sbin/Makefile Thu Sep 20 15:19:01 2012 (r240751) +++ projects/fuse/sbin/Makefile Thu Sep 20 15:50:27 2012 (r240752) @@ -49,6 +49,7 @@ SUBDIR=adjkerntz \ mksnap_ffs \ mount \ mount_cd9660 \ + mount_fusefs \ mount_msdosfs \ mount_nfs \ mount_ntfs \ Added: projects/fuse/sbin/mount_fusefs/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/fuse/sbin/mount_fusefs/Makefile Thu Sep 20 15:50:27 2012 (r240752) @@ -0,0 +1,33 @@ +# $FreeBSD$ + +.if defined(DEBUG) +DEBUG_FLAGS+= -D_DEBUG -g +.endif + +.if defined(DEBUG2G) +DEBUG_FLAGS+= -D_DEBUG2G -g +.endif + +.if defined(DEBUG3G) +DEBUG_FLAGS+= -D_DEBUG3G -g +.endif + +.if defined(DEBUG_MSG) +DEBUG_FLAGS+= -D_DEBUG_MSG +.endif + +.if defined(F4BVERS) +DEBUG_FLAGS+= -DFUSE4BSD_VERSION="\"${F4BVERS}\"" +.endif + +PROG= mount_fusefs +SRCS= mount_fusefs.c getmntopts.c +MAN8= mount_fusefs.8 +NO_MANCOMPRESS?= yes + +MOUNT= ${.CURDIR}/../mount +CFLAGS+= -I${MOUNT} + +.PATH: ${MOUNT} + +.include Added: projects/fuse/sbin/mount_fusefs/mount_fusefs.8 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/fuse/sbin/mount_fusefs/mount_fusefs.8 Thu Sep 20 15:50:27 2012 (r240752) @@ -0,0 +1,373 @@ +.\" Copyright (c) 1980, 1989, 1991, 1993 +.\" The Regents of the University of California. +.\" Copyright (c) 2005, 2006 Csaba Henk +.\" 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. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.Dd January 13, 2006 +.Dt MOUNT_FUSEFS 8 +.Os +.Sh NAME +.Nm mount_fusefs +.Nd mount a Fuse file system daemon +.Sh SYNOPSIS +.Nm +.Op Fl A +.Op Fl S +.Op Fl v +.Op Fl D Ar fuse_daemon +.Op Fl O Ar daemon_opts +.Op Fl s Ar special +.Op Fl m Ar node +.Op Fl h +.Op Fl V +.Op Fl o Ar option ... +.Ar special node +.Op Ar fuse_daemon ... +.Sh DESCRIPTION +The most basic way of usage is as follows: before calling +.Nm , +one starts a fuse daemon on the given +.Ar special +(in practice, the daemon gets one automatically, which can then be indentified +via +.Xr fstat 1 ) , +and that special file can then be mounted by +.Nm . +.Pp +However, the procedure of spawning a daemon can be automated so that it's +also performed by +.Nm . +If the command invoking a given +.Ar fuse_daemon +is appended to the list of arguments, +.Nm +will call then +.Ar fuse_daemon +via that command, in a way that +.Ar fuse_daemon +will be instructed to attach itself to +.Ar special . +From that on mounting goes as in the simple case. (See also +.Sx DAEMON MOUNTS . ) +.Pp +The +.Ar special +argument can be utilized by +.Nm +in the following ways: +.Bl -bullet -offset indent +.It +Basicly, it will be treated as the path of the special file to mount. +.It +However, if +.Pa auto +is passed as +.Ar special , +then +.Nm +will look for a suitable free fuse device by itself. +.It +Moreover, if +.Ar special +is an integer, then it will be interpreted as the number +of the file descriptor of an already open fuse device +(used when the Fuse library invokes +.Nm , +cf. +.Sx DAEMON MOUNTS ) . +.El +.Pp +The options are as follows: +.Bl -tag -width indent +.It Fl A , Ic --reject-allow_other +Prohibit the +.Cm allow_other +mount flag. Intended for to be used in scripts and the +.Xr sudoers 5 +file. +.It Fl S , Ic --safe +Run in safe mode, that is, reject invoking a filesystem daemon. +.It Fl v +Be verbose. +.It Fl D, Ic --daemon Ar daemon +Call the specified +.Ar daemon . +.It Fl O, Ic --daemon_opts Ar opts +Add +.Ar opts +to the daemon's command line. +.It Fl s, Ic --special Ar special +Use +.Ar special +as special. +.It Fl m, Ic --mountpath Ar node +Mount on +.Ar node . +.It Fl h, Ic --help +Show help. +.It Fl V, Ic --version +Show version information. +.It Fl o +Mount options are specified via +.Fl o . +The following options are available (and also their negated versions, +by prefixing them with +.Dq no ) : +.Bl -tag -width indent +.It Cm default_permissions +Enable traditional (file mode based) permission checking in kernel. +.It Cm allow_other +Do not apply +.Sx STRICT ACCESS POLICY . +Only root can use this option. +.It Cm max_read Ns = Ns Ar n +Limit size of read requests with +.Ar n . +.It Cm private +Refuse shared mounting of the daemon. This is the default behaviour, +to allow sharing, use expicitly +.Fl o Cm noprivate . +.It Cm neglect_shares +Don't refuse unmounting if there are secondary mounts. +.It Cm push_symlinks_in +Prefix absolute symlinks with mountpoint. +.El +.Pp +.El +.Pp +Besides the above mount options, there is a set of pseudo-mount options which +are supported by the Fuse library. One can list these by passing +.Fl h +to a Fuse daemon. Most of these options have effect only on the behaviour of +the daemon (that is, their scope is limited to userspace). However, +there are some which do require in-kernel support. +Currently the following ones are supported by the kernel: +.Bl -tag -width indent +.It Cm direct_io +Bypass the buffer cache system. +.It Cm kernel_cache +By default, cached buffers of a given file are flushed at each +.Xr open 2 . +This option disables this behaviour. +.El +.Sh DAEMON MOUNTS +Usually users don't need to use +.Nm +directly, as the Fuse library enables Fuse daemons to invoke +.Nm +by themselves. That is, +.Pp +.Dl fuse_daemon mountpoint +.Pp +has the same effect as +.Pp +.Dl mount_fusefs auto mountpoint fuse_daemon +.Pp +This is the recommended way of usage, unless you want to go beyond basic usage +(eg, run daemon on a low privilege level, but mount it as root). +.Sh STRICT ACCESS POLICY +The strict access policy for Fuse filesystems lets one to use the filesystem +only if the filesystem daemon has the same credentials (uid, real uid, gid, +real gid) as the user. +.Pp +This is applied for Fuse mounts by default, and only root can mount without +the strict access policy (cf. the +.Cm allow_other +mount option). +.Pp +The reason is to shield users from the daemon +.Dq spying +on their I/O activities. +.Pp +Users might opt for willingly relax strict access policy (as far they +are concerned) by doing their own secondary mount (cf. +.Sx SHARED MOUNTS ) . +.Sh SHARED MOUNTS +A Fuse daemon can be shared, ie. mounted multiple times. +When doing the first (primary) mount, the spawner and the mounter of the daemon +must have the same uid, or the mounter should be the superuser. +.Pp +After the primary mount is in place, secondary mounts can be done by anyone +(unless this feature is disabled by +.Cm private ) . +The behaviour of a secondary mount is analogous to that of symbolic +links: they redirect all filesystem operations to the primary mount. +.Pp +Doing a secondary mount is like signing an agreement: by this action, the mounter +agrees that the Fuse daemon can trace her I/O activities. From that on, she is not +banned from using the filesystem (either via her own mount or via the primary mount), +regardless whether +.Cm allow_other +is used or not. +.Pp +The device name of a secondary mount is the device name of the corresponding primary +mount, followed by a '#' character and the index of the secondary mount, like +.Pa /dev/fuse0#3 . +.Sh SECURITY +System administratos might want to use a custom mount policy (ie., one going beyond the +.Va vfs.usermount +sysctl). The primary tool for such purposes is +.Xr sudo 8 . +However, given that +.Nm +is capable of invoking an arbitrary program, one must be careful about this. +.Nm +is designed in a way such that it makes that easy. For this purpose, +there are options which disable certain risky features (cf. +.Fl S +and +.Fl A ) , +and command line parsing is done in a flexible way: mixing options and +non-options allowed, but processing them stops at the third non-option argument +(after the first two has been utilized as device and mountpoint). The rest of +the command line specifies the daemon and its arguments. (Alternatively, the +daemon, the special and the mount path can be specified using the respective +options.) Note that +.Nm +ignores the environment variable +.Ev POSIXLY_CORRECT +and always behaves as described. +.Pp +In general, to be as scripting / +.Xr sudoers 5 +friendly as possible, no information has a fixed +position in the command line, but once a given piece of information is +provided, subsequent arguments/options cannot override it (maybe with the +exception of some non-critical ones). +.Sh ENVIRONMENT +.Bl -tag -width ".Ev MOUNT_FUSEFS_SAFE" +.It Ev MOUNT_FUSEFS_SAFE +Setting this has the same effect as the +.Fl S +option. +.It Ev MOUNT_FUSEFS_VERBOSE +Setting this has the same effect as the +.Fl v +option. +.It Ev MOUNT_FUSEFS_IGNORE_UNKNOWN +If this is set, +.Nm +will ignore uknown mount options. +.It Ev MOUNT_FUSEFS_CALL_BY_LIB +Adjust behaviour to the needs of the FUSE library. Currently it has effect +on help output. +.El +.Pp +Although the following variables don't have effect on +.Nm +itself, they affect the behaviour of fuse daemons: +.Bl -tag -width ".Ev FUSE_DEV_NAME" +.It Ev FUSE_DEV_NAME +Device to get attached to. If not set, the multiplexer path +.Ar /dev/fuse +is used. +.It Ev FUSE_DEV_FD +File desciptor of an opened Fuse device to use. Overrides +.Ev FUSE_DEV_NAME . +.It Ev FUSE_NO_MOUNT +If this is set, the library won't attempt to mount the filesystem, even +if a mountpoint argument is supplied. +.El +.Sh FILES +.Bl -tag -width /dev/fuseN +.It Pa /dev/fuseN +Fuse devices by which the kernel and Fuse daemons can communicate. +.It Pa /dev/fuse +The multiplexer path. An +.Xr open 2 +performed on it automatically gets passed to a free Fuse device by the kernel (which might be +just created for this puprose). +.El +.Sh EXAMPLES +Mounting the example filesystem of the Fuse distribution (from its directory): either +.Pp +.Dl ./fusexmp /mnt/fuse +.Pp +or +.Pp +.Dl mount_fusefs auto /mnt/fuse ./fusexmp +.Pp +Doing the same in two steps, using +.Pa /dev/fuse0 : +.Pp +.Dl FUSE_DEV_NAME=/dev/fuse0 ./fusexmp && +.Dl mount_fusefs /dev/fuse0 /mnt/fuse +.Pp +A script wrapper for fusexmp which ensures that +.Nm +doesn't call any external utility and also provides a hacky +(non race-free) automatic device selection: +.Pp +.Dl #!/bin/sh -e +.Pp +.Dl n=`ls /dev/fuse* | awk 'END{ print FNR }'` +.Dl FUSE_DEV_NAME=/dev/fuse$n fusexmp +.Dl mount_fusefs -S /dev/fuse$n /mnt/fuse \(lq$@\(rq +.Pp +A better (race-free) script wrapper: +.Pp +.Dl #!/bin/sh -e +.Pp +.Dl exec 3<>/dev/fuse +.Dl FUSE_DEV_FD=3 fusexmp +.Dl mount_fusefs -S 3 /mnt/fuse \(lq$@\(rq +.Sh SEE ALSO +.Xr fstat 1 , +.Xr mount 8 , +.Xr umount 8 , +.Xr sudo 8 +.Sh CAVEATS +Secondary mounts are to be unmounted via their device name. If they attempted to be unmounted via +their filesystem root path, the unmount request will be forwarded to the primary mount path. +In general, unmounting by device name is less error-prone than by mount path +(although the latter will also work under normal circumstances). +.Pp +If the daemon is specified via the +.Fl D +and +.Fl O +options, it will be invoked via +.Xr system 3 , +and the daemon's command line will be also appended a +.Dq & +sygill, so that we don't have to wait for its termination. That is, you'd better +use a simple command line when invoking the daemon via these options. +.Sh HISTORY +.Nm +appears as the part of the FreeBSD implementation of the Fuse userspace filesystem +framework (see http://fuse.sourceforge.net). This user interface is FreeBSD specific. +.Sh BUGS +.Ar special +is treated as a multiplexer if and only if it's literally the same as +.Pa auto +or +.Pa /dev/fuse . +Other paths which are equivalent with +.Pa /dev/fuse +(eg., +.Pa /../dev/fuse ) +are not. Added: projects/fuse/sbin/mount_fusefs/mount_fusefs.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/fuse/sbin/mount_fusefs/mount_fusefs.c Thu Sep 20 15:50:27 2012 (r240752) @@ -0,0 +1,502 @@ +/*- + * Copyright (c) 2005 Jean-Sébastien Pédron + * Copyright (c) 2005 Csaba Henk + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "mntopts.h" + +#ifndef FUSE4BSD_VERSION +#define FUSE4BSD_VERSION "0.3.9-pre1" +#endif + +void __usage_short(void); +void usage(void); +void helpmsg(void); +void showversion(void); +int init_backgrounded(void); + +struct mntopt mopts[] = { + #define ALTF_PRIVATE 0x01 + { "private", 0, ALTF_PRIVATE, 1 }, + { "neglect_shares", 0, 0x02, 1 }, + { "push_symlinks_in", 0, 0x04, 1 }, + { "allow_other", 0, 0x08, 1 }, + { "default_permissions", 0, 0x10, 1 }, + #define ALTF_MAXREAD 0x20 + { "max_read=", 0, ALTF_MAXREAD, 1 }, + #define ALTF_SUBTYPE 0x40 + { "subtype=", 0, ALTF_SUBTYPE, 1 }, + #define ALTF_SYNC_UNMOUNT 0x80 + { "sync_unmount", 0, ALTF_SYNC_UNMOUNT, 1 }, + /* Linux specific options, we silently ignore them */ + { "fsname=", 0, 0x00, 1 }, + { "fd=", 0, 0x00, 1 }, + { "rootmode=", 0, 0x00, 1 }, + { "user_id=", 0, 0x00, 1 }, + { "group_id=", 0, 0x00, 1 }, + { "large_read", 0, 0x00, 1 }, + /* "nonempty", just the first two chars are stripped off during parsing */ + { "nempty", 0, 0x00, 1 }, + MOPT_STDOPTS, + MOPT_END +}; + +struct mntval { + int mv_flag; + void *mv_value; + int mv_len; +}; + +struct mntval mvals[] = { + { ALTF_MAXREAD, NULL, 0 }, + { ALTF_SUBTYPE, NULL, 0 }, + { 0, NULL, 0 } +}; + +char *progname; + +#define DEFAULT_MOUNT_FLAGS ALTF_PRIVATE | ALTF_SYNC_UNMOUNT + +int +main(int argc, char *argv[]) +{ + struct iovec *iov; + char ch = '\0'; + int mntflags, iovlen, verbose = 0; + char *dev = NULL, *dir = NULL, mntpath[MAXPATHLEN]; + char *devo = NULL, *diro = NULL; + char ndev[128], fdstr[15]; + int i, done = 0, reject_allow_other = 0, safe_level = 0; + int altflags = DEFAULT_MOUNT_FLAGS; + int __altflags = DEFAULT_MOUNT_FLAGS; + struct mntopt *mo; + struct mntval *mv; + static struct option longopts[] = { + {"reject-allow_other", no_argument, NULL, 'A'}, + {"safe", no_argument, NULL, 'S'}, + {"daemon", required_argument, NULL, 'D'}, + {"daemon_opts", required_argument, NULL, 'O'}, + {"special", required_argument, NULL, 's'}, + {"mountpath", required_argument, NULL, 'm'}, + {"version", no_argument, NULL, 'V'}, + {"help", no_argument, NULL, 'h'}, + {0,0,0,0} + }; + int pid = 0; + int fd = -1, fdx; + char *ep; + char *daemon_str = NULL, *daemon_opts = NULL; + + progname = argv[0]; + + /* + * We want a parsing routine which is not sensitive to + * the position of args/opts; it should extract the + * first two args and stop at the beginning of the rest. + * (This makes it easier to call mount_fusefs from external + * utils than it is with a strict "util flags args" syntax.) + */ + + iov = NULL; + iovlen = 0; + mntflags = 0; + /* All in all, I feel it more robust this way... */ + unsetenv("POSIXLY_CORRECT"); + if (getenv("MOUNT_FUSEFS_IGNORE_UNKNOWN")) + getmnt_silent = 1; + if (getenv("MOUNT_FUSEFS_VERBOSE")) + verbose = 1; + + do { + for (i = 0; i < 3; i++) { + if (optind < argc && argv[optind][0] != '-') { + if (dir) { + done = 1; + break; + } + if (dev) + dir = argv[optind]; + else + dev = argv[optind]; + optind++; + } + } + switch(ch) { + case 'A': + reject_allow_other = 1; + break; + case 'S': + safe_level = 1; + break; + case 'D': + if (daemon_str) + errx(1, "daemon specified inconsistently"); + daemon_str = optarg; + break; + case 'O': + if (daemon_opts) + errx(1, "daemon opts specified inconsistently"); + daemon_opts = optarg; + break; + case 'o': + getmntopts(optarg, mopts, &mntflags, &altflags); + for (mv = mvals; mv->mv_flag; ++mv) { + if (! (altflags & mv->mv_flag)) + continue; + for (mo = mopts; mo->m_flag; ++mo) { + char *p, *q; + + if (mo->m_flag != mv->mv_flag) + continue; + p = strstr(optarg, mo->m_option); + if (p) { + p += strlen(mo->m_option); + q = p; + while (*q != '\0' && *q != ',') + q++; + mv->mv_len = q - p + 1; + mv->mv_value = malloc(mv->mv_len); + memcpy(mv->mv_value, p, mv->mv_len - 1); + ((char *)mv->mv_value)[mv->mv_len - 1] = '\0'; + break; + } + } + } + break; + case 's': + if (devo) + errx(1, "special specified inconsistently"); + devo = optarg; + break; + case 'm': + if (diro) + errx(1, "mount path specified inconsistently"); + diro = optarg; + break; + case 'v': + verbose = 1; + break; + case 'h': + helpmsg(); + break; + case 'V': + showversion(); + break; + case '\0': + break; + case '?': + default: + usage(); + } + if (done) + break; + } while ((ch = getopt_long(argc, argv, "AvVho:SD:O:s:m:", longopts, NULL)) != -1); + + argc -= optind; + argv += optind; + + if (devo) { + if (dev) + errx(1, "special specified inconsistently"); + dev = devo; + } else if (diro) + errx(1, "if mountpoint is given via an option, special should also be given via an option"); + + if (diro) { + if (dir) + errx(1, "mount path specified inconsistently"); + dir = diro; + } + + if ((! dev) && argc > 0) { + dev = *argv++; + argc--; + } + + if ((! dir) && argc > 0) { + dir = *argv++; + argc--; + } + + if (! (dev && dir)) + errx(1, "missing special and/or mountpoint"); + + for (mo = mopts; mo->m_flag; ++mo) { + if (altflags & mo->m_flag) { + int iov_done = 0; + + if (reject_allow_other && + strcmp(mo->m_option, "allow_other") == 0) + /* + * reject_allow_other is stronger than a + * negative of allow_other: if this is set, + * allow_other is blocked, period. + */ + errx(1, "\"allow_other\" usage is banned by respective option"); + + for (mv = mvals; mv->mv_flag; ++mv) { + if (mo->m_flag != mv->mv_flag) + continue; + if (mv->mv_value) { + build_iovec(&iov, &iovlen, mo->m_option, mv->mv_value, mv->mv_len); + iov_done = 1; + break; + } + } + if (! iov_done) + build_iovec(&iov, &iovlen, mo->m_option, + __DECONST(void *, ""), -1); + } + if (__altflags & mo->m_flag) { + char *uscore_opt; + + if (asprintf(&uscore_opt, "__%s", mo->m_option) == -1) + err(1, "failed to allocate memory"); + build_iovec(&iov, &iovlen, uscore_opt, + __DECONST(void *, ""), -1); + free(uscore_opt); + } + } + + if (getenv("MOUNT_FUSEFS_SAFE")) + safe_level = 1; + + if (safe_level > 0 && (argc > 0 || daemon_str || daemon_opts)) + errx(1, "safe mode, spawning daemon not allowed"); + + if ((argc > 0 && (daemon_str || daemon_opts)) || + (daemon_opts && ! daemon_str)) + errx(1, "daemon specified inconsistently"); + + /* + * Resolve the mountpoint with realpath(3) and remove unnecessary + * slashes from the devicename if there are any. + */ + if (checkpath(dir, mntpath) != 0) + err(1, "%s", mntpath); + (void)rmslashes(dev, dev); + + if (strcmp(dev, "auto") == 0) + dev = __DECONST(char *, "/dev/fuse"); + + if (strcmp(dev, "/dev/fuse") == 0) { + if (! (argc > 0 || daemon_str)) { + fprintf(stderr, "Please also specify the fuse daemon to run when mounting via the multiplexer!\n"); + usage(); + } + if ((fd = open(dev, O_RDWR)) < 0) + err(1, "failed to open fuse device"); + } else { + fdx = strtol(dev, &ep, 10); + if (*ep == '\0') + fd = fdx; + } + + /* Identifying device */ + if (fd >= 0) { + struct stat sbuf; + char *ndevbas, *lep; + + if (fstat(fd, &sbuf) == -1) + err(1, "cannot stat device file descriptor"); + + strcpy(ndev, _PATH_DEV); + ndevbas = ndev + strlen(_PATH_DEV); + devname_r(sbuf.st_rdev, S_IFCHR, ndevbas, + sizeof(ndev) - strlen(_PATH_DEV)); + + if (strncmp(ndevbas, "fuse", 4)) + errx(1, "mounting inappropriate device"); + + strtol(ndevbas + 4, &lep, 10); + if (*lep != '\0') + errx(1, "mounting inappropriate device"); + + dev = ndev; + } + + if (argc > 0 || daemon_str) { + char *fds; + + if (fd < 0 && (fd = open(dev, O_RDWR)) < 0) + err(1, "failed to open fuse device"); + + if (asprintf(&fds, "%d", fd) == -1) + err(1, "failed to allocate memory"); + setenv("FUSE_DEV_FD", fds, 1); + free(fds); + setenv("FUSE_NO_MOUNT", "1", 1); + + if (daemon_str) { + char *bgdaemon; + int len; + + if (! daemon_opts) + daemon_opts = __DECONST(char *, ""); + + len = strlen(daemon_str) + 1 + strlen(daemon_opts) + + 2 + 1; + bgdaemon = calloc(1, len); + + if (! bgdaemon) + err(1, "failed to allocate memory"); + + strlcpy(bgdaemon, daemon_str, len); + strlcat(bgdaemon, " ", len); + strlcat(bgdaemon, daemon_opts, len); + strlcat(bgdaemon, " &", len); + + if (system(bgdaemon)) + err(1, "failed to call fuse daemon"); + } else { + if ((pid = fork()) < 0) + err(1, "failed to fork for fuse daemon"); + + if (pid == 0) { + execvp(argv[0], argv); + err(1, "failed to exec fuse daemon"); + } + } + } + + if (fd >= 0 && ! init_backgrounded() && close(fd) < 0) { + if (pid) + kill(pid, SIGKILL); + err(1, "failed to close fuse device"); + } + + /* Prepare the options vector for nmount(). build_iovec() is declared + * in mntopts.h. */ + sprintf(fdstr, "%d", fd); + build_iovec(&iov, &iovlen, "fstype", __DECONST(void *, "fusefs"), -1); + build_iovec(&iov, &iovlen, "fspath", mntpath, -1); + build_iovec(&iov, &iovlen, "from", dev, -1); + build_iovec(&iov, &iovlen, "fd", fdstr, -1); + + if (verbose) + fprintf(stderr, "mounting fuse daemon on device %s\n", dev); + + if (nmount(iov, iovlen, mntflags) < 0) + err(EX_OSERR, "%s on %s", dev, mntpath); + + exit(0); +} + +void +__usage_short(void) { + fprintf(stderr, + "usage:\n%s [-A|-S|-v|-V|-h|-D daemon|-O args|-s special|-m node|-o option...] special node [daemon args...]\n\n", + basename(progname)); +} + +void +usage(void) +{ + struct mntopt *mo; + + __usage_short(); + + fprintf(stderr, "known options:\n"); + for (mo = mopts; mo->m_flag; ++mo) + fprintf(stderr, "\t%s\n", mo->m_option); + + fprintf(stderr, "\n(use -h for a detailed description of these options)\n"); + exit(EX_USAGE); +} + +void +helpmsg(void) +{ + if (! getenv("MOUNT_FUSEFS_CALL_BY_LIB")) { + __usage_short(); + fprintf(stderr, "description of options:\n"); + } + + /* + * The main use case of this function is giving info embedded in general + * FUSE lib help output. Therefore the style and the content of the output + * tries to fit there as much as possible. + */ + fprintf(stderr, + " -o allow_other allow access to other users\n" + /* " -o nonempty allow mounts over non-empty file/dir\n" */ + " -o default_permissions enable permission checking by kernel\n" + /* + " -o fsname=NAME set filesystem name\n" + " -o large_read issue large read requests (2.4 only)\n" + */ + " -o subtype=NAME set filesystem type\n" + " -o max_read=N set maximum size of read requests\n" + " -o noprivate allow secondary mounting of the filesystem\n" + " -o neglect_shares don't report EBUSY when unmount attempted\n" + " in presence of secondary mounts\n" + " -o push_symlinks_in prefix absolute symlinks with mountpoint\n" + " -o sync_unmount do unmount synchronously\n" + ); + exit(EX_USAGE); +} + +void +showversion(void) +{ + puts("mount_fusefs [fuse4bsd] version: " FUSE4BSD_VERSION); + exit(EX_USAGE); +} + +int +init_backgrounded(void) +{ + int ibg; + size_t len; + + len = sizeof(ibg); + + if (sysctlbyname("vfs.fuse.init_backgrounded", &ibg, &len, NULL, 0)) + return (0); + + return (ibg); +} From owner-svn-src-projects@FreeBSD.ORG Thu Sep 20 15:53:56 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5DF1106566C; Thu, 20 Sep 2012 15:53:56 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC9708FC0C; Thu, 20 Sep 2012 15:53:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8KFruV0047198; Thu, 20 Sep 2012 15:53:56 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8KFru4Z047170; Thu, 20 Sep 2012 15:53:56 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201209201553.q8KFru4Z047170@svn.freebsd.org> From: Attilio Rao Date: Thu, 20 Sep 2012 15:53:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240753 - in projects/fuse: cddl/contrib/opensolaris/cmd/zfs cddl/sbin/zfs contrib/bind9 contrib/bind9/lib/dns contrib/bind9/lib/dns/include/dns contrib/bsnmp/snmpd contrib/libpcap lib/... X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2012 15:53:57 -0000 Author: attilio Date: Thu Sep 20 15:53:55 2012 New Revision: 240753 URL: http://svn.freebsd.org/changeset/base/240753 Log: MFC Added: projects/fuse/tools/build/options/WITHOUT_KDUMP - copied unchanged from r240752, head/tools/build/options/WITHOUT_KDUMP Modified: projects/fuse/cddl/contrib/opensolaris/cmd/zfs/zfs.8 projects/fuse/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c projects/fuse/cddl/sbin/zfs/Makefile projects/fuse/contrib/bind9/CHANGES projects/fuse/contrib/bind9/lib/dns/include/dns/rdata.h projects/fuse/contrib/bind9/lib/dns/master.c projects/fuse/contrib/bind9/lib/dns/rdata.c projects/fuse/contrib/bind9/lib/dns/rdataslab.c projects/fuse/contrib/bind9/version projects/fuse/contrib/bsnmp/snmpd/main.c projects/fuse/contrib/bsnmp/snmpd/trans_udp.c projects/fuse/contrib/libpcap/pcap-snoop.c projects/fuse/lib/libc/string/strsignal.c projects/fuse/lib/libc/sys/recv.2 projects/fuse/libexec/rtld-elf/rtld.c projects/fuse/rescue/rescue/Makefile projects/fuse/share/man/man4/Makefile projects/fuse/share/man/man4/ip.4 projects/fuse/share/man/man4/random.4 projects/fuse/share/man/man5/Makefile projects/fuse/share/man/man5/src.conf.5 projects/fuse/share/man/man7/development.7 projects/fuse/share/man/man9/vinvalbuf.9 projects/fuse/sys/cam/scsi/scsi_cd.c projects/fuse/sys/contrib/dev/acpica/changes.txt (contents, props changed) projects/fuse/sys/contrib/dev/acpica/common/dmrestag.c projects/fuse/sys/contrib/dev/acpica/compiler/aslcompile.c projects/fuse/sys/contrib/dev/acpica/compiler/aslcompiler.h projects/fuse/sys/contrib/dev/acpica/compiler/aslerror.c projects/fuse/sys/contrib/dev/acpica/compiler/aslfiles.c projects/fuse/sys/contrib/dev/acpica/compiler/aslfold.c projects/fuse/sys/contrib/dev/acpica/compiler/aslglobal.h projects/fuse/sys/contrib/dev/acpica/compiler/aslmain.c projects/fuse/sys/contrib/dev/acpica/compiler/aslmessages.h projects/fuse/sys/contrib/dev/acpica/compiler/asloperands.c projects/fuse/sys/contrib/dev/acpica/compiler/aslopt.c projects/fuse/sys/contrib/dev/acpica/compiler/aslstartup.c projects/fuse/sys/contrib/dev/acpica/compiler/aslsupport.l projects/fuse/sys/contrib/dev/acpica/compiler/asltypes.h projects/fuse/sys/contrib/dev/acpica/compiler/aslutils.c projects/fuse/sys/contrib/dev/acpica/compiler/dtio.c projects/fuse/sys/contrib/dev/acpica/compiler/preprocess.h projects/fuse/sys/contrib/dev/acpica/components/debugger/dbexec.c projects/fuse/sys/contrib/dev/acpica/components/debugger/dbinput.c projects/fuse/sys/contrib/dev/acpica/components/debugger/dbmethod.c projects/fuse/sys/contrib/dev/acpica/components/debugger/dbnames.c projects/fuse/sys/contrib/dev/acpica/components/debugger/dbstats.c projects/fuse/sys/contrib/dev/acpica/components/debugger/dbutils.c projects/fuse/sys/contrib/dev/acpica/components/disassembler/dmopcode.c projects/fuse/sys/contrib/dev/acpica/components/tables/tbinstal.c projects/fuse/sys/contrib/dev/acpica/components/tables/tbxface.c projects/fuse/sys/contrib/dev/acpica/include/acdebug.h projects/fuse/sys/contrib/dev/acpica/include/acpixf.h projects/fuse/sys/contrib/dev/acpica/include/actbl1.h projects/fuse/sys/contrib/ipfilter/netinet/ip_auth.c projects/fuse/sys/dev/ahci/ahci.c projects/fuse/sys/dev/alc/if_alc.c projects/fuse/sys/dev/amr/amr.c projects/fuse/sys/dev/ath/if_ath_tx.c projects/fuse/sys/dev/atkbdc/psm.c projects/fuse/sys/dev/cxgbe/osdep.h projects/fuse/sys/dev/e1000/if_em.c projects/fuse/sys/dev/isci/scil/scic_sds_phy.c projects/fuse/sys/dev/nvme/nvme.c projects/fuse/sys/dev/pci/pci.c projects/fuse/sys/dev/pci/pcireg.h projects/fuse/sys/dev/re/if_re.c projects/fuse/sys/dev/usb/serial/uftdi_reg.h projects/fuse/sys/dev/usb/usb_request.c projects/fuse/sys/fs/nfs/nfs.h projects/fuse/sys/fs/nfs/nfs_commonacl.c projects/fuse/sys/fs/nfs/nfs_commonsubs.c projects/fuse/sys/fs/nfs/nfs_var.h projects/fuse/sys/fs/nfsclient/nfs_clcomsubs.c projects/fuse/sys/fs/nfsserver/nfs_nfsdport.c projects/fuse/sys/net/if_lagg.c projects/fuse/sys/net/pfvar.h projects/fuse/sys/netinet/libalias/alias_skinny.c projects/fuse/sys/netpfil/pf/pf.c projects/fuse/sys/vm/vm_object.c projects/fuse/usr.sbin/pciconf/pciconf.c Directory Properties: projects/fuse/ (props changed) projects/fuse/cddl/contrib/opensolaris/ (props changed) projects/fuse/cddl/contrib/opensolaris/cmd/zfs/ (props changed) projects/fuse/contrib/bind9/ (props changed) projects/fuse/contrib/libpcap/ (props changed) projects/fuse/lib/libc/ (props changed) projects/fuse/share/man/man4/ (props changed) projects/fuse/sys/ (props changed) projects/fuse/sys/contrib/dev/acpica/ (props changed) projects/fuse/sys/contrib/dev/acpica/common/ (props changed) projects/fuse/sys/contrib/dev/acpica/compiler/ (props changed) projects/fuse/sys/contrib/dev/acpica/components/debugger/ (props changed) projects/fuse/sys/contrib/dev/acpica/components/disassembler/ (props changed) projects/fuse/sys/contrib/dev/acpica/components/tables/ (props changed) projects/fuse/sys/contrib/dev/acpica/include/ (props changed) Modified: projects/fuse/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- projects/fuse/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Thu Sep 20 15:50:27 2012 (r240752) +++ projects/fuse/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Thu Sep 20 15:53:55 2012 (r240753) @@ -256,10 +256,10 @@ .Op Ar snapshot Ns | Ns Ar filesystem .Nm .Cm jail -.Ar jailid filesystem +.Ar jailid Ns | Ns Ar jailname filesystem .Nm .Cm unjail -.Ar jailid filesystem +.Ar jailid Ns | Ns Ar jailname filesystem .Sh DESCRIPTION The .Nm Modified: projects/fuse/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- projects/fuse/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Thu Sep 20 15:50:27 2012 (r240752) +++ projects/fuse/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Thu Sep 20 15:53:55 2012 (r240753) @@ -240,9 +240,9 @@ get_usage(zfs_help_t idx) return (gettext("\tupgrade [-v]\n" "\tupgrade [-r] [-V version] <-a | filesystem ...>\n")); case HELP_JAIL: - return (gettext("\tjail \n")); + return (gettext("\tjail \n")); case HELP_UNJAIL: - return (gettext("\tunjail \n")); + return (gettext("\tunjail \n")); case HELP_LIST: return (gettext("\tlist [-rH][-d max] " "[-o property[,...]] [-t type[,...]] [-s property] ...\n" @@ -6300,9 +6300,9 @@ do_jail(int argc, char **argv, int attac usage(B_FALSE); } - jailid = atoi(argv[1]); - if (jailid == 0) { - (void) fprintf(stderr, gettext("invalid jailid\n")); + jailid = jail_getid(argv[1]); + if (jailid < 0) { + (void) fprintf(stderr, gettext("invalid jail id or name\n")); usage(B_FALSE); } Modified: projects/fuse/cddl/sbin/zfs/Makefile ============================================================================== --- projects/fuse/cddl/sbin/zfs/Makefile Thu Sep 20 15:50:27 2012 (r240752) +++ projects/fuse/cddl/sbin/zfs/Makefile Thu Sep 20 15:53:55 2012 (r240753) @@ -21,8 +21,8 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs -DPADD= ${LIBGEOM} ${LIBNVPAIR} ${LIBUMEM} \ +DPADD= ${LIBGEOM} ${LIBJAIL} ${LIBNVPAIR} ${LIBUMEM} \ ${LIBUTIL} ${LIBUUTIL} ${LIBZFS} -LDADD= -lgeom -lnvpair -lumem -lutil -luutil -lzfs +LDADD= -lgeom -ljail -lnvpair -lumem -lutil -luutil -lzfs .include Modified: projects/fuse/contrib/bind9/CHANGES ============================================================================== --- projects/fuse/contrib/bind9/CHANGES Thu Sep 20 15:50:27 2012 (r240752) +++ projects/fuse/contrib/bind9/CHANGES Thu Sep 20 15:53:55 2012 (r240753) @@ -1,3 +1,8 @@ + --- 9.8.3-P3 released --- + +3364. [security] Named could die on specially crafted record. + [RT #30416] + --- 9.8.3-P2 released --- 3346. [security] Bad-cache data could be used before it was Modified: projects/fuse/contrib/bind9/lib/dns/include/dns/rdata.h ============================================================================== --- projects/fuse/contrib/bind9/lib/dns/include/dns/rdata.h Thu Sep 20 15:50:27 2012 (r240752) +++ projects/fuse/contrib/bind9/lib/dns/include/dns/rdata.h Thu Sep 20 15:53:55 2012 (r240753) @@ -147,6 +147,17 @@ struct dns_rdata { (((rdata)->flags & ~(DNS_RDATA_UPDATE|DNS_RDATA_OFFLINE)) == 0) /* + * The maximum length of a RDATA that can be sent on the wire. + * Max packet size (65535) less header (12), less name (1), type (2), + * class (2), ttl(4), length (2). + * + * None of the defined types that support name compression can exceed + * this and all new types are to be sent uncompressed. + */ + +#define DNS_RDATA_MAXLENGTH 65512U + +/* * Flags affecting rdata formatting style. Flags 0xFFFF0000 * are used by masterfile-level formatting and defined elsewhere. * See additional comments at dns_rdata_tofmttext(). Modified: projects/fuse/contrib/bind9/lib/dns/master.c ============================================================================== --- projects/fuse/contrib/bind9/lib/dns/master.c Thu Sep 20 15:50:27 2012 (r240752) +++ projects/fuse/contrib/bind9/lib/dns/master.c Thu Sep 20 15:53:55 2012 (r240753) @@ -75,7 +75,7 @@ /*% * max message size - header - root - type - class - ttl - rdlen */ -#define MINTSIZ (65535 - 12 - 1 - 2 - 2 - 4 - 2) +#define MINTSIZ DNS_RDATA_MAXLENGTH /*% * Size for tokens in the presentation format, * The largest tokens are the base64 blocks in KEY and CERT records, Modified: projects/fuse/contrib/bind9/lib/dns/rdata.c ============================================================================== --- projects/fuse/contrib/bind9/lib/dns/rdata.c Thu Sep 20 15:50:27 2012 (r240752) +++ projects/fuse/contrib/bind9/lib/dns/rdata.c Thu Sep 20 15:53:55 2012 (r240753) @@ -429,6 +429,7 @@ dns_rdata_fromwire(dns_rdata_t *rdata, d isc_buffer_t st; isc_boolean_t use_default = ISC_FALSE; isc_uint32_t activelength; + size_t length; REQUIRE(dctx != NULL); if (rdata != NULL) { @@ -459,6 +460,14 @@ dns_rdata_fromwire(dns_rdata_t *rdata, d } /* + * Reject any rdata that expands out to more than DNS_RDATA_MAXLENGTH + * as we cannot transmit it. + */ + length = isc_buffer_usedlength(target) - isc_buffer_usedlength(&st); + if (result == ISC_R_SUCCESS && length > DNS_RDATA_MAXLENGTH) + result = DNS_R_FORMERR; + + /* * We should have consumed all of our buffer. */ if (result == ISC_R_SUCCESS && !buffer_empty(source)) @@ -466,8 +475,7 @@ dns_rdata_fromwire(dns_rdata_t *rdata, d if (rdata != NULL && result == ISC_R_SUCCESS) { region.base = isc_buffer_used(&st); - region.length = isc_buffer_usedlength(target) - - isc_buffer_usedlength(&st); + region.length = length; dns_rdata_fromregion(rdata, rdclass, type, ®ion); } @@ -602,6 +610,7 @@ dns_rdata_fromtext(dns_rdata_t *rdata, d unsigned long line; void (*callback)(dns_rdatacallbacks_t *, const char *, ...); isc_result_t tresult; + size_t length; REQUIRE(origin == NULL || dns_name_isabsolute(origin) == ISC_TRUE); if (rdata != NULL) { @@ -673,10 +682,13 @@ dns_rdata_fromtext(dns_rdata_t *rdata, d } } while (1); + length = isc_buffer_usedlength(target) - isc_buffer_usedlength(&st); + if (result == ISC_R_SUCCESS && length > DNS_RDATA_MAXLENGTH) + result = ISC_R_NOSPACE; + if (rdata != NULL && result == ISC_R_SUCCESS) { region.base = isc_buffer_used(&st); - region.length = isc_buffer_usedlength(target) - - isc_buffer_usedlength(&st); + region.length = length; dns_rdata_fromregion(rdata, rdclass, type, ®ion); } if (result != ISC_R_SUCCESS) { @@ -804,6 +816,7 @@ dns_rdata_fromstruct(dns_rdata_t *rdata, isc_buffer_t st; isc_region_t region; isc_boolean_t use_default = ISC_FALSE; + size_t length; REQUIRE(source != NULL); if (rdata != NULL) { @@ -818,10 +831,13 @@ dns_rdata_fromstruct(dns_rdata_t *rdata, if (use_default) (void)NULL; + length = isc_buffer_usedlength(target) - isc_buffer_usedlength(&st); + if (result == ISC_R_SUCCESS && length > DNS_RDATA_MAXLENGTH) + result = ISC_R_NOSPACE; + if (rdata != NULL && result == ISC_R_SUCCESS) { region.base = isc_buffer_used(&st); - region.length = isc_buffer_usedlength(target) - - isc_buffer_usedlength(&st); + region.length = length; dns_rdata_fromregion(rdata, rdclass, type, ®ion); } if (result != ISC_R_SUCCESS) Modified: projects/fuse/contrib/bind9/lib/dns/rdataslab.c ============================================================================== --- projects/fuse/contrib/bind9/lib/dns/rdataslab.c Thu Sep 20 15:50:27 2012 (r240752) +++ projects/fuse/contrib/bind9/lib/dns/rdataslab.c Thu Sep 20 15:53:55 2012 (r240753) @@ -305,6 +305,7 @@ dns_rdataslab_fromrdataset(dns_rdataset_ length = x[i].rdata.length; if (rdataset->type == dns_rdatatype_rrsig) length++; + INSIST(length <= 0xffff); *rawbuf++ = (length & 0xff00) >> 8; *rawbuf++ = (length & 0x00ff); #if DNS_RDATASET_FIXED Modified: projects/fuse/contrib/bind9/version ============================================================================== --- projects/fuse/contrib/bind9/version Thu Sep 20 15:50:27 2012 (r240752) +++ projects/fuse/contrib/bind9/version Thu Sep 20 15:53:55 2012 (r240753) @@ -7,4 +7,4 @@ MAJORVER=9 MINORVER=8 PATCHVER=3 RELEASETYPE=-P -RELEASEVER=2 +RELEASEVER=3 Modified: projects/fuse/contrib/bsnmp/snmpd/main.c ============================================================================== --- projects/fuse/contrib/bsnmp/snmpd/main.c Thu Sep 20 15:50:27 2012 (r240752) +++ projects/fuse/contrib/bsnmp/snmpd/main.c Thu Sep 20 15:53:55 2012 (r240753) @@ -1203,6 +1203,8 @@ snmpd_input(struct port_input *pi, struc ret = recv_stream(pi); } else { + struct in_addr *laddr; + memset(cbuf, 0, CMSG_SPACE(sizeof(struct in_addr))); msg.msg_control = cbuf; msg.msg_controllen = CMSG_SPACE(sizeof(struct in_addr)); @@ -1210,8 +1212,14 @@ snmpd_input(struct port_input *pi, struc cmsgp->cmsg_len = CMSG_LEN(sizeof(struct in_addr)); cmsgp->cmsg_level = IPPROTO_IP; cmsgp->cmsg_type = IP_SENDSRCADDR; + laddr = (struct in_addr *)CMSG_DATA(cmsgp); - ret = recv_dgram(pi, (struct in_addr *)CMSG_DATA(cmsgp)); + ret = recv_dgram(pi, laddr); + + if (laddr->s_addr == 0) { + msg.msg_control = NULL; + msg.msg_controllen = 0; + } } if (ret == -1) Modified: projects/fuse/contrib/bsnmp/snmpd/trans_udp.c ============================================================================== --- projects/fuse/contrib/bsnmp/snmpd/trans_udp.c Thu Sep 20 15:50:27 2012 (r240752) +++ projects/fuse/contrib/bsnmp/snmpd/trans_udp.c Thu Sep 20 15:53:55 2012 (r240753) @@ -109,13 +109,6 @@ udp_init_port(struct tport *tp) syslog(LOG_ERR, "creating UDP socket: %m"); return (SNMP_ERR_RES_UNAVAIL); } - if (setsockopt(p->input.fd, IPPROTO_IP, IP_RECVDSTADDR, &on, - sizeof(on)) == -1) { - syslog(LOG_ERR, "setsockopt(IP_RECVDSTADDR): %m"); - close(p->input.fd); - p->input.fd = -1; - return (SNMP_ERR_GENERR); - } ip = (p->addr[0] << 24) | (p->addr[1] << 16) | (p->addr[2] << 8) | p->addr[3]; memset(&addr, 0, sizeof(addr)); @@ -123,6 +116,14 @@ udp_init_port(struct tport *tp) addr.sin_port = htons(p->port); addr.sin_family = AF_INET; addr.sin_len = sizeof(addr); + if (addr.sin_addr.s_addr == INADDR_ANY && + setsockopt(p->input.fd, IPPROTO_IP, IP_RECVDSTADDR, &on, + sizeof(on)) == -1) { + syslog(LOG_ERR, "setsockopt(IP_RECVDSTADDR): %m"); + close(p->input.fd); + p->input.fd = -1; + return (SNMP_ERR_GENERR); + } if (bind(p->input.fd, (struct sockaddr *)&addr, sizeof(addr))) { if (errno == EADDRNOTAVAIL) { close(p->input.fd); Modified: projects/fuse/contrib/libpcap/pcap-snoop.c ============================================================================== --- projects/fuse/contrib/libpcap/pcap-snoop.c Thu Sep 20 15:50:27 2012 (r240752) +++ projects/fuse/contrib/libpcap/pcap-snoop.c Thu Sep 20 15:53:55 2012 (r240753) @@ -100,7 +100,7 @@ again: /* * XXX - Sigh, snoop_packetlen is a 16 bit quantity. If we - * got a short length, but read a full sized snoop pakcet, + * got a short length, but read a full sized snoop packet, * assume we overflowed and add back the 64K... */ if (cc == (p->snapshot + sizeof(struct snoopheader)) && Modified: projects/fuse/lib/libc/string/strsignal.c ============================================================================== --- projects/fuse/lib/libc/string/strsignal.c Thu Sep 20 15:50:27 2012 (r240752) +++ projects/fuse/lib/libc/string/strsignal.c Thu Sep 20 15:53:55 2012 (r240753) @@ -120,29 +120,29 @@ strsignal(int num) UPREFIX, #endif sizeof(sig_ebuf)); - } - signum = num; - if (num < 0) - signum = -signum; + signum = num; + if (num < 0) + signum = -signum; - t = tmp; - do { - *t++ = "0123456789"[signum % 10]; - } while (signum /= 10); - if (num < 0) - *t++ = '-'; + t = tmp; + do { + *t++ = "0123456789"[signum % 10]; + } while (signum /= 10); + if (num < 0) + *t++ = '-'; - p = (ebuf + n); - *p++ = ':'; - *p++ = ' '; + p = (ebuf + n); + *p++ = ':'; + *p++ = ' '; - for (;;) { - *p++ = *--t; - if (t <= tmp) - break; + for (;;) { + *p++ = *--t; + if (t <= tmp) + break; + } + *p = '\0'; } - *p = '\0'; #if defined(NLS) catclose(catd); Modified: projects/fuse/lib/libc/sys/recv.2 ============================================================================== --- projects/fuse/lib/libc/sys/recv.2 Thu Sep 20 15:50:27 2012 (r240752) +++ projects/fuse/lib/libc/sys/recv.2 Thu Sep 20 15:53:55 2012 (r240753) @@ -44,7 +44,7 @@ .Ft ssize_t .Fn recv "int s" "void *buf" "size_t len" "int flags" .Ft ssize_t -.Fn recvfrom "int s" "void * restrict buf" "size_t len" "int flags" "struct sockaddr * restrict from" "socklen_t * restrict fromlen" +.Fn recvfrom "int s" "void *buf" "size_t len" "int flags" "struct sockaddr * restrict from" "socklen_t * restrict fromlen" .Ft ssize_t .Fn recvmsg "int s" "struct msghdr *msg" "int flags" .Sh DESCRIPTION Modified: projects/fuse/libexec/rtld-elf/rtld.c ============================================================================== --- projects/fuse/libexec/rtld-elf/rtld.c Thu Sep 20 15:50:27 2012 (r240752) +++ projects/fuse/libexec/rtld-elf/rtld.c Thu Sep 20 15:53:55 2012 (r240753) @@ -1429,7 +1429,7 @@ find_library(const char *xname, const Ob { char *pathname; char *name; - bool objgiven; + bool nodeflib, objgiven; objgiven = refobj != NULL; if (strchr(xname, '/') != NULL) { /* Hard coded pathname */ @@ -1464,6 +1464,7 @@ find_library(const char *xname, const Ob (pathname = search_library_path(name, STANDARD_LIBRARY_PATH)) != NULL) return (pathname); } else { + nodeflib = objgiven ? refobj->z_nodeflib : false; if ((objgiven && (pathname = search_library_path(name, refobj->rpath)) != NULL) || (objgiven && refobj->runpath == NULL && refobj != obj_main && @@ -1471,9 +1472,8 @@ find_library(const char *xname, const Ob (pathname = search_library_path(name, ld_library_path)) != NULL || (objgiven && (pathname = search_library_path(name, refobj->runpath)) != NULL) || - (pathname = search_library_path(name, gethints(refobj->z_nodeflib))) - != NULL || - (objgiven && !refobj->z_nodeflib && + (pathname = search_library_path(name, gethints(nodeflib))) != NULL || + (objgiven && !nodeflib && (pathname = search_library_path(name, STANDARD_LIBRARY_PATH)) != NULL)) return (pathname); } Modified: projects/fuse/rescue/rescue/Makefile ============================================================================== --- projects/fuse/rescue/rescue/Makefile Thu Sep 20 15:50:27 2012 (r240752) +++ projects/fuse/rescue/rescue/Makefile Thu Sep 20 15:53:55 2012 (r240753) @@ -123,7 +123,7 @@ CRUNCH_LIBS+= -lalias -lcam -lcurses -ld CRUNCH_LIBS+= -lipx .endif .if ${MK_ZFS} != "no" -CRUNCH_LIBS+= -lavl -lzfs -lnvpair -lpthread -luutil -lumem +CRUNCH_LIBS+= -lavl -ljail -lzfs -lnvpair -lpthread -luutil -lumem .endif CRUNCH_LIBS+= -lgeom -lbsdxml -lkiconv -lmd -lsbuf -lufs -lz Modified: projects/fuse/share/man/man4/Makefile ============================================================================== --- projects/fuse/share/man/man4/Makefile Thu Sep 20 15:50:27 2012 (r240752) +++ projects/fuse/share/man/man4/Makefile Thu Sep 20 15:53:55 2012 (r240753) @@ -1,6 +1,8 @@ # @(#)Makefile 8.1 (Berkeley) 6/18/93 # $FreeBSD$ +.include + MAN= aac.4 \ acpi.4 \ ${_acpi_asus.4} \ @@ -354,9 +356,9 @@ MAN= aac.4 \ pcii.4 \ pcm.4 \ pcn.4 \ - pf.4 \ - pflog.4 \ - pfsync.4 \ + ${_pf.4} \ + ${_pflog.4} \ + ${_pfsync.4} \ pim.4 \ polling.4 \ ppbus.4 \ @@ -798,4 +800,10 @@ _nvram2env.4= nvram2env.4 SUBDIR= man4.${MACHINE_CPUARCH} .endif +.if ${MK_PF} != "no" +_pf.4= pf.4 +_pflog.4= pflog.4 +_pfsync.4= pfsync.4 +.endif + .include Modified: projects/fuse/share/man/man4/ip.4 ============================================================================== --- projects/fuse/share/man/man4/ip.4 Thu Sep 20 15:50:27 2012 (r240752) +++ projects/fuse/share/man/man4/ip.4 Thu Sep 20 15:53:55 2012 (r240753) @@ -32,7 +32,7 @@ .\" @(#)ip.4 8.2 (Berkeley) 11/30/93 .\" $FreeBSD$ .\" -.Dd September 12, 2012 +.Dd September 20, 2012 .Dt IP 4 .Os .Sh NAME @@ -187,21 +187,19 @@ cmsg_level = IPPROTO_IP cmsg_type = IP_SENDSRCADDR .Ed .Pp -The socket should be bound to a local port. -The socket may be bound or not bound to a local address. -In the former case address supplied with -.Dv IP_SENDSRCADDR -overrides bound address. -If the socket is bound to a local address and the address supplied with +The socket should be either bound to +.Dv INADDR_ANY +and a local port, and the address supplied with .Dv IP_SENDSRCADDR -is +should't be .Dv INADDR_ANY , -then bound address is overriden via generic source address selection logic, -which would choose IP address of interface closest to destination. -If the socket is not bound to a local address, then address supplied with +or the socket should be bound to a local address and the address supplied with .Dv IP_SENDSRCADDR -can't be +should be .Dv INADDR_ANY . +In the latter case bound address is overriden via generic source address +selection logic, which would choose IP address of interface closest to +destination. .Pp For convenience, .Dv IP_SENDSRCADDR Modified: projects/fuse/share/man/man4/random.4 ============================================================================== --- projects/fuse/share/man/man4/random.4 Thu Sep 20 15:50:27 2012 (r240752) +++ projects/fuse/share/man/man4/random.4 Thu Sep 20 15:53:55 2012 (r240753) @@ -315,11 +315,16 @@ and is an implementation of the .Em Yarrow algorithm by Bruce Schneier, .Em et al . -The only hardware implementation -currently is for the +The only hardware implementations +currently are for the .Tn VIA C3 Nehemiah (stepping 3 or greater) -CPU. +CPU +and the +.Tn Intel +.Dq Bull Mountain +.Em RdRand +instruction and underlying random number generator (RNG). More will be added in the future. .Pp The author gratefully acknowledges Modified: projects/fuse/share/man/man5/Makefile ============================================================================== --- projects/fuse/share/man/man5/Makefile Thu Sep 20 15:50:27 2012 (r240752) +++ projects/fuse/share/man/man5/Makefile Thu Sep 20 15:53:55 2012 (r240753) @@ -50,8 +50,6 @@ MAN= acct.5 \ passwd.5 \ pbm.5 \ periodic.conf.5 \ - pf.conf.5 \ - pf.os.5 \ phones.5 \ portindex.5 \ portsnap.conf.5 \ @@ -91,6 +89,11 @@ MAN+= hesiod.conf.5 MAN+= nandfs.5 .endif +.if ${MK_PF} != "no" +MAN+= pf.conf.5 \ + pf.os.5 +.endif + .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" _boot.config.5= boot.config.5 .endif Modified: projects/fuse/share/man/man5/src.conf.5 ============================================================================== --- projects/fuse/share/man/man5/src.conf.5 Thu Sep 20 15:50:27 2012 (r240752) +++ projects/fuse/share/man/man5/src.conf.5 Thu Sep 20 15:53:55 2012 (r240753) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 236279 2012-05-30 02:37:20Z gjb .\" $FreeBSD$ -.Dd September 8, 2012 +.Dd September 19, 2012 .Dt SRC.CONF 5 .Os .Sh NAME @@ -551,6 +551,12 @@ Set to build some programs without IPX s .\" from FreeBSD: head/tools/build/options/WITHOUT_JAIL 183242 2008-09-21 22:02:26Z sam Set to not build tools for the support of jails; e.g. .Xr jail 8 . +.It Va WITHOUT_KDUMP +.\" $FreeBSD$ +Set to not build +.Xr kdump 1 +and +.Xr truss 1 . .It Va WITHOUT_KERBEROS .\" from FreeBSD: head/tools/build/options/WITHOUT_KERBEROS 174549 2007-12-12 16:42:03Z ru Set this if you do not want to build Kerberos 5 (KTH Heimdal). Modified: projects/fuse/share/man/man7/development.7 ============================================================================== --- projects/fuse/share/man/man7/development.7 Thu Sep 20 15:50:27 2012 (r240752) +++ projects/fuse/share/man/man7/development.7 Thu Sep 20 15:53:55 2012 (r240753) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 2, 2012 +.Dd September 19, 2012 .Dt DEVELOPMENT 7 .Os .Sh NAME @@ -48,7 +48,7 @@ kernel. The methods described here are as applicable to production installations as it is to development environments. -You need a good 12-17GB of disk space on one machine to make this work +You need approximately 10GB of disk space on one machine to make this work conveniently. .Sh SETTING UP THE ENVIRONMENT ON THE MASTER SERVER Your master server should always run a stable, production version of the @@ -62,9 +62,9 @@ where you lose the environment and/or ca .Pp Create a huge partition called .Pa /FreeBSD . -8-12GB is recommended. +Approximately 7GB is recommended. This partition will contain nearly all the development environment, -including the CVS tree, broken-out source, and possibly even object files. +including the subversion tree, broken-out source, and possibly even object files. You are going to export this partition to your other machines via a READ-ONLY NFS export so do not mix it with other more security-sensitive partitions. @@ -89,70 +89,19 @@ I recommend a partition of at least 5GB. .Pp On the master server, use -.Xr csup 1 -to automatically pull down and maintain +.Xr svn 1 +to pull down and maintain the .Fx -CVS archive once a day. +source. The first pull will take a long time, it is several gigabytes, but once you have it, -the daily synchronizations will be quite small. -.Bd -literal -offset 4n -mkdir /FreeBSD/FreeBSD-CVS -rm -rf /home/ncvs -ln -s /FreeBSD/FreeBSD-CVS /home/ncvs -.Ed -.Pp -The -.Xr cron 8 -job should look something like this (please randomize the time of -day!). -Note that you can use the -.Xr csup 1 -configuration file example directly from -.Pa /usr/share/examples -without modification by supplying appropriate arguments -to -.Xr csup 1 . -.Bd -literal -offset 4n -33 6 * * * /usr/bin/csup -r 20 -L 2 -h cvsup.freebsd.org /usr/share/examples/cvsup/cvs-supfile -.Ed -.Pp -Run the -.Xr csup 1 -manually the first time to pull down the archive. -It could take -all day depending on how fast your connection is! -You will run all -.Xr csup 1 -and -.Xr cvs 1 +the updates will be quite small. +Run all +.Xr svn 1 operations as .Dq Li root -and you need to set up a -.Pa ~/.cvsrc -.Pq Pa /root/.cvsrc -file, as shown below, for proper -.Xr cvs 1 -operation. -Using -.Pa ~/.cvsrc -to specify -.Xr cvs 1 -defaults is an excellent way to -.Dq "file and forget" , -but you should never forget that you put them in there. -.Bd -literal -offset 4n -# cvs -q -diff -u -update -Pd -checkout -P -.Ed -.Pp -Now use -.Xr cvs 1 -to check out a -STABLE source tree and a -CURRENT source tree, -as well as ports and docs, to create your initial source environment. +.Pp Keeping the broken-out source and ports in .Pa /FreeBSD allows you to export @@ -160,71 +109,16 @@ it to other machines via read-only NFS. This also means you only need to edit/maintain files in one place and all your clients automatically pick up the changes. .Bd -literal -offset 4n -mkdir /FreeBSD/FreeBSD-4.x -mkdir /FreeBSD/FreeBSD-current - -cd /FreeBSD/FreeBSD-4.x -cvs -d /home/ncvs checkout -rRELENG_4 src - -cd /FreeBSD/FreeBSD-current -cvs -d /home/ncvs checkout src -cvs -d /home/ncvs checkout ports -cvs -d /home/ncvs checkout doc -.Ed -.Pp -Now create a softlink for -.Pa /usr/src -and -.Pa /usr/src2 . -On the main server I always point -.Pa /usr/src -at -STABLE and -.Pa /usr/src2 -at -CURRENT. -On client machines I usually do not have a -.Pa /usr/src2 -and I make -.Pa /usr/src -point at whatever version of -.Fx -the client box is intended to -run. -.Bd -literal -offset 4n +mkdir /FreeBSD +cd /FreeBSD +svn co svn://svn.freebsd.org/ports/head ports +svn co svn://svn.freebsd.org/doc/head doc +svn co svn://svn.freebsd.org/base/head src cd /usr -rm -rf src src2 -ln -s /FreeBSD/FreeBSD-4.x/src src (could be -CURRENT on a client) -ln -s /FreeBSD/FreeBSD-current/src src2 (MASTER SERVER ONLY) +rm -rf src +ln -s /FreeBSD/src src .Ed .Pp -Now you have to make a choice for -.Pa /usr/obj . -Well, hopefully you made it already and chose the partition method. -If you -chose poorly you probably intend to put it in -.Pa /FreeBSD -and, if so, this is -what you want to do: -.Bd -literal -offset 4n -(ONLY IF YOU MADE A POOR CHOICE AND PUT /usr/obj in /FreeBSD!) -mkdir /FreeBSD/obj -cd /usr -rm -rf obj -ln -s /FreeBSD/obj obj -.Ed -.Pp -Alternatively you may chose simply to leave -.Pa /usr/obj -in -.Pa /usr . -If your -.Pa /usr -is large enough this will work, but I do not recommend it for -safety reasons -.Pa ( /usr/obj -is constantly being modified, -.Pa /usr -is not). -.Pp Note that exporting .Pa /usr/obj via read-only NFS to your other boxes will @@ -240,19 +134,17 @@ problems and issues down the line and pr It is far easier to do builds on the master server and then only do installs on the clients. .Pp -I usually maintain my ports tree via CVS. -It is sitting right there in the master CVS archive and I have even told you -to check it out (see above). +I usually maintain my ports tree via svn or portsnap. With some fancy softlinks you can make the ports tree available both on your master server and on all of your other machines. -Note that the ports tree exists only on the HEAD CVS branch, so its always --CURRENT even on a -STABLE box. +Note that the ports tree exists only on the HEAD ports branch, so its always +usable even on a -STABLE box. This is what you do: .Bd -literal -offset 4n (THESE COMMANDS ON THE MASTER SERVER AND ON ALL CLIENTS) cd /usr rm -rf ports -ln -s /FreeBSD/FreeBSD-current/ports ports +ln -s /FreeBSD/ports ports cd /usr/ports (this pushes into the softlink) rm -rf distfiles (ON MASTER SERVER ONLY) @@ -344,7 +236,7 @@ into the NFS-mounted environment. If a particular client is running -CURRENT, .Pa /usr/src should be a softlink to -.Pa /FreeBSD/FreeBSD-current/src . +.Pa /FreeBSD/src . If it is running -STABLE, .Pa /usr/src should be a softlink to @@ -359,8 +251,8 @@ human variety) on a client. (ON EACH CLIENT) cd /usr rm -rf ports src -ln -s /FreeBSD/FreeBSD-current/ports ports -ln -s /FreeBSD/FreeBSD-XXX/src src +ln -s /FreeBSD/ports ports +ln -s /FreeBSD/src src .Ed .Pp Do not forget to create the working directories so you can build ports, as @@ -521,11 +413,6 @@ subdirectory in which is typically local to the client. You can then do builds to your heart's content! .Sh MAINTAINING A LOCAL BRANCH -I have described how to maintain two versions of the source tree, a stable -version in -.Pa /FreeBSD/FreeBSD-4.x -and a current version in -.Pa /FreeBSD/FreeBSD-current . There is absolutely nothing preventing you from breaking out other versions of the source tree into @@ -548,135 +435,32 @@ which can build those other operating sy Many developers choose to maintain a local branch of .Fx to test patches or build a custom distribution. -This can be done with CVS or another source code management system -(SubVersion, Perforce, BitKeeper) with its own repository. -Since the main -.Fx -tree is based on CVS, the former is convenient. -.Pp -First, you need to modify your -.Xr csup 1 -environment to avoid it modifying -the local changes you have committed to the repository. -It is important to remove the -.Ic delete -keyword from your -.Pa supfile -and to add the -.Pa CVSROOT -subdirectory to your -.Pa refuse -file. -For more information, see -.Xr csup 1 . -.Pp -The -.Fx -version of -.Xr cvs 1 -examines a custom environmental variable, -.Ev CVS_LOCAL_BRANCH_NUM , -which specifies an integer to use when doing a -.Xr cvs 1 -.Cm tag Ns / Ns Cm rtag . -Set this number to something high (say 1000) to avoid colliding -with potential future branches of the main repository. -For example, -branching a file with version 1.4 produces 1.4.1000. -Future commits to this branch will produce revisions 1.4.1000.1, -1.4.1000.2, etc. -.Pp -To fork your local branch, do: -.Bd -literal -offset 4n -cvs rtag -r RELENG_4 -b LOCAL_RELENG_4 src -.Ed -.Pp -After this, you can check out a copy from your local repository using the -new tag and begin making changes and committing them. -For more information on using CVS, see -.Xr cvs 1 . -.Pp -.Sy WARNING! -The -.Xr csup 1 -utility may blow away changes made on a local branch in -some situations. -This has been reported to occur when the master CVS repository is -directly manipulated or an RCS file is changed. -At this point, -.Xr csup 1 -notices that the client and server have entirely -different RCS files, so it does a full replace instead of trying to -send just deltas. -Ideally this situation should never arise, but in the real world it -happens all the time. -.Pp -While this is the only scenario where the problem should crop up, -there have been some suspicious-sounding reports of -.Ev CVS_LOCAL_BRANCH_NUM -lossage that cannot be explained by this alone. -Bottom line is, if you value your local branch then you -should back it up before every update. -.Sh UPDATING VIA CVS -The advantage of using -.Xr csup 1 -to maintain an updated copy of the CVS -repository instead of using it to maintain source trees directly is that you -can then pick and choose when you bring your source tree (or pieces of your -source tree) up to date. +This can be done with svn or another source code management system +(git, mercurial, Perforce, BitKeeper) with its own repository. +.Sh "UPDATING VIA SVN" By using a .Xr cron 8 -job to maintain an updated CVS repository, you can update -your source tree at any time without any network cost as follows: +job to maintain an updated svn repository, +the source tree can be +updated at any time as follows: .Bd -literal -offset 4n (on the main development server) -cd /usr/src -cvs -d /home/ncvs update -cd /usr/src2 -cvs -d /home/ncvs update -cd /usr/ports -cvs -d /home/ncvs update +cd /usr +svn update src doc ports .Ed .Pp It is that simple, and since you are exporting the whole lot to your clients, your clients have immediate visibility into the updated source. This is a good time to also remind you that most of the -.Xr cvs 1 +.Xr svn 1 operations you do will be done as -.Dq Li root , -and that certain options are -required for CVS to operate properly on the -.Fx -repository. -For example, -.Fl Pd -is necessary when running -.Nm cvs Cm update . -These options are typically placed in your -.Pa ~/.cvsrc -(as already described) -so you do not have to re-specify them every time you run a -.Xr cvs 1 -command. -Maintaining the CVS repository also gives you far more flexibility -in regards to breaking out multiple versions of the source tree. +.Dq Li root . It is a good idea to give your .Pa /FreeBSD partition a lot of space (I recommend -8-12GB) precisely for that reason. -If you can make it 15GB I would do it. +10-15GB) precisely for that reason. .Pp -I generally do not -.Nm cvs Cm update -via a -.Xr cron 8 -job. -This is because I generally want the source to not change out from under me -when I am developing code. -Instead I manually update the source every so often...\& when I feel it is -a good time. -My recommendation is to only keep the CVS repository synchronized via .Xr cron 8 . .Sh SEE ALSO .Xr crontab 1 , @@ -696,3 +480,9 @@ and first appeared in .Fx 5.0 , December 2002. +It was since extensively modified by +.An Eitan Adler Aq eadler@FreeBSD.org +to reflect the repository conversion from +.Xr cvs +to +.Xr svn . Modified: projects/fuse/share/man/man9/vinvalbuf.9 ============================================================================== --- projects/fuse/share/man/man9/vinvalbuf.9 Thu Sep 20 15:50:27 2012 (r240752) +++ projects/fuse/share/man/man9/vinvalbuf.9 Thu Sep 20 15:53:55 2012 (r240753) @@ -110,8 +110,6 @@ set in .Fa slpflag ) .El .Sh SEE ALSO -.Xr brelse 9 , -.Xr bremfree 9 , .Xr tsleep 9 , .Xr VOP_FSYNC 9 .Sh AUTHORS Modified: projects/fuse/sys/cam/scsi/scsi_cd.c ============================================================================== --- projects/fuse/sys/cam/scsi/scsi_cd.c Thu Sep 20 15:50:27 2012 (r240752) +++ projects/fuse/sys/cam/scsi/scsi_cd.c Thu Sep 20 15:53:55 2012 (r240753) @@ -2080,6 +2080,7 @@ cdioctl(struct disk *dp, u_long cmd, voi || (st > (softc->toc.header.ending_track - softc->toc.header.starting_track))) { error = EINVAL; + cam_periph_unlock(periph); break; } sentry = &softc->toc.entries[st].addr; Modified: projects/fuse/sys/contrib/dev/acpica/changes.txt ============================================================================== --- projects/fuse/sys/contrib/dev/acpica/changes.txt Thu Sep 20 15:50:27 2012 (r240752) +++ projects/fuse/sys/contrib/dev/acpica/changes.txt Thu Sep 20 15:53:55 2012 (r240753) @@ -1,4 +1,75 @@ ---------------------------------------- +13 September 2012. Summary of changes for version 20120913: + +This release is available at https://www.acpica.org/downloads The ACPI 5.0 +specification is available at www.acpi.info + +1) ACPICA Kernel-resident Subsystem: + +ACPI 5.0: Added two new notify types for the Hardware Error Notification +Structure within the Hardware Error Source Table (HEST) table -- CMCI(5) and +MCE(6). + +Table Manager: Merged/removed duplicate code in the root table resize +functions. One function is external, the other is internal. Lv Zheng, ACPICA +BZ 846. + +Makefiles: Completely removed the obsolete "Linux" makefiles under +acpica/generate/linux. These makefiles are obsolete and have been replaced by +the generic unix makefiles under acpica/generate/unix. + +Makefiles: Ensure that binary files always copied properly. Minor rule change +to ensure that the final binary output files are always copied up to the +appropriate binary directory (bin32 or bin64.) + +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. + + Previous Release: + Non-Debug Version: 93.8K Code, 25.3K Data, 119.1K Total + Debug Version: 175.7K Code, 74.8K Data, 250.5K Total + Current Release: + Non-Debug Version: 93.7K Code, 25.3K Data, 119.0K Total + Debug Version: 175.0K Code, 74.4K Data, 249.4K Total + + +2) iASL Compiler/Disassembler and Tools: + +Disassembler: Fixed a possible fault during the disassembly of resource +descriptors when a second parse is required because of the invocation of +external control methods within the table. With assistance from +adq@lidskialf.net. ACPICA BZ 976. + +iASL: Fixed a namepath optimization problem. An error can occur if the parse +node that contains the namepath to be optimized does not have a parent node +that is a named object. This change fixes the problem. + +iASL: Fixed a regression where the AML file is not deleted on errors. The AML +output file should be deleted if there are any errors during the compiler. The +only exception is if the -f (force output) option is used. ACPICA BZ 974. + +iASL: Added a feature to automatically increase internal line buffer sizes. +Via realloc(), automatically increase the internal line buffer sizes as +necessary to support very long source code lines. The current version of the +preprocessor requires a buffer long enough to contain full source code lines. +This change increases the line buffer(s) if the input lines go beyond the +current buffer size. This eliminates errors that occurred when a source code *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Thu Sep 20 16:36:59 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 86EB9106566B; Thu, 20 Sep 2012 16:36:59 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 713A38FC08; Thu, 20 Sep 2012 16:36:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8KGaxsY053857; Thu, 20 Sep 2012 16:36:59 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8KGaxns053852; Thu, 20 Sep 2012 16:36:59 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201209201636.q8KGaxns053852@svn.freebsd.org> From: Brooks Davis Date: Thu, 20 Sep 2012 16:36:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240756 - projects/mtree/contrib/mtree X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2012 16:36:59 -0000 Author: brooks Date: Thu Sep 20 16:36:58 2012 New Revision: 240756 URL: http://svn.freebsd.org/changeset/base/240756 Log: Implement FreeBSD's -i option as -j (-i is taken). Modified: projects/mtree/contrib/mtree/create.c projects/mtree/contrib/mtree/extern.h projects/mtree/contrib/mtree/mtree.8 projects/mtree/contrib/mtree/mtree.c Modified: projects/mtree/contrib/mtree/create.c ============================================================================== --- projects/mtree/contrib/mtree/create.c Thu Sep 20 16:27:21 2012 (r240755) +++ projects/mtree/contrib/mtree/create.c Thu Sep 20 16:36:58 2012 (r240756) @@ -84,10 +84,10 @@ static mode_t mode; static u_long flags; static int dcmp(const FTSENT * const *, const FTSENT * const *); -static void output(int *, const char *, ...) - __attribute__((__format__(__printf__, 2, 3))); +static void output(int, int *, const char *, ...) + __attribute__((__format__(__printf__, 3, 4))); static int statd(FTS *, FTSENT *, uid_t *, gid_t *, mode_t *, u_long *); -static void statf(FTSENT *); +static void statf(int, FTSENT *); void cwalk(void) @@ -99,6 +99,7 @@ cwalk(void) const char *user; char *argv[2]; char dot[] = "."; + int indent = 0; argv[0] = dot; argv[1] = NULL; @@ -121,6 +122,8 @@ cwalk(void) if ((t = fts_open(argv, ftsoptions, dcmp)) == NULL) mtree_err("fts_open: %s", strerror(errno)); while ((p = fts_read(t)) != NULL) { + if (jflag) + indent = p->fts_level * 4; if (check_excludes(p->fts_name, p->fts_path)) { fts_set(t, p, FTS_SKIP); continue; @@ -130,11 +133,12 @@ cwalk(void) if (!nflag) printf("\n# %s\n", p->fts_path); statd(t, p, &uid, &gid, &mode, &flags); - statf(p); + statf(indent, p); break; case FTS_DP: if (!nflag && p->fts_level > 0) - printf("# %s\n..\n\n", p->fts_path); + printf("%*s# %s\n..\n\n", indent, "", + p->fts_path); break; case FTS_DNR: case FTS_ERR: @@ -144,7 +148,7 @@ cwalk(void) break; default: if (!dflag) - statf(p); + statf(indent, p); break; } @@ -155,56 +159,59 @@ cwalk(void) } static void -statf(FTSENT *p) +statf(int indent, FTSENT *p) { u_int32_t len, val; - int fd, indent; + int fd, offset; const char *name; #if !defined(NO_MD5) || !defined(NO_RMD160) || !defined(NO_SHA1) || !defined(NO_SHA2) char *digestbuf; #endif - indent = printf("%s%s", + offset = printf("%*s%s%s", indent, "", S_ISDIR(p->fts_statp->st_mode) ? "" : " ", vispath(p->fts_name)); - if (indent > INDENTNAMELEN) - indent = MAXLINELEN; + if (offset > (INDENTNAMELEN + indent)) + offset = MAXLINELEN; else - indent += printf("%*s", INDENTNAMELEN - indent, ""); + offset += printf("%*s", (INDENTNAMELEN + indent) - offset, ""); if (!S_ISREG(p->fts_statp->st_mode)) - output(&indent, "type=%s", inotype(p->fts_statp->st_mode)); + output(indent, &offset, "type=%s", + inotype(p->fts_statp->st_mode)); if (keys & (F_UID | F_UNAME) && p->fts_statp->st_uid != uid) { if (keys & F_UNAME && (name = user_from_uid(p->fts_statp->st_uid, 1)) != NULL) - output(&indent, "uname=%s", name); + output(indent, &offset, "uname=%s", name); else /* if (keys & F_UID) */ - output(&indent, "uid=%u", p->fts_statp->st_uid); + output(indent, &offset, "uid=%u", p->fts_statp->st_uid); } if (keys & (F_GID | F_GNAME) && p->fts_statp->st_gid != gid) { if (keys & F_GNAME && (name = group_from_gid(p->fts_statp->st_gid, 1)) != NULL) - output(&indent, "gname=%s", name); + output(indent, &offset, "gname=%s", name); else /* if (keys & F_GID) */ - output(&indent, "gid=%u", p->fts_statp->st_gid); + output(indent, &offset, "gid=%u", p->fts_statp->st_gid); } if (keys & F_MODE && (p->fts_statp->st_mode & MBITS) != mode) - output(&indent, "mode=%#o", p->fts_statp->st_mode & MBITS); + output(indent, &offset, "mode=%#o", + p->fts_statp->st_mode & MBITS); if (keys & F_DEV && (S_ISBLK(p->fts_statp->st_mode) || S_ISCHR(p->fts_statp->st_mode))) - output(&indent, "device=%#llx", + output(indent, &offset, "device=%#llx", (long long)p->fts_statp->st_rdev); if (keys & F_NLINK && p->fts_statp->st_nlink != 1) - output(&indent, "nlink=%u", p->fts_statp->st_nlink); + output(indent, &offset, "nlink=%u", p->fts_statp->st_nlink); if (keys & F_SIZE && S_ISREG(p->fts_statp->st_mode)) - output(&indent, "size=%lld", (long long)p->fts_statp->st_size); + output(indent, &offset, "size=%lld", + (long long)p->fts_statp->st_size); if (keys & F_TIME) #if defined(BSD4_4) && !defined(HAVE_NBTOOL_CONFIG_H) - output(&indent, "time=%ld.%ld", + output(indent, &offset, "time=%ld.%ld", (long)p->fts_statp->st_mtimespec.tv_sec, p->fts_statp->st_mtimespec.tv_nsec); #else - output(&indent, "time=%ld.%ld", + output(indent, &offset, "time=%ld.%ld", (long)p->fts_statp->st_mtime, (long)0); #endif if (keys & F_CKSUM && S_ISREG(p->fts_statp->st_mode)) { @@ -212,13 +219,13 @@ statf(FTSENT *p) crc(fd, &val, &len)) mtree_err("%s: %s", p->fts_accpath, strerror(errno)); close(fd); - output(&indent, "cksum=%lu", (long)val); + output(indent, &offset, "cksum=%lu", (long)val); } #ifndef NO_MD5 if (keys & F_MD5 && S_ISREG(p->fts_statp->st_mode)) { if ((digestbuf = MD5File(p->fts_accpath, NULL)) == NULL) mtree_err("%s: MD5File failed: %s", p->fts_accpath, strerror(errno)); - output(&indent, "md5=%s", digestbuf); + output(indent, &offset, "md5=%s", digestbuf); free(digestbuf); } #endif /* ! NO_MD5 */ @@ -226,7 +233,7 @@ statf(FTSENT *p) if (keys & F_RMD160 && S_ISREG(p->fts_statp->st_mode)) { if ((digestbuf = RMD160File(p->fts_accpath, NULL)) == NULL) mtree_err("%s: RMD160File failed: %s", p->fts_accpath, strerror(errno)); - output(&indent, "rmd160=%s", digestbuf); + output(indent, &offset, "rmd160=%s", digestbuf); free(digestbuf); } #endif /* ! NO_RMD160 */ @@ -234,7 +241,7 @@ statf(FTSENT *p) if (keys & F_SHA1 && S_ISREG(p->fts_statp->st_mode)) { if ((digestbuf = SHA1File(p->fts_accpath, NULL)) == NULL) mtree_err("%s: SHA1File failed: %s", p->fts_accpath, strerror(errno)); - output(&indent, "sha1=%s", digestbuf); + output(indent, &offset, "sha1=%s", digestbuf); free(digestbuf); } #endif /* ! NO_SHA1 */ @@ -242,31 +249,32 @@ statf(FTSENT *p) if (keys & F_SHA256 && S_ISREG(p->fts_statp->st_mode)) { if ((digestbuf = SHA256_File(p->fts_accpath, NULL)) == NULL) mtree_err("%s: SHA256_File failed: %s", p->fts_accpath, strerror(errno)); - output(&indent, "sha256=%s", digestbuf); + output(indent, &offset, "sha256=%s", digestbuf); free(digestbuf); } #ifndef NO_SHA384 if (keys & F_SHA384 && S_ISREG(p->fts_statp->st_mode)) { if ((digestbuf = SHA384_File(p->fts_accpath, NULL)) == NULL) mtree_err("%s: SHA384_File failed: %s", p->fts_accpath, strerror(errno)); - output(&indent, "sha384=%s", digestbuf); + output(indent, &offset, "sha384=%s", digestbuf); free(digestbuf); } #endif if (keys & F_SHA512 && S_ISREG(p->fts_statp->st_mode)) { if ((digestbuf = SHA512_File(p->fts_accpath, NULL)) == NULL) mtree_err("%s: SHA512_File failed: %s", p->fts_accpath, strerror(errno)); - output(&indent, "sha512=%s", digestbuf); + output(indent, &offset, "sha512=%s", digestbuf); free(digestbuf); } #endif /* ! NO_SHA2 */ if (keys & F_SLINK && (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) - output(&indent, "link=%s", vispath(rlink(p->fts_accpath))); + output(indent, &offset, "link=%s", + vispath(rlink(p->fts_accpath))); #if HAVE_STRUCT_STAT_ST_FLAGS if (keys & F_FLAGS && p->fts_statp->st_flags != flags) { char *str = flags_to_string(p->fts_statp->st_flags, "none"); - output(&indent, "flags=%s", str); + output(indent, &offset, "flags=%s", str); free(str); } #endif @@ -415,7 +423,7 @@ dcmp(const FTSENT * const *a, const FTSE } void -output(int *offset, const char *fmt, ...) +output(int indent, int *offset, const char *fmt, ...) { va_list ap; char buf[1024]; @@ -425,8 +433,8 @@ output(int *offset, const char *fmt, ... va_end(ap); if (*offset + strlen(buf) > MAXLINELEN - 3) { - printf(" \\\n%*s", INDENTNAMELEN, ""); - *offset = INDENTNAMELEN; + printf(" \\\n%*s", INDENTNAMELEN + indent, ""); + *offset = INDENTNAMELEN + indent; } *offset += printf(" %s", buf) + 1; } Modified: projects/mtree/contrib/mtree/extern.h ============================================================================== --- projects/mtree/contrib/mtree/extern.h Thu Sep 20 16:27:21 2012 (r240755) +++ projects/mtree/contrib/mtree/extern.h Thu Sep 20 16:36:58 2012 (r240756) @@ -69,7 +69,7 @@ void read_excludes_file(const char *); const char *rlink(const char *); int verify(void); -extern int dflag, eflag, iflag, lflag, mflag, +extern int dflag, eflag, iflag, jflag, lflag, mflag, nflag, qflag, rflag, sflag, tflag, uflag; extern int mtree_Mflag, mtree_Sflag, mtree_Wflag; extern size_t mtree_lineno; Modified: projects/mtree/contrib/mtree/mtree.8 ============================================================================== --- projects/mtree/contrib/mtree/mtree.8 Thu Sep 20 16:27:21 2012 (r240755) +++ projects/mtree/contrib/mtree/mtree.8 Thu Sep 20 16:36:58 2012 (r240756) @@ -154,6 +154,20 @@ and If no inclusion list is provided, the default is to display all files. .It Fl i If specified, set the schg and/or sappnd flags. +.It Fl j +Indent the output 4 spaces each time a directory level is descended when +creating a specification with the +.Fl c +option. +This does not affect either the /set statements or the comment before each +directory. +It does however affect the comment before the close of each directory. +This is the equivalent of the +.Fl i +option in the +.Fx +version of +.Nm . .It Fl K Ar keywords Add the specified (whitespace or comma separated) keywords to the current set of keywords. Modified: projects/mtree/contrib/mtree/mtree.c ============================================================================== --- projects/mtree/contrib/mtree/mtree.c Thu Sep 20 16:27:21 2012 (r240755) +++ projects/mtree/contrib/mtree/mtree.c Thu Sep 20 16:36:58 2012 (r240756) @@ -59,7 +59,7 @@ __RCSID("$NetBSD: mtree.c,v 1.37 2011/08 #include "extern.h" int ftsoptions = FTS_PHYSICAL; -int cflag, Cflag, dflag, Dflag, eflag, iflag, lflag, mflag, +int cflag, Cflag, dflag, Dflag, eflag, iflag, jflag, lflag, mflag, nflag, qflag, rflag, sflag, tflag, uflag, Uflag; char fullpath[MAXPATHLEN]; @@ -77,7 +77,7 @@ main(int argc, char **argv) init_excludes(); while ((ch = getopt(argc, argv, - "cCdDeE:f:I:ik:K:lLmMnN:p:PqrR:s:StuUwWxX:")) + "cCdDeE:f:I:ijk:K:lLmMnN:p:PqrR:s:StuUwWxX:")) != -1) { switch((char)ch) { case 'c': @@ -108,6 +108,9 @@ main(int argc, char **argv) case 'I': parsetags(&includetags, optarg); break; + case 'j': + jflag = 1; + break; case 'k': keys = F_TYPE; while ((p = strsep(&optarg, " \t,")) != NULL) From owner-svn-src-projects@FreeBSD.ORG Thu Sep 20 18:42:01 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B30F8106566B; Thu, 20 Sep 2012 18:42:01 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 99BEC8FC15; Thu, 20 Sep 2012 18:42:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8KIg18r072476; Thu, 20 Sep 2012 18:42:01 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8KIg0nV072445; Thu, 20 Sep 2012 18:42:00 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201209201842.q8KIg0nV072445@svn.freebsd.org> From: Brooks Davis Date: Thu, 20 Sep 2012 18:42:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240761 - in projects/mtree: cddl/contrib/opensolaris/cmd/zfs cddl/sbin/zfs contrib/bind9 contrib/bind9/lib/dns contrib/bind9/lib/dns/include/dns contrib/bsnmp/snmpd contrib/libpcap lib... X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2012 18:42:01 -0000 Author: brooks Date: Thu Sep 20 18:42:00 2012 New Revision: 240761 URL: http://svn.freebsd.org/changeset/base/240761 Log: MFH at r240760 Added: projects/mtree/tools/build/options/WITHOUT_KDUMP - copied unchanged from r240760, head/tools/build/options/WITHOUT_KDUMP projects/mtree/usr.sbin/bsdconfig/networking/share/ - copied from r240760, head/usr.sbin/bsdconfig/networking/share/ projects/mtree/usr.sbin/bsdconfig/password/share/ - copied from r240760, head/usr.sbin/bsdconfig/password/share/ projects/mtree/usr.sbin/bsdconfig/share/ - copied from r240760, head/usr.sbin/bsdconfig/share/ projects/mtree/usr.sbin/bsdconfig/startup/share/ - copied from r240760, head/usr.sbin/bsdconfig/startup/share/ projects/mtree/usr.sbin/bsdconfig/timezone/share/ - copied from r240760, head/usr.sbin/bsdconfig/timezone/share/ projects/mtree/usr.sbin/bsdconfig/usermgmt/share/ - copied from r240760, head/usr.sbin/bsdconfig/usermgmt/share/ Deleted: projects/mtree/usr.sbin/bsdconfig/include/common.subr projects/mtree/usr.sbin/bsdconfig/include/dialog.subr projects/mtree/usr.sbin/bsdconfig/include/mustberoot.subr projects/mtree/usr.sbin/bsdconfig/include/strings.subr projects/mtree/usr.sbin/bsdconfig/include/sysrc.subr projects/mtree/usr.sbin/bsdconfig/networking/include/common.subr projects/mtree/usr.sbin/bsdconfig/networking/include/device.subr projects/mtree/usr.sbin/bsdconfig/networking/include/hostname.subr projects/mtree/usr.sbin/bsdconfig/networking/include/ipaddr.subr projects/mtree/usr.sbin/bsdconfig/networking/include/media.subr projects/mtree/usr.sbin/bsdconfig/networking/include/netmask.subr projects/mtree/usr.sbin/bsdconfig/networking/include/resolv.subr projects/mtree/usr.sbin/bsdconfig/networking/include/routing.subr projects/mtree/usr.sbin/bsdconfig/password/include/password.subr projects/mtree/usr.sbin/bsdconfig/startup/include/rcconf.subr projects/mtree/usr.sbin/bsdconfig/startup/include/rcedit.subr projects/mtree/usr.sbin/bsdconfig/startup/include/rcvar.subr projects/mtree/usr.sbin/bsdconfig/timezone/include/continents.subr projects/mtree/usr.sbin/bsdconfig/timezone/include/countries.subr projects/mtree/usr.sbin/bsdconfig/timezone/include/iso3166.subr projects/mtree/usr.sbin/bsdconfig/timezone/include/menus.subr projects/mtree/usr.sbin/bsdconfig/timezone/include/zones.subr projects/mtree/usr.sbin/bsdconfig/usermgmt/include/group_input.subr projects/mtree/usr.sbin/bsdconfig/usermgmt/include/user_input.subr Modified: projects/mtree/cddl/contrib/opensolaris/cmd/zfs/zfs.8 projects/mtree/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c projects/mtree/cddl/sbin/zfs/Makefile projects/mtree/contrib/bind9/CHANGES projects/mtree/contrib/bind9/lib/dns/include/dns/rdata.h projects/mtree/contrib/bind9/lib/dns/master.c projects/mtree/contrib/bind9/lib/dns/rdata.c projects/mtree/contrib/bind9/lib/dns/rdataslab.c projects/mtree/contrib/bind9/version projects/mtree/contrib/bsnmp/snmpd/main.c projects/mtree/contrib/bsnmp/snmpd/trans_udp.c projects/mtree/contrib/libpcap/pcap-snoop.c projects/mtree/lib/libc/string/strsignal.c projects/mtree/lib/libc/sys/recv.2 projects/mtree/libexec/rtld-elf/rtld.c projects/mtree/rescue/rescue/Makefile projects/mtree/sbin/ipfw/ipfw.8 projects/mtree/share/man/man4/Makefile projects/mtree/share/man/man4/ip.4 projects/mtree/share/man/man4/random.4 projects/mtree/share/man/man5/Makefile projects/mtree/share/man/man5/src.conf.5 projects/mtree/share/man/man7/development.7 projects/mtree/share/man/man9/vinvalbuf.9 projects/mtree/sys/boot/ofw/libofw/devicename.c projects/mtree/sys/cam/scsi/scsi_cd.c projects/mtree/sys/contrib/dev/acpica/changes.txt (contents, props changed) projects/mtree/sys/contrib/dev/acpica/common/dmrestag.c projects/mtree/sys/contrib/dev/acpica/compiler/aslcompile.c projects/mtree/sys/contrib/dev/acpica/compiler/aslcompiler.h projects/mtree/sys/contrib/dev/acpica/compiler/aslerror.c projects/mtree/sys/contrib/dev/acpica/compiler/aslfiles.c projects/mtree/sys/contrib/dev/acpica/compiler/aslfold.c projects/mtree/sys/contrib/dev/acpica/compiler/aslglobal.h projects/mtree/sys/contrib/dev/acpica/compiler/aslmain.c projects/mtree/sys/contrib/dev/acpica/compiler/aslmessages.h projects/mtree/sys/contrib/dev/acpica/compiler/asloperands.c projects/mtree/sys/contrib/dev/acpica/compiler/aslopt.c projects/mtree/sys/contrib/dev/acpica/compiler/aslstartup.c projects/mtree/sys/contrib/dev/acpica/compiler/aslsupport.l projects/mtree/sys/contrib/dev/acpica/compiler/asltypes.h projects/mtree/sys/contrib/dev/acpica/compiler/aslutils.c projects/mtree/sys/contrib/dev/acpica/compiler/dtio.c projects/mtree/sys/contrib/dev/acpica/compiler/preprocess.h projects/mtree/sys/contrib/dev/acpica/components/debugger/dbexec.c projects/mtree/sys/contrib/dev/acpica/components/debugger/dbinput.c projects/mtree/sys/contrib/dev/acpica/components/debugger/dbmethod.c projects/mtree/sys/contrib/dev/acpica/components/debugger/dbnames.c projects/mtree/sys/contrib/dev/acpica/components/debugger/dbstats.c projects/mtree/sys/contrib/dev/acpica/components/debugger/dbutils.c projects/mtree/sys/contrib/dev/acpica/components/disassembler/dmopcode.c projects/mtree/sys/contrib/dev/acpica/components/tables/tbinstal.c projects/mtree/sys/contrib/dev/acpica/components/tables/tbxface.c projects/mtree/sys/contrib/dev/acpica/include/acdebug.h projects/mtree/sys/contrib/dev/acpica/include/acpixf.h projects/mtree/sys/contrib/dev/acpica/include/actbl1.h projects/mtree/sys/contrib/ipfilter/netinet/ip_auth.c projects/mtree/sys/dev/ahci/ahci.c projects/mtree/sys/dev/alc/if_alc.c projects/mtree/sys/dev/amr/amr.c projects/mtree/sys/dev/ath/if_ath_tx.c projects/mtree/sys/dev/atkbdc/psm.c projects/mtree/sys/dev/bge/if_bge.c projects/mtree/sys/dev/cxgb/cxgb_main.c projects/mtree/sys/dev/cxgb/cxgb_osdep.h projects/mtree/sys/dev/cxgbe/osdep.h projects/mtree/sys/dev/cxgbe/t4_main.c projects/mtree/sys/dev/e1000/if_em.c projects/mtree/sys/dev/et/if_et.c projects/mtree/sys/dev/isci/scil/scic_sds_phy.c projects/mtree/sys/dev/jme/if_jme.c projects/mtree/sys/dev/nvme/nvme.c projects/mtree/sys/dev/nvme/nvme.h projects/mtree/sys/dev/nvme/nvme_ctrlr.c projects/mtree/sys/dev/pci/pci.c projects/mtree/sys/dev/pci/pcireg.h projects/mtree/sys/dev/re/if_re.c projects/mtree/sys/dev/usb/serial/uftdi_reg.h projects/mtree/sys/dev/usb/usb_request.c projects/mtree/sys/dev/usb/usbdevs projects/mtree/sys/fs/nfs/nfs.h projects/mtree/sys/fs/nfs/nfs_commonacl.c projects/mtree/sys/fs/nfs/nfs_commonsubs.c projects/mtree/sys/fs/nfs/nfs_var.h projects/mtree/sys/fs/nfsclient/nfs_clcomsubs.c projects/mtree/sys/fs/nfsserver/nfs_nfsdport.c projects/mtree/sys/net/if_lagg.c projects/mtree/sys/net/pfvar.h projects/mtree/sys/netinet/libalias/alias_skinny.c projects/mtree/sys/netpfil/pf/pf.c projects/mtree/sys/ofed/include/linux/pci.h projects/mtree/sys/powerpc/mpc85xx/pci_fdt.c projects/mtree/sys/vm/uma_core.c projects/mtree/sys/vm/vm_object.c projects/mtree/usr.sbin/bsdconfig/Makefile projects/mtree/usr.sbin/bsdconfig/bsdconfig projects/mtree/usr.sbin/bsdconfig/console/console projects/mtree/usr.sbin/bsdconfig/console/font projects/mtree/usr.sbin/bsdconfig/console/keymap projects/mtree/usr.sbin/bsdconfig/console/repeat projects/mtree/usr.sbin/bsdconfig/console/saver projects/mtree/usr.sbin/bsdconfig/console/screenmap projects/mtree/usr.sbin/bsdconfig/console/ttys projects/mtree/usr.sbin/bsdconfig/diskmgmt/diskmgmt projects/mtree/usr.sbin/bsdconfig/docsinstall/docsinstall projects/mtree/usr.sbin/bsdconfig/dot/dot projects/mtree/usr.sbin/bsdconfig/include/Makefile projects/mtree/usr.sbin/bsdconfig/mouse/disable projects/mtree/usr.sbin/bsdconfig/mouse/enable projects/mtree/usr.sbin/bsdconfig/mouse/flags projects/mtree/usr.sbin/bsdconfig/mouse/mouse projects/mtree/usr.sbin/bsdconfig/mouse/port projects/mtree/usr.sbin/bsdconfig/mouse/type projects/mtree/usr.sbin/bsdconfig/networking/Makefile projects/mtree/usr.sbin/bsdconfig/networking/defaultrouter projects/mtree/usr.sbin/bsdconfig/networking/devices projects/mtree/usr.sbin/bsdconfig/networking/hostname projects/mtree/usr.sbin/bsdconfig/networking/include/Makefile projects/mtree/usr.sbin/bsdconfig/networking/nameservers projects/mtree/usr.sbin/bsdconfig/networking/networking projects/mtree/usr.sbin/bsdconfig/password/Makefile projects/mtree/usr.sbin/bsdconfig/password/include/Makefile projects/mtree/usr.sbin/bsdconfig/password/password projects/mtree/usr.sbin/bsdconfig/security/kern_securelevel projects/mtree/usr.sbin/bsdconfig/security/security projects/mtree/usr.sbin/bsdconfig/startup/Makefile projects/mtree/usr.sbin/bsdconfig/startup/include/Makefile projects/mtree/usr.sbin/bsdconfig/startup/misc projects/mtree/usr.sbin/bsdconfig/startup/rcadd projects/mtree/usr.sbin/bsdconfig/startup/rcconf projects/mtree/usr.sbin/bsdconfig/startup/rcdelete projects/mtree/usr.sbin/bsdconfig/startup/rcedit projects/mtree/usr.sbin/bsdconfig/startup/rcvar projects/mtree/usr.sbin/bsdconfig/startup/startup projects/mtree/usr.sbin/bsdconfig/timezone/Makefile projects/mtree/usr.sbin/bsdconfig/timezone/include/Makefile projects/mtree/usr.sbin/bsdconfig/timezone/timezone projects/mtree/usr.sbin/bsdconfig/ttys/ttys projects/mtree/usr.sbin/bsdconfig/usermgmt/Makefile projects/mtree/usr.sbin/bsdconfig/usermgmt/groupadd projects/mtree/usr.sbin/bsdconfig/usermgmt/groupdel projects/mtree/usr.sbin/bsdconfig/usermgmt/groupedit projects/mtree/usr.sbin/bsdconfig/usermgmt/groupinput projects/mtree/usr.sbin/bsdconfig/usermgmt/include/Makefile projects/mtree/usr.sbin/bsdconfig/usermgmt/useradd projects/mtree/usr.sbin/bsdconfig/usermgmt/userdel projects/mtree/usr.sbin/bsdconfig/usermgmt/useredit projects/mtree/usr.sbin/bsdconfig/usermgmt/userinput projects/mtree/usr.sbin/bsdconfig/usermgmt/usermgmt projects/mtree/usr.sbin/pciconf/cap.c projects/mtree/usr.sbin/pciconf/err.c projects/mtree/usr.sbin/pciconf/pciconf.c projects/mtree/usr.sbin/pkg_install/add/main.c projects/mtree/usr.sbin/pkg_install/create/perform.c projects/mtree/usr.sbin/pkg_install/info/info.h projects/mtree/usr.sbin/pkg_install/info/perform.c projects/mtree/usr.sbin/pkg_install/info/show.c projects/mtree/usr.sbin/pkg_install/lib/lib.h projects/mtree/usr.sbin/pkg_install/lib/plist.c projects/mtree/usr.sbin/pkg_install/version/perform.c Directory Properties: projects/mtree/ (props changed) projects/mtree/cddl/contrib/opensolaris/ (props changed) projects/mtree/cddl/contrib/opensolaris/cmd/zfs/ (props changed) projects/mtree/contrib/bind9/ (props changed) projects/mtree/contrib/libpcap/ (props changed) projects/mtree/lib/libc/ (props changed) projects/mtree/sbin/ (props changed) projects/mtree/sbin/ipfw/ (props changed) projects/mtree/share/man/man4/ (props changed) projects/mtree/sys/ (props changed) projects/mtree/sys/boot/ (props changed) projects/mtree/sys/contrib/dev/acpica/ (props changed) projects/mtree/sys/contrib/dev/acpica/common/ (props changed) projects/mtree/sys/contrib/dev/acpica/compiler/ (props changed) projects/mtree/sys/contrib/dev/acpica/components/debugger/ (props changed) projects/mtree/sys/contrib/dev/acpica/components/disassembler/ (props changed) projects/mtree/sys/contrib/dev/acpica/components/tables/ (props changed) projects/mtree/sys/contrib/dev/acpica/include/ (props changed) Modified: projects/mtree/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- projects/mtree/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Thu Sep 20 18:21:29 2012 (r240760) +++ projects/mtree/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Thu Sep 20 18:42:00 2012 (r240761) @@ -256,10 +256,10 @@ .Op Ar snapshot Ns | Ns Ar filesystem .Nm .Cm jail -.Ar jailid filesystem +.Ar jailid Ns | Ns Ar jailname filesystem .Nm .Cm unjail -.Ar jailid filesystem +.Ar jailid Ns | Ns Ar jailname filesystem .Sh DESCRIPTION The .Nm Modified: projects/mtree/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- projects/mtree/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Thu Sep 20 18:21:29 2012 (r240760) +++ projects/mtree/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Thu Sep 20 18:42:00 2012 (r240761) @@ -240,9 +240,9 @@ get_usage(zfs_help_t idx) return (gettext("\tupgrade [-v]\n" "\tupgrade [-r] [-V version] <-a | filesystem ...>\n")); case HELP_JAIL: - return (gettext("\tjail \n")); + return (gettext("\tjail \n")); case HELP_UNJAIL: - return (gettext("\tunjail \n")); + return (gettext("\tunjail \n")); case HELP_LIST: return (gettext("\tlist [-rH][-d max] " "[-o property[,...]] [-t type[,...]] [-s property] ...\n" @@ -6300,9 +6300,9 @@ do_jail(int argc, char **argv, int attac usage(B_FALSE); } - jailid = atoi(argv[1]); - if (jailid == 0) { - (void) fprintf(stderr, gettext("invalid jailid\n")); + jailid = jail_getid(argv[1]); + if (jailid < 0) { + (void) fprintf(stderr, gettext("invalid jail id or name\n")); usage(B_FALSE); } Modified: projects/mtree/cddl/sbin/zfs/Makefile ============================================================================== --- projects/mtree/cddl/sbin/zfs/Makefile Thu Sep 20 18:21:29 2012 (r240760) +++ projects/mtree/cddl/sbin/zfs/Makefile Thu Sep 20 18:42:00 2012 (r240761) @@ -21,8 +21,8 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs -DPADD= ${LIBGEOM} ${LIBNVPAIR} ${LIBUMEM} \ +DPADD= ${LIBGEOM} ${LIBJAIL} ${LIBNVPAIR} ${LIBUMEM} \ ${LIBUTIL} ${LIBUUTIL} ${LIBZFS} -LDADD= -lgeom -lnvpair -lumem -lutil -luutil -lzfs +LDADD= -lgeom -ljail -lnvpair -lumem -lutil -luutil -lzfs .include Modified: projects/mtree/contrib/bind9/CHANGES ============================================================================== --- projects/mtree/contrib/bind9/CHANGES Thu Sep 20 18:21:29 2012 (r240760) +++ projects/mtree/contrib/bind9/CHANGES Thu Sep 20 18:42:00 2012 (r240761) @@ -1,3 +1,8 @@ + --- 9.8.3-P3 released --- + +3364. [security] Named could die on specially crafted record. + [RT #30416] + --- 9.8.3-P2 released --- 3346. [security] Bad-cache data could be used before it was Modified: projects/mtree/contrib/bind9/lib/dns/include/dns/rdata.h ============================================================================== --- projects/mtree/contrib/bind9/lib/dns/include/dns/rdata.h Thu Sep 20 18:21:29 2012 (r240760) +++ projects/mtree/contrib/bind9/lib/dns/include/dns/rdata.h Thu Sep 20 18:42:00 2012 (r240761) @@ -147,6 +147,17 @@ struct dns_rdata { (((rdata)->flags & ~(DNS_RDATA_UPDATE|DNS_RDATA_OFFLINE)) == 0) /* + * The maximum length of a RDATA that can be sent on the wire. + * Max packet size (65535) less header (12), less name (1), type (2), + * class (2), ttl(4), length (2). + * + * None of the defined types that support name compression can exceed + * this and all new types are to be sent uncompressed. + */ + +#define DNS_RDATA_MAXLENGTH 65512U + +/* * Flags affecting rdata formatting style. Flags 0xFFFF0000 * are used by masterfile-level formatting and defined elsewhere. * See additional comments at dns_rdata_tofmttext(). Modified: projects/mtree/contrib/bind9/lib/dns/master.c ============================================================================== --- projects/mtree/contrib/bind9/lib/dns/master.c Thu Sep 20 18:21:29 2012 (r240760) +++ projects/mtree/contrib/bind9/lib/dns/master.c Thu Sep 20 18:42:00 2012 (r240761) @@ -75,7 +75,7 @@ /*% * max message size - header - root - type - class - ttl - rdlen */ -#define MINTSIZ (65535 - 12 - 1 - 2 - 2 - 4 - 2) +#define MINTSIZ DNS_RDATA_MAXLENGTH /*% * Size for tokens in the presentation format, * The largest tokens are the base64 blocks in KEY and CERT records, Modified: projects/mtree/contrib/bind9/lib/dns/rdata.c ============================================================================== --- projects/mtree/contrib/bind9/lib/dns/rdata.c Thu Sep 20 18:21:29 2012 (r240760) +++ projects/mtree/contrib/bind9/lib/dns/rdata.c Thu Sep 20 18:42:00 2012 (r240761) @@ -429,6 +429,7 @@ dns_rdata_fromwire(dns_rdata_t *rdata, d isc_buffer_t st; isc_boolean_t use_default = ISC_FALSE; isc_uint32_t activelength; + size_t length; REQUIRE(dctx != NULL); if (rdata != NULL) { @@ -459,6 +460,14 @@ dns_rdata_fromwire(dns_rdata_t *rdata, d } /* + * Reject any rdata that expands out to more than DNS_RDATA_MAXLENGTH + * as we cannot transmit it. + */ + length = isc_buffer_usedlength(target) - isc_buffer_usedlength(&st); + if (result == ISC_R_SUCCESS && length > DNS_RDATA_MAXLENGTH) + result = DNS_R_FORMERR; + + /* * We should have consumed all of our buffer. */ if (result == ISC_R_SUCCESS && !buffer_empty(source)) @@ -466,8 +475,7 @@ dns_rdata_fromwire(dns_rdata_t *rdata, d if (rdata != NULL && result == ISC_R_SUCCESS) { region.base = isc_buffer_used(&st); - region.length = isc_buffer_usedlength(target) - - isc_buffer_usedlength(&st); + region.length = length; dns_rdata_fromregion(rdata, rdclass, type, ®ion); } @@ -602,6 +610,7 @@ dns_rdata_fromtext(dns_rdata_t *rdata, d unsigned long line; void (*callback)(dns_rdatacallbacks_t *, const char *, ...); isc_result_t tresult; + size_t length; REQUIRE(origin == NULL || dns_name_isabsolute(origin) == ISC_TRUE); if (rdata != NULL) { @@ -673,10 +682,13 @@ dns_rdata_fromtext(dns_rdata_t *rdata, d } } while (1); + length = isc_buffer_usedlength(target) - isc_buffer_usedlength(&st); + if (result == ISC_R_SUCCESS && length > DNS_RDATA_MAXLENGTH) + result = ISC_R_NOSPACE; + if (rdata != NULL && result == ISC_R_SUCCESS) { region.base = isc_buffer_used(&st); - region.length = isc_buffer_usedlength(target) - - isc_buffer_usedlength(&st); + region.length = length; dns_rdata_fromregion(rdata, rdclass, type, ®ion); } if (result != ISC_R_SUCCESS) { @@ -804,6 +816,7 @@ dns_rdata_fromstruct(dns_rdata_t *rdata, isc_buffer_t st; isc_region_t region; isc_boolean_t use_default = ISC_FALSE; + size_t length; REQUIRE(source != NULL); if (rdata != NULL) { @@ -818,10 +831,13 @@ dns_rdata_fromstruct(dns_rdata_t *rdata, if (use_default) (void)NULL; + length = isc_buffer_usedlength(target) - isc_buffer_usedlength(&st); + if (result == ISC_R_SUCCESS && length > DNS_RDATA_MAXLENGTH) + result = ISC_R_NOSPACE; + if (rdata != NULL && result == ISC_R_SUCCESS) { region.base = isc_buffer_used(&st); - region.length = isc_buffer_usedlength(target) - - isc_buffer_usedlength(&st); + region.length = length; dns_rdata_fromregion(rdata, rdclass, type, ®ion); } if (result != ISC_R_SUCCESS) Modified: projects/mtree/contrib/bind9/lib/dns/rdataslab.c ============================================================================== --- projects/mtree/contrib/bind9/lib/dns/rdataslab.c Thu Sep 20 18:21:29 2012 (r240760) +++ projects/mtree/contrib/bind9/lib/dns/rdataslab.c Thu Sep 20 18:42:00 2012 (r240761) @@ -305,6 +305,7 @@ dns_rdataslab_fromrdataset(dns_rdataset_ length = x[i].rdata.length; if (rdataset->type == dns_rdatatype_rrsig) length++; + INSIST(length <= 0xffff); *rawbuf++ = (length & 0xff00) >> 8; *rawbuf++ = (length & 0x00ff); #if DNS_RDATASET_FIXED Modified: projects/mtree/contrib/bind9/version ============================================================================== --- projects/mtree/contrib/bind9/version Thu Sep 20 18:21:29 2012 (r240760) +++ projects/mtree/contrib/bind9/version Thu Sep 20 18:42:00 2012 (r240761) @@ -7,4 +7,4 @@ MAJORVER=9 MINORVER=8 PATCHVER=3 RELEASETYPE=-P -RELEASEVER=2 +RELEASEVER=3 Modified: projects/mtree/contrib/bsnmp/snmpd/main.c ============================================================================== --- projects/mtree/contrib/bsnmp/snmpd/main.c Thu Sep 20 18:21:29 2012 (r240760) +++ projects/mtree/contrib/bsnmp/snmpd/main.c Thu Sep 20 18:42:00 2012 (r240761) @@ -1203,6 +1203,8 @@ snmpd_input(struct port_input *pi, struc ret = recv_stream(pi); } else { + struct in_addr *laddr; + memset(cbuf, 0, CMSG_SPACE(sizeof(struct in_addr))); msg.msg_control = cbuf; msg.msg_controllen = CMSG_SPACE(sizeof(struct in_addr)); @@ -1210,8 +1212,14 @@ snmpd_input(struct port_input *pi, struc cmsgp->cmsg_len = CMSG_LEN(sizeof(struct in_addr)); cmsgp->cmsg_level = IPPROTO_IP; cmsgp->cmsg_type = IP_SENDSRCADDR; + laddr = (struct in_addr *)CMSG_DATA(cmsgp); - ret = recv_dgram(pi, (struct in_addr *)CMSG_DATA(cmsgp)); + ret = recv_dgram(pi, laddr); + + if (laddr->s_addr == 0) { + msg.msg_control = NULL; + msg.msg_controllen = 0; + } } if (ret == -1) Modified: projects/mtree/contrib/bsnmp/snmpd/trans_udp.c ============================================================================== --- projects/mtree/contrib/bsnmp/snmpd/trans_udp.c Thu Sep 20 18:21:29 2012 (r240760) +++ projects/mtree/contrib/bsnmp/snmpd/trans_udp.c Thu Sep 20 18:42:00 2012 (r240761) @@ -109,13 +109,6 @@ udp_init_port(struct tport *tp) syslog(LOG_ERR, "creating UDP socket: %m"); return (SNMP_ERR_RES_UNAVAIL); } - if (setsockopt(p->input.fd, IPPROTO_IP, IP_RECVDSTADDR, &on, - sizeof(on)) == -1) { - syslog(LOG_ERR, "setsockopt(IP_RECVDSTADDR): %m"); - close(p->input.fd); - p->input.fd = -1; - return (SNMP_ERR_GENERR); - } ip = (p->addr[0] << 24) | (p->addr[1] << 16) | (p->addr[2] << 8) | p->addr[3]; memset(&addr, 0, sizeof(addr)); @@ -123,6 +116,14 @@ udp_init_port(struct tport *tp) addr.sin_port = htons(p->port); addr.sin_family = AF_INET; addr.sin_len = sizeof(addr); + if (addr.sin_addr.s_addr == INADDR_ANY && + setsockopt(p->input.fd, IPPROTO_IP, IP_RECVDSTADDR, &on, + sizeof(on)) == -1) { + syslog(LOG_ERR, "setsockopt(IP_RECVDSTADDR): %m"); + close(p->input.fd); + p->input.fd = -1; + return (SNMP_ERR_GENERR); + } if (bind(p->input.fd, (struct sockaddr *)&addr, sizeof(addr))) { if (errno == EADDRNOTAVAIL) { close(p->input.fd); Modified: projects/mtree/contrib/libpcap/pcap-snoop.c ============================================================================== --- projects/mtree/contrib/libpcap/pcap-snoop.c Thu Sep 20 18:21:29 2012 (r240760) +++ projects/mtree/contrib/libpcap/pcap-snoop.c Thu Sep 20 18:42:00 2012 (r240761) @@ -100,7 +100,7 @@ again: /* * XXX - Sigh, snoop_packetlen is a 16 bit quantity. If we - * got a short length, but read a full sized snoop pakcet, + * got a short length, but read a full sized snoop packet, * assume we overflowed and add back the 64K... */ if (cc == (p->snapshot + sizeof(struct snoopheader)) && Modified: projects/mtree/lib/libc/string/strsignal.c ============================================================================== --- projects/mtree/lib/libc/string/strsignal.c Thu Sep 20 18:21:29 2012 (r240760) +++ projects/mtree/lib/libc/string/strsignal.c Thu Sep 20 18:42:00 2012 (r240761) @@ -120,29 +120,29 @@ strsignal(int num) UPREFIX, #endif sizeof(sig_ebuf)); - } - signum = num; - if (num < 0) - signum = -signum; + signum = num; + if (num < 0) + signum = -signum; - t = tmp; - do { - *t++ = "0123456789"[signum % 10]; - } while (signum /= 10); - if (num < 0) - *t++ = '-'; + t = tmp; + do { + *t++ = "0123456789"[signum % 10]; + } while (signum /= 10); + if (num < 0) + *t++ = '-'; - p = (ebuf + n); - *p++ = ':'; - *p++ = ' '; + p = (ebuf + n); + *p++ = ':'; + *p++ = ' '; - for (;;) { - *p++ = *--t; - if (t <= tmp) - break; + for (;;) { + *p++ = *--t; + if (t <= tmp) + break; + } + *p = '\0'; } - *p = '\0'; #if defined(NLS) catclose(catd); Modified: projects/mtree/lib/libc/sys/recv.2 ============================================================================== --- projects/mtree/lib/libc/sys/recv.2 Thu Sep 20 18:21:29 2012 (r240760) +++ projects/mtree/lib/libc/sys/recv.2 Thu Sep 20 18:42:00 2012 (r240761) @@ -44,7 +44,7 @@ .Ft ssize_t .Fn recv "int s" "void *buf" "size_t len" "int flags" .Ft ssize_t -.Fn recvfrom "int s" "void * restrict buf" "size_t len" "int flags" "struct sockaddr * restrict from" "socklen_t * restrict fromlen" +.Fn recvfrom "int s" "void *buf" "size_t len" "int flags" "struct sockaddr * restrict from" "socklen_t * restrict fromlen" .Ft ssize_t .Fn recvmsg "int s" "struct msghdr *msg" "int flags" .Sh DESCRIPTION Modified: projects/mtree/libexec/rtld-elf/rtld.c ============================================================================== --- projects/mtree/libexec/rtld-elf/rtld.c Thu Sep 20 18:21:29 2012 (r240760) +++ projects/mtree/libexec/rtld-elf/rtld.c Thu Sep 20 18:42:00 2012 (r240761) @@ -1429,7 +1429,7 @@ find_library(const char *xname, const Ob { char *pathname; char *name; - bool objgiven; + bool nodeflib, objgiven; objgiven = refobj != NULL; if (strchr(xname, '/') != NULL) { /* Hard coded pathname */ @@ -1464,6 +1464,7 @@ find_library(const char *xname, const Ob (pathname = search_library_path(name, STANDARD_LIBRARY_PATH)) != NULL) return (pathname); } else { + nodeflib = objgiven ? refobj->z_nodeflib : false; if ((objgiven && (pathname = search_library_path(name, refobj->rpath)) != NULL) || (objgiven && refobj->runpath == NULL && refobj != obj_main && @@ -1471,9 +1472,8 @@ find_library(const char *xname, const Ob (pathname = search_library_path(name, ld_library_path)) != NULL || (objgiven && (pathname = search_library_path(name, refobj->runpath)) != NULL) || - (pathname = search_library_path(name, gethints(refobj->z_nodeflib))) - != NULL || - (objgiven && !refobj->z_nodeflib && + (pathname = search_library_path(name, gethints(nodeflib))) != NULL || + (objgiven && !nodeflib && (pathname = search_library_path(name, STANDARD_LIBRARY_PATH)) != NULL)) return (pathname); } Modified: projects/mtree/rescue/rescue/Makefile ============================================================================== --- projects/mtree/rescue/rescue/Makefile Thu Sep 20 18:21:29 2012 (r240760) +++ projects/mtree/rescue/rescue/Makefile Thu Sep 20 18:42:00 2012 (r240761) @@ -123,7 +123,7 @@ CRUNCH_LIBS+= -lalias -lcam -lcurses -ld CRUNCH_LIBS+= -lipx .endif .if ${MK_ZFS} != "no" -CRUNCH_LIBS+= -lavl -lzfs -lnvpair -lpthread -luutil -lumem +CRUNCH_LIBS+= -lavl -ljail -lzfs -lnvpair -lpthread -luutil -lumem .endif CRUNCH_LIBS+= -lgeom -lbsdxml -lkiconv -lmd -lsbuf -lufs -lz Modified: projects/mtree/sbin/ipfw/ipfw.8 ============================================================================== --- projects/mtree/sbin/ipfw/ipfw.8 Thu Sep 20 18:21:29 2012 (r240760) +++ projects/mtree/sbin/ipfw/ipfw.8 Thu Sep 20 18:42:00 2012 (r240761) @@ -957,25 +957,27 @@ actions. The packet is tagged so as to use the FIB (routing table) .Ar fibnum in any subsequent forwarding decisions. -Initially this is limited to the values 0 through 15, see -.Xr setfib 1 . +In the current implementation, this is limited to the values 0 through 15, see +.Xr setfib 2 . Processing continues at the next rule. It is possible to use the .Cm tablearg -keyword with a setfib. -If tablearg value is not within compiled FIB range packet fib is set to 0. +keyword with setfib. +If the tablearg value is not within the compiled range of fibs, +the packet's fib is set to 0. .It Cm reass -Queue and reassemble ip fragments. +Queue and reassemble IP fragments. If the packet is not fragmented, counters are updated and processing continues with the next rule. If the packet is the last logical fragment, the packet is reassembled and, if .Va net.inet.ip.fw.one_pass -is set to 0, processing continues with the next rule, else packet is -allowed to pass and search terminates. -If the packet is a fragment in the middle, it is consumed and +is set to 0, processing continues with the next rule. +Otherwise, the packet is allowed to pass and the search terminates. +If the packet is a fragment in the middle of a logical group of fragments, +it is consumed and processing stops immediately. .Pp -Fragments handling can be tuned via +Fragment handling can be tuned via .Va net.inet.ip.maxfragpackets and .Va net.inet.ip.maxfragsperpacket Modified: projects/mtree/share/man/man4/Makefile ============================================================================== --- projects/mtree/share/man/man4/Makefile Thu Sep 20 18:21:29 2012 (r240760) +++ projects/mtree/share/man/man4/Makefile Thu Sep 20 18:42:00 2012 (r240761) @@ -1,6 +1,8 @@ # @(#)Makefile 8.1 (Berkeley) 6/18/93 # $FreeBSD$ +.include + MAN= aac.4 \ acpi.4 \ ${_acpi_asus.4} \ @@ -354,9 +356,9 @@ MAN= aac.4 \ pcii.4 \ pcm.4 \ pcn.4 \ - pf.4 \ - pflog.4 \ - pfsync.4 \ + ${_pf.4} \ + ${_pflog.4} \ + ${_pfsync.4} \ pim.4 \ polling.4 \ ppbus.4 \ @@ -798,4 +800,10 @@ _nvram2env.4= nvram2env.4 SUBDIR= man4.${MACHINE_CPUARCH} .endif +.if ${MK_PF} != "no" +_pf.4= pf.4 +_pflog.4= pflog.4 +_pfsync.4= pfsync.4 +.endif + .include Modified: projects/mtree/share/man/man4/ip.4 ============================================================================== --- projects/mtree/share/man/man4/ip.4 Thu Sep 20 18:21:29 2012 (r240760) +++ projects/mtree/share/man/man4/ip.4 Thu Sep 20 18:42:00 2012 (r240761) @@ -32,7 +32,7 @@ .\" @(#)ip.4 8.2 (Berkeley) 11/30/93 .\" $FreeBSD$ .\" -.Dd September 12, 2012 +.Dd September 20, 2012 .Dt IP 4 .Os .Sh NAME @@ -187,21 +187,19 @@ cmsg_level = IPPROTO_IP cmsg_type = IP_SENDSRCADDR .Ed .Pp -The socket should be bound to a local port. -The socket may be bound or not bound to a local address. -In the former case address supplied with -.Dv IP_SENDSRCADDR -overrides bound address. -If the socket is bound to a local address and the address supplied with +The socket should be either bound to +.Dv INADDR_ANY +and a local port, and the address supplied with .Dv IP_SENDSRCADDR -is +should't be .Dv INADDR_ANY , -then bound address is overriden via generic source address selection logic, -which would choose IP address of interface closest to destination. -If the socket is not bound to a local address, then address supplied with +or the socket should be bound to a local address and the address supplied with .Dv IP_SENDSRCADDR -can't be +should be .Dv INADDR_ANY . +In the latter case bound address is overriden via generic source address +selection logic, which would choose IP address of interface closest to +destination. .Pp For convenience, .Dv IP_SENDSRCADDR Modified: projects/mtree/share/man/man4/random.4 ============================================================================== --- projects/mtree/share/man/man4/random.4 Thu Sep 20 18:21:29 2012 (r240760) +++ projects/mtree/share/man/man4/random.4 Thu Sep 20 18:42:00 2012 (r240761) @@ -315,11 +315,16 @@ and is an implementation of the .Em Yarrow algorithm by Bruce Schneier, .Em et al . -The only hardware implementation -currently is for the +The only hardware implementations +currently are for the .Tn VIA C3 Nehemiah (stepping 3 or greater) -CPU. +CPU +and the +.Tn Intel +.Dq Bull Mountain +.Em RdRand +instruction and underlying random number generator (RNG). More will be added in the future. .Pp The author gratefully acknowledges Modified: projects/mtree/share/man/man5/Makefile ============================================================================== --- projects/mtree/share/man/man5/Makefile Thu Sep 20 18:21:29 2012 (r240760) +++ projects/mtree/share/man/man5/Makefile Thu Sep 20 18:42:00 2012 (r240761) @@ -50,8 +50,6 @@ MAN= acct.5 \ passwd.5 \ pbm.5 \ periodic.conf.5 \ - pf.conf.5 \ - pf.os.5 \ phones.5 \ portindex.5 \ portsnap.conf.5 \ @@ -91,6 +89,11 @@ MAN+= hesiod.conf.5 MAN+= nandfs.5 .endif +.if ${MK_PF} != "no" +MAN+= pf.conf.5 \ + pf.os.5 +.endif + .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" _boot.config.5= boot.config.5 .endif Modified: projects/mtree/share/man/man5/src.conf.5 ============================================================================== --- projects/mtree/share/man/man5/src.conf.5 Thu Sep 20 18:21:29 2012 (r240760) +++ projects/mtree/share/man/man5/src.conf.5 Thu Sep 20 18:42:00 2012 (r240761) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 236279 2012-05-30 02:37:20Z gjb .\" $FreeBSD$ -.Dd September 8, 2012 +.Dd September 19, 2012 .Dt SRC.CONF 5 .Os .Sh NAME @@ -551,6 +551,12 @@ Set to build some programs without IPX s .\" from FreeBSD: head/tools/build/options/WITHOUT_JAIL 183242 2008-09-21 22:02:26Z sam Set to not build tools for the support of jails; e.g. .Xr jail 8 . +.It Va WITHOUT_KDUMP +.\" $FreeBSD$ +Set to not build +.Xr kdump 1 +and +.Xr truss 1 . .It Va WITHOUT_KERBEROS .\" from FreeBSD: head/tools/build/options/WITHOUT_KERBEROS 174549 2007-12-12 16:42:03Z ru Set this if you do not want to build Kerberos 5 (KTH Heimdal). Modified: projects/mtree/share/man/man7/development.7 ============================================================================== --- projects/mtree/share/man/man7/development.7 Thu Sep 20 18:21:29 2012 (r240760) +++ projects/mtree/share/man/man7/development.7 Thu Sep 20 18:42:00 2012 (r240761) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 2, 2012 +.Dd September 19, 2012 .Dt DEVELOPMENT 7 .Os .Sh NAME @@ -48,7 +48,7 @@ kernel. The methods described here are as applicable to production installations as it is to development environments. -You need a good 12-17GB of disk space on one machine to make this work +You need approximately 10GB of disk space on one machine to make this work conveniently. .Sh SETTING UP THE ENVIRONMENT ON THE MASTER SERVER Your master server should always run a stable, production version of the @@ -62,9 +62,9 @@ where you lose the environment and/or ca .Pp Create a huge partition called .Pa /FreeBSD . -8-12GB is recommended. +Approximately 7GB is recommended. This partition will contain nearly all the development environment, -including the CVS tree, broken-out source, and possibly even object files. +including the subversion tree, broken-out source, and possibly even object files. You are going to export this partition to your other machines via a READ-ONLY NFS export so do not mix it with other more security-sensitive partitions. @@ -89,70 +89,19 @@ I recommend a partition of at least 5GB. .Pp On the master server, use -.Xr csup 1 -to automatically pull down and maintain +.Xr svn 1 +to pull down and maintain the .Fx -CVS archive once a day. +source. The first pull will take a long time, it is several gigabytes, but once you have it, -the daily synchronizations will be quite small. -.Bd -literal -offset 4n -mkdir /FreeBSD/FreeBSD-CVS -rm -rf /home/ncvs -ln -s /FreeBSD/FreeBSD-CVS /home/ncvs -.Ed -.Pp -The -.Xr cron 8 -job should look something like this (please randomize the time of -day!). -Note that you can use the -.Xr csup 1 -configuration file example directly from -.Pa /usr/share/examples -without modification by supplying appropriate arguments -to -.Xr csup 1 . -.Bd -literal -offset 4n -33 6 * * * /usr/bin/csup -r 20 -L 2 -h cvsup.freebsd.org /usr/share/examples/cvsup/cvs-supfile -.Ed -.Pp -Run the -.Xr csup 1 -manually the first time to pull down the archive. -It could take -all day depending on how fast your connection is! -You will run all -.Xr csup 1 -and -.Xr cvs 1 +the updates will be quite small. +Run all +.Xr svn 1 operations as .Dq Li root -and you need to set up a -.Pa ~/.cvsrc -.Pq Pa /root/.cvsrc -file, as shown below, for proper -.Xr cvs 1 -operation. -Using -.Pa ~/.cvsrc -to specify -.Xr cvs 1 -defaults is an excellent way to -.Dq "file and forget" , -but you should never forget that you put them in there. -.Bd -literal -offset 4n -# cvs -q -diff -u -update -Pd -checkout -P -.Ed -.Pp -Now use -.Xr cvs 1 -to check out a -STABLE source tree and a -CURRENT source tree, -as well as ports and docs, to create your initial source environment. +.Pp Keeping the broken-out source and ports in .Pa /FreeBSD allows you to export @@ -160,71 +109,16 @@ it to other machines via read-only NFS. This also means you only need to edit/maintain files in one place and all your clients automatically pick up the changes. .Bd -literal -offset 4n -mkdir /FreeBSD/FreeBSD-4.x -mkdir /FreeBSD/FreeBSD-current - -cd /FreeBSD/FreeBSD-4.x -cvs -d /home/ncvs checkout -rRELENG_4 src - -cd /FreeBSD/FreeBSD-current -cvs -d /home/ncvs checkout src -cvs -d /home/ncvs checkout ports -cvs -d /home/ncvs checkout doc -.Ed -.Pp -Now create a softlink for -.Pa /usr/src -and -.Pa /usr/src2 . -On the main server I always point -.Pa /usr/src -at -STABLE and -.Pa /usr/src2 -at -CURRENT. -On client machines I usually do not have a -.Pa /usr/src2 -and I make -.Pa /usr/src -point at whatever version of -.Fx -the client box is intended to -run. -.Bd -literal -offset 4n +mkdir /FreeBSD +cd /FreeBSD +svn co svn://svn.freebsd.org/ports/head ports +svn co svn://svn.freebsd.org/doc/head doc +svn co svn://svn.freebsd.org/base/head src cd /usr -rm -rf src src2 -ln -s /FreeBSD/FreeBSD-4.x/src src (could be -CURRENT on a client) -ln -s /FreeBSD/FreeBSD-current/src src2 (MASTER SERVER ONLY) +rm -rf src +ln -s /FreeBSD/src src .Ed .Pp -Now you have to make a choice for -.Pa /usr/obj . -Well, hopefully you made it already and chose the partition method. -If you -chose poorly you probably intend to put it in -.Pa /FreeBSD -and, if so, this is -what you want to do: -.Bd -literal -offset 4n -(ONLY IF YOU MADE A POOR CHOICE AND PUT /usr/obj in /FreeBSD!) -mkdir /FreeBSD/obj -cd /usr -rm -rf obj -ln -s /FreeBSD/obj obj -.Ed -.Pp -Alternatively you may chose simply to leave -.Pa /usr/obj -in -.Pa /usr . -If your -.Pa /usr -is large enough this will work, but I do not recommend it for -safety reasons -.Pa ( /usr/obj -is constantly being modified, -.Pa /usr -is not). -.Pp Note that exporting .Pa /usr/obj via read-only NFS to your other boxes will @@ -240,19 +134,17 @@ problems and issues down the line and pr It is far easier to do builds on the master server and then only do installs on the clients. .Pp -I usually maintain my ports tree via CVS. -It is sitting right there in the master CVS archive and I have even told you -to check it out (see above). +I usually maintain my ports tree via svn or portsnap. With some fancy softlinks you can make the ports tree available both on your master server and on all of your other machines. -Note that the ports tree exists only on the HEAD CVS branch, so its always --CURRENT even on a -STABLE box. +Note that the ports tree exists only on the HEAD ports branch, so its always +usable even on a -STABLE box. This is what you do: .Bd -literal -offset 4n (THESE COMMANDS ON THE MASTER SERVER AND ON ALL CLIENTS) cd /usr rm -rf ports -ln -s /FreeBSD/FreeBSD-current/ports ports +ln -s /FreeBSD/ports ports cd /usr/ports (this pushes into the softlink) rm -rf distfiles (ON MASTER SERVER ONLY) @@ -344,7 +236,7 @@ into the NFS-mounted environment. If a particular client is running -CURRENT, .Pa /usr/src should be a softlink to -.Pa /FreeBSD/FreeBSD-current/src . +.Pa /FreeBSD/src . If it is running -STABLE, .Pa /usr/src should be a softlink to @@ -359,8 +251,8 @@ human variety) on a client. (ON EACH CLIENT) cd /usr rm -rf ports src -ln -s /FreeBSD/FreeBSD-current/ports ports -ln -s /FreeBSD/FreeBSD-XXX/src src +ln -s /FreeBSD/ports ports +ln -s /FreeBSD/src src .Ed .Pp Do not forget to create the working directories so you can build ports, as @@ -521,11 +413,6 @@ subdirectory in which is typically local to the client. You can then do builds to your heart's content! .Sh MAINTAINING A LOCAL BRANCH -I have described how to maintain two versions of the source tree, a stable -version in -.Pa /FreeBSD/FreeBSD-4.x -and a current version in -.Pa /FreeBSD/FreeBSD-current . There is absolutely nothing preventing you from breaking out other versions of the source tree into @@ -548,135 +435,32 @@ which can build those other operating sy Many developers choose to maintain a local branch of .Fx to test patches or build a custom distribution. -This can be done with CVS or another source code management system -(SubVersion, Perforce, BitKeeper) with its own repository. -Since the main -.Fx -tree is based on CVS, the former is convenient. -.Pp -First, you need to modify your -.Xr csup 1 -environment to avoid it modifying -the local changes you have committed to the repository. -It is important to remove the -.Ic delete -keyword from your -.Pa supfile -and to add the -.Pa CVSROOT -subdirectory to your -.Pa refuse -file. -For more information, see -.Xr csup 1 . -.Pp -The -.Fx -version of -.Xr cvs 1 -examines a custom environmental variable, -.Ev CVS_LOCAL_BRANCH_NUM , -which specifies an integer to use when doing a -.Xr cvs 1 -.Cm tag Ns / Ns Cm rtag . -Set this number to something high (say 1000) to avoid colliding -with potential future branches of the main repository. -For example, -branching a file with version 1.4 produces 1.4.1000. -Future commits to this branch will produce revisions 1.4.1000.1, -1.4.1000.2, etc. -.Pp -To fork your local branch, do: -.Bd -literal -offset 4n -cvs rtag -r RELENG_4 -b LOCAL_RELENG_4 src -.Ed -.Pp -After this, you can check out a copy from your local repository using the -new tag and begin making changes and committing them. -For more information on using CVS, see -.Xr cvs 1 . -.Pp -.Sy WARNING! -The -.Xr csup 1 -utility may blow away changes made on a local branch in -some situations. -This has been reported to occur when the master CVS repository is -directly manipulated or an RCS file is changed. -At this point, -.Xr csup 1 -notices that the client and server have entirely -different RCS files, so it does a full replace instead of trying to -send just deltas. -Ideally this situation should never arise, but in the real world it -happens all the time. -.Pp -While this is the only scenario where the problem should crop up, -there have been some suspicious-sounding reports of -.Ev CVS_LOCAL_BRANCH_NUM -lossage that cannot be explained by this alone. -Bottom line is, if you value your local branch then you -should back it up before every update. -.Sh UPDATING VIA CVS -The advantage of using -.Xr csup 1 -to maintain an updated copy of the CVS -repository instead of using it to maintain source trees directly is that you -can then pick and choose when you bring your source tree (or pieces of your -source tree) up to date. +This can be done with svn or another source code management system +(git, mercurial, Perforce, BitKeeper) with its own repository. +.Sh "UPDATING VIA SVN" By using a .Xr cron 8 -job to maintain an updated CVS repository, you can update -your source tree at any time without any network cost as follows: +job to maintain an updated svn repository, +the source tree can be +updated at any time as follows: .Bd -literal -offset 4n (on the main development server) -cd /usr/src -cvs -d /home/ncvs update -cd /usr/src2 -cvs -d /home/ncvs update -cd /usr/ports -cvs -d /home/ncvs update +cd /usr +svn update src doc ports .Ed .Pp It is that simple, and since you are exporting the whole lot to your clients, your clients have immediate visibility into the updated source. This is a good time to also remind you that most of the -.Xr cvs 1 +.Xr svn 1 operations you do will be done as -.Dq Li root , -and that certain options are -required for CVS to operate properly on the -.Fx -repository. -For example, -.Fl Pd -is necessary when running -.Nm cvs Cm update . -These options are typically placed in your -.Pa ~/.cvsrc -(as already described) -so you do not have to re-specify them every time you run a -.Xr cvs 1 -command. -Maintaining the CVS repository also gives you far more flexibility -in regards to breaking out multiple versions of the source tree. +.Dq Li root . It is a good idea to give your .Pa /FreeBSD partition a lot of space (I recommend -8-12GB) precisely for that reason. -If you can make it 15GB I would do it. +10-15GB) precisely for that reason. .Pp -I generally do not -.Nm cvs Cm update -via a -.Xr cron 8 -job. -This is because I generally want the source to not change out from under me -when I am developing code. -Instead I manually update the source every so often...\& when I feel it is -a good time. -My recommendation is to only keep the CVS repository synchronized via .Xr cron 8 . .Sh SEE ALSO .Xr crontab 1 , @@ -696,3 +480,9 @@ and first appeared in .Fx 5.0 , December 2002. +It was since extensively modified by +.An Eitan Adler Aq eadler@FreeBSD.org +to reflect the repository conversion from +.Xr cvs +to +.Xr svn . Modified: projects/mtree/share/man/man9/vinvalbuf.9 ============================================================================== --- projects/mtree/share/man/man9/vinvalbuf.9 Thu Sep 20 18:21:29 2012 (r240760) +++ projects/mtree/share/man/man9/vinvalbuf.9 Thu Sep 20 18:42:00 2012 (r240761) @@ -110,8 +110,6 @@ set in .Fa slpflag ) .El .Sh SEE ALSO -.Xr brelse 9 , -.Xr bremfree 9 , .Xr tsleep 9 , .Xr VOP_FSYNC 9 .Sh AUTHORS Modified: projects/mtree/sys/boot/ofw/libofw/devicename.c ============================================================================== --- projects/mtree/sys/boot/ofw/libofw/devicename.c Thu Sep 20 18:21:29 2012 (r240760) +++ projects/mtree/sys/boot/ofw/libofw/devicename.c Thu Sep 20 18:42:00 2012 (r240761) @@ -105,7 +105,7 @@ ofw_parsedev(struct ofw_devdesc **dev, c return(ENOENT); found: - if (path != NULL && *s != '\0') + if (path != NULL) *path = s; idev = malloc(sizeof(struct ofw_devdesc)); if (idev == NULL) { Modified: projects/mtree/sys/cam/scsi/scsi_cd.c ============================================================================== --- projects/mtree/sys/cam/scsi/scsi_cd.c Thu Sep 20 18:21:29 2012 (r240760) +++ projects/mtree/sys/cam/scsi/scsi_cd.c Thu Sep 20 18:42:00 2012 (r240761) @@ -2080,6 +2080,7 @@ cdioctl(struct disk *dp, u_long cmd, voi || (st > (softc->toc.header.ending_track - softc->toc.header.starting_track))) { error = EINVAL; + cam_periph_unlock(periph); break; } sentry = &softc->toc.entries[st].addr; Modified: projects/mtree/sys/contrib/dev/acpica/changes.txt ============================================================================== --- projects/mtree/sys/contrib/dev/acpica/changes.txt Thu Sep 20 18:21:29 2012 (r240760) +++ projects/mtree/sys/contrib/dev/acpica/changes.txt Thu Sep 20 18:42:00 2012 (r240761) @@ -1,4 +1,75 @@ ---------------------------------------- +13 September 2012. Summary of changes for version 20120913: + +This release is available at https://www.acpica.org/downloads The ACPI 5.0 +specification is available at www.acpi.info + +1) ACPICA Kernel-resident Subsystem: + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Thu Sep 20 22:12:51 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 891F9106566B; Thu, 20 Sep 2012 22:12:51 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 749FD8FC0A; Thu, 20 Sep 2012 22:12:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8KMCpa4003201; Thu, 20 Sep 2012 22:12:51 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8KMCpeb003199; Thu, 20 Sep 2012 22:12:51 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201209202212.q8KMCpeb003199@svn.freebsd.org> From: Brooks Davis Date: Thu, 20 Sep 2012 22:12:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240765 - projects/mtree/contrib/mtree X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2012 22:12:51 -0000 Author: brooks Date: Thu Sep 20 22:12:50 2012 New Revision: 240765 URL: http://svn.freebsd.org/changeset/base/240765 Log: Indent the bare ".." in indent mode. Modified: projects/mtree/contrib/mtree/create.c Modified: projects/mtree/contrib/mtree/create.c ============================================================================== --- projects/mtree/contrib/mtree/create.c Thu Sep 20 19:05:24 2012 (r240764) +++ projects/mtree/contrib/mtree/create.c Thu Sep 20 22:12:50 2012 (r240765) @@ -137,8 +137,8 @@ cwalk(void) break; case FTS_DP: if (!nflag && p->fts_level > 0) - printf("%*s# %s\n..\n\n", indent, "", - p->fts_path); + printf("%*s# %s\n%*s..\n\n", indent, "", + p->fts_path, indent, ""); break; case FTS_DNR: case FTS_ERR: From owner-svn-src-projects@FreeBSD.ORG Thu Sep 20 22:56:12 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CD52106564A; Thu, 20 Sep 2012 22:56:12 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 68F198FC08; Thu, 20 Sep 2012 22:56:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8KMuCRX009031; Thu, 20 Sep 2012 22:56:12 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8KMuCj3009029; Thu, 20 Sep 2012 22:56:12 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201209202256.q8KMuCj3009029@svn.freebsd.org> From: Brooks Davis Date: Thu, 20 Sep 2012 22:56:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240766 - projects/mtree/contrib/mtree X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2012 22:56:12 -0000 Author: brooks Date: Thu Sep 20 22:56:11 2012 New Revision: 240766 URL: http://svn.freebsd.org/changeset/base/240766 Log: Tweak the output to match FreeBSD's mtree when running on FreeBSD systems: - Emit ripemd160digest= keywords rather them rmd160=. - Output the size of all objects rather than just regular files. - Emit the trailing .. when leaving the root directory. Modified: projects/mtree/contrib/mtree/create.c Modified: projects/mtree/contrib/mtree/create.c ============================================================================== --- projects/mtree/contrib/mtree/create.c Thu Sep 20 22:12:50 2012 (r240765) +++ projects/mtree/contrib/mtree/create.c Thu Sep 20 22:56:11 2012 (r240766) @@ -137,8 +137,12 @@ cwalk(void) break; case FTS_DP: if (!nflag && p->fts_level > 0) - printf("%*s# %s\n%*s..\n\n", indent, "", - p->fts_path, indent, ""); + printf("%*s# %s\n", indent, "", p->fts_path); +#ifndef __FreeBSD__ + if (p->fts_level > 0) +#endif + printf("%*s..\n\n", indent, ""); + break; case FTS_DNR: case FTS_ERR: @@ -202,7 +206,11 @@ statf(int indent, FTSENT *p) (long long)p->fts_statp->st_rdev); if (keys & F_NLINK && p->fts_statp->st_nlink != 1) output(indent, &offset, "nlink=%u", p->fts_statp->st_nlink); - if (keys & F_SIZE && S_ISREG(p->fts_statp->st_mode)) + if (keys & F_SIZE +#ifndef __FreeBSD__ + && S_ISREG(p->fts_statp->st_mode) +#endif + ) output(indent, &offset, "size=%lld", (long long)p->fts_statp->st_size); if (keys & F_TIME) @@ -233,7 +241,11 @@ statf(int indent, FTSENT *p) if (keys & F_RMD160 && S_ISREG(p->fts_statp->st_mode)) { if ((digestbuf = RMD160File(p->fts_accpath, NULL)) == NULL) mtree_err("%s: RMD160File failed: %s", p->fts_accpath, strerror(errno)); +#ifndef __FreeBSD__ output(indent, &offset, "rmd160=%s", digestbuf); +#else + output(indent, &offset, "ripemd160digest=%s", digestbuf); +#endif free(digestbuf); } #endif /* ! NO_RMD160 */ From owner-svn-src-projects@FreeBSD.ORG Thu Sep 20 23:00:02 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 406FD106566B; Thu, 20 Sep 2012 23:00:02 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0DA4D8FC0A; Thu, 20 Sep 2012 23:00:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8KN01L1009623; Thu, 20 Sep 2012 23:00:01 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8KN01S8009620; Thu, 20 Sep 2012 23:00:01 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201209202300.q8KN01S8009620@svn.freebsd.org> From: Brooks Davis Date: Thu, 20 Sep 2012 23:00:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240767 - projects/mtree/contrib/mtree X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2012 23:00:02 -0000 Author: brooks Date: Thu Sep 20 23:00:01 2012 New Revision: 240767 URL: http://svn.freebsd.org/changeset/base/240767 Log: Correctly format the nanoseconds by padding out to 9 digits. Document this with text from the FreeBSD manpage. Without this change a file modified on the first nanosecond of a second (N.000000001) would be reported to have been modified at precicely 100ms into the second (N.100000000). Modified: projects/mtree/contrib/mtree/create.c projects/mtree/contrib/mtree/mtree.8 projects/mtree/contrib/mtree/spec.c Modified: projects/mtree/contrib/mtree/create.c ============================================================================== --- projects/mtree/contrib/mtree/create.c Thu Sep 20 22:56:11 2012 (r240766) +++ projects/mtree/contrib/mtree/create.c Thu Sep 20 23:00:01 2012 (r240767) @@ -215,11 +215,11 @@ statf(int indent, FTSENT *p) (long long)p->fts_statp->st_size); if (keys & F_TIME) #if defined(BSD4_4) && !defined(HAVE_NBTOOL_CONFIG_H) - output(indent, &offset, "time=%ld.%ld", + output(indent, &offset, "time=%ld.%09ld", (long)p->fts_statp->st_mtimespec.tv_sec, p->fts_statp->st_mtimespec.tv_nsec); #else - output(indent, &offset, "time=%ld.%ld", + output(indent, &offset, "time=%ld.%09ld", (long)p->fts_statp->st_mtime, (long)0); #endif if (keys & F_CKSUM && S_ISREG(p->fts_statp->st_mode)) { Modified: projects/mtree/contrib/mtree/mtree.8 ============================================================================== --- projects/mtree/contrib/mtree/mtree.8 Thu Sep 20 22:56:11 2012 (r240766) +++ projects/mtree/contrib/mtree/mtree.8 Thu Sep 20 23:00:01 2012 (r240767) @@ -492,7 +492,10 @@ and These may be specified without leading or trailing commas, but will be stored internally with them. .It Sy time -The last modification time of the file. +The last modification time of the file, +in second and nanoseconds. +The value should include a period character and exactly nine digits after +the period. .It Sy type The type of the file; may be set to any one of the following: .Pp Modified: projects/mtree/contrib/mtree/spec.c ============================================================================== --- projects/mtree/contrib/mtree/spec.c Thu Sep 20 22:56:11 2012 (r240766) +++ projects/mtree/contrib/mtree/spec.c Thu Sep 20 23:00:01 2012 (r240767) @@ -358,7 +358,7 @@ dump_nodes(const char *dir, NODE *root, if (MATCHFLAG(F_SIZE)) appendfield(pathlast, "size=%lld", (long long)cur->st_size); if (MATCHFLAG(F_TIME)) - appendfield(pathlast, "time=%lld.%ld", + appendfield(pathlast, "time=%lld.%09ld", (long long)cur->st_mtimespec.tv_sec, cur->st_mtimespec.tv_nsec); if (MATCHFLAG(F_CKSUM)) From owner-svn-src-projects@FreeBSD.ORG Fri Sep 21 03:09:24 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 847F6106564A; Fri, 21 Sep 2012 03:09:24 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6E67E8FC0A; Fri, 21 Sep 2012 03:09:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8L39Oo5045479; Fri, 21 Sep 2012 03:09:24 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8L39O7c045473; Fri, 21 Sep 2012 03:09:24 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201209210309.q8L39O7c045473@svn.freebsd.org> From: Neel Natu Date: Fri, 21 Sep 2012 03:09:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240772 - in projects/bhyve/sys/amd64/vmm: . io X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Sep 2012 03:09:24 -0000 Author: neel Date: Fri Sep 21 03:09:23 2012 New Revision: 240772 URL: http://svn.freebsd.org/changeset/base/240772 Log: Restructure the x2apic access code in preparation for supporting memory mapped access to the local apic. The vlapic code is now aware of the mode that the guest is using to access the local apic. Reviewed by: grehan@ Modified: projects/bhyve/sys/amd64/vmm/io/vlapic.c projects/bhyve/sys/amd64/vmm/io/vlapic.h projects/bhyve/sys/amd64/vmm/vmm_lapic.c projects/bhyve/sys/amd64/vmm/vmm_lapic.h projects/bhyve/sys/amd64/vmm/vmm_msr.c Modified: projects/bhyve/sys/amd64/vmm/io/vlapic.c ============================================================================== --- projects/bhyve/sys/amd64/vmm/io/vlapic.c Fri Sep 21 03:07:34 2012 (r240771) +++ projects/bhyve/sys/amd64/vmm/io/vlapic.c Fri Sep 21 03:09:23 2012 (r240772) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -86,6 +87,8 @@ static MALLOC_DEFINE(M_VLAPIC, "vlapic", #define VLAPIC_VERSION (16) #define VLAPIC_MAXLVT_ENTRIES (5) +#define x2apic(vlapic) ((vlapic)->msr_apicbase & APICBASE_X2APIC) + struct vlapic { struct vm *vm; int vcpuid; @@ -107,6 +110,8 @@ struct vlapic { */ uint8_t isrvec_stk[ISRVEC_STK_SIZE]; int isrvec_stk_top; + + uint64_t msr_apicbase; }; static void @@ -161,7 +166,6 @@ vlapic_op_reset(void* dev) struct LAPIC *lapic = &vlapic->apic; memset(lapic, 0, sizeof(*lapic)); - lapic->id = vlapic->vcpuid << 24; lapic->apr = vlapic->vcpuid; vlapic_init_ipi(vlapic); @@ -542,7 +546,10 @@ vlapic_op_mem_read(void* dev, uint64_t g switch(offset) { case APIC_OFFSET_ID: - *data = lapic->id; + if (x2apic(vlapic)) + *data = vlapic->vcpuid; + else + *data = vlapic->vcpuid << 24; break; case APIC_OFFSET_VER: *data = lapic->version; @@ -631,7 +638,6 @@ vlapic_op_mem_write(void* dev, uint64_t switch(offset) { case APIC_OFFSET_ID: - lapic->id = data; break; case APIC_OFFSET_TPR: lapic->tpr = data & 0xff; @@ -760,6 +766,14 @@ vlapic_init(struct vm *vm, int vcpuid) vlapic = malloc(sizeof(struct vlapic), M_VLAPIC, M_WAITOK | M_ZERO); vlapic->vm = vm; vlapic->vcpuid = vcpuid; + + vlapic->msr_apicbase = DEFAULT_APIC_BASE | + APICBASE_ENABLED | + APICBASE_X2APIC; + + if (vcpuid == 0) + vlapic->msr_apicbase |= APICBASE_BSP; + vlapic->ops = &vlapic_dev_ops; vlapic->mmio = vlapic_mmio + vcpuid; @@ -782,3 +796,17 @@ vlapic_cleanup(struct vlapic *vlapic) vdev_unregister(vlapic); free(vlapic, M_VLAPIC); } + +uint64_t +vlapic_get_apicbase(struct vlapic *vlapic) +{ + + return (vlapic->msr_apicbase); +} + +void +vlapic_set_apicbase(struct vlapic *vlapic, uint64_t val) +{ + + vlapic->msr_apicbase = val; +} Modified: projects/bhyve/sys/amd64/vmm/io/vlapic.h ============================================================================== --- projects/bhyve/sys/amd64/vmm/io/vlapic.h Fri Sep 21 03:07:34 2012 (r240771) +++ projects/bhyve/sys/amd64/vmm/io/vlapic.h Fri Sep 21 03:09:23 2012 (r240772) @@ -102,4 +102,7 @@ void vlapic_intr_accepted(struct vlapic void vlapic_set_intr_ready(struct vlapic *vlapic, int vector); void vlapic_timer_tick(struct vlapic *vlapic); +uint64_t vlapic_get_apicbase(struct vlapic *vlapic); +void vlapic_set_apicbase(struct vlapic *vlapic, uint64_t val); + #endif /* _VLAPIC_H_ */ Modified: projects/bhyve/sys/amd64/vmm/vmm_lapic.c ============================================================================== --- projects/bhyve/sys/amd64/vmm/vmm_lapic.c Fri Sep 21 03:07:34 2012 (r240771) +++ projects/bhyve/sys/amd64/vmm/vmm_lapic.c Fri Sep 21 03:09:23 2012 (r240772) @@ -33,20 +33,18 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include #include "vmm_ipi.h" #include "vmm_lapic.h" #include "vlapic.h" -int -lapic_write(struct vm *vm, int cpu, u_int offset, uint64_t val) +static int +lapic_write(struct vlapic *vlapic, u_int offset, uint64_t val) { int handled; - struct vlapic *vlapic; - - vlapic = vm_lapic(vm, cpu); - if (vlapic_op_mem_write(vlapic, offset, DWORD, val) == 0) handled = 1; else @@ -55,15 +53,11 @@ lapic_write(struct vm *vm, int cpu, u_in return (handled); } -int -lapic_read(struct vm *vm, int cpu, u_int offset, uint64_t *rv) +static int +lapic_read(struct vlapic *vlapic, u_int offset, uint64_t *rv) { int handled; - struct vlapic *vlapic; - - vlapic = vm_lapic(vm, cpu); - if (vlapic_op_mem_read(vlapic, offset, DWORD, rv) == 0) handled = 1; else @@ -120,3 +114,63 @@ lapic_timer_tick(struct vm *vm, int cpu) vlapic_timer_tick(vlapic); } + +static boolean_t +x2apic_msr(u_int msr) +{ + if (msr >= 0x800 && msr <= 0xBFF) + return (TRUE); + else + return (FALSE); +} + +static u_int +x2apic_msr_to_regoff(u_int msr) +{ + + return ((msr - 0x800) << 4); +} + +boolean_t +lapic_msr(u_int msr) +{ + + if (x2apic_msr(msr) || (msr == MSR_APICBASE)) + return (TRUE); + else + return (FALSE); +} + +int +lapic_rdmsr(struct vm *vm, int cpu, u_int msr, uint64_t *rval) +{ + int handled; + struct vlapic *vlapic; + + vlapic = vm_lapic(vm, cpu); + + if (msr == MSR_APICBASE) { + *rval = vlapic_get_apicbase(vlapic); + handled = 1; + } else + handled = lapic_read(vlapic, x2apic_msr_to_regoff(msr), rval); + + return (handled); +} + +int +lapic_wrmsr(struct vm *vm, int cpu, u_int msr, uint64_t val) +{ + int handled; + struct vlapic *vlapic; + + vlapic = vm_lapic(vm, cpu); + + if (msr == MSR_APICBASE) { + vlapic_set_apicbase(vlapic, val); + handled = 1; + } else + handled = lapic_write(vlapic, x2apic_msr_to_regoff(msr), val); + + return (handled); +} Modified: projects/bhyve/sys/amd64/vmm/vmm_lapic.h ============================================================================== --- projects/bhyve/sys/amd64/vmm/vmm_lapic.h Fri Sep 21 03:07:34 2012 (r240771) +++ projects/bhyve/sys/amd64/vmm/vmm_lapic.h Fri Sep 21 03:09:23 2012 (r240772) @@ -31,8 +31,10 @@ struct vm; -int lapic_write(struct vm *vm, int cpu, u_int offset, uint64_t val); -int lapic_read(struct vm *vm, int cpu, u_int offset, uint64_t *retval); +boolean_t lapic_msr(u_int num); +int lapic_rdmsr(struct vm *vm, int cpu, u_int msr, uint64_t *rval); +int lapic_wrmsr(struct vm *vm, int cpu, u_int msr, uint64_t wval); + void lapic_timer_tick(struct vm *vm, int cpu); /* Modified: projects/bhyve/sys/amd64/vmm/vmm_msr.c ============================================================================== --- projects/bhyve/sys/amd64/vmm/vmm_msr.c Fri Sep 21 03:07:34 2012 (r240771) +++ projects/bhyve/sys/amd64/vmm/vmm_msr.c Fri Sep 21 03:09:23 2012 (r240772) @@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include "vmm_lapic.h" @@ -56,7 +55,6 @@ static struct vmm_msr vmm_msr[] = { { MSR_STAR, 0 }, { MSR_SF_MASK, 0 }, { MSR_PAT, VMM_MSR_F_EMULATE | VMM_MSR_F_INVALID }, - { MSR_APICBASE, VMM_MSR_F_EMULATE }, { MSR_BIOS_SIGN,VMM_MSR_F_EMULATE }, { MSR_MCG_CAP, VMM_MSR_F_EMULATE | VMM_MSR_F_READONLY }, }; @@ -107,12 +105,6 @@ guest_msrs_init(struct vm *vm, int cpu) case MSR_MCG_CAP: guest_msrs[i] = 0; break; - case MSR_APICBASE: - guest_msrs[i] = DEFAULT_APIC_BASE | APICBASE_ENABLED | - APICBASE_X2APIC; - if (cpu == 0) - guest_msrs[i] |= APICBASE_BSP; - break; case MSR_PAT: guest_msrs[i] = PAT_VALUE(0, PAT_WRITE_BACK) | PAT_VALUE(1, PAT_WRITE_THROUGH) | @@ -130,29 +122,6 @@ guest_msrs_init(struct vm *vm, int cpu) } } -static boolean_t -x2apic_msr(u_int num) -{ - - if (num >= 0x800 && num <= 0xBFF) - return (TRUE); - else - return (FALSE); -} - -static u_int -x2apic_msr_to_regoff(u_int msr) -{ - - return ((msr - 0x800) << 4); -} - -static boolean_t -x2apic_msr_id(u_int num) -{ - return (num == 0x802); -} - static int msr_num_to_idx(u_int num) { @@ -173,8 +142,8 @@ emulate_wrmsr(struct vm *vm, int cpu, u_ handled = 0; - if (x2apic_msr(num)) - return (lapic_write(vm, cpu, x2apic_msr_to_regoff(num), val)); + if (lapic_msr(num)) + return (lapic_wrmsr(vm, cpu, num, val)); idx = msr_num_to_idx(num); if (idx < 0) @@ -208,15 +177,8 @@ emulate_rdmsr(struct vm *vm, int cpu, u_ handled = 0; - if (x2apic_msr(num)) { - handled = lapic_read(vm, cpu, x2apic_msr_to_regoff(num), - &result); - /* - * The version ID needs to be massaged - */ - if (x2apic_msr_id(num)) { - result = result >> 24; - } + if (lapic_msr(num)) { + handled = lapic_rdmsr(vm, cpu, num, &result); goto done; } From owner-svn-src-projects@FreeBSD.ORG Fri Sep 21 19:22:44 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0BDCB106564A; Fri, 21 Sep 2012 19:22:44 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EBA068FC08; Fri, 21 Sep 2012 19:22:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8LJMhVu091094; Fri, 21 Sep 2012 19:22:43 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8LJMhvU091092; Fri, 21 Sep 2012 19:22:43 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201209211922.q8LJMhvU091092@svn.freebsd.org> From: Brooks Davis Date: Fri, 21 Sep 2012 19:22:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240785 - projects/mtree/contrib/mtree X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Sep 2012 19:22:44 -0000 Author: brooks Date: Fri Sep 21 19:22:43 2012 New Revision: 240785 URL: http://svn.freebsd.org/changeset/base/240785 Log: Allow uid and uname or gid and gname to both be printed while preserving the behavior of falling back to [ug]id when the name is not resolvable. Modified: projects/mtree/contrib/mtree/create.c Modified: projects/mtree/contrib/mtree/create.c ============================================================================== --- projects/mtree/contrib/mtree/create.c Fri Sep 21 19:18:39 2012 (r240784) +++ projects/mtree/contrib/mtree/create.c Fri Sep 21 19:22:43 2012 (r240785) @@ -187,14 +187,14 @@ statf(int indent, FTSENT *p) if (keys & F_UNAME && (name = user_from_uid(p->fts_statp->st_uid, 1)) != NULL) output(indent, &offset, "uname=%s", name); - else /* if (keys & F_UID) */ + if (keys & F_UID || (keys & F_UNAME && name == NULL)) output(indent, &offset, "uid=%u", p->fts_statp->st_uid); } if (keys & (F_GID | F_GNAME) && p->fts_statp->st_gid != gid) { if (keys & F_GNAME && (name = group_from_gid(p->fts_statp->st_gid, 1)) != NULL) output(indent, &offset, "gname=%s", name); - else /* if (keys & F_GID) */ + if (keys & F_GID || (keys & F_GNAME && name == NULL)) output(indent, &offset, "gid=%u", p->fts_statp->st_gid); } if (keys & F_MODE && (p->fts_statp->st_mode & MBITS) != mode) @@ -385,14 +385,14 @@ statd(FTS *t, FTSENT *parent, uid_t *pui if (keys & F_UNAME && (name = user_from_uid(saveuid, 1)) != NULL) printf(" uname=%s", name); - else /* if (keys & F_UID) */ + if (keys & F_UID || (keys & F_UNAME && name == NULL)) printf(" uid=%lu", (u_long)saveuid); } if (keys & (F_GID | F_GNAME)) { if (keys & F_GNAME && (name = group_from_gid(savegid, 1)) != NULL) printf(" gname=%s", name); - else /* if (keys & F_UID) */ + if (keys & F_GID || (keys & F_GNAME && name == NULL)) printf(" gid=%lu", (u_long)savegid); } if (keys & F_MODE) From owner-svn-src-projects@FreeBSD.ORG Fri Sep 21 19:26:22 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 81DCE1065672; Fri, 21 Sep 2012 19:26:22 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 621CF8FC0A; Fri, 21 Sep 2012 19:26:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8LJQM1I091695; Fri, 21 Sep 2012 19:26:22 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8LJQMBG091688; Fri, 21 Sep 2012 19:26:22 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201209211926.q8LJQMBG091688@svn.freebsd.org> From: Brooks Davis Date: Fri, 21 Sep 2012 19:26:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240786 - projects/mtree/contrib/mtree X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Sep 2012 19:26:22 -0000 Author: brooks Date: Fri Sep 21 19:26:21 2012 New Revision: 240786 URL: http://svn.freebsd.org/changeset/base/240786 Log: Implement the ability to compare two spec files with -f spec1 -f spec2. Obtained from: FreeBSD (phk) Added: projects/mtree/contrib/mtree/specspec.c (contents, props changed) - copied, changed from r240785, projects/mtree/usr.sbin/mtree/specspec.c Modified: projects/mtree/contrib/mtree/Makefile projects/mtree/contrib/mtree/extern.h projects/mtree/contrib/mtree/mtree.c projects/mtree/contrib/mtree/mtree.h projects/mtree/contrib/mtree/verify.c Modified: projects/mtree/contrib/mtree/Makefile ============================================================================== --- projects/mtree/contrib/mtree/Makefile Fri Sep 21 19:22:43 2012 (r240785) +++ projects/mtree/contrib/mtree/Makefile Fri Sep 21 19:26:21 2012 (r240786) @@ -7,7 +7,8 @@ PROG= mtree #CPPFLAGS+=-DDEBUG CPPFLAGS+= -DMTREE MAN= mtree.8 -SRCS= compare.c crc.c create.c excludes.c misc.c mtree.c spec.c verify.c \ +SRCS= compare.c crc.c create.c excludes.c misc.c mtree.c spec.c specspec.c \ + verify.c \ getid.c pack_dev.c .if (${HOSTPROG:U} == "") DPADD+= ${LIBUTIL} Modified: projects/mtree/contrib/mtree/extern.h ============================================================================== --- projects/mtree/contrib/mtree/extern.h Fri Sep 21 19:22:43 2012 (r240785) +++ projects/mtree/contrib/mtree/extern.h Fri Sep 21 19:26:21 2012 (r240786) @@ -67,7 +67,7 @@ void parsetags(slist_t *, char *); u_int parsetype(const char *); void read_excludes_file(const char *); const char *rlink(const char *); -int verify(void); +int verify(FILE *); extern int dflag, eflag, iflag, jflag, lflag, mflag, nflag, qflag, rflag, sflag, tflag, uflag; Modified: projects/mtree/contrib/mtree/mtree.c ============================================================================== --- projects/mtree/contrib/mtree/mtree.c Fri Sep 21 19:22:43 2012 (r240785) +++ projects/mtree/contrib/mtree/mtree.c Fri Sep 21 19:26:21 2012 (r240786) @@ -70,11 +70,14 @@ main(int argc, char **argv) { int ch, status; char *dir, *p; + FILE *spec1, *spec2; setprogname(argv[0]); dir = NULL; init_excludes(); + spec1 = stdin; + spec2 = NULL; while ((ch = getopt(argc, argv, "cCdDeE:f:I:ijk:K:lLmMnN:p:PqrR:s:StuUwWxX:")) @@ -99,8 +102,18 @@ main(int argc, char **argv) eflag = 1; break; case 'f': - if (!(freopen(optarg, "r", stdin))) - mtree_err("%s: %s", optarg, strerror(errno)); + if (spec1 == stdin) { + spec1 = fopen(optarg, "r"); + if (spec1 == NULL) + mtree_err("%s: %s", optarg, + strerror(errno)); + } else if (spec2 == NULL) { + spec2 = fopen(optarg, "r"); + if (spec2 == NULL) + mtree_err("%s: %s", optarg, + strerror(errno)); + } else + usage(); break; case 'i': iflag = 1; @@ -223,10 +236,13 @@ main(int argc, char **argv) exit(0); } if (Cflag || Dflag) { - dump_nodes("", spec(stdin), Dflag); + dump_nodes("", spec(spec1), Dflag); exit(0); } - status = verify(); + if (spec2 != NULL) + status = mtree_specspec(spec1, spec2); + else + status = verify(spec1); if (Uflag && (status == MISMATCHEXIT)) status = 0; exit(status); @@ -237,7 +253,8 @@ usage(void) { fprintf(stderr, - "usage: %s [-CcDdeLlMnPrSUuWx] [-i|-m] [-E tags] [-f spec]\n" + "usage: %s [-CcDdeLlMnPrSUuWx] [-i|-m] [-E tags]\n" + "\t\t[-f spec] [-f spec]\n" "\t\t[-I tags] [-K keywords] [-k keywords] [-N dbdir] [-p path]\n" "\t\t[-R keywords] [-s seed] [-X exclude-file]\n", getprogname()); Modified: projects/mtree/contrib/mtree/mtree.h ============================================================================== --- projects/mtree/contrib/mtree/mtree.h Fri Sep 21 19:22:43 2012 (r240785) +++ projects/mtree/contrib/mtree/mtree.h Fri Sep 21 19:26:21 2012 (r240786) @@ -120,6 +120,7 @@ const char *inotype(u_int); u_int nodetoino(u_int); int setup_getid(const char *); NODE *spec(FILE *); +int mtree_specspec(FILE *, FILE *); void free_nodes(NODE *); char *vispath(const char *); Copied and modified: projects/mtree/contrib/mtree/specspec.c (from r240785, projects/mtree/usr.sbin/mtree/specspec.c) ============================================================================== --- projects/mtree/usr.sbin/mtree/specspec.c Fri Sep 21 19:22:43 2012 (r240785, copy source) +++ projects/mtree/contrib/mtree/specspec.c Fri Sep 21 19:26:21 2012 (r240786) @@ -32,6 +32,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include "mtree.h" #include "extern.h" @@ -49,7 +51,7 @@ shownode(NODE *n, int f, char const *pat struct group *gr; struct passwd *pw; - printf("%s%s %s", path, n->name, ftype(n->type)); + printf("%s%s %s", path, n->name, inotype(nodetoino(n->type))); if (f & F_CKSUM) printf(" cksum=%lu", n->cksum); if (f & F_GID) @@ -85,7 +87,7 @@ shownode(NODE *n, int f, char const *pat if (f & F_SHA256) printf(" sha256digest=%s", n->sha256digest); if (f & F_FLAGS) - printf(" flags=%s", flags_to_string(n->st_flags)); + printf(" flags=%s", flags_to_string(n->st_flags, "none")); printf("\n"); } @@ -246,8 +248,8 @@ mtree_specspec(FILE *fi, FILE *fj) int rval; NODE *root1, *root2; - root1 = mtree_readspec(fi); - root2 = mtree_readspec(fj); + root1 = spec(fi); + root2 = spec(fj); rval = walk_in_the_forest(root1, root2, ""); rval += compare_nodes(root1, root2, ""); if (rval > 0) Modified: projects/mtree/contrib/mtree/verify.c ============================================================================== --- projects/mtree/contrib/mtree/verify.c Fri Sep 21 19:22:43 2012 (r240785) +++ projects/mtree/contrib/mtree/verify.c Fri Sep 21 19:26:21 2012 (r240786) @@ -64,11 +64,11 @@ static void miss(NODE *, char *); static int vwalk(void); int -verify(void) +verify(FILE *fi) { int rval; - root = spec(stdin); + root = spec(fi); rval = vwalk(); miss(root, path); return (rval); From owner-svn-src-projects@FreeBSD.ORG Fri Sep 21 19:27:14 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 62FF61065672; Fri, 21 Sep 2012 19:27:14 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E8CA8FC08; Fri, 21 Sep 2012 19:27:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8LJREa3091863; Fri, 21 Sep 2012 19:27:14 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8LJRE0e091855; Fri, 21 Sep 2012 19:27:14 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201209211927.q8LJRE0e091855@svn.freebsd.org> From: Brooks Davis Date: Fri, 21 Sep 2012 19:27:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240787 - in projects/mtree/usr.sbin/nmtree: . test X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Sep 2012 19:27:14 -0000 Author: brooks Date: Fri Sep 21 19:27:13 2012 New Revision: 240787 URL: http://svn.freebsd.org/changeset/base/240787 Log: Hook specspec.c up to the build. Added: projects/mtree/usr.sbin/nmtree/test/ - copied from r240761, projects/mtree/usr.sbin/mtree/test/ Modified: projects/mtree/usr.sbin/nmtree/Makefile projects/mtree/usr.sbin/nmtree/test/test00.sh projects/mtree/usr.sbin/nmtree/test/test01.sh projects/mtree/usr.sbin/nmtree/test/test02.sh projects/mtree/usr.sbin/nmtree/test/test03.sh projects/mtree/usr.sbin/nmtree/test/test04.sh projects/mtree/usr.sbin/nmtree/test/test05.sh Modified: projects/mtree/usr.sbin/nmtree/Makefile ============================================================================== --- projects/mtree/usr.sbin/nmtree/Makefile Fri Sep 21 19:26:21 2012 (r240786) +++ projects/mtree/usr.sbin/nmtree/Makefile Fri Sep 21 19:27:13 2012 (r240787) @@ -11,7 +11,8 @@ CFLAGS+= -DNO_SHA384 -I${.CURDIR} LDADD+= -lmd -lutil #MAN= mtree.8 MAN= -SRCS= compare.c crc.c create.c excludes.c misc.c mtree.c spec.c verify.c \ +SRCS= compare.c crc.c create.c excludes.c misc.c mtree.c spec.c specspec.c \ + verify.c \ getid.c pack_dev.c SRCS+= sha1.h sha2.h util.c util.h Modified: projects/mtree/usr.sbin/nmtree/test/test00.sh ============================================================================== --- projects/mtree/usr.sbin/mtree/test/test00.sh Thu Sep 20 18:42:00 2012 (r240761) +++ projects/mtree/usr.sbin/nmtree/test/test00.sh Fri Sep 21 19:27:13 2012 (r240787) @@ -18,7 +18,7 @@ mkdir -p ${TMP} ${TMP}/mr ${TMP}/mt mkdir ${TMP}/mt/foo mkdir ${TMP}/mr/\* -mtree -c -p ${TMP}/mr | mtree -U -r -p ${TMP}/mt > /dev/null 2>&1 +nmtree -c -p ${TMP}/mr | nmtree -U -r -p ${TMP}/mt > /dev/null 2>&1 if [ -d ${TMP}/mt/foo ] ; then echo "ERROR Mtree create fell for filename with '*' char" 1>&2 rm -rf ${TMP} @@ -28,7 +28,7 @@ rmdir ${TMP}/mr/\* mkdir -p ${TMP}/mt/foo mkdir ${TMP}/mr/\[f\]oo -mtree -c -p ${TMP}/mr | mtree -U -r -p ${TMP}/mt > /dev/null 2>&1 +nmtree -c -p ${TMP}/mr | nmtree -U -r -p ${TMP}/mt > /dev/null 2>&1 if [ -d ${TMP}/mt/foo ] ; then echo "ERROR Mtree create fell for filename with '[' char" 1>&2 rm -rf ${TMP} @@ -38,7 +38,7 @@ rmdir ${TMP}/mr/\[f\]oo mkdir -p ${TMP}/mt/foo mkdir ${TMP}/mr/\?oo -mtree -c -p ${TMP}/mr | mtree -U -r -p ${TMP}/mt > /dev/null 2>&1 +nmtree -c -p ${TMP}/mr | nmtree -U -r -p ${TMP}/mt > /dev/null 2>&1 if [ -d ${TMP}/mt/foo ] ; then echo "ERROR Mtree create fell for filename with '?' char" 1>&2 rm -rf ${TMP} @@ -47,8 +47,8 @@ fi rmdir ${TMP}/mr/\?oo mkdir ${TMP}/mr/\# -mtree -c -p ${TMP}/mr > ${TMP}/_ -if mtree -U -r -p ${TMP}/mt < ${TMP}/_ > /dev/null 2>&1 ; then +nmtree -c -p ${TMP}/mr > ${TMP}/_ +if nmtree -U -r -p ${TMP}/mt < ${TMP}/_ > /dev/null 2>&1 ; then true else echo "ERROR Mtree create fell for filename with '#' char" 1>&2 Modified: projects/mtree/usr.sbin/nmtree/test/test01.sh ============================================================================== --- projects/mtree/usr.sbin/mtree/test/test01.sh Thu Sep 20 18:42:00 2012 (r240761) +++ projects/mtree/usr.sbin/nmtree/test/test01.sh Fri Sep 21 19:27:13 2012 (r240787) @@ -17,9 +17,9 @@ mkdir -p ${TMP} ${TMP}/mr ${TMP}/mt ln -s "xx this=is=wrong" ${TMP}/mr/foo -mtree -c -p ${TMP}/mr > ${TMP}/_ +nmtree -c -p ${TMP}/mr > ${TMP}/_ -if mtree -U -r -p ${TMP}/mt < ${TMP}/_ > /dev/null 2>&1 ; then +if nmtree -U -r -p ${TMP}/mt < ${TMP}/_ > /dev/null 2>&1 ; then true else echo "ERROR Mtree failed on symlink with space char" 1>&2 Modified: projects/mtree/usr.sbin/nmtree/test/test02.sh ============================================================================== --- projects/mtree/usr.sbin/mtree/test/test02.sh Thu Sep 20 18:42:00 2012 (r240761) +++ projects/mtree/usr.sbin/nmtree/test/test02.sh Fri Sep 21 19:27:13 2012 (r240787) @@ -18,9 +18,9 @@ mkdir -p ${TMP} ${TMP}/mr ${TMP}/mt touch -t 199901020304 ${TMP}/mr/oldfile touch ${TMP}/mt/oldfile -mtree -c -p ${TMP}/mr > ${TMP}/_ +nmtree -c -p ${TMP}/mr > ${TMP}/_ -mtree -U -r -p ${TMP}/mt < ${TMP}/_ > /dev/null +nmtree -U -r -p ${TMP}/mt < ${TMP}/_ > /dev/null x=x`(cd ${TMP}/mr ; ls -l 2>&1) || true` y=x`(cd ${TMP}/mt ; ls -l 2>&1) || true` Modified: projects/mtree/usr.sbin/nmtree/test/test03.sh ============================================================================== --- projects/mtree/usr.sbin/mtree/test/test03.sh Thu Sep 20 18:42:00 2012 (r240761) +++ projects/mtree/usr.sbin/nmtree/test/test03.sh Fri Sep 21 19:27:13 2012 (r240787) @@ -14,8 +14,9 @@ TMP=/tmp/mtree.$$ rm -rf ${TMP} mkdir -p ${TMP} +echo ${TMP} -K=uid,uname,gid,gname,flags,md5digest,size,ripemd160digest,sha1digest,sha256digest,cksum +K=uid,uname,gid,gname,flags,size,cksum rm -rf _FOO mkdir _FOO @@ -24,8 +25,8 @@ touch _FOO/_size touch _FOO/zztype touch _FOO/_bar -mtree -c -K $K -p .. > ${TMP}/_r -mtree -c -K $K -p .. > ${TMP}/_r2 +nmtree -c -K $K -p .. > ${TMP}/_r +nmtree -c -K $K -p .. > ${TMP}/_r2 rm -rf _FOO/_bar rm -rf _FOO/zztype @@ -36,18 +37,18 @@ date > _FOO/_size chown nobody _FOO/_uid touch _FOO/_foo -mtree -c -K $K -p .. > ${TMP}/_t +nmtree -c -K $K -p .. > ${TMP}/_t rm -fr _FOO -if mtree -f ${TMP}/_r -f ${TMP}/_r2 ; then +if nmtree -f ${TMP}/_r -f ${TMP}/_r2 ; then true else echo "ERROR Compare identical failed" 1>&2 exit 1 fi -if mtree -f ${TMP}/_r -f ${TMP}/_t > ${TMP}/_ ; then +if nmtree -f ${TMP}/_r -f ${TMP}/_t > ${TMP}/_ ; then echo "ERROR Compare different succeeded" 1>&2 exit 1 fi Modified: projects/mtree/usr.sbin/nmtree/test/test04.sh ============================================================================== --- projects/mtree/usr.sbin/mtree/test/test04.sh Thu Sep 20 18:42:00 2012 (r240761) +++ projects/mtree/usr.sbin/nmtree/test/test04.sh Fri Sep 21 19:27:13 2012 (r240787) @@ -21,10 +21,10 @@ mkdir ${TMP}/mt/a mkdir ${TMP}/mt/b touch ${TMP}/mt/z -mtree -c -p ${TMP}/mr > ${TMP}/_r -mtree -c -p ${TMP}/mt > ${TMP}/_t +nmtree -c -p ${TMP}/mr > ${TMP}/_r +nmtree -c -p ${TMP}/mt > ${TMP}/_t -if mtree -f ${TMP}/_r -f ${TMP}/_t > ${TMP}/_ ; then +if nmtree -f ${TMP}/_r -f ${TMP}/_t > ${TMP}/_ ; then echo "ERROR wrong exit on difference" 1>&2 exit 1 fi @@ -35,7 +35,7 @@ if [ `wc -l < ${TMP}/_` -ne 1 ] ; then exit 1 fi -if mtree -f ${TMP}/_t -f ${TMP}/_r > ${TMP}/_ ; then +if nmtree -f ${TMP}/_t -f ${TMP}/_r > ${TMP}/_ ; then echo "ERROR wrong exit on difference" 1>&2 exit 1 fi Modified: projects/mtree/usr.sbin/nmtree/test/test05.sh ============================================================================== --- projects/mtree/usr.sbin/mtree/test/test05.sh Thu Sep 20 18:42:00 2012 (r240761) +++ projects/mtree/usr.sbin/nmtree/test/test05.sh Fri Sep 21 19:27:13 2012 (r240787) @@ -9,9 +9,9 @@ TMP=`mktemp -d /tmp/mtree.XXXXXX` mkdir -p ${TMP}/mr ${TMP}/mr/optional-dir ${TMP}/mr/some-dir touch ${TMP}/mr/optional-file ${TMP}/mr/some-file -mtree -c -p ${TMP}/mr > ${TMP}/_ +nmtree -c -p ${TMP}/mr > ${TMP}/_ rm -rf ${TMP}/mr/optional-file ${TMP}/mr/optional-dir -mtree -p ${TMP}/mr -K optional < ${TMP}/_ > /dev/null +nmtree -p ${TMP}/mr -K optional < ${TMP}/_ > /dev/null res=$? From owner-svn-src-projects@FreeBSD.ORG Fri Sep 21 19:30:37 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 46577106566C; Fri, 21 Sep 2012 19:30:37 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 322B58FC1A; Fri, 21 Sep 2012 19:30:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8LJUbk4092397; Fri, 21 Sep 2012 19:30:37 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8LJUauh092394; Fri, 21 Sep 2012 19:30:36 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201209211930.q8LJUauh092394@svn.freebsd.org> From: Brooks Davis Date: Fri, 21 Sep 2012 19:30:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240788 - projects/mtree/contrib/mtree X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Sep 2012 19:30:37 -0000 Author: brooks Date: Fri Sep 21 19:30:36 2012 New Revision: 240788 URL: http://svn.freebsd.org/changeset/base/240788 Log: Document -f spec1 -f spec2. Modified: projects/mtree/contrib/mtree/mtree.8 Modified: projects/mtree/contrib/mtree/mtree.8 ============================================================================== --- projects/mtree/contrib/mtree/mtree.8 Fri Sep 21 19:27:13 2012 (r240787) +++ projects/mtree/contrib/mtree/mtree.8 Fri Sep 21 19:30:36 2012 (r240788) @@ -143,6 +143,18 @@ specification. Read the specification from .Ar file , instead of from the standard input. +.Pp +If this option is specified twice, the two specifications are compared +to each other rather than to the file hierarchy. +The specifications will be sorted like output generated using +.Fl c . +The output format in this case is somewhat remniscent of +.Xr comm 1 , +having "in first spec only", "in second spec only", and "different" +columns, prefixed by zero, one and two TAB characters respectively. +Each entry in the "different" column occupies two lines, one from each +specifica +tion. .It Fl I Ar tags Add the comma separated tags to the .Dq inclusion From owner-svn-src-projects@FreeBSD.ORG Fri Sep 21 20:03:14 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2F33A1065672; Fri, 21 Sep 2012 20:03:14 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1B0D28FC12; Fri, 21 Sep 2012 20:03:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8LK3D7f097789; Fri, 21 Sep 2012 20:03:13 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8LK3DQq097787; Fri, 21 Sep 2012 20:03:13 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201209212003.q8LK3DQq097787@svn.freebsd.org> From: Brooks Davis Date: Fri, 21 Sep 2012 20:03:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240789 - projects/mtree/contrib/mtree X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Sep 2012 20:03:14 -0000 Author: brooks Date: Fri Sep 21 20:03:13 2012 New Revision: 240789 URL: http://svn.freebsd.org/changeset/base/240789 Log: Escape literal glob characters in files to avoid unexpected effects when using the resulting spec file to update. Obtained from: FreeBSD (phk) Modified: projects/mtree/contrib/mtree/spec.c Modified: projects/mtree/contrib/mtree/spec.c ============================================================================== --- projects/mtree/contrib/mtree/spec.c Fri Sep 21 19:30:36 2012 (r240788) +++ projects/mtree/contrib/mtree/spec.c Fri Sep 21 20:03:13 2012 (r240789) @@ -415,7 +415,8 @@ dump_nodes(const char *dir, NODE *root, char * vispath(const char *path) { - const char extra[] = { ' ', '\t', '\n', '\\', '#', '\0' }; + const char extra[] = { ' ', '\t', '\n', '\\', '#', '*', '?', '[', + '#', '\0' }; static char pathbuf[4*MAXPATHLEN + 1]; strsvis(pathbuf, path, VIS_CSTYLE, extra); From owner-svn-src-projects@FreeBSD.ORG Fri Sep 21 20:14:28 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41773106566B; Fri, 21 Sep 2012 20:14:28 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2DFE78FC14; Fri, 21 Sep 2012 20:14:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8LKESHl099603; Fri, 21 Sep 2012 20:14:28 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8LKER3E099600; Fri, 21 Sep 2012 20:14:27 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201209212014.q8LKER3E099600@svn.freebsd.org> From: Brooks Davis Date: Fri, 21 Sep 2012 20:14:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240790 - projects/mtree/contrib/mtree X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Sep 2012 20:14:28 -0000 Author: brooks Date: Fri Sep 21 20:14:27 2012 New Revision: 240790 URL: http://svn.freebsd.org/changeset/base/240790 Log: Make -t the default on FreeBSD systems. Add a -T which disables this behavior and document the defaults. Modified: projects/mtree/contrib/mtree/mtree.8 projects/mtree/contrib/mtree/mtree.c Modified: projects/mtree/contrib/mtree/mtree.8 ============================================================================== --- projects/mtree/contrib/mtree/mtree.8 Fri Sep 21 20:03:13 2012 (r240789) +++ projects/mtree/contrib/mtree/mtree.8 Fri Sep 21 20:14:27 2012 (r240790) @@ -300,6 +300,16 @@ The checksum is seeded with the specifie .It Fl t Modify the modified time of existing files, the device type of devices, and symbolic link targets, to match the specification. +This is the default on +.Fx +systems. +.It Fl T +.Em Do not +modify the modified timeof existing files, the device type of devices, and +symbolic link targets, to match the specification. +This is the default on systems other than +.Fx +. .It Fl U Same as .Fl u Modified: projects/mtree/contrib/mtree/mtree.c ============================================================================== --- projects/mtree/contrib/mtree/mtree.c Fri Sep 21 20:03:13 2012 (r240789) +++ projects/mtree/contrib/mtree/mtree.c Fri Sep 21 20:14:27 2012 (r240790) @@ -79,8 +79,12 @@ main(int argc, char **argv) spec1 = stdin; spec2 = NULL; +#ifdef __FreeBSD__ + tflag = 1; +#endif + while ((ch = getopt(argc, argv, - "cCdDeE:f:I:ijk:K:lLmMnN:p:PqrR:s:StuUwWxX:")) + "cCdDeE:f:I:ijk:K:lLmMnN:p:PqrR:s:StTuUwWxX:")) != -1) { switch((char)ch) { case 'c': @@ -187,6 +191,9 @@ main(int argc, char **argv) case 't': tflag = 1; break; + case 'T': + tflag = 0; + break; case 'u': uflag = 1; break; From owner-svn-src-projects@FreeBSD.ORG Fri Sep 21 20:30:59 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D36021065674; Fri, 21 Sep 2012 20:30:59 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BF6E68FC17; Fri, 21 Sep 2012 20:30:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8LKUxeQ002392; Fri, 21 Sep 2012 20:30:59 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8LKUxdY002390; Fri, 21 Sep 2012 20:30:59 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201209212030.q8LKUxdY002390@svn.freebsd.org> From: Brooks Davis Date: Fri, 21 Sep 2012 20:30:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240791 - projects/mtree/contrib/mtree X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Sep 2012 20:30:59 -0000 Author: brooks Date: Fri Sep 21 20:30:59 2012 New Revision: 240791 URL: http://svn.freebsd.org/changeset/base/240791 Log: Don't allow "-f spec1 -f spec2" with -c, -C, -D, or -p. Obtained from: Julian Fagir Modified: projects/mtree/contrib/mtree/mtree.c Modified: projects/mtree/contrib/mtree/mtree.c ============================================================================== --- projects/mtree/contrib/mtree/mtree.c Fri Sep 21 20:14:27 2012 (r240790) +++ projects/mtree/contrib/mtree/mtree.c Fri Sep 21 20:30:59 2012 (r240791) @@ -223,6 +223,13 @@ main(int argc, char **argv) if (argc) usage(); + if (spec2 && (cflag || Cflag || Dflag)) + mtree_err("Double -f, -c, -C and -D flags are mutually " + "exclusive"); + + if (dir && spec2) + mtree_err("Double -f and -p flags are mutually exclusive"); + if (dir && chdir(dir)) mtree_err("%s: %s", dir, strerror(errno)); From owner-svn-src-projects@FreeBSD.ORG Fri Sep 21 20:59:23 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31557106570D; Fri, 21 Sep 2012 20:59:23 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1CB758FC08; Fri, 21 Sep 2012 20:59:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8LKxM4k007133; Fri, 21 Sep 2012 20:59:22 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8LKxMaH007131; Fri, 21 Sep 2012 20:59:22 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201209212059.q8LKxMaH007131@svn.freebsd.org> From: Brooks Davis Date: Fri, 21 Sep 2012 20:59:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240792 - projects/mtree/contrib/mtree X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Sep 2012 20:59:23 -0000 Author: brooks Date: Fri Sep 21 20:59:22 2012 New Revision: 240792 URL: http://svn.freebsd.org/changeset/base/240792 Log: s/timeof/time of/ Submitted by: bjk Modified: projects/mtree/contrib/mtree/mtree.8 Modified: projects/mtree/contrib/mtree/mtree.8 ============================================================================== --- projects/mtree/contrib/mtree/mtree.8 Fri Sep 21 20:30:59 2012 (r240791) +++ projects/mtree/contrib/mtree/mtree.8 Fri Sep 21 20:59:22 2012 (r240792) @@ -305,7 +305,7 @@ This is the default on systems. .It Fl T .Em Do not -modify the modified timeof existing files, the device type of devices, and +modify the modified time of existing files, the device type of devices, and symbolic link targets, to match the specification. This is the default on systems other than .Fx From owner-svn-src-projects@FreeBSD.ORG Fri Sep 21 21:31:51 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECAE8106564A; Fri, 21 Sep 2012 21:31:51 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D8E5B8FC0C; Fri, 21 Sep 2012 21:31:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8LLVpWS012970; Fri, 21 Sep 2012 21:31:51 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8LLVpKd012968; Fri, 21 Sep 2012 21:31:51 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201209212131.q8LLVpKd012968@svn.freebsd.org> From: Brooks Davis Date: Fri, 21 Sep 2012 21:31:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240794 - projects/mtree/contrib/mtree X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Sep 2012 21:31:52 -0000 Author: brooks Date: Fri Sep 21 21:31:51 2012 New Revision: 240794 URL: http://svn.freebsd.org/changeset/base/240794 Log: Add support sha386 and sha512 when comparing spec files. Modified: projects/mtree/contrib/mtree/specspec.c Modified: projects/mtree/contrib/mtree/specspec.c ============================================================================== --- projects/mtree/contrib/mtree/specspec.c Fri Sep 21 21:27:57 2012 (r240793) +++ projects/mtree/contrib/mtree/specspec.c Fri Sep 21 21:31:51 2012 (r240794) @@ -86,6 +86,10 @@ shownode(NODE *n, int f, char const *pat printf(" rmd160digest=%s", n->rmd160digest); if (f & F_SHA256) printf(" sha256digest=%s", n->sha256digest); + if (f & F_SHA384) + printf(" sha384=%s", n->sha384digest); + if (f & F_SHA512) + printf(" sha512=%s", n->sha512digest); if (f & F_FLAGS) printf(" flags=%s", flags_to_string(n->st_flags, "none")); printf("\n"); @@ -166,6 +170,10 @@ compare_nodes(NODE *n1, NODE *n2, char c differs |= F_RMD160; if (FS(n1, n2, F_SHA256, sha256digest)) differs |= F_SHA256; + if (FS(n1, n2, F_SHA384, sha384digest)) + differs |= F_SHA384; + if (FS(n1, n2, F_SHA512, sha512digest)) + differs |= F_SHA512; if (FF(n1, n2, F_FLAGS, st_flags)) differs |= F_FLAGS; if (differs) { From owner-svn-src-projects@FreeBSD.ORG Fri Sep 21 21:52:15 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29D4F106566C; Fri, 21 Sep 2012 21:52:15 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 13D468FC08; Fri, 21 Sep 2012 21:52:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8LLqE4w016365; Fri, 21 Sep 2012 21:52:14 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8LLqEg5016359; Fri, 21 Sep 2012 21:52:14 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201209212152.q8LLqEg5016359@svn.freebsd.org> From: Brooks Davis Date: Fri, 21 Sep 2012 21:52:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240795 - projects/mtree/contrib/mtree X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Sep 2012 21:52:15 -0000 Author: brooks Date: Fri Sep 21 21:52:14 2012 New Revision: 240795 URL: http://svn.freebsd.org/changeset/base/240795 Log: Abstract the naming of message digest keys so we can output foodigest= on FreeBSD and foo= elsewhere when FreeBSD's mtree already supports only the foodigest= form. SHA384KEY and SHA512KEY definitions are for symmetry only and retain the NetBSD default in all cases. Modified: projects/mtree/contrib/mtree/compare.c projects/mtree/contrib/mtree/create.c projects/mtree/contrib/mtree/mtree.h projects/mtree/contrib/mtree/spec.c projects/mtree/contrib/mtree/specspec.c Modified: projects/mtree/contrib/mtree/compare.c ============================================================================== --- projects/mtree/contrib/mtree/compare.c Fri Sep 21 21:31:51 2012 (r240794) +++ projects/mtree/contrib/mtree/compare.c Fri Sep 21 21:52:14 2012 (r240795) @@ -396,14 +396,14 @@ typeerr: LABEL; if (s->flags & F_MD5) { if ((digestbuf = MD5File(p->fts_accpath, NULL)) == NULL) { LABEL; - printf("%smd5: %s: %s\n", - tab, p->fts_accpath, strerror(errno)); + printf("%s%s: %s: %s\n", + tab, MD5KEY, p->fts_accpath, strerror(errno)); tab = "\t"; } else { if (strcmp(s->md5digest, digestbuf)) { LABEL; - printf("%smd5 (0x%s, 0x%s)\n", - tab, s->md5digest, digestbuf); + printf("%s%s (0x%s, 0x%s)\n", + tab, MD5KEY, s->md5digest, digestbuf); } tab = "\t"; free(digestbuf); @@ -414,23 +414,14 @@ typeerr: LABEL; if (s->flags & F_RMD160) { if ((digestbuf = RMD160File(p->fts_accpath, NULL)) == NULL) { LABEL; -#ifndef __FreeBSD__ - printf("%srmd160: %s: %s\n", -#else - printf("%sripemd160digest: %s: %s\n", -#endif - - tab, p->fts_accpath, strerror(errno)); + printf("%s%s: %s: %s\n", + tab, RMD160KEY, p->fts_accpath, strerror(errno)); tab = "\t"; } else { if (strcmp(s->rmd160digest, digestbuf)) { LABEL; -#ifndef __FreeBSD__ - printf("%srmd160 (0x%s, 0x%s)\n", -#else - printf("%sripemd160digest (0x%s, 0x%s)\n", -#endif - tab, s->rmd160digest, digestbuf); + printf("%s%s (0x%s, 0x%s)\n", + tab, RMD160KEY, s->rmd160digest, digestbuf); } tab = "\t"; free(digestbuf); @@ -441,14 +432,14 @@ typeerr: LABEL; if (s->flags & F_SHA1) { if ((digestbuf = SHA1File(p->fts_accpath, NULL)) == NULL) { LABEL; - printf("%ssha1: %s: %s\n", - tab, p->fts_accpath, strerror(errno)); + printf("%s%s: %s: %s\n", + tab, SHA1KEY, p->fts_accpath, strerror(errno)); tab = "\t"; } else { if (strcmp(s->sha1digest, digestbuf)) { LABEL; - printf("%ssha1 (0x%s, 0x%s)\n", - tab, s->sha1digest, digestbuf); + printf("%s%s (0x%s, 0x%s)\n", + tab, SHA1KEY, s->sha1digest, digestbuf); } tab = "\t"; free(digestbuf); @@ -459,14 +450,14 @@ typeerr: LABEL; if (s->flags & F_SHA256) { if ((digestbuf = SHA256_File(p->fts_accpath, NULL)) == NULL) { LABEL; - printf("%ssha256: %s: %s\n", - tab, p->fts_accpath, strerror(errno)); + printf("%s%s: %s: %s\n", + tab, SHA256KEY, p->fts_accpath, strerror(errno)); tab = "\t"; } else { if (strcmp(s->sha256digest, digestbuf)) { LABEL; - printf("%ssha256 (0x%s, 0x%s)\n", - tab, s->sha256digest, digestbuf); + printf("%s%s (0x%s, 0x%s)\n", + tab, SHA256KEY, s->sha256digest, digestbuf); } tab = "\t"; free(digestbuf); @@ -476,14 +467,14 @@ typeerr: LABEL; if (s->flags & F_SHA384) { if ((digestbuf = SHA384_File(p->fts_accpath, NULL)) == NULL) { LABEL; - printf("%ssha384: %s: %s\n", - tab, p->fts_accpath, strerror(errno)); + printf("%s%s: %s: %s\n", + tab, SHA384KEY, p->fts_accpath, strerror(errno)); tab = "\t"; } else { if (strcmp(s->sha384digest, digestbuf)) { LABEL; - printf("%ssha384 (0x%s, 0x%s)\n", - tab, s->sha384digest, digestbuf); + printf("%s%s (0x%s, 0x%s)\n", + tab, SHA384KEY, s->sha384digest, digestbuf); } tab = "\t"; free(digestbuf); @@ -493,14 +484,14 @@ typeerr: LABEL; if (s->flags & F_SHA512) { if ((digestbuf = SHA512_File(p->fts_accpath, NULL)) == NULL) { LABEL; - printf("%ssha512: %s: %s\n", - tab, p->fts_accpath, strerror(errno)); + printf("%s%s: %s: %s\n", + tab, SHA512KEY, p->fts_accpath, strerror(errno)); tab = "\t"; } else { if (strcmp(s->sha512digest, digestbuf)) { LABEL; - printf("%ssha512 (0x%s, 0x%s)\n", - tab, s->sha512digest, digestbuf); + printf("%s%s (0x%s, 0x%s)\n", + tab, SHA512KEY, s->sha512digest, digestbuf); } tab = "\t"; free(digestbuf); Modified: projects/mtree/contrib/mtree/create.c ============================================================================== --- projects/mtree/contrib/mtree/create.c Fri Sep 21 21:31:51 2012 (r240794) +++ projects/mtree/contrib/mtree/create.c Fri Sep 21 21:52:14 2012 (r240795) @@ -233,7 +233,7 @@ statf(int indent, FTSENT *p) if (keys & F_MD5 && S_ISREG(p->fts_statp->st_mode)) { if ((digestbuf = MD5File(p->fts_accpath, NULL)) == NULL) mtree_err("%s: MD5File failed: %s", p->fts_accpath, strerror(errno)); - output(indent, &offset, "md5=%s", digestbuf); + output(indent, &offset, "%s=%s", MD5KEY, digestbuf); free(digestbuf); } #endif /* ! NO_MD5 */ @@ -241,11 +241,7 @@ statf(int indent, FTSENT *p) if (keys & F_RMD160 && S_ISREG(p->fts_statp->st_mode)) { if ((digestbuf = RMD160File(p->fts_accpath, NULL)) == NULL) mtree_err("%s: RMD160File failed: %s", p->fts_accpath, strerror(errno)); -#ifndef __FreeBSD__ - output(indent, &offset, "rmd160=%s", digestbuf); -#else - output(indent, &offset, "ripemd160digest=%s", digestbuf); -#endif + output(indent, &offset, "%s=%s", RMD160KEY, digestbuf); free(digestbuf); } #endif /* ! NO_RMD160 */ @@ -253,7 +249,7 @@ statf(int indent, FTSENT *p) if (keys & F_SHA1 && S_ISREG(p->fts_statp->st_mode)) { if ((digestbuf = SHA1File(p->fts_accpath, NULL)) == NULL) mtree_err("%s: SHA1File failed: %s", p->fts_accpath, strerror(errno)); - output(indent, &offset, "sha1=%s", digestbuf); + output(indent, &offset, "%s=%s", SHA1KEY, digestbuf); free(digestbuf); } #endif /* ! NO_SHA1 */ @@ -261,21 +257,21 @@ statf(int indent, FTSENT *p) if (keys & F_SHA256 && S_ISREG(p->fts_statp->st_mode)) { if ((digestbuf = SHA256_File(p->fts_accpath, NULL)) == NULL) mtree_err("%s: SHA256_File failed: %s", p->fts_accpath, strerror(errno)); - output(indent, &offset, "sha256=%s", digestbuf); + output(indent, &offset, "%s=%s", SHA256KEY, digestbuf); free(digestbuf); } #ifndef NO_SHA384 if (keys & F_SHA384 && S_ISREG(p->fts_statp->st_mode)) { if ((digestbuf = SHA384_File(p->fts_accpath, NULL)) == NULL) mtree_err("%s: SHA384_File failed: %s", p->fts_accpath, strerror(errno)); - output(indent, &offset, "sha384=%s", digestbuf); + output(indent, &offset, "%s=%s", SHA384KEY, digestbuf); free(digestbuf); } #endif if (keys & F_SHA512 && S_ISREG(p->fts_statp->st_mode)) { if ((digestbuf = SHA512_File(p->fts_accpath, NULL)) == NULL) mtree_err("%s: SHA512_File failed: %s", p->fts_accpath, strerror(errno)); - output(indent, &offset, "sha512=%s", digestbuf); + output(indent, &offset, "%s=%s", SHA512KEY, digestbuf); free(digestbuf); } #endif /* ! NO_SHA2 */ Modified: projects/mtree/contrib/mtree/mtree.h ============================================================================== --- projects/mtree/contrib/mtree/mtree.h Fri Sep 21 21:31:51 2012 (r240794) +++ projects/mtree/contrib/mtree/mtree.h Fri Sep 21 21:52:14 2012 (r240795) @@ -124,6 +124,19 @@ int mtree_specspec(FILE *, FILE *); void free_nodes(NODE *); char *vispath(const char *); +#ifndef __FreeBSD__ +#define MD5KEY "md5" +#define RMD160KEY "rmd160" +#define SHA1KEY "sha1" +#define SHA256KEY "sha256" +#else +#define MD5KEY "md5digest" +#define RMD160KEY "ripemd160digest" +#define SHA1KEY "sha1digest" +#define SHA256KEY "sha256digest" +#endif +#define SHA384KEY "sha384" +#define SHA512KEY "sha512" #define RP(p) \ ((p)->fts_path[0] == '.' && (p)->fts_path[1] == '/' ? \ Modified: projects/mtree/contrib/mtree/spec.c ============================================================================== --- projects/mtree/contrib/mtree/spec.c Fri Sep 21 21:31:51 2012 (r240794) +++ projects/mtree/contrib/mtree/spec.c Fri Sep 21 21:52:14 2012 (r240795) @@ -364,22 +364,22 @@ dump_nodes(const char *dir, NODE *root, if (MATCHFLAG(F_CKSUM)) appendfield(pathlast, "cksum=%lu", cur->cksum); if (MATCHFLAG(F_MD5)) - appendfield(pathlast, "md5=%s", cur->md5digest); + appendfield(pathlast, "%s=%s", MD5KEY, cur->md5digest); if (MATCHFLAG(F_RMD160)) -#ifndef __FreeBSD__ - appendfield(pathlast, "rmd160=%s", cur->rmd160digest); -#else - appendfield(pathlast, "ripemd160digest=%s", + appendfield(pathlast, "%s=%s", RMD160KEY, cur->rmd160digest); -#endif if (MATCHFLAG(F_SHA1)) - appendfield(pathlast, "sha1=%s", cur->sha1digest); + appendfield(pathlast, "%s=%s", SHA1KEY, + cur->sha1digest); if (MATCHFLAG(F_SHA256)) - appendfield(pathlast, "sha256=%s", cur->sha256digest); + appendfield(pathlast, "%s=%s", SHA256KEY, + cur->sha256digest); if (MATCHFLAG(F_SHA384)) - appendfield(pathlast, "sha384=%s", cur->sha384digest); + appendfield(pathlast, "%s=%s", SHA384KEY, + cur->sha384digest); if (MATCHFLAG(F_SHA512)) - appendfield(pathlast, "sha512=%s", cur->sha512digest); + appendfield(pathlast, "%s=%s", SHA512KEY, + cur->sha512digest); if (MATCHFLAG(F_FLAGS)) { str = flags_to_string(cur->st_flags, "none"); appendfield(pathlast, "flags=%s", str); Modified: projects/mtree/contrib/mtree/specspec.c ============================================================================== --- projects/mtree/contrib/mtree/specspec.c Fri Sep 21 21:31:51 2012 (r240794) +++ projects/mtree/contrib/mtree/specspec.c Fri Sep 21 21:52:14 2012 (r240795) @@ -79,17 +79,19 @@ shownode(NODE *n, int f, char const *pat printf(" uname=%s", pw->pw_name); } if (f & F_MD5) - printf(" md5digest=%s", n->md5digest); + printf(" %s=%s", MD5KEY, n->md5digest); if (f & F_SHA1) - printf(" sha1digest=%s", n->sha1digest); + printf(" %s=%s", SHA1KEY, n->sha1digest); if (f & F_RMD160) - printf(" rmd160digest=%s", n->rmd160digest); + printf(" %s=%s", RMD160KEY, n->rmd160digest); + if (f & F_SHA1) + printf(" %s=%s", SHA1KEY, n->sha256digest); if (f & F_SHA256) - printf(" sha256digest=%s", n->sha256digest); + printf(" %s=%s", SHA256KEY, n->sha256digest); if (f & F_SHA384) - printf(" sha384=%s", n->sha384digest); + printf(" %s=%s", SHA384KEY, n->sha384digest); if (f & F_SHA512) - printf(" sha512=%s", n->sha512digest); + printf(" %s=%s", SHA512KEY, n->sha512digest); if (f & F_FLAGS) printf(" flags=%s", flags_to_string(n->st_flags, "none")); printf("\n"); From owner-svn-src-projects@FreeBSD.ORG Fri Sep 21 22:07:47 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 80F35106564A; Fri, 21 Sep 2012 22:07:47 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 536258FC0C; Fri, 21 Sep 2012 22:07:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8LM7lPP018830; Fri, 21 Sep 2012 22:07:47 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8LM7luF018825; Fri, 21 Sep 2012 22:07:47 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201209212207.q8LM7luF018825@svn.freebsd.org> From: Brooks Davis Date: Fri, 21 Sep 2012 22:07:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240796 - projects/mtree/contrib/mtree X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Sep 2012 22:07:47 -0000 Author: brooks Date: Fri Sep 21 22:07:46 2012 New Revision: 240796 URL: http://svn.freebsd.org/changeset/base/240796 Log: Implement FreeBSD's nochange keyword. Modified: projects/mtree/contrib/mtree/misc.c projects/mtree/contrib/mtree/mtree.8 projects/mtree/contrib/mtree/mtree.h projects/mtree/contrib/mtree/verify.c Modified: projects/mtree/contrib/mtree/misc.c ============================================================================== --- projects/mtree/contrib/mtree/misc.c Fri Sep 21 21:52:14 2012 (r240795) +++ projects/mtree/contrib/mtree/misc.c Fri Sep 21 22:07:46 2012 (r240796) @@ -71,6 +71,7 @@ static KEY keylist[] = { {"md5digest", F_MD5, NEEDVALUE}, {"mode", F_MODE, NEEDVALUE}, {"nlink", F_NLINK, NEEDVALUE}, + {"nochange", F_NOCHANGE, 0}, {"optional", F_OPT, 0}, {"ripemd160digest", F_RMD160, NEEDVALUE}, {"rmd160", F_RMD160, NEEDVALUE}, Modified: projects/mtree/contrib/mtree/mtree.8 ============================================================================== --- projects/mtree/contrib/mtree/mtree.8 Fri Sep 21 21:52:14 2012 (r240795) +++ projects/mtree/contrib/mtree/mtree.8 Fri Sep 21 22:07:46 2012 (r240796) @@ -463,6 +463,8 @@ The current file's permissions as a nume value. .It Sy nlink The number of hard links the file is expected to have. +.It Sy nochange +Make sure this file or directory exists but otherwise ignore all attributes. .It Sy optional The file is optional; don't complain about the file if it's not in the file hierarchy. Modified: projects/mtree/contrib/mtree/mtree.h ============================================================================== --- projects/mtree/contrib/mtree/mtree.h Fri Sep 21 21:52:14 2012 (r240795) +++ projects/mtree/contrib/mtree/mtree.h Fri Sep 21 22:07:46 2012 (r240796) @@ -86,6 +86,8 @@ typedef struct _node { #define F_UID 0x00080000 /* uid */ #define F_UNAME 0x00100000 /* user name */ #define F_VISIT 0x00200000 /* file visited */ +#define F_NOCHANGE 0x00400000 /* check existance, but not */ + /* other properties */ #define F_SHA256 0x00800000 /* SHA256 digest */ #define F_SHA384 0x01000000 /* SHA384 digest */ #define F_SHA512 0x02000000 /* SHA512 digest */ Modified: projects/mtree/contrib/mtree/verify.c ============================================================================== --- projects/mtree/contrib/mtree/verify.c Fri Sep 21 21:52:14 2012 (r240795) +++ projects/mtree/contrib/mtree/verify.c Fri Sep 21 22:07:46 2012 (r240796) @@ -124,7 +124,8 @@ vwalk(void) !fnmatch(ep->name, p->fts_name, FNM_PATHNAME)) || !strcmp(ep->name, p->fts_name)) { ep->flags |= F_VISIT; - if (compare(ep, p)) + if ((ep->flags & F_NOCHANGE) == 0 && + compare(ep, p)) rval = MISMATCHEXIT; if (!(ep->flags & F_IGN) && ep->type == F_DIR && From owner-svn-src-projects@FreeBSD.ORG Sat Sep 22 12:12:41 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 034EF106566B; Sat, 22 Sep 2012 12:12:41 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE3008FC08; Sat, 22 Sep 2012 12:12:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8MCCe0c063935; Sat, 22 Sep 2012 12:12:40 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8MCCeOR063904; Sat, 22 Sep 2012 12:12:40 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201209221212.q8MCCeOR063904@svn.freebsd.org> From: Andreas Tobler Date: Sat, 22 Sep 2012 12:12:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240812 - in projects/pseries: amd64/amd64 amd64/conf arm/arm arm/at91 arm/broadcom/bcm2835 arm/conf arm/econa arm/include arm/lpc arm/mv arm/s3c2xx0 arm/sa11x0 arm/tegra arm/ti arm/ti/... X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Sep 2012 12:12:41 -0000 Author: andreast Date: Sat Sep 22 12:12:39 2012 New Revision: 240812 URL: http://svn.freebsd.org/changeset/base/240812 Log: IFC @ 240808 Added: projects/pseries/arm/conf/AC100 - copied unchanged from r240808, head/sys/arm/conf/AC100 projects/pseries/boot/fdt/dts/tegra20-paz00.dts - copied unchanged from r240808, head/sys/boot/fdt/dts/tegra20-paz00.dts projects/pseries/boot/fdt/dts/tegra20.dtsi - copied unchanged from r240808, head/sys/boot/fdt/dts/tegra20.dtsi projects/pseries/dev/nvd/ - copied from r240808, head/sys/dev/nvd/ projects/pseries/dev/nvme/ - copied from r240808, head/sys/dev/nvme/ projects/pseries/modules/nvd/ - copied from r240808, head/sys/modules/nvd/ projects/pseries/modules/nvme/ - copied from r240808, head/sys/modules/nvme/ Modified: projects/pseries/amd64/amd64/identcpu.c projects/pseries/amd64/conf/NOTES projects/pseries/arm/arm/machdep.c projects/pseries/arm/arm/pmap-v6.c projects/pseries/arm/arm/pmap.c projects/pseries/arm/at91/at91_machdep.c projects/pseries/arm/broadcom/bcm2835/bcm2835_machdep.c projects/pseries/arm/conf/ARMADAXP projects/pseries/arm/conf/BEAGLEBONE projects/pseries/arm/conf/CNS11XXNAS projects/pseries/arm/conf/DOCKSTAR projects/pseries/arm/conf/EA3250 projects/pseries/arm/conf/GUMSTIX-QEMU projects/pseries/arm/conf/HL201 projects/pseries/arm/conf/KB920X projects/pseries/arm/conf/LN2410SBC projects/pseries/arm/conf/PANDABOARD projects/pseries/arm/conf/QILA9G20 projects/pseries/arm/conf/RPI-B projects/pseries/arm/conf/SAM9G20EK projects/pseries/arm/conf/SAM9X25EK projects/pseries/arm/conf/SHEEVAPLUG projects/pseries/arm/conf/SN9G45 projects/pseries/arm/conf/TS7800 projects/pseries/arm/econa/econa_machdep.c projects/pseries/arm/include/machdep.h projects/pseries/arm/lpc/lpc_machdep.c projects/pseries/arm/mv/mv_machdep.c projects/pseries/arm/s3c2xx0/s3c24x0_machdep.c projects/pseries/arm/sa11x0/assabet_machdep.c projects/pseries/arm/tegra/tegra2_machdep.c projects/pseries/arm/ti/cpsw/if_cpsw.c projects/pseries/arm/ti/ti_machdep.c projects/pseries/arm/xscale/i80321/ep80219_machdep.c projects/pseries/arm/xscale/i80321/iq31244_machdep.c projects/pseries/arm/xscale/i8134x/crb_machdep.c projects/pseries/arm/xscale/ixp425/avila_machdep.c projects/pseries/arm/xscale/pxa/pxa_machdep.c projects/pseries/boot/common/reloc_elf.c projects/pseries/boot/i386/loader/main.c projects/pseries/boot/ofw/libofw/devicename.c projects/pseries/cam/scsi/scsi_cd.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_debug.h projects/pseries/conf/NOTES projects/pseries/conf/files.amd64 projects/pseries/conf/files.i386 projects/pseries/conf/newvers.sh projects/pseries/conf/options projects/pseries/contrib/altq/altq/altq_hfsc.c projects/pseries/contrib/altq/altq/altq_priq.c projects/pseries/contrib/altq/altq/altq_rmclass.c projects/pseries/contrib/dev/acpica/changes.txt (contents, props changed) projects/pseries/contrib/dev/acpica/common/dmrestag.c projects/pseries/contrib/dev/acpica/compiler/aslcompile.c projects/pseries/contrib/dev/acpica/compiler/aslcompiler.h projects/pseries/contrib/dev/acpica/compiler/aslerror.c projects/pseries/contrib/dev/acpica/compiler/aslfiles.c projects/pseries/contrib/dev/acpica/compiler/aslfold.c projects/pseries/contrib/dev/acpica/compiler/aslglobal.h projects/pseries/contrib/dev/acpica/compiler/aslmain.c projects/pseries/contrib/dev/acpica/compiler/aslmessages.h projects/pseries/contrib/dev/acpica/compiler/asloperands.c projects/pseries/contrib/dev/acpica/compiler/aslopt.c projects/pseries/contrib/dev/acpica/compiler/aslstartup.c projects/pseries/contrib/dev/acpica/compiler/aslsupport.l projects/pseries/contrib/dev/acpica/compiler/asltypes.h projects/pseries/contrib/dev/acpica/compiler/aslutils.c projects/pseries/contrib/dev/acpica/compiler/dtio.c projects/pseries/contrib/dev/acpica/compiler/preprocess.h projects/pseries/contrib/dev/acpica/components/debugger/dbexec.c projects/pseries/contrib/dev/acpica/components/debugger/dbinput.c projects/pseries/contrib/dev/acpica/components/debugger/dbmethod.c projects/pseries/contrib/dev/acpica/components/debugger/dbnames.c projects/pseries/contrib/dev/acpica/components/debugger/dbstats.c projects/pseries/contrib/dev/acpica/components/debugger/dbutils.c projects/pseries/contrib/dev/acpica/components/disassembler/dmopcode.c projects/pseries/contrib/dev/acpica/components/tables/tbinstal.c projects/pseries/contrib/dev/acpica/components/tables/tbxface.c projects/pseries/contrib/dev/acpica/include/acdebug.h projects/pseries/contrib/dev/acpica/include/acpixf.h projects/pseries/contrib/dev/acpica/include/actbl1.h projects/pseries/contrib/ipfilter/netinet/ip_auth.c projects/pseries/dev/acpica/acpi_cpu.c projects/pseries/dev/ahci/ahci.c projects/pseries/dev/alc/if_alc.c projects/pseries/dev/amr/amr.c projects/pseries/dev/ata/ata-lowlevel.c projects/pseries/dev/ath/ath_hal/ah.c projects/pseries/dev/ath/ath_hal/ah.h projects/pseries/dev/ath/ath_hal/ah_internal.h projects/pseries/dev/ath/ath_rate/sample/sample.c projects/pseries/dev/ath/if_ath_debug.h projects/pseries/dev/ath/if_ath_sysctl.c projects/pseries/dev/ath/if_ath_tx.c projects/pseries/dev/ath/if_athioctl.h projects/pseries/dev/ath/if_athvar.h projects/pseries/dev/atkbdc/psm.c projects/pseries/dev/bge/if_bge.c projects/pseries/dev/cxgb/cxgb_main.c projects/pseries/dev/cxgb/cxgb_osdep.h projects/pseries/dev/cxgbe/osdep.h projects/pseries/dev/cxgbe/t4_main.c projects/pseries/dev/e1000/if_em.c projects/pseries/dev/et/if_et.c projects/pseries/dev/hwpmc/hwpmc_amd.c projects/pseries/dev/isci/scil/scic_sds_phy.c projects/pseries/dev/isp/isp_freebsd.c projects/pseries/dev/jme/if_jme.c projects/pseries/dev/mlx/mlx.c projects/pseries/dev/mlx/mlx_disk.c projects/pseries/dev/mlx/mlx_pci.c projects/pseries/dev/mlx/mlxreg.h projects/pseries/dev/mlx/mlxvar.h projects/pseries/dev/mly/mly.c projects/pseries/dev/pci/pci.c projects/pseries/dev/pci/pcireg.h projects/pseries/dev/re/if_re.c projects/pseries/dev/sound/usb/uaudio.c projects/pseries/dev/sound/usb/uaudioreg.h projects/pseries/dev/usb/input/ums.c projects/pseries/dev/usb/net/if_smsc.c projects/pseries/dev/usb/net/uhso.c projects/pseries/dev/usb/quirk/usb_quirk.c projects/pseries/dev/usb/quirk/usb_quirk.h projects/pseries/dev/usb/serial/uftdi_reg.h projects/pseries/dev/usb/usb_request.c projects/pseries/dev/usb/usbdevs projects/pseries/fs/nfs/nfs.h projects/pseries/fs/nfs/nfs_commonacl.c projects/pseries/fs/nfs/nfs_commonsubs.c projects/pseries/fs/nfs/nfs_var.h projects/pseries/fs/nfsclient/nfs_clcomsubs.c projects/pseries/fs/nfsserver/nfs_nfsdport.c projects/pseries/geom/geom_disk.c projects/pseries/i386/conf/NOTES projects/pseries/i386/i386/identcpu.c projects/pseries/modules/Makefile projects/pseries/net/if_lagg.c projects/pseries/net/pfvar.h projects/pseries/net80211/ieee80211_node.c projects/pseries/netinet/libalias/alias_skinny.c projects/pseries/netipsec/xform_ipip.c projects/pseries/netpfil/pf/pf.c projects/pseries/netpfil/pf/pf_ioctl.c projects/pseries/netpfil/pf/pf_lb.c projects/pseries/ofed/include/linux/pci.h projects/pseries/powerpc/mpc85xx/pci_fdt.c projects/pseries/powerpc/ofw/ofw_real.c projects/pseries/sys/_rmlock.h projects/pseries/sys/pcpu.h projects/pseries/vm/uma_core.c projects/pseries/vm/vm_object.c Directory Properties: projects/pseries/ (props changed) projects/pseries/boot/ (props changed) projects/pseries/cddl/contrib/opensolaris/ (props changed) projects/pseries/conf/ (props changed) projects/pseries/contrib/dev/acpica/ (props changed) projects/pseries/contrib/dev/acpica/common/ (props changed) projects/pseries/contrib/dev/acpica/compiler/ (props changed) projects/pseries/contrib/dev/acpica/components/debugger/ (props changed) projects/pseries/contrib/dev/acpica/components/disassembler/ (props changed) projects/pseries/contrib/dev/acpica/components/tables/ (props changed) projects/pseries/contrib/dev/acpica/include/ (props changed) Modified: projects/pseries/amd64/amd64/identcpu.c ============================================================================== --- projects/pseries/amd64/amd64/identcpu.c Sat Sep 22 10:14:47 2012 (r240811) +++ projects/pseries/amd64/amd64/identcpu.c Sat Sep 22 12:12:39 2012 (r240812) @@ -213,8 +213,8 @@ printcpuinfo(void) if (cpu_vendor_id == CPU_VENDOR_INTEL || cpu_vendor_id == CPU_VENDOR_AMD || cpu_vendor_id == CPU_VENDOR_CENTAUR) { - printf(" Family = %x", CPUID_TO_FAMILY(cpu_id)); - printf(" Model = %x", CPUID_TO_MODEL(cpu_id)); + printf(" Family = 0x%x", CPUID_TO_FAMILY(cpu_id)); + printf(" Model = 0x%x", CPUID_TO_MODEL(cpu_id)); printf(" Stepping = %u", cpu_id & CPUID_STEPPING); /* Modified: projects/pseries/amd64/conf/NOTES ============================================================================== --- projects/pseries/amd64/conf/NOTES Sat Sep 22 10:14:47 2012 (r240811) +++ projects/pseries/amd64/conf/NOTES Sat Sep 22 12:12:39 2012 (r240812) @@ -428,6 +428,11 @@ device isci options ISCI_LOGGING # enable debugging in isci HAL # +# NVM Express (NVMe) support +device nvme # base NVMe driver +device nvd # expose NVMe namespaces as disks, depends on nvme + +# # SafeNet crypto driver: can be moved to the MI NOTES as soon as # it's tested on a big-endian machine # Modified: projects/pseries/arm/arm/machdep.c ============================================================================== --- projects/pseries/arm/arm/machdep.c Sat Sep 22 10:14:47 2012 (r240811) +++ projects/pseries/arm/arm/machdep.c Sat Sep 22 12:12:39 2012 (r240812) @@ -948,3 +948,16 @@ init_proc0(vm_offset_t kstack) thread0.td_frame = &proc0_tf; pcpup->pc_curpcb = thread0.td_pcb; } + +void +set_stackptrs(int cpu) +{ + + set_stackptr(PSR_IRQ32_MODE, + irqstack.pv_va + ((IRQ_STACK_SIZE * PAGE_SIZE) * (cpu + 1))); + set_stackptr(PSR_ABT32_MODE, + abtstack.pv_va + ((ABT_STACK_SIZE * PAGE_SIZE) * (cpu + 1))); + set_stackptr(PSR_UND32_MODE, + undstack.pv_va + ((UND_STACK_SIZE * PAGE_SIZE) * (cpu + 1))); +} + Modified: projects/pseries/arm/arm/pmap-v6.c ============================================================================== --- projects/pseries/arm/arm/pmap-v6.c Sat Sep 22 10:14:47 2012 (r240811) +++ projects/pseries/arm/arm/pmap-v6.c Sat Sep 22 12:12:39 2012 (r240812) @@ -357,14 +357,6 @@ struct l2_dtable { #define L2_NEXT_BUCKET(va) (((va) & L1_S_FRAME) + L1_S_SIZE) /* - * L2 allocation. - */ -#define pmap_alloc_l2_dtable() \ - (void*)uma_zalloc(l2table_zone, M_NOWAIT|M_USE_RESERVE) -#define pmap_free_l2_dtable(l2) \ - uma_zfree(l2table_zone, l2) - -/* * We try to map the page tables write-through, if possible. However, not * all CPUs have a write-through cache mode, so on those we have to sync * the cache when we frob page tables. @@ -621,10 +613,9 @@ pmap_alloc_l2_bucket(pmap_t pm, vm_offse * no entry in the L1 table. * Need to allocate a new l2_dtable. */ -again_l2table: PMAP_UNLOCK(pm); rw_wunlock(&pvh_global_lock); - if ((l2 = pmap_alloc_l2_dtable()) == NULL) { + if ((l2 = uma_zalloc(l2table_zone, M_NOWAIT)) == NULL) { rw_wlock(&pvh_global_lock); PMAP_LOCK(pm); return (NULL); @@ -632,18 +623,12 @@ again_l2table: rw_wlock(&pvh_global_lock); PMAP_LOCK(pm); if (pm->pm_l2[L2_IDX(l1idx)] != NULL) { - PMAP_UNLOCK(pm); - rw_wunlock(&pvh_global_lock); - uma_zfree(l2table_zone, l2); - rw_wlock(&pvh_global_lock); - PMAP_LOCK(pm); - l2 = pm->pm_l2[L2_IDX(l1idx)]; - if (l2 == NULL) - goto again_l2table; /* * Someone already allocated the l2_dtable while * we were doing the same. */ + uma_zfree(l2table_zone, l2); + l2 = pm->pm_l2[L2_IDX(l1idx)]; } else { bzero(l2, sizeof(*l2)); /* @@ -665,21 +650,14 @@ again_l2table: * No L2 page table has been allocated. Chances are, this * is because we just allocated the l2_dtable, above. */ -again_ptep: PMAP_UNLOCK(pm); rw_wunlock(&pvh_global_lock); - ptep = (void*)uma_zalloc(l2zone, M_NOWAIT|M_USE_RESERVE); + ptep = uma_zalloc(l2zone, M_NOWAIT); rw_wlock(&pvh_global_lock); PMAP_LOCK(pm); if (l2b->l2b_kva != 0) { /* We lost the race. */ - PMAP_UNLOCK(pm); - rw_wunlock(&pvh_global_lock); uma_zfree(l2zone, ptep); - rw_wlock(&pvh_global_lock); - PMAP_LOCK(pm); - if (l2b->l2b_kva == 0) - goto again_ptep; return (l2b); } l2b->l2b_phys = vtophys(ptep); @@ -691,7 +669,7 @@ again_ptep: */ if (l2->l2_occupancy == 0) { pm->pm_l2[L2_IDX(l1idx)] = NULL; - pmap_free_l2_dtable(l2); + uma_zfree(l2table_zone, l2); } return (NULL); } @@ -789,7 +767,7 @@ pmap_free_l2_bucket(pmap_t pm, struct l2 * the pointer in the parent pmap and free the l2_dtable. */ pm->pm_l2[L2_IDX(l1idx)] = NULL; - pmap_free_l2_dtable(l2); + uma_zfree(l2table_zone, l2); } /* @@ -1175,28 +1153,25 @@ pmap_init(void) PDEBUG(1, printf("pmap_init: phys_start = %08x\n", PHYSADDR)); + l2zone = uma_zcreate("L2 Table", L2_TABLE_SIZE_REAL, pmap_l2ptp_ctor, + NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM | UMA_ZONE_NOFREE); + l2table_zone = uma_zcreate("L2 Table", sizeof(struct l2_dtable), NULL, + NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM | UMA_ZONE_NOFREE); + /* - * init the pv free list + * Initialize the PV entry allocator. */ pvzone = uma_zcreate("PV ENTRY", sizeof (struct pv_entry), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM | UMA_ZONE_NOFREE); - /* - * Now it is safe to enable pv_table recording. - */ - PDEBUG(1, printf("pmap_init: done!\n")); - TUNABLE_INT_FETCH("vm.pmap.shpgperproc", &shpgperproc); - pv_entry_max = shpgperproc * maxproc + cnt.v_page_count; - pv_entry_high_water = 9 * (pv_entry_max / 10); - l2zone = uma_zcreate("L2 Table", L2_TABLE_SIZE_REAL, pmap_l2ptp_ctor, - NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM | UMA_ZONE_NOFREE); - l2table_zone = uma_zcreate("L2 Table", sizeof(struct l2_dtable), - NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, - UMA_ZONE_VM | UMA_ZONE_NOFREE); - uma_zone_set_obj(pvzone, &pvzone_obj, pv_entry_max); + pv_entry_high_water = 9 * (pv_entry_max / 10); + /* + * Now it is safe to enable pv_table recording. + */ + PDEBUG(1, printf("pmap_init: done!\n")); } int @@ -2544,7 +2519,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, } /* - * The page queues and pmap must be locked. + * The pvh global and pmap locks must be held. */ static void pmap_enter_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, Modified: projects/pseries/arm/arm/pmap.c ============================================================================== --- projects/pseries/arm/arm/pmap.c Sat Sep 22 10:14:47 2012 (r240811) +++ projects/pseries/arm/arm/pmap.c Sat Sep 22 12:12:39 2012 (r240812) @@ -366,14 +366,6 @@ struct l2_dtable { #define L2_NEXT_BUCKET(va) (((va) & L1_S_FRAME) + L1_S_SIZE) /* - * L2 allocation. - */ -#define pmap_alloc_l2_dtable() \ - (void*)uma_zalloc(l2table_zone, M_NOWAIT|M_USE_RESERVE) -#define pmap_free_l2_dtable(l2) \ - uma_zfree(l2table_zone, l2) - -/* * We try to map the page tables write-through, if possible. However, not * all CPUs have a write-through cache mode, so on those we have to sync * the cache when we frob page tables. @@ -875,10 +867,9 @@ pmap_alloc_l2_bucket(pmap_t pm, vm_offse * no entry in the L1 table. * Need to allocate a new l2_dtable. */ -again_l2table: PMAP_UNLOCK(pm); rw_wunlock(&pvh_global_lock); - if ((l2 = pmap_alloc_l2_dtable()) == NULL) { + if ((l2 = uma_zalloc(l2table_zone, M_NOWAIT)) == NULL) { rw_wlock(&pvh_global_lock); PMAP_LOCK(pm); return (NULL); @@ -886,18 +877,12 @@ again_l2table: rw_wlock(&pvh_global_lock); PMAP_LOCK(pm); if (pm->pm_l2[L2_IDX(l1idx)] != NULL) { - PMAP_UNLOCK(pm); - rw_wunlock(&pvh_global_lock); - uma_zfree(l2table_zone, l2); - rw_wlock(&pvh_global_lock); - PMAP_LOCK(pm); - l2 = pm->pm_l2[L2_IDX(l1idx)]; - if (l2 == NULL) - goto again_l2table; /* * Someone already allocated the l2_dtable while * we were doing the same. */ + uma_zfree(l2table_zone, l2); + l2 = pm->pm_l2[L2_IDX(l1idx)]; } else { bzero(l2, sizeof(*l2)); /* @@ -919,21 +904,14 @@ again_l2table: * No L2 page table has been allocated. Chances are, this * is because we just allocated the l2_dtable, above. */ -again_ptep: PMAP_UNLOCK(pm); rw_wunlock(&pvh_global_lock); - ptep = (void*)uma_zalloc(l2zone, M_NOWAIT|M_USE_RESERVE); + ptep = uma_zalloc(l2zone, M_NOWAIT); rw_wlock(&pvh_global_lock); PMAP_LOCK(pm); if (l2b->l2b_kva != 0) { /* We lost the race. */ - PMAP_UNLOCK(pm); - rw_wunlock(&pvh_global_lock); uma_zfree(l2zone, ptep); - rw_wlock(&pvh_global_lock); - PMAP_LOCK(pm); - if (l2b->l2b_kva == 0) - goto again_ptep; return (l2b); } l2b->l2b_phys = vtophys(ptep); @@ -945,7 +923,7 @@ again_ptep: */ if (l2->l2_occupancy == 0) { pm->pm_l2[L2_IDX(l1idx)] = NULL; - pmap_free_l2_dtable(l2); + uma_zfree(l2table_zone, l2); } return (NULL); } @@ -1066,7 +1044,7 @@ pmap_free_l2_bucket(pmap_t pm, struct l2 * the pointer in the parent pmap and free the l2_dtable. */ pm->pm_l2[L2_IDX(l1idx)] = NULL; - pmap_free_l2_dtable(l2); + uma_zfree(l2table_zone, l2); } /* @@ -1834,28 +1812,25 @@ pmap_init(void) PDEBUG(1, printf("pmap_init: phys_start = %08x\n", PHYSADDR)); + l2zone = uma_zcreate("L2 Table", L2_TABLE_SIZE_REAL, pmap_l2ptp_ctor, + NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM | UMA_ZONE_NOFREE); + l2table_zone = uma_zcreate("L2 Table", sizeof(struct l2_dtable), NULL, + NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM | UMA_ZONE_NOFREE); + /* - * init the pv free list + * Initialize the PV entry allocator. */ pvzone = uma_zcreate("PV ENTRY", sizeof (struct pv_entry), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM | UMA_ZONE_NOFREE); - /* - * Now it is safe to enable pv_table recording. - */ - PDEBUG(1, printf("pmap_init: done!\n")); - TUNABLE_INT_FETCH("vm.pmap.shpgperproc", &shpgperproc); - pv_entry_max = shpgperproc * maxproc + cnt.v_page_count; - pv_entry_high_water = 9 * (pv_entry_max / 10); - l2zone = uma_zcreate("L2 Table", L2_TABLE_SIZE_REAL, pmap_l2ptp_ctor, - NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM | UMA_ZONE_NOFREE); - l2table_zone = uma_zcreate("L2 Table", sizeof(struct l2_dtable), - NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, - UMA_ZONE_VM | UMA_ZONE_NOFREE); - uma_zone_set_obj(pvzone, &pvzone_obj, pv_entry_max); + pv_entry_high_water = 9 * (pv_entry_max / 10); + /* + * Now it is safe to enable pv_table recording. + */ + PDEBUG(1, printf("pmap_init: done!\n")); } int @@ -3302,7 +3277,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, } /* - * The page queues and pmap must be locked. + * The pvh global and pmap locks must be held. */ static void pmap_enter_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, Modified: projects/pseries/arm/at91/at91_machdep.c ============================================================================== --- projects/pseries/arm/at91/at91_machdep.c Sat Sep 22 10:14:47 2012 (r240811) +++ projects/pseries/arm/at91/at91_machdep.c Sat Sep 22 12:12:39 2012 (r240812) @@ -107,11 +107,6 @@ __FBSDID("$FreeBSD$"); /* this should be evenly divisable by PAGE_SIZE / L2_TABLE_SIZE_REAL (or 4) */ #define NUM_KERNEL_PTS (KERNEL_PT_AFKERNEL + KERNEL_PT_AFKERNEL_NUM) -/* Define various stack sizes in pages */ -#define IRQ_STACK_SIZE 1 -#define ABT_STACK_SIZE 1 -#define UND_STACK_SIZE 1 - extern u_int data_abort_handler_address; extern u_int prefetch_abort_handler_address; extern u_int undefined_handler_address; @@ -597,12 +592,8 @@ initarm(struct arm_boot_params *abp) * of the stack memory. */ cpu_control(CPU_CONTROL_MMU_ENABLE, CPU_CONTROL_MMU_ENABLE); - set_stackptr(PSR_IRQ32_MODE, - irqstack.pv_va + IRQ_STACK_SIZE * PAGE_SIZE); - set_stackptr(PSR_ABT32_MODE, - abtstack.pv_va + ABT_STACK_SIZE * PAGE_SIZE); - set_stackptr(PSR_UND32_MODE, - undstack.pv_va + UND_STACK_SIZE * PAGE_SIZE); + + set_stackptrs(0); /* * We must now clean the cache again.... Modified: projects/pseries/arm/broadcom/bcm2835/bcm2835_machdep.c ============================================================================== --- projects/pseries/arm/broadcom/bcm2835/bcm2835_machdep.c Sat Sep 22 10:14:47 2012 (r240811) +++ projects/pseries/arm/broadcom/bcm2835/bcm2835_machdep.c Sat Sep 22 12:12:39 2012 (r240812) @@ -108,11 +108,6 @@ __FBSDID("$FreeBSD$"); */ #define KERNEL_PT_MAX 78 -/* Define various stack sizes in pages */ -#define IRQ_STACK_SIZE 1 -#define ABT_STACK_SIZE 1 -#define UND_STACK_SIZE 1 - extern unsigned char kernbase[]; extern unsigned char _etext[]; extern unsigned char _edata[]; @@ -147,8 +142,6 @@ struct pv_addr undstack; struct pv_addr abtstack; struct pv_addr kernelstack; -void set_stackptrs(int cpu); - static struct mem_region availmem_regions[FDT_MEM_REGIONS]; static int availmem_regions_sz; @@ -544,18 +537,6 @@ initarm(struct arm_boot_params *abp) sizeof(struct pcb))); } -void -set_stackptrs(int cpu) -{ - - set_stackptr(PSR_IRQ32_MODE, - irqstack.pv_va + ((IRQ_STACK_SIZE * PAGE_SIZE) * (cpu + 1))); - set_stackptr(PSR_ABT32_MODE, - abtstack.pv_va + ((ABT_STACK_SIZE * PAGE_SIZE) * (cpu + 1))); - set_stackptr(PSR_UND32_MODE, - undstack.pv_va + ((UND_STACK_SIZE * PAGE_SIZE) * (cpu + 1))); -} - #define FDT_DEVMAP_MAX (2) // FIXME static struct pmap_devmap fdt_devmap[FDT_DEVMAP_MAX] = { { 0, 0, 0, 0, 0, } Copied: projects/pseries/arm/conf/AC100 (from r240808, head/sys/arm/conf/AC100) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/pseries/arm/conf/AC100 Sat Sep 22 12:12:39 2012 (r240812, copy of r240808, head/sys/arm/conf/AC100) @@ -0,0 +1,96 @@ +# +# Custom kernel for Toshiba AC100 +# +# $FreeBSD$ +# + +ident AC100 +include "../tegra/std.tegra2" + +makeoptions MODULES_OVERRIDE="" + +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +makeoptions WERROR="-Werror" + +#options SCHED_ULE #ULE scheduler +options SCHED_4BSD #4BSD scheduler +options INET #InterNETworking +#options INET6 #IPv6 communications protocols +options FFS #Berkeley Fast Filesystem +#options NFSCL #Network Filesystem Client +#options NFSLOCKD #Network Lock Manager +#options NFS_ROOT #NFS usable as /, requires NFSCLIENT +#options BOOTP +#options BOOTP_NFSROOT +#options BOOTP_NFSV3 +#options BOOTP_WIRED_TO=mge0 + +options GEOM_PART_GPT +options ROOTDEVNAME=\"ufs:/dev/da0p1\" + +options SYSVSHM #SYSV-style shared memory +options SYSVMSG #SYSV-style message queues +options SYSVSEM #SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions +options MUTEX_NOINLINE +options RWLOCK_NOINLINE +options NO_FFS_SNAPSHOT +options NO_SWAPPING + +#options SMP + +# Debugging +options VERBOSE_SYSINIT +#options ALT_BREAK_TO_DEBUGGER +options DDB +options GDB +options DIAGNOSTIC +options INVARIANTS #Enable calls of extra sanity checking +options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +options KDB +options KDB_TRACE +#options KTR +#options KTR_VERBOSE=0 +#options KTR_ENTRIES=16384 +#options KTR_MASK=(KTR_SPARE2) +#options KTR_COMPILE=KTR_ALL +options WITNESS #Enable checks to detect deadlocks and cycles +options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed +#options WITNESS_KDB +options MUTEX_DEBUG + +# Pseudo devices +device random +device pty +device loop +device md + +# USB +#options USB_DEBUG # enable debug msgs +#device usb +#device ehci +#device umass +#device scbus +#device pass +#device da + +# SATA +#device ata +#device atadisk +#device mvs + +# Serial ports +device uart + +# I2C (TWSI) +#device iic +#device iicbus + +#Network +device ether + +#FDT +options FDT +options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=tegra20-paz00.dts + Modified: projects/pseries/arm/conf/ARMADAXP ============================================================================== --- projects/pseries/arm/conf/ARMADAXP Sat Sep 22 10:14:47 2012 (r240811) +++ projects/pseries/arm/conf/ARMADAXP Sat Sep 22 12:12:39 2012 (r240812) @@ -92,8 +92,8 @@ device mge # Marvell Gigabit Ethernet device mii device e1000phy device bpf -options HZ=1000 -options DEVICE_POLLING +options HZ=1000 +options DEVICE_POLLING device vlan #PCI/PCIE Modified: projects/pseries/arm/conf/BEAGLEBONE ============================================================================== --- projects/pseries/arm/conf/BEAGLEBONE Sat Sep 22 10:14:47 2012 (r240811) +++ projects/pseries/arm/conf/BEAGLEBONE Sat Sep 22 12:12:39 2012 (r240812) @@ -25,52 +25,52 @@ include "../ti/am335x/std.beaglebone" makeoptions MODULES_OVERRIDE="" makeoptions WITHOUT_MODULES="ahc" -options HZ=100 -options SCHED_4BSD #4BSD scheduler -options INET #InterNETworking -options INET6 #IPv6 communications protocols -options FFS #Berkeley Fast Filesystem -options SOFTUPDATES #Enable FFS soft updates support -options UFS_ACL #Support for access control lists -options UFS_DIRHASH #Improve performance on big directories -options MSDOSFS #MSDOS Filesystem -options CD9660 #ISO 9660 Filesystem -options PROCFS #Process filesystem (requires PSEUDOFS) -options PSEUDOFS #Pseudo-filesystem framework -options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!] -options SCSI_DELAY=5000 #Delay (in ms) before probing SCSI -options KTRACE #ktrace(1) support -options SYSVSHM #SYSV-style shared memory -options SYSVMSG #SYSV-style message queues -options SYSVSEM #SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions -options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options PREEMPTION +options HZ=100 +options SCHED_4BSD #4BSD scheduler +options INET #InterNETworking +options INET6 #IPv6 communications protocols +options FFS #Berkeley Fast Filesystem +options SOFTUPDATES #Enable FFS soft updates support +options UFS_ACL #Support for access control lists +options UFS_DIRHASH #Improve performance on big directories +options MSDOSFS #MSDOS Filesystem +options CD9660 #ISO 9660 Filesystem +options PROCFS #Process filesystem (requires PSEUDOFS) +options PSEUDOFS #Pseudo-filesystem framework +options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!] +options SCSI_DELAY=5000 #Delay (in ms) before probing SCSI +options KTRACE #ktrace(1) support +options SYSVSHM #SYSV-style shared memory +options SYSVMSG #SYSV-style message queues +options SYSVSEM #SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions +options KBD_INSTALL_CDEV # install a CDEV entry in /dev +options PREEMPTION # Debugging makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols -options BREAK_TO_DEBUGGER -#options VERBOSE_SYSINIT #Enable verbose sysinit messages -options KDB -options DDB #Enable the kernel debugger -options INVARIANTS #Enable calls of extra sanity checking -options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS #Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed -#options DIAGNOSTIC +options BREAK_TO_DEBUGGER +#options VERBOSE_SYSINIT #Enable verbose sysinit messages +options KDB +options DDB #Enable the kernel debugger +options INVARIANTS #Enable calls of extra sanity checking +options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +options WITNESS #Enable checks to detect deadlocks and cycles +options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed +#options DIAGNOSTIC # NFS support -#options NFSCL -#options NFSSERVER #Network Filesystem Server -#options NFSCLIENT #Network Filesystem Client +#options NFSCL +#options NFSSERVER #Network Filesystem Server +#options NFSCLIENT #Network Filesystem Client # Uncomment this for NFS root -#options NFS_ROOT #NFS usable as /, requires NFSCLIENT -#options BOOTP_NFSROOT -#options BOOTP_COMPAT -#options BOOTP -#options BOOTP_NFSV3 -#options BOOTP_WIRED_TO=cpsw0 +#options NFS_ROOT #NFS usable as /, requires NFSCLIENT +#options BOOTP_NFSROOT +#options BOOTP_COMPAT +#options BOOTP +#options BOOTP_NFSV3 +#options BOOTP_WIRED_TO=cpsw0 # MMC/SD/SDIO card slot support @@ -78,7 +78,7 @@ device mmc # mmc/sd bus device mmcsd # mmc/sd flash cards # Boot device is 2nd slice on MMC/SD card -options ROOTDEVNAME=\"ufs:mmcsd0s2\" +options ROOTDEVNAME=\"ufs:mmcsd0s2\" # Console and misc device uart @@ -99,9 +99,9 @@ device gpio # USB support device usb -options USB_DEBUG -#options USB_REQ_DEBUG -#options USB_VERBOSE +options USB_DEBUG +#options USB_REQ_DEBUG +#options USB_VERBOSE device musb device umass device scbus # SCSI bus (required for SCSI) Modified: projects/pseries/arm/conf/CNS11XXNAS ============================================================================== --- projects/pseries/arm/conf/CNS11XXNAS Sat Sep 22 10:14:47 2012 (r240811) +++ projects/pseries/arm/conf/CNS11XXNAS Sat Sep 22 12:12:39 2012 (r240812) @@ -47,9 +47,9 @@ options DDB #Enable the kernel debugg #options DIAGNOSTIC -#options COMPAT_FREEBSD5 -#options COMPAT_FREEBSD6 -#options COMPAT_FREEBSD7 +#options COMPAT_FREEBSD5 +#options COMPAT_FREEBSD6 +#options COMPAT_FREEBSD7 options SCHED_ULE #ULE scheduler @@ -121,4 +121,4 @@ device geom_label device geom_journal device geom_part_bsd -options ROOTDEVNAME=\"ufs:da0s1a\" +options ROOTDEVNAME=\"ufs:da0s1a\" Modified: projects/pseries/arm/conf/DOCKSTAR ============================================================================== --- projects/pseries/arm/conf/DOCKSTAR Sat Sep 22 10:14:47 2012 (r240811) +++ projects/pseries/arm/conf/DOCKSTAR Sat Sep 22 12:12:39 2012 (r240812) @@ -56,8 +56,8 @@ device ether device mge # Marvell Gigabit Ethernet controller device mii device bpf -options HZ=1000 -options DEVICE_POLLING +options HZ=1000 +options DEVICE_POLLING device vlan # USB @@ -71,5 +71,5 @@ device da # Flattened Device Tree options FDT -options FDT_DTB_STATIC +options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=dockstar.dts Modified: projects/pseries/arm/conf/EA3250 ============================================================================== --- projects/pseries/arm/conf/EA3250 Sat Sep 22 10:14:47 2012 (r240811) +++ projects/pseries/arm/conf/EA3250 Sat Sep 22 12:12:39 2012 (r240812) @@ -65,7 +65,7 @@ device bpf device lpe # USB -options USB_DEBUG +options USB_DEBUG device usb device ohci device umass Modified: projects/pseries/arm/conf/GUMSTIX-QEMU ============================================================================== --- projects/pseries/arm/conf/GUMSTIX-QEMU Sat Sep 22 10:14:47 2012 (r240811) +++ projects/pseries/arm/conf/GUMSTIX-QEMU Sat Sep 22 12:12:39 2012 (r240812) @@ -21,5 +21,5 @@ include GUMSTIX ident GUMSTIX-QEMU -options QEMU_WORKAROUNDS +options QEMU_WORKAROUNDS nooptions ARM_CACHE_LOCK_ENABLE # QEMU does not implement this Modified: projects/pseries/arm/conf/HL201 ============================================================================== --- projects/pseries/arm/conf/HL201 Sat Sep 22 10:14:47 2012 (r240811) +++ projects/pseries/arm/conf/HL201 Sat Sep 22 12:12:39 2012 (r240812) @@ -49,7 +49,7 @@ options BOOTP_NFSV3 #options BOOTP_WIRED_TO=ate0 options BOOTP_COMPAT -options ALT_BREAK_TO_DEBUGGER +options ALT_BREAK_TO_DEBUGGER #options MSDOSFS #MSDOS Filesystem #options CD9660 #ISO 9660 Filesystem @@ -128,5 +128,5 @@ device pass # Passthrough device (dire #device wlan_ccmp # 802.11 CCMP support #device wlan_tkip # 802.11 TKIP support #device wlan_amrr # AMRR transmit rate control algorithm -options ROOTDEVNAME=\"ufs:da0s1a\" +options ROOTDEVNAME=\"ufs:da0s1a\" Modified: projects/pseries/arm/conf/KB920X ============================================================================== --- projects/pseries/arm/conf/KB920X Sat Sep 22 10:14:47 2012 (r240811) +++ projects/pseries/arm/conf/KB920X Sat Sep 22 12:12:39 2012 (r240812) @@ -144,6 +144,6 @@ device usfs # emulate a flash device cdce # emulate an ethernet device usb_template # Control of the gadget -options IEEE80211_SUPPORT_MESH +options IEEE80211_SUPPORT_MESH -options AH_SUPPORT_AR5416 +options AH_SUPPORT_AR5416 Modified: projects/pseries/arm/conf/LN2410SBC ============================================================================== --- projects/pseries/arm/conf/LN2410SBC Sat Sep 22 10:14:47 2012 (r240811) +++ projects/pseries/arm/conf/LN2410SBC Sat Sep 22 12:12:39 2012 (r240812) @@ -40,7 +40,7 @@ options FFS #Berkeley Fast Filesystem #options UFS_DIRHASH #Improve performance on big directories #options MD_ROOT #MD is a potential root device #options MD_ROOT_SIZE=4096 # 4MB ram disk -options ROOTDEVNAME=\"ufs:da0s1\" +options ROOTDEVNAME=\"ufs:da0s1\" #options BOOTP #options BOOTP_NFSROOT # NFS mount root filesystem using BOOTP info Modified: projects/pseries/arm/conf/PANDABOARD ============================================================================== --- projects/pseries/arm/conf/PANDABOARD Sat Sep 22 10:14:47 2012 (r240811) +++ projects/pseries/arm/conf/PANDABOARD Sat Sep 22 12:12:39 2012 (r240812) @@ -46,15 +46,15 @@ options UFS_ACL #Support for access c options UFS_DIRHASH #Improve performance on big directories options NFSCLIENT #Network Filesystem Client device snp -#options NFSCL +#options NFSCL #options NFSSERVER #Network Filesystem Server options NFS_ROOT #NFS usable as /, requires NFSCLIENT -options BREAK_TO_DEBUGGER -options BOOTP_NFSROOT -options BOOTP_COMPAT -options BOOTP -options BOOTP_NFSV3 -options BOOTP_WIRED_TO=ue0 +options BREAK_TO_DEBUGGER +options BOOTP_NFSROOT +options BOOTP_COMPAT +options BOOTP +options BOOTP_NFSV3 +options BOOTP_WIRED_TO=ue0 options MSDOSFS #MSDOS Filesystem #options CD9660 #ISO 9660 Filesystem #options PROCFS #Process filesystem (requires PSEUDOFS) @@ -93,7 +93,7 @@ device pty device pl310 # PL310 L2 cache controller # Debugging for use in -current -#options VERBOSE_SYSINIT #Enable verbose sysinit messages +#options VERBOSE_SYSINIT #Enable verbose sysinit messages options KDB options DDB #Enable the kernel debugger #options INVARIANTS #Enable calls of extra sanity checking @@ -106,16 +106,16 @@ device md # The following enables MFS as root, this seems similar to an initramfs or initrd # as used in Linux. -# options MD_ROOT -# options MD_ROOT_SIZE=7560 +#options MD_ROOT +#options MD_ROOT_SIZE=7560 device random # Entropy device # USB support device usb options USB_DEBUG -#options USB_REQ_DEBUG -#options USB_VERBOSE +#options USB_REQ_DEBUG +#options USB_VERBOSE device ohci device ehci device umass @@ -125,7 +125,7 @@ device da # Direct Access (disks) # USB Ethernet support, requires miibus device miibus -# device axe # ASIX Electronics USB Ethernet +#device axe # ASIX Electronics USB Ethernet device smsc # SMSC LAN95xx USB Ethernet @@ -140,5 +140,5 @@ options FDT options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=pandaboard.dts -# device vfp # vfp/neon -# options ARM_VFP_SUPPORT # vfp/neon +#device vfp # vfp/neon +#options ARM_VFP_SUPPORT # vfp/neon Modified: projects/pseries/arm/conf/QILA9G20 ============================================================================== --- projects/pseries/arm/conf/QILA9G20 Sat Sep 22 10:14:47 2012 (r240811) +++ projects/pseries/arm/conf/QILA9G20 Sat Sep 22 12:12:39 2012 (r240812) @@ -51,7 +51,7 @@ options NFSCL #New Network Filesystem options ROOTDEVNAME=\"ufs:/dev/mmcsd0s1a\" -options ALT_BREAK_TO_DEBUGGER +options ALT_BREAK_TO_DEBUGGER #options MSDOSFS #MSDOS Filesystem #options CD9660 #ISO 9660 Filesystem Modified: projects/pseries/arm/conf/RPI-B ============================================================================== --- projects/pseries/arm/conf/RPI-B Sat Sep 22 10:14:47 2012 (r240811) +++ projects/pseries/arm/conf/RPI-B Sat Sep 22 12:12:39 2012 (r240812) @@ -24,12 +24,12 @@ cpu CPU_ARM11 files "../broadcom/bcm2835/files.bcm2835" makeoptions MODULES_OVERRIDE="" -options KERNVIRTADDR=0xc0100000 +options KERNVIRTADDR=0xc0100000 makeoptions KERNVIRTADDR=0xc0100000 -options KERNPHYSADDR=0x00100000 +options KERNPHYSADDR=0x00100000 makeoptions KERNPHYSADDR=0x00100000 -options PHYSADDR=0x00000000 -options STARTUP_PAGETABLE_ADDR=0x01000000 +options PHYSADDR=0x00000000 +options STARTUP_PAGETABLE_ADDR=0x01000000 makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols options HZ=100 @@ -42,13 +42,13 @@ options UFS_ACL #Support for access c options UFS_DIRHASH #Improve performance on big directories device snp -# options NFSCL #Network Filesystem Client -# options NFS_ROOT #NFS usable as /, requires NFSCLIENT -# options BOOTP_NFSROOT -# options BOOTP_COMPAT -# options BOOTP -# options BOOTP_NFSV3 -# options BOOTP_WIRED_TO=ue0 +#options NFSCL #Network Filesystem Client +#options NFS_ROOT #NFS usable as /, requires NFSCLIENT +#options BOOTP_NFSROOT +#options BOOTP_COMPAT +#options BOOTP +#options BOOTP_NFSV3 +#options BOOTP_WIRED_TO=ue0 options PSEUDOFS #Pseudo-filesystem framework options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!] Modified: projects/pseries/arm/conf/SAM9G20EK ============================================================================== --- projects/pseries/arm/conf/SAM9G20EK Sat Sep 22 10:14:47 2012 (r240811) +++ projects/pseries/arm/conf/SAM9G20EK Sat Sep 22 12:12:39 2012 (r240812) @@ -50,7 +50,7 @@ options NFSCL #New Network Filesystem options ROOTDEVNAME=\"ufs:/dev/mmcsd0s1a\" -options ALT_BREAK_TO_DEBUGGER +options ALT_BREAK_TO_DEBUGGER #options MSDOSFS #MSDOS Filesystem #options CD9660 #ISO 9660 Filesystem Modified: projects/pseries/arm/conf/SAM9X25EK ============================================================================== --- projects/pseries/arm/conf/SAM9X25EK Sat Sep 22 10:14:47 2012 (r240811) +++ projects/pseries/arm/conf/SAM9X25EK Sat Sep 22 12:12:39 2012 (r240812) @@ -51,7 +51,7 @@ options NFSCL #New Network Filesystem options ROOTDEVNAME=\"ufs:/dev/mmcsd0s1a\" -options ALT_BREAK_TO_DEBUGGER +options ALT_BREAK_TO_DEBUGGER #options MSDOSFS #MSDOS Filesystem #options CD9660 #ISO 9660 Filesystem Modified: projects/pseries/arm/conf/SHEEVAPLUG ============================================================================== --- projects/pseries/arm/conf/SHEEVAPLUG Sat Sep 22 10:14:47 2012 (r240811) +++ projects/pseries/arm/conf/SHEEVAPLUG Sat Sep 22 12:12:39 2012 (r240812) @@ -56,8 +56,8 @@ device mge # Marvell Gigabit Ethernet device mii device e1000phy device bpf -options HZ=1000 -options DEVICE_POLLING +options HZ=1000 +options DEVICE_POLLING device vlan device cesa # Marvell security engine @@ -78,5 +78,5 @@ device nand # Flattened Device Tree options FDT -options FDT_DTB_STATIC +options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=sheevaplug.dts Modified: projects/pseries/arm/conf/SN9G45 ============================================================================== --- projects/pseries/arm/conf/SN9G45 Sat Sep 22 10:14:47 2012 (r240811) +++ projects/pseries/arm/conf/SN9G45 Sat Sep 22 12:12:39 2012 (r240812) @@ -50,7 +50,7 @@ options NFSCL #New Network Filesystem options ROOTDEVNAME=\"ufs:/dev/da0s1\" -options ALT_BREAK_TO_DEBUGGER +options ALT_BREAK_TO_DEBUGGER #options MSDOSFS #MSDOS Filesystem #options CD9660 #ISO 9660 Filesystem Modified: projects/pseries/arm/conf/TS7800 ============================================================================== --- projects/pseries/arm/conf/TS7800 Sat Sep 22 10:14:47 2012 (r240811) +++ projects/pseries/arm/conf/TS7800 Sat Sep 22 12:12:39 2012 (r240812) @@ -74,6 +74,6 @@ options ATA_CAM # Flattened Device Tree options FDT -options FDT_DTB_STATIC +options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=ts7800.dts Modified: projects/pseries/arm/econa/econa_machdep.c ============================================================================== --- projects/pseries/arm/econa/econa_machdep.c Sat Sep 22 10:14:47 2012 (r240811) +++ projects/pseries/arm/econa/econa_machdep.c Sat Sep 22 12:12:39 2012 (r240812) @@ -92,11 +92,6 @@ __FBSDID("$FreeBSD$"); /* this should be evenly divisable by PAGE_SIZE / L2_TABLE_SIZE_REAL (or 4) */ #define NUM_KERNEL_PTS (KERNEL_PT_AFKERNEL + KERNEL_PT_AFKERNEL_NUM) -/* Define various stack sizes in pages */ -#define IRQ_STACK_SIZE 1 -#define ABT_STACK_SIZE 1 -#define UND_STACK_SIZE 1 - extern u_int data_abort_handler_address; extern u_int prefetch_abort_handler_address; extern u_int undefined_handler_address; @@ -303,12 +298,7 @@ initarm(struct arm_boot_params *abp) */ cpu_control(CPU_CONTROL_MMU_ENABLE, CPU_CONTROL_MMU_ENABLE); - set_stackptr(PSR_IRQ32_MODE, - irqstack.pv_va + IRQ_STACK_SIZE * PAGE_SIZE); - set_stackptr(PSR_ABT32_MODE, - abtstack.pv_va + ABT_STACK_SIZE * PAGE_SIZE); - set_stackptr(PSR_UND32_MODE, - undstack.pv_va + UND_STACK_SIZE * PAGE_SIZE); + set_stackptrs(0); /* * We must now clean the cache again.... Modified: projects/pseries/arm/include/machdep.h ============================================================================== --- projects/pseries/arm/include/machdep.h Sat Sep 22 10:14:47 2012 (r240811) +++ projects/pseries/arm/include/machdep.h Sat Sep 22 12:12:39 2012 (r240812) @@ -4,12 +4,23 @@ #ifndef _MACHDEP_BOOT_MACHDEP_H_ #define _MACHDEP_BOOT_MACHDEP_H_ +/* Structs that need to be initialised by initarm */ +extern struct pv_addr irqstack; +extern struct pv_addr undstack; +extern struct pv_addr abtstack; + +/* Define various stack sizes in pages */ +#define IRQ_STACK_SIZE 1 +#define ABT_STACK_SIZE 1 +#define UND_STACK_SIZE 1 + /* misc prototypes used by the many arm machdeps */ void arm_lock_cache_line(vm_offset_t); void init_proc0(vm_offset_t kstack); void halt(void); void data_abort_handler(trapframe_t *); void prefetch_abort_handler(trapframe_t *); +void set_stackptrs(int cpu); void undefinedinstruction_bounce(trapframe_t *); /* Early boot related helper functions */ Modified: projects/pseries/arm/lpc/lpc_machdep.c ============================================================================== --- projects/pseries/arm/lpc/lpc_machdep.c Sat Sep 22 10:14:47 2012 (r240811) +++ projects/pseries/arm/lpc/lpc_machdep.c Sat Sep 22 12:12:39 2012 (r240812) @@ -109,11 +109,6 @@ __FBSDID("$FreeBSD$"); */ #define KERNEL_PT_MAX 78 -/* Define various stack sizes in pages */ -#define IRQ_STACK_SIZE 1 -#define ABT_STACK_SIZE 1 -#define UND_STACK_SIZE 1 - extern unsigned char kernbase[]; extern unsigned char _etext[]; extern unsigned char _edata[]; @@ -504,12 +499,8 @@ initarm(struct arm_boot_params *abp) * of the stack memory. */ cpu_control(CPU_CONTROL_MMU_ENABLE, CPU_CONTROL_MMU_ENABLE); - set_stackptr(PSR_IRQ32_MODE, - irqstack.pv_va + IRQ_STACK_SIZE * PAGE_SIZE); - set_stackptr(PSR_ABT32_MODE, - abtstack.pv_va + ABT_STACK_SIZE * PAGE_SIZE); - set_stackptr(PSR_UND32_MODE, - undstack.pv_va + UND_STACK_SIZE * PAGE_SIZE); + + set_stackptrs(0); /* * We must now clean the cache again.... Modified: projects/pseries/arm/mv/mv_machdep.c ============================================================================== --- projects/pseries/arm/mv/mv_machdep.c Sat Sep 22 10:14:47 2012 (r240811) +++ projects/pseries/arm/mv/mv_machdep.c Sat Sep 22 12:12:39 2012 (r240812) @@ -104,11 +104,6 @@ __FBSDID("$FreeBSD$"); */ #define KERNEL_PT_MAX 78 *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***