svn commit: r269220 - stable/10/libexec/save-entropy

2014-07-29 Thread Xin LI
Author: delphij
Date: Tue Jul 29 06:00:16 2014
New Revision: 269220
URL: http://svnweb.freebsd.org/changeset/base/269220

Log:
  MFC r268979:
  
  Don't save entropy inside jails.
  
  As of r126744, we no longer feed the entropy device in jails upon
  start, and collecting them is no longer useful.
  
  PR:   conf/126744
  Submitted by: Eugene Grosbein eugen grosbein net (with minor changes)
  Approved by:  so (des)

Modified:
  stable/10/libexec/save-entropy/save-entropy.sh
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/libexec/save-entropy/save-entropy.sh
==
--- stable/10/libexec/save-entropy/save-entropy.sh  Tue Jul 29 05:49:16 
2014(r269219)
+++ stable/10/libexec/save-entropy/save-entropy.sh  Tue Jul 29 06:00:16 
2014(r269220)
@@ -42,6 +42,8 @@ elif [ -r /etc/rc.conf ]; then
. /etc/rc.conf 2/dev/null
 fi
 
+[ $(/sbin/sysctl -n security.jail.jailed) = 0 ] || exit 0
+
 case ${entropy_dir} in
 [Nn][Oo])
exit 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: r269221 - in stable: 8/libexec/save-entropy 9/libexec/save-entropy

2014-07-29 Thread Xin LI
Author: delphij
Date: Tue Jul 29 06:00:48 2014
New Revision: 269221
URL: http://svnweb.freebsd.org/changeset/base/269221

Log:
  MFC r268979:
  
  Don't save entropy inside jails.
  
  As of r126744, we no longer feed the entropy device in jails upon
  start, and collecting them is no longer useful.
  
  PR:   conf/126744
  Submitted by: Eugene Grosbein eugen grosbein net (with minor changes)
  Approved by:  so (des)

Modified:
  stable/9/libexec/save-entropy/save-entropy.sh
Directory Properties:
  stable/9/libexec/save-entropy/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/8/libexec/save-entropy/save-entropy.sh
Directory Properties:
  stable/8/libexec/save-entropy/   (props changed)

Modified: stable/9/libexec/save-entropy/save-entropy.sh
==
--- stable/9/libexec/save-entropy/save-entropy.sh   Tue Jul 29 06:00:16 
2014(r269220)
+++ stable/9/libexec/save-entropy/save-entropy.sh   Tue Jul 29 06:00:48 
2014(r269221)
@@ -42,6 +42,8 @@ elif [ -r /etc/rc.conf ]; then
. /etc/rc.conf 2/dev/null
 fi
 
+[ $(/sbin/sysctl -n security.jail.jailed) = 0 ] || exit 0
+
 case ${entropy_dir} in
 [Nn][Oo])
exit 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: r269221 - in stable: 8/libexec/save-entropy 9/libexec/save-entropy

2014-07-29 Thread Xin LI
Author: delphij
Date: Tue Jul 29 06:00:48 2014
New Revision: 269221
URL: http://svnweb.freebsd.org/changeset/base/269221

Log:
  MFC r268979:
  
  Don't save entropy inside jails.
  
  As of r126744, we no longer feed the entropy device in jails upon
  start, and collecting them is no longer useful.
  
  PR:   conf/126744
  Submitted by: Eugene Grosbein eugen grosbein net (with minor changes)
  Approved by:  so (des)

Modified:
  stable/8/libexec/save-entropy/save-entropy.sh
Directory Properties:
  stable/8/libexec/save-entropy/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/9/libexec/save-entropy/save-entropy.sh
Directory Properties:
  stable/9/libexec/save-entropy/   (props changed)

Modified: stable/8/libexec/save-entropy/save-entropy.sh
==
--- stable/8/libexec/save-entropy/save-entropy.sh   Tue Jul 29 06:00:16 
2014(r269220)
+++ stable/8/libexec/save-entropy/save-entropy.sh   Tue Jul 29 06:00:48 
2014(r269221)
@@ -42,6 +42,8 @@ elif [ -r /etc/rc.conf ]; then
. /etc/rc.conf 2/dev/null
 fi
 
+[ $(/sbin/sysctl -n security.jail.jailed) = 0 ] || exit 0
+
 case ${entropy_dir} in
 [Nn][Oo])
exit 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: r269222 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2014-07-29 Thread Xin LI
Author: delphij
Date: Tue Jul 29 06:57:13 2014
New Revision: 269222
URL: http://svnweb.freebsd.org/changeset/base/269222

Log:
  Reschedule the 'deadman' callout after handling, this makes our
  code behave more like it is on Solaris.
  
  Reported by:  avg
  Reviewed by:  avg, mav (but bugs are mine)
  
  Differential Revision: https://phabric.freebsd.org/D457

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

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c  Tue Jul 
29 06:00:48 2014(r269221)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c  Tue Jul 
29 06:57:13 2014(r269222)
@@ -570,6 +570,12 @@ spa_deadman(void *arg)
++spa-spa_deadman_calls);
if (zfs_deadman_enabled)
vdev_deadman(spa-spa_root_vdev);
+#ifdef __FreeBSD__
+#ifdef _KERNEL
+   callout_schedule(spa-spa_deadman_cycid,
+   hz * zfs_deadman_checktime_ms / MILLISEC);
+#endif
+#endif
 }
 
 /*
___
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: r269223 - vendor-sys/illumos/dist/common/avl vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor-sys/illumos/dist/uts/common/sys vendor/illumo...

2014-07-29 Thread Xin LI
Author: delphij
Date: Tue Jul 29 07:08:32 2014
New Revision: 269223
URL: http://svnweb.freebsd.org/changeset/base/269223

Log:
  4873 zvol unmap calls can take a very long time for larger datasets
  Reviewed by: George Wilson geo...@delphix.com
  Reviewed by: Matthew Ahrens mahr...@delphix.com
  Reviewed by: Paul Dagnelie paul.dagne...@delphix.com
  Reviewed by: Basil Crow basil.c...@delphix.com
  Reviewed by: Dan McDonald dan...@omniti.com
  Approved by: Robert Mustacchi r...@joyent.com
  
  illumos/illumos-gate@0f6d88aded0d165f5954688a9b13bac76c38da84

Modified:
  vendor-sys/illumos/dist/common/avl/avl.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dnode_sync.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dbuf.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dnode.h
  vendor-sys/illumos/dist/uts/common/sys/avl.h

Changes in other areas also in this revision:
Modified:
  vendor/illumos/dist/common/avl/avl.c

Modified: vendor-sys/illumos/dist/common/avl/avl.c
==
--- vendor-sys/illumos/dist/common/avl/avl.cTue Jul 29 06:57:13 2014
(r269222)
+++ vendor-sys/illumos/dist/common/avl/avl.cTue Jul 29 07:08:32 2014
(r269223)
@@ -24,6 +24,10 @@
  */
 
 /*
+ * Copyright (c) 2014 by Delphix. All rights reserved.
+ */
+
+/*
  * AVL - generic AVL tree implementation for kernel use
  *
  * A complete description of AVL trees can be found in many CS textbooks.
@@ -85,6 +89,12 @@
  *   is a modified avl_node_t *.  The bottom bit (normally 0 for a
  *   pointer) is set to indicate if that the new node has a value greater
  *   than the value of the indicated avl_node_t *.
+ *
+ * Note - in addition to userland (e.g. libavl and libutil) and the kernel
+ * (e.g. genunix), avl.c is compiled into ld.so and kmdb's genunix module,
+ * which each have their own compilation environments and subsequent
+ * requirements. Each of these environments must be considered when adding
+ * dependencies from avl.c.
  */
 
 #include sys/types.h
@@ -864,6 +874,24 @@ avl_update(avl_tree_t *t, void *obj)
return (B_FALSE);
 }
 
+void
+avl_swap(avl_tree_t *tree1, avl_tree_t *tree2)
+{
+   avl_node_t *temp_node;
+   ulong_t temp_numnodes;
+
+   ASSERT3P(tree1-avl_compar, ==, tree2-avl_compar);
+   ASSERT3U(tree1-avl_offset, ==, tree2-avl_offset);
+   ASSERT3U(tree1-avl_size, ==, tree2-avl_size);
+
+   temp_node = tree1-avl_root;
+   temp_numnodes = tree1-avl_numnodes;
+   tree1-avl_root = tree2-avl_root;
+   tree1-avl_numnodes = tree2-avl_numnodes;
+   tree2-avl_root = temp_node;
+   tree2-avl_numnodes = temp_numnodes;
+}
+
 /*
  * initialize a new AVL tree
  */

Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c
==
--- vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.cTue Jul 29 06:57:13 
2014(r269222)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.cTue Jul 29 07:08:32 
2014(r269223)
@@ -69,6 +69,9 @@ dbuf_cons(void *vdb, void *unused, int k
mutex_init(db-db_mtx, NULL, MUTEX_DEFAULT, NULL);
cv_init(db-db_changed, NULL, CV_DEFAULT, NULL);
refcount_create(db-db_holds);
+
+   db-db_creation = gethrtime();
+
return (0);
 }
 
@@ -330,7 +333,7 @@ dbuf_verify(dmu_buf_impl_t *db)
ASSERT3U(db-db_level, , dn-dn_nlevels);
ASSERT(db-db_blkid == DMU_BONUS_BLKID ||
db-db_blkid == DMU_SPILL_BLKID ||
-   !list_is_empty(dn-dn_dbufs));
+   !avl_is_empty(dn-dn_dbufs));
}
if (db-db_blkid == DMU_BONUS_BLKID) {
ASSERT(dn != NULL);
@@ -803,18 +806,30 @@ dbuf_unoverride(dbuf_dirty_record_t *dr)
  * receive; see comment below for details.
  */
 void
-dbuf_free_range(dnode_t *dn, uint64_t start, uint64_t end, dmu_tx_t *tx)
+dbuf_free_range(dnode_t *dn, uint64_t start_blkid, uint64_t end_blkid,
+dmu_tx_t *tx)
 {
-   dmu_buf_impl_t *db, *db_next;
+   dmu_buf_impl_t *db, *db_next, db_search;
uint64_t txg = tx-tx_txg;
+   avl_index_t where;
 
-   if (end  dn-dn_maxblkid  (end != DMU_SPILL_BLKID))
-   end = dn-dn_maxblkid;
-   dprintf_dnode(dn, start=%llu end=%llu\n, start, end);
+   if (end_blkid  dn-dn_maxblkid  (end_blkid != DMU_SPILL_BLKID))
+   end_blkid = dn-dn_maxblkid;
+   dprintf_dnode(dn, start=%llu end=%llu\n, start_blkid, end_blkid);
+
+   db_search.db_level = 0;
+   db_search.db_blkid = start_blkid;
+   db_search.db_creation = 0;
 
mutex_enter(dn-dn_dbufs_mtx);
-   if (start = dn-dn_unlisted_l0_blkid * dn-dn_datablksz) {
+   if (start_blkid = dn-dn_unlisted_l0_blkid) {
/* There can't be any dbufs in this range; no need to search. */

svn commit: r269223 - vendor-sys/illumos/dist/common/avl vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor-sys/illumos/dist/uts/common/sys vendor/illumo...

2014-07-29 Thread Xin LI
Author: delphij
Date: Tue Jul 29 07:08:32 2014
New Revision: 269223
URL: http://svnweb.freebsd.org/changeset/base/269223

Log:
  4873 zvol unmap calls can take a very long time for larger datasets
  Reviewed by: George Wilson geo...@delphix.com
  Reviewed by: Matthew Ahrens mahr...@delphix.com
  Reviewed by: Paul Dagnelie paul.dagne...@delphix.com
  Reviewed by: Basil Crow basil.c...@delphix.com
  Reviewed by: Dan McDonald dan...@omniti.com
  Approved by: Robert Mustacchi r...@joyent.com
  
  illumos/illumos-gate@0f6d88aded0d165f5954688a9b13bac76c38da84

Modified:
  vendor/illumos/dist/common/avl/avl.c

Changes in other areas also in this revision:
Modified:
  vendor-sys/illumos/dist/common/avl/avl.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dnode_sync.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dbuf.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dnode.h
  vendor-sys/illumos/dist/uts/common/sys/avl.h

Modified: vendor/illumos/dist/common/avl/avl.c
==
--- vendor/illumos/dist/common/avl/avl.cTue Jul 29 06:57:13 2014
(r269222)
+++ vendor/illumos/dist/common/avl/avl.cTue Jul 29 07:08:32 2014
(r269223)
@@ -24,6 +24,10 @@
  */
 
 /*
+ * Copyright (c) 2014 by Delphix. All rights reserved.
+ */
+
+/*
  * AVL - generic AVL tree implementation for kernel use
  *
  * A complete description of AVL trees can be found in many CS textbooks.
@@ -37,7 +41,7 @@
  * insertion and deletion relatively efficiently. Searching the tree is
  * still a fast operation, roughly O(log(N)).
  *
- * The key to insertion and deletion is a set of tree maniuplations called
+ * The key to insertion and deletion is a set of tree manipulations called
  * rotations, which bring unbalanced subtrees back into the semi-balanced 
state.
  *
  * This implementation of AVL trees has the following peculiarities:
@@ -45,7 +49,7 @@
  * - The AVL specific data structures are physically embedded as fields
  *   in the using data structures.  To maintain generality the code
  *   must constantly translate between avl_node_t * and containing
- *   data structure void *s by adding/subracting the avl_offset.
+ *   data structure void *s by adding/subtracting the avl_offset.
  *
  * - Since the AVL data is always embedded in other structures, there is
  *   no locking or memory allocation in the AVL routines. This must be
@@ -85,6 +89,12 @@
  *   is a modified avl_node_t *.  The bottom bit (normally 0 for a
  *   pointer) is set to indicate if that the new node has a value greater
  *   than the value of the indicated avl_node_t *.
+ *
+ * Note - in addition to userland (e.g. libavl and libutil) and the kernel
+ * (e.g. genunix), avl.c is compiled into ld.so and kmdb's genunix module,
+ * which each have their own compilation environments and subsequent
+ * requirements. Each of these environments must be considered when adding
+ * dependencies from avl.c.
  */
 
 #include sys/types.h
@@ -94,7 +104,7 @@
 #include sys/cmn_err.h
 
 /*
- * Small arrays to translate between balance (or diff) values and child 
indeces.
+ * Small arrays to translate between balance (or diff) values and child 
indices.
  *
  * Code that deals with binary tree data structures will randomly use
  * left and right children when examining a tree.  C if() statements
@@ -114,7 +124,8 @@ static const int  avl_balance2child[]   = 
  *
  * - If there is a left child, go to it, then to it's rightmost descendant.
  *
- * - otherwise we return thru parent nodes until we've come from a right child.
+ * - otherwise we return through parent nodes until we've come from a right
+ *   child.
  *
  * Return Value:
  * NULL - if at the end of the nodes
@@ -863,6 +874,24 @@ avl_update(avl_tree_t *t, void *obj)
return (B_FALSE);
 }
 
+void
+avl_swap(avl_tree_t *tree1, avl_tree_t *tree2)
+{
+   avl_node_t *temp_node;
+   ulong_t temp_numnodes;
+
+   ASSERT3P(tree1-avl_compar, ==, tree2-avl_compar);
+   ASSERT3U(tree1-avl_offset, ==, tree2-avl_offset);
+   ASSERT3U(tree1-avl_size, ==, tree2-avl_size);
+
+   temp_node = tree1-avl_root;
+   temp_numnodes = tree1-avl_numnodes;
+   tree1-avl_root = tree2-avl_root;
+   tree1-avl_numnodes = tree2-avl_numnodes;
+   tree2-avl_root = temp_node;
+   tree2-avl_numnodes = temp_numnodes;
+}
+
 /*
  * initialize a new AVL tree
  */
@@ -919,7 +948,7 @@ avl_is_empty(avl_tree_t *tree)
 
 /*
  * Post-order tree walk used to visit all tree nodes and destroy the tree
- * in post order. This is used for destroying a tree w/o paying any cost
+ * in post order. This is used for destroying a tree without paying any cost
  * for rebalancing it.
  *
  * example:
___
svn-src-all@freebsd.org mailing list

svn commit: r269224 - vendor-sys/illumos/dist/uts/common/fs/zfs

2014-07-29 Thread Xin LI
Author: delphij
Date: Tue Jul 29 07:13:03 2014
New Revision: 269224
URL: http://svnweb.freebsd.org/changeset/base/269224

Log:
  5034 ARC's buf_hash_table is too small
  Reviewed by: Christopher Siden christopher.si...@delphix.com
  Reviewed by: George Wilson george.wil...@delphix.com
  Reviewed by: Saso Kiselkov skiselkov...@gmail.com
  Reviewed by: Richard Elling richard.ell...@gmail.com
  Approved by: Gordon Ross g...@nexenta.com
  
  illumos/illumos-gate@63e911b6fce0acc8e2a1d31ebdaf0c4c12580a14

Modified:
  vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c

Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c
==
--- vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Tue Jul 29 07:08:32 
2014(r269223)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Tue Jul 29 07:13:03 
2014(r269224)
@@ -200,6 +200,7 @@ int zfs_arc_grow_retry = 0;
 int zfs_arc_shrink_shift = 0;
 int zfs_arc_p_min_shift = 0;
 int zfs_disable_dup_eviction = 0;
+int zfs_arc_average_blocksize = 8 * 1024; /* 8KB */
 
 /*
  * Note that buffers can be in one of 6 states:
@@ -938,10 +939,11 @@ buf_init(void)
 
/*
 * The hash table is big enough to fill all of physical memory
-* with an average 64K block size.  The table will take up
-* totalmem*sizeof(void*)/64K (eg. 128KB/GB with 8-byte pointers).
+* with an average block size of zfs_arc_average_blocksize (default 8K).
+* By default, the table will take up
+* totalmem * sizeof(void*) / 8K (1MB per GB with 8-byte pointers).
 */
-   while (hsize * 65536  physmem * PAGESIZE)
+   while (hsize * zfs_arc_average_blocksize  physmem * PAGESIZE)
hsize = 1;
 retry:
buf_hash_table.ht_mask = hsize - 1;
___
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: r269225 - stable/10/usr.bin/mkimg

2014-07-29 Thread Sergey Kandaurov
Author: pluknet
Date: Tue Jul 29 07:36:38 2014
New Revision: 269225
URL: http://svnweb.freebsd.org/changeset/base/269225

Log:
  MFC r268727 (by delphij):
  
  Add a bandaid to fix GCC build (on sparc64 et al).

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

Modified: stable/10/usr.bin/mkimg/vhd.c
==
--- stable/10/usr.bin/mkimg/vhd.c   Tue Jul 29 07:13:03 2014
(r269224)
+++ stable/10/usr.bin/mkimg/vhd.c   Tue Jul 29 07:36:38 2014
(r269225)
@@ -320,6 +320,7 @@ vhd_dyn_write(int fd)
 
blk = 0;
blkcnt = VHD_BLOCK_SIZE / secsz;
+   error = 0;
nblks = image_get_size();
while (blk  nblks) {
if (!image_data(blk, blkcnt)) {
___
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: r269162 - in head/usr.bin/m4: . lib

2014-07-29 Thread Sergey Kandaurov
On 28 July 2014 02:54, Baptiste Daroussin b...@freebsd.org wrote:
 Author: bapt
 Date: Sun Jul 27 22:54:13 2014
 New Revision: 269162
 URL: http://svnweb.freebsd.org/changeset/base/269162

 Log:
   Sync with OpenBSD
   This brings:
   - check for integer overflows in custom allocs
   - fix potential integer overflows in memory allocation
   - annotate regexp error messages with source string
   - better error handling in mkstemp/unlink/fdopen logic

 Added:
   head/usr.bin/m4/lib/ohash.c   (contents, props changed)
[...]

This broke gcc build.

In file included from /src/usr.bin/m4/look.c:49:
/src/usr.bin/m4/lib/ohash.h:62: warning: '__bounded__' attribute
directive ignored

http://tinderbox.freebsd.org/tinderbox-head-build-HEAD-mips-mips.brief

-- 
wbr,
pluknet
___
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: r269226 - stable/10/sys/cam/ctl

2014-07-29 Thread Alexander Motin
Author: mav
Date: Tue Jul 29 07:40:14 2014
New Revision: 269226
URL: http://svnweb.freebsd.org/changeset/base/269226

Log:
  MFC r269122:
  Fix infinite loop, when doing WRITE SAME on file-backed LUN.

Modified:
  stable/10/sys/cam/ctl/ctl_backend_block.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cam/ctl/ctl_backend_block.c
==
--- stable/10/sys/cam/ctl/ctl_backend_block.c   Tue Jul 29 07:36:38 2014
(r269225)
+++ stable/10/sys/cam/ctl/ctl_backend_block.c   Tue Jul 29 07:40:14 2014
(r269226)
@@ -725,10 +725,11 @@ ctl_be_block_dispatch_file(struct ctl_be
}
 
/*
-* If this is a write, we're all done.
+* If this is a write or a verify, we're all done.
 * If this is a read, we can now send the data to the user.
 */
-   if (ARGS(io)-flags  (CTL_LLF_WRITE | CTL_LLF_VERIFY)) {
+   if ((beio-bio_cmd == BIO_WRITE) ||
+   (ARGS(io)-flags  CTL_LLF_VERIFY)) {
ctl_set_success(io-scsiio);
ctl_complete_beio(beio);
} else {
___
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: r269228 - head/sys/dev/sound/pcm

2014-07-29 Thread Alexander Motin
Author: mav
Date: Tue Jul 29 08:31:10 2014
New Revision: 269228
URL: http://svnweb.freebsd.org/changeset/base/269228

Log:
  Add support for SOUND_MIXER_INFO IOCTL, used by gstreamer.
  
  Submitted by: Dmitry Luhtionov dmitryluhtio...@gmail.com
  MFC after:2 weeks

Modified:
  head/sys/dev/sound/pcm/mixer.c

Modified: head/sys/dev/sound/pcm/mixer.c
==
--- head/sys/dev/sound/pcm/mixer.c  Tue Jul 29 08:00:13 2014
(r269227)
+++ head/sys/dev/sound/pcm/mixer.c  Tue Jul 29 08:31:10 2014
(r269228)
@@ -1221,6 +1221,15 @@ mixer_ioctl(struct cdev *i_dev, u_long c
return (ret);
 }
 
+static void
+mixer_mixerinfo(struct snd_mixer *m, mixer_info *mi)
+{
+   bzero((void *)mi, sizeof(*mi));
+   strlcpy(mi-id, m-name, sizeof(mi-id));
+   strlcpy(mi-name, device_get_desc(m-dev), sizeof(mi-name));
+   mi-modify_counter = m-modify_counter;
+}
+
 /*
  * XXX Make sure you can guarantee concurrency safety before calling this
  * function, be it through Giant, PCM_*, etc !
@@ -1279,6 +1288,10 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_lo
*arg_i = SOUND_VERSION;
ret = 0;
goto done;
+   case SOUND_MIXER_INFO:
+   mixer_mixerinfo(m, (mixer_info *)arg);
+   ret = 0;
+   goto done;
}
if ((cmd  ~0xff) == MIXER_WRITE(0)) {
if (j == SOUND_MIXER_RECSRC)
___
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: r269229 - in head: cddl/contrib/opensolaris/common/avl sys/cddl/contrib/opensolaris/common/avl sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/fs/...

2014-07-29 Thread Xin LI
Author: delphij
Date: Tue Jul 29 08:42:22 2014
New Revision: 269229
URL: http://svnweb.freebsd.org/changeset/base/269229

Log:
  MFV r269223:
  
  Change dn-dn_dbufs from linked list to AVL tree.
  
  Illumos issues:
4873 zvol unmap calls can take a very long time for larger datasets
  
  MFC after:2 weeks

Modified:
  head/cddl/contrib/opensolaris/common/avl/avl.c
  head/sys/cddl/contrib/opensolaris/common/avl/avl.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h
  head/sys/cddl/contrib/opensolaris/uts/common/sys/avl.h
Directory Properties:
  head/cddl/contrib/opensolaris/   (props changed)
  head/sys/cddl/contrib/opensolaris/   (props changed)

Modified: head/cddl/contrib/opensolaris/common/avl/avl.c
==
--- head/cddl/contrib/opensolaris/common/avl/avl.c  Tue Jul 29 08:31:10 
2014(r269228)
+++ head/cddl/contrib/opensolaris/common/avl/avl.c  Tue Jul 29 08:42:22 
2014(r269229)
@@ -24,6 +24,10 @@
  */
 
 /*
+ * Copyright (c) 2014 by Delphix. All rights reserved.
+ */
+
+/*
  * AVL - generic AVL tree implementation for kernel use
  *
  * A complete description of AVL trees can be found in many CS textbooks.
@@ -37,7 +41,7 @@
  * insertion and deletion relatively efficiently. Searching the tree is
  * still a fast operation, roughly O(log(N)).
  *
- * The key to insertion and deletion is a set of tree maniuplations called
+ * The key to insertion and deletion is a set of tree manipulations called
  * rotations, which bring unbalanced subtrees back into the semi-balanced 
state.
  *
  * This implementation of AVL trees has the following peculiarities:
@@ -45,7 +49,7 @@
  * - The AVL specific data structures are physically embedded as fields
  *   in the using data structures.  To maintain generality the code
  *   must constantly translate between avl_node_t * and containing
- *   data structure void *s by adding/subracting the avl_offset.
+ *   data structure void *s by adding/subtracting the avl_offset.
  *
  * - Since the AVL data is always embedded in other structures, there is
  *   no locking or memory allocation in the AVL routines. This must be
@@ -85,6 +89,12 @@
  *   is a modified avl_node_t *.  The bottom bit (normally 0 for a
  *   pointer) is set to indicate if that the new node has a value greater
  *   than the value of the indicated avl_node_t *.
+ *
+ * Note - in addition to userland (e.g. libavl and libutil) and the kernel
+ * (e.g. genunix), avl.c is compiled into ld.so and kmdb's genunix module,
+ * which each have their own compilation environments and subsequent
+ * requirements. Each of these environments must be considered when adding
+ * dependencies from avl.c.
  */
 
 #include sys/types.h
@@ -94,7 +104,7 @@
 #include sys/cmn_err.h
 
 /*
- * Small arrays to translate between balance (or diff) values and child 
indeces.
+ * Small arrays to translate between balance (or diff) values and child 
indices.
  *
  * Code that deals with binary tree data structures will randomly use
  * left and right children when examining a tree.  C if() statements
@@ -114,7 +124,8 @@ static const int  avl_balance2child[]   = 
  *
  * - If there is a left child, go to it, then to it's rightmost descendant.
  *
- * - otherwise we return thru parent nodes until we've come from a right child.
+ * - otherwise we return through parent nodes until we've come from a right
+ *   child.
  *
  * Return Value:
  * NULL - if at the end of the nodes
@@ -863,6 +874,24 @@ avl_update(avl_tree_t *t, void *obj)
return (B_FALSE);
 }
 
+void
+avl_swap(avl_tree_t *tree1, avl_tree_t *tree2)
+{
+   avl_node_t *temp_node;
+   ulong_t temp_numnodes;
+
+   ASSERT3P(tree1-avl_compar, ==, tree2-avl_compar);
+   ASSERT3U(tree1-avl_offset, ==, tree2-avl_offset);
+   ASSERT3U(tree1-avl_size, ==, tree2-avl_size);
+
+   temp_node = tree1-avl_root;
+   temp_numnodes = tree1-avl_numnodes;
+   tree1-avl_root = tree2-avl_root;
+   tree1-avl_numnodes = tree2-avl_numnodes;
+   tree2-avl_root = temp_node;
+   tree2-avl_numnodes = temp_numnodes;
+}
+
 /*
  * initialize a new AVL tree
  */
@@ -919,7 +948,7 @@ avl_is_empty(avl_tree_t *tree)
 
 /*
  * Post-order tree walk used to visit all tree nodes and destroy the tree
- * in post order. This is used for destroying a tree w/o paying any cost
+ * in post order. This is used for destroying a tree without paying any cost
  * for rebalancing it.
  *
  * example:

Modified: head/sys/cddl/contrib/opensolaris/common/avl/avl.c
==
--- 

svn commit: r269230 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2014-07-29 Thread Xin LI
Author: delphij
Date: Tue Jul 29 09:36:48 2014
New Revision: 269230
URL: http://svnweb.freebsd.org/changeset/base/269230

Log:
  MFV r269224:
  
  Increase default ARC buf_hash_table size.  When typical block size is small,
  the hash table could be too small, which would lead to long hash chains and
  limit performance for cached reads.
  
  A new loader tunable, vfs.zfs.arc_average_blocksize, have been added which
  allows users to override the default assumption of average (typical) block
  size.  Old default was 65536 (64 KiB) and new default is 8192 (8 KiB).
  
  Illumos issue:
  5034 ARC's buf_hash_table is too small
  
  MFC after:2 weeks

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
Directory Properties:
  head/sys/cddl/contrib/opensolaris/   (props changed)

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c   Tue Jul 29 
08:42:22 2014(r269229)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c   Tue Jul 29 
09:36:48 2014(r269230)
@@ -203,6 +203,7 @@ int zfs_arc_grow_retry = 0;
 int zfs_arc_shrink_shift = 0;
 int zfs_arc_p_min_shift = 0;
 int zfs_disable_dup_eviction = 0;
+uint64_t zfs_arc_average_blocksize = 8 * 1024; /* 8KB */
 
 TUNABLE_QUAD(vfs.zfs.arc_meta_limit, zfs_arc_meta_limit);
 SYSCTL_DECL(_vfs_zfs);
@@ -210,6 +211,9 @@ SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_max
 Maximum ARC size);
 SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_min, CTLFLAG_RDTUN, zfs_arc_min, 0,
 Minimum ARC size);
+SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_average_blocksize, CTLFLAG_RDTUN,
+zfs_arc_average_blocksize, 0,
+ARC average blocksize);
 
 /*
  * Note that buffers can be in one of 6 states:
@@ -1054,10 +1058,11 @@ buf_init(void)
 
/*
 * The hash table is big enough to fill all of physical memory
-* with an average 64K block size.  The table will take up
-* totalmem*sizeof(void*)/64K (eg. 128KB/GB with 8-byte pointers).
+* with an average block size of zfs_arc_average_blocksize (default 8K).
+* By default, the table will take up
+* totalmem * sizeof(void*) / 8K (1MB per GB with 8-byte pointers).
 */
-   while (hsize * 65536  (uint64_t)physmem * PAGESIZE)
+   while (hsize * zfs_arc_average_blocksize  (uint64_t)physmem * PAGESIZE)
hsize = 1;
 retry:
buf_hash_table.ht_mask = hsize - 1;
___
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: r269231 - head/usr.bin/m4/lib

2014-07-29 Thread Baptiste Daroussin
Author: bapt
Date: Tue Jul 29 09:46:08 2014
New Revision: 269231
URL: http://svnweb.freebsd.org/changeset/base/269231

Log:
  Fix build with gcc

Modified:
  head/usr.bin/m4/lib/ohash.h

Modified: head/usr.bin/m4/lib/ohash.h
==
--- head/usr.bin/m4/lib/ohash.h Tue Jul 29 09:36:48 2014(r269230)
+++ head/usr.bin/m4/lib/ohash.h Tue Jul 29 09:46:08 2014(r269231)
@@ -58,8 +58,7 @@ void ohash_delete(struct ohash *);
 unsigned int ohash_lookup_interval(struct ohash *, const char *,
const char *, uint32_t);
 unsigned int ohash_lookup_memory(struct ohash *, const char *,
-   size_t, uint32_t)
-   __attribute__ ((__bounded__(__string__,2,3)));
+   size_t, uint32_t);
 void *ohash_find(struct ohash *, unsigned int);
 void *ohash_remove(struct ohash *, unsigned int);
 void *ohash_insert(struct ohash *, unsigned int, 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: r269134 - head/sys/vm

2014-07-29 Thread Slawa Olhovchenkov
On Sat, Jul 26, 2014 at 06:10:18PM +, Alan Cox wrote:

 Author: alc
 Date: Sat Jul 26 18:10:18 2014
 New Revision: 269134
 URL: http://svnweb.freebsd.org/changeset/base/269134
 
 Log:
   When unwiring a region of an address space, do not assume that the
   underlying physical pages are mapped by the pmap.  If, for example, the
   application has performed an mprotect(..., PROT_NONE) on any part of the
   wired region, then those pages will no longer be mapped by the pmap.
   So, using the pmap to lookup the wired pages in order to unwire them
   doesn't always work, and when it doesn't work wired pages are leaked.
   
   To avoid the leak, introduce and use a new function vm_object_unwire()
   that locates the wired pages by traversing the object and its backing
   objects.

MFC planed?

   At the same time, switch from using pmap_change_wiring() to the recently
   introduced function pmap_unwire() for unwiring the region's mappings.
   pmap_unwire() is faster, because it operates a range of virtual addresses
   rather than a single virtual page at a time.  Moreover, by operating on
   a range, it is superpage friendly.  It doesn't waste time performing
   unnecessary demotions.
   
   Reported by:markj
   Reviewed by:kib
   Tested by:  pho, jmg (arm)
   Sponsored by:   EMC / Isilon Storage Division
___
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: r269233 - head/sys/arm/conf

2014-07-29 Thread Aleksandr Rybalko
Author: ray
Date: Tue Jul 29 12:04:11 2014
New Revision: 269233
URL: http://svnweb.freebsd.org/changeset/base/269233

Log:
  Remove SC_DFLT_FONT option. vt(4) don't use it.
  
  Suggested by: emaste
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/arm/conf/RPI-B

Modified: head/sys/arm/conf/RPI-B
==
--- head/sys/arm/conf/RPI-B Tue Jul 29 11:43:45 2014(r269232)
+++ head/sys/arm/conf/RPI-B Tue Jul 29 12:04:11 2014(r269233)
@@ -72,8 +72,6 @@ devicepty
 # Comment following lines for boot console on serial port
 device vt
 device kbdmux
-options SC_DFLT_FONT   # compile font in
-makeoptions SC_DFLT_FONT=cp437
 device ukbd
 
 device sdhci
___
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: r269234 - head/sys/arm/conf

2014-07-29 Thread Ruslan Bukin
Author: br
Date: Tue Jul 29 12:44:19 2014
New Revision: 269234
URL: http://svnweb.freebsd.org/changeset/base/269234

Log:
  Remove unused option.

Modified:
  head/sys/arm/conf/CHROMEBOOK
  head/sys/arm/conf/VYBRID

Modified: head/sys/arm/conf/CHROMEBOOK
==
--- head/sys/arm/conf/CHROMEBOOKTue Jul 29 12:04:11 2014
(r269233)
+++ head/sys/arm/conf/CHROMEBOOKTue Jul 29 12:44:19 2014
(r269234)
@@ -28,8 +28,6 @@ devicechrome_kb   # Chrome Keyboard
 # Framebuffer
 device vt
 device kbdmux
-optionsSC_DFLT_FONT# compile font in
-makeoptionsSC_DFLT_FONT=cp437
 device ukbd
 
 #FDT

Modified: head/sys/arm/conf/VYBRID
==
--- head/sys/arm/conf/VYBRIDTue Jul 29 12:04:11 2014(r269233)
+++ head/sys/arm/conf/VYBRIDTue Jul 29 12:44:19 2014(r269234)
@@ -148,8 +148,6 @@ device  vf_spi
 # Framebuffer
 device vt
 device kbdmux
-optionsSC_DFLT_FONT# compile font in
-makeoptionsSC_DFLT_FONT=cp437
 device ukbd
 
 optionsFDT
___
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: r269236 - stable/9/sys/i386/i386

2014-07-29 Thread Marius Strobl
Author: marius
Date: Tue Jul 29 13:08:46 2014
New Revision: 269236
URL: http://svnweb.freebsd.org/changeset/base/269236

Log:
  MFC: r269050
  
  - Copying and zeroing pages via temporary mappings involves updating the
corresponding page tables followed by accesses to the pages in question.
This sequence is subject to the situation exactly described in the AMD64
Architecture Programmer's Manual Volume 2: System Programming rev. 3.23,
7.3.1 Special Coherency Considerations [1, p. 171 f.]. Therefore, issuing
the INVLPG right after modifying the PTE bits is crucial.
For pmap_copy_page(), this has been broken in r124956 and later on carried
over to pmap_copy_pages() derived from the former, while all other places
in the i386 PMAP code use the correct order of instructions in this regard.
Fixing the latter breakage solves the problem of data corruption seen with
unmapped I/O enabled when running at least bare metal on AMD R-268D APUs.
However, this might also fix similar corruption reported for virtualized
environments.
  - In pmap_copy_pages(), correctly set the cache bits on the source page being
copied. This change is thought to be a NOP for the real world, though. [2]
  
  1: 
http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/24593_APM_v21.pdf
  
  Submitted by: kib [2]
  Reviewed by:  alc, kib
  Sponsored by: Bally Wulff Games  Entertainment GmbH

Modified:
  stable/9/sys/i386/i386/pmap.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/i386/i386/pmap.c
==
--- stable/9/sys/i386/i386/pmap.c   Tue Jul 29 13:08:37 2014
(r269235)
+++ stable/9/sys/i386/i386/pmap.c   Tue Jul 29 13:08:46 2014
(r269236)
@@ -1302,6 +1302,13 @@ pmap_pte_release(pt_entry_t *pte)
mtx_unlock(PMAP2mutex);
 }
 
+/*
+ * NB:  The sequence of updating a page table followed by accesses to the
+ * corresponding pages is subject to the situation described in the AMD64
+ * Architecture Programmer's Manual Volume 2: System Programming rev. 3.23,
+ * 7.3.1 Special Coherency Considerations.  Therefore, issuing the INVLPG
+ * right after modifying the PTE bits is crucial.
+ */
 static __inline void
 invlcaddr(void *caddr)
 {
@@ -4249,12 +4256,12 @@ pmap_copy_page(vm_page_t src, vm_page_t 
if (*sysmaps-CMAP2)
panic(pmap_copy_page: CMAP2 busy);
sched_pin();
-   invlpg((u_int)sysmaps-CADDR1);
-   invlpg((u_int)sysmaps-CADDR2);
*sysmaps-CMAP1 = PG_V | VM_PAGE_TO_PHYS(src) | PG_A |
pmap_cache_bits(src-md.pat_mode, 0);
+   invlcaddr(sysmaps-CADDR1);
*sysmaps-CMAP2 = PG_V | PG_RW | VM_PAGE_TO_PHYS(dst) | PG_A | PG_M |
pmap_cache_bits(dst-md.pat_mode, 0);
+   invlcaddr(sysmaps-CADDR2);
bcopy(sysmaps-CADDR1, sysmaps-CADDR2, PAGE_SIZE);
*sysmaps-CMAP1 = 0;
*sysmaps-CMAP2 = 0;
@@ -4282,8 +4289,6 @@ pmap_copy_pages(vm_page_t ma[], vm_offse
panic(pmap_copy_pages: CMAP2 busy);
sched_pin();
while (xfersize  0) {
-   invlpg((u_int)sysmaps-CADDR1);
-   invlpg((u_int)sysmaps-CADDR2);
a_pg = ma[a_offset  PAGE_SHIFT];
a_pg_offset = a_offset  PAGE_MASK;
cnt = min(xfersize, PAGE_SIZE - a_pg_offset);
@@ -4291,9 +4296,11 @@ pmap_copy_pages(vm_page_t ma[], vm_offse
b_pg_offset = b_offset  PAGE_MASK;
cnt = min(cnt, PAGE_SIZE - b_pg_offset);
*sysmaps-CMAP1 = PG_V | VM_PAGE_TO_PHYS(a_pg) | PG_A |
-   pmap_cache_bits(b_pg-md.pat_mode, 0);
+   pmap_cache_bits(a_pg-md.pat_mode, 0);
+   invlcaddr(sysmaps-CADDR1);
*sysmaps-CMAP2 = PG_V | PG_RW | VM_PAGE_TO_PHYS(b_pg) | PG_A |
PG_M | pmap_cache_bits(b_pg-md.pat_mode, 0);
+   invlcaddr(sysmaps-CADDR2);
a_cp = sysmaps-CADDR1 + a_pg_offset;
b_cp = sysmaps-CADDR2 + b_pg_offset;
bcopy(a_cp, b_cp, cnt);
___
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: r269235 - stable/10/sys/i386/i386

2014-07-29 Thread Marius Strobl
Author: marius
Date: Tue Jul 29 13:08:37 2014
New Revision: 269235
URL: http://svnweb.freebsd.org/changeset/base/269235

Log:
  MFC: r269050
  
  - Copying and zeroing pages via temporary mappings involves updating the
corresponding page tables followed by accesses to the pages in question.
This sequence is subject to the situation exactly described in the AMD64
Architecture Programmer's Manual Volume 2: System Programming rev. 3.23,
7.3.1 Special Coherency Considerations [1, p. 171 f.]. Therefore, issuing
the INVLPG right after modifying the PTE bits is crucial.
For pmap_copy_page(), this has been broken in r124956 and later on carried
over to pmap_copy_pages() derived from the former, while all other places
in the i386 PMAP code use the correct order of instructions in this regard.
Fixing the latter breakage solves the problem of data corruption seen with
unmapped I/O enabled when running at least bare metal on AMD R-268D APUs.
However, this might also fix similar corruption reported for virtualized
environments.
  - In pmap_copy_pages(), correctly set the cache bits on the source page being
copied. This change is thought to be a NOP for the real world, though. [2]
  
  1: 
http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/24593_APM_v21.pdf
  
  Submitted by: kib [2]
  Reviewed by:  alc, kib
  Sponsored by: Bally Wulff Games  Entertainment GmbH

Modified:
  stable/10/sys/i386/i386/pmap.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/i386/i386/pmap.c
==
--- stable/10/sys/i386/i386/pmap.c  Tue Jul 29 12:44:19 2014
(r269234)
+++ stable/10/sys/i386/i386/pmap.c  Tue Jul 29 13:08:37 2014
(r269235)
@@ -1286,6 +1286,13 @@ pmap_pte_release(pt_entry_t *pte)
mtx_unlock(PMAP2mutex);
 }
 
+/*
+ * NB:  The sequence of updating a page table followed by accesses to the
+ * corresponding pages is subject to the situation described in the AMD64
+ * Architecture Programmer's Manual Volume 2: System Programming rev. 3.23,
+ * 7.3.1 Special Coherency Considerations.  Therefore, issuing the INVLPG
+ * right after modifying the PTE bits is crucial.
+ */
 static __inline void
 invlcaddr(void *caddr)
 {
@@ -4240,12 +4247,12 @@ pmap_copy_page(vm_page_t src, vm_page_t 
if (*sysmaps-CMAP2)
panic(pmap_copy_page: CMAP2 busy);
sched_pin();
-   invlpg((u_int)sysmaps-CADDR1);
-   invlpg((u_int)sysmaps-CADDR2);
*sysmaps-CMAP1 = PG_V | VM_PAGE_TO_PHYS(src) | PG_A |
pmap_cache_bits(src-md.pat_mode, 0);
+   invlcaddr(sysmaps-CADDR1);
*sysmaps-CMAP2 = PG_V | PG_RW | VM_PAGE_TO_PHYS(dst) | PG_A | PG_M |
pmap_cache_bits(dst-md.pat_mode, 0);
+   invlcaddr(sysmaps-CADDR2);
bcopy(sysmaps-CADDR1, sysmaps-CADDR2, PAGE_SIZE);
*sysmaps-CMAP1 = 0;
*sysmaps-CMAP2 = 0;
@@ -4273,8 +4280,6 @@ pmap_copy_pages(vm_page_t ma[], vm_offse
panic(pmap_copy_pages: CMAP2 busy);
sched_pin();
while (xfersize  0) {
-   invlpg((u_int)sysmaps-CADDR1);
-   invlpg((u_int)sysmaps-CADDR2);
a_pg = ma[a_offset  PAGE_SHIFT];
a_pg_offset = a_offset  PAGE_MASK;
cnt = min(xfersize, PAGE_SIZE - a_pg_offset);
@@ -4282,9 +4287,11 @@ pmap_copy_pages(vm_page_t ma[], vm_offse
b_pg_offset = b_offset  PAGE_MASK;
cnt = min(cnt, PAGE_SIZE - b_pg_offset);
*sysmaps-CMAP1 = PG_V | VM_PAGE_TO_PHYS(a_pg) | PG_A |
-   pmap_cache_bits(b_pg-md.pat_mode, 0);
+   pmap_cache_bits(a_pg-md.pat_mode, 0);
+   invlcaddr(sysmaps-CADDR1);
*sysmaps-CMAP2 = PG_V | PG_RW | VM_PAGE_TO_PHYS(b_pg) | PG_A |
PG_M | pmap_cache_bits(b_pg-md.pat_mode, 0);
+   invlcaddr(sysmaps-CADDR2);
a_cp = sysmaps-CADDR1 + a_pg_offset;
b_cp = sysmaps-CADDR2 + b_pg_offset;
bcopy(a_cp, b_cp, cnt);
___
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: r269237 - stable/8/sys/i386/i386

2014-07-29 Thread Marius Strobl
Author: marius
Date: Tue Jul 29 13:08:56 2014
New Revision: 269237
URL: http://svnweb.freebsd.org/changeset/base/269237

Log:
  MFC: r269050 (partial)
  
  Copying and zeroing pages via temporary mappings involves updating the
  corresponding page tables followed by accesses to the pages in question.
  This sequence is subject to the situation exactly described in the AMD64
  Architecture Programmer's Manual Volume 2: System Programming rev. 3.23,
  7.3.1 Special Coherency Considerations [1, p. 171 f.]. Therefore, issuing
  the INVLPG right after modifying the PTE bits is crucial.
  For pmap_copy_page(), this has been broken in r124956.
  
  1: 
http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/24593_APM_v21.pdf
  
  Reviewed by:  alc, kib
  Sponsored by: Bally Wulff Games  Entertainment GmbH

Modified:
  stable/8/sys/i386/i386/pmap.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/i386/   (props changed)

Modified: stable/8/sys/i386/i386/pmap.c
==
--- stable/8/sys/i386/i386/pmap.c   Tue Jul 29 13:08:46 2014
(r269236)
+++ stable/8/sys/i386/i386/pmap.c   Tue Jul 29 13:08:56 2014
(r269237)
@@ -1263,6 +1263,13 @@ pmap_pte_release(pt_entry_t *pte)
mtx_unlock(PMAP2mutex);
 }
 
+/*
+ * NB:  The sequence of updating a page table followed by accesses to the
+ * corresponding pages is subject to the situation described in the AMD64
+ * Architecture Programmer's Manual Volume 2: System Programming rev. 3.23,
+ * 7.3.1 Special Coherency Considerations.  Therefore, issuing the INVLPG
+ * right after modifying the PTE bits is crucial.
+ */
 static __inline void
 invlcaddr(void *caddr)
 {
@@ -4096,12 +4103,12 @@ pmap_copy_page(vm_page_t src, vm_page_t 
if (*sysmaps-CMAP2)
panic(pmap_copy_page: CMAP2 busy);
sched_pin();
-   invlpg((u_int)sysmaps-CADDR1);
-   invlpg((u_int)sysmaps-CADDR2);
*sysmaps-CMAP1 = PG_V | VM_PAGE_TO_PHYS(src) | PG_A |
pmap_cache_bits(src-md.pat_mode, 0);
+   invlcaddr(sysmaps-CADDR1);
*sysmaps-CMAP2 = PG_V | PG_RW | VM_PAGE_TO_PHYS(dst) | PG_A | PG_M |
pmap_cache_bits(dst-md.pat_mode, 0);
+   invlcaddr(sysmaps-CADDR2);
bcopy(sysmaps-CADDR1, sysmaps-CADDR2, PAGE_SIZE);
*sysmaps-CMAP1 = 0;
*sysmaps-CMAP2 = 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: r269238 - stable/10/sys/amd64/amd64

2014-07-29 Thread Marius Strobl
Author: marius
Date: Tue Jul 29 13:11:37 2014
New Revision: 269238
URL: http://svnweb.freebsd.org/changeset/base/269238

Log:
  MFC: r269051
  
  Copying pages via temporary mappings in the !DMAP case of pmap_copy_pages()
  involves updating the corresponding page tables followed by accesses to the
  pages in question. This sequence is subject to the situation exactly described
  in the AMD64 Architecture Programmer's Manual Volume 2: System Programming
  rev. 3.23, 7.3.1 Special Coherency Considerations [1, p. 171 f.]. Therefore,
  issuing the INVLPG right after modifying the PTE bits is crucial (see also
  r269050, MFCed to stable/10 in r269235).
  For the amd64 PMAP code, the order of instructions was already correct. The
  above fact still is worth documenting, though.
  
  1: 
http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/24593_APM_v21.pdf
  
  Reviewed by:  alc
  Sponsored by: Bally Wulff Games  Entertainment GmbH

Modified:
  stable/10/sys/amd64/amd64/pmap.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/amd64/amd64/pmap.c
==
--- stable/10/sys/amd64/amd64/pmap.cTue Jul 29 13:08:56 2014
(r269237)
+++ stable/10/sys/amd64/amd64/pmap.cTue Jul 29 13:11:37 2014
(r269238)
@@ -4984,6 +4984,14 @@ pmap_copy_pages(vm_page_t ma[], vm_offse
int cnt;
boolean_t pinned;
 
+   /*
+* NB:  The sequence of updating a page table followed by accesses
+* to the corresponding pages used in the !DMAP case is subject to
+* the situation described in the AMD64 Architecture Programmer's
+* Manual Volume 2: System Programming rev. 3.23, 7.3.1 Special
+* Coherency Considerations.  Therefore, issuing the INVLPG right
+* after modifying the PTE bits is crucial.
+*/
pinned = FALSE;
while (xfersize  0) {
a_pg_offset = a_offset  PAGE_MASK;
___
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: r269239 - head/sys/x86/x86

2014-07-29 Thread Marius Strobl
Author: marius
Date: Tue Jul 29 13:26:24 2014
New Revision: 269239
URL: http://svnweb.freebsd.org/changeset/base/269239

Log:
  Fix comment typo in r269052.
  
  Submitted by: Daniel O'Connor

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

Modified: head/sys/x86/x86/mca.c
==
--- head/sys/x86/x86/mca.c  Tue Jul 29 13:11:37 2014(r269238)
+++ head/sys/x86/x86/mca.c  Tue Jul 29 13:26:24 2014(r269239)
@@ -253,7 +253,7 @@ mca_mute(const struct mca_record *rec)
/*
 * Skip spurious corrected parity errors generated by desktop Haswell
 * (see HSD131 erratum) unless reporting is enabled.
-* Note that these errors also have been observed with DO-stepping,
+* Note that these errors also have been observed with D0-stepping,
 * while the revision 014 desktop Haswell specification update only
 * talks about CO-stepping.
 */
___
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: r269240 - in head: . share/man/man9

2014-07-29 Thread Sergey Kandaurov
Author: pluknet
Date: Tue Jul 29 13:40:33 2014
New Revision: 269240
URL: http://svnweb.freebsd.org/changeset/base/269240

Log:
  Add VOP_GETVOBJECT.9 to obsolete files, un-xref.
  
  X-MFC with:   r269160

Modified:
  head/ObsoleteFiles.inc
  head/share/man/man9/vnode.9

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Tue Jul 29 13:26:24 2014(r269239)
+++ head/ObsoleteFiles.inc  Tue Jul 29 13:40:33 2014(r269240)
@@ -38,6 +38,10 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20140728: Remove an obsolete man page
+OLD_FILES+=usr/share/man/man9/VOP_GETVOBJECT.9.gz
+OLD_FILES+=usr/share/man/man9/VOP_CREATEVOBJECT.9.gz
+OLD_FILES+=usr/share/man/man9/VOP_DESTROYVOBJECT.9.gz
 # 20140723: renamed to PCBGROUP.9
 OLD_FILES+=usr/share/man/man9/PCBGROUPS.9.gz
 # 20140718: Remove obsolete man pages

Modified: head/share/man/man9/vnode.9
==
--- head/share/man/man9/vnode.9 Tue Jul 29 13:26:24 2014(r269239)
+++ head/share/man/man9/vnode.9 Tue Jul 29 13:40:33 2014(r269240)
@@ -170,7 +170,6 @@ intertwining of VM Objects and Vnodes.
 .Xr VOP_GETACL 9 ,
 .Xr VOP_GETEXTATTR 9 ,
 .Xr VOP_GETPAGES 9 ,
-.Xr VOP_GETVOBJECT 9 ,
 .Xr VOP_INACTIVE 9 ,
 .Xr VOP_IOCTL 9 ,
 .Xr VOP_LINK 9 ,
___
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: r269241 - head/sys/dev/terasic/mtl

2014-07-29 Thread Ed Maste
Author: emaste
Date: Tue Jul 29 14:41:28 2014
New Revision: 269241
URL: http://svnweb.freebsd.org/changeset/base/269241

Log:
  Correct typo in comment

Modified:
  head/sys/dev/terasic/mtl/terasic_mtl.h

Modified: head/sys/dev/terasic/mtl/terasic_mtl.h
==
--- head/sys/dev/terasic/mtl/terasic_mtl.h  Tue Jul 29 13:40:33 2014
(r269240)
+++ head/sys/dev/terasic/mtl/terasic_mtl.h  Tue Jul 29 14:41:28 2014
(r269241)
@@ -62,7 +62,7 @@ struct terasic_mtl_softc {
int  mtl_reg_rid;
 
/*
-* Graphics frame buffer device -- mappable form userspace.
+* Graphics frame buffer device -- mappable from userspace.
 */
struct cdev *mtl_pixel_cdev;
struct resource *mtl_pixel_res;
___
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: r269242 - head/sys/x86/x86

2014-07-29 Thread Marius Strobl
Author: marius
Date: Tue Jul 29 14:54:23 2014
New Revision: 269242
URL: http://svnweb.freebsd.org/changeset/base/269242

Log:
  Fix yet another comment typo in r269052.

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

Modified: head/sys/x86/x86/mca.c
==
--- head/sys/x86/x86/mca.c  Tue Jul 29 14:41:28 2014(r269241)
+++ head/sys/x86/x86/mca.c  Tue Jul 29 14:54:23 2014(r269242)
@@ -255,7 +255,7 @@ mca_mute(const struct mca_record *rec)
 * (see HSD131 erratum) unless reporting is enabled.
 * Note that these errors also have been observed with D0-stepping,
 * while the revision 014 desktop Haswell specification update only
-* talks about CO-stepping.
+* talks about C0-stepping.
 */
if (rec-mr_cpu_vendor_id == CPU_VENDOR_INTEL 
rec-mr_cpu_id == 0x306c3  rec-mr_bank == 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: r269243 - in head: share/man/man9 sys/net sys/netinet sys/netinet6

2014-07-29 Thread Gleb Smirnoff
Author: glebius
Date: Tue Jul 29 15:01:29 2014
New Revision: 269243
URL: http://svnweb.freebsd.org/changeset/base/269243

Log:
  Garbage collect couple of unused fields from struct ifaddr:
  - ifa_claim_addr() unused since removal of NetAtalk
  - ifa_metric seems to be never utilized, always a copy of if_metric

Modified:
  head/share/man/man9/ifnet.9
  head/sys/net/if.c
  head/sys/net/if.h
  head/sys/net/if_var.h
  head/sys/net/rtsock.c
  head/sys/netinet/in.c
  head/sys/netinet6/in6.c

Modified: head/share/man/man9/ifnet.9
==
--- head/share/man/man9/ifnet.9 Tue Jul 29 14:54:23 2014(r269242)
+++ head/share/man/man9/ifnet.9 Tue Jul 29 15:01:29 2014(r269243)
@@ -28,7 +28,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd November 5, 2013
+.Dd July 29, 2014
 .Dt IFNET 9
 .Os
 .Sh NAME
@@ -1084,10 +1084,6 @@ address in the route table.
 .It Va ifa_refcnt
 .Pq Vt short
 The reference count.
-.It Va ifa_metric
-.Pq Vt int
-A metric associated with this interface address, for the use of some
-external routing protocol.
 .El
 .Pp
 References to

Modified: head/sys/net/if.c
==
--- head/sys/net/if.c   Tue Jul 29 14:54:23 2014(r269242)
+++ head/sys/net/if.c   Tue Jul 29 15:01:29 2014(r269243)
@@ -1747,19 +1747,6 @@ next:continue;
}
} else {
/*
-* if we have a special address handler,
-* then use it instead of the generic one.
-*/
-   if (ifa-ifa_claim_addr) {
-   if ((*ifa-ifa_claim_addr)(ifa, addr)) {
-   ifa_ref(ifa);
-   IF_ADDR_RUNLOCK(ifp);
-   goto done;
-   }
-   continue;
-   }
-
-   /*
 * Scan all the bits in the ifa's address.
 * If a bit dissagrees with what we are
 * looking for, mask it with the netmask

Modified: head/sys/net/if.h
==
--- head/sys/net/if.h   Tue Jul 29 14:54:23 2014(r269242)
+++ head/sys/net/if.h   Tue Jul 29 15:01:29 2014(r269243)
@@ -304,7 +304,7 @@ struct ifa_msghdr {
int ifam_addrs; /* like rtm_addrs */
int ifam_flags; /* value of ifa_flags */
u_short ifam_index; /* index for associated ifp */
-   int ifam_metric;/* value of ifa_metric */
+   int ifam_metric;/* value of ifa_ifp-if_metric */
 };
 
 /*
@@ -329,7 +329,7 @@ struct ifa_msghdrl {
u_short _ifam_spare1;   /* spare space to grow if_index, see if_var.h */
u_short ifam_len;   /* length of ifa_msghdrl incl. if_data */
u_short ifam_data_off;  /* offset of if_data from beginning */
-   int ifam_metric;/* value of ifa_metric */
+   int ifam_metric;/* value of ifa_ifp-if_metric */
struct  if_data ifam_data;/* statistics and other data about if or
 * address */
 };

Modified: head/sys/net/if_var.h
==
--- head/sys/net/if_var.h   Tue Jul 29 14:54:23 2014(r269242)
+++ head/sys/net/if_var.h   Tue Jul 29 15:01:29 2014(r269243)
@@ -366,9 +366,6 @@ struct ifaddr {
(int, struct rtentry *, struct rt_addrinfo *);
u_short ifa_flags;  /* mostly rt_flags for cloning */
u_int   ifa_refcnt; /* references to this structure */
-   int ifa_metric; /* cost of going out this interface */
-   int (*ifa_claim_addr)   /* check if an addr goes to this if */
-   (struct ifaddr *, struct sockaddr *);
 
counter_u64_t   ifa_ipackets;
counter_u64_t   ifa_opackets;

Modified: head/sys/net/rtsock.c
==
--- head/sys/net/rtsock.c   Tue Jul 29 14:54:23 2014(r269242)
+++ head/sys/net/rtsock.c   Tue Jul 29 15:01:29 2014(r269243)
@@ -1289,7 +1289,7 @@ rtsock_addrmsg(int cmd, struct ifaddr *i
return (ENOBUFS);
ifam = mtod(m, struct ifa_msghdr *);
ifam-ifam_index = ifp-if_index;
-   ifam-ifam_metric = ifa-ifa_metric;
+   ifam-ifam_metric = ifa-ifa_ifp-if_metric;
ifam-ifam_flags = ifa-ifa_flags;
ifam-ifam_addrs = info.rti_addrs;
 
@@ -1638,7 +1638,7 @@ 

svn commit: r269244 - head/sys/kern

2014-07-29 Thread Konstantin Belousov
Author: kib
Date: Tue Jul 29 16:42:34 2014
New Revision: 269244
URL: http://svnweb.freebsd.org/changeset/base/269244

Log:
  Remove one-time use macros which check for the vnode lifecycle.  More,
  some parts of the checks are in fact redundand in the surrounding
  code, and it is more clear what the conditions are by direct testing
  of the flags.  Two of the three macros were only used in assertions.
  
  In vnlru_free(), all relevant parts of vholdl() were already inlined,
  except the increment of v_holdcnt itself.  Do not call vholdl() to do
  the increment as well, this allows to make assertions in
  vholdl()/vhold() more strict.
  
  In v_incr_usecount(), call vholdl() before incrementing other ref
  counters.  The change is no-op, but it makes less surprising to see
  the vnode state in debugger if interrupted inside v_incr_usecount().
  
  Tested by:pho
  Sponsored by: The FreeBSD Foundation
  MFC after:1 week

Modified:
  head/sys/kern/vfs_subr.c

Modified: head/sys/kern/vfs_subr.c
==
--- head/sys/kern/vfs_subr.cTue Jul 29 15:01:29 2014(r269243)
+++ head/sys/kern/vfs_subr.cTue Jul 29 16:42:34 2014(r269244)
@@ -275,14 +275,6 @@ static int vnlru_nowhere;
 SYSCTL_INT(_debug, OID_AUTO, vnlru_nowhere, CTLFLAG_RW,
 vnlru_nowhere, 0, Number of times the vnlru process ran without 
success);
 
-/*
- * Macros to control when a vnode is freed and recycled.  All require
- * the vnode interlock.
- */
-#define VCANRECYCLE(vp) (((vp)-v_iflag  VI_FREE)  !(vp)-v_holdcnt)
-#define VSHOULDFREE(vp) (!((vp)-v_iflag  VI_FREE)  !(vp)-v_holdcnt)
-#define VSHOULDBUSY(vp) (((vp)-v_iflag  VI_FREE)  (vp)-v_holdcnt)
-
 /* Shift count for (uintptr_t)vp to initialize vp-v_hash. */
 static int vnsz2log;
 
@@ -849,11 +841,21 @@ vnlru_free(int count)
TAILQ_INSERT_TAIL(vnode_free_list, vp, v_actfreelist);
continue;
}
-   VNASSERT(VCANRECYCLE(vp), vp,
-   (vp inconsistent on freelist));
+   VNASSERT((vp-v_iflag  VI_FREE) != 0  vp-v_holdcnt == 0,
+   vp, (vp inconsistent on freelist));
+
+   /*
+* The clear of VI_FREE prevents activation of the
+* vnode.  There is no sense in putting the vnode on
+* the mount point active list, only to remove it
+* later during recycling.  Inline the relevant part
+* of vholdl(), to avoid triggering assertions or
+* activating.
+*/
freevnodes--;
vp-v_iflag = ~VI_FREE;
-   vholdl(vp);
+   vp-v_holdcnt++;
+
mtx_unlock(vnode_free_list_mtx);
VI_UNLOCK(vp);
vtryrecycle(vp);
@@ -2042,13 +2044,13 @@ v_incr_usecount(struct vnode *vp)
 {
 
CTR2(KTR_VFS, %s: vp %p, __func__, vp);
+   vholdl(vp);
vp-v_usecount++;
if (vp-v_type == VCHR  vp-v_rdev != NULL) {
dev_lock();
vp-v_rdev-si_usecount++;
dev_unlock();
}
-   vholdl(vp);
 }
 
 /*
@@ -2325,11 +2327,18 @@ vholdl(struct vnode *vp)
struct mount *mp;
 
CTR2(KTR_VFS, %s: vp %p, __func__, vp);
+#ifdef INVARIANTS
+   /* getnewvnode() calls v_incr_usecount() without holding interlock. */
+   if (vp-v_type != VNON || vp-v_data != NULL) {
+   ASSERT_VI_LOCKED(vp, vholdl);
+   VNASSERT(vp-v_holdcnt  0 || (vp-v_iflag  VI_FREE) != 0,
+   vp, (vholdl: free vnode is held));
+   }
+#endif
vp-v_holdcnt++;
-   if (!VSHOULDBUSY(vp))
+   if ((vp-v_iflag  VI_FREE) == 0)
return;
-   ASSERT_VI_LOCKED(vp, vholdl);
-   VNASSERT((vp-v_iflag  VI_FREE) != 0, vp, (vnode not free));
+   VNASSERT(vp-v_holdcnt == 1, vp, (vholdl: wrong hold count));
VNASSERT(vp-v_op != NULL, vp, (vholdl: vnode already reclaimed.));
/*
 * Remove a vnode from the free list, mark it as in use,
@@ -2392,7 +2401,7 @@ vdropl(struct vnode *vp)
(vdropl: vnode already reclaimed.));
VNASSERT((vp-v_iflag  VI_FREE) == 0, vp,
(vnode already free));
-   VNASSERT(VSHOULDFREE(vp), vp,
+   VNASSERT(vp-v_holdcnt == 0, vp,
(vdropl: freeing when we shouldn't));
active = vp-v_iflag  VI_ACTIVE;
vp-v_iflag = ~VI_ACTIVE;
___
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: r269245 - stable/10/cddl/contrib/opensolaris/lib/libdtrace/common

2014-07-29 Thread Mark Johnston
Author: markj
Date: Tue Jul 29 18:31:27 2014
New Revision: 269245
URL: http://svnweb.freebsd.org/changeset/base/269245

Log:
  MFC r262669:
  When our linker merges .SUNW_dof sections from multiple files, it simply
  concatenates the DOF tables into one section. Previously, the USDT init
  code in drti.o would only look at the first table in the DOF section; with
  this change, it iterates over all the tables, passing each DOF table to
  the kernel.
  
  PR:   186821

Modified:
  stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c
==
--- stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c  Tue Jul 
29 16:42:34 2014(r269244)
+++ stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c  Tue Jul 
29 18:31:27 2014(r269245)
@@ -20,6 +20,7 @@
  */
 /*
  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2013 Voxer Inc. All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -144,7 +145,8 @@ dtrace_dof_init(void)
Lmid_t lmid;
 #else
u_long lmid = 0;
-   dof_sec_t *sec;
+   dof_sec_t *sec, *secstart, *dofstrtab, *dofprobes;
+   dof_provider_t *dofprovider;
size_t i;
 #endif
int fd;
@@ -152,14 +154,15 @@ dtrace_dof_init(void)
 #if !defined(sun)
Elf *e;
Elf_Scn *scn = NULL;
-   Elf_Data *symtabdata = NULL, *dynsymdata = NULL;
+   Elf_Data *symtabdata = NULL, *dynsymdata = NULL, *dofdata = NULL;
+   dof_hdr_t *dof_next = NULL;
GElf_Shdr shdr;
int efd, nprobes;
char *s;
+   char *dofstrtabraw;
size_t shstridx, symtabidx = 0, dynsymidx = 0;
-   unsigned char *dofstrtab = NULL;
unsigned char *buf;
-   int fixedprobes = 0;
+   int fixedprobes;
 #endif
 
if (getenv(DTRACE_DOF_INIT_DISABLE) != NULL)
@@ -209,7 +212,8 @@ dtrace_dof_init(void)
} else if (shdr.sh_type == SHT_PROGBITS) {
s = elf_strptr(e, shstridx, shdr.sh_name);
if  (s  strcmp(s, .SUNW_dof) == 0) {
-   dof = elf_getdata(scn, NULL)-d_buf;
+   dofdata = elf_getdata(scn, NULL);
+   dof = dofdata-d_buf;
}
}
}
@@ -219,6 +223,10 @@ dtrace_dof_init(void)
close(efd);
return;
}
+
+   while ((char *) dof  (char *) dofdata-d_buf + dofdata-d_size) {
+   fixedprobes = 0;
+   dof_next = (void *) ((char *) dof + dof-dofh_filesz);
 #endif
 
if (dof-dofh_ident[DOF_ID_MAG0] != DOF_MAG_MAG0 ||
@@ -290,34 +298,49 @@ dtrace_dof_init(void)
 * We are assuming the number of probes is less than the number of
 * symbols (libc can have 4k symbols, for example).
 */
-   sec = (dof_sec_t *)(dof + 1);
+   secstart = sec = (dof_sec_t *)(dof + 1);
buf = (char *)dof;
for (i = 0; i  dof-dofh_secnum; i++, sec++) {
-   if (sec-dofs_type == DOF_SECT_STRTAB)
-   dofstrtab = (unsigned char *)(buf + sec-dofs_offset);
-   else if (sec-dofs_type == DOF_SECT_PROBES  dofstrtab)
+   if (sec-dofs_type != DOF_SECT_PROVIDER)
+   continue;
+
+   dofprovider = (void *) (buf + sec-dofs_offset);
+   dofstrtab = secstart + dofprovider-dofpv_strtab;
+   dofprobes = secstart + dofprovider-dofpv_probes;
+
+   if (dofstrtab-dofs_type != DOF_SECT_STRTAB) {
+   fprintf(stderr, WARNING: expected STRTAB section, but 
got %d\n,
+   dofstrtab-dofs_type);
break;
-   
-   }
-   nprobes = sec-dofs_size / sec-dofs_entsize;
-   fixsymbol(e, symtabdata, symtabidx, nprobes, buf, sec, fixedprobes,
-   dofstrtab);
-   if (fixedprobes != nprobes) {
-   /*
-* If we haven't fixed all the probes using the
-* symtab section, look inside the dynsym
-* section.
-*/
-   fixsymbol(e, dynsymdata, dynsymidx, nprobes, buf, sec,
-   fixedprobes, dofstrtab);
-   }
-   if (fixedprobes != nprobes) {
-   fprintf(stderr, WARNING: number of probes 
-   fixed does not match the number of 
-   defined probes (%d != %d, 
-   respectively)\n, fixedprobes, nprobes);
-   fprintf(stderr, WARNING: some probes might 
-   not fire or your program might crash\n);
+   }
+   if (dofprobes-dofs_type != DOF_SECT_PROBES) {
+   fprintf(stderr, WARNING: expected 

svn commit: r269246 - stable/9/cddl/contrib/opensolaris/lib/libdtrace/common

2014-07-29 Thread Mark Johnston
Author: markj
Date: Tue Jul 29 18:31:44 2014
New Revision: 269246
URL: http://svnweb.freebsd.org/changeset/base/269246

Log:
  MFC r262669:
  When our linker merges .SUNW_dof sections from multiple files, it simply
  concatenates the DOF tables into one section. Previously, the USDT init
  code in drti.o would only look at the first table in the DOF section; with
  this change, it iterates over all the tables, passing each DOF table to
  the kernel.
  
  PR:   186821

Modified:
  stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c
Directory Properties:
  stable/9/cddl/contrib/opensolaris/   (props changed)
  stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/   (props changed)

Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c
==
--- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c   Tue Jul 
29 18:31:27 2014(r269245)
+++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c   Tue Jul 
29 18:31:44 2014(r269246)
@@ -20,6 +20,7 @@
  */
 /*
  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2013 Voxer Inc. All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -144,7 +145,8 @@ dtrace_dof_init(void)
Lmid_t lmid;
 #else
u_long lmid = 0;
-   dof_sec_t *sec;
+   dof_sec_t *sec, *secstart, *dofstrtab, *dofprobes;
+   dof_provider_t *dofprovider;
size_t i;
 #endif
int fd;
@@ -152,14 +154,15 @@ dtrace_dof_init(void)
 #if !defined(sun)
Elf *e;
Elf_Scn *scn = NULL;
-   Elf_Data *symtabdata = NULL, *dynsymdata = NULL;
+   Elf_Data *symtabdata = NULL, *dynsymdata = NULL, *dofdata = NULL;
+   dof_hdr_t *dof_next = NULL;
GElf_Shdr shdr;
int efd, nprobes;
char *s;
+   char *dofstrtabraw;
size_t shstridx, symtabidx = 0, dynsymidx = 0;
-   unsigned char *dofstrtab = NULL;
unsigned char *buf;
-   int fixedprobes = 0;
+   int fixedprobes;
 #endif
 
if (getenv(DTRACE_DOF_INIT_DISABLE) != NULL)
@@ -209,7 +212,8 @@ dtrace_dof_init(void)
} else if (shdr.sh_type == SHT_PROGBITS) {
s = elf_strptr(e, shstridx, shdr.sh_name);
if  (s  strcmp(s, .SUNW_dof) == 0) {
-   dof = elf_getdata(scn, NULL)-d_buf;
+   dofdata = elf_getdata(scn, NULL);
+   dof = dofdata-d_buf;
}
}
}
@@ -219,6 +223,10 @@ dtrace_dof_init(void)
close(efd);
return;
}
+
+   while ((char *) dof  (char *) dofdata-d_buf + dofdata-d_size) {
+   fixedprobes = 0;
+   dof_next = (void *) ((char *) dof + dof-dofh_filesz);
 #endif
 
if (dof-dofh_ident[DOF_ID_MAG0] != DOF_MAG_MAG0 ||
@@ -290,34 +298,49 @@ dtrace_dof_init(void)
 * We are assuming the number of probes is less than the number of
 * symbols (libc can have 4k symbols, for example).
 */
-   sec = (dof_sec_t *)(dof + 1);
+   secstart = sec = (dof_sec_t *)(dof + 1);
buf = (char *)dof;
for (i = 0; i  dof-dofh_secnum; i++, sec++) {
-   if (sec-dofs_type == DOF_SECT_STRTAB)
-   dofstrtab = (unsigned char *)(buf + sec-dofs_offset);
-   else if (sec-dofs_type == DOF_SECT_PROBES  dofstrtab)
+   if (sec-dofs_type != DOF_SECT_PROVIDER)
+   continue;
+
+   dofprovider = (void *) (buf + sec-dofs_offset);
+   dofstrtab = secstart + dofprovider-dofpv_strtab;
+   dofprobes = secstart + dofprovider-dofpv_probes;
+
+   if (dofstrtab-dofs_type != DOF_SECT_STRTAB) {
+   fprintf(stderr, WARNING: expected STRTAB section, but 
got %d\n,
+   dofstrtab-dofs_type);
break;
-   
-   }
-   nprobes = sec-dofs_size / sec-dofs_entsize;
-   fixsymbol(e, symtabdata, symtabidx, nprobes, buf, sec, fixedprobes,
-   dofstrtab);
-   if (fixedprobes != nprobes) {
-   /*
-* If we haven't fixed all the probes using the
-* symtab section, look inside the dynsym
-* section.
-*/
-   fixsymbol(e, dynsymdata, dynsymidx, nprobes, buf, sec,
-   fixedprobes, dofstrtab);
-   }
-   if (fixedprobes != nprobes) {
-   fprintf(stderr, WARNING: number of probes 
-   fixed does not match the number of 
-   defined probes (%d != %d, 
-   respectively)\n, fixedprobes, nprobes);
-   fprintf(stderr, WARNING: some probes might 
-   not fire or your program might crash\n);
+   }
+   if 

svn commit: r269247 - head/sbin/geom/class/virstor

2014-07-29 Thread Joel Dahl
Author: joel (doc committer)
Date: Tue Jul 29 19:38:17 2014
New Revision: 269247
URL: http://svnweb.freebsd.org/changeset/base/269247

Log:
  mdoc: sort sections.

Modified:
  head/sbin/geom/class/virstor/gvirstor.8

Modified: head/sbin/geom/class/virstor/gvirstor.8
==
--- head/sbin/geom/class/virstor/gvirstor.8 Tue Jul 29 18:31:44 2014
(r269246)
+++ head/sbin/geom/class/virstor/gvirstor.8 Tue Jul 29 19:38:17 2014
(r269247)
@@ -257,6 +257,10 @@ The
 .Nm
 utility first appeared in
 .Fx 7.0 .
+.Sh AUTHORS
+.An Ivan Voras Aq Mt ivo...@freebsd.org
+.Pp
+Sponsored by Google Summer of Code 2006.
 .Sh BUGS
 Commands
 .Cm add
@@ -293,7 +297,3 @@ and all their structures will be physica
 of the first virstor component.
 This could have a significant impact on file system performance
 .Pq which can in some rare cases be even positive .
-.Sh AUTHORS
-.An Ivan Voras Aq Mt ivo...@freebsd.org
-.Pp
-Sponsored by Google Summer of Code 2006.
___
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: r269248 - head/share/man/man3

2014-07-29 Thread Joel Dahl
Author: joel (doc committer)
Date: Tue Jul 29 19:41:00 2014
New Revision: 269248
URL: http://svnweb.freebsd.org/changeset/base/269248

Log:
  Silence mandoc lint.

Modified:
  head/share/man/man3/offsetof.3

Modified: head/share/man/man3/offsetof.3
==
--- head/share/man/man3/offsetof.3  Tue Jul 29 19:38:17 2014
(r269247)
+++ head/share/man/man3/offsetof.3  Tue Jul 29 19:41:00 2014
(r269248)
@@ -16,7 +16,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd February 18 2010
+.Dd February 18, 2010
 .Dt OFFSETOF 3
 .Os
 .Sh 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: r269249 - head/share/man/man9

2014-07-29 Thread Joel Dahl
Author: joel (doc committer)
Date: Tue Jul 29 19:43:00 2014
New Revision: 269249
URL: http://svnweb.freebsd.org/changeset/base/269249

Log:
  mdoc: remove superfluous paragraph macro.

Modified:
  head/share/man/man9/pmap_unwire.9

Modified: head/share/man/man9/pmap_unwire.9
==
--- head/share/man/man9/pmap_unwire.9   Tue Jul 29 19:41:00 2014
(r269248)
+++ head/share/man/man9/pmap_unwire.9   Tue Jul 29 19:43:00 2014
(r269249)
@@ -40,7 +40,6 @@
 .Fa pmap_t pmap vm_offset_t start vm_offset_t end
 .Fc
 .Sh DESCRIPTION
-.Pp
 The function
 .Fn pmap_unwire
 removes the wired attribute from each of the virtual-to-physical page mappings
___
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: r269250 - in head/usr.bin/m4: . lib

2014-07-29 Thread Joel Dahl
Author: joel (doc committer)
Date: Tue Jul 29 19:46:13 2014
New Revision: 269250
URL: http://svnweb.freebsd.org/changeset/base/269250

Log:
  mdoc: fix date.

Modified:
  head/usr.bin/m4/lib/ohash_init.3
  head/usr.bin/m4/lib/ohash_interval.3
  head/usr.bin/m4/m4.1

Modified: head/usr.bin/m4/lib/ohash_init.3
==
--- head/usr.bin/m4/lib/ohash_init.3Tue Jul 29 19:43:00 2014
(r269249)
+++ head/usr.bin/m4/lib/ohash_init.3Tue Jul 29 19:46:13 2014
(r269250)
@@ -15,7 +15,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd May 12 2014
+.Dd May 12, 2014
 .Dt OHASH_INIT 3
 .Os
 .Sh NAME

Modified: head/usr.bin/m4/lib/ohash_interval.3
==
--- head/usr.bin/m4/lib/ohash_interval.3Tue Jul 29 19:43:00 2014
(r269249)
+++ head/usr.bin/m4/lib/ohash_interval.3Tue Jul 29 19:46:13 2014
(r269250)
@@ -15,7 +15,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd June 5 2013
+.Dd June 5, 2013
 .Dt OHASH_INTERVAL 3
 .Os
 .Sh NAME

Modified: head/usr.bin/m4/m4.1
==
--- head/usr.bin/m4/m4.1Tue Jul 29 19:43:00 2014(r269249)
+++ head/usr.bin/m4/m4.1Tue Jul 29 19:46:13 2014(r269250)
@@ -33,7 +33,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd January 12 2014 $
+.Dd January 12, 2014
 .Dt M4 1
 .Os
 .Sh 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: r269251 - in head: usr.bin/systat usr.sbin/binmiscctl usr.sbin/config usr.sbin/pmcstat

2014-07-29 Thread Joel Dahl
Author: joel (doc committer)
Date: Tue Jul 29 19:49:27 2014
New Revision: 269251
URL: http://svnweb.freebsd.org/changeset/base/269251

Log:
  mdoc: kill EOL whitespace.

Modified:
  head/usr.bin/systat/systat.1
  head/usr.sbin/binmiscctl/binmiscctl.8
  head/usr.sbin/config/config.8
  head/usr.sbin/pmcstat/pmcstat.8

Modified: head/usr.bin/systat/systat.1
==
--- head/usr.bin/systat/systat.1Tue Jul 29 19:46:13 2014
(r269250)
+++ head/usr.bin/systat/systat.1Tue Jul 29 19:49:27 2014
(r269251)
@@ -119,7 +119,7 @@ of the list. For example:
 .Pp
 .Dl Nm Fl ifstat Fl match Ar bge0,em1 Fl pps
 .Pp
-This will display statistics of packets per second for network interfaces 
+This will display statistics of packets per second for network interfaces
 named as bge0 and em1.
 .Pp
 .Dl Nm Fl iostat Fl numeric Fl - Ar 2.1

Modified: head/usr.sbin/binmiscctl/binmiscctl.8
==
--- head/usr.sbin/binmiscctl/binmiscctl.8   Tue Jul 29 19:46:13 2014
(r269250)
+++ head/usr.sbin/binmiscctl/binmiscctl.8   Tue Jul 29 19:49:27 2014
(r269251)
@@ -28,7 +28,7 @@
 .\ Support for miscellaneous binary image activators
 .\
 .Dd April 10, 2014
-.Dt BINMISCCTL 8 
+.Dt BINMISCCTL 8
 .Os
 .Sh NAME
 .Nm binmiscctl
@@ -142,7 +142,7 @@ Enable the activator entry identified wi
 .It Cm lookup Ar name
 Look up and print out the activator entry identified with
 .Ar name .
-.It Cm list 
+.It Cm list
 Take a snapshot and print all the activator entries currently configured.
 .El
 .Sh EXAMPLES
@@ -162,13 +162,13 @@ Set its state to enabled.
 .Pp
 .Dl # binmiscctl disable llvmbc
 .Pp
-Set the state of the 
+Set the state of the
 .Ar llvmbc
 image activator to disabled.
 .Pp
 .Dl # binmiscctl enable llvmbc
 .Pp
-Set the state of the 
+Set the state of the
 .Ar llvmbc
 image activator to enabled.
 .Pp

Modified: head/usr.sbin/config/config.8
==
--- head/usr.sbin/config/config.8   Tue Jul 29 19:46:13 2014
(r269250)
+++ head/usr.sbin/config/config.8   Tue Jul 29 19:49:27 2014
(r269251)
@@ -73,7 +73,7 @@ This flag is kept for backward compatibi
 .It Fl I Ar path
 Search in
 .Ar path
-for any file included by the 
+for any file included by the
 .Ic include
 directive.  This option may be specified more than once.
 .It Fl d Ar destdir

Modified: head/usr.sbin/pmcstat/pmcstat.8
==
--- head/usr.sbin/pmcstat/pmcstat.8 Tue Jul 29 19:46:13 2014
(r269250)
+++ head/usr.sbin/pmcstat/pmcstat.8 Tue Jul 29 19:49:27 2014
(r269251)
@@ -235,7 +235,7 @@ lookup information is available.
 This option requires the
 .Fl R
 option to read in samples that were previously collected and
-saved with the 
+saved with the
 .Fl o
 option.
 .It Fl c Ar cpu-spec
___
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: r269253 - in stable/10/sys: amd64/amd64 i386/i386

2014-07-29 Thread Mark Johnston
Author: markj
Date: Tue Jul 29 20:33:18 2014
New Revision: 269253
URL: http://svnweb.freebsd.org/changeset/base/269253

Log:
  MFC r263329:
  Only invoke fasttrap hooks for traps from user mode, and ensure that they're
  called with interrupts enabled. Calling fasttrap_pid_probe() with interrupts
  disabled can lead to deadlock if fasttrap writes to the process' address
  space.

Modified:
  stable/10/sys/amd64/amd64/trap.c
  stable/10/sys/i386/i386/trap.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/amd64/amd64/trap.c
==
--- stable/10/sys/amd64/amd64/trap.cTue Jul 29 19:49:38 2014
(r269252)
+++ stable/10/sys/amd64/amd64/trap.cTue Jul 29 20:33:18 2014
(r269253)
@@ -193,6 +193,9 @@ SYSCTL_INT(_machdep, OID_AUTO, uprintf_s
 void
 trap(struct trapframe *frame)
 {
+#ifdef KDTRACE_HOOKS
+   struct reg regs;
+#endif
struct thread *td = curthread;
struct proc *p = td-td_proc;
int i = 0, ucode = 0, code;
@@ -244,28 +247,10 @@ trap(struct trapframe *frame)
/*
 * A trap can occur while DTrace executes a probe. Before
 * executing the probe, DTrace blocks re-scheduling and sets
-* a flag in it's per-cpu flags to indicate that it doesn't
+* a flag in its per-cpu flags to indicate that it doesn't
 * want to fault. On returning from the probe, the no-fault
 * flag is cleared and finally re-scheduling is enabled.
-*
-* If the DTrace kernel module has registered a trap handler,
-* call it and if it returns non-zero, assume that it has
-* handled the trap and modified the trap frame so that this
-* function can return normally.
 */
-   if (type == T_DTRACE_RET || type == T_BPTFLT) {
-   struct reg regs;
-
-   fill_frame_regs(frame, regs);
-   if (type == T_BPTFLT 
-   dtrace_pid_probe_ptr != NULL 
-   dtrace_pid_probe_ptr(regs) == 0)
-   goto out;
-   else if (type == T_DTRACE_RET 
-   dtrace_return_probe_ptr != NULL 
-   dtrace_return_probe_ptr(regs) == 0)
-   goto out;
-   }
if (dtrace_trap_func != NULL  (*dtrace_trap_func)(frame, type))
goto out;
 #endif
@@ -320,6 +305,14 @@ trap(struct trapframe *frame)
case T_BPTFLT:  /* bpt instruction fault */
case T_TRCTRAP: /* trace trap */
enable_intr();
+#ifdef KDTRACE_HOOKS
+   if (type == T_BPTFLT) {
+   fill_frame_regs(frame, regs);
+   if (dtrace_pid_probe_ptr != NULL 
+   dtrace_pid_probe_ptr(regs) == 0)
+   goto out;
+   }
+#endif
frame-tf_rflags = ~PSL_T;
i = SIGTRAP;
ucode = (type == T_TRCTRAP ? TRAP_TRACE : TRAP_BRKPT);
@@ -449,6 +442,15 @@ trap(struct trapframe *frame)
goto userout;
i = SIGFPE;
break;
+#ifdef KDTRACE_HOOKS
+   case T_DTRACE_RET:
+   enable_intr();
+   fill_frame_regs(frame, regs);
+   if (dtrace_return_probe_ptr != NULL 
+   dtrace_return_probe_ptr(regs) == 0)
+   goto out;
+   break;
+#endif
}
} else {
/* kernel trap */

Modified: stable/10/sys/i386/i386/trap.c
==
--- stable/10/sys/i386/i386/trap.c  Tue Jul 29 19:49:38 2014
(r269252)
+++ stable/10/sys/i386/i386/trap.c  Tue Jul 29 20:33:18 2014
(r269253)
@@ -207,6 +207,9 @@ SYSCTL_INT(_machdep, OID_AUTO, uprintf_s
 void
 trap(struct trapframe *frame)
 {
+#ifdef KDTRACE_HOOKS
+   struct reg regs;
+#endif
struct thread *td = curthread;
struct proc *p = td-td_proc;
int i = 0, ucode = 0, code;
@@ -263,28 +266,10 @@ trap(struct trapframe *frame)
/*
 * A trap can occur while DTrace executes a probe. Before
 * executing the probe, DTrace blocks re-scheduling and sets
-* a flag in it's per-cpu flags to indicate that it doesn't
+* a flag in its per-cpu flags to indicate that it doesn't
 * want to fault. On returning from the probe, the no-fault
 * flag is cleared and finally re-scheduling is enabled.
-*
-* If the DTrace kernel module has registered a trap handler,
-* call it and if it returns non-zero, assume that it has
-* handled the trap and modified the trap frame so that this
-* 

svn commit: r269254 - in stable/9/sys: amd64/amd64 i386/i386

2014-07-29 Thread Mark Johnston
Author: markj
Date: Tue Jul 29 20:34:10 2014
New Revision: 269254
URL: http://svnweb.freebsd.org/changeset/base/269254

Log:
  MFC r263329:
  Only invoke fasttrap hooks for traps from user mode, and ensure that they're
  called with interrupts enabled. Calling fasttrap_pid_probe() with interrupts
  disabled can lead to deadlock if fasttrap writes to the process' address
  space.

Modified:
  stable/9/sys/amd64/amd64/trap.c
  stable/9/sys/i386/i386/trap.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/amd64/amd64/trap.c
==
--- stable/9/sys/amd64/amd64/trap.c Tue Jul 29 20:33:18 2014
(r269253)
+++ stable/9/sys/amd64/amd64/trap.c Tue Jul 29 20:34:10 2014
(r269254)
@@ -193,6 +193,9 @@ SYSCTL_INT(_machdep, OID_AUTO, uprintf_s
 void
 trap(struct trapframe *frame)
 {
+#ifdef KDTRACE_HOOKS
+   struct reg regs;
+#endif
struct thread *td = curthread;
struct proc *p = td-td_proc;
int i = 0, ucode = 0, code;
@@ -244,28 +247,10 @@ trap(struct trapframe *frame)
/*
 * A trap can occur while DTrace executes a probe. Before
 * executing the probe, DTrace blocks re-scheduling and sets
-* a flag in it's per-cpu flags to indicate that it doesn't
+* a flag in its per-cpu flags to indicate that it doesn't
 * want to fault. On returning from the probe, the no-fault
 * flag is cleared and finally re-scheduling is enabled.
-*
-* If the DTrace kernel module has registered a trap handler,
-* call it and if it returns non-zero, assume that it has
-* handled the trap and modified the trap frame so that this
-* function can return normally.
 */
-   if (type == T_DTRACE_RET || type == T_BPTFLT) {
-   struct reg regs;
-
-   fill_frame_regs(frame, regs);
-   if (type == T_BPTFLT 
-   dtrace_pid_probe_ptr != NULL 
-   dtrace_pid_probe_ptr(regs) == 0)
-   goto out;
-   else if (type == T_DTRACE_RET 
-   dtrace_return_probe_ptr != NULL 
-   dtrace_return_probe_ptr(regs) == 0)
-   goto out;
-   }
if (dtrace_trap_func != NULL  (*dtrace_trap_func)(frame, type))
goto out;
 #endif
@@ -320,6 +305,14 @@ trap(struct trapframe *frame)
case T_BPTFLT:  /* bpt instruction fault */
case T_TRCTRAP: /* trace trap */
enable_intr();
+#ifdef KDTRACE_HOOKS
+   if (type == T_BPTFLT) {
+   fill_frame_regs(frame, regs);
+   if (dtrace_pid_probe_ptr != NULL 
+   dtrace_pid_probe_ptr(regs) == 0)
+   goto out;
+   }
+#endif
frame-tf_rflags = ~PSL_T;
i = SIGTRAP;
ucode = (type == T_TRCTRAP ? TRAP_TRACE : TRAP_BRKPT);
@@ -449,6 +442,15 @@ trap(struct trapframe *frame)
goto userout;
i = SIGFPE;
break;
+#ifdef KDTRACE_HOOKS
+   case T_DTRACE_RET:
+   enable_intr();
+   fill_frame_regs(frame, regs);
+   if (dtrace_return_probe_ptr != NULL 
+   dtrace_return_probe_ptr(regs) == 0)
+   goto out;
+   break;
+#endif
}
} else {
/* kernel trap */

Modified: stable/9/sys/i386/i386/trap.c
==
--- stable/9/sys/i386/i386/trap.c   Tue Jul 29 20:33:18 2014
(r269253)
+++ stable/9/sys/i386/i386/trap.c   Tue Jul 29 20:34:10 2014
(r269254)
@@ -207,6 +207,9 @@ SYSCTL_INT(_machdep, OID_AUTO, uprintf_s
 void
 trap(struct trapframe *frame)
 {
+#ifdef KDTRACE_HOOKS
+   struct reg regs;
+#endif
struct thread *td = curthread;
struct proc *p = td-td_proc;
int i = 0, ucode = 0, code;
@@ -263,28 +266,10 @@ trap(struct trapframe *frame)
/*
 * A trap can occur while DTrace executes a probe. Before
 * executing the probe, DTrace blocks re-scheduling and sets
-* a flag in it's per-cpu flags to indicate that it doesn't
+* a flag in its per-cpu flags to indicate that it doesn't
 * want to fault. On returning from the probe, the no-fault
 * flag is cleared and finally re-scheduling is enabled.
-*
-* If the DTrace kernel module has registered a trap handler,
-* call it and if it returns non-zero, assume that it has
-* handled the trap and modified the trap frame so that this
-* 

svn commit: r269255 - stable/10/share/man/man9

2014-07-29 Thread Mark Johnston
Author: markj
Date: Tue Jul 29 20:37:22 2014
New Revision: 269255
URL: http://svnweb.freebsd.org/changeset/base/269255

Log:
  MFC r264363:
  Update the SDT(9) example to reflect the removal of the sname parameter
  in r258622.

Modified:
  stable/10/share/man/man9/SDT.9
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/share/man/man9/SDT.9
==
--- stable/10/share/man/man9/SDT.9  Tue Jul 29 20:34:10 2014
(r269254)
+++ stable/10/share/man/man9/SDT.9  Tue Jul 29 20:37:22 2014
(r269255)
@@ -200,7 +200,7 @@ of type Destination Unreachable:
 .Bd -literal -offset indent
 SDT_PROVIDER_DECLARE(icmp);
 
-SDT_PROBE_DEFINE1(icmp, , unreach, pkt_receive, pkt-receive,
+SDT_PROBE_DEFINE1(icmp, , unreach, pkt__receive,
 struct icmp *);
 
 .Ed
@@ -212,7 +212,7 @@ Consider a DTrace probe which fires when
 packet.
 Such a probe would be defined by multiple tracepoints:
 .Bd -literal -offset indent
-SDT_PROBE_DEFINE3(ip, , , receive, receive, struct ifnet *,
+SDT_PROBE_DEFINE3(ip, , , receive, struct ifnet *,
 struct ip *, struct ip6_hdr *);
 
 int
@@ -268,7 +268,7 @@ all in the
 library path.
 Then the FreeBSD probe above can be defined with:
 .Bd -literal -offset indent
-SDT_PROBE_DEFINE1_XLATE(ip, , , receive, receive, struct icmp *,
+SDT_PROBE_DEFINE1_XLATE(ip, , , receive, struct icmp *,
 struct icmp_hdr_dt *);
 .Ed
 .Sh SEE ALSO
___
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: r269256 - stable/9/share/man/man9

2014-07-29 Thread Mark Johnston
Author: markj
Date: Tue Jul 29 20:38:08 2014
New Revision: 269256
URL: http://svnweb.freebsd.org/changeset/base/269256

Log:
  MFC r264363:
  Update the SDT(9) examples to reflect the removal of the sname parameter
  in r258622.

Modified:
  stable/9/share/man/man9/SDT.9
Directory Properties:
  stable/9/share/man/man9/   (props changed)

Modified: stable/9/share/man/man9/SDT.9
==
--- stable/9/share/man/man9/SDT.9   Tue Jul 29 20:37:22 2014
(r269255)
+++ stable/9/share/man/man9/SDT.9   Tue Jul 29 20:38:08 2014
(r269256)
@@ -203,7 +203,7 @@ of type Destination Unreachable:
 .Bd -literal -offset indent
 SDT_PROVIDER_DECLARE(icmp);
 
-SDT_PROBE_DEFINE1(icmp, , unreach, pkt_receive, pkt-receive,
+SDT_PROBE_DEFINE1(icmp, , unreach, pkt__receive,
 struct icmp *);
 
 .Ed
@@ -215,7 +215,7 @@ Consider a DTrace probe which fires when
 packet.
 Such a probe would be defined by multiple tracepoints:
 .Bd -literal -offset indent
-SDT_PROBE_DEFINE3(ip, , , receive, receive, struct ifnet *,
+SDT_PROBE_DEFINE3(ip, , , receive, struct ifnet *,
 struct ip *, struct ip6_hdr *);
 
 int
@@ -271,7 +271,7 @@ all in the
 library path.
 Then the FreeBSD probe above can be defined with:
 .Bd -literal -offset indent
-SDT_PROBE_DEFINE1_XLATE(ip, , , receive, receive, struct icmp *,
+SDT_PROBE_DEFINE1_XLATE(ip, , , receive, struct icmp *,
 struct icmp_hdr_dt *);
 .Ed
 .Sh SEE ALSO
___
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: r269257 - in stable/10: contrib/ldns contrib/ldns/compat contrib/ldns/drill contrib/ldns/ldns contrib/ldns/m4 contrib/unbound contrib/unbound/compat contrib/unbound/daemon contrib/unbou...

2014-07-29 Thread Dag-Erling Smørgrav
Author: des
Date: Tue Jul 29 20:57:38 2014
New Revision: 269257
URL: http://svnweb.freebsd.org/changeset/base/269257

Log:
  MFH (r266114, r266138): upgrade to latest ldns and unbound
  MFH (r266139-r266143, r266145, r266149, r266150): fix props
  MFH (r266179, r266180, r266193, r266238, r266777): misc cleanup
  MFH (r266863): create and use /var/unbound/conf.d
  MFH (r268839): import unblock-lan-zones patch from upstream
  MFH (r268840): fix reverse lookups on private networks
  MFH (r268883): avoid spamming source tree during build
  
  PR:   190739 (for r268883)

Added:
  stable/10/contrib/ldns/README.git
 - copied unchanged from r266114, head/contrib/ldns/README.git
 - copied unchanged from r266114, head/contrib/ldns/ldns/radix.h
  stable/10/contrib/ldns/m4/
 - copied from r266114, head/contrib/ldns/m4/
 - copied unchanged from r266114, head/contrib/ldns/radix.c
  stable/10/contrib/unbound/ax_pthread.m4
 - copied unchanged from r266114, head/contrib/unbound/ax_pthread.m4
 - copied unchanged from r266114, head/contrib/unbound/compat/strlcat.c
  stable/10/contrib/unbound/ldns/
 - copied from r266114, head/contrib/unbound/ldns/
 - copied unchanged from r266114, 
head/contrib/unbound/libunbound/unbound-event.h
Directory Properties:
  stable/10/contrib/ldns/ldns/radix.h   (props changed)
  stable/10/contrib/ldns/radix.c   (props changed)
  stable/10/contrib/unbound/compat/strlcat.c   (props changed)
  stable/10/contrib/unbound/libunbound/unbound-event.h   (props changed)
Deleted:
  stable/10/contrib/ldns/README.svn
  stable/10/contrib/ldns/compat/b32_ntop.c
  stable/10/contrib/ldns/compat/b32_pton.c
  stable/10/contrib/unbound/acx_pthread.m4
  stable/10/contrib/unbound/util/configlexer.c
  stable/10/contrib/unbound/util/configparser.c
  stable/10/contrib/unbound/util/configparser.h
Modified:
  stable/10/contrib/ldns/Changelog
  stable/10/contrib/ldns/Makefile.in
  stable/10/contrib/ldns/README
  stable/10/contrib/ldns/acx_nlnetlabs.m4
  stable/10/contrib/ldns/ax_python_devel.m4
  stable/10/contrib/ldns/compat/b64_ntop.c
  stable/10/contrib/ldns/compat/b64_pton.c
  stable/10/contrib/ldns/compat/snprintf.c
  stable/10/contrib/ldns/configure
  stable/10/contrib/ldns/configure.ac
  stable/10/contrib/ldns/dane.c   (contents, props changed)
  stable/10/contrib/ldns/dnssec.c
  stable/10/contrib/ldns/dnssec_sign.c
  stable/10/contrib/ldns/dnssec_zone.c
  stable/10/contrib/ldns/drill/chasetrace.c
  stable/10/contrib/ldns/drill/configure
  stable/10/contrib/ldns/drill/configure.ac
  stable/10/contrib/ldns/drill/drill.1.in
  stable/10/contrib/ldns/drill/drill.c
  stable/10/contrib/ldns/drill/drill_util.c
  stable/10/contrib/ldns/drill/securetrace.c
  stable/10/contrib/ldns/drill/work.c
  stable/10/contrib/ldns/error.c
  stable/10/contrib/ldns/higher.c
  stable/10/contrib/ldns/host2str.c
  stable/10/contrib/ldns/host2wire.c
  stable/10/contrib/ldns/install-sh
  stable/10/contrib/ldns/keys.c
  stable/10/contrib/ldns/ldns/common.h
  stable/10/contrib/ldns/ldns/common.h.in
  stable/10/contrib/ldns/ldns/config.h
  stable/10/contrib/ldns/ldns/config.h.in
  stable/10/contrib/ldns/ldns/dane.h   (contents, props changed)
  stable/10/contrib/ldns/ldns/dnssec.h
  stable/10/contrib/ldns/ldns/dnssec_sign.h
  stable/10/contrib/ldns/ldns/dnssec_zone.h
  stable/10/contrib/ldns/ldns/error.h
  stable/10/contrib/ldns/ldns/host2str.h
  stable/10/contrib/ldns/ldns/ldns.h
  stable/10/contrib/ldns/ldns/net.h
  stable/10/contrib/ldns/ldns/net.h.in
  stable/10/contrib/ldns/ldns/packet.h
  stable/10/contrib/ldns/ldns/rdata.h
  stable/10/contrib/ldns/ldns/resolver.h
  stable/10/contrib/ldns/ldns/rr.h
  stable/10/contrib/ldns/ldns/str2host.h
  stable/10/contrib/ldns/ldns/util.h
  stable/10/contrib/ldns/ldns/util.h.in
  stable/10/contrib/ldns/net.c
  stable/10/contrib/ldns/packet.c
  stable/10/contrib/ldns/parse.c
  stable/10/contrib/ldns/rdata.c
  stable/10/contrib/ldns/resolver.c
  stable/10/contrib/ldns/rr.c
  stable/10/contrib/ldns/sha1.c
  stable/10/contrib/ldns/sha2.c
  stable/10/contrib/ldns/str2host.c
  stable/10/contrib/ldns/tsig.c
  stable/10/contrib/ldns/util.c
  stable/10/contrib/ldns/wire2host.c
  stable/10/contrib/unbound/LICENSE
  stable/10/contrib/unbound/Makefile.in
  stable/10/contrib/unbound/acx_nlnetlabs.m4
  stable/10/contrib/unbound/compat/snprintf.c
  stable/10/contrib/unbound/config.h
  stable/10/contrib/unbound/config.h.in
  stable/10/contrib/unbound/configure
  stable/10/contrib/unbound/configure.ac
  stable/10/contrib/unbound/daemon/acl_list.c
  stable/10/contrib/unbound/daemon/acl_list.h
  stable/10/contrib/unbound/daemon/cachedump.c
  stable/10/contrib/unbound/daemon/cachedump.h
  stable/10/contrib/unbound/daemon/daemon.c
  stable/10/contrib/unbound/daemon/daemon.h
  stable/10/contrib/unbound/daemon/remote.c
  stable/10/contrib/unbound/daemon/remote.h
  stable/10/contrib/unbound/daemon/stats.c
  stable/10/contrib/unbound/daemon/stats.h
  

svn commit: r269258 - stable/10/sys/dev/e1000

2014-07-29 Thread Rick Macklem
Author: rmacklem
Date: Tue Jul 29 21:05:51 2014
New Revision: 269258
URL: http://svnweb.freebsd.org/changeset/base/269258

Log:
  MFC: r268726
  Move the retry: label so that the calls to m_pullup() are
  not done after the call to m_defrag(). This fixes a problem
  where m_pullup() would prepend an mbuf to the list created
  by m_defrag() making the chain greater than 32 again.

Modified:
  stable/10/sys/dev/e1000/if_em.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/e1000/if_em.c
==
--- stable/10/sys/dev/e1000/if_em.c Tue Jul 29 20:57:38 2014
(r269257)
+++ stable/10/sys/dev/e1000/if_em.c Tue Jul 29 21:05:51 2014
(r269258)
@@ -1830,7 +1830,6 @@ em_xmit(struct tx_ring *txr, struct mbuf
int nsegs, i, j, first, last = 0;
int error, do_tso, tso_desc = 0, remap = 1;
 
-retry:
m_head = *m_headp;
txd_upper = txd_lower = txd_used = txd_saved = 0;
do_tso = ((m_head-m_pkthdr.csum_flags  CSUM_TSO) != 0);
@@ -1956,6 +1955,7 @@ retry:
tx_buffer_mapped = tx_buffer;
map = tx_buffer-map;
 
+retry:
error = bus_dmamap_load_mbuf_sg(txr-txtag, map,
*m_headp, segs, nsegs, BUS_DMA_NOWAIT);
 
___
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: r269188 - head/sys/dev/vt

2014-07-29 Thread Aleksandr Rybalko
On Mon, 28 Jul 2014 16:37:23 +0200
Stefan Farfeleder stef...@freebsd.org wrote:

 On Mon, Jul 28, 2014 at 02:22:34PM +, Aleksandr Rybalko wrote:
  Author: ray
  Date: Mon Jul 28 14:22:34 2014
  New Revision: 269188
  URL: http://svnweb.freebsd.org/changeset/base/269188
  
  Log:
Avoid embedding buffers into static virtual terminal window.

MFC after:1 week
Sponsored by: The FreeBSD Foundation
  
  Modified:
head/sys/dev/vt/vt_core.c
  
  Modified: head/sys/dev/vt/vt_core.c
  ==
  --- head/sys/dev/vt/vt_core.c   Mon Jul 28 14:20:31 2014
  (r269187)
  +++ head/sys/dev/vt/vt_core.c   Mon Jul 28 14:22:34 2014
  (r269188)
  @@ -166,8 +166,8 @@ static struct vt_window vt_conswindow = 
  .vw_number = VT_CONSWINDOW,
  .vw_flags = VWF_CONSOLE,
  .vw_buf = {
  -   .vb_buffer = vt_constextbuf,
  -   .vb_rows = vt_constextbufrows,
  +   .vb_buffer = vt_constextbuf[0],
  +   .vb_rows = vt_constextbufrows[0],
  .vb_history_size = VBF_DEFAULT_HISTORY_SIZE,
  .vb_curroffset = 0,
  .vb_roffset = 0,
  
 
 Hi Aleksandr,
 
 What's that supposed to change exactly? I'd be very surprised if it
 didn't produce the same binary code.
 
 BR,
 Stefan

Hi Stefan!

yeah, you a right, it's change nothing. I did wrong assumption, confuse with 
other things.
But will left it. It looks better for me :) 

Thanks for review!

WBW
-- 
Aleksandr Rybalko r...@ddteam.net
___
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: r269259 - stable/9/lib/libc/sys

2014-07-29 Thread Mark Johnston
Author: markj
Date: Tue Jul 29 21:15:24 2014
New Revision: 269259
URL: http://svnweb.freebsd.org/changeset/base/269259

Log:
  MFC r268446:
  Fix a typo.

Modified:
  stable/9/lib/libc/sys/procctl.2
Directory Properties:
  stable/9/lib/libc/   (props changed)
  stable/9/lib/libc/sys/   (props changed)

Modified: stable/9/lib/libc/sys/procctl.2
==
--- stable/9/lib/libc/sys/procctl.2 Tue Jul 29 21:05:51 2014
(r269258)
+++ stable/9/lib/libc/sys/procctl.2 Tue Jul 29 21:15:24 2014
(r269259)
@@ -50,7 +50,7 @@ If multiple processes match the identifi
 .Nm
 will make a
 .Dq best effort
-to control as many of the selected possibles as possible.
+to control as many of the selected processes as possible.
 An error is only returned if no selected processes successfully complete
 the request.
 The following identifier types are supported:
___
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: r269263 - stable/10/cddl/contrib/opensolaris/lib/libdtrace/common

2014-07-29 Thread Mark Johnston
Author: markj
Date: Tue Jul 29 21:21:16 2014
New Revision: 269263
URL: http://svnweb.freebsd.org/changeset/base/269263

Log:
  MFC r264486:
  Use the correct format specifiers for wide characters and strings of wide
  characters.

Modified:
  stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_printf.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_printf.c
==
--- stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_printf.c Tue Jul 
29 21:21:15 2014(r269262)
+++ stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_printf.c Tue Jul 
29 21:21:16 2014(r269263)
@@ -694,8 +694,13 @@ static const dt_pfconv_t _dtrace_convers
 { S, s, pfproto_cstr, pfcheck_str, pfprint_estr },
 { T, s, int64_t, pfcheck_time, pfprint_time822 },
 { u, u, pfproto_xint, pfcheck_xint, pfprint_uint },
+#if defined(sun)
 { wc,wc, int, pfcheck_type, pfprint_sint }, /* a.k.a. wchar_t */
 { ws, ws, pfproto_wstr, pfcheck_wstr, pfprint_wstr },
+#else
+{ wc, lc, int, pfcheck_type, pfprint_sint }, /* a.k.a. wchar_t */
+{ ws, ls, pfproto_wstr, pfcheck_wstr, pfprint_wstr },
+#endif
 { x, x, pfproto_xint, pfcheck_xint, pfprint_uint },
 { X, X, pfproto_xint, pfcheck_xint, pfprint_uint },
 { Y, s, int64_t, pfcheck_time, pfprint_time },
___
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: r269262 - stable/9/cddl/contrib/opensolaris/lib/libdtrace/common

2014-07-29 Thread Mark Johnston
Author: markj
Date: Tue Jul 29 21:21:15 2014
New Revision: 269262
URL: http://svnweb.freebsd.org/changeset/base/269262

Log:
  MFC r264486:
  Use the correct format specifiers for wide characters and strings of wide
  characters.

Modified:
  stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_printf.c
Directory Properties:
  stable/9/cddl/contrib/opensolaris/   (props changed)
  stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/   (props changed)

Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_printf.c
==
--- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_printf.c  Tue Jul 
29 21:16:35 2014(r269261)
+++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_printf.c  Tue Jul 
29 21:21:15 2014(r269262)
@@ -694,8 +694,13 @@ static const dt_pfconv_t _dtrace_convers
 { S, s, pfproto_cstr, pfcheck_str, pfprint_estr },
 { T, s, int64_t, pfcheck_time, pfprint_time822 },
 { u, u, pfproto_xint, pfcheck_xint, pfprint_uint },
+#if defined(sun)
 { wc,wc, int, pfcheck_type, pfprint_sint }, /* a.k.a. wchar_t */
 { ws, ws, pfproto_wstr, pfcheck_wstr, pfprint_wstr },
+#else
+{ wc, lc, int, pfcheck_type, pfprint_sint }, /* a.k.a. wchar_t */
+{ ws, ls, pfproto_wstr, pfcheck_wstr, pfprint_wstr },
+#endif
 { x, x, pfproto_xint, pfcheck_xint, pfprint_uint },
 { X, X, pfproto_xint, pfcheck_xint, pfprint_uint },
 { Y, s, int64_t, pfcheck_time, pfprint_time },
___
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: r269260 - stable/10/lib/libc/sys

2014-07-29 Thread Mark Johnston
Author: markj
Date: Tue Jul 29 21:15:26 2014
New Revision: 269260
URL: http://svnweb.freebsd.org/changeset/base/269260

Log:
  MFC r268446:
  Fix a typo.

Modified:
  stable/10/lib/libc/sys/procctl.2
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/sys/procctl.2
==
--- stable/10/lib/libc/sys/procctl.2Tue Jul 29 21:15:24 2014
(r269259)
+++ stable/10/lib/libc/sys/procctl.2Tue Jul 29 21:15:26 2014
(r269260)
@@ -50,7 +50,7 @@ If multiple processes match the identifi
 .Nm
 will make a
 .Dq best effort
-to control as many of the selected possibles as possible.
+to control as many of the selected processes as possible.
 An error is only returned if no selected processes successfully complete
 the request.
 The following identifier types are supported:
___
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: r269266 - stable/10/sys/dev/usb/wlan

2014-07-29 Thread Hans Petter Selasky
Author: hselasky
Date: Tue Jul 29 21:59:24 2014
New Revision: 269266
URL: http://svnweb.freebsd.org/changeset/base/269266

Log:
  MFC r269127:
  Fix for division by zero.

Modified:
  stable/10/sys/dev/usb/wlan/if_rum.c
  stable/10/sys/dev/usb/wlan/if_ural.c
  stable/10/sys/dev/usb/wlan/if_zyd.c
  stable/10/sys/dev/usb/wlan/if_zydreg.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/usb/wlan/if_rum.c
==
--- stable/10/sys/dev/usb/wlan/if_rum.c Tue Jul 29 21:38:06 2014
(r269265)
+++ stable/10/sys/dev/usb/wlan/if_rum.c Tue Jul 29 21:59:24 2014
(r269266)
@@ -1034,6 +1034,8 @@ rum_setup_tx_desc(struct rum_softc *sc, 
desc-plcp_length_hi = plcp_length  6;
desc-plcp_length_lo = plcp_length  0x3f;
} else {
+   if (rate == 0)
+   rate = 2;   /* avoid division by zero */
plcp_length = (16 * len + rate - 1) / rate;
if (rate == 22) {
remainder = (16 * len) % 22;

Modified: stable/10/sys/dev/usb/wlan/if_ural.c
==
--- stable/10/sys/dev/usb/wlan/if_ural.cTue Jul 29 21:38:06 2014
(r269265)
+++ stable/10/sys/dev/usb/wlan/if_ural.cTue Jul 29 21:59:24 2014
(r269266)
@@ -1037,6 +1037,8 @@ ural_setup_tx_desc(struct ural_softc *sc
desc-plcp_length_hi = plcp_length  6;
desc-plcp_length_lo = plcp_length  0x3f;
} else {
+   if (rate == 0)
+   rate = 2;   /* avoid division by zero */
plcp_length = (16 * len + rate - 1) / rate;
if (rate == 22) {
remainder = (16 * len) % 22;

Modified: stable/10/sys/dev/usb/wlan/if_zyd.c
==
--- stable/10/sys/dev/usb/wlan/if_zyd.c Tue Jul 29 21:38:06 2014
(r269265)
+++ stable/10/sys/dev/usb/wlan/if_zyd.c Tue Jul 29 21:59:24 2014
(r269266)
@@ -2479,7 +2479,7 @@ zyd_tx_start(struct zyd_softc *sc, struc
const struct ieee80211_txparam *tp;
struct ieee80211_key *k;
int rate, totlen;
-   static uint8_t ratediv[] = ZYD_TX_RATEDIV;
+   static const uint8_t ratediv[] = ZYD_TX_RATEDIV;
uint8_t phy;
uint16_t pktlen;
uint32_t bits;

Modified: stable/10/sys/dev/usb/wlan/if_zydreg.h
==
--- stable/10/sys/dev/usb/wlan/if_zydreg.h  Tue Jul 29 21:38:06 2014
(r269265)
+++ stable/10/sys/dev/usb/wlan/if_zydreg.h  Tue Jul 29 21:59:24 2014
(r269266)
@@ -970,7 +970,7 @@
 
 #defineZYD_TX_RATEDIV  
\
 {  \
-   0x1, 0x2, 0xb, 0xb, 0x0, 0x0, 0x0, 0x0, 0x30, 0x18, 0xc, 0x6,   \
+   0x1, 0x2, 0xb, 0xb, 0x1, 0x1, 0x1, 0x1, 0x30, 0x18, 0xc, 0x6,   \
0x36, 0x24, 0x12, 0x9   \
 }
 
___
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: r269267 - stable/9/sys/dev/usb/wlan

2014-07-29 Thread Hans Petter Selasky
Author: hselasky
Date: Tue Jul 29 22:00:54 2014
New Revision: 269267
URL: http://svnweb.freebsd.org/changeset/base/269267

Log:
  MFC r269127:
  Fix for division by zero.

Modified:
  stable/9/sys/dev/usb/wlan/if_rum.c
  stable/9/sys/dev/usb/wlan/if_ural.c
  stable/9/sys/dev/usb/wlan/if_zyd.c
  stable/9/sys/dev/usb/wlan/if_zydreg.h
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/usb/wlan/if_rum.c
==
--- stable/9/sys/dev/usb/wlan/if_rum.c  Tue Jul 29 21:59:24 2014
(r269266)
+++ stable/9/sys/dev/usb/wlan/if_rum.c  Tue Jul 29 22:00:54 2014
(r269267)
@@ -1034,6 +1034,8 @@ rum_setup_tx_desc(struct rum_softc *sc, 
desc-plcp_length_hi = plcp_length  6;
desc-plcp_length_lo = plcp_length  0x3f;
} else {
+   if (rate == 0)
+   rate = 2;   /* avoid division by zero */
plcp_length = (16 * len + rate - 1) / rate;
if (rate == 22) {
remainder = (16 * len) % 22;

Modified: stable/9/sys/dev/usb/wlan/if_ural.c
==
--- stable/9/sys/dev/usb/wlan/if_ural.c Tue Jul 29 21:59:24 2014
(r269266)
+++ stable/9/sys/dev/usb/wlan/if_ural.c Tue Jul 29 22:00:54 2014
(r269267)
@@ -1037,6 +1037,8 @@ ural_setup_tx_desc(struct ural_softc *sc
desc-plcp_length_hi = plcp_length  6;
desc-plcp_length_lo = plcp_length  0x3f;
} else {
+   if (rate == 0)
+   rate = 2;   /* avoid division by zero */
plcp_length = (16 * len + rate - 1) / rate;
if (rate == 22) {
remainder = (16 * len) % 22;

Modified: stable/9/sys/dev/usb/wlan/if_zyd.c
==
--- stable/9/sys/dev/usb/wlan/if_zyd.c  Tue Jul 29 21:59:24 2014
(r269266)
+++ stable/9/sys/dev/usb/wlan/if_zyd.c  Tue Jul 29 22:00:54 2014
(r269267)
@@ -2479,7 +2479,7 @@ zyd_tx_start(struct zyd_softc *sc, struc
const struct ieee80211_txparam *tp;
struct ieee80211_key *k;
int rate, totlen;
-   static uint8_t ratediv[] = ZYD_TX_RATEDIV;
+   static const uint8_t ratediv[] = ZYD_TX_RATEDIV;
uint8_t phy;
uint16_t pktlen;
uint32_t bits;

Modified: stable/9/sys/dev/usb/wlan/if_zydreg.h
==
--- stable/9/sys/dev/usb/wlan/if_zydreg.h   Tue Jul 29 21:59:24 2014
(r269266)
+++ stable/9/sys/dev/usb/wlan/if_zydreg.h   Tue Jul 29 22:00:54 2014
(r269267)
@@ -970,7 +970,7 @@
 
 #defineZYD_TX_RATEDIV  
\
 {  \
-   0x1, 0x2, 0xb, 0xb, 0x0, 0x0, 0x0, 0x0, 0x30, 0x18, 0xc, 0x6,   \
+   0x1, 0x2, 0xb, 0xb, 0x1, 0x1, 0x1, 0x1, 0x30, 0x18, 0xc, 0x6,   \
0x36, 0x24, 0x12, 0x9   \
 }
 
___
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: r269268 - stable/8/sys/dev/usb/wlan

2014-07-29 Thread Hans Petter Selasky
Author: hselasky
Date: Tue Jul 29 22:02:27 2014
New Revision: 269268
URL: http://svnweb.freebsd.org/changeset/base/269268

Log:
  MFC r269127:
  Fix for division by zero.

Modified:
  stable/8/sys/dev/usb/wlan/if_rum.c
  stable/8/sys/dev/usb/wlan/if_ural.c
  stable/8/sys/dev/usb/wlan/if_zyd.c
  stable/8/sys/dev/usb/wlan/if_zydreg.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/dev/   (props changed)
  stable/8/sys/dev/usb/   (props changed)

Modified: stable/8/sys/dev/usb/wlan/if_rum.c
==
--- stable/8/sys/dev/usb/wlan/if_rum.c  Tue Jul 29 22:00:54 2014
(r269267)
+++ stable/8/sys/dev/usb/wlan/if_rum.c  Tue Jul 29 22:02:27 2014
(r269268)
@@ -1019,6 +1019,8 @@ rum_setup_tx_desc(struct rum_softc *sc, 
desc-plcp_length_hi = plcp_length  6;
desc-plcp_length_lo = plcp_length  0x3f;
} else {
+   if (rate == 0)
+   rate = 2;   /* avoid division by zero */
plcp_length = (16 * len + rate - 1) / rate;
if (rate == 22) {
remainder = (16 * len) % 22;

Modified: stable/8/sys/dev/usb/wlan/if_ural.c
==
--- stable/8/sys/dev/usb/wlan/if_ural.c Tue Jul 29 22:00:54 2014
(r269267)
+++ stable/8/sys/dev/usb/wlan/if_ural.c Tue Jul 29 22:02:27 2014
(r269268)
@@ -1022,6 +1022,8 @@ ural_setup_tx_desc(struct ural_softc *sc
desc-plcp_length_hi = plcp_length  6;
desc-plcp_length_lo = plcp_length  0x3f;
} else {
+   if (rate == 0)
+   rate = 2;   /* avoid division by zero */
plcp_length = (16 * len + rate - 1) / rate;
if (rate == 22) {
remainder = (16 * len) % 22;

Modified: stable/8/sys/dev/usb/wlan/if_zyd.c
==
--- stable/8/sys/dev/usb/wlan/if_zyd.c  Tue Jul 29 22:00:54 2014
(r269267)
+++ stable/8/sys/dev/usb/wlan/if_zyd.c  Tue Jul 29 22:02:27 2014
(r269268)
@@ -2457,7 +2457,7 @@ zyd_tx_start(struct zyd_softc *sc, struc
const struct ieee80211_txparam *tp;
struct ieee80211_key *k;
int rate, totlen;
-   static uint8_t ratediv[] = ZYD_TX_RATEDIV;
+   static const uint8_t ratediv[] = ZYD_TX_RATEDIV;
uint8_t phy;
uint16_t pktlen;
uint32_t bits;

Modified: stable/8/sys/dev/usb/wlan/if_zydreg.h
==
--- stable/8/sys/dev/usb/wlan/if_zydreg.h   Tue Jul 29 22:00:54 2014
(r269267)
+++ stable/8/sys/dev/usb/wlan/if_zydreg.h   Tue Jul 29 22:02:27 2014
(r269268)
@@ -970,7 +970,7 @@
 
 #defineZYD_TX_RATEDIV  
\
 {  \
-   0x1, 0x2, 0xb, 0xb, 0x0, 0x0, 0x0, 0x0, 0x30, 0x18, 0xc, 0x6,   \
+   0x1, 0x2, 0xb, 0xb, 0x1, 0x1, 0x1, 0x1, 0x30, 0x18, 0xc, 0x6,   \
0x36, 0x24, 0x12, 0x9   \
 }
 
___
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: r269269 - in stable/9/sys/dev/usb: . serial

2014-07-29 Thread Hans Petter Selasky
Author: hselasky
Date: Tue Jul 29 22:04:06 2014
New Revision: 269269
URL: http://svnweb.freebsd.org/changeset/base/269269

Log:
  MFC r268929:
  Add new device ID.
  
  PR:   191959

Modified:
  stable/9/sys/dev/usb/serial/u3g.c
  stable/9/sys/dev/usb/usbdevs
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/usb/serial/u3g.c
==
--- stable/9/sys/dev/usb/serial/u3g.c   Tue Jul 29 22:02:27 2014
(r269268)
+++ stable/9/sys/dev/usb/serial/u3g.c   Tue Jul 29 22:04:06 2014
(r269269)
@@ -343,6 +343,7 @@ static const STRUCT_USB_HOST_ID u3g_devs
U3G_DEV(NOVATEL, EU870D, 0),
U3G_DEV(NOVATEL, MC760, 0),
U3G_DEV(NOVATEL, MC547, 0),
+   U3G_DEV(NOVATEL, MC679, 0),
U3G_DEV(NOVATEL, MC950D, 0),
U3G_DEV(NOVATEL, MIFI2200, U3GINIT_SCSIEJECT),
U3G_DEV(NOVATEL, MIFI2200V, U3GINIT_SCSIEJECT),

Modified: stable/9/sys/dev/usb/usbdevs
==
--- stable/9/sys/dev/usb/usbdevsTue Jul 29 22:02:27 2014
(r269268)
+++ stable/9/sys/dev/usb/usbdevsTue Jul 29 22:04:06 2014
(r269269)
@@ -3237,6 +3237,7 @@ product NOVATEL U727_20x5100  Merlin U7
 product NOVATEL U760   0x6000  Novatel U760
 product NOVATEL MC760  0x6002  Novatel MC760
 product NOVATEL MC547  0x7042  Novatel MC547
+product NOVATEL MC679  0x7031  Novatel MC679
 product NOVATEL2 FLEXPACKGPS   0x0100  NovAtel FlexPack GPS receiver
 
 /* Merlin products */
___
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: r269270 - in stable/10/sys/dev/usb: . serial

2014-07-29 Thread Hans Petter Selasky
Author: hselasky
Date: Tue Jul 29 22:05:33 2014
New Revision: 269270
URL: http://svnweb.freebsd.org/changeset/base/269270

Log:
  MFC r268929:
  Add new device ID.
  
  PR:   191959

Modified:
  stable/10/sys/dev/usb/serial/u3g.c
  stable/10/sys/dev/usb/usbdevs
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/usb/serial/u3g.c
==
--- stable/10/sys/dev/usb/serial/u3g.c  Tue Jul 29 22:04:06 2014
(r269269)
+++ stable/10/sys/dev/usb/serial/u3g.c  Tue Jul 29 22:05:33 2014
(r269270)
@@ -343,6 +343,7 @@ static const STRUCT_USB_HOST_ID u3g_devs
U3G_DEV(NOVATEL, EU870D, 0),
U3G_DEV(NOVATEL, MC760, 0),
U3G_DEV(NOVATEL, MC547, 0),
+   U3G_DEV(NOVATEL, MC679, 0),
U3G_DEV(NOVATEL, MC950D, 0),
U3G_DEV(NOVATEL, MIFI2200, U3GINIT_SCSIEJECT),
U3G_DEV(NOVATEL, MIFI2200V, U3GINIT_SCSIEJECT),

Modified: stable/10/sys/dev/usb/usbdevs
==
--- stable/10/sys/dev/usb/usbdevs   Tue Jul 29 22:04:06 2014
(r269269)
+++ stable/10/sys/dev/usb/usbdevs   Tue Jul 29 22:05:33 2014
(r269270)
@@ -3238,6 +3238,7 @@ product NOVATEL U727_20x5100  Merlin U7
 product NOVATEL U760   0x6000  Novatel U760
 product NOVATEL MC760  0x6002  Novatel MC760
 product NOVATEL MC547  0x7042  Novatel MC547
+product NOVATEL MC679  0x7031  Novatel MC679
 product NOVATEL2 FLEXPACKGPS   0x0100  NovAtel FlexPack GPS receiver
 
 /* Merlin products */
___
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: r269271 - in stable/8/sys/dev/usb: . serial

2014-07-29 Thread Hans Petter Selasky
Author: hselasky
Date: Tue Jul 29 22:07:52 2014
New Revision: 269271
URL: http://svnweb.freebsd.org/changeset/base/269271

Log:
  MFC r268929:
  Add new device ID.
  
  PR:   191959

Modified:
  stable/8/sys/dev/usb/serial/u3g.c
  stable/8/sys/dev/usb/usbdevs
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/dev/   (props changed)
  stable/8/sys/dev/usb/   (props changed)

Modified: stable/8/sys/dev/usb/serial/u3g.c
==
--- stable/8/sys/dev/usb/serial/u3g.c   Tue Jul 29 22:05:33 2014
(r269270)
+++ stable/8/sys/dev/usb/serial/u3g.c   Tue Jul 29 22:07:52 2014
(r269271)
@@ -339,6 +339,7 @@ static const STRUCT_USB_HOST_ID u3g_devs
U3G_DEV(NOVATEL, EU870D, 0),
U3G_DEV(NOVATEL, MC760, 0),
U3G_DEV(NOVATEL, MC547, 0),
+   U3G_DEV(NOVATEL, MC679, 0),
U3G_DEV(NOVATEL, MC950D, 0),
U3G_DEV(NOVATEL, MIFI2200V, U3GINIT_SCSIEJECT),
U3G_DEV(NOVATEL, U720, 0),

Modified: stable/8/sys/dev/usb/usbdevs
==
--- stable/8/sys/dev/usb/usbdevsTue Jul 29 22:05:33 2014
(r269270)
+++ stable/8/sys/dev/usb/usbdevsTue Jul 29 22:07:52 2014
(r269271)
@@ -3235,6 +3235,7 @@ product NOVATEL U727_20x5100  Merlin U7
 product NOVATEL U760   0x6000  Novatel U760
 product NOVATEL MC760  0x6002  Novatel MC760
 product NOVATEL MC547  0x7042  Novatel MC547
+product NOVATEL MC679  0x7031  Novatel MC679
 product NOVATEL2 FLEXPACKGPS   0x0100  NovAtel FlexPack GPS receiver
 
 /* Merlin products */
___
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: r269272 - stable/10/sys/cddl/dev/systrace

2014-07-29 Thread Mark Johnston
Author: markj
Date: Tue Jul 29 22:26:41 2014
New Revision: 269272
URL: http://svnweb.freebsd.org/changeset/base/269272

Log:
  MFC r264435:
  Ensure that all eight syscall arguments are available to dtrace_probe(),
  rather than just the first five.

Modified:
  stable/10/sys/cddl/dev/systrace/systrace.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cddl/dev/systrace/systrace.c
==
--- stable/10/sys/cddl/dev/systrace/systrace.c  Tue Jul 29 22:07:52 2014
(r269271)
+++ stable/10/sys/cddl/dev/systrace/systrace.c  Tue Jul 29 22:26:41 2014
(r269272)
@@ -168,6 +168,9 @@ static dtrace_pops_t systrace_pops = {
 static struct cdev *systrace_cdev;
 static dtrace_provider_id_tsystrace_id;
 
+typedef void (*systrace_dtrace_probe_t)(dtrace_id_t, uintptr_t, uintptr_t,
+uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t);
+
 #if !defined(LINUX_SYSTRACE)
 /*
  * Probe callback function.
@@ -180,6 +183,7 @@ static void
 systrace_probe(u_int32_t id, int sysnum, struct sysent *sysent, void *params,
 int ret)
 {
+   systrace_dtrace_probe_t probe;
int n_args  = 0;
u_int64_t   uargs[8];
 
@@ -211,7 +215,9 @@ systrace_probe(u_int32_t id, int sysnum,
}
 
/* Process the probe using the converted argments. */
-   dtrace_probe(id, uargs[0], uargs[1], uargs[2], uargs[3], uargs[4]);
+   probe = (systrace_dtrace_probe_t)dtrace_probe;
+   probe(id, uargs[0], uargs[1], uargs[2], uargs[3], uargs[4], uargs[5],
+   uargs[6], uargs[7]);
 }
 
 #endif
___
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: r269273 - stable/9/sys/cddl/dev/systrace

2014-07-29 Thread Mark Johnston
Author: markj
Date: Tue Jul 29 22:26:42 2014
New Revision: 269273
URL: http://svnweb.freebsd.org/changeset/base/269273

Log:
  MFC r264435:
  Ensure that all eight syscall arguments are available to dtrace_probe(),
  rather than just the first five.

Modified:
  stable/9/sys/cddl/dev/systrace/systrace.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/cddl/dev/systrace/systrace.c
==
--- stable/9/sys/cddl/dev/systrace/systrace.c   Tue Jul 29 22:26:41 2014
(r269272)
+++ stable/9/sys/cddl/dev/systrace/systrace.c   Tue Jul 29 22:26:42 2014
(r269273)
@@ -168,6 +168,9 @@ static dtrace_pops_t systrace_pops = {
 static struct cdev *systrace_cdev;
 static dtrace_provider_id_tsystrace_id;
 
+typedef void (*systrace_dtrace_probe_t)(dtrace_id_t, uintptr_t, uintptr_t,
+uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t);
+
 #if !defined(LINUX_SYSTRACE)
 /*
  * Probe callback function.
@@ -180,6 +183,7 @@ static void
 systrace_probe(u_int32_t id, int sysnum, struct sysent *sysent, void *params,
 int ret)
 {
+   systrace_dtrace_probe_t probe;
int n_args  = 0;
u_int64_t   uargs[8];
 
@@ -211,7 +215,9 @@ systrace_probe(u_int32_t id, int sysnum,
}
 
/* Process the probe using the converted argments. */
-   dtrace_probe(id, uargs[0], uargs[1], uargs[2], uargs[3], uargs[4]);
+   probe = (systrace_dtrace_probe_t)dtrace_probe;
+   probe(id, uargs[0], uargs[1], uargs[2], uargs[3], uargs[4], uargs[5],
+   uargs[6], uargs[7]);
 }
 #endif
 
___
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: r269275 - stable/9/lib/libutil

2014-07-29 Thread Mark Johnston
Author: markj
Date: Tue Jul 29 22:29:32 2014
New Revision: 269275
URL: http://svnweb.freebsd.org/changeset/base/269275

Log:
  MFC r265276:
  Fix a typo.

Modified:
  stable/9/lib/libutil/kinfo_getfile.3
Directory Properties:
  stable/9/lib/libutil/   (props changed)

Modified: stable/9/lib/libutil/kinfo_getfile.3
==
--- stable/9/lib/libutil/kinfo_getfile.3Tue Jul 29 22:29:31 2014
(r269274)
+++ stable/9/lib/libutil/kinfo_getfile.3Tue Jul 29 22:29:32 2014
(r269275)
@@ -48,7 +48,7 @@ field contains the process identifier.
 This should be the a process that you have privilege to access.
 The
 .Ar cntp
-field is allows the caller to know how many records are returned.
+field allows the caller to know how many records are returned.
 .Pp
 This function is a wrapper around
 .Xr sysctl 3
___
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: r269274 - stable/10/lib/libutil

2014-07-29 Thread Mark Johnston
Author: markj
Date: Tue Jul 29 22:29:31 2014
New Revision: 269274
URL: http://svnweb.freebsd.org/changeset/base/269274

Log:
  MFC r265276:
  Fix a typo.

Modified:
  stable/10/lib/libutil/kinfo_getfile.3
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libutil/kinfo_getfile.3
==
--- stable/10/lib/libutil/kinfo_getfile.3   Tue Jul 29 22:26:42 2014
(r269273)
+++ stable/10/lib/libutil/kinfo_getfile.3   Tue Jul 29 22:29:31 2014
(r269274)
@@ -48,7 +48,7 @@ field contains the process identifier.
 This should be the a process that you have privilege to access.
 The
 .Ar cntp
-field is allows the caller to know how many records are returned.
+field allows the caller to know how many records are returned.
 .Pp
 This function is a wrapper around
 .Xr sysctl 3
___
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: r269278 - in head: . sys/dev/vt/hw/ofwfb

2014-07-29 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Tue Jul 29 23:11:05 2014
New Revision: 269278
URL: http://svnweb.freebsd.org/changeset/base/269278

Log:
  Make mmap() of the console device when using ofwfb work like other supported
  framebuffer drivers. This lets ofwfb work with xf86-video-scfb and makes
  the driver much more generic and less PCI-centric. This changes some
  user-visible behavior and will require updates to the xorg-server port
  on PowerPC when using ATI graphics cards.

Modified:
  head/UPDATING
  head/sys/dev/vt/hw/ofwfb/ofwfb.c

Modified: head/UPDATING
==
--- head/UPDATING   Tue Jul 29 23:06:06 2014(r269277)
+++ head/UPDATING   Tue Jul 29 23:11:05 2014(r269278)
@@ -31,6 +31,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11
disable the most expensive debugging functionality run
ln -s 'abort:false,junk:false' /etc/malloc.conf.)
 
+20140729:
+   The ofwfb driver, used to provide a graphics console on PowerPC when
+   using vt(4), no longer allows mmap() of all of physical memory. This
+   will prevent Xorg on PowerPC with some ATI graphics cards from
+   initializing properly unless x11-servers/xorg-server is updated to
+   1.12.4_8 or newer.
+
 20140723:
The xdev targets have been converted to using TARGET and
TARGET_ARCH instead of XDEV and XDEV_ARCH.

Modified: head/sys/dev/vt/hw/ofwfb/ofwfb.c
==
--- head/sys/dev/vt/hw/ofwfb/ofwfb.cTue Jul 29 23:06:06 2014
(r269277)
+++ head/sys/dev/vt/hw/ofwfb/ofwfb.cTue Jul 29 23:11:05 2014
(r269278)
@@ -52,16 +52,13 @@ struct ofwfb_softc {
struct fb_info  fb;
 
phandle_t   sc_node;
+   ihandle_t   sc_handle;
bus_space_tag_t sc_memt; 
-
-   struct ofw_pci_register sc_pciaddrs[8];
-   int sc_num_pciaddrs;
 };
 
 static vd_probe_t  ofwfb_probe;
 static vd_init_t   ofwfb_init;
 static vd_bitbltchr_t  ofwfb_bitbltchr;
-static vd_fb_mmap_tofwfb_mmap;
 
 static const struct vt_driver vt_ofwfb_driver = {
.vd_name= ofwfb,
@@ -70,7 +67,8 @@ static const struct vt_driver vt_ofwfb_d
.vd_blank   = vt_fb_blank,
.vd_bitbltchr   = ofwfb_bitbltchr,
.vd_maskbitbltchr = ofwfb_bitbltchr,
-   .vd_fb_mmap = ofwfb_mmap,
+   .vd_fb_ioctl= vt_fb_ioctl,
+   .vd_fb_mmap = vt_fb_mmap,
.vd_priority= VD_PRIORITY_GENERIC+1,
 };
 
@@ -198,17 +196,10 @@ static void
 ofwfb_initialize(struct vt_device *vd)
 {
struct ofwfb_softc *sc = vd-vd_softc;
-   char name[64];
-   ihandle_t ih;
int i;
cell_t retval;
uint32_t oldpix;
 
-   /* Open display device, thereby initializing it */
-   memset(name, 0, sizeof(name));
-   OF_package_to_path(sc-sc_node, name, sizeof(name));
-   ih = OF_open(name);
-
/*
 * Set up the color map
 */
@@ -219,7 +210,7 @@ ofwfb_initialize(struct vt_device *vd)
0, 255, 8, 255, 16);
 
for (i = 0; i  16; i++) {
-   OF_call_method(color!, ih, 4, 1,
+   OF_call_method(color!, sc-sc_handle, 4, 1,
(cell_t)((sc-fb.fb_cmap[i]  16)  0xff),
(cell_t)((sc-fb.fb_cmap[i]  8)  0xff),
(cell_t)((sc-fb.fb_cmap[i]  0)  0xff),
@@ -260,7 +251,6 @@ ofwfb_init(struct vt_device *vd)
struct ofwfb_softc *sc;
char type[64];
phandle_t chosen;
-   ihandle_t stdout;
phandle_t node;
uint32_t depth, height, width, stride;
uint32_t fb_phys;
@@ -275,14 +265,15 @@ ofwfb_init(struct vt_device *vd)
vd-vd_softc = sc = ofwfb_conssoftc;
 
chosen = OF_finddevice(/chosen);
-   OF_getprop(chosen, stdout, stdout, sizeof(stdout));
-   node = OF_instance_to_package(stdout);
+   OF_getprop(chosen, stdout, sc-sc_handle, sizeof(ihandle_t));
+   node = OF_instance_to_package(sc-sc_handle);
if (node == -1) {
/*
 * The /chosen/stdout does not exist try
 * using screen directly.
 */
node = OF_finddevice(screen);
+   sc-sc_handle = OF_open(screen);
}
OF_getprop(node, device_type, type, sizeof(type));
if (strcmp(type, display) != 0)
@@ -291,6 +282,13 @@ ofwfb_init(struct vt_device *vd)
/* Keep track of the OF node */
sc-sc_node = node;
 
+   /*
+* Try to use a 32-bit framebuffer if possible. This may be
+* unimplemented and fail. That's fine -- it just means we are
+* stuck with the defaults.
+*/
+   OF_call_method(set-depth, sc-sc_handle, 1, 1, (cell_t)32, i);
+
/* Make sure we have needed properties */
if (OF_getproplen(node, height

svn commit: r269279 - svnadmin/conf

2014-07-29 Thread Glen Barber
Author: gjb
Date: Tue Jul 29 23:40:15 2014
New Revision: 269279
URL: http://svnweb.freebsd.org/changeset/base/269279

Log:
  Turn releng/9.3 over to secteam.
  
  Approved by:  re (implicit)
  Sponsored by: The FreeBSD Foundation

Modified:
  svnadmin/conf/approvers

Modified: svnadmin/conf/approvers
==
--- svnadmin/conf/approvers Tue Jul 29 23:11:05 2014(r269278)
+++ svnadmin/conf/approvers Tue Jul 29 23:40:15 2014(r269279)
@@ -22,8 +22,7 @@
 #^stable/8/re
 #^stable/7/re
 ^releng/10.0/  (security-officer|so)
-^releng/9.3/   re
-^releng/9.[0-2]/   (security-officer|so)
+^releng/9.[0-3]/   (security-officer|so)
 ^releng/8.[0-4]/   (security-officer|so)
 ^releng/7.[0-4]/   (security-officer|so)
 ^releng/6.[0-4]/   (security-officer|so)
___
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: r269280 - head/sys/netinet

2014-07-29 Thread Hiren Panchasara
Author: hiren
Date: Tue Jul 29 23:42:51 2014
New Revision: 269280
URL: http://svnweb.freebsd.org/changeset/base/269280

Log:
  Add a comment and while there, fix trailing whitespace.

Modified:
  head/sys/netinet/in_pcb.c

Modified: head/sys/netinet/in_pcb.c
==
--- head/sys/netinet/in_pcb.c   Tue Jul 29 23:40:15 2014(r269279)
+++ head/sys/netinet/in_pcb.c   Tue Jul 29 23:42:51 2014(r269280)
@@ -349,6 +349,9 @@ in_pcbbind(struct inpcb *inp, struct soc
 }
 #endif
 
+/*
+ * Select a local port (number) to use.
+ */
 #if defined(INET) || defined(INET6)
 int
 in_pcb_lport(struct inpcb *inp, struct in_addr *laddrp, u_short *lportp,
@@ -462,7 +465,7 @@ in_pcb_lport(struct inpcb *inp, struct i
 #ifdef INET
if ((inp-inp_vflag  (INP_IPV4|INP_IPV6)) == INP_IPV4)
laddrp-s_addr = laddr.s_addr;
-#endif 
+#endif
*lportp = lport;
 
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: r269281 - in head/sys: amd64/amd64 amd64/vmm/intel x86/include

2014-07-29 Thread John Baldwin
Author: jhb
Date: Wed Jul 30 00:00:12 2014
New Revision: 269281
URL: http://svnweb.freebsd.org/changeset/base/269281

Log:
  - Output a summary of optional VT-x features in dmesg similar to CPU
features.  If bootverbose is enabled, a detailed list is provided;
otherwise, a single-line summary is displayed.
  - Add read-only sysctls for optional VT-x capabilities used by bhyve
under a new hw.vmm.vmx.cap node. Move a few exiting sysctls that
indicate the presence of optional capabilities under this node.
  
  CR:   https://phabric.freebsd.org/D498
  Reviewed by:  grehan, neel
  MFC after:1 week

Modified:
  head/sys/amd64/amd64/identcpu.c
  head/sys/amd64/vmm/intel/vmx.c
  head/sys/amd64/vmm/intel/vmx_msr.c
  head/sys/amd64/vmm/intel/vmx_msr.h
  head/sys/x86/include/specialreg.h

Modified: head/sys/amd64/amd64/identcpu.c
==
--- head/sys/amd64/amd64/identcpu.c Tue Jul 29 23:42:51 2014
(r269280)
+++ head/sys/amd64/amd64/identcpu.c Wed Jul 30 00:00:12 2014
(r269281)
@@ -61,6 +61,7 @@ __FBSDID($FreeBSD$);
 #include machine/specialreg.h
 #include machine/md_var.h
 
+#include amd64/vmm/intel/vmx_controls.h
 #include x86/isa/icu.h
 
 /* XXX - should be in header file: */
@@ -73,6 +74,7 @@ static u_int find_cpu_vendor_id(void);
 static void print_AMD_info(void);
 static void print_AMD_assoc(int i);
 static void print_via_padlock_info(void);
+static void print_vmx_info(void);
 
 intcpu_class;
 char machine[] = amd64;
@@ -428,6 +430,9 @@ printcpuinfo(void)
if (via_feature_rng != 0 || via_feature_xcrypt != 0)
print_via_padlock_info();
 
+   if (cpu_feature2  CPUID2_VMX)
+   print_vmx_info();
+
if ((cpu_feature  CPUID_HTT) 
cpu_vendor_id == CPU_VENDOR_AMD)
cpu_feature = ~CPUID_HTT;
@@ -722,3 +727,197 @@ print_via_padlock_info(void)
\015RSA   /* PMM */
);
 }
+
+static uint32_t
+vmx_settable(uint64_t basic, int msr, int true_msr)
+{
+   uint64_t val;
+
+   if (basic  (1UL  55))
+   val = rdmsr(true_msr);
+   else
+   val = rdmsr(msr);
+
+   /* Just report the controls that can be set to 1. */
+   return (val  32);
+}
+
+static void
+print_vmx_info(void)
+{
+   uint64_t basic, msr;
+   uint32_t entry, exit, mask, pin, proc, proc2;
+   int comma;
+
+   printf(\n  VT-x: );
+   msr = rdmsr(MSR_IA32_FEATURE_CONTROL);
+   if (!(msr  IA32_FEATURE_CONTROL_VMX_EN))
+   printf((disabled in BIOS) );
+   basic = rdmsr(MSR_VMX_BASIC);
+   pin = vmx_settable(basic, MSR_VMX_PINBASED_CTLS,
+   MSR_VMX_TRUE_PINBASED_CTLS);
+   proc = vmx_settable(basic, MSR_VMX_PROCBASED_CTLS,
+   MSR_VMX_TRUE_PROCBASED_CTLS);
+   if (proc  PROCBASED_SECONDARY_CONTROLS)
+   proc2 = vmx_settable(basic, MSR_VMX_PROCBASED_CTLS2,
+   MSR_VMX_PROCBASED_CTLS2);
+   else
+   proc2 = 0;
+   exit = vmx_settable(basic, MSR_VMX_EXIT_CTLS, MSR_VMX_TRUE_EXIT_CTLS);
+   entry = vmx_settable(basic, MSR_VMX_ENTRY_CTLS, 
MSR_VMX_TRUE_ENTRY_CTLS);
+
+   if (!bootverbose) {
+   comma = 0;
+   if (exit  VM_EXIT_SAVE_PAT  exit  VM_EXIT_LOAD_PAT 
+   entry  VM_ENTRY_LOAD_PAT) {
+   printf(%sPAT, comma ? , : );
+   comma = 1;
+   }
+   if (proc  PROCBASED_HLT_EXITING) {
+   printf(%sHLT, comma ? , : );
+   comma = 1;
+   }
+   if (proc  PROCBASED_MTF) {
+   printf(%sMTF, comma ? , : );
+   comma = 1;
+   }
+   if (proc  PROCBASED_PAUSE_EXITING) {
+   printf(%sPAUSE, comma ? , : );
+   comma = 1;
+   }
+   if (proc2  PROCBASED2_ENABLE_EPT) {
+   printf(%sEPT, comma ? , : );
+   comma = 1;
+   }
+   if (proc2  PROCBASED2_UNRESTRICTED_GUEST) {
+   printf(%sUG, comma ? , : );
+   comma = 1;
+   }
+   if (proc2  PROCBASED2_ENABLE_VPID) {
+   printf(%sVPID, comma ? , : );
+   comma = 1;
+   }
+   if (proc  PROCBASED_USE_TPR_SHADOW 
+   proc2  PROCBASED2_VIRTUALIZE_APIC_ACCESSES 
+   proc2  PROCBASED2_VIRTUALIZE_X2APIC_MODE 
+   proc2  PROCBASED2_APIC_REGISTER_VIRTUALIZATION 
+   proc2  PROCBASED2_VIRTUAL_INTERRUPT_DELIVERY) {
+   printf(%sVID, comma ? , : );
+   comma = 1;
+   

svn commit: r269282 - head/sys/sys

2014-07-29 Thread Ed Maste
Author: emaste
Date: Wed Jul 30 00:28:29 2014
New Revision: 269282
URL: http://svnweb.freebsd.org/changeset/base/269282

Log:
  Correct typo in comment
  
  PR:   192231
  Submitted by: Ron Dahlgren
  MFC after:1 week

Modified:
  head/sys/sys/procdesc.h

Modified: head/sys/sys/procdesc.h
==
--- head/sys/sys/procdesc.h Wed Jul 30 00:00:12 2014(r269281)
+++ head/sys/sys/procdesc.h Wed Jul 30 00:28:29 2014(r269282)
@@ -48,7 +48,7 @@
  * Locking key:
  * (c) - Constant after initial setup.
  * (p) - Protected by the process descriptor mutex.
- * (r) - Atomic eference count.
+ * (r) - Atomic reference count.
  * (s) - Protected by selinfo.
  * (t) - Protected by the proctree_lock
  */
___
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: r267937 - in head: cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json cddl/contrib/opensolaris/cmd/dtrace/test/tst/common

2014-07-29 Thread Rui Paulo

 On 28 Jul 2014, at 20:23, John Baldwin j...@freebsd.org wrote:
 
 On Thursday 26 June 2014 21:45:49 Rui Paulo wrote:
 Author: rpaulo
 Date: Thu Jun 26 21:45:49 2014
 New Revision: 267937
 URL: http://svnweb.freebsd.org/changeset/base/267937
 
 Log:
  MFV illumos
 
  4477 DTrace should speak JSON
 
  MFC after:2 weeks
 
 This makes kernel builds depend on userland sources.  This breaks a lot of my 
 work trees where I only checkout 'sys', and breaks a generally long-standing 
 feature that the kernel was self-contained (recent bmake breakage to require 
 the '-m /usr/src/share/mk' hack aside).  Perhaps you could copy strtolctype.h
 to sys/cddl/contrib/opensolaris/common/util?  We already duplicate 
 sys/cddl/contrib/opensolaris/common/avl/avl.c in a like manner, presumably 
 for 
 the same reason.

I didn't know that was a long standing feature. I'll copy the file. 

___
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: r269283 - in stable/10/sys: fs/ext2fs fs/nandfs fs/nfsclient fs/nullfs fs/tmpfs kern ufs/ufs

2014-07-29 Thread Konstantin Belousov
Author: kib
Date: Wed Jul 30 03:56:17 2014
New Revision: 269283
URL: http://svnweb.freebsd.org/changeset/base/269283

Log:
  MFC r268764:
  Check for the cross-device cross-link attempt in the VFS, instead of
  VOP_LINK() implemenations.

Modified:
  stable/10/sys/fs/ext2fs/ext2_vnops.c
  stable/10/sys/fs/nandfs/nandfs_vnops.c
  stable/10/sys/fs/nfsclient/nfs_clvnops.c
  stable/10/sys/fs/nullfs/null_vnops.c
  stable/10/sys/fs/tmpfs/tmpfs_vnops.c
  stable/10/sys/kern/vfs_syscalls.c
  stable/10/sys/ufs/ufs/ufs_vnops.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/ext2fs/ext2_vnops.c
==
--- stable/10/sys/fs/ext2fs/ext2_vnops.cWed Jul 30 00:28:29 2014
(r269282)
+++ stable/10/sys/fs/ext2fs/ext2_vnops.cWed Jul 30 03:56:17 2014
(r269283)
@@ -666,10 +666,6 @@ ext2_link(struct vop_link_args *ap)
if ((cnp-cn_flags  HASBUF) == 0)
panic(ext2_link: no name);
 #endif
-   if (tdvp-v_mount != vp-v_mount) {
-   error = EXDEV;
-   goto out;
-   }
ip = VTOI(vp);
if ((nlink_t)ip-i_nlink = EXT2_LINK_MAX) {
error = EMLINK;

Modified: stable/10/sys/fs/nandfs/nandfs_vnops.c
==
--- stable/10/sys/fs/nandfs/nandfs_vnops.c  Wed Jul 30 00:28:29 2014
(r269282)
+++ stable/10/sys/fs/nandfs/nandfs_vnops.c  Wed Jul 30 03:56:17 2014
(r269283)
@@ -1355,9 +1355,6 @@ nandfs_link(struct vop_link_args *ap)
struct nandfs_inode *inode = node-nn_inode;
int error;
 
-   if (tdvp-v_mount != vp-v_mount)
-   return (EXDEV);
-
if (inode-i_links_count = LINK_MAX)
return (EMLINK);
 

Modified: stable/10/sys/fs/nfsclient/nfs_clvnops.c
==
--- stable/10/sys/fs/nfsclient/nfs_clvnops.cWed Jul 30 00:28:29 2014
(r269282)
+++ stable/10/sys/fs/nfsclient/nfs_clvnops.cWed Jul 30 03:56:17 2014
(r269283)
@@ -1977,10 +1977,6 @@ nfs_link(struct vop_link_args *ap)
struct nfsvattr nfsva, dnfsva;
int error = 0, attrflag, dattrflag;
 
-   if (vp-v_mount != tdvp-v_mount) {
-   return (EXDEV);
-   }
-
/*
 * Push all writes to the server, so that the attribute cache
 * doesn't get out of sync with the server.

Modified: stable/10/sys/fs/nullfs/null_vnops.c
==
--- stable/10/sys/fs/nullfs/null_vnops.cWed Jul 30 00:28:29 2014
(r269282)
+++ stable/10/sys/fs/nullfs/null_vnops.cWed Jul 30 03:56:17 2014
(r269283)
@@ -858,15 +858,6 @@ null_vptocnp(struct vop_vptocnp_args *ap
return (error);
 }
 
-static int
-null_link(struct vop_link_args *ap)
-{
-
-   if (ap-a_tdvp-v_mount != ap-a_vp-v_mount)
-   return (EXDEV);
-   return (null_bypass((struct vop_generic_args *)ap));
-}
-
 /*
  * Global vfs data structures
  */
@@ -880,7 +871,6 @@ struct vop_vector null_vnodeops = {
.vop_getwritemount =null_getwritemount,
.vop_inactive = null_inactive,
.vop_islocked = vop_stdislocked,
-   .vop_link = null_link,
.vop_lock1 =null_lock,
.vop_lookup =   null_lookup,
.vop_open = null_open,

Modified: stable/10/sys/fs/tmpfs/tmpfs_vnops.c
==
--- stable/10/sys/fs/tmpfs/tmpfs_vnops.cWed Jul 30 00:28:29 2014
(r269282)
+++ stable/10/sys/fs/tmpfs/tmpfs_vnops.cWed Jul 30 03:56:17 2014
(r269283)
@@ -573,21 +573,6 @@ tmpfs_link(struct vop_link_args *v)
MPASS(VOP_ISLOCKED(dvp));
MPASS(cnp-cn_flags  HASBUF);
MPASS(dvp != vp); /* XXX When can this be false? */
-
-   /* XXX: Why aren't the following two tests done by the caller? */
-
-   /* Hard links of directories are forbidden. */
-   if (vp-v_type == VDIR) {
-   error = EPERM;
-   goto out;
-   }
-
-   /* Cannot create cross-device links. */
-   if (dvp-v_mount != vp-v_mount) {
-   error = EXDEV;
-   goto out;
-   }
-
node = VP_TO_TMPFS_NODE(vp);
 
/* Ensure that we do not overflow the maximum number of links imposed

Modified: stable/10/sys/kern/vfs_syscalls.c
==
--- stable/10/sys/kern/vfs_syscalls.c   Wed Jul 30 00:28:29 2014
(r269282)
+++ stable/10/sys/kern/vfs_syscalls.c   Wed Jul 30 03:56:17 2014
(r269283)
@@ -1579,7 +1579,15 @@ again:
vrele(nd.ni_vp);
error = EEXIST;
} else if ((error = vn_lock(vp, 

svn commit: r269284 - stable/10/sys/fs/tmpfs

2014-07-29 Thread Konstantin Belousov
Author: kib
Date: Wed Jul 30 03:58:29 2014
New Revision: 269284
URL: http://svnweb.freebsd.org/changeset/base/269284

Log:
  MFC r268765:
  Remove unused header.

Modified:
  stable/10/sys/fs/tmpfs/tmpfs_vnops.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/tmpfs/tmpfs_vnops.c
==
--- stable/10/sys/fs/tmpfs/tmpfs_vnops.cWed Jul 30 03:56:17 2014
(r269283)
+++ stable/10/sys/fs/tmpfs/tmpfs_vnops.cWed Jul 30 03:58:29 2014
(r269284)
@@ -45,7 +45,6 @@ __FBSDID($FreeBSD$);
 #include sys/proc.h
 #include sys/rwlock.h
 #include sys/sched.h
-#include sys/sf_buf.h
 #include sys/stat.h
 #include sys/systm.h
 #include sys/sysctl.h
___
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: r269285 - stable/10/share/man/man9

2014-07-29 Thread Konstantin Belousov
Author: kib
Date: Wed Jul 30 04:00:23 2014
New Revision: 269285
URL: http://svnweb.freebsd.org/changeset/base/269285

Log:
  MFC r269159:
  Correct the locking statement.
  
  MFC r269161:
  Explicitely mention that inactivated or reclaimed vnode is locked
  exclusively.

Modified:
  stable/10/share/man/man9/VOP_INACTIVE.9
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/share/man/man9/VOP_INACTIVE.9
==
--- stable/10/share/man/man9/VOP_INACTIVE.9 Wed Jul 30 03:58:29 2014
(r269284)
+++ stable/10/share/man/man9/VOP_INACTIVE.9 Wed Jul 30 04:00:23 2014
(r269285)
@@ -28,7 +28,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd July 24, 1996
+.Dd July 27, 2014
 .Dt VOP_INACTIVE 9
 .Os
 .Sh NAME
@@ -63,17 +63,14 @@ is called when a vnode is being reused f
 Any file system specific resources associated with the vnode should be
 freed.
 .Sh LOCKS
-For VOP_INACTIVE, the
-.Fa vp
-will be locked on entry.
-Your VOP_INACTIVE code
-must unlock the
-.Fa vp
-prior to returning.
-.Pp
-For VOP_RECLAIM, the
+For both
+.Fn VOP_INACTIVE
+and
+.Fn VOP_RECLAIM ,
+the
 .Fa vp
-will not be locked on entry and should be left unlocked on return.
+will be exclusively locked on entry, and must be left exclusively
+locked on return.
 .Sh SEE ALSO
 .Xr vnode 9
 .Sh AUTHORS
___
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: r269286 - in stable/10: . share/man/man9

2014-07-29 Thread Konstantin Belousov
Author: kib
Date: Wed Jul 30 04:03:59 2014
New Revision: 269286
URL: http://svnweb.freebsd.org/changeset/base/269286

Log:
  MFC r269160:
  Remove man page for non-existent VOPs.
  
  MFC r269240 (by pluknet):
  Add VOP_GETVOBJECT.9 to obsolete files, un-xref.

Deleted:
  stable/10/share/man/man9/VOP_GETVOBJECT.9
Modified:
  stable/10/ObsoleteFiles.inc
  stable/10/share/man/man9/Makefile
  stable/10/share/man/man9/vnode.9
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/ObsoleteFiles.inc
==
--- stable/10/ObsoleteFiles.inc Wed Jul 30 04:00:23 2014(r269285)
+++ stable/10/ObsoleteFiles.inc Wed Jul 30 04:03:59 2014(r269286)
@@ -38,6 +38,10 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20140728: Remove an obsolete man page
+OLD_FILES+=usr/share/man/man9/VOP_GETVOBJECT.9.gz
+OLD_FILES+=usr/share/man/man9/VOP_CREATEVOBJECT.9.gz
+OLD_FILES+=usr/share/man/man9/VOP_DESTROYVOBJECT.9.gz
 # 20140614: send-pr removal
 OLD_FILES+=usr/share/man/man1/send-pr.1.gz
 OLD_FILES+=etc/gnats/freefall

Modified: stable/10/share/man/man9/Makefile
==
--- stable/10/share/man/man9/Makefile   Wed Jul 30 04:00:23 2014
(r269285)
+++ stable/10/share/man/man9/Makefile   Wed Jul 30 04:03:59 2014
(r269286)
@@ -355,7 +355,6 @@ MAN=accept_filter.9 \
VOP_GETACL.9 \
VOP_GETEXTATTR.9 \
VOP_GETPAGES.9 \
-   VOP_GETVOBJECT.9 \
VOP_INACTIVE.9 \
VOP_IOCTL.9 \
VOP_LINK.9 \
@@ -1517,8 +1516,6 @@ MLINKS+=VOP_CREATE.9 VOP_MKDIR.9 \
VOP_CREATE.9 VOP_MKNOD.9 \
VOP_CREATE.9 VOP_SYMLINK.9
 MLINKS+=VOP_GETPAGES.9 VOP_PUTPAGES.9
-MLINKS+=VOP_GETVOBJECT.9 VOP_CREATEVOBJECT.9 \
-   VOP_GETVOBJECT.9 VOP_DESTROYVOBJECT.9
 MLINKS+=VOP_INACTIVE.9 VOP_RECLAIM.9
 MLINKS+=VOP_LOCK.9 vn_lock.9 \
VOP_LOCK.9 VOP_ISLOCKED.9 \

Modified: stable/10/share/man/man9/vnode.9
==
--- stable/10/share/man/man9/vnode.9Wed Jul 30 04:00:23 2014
(r269285)
+++ stable/10/share/man/man9/vnode.9Wed Jul 30 04:03:59 2014
(r269286)
@@ -170,7 +170,6 @@ intertwining of VM Objects and Vnodes.
 .Xr VOP_GETACL 9 ,
 .Xr VOP_GETEXTATTR 9 ,
 .Xr VOP_GETPAGES 9 ,
-.Xr VOP_GETVOBJECT 9 ,
 .Xr VOP_INACTIVE 9 ,
 .Xr VOP_IOCTL 9 ,
 .Xr VOP_LINK 9 ,
___
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: r269287 - stable/9/share/man/man9

2014-07-29 Thread Konstantin Belousov
Author: kib
Date: Wed Jul 30 04:05:19 2014
New Revision: 269287
URL: http://svnweb.freebsd.org/changeset/base/269287

Log:
  MFC r269159:
  Correct the locking statement.
  
  MFC r269161:
  Explicitely mention that inactivated or reclaimed vnode is locked
  exclusively.

Modified:
  stable/9/share/man/man9/VOP_INACTIVE.9
Directory Properties:
  stable/9/share/man/man9/   (props changed)

Modified: stable/9/share/man/man9/VOP_INACTIVE.9
==
--- stable/9/share/man/man9/VOP_INACTIVE.9  Wed Jul 30 04:03:59 2014
(r269286)
+++ stable/9/share/man/man9/VOP_INACTIVE.9  Wed Jul 30 04:05:19 2014
(r269287)
@@ -28,7 +28,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd July 24, 1996
+.Dd July 27, 2014
 .Dt VOP_INACTIVE 9
 .Os
 .Sh NAME
@@ -63,17 +63,14 @@ is called when a vnode is being reused f
 Any file system specific resources associated with the vnode should be
 freed.
 .Sh LOCKS
-For VOP_INACTIVE, the
-.Fa vp
-will be locked on entry.
-Your VOP_INACTIVE code
-must unlock the
-.Fa vp
-prior to returning.
-.Pp
-For VOP_RECLAIM, the
+For both
+.Fn VOP_INACTIVE
+and
+.Fn VOP_RECLAIM ,
+the
 .Fa vp
-will not be locked on entry and should be left unlocked on return.
+will be exclusively locked on entry, and must be left exclusively
+locked on return.
 .Sh SEE ALSO
 .Xr vnode 9
 .Sh AUTHORS
___
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: r269288 - in stable/9: . share/man/man9

2014-07-29 Thread Konstantin Belousov
Author: kib
Date: Wed Jul 30 04:09:20 2014
New Revision: 269288
URL: http://svnweb.freebsd.org/changeset/base/269288

Log:
  MFC r269160:
  Remove man page for non-existent VOPs.
  
  MFC r269240 (by pluknet):
  Add VOP_GETVOBJECT.9 to obsolete files, un-xref.

Deleted:
  stable/9/share/man/man9/VOP_GETVOBJECT.9
Modified:
  stable/9/ObsoleteFiles.inc   (contents, props changed)
  stable/9/share/man/man9/Makefile
  stable/9/share/man/man9/vnode.9
Directory Properties:
  stable/9/share/man/man9/   (props changed)

Modified: stable/9/ObsoleteFiles.inc
==
--- stable/9/ObsoleteFiles.inc  Wed Jul 30 04:05:19 2014(r269287)
+++ stable/9/ObsoleteFiles.inc  Wed Jul 30 04:09:20 2014(r269288)
@@ -38,6 +38,10 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20140728: Remove an obsolete man page
+OLD_FILES+=usr/share/man/man9/VOP_GETVOBJECT.9.gz
+OLD_FILES+=usr/share/man/man9/VOP_CREATEVOBJECT.9.gz
+OLD_FILES+=usr/share/man/man9/VOP_DESTROYVOBJECT.9.gz
 # 20140614: send-pr removal
 OLD_FILES+=usr/share/man/man1/send-pr.1.gz
 OLD_FILES+=etc/gnats/freefall

Modified: stable/9/share/man/man9/Makefile
==
--- stable/9/share/man/man9/MakefileWed Jul 30 04:05:19 2014
(r269287)
+++ stable/9/share/man/man9/MakefileWed Jul 30 04:09:20 2014
(r269288)
@@ -351,7 +351,6 @@ MAN=accept_filter.9 \
VOP_GETACL.9 \
VOP_GETEXTATTR.9 \
VOP_GETPAGES.9 \
-   VOP_GETVOBJECT.9 \
VOP_INACTIVE.9 \
VOP_IOCTL.9 \
VOP_LINK.9 \
@@ -1463,8 +1462,6 @@ MLINKS+=VOP_CREATE.9 VOP_MKDIR.9 \
VOP_CREATE.9 VOP_MKNOD.9 \
VOP_CREATE.9 VOP_SYMLINK.9
 MLINKS+=VOP_GETPAGES.9 VOP_PUTPAGES.9
-MLINKS+=VOP_GETVOBJECT.9 VOP_CREATEVOBJECT.9 \
-   VOP_GETVOBJECT.9 VOP_DESTROYVOBJECT.9
 MLINKS+=VOP_INACTIVE.9 VOP_RECLAIM.9
 MLINKS+=VOP_LOCK.9 vn_lock.9 \
VOP_LOCK.9 VOP_ISLOCKED.9 \

Modified: stable/9/share/man/man9/vnode.9
==
--- stable/9/share/man/man9/vnode.9 Wed Jul 30 04:05:19 2014
(r269287)
+++ stable/9/share/man/man9/vnode.9 Wed Jul 30 04:09:20 2014
(r269288)
@@ -168,7 +168,6 @@ intertwining of VM Objects and Vnodes.
 .Xr VOP_GETACL 9 ,
 .Xr VOP_GETEXTATTR 9 ,
 .Xr VOP_GETPAGES 9 ,
-.Xr VOP_GETVOBJECT 9 ,
 .Xr VOP_INACTIVE 9 ,
 .Xr VOP_IOCTL 9 ,
 .Xr VOP_LINK 9 ,
___
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: r269289 - head/usr.bin/sort

2014-07-29 Thread Glen Barber
Author: gjb
Date: Wed Jul 30 04:40:50 2014
New Revision: 269289
URL: http://svnweb.freebsd.org/changeset/base/269289

Log:
  Remove trailing '.' from See Also section.
  
  MFC after:3 days
  Sponsored by: The FreeBSD Foundation

Modified:
  head/usr.bin/sort/sort.1.in

Modified: head/usr.bin/sort/sort.1.in
==
--- head/usr.bin/sort/sort.1.in Wed Jul 30 04:09:20 2014(r269288)
+++ head/usr.bin/sort/sort.1.in Wed Jul 30 04:40:50 2014(r269289)
@@ -581,7 +581,7 @@ An error occurred.
 .Sh SEE ALSO
 .Xr comm 1 ,
 .Xr join 1 ,
-.Xr uniq 1 .
+.Xr uniq 1
 .Sh STANDARDS
 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: r269290 - head/share/man/man4

2014-07-29 Thread Glen Barber
Author: gjb
Date: Wed Jul 30 04:46:53 2014
New Revision: 269290
URL: http://svnweb.freebsd.org/changeset/base/269290

Log:
  Remove trailing comma from standalone Xref.
  
  MFC after:3 days
  Sponsored by: The FreeBSD Foundation

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

Modified: head/share/man/man4/acpi_wmi.4
==
--- head/share/man/man4/acpi_wmi.4  Wed Jul 30 04:40:50 2014
(r269289)
+++ head/share/man/man4/acpi_wmi.4  Wed Jul 30 04:46:53 2014
(r269290)
@@ -74,7 +74,7 @@ GUID  IN
 {8F1F6435-9F42-42C8-BADC-0E9424F20C9A}   0 NO   NO   NO  NOBI
 .Ed
 .Sh SEE ALSO
-.Xr acpi 4 ,
+.Xr acpi 4
 .Sh HISTORY
 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: r269291 - head/share/man/man4

2014-07-29 Thread Glen Barber
Author: gjb
Date: Wed Jul 30 04:47:39 2014
New Revision: 269291
URL: http://svnweb.freebsd.org/changeset/base/269291

Log:
  Remove trailing comma from ending Xref.
  
  MFC after:3 days
  Sponsored by: The FreeBSD Foundation

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

Modified: head/share/man/man4/hptiop.4
==
--- head/share/man/man4/hptiop.4Wed Jul 30 04:46:53 2014
(r269290)
+++ head/share/man/man4/hptiop.4Wed Jul 30 04:47:39 2014
(r269291)
@@ -126,7 +126,7 @@ The
 driver has only been tested on the i386 and amd64 platforms.
 .Sh SEE ALSO
 .Xr cam 4 ,
-.Xr hptmv 4 ,
+.Xr hptmv 4
 .Sh HISTORY
 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: r269293 - head/share/man/man9

2014-07-29 Thread Glen Barber
Author: gjb
Date: Wed Jul 30 04:48:56 2014
New Revision: 269293
URL: http://svnweb.freebsd.org/changeset/base/269293

Log:
  Remove trailing comma from ending Xref
  
  MFC after:3 days
  Sponsored by: The FreeBSD Foundation

Modified:
  head/share/man/man9/kernel_mount.9

Modified: head/share/man/man9/kernel_mount.9
==
--- head/share/man/man9/kernel_mount.9  Wed Jul 30 04:48:20 2014
(r269292)
+++ head/share/man/man9/kernel_mount.9  Wed Jul 30 04:48:56 2014
(r269293)
@@ -194,7 +194,7 @@ must come in pairs, e.g.,
 .Ed
 .Sh SEE ALSO
 .Xr VFS 9 ,
-.Xr VFS_MOUNT 9 ,
+.Xr VFS_MOUNT 9
 .Sh HISTORY
 The
 .Fn kernel_mount
___
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: r269292 - head/share/man/man5

2014-07-29 Thread Glen Barber
Author: gjb
Date: Wed Jul 30 04:48:20 2014
New Revision: 269292
URL: http://svnweb.freebsd.org/changeset/base/269292

Log:
  Remove trailing comma from ending Xref
  
  MFC after:3 days
  Sponsored by: The FreeBSD Foundation

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

Modified: head/share/man/man5/pf.conf.5
==
--- head/share/man/man5/pf.conf.5   Wed Jul 30 04:47:39 2014
(r269291)
+++ head/share/man/man5/pf.conf.5   Wed Jul 30 04:48:20 2014
(r269292)
@@ -3051,7 +3051,7 @@ Service name database.
 .Xr services 5 ,
 .Xr ftp-proxy 8 ,
 .Xr pfctl 8 ,
-.Xr pflogd 8 ,
+.Xr pflogd 8
 .Sh HISTORY
 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