Re: svn commit: r295134 - head/sys/kgssapi/krb5

2016-02-02 Thread Alan Somers
On Mon, Feb 1, 2016 at 5:14 PM, Conrad E. Meyer  wrote:
> Author: cem
> Date: Tue Feb  2 00:14:51 2016
> New Revision: 295134
> URL: https://svnweb.freebsd.org/changeset/base/295134
>
> Log:
>   kcrypto_aes: Use separate sessions for AES and SHA1
>
>   Some hardware supports AES acceleration but not SHA1, e.g., AES-NI
>   extensions.  It is useful to have accelerated AES even if SHA1 must be
>   software.
>
>   Suggested by: asomers
>   Reviewed by:  asomers, dfr
>   Sponsored by: EMC / Isilon Storage Division
>   Differential Revision:https://reviews.freebsd.org/D5146
>
> Modified:
>   head/sys/kgssapi/krb5/kcrypto_aes.c

Thanks for doing this, Conrad.  Could you also please MFC it once
stable/10 thaws?
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r295159 - in head/contrib: libucl/tests libxo unbound

2016-02-02 Thread Maxim Sobolev
Author: sobomax
Date: Tue Feb  2 19:04:40 2016
New Revision: 295159
URL: https://svnweb.freebsd.org/changeset/base/295159

Log:
  Root out files that don't really belong here and could in fact screw
  you over if you happen to use git for FreeBSD development, as it is
  the case with the unbound/.gitignore, which lits files that are
  actually required for the buildworld.
  
  MFC after:1 day

Deleted:
  head/contrib/libucl/tests/.gitignore
  head/contrib/libxo/.gitignore
  head/contrib/unbound/.gitignore
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r295136 - in head: sys/kern sys/netinet sys/sys usr.bin/netstat

2016-02-02 Thread Xin LI
On Tuesday, February 2, 2016, Alfred Perlstein  wrote:

>
>
> On 2/2/16 11:39 AM, John Baldwin wrote:
>
>> On Tuesday, February 02, 2016 05:57:59 AM Alfred Perlstein wrote:
>>
>>> Author: alfred
>>> Date: Tue Feb  2 05:57:59 2016
>>> New Revision: 295136
>>> URL: https://svnweb.freebsd.org/changeset/base/295136
>>>
>>> Log:
>>>Increase max allowed backlog for listen sockets
>>>from short to int.
>>>   PR: 203922
>>>Submitted by: White Knight 
>>>MFC After: 4 weeks
>>>
>> You do realize that this breaks the ABI of the sysctls used to fetch
>> connection lists (and so will break existing binaries like ucd-snmpd,
>> etc.)
>> and thus can't be MFC'd right?
>>
> OK, I will not MFC it.
>
> Is it worthwhile to extend the xsocket to have padding so that in 11.x and
> beyond we can allow for some changes in the structure?
>
> Another idea I had was to include a version number with the sysctl request
> so that we can send back versioned structures, let me know what you think
> about that.
>
> The first idea will take not more than a few days for me to accomplish,
> the second (versioning the sysctl) probably a few more days than that.


We have similar construction (versioned ioctl) in FreeBSD ZFS but the main
goal is to keep system bootable, not to support all functionalities.  Do we
change the structure often and is it important enough to warrant the
complexity?  I think kmem interface have a simple size check to guard
against world/kernel inconsistency.

I would second John's comment on the necessity of the change though, if one
already have 32K of *backlogged* connections, it's probably not very useful
to allow more coming in.  It sounds like the application itself is
seriously broken, and unless expanding the field have some performance
benefit, I don't think it should stay.

-- 
Xin LI  https://www.delphij.net/
FreeBSD - The Power to Serve! Live free or die
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r295136 - in head: sys/kern sys/netinet sys/sys usr.bin/netstat

2016-02-02 Thread John Baldwin
On Tuesday, February 02, 2016 05:57:59 AM Alfred Perlstein wrote:
> Author: alfred
> Date: Tue Feb  2 05:57:59 2016
> New Revision: 295136
> URL: https://svnweb.freebsd.org/changeset/base/295136
> 
> Log:
>   Increase max allowed backlog for listen sockets
>   from short to int.
>   
>   PR: 203922
>   Submitted by: White Knight 
>   MFC After: 4 weeks

You do realize that this breaks the ABI of the sysctls used to fetch
connection lists (and so will break existing binaries like ucd-snmpd, etc.)
and thus can't be MFC'd right?

Also, when this patch was brought up on the lists there was the question of
if it is really beneficial to have more than 32k sockets that you haven't
accepted yet.  It's one thing to have lots of concurrent active sockets that
you are servicing, but if your application is so backlogged that there are
32k sockets waiting on accept() it's hard to imagine why having more than
32k sockets waiting on accept() is useful.

-- 
John Baldwin
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r295159 - in head/contrib: libucl/tests libxo unbound

2016-02-02 Thread Baptiste Daroussin
On Tue, Feb 02, 2016 at 07:04:41PM +, Maxim Sobolev wrote:
> Author: sobomax
> Date: Tue Feb  2 19:04:40 2016
> New Revision: 295159
> URL: https://svnweb.freebsd.org/changeset/base/295159
> 
> Log:
>   Root out files that don't really belong here and could in fact screw
>   you over if you happen to use git for FreeBSD development, as it is
>   the case with the unbound/.gitignore, which lits files that are
>   actually required for the buildworld.
>   
>   MFC after:  1 day
> 
> Deleted:
>   head/contrib/libucl/tests/.gitignore

Thank you! and sorry for having introduced the above one, I'll make sure to pay
more attention

Best regards,
Bapt


signature.asc
Description: PGP signature


Re: svn commit: r295136 - in head: sys/kern sys/netinet sys/sys usr.bin/netstat

2016-02-02 Thread Alfred Perlstein



On 2/2/16 12:23 PM, Xin LI wrote:



On Tuesday, February 2, 2016, Alfred Perlstein > wrote:




On 2/2/16 11:39 AM, John Baldwin wrote:

On Tuesday, February 02, 2016 05:57:59 AM Alfred Perlstein wrote:

Author: alfred
Date: Tue Feb  2 05:57:59 2016
New Revision: 295136
URL: https://svnweb.freebsd.org/changeset/base/295136

Log:
   Increase max allowed backlog for listen sockets
   from short to int.
  PR: 203922
   Submitted by: White Knight 
   MFC After: 4 weeks

You do realize that this breaks the ABI of the sysctls used to
fetch
connection lists (and so will break existing binaries like
ucd-snmpd, etc.)
and thus can't be MFC'd right?

OK, I will not MFC it.

Is it worthwhile to extend the xsocket to have padding so that in
11.x and beyond we can allow for some changes in the structure?

Another idea I had was to include a version number with the sysctl
request so that we can send back versioned structures, let me know
what you think about that.

The first idea will take not more than a few days for me to
accomplish, the second (versioning the sysctl) probably a few more
days than that.


We have similar construction (versioned ioctl) in FreeBSD ZFS but the 
main goal is to keep system bootable, not to support all 
functionalities.  Do we change the structure often and is it important 
enough to warrant the complexity?  I think kmem interface have a 
simple size check to guard against world/kernel inconsistency.


I would second John's comment on the necessity of the change though, 
if one already have 32K of *backlogged* connections, it's probably not 
very useful to allow more coming in.  It sounds like the application 
itself is seriously broken, and unless expanding the field have some 
performance benefit, I don't think it should stay.


Imagine a hugely busy image board like 2ch.net, if there is a single 
hiccup, it's very possible to start dropping connections.


I stand by the scalability improvement offered here even though it is an 
edge case.  Linux appears to offer 32 bits of backlog and so should we.


-Alfred
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r295165 - head/contrib/openresolv

2016-02-02 Thread Pedro F. Giffuni
Author: pfg
Date: Tue Feb  2 21:10:43 2016
New Revision: 295165
URL: https://svnweb.freebsd.org/changeset/base/295165

Log:
  MFV r295109:
  Update openresolve to version 3.7.2
  
  Relnotes: yes

Modified:
  head/contrib/openresolv/Makefile
  head/contrib/openresolv/resolvconf.8.in
  head/contrib/openresolv/resolvconf.conf.5.in
  head/contrib/openresolv/resolvconf.in
  head/contrib/openresolv/unbound.in
Directory Properties:
  head/contrib/openresolv/   (props changed)

Modified: head/contrib/openresolv/Makefile
==
--- head/contrib/openresolv/MakefileTue Feb  2 21:06:09 2016
(r295164)
+++ head/contrib/openresolv/MakefileTue Feb  2 21:10:43 2016
(r295165)
@@ -1,5 +1,5 @@
 PKG=   openresolv
-VERSION=   3.7.0
+VERSION=   3.7.1
 
 # Nasty hack so that make clean works without configure being run
 _CONFIG_MK!=   test -e config.mk && echo config.mk || echo config-null.mk
@@ -37,7 +37,7 @@ SED_RESTARTCMD=   -e 's:@RESTARTCMD \(.*\
 
 DISTPREFIX?=   ${PKG}-${VERSION}
 DISTFILEGZ?=   ${DISTPREFIX}.tar.gz
-DISTFILE?= ${DISTPREFIX}.tar.bz2
+DISTFILE?= ${DISTPREFIX}.tar.xz
 FOSSILID?= current
 
 .SUFFIXES: .in
@@ -77,9 +77,9 @@ install: proginstall maninstall
 import:
rm -rf /tmp/${DISTPREFIX}
${INSTALL} -d /tmp/${DISTPREFIX}
-   cp README ${SRCS} /tmp/${DISPREFIX}
+   cp README ${SRCS} /tmp/${DISTPREFIX}
 
 dist:
fossil tarball --name ${DISTPREFIX} ${FOSSILID} ${DISTFILEGZ}
-   gunzip -c ${DISTFILEGZ} |  bzip2 >${DISTFILE}
+   gunzip -c ${DISTFILEGZ} | xz >${DISTFILE}
rm ${DISTFILEGZ}

Modified: head/contrib/openresolv/resolvconf.8.in
==
--- head/contrib/openresolv/resolvconf.8.in Tue Feb  2 21:06:09 2016
(r295164)
+++ head/contrib/openresolv/resolvconf.8.in Tue Feb  2 21:10:43 2016
(r295165)
@@ -22,7 +22,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd April 27, 2014
+.Dd April 27, 2015
 .Dt RESOLVCONF 8
 .Os
 .Sh NAME

Modified: head/contrib/openresolv/resolvconf.conf.5.in
==
--- head/contrib/openresolv/resolvconf.conf.5.inTue Feb  2 21:06:09 
2016(r295164)
+++ head/contrib/openresolv/resolvconf.conf.5.inTue Feb  2 21:10:43 
2016(r295165)
@@ -22,7 +22,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd March 20, 2015
+.Dd May 14, 2015
 .Dt RESOLVCONF.CONF 5
 .Os
 .Sh NAME
@@ -91,6 +91,11 @@ To remove a block, you can use 192.168.*
 These interfaces name servers will only be queried for the domains listed
 in their resolv.conf.
 Useful for VPN domains.
+Setting
+.Sy private_interfaces Ns ="*"
+will stop the forwarding of the root zone and allows the local resolver to
+recursively query the root servers directly.
+Requires a local nameserver other than libc.
 This is equivalent to the
 .Nm resolvconf -p
 option.
@@ -149,7 +154,7 @@ When set to /dev/null or NULL,
 .Sy resolv_conf_local_only
 is defaulted to NO,
 .Sy local_nameservers
-is unset unless overriden and only the information set in
+is unset unless overridden and only the information set in
 .Nm
 is written to
 .Sy resolv_conf .
@@ -271,7 +276,7 @@ Each subscriber attempts to automaticall
 distribution has been catered for.
 Also, users could equally want to use a different version from the one
 installed by default, such as bind8 and bind9.
-To accomodate this, the subscribers have these files in configurable
+To accommodate this, the subscribers have these files in configurable
 variables, documented below.
 .Pp
 .Bl -tag -width indent

Modified: head/contrib/openresolv/resolvconf.in
==
--- head/contrib/openresolv/resolvconf.in   Tue Feb  2 21:06:09 2016
(r295164)
+++ head/contrib/openresolv/resolvconf.in   Tue Feb  2 21:10:43 2016
(r295165)
@@ -50,7 +50,6 @@ elif [ -d "$SYSCONFDIR/resolvconf" ]; th
interface_order="$(cat "$SYSCONFDIR"/interface-order)"
fi
 fi
-TMPDIR="$VARDIR/tmp"
 IFACEDIR="$VARDIR/interfaces"
 METRICDIR="$VARDIR/metrics"
 PRIVATEDIR="$VARDIR/private"

Modified: head/contrib/openresolv/unbound.in
==
--- head/contrib/openresolv/unbound.in  Tue Feb  2 21:06:09 2016
(r295164)
+++ head/contrib/openresolv/unbound.in  Tue Feb  2 21:10:43 2016
(r295165)
@@ -45,7 +45,8 @@ for d in $DOMAINS; do
ns="${d#*:}"
case "$unbound_insecure" in
[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
-   newconf="$newconf${NL}domain-insecure: \"$dn\""
+   newconf="$newconf${NL}server:$NL"
+  

svn commit: r295166 - in head/sys/arm: arm include

2016-02-02 Thread Svatopluk Kraus
Author: skra
Date: Tue Feb  2 21:10:55 2016
New Revision: 295166
URL: https://svnweb.freebsd.org/changeset/base/295166

Log:
  Make pmap_preboot_map_attr() vm subsystem compliant, so its arguments
  do not depend on pmap internals. This is a preparation for hiding
  internal pmap definitions as much as possible from the rest of system.
  
  Simultaneously, the protection argument evaluation is fixed. Happily,
  it did not effect the mappings. And it's the reason why it was not fixed
  earlier.

Modified:
  head/sys/arm/arm/pmap-v6.c
  head/sys/arm/include/pmap-v6.h

Modified: head/sys/arm/arm/pmap-v6.c
==
--- head/sys/arm/arm/pmap-v6.c  Tue Feb  2 21:10:43 2016(r295165)
+++ head/sys/arm/arm/pmap-v6.c  Tue Feb  2 21:10:55 2016(r295166)
@@ -645,7 +645,7 @@ pt2map_pt2pg(vm_offset_t va)
  *  vm_offset_t pmap_preboot_reserve_pages(u_int num);
  *  vm_offset_t pmap_preboot_get_vpages(u_int num);
  *  void pmap_preboot_map_attr(vm_paddr_t pa, vm_offset_t va, vm_size_t size,
- *  int prot, int attr);
+ *  vm_prot_t prot, vm_memattr_t attr);
  *
  *  (2) for all stages:
  *
@@ -984,15 +984,16 @@ pmap_preboot_get_vpages(u_int num)
  *  Pre-bootstrap epoch page mapping(s) with attributes.
  */
 void
-pmap_preboot_map_attr(vm_paddr_t pa, vm_offset_t va, vm_size_t size, int prot,
-int attr)
+pmap_preboot_map_attr(vm_paddr_t pa, vm_offset_t va, vm_size_t size,
+vm_prot_t prot, vm_memattr_t attr)
 {
u_int num;
-   u_int l1_attr, l1_prot;
+   u_int l1_attr, l1_prot, l2_prot;
pt1_entry_t *pte1p;
pt2_entry_t *pte2p;
 
-   l1_prot = ATTR_TO_L1(prot);
+   l2_prot = prot & VM_PROT_WRITE ? PTE2_AP_KRW : PTE2_AP_KR;
+   l1_prot = ATTR_TO_L1(l2_prot);
l1_attr = ATTR_TO_L1(attr);
 
/* Map all the pages. */
@@ -1006,13 +1007,12 @@ pmap_preboot_map_attr(vm_paddr_t pa, vm_
num -= PTE1_SIZE;
} else {
pte2p = pmap_preboot_vtopte2(va);
-   pte2_store(pte2p, PTE2_KERN(pa, prot, attr));
+   pte2_store(pte2p, PTE2_KERN(pa, l2_prot, attr));
va += PAGE_SIZE;
pa += PAGE_SIZE;
num -= PAGE_SIZE;
}
}
-
 }
 
 /*

Modified: head/sys/arm/include/pmap-v6.h
==
--- head/sys/arm/include/pmap-v6.h  Tue Feb  2 21:10:43 2016
(r295165)
+++ head/sys/arm/include/pmap-v6.h  Tue Feb  2 21:10:55 2016
(r295166)
@@ -216,8 +216,8 @@ vm_paddr_t pmap_preboot_get_pages(u_int 
 void pmap_preboot_map_pages(vm_paddr_t , vm_offset_t , u_int );
 vm_offset_t pmap_preboot_reserve_pages(u_int );
 vm_offset_t pmap_preboot_get_vpages(u_int );
-void pmap_preboot_map_attr(vm_paddr_t , vm_offset_t , vm_size_t ,
-   int , int );
+void pmap_preboot_map_attr(vm_paddr_t, vm_offset_t, vm_size_t, vm_prot_t,
+vm_memattr_t);
 static __inline void
 pmap_map_chunk(vm_offset_t l1pt, vm_offset_t va, vm_offset_t pa,
 vm_size_t size, int prot, int cache)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r295136 - in head: sys/kern sys/netinet sys/sys usr.bin/netstat

2016-02-02 Thread Slawa Olhovchenkov
On Tue, Feb 02, 2016 at 12:35:47PM -0800, Alfred Perlstein wrote:

> > I would second John's comment on the necessity of the change though, 
> > if one already have 32K of *backlogged* connections, it's probably not 
> > very useful to allow more coming in.  It sounds like the application 
> > itself is seriously broken, and unless expanding the field have some 
> > performance benefit, I don't think it should stay.
> 
> Imagine a hugely busy image board like 2ch.net, if there is a single 
> hiccup, it's very possible to start dropping connections.

In reality start dropping connections in any case: nobody will be
infinity wait of accept (user close browser and go away, etc).

Also, if you have more then 4K backloged connections -- you have
problem, you can't process all connections request and in next second
you will be have 8K, after next second -- 12K and etc.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r295134 - head/sys/kgssapi/krb5

2016-02-02 Thread Conrad Meyer
On Tue, Feb 2, 2016 at 10:21 AM, Alan Somers  wrote:
> On Mon, Feb 1, 2016 at 5:14 PM, Conrad E. Meyer  wrote:
>> URL: https://svnweb.freebsd.org/changeset/base/295134
>>
>> Log:
>>   kcrypto_aes: Use separate sessions for AES and SHA1
>
> Thanks for doing this, Conrad.  Could you also please MFC it once
> stable/10 thaws?

Sorry, I don't do stable branches.  If you would like to MFC it to 10,
please go ahead.

Best,
Conrad
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r295136 - in head: sys/kern sys/netinet sys/sys usr.bin/netstat

2016-02-02 Thread Alfred Perlstein



On 2/2/16 1:09 PM, Slawa Olhovchenkov wrote:

On Tue, Feb 02, 2016 at 12:35:47PM -0800, Alfred Perlstein wrote:


I would second John's comment on the necessity of the change though,
if one already have 32K of *backlogged* connections, it's probably not
very useful to allow more coming in.  It sounds like the application
itself is seriously broken, and unless expanding the field have some
performance benefit, I don't think it should stay.

Imagine a hugely busy image board like 2ch.net, if there is a single
hiccup, it's very possible to start dropping connections.

In reality start dropping connections in any case: nobody will be
infinity wait of accept (user close browser and go away, etc).

Also, if you have more then 4K backloged connections -- you have
problem, you can't process all connections request and in next second
you will be have 8K, after next second -- 12K and etc.


Thank you Slawa,

I am pretty familiar with what you are describing which are "cascade 
failures", however in order to understand why such a change makes sense 
I can give you a little early history lesson on a project I developed 
under FreeBSD, and then explain why such a project would probably not 
work with FreeBSD as a platform today (we would have to use Linux or 
custom patches).


Here is that use case:

Back in 1999 I wrote a custom webserver using FreeBSD that was 
processing over 1500 connections per second.


What we were doing was tracking web hits using "hidden gifs".  Now this 
was 1999 with only 100mbit hardware and a pentium 400mhz.  Mind you I 
was doing this with cpu to spare, so having an influx of additional hits 
was OK.


Meaning I could easily deal with backlog.

Now what was important about this case was that EVERY time we served the 
data we were able to monitize it and pay for my salary at the time which 
was working on SMP for FreeBSD and a bunch of other patches.  Any lost 
hits / broken connections would easily cost us money, which in turn 
meant less time on FreeBSD and less time fixing things to scale.


In our case the user would not really know if our "page" didn't load 
because we were just an invisible gif.


So back to the example, let's scale that out to today's numbers.

100mbps -> 10gigE, so that would be 1500 conn/sec -> 150,000 conn/sec.  
so basically at 0.20 of a second of any sort of latency I will be 
overflowing the listen queue and dropping connections.


Now when you still have CPU to spare because connections *are* precious, 
then the model makes sense to slightly over-provision the servers to 
allow for somebacklog to be processed.


So, in today's day and age, it really does make sense to allow for 
buffering more than 32k connections, particularly if the developer knows 
what he is doing.


Does this help explain the reasoning?

thanks!

-Alfred

___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r295169 - head/usr.sbin/sysrc

2016-02-02 Thread Devin Teske
Author: dteske
Date: Tue Feb  2 21:58:17 2016
New Revision: 295169
URL: https://svnweb.freebsd.org/changeset/base/295169

Log:
  Replace (Qo \  Qc) with (Qo (space) Qc)
  
  When using col(1) piped to vim(1) as pager for man(1), the former sequence
  of (Qo \  Qc) renders as "" without the space. Replace with (Qo (space) Qc)
  which renders properly in more (all?) pagers.

Modified:
  head/usr.sbin/sysrc/sysrc.8

Modified: head/usr.sbin/sysrc/sysrc.8
==
--- head/usr.sbin/sysrc/sysrc.8 Tue Feb  2 21:17:25 2016(r295168)
+++ head/usr.sbin/sysrc/sysrc.8 Tue Feb  2 21:58:17 2016(r295169)
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2011-2015 Devin Teske
+.\" Copyright (c) 2011-2016 Devin Teske
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 12, 2015
+.Dd February 2, 2016
 .Dt SYSRC 8
 .Os
 .Sh NAME
@@ -255,7 +255,7 @@ When using the
 .Ql key+=value
 syntax to add items to existing values,
 the first character of the value is taken as the delimiter separating items
-.Pq usually Qo \  Qc or Qo , Qc .
+.Pq usually Qo (space) Qc or Qo , Qc .
 For example, in the following statement:
 .Bl -item -offset indent
 .It
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r295170 - head/usr.sbin/sysrc

2016-02-02 Thread Devin Teske
Author: dteske
Date: Tue Feb  2 22:18:43 2016
New Revision: 295170
URL: https://svnweb.freebsd.org/changeset/base/295170

Log:
  For +=/-=, add . and / to convenience characters
  
  sysrc(8) supports key+=value and key-=value, but can be told what the
  delimiter is by being passed as char1 (e.g., "sysrc key+=",value" to use a
  comma as the delimiter instead of space). For convenience, if the first char
  is alpha-numeric, it is assumed you wanted whitespace as the delimiter.
  
  However, if you naively (as I just did) execute:
sysrc rc_conf_files+=/etc/rc.conf.other
  the result is unexpected.
  
  This commit makes `.' and `/' in-addition to alpha-numeric first-characters
  to cause the default of whitespace to be used as the delimiter. This also
  means that you can no longer use these as a delimiter.

Modified:
  head/usr.sbin/sysrc/sysrc
  head/usr.sbin/sysrc/sysrc.8

Modified: head/usr.sbin/sysrc/sysrc
==
--- head/usr.sbin/sysrc/sysrc   Tue Feb  2 21:58:17 2016(r295169)
+++ head/usr.sbin/sysrc/sysrc   Tue Feb  2 22:18:43 2016(r295170)
@@ -790,7 +790,7 @@ while [ $# -gt 0 ]; do
delim="${add%"${add#?}"}" # first character
oldIFS="$IFS"
case "$delim" in
-   ""|[$IFS]|[a-zA-Z0-9]) delim=" " ;;
+   ""|[$IFS]|[a-zA-Z0-9./]) delim=" " ;;
*) IFS="$delim"
esac
new="$before"
@@ -812,7 +812,7 @@ while [ $# -gt 0 ]; do
delim="${remove%"${remove#?}"}" # first character
oldIFS="$IFS"
case "$delim" in
-   ""|[$IFS]|[a-zA-Z0-9]) delim=" " ;;
+   ""|[$IFS]|[a-zA-Z0-9./]) delim=" " ;;
*) IFS="$delim"
esac
new=

Modified: head/usr.sbin/sysrc/sysrc.8
==
--- head/usr.sbin/sysrc/sysrc.8 Tue Feb  2 21:58:17 2016(r295169)
+++ head/usr.sbin/sysrc/sysrc.8 Tue Feb  2 22:18:43 2016(r295170)
@@ -275,6 +275,10 @@ it is added
 .Pp
 For convenience, if the first character is alpha-numeric
 .Pq letters A-Z, a-z, or numbers 0-9 ,
+dot
+.Pq Li . ,
+or slash
+.Pq Li / ,
 .Nm
 uses the default setting of whitespace as separator.
 For example, the above and below statements are equivalent since
@@ -329,6 +333,10 @@ it is removed
 .Pp
 For convenience, if the first character is alpha-numeric
 .Pq letters A-Z, a-z, or numbers 0-9 ,
+dot
+.Pq Li . ,
+or slash
+.Pq Li / ,
 .Nm
 uses the default setting of whitespace as separator.
 For example, the above and below statements are equivalent since
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r295168 - in head/sys/arm: arm include

2016-02-02 Thread Svatopluk Kraus
Author: skra
Date: Tue Feb  2 21:17:25 2016
New Revision: 295168
URL: https://svnweb.freebsd.org/changeset/base/295168

Log:
  Use pmap_preboot_map_attr() directly in arm_devmap_bootstrap()
  instead of hiding behind pmap_map_chunk(). It's not longer needed
  after old pmap-v6 code was removed.
  
  For compatibility with __ARM_ARCH < 6, define PTE_DEVICE in devmap.c
  file. Certainly, it would be nice if VM_MEMATTR_DEVICE could be used
  even for __ARM_ARCH < 6.

Modified:
  head/sys/arm/arm/devmap.c
  head/sys/arm/include/pmap-v6.h

Modified: head/sys/arm/arm/devmap.c
==
--- head/sys/arm/arm/devmap.c   Tue Feb  2 21:11:23 2016(r295167)
+++ head/sys/arm/arm/devmap.c   Tue Feb  2 21:17:25 2016(r295168)
@@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -52,6 +53,9 @@ static boolean_t devmap_bootstrap_done =
 #definePTE_DEVICE  VM_MEMATTR_DEVICE
 #elif defined(__arm__)
 #defineMAX_VADDR   ARM_VECTORS_HIGH
+#if __ARM_ARCH >= 6
+#definePTE_DEVICE  VM_MEMATTR_DEVICE
+#endif
 #endif
 
 /*
@@ -204,8 +208,13 @@ arm_devmap_bootstrap(vm_offset_t l1pt, c
 
for (pd = devmap_table; pd->pd_size != 0; ++pd) {
 #if defined(__arm__)
+#if __ARM_ARCH >= 6
+   pmap_preboot_map_attr(pd->pd_pa, pd->pd_va, pd->pd_size,
+   pd->pd_prot, pd->pd_cache);
+#else
pmap_map_chunk(l1pt, pd->pd_va, pd->pd_pa, pd->pd_size,
-   pd->pd_prot,pd->pd_cache);
+   pd->pd_prot, pd->pd_cache);
+#endif
 #elif defined(__aarch64__)
pmap_kenter_device(pd->pd_va, pd->pd_size, pd->pd_pa);
 #endif

Modified: head/sys/arm/include/pmap-v6.h
==
--- head/sys/arm/include/pmap-v6.h  Tue Feb  2 21:11:23 2016
(r295167)
+++ head/sys/arm/include/pmap-v6.h  Tue Feb  2 21:17:25 2016
(r295168)
@@ -218,12 +218,6 @@ vm_offset_t pmap_preboot_reserve_pages(u
 vm_offset_t pmap_preboot_get_vpages(u_int );
 void pmap_preboot_map_attr(vm_paddr_t, vm_offset_t, vm_size_t, vm_prot_t,
 vm_memattr_t);
-static __inline void
-pmap_map_chunk(vm_offset_t l1pt, vm_offset_t va, vm_offset_t pa,
-vm_size_t size, int prot, int cache)
-{
-   pmap_preboot_map_attr(pa, va, size, prot, cache);
-}
 
 #endif /* _KERNEL */
 
@@ -256,29 +250,6 @@ pmap_map_chunk(vm_offset_t l1pt, vm_offs
  */
 void vector_page_setprot(int);
 
-/*
- * sys/arm/arm/bus_space_generic.c (just comment)
- * sys/arm/arm/devmap.c
- * sys/arm/arm/pmap.c (just comment)
- * sys/arm/at91/at91_machdep.c
- * sys/arm/cavium/cns11xx/econa_machdep.c
- * sys/arm/freescale/imx/imx6_machdep.c (just comment)
- * sys/arm/mv/orion/db88f5xxx.c
- * sys/arm/mv/mv_localbus.c
- * sys/arm/mv/mv_machdep.c
- * sys/arm/mv/mv_pci.c
- * sys/arm/s3c2xx0/s3c24x0_machdep.c
- * sys/arm/versatile/versatile_machdep.c
- * sys/arm/xscale/ixp425/avila_machdep.c
- * sys/arm/xscale/i8134x/crb_machdep.c
- * sys/arm/xscale/i80321/ep80219_machdep.c
- * sys/arm/xscale/i80321/iq31244_machdep.c
- * sys/arm/xscale/pxa/pxa_machdep.c
- */
-#define PTE_DEVICE PTE2_ATTR_DEVICE
-
-
-
 #endif /* _KERNEL */
 // 
-
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r295136 - in head: sys/kern sys/netinet sys/sys usr.bin/netstat

2016-02-02 Thread Adrian Chadd
On 2 February 2016 at 13:21, Alfred Perlstein  wrote:
>
>
> On 2/2/16 1:09 PM, Slawa Olhovchenkov wrote:
>>
>> On Tue, Feb 02, 2016 at 12:35:47PM -0800, Alfred Perlstein wrote:
>>
 I would second John's comment on the necessity of the change though,
 if one already have 32K of *backlogged* connections, it's probably not
 very useful to allow more coming in.  It sounds like the application
 itself is seriously broken, and unless expanding the field have some
 performance benefit, I don't think it should stay.
>>>
>>> Imagine a hugely busy image board like 2ch.net, if there is a single
>>> hiccup, it's very possible to start dropping connections.
>>
>> In reality start dropping connections in any case: nobody will be
>> infinity wait of accept (user close browser and go away, etc).
>>
>> Also, if you have more then 4K backloged connections -- you have
>> problem, you can't process all connections request and in next second
>> you will be have 8K, after next second -- 12K and etc.
>>
> Thank you Slawa,
>
> I am pretty familiar with what you are describing which are "cascade
> failures", however in order to understand why such a change makes sense I
> can give you a little early history lesson on a project I developed under
> FreeBSD, and then explain why such a project would probably not work with
> FreeBSD as a platform today (we would have to use Linux or custom patches).
>
> Here is that use case:
>
> Back in 1999 I wrote a custom webserver using FreeBSD that was processing
> over 1500 connections per second.
>
> What we were doing was tracking web hits using "hidden gifs".  Now this was
> 1999 with only 100mbit hardware and a pentium 400mhz.  Mind you I was doing
> this with cpu to spare, so having an influx of additional hits was OK.
>
> Meaning I could easily deal with backlog.
>
> Now what was important about this case was that EVERY time we served the
> data we were able to monitize it and pay for my salary at the time which was
> working on SMP for FreeBSD and a bunch of other patches.  Any lost hits /
> broken connections would easily cost us money, which in turn meant less time
> on FreeBSD and less time fixing things to scale.
>
> In our case the user would not really know if our "page" didn't load because
> we were just an invisible gif.
>
> So back to the example, let's scale that out to today's numbers.
>
> 100mbps -> 10gigE, so that would be 1500 conn/sec -> 150,000 conn/sec.  so
> basically at 0.20 of a second of any sort of latency I will be overflowing
> the listen queue and dropping connections.
>
> Now when you still have CPU to spare because connections *are* precious,
> then the model makes sense to slightly over-provision the servers to allow
> for somebacklog to be processed.
>
> So, in today's day and age, it really does make sense to allow for buffering
> more than 32k connections, particularly if the developer knows what he is
> doing.
>
> Does this help explain the reasoning?

Just to add to this: the VM system under ridiculous load (like say,
deciding it can dirty most of your half-terabyte of RAM and get behind
in writing stuff to disk) can cause the system to pause for little
pieces of time. It sucks, but it happens. 0.20 seconds isn't all that
long.

And that's at 150,000 conn/sec. There's TCP locking work that will
hopefully increase that value..


-a
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r295161 - head

2016-02-02 Thread Bryan Drewery
Author: bdrewery
Date: Tue Feb  2 20:50:06 2016
New Revision: 295161
URL: https://svnweb.freebsd.org/changeset/base/295161

Log:
  Add order for installworld/distribution.
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/Makefile

Modified: head/Makefile
==
--- head/Makefile   Tue Feb  2 19:29:29 2016(r295160)
+++ head/Makefile   Tue Feb  2 20:50:06 2016(r295161)
@@ -136,6 +136,7 @@ TGTS+=  ${BITGTS}
 .ORDER: buildworld installworld
 .ORDER: buildworld distributeworld
 .ORDER: buildworld buildkernel
+.ORDER: installworld distribution
 .ORDER: buildkernel installkernel
 .ORDER: buildkernel installkernel.debug
 .ORDER: buildkernel reinstallkernel
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r295162 - head

2016-02-02 Thread Bryan Drewery
Author: bdrewery
Date: Tue Feb  2 20:50:09 2016
New Revision: 295162
URL: https://svnweb.freebsd.org/changeset/base/295162

Log:
  Adjust install .WAITs for lib/ and etc/ to allow parallelization more.
  
  Only 'installworld' needs to be protected and only when not using
  -DNO_ROOT, which implies not installing to / and not needing the
  lib dependency protections.
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Tue Feb  2 20:50:06 2016(r295161)
+++ head/Makefile.inc1  Tue Feb  2 20:50:09 2016(r295162)
@@ -72,7 +72,7 @@ SRCDIR?=  ${.CURDIR}
 SUBDIR=${SUBDIR_OVERRIDE}
 .else
 SUBDIR=lib libexec
-.if make(install*)
+.if !defined(NO_ROOT) && (make(installworld) || make(install))
 # Ensure libraries are installed before progressing.
 SUBDIR+=.WAIT
 .endif
@@ -127,7 +127,7 @@ SUBDIR+=${_DIR}
 # by calling 'makedb' in share/man.  This is only relevant for
 # install/distribute so they build the whatis file after every manpage is
 # installed.
-.if make(install*)
+.if make(installworld) || make(install)
 SUBDIR+=.WAIT
 .endif
 SUBDIR+=etc
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r295167 - head

2016-02-02 Thread Bryan Drewery
Author: bdrewery
Date: Tue Feb  2 21:11:23 2016
New Revision: 295167
URL: https://svnweb.freebsd.org/changeset/base/295167

Log:
  Deduplicate distrib-dirs logic from r289086 in distribution.
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Tue Feb  2 21:10:55 2016(r295166)
+++ head/Makefile.inc1  Tue Feb  2 21:11:23 2016(r295167)
@@ -1087,9 +1087,7 @@ distrib-dirs: .MAKE .PHONY
${_+_}cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \
${IMAKE_INSTALL} ${IMAKE_MTREE} METALOG=${METALOG} ${.TARGET}
 
-distribution: .MAKE .PHONY
-   ${_+_}cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \
-   ${IMAKE_INSTALL} ${IMAKE_MTREE} METALOG=${METALOG} ${.TARGET}
+distribution: distrib-dirs .MAKE .PHONY
${_+_}cd ${.CURDIR}; ${CROSSENV} PATH=${TMPPATH} \
${MAKE} -f Makefile.inc1 ${IMAKE_INSTALL} \
METALOG=${METALOG} installconfig
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r295136 - in head: sys/kern sys/netinet sys/sys usr.bin/netstat

2016-02-02 Thread Slawa Olhovchenkov
On Tue, Feb 02, 2016 at 01:21:52PM -0800, Alfred Perlstein wrote:

> >>> I would second John's comment on the necessity of the change though,
> >>> if one already have 32K of *backlogged* connections, it's probably not
> >>> very useful to allow more coming in.  It sounds like the application
> >>> itself is seriously broken, and unless expanding the field have some
> >>> performance benefit, I don't think it should stay.
> >> Imagine a hugely busy image board like 2ch.net, if there is a single
> >> hiccup, it's very possible to start dropping connections.
> > In reality start dropping connections in any case: nobody will be
> > infinity wait of accept (user close browser and go away, etc).
> >
> > Also, if you have more then 4K backloged connections -- you have
> > problem, you can't process all connections request and in next second
> > you will be have 8K, after next second -- 12K and etc.
> >


> In our case the user would not really know if our "page" didn't load 
> because we were just an invisible gif.
> 
> So back to the example, let's scale that out to today's numbers.
> 
> 100mbps -> 10gigE, so that would be 1500 conn/sec -> 150,000 conn/sec.  
> so basically at 0.20 of a second of any sort of latency I will be 
> overflowing the listen queue and dropping connections.

OK, you talk about very specilal case -- extremaly short connections,
about one data packet. Yes, in this case you got this behaivor.
I think case of 2ch is different.

> Now when you still have CPU to spare because connections *are* precious, 
> then the model makes sense to slightly over-provision the servers to 
> allow for somebacklog to be processed.
> 
> So, in today's day and age, it really does make sense to allow for 
> buffering more than 32k connections, particularly if the developer knows 
> what he is doing.
> 
> Does this help explain the reasoning?

Yes, some special cases may be exist.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r295169 - head/usr.sbin/sysrc

2016-02-02 Thread Benjamin Kaduk
On Tue, Feb 2, 2016 at 3:58 PM, Devin Teske  wrote:

> Author: dteske
> Date: Tue Feb  2 21:58:17 2016
> New Revision: 295169
> URL: https://svnweb.freebsd.org/changeset/base/295169
>
> Log:
>   Replace (Qo \  Qc) with (Qo (space) Qc)
>
>   When using col(1) piped to vim(1) as pager for man(1), the former
> sequence
>   of (Qo \  Qc) renders as "" without the space. Replace with (Qo (space)
> Qc)
>   which renders properly in more (all?) pagers.
>

mdoc(7) also suggests using double-quotes (" ") to escape literal spaces;
did you try that?

-Ben
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r295165 - head/contrib/openresolv

2016-02-02 Thread Oliver Pinter
On 2/2/16, Pedro F. Giffuni  wrote:
> Author: pfg
> Date: Tue Feb  2 21:10:43 2016
> New Revision: 295165
> URL: https://svnweb.freebsd.org/changeset/base/295165
>
> Log:
>   MFV r295109:
>   Update openresolve to version 3.7.2

This was not 3.7.1?

>
>   Relnotes:   yes
>
> Modified:
>   head/contrib/openresolv/Makefile
>   head/contrib/openresolv/resolvconf.8.in
>   head/contrib/openresolv/resolvconf.conf.5.in
>   head/contrib/openresolv/resolvconf.in
>   head/contrib/openresolv/unbound.in
> Directory Properties:
>   head/contrib/openresolv/   (props changed)
>
> Modified: head/contrib/openresolv/Makefile
> ==
> --- head/contrib/openresolv/Makefile  Tue Feb  2 21:06:09 2016
> (r295164)
> +++ head/contrib/openresolv/Makefile  Tue Feb  2 21:10:43 2016
> (r295165)
> @@ -1,5 +1,5 @@
>  PKG= openresolv
> -VERSION= 3.7.0
> +VERSION= 3.7.1
>
>  # Nasty hack so that make clean works without configure being run
>  _CONFIG_MK!= test -e config.mk && echo config.mk || echo config-null.mk
> @@ -37,7 +37,7 @@ SED_RESTARTCMD= -e 's:@RESTARTCMD \(.*\
>
>  DISTPREFIX?= ${PKG}-${VERSION}
>  DISTFILEGZ?= ${DISTPREFIX}.tar.gz
> -DISTFILE?=   ${DISTPREFIX}.tar.bz2
> +DISTFILE?=   ${DISTPREFIX}.tar.xz
>  FOSSILID?=   current
>
>  .SUFFIXES: .in
> @@ -77,9 +77,9 @@ install: proginstall maninstall
>  import:
>   rm -rf /tmp/${DISTPREFIX}
>   ${INSTALL} -d /tmp/${DISTPREFIX}
> - cp README ${SRCS} /tmp/${DISPREFIX}
> + cp README ${SRCS} /tmp/${DISTPREFIX}
>
>  dist:
>   fossil tarball --name ${DISTPREFIX} ${FOSSILID} ${DISTFILEGZ}
> - gunzip -c ${DISTFILEGZ} |  bzip2 >${DISTFILE}
> + gunzip -c ${DISTFILEGZ} | xz >${DISTFILE}
>   rm ${DISTFILEGZ}
>
> Modified: head/contrib/openresolv/resolvconf.8.in
> ==
> --- head/contrib/openresolv/resolvconf.8.in   Tue Feb  2 21:06:09
> 2016  (r295164)
> +++ head/contrib/openresolv/resolvconf.8.in   Tue Feb  2 21:10:43
> 2016  (r295165)
> @@ -22,7 +22,7 @@
>  .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
>  .\" SUCH DAMAGE.
>  .\"
> -.Dd April 27, 2014
> +.Dd April 27, 2015
>  .Dt RESOLVCONF 8
>  .Os
>  .Sh NAME
>
> Modified: head/contrib/openresolv/resolvconf.conf.5.in
> ==
> --- head/contrib/openresolv/resolvconf.conf.5.in  Tue Feb  2 21:06:09
> 2016  (r295164)
> +++ head/contrib/openresolv/resolvconf.conf.5.in  Tue Feb  2 21:10:43
> 2016  (r295165)
> @@ -22,7 +22,7 @@
>  .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
>  .\" SUCH DAMAGE.
>  .\"
> -.Dd March 20, 2015
> +.Dd May 14, 2015
>  .Dt RESOLVCONF.CONF 5
>  .Os
>  .Sh NAME
> @@ -91,6 +91,11 @@ To remove a block, you can use 192.168.*
>  These interfaces name servers will only be queried for the domains listed
>  in their resolv.conf.
>  Useful for VPN domains.
> +Setting
> +.Sy private_interfaces Ns ="*"
> +will stop the forwarding of the root zone and allows the local resolver to
> +recursively query the root servers directly.
> +Requires a local nameserver other than libc.
>  This is equivalent to the
>  .Nm resolvconf -p
>  option.
> @@ -149,7 +154,7 @@ When set to /dev/null or NULL,
>  .Sy resolv_conf_local_only
>  is defaulted to NO,
>  .Sy local_nameservers
> -is unset unless overriden and only the information set in
> +is unset unless overridden and only the information set in
>  .Nm
>  is written to
>  .Sy resolv_conf .
> @@ -271,7 +276,7 @@ Each subscriber attempts to automaticall
>  distribution has been catered for.
>  Also, users could equally want to use a different version from the one
>  installed by default, such as bind8 and bind9.
> -To accomodate this, the subscribers have these files in configurable
> +To accommodate this, the subscribers have these files in configurable
>  variables, documented below.
>  .Pp
>  .Bl -tag -width indent
>
> Modified: head/contrib/openresolv/resolvconf.in
> ==
> --- head/contrib/openresolv/resolvconf.in Tue Feb  2 21:06:09
> 2016  (r295164)
> +++ head/contrib/openresolv/resolvconf.in Tue Feb  2 21:10:43
> 2016  (r295165)
> @@ -50,7 +50,6 @@ elif [ -d "$SYSCONFDIR/resolvconf" ]; th
>   interface_order="$(cat "$SYSCONFDIR"/interface-order)"
>   fi
>  fi
> -TMPDIR="$VARDIR/tmp"
>  IFACEDIR="$VARDIR/interfaces"
>  METRICDIR="$VARDIR/metrics"
>  PRIVATEDIR="$VARDIR/private"
>
> Modified: head/contrib/openresolv/unbound.in
> ==
> --- head/contrib/openresolv/unbound.inTue Feb  2 21:06:09 2016
> (r295164)
> +++ head/contrib/openresolv/unbound.inTue Feb  2 21:10:43 2016
> (r295165)
> @@ -45,7 +45,8 @@ for d in 

svn commit: r295173 - head/usr.sbin/sysrc

2016-02-02 Thread Devin Teske
Author: dteske
Date: Tue Feb  2 22:34:48 2016
New Revision: 295173
URL: https://svnweb.freebsd.org/changeset/base/295173

Log:
  Bump version to 7.1 for +=/-= fix
  
  MFC after:3 days
  X-MFC-to: stable/10
  X-MFC-with:   r295169, r295170

Modified:
  head/usr.sbin/sysrc/sysrc

Modified: head/usr.sbin/sysrc/sysrc
==
--- head/usr.sbin/sysrc/sysrc   Tue Feb  2 22:27:48 2016(r295172)
+++ head/usr.sbin/sysrc/sysrc   Tue Feb  2 22:34:48 2016(r295173)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #-
-# Copyright (c) 2010-2015 Devin Teske
+# Copyright (c) 2010-2016 Devin Teske
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -40,7 +40,7 @@ BSDCFG_SHARE="/usr/share/bsdconfig"
 #
 # Version information
 #
-SYSRC_VERSION="7.0 Sep-13,2015"
+SYSRC_VERSION="7.1 Feb-2,2016"
 
 #
 # Options
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r295165 - head/contrib/openresolv

2016-02-02 Thread Pedro Giffuni



On 02/02/16 17:20, Oliver Pinter wrote:

On 2/2/16, Pedro F. Giffuni  wrote:

Author: pfg
Date: Tue Feb  2 21:10:43 2016
New Revision: 295165
URL: https://svnweb.freebsd.org/changeset/base/295165

Log:
   MFV r295109:
   Update openresolve to version 3.7.2


This was not 3.7.1?



No .. I downloaded 3.7.2 but upstream kept the version
at 3.7.1 internally.

Pedro.

___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r295174 - in head: lib/libdevctl usr.sbin/devctl

2016-02-02 Thread John Baldwin
Author: jhb
Date: Tue Feb  2 22:55:03 2016
New Revision: 295174
URL: https://svnweb.freebsd.org/changeset/base/295174

Log:
  - Note that devctl(8) will appear in 10.3 first.
  - Add missing devctl_set_driver entry to namelist in devlist(3).
  - Fix sorting of function prototypes in devlist(3).
  
  MFC after:3 days

Modified:
  head/lib/libdevctl/devctl.3
  head/usr.sbin/devctl/devctl.8

Modified: head/lib/libdevctl/devctl.3
==
--- head/lib/libdevctl/devctl.3 Tue Feb  2 22:34:48 2016(r295173)
+++ head/lib/libdevctl/devctl.3 Tue Feb  2 22:55:03 2016(r295174)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 26, 2014
+.Dd February 2, 2016
 .Dt DEVCTL 3
 .Os
 .Sh NAME
@@ -35,6 +35,7 @@
 .Nm devctl_disable ,
 .Nm devctl_enable ,
 .Nm devctl_resume ,
+.Nm devctl_set_driver ,
 .Nm devctl_suspend
 .Nd device control library
 .Sh LIBRARY
@@ -52,9 +53,9 @@
 .Ft int
 .Fn devctl_resume "const char *device"
 .Ft int
-.Fn devctl_suspend "const char *device"
-.Ft int
 .Fn devctl_set_driver "const char *device" "const char *driver" "bool force"
+.Ft int
+.Fn devctl_suspend "const char *device"
 .Sh DESCRIPTION
 The
 .Nm
@@ -287,7 +288,7 @@ The new device driver failed to attach.
 The
 .Nm
 library first appeared in
-.Fx 11.0 .
+.Fx 10.3 .
 .Sh BUGS
 If a device is suspended individually via
 .Fn devctl_suspend

Modified: head/usr.sbin/devctl/devctl.8
==
--- head/usr.sbin/devctl/devctl.8   Tue Feb  2 22:34:48 2016
(r295173)
+++ head/usr.sbin/devctl/devctl.8   Tue Feb  2 22:55:03 2016
(r295174)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd February 5, 2015
+.Dd February 2, 2016
 .Dt DEVCTL 8
 .Os
 .Sh NAME
@@ -134,4 +134,4 @@ the device will not be changed.
 The
 .Nm
 utility first appeared in
-.Fx 11.0 .
+.Fx 10.3 .
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r295176 - head/lib/libc/nls

2016-02-02 Thread Bryan Drewery
Author: bdrewery
Date: Tue Feb  2 23:33:58 2016
New Revision: 295176
URL: https://svnweb.freebsd.org/changeset/base/295176

Log:
  Move logic to destroy a struct catentry to its own function.
  
  This will be used later for memory leak handling.
  
  Obtained from:OneFS
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/lib/libc/nls/msgcat.c

Modified: head/lib/libc/nls/msgcat.c
==
--- head/lib/libc/nls/msgcat.c  Tue Feb  2 23:23:37 2016(r295175)
+++ head/lib/libc/nls/msgcat.c  Tue Feb  2 23:33:58 2016(r295176)
@@ -325,6 +325,21 @@ notfound:
return ((char *)s);
 }
 
+static void
+catfree(struct catentry *np)
+{
+
+   if (np->catd != NULL && np->catd != NLERR) {
+   munmap(np->catd->__data, (size_t)np->catd->__size);
+   free(np->catd);
+   }
+   SLIST_REMOVE(, np, catentry, list);
+   free(np->name);
+   free(np->path);
+   free(np->lang);
+   free(np);
+}
+
 int
 catclose(nl_catd catd)
 {
@@ -341,15 +356,8 @@ catclose(nl_catd catd)
SLIST_FOREACH(np, , list) {
if (catd == np->catd) {
np->refcount--;
-   if (np->refcount == 0) {
-   munmap(catd->__data, (size_t)catd->__size);
-   free(catd);
-   SLIST_REMOVE(, np, catentry, list);
-   free(np->name);
-   free(np->path);
-   free(np->lang);
-   free(np);
-   }
+   if (np->refcount == 0)
+   catfree(np);
break;
}
}
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r295178 - head/usr.sbin/sysrc

2016-02-02 Thread Devin Teske
Author: dteske
Date: Tue Feb  2 23:54:07 2016
New Revision: 295178
URL: https://svnweb.freebsd.org/changeset/base/295178

Log:
  Revert r295169 and switch `\ ' to `" "'
  
  MFC after:3 days
  X-MFC-to: stable/10
  X-MFC-with:   r295169, r295170, r295173, r295177

Modified:
  head/usr.sbin/sysrc/sysrc.8

Modified: head/usr.sbin/sysrc/sysrc.8
==
--- head/usr.sbin/sysrc/sysrc.8 Tue Feb  2 23:51:39 2016(r295177)
+++ head/usr.sbin/sysrc/sysrc.8 Tue Feb  2 23:54:07 2016(r295178)
@@ -255,7 +255,7 @@ When using the
 .Ql key+=value
 syntax to add items to existing values,
 the first character of the value is taken as the delimiter separating items
-.Pq usually Qo (space) Qc or Qo , Qc .
+.Pq usually Qo " " Qc or Qo , Qc .
 For example, in the following statement:
 .Bl -item -offset indent
 .It
@@ -316,7 +316,7 @@ When using the
 .Ql key-=value
 syntax to remove items from existing values,
 the first character of the value is taken as the delimiter separating items
-.Pq usually Qo \  Qc or Qo , Qc .
+.Pq usually Qo " " Qc or Qo , Qc .
 For example, in the following statement:
 .Pp
 .Dl Nm cloned_interfaces-=" gif0"
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r295183 - head/sys/powerpc/mpc85xx

2016-02-02 Thread Justin Hibbits
Author: jhibbits
Date: Wed Feb  3 01:29:06 2016
New Revision: 295183
URL: https://svnweb.freebsd.org/changeset/base/295183

Log:
  Make lbc(4) the same driver pass as simplebus.
  
  Device trees mark lbc as compatible with simplebus.  Since simplebus is passed
  first, it attaches first.  When lbc's pass (default pass) comes, the bus is
  already attached to simplebus, so is skipped.
  
  Sponsored by: Alex Perez/Inertial Computing

Modified:
  head/sys/powerpc/mpc85xx/lbc.c

Modified: head/sys/powerpc/mpc85xx/lbc.c
==
--- head/sys/powerpc/mpc85xx/lbc.c  Wed Feb  3 01:22:02 2016
(r295182)
+++ head/sys/powerpc/mpc85xx/lbc.c  Wed Feb  3 01:29:06 2016
(r295183)
@@ -113,7 +113,8 @@ static driver_t lbc_driver = {
 
 devclass_t lbc_devclass;
 
-DRIVER_MODULE(lbc, ofwbus, lbc_driver, lbc_devclass, 0, 0);
+EARLY_DRIVER_MODULE(lbc, ofwbus, lbc_driver, lbc_devclass,
+0, 0, BUS_PASS_BUS);
 
 /*
  * Calculate address mask used by OR(n) registers. Use memory region size to
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r295167 - head

2016-02-02 Thread Bryan Drewery
Wow! Please revert. I'm AFK for a few hours.

Regards,
Bryan Drewery

> On Feb 2, 2016, at 17:10, John Baldwin  wrote:
> 
>> On Tuesday, February 02, 2016 09:11:24 PM Bryan Drewery wrote:
>> Author: bdrewery
>> Date: Tue Feb  2 21:11:23 2016
>> New Revision: 295167
>> URL: https://svnweb.freebsd.org/changeset/base/295167
>> 
>> Log:
>>  Deduplicate distrib-dirs logic from r289086 in distribution.
>> 
>>  Sponsored by:EMC / Isilon Storage Division
> 
> Navdeep reported on IRC that this broke distribution resulting in an empty
> tree.  This caused etcupdate to think that all of the files had been removed
> (so it happily removed all the stock bits from /etc).
> 
> -- 
> John Baldwin
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r295169 - head/usr.sbin/sysrc

2016-02-02 Thread Devin Teske
On Tue, 2016-02-02 at 16:03 -0600, Benjamin Kaduk wrote:
> On Tue, Feb 2, 2016 at 3:58 PM, Devin Teske 
> wrote:
> > Author: dteske
> > Date: Tue Feb  2 21:58:17 2016
> > New Revision: 295169
> > URL: https://svnweb.freebsd.org/changeset/base/295169
> > 
> > Log:
> >   Replace (Qo \  Qc) with (Qo (space) Qc)
> > 
> >   When using col(1) piped to vim(1) as pager for man(1), the former
> > sequence
> >   of (Qo \  Qc) renders as "" without the space. Replace with (Qo
> > (space) Qc)
> >   which renders properly in more (all?) pagers.
> mdoc(7) also suggests using double-quotes (" ") to escape literal
> spaces; did you try that?
Did not try -- tried just now and it works. Will update with a commit.
However... /me opens "man mdoc"
(20 minutes later; confused as to where)
I've read mdoc(7) several times and have never seen such a
clarification.
(which I might add; would be mighty useful if you can find it)
-- 
Devin
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r295180 - head/usr.sbin/bsdconfig/share

2016-02-02 Thread Devin Teske
Author: dteske
Date: Wed Feb  3 00:51:38 2016
New Revision: 295180
URL: https://svnweb.freebsd.org/changeset/base/295180

Log:
  Define f_sprintf() dynamically at inclusion time
  
  No need to check/re-check capabilities that won't change at runtime.

Modified:
  head/usr.sbin/bsdconfig/share/strings.subr

Modified: head/usr.sbin/bsdconfig/share/strings.subr
==
--- head/usr.sbin/bsdconfig/share/strings.subr  Wed Feb  3 00:34:23 2016
(r295179)
+++ head/usr.sbin/bsdconfig/share/strings.subr  Wed Feb  3 00:51:38 2016
(r295180)
@@ -154,20 +154,25 @@ f_substr()
 # Similar to sprintf(3), write a string into $var_to_set using printf(1) syntax
 # (`$format [$arguments ...]').
 #
-f_sprintf()
-{
-   local __var_to_set="$1"
-   shift 1 # var_to_set
-
-   case "$BASH_VERSION" in
-   3.1*|4.*)
-   local __tmp
+case "$BASH_VERSION" in
+3.1*|4.*)
+   f_sprintf()
+   {
+   local __var_to_set="$1" __tmp
+   shift 1 # var_to_set
printf -v __tmp "$@"
eval "$__var_to_set"=\"\${__tmp%\$NL}\"
-   ;;
-   *) eval "$__var_to_set"=\$\( printf -- \"\$@\" \)
-   esac
-}
+   }
+   ;;
+*)
+   # NB: On FreeBSD, sh(1) runs this faster than bash(1) runs the above
+   f_sprintf()
+   {
+   local __var_to_set="$1"
+   shift 1 # var_to_set
+   eval "$__var_to_set"=\$\( printf -- \"\$@\" \)
+   }
+esac
 
 # f_vsprintf $var_to_set $format $format_args
 #
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r295167 - head

2016-02-02 Thread NGie Cooper
On Tue, Feb 2, 2016 at 5:10 PM, John Baldwin  wrote:
> On Tuesday, February 02, 2016 09:11:24 PM Bryan Drewery wrote:
>> Author: bdrewery
>> Date: Tue Feb  2 21:11:23 2016
>> New Revision: 295167
>> URL: https://svnweb.freebsd.org/changeset/base/295167
>>
>> Log:
>>   Deduplicate distrib-dirs logic from r289086 in distribution.
>>
>>   Sponsored by:   EMC / Isilon Storage Division
>
> Navdeep reported on IRC that this broke distribution resulting in an empty
> tree.  This caused etcupdate to think that all of the files had been removed
> (so it happily removed all the stock bits from /etc).

+1 with Jenkins I think... https://jenkins.freebsd.org/job/FreeBSD_HEAD/107/
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r295177 - head/usr.sbin/sysrc

2016-02-02 Thread Devin Teske
Author: dteske
Date: Tue Feb  2 23:51:39 2016
New Revision: 295177
URL: https://svnweb.freebsd.org/changeset/base/295177

Log:
  Fix a typo in a comment

Modified:
  head/usr.sbin/sysrc/sysrc

Modified: head/usr.sbin/sysrc/sysrc
==
--- head/usr.sbin/sysrc/sysrc   Tue Feb  2 23:33:58 2016(r295176)
+++ head/usr.sbin/sysrc/sysrc   Tue Feb  2 23:51:39 2016(r295177)
@@ -595,7 +595,7 @@ fi
 if [ "$SHOW_ALL" ]; then
#
# Get a list of variables that are currently set in the rc.conf(5)
-   # files (included `/etc/defaults/rc.conf') by performing a call to
+   # files (including `/etc/defaults/rc.conf') by performing a call to
# source_rc_confs() in a clean environment.
#
( # Operate in a sub-shell to protect the parent environment
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r295169 - head/usr.sbin/sysrc

2016-02-02 Thread Baptiste Daroussin
On Tue, Feb 02, 2016 at 03:50:45PM -0800, Devin Teske wrote:
> On Tue, 2016-02-02 at 16:03 -0600, Benjamin Kaduk wrote:
> > On Tue, Feb 2, 2016 at 3:58 PM, Devin Teske 
> > wrote:
> > > Author: dteske
> > > Date: Tue Feb  2 21:58:17 2016
> > > New Revision: 295169
> > > URL: https://svnweb.freebsd.org/changeset/base/295169
> > > 
> > > Log:
> > >   Replace (Qo \  Qc) with (Qo (space) Qc)
> > > 
> > >   When using col(1) piped to vim(1) as pager for man(1), the former
> > > sequence
> > >   of (Qo \  Qc) renders as "" without the space. Replace with (Qo
> > > (space) Qc)
> > >   which renders properly in more (all?) pagers.
> > mdoc(7) also suggests using double-quotes (" ") to escape literal
> > spaces; did you try that?
> Did not try -- tried just now and it works. Will update with a commit.
> However... /me opens "man mdoc"
> (20 minutes later; confused as to where)
> I've read mdoc(7) several times and have never seen such a
> clarification.
> (which I might add; would be mighty useful if you can find it)

If one updates mdoc man page please upstream the change first!

Best regards,
Bapt


signature.asc
Description: PGP signature


Re: svn commit: r295167 - head

2016-02-02 Thread John Baldwin
On Tuesday, February 02, 2016 09:11:24 PM Bryan Drewery wrote:
> Author: bdrewery
> Date: Tue Feb  2 21:11:23 2016
> New Revision: 295167
> URL: https://svnweb.freebsd.org/changeset/base/295167
> 
> Log:
>   Deduplicate distrib-dirs logic from r289086 in distribution.
>   
>   Sponsored by:   EMC / Isilon Storage Division

Navdeep reported on IRC that this broke distribution resulting in an empty
tree.  This caused etcupdate to think that all of the files had been removed
(so it happily removed all the stock bits from /etc).

-- 
John Baldwin
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r295184 - head

2016-02-02 Thread Conrad E. Meyer
Author: cem
Date: Wed Feb  3 01:40:07 2016
New Revision: 295184
URL: https://svnweb.freebsd.org/changeset/base/295184

Log:
  Revert r295167 at bdrewery's request
  
  $ svn merge -c -295167 .
  
  JHB reports Navdeep reports that it breaks distribution and etcupdate.
  
  Approved by:  bdrewery

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Wed Feb  3 01:29:06 2016(r295183)
+++ head/Makefile.inc1  Wed Feb  3 01:40:07 2016(r295184)
@@ -1087,7 +1087,9 @@ distrib-dirs: .MAKE .PHONY
${_+_}cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \
${IMAKE_INSTALL} ${IMAKE_MTREE} METALOG=${METALOG} ${.TARGET}
 
-distribution: distrib-dirs .MAKE .PHONY
+distribution: .MAKE .PHONY
+   ${_+_}cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \
+   ${IMAKE_INSTALL} ${IMAKE_MTREE} METALOG=${METALOG} ${.TARGET}
${_+_}cd ${.CURDIR}; ${CROSSENV} PATH=${TMPPATH} \
${MAKE} -f Makefile.inc1 ${IMAKE_INSTALL} \
METALOG=${METALOG} installconfig
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r295184 - head

2016-02-02 Thread Bryan Drewery
Thank you!

Regards,
Bryan Drewery

> On Feb 2, 2016, at 17:40, Conrad E. Meyer  wrote:
> 
> Author: cem
> Date: Wed Feb  3 01:40:07 2016
> New Revision: 295184
> URL: https://svnweb.freebsd.org/changeset/base/295184
> 
> Log:
>  Revert r295167 at bdrewery's request
> 
>  $ svn merge -c -295167 .
> 
>  JHB reports Navdeep reports that it breaks distribution and etcupdate.
> 
>  Approved by:bdrewery
> 
> Modified:
>  head/Makefile.inc1
> 
> Modified: head/Makefile.inc1
> ==
> --- head/Makefile.inc1Wed Feb  3 01:29:06 2016(r295183)
> +++ head/Makefile.inc1Wed Feb  3 01:40:07 2016(r295184)
> @@ -1087,7 +1087,9 @@ distrib-dirs: .MAKE .PHONY
>${_+_}cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \
>${IMAKE_INSTALL} ${IMAKE_MTREE} METALOG=${METALOG} ${.TARGET}
> 
> -distribution: distrib-dirs .MAKE .PHONY
> +distribution: .MAKE .PHONY
> +${_+_}cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \
> +${IMAKE_INSTALL} ${IMAKE_MTREE} METALOG=${METALOG} ${.TARGET}
>${_+_}cd ${.CURDIR}; ${CROSSENV} PATH=${TMPPATH} \
>${MAKE} -f Makefile.inc1 ${IMAKE_INSTALL} \
>METALOG=${METALOG} installconfig
> 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r295167 - head

2016-02-02 Thread Bryan Drewery
Oh wow I just realized the issue. Earlier I tested and saw distrib-dirs run and 
considered it a success. Sorry about that.

Regards,
Bryan Drewery

> On Feb 2, 2016, at 17:29, Bryan Drewery  wrote:
> 
> Wow! Please revert. I'm AFK for a few hours.
> 
> Regards,
> Bryan Drewery
> 
>>> On Feb 2, 2016, at 17:10, John Baldwin  wrote:
>>> 
>>> On Tuesday, February 02, 2016 09:11:24 PM Bryan Drewery wrote:
>>> Author: bdrewery
>>> Date: Tue Feb  2 21:11:23 2016
>>> New Revision: 295167
>>> URL: https://svnweb.freebsd.org/changeset/base/295167
>>> 
>>> Log:
>>> Deduplicate distrib-dirs logic from r289086 in distribution.
>>> 
>>> Sponsored by:EMC / Isilon Storage Division
>> 
>> Navdeep reported on IRC that this broke distribution resulting in an empty
>> tree.  This caused etcupdate to think that all of the files had been removed
>> (so it happily removed all the stock bits from /etc).
>> 
>> -- 
>> John Baldwin
> 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r295186 - head/sys/powerpc/powerpc

2016-02-02 Thread Justin Hibbits
Author: jhibbits
Date: Wed Feb  3 01:50:27 2016
New Revision: 295186
URL: https://svnweb.freebsd.org/changeset/base/295186

Log:
  Align signal stack pointer to 16 bytes.
  
  The stack must be aligned to 16 bytes at all times.  Clang 3.8 is especially
  adamant about this, and causes strange behavior and segmentation faults if it 
is
  not the case.
  
  PR:   kern/206810

Modified:
  head/sys/powerpc/powerpc/exec_machdep.c
  head/sys/powerpc/powerpc/sigcode32.S

Modified: head/sys/powerpc/powerpc/exec_machdep.c
==
--- head/sys/powerpc/powerpc/exec_machdep.c Wed Feb  3 01:49:02 2016
(r295185)
+++ head/sys/powerpc/powerpc/exec_machdep.c Wed Feb  3 01:50:27 2016
(r295186)
@@ -219,10 +219,10 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, 
 */
if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack &&
SIGISMEMBER(psp->ps_sigonstack, sig)) {
-   usfp = (void *)((uintptr_t)td->td_sigstk.ss_sp +
-  td->td_sigstk.ss_size - rndfsize);
+   usfp = (void *)(((uintptr_t)td->td_sigstk.ss_sp +
+  td->td_sigstk.ss_size - rndfsize) & ~0xFul);
} else {
-   usfp = (void *)(tf->fixreg[1] - rndfsize);
+   usfp = (void *)((tf->fixreg[1] - rndfsize) & ~0xFul);
}
 
/*

Modified: head/sys/powerpc/powerpc/sigcode32.S
==
--- head/sys/powerpc/powerpc/sigcode32.SWed Feb  3 01:49:02 2016
(r295185)
+++ head/sys/powerpc/powerpc/sigcode32.SWed Feb  3 01:50:27 2016
(r295186)
@@ -45,9 +45,9 @@
  */
.globl  CNAME(sigcode32),CNAME(szsigcode32)
 CNAME(sigcode32):
-   addi1,1,-20 /* reserved space for callee */
+   addi1,1,-32 /* reserved space for callee */
blrl
-   addi3,1,20+SF_UC/* restore sp, and get >sf_uc */
+   addi3,1,32+SF_UC/* restore sp, and get >sf_uc */
li  0,SYS_sigreturn
sc  /* sigreturn(scp) */
li  0,SYS_exit
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r295136 - in head: sys/kern sys/netinet sys/sys usr.bin/netstat

2016-02-02 Thread Alfred Perlstein



On 2/2/16 11:39 AM, John Baldwin wrote:

On Tuesday, February 02, 2016 05:57:59 AM Alfred Perlstein wrote:

Author: alfred
Date: Tue Feb  2 05:57:59 2016
New Revision: 295136
URL: https://svnweb.freebsd.org/changeset/base/295136

Log:
   Increase max allowed backlog for listen sockets
   from short to int.
   
   PR: 203922

   Submitted by: White Knight 
   MFC After: 4 weeks

You do realize that this breaks the ABI of the sysctls used to fetch
connection lists (and so will break existing binaries like ucd-snmpd, etc.)
and thus can't be MFC'd right?

OK, I will not MFC it.

Is it worthwhile to extend the xsocket to have padding so that in 11.x 
and beyond we can allow for some changes in the structure?


Another idea I had was to include a version number with the sysctl 
request so that we can send back versioned structures, let me know what 
you think about that.


The first idea will take not more than a few days for me to accomplish, 
the second (versioning the sysctl) probably a few more days than that.


thanks,
-Alfred

___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r295149 - in head/sys: arm/arm arm/include conf

2016-02-02 Thread Michal Meloun
Author: mmel
Date: Tue Feb  2 14:53:34 2016
New Revision: 295149
URL: https://svnweb.freebsd.org/changeset/base/295149

Log:
  ARM: All remaining functions in cpufunc_asm_arm10.S are identical with
  functions in cpufunc_asm_arm9.S. Use arm9 variants and remove
  cpufunc_asm_arm10.S completly.

Deleted:
  head/sys/arm/arm/cpufunc_asm_arm10.S
Modified:
  head/sys/arm/arm/cpufunc.c
  head/sys/arm/include/cpufunc.h
  head/sys/conf/Makefile.arm
  head/sys/conf/files.arm

Modified: head/sys/arm/arm/cpufunc.c
==
--- head/sys/arm/arm/cpufunc.c  Tue Feb  2 14:16:07 2016(r295148)
+++ head/sys/arm/arm/cpufunc.c  Tue Feb  2 14:53:34 2016(r295149)
@@ -167,7 +167,7 @@ struct cpu_functions armv5_ec_cpufuncs =
/* TLB functions */
 
armv4_tlb_flushID,  /* tlb_flushID  */
-   arm10_tlb_flushID_SE,   /* tlb_flushID_SE   */
+   arm9_tlb_flushID_SE,/* tlb_flushID_SE   */
armv4_tlb_flushD,   /* tlb_flushD   */
armv4_tlb_flushD_SE,/* tlb_flushD_SE*/
 
@@ -199,7 +199,7 @@ struct cpu_functions armv5_ec_cpufuncs =
 
/* Soft functions */
 
-   arm10_context_switch,   /* context_switch   */
+   arm9_context_switch,/* context_switch   */
 
arm10_setup /* cpu setup*/
 
@@ -218,7 +218,7 @@ struct cpu_functions sheeva_cpufuncs = {
/* TLB functions */
 
armv4_tlb_flushID,  /* tlb_flushID  */
-   arm10_tlb_flushID_SE,   /* tlb_flushID_SE   */
+   arm9_tlb_flushID_SE,/* tlb_flushID_SE   */
armv4_tlb_flushD,   /* tlb_flushD   */
armv4_tlb_flushD_SE,/* tlb_flushD_SE*/
 
@@ -250,7 +250,7 @@ struct cpu_functions sheeva_cpufuncs = {
 
/* Soft functions */
 
-   arm10_context_switch,   /* context_switch   */
+   arm9_context_switch,/* context_switch   */
 
arm10_setup /* cpu setup*/
 };

Modified: head/sys/arm/include/cpufunc.h
==
--- head/sys/arm/include/cpufunc.h  Tue Feb  2 14:16:07 2016
(r295148)
+++ head/sys/arm/include/cpufunc.h  Tue Feb  2 14:53:34 2016
(r295149)
@@ -225,11 +225,13 @@ void  fa526_idcache_wbinv_range(vm_offset
 #endif
 
 
-#ifdef CPU_ARM9
+#if defined(CPU_ARM9) || defined(CPU_ARM9E)
 void   arm9_setttb (u_int);
-
 void   arm9_tlb_flushID_SE (u_int va);
+void   arm9_context_switch (void);
+#endif
 
+#if defined(CPU_ARM9) 
 void   arm9_icache_sync_all(void);
 void   arm9_icache_sync_range  (vm_offset_t, vm_size_t);
 
@@ -241,8 +243,6 @@ voidarm9_dcache_wb_range(vm_offset_t, 
 void   arm9_idcache_wbinv_all  (void);
 void   arm9_idcache_wbinv_range (vm_offset_t, vm_size_t);
 
-void   arm9_context_switch (void);
-
 void   arm9_setup  (void);
 
 extern unsigned arm9_dcache_sets_max;
@@ -252,10 +252,6 @@ extern unsigned arm9_dcache_index_inc;
 #endif
 
 #if defined(CPU_ARM9E)
-void   arm10_tlb_flushID_SE(u_int);
-
-void   arm10_context_switch(void);
-
 void   arm10_setup (void);
 
 u_int  sheeva_control_ext  (u_int, u_int);

Modified: head/sys/conf/Makefile.arm
==
--- head/sys/conf/Makefile.arm  Tue Feb  2 14:16:07 2016(r295148)
+++ head/sys/conf/Makefile.arm  Tue Feb  2 14:53:34 2016(r295149)
@@ -68,7 +68,6 @@ SYSTEM_LD_TAIL +=;sed s/" + SIZEOF_HEADE
 
 FILES_CPU_FUNC = \
$S/$M/$M/cpufunc_asm_arm9.S \
-   $S/$M/$M/cpufunc_asm_arm10.S \
$S/$M/$M/cpufunc_asm_xscale.S $S/$M/$M/cpufunc_asm.S \
$S/$M/$M/cpufunc_asm_xscale_c3.S $S/$M/$M/cpufunc_asm_armv5_ec.S \
$S/$M/$M/cpufunc_asm_fa526.S $S/$M/$M/cpufunc_asm_sheeva.S \

Modified: head/sys/conf/files.arm
==
--- head/sys/conf/files.arm Tue Feb  2 14:16:07 2016(r295148)
+++ head/sys/conf/files.arm Tue Feb  2 14:53:34 2016(r295149)
@@ -11,8 +11,7 @@ arm/arm/busdma_machdep-v6.c   optionalar
 arm/arm/copystr.S  standard
 arm/arm/cpufunc.c  standard
 arm/arm/cpufunc_asm.S  standard
-arm/arm/cpufunc_asm_arm9.S optionalcpu_arm9
-arm/arm/cpufunc_asm_arm10.Soptionalcpu_arm9e
+arm/arm/cpufunc_asm_arm9.S optionalcpu_arm9 | cpu_arm9e
 arm/arm/cpufunc_asm_arm11.Soptionalcpu_arm1176
 arm/arm/cpufunc_asm_arm11x6.S  optionalcpu_arm1176
 arm/arm/cpufunc_asm_armv4.Soptionalcpu_arm9 | cpu_arm9e | 
cpu_fa526 | cpu_xscale_80321 | cpu_xscale_pxa2x0 | cpu_xscale_ixp425 | 

Re: svn commit: r294464 - in head: crypto/openssh crypto/openssh/contrib/redhat crypto/openssh/contrib/suse crypto/openssh/openbsd-compat crypto/openssh/regress crypto/openssh/regress/unittests crypto

2016-02-02 Thread Dag-Erling Smørgrav
Bryan Drewery  writes:
> Dag-Erling Smørgrav  wrote:
> > -#PermitRootLogin no
> > +#PermitRootLogin prohibit-password
> Shouldn't the comments note the default? The default here is still
> 'no'.

Yes, I kept our local modification but somehow either didn't notice the
comment or resolved the conflict incorrectly.

> Upstream 7.1p2 does use PERMIT_NO_PASSWD rather than PERMIT_NO that we
> have.  I think we should make this change:

We've always had this turned off, while upstream had it on by default.
The new default doesn't work correctly with PAM, and the fix is not
trivial.

DES
-- 
Dag-Erling Smørgrav - d...@des.no
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

svn commit: r295139 - head/crypto/openssh

2016-02-02 Thread Dag-Erling Smørgrav
Author: des
Date: Tue Feb  2 10:02:38 2016
New Revision: 295139
URL: https://svnweb.freebsd.org/changeset/base/295139

Log:
  Document our modified default value for PermitRootLogin.

Modified:
  head/crypto/openssh/sshd_config
  head/crypto/openssh/sshd_config.5

Modified: head/crypto/openssh/sshd_config
==
--- head/crypto/openssh/sshd_config Tue Feb  2 07:47:38 2016
(r295138)
+++ head/crypto/openssh/sshd_config Tue Feb  2 10:02:38 2016
(r295139)
@@ -45,7 +45,7 @@
 # Authentication:
 
 #LoginGraceTime 2m
-#PermitRootLogin prohibit-password
+#PermitRootLogin no
 #StrictModes yes
 #MaxAuthTries 6
 #MaxSessions 10

Modified: head/crypto/openssh/sshd_config.5
==
--- head/crypto/openssh/sshd_config.5   Tue Feb  2 07:47:38 2016
(r295138)
+++ head/crypto/openssh/sshd_config.5   Tue Feb  2 10:02:38 2016
(r295139)
@@ -1217,7 +1217,7 @@ The argument must be
 or
 .Dq no .
 The default is
-.Dq prohibit-password .
+.Dq no .
 Note that if
 .Cm ChallengeResponseAuthentication
 is
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r295140 - head/sys/arm64/arm64

2016-02-02 Thread Andrew Turner
Author: andrew
Date: Tue Feb  2 10:11:56 2016
New Revision: 295140
URL: https://svnweb.freebsd.org/changeset/base/295140

Log:
  Correctly handle the case where copystr(9) is given a string longer than
  the passed in length. In this case we need to return ENAMETOOLONG.

Modified:
  head/sys/arm64/arm64/copystr.c

Modified: head/sys/arm64/arm64/copystr.c
==
--- head/sys/arm64/arm64/copystr.c  Tue Feb  2 10:02:38 2016
(r295139)
+++ head/sys/arm64/arm64/copystr.c  Tue Feb  2 10:11:56 2016
(r295140)
@@ -56,6 +56,6 @@ copystr(const void * __restrict kfaddr, 
if (lencopied != NULL)
*lencopied = pos;
 
-   return (0);
+   return (error);
 }
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r295144 - head/sys/boot/efi/libefi

2016-02-02 Thread Andrew Turner
Author: andrew
Date: Tue Feb  2 10:39:18 2016
New Revision: 295144
URL: https://svnweb.freebsd.org/changeset/base/295144

Log:
  Add suppor to loader.efi to load files off hte network. For this we need
  to open the device in exclusive mode as, without this, the firmware may
  also be reading packets off the interface leading to a race.
  
  Reviewed by:  emaste
  Sponsored by: ABT Systems Ltd
  Differential Revision:https://reviews.freebsd.org/D4132

Modified:
  head/sys/boot/efi/libefi/efinet.c

Modified: head/sys/boot/efi/libefi/efinet.c
==
--- head/sys/boot/efi/libefi/efinet.c   Tue Feb  2 10:32:45 2016
(r295143)
+++ head/sys/boot/efi/libefi/efinet.c   Tue Feb  2 10:39:18 2016
(r295144)
@@ -184,11 +184,16 @@ efinet_init(struct iodesc *desc, void *m
EFI_HANDLE h;
EFI_STATUS status;
 
+   if (nif->nif_driver->netif_ifs[nif->nif_unit].dif_unit < 0) {
+   printf("Invalid network interface %d\n", nif->nif_unit);
+   return;
+   }
+
h = nif->nif_driver->netif_ifs[nif->nif_unit].dif_private;
status = BS->HandleProtocol(h, _guid, (VOID **)>nif_devdata);
if (status != EFI_SUCCESS) {
-   printf("net%d: cannot start interface (status=%ld)\n",
-   nif->nif_unit, (long)status);
+   printf("net%d: cannot start interface (status=%lu)\n",
+   nif->nif_unit, EFI_ERROR_CODE(status));
return;
}
 
@@ -288,11 +293,30 @@ efinet_dev_init()
stats = calloc(nifs, sizeof(struct netif_stats));
 
for (i = 0; i < nifs; i++) {
+   EFI_SIMPLE_NETWORK *net;
+   EFI_HANDLE h;
+
dif = _ifs[i];
+   dif->dif_unit = -1;
+
+   h = efi_find_handle(_dev, i);
+
+   /*
+* Open the network device in exclusive mode. Without this
+* we will be racing with the UEFI network stack. It will
+* pull packets off the network leading to lost packets.
+*/
+   status = BS->OpenProtocol(h, _guid, (void **),
+   IH, 0, EFI_OPEN_PROTOCOL_EXCLUSIVE);
+   if (status != EFI_SUCCESS) {
+   printf("Unable to open network interface %d\n", i);
+   continue;
+   }
+
dif->dif_unit = i;
dif->dif_nsel = 1;
dif->dif_stats = [i];
-   dif->dif_private = efi_find_handle(_dev, i);
+   dif->dif_private = h;
}
 
return (0);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r295142 - in head/sys/arm64: arm64 include

2016-02-02 Thread Andrew Turner
Author: andrew
Date: Tue Feb  2 10:28:56 2016
New Revision: 295142
URL: https://svnweb.freebsd.org/changeset/base/295142

Log:
  Implement single stepping on arm64. We need to set the single step bits in
  the processor and debug state registers. A flag has been added to the pcb
  to tell us when to enable single stepping for a given thread.
  
  Reviewed by:  kib
  Sponsored by: ABT Systems Ltd
  Differential Revision:https://reviews.freebsd.org/D4730

Modified:
  head/sys/arm64/arm64/genassym.c
  head/sys/arm64/arm64/machdep.c
  head/sys/arm64/arm64/mp_machdep.c
  head/sys/arm64/arm64/swtch.S
  head/sys/arm64/arm64/trap.c
  head/sys/arm64/include/armreg.h
  head/sys/arm64/include/pcb.h

Modified: head/sys/arm64/arm64/genassym.c
==
--- head/sys/arm64/arm64/genassym.c Tue Feb  2 10:17:51 2016
(r295141)
+++ head/sys/arm64/arm64/genassym.c Tue Feb  2 10:28:56 2016
(r295142)
@@ -49,10 +49,12 @@ ASSYM(PC_CURTHREAD, offsetof(struct pcpu
 
 /* Size of pcb, rounded to keep stack alignment */
 ASSYM(PCB_SIZE, roundup2(sizeof(struct pcb), STACKALIGNBYTES + 1));
+ASSYM(PCB_SINGLE_STEP_SHIFT, PCB_SINGLE_STEP_SHIFT);
 ASSYM(PCB_REGS, offsetof(struct pcb, pcb_x));
 ASSYM(PCB_SP, offsetof(struct pcb, pcb_sp));
 ASSYM(PCB_L1ADDR, offsetof(struct pcb, pcb_l1addr));
 ASSYM(PCB_ONFAULT, offsetof(struct pcb, pcb_onfault));
+ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags));
 
 ASSYM(SF_UC, offsetof(struct sigframe, sf_uc));
 

Modified: head/sys/arm64/arm64/machdep.c
==
--- head/sys/arm64/arm64/machdep.c  Tue Feb  2 10:17:51 2016
(r295141)
+++ head/sys/arm64/arm64/machdep.c  Tue Feb  2 10:28:56 2016
(r295142)
@@ -233,7 +233,8 @@ int
 ptrace_single_step(struct thread *td)
 {
 
-   /* TODO; */
+   td->td_frame->tf_spsr |= PSR_SS;
+   td->td_pcb->pcb_flags |= PCB_SINGLE_STEP;
return (0);
 }
 
@@ -241,7 +242,8 @@ int
 ptrace_clear_single_step(struct thread *td)
 {
 
-   /* TODO; */
+   td->td_frame->tf_spsr &= ~PSR_SS;
+   td->td_pcb->pcb_flags &= ~PCB_SINGLE_STEP;
return (0);
 }
 

Modified: head/sys/arm64/arm64/mp_machdep.c
==
--- head/sys/arm64/arm64/mp_machdep.c   Tue Feb  2 10:17:51 2016
(r295141)
+++ head/sys/arm64/arm64/mp_machdep.c   Tue Feb  2 10:28:56 2016
(r295142)
@@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #ifdef VFP
@@ -247,6 +248,8 @@ init_secondary(uint64_t cpu)
vfp_init();
 #endif
 
+   dbg_monitor_init();
+
/* Enable interrupts */
intr_enable();
 

Modified: head/sys/arm64/arm64/swtch.S
==
--- head/sys/arm64/arm64/swtch.STue Feb  2 10:17:51 2016
(r295141)
+++ head/sys/arm64/arm64/swtch.STue Feb  2 10:28:56 2016
(r295142)
@@ -37,10 +37,37 @@
 
 __FBSDID("$FreeBSD$");
 
+.macro clear_step_flag pcbflags, tmp
+   tbz \pcbflags, #PCB_SINGLE_STEP_SHIFT, 999f
+   mrs \tmp, mdscr_el1
+   bic \tmp, \tmp, #1
+   msr mdscr_el1, \tmp
+   isb
+999:
+.endm
+
+.macro set_step_flag pcbflags, tmp
+   tbz \pcbflags, #PCB_SINGLE_STEP_SHIFT, 999f
+   mrs \tmp, mdscr_el1
+   orr \tmp, \tmp, #1
+   msr mdscr_el1, \tmp
+   isb
+999:
+.endm
+
 /*
  * void cpu_throw(struct thread *old, struct thread *new)
  */
 ENTRY(cpu_throw)
+   /* Of old == NULL skip disabling stepping */
+   cbz x0, 1f
+
+   /* If we were single stepping, disable it */
+   ldr x4, [x0, #TD_PCB]
+   ldr w5, [x4, #PCB_FLAGS]
+   clear_step_flag w5, x6
+1:
+
 #ifdef VFP
/* Backup the new thread pointer around a call to C code */
mov x19, x1
@@ -69,6 +96,10 @@ ENTRY(cpu_throw)
dsb sy
isb
 
+   /* If we are single stepping, enable it */
+   ldr w5, [x4, #PCB_FLAGS]
+   set_step_flag w5, x6
+
/* Restore the registers */
ldp x5, x6, [x4, #PCB_SP]
mov sp, x5
@@ -127,6 +158,10 @@ ENTRY(cpu_switch)
mrs x6, tpidr_el0
stp x5, x6, [x4, #PCB_SP]
 
+   /* If we were single stepping, disable it */
+   ldr w5, [x4, #PCB_FLAGS]
+   clear_step_flag w5, x6
+
 #ifdef VFP
mov x19, x0
mov x20, x1
@@ -174,6 +209,10 @@ ENTRY(cpu_switch)
b.eq1b
 #endif
 
+   /* If we are single stepping, enable it */
+   ldr w5, [x4, #PCB_FLAGS]
+   set_step_flag w5, x6
+
/* Restore the registers */
ldp x5, x6, [x4, #PCB_SP]
mov sp, x5

Modified: head/sys/arm64/arm64/trap.c
==
--- 

svn commit: r295143 - in head/sys/arm: annapurna/alpine include mv mv/orion versatile

2016-02-02 Thread Svatopluk Kraus
Author: skra
Date: Tue Feb  2 10:32:45 2016
New Revision: 295143
URL: https://svnweb.freebsd.org/changeset/base/295143

Log:
  Remove all remaining references to old and not more used struct
  pmap_devmap, pmap_devmap_bootstrap() and pmap_devmap[]. It was
  replaced in r257660.

Modified:
  head/sys/arm/annapurna/alpine/alpine_machdep.c
  head/sys/arm/include/pmap-v6.h
  head/sys/arm/mv/mv_common.c
  head/sys/arm/mv/mv_machdep.c
  head/sys/arm/mv/orion/db88f5xxx.c
  head/sys/arm/versatile/versatile_machdep.c

Modified: head/sys/arm/annapurna/alpine/alpine_machdep.c
==
--- head/sys/arm/annapurna/alpine/alpine_machdep.c  Tue Feb  2 10:28:56 
2016(r295142)
+++ head/sys/arm/annapurna/alpine/alpine_machdep.c  Tue Feb  2 10:32:45 
2016(r295143)
@@ -123,7 +123,7 @@ platform_late_init(void)
 }
 
 /*
- * Construct pmap_devmap[] with DT-derived config data.
+ * Construct devmap table with DT-derived config data.
  */
 int
 platform_devmap_init(void)

Modified: head/sys/arm/include/pmap-v6.h
==
--- head/sys/arm/include/pmap-v6.h  Tue Feb  2 10:28:56 2016
(r295142)
+++ head/sys/arm/include/pmap-v6.h  Tue Feb  2 10:32:45 2016
(r295143)
@@ -225,20 +225,6 @@ pmap_map_chunk(vm_offset_t l1pt, vm_offs
pmap_preboot_map_attr(pa, va, size, prot, cache);
 }
 
-/*
- * This structure is used by machine-dependent code to describe
- * static mappings of devices, created at bootstrap time.
- */
-struct pmap_devmap {
-   vm_offset_t pd_va;  /* virtual address */
-   vm_paddr_t  pd_pa;  /* physical address */
-   vm_size_t   pd_size;/* size of region */
-   vm_prot_t   pd_prot;/* protection code */
-   int pd_cache;   /* cache attributes */
-};
-
-void pmap_devmap_bootstrap(const struct pmap_devmap *);
-
 #endif /* _KERNEL */
 
 // - TO BE DELETED 
-

Modified: head/sys/arm/mv/mv_common.c
==
--- head/sys/arm/mv/mv_common.c Tue Feb  2 10:28:56 2016(r295142)
+++ head/sys/arm/mv/mv_common.c Tue Feb  2 10:32:45 2016(r295143)
@@ -377,7 +377,7 @@ soc_id(uint32_t *dev, uint32_t *rev)
 * Notice: system identifiers are available in the registers range of
 * PCIE controller, so using this function is only allowed (and
 * possible) after the internal registers range has been mapped in via
-* pmap_devmap_bootstrap().
+* arm_devmap_bootstrap().
 */
*dev = bus_space_read_4(fdtbus_bs_tag, MV_PCIE_BASE, 0) >> 16;
*rev = bus_space_read_4(fdtbus_bs_tag, MV_PCIE_BASE, 8) & 0xff;

Modified: head/sys/arm/mv/mv_machdep.c
==
--- head/sys/arm/mv/mv_machdep.cTue Feb  2 10:28:56 2016
(r295142)
+++ head/sys/arm/mv/mv_machdep.cTue Feb  2 10:32:45 2016
(r295143)
@@ -337,7 +337,7 @@ __weak_reference(mv_default_fdt_pci_devm
  */
 
 /*
- * Construct pmap_devmap[] with DT-derived config data.
+ * Construct devmap table with DT-derived config data.
  */
 int
 platform_devmap_init(void)

Modified: head/sys/arm/mv/orion/db88f5xxx.c
==
--- head/sys/arm/mv/orion/db88f5xxx.c   Tue Feb  2 10:28:56 2016
(r295142)
+++ head/sys/arm/mv/orion/db88f5xxx.c   Tue Feb  2 10:32:45 2016
(r295143)
@@ -73,7 +73,7 @@ __FBSDID("$FreeBSD$");
 int platform_pci_get_irq(u_int bus, u_int slot, u_int func, u_int pin);
 
 /* Static device mappings. */
-const struct pmap_devmap pmap_devmap[] = {
+const struct arm_devmap_entry db88f5xxx_devmap[] = {
/*
 * Map the on-board devices VA == PA so that we can access them
 * with the MMU on or off.

Modified: head/sys/arm/versatile/versatile_machdep.c
==
--- head/sys/arm/versatile/versatile_machdep.c  Tue Feb  2 10:28:56 2016
(r295142)
+++ head/sys/arm/versatile/versatile_machdep.c  Tue Feb  2 10:32:45 2016
(r295143)
@@ -88,7 +88,7 @@ static struct arm_devmap_entry fdt_devma
 
 
 /*
- * Construct pmap_devmap[] with DT-derived config data.
+ * Construct devmap table with DT-derived config data.
  */
 int
 platform_devmap_init(void)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r295145 - in head/sys/arm: arm include

2016-02-02 Thread Michal Meloun
Author: mmel
Date: Tue Feb  2 10:50:32 2016
New Revision: 295145
URL: https://svnweb.freebsd.org/changeset/base/295145

Log:
  ARM: Remove last unused function, cpu_flush_prefetchbuf(),
  from cpu_functions table.

Modified:
  head/sys/arm/arm/cpufunc.c
  head/sys/arm/arm/cpufunc_asm_arm11x6.S
  head/sys/arm/arm/cpufunc_asm_fa526.S
  head/sys/arm/include/cpufunc.h

Modified: head/sys/arm/arm/cpufunc.c
==
--- head/sys/arm/arm/cpufunc.c  Tue Feb  2 10:39:18 2016(r295144)
+++ head/sys/arm/arm/cpufunc.c  Tue Feb  2 10:50:32 2016(r295145)
@@ -140,7 +140,6 @@ struct cpu_functions arm9_cpufuncs = {
 
/* Other functions */
 
-   cpufunc_nullop, /* flush_prefetchbuf*/
armv4_drain_writebuf,   /* drain_writebuf   */
 
(void *)cpufunc_nullop, /* sleep*/
@@ -194,7 +193,6 @@ struct cpu_functions armv5_ec_cpufuncs =
 
/* Other functions */
 
-   cpufunc_nullop, /* flush_prefetchbuf*/
armv4_drain_writebuf,   /* drain_writebuf   */
 
(void *)cpufunc_nullop, /* sleep*/
@@ -246,7 +244,6 @@ struct cpu_functions sheeva_cpufuncs = {
 
/* Other functions */
 
-   cpufunc_nullop, /* flush_prefetchbuf*/
armv4_drain_writebuf,   /* drain_writebuf   */
 
sheeva_cpu_sleep,   /* sleep*/
@@ -298,7 +295,6 @@ struct cpu_functions pj4bv7_cpufuncs = {
 
/* Other functions */
 
-   cpufunc_nullop, /* flush_prefetchbuf*/
armv7_drain_writebuf,   /* drain_writebuf   */
 
(void *)cpufunc_nullop, /* sleep*/
@@ -352,7 +348,6 @@ struct cpu_functions xscale_cpufuncs = {
 
/* Other functions */
 
-   cpufunc_nullop, /* flush_prefetchbuf*/
armv4_drain_writebuf,   /* drain_writebuf   */
 
xscale_cpu_sleep,   /* sleep*/
@@ -406,7 +401,6 @@ struct cpu_functions xscalec3_cpufuncs =
 
/* Other functions */
 
-   cpufunc_nullop, /* flush_prefetchbuf*/
armv4_drain_writebuf,   /* drain_writebuf   */
 
xscale_cpu_sleep,   /* sleep*/
@@ -459,7 +453,6 @@ struct cpu_functions fa526_cpufuncs = {
 
/* Other functions */
 
-   fa526_flush_prefetchbuf,/* flush_prefetchbuf*/
armv4_drain_writebuf,   /* drain_writebuf   */
 
fa526_cpu_sleep,/* sleep*/
@@ -513,7 +506,6 @@ struct cpu_functions arm1176_cpufuncs = 
 
/* Other functions */
 
-   arm11x6_flush_prefetchbuf,  /* flush_prefetchbuf*/
arm11_drain_writebuf,   /* drain_writebuf   */
 
arm11x6_sleep,  /* sleep*/
@@ -574,7 +566,6 @@ struct cpu_functions cortexa_cpufuncs = 
 
/* Other functions */
 
-   cpufunc_nullop, /* flush_prefetchbuf*/
armv7_drain_writebuf,   /* drain_writebuf   */
 
armv7_cpu_sleep,/* sleep*/

Modified: head/sys/arm/arm/cpufunc_asm_arm11x6.S
==
--- head/sys/arm/arm/cpufunc_asm_arm11x6.S  Tue Feb  2 10:39:18 2016
(r295144)
+++ head/sys/arm/arm/cpufunc_asm_arm11x6.S  Tue Feb  2 10:50:32 2016
(r295145)
@@ -138,11 +138,6 @@ ENTRY_NP(arm11x6_icache_sync_all)
RET
 END(arm11x6_icache_sync_all)
 
-ENTRY_NP(arm11x6_flush_prefetchbuf)
-   mcr p15, 0, r0, c7, c5, 4   /* Flush Prefetch Buffer */
-   RET
-END(arm11x6_flush_prefetchbuf)
-
 ENTRY_NP(arm11x6_icache_sync_range)
add r1, r1, r0
sub r1, r1, #1

Modified: head/sys/arm/arm/cpufunc_asm_fa526.S
==
--- head/sys/arm/arm/cpufunc_asm_fa526.STue Feb  2 10:39:18 2016
(r295144)
+++ head/sys/arm/arm/cpufunc_asm_fa526.STue Feb  2 10:50:32 2016
(r295145)
@@ -72,12 +72,6 @@ ENTRY(fa526_cpu_sleep)
mov pc, lr
 END(fa526_cpu_sleep)
 
-ENTRY(fa526_flush_prefetchbuf)
-   mov r0, #0
-   mcr p15, 0, r0, c7, c5, 4   /* Pre-fetch flush */
-   mov pc, lr
-END(fa526_flush_prefetchbuf)
-
 /*
  * Cache functions
  */

Modified: head/sys/arm/include/cpufunc.h
==
--- head/sys/arm/include/cpufunc.h  Tue Feb  2 10:39:18 2016
(r295144)
+++ head/sys/arm/include/cpufunc.h  Tue Feb  2 10:50:32 2016
(r295145)
@@ -149,7 +149,6 @@ struct cpu_functions {
 
/* Other functions */
 
-   void(*cf_flush_prefetchbuf) (void);
void

svn commit: r295141 - head/sys/arm/arm

2016-02-02 Thread Svatopluk Kraus
Author: skra
Date: Tue Feb  2 10:17:51 2016
New Revision: 295141
URL: https://svnweb.freebsd.org/changeset/base/295141

Log:
  Fix setting of protection bits for page table entries in pmap_map(). This
  function is only called from vm_page_startup() and vm_reserv_startup().
  I.e. during vm subsystem initialization. As VM_PROT_WRITE is always
  used in these calls, the typo did not have any effect. Likely, it's
  the reason why it wasn't discovered so long.

Modified:
  head/sys/arm/arm/pmap-v6.c

Modified: head/sys/arm/arm/pmap-v6.c
==
--- head/sys/arm/arm/pmap-v6.c  Tue Feb  2 10:11:56 2016(r295140)
+++ head/sys/arm/arm/pmap-v6.c  Tue Feb  2 10:17:51 2016(r295141)
@@ -1325,7 +1325,7 @@ pmap_map(vm_offset_t *virt, vm_paddr_t s
PDEBUG(1, printf("%s: virt = %#x, start = %#x, end = %#x (size = %#x),"
" prot = %d\n", __func__, *virt, start, end, end - start,  prot));
 
-   l2prot = (prot & VM_PROT_WRITE) ? PTE2_AP_KRW : PTE1_AP_KR;
+   l2prot = (prot & VM_PROT_WRITE) ? PTE2_AP_KRW : PTE2_AP_KR;
l2prot |= (prot & VM_PROT_EXECUTE) ? PTE2_X : PTE2_NX;
l1prot = ATTR_TO_L1(l2prot);
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r295154 - head/sys/arm64/arm64

2016-02-02 Thread Andrew Turner
Author: andrew
Date: Tue Feb  2 16:35:37 2016
New Revision: 295154
URL: https://svnweb.freebsd.org/changeset/base/295154

Log:
  Increase the space we use after the kernel to 8MiB. On 2GiB HiKey board we
  would try to access data past this point stopping the boot.
  
  Sponsored by: ABT Systems Ltd

Modified:
  head/sys/arm64/arm64/locore.S

Modified: head/sys/arm64/arm64/locore.S
==
--- head/sys/arm64/arm64/locore.S   Tue Feb  2 16:32:44 2016
(r295153)
+++ head/sys/arm64/arm64/locore.S   Tue Feb  2 16:35:37 2016
(r295154)
@@ -369,8 +369,8 @@ create_pagetables:
sub x8, x7, x6
/* Get the number of l2 pages to allocate, rounded down */
lsr x10, x8, #(L2_SHIFT)
-   /* Add 4 MiB for any rounding above and the module data */
-   add x10, x10, #2
+   /* Add 8 MiB for any rounding above and the module data */
+   add x10, x10, #4
 
/* Create the kernel space L2 table */
mov x6, x26
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r294778 - in head: lib/libc/sys sys/kern

2016-02-02 Thread Kubilay Kocak
On 26/01/2016 10:38 PM, Bruce Evans wrote:
> On Tue, 26 Jan 2016, Kubilay Kocak wrote:
> 
>>> Log:
>>>   Restore flushing of output for revoke(2) again.  Document revoke()'s
>>>   intended behaviour in its man page.  Simplify tty_drain() to match.
>>>   Don't call ttydevsw methods in tty_flush() if the device is gone
>>>   since we now sometimes call it then.
>>> ...
>>>   This was first broken then fixed in 1995.  I changed only the tty
>>> ...
>>
>> Seems like
>>
>>>   This was next broken in 1997 then fixed in 1998.  Importing Lite2 made
>>> ...
>>
>> A fantastic
>>
>>>   This was next broken in 2008 by replacing everything in tty.c and not
>>> ...
>>
>> Regression test candidate :)
>>
>>>   It is now possible to fix this better using the new FREVOKE flag.
> 
> Regression tests for devices are difficult to write and more difficult
> to run.  Simpler for ttys than for networking or disks, but you still
> need at least 2 generic tty ports just to test things that are not
> very related to hardware.

Of course, though perhaps mocking external subsystems/components is
something we could do, as is relatively standard for testing only the
code you want to cover, rather than (requiring) the entire integration.

> Bugs in flushing and draining are sometimes obvious by observing if
> echo 123 >/dev/ttyXx works when it should fail or fails when it should
> work.
> 
> For more arcane bugs, I use the old NIST POSIX test suite.  This is
> badly written and hard to use and not very complete, but it finds about
> 30 regressions between FreeBSD-5 and FreeBSD-9.  30 over-counts for error
> cascades but undercounts for blocking and some other timing bugs, and
> of course strict POSIX tests don't get near FreeBSD features like
> revoke() or bidrectional devices.
> 
> Bruce

___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r295151 - head/sys/mips/conf

2016-02-02 Thread Adrian Chadd
Author: adrian
Date: Tue Feb  2 16:22:35 2016
New Revision: 295151
URL: https://svnweb.freebsd.org/changeset/base/295151

Log:
  Use CPU_MIPS24K now in AR933x based boards.
  
  I'll flip on other boards as i test them.
  
  Tested:
  
  * AR9331, Carambola 2

Modified:
  head/sys/mips/conf/AR933X_BASE

Modified: head/sys/mips/conf/AR933X_BASE
==
--- head/sys/mips/conf/AR933X_BASE  Tue Feb  2 16:00:42 2016
(r295150)
+++ head/sys/mips/conf/AR933X_BASE  Tue Feb  2 16:22:35 2016
(r295151)
@@ -12,7 +12,7 @@
 
 machine mips mips
 ident  AR933X_BASE
-cpuCPU_MIPS4KC
+cpuCPU_MIPS24K
 makeoptionsKERNLOADADDR=0x8005
 optionsHZ=1000
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r295146 - in head/contrib/ofed/librdmacm/examples/build: cmatose mckey udaddy

2016-02-02 Thread Hans Petter Selasky
Author: hselasky
Date: Tue Feb  2 11:36:58 2016
New Revision: 295146
URL: https://svnweb.freebsd.org/changeset/base/295146

Log:
  Use LIBADD instead of LDADD.
  
  Sponsored by: Mellanox Technologies

Modified:
  head/contrib/ofed/librdmacm/examples/build/cmatose/Makefile
  head/contrib/ofed/librdmacm/examples/build/mckey/Makefile
  head/contrib/ofed/librdmacm/examples/build/udaddy/Makefile

Modified: head/contrib/ofed/librdmacm/examples/build/cmatose/Makefile
==
--- head/contrib/ofed/librdmacm/examples/build/cmatose/Makefile Tue Feb  2 
10:50:32 2016(r295145)
+++ head/contrib/ofed/librdmacm/examples/build/cmatose/Makefile Tue Feb  2 
11:36:58 2016(r295146)
@@ -5,7 +5,6 @@
 PROG=  cmatose
 MAN=
 SRCS=  cmatose.c
-LDADD+= -libverbs -lrdmacm -lpthread
-LDADD+= -lmlx4
+LIBADD=ibverbs rdmacm pthread mlx4
 
 .include 

Modified: head/contrib/ofed/librdmacm/examples/build/mckey/Makefile
==
--- head/contrib/ofed/librdmacm/examples/build/mckey/Makefile   Tue Feb  2 
10:50:32 2016(r295145)
+++ head/contrib/ofed/librdmacm/examples/build/mckey/Makefile   Tue Feb  2 
11:36:58 2016(r295146)
@@ -5,7 +5,6 @@
 PROG=  mckey
 MAN=
 SRCS=  mckey.c
-LDADD+= -libverbs -lrdmacm -lpthread
-LDADD+= -lmlx4
+LIBADD=ibverbs rdmacm pthread mlx4
 
 .include 

Modified: head/contrib/ofed/librdmacm/examples/build/udaddy/Makefile
==
--- head/contrib/ofed/librdmacm/examples/build/udaddy/Makefile  Tue Feb  2 
10:50:32 2016(r295145)
+++ head/contrib/ofed/librdmacm/examples/build/udaddy/Makefile  Tue Feb  2 
11:36:58 2016(r295146)
@@ -5,7 +5,6 @@
 PROG=  udaddy
 MAN=
 SRCS=  udaddy.c
-LDADD+= -libverbs -lrdmacm -lpthread
-LDADD+= -lmlx4
+LIBADD=ibverbs rdmacm pthread mlx4
 
 .include 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r295147 - head/bin/csh

2016-02-02 Thread Hajimu UMEMOTO
Author: ume
Date: Tue Feb  2 11:51:18 2016
New Revision: 295147
URL: https://svnweb.freebsd.org/changeset/base/295147

Log:
  Make dynamic link of libiconv from ports work again.
  The symbols of libiconv from ports were changed to
  have prefixed.
  Since we have iconv in our libc these days, we don't
  need it on 10.X and later.  However, 9.X still need
  this.
  
  Spotted by:   Yoshihiko Sarumaru
  MFC after:1 days

Modified:
  head/bin/csh/iconv_stub.c

Modified: head/bin/csh/iconv_stub.c
==
--- head/bin/csh/iconv_stub.c   Tue Feb  2 11:36:58 2016(r295146)
+++ head/bin/csh/iconv_stub.c   Tue Feb  2 11:51:18 2016(r295147)
@@ -36,9 +36,9 @@
 #undef iconv_close
 
 #define ICONVLIB   "libiconv.so"
-#define ICONV_ENGINE   "iconv"
-#define ICONV_OPEN "iconv_open"
-#define ICONV_CLOSE"iconv_close"
+#define ICONV_ENGINE   "libiconv"
+#define ICONV_OPEN "libiconv_open"
+#define ICONV_CLOSE"libiconv_close"
 
 typedef iconv_t iconv_open_t(const char *, const char *);
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r295150 - head/sys/mips/include

2016-02-02 Thread Adrian Chadd
Author: adrian
Date: Tue Feb  2 16:00:42 2016
New Revision: 295150
URL: https://svnweb.freebsd.org/changeset/base/295150

Log:
  Move MIPS32 Release 2 and Release 3 CPUs to use the EHB instruction for
  clearing hazards.
  
  This revision makes currently known MIPS32 Release 2 and Release 3 CPUs use
  the EHB instruction when clearing hazards. So far the MIPS 74K and MIPS1004K
   (somewhat) were already using the EHB. Now we add more r2 and r3 CPUs to
  this list.
  
  Also, for the cases of MIPS coherent processing systems (currently 1004K,
  1074K, interAptiv and proAptiv) - define proper CCA attributes.
  
  Submitted by: Stanislav Galabov 
  Reviewed by:  imp
  Differential Revision:https://reviews.freebsd.org/D5078

Modified:
  head/sys/mips/include/cpuregs.h

Modified: head/sys/mips/include/cpuregs.h
==
--- head/sys/mips/include/cpuregs.h Tue Feb  2 14:53:34 2016
(r295149)
+++ head/sys/mips/include/cpuregs.h Tue Feb  2 16:00:42 2016
(r295150)
@@ -110,6 +110,7 @@
  * C:  Cacheable, coherency unspecified.
  * CNC:Cacheable non-coherent.
  * CC: Cacheable coherent.
+ * CCS:Cacheable coherent, shared read.
  * CCE:Cacheable coherent, exclusive read.
  * CCEW:   Cacheable coherent, exclusive write.
  * CCUOW:  Cacheable coherent, update on write.
@@ -154,9 +155,20 @@
 #defineMIPS_CCA_CACHED 0x03
 #endif
 
-#if defined(CPU_MIPS1004K)
-#defineMIPS_CCA_UNCACHED   0x02
-#defineMIPS_CCA_CACHED 0x05
+/*
+ * 1004K and 1074K cores, as well as interAptiv and proAptiv cores, support
+ * Cacheable Coherent CCAs 0x04 and 0x05, as well as Cacheable non-Coherent
+ * CCA 0x03 and Uncached Accelerated CCA 0x07
+ */
+#if defined(CPU_MIPS1004K) || defined(CPU_MIPS1074K) ||\
+defined(CPU_INTERAPTIV) || defined(CPU_PROAPTIV)
+#defineMIPS_CCA_CNC0x03
+#defineMIPS_CCA_CCE0x04
+#defineMIPS_CCA_CCS0x05
+#defineMIPS_CCA_UA 0x07
+
+/* We use shared read CCA for CACHED CCA */
+#defineMIPS_CCA_CACHED MIPS_CCA_CCS
 #endif
 
 #ifndefMIPS_CCA_UNCACHED
@@ -214,8 +226,18 @@
 #defineCOP0_SYNC   .word 0xc0  /* ehb */
 #elif defined(CPU_SB1)
 #define COP0_SYNC  ssnop; ssnop; ssnop; ssnop; ssnop; ssnop; ssnop; ssnop; 
ssnop
-#elif defined(CPU_MIPS74K) || defined(CPU_MIPS1004K)
-#defineCOP0_SYNC.word 0xc0 /* ehb */
+#elif defined(CPU_MIPS24K) || defined(CPU_MIPS34K) ||  \
+  defined(CPU_MIPS74K) || defined(CPU_MIPS1004K)  ||   \
+  defined(CPU_MIPS1074K) || defined(CPU_INTERAPTIV) || \
+  defined(CPU_PROAPTIV)
+/*
+ * According to MIPS32tm Architecture for Programmers, Vol.II, rev. 2.00:
+ * "As EHB becomes standard in MIPS implementations, the previous SSNOPs can be
+ *  removed, leaving only the EHB".
+ * Also, all MIPS32 Release 2 implementations have the EHB instruction, which
+ * resolves all execution hazards. The same goes for MIPS32 Release 3.
+ */
+#defineCOP0_SYNC   .word 0xc0  /* ehb */
 #else
 /*
  * Pick a reasonable default based on the "typical" spacing described in the
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r295152 - head/sys/mips/rt305x

2016-02-02 Thread Adrian Chadd
Author: adrian
Date: Tue Feb  2 16:25:53 2016
New Revision: 295152
URL: https://svnweb.freebsd.org/changeset/base/295152

Log:
  Use MIPS24K now.
  
  Submitted by: Stanislav Galabov 
  Differential Revision:https://reviews.freebsd.org/D5079

Modified:
  head/sys/mips/rt305x/std.rt305x

Modified: head/sys/mips/rt305x/std.rt305x
==
--- head/sys/mips/rt305x/std.rt305x Tue Feb  2 16:22:35 2016
(r295151)
+++ head/sys/mips/rt305x/std.rt305x Tue Feb  2 16:25:53 2016
(r295152)
@@ -3,5 +3,5 @@
 
 files  "../rt305x/files.rt305x"
 
-cpuCPU_MIPS4KC
+cpuCPU_MIPS24K
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r295153 - head/sys/arm64/arm64

2016-02-02 Thread Andrew Turner
Author: andrew
Date: Tue Feb  2 16:32:44 2016
New Revision: 295153
URL: https://svnweb.freebsd.org/changeset/base/295153

Log:
  Only look for the ranges property when we have children. This fixes booting
  on systems with a gicv2, but no PCIe so no gicv2m.
  
  Sponsored by: ABT Systems Ltd

Modified:
  head/sys/arm64/arm64/gic_fdt.c

Modified: head/sys/arm64/arm64/gic_fdt.c
==
--- head/sys/arm64/arm64/gic_fdt.c  Tue Feb  2 16:25:53 2016
(r295152)
+++ head/sys/arm64/arm64/gic_fdt.c  Tue Feb  2 16:32:44 2016
(r295153)
@@ -158,12 +158,17 @@ arm_gic_fdt_attach(device_t dev)
OF_getencprop(root, "#size-cells", >sc_size_cells,
sizeof(sc->sc_size_cells));
 
+   /* If we have no children don't probe for them */
+   child = OF_child(root);
+   if (child == 0)
+   return (0);
+
if (gic_fill_ranges(root, sc) < 0) {
device_printf(dev, "could not get ranges\n");
return (ENXIO);
}
 
-   for (child = OF_child(root); child != 0; child = OF_peer(child)) {
+   for (; child != 0; child = OF_peer(child)) {
dinfo = malloc(sizeof(*dinfo), M_DEVBUF, M_WAITOK | M_ZERO);
 
if (ofw_bus_gen_setup_devinfo(>obdinfo, child) != 0) {
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r295157 - head/sys/arm64/arm64

2016-02-02 Thread Andrew Turner
Author: andrew
Date: Tue Feb  2 17:57:15 2016
New Revision: 295157
URL: https://svnweb.freebsd.org/changeset/base/295157

Log:
  Ensure we don't overflow the phys_avail array. Some firmware may provide
  more memory locations than we have space to record.
  
  Sponsored by: ABT Systems Ltd

Modified:
  head/sys/arm64/arm64/pmap.c

Modified: head/sys/arm64/arm64/pmap.c
==
--- head/sys/arm64/arm64/pmap.c Tue Feb  2 17:33:37 2016(r295156)
+++ head/sys/arm64/arm64/pmap.c Tue Feb  2 17:57:15 2016(r295157)
@@ -596,7 +596,8 @@ pmap_bootstrap(vm_offset_t l1pt, vm_padd
 * up to the physical address KERNBASE points at.
 */
map_slot = avail_slot = 0;
-   for (; map_slot < (physmap_idx * 2); map_slot += 2) {
+   for (; map_slot < (physmap_idx * 2) &&
+   avail_slot < (PHYS_AVAIL_SIZE - 2); map_slot += 2) {
if (physmap[map_slot] == physmap[map_slot + 1])
continue;
 
@@ -612,7 +613,7 @@ pmap_bootstrap(vm_offset_t l1pt, vm_padd
}
 
/* Add the memory before the kernel */
-   if (physmap[avail_slot] < pa) {
+   if (physmap[avail_slot] < pa && avail_slot < (PHYS_AVAIL_SIZE - 2)) {
phys_avail[avail_slot] = physmap[map_slot];
phys_avail[avail_slot + 1] = pa;
physmem += (phys_avail[avail_slot + 1] -
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r295158 - head/sys/arm64/include

2016-02-02 Thread Andrew Turner
Author: andrew
Date: Tue Feb  2 17:59:43 2016
New Revision: 295158
URL: https://svnweb.freebsd.org/changeset/base/295158

Log:
  Increase the size of PHYS_AVAIL_SIZE to allow firmware to provide a large
  number of physical memory locations we can access. This is the case on
  some HiKey boards that may have UEFI reserved memory dispersed through the
  physical space.
  
  Sponsored by: ABT Systems Ltd

Modified:
  head/sys/arm64/include/pmap.h

Modified: head/sys/arm64/include/pmap.h
==
--- head/sys/arm64/include/pmap.h   Tue Feb  2 17:57:15 2016
(r295157)
+++ head/sys/arm64/include/pmap.h   Tue Feb  2 17:59:43 2016
(r295158)
@@ -121,7 +121,7 @@ extern struct pmap  kernel_pmap_store;
 #definePMAP_TRYLOCK(pmap)  mtx_trylock(&(pmap)->pm_mtx)
 #definePMAP_UNLOCK(pmap)   mtx_unlock(&(pmap)->pm_mtx)
 
-#definePHYS_AVAIL_SIZE 10
+#definePHYS_AVAIL_SIZE 32
 extern vm_paddr_t phys_avail[];
 extern vm_paddr_t dump_avail[];
 extern vm_offset_t virtual_avail;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r295169 - head/usr.sbin/sysrc

2016-02-02 Thread Benjamin Kaduk
On Tue, Feb 2, 2016 at 5:50 PM, Devin Teske  wrote:

> On Tue, 2016-02-02 at 16:03 -0600, Benjamin Kaduk wrote:
>
> On Tue, Feb 2, 2016 at 3:58 PM, Devin Teske  wrote:
>
> Author: dteske
> Date: Tue Feb  2 21:58:17 2016
> New Revision: 295169
> URL: https://svnweb.freebsd.org/changeset/base/295169
>
> Log:
>   Replace (Qo \  Qc) with (Qo (space) Qc)
>
>   When using col(1) piped to vim(1) as pager for man(1), the former
> sequence
>   of (Qo \  Qc) renders as "" without the space. Replace with (Qo (space)
> Qc)
>   which renders properly in more (all?) pagers.
>
>
> mdoc(7) also suggests using double-quotes (" ") to escape literal spaces;
> did you try that?
>
>
> Did not try -- tried just now and it works. Will update with a commit.
>
> However... /me opens "man mdoc"
> (20 minutes later; confused as to where)
>
> I've read mdoc(7) several times and have never seen such a clarification.
> (which I might add; would be mighty useful if you can find it)
>
>
The shame is on me; I had opened the system mdoc(7) on OS X, which is
actually groff_mdoc(7).  There is a subsection therein "Passing Space
Characters in an Argument" which has the text in question.  I guess I need
to spend more time with the mdocml mdoc(7) to get used to what it contains
(and does not contain).

Sorry for sending you down the wrong rabbit hole...

-Ben
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r295196 - head/usr.sbin/bsdconfig/share

2016-02-02 Thread Devin Teske
Author: dteske
Date: Wed Feb  3 03:55:08 2016
New Revision: 295196
URL: https://svnweb.freebsd.org/changeset/base/295196

Log:
  Remove SIG prefix from trapped signals
  
  Makes traps functional if running under shells/dash

Modified:
  head/usr.sbin/bsdconfig/share/common.subr

Modified: head/usr.sbin/bsdconfig/share/common.subr
==
--- head/usr.sbin/bsdconfig/share/common.subr   Wed Feb  3 03:03:04 2016
(r295195)
+++ head/usr.sbin/bsdconfig/share/common.subr   Wed Feb  3 03:55:08 2016
(r295196)
@@ -1,7 +1,7 @@
 if [ ! "$_COMMON_SUBR" ]; then _COMMON_SUBR=1
 #
 # Copyright (c) 2012 Ron McDowell
-# Copyright (c) 2012-2015 Devin Teske
+# Copyright (c) 2012-2016 Devin Teske
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -1015,10 +1015,9 @@ f_count_ifs()
 #
 # Trap signals so we can recover gracefully
 #
-trap 'f_interrupt' SIGINT
-trap 'f_die' SIGTERM SIGPIPE SIGXCPU SIGXFSZ \
- SIGFPE SIGTRAP SIGABRT SIGSEGV
-trap '' SIGALRM SIGPROF SIGUSR1 SIGUSR2 SIGHUP SIGVTALRM
+trap 'f_interrupt' INT
+trap 'f_die' TERM PIPE XCPU XFSZ FPE TRAP ABRT SEGV
+trap '' ALRM PROF USR1 USR2 HUP VTALRM
 
 #
 # Clone terminal stdout/stderr so we can redirect to it from within sub-shells
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r295197 - head/usr.sbin/bsdconfig/share

2016-02-02 Thread Devin Teske
Author: dteske
Date: Wed Feb  3 04:02:50 2016
New Revision: 295197
URL: https://svnweb.freebsd.org/changeset/base/295197

Log:
  f_substr(): Optimized recipe if running under bash
  
  This makes runnig f_substr() faster than it was when running under bash,
  but both sh and dash are still faster when using the non-bash recipe which
  features dynamically unrolled loops.

Modified:
  head/usr.sbin/bsdconfig/share/strings.subr

Modified: head/usr.sbin/bsdconfig/share/strings.subr
==
--- head/usr.sbin/bsdconfig/share/strings.subr  Wed Feb  3 03:55:08 2016
(r295196)
+++ head/usr.sbin/bsdconfig/share/strings.subr  Wed Feb  3 04:02:50 2016
(r295197)
@@ -67,52 +67,58 @@ f_isinteger()
 # Similar to awk(1)'s substr(), return length substring of string that begins
 # at start position counted from 1.
 #
-f_substr()
-{
-   local OPTIND=1 OPTARG __flag __var_to_set=
-   while getopts v: __flag; do
-   case "$__flag" in
-   v) __var_to_set="$OPTARG" ;;
+case "$BASH_VERSION" in
+*?*)
+   f_substr()
+   {
+   local __var_to_set=
+   case "$1" in
+   -v) __var_to_set="$2"; shift 2 ;;
+   -v?*) __var_to_set="${2#-v}"; shift 1 ;;
esac
-   done
-   shift $(( $OPTIND - 1 ))
-
-   local __tmp="$1" __start="${2:-1}" __size="$3"
-   local __tbuf __tbuf_len __trim __trimq
+   local __tmp="$1" __start="${2:-1}"  __len="$3"
+   [ "$__start" -gt 0 ] 2> /dev/null &&
+   __start=$(( $__start - 1 ))
+   if [ ! "$__var_to_set" ]; then
+   eval echo \"\${__tmp:\$__start${__len:+:\$__len}}\"
+   return $?
+   fi
+   if [ "$__len" ]; then
+   eval $__var_to_set=\"\${__tmp:\$__start:\$__len}\"
+   else
+   eval $__var_to_set=\"\${__tmp:\$__start}\"
+   fi
+   }
+   ;;
+*)
+   # NB: On FreeBSD, sh(1) runs this faster than bash(1) runs the above
+   f_substr()
+   {
+   local OPTIND=1 OPTARG __flag __var_to_set=
+   while getopts v: __flag; do
+   case "$__flag" in
+   v) __var_to_set="$OPTARG" ;;
+   esac
+   done
+   shift $(( $OPTIND - 1 ))
 
-   if [ ! "$__tmp" ]; then
-   [ "$__var_to_set" ] && setvar "$__var_to_set" ""
-   return ${SUCCESS:-0}
-   fi
-   [ "$__start" -ge 1 ] 2> /dev/null || __start=1
-   if ! [ "${__size:-1}" -ge 1 ] 2> /dev/null; then
-   [ "$__var_to_set" ] && setvar "$__var_to_set" ""
-   return ${FAILURE:-1}
-   fi
+   local __tmp="$1" __start="${2:-1}" __size="$3"
+   local __tbuf __tbuf_len __trim __trimq
 
-   __trim=$(( $__start - 1 ))
-   while [ $__trim -gt 0 ]; do
-   __tbuf="?"
-   __tbuf_len=1
-   while [ $__tbuf_len -lt $(( $__trim / $__tbuf_len )) ]; do
-   __tbuf="$__tbuf?"
-   __tbuf_len=$(( $__tbuf_len + 1 ))
-   done
-   __trimq=$(( $__trim / $__tbuf_len ))
-   __trim=$(( $__trim - $__tbuf_len * $__trimq ))
-   while [ $__trimq -gt 0 ]; do
-   __tmp="${__tmp#$__tbuf}"
-   __trimq=$(( $__trimq - 1 ))
-   done
-   done
+   if [ ! "$__tmp" ]; then
+   [ "$__var_to_set" ] && setvar "$__var_to_set" ""
+   return ${SUCCESS:-0}
+   fi
+   [ "$__start" -ge 1 ] 2> /dev/null || __start=1
+   if ! [ "${__size:-1}" -ge 1 ] 2> /dev/null; then
+   [ "$__var_to_set" ] && setvar "$__var_to_set" ""
+   return ${FAILURE:-1}
+   fi
 
-   local __tmp_size=${#__tmp}
-   local __mask __mask_len
-   __trim=$(( $__tmp_size - ${__size:-$__tmp_size} ))
-   while [ $__trim -gt 0 ]; do
-   __tbuf="?"
-   __tbuf_len=1
-   if [ $__trim -le $__size ]; then
+   __trim=$(( $__start - 1 ))
+   while [ $__trim -gt 0 ]; do
+   __tbuf="?"
+   __tbuf_len=1
while [ $__tbuf_len -lt $(( $__trim / $__tbuf_len )) ]
do
__tbuf="$__tbuf?"
@@ -121,37 +127,66 @@ f_substr()
__trimq=$(( $__trim / $__tbuf_len ))
__trim=$(( $__trim - $__tbuf_len * $__trimq ))
while [ $__trimq -gt 0 ]; do
-   __tmp="${__tmp%$__tbuf}"
+   __tmp="${__tmp#$__tbuf}"
__trimq=$(( $__trimq - 1 ))

Re: svn commit: r295169 - head/usr.sbin/sysrc

2016-02-02 Thread Devin Teske
On Tue, 2016-02-02 at 21:40 -0600, Benjamin Kaduk wrote:
> On Tue, Feb 2, 2016 at 5:50 PM, Devin Teske 
> wrote:
> > On Tue, 2016-02-02 at 16:03 -0600, Benjamin Kaduk wrote:
> > > On Tue, Feb 2, 2016 at 3:58 PM, Devin Teske 
> > > wrote:
> > > > Author: dteske
> > > > Date: Tue Feb  2 21:58:17 2016
> > > > New Revision: 295169
> > > > URL: https://svnweb.freebsd.org/changeset/base/295169
> > > > 
> > > > Log:
> > > >   Replace (Qo \  Qc) with (Qo (space) Qc)
> > > > 
> > > >   When using col(1) piped to vim(1) as pager for man(1), the
> > > > former sequence
> > > >   of (Qo \  Qc) renders as "" without the space. Replace with
> > > > (Qo (space) Qc)
> > > >   which renders properly in more (all?) pagers.
> > > mdoc(7) also suggests using double-quotes (" ") to escape literal
> > > spaces; did you try that?
> > Did not try -- tried just now and it works. Will update with a
> > commit.
> > 
> > However... /me opens "man mdoc"
> > (20 minutes later; confused as to where)
> > 
> > I've read mdoc(7) several times and have never seen such a
> > clarification.
> > (which I might add; would be mighty useful if you can find it)
> > 
> > 
> The shame is on me; I had opened the system mdoc(7) on OS X, which is
> actually groff_mdoc(7).  There is a subsection therein "Passing Space
> Characters in an Argument" which has the text in question.  I guess I
> need to spend more time with the mdocml mdoc(7) to get used to what
> it contains (and does not contain).
> 
> Sorry for sending you down the wrong rabbit hole...
Funny thing was, your suggestion absolutely worked. Learned something
our mdoc(7) doesn't document but supports.
-- 
Devin
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r295195 - head/usr.sbin/bsdconfig/share

2016-02-02 Thread Devin Teske
Author: dteske
Date: Wed Feb  3 03:03:04 2016
New Revision: 295195
URL: https://svnweb.freebsd.org/changeset/base/295195

Log:
  f_substr: Write to stdout when no `-v var_to_set'
  
  Fixes ``setvar: : bad variable name''

Modified:
  head/usr.sbin/bsdconfig/share/strings.subr

Modified: head/usr.sbin/bsdconfig/share/strings.subr
==
--- head/usr.sbin/bsdconfig/share/strings.subr  Wed Feb  3 02:46:00 2016
(r295194)
+++ head/usr.sbin/bsdconfig/share/strings.subr  Wed Feb  3 03:03:04 2016
(r295195)
@@ -146,7 +146,11 @@ f_substr()
fi
done
 
-   setvar "$__var_to_set" "$__tmp"
+   if [ "$__var_to_set" ]; then
+   setvar "$__var_to_set" "$__tmp"
+   else
+   echo "$__tmp"
+   fi
 }
 
 # f_sprintf $var_to_set $format [$arguments ...]
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r295194 - head/usr.sbin/bsdconfig/share

2016-02-02 Thread Devin Teske
Author: dteske
Date: Wed Feb  3 02:46:00 2016
New Revision: 295194
URL: https://svnweb.freebsd.org/changeset/base/295194

Log:
  Remove trailing whitespace

Modified:
  head/usr.sbin/bsdconfig/share/strings.subr

Modified: head/usr.sbin/bsdconfig/share/strings.subr
==
--- head/usr.sbin/bsdconfig/share/strings.subr  Wed Feb  3 02:14:31 2016
(r295193)
+++ head/usr.sbin/bsdconfig/share/strings.subr  Wed Feb  3 02:46:00 2016
(r295194)
@@ -65,7 +65,7 @@ f_isinteger()
 # f_substr [-v $var_to_set] $string $start [$length]
 #
 # Similar to awk(1)'s substr(), return length substring of string that begins
-# at start position counted from 1. 
+# at start position counted from 1.
 #
 f_substr()
 {
@@ -76,7 +76,7 @@ f_substr()
esac
done
shift $(( $OPTIND - 1 ))
-   
+
local __tmp="$1" __start="${2:-1}" __size="$3"
local __tbuf __tbuf_len __trim __trimq
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r295144 - head/sys/boot/efi/libefi

2016-02-02 Thread Emmanuel Vadot

 I cannot netboot loader.efi anymore now.

 Consoles: EFI console
 Unable to open network interface 1
 Unable to open network interface 2
 ...
 panic: netboot: no interfaces left untried

 Netboot loader.efi works before even if loading the kernel was really really 
slow.

On Tue, 2 Feb 2016 10:39:19 + (UTC)
Andrew Turner  wrote:

> Author: andrew
> Date: Tue Feb  2 10:39:18 2016
> New Revision: 295144
> URL: https://svnweb.freebsd.org/changeset/base/295144
> 
> Log:
>   Add suppor to loader.efi to load files off hte network. For this we need
>   to open the device in exclusive mode as, without this, the firmware may
>   also be reading packets off the interface leading to a race.
>   
>   Reviewed by:emaste
>   Sponsored by:   ABT Systems Ltd
>   Differential Revision:  https://reviews.freebsd.org/D4132
> 
> Modified:
>   head/sys/boot/efi/libefi/efinet.c
> 
> Modified: head/sys/boot/efi/libefi/efinet.c
> ==
> --- head/sys/boot/efi/libefi/efinet.c Tue Feb  2 10:32:45 2016
> (r295143)
> +++ head/sys/boot/efi/libefi/efinet.c Tue Feb  2 10:39:18 2016
> (r295144)
> @@ -184,11 +184,16 @@ efinet_init(struct iodesc *desc, void *m
>   EFI_HANDLE h;
>   EFI_STATUS status;
>  
> + if (nif->nif_driver->netif_ifs[nif->nif_unit].dif_unit < 0) {
> + printf("Invalid network interface %d\n", nif->nif_unit);
> + return;
> + }
> +
>   h = nif->nif_driver->netif_ifs[nif->nif_unit].dif_private;
>   status = BS->HandleProtocol(h, _guid, (VOID **)>nif_devdata);
>   if (status != EFI_SUCCESS) {
> - printf("net%d: cannot start interface (status=%ld)\n",
> - nif->nif_unit, (long)status);
> + printf("net%d: cannot start interface (status=%lu)\n",
> + nif->nif_unit, EFI_ERROR_CODE(status));
>   return;
>   }
>  
> @@ -288,11 +293,30 @@ efinet_dev_init()
>   stats = calloc(nifs, sizeof(struct netif_stats));
>  
>   for (i = 0; i < nifs; i++) {
> + EFI_SIMPLE_NETWORK *net;
> + EFI_HANDLE h;
> +
>   dif = _ifs[i];
> + dif->dif_unit = -1;
> +
> + h = efi_find_handle(_dev, i);
> +
> + /*
> +  * Open the network device in exclusive mode. Without this
> +  * we will be racing with the UEFI network stack. It will
> +  * pull packets off the network leading to lost packets.
> +  */
> + status = BS->OpenProtocol(h, _guid, (void **),
> + IH, 0, EFI_OPEN_PROTOCOL_EXCLUSIVE);
> + if (status != EFI_SUCCESS) {
> + printf("Unable to open network interface %d\n", i);
> + continue;
> + }
> +
>   dif->dif_unit = i;
>   dif->dif_nsel = 1;
>   dif->dif_stats = [i];
> - dif->dif_private = efi_find_handle(_dev, i);
> + dif->dif_private = h;
>   }
>  
>   return (0);
> ___
> svn-src-head@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


-- 
Emmanuel Vadot 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"