svn commit: r301777 - head/lib/libc/stdio

2016-06-09 Thread Pedro F. Giffuni
Author: pfg
Date: Fri Jun 10 05:21:52 2016
New Revision: 301777
URL: https://svnweb.freebsd.org/changeset/base/301777

Log:
  Fix regression from r301461.
  
  The fix to the __collate_range_cmp() ABI breakage missed some replacements
  in libc's vfscanf().  Replace them with __wcollate_range_cmp() which
  does what is expected.
  
  This was breaking applications like xterm and pidgin when using wide
  characters.
  
  Reported by:  Vitalij Satanivskij
  Approved by:  re

Modified:
  head/lib/libc/stdio/vfscanf.c

Modified: head/lib/libc/stdio/vfscanf.c
==
--- head/lib/libc/stdio/vfscanf.c   Fri Jun 10 04:04:55 2016
(r301776)
+++ head/lib/libc/stdio/vfscanf.c   Fri Jun 10 05:21:52 2016
(r301777)
@@ -873,7 +873,7 @@ doswitch:
n = *fmt;
if (n == ']'
|| (table->__collate_load_error ? n < c :
-   __collate_range_cmp (table, n, c) < 0
+   __wcollate_range_cmp(table, n, c) < 0
   )
   ) {
c = '-';
@@ -887,8 +887,8 @@ doswitch:
} while (c < n);
} else {
for (i = 0; i < 256; i ++)
-   if (   __collate_range_cmp (table, c, 
i) < 0
-   && __collate_range_cmp (table, i, 
n) <= 0
+   if (__wcollate_range_cmp(table, c, i) < 
0 &&
+   __wcollate_range_cmp(table, i, n) 
<= 0
   )
tab[i] = v;
}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r301741 - head/sys/cam

2016-06-09 Thread Warner Losh
I'm about to commit a real fix.

Warner

On Fri, Jun 10, 2016 at 12:39 AM, Jung-uk Kim  wrote:
> On 06/ 9/16 08:35 PM, Conrad Meyer wrote:
>> i386 as well (although we are replying to the wrong commit, I think
>> r301771 is what broke it):
>>
>> In file included from /usr/src/sbin/camcontrol/camcontrol.c:56:
>> /usr/obj/usr/src/tmp/usr/include/cam/cam_ccb.h:44:10: fatal error:
>> 'cam/nvme/nvme_all.h' file not found
>> #include 
>
> The attached patch fixed the build problem for me.
>
> FYI...
>
> Jung-uk Kim
>
>> Best,
>> Conrad
>>
>> On Thu, Jun 9, 2016 at 5:00 PM, Glen Barber  wrote:
>>> On Thu, Jun 09, 2016 at 04:05:56PM +, Warner Losh wrote:
 Author: imp
 Date: Thu Jun  9 16:05:56 2016
 New Revision: 301741
 URL: https://svnweb.freebsd.org/changeset/base/301741

 Log:
   Add place holder for SDIO CAM stuff for CCB XPT type.

>>>
>>> One of these commits breaks sparc64.
>>>
>>> In file included from /usr/src/sbin/camcontrol/camcontrol.c:56:
>>> /usr/obj/sparc64.sparc64/usr/src/tmp/usr/include/cam/cam_ccb.h:44:31:
>>> error: cam/nvme/nvme_all.h: No such file or directory
>>> In file included from /usr/src/sbin/camcontrol/camcontrol.c:56:
>>> /usr/obj/sparc64.sparc64/usr/src/tmp/usr/include/cam/cam_ccb.h:794:
>>> error: field 'cmd' has incomplete type
>>> /usr/obj/sparc64.sparc64/usr/src/tmp/usr/include/cam/cam_ccb.h:795:
>>> error: field 'cpl' has incomplete type
>>>
>>> Glen
>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r301741 - head/sys/cam

2016-06-09 Thread Glen Barber
On Fri, Jun 10, 2016 at 12:39:56AM -0400, Jung-uk Kim wrote:
> On 06/ 9/16 08:35 PM, Conrad Meyer wrote:
> > i386 as well (although we are replying to the wrong commit, I think
> > r301771 is what broke it):
> > 
> > In file included from /usr/src/sbin/camcontrol/camcontrol.c:56:
> > /usr/obj/usr/src/tmp/usr/include/cam/cam_ccb.h:44:10: fatal error:
> > 'cam/nvme/nvme_all.h' file not found
> > #include 
> 
> The attached patch fixed the build problem for me.
> 
> FYI...

Please commit.

Glen

> 
> Jung-uk Kim
> 
> > Best,
> > Conrad
> > 
> > On Thu, Jun 9, 2016 at 5:00 PM, Glen Barber  wrote:
> >> On Thu, Jun 09, 2016 at 04:05:56PM +, Warner Losh wrote:
> >>> Author: imp
> >>> Date: Thu Jun  9 16:05:56 2016
> >>> New Revision: 301741
> >>> URL: https://svnweb.freebsd.org/changeset/base/301741
> >>>
> >>> Log:
> >>>   Add place holder for SDIO CAM stuff for CCB XPT type.
> >>>
> >>
> >> One of these commits breaks sparc64.
> >>
> >> In file included from /usr/src/sbin/camcontrol/camcontrol.c:56:
> >> /usr/obj/sparc64.sparc64/usr/src/tmp/usr/include/cam/cam_ccb.h:44:31:
> >> error: cam/nvme/nvme_all.h: No such file or directory
> >> In file included from /usr/src/sbin/camcontrol/camcontrol.c:56:
> >> /usr/obj/sparc64.sparc64/usr/src/tmp/usr/include/cam/cam_ccb.h:794:
> >> error: field 'cmd' has incomplete type
> >> /usr/obj/sparc64.sparc64/usr/src/tmp/usr/include/cam/cam_ccb.h:795:
> >> error: field 'cpl' has incomplete type
> >>
> >> Glen
> 

> Index: etc/mtree/BSD.include.dist
> ===
> --- etc/mtree/BSD.include.dist(revision 301775)
> +++ etc/mtree/BSD.include.dist(working copy)
> @@ -90,6 +90,8 @@
>  cam
>  ata
>  ..
> +nvme
> +..
>  scsi
>  ..
>  ..
> Index: include/Makefile
> ===
> --- include/Makefile  (revision 301775)
> +++ include/Makefile  (working copy)
> @@ -42,7 +42,7 @@ LHDRS=  aio.h errno.h fcntl.h linker_set.h poll.h s
>  LDIRS=   bsm cam geom net net80211 netgraph netinet netinet6 \
>   netipsec netnatm netsmb nfs nfsclient nfsserver sys vm
>  
> -LSUBDIRS=cam/ata cam/scsi \
> +LSUBDIRS=cam/ata cam/nvme cam/scsi \
>   dev/acpica dev/agp dev/an dev/bktr dev/ciss dev/filemon dev/firewire \
>   dev/hwpmc \
>   dev/ic dev/iicbus dev/io dev/lmc dev/mfi dev/nvme \






signature.asc
Description: PGP signature


Re: svn commit: r301741 - head/sys/cam

2016-06-09 Thread Jung-uk Kim
On 06/ 9/16 08:35 PM, Conrad Meyer wrote:
> i386 as well (although we are replying to the wrong commit, I think
> r301771 is what broke it):
> 
> In file included from /usr/src/sbin/camcontrol/camcontrol.c:56:
> /usr/obj/usr/src/tmp/usr/include/cam/cam_ccb.h:44:10: fatal error:
> 'cam/nvme/nvme_all.h' file not found
> #include 

The attached patch fixed the build problem for me.

FYI...

Jung-uk Kim

> Best,
> Conrad
> 
> On Thu, Jun 9, 2016 at 5:00 PM, Glen Barber  wrote:
>> On Thu, Jun 09, 2016 at 04:05:56PM +, Warner Losh wrote:
>>> Author: imp
>>> Date: Thu Jun  9 16:05:56 2016
>>> New Revision: 301741
>>> URL: https://svnweb.freebsd.org/changeset/base/301741
>>>
>>> Log:
>>>   Add place holder for SDIO CAM stuff for CCB XPT type.
>>>
>>
>> One of these commits breaks sparc64.
>>
>> In file included from /usr/src/sbin/camcontrol/camcontrol.c:56:
>> /usr/obj/sparc64.sparc64/usr/src/tmp/usr/include/cam/cam_ccb.h:44:31:
>> error: cam/nvme/nvme_all.h: No such file or directory
>> In file included from /usr/src/sbin/camcontrol/camcontrol.c:56:
>> /usr/obj/sparc64.sparc64/usr/src/tmp/usr/include/cam/cam_ccb.h:794:
>> error: field 'cmd' has incomplete type
>> /usr/obj/sparc64.sparc64/usr/src/tmp/usr/include/cam/cam_ccb.h:795:
>> error: field 'cpl' has incomplete type
>>
>> Glen

Index: etc/mtree/BSD.include.dist
===
--- etc/mtree/BSD.include.dist	(revision 301775)
+++ etc/mtree/BSD.include.dist	(working copy)
@@ -90,6 +90,8 @@
 cam
 ata
 ..
+nvme
+..
 scsi
 ..
 ..
Index: include/Makefile
===
--- include/Makefile	(revision 301775)
+++ include/Makefile	(working copy)
@@ -42,7 +42,7 @@ LHDRS=	aio.h errno.h fcntl.h linker_set.h poll.h s
 LDIRS=	bsm cam geom net net80211 netgraph netinet netinet6 \
 	netipsec netnatm netsmb nfs nfsclient nfsserver sys vm
 
-LSUBDIRS=	cam/ata cam/scsi \
+LSUBDIRS=	cam/ata cam/nvme cam/scsi \
 	dev/acpica dev/agp dev/an dev/bktr dev/ciss dev/filemon dev/firewire \
 	dev/hwpmc \
 	dev/ic dev/iicbus dev/io dev/lmc dev/mfi dev/nvme \


signature.asc
Description: OpenPGP digital signature


svn commit: r301776 - stable/10/sys/x86/x86

2016-06-09 Thread Konstantin Belousov
Author: kib
Date: Fri Jun 10 04:04:55 2016
New Revision: 301776
URL: https://svnweb.freebsd.org/changeset/base/301776

Log:
  MFC r301278
  Reduce number of iterations used for calibrating ICR read loop.
  
  MFC r301279:
  Record correct commit message for r301278.

Modified:
  stable/10/sys/x86/x86/local_apic.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/x86/x86/local_apic.c
==
--- stable/10/sys/x86/x86/local_apic.c  Fri Jun 10 01:10:48 2016
(r301775)
+++ stable/10/sys/x86/x86/local_apic.c  Fri Jun 10 04:04:55 2016
(r301776)
@@ -284,7 +284,7 @@ lapic_init(vm_paddr_t addr)
}
 
 #ifdef SMP
-#defineLOOPS   100
+#defineLOOPS   10
/*
 * Calibrate the busy loop waiting for IPI ack in xAPIC mode.
 * lapic_ipi_wait_mult contains the number of iterations which
@@ -440,7 +440,7 @@ lapic_setup(int boot)
/* Program the CMCI LVT entry if present. */
if (maxlvt >= APIC_LVT_CMCI)
lapic->lvt_cmci = lvt_mode(la, APIC_LVT_CMCI, lapic->lvt_cmci);
-   
+
intr_restore(saveintr);
 }
 
@@ -1363,7 +1363,7 @@ static void
 apic_setup_local(void *dummy __unused)
 {
int retval;
- 
+
if (best_enum == NULL)
return;
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r301751 - head/sys/kern

2016-06-09 Thread Konstantin Belousov
On Thu, Jun 09, 2016 at 06:27:41PM +, Conrad E. Meyer wrote:
> Author: cem
> Date: Thu Jun  9 18:27:41 2016
> New Revision: 301751
> URL: https://svnweb.freebsd.org/changeset/base/301751
> 
> Log:
>   Add DDB command "kldstat"
>   
>   It prints much the same information as kldstat(8) without any arguments.
>   
>   Suggested by:   jhibbits
>   Sponsored by:   EMC / Isilon Storage Division
> 
> Modified:
>   head/sys/kern/kern_linker.c
> 
> Modified: head/sys/kern/kern_linker.c
> ==
> --- head/sys/kern/kern_linker.c   Thu Jun  9 18:24:51 2016
> (r301750)
> +++ head/sys/kern/kern_linker.c   Thu Jun  9 18:27:41 2016
> (r301751)
> @@ -54,6 +54,10 @@ __FBSDID("$FreeBSD$");
>  #include 
>  #include 
>  
> +#ifdef DDB
> +#include 
> +#endif
> +
>  #include 
>  
>  #include 
> @@ -1256,6 +1260,23 @@ kern_kldstat(struct thread *td, int file
>   return (0);
>  }
>  
> +#ifdef DDB
> +DB_COMMAND(kldstat, db_kldstat)
This would arguably more visible if done as the 'show klds' or similar
subcommand. The first place where people accustomed to ddb look when
want to see some kernel structures dumped, is 'show'.

BTW, a useful tradition is to have 'show kld ' and 'show klds'
commands. If not clear from the structure, the first command would print
the information about single linker file at the given address (whatever
it is), and second does what your current 'kldstat' offer.


> +{
> + linker_file_t lf;
> +
> +#define  POINTER_WIDTH   ((int)(sizeof(void *) * 2 + 2))
> + db_printf("Id Refs Address%*c Size Name\n", POINTER_WIDTH - 7, ' ');
> +#undef   POINTER_WIDTH
> + TAILQ_FOREACH(lf, _files, link) {
> + if (db_pager_quit)
> + return;
> + db_printf("%2d %4d %p %-8zx %s\n", lf->id, lf->refs,
> + lf->address, lf->size, lf->filename);
> + }
> +}
> +#endif /* DDB */
> +
>  int
>  sys_kldfirstmod(struct thread *td, struct kldfirstmod_args *uap)
>  {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301775 - head/contrib/ipfilter/man

2016-06-09 Thread Cy Schubert
Author: cy
Date: Fri Jun 10 01:10:48 2016
New Revision: 301775
URL: https://svnweb.freebsd.org/changeset/base/301775

Log:
  Clarify the wording to be more accurate.
  
  Approved by:  re@ (gjb)
  MFC after:1 week
  X-MFC with:   r301773

Modified:
  head/contrib/ipfilter/man/ipf.8

Modified: head/contrib/ipfilter/man/ipf.8
==
--- head/contrib/ipfilter/man/ipf.8 Fri Jun 10 00:08:25 2016
(r301774)
+++ head/contrib/ipfilter/man/ipf.8 Fri Jun 10 01:10:48 2016
(r301775)
@@ -35,11 +35,10 @@ which they appear when given to \fBipf\f
 .SH OPTIONS
 .TP
 .B \-6
-This option was required in previous releases of IP FIlter to parse IPv6
-rules and to have them loaded. As of IP FIlter 5.0.0 all rules are stored
-in a single table loaded from a single file. This option is a noop. It
-will produce the message "IPv6 rules are no longer seperate." It is
-included for backward compatibility.
+IPv4 and IPv6 rules are stored in a single table and can be read from a
+single file. This option is no longer required to load IPv6 rules. This
+option is ignored when specified with the -F option and the -F option
+will flush IPv4 rules even if this option is specified.
 .TP
 .B \-A
 Set the list to make changes to the active list (default).
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r301741 - head/sys/cam

2016-06-09 Thread Conrad Meyer
i386 as well (although we are replying to the wrong commit, I think
r301771 is what broke it):

In file included from /usr/src/sbin/camcontrol/camcontrol.c:56:
/usr/obj/usr/src/tmp/usr/include/cam/cam_ccb.h:44:10: fatal error:
'cam/nvme/nvme_all.h' file not found
#include 
 ^

Best,
Conrad

On Thu, Jun 9, 2016 at 5:00 PM, Glen Barber  wrote:
> On Thu, Jun 09, 2016 at 04:05:56PM +, Warner Losh wrote:
>> Author: imp
>> Date: Thu Jun  9 16:05:56 2016
>> New Revision: 301741
>> URL: https://svnweb.freebsd.org/changeset/base/301741
>>
>> Log:
>>   Add place holder for SDIO CAM stuff for CCB XPT type.
>>
>
> One of these commits breaks sparc64.
>
> In file included from /usr/src/sbin/camcontrol/camcontrol.c:56:
> /usr/obj/sparc64.sparc64/usr/src/tmp/usr/include/cam/cam_ccb.h:44:31:
> error: cam/nvme/nvme_all.h: No such file or directory
> In file included from /usr/src/sbin/camcontrol/camcontrol.c:56:
> /usr/obj/sparc64.sparc64/usr/src/tmp/usr/include/cam/cam_ccb.h:794:
> error: field 'cmd' has incomplete type
> /usr/obj/sparc64.sparc64/usr/src/tmp/usr/include/cam/cam_ccb.h:795:
> error: field 'cpl' has incomplete type
>
> Glen
>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301774 - svnadmin/conf

2016-06-09 Thread Glen Barber
Author: gjb
Date: Fri Jun 10 00:08:25 2016
New Revision: 301774
URL: https://svnweb.freebsd.org/changeset/base/301774

Log:
  Require explicit re@ approval for commits to -CURRENT, marking the
  official code freeze for 11.0-RELEASE.
  
  Approved by:  re (implicit)
  Sponsored by: The FreeBSD Foundation

Modified:
  svnadmin/conf/approvers

Modified: svnadmin/conf/approvers
==
--- svnadmin/conf/approvers Fri Jun 10 00:06:58 2016(r301773)
+++ svnadmin/conf/approvers Fri Jun 10 00:08:25 2016(r301774)
@@ -16,7 +16,7 @@
 #
 # $FreeBSD$
 #
-#^head/re
+^head/ re
 #^stable/10/   re
 ^release/  re
 ^releng/10.[0-3]/  (security-officer|so)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301773 - head/contrib/ipfilter/man

2016-06-09 Thread Cy Schubert
Author: cy
Date: Fri Jun 10 00:06:58 2016
New Revision: 301773
URL: https://svnweb.freebsd.org/changeset/base/301773

Log:
  Update the man ipf.8 man page to accurately reflect that the -6
  option is a noop and only here for backward compatibility.
  
  MFC after:1 week

Modified:
  head/contrib/ipfilter/man/ipf.8

Modified: head/contrib/ipfilter/man/ipf.8
==
--- head/contrib/ipfilter/man/ipf.8 Fri Jun 10 00:00:25 2016
(r301772)
+++ head/contrib/ipfilter/man/ipf.8 Fri Jun 10 00:06:58 2016
(r301773)
@@ -35,7 +35,11 @@ which they appear when given to \fBipf\f
 .SH OPTIONS
 .TP
 .B \-6
-This option is required to parse IPv6 rules and to have them loaded.
+This option was required in previous releases of IP FIlter to parse IPv6
+rules and to have them loaded. As of IP FIlter 5.0.0 all rules are stored
+in a single table loaded from a single file. This option is a noop. It
+will produce the message "IPv6 rules are no longer seperate." It is
+included for backward compatibility.
 .TP
 .B \-A
 Set the list to make changes to the active list (default).
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301772 - in stable/10: sbin/ipfw sys/conf sys/modules/dummynet sys/netinet sys/netpfil/ipfw

2016-06-09 Thread Don Lewis
Author: truckman
Date: Fri Jun 10 00:00:25 2016
New Revision: 301772
URL: https://svnweb.freebsd.org/changeset/base/301772

Log:
  MFC r300779, r300781, r300783, r300784, r300949, r301162, r301180
  
  r300779 | truckman | 2016-05-26 14:40:13 -0700 (Thu, 26 May 2016) | 64 lines
  
  Import Dummynet AQM version 0.2.1 (CoDel, FQ-CoDel, PIE and FQ-PIE).
  
  Centre for Advanced Internet Architectures
  
  Implementing AQM in FreeBSD
  
  * Overview 
  
  * Articles, Papers and Presentations

  
  * Patches and Tools 
  
  Overview
  
  Recent years have seen a resurgence of interest in better managing
  the depth of bottleneck queues in routers, switches and other places
  that get congested. Solutions include transport protocol enhancements
  at the end-hosts (such as delay-based or hybrid congestion control
  schemes) and active queue management (AQM) schemes applied within
  bottleneck queues.
  
  The notion of AQM has been around since at least the late 1990s
  (e.g. RFC 2309). In recent years the proliferation of oversized
  buffers in all sorts of network devices (aka bufferbloat) has
  stimulated keen community interest in four new AQM schemes -- CoDel,
  FQ-CoDel, PIE and FQ-PIE.
  
  The IETF AQM working group is looking to document these schemes,
  and independent implementations are a corner-stone of the IETF's
  process for confirming the clarity of publicly available protocol
  descriptions. While significant development work on all three schemes
  has occured in the Linux kernel, there is very little in FreeBSD.
  
  Project Goals
  
  This project began in late 2015, and aims to design and implement
  functionally-correct versions of CoDel, FQ-CoDel, PIE and FQ_PIE
  in FreeBSD (with code BSD-licensed as much as practical). We have
  chosen to do this as extensions to FreeBSD's ipfw/dummynet firewall
  and traffic shaper. Implementation of these AQM schemes in FreeBSD
  will:
  * Demonstrate whether the publicly available documentation is
sufficient to enable independent, functionally equivalent implementations
  
  * Provide a broader suite of AQM options for sections the networking
community that rely on FreeBSD platforms
  
  Program Members:
  
  * Rasool Al Saadi (developer)
  
  * Grenville Armitage (project lead)
  
  Acknowledgements:
  
  This project has been made possible in part by a gift from the
  Comcast Innovation Fund.
  
  Submitted by: Rasool Al-Saadi 
  X-No objection:   core
  MFC after:2 weeks
  Differential Revision:https://reviews.freebsd.org/D6388
  
  [Remove some code that was added to the mq_append() inline function in
  HEAD by r258457, which was not merged to stable/10.  The AQM patch
  moved mq_append() from ip_dn_io.c to the new file ip_dn_private.h, so
  we need to remove that copy of the r258457 changes.]
  
  r300781 | truckman | 2016-05-26 14:44:52 -0700 (Thu, 26 May 2016) | 7 lines
  
  Modify BOUND_VAR() macro to wrap all of its arguments in () and tweak
  its expression to work on powerpc and sparc64 (gcc compatibility).
  
  Correct a typo in a nearby comment.
  
  MFC after:2 weeks (with r300779)
  
  
  r300783 | truckman | 2016-05-26 15:03:28 -0700 (Thu, 26 May 2016) | 4 lines
  
  Correct a typo in a comment.
  
  MFC after:2 weeks (with r300779)
  
  
  r300784 | truckman | 2016-05-26 15:07:09 -0700 (Thu, 26 May 2016) | 5 lines
  
  Include the new AQM files when compiling a kernel with options DUMMYNET.
  
  Reported by:  Nikolay Denev 
  MFC after:2 weeks (with r300779)
  
  
  r300949 | truckman | 2016-05-29 00:23:56 -0700 (Sun, 29 May 2016) | 10 lines
  
  Cast some expressions that multiply a long long constant by a
  floating point constant to int64_t.  This avoids the runtime
  conversion of the the other operand in a set of comparisons from
  int64_t to floating point and doing the comparisions in floating
  point.
  
  Suggested by: lidl
  Submitted by: Rasool Al-Saadi 
  MFC after:2 weeks (with r300779)
  
  
  r301162 | truckman | 2016-06-01 13:04:24 -0700 (Wed, 01 Jun 2016) | 9 lines
  
  Replace constant expressions that contain multiplications by
  fractional floating point values with integer divides.  This will
  eliminate any chance that the compiler will generate code to evaluate
  the expression using floating point at runtime.
  
  Suggested by: bde
  Submitted by: Rasool Al-Saadi 
  MFC after:8 days (with r300779 and 

Re: svn commit: r301741 - head/sys/cam

2016-06-09 Thread Glen Barber
On Thu, Jun 09, 2016 at 04:05:56PM +, Warner Losh wrote:
> Author: imp
> Date: Thu Jun  9 16:05:56 2016
> New Revision: 301741
> URL: https://svnweb.freebsd.org/changeset/base/301741
> 
> Log:
>   Add place holder for SDIO CAM stuff for CCB XPT type.
>   

One of these commits breaks sparc64.

In file included from /usr/src/sbin/camcontrol/camcontrol.c:56:
/usr/obj/sparc64.sparc64/usr/src/tmp/usr/include/cam/cam_ccb.h:44:31:
error: cam/nvme/nvme_all.h: No such file or directory
In file included from /usr/src/sbin/camcontrol/camcontrol.c:56:
/usr/obj/sparc64.sparc64/usr/src/tmp/usr/include/cam/cam_ccb.h:794:
error: field 'cmd' has incomplete type
/usr/obj/sparc64.sparc64/usr/src/tmp/usr/include/cam/cam_ccb.h:795:
error: field 'cpl' has incomplete type

Glen



signature.asc
Description: PGP signature


svn commit: r301771 - in head/sys: cam cam/nvme conf

2016-06-09 Thread Warner Losh
Author: imp
Date: Thu Jun  9 22:39:02 2016
New Revision: 301771
URL: https://svnweb.freebsd.org/changeset/base/301771

Log:
  New NVMe front end (nda).

Added:
  head/sys/cam/nvme/
  head/sys/cam/nvme/nvme_all.c   (contents, props changed)
  head/sys/cam/nvme/nvme_all.h   (contents, props changed)
  head/sys/cam/nvme/nvme_da.c   (contents, props changed)
  head/sys/cam/nvme/nvme_xpt.c   (contents, props changed)
Modified:
  head/sys/cam/cam_ccb.h
  head/sys/cam/cam_xpt_internal.h
  head/sys/conf/files
  head/sys/conf/files.amd64

Modified: head/sys/cam/cam_ccb.h
==
--- head/sys/cam/cam_ccb.h  Thu Jun  9 22:25:00 2016(r301770)
+++ head/sys/cam/cam_ccb.h  Thu Jun  9 22:39:02 2016(r301771)
@@ -41,6 +41,7 @@
 #include 
 #include 
 #include 
+#include 
 
 /* General allocation length definitions for CCB structures */
 #defineIOCDBLENCAM_MAX_CDBLEN  /* Space for CDB bytes/pointer 
*/
@@ -265,6 +266,7 @@ typedef enum {
PROTO_ATAPI,/* AT Attachment Packetized Interface */
PROTO_SATAPM,   /* SATA Port Multiplier */
PROTO_SEMB, /* SATA Enclosure Management Bridge */
+   PROTO_NVME, /* NVME */
 } cam_proto;
 
 typedef enum {
@@ -280,6 +282,7 @@ typedef enum {
XPORT_SATA, /* Serial AT Attachment */
XPORT_ISCSI,/* iSCSI */
XPORT_SRP,  /* SCSI RDMA Protocol */
+   XPORT_NVME, /* NVMe over PCIe */
 } cam_xport;
 
 #define XPORT_IS_ATA(t)((t) == XPORT_ATA || (t) == XPORT_SATA)
@@ -783,6 +786,19 @@ struct ccb_relsim {
 };
 
 /*
+ * NVMe I/O Request CCB used for the XPT_NVME_IO function code.
+ */
+struct ccb_nvmeio {
+   struct ccb_hdr ccb_h;
+   union  ccb *next_ccb;   /* Ptr for next CCB for action */
+   struct nvme_command cmd;/* NVME command, per NVME standard */
+   struct nvme_completion cpl; /* NVME completion, per NVME standard */
+   uint8_t   *data_ptr;/* Ptr to the data buf/SG list */
+   uint32_t  dxfer_len;/* Data transfer length */
+   uint32_t  resid;/* Transfer residual length: 2's comp 
unused ?*/
+};
+
+/*
  * Definitions for the asynchronous callback CCB fields.
  */
 typedef enum {
@@ -1234,6 +1250,7 @@ union ccb {
struct  ccb_ataio   ataio;
struct  ccb_dev_advinfo cdai;
struct  ccb_async   casync;
+   struct  ccb_nvmeio  nvmeio;
 };
 
 #define CCB_CLEAR_ALL_EXCEPT_HDR(ccbp) \
@@ -1250,6 +1267,12 @@ cam_fill_csio(struct ccb_scsiio *csio, u
  u_int32_t timeout);
 
 static __inline void
+cam_fill_nvmeio(struct ccb_nvmeio *nvmeio, u_int32_t retries,
+ void (*cbfcnp)(struct cam_periph *, union ccb *),
+ u_int32_t flags, u_int8_t *data_ptr, u_int32_t dxfer_len,
+ u_int32_t timeout);
+
+static __inline void
 cam_fill_ctio(struct ccb_scsiio *csio, u_int32_t retries,
  void (*cbfcnp)(struct cam_periph *, union ccb *),
  u_int32_t flags, u_int tag_action, u_int tag_id,
@@ -1370,6 +1393,20 @@ cam_ccb_status(union ccb *ccb)
 
 void cam_calc_geometry(struct ccb_calc_geometry *ccg, int extended);
 
+static __inline void
+cam_fill_nvmeio(struct ccb_nvmeio *nvmeio, u_int32_t retries,
+ void (*cbfcnp)(struct cam_periph *, union ccb *),
+ u_int32_t flags, u_int8_t *data_ptr, u_int32_t dxfer_len,
+ u_int32_t timeout)
+{
+   nvmeio->ccb_h.func_code = XPT_NVME_IO;
+   nvmeio->ccb_h.flags = flags;
+   nvmeio->ccb_h.retry_count = retries;
+   nvmeio->ccb_h.cbfcnp = cbfcnp;
+   nvmeio->ccb_h.timeout = timeout;
+   nvmeio->data_ptr = data_ptr;
+   nvmeio->dxfer_len = dxfer_len;
+}
 __END_DECLS
 
 #endif /* _CAM_CAM_CCB_H */

Modified: head/sys/cam/cam_xpt_internal.h
==
--- head/sys/cam/cam_xpt_internal.h Thu Jun  9 22:25:00 2016
(r301770)
+++ head/sys/cam/cam_xpt_internal.h Thu Jun  9 22:39:02 2016
(r301771)
@@ -117,6 +117,8 @@ struct cam_ed {
STAILQ_ENTRY(cam_ed) highpowerq_entry;
struct mtx   device_mtx;
struct task  device_destroy_task;
+   const struct nvme_controller_data *nvme_cdata;
+   const struct nvme_namespace_data *nvme_data;
 };
 
 /*
@@ -167,6 +169,7 @@ struct cam_path {
 
 struct xpt_xport * scsi_get_xport(void);
 struct xpt_xport * ata_get_xport(void);
+struct xpt_xport * nvme_get_xport(void);
 
 struct cam_ed *xpt_alloc_device(struct cam_eb *bus,
 struct cam_et *target,

Added: head/sys/cam/nvme/nvme_all.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ 

svn commit: r301770 - head/usr.sbin/rpcbind

2016-06-09 Thread Pedro F. Giffuni
Author: pfg
Date: Thu Jun  9 22:25:00 2016
New Revision: 301770
URL: https://svnweb.freebsd.org/changeset/base/301770

Log:
  rpcbind(8): Make use of some xdr_* macros.
  
  xdr_rpcproc, xdr_rpcprog and xdr_rpcvers were broken in older
  versions of FreeBSD but fixed in r296394.  Give them some use
  hoping they help make the code somewhat more readable.

Modified:
  head/usr.sbin/rpcbind/rpcb_svc_com.c

Modified: head/usr.sbin/rpcbind/rpcb_svc_com.c
==
--- head/usr.sbin/rpcbind/rpcb_svc_com.cThu Jun  9 22:18:25 2016
(r301769)
+++ head/usr.sbin/rpcbind/rpcb_svc_com.cThu Jun  9 22:25:00 2016
(r301770)
@@ -429,9 +429,9 @@ static bool_t
 xdr_rmtcall_args(XDR *xdrs, struct r_rmtcall_args *cap)
 {
/* does not get the address or the arguments */
-   if (xdr_u_int32_t(xdrs, &(cap->rmt_prog)) &&
-   xdr_u_int32_t(xdrs, &(cap->rmt_vers)) &&
-   xdr_u_int32_t(xdrs, &(cap->rmt_proc))) {
+   if (xdr_rpcprog(xdrs, &(cap->rmt_prog)) &&
+   xdr_rpcvers(xdrs, &(cap->rmt_vers)) &&
+   xdr_rpcproc(xdrs, &(cap->rmt_proc))) {
return (xdr_encap_parms(xdrs, &(cap->rmt_args)));
}
return (FALSE);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301769 - head/lib/libc/rpc

2016-06-09 Thread Pedro F. Giffuni
Author: pfg
Date: Thu Jun  9 22:18:25 2016
New Revision: 301769
URL: https://svnweb.freebsd.org/changeset/base/301769

Log:
  libc/rpc: Make use of some xdr_* macros. (part 2)
  
  xdr_rpcproc, xdr_rpcprog and xdr_rpcvers were broken in older
  versions of FreeBSD but fixed in r296394.  Give them some use
  hoping they help make the code somewhat more readable.

Modified:
  head/lib/libc/rpc/rpc_callmsg.c
  head/lib/libc/rpc/rpc_prot.c
  head/lib/libc/rpc/rpcb_st_xdr.c

Modified: head/lib/libc/rpc/rpc_callmsg.c
==
--- head/lib/libc/rpc/rpc_callmsg.c Thu Jun  9 22:14:58 2016
(r301768)
+++ head/lib/libc/rpc/rpc_callmsg.c Thu Jun  9 22:18:25 2016
(r301769)
@@ -193,11 +193,11 @@ xdr_callmsg(XDR *xdrs, struct rpc_msg *c
xdr_u_int32_t(xdrs, &(cmsg->rm_xid)) &&
xdr_enum(xdrs, (enum_t *) prm_direction) &&
(cmsg->rm_direction == CALL) &&
-   xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_rpcvers)) &&
+   xdr_rpcvers(xdrs, &(cmsg->rm_call.cb_rpcvers)) &&
(cmsg->rm_call.cb_rpcvers == RPC_MSG_VERSION) &&
-   xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_prog)) &&
-   xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_vers)) &&
-   xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_proc)) &&
+   xdr_rpcprog(xdrs, &(cmsg->rm_call.cb_prog)) &&
+   xdr_rpcvers(xdrs, &(cmsg->rm_call.cb_vers)) &&
+   xdr_rpcproc(xdrs, &(cmsg->rm_call.cb_proc)) &&
xdr_opaque_auth(xdrs, &(cmsg->rm_call.cb_cred)) )
return (xdr_opaque_auth(xdrs, &(cmsg->rm_call.cb_verf)));
return (FALSE);

Modified: head/lib/libc/rpc/rpc_prot.c
==
--- head/lib/libc/rpc/rpc_prot.cThu Jun  9 22:14:58 2016
(r301768)
+++ head/lib/libc/rpc/rpc_prot.cThu Jun  9 22:18:25 2016
(r301769)
@@ -119,9 +119,9 @@ xdr_accepted_reply(XDR *xdrs, struct acc
return ((*(ar->ar_results.proc))(xdrs, ar->ar_results.where));
 
case PROG_MISMATCH:
-   if (! xdr_u_int32_t(xdrs, &(ar->ar_vers.low)))
+   if (!xdr_rpcvers(xdrs, &(ar->ar_vers.low)))
return (FALSE);
-   return (xdr_u_int32_t(xdrs, &(ar->ar_vers.high)));
+   return (xdr_rpcvers(xdrs, &(ar->ar_vers.high)));
 
case GARBAGE_ARGS:
case SYSTEM_ERR:
@@ -152,9 +152,9 @@ xdr_rejected_reply(XDR *xdrs, struct rej
switch (rr->rj_stat) {
 
case RPC_MISMATCH:
-   if (! xdr_u_int32_t(xdrs, &(rr->rj_vers.low)))
+   if (! xdr_rpcvers(xdrs, &(rr->rj_vers.low)))
return (FALSE);
-   return (xdr_u_int32_t(xdrs, &(rr->rj_vers.high)));
+   return (xdr_rpcvers(xdrs, &(rr->rj_vers.high)));
 
case AUTH_ERROR:
prj_why = >rj_why;

Modified: head/lib/libc/rpc/rpcb_st_xdr.c
==
--- head/lib/libc/rpc/rpcb_st_xdr.c Thu Jun  9 22:14:58 2016
(r301768)
+++ head/lib/libc/rpc/rpcb_st_xdr.c Thu Jun  9 22:18:25 2016
(r301769)
@@ -51,10 +51,10 @@ xdr_rpcbs_addrlist(XDR *xdrs, rpcbs_addr
 {
struct rpcbs_addrlist **pnext;
 
-   if (!xdr_u_int32_t(xdrs, >prog)) {
+   if (!xdr_rpcprog(xdrs, >prog)) {
return (FALSE);
}
-   if (!xdr_u_int32_t(xdrs, >vers)) {
+   if (!xdr_rpcvers(xdrs, >vers)) {
return (FALSE);
}
if (!xdr_int(xdrs, >success)) {
@@ -89,13 +89,13 @@ xdr_rpcbs_rmtcalllist(XDR *xdrs, rpcbs_r
if (xdrs->x_op == XDR_ENCODE) {
buf = XDR_INLINE(xdrs, 6 * BYTES_PER_XDR_UNIT);
if (buf == NULL) {
-   if (!xdr_u_int32_t(xdrs, >prog)) {
+   if (!xdr_rpcprog(xdrs, >prog)) {
return (FALSE);
}
-   if (!xdr_u_int32_t(xdrs, >vers)) {
+   if (!xdr_rpcvers(xdrs, >vers)) {
return (FALSE);
}
-   if (!xdr_u_int32_t(xdrs, >proc)) {
+   if (!xdr_rpcproc(xdrs, >proc)) {
return (FALSE);
}
if (!xdr_int(xdrs, >success)) {
@@ -128,13 +128,13 @@ xdr_rpcbs_rmtcalllist(XDR *xdrs, rpcbs_r
} else if (xdrs->x_op == XDR_DECODE) {
buf = XDR_INLINE(xdrs, 6 * BYTES_PER_XDR_UNIT);
if (buf == NULL) {
-   if (!xdr_u_int32_t(xdrs, >prog)) {
+   if (!xdr_rpcprog(xdrs, >prog)) {
return (FALSE);
}
-   if (!xdr_u_int32_t(xdrs, >vers)) {
+   if (!xdr_rpcvers(xdrs, >vers)) {
return (FALSE);
}
-   if (!xdr_u_int32_t(xdrs, >proc)) {
+   if (!xdr_rpcproc(xdrs, >proc)) {

svn commit: r301768 - in head/lib/libc: gen sys

2016-06-09 Thread Jilles Tjoelker
Author: jilles
Date: Thu Jun  9 22:14:58 2016
New Revision: 301768
URL: https://svnweb.freebsd.org/changeset/base/301768

Log:
  utimes(2),utime(3): Add deprecation in favour of utimensat(2) and futimens(2).
  
  Setting time by seconds or microseconds may cause unexpected effects
  especially if sysctl vfs.timestamp_precision=3 (not default).
  
  Calling the obsolete functions with NULL timestamps is acceptable.

Modified:
  head/lib/libc/gen/utime.3
  head/lib/libc/sys/utimes.2

Modified: head/lib/libc/gen/utime.3
==
--- head/lib/libc/gen/utime.3   Thu Jun  9 22:01:05 2016(r301767)
+++ head/lib/libc/gen/utime.3   Thu Jun  9 22:14:58 2016(r301768)
@@ -28,7 +28,7 @@
 .\" @(#)utime.38.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd June 4, 1993
+.Dd June 9, 2016
 .Dt UTIME 3
 .Os
 .Sh NAME
@@ -43,7 +43,8 @@
 .Sh DESCRIPTION
 .Bf -symbolic
 This interface is obsoleted by
-.Xr utimes 2 .
+.Xr utimensat 2
+because it is not accurate to fractions of a second.
 .Ef
 .Pp
 The
@@ -79,6 +80,7 @@ for any of the errors specified for the 
 .Xr utimes 2 .
 .Sh SEE ALSO
 .Xr stat 2 ,
+.Xr utimensat 2 ,
 .Xr utimes 2
 .Sh STANDARDS
 The

Modified: head/lib/libc/sys/utimes.2
==
--- head/lib/libc/sys/utimes.2  Thu Jun  9 22:01:05 2016(r301767)
+++ head/lib/libc/sys/utimes.2  Thu Jun  9 22:14:58 2016(r301768)
@@ -30,7 +30,7 @@
 .\" @(#)utimes.2   8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd July 3, 2014
+.Dd June 9, 2016
 .Dt UTIMES 2
 .Os
 .Sh NAME
@@ -52,6 +52,14 @@
 .Ft int
 .Fn futimesat "int fd" "const char *path" "const struct timeval times[2]"
 .Sh DESCRIPTION
+.Bf -symbolic
+These interfaces are obsoleted by
+.Xr futimens 2
+and
+.Xr utimensat 2
+because they are not accurate to nanoseconds.
+.Ef
+.Pp
 The access and modification times of the file named by
 .Fa path
 or referenced by
@@ -223,6 +231,7 @@ nor a file descriptor associated with a 
 .Sh SEE ALSO
 .Xr chflags 2 ,
 .Xr stat 2 ,
+.Xr utimensat 2 ,
 .Xr utime 3
 .Sh STANDARDS
 The
@@ -231,7 +240,11 @@ function is expected to conform to
 .St -xpg4.2 .
 The
 .Fn futimesat
-system call follows The Open Group Extended API Set 2 specification.
+system call follows The Open Group Extended API Set 2 specification
+but was replaced by
+.Fn utimensat
+in
+.St -p1003.1-2008 .
 .Sh HISTORY
 The
 .Fn utimes
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301767 - head/sys/dev/ath

2016-06-09 Thread Adrian Chadd
Author: adrian
Date: Thu Jun  9 22:01:05 2016
New Revision: 301767
URL: https://svnweb.freebsd.org/changeset/base/301767

Log:
  [ath] add a placeholder event for debuggin EDMA TX FIFO push events.
  
  Some later code I'll commit pushes lists of frames into the EDMA TX
  FIFO, rather than a single frame at a time.  The CABQ code already
  pushes frame lists, but it turns out we should actually be doing it
  in general or performance tanks. :(

Modified:
  head/sys/dev/ath/if_ath_alq.h

Modified: head/sys/dev/ath/if_ath_alq.h
==
--- head/sys/dev/ath/if_ath_alq.h   Thu Jun  9 21:59:36 2016
(r301766)
+++ head/sys/dev/ath/if_ath_alq.h   Thu Jun  9 22:01:05 2016
(r301767)
@@ -113,6 +113,14 @@ struct if_ath_alq_mib_counters {
 #defineATH_ALQ_STUCK_BEACON13
 #defineATH_ALQ_RESUME_BEACON   14
 
+#defineATH_ALQ_TX_FIFO_PUSH15
+struct if_ath_alq_tx_fifo_push {
+   uint32_ttxq;
+   uint32_tnframes;
+   uint32_tfifo_depth;
+   uint32_tframe_cnt;
+};
+
 /*
  * These will always be logged, regardless.
  */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301766 - head/sys/dev/ath

2016-06-09 Thread Adrian Chadd
Author: adrian
Date: Thu Jun  9 21:59:36 2016
New Revision: 301766
URL: https://svnweb.freebsd.org/changeset/base/301766

Log:
  [ath] report node queue overflows.
  
  I need to also update athstats to report this too.

Modified:
  head/sys/dev/ath/if_ath_sysctl.c

Modified: head/sys/dev/ath/if_ath_sysctl.c
==
--- head/sys/dev/ath/if_ath_sysctl.cThu Jun  9 21:59:35 2016
(r301765)
+++ head/sys/dev/ath/if_ath_sysctl.cThu Jun  9 21:59:36 2016
(r301766)
@@ -1282,6 +1282,9 @@ ath_sysctl_stats_attach(struct ath_softc
>sc_stats.ast_rx_keymiss, 0, "");
SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_swfiltered", CTLFLAG_RD,
>sc_stats.ast_tx_swfiltered, 0, "");
+   SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_nodeq_overflow",
+   CTLFLAG_RD, >sc_stats.ast_tx_nodeq_overflow, 0,
+   "tx dropped 'cuz nodeq overflow");
SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rx_stbc",
CTLFLAG_RD, >sc_stats.ast_rx_stbc, 0,
"Number of STBC frames received");
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301765 - in head/usr.bin/xinstall: . tests

2016-06-09 Thread Jilles Tjoelker
Author: jilles
Date: Thu Jun  9 21:59:35 2016
New Revision: 301765
URL: https://svnweb.freebsd.org/changeset/base/301765

Log:
  install: When preserving timestamps, also copy the nanoseconds part.
  
  Now that we have utimensat in -legacy, install(1) can use it.
  
  This is a revert of r299942 which is itself a revert of r299850.

Modified:
  head/usr.bin/xinstall/tests/install_test.sh
  head/usr.bin/xinstall/xinstall.c

Modified: head/usr.bin/xinstall/tests/install_test.sh
==
--- head/usr.bin/xinstall/tests/install_test.sh Thu Jun  9 21:59:11 2016
(r301764)
+++ head/usr.bin/xinstall/tests/install_test.sh Thu Jun  9 21:59:35 2016
(r301765)
@@ -64,6 +64,12 @@ copy_to_nonexistent_backup_safe_body() {
copy_to_nonexistent_with_opts -b -B.bak -S
 }
 
+atf_test_case copy_to_nonexistent_preserving
+copy_to_nonexistent_preserving_body() {
+   copy_to_nonexistent_with_opts -p
+   [ ! testf -ot copyf ] || atf_fail "bad timestamp 2"
+}
+
 copy_self_with_opts() {
printf 'test\n123\r456\r\n789\0z' >testf
printf 'test\n123\r456\r\n789\0z' >testf2
@@ -307,6 +313,7 @@ atf_init_test_cases() {
atf_add_test_case copy_to_nonexistent_safe_comparing
atf_add_test_case copy_to_nonexistent_backup
atf_add_test_case copy_to_nonexistent_backup_safe
+   atf_add_test_case copy_to_nonexistent_preserving
atf_add_test_case copy_self
atf_add_test_case copy_self_safe
atf_add_test_case copy_self_comparing

Modified: head/usr.bin/xinstall/xinstall.c
==
--- head/usr.bin/xinstall/xinstall.cThu Jun  9 21:59:11 2016
(r301764)
+++ head/usr.bin/xinstall/xinstall.cThu Jun  9 21:59:35 2016
(r301765)
@@ -131,7 +131,7 @@ static void do_symlink(const char *, con
 static voidmakelink(const char *, const char *, const struct stat *);
 static voidinstall(const char *, const char *, u_long, u_int);
 static voidinstall_dir(char *);
-static voidmetadata_log(const char *, const char *, struct timeval *,
+static voidmetadata_log(const char *, const char *, struct timespec *,
const char *, const char *, off_t);
 static int parseid(const char *, id_t *);
 static voidstrip(const char *);
@@ -722,7 +722,7 @@ static void
 install(const char *from_name, const char *to_name, u_long fset, u_int flags)
 {
struct stat from_sb, temp_sb, to_sb;
-   struct timeval tvb[2];
+   struct timespec tsb[2];
int devnull, files_match, from_fd, serrno, target;
int tempcopy, temp_fd, to_fd;
char backup[MAXPATHLEN], *p, pathbuf[MAXPATHLEN], tempfile[MAXPATHLEN];
@@ -857,11 +857,9 @@ install(const char *from_name, const cha
 * Need to preserve target file times, though.
 */
if (to_sb.st_nlink != 1) {
-   tvb[0].tv_sec = to_sb.st_atime;
-   tvb[0].tv_usec = 0;
-   tvb[1].tv_sec = to_sb.st_mtime;
-   tvb[1].tv_usec = 0;
-   (void)utimes(tempfile, tvb);
+   tsb[0] = to_sb.st_atim;
+   tsb[1] = to_sb.st_mtim;
+   (void)utimensat(AT_FDCWD, tempfile, tsb, 0);
} else {
files_match = 1;
(void)unlink(tempfile);
@@ -916,11 +914,9 @@ install(const char *from_name, const cha
 * Preserve the timestamp of the source file if necessary.
 */
if (dopreserve && !files_match && !devnull) {
-   tvb[0].tv_sec = from_sb.st_atime;
-   tvb[0].tv_usec = 0;
-   tvb[1].tv_sec = from_sb.st_mtime;
-   tvb[1].tv_usec = 0;
-   (void)utimes(to_name, tvb);
+   tsb[0] = from_sb.st_atim;
+   tsb[1] = from_sb.st_mtim;
+   (void)utimensat(AT_FDCWD, to_name, tsb, 0);
}
 
if (fstat(to_fd, _sb) == -1) {
@@ -989,7 +985,7 @@ install(const char *from_name, const cha
if (!devnull)
(void)close(from_fd);
 
-   metadata_log(to_name, "file", tvb, NULL, digestresult, to_sb.st_size);
+   metadata_log(to_name, "file", tsb, NULL, digestresult, to_sb.st_size);
free(digestresult);
 }
 
@@ -1301,7 +1297,7 @@ again:
  * or to allow integrity checks to be performed.
  */
 static void
-metadata_log(const char *path, const char *type, struct timeval *tv,
+metadata_log(const char *path, const char *type, struct timespec *ts,
const char *slink, const char *digestresult, off_t size)
 {
static const char extra[] = { ' ', '\t', '\n', '\\', '#', '\0' };
@@ -1355,9 +1351,9 @@ metadata_log(const char *path, const cha

svn commit: r301764 - head/sys/kern

2016-06-09 Thread Jamie Gritton
Author: jamie
Date: Thu Jun  9 21:59:11 2016
New Revision: 301764
URL: https://svnweb.freebsd.org/changeset/base/301764

Log:
  Fix a vnode leak when giving a child jail a too-long path when
  debug.disablefullpath=1.

Modified:
  head/sys/kern/kern_jail.c

Modified: head/sys/kern/kern_jail.c
==
--- head/sys/kern/kern_jail.c   Thu Jun  9 21:57:34 2016(r301763)
+++ head/sys/kern/kern_jail.c   Thu Jun  9 21:59:11 2016(r301764)
@@ -1010,6 +1010,7 @@ kern_jail_set(struct thread *td, struct 
if (len + (path[0] == '/' && strcmp(mypr->pr_path, "/")
? strlen(mypr->pr_path) : 0) > MAXPATHLEN) {
error = ENAMETOOLONG;
+   vrele(root);
goto done_free;
}
}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301763 - in head: . tools/build

2016-06-09 Thread Jilles Tjoelker
Author: jilles
Date: Thu Jun  9 21:57:34 2016
New Revision: 301763
URL: https://svnweb.freebsd.org/changeset/base/301763

Log:
  build: Add legacy support for futimens() and utimensat().
  
  In order to allow using utimensat() in install(1), add futimens() and
  utimensat() to -legacy.
  
  The files futimens.c and utimensat.c are modified copies of the files under
  lib/libc/sys/ since the libc versions use symbols that do not exist in the
  libc on the build system (sys_futimens and sys_utimensat) . I expect the
  next non-sweeping change to both sets of files to be to delete them, anyway.
  
  This will allow reverting r299942 (which is a revert of r299850) enabling
  nanosecond timestamps in install(1).
  
  Reviewed by:  bdrewery

Added:
  head/tools/build/futimens.c
 - copied, changed from r301311, head/lib/libc/sys/futimens.c
  head/tools/build/stat.h   (contents, props changed)
  head/tools/build/utimensat.c
 - copied, changed from r301311, head/lib/libc/sys/utimensat.c
Modified:
  head/Makefile.inc1
  head/tools/build/Makefile

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Thu Jun  9 21:19:46 2016(r301762)
+++ head/Makefile.inc1  Thu Jun  9 21:57:34 2016(r301763)
@@ -646,6 +646,8 @@ _worldtmp: .PHONY
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.groff.dist \
-p ${WORLDTMP}/legacy/usr >/dev/null
 .endif
+   mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
+   -p ${WORLDTMP}/legacy/usr/include >/dev/null
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
-p ${WORLDTMP}/usr >/dev/null
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \

Modified: head/tools/build/Makefile
==
--- head/tools/build/Makefile   Thu Jun  9 21:19:46 2016(r301762)
+++ head/tools/build/Makefile   Thu Jun  9 21:57:34 2016(r301763)
@@ -4,9 +4,11 @@
 
 LIB=   egacy
 SRC=
-INCSGROUPS=INCS
+INCSGROUPS=INCS SYSINCS
 INCS=
 
+SYSINCSDIR=${INCLUDEDIR}/sys
+
 BOOTSTRAPPING?=0
 
 _WITH_PWCACHEDB!= grep -c pwcache_groupdb /usr/include/grp.h || true
@@ -33,6 +35,12 @@ SRCS+=   reallocarray.c
 CFLAGS+=   -I${.CURDIR}/../../lib/libc/include
 .endif
 
+_WITH_UTIMENS!= grep -c utimensat /usr/include/sys/stat.h || true
+.if ${_WITH_UTIMENS} == 0
+SYSINCS+=  stat.h
+SRCS+= futimens.c utimensat.c
+.endif
+
 .if empty(SRCS)
 SRCS=  dummy.c
 .endif

Copied and modified: head/tools/build/futimens.c (from r301311, 
head/lib/libc/sys/futimens.c)
==
--- head/lib/libc/sys/futimens.cSat Jun  4 10:19:07 2016
(r301311, copy source)
+++ head/tools/build/futimens.c Thu Jun  9 21:57:34 2016(r301763)
@@ -27,15 +27,16 @@
 #include 
 __FBSDID("$FreeBSD$");
 
-#include "namespace.h"
 #include 
 
 #include 
 #include 
 #include 
-#include "un-namespace.h"
 
-#include "libc_private.h"
+#ifndefUTIME_NOW
+#defineUTIME_NOW   -1
+#defineUTIME_OMIT  -2
+#endif
 
 int
 futimens(int fd, const struct timespec times[2])
@@ -44,11 +45,6 @@ futimens(int fd, const struct timespec t
struct stat sb;
int osreldate;
 
-   osreldate = __getosreldate();
-   if (osreldate >= 1100056 ||
-   (osreldate >= 1002506 && osreldate < 110))
-   return (__sys_futimens(fd, times));
-
if (times == NULL || (times[0].tv_nsec == UTIME_NOW &&
times[1].tv_nsec == UTIME_NOW))
tvp = NULL;
@@ -75,7 +71,7 @@ futimens(int fd, const struct timespec t
tvp = tv;
if (times[0].tv_nsec == UTIME_OMIT ||
times[1].tv_nsec == UTIME_OMIT) {
-   if (_fstat(fd, ) == -1)
+   if (fstat(fd, ) == -1)
return (-1);
if (times[0].tv_nsec == UTIME_OMIT) {
tv[0].tv_sec = sb.st_atim.tv_sec;

Added: head/tools/build/stat.h
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/build/stat.h Thu Jun  9 21:57:34 2016(r301763)
@@ -0,0 +1,46 @@
+/*-
+ * Copyright (c) 2016 Jilles Tjoelker 
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other 

svn commit: r301762 - head/sys/dev/urtwn

2016-06-09 Thread Andriy Voskoboinyk
Author: avos
Date: Thu Jun  9 21:19:46 2016
New Revision: 301762
URL: https://svnweb.freebsd.org/changeset/base/301762

Log:
  urtwn: reinstall group keys on every device startup.
  
  Since key table is cleared on every device shutdown,
  static WEP keys (which are set only once) need to be
  reinstalled manually every time when device starts running.
  
  Tested with RTL8188EU, STA (all ciphers) / IBSS (WPA-none) modes.

Modified:
  head/sys/dev/urtwn/if_urtwn.c
  head/sys/dev/urtwn/if_urtwnvar.h

Modified: head/sys/dev/urtwn/if_urtwn.c
==
--- head/sys/dev/urtwn/if_urtwn.c   Thu Jun  9 20:49:26 2016
(r301761)
+++ head/sys/dev/urtwn/if_urtwn.c   Thu Jun  9 21:19:46 2016
(r301762)
@@ -373,6 +373,8 @@ static void urtwn_set_chan(struct urtwn
 static voidurtwn_iq_calib(struct urtwn_softc *);
 static voidurtwn_lc_calib(struct urtwn_softc *);
 static voidurtwn_temp_calib(struct urtwn_softc *);
+static voidurtwn_setup_static_keys(struct urtwn_softc *,
+   struct urtwn_vap *);
 static int urtwn_init(struct urtwn_softc *);
 static voidurtwn_stop(struct urtwn_softc *);
 static voidurtwn_abort_xfers(struct urtwn_softc *);
@@ -2340,12 +2342,28 @@ static int
 urtwn_key_set(struct ieee80211vap *vap, const struct ieee80211_key *k)
 {
struct urtwn_softc *sc = vap->iv_ic->ic_softc;
+   struct urtwn_vap *uvp = URTWN_VAP(vap);
 
if (k->wk_flags & IEEE80211_KEY_SWCRYPT) {
/* Not for us. */
return (1);
}
 
+   if (>iv_nw_keys[0] <= k &&
+   k < >iv_nw_keys[IEEE80211_WEP_NKID]) {
+   URTWN_LOCK(sc);
+   uvp->keys[k->wk_keyix] = k;
+   if ((sc->sc_flags & URTWN_RUNNING) == 0) {
+   /*
+* The device was not started;
+* the key will be installed later.
+*/
+   URTWN_UNLOCK(sc);
+   return (1);
+   }
+   URTWN_UNLOCK(sc);
+   }
+
return (!urtwn_cmd_sleepable(sc, k, sizeof(*k), urtwn_key_set_cb));
 }
 
@@ -2353,12 +2371,25 @@ static int
 urtwn_key_delete(struct ieee80211vap *vap, const struct ieee80211_key *k)
 {
struct urtwn_softc *sc = vap->iv_ic->ic_softc;
+   struct urtwn_vap *uvp = URTWN_VAP(vap);
 
if (k->wk_flags & IEEE80211_KEY_SWCRYPT) {
/* Not for us. */
return (1);
}
 
+   if (>iv_nw_keys[0] <= k &&
+   k < >iv_nw_keys[IEEE80211_WEP_NKID]) {
+   URTWN_LOCK(sc);  
+   uvp->keys[k->wk_keyix] = NULL;
+   if ((sc->sc_flags & URTWN_RUNNING) == 0) {
+   /* All keys are removed on device reset. */
+   URTWN_UNLOCK(sc);
+   return (1);
+   }
+   URTWN_UNLOCK(sc);
+   }
+
return (!urtwn_cmd_sleepable(sc, k, sizeof(*k), urtwn_key_del_cb));
 }
 
@@ -5230,6 +5261,20 @@ urtwn_temp_calib(struct urtwn_softc *sc)
}
 }
 
+static void
+urtwn_setup_static_keys(struct urtwn_softc *sc, struct urtwn_vap *uvp)
+{
+   int i;
+
+   for (i = 0; i < IEEE80211_WEP_NKID; i++) {
+   const struct ieee80211_key *k = uvp->keys[i];
+   if (k != NULL) {
+   urtwn_cmd_sleepable(sc, k, sizeof(*k),
+   urtwn_key_set_cb);
+   }
+   }
+}
+
 static int
 urtwn_init(struct urtwn_softc *sc)
 {
@@ -5418,12 +5463,6 @@ urtwn_init(struct urtwn_softc *sc)
R92C_SECCFG_TXENC_ENA | R92C_SECCFG_RXDEC_ENA |
R92C_SECCFG_TXBCKEY_DEF | R92C_SECCFG_RXBCKEY_DEF);
 
-   /*
-* Install static keys (if any).
-* Must be called after urtwn_cam_init().
-*/
-   ieee80211_runtask(ic, >cmdq_task);
-
/* Enable hardware sequence numbering. */
urtwn_write_1(sc, R92C_HWSEQ_CTRL, R92C_TX_QUEUE_ALL);
 
@@ -5459,6 +5498,13 @@ urtwn_init(struct urtwn_softc *sc)
 
sc->sc_flags |= URTWN_RUNNING;
 
+   /*
+* Install static keys (if any).
+* Must be called after urtwn_cam_init().
+*/
+   if (vap != NULL)
+   urtwn_setup_static_keys(sc, URTWN_VAP(vap));
+
callout_reset(>sc_watchdog_ch, hz, urtwn_watchdog, sc);
 fail:
if (usb_err != USB_ERR_NORMAL_COMPLETION)

Modified: head/sys/dev/urtwn/if_urtwnvar.h
==
--- head/sys/dev/urtwn/if_urtwnvar.hThu Jun  9 20:49:26 2016
(r301761)
+++ head/sys/dev/urtwn/if_urtwnvar.hThu Jun  9 21:19:46 2016
(r301762)
@@ -107,6 +107,8 @@ struct urtwn_vap {
struct mbuf *bcn_mbuf;
struct task 

svn commit: r301761 - head/lib/msun/src

2016-06-09 Thread Edward Tomasz Napierala
Author: trasz
Date: Thu Jun  9 20:49:26 2016
New Revision: 301761
URL: https://svnweb.freebsd.org/changeset/base/301761

Log:
  Fix frexpl() declaration to not include the field name.
  
  MFC after:1 month

Modified:
  head/lib/msun/src/math.h

Modified: head/lib/msun/src/math.h
==
--- head/lib/msun/src/math.hThu Jun  9 20:43:14 2016(r301760)
+++ head/lib/msun/src/math.hThu Jun  9 20:49:26 2016(r301761)
@@ -461,7 +461,7 @@ long double fmal(long double, long doubl
 long doublefmaxl(long double, long double) __pure2;
 long doublefminl(long double, long double) __pure2;
 long doublefmodl(long double, long double);
-long doublefrexpl(long double value, int *); /* fundamentally !__pure2 */
+long doublefrexpl(long double, int *); /* fundamentally !__pure2 */
 long doublehypotl(long double, long double);
 intilogbl(long double) __pure2;
 long doubleldexpl(long double, int);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301760 - head/sys/kern

2016-06-09 Thread Jamie Gritton
Author: jamie
Date: Thu Jun  9 20:43:14 2016
New Revision: 301760
URL: https://svnweb.freebsd.org/changeset/base/301760

Log:
  Re-order some jail parameter reading to prevent a vnode leak.

Modified:
  head/sys/kern/kern_jail.c

Modified: head/sys/kern/kern_jail.c
==
--- head/sys/kern/kern_jail.c   Thu Jun  9 20:40:12 2016(r301759)
+++ head/sys/kern/kern_jail.c   Thu Jun  9 20:43:14 2016(r301760)
@@ -920,6 +920,46 @@ kern_jail_set(struct thread *td, struct 
}
 #endif
 
+   error = vfs_getopt(opts, "osrelease", (void **), );
+   if (error == ENOENT)
+   osrelstr = NULL;
+   else if (error != 0)
+   goto done_free;
+   else {
+   if (flags & JAIL_UPDATE) {
+   error = EINVAL;
+   vfs_opterror(opts,
+   "osrelease cannot be changed after creation");
+   goto done_errmsg;
+   }
+   if (len == 0 || len >= OSRELEASELEN) {
+   error = EINVAL;
+   vfs_opterror(opts,
+   "osrelease string must be 1-%d bytes long",
+   OSRELEASELEN - 1);
+   goto done_errmsg;
+   }
+   }
+
+   error = vfs_copyopt(opts, "osreldate", , sizeof(osreldt));
+   if (error == ENOENT)
+   osreldt = 0;
+   else if (error != 0)
+   goto done_free;
+   else {
+   if (flags & JAIL_UPDATE) {
+   error = EINVAL;
+   vfs_opterror(opts,
+   "osreldate cannot be changed after creation");
+   goto done_errmsg;
+   }
+   if (osreldt == 0) {
+   error = EINVAL;
+   vfs_opterror(opts, "osreldate cannot be 0");
+   goto done_errmsg;
+   }
+   }
+
fullpath_disabled = 0;
root = NULL;
error = vfs_getopt(opts, "path", (void **), );
@@ -975,46 +1015,6 @@ kern_jail_set(struct thread *td, struct 
}
}
 
-   error = vfs_getopt(opts, "osrelease", (void **), );
-   if (error == ENOENT)
-   osrelstr = NULL;
-   else if (error != 0)
-   goto done_free;
-   else {
-   if (flags & JAIL_UPDATE) {
-   error = EINVAL;
-   vfs_opterror(opts,
-   "osrelease cannot be changed after creation");
-   goto done_errmsg;
-   }
-   if (len == 0 || len >= OSRELEASELEN) {
-   error = EINVAL;
-   vfs_opterror(opts,
-   "osrelease string must be 1-%d bytes long",
-   OSRELEASELEN - 1);
-   goto done_errmsg;
-   }
-   }
-
-   error = vfs_copyopt(opts, "osreldate", , sizeof(osreldt));
-   if (error == ENOENT)
-   osreldt = 0;
-   else if (error != 0)
-   goto done_free;
-   else {
-   if (flags & JAIL_UPDATE) {
-   error = EINVAL;
-   vfs_opterror(opts,
-   "osreldate cannot be changed after creation");
-   goto done_errmsg;
-   }
-   if (osreldt == 0) {
-   error = EINVAL;
-   vfs_opterror(opts, "osreldate cannot be 0");
-   goto done_errmsg;
-   }
-   }
-
/*
 * Find the specified jail, or at least its parent.
 * This abuses the file error codes ENOENT and EEXIST.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301759 - head/contrib/ldns-host

2016-06-09 Thread Dag-Erling Smørgrav
Author: des
Date: Thu Jun  9 20:40:12 2016
New Revision: 301759
URL: https://svnweb.freebsd.org/changeset/base/301759

Log:
  Update to latest upstream version
  
  PR:   209177
  Reported by:  Vitaly Magerya
  MFC after:1 week

Modified:
  head/contrib/ldns-host/Makefile
  head/contrib/ldns-host/ldns-host.1
  head/contrib/ldns-host/ldns-host.c
Directory Properties:
  head/contrib/ldns-host/   (props changed)

Modified: head/contrib/ldns-host/Makefile
==
--- head/contrib/ldns-host/Makefile Thu Jun  9 20:39:57 2016
(r301758)
+++ head/contrib/ldns-host/Makefile Thu Jun  9 20:40:12 2016
(r301759)
@@ -6,11 +6,11 @@ LOCALBASE?=/usr/local
 PREFIX?=${LOCALBASE}
 MANDIR?=${PREFIX}/man
 
-XCFLAGS=${CFLAGS} -I${LOCALBASE}/include
+XCFLAGS=${CFLAGS} -I${LOCALBASE}/include -std=c99 -Wall -Wextra -pedantic
 XLDFLAGS=${LDFLAGS} -L${LOCALBASE}/lib -lldns
 
 ${PROG}: ${SRC}
-   ${CC} -o $@ ${XCFLAGS} ${XLDFLAGS} ${SRC}
+   ${CC} -o $@ ${XCFLAGS} ${SRC} ${XLDFLAGS}
 
 clean:
rm -f ${PROG}

Modified: head/contrib/ldns-host/ldns-host.1
==
--- head/contrib/ldns-host/ldns-host.1  Thu Jun  9 20:39:57 2016
(r301758)
+++ head/contrib/ldns-host/ldns-host.1  Thu Jun  9 20:40:12 2016
(r301759)
@@ -236,9 +236,6 @@ commands, while
 .Sq host
 from BIND9 uses whatever command was specified last.
 .It
-Multi-packet zone transfers are not supported; only the first
-response packet is printed.
-.It
 .Sq Pseudosection TSIG
 is missing from verbose packet output.
 .El

Modified: head/contrib/ldns-host/ldns-host.c
==
--- head/contrib/ldns-host/ldns-host.c  Thu Jun  9 20:39:57 2016
(r301758)
+++ head/contrib/ldns-host/ldns-host.c  Thu Jun  9 20:40:12 2016
(r301759)
@@ -7,16 +7,14 @@
  * without any warranty.
  */
 
-#include 
-
+#include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
 
-#include 
-
 /* General utilities.
  */
 
@@ -159,11 +157,108 @@ memerr:
 }
 
 static ldns_status
+ldns_tcp_start(ldns_resolver *res, ldns_pkt *qpkt, int nameserver) {
+/* This routine is based on ldns_axfr_start, with the major
+ * difference in that it takes a query packet explicitly.
+ */
+struct sockaddr_storage *ns = NULL;
+size_t ns_len = 0;
+ldns_buffer *qbuf = NULL;
+ldns_status status;
+
+ns = ldns_rdf2native_sockaddr_storage(
+res->_nameservers[nameserver], ldns_resolver_port(res), _len);
+if (ns == NULL) {
+status = LDNS_STATUS_MEM_ERR;
+goto error;
+}
+
+res->_socket = ldns_tcp_connect(
+ns, (socklen_t)ns_len, ldns_resolver_timeout(res));
+if (res->_socket <= 0) {
+status = LDNS_STATUS_ADDRESS_ERR;
+goto error;
+}
+
+qbuf = ldns_buffer_new(LDNS_MAX_PACKETLEN);
+if (qbuf == NULL) {
+status = LDNS_STATUS_MEM_ERR;
+goto error;
+}
+
+status = ldns_pkt2buffer_wire(qbuf, qpkt);
+if (status != LDNS_STATUS_OK)
+goto error;
+
+if (ldns_tcp_send_query(qbuf, res->_socket, ns, (socklen_t)ns_len) == 0) {
+status = LDNS_STATUS_NETWORK_ERR;
+goto error;
+}
+
+ldns_buffer_free(qbuf);
+free(ns);
+return LDNS_STATUS_OK;
+ 
+error:
+ldns_buffer_free(qbuf);
+free(ns);
+if (res->_socket > 0) {
+close(res->_socket);
+res->_socket = 0;
+}
+return status;
+}
+
+static ldns_status
+ldns_tcp_read(ldns_pkt **answer, ldns_resolver *res) {
+ldns_status status;
+struct timeval t1, t2;
+uint8_t *data;
+size_t size;
+
+if (res->_socket <= 0)
+return LDNS_STATUS_ERR;
+
+gettimeofday(, NULL);
+data = ldns_tcp_read_wire_timeout(
+res->_socket, , ldns_resolver_timeout(res));
+if (data == NULL)
+goto error;
+
+status = ldns_wire2pkt(answer, data, size);
+free(data);
+if (status != LDNS_STATUS_OK)
+goto error;
+
+gettimeofday(, NULL);
+ldns_pkt_set_querytime(*answer,
+(uint32_t)((t2.tv_sec - t1.tv_sec)*1000) +
+(t2.tv_usec - t1.tv_usec)/1000);
+ldns_pkt_set_timestamp(*answer, t2);
+return status;
+
+error:
+close(res->_socket);
+res->_socket = 0;
+return LDNS_STATUS_ERR;
+}
+
+static void
+ldns_tcp_close(ldns_resolver *res) {
+if (res->_socket > 0) {
+close(res->_socket);
+res->_socket = 0;
+}
+}
+
+static ldns_status
 ldns_resolver_send_to(ldns_pkt **answer, ldns_resolver *res,
 const ldns_rdf *name, ldns_rr_type t, ldns_rr_class c,
-uint16_t flags, uint32_t ixfr_serial, int nameserver) {
-ldns_status status;
+uint16_t flags, uint32_t ixfr_serial, int nameserver,
+bool close_tcp) {
+ldns_status status = LDNS_STATUS_OK;
 ldns_pkt *qpkt;
+struct timeval 

svn commit: r301758 - head/sys/kern

2016-06-09 Thread Jamie Gritton
Author: jamie
Date: Thu Jun  9 20:39:57 2016
New Revision: 301758
URL: https://svnweb.freebsd.org/changeset/base/301758

Log:
  Clean up some logic in jail error messages, replacing a missing test and
  a redundant test with a single correct test.

Modified:
  head/sys/kern/kern_jail.c

Modified: head/sys/kern/kern_jail.c
==
--- head/sys/kern/kern_jail.c   Thu Jun  9 20:23:30 2016(r301757)
+++ head/sys/kern/kern_jail.c   Thu Jun  9 20:39:57 2016(r301758)
@@ -1929,19 +1929,17 @@ kern_jail_set(struct thread *td, struct 
vrele(root);
  done_errmsg:
if (error) {
-   vfs_getopt(opts, "errmsg", (void **), _len);
-   if (errmsg_len > 0) {
+   if (vfs_getopt(opts, "errmsg", (void **),
+   _len) == 0 && errmsg_len > 0) {
errmsg_pos = 2 * vfs_getopt_pos(opts, "errmsg") + 1;
-   if (errmsg_pos > 0) {
-   if (optuio->uio_segflg == UIO_SYSSPACE)
-   bcopy(errmsg,
-  optuio->uio_iov[errmsg_pos].iov_base,
-  errmsg_len);
-   else
-   copyout(errmsg,
-  optuio->uio_iov[errmsg_pos].iov_base,
-  errmsg_len);
-   }
+   if (optuio->uio_segflg == UIO_SYSSPACE)
+   bcopy(errmsg,
+   optuio->uio_iov[errmsg_pos].iov_base,
+   errmsg_len);
+   else
+   copyout(errmsg,
+   optuio->uio_iov[errmsg_pos].iov_base,
+   errmsg_len);
}
}
  done_free:
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301757 - head/sys/kern

2016-06-09 Thread Mariusz Zaborski
Author: oshogbo
Date: Thu Jun  9 20:23:30 2016
New Revision: 301757
URL: https://svnweb.freebsd.org/changeset/base/301757

Log:
  Define tunable instead of using CTLFLAG_RWTUN flag with kern.corefile.
  
  The allproc_lock lock used in the sysctl_kern_corefile function is initialized
  in the procinit function which is called after setting sysctl values at boot.
  That means if we set kern.corefile at boot we will be trying to use
  lock with is uninitialized and machine will crash.
  
  If we define kern.corefile as tunable instead of using CTFLAG_RWTUN we will
  not call the sysctl_kern_corefile function and we will not use an 
uninitialized
  lock. When machine will boot then we will start using function depending on
  the lock.
  
  Reviewed by:  pjd

Modified:
  head/sys/kern/kern_sig.c

Modified: head/sys/kern/kern_sig.c
==
--- head/sys/kern/kern_sig.cThu Jun  9 20:05:19 2016(r301756)
+++ head/sys/kern/kern_sig.cThu Jun  9 20:23:30 2016(r301757)
@@ -3123,6 +3123,7 @@ static int compress_user_cores = 0;
 #definecorefilename_lock   allproc_lock
 
 static char corefilename[MAXPATHLEN] = {"%N.core"};
+TUNABLE_STR("kern.corefile", corefilename, sizeof(corefilename));
 
 static int
 sysctl_kern_corefile(SYSCTL_HANDLER_ARGS)
@@ -3136,7 +3137,7 @@ sysctl_kern_corefile(SYSCTL_HANDLER_ARGS
 
return (error);
 }
-SYSCTL_PROC(_kern, OID_AUTO, corefile, CTLTYPE_STRING | CTLFLAG_RWTUN |
+SYSCTL_PROC(_kern, OID_AUTO, corefile, CTLTYPE_STRING | CTLFLAG_RW |
 CTLFLAG_MPSAFE, 0, 0, sysctl_kern_corefile, "A",
 "Process corefile name format string");
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301756 - vendor/ldns-host/hg-20160501-0289cde234a0

2016-06-09 Thread Dag-Erling Smørgrav
Author: des
Date: Thu Jun  9 20:05:19 2016
New Revision: 301756
URL: https://svnweb.freebsd.org/changeset/base/301756

Log:
  Tag 20160501-0289cde234a0

Added:
  vendor/ldns-host/hg-20160501-0289cde234a0/
 - copied from r301755, vendor/ldns-host/dist/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301755 - vendor/ldns-host/dist

2016-06-09 Thread Dag-Erling Smørgrav
Author: des
Date: Thu Jun  9 20:02:31 2016
New Revision: 301755
URL: https://svnweb.freebsd.org/changeset/base/301755

Log:
  upstream hg 0289cde234a0

Modified:
  vendor/ldns-host/dist/Makefile
  vendor/ldns-host/dist/ldns-host.1
  vendor/ldns-host/dist/ldns-host.c

Modified: vendor/ldns-host/dist/Makefile
==
--- vendor/ldns-host/dist/Makefile  Thu Jun  9 19:44:47 2016
(r301754)
+++ vendor/ldns-host/dist/Makefile  Thu Jun  9 20:02:31 2016
(r301755)
@@ -6,11 +6,11 @@ LOCALBASE?=/usr/local
 PREFIX?=${LOCALBASE}
 MANDIR?=${PREFIX}/man
 
-XCFLAGS=${CFLAGS} -I${LOCALBASE}/include
+XCFLAGS=${CFLAGS} -I${LOCALBASE}/include -std=c99 -Wall -Wextra -pedantic
 XLDFLAGS=${LDFLAGS} -L${LOCALBASE}/lib -lldns
 
 ${PROG}: ${SRC}
-   ${CC} -o $@ ${XCFLAGS} ${XLDFLAGS} ${SRC}
+   ${CC} -o $@ ${XCFLAGS} ${SRC} ${XLDFLAGS}
 
 clean:
rm -f ${PROG}

Modified: vendor/ldns-host/dist/ldns-host.1
==
--- vendor/ldns-host/dist/ldns-host.1   Thu Jun  9 19:44:47 2016
(r301754)
+++ vendor/ldns-host/dist/ldns-host.1   Thu Jun  9 20:02:31 2016
(r301755)
@@ -236,9 +236,6 @@ commands, while
 .Sq host
 from BIND9 uses whatever command was specified last.
 .It
-Multi-packet zone transfers are not supported; only the first
-response packet is printed.
-.It
 .Sq Pseudosection TSIG
 is missing from verbose packet output.
 .El

Modified: vendor/ldns-host/dist/ldns-host.c
==
--- vendor/ldns-host/dist/ldns-host.c   Thu Jun  9 19:44:47 2016
(r301754)
+++ vendor/ldns-host/dist/ldns-host.c   Thu Jun  9 20:02:31 2016
(r301755)
@@ -10,6 +10,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -156,11 +157,108 @@ memerr:
 }
 
 static ldns_status
+ldns_tcp_start(ldns_resolver *res, ldns_pkt *qpkt, int nameserver) {
+/* This routine is based on ldns_axfr_start, with the major
+ * difference in that it takes a query packet explicitly.
+ */
+struct sockaddr_storage *ns = NULL;
+size_t ns_len = 0;
+ldns_buffer *qbuf = NULL;
+ldns_status status;
+
+ns = ldns_rdf2native_sockaddr_storage(
+res->_nameservers[nameserver], ldns_resolver_port(res), _len);
+if (ns == NULL) {
+status = LDNS_STATUS_MEM_ERR;
+goto error;
+}
+
+res->_socket = ldns_tcp_connect(
+ns, (socklen_t)ns_len, ldns_resolver_timeout(res));
+if (res->_socket <= 0) {
+status = LDNS_STATUS_ADDRESS_ERR;
+goto error;
+}
+
+qbuf = ldns_buffer_new(LDNS_MAX_PACKETLEN);
+if (qbuf == NULL) {
+status = LDNS_STATUS_MEM_ERR;
+goto error;
+}
+
+status = ldns_pkt2buffer_wire(qbuf, qpkt);
+if (status != LDNS_STATUS_OK)
+goto error;
+
+if (ldns_tcp_send_query(qbuf, res->_socket, ns, (socklen_t)ns_len) == 0) {
+status = LDNS_STATUS_NETWORK_ERR;
+goto error;
+}
+
+ldns_buffer_free(qbuf);
+free(ns);
+return LDNS_STATUS_OK;
+ 
+error:
+ldns_buffer_free(qbuf);
+free(ns);
+if (res->_socket > 0) {
+close(res->_socket);
+res->_socket = 0;
+}
+return status;
+}
+
+static ldns_status
+ldns_tcp_read(ldns_pkt **answer, ldns_resolver *res) {
+ldns_status status;
+struct timeval t1, t2;
+uint8_t *data;
+size_t size;
+
+if (res->_socket <= 0)
+return LDNS_STATUS_ERR;
+
+gettimeofday(, NULL);
+data = ldns_tcp_read_wire_timeout(
+res->_socket, , ldns_resolver_timeout(res));
+if (data == NULL)
+goto error;
+
+status = ldns_wire2pkt(answer, data, size);
+free(data);
+if (status != LDNS_STATUS_OK)
+goto error;
+
+gettimeofday(, NULL);
+ldns_pkt_set_querytime(*answer,
+(uint32_t)((t2.tv_sec - t1.tv_sec)*1000) +
+(t2.tv_usec - t1.tv_usec)/1000);
+ldns_pkt_set_timestamp(*answer, t2);
+return status;
+
+error:
+close(res->_socket);
+res->_socket = 0;
+return LDNS_STATUS_ERR;
+}
+
+static void
+ldns_tcp_close(ldns_resolver *res) {
+if (res->_socket > 0) {
+close(res->_socket);
+res->_socket = 0;
+}
+}
+
+static ldns_status
 ldns_resolver_send_to(ldns_pkt **answer, ldns_resolver *res,
 const ldns_rdf *name, ldns_rr_type t, ldns_rr_class c,
-uint16_t flags, uint32_t ixfr_serial, int nameserver) {
-ldns_status status;
+uint16_t flags, uint32_t ixfr_serial, int nameserver,
+bool close_tcp) {
+ldns_status status = LDNS_STATUS_OK;
 ldns_pkt *qpkt;
+struct timeval now;
 
 int nscnt = ldns_resolver_nameserver_count(res);
 ldns_rdf **ns = ldns_resolver_nameservers(res);
@@ -170,12 +268,38 @@ ldns_resolver_send_to(ldns_pkt **answer,
 ldns_resolver_set_rtt(res, [nameserver]);
 

svn commit: r301754 - head/lib/libc/rpc

2016-06-09 Thread Pedro F. Giffuni
Author: pfg
Date: Thu Jun  9 19:44:47 2016
New Revision: 301754
URL: https://svnweb.freebsd.org/changeset/base/301754

Log:
  libc/rpc: Make use of some xdr_* macros.
  
  xdr_rpcprog and xdr_rpcvers were broken in older versions of FreeBSD
  but were fixed in r296394. Give them some use hoping they help make
  the code somewhat more readable.

Modified:
  head/lib/libc/rpc/rpc_prot.c
  head/lib/libc/rpc/rpcb_prot.c

Modified: head/lib/libc/rpc/rpc_prot.c
==
--- head/lib/libc/rpc/rpc_prot.cThu Jun  9 19:12:51 2016
(r301753)
+++ head/lib/libc/rpc/rpc_prot.cThu Jun  9 19:44:47 2016
(r301754)
@@ -217,8 +217,8 @@ xdr_callhdr(XDR *xdrs, struct rpc_msg *c
(xdrs->x_op == XDR_ENCODE) &&
xdr_u_int32_t(xdrs, &(cmsg->rm_xid)) &&
xdr_enum(xdrs, (enum_t *) prm_direction) &&
-   xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_rpcvers)) &&
-   xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_prog)) )
+   xdr_rpcvers(xdrs, &(cmsg->rm_call.cb_rpcvers)) &&
+   xdr_rpcprog(xdrs, &(cmsg->rm_call.cb_prog)) )
return (xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_vers)));
return (FALSE);
 }

Modified: head/lib/libc/rpc/rpcb_prot.c
==
--- head/lib/libc/rpc/rpcb_prot.c   Thu Jun  9 19:12:51 2016
(r301753)
+++ head/lib/libc/rpc/rpcb_prot.c   Thu Jun  9 19:44:47 2016
(r301754)
@@ -56,10 +56,10 @@ __FBSDID("$FreeBSD$");
 bool_t
 xdr_rpcb(XDR *xdrs, RPCB *objp)
 {
-   if (!xdr_u_int32_t(xdrs, >r_prog)) {
+   if (!xdr_rpcprog(xdrs, >r_prog)) {
return (FALSE);
}
-   if (!xdr_u_int32_t(xdrs, >r_vers)) {
+   if (!xdr_rpcvers(xdrs, >r_vers)) {
return (FALSE);
}
if (!xdr_string(xdrs, >r_netid, (u_int)~0)) {
@@ -243,13 +243,13 @@ xdr_rpcb_rmtcallargs(XDR *xdrs, struct r
 
buf = XDR_INLINE(xdrs, 3 * BYTES_PER_XDR_UNIT);
if (buf == NULL) {
-   if (!xdr_u_int32_t(xdrs, >prog)) {
+   if (!xdr_rpcprog(xdrs, >prog)) {
return (FALSE);
}
-   if (!xdr_u_int32_t(xdrs, >vers)) {
+   if (!xdr_rpcvers(xdrs, >vers)) {
return (FALSE);
}
-   if (!xdr_u_int32_t(xdrs, >proc)) {
+   if (!xdr_rpcproc(xdrs, >proc)) {
return (FALSE);
}
} else {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301753 - head/contrib/netbsd-tests/lib/libc/db

2016-06-09 Thread Garrett Cooper
Author: ngie
Date: Thu Jun  9 19:12:51 2016
New Revision: 301753
URL: https://svnweb.freebsd.org/changeset/base/301753

Log:
  Fix up r274061
  
  Detect /usr/share/dict/words the "right way" by using require.files instead of
  the hacked up attempt in the dict(..) function, which didn't work properly on
  systems where MK_DICT == no.
  
  MFC after: 1 week
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/contrib/netbsd-tests/lib/libc/db/t_db.sh

Modified: head/contrib/netbsd-tests/lib/libc/db/t_db.sh
==
--- head/contrib/netbsd-tests/lib/libc/db/t_db.sh   Thu Jun  9 18:35:37 
2016(r301752)
+++ head/contrib/netbsd-tests/lib/libc/db/t_db.sh   Thu Jun  9 19:12:51 
2016(r301753)
@@ -37,6 +37,7 @@ dict()
elif [ -f /usr/dict/words ]; then
echo /usr/dict/words
else
+   echo ""
atf_fail "no dictionary found"
fi
 }
@@ -44,12 +45,7 @@ dict()
 # Begin FreeBSD
 dict()
 {
-   if [ -f /usr/share/dict/words ]; then
-   echo /usr/share/dict/words
-   else
-   echo /nonexistent
-   atf_skip "Test requires dict/words"
-   fi
+   echo /usr/share/dict/words
 }
 # End FreeBSD
 
@@ -62,6 +58,9 @@ small_btree_head()
"Checks btree database using small keys and small data" \
"pairs: takes the first hundred entries in the dictionary," \
"and makes them be key/data pairs."
+   # Begin FreeBSD
+   atf_set "require.files" /usr/share/dict/words
+   # End FreeBSD
 }
 small_btree_body()
 {
@@ -88,6 +87,9 @@ small_hash_head()
"Checks hash database using small keys and small data" \
"pairs: takes the first hundred entries in the dictionary," \
"and makes them be key/data pairs."
+   # Begin FreeBSD
+   atf_set "require.files" /usr/share/dict/words
+   # End FreeBSD
 }
 small_hash_body()
 {
@@ -114,6 +116,9 @@ small_recno_head()
"Checks recno database using small keys and small data" \
"pairs: takes the first hundred entries in the dictionary," \
"and makes them be key/data pairs."
+   # Begin FreeBSD
+   atf_set "require.files" /usr/share/dict/words
+   # End FreeBSD
 }
 small_recno_body()
 {
@@ -138,6 +143,9 @@ medium_btree_head()
"Checks btree database using small keys and medium" \
"data pairs: takes the first 200 entries in the" \
"dictionary, and gives them each a medium size data entry."
+   # Begin FreeBSD
+   atf_set "require.files" /usr/share/dict/words
+   # End FreeBSD
 }
 medium_btree_body()
 {
@@ -166,6 +174,9 @@ medium_hash_head()
"Checks hash database using small keys and medium" \
"data pairs: takes the first 200 entries in the" \
"dictionary, and gives them each a medium size data entry."
+   # Begin FreeBSD
+   atf_set "require.files" /usr/share/dict/words
+   # End FreeBSD
 }
 medium_hash_body()
 {
@@ -731,6 +742,9 @@ small_page_btree_head()
"reverses them, and gives them each a small size data" \
"entry. Uses a small page size to make sure the btree" \
"split code gets hammered."
+   # Begin FreeBSD
+   atf_set "require.files" /usr/share/dict/words
+   # End FreeBSD
 }
 small_page_btree_body()
 {
@@ -784,6 +798,9 @@ atf_test_case byte_orders_btree
 byte_orders_btree_head()
 {
atf_set "descr" "Checks btree database using differing byte orders"
+   # Begin FreeBSD
+   atf_set "require.files" /usr/share/dict/words
+   # End FreeBSD
 }
 byte_orders_btree_body()
 {
@@ -816,6 +833,9 @@ bsize_ffactor_head()
atf_set "timeout" "480"
atf_set "descr" "Checks hash database with various" \
"bucketsizes and fill factors"
+   # Begin FreeBSD
+   atf_set "require.files" /usr/share/dict/words
+   # End FreeBSD
 }
 bsize_ffactor_body()
 {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r301752 - head/contrib/netbsd-tests/lib/libc/string

2016-06-09 Thread Ngie Cooper (yaneurabeya)

> On Jun 9, 2016, at 14:35, Garrett Cooper  wrote:
> 
> Author: ngie
> Date: Thu Jun  9 18:35:37 2016
> New Revision: 301752
> URL: https://svnweb.freebsd.org/changeset/base/301752
> 
> Log:
>  Update `goodResult` after recent changes made to the PRNG in libc
> 
>  The PRNG was changed in r300953/r300956, and subsequently, the numbers
>  generated have changed. This is expected ABI breakage per ache
> 
>  X-MFC with: r300953, r300956
>  Tested with: amd64, i386
>  Sponsored by: EMC / Isilon Storage Division

Forgot to add “PR: 210169”.
Thanks,
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r301752 - head/contrib/netbsd-tests/lib/libc/string

2016-06-09 Thread Garrett Cooper
Author: ngie
Date: Thu Jun  9 18:35:37 2016
New Revision: 301752
URL: https://svnweb.freebsd.org/changeset/base/301752

Log:
  Update `goodResult` after recent changes made to the PRNG in libc
  
  The PRNG was changed in r300953/r300956, and subsequently, the numbers
  generated have changed. This is expected ABI breakage per ache
  
  X-MFC with: r300953, r300956
  Tested with: amd64, i386
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/contrib/netbsd-tests/lib/libc/string/t_memcpy.c

Modified: head/contrib/netbsd-tests/lib/libc/string/t_memcpy.c
==
--- head/contrib/netbsd-tests/lib/libc/string/t_memcpy.cThu Jun  9 
18:27:41 2016(r301751)
+++ head/contrib/netbsd-tests/lib/libc/string/t_memcpy.cThu Jun  9 
18:35:37 2016(r301752)
@@ -54,7 +54,7 @@ char result[100];
 #ifdef __NetBSD__
 const char goodResult[] = "7b405d24bc03195474c70ddae9e1f8fb";
 #else
-const char goodResult[] = "217b4fbe456916bf62a2f85df752e4ab";
+const char goodResult[] = "5ab4443f0e3e058d94087d9f2a11ef5e";
 #endif
 
 static void
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r301751 - head/sys/kern

2016-06-09 Thread Ngie Cooper (yaneurabeya)

> On Jun 9, 2016, at 14:27, Conrad E. Meyer  wrote:
> 
> Author: cem
> Date: Thu Jun  9 18:27:41 2016
> New Revision: 301751
> URL: https://svnweb.freebsd.org/changeset/base/301751
> 
> Log:
>  Add DDB command "kldstat"
> 
>  It prints much the same information as kldstat(8) without any arguments.
> 
>  Suggested by:jhibbits
>  Sponsored by:EMC / Isilon Storage Division

Manpage?


signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r301751 - head/sys/kern

2016-06-09 Thread Conrad E. Meyer
Author: cem
Date: Thu Jun  9 18:27:41 2016
New Revision: 301751
URL: https://svnweb.freebsd.org/changeset/base/301751

Log:
  Add DDB command "kldstat"
  
  It prints much the same information as kldstat(8) without any arguments.
  
  Suggested by: jhibbits
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/kern/kern_linker.c

Modified: head/sys/kern/kern_linker.c
==
--- head/sys/kern/kern_linker.c Thu Jun  9 18:24:51 2016(r301750)
+++ head/sys/kern/kern_linker.c Thu Jun  9 18:27:41 2016(r301751)
@@ -54,6 +54,10 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#ifdef DDB
+#include 
+#endif
+
 #include 
 
 #include 
@@ -1256,6 +1260,23 @@ kern_kldstat(struct thread *td, int file
return (0);
 }
 
+#ifdef DDB
+DB_COMMAND(kldstat, db_kldstat)
+{
+   linker_file_t lf;
+
+#definePOINTER_WIDTH   ((int)(sizeof(void *) * 2 + 2))
+   db_printf("Id Refs Address%*c Size Name\n", POINTER_WIDTH - 7, ' ');
+#undef POINTER_WIDTH
+   TAILQ_FOREACH(lf, _files, link) {
+   if (db_pager_quit)
+   return;
+   db_printf("%2d %4d %p %-8zx %s\n", lf->id, lf->refs,
+   lf->address, lf->size, lf->filename);
+   }
+}
+#endif /* DDB */
+
 int
 sys_kldfirstmod(struct thread *td, struct kldfirstmod_args *uap)
 {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301750 - head/sys/kern

2016-06-09 Thread Conrad E. Meyer
Author: cem
Date: Thu Jun  9 18:24:51 2016
New Revision: 301750
URL: https://svnweb.freebsd.org/changeset/base/301750

Log:
  kvprintf: Pad %*c to width, like %*s
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/kern/subr_prf.c

Modified: head/sys/kern/subr_prf.c
==
--- head/sys/kern/subr_prf.cThu Jun  9 18:11:42 2016(r301749)
+++ head/sys/kern/subr_prf.cThu Jun  9 18:24:51 2016(r301750)
@@ -730,7 +730,15 @@ reswitch:  switch (ch = (u_char)*fmt++) {
PCHAR('>');
break;
case 'c':
+   width -= 1;
+
+   if (!ladjust && width > 0)
+   while (width--)
+   PCHAR(padc);
PCHAR(va_arg(ap, int));
+   if (ladjust && width > 0)
+   while (width--)
+   PCHAR(padc);
break;
case 'D':
up = va_arg(ap, u_char *);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301749 - head/contrib/netbsd-tests/lib/libc/string

2016-06-09 Thread Garrett Cooper
Author: ngie
Date: Thu Jun  9 18:11:42 2016
New Revision: 301749
URL: https://svnweb.freebsd.org/changeset/base/301749

Log:
  Add debug output to aid in determining why `goodResult` != `result`
  
  MFC after: 1 week
  PR: 210619 (for diagnosis)
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/contrib/netbsd-tests/lib/libc/string/t_memcpy.c

Modified: head/contrib/netbsd-tests/lib/libc/string/t_memcpy.c
==
--- head/contrib/netbsd-tests/lib/libc/string/t_memcpy.cThu Jun  9 
17:26:54 2016(r301748)
+++ head/contrib/netbsd-tests/lib/libc/string/t_memcpy.cThu Jun  9 
18:11:42 2016(r301749)
@@ -108,7 +108,12 @@ ATF_TC_BODY(memcpy_basic, tc)
if (i != j)
runTest(start[i], start[j]);
MD5End(mc, result);
+#ifdef __NetBSD__
ATF_REQUIRE_EQ(strcmp(result, goodResult), 0);
+#else
+   ATF_REQUIRE_EQ_MSG(strcmp(result, goodResult), 0, "%s != %s",
+   result, goodResult);
+#endif
 }
 
 ATF_TC(memccpy_simple);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301748 - head/share/man/man4

2016-06-09 Thread Andriy Voskoboinyk
Author: avos
Date: Thu Jun  9 17:26:54 2016
New Revision: 301748
URL: https://svnweb.freebsd.org/changeset/base/301748

Log:
  urtwn(4): refresh manpage.
  
  Mention URTWN_WITHOUT_UCODE option (r295871), hardware encryption support
  (r292175), IBSS (r290651) and HOSTAP (r290631) mode support;
  cleanup CAVEATS section (some 11n support was added in r297175 + add a
  note about current rate control issues).

Modified:
  head/share/man/man4/urtwn.4

Modified: head/share/man/man4/urtwn.4
==
--- head/share/man/man4/urtwn.4 Thu Jun  9 17:10:19 2016(r301747)
+++ head/share/man/man4/urtwn.4 Thu Jun  9 17:26:54 2016(r301748)
@@ -14,13 +14,15 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd October 15, 2015
+.Dd June 9, 2016
 .Dt URTWN 4
 .Os
 .Sh NAME
 .Nm urtwn
 .Nd Realtek RTL8188CU/RTL8188RU/RTL8188EU/RTL8192CU USB IEEE 802.11b/g/n 
wireless network device
 .Sh SYNOPSIS
+.Cd "options URTWN_WITHOUT_UCODE"
+.Pp
 To compile this driver into the kernel,
 place the following lines in your
 kernel configuration file:
@@ -39,13 +41,6 @@ module at boot time, place the following
 .Bd -literal -offset indent
 if_urtwn_load="YES"
 .Ed
-.Pp
-In both cases, place the following line in
-.Xr loader.conf 5
-to acknowledge the firmware license (see below):
-.Bd -literal -offset indent
-legal.realtek.license_ack=1
-.Ed
 .Sh DESCRIPTION
 The
 .Nm
@@ -64,15 +59,21 @@ The RTL8192CU is a highly integrated mul
 RF in a single chip.
 It operates in the 2GHz spectrum only.
 .Pp
-This driver requires the firmware built with the
-.Nm urtwnfw
-module to work.
-For the loaded firmware to be enabled for use the license at
-.Pa /usr/share/doc/legal/realtek.LICENSE
-must be agreed by adding the following line to
-.Xr loader.conf 5 :
+All chips have hardware support for  WEP, AES-CCM and TKIP encryption.
+.Pp
+The driver supports
+.Cm station ,
+.Cm adhoc ,
+.Cm hostap ,
+and
+.Cm monitor
+mode operation.
+Only one virtual interface may be configured at any time.
 .Pp
-.Dl "legal.realtek.license_ack=1"
+This driver may use the firmware built with the
+.Nm urtwnfw
+module for some additional features
+(when URTWN_WITHOUT_UCODE kernel option is not set).
 .Sh FILES
 .Bl -tag -width ".Pa /usr/share/doc/legal/realtek.LICENSE" -compact
 .It Pa /usr/share/doc/legal/realtek.LICENSE
@@ -117,6 +118,28 @@ Join a specific BSS network with 64-bit 
 ifconfig wlan create wlandev urtwn0 ssid my_net \e
 wepmode on wepkey 0x1234567890 weptxkey 1 up
 .Ed
+.Pp
+Create an IBSS network with 128-bit WEP encryption on the channel 4:
+.Bd -literal -offset indent
+ifconfig wlan0 create wlandev urtwn0 wlanmode adhoc ssid my_net \e
+   wepmode on wepkey 0x01020304050607080910111213 weptxkey 1 \e
+   channel 4
+.Ed
+.Pp
+Join/create an 802.11b IBSS network with network name
+.Dq Li my_net :
+.Bd -literal -offset indent
+ifconfig wlan0 create wlandev urtwn0 wlanmode adhoc
+ifconfig wlan0 inet 192.168.0.22 netmask 0xff00 ssid my_net \e
+   mode 11b
+.Ed
+.Pp
+Create an 802.11g host-based access point:
+.Bd -literal -offset indent
+ifconfig wlan0 create wlandev urtwn0 wlanmode hostap
+ifconfig wlan0 inet 192.168.0.10 netmask 0xff00 ssid my_ap \e
+   mode 11g
+.Ed
 .Sh DIAGNOSTICS
 .Bl -diag
 .It "urtwn%d: error %d, could not read firmware %s"
@@ -134,6 +157,7 @@ This should not happen.
 .Xr urtwnfw 4 ,
 .Xr usb 4 ,
 .Xr wlan 4 ,
+.Xr wlan_amrr 4 ,
 .Xr wlan_ccmp 4 ,
 .Xr wlan_tkip 4 ,
 .Xr wlan_wep 4 ,
@@ -158,5 +182,9 @@ driver was written by
 .Sh CAVEATS
 The
 .Nm
-driver does not support any of the 802.11n capabilities offered by the
-adapters.
+driver currently does not support A-MPDU 802.11n transmit aggregation.
+.Pp
+For non-RTL8188EUS chips
+.Dq "rate control"
+algorithm is absent; this may result in increased packet loss in noisy
+networks.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301747 - in head/sys: boot/fdt/dts/arm modules/dtb/allwinner

2016-06-09 Thread Emmanuel Vadot
Author: manu
Date: Thu Jun  9 17:10:19 2016
New Revision: 301747
URL: https://svnweb.freebsd.org/changeset/base/301747

Log:
  Add PCDuino3b dts. It uses the pcduino3 dts from upstream and adds the hdmi 
node, axp gpio and changes the phy mode to rgmii.
  
  Approved by:  andrew (mentor)
  Differential Revision:https://reviews.freebsd.org/D6775

Added:
  head/sys/boot/fdt/dts/arm/pcduino3b.dts   (contents, props changed)
Modified:
  head/sys/modules/dtb/allwinner/Makefile

Added: head/sys/boot/fdt/dts/arm/pcduino3b.dts
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/boot/fdt/dts/arm/pcduino3b.dts Thu Jun  9 17:10:19 2016
(r301747)
@@ -0,0 +1,48 @@
+/*-
+ * Copyright (c) 2016 Emmanuel Vadot 
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#include "sun7i-a20-pcduino3.dts"
+#include "sun7i-a20-hdmi.dtsi"
+#include "xpowers-axp209.dtsi"
+
+/ {
+   soc@01c0 {
+   hdmi@01c16000 {
+   status = "okay";
+   };
+
+   hdmiaudio {
+   status = "okay";
+   };
+   };
+};
+
+ {
+  pinctrl-0 = <_pins_rgmii_a>;
+  phy-mode = "rgmii";
+};

Modified: head/sys/modules/dtb/allwinner/Makefile
==
--- head/sys/modules/dtb/allwinner/Makefile Thu Jun  9 17:03:03 2016
(r301746)
+++ head/sys/modules/dtb/allwinner/Makefile Thu Jun  9 17:10:19 2016
(r301747)
@@ -7,6 +7,7 @@ DTS=\
cubieboard2.dts \
olimex-a20-som-evb.dts \
olinuxino-lime.dts \
+   pcduino3b.dts \
sinovoip-bpi-m3.dts
 
 .include 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301746 - head

2016-06-09 Thread Ed Maste
Author: emaste
Date: Thu Jun  9 17:03:03 2016
New Revision: 301746
URL: https://svnweb.freebsd.org/changeset/base/301746

Log:
  Use -L to specify compat32 library paths instead of -Y
  
  -Y is an uncommon linker option that is rather similar to -L.  In
  discussion with Peter it seems early amd64 development might have
  required the -Y-specific behaviour, but it is no longer necessary.
  
  Switch to -L which is more widely supported and much more commonly
  used, to make it easier to link the FreeBSD base system with linkers
  other than ld.bfd.
  
  Submitted by: Rafael Ávila de Espíndola
  Differential Revision:https://reviews.freebsd.org/D6681

Modified:
  head/Makefile.libcompat

Modified: head/Makefile.libcompat
==
--- head/Makefile.libcompat Thu Jun  9 16:41:41 2016(r301745)
+++ head/Makefile.libcompat Thu Jun  9 17:03:03 2016(r301746)
@@ -19,7 +19,7 @@ LIB32WMAKEENV=MACHINE=i386 MACHINE_ARCH
MACHINE_CPU="i686 mmx sse sse2"
 LIB32WMAKEFLAGS=   \
AS="${XAS} --32" \
-   LD="${XLD} -m elf_i386_fbsd -Y P,${LIBCOMPATTMP}/usr/lib32" \
+   LD="${XLD} -m elf_i386_fbsd -L${LIBCOMPATTMP}/usr/lib32" \
OBJCOPY="${XOBJCOPY}"
 
 .elif ${TARGET_ARCH} == "powerpc64"
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

svn commit: r301745 - head/sys/kern

2016-06-09 Thread Jamie Gritton
Author: jamie
Date: Thu Jun  9 16:41:41 2016
New Revision: 301745
URL: https://svnweb.freebsd.org/changeset/base/301745

Log:
  Make sure the OSD methods for jail set and remove can't run concurrently,
  by holding allprison_lock exclusively (even if only for a moment before
  downgrading) on all paths that call PR_METHOD_REMOVE.  Since they may run
  on a downgraded lock, it's still possible for them to run concurrently
  with PR_METHOD_GET, which will need to use the prison lock.

Modified:
  head/sys/kern/kern_jail.c

Modified: head/sys/kern/kern_jail.c
==
--- head/sys/kern/kern_jail.c   Thu Jun  9 16:30:27 2016(r301744)
+++ head/sys/kern/kern_jail.c   Thu Jun  9 16:41:41 2016(r301745)
@@ -2383,7 +2383,14 @@ sys_jail_attach(struct thread *td, struc
if (error)
return (error);
 
-   sx_slock(_lock);
+   /*
+* Start with exclusive hold on allprison_lock to ensure that a possible
+* PR_METHOD_REMOVE call isn't concurrent with jail_set or jail_remove.
+* But then immediately downgrade it since we don't need to stop
+* readers.
+*/
+   sx_xlock(_lock);
+   sx_downgrade(_lock);
pr = prison_find_child(td->td_ucred->cr_prison, uap->jid);
if (pr == NULL) {
sx_sunlock(_lock);
@@ -2601,9 +2608,11 @@ prison_complete(void *context, int pendi
 {
struct prison *pr = context;
 
+   sx_xlock(_lock);
mtx_lock(>pr_mtx);
prison_deref(pr, pr->pr_uref
-   ? PD_DEREF | PD_DEUREF | PD_LOCKED : PD_LOCKED);
+   ? PD_DEREF | PD_DEUREF | PD_LOCKED | PD_LIST_XLOCKED
+   : PD_LOCKED | PD_LIST_XLOCKED);
 }
 
 /*
@@ -2647,13 +2656,8 @@ prison_deref(struct prison *pr, int flag
 */
if (lasturef) {
if (!(flags & (PD_LIST_SLOCKED | PD_LIST_XLOCKED))) {
-   if (ref > 1) {
-   sx_slock(_lock);
-   flags |= PD_LIST_SLOCKED;
-   } else {
-   sx_xlock(_lock);
-   flags |= PD_LIST_XLOCKED;
-   }
+   sx_xlock(_lock);
+   flags |= PD_LIST_XLOCKED;
}
(void)osd_jail_call(pr, PR_METHOD_REMOVE, NULL);
mtx_lock(>pr_mtx);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301744 - stable/9/usr.bin/indent

2016-06-09 Thread Pedro F. Giffuni
Author: pfg
Date: Thu Jun  9 16:30:27 2016
New Revision: 301744
URL: https://svnweb.freebsd.org/changeset/base/301744

Log:
  MFC r301513:
  indent(1): Fix old typo.
  
  It's typedef, not typdef.
  
  Obtained from:NetBSD (CVS rev. 1.14)

Modified:
  stable/9/usr.bin/indent/lexi.c
Directory Properties:
  stable/9/usr.bin/indent/   (props changed)

Modified: stable/9/usr.bin/indent/lexi.c
==
--- stable/9/usr.bin/indent/lexi.c  Thu Jun  9 16:29:19 2016
(r301743)
+++ stable/9/usr.bin/indent/lexi.c  Thu Jun  9 16:30:27 2016
(r301744)
@@ -79,7 +79,7 @@ struct templ specials[1000] =
 {"double", 4},
 {"long", 4},
 {"short", 4},
-{"typdef", 4},
+{"typedef", 4},
 {"unsigned", 4},
 {"register", 4},
 {"static", 4},
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301743 - stable/10/usr.bin/indent

2016-06-09 Thread Pedro F. Giffuni
Author: pfg
Date: Thu Jun  9 16:29:19 2016
New Revision: 301743
URL: https://svnweb.freebsd.org/changeset/base/301743

Log:
  MFC r301513:
  indent(1): Fix old typo.
  
  It's typedef, not typdef.
  
  Obtained from:NetBSD (CVS rev. 1.14)

Modified:
  stable/10/usr.bin/indent/lexi.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/indent/lexi.c
==
--- stable/10/usr.bin/indent/lexi.c Thu Jun  9 16:15:01 2016
(r301742)
+++ stable/10/usr.bin/indent/lexi.c Thu Jun  9 16:29:19 2016
(r301743)
@@ -79,7 +79,7 @@ struct templ specials[1000] =
 {"double", 4},
 {"long", 4},
 {"short", 4},
-{"typdef", 4},
+{"typedef", 4},
 {"unsigned", 4},
 {"register", 4},
 {"static", 4},
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301742 - head/sys/dev/xen/timer

2016-06-09 Thread Roger Pau Monné
Author: royger
Date: Thu Jun  9 16:15:01 2016
New Revision: 301742
URL: https://svnweb.freebsd.org/changeset/base/301742

Log:
  xen/timer: re-introduce the inittodr call in the resume path
  
  r298930 removed the inittodr call, but it seems like this prevents
  "calcru: runtime went backwards ..." messages from occasionally appearing
  when resuming from migration.
  
  Reported by:  Karl Pielorz 
  Sponsored by: Citrix Systems R

Modified:
  head/sys/dev/xen/timer/timer.c

Modified: head/sys/dev/xen/timer/timer.c
==
--- head/sys/dev/xen/timer/timer.c  Thu Jun  9 16:05:56 2016
(r301741)
+++ head/sys/dev/xen/timer/timer.c  Thu Jun  9 16:15:01 2016
(r301742)
@@ -477,6 +477,9 @@ xentimer_resume(device_t dev)
/* Reset the last uptime value */
pvclock_resume();
 
+   /* Reset the RTC clock */
+   inittodr(time_second);
+
/* Kick the timers on all CPUs */
smp_rendezvous(NULL, xentimer_percpu_resume, NULL, dev);
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301740 - head/sys/cam

2016-06-09 Thread Warner Losh
Author: imp
Date: Thu Jun  9 16:05:49 2016
New Revision: 301740
URL: https://svnweb.freebsd.org/changeset/base/301740

Log:
  Add NVME IO type.

Modified:
  head/sys/cam/cam_ccb.h
  head/sys/cam/cam_xpt.c

Modified: head/sys/cam/cam_ccb.h
==
--- head/sys/cam/cam_ccb.h  Thu Jun  9 16:05:40 2016(r301739)
+++ head/sys/cam/cam_ccb.h  Thu Jun  9 16:05:49 2016(r301740)
@@ -204,6 +204,9 @@ typedef enum {
XPT_SMP_IO  = 0x1b | XPT_FC_DEV_QUEUED,
/* Serial Management Protocol */
 
+   XPT_NVME_IO = 0x1c | XPT_FC_DEV_QUEUED,
+   /* Execiute the requestred NVMe I/O operation */
+
XPT_SCAN_TGT= 0x1E | XPT_FC_QUEUED | XPT_FC_USER_CCB
   | XPT_FC_XPT_ONLY,
/* Scan Target */

Modified: head/sys/cam/cam_xpt.c
==
--- head/sys/cam/cam_xpt.c  Thu Jun  9 16:05:40 2016(r301739)
+++ head/sys/cam/cam_xpt.c  Thu Jun  9 16:05:49 2016(r301740)
@@ -5361,6 +5361,7 @@ static struct kv map[] = {
{ XPT_ATA_IO, "XPT_ATA_IO" },
{ XPT_GET_SIM_KNOB, "XPT_GET_SIM_KNOB" },
{ XPT_SET_SIM_KNOB, "XPT_SET_SIM_KNOB" },
+   { XPT_NVME_IO, "XPT_NVME_IO" },
{ XPT_SMP_IO, "XPT_SMP_IO" },
{ XPT_SCAN_TGT, "XPT_SCAN_TGT" },
{ XPT_ENG_INQ, "XPT_ENG_INQ" },
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301741 - head/sys/cam

2016-06-09 Thread Warner Losh
Author: imp
Date: Thu Jun  9 16:05:56 2016
New Revision: 301741
URL: https://svnweb.freebsd.org/changeset/base/301741

Log:
  Add place holder for SDIO CAM stuff for CCB XPT type.
  
  Sponsored by: Netflix

Modified:
  head/sys/cam/cam_ccb.h
  head/sys/cam/cam_xpt.c

Modified: head/sys/cam/cam_ccb.h
==
--- head/sys/cam/cam_ccb.h  Thu Jun  9 16:05:49 2016(r301740)
+++ head/sys/cam/cam_ccb.h  Thu Jun  9 16:05:56 2016(r301741)
@@ -207,6 +207,9 @@ typedef enum {
XPT_NVME_IO = 0x1c | XPT_FC_DEV_QUEUED,
/* Execiute the requestred NVMe I/O operation */
 
+   XPT_MMCSD_IO= 0x1d | XPT_FC_DEV_QUEUED,
+   /* Placeholder for MMC / SD / SDIO I/O stuff */
+
XPT_SCAN_TGT= 0x1E | XPT_FC_QUEUED | XPT_FC_USER_CCB
   | XPT_FC_XPT_ONLY,
/* Scan Target */

Modified: head/sys/cam/cam_xpt.c
==
--- head/sys/cam/cam_xpt.c  Thu Jun  9 16:05:49 2016(r301740)
+++ head/sys/cam/cam_xpt.c  Thu Jun  9 16:05:56 2016(r301741)
@@ -5362,6 +5362,7 @@ static struct kv map[] = {
{ XPT_GET_SIM_KNOB, "XPT_GET_SIM_KNOB" },
{ XPT_SET_SIM_KNOB, "XPT_SET_SIM_KNOB" },
{ XPT_NVME_IO, "XPT_NVME_IO" },
+   { XPT_MMCSD_IO, "XPT_MMCSD_IO" },
{ XPT_SMP_IO, "XPT_SMP_IO" },
{ XPT_SCAN_TGT, "XPT_SCAN_TGT" },
{ XPT_ENG_INQ, "XPT_ENG_INQ" },
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301739 - head/sys/cam

2016-06-09 Thread Warner Losh
Author: imp
Date: Thu Jun  9 16:05:40 2016
New Revision: 301739
URL: https://svnweb.freebsd.org/changeset/base/301739

Log:
  Improve debugging of xpt.
  
  Sponsored by: Netflix

Modified:
  head/sys/cam/cam_xpt.c

Modified: head/sys/cam/cam_xpt.c
==
--- head/sys/cam/cam_xpt.c  Thu Jun  9 15:43:00 2016(r301738)
+++ head/sys/cam/cam_xpt.c  Thu Jun  9 16:05:40 2016(r301739)
@@ -309,6 +309,7 @@ static xpt_devicefunc_t xptsetasyncfunc;
 static xpt_busfunc_t   xptsetasyncbusfunc;
 static cam_status  xptregister(struct cam_periph *periph,
void *arg);
+static const char *xpt_action_name(uint32_t action);
 static __inline int device_is_queued(struct cam_ed *device);
 
 static __inline int
@@ -812,6 +813,10 @@ xpt_rescan(union ccb *ccb)
xpt_free_ccb(ccb);
return;
}
+   CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_TRACE,
+   ("xpt_rescan: func %#x %s\n", ccb->ccb_h.func_code,
+   xpt_action_name(ccb->ccb_h.func_code)));
+
ccb->ccb_h.ppriv_ptr1 = ccb->ccb_h.cbfcnp;
ccb->ccb_h.cbfcnp = xpt_rescan_done;
xpt_setup_ccb(>ccb_h, ccb->ccb_h.path, CAM_PRIORITY_XPT);
@@ -2451,7 +2456,8 @@ xpt_action(union ccb *start_ccb)
 {
 
CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_TRACE,
-   ("xpt_action: func=%#x\n", start_ccb->ccb_h.func_code));
+   ("xpt_action: func %#x %s\n", start_ccb->ccb_h.func_code,
+   xpt_action_name(start_ccb->ccb_h.func_code)));
 
start_ccb->ccb_h.status = CAM_REQ_INPROG;
(*(start_ccb->ccb_h.path->bus->xport->action))(start_ccb);
@@ -2466,7 +2472,8 @@ xpt_action_default(union ccb *start_ccb)
 
path = start_ccb->ccb_h.path;
CAM_DEBUG(path, CAM_DEBUG_TRACE,
-   ("xpt_action_default: func=%#x\n", start_ccb->ccb_h.func_code));
+   ("xpt_action_default: func %#x %s\n", start_ccb->ccb_h.func_code,
+   xpt_action_name(start_ccb->ccb_h.func_code)));
 
switch (start_ccb->ccb_h.func_code) {
case XPT_SCSI_IO:
@@ -3012,6 +3019,11 @@ call_sim:
}
break;
}
+   CAM_DEBUG(path, CAM_DEBUG_TRACE,
+   ("xpt_action_default: func= %#x %s status %#x\n",
+   start_ccb->ccb_h.func_code,
+   xpt_action_name(start_ccb->ccb_h.func_code),
+   start_ccb->ccb_h.status));
 }
 
 void
@@ -4234,6 +4246,12 @@ xpt_async(u_int32_t async_code, struct c
ccb->casync.async_code = async_code;
ccb->casync.async_arg_size = 0;
size = xpt_async_size(async_code);
+   CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_TRACE,
+   ("xpt_async: func %#x %s aync_code %d %s\n",
+   ccb->ccb_h.func_code,
+   xpt_action_name(ccb->ccb_h.func_code),
+   async_code,
+   xpt_async_string(async_code)));
if (size > 0 && async_arg != NULL) {
ccb->casync.async_arg_ptr = malloc(size, M_CAMXPT, M_NOWAIT);
if (ccb->casync.async_arg_ptr == NULL) {
@@ -4441,7 +4459,11 @@ xpt_done(union ccb *done_ccb)
struct cam_doneq *queue;
int run, hash;
 
-   CAM_DEBUG(done_ccb->ccb_h.path, CAM_DEBUG_TRACE, ("xpt_done\n"));
+   CAM_DEBUG(done_ccb->ccb_h.path, CAM_DEBUG_TRACE,
+   ("xpt_done: func= %#x %s status %#x\n",
+   done_ccb->ccb_h.func_code,
+   xpt_action_name(done_ccb->ccb_h.func_code),
+   done_ccb->ccb_h.status));
if ((done_ccb->ccb_h.func_code & XPT_FC_QUEUED) == 0)
return;
 
@@ -4463,7 +4485,8 @@ void
 xpt_done_direct(union ccb *done_ccb)
 {
 
-   CAM_DEBUG(done_ccb->ccb_h.path, CAM_DEBUG_TRACE, ("xpt_done_direct\n"));
+   CAM_DEBUG(done_ccb->ccb_h.path, CAM_DEBUG_TRACE,
+   ("xpt_done_direct: status %#x\n", done_ccb->ccb_h.status));
if ((done_ccb->ccb_h.func_code & XPT_FC_QUEUED) == 0)
return;
 
@@ -5050,6 +5073,9 @@ xpt_register_async(int event, ac_callbac
xpt_action((union ccb *));
status = csa.ccb_h.status;
 
+   CAM_DEBUG(csa.ccb_h.path, CAM_DEBUG_TRACE,
+   ("xpt_register_async: func %p\n", cbfunc));
+
if (xptpath) {
xpt_path_unlock(path);
xpt_free_path(path);
@@ -5301,3 +5327,67 @@ camisr_runqueue(void)
mtx_unlock(>cam_doneq_mtx);
}
 }
+
+struct kv 
+{
+   uint32_t v;
+   const char *name;
+};
+
+static struct kv map[] = {
+   { XPT_NOOP, "XPT_NOOP" },
+   { XPT_SCSI_IO, "XPT_SCSI_IO" },
+   { XPT_GDEV_TYPE, "XPT_GDEV_TYPE" },
+   { XPT_GDEVLIST, "XPT_GDEVLIST" },
+   { XPT_PATH_INQ, "XPT_PATH_INQ" },
+   { XPT_REL_SIMQ, "XPT_REL_SIMQ" },
+   { XPT_SASYNC_CB, "XPT_SASYNC_CB" },
+   { XPT_SDEV_TYPE, "XPT_SDEV_TYPE" },
+   { XPT_SCAN_BUS, "XPT_SCAN_BUS" },
+   { 

svn commit: r301738 - stable/10

2016-06-09 Thread Bryan Drewery
Author: bdrewery
Date: Thu Jun  9 15:43:00 2016
New Revision: 301738
URL: https://svnweb.freebsd.org/changeset/base/301738

Log:
  MFC r301465:
  
Fix bmake version upgrade logic to use the new bmake.
  
  The '${WANT_MAKE} != "bmake"' logic seems wrong but is not being modified.

Modified:
  stable/10/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/Makefile
==
--- stable/10/Makefile  Thu Jun  9 15:34:33 2016(r301737)
+++ stable/10/Makefile  Thu Jun  9 15:43:00 2016(r301738)
@@ -155,9 +155,13 @@ HAVE_MAKE= bmake
 .else
 HAVE_MAKE= fmake
 .endif
+.if ${HAVE_MAKE} != ${WANT_MAKE} || \
+(defined(WANT_MAKE_VERSION) && ${MAKE_VERSION} < ${WANT_MAKE_VERSION})
+NEED_MAKE_UPGRADE= t
+.endif
 .if exists(${MYMAKE})
 SUB_MAKE:= ${MYMAKE} -m ${.CURDIR}/share/mk
-.elif ${WANT_MAKE} != ${HAVE_MAKE} || ${WANT_MAKE} != "bmake"
+.elif defined(NEED_MAKE_UPGRADE) || ${WANT_MAKE} != "bmake"
 # It may not exist yet but we may cause it to.
 # In the case of fmake, upgrade_checks may cause a newer version to be built.
 SUB_MAKE= `test -x ${MYMAKE} && echo ${MYMAKE} || echo ${MAKE}` \
@@ -334,8 +338,7 @@ kernel: buildkernel installkernel
 # for building the world.
 #
 upgrade_checks:
-.if ${HAVE_MAKE} != ${WANT_MAKE} || \
-(defined(WANT_MAKE_VERSION) && ${MAKE_VERSION} < ${WANT_MAKE_VERSION})
+.if defined(NEED_MAKE_UPGRADE)
@${_+_}(cd ${.CURDIR} && ${MAKE} ${WANT_MAKE:S,^f,,})
 .elif ${WANT_MAKE} == "fmake"
@if ! (cd ${.CURDIR}/tools/build/make_check && \
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301737 - head/sys/kern

2016-06-09 Thread Jamie Gritton
Author: jamie
Date: Thu Jun  9 15:34:33 2016
New Revision: 301737
URL: https://svnweb.freebsd.org/changeset/base/301737

Log:
  Remove a comment that was part of copied code, and is misleading in
  the new location.

Modified:
  head/sys/kern/sysv_msg.c

Modified: head/sys/kern/sysv_msg.c
==
--- head/sys/kern/sysv_msg.cThu Jun  9 15:19:48 2016(r301736)
+++ head/sys/kern/sysv_msg.cThu Jun  9 15:34:33 2016(r301737)
@@ -320,12 +320,6 @@ msgunload()
 #endif
 
for (msqid = 0; msqid < msginfo.msgmni; msqid++) {
-   /*
-* Look for an unallocated and unlocked msqid_ds.
-* msqid_ds's can be locked by msgsnd or msgrcv while
-* they are copying the message in/out.  We can't
-* re-use the entry until they release it.
-*/
msqkptr = [msqid];
if (msqkptr->u.msg_qbytes != 0 ||
(msqkptr->u.msg_perm.mode & MSG_LOCKED) != 0)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301736 - head/contrib/blacklist/libexec

2016-06-09 Thread Kurt Lidl
Author: lidl
Date: Thu Jun  9 15:19:48 2016
New Revision: 301736
URL: https://svnweb.freebsd.org/changeset/base/301736

Log:
  Add IPFW support to blacklistd-helper
  
  Relnotes: YES
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D6753

Modified:
  head/contrib/blacklist/libexec/blacklistd-helper

Modified: head/contrib/blacklist/libexec/blacklistd-helper
==
--- head/contrib/blacklist/libexec/blacklistd-helperThu Jun  9 14:44:05 
2016(r301735)
+++ head/contrib/blacklist/libexec/blacklistd-helperThu Jun  9 15:19:48 
2016(r301736)
@@ -16,6 +16,11 @@ for f in npf pf; do
break
fi
 done
+if [ -f "/etc/ipfw-blacklist.rc" ]; then
+   pf="ipfw"
+   . /etc/ipfw-blacklist.rc
+   ipfw_offset=${ipfw_offset:-2000}
+fi
 
 if [ -z "$pf" ]; then
echo "$0: Unsupported packet filter" 1>&2
@@ -43,6 +48,13 @@ esac
 case "$1" in
 add)
case "$pf" in
+   ipfw)
+   rule=$(( $ipfw_offset + $6 )) # use $ipfw_offset+$port for rule 
number
+   tname="port$6"
+   /sbin/ipfw table $tname create type addr 2>/dev/null
+   /sbin/ipfw -q table $tname add "$addr/$mask"
+   /sbin/ipfw -q add $rule drop $3 from "table("$tname")" to any 
dst-port $6
+   ;;
npf)
/sbin/npfctl rule "$2" add block in final $proto from \
"$addr/$mask" to any $port
@@ -57,6 +69,9 @@ add)
;;
 rem)
case "$pf" in
+   ipfw)
+   /sbin/ipfw table "port$6" delete "$addr/$mask" 2>/dev/null
+   ;;
npf)
/sbin/npfctl rule "$2" rem-id "$7"
;;
@@ -67,6 +82,9 @@ rem)
;;
 flush)
case "$pf" in 
+   ipfw)
+   /sbin/ipfw table "port$6" flush 2>/dev/null
+   ;;
npf)
/sbin/npfctl rule "$2" flush
;;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r301706 - head/sys/boot/efi

2016-06-09 Thread Andrew Turner
On Wed, 8 Jun 2016 22:30:15 -0400
Warner Losh  wrote:

> > On Jun 8, 2016, at 7:23 PM, Andrew Turner 
> > wrote:
> > 
> > Author: andrew
> > Date: Wed Jun  8 23:23:16 2016
> > New Revision: 301706
> > URL: https://svnweb.freebsd.org/changeset/base/301706
> > 
> > Log:
> >  Also set -fshort-wchar on arm64, this fixes parsing strings from
> > UEFI, e.g. on the command line.  
> 
> Maybe this could be used to fix the %S issue instead of the kludge
> we’re now doing…

It may still be needed for arm. The linker checks the compatibility of
the attributes so we would need to set -fshort-wchar on all the loader
components meaning it would need to be set on all arm loader
implementations.

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

svn commit: r301735 - head/sys/dev/random

2016-06-09 Thread Simon J. Gerraty
Author: sjg
Date: Thu Jun  9 14:44:05 2016
New Revision: 301735
URL: https://svnweb.freebsd.org/changeset/base/301735

Log:
  Revert previous commit, until issue with sparc64 resolved.
  
  Approved by:  so (implicit)

Modified:
  head/sys/dev/random/random_harvestq.h

Modified: head/sys/dev/random/random_harvestq.h
==
--- head/sys/dev/random/random_harvestq.h   Thu Jun  9 14:33:00 2016
(r301734)
+++ head/sys/dev/random/random_harvestq.h   Thu Jun  9 14:44:05 2016
(r301735)
@@ -43,9 +43,7 @@ struct harvest_event {
uint8_t he_source;  /* origin of the entropy */
 } __packed;
 
-void   random_harvest_queue(const void *, u_int, u_int,
-   enum random_entropy_source);
-void   read_rate_increment(u_int);
+void read_rate_increment(u_int);
 
 #defineRANDOM_HARVESTQ_BOOT_ENTROPY_FILE   "/boot/entropy"
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301733 - head/share/man/man4

2016-06-09 Thread Andriy Voskoboinyk
Author: avos
Date: Thu Jun  9 14:18:12 2016
New Revision: 301733
URL: https://svnweb.freebsd.org/changeset/base/301733

Log:
  rum(4): refresh manpage.
  
  Add a note about hardware encryption support (r288633),
  adhoc-demo mode (r288622) and remove BUGS section (fixed in r288632).

Modified:
  head/share/man/man4/rum.4

Modified: head/share/man/man4/rum.4
==
--- head/share/man/man4/rum.4   Thu Jun  9 13:58:31 2016(r301732)
+++ head/share/man/man4/rum.4   Thu Jun  9 14:18:12 2016(r301733)
@@ -16,7 +16,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 13, 2008
+.Dd June 9, 2016
 .Dt RUM 4
 .Os
 .Sh NAME
@@ -64,10 +64,14 @@ This chipset uses the MIMO (multiple-inp
 with multiple antennas to extend the operating range of the adapter
 and to achieve higher throughput.
 .Pp
+All chips have hardware support for WEP, AES-CCM, TKIP, and Michael
+cryptographic operations.
+.Pp
 .Nm
 supports
 .Cm station ,
 .Cm adhoc ,
+.Cm adhoc-demo ,
 .Cm hostap ,
 and
 .Cm monitor
@@ -182,7 +186,3 @@ driver was written by
 .An Niall O'Higgins Aq Mt nia...@openbsd.org
 and
 .An Damien Bergamini Aq Mt dam...@openbsd.org .
-.Sh BUGS
-Host AP mode doesn't support client power save.
-Clients using power save mode will experience
-packet loss (disabling power saving on the client will fix this).
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301734 - in head: lib/libc/rpc sys/rpc

2016-06-09 Thread Kevin Lo
Author: kevlo
Date: Thu Jun  9 14:33:00 2016
New Revision: 301734
URL: https://svnweb.freebsd.org/changeset/base/301734

Log:
  Fix the rpcb_getaddr() definition to match its declaration.
  
  Submitted by: Sebastian Huber 

Modified:
  head/lib/libc/rpc/rpcb_clnt.c
  head/sys/rpc/rpcb_clnt.c

Modified: head/lib/libc/rpc/rpcb_clnt.c
==
--- head/lib/libc/rpc/rpcb_clnt.c   Thu Jun  9 14:18:12 2016
(r301733)
+++ head/lib/libc/rpc/rpcb_clnt.c   Thu Jun  9 14:33:00 2016
(r301734)
@@ -1010,7 +1010,7 @@ done:
  *
  * Assuming that the address is all properly allocated
  */
-int
+bool_t
 rpcb_getaddr(rpcprog_t program, rpcvers_t version, const struct netconfig 
*nconf,
 struct netbuf *address, const char *host)
 {

Modified: head/sys/rpc/rpcb_clnt.c
==
--- head/sys/rpc/rpcb_clnt.cThu Jun  9 14:18:12 2016(r301733)
+++ head/sys/rpc/rpcb_clnt.cThu Jun  9 14:33:00 2016(r301734)
@@ -1051,7 +1051,7 @@ done:
  *
  * Assuming that the address is all properly allocated
  */
-int
+bool_t
 rpcb_getaddr(program, version, nconf, address, host)
rpcprog_t program;
rpcvers_t version;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r301713 - head/sys/dev/random

2016-06-09 Thread Glen Barber
On Thu, Jun 09, 2016 at 06:25:34AM -0700, Simon J. Gerraty wrote:
> Glen Barber  wrote:
> > >  
> > > -void read_rate_increment(u_int);
> > > +void random_harvest_queue(const void *, u_int, u_int,
> > > + enum random_entropy_source);
> > > +void read_rate_increment(u_int);
> > >  
> > >  #define  RANDOM_HARVESTQ_BOOT_ENTROPY_FILE   "/boot/entropy"
> > >  
> > 
> > This breaks sparc64.
> 
> Looks like defined(DEV_RANDOM) is relevant.
> Wrapping the prototype in random_harvestq.h in
> 
> #ifndef DEV_RANDOM
> 
> would avoid this issue.
> But backing out until we check if that fixes the original issue steve
> hit is probably best?
> 

IMHO, backing it out is the best solution for now, since a followup
review will be required by so@ for a subsequent commit here.

Glen



signature.asc
Description: PGP signature


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

2016-06-09 Thread Warner Losh
We already have debugging framework for boot1.efi which we could use here?

I’m working on setting / getting of UEFI variables with support for UEFI’s 
bootmgr protocol. That’s going to need some way to debug it because it’s kinda 
complex...

Warner


> On Jun 9, 2016, at 8:43 AM, Emmanuel Vadot  wrote:
> 
> 
> I wanted to more verbose in case of the system don't have partition o
> n disk (or the EFI implementation only support raw disks like U-Boot)
> but this might be a bad way of doing saw, I didn't think about the
> implication you're talking about. I'll try to figure a better way to do
> this.
> 
> On Wed, 8 Jun 2016 22:21:36 -0400
> Warner Losh  wrote:
> 
>> 
>>> On Jun 8, 2016, at 10:02 PM, Emmanuel Vadot  wrote:
>>> 
>>> Author: manu
>>> Date: Thu Jun  9 02:02:50 2016
>>> New Revision: 301714
>>> URL: https://svnweb.freebsd.org/changeset/base/301714
>>> 
>>> Log:
>>> Print a message when the efi disk isn't a logical partition.
>> 
>> Why on earth would you do that? This will print a message, one per full 
>> disk, and our systems have 36 disks in them?
>> Please consider backing this out...
>> 
>> Warner
>> 
>> 
>>> Approved by:andrew (mentor)
>>> Differential Revision:  https://reviews.freebsd.org/D6782
>>> 
>>> Modified:
>>> head/sys/boot/efi/libefi/efipart.c
>>> 
>>> Modified: head/sys/boot/efi/libefi/efipart.c
>>> ==
>>> --- head/sys/boot/efi/libefi/efipart.c  Thu Jun  9 01:50:43 2016
>>> (r301713)
>>> +++ head/sys/boot/efi/libefi/efipart.c  Thu Jun  9 02:02:50 2016
>>> (r301714)
>>> @@ -119,8 +119,11 @@ efipart_init(void) 
>>> (void**));
>>> if (EFI_ERROR(status))
>>> continue;
>>> -   if (!blkio->Media->LogicalPartition)
>>> +   if (!blkio->Media->LogicalPartition) {
>>> +   printf("%s%d isn't a logical partition, skipping\n",
>>> +   efipart_dev.dv_name, n);
>>> continue;
>>> +   }
>>> 
>>> /*
>>>  * If we come across a logical partition of subtype CDROM
>>> 
> 
> 
> -- 
> Emmanuel Vadot

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

svn commit: r301732 - head/release/tools

2016-06-09 Thread Colin Percival
Author: cperciva
Date: Thu Jun  9 13:58:31 2016
New Revision: 301732
URL: https://svnweb.freebsd.org/changeset/base/301732

Log:
  Switch from console="comconsole" to boot_multicons="YES" in EC2.
  
  Amazon recently introduced an API for capturing screenshots of an
  emulated VGA device; this commit makes that (somewhat) useful.
  
  MFC after:3 weeks

Modified:
  head/release/tools/ec2.conf

Modified: head/release/tools/ec2.conf
==
--- head/release/tools/ec2.conf Thu Jun  9 13:42:18 2016(r301731)
+++ head/release/tools/ec2.conf Thu Jun  9 13:58:31 2016(r301732)
@@ -62,8 +62,10 @@ vm_extra_pre_umount() {
echo 'autoboot_delay="-1"' >> ${DESTDIR}/boot/loader.conf
echo 'beastie_disable="YES"' >> ${DESTDIR}/boot/loader.conf
 
-   # The EC2 console is an emulated serial port.
-   echo 'console="comconsole"' >> ${DESTDIR}/boot/loader.conf
+   # EC2 has two consoles: An emulated serial port ("system log"),
+   # which has been present since 2006; and a VGA console ("instance
+   # screenshot") which was introduced in 2016.
+   echo 'boot_multicons="YES"' >> ${DESTDIR}/boot/loader.conf
 
# Some older EC2 hardware used a version of Xen with a bug in its
# emulated serial port.  It is not clear if EC2 still has any such
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301731 - head/sys/net80211

2016-06-09 Thread Andriy Voskoboinyk
Author: avos
Date: Thu Jun  9 13:42:18 2016
New Revision: 301731
URL: https://svnweb.freebsd.org/changeset/base/301731

Log:
  net80211: discard an injected frame if it is smaller than header length.
  
  Do not try to pass such frames; a correct frame cannot be smaller than
  (the corresponding) header size.
  (for wpi(4) an additional check was added in r289012).
  
  PR:   144987

Modified:
  head/sys/net80211/ieee80211_output.c

Modified: head/sys/net80211/ieee80211_output.c
==
--- head/sys/net80211/ieee80211_output.cThu Jun  9 13:36:31 2016
(r301730)
+++ head/sys/net80211/ieee80211_output.cThu Jun  9 13:42:18 2016
(r301731)
@@ -608,6 +608,8 @@ ieee80211_output(struct ifnet *ifp, stru
if ((wh->i_fc[0] & IEEE80211_FC0_VERSION_MASK) !=
IEEE80211_FC0_VERSION_0)
senderr(EIO);   /* XXX */
+   if (m->m_pkthdr.len < ieee80211_anyhdrsize(wh))
+   senderr(EIO);   /* XXX */
 
/* locate destination node */
switch (wh->i_fc[1] & IEEE80211_FC1_DIR_MASK) {
@@ -617,8 +619,6 @@ ieee80211_output(struct ifnet *ifp, stru
break;
case IEEE80211_FC1_DIR_TODS:
case IEEE80211_FC1_DIR_DSTODS:
-   if (m->m_pkthdr.len < sizeof(struct ieee80211_frame))
-   senderr(EIO);   /* XXX */
ni = ieee80211_find_txnode(vap, wh->i_addr3);
break;
default:
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301730 - head/release/doc/en_US.ISO8859-1/relnotes

2016-06-09 Thread Steven Kreuzer
Author: skreuzer (doc,ports committer)
Date: Thu Jun  9 13:36:31 2016
New Revision: 301730
URL: https://svnweb.freebsd.org/changeset/base/301730

Log:
  Document 292432, OpenBSM updated to version 1.2 alpha 4.
  
  Approved by:  re (gjb, implicit, relnotes)

Modified:
  head/release/doc/en_US.ISO8859-1/relnotes/article.xml

Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml
==
--- head/release/doc/en_US.ISO8859-1/relnotes/article.xml   Thu Jun  9 
13:33:13 2016(r301729)
+++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml   Thu Jun  9 
13:36:31 2016(r301730)
@@ -605,6 +605,9 @@
   ACPICA has been
updated to version 20160527.
 
+  OpenBSM has been
+   updated to version 1.2 alpha 4.
+
 
 
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301729 - head/release/doc/en_US.ISO8859-1/relnotes

2016-06-09 Thread Steven Kreuzer
Author: skreuzer (doc,ports committer)
Date: Thu Jun  9 13:33:13 2016
New Revision: 301729
URL: https://svnweb.freebsd.org/changeset/base/301729

Log:
  Document 300879, acpica updated to version 20160527
  
  Approved by:  re (gjb, implicit, relnotes)

Modified:
  head/release/doc/en_US.ISO8859-1/relnotes/article.xml

Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml
==
--- head/release/doc/en_US.ISO8859-1/relnotes/article.xml   Thu Jun  9 
13:23:13 2016(r301728)
+++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml   Thu Jun  9 
13:33:13 2016(r301729)
@@ -601,6 +601,10 @@
   The
compiler_rt utility has been
updated to version 3.8.0.
+
+  ACPICA has been
+   updated to version 20160527.
+
 
 
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r301713 - head/sys/dev/random

2016-06-09 Thread Simon J. Gerraty
Glen Barber  wrote:
> >  
> > -void read_rate_increment(u_int);
> > +void   random_harvest_queue(const void *, u_int, u_int,
> > +   enum random_entropy_source);
> > +void   read_rate_increment(u_int);
> >  
> >  #defineRANDOM_HARVESTQ_BOOT_ENTROPY_FILE   "/boot/entropy"
> >  
> 
> This breaks sparc64.

Looks like defined(DEV_RANDOM) is relevant.
Wrapping the prototype in random_harvestq.h in

#ifndef DEV_RANDOM

would avoid this issue.
But backing out until we check if that fixes the original issue steve
hit is probably best?

> 
> cc1: warnings being treated as errors
> In file included from 
> /usr/src/sys/modules/random_other/../../dev/random/other_algorithm.c:62:
> /usr/src/sys/dev/random/random_harvestq.h:47: warning: redundant 
> redeclaration of 'random_harvest_queue' [-Wredundant-decls]
> /usr/src/sys/sys/random.h:99: warning: previous declaration of 
> 'random_harvest_queue' was here
> 
> Glen
> 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301728 - head/release/doc/en_US.ISO8859-1/relnotes

2016-06-09 Thread Steven Kreuzer
Author: skreuzer (doc,ports committer)
Date: Thu Jun  9 13:23:13 2016
New Revision: 301728
URL: https://svnweb.freebsd.org/changeset/base/301728

Log:
  Document 291125, xz updated to version 5.2.2
  
  Approved by:  re (gjb, implicit, relnotes)

Modified:
  head/release/doc/en_US.ISO8859-1/relnotes/article.xml

Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml
==
--- head/release/doc/en_US.ISO8859-1/relnotes/article.xml   Thu Jun  9 
13:17:08 2016(r301727)
+++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml   Thu Jun  9 
13:23:13 2016(r301728)
@@ -505,8 +505,8 @@
elftoolchain utilities have been
updated to version 3179.
 
-  The  utility has been updated
-   to version 5.2.1.
+  The  utility has been updated
+   to version 5.2.2.
 
   The  utility has been updated
to version 2.1.3.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r301713 - head/sys/dev/random

2016-06-09 Thread Simon J. Gerraty
Glen Barber  wrote:
> This breaks sparc64.

Ouch. I only tested on x86 before commit.
I can back it out, while we work out what's up.

> 
> cc1: warnings being treated as errors
> In file included from 
> /usr/src/sys/modules/random_other/../../dev/random/other_algorithm.c:62:
> /usr/src/sys/dev/random/random_harvestq.h:47: warning: redundant 
> redeclaration of 'random_harvest_queue' [-Wredundant-decls]
> /usr/src/sys/sys/random.h:99: warning: previous declaration of 
> 'random_harvest_queue' was here
> 
> Glen
> 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301727 - head/sys/kern

2016-06-09 Thread Mark Johnston
Author: markj
Date: Thu Jun  9 13:17:08 2016
New Revision: 301727
URL: https://svnweb.freebsd.org/changeset/base/301727

Log:
  Fix some cosmetic issues in kern_fail.c omitted from r296927.
  
  Obtained from:Matthew Bryan 

Modified:
  head/sys/kern/kern_fail.c

Modified: head/sys/kern/kern_fail.c
==
--- head/sys/kern/kern_fail.c   Thu Jun  9 13:04:57 2016(r301726)
+++ head/sys/kern/kern_fail.c   Thu Jun  9 13:17:08 2016(r301727)
@@ -82,13 +82,13 @@ static MALLOC_DEFINE(M_FAIL_POINT, "Fail
 #define fp_malloc(size, flags) malloc((size), M_FAIL_POINT, (flags))
 #define fs_free(ptr) fp_free(ptr)
 #define fs_malloc() fp_malloc(sizeof(struct fail_point_setting), \
-M_WAITOK | M_ZERO)
+M_WAITOK | M_ZERO)
 
- /**
-  * These define the wchans that are used for sleeping, pausing respectively.
-  * They are chosen arbitrarily but need to be distinct to the failpoint and
-  * the sleep/pause distinction.
-  */
+/**
+ * These define the wchans that are used for sleeping, pausing respectively.
+ * They are chosen arbitrarily but need to be distinct to the failpoint and
+ * the sleep/pause distinction.
+ */
 #define FP_SLEEP_CHANNEL(fp) (void*)(fp)
 #define FP_PAUSE_CHANNEL(fp) __DEVOLATILE(void*, >fp_setting)
 
@@ -166,7 +166,7 @@ struct fail_point_entry {
enum fail_point_t   fe_type;/**< type of entry */
int fe_arg; /**< argument to type (e.g. return 
value) */
int fe_prob;/**< likelihood of firing in millionths 
*/
-   int fe_count;   /**< number of times to fire, -1 means 
infinite */
+   int32_t fe_count;   /**< number of times to fire, -1 means 
infinite */
pid_t   fe_pid; /**< only fail for this process */
struct fail_point   *fe_parent; /**< backpointer to fp */
TAILQ_ENTRY(fail_point_entry)   fe_entries; /**< next entry ptr */
@@ -354,7 +354,7 @@ fail_point_eval_swap_out(struct fail_poi
 
 /* Free up any zero-ref entries in the garbage queue */
 static void
-fail_point_garbage_collect()
+fail_point_garbage_collect(void)
 {
struct fail_point_setting *fs_current, *fs_next;
struct fail_point_setting_garbage fp_ents_free_list;
@@ -441,7 +441,7 @@ fail_point_sleep(struct fail_point *fp, 
fp->fp_pre_sleep_fn(fp->fp_pre_sleep_arg);
 
timeout(fp->fp_post_sleep_fn, fp->fp_post_sleep_arg,
-   timo);
+   timo);
*pret = FAIL_POINT_RC_QUEUED;
}
}
@@ -635,7 +635,6 @@ abort:
fail_point_setting_release_ref(fp);
 
return (ret);
-
 }
 
 /**
@@ -844,19 +843,17 @@ end:
 /**
  * Handle kernel failpoint set/get.
  */
-
 int
 fail_point_sysctl(SYSCTL_HANDLER_ARGS)
 {
struct fail_point *fp;
char *buf;
-   struct sbuf *sb_check;
-   struct sbuf sb;
+   struct sbuf sb, *sb_check;
int error;
 
+   buf = NULL;
error = 0;
fp = arg1;
-   buf = NULL;
 
sb_check = sbuf_new(, NULL, 1024, SBUF_AUTOEXTEND);
if (sb_check != )
@@ -949,7 +946,6 @@ fail_sysctl_drain_func(void *sysctl_args
return (len);
 }
 
-
 /**
  * Internal helper function to translate a human-readable failpoint string
  * into a internally-parsable fail_point structure.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301726 - head/sys/dev/iscsi

2016-06-09 Thread Edward Tomasz Napierala
Author: trasz
Date: Thu Jun  9 13:04:57 2016
New Revision: 301726
URL: https://svnweb.freebsd.org/changeset/base/301726

Log:
  Consistently use 'unsigned int' for session IDs.
  
  MFC after:1 month

Modified:
  head/sys/dev/iscsi/iscsi_ioctl.h

Modified: head/sys/dev/iscsi/iscsi_ioctl.h
==
--- head/sys/dev/iscsi/iscsi_ioctl.hThu Jun  9 12:33:53 2016
(r301725)
+++ head/sys/dev/iscsi/iscsi_ioctl.hThu Jun  9 13:04:57 2016
(r301726)
@@ -158,7 +158,7 @@ struct iscsi_daemon_fail {
  */
 
 struct iscsi_daemon_connect {
-   int idc_session_id;
+   unsigned intidc_session_id;
int idc_iser;
int idc_domain;
int idc_socktype;
@@ -171,7 +171,7 @@ struct iscsi_daemon_connect {
 };
 
 struct iscsi_daemon_send {
-   int ids_session_id;
+   unsigned intids_session_id;
void*ids_bhs;
size_t  ids_spare;
void*ids_spare2;
@@ -181,7 +181,7 @@ struct iscsi_daemon_send {
 };
 
 struct iscsi_daemon_receive {
-   int idr_session_id;
+   unsigned intidr_session_id;
void*idr_bhs;
size_t  idr_spare;
void*idr_spare2;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r301713 - head/sys/dev/random

2016-06-09 Thread Glen Barber
On Thu, Jun 09, 2016 at 01:50:43AM +, Simon J. Gerraty wrote:
> Author: sjg
> Date: Thu Jun  9 01:50:43 2016
> New Revision: 301713
> URL: https://svnweb.freebsd.org/changeset/base/301713
> 
> Log:
>   Add a prototype for random_harvest_queue to dev/random/random_harvestq.h
>   This fixes a warning that occurs in a number of files that use the
>   random_harvest_queue function.
>   
>   Differential Revision:  https://reviews.freebsd.org/D4229
>   Submitted by:   ste...@juniper.net
>   Reviewed by:markm
>   Approved by:so
> 
> Modified:
>   head/sys/dev/random/random_harvestq.h
> 
> Modified: head/sys/dev/random/random_harvestq.h
> ==
> --- head/sys/dev/random/random_harvestq.h Thu Jun  9 01:31:09 2016
> (r301712)
> +++ head/sys/dev/random/random_harvestq.h Thu Jun  9 01:50:43 2016
> (r301713)
> @@ -43,7 +43,9 @@ struct harvest_event {
>   uint8_t he_source;  /* origin of the entropy */
>  } __packed;
>  
> -void read_rate_increment(u_int);
> +void random_harvest_queue(const void *, u_int, u_int,
> + enum random_entropy_source);
> +void read_rate_increment(u_int);
>  
>  #define  RANDOM_HARVESTQ_BOOT_ENTROPY_FILE   "/boot/entropy"
>  

This breaks sparc64.

cc1: warnings being treated as errors
In file included from 
/usr/src/sys/modules/random_other/../../dev/random/other_algorithm.c:62:
/usr/src/sys/dev/random/random_harvestq.h:47: warning: redundant redeclaration 
of 'random_harvest_queue' [-Wredundant-decls]
/usr/src/sys/sys/random.h:99: warning: previous declaration of 
'random_harvest_queue' was here

Glen



signature.asc
Description: PGP signature


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

2016-06-09 Thread Emmanuel Vadot

 I wanted to more verbose in case of the system don't have partition o
n disk (or the EFI implementation only support raw disks like U-Boot)
but this might be a bad way of doing saw, I didn't think about the
implication you're talking about. I'll try to figure a better way to do
this.

On Wed, 8 Jun 2016 22:21:36 -0400
Warner Losh  wrote:

> 
> > On Jun 8, 2016, at 10:02 PM, Emmanuel Vadot  wrote:
> > 
> > Author: manu
> > Date: Thu Jun  9 02:02:50 2016
> > New Revision: 301714
> > URL: https://svnweb.freebsd.org/changeset/base/301714
> > 
> > Log:
> >  Print a message when the efi disk isn't a logical partition.
> 
> Why on earth would you do that? This will print a message, one per full disk, 
> and our systems have 36 disks in them?
> Please consider backing this out...
> 
> Warner
> 
> 
> >  Approved by:   andrew (mentor)
> >  Differential Revision: https://reviews.freebsd.org/D6782
> > 
> > Modified:
> >  head/sys/boot/efi/libefi/efipart.c
> > 
> > Modified: head/sys/boot/efi/libefi/efipart.c
> > ==
> > --- head/sys/boot/efi/libefi/efipart.c  Thu Jun  9 01:50:43 2016
> > (r301713)
> > +++ head/sys/boot/efi/libefi/efipart.c  Thu Jun  9 02:02:50 2016
> > (r301714)
> > @@ -119,8 +119,11 @@ efipart_init(void) 
> > (void**));
> > if (EFI_ERROR(status))
> > continue;
> > -   if (!blkio->Media->LogicalPartition)
> > +   if (!blkio->Media->LogicalPartition) {
> > +   printf("%s%d isn't a logical partition, skipping\n",
> > +   efipart_dev.dv_name, n);
> > continue;
> > +   }
> > 
> > /*
> >  * If we come across a logical partition of subtype CDROM
> > 


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


svn commit: r301725 - head/sys/dev/sfxge

2016-06-09 Thread Andrew Rybchenko
Author: arybchik
Date: Thu Jun  9 12:33:53 2016
New Revision: 301725
URL: https://svnweb.freebsd.org/changeset/base/301725

Log:
  sfxge(4): bump version to the closest out-of-tree driver version
  
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:  1 week

Modified:
  head/sys/dev/sfxge/sfxge_version.h

Modified: head/sys/dev/sfxge/sfxge_version.h
==
--- head/sys/dev/sfxge/sfxge_version.h  Thu Jun  9 12:29:03 2016
(r301724)
+++ head/sys/dev/sfxge/sfxge_version.h  Thu Jun  9 12:33:53 2016
(r301725)
@@ -36,6 +36,6 @@
 #ifndef _SFXGE_VERSION_H
 #define_SFXGE_VERSION_H
 
-#defineSFXGE_VERSION_STRING"v4.8.0.1071"
+#defineSFXGE_VERSION_STRING"v4.8.0.1081"
 
 #endif /* _SFXGE_DRIVER_VERSION_H */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301724 - head/sys/dev/sfxge

2016-06-09 Thread Andrew Rybchenko
Author: arybchik
Date: Thu Jun  9 12:29:03 2016
New Revision: 301724
URL: https://svnweb.freebsd.org/changeset/base/301724

Log:
  sfxge(4): handle negative ticks difference correctly
  
  ticks are signed int and if statistics is not updated for a long time
  (more than INT_MAX ticks, but less than UINT_MAX) difference becomes
  negative and less than hz for a long time.
  
  Other option to repeat is simply load driver (which initializes
  timestamps to 0) when ticks are negative.
  
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:  1 week
  Differential Revision:  https://reviews.freebsd.org/D6777

Modified:
  head/sys/dev/sfxge/sfxge_ev.c
  head/sys/dev/sfxge/sfxge_port.c

Modified: head/sys/dev/sfxge/sfxge_ev.c
==
--- head/sys/dev/sfxge/sfxge_ev.c   Thu Jun  9 11:39:50 2016
(r301723)
+++ head/sys/dev/sfxge/sfxge_ev.c   Thu Jun  9 12:29:03 2016
(r301724)
@@ -453,7 +453,7 @@ sfxge_ev_stat_update(struct sfxge_softc 
goto out;
 
now = ticks;
-   if (now - sc->ev_stats_update_time < hz)
+   if ((unsigned int)(now - sc->ev_stats_update_time) < (unsigned int)hz)
goto out;
 
sc->ev_stats_update_time = now;

Modified: head/sys/dev/sfxge/sfxge_port.c
==
--- head/sys/dev/sfxge/sfxge_port.c Thu Jun  9 11:39:50 2016
(r301723)
+++ head/sys/dev/sfxge/sfxge_port.c Thu Jun  9 12:29:03 2016
(r301724)
@@ -62,7 +62,7 @@ sfxge_mac_stat_update(struct sfxge_softc
}
 
now = ticks;
-   if (now - port->mac_stats.update_time < hz) {
+   if ((unsigned int)(now - port->mac_stats.update_time) < (unsigned 
int)hz) {
rc = 0;
goto out;
}
@@ -570,7 +570,7 @@ sfxge_phy_stat_update(struct sfxge_softc
}
 
now = ticks;
-   if (now - port->phy_stats.update_time < hz) {
+   if ((unsigned int)(now - port->phy_stats.update_time) < (unsigned 
int)hz) {
rc = 0;
goto out;
}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301723 - head/sys/dev/iscsi

2016-06-09 Thread Edward Tomasz Napierala
Author: trasz
Date: Thu Jun  9 11:39:50 2016
New Revision: 301723
URL: https://svnweb.freebsd.org/changeset/base/301723

Log:
  Add some spares to structs used by iscsi(4), to avoid ABI problems
  during 11-STABLE.
  
  MFC after:1 month

Modified:
  head/sys/dev/iscsi/iscsi_ioctl.h

Modified: head/sys/dev/iscsi/iscsi_ioctl.h
==
--- head/sys/dev/iscsi/iscsi_ioctl.hThu Jun  9 08:19:42 2016
(r301722)
+++ head/sys/dev/iscsi/iscsi_ioctl.hThu Jun  9 11:39:50 2016
(r301723)
@@ -68,7 +68,7 @@ struct iscsi_session_conf {
int isc_iser;
charisc_offload[ISCSI_OFFLOAD_LEN];
int isc_enable;
-   int isc_spare[1];
+   int isc_spare[4];
 };
 
 /*
@@ -77,6 +77,7 @@ struct iscsi_session_conf {
  */
 struct iscsi_session_limits {
size_t  isl_max_data_segment_length;
+   int isl_spare[8];
 };
 
 /*
@@ -89,12 +90,13 @@ struct iscsi_session_state {
int iss_header_digest;
int iss_data_digest;
int iss_max_data_segment_length;
+   int iss_max_burst_length;
+   int iss_first_burst_length;
int iss_immediate_data;
int iss_connected;
chariss_reason[ISCSI_REASON_LEN];
chariss_offload[ISCSI_OFFLOAD_LEN];
-   int iss_max_burst_length;
-   int iss_first_burst_length;
+   int iss_spare[4];
 };
 
 /*
@@ -107,7 +109,7 @@ struct iscsi_daemon_request {
uint16_tidr_tsih;
uint16_tidr_spare_cid;
struct iscsi_session_limits idr_limits;
-   int idr_spare[2];
+   int idr_spare[4];
 };
 
 struct iscsi_daemon_handoff {
@@ -120,11 +122,11 @@ struct iscsi_daemon_handoff {
uint32_tidh_statsn;
int idh_header_digest;
int idh_data_digest;
-   int idh_initial_r2t;
-   int idh_immediate_data;
size_t  idh_max_data_segment_length;
size_t  idh_max_burst_length;
size_t  idh_first_burst_length;
+   int idh_immediate_data;
+   int idh_initial_r2t;
int idh_spare[4];
 };
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301722 - head/sys/net80211

2016-06-09 Thread Andriy Voskoboinyk
Author: avos
Date: Thu Jun  9 08:19:42 2016
New Revision: 301722
URL: https://svnweb.freebsd.org/changeset/base/301722

Log:
  net80211: fix duplicate packet counter incrementation.
  
  Remove 'if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1);' from raw xmit
  and apbridge path; it will be incremented by ieee80211_tx_complete()
  after packet transmission.
  
  Noticed by:   Imre Vadasz 

Modified:
  head/sys/net80211/ieee80211_hostap.c
  head/sys/net80211/ieee80211_output.c

Modified: head/sys/net80211/ieee80211_hostap.c
==
--- head/sys/net80211/ieee80211_hostap.cThu Jun  9 07:49:20 2016
(r301721)
+++ head/sys/net80211/ieee80211_hostap.cThu Jun  9 08:19:42 2016
(r301722)
@@ -412,8 +412,8 @@ hostap_deliver_data(struct ieee80211vap 
ieee80211_free_node(sta);
}
}
-   if (mcopy != NULL && ieee80211_vap_xmitpkt(vap, mcopy) == 0)
-   if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1);
+   if (mcopy != NULL)
+   (void) ieee80211_vap_xmitpkt(vap, mcopy);
}
if (m != NULL) {
/*

Modified: head/sys/net80211/ieee80211_output.c
==
--- head/sys/net80211/ieee80211_output.cThu Jun  9 07:49:20 2016
(r301721)
+++ head/sys/net80211/ieee80211_output.cThu Jun  9 08:19:42 2016
(r301722)
@@ -647,7 +647,6 @@ ieee80211_output(struct ifnet *ifp, stru
if (ieee80211_classify(ni, m))
senderr(EIO);   /* XXX */
 
-   if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1);
IEEE80211_NODE_STAT(ni, tx_data);
if (IEEE80211_IS_MULTICAST(wh->i_addr1)) {
IEEE80211_NODE_STAT(ni, tx_mcast);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301721 - head/usr.sbin/iscsid

2016-06-09 Thread Edward Tomasz Napierala
Author: trasz
Date: Thu Jun  9 07:49:20 2016
New Revision: 301721
URL: https://svnweb.freebsd.org/changeset/base/301721

Log:
  Decouple MaxBurstLength and FirstBurstLength from MaxRecvDataSegmentLength
  reported by the ICL module in iscsid(8).  This harmed performance and was
  just wrong.
  
  MFC after:1 month

Modified:
  head/usr.sbin/iscsid/iscsid.h
  head/usr.sbin/iscsid/login.c

Modified: head/usr.sbin/iscsid/iscsid.h
==
--- head/usr.sbin/iscsid/iscsid.h   Thu Jun  9 07:19:02 2016
(r301720)
+++ head/usr.sbin/iscsid/iscsid.h   Thu Jun  9 07:49:20 2016
(r301721)
@@ -42,8 +42,10 @@
 #defineCONN_DIGEST_NONE0
 #defineCONN_DIGEST_CRC32C  1
 
-#define CONN_MUTUAL_CHALLENGE_LEN  1024
+#defineCONN_MUTUAL_CHALLENGE_LEN   1024
 #defineSOCKBUF_SIZE1048576
+#defineMAX_BURST_LENGTH(256 * 1024)
+#defineFIRST_BURST_LENGTH  (128 * 1024)
 
 struct connection {
int conn_iscsi_fd;

Modified: head/usr.sbin/iscsid/login.c
==
--- head/usr.sbin/iscsid/login.cThu Jun  9 07:19:02 2016
(r301720)
+++ head/usr.sbin/iscsid/login.cThu Jun  9 07:49:20 2016
(r301721)
@@ -395,16 +395,24 @@ login_negotiate_key(struct connection *c
}
conn->conn_max_data_segment_length = tmp;
} else if (strcmp(name, "MaxBurstLength") == 0) {
-   if (conn->conn_immediate_data) {
-   tmp = strtoul(value, NULL, 10);
-   if (tmp <= 0)
-   log_errx(1, "received invalid MaxBurstLength");
-   conn->conn_max_burst_length = tmp;
+   tmp = strtoul(value, NULL, 10);
+   if (tmp <= 0)
+   log_errx(1, "received invalid MaxBurstLength");
+   if (tmp > MAX_BURST_LENGTH) {
+   log_debugx("capping MaxBurstLength "
+   "from %d to %d", tmp, MAX_BURST_LENGTH);
+   tmp = MAX_BURST_LENGTH;
}
+   conn->conn_max_burst_length = tmp;
} else if (strcmp(name, "FirstBurstLength") == 0) {
tmp = strtoul(value, NULL, 10);
if (tmp <= 0)
log_errx(1, "received invalid FirstBurstLength");
+   if (tmp > FIRST_BURST_LENGTH) {
+   log_debugx("capping FirstBurstLength "
+   "from %d to %d", tmp, FIRST_BURST_LENGTH);
+   tmp = FIRST_BURST_LENGTH;
+   }
conn->conn_first_burst_length = tmp;
} else if (strcmp(name, "DefaultTime2Wait") == 0) {
/* Ignore */
@@ -489,10 +497,8 @@ login_negotiate(struct connection *conn)
keys_add(request_keys, "DataDigest", "None");
 
keys_add(request_keys, "ImmediateData", "Yes");
-   keys_add_int(request_keys, "MaxBurstLength",
-   2 * conn->conn_limits.isl_max_data_segment_length);
-   keys_add_int(request_keys, "FirstBurstLength",
-   conn->conn_limits.isl_max_data_segment_length);
+   keys_add_int(request_keys, "MaxBurstLength", MAX_BURST_LENGTH);
+   keys_add_int(request_keys, "FirstBurstLength", 
FIRST_BURST_LENGTH);
keys_add(request_keys, "InitialR2T", "Yes");
keys_add(request_keys, "MaxOutstandingR2T", "1");
if (conn->conn_conf.isc_iser == 1) {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301720 - head/usr.sbin/ctld

2016-06-09 Thread Edward Tomasz Napierala
Author: trasz
Date: Thu Jun  9 07:19:02 2016
New Revision: 301720
URL: https://svnweb.freebsd.org/changeset/base/301720

Log:
  Don't cap FirstBurstLength to maximum MaxRecvDataSegmentLength claimed
  by the offload driver; there is no reason to do so, and it actually
  harms performance.
  
  MFC after:1 month

Modified:
  head/usr.sbin/ctld/ctld.h
  head/usr.sbin/ctld/login.c

Modified: head/usr.sbin/ctld/ctld.h
==
--- head/usr.sbin/ctld/ctld.h   Thu Jun  9 06:55:00 2016(r301719)
+++ head/usr.sbin/ctld/ctld.h   Thu Jun  9 07:19:02 2016(r301720)
@@ -49,6 +49,7 @@
 #defineMAX_NAME_LEN223
 #defineMAX_DATA_SEGMENT_LENGTH (128 * 1024)
 #defineMAX_BURST_LENGTH16776192
+#defineFIRST_BURST_LENGTH  (128 * 1024)
 #defineSOCKBUF_SIZE1048576
 
 struct auth {

Modified: head/usr.sbin/ctld/login.c
==
--- head/usr.sbin/ctld/login.c  Thu Jun  9 06:55:00 2016(r301719)
+++ head/usr.sbin/ctld/login.c  Thu Jun  9 07:19:02 2016(r301720)
@@ -574,13 +574,12 @@ login_negotiate_key(struct pdu *request,
tmp = strtoul(value, NULL, 10);
if (tmp <= 0) {
login_send_error(request, 0x02, 0x00);
-   log_errx(1, "received invalid "
-   "FirstBurstLength");
+   log_errx(1, "received invalid FirstBurstLength");
}
-   if (tmp > conn->conn_data_segment_limit) {
-   log_debugx("capping FirstBurstLength from %zd to %zd",
-   tmp, conn->conn_data_segment_limit);
-   tmp = conn->conn_data_segment_limit;
+   if (tmp > FIRST_BURST_LENGTH) {
+   log_debugx("capping FirstBurstLength from %zd to %d",
+   tmp, FIRST_BURST_LENGTH);
+   tmp = FIRST_BURST_LENGTH;
}
conn->conn_first_burst_length = tmp;
keys_add_int(response_keys, name, tmp);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r301719 - in head/share/man: man4 man5 man9

2016-06-09 Thread Edward Tomasz Napierala
Author: trasz
Date: Thu Jun  9 06:55:00 2016
New Revision: 301719
URL: https://svnweb.freebsd.org/changeset/base/301719

Log:
  Fix a bunch of "xref refers to *this* page" igor(1) warnings.
  
  MFC after:1 month

Modified:
  head/share/man/man4/bcma.4
  head/share/man/man4/dcons.4
  head/share/man/man4/ip.4
  head/share/man/man4/ng_tag.4
  head/share/man/man4/pass.4
  head/share/man/man4/puc.4
  head/share/man/man4/random.4
  head/share/man/man4/witness.4
  head/share/man/man5/ar.5
  head/share/man/man5/elf.5
  head/share/man/man5/nsswitch.conf.5
  head/share/man/man5/rc.conf.5
  head/share/man/man9/BUS_NEW_PASS.9
  head/share/man/man9/pmap.9
  head/share/man/man9/stack.9

Modified: head/share/man/man4/bcma.4
==
--- head/share/man/man4/bcma.4  Thu Jun  9 06:10:20 2016(r301718)
+++ head/share/man/man4/bcma.4  Thu Jun  9 06:55:00 2016(r301719)
@@ -64,7 +64,6 @@ The IP cores used in
 devices were adapted by Broadcom for compatibility with the new
 interconnect.
 .Sh SEE ALSO
-.Xr bcma 4 ,
 .Xr bhnd 4
 .Sh HISTORY
 The

Modified: head/share/man/man4/dcons.4
==
--- head/share/man/man4/dcons.4 Thu Jun  9 06:10:20 2016(r301718)
+++ head/share/man/man4/dcons.4 Thu Jun  9 06:55:00 2016(r301719)
@@ -100,7 +100,7 @@ See
 for more details.
 .Pp
 If you want to use
-.Xr dcons 4
+.Nm
 as a
 .Xr gdb 1
 port, add the following line into

Modified: head/share/man/man4/ip.4
==
--- head/share/man/man4/ip.4Thu Jun  9 06:10:20 2016(r301718)
+++ head/share/man/man4/ip.4Thu Jun  9 06:55:00 2016(r301719)
@@ -122,7 +122,7 @@ may be used to set the Don't Fragment fl
 Currently this option is respected only on
 .Xr udp 4
 and raw
-.Xr ip 4
+.Nm
 sockets, unless the
 .Dv IP_HDRINCL
 option has been set.

Modified: head/share/man/man4/ng_tag.4
==
--- head/share/man/man4/ng_tag.4Thu Jun  9 06:10:20 2016
(r301718)
+++ head/share/man/man4/ng_tag.4Thu Jun  9 06:55:00 2016
(r301719)
@@ -230,7 +230,7 @@ node which will check for the specified 
 packets to
 .Xr ipfw 8 .
 Matching packets are passed to
-.Xr ng_tag 4
+.Nm
 node, which will set a tag and pass them back to
 .Xr ng_bpf 4
 node on a hook programmed to accept all packets and pass them back to
@@ -246,7 +246,7 @@ expressions must be altered accordingly.
 Thus, there will be expression
 .Dq Li "ether[40:2]=0x244c && ether[42:4]=0x6f636b20"
 on incoming hook and empty expression to match all packets from
-.Xr ng_tag 4 .
+.Nm .
 .Pp
 So, this is
 .Xr ngctl 8

Modified: head/share/man/man4/pass.4
==
--- head/share/man/man4/pass.4  Thu Jun  9 06:10:20 2016(r301718)
+++ head/share/man/man4/pass.4  Thu Jun  9 06:55:00 2016(r301719)
@@ -98,7 +98,7 @@ It is probably more useful to issue this
 device.
 .It CAMIOQUEUE union ccb *
 Queue a CCB to the
-.Xr pass 4
+.Nm
 driver to be executed asynchronously.
 The caller may use
 .Xr select 2 ,
@@ -167,7 +167,7 @@ ioctl.
 An error will only be returned from the
 .Dv CAMIOGET
 ioctl if the
-.Xr pass 4
+.Nm
 driver fails to copy data to the user process or if there are no completed
 CCBs available to retrieve.
 If no CCBs are available to retrieve,

Modified: head/share/man/man4/puc.4
==
--- head/share/man/man4/puc.4   Thu Jun  9 06:10:20 2016(r301718)
+++ head/share/man/man4/puc.4   Thu Jun  9 06:55:00 2016(r301719)
@@ -53,5 +53,5 @@ Support for new cards should be added th
 .Sh HISTORY
 This driver took the idea from the
 .Nx
-.Xr puc 4
+.Nm
 driver.

Modified: head/share/man/man4/random.4
==
--- head/share/man/man4/random.4Thu Jun  9 06:10:20 2016
(r301718)
+++ head/share/man/man4/random.4Thu Jun  9 06:55:00 2016
(r301719)
@@ -48,7 +48,7 @@ it is seeded for the first time.
 This may cause trouble at system boot
 when keys and the like
 are generated from
-.Xr random 4
+.Nm
 so steps should be taken to ensure a
 seeding as soon as possible.
 .Pp
@@ -63,7 +63,7 @@ this could be done by
 This sysctl will not return
 random bytes unless
 the
-.Xr random 4
+.Nm
 device is seeded.
 .Pp
 This initial seeding

Modified: head/share/man/man4/witness.4
==
--- head/share/man/man4/witness.4   Thu Jun  9 06:10:20 2016
(r301718)
+++ head/share/man/man4/witness.4   Thu Jun  9 06:55:00 2016
(r301719)
@@ -62,7 +62,7 @@ If any of these checks fail, then the ke
 The
 .Dv WITNESS_COUNT
 kernel 

svn commit: r301718 - in head/contrib/jemalloc: . doc include/jemalloc include/jemalloc/internal src

2016-06-09 Thread Jason Evans
Author: jasone
Date: Thu Jun  9 06:10:20 2016
New Revision: 301718
URL: https://svnweb.freebsd.org/changeset/base/301718

Log:
  Update jemalloc to 4.2.1.

Modified:
  head/contrib/jemalloc/ChangeLog
  head/contrib/jemalloc/FREEBSD-diffs
  head/contrib/jemalloc/VERSION
  head/contrib/jemalloc/doc/jemalloc.3
  head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal.h
  head/contrib/jemalloc/include/jemalloc/internal/prof.h
  head/contrib/jemalloc/include/jemalloc/jemalloc.h
  head/contrib/jemalloc/src/arena.c
  head/contrib/jemalloc/src/chunk.c
  head/contrib/jemalloc/src/chunk_mmap.c
  head/contrib/jemalloc/src/huge.c
  head/contrib/jemalloc/src/jemalloc.c
  head/contrib/jemalloc/src/nstime.c

Modified: head/contrib/jemalloc/ChangeLog
==
--- head/contrib/jemalloc/ChangeLog Thu Jun  9 05:48:34 2016
(r301717)
+++ head/contrib/jemalloc/ChangeLog Thu Jun  9 06:10:20 2016
(r301718)
@@ -4,6 +4,17 @@ brevity.  Much more detail can be found 
 
 https://github.com/jemalloc/jemalloc
 
+* 4.2.1 (June 8, 2016)
+
+  Bug fixes:
+  - Fix bootstrapping issues for configurations that require allocation during
+tsd initialization (e.g. --disable-tls).  (@cferris1000, @jasone)
+  - Fix gettimeofday() version of nstime_update().  (@ronawho)
+  - Fix Valgrind regressions in calloc() and chunk_alloc_wrapper().  (@ronawho)
+  - Fix potential VM map fragmentation regression.  (@jasone)
+  - Fix opt_zero-triggered in-place huge reallocation zeroing.  (@jasone)
+  - Fix heap profiling context leaks in reallocation edge cases.  (@jasone)
+
 * 4.2.0 (May 12, 2016)
 
   New features:

Modified: head/contrib/jemalloc/FREEBSD-diffs
==
--- head/contrib/jemalloc/FREEBSD-diffs Thu Jun  9 05:48:34 2016
(r301717)
+++ head/contrib/jemalloc/FREEBSD-diffs Thu Jun  9 06:10:20 2016
(r301718)
@@ -79,7 +79,7 @@ index b1de2b6..da6b6d2 100644
  
  JEMALLOC_ALWAYS_INLINE size_t
 diff --git a/include/jemalloc/internal/jemalloc_internal.h.in 
b/include/jemalloc/internal/jemalloc_internal.h.in
-index 51bf897..7de22ea 100644
+index 8f82edd..78e2df2 100644
 --- a/include/jemalloc/internal/jemalloc_internal.h.in
 +++ b/include/jemalloc/internal/jemalloc_internal.h.in
 @@ -8,6 +8,9 @@
@@ -335,7 +335,7 @@ index f943891..47d032c 100755
 +#include "jemalloc_FreeBSD.h"
  EOF
 diff --git a/src/jemalloc.c b/src/jemalloc.c
-index 40eb2ea..666c49d 100644
+index 5d1f493..46dd1d1 100644
 --- a/src/jemalloc.c
 +++ b/src/jemalloc.c
 @@ -4,6 +4,10 @@

Modified: head/contrib/jemalloc/VERSION
==
--- head/contrib/jemalloc/VERSION   Thu Jun  9 05:48:34 2016
(r301717)
+++ head/contrib/jemalloc/VERSION   Thu Jun  9 06:10:20 2016
(r301718)
@@ -1 +1 @@
-4.2.0-1-gdc7ff6306d7a15b53479e2fb8e5546404b82e6fc
+4.2.1-0-g3de035335255d553bdb344c32ffdb603816195d8

Modified: head/contrib/jemalloc/doc/jemalloc.3
==
--- head/contrib/jemalloc/doc/jemalloc.3Thu Jun  9 05:48:34 2016
(r301717)
+++ head/contrib/jemalloc/doc/jemalloc.3Thu Jun  9 06:10:20 2016
(r301718)
@@ -2,12 +2,12 @@
 .\" Title: JEMALLOC
 .\"Author: Jason Evans
 .\" Generator: DocBook XSL Stylesheets v1.76.1 
-.\"  Date: 05/12/2016
+.\"  Date: 06/08/2016
 .\"Manual: User Manual
-.\"Source: jemalloc 4.2.0-1-gdc7ff6306d7a15b53479e2fb8e5546404b82e6fc
+.\"Source: jemalloc 4.2.1-0-g3de035335255d553bdb344c32ffdb603816195d8
 .\"  Language: English
 .\"
-.TH "JEMALLOC" "3" "05/12/2016" "jemalloc 4.2.0-1-gdc7ff6306d7a" "User Manual"
+.TH "JEMALLOC" "3" "06/08/2016" "jemalloc 4.2.1-0-g3de035335255" "User Manual"
 .\" -
 .\" * Define some portability stuff
 .\" -
@@ -31,7 +31,7 @@
 jemalloc \- general purpose memory allocation functions
 .SH "LIBRARY"
 .PP
-This manual describes jemalloc 
4\&.2\&.0\-1\-gdc7ff6306d7a15b53479e2fb8e5546404b82e6fc\&. More information can 
be found at the
+This manual describes jemalloc 
4\&.2\&.1\-0\-g3de035335255d553bdb344c32ffdb603816195d8\&. More information can 
be found at the
 \m[blue]\fBjemalloc website\fR\m[]\&\s-2\u[1]\d\s+2\&.
 .PP
 The following configuration options are enabled in libc\*(Aqs built\-in 
jemalloc:

Modified: head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal.h
==
--- head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal.h Thu Jun 
 9 05:48:34 2016(r301717)
+++ head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal.h Thu Jun 
 9 06:10:20 2016(r301718)
@@ -751,7 +751,7