svn commit: r292277 - head/sys/kern

2015-12-15 Thread Jamie Gritton
Author: jamie
Date: Tue Dec 15 17:25:00 2015
New Revision: 292277
URL: https://svnweb.freebsd.org/changeset/base/292277

Log:
  Fix jail name checking that disallowed anything that starts with '0'.
  The intention was to just limit leading zeroes on numeric names.  That
  check is now improved to also catch the leading spaces and '+' that
  strtoul can pass through.
  
  PR:   204897
  MFC after:3 days

Modified:
  head/sys/kern/kern_jail.c

Modified: head/sys/kern/kern_jail.c
==
--- head/sys/kern/kern_jail.c   Tue Dec 15 16:04:45 2015(r292276)
+++ head/sys/kern/kern_jail.c   Tue Dec 15 17:25:00 2015(r292277)
@@ -1580,11 +1580,14 @@ kern_jail_set(struct thread *td, struct 
 #endif
onamelen = namelen = 0;
if (name != NULL) {
-   /* Give a default name of the jid. */
+   /* Give a default name of the jid.  Also allow the name to be
+* explicitly the jid - but not any other number, and only in
+* normal form (no leading zero/etc).
+*/
if (name[0] == '\0')
snprintf(name = numbuf, sizeof(numbuf), "%d", jid);
-   else if (*namelc == '0' || (strtoul(namelc, , 10) != jid &&
-   *p == '\0')) {
+   else if ((strtoul(namelc, , 10) != jid ||
+ namelc[0] < '1' || namelc[0] > '9') && *p == '\0') {
error = EINVAL;
vfs_opterror(opts,
"name cannot be numeric (unless it is the jid)");
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r292279 - head/sys/dev/usb/wlan

2015-12-15 Thread Andriy Voskoboinyk
Author: avos
Date: Tue Dec 15 17:59:13 2015
New Revision: 292279
URL: https://svnweb.freebsd.org/changeset/base/292279

Log:
  urtwn: fix off-by-one error.
  
  Reported by:  adrian

Modified:
  head/sys/dev/usb/wlan/if_urtwnvar.h

Modified: head/sys/dev/usb/wlan/if_urtwnvar.h
==
--- head/sys/dev/usb/wlan/if_urtwnvar.h Tue Dec 15 17:58:10 2015
(r292278)
+++ head/sys/dev/usb/wlan/if_urtwnvar.h Tue Dec 15 17:59:13 2015
(r292279)
@@ -170,7 +170,7 @@ struct urtwn_softc {
int, uint8_t, uint32_t);
int (*sc_power_on)(struct urtwn_softc *);
 
-   struct ieee80211_node   *node_list[R88E_MACID_MAX];
+   struct ieee80211_node   *node_list[R88E_MACID_MAX + 1];
struct mtx  nt_mtx;
 
uint8_t board_type;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


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

2015-12-15 Thread Svatopluk Kraus
Author: skra
Date: Tue Dec 15 16:04:45 2015
New Revision: 292276
URL: https://svnweb.freebsd.org/changeset/base/292276

Log:
  Local TLB flush is sufficient in pmap_remove_pages().
  
  (1) The pmap argument passed to the function must be current pmap only.
  (2) The process must be single threaded as the function is called either
  when a process is exiting or from exec_new_vmspace().
  
  Remove pmap_tlb_flush_ng() which is not used anywhere now.
  
  Approved by:  kib (mentor)

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

Modified: head/sys/arm/arm/pmap-v6-new.c
==
--- head/sys/arm/arm/pmap-v6-new.c  Tue Dec 15 16:02:11 2015
(r292275)
+++ head/sys/arm/arm/pmap-v6-new.c  Tue Dec 15 16:04:45 2015
(r292276)
@@ -1380,14 +1380,6 @@ pmap_tlb_flush_range(pmap_t pmap, vm_off
tlb_flush_range(sva, size);
 }
 
-PMAP_INLINE void
-pmap_tlb_flush_ng(pmap_t pmap)
-{
-
-   if (pmap == kernel_pmap || !CPU_EMPTY(>pm_active))
-   tlb_flush_all_ng();
-}
-
 /*
  *  Abuse the pte2 nodes for unmapped kva to thread a kva freelist through.
  *  Requirements:
@@ -4233,8 +4225,8 @@ pmap_remove_pages(pmap_t pmap)
free_pv_chunk(pc);
}
}
+   tlb_flush_all_ng_local();
sched_unpin();
-   pmap_tlb_flush_ng(pmap);
rw_wunlock(_global_lock);
PMAP_UNLOCK(pmap);
pmap_free_zero_pages();

Modified: head/sys/arm/include/pmap-v6.h
==
--- head/sys/arm/include/pmap-v6.h  Tue Dec 15 16:02:11 2015
(r292275)
+++ head/sys/arm/include/pmap-v6.h  Tue Dec 15 16:04:45 2015
(r292276)
@@ -196,7 +196,6 @@ void pmap_set_pcb_pagedir(pmap_t , struc
 
 void pmap_tlb_flush(pmap_t , vm_offset_t );
 void pmap_tlb_flush_range(pmap_t , vm_offset_t , vm_size_t );
-void pmap_tlb_flush_ng(pmap_t );
 
 void pmap_dcache_wb_range(vm_paddr_t , vm_size_t , vm_memattr_t );
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r292257 - head/contrib/mdocml

2015-12-15 Thread John Baldwin
On Tuesday, December 15, 2015 10:26:47 AM Christian Brueffer wrote:
> Author: brueffer
> Date: Tue Dec 15 10:26:47 2015
> New Revision: 292257
> URL: https://svnweb.freebsd.org/changeset/base/292257
> 
> Log:
>   Add entry for lib80211; fix a typo in libsysdecode.

Thanks for the fix.

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


svn commit: r292284 - head/share/man/man5

2015-12-15 Thread Bryan Drewery
Author: bdrewery
Date: Tue Dec 15 18:44:28 2015
New Revision: 292284
URL: https://svnweb.freebsd.org/changeset/base/292284

Log:
  Regenerate after r292283.

Modified:
  head/share/man/man5/src.conf.5

Modified: head/share/man/man5/src.conf.5
==
--- head/share/man/man5/src.conf.5  Tue Dec 15 18:42:30 2015
(r292283)
+++ head/share/man/man5/src.conf.5  Tue Dec 15 18:44:28 2015
(r292284)
@@ -1,7 +1,7 @@
 .\" DO NOT EDIT-- this file is automatically generated.
-.\" from FreeBSD: head/tools/build/options/makeman 291414 2015-11-28 00:41:37Z 
ume
+.\" from FreeBSD: head/tools/build/options/makeman 292283 2015-12-15 18:42:30Z 
bdrewery
 .\" $FreeBSD$
-.Dd December 8, 2015
+.Dd December 15, 2015
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -72,11 +72,14 @@ for the build can be controlled via the
 variable, which defaults to
 .Pa /etc/src-env.conf .
 Some examples that may only be set in this file are
-.Va MAKEOBJDIRPREFIX ,
 .Va WITH_DIRDEPS_BUILD ,
 and
 .Va WITH_META_MODE
 as they are environment-only variables.
+Note that
+.Va MAKEOBJDIRPREFIX
+may be set here only when using
+.Va WITH_DIRDEPS_BUILD .
 .Pp
 The values of variables are ignored regardless of their setting;
 even if they would be set to
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r292283 - head/tools/build/options

2015-12-15 Thread Bryan Drewery
Author: bdrewery
Date: Tue Dec 15 18:42:30 2015
New Revision: 292283
URL: https://svnweb.freebsd.org/changeset/base/292283

Log:
  Correct comment about MAKEOBJDIRPREFIX in src-env.conf.
  
  It may only be used with WITH_AUTO_OBJ, which the WITH_DIRDEPS_BUILD does.  We
  could support this in the normal build as well if we forced creating the 
directory
  and setting .OBJDIR.
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/tools/build/options/makeman

Modified: head/tools/build/options/makeman
==
--- head/tools/build/options/makemanTue Dec 15 18:09:03 2015
(r292282)
+++ head/tools/build/options/makemanTue Dec 15 18:42:30 2015
(r292283)
@@ -197,11 +197,14 @@ for the build can be controlled via the
 variable, which defaults to
 .Pa /etc/src-env.conf .
 Some examples that may only be set in this file are
-.Va MAKEOBJDIRPREFIX ,
 .Va WITH_DIRDEPS_BUILD ,
 and
 .Va WITH_META_MODE
 as they are environment-only variables.
+Note that
+.Va MAKEOBJDIRPREFIX
+may be set here only when using
+.Va WITH_DIRDEPS_BUILD .
 .Pp
 The values of variables are ignored regardless of their setting;
 even if they would be set to
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r292287 - head/secure/lib/libcrypto/engines

2015-12-15 Thread Bryan Drewery
Author: bdrewery
Date: Tue Dec 15 19:57:56 2015
New Revision: 292287
URL: https://svnweb.freebsd.org/changeset/base/292287

Log:
  Build engines in parallel.
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/secure/lib/libcrypto/engines/Makefile

Modified: head/secure/lib/libcrypto/engines/Makefile
==
--- head/secure/lib/libcrypto/engines/Makefile  Tue Dec 15 19:52:02 2015
(r292286)
+++ head/secure/lib/libcrypto/engines/Makefile  Tue Dec 15 19:57:56 2015
(r292287)
@@ -2,5 +2,5 @@
 
 SUBDIR=lib4758cca libaep libatalla libcapi libchil libcswift libgost \
libnuron libsureware libubsec
-
+SUBDIR_PARALLEL=
 .include 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r292254 - head/sys/netpfil/ipfw

2015-12-15 Thread Hans Petter Selasky
Author: hselasky
Date: Tue Dec 15 09:02:05 2015
New Revision: 292254
URL: https://svnweb.freebsd.org/changeset/base/292254

Log:
  Properly drain callouts in the IPFW subsystem to avoid use after free
  panics when unloading the dummynet and IPFW modules:
  
  - The callout drain function can sleep and should not be called having
  a non-sleepable lock locked. Remove locks around "ipfw_dyn_uninit(0)".
  
  - Add a new "dn_gone" variable to prevent asynchronous restart of
  dummynet callouts when unloading the dummynet kernel module.
  
  - Call "dn_reschedule()" locked so that "dn_gone" can be set and
  checked atomically with regard to starting a new callout.
  
  Reviewed by:  hiren
  MFC after:1 week
  Differential Revision:https://reviews.freebsd.org/D3855

Modified:
  head/sys/netpfil/ipfw/ip_dn_io.c
  head/sys/netpfil/ipfw/ip_dummynet.c
  head/sys/netpfil/ipfw/ip_fw2.c

Modified: head/sys/netpfil/ipfw/ip_dn_io.c
==
--- head/sys/netpfil/ipfw/ip_dn_io.cTue Dec 15 06:01:02 2015
(r292253)
+++ head/sys/netpfil/ipfw/ip_dn_io.cTue Dec 15 09:02:05 2015
(r292254)
@@ -711,8 +711,8 @@ dummynet_task(void *context, int pending
dn_drain_queue();
}
 
-   DN_BH_WUNLOCK();
dn_reschedule();
+   DN_BH_WUNLOCK();
if (q.head != NULL)
dummynet_send(q.head);
CURVNET_RESTORE();

Modified: head/sys/netpfil/ipfw/ip_dummynet.c
==
--- head/sys/netpfil/ipfw/ip_dummynet.c Tue Dec 15 06:01:02 2015
(r292253)
+++ head/sys/netpfil/ipfw/ip_dummynet.c Tue Dec 15 09:02:05 2015
(r292254)
@@ -75,6 +75,7 @@ struct schk_new_arg {
 
 /* callout hooks. */
 static struct callout dn_timeout;
+static int dn_gone;
 static struct task dn_task;
 static struct taskqueue*dn_tq = NULL;
 
@@ -90,6 +91,8 @@ void
 dn_reschedule(void)
 {
 
+   if (dn_gone != 0)
+   return;
callout_reset_sbt(_timeout, tick_sbt, 0, dummynet, NULL,
C_HARDCLOCK | C_DIRECT_EXEC);
 }
@@ -2179,9 +2182,11 @@ ip_dn_init(void)
 static void
 ip_dn_destroy(int last)
 {
-   callout_drain(_timeout);
-
DN_BH_WLOCK();
+   /* ensure no more callouts are started */
+   dn_gone = 1;
+
+   /* check for last */
if (last) {
ND("removing last instance\n");
ip_dn_ctl_ptr = NULL;
@@ -2190,6 +2195,8 @@ ip_dn_destroy(int last)
 
dummynet_flush();
DN_BH_WUNLOCK();
+
+   callout_drain(_timeout);
taskqueue_drain(dn_tq, _task);
taskqueue_free(dn_tq);
 

Modified: head/sys/netpfil/ipfw/ip_fw2.c
==
--- head/sys/netpfil/ipfw/ip_fw2.c  Tue Dec 15 06:01:02 2015
(r292253)
+++ head/sys/netpfil/ipfw/ip_fw2.c  Tue Dec 15 09:02:05 2015
(r292254)
@@ -2814,11 +2814,10 @@ vnet_ipfw_uninit(const void *unused)
 
IPFW_UH_WLOCK(chain);
IPFW_UH_WUNLOCK(chain);
-   IPFW_UH_WLOCK(chain);
 
-   IPFW_WLOCK(chain);
ipfw_dyn_uninit(0); /* run the callout_drain */
-   IPFW_WUNLOCK(chain);
+
+   IPFW_UH_WLOCK(chain);
 
reap = NULL;
IPFW_WLOCK(chain);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r292236 - in head: contrib/mdocml lib lib/libc/sys lib/libsysdecode share/mk usr.bin/kdump usr.bin/truss

2015-12-15 Thread Roman Divacky
On Tue, Dec 15, 2015 at 12:05:07AM +, John Baldwin wrote:
> Author: jhb
> Date: Tue Dec 15 00:05:07 2015
> New Revision: 292236
> URL: https://svnweb.freebsd.org/changeset/base/292236
> 
> Log:
>   Start on a new library (libsysdecode) that provides routines for decoding
>   system call information such as system call arguments.  Initially this
>   will consist of pulling duplicated code out of truss and kdump though it
>   may prove useful for other utilities in the future.
>   
>   This commit moves the shared utrace(2) record parser out of kdump into
>   the library and updates kdump and truss to use it.  One difference from
>   the previous version is that the library version treats unknown events
>   that start with the "RTLD" signature as unknown events.  This simplifies
>   the interface and allows the consumer to decide how to handle all
>   non-recognized events.  Instead, this function only generates a string
>   description for known malloc() and RTLD records.
>   
>   Reviewed by:bdrewery
>   Differential Revision:  https://reviews.freebsd.org/D4537
> 
> Added:
>   head/lib/libsysdecode/
>   head/lib/libsysdecode/Makefile   (contents, props changed)
>   head/lib/libsysdecode/sysdecode.3   (contents, props changed)
>   head/lib/libsysdecode/sysdecode.h   (contents, props changed)
>   head/lib/libsysdecode/sysdecode_utrace.3   (contents, props changed)
>   head/lib/libsysdecode/utrace.c
>  - copied, changed from r292235, head/usr.bin/kdump/utrace.c
> Deleted:
>   head/usr.bin/kdump/utrace.c
> Modified:
>   head/contrib/mdocml/lib.in
>   head/lib/Makefile
>   head/lib/libc/sys/utrace.2
>   head/share/mk/bsd.libnames.mk
>   head/share/mk/src.libnames.mk
>   head/usr.bin/kdump/Makefile
>   head/usr.bin/kdump/Makefile.depend
>   head/usr.bin/kdump/kdump.c
>   head/usr.bin/truss/Makefile
>   head/usr.bin/truss/Makefile.depend.amd64
>   head/usr.bin/truss/syscalls.c
> 
> Modified: head/contrib/mdocml/lib.in
> ==
> --- head/contrib/mdocml/lib.inMon Dec 14 23:25:31 2015
> (r292235)
> +++ head/contrib/mdocml/lib.inTue Dec 15 00:05:07 2015
> (r292236)
> @@ -110,6 +110,7 @@ LINE("libsdp","Bluetooth Service Disco
>  LINE("libssp",   "Buffer Overflow Protection Library (libssp, 
> \\-lssp)")
>  LINE("libstdthreads","C11 Threads Library (libstdthreads, 
> \\-lstdthreads)")
>  LINE("libSystem","System Library (libSystem, \\-lSystem)")
> +LINE("libsysdcode",  "System Argument Decoding Library (libsysdecode, 
> \\-lsysdecode)")

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


svn commit: r292255 - head/sys/x86/x86

2015-12-15 Thread Roger Pau Monné
Author: royger
Date: Tue Dec 15 10:07:03 2015
New Revision: 292255
URL: https://svnweb.freebsd.org/changeset/base/292255

Log:
  x86/bounce: try to always completely fill bounce pages
  
  Current code doesn't try to make use of the full page when bouncing because
  the size is only expanded to be a multiple of the alignment. Instead try to
  always create segments of PAGE_SIZE when using bounce pages.
  
  This allows us to remove the specific casing done for
  BUS_DMA_KEEP_PG_OFFSET, since the requirement is to make sure the offsets
  into contiguous segments are aligned, and now this is done by default.
  
  Sponsored by: Citrix Systems R
  Reviewed by:  hps, kib
  Differential revision:https://reviews.freebsd.org/D4119

Modified:
  head/sys/x86/x86/busdma_bounce.c

Modified: head/sys/x86/x86/busdma_bounce.c
==
--- head/sys/x86/x86/busdma_bounce.cTue Dec 15 09:02:05 2015
(r292254)
+++ head/sys/x86/x86/busdma_bounce.cTue Dec 15 10:07:03 2015
(r292255)
@@ -476,8 +476,7 @@ _bus_dmamap_count_phys(bus_dma_tag_t dma
while (buflen != 0) {
sgsize = MIN(buflen, dmat->common.maxsegsz);
if (bus_dma_run_filter(>common, curaddr)) {
-   sgsize = MIN(sgsize,
-   PAGE_SIZE - (curaddr & PAGE_MASK));
+   sgsize = MIN(PAGE_SIZE, sgsize);
map->pagesneeded++;
}
curaddr += sgsize;
@@ -517,8 +516,7 @@ _bus_dmamap_count_pages(bus_dma_tag_t dm
else
paddr = pmap_extract(pmap, vaddr);
if (bus_dma_run_filter(>common, paddr) != 0) {
-   sg_len = roundup2(sg_len,
-   dmat->common.alignment);
+   sg_len = PAGE_SIZE;
map->pagesneeded++;
}
vaddr += sg_len;
@@ -554,9 +552,7 @@ _bus_dmamap_count_ma(bus_dma_tag_t dmat,
max_sgsize = MIN(buflen, dmat->common.maxsegsz);
sg_len = MIN(sg_len, max_sgsize);
if (bus_dma_run_filter(>common, paddr) != 0) {
-   sg_len = roundup2(sg_len,
-   dmat->common.alignment);
-   sg_len = MIN(sg_len, max_sgsize);
+   sg_len = MIN(PAGE_SIZE, max_sgsize);
KASSERT((sg_len & (dmat->common.alignment - 1))
== 0, ("Segment size is not aligned"));
map->pagesneeded++;
@@ -652,7 +648,7 @@ bounce_bus_dmamap_load_phys(bus_dma_tag_
 int *segp)
 {
bus_size_t sgsize;
-   bus_addr_t curaddr;
+   bus_addr_t curaddr, nextaddr;
int error;
 
if (map == NULL)
@@ -676,9 +672,12 @@ bounce_bus_dmamap_load_phys(bus_dma_tag_
if (((dmat->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0) &&
map->pagesneeded != 0 &&
bus_dma_run_filter(>common, curaddr)) {
-   sgsize = MIN(sgsize, PAGE_SIZE - (curaddr & PAGE_MASK));
-   curaddr = add_bounce_page(dmat, map, 0, curaddr, 0,
-   sgsize);
+   nextaddr = 0;
+   sgsize = MIN(PAGE_SIZE, sgsize);
+   if ((curaddr & PAGE_MASK) + sgsize > PAGE_SIZE)
+   nextaddr = roundup2(curaddr, PAGE_SIZE);
+   curaddr = add_bounce_page(dmat, map, 0, curaddr,
+   nextaddr, sgsize);
}
sgsize = _bus_dmamap_addseg(dmat, map, curaddr, sgsize, segs,
segp);
@@ -744,8 +743,7 @@ bounce_bus_dmamap_load_buffer(bus_dma_ta
if (((dmat->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0) &&
map->pagesneeded != 0 &&
bus_dma_run_filter(>common, curaddr)) {
-   sgsize = roundup2(sgsize, dmat->common.alignment);
-   sgsize = MIN(sgsize, max_sgsize);
+   sgsize = MIN(PAGE_SIZE, max_sgsize);
curaddr = add_bounce_page(dmat, map, kvaddr, curaddr, 0,
sgsize);
} else {
@@ -774,17 +772,6 @@ bounce_bus_dmamap_load_ma(bus_dma_tag_t 
int error, page_index;
bus_size_t sgsize, max_sgsize;
 
-   if (dmat->common.flags & BUS_DMA_KEEP_PG_OFFSET) {
-   /*
-* If we have to keep the offset of each page this function
-* is not suitable, switch back to bus_dmamap_load_ma_triv
-* which is going to do 

svn commit: r292256 - head/lib/lib80211

2015-12-15 Thread Christian Brueffer
Author: brueffer
Date: Tue Dec 15 10:24:48 2015
New Revision: 292256
URL: https://svnweb.freebsd.org/changeset/base/292256

Log:
  Minor spelling, mdoc and style cleanup.

Modified:
  head/lib/lib80211/lib80211.3

Modified: head/lib/lib80211/lib80211.3
==
--- head/lib/lib80211/lib80211.3Tue Dec 15 10:07:03 2015
(r292255)
+++ head/lib/lib80211/lib80211.3Tue Dec 15 10:24:48 2015
(r292256)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd November 24, 2015
+.Dd December 15, 2015
 .Dt 80211 3
 .Os
 .Sh NAME
@@ -87,14 +87,14 @@ The
 .Fn lib80211_regdomain_findbysku
 and
 .Fn lib80211_regdomain_findbyname
-functions lookup a regulatory domain entry by SKU enum and SKU name
+functions look up a regulatory domain entry by SKU enum and SKU name
 respectively.
 .Pp
 The
 .Fn lib80211_country_findbycc
 and
 .Fn lib80211_country_findbyname
-functions lookup a country information entry by ISO country enum and
+functions look up a country information entry by ISO country enum and
 ISO country code string respectively.
 .Sh RETURN VALUES
 The
@@ -104,11 +104,12 @@ The
 .Fn lib80211_regdomain_findbyname ,
 .Fn lib80211_country_findbycc ,
 .Fn lib80211_country_findbyname
-return NULL upon error.
-
+return
+.Dv NULL
+upon error.
 .Sh SEE ALSO
-.Xr ifconfig 8 ,
-.Xr net80211 4
+.Xr net80211 4 ,
+.Xr ifconfig 8
 .Sh HISTORY
 The
 .Nm lib80211
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r292257 - head/contrib/mdocml

2015-12-15 Thread Christian Brueffer
Author: brueffer
Date: Tue Dec 15 10:26:47 2015
New Revision: 292257
URL: https://svnweb.freebsd.org/changeset/base/292257

Log:
  Add entry for lib80211; fix a typo in libsysdecode.

Modified:
  head/contrib/mdocml/lib.in

Modified: head/contrib/mdocml/lib.in
==
--- head/contrib/mdocml/lib.in  Tue Dec 15 10:24:48 2015(r292256)
+++ head/contrib/mdocml/lib.in  Tue Dec 15 10:26:47 2015(r292257)
@@ -24,6 +24,7 @@
  * Be sure to escape strings.
  */
 
+LINE("lib80211",   "802.11 Wireless Network Management Library (lib80211, 
\\-l80211)")
 LINE("libarchive", "Streaming Archive Library (libarchive, \\-larchive)")
 LINE("libarm", "ARM Architecture Library (libarm, \\-larm)")
 LINE("libarm32",   "ARM32 Architecture Library (libarm32, \\-larm32)")
@@ -110,7 +111,7 @@ LINE("libsdp",  "Bluetooth Service Disco
 LINE("libssp", "Buffer Overflow Protection Library (libssp, \\-lssp)")
 LINE("libstdthreads",  "C11 Threads Library (libstdthreads, \\-lstdthreads)")
 LINE("libSystem",  "System Library (libSystem, \\-lSystem)")
-LINE("libsysdcode","System Argument Decoding Library (libsysdecode, 
\\-lsysdecode)")
+LINE("libsysdecode",   "System Argument Decoding Library (libsysdecode, 
\\-lsysdecode)")
 LINE("libtacplus", "TACACS+ Client Library (libtacplus, \\-ltacplus)")
 LINE("libtcplay",  "TrueCrypt-compatible API library (libtcplay, 
\\-ltcplay)")
 LINE("libtermcap", "Termcap Access Library (libtermcap, \\-ltermcap)")
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r292258 - head/sys/dev/hyperv/utilities

2015-12-15 Thread Roger Pau Monné
Author: royger
Date: Tue Dec 15 11:20:20 2015
New Revision: 292258
URL: https://svnweb.freebsd.org/changeset/base/292258

Log:
  hyperv/kvp: wake up the daemon if it's sleeping due to poll()
  
  Without the patch, there is a race condition: when poll() is invoked(),
  if kvp_globals.daemon_busy is false, the daemon won't be timely
  woke up, because hv_kvp_send_msg_to_daemon() can't wake up the daemon
  in this case.
  
  Submitted by:   Dexuan Cui 
  Sponsored by: Microsoft OSTC
  Reviewed by:  delphij, royger
  MFC after:3 days
  Differential Revision:https://reviews.freebsd.org/D4258

Modified:
  head/sys/dev/hyperv/utilities/hv_kvp.c

Modified: head/sys/dev/hyperv/utilities/hv_kvp.c
==
--- head/sys/dev/hyperv/utilities/hv_kvp.c  Tue Dec 15 10:26:47 2015
(r292257)
+++ head/sys/dev/hyperv/utilities/hv_kvp.c  Tue Dec 15 11:20:20 2015
(r292258)
@@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -114,6 +115,8 @@ static struct cdev *hv_kvp_dev;
 static struct hv_kvp_msg *hv_kvp_dev_buf;
 struct proc *daemon_task;
 
+static struct selinfo hv_kvp_selinfo;
+
 /*
  * Global state to track and synchronize multiple
  * KVP transaction requests from the host.
@@ -628,6 +631,9 @@ hv_kvp_send_msg_to_daemon(void)
 
/* Send the msg to user via function deamon_read - setting sema */
sema_post(_globals.dev_sema);
+
+   /* We should wake up the daemon, in case it's doing poll() */
+   selwakeup(_kvp_selinfo);
 }
 
 
@@ -940,7 +946,7 @@ hv_kvp_dev_daemon_write(struct cdev *dev
  * for daemon to read.
  */
 static int
-hv_kvp_dev_daemon_poll(struct cdev *dev __unused, int events, struct thread 
*td  __unused)
+hv_kvp_dev_daemon_poll(struct cdev *dev __unused, int events, struct thread 
*td)
 {
int revents = 0;
 
@@ -953,6 +959,9 @@ hv_kvp_dev_daemon_poll(struct cdev *dev 
 */
if (kvp_globals.daemon_busy == true)
revents = POLLIN;
+   else
+   selrecord(td, _kvp_selinfo);
+
mtx_unlock(_globals.pending_mutex);
 
return (revents);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r292236 - in head: contrib/mdocml lib lib/libc/sys lib/libsysdecode share/mk usr.bin/kdump usr.bin/truss

2015-12-15 Thread Christian Brueffer
On 2015-12-15 10:56, Roman Divacky wrote:
> On Tue, Dec 15, 2015 at 12:05:07AM +, John Baldwin wrote:
>> Author: jhb
>> Date: Tue Dec 15 00:05:07 2015
>> New Revision: 292236
>> URL: https://svnweb.freebsd.org/changeset/base/292236
>>
>> Log:
>>   Start on a new library (libsysdecode) that provides routines for decoding
>>   system call information such as system call arguments.  Initially this
>>   will consist of pulling duplicated code out of truss and kdump though it
>>   may prove useful for other utilities in the future.
>>   
>>   This commit moves the shared utrace(2) record parser out of kdump into
>>   the library and updates kdump and truss to use it.  One difference from
>>   the previous version is that the library version treats unknown events
>>   that start with the "RTLD" signature as unknown events.  This simplifies
>>   the interface and allows the consumer to decide how to handle all
>>   non-recognized events.  Instead, this function only generates a string
>>   description for known malloc() and RTLD records.
>>   
>>   Reviewed by:   bdrewery
>>   Differential Revision: https://reviews.freebsd.org/D4537
>>
>> Added:
>>   head/lib/libsysdecode/
>>   head/lib/libsysdecode/Makefile   (contents, props changed)
>>   head/lib/libsysdecode/sysdecode.3   (contents, props changed)
>>   head/lib/libsysdecode/sysdecode.h   (contents, props changed)
>>   head/lib/libsysdecode/sysdecode_utrace.3   (contents, props changed)
>>   head/lib/libsysdecode/utrace.c
>>  - copied, changed from r292235, head/usr.bin/kdump/utrace.c
>> Deleted:
>>   head/usr.bin/kdump/utrace.c
>> Modified:
>>   head/contrib/mdocml/lib.in
>>   head/lib/Makefile
>>   head/lib/libc/sys/utrace.2
>>   head/share/mk/bsd.libnames.mk
>>   head/share/mk/src.libnames.mk
>>   head/usr.bin/kdump/Makefile
>>   head/usr.bin/kdump/Makefile.depend
>>   head/usr.bin/kdump/kdump.c
>>   head/usr.bin/truss/Makefile
>>   head/usr.bin/truss/Makefile.depend.amd64
>>   head/usr.bin/truss/syscalls.c
>>
>> Modified: head/contrib/mdocml/lib.in
>> ==
>> --- head/contrib/mdocml/lib.in   Mon Dec 14 23:25:31 2015
>> (r292235)
>> +++ head/contrib/mdocml/lib.in   Tue Dec 15 00:05:07 2015
>> (r292236)
>> @@ -110,6 +110,7 @@ LINE("libsdp",   "Bluetooth Service Disco
>>  LINE("libssp",  "Buffer Overflow Protection Library (libssp, 
>> \\-lssp)")
>>  LINE("libstdthreads",   "C11 Threads Library (libstdthreads, 
>> \\-lstdthreads)")
>>  LINE("libSystem",   "System Library (libSystem, \\-lSystem)")
>> +LINE("libsysdcode", "System Argument Decoding Library (libsysdecode, 
>> \\-lsysdecode)")
> 
> Is this a typo?
> 

It is; fixed in r292257.

Good spotting!

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


svn commit: r292289 - head/sys/geom/multipath

2015-12-15 Thread Steven Hartland
Author: smh
Date: Tue Dec 15 21:11:41 2015
New Revision: 292289
URL: https://svnweb.freebsd.org/changeset/base/292289

Log:
  Prevent g_access calls to bad multipath members
  
  When a multipath member is orphaned its access members are zeroed before its
  removed if marked for wither, so prevent any future calls to g_access on
  such members.
  
  This prevents a panic on debug kernels which validates the resultant values
  aren't negative.
  
  Reviewed by:  mav
  MFC after:2 weeks
  Sponsored by: Multiplay
  Differential Revision:https://reviews.freebsd.org/D4416

Modified:
  head/sys/geom/multipath/g_multipath.c

Modified: head/sys/geom/multipath/g_multipath.c
==
--- head/sys/geom/multipath/g_multipath.c   Tue Dec 15 21:02:53 2015
(r292288)
+++ head/sys/geom/multipath/g_multipath.c   Tue Dec 15 21:11:41 2015
(r292289)
@@ -107,8 +107,9 @@ struct g_class g_multipath_class = {
 #defineMP_NEW  0x0004
 #defineMP_POSTED   0x0008
 #defineMP_BAD  (MP_FAIL | MP_LOST | MP_NEW)
-#define MP_IDLE0x0010
-#define MP_IDLE_MASK   0xfff0
+#defineMP_WITHER   0x0010
+#defineMP_IDLE 0x0020
+#defineMP_IDLE_MASK0xffe0
 
 static int
 g_multipath_good(struct g_geom *gp)
@@ -204,6 +205,7 @@ g_mpd(void *arg, int flags __unused)
g_access(cp, -cp->acr, -cp->acw, -cp->ace);
if (w > 0 && cp->provider != NULL &&
(cp->provider->geom->flags & G_GEOM_WITHER) == 0) {
+   cp->index |= MP_WITHER;
g_post_event(g_mpd, cp, M_WAITOK, NULL);
return;
}
@@ -467,23 +469,37 @@ g_multipath_access(struct g_provider *pp
 
gp = pp->geom;
 
+   /* Error used if we have no valid consumers. */
+   error = ENXIO;
+
LIST_FOREACH(cp, >consumer, consumer) {
+   if (cp->index & MP_WITHER)
+   continue;
+
error = g_access(cp, dr, dw, de);
if (error) {
badcp = cp;
goto fail;
}
}
+
+   if (error != 0)
+   return (error);
+
sc = gp->softc;
sc->sc_opened += dr + dw + de;
if (sc->sc_stopping && sc->sc_opened == 0)
g_multipath_destroy(gp);
+
return (0);
 
 fail:
LIST_FOREACH(cp, >consumer, consumer) {
if (cp == badcp)
break;
+   if (cp->index & MP_WITHER)
+   continue;
+
(void) g_access(cp, -dr, -dw, -de);
}
return (error);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r292290 - head/sys/cam/ctl

2015-12-15 Thread Alexander Motin
Author: mav
Date: Tue Dec 15 21:19:32 2015
New Revision: 292290
URL: https://svnweb.freebsd.org/changeset/base/292290

Log:
  Set DS flag, required for LPB log page by spec.
  
  MFC after:1 week

Modified:
  head/sys/cam/ctl/ctl.c

Modified: head/sys/cam/ctl/ctl.c
==
--- head/sys/cam/ctl/ctl.c  Tue Dec 15 21:11:41 2015(r292289)
+++ head/sys/cam/ctl/ctl.c  Tue Dec 15 21:19:32 2015(r292290)
@@ -6868,6 +6868,8 @@ ctl_log_sense(struct ctl_scsiio *ctsio)
 
header = (struct scsi_log_header *)ctsio->kern_data_ptr;
header->page = page_index->page_code;
+   if (page_index->page_code == SLS_LOGICAL_BLOCK_PROVISIONING)
+   header->page |= SL_DS;
if (page_index->subpage) {
header->page |= SL_SPF;
header->subpage = page_index->subpage;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r292291 - head

2015-12-15 Thread John Baldwin
Author: jhb
Date: Tue Dec 15 23:06:15 2015
New Revision: 292291
URL: https://svnweb.freebsd.org/changeset/base/292291

Log:
  Keep the entries for NFS and the PCI bus code.

Modified:
  head/MAINTAINERS

Modified: head/MAINTAINERS
==
--- head/MAINTAINERSTue Dec 15 21:19:32 2015(r292290)
+++ head/MAINTAINERSTue Dec 15 23:06:15 2015(r292291)
@@ -51,6 +51,7 @@ lpr   gad Pre-commit review requested, pa
lpd/recvjob.c and lpd/printjob.c.
 nanobsdimp Pre-commit phabricator review requested.
 net80211   adrian  Pre-commit review requested, send to 
freebsd-wirel...@freebsd.org
+nfsfreebsd...@freebsd.org, rmacklem is best for reviews.
 nis(8), yp(8)  araujo  Pre-commit review requested.
 nvd(4) jimharris   Pre-commit review requested.
 nvme(4)jimharris   Pre-commit review requested.
@@ -59,6 +60,7 @@ opencryptojmg Pre-commit review request
 opensshdes Pre-commit review requested.
 opensslbenl,jkim   Pre-commit review requested.
 otus(4)adrian  Pre-commit review requested, send to 
freebsd-wirel...@freebsd.org
+pci busimp,jhb Pre-commit review requested.
 pmcstudy(8)rrs Pre-commit review requested.
 procfs des Pre-commit review requested.
 pseudofs   des Pre-commit review requested.
@@ -92,7 +94,6 @@ contrib/openbsm   rwatson Pre-commit revie
 sys/security/audit rwatson Pre-commit review requested.
 ahc(4) gibbs   Pre-commit review requested.
 ahd(4) gibbs   Pre-commit review requested.
-pci busimp,jhb Pre-commit review requested.
 cdboot jhb Pre-commit review requested.
 pxebootjhb Pre-commit review requested.
 witnessjhb Pre-commit review requested.
@@ -133,7 +134,6 @@ geom_stripe pjd Pre-commit review prefer
 geom_zero  pjd Pre-commit review preferred.
 sbin/geom  pjd Pre-commit review preferred.
 zfsfreebsd...@freebsd.org
-nfsfreebsd...@freebsd.org, rmacklem is best for reviews.
 linux emul emulation   Please discuss changes here.
 bs{diff,patch} cpercivaPre-commit review requested.
 portsnap   cpercivaPre-commit review requested.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r292299 - head/sys/kern

2015-12-15 Thread Adrian Chadd
Author: adrian
Date: Wed Dec 16 00:13:16 2015
New Revision: 292299
URL: https://svnweb.freebsd.org/changeset/base/292299

Log:
  Don't call wakeup if we're just returning reserved space; just
  return the reservation and wait for more space to appear.
  
  Submitted by: jeff
  Reviewed by:  kib

Modified:
  head/sys/kern/vfs_bio.c

Modified: head/sys/kern/vfs_bio.c
==
--- head/sys/kern/vfs_bio.c Wed Dec 16 00:09:57 2015(r292298)
+++ head/sys/kern/vfs_bio.c Wed Dec 16 00:13:16 2015(r292299)
@@ -2909,7 +2909,7 @@ getnewbuf(struct vnode *vp, int slpflag,
} while(buf_scan(false) == 0);
 
if (reserved)
-   bufspace_release(maxsize);
+   atomic_subtract_long(, maxsize);
if (bp != NULL) {
bp->b_flags |= B_INVAL;
brelse(bp);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r292275 - in head/sys: net netinet netinet6

2015-12-15 Thread Adrian Chadd
oops, file a bug at github.com/freebsd/freebsd-wifi-build and I'll fix it asap.


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


svn commit: r292309 - in head/sys: modules modules/tcp modules/tcp/fastpath netinet netinet/tcp_stacks

2015-12-15 Thread Randall Stewart
Author: rrs
Date: Wed Dec 16 00:56:45 2015
New Revision: 292309
URL: https://svnweb.freebsd.org/changeset/base/292309

Log:
  First cut of the modularization of our TCP stack. Still
  to do is to clean up the timer handling using the async-drain.
  Other optimizations may be coming to go with this. Whats here
  will allow differnet tcp implementations (one included).
  Reviewed by:  jtl, hiren, transports
  Sponsored by: Netflix Inc.
  Differential Revision:D4055

Added:
  head/sys/modules/tcp/
  head/sys/modules/tcp/fastpath/
  head/sys/modules/tcp/fastpath/Makefile   (contents, props changed)
  head/sys/netinet/tcp_stacks/
  head/sys/netinet/tcp_stacks/fastpath.c   (contents, props changed)
Modified:
  head/sys/modules/Makefile
  head/sys/netinet/tcp.h
  head/sys/netinet/tcp_input.c
  head/sys/netinet/tcp_sack.c
  head/sys/netinet/tcp_subr.c
  head/sys/netinet/tcp_syncache.c
  head/sys/netinet/tcp_timer.c
  head/sys/netinet/tcp_usrreq.c
  head/sys/netinet/tcp_var.h
  head/sys/netinet/toecore.c

Modified: head/sys/modules/Makefile
==
--- head/sys/modules/Makefile   Wed Dec 16 00:56:38 2015(r292308)
+++ head/sys/modules/Makefile   Wed Dec 16 00:56:45 2015(r292309)
@@ -346,6 +346,7 @@ SUBDIR= \
${_syscons} \
sysvipc \
${_ti} \
+   tcp/fastpath \
tests/framework \
tests/callout_test \
tl \

Added: head/sys/modules/tcp/fastpath/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/modules/tcp/fastpath/Makefile  Wed Dec 16 00:56:45 2015
(r292309)
@@ -0,0 +1,15 @@
+#
+# $FreeBSD$
+#
+
+.PATH: ${.CURDIR}/../../../netinet/tcp_stacks
+
+KMOD=  fastpath
+SRCS=  fastpath.c
+
+#
+# Enable full debugging
+#
+#CFLAGS += -g
+
+.include 

Modified: head/sys/netinet/tcp.h
==
--- head/sys/netinet/tcp.h  Wed Dec 16 00:56:38 2015(r292308)
+++ head/sys/netinet/tcp.h  Wed Dec 16 00:56:45 2015(r292309)
@@ -167,7 +167,7 @@ struct tcphdr {
 #defineTCP_KEEPCNT 1024/* L,N number of keepalives before 
close */
 #defineTCP_PCAP_OUT2048/* number of output packets to keep */
 #defineTCP_PCAP_IN 4096/* number of input packets to keep */
-
+#define TCP_FUNCTION_BLK 8192  /* Set the tcp function pointers to the 
specified stack */
 /* Start of reserved space for third-party user-settable options. */
 #defineTCP_VENDOR  SO_VENDOR
 
@@ -245,5 +245,11 @@ struct tcp_info {
u_int32_t   __tcpi_pad[26]; /* Padding. */
 };
 #endif
+#define TCP_FUNCTION_NAME_LEN_MAX 32
+
+struct tcp_function_set {
+   char function_set_name[TCP_FUNCTION_NAME_LEN_MAX];
+   uint32_t pcbcnt;
+};
 
 #endif /* !_NETINET_TCP_H_ */

Modified: head/sys/netinet/tcp_input.c
==
--- head/sys/netinet/tcp_input.cWed Dec 16 00:56:38 2015
(r292308)
+++ head/sys/netinet/tcp_input.cWed Dec 16 00:56:45 2015
(r292309)
@@ -230,23 +230,6 @@ VNET_DEFINE(struct inpcbhead, tcb);
 #definetcb6tcb  /* for KAME src sync over BSD*'s */
 VNET_DEFINE(struct inpcbinfo, tcbinfo);
 
-static void tcp_dooptions(struct tcpopt *, u_char *, int, int);
-static void tcp_do_segment(struct mbuf *, struct tcphdr *,
-struct socket *, struct tcpcb *, int, int, uint8_t,
-int);
-static void tcp_dropwithreset(struct mbuf *, struct tcphdr *,
-struct tcpcb *, int, int);
-static void tcp_pulloutofband(struct socket *,
-struct tcphdr *, struct mbuf *, int);
-static void tcp_xmit_timer(struct tcpcb *, int);
-static void tcp_newreno_partial_ack(struct tcpcb *, struct tcphdr *);
-static void inline cc_ack_received(struct tcpcb *tp, struct tcphdr *th,
-   uint16_t type);
-static void inline cc_conn_init(struct tcpcb *tp);
-static void inline cc_post_recovery(struct tcpcb *tp, struct tcphdr *th);
-static void inline hhook_run_tcp_est_in(struct tcpcb *tp,
-   struct tcphdr *th, struct tcpopt *to);
-
 /*
  * TCP statistics are stored in an "array" of counter(9)s.
  */
@@ -272,7 +255,7 @@ kmod_tcpstat_inc(int statnum)
 /*
  * Wrapper for the TCP established input helper hook.
  */
-static void inline
+void
 hhook_run_tcp_est_in(struct tcpcb *tp, struct tcphdr *th, struct tcpopt *to)
 {
struct tcp_hhook_data hhook_data;
@@ -290,7 +273,7 @@ hhook_run_tcp_est_in(struct tcpcb *tp, s
 /*
  * CC wrapper hook functions
  */
-static void inline
+void
 cc_ack_received(struct tcpcb *tp, struct tcphdr *th, uint16_t type)
 {
INP_WLOCK_ASSERT(tp->t_inpcb);
@@ -322,7 +305,7 @@ 

Re: svn commit: r292275 - in head/sys: net netinet netinet6

2015-12-15 Thread Kristof Provost

> On 15 Dec 2015, at 23:15, Kristof Provost  wrote:
> Based on the arp_announce() in the backtrace this commit looks like a 
> possible cause.
I see this in arp_announce(): 
KP: arp_announce() ifp->if_addr = 0

So that explains why we panic in 'lladdr = IF_LLADDR(ifp);’.

I’ve done a very quick hack:
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index 2214542..9b25356 100644
--- a/sys/netinet/if_ether.c
+++ b/sys/netinet/if_ether.c
@@ -1246,9 +1246,15 @@ arp_announce(struct ifnet *ifp)
}
IF_ADDR_RUNLOCK(ifp);

-   lladdr = IF_LLADDR(ifp);
-   for (i = 0; i < cnt; i++) {
-   arp_announce_addr(ifp, head + i, lladdr);
+   printf("KP: %s() ifp = %p\n", __FUNCTION__, ifp);
+   printf("KP: %s() ifp->if_addr = %p\n", __FUNCTION__, ifp->if_addr);
+
+   if (ifp->if_addr) {
+   printf("KP: %s() ifp->if_addr->ifa_addr = %p\n", __FUNCTION__, 
ifp->if_addr->ifa_addr);
+   lladdr = IF_LLADDR(ifp);
+   for (i = 0; i < cnt; i++) {
+   arp_announce_addr(ifp, head + i, lladdr);
+   }
}
free(head, M_TEMP);
 }

With this patch the device boots. I haven’t been able to verify if everything 
works because of a different issue ("Shared object "lib80211.so.1" not found, 
required by “ifconfig””, no doubt just a small problem with the 
freebsd-wifi-build scripts).

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

svn commit: r292304 - head

2015-12-15 Thread Glen Barber
Author: gjb
Date: Wed Dec 16 00:21:21 2015
New Revision: 292304
URL: https://svnweb.freebsd.org/changeset/base/292304

Log:
  Err on the side of caution, and assume *env(3) should require
  secteam@ review for changes.  so@ can remove this entry, if
  necessary.
  
  Submitted by: jhb (via secteam@)
  Sponsored by: The FreeBSD Foundation

Modified:
  head/MAINTAINERS

Modified: head/MAINTAINERS
==
--- head/MAINTAINERSWed Dec 16 00:20:20 2015(r292303)
+++ head/MAINTAINERSWed Dec 16 00:21:21 2015(r292304)
@@ -37,6 +37,8 @@ contrib/llvm/tools/lldb   emaste  Pre-commi
 contrib/netbsd-tests   freebsd-testing,ngiePre-commit review requested.
 contrib/pjdfstest  freebsd-testing,ngie,pjdPre-commit review 
requested.
 dev/usb/wlan   adrian  Pre-commit review requested, send to 
freebsd-wirel...@freebsd.org
+*env(3)secteam Due to the problematic security history of this
+   code, please have patches reviewed by secteam.
 etc/mail   gshapiroPre-commit review requested.  Keep in sync with 
-STABLE.
 etc/sendmail   gshapiroPre-commit review requested.  Keep in sync with 
-STABLE.
 fetch  des Pre-commit review requested.
@@ -143,8 +145,6 @@ lib/libbluetoothemaxPre-commit review 
 lib/libsdp emaxPre-commit review preferred.
 usr.bin/bluetooth  emaxPre-commit review preferred.
 usr.sbin/bluetooth emaxPre-commit review preferred.
-*env(3)secteam Due to the problematic security history of this
-   code, please have patches reviewed by secteam.
 share/zoneinfo edwin   Heads-up appreciated, since our data is coming
from a third party source.
 usr.sbin/zic   edwin   Heads-up appreciated, since this code is
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r292310 - head

2015-12-15 Thread Pawel Jakub Dawidek
Author: pjd
Date: Wed Dec 16 01:05:50 2015
New Revision: 292310
URL: https://svnweb.freebsd.org/changeset/base/292310

Log:
  Keep maintainance of GELI and make it clear which directories I'm interested 
in.

Modified:
  head/MAINTAINERS

Modified: head/MAINTAINERS
==
--- head/MAINTAINERSWed Dec 16 00:56:45 2015(r292309)
+++ head/MAINTAINERSWed Dec 16 01:05:50 2015(r292310)
@@ -42,6 +42,7 @@ dev/usb/wlan  adrian  Pre-commit review re
 etc/mail   gshapiroPre-commit review requested.  Keep in sync with 
-STABLE.
 etc/sendmail   gshapiroPre-commit review requested.  Keep in sync with 
-STABLE.
 fetch  des Pre-commit review requested.
+geli   pjd Pre-commit review requested (both sys/geom/eli/ and 
sbin/geom/class/eli/).
 isci(4)jimharris   Pre-commit review requested.
 iwm(4) adrian  Pre-commit review requested, send to 
freebsd-wirel...@freebsd.org
 iwn(4) adrian  Pre-commit review requested, send to 
freebsd-wirel...@freebsd.org
@@ -125,7 +126,6 @@ fileobrien  Insists to keep file blocke
 contrib/bzip2  obrien  Pre-commit review required.
 geom   freebsd-g...@freebsd.org
 geom_concatpjd Pre-commit review preferred.
-geom_eli   pjd Pre-commit review preferred.
 geom_gate  pjd Pre-commit review preferred.
 geom_label pjd Pre-commit review preferred.
 geom_mirrorpjd Pre-commit review preferred.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r292313 - head/etc/periodic/daily

2015-12-15 Thread Kurt Lidl
Author: lidl
Date: Wed Dec 16 04:32:33 2015
New Revision: 292313
URL: https://svnweb.freebsd.org/changeset/base/292313

Log:
  Skip unavailable pools when running zfs pool scrubs
  
  Approved by:  rpaulo (mentor)
  Differential Revision:https://reviews.freebsd.org/D4588

Modified:
  head/etc/periodic/daily/800.scrub-zfs

Modified: head/etc/periodic/daily/800.scrub-zfs
==
--- head/etc/periodic/daily/800.scrub-zfs   Wed Dec 16 03:59:54 2015
(r292312)
+++ head/etc/periodic/daily/800.scrub-zfs   Wed Dec 16 04:32:33 2015
(r292313)
@@ -43,6 +43,10 @@ case "$daily_scrub_zfs_enable" in
rc=3
echo "Skipping faulted pool: ${pool}"
continue ;;
+   *UNAVAIL*)
+   rc=4
+   echo "Skipping unavailable pool: ${pool}"
+   continue ;;
esac
 
# determine how many days shall be between scrubs
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r292273 - head/usr.sbin/ypldap

2015-12-15 Thread Marcelo Araujo
Author: araujo
Date: Tue Dec 15 15:46:14 2015
New Revision: 292273
URL: https://svnweb.freebsd.org/changeset/base/292273

Log:
  Remove a garbage printf used for debug.
  
  Approved by:  bapt (mentor implicit)

Modified:
  head/usr.sbin/ypldap/ldapclient.c

Modified: head/usr.sbin/ypldap/ldapclient.c
==
--- head/usr.sbin/ypldap/ldapclient.c   Tue Dec 15 15:42:42 2015
(r292272)
+++ head/usr.sbin/ypldap/ldapclient.c   Tue Dec 15 15:46:14 2015
(r292273)
@@ -377,10 +377,8 @@ ldapclient(int pipe_main2client[2])
bzero(, sizeof(env));
TAILQ_INIT(_idms);
 
-   if ((pw = getpwnam(YPLDAP_USER)) == NULL) {
-printf("ldapclient.c error\n");
+   if ((pw = getpwnam(YPLDAP_USER)) == NULL)
fatal("getpwnam");
-}
 
if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, pipe_dns) == -1)
fatal("socketpair");
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r292275 - in head/sys: net netinet netinet6

2015-12-15 Thread Steven Hartland
Author: smh
Date: Tue Dec 15 16:02:11 2015
New Revision: 292275
URL: https://svnweb.freebsd.org/changeset/base/292275

Log:
  Fix lagg failover due to missing notifications
  
  When using lagg failover mode neither Gratuitous ARP (IPv4) or Unsolicited
  Neighbour Advertisements (IPv6) are sent to notify other nodes that the
  address may have moved.
  
  This results is slow failover, dropped packets and network outages for the
  lagg interface when the primary link goes down.
  
  We now use the new if_link_state_change_cond with the force param set to
  allow lagg to force through link state changes and hence fire a
  ifnet_link_event which are now monitored by rip and nd6.
  
  Upon receiving these events each protocol trigger the relevant
  notifications:
  * inet4 => Gratuitous ARP
  * inet6 => Unsolicited Neighbour Announce
  
  This also fixes the carp IPv6 NA's that stopped working after r251584 which
  added the ipv6_route__llma route.
  
  The new behavour can be controlled using the sysctls:
  * net.link.ether.inet.arp_on_link
  * net.inet6.icmp6.nd6_on_link
  
  Also removed unused param from lagg_port_state and added descriptions for the
  sysctls while here.
  
  PR:   156226
  MFC after:1 month
  Sponsored by: Multiplay
  Differential Revision:https://reviews.freebsd.org/D4111

Modified:
  head/sys/net/if.c
  head/sys/net/if_lagg.c
  head/sys/net/if_lagg.h
  head/sys/net/if_var.h
  head/sys/netinet/if_ether.c
  head/sys/netinet/if_ether.h
  head/sys/netinet/in_var.h
  head/sys/netinet/ip_carp.c
  head/sys/netinet6/in6.c
  head/sys/netinet6/in6_var.h
  head/sys/netinet6/nd6.c
  head/sys/netinet6/nd6.h
  head/sys/netinet6/nd6_nbr.c

Modified: head/sys/net/if.c
==
--- head/sys/net/if.c   Tue Dec 15 15:48:03 2015(r292274)
+++ head/sys/net/if.c   Tue Dec 15 16:02:11 2015(r292275)
@@ -126,7 +126,7 @@ SX_SYSINIT(ifdescr_sx, _sx, "ifn
 
 void   (*bridge_linkstate_p)(struct ifnet *ifp);
 void   (*ng_ether_link_state_p)(struct ifnet *ifp, int state);
-void   (*lagg_linkstate_p)(struct ifnet *ifp, int state);
+void   (*lagg_linkstate_p)(struct ifnet *ifp);
 /* These are external hooks for CARP. */
 void   (*carp_linkstate_p)(struct ifnet *ifp);
 void   (*carp_demote_adj_p)(int, char *);
@@ -1984,6 +1984,8 @@ if_unroute(struct ifnet *ifp, int flag, 
 
if (ifp->if_carp)
(*carp_linkstate_p)(ifp);
+   if (ifp->if_lagg)
+   (*lagg_linkstate_p)(ifp);
rt_ifmsg(ifp);
 }
 
@@ -2005,6 +2007,8 @@ if_route(struct ifnet *ifp, int flag, in
pfctlinput(PRC_IFUP, ifa->ifa_addr);
if (ifp->if_carp)
(*carp_linkstate_p)(ifp);
+   if (ifp->if_lagg)
+   (*lagg_linkstate_p)(ifp);
rt_ifmsg(ifp);
 #ifdef INET6
in6_if_up(ifp);
@@ -2019,17 +2023,27 @@ int (*vlan_tag_p)(struct ifnet *, uint16
 int(*vlan_setcookie_p)(struct ifnet *, void *);
 void   *(*vlan_cookie_p)(struct ifnet *);
 
+void
+if_link_state_change(struct ifnet *ifp, int link_state)
+{
+
+   return if_link_state_change_cond(ifp, link_state, 0);
+}
+
 /*
  * Handle a change in the interface link state. To avoid LORs
  * between driver lock and upper layer locks, as well as possible
  * recursions, we post event to taskqueue, and all job
  * is done in static do_link_state_change().
+ *
+ * If the current link state matches link_state and force isn't
+ * specified no action is taken.
  */
 void
-if_link_state_change(struct ifnet *ifp, int link_state)
+if_link_state_change_cond(struct ifnet *ifp, int link_state, int force)
 {
-   /* Return if state hasn't changed. */
-   if (ifp->if_link_state == link_state)
+
+   if (ifp->if_link_state == link_state && !force)
return;
 
ifp->if_link_state = link_state;
@@ -2057,7 +2071,7 @@ do_link_state_change(void *arg, int pend
if (ifp->if_bridge)
(*bridge_linkstate_p)(ifp);
if (ifp->if_lagg)
-   (*lagg_linkstate_p)(ifp, link_state);
+   (*lagg_linkstate_p)(ifp);
 
if (IS_DEFAULT_VNET(curvnet))
devctl_notify("IFNET", ifp->if_xname,

Modified: head/sys/net/if_lagg.c
==
--- head/sys/net/if_lagg.c  Tue Dec 15 15:48:03 2015(r292274)
+++ head/sys/net/if_lagg.c  Tue Dec 15 16:02:11 2015(r292275)
@@ -106,7 +106,7 @@ static int  lagg_port_create(struct lagg_
 static int lagg_port_destroy(struct lagg_port *, int);
 static struct mbuf *lagg_input(struct ifnet *, struct mbuf *);
 static voidlagg_linkstate(struct lagg_softc *);
-static voidlagg_port_state(struct ifnet *, int);
+static voidlagg_port_state(struct ifnet *);
 static int lagg_port_ioctl(struct ifnet *, u_long, caddr_t);
 static int lagg_port_output(struct ifnet *, struct mbuf *,

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

2015-12-15 Thread Michal Meloun
Author: mmel
Date: Tue Dec 15 12:52:45 2015
New Revision: 292260
URL: https://svnweb.freebsd.org/changeset/base/292260

Log:
  ARM: Remove outdated katelib.h.
  
  Approved by:  kib (mentor)

Deleted:
  head/sys/arm/include/katelib.h
Modified:
  head/sys/arm/arm/trap.c
  head/sys/arm/include/cpufunc.h

Modified: head/sys/arm/arm/trap.c
==
--- head/sys/arm/arm/trap.c Tue Dec 15 12:51:58 2015(r292259)
+++ head/sys/arm/arm/trap.c Tue Dec 15 12:52:45 2015(r292260)
@@ -109,6 +109,8 @@ __FBSDID("$FreeBSD$");
 #include 
 #endif
 
+#define ReadWord(a)(*((volatile unsigned int *)(a)))
+
 extern char fusubailout[];
 
 #ifdef DEBUG

Modified: head/sys/arm/include/cpufunc.h
==
--- head/sys/arm/include/cpufunc.h  Tue Dec 15 12:51:58 2015
(r292259)
+++ head/sys/arm/include/cpufunc.h  Tue Dec 15 12:52:45 2015
(r292260)
@@ -49,7 +49,6 @@
 #include 
 #include 
 #include 
-#include  /* For in[bwl] and out[bwl] */
 
 static __inline void
 breakpoint(void)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r292259 - head/sys/arm/conf

2015-12-15 Thread Michal Meloun
Author: mmel
Date: Tue Dec 15 12:51:58 2015
New Revision: 292259
URL: https://svnweb.freebsd.org/changeset/base/292259

Log:
  ARM: option PPC_PROBE_CHIPSET is applicable only for x86. Don't enable it
  for ARM LINT config.
  
  Approved by:  kib (mentor)

Modified:
  head/sys/arm/conf/NOTES

Modified: head/sys/arm/conf/NOTES
==
--- head/sys/arm/conf/NOTES Tue Dec 15 11:20:20 2015(r292258)
+++ head/sys/arm/conf/NOTES Tue Dec 15 12:51:58 2015(r292259)
@@ -58,6 +58,7 @@ nooptions SMP
 nooptions  MAXCPU
 
 nooptions  COMPAT_FREEBSD4
+nooption   PPC_PROBE_CHIPSET
 
 nodevice   fdc
 nodevice   sym
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


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

2015-12-15 Thread Christian Brueffer
Author: brueffer
Date: Tue Dec 15 13:29:05 2015
New Revision: 292265
URL: https://svnweb.freebsd.org/changeset/base/292265

Log:
  Fix example code rendering, \n needs escaping to show up.
  
  PR:   203536
  Submitted by: Fabian Keil

Modified:
  head/share/man/man4/dtrace_io.4
  head/share/man/man4/dtrace_ip.4
  head/share/man/man4/dtrace_tcp.4
  head/share/man/man4/dtrace_udp.4

Modified: head/share/man/man4/dtrace_io.4
==
--- head/share/man/man4/dtrace_io.4 Tue Dec 15 13:17:40 2015
(r292264)
+++ head/share/man/man4/dtrace_io.4 Tue Dec 15 13:29:05 2015
(r292265)
@@ -91,8 +91,8 @@ io:::start
 
 END
 {
-printf("%10s %20s %10s %15s\n", "DEVICE", "APP", "PID", "BYTES");
-printa("%10s %20s %10d %15@d\n", @);
+printf("%10s %20s %10s %15s\\n", "DEVICE", "APP", "PID", "BYTES");
+printa("%10s %20s %10d %15@d\\n", @);
 }
 .Ed
 .Sh COMPATIBILITY

Modified: head/share/man/man4/dtrace_ip.4
==
--- head/share/man/man4/dtrace_ip.4 Tue Dec 15 13:17:40 2015
(r292264)
+++ head/share/man/man4/dtrace_ip.4 Tue Dec 15 13:29:05 2015
(r292265)
@@ -239,7 +239,7 @@ by the kernel:
 
 dtrace:::BEGIN
 {
-printf(" %10s %30s%-30s %8s %6s\n", "DELTA(us)", "SOURCE",
+printf(" %10s %30s%-30s %8s %6s\\n", "DELTA(us)", "SOURCE",
 "DEST", "INT", "BYTES");
 last = timestamp;
 }
@@ -247,7 +247,7 @@ dtrace:::BEGIN
 ip:::send
 {
 this->elapsed = (timestamp - last) / 1000;
-printf(" %10d %30s -> %-30s %8s %6d\n", this->elapsed,
+printf(" %10d %30s -> %-30s %8s %6d\\n", this->elapsed,
 args[2]->ip_saddr, args[2]->ip_daddr, args[3]->if_name,
 args[2]->ip_plength);
 last = timestamp;
@@ -256,7 +256,7 @@ ip:::send
 ip:::receive
 {
 this->elapsed = (timestamp - last) / 1000;
-printf(" %10d %30s <- %-30s %8s %6d\n", this->elapsed,
+printf(" %10d %30s <- %-30s %8s %6d\\n", this->elapsed,
 args[2]->ip_daddr, args[2]->ip_saddr, args[3]->if_name,
 args[2]->ip_plength);
 last = timestamp;

Modified: head/share/man/man4/dtrace_tcp.4
==
--- head/share/man/man4/dtrace_tcp.4Tue Dec 15 13:17:40 2015
(r292264)
+++ head/share/man/man4/dtrace_tcp.4Tue Dec 15 13:29:05 2015
(r292265)
@@ -300,7 +300,7 @@ The following script logs TCP segments i
 
 dtrace:::BEGIN
 {
-printf(" %3s %15s:%-5s  %15s:%-5s %6s  %s\n", "CPU",
+printf(" %3s %15s:%-5s  %15s:%-5s %6s  %s\\n", "CPU",
 "LADDR", "LPORT", "RADDR", "RPORT", "BYTES", "FLAGS");
 }
 
@@ -317,7 +317,7 @@ tcp:::send
 printf("%s", args[4]->tcp_flags & TH_ACK ? "ACK|" : "");
 printf("%s", args[4]->tcp_flags & TH_URG ? "URG|" : "");
 printf("%s", args[4]->tcp_flags == 0 ? "null " : "");
-printf("\b)\n");
+printf("\b)\\n");
 }
 
 tcp:::receive
@@ -333,7 +333,7 @@ tcp:::receive
 printf("%s", args[4]->tcp_flags & TH_ACK ? "ACK|" : "");
 printf("%s", args[4]->tcp_flags & TH_URG ? "URG|" : "");
 printf("%s", args[4]->tcp_flags == 0 ? "null " : "");
-printf("\b)\n");
+printf("\b)\\n");
 }
 .Ed
 The following script logs TCP connection state changes as they occur:
@@ -345,14 +345,14 @@ int last[int];
 
 dtrace:::BEGIN
 {
-printf("   %12s %-20s%-20s %s\n",
+printf("   %12s %-20s%-20s %s\\n",
 "DELTA(us)", "OLD", "NEW", "TIMESTAMP");
 }
 
 tcp:::state-change
 {
 this->elapsed = (timestamp - last[args[1]->cs_cid]) / 1000;
-printf("   %12d %-20s -> %-20s %d\n", this->elapsed,
+printf("   %12d %-20s -> %-20s %d\\n", this->elapsed,
 tcp_state_string[args[5]->tcps_state],
 tcp_state_string[args[3]->tcps_state], timestamp);
 last[args[1]->cs_cid] = timestamp;
@@ -361,7 +361,7 @@ tcp:::state-change
 tcp:::state-change
 /last[args[1]->cs_cid] == 0/
 {
-printf("   %12s %-20s -> %-20s %d\n", "-",
+printf("   %12s %-20s -> %-20s %d\\n", "-",
 tcp_state_string[args[5]->tcps_state],
 tcp_state_string[args[3]->tcps_state], timestamp);
 last[args[1]->cs_cid] = timestamp;

Modified: head/share/man/man4/dtrace_udp.4
==
--- head/share/man/man4/dtrace_udp.4Tue Dec 15 13:17:40 2015
(r292264)
+++ head/share/man/man4/dtrace_udp.4Tue Dec 15 13:29:05 2015
(r292265)
@@ -151,7 +151,7 @@ by the kernel:
 
 dtrace:::BEGIN
 {
-printf(" %10s %36s%-36s %6s\n", "DELTA(us)", "SOURCE",
+printf(" %10s %36s%-36s %6s\\n", "DELTA(us)", "SOURCE",
 "DEST", "BYTES");
 last = timestamp;
 }
@@ 

svn commit: r292263 - in head: contrib/smbfs tools/debugscripts

2015-12-15 Thread Christian Brueffer
Author: brueffer
Date: Tue Dec 15 13:04:44 2015
New Revision: 292263
URL: https://svnweb.freebsd.org/changeset/base/292263

Log:
  Assorted grammar, spelling and punctuation fixes.
  
  PR:   203336, 203339
  Submitted by: esp...@rpi.edu, theme...@gmail.com
  MFC after:1 week

Modified:
  head/contrib/smbfs/README
  head/tools/debugscripts/README

Modified: head/contrib/smbfs/README
==
--- head/contrib/smbfs/README   Tue Dec 15 13:01:14 2015(r292262)
+++ head/contrib/smbfs/README   Tue Dec 15 13:04:44 2015(r292263)
@@ -15,7 +15,7 @@ It is a complete, kernel side implementa
 
Darwin  maintained in the Darwin's  tree.
 
-I'm would be very grateful for any feedback, bug reports etc.
+I would be very grateful for any feedback, bug reports etc.
 
 Supported SMB servers:
Samba
@@ -23,14 +23,14 @@ It is a complete, kernel side implementa
IBM LanManager
NetApp
 
-An updated versions of this package can be retrieved from ftp server:
+An updated version of this package can be retrieved from ftp server:
 
 ftp://ftp.butya.kz/pub/smbfs/smbfs.tar.gz
 
-Perfomance
+Performance
 ==
 
-There is some perfomance benchmarks over 10Mbit network:
+These are some performance benchmarks over a 10Mbit network:
 
 Win95 machine as server:
 IOZONE: auto-test mode

Modified: head/tools/debugscripts/README
==
--- head/tools/debugscripts/README  Tue Dec 15 13:01:14 2015
(r292262)
+++ head/tools/debugscripts/README  Tue Dec 15 13:04:44 2015
(r292263)
@@ -14,8 +14,8 @@ perform kernel debugging, you would do:
   (kgdb) 
 
 
-This directory also contains a kgdb script that given a crash dump number
-automatically extract the path to the kernel source, run gdb to extract
-information about kernel modules loaded, and then rerun gdb loading the
+This directory also contains a kgdb script that, given a crash dump number,
+automatically extracts the path to the kernel source, runs gdb to extract
+information about kernel modules loaded, and then reruns gdb loading the
 necessary symbols for the modules.  You need to make sure you build the
 modules w/ debugging symbols separately to get things to work.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r292262 - head/usr.sbin/sesutil

2015-12-15 Thread Baptiste Daroussin
Author: bapt
Date: Tue Dec 15 13:01:14 2015
New Revision: 292262
URL: https://svnweb.freebsd.org/changeset/base/292262

Log:
  Show the enclosure name and id in sesutil map
  
  Sponsored by: Gandi.net

Modified:
  head/usr.sbin/sesutil/sesutil.c

Modified: head/usr.sbin/sesutil/sesutil.c
==
--- head/usr.sbin/sesutil/sesutil.c Tue Dec 15 12:58:33 2015
(r292261)
+++ head/usr.sbin/sesutil/sesutil.c Tue Dec 15 13:01:14 2015
(r292262)
@@ -302,6 +302,7 @@ static int
 objmap(int argc, char **argv __unused)
 {
struct sbuf *extra;
+   encioc_string_t stri;
encioc_elm_devnames_t e_devname;
encioc_elm_status_t e_status;
encioc_elm_desc_t e_desc;
@@ -310,6 +311,7 @@ objmap(int argc, char **argv __unused)
int fd;
unsigned int j, nobj;
size_t i;
+   char str[32];
 
if (argc != 1) {
usage(stderr, "map");
@@ -355,6 +357,15 @@ objmap(int argc, char **argv __unused)
}
 
printf("%s:\n", g.gl_pathv[i] + 5);
+   stri.bufsiz = sizeof(str);
+   stri.buf = [0];
+   if (ioctl(fd, ENCIOC_GETENCNAME, (caddr_t) ) == 0)
+   printf("\tEnclosure Name: %s\n", stri.buf);
+   stri.bufsiz = sizeof(str);
+   stri.buf = [0];
+   if (ioctl(fd, ENCIOC_GETENCID, (caddr_t) ) == 0)
+   printf("\tEnclosure ID: %s\n", stri.buf);
+
for (j = 0; j < nobj; j++) {
/* Get the status of the element */
memset(_status, 0, sizeof(e_status));
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


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

2015-12-15 Thread Svatopluk Kraus
Author: skra
Date: Tue Dec 15 13:17:40 2015
New Revision: 292264
URL: https://svnweb.freebsd.org/changeset/base/292264

Log:
  Flush intermediate TLB cache when L2 page table is unlinked.
  
  This fixes an issue observed on Cortex A7 (RPi2) and on Cortex A15
  (Jetson TK1) causing various memory corruptions. It turned out that
  even L2 page table with no valid mapping might be a subject of such
  caching.
  
  Note that not all platforms have intermediate TLB caching implemented.
  An open question is if this fix is sufficient for all platforms with
  this feature.
  
  Approved by:  kib (mentor)

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

Modified: head/sys/arm/arm/pmap-v6-new.c
==
--- head/sys/arm/arm/pmap-v6-new.c  Tue Dec 15 13:04:44 2015
(r292263)
+++ head/sys/arm/arm/pmap-v6-new.c  Tue Dec 15 13:17:40 2015
(r292264)
@@ -2508,8 +2508,13 @@ pmap_unwire_pt2pg(pmap_t pmap, vm_offset
KASSERT(m->md.pt2_wirecount[i] == 0,
("%s: pmap %p PT2 %u (PG %p) wired", __func__, pmap, i, m));
opte1 = pte1_load(pte1p);
-   if (pte1_is_link(opte1))
+   if (pte1_is_link(opte1)) {
pte1_clear(pte1p);
+   /*
+* Flush intermediate TLB cache.
+*/
+   pmap_tlb_flush(pmap, (m->pindex + i) << PTE1_SHIFT);
+   }
 #ifdef INVARIANTS
else
KASSERT((opte1 == 0) || pte1_is_section(opte1),
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r292275 - in head/sys: net netinet netinet6

2015-12-15 Thread Kristof Provost

> On 15 Dec 2015, at 17:02, Steven Hartland  wrote:
> 
> Author: smh
> Date: Tue Dec 15 16:02:11 2015
> New Revision: 292275
> URL: https://svnweb.freebsd.org/changeset/base/292275
> 
> Log:
>  Fix lagg failover due to missing notifications
> 

I’ve just built a new image (r292287-based) for my TPLink tl-wdr3600 device, 
and see the following panic:

uhub0: 1 port with 1 removable, self powered
random: harvesting attach, 8 bytes (4 bits) from uhub0
arswitch0: arswitch_miipollstat: port 1: port -> UP
arswitch0port2: link state changed to UP
Trap cause = 2 (TLB miss (load or instr. fetch) - kernel mode)
[ thread pid 11 tid 100017 ]
Stopped at  arp_announce+0x134: lw  v0,0(v0)
db> bt
Tracing pid 11 tid 100017 td 0x80a746c0
db_trace_thread+30 (?,?,?,?) ra c462b8b00018 sp 0 sz 0
8008c520+114 (0,?,,?) ra c462b8c80020 sp 1 sz 1
8008b864+388 (?,?,?,?) ra c462b8e800a8 sp 0 sz 0
db_command_loop+70 (?,?,?,?) ra c462b9900018 sp 0 sz 0
8008e438+f4 (?,?,?,?) ra c462b9a801a8 sp 0 sz 0
kdb_trap+100 (?,?,?,?) ra c462bb500030 sp 0 sz 0
trap+fac (?,?,?,?) ra c462bb8000c0 sp 0 sz 0
MipsKernGenException+ec (1,80a746c0,8049fcf8,4df) ra c462bc4000c8 sp 
10001 sz 1
arp_announce+134 (?,?,?,?) ra c462bd080030 sp 0 sz 0
8031d868+2c (?,?,?,?) ra c462bd380018 sp 0 sz 0
802b7e40+1fc (?,?,?,?) ra c462bd500028 sp 0 sz 0
8022bc8c+f0 (?,?,?,?) ra c462bd780040 sp 0 sz 0
taskqueue_run+58 (?,?,?,?) ra c462bdb80018 sp 0 sz 0
8022bf5c+18 (?,?,?,?) ra c462bdd00018 sp 0 sz 0
intr_event_execute_handlers+158 (?,?,?,?) ra c462bde80028 sp 0 sz 0
801ad9a0+c4 (?,?,?,?) ra c462be100048 sp 0 sz 0
fork_exit+b0 (?,?,?,?) ra c462be580028 sp 0 sz 0
fork_trampoline+10 (?,?,?,?) ra c462be80 sp 0 sz 0
pid 11

Based on the arp_announce() in the backtrace this commit looks like a possible 
cause.

I’ll take a look and see what I can figure out, but if something pops out for 
you please let me know

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

svn commit: r292312 - head/contrib/llvm/tools/lldb/docs

2015-12-15 Thread Ed Maste
Author: emaste
Date: Wed Dec 16 03:59:54 2015
New Revision: 292312
URL: https://svnweb.freebsd.org/changeset/base/292312

Log:
  lldb(1): Document core file option -c / -core

Modified:
  head/contrib/llvm/tools/lldb/docs/lldb.1

Modified: head/contrib/llvm/tools/lldb/docs/lldb.1
==
--- head/contrib/llvm/tools/lldb/docs/lldb.1Wed Dec 16 02:43:34 2015
(r292311)
+++ head/contrib/llvm/tools/lldb/docs/lldb.1Wed Dec 16 03:59:54 2015
(r292312)
@@ -1,4 +1,4 @@
-.Dd June 7, 2012 \" DATE
+.Dd December 16, 2015 \" DATE
 .Dt LLDB 1   \" Program name and manual section number
 .Os
 .Sh NAME \" Section Header - required - don't modify
@@ -8,6 +8,7 @@
 .Nm lldb
 .Op Fl hvdexw
 .Op Fl a Ar arch
+.Op Fl c Ar core-file
 .Op Fl l Ar script-language
 .Op Fl s Ar lldb-commands
 .Op Fl n Ar process-name
@@ -52,6 +53,8 @@ to it as early in the process-launch as 
 Specifies a currently running process that
 .Nm
 should attach to.
+.It Fl c, -core Ar core-file
+Specifies the core file to examine.
 .It Fl l, -script-language Ar language
 Tells the debugger to use the specified scripting language for
 user-defined scripts, rather than the default.  Valid scripting
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r292266 - head/sbin/reboot

2015-12-15 Thread Steven Hartland
Author: smh
Date: Tue Dec 15 14:17:07 2015
New Revision: 292266
URL: https://svnweb.freebsd.org/changeset/base/292266

Log:
  Add flag to disable inital reboot(8) userland sync
  
  Add -N flag to reboot(8) which bypasses the userland sync(2) during
  reboot(8) while still allow the kernel sync during the reboot(2) syscall
  to occur.
  
  An example use of this is when rebooting with disconnected iSCSI sessions
  which would otherwise cause the reboot to hang on BIOs that will never
  complete.
  
  Reviewed by:  bjk
  MFC after:2 weeks
  Sponsored by: Multiplay
  Differential Revision:https://reviews.freebsd.org/D4449

Modified:
  head/sbin/reboot/reboot.8
  head/sbin/reboot/reboot.c

Modified: head/sbin/reboot/reboot.8
==
--- head/sbin/reboot/reboot.8   Tue Dec 15 13:29:05 2015(r292265)
+++ head/sbin/reboot/reboot.8   Tue Dec 15 14:17:07 2015(r292266)
@@ -28,7 +28,7 @@
 .\"@(#)reboot.88.1 (Berkeley) 6/9/93
 .\" $FreeBSD$
 .\"
-.Dd May 22, 2015
+.Dd Dec 12, 2015
 .Dt REBOOT 8
 .Os
 .Sh NAME
@@ -39,16 +39,16 @@
 .Nd stopping and restarting the system
 .Sh SYNOPSIS
 .Nm halt
-.Op Fl lnpq
+.Op Fl lNnpq
 .Op Fl k Ar kernel
 .Nm
-.Op Fl dlnpqr
+.Op Fl dlNnpqr
 .Op Fl k Ar kernel
 .Nm fasthalt
-.Op Fl lnpq
+.Op Fl lNnpq
 .Op Fl k Ar kernel
 .Nm fastboot
-.Op Fl dlnpq
+.Op Fl dlNnpq
 .Op Fl k Ar kernel
 .Sh DESCRIPTION
 The
@@ -94,6 +94,16 @@ that call
 or
 .Nm halt
 and log this themselves.
+.It Fl N
+The file system cache is not flushed during the initial process clean-up,
+however the kernel level
+.Xr reboot 2
+is still processed with a sync.
+This option can be useful for performing a
+.Dq best-effort
+reboot when devices might be unavailable.
+This can happen when devices have been disconnected, such as with
+.Xr iscsi 4 .
 .It Fl n
 The file system cache is not flushed.
 This option should probably not be used.

Modified: head/sbin/reboot/reboot.c
==
--- head/sbin/reboot/reboot.c   Tue Dec 15 13:29:05 2015(r292265)
+++ head/sbin/reboot/reboot.c   Tue Dec 15 14:17:07 2015(r292266)
@@ -67,7 +67,7 @@ main(int argc, char *argv[])
 {
struct utmpx utx;
const struct passwd *pw;
-   int ch, howto, i, fd, lflag, nflag, qflag, sverrno;
+   int ch, howto, i, fd, lflag, nflag, qflag, sverrno, Nflag;
u_int pageins;
const char *user, *kernel = NULL;
 
@@ -77,7 +77,7 @@ main(int argc, char *argv[])
} else
howto = 0;
lflag = nflag = qflag = 0;
-   while ((ch = getopt(argc, argv, "dk:lnpqr")) != -1)
+   while ((ch = getopt(argc, argv, "dk:lNnpqr")) != -1)
switch(ch) {
case 'd':
howto |= RB_DUMP;
@@ -92,6 +92,10 @@ main(int argc, char *argv[])
nflag = 1;
howto |= RB_NOSYNC;
break;
+   case 'N':
+   nflag = 1;
+   Nflag = 1;
+   break;
case 'p':
howto |= RB_POWEROFF;
break;
@@ -110,6 +114,8 @@ main(int argc, char *argv[])
 
if ((howto & (RB_DUMP | RB_HALT)) == (RB_DUMP | RB_HALT))
errx(1, "cannot dump (-d) when halting; must reboot instead");
+   if (Nflag && (howto & RB_NOSYNC) != 0)
+   errx(1, "-N cannot be used with -n");
if ((howto & RB_REROOT) != 0 && howto != RB_REROOT)
errx(1, "-r cannot be used with -d, -n, or -p");
if (geteuid()) {
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r292268 - head/lib/libc/sys

2015-12-15 Thread Kevin Lo
Author: kevlo
Date: Tue Dec 15 15:19:06 2015
New Revision: 292268
URL: https://svnweb.freebsd.org/changeset/base/292268

Log:
  Remove sys/types.h due to STANDARDS and unistd.h also includes sys/types.h.

Modified:
  head/lib/libc/sys/brk.2
  head/lib/libc/sys/getgid.2
  head/lib/libc/sys/getpid.2
  head/lib/libc/sys/read.2
  head/lib/libc/sys/write.2

Modified: head/lib/libc/sys/brk.2
==
--- head/lib/libc/sys/brk.2 Tue Dec 15 15:08:29 2015(r292267)
+++ head/lib/libc/sys/brk.2 Tue Dec 15 15:19:06 2015(r292268)
@@ -28,7 +28,7 @@
 .\" @(#)brk.2  8.4 (Berkeley) 5/1/95
 .\" $FreeBSD$
 .\"
-.Dd July 12, 1999
+.Dd December 15, 2015
 .Dt BRK 2
 .Os
 .Sh NAME
@@ -38,7 +38,6 @@
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
-.In sys/types.h
 .In unistd.h
 .Ft int
 .Fn brk "const void *addr"

Modified: head/lib/libc/sys/getgid.2
==
--- head/lib/libc/sys/getgid.2  Tue Dec 15 15:08:29 2015(r292267)
+++ head/lib/libc/sys/getgid.2  Tue Dec 15 15:19:06 2015(r292268)
@@ -28,7 +28,7 @@
 .\" @(#)getgid.2   8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd June 4, 1993
+.Dd December 15, 2015
 .Dt GETGID 2
 .Os
 .Sh NAME
@@ -38,7 +38,6 @@
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
-.In sys/types.h
 .In unistd.h
 .Ft gid_t
 .Fn getgid void

Modified: head/lib/libc/sys/getpid.2
==
--- head/lib/libc/sys/getpid.2  Tue Dec 15 15:08:29 2015(r292267)
+++ head/lib/libc/sys/getpid.2  Tue Dec 15 15:19:06 2015(r292268)
@@ -28,7 +28,7 @@
 .\" @(#)getpid.2   8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd November 2, 2006
+.Dd December 15, 2015
 .Dt GETPID 2
 .Os
 .Sh NAME
@@ -38,7 +38,6 @@
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
-.In sys/types.h
 .In unistd.h
 .Ft pid_t
 .Fn getpid void

Modified: head/lib/libc/sys/read.2
==
--- head/lib/libc/sys/read.2Tue Dec 15 15:08:29 2015(r292267)
+++ head/lib/libc/sys/read.2Tue Dec 15 15:19:06 2015(r292268)
@@ -28,7 +28,7 @@
 .\" @(#)read.2 8.4 (Berkeley) 2/26/94
 .\" $FreeBSD$
 .\"
-.Dd September 11, 2013
+.Dd December 15, 2015
 .Dt READ 2
 .Os
 .Sh NAME
@@ -40,7 +40,6 @@
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
-.In sys/types.h
 .In unistd.h
 .Ft ssize_t
 .Fn read "int fd" "void *buf" "size_t nbytes"

Modified: head/lib/libc/sys/write.2
==
--- head/lib/libc/sys/write.2   Tue Dec 15 15:08:29 2015(r292267)
+++ head/lib/libc/sys/write.2   Tue Dec 15 15:19:06 2015(r292268)
@@ -28,7 +28,7 @@
 .\" @(#)write.28.5 (Berkeley) 4/2/94
 .\" $FreeBSD$
 .\"
-.Dd September 11, 2013
+.Dd December 15, 2015
 .Dt WRITE 2
 .Os
 .Sh NAME
@@ -40,7 +40,6 @@
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
-.In sys/types.h
 .In unistd.h
 .Ft ssize_t
 .Fn write "int fd" "const void *buf" "size_t nbytes"
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


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

2015-12-15 Thread Svatopluk Kraus
Author: skra
Date: Tue Dec 15 15:22:33 2015
New Revision: 292269
URL: https://svnweb.freebsd.org/changeset/base/292269

Log:
  Replace all postponed TLB flushes by immediate ones except the one
  in pmap_remove_pages().
  
  Some points were considered:
  (1) There is no range TLB flush cp15 function.
  (2) There is no target selection for hardware TLB flush broadcasting.
  (3) Some memory ranges could be mapped sparsely.
  (4) Some memory ranges could be quite large.
  
  Tested by buildworld on RPi2 and Jetson TK1, i.e. 4 core platforms.
  It turned out that the buildworld time is faster. On the other hand,
  when the postponed TLB flush was also removed from pmap_remove_pages(),
  the result was worse. But pmap_remove_pages() is called for removing
  all user mapping from a process, thus it's quite expected.
  
  Note that the postponed TLB flushes came here from i386 pmap where
  hardware TLB flush broadcasting is not available.
  
  Approved by:  kib (mentor)

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

Modified: head/sys/arm/arm/pmap-v6-new.c
==
--- head/sys/arm/arm/pmap-v6-new.c  Tue Dec 15 15:19:06 2015
(r292268)
+++ head/sys/arm/arm/pmap-v6-new.c  Tue Dec 15 15:22:33 2015
(r292269)
@@ -2748,7 +2748,6 @@ pmap_pv_reclaim(pmap_t locked_pmap)
TAILQ_REMOVE(_chunks, pc, pc_lru);
if (pmap != pc->pc_pmap) {
if (pmap != NULL) {
-   pmap_tlb_flush_ng(pmap);
if (pmap != locked_pmap)
PMAP_UNLOCK(pmap);
}
@@ -2786,8 +2785,7 @@ pmap_pv_reclaim(pmap_t locked_pmap)
KASSERT(tpte2 != 0,
("pmap_pv_reclaim: pmap %p va %#x zero pte",
pmap, va));
-   if (pte2_is_global(tpte2))
-   tlb_flush(va);
+   pmap_tlb_flush(pmap, va);
m = PHYS_TO_VM_PAGE(pte2_pa(tpte2));
if (pte2_is_dirty(tpte2))
vm_page_dirty(m);
@@ -2845,7 +2843,6 @@ pmap_pv_reclaim(pmap_t locked_pmap)
 out:
TAILQ_CONCAT(_chunks, , pc_lru);
if (pmap != NULL) {
-   pmap_tlb_flush_ng(pmap);
if (pmap != locked_pmap)
PMAP_UNLOCK(pmap);
}
@@ -3375,18 +3372,16 @@ pmap_remove_pte1(pmap_t pmap, pt1_entry_
KASSERT((sva & PTE1_OFFSET) == 0,
("%s: sva is not 1mpage aligned", __func__));
 
+   /*
+* Clear and invalidate the mapping. It should occupy one and only TLB
+* entry. So, pmap_tlb_flush() called with aligned address should be
+* sufficient.
+*/
opte1 = pte1_load_clear(pte1p);
+   pmap_tlb_flush(pmap, sva);
+
if (pte1_is_wired(opte1))
pmap->pm_stats.wired_count -= PTE1_SIZE / PAGE_SIZE;
-
-   /*
-* If the mapping was global, invalidate it even if given pmap
-* is not active (kernel_pmap is active always). The mapping should
-* occupy one and only TLB entry. So, pmap_tlb_flush() called
-* with aligned address should be sufficient.
-*/
-   if (pte1_is_global(opte1))
-   tlb_flush(sva);
pmap->pm_stats.resident_count -= PTE1_SIZE / PAGE_SIZE;
if (pte1_is_managed(opte1)) {
pvh = pa_to_pvh(pte1_pa(opte1));
@@ -3470,7 +3465,6 @@ pmap_demote_pte1(pmap_t pmap, pt1_entry_
VM_ALLOC_NORMAL | VM_ALLOC_WIRED)) == NULL) {
SLIST_INIT();
pmap_remove_pte1(pmap, pte1p, pte1_trunc(va), );
-   pmap_tlb_flush(pmap, pte1_trunc(va));
pmap_free_zero_pages();
CTR3(KTR_PMAP, "%s: failure for va %#x in pmap %p",
__func__, va, pmap);
@@ -3856,17 +3850,15 @@ pmap_remove_pte2(pmap_t pmap, pt2_entry_
rw_assert(_global_lock, RA_WLOCKED);
PMAP_LOCK_ASSERT(pmap, MA_OWNED);
 
+   /* Clear and invalidate the mapping. */
opte2 = pte2_load_clear(pte2p);
+   pmap_tlb_flush(pmap, va);
+
KASSERT(pte2_is_valid(opte2), ("%s: pmap %p va %#x not link pte2 %#x",
__func__, pmap, va, opte2));
+
if (opte2 & PTE2_W)
pmap->pm_stats.wired_count -= 1;
-   /*
-* If the mapping was global, invalidate it even if given pmap
-* is not active (kernel_pmap is active always).
-*/
-   if (pte2_is_global(opte2))
-   tlb_flush(va);
pmap->pm_stats.resident_count -= 1;
if (pte2_is_managed(opte2)) {
m = PHYS_TO_VM_PAGE(pte2_pa(opte2));
@@ -3895,7 +3887,6 @@ pmap_remove_page(pmap_t pmap, vm_offset_

svn commit: r292270 - head/usr.sbin/ypldap

2015-12-15 Thread Marcelo Araujo
Author: araujo
Date: Tue Dec 15 15:37:58 2015
New Revision: 292270
URL: https://svnweb.freebsd.org/changeset/base/292270

Log:
  EAGAIN handling for imsg_read.
  
  Approved by:  bapt (mentor)
  Obtained from:OpenBSD
  Differential Revision:https://reviews.freebsd.org/D4547

Modified:
  head/usr.sbin/ypldap/ldapclient.c
  head/usr.sbin/ypldap/ypldap.c
  head/usr.sbin/ypldap/ypldap_dns.c

Modified: head/usr.sbin/ypldap/ldapclient.c
==
--- head/usr.sbin/ypldap/ldapclient.c   Tue Dec 15 15:22:33 2015
(r292269)
+++ head/usr.sbin/ypldap/ldapclient.c   Tue Dec 15 15:37:58 2015
(r292270)
@@ -172,7 +172,7 @@ client_dispatch_dns(int fd, short events
fatalx("unknown event");
 
if (events & EV_READ) {
-   if ((n = imsg_read(ibuf)) == -1)
+   if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN)
fatal("imsg_read error");
if (n == 0)
shut = 1;
@@ -275,7 +275,7 @@ client_dispatch_parent(int fd, short eve
fatalx("unknown event");
 
if (events & EV_READ) {
-   if ((n = imsg_read(ibuf)) == -1)
+   if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN)
fatal("imsg_read error");
if (n == 0)
shut = 1;
@@ -377,8 +377,10 @@ ldapclient(int pipe_main2client[2])
bzero(, sizeof(env));
TAILQ_INIT(_idms);
 
-   if ((pw = getpwnam(YPLDAP_USER)) == NULL)
+   if ((pw = getpwnam(YPLDAP_USER)) == NULL) {
+printf("ldapclient.c error\n");
fatal("getpwnam");
+}
 
if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, pipe_dns) == -1)
fatal("socketpair");

Modified: head/usr.sbin/ypldap/ypldap.c
==
--- head/usr.sbin/ypldap/ypldap.c   Tue Dec 15 15:22:33 2015
(r292269)
+++ head/usr.sbin/ypldap/ypldap.c   Tue Dec 15 15:37:58 2015
(r292270)
@@ -361,7 +361,7 @@ main_dispatch_client(int fd, short event
fatalx("unknown event");
 
if (events & EV_READ) {
-   if ((n = imsg_read(ibuf)) == -1)
+   if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN)
fatal("imsg_read error");
if (n == 0)
shut = 1;

Modified: head/usr.sbin/ypldap/ypldap_dns.c
==
--- head/usr.sbin/ypldap/ypldap_dns.c   Tue Dec 15 15:22:33 2015
(r292269)
+++ head/usr.sbin/ypldap/ypldap_dns.c   Tue Dec 15 15:37:58 2015
(r292270)
@@ -140,7 +140,7 @@ dns_dispatch_imsg(int fd, short events, 
fatalx("unknown event");
 
if (events & EV_READ) {
-   if ((n = imsg_read(ibuf)) == -1)
+   if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN)
fatal("imsg_read error");
if (n == 0)
shut = 1;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r292267 - head/lib/libc/sys

2015-12-15 Thread Kevin Lo
Author: kevlo
Date: Tue Dec 15 15:08:29 2015
New Revision: 292267
URL: https://svnweb.freebsd.org/changeset/base/292267

Log:
  Remove sys/types.h due to STANDARDS and unistd.h also includes sys/types.h.
  
  Reviewed by:  bde

Modified:
  head/lib/libc/sys/getuid.2
  head/lib/libc/sys/setuid.2

Modified: head/lib/libc/sys/getuid.2
==
--- head/lib/libc/sys/getuid.2  Tue Dec 15 14:17:07 2015(r292266)
+++ head/lib/libc/sys/getuid.2  Tue Dec 15 15:08:29 2015(r292267)
@@ -28,7 +28,7 @@
 .\" @(#)getuid.2   8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd June 4, 1993
+.Dd December 15, 2015
 .Dt GETUID 2
 .Os
 .Sh NAME
@@ -39,7 +39,6 @@
 .Lb libc
 .Sh SYNOPSIS
 .In unistd.h
-.In sys/types.h
 .Ft uid_t
 .Fn getuid void
 .Ft uid_t

Modified: head/lib/libc/sys/setuid.2
==
--- head/lib/libc/sys/setuid.2  Tue Dec 15 14:17:07 2015(r292266)
+++ head/lib/libc/sys/setuid.2  Tue Dec 15 15:08:29 2015(r292267)
@@ -28,7 +28,7 @@
 .\" @(#)setuid.2   8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd September 13, 2015
+.Dd December 15, 2015
 .Dt SETUID 2
 .Os
 .Sh NAME
@@ -40,7 +40,6 @@
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
-.In sys/types.h
 .In unistd.h
 .Ft int
 .Fn setuid "uid_t uid"
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r292272 - head/usr.sbin/ypldap

2015-12-15 Thread Marcelo Araujo
Author: araujo
Date: Tue Dec 15 15:42:42 2015
New Revision: 292272
URL: https://svnweb.freebsd.org/changeset/base/292272

Log:
  Remove the null checker before free.
  
  Approved by:  bapt (mentor)
  Obtained from:OpenBSD
  Differential Revision:https://reviews.freebsd.org/D4549

Modified:
  head/usr.sbin/ypldap/aldap.c

Modified: head/usr.sbin/ypldap/aldap.c
==
--- head/usr.sbin/ypldap/aldap.cTue Dec 15 15:41:09 2015
(r292271)
+++ head/usr.sbin/ypldap/aldap.cTue Dec 15 15:42:42 2015
(r292272)
@@ -353,8 +353,7 @@ aldap_parse_page_control(struct ber_elem
 void
 aldap_freepage(struct aldap_page_control *page)
 {
-   if (page->cookie)
-   free(page->cookie);
+   free(page->cookie);
free(page);
 }
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r292271 - head/usr.sbin/ypldap

2015-12-15 Thread Marcelo Araujo
Author: araujo
Date: Tue Dec 15 15:41:09 2015
New Revision: 292271
URL: https://svnweb.freebsd.org/changeset/base/292271

Log:
  Remove wrong header and the NULL check before free().
  
  Approved by:  bapt (mentor)
  Obtained from:OpenBSD
  Differential Revision:https://reviews.freebsd.org/D4548

Modified:
  head/usr.sbin/ypldap/ber.c

Modified: head/usr.sbin/ypldap/ber.c
==
--- head/usr.sbin/ypldap/ber.c  Tue Dec 15 15:37:58 2015(r292270)
+++ head/usr.sbin/ypldap/ber.c  Tue Dec 15 15:41:09 2015(r292271)
@@ -27,7 +27,6 @@
 #include/* XXX for debug output */
 #include  /* XXX for debug output */
 #include 
-#include 
 #include 
 #include 
 
@@ -1219,8 +1218,7 @@ ber_set_application(struct ber *b, unsig
 void
 ber_free(struct ber *b)
 {
-   if (b->br_wbuf != NULL)
-   free (b->br_wbuf);
+   free(b->br_wbuf);
 }
 
 static ssize_t
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"