svn commit: r284791 - stable/8

2015-06-24 Thread Gregory Neil Shapiro
Author: gshapiro
Date: Thu Jun 25 01:57:47 2015
New Revision: 284791
URL: https://svnweb.freebsd.org/changeset/base/284791

Log:
  Add a note on the second sendmail fix for WeakDH interoperability.

Modified:
  stable/8/UPDATING

Modified: stable/8/UPDATING
==
--- stable/8/UPDATING   Thu Jun 25 01:56:36 2015(r284790)
+++ stable/8/UPDATING   Thu Jun 25 01:57:47 2015(r284791)
@@ -15,6 +15,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.
debugging tools present in HEAD were left in place because
sun4v support still needs work to become production ready.
 
+20150624:
+   An additional fix for the issue described in the 20150615 sendmail
+   entry below has been been committed in revision 284790.
+
 20150615:
The latest version of openssl rejects TLS handshakes with DH
parameters below 768 bits.  sendmail releases prior to 8.15.2
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284790 - stable/8/contrib/sendmail/src

2015-06-24 Thread Gregory Neil Shapiro
Author: gshapiro
Date: Thu Jun 25 01:56:36 2015
New Revision: 284790
URL: https://svnweb.freebsd.org/changeset/base/284790

Log:
  MFC: An additional fix for the openssl Weak DH remediation:
  
   The import of openssl to address the FreeBSD-SA-15:10.openssl security
   advisory includes a change which rejects handshakes with DH parameters
   below 768 bits.  sendmail releases prior to 8.15.2 (not yet released),
   defaulted to a 512 bit DH parameter setting for client connections.
  
   The first fix committed last week changed the default to 1024 bits.
  
   This commit fixes the case where the DHParameters option is set to a
   file which doesn't exist, which is the case on newer versions of
   FreeBSD which enable STARTTLS by default by auto-creating TLS
   certificates.

Modified:
  stable/8/contrib/sendmail/src/sendmail.h
Directory Properties:
  stable/8/contrib/sendmail/   (props changed)

Modified: stable/8/contrib/sendmail/src/sendmail.h
==
--- stable/8/contrib/sendmail/src/sendmail.hThu Jun 25 01:55:27 2015
(r284789)
+++ stable/8/contrib/sendmail/src/sendmail.hThu Jun 25 01:56:36 2015
(r284790)
@@ -1930,7 +1930,7 @@ struct termescape
 
 /* server requirements */
 #define TLS_I_SRV  (TLS_I_SRV_CERT | TLS_I_RSA_TMP | TLS_I_VRFY_PATH | \
-TLS_I_VRFY_LOC | TLS_I_TRY_DH | TLS_I_DH512 | \
+TLS_I_VRFY_LOC | TLS_I_TRY_DH | TLS_I_DH1024 | \
 TLS_I_CACHE)
 
 /* client requirements */
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284789 - stable/9

2015-06-24 Thread Gregory Neil Shapiro
Author: gshapiro
Date: Thu Jun 25 01:55:27 2015
New Revision: 284789
URL: https://svnweb.freebsd.org/changeset/base/284789

Log:
  Add a note on the second sendmail fix for WeakDH interoperability.

Modified:
  stable/9/UPDATING

Modified: stable/9/UPDATING
==
--- stable/9/UPDATING   Thu Jun 25 01:53:45 2015(r284788)
+++ stable/9/UPDATING   Thu Jun 25 01:55:27 2015(r284789)
@@ -11,6 +11,10 @@ handbook:
 Items affecting the ports and packages system can be found in
 /usr/ports/UPDATING.  Please read that file before running portupgrade.
 
+20150624:
+   An additional fix for the issue described in the 20150615 sendmail
+   entry below has been been committed in revision 284788.
+
 20150615:
The latest version of openssl rejects TLS handshakes with DH
parameters below 768 bits.  sendmail releases prior to 8.15.2
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284788 - stable/9/contrib/sendmail/src

2015-06-24 Thread Gregory Neil Shapiro
Author: gshapiro
Date: Thu Jun 25 01:53:45 2015
New Revision: 284788
URL: https://svnweb.freebsd.org/changeset/base/284788

Log:
  MFC: An additional fix for the openssl Weak DH remediation:
  
   The import of openssl to address the FreeBSD-SA-15:10.openssl security
   advisory includes a change which rejects handshakes with DH parameters
   below 768 bits.  sendmail releases prior to 8.15.2 (not yet released),
   defaulted to a 512 bit DH parameter setting for client connections.
  
   The first fix committed last week changed the default to 1024 bits.
  
   This commit fixes the case where the DHParameters option is set to a
   file which doesn't exist, which is the case on newer versions of
   FreeBSD which enable STARTTLS by default by auto-creating TLS
   certificates.

Modified:
  stable/9/contrib/sendmail/src/sendmail.h
Directory Properties:
  stable/9/contrib/sendmail/   (props changed)

Modified: stable/9/contrib/sendmail/src/sendmail.h
==
--- stable/9/contrib/sendmail/src/sendmail.hThu Jun 25 01:51:14 2015
(r284787)
+++ stable/9/contrib/sendmail/src/sendmail.hThu Jun 25 01:53:45 2015
(r284788)
@@ -1935,7 +1935,7 @@ struct termescape
 
 /* server requirements */
 #define TLS_I_SRV  (TLS_I_SRV_CERT | TLS_I_RSA_TMP | TLS_I_VRFY_PATH | \
-TLS_I_VRFY_LOC | TLS_I_TRY_DH | TLS_I_DH512 | \
+TLS_I_VRFY_LOC | TLS_I_TRY_DH | TLS_I_DH1024 | \
 TLS_I_CACHE)
 
 /* client requirements */
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284787 - stable/10

2015-06-24 Thread Gregory Neil Shapiro
Author: gshapiro
Date: Thu Jun 25 01:51:14 2015
New Revision: 284787
URL: https://svnweb.freebsd.org/changeset/base/284787

Log:
  Add a note on the second sendmail fix for WeakDH interoperability.

Modified:
  stable/10/UPDATING

Modified: stable/10/UPDATING
==
--- stable/10/UPDATING  Thu Jun 25 01:49:44 2015(r284786)
+++ stable/10/UPDATING  Thu Jun 25 01:51:14 2015(r284787)
@@ -16,6 +16,10 @@ from older versions of FreeBSD, try WITH
 stable/10, and then rebuild without this option. The bootstrap process from
 older version of current is a bit fragile.
 
+20150624:
+   An additional fix for the issue described in the 20150614 sendmail
+   entry below has been been committed in revision 284786.
+
 20150615:
The fix for the issue described in the 20150614 sendmail entry
below has been been committed in revision 284485.  The work
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284786 - stable/10/contrib/sendmail/src

2015-06-24 Thread Gregory Neil Shapiro
Author: gshapiro
Date: Thu Jun 25 01:49:44 2015
New Revision: 284786
URL: https://svnweb.freebsd.org/changeset/base/284786

Log:
  MFC: An additional fix for the openssl Weak DH remediation:
  
   The import of openssl to address the FreeBSD-SA-15:10.openssl security
   advisory includes a change which rejects handshakes with DH parameters
   below 768 bits.  sendmail releases prior to 8.15.2 (not yet released),
   defaulted to a 512 bit DH parameter setting for client connections.
  
   The first fix committed last week changed the default to 1024 bits.
  
   This commit fixes the case where the DHParameters option is set to a
   file which doesn't exist, which is the case on newer versions of
   FreeBSD which enable STARTTLS by default by auto-creating TLS
   certificates.

Modified:
  stable/10/contrib/sendmail/src/sendmail.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/sendmail/src/sendmail.h
==
--- stable/10/contrib/sendmail/src/sendmail.h   Thu Jun 25 01:42:59 2015
(r284785)
+++ stable/10/contrib/sendmail/src/sendmail.h   Thu Jun 25 01:49:44 2015
(r284786)
@@ -1935,7 +1935,7 @@ struct termescape
 
 /* server requirements */
 #define TLS_I_SRV  (TLS_I_SRV_CERT | TLS_I_RSA_TMP | TLS_I_VRFY_PATH | \
-TLS_I_VRFY_LOC | TLS_I_TRY_DH | TLS_I_DH512 | \
+TLS_I_VRFY_LOC | TLS_I_TRY_DH | TLS_I_DH1024 | \
 TLS_I_CACHE)
 
 /* client requirements */
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284785 - head

2015-06-24 Thread Gregory Neil Shapiro
Author: gshapiro
Date: Thu Jun 25 01:42:59 2015
New Revision: 284785
URL: https://svnweb.freebsd.org/changeset/base/284785

Log:
  Add a note on the second sendmail fix for WeakDH interoperability.

Modified:
  head/UPDATING

Modified: head/UPDATING
==
--- head/UPDATING   Thu Jun 25 01:24:36 2015(r284784)
+++ head/UPDATING   Thu Jun 25 01:42:59 2015(r284785)
@@ -31,6 +31,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11
disable the most expensive debugging functionality run
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
 
+20150623:
+   An additional fix for the issue described in the 20150614 sendmail
+   entry below has been been committed in revision 284717.
+
 20150616:
FreeBSD's old make (fmake) has been removed from the system. It is
available as the devel/fmake port or via pkg install fmake.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284784 - head/sys/sys

2015-06-24 Thread Mateusz Guzik
Author: mjg
Date: Thu Jun 25 01:24:36 2015
New Revision: 284784
URL: https://svnweb.freebsd.org/changeset/base/284784

Log:
  rlimit: fix a an old name in a comment: uihashtbl_mtx -> uihashtbl_lock

Modified:
  head/sys/sys/resourcevar.h

Modified: head/sys/sys/resourcevar.h
==
--- head/sys/sys/resourcevar.h  Thu Jun 25 00:15:37 2015(r284783)
+++ head/sys/sys/resourcevar.h  Thu Jun 25 01:24:36 2015(r284784)
@@ -90,7 +90,7 @@ struct racct;
  * Locking guide:
  * (a) Constant from inception
  * (b) Lockless, updated using atomics
- * (c) Locked by global uihashtbl_mtx
+ * (c) Locked by global uihashtbl_lock
  * (d) Locked by the ui_vmsize_mtx
  */
 struct uidinfo {
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284783 - head/sys/kern

2015-06-24 Thread Mateusz Guzik
Author: mjg
Date: Thu Jun 25 00:15:37 2015
New Revision: 284783
URL: https://svnweb.freebsd.org/changeset/base/284783

Log:
  rlimit: deduplicate code in chg* functions

Modified:
  head/sys/kern/kern_resource.c

Modified: head/sys/kern/kern_resource.c
==
--- head/sys/kern/kern_resource.c   Wed Jun 24 23:05:17 2015
(r284782)
+++ head/sys/kern/kern_resource.c   Thu Jun 25 00:15:37 2015
(r284783)
@@ -1371,49 +1371,52 @@ ui_racct_foreach(void (*callback)(struct
 }
 #endif
 
-/*
- * Change the count associated with number of processes
- * a given user is using.  When 'max' is 0, don't enforce a limit
- */
-int
-chgproccnt(struct uidinfo *uip, int diff, rlim_t max)
+static inline int
+chglimit(struct uidinfo *uip, long *limit, int diff, rlim_t max, const char 
*name)
 {
 
/* Don't allow them to exceed max, but allow subtraction. */
if (diff > 0 && max != 0) {
-   if (atomic_fetchadd_long(&uip->ui_proccnt, (long)diff) + diff > 
max) {
-   atomic_subtract_long(&uip->ui_proccnt, (long)diff);
+   if (atomic_fetchadd_long(limit, (long)diff) + diff > max) {
+   atomic_subtract_long(limit, (long)diff);
return (0);
}
} else {
-   atomic_add_long(&uip->ui_proccnt, (long)diff);
-   if (uip->ui_proccnt < 0)
-   printf("negative proccnt for uid = %d\n", uip->ui_uid);
+   atomic_add_long(limit, (long)diff);
+   if (*limit < 0)
+   printf("negative %s for uid = %d\n", name, uip->ui_uid);
}
return (1);
 }
 
 /*
+ * Change the count associated with number of processes
+ * a given user is using.  When 'max' is 0, don't enforce a limit
+ */
+int
+chgproccnt(struct uidinfo *uip, int diff, rlim_t max)
+{
+
+   return (chglimit(uip, &uip->ui_proccnt, diff, max, "proccnt"));
+}
+
+/*
  * Change the total socket buffer size a user has used.
  */
 int
 chgsbsize(struct uidinfo *uip, u_int *hiwat, u_int to, rlim_t max)
 {
-   int diff;
+   int diff, rv;
 
diff = to - *hiwat;
-   if (diff > 0) {
-   if (atomic_fetchadd_long(&uip->ui_sbsize, (long)diff) + diff > 
max) {
-   atomic_subtract_long(&uip->ui_sbsize, (long)diff);
-   return (0);
-   }
+   if (diff > 0 && max == 0) {
+   rv = 0;
} else {
-   atomic_add_long(&uip->ui_sbsize, (long)diff);
-   if (uip->ui_sbsize < 0)
-   printf("negative sbsize for uid = %d\n", uip->ui_uid);
+   rv = chglimit(uip, &uip->ui_sbsize, diff, max, "sbsize");
+   if (rv != 0)
+   *hiwat = to;
}
-   *hiwat = to;
-   return (1);
+   return (rv);
 }
 
 /*
@@ -1424,36 +1427,14 @@ int
 chgptscnt(struct uidinfo *uip, int diff, rlim_t max)
 {
 
-   /* Don't allow them to exceed max, but allow subtraction. */
-   if (diff > 0 && max != 0) {
-   if (atomic_fetchadd_long(&uip->ui_ptscnt, (long)diff) + diff > 
max) {
-   atomic_subtract_long(&uip->ui_ptscnt, (long)diff);
-   return (0);
-   }
-   } else {
-   atomic_add_long(&uip->ui_ptscnt, (long)diff);
-   if (uip->ui_ptscnt < 0)
-   printf("negative ptscnt for uid = %d\n", uip->ui_uid);
-   }
-   return (1);
+   return (chglimit(uip, &uip->ui_ptscnt, diff, max, "ptscnt"));
 }
 
 int
 chgkqcnt(struct uidinfo *uip, int diff, rlim_t max)
 {
 
-   if (diff > 0 && max != 0) {
-   if (atomic_fetchadd_long(&uip->ui_kqcnt, (long)diff) +
-   diff > max) {
-   atomic_subtract_long(&uip->ui_kqcnt, (long)diff);
-   return (0);
-   }
-   } else {
-   atomic_add_long(&uip->ui_kqcnt, (long)diff);
-   if (uip->ui_kqcnt < 0)
-   printf("negative kqcnt for uid = %d\n", uip->ui_uid);
-   }
-   return (1);
+   return (chglimit(uip, &uip->ui_kqcnt, diff, max, "kqcnt"));
 }
 
 void
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r284746 - in head/sys/dev/hyperv: include netvsc

2015-06-24 Thread Bjoern A. Zeeb

> On 24 Jun 2015, at 06:01 , Wei Hu  wrote:
> 
> Author: whu
> Date: Wed Jun 24 06:01:29 2015
> New Revision: 284746
> URL: https://svnweb.freebsd.org/changeset/base/284746
> 
> Log:
>  TSO and checksum offloading support for Netvsc driver on Hyper-V.
> 
>  Submitted by:whu
>  Reviewed by: royger
>  Approved by: royger
>  MFC after:   1 week
>  Relnotes:yes
>  Sponsored by:Microsoft OSTC
>  Differential Revision:   https://reviews.freebsd.org/D2517

This breaks LINT-NOIP and LINT-NOINET6 kernels.

I started looking at adding appropriate #ifdefs and #including opt_inet.h and 
opt_inet6.h  but properly untangling this in the middle of the night isn’t 
possible anymore for me (and I can’t test it).

Can you please have a look and fix this?   make -j16 tinderbox TARGETS=“amd64”  
(or i386) should do the trick and leave you with log files;  one error is:

/scratch/tmp/bz/head.svn/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c:(.text+0x13cd):
 undefined reference to `in6_cksum_pseudo’


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

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

2015-06-24 Thread Xin LI
Author: delphij
Date: Wed Jun 24 23:04:07 2015
New Revision: 284781
URL: https://svnweb.freebsd.org/changeset/base/284781

Log:
  MFC r284237,r284277:
  
  file 5.23.

Added:
  stable/9/contrib/file/magic/Magdir/cbor
 - copied unchanged from r284237, head/contrib/file/magic/Magdir/cbor
  stable/9/contrib/file/magic/Magdir/nasa
 - copied unchanged from r284237, head/contrib/file/magic/Magdir/nasa
  stable/9/contrib/file/src/gmtime_r.c
 - copied unchanged from r284237, head/contrib/file/src/gmtime_r.c
  stable/9/contrib/file/src/localtime_r.c
 - copied unchanged from r284237, head/contrib/file/src/localtime_r.c
Modified:
  stable/9/contrib/file/ChangeLog
  stable/9/contrib/file/Makefile.in
  stable/9/contrib/file/TODO
  stable/9/contrib/file/aclocal.m4
  stable/9/contrib/file/compile
  stable/9/contrib/file/config.h.in
  stable/9/contrib/file/configure
  stable/9/contrib/file/configure.ac
  stable/9/contrib/file/depcomp
  stable/9/contrib/file/doc/Makefile.in
  stable/9/contrib/file/doc/file.man
  stable/9/contrib/file/doc/libmagic.man
  stable/9/contrib/file/ltmain.sh
  stable/9/contrib/file/magic/Magdir/android
  stable/9/contrib/file/magic/Magdir/apple
  stable/9/contrib/file/magic/Magdir/archive
  stable/9/contrib/file/magic/Magdir/audio
  stable/9/contrib/file/magic/Magdir/cafebabe
  stable/9/contrib/file/magic/Magdir/commands
  stable/9/contrib/file/magic/Magdir/compress
  stable/9/contrib/file/magic/Magdir/console
  stable/9/contrib/file/magic/Magdir/dyadic
  stable/9/contrib/file/magic/Magdir/filesystems
  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/linux
  stable/9/contrib/file/magic/Magdir/mach
  stable/9/contrib/file/magic/Magdir/mathematica
  stable/9/contrib/file/magic/Magdir/misctools
  stable/9/contrib/file/magic/Magdir/modem
  stable/9/contrib/file/magic/Magdir/mozilla
  stable/9/contrib/file/magic/Magdir/os2
  stable/9/contrib/file/magic/Magdir/pdf
  stable/9/contrib/file/magic/Magdir/perl
  stable/9/contrib/file/magic/Magdir/riff
  stable/9/contrib/file/magic/Magdir/sereal
  stable/9/contrib/file/magic/Magdir/sgml
  stable/9/contrib/file/magic/Magdir/varied.script
  stable/9/contrib/file/magic/Magdir/vorbis
  stable/9/contrib/file/magic/Makefile.am
  stable/9/contrib/file/magic/Makefile.in
  stable/9/contrib/file/missing
  stable/9/contrib/file/python/Makefile.in
  stable/9/contrib/file/src/Makefile.in
  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/encoding.c
  stable/9/contrib/file/src/file.c
  stable/9/contrib/file/src/file.h
  stable/9/contrib/file/src/file_opts.h
  stable/9/contrib/file/src/fsmagic.c
  stable/9/contrib/file/src/funcs.c
  stable/9/contrib/file/src/is_tar.c
  stable/9/contrib/file/src/magic.c
  stable/9/contrib/file/src/magic.h
  stable/9/contrib/file/src/magic.h.in
  stable/9/contrib/file/src/print.c
  stable/9/contrib/file/src/readcdf.c
  stable/9/contrib/file/src/readelf.c
  stable/9/contrib/file/src/softmagic.c
  stable/9/contrib/file/tests/Makefile.in
  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 Wed Jun 24 21:30:35 2015
(r284780)
+++ stable/9/contrib/file/ChangeLog Wed Jun 24 23:04:07 2015
(r284781)
@@ -1,3 +1,56 @@
+2015-06-11   8:52  Christos Zoulas 
+
+   * redo long option encoding to fix off-by-one in 5.23
+
+2015-06-10  13:50  Christos Zoulas 
+
+   * release 5.23
+
+2015-06-09  16:10  Christos Zoulas 
+   
+   * Fix issue with regex range for magic with offset
+   * Always return true from mget with USE (success to mget not match
+ indication). Fixes mime evaluation after USE magic
+   * PR/459: Don't insert magic entries to the list if there are parsing
+ errors for them.
+
+2015-06-03  16:00  Christos Zoulas 
+
+   * PR/455: Add utf-7 encoding
+
+2015-06-03  14:30  Christos Zoulas 
+
+   * PR/455: Implement -Z, look inside, but don't report on compression
+   * PR/454: Fix allocation error on bad magic.
+
+2015-05-29  10:30  Christos Zoulas 
+
+   * handle MAGIC_CONTINUE everywhere, not just in softmagic
+
+2015-05-21  14:30  Christos Zoulas 
+
+   * don't print descriptions for NAME types when mime.
+
+2015-04-09  15:59  Christos Zoulas 
+
+   * Add --extension to list the known extensions for this file type
+ Idea by Andrew J Roazen
+
+2015-02-14  12:23  Christos Zoulas 
+
+   * Bump file search buffer size to 1M.
+
+2015-01-09  14:35  Christos Zoulas 
+
+   * Fix multiple issues with date formats reported by

svn commit: r284782 - in stable/8: contrib/file contrib/file/doc contrib/file/magic contrib/file/magic/Magdir contrib/file/python contrib/file/src contrib/file/tests lib/libmagic

2015-06-24 Thread Xin LI
Author: delphij
Date: Wed Jun 24 23:05:17 2015
New Revision: 284782
URL: https://svnweb.freebsd.org/changeset/base/284782

Log:
  MFC r284237,r284277:
  
  file 5.23.

Added:
  stable/8/contrib/file/magic/Magdir/cbor
 - copied unchanged from r284237, head/contrib/file/magic/Magdir/cbor
  stable/8/contrib/file/magic/Magdir/nasa
 - copied unchanged from r284237, head/contrib/file/magic/Magdir/nasa
  stable/8/contrib/file/src/gmtime_r.c
 - copied unchanged from r284237, head/contrib/file/src/gmtime_r.c
  stable/8/contrib/file/src/localtime_r.c
 - copied unchanged from r284237, head/contrib/file/src/localtime_r.c
Modified:
  stable/8/contrib/file/ChangeLog
  stable/8/contrib/file/Makefile.in
  stable/8/contrib/file/TODO
  stable/8/contrib/file/aclocal.m4
  stable/8/contrib/file/compile
  stable/8/contrib/file/config.h.in
  stable/8/contrib/file/configure
  stable/8/contrib/file/configure.ac
  stable/8/contrib/file/depcomp
  stable/8/contrib/file/doc/Makefile.in
  stable/8/contrib/file/doc/file.man
  stable/8/contrib/file/doc/libmagic.man
  stable/8/contrib/file/ltmain.sh
  stable/8/contrib/file/magic/Magdir/android
  stable/8/contrib/file/magic/Magdir/apple
  stable/8/contrib/file/magic/Magdir/archive
  stable/8/contrib/file/magic/Magdir/audio
  stable/8/contrib/file/magic/Magdir/cafebabe
  stable/8/contrib/file/magic/Magdir/commands
  stable/8/contrib/file/magic/Magdir/compress
  stable/8/contrib/file/magic/Magdir/console
  stable/8/contrib/file/magic/Magdir/dyadic
  stable/8/contrib/file/magic/Magdir/filesystems
  stable/8/contrib/file/magic/Magdir/gnu
  stable/8/contrib/file/magic/Magdir/images
  stable/8/contrib/file/magic/Magdir/jpeg
  stable/8/contrib/file/magic/Magdir/linux
  stable/8/contrib/file/magic/Magdir/mach
  stable/8/contrib/file/magic/Magdir/mathematica
  stable/8/contrib/file/magic/Magdir/misctools
  stable/8/contrib/file/magic/Magdir/modem
  stable/8/contrib/file/magic/Magdir/mozilla
  stable/8/contrib/file/magic/Magdir/os2
  stable/8/contrib/file/magic/Magdir/pdf
  stable/8/contrib/file/magic/Magdir/perl
  stable/8/contrib/file/magic/Magdir/riff
  stable/8/contrib/file/magic/Magdir/sereal
  stable/8/contrib/file/magic/Magdir/sgml
  stable/8/contrib/file/magic/Magdir/varied.script
  stable/8/contrib/file/magic/Magdir/vorbis
  stable/8/contrib/file/magic/Makefile.am
  stable/8/contrib/file/magic/Makefile.in
  stable/8/contrib/file/missing
  stable/8/contrib/file/python/Makefile.in
  stable/8/contrib/file/src/Makefile.in
  stable/8/contrib/file/src/apprentice.c
  stable/8/contrib/file/src/ascmagic.c
  stable/8/contrib/file/src/cdf.c
  stable/8/contrib/file/src/cdf.h
  stable/8/contrib/file/src/compress.c
  stable/8/contrib/file/src/encoding.c
  stable/8/contrib/file/src/file.c
  stable/8/contrib/file/src/file.h
  stable/8/contrib/file/src/file_opts.h
  stable/8/contrib/file/src/fsmagic.c
  stable/8/contrib/file/src/funcs.c
  stable/8/contrib/file/src/is_tar.c
  stable/8/contrib/file/src/magic.c
  stable/8/contrib/file/src/magic.h
  stable/8/contrib/file/src/magic.h.in
  stable/8/contrib/file/src/print.c
  stable/8/contrib/file/src/readcdf.c
  stable/8/contrib/file/src/readelf.c
  stable/8/contrib/file/src/softmagic.c
  stable/8/contrib/file/tests/Makefile.in
  stable/8/lib/libmagic/config.h
Directory Properties:
  stable/8/contrib/file/   (props changed)
  stable/8/lib/libmagic/   (props changed)

Modified: stable/8/contrib/file/ChangeLog
==
--- stable/8/contrib/file/ChangeLog Wed Jun 24 23:04:07 2015
(r284781)
+++ stable/8/contrib/file/ChangeLog Wed Jun 24 23:05:17 2015
(r284782)
@@ -1,3 +1,56 @@
+2015-06-11   8:52  Christos Zoulas 
+
+   * redo long option encoding to fix off-by-one in 5.23
+
+2015-06-10  13:50  Christos Zoulas 
+
+   * release 5.23
+
+2015-06-09  16:10  Christos Zoulas 
+   
+   * Fix issue with regex range for magic with offset
+   * Always return true from mget with USE (success to mget not match
+ indication). Fixes mime evaluation after USE magic
+   * PR/459: Don't insert magic entries to the list if there are parsing
+ errors for them.
+
+2015-06-03  16:00  Christos Zoulas 
+
+   * PR/455: Add utf-7 encoding
+
+2015-06-03  14:30  Christos Zoulas 
+
+   * PR/455: Implement -Z, look inside, but don't report on compression
+   * PR/454: Fix allocation error on bad magic.
+
+2015-05-29  10:30  Christos Zoulas 
+
+   * handle MAGIC_CONTINUE everywhere, not just in softmagic
+
+2015-05-21  14:30  Christos Zoulas 
+
+   * don't print descriptions for NAME types when mime.
+
+2015-04-09  15:59  Christos Zoulas 
+
+   * Add --extension to list the known extensions for this file type
+ Idea by Andrew J Roazen
+
+2015-02-14  12:23  Christos Zoulas 
+
+   * Bump file search buffer size to 1M.
+
+2015-01-09  14:35  Christos Zoulas 
+
+   * Fix multiple issues with date formats reported by

svn commit: r284780 - head/release/tools

2015-06-24 Thread Glen Barber
Author: gjb
Date: Wed Jun 24 21:30:35 2015
New Revision: 284780
URL: https://svnweb.freebsd.org/changeset/base/284780

Log:
  Ensure ASSUME_ALWAYS_YES is set when deleting pkg(8) from the
  DESTDIR, otherwise it can get stuck in ttyin.
  
  This means no 10-STABLE EC2 images this week.
  
  MFC after:3 days
  Sponsored by: The FreeBSD Foundation

Modified:
  head/release/tools/ec2.conf

Modified: head/release/tools/ec2.conf
==
--- head/release/tools/ec2.conf Wed Jun 24 20:51:48 2015(r284779)
+++ head/release/tools/ec2.conf Wed Jun 24 21:30:35 2015(r284780)
@@ -32,7 +32,7 @@ vm_extra_pre_umount() {
# catalogue and install or update pkg when the instance first
# launches, so these files would just be replaced anyway; removing
# them from the image allows it to boot faster.
-   pkg -c ${DESTDIR} delete -f -y pkg
+   env ASSUME_ALWAYS_YES=yes pkg -c ${DESTDIR} delete -f -y pkg
rm ${DESTDIR}/var/db/pkg/repo-*.sqlite
 
# The size of the EC2 root disk can be configured at instance launch
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284779 - head/bin/sh

2015-06-24 Thread Jilles Tjoelker
Author: jilles
Date: Wed Jun 24 20:51:48 2015
New Revision: 284779
URL: https://svnweb.freebsd.org/changeset/base/284779

Log:
  sh: Fix some arithmetic undefined behaviour.
  
  Fix shifts of possibly negative numbers found with ubsan and avoid signed
  integer overflow when hashing an extremely long command name.
  
  MFC after:1 week

Modified:
  head/bin/sh/alias.c
  head/bin/sh/exec.c

Modified: head/bin/sh/alias.c
==
--- head/bin/sh/alias.c Wed Jun 24 19:58:14 2015(r284778)
+++ head/bin/sh/alias.c Wed Jun 24 20:51:48 2015(r284779)
@@ -248,7 +248,7 @@ hashalias(const char *p)
 {
unsigned int hashval;
 
-   hashval = *p << 4;
+   hashval = (unsigned char)*p << 4;
while (*p)
hashval+= *p++;
return &atab[hashval % ATABSIZE];

Modified: head/bin/sh/exec.c
==
--- head/bin/sh/exec.c  Wed Jun 24 19:58:14 2015(r284778)
+++ head/bin/sh/exec.c  Wed Jun 24 20:51:48 2015(r284779)
@@ -522,17 +522,16 @@ static struct tblentry **lastcmdentry;
 static struct tblentry *
 cmdlookup(const char *name, int add)
 {
-   int hashval;
+   unsigned int hashval;
const char *p;
struct tblentry *cmdp;
struct tblentry **pp;
size_t len;
 
p = name;
-   hashval = *p << 4;
+   hashval = (unsigned char)*p << 4;
while (*p)
hashval += *p++;
-   hashval &= 0x7FFF;
pp = &cmdtable[hashval % CMDTABLESIZE];
for (cmdp = *pp ; cmdp ; cmdp = cmdp->next) {
if (equal(cmdp->cmdname, name))
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


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

2015-06-24 Thread Xin LI
Author: delphij
Date: Wed Jun 24 19:58:14 2015
New Revision: 284778
URL: https://svnweb.freebsd.org/changeset/base/284778

Log:
  MFC r284237,284277:
  
  file 5.23.
  
  Relnotes: yes

Added:
  stable/10/contrib/file/magic/Magdir/cbor
 - copied unchanged from r284237, head/contrib/file/magic/Magdir/cbor
  stable/10/contrib/file/magic/Magdir/nasa
 - copied unchanged from r284237, head/contrib/file/magic/Magdir/nasa
  stable/10/contrib/file/src/gmtime_r.c
 - copied unchanged from r284237, head/contrib/file/src/gmtime_r.c
  stable/10/contrib/file/src/localtime_r.c
 - copied unchanged from r284237, head/contrib/file/src/localtime_r.c
Modified:
  stable/10/contrib/file/ChangeLog
  stable/10/contrib/file/Makefile.in
  stable/10/contrib/file/TODO
  stable/10/contrib/file/aclocal.m4
  stable/10/contrib/file/compile
  stable/10/contrib/file/config.h.in
  stable/10/contrib/file/configure
  stable/10/contrib/file/configure.ac
  stable/10/contrib/file/depcomp
  stable/10/contrib/file/doc/Makefile.in
  stable/10/contrib/file/doc/file.man
  stable/10/contrib/file/doc/libmagic.man
  stable/10/contrib/file/ltmain.sh
  stable/10/contrib/file/magic/Magdir/android
  stable/10/contrib/file/magic/Magdir/apple
  stable/10/contrib/file/magic/Magdir/archive
  stable/10/contrib/file/magic/Magdir/audio
  stable/10/contrib/file/magic/Magdir/cafebabe
  stable/10/contrib/file/magic/Magdir/commands
  stable/10/contrib/file/magic/Magdir/compress
  stable/10/contrib/file/magic/Magdir/console
  stable/10/contrib/file/magic/Magdir/dyadic
  stable/10/contrib/file/magic/Magdir/filesystems
  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/linux
  stable/10/contrib/file/magic/Magdir/mach
  stable/10/contrib/file/magic/Magdir/mathematica
  stable/10/contrib/file/magic/Magdir/misctools
  stable/10/contrib/file/magic/Magdir/modem
  stable/10/contrib/file/magic/Magdir/mozilla
  stable/10/contrib/file/magic/Magdir/os2
  stable/10/contrib/file/magic/Magdir/pdf
  stable/10/contrib/file/magic/Magdir/perl
  stable/10/contrib/file/magic/Magdir/riff
  stable/10/contrib/file/magic/Magdir/sereal
  stable/10/contrib/file/magic/Magdir/sgml
  stable/10/contrib/file/magic/Magdir/varied.script
  stable/10/contrib/file/magic/Magdir/vorbis
  stable/10/contrib/file/magic/Makefile.am
  stable/10/contrib/file/magic/Makefile.in
  stable/10/contrib/file/missing
  stable/10/contrib/file/python/Makefile.in
  stable/10/contrib/file/src/Makefile.in
  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/encoding.c
  stable/10/contrib/file/src/file.c
  stable/10/contrib/file/src/file.h
  stable/10/contrib/file/src/file_opts.h
  stable/10/contrib/file/src/fsmagic.c
  stable/10/contrib/file/src/funcs.c
  stable/10/contrib/file/src/is_tar.c
  stable/10/contrib/file/src/magic.c
  stable/10/contrib/file/src/magic.h
  stable/10/contrib/file/src/magic.h.in
  stable/10/contrib/file/src/print.c
  stable/10/contrib/file/src/readcdf.c
  stable/10/contrib/file/src/readelf.c
  stable/10/contrib/file/src/softmagic.c
  stable/10/contrib/file/tests/Makefile.in
  stable/10/lib/libmagic/config.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/file/ChangeLog
==
--- stable/10/contrib/file/ChangeLogWed Jun 24 19:16:41 2015
(r284777)
+++ stable/10/contrib/file/ChangeLogWed Jun 24 19:58:14 2015
(r284778)
@@ -1,3 +1,56 @@
+2015-06-11   8:52  Christos Zoulas 
+
+   * redo long option encoding to fix off-by-one in 5.23
+
+2015-06-10  13:50  Christos Zoulas 
+
+   * release 5.23
+
+2015-06-09  16:10  Christos Zoulas 
+   
+   * Fix issue with regex range for magic with offset
+   * Always return true from mget with USE (success to mget not match
+ indication). Fixes mime evaluation after USE magic
+   * PR/459: Don't insert magic entries to the list if there are parsing
+ errors for them.
+
+2015-06-03  16:00  Christos Zoulas 
+
+   * PR/455: Add utf-7 encoding
+
+2015-06-03  14:30  Christos Zoulas 
+
+   * PR/455: Implement -Z, look inside, but don't report on compression
+   * PR/454: Fix allocation error on bad magic.
+
+2015-05-29  10:30  Christos Zoulas 
+
+   * handle MAGIC_CONTINUE everywhere, not just in softmagic
+
+2015-05-21  14:30  Christos Zoulas 
+
+   * don't print descriptions for NAME types when mime.
+
+2015-04-09  15:59  Christos Zoulas 
+
+   * Add --extension to list the known extensions for this file type
+ Idea by Andrew J Roazen
+
+2015-02-14  12:23  Christos Zoulas 
+
+   * Bump file search buffer size to 1M.
+
+2015-01-09  14:35  Christos Zoulas 
+
+   * Fix multipl

svn commit: r284777 - in head: sbin/pfctl share/man/man4 sys/conf sys/net/altq sys/netpfil/pf

2015-06-24 Thread Ermal Luçi
Author: eri
Date: Wed Jun 24 19:16:41 2015
New Revision: 284777
URL: https://svnweb.freebsd.org/changeset/base/284777

Log:
  ALTQ FAIRQ discipline import from DragonFLY
  
  Differential Revision:  https://reviews.freebsd.org/D2847
  Reviewed by:glebius, wblock(manpage)
  Approved by:gnn(mentor)
  Obtained from:  pfSense
  Sponsored by:   Netgate

Added:
  head/sys/net/altq/altq_fairq.c   (contents, props changed)
  head/sys/net/altq/altq_fairq.h   (contents, props changed)
Modified:
  head/sbin/pfctl/parse.y
  head/sbin/pfctl/pfctl_altq.c
  head/sbin/pfctl/pfctl_parser.h
  head/sbin/pfctl/pfctl_qstats.c
  head/share/man/man4/altq.4
  head/sys/conf/NOTES
  head/sys/conf/files
  head/sys/conf/options
  head/sys/net/altq/altq.h
  head/sys/net/altq/altq_subr.c
  head/sys/net/altq/altq_var.h
  head/sys/netpfil/pf/pf.c
  head/sys/netpfil/pf/pf_altq.h
  head/sys/netpfil/pf/pf_mtag.h

Modified: head/sbin/pfctl/parse.y
==
--- head/sbin/pfctl/parse.y Wed Jun 24 19:06:54 2015(r284776)
+++ head/sbin/pfctl/parse.y Wed Jun 24 19:16:41 2015(r284777)
@@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -300,6 +301,7 @@ struct pool_opts {
 
 
 struct node_hfsc_opts   hfsc_opts;
+struct node_fairq_opts  fairq_opts;
 struct node_state_opt  *keep_state_defaults = NULL;
 
 int disallow_table(struct node_host *, const char *);
@@ -422,6 +424,7 @@ typedef struct {
struct table_optstable_opts;
struct pool_opts pool_opts;
struct node_hfsc_optshfsc_opts;
+   struct node_fairq_opts   fairq_opts;
} v;
int lineno;
 } YYSTYPE;
@@ -446,8 +449,8 @@ int parseport(char *, struct range *r, i
 %token REQUIREORDER SYNPROXY FINGERPRINTS NOSYNC DEBUG SKIP HOSTID
 %token ANTISPOOF FOR INCLUDE
 %token BITMASK RANDOM SOURCEHASH ROUNDROBIN STATICPORT PROBABILITY
-%token ALTQ CBQ PRIQ HFSC BANDWIDTH TBRSIZE LINKSHARE REALTIME UPPERLIMIT
-%token QUEUE PRIORITY QLIMIT RTABLE
+%token ALTQ CBQ PRIQ HFSC FAIRQ BANDWIDTH TBRSIZE LINKSHARE REALTIME UPPERLIMIT
+%token QUEUE PRIORITY QLIMIT HOGS BUCKETS RTABLE
 %token LOAD RULESET_OPTIMIZATION
 %token STICKYADDRESS MAXSRCSTATES MAXSRCNODES SOURCETRACK GLOBAL RULE
 %token MAXSRCCONN MAXSRCCONNRATE OVERLOAD FLUSH SLOPPY
@@ -495,6 +498,7 @@ int parseport(char *, struct range *r, i
 %typecbqflags_list cbqflags_item
 %typepriqflags_list priqflags_item
 %type hfscopts_list hfscopts_item hfsc_opts
+%typefairqopts_list fairqopts_item fairq_opts
 %type  bandwidth
 %type   filter_opts filter_opt filter_opts_l
 %typeantispoof_opts antispoof_opt antispoof_opts_l
@@ -1659,6 +1663,15 @@ scheduler: CBQ   {
$$.qtype = ALTQT_HFSC;
$$.data.hfsc_opts = $3;
}
+   | FAIRQ {
+   $$.qtype = ALTQT_FAIRQ;
+   bzero(&$$.data.fairq_opts,
+   sizeof(struct node_fairq_opts));
+   }
+   | FAIRQ '(' fairq_opts ')'  {
+   $$.qtype = ALTQT_FAIRQ;
+   $$.data.fairq_opts = $3;
+   }
;
 
 cbqflags_list  : cbqflags_item { $$ |= $1; }
@@ -1807,6 +1820,61 @@ hfscopts_item: LINKSHARE bandwidth   
{
}
;
 
+fairq_opts :   {
+   bzero(&fairq_opts,
+   sizeof(struct node_fairq_opts));
+   }
+   fairqopts_list  {
+   $$ = fairq_opts;
+   }
+   ;
+
+fairqopts_list : fairqopts_item
+   | fairqopts_list comma fairqopts_item
+   ;
+
+fairqopts_item : LINKSHARE bandwidth   {
+   if (fairq_opts.linkshare.used) {
+   yyerror("linkshare already specified");
+   YYERROR;
+   }
+   fairq_opts.linkshare.m2 = $2;
+   fairq_opts.linkshare.used = 1;
+   }
+   | LINKSHARE '(' bandwidth number bandwidth ')'  {
+   if (fairq_opts.linkshare.used) {
+   yyerror("linkshare already specified");
+   YYERROR;
+   }
+   fairq_opts.linkshare.m1 = $3;
+   fairq_opts.linkshare.d = $4;
+   fairq_opts.linkshare.m2 = $5;
+   fairq_opts.linkshare.used = 1;
+   }
+   | HOGS bandwidth {
+ 

svn commit: r284776 - stable/10/sys/netinet

2015-06-24 Thread Ermal Luçi
Author: eri
Date: Wed Jun 24 19:06:54 2015
New Revision: 284776
URL: https://svnweb.freebsd.org/changeset/base/284776

Log:
  MFC r284512: Properly handle locking on the ARP protocol request sending.

Modified:
  stable/10/sys/netinet/if_ether.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/netinet/if_ether.c
==
--- stable/10/sys/netinet/if_ether.cWed Jun 24 18:58:42 2015
(r284775)
+++ stable/10/sys/netinet/if_ether.cWed Jun 24 19:06:54 2015
(r284776)
@@ -365,6 +365,7 @@ retry:
if ((la->la_flags & LLE_VALID) &&
((la->la_flags & LLE_STATIC) || la->la_expire > time_uptime)) {
bcopy(&la->ll_addr, desten, ifp->if_addrlen);
+   renew = 0;
/*
 * If entry has an expiry time and it is approaching,
 * see if we need to send an ARP request within this
@@ -372,13 +373,21 @@ retry:
 */
if (!(la->la_flags & LLE_STATIC) &&
time_uptime + la->la_preempt > la->la_expire) {
-   arprequest(ifp, NULL, &SIN(dst)->sin_addr, NULL);
+   renew = 1;
la->la_preempt--;
}
 
*lle = la;
-   error = 0;
-   goto done;
+
+   if (flags & LLE_EXCLUSIVE)
+   LLE_WUNLOCK(la);
+   else
+   LLE_RUNLOCK(la);
+
+   if (renew == 1)
+   arprequest(ifp, NULL, &SIN(dst)->sin_addr, NULL);
+
+   return (0);
}
 
if (la->la_flags & LLE_STATIC) {   /* should not happen! */
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284775 - stable/10/etc/etc.arm

2015-06-24 Thread Glen Barber
Author: gjb
Date: Wed Jun 24 18:58:42 2015
New Revision: 284775
URL: https://svnweb.freebsd.org/changeset/base/284775

Log:
  MFC r284683:
   Enable ttyu1, ttyu2, ttyu3 for arm installations.
  
   This should make all consoles available, whether it
   is VGA, HDMI, serial, or JTAG, but more importantly
   enables all consoles when ttyu0 is not predictable.
   For example, the Pandaboard ES apparently has three
   consoles available, but the DB9/RS232 serial port is
   ttyu2, so not available by default after the system
   boots.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/10/etc/etc.arm/ttys
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/etc/etc.arm/ttys
==
--- stable/10/etc/etc.arm/ttys  Wed Jun 24 18:56:28 2015(r284774)
+++ stable/10/etc/etc.arm/ttys  Wed Jun 24 18:58:42 2015(r284775)
@@ -42,8 +42,8 @@ ttyv7 "/usr/libexec/getty Pc" xterm   off
 # Serial terminals
 # The 'dialup' keyword identifies dialin lines to login, fingerd etc.
 ttyu0  "/usr/libexec/getty 3wire"  vt100   onifconsole  secure
-ttyu1  "/usr/libexec/getty std.9600"   dialup  off secure
-ttyu2  "/usr/libexec/getty std.9600"   dialup  off secure
-ttyu3  "/usr/libexec/getty std.9600"   dialup  off secure
+ttyu1  "/usr/libexec/getty 3wire"  vt100   onifconsole  secure
+ttyu2  "/usr/libexec/getty 3wire"  vt100   onifconsole  secure
+ttyu3  "/usr/libexec/getty 3wire"  vt100   onifconsole  secure
 # Dumb console
 dcons  "/usr/libexec/getty std.9600"   vt100   off secure
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284774 - in stable/10/release: . tools

2015-06-24 Thread Glen Barber
Author: gjb
Date: Wed Jun 24 18:56:28 2015
New Revision: 284774
URL: https://svnweb.freebsd.org/changeset/base/284774

Log:
  MFC r284660, r284676:
  
   r284660:
Remove the Azure-local vm_extra_create_disk(), since we no longer
need qemu-img to convert the final VHD image to an Azure-compatible
format.
  
Although the waagent utility is installed from ports, create the
symlink to /usr/sbin, pending investigation on where this is
hard-coded, so it can be reported upstream.
  
   r284676:
Append the hour and minute to the snapshot suffix for EC2
AMIs and Azure VM images.  This is particularly helpful for
testing to avoid name collisions, but also useful for cases
where a necessary rebuild is done before the date changes.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/10/release/Makefile.azure
  stable/10/release/Makefile.ec2
  stable/10/release/tools/azure.conf
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/release/Makefile.azure
==
--- stable/10/release/Makefile.azureWed Jun 24 18:40:34 2015
(r284773)
+++ stable/10/release/Makefile.azureWed Jun 24 18:56:28 2015
(r284774)
@@ -17,7 +17,7 @@ AZURE${VAR}!= grep -E ^AZURE${VAR} ${AZU
 .endif
 
 .if ${BRANCH} == "STABLE" || ${BRANCH} == "CURRENT"
-SNAPSHOT_DATE!=date +-%Y-%m-%d
+SNAPSHOT_DATE!=date +-%Y-%m-%d-%H:%M
 .endif
 
 AZURE_TARGET:= ${OSRELEASE}${SNAPSHOT_DATE}.vhd

Modified: stable/10/release/Makefile.ec2
==
--- stable/10/release/Makefile.ec2  Wed Jun 24 18:40:34 2015
(r284773)
+++ stable/10/release/Makefile.ec2  Wed Jun 24 18:56:28 2015
(r284774)
@@ -6,7 +6,7 @@
 #
 
 .if ${BRANCH} == "CURRENT" || ${BRANCH} == "STABLE"
-AMINAMESUFFIX!=date +-%Y-%m-%d
+AMINAMESUFFIX!=date +-%Y-%m-%d-%H:%M
 .endif
 .if defined(EC2PUBLIC)
 PUBLISH=   --public

Modified: stable/10/release/tools/azure.conf
==
--- stable/10/release/tools/azure.conf  Wed Jun 24 18:40:34 2015
(r284773)
+++ stable/10/release/tools/azure.conf  Wed Jun 24 18:56:28 2015
(r284774)
@@ -14,6 +14,7 @@ export VM_EXTRA_PACKAGES="sysutils/azure
 export VM_RC_LIST=
 
 vm_extra_pre_umount() {
+   chroot ${DESTDIR} ln -s /usr/local/sbin/waagent /usr/sbin/waagent
chroot ${DESTDIR} /usr/local/sbin/waagent -verbose -install
yes | chroot ${DESTDIR} /usr/local/sbin/waagent -deprovision
echo 'sshd_enable="YES"' >> ${DESTDIR}/etc/rc.conf
@@ -26,17 +27,3 @@ vm_extra_pre_umount() {
 
return 0
 }
-
-vm_extra_create_disk() {
-   if [ ! -x "/usr/local/bin/qemu-img" ]; then
-   env ASSUME_ALWAYS_YES=yes pkg install -y emulators/qemu-devel
-   fi
-
-   mv ${VMIMAGE} ${VMIMAGE}.raw
-   size=$(qemu-img info -f raw --output json ${VMIMAGE}.raw | awk 
'/virtual-size/ {print $2}' | tr -d ',')
-   size=$(( ( ${size} / ( 1024 * 1024 ) + 1 ) * ( 1024 * 1024 ) ))
-   qemu-img resize ${VMIMAGE}.raw ${size}
-   qemu-img convert -f raw -o subformat=fixed -O vpc ${VMIMAGE}.raw 
${VMIMAGE}
-
-   return 0
-}
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r284773 - stable/10/usr.bin/mkimg

2015-06-24 Thread Glen Barber
On Wed, Jun 24, 2015 at 06:40:35PM +, Marcel Moolenaar wrote:
> Author: marcel
> Date: Wed Jun 24 18:40:34 2015
> New Revision: 284773
> URL: https://svnweb.freebsd.org/changeset/base/284773
> 
> Log:
>   MFC r284269, r284270, r284655, r284656, r284658:
>   VHD fixes for Microsoft Azure:
>   1.  Round the image size to the VHD geometry and then round to a
>   multiple of 1MB.
>   2.  Change the creator OS from "FBSD" to "Wi2k". It matters...
>   3.  Bump the VHD tool version and the mkimg version.
>   

Thank you!

Glen



pgp3zNnct05ks.pgp
Description: PGP signature


svn commit: r284773 - stable/10/usr.bin/mkimg

2015-06-24 Thread Marcel Moolenaar
Author: marcel
Date: Wed Jun 24 18:40:34 2015
New Revision: 284773
URL: https://svnweb.freebsd.org/changeset/base/284773

Log:
  MFC r284269, r284270, r284655, r284656, r284658:
  VHD fixes for Microsoft Azure:
  1.  Round the image size to the VHD geometry and then round to a
  multiple of 1MB.
  2.  Change the creator OS from "FBSD" to "Wi2k". It matters...
  3.  Bump the VHD tool version and the mkimg version.
  
  Approved by:  re (gjb)

Modified:
  stable/10/usr.bin/mkimg/Makefile
  stable/10/usr.bin/mkimg/format.c
  stable/10/usr.bin/mkimg/vhd.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/mkimg/Makefile
==
--- stable/10/usr.bin/mkimg/MakefileWed Jun 24 18:29:34 2015
(r284772)
+++ stable/10/usr.bin/mkimg/MakefileWed Jun 24 18:40:34 2015
(r284773)
@@ -4,7 +4,7 @@ PROG=   mkimg
 SRCS=  format.c image.c mkimg.c scheme.c
 MAN=   mkimg.1
 
-MKIMG_VERSION=20150222
+MKIMG_VERSION=20150620
 mkimg.o: Makefile
 
 CFLAGS+=-DMKIMG_VERSION=${MKIMG_VERSION}

Modified: stable/10/usr.bin/mkimg/format.c
==
--- stable/10/usr.bin/mkimg/format.cWed Jun 24 18:29:34 2015
(r284772)
+++ stable/10/usr.bin/mkimg/format.cWed Jun 24 18:40:34 2015
(r284773)
@@ -78,14 +78,10 @@ format_selected(void)
 int
 format_write(int fd)
 {
-   lba_t size;
int error;
 
if (format == NULL)
return (ENOSYS);
-   size = image_get_size();
-   error = format->resize(size);
-   if (!error)
-   error = format->write(fd);
+   error = format->write(fd);
return (error);
 }

Modified: stable/10/usr.bin/mkimg/vhd.c
==
--- stable/10/usr.bin/mkimg/vhd.c   Wed Jun 24 18:29:34 2015
(r284772)
+++ stable/10/usr.bin/mkimg/vhd.c   Wed Jun 24 18:40:34 2015
(r284773)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2014 Marcel Moolenaar
+ * Copyright (c) 2014, 2015 Marcel Moolenaar
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -62,6 +62,12 @@ __FBSDID("$FreeBSD$");
 #defineVHD_SECTOR_SIZE 512
 #defineVHD_BLOCK_SIZE  (4096 * VHD_SECTOR_SIZE)/* 2MB blocks */
 
+struct vhd_geom {
+   uint16_tcylinders;
+   uint8_t heads;
+   uint8_t sectors;
+};
+
 struct vhd_footer {
uint64_tcookie;
 #defineVHD_FOOTER_COOKIE   0x636f6e6563746978
@@ -75,14 +81,12 @@ struct vhd_footer {
uint32_tcreator_tool;
 #defineVHD_CREATOR_TOOL0x2a696d67  /* FreeBSD mkimg */
uint32_tcreator_version;
-#defineVHD_CREATOR_VERSION 0x0001
+#defineVHD_CREATOR_VERSION 0x0002
uint32_tcreator_os;
-#defineVHD_CREATOR_OS  0x46425344
+#defineVHD_CREATOR_OS  0x5769326b  /* Wi2k */
uint64_toriginal_size;
uint64_tcurrent_size;
-   uint16_tcylinders;
-   uint8_t heads;
-   uint8_t sectors;
+   struct vhd_geom geometry;
uint32_tdisk_type;
 #defineVHD_DISK_TYPE_FIXED 2
 #defineVHD_DISK_TYPE_DYNAMIC   3
@@ -111,46 +115,48 @@ vhd_checksum(void *buf, size_t sz)
 }
 
 static void
-vhd_geometry(struct vhd_footer *footer, uint64_t image_size)
+vhd_geometry(uint64_t image_size, struct vhd_geom *geom)
 {
lba_t imgsz;
long cth;
 
+   imgsz = image_size / VHD_SECTOR_SIZE;
+
/* Respect command line options if possible. */
if (nheads > 1 && nheads < 256 &&
nsecs > 1 && nsecs < 256 &&
ncyls < 65536) {
-   be16enc(&footer->cylinders, ncyls);
-   footer->heads = nheads;
-   footer->sectors = nsecs;
+   geom->cylinders = (ncyls != 0) ? ncyls :
+   imgsz / (nheads * nsecs);
+   geom->heads = nheads;
+   geom->sectors = nsecs;
return;
}
 
-   imgsz = image_size / VHD_SECTOR_SIZE;
if (imgsz > 65536 * 16 * 255)
imgsz = 65536 * 16 * 255;
if (imgsz >= 65535 * 16 * 63) {
-   be16enc(&footer->cylinders, imgsz / (16 * 255));
-   footer->heads = 16;
-   footer->sectors = 255;
+   geom->cylinders = imgsz / (16 * 255);
+   geom->heads = 16;
+   geom->sectors = 255;
return;
}
-   footer->sectors = 17;
+   geom->sectors = 17;
cth = imgsz / 17;
-   footer->heads = (cth + 1023) / 1024;
-   if (footer->heads < 4)
-   footer->heads = 4;
-   if (cth >= (footer->heads * 1024) || footer->heads > 16) {
-   footer->heads = 16;

svn commit: r284772 - head/lib/msun/arm

2015-06-24 Thread Ian Lepore
Author: ian
Date: Wed Jun 24 18:29:34 2015
New Revision: 284772
URL: https://svnweb.freebsd.org/changeset/base/284772

Log:
  Fix compilation when the armv6 world is being compiled without hw floating
  point support.  The fenv-vfp.c file overrides -mfloat-abi so it can use
  floating point instructions if it detects support at runtime.  Make it also
  override -mfpu in case the user has set -mfpu=none.

Modified:
  head/lib/msun/arm/Makefile.inc

Modified: head/lib/msun/arm/Makefile.inc
==
--- head/lib/msun/arm/Makefile.inc  Wed Jun 24 18:26:04 2015
(r284771)
+++ head/lib/msun/arm/Makefile.inc  Wed Jun 24 18:29:34 2015
(r284772)
@@ -7,6 +7,6 @@ SYM_MAPS += ${.CURDIR}/arm/Symbol.map
 ARCH_SRCS = fenv-softfp.c fenv-vfp.c
 .endif
 
-CFLAGS.fenv-vfp.c= -mfloat-abi=softfp
+CFLAGS.fenv-vfp.c= -mfpu=vfp -mfloat-abi=softfp
 CFLAGS+=   ${CFLAGS.${.IMPSRC:T}}
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


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

2015-06-24 Thread Ian Lepore
Author: ian
Date: Wed Jun 24 18:26:04 2015
New Revision: 284771
URL: https://svnweb.freebsd.org/changeset/base/284771

Log:
  Fix a misplaced #endif (maybe a mismerge?).  Emitting the symbol for CURPMAP
  is not dependent on whether VFP (hardware floating point) is enabled.

Modified:
  head/sys/arm/arm/genassym.c

Modified: head/sys/arm/arm/genassym.c
==
--- head/sys/arm/arm/genassym.c Wed Jun 24 16:19:21 2015(r284770)
+++ head/sys/arm/arm/genassym.c Wed Jun 24 18:26:04 2015(r284771)
@@ -134,9 +134,9 @@ ASSYM(ARM_RAS_END, ARM_RAS_END);
 
 #ifdef VFP
 ASSYM(PCB_VFPSTATE, offsetof(struct pcb, pcb_vfpstate));
+#endif
 
 ASSYM(PC_CURPMAP, offsetof(struct pcpu, pc_curpmap));
-#endif
 
 ASSYM(PAGE_SIZE, PAGE_SIZE);
 ASSYM(PMAP_DOMAIN_KERNEL, PMAP_DOMAIN_KERNEL);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284769 - in head/lib/libc/aarch64: . gen

2015-06-24 Thread Andrew Turner
Author: andrew
Date: Wed Jun 24 16:18:58 2015
New Revision: 284769
URL: https://svnweb.freebsd.org/changeset/base/284769

Log:
  Implement fpsetmask. Some third-party software makes use of it, for example
  perl.
  
  Obtained from:ABT Systems Ltd
  Sponsored by: The FreeBSD Foundation

Added:
  head/lib/libc/aarch64/gen/fpsetmask.c   (contents, props changed)
Modified:
  head/lib/libc/aarch64/Symbol.map
  head/lib/libc/aarch64/gen/Makefile.inc

Modified: head/lib/libc/aarch64/Symbol.map
==
--- head/lib/libc/aarch64/Symbol.mapWed Jun 24 16:15:32 2015
(r284768)
+++ head/lib/libc/aarch64/Symbol.mapWed Jun 24 16:18:58 2015
(r284769)
@@ -14,6 +14,7 @@ FBSD_1.0 {
_setjmp;
_longjmp;
fabs;
+   fpsetmask;
setjmp;
longjmp;
sigsetjmp;

Modified: head/lib/libc/aarch64/gen/Makefile.inc
==
--- head/lib/libc/aarch64/gen/Makefile.inc  Wed Jun 24 16:15:32 2015
(r284768)
+++ head/lib/libc/aarch64/gen/Makefile.inc  Wed Jun 24 16:18:58 2015
(r284769)
@@ -2,6 +2,7 @@
 
 SRCS+= fabs.S \
flt_rounds.c \
+   fpsetmask.c \
ldexp.c \
_setjmp.S \
_set_tp.c \

Added: head/lib/libc/aarch64/gen/fpsetmask.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/libc/aarch64/gen/fpsetmask.c   Wed Jun 24 16:18:58 2015
(r284769)
@@ -0,0 +1,52 @@
+/*-
+ * Copyright (c) 2015 The FreeBSD Foundation
+ * All rights reserved.
+ *
+ * This software was developed by Andrew Turner under
+ * sponsorship from the FreeBSD Foundation.
+ *
+ * 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 
+
+#define FP_X_MASK  (FP_X_INV | FP_X_DZ | FP_X_OFL | FP_X_UFL | FP_X_IMP)
+
+fp_except_t
+fpsetmask(fp_except_t mask)
+{
+   uint64_t old, new;
+
+   mask &= FP_X_MASK;
+
+   /* Read the current mask */
+   __asm __volatile("mrs %0, fpcr" : "=&r"(old));
+   new = old & ~FP_X_MASK;
+   new |= mask;
+   __asm __volatile("msr fpcr, %0" :: "r"(new));
+
+   return ((fp_except_t)old);
+}
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284768 - head/lib/libc/aarch64/gen

2015-06-24 Thread Andrew Turner
Author: andrew
Date: Wed Jun 24 16:15:32 2015
New Revision: 284768
URL: https://svnweb.freebsd.org/changeset/base/284768

Log:
  Set the alignment of the setjmp magic values correctly. The alignment needs
  to be before the lavel, otherwise an extra word may be added between the
  label and the data.
  
  Obtained from:ABT Systems Ltd
  Sponsored by: The FReeBSD Foundation

Modified:
  head/lib/libc/aarch64/gen/_setjmp.S
  head/lib/libc/aarch64/gen/setjmp.S
  head/lib/libc/aarch64/gen/sigsetjmp.S

Modified: head/lib/libc/aarch64/gen/_setjmp.S
==
--- head/lib/libc/aarch64/gen/_setjmp.S Wed Jun 24 15:53:52 2015
(r284767)
+++ head/lib/libc/aarch64/gen/_setjmp.S Wed Jun 24 16:15:32 2015
(r284768)
@@ -59,8 +59,8 @@ ENTRY(_setjmp)
/* Return value */
mov x0, #0
ret
-.Lmagic:
.align  3
+.Lmagic:
.quad   _JB_MAGIC__SETJMP
 END(_setjmp)
 

Modified: head/lib/libc/aarch64/gen/setjmp.S
==
--- head/lib/libc/aarch64/gen/setjmp.S  Wed Jun 24 15:53:52 2015
(r284767)
+++ head/lib/libc/aarch64/gen/setjmp.S  Wed Jun 24 16:15:32 2015
(r284768)
@@ -69,8 +69,8 @@ ENTRY(setjmp)
/* Return value */
mov x0, #0
ret
-.Lmagic:
.align  3
+.Lmagic:
.quad   _JB_MAGIC_SETJMP
 END(setjmp)
 

Modified: head/lib/libc/aarch64/gen/sigsetjmp.S
==
--- head/lib/libc/aarch64/gen/sigsetjmp.S   Wed Jun 24 15:53:52 2015
(r284767)
+++ head/lib/libc/aarch64/gen/sigsetjmp.S   Wed Jun 24 16:15:32 2015
(r284768)
@@ -47,7 +47,7 @@ ENTRY(siglongjmp)
cmp x2, x3
b.eq_C_LABEL(_longjmp)
b   _C_LABEL(longjmp)
-.Lmagic:
.align  3
+.Lmagic:
.quad   _JB_MAGIC__SETJMP
 END(siglongjmp)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284767 - in head/sys: conf modules modules/ixv

2015-06-24 Thread Eric Joyner
Author: erj
Date: Wed Jun 24 15:53:52 2015
New Revision: 284767
URL: https://svnweb.freebsd.org/changeset/base/284767

Log:
  Several build changes for ix and ixv:
  
  - Allow ix and ixv to be built seperately.
  - Re-enable building ix for i386 and amd64 archs
  - Fix ixv Makefile.
  
  Approved by: jfv (mentor)

Modified:
  head/sys/conf/files
  head/sys/modules/Makefile
  head/sys/modules/ixv/Makefile

Modified: head/sys/conf/files
==
--- head/sys/conf/files Wed Jun 24 15:52:26 2015(r284766)
+++ head/sys/conf/files Wed Jun 24 15:53:52 2015(r284767)
@@ -1774,31 +1774,31 @@ dev/ixgbe/if_ix.c   optional ix inet \
compile-with "${NORMAL_C} -I$S/dev/ixgbe -DSMP"
 dev/ixgbe/if_ixv.c optional ixv inet \
compile-with "${NORMAL_C} -I$S/dev/ixgbe -DSMP"
-dev/ixgbe/ix_txrx.coptional ix ixv inet \
-   compile-with "${NORMAL_C} -I$S/dev/ixgbe -DSMP"
-dev/ixgbe/ixgbe_phy.c  optional ix ixv inet \
+dev/ixgbe/ix_txrx.coptional ix inet | ixv inet \
+   compile-with "${NORMAL_C} -I$S/dev/ixgbe"
+dev/ixgbe/ixgbe_phy.c  optional ix inet | ixv inet \
compile-with "${NORMAL_C} -I$S/dev/ixgbe"
-dev/ixgbe/ixgbe_api.c  optional ix ixv inet \
+dev/ixgbe/ixgbe_api.c  optional ix inet | ixv inet \
compile-with "${NORMAL_C} -I$S/dev/ixgbe"
-dev/ixgbe/ixgbe_common.c   optional ix ixv inet \
+dev/ixgbe/ixgbe_common.c   optional ix inet | ixv inet \
compile-with "${NORMAL_C} -I$S/dev/ixgbe"
-dev/ixgbe/ixgbe_mbx.c  optional ix ixv inet \
+dev/ixgbe/ixgbe_mbx.c  optional ix inet | ixv inet \
compile-with "${NORMAL_C} -I$S/dev/ixgbe"
-dev/ixgbe/ixgbe_vf.c   optional ix ixv inet \
+dev/ixgbe/ixgbe_vf.c   optional ix inet | ixv inet \
compile-with "${NORMAL_C} -I$S/dev/ixgbe"
-dev/ixgbe/ixgbe_82598.coptional ix ixv inet \
+dev/ixgbe/ixgbe_82598.coptional ix inet | ixv inet \
compile-with "${NORMAL_C} -I$S/dev/ixgbe"
-dev/ixgbe/ixgbe_82599.coptional ix ixv inet \
+dev/ixgbe/ixgbe_82599.coptional ix inet | ixv inet \
compile-with "${NORMAL_C} -I$S/dev/ixgbe"
-dev/ixgbe/ixgbe_x540.c optional ix ixv inet \
+dev/ixgbe/ixgbe_x540.c optional ix inet | ixv inet \
compile-with "${NORMAL_C} -I$S/dev/ixgbe"
-dev/ixgbe/ixgbe_x550.c optional ix ixv inet \
+dev/ixgbe/ixgbe_x550.c optional ix inet | ixv inet \
compile-with "${NORMAL_C} -I$S/dev/ixgbe"
-dev/ixgbe/ixgbe_dcb.c  optional ix ixv inet \
+dev/ixgbe/ixgbe_dcb.c  optional ix inet | ixv inet \
compile-with "${NORMAL_C} -I$S/dev/ixgbe"
-dev/ixgbe/ixgbe_dcb_82598.coptional ix ixv inet \
+dev/ixgbe/ixgbe_dcb_82598.coptional ix inet | ixv inet \
compile-with "${NORMAL_C} -I$S/dev/ixgbe"
-dev/ixgbe/ixgbe_dcb_82599.coptional ix ixv inet \
+dev/ixgbe/ixgbe_dcb_82599.coptional ix inet | ixv inet \
compile-with "${NORMAL_C} -I$S/dev/ixgbe"
 dev/jme/if_jme.c   optional jme pci
 dev/joy/joy.c  optional joy

Modified: head/sys/modules/Makefile
==
--- head/sys/modules/Makefile   Wed Jun 24 15:52:26 2015(r284766)
+++ head/sys/modules/Makefile   Wed Jun 24 15:53:52 2015(r284767)
@@ -174,9 +174,9 @@ SUBDIR= \
${_iwifw} \
${_iwn} \
${_iwnfw} \
-   ${_ixgb} \
${_ix} \
${_ixv} \
+   ${_ixgb} \
${_ixl} \
${_ixlv} \
jme \
@@ -512,6 +512,7 @@ _io=io
 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
 _ipoib= ipoib
 .endif
+_ix=   ix
 _ixv=  ixv
 _linprocfs=linprocfs
 _linsysfs= linsysfs

Modified: head/sys/modules/ixv/Makefile
==
--- head/sys/modules/ixv/Makefile   Wed Jun 24 15:52:26 2015
(r284766)
+++ head/sys/modules/ixv/Makefile   Wed Jun 24 15:53:52 2015
(r284767)
@@ -7,8 +7,9 @@ SRCS= device_if.h bus_if.h pci_if.h
 SRCS   += opt_inet.h opt_inet6.h opt_rss.h
 SRCS+= if_ixv.c ix_txrx.c
 # Shared source
-SRCS+= ixgbe_common.c ixgbe_api.c ixgbe_phy.c
-SRCS+= ixgbe_dcb.c ixgbe_mbx.c ixgbe_vf.c
+SRCS+= ixgbe_common.c ixgbe_api.c ixgbe_phy.c ixgbe_mbx.c ixgbe_vf.c
+SRCS+= ixgbe_dcb.c ixgbe_dcb_82598.c ixgbe_dcb_82599.c
+SRCS+= ixgbe_82598.c ixgbe_82599.c ixgbe_x540.c ixgbe_x550.c
 CFLAGS+= -I${.CURDIR}/../../dev/ixgbe -DSMP
 
 .include 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284766 - head/sys/kern

2015-06-24 Thread Sean Bruno
Author: sbruno
Date: Wed Jun 24 15:52:26 2015
New Revision: 284766
URL: https://svnweb.freebsd.org/changeset/base/284766

Log:
  At the suggestion of jhb, replace atomic_set/clear calls with use of
  exclusive locks in the enable/disable interpreter path.
  
  Tested with WITNESS/INVARIANTS on and off.
  
  Reviewed by:  sson davide

Modified:
  head/sys/kern/imgact_binmisc.c

Modified: head/sys/kern/imgact_binmisc.c
==
--- head/sys/kern/imgact_binmisc.c  Wed Jun 24 15:13:27 2015
(r284765)
+++ head/sys/kern/imgact_binmisc.c  Wed Jun 24 15:52:26 2015
(r284766)
@@ -308,14 +308,14 @@ imgact_binmisc_disable_entry(char *name)
 {
imgact_binmisc_entry_t *ibe;
 
-   sx_slock(&interp_list_sx);
+   sx_xlock(&interp_list_sx);
if ((ibe = imgact_binmisc_find_entry(name)) == NULL) {
-   sx_sunlock(&interp_list_sx);
+   sx_xunlock(&interp_list_sx);
return (ENOENT);
}
 
-   atomic_clear_32(&ibe->ibe_flags, IBF_ENABLED);
-   sx_sunlock(&interp_list_sx);
+   ibe->ibe_flags &= ~IBF_ENABLED;
+   sx_xunlock(&interp_list_sx);
 
return (0);
 }
@@ -329,14 +329,14 @@ imgact_binmisc_enable_entry(char *name)
 {
imgact_binmisc_entry_t *ibe;
 
-   sx_slock(&interp_list_sx);
+   sx_xlock(&interp_list_sx);
if ((ibe = imgact_binmisc_find_entry(name)) == NULL) {
-   sx_sunlock(&interp_list_sx);
+   sx_xunlock(&interp_list_sx);
return (ENOENT);
}
 
-   atomic_set_32(&ibe->ibe_flags, IBF_ENABLED);
-   sx_sunlock(&interp_list_sx);
+   ibe->ibe_flags |= IBF_ENABLED;
+   sx_xunlock(&interp_list_sx);
 
return (0);
 }
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


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

2015-06-24 Thread Alexander Motin
Author: mav
Date: Wed Jun 24 15:13:27 2015
New Revision: 284765
URL: https://svnweb.freebsd.org/changeset/base/284765

Log:
  Teach ctld about CTL's physical_port and virtual_port fields.
  
  This allows ctld to work with isp(4) virtual ports, specifying them as
  isp0/1, isp0/2, etc.  There are still problems on isp(4) layer with
  disabling those ports after enabling, but hopefully they can be fixed.
  
  MFC after:3 days
  Sponsored by: iXsystems, Inc.

Modified:
  head/usr.sbin/ctld/ctl.conf.5
  head/usr.sbin/ctld/kernel.c

Modified: head/usr.sbin/ctld/ctl.conf.5
==
--- head/usr.sbin/ctld/ctl.conf.5   Wed Jun 24 14:51:53 2015
(r284764)
+++ head/usr.sbin/ctld/ctl.conf.5   Wed Jun 24 15:13:27 2015
(r284765)
@@ -27,7 +27,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 19, 2015
+.Dd June 24, 2015
 .Dt CTL.CONF 5
 .Os
 .Sh NAME
@@ -324,7 +324,9 @@ Optional second argument specifies auth 
 to this specific portal group.
 If second argument is not specified, target auth group is used.
 .It Ic port Ar name
-Assign specified CTL port (such as "isp0") to the target.
+.It Ic port Ar name/pp
+.It Ic port Ar name/pp/vp
+Assign specified CTL port (such as "isp0" or "isp2/1") to the target.
 On startup ctld configures LUN mapping and enables all assigned ports.
 Each port can be assigned to only one target.
 .It Ic redirect Ar address

Modified: head/usr.sbin/ctld/kernel.c
==
--- head/usr.sbin/ctld/kernel.c Wed Jun 24 14:51:53 2015(r284764)
+++ head/usr.sbin/ctld/kernel.c Wed Jun 24 15:13:27 2015(r284765)
@@ -122,6 +122,8 @@ struct cctl_lun {
 struct cctl_port {
uint32_t port_id;
char *port_name;
+   int pp;
+   int vp;
int cfiscsi_state;
char *cfiscsi_target;
uint16_t cfiscsi_portal_group_tag;
@@ -334,6 +336,10 @@ cctl_end_pelement(void *user_data, const
if (strcmp(name, "port_name") == 0) {
cur_port->port_name = str;
str = NULL;
+   } else if (strcmp(name, "physical_port") == 0) {
+   cur_port->pp = strtoul(str, NULL, 0);
+   } else if (strcmp(name, "virtual_port") == 0) {
+   cur_port->vp = strtoul(str, NULL, 0);
} else if (strcmp(name, "cfiscsi_target") == 0) {
cur_port->cfiscsi_target = str;
str = NULL;
@@ -391,7 +397,7 @@ conf_new_from_kernel(void)
struct cctl_lun *lun;
struct cctl_port *port;
XML_Parser parser;
-   char *str;
+   char *str, *name;
int len, retval;
 
bzero(&devlist, sizeof(devlist));
@@ -500,18 +506,26 @@ retry_port:
 
conf = conf_new();
 
+   name = NULL;
STAILQ_FOREACH(port, &devlist.port_list, links) {
+   if (port->pp == 0 && port->vp == 0)
+   name = checked_strdup(port->port_name);
+   else if (port->vp == 0)
+   asprintf(&name, "%s/%d", port->port_name, port->pp);
+   else
+   asprintf(&name, "%s/%d/%d", port->port_name, port->pp,
+   port->vp);
 
if (port->cfiscsi_target == NULL) {
log_debugx("CTL port %u \"%s\" wasn't managed by ctld; 
",
-   port->port_id, port->port_name);
-   pp = pport_find(conf, port->port_name);
+   port->port_id, name);
+   pp = pport_find(conf, name);
if (pp == NULL) {
 #if 0
log_debugx("found new kernel port %u \"%s\"",
-   port->port_id, port->port_name);
+   port->port_id, name);
 #endif
-   pp = pport_new(conf, port->port_name, 
port->port_id);
+   pp = pport_new(conf, name, port->port_id);
if (pp == NULL) {
log_warnx("pport_new failed");
continue;
@@ -560,6 +574,8 @@ retry_port:
}
cp->p_ctl_port = port->port_id;
}
+   if (name)
+   free(name);
 
STAILQ_FOREACH(lun, &devlist.lun_list, links) {
struct cctl_lun_nv *nv;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


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

2015-06-24 Thread Ed Maste
Author: emaste
Date: Wed Jun 24 14:51:53 2015
New Revision: 284764
URL: https://svnweb.freebsd.org/changeset/base/284764

Log:
  add floatingpoint.h for arm64
  
  On other architectures floatingpoint.h is a symlink to
  machine/floatingpoint.h which in turn includes machine/ieeefp.h.
  Do this on arm64 as well for now.
  
  Sponsored by: The FreeBSD Foundation

Added:
  head/sys/arm64/include/floatingpoint.h   (contents, props changed)

Added: head/sys/arm64/include/floatingpoint.h
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/arm64/include/floatingpoint.h  Wed Jun 24 14:51:53 2015
(r284764)
@@ -0,0 +1,3 @@
+/* $FreeBSD$ */
+
+#include 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284763 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys

2015-06-24 Thread Andriy Gapon
Author: avg
Date: Wed Jun 24 14:49:49 2015
New Revision: 284763
URL: https://svnweb.freebsd.org/changeset/base/284763

Log:
  5981 Deadlock in dmu_objset_find_dp
  
  illumos/illumos-gate@1d3f896f5469c69c1339890ec3d68e9feddb0343
  
  https://www.illumos.org/issues/5981
When dmu_objset_find_dp gets called with a read lock held, it fans out
the work to the task queue. Each task in turn acquires its own read
lock before calling the callback. If during this process anyone tries
to a acquire a write lock, it will stall all read lock requests.Thus
the tasks will never finish, the read lock of the caller will never
get freed and the write lock never acquired.  deadlock.
  
  Reviewed by: Matthew Ahrens 
  Reviewed by: Dan McDonald 
  Approved by: Robert Mustacchi 
  Author: Arne Jansen 

Modified:
  vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_pool.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/rrwlock.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_pool.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/rrwlock.h

Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c
==
--- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c  Wed Jun 24 
14:48:25 2015(r284762)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c  Wed Jun 24 
14:49:49 2015(r284763)
@@ -1745,7 +1745,15 @@ dmu_objset_find_dp_cb(void *arg)
dmu_objset_find_ctx_t *dcp = arg;
dsl_pool_t *dp = dcp->dc_dp;
 
-   dsl_pool_config_enter(dp, FTAG);
+   /*
+* We need to get a pool_config_lock here, as there are several
+* asssert(pool_config_held) down the stack. Getting a lock via
+* dsl_pool_config_enter is risky, as it might be stalled by a
+* pending writer. This would deadlock, as the write lock can
+* only be granted when our parent thread gives up the lock.
+* The _prio interface gives us priority over a pending writer.
+*/
+   dsl_pool_config_enter_prio(dp, FTAG);
 
dmu_objset_find_dp_impl(dcp);
 

Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_pool.c
==
--- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_pool.cWed Jun 24 
14:48:25 2015(r284762)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_pool.cWed Jun 24 
14:49:49 2015(r284763)
@@ -1046,6 +1046,13 @@ dsl_pool_config_enter(dsl_pool_t *dp, vo
 }
 
 void
+dsl_pool_config_enter_prio(dsl_pool_t *dp, void *tag)
+{
+   ASSERT(!rrw_held(&dp->dp_config_rwlock, RW_READER));
+   rrw_enter_read_prio(&dp->dp_config_rwlock, tag);
+}
+
+void
 dsl_pool_config_exit(dsl_pool_t *dp, void *tag)
 {
rrw_exit(&dp->dp_config_rwlock, tag);

Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/rrwlock.c
==
--- vendor-sys/illumos/dist/uts/common/fs/zfs/rrwlock.c Wed Jun 24 14:48:25 
2015(r284762)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/rrwlock.c Wed Jun 24 14:49:49 
2015(r284763)
@@ -159,8 +159,8 @@ rrw_destroy(rrwlock_t *rrl)
refcount_destroy(&rrl->rr_linked_rcount);
 }
 
-void
-rrw_enter_read(rrwlock_t *rrl, void *tag)
+static void
+rrw_enter_read_impl(rrwlock_t *rrl, boolean_t prio, void *tag)
 {
mutex_enter(&rrl->rr_lock);
 #if !defined(DEBUG) && defined(_KERNEL)
@@ -176,7 +176,7 @@ rrw_enter_read(rrwlock_t *rrl, void *tag
ASSERT(refcount_count(&rrl->rr_anon_rcount) >= 0);
 
while (rrl->rr_writer != NULL || (rrl->rr_writer_wanted &&
-   refcount_is_zero(&rrl->rr_anon_rcount) &&
+   refcount_is_zero(&rrl->rr_anon_rcount) && !prio &&
rrn_find(rrl) == NULL))
cv_wait(&rrl->rr_cv, &rrl->rr_lock);
 
@@ -192,6 +192,25 @@ rrw_enter_read(rrwlock_t *rrl, void *tag
 }
 
 void
+rrw_enter_read(rrwlock_t *rrl, void *tag)
+{
+   rrw_enter_read_impl(rrl, B_FALSE, tag);
+}
+
+/*
+ * take a read lock even if there are pending write lock requests. if we want
+ * to take a lock reentrantly, but from different threads (that have a
+ * relationship to each other), the normal detection mechanism to overrule
+ * the pending writer does not work, so we have to give an explicit hint here.
+ */
+void
+rrw_enter_read_prio(rrwlock_t *rrl, void *tag)
+{
+   rrw_enter_read_impl(rrl, B_TRUE, tag);
+}
+
+
+void
 rrw_enter_write(rrwlock_t *rrl)
 {
mutex_enter(&rrl->rr_lock);

Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_pool.h
==
--- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_pool.hWed Jun 24 
14:48:25 2015(r284762)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_pool.hWed Jun 24 
14:49:49 2015(r284763)
@@ -152,6 +152,

svn commit: r284762 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys

2015-06-24 Thread Andriy Gapon
Author: avg
Date: Wed Jun 24 14:48:25 2015
New Revision: 284762
URL: https://svnweb.freebsd.org/changeset/base/284762

Log:
  5269 zpool import slow
  
  illumos/illumos-gate@12380e1e701fda28c9e9f32d01cafb54af279eb5
  
  https://www.illumos.org/issues/5269
When importing a pool (at boot or with zpool import) with many
filesystem, the process can take minutes. It doesn't matter whether
the pool has been exported cleanly or uncleanly.  The problem is that
each dataset has its own log chain. On import, all datasets have to be
checked if there are logs to replay.  The idea is to speed up this
process by paralellizing it.
  
  Reviewed by: Matthew Ahrens 
  Reviewed by: George Wilson 
  Reviewed by: Dan McDonald 
  Approved by: Dan McDonald 
  Author: Arne Jansen 

Modified:
  vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_pool.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_objset.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_pool.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/vdev.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zil.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/zil.c

Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c
==
--- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c  Wed Jun 24 
14:42:05 2015(r284761)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c  Wed Jun 24 
14:48:25 2015(r284762)
@@ -25,6 +25,7 @@
  * Copyright (c) 2013, Joyent, Inc. All rights reserved.
  * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
  * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
+ * Copyright (c) 2015, STRATO AG, Inc. All rights reserved.
  */
 
 /* Portions Copyright 2010 Robert Milkowski */
@@ -49,6 +50,7 @@
 #include 
 #include 
 #include 
+#include 
 
 /*
  * Needed to close a window in dnode_move() that allows the objset to be freed
@@ -56,6 +58,16 @@
  */
 krwlock_t os_lock;
 
+/*
+ * Tunable to overwrite the maximum number of threads for the parallization
+ * of dmu_objset_find_dp, needed to speed up the import of pools with many
+ * datasets.
+ * Default is 4 times the number of leaf vdevs.
+ */
+int dmu_find_threads = 0;
+
+static void dmu_objset_find_dp_cb(void *arg);
+
 void
 dmu_objset_init(void)
 {
@@ -503,6 +515,25 @@ dmu_objset_hold(const char *name, void *
return (err);
 }
 
+static int
+dmu_objset_own_impl(dsl_dataset_t *ds, dmu_objset_type_t type,
+boolean_t readonly, void *tag, objset_t **osp)
+{
+   int err;
+
+   err = dmu_objset_from_ds(ds, osp);
+   if (err != 0) {
+   dsl_dataset_disown(ds, tag);
+   } else if (type != DMU_OST_ANY && type != (*osp)->os_phys->os_type) {
+   dsl_dataset_disown(ds, tag);
+   return (SET_ERROR(EINVAL));
+   } else if (!readonly && dsl_dataset_is_snapshot(ds)) {
+   dsl_dataset_disown(ds, tag);
+   return (SET_ERROR(EROFS));
+   }
+   return (err);
+}
+
 /*
  * dsl_pool must not be held when this is called.
  * Upon successful return, there will be a longhold on the dataset,
@@ -524,21 +555,26 @@ dmu_objset_own(const char *name, dmu_obj
dsl_pool_rele(dp, FTAG);
return (err);
}
-
-   err = dmu_objset_from_ds(ds, osp);
+   err = dmu_objset_own_impl(ds, type, readonly, tag, osp);
dsl_pool_rele(dp, FTAG);
-   if (err != 0) {
-   dsl_dataset_disown(ds, tag);
-   } else if (type != DMU_OST_ANY && type != (*osp)->os_phys->os_type) {
-   dsl_dataset_disown(ds, tag);
-   return (SET_ERROR(EINVAL));
-   } else if (!readonly && ds->ds_is_snapshot) {
-   dsl_dataset_disown(ds, tag);
-   return (SET_ERROR(EROFS));
-   }
+
return (err);
 }
 
+int
+dmu_objset_own_obj(dsl_pool_t *dp, uint64_t obj, dmu_objset_type_t type,
+boolean_t readonly, void *tag, objset_t **osp)
+{
+   dsl_dataset_t *ds;
+   int err;
+
+   err = dsl_dataset_own_obj(dp, obj, tag, &ds);
+   if (err != 0)
+   return (err);
+
+   return (dmu_objset_own_impl(ds, type, readonly, tag, osp));
+}
+
 void
 dmu_objset_rele(objset_t *os, void *tag)
 {
@@ -1579,30 +1615,41 @@ dmu_dir_list_next(objset_t *os, int name
return (0);
 }
 
-/*
- * Find objsets under and including ddobj, call func(ds) on each.
- */
-int
-dmu_objset_find_dp(dsl_pool_t *dp, uint64_t ddobj,
-int func(dsl_pool_t *, dsl_dataset_t *, void *), void *arg, int flags)
+typedef struct dmu_objset_find_ctx {
+   taskq_t *dc_tq;
+   dsl_pool_t  *dc_dp;
+   uint64_tdc_ddobj;
+   int (*dc_func)(dsl_pool_t *, dsl_d

svn commit: r284760 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2015-06-24 Thread Andriy Gapon
Author: avg
Date: Wed Jun 24 14:41:54 2015
New Revision: 284760
URL: https://svnweb.freebsd.org/changeset/base/284760

Log:
  MFC r284306: MFV r284036: 5961 Fix stack overflow in zfs_create_fs

Modified:
  stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
==
--- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
Wed Jun 24 14:39:38 2015(r284759)
+++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
Wed Jun 24 14:41:54 2015(r284760)
@@ -1797,7 +1797,6 @@ log:
 void
 zfs_create_fs(objset_t *os, cred_t *cr, nvlist_t *zplprops, dmu_tx_t *tx)
 {
-   zfsvfs_tzfsvfs;
uint64_tmoid, obj, sa_obj, version;
uint64_tsense = ZFS_CASE_SENSITIVE;
uint64_tnorm = 0;
@@ -1805,6 +1804,7 @@ zfs_create_fs(objset_t *os, cred_t *cr, 
int error;
int i;
znode_t *rootzp = NULL;
+   zfsvfs_t*zfsvfs;
vattr_t vattr;
znode_t *zp;
zfs_acl_ids_t   acl_ids;
@@ -1880,7 +1880,7 @@ zfs_create_fs(objset_t *os, cred_t *cr, 
vattr.va_uid = crgetuid(cr);
vattr.va_gid = crgetgid(cr);
 
-   bzero(&zfsvfs, sizeof (zfsvfs_t));
+   zfsvfs = kmem_zalloc(sizeof (zfsvfs_t), KM_SLEEP);
 
rootzp = kmem_cache_alloc(znode_cache, KM_SLEEP);
ASSERT(!POINTER_IS_VALID(rootzp->z_zfsvfs));
@@ -1889,15 +1889,15 @@ zfs_create_fs(objset_t *os, cred_t *cr, 
rootzp->z_atime_dirty = 0;
rootzp->z_is_sa = USE_SA(version, os);
 
-   zfsvfs.z_os = os;
-   zfsvfs.z_parent = &zfsvfs;
-   zfsvfs.z_version = version;
-   zfsvfs.z_use_fuids = USE_FUIDS(version, os);
-   zfsvfs.z_use_sa = USE_SA(version, os);
-   zfsvfs.z_norm = norm;
+   zfsvfs->z_os = os;
+   zfsvfs->z_parent = zfsvfs;
+   zfsvfs->z_version = version;
+   zfsvfs->z_use_fuids = USE_FUIDS(version, os);
+   zfsvfs->z_use_sa = USE_SA(version, os);
+   zfsvfs->z_norm = norm;
 
error = sa_setup(os, sa_obj, zfs_attr_table, ZPL_END,
-   &zfsvfs.z_attr_table);
+   &zfsvfs->z_attr_table);
 
ASSERT(error == 0);
 
@@ -1906,16 +1906,16 @@ zfs_create_fs(objset_t *os, cred_t *cr, 
 * insensitive.
 */
if (sense == ZFS_CASE_INSENSITIVE || sense == ZFS_CASE_MIXED)
-   zfsvfs.z_norm |= U8_TEXTPREP_TOUPPER;
+   zfsvfs->z_norm |= U8_TEXTPREP_TOUPPER;
 
-   mutex_init(&zfsvfs.z_znodes_lock, NULL, MUTEX_DEFAULT, NULL);
-   list_create(&zfsvfs.z_all_znodes, sizeof (znode_t),
+   mutex_init(&zfsvfs->z_znodes_lock, NULL, MUTEX_DEFAULT, NULL);
+   list_create(&zfsvfs->z_all_znodes, sizeof (znode_t),
offsetof(znode_t, z_link_node));
 
for (i = 0; i != ZFS_OBJ_MTX_SZ; i++)
-   mutex_init(&zfsvfs.z_hold_mtx[i], NULL, MUTEX_DEFAULT, NULL);
+   mutex_init(&zfsvfs->z_hold_mtx[i], NULL, MUTEX_DEFAULT, NULL);
 
-   rootzp->z_zfsvfs = &zfsvfs;
+   rootzp->z_zfsvfs = zfsvfs;
VERIFY(0 == zfs_acl_ids_create(rootzp, IS_ROOT_NODE, &vattr,
cr, NULL, &acl_ids));
zfs_mknode(rootzp, &vattr, tx, cr, IS_ROOT_NODE, &zp, &acl_ids);
@@ -1932,12 +1932,13 @@ zfs_create_fs(objset_t *os, cred_t *cr, 
 * Create shares directory
 */
 
-   error = zfs_create_share_dir(&zfsvfs, tx);
+   error = zfs_create_share_dir(zfsvfs, tx);
 
ASSERT(error == 0);
 
for (i = 0; i != ZFS_OBJ_MTX_SZ; i++)
-   mutex_destroy(&zfsvfs.z_hold_mtx[i]);
+   mutex_destroy(&zfsvfs->z_hold_mtx[i]);
+   kmem_free(zfsvfs, sizeof (zfsvfs_t));
 }
 
 #endif /* _KERNEL */
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284761 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2015-06-24 Thread Andriy Gapon
Author: avg
Date: Wed Jun 24 14:42:05 2015
New Revision: 284761
URL: https://svnweb.freebsd.org/changeset/base/284761

Log:
  MFC r284306: MFV r284036: 5961 Fix stack overflow in zfs_create_fs

Modified:
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
==
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Wed Jun 
24 14:41:54 2015(r284760)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Wed Jun 
24 14:42:05 2015(r284761)
@@ -1790,7 +1790,6 @@ log:
 void
 zfs_create_fs(objset_t *os, cred_t *cr, nvlist_t *zplprops, dmu_tx_t *tx)
 {
-   zfsvfs_tzfsvfs;
uint64_tmoid, obj, sa_obj, version;
uint64_tsense = ZFS_CASE_SENSITIVE;
uint64_tnorm = 0;
@@ -1798,6 +1797,7 @@ zfs_create_fs(objset_t *os, cred_t *cr, 
int error;
int i;
znode_t *rootzp = NULL;
+   zfsvfs_t*zfsvfs;
vattr_t vattr;
znode_t *zp;
zfs_acl_ids_t   acl_ids;
@@ -1873,7 +1873,7 @@ zfs_create_fs(objset_t *os, cred_t *cr, 
vattr.va_uid = crgetuid(cr);
vattr.va_gid = crgetgid(cr);
 
-   bzero(&zfsvfs, sizeof (zfsvfs_t));
+   zfsvfs = kmem_zalloc(sizeof (zfsvfs_t), KM_SLEEP);
 
rootzp = kmem_cache_alloc(znode_cache, KM_SLEEP);
ASSERT(!POINTER_IS_VALID(rootzp->z_zfsvfs));
@@ -1882,15 +1882,15 @@ zfs_create_fs(objset_t *os, cred_t *cr, 
rootzp->z_atime_dirty = 0;
rootzp->z_is_sa = USE_SA(version, os);
 
-   zfsvfs.z_os = os;
-   zfsvfs.z_parent = &zfsvfs;
-   zfsvfs.z_version = version;
-   zfsvfs.z_use_fuids = USE_FUIDS(version, os);
-   zfsvfs.z_use_sa = USE_SA(version, os);
-   zfsvfs.z_norm = norm;
+   zfsvfs->z_os = os;
+   zfsvfs->z_parent = zfsvfs;
+   zfsvfs->z_version = version;
+   zfsvfs->z_use_fuids = USE_FUIDS(version, os);
+   zfsvfs->z_use_sa = USE_SA(version, os);
+   zfsvfs->z_norm = norm;
 
error = sa_setup(os, sa_obj, zfs_attr_table, ZPL_END,
-   &zfsvfs.z_attr_table);
+   &zfsvfs->z_attr_table);
 
ASSERT(error == 0);
 
@@ -1899,16 +1899,16 @@ zfs_create_fs(objset_t *os, cred_t *cr, 
 * insensitive.
 */
if (sense == ZFS_CASE_INSENSITIVE || sense == ZFS_CASE_MIXED)
-   zfsvfs.z_norm |= U8_TEXTPREP_TOUPPER;
+   zfsvfs->z_norm |= U8_TEXTPREP_TOUPPER;
 
-   mutex_init(&zfsvfs.z_znodes_lock, NULL, MUTEX_DEFAULT, NULL);
-   list_create(&zfsvfs.z_all_znodes, sizeof (znode_t),
+   mutex_init(&zfsvfs->z_znodes_lock, NULL, MUTEX_DEFAULT, NULL);
+   list_create(&zfsvfs->z_all_znodes, sizeof (znode_t),
offsetof(znode_t, z_link_node));
 
for (i = 0; i != ZFS_OBJ_MTX_SZ; i++)
-   mutex_init(&zfsvfs.z_hold_mtx[i], NULL, MUTEX_DEFAULT, NULL);
+   mutex_init(&zfsvfs->z_hold_mtx[i], NULL, MUTEX_DEFAULT, NULL);
 
-   rootzp->z_zfsvfs = &zfsvfs;
+   rootzp->z_zfsvfs = zfsvfs;
VERIFY(0 == zfs_acl_ids_create(rootzp, IS_ROOT_NODE, &vattr,
cr, NULL, &acl_ids));
zfs_mknode(rootzp, &vattr, tx, cr, IS_ROOT_NODE, &zp, &acl_ids);
@@ -1925,12 +1925,13 @@ zfs_create_fs(objset_t *os, cred_t *cr, 
 * Create shares directory
 */
 
-   error = zfs_create_share_dir(&zfsvfs, tx);
+   error = zfs_create_share_dir(zfsvfs, tx);
 
ASSERT(error == 0);
 
for (i = 0; i != ZFS_OBJ_MTX_SZ; i++)
-   mutex_destroy(&zfsvfs.z_hold_mtx[i]);
+   mutex_destroy(&zfsvfs->z_hold_mtx[i]);
+   kmem_free(zfsvfs, sizeof (zfsvfs_t));
 }
 
 #endif /* _KERNEL */
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284759 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2015-06-24 Thread Andriy Gapon
Author: avg
Date: Wed Jun 24 14:39:38 2015
New Revision: 284759
URL: https://svnweb.freebsd.org/changeset/base/284759

Log:
  MFC r284303: MFV r283534: 5515 dataset user hold doesn't reject empty tags

Modified:
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
==
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Jun 
24 14:39:26 2015(r284758)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Jun 
24 14:39:38 2015(r284759)
@@ -24,7 +24,7 @@
  * Copyright (c) 2011-2012 Pawel Jakub Dawidek .
  * All rights reserved.
  * Copyright 2013 Martin Matuska . All rights reserved.
- * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
+ * Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
  * Copyright (c) 2014, Joyent, Inc. All rights reserved.
  * Copyright (c) 2013 by Delphix. All rights reserved.
  * Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
@@ -5200,6 +5200,7 @@ zfs_ioc_smb_acl(zfs_cmd_t *zc)
 static int
 zfs_ioc_hold(const char *pool, nvlist_t *args, nvlist_t *errlist)
 {
+   nvpair_t *pair;
nvlist_t *holds;
int cleanup_fd = -1;
int error;
@@ -5209,6 +5210,19 @@ zfs_ioc_hold(const char *pool, nvlist_t 
if (error != 0)
return (SET_ERROR(EINVAL));
 
+   /* make sure the user didn't pass us any invalid (empty) tags */
+   for (pair = nvlist_next_nvpair(holds, NULL); pair != NULL;
+   pair = nvlist_next_nvpair(holds, pair)) {
+   char *htag;
+
+   error = nvpair_value_string(pair, &htag);
+   if (error != 0)
+   return (SET_ERROR(error));
+
+   if (strlen(htag) == 0)
+   return (SET_ERROR(EINVAL));
+   }
+
if (nvlist_lookup_int32(args, "cleanup_fd", &cleanup_fd) == 0) {
error = zfs_onexit_fd_hold(cleanup_fd, &minor);
if (error != 0)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284758 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2015-06-24 Thread Andriy Gapon
Author: avg
Date: Wed Jun 24 14:39:26 2015
New Revision: 284758
URL: https://svnweb.freebsd.org/changeset/base/284758

Log:
  MFC r284303: MFV r283534: 5515 dataset user hold doesn't reject empty tags

Modified:
  stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
==
--- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
Wed Jun 24 14:37:55 2015(r284757)
+++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
Wed Jun 24 14:39:26 2015(r284758)
@@ -25,12 +25,11 @@
  * All rights reserved.
  * Copyright 2013 Martin Matuska . All rights reserved.
  * Copyright 2014 Xin Li . All rights reserved.
- * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
+ * Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
  * Copyright (c) 2014, Joyent, Inc. All rights reserved.
  * Copyright (c) 2011, 2014 by Delphix. All rights reserved.
  * Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
  * Copyright (c) 2013 Steven Hartland. All rights reserved.
- * Copyright (c) 2014, Nexenta Systems, Inc. All rights reserved.
  */
 
 /*
@@ -5242,6 +5241,7 @@ zfs_ioc_smb_acl(zfs_cmd_t *zc)
 static int
 zfs_ioc_hold(const char *pool, nvlist_t *args, nvlist_t *errlist)
 {
+   nvpair_t *pair;
nvlist_t *holds;
int cleanup_fd = -1;
int error;
@@ -5251,6 +5251,19 @@ zfs_ioc_hold(const char *pool, nvlist_t 
if (error != 0)
return (SET_ERROR(EINVAL));
 
+   /* make sure the user didn't pass us any invalid (empty) tags */
+   for (pair = nvlist_next_nvpair(holds, NULL); pair != NULL;
+   pair = nvlist_next_nvpair(holds, pair)) {
+   char *htag;
+
+   error = nvpair_value_string(pair, &htag);
+   if (error != 0)
+   return (SET_ERROR(error));
+
+   if (strlen(htag) == 0)
+   return (SET_ERROR(EINVAL));
+   }
+
if (nvlist_lookup_int32(args, "cleanup_fd", &cleanup_fd) == 0) {
error = zfs_onexit_fd_hold(cleanup_fd, &minor);
if (error != 0)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284757 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2015-06-24 Thread Andriy Gapon
Author: avg
Date: Wed Jun 24 14:37:55 2015
New Revision: 284757
URL: https://svnweb.freebsd.org/changeset/base/284757

Log:
  MFC r284301: MFV r284040: check that datasets are snapshots

Modified:
  stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
  stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
==
--- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Wed Jun 
24 14:37:19 2015(r284756)
+++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Wed Jun 
24 14:37:55 2015(r284757)
@@ -855,6 +855,10 @@ dmu_send_estimate(dsl_dataset_t *ds, dsl
if (!dsl_dataset_is_snapshot(ds))
return (SET_ERROR(EINVAL));
 
+   /* fromsnap, if provided, must be a snapshot */
+   if (fromds != NULL && !dsl_dataset_is_snapshot(fromds))
+   return (SET_ERROR(EINVAL));
+
/*
 * fromsnap must be an earlier snapshot from the same fs as tosnap,
 * or the origin's fs.

Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
==
--- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
Wed Jun 24 14:37:19 2015(r284756)
+++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
Wed Jun 24 14:37:55 2015(r284757)
@@ -5364,11 +5364,19 @@ zfs_ioc_space_snaps(const char *lastsnap
return (error);
 
error = dsl_dataset_hold(dp, lastsnap, FTAG, &new);
+   if (error == 0 && !dsl_dataset_is_snapshot(new)) {
+   dsl_dataset_rele(new, FTAG);
+   error = SET_ERROR(EINVAL);
+   }
if (error != 0) {
dsl_pool_rele(dp, FTAG);
return (error);
}
error = dsl_dataset_hold(dp, firstsnap, FTAG, &old);
+   if (error == 0 && !dsl_dataset_is_snapshot(old)) {
+   dsl_dataset_rele(old, FTAG);
+   error = SET_ERROR(EINVAL);
+   }
if (error != 0) {
dsl_dataset_rele(new, FTAG);
dsl_pool_rele(dp, FTAG);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284756 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2015-06-24 Thread Andriy Gapon
Author: avg
Date: Wed Jun 24 14:37:19 2015
New Revision: 284756
URL: https://svnweb.freebsd.org/changeset/base/284756

Log:
  MFC r284301: MFV r284040: check that datasets are snapshots

Modified:
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
==
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c  Wed Jun 
24 14:32:05 2015(r284755)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c  Wed Jun 
24 14:37:19 2015(r284756)
@@ -730,6 +730,10 @@ dmu_send_estimate(dsl_dataset_t *ds, dsl
if (!dsl_dataset_is_snapshot(ds))
return (SET_ERROR(EINVAL));
 
+   /* fromsnap, if provided, must be a snapshot */
+   if (fromds != NULL && !dsl_dataset_is_snapshot(fromds))
+   return (SET_ERROR(EINVAL));
+
/*
 * fromsnap must be an earlier snapshot from the same fs as tosnap,
 * or the origin's fs.

Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
==
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Jun 
24 14:32:05 2015(r284755)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Jun 
24 14:37:19 2015(r284756)
@@ -5322,11 +5322,19 @@ zfs_ioc_space_snaps(const char *lastsnap
return (error);
 
error = dsl_dataset_hold(dp, lastsnap, FTAG, &new);
+   if (error == 0 && !dsl_dataset_is_snapshot(new)) {
+   dsl_dataset_rele(new, FTAG);
+   error = SET_ERROR(EINVAL);
+   }
if (error != 0) {
dsl_pool_rele(dp, FTAG);
return (error);
}
error = dsl_dataset_hold(dp, firstsnap, FTAG, &old);
+   if (error == 0 && !dsl_dataset_is_snapshot(old)) {
+   dsl_dataset_rele(old, FTAG);
+   error = SET_ERROR(EINVAL);
+   }
if (error != 0) {
dsl_dataset_rele(new, FTAG);
dsl_pool_rele(dp, FTAG);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284755 - stable/9/cddl/contrib/opensolaris/cmd/zfs

2015-06-24 Thread Andriy Gapon
Author: avg
Date: Wed Jun 24 14:32:05 2015
New Revision: 284755
URL: https://svnweb.freebsd.org/changeset/base/284755

Log:
  MFC r284309: zfs clone should not mount the clone if canmount == noauto

Modified:
  stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
Directory Properties:
  stable/9/cddl/contrib/opensolaris/cmd/zfs/   (props changed)

Modified: stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
==
--- stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs_main.cWed Jun 24 
14:30:04 2015(r284754)
+++ stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs_main.cWed Jun 24 
14:32:05 2015(r284755)
@@ -589,6 +589,17 @@ finish_progress(char *done)
pt_header = NULL;
 }
 /*
+ * Check if the dataset is mountable and should be automatically mounted.
+ */
+static boolean_t
+should_auto_mount(zfs_handle_t *zhp)
+{
+   if (!zfs_prop_valid_for_type(ZFS_PROP_CANMOUNT, zfs_get_type(zhp)))
+   return (B_FALSE);
+   return (zfs_prop_get_int(zhp, ZFS_PROP_CANMOUNT) == ZFS_CANMOUNT_ON);
+}
+
+/*
  * zfs clone [-p] [-o prop=value] ...  
  *
  * Given an existing dataset, create a writable copy whose initial contents
@@ -673,9 +684,22 @@ zfs_do_clone(int argc, char **argv)
 
clone = zfs_open(g_zfs, argv[1], ZFS_TYPE_DATASET);
if (clone != NULL) {
-   if (zfs_get_type(clone) != ZFS_TYPE_VOLUME)
-   if ((ret = zfs_mount(clone, NULL, 0)) == 0)
-   ret = zfs_share(clone);
+   /*
+* If the user doesn't want the dataset
+* automatically mounted, then skip the mount/share
+* step.
+*/
+   if (should_auto_mount(clone)) {
+   if ((ret = zfs_mount(clone, NULL, 0)) != 0) {
+   (void) fprintf(stderr, gettext("clone "
+   "successfully created, "
+   "but not mounted\n"));
+   } else if ((ret = zfs_share(clone)) != 0) {
+   (void) fprintf(stderr, gettext("clone "
+   "successfully created, "
+   "but not shared\n"));
+   }
+   }
zfs_close(clone);
}
}
@@ -721,7 +745,6 @@ zfs_do_create(int argc, char **argv)
int ret = 1;
nvlist_t *props;
uint64_t intval;
-   int canmount = ZFS_CANMOUNT_OFF;
 
if (nvlist_alloc(&props, NV_UNIQUE_NAME, 0) != 0)
nomem();
@@ -853,19 +876,15 @@ zfs_do_create(int argc, char **argv)
goto error;
 
ret = 0;
-   /*
-* if the user doesn't want the dataset automatically mounted,
-* then skip the mount/share step
-*/
-   if (zfs_prop_valid_for_type(ZFS_PROP_CANMOUNT, type))
-   canmount = zfs_prop_get_int(zhp, ZFS_PROP_CANMOUNT);
 
/*
 * Mount and/or share the new filesystem as appropriate.  We provide a
 * verbose error message to let the user know that their filesystem was
 * in fact created, even if we failed to mount or share it.
+* If the user doesn't want the dataset automatically mounted,
+* then skip the mount/share step altogether.
 */
-   if (canmount == ZFS_CANMOUNT_ON) {
+   if (should_auto_mount(zhp)) {
if (zfs_mount(zhp, NULL, 0) != 0) {
(void) fprintf(stderr, gettext("filesystem "
"successfully created, but not mounted\n"));
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284754 - stable/10/cddl/contrib/opensolaris/cmd/zfs

2015-06-24 Thread Andriy Gapon
Author: avg
Date: Wed Jun 24 14:30:04 2015
New Revision: 284754
URL: https://svnweb.freebsd.org/changeset/base/284754

Log:
  MFC r284309: zfs clone should not mount the clone if canmount == noauto

Modified:
  stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
==
--- stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c   Wed Jun 24 
12:48:55 2015(r284753)
+++ stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c   Wed Jun 24 
14:30:04 2015(r284754)
@@ -593,6 +593,17 @@ finish_progress(char *done)
 }
 
 /*
+ * Check if the dataset is mountable and should be automatically mounted.
+ */
+static boolean_t
+should_auto_mount(zfs_handle_t *zhp)
+{
+   if (!zfs_prop_valid_for_type(ZFS_PROP_CANMOUNT, zfs_get_type(zhp)))
+   return (B_FALSE);
+   return (zfs_prop_get_int(zhp, ZFS_PROP_CANMOUNT) == ZFS_CANMOUNT_ON);
+}
+
+/*
  * zfs clone [-p] [-o prop=value] ...  
  *
  * Given an existing dataset, create a writable copy whose initial contents
@@ -677,9 +688,22 @@ zfs_do_clone(int argc, char **argv)
 
clone = zfs_open(g_zfs, argv[1], ZFS_TYPE_DATASET);
if (clone != NULL) {
-   if (zfs_get_type(clone) != ZFS_TYPE_VOLUME)
-   if ((ret = zfs_mount(clone, NULL, 0)) == 0)
-   ret = zfs_share(clone);
+   /*
+* If the user doesn't want the dataset
+* automatically mounted, then skip the mount/share
+* step.
+*/
+   if (should_auto_mount(clone)) {
+   if ((ret = zfs_mount(clone, NULL, 0)) != 0) {
+   (void) fprintf(stderr, gettext("clone "
+   "successfully created, "
+   "but not mounted\n"));
+   } else if ((ret = zfs_share(clone)) != 0) {
+   (void) fprintf(stderr, gettext("clone "
+   "successfully created, "
+   "but not shared\n"));
+   }
+   }
zfs_close(clone);
}
}
@@ -728,7 +752,6 @@ zfs_do_create(int argc, char **argv)
int ret = 1;
nvlist_t *props;
uint64_t intval;
-   int canmount = ZFS_CANMOUNT_OFF;
 
if (nvlist_alloc(&props, NV_UNIQUE_NAME, 0) != 0)
nomem();
@@ -868,19 +891,15 @@ zfs_do_create(int argc, char **argv)
goto error;
 
ret = 0;
-   /*
-* if the user doesn't want the dataset automatically mounted,
-* then skip the mount/share step
-*/
-   if (zfs_prop_valid_for_type(ZFS_PROP_CANMOUNT, type))
-   canmount = zfs_prop_get_int(zhp, ZFS_PROP_CANMOUNT);
 
/*
 * Mount and/or share the new filesystem as appropriate.  We provide a
 * verbose error message to let the user know that their filesystem was
 * in fact created, even if we failed to mount or share it.
+* If the user doesn't want the dataset automatically mounted,
+* then skip the mount/share step altogether.
 */
-   if (!nomount && canmount == ZFS_CANMOUNT_ON) {
+   if (!nomount && should_auto_mount(zhp)) {
if (zfs_mount(zhp, NULL, 0) != 0) {
(void) fprintf(stderr, gettext("filesystem "
"successfully created, but not mounted\n"));
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284753 - stable/9/sbin/geom/class/eli

2015-06-24 Thread Christian Brueffer
Author: brueffer
Date: Wed Jun 24 12:48:55 2015
New Revision: 284753
URL: https://svnweb.freebsd.org/changeset/base/284753

Log:
  MFH: r284250
  
  Consistently use trailing whitespace in passphrase prompts.
  
  PR:193496
  Submitted by:Fabian Keil

Modified:
  stable/9/sbin/geom/class/eli/geom_eli.c
Directory Properties:
  stable/9/sbin/geom/class/eli/   (props changed)

Modified: stable/9/sbin/geom/class/eli/geom_eli.c
==
--- stable/9/sbin/geom/class/eli/geom_eli.c Wed Jun 24 12:21:25 2015
(r284752)
+++ stable/9/sbin/geom/class/eli/geom_eli.c Wed Jun 24 12:48:55 2015
(r284753)
@@ -430,7 +430,7 @@ eli_genkey_passphrase_prompt(struct gctl
 
for (;;) {
p = readpassphrase(
-   new ? "Enter new passphrase:" : "Enter passphrase:",
+   new ? "Enter new passphrase: " : "Enter passphrase: ",
passbuf, passbufsize, RPP_ECHO_OFF | RPP_REQUIRE_TTY);
if (p == NULL) {
bzero(passbuf, passbufsize);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284752 - stable/10/sbin/geom/class/eli

2015-06-24 Thread Christian Brueffer
Author: brueffer
Date: Wed Jun 24 12:21:25 2015
New Revision: 284752
URL: https://svnweb.freebsd.org/changeset/base/284752

Log:
  MFH: r284250
  
  Consistently use trailing whitespace in passphrase prompts.
  
  PR:   193496
  Submitted by: Fabian Keil

Modified:
  stable/10/sbin/geom/class/eli/geom_eli.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/geom/class/eli/geom_eli.c
==
--- stable/10/sbin/geom/class/eli/geom_eli.cWed Jun 24 12:19:49 2015
(r284751)
+++ stable/10/sbin/geom/class/eli/geom_eli.cWed Jun 24 12:21:25 2015
(r284752)
@@ -423,7 +423,7 @@ eli_genkey_passphrase_prompt(struct gctl
 
for (;;) {
p = readpassphrase(
-   new ? "Enter new passphrase:" : "Enter passphrase:",
+   new ? "Enter new passphrase: " : "Enter passphrase: ",
passbuf, passbufsize, RPP_ECHO_OFF | RPP_REQUIRE_TTY);
if (p == NULL) {
bzero(passbuf, passbufsize);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284750 - stable/10/usr.bin/calendar/calendars

2015-06-24 Thread Christian Brueffer
Author: brueffer
Date: Wed Jun 24 12:19:11 2015
New Revision: 284750
URL: https://svnweb.freebsd.org/changeset/base/284750

Log:
  MFH: r284249
  
  Correct Hawaii's admission day.
  
  PR:   192651

Modified:
  stable/10/usr.bin/calendar/calendars/calendar.holiday
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/calendar/calendars/calendar.holiday
==
--- stable/10/usr.bin/calendar/calendars/calendar.holiday   Wed Jun 24 
09:28:43 2015(r284749)
+++ stable/10/usr.bin/calendar/calendars/calendar.holiday   Wed Jun 24 
12:19:11 2015(r284750)
@@ -357,7 +357,7 @@
 08/31  Independence Day (Merdeka) in Malaysia
 08/31  Independence Day in Trinidad and Tobago
 08/31  Pashtoonian Day in Afghanistan
-08/FriThirdAdmission Day in Hawaii, 1984 (3rd Friday)
+08/FriThirdAdmission Day in Hawaii, 1959 (3rd Friday)
 09/01  Army Day in Chile
 09/03  Independence Day in Qatar
 09/03  Memorial Day in Tunisia
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


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

2015-06-24 Thread Andrew Turner
Author: andrew
Date: Wed Jun 24 12:19:49 2015
New Revision: 284751
URL: https://svnweb.freebsd.org/changeset/base/284751

Log:
  Fix the floating-point exception values to line up with the hardware
  register bits. Nothing in base uses these as they are deprecated, however
  third-party applications, such as perl, expect some of these functions to
  exist.
  
  Obtained from:ABT Systems Ltd
  Sponsored by: The FreeBSD Foundation

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

Modified: head/sys/arm64/include/ieeefp.h
==
--- head/sys/arm64/include/ieeefp.h Wed Jun 24 12:19:11 2015
(r284750)
+++ head/sys/arm64/include/ieeefp.h Wed Jun 24 12:19:49 2015
(r284751)
@@ -10,12 +10,12 @@
 /* Deprecated FPU control interface */
 
 /* FP exception codes */
-#defineFP_EXCEPT_INV   0
-#defineFP_EXCEPT_DZ1
-#defineFP_EXCEPT_OFL   2
-#defineFP_EXCEPT_UFL   3
-#defineFP_EXCEPT_IMP   4
-#defineFP_EXCEPT_DNML  7
+#defineFP_EXCEPT_INV   8
+#defineFP_EXCEPT_DZ9
+#defineFP_EXCEPT_OFL   10
+#defineFP_EXCEPT_UFL   11
+#defineFP_EXCEPT_IMP   12
+#defineFP_EXCEPT_DNML  15
 
 typedef int fp_except_t;
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


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

2015-06-24 Thread Kevin Lo
Author: kevlo
Date: Wed Jun 24 09:28:43 2015
New Revision: 284749
URL: https://svnweb.freebsd.org/changeset/base/284749

Log:
  Mention that using ports/net/malo-firmware-kmod to install the firmware.

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

Modified: head/share/man/man4/malo.4
==
--- head/share/man/man4/malo.4  Wed Jun 24 09:06:12 2015(r284748)
+++ head/share/man/man4/malo.4  Wed Jun 24 09:28:43 2015(r284749)
@@ -31,7 +31,7 @@
 .\"
 .\" $FreeBSD$
 .\"/
-.Dd September 20, 2014
+.Dd June 24, 2015
 .Dt MALO 4
 .Os
 .Sh NAME
@@ -69,30 +69,12 @@ Only one virtual interface may be config
 For more information on configuring this device, see
 .Xr ifconfig 8 .
 .Pp
-This driver requires the
-.Nm malofw
-firmware kernel module be installed before it will work.
-The firmware files are not publicly available.
-A port of the firmware can be found at:
-.Bd -literal -offset indent
-http://weongyo.org/project/malo/malo-firmware-1.4.tar.gz
-.Ed
-.Pp
-The firmware kernel module can be installed by extracting
-the archive and running
-.Ql make install clean
-in the
-.Pa malo-firmware-1.4
-directory.
-.Pp
-To load the
-.Nm malofw
-firmware kernel module at boot time, place the following
-line in
-.Xr loader.conf 5 :
-.Bd -literal -offset indent
-malofw_load="YES"
-.Ed
+This driver requires firmware to be loaded before it will work.
+The
+.Pa ports/net/malo-firmware-kmod
+port needs to be installed before
+.Xr ifconfig 8
+will work.
 .Sh HARDWARE
 The following cards are among those supported by the
 .Nm
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284748 - head/sys/dev/isp

2015-06-24 Thread Alexander Motin
Author: mav
Date: Wed Jun 24 09:06:12 2015
New Revision: 284748
URL: https://svnweb.freebsd.org/changeset/base/284748

Log:
  Fix reported_gone setting, missed in some cases.
  
  This makes driver better track reported CAM_SEL_TIMEOUTs to properly
  report device reappearance later.  This fixes target 0 not reappearing
  after initiator mode disabled and then reenabled.
  
  MFC after:3 days

Modified:
  head/sys/dev/isp/isp_freebsd.c

Modified: head/sys/dev/isp/isp_freebsd.c
==
--- head/sys/dev/isp/isp_freebsd.c  Wed Jun 24 06:25:20 2015
(r284747)
+++ head/sys/dev/isp/isp_freebsd.c  Wed Jun 24 09:06:12 2015
(r284748)
@@ -4943,6 +4943,8 @@ isp_action(struct cam_sim *sim, union cc
 
isp = (ispsoftc_t *)cam_sim_softc(sim);
mtx_assert(&isp->isp_lock, MA_OWNED);
+   isp_prt(isp, ISP_LOGDEBUG2, "isp_action code %x", ccb->ccb_h.func_code);
+   ISP_PCMD(ccb) = NULL;
 
if (isp->isp_state != ISP_RUNSTATE && ccb->ccb_h.func_code == 
XPT_SCSI_IO) {
isp_init(isp);
@@ -4950,15 +4952,12 @@ isp_action(struct cam_sim *sim, union cc
/*
 * Lie. Say it was a selection timeout.
 */
-   ccb->ccb_h.status = CAM_SEL_TIMEOUT | CAM_DEV_QFRZN;
-   xpt_freeze_devq(ccb->ccb_h.path, 1);
-   xpt_done(ccb);
+   ccb->ccb_h.status = CAM_SEL_TIMEOUT;
+   isp_done((struct ccb_scsiio *) ccb);
return;
}
isp->isp_state = ISP_RUNSTATE;
}
-   isp_prt(isp, ISP_LOGDEBUG2, "isp_action code %x", ccb->ccb_h.func_code);
-   ISP_PCMD(ccb) = NULL;
 
switch (ccb->ccb_h.func_code) {
case XPT_SCSI_IO:   /* Execute the requested I/O operation */
@@ -4969,7 +4968,7 @@ isp_action(struct cam_sim *sim, union cc
if ((ccb->ccb_h.flags & CAM_CDB_POINTER) != 0) {
if ((ccb->ccb_h.flags & CAM_CDB_PHYS) != 0) {
ccb->ccb_h.status = CAM_REQ_INVALID;
-   xpt_done(ccb);
+   isp_done((struct ccb_scsiio *) ccb);
break;
}
}
@@ -4992,6 +4991,7 @@ isp_action(struct cam_sim *sim, union cc
isp_prt(isp, ISP_LOGWARN, "out of PCMDs");
cam_freeze_devq(ccb->ccb_h.path);
cam_release_devq(ccb->ccb_h.path, 
RELSIM_RELEASE_AFTER_TIMEOUT, 0, 250, 0);
+   ccb->ccb_h.status = CAM_REQUEUE_REQ;
xpt_done(ccb);
break;
}
@@ -5024,10 +5024,8 @@ isp_action(struct cam_sim *sim, union cc
} else {
isp_prt(isp, ISP_LOGDEBUG0, "%d.%d 
downtime (%d) > lim (%d)", XS_TGT(ccb), XS_LUN(ccb), ISP_FC_PC(isp, 
bus)->loop_down_time, lim);
}
-   ccb->ccb_h.status = 
CAM_SEL_TIMEOUT|CAM_DEV_QFRZN;
-   xpt_freeze_devq(ccb->ccb_h.path, 1);
-   isp_free_pcmd(isp, ccb);
-   xpt_done(ccb);
+   ccb->ccb_h.status = CAM_SEL_TIMEOUT;
+   isp_done((struct ccb_scsiio *) ccb);
break;
}
isp_prt(isp, ISP_LOGDEBUG0, "%d.%d retry later", 
XS_TGT(ccb), XS_LUN(ccb));
@@ -5646,7 +5644,7 @@ isp_done(XS_T *sccb)
 * gone.  If it reappears, we'll need to issue a
 * rescan.
 */
-   if (hdlidx > 0 && hdlidx < MAX_FC_TARG)
+   if (hdlidx >= 0 && hdlidx < MAX_FC_TARG)
fcp->portdb[hdlidx].reported_gone = 1;
}
if ((sccb->ccb_h.status & CAM_DEV_QFRZN) == 0) {
@@ -5659,9 +5657,11 @@ isp_done(XS_T *sccb)
xpt_print(sccb->ccb_h.path, "cam completion status 0x%x\n", 
sccb->ccb_h.status);
}
 
-   if (callout_active(&PISP_PCMD(sccb)->wdog))
-   callout_stop(&PISP_PCMD(sccb)->wdog);
-   isp_free_pcmd(isp, (union ccb *) sccb);
+   if (ISP_PCMD(sccb)) {
+   if (callout_active(&PISP_PCMD(sccb)->wdog))
+   callout_stop(&PISP_PCMD(sccb)->wdog);
+   isp_free_pcmd(isp, (union ccb *) sccb);
+   }
xpt_done((union ccb *) sccb);
 }
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"