svn commit: r309849 - in stable/9: contrib/file contrib/file/doc contrib/file/magic contrib/file/magic/Magdir contrib/file/python contrib/file/src lib/libmagic

2016-12-10 Thread Xin LI
Author: delphij
Date: Sun Dec 11 07:39:10 2016
New Revision: 309849
URL: https://svnweb.freebsd.org/changeset/base/309849

Log:
  MFC r308420: MFV r308392: file 5.29.

Added:
  stable/9/contrib/file/magic/Magdir/algol68
 - copied unchanged from r308420, head/contrib/file/magic/Magdir/algol68
  stable/9/contrib/file/magic/Magdir/application
 - copied unchanged from r308420, head/contrib/file/magic/Magdir/application
  stable/9/contrib/file/magic/Magdir/apt
 - copied unchanged from r308420, head/contrib/file/magic/Magdir/apt
  stable/9/contrib/file/magic/Magdir/psl
 - copied unchanged from r308420, head/contrib/file/magic/Magdir/psl
Modified:
  stable/9/contrib/file/ChangeLog
  stable/9/contrib/file/TODO
  stable/9/contrib/file/config.guess
  stable/9/contrib/file/config.sub
  stable/9/contrib/file/configure
  stable/9/contrib/file/configure.ac
  stable/9/contrib/file/doc/file.man
  stable/9/contrib/file/doc/magic.man
  stable/9/contrib/file/ltmain.sh
  stable/9/contrib/file/magic/Magdir/animation
  stable/9/contrib/file/magic/Magdir/apple
  stable/9/contrib/file/magic/Magdir/bioinformatics
  stable/9/contrib/file/magic/Magdir/c-lang
  stable/9/contrib/file/magic/Magdir/claris
  stable/9/contrib/file/magic/Magdir/commands
  stable/9/contrib/file/magic/Magdir/compress
  stable/9/contrib/file/magic/Magdir/cups
  stable/9/contrib/file/magic/Magdir/editors
  stable/9/contrib/file/magic/Magdir/filesystems
  stable/9/contrib/file/magic/Magdir/fonts
  stable/9/contrib/file/magic/Magdir/gcc
  stable/9/contrib/file/magic/Magdir/gnu
  stable/9/contrib/file/magic/Magdir/images
  stable/9/contrib/file/magic/Magdir/jpeg
  stable/9/contrib/file/magic/Magdir/msdos
  stable/9/contrib/file/magic/Magdir/pgp
  stable/9/contrib/file/magic/Magdir/python
  stable/9/contrib/file/magic/Magdir/ruby
  stable/9/contrib/file/magic/Magdir/sgml
  stable/9/contrib/file/magic/Magdir/sql
  stable/9/contrib/file/magic/Makefile.am
  stable/9/contrib/file/magic/Makefile.in
  stable/9/contrib/file/python/magic.py
  stable/9/contrib/file/src/apprentice.c
  stable/9/contrib/file/src/ascmagic.c
  stable/9/contrib/file/src/cdf.c
  stable/9/contrib/file/src/cdf.h
  stable/9/contrib/file/src/compress.c
  stable/9/contrib/file/src/der.c
  stable/9/contrib/file/src/file.c
  stable/9/contrib/file/src/file.h
  stable/9/contrib/file/src/funcs.c
  stable/9/contrib/file/src/magic.c
  stable/9/contrib/file/src/readcdf.c
  stable/9/contrib/file/src/readelf.c
  stable/9/contrib/file/src/softmagic.c
  stable/9/lib/libmagic/config.h
Directory Properties:
  stable/9/contrib/file/   (props changed)
  stable/9/lib/libmagic/   (props changed)

Modified: stable/9/contrib/file/ChangeLog
==
--- stable/9/contrib/file/ChangeLog Sun Dec 11 07:37:20 2016
(r309848)
+++ stable/9/contrib/file/ChangeLog Sun Dec 11 07:39:10 2016
(r309849)
@@ -1,3 +1,32 @@
+2016-10-25  10:40  Christos Zoulas 
+   
+   * release 5.28
+
+2016-10-24  11:20  Christos Zoulas 
+
+   * der getlength overflow (Jonas Wagner)
+   * multiple magic file load failure (Christoph Biedl)
+
+2016-10-17  11:26  Christos Zoulas 
+
+   * CDF parsing improvements (Guy Helmer)
+
+2016-07-20   7:26  Christos Zoulas 
+
+   * Add support for signed indirect offsets
+
+2016-07-18   7:41  Christos Zoulas 
+
+   * cat /dev/null | file - should print empty (Christoph Biedl)
+
+2016-07-05  15:20  Christos Zoulas 
+
+   * Bump string size from 64 to 96.
+
+2016-06-13  20:20  Christos Zoulas 
+
+   * PR/556: Fix separators on annotations.
+
 2016-06-13  19:40  Christos Zoulas 
 
* release 5.28

Modified: stable/9/contrib/file/TODO
==
--- stable/9/contrib/file/TODO  Sun Dec 11 07:37:20 2016(r309848)
+++ stable/9/contrib/file/TODO  Sun Dec 11 07:39:10 2016(r309849)
@@ -6,7 +6,6 @@ file, not here. More speculative materia
 listed in the BUGS section of the man page had been fixed!)
 
 ---
-
 It would be nice to simplify file considerably. For example,
 reimplement the apprentice and non-pattern magic methods in Python,
 and compile the magic patterns to a giant regex (or something similar;
@@ -15,8 +14,23 @@ small amount of C is needed (because fas
 required for soft magic, not the more detailed information given by
 hard-wired routines). In this regard, note that hplip, which is
 BSD-licensed, has a magic reimplementation in Python.
-
+---
 Read the kerberos magic entry for more ideas.
-
+---
 Write a string merger to make magic entry sizes dynamic.
 Strings will be converted to offsets from the string table.
+---
+Programming language support, we can introduce the concept of a group
+of rules where n rules need to 

svn commit: r309848 - in stable/10: contrib/file contrib/file/doc contrib/file/magic contrib/file/magic/Magdir contrib/file/python contrib/file/src lib/libmagic

2016-12-10 Thread Xin LI
Author: delphij
Date: Sun Dec 11 07:37:20 2016
New Revision: 309848
URL: https://svnweb.freebsd.org/changeset/base/309848

Log:
  MFC r308420: MFV r308392: file 5.29.

Added:
  stable/10/contrib/file/magic/Magdir/algol68
 - copied unchanged from r308420, head/contrib/file/magic/Magdir/algol68
  stable/10/contrib/file/magic/Magdir/application
 - copied unchanged from r308420, head/contrib/file/magic/Magdir/application
  stable/10/contrib/file/magic/Magdir/apt
 - copied unchanged from r308420, head/contrib/file/magic/Magdir/apt
  stable/10/contrib/file/magic/Magdir/psl
 - copied unchanged from r308420, head/contrib/file/magic/Magdir/psl
Modified:
  stable/10/contrib/file/ChangeLog
  stable/10/contrib/file/TODO
  stable/10/contrib/file/config.guess
  stable/10/contrib/file/config.sub
  stable/10/contrib/file/configure
  stable/10/contrib/file/configure.ac
  stable/10/contrib/file/doc/file.man
  stable/10/contrib/file/doc/magic.man
  stable/10/contrib/file/ltmain.sh
  stable/10/contrib/file/magic/Magdir/animation
  stable/10/contrib/file/magic/Magdir/apple
  stable/10/contrib/file/magic/Magdir/bioinformatics
  stable/10/contrib/file/magic/Magdir/c-lang
  stable/10/contrib/file/magic/Magdir/claris
  stable/10/contrib/file/magic/Magdir/commands
  stable/10/contrib/file/magic/Magdir/compress
  stable/10/contrib/file/magic/Magdir/cups
  stable/10/contrib/file/magic/Magdir/editors
  stable/10/contrib/file/magic/Magdir/filesystems
  stable/10/contrib/file/magic/Magdir/fonts
  stable/10/contrib/file/magic/Magdir/gcc
  stable/10/contrib/file/magic/Magdir/gnu
  stable/10/contrib/file/magic/Magdir/images
  stable/10/contrib/file/magic/Magdir/jpeg
  stable/10/contrib/file/magic/Magdir/msdos
  stable/10/contrib/file/magic/Magdir/pgp
  stable/10/contrib/file/magic/Magdir/python
  stable/10/contrib/file/magic/Magdir/ruby
  stable/10/contrib/file/magic/Magdir/sgml
  stable/10/contrib/file/magic/Magdir/sql
  stable/10/contrib/file/magic/Makefile.am
  stable/10/contrib/file/magic/Makefile.in
  stable/10/contrib/file/python/magic.py
  stable/10/contrib/file/src/apprentice.c
  stable/10/contrib/file/src/ascmagic.c
  stable/10/contrib/file/src/cdf.c
  stable/10/contrib/file/src/cdf.h
  stable/10/contrib/file/src/compress.c
  stable/10/contrib/file/src/der.c
  stable/10/contrib/file/src/file.c
  stable/10/contrib/file/src/file.h
  stable/10/contrib/file/src/funcs.c
  stable/10/contrib/file/src/magic.c
  stable/10/contrib/file/src/readcdf.c
  stable/10/contrib/file/src/readelf.c
  stable/10/contrib/file/src/softmagic.c
  stable/10/lib/libmagic/config.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/file/ChangeLog
==
--- stable/10/contrib/file/ChangeLogSun Dec 11 07:33:02 2016
(r309847)
+++ stable/10/contrib/file/ChangeLogSun Dec 11 07:37:20 2016
(r309848)
@@ -1,3 +1,32 @@
+2016-10-25  10:40  Christos Zoulas 
+   
+   * release 5.28
+
+2016-10-24  11:20  Christos Zoulas 
+
+   * der getlength overflow (Jonas Wagner)
+   * multiple magic file load failure (Christoph Biedl)
+
+2016-10-17  11:26  Christos Zoulas 
+
+   * CDF parsing improvements (Guy Helmer)
+
+2016-07-20   7:26  Christos Zoulas 
+
+   * Add support for signed indirect offsets
+
+2016-07-18   7:41  Christos Zoulas 
+
+   * cat /dev/null | file - should print empty (Christoph Biedl)
+
+2016-07-05  15:20  Christos Zoulas 
+
+   * Bump string size from 64 to 96.
+
+2016-06-13  20:20  Christos Zoulas 
+
+   * PR/556: Fix separators on annotations.
+
 2016-06-13  19:40  Christos Zoulas 
 
* release 5.28

Modified: stable/10/contrib/file/TODO
==
--- stable/10/contrib/file/TODO Sun Dec 11 07:33:02 2016(r309847)
+++ stable/10/contrib/file/TODO Sun Dec 11 07:37:20 2016(r309848)
@@ -6,7 +6,6 @@ file, not here. More speculative materia
 listed in the BUGS section of the man page had been fixed!)
 
 ---
-
 It would be nice to simplify file considerably. For example,
 reimplement the apprentice and non-pattern magic methods in Python,
 and compile the magic patterns to a giant regex (or something similar;
@@ -15,8 +14,23 @@ small amount of C is needed (because fas
 required for soft magic, not the more detailed information given by
 hard-wired routines). In this regard, note that hplip, which is
 BSD-licensed, has a magic reimplementation in Python.
-
+---
 Read the kerberos magic entry for more ideas.
-
+---
 Write a string merger to make magic entry sizes dynamic.
 Strings will be converted to offsets from the string table.
+---
+Programming language support, we can introduce the concept of a group
+of rules where n rules need to 

svn commit: r309847 - in stable/11: contrib/file contrib/file/doc contrib/file/magic contrib/file/magic/Magdir contrib/file/python contrib/file/src lib/libmagic

2016-12-10 Thread Xin LI
Author: delphij
Date: Sun Dec 11 07:33:02 2016
New Revision: 309847
URL: https://svnweb.freebsd.org/changeset/base/309847

Log:
  MFC r308420: MFV r308392: file 5.29.

Added:
  stable/11/contrib/file/magic/Magdir/algol68
 - copied unchanged from r308420, head/contrib/file/magic/Magdir/algol68
  stable/11/contrib/file/magic/Magdir/application
 - copied unchanged from r308420, head/contrib/file/magic/Magdir/application
  stable/11/contrib/file/magic/Magdir/apt
 - copied unchanged from r308420, head/contrib/file/magic/Magdir/apt
  stable/11/contrib/file/magic/Magdir/psl
 - copied unchanged from r308420, head/contrib/file/magic/Magdir/psl
Modified:
  stable/11/contrib/file/ChangeLog
  stable/11/contrib/file/TODO
  stable/11/contrib/file/config.guess
  stable/11/contrib/file/config.sub
  stable/11/contrib/file/configure
  stable/11/contrib/file/configure.ac
  stable/11/contrib/file/doc/file.man
  stable/11/contrib/file/doc/magic.man
  stable/11/contrib/file/ltmain.sh
  stable/11/contrib/file/magic/Magdir/animation
  stable/11/contrib/file/magic/Magdir/apple
  stable/11/contrib/file/magic/Magdir/bioinformatics
  stable/11/contrib/file/magic/Magdir/c-lang
  stable/11/contrib/file/magic/Magdir/claris
  stable/11/contrib/file/magic/Magdir/commands
  stable/11/contrib/file/magic/Magdir/compress
  stable/11/contrib/file/magic/Magdir/cups
  stable/11/contrib/file/magic/Magdir/editors
  stable/11/contrib/file/magic/Magdir/filesystems
  stable/11/contrib/file/magic/Magdir/fonts
  stable/11/contrib/file/magic/Magdir/gcc
  stable/11/contrib/file/magic/Magdir/gnu
  stable/11/contrib/file/magic/Magdir/images
  stable/11/contrib/file/magic/Magdir/jpeg
  stable/11/contrib/file/magic/Magdir/msdos
  stable/11/contrib/file/magic/Magdir/pgp
  stable/11/contrib/file/magic/Magdir/python
  stable/11/contrib/file/magic/Magdir/ruby
  stable/11/contrib/file/magic/Magdir/sgml
  stable/11/contrib/file/magic/Magdir/sql
  stable/11/contrib/file/magic/Makefile.am
  stable/11/contrib/file/magic/Makefile.in
  stable/11/contrib/file/python/magic.py
  stable/11/contrib/file/src/apprentice.c
  stable/11/contrib/file/src/ascmagic.c
  stable/11/contrib/file/src/cdf.c
  stable/11/contrib/file/src/cdf.h
  stable/11/contrib/file/src/compress.c
  stable/11/contrib/file/src/der.c
  stable/11/contrib/file/src/file.c
  stable/11/contrib/file/src/file.h
  stable/11/contrib/file/src/funcs.c
  stable/11/contrib/file/src/magic.c
  stable/11/contrib/file/src/readcdf.c
  stable/11/contrib/file/src/readelf.c
  stable/11/contrib/file/src/softmagic.c
  stable/11/lib/libmagic/config.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/contrib/file/ChangeLog
==
--- stable/11/contrib/file/ChangeLogSun Dec 11 06:08:01 2016
(r309846)
+++ stable/11/contrib/file/ChangeLogSun Dec 11 07:33:02 2016
(r309847)
@@ -1,3 +1,32 @@
+2016-10-25  10:40  Christos Zoulas 
+   
+   * release 5.28
+
+2016-10-24  11:20  Christos Zoulas 
+
+   * der getlength overflow (Jonas Wagner)
+   * multiple magic file load failure (Christoph Biedl)
+
+2016-10-17  11:26  Christos Zoulas 
+
+   * CDF parsing improvements (Guy Helmer)
+
+2016-07-20   7:26  Christos Zoulas 
+
+   * Add support for signed indirect offsets
+
+2016-07-18   7:41  Christos Zoulas 
+
+   * cat /dev/null | file - should print empty (Christoph Biedl)
+
+2016-07-05  15:20  Christos Zoulas 
+
+   * Bump string size from 64 to 96.
+
+2016-06-13  20:20  Christos Zoulas 
+
+   * PR/556: Fix separators on annotations.
+
 2016-06-13  19:40  Christos Zoulas 
 
* release 5.28

Modified: stable/11/contrib/file/TODO
==
--- stable/11/contrib/file/TODO Sun Dec 11 06:08:01 2016(r309846)
+++ stable/11/contrib/file/TODO Sun Dec 11 07:33:02 2016(r309847)
@@ -6,7 +6,6 @@ file, not here. More speculative materia
 listed in the BUGS section of the man page had been fixed!)
 
 ---
-
 It would be nice to simplify file considerably. For example,
 reimplement the apprentice and non-pattern magic methods in Python,
 and compile the magic patterns to a giant regex (or something similar;
@@ -15,8 +14,23 @@ small amount of C is needed (because fas
 required for soft magic, not the more detailed information given by
 hard-wired routines). In this regard, note that hplip, which is
 BSD-licensed, has a magic reimplementation in Python.
-
+---
 Read the kerberos magic entry for more ideas.
-
+---
 Write a string merger to make magic entry sizes dynamic.
 Strings will be converted to offsets from the string table.
+---
+Programming language support, we can introduce the concept of a group
+of rules where n rules need to 

svn commit: r309846 - in stable/11: contrib/libdivsufsort usr.bin/bsdiff/bsdiff

2016-12-10 Thread Xin LI
Author: delphij
Date: Sun Dec 11 06:08:01 2016
New Revision: 309846
URL: https://svnweb.freebsd.org/changeset/base/309846

Log:
  MFC r303285:
  
  Change bsdiff to use divsufsort suffix sort library instead of qsufsort,
  which is more efficient.
  
  Note that for now we do not create a separate library for libdivsufsort
  because it's not used anywhere else.
  
  Obtained from:Chromium

Added:
  stable/11/contrib/libdivsufsort/
 - copied from r303285, head/contrib/libdivsufsort/
  stable/11/usr.bin/bsdiff/bsdiff/config.h
 - copied unchanged from r303285, head/usr.bin/bsdiff/bsdiff/config.h
  stable/11/usr.bin/bsdiff/bsdiff/divsufsort64.h
 - copied unchanged from r303285, head/usr.bin/bsdiff/bsdiff/divsufsort64.h
Modified:
  stable/11/usr.bin/bsdiff/bsdiff/Makefile
  stable/11/usr.bin/bsdiff/bsdiff/bsdiff.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.bin/bsdiff/bsdiff/Makefile
==
--- stable/11/usr.bin/bsdiff/bsdiff/MakefileSun Dec 11 04:02:38 2016
(r309845)
+++ stable/11/usr.bin/bsdiff/bsdiff/MakefileSun Dec 11 06:08:01 2016
(r309846)
@@ -1,6 +1,17 @@
 # $FreeBSD$
 
-PROG=  bsdiff
+PROG=  bsdiff
+
+# libdivsufsort configured with:
+# cmake -DCMAKE_BUILD_TYPE="Release" -DBUILD_DIVSUFSORT64=ON
+.PATH: ${.CURDIR}/../../../contrib/libdivsufsort/lib
+CFLAGS+=   -DHAVE_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
+CFLAGS+=   -D_LARGE_FILES -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
+CFLAGS+=   -D__STDC_LIMIT_MACROS -DBUILD_DIVSUFSORT64
+CFLAGS+=   -I${.CURDIR}/../../../contrib/libdivsufsort/include -I${.CURDIR}
+SRCS=  divsufsort.c sssort.c trsort.c utils.c
+
+SRCS+= bsdiff.c
 
 LIBADD=bz2
 

Modified: stable/11/usr.bin/bsdiff/bsdiff/bsdiff.c
==
--- stable/11/usr.bin/bsdiff/bsdiff/bsdiff.cSun Dec 11 04:02:38 2016
(r309845)
+++ stable/11/usr.bin/bsdiff/bsdiff/bsdiff.cSun Dec 11 06:08:01 2016
(r309846)
@@ -44,106 +44,11 @@ __FBSDID("$FreeBSD$");
 #define O_BINARY 0
 #endif
 
-#define MIN(x,y) (((x)<(y)) ? (x) : (y))
-
-static void split(off_t *I,off_t *V,off_t start,off_t len,off_t h)
-{
-   off_t i,j,k,x,tmp,jj,kk;
-
-   if(len<16) {
-   for(k=start;kstart) split(I,V,start,jj-start,h);
-
-   for(i=0;ikk) split(I,V,kk,start+len-kk,h);
-}
-
-static void qsufsort(off_t *I,off_t *V,u_char *old,off_t oldsize)
-{
-   off_t buckets[256];
-   off_t i,h,len;
-
-   for(i=0;i<256;i++) buckets[i]=0;
-   for(i=0;i0;i--) buckets[i]=buckets[i-1];
-   buckets[0]=0;
-
-   for(i=0;i

svn commit: r309845 - stable/11/sys/netpfil/pf

2016-12-10 Thread Marcel Moolenaar
Author: marcel
Date: Sun Dec 11 04:02:38 2016
New Revision: 309845
URL: https://svnweb.freebsd.org/changeset/base/309845

Log:
  MFC r309394, r309787
  
  Fix use-after-free bugs in pfsync(4)

Modified:
  stable/11/sys/netpfil/pf/if_pfsync.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/netpfil/pf/if_pfsync.c
==
--- stable/11/sys/netpfil/pf/if_pfsync.cSun Dec 11 03:59:37 2016
(r309844)
+++ stable/11/sys/netpfil/pf/if_pfsync.cSun Dec 11 04:02:38 2016
(r309845)
@@ -161,8 +161,8 @@ static struct pfsync_q pfsync_qs[] = {
{ pfsync_out_del,   sizeof(struct pfsync_del_c),   PFSYNC_ACT_DEL_C }
 };
 
-static voidpfsync_q_ins(struct pf_state *, int);
-static voidpfsync_q_del(struct pf_state *);
+static voidpfsync_q_ins(struct pf_state *, int, bool);
+static voidpfsync_q_del(struct pf_state *, bool);
 
 static voidpfsync_update_state(struct pf_state *);
 
@@ -542,7 +542,7 @@ pfsync_state_import(struct pfsync_state 
if (!(flags & PFSYNC_SI_IOCTL)) {
st->state_flags &= ~PFSTATE_NOSYNC;
if (st->state_flags & PFSTATE_ACK) {
-   pfsync_q_ins(st, PFSYNC_S_IACK);
+   pfsync_q_ins(st, PFSYNC_S_IACK, true);
pfsync_push(sc);
}
}
@@ -1509,7 +1509,7 @@ pfsync_sendout(int schedswi)
struct ip *ip;
struct pfsync_header *ph;
struct pfsync_subheader *subh;
-   struct pf_state *st;
+   struct pf_state *st, *st_next;
struct pfsync_upd_req_item *ur;
int offset;
int q, count = 0;
@@ -1559,7 +1559,7 @@ pfsync_sendout(int schedswi)
offset += sizeof(*subh);
 
count = 0;
-   TAILQ_FOREACH(st, >sc_qs[q], sync_list) {
+   TAILQ_FOREACH_SAFE(st, >sc_qs[q], sync_list, st_next) {
KASSERT(st->sync_state == q,
("%s: st->sync_state == q",
__func__));
@@ -1668,7 +1668,7 @@ pfsync_insert_state(struct pf_state *st)
if (sc->sc_len == PFSYNC_MINPKT)
callout_reset(>sc_tmo, 1 * hz, pfsync_timeout, V_pfsyncif);
 
-   pfsync_q_ins(st, PFSYNC_S_INS);
+   pfsync_q_ins(st, PFSYNC_S_INS, true);
PFSYNC_UNLOCK(sc);
 
st->sync_updates = 0;
@@ -1789,7 +1789,7 @@ static void
 pfsync_update_state(struct pf_state *st)
 {
struct pfsync_softc *sc = V_pfsyncif;
-   int sync = 0;
+   bool sync = false, ref = true;
 
PF_STATE_LOCK_ASSERT(st);
PFSYNC_LOCK(sc);
@@ -1798,7 +1798,7 @@ pfsync_update_state(struct pf_state *st)
pfsync_undefer_state(st, 0);
if (st->state_flags & PFSTATE_NOSYNC) {
if (st->sync_state != PFSYNC_S_NONE)
-   pfsync_q_del(st);
+   pfsync_q_del(st, true);
PFSYNC_UNLOCK(sc);
return;
}
@@ -1815,14 +1815,17 @@ pfsync_update_state(struct pf_state *st)
if (st->key[PF_SK_WIRE]->proto == IPPROTO_TCP) {
st->sync_updates++;
if (st->sync_updates >= sc->sc_maxupdates)
-   sync = 1;
+   sync = true;
}
break;
 
case PFSYNC_S_IACK:
-   pfsync_q_del(st);
+   pfsync_q_del(st, false);
+   ref = false;
+   /* FALLTHROUGH */
+
case PFSYNC_S_NONE:
-   pfsync_q_ins(st, PFSYNC_S_UPD_C);
+   pfsync_q_ins(st, PFSYNC_S_UPD_C, ref);
st->sync_updates = 0;
break;
 
@@ -1880,13 +1883,14 @@ static void
 pfsync_update_state_req(struct pf_state *st)
 {
struct pfsync_softc *sc = V_pfsyncif;
+   bool ref = true;
 
PF_STATE_LOCK_ASSERT(st);
PFSYNC_LOCK(sc);
 
if (st->state_flags & PFSTATE_NOSYNC) {
if (st->sync_state != PFSYNC_S_NONE)
-   pfsync_q_del(st);
+   pfsync_q_del(st, true);
PFSYNC_UNLOCK(sc);
return;
}
@@ -1894,9 +1898,12 @@ pfsync_update_state_req(struct pf_state 
switch (st->sync_state) {
case PFSYNC_S_UPD_C:
case PFSYNC_S_IACK:
-   pfsync_q_del(st);
+   pfsync_q_del(st, false);
+   ref = false;
+   /* FALLTHROUGH */
+
case PFSYNC_S_NONE:
-   pfsync_q_ins(st, PFSYNC_S_UPD);
+   pfsync_q_ins(st, PFSYNC_S_UPD, ref);
pfsync_push(sc);
break;
 
@@ -1917,13 +1924,14 @@ static void
 pfsync_delete_state(struct pf_state *st)
 {
struct pfsync_softc *sc = V_pfsyncif;
+   bool ref = true;
 
PFSYNC_LOCK(sc);
if (st->state_flags & PFSTATE_ACK)

svn commit: r309844 - stable/11/usr.bin/mkimg

2016-12-10 Thread Marcel Moolenaar
Author: marcel
Date: Sun Dec 11 03:59:37 2016
New Revision: 309844
URL: https://svnweb.freebsd.org/changeset/base/309844

Log:
  MFC r306299:
  
  Update local variable 'block' after calling capacity_resize(),
  otherwise format_resize(), which is called right after, isn't
  getting the current/actual image size. Rather than rounding up,
  format_resize() could end up truncating the size and we don't
  allow that by design.

Modified:
  stable/11/usr.bin/mkimg/mkimg.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.bin/mkimg/mkimg.c
==
--- stable/11/usr.bin/mkimg/mkimg.c Sun Dec 11 03:57:21 2016
(r309843)
+++ stable/11/usr.bin/mkimg/mkimg.c Sun Dec 11 03:59:37 2016
(r309844)
@@ -463,13 +463,16 @@ mkimg(void)
 
block = scheme_metadata(SCHEME_META_IMG_END, block);
error = image_set_size(block);
-   if (!error)
+   if (!error) {
error = capacity_resize(block);
-   if (!error)
+   block = image_get_size();
+   }
+   if (!error) {
error = format_resize(block);
+   block = image_get_size();
+   }
if (error)
errc(EX_IOERR, error, "image sizing");
-   block = image_get_size();
ncyls = block / (nsecs * nheads);
error = scheme_write(block);
if (error)
___
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: r309843 - in stable/11: . contrib/ofed/usr.lib/libsdp gnu/lib/libgcc gnu/lib/libgcov lib/libc/stdlib lib/libedit lib/libprocstat lib/libthr/support share/mk sys/conf usr.sbin/bsnmpd/mod...

2016-12-10 Thread Marcel Moolenaar
Author: marcel
Date: Sun Dec 11 03:57:21 2016
New Revision: 309843
URL: https://svnweb.freebsd.org/changeset/base/309843

Log:
  MFC r305855, r306297, r306300, r306312-r306313
  
  When MAKEOBJDIRPREFIX points to a case-insensitive file system, the
  build can break when different source files create the same object
  files (case-insensitivity speaking).  This is the case for object
  files compiled with -fpic and shared libraries. The former uses
  an extension of ".So", and the latter an extension ".so".  Rename
  shared object files from *.So to *.pico to match what NetBSD does.
  
  Also:
   o  Compile _Exit.c as C99_Exit.c, as it conflicts with _exit.s
   o  Add entry to UPDATING
   o  Document .pico extension

Modified:
  stable/11/UPDATING
  stable/11/contrib/ofed/usr.lib/libsdp/Makefile
  stable/11/gnu/lib/libgcc/Makefile
  stable/11/gnu/lib/libgcov/Makefile
  stable/11/lib/libc/stdlib/Makefile.inc
  stable/11/lib/libedit/Makefile
  stable/11/lib/libprocstat/Makefile
  stable/11/lib/libthr/support/Makefile.inc
  stable/11/share/mk/bsd.README
  stable/11/share/mk/bsd.dep.mk
  stable/11/share/mk/bsd.lib.mk
  stable/11/share/mk/meta.autodep.mk
  stable/11/sys/conf/kern.post.mk
  stable/11/sys/conf/kern.pre.mk
  stable/11/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/UPDATING
==
--- stable/11/UPDATING  Sun Dec 11 02:01:59 2016(r309842)
+++ stable/11/UPDATING  Sun Dec 11 03:57:21 2016(r309843)
@@ -16,6 +16,12 @@ from older versions of FreeBSD, try WITH
 the tip of head, and then rebuild without this option. The bootstrap process
 from older version of current across the gcc/clang cutover is a bit fragile.
 
+20161210:
+   Relocatable object files with the extension of .So have been renamed
+   to use an extension of .pico instead.  The purpose of this change is
+   to avoid a name clash with shared libraries on case-insensitive file
+   systems.  On those file systems, foo.So is the same file as foo.so.
+
 20160622:
The libc stub for the pipe(2) system call has been replaced with
a wrapper that calls the pipe2(2) system call and the pipe(2)

Modified: stable/11/contrib/ofed/usr.lib/libsdp/Makefile
==
--- stable/11/contrib/ofed/usr.lib/libsdp/Makefile  Sun Dec 11 02:01:59 
2016(r309842)
+++ stable/11/contrib/ofed/usr.lib/libsdp/Makefile  Sun Dec 11 03:57:21 
2016(r309843)
@@ -22,4 +22,4 @@ CFLAGS+= -I${OFEDSYS}/include
 
 # Remove .[ly] since the checked-in version is preferred.
 .SUFFIXES:
-.SUFFIXES: .o .po .So .c .ln
+.SUFFIXES: .o .po .pico .c .ln

Modified: stable/11/gnu/lib/libgcc/Makefile
==
--- stable/11/gnu/lib/libgcc/Makefile   Sun Dec 11 02:01:59 2016
(r309842)
+++ stable/11/gnu/lib/libgcc/Makefile   Sun Dec 11 03:57:21 2016
(r309843)
@@ -254,8 +254,8 @@ OBJ_GRPS += FPBIT DPBIT
 .for T in ${OBJ_GRPS}
 ${T}_OBJS_T =  ${${T}_FUNCS:S/$/.o/}
 ${T}_OBJS_P =  ${${T}_FUNCS:S/$/.po/}
-${T}_OBJS_S =  ${${T}_FUNCS:S/$/.So/}
-SOBJS +=   ${${T}_FUNCS:S/$/.So/}
+${T}_OBJS_S =  ${${T}_FUNCS:S/$/.pico/}
+SOBJS +=   ${${T}_FUNCS:S/$/.pico/}
 
 ${${T}_OBJS_T}: ${${T}_CFILE} ${COMMONHDRS}
${CC_T} ${${T}_CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
@@ -270,7 +270,7 @@ ${${T}_OBJS_S}: ${${T}_CFILE} ${COMMONHD
 # Extra objects coming from separate files
 #
 .if !empty(LIB2ADD)
-SOBJS +=   ${LIB2ADD:R:S/$/.So/}
+SOBJS +=   ${LIB2ADD:R:S/$/.pico/}
 .endif
 
 #---
@@ -294,9 +294,9 @@ ${STAT_OBJS_P}: ${STD_CFILE} ${COMMONHDR
 .if defined(LIB1ASMSRC)
 ASM_T =${LIB1ASMFUNCS:S/$/.o/}
 ASM_P =${LIB1ASMFUNCS:S/$/.po/}
-ASM_S =${LIB1ASMFUNCS:S/$/.So/}
+ASM_S =${LIB1ASMFUNCS:S/$/.pico/}
 ASM_V =${LIB1ASMFUNCS:S/$/.vis/}
-SOBJS +=   ${LIB1ASMFUNCS:S/$/.So/}
+SOBJS +=   ${LIB1ASMFUNCS:S/$/.pico/}
 
 ${ASM_T}: ${LIB1ASMSRC} ${.PREFIX}.vis
${CC} -x assembler-with-cpp -c ${CFLAGS} -DL${.PREFIX} \
@@ -323,7 +323,7 @@ CLEANFILES += ${ASM_V} ${ASM_V:R:S/$/.vo
 #
 EH_OBJS_T = ${LIB2ADDEHSTATIC:R:S/$/.o/}
 EH_OBJS_P = ${LIB2ADDEHSTATIC:R:S/$/.po/}
-EH_OBJS_S = ${LIB2ADDEHSHARED:R:S/$/.So/}
+EH_OBJS_S = ${LIB2ADDEHSHARED:R:S/$/.pico/}
 EH_CFLAGS = -fexceptions -D__GLIBC__=3 -DElfW=__ElfN
 .if ${TARGET_CPUARCH} != "riscv64"
 # RISCVTODO: unwinding support
@@ -337,7 +337,7 @@ ${_src:R:S/$/.po/}: ${_src} ${COMMONHDRS
${CC_P} ${EH_CFLAGS} -o ${.TARGET} ${.IMPSRC}
 .endfor
 .for _src in ${LIB2ADDEHSHARED:M*.c}
-${_src:R:S/$/.So/}: ${_src} ${COMMONHDRS}
+${_src:R:S/$/.pico/}: ${_src} ${COMMONHDRS}
${CC_S} ${EH_C

svn commit: r309841 - in stable/11/sys/modules: . bios

2016-12-10 Thread Ravi Pokala
Author: rpokala
Date: Sun Dec 11 02:01:57 2016
New Revision: 309841
URL: https://svnweb.freebsd.org/changeset/base/309841

Log:
  MFC r309491: Build smbios.ko as a module for amd64 and i386
  
  For whatever reason, smapi, smbios, vpd are all under the "bios" directory.
  smapi is only for i386, so the entire "bios" directory is only built for
  i386. Break smapi out, and make only it i386-specific. Then, build the
  "bios" directory for both amd64 and i386.

Modified:
  stable/11/sys/modules/Makefile
  stable/11/sys/modules/bios/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/modules/Makefile
==
--- stable/11/sys/modules/Makefile  Sat Dec 10 23:58:14 2016
(r309840)
+++ stable/11/sys/modules/Makefile  Sun Dec 11 02:01:57 2016
(r309841)
@@ -544,6 +544,7 @@ _igb=   igb
 _agp=  agp
 _an=   an
 _aout= aout
+_bios= bios
 _bktr= bktr
 _bxe=  bxe
 _cardbus=  cardbus
@@ -726,7 +727,6 @@ _wds=   wds
 .if ${MK_EISA} != "no"
 _ahb=  ahb
 .endif
-_bios= bios
 _cm=   cm
 .if ${MK_SOURCELESS_UCODE} != "no"
 _ctau= ctau

Modified: stable/11/sys/modules/bios/Makefile
==
--- stable/11/sys/modules/bios/Makefile Sat Dec 10 23:58:14 2016
(r309840)
+++ stable/11/sys/modules/bios/Makefile Sun Dec 11 02:01:57 2016
(r309841)
@@ -1,6 +1,10 @@
 # $FreeBSD$
 #
 
-SUBDIR=smapi smbios vpd
+SUBDIR=smbios vpd
+
+.if ${MACHINE_ARCH} == "i386"
+SUBDIR+=   smapi
+.endif
 
 .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: r309842 - in stable/10/sys/modules: . bios

2016-12-10 Thread Ravi Pokala
Author: rpokala
Date: Sun Dec 11 02:01:59 2016
New Revision: 309842
URL: https://svnweb.freebsd.org/changeset/base/309842

Log:
  MFC r309491: Build smbios.ko as a module for amd64 and i386
  
  For whatever reason, smapi, smbios, vpd are all under the "bios" directory.
  smapi is only for i386, so the entire "bios" directory is only built for
  i386. Break smapi out, and make only it i386-specific. Then, build the
  "bios" directory for both amd64 and i386.
  
  Because 'sys/modules/Makefile' was refactored after stable/10 was branched,
  the diff for that file is different from that of the original commit. They
  are functionally equivalent.

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

Modified: stable/10/sys/modules/Makefile
==
--- stable/10/sys/modules/Makefile  Sun Dec 11 02:01:57 2016
(r309841)
+++ stable/10/sys/modules/Makefile  Sun Dec 11 02:01:59 2016
(r309842)
@@ -683,6 +683,7 @@ _amdsbwd=   amdsbwd
 _amdtemp=  amdtemp
 _arcmsr=   arcmsr
 _asmc= asmc
+_bios= bios
 _bktr= bktr
 _bxe=  bxe
 _cardbus=  cardbus

Modified: stable/10/sys/modules/bios/Makefile
==
--- stable/10/sys/modules/bios/Makefile Sun Dec 11 02:01:57 2016
(r309841)
+++ stable/10/sys/modules/bios/Makefile Sun Dec 11 02:01:59 2016
(r309842)
@@ -1,6 +1,10 @@
 # $FreeBSD$
 #
 
-SUBDIR=smapi smbios vpd
+SUBDIR=smbios vpd
+
+.if ${MACHINE_ARCH} == "i386"
+SUBDIR+=   smapi
+.endif
 
 .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"


Re: svn commit: r307402 - head/usr.sbin/bsdconfig/share

2016-12-10 Thread Devin Teske
I'm out of work and applying for jobs, so please be patient

-- 
Devin

>> On Dec 10, 2016, at 3:25 PM, Oliver Pinter  
>> wrote:
>> 
>> On 10/16/16, Devin Teske  wrote:
>> Author: dteske
>> Date: Sun Oct 16 20:59:28 2016
>> New Revision: 307402
>> URL: https://svnweb.freebsd.org/changeset/base/307402
>> 
>> Log:
>> Guard against bad service name argument(s) to load_rc_config()
>> 
>> MFC after:3 days
>> X-MFC-to:stable/11 stable/10
> 
> Is this MFC still needed? The 3 days already expired.
> 
>> 
>> Modified:
>> head/usr.sbin/bsdconfig/share/sysrc.subr
>> 
>> Modified: head/usr.sbin/bsdconfig/share/sysrc.subr
>> ==
>> --- head/usr.sbin/bsdconfig/share/sysrc.subrSun Oct 16 19:50:10
>> 2016(r307401)
>> +++ head/usr.sbin/bsdconfig/share/sysrc.subrSun Oct 16 20:59:28
>> 2016(r307402)
>> @@ -256,7 +256,9 @@ f_sysrc_service_configs()
>>   last_name=
>>   print_name() {
>>   local name="$1"
>> -[ "$name" = "$last_name" ] && return
>> +case "$name" in
>> +""|.|..|*/*|"$last_name") return ;;
>> +esac
>>   echo "$name" >&9
>>   last_name="$name"
>>   }
>> ___
>> svn-src-h...@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-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: r308296 - head/sys/cam/scsi

2016-12-10 Thread Oliver Pinter
On 11/4/16, Scott Long  wrote:
> Author: scottl
> Date: Fri Nov  4 16:56:36 2016
> New Revision: 308296
> URL: https://svnweb.freebsd.org/changeset/base/308296
>
> Log:
>   asc/ascq 44/0 is typically a non-transient, permanent error (at least
> until
>   the components are reset).  Therefore retries are pointless.  This is
> very
>   visible in SATL systems, for example an LSI SAS controller and a SATA
> HDD/SSD.
>
>   Reviewed by:ken
>   Obtained from:  Netflix
>   MFC after:  3 days

Hi Scott!

What's the status of the MFCs to 10-STABLE and 11-STABLE?

>
> Modified:
>   head/sys/cam/scsi/scsi_all.c
>
> Modified: head/sys/cam/scsi/scsi_all.c
> ==
> --- head/sys/cam/scsi/scsi_all.c  Fri Nov  4 16:24:38 2016
> (r308295)
> +++ head/sys/cam/scsi/scsi_all.c  Fri Nov  4 16:56:36 2016
> (r308296)
> @@ -2331,7 +2331,7 @@ static struct asc_table_entry asc_table[
>   { SST(0x43, 0x00, SS_RDEF,
>   "Message error") },
>   /* DTLPWROMAEBKVF */
> - { SST(0x44, 0x00, SS_RDEF,
> + { SST(0x44, 0x00, SS_FATAL | EIO,
>   "Internal target failure") },
>   /* DT P   MAEBKVF */
>   { SST(0x44, 0x01, SS_RDEF,  /* XXX TBD */
> ___
> svn-src-h...@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-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: r308350 - stable/11/sys/kern

2016-12-10 Thread Oliver Pinter
On 11/5/16, Mark Johnston  wrote:
> Author: markj
> Date: Sat Nov  5 20:15:58 2016
> New Revision: 308350
> URL: https://svnweb.freebsd.org/changeset/base/308350
>
> Log:
>   MFC r308097:
>   Fix WITNESS hints for pagequeue locks.

I think this commit required for 10-STABLE too:

op@opn hardenedBSD.git> git grep "vm pagequeue"
sys/vm/vm_page.c:   mtx_init(>pq_mutex, pq->pq_name,
"vm pagequeue",
op@opn hardenedBSD.git> git grep "vm page queue"
sys/kern/subr_witness.c:{ "vm page queue", _class_mtx_sleep },
sys/kern/subr_witness.c:{ "vm page queue", _class_mtx_sleep },
op@opn hardenedBSD.git>

It would be nice to MFC them to 10-STABLE too.

>
> Modified:
>   stable/11/sys/kern/subr_witness.c
> Directory Properties:
>   stable/11/   (props changed)
>
> Modified: stable/11/sys/kern/subr_witness.c
> ==
> --- stable/11/sys/kern/subr_witness.c Sat Nov  5 20:14:23 2016
> (r308349)
> +++ stable/11/sys/kern/subr_witness.c Sat Nov  5 20:15:58 2016
> (r308350)
> @@ -599,7 +599,7 @@ static struct witness_order_list_entry o
>* CDEV
>*/
>   { "vm map (system)", _class_mtx_sleep },
> - { "vm page queue", _class_mtx_sleep },
> + { "vm pagequeue", _class_mtx_sleep },
>   { "vnode interlock", _class_mtx_sleep },
>   { "cdev", _class_mtx_sleep },
>   { NULL, NULL },
> @@ -609,7 +609,7 @@ static struct witness_order_list_entry o
>   { "vm map (user)", _class_sx },
>   { "vm object", _class_rw },
>   { "vm page", _class_mtx_sleep },
> - { "vm page queue", _class_mtx_sleep },
> + { "vm pagequeue", _class_mtx_sleep },
>   { "pmap pv global", _class_rw },
>   { "pmap", _class_mtx_sleep },
>   { "pmap pv list", _class_rw },
> ___
> svn-src-stable...@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-stable-11
> To unsubscribe, send any mail to
> "svn-src-stable-11-unsubscr...@freebsd.org"
>
___
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: r307882 - head/contrib/bsnmp/lib

2016-12-10 Thread Oliver Pinter
On 10/24/16, Shteryana Shopova  wrote:
> Author: syrinx
> Date: Mon Oct 24 21:05:23 2016
> New Revision: 307882
> URL: https://svnweb.freebsd.org/changeset/base/307882
>
> Log:
>   Fix a regression introduced in SVN r256678 that breaks USM header parsing

The r256678 commit was already MFCd back to 10-STABLE by ngie@ but
this commit does not marked as MFC to 10-STABLE, and missing from
10-STABLE.

>
>   Reviewed by:bz@
>
> Modified:
>   head/contrib/bsnmp/lib/snmp.c
>
> Modified: head/contrib/bsnmp/lib/snmp.c
> ==
> --- head/contrib/bsnmp/lib/snmp.c Mon Oct 24 20:53:44 2016
> (r307881)
> +++ head/contrib/bsnmp/lib/snmp.c Mon Oct 24 21:05:23 2016
> (r307882)
> @@ -288,7 +288,7 @@ parse_secparams(struct asn_buf *b, struc
>   memset(buf, 0, 256);
>   tb.asn_ptr = buf;
>   tb.asn_len = 256;
> - u_int len;
> + u_int len = 256;
>
>   if (asn_get_octetstring(b, buf, ) != ASN_ERR_OK) {
>   snmp_error("cannot parse usm header");
> ___
> svn-src-h...@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-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: r307774 - head/lib/libusb

2016-12-10 Thread Oliver Pinter
On 12/11/16, Oliver Pinter  wrote:
> On 10/22/16, Edward Tomasz Napierala  wrote:
>> Author: trasz
>> Date: Sat Oct 22 14:37:13 2016
>> New Revision: 307774
>> URL: https://svnweb.freebsd.org/changeset/base/307774
>>
>> Log:
>>   Fix libusb20_dev_get_desc(3) to use the "vendor product" order, not
>>   "product vendor". This is consistent with how it's generally done.
>>   The ordering is visible eg in usbconfig(8) output.
>>
>>   Note to self: MFC this to 9 and 8.
>>
>>   Reviewed by:   hselasky@
>>   MFC after: 1 month
>
> Is this MFC still valid? I can't see them in 10-STABLE nor in 11-STABLE.
s/can't/not/

>
>>   Differential Revision: https://reviews.freebsd.org/D8258
>>
>> Modified:
>>   head/lib/libusb/libusb20_ugen20.c
>>
>> Modified: head/lib/libusb/libusb20_ugen20.c
>> ==
>> --- head/lib/libusb/libusb20_ugen20.cSat Oct 22 13:20:02 2016
>> (r307773)
>> +++ head/lib/libusb/libusb20_ugen20.cSat Oct 22 14:37:13 2016
>> (r307774)
>> @@ -214,8 +214,8 @@ ugen20_enumerate(struct libusb20_device
>>
>>  snprintf(pdev->usb_desc, sizeof(pdev->usb_desc),
>>  USB_GENERIC_NAME "%u.%u: <%s %s> at usbus%u", pdev->bus_number,
>> -pdev->device_address, devinfo.udi_product,
>> -devinfo.udi_vendor, pdev->bus_number);
>> +pdev->device_address, devinfo.udi_vendor,
>> +devinfo.udi_product, pdev->bus_number);
>>
>>  error = 0;
>>  done:
>> ___
>> svn-src-h...@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-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: r307774 - head/lib/libusb

2016-12-10 Thread Oliver Pinter
On 10/22/16, Edward Tomasz Napierala  wrote:
> Author: trasz
> Date: Sat Oct 22 14:37:13 2016
> New Revision: 307774
> URL: https://svnweb.freebsd.org/changeset/base/307774
>
> Log:
>   Fix libusb20_dev_get_desc(3) to use the "vendor product" order, not
>   "product vendor". This is consistent with how it's generally done.
>   The ordering is visible eg in usbconfig(8) output.
>
>   Note to self: MFC this to 9 and 8.
>
>   Reviewed by:hselasky@
>   MFC after:  1 month

Is this MFC still valid? I can't see them in 10-STABLE nor in 11-STABLE.

>   Differential Revision:  https://reviews.freebsd.org/D8258
>
> Modified:
>   head/lib/libusb/libusb20_ugen20.c
>
> Modified: head/lib/libusb/libusb20_ugen20.c
> ==
> --- head/lib/libusb/libusb20_ugen20.c Sat Oct 22 13:20:02 2016
> (r307773)
> +++ head/lib/libusb/libusb20_ugen20.c Sat Oct 22 14:37:13 2016
> (r307774)
> @@ -214,8 +214,8 @@ ugen20_enumerate(struct libusb20_device
>
>   snprintf(pdev->usb_desc, sizeof(pdev->usb_desc),
>   USB_GENERIC_NAME "%u.%u: <%s %s> at usbus%u", pdev->bus_number,
> - pdev->device_address, devinfo.udi_product,
> - devinfo.udi_vendor, pdev->bus_number);
> + pdev->device_address, devinfo.udi_vendor,
> + devinfo.udi_product, pdev->bus_number);
>
>   error = 0;
>  done:
> ___
> svn-src-h...@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-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: r309840 - head/sbin/camcontrol

2016-12-10 Thread Ngie Cooper
Author: ngie
Date: Sat Dec 10 23:58:14 2016
New Revision: 309840
URL: https://svnweb.freebsd.org/changeset/base/309840

Log:
  Cut to the chase and just call free instead of free(x) + x = NULL
  
  NULLing out x wasn't required as the memory was immediately scribbled
  over with strdup in the following call.
  
  MFC after:1 week
  Submitted by: imp

Modified:
  head/sbin/camcontrol/timestamp.c

Modified: head/sbin/camcontrol/timestamp.c
==
--- head/sbin/camcontrol/timestamp.cSat Dec 10 23:26:34 2016
(r309839)
+++ head/sbin/camcontrol/timestamp.cSat Dec 10 23:58:14 2016
(r309840)
@@ -336,11 +336,6 @@ timestamp(struct cam_device *device, int
int single_arg = 0;
int do_utc = 0;
 
-#defineFREE(x) do {\
-   free(x);\
-   x = NULL;   \
-} while(0)
-
while ((c = getopt(argc, argv, combinedopt)) != -1) {
switch (c) {
case 'r': {
@@ -363,7 +358,7 @@ timestamp(struct cam_device *device, int
}
case 'f': {
single_arg++;
-   FREE(format_string);
+   free(format_string);
format_string = strdup(optarg);
if (format_string == NULL) {
warn("Error allocating memory for format "
@@ -375,7 +370,7 @@ timestamp(struct cam_device *device, int
}
case 'm': {
single_arg++;
-   FREE(format_string);
+   free(format_string);
format_string = strdup(MIL);
if (format_string == NULL) {
warn("Error allocating memory");
@@ -389,7 +384,7 @@ timestamp(struct cam_device *device, int
break;
}
case 'T':
-   FREE(timestamp_string);
+   free(timestamp_string);
timestamp_string = strdup(optarg);
if (timestamp_string == NULL) {
warn("Error allocating memory for format "
@@ -403,8 +398,6 @@ timestamp(struct cam_device *device, int
}
}
 
-#undef FREE
-
if (action == -1) {
warnx("Must specify an action, either -r or -s");
error = 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"


Re: svn commit: r309839 - head/sbin/camcontrol

2016-12-10 Thread Ngie Cooper (yaneurabeya)

> On Dec 10, 2016, at 15:53, Warner Losh  wrote:
> 
> Why not just unconditionally free them? You don't need to NULL them
> out. That would save a IMHO bogus macro.

Yeah, you’re right. I’m doing it out of habit to avoid access after free.
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r309839 - head/sbin/camcontrol

2016-12-10 Thread Warner Losh
Why not just unconditionally free them? You don't need to NULL them
out. That would save a IMHO bogus macro.

On Sat, Dec 10, 2016 at 4:26 PM, Ngie Cooper  wrote:
> Author: ngie
> Date: Sat Dec 10 23:26:34 2016
> New Revision: 309839
> URL: https://svnweb.freebsd.org/changeset/base/309839
>
> Log:
>   free/NULL out variables prior to calling strdup to avoid leaking memory
>   if arguments are specified more than once with "camcontrol timestamp".
>
>   CID:  1366829, 1366831
>   MFC after:1 week
>
> Modified:
>   head/sbin/camcontrol/timestamp.c
>
> Modified: head/sbin/camcontrol/timestamp.c
> ==
> --- head/sbin/camcontrol/timestamp.cSat Dec 10 22:31:49 2016
> (r309838)
> +++ head/sbin/camcontrol/timestamp.cSat Dec 10 23:26:34 2016
> (r309839)
> @@ -336,6 +336,11 @@ timestamp(struct cam_device *device, int
> int single_arg = 0;
> int do_utc = 0;
>
> +#defineFREE(x) do {\
> +   free(x);\
> +   x = NULL;   \
> +} while(0)
> +
> while ((c = getopt(argc, argv, combinedopt)) != -1) {
> switch (c) {
> case 'r': {
> @@ -358,6 +363,7 @@ timestamp(struct cam_device *device, int
> }
> case 'f': {
> single_arg++;
> +   FREE(format_string);
> format_string = strdup(optarg);
> if (format_string == NULL) {
> warn("Error allocating memory for format "
> @@ -369,6 +375,7 @@ timestamp(struct cam_device *device, int
> }
> case 'm': {
> single_arg++;
> +   FREE(format_string);
> format_string = strdup(MIL);
> if (format_string == NULL) {
> warn("Error allocating memory");
> @@ -382,6 +389,7 @@ timestamp(struct cam_device *device, int
> break;
> }
> case 'T':
> +   FREE(timestamp_string);
> timestamp_string = strdup(optarg);
> if (timestamp_string == NULL) {
> warn("Error allocating memory for format "
> @@ -395,6 +403,8 @@ timestamp(struct cam_device *device, int
> }
> }
>
> +#undef FREE
> +
> if (action == -1) {
> warnx("Must specify an action, either -r or -s");
> error = 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"


Re: svn commit: r307684 - head/sbin/camcontrol

2016-12-10 Thread Oliver Pinter
On 10/20/16, Kenneth D. Merry  wrote:
> Author: ken
> Date: Thu Oct 20 19:42:26 2016
> New Revision: 307684
> URL: https://svnweb.freebsd.org/changeset/base/307684
>
> Log:
>   For CCBs allocated on the stack, we need to clear the entire CCB, not
> just
>   the header.  Otherwise stack garbage can lead to random flags getting
> set.
>
>   This showed up as 'camcontrol rescan all' failing with EINVAL because the
>   address type wasn't CAM_DATA_VADDR.
>
>   sbin/camcontrol/camcontrol.c:
>   In rescan_or_reset_bus(), bzero the stack-allocated CCBs before
>   use instead of clearing the body.
>
>   MFC after:  3 days
>   Sponsored by:   Spectra Logic

The MFC of this commit is missed both for 10-STABLE and 11-STABLE. Is
this still in plan to do?

>
> Modified:
>   head/sbin/camcontrol/camcontrol.c
>
> Modified: head/sbin/camcontrol/camcontrol.c
> ==
> --- head/sbin/camcontrol/camcontrol.c Thu Oct 20 18:43:12 2016
> (r307683)
> +++ head/sbin/camcontrol/camcontrol.c Thu Oct 20 19:42:26 2016
> (r307684)
> @@ -3139,6 +3139,8 @@ rescan_or_reset_bus(path_id_t bus, int r
>   return(1);
>   }
>
> + bzero(, sizeof(ccb));
> +
>   if (bus != CAM_BUS_WILDCARD) {
>   ccb.ccb_h.func_code = rescan ? XPT_SCAN_BUS : XPT_RESET_BUS;
>   ccb.ccb_h.path_id = bus;
> @@ -3181,7 +3183,7 @@ rescan_or_reset_bus(path_id_t bus, int r
>* no-op, sending a rescan to the xpt bus would result in a status of
>* CAM_REQ_INVALID.
>*/
> - CCB_CLEAR_ALL_EXCEPT_HDR();
> + bzero(, sizeof(matchccb));
>   matchccb.ccb_h.func_code = XPT_DEV_MATCH;
>   matchccb.ccb_h.path_id = CAM_BUS_WILDCARD;
>   bufsize = sizeof(struct dev_match_result) * 20;
> ___
> svn-src-h...@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-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: r307958 - stable/11/usr.bin/printenv

2016-12-10 Thread Oliver Pinter
On 10/26/16, Pietro Cerutti  wrote:
> Author: gahr (ports committer)
> Date: Wed Oct 26 08:39:33 2016
> New Revision: 307958
> URL: https://svnweb.freebsd.org/changeset/base/307958
>
> Log:
>   MFC r307638:
>
>   Chase a cornercase in printenv and sync its behaviour with builtin's
>
>   The cornercase is when printenv is passed a parameter in the form
>   VAR=val, where VAR=val exists in the environment. In this case, printenv
> would
>   print a spurious newline and returns 0.
>
>   Approved by:cognet
>   MFC after:  1 week

This MFC is only for 11 or for 10-STABLE too?

>
> Modified:
>   stable/11/usr.bin/printenv/printenv.c
> Directory Properties:
>   stable/11/   (props changed)
>
> Modified: stable/11/usr.bin/printenv/printenv.c
> ==
> --- stable/11/usr.bin/printenv/printenv.c Wed Oct 26 07:45:48
> 2016  (r307957)
> +++ stable/11/usr.bin/printenv/printenv.c Wed Oct 26 08:39:33
> 2016  (r307958)
> @@ -83,8 +83,8 @@ main(int argc, char *argv[])
>   for (ep = environ; *ep; ep++)
>   if (!memcmp(*ep, *argv, len)) {
>   cp = *ep + len;
> - if (!*cp || *cp == '=') {
> - (void)printf("%s\n", *cp ? cp + 1 : cp);
> + if (*cp == '=') {
> + (void)printf("%s\n", cp + 1);
>   exit(0);
>   }
>   }
> ___
> svn-src-stable...@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-stable-11
> To unsubscribe, send any mail to
> "svn-src-stable-11-unsubscr...@freebsd.org"
>
___
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: r309839 - head/sbin/camcontrol

2016-12-10 Thread Ngie Cooper
Author: ngie
Date: Sat Dec 10 23:26:34 2016
New Revision: 309839
URL: https://svnweb.freebsd.org/changeset/base/309839

Log:
  free/NULL out variables prior to calling strdup to avoid leaking memory
  if arguments are specified more than once with "camcontrol timestamp".
  
  CID:  1366829, 1366831
  MFC after:1 week

Modified:
  head/sbin/camcontrol/timestamp.c

Modified: head/sbin/camcontrol/timestamp.c
==
--- head/sbin/camcontrol/timestamp.cSat Dec 10 22:31:49 2016
(r309838)
+++ head/sbin/camcontrol/timestamp.cSat Dec 10 23:26:34 2016
(r309839)
@@ -336,6 +336,11 @@ timestamp(struct cam_device *device, int
int single_arg = 0;
int do_utc = 0;
 
+#defineFREE(x) do {\
+   free(x);\
+   x = NULL;   \
+} while(0)
+
while ((c = getopt(argc, argv, combinedopt)) != -1) {
switch (c) {
case 'r': {
@@ -358,6 +363,7 @@ timestamp(struct cam_device *device, int
}
case 'f': {
single_arg++;
+   FREE(format_string);
format_string = strdup(optarg);
if (format_string == NULL) {
warn("Error allocating memory for format "
@@ -369,6 +375,7 @@ timestamp(struct cam_device *device, int
}
case 'm': {
single_arg++;
+   FREE(format_string);
format_string = strdup(MIL);
if (format_string == NULL) {
warn("Error allocating memory");
@@ -382,6 +389,7 @@ timestamp(struct cam_device *device, int
break;
}
case 'T':
+   FREE(timestamp_string);
timestamp_string = strdup(optarg);
if (timestamp_string == NULL) {
warn("Error allocating memory for format "
@@ -395,6 +403,8 @@ timestamp(struct cam_device *device, int
}
}
 
+#undef FREE
+
if (action == -1) {
warnx("Must specify an action, either -r or -s");
error = 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"


Re: svn commit: r307402 - head/usr.sbin/bsdconfig/share

2016-12-10 Thread Oliver Pinter
On 10/16/16, Devin Teske  wrote:
> Author: dteske
> Date: Sun Oct 16 20:59:28 2016
> New Revision: 307402
> URL: https://svnweb.freebsd.org/changeset/base/307402
>
> Log:
>   Guard against bad service name argument(s) to load_rc_config()
>
>   MFC after:  3 days
>   X-MFC-to:   stable/11 stable/10

Is this MFC still needed? The 3 days already expired.

>
> Modified:
>   head/usr.sbin/bsdconfig/share/sysrc.subr
>
> Modified: head/usr.sbin/bsdconfig/share/sysrc.subr
> ==
> --- head/usr.sbin/bsdconfig/share/sysrc.subr  Sun Oct 16 19:50:10
> 2016  (r307401)
> +++ head/usr.sbin/bsdconfig/share/sysrc.subr  Sun Oct 16 20:59:28
> 2016  (r307402)
> @@ -256,7 +256,9 @@ f_sysrc_service_configs()
>   last_name=
>   print_name() {
>   local name="$1"
> - [ "$name" = "$last_name" ] && return
> + case "$name" in
> + ""|.|..|*/*|"$last_name") return ;;
> + esac
>   echo "$name" >&9
>   last_name="$name"
>   }
> ___
> svn-src-h...@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-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: r309838 - head/sys/dev/usb/wlan

2016-12-10 Thread Andriy Voskoboinyk
Author: avos
Date: Sat Dec 10 22:31:49 2016
New Revision: 309838
URL: https://svnweb.freebsd.org/changeset/base/309838

Log:
  rsu: various initialization fixes.
  
  - Do not ignore initialization errors; call ieee80211_stop()
  when initialization failed.
  - Use usb_pause_mtx() instead of DELAY() while waiting for firmware
  loading; this fixes system freeze during firmware startup.
  - Do not execute rsu_stop() when device is powered off; fixes
  'unknown board type (rfconfig=0xff)' error when the device is
  reattached.
  
  Tested with Asus USB-N10.

Modified:
  head/sys/dev/usb/wlan/if_rsu.c

Modified: head/sys/dev/usb/wlan/if_rsu.c
==
--- head/sys/dev/usb/wlan/if_rsu.c  Sat Dec 10 22:08:33 2016
(r309837)
+++ head/sys/dev/usb/wlan/if_rsu.c  Sat Dec 10 22:31:49 2016
(r309838)
@@ -249,7 +249,7 @@ static int  rsu_raw_xmit(struct ieee80211
 static voidrsu_rxfilter_init(struct rsu_softc *);
 static voidrsu_rxfilter_set(struct rsu_softc *, uint32_t, uint32_t);
 static voidrsu_rxfilter_refresh(struct rsu_softc *);
-static voidrsu_init(struct rsu_softc *);
+static int rsu_init(struct rsu_softc *);
 static int rsu_tx_start(struct rsu_softc *, struct ieee80211_node *, 
struct mbuf *, struct rsu_data *);
 static int rsu_transmit(struct ieee80211com *, struct mbuf *);
@@ -620,9 +620,7 @@ rsu_detach(device_t self)
struct rsu_softc *sc = device_get_softc(self);
struct ieee80211com *ic = >sc_ic;
 
-   RSU_LOCK(sc);
rsu_stop(sc);
-   RSU_UNLOCK(sc);
 
usbd_transfer_unsetup(sc->sc_xfer, RSU_N_TRANSFER);
 
@@ -2921,20 +2919,17 @@ static void
 rsu_parent(struct ieee80211com *ic)
 {
struct rsu_softc *sc = ic->ic_softc;
-   int startall = 0;
 
-   RSU_LOCK(sc);
if (ic->ic_nrunning > 0) {
-   if (!sc->sc_running) {
-   rsu_init(sc);
-   startall = 1;
+   if (rsu_init(sc) == 0)
+   ieee80211_start_all(ic);
+   else {
+   struct ieee80211vap *vap = TAILQ_FIRST(>ic_vaps);
+   if (vap != NULL)
+   ieee80211_stop(vap);
}
-   } else if (sc->sc_running)
+   } else
rsu_stop(sc);
-   RSU_UNLOCK(sc);
-
-   if (startall)
-   ieee80211_start_all(ic);
 }
 
 /*
@@ -3484,7 +3479,7 @@ rsu_rxfilter_refresh(struct rsu_softc *s
rsu_rxfilter_set(sc, mask_min, mask_all);
 }
 
-static void
+static int
 rsu_init(struct rsu_softc *sc)
 {
struct ieee80211com *ic = >sc_ic;
@@ -3493,7 +3488,12 @@ rsu_init(struct rsu_softc *sc)
int error;
int i;
 
-   RSU_ASSERT_LOCKED(sc);
+   RSU_LOCK(sc);
+
+   if (sc->sc_running) {
+   RSU_UNLOCK(sc);
+   return (0);
+   }
 
/* Ensure the mbuf queue is drained */
rsu_drain_mbufq(sc);
@@ -3538,7 +3538,7 @@ rsu_init(struct rsu_softc *sc)
rsu_write_region_1(sc, R92S_MACID, macaddr, IEEE80211_ADDR_LEN);
 
/* It really takes 1.5 seconds for the firmware to boot: */
-   rsu_ms_delay(sc, 2000);
+   usb_pause_mtx(>sc_mtx, USB_MS_TO_TICKS(2000));
 
RSU_DPRINTF(sc, RSU_DEBUG_RESET, "%s: setting MAC address to %s\n",
__func__,
@@ -3570,11 +3570,16 @@ rsu_init(struct rsu_softc *sc)
 
/* We're ready to go. */
sc->sc_running = 1;
-   return;
+   RSU_UNLOCK(sc);
+
+   return (0);
 fail:
/* Need to stop all failed transfers, if any */
for (i = 0; i != RSU_N_TRANSFER; i++)
usbd_transfer_stop(sc->sc_xfer[i]);
+   RSU_UNLOCK(sc);
+
+   return (error);
 }
 
 static void
@@ -3582,7 +3587,11 @@ rsu_stop(struct rsu_softc *sc)
 {
int i;
 
-   RSU_ASSERT_LOCKED(sc);
+   RSU_LOCK(sc);
+   if (!sc->sc_running) {
+   RSU_UNLOCK(sc);
+   return;
+   }
 
sc->sc_running = 0;
sc->sc_vap_is_running = 0;
@@ -3605,6 +3614,7 @@ rsu_stop(struct rsu_softc *sc)
 
/* Ensure the mbuf queue is drained */
rsu_drain_mbufq(sc);
+   RSU_UNLOCK(sc);
 }
 
 /*
___
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: r309837 - head/contrib/netbsd-tests/lib/libc/sys

2016-12-10 Thread Ngie Cooper
Author: ngie
Date: Sat Dec 10 22:08:33 2016
New Revision: 309837
URL: https://svnweb.freebsd.org/changeset/base/309837

Log:
  Change the process limits for RLIMIT_MEMLOCK to RLIM_INFINITY when
  executing :mincore_resid
  
  The default process limits in FreeBSD is 64kB for unprivileged users,
  which empirically is too low to run the :mincore_resid testcase.
  
  Process limits are inherited, so even though the default limit for
  root users is RLIM_INFINITY, the inherited limit with "sudo" with the
  default login.conf will be 64kB.
  
  Use setrlimit to set rlim_max for RLIMIT_MEMLOCK to RLIM_INFINITY to
  avoid ENOMEM issues when calling mlock to wire the mmap'ed address
  space.
  
  setrlimit requires root access to increase rlim_max, so require root
  privileges when running the test
  
  Discovered when executing the tests with sudo, e.g.
  "sudo kyua test -k /usr/tests/lib/libc/sys/Kyuafile mincore_test"
  
  MFC after:2 weeks

Modified:
  head/contrib/netbsd-tests/lib/libc/sys/t_mincore.c

Modified: head/contrib/netbsd-tests/lib/libc/sys/t_mincore.c
==
--- head/contrib/netbsd-tests/lib/libc/sys/t_mincore.c  Sat Dec 10 22:05:24 
2016(r309836)
+++ head/contrib/netbsd-tests/lib/libc/sys/t_mincore.c  Sat Dec 10 22:08:33 
2016(r309837)
@@ -144,6 +144,9 @@ ATF_TC_WITH_CLEANUP(mincore_resid);
 ATF_TC_HEAD(mincore_resid, tc)
 {
atf_tc_set_md_var(tc, "descr", "Test page residency with mincore(2)");
+#ifdef __FreeBSD__
+   atf_tc_set_md_var(tc, "require.user", "root");
+#endif
 }
 
 ATF_TC_BODY(mincore_resid, tc)
@@ -155,6 +158,13 @@ ATF_TC_BODY(mincore_resid, tc)
struct rlimit rlim;
 
ATF_REQUIRE(getrlimit(RLIMIT_MEMLOCK, ) == 0);
+#ifdef __FreeBSD__
+   /*
+* Bump the mlock limit to unlimited so the rest of the testcase
+* passes instead of failing on the mlock call.
+*/
+   rlim.rlim_max = RLIM_INFINITY;
+#endif
rlim.rlim_cur = rlim.rlim_max;
ATF_REQUIRE(setrlimit(RLIMIT_MEMLOCK, ) == 0);
 
@@ -206,8 +216,9 @@ ATF_TC_BODY(mincore_resid, tc)
"might be low on memory");
 
 #ifdef __FreeBSD__
-   ATF_REQUIRE_MSG(mlock(addr, npgs * page) == 0, "mlock failed: %s",
-   strerror(errno));
+   if (mlock(addr, npgs * page) == -1 && errno != ENOMEM)
+   atf_tc_skip("could not wire anonymous test area, system might "
+   "be low on memory");
 #endif
ATF_REQUIRE(check_residency(addr, npgs) == npgs);
ATF_REQUIRE(munmap(addr, npgs * page) == 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: r309836 - head/tests/sys/kern

2016-12-10 Thread Jilles Tjoelker
Author: jilles
Date: Sat Dec 10 22:05:24 2016
New Revision: 309836
URL: https://svnweb.freebsd.org/changeset/base/309836

Log:
  Add some tests for reaper functionality (in procctl()).
  
  MFC after:1 week

Added:
  head/tests/sys/kern/reaper.c   (contents, props changed)
Modified:
  head/tests/sys/kern/Makefile

Modified: head/tests/sys/kern/Makefile
==
--- head/tests/sys/kern/MakefileSat Dec 10 22:03:44 2016
(r309835)
+++ head/tests/sys/kern/MakefileSat Dec 10 22:05:24 2016
(r309836)
@@ -8,6 +8,7 @@ TESTSDIR=   ${TESTSBASE}/sys/kern
 ATF_TESTS_C+=  kern_copyin
 ATF_TESTS_C+=  kern_descrip_test
 ATF_TESTS_C+=  ptrace_test
+ATF_TESTS_C+=  reaper
 PLAIN_TESTS_C+=subr_unit_test
 ATF_TESTS_C+=  unix_seqpacket_test
 ATF_TESTS_C+=  unix_passfd_test

Added: head/tests/sys/kern/reaper.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tests/sys/kern/reaper.cSat Dec 10 22:05:24 2016
(r309836)
@@ -0,0 +1,494 @@
+/*-
+ * 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 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.
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+ATF_TC_WITHOUT_HEAD(reaper_wait_child_first);
+ATF_TC_BODY(reaper_wait_child_first, tc)
+{
+   pid_t parent, child, grandchild, pid;
+   int status, r;
+   int pip[2];
+
+   /* Be paranoid. */
+   pid = waitpid(-1, NULL, WNOHANG);
+   ATF_REQUIRE(pid == -1 && errno == ECHILD);
+
+   parent = getpid();
+   r = procctl(P_PID, parent, PROC_REAP_ACQUIRE, NULL);
+   ATF_REQUIRE_EQ(0, r);
+
+   r = pipe(pip);
+   ATF_REQUIRE_EQ(0, r);
+
+   child = fork();
+   ATF_REQUIRE(child != -1);
+   if (child == 0) {
+   if (close(pip[1]) != 0)
+   _exit(100);
+   grandchild = fork();
+   if (grandchild == -1)
+   _exit(101);
+   else if (grandchild == 0) {
+   if (read(pip[0], &(uint8_t){ 0 }, 1) != 0)
+   _exit(102);
+   if (getppid() != parent)
+   _exit(103);
+   _exit(2);
+   } else
+   _exit(3);
+   }
+
+   pid = waitpid(child, , 0);
+   ATF_REQUIRE_EQ(child, pid);
+   r = WIFEXITED(status) ? WEXITSTATUS(status) : -1;
+   ATF_CHECK_EQ(3, r);
+
+   r = close(pip[1]);
+   ATF_REQUIRE_EQ(0, r);
+
+   pid = waitpid(-1, , 0);
+   ATF_REQUIRE(pid > 0 && pid != child);
+   r = WIFEXITED(status) ? WEXITSTATUS(status) : -1;
+   ATF_CHECK_EQ(2, r);
+
+   r = close(pip[0]);
+   ATF_REQUIRE_EQ(0, r);
+}
+
+ATF_TC_WITHOUT_HEAD(reaper_wait_grandchild_first);
+ATF_TC_BODY(reaper_wait_grandchild_first, tc)
+{
+   pid_t parent, child, grandchild, pid;
+   int status, r;
+
+   /* Be paranoid. */
+   pid = waitpid(-1, NULL, WNOHANG);
+   ATF_REQUIRE(pid == -1 && errno == ECHILD);
+
+   parent = getpid();
+   r = procctl(P_PID, parent, PROC_REAP_ACQUIRE, NULL);
+   ATF_REQUIRE_EQ(0, r);
+
+   child = fork();
+   ATF_REQUIRE(child != -1);
+   if (child == 0) {
+   grandchild = fork();
+   if (grandchild == -1)
+   _exit(101);
+   else if (grandchild == 0)
+   _exit(2);
+   else {
+   if (waitid(P_PID, grandchild, NULL,
+ 

svn commit: r309835 - head/contrib/llvm/lib/Bitcode/Writer

2016-12-10 Thread Dimitry Andric
Author: dim
Date: Sat Dec 10 22:03:44 2016
New Revision: 309835
URL: https://svnweb.freebsd.org/changeset/base/309835

Log:
  Tentatively apply https://reviews.llvm.org/D18730 to work around gcc PR
  70528 (bogus error: constructor required before non-static data member).
  This should fix buildworld with the external gcc package.
  
  Reported by:  https://jenkins.freebsd.org/job/FreeBSD_HEAD_amd64_gcc/

Modified:
  head/contrib/llvm/lib/Bitcode/Writer/ValueEnumerator.h

Modified: head/contrib/llvm/lib/Bitcode/Writer/ValueEnumerator.h
==
--- head/contrib/llvm/lib/Bitcode/Writer/ValueEnumerator.h  Sat Dec 10 
21:23:21 2016(r309834)
+++ head/contrib/llvm/lib/Bitcode/Writer/ValueEnumerator.h  Sat Dec 10 
22:03:44 2016(r309835)
@@ -95,7 +95,7 @@ private:
 /// Number of strings in the prefix of the metadata range.
 unsigned NumStrings = 0;
 
-MDRange() = default;
+MDRange() {}
 explicit MDRange(unsigned First) : First(First) {}
   };
   SmallDenseMap FunctionMDInfo;
___
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: r309833 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2016-12-10 Thread Alexander Motin
Author: mav
Date: Sat Dec 10 21:19:27 2016
New Revision: 309833
URL: https://svnweb.freebsd.org/changeset/base/309833

Log:
  Add missed vfs.zfs.zfetch.max_idistance sysctl.

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.cSat Dec 
10 21:13:50 2016(r309832)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.cSat Dec 
10 21:19:27 2016(r309833)
@@ -64,6 +64,8 @@ SYSCTL_UINT(_vfs_zfs_zfetch, OID_AUTO, m
 _min_sec_reap, 0, "Min time before stream reclaim");
 SYSCTL_UINT(_vfs_zfs_zfetch, OID_AUTO, max_distance, CTLFLAG_RWTUN,
 _max_distance, 0, "Max bytes to prefetch per stream");
+SYSCTL_UINT(_vfs_zfs_zfetch, OID_AUTO, max_idistance, CTLFLAG_RWTUN,
+_max_idistance, 0, "Max bytes to prefetch indirects for per 
stream");
 SYSCTL_UQUAD(_vfs_zfs_zfetch, OID_AUTO, array_rd_sz, CTLFLAG_RWTUN,
 _array_rd_sz, 0,
 "Number of bytes in a array_read at which we stop prefetching");
___
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: r309832 - stable/11/usr.bin/nfsstat

2016-12-10 Thread Rick Macklem
Author: rmacklem
Date: Sat Dec 10 21:13:50 2016
New Revision: 309832
URL: https://svnweb.freebsd.org/changeset/base/309832

Log:
  MFC: r309198, r309199
  Document the -E flag for nfsstat.
  This is a content change.

Modified:
  stable/11/usr.bin/nfsstat/nfsstat.1
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.bin/nfsstat/nfsstat.1
==
--- stable/11/usr.bin/nfsstat/nfsstat.1 Sat Dec 10 21:03:49 2016
(r309831)
+++ stable/11/usr.bin/nfsstat/nfsstat.1 Sat Dec 10 21:13:50 2016
(r309832)
@@ -28,7 +28,7 @@
 .\" From: @(#)nfsstat.18.1 (Berkeley) 6/6/93
 .\" $FreeBSD$
 .\"
-.Dd August 13, 2016
+.Dd November 23, 2016
 .Dt NFSSTAT 1
 .Os
 .Sh NAME
@@ -38,7 +38,7 @@
 statistics
 .Sh SYNOPSIS
 .Nm
-.Op Fl cdemszW
+.Op Fl cdEemszW
 .Op Fl M Ar core
 .Op Fl N Ar system
 .Op Fl w Ar wait
@@ -82,6 +82,16 @@ will increase by more than the measureme
 .It Fl e
 Report the extra statistics collected by the NFS client and
 server for NFSv4.
+.It Fl E
+Similar to
+.Fl e
+except that the statistics include NFSv4.1 and the numbers aren't clipped
+at one billion.
+Only one of
+.Fl e
+or
+.Fl E
+can be specified.
 .It Fl M
 Extract values associated with the name list from the specified core
 instead of the 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: r309745 - in head: share/man/man9 sys/kern sys/sys

2016-12-10 Thread Konstantin Belousov
On Fri, Dec 09, 2016 at 10:56:36AM -0800, Gleb Smirnoff wrote:
> Yes, this is expected. The interface isn't designed to be precise. So if
> we hit limit, the next second result will be 20345 events exceeded the rate
> instead of 20346 events.

Note that the interface may legitimately give errors in the other
direction as well, see below.

The initial read of cr_ticks is racy, so one thread noting the condition
of >= hz and executing counter_u64_zero() might race with another thread
not observing the condition and executing counter_u64_add() in parallel.
I believe this is possible even on relatively ordered arches like x86.

Now, since counter_u64_add() is not atomic for the pcpu cell update
(e.g. on x86), increment of the current pcpu cell might race with
zeroing it, resulting in the old value of the counter cell to survive
the change of ticks second.

The end result is that events counted in the previous second would be
transferred to the next second despite the reset, and cause unmerited
rate check trigger. At very least, the function annotation should
contain a warning to use it only for informational messages.
___
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: r309143 - head/sys/libkern

2016-12-10 Thread Mateusz Guzik
On Wed, Dec 07, 2016 at 11:41:21AM -0800, Gleb Smirnoff wrote:
> On Fri, Nov 25, 2016 at 05:00:10PM +0100, Mateusz Guzik wrote:
> M> On Fri, Nov 25, 2016 at 01:49:33PM +, Fabien Thomas wrote:
> M> > Author: fabient
> M> > Date: Fri Nov 25 13:49:33 2016
> M> > New Revision: 309143
> M> > URL: https://svnweb.freebsd.org/changeset/base/309143
> M> > 
> M> > Log:
> M> >   In a dual processor system (2*6 cores) during IPSec throughput tests,
> M> >   we see a lot of contention on the arc4 lock, used to generate the IV
> M> >   of the ESP output packets.
> M> >   
> M> >   The idea of this patch is to split this mutex in order to reduce the
> M> >   contention on this lock.
> M> >   
> M> > +MALLOC_DEFINE(M_ARC4RANDOM, "arc4random", "arc4random structures");
> M> >  
> M> > -static u_int8_t arc4_randbyte(void);
> M> > +struct arc4_s {
> M> > +u_int8_t i, j;
> M> > +int numruns;
> M> > +u_int8_t sbox[256];
> M> > +time_t t_reseed;
> M> > +
> M> > +struct mtx mtx;
> M> > +};
> M> > +
> M> 
> M> Why is the lock at the end? Right now you got false sharing with the
> M> next entry.
> M> 
> M> That said, I suggest:
> M> 1. moving thelock to the beginning
> M> 2. annotating the struct with __aligned(CACHE_LINE_SIZE)
> 
> It could be even better not to allocate them with regular malloc at all,
> but to put them into the per cpu areas. I haven't tried, but looks like
> the DPCPU mechanism defined in sys/pcpu.h would fit that well.
> 

Oh. Now that I read your comment I re-read the patch and it looks like
indeed the patch allocate the struct for each online cpu, so perhaps it
should indeed migrate and automagically get numa friendly at some point.

This prompts me to look some more and I think this does not really
scale, just got rid of an issue immediately visible with lock profiling.

arc4rand contains:
[..]
if (reseed || atomic_cmpset_int(_iniseed_state,
ARC4_ENTR_HAVE, ARC4_ENTR_SEED)) {
ARC4_FOREACH(arc4)
arc4_randomstir(arc4);
}

Which on amd64 always dirties the cacheline containing
arc4rand_iniseed_state. 

In my kernel the relevant cacheline is:
81583f80 b vn_io_fault_prefault
81583f88 b vn_io_faults_cnt
81583f90 B arc4rand_iniseed_state
81583f98 b arc4inst
  ^^ the array
81583fa0 b inet_ntoa.buf
81583fb0 b static_ltree

That is, not only competing cpus do the atomic op, they additionally
ping pong the cacheline when computing the address of the target object.

At the very least, attempting atomic_cmpset_int only if it the initial
condition holds should improve things. The lock array pointer can be
__read_mostly-ified after the macro gets sorted out.

-- 
Mateusz Guzik 
___
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: r309831 - stable/11/usr.bin/nfsstat

2016-12-10 Thread Rick Macklem
Author: rmacklem
Date: Sat Dec 10 21:03:49 2016
New Revision: 309831
URL: https://svnweb.freebsd.org/changeset/base/309831

Log:
  MFC: r309197
  Add a -E flag to nfsstat.c so that it prints out the NFSv4.1
  procedure/operation counts.
  It also avoids clipping the counts at 9 digits.

Modified:
  stable/11/usr.bin/nfsstat/nfsstat.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.bin/nfsstat/nfsstat.c
==
--- stable/11/usr.bin/nfsstat/nfsstat.c Sat Dec 10 20:24:22 2016
(r309830)
+++ stable/11/usr.bin/nfsstat/nfsstat.c Sat Dec 10 21:03:49 2016
(r309831)
@@ -113,6 +113,7 @@ static void usage(void);
 static char *sperc1(int, int);
 static char *sperc2(int, int);
 static void exp_intpr(int, int);
+static void exp41_intpr(int, int);
 static void exp_sidewaysintpr(u_int, int, int, int);
 static void compute_new_stats(struct nfsstatsv1 *cur_stats,
 struct nfsstatsv1 *prev_stats, int curop, long double etime,
@@ -155,7 +156,7 @@ main(int argc, char **argv)
 
interval = 0;
memf = nlistf = NULL;
-   while ((ch = getopt(argc, argv, "cdesWM:mN:w:z")) != -1)
+   while ((ch = getopt(argc, argv, "cdEesWM:mN:w:z")) != -1)
switch(ch) {
case 'M':
memf = optarg;
@@ -208,7 +209,14 @@ main(int argc, char **argv)
case 'z':
zflag = 1;
break;
+   case 'E':
+   if (extra_output != 0)
+   errx(1, "-e and -E are mutually exclusive");
+   extra_output = 2;
+   break;
case 'e':
+   if (extra_output != 0)
+   errx(1, "-e and -E are mutually exclusive");
extra_output = 1;
break;
case '?':
@@ -236,7 +244,9 @@ main(int argc, char **argv)
exp_sidewaysintpr(interval, clientOnly, serverOnly,
newStats);
} else {
-   if (extra_output != 0)
+   if (extra_output == 2)
+   exp41_intpr(clientOnly, serverOnly);
+   else if (extra_output == 1)
exp_intpr(clientOnly, serverOnly);
else
intpr(clientOnly, serverOnly);
@@ -795,6 +805,362 @@ exp_intpr(int clientOnly, int serverOnly
}
 }
 
+/*
+ * Print a description of the nfs stats for the client/server,
+ * including NFSv4.1.
+ */
+static void
+exp41_intpr(int clientOnly, int serverOnly)
+{
+   int nfssvc_flag;
+
+   nfssvc_flag = NFSSVC_GETSTATS | NFSSVC_NEWSTRUCT;
+   if (zflag != 0) {
+   if (clientOnly != 0)
+   nfssvc_flag |= NFSSVC_ZEROCLTSTATS;
+   if (serverOnly != 0)
+   nfssvc_flag |= NFSSVC_ZEROSRVSTATS;
+   }
+   ext_nfsstats.vers = NFSSTATS_V1;
+   if (nfssvc(nfssvc_flag, _nfsstats) < 0)
+   err(1, "Can't get stats");
+   if (clientOnly != 0) {
+   if (printtitle) {
+   printf("Client Info:\n");
+   printf("RPC Counts:\n");
+   printf(
+   "%12.12s %12.12s %12.12s %12.12s %12.12s %12.12s\n",
+   "Getattr", "Setattr", "Lookup", "Readlink", "Read",
+   "Write");
+   }
+   printf("%12ju %12ju %12ju %12ju %12ju %12ju\n",
+   (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_GETATTR],
+   (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_SETATTR],
+   (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_LOOKUP],
+   (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_READLINK],
+   (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_READ],
+   (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_WRITE]);
+   if (printtitle)
+   printf(
+   "%12.12s %12.12s %12.12s %12.12s %12.12s %12.12s\n",
+   "Create", "Remove", "Rename", "Link", "Symlink",
+   "Mkdir");
+   printf("%12ju %12ju %12ju %12ju %12ju %12ju\n",
+   (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_CREATE],
+   (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_REMOVE],
+   (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_RENAME],
+   (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_LINK],
+   (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_SYMLINK],
+   (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_MKDIR]);
+   if (printtitle)
+   printf(
+   "%12.12s %12.12s %12.12s %12.12s %12.12s %12.12s\n",
+   "Rmdir", "Readdir", "RdirPlus", "Access", "Mknod",
+   

Re: svn commit: r309818 - in head: etc/defaults etc/rc.d sbin sbin/decryptcore sbin/dumpon sbin/savecore share/man/man5 sys/amd64/amd64 sys/arm/arm sys/arm64/arm64 sys/conf sys/ddb sys/dev/null sys/ge

2016-12-10 Thread Konrad Witaszczyk
On 12/10/2016 20:20, Justin Hibbits wrote:
> On Dec 10, 2016, at 10:20 AM, Konrad Witaszczyk wrote:
>> Author: def
>> Date: Sat Dec 10 16:20:39 2016
>> New Revision: 309818
>> URL: https://svnweb.freebsd.org/changeset/base/309818
>>
>> Log:
>>  Add support for encrypted kernel crash dumps.
>>
>>  Changes include modifications in kernel crash dump routines, dumpon(8) and
>>  savecore(8). A new tool called decryptcore(8) was added.
>>
>>  A new DIOCSKERNELDUMP I/O control was added to send a kernel crash dump
>>  configuration in the diocskerneldump_arg structure to the kernel.
>>  The old DIOCSKERNELDUMP I/O control was renamed to DIOCSKERNELDUMP_FREEBSD11
>> for
>>  backward ABI compatibility.
>>
>>  dumpon(8) generates an one-time random symmetric key and encrypts it using
>>  an RSA public key in capability mode. Currently only AES-256-CBC is 
>> supported
>>  but EKCD was designed to implement support for other algorithms in the 
>> future.
>>  The public key is chosen using the -k flag. The dumpon rc(8) script can do 
>> this
>>  automatically during startup using the dumppubkey rc.conf(5) variable.  Once
>> the
>>  keys are calculated dumpon sends them to the kernel via DIOCSKERNELDUMP I/O
>>  control.
>>
>>  When the kernel receives the DIOCSKERNELDUMP I/O control it generates a 
>> random
>>  IV and sets up the key schedule for the specified algorithm. Each time the
>>  kernel tries to write a crash dump to the dump device, the IV is replaced by
>>  a SHA-256 hash of the previous value. This is intended to make a possible
>>  differential cryptanalysis harder since it is possible to write multiple 
>> crash
>>  dumps without reboot by repeating the following commands:
>>  # sysctl debug.kdb.enter=1
>>  db> call doadump(0)
>>  db> continue
>>  # savecore
>>
>>  A kernel dump key consists of an algorithm identifier, an IV and an 
>> encrypted
>>  symmetric key. The kernel dump key size is included in a kernel dump header.
>>  The size is an unsigned 32-bit integer and it is aligned to a block size.
>>  The header structure has 512 bytes to match the block size so it was
>> required to
>>  make a panic string 4 bytes shorter to add a new field to the header 
>> structure.
>>  If the kernel dump key size in the header is nonzero it is assumed that the
>>  kernel dump key is placed after the first header on the dump device and the
>> core
>>  dump is encrypted.
>>
>>  Separate functions were implemented to write the kernel dump header and the
>>  kernel dump key as they need to be unencrypted. The dump_write function
>> encrypts
>>  data if the kernel was compiled with the EKCD option. Encrypted kernel
>> textdumps
>>  are not supported due to the way they are constructed which makes it 
>> impossible
>>  to use the CBC mode for encryption. It should be also noted that textdumps
>> don't
>>  contain sensitive data by design as a user decides what information should 
>> be
>>  dumped.
>>
>>  savecore(8) writes the kernel dump key to a key.# file if its size in the
>> header
>>  is nonzero. # is the number of the current core dump.
>>
>>  decryptcore(8) decrypts the core dump using a private RSA key and the kernel
>>  dump key. This is performed by a child process in capability mode.
>>  If the decryption was not successful the parent process removes a partially
>>  decrypted core dump.
>>
>>  Description on how to encrypt crash dumps was added to the decryptcore(8),
>>  dumpon(8), rc.conf(5) and savecore(8) manual pages.
>>
>>  EKCD was tested on amd64 using bhyve and i386, mipsel and sparc64 using 
>> QEMU.
>>  The feature still has to be tested on arm and arm64 as it wasn't possible to
>> run
>>  FreeBSD due to the problems with QEMU emulation and lack of hardware.
>>
>>  Designed by:def, pjd
>>  Reviewed by:cem, oshogbo, pjd
>>  Partial review:delphij, emaste, jhb, kib
>>  Approved by:pjd (mentor)
>>  Differential Revision:https://reviews.freebsd.org/D4712
>>
>> Added:
>>  head/sbin/decryptcore/
>>  head/sbin/decryptcore/Makefile   (contents, props changed)
>>  head/sbin/decryptcore/decryptcore.8   (contents, props changed)
>>  head/sbin/decryptcore/decryptcore.c   (contents, props changed)
>> Modified:
>>  head/etc/defaults/rc.conf
>>  head/etc/rc.d/dumpon
>>  head/sbin/Makefile
>>  head/sbin/dumpon/Makefile
>>  head/sbin/dumpon/dumpon.8
>>  head/sbin/dumpon/dumpon.c
>>  head/sbin/savecore/savecore.8
>>  head/sbin/savecore/savecore.c
>>  head/share/man/man5/rc.conf.5
>>  head/sys/amd64/amd64/minidump_machdep.c
>>  head/sys/arm/arm/minidump_machdep.c
>>  head/sys/arm64/arm64/minidump_machdep.c
>>  head/sys/conf/NOTES
>>  head/sys/conf/files
>>  head/sys/conf/options
>>  head/sys/ddb/db_textdump.c
>>  head/sys/dev/null/null.c
>>  head/sys/geom/geom_dev.c
>>  head/sys/i386/i386/minidump_machdep.c
>>  head/sys/kern/kern_dump.c
>>  head/sys/kern/kern_shutdown.c
>>  head/sys/mips/mips/minidump_machdep.c
>>  head/sys/sparc64/sparc64/dump_machdep.c
>>  head/sys/sys/conf.h
>>  

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

2016-12-10 Thread Oliver Pinter
On 10/21/16, Hiren Panchasara  wrote:
> Author: hiren
> Date: Fri Oct 21 18:27:30 2016
> New Revision: 307745
> URL: https://svnweb.freebsd.org/changeset/base/307745
>
> Log:
>   Rework r306337.
>
>   In sendit(), if mp->msg_control is present, then in sockargs() we are
>   allocating mbuf to store mp->msg_control. Later in kern_sendit(), call
>   to getsock_cap(), will check validity of file pointer passed, if this
>   fails EBADF is returned but mbuf allocated in sockargs() is not freed.
>   Made code changes to free the same.
>
>   Since freeing control mbuf in sendit() after checking (control != NULL)
>   may lead to double freeing of control mbuf in sendit(), we can free
>   control mbuf in kern_sendit() if there are any errors in the routine.
>
>   Submitted by:   Lohith Bellad 
>   Reviewed by:glebius
>   MFC after:  3 weeks
>   Differential Revision:  https://reviews.freebsd.org/D8152

Hi Hiren!

What's the status of the MFC? I not see them (this and r306337) in
11-STABLE nor in 10-STABLE branch.

Thanks,
Oliver

>
> Modified:
>   head/sys/kern/uipc_syscalls.c
>
> Modified: head/sys/kern/uipc_syscalls.c
> ==
> --- head/sys/kern/uipc_syscalls.c Fri Oct 21 17:44:47 2016
> (r307744)
> +++ head/sys/kern/uipc_syscalls.c Fri Oct 21 18:27:30 2016
> (r307745)
> @@ -762,8 +762,10 @@ kern_sendit(struct thread *td, int s, st
>   cap_rights_set(, CAP_CONNECT);
>   }
>   error = getsock_cap(td, s, , , NULL, NULL);
> - if (error != 0)
> + if (error != 0) {
> + m_freem(control);
>   return (error);
> + }
>   so = (struct socket *)fp->f_data;
>
>  #ifdef KTRACE
> @@ -774,12 +776,16 @@ kern_sendit(struct thread *td, int s, st
>   if (mp->msg_name != NULL) {
>   error = mac_socket_check_connect(td->td_ucred, so,
>   mp->msg_name);
> - if (error != 0)
> + if (error != 0) {
> + m_freem(control);
>   goto bad;
> + }
>   }
>   error = mac_socket_check_send(td->td_ucred, so);
> - if (error != 0)
> + if (error != 0) {
> + m_freem(control);
>   goto bad;
> + }
>  #endif
>
>   auio.uio_iov = mp->msg_iov;
> @@ -793,6 +799,7 @@ kern_sendit(struct thread *td, int s, st
>   for (i = 0; i < mp->msg_iovlen; i++, iov++) {
>   if ((auio.uio_resid += iov->iov_len) < 0) {
>   error = EINVAL;
> + m_freem(control);
>   goto bad;
>   }
>   }
> ___
> svn-src-h...@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-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: r309830 - stable/10/bin/freebsd-version

2016-12-10 Thread Dag-Erling Smørgrav
Author: des
Date: Sat Dec 10 20:24:22 2016
New Revision: 309830
URL: https://svnweb.freebsd.org/changeset/base/309830

Log:
  MFH (r308297): use what(1) instead of strings(1).
  
  PR:   213665
  Submitted by: Pawel Worach 

Modified:
  stable/10/bin/freebsd-version/freebsd-version.sh.in
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/bin/freebsd-version/freebsd-version.sh.in
==
--- stable/10/bin/freebsd-version/freebsd-version.sh.in Sat Dec 10 20:23:16 
2016(r309829)
+++ stable/10/bin/freebsd-version/freebsd-version.sh.in Sat Dec 10 20:24:22 
2016(r309830)
@@ -36,7 +36,7 @@ USERLAND_VERSION="@@REVISION@@-@@BRANCH@
 : ${LOADER_CONF_FILES:=$LOADER_DIR/defaults/loader.conf 
$LOADER_DIR/loader.conf $LOADER_DIR/loader.conf.local}
 LOADER_RE1='^\([A-Z_a-z][0-9A-Z_a-z]*=[-./0-9A-Z_a-z]\{1,\}\).*$'
 LOADER_RE2='^\([A-Z_a-z][0-9A-Z_a-z]*="[-./0-9A-Z_a-z]\{1,\}"\).*$'
-KERNEL_RE='^@(#)@@TYPE@@ \([-.0-9A-Za-z]\{1,\}\) .*$'
+KERNEL_RE='^@@TYPE@@ \([-.0-9A-Za-z]\{1,\}\) .*$'
 
 progname=$(basename $0)
 
@@ -67,7 +67,7 @@ kernel_version() {
if [ ! -f "$kernfile" -o ! -r "$kernfile" ] ; then
error "unable to locate kernel"
fi
-   strings "$kernfile" | sed -n "s/$KERNEL_RE/\\1/p"
+   what -qs "$kernfile" | sed -n "s/$KERNEL_RE/\\1/p"
 }
 
 #
___
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: r309829 - stable/10/contrib/unbound/iterator

2016-12-10 Thread Dag-Erling Smørgrav
Author: des
Date: Sat Dec 10 20:23:16 2016
New Revision: 309829
URL: https://svnweb.freebsd.org/changeset/base/309829

Log:
  MFH (r296659): the IPv6 address of the L root changed earlier this year

Modified:
  stable/10/contrib/unbound/iterator/iter_hints.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/unbound/iterator/iter_hints.c
==
--- stable/10/contrib/unbound/iterator/iter_hints.c Sat Dec 10 20:20:33 
2016(r309828)
+++ stable/10/contrib/unbound/iterator/iter_hints.c Sat Dec 10 20:23:16 
2016(r309829)
@@ -152,7 +152,7 @@ compile_time_root_prime(int do_ip4, int 
if(!ah(dp, "I.ROOT-SERVERS.NET.", "2001:7fe::53")) goto failed;
if(!ah(dp, "J.ROOT-SERVERS.NET.", "2001:503:c27::2:30")) goto failed;
if(!ah(dp, "K.ROOT-SERVERS.NET.", "2001:7fd::1")) goto failed;
-   if(!ah(dp, "L.ROOT-SERVERS.NET.", "2001:500:3::42")) goto failed;
+   if(!ah(dp, "L.ROOT-SERVERS.NET.", "2001:500:9f::42")) goto failed;
if(!ah(dp, "M.ROOT-SERVERS.NET.", "2001:dc3::35")) goto failed;
   }
return dp;
___
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: r309825 - head/sys/dev/usb/wlan

2016-12-10 Thread Andriy Voskoboinyk
Sat, 10 Dec 2016 20:57:32 +0200 було написано Adrian Chadd  
:


Done in r309826.


Would you mind updating the manpage to state this monitor/promisc
difference in the LIMITATIONS section, or something?

Thanks!



-a


On 10 December 2016 at 10:47, Andriy Voskoboinyk   
wrote:

Author: avos
Date: Sat Dec 10 18:47:13 2016
New Revision: 309825
URL: https://svnweb.freebsd.org/changeset/base/309825

Log:
  rsu: add promiscuous mode support.

  - Add partial promiscuous mode support (no management frames;
  they cannot be received by the firmware and net80211 at the same  
time).

  - Add monitor mode support (all frames).

  Tested with Asus, USB-N10.

Modified:
  head/sys/dev/usb/wlan/if_rsu.c
  head/sys/dev/usb/wlan/if_rsureg.h

Modified: head/sys/dev/usb/wlan/if_rsu.c
==
--- head/sys/dev/usb/wlan/if_rsu.c  Sat Dec 10 18:29:39 2016 
(r309824)
+++ head/sys/dev/usb/wlan/if_rsu.c  Sat Dec 10 18:47:13 2016 
(r309825)

@@ -23,7 +23,7 @@ __FBSDID("$FreeBSD$");
  *
  * TODO:
  *   o tx a-mpdu
- *   o monitor / hostap / ibss / mesh
+ *   o hostap / ibss / mesh
  *   o power-save operation
  */

@@ -175,6 +175,7 @@ static void rsu_getradiocaps(struct ieee
 static voidrsu_set_channel(struct ieee80211com *);
 static voidrsu_scan_curchan(struct ieee80211_scan_state *,  
unsigned long);

 static voidrsu_scan_mindwell(struct ieee80211_scan_state *);
+static voidrsu_update_promisc(struct ieee80211com *);
 static uint8_t rsu_get_multi_pos(const uint8_t[]);
 static voidrsu_set_multi(struct rsu_softc *);
 static voidrsu_update_mcast(struct ieee80211com *);
@@ -202,6 +203,9 @@ static int  rsu_read_rom(struct rsu_softc
 static int rsu_fw_cmd(struct rsu_softc *, uint8_t, void *, int);
 static voidrsu_calib_task(void *, int);
 static voidrsu_tx_task(void *, int);
+static voidrsu_set_led(struct rsu_softc *, int);
+static int rsu_monitor_newstate(struct ieee80211vap *,
+   enum ieee80211_state, int);
 static int rsu_newstate(struct ieee80211vap *, enum  
ieee80211_state, int);
 static int rsu_key_alloc(struct ieee80211vap *, struct  
ieee80211_key *,

ieee80211_keyix *, ieee80211_keyix *);
@@ -244,6 +248,9 @@ static struct mbuf *
 static voidrsu_txeof(struct usb_xfer *, struct rsu_data *);
 static int rsu_raw_xmit(struct ieee80211_node *, struct mbuf *,
const struct ieee80211_bpf_params *);
+static voidrsu_rxfilter_init(struct rsu_softc *);
+static voidrsu_rxfilter_set(struct rsu_softc *, uint32_t,  
uint32_t);

+static voidrsu_rxfilter_refresh(struct rsu_softc *);
 static voidrsu_init(struct rsu_softc *);
 static int rsu_tx_start(struct rsu_softc *, struct ieee80211_node  
*,

struct mbuf *, struct rsu_data *);
@@ -536,6 +543,7 @@ rsu_attach(device_t self)
/* Set device capabilities. */
ic->ic_caps =
IEEE80211_C_STA |   /* station mode */
+   IEEE80211_C_MONITOR |   /* monitor mode supported */
 #if 0
IEEE80211_C_BGSCAN |/* Background scan. */
 #endif
@@ -582,6 +590,7 @@ rsu_attach(device_t self)
ic->ic_scan_mindwell = rsu_scan_mindwell;
ic->ic_vap_create = rsu_vap_create;
ic->ic_vap_delete = rsu_vap_delete;
+   ic->ic_update_promisc = rsu_update_promisc;
ic->ic_update_mcast = rsu_update_mcast;
ic->ic_parent = rsu_parent;
ic->ic_transmit = rsu_transmit;
@@ -688,7 +697,10 @@ rsu_vap_create(struct ieee80211com *ic,

/* override state transition machine */
uvp->newstate = vap->iv_newstate;
-   vap->iv_newstate = rsu_newstate;
+   if (opmode == IEEE80211_M_MONITOR)
+   vap->iv_newstate = rsu_monitor_newstate;
+   else
+   vap->iv_newstate = rsu_newstate;
vap->iv_key_alloc = rsu_key_alloc;
vap->iv_key_set = rsu_key_set;
vap->iv_key_delete = rsu_key_delete;
@@ -759,9 +771,30 @@ rsu_getradiocaps(struct ieee80211com *ic
 }

 static void
-rsu_set_channel(struct ieee80211com *ic __unused)
+rsu_set_channel(struct ieee80211com *ic)
 {
-   /* We are unable to switch channels, yet. */
+   struct rsu_softc *sc = ic->ic_softc;
+
+   /*
+* Only need to set the channel in Monitor mode. AP scanning  
and auth
+* are already taken care of by their respective firmware  
commands.

+*/
+   if (ic->ic_opmode == IEEE80211_M_MONITOR) {
+   struct r92s_set_channel cmd;
+   int error;
+
+   cmd.channel = IEEE80211_CHAN2IEEE(ic->ic_curchan);
+
+   RSU_LOCK(sc);
+   error = rsu_fw_cmd(sc, R92S_CMD_SET_CHANNEL, ,
+   sizeof(cmd));
+   if (error != 0) {
+   device_printf(sc->sc_dev,
+   "%s: error %d 

svn commit: r309828 - stable/11/bin/freebsd-version

2016-12-10 Thread Dag-Erling Smørgrav
Author: des
Date: Sat Dec 10 20:20:33 2016
New Revision: 309828
URL: https://svnweb.freebsd.org/changeset/base/309828

Log:
  MFH (r308297): use what(1) instead of strings(1).
  
  PR:   213665
  Submitted by: Pawel Worach 

Modified:
  stable/11/bin/freebsd-version/freebsd-version.sh.in
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/bin/freebsd-version/freebsd-version.sh.in
==
--- stable/11/bin/freebsd-version/freebsd-version.sh.in Sat Dec 10 20:19:57 
2016(r309827)
+++ stable/11/bin/freebsd-version/freebsd-version.sh.in Sat Dec 10 20:20:33 
2016(r309828)
@@ -36,7 +36,7 @@ USERLAND_VERSION="@@REVISION@@-@@BRANCH@
 : ${LOADER_CONF_FILES:=$LOADER_DIR/defaults/loader.conf 
$LOADER_DIR/loader.conf $LOADER_DIR/loader.conf.local}
 LOADER_RE1='^\([A-Z_a-z][0-9A-Z_a-z]*=[-./0-9A-Z_a-z]\{1,\}\).*$'
 LOADER_RE2='^\([A-Z_a-z][0-9A-Z_a-z]*="[-./0-9A-Z_a-z]\{1,\}"\).*$'
-KERNEL_RE='^@(#)@@TYPE@@ \([-.0-9A-Za-z]\{1,\}\) .*$'
+KERNEL_RE='^@@TYPE@@ \([-.0-9A-Za-z]\{1,\}\) .*$'
 
 progname=$(basename $0)
 
@@ -67,7 +67,7 @@ kernel_version() {
if [ ! -f "$kernfile" -o ! -r "$kernfile" ] ; then
error "unable to locate kernel"
fi
-   strings "$kernfile" | sed -n "s/$KERNEL_RE/\\1/p"
+   what -qs "$kernfile" | sed -n "s/$KERNEL_RE/\\1/p"
 }
 
 #
___
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: r309827 - head/sys/dev/usb/wlan

2016-12-10 Thread Andriy Voskoboinyk
Author: avos
Date: Sat Dec 10 20:19:57 2016
New Revision: 309827
URL: https://svnweb.freebsd.org/changeset/base/309827

Log:
  rsu: use bitmap for all debug messages.
  
  - Replace all remaining DPRINTF(N)'s with RSU_DPRINTF.
  - Add new RSU_DEBUG_USB flag to track error codes returned by
  usbd_do_request_flags().
  - Improve few messages.

Modified:
  head/sys/dev/usb/wlan/if_rsu.c

Modified: head/sys/dev/usb/wlan/if_rsu.c
==
--- head/sys/dev/usb/wlan/if_rsu.c  Sat Dec 10 19:14:51 2016
(r309826)
+++ head/sys/dev/usb/wlan/if_rsu.c  Sat Dec 10 20:19:57 2016
(r309827)
@@ -68,9 +68,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include "usbdevs.h"
 
-#define USB_DEBUG_VAR rsu_debug
-#include 
-
 #include 
 
 #ifdef USB_DEBUG
@@ -103,6 +100,7 @@ TUNABLE_INT("hw.usb.rsu.enable_11n", 
 #defineRSU_DEBUG_FWDBG 0x0200
 #defineRSU_DEBUG_AMPDU 0x0400
 #defineRSU_DEBUG_KEY   0x0800
+#defineRSU_DEBUG_USB   0x1000
 
 static const STRUCT_USB_HOST_ID rsu_devs[] = {
 #defineRSU_HT_NOT_SUPPORTED 0
@@ -665,8 +663,9 @@ rsu_do_request(struct rsu_softc *sc, str
req, data, 0, NULL, 250 /* ms */);
if (err == 0 || err == USB_ERR_NOT_CONFIGURED)
break;
-   DPRINTFN(1, "Control request failed, %s (retrying)\n",
-   usbd_errstr(err));
+   RSU_DPRINTF(sc, RSU_DEBUG_USB,
+   "Control request failed, %s (retries left: %d)\n",
+   usbd_errstr(err), ntries);
rsu_ms_delay(sc, 10);
 }
 
@@ -1207,7 +1206,7 @@ rsu_read_rom(struct rsu_softc *sc)
}
}
 #ifdef USB_DEBUG
-   if (rsu_debug >= 5) {
+   if (rsu_debug & RSU_DEBUG_RESET) {
/* Dump ROM content. */
printf("\n");
for (i = 0; i < sizeof(sc->rom); i++)
@@ -1294,7 +1293,7 @@ rsu_calib_task(void *arg, int pending __
rsu_read_1(sc, R92S_GPIO_IO_SEL) & ~R92S_GPIO_WPS);
reg = rsu_read_1(sc, R92S_GPIO_CTRL);
if (reg != 0xff && (reg & R92S_GPIO_WPS))
-   DPRINTF(("WPS PBC is pushed\n"));
+   RSU_DPRINTF(sc, RSU_DEBUG_CALIB, "WPS PBC is pushed\n");
 #endif
/* Read current signal level. */
if (rsu_fw_iocmd(sc, 0xf401) == 0) {
@@ -2113,7 +2112,7 @@ rsu_event_join_bss(struct rsu_softc *sc,
 
tmp = le32toh(rsp->associd);
if (tmp >= vap->iv_max_aid) {
-   DPRINTF("Assoc ID overflow\n");
+   RSU_DPRINTF(sc, RSU_DEBUG_ANY, "Assoc ID overflow\n");
tmp = 1;
}
RSU_DPRINTF(sc, RSU_DEBUG_STATE | RSU_DEBUG_FWCMD,
@@ -2306,8 +2305,9 @@ rsu_rx_copy_to_mbuf(struct rsu_softc *sc
 
m = m_get2(totlen, M_NOWAIT, MT_DATA, M_PKTHDR);
if (__predict_false(m == NULL)) {
-   device_printf(sc->sc_dev, "%s: could not allocate RX mbuf\n",
-   __func__);
+   device_printf(sc->sc_dev,
+   "%s: could not allocate RX mbuf, totlen %d\n",
+   __func__, totlen);
goto fail;
}
 
@@ -2490,7 +2490,7 @@ rsu_rxeof(struct usb_xfer *xfer, struct 
usbd_xfer_status(xfer, , NULL, NULL, NULL);
 
if (__predict_false(len < sizeof(*stat))) {
-   DPRINTF("xfer too short %d\n", len);
+   RSU_DPRINTF(sc, RSU_DEBUG_RX, "xfer too short %d\n", len);
counter_u64_add(ic->ic_ierrors, 1);
return (NULL);
}
@@ -3251,8 +3251,9 @@ rsu_load_firmware(struct rsu_softc *sc)
error = EINVAL;
goto fail;
}
-   DPRINTF("FW V%d %02x-%02x %02x:%02x\n", le16toh(hdr->version),
-   hdr->month, hdr->day, hdr->hour, hdr->minute);
+   RSU_DPRINTF(sc, RSU_DEBUG_FW, "FW V%d %02x-%02x %02x:%02x\n",
+   le16toh(hdr->version), hdr->month, hdr->day, hdr->hour,
+   hdr->minute);
 
/* Make sure that driver and firmware are in sync. */
if (hdr->privsz != htole32(sizeof(*dmem))) {
___
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: r309818 - in head: etc/defaults etc/rc.d sbin sbin/decryptcore sbin/dumpon sbin/savecore share/man/man5 sys/amd64/amd64 sys/arm/arm sys/arm64/arm64 sys/conf sys/ddb sys/dev/null sys/ge

2016-12-10 Thread Justin Hibbits


On Dec 10, 2016, at 10:20 AM, Konrad Witaszczyk wrote:


Author: def
Date: Sat Dec 10 16:20:39 2016
New Revision: 309818
URL: https://svnweb.freebsd.org/changeset/base/309818

Log:
 Add support for encrypted kernel crash dumps.

 Changes include modifications in kernel crash dump routines,  
dumpon(8) and

 savecore(8). A new tool called decryptcore(8) was added.

 A new DIOCSKERNELDUMP I/O control was added to send a kernel crash  
dump

 configuration in the diocskerneldump_arg structure to the kernel.
 The old DIOCSKERNELDUMP I/O control was renamed to  
DIOCSKERNELDUMP_FREEBSD11 for

 backward ABI compatibility.

 dumpon(8) generates an one-time random symmetric key and encrypts  
it using
 an RSA public key in capability mode. Currently only AES-256-CBC is  
supported
 but EKCD was designed to implement support for other algorithms in  
the future.
 The public key is chosen using the -k flag. The dumpon rc(8) script  
can do this
 automatically during startup using the dumppubkey rc.conf(5)  
variable.  Once the
 keys are calculated dumpon sends them to the kernel via  
DIOCSKERNELDUMP I/O

 control.

 When the kernel receives the DIOCSKERNELDUMP I/O control it  
generates a random
 IV and sets up the key schedule for the specified algorithm. Each  
time the
 kernel tries to write a crash dump to the dump device, the IV is  
replaced by
 a SHA-256 hash of the previous value. This is intended to make a  
possible
 differential cryptanalysis harder since it is possible to write  
multiple crash

 dumps without reboot by repeating the following commands:
 # sysctl debug.kdb.enter=1
 db> call doadump(0)
 db> continue
 # savecore

 A kernel dump key consists of an algorithm identifier, an IV and an  
encrypted
 symmetric key. The kernel dump key size is included in a kernel  
dump header.
 The size is an unsigned 32-bit integer and it is aligned to a block  
size.
 The header structure has 512 bytes to match the block size so it  
was required to
 make a panic string 4 bytes shorter to add a new field to the  
header structure.
 If the kernel dump key size in the header is nonzero it is assumed  
that the
 kernel dump key is placed after the first header on the dump device  
and the core

 dump is encrypted.

 Separate functions were implemented to write the kernel dump header  
and the
 kernel dump key as they need to be unencrypted. The dump_write  
function encrypts
 data if the kernel was compiled with the EKCD option. Encrypted  
kernel textdumps
 are not supported due to the way they are constructed which makes  
it impossible
 to use the CBC mode for encryption. It should be also noted that  
textdumps don't
 contain sensitive data by design as a user decides what information  
should be

 dumped.

 savecore(8) writes the kernel dump key to a key.# file if its size  
in the header

 is nonzero. # is the number of the current core dump.

 decryptcore(8) decrypts the core dump using a private RSA key and  
the kernel

 dump key. This is performed by a child process in capability mode.
 If the decryption was not successful the parent process removes a  
partially

 decrypted core dump.

 Description on how to encrypt crash dumps was added to the  
decryptcore(8),

 dumpon(8), rc.conf(5) and savecore(8) manual pages.

 EKCD was tested on amd64 using bhyve and i386, mipsel and sparc64  
using QEMU.
 The feature still has to be tested on arm and arm64 as it wasn't  
possible to run

 FreeBSD due to the problems with QEMU emulation and lack of hardware.

 Designed by:   def, pjd
 Reviewed by:   cem, oshogbo, pjd
 Partial review:delphij, emaste, jhb, kib
 Approved by:   pjd (mentor)
 Differential Revision: https://reviews.freebsd.org/D4712

Added:
 head/sbin/decryptcore/
 head/sbin/decryptcore/Makefile   (contents, props changed)
 head/sbin/decryptcore/decryptcore.8   (contents, props changed)
 head/sbin/decryptcore/decryptcore.c   (contents, props changed)
Modified:
 head/etc/defaults/rc.conf
 head/etc/rc.d/dumpon
 head/sbin/Makefile
 head/sbin/dumpon/Makefile
 head/sbin/dumpon/dumpon.8
 head/sbin/dumpon/dumpon.c
 head/sbin/savecore/savecore.8
 head/sbin/savecore/savecore.c
 head/share/man/man5/rc.conf.5
 head/sys/amd64/amd64/minidump_machdep.c
 head/sys/arm/arm/minidump_machdep.c
 head/sys/arm64/arm64/minidump_machdep.c
 head/sys/conf/NOTES
 head/sys/conf/files
 head/sys/conf/options
 head/sys/ddb/db_textdump.c
 head/sys/dev/null/null.c
 head/sys/geom/geom_dev.c
 head/sys/i386/i386/minidump_machdep.c
 head/sys/kern/kern_dump.c
 head/sys/kern/kern_shutdown.c
 head/sys/mips/mips/minidump_machdep.c
 head/sys/sparc64/sparc64/dump_machdep.c
 head/sys/sys/conf.h
 head/sys/sys/disk.h
 head/sys/sys/kerneldump.h


Nice!  Any reason you left out PowerPC from this list though?

- Justin
___
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: r309825 - head/sys/dev/usb/wlan

2016-12-10 Thread Adrian Chadd
thanks!


-a


On 10 December 2016 at 11:15, Andriy Voskoboinyk  wrote:
> Sat, 10 Dec 2016 20:57:32 +0200 було написано Adrian Chadd
> :
>
> Done in r309826.
>
>
>> Would you mind updating the manpage to state this monitor/promisc
>> difference in the LIMITATIONS section, or something?
>>
>> Thanks!
>>
>>
>>
>> -a
>>
>>
>> On 10 December 2016 at 10:47, Andriy Voskoboinyk  wrote:
>>>
>>> Author: avos
>>> Date: Sat Dec 10 18:47:13 2016
>>> New Revision: 309825
>>> URL: https://svnweb.freebsd.org/changeset/base/309825
>>>
>>> Log:
>>>   rsu: add promiscuous mode support.
>>>
>>>   - Add partial promiscuous mode support (no management frames;
>>>   they cannot be received by the firmware and net80211 at the same time).
>>>   - Add monitor mode support (all frames).
>>>
>>>   Tested with Asus, USB-N10.
>>>
>>> Modified:
>>>   head/sys/dev/usb/wlan/if_rsu.c
>>>   head/sys/dev/usb/wlan/if_rsureg.h
>>>
>>> Modified: head/sys/dev/usb/wlan/if_rsu.c
>>>
>>> ==
>>> --- head/sys/dev/usb/wlan/if_rsu.c  Sat Dec 10 18:29:39 2016
>>> (r309824)
>>> +++ head/sys/dev/usb/wlan/if_rsu.c  Sat Dec 10 18:47:13 2016
>>> (r309825)
>>> @@ -23,7 +23,7 @@ __FBSDID("$FreeBSD$");
>>>   *
>>>   * TODO:
>>>   *   o tx a-mpdu
>>> - *   o monitor / hostap / ibss / mesh
>>> + *   o hostap / ibss / mesh
>>>   *   o power-save operation
>>>   */
>>>
>>> @@ -175,6 +175,7 @@ static void rsu_getradiocaps(struct ieee
>>>  static voidrsu_set_channel(struct ieee80211com *);
>>>  static voidrsu_scan_curchan(struct ieee80211_scan_state *, unsigned
>>> long);
>>>  static voidrsu_scan_mindwell(struct ieee80211_scan_state *);
>>> +static voidrsu_update_promisc(struct ieee80211com *);
>>>  static uint8_t rsu_get_multi_pos(const uint8_t[]);
>>>  static voidrsu_set_multi(struct rsu_softc *);
>>>  static voidrsu_update_mcast(struct ieee80211com *);
>>> @@ -202,6 +203,9 @@ static int  rsu_read_rom(struct rsu_softc
>>>  static int rsu_fw_cmd(struct rsu_softc *, uint8_t, void *, int);
>>>  static voidrsu_calib_task(void *, int);
>>>  static voidrsu_tx_task(void *, int);
>>> +static voidrsu_set_led(struct rsu_softc *, int);
>>> +static int rsu_monitor_newstate(struct ieee80211vap *,
>>> +   enum ieee80211_state, int);
>>>  static int rsu_newstate(struct ieee80211vap *, enum ieee80211_state,
>>> int);
>>>  static int rsu_key_alloc(struct ieee80211vap *, struct ieee80211_key
>>> *,
>>> ieee80211_keyix *, ieee80211_keyix *);
>>> @@ -244,6 +248,9 @@ static struct mbuf *
>>>  static voidrsu_txeof(struct usb_xfer *, struct rsu_data *);
>>>  static int rsu_raw_xmit(struct ieee80211_node *, struct mbuf *,
>>> const struct ieee80211_bpf_params *);
>>> +static voidrsu_rxfilter_init(struct rsu_softc *);
>>> +static voidrsu_rxfilter_set(struct rsu_softc *, uint32_t, uint32_t);
>>> +static voidrsu_rxfilter_refresh(struct rsu_softc *);
>>>  static voidrsu_init(struct rsu_softc *);
>>>  static int rsu_tx_start(struct rsu_softc *, struct ieee80211_node *,
>>> struct mbuf *, struct rsu_data *);
>>> @@ -536,6 +543,7 @@ rsu_attach(device_t self)
>>> /* Set device capabilities. */
>>> ic->ic_caps =
>>> IEEE80211_C_STA |   /* station mode */
>>> +   IEEE80211_C_MONITOR |   /* monitor mode supported */
>>>  #if 0
>>> IEEE80211_C_BGSCAN |/* Background scan. */
>>>  #endif
>>> @@ -582,6 +590,7 @@ rsu_attach(device_t self)
>>> ic->ic_scan_mindwell = rsu_scan_mindwell;
>>> ic->ic_vap_create = rsu_vap_create;
>>> ic->ic_vap_delete = rsu_vap_delete;
>>> +   ic->ic_update_promisc = rsu_update_promisc;
>>> ic->ic_update_mcast = rsu_update_mcast;
>>> ic->ic_parent = rsu_parent;
>>> ic->ic_transmit = rsu_transmit;
>>> @@ -688,7 +697,10 @@ rsu_vap_create(struct ieee80211com *ic,
>>>
>>> /* override state transition machine */
>>> uvp->newstate = vap->iv_newstate;
>>> -   vap->iv_newstate = rsu_newstate;
>>> +   if (opmode == IEEE80211_M_MONITOR)
>>> +   vap->iv_newstate = rsu_monitor_newstate;
>>> +   else
>>> +   vap->iv_newstate = rsu_newstate;
>>> vap->iv_key_alloc = rsu_key_alloc;
>>> vap->iv_key_set = rsu_key_set;
>>> vap->iv_key_delete = rsu_key_delete;
>>> @@ -759,9 +771,30 @@ rsu_getradiocaps(struct ieee80211com *ic
>>>  }
>>>
>>>  static void
>>> -rsu_set_channel(struct ieee80211com *ic __unused)
>>> +rsu_set_channel(struct ieee80211com *ic)
>>>  {
>>> -   /* We are unable to switch channels, yet. */
>>> +   struct rsu_softc *sc = ic->ic_softc;
>>> +
>>> +   /*
>>> +* Only need to set the channel in Monitor mode. AP scanning and
>>> auth
>>> +* are already taken care of 

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

2016-12-10 Thread Andriy Voskoboinyk
Author: avos
Date: Sat Dec 10 19:14:51 2016
New Revision: 309826
URL: https://svnweb.freebsd.org/changeset/base/309826

Log:
  rsu(4): refresh the manpage.
  
  - Add monitor mode into the list of supported modes.
  - Describe promiscuous mode limitations in CAVEATS section.
  
  Reported by:  adrian

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

Modified: head/share/man/man4/rsu.4
==
--- head/share/man/man4/rsu.4   Sat Dec 10 18:47:13 2016(r309825)
+++ head/share/man/man4/rsu.4   Sat Dec 10 19:14:51 2016(r309826)
@@ -15,7 +15,7 @@
 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\"
-.Dd December 5, 2016
+.Dd December 10, 2016
 .Dt RSU 4
 .Os
 .Sh NAME
@@ -78,6 +78,12 @@ Also known as
 mode, this is used when associating with an access point, through
 which all traffic passes.
 This mode is the default.
+.It monitor mode
+In this mode the driver is able to receive packets without
+associating with an access point.
+This disables the internal receive filter and enables the card to
+capture packets from networks which it wouldn't normally have access to,
+or to scan for access points.
 .El
 .Pp
 The
@@ -183,3 +189,9 @@ The
 .Nm
 driver currently does not support 802.11n transmit aggregation,
 either A-MSDU or A-MPDU.
+.Pp
+The
+.Nm
+driver does not capture management frames in non-monitor modes;
+without this limitation some firmware functions (e.g., 'join bss')
+will not work properly.
___
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: r309818 - in head: etc/defaults etc/rc.d sbin sbin/decryptcore sbin/dumpon sbin/savecore share/man/man5 sys/amd64/amd64 sys/arm/arm sys/arm64/arm64 sys/conf sys/ddb sys/dev/null sys/ge

2016-12-10 Thread Conrad Meyer
On Sat, Dec 10, 2016 at 8:20 AM, Konrad Witaszczyk  wrote:
> Author: def
> Date: Sat Dec 10 16:20:39 2016
> New Revision: 309818
> URL: https://svnweb.freebsd.org/changeset/base/309818
>
> Log:
>   Add support for encrypted kernel crash dumps.

Awesome!  Thank you for developing and committing this.

Conrad
___
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: r309825 - head/sys/dev/usb/wlan

2016-12-10 Thread Adrian Chadd
Would you mind updating the manpage to state this monitor/promisc
difference in the LIMITATIONS section, or something?

Thanks!



-a


On 10 December 2016 at 10:47, Andriy Voskoboinyk  wrote:
> Author: avos
> Date: Sat Dec 10 18:47:13 2016
> New Revision: 309825
> URL: https://svnweb.freebsd.org/changeset/base/309825
>
> Log:
>   rsu: add promiscuous mode support.
>
>   - Add partial promiscuous mode support (no management frames;
>   they cannot be received by the firmware and net80211 at the same time).
>   - Add monitor mode support (all frames).
>
>   Tested with Asus, USB-N10.
>
> Modified:
>   head/sys/dev/usb/wlan/if_rsu.c
>   head/sys/dev/usb/wlan/if_rsureg.h
>
> Modified: head/sys/dev/usb/wlan/if_rsu.c
> ==
> --- head/sys/dev/usb/wlan/if_rsu.c  Sat Dec 10 18:29:39 2016
> (r309824)
> +++ head/sys/dev/usb/wlan/if_rsu.c  Sat Dec 10 18:47:13 2016
> (r309825)
> @@ -23,7 +23,7 @@ __FBSDID("$FreeBSD$");
>   *
>   * TODO:
>   *   o tx a-mpdu
> - *   o monitor / hostap / ibss / mesh
> + *   o hostap / ibss / mesh
>   *   o power-save operation
>   */
>
> @@ -175,6 +175,7 @@ static void rsu_getradiocaps(struct ieee
>  static voidrsu_set_channel(struct ieee80211com *);
>  static voidrsu_scan_curchan(struct ieee80211_scan_state *, unsigned 
> long);
>  static voidrsu_scan_mindwell(struct ieee80211_scan_state *);
> +static voidrsu_update_promisc(struct ieee80211com *);
>  static uint8_t rsu_get_multi_pos(const uint8_t[]);
>  static voidrsu_set_multi(struct rsu_softc *);
>  static voidrsu_update_mcast(struct ieee80211com *);
> @@ -202,6 +203,9 @@ static int  rsu_read_rom(struct rsu_softc
>  static int rsu_fw_cmd(struct rsu_softc *, uint8_t, void *, int);
>  static voidrsu_calib_task(void *, int);
>  static voidrsu_tx_task(void *, int);
> +static voidrsu_set_led(struct rsu_softc *, int);
> +static int rsu_monitor_newstate(struct ieee80211vap *,
> +   enum ieee80211_state, int);
>  static int rsu_newstate(struct ieee80211vap *, enum ieee80211_state, 
> int);
>  static int rsu_key_alloc(struct ieee80211vap *, struct ieee80211_key *,
> ieee80211_keyix *, ieee80211_keyix *);
> @@ -244,6 +248,9 @@ static struct mbuf *
>  static voidrsu_txeof(struct usb_xfer *, struct rsu_data *);
>  static int rsu_raw_xmit(struct ieee80211_node *, struct mbuf *,
> const struct ieee80211_bpf_params *);
> +static voidrsu_rxfilter_init(struct rsu_softc *);
> +static voidrsu_rxfilter_set(struct rsu_softc *, uint32_t, uint32_t);
> +static voidrsu_rxfilter_refresh(struct rsu_softc *);
>  static voidrsu_init(struct rsu_softc *);
>  static int rsu_tx_start(struct rsu_softc *, struct ieee80211_node *,
> struct mbuf *, struct rsu_data *);
> @@ -536,6 +543,7 @@ rsu_attach(device_t self)
> /* Set device capabilities. */
> ic->ic_caps =
> IEEE80211_C_STA |   /* station mode */
> +   IEEE80211_C_MONITOR |   /* monitor mode supported */
>  #if 0
> IEEE80211_C_BGSCAN |/* Background scan. */
>  #endif
> @@ -582,6 +590,7 @@ rsu_attach(device_t self)
> ic->ic_scan_mindwell = rsu_scan_mindwell;
> ic->ic_vap_create = rsu_vap_create;
> ic->ic_vap_delete = rsu_vap_delete;
> +   ic->ic_update_promisc = rsu_update_promisc;
> ic->ic_update_mcast = rsu_update_mcast;
> ic->ic_parent = rsu_parent;
> ic->ic_transmit = rsu_transmit;
> @@ -688,7 +697,10 @@ rsu_vap_create(struct ieee80211com *ic,
>
> /* override state transition machine */
> uvp->newstate = vap->iv_newstate;
> -   vap->iv_newstate = rsu_newstate;
> +   if (opmode == IEEE80211_M_MONITOR)
> +   vap->iv_newstate = rsu_monitor_newstate;
> +   else
> +   vap->iv_newstate = rsu_newstate;
> vap->iv_key_alloc = rsu_key_alloc;
> vap->iv_key_set = rsu_key_set;
> vap->iv_key_delete = rsu_key_delete;
> @@ -759,9 +771,30 @@ rsu_getradiocaps(struct ieee80211com *ic
>  }
>
>  static void
> -rsu_set_channel(struct ieee80211com *ic __unused)
> +rsu_set_channel(struct ieee80211com *ic)
>  {
> -   /* We are unable to switch channels, yet. */
> +   struct rsu_softc *sc = ic->ic_softc;
> +
> +   /*
> +* Only need to set the channel in Monitor mode. AP scanning and auth
> +* are already taken care of by their respective firmware commands.
> +*/
> +   if (ic->ic_opmode == IEEE80211_M_MONITOR) {
> +   struct r92s_set_channel cmd;
> +   int error;
> +
> +   cmd.channel = IEEE80211_CHAN2IEEE(ic->ic_curchan);
> +
> +   RSU_LOCK(sc);
> +   error = rsu_fw_cmd(sc, R92S_CMD_SET_CHANNEL, ,
> +   sizeof(cmd));
> +   if (error != 0) {
> +   

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

2016-12-10 Thread Andriy Voskoboinyk
Author: avos
Date: Sat Dec 10 18:47:13 2016
New Revision: 309825
URL: https://svnweb.freebsd.org/changeset/base/309825

Log:
  rsu: add promiscuous mode support.
  
  - Add partial promiscuous mode support (no management frames;
  they cannot be received by the firmware and net80211 at the same time).
  - Add monitor mode support (all frames).
  
  Tested with Asus, USB-N10.

Modified:
  head/sys/dev/usb/wlan/if_rsu.c
  head/sys/dev/usb/wlan/if_rsureg.h

Modified: head/sys/dev/usb/wlan/if_rsu.c
==
--- head/sys/dev/usb/wlan/if_rsu.c  Sat Dec 10 18:29:39 2016
(r309824)
+++ head/sys/dev/usb/wlan/if_rsu.c  Sat Dec 10 18:47:13 2016
(r309825)
@@ -23,7 +23,7 @@ __FBSDID("$FreeBSD$");
  *
  * TODO:
  *   o tx a-mpdu
- *   o monitor / hostap / ibss / mesh
+ *   o hostap / ibss / mesh
  *   o power-save operation
  */
 
@@ -175,6 +175,7 @@ static void rsu_getradiocaps(struct ieee
 static voidrsu_set_channel(struct ieee80211com *);
 static voidrsu_scan_curchan(struct ieee80211_scan_state *, unsigned long);
 static voidrsu_scan_mindwell(struct ieee80211_scan_state *);
+static voidrsu_update_promisc(struct ieee80211com *);
 static uint8_t rsu_get_multi_pos(const uint8_t[]);
 static voidrsu_set_multi(struct rsu_softc *);
 static voidrsu_update_mcast(struct ieee80211com *);
@@ -202,6 +203,9 @@ static int  rsu_read_rom(struct rsu_softc
 static int rsu_fw_cmd(struct rsu_softc *, uint8_t, void *, int);
 static voidrsu_calib_task(void *, int);
 static voidrsu_tx_task(void *, int);
+static voidrsu_set_led(struct rsu_softc *, int);
+static int rsu_monitor_newstate(struct ieee80211vap *,
+   enum ieee80211_state, int);
 static int rsu_newstate(struct ieee80211vap *, enum ieee80211_state, int);
 static int rsu_key_alloc(struct ieee80211vap *, struct ieee80211_key *,
ieee80211_keyix *, ieee80211_keyix *);
@@ -244,6 +248,9 @@ static struct mbuf *
 static voidrsu_txeof(struct usb_xfer *, struct rsu_data *);
 static int rsu_raw_xmit(struct ieee80211_node *, struct mbuf *, 
const struct ieee80211_bpf_params *);
+static voidrsu_rxfilter_init(struct rsu_softc *);
+static voidrsu_rxfilter_set(struct rsu_softc *, uint32_t, uint32_t);
+static voidrsu_rxfilter_refresh(struct rsu_softc *);
 static voidrsu_init(struct rsu_softc *);
 static int rsu_tx_start(struct rsu_softc *, struct ieee80211_node *, 
struct mbuf *, struct rsu_data *);
@@ -536,6 +543,7 @@ rsu_attach(device_t self)
/* Set device capabilities. */
ic->ic_caps =
IEEE80211_C_STA |   /* station mode */
+   IEEE80211_C_MONITOR |   /* monitor mode supported */
 #if 0
IEEE80211_C_BGSCAN |/* Background scan. */
 #endif
@@ -582,6 +590,7 @@ rsu_attach(device_t self)
ic->ic_scan_mindwell = rsu_scan_mindwell;
ic->ic_vap_create = rsu_vap_create;
ic->ic_vap_delete = rsu_vap_delete;
+   ic->ic_update_promisc = rsu_update_promisc;
ic->ic_update_mcast = rsu_update_mcast;
ic->ic_parent = rsu_parent;
ic->ic_transmit = rsu_transmit;
@@ -688,7 +697,10 @@ rsu_vap_create(struct ieee80211com *ic, 
 
/* override state transition machine */
uvp->newstate = vap->iv_newstate;
-   vap->iv_newstate = rsu_newstate;
+   if (opmode == IEEE80211_M_MONITOR)
+   vap->iv_newstate = rsu_monitor_newstate;
+   else
+   vap->iv_newstate = rsu_newstate;
vap->iv_key_alloc = rsu_key_alloc;
vap->iv_key_set = rsu_key_set;
vap->iv_key_delete = rsu_key_delete;
@@ -759,9 +771,30 @@ rsu_getradiocaps(struct ieee80211com *ic
 }
 
 static void
-rsu_set_channel(struct ieee80211com *ic __unused)
+rsu_set_channel(struct ieee80211com *ic)
 {
-   /* We are unable to switch channels, yet. */
+   struct rsu_softc *sc = ic->ic_softc;
+
+   /*
+* Only need to set the channel in Monitor mode. AP scanning and auth
+* are already taken care of by their respective firmware commands.
+*/ 
+   if (ic->ic_opmode == IEEE80211_M_MONITOR) {
+   struct r92s_set_channel cmd;
+   int error;
+
+   cmd.channel = IEEE80211_CHAN2IEEE(ic->ic_curchan);
+
+   RSU_LOCK(sc);
+   error = rsu_fw_cmd(sc, R92S_CMD_SET_CHANNEL, ,
+   sizeof(cmd));
+   if (error != 0) {
+   device_printf(sc->sc_dev,
+   "%s: error %d setting channel\n", __func__,
+   error);
+   }
+   RSU_UNLOCK(sc);
+   }
 }
 
 static void
@@ -782,6 +815,17 @@ rsu_scan_mindwell(struct ieee80211_scan_
/* NB: don't try to abort scan; wait for firmware to finish */
 }
 
+static void
+rsu_update_promisc(struct ieee80211com 

svn commit: r309824 - in head: . lib/libc++

2016-12-10 Thread Baptiste Daroussin
Author: bapt
Date: Sat Dec 10 18:29:39 2016
New Revision: 309824
URL: https://svnweb.freebsd.org/changeset/base/309824

Log:
  Now that external gcc directly natively links to libc++ we can remove
  the dirty hack made to fake libstdc++

Modified:
  head/Makefile.inc1
  head/lib/libc++/Makefile

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Sat Dec 10 18:07:16 2016(r309823)
+++ head/Makefile.inc1  Sat Dec 10 18:29:39 2016(r309824)
@@ -591,7 +591,7 @@ XCFLAGS+=   -B${WORLDTMP}/usr/lib
 # XXX: This should be checking MK_GNUCXX == no
 .if ${X_COMPILER_VERSION} >= 40800
 XCXXFLAGS+=-isystem ${WORLDTMP}/usr/include/c++/v1 -std=c++11 \
-   -nostdinc++ -L${WORLDTMP}/../lib/libc++
+   -nostdinc++
 .endif
 .elif ${WANT_COMPILER_TYPE} == clang || \
 (defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == clang)

Modified: head/lib/libc++/Makefile
==
--- head/lib/libc++/MakefileSat Dec 10 18:07:16 2016(r309823)
+++ head/lib/libc++/MakefileSat Dec 10 18:29:39 2016(r309824)
@@ -242,14 +242,4 @@ EXT+=  ${HDRDIR}/ext/${hdr}
 .endfor
 EXTDIR=${CXXINCLUDEDIR}/ext
 
-.if ${MK_GNUCXX} == "no" && ${COMPILER_TYPE} == "gcc"
-CLEANFILES+=   libstdc++.so libstdc++.a
-
-afterinstall:
-   ${INSTALL_SYMLINK} ${DESTDIR}${LIBDIR}/lib${LIB}.so \
-   ${.OBJDIR}/libstdc++.so
-   ${INSTALL_SYMLINK} ${DESTDIR}${LIBDIR}/lib${LIB}.a \
-   ${.OBJDIR}/libstdc++.a
-.endif
-
 .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: r309823 - in head/sys/dev: evdev syscons vt

2016-12-10 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Sat Dec 10 18:07:16 2016
New Revision: 309823
URL: https://svnweb.freebsd.org/changeset/base/309823

Log:
  [evdev] Adds evdev support to sysmouse(4) driver
  
  For horizontal (T-axis) wheel reporting which is not supported by
  sysmouse protocol kern.evdev.sysmouse_t_axis sysctl is introduced.
  It can take following values:
  
  0 - no T-axis events (default)
  1 - T-axis events are originated in ums(4) driver.
  2 - T-axis events are originated in psm(4) driver.
  
  Submitted by: Vladimir Kondratiev 
  MFC after:1 week
  Differential Revision:https://reviews.freebsd.org/D8597

Modified:
  head/sys/dev/evdev/evdev.c
  head/sys/dev/evdev/evdev.h
  head/sys/dev/syscons/sysmouse.c
  head/sys/dev/vt/vt_sysmouse.c

Modified: head/sys/dev/evdev/evdev.c
==
--- head/sys/dev/evdev/evdev.c  Sat Dec 10 17:59:34 2016(r309822)
+++ head/sys/dev/evdev/evdev.c  Sat Dec 10 18:07:16 2016(r309823)
@@ -63,11 +63,14 @@ enum evdev_sparse_result
 MALLOC_DEFINE(M_EVDEV, "evdev", "evdev memory");
 
 int evdev_rcpt_mask = EVDEV_RCPT_SYSMOUSE | EVDEV_RCPT_KBDMUX;
+int evdev_sysmouse_t_axis = 0;
 
 SYSCTL_NODE(_kern, OID_AUTO, evdev, CTLFLAG_RW, 0, "Evdev args");
 SYSCTL_INT(_kern_evdev, OID_AUTO, rcpt_mask, CTLFLAG_RW, _rcpt_mask, 0,
 "Who is receiving events: bit0 - sysmouse, bit1 - kbdmux, "
 "bit2 - mouse hardware, bit3 - keyboard hardware");
+SYSCTL_INT(_kern_evdev, OID_AUTO, sysmouse_t_axis, CTLFLAG_RW,
+_sysmouse_t_axis, 0, "Extract T-axis from 0-none, 1-ums, 2-psm");
 
 static void evdev_start_repeat(struct evdev_dev *, uint16_t);
 static void evdev_stop_repeat(struct evdev_dev *);

Modified: head/sys/dev/evdev/evdev.h
==
--- head/sys/dev/evdev/evdev.h  Sat Dec 10 17:59:34 2016(r309822)
+++ head/sys/dev/evdev/evdev.h  Sat Dec 10 18:07:16 2016(r309823)
@@ -56,6 +56,22 @@ typedef void (evdev_keycode_t)(struct ev
 #defineEVDEV_RCPT_HW_MOUSE (1<<2)
 #defineEVDEV_RCPT_HW_KBD   (1<<3)
 extern int evdev_rcpt_mask;
+/*
+ * Sysmouse protocol does not support horizontal wheel movement reporting.
+ * To overcome this limitation different drivers use different sysmouse proto
+ * extensions. Set kern.evdev.sysmouse_t_axis to tell sysmouse evdev driver
+ * which protocol extension is used.
+ * 0 - do not extract horizontal wheel movement (default).
+ * 1 - ums(4) horizontal wheel encoding. T-axis is mapped to buttons 6 and 7
+ * 2 - psm(4) wheels encoding: z = 1,-1 - vert. wheel, z = 2,-2 - horiz. wheel
+ */
+enum
+{
+   EVDEV_SYSMOUSE_T_AXIS_NONE = 0,
+   EVDEV_SYSMOUSE_T_AXIS_UMS = 1,
+   EVDEV_SYSMOUSE_T_AXIS_PSM = 2,
+};
+extern int evdev_sysmouse_t_axis;
 
 #defineABS_MT_FIRSTABS_MT_TOUCH_MAJOR
 #defineABS_MT_LAST ABS_MT_TOOL_Y

Modified: head/sys/dev/syscons/sysmouse.c
==
--- head/sys/dev/syscons/sysmouse.c Sat Dec 10 17:59:34 2016
(r309822)
+++ head/sys/dev/syscons/sysmouse.c Sat Dec 10 18:07:16 2016
(r309823)
@@ -28,6 +28,7 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include "opt_evdev.h"
 #include "opt_syscons.h"
 
 #include 
@@ -43,6 +44,11 @@ __FBSDID("$FreeBSD$");
 
 #include 
 
+#ifdef EVDEV_SUPPORT
+#include 
+#include 
+#endif
+
 #ifndef SC_NO_SYSMOUSE
 
 /* local variables */
@@ -50,6 +56,72 @@ static struct tty*sysmouse_tty;
 static int mouse_level;/* sysmouse protocol level */
 static mousestatus_t   mouse_status;
 
+#ifdef EVDEV_SUPPORT
+static struct evdev_dev*sysmouse_evdev;
+
+static void
+smdev_evdev_init(void)
+{
+   int i;
+
+   sysmouse_evdev = evdev_alloc();
+   evdev_set_name(sysmouse_evdev, "System mouse");
+   evdev_set_phys(sysmouse_evdev, "sysmouse");
+   evdev_set_id(sysmouse_evdev, BUS_VIRTUAL, 0, 0, 0);
+   evdev_support_prop(sysmouse_evdev, INPUT_PROP_POINTER);
+   evdev_support_event(sysmouse_evdev, EV_SYN);
+   evdev_support_event(sysmouse_evdev, EV_REL);
+   evdev_support_event(sysmouse_evdev, EV_KEY);
+   evdev_support_rel(sysmouse_evdev, REL_X);
+   evdev_support_rel(sysmouse_evdev, REL_Y);
+   evdev_support_rel(sysmouse_evdev, REL_WHEEL);
+   evdev_support_rel(sysmouse_evdev, REL_HWHEEL);
+   for (i = 0; i < 8; i++)
+   evdev_support_key(sysmouse_evdev, BTN_MOUSE + i);
+   if (evdev_register(sysmouse_evdev)) {
+   evdev_free(sysmouse_evdev);
+   sysmouse_evdev = NULL;
+   }
+}
+
+static void
+smdev_evdev_write(int x, int y, int z, int buttons)
+{
+
+   if (sysmouse_evdev == NULL || !(evdev_rcpt_mask & EVDEV_RCPT_SYSMOUSE))
+   return;
+
+   evdev_push_event(sysmouse_evdev, EV_REL, REL_X, x);
+   evdev_push_event(sysmouse_evdev, EV_REL, REL_Y, y);
+ 

svn commit: r309822 - head/sys/dev/iwn

2016-12-10 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Sat Dec 10 17:59:34 2016
New Revision: 309822
URL: https://svnweb.freebsd.org/changeset/base/309822

Log:
  [iwn] Perform BUS_DMASYNC_PREREAD when initializing RX buffer
  
  BUS_DMASYNC_PREREAD is required when setting up RX buffer, otherwise
  data provided by card can be overwritten by data evicted from cache
  
  Also use proper tag when setting up RX descriptor
  
  Reviewed by:  adrian, avos, ivadasz
  Differential Revision:https://reviews.freebsd.org/D8717

Modified:
  head/sys/dev/iwn/if_iwn.c

Modified: head/sys/dev/iwn/if_iwn.c
==
--- head/sys/dev/iwn/if_iwn.c   Sat Dec 10 17:06:55 2016(r309821)
+++ head/sys/dev/iwn/if_iwn.c   Sat Dec 10 17:59:34 2016(r309822)
@@ -1910,6 +1910,9 @@ iwn_alloc_rx_ring(struct iwn_softc *sc, 
goto fail;
}
 
+   bus_dmamap_sync(ring->data_dmat, data->map,
+   BUS_DMASYNC_PREREAD);
+
/* Set physical address of RX buffer (256-byte aligned). */
ring->desc[i] = htole32(paddr >> 8);
}
@@ -3040,14 +3043,19 @@ iwn_rx_done(struct iwn_softc *sc, struct
if (error != 0 && error != EFBIG) {
panic("%s: could not load old RX mbuf", __func__);
}
+   bus_dmamap_sync(ring->data_dmat, data->map,
+   BUS_DMASYNC_PREREAD);
/* Physical address may have changed. */
ring->desc[ring->cur] = htole32(paddr >> 8);
-   bus_dmamap_sync(ring->data_dmat, ring->desc_dma.map,
+   bus_dmamap_sync(ring->desc_dma.tag, ring->desc_dma.map,
BUS_DMASYNC_PREWRITE);
counter_u64_add(ic->ic_ierrors, 1);
return;
}
 
+   bus_dmamap_sync(ring->data_dmat, data->map,
+   BUS_DMASYNC_PREREAD);
+
m = data->m;
data->m = m1;
/* Update RX descriptor. */
___
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: r309821 - head/sys/dev/usb/wlan

2016-12-10 Thread Andriy Voskoboinyk
Author: avos
Date: Sat Dec 10 17:06:55 2016
New Revision: 309821
URL: https://svnweb.freebsd.org/changeset/base/309821

Log:
  rsu: increase Rx buffer size from 8k to 30k.
  
  This is required for USB Rx aggregation
  (and fixes 'could not allocate RX mbuf' / few other failures).
  
  While here, reduce the number of Rx buffers from 100 to 1 -
  the driver never uses more than one Rx buffer.
  
  Tested with Asus USB-N10.

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

Modified: head/sys/dev/usb/wlan/if_rsureg.h
==
--- head/sys/dev/usb/wlan/if_rsureg.h   Sat Dec 10 16:41:55 2016
(r309820)
+++ head/sys/dev/usb/wlan/if_rsureg.h   Sat Dec 10 17:06:55 2016
(r309821)
@@ -688,10 +688,10 @@ struct r92s_add_ba_req {
 /*
  * Driver definitions.
  */
-#define RSU_RX_LIST_COUNT  100
+#define RSU_RX_LIST_COUNT  1
 #define RSU_TX_LIST_COUNT  32
 
-#define RSU_RXBUFSZ(8 * 1024)
+#define RSU_RXBUFSZ(30 * 1024)
 #define RSU_TXBUFSZ\
((sizeof(struct r92s_tx_desc) + IEEE80211_MAX_LEN + 3) & ~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"


svn commit: r309818 - in head: etc/defaults etc/rc.d sbin sbin/decryptcore sbin/dumpon sbin/savecore share/man/man5 sys/amd64/amd64 sys/arm/arm sys/arm64/arm64 sys/conf sys/ddb sys/dev/null sys/geo...

2016-12-10 Thread Konrad Witaszczyk
Author: def
Date: Sat Dec 10 16:20:39 2016
New Revision: 309818
URL: https://svnweb.freebsd.org/changeset/base/309818

Log:
  Add support for encrypted kernel crash dumps.
  
  Changes include modifications in kernel crash dump routines, dumpon(8) and
  savecore(8). A new tool called decryptcore(8) was added.
  
  A new DIOCSKERNELDUMP I/O control was added to send a kernel crash dump
  configuration in the diocskerneldump_arg structure to the kernel.
  The old DIOCSKERNELDUMP I/O control was renamed to DIOCSKERNELDUMP_FREEBSD11 
for
  backward ABI compatibility.
  
  dumpon(8) generates an one-time random symmetric key and encrypts it using
  an RSA public key in capability mode. Currently only AES-256-CBC is supported
  but EKCD was designed to implement support for other algorithms in the future.
  The public key is chosen using the -k flag. The dumpon rc(8) script can do 
this
  automatically during startup using the dumppubkey rc.conf(5) variable.  Once 
the
  keys are calculated dumpon sends them to the kernel via DIOCSKERNELDUMP I/O
  control.
  
  When the kernel receives the DIOCSKERNELDUMP I/O control it generates a random
  IV and sets up the key schedule for the specified algorithm. Each time the
  kernel tries to write a crash dump to the dump device, the IV is replaced by
  a SHA-256 hash of the previous value. This is intended to make a possible
  differential cryptanalysis harder since it is possible to write multiple crash
  dumps without reboot by repeating the following commands:
  # sysctl debug.kdb.enter=1
  db> call doadump(0)
  db> continue
  # savecore
  
  A kernel dump key consists of an algorithm identifier, an IV and an encrypted
  symmetric key. The kernel dump key size is included in a kernel dump header.
  The size is an unsigned 32-bit integer and it is aligned to a block size.
  The header structure has 512 bytes to match the block size so it was required 
to
  make a panic string 4 bytes shorter to add a new field to the header 
structure.
  If the kernel dump key size in the header is nonzero it is assumed that the
  kernel dump key is placed after the first header on the dump device and the 
core
  dump is encrypted.
  
  Separate functions were implemented to write the kernel dump header and the
  kernel dump key as they need to be unencrypted. The dump_write function 
encrypts
  data if the kernel was compiled with the EKCD option. Encrypted kernel 
textdumps
  are not supported due to the way they are constructed which makes it 
impossible
  to use the CBC mode for encryption. It should be also noted that textdumps 
don't
  contain sensitive data by design as a user decides what information should be
  dumped.
  
  savecore(8) writes the kernel dump key to a key.# file if its size in the 
header
  is nonzero. # is the number of the current core dump.
  
  decryptcore(8) decrypts the core dump using a private RSA key and the kernel
  dump key. This is performed by a child process in capability mode.
  If the decryption was not successful the parent process removes a partially
  decrypted core dump.
  
  Description on how to encrypt crash dumps was added to the decryptcore(8),
  dumpon(8), rc.conf(5) and savecore(8) manual pages.
  
  EKCD was tested on amd64 using bhyve and i386, mipsel and sparc64 using QEMU.
  The feature still has to be tested on arm and arm64 as it wasn't possible to 
run
  FreeBSD due to the problems with QEMU emulation and lack of hardware.
  
  Designed by:  def, pjd
  Reviewed by:  cem, oshogbo, pjd
  Partial review:   delphij, emaste, jhb, kib
  Approved by:  pjd (mentor)
  Differential Revision:https://reviews.freebsd.org/D4712

Added:
  head/sbin/decryptcore/
  head/sbin/decryptcore/Makefile   (contents, props changed)
  head/sbin/decryptcore/decryptcore.8   (contents, props changed)
  head/sbin/decryptcore/decryptcore.c   (contents, props changed)
Modified:
  head/etc/defaults/rc.conf
  head/etc/rc.d/dumpon
  head/sbin/Makefile
  head/sbin/dumpon/Makefile
  head/sbin/dumpon/dumpon.8
  head/sbin/dumpon/dumpon.c
  head/sbin/savecore/savecore.8
  head/sbin/savecore/savecore.c
  head/share/man/man5/rc.conf.5
  head/sys/amd64/amd64/minidump_machdep.c
  head/sys/arm/arm/minidump_machdep.c
  head/sys/arm64/arm64/minidump_machdep.c
  head/sys/conf/NOTES
  head/sys/conf/files
  head/sys/conf/options
  head/sys/ddb/db_textdump.c
  head/sys/dev/null/null.c
  head/sys/geom/geom_dev.c
  head/sys/i386/i386/minidump_machdep.c
  head/sys/kern/kern_dump.c
  head/sys/kern/kern_shutdown.c
  head/sys/mips/mips/minidump_machdep.c
  head/sys/sparc64/sparc64/dump_machdep.c
  head/sys/sys/conf.h
  head/sys/sys/disk.h
  head/sys/sys/kerneldump.h

Modified: head/etc/defaults/rc.conf
==
--- head/etc/defaults/rc.conf   Sat Dec 10 15:33:36 2016(r309817)
+++ head/etc/defaults/rc.conf   Sat Dec 10 16:20:39 2016(r309818)
@@ -607,6 +607,8 @@ chkprintcap_enable="NO" 

svn commit: r309815 - vendor/compiler-rt/compiler-rt-release_39-r288513/dist

2016-12-10 Thread Dimitry Andric
Author: dim
Date: Sat Dec 10 15:02:23 2016
New Revision: 309815
URL: https://svnweb.freebsd.org/changeset/base/309815

Log:
  Tag compiler-rt release_39 branch r288847.

Added:
  vendor/compiler-rt/compiler-rt-release_39-r288513/dist/
 - copied from r309814, vendor/compiler-rt/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: r309812 - in vendor/llvm/dist: lib/Target/AArch64 lib/Target/ARM test/CodeGen/AArch64 test/CodeGen/ARM

2016-12-10 Thread Dimitry Andric
Author: dim
Date: Sat Dec 10 15:02:05 2016
New Revision: 309812
URL: https://svnweb.freebsd.org/changeset/base/309812

Log:
  Vendor import of llvm release_39 branch r288847:
  https://llvm.org/svn/llvm-project/llvm/branches/release_39@288847

Modified:
  vendor/llvm/dist/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp
  vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp
  vendor/llvm/dist/lib/Target/ARM/ARMExpandPseudoInsts.cpp
  vendor/llvm/dist/test/CodeGen/AArch64/cmpxchg-O0.ll
  vendor/llvm/dist/test/CodeGen/ARM/cmpxchg-O0.ll

Modified: vendor/llvm/dist/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp
==
--- vendor/llvm/dist/lib/Target/AArch64/AArch64ExpandPseudoInsts.cppSat Dec 
10 15:01:40 2016(r309811)
+++ vendor/llvm/dist/lib/Target/AArch64/AArch64ExpandPseudoInsts.cppSat Dec 
10 15:02:05 2016(r309812)
@@ -718,13 +718,21 @@ bool AArch64ExpandPseudo::expandCMP_SWAP
   .addReg(DestLo.getReg(), getKillRegState(DestLo.isDead()))
   .addOperand(DesiredLo)
   .addImm(0);
-  BuildMI(LoadCmpBB, DL, TII->get(AArch64::SBCSXr), AArch64::XZR)
+  BuildMI(LoadCmpBB, DL, TII->get(AArch64::CSINCWr), StatusReg)
+.addReg(AArch64::WZR)
+.addReg(AArch64::WZR)
+.addImm(AArch64CC::EQ);
+  BuildMI(LoadCmpBB, DL, TII->get(AArch64::SUBSXrs), AArch64::XZR)
   .addReg(DestHi.getReg(), getKillRegState(DestHi.isDead()))
-  .addOperand(DesiredHi);
-  BuildMI(LoadCmpBB, DL, TII->get(AArch64::Bcc))
-  .addImm(AArch64CC::NE)
-  .addMBB(DoneBB)
-  .addReg(AArch64::NZCV, RegState::Implicit | RegState::Kill);
+  .addOperand(DesiredHi)
+  .addImm(0);
+  BuildMI(LoadCmpBB, DL, TII->get(AArch64::CSINCWr), StatusReg)
+  .addReg(StatusReg, RegState::Kill)
+  .addReg(StatusReg, RegState::Kill)
+  .addImm(AArch64CC::EQ);
+  BuildMI(LoadCmpBB, DL, TII->get(AArch64::CBNZW))
+  .addReg(StatusReg, RegState::Kill)
+  .addMBB(DoneBB);
   LoadCmpBB->addSuccessor(DoneBB);
   LoadCmpBB->addSuccessor(StoreBB);
 

Modified: vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp
==
--- vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp Sat Dec 10 
15:01:40 2016(r309811)
+++ vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp Sat Dec 10 
15:02:05 2016(r309812)
@@ -10083,17 +10083,24 @@ static void ReplaceReductionResults(SDNo
   Results.push_back(SplitVal);
 }
 
+static std::pair splitInt128(SDValue N, SelectionDAG ) {
+  SDLoc DL(N);
+  SDValue Lo = DAG.getNode(ISD::TRUNCATE, DL, MVT::i64, N);
+  SDValue Hi = DAG.getNode(ISD::TRUNCATE, DL, MVT::i64,
+   DAG.getNode(ISD::SRL, DL, MVT::i128, N,
+   DAG.getConstant(64, DL, MVT::i64)));
+  return std::make_pair(Lo, Hi);
+}
+
 static void ReplaceCMP_SWAP_128Results(SDNode *N,
SmallVectorImpl & Results,
SelectionDAG ) {
   assert(N->getValueType(0) == MVT::i128 &&
  "AtomicCmpSwap on types less than 128 should be legal");
-  SDValue Ops[] = {N->getOperand(1),
-   N->getOperand(2)->getOperand(0),
-   N->getOperand(2)->getOperand(1),
-   N->getOperand(3)->getOperand(0),
-   N->getOperand(3)->getOperand(1),
-   N->getOperand(0)};
+  auto Desired = splitInt128(N->getOperand(2), DAG);
+  auto New = splitInt128(N->getOperand(3), DAG);
+  SDValue Ops[] = {N->getOperand(1), Desired.first, Desired.second,
+   New.first,New.second,N->getOperand(0)};
   SDNode *CmpSwap = DAG.getMachineNode(
   AArch64::CMP_SWAP_128, SDLoc(N),
   DAG.getVTList(MVT::i64, MVT::i64, MVT::i32, MVT::Other), Ops);

Modified: vendor/llvm/dist/lib/Target/ARM/ARMExpandPseudoInsts.cpp
==
--- vendor/llvm/dist/lib/Target/ARM/ARMExpandPseudoInsts.cppSat Dec 10 
15:01:40 2016(r309811)
+++ vendor/llvm/dist/lib/Target/ARM/ARMExpandPseudoInsts.cppSat Dec 10 
15:02:05 2016(r309812)
@@ -932,13 +932,10 @@ bool ARMExpandPseudo::ExpandCMP_SWAP_64(
  .addReg(DestLo, getKillRegState(Dest.isDead()))
  .addReg(DesiredLo, getKillRegState(Desired.isDead(;
 
-  unsigned SBCrr = IsThumb ? ARM::t2SBCrr : ARM::SBCrr;
-  MIB = BuildMI(LoadCmpBB, DL, TII->get(SBCrr))
-.addReg(StatusReg, RegState::Define | RegState::Dead)
-.addReg(DestHi, getKillRegState(Dest.isDead()))
-.addReg(DesiredHi, getKillRegState(Desired.isDead()));
-  AddDefaultPred(MIB);
-  MIB.addReg(ARM::CPSR, RegState::Kill);
+  BuildMI(LoadCmpBB, DL, TII->get(CMPrr))
+  .addReg(DestHi, getKillRegState(Dest.isDead()))
+  .addReg(DesiredHi, 

svn commit: r309813 - vendor/llvm/llvm-release_39-r288513/dist

2016-12-10 Thread Dimitry Andric
Author: dim
Date: Sat Dec 10 15:02:10 2016
New Revision: 309813
URL: https://svnweb.freebsd.org/changeset/base/309813

Log:
  Tag llvm release_39 branch r288847.

Added:
  vendor/llvm/llvm-release_39-r288513/dist/
 - copied from r309812, vendor/llvm/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: r309814 - vendor/clang/clang-release_39-r288513/dist

2016-12-10 Thread Dimitry Andric
Author: dim
Date: Sat Dec 10 15:02:17 2016
New Revision: 309814
URL: https://svnweb.freebsd.org/changeset/base/309814

Log:
  Tag clang release_39 branch r288847.

Added:
  vendor/clang/clang-release_39-r288513/dist/
 - copied from r309813, vendor/clang/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: r309810 - vendor/lld/lld-release_39-r288513/dist

2016-12-10 Thread Dimitry Andric
Author: dim
Date: Sat Dec 10 15:01:33 2016
New Revision: 309810
URL: https://svnweb.freebsd.org/changeset/base/309810

Log:
  Tag lld release_39 branch r288847.

Added:
  vendor/lld/lld-release_39-r288513/dist/
 - copied from r309809, vendor/lld/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: r309809 - vendor/libc++/libc++-release_39-r288513/dist

2016-12-10 Thread Dimitry Andric
Author: dim
Date: Sat Dec 10 15:01:28 2016
New Revision: 309809
URL: https://svnweb.freebsd.org/changeset/base/309809

Log:
  Tag libc++ release_39 branch r288847.

Added:
  vendor/libc++/libc++-release_39-r288513/dist/
 - copied from r309808, vendor/libc++/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: r309811 - vendor/lldb/lldb-release_39-r288513/dist

2016-12-10 Thread Dimitry Andric
Author: dim
Date: Sat Dec 10 15:01:40 2016
New Revision: 309811
URL: https://svnweb.freebsd.org/changeset/base/309811

Log:
  Tag lldb release_39 branch r288847.

Added:
  vendor/lldb/lldb-release_39-r288513/dist/
 - copied from r309810, vendor/lldb/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: r309806 - head/sys/dev/usb/wlan

2016-12-10 Thread Andriy Voskoboinyk
Author: avos
Date: Sat Dec 10 13:30:16 2016
New Revision: 309806
URL: https://svnweb.freebsd.org/changeset/base/309806

Log:
  rsu: add TSF field into Rx radiotap.
  
  Tested with Asus USB-N10.

Modified:
  head/sys/dev/usb/wlan/if_rsu.c
  head/sys/dev/usb/wlan/if_rsureg.h

Modified: head/sys/dev/usb/wlan/if_rsu.c
==
--- head/sys/dev/usb/wlan/if_rsu.c  Sat Dec 10 13:29:51 2016
(r309805)
+++ head/sys/dev/usb/wlan/if_rsu.c  Sat Dec 10 13:30:16 2016
(r309806)
@@ -234,6 +234,8 @@ static void rsu_rx_multi_event(struct rs
 static int8_t  rsu_get_rssi(struct rsu_softc *, int, void *);
 static struct mbuf * rsu_rx_copy_to_mbuf(struct rsu_softc *,
struct r92s_rx_stat *, int);
+static uint32_trsu_get_tsf_low(struct rsu_softc *);
+static uint32_trsu_get_tsf_high(struct rsu_softc *);
 static struct ieee80211_node * rsu_rx_frame(struct rsu_softc *, struct mbuf *,
int8_t *);
 static struct mbuf * rsu_rx_multi_frame(struct rsu_softc *, uint8_t *, int);
@@ -2223,6 +2225,18 @@ fail:
return (NULL);
 }
 
+static uint32_t
+rsu_get_tsf_low(struct rsu_softc *sc)
+{
+   return (rsu_read_4(sc, R92S_TSFTR));
+}
+
+static uint32_t
+rsu_get_tsf_high(struct rsu_softc *sc)
+{
+   return (rsu_read_4(sc, R92S_TSFTR + 4));
+}
+
 static struct ieee80211_node *
 rsu_rx_frame(struct rsu_softc *sc, struct mbuf *m, int8_t *rssi_p)
 {
@@ -2254,6 +2268,12 @@ rsu_rx_frame(struct rsu_softc *sc, struc
 
/* Map HW rate index to 802.11 rate. */
tap->wr_flags = 0;  /* TODO */
+   tap->wr_tsft = rsu_get_tsf_high(sc);
+   if (le32toh(stat->tsf_low) > rsu_get_tsf_low(sc))
+   tap->wr_tsft--;
+   tap->wr_tsft = (uint64_t)htole32(tap->wr_tsft) << 32;
+   tap->wr_tsft += stat->tsf_low;
+
if (rate < 12) {
switch (rate) {
/* CCK. */

Modified: head/sys/dev/usb/wlan/if_rsureg.h
==
--- head/sys/dev/usb/wlan/if_rsureg.h   Sat Dec 10 13:29:51 2016
(r309805)
+++ head/sys/dev/usb/wlan/if_rsureg.h   Sat Dec 10 13:30:16 2016
(r309806)
@@ -51,6 +51,9 @@
 #define R92S_MACID (R92S_MACIDSETTING + 0x000)
 #define R92S_MAR   (R92S_MACIDSETTING + 0x010)
 
+#define R92S_TIMECTRL  0x0080
+#define R92S_TSFTR (R92S_TIMECTRL + 0x000)
+
 #define R92S_SECURITY  0x0240
 #define R92S_CAMCMD(R92S_SECURITY + 0x000)
 #define R92S_CAMWRITE  (R92S_SECURITY + 0x004)
@@ -592,7 +595,7 @@ struct r92s_rx_stat {
 #define R92S_RXDW3_HTC 0x4000
 
uint32_trxdw4;
-   uint32_trxdw5;
+   uint32_ttsf_low;
 } __packed __aligned(4);
 
 /* Rx PHY descriptor. */
@@ -735,6 +738,7 @@ static const uint8_t rsu_qid2idx_11ep[] 
 
 struct rsu_rx_radiotap_header {
struct ieee80211_radiotap_header wr_ihdr;
+   uint64_twr_tsft;
uint8_t wr_flags;
uint8_t wr_rate;
uint16_twr_chan_freq;
@@ -743,7 +747,8 @@ struct rsu_rx_radiotap_header {
 } __packed __aligned(8);
 
 #define RSU_RX_RADIOTAP_PRESENT\
-   (1 << IEEE80211_RADIOTAP_FLAGS |\
+   (1 << IEEE80211_RADIOTAP_TSFT | \
+1 << IEEE80211_RADIOTAP_FLAGS |\
 1 << IEEE80211_RADIOTAP_RATE | \
 1 << IEEE80211_RADIOTAP_CHANNEL |  \
 1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL)
___
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: r309807 - head/share/man/man5

2016-12-10 Thread Baptiste Daroussin
Author: bapt
Date: Sat Dec 10 13:30:18 2016
New Revision: 309807
URL: https://svnweb.freebsd.org/changeset/base/309807

Log:
  Regen after 309805

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

Modified: head/share/man/man5/src.conf.5
==
--- head/share/man/man5/src.conf.5  Sat Dec 10 13:30:16 2016
(r309806)
+++ head/share/man/man5/src.conf.5  Sat Dec 10 13:30:18 2016
(r309807)
@@ -1,7 +1,7 @@
 .\" DO NOT EDIT-- this file is automatically generated.
 .\" from FreeBSD: head/tools/build/options/makeman 306729 2016-10-05 20:12:00Z 
emaste
 .\" $FreeBSD$
-.Dd December 9, 2016
+.Dd December 10, 2016
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -268,6 +268,12 @@ Set to not build
 .It Va WITHOUT_CAPSICUM
 .\" from FreeBSD: head/tools/build/options/WITHOUT_CAPSICUM 229319 2012-01-02 
21:57:58Z rwatson
 Set to not build Capsicum support into system programs.
+When set, it also enforces the following options:
+.Pp
+.Bl -item -compact
+.It
+.Va WITHOUT_CASPER
+.El
 .It Va WITHOUT_CASPER
 .\" from FreeBSD: head/tools/build/options/WITHOUT_CASPER 258838 2013-12-02 
08:21:28Z pjd
 Set to not build Casper program and related libraries.
___
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: r309805 - head/share/mk

2016-12-10 Thread Baptiste Daroussin
Author: bapt
Date: Sat Dec 10 13:29:51 2016
New Revision: 309805
URL: https://svnweb.freebsd.org/changeset/base/309805

Log:
  Make WITHOUT_CAPSICUM implying WITHOUT_CASPER
  
  PR:   214562
  Reported by:  dewa...@heuristicsystems.com.au
  MFC after:2 days

Modified:
  head/share/mk/src.opts.mk

Modified: head/share/mk/src.opts.mk
==
--- head/share/mk/src.opts.mk   Sat Dec 10 13:25:42 2016(r309804)
+++ head/share/mk/src.opts.mk   Sat Dec 10 13:29:51 2016(r309805)
@@ -311,6 +311,10 @@ MK_LLVM_LIBUNWIND:=no
 MK_GDB:=   no
 .endif
 
+.if ${MK_CAPSICUM} == "no"
+MK_CASPER:=no
+.endif
+
 .if ${MK_LIBPTHREAD} == "no"
 MK_LIBTHR:=no
 .endif
___
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: r309803 - head/usr.sbin/pw

2016-12-10 Thread Baptiste Daroussin
Author: bapt
Date: Sat Dec 10 12:48:48 2016
New Revision: 309803
URL: https://svnweb.freebsd.org/changeset/base/309803

Log:
  Fix pkg groupshow 
  
  PR:   204676
  Submitted by: longw...@incore.de
  MFC after:2 days

Modified:
  head/usr.sbin/pw/pw_group.c

Modified: head/usr.sbin/pw/pw_group.c
==
--- head/usr.sbin/pw/pw_group.c Sat Dec 10 12:28:43 2016(r309802)
+++ head/usr.sbin/pw/pw_group.c Sat Dec 10 12:48:48 2016(r309803)
@@ -282,7 +282,7 @@ int
 pw_group_show(int argc, char **argv, char *arg1)
 {
struct group *grp = NULL;
-   char *name;
+   char *name = NULL;
intmax_t id = -1;
int ch;
bool all, force, quiet, pretty;
___
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: r309802 - head/tools/build/mk

2016-12-10 Thread Baptiste Daroussin
Author: bapt
Date: Sat Dec 10 12:28:43 2016
New Revision: 309802
URL: https://svnweb.freebsd.org/changeset/base/309802

Log:
  Respect WITHOUT_FINGER in src.conf when running make delete-old
  
  PR:   213719
  Submitted by: philippe.mich...@sfr.fr
  MFC after:2 days

Modified:
  head/tools/build/mk/OptionalObsoleteFiles.inc

Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==
--- head/tools/build/mk/OptionalObsoleteFiles.inc   Sat Dec 10 12:26:49 
2016(r309801)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc   Sat Dec 10 12:28:43 
2016(r309802)
@@ -2039,6 +2039,14 @@ OLD_FILES+=usr/share/nls/uk_UA.KOI8-U/ee
 # to be filled in
 #.endif
 
+.if ${MK_FINGER} == no
+OLD_FILES+=usr/bin/finger
+OLD_FILES+=usr/share/man/man1/finger.1.gz
+OLD_FILES+=usr/share/man/man5/finger.conf.5.gz
+OLD_FILES+=usr/libexec/fingerd
+OLD_FILES+=usr/share/man/man8/fingerd.8.gz
+.endif
+
 .if ${MK_FLOPPY} == no
 OLD_FILES+=usr/sbin/fdcontrol
 OLD_FILES+=usr/sbin/fdformat
___
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: r309801 - head/tools/build/mk

2016-12-10 Thread Baptiste Daroussin
Author: bapt
Date: Sat Dec 10 12:26:49 2016
New Revision: 309801
URL: https://svnweb.freebsd.org/changeset/base/309801

Log:
  Respect WITHOUT_BOOTPD in src.conf when running make delete-old
  
  PR:   213720
  Submitted by: philippe.mich...@sfr.fr
  MFC after:2 days

Modified:
  head/tools/build/mk/OptionalObsoleteFiles.inc

Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==
--- head/tools/build/mk/OptionalObsoleteFiles.inc   Sat Dec 10 12:24:31 
2016(r309800)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc   Sat Dec 10 12:26:49 
2016(r309801)
@@ -656,6 +656,17 @@ OLD_FILES+=usr/share/man/man8/bootparamd
 OLD_FILES+=usr/sbin/callbootd
 .endif
 
+.if ${MK_BOOTPD} == no
+OLD_FILES+=usr/libexec/bootpd
+OLD_FILES+=usr/share/man/man5/bootptab.5.gz
+OLD_FILES+=usr/share/man/man8/bootpd.8.gz
+OLD_FILES+=usr/libexec/bootpgw
+OLD_FILES+=usr/sbin/bootpef
+OLD_FILES+=usr/share/man/man8/bootpef.8.gz
+OLD_FILES+=usr/sbin/bootptest
+OLD_FILES+=usr/share/man/man8/bootptest.8.gz
+.endif
+
 .if ${MK_BSD_CPIO} == no
 OLD_FILES+=usr/bin/bsdcpio
 OLD_FILES+=usr/bin/cpio
___
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: r309800 - head/tools/build/mk

2016-12-10 Thread Baptiste Daroussin
Author: bapt
Date: Sat Dec 10 12:24:31 2016
New Revision: 309800
URL: https://svnweb.freebsd.org/changeset/base/309800

Log:
  Respect WITHOUT_BOOTPARAMD in src.conf when running make delete-old
  
  PR:   213721
  Submitted by: philippe.mich...@sfr.fr
  MFC after:2 days

Modified:
  head/tools/build/mk/OptionalObsoleteFiles.inc

Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==
--- head/tools/build/mk/OptionalObsoleteFiles.inc   Sat Dec 10 12:21:24 
2016(r309799)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc   Sat Dec 10 12:24:31 
2016(r309800)
@@ -649,6 +649,13 @@ OLD_FILES+=usr/share/man/man8/zfsboot.8.
 OLD_FILES+=usr/share/man/man8/zfsloader.8.gz
 .endif
 
+.if ${MK_BOOTPARAMD} == no
+OLD_FILES+=usr/sbin/bootparamd
+OLD_FILES+=usr/share/man/man5/bootparams.5.gz
+OLD_FILES+=usr/share/man/man8/bootparamd.8.gz
+OLD_FILES+=usr/sbin/callbootd
+.endif
+
 .if ${MK_BSD_CPIO} == no
 OLD_FILES+=usr/bin/bsdcpio
 OLD_FILES+=usr/bin/cpio
___
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: r309799 - head/tools/build/mk

2016-12-10 Thread Baptiste Daroussin
Author: bapt
Date: Sat Dec 10 12:21:24 2016
New Revision: 309799
URL: https://svnweb.freebsd.org/changeset/base/309799

Log:
  Respect WITHOUT_RBOOTD in src.conf when running make delete-old
  
  PR:   213722
  Submitted by: philippe.mich...@sfr.fr
  MFC after:2 days

Modified:
  head/tools/build/mk/OptionalObsoleteFiles.inc

Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==
--- head/tools/build/mk/OptionalObsoleteFiles.inc   Sat Dec 10 12:18:03 
2016(r309798)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc   Sat Dec 10 12:21:24 
2016(r309799)
@@ -6861,6 +6861,11 @@ OLD_FILES+=usr/share/man/man8/quotaon.8.
 OLD_FILES+=usr/share/man/man8/repquota.8.gz
 .endif
 
+.if ${MK_RBOOTD} == no
+OLD_FILES+=usr/libexec/rbootd
+OLD_FILES+=usr/share/man/man8/rbootd.8.gz
+.endif
+
 .if ${MK_RCMDS} == no
 OLD_FILES+=bin/rcp
 OLD_FILES+=etc/rc.d/rwho
___
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: r309798 - head/tools/build/mk

2016-12-10 Thread Baptiste Daroussin
Author: bapt
Date: Sat Dec 10 12:18:03 2016
New Revision: 309798
URL: https://svnweb.freebsd.org/changeset/base/309798

Log:
  Also remove auditdistd files if src.conf has WITHOUT_AUDIT
  
  PR:   213723
  Submitted by: philippe.mich...@sfr.fr
  MFC after:2 days

Modified:
  head/tools/build/mk/OptionalObsoleteFiles.inc

Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==
--- head/tools/build/mk/OptionalObsoleteFiles.inc   Sat Dec 10 12:14:41 
2016(r309797)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc   Sat Dec 10 12:18:03 
2016(r309798)
@@ -166,12 +166,15 @@ OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-A
 .if ${MK_AUDIT} == no
 OLD_FILES+=usr/sbin/audit
 OLD_FILES+=usr/sbin/auditd
+OLD_FILES+=usr/sbin/auditdistd
 OLD_FILES+=usr/sbin/auditreduce
 OLD_FILES+=usr/sbin/praudit
 OLD_FILES+=usr/share/man/man1/auditreduce.1.gz
 OLD_FILES+=usr/share/man/man1/praudit.1.gz
+OLD_FILES+=usr/share/man/man5/auditdistd.conf.5.gz
 OLD_FILES+=usr/share/man/man8/audit.8.gz
 OLD_FILES+=usr/share/man/man8/auditd.8.gz
+OLD_FILES+=usr/share/man/man8/auditdistd.8.gz
 .endif
 
 .if ${MK_AUTHPF} == no
___
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: r309797 - head/tools/build/mk

2016-12-10 Thread Baptiste Daroussin
Author: bapt
Date: Sat Dec 10 12:14:41 2016
New Revision: 309797
URL: https://svnweb.freebsd.org/changeset/base/309797

Log:
  Add entries to remove timed files with make delete-old if WITHOUT_TIMED is set
  
  PR:   213724
  Submitted by: philippe.mich...@sfr.fr
  MFC after:2 days

Modified:
  head/tools/build/mk/OptionalObsoleteFiles.inc

Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==
--- head/tools/build/mk/OptionalObsoleteFiles.inc   Sat Dec 10 12:02:32 
2016(r309796)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc   Sat Dec 10 12:14:41 
2016(r309797)
@@ -8059,6 +8059,13 @@ OLD_FILES+=usr/share/man/man1/colcrt.1.g
 OLD_FILES+=usr/share/man/man1/ul.1.gz
 .endif
 
+.if ${MK_TIMED} == no
+OLD_FILES+=usr/sbin/timed
+OLD_FILES+=usr/sbin/timedc
+OLD_FILES+=usr/share/man/man8/timed.8.gz
+OLD_FILES+=usr/share/man/man8/timedc.8.gz
+.endif
+
 .if ${MK_TOOLCHAIN} == no
 OLD_FILES+=usr/bin/addr2line
 OLD_FILES+=usr/bin/as
___
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: r309796 - in head/contrib/groff: contrib/mm src/utils/afmtodit

2016-12-10 Thread Baptiste Daroussin
Author: bapt
Date: Sat Dec 10 12:02:32 2016
New Revision: 309796
URL: https://svnweb.freebsd.org/changeset/base/309796

Log:
  Perl is not available in base fix scripts depending on it to use
  the version from ports
  
  PR:   215159
  Reported by:  Anatoly Kamchatnov 
  MFC after:2 days

Modified:
  head/contrib/groff/contrib/mm/mmroff.pl
  head/contrib/groff/src/utils/afmtodit/afmtodit.pl

Modified: head/contrib/groff/contrib/mm/mmroff.pl
==
--- head/contrib/groff/contrib/mm/mmroff.pl Sat Dec 10 11:41:26 2016
(r309795)
+++ head/contrib/groff/contrib/mm/mmroff.pl Sat Dec 10 12:02:32 2016
(r309796)
@@ -1,4 +1,4 @@
-#! /usr/bin/perl
+#! /usr/bin/env perl
 
 use strict;
 # runs groff in safe mode, that seems to be the default

Modified: head/contrib/groff/src/utils/afmtodit/afmtodit.pl
==
--- head/contrib/groff/src/utils/afmtodit/afmtodit.pl   Sat Dec 10 11:41:26 
2016(r309795)
+++ head/contrib/groff/src/utils/afmtodit/afmtodit.pl   Sat Dec 10 12:02:32 
2016(r309796)
@@ -1,4 +1,4 @@
-#! /usr/bin/perl -w
+#! /usr/bin/env perl -w
 # -*- Perl -*-
 # Copyright (C) 1989-2000, 2001, 2002, 2003, 2004, 2005
 # Free Software Foundation, Inc.
___
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: r309795 - head/share/misc

2016-12-10 Thread Baptiste Daroussin
Author: bapt
Date: Sat Dec 10 11:41:26 2016
New Revision: 309795
URL: https://svnweb.freebsd.org/changeset/base/309795

Log:
  Update pci ids database to 2016.11.21
  
  MFC after:2 days

Modified:
  head/share/misc/pci_vendors

Modified: head/share/misc/pci_vendors
==
--- head/share/misc/pci_vendors Sat Dec 10 11:38:29 2016(r309794)
+++ head/share/misc/pci_vendors Sat Dec 10 11:41:26 2016(r309795)
@@ -3,8 +3,8 @@
 #
 #  List of PCI ID's
 #
-#  Version: 2016.10.20
-#  Date:2016-10-20 03:15:02
+#  Version: 2016.11.21
+#  Date:2016-11-21 03:15:01
 #
 #  Maintained by Albert Pool, Martin Mares, and other volunteers from
 #  the PCI ID Project at http://pci-ids.ucw.cz/.
@@ -50,9 +50,11 @@
 021b  Compaq Computer Corporation
8139  HNE-300 (RealTek RTL8139c) [iPaq Networking]
 0270  Hauppauge computer works Inc. (Wrong ID)
+0291  Davicom Semiconductor, Inc. (Wrong ID)
 # SpeedStream is Efficient Networks, Inc, a Siemens Company
 02ac  SpeedStream
1012  1012 PCMCIA 10/100 Ethernet Card [RTL81xx]
+02e0  XFX Pine Group Inc. (Wrong ID)
 0303  Hewlett-Packard Company (Wrong ID)
 0308  ZyXEL Communications Corporation (Wrong ID)
 0315  SK-Electronics Co., Ltd.
@@ -548,12 +550,12 @@
1028 1fd3  HBA330 MMZ
00ab  SAS3516 Fusion-MPT Tri-Mode RAID On Chip (ROC)
00ac  SAS3416 Fusion-MPT Tri-Mode I/O Controller Chip (IOC)
-   1d49 0201  ThinkSystem 9400-16i PCIe 12Gb HBA
-   1d49 0203  ThinkSystem 9400-16e PCIe 12Gb HBA
+   1d49 0201  ThinkSystem 430-16i SAS/SATA 12Gb HBA
+   1d49 0203  ThinkSystem 430-16e SAS/SATA 12Gb HBA
00ae  SAS3508 Fusion-MPT Tri-Mode RAID On Chip (ROC)
00af  SAS3408 Fusion-MPT Tri-Mode I/O Controller Chip (IOC)
-   1d49 0200  ThinkSystem 9400-8i PCIe 12Gb HBA
-   1d49 0202  ThinkSystem 9400-8e PCIe 12Gb HBA
+   1d49 0200  ThinkSystem 430-8i SAS/SATA 12Gb HBA
+   1d49 0202  ThinkSystem 430-8e SAS/SATA 12Gb HBA
00be  SAS3504 Fusion-MPT Tri-Mode RAID On Chip (ROC)
00bf  SAS3404 Fusion-MPT Tri-Mode I/O Controller Chip (IOC)
00c0  SAS3324 PCI-Express Fusion-MPT SAS-3
@@ -7531,7 +7533,7 @@
1885 0700  Tsunami FPGA PMC with Altera Stratix S40
1885 0701  Tsunami FPGA PMC with Altera Stratix S30
9733  PEX 9733 33-lane, 9-port PCI Express Gen 3 (8.0 GT/s) Switch
-   1d49 0001  ThinkSystem P310W-4P NVMe Switch Card
+   1d49 0001  ThinkSystem 1610-4P NVMe Switch Adapter
9749  PEX 9749 49-lane, 13-port PCI Express Gen 3 (8.0 GT/s) Switch
a100  Blackmagic Design DeckLink
bb04  B 3PCIOSD1A Isolated PCI Serial
@@ -8377,6 +8379,7 @@
1048 0c45  GLoria II
1048 0c4a  GLoria II-64 Pro
1048 0c4b  GLoria II-64 Pro DVII
+   10a9 9002  VPro VR3
0110  NV11 [GeForce2 MX/MX 400]
1043 4015  AGP-V7100 Pro
1043 4021  V7100 Deluxe Combo
@@ -10649,6 +10652,7 @@
1b00  GP102 [TITAN X]
1b01  GP102
1b30  GP102GL [Quadro P6000]
+   1b38  GP102GL [Tesla P40]
1b70  GP102GL
1b78  GP102GL
1b80  GP104 [GeForce GTX 1080]
@@ -10668,10 +10672,11 @@
1c03  GP106 [GeForce GTX 1060 6GB]
1c20  GP106M [GeForce GTX 1060]
1c30  GP106GL
+   1c35  GP106
1c60  GP106M [GeForce GTX 1060]
1c70  GP106GL
1c80  GP107
-   1c81  GP107
+   1c81  GP107 [GeForce GTX 1050]
1c82  GP107 [GeForce GTX 1050 Ti]
1ca7  GP107GL
1ca8  GP107GL
@@ -13729,6 +13734,7 @@
7375  PM7375 [LASAR-155 ATM SAR]
7384  PM7384 [FREEDM - 84P672 Frm Engine & Datalink Mgr]
8000  PM8000  [SPC - SAS Protocol Controller]
+   8009  PM8009 SPCve 8x6G
8032  ATTO Celerity FC8xEN
117c 003b  Celerity FC-82EN Fibre Channel Adapter
117c 003c  Celerity FC-84EN Fibre Channel Adapter
@@ -13742,6 +13748,8 @@
8071  PM8071 Tachyon SPCve 12G eight-port SAS/SATA controller
8072  PM8072 Tachyon SPCv 12G 16-port SAS/SATA controller
8073  PM8073 Tachyon SPCve 12G 16-port SAS/SATA controller
+   8531  PM8531 PFX 24xG3 Fanout PCIe Switches
+   8546  PM8546 B-FEIP PSX 96xG3 PCIe Storage Switch
 11f9  I-Cube Inc
 11fa  Kasan Electronics Company, Ltd.
 11fb  Datel Inc
@@ -16213,6 +16221,71 @@
589a  T520-509A Unified Wire Ethernet Controller [VF]
589b  T540-509B Unified Wire Ethernet Controller [VF]
589c  T520-509C Unified Wire Ethernet Controller [VF]
+   6001  T6225-CR Unified Wire Ethernet Controller
+   6002  T6225-SO-CR Unified Wire Ethernet Controller
+   6003  T6425-CR Unified Wire Ethernet Controller
+   6004  T6425-SO-CR Unified Wire Ethernet 

svn commit: r309794 - stable/9/contrib/tzdata

2016-12-10 Thread Baptiste Daroussin
Author: bapt
Date: Sat Dec 10 11:38:29 2016
New Revision: 309794
URL: https://svnweb.freebsd.org/changeset/base/309794

Log:
  MFC r309544:
  
  Import tzdata 2016j

Modified:
  stable/9/contrib/tzdata/CONTRIBUTING
  stable/9/contrib/tzdata/Makefile
  stable/9/contrib/tzdata/NEWS
  stable/9/contrib/tzdata/README
  stable/9/contrib/tzdata/Theory
  stable/9/contrib/tzdata/africa
  stable/9/contrib/tzdata/asia
  stable/9/contrib/tzdata/europe
  stable/9/contrib/tzdata/version
  stable/9/contrib/tzdata/zone.tab
  stable/9/contrib/tzdata/zone1970.tab
Directory Properties:
  stable/9/   (props changed)
  stable/9/contrib/   (props changed)
  stable/9/contrib/tzdata/   (props changed)

Modified: stable/9/contrib/tzdata/CONTRIBUTING
==
--- stable/9/contrib/tzdata/CONTRIBUTINGSat Dec 10 11:37:05 2016
(r309793)
+++ stable/9/contrib/tzdata/CONTRIBUTINGSat Dec 10 11:38:29 2016
(r309794)
@@ -18,10 +18,10 @@ data should contain commentary citing re
 justification.
 
 Please submit changes against either the latest release in
- or the master branch of the experimental
-Git repository.  If you use Git the following workflow may be helpful:
+ or the master branch of the development
+repository.  If you use Git the following workflow may be helpful:
 
-  * Copy the experimental repository.
+  * Copy the development repository.
 
   git clone https://github.com/eggert/tz.git
   cd tz

Modified: stable/9/contrib/tzdata/Makefile
==
--- stable/9/contrib/tzdata/MakefileSat Dec 10 11:37:05 2016
(r309793)
+++ stable/9/contrib/tzdata/MakefileSat Dec 10 11:38:29 2016
(r309794)
@@ -542,7 +542,8 @@ force_tzs:  $(TZS_NEW)
cp $(TZS_NEW) $(TZS)
 
 libtz.a:   $(LIBOBJS)
-   $(AR) ru $@ $(LIBOBJS)
+   rm -f $@
+   $(AR) -rc $@ $(LIBOBJS)
$(RANLIB) $@
 
 date:  $(DATEOBJS)

Modified: stable/9/contrib/tzdata/NEWS
==
--- stable/9/contrib/tzdata/NEWSSat Dec 10 11:37:05 2016
(r309793)
+++ stable/9/contrib/tzdata/NEWSSat Dec 10 11:38:29 2016
(r309794)
@@ -1,5 +1,46 @@
 News for the tz database
 
+Release 2016j - 2016-11-22 23:17:13 -0800
+
+  Briefly: Saratov, Russia moves from +03 to +04 on 2016-12-04.
+
+  Changes to future time stamps
+
+Saratov, Russia switches from +03 to +04 on 2016-12-04 at 02:00.
+This hives off a new zone Europe/Saratov from Europe/Volgograd.
+(Thanks to Yuri Konotopov and Stepan Golosunov.)
+
+  Changes to past time stamps
+
+The new zone Asia/Atyrau for Atyraū Region, Kazakhstan, is like
+Asia/Aqtau except it switched from +04/+05 to +05/+06 in spring
+1999, not fall 1994.  (Thanks to Stepan Golosunov.)
+
+  Changes to past time zone abbreviations
+
+Asia/Gaza and Asia/Hebron now use "EEST", not "EET", to denote
+summer time before 1948.  The old use of "EET" was a typo.
+
+  Changes to code
+
+zic no longer mishandles file systems that lack hard links, fixing
+bugs introduced in 2016g.  (Problems reported by Tom Lane.)
+Also, when the destination already contains symbolic links, zic
+should now work better on systems where the 'link' system call
+does not follow symbolic links.
+
+  Changes to documentation and commentary
+
+tz-link.htm now documents the relationship between release version
+numbers and development-repository commit tags.  (Suggested by
+Paul Koning.)
+
+The 'Theory' file now documents UT.
+
+iso3166.tab now accents "Curaçao", and commentary now mentions
+the names "Cabo Verde" and "Czechia".  (Thanks to Jiří Boháč.)
+
+
 Release 2016i - 2016-11-01 23:19:52 -0700
 
   Briefly: Cyprus split into two time zones on 2016-10-30, and Tonga
@@ -212,7 +253,7 @@ Release 2016g - 2016-09-13 08:56:38 -070
 23 commits and some working-file changes have been made since
 release 2016g, the version number is now something like
 '2016g-23-g50556e3-dirty' instead of the misleading '2016g'.
-Official releases uses the same version number format as before,
+Tagged releases use the same version number format as before,
 e.g., '2016g'.  To support the more-accurate version number, its
 specification has moved from a line in the Makefile to a new
 source file 'version'.

Modified: stable/9/contrib/tzdata/README
==
--- stable/9/contrib/tzdata/README  Sat Dec 10 11:37:05 2016
(r309793)
+++ stable/9/contrib/tzdata/README  Sat Dec 10 11:38:29 2016
(r309794)
@@ -10,24 +10,9 @@ locations around the globe.  It is updat
 changes made by political bodies to time zone boundaries, UTC 

svn commit: r309793 - stable/10/contrib/tzdata

2016-12-10 Thread Baptiste Daroussin
Author: bapt
Date: Sat Dec 10 11:37:05 2016
New Revision: 309793
URL: https://svnweb.freebsd.org/changeset/base/309793

Log:
  MFC r309544:
  
  Import tzdata 2016j

Modified:
  stable/10/contrib/tzdata/CONTRIBUTING
  stable/10/contrib/tzdata/Makefile
  stable/10/contrib/tzdata/NEWS
  stable/10/contrib/tzdata/README
  stable/10/contrib/tzdata/Theory
  stable/10/contrib/tzdata/africa
  stable/10/contrib/tzdata/asia
  stable/10/contrib/tzdata/europe
  stable/10/contrib/tzdata/version
  stable/10/contrib/tzdata/zone.tab
  stable/10/contrib/tzdata/zone1970.tab
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/tzdata/CONTRIBUTING
==
--- stable/10/contrib/tzdata/CONTRIBUTING   Sat Dec 10 11:35:28 2016
(r309792)
+++ stable/10/contrib/tzdata/CONTRIBUTING   Sat Dec 10 11:37:05 2016
(r309793)
@@ -18,10 +18,10 @@ data should contain commentary citing re
 justification.
 
 Please submit changes against either the latest release in
- or the master branch of the experimental
-Git repository.  If you use Git the following workflow may be helpful:
+ or the master branch of the development
+repository.  If you use Git the following workflow may be helpful:
 
-  * Copy the experimental repository.
+  * Copy the development repository.
 
   git clone https://github.com/eggert/tz.git
   cd tz

Modified: stable/10/contrib/tzdata/Makefile
==
--- stable/10/contrib/tzdata/Makefile   Sat Dec 10 11:35:28 2016
(r309792)
+++ stable/10/contrib/tzdata/Makefile   Sat Dec 10 11:37:05 2016
(r309793)
@@ -542,7 +542,8 @@ force_tzs:  $(TZS_NEW)
cp $(TZS_NEW) $(TZS)
 
 libtz.a:   $(LIBOBJS)
-   $(AR) ru $@ $(LIBOBJS)
+   rm -f $@
+   $(AR) -rc $@ $(LIBOBJS)
$(RANLIB) $@
 
 date:  $(DATEOBJS)

Modified: stable/10/contrib/tzdata/NEWS
==
--- stable/10/contrib/tzdata/NEWS   Sat Dec 10 11:35:28 2016
(r309792)
+++ stable/10/contrib/tzdata/NEWS   Sat Dec 10 11:37:05 2016
(r309793)
@@ -1,5 +1,46 @@
 News for the tz database
 
+Release 2016j - 2016-11-22 23:17:13 -0800
+
+  Briefly: Saratov, Russia moves from +03 to +04 on 2016-12-04.
+
+  Changes to future time stamps
+
+Saratov, Russia switches from +03 to +04 on 2016-12-04 at 02:00.
+This hives off a new zone Europe/Saratov from Europe/Volgograd.
+(Thanks to Yuri Konotopov and Stepan Golosunov.)
+
+  Changes to past time stamps
+
+The new zone Asia/Atyrau for Atyraū Region, Kazakhstan, is like
+Asia/Aqtau except it switched from +04/+05 to +05/+06 in spring
+1999, not fall 1994.  (Thanks to Stepan Golosunov.)
+
+  Changes to past time zone abbreviations
+
+Asia/Gaza and Asia/Hebron now use "EEST", not "EET", to denote
+summer time before 1948.  The old use of "EET" was a typo.
+
+  Changes to code
+
+zic no longer mishandles file systems that lack hard links, fixing
+bugs introduced in 2016g.  (Problems reported by Tom Lane.)
+Also, when the destination already contains symbolic links, zic
+should now work better on systems where the 'link' system call
+does not follow symbolic links.
+
+  Changes to documentation and commentary
+
+tz-link.htm now documents the relationship between release version
+numbers and development-repository commit tags.  (Suggested by
+Paul Koning.)
+
+The 'Theory' file now documents UT.
+
+iso3166.tab now accents "Curaçao", and commentary now mentions
+the names "Cabo Verde" and "Czechia".  (Thanks to Jiří Boháč.)
+
+
 Release 2016i - 2016-11-01 23:19:52 -0700
 
   Briefly: Cyprus split into two time zones on 2016-10-30, and Tonga
@@ -212,7 +253,7 @@ Release 2016g - 2016-09-13 08:56:38 -070
 23 commits and some working-file changes have been made since
 release 2016g, the version number is now something like
 '2016g-23-g50556e3-dirty' instead of the misleading '2016g'.
-Official releases uses the same version number format as before,
+Tagged releases use the same version number format as before,
 e.g., '2016g'.  To support the more-accurate version number, its
 specification has moved from a line in the Makefile to a new
 source file 'version'.

Modified: stable/10/contrib/tzdata/README
==
--- stable/10/contrib/tzdata/README Sat Dec 10 11:35:28 2016
(r309792)
+++ stable/10/contrib/tzdata/README Sat Dec 10 11:37:05 2016
(r309793)
@@ -10,24 +10,9 @@ locations around the globe.  It is updat
 changes made by political bodies to time zone boundaries, UTC offsets,
 and daylight-saving rules.
 
-Here is a recipe for 

svn commit: r309792 - stable/11/contrib/tzdata

2016-12-10 Thread Baptiste Daroussin
Author: bapt
Date: Sat Dec 10 11:35:28 2016
New Revision: 309792
URL: https://svnweb.freebsd.org/changeset/base/309792

Log:
  MFC r309544:
  
  Import tzdata 2016j

Modified:
  stable/11/contrib/tzdata/CONTRIBUTING
  stable/11/contrib/tzdata/Makefile
  stable/11/contrib/tzdata/NEWS
  stable/11/contrib/tzdata/README
  stable/11/contrib/tzdata/Theory
  stable/11/contrib/tzdata/africa
  stable/11/contrib/tzdata/asia
  stable/11/contrib/tzdata/europe
  stable/11/contrib/tzdata/version
  stable/11/contrib/tzdata/zone.tab
  stable/11/contrib/tzdata/zone1970.tab
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/contrib/tzdata/CONTRIBUTING
==
--- stable/11/contrib/tzdata/CONTRIBUTING   Sat Dec 10 10:00:27 2016
(r309791)
+++ stable/11/contrib/tzdata/CONTRIBUTING   Sat Dec 10 11:35:28 2016
(r309792)
@@ -18,10 +18,10 @@ data should contain commentary citing re
 justification.
 
 Please submit changes against either the latest release in
- or the master branch of the experimental
-Git repository.  If you use Git the following workflow may be helpful:
+ or the master branch of the development
+repository.  If you use Git the following workflow may be helpful:
 
-  * Copy the experimental repository.
+  * Copy the development repository.
 
   git clone https://github.com/eggert/tz.git
   cd tz

Modified: stable/11/contrib/tzdata/Makefile
==
--- stable/11/contrib/tzdata/Makefile   Sat Dec 10 10:00:27 2016
(r309791)
+++ stable/11/contrib/tzdata/Makefile   Sat Dec 10 11:35:28 2016
(r309792)
@@ -542,7 +542,8 @@ force_tzs:  $(TZS_NEW)
cp $(TZS_NEW) $(TZS)
 
 libtz.a:   $(LIBOBJS)
-   $(AR) ru $@ $(LIBOBJS)
+   rm -f $@
+   $(AR) -rc $@ $(LIBOBJS)
$(RANLIB) $@
 
 date:  $(DATEOBJS)

Modified: stable/11/contrib/tzdata/NEWS
==
--- stable/11/contrib/tzdata/NEWS   Sat Dec 10 10:00:27 2016
(r309791)
+++ stable/11/contrib/tzdata/NEWS   Sat Dec 10 11:35:28 2016
(r309792)
@@ -1,5 +1,46 @@
 News for the tz database
 
+Release 2016j - 2016-11-22 23:17:13 -0800
+
+  Briefly: Saratov, Russia moves from +03 to +04 on 2016-12-04.
+
+  Changes to future time stamps
+
+Saratov, Russia switches from +03 to +04 on 2016-12-04 at 02:00.
+This hives off a new zone Europe/Saratov from Europe/Volgograd.
+(Thanks to Yuri Konotopov and Stepan Golosunov.)
+
+  Changes to past time stamps
+
+The new zone Asia/Atyrau for Atyraū Region, Kazakhstan, is like
+Asia/Aqtau except it switched from +04/+05 to +05/+06 in spring
+1999, not fall 1994.  (Thanks to Stepan Golosunov.)
+
+  Changes to past time zone abbreviations
+
+Asia/Gaza and Asia/Hebron now use "EEST", not "EET", to denote
+summer time before 1948.  The old use of "EET" was a typo.
+
+  Changes to code
+
+zic no longer mishandles file systems that lack hard links, fixing
+bugs introduced in 2016g.  (Problems reported by Tom Lane.)
+Also, when the destination already contains symbolic links, zic
+should now work better on systems where the 'link' system call
+does not follow symbolic links.
+
+  Changes to documentation and commentary
+
+tz-link.htm now documents the relationship between release version
+numbers and development-repository commit tags.  (Suggested by
+Paul Koning.)
+
+The 'Theory' file now documents UT.
+
+iso3166.tab now accents "Curaçao", and commentary now mentions
+the names "Cabo Verde" and "Czechia".  (Thanks to Jiří Boháč.)
+
+
 Release 2016i - 2016-11-01 23:19:52 -0700
 
   Briefly: Cyprus split into two time zones on 2016-10-30, and Tonga
@@ -212,7 +253,7 @@ Release 2016g - 2016-09-13 08:56:38 -070
 23 commits and some working-file changes have been made since
 release 2016g, the version number is now something like
 '2016g-23-g50556e3-dirty' instead of the misleading '2016g'.
-Official releases uses the same version number format as before,
+Tagged releases use the same version number format as before,
 e.g., '2016g'.  To support the more-accurate version number, its
 specification has moved from a line in the Makefile to a new
 source file 'version'.

Modified: stable/11/contrib/tzdata/README
==
--- stable/11/contrib/tzdata/README Sat Dec 10 10:00:27 2016
(r309791)
+++ stable/11/contrib/tzdata/README Sat Dec 10 11:35:28 2016
(r309792)
@@ -10,24 +10,9 @@ locations around the globe.  It is updat
 changes made by political bodies to time zone boundaries, UTC offsets,
 and daylight-saving rules.
 
-Here is a recipe for 

Re: svn commit: r309774 - head/contrib/netbsd-tests/fs/tmpfs

2016-12-10 Thread Konstantin Belousov
On Fri, Dec 09, 2016 at 10:50:43PM +, Ngie Cooper wrote:
> Author: ngie
> Date: Fri Dec  9 22:50:43 2016
> New Revision: 309774
> URL: https://svnweb.freebsd.org/changeset/base/309774
> 
> Log:
>   Only run mdconfig -d -u 3 if /dev/md3 exists on the system
>   

>   This will prevent "cleanup failures" (exit code != 0 returned) when
>   tmpfs is not loaded
>   
>   MFC after:  1 week
> 
> Modified:
>   head/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh
> 
> Modified: head/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh
> ==
> --- head/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh   Fri Dec  9 22:13:00 
> 2016(r309773)
> +++ head/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh   Fri Dec  9 22:50:43 
> 2016(r309774)
> @@ -85,7 +85,7 @@ basic_cleanup() {
>   umount mnt 2>/dev/null 1>&2
>   # Begin FreeBSD
>   if true; then
> - atf_check -s eq:0 -o empty -e empty mdconfig -d -u 3
> + [ ! -c /dev/md3 ] || mdconfig -d -u 3
>   else
>   # End FreeBSD
>   vndconfig -u /dev/vnd3 2>/dev/null 1>&2
Why this test is under fs/tmpfs ?  I was not able to see how tmpfs is
used for this test.
___
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: r308212 - in head/sys: fs/nfsserver kern sys

2016-12-10 Thread Konstantin Belousov via svn-src-all
On Fri, Dec 09, 2016 at 12:13:09PM -0800, Conrad Meyer wrote:
> On Wed, Nov 2, 2016 at 5:43 AM, Konstantin Belousov  wrote:
> > Author: kib
> > Date: Wed Nov  2 12:43:15 2016
> > New Revision: 308212
> > URL: https://svnweb.freebsd.org/changeset/base/308212
> >
> > Log:
> >   Allow some dotdot lookups in capability mode.
> >
> >   If dotdot lookup does not escape from the file descriptor passed as
> >   the lookup root, we can allow the component traversal.  Track the
> >   directories traversed, and check the result of dotdot lookup against
> >   the recorded list of the directory vnodes.
> >
> >   Dotdot lookups are enabled by sysctl vfs.lookup_cap_dotdot, currently
> >   disabled by default until more verification of the approach is done.
> 
> Hi Konstantin,
> 
> Are we waiting on a specific reviewer or something else?  It would be
> very nice to have this enabled by default.
I did waited for some review, but it obviously not going to happen.
Please push the button for D8746, and I will commit the change.
___
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: r309791 - head/sys/arm64/conf

2016-12-10 Thread George V. Neville-Neil
Author: gnn
Date: Sat Dec 10 10:00:27 2016
New Revision: 309791
URL: https://svnweb.freebsd.org/changeset/base/309791

Log:
  This adds a configuration for arm64 users that track CURRENT but
  don't need the extra debug facilities.  Copied from the amd64
  configuration of the same name.
  
  Submitted by: Nikolai Lifanov
  Reviewed by: emaste
  MFC after: 2 weeks

Added:
  head/sys/arm64/conf/GENERIC-NODEBUG
 - copied, changed from r309790, head/sys/amd64/conf/GENERIC-NODEBUG

Copied and modified: head/sys/arm64/conf/GENERIC-NODEBUG (from r309790, 
head/sys/amd64/conf/GENERIC-NODEBUG)
==
--- head/sys/amd64/conf/GENERIC-NODEBUG Sat Dec 10 09:10:48 2016
(r309790, copy source)
+++ head/sys/arm64/conf/GENERIC-NODEBUG Sat Dec 10 10:00:27 2016
(r309791)
@@ -1,6 +1,6 @@
 #
 # GENERIC-NODEBUG -- WITNESS and INVARIANTS free kernel configuration file 
-#   for FreeBSD/amd64
+#   for FreeBSD/arm64
 #
 # This configuration file removes several debugging options, including
 # WITNESS and INVARIANTS checking, which are known to have significant
___
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: r309790 - head/sys/dev/usb

2016-12-10 Thread Poul-Henning Kamp
Author: phk
Date: Sat Dec 10 09:10:48 2016
New Revision: 309790
URL: https://svnweb.freebsd.org/changeset/base/309790

Log:
  Add Genesys Logic USB hub.
  
  Make two other USB hub descriptions more precise.

Modified:
  head/sys/dev/usb/usbdevs

Modified: head/sys/dev/usb/usbdevs
==
--- head/sys/dev/usb/usbdevsSat Dec 10 06:27:45 2016(r309789)
+++ head/sys/dev/usb/usbdevsSat Dec 10 09:10:48 2016(r309790)
@@ -1240,7 +1240,7 @@ product ATHEROS2 AR9170   0x9170  AR9170
 
 /* Atmel Comp. products */
 product ATMEL STK541   0x2109  Zigbee Controller
-product ATMEL UHB124   0x3301  UHB124 hub
+product ATMEL UHB124   0x3301  AT43301 USB 1.1 Hub
 product ATMEL DWL120   0x7603  DWL-120 Wireless Adapter
 product ATMEL BW0020x7605  BW002 Wireless Adapter
 product ATMEL WL1130USB0x7613  WL-1130 USB
@@ -2174,7 +2174,8 @@ product GENERALINSTMNTS SB51000x5100  SU
 /* Genesys Logic products */
 product GENESYS GL620USB   0x0501  GL620USB Host-Host interface
 product GENESYS GL650  0x0604  GL650 HUB
-product GENESYS GL606  0x0606  USB 2.0 HUB
+product GENESYS GL606  0x0606  GL606 USB 2.0 HUB
+product GENESYS GL850G 0x0608  GL850G USB 2.0 HUB
 product GENESYS GL641USB   0x0700  GL641USB CompactFlash Card Reader
 product GENESYS GL641USB2IDE_2 0x0701  GL641USB USB-IDE Bridge No 2
 product GENESYS GL641USB2IDE   0x0702  GL641USB USB-IDE Bridge
___
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: r309735 - head/bin/dd

2016-12-10 Thread Ngie Cooper (yaneurabeya)

> On Dec 9, 2016, at 06:51, Bartek Rutkowski <ro...@freebsd.org> wrote:
> 
> Author: robak (ports committer)
> Date: Fri Dec  9 14:51:05 2016
> New Revision: 309735
> URL: https://svnweb.freebsd.org/changeset/base/309735
> 
> Log:
>  Capsicum support for dd(1)
> 
>  Adds Capsicum sandboxing to dd utility.
> 
>  Submitted by:Pawel Biernacki <pawel.bierna...@gmail.com>
>  Reviewed by: allanjude, emaste, oshogbo
>  Approved by: oshogbo
>  Sponsored by:Mysterious Code Ltd.
>  Differential Revision:   https://reviews.freebsd.org/D8543
> 
> Modified:
>  head/bin/dd/dd.c

This change broke some of the tests:

$ sudo kyua test
...
bin/dd/dd_test:length  ->  failed: Expected 512 bytes of output, got 0: dd 
if=/dev/zero of=/dev/fd/5 count=1 5>&1 >&- 2>/dev/null  [0.031s]
$ svn merge -c -309735 .
--- Reverse-merging r309735 into '.':
Ubin/dd/dd.c
--- Recording mergeinfo for reverse merge of r309735 into '.':
 U   .
$ (cd bin/dd/; make -s obj all; sudo make -s install; cd tests/; make -s check)
===> tests (obj)
===> tests (all)
===> tests (install)
dd_test:io  ->  passed  [0.083s]
dd_test:length  ->  passed  [0.032s]
dd_test:seek  ->  passed  [0.060s]

Results file id is usr_tests_bin_dd.20161210-082907-733272
Results saved to 
/home/ngie/.kyua/store/results.usr_tests_bin_dd.20161210-082907-733272.db

3/3 passed (0 failed)
$


signature.asc
Description: Message signed with OpenPGP using GPGMail