From owner-svn-src-stable@freebsd.org  Sun Oct 18 06:53:32 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70614A18E88;
 Sun, 18 Oct 2015 06:53:32 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 367B1D3F;
 Sun, 18 Oct 2015 06:53:32 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9I6rVKN058209;
 Sun, 18 Oct 2015 06:53:31 GMT (envelope-from mav@FreeBSD.org)
Received: (from mav@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9I6rVdH058208;
 Sun, 18 Oct 2015 06:53:31 GMT (envelope-from mav@FreeBSD.org)
Message-Id: <201510180653.t9I6rVdH058208@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org
 using -f
From: Alexander Motin <mav@FreeBSD.org>
Date: Sun, 18 Oct 2015 06:53:31 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289489 - stable/10/sys/cam/ctl
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 18 Oct 2015 06:53:32 -0000

Author: mav
Date: Sun Oct 18 06:53:31 2015
New Revision: 289489
URL: https://svnweb.freebsd.org/changeset/base/289489

Log:
  MFC r289136: Remove lock upgrade attempt from ctl_be_block_open_file().
  
  I am not sure what for it was done.  Now open routine should automatically
  fall back to read-only if open for writing is impossible.  In such case
  attempt to upgrade to write sounds strange.

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	Sun Oct 18 05:51:44 2015	(r289488)
+++ stable/10/sys/cam/ctl/ctl_backend_block.c	Sun Oct 18 06:53:31 2015	(r289489)
@@ -1843,21 +1843,6 @@ ctl_be_block_open_file(struct ctl_be_blo
 		return (error);
 	}
 
-	/*
-	 * Verify that we have the ability to upgrade to exclusive
-	 * access on this file so we can trap errors at open instead
-	 * of reporting them during first access.
-	 */
-	if (VOP_ISLOCKED(be_lun->vn) != LK_EXCLUSIVE) {
-		vn_lock(be_lun->vn, LK_UPGRADE | LK_RETRY);
-		if (be_lun->vn->v_iflag & VI_DOOMED) {
-			error = EBADF;
-			snprintf(req->error_str, sizeof(req->error_str),
-				 "error locking file %s", be_lun->dev_path);
-			return (error);
-		}
-	}
-
 	file_data->cred = crhold(curthread->td_ucred);
 	if (params->lun_size_bytes != 0)
 		be_lun->size_bytes = params->lun_size_bytes;

From owner-svn-src-stable@freebsd.org  Sun Oct 18 13:52:54 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CA89A168C3;
 Sun, 18 Oct 2015 13:52:54 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 441811393;
 Sun, 18 Oct 2015 13:52:54 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IDqrdE081434;
 Sun, 18 Oct 2015 13:52:53 GMT (envelope-from trasz@FreeBSD.org)
Received: (from trasz@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IDqrf2081433;
 Sun, 18 Oct 2015 13:52:53 GMT (envelope-from trasz@FreeBSD.org)
Message-Id: <201510181352.t9IDqrf2081433@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: trasz set sender to
 trasz@FreeBSD.org using -f
From: Edward Tomasz Napierala <trasz@FreeBSD.org>
Date: Sun, 18 Oct 2015 13:52:53 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289503 - stable/10/sys/compat/linprocfs
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 18 Oct 2015 13:52:54 -0000

Author: trasz
Date: Sun Oct 18 13:52:53 2015
New Revision: 289503
URL: https://svnweb.freebsd.org/changeset/base/289503

Log:
  MFC r280981:
  
  Remove unused code.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/sys/compat/linprocfs/linprocfs.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/compat/linprocfs/linprocfs.c
==============================================================================
--- stable/10/sys/compat/linprocfs/linprocfs.c	Sun Oct 18 13:23:21 2015	(r289502)
+++ stable/10/sys/compat/linprocfs/linprocfs.c	Sun Oct 18 13:52:53 2015	(r289503)
@@ -393,7 +393,6 @@ linprocfs_domtab(PFS_FILL_ARGS)
 
 /*
  * Filler function for proc/partitions
- *
  */
 static int
 linprocfs_dopartitions(PFS_FILL_ARGS)
@@ -401,27 +400,9 @@ linprocfs_dopartitions(PFS_FILL_ARGS)
 	struct g_class *cp;
 	struct g_geom *gp;
 	struct g_provider *pp;
-	struct nameidata nd;
-	const char *lep;
-	char  *dlep, *flep;
-	size_t lep_len;
-	int error;
 	int major, minor;
 
-	/* resolve symlinks etc. in the emulation tree prefix */
-	NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, linux_emul_path, td);
-	flep = NULL;
-	error = namei(&nd);
-	lep = linux_emul_path;
-	if (error == 0) {
-		if (vn_fullpath(td, nd.ni_vp, &dlep, &flep) == 0)
-			lep = dlep;
-		vrele(nd.ni_vp);
-	}
-	lep_len = strlen(lep);
-
 	g_topology_lock();
-	error = 0;
 	sbuf_printf(sb, "major minor  #blocks  name rio rmerge rsect "
 	    "ruse wio wmerge wsect wuse running use aveq\n");
 
@@ -447,8 +428,7 @@ linprocfs_dopartitions(PFS_FILL_ARGS)
 	}
 	g_topology_unlock();
 
-	free(flep, M_TEMP);
-	return (error);
+	return (0);
 }
 
 

From owner-svn-src-stable@freebsd.org  Sun Oct 18 13:58:18 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9749DA16AD6;
 Sun, 18 Oct 2015 13:58:18 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 485801845;
 Sun, 18 Oct 2015 13:58:18 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IDwHD9081680;
 Sun, 18 Oct 2015 13:58:17 GMT (envelope-from trasz@FreeBSD.org)
Received: (from trasz@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IDwHME081679;
 Sun, 18 Oct 2015 13:58:17 GMT (envelope-from trasz@FreeBSD.org)
Message-Id: <201510181358.t9IDwHME081679@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: trasz set sender to
 trasz@FreeBSD.org using -f
From: Edward Tomasz Napierala <trasz@FreeBSD.org>
Date: Sun, 18 Oct 2015 13:58:17 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289504 - stable/10/sys/compat/linux
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 18 Oct 2015 13:58:18 -0000

Author: trasz
Date: Sun Oct 18 13:58:17 2015
New Revision: 289504
URL: https://svnweb.freebsd.org/changeset/base/289504

Log:
  MFC r281689:
  
  Remove unused code from linux_mount(), and make it possible to mount
  any kind of filesystem instead of harcoded three.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/sys/compat/linux/linux_file.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/compat/linux/linux_file.c
==============================================================================
--- stable/10/sys/compat/linux/linux_file.c	Sun Oct 18 13:52:53 2015	(r289503)
+++ stable/10/sys/compat/linux/linux_file.c	Sun Oct 18 13:58:17 2015	(r289504)
@@ -55,10 +55,6 @@ __FBSDID("$FreeBSD$");
 
 #include <security/mac/mac_framework.h>
 
-#include <ufs/ufs/extattr.h>
-#include <ufs/ufs/quota.h>
-#include <ufs/ufs/ufsmount.h>
-
 #ifdef COMPAT_LINUX32
 #include <machine/../linux32/linux.h>
 #include <machine/../linux32/linux32_proto.h>
@@ -1072,12 +1068,10 @@ linux_pwrite(td, uap)
 int
 linux_mount(struct thread *td, struct linux_mount_args *args)
 {
-	struct ufs_args ufs;
 	char fstypename[MFSNAMELEN];
 	char mntonname[MNAMELEN], mntfromname[MNAMELEN];
 	int error;
 	int fsflags;
-	void *fsdata;
 
 	error = copyinstr(args->filesystemtype, fstypename, MFSNAMELEN - 1,
 	    NULL);
@@ -1098,20 +1092,10 @@ linux_mount(struct thread *td, struct li
 
 	if (strcmp(fstypename, "ext2") == 0) {
 		strcpy(fstypename, "ext2fs");
-		fsdata = &ufs;
-		ufs.fspec = mntfromname;
-#define DEFAULT_ROOTID		-2
-		ufs.export.ex_root = DEFAULT_ROOTID;
-		ufs.export.ex_flags =
-		    args->rwflag & LINUX_MS_RDONLY ? MNT_EXRDONLY : 0;
 	} else if (strcmp(fstypename, "proc") == 0) {
 		strcpy(fstypename, "linprocfs");
-		fsdata = NULL;
 	} else if (strcmp(fstypename, "vfat") == 0) {
 		strcpy(fstypename, "msdosfs");
-		fsdata = NULL;
-	} else {
-		return (ENODEV);
 	}
 
 	fsflags = 0;
@@ -1131,19 +1115,11 @@ linux_mount(struct thread *td, struct li
 			fsflags |= MNT_UPDATE;
 	}
 
-	if (strcmp(fstypename, "linprocfs") == 0) {
-		error = kernel_vmount(fsflags,
-			"fstype", fstypename,
-			"fspath", mntonname,
-			NULL);
-	} else if (strcmp(fstypename, "msdosfs") == 0) {
-		error = kernel_vmount(fsflags,
-			"fstype", fstypename,
-			"fspath", mntonname,
-			"from", mntfromname,
-			NULL);
-	} else
-		error = EOPNOTSUPP;
+	error = kernel_vmount(fsflags,
+	    "fstype", fstypename,
+	    "fspath", mntonname,
+	    "from", mntfromname,
+	    NULL);
 	return (error);
 }
 

From owner-svn-src-stable@freebsd.org  Sun Oct 18 14:01:22 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0BA7EA16BCF;
 Sun, 18 Oct 2015 14:01:22 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id AC6151A61;
 Sun, 18 Oct 2015 14:01:21 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IE1KsJ084379;
 Sun, 18 Oct 2015 14:01:20 GMT (envelope-from trasz@FreeBSD.org)
Received: (from trasz@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IE1KAu084378;
 Sun, 18 Oct 2015 14:01:20 GMT (envelope-from trasz@FreeBSD.org)
Message-Id: <201510181401.t9IE1KAu084378@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: trasz set sender to
 trasz@FreeBSD.org using -f
From: Edward Tomasz Napierala <trasz@FreeBSD.org>
Date: Sun, 18 Oct 2015 14:01:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289505 - stable/10/sys/compat/linux
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 18 Oct 2015 14:01:22 -0000

Author: trasz
Date: Sun Oct 18 14:01:20 2015
New Revision: 289505
URL: https://svnweb.freebsd.org/changeset/base/289505

Log:
  MFC r281726:
  
  Optimize the O_NOCTTY handling hack in linux_common_open().
  
  MFC r281728:
  
  Add back fdrop() missed in r281726.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/sys/compat/linux/linux_file.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/compat/linux/linux_file.c
==============================================================================
--- stable/10/sys/compat/linux/linux_file.c	Sun Oct 18 13:58:17 2015	(r289504)
+++ stable/10/sys/compat/linux/linux_file.c	Sun Oct 18 14:01:20 2015	(r289505)
@@ -132,39 +132,39 @@ linux_common_open(struct thread *td, int
     /* XXX LINUX_O_NOATIME: unable to be easily implemented. */
 
     error = kern_openat(td, dirfd, path, UIO_SYSSPACE, bsd_flags, mode);
+    if (error != 0)
+	    goto done;
 
-    if (!error) {
-	    fd = td->td_retval[0];
-	    /*
-	     * XXX In between kern_open() and fget(), another process
-	     * having the same filedesc could use that fd without
-	     * checking below.
-	     */
-	    error = fget(td, fd, cap_rights_init(&rights, CAP_IOCTL), &fp);
-	    if (!error) {
-		    sx_slock(&proctree_lock);
-		    PROC_LOCK(p);
-		    if (!(bsd_flags & O_NOCTTY) &&
-			SESS_LEADER(p) && !(p->p_flag & P_CONTROLT)) {
-			    PROC_UNLOCK(p);
-			    sx_unlock(&proctree_lock);
-			    /* XXXPJD: Verify if TIOCSCTTY is allowed. */
-			    if (fp->f_type == DTYPE_VNODE)
-				    (void) fo_ioctl(fp, TIOCSCTTY, (caddr_t) 0,
-					     td->td_ucred, td);
-		    } else {
-			    PROC_UNLOCK(p);
-			    sx_sunlock(&proctree_lock);
-		    }
+    if (bsd_flags & O_NOCTTY)
+	    goto done;
+
+    /*
+     * XXX In between kern_open() and fget(), another process
+     * having the same filedesc could use that fd without
+     * checking below.
+     */
+    fd = td->td_retval[0];
+    if (fget(td, fd, cap_rights_init(&rights, CAP_IOCTL), &fp) == 0) {
+	    if (fp->f_type != DTYPE_VNODE) {
 		    fdrop(fp, td);
-		    /*
-		     * XXX as above, fdrop()/kern_close() pair is racy.
-		     */
-		    if (error)
-			    kern_close(td, fd);
+		    goto done;
+	    }
+	    sx_slock(&proctree_lock);
+	    PROC_LOCK(p);
+	    if (SESS_LEADER(p) && !(p->p_flag & P_CONTROLT)) {
+		    PROC_UNLOCK(p);
+		    sx_sunlock(&proctree_lock);
+		    /* XXXPJD: Verify if TIOCSCTTY is allowed. */
+		    (void) fo_ioctl(fp, TIOCSCTTY, (caddr_t) 0,
+			td->td_ucred, td);
+	    } else {
+		    PROC_UNLOCK(p);
+		    sx_sunlock(&proctree_lock);
 	    }
+	    fdrop(fp, td);
     }
 
+done:
 #ifdef DEBUG
     if (ldebug(open))
 	    printf(LMSG("open returns error %d"), error);

From owner-svn-src-stable@freebsd.org  Sun Oct 18 14:16:02 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE37DA16FC9;
 Sun, 18 Oct 2015 14:16:02 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 84599C5;
 Sun, 18 Oct 2015 14:16:02 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IEG1gI087447;
 Sun, 18 Oct 2015 14:16:01 GMT (envelope-from trasz@FreeBSD.org)
Received: (from trasz@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IEG1uf087446;
 Sun, 18 Oct 2015 14:16:01 GMT (envelope-from trasz@FreeBSD.org)
Message-Id: <201510181416.t9IEG1uf087446@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: trasz set sender to
 trasz@FreeBSD.org using -f
From: Edward Tomasz Napierala <trasz@FreeBSD.org>
Date: Sun, 18 Oct 2015 14:16:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289506 - stable/10/sbin/init
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 18 Oct 2015 14:16:02 -0000

Author: trasz
Date: Sun Oct 18 14:16:01 2015
New Revision: 289506
URL: https://svnweb.freebsd.org/changeset/base/289506

Log:
  MFC r285847:
  
  Add missing SIGUSR1 description.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/sbin/init/init.8
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/init/init.8
==============================================================================
--- stable/10/sbin/init/init.8	Sun Oct 18 14:01:20 2015	(r289505)
+++ stable/10/sbin/init/init.8	Sun Oct 18 14:16:01 2015	(r289506)
@@ -31,7 +31,7 @@
 .\"     @(#)init.8	8.3 (Berkeley) 4/18/94
 .\" $FreeBSD$
 .\"
-.Dd March 14, 2012
+.Dd July 24, 2015
 .Dt INIT 8
 .Os
 .Sh NAME
@@ -284,6 +284,7 @@ will signal the original
 as follows:
 .Bl -column Run-level SIGTERM
 .It Sy "Run-level	Signal	Action"
+.It Cm 0 Ta Dv SIGUSR1 Ta "Halt"
 .It Cm 0 Ta Dv SIGUSR2 Ta "Halt and turn the power off"
 .It Cm 1 Ta Dv SIGTERM Ta "Go to single-user mode"
 .It Cm 6 Ta Dv SIGINT Ta "Reboot the machine"

From owner-svn-src-stable@freebsd.org  Sun Oct 18 14:17:31 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7731BA18059;
 Sun, 18 Oct 2015 14:17:31 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 3EA3221B;
 Sun, 18 Oct 2015 14:17:31 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IEHUMA087545;
 Sun, 18 Oct 2015 14:17:30 GMT (envelope-from trasz@FreeBSD.org)
Received: (from trasz@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IEHUJL087544;
 Sun, 18 Oct 2015 14:17:30 GMT (envelope-from trasz@FreeBSD.org)
Message-Id: <201510181417.t9IEHUJL087544@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: trasz set sender to
 trasz@FreeBSD.org using -f
From: Edward Tomasz Napierala <trasz@FreeBSD.org>
Date: Sun, 18 Oct 2015 14:17:30 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289507 - stable/10/sys/boot/common
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 18 Oct 2015 14:17:31 -0000

Author: trasz
Date: Sun Oct 18 14:17:30 2015
New Revision: 289507
URL: https://svnweb.freebsd.org/changeset/base/289507

Log:
  MFC r285870:
  
  Document md_root in loader(8). The md(4) manual page mentions it,
  but it's hard to find and easy to miss.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/sys/boot/common/loader.8
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/boot/common/loader.8
==============================================================================
--- stable/10/sys/boot/common/loader.8	Sun Oct 18 14:16:01 2015	(r289506)
+++ stable/10/sys/boot/common/loader.8	Sun Oct 18 14:17:30 2015	(r289507)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 22, 2014
+.Dd July 25, 2015
 .Dt LOADER 8
 .Os
 .Sh NAME
@@ -207,12 +207,18 @@ returns an error itself (see
 .Op Fl t Ar type
 .Ar file Cm ...
 .Xc
-Loads a kernel, kernel loadable module (kld), or file of opaque
-contents tagged as being of the type
+Loads a kernel, kernel loadable module (kld), disk image,
+or file of opaque contents tagged as being of the type
 .Ar type .
 Kernel and modules can be either in a.out or ELF format.
 Any arguments passed after the name of the file to be loaded
 will be passed as arguments to that file.
+Use the
+.Li md_image
+type to make the kernel create a file-backed
+.Xr md 4
+disk.
+This is useful for booting from a temporary rootfs.
 Currently, argument passing does not work for the kernel.
 .Pp
 .It Ic load_geli Xo

From owner-svn-src-stable@freebsd.org  Sun Oct 18 14:20:13 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CDA2A180D8;
 Sun, 18 Oct 2015 14:20:13 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id CA2133BB;
 Sun, 18 Oct 2015 14:20:12 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IEKBkP087705;
 Sun, 18 Oct 2015 14:20:11 GMT (envelope-from trasz@FreeBSD.org)
Received: (from trasz@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IEKBLA087704;
 Sun, 18 Oct 2015 14:20:11 GMT (envelope-from trasz@FreeBSD.org)
Message-Id: <201510181420.t9IEKBLA087704@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: trasz set sender to
 trasz@FreeBSD.org using -f
From: Edward Tomasz Napierala <trasz@FreeBSD.org>
Date: Sun, 18 Oct 2015 14:20:11 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289508 - stable/10/sys/boot/forth
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 18 Oct 2015 14:20:13 -0000

Author: trasz
Date: Sun Oct 18 14:20:11 2015
New Revision: 289508
URL: https://svnweb.freebsd.org/changeset/base/289508

Log:
  MFC r285881:
  
  Add md_root example to defaults/loader.conf.
  
  Note that this doesn't quite work yet - the preloaded image
  gets loaded twice for some reason.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/sys/boot/forth/loader.conf
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/boot/forth/loader.conf
==============================================================================
--- stable/10/sys/boot/forth/loader.conf	Sun Oct 18 14:17:30 2015	(r289507)
+++ stable/10/sys/boot/forth/loader.conf	Sun Oct 18 14:20:11 2015	(r289508)
@@ -50,6 +50,16 @@ entropy_cache_type="/boot/entropy"	
 
 
 ##############################################################
+###  Initial memory disk settings  ###########################
+##############################################################
+
+#initmd_load="YES"		# The "initmd" prefix is arbitrary.
+#initmd_type="md_image"		# Create md(4) disk at boot.
+#initmd_name="/boot/root.img"	# Path to a file containing the image.
+#rootdev="ufs:/dev/md0"		# Set the root filesystem to md(4) device.
+
+
+##############################################################
 ###  Loader settings  ########################################
 ##############################################################
 

From owner-svn-src-stable@freebsd.org  Sun Oct 18 14:25:06 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F7E9A182DB;
 Sun, 18 Oct 2015 14:25:06 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 2C98DA4C;
 Sun, 18 Oct 2015 14:25:06 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IEP5iS090433;
 Sun, 18 Oct 2015 14:25:05 GMT (envelope-from trasz@FreeBSD.org)
Received: (from trasz@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IEP5gX090432;
 Sun, 18 Oct 2015 14:25:05 GMT (envelope-from trasz@FreeBSD.org)
Message-Id: <201510181425.t9IEP5gX090432@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: trasz set sender to
 trasz@FreeBSD.org using -f
From: Edward Tomasz Napierala <trasz@FreeBSD.org>
Date: Sun, 18 Oct 2015 14:25:05 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289509 - stable/10/sys/dev/iscsi
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 18 Oct 2015 14:25:06 -0000

Author: trasz
Date: Sun Oct 18 14:25:04 2015
New Revision: 289509
URL: https://svnweb.freebsd.org/changeset/base/289509

Log:
  MFC r286226:
  
  Rework the way iSCSI initiator handles system shutdown. This fixes
  hangs on shutdown with LUNs with mounted filesystems over a disconnected
  iSCSI session.
  
  Sponsored by:	The FreeBSD Foundation

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

Modified: stable/10/sys/dev/iscsi/iscsi.c
==============================================================================
--- stable/10/sys/dev/iscsi/iscsi.c	Sun Oct 18 14:20:11 2015	(r289508)
+++ stable/10/sys/dev/iscsi/iscsi.c	Sun Oct 18 14:25:04 2015	(r289509)
@@ -2324,11 +2324,23 @@ iscsi_shutdown(struct iscsi_softc *sc)
 {
 	struct iscsi_session *is;
 
-	ISCSI_DEBUG("removing all sessions due to shutdown");
+	/*
+	 * Trying to reconnect during system shutdown would lead to hang.
+	 */
+	fail_on_disconnection = 1;
 
+	/*
+	 * If we have any sessions waiting for reconnection, request
+	 * maintenance thread to fail them immediately instead of waiting
+	 * for reconnect timeout.
+	 */
 	sx_slock(&sc->sc_lock);
-	TAILQ_FOREACH(is, &sc->sc_sessions, is_next)
-		iscsi_session_terminate(is);
+	TAILQ_FOREACH(is, &sc->sc_sessions, is_next) {
+		ISCSI_SESSION_LOCK(is);
+		if (is->is_waiting_for_iscsid)
+			iscsi_session_reconnect(is);
+		ISCSI_SESSION_UNLOCK(is);
+	}
 	sx_sunlock(&sc->sc_lock);
 }
 
@@ -2354,12 +2366,7 @@ iscsi_load(void)
 	}
 	sc->sc_cdev->si_drv1 = sc;
 
-	/*
-	 * Note that this needs to get run before dashutdown().  Otherwise,
-	 * when rebooting with iSCSI session with outstanding requests,
-	 * but disconnected, dashutdown() will hang on cam_periph_runccb().
-	 */
-	sc->sc_shutdown_eh = EVENTHANDLER_REGISTER(shutdown_post_sync,
+	sc->sc_shutdown_eh = EVENTHANDLER_REGISTER(shutdown_pre_sync,
 	    iscsi_shutdown, sc, SHUTDOWN_PRI_FIRST);
 
 	return (0);
@@ -2377,7 +2384,7 @@ iscsi_unload(void)
 	}
 
 	if (sc->sc_shutdown_eh != NULL)
-		EVENTHANDLER_DEREGISTER(shutdown_post_sync, sc->sc_shutdown_eh);
+		EVENTHANDLER_DEREGISTER(shutdown_pre_sync, sc->sc_shutdown_eh);
 
 	sx_slock(&sc->sc_lock);
 	TAILQ_FOREACH_SAFE(is, &sc->sc_sessions, is_next, tmp)

From owner-svn-src-stable@freebsd.org  Sun Oct 18 14:31:56 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 050C8A184F8;
 Sun, 18 Oct 2015 14:31:56 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id C3E82D8A;
 Sun, 18 Oct 2015 14:31:55 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IEVsXo093222;
 Sun, 18 Oct 2015 14:31:54 GMT (envelope-from trasz@FreeBSD.org)
Received: (from trasz@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IEVs98093221;
 Sun, 18 Oct 2015 14:31:54 GMT (envelope-from trasz@FreeBSD.org)
Message-Id: <201510181431.t9IEVs98093221@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: trasz set sender to
 trasz@FreeBSD.org using -f
From: Edward Tomasz Napierala <trasz@FreeBSD.org>
Date: Sun, 18 Oct 2015 14:31:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289510 - stable/10/sys/kern
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 18 Oct 2015 14:31:56 -0000

Author: trasz
Date: Sun Oct 18 14:31:54 2015
New Revision: 289510
URL: https://svnweb.freebsd.org/changeset/base/289510

Log:
  MFC r286281:
  
  Mark vgonel() as static.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/sys/kern/vfs_subr.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/kern/vfs_subr.c
==============================================================================
--- stable/10/sys/kern/vfs_subr.c	Sun Oct 18 14:25:04 2015	(r289509)
+++ stable/10/sys/kern/vfs_subr.c	Sun Oct 18 14:31:54 2015	(r289510)
@@ -2802,7 +2802,7 @@ unlock:
 /*
  * vgone, with the vp interlock held.
  */
-void
+static void
 vgonel(struct vnode *vp)
 {
 	struct thread *td;

From owner-svn-src-stable@freebsd.org  Sun Oct 18 14:34:15 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A343A18563;
 Sun, 18 Oct 2015 14:34:15 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id D40A5FF2;
 Sun, 18 Oct 2015 14:34:14 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IEYDng093388;
 Sun, 18 Oct 2015 14:34:13 GMT (envelope-from trasz@FreeBSD.org)
Received: (from trasz@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IEYDvd093387;
 Sun, 18 Oct 2015 14:34:13 GMT (envelope-from trasz@FreeBSD.org)
Message-Id: <201510181434.t9IEYDvd093387@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: trasz set sender to
 trasz@FreeBSD.org using -f
From: Edward Tomasz Napierala <trasz@FreeBSD.org>
Date: Sun, 18 Oct 2015 14:34:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289511 - stable/10/sys/geom
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 18 Oct 2015 14:34:15 -0000

Author: trasz
Date: Sun Oct 18 14:34:13 2015
New Revision: 289511
URL: https://svnweb.freebsd.org/changeset/base/289511

Log:
  MFC r286237:
  
  Fix panic that would happen on forcibly unmounting devfs (note that
  as it is now, devfs ignores MNT_FORCE anyway, so it needs to be modified
  to trigger the panic) with consumers still opened.
  
  Note that this still results in a leak of r/w/e counters.  It seems
  to be harmless, though.  If anyone knows a better way to approach
  this - please tell.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/sys/geom/geom_dev.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/geom/geom_dev.c
==============================================================================
--- stable/10/sys/geom/geom_dev.c	Sun Oct 18 14:31:54 2015	(r289510)
+++ stable/10/sys/geom/geom_dev.c	Sun Oct 18 14:34:13 2015	(r289511)
@@ -399,6 +399,20 @@ g_dev_close(struct cdev *dev, int flags,
 #else
 	e = 0;
 #endif
+
+	/*
+	 * The vgonel(9) - caused by eg. forced unmount of devfs - calls
+	 * VOP_CLOSE(9) on devfs vnode without any FREAD or FWRITE flags,
+	 * which would result in zero deltas, which in turn would cause
+	 * panic in g_access(9).
+	 *
+	 * Note that we cannot zero the counters (ie. do "r = cp->acr"
+	 * etc) instead, because the consumer might be opened in another
+	 * devfs instance.
+	 */
+	if (r + w + e == 0)
+		return (EINVAL);
+
 	sc = cp->private;
 	mtx_lock(&sc->sc_mtx);
 	sc->sc_open += r + w + e;

From owner-svn-src-stable@freebsd.org  Sun Oct 18 14:36:06 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4368EA185FC;
 Sun, 18 Oct 2015 14:36:06 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 0DB701B6;
 Sun, 18 Oct 2015 14:36:05 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IEa5c2093518;
 Sun, 18 Oct 2015 14:36:05 GMT (envelope-from trasz@FreeBSD.org)
Received: (from trasz@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IEa5Lf093517;
 Sun, 18 Oct 2015 14:36:05 GMT (envelope-from trasz@FreeBSD.org)
Message-Id: <201510181436.t9IEa5Lf093517@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: trasz set sender to
 trasz@FreeBSD.org using -f
From: Edward Tomasz Napierala <trasz@FreeBSD.org>
Date: Sun, 18 Oct 2015 14:36:05 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289512 - stable/10/sys/geom
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 18 Oct 2015 14:36:06 -0000

Author: trasz
Date: Sun Oct 18 14:36:04 2015
New Revision: 289512
URL: https://svnweb.freebsd.org/changeset/base/289512

Log:
  MFC r286283:
  
  Fix panic triggered by code like this:
  open("/dev/md0", O_EXEC);
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/sys/geom/geom_dev.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/geom/geom_dev.c
==============================================================================
--- stable/10/sys/geom/geom_dev.c	Sun Oct 18 14:34:13 2015	(r289511)
+++ stable/10/sys/geom/geom_dev.c	Sun Oct 18 14:36:04 2015	(r289512)
@@ -356,6 +356,13 @@ g_dev_open(struct cdev *dev, int flags, 
 #else
 	e = 0;
 #endif
+
+	/*
+	 * This happens on attempt to open a device node with O_EXEC.
+	 */
+	if (r + w + e == 0)
+		return (EINVAL);
+
 	if (w) {
 		/*
 		 * When running in very secure mode, do not allow

From owner-svn-src-stable@freebsd.org  Sun Oct 18 14:41:40 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68946A1870E;
 Sun, 18 Oct 2015 14:41:40 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 158B57BB;
 Sun, 18 Oct 2015 14:41:40 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IEfdoL096274;
 Sun, 18 Oct 2015 14:41:39 GMT (envelope-from trasz@FreeBSD.org)
Received: (from trasz@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IEfcnH096271;
 Sun, 18 Oct 2015 14:41:38 GMT (envelope-from trasz@FreeBSD.org)
Message-Id: <201510181441.t9IEfcnH096271@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: trasz set sender to
 trasz@FreeBSD.org using -f
From: Edward Tomasz Napierala <trasz@FreeBSD.org>
Date: Sun, 18 Oct 2015 14:41:38 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289513 - in stable/10/sys: fs/devfs kern sys
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 18 Oct 2015 14:41:40 -0000

Author: trasz
Date: Sun Oct 18 14:41:38 2015
New Revision: 289513
URL: https://svnweb.freebsd.org/changeset/base/289513

Log:
  MFC r287033:
  
  After r286237 it should be fine to call vgone(9) on a busy GEOM vnode;
  remove KASSERT that would prevent forced devfs unmount from working.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/sys/fs/devfs/devfs_vnops.c
  stable/10/sys/kern/vfs_subr.c
  stable/10/sys/sys/vnode.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/devfs/devfs_vnops.c
==============================================================================
--- stable/10/sys/fs/devfs/devfs_vnops.c	Sun Oct 18 14:36:04 2015	(r289512)
+++ stable/10/sys/fs/devfs/devfs_vnops.c	Sun Oct 18 14:41:38 2015	(r289513)
@@ -64,6 +64,7 @@
 #include <sys/vnode.h>
 
 static struct vop_vector devfs_vnodeops;
+static struct vop_vector devfs_specops;
 static struct fileops devfs_ops_f;
 
 #include <fs/devfs/devfs.h>
@@ -1763,7 +1764,7 @@ static struct vop_vector devfs_vnodeops 
 	.vop_vptocnp =		devfs_vptocnp,
 };
 
-struct vop_vector devfs_specops = {
+static struct vop_vector devfs_specops = {
 	.vop_default =		&default_vnodeops,
 
 	.vop_access =		devfs_access,

Modified: stable/10/sys/kern/vfs_subr.c
==============================================================================
--- stable/10/sys/kern/vfs_subr.c	Sun Oct 18 14:36:04 2015	(r289512)
+++ stable/10/sys/kern/vfs_subr.c	Sun Oct 18 14:41:38 2015	(r289513)
@@ -2661,10 +2661,6 @@ loop:
 		 * If FORCECLOSE is set, forcibly close the vnode.
 		 */
 		if (vp->v_usecount == 0 || (flags & FORCECLOSE)) {
-			VNASSERT(vp->v_usecount == 0 ||
-			    vp->v_op != &devfs_specops ||
-			    (vp->v_type != VCHR && vp->v_type != VBLK), vp,
-			    ("device VNODE %p is FORCECLOSED", vp));
 			vgonel(vp);
 		} else {
 			busy++;

Modified: stable/10/sys/sys/vnode.h
==============================================================================
--- stable/10/sys/sys/vnode.h	Sun Oct 18 14:36:04 2015	(r289512)
+++ stable/10/sys/sys/vnode.h	Sun Oct 18 14:41:38 2015	(r289513)
@@ -822,7 +822,6 @@ void vnode_destroy_vobject(struct vnode 
 extern struct vop_vector fifo_specops;
 extern struct vop_vector dead_vnodeops;
 extern struct vop_vector default_vnodeops;
-extern struct vop_vector devfs_specops;
 
 #define VOP_PANIC	((void*)(uintptr_t)vop_panic)
 #define VOP_NULL	((void*)(uintptr_t)vop_null)

From owner-svn-src-stable@freebsd.org  Sun Oct 18 14:46:13 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90ADBA188E4;
 Sun, 18 Oct 2015 14:46:13 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 4149F9C3;
 Sun, 18 Oct 2015 14:46:13 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IEkC6o096504;
 Sun, 18 Oct 2015 14:46:12 GMT (envelope-from trasz@FreeBSD.org)
Received: (from trasz@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IEkCRS096503;
 Sun, 18 Oct 2015 14:46:12 GMT (envelope-from trasz@FreeBSD.org)
Message-Id: <201510181446.t9IEkCRS096503@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: trasz set sender to
 trasz@FreeBSD.org using -f
From: Edward Tomasz Napierala <trasz@FreeBSD.org>
Date: Sun, 18 Oct 2015 14:46:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289514 - stable/10/sbin/mdconfig
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 18 Oct 2015 14:46:13 -0000

Author: trasz
Date: Sun Oct 18 14:46:12 2015
New Revision: 289514
URL: https://svnweb.freebsd.org/changeset/base/289514

Log:
  MFC r257165 (by jmg@):
  
  Document that -a will output the device name when -u is not specified..
  when -u is specified it is not...
  
  update the docs to say that you can use full device names w/ -u, and
  update the examples...
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/sbin/mdconfig/mdconfig.8
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/mdconfig/mdconfig.8
==============================================================================
--- stable/10/sbin/mdconfig/mdconfig.8	Sun Oct 18 14:41:38 2015	(r289513)
+++ stable/10/sbin/mdconfig/mdconfig.8	Sun Oct 18 14:46:12 2015	(r289514)
@@ -89,6 +89,9 @@ Options indicate an action to be perform
 Attach a memory disk.
 This will configure and attach a memory disk with the
 parameters specified and attach it to the system.
+If the
+.Fl u Ar unit
+option is not provided, the newly created device name will be printed on stdout.
 .It Fl d
 Detach a memory disk from the system and release all resources.
 .It Fl r
@@ -209,9 +212,12 @@ that might adversely affect the system.
 Enable/disable readonly mode.
 .El
 .It Fl u Ar unit
-Request a specific unit number for the
+Request a specific unit number or device name for the
 .Xr md 4
 device instead of automatic allocation.
+If a device name is specified, it must be start with
+.Dq md
+followed by the unit number.
 .El
 .Pp
 The last form,
@@ -237,19 +243,19 @@ with
 .Pa /tmp/boot.flp
 as backing storage:
 .Pp
-.Dl mdconfig -a -t vnode -f /tmp/boot.flp -u 4
+.Dl mdconfig -a -t vnode -f /tmp/boot.flp -u md4
 .Pp
 Detach and free all resources used by
 .Pa /dev/md4 :
 .Pp
-.Dl mdconfig -d -u 4
+.Dl mdconfig -d -u md4
 .Pp
 Create a 128MByte swap backed disk, initialize an
 .Xr ffs 7
 file system on it, and mount it on
 .Pa /tmp :
 .Bd -literal -offset indent
-mdconfig -a -t swap -s 128M -u 10
+mdconfig -a -t swap -s 128M -u md10
 newfs -U /dev/md10
 mount /dev/md10 /tmp
 chmod 1777 /tmp
@@ -263,7 +269,7 @@ are implied
 .Pc :
 .Bd -literal -offset indent
 dd if=/dev/zero of=somebackingfile bs=1k count=5k
-mdconfig -f somebackingfile -u 0
+mdconfig -f somebackingfile -u md0
 bsdlabel -w md0 auto
 newfs md0c
 mount /dev/md0c /mnt
@@ -290,7 +296,7 @@ is used to skip over the header informat
 .Pa md1.nop
 to the start of the filesystem in the image.
 .Bd -literal -offset indent
-mdconfig -f diskimage.img -u 1
+mdconfig -f diskimage.img -u md1
 gnop create -o 512K md1
 mount /dev/md1.nop /mnt
 .Ed

From owner-svn-src-stable@freebsd.org  Sun Oct 18 14:47:21 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25839A1893A;
 Sun, 18 Oct 2015 14:47:21 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id E2A3AB0D;
 Sun, 18 Oct 2015 14:47:20 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IElJGh096598;
 Sun, 18 Oct 2015 14:47:19 GMT (envelope-from trasz@FreeBSD.org)
Received: (from trasz@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IElJ7Q096597;
 Sun, 18 Oct 2015 14:47:19 GMT (envelope-from trasz@FreeBSD.org)
Message-Id: <201510181447.t9IElJ7Q096597@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: trasz set sender to
 trasz@FreeBSD.org using -f
From: Edward Tomasz Napierala <trasz@FreeBSD.org>
Date: Sun, 18 Oct 2015 14:47:19 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289515 - stable/10/sbin/mdconfig
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 18 Oct 2015 14:47:21 -0000

Author: trasz
Date: Sun Oct 18 14:47:19 2015
New Revision: 289515
URL: https://svnweb.freebsd.org/changeset/base/289515

Log:
  MFC r257182 (by jmg@):
  
  bump date forgotten in r257165
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/sbin/mdconfig/mdconfig.8
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/mdconfig/mdconfig.8
==============================================================================
--- stable/10/sbin/mdconfig/mdconfig.8	Sun Oct 18 14:46:12 2015	(r289514)
+++ stable/10/sbin/mdconfig/mdconfig.8	Sun Oct 18 14:47:19 2015	(r289515)
@@ -41,7 +41,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 20, 2013
+.Dd October 26, 2013
 .Dt MDCONFIG 8
 .Os
 .Sh NAME

From owner-svn-src-stable@freebsd.org  Sun Oct 18 14:52:33 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71BFBA18AF5;
 Sun, 18 Oct 2015 14:52:33 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 32372F98;
 Sun, 18 Oct 2015 14:52:33 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IEqWkU099333;
 Sun, 18 Oct 2015 14:52:32 GMT (envelope-from trasz@FreeBSD.org)
Received: (from trasz@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IEqVh9099329;
 Sun, 18 Oct 2015 14:52:31 GMT (envelope-from trasz@FreeBSD.org)
Message-Id: <201510181452.t9IEqVh9099329@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: trasz set sender to
 trasz@FreeBSD.org using -f
From: Edward Tomasz Napierala <trasz@FreeBSD.org>
Date: Sun, 18 Oct 2015 14:52:31 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289516 - in stable/10: sbin/mdconfig sys/dev/md sys/sys
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 18 Oct 2015 14:52:33 -0000

Author: trasz
Date: Sun Oct 18 14:52:31 2015
New Revision: 289516
URL: https://svnweb.freebsd.org/changeset/base/289516

Log:
  MFC r258909:
  
  Tweak mdconfig(8) manual page, in particular revise the EXAMPLES
  section.  This removes stuff that doesn't really belong there,
  and simplifies examples for the basic operations.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/sbin/mdconfig/mdconfig.8
  stable/10/sbin/mdconfig/mdconfig.c
  stable/10/sys/dev/md/md.c
  stable/10/sys/sys/mdioctl.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/mdconfig/mdconfig.8
==============================================================================
--- stable/10/sbin/mdconfig/mdconfig.8	Sun Oct 18 14:47:19 2015	(r289515)
+++ stable/10/sbin/mdconfig/mdconfig.8	Sun Oct 18 14:52:31 2015	(r289516)
@@ -41,7 +41,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd October 26, 2013
+.Dd November 30, 2013
 .Dt MDCONFIG 8
 .Os
 .Sh NAME
@@ -122,6 +122,8 @@ Using
 backing is generally preferred instead of using
 .Cm malloc
 backing.
+.It Cm null
+Bitsink; all writes do nothing, all reads return zeroes.
 .El
 .It Fl f Ar file
 Filename to use for the vnode type memory disk.

Modified: stable/10/sbin/mdconfig/mdconfig.c
==============================================================================
--- stable/10/sbin/mdconfig/mdconfig.c	Sun Oct 18 14:47:19 2015	(r289515)
+++ stable/10/sbin/mdconfig/mdconfig.c	Sun Oct 18 14:52:31 2015	(r289516)
@@ -155,6 +155,9 @@ main(int argc, char **argv)
 			} else if (!strcmp(optarg, "swap")) {
 				mdio.md_type = MD_SWAP;
 				mdio.md_options |= MD_CLUSTER | MD_AUTOUNIT | MD_COMPRESS;
+			} else if (!strcmp(optarg, "null")) {
+				mdio.md_type = MD_NULL;
+				mdio.md_options |= MD_CLUSTER | MD_AUTOUNIT | MD_COMPRESS;
 			} else
 				errx(1, "unknown type: %s", optarg);
 			break;
@@ -287,9 +290,10 @@ main(int argc, char **argv)
 			}
 		}
 
-		if ((mdio.md_type == MD_MALLOC || mdio.md_type == MD_SWAP) &&
-		    sflag == NULL)
-			errx(1, "must specify -s for -t malloc or -t swap");
+		if ((mdio.md_type == MD_MALLOC || mdio.md_type == MD_SWAP ||
+		    mdio.md_type == MD_NULL) && sflag == NULL)
+			errx(1, "must specify -s for -t malloc, -t swap, "
+			    "or -t null");
 		if (mdio.md_type == MD_VNODE && mdio.md_file[0] == '\0')
 			errx(1, "must specify -f for -t vnode");
 	} else {

Modified: stable/10/sys/dev/md/md.c
==============================================================================
--- stable/10/sys/dev/md/md.c	Sun Oct 18 14:47:19 2015	(r289515)
+++ stable/10/sys/dev/md/md.c	Sun Oct 18 14:52:31 2015	(r289516)
@@ -911,6 +911,22 @@ mdstart_swap(struct md_s *sc, struct bio
 	return (rv != VM_PAGER_ERROR ? 0 : ENOSPC);
 }
 
+static int
+mdstart_null(struct md_s *sc, struct bio *bp)
+{
+
+	switch (bp->bio_cmd) {
+	case BIO_READ:
+		bzero(bp->bio_data, bp->bio_length);
+		cpu_flush_dcache(bp->bio_data, bp->bio_length);
+		break;
+	case BIO_WRITE:
+		break;
+	}
+	bp->bio_resid = 0;
+	return (0);
+}
+
 static void
 md_kthread(void *arg)
 {
@@ -1030,6 +1046,7 @@ mdinit(struct md_s *sc)
 		pp->flags |= G_PF_ACCEPT_UNMAPPED;
 		break;
 	case MD_PRELOAD:
+	case MD_NULL:
 		break;
 	}
 	sc->gp = gp;
@@ -1248,6 +1265,7 @@ mdresize(struct md_s *sc, struct md_ioct
 
 	switch (sc->type) {
 	case MD_VNODE:
+	case MD_NULL:
 		break;
 	case MD_SWAP:
 		if (mdio->md_mediasize <= 0 ||
@@ -1342,6 +1360,19 @@ mdcreate_swap(struct md_s *sc, struct md
 	return (error);
 }
 
+static int
+mdcreate_null(struct md_s *sc, struct md_ioctl *mdio, struct thread *td)
+{
+
+	/*
+	 * Range check.  Disallow negative sizes or any size less then the
+	 * size of a page.  Then round to a page.
+	 */
+	if (sc->mediasize <= 0 || (sc->mediasize % PAGE_SIZE) != 0)
+		return (EDOM);
+
+	return (0);
+}
 
 static int
 xmdctlioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td)
@@ -1374,6 +1405,7 @@ xmdctlioctl(struct cdev *dev, u_long cmd
 		case MD_PRELOAD:
 		case MD_VNODE:
 		case MD_SWAP:
+		case MD_NULL:
 			break;
 		default:
 			return (EINVAL);
@@ -1419,6 +1451,10 @@ xmdctlioctl(struct cdev *dev, u_long cmd
 			sc->start = mdstart_swap;
 			error = mdcreate_swap(sc, mdio, td);
 			break;
+		case MD_NULL:
+			sc->start = mdstart_null;
+			error = mdcreate_null(sc, mdio, td);
+			break;
 		}
 		if (error != 0) {
 			mddestroy(sc, td);
@@ -1589,6 +1625,9 @@ g_md_dumpconf(struct sbuf *sb, const cha
 	case MD_SWAP:
 		type = "swap";
 		break;
+	case MD_NULL:
+		type = "null";
+		break;
 	default:
 		type = "unknown";
 		break;

Modified: stable/10/sys/sys/mdioctl.h
==============================================================================
--- stable/10/sys/sys/mdioctl.h	Sun Oct 18 14:47:19 2015	(r289515)
+++ stable/10/sys/sys/mdioctl.h	Sun Oct 18 14:52:31 2015	(r289516)
@@ -43,7 +43,7 @@
 #ifndef _SYS_MDIOCTL_H_
 #define _SYS_MDIOCTL_H_
 
-enum md_types {MD_MALLOC, MD_PRELOAD, MD_VNODE, MD_SWAP};
+enum md_types {MD_MALLOC, MD_PRELOAD, MD_VNODE, MD_SWAP, MD_NULL};
 
 /*
  * Ioctl definitions for memory disk pseudo-device.

From owner-svn-src-stable@freebsd.org  Sun Oct 18 14:55:10 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id B58FAA18B89;
 Sun, 18 Oct 2015 14:55:10 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 90D6C1AA;
 Sun, 18 Oct 2015 14:55:10 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IEt9eW099498;
 Sun, 18 Oct 2015 14:55:09 GMT (envelope-from trasz@FreeBSD.org)
Received: (from trasz@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IEt9ZH099497;
 Sun, 18 Oct 2015 14:55:09 GMT (envelope-from trasz@FreeBSD.org)
Message-Id: <201510181455.t9IEt9ZH099497@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: trasz set sender to
 trasz@FreeBSD.org using -f
From: Edward Tomasz Napierala <trasz@FreeBSD.org>
Date: Sun, 18 Oct 2015 14:55:09 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289517 - stable/10/sbin/mdconfig
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 18 Oct 2015 14:55:10 -0000

Author: trasz
Date: Sun Oct 18 14:55:09 2015
New Revision: 289517
URL: https://svnweb.freebsd.org/changeset/base/289517

Log:
  MFC r286360:
  
  Tweak mdconfig(8) manual page, in particular revise the EXAMPLES
  section.  This removes stuff that doesn't really belong there,
  and simplifies examples for the basic operations.
  
  MFC r286361:
  
  Whoops, wrong flag.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/sbin/mdconfig/mdconfig.8
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/mdconfig/mdconfig.8
==============================================================================
--- stable/10/sbin/mdconfig/mdconfig.8	Sun Oct 18 14:52:31 2015	(r289516)
+++ stable/10/sbin/mdconfig/mdconfig.8	Sun Oct 18 14:55:09 2015	(r289517)
@@ -41,12 +41,12 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd November 30, 2013
+.Dd August 6, 2015
 .Dt MDCONFIG 8
 .Os
 .Sh NAME
 .Nm mdconfig
-.Nd configure and enable memory disks
+.Nd create and control memory disks
 .Sh SYNOPSIS
 .Nm
 .Fl a
@@ -79,7 +79,7 @@
 .Sh DESCRIPTION
 The
 .Nm
-utility configures and enables
+utility creates and controls
 .Xr md 4
 devices.
 .Pp
@@ -107,7 +107,7 @@ If the
 .Fl o Cm reserve
 option is not set, creating and filling a large
 malloc-backed memory disk is a very easy way to
-panic a system.
+panic the system.
 .It Cm vnode
 A file specified with
 .Fl f Ar file
@@ -168,7 +168,9 @@ or
 .Cm t
 which
 denotes byte, kilobyte, megabyte, gigabyte and terabyte respectively.
-The
+When used without the
+.Fl r
+option, the
 .Fl a
 and
 .Fl t Ar swap
@@ -210,6 +212,11 @@ Enable/disable compression features to r
 .It Oo Cm no Oc Ns Cm force
 Disable/enable extra sanity checks to prevent the user from doing something
 that might adversely affect the system.
+This can be used with the
+.Fl d
+flag to forcibly destroy an
+.Xr md 4
+disk that is still in use.
 .It Oo Cm no Oc Ns Cm readonly
 Enable/disable readonly mode.
 .El
@@ -231,66 +238,58 @@ is provided for convenience as an abbrev
 .Fl t Ar vnode
 .Fl f Ar file .
 .Sh EXAMPLES
-Create a 4 megabyte
-.Xr malloc 9
-backed memory disk.
-The name of the allocated unit will be printed on stdout, such as
-.Dq Li md3 :
-.Pp
-.Dl mdconfig -a -t malloc -s 4m
-.Pp
-Create a disk named
-.Pa /dev/md4
-with
+Create a disk with
 .Pa /tmp/boot.flp
-as backing storage:
+as backing storage.
+The name of the allocated unit will be printed on stdout, such as
+.Dq Li md0 :
+.Bd -literal -offset indent
+mdconfig /tmp/boot.flp
+.Ed
 .Pp
-.Dl mdconfig -a -t vnode -f /tmp/boot.flp -u md4
+Create a 1 gigabyte swap backed memory disk named
+.Dq Li md3 :
+.Bd -literal -offset indent
+mdconfig -s 1g -u md3
+.Ed
 .Pp
 Detach and free all resources used by
-.Pa /dev/md4 :
+.Pa /dev/md3 :
+.Bd -literal -offset indent
+mdconfig -du md3
+.Ed
+.Pp
+Show detailed information on current memory disks:
+.Bd -literal -offset indent
+mdconfig -lv
+.Ed
 .Pp
-.Dl mdconfig -d -u md4
+Resize the
+.Dq Li md3
+memory disk to 2 gigabytes:
+.Bd -literal -offset indent
+mdconfig -rs 2g -u md3
+.Ed
 .Pp
-Create a 128MByte swap backed disk, initialize an
+Create a 1 gigabyte swap backed disk, initialize an
 .Xr ffs 7
 file system on it, and mount it on
 .Pa /tmp :
 .Bd -literal -offset indent
-mdconfig -a -t swap -s 128M -u md10
+mdconfig -s 1g -u md10
 newfs -U /dev/md10
 mount /dev/md10 /tmp
 chmod 1777 /tmp
 .Ed
 .Pp
-Create a 5MB file-backed disk
-.Po Fl a
-and
-.Fl t Ar vnode
-are implied
-.Pc :
-.Bd -literal -offset indent
-dd if=/dev/zero of=somebackingfile bs=1k count=5k
-mdconfig -f somebackingfile -u md0
-bsdlabel -w md0 auto
-newfs md0c
-mount /dev/md0c /mnt
-.Ed
-.Pp
-Create an
-.Xr md 4
-device out of an ISO 9660 CD image file
-.Po Fl a
-and
-.Fl t Ar vnode
-are implied
-.Pc , using the first available
+Create a memory disk out of an ISO 9660 CD image file,
+using the first available
 .Xr md 4
-device, and then mount the new memory disk:
+device, and then mount it:
 .Bd -literal -offset indent
 mount -t cd9660 /dev/`mdconfig -f cdimage.iso` /mnt
-.Pp
 .Ed
+.Pp
 Create a file-backed device from a hard disk image that begins
 with 512K of raw header information.
 .Xr gnop 8
@@ -298,7 +297,7 @@ is used to skip over the header informat
 .Pa md1.nop
 to the start of the filesystem in the image.
 .Bd -literal -offset indent
-mdconfig -f diskimage.img -u md1
+mdconfig -u md1 -f diskimage.img
 gnop create -o 512K md1
 mount /dev/md1.nop /mnt
 .Ed

From owner-svn-src-stable@freebsd.org  Sun Oct 18 14:57:43 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE110A18C47;
 Sun, 18 Oct 2015 14:57:43 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id A7BC237C;
 Sun, 18 Oct 2015 14:57:43 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IEvgMR099625;
 Sun, 18 Oct 2015 14:57:42 GMT (envelope-from trasz@FreeBSD.org)
Received: (from trasz@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IEvgdC099624;
 Sun, 18 Oct 2015 14:57:42 GMT (envelope-from trasz@FreeBSD.org)
Message-Id: <201510181457.t9IEvgdC099624@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: trasz set sender to
 trasz@FreeBSD.org using -f
From: Edward Tomasz Napierala <trasz@FreeBSD.org>
Date: Sun, 18 Oct 2015 14:57:42 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289518 - stable/10/sbin/mount_unionfs
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 18 Oct 2015 14:57:44 -0000

Author: trasz
Date: Sun Oct 18 14:57:42 2015
New Revision: 289518
URL: https://svnweb.freebsd.org/changeset/base/289518

Log:
  MFC 287397:
  
  Fix markup.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/sbin/mount_unionfs/mount_unionfs.8
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/mount_unionfs/mount_unionfs.8
==============================================================================
--- stable/10/sbin/mount_unionfs/mount_unionfs.8	Sun Oct 18 14:55:09 2015	(r289517)
+++ stable/10/sbin/mount_unionfs/mount_unionfs.8	Sun Oct 18 14:57:42 2015	(r289518)
@@ -83,7 +83,7 @@ becomes the upper layer.
 However,
 .Ar uniondir
 remains the mount point.
-.It Sm Cm copymode No = Cm traditional | transparent | masquerade Sm
+.It Cm copymode No = Cm traditional | transparent | masquerade
 Specifies the way to create a file or a directory in the upper layer
 automatically when needed.
 The
@@ -98,7 +98,7 @@ For behavior of the
 mode, see
 .Sx MASQUERADE MODE
 below.
-.It Sm Cm whiteout No = Cm always | whenneeded Sm
+.It Cm whiteout No = Cm always | whenneeded
 Specifies whether whiteouts should always be made in the upper layer
 when removing a file or directory or only when it already exists in the
 lower layer.

From owner-svn-src-stable@freebsd.org  Sun Oct 18 14:59:39 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id C170CA18CC0;
 Sun, 18 Oct 2015 14:59:39 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 8A4B9796;
 Sun, 18 Oct 2015 14:59:39 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IExcIS099746;
 Sun, 18 Oct 2015 14:59:38 GMT (envelope-from trasz@FreeBSD.org)
Received: (from trasz@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IExcqg099743;
 Sun, 18 Oct 2015 14:59:38 GMT (envelope-from trasz@FreeBSD.org)
Message-Id: <201510181459.t9IExcqg099743@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: trasz set sender to
 trasz@FreeBSD.org using -f
From: Edward Tomasz Napierala <trasz@FreeBSD.org>
Date: Sun, 18 Oct 2015 14:59:38 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289519 - stable/10/etc/rc.d
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 18 Oct 2015 14:59:39 -0000

Author: trasz
Date: Sun Oct 18 14:59:38 2015
New Revision: 289519
URL: https://svnweb.freebsd.org/changeset/base/289519

Log:
  MFC r287951:
  
  The "automount" rc script should depend on "automountd", not the other
  way around.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/etc/rc.d/automount
  stable/10/etc/rc.d/automountd
  stable/10/etc/rc.d/autounmountd
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/etc/rc.d/automount
==============================================================================
--- stable/10/etc/rc.d/automount	Sun Oct 18 14:57:42 2015	(r289518)
+++ stable/10/etc/rc.d/automount	Sun Oct 18 14:59:38 2015	(r289519)
@@ -4,7 +4,7 @@
 #
 
 # PROVIDE: automount
-# REQUIRE: nfsclient
+# REQUIRE: nfsclient automountd
 # KEYWORD: nojail shutdown
 
 . /etc/rc.subr

Modified: stable/10/etc/rc.d/automountd
==============================================================================
--- stable/10/etc/rc.d/automountd	Sun Oct 18 14:57:42 2015	(r289518)
+++ stable/10/etc/rc.d/automountd	Sun Oct 18 14:59:38 2015	(r289519)
@@ -4,7 +4,7 @@
 #
 
 # PROVIDE: automountd
-# REQUIRE: automount
+# REQUIRE: DAEMON
 # KEYWORD: nojail
 
 . /etc/rc.subr

Modified: stable/10/etc/rc.d/autounmountd
==============================================================================
--- stable/10/etc/rc.d/autounmountd	Sun Oct 18 14:57:42 2015	(r289518)
+++ stable/10/etc/rc.d/autounmountd	Sun Oct 18 14:59:38 2015	(r289519)
@@ -4,7 +4,7 @@
 #
 
 # PROVIDE: autounmountd
-# REQUIRE: nfsclient
+# REQUIRE: DAEMON
 # KEYWORD: nojail
 
 . /etc/rc.subr

From owner-svn-src-stable@freebsd.org  Sun Oct 18 15:02:09 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30E1EA18E17;
 Sun, 18 Oct 2015 15:02:09 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 090CBA8A;
 Sun, 18 Oct 2015 15:02:08 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IF28YD001954;
 Sun, 18 Oct 2015 15:02:08 GMT (envelope-from trasz@FreeBSD.org)
Received: (from trasz@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IF27E1001950;
 Sun, 18 Oct 2015 15:02:07 GMT (envelope-from trasz@FreeBSD.org)
Message-Id: <201510181502.t9IF27E1001950@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: trasz set sender to
 trasz@FreeBSD.org using -f
From: Edward Tomasz Napierala <trasz@FreeBSD.org>
Date: Sun, 18 Oct 2015 15:02:07 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289520 - in stable/10: sbin/geom/class/nop sys/geom/nop
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 18 Oct 2015 15:02:09 -0000

Author: trasz
Date: Sun Oct 18 15:02:07 2015
New Revision: 289520
URL: https://svnweb.freebsd.org/changeset/base/289520

Log:
  MFC r287827:
  
  Add a way to specify stripesize and stripeoffset to gnop(8). This makes
  it possible to "simulate" 4K media, to eg test alignment handling.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/sbin/geom/class/nop/geom_nop.c
  stable/10/sbin/geom/class/nop/gnop.8
  stable/10/sys/geom/nop/g_nop.c
  stable/10/sys/geom/nop/g_nop.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/geom/class/nop/geom_nop.c
==============================================================================
--- stable/10/sbin/geom/class/nop/geom_nop.c	Sun Oct 18 14:59:38 2015	(r289519)
+++ stable/10/sbin/geom/class/nop/geom_nop.c	Sun Oct 18 15:02:07 2015	(r289520)
@@ -43,14 +43,16 @@ struct g_command class_commands[] = {
 	    {
 		{ 'e', "error", "-1", G_TYPE_NUMBER },
 		{ 'o', "offset", "0", G_TYPE_NUMBER },
+		{ 'p', "stripesize", "0", G_TYPE_NUMBER },
+		{ 'P', "stripeoffset", "0", G_TYPE_NUMBER },
 		{ 'r', "rfailprob", "-1", G_TYPE_NUMBER },
 		{ 's', "size", "0", G_TYPE_NUMBER },
 		{ 'S', "secsize", "0", G_TYPE_NUMBER },
 		{ 'w', "wfailprob", "-1", G_TYPE_NUMBER },
 		G_OPT_SENTINEL
 	    },
-	    "[-v] [-e error] [-o offset] [-r rfailprob] [-s size] "
-	    "[-S secsize] [-w wfailprob] dev ..."
+	    "[-v] [-e error] [-o offset] [-p stripesize] [-P stripeoffset] "
+	    "[-r rfailprob] [-s size] [-S secsize] [-w wfailprob] dev ..."
 	},
 	{ "configure", G_FLAG_VERBOSE, NULL,
 	    {

Modified: stable/10/sbin/geom/class/nop/gnop.8
==============================================================================
--- stable/10/sbin/geom/class/nop/gnop.8	Sun Oct 18 14:59:38 2015	(r289519)
+++ stable/10/sbin/geom/class/nop/gnop.8	Sun Oct 18 15:02:07 2015	(r289520)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 14, 2013
+.Dd September 15, 2015
 .Dt GNOP 8
 .Os
 .Sh NAME
@@ -36,6 +36,8 @@
 .Op Fl v
 .Op Fl e Ar error
 .Op Fl o Ar offset
+.Op Fl p Ar stripesize
+.Op Fl P Ar stripeoffset
 .Op Fl r Ar rfailprob
 .Op Fl s Ar size
 .Op Fl S Ar secsize
@@ -115,6 +117,10 @@ Specifies the error number to return on 
 Force the removal of the specified provider.
 .It Fl o Ar offset
 Where to begin on the original provider.
+.It Fl p Ar stripesize
+Value of the stripesize property of the transparent provider.
+.It Fl P Ar stripeoffset
+Value of the stripeoffset property of the transparent provider.
 .It Fl r Ar rfailprob
 Specifies read failure probability in percent.
 .It Fl s Ar size

Modified: stable/10/sys/geom/nop/g_nop.c
==============================================================================
--- stable/10/sys/geom/nop/g_nop.c	Sun Oct 18 14:59:38 2015	(r289519)
+++ stable/10/sys/geom/nop/g_nop.c	Sun Oct 18 15:02:07 2015	(r289520)
@@ -162,7 +162,7 @@ g_nop_access(struct g_provider *pp, int 
 static int
 g_nop_create(struct gctl_req *req, struct g_class *mp, struct g_provider *pp,
     int ioerror, u_int rfailprob, u_int wfailprob, off_t offset, off_t size,
-    u_int secsize)
+    u_int secsize, u_int stripesize, u_int stripeoffset)
 {
 	struct g_nop_softc *sc;
 	struct g_geom *gp;
@@ -208,6 +208,18 @@ g_nop_create(struct gctl_req *req, struc
 		return (EINVAL);
 	}
 	size -= size % secsize;
+	if ((stripesize % pp->sectorsize) != 0) {
+		gctl_error(req, "Invalid stripesize for provider %s.", pp->name);
+		return (EINVAL);
+	}
+	if ((stripeoffset % pp->sectorsize) != 0) {
+		gctl_error(req, "Invalid stripeoffset for provider %s.", pp->name);
+		return (EINVAL);
+	}
+	if (stripesize != 0 && stripeoffset >= stripesize) {
+		gctl_error(req, "stripeoffset is too big.");
+		return (EINVAL);
+	}
 	snprintf(name, sizeof(name), "%s%s", pp->name, G_NOP_SUFFIX);
 	LIST_FOREACH(gp, &mp->geom, geom) {
 		if (strcmp(gp->name, name) == 0) {
@@ -219,6 +231,8 @@ g_nop_create(struct gctl_req *req, struc
 	sc = g_malloc(sizeof(*sc), M_WAITOK | M_ZERO);
 	sc->sc_offset = offset;
 	sc->sc_explicitsize = explicitsize;
+	sc->sc_stripesize = stripesize;
+	sc->sc_stripeoffset = stripeoffset;
 	sc->sc_error = ioerror;
 	sc->sc_rfailprob = rfailprob;
 	sc->sc_wfailprob = wfailprob;
@@ -238,6 +252,8 @@ g_nop_create(struct gctl_req *req, struc
 	newpp->flags |= G_PF_DIRECT_SEND | G_PF_DIRECT_RECEIVE;
 	newpp->mediasize = size;
 	newpp->sectorsize = secsize;
+	newpp->stripesize = stripesize;
+	newpp->stripeoffset = stripeoffset;
 
 	cp = g_new_consumer(gp);
 	cp->flags |= G_CF_DIRECT_SEND | G_CF_DIRECT_RECEIVE;
@@ -304,7 +320,8 @@ static void
 g_nop_ctl_create(struct gctl_req *req, struct g_class *mp)
 {
 	struct g_provider *pp;
-	intmax_t *error, *rfailprob, *wfailprob, *offset, *secsize, *size;
+	intmax_t *error, *rfailprob, *wfailprob, *offset, *secsize, *size,
+	    *stripesize, *stripeoffset;
 	const char *name;
 	char param[16];
 	int i, *nargs;
@@ -370,6 +387,24 @@ g_nop_ctl_create(struct gctl_req *req, s
 		gctl_error(req, "Invalid '%s' argument", "secsize");
 		return;
 	}
+	stripesize = gctl_get_paraml(req, "stripesize", sizeof(*stripesize));
+	if (stripesize == NULL) {
+		gctl_error(req, "No '%s' argument", "stripesize");
+		return;
+	}
+	if (*stripesize < 0) {
+		gctl_error(req, "Invalid '%s' argument", "stripesize");
+		return;
+	}
+	stripeoffset = gctl_get_paraml(req, "stripeoffset", sizeof(*stripeoffset));
+	if (stripeoffset == NULL) {
+		gctl_error(req, "No '%s' argument", "stripeoffset");
+		return;
+	}
+	if (*stripeoffset < 0) {
+		gctl_error(req, "Invalid '%s' argument", "stripeoffset");
+		return;
+	}
 
 	for (i = 0; i < *nargs; i++) {
 		snprintf(param, sizeof(param), "arg%d", i);
@@ -390,7 +425,8 @@ g_nop_ctl_create(struct gctl_req *req, s
 		    *error == -1 ? EIO : (int)*error,
 		    *rfailprob == -1 ? 0 : (u_int)*rfailprob,
 		    *wfailprob == -1 ? 0 : (u_int)*wfailprob,
-		    (off_t)*offset, (off_t)*size, (u_int)*secsize) != 0) {
+		    (off_t)*offset, (off_t)*size, (u_int)*secsize,
+		    (u_int)*stripesize, (u_int)*stripeoffset) != 0) {
 			return;
 		}
 	}

Modified: stable/10/sys/geom/nop/g_nop.h
==============================================================================
--- stable/10/sys/geom/nop/g_nop.h	Sun Oct 18 14:59:38 2015	(r289519)
+++ stable/10/sys/geom/nop/g_nop.h	Sun Oct 18 15:02:07 2015	(r289520)
@@ -59,6 +59,8 @@ struct g_nop_softc {
 	int		sc_error;
 	off_t		sc_offset;
 	off_t		sc_explicitsize;
+	off_t		sc_stripesize;
+	off_t		sc_stripeoffset;
 	u_int		sc_rfailprob;
 	u_int		sc_wfailprob;
 	uintmax_t	sc_reads;

From owner-svn-src-stable@freebsd.org  Sun Oct 18 15:03:48 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8AE6BA18EA9;
 Sun, 18 Oct 2015 15:03:48 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 5303FCD9;
 Sun, 18 Oct 2015 15:03:48 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IF3l2Y002664;
 Sun, 18 Oct 2015 15:03:47 GMT (envelope-from trasz@FreeBSD.org)
Received: (from trasz@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IF3lTW002663;
 Sun, 18 Oct 2015 15:03:47 GMT (envelope-from trasz@FreeBSD.org)
Message-Id: <201510181503.t9IF3lTW002663@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: trasz set sender to
 trasz@FreeBSD.org using -f
From: Edward Tomasz Napierala <trasz@FreeBSD.org>
Date: Sun, 18 Oct 2015 15:03:47 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289521 - stable/10/usr.bin/rctl
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 18 Oct 2015 15:03:48 -0000

Author: trasz
Date: Sun Oct 18 15:03:47 2015
New Revision: 289521
URL: https://svnweb.freebsd.org/changeset/base/289521

Log:
  MFC r287785:
  
  Make it clear that 'swapuse' is swap reservation and not actual swap usage.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/usr.bin/rctl/rctl.8
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/rctl/rctl.8
==============================================================================
--- stable/10/usr.bin/rctl/rctl.8	Sun Oct 18 15:02:07 2015	(r289520)
+++ stable/10/usr.bin/rctl/rctl.8	Sun Oct 18 15:03:47 2015	(r289521)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 11, 2014
+.Dd September 14, 2015
 .Dt RCTL 8
 .Os
 .Sh NAME
@@ -193,7 +193,7 @@ resource would be
 .It Sy openfiles Ta "file descriptor table size"
 .It Sy vmemoryuse Ta "address space limit, in bytes"
 .It Sy pseudoterminals Ta "number of PTYs"
-.It Sy swapuse Ta "swap usage, in bytes"
+.It Sy swapuse Ta "swap space that may be reserved or used, in bytes"
 .It Sy nthr Ta "number of threads"
 .It Sy msgqqueued Ta "number of queued SysV messages"
 .It Sy msgqsize Ta "SysV message queue size, in bytes"

From owner-svn-src-stable@freebsd.org  Sun Oct 18 18:37:53 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 579B29D1F8C;
 Sun, 18 Oct 2015 18:37:53 +0000 (UTC)
 (envelope-from jmg@gold.funkthat.com)
Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18])
 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
 (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified))
 by mx1.freebsd.org (Postfix) with ESMTPS id C6A0512A1;
 Sun, 18 Oct 2015 18:37:52 +0000 (UTC)
 (envelope-from jmg@gold.funkthat.com)
Received: from gold.funkthat.com (localhost [127.0.0.1])
 by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t9IIbpxn082550
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
 Sun, 18 Oct 2015 11:37:51 -0700 (PDT)
 (envelope-from jmg@gold.funkthat.com)
Received: (from jmg@localhost)
 by gold.funkthat.com (8.14.5/8.14.5/Submit) id t9IIbpKm082549;
 Sun, 18 Oct 2015 11:37:51 -0700 (PDT) (envelope-from jmg)
Date: Sun, 18 Oct 2015 11:37:51 -0700
From: John-Mark Gurney <jmg@funkthat.com>
To: Edward Tomasz Napierala <trasz@freebsd.org>
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: Re: svn commit: r289516 - in stable/10: sbin/mdconfig sys/dev/md
 sys/sys
Message-ID: <20151018183751.GB65715@funkthat.com>
References: <201510181452.t9IEqVh9099329@repo.freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <201510181452.t9IEqVh9099329@repo.freebsd.org>
X-Operating-System: FreeBSD 9.1-PRERELEASE amd64
X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88  9322 9CB1 8F74 6D3F A396
X-Files: The truth is out there
X-URL: http://resnet.uoregon.edu/~gurney_j/
X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html
X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE
X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger?
User-Agent: Mutt/1.5.21 (2010-09-15)
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7
 (gold.funkthat.com [127.0.0.1]); Sun, 18 Oct 2015 11:37:51 -0700 (PDT)
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 18 Oct 2015 18:37:53 -0000

Edward Tomasz Napierala wrote this message on Sun, Oct 18, 2015 at 14:52 +0000:
> Author: trasz
> Date: Sun Oct 18 14:52:31 2015
> New Revision: 289516
> URL: https://svnweb.freebsd.org/changeset/base/289516
> 
> Log:
>   MFC r258909:

The following description doesn't match what r258909 says:
https://svnweb.freebsd.org/base?view=revision&revision=r258909

wrong commit or wrong message?

>   Tweak mdconfig(8) manual page, in particular revise the EXAMPLES
>   section.  This removes stuff that doesn't really belong there,
>   and simplifies examples for the basic operations.
>   
>   Sponsored by:	The FreeBSD Foundation
> 
> Modified:
>   stable/10/sbin/mdconfig/mdconfig.8
>   stable/10/sbin/mdconfig/mdconfig.c
>   stable/10/sys/dev/md/md.c
>   stable/10/sys/sys/mdioctl.h
> Directory Properties:
>   stable/10/   (props changed)
> 
> Modified: stable/10/sbin/mdconfig/mdconfig.8
> ==============================================================================
> --- stable/10/sbin/mdconfig/mdconfig.8	Sun Oct 18 14:47:19 2015	(r289515)
> +++ stable/10/sbin/mdconfig/mdconfig.8	Sun Oct 18 14:52:31 2015	(r289516)
> @@ -41,7 +41,7 @@
>  .\"
>  .\" $FreeBSD$
>  .\"
> -.Dd October 26, 2013
> +.Dd November 30, 2013
>  .Dt MDCONFIG 8
>  .Os
>  .Sh NAME
> @@ -122,6 +122,8 @@ Using
>  backing is generally preferred instead of using
>  .Cm malloc
>  backing.
> +.It Cm null
> +Bitsink; all writes do nothing, all reads return zeroes.
>  .El
>  .It Fl f Ar file
>  Filename to use for the vnode type memory disk.
> 
> Modified: stable/10/sbin/mdconfig/mdconfig.c
> ==============================================================================
> --- stable/10/sbin/mdconfig/mdconfig.c	Sun Oct 18 14:47:19 2015	(r289515)
> +++ stable/10/sbin/mdconfig/mdconfig.c	Sun Oct 18 14:52:31 2015	(r289516)
> @@ -155,6 +155,9 @@ main(int argc, char **argv)
>  			} else if (!strcmp(optarg, "swap")) {
>  				mdio.md_type = MD_SWAP;
>  				mdio.md_options |= MD_CLUSTER | MD_AUTOUNIT | MD_COMPRESS;
> +			} else if (!strcmp(optarg, "null")) {
> +				mdio.md_type = MD_NULL;
> +				mdio.md_options |= MD_CLUSTER | MD_AUTOUNIT | MD_COMPRESS;
>  			} else
>  				errx(1, "unknown type: %s", optarg);
>  			break;
> @@ -287,9 +290,10 @@ main(int argc, char **argv)
>  			}
>  		}
>  
> -		if ((mdio.md_type == MD_MALLOC || mdio.md_type == MD_SWAP) &&
> -		    sflag == NULL)
> -			errx(1, "must specify -s for -t malloc or -t swap");
> +		if ((mdio.md_type == MD_MALLOC || mdio.md_type == MD_SWAP ||
> +		    mdio.md_type == MD_NULL) && sflag == NULL)
> +			errx(1, "must specify -s for -t malloc, -t swap, "
> +			    "or -t null");
>  		if (mdio.md_type == MD_VNODE && mdio.md_file[0] == '\0')
>  			errx(1, "must specify -f for -t vnode");
>  	} else {
> 
> Modified: stable/10/sys/dev/md/md.c
> ==============================================================================
> --- stable/10/sys/dev/md/md.c	Sun Oct 18 14:47:19 2015	(r289515)
> +++ stable/10/sys/dev/md/md.c	Sun Oct 18 14:52:31 2015	(r289516)
> @@ -911,6 +911,22 @@ mdstart_swap(struct md_s *sc, struct bio
>  	return (rv != VM_PAGER_ERROR ? 0 : ENOSPC);
>  }
>  
> +static int
> +mdstart_null(struct md_s *sc, struct bio *bp)
> +{
> +
> +	switch (bp->bio_cmd) {
> +	case BIO_READ:
> +		bzero(bp->bio_data, bp->bio_length);
> +		cpu_flush_dcache(bp->bio_data, bp->bio_length);
> +		break;
> +	case BIO_WRITE:
> +		break;
> +	}
> +	bp->bio_resid = 0;
> +	return (0);
> +}
> +
>  static void
>  md_kthread(void *arg)
>  {
> @@ -1030,6 +1046,7 @@ mdinit(struct md_s *sc)
>  		pp->flags |= G_PF_ACCEPT_UNMAPPED;
>  		break;
>  	case MD_PRELOAD:
> +	case MD_NULL:
>  		break;
>  	}
>  	sc->gp = gp;
> @@ -1248,6 +1265,7 @@ mdresize(struct md_s *sc, struct md_ioct
>  
>  	switch (sc->type) {
>  	case MD_VNODE:
> +	case MD_NULL:
>  		break;
>  	case MD_SWAP:
>  		if (mdio->md_mediasize <= 0 ||
> @@ -1342,6 +1360,19 @@ mdcreate_swap(struct md_s *sc, struct md
>  	return (error);
>  }
>  
> +static int
> +mdcreate_null(struct md_s *sc, struct md_ioctl *mdio, struct thread *td)
> +{
> +
> +	/*
> +	 * Range check.  Disallow negative sizes or any size less then the
> +	 * size of a page.  Then round to a page.
> +	 */
> +	if (sc->mediasize <= 0 || (sc->mediasize % PAGE_SIZE) != 0)
> +		return (EDOM);
> +
> +	return (0);
> +}
>  
>  static int
>  xmdctlioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td)
> @@ -1374,6 +1405,7 @@ xmdctlioctl(struct cdev *dev, u_long cmd
>  		case MD_PRELOAD:
>  		case MD_VNODE:
>  		case MD_SWAP:
> +		case MD_NULL:
>  			break;
>  		default:
>  			return (EINVAL);
> @@ -1419,6 +1451,10 @@ xmdctlioctl(struct cdev *dev, u_long cmd
>  			sc->start = mdstart_swap;
>  			error = mdcreate_swap(sc, mdio, td);
>  			break;
> +		case MD_NULL:
> +			sc->start = mdstart_null;
> +			error = mdcreate_null(sc, mdio, td);
> +			break;
>  		}
>  		if (error != 0) {
>  			mddestroy(sc, td);
> @@ -1589,6 +1625,9 @@ g_md_dumpconf(struct sbuf *sb, const cha
>  	case MD_SWAP:
>  		type = "swap";
>  		break;
> +	case MD_NULL:
> +		type = "null";
> +		break;
>  	default:
>  		type = "unknown";
>  		break;
> 
> Modified: stable/10/sys/sys/mdioctl.h
> ==============================================================================
> --- stable/10/sys/sys/mdioctl.h	Sun Oct 18 14:47:19 2015	(r289515)
> +++ stable/10/sys/sys/mdioctl.h	Sun Oct 18 14:52:31 2015	(r289516)
> @@ -43,7 +43,7 @@
>  #ifndef _SYS_MDIOCTL_H_
>  #define _SYS_MDIOCTL_H_
>  
> -enum md_types {MD_MALLOC, MD_PRELOAD, MD_VNODE, MD_SWAP};
> +enum md_types {MD_MALLOC, MD_PRELOAD, MD_VNODE, MD_SWAP, MD_NULL};
>  
>  /*
>   * Ioctl definitions for memory disk pseudo-device.

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."

From owner-svn-src-stable@freebsd.org  Sun Oct 18 20:48:20 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABF84A18EC9;
 Sun, 18 Oct 2015 20:48:20 +0000 (UTC)
 (envelope-from etnapierala@gmail.com)
Received: from mail-wi0-x22a.google.com (mail-wi0-x22a.google.com
 [IPv6:2a00:1450:400c:c05::22a])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client CN "smtp.gmail.com",
 Issuer "Google Internet Authority G2" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 3E34B6D;
 Sun, 18 Oct 2015 20:48:20 +0000 (UTC)
 (envelope-from etnapierala@gmail.com)
Received: by wicll6 with SMTP id ll6so70753462wic.0;
 Sun, 18 Oct 2015 13:48:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=sender:date:from:to:cc:subject:message-id:mail-followup-to
 :references:mime-version:content-type:content-disposition
 :in-reply-to:user-agent;
 bh=chGGhF7C4NgLdbMyeTsEba/fnkfJooeVyy5X+AhEqOo=;
 b=GD05DJ67gvvOVOSwOhf/MBZLeXnN6rnazMpIcNBgWSf1SHUGzJOyhoFGCVVYfJsgY/
 J5XmemhFrlnNEZ16DjnpiuKoCNTYny2PdYAhRxqsKkjd+pJwx0fuZIjPJVCMrRYwkdYn
 9MMIW82DLWVIswC0MtaKYGI708l6wANvTh34awRjhnU/OXxn1mTOS8g0VNgKncw4tCno
 ohda+W7wnXg+DMlkqYF9CTwwhAZjmEPO47BCBrUn/450ZSR+FvvIXUaqNg9zNyHMaj3M
 fY3pSVZnVMO/YixhfKWrh1dhYr+TzZeNy1cYtUGK2A8FQ9H8HY1ZcJla46PM8GA/0DJ1
 GYsA==
X-Received: by 10.194.235.39 with SMTP id uj7mr32500115wjc.115.1445201298247; 
 Sun, 18 Oct 2015 13:48:18 -0700 (PDT)
Received: from brick.home (adjc3.neoplus.adsl.tpnet.pl. [79.184.210.3])
 by smtp.gmail.com with ESMTPSA id r9sm35943718wjz.35.2015.10.18.13.48.16
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Sun, 18 Oct 2015 13:48:17 -0700 (PDT)
Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= <etnapierala@gmail.com>
Date: Sun, 18 Oct 2015 22:48:14 +0200
From: Edward Tomasz Napierala <trasz@freebsd.org>
To: John-Mark Gurney <jmg@funkthat.com>
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: Re: svn commit: r289516 - in stable/10: sbin/mdconfig sys/dev/md
 sys/sys
Message-ID: <20151018204814.GA7903@brick.home>
Mail-Followup-To: John-Mark Gurney <jmg@funkthat.com>,
 src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
References: <201510181452.t9IEqVh9099329@repo.freebsd.org>
 <20151018183751.GB65715@funkthat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20151018183751.GB65715@funkthat.com>
User-Agent: Mutt/1.5.24 (2015-08-30)
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 18 Oct 2015 20:48:20 -0000

On 1018T1137, John-Mark Gurney wrote:
> Edward Tomasz Napierala wrote this message on Sun, Oct 18, 2015 at 14:52 +0000:
> > Author: trasz
> > Date: Sun Oct 18 14:52:31 2015
> > New Revision: 289516
> > URL: https://svnweb.freebsd.org/changeset/base/289516
> > 
> > Log:
> >   MFC r258909:
> 
> The following description doesn't match what r258909 says:
> https://svnweb.freebsd.org/base?view=revision&revision=r258909
> 
> wrong commit or wrong message?

Sorry for that, it's a copy/paste error.  The right one should read:

Add "null" backend to mdconfig(8).  This does exactly what the name
suggests, and is somewhat useful for benchmarking.


From owner-svn-src-stable@freebsd.org  Mon Oct 19 00:36:56 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0AD36A18839;
 Mon, 19 Oct 2015 00:36:56 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id D8AB0E56;
 Mon, 19 Oct 2015 00:36:55 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9J0asnq068997;
 Mon, 19 Oct 2015 00:36:54 GMT (envelope-from gjb@FreeBSD.org)
Received: (from gjb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9J0asVV068993;
 Mon, 19 Oct 2015 00:36:54 GMT (envelope-from gjb@FreeBSD.org)
Message-Id: <201510190036.t9J0asVV068993@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org
 using -f
From: Glen Barber <gjb@FreeBSD.org>
Date: Mon, 19 Oct 2015 00:36:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289555 - stable/10/release
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 19 Oct 2015 00:36:56 -0000

Author: gjb
Date: Mon Oct 19 00:36:54 2015
New Revision: 289555
URL: https://svnweb.freebsd.org/changeset/base/289555

Log:
  MFC r289337:
    Deprecate MD5 checksum generation in favor of SHA512.
  
    This was discussed during the 10.2-RELEASE cycle, however
    since we were nearing the end of the cycle, we decided to
    defer this change until after 10.2-RELEASE.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/release/Makefile
  stable/10/release/Makefile.mirrors
  stable/10/release/Makefile.vm
  stable/10/release/release.sh
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/release/Makefile
==============================================================================
--- stable/10/release/Makefile	Sun Oct 18 23:58:05 2015	(r289554)
+++ stable/10/release/Makefile	Mon Oct 19 00:36:54 2015	(r289555)
@@ -335,7 +335,7 @@ release-install:
 	${XZCMD} -k ${DESTDIR}/${OSRELEASE}-${I}
 . endif
 .endfor
+	cd ${DESTDIR} && sha512 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA512
 	cd ${DESTDIR} && sha256 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA256
-	cd ${DESTDIR} && md5 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.MD5
 
 .include "${.CURDIR}/Makefile.vm"

Modified: stable/10/release/Makefile.mirrors
==============================================================================
--- stable/10/release/Makefile.mirrors	Sun Oct 18 23:58:05 2015	(r289554)
+++ stable/10/release/Makefile.mirrors	Mon Oct 19 00:36:54 2015	(r289555)
@@ -76,7 +76,7 @@ VM_DIR=			${TLD}/VM-IMAGES/${REVISION}-$
 .endif
 
 CLEANFILES+=		${STAGE_TARGETS}
-CHECKSUM_FILES?=	SHA256 MD5
+CHECKSUM_FILES?=	SHA512 SHA256
 SNAP_SUFFIX!=		echo ${_SNAP_SUFFIX:S,^-,,1} | tr -d ' '
 ISO_DIR=		${TLD}/${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}
 FTP_DIR=		${TLD}/${TARGET}/${TARGET_ARCH}/${REVISION}-${BRANCH}

Modified: stable/10/release/Makefile.vm
==============================================================================
--- stable/10/release/Makefile.vm	Sun Oct 18 23:58:05 2015	(r289554)
+++ stable/10/release/Makefile.vm	Mon Oct 19 00:36:54 2015	(r289555)
@@ -68,10 +68,10 @@ cw${_CW:tl}-install:
 	mkdir -p ${DESTDIR}/${_CW:tl}
 	cp -p ${${_CW}IMAGE} \
 		${DESTDIR}/${_CW:tl}/${${_CW}_DISK}
+	cd ${DESTDIR}/${_CW:tl} && sha512 ${${_CW}_DISK}* > \
+		${DESTDIR}/${_CW:tl}/CHECKSUM.SHA512
 	cd ${DESTDIR}/${_CW:tl} && sha256 ${${_CW}_DISK}* > \
 		${DESTDIR}/${_CW:tl}/CHECKSUM.SHA256
-	cd ${DESTDIR}/${_CW:tl} && md5 ${${_CW}_DISK}* > \
-		${DESTDIR}/${_CW:tl}/CHECKSUM.MD5
 
 cw${_CW:tl}-package:
 	@# Special target to handle packaging cloud images in the formats
@@ -140,10 +140,10 @@ vm-install:
 	${XZCMD} ${DESTDIR}/vmimages/${OSRELEASE}.${FORMAT}
 .  endfor
 . endif
+	cd ${DESTDIR}/vmimages && sha512 ${OSRELEASE}* > \
+		${DESTDIR}/vmimages/CHECKSUM.SHA512
 	cd ${DESTDIR}/vmimages && sha256 ${OSRELEASE}* > \
 		${DESTDIR}/vmimages/CHECKSUM.SHA256
-	cd ${DESTDIR}/vmimages && md5 ${OSRELEASE}* > \
-		${DESTDIR}/vmimages/CHECKSUM.MD5
 .endif
 
 vm-release:

Modified: stable/10/release/release.sh
==============================================================================
--- stable/10/release/release.sh	Sun Oct 18 23:58:05 2015	(r289554)
+++ stable/10/release/release.sh	Mon Oct 19 00:36:54 2015	(r289555)
@@ -362,10 +362,10 @@ chroot_arm_armv6_build_release() {
 	chroot ${CHROOTDIR} cp -p ${OBJDIR}/${OSRELEASE}-${KERNEL}.img \
 		/R/${OSRELEASE}-${KERNEL}.img
 	chroot ${CHROOTDIR} xz -T ${XZ_THREADS} /R/${OSRELEASE}-${KERNEL}.img
+	cd ${CHROOTDIR}/R && sha512 ${OSRELEASE}* \
+		> CHECKSUM.SHA512
 	cd ${CHROOTDIR}/R && sha256 ${OSRELEASE}* \
 		> CHECKSUM.SHA256
-	cd ${CHROOTDIR}/R && md5 ${OSRELEASE}* \
-		> CHECKSUM.MD5
 
 	return 0
 } # chroot_arm_armv6_build_release()

From owner-svn-src-stable@freebsd.org  Tue Oct 20 13:20:31 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41543A193CA;
 Tue, 20 Oct 2015 13:20:31 +0000 (UTC) (envelope-from cy@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 0EB196CE;
 Tue, 20 Oct 2015 13:20:30 +0000 (UTC) (envelope-from cy@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9KDKUou028466;
 Tue, 20 Oct 2015 13:20:30 GMT (envelope-from cy@FreeBSD.org)
Received: (from cy@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KDKU5o028465;
 Tue, 20 Oct 2015 13:20:30 GMT (envelope-from cy@FreeBSD.org)
Message-Id: <201510201320.t9KDKU5o028465@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org
 using -f
From: Cy Schubert <cy@FreeBSD.org>
Date: Tue, 20 Oct 2015 13:20:30 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289628 - stable/10/sys/contrib/ipfilter/netinet
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 20 Oct 2015 13:20:31 -0000

Author: cy
Date: Tue Oct 20 13:20:29 2015
New Revision: 289628
URL: https://svnweb.freebsd.org/changeset/base/289628

Log:
  MFC r289480. Really fix ipfilter bug 3600459.
  
  Obtained from:	ipfilter cvs repo r1.48.2.25, r1.72 and NetBSD repo r1.4

Modified:
  stable/10/sys/contrib/ipfilter/netinet/ip_state.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/contrib/ipfilter/netinet/ip_state.c
==============================================================================
--- stable/10/sys/contrib/ipfilter/netinet/ip_state.c	Tue Oct 20 12:49:38 2015	(r289627)
+++ stable/10/sys/contrib/ipfilter/netinet/ip_state.c	Tue Oct 20 13:20:29 2015	(r289628)
@@ -3650,7 +3650,6 @@ ipf_state_del(softc, is, why)
 	if (is->is_ref > 0) {
 		int refs;
 
-		is->is_ref--;
 		refs = is->is_ref;
 		MUTEX_EXIT(&is->is_lock);
 		if (!orphan)
@@ -3667,7 +3666,7 @@ ipf_state_del(softc, is, why)
 		}
 	}
 
-	is->is_ref = 0;
+	ASSERT(is->is_ref == 0);
 	MUTEX_EXIT(&is->is_lock);
 
 	if (is->is_tqehead[0] != NULL) {

From owner-svn-src-stable@freebsd.org  Tue Oct 20 18:20:39 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF80FA1ADE9;
 Tue, 20 Oct 2015 18:20:39 +0000 (UTC)
 (envelope-from bdrewery@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id B5AB9EE2;
 Tue, 20 Oct 2015 18:20:39 +0000 (UTC)
 (envelope-from bdrewery@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9KIKcp2020161;
 Tue, 20 Oct 2015 18:20:38 GMT (envelope-from bdrewery@FreeBSD.org)
Received: (from bdrewery@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KIKc4b020157;
 Tue, 20 Oct 2015 18:20:38 GMT (envelope-from bdrewery@FreeBSD.org)
Message-Id: <201510201820.t9KIKc4b020157@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to
 bdrewery@FreeBSD.org using -f
From: Bryan Drewery <bdrewery@FreeBSD.org>
Date: Tue, 20 Oct 2015 18:20:38 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289638 - stable/10/gnu/usr.bin/groff/tmac
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 20 Oct 2015 18:20:40 -0000

Author: bdrewery
Date: Tue Oct 20 18:20:38 2015
New Revision: 289638
URL: https://svnweb.freebsd.org/changeset/base/289638

Log:
  MFC r288429:
  
    Replace most of the beforeinstall: hack with FILES mechanism.

Added:
  stable/10/gnu/usr.bin/groff/tmac/fr.ISO8859-1.in
     - copied unchanged from r289637, stable/10/gnu/usr.bin/groff/tmac/fr.ISO8859-1
  stable/10/gnu/usr.bin/groff/tmac/mdoc.local.in
     - copied unchanged from r289637, stable/10/gnu/usr.bin/groff/tmac/mdoc.local
  stable/10/gnu/usr.bin/groff/tmac/ru.KOI8-R.in
     - copied unchanged from r289637, stable/10/gnu/usr.bin/groff/tmac/ru.KOI8-R
Deleted:
  stable/10/gnu/usr.bin/groff/tmac/fr.ISO8859-1
  stable/10/gnu/usr.bin/groff/tmac/mdoc.local
  stable/10/gnu/usr.bin/groff/tmac/ru.KOI8-R
Modified:
  stable/10/gnu/usr.bin/groff/tmac/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/gnu/usr.bin/groff/tmac/Makefile
==============================================================================
--- stable/10/gnu/usr.bin/groff/tmac/Makefile	Tue Oct 20 18:01:08 2015	(r289637)
+++ stable/10/gnu/usr.bin/groff/tmac/Makefile	Tue Oct 20 18:20:38 2015	(r289638)
@@ -15,7 +15,7 @@ MLINKS+=	groff_man.7 man.7
 MLINKS+=	groff_me.7 me.7
 MLINKS+=	groff_mdoc.7 mdoc.7 groff_mdoc.7 mdoc.samples.7
 
-CLEANFILES=	${MAN} ${MDOCFILES:S/$/-s/} ${STRIPFILES:S/$/-s/} ${SPECIALFILES:S/$/-s/}
+CLEANFILES=	${MAN}
 
 NORMALFILES=	mandoc.tmac andoc.tmac an-old.tmac \
 		me.tmac \
@@ -40,45 +40,59 @@ NORMALFILES=	mandoc.tmac andoc.tmac an-o
 		composite.tmac \
 		eqnrc \
 		troffrc troffrc-end \
+		koi8-r.tmac hyphen.ru \
 		hyphen.us hyphenex.us
+# These are all generated into the OBJDIR.
 SPECIALFILES=	an.tmac man.tmac s.tmac ms.tmac www.tmac
 STRIPFILES=	e.tmac doc.tmac mdoc.local
 MDOCFILES=	doc-common doc-ditroff doc-nroff doc-syms \
 		fr.ISO8859-1 ru.KOI8-R
+# These are in srcdir and must be built special to avoid colliding with
+# CURDIR=OBJDIR.
+SRCFILES=	fr.ISO8859-1 mdoc.local ru.KOI8-R
+CLEANFILES+=	${SRCFILES}
+
+FILESGROUPS=	FILES
+FILES=		${NORMALFILES}
+FILESOWN=	${TMACOWN}
+FILESGRP=	${TMACGRP}
+FILESMODE=	${TMACMODE}
+FILESDIR=	${TMACDIR}
+MDOCFILESDIR=	${MDOCDIR}
+
+# Setup handling for the generated and special file groups
+.for var in SPECIAL STRIP MDOC
+FILESGROUPS+=	${var}FILES
+CLEANFILES+=	${${var}FILES}
+${var}FILESOWN?=${TMACOWN}
+${var}FILESGRP?=${TMACGRP}
+${var}FILESMODE?=${TMACMODE}
+${var}FILESDIR?=${TMACDIR}
+.endfor
 
-all: ${MDOCFILES:S/$/-s/} ${STRIPFILES:S/$/-s/} ${SPECIALFILES:S/$/-s/}
+beforeinstall:
+.if !exists(${DESTDIR}${TMACDIR}/man.local)
+	${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
+	    ${DIST_DIR}/man.local ${DESTDIR}${TMACDIR}
+.endif
 
+.include <bsd.prog.mk>
+
+# Do this after ../Makefile.inc gets included so DIST_DIR is defined.
 .for f in ${MDOCFILES} ${STRIPFILES}
-$f-s: $f
+# Generate the file from the contrib dir or src dir as needed.
+.if ${SRCFILES:M${f}} != ""
+${f}: ${.CURDIR}/${f}.in
+.else
+${f}: ${DIST_DIR}/${f}
+.endif
 	sed -f ${DIST_DIR}/strip.sed ${.ALLSRC} > ${.TARGET}
 .endfor
 
 .for f in ${SPECIALFILES}
-$f-s: $f
+${f}: ${DIST_DIR}/${f}
 	sed -e "s;@TMAC_AN_PREFIX@;${tmac_an_prefix};g" \
 	    -e "s;@TMAC_S_PREFIX@;${tmac_s_prefix};g" \
 	    -e "s;@PNMTOPS_NOSETPAGE@;pnmtops;g" \
 		${.ALLSRC} > ${.TARGET}
 .endfor
-
-beforeinstall:
-	(cd ${DIST_DIR} && \
-	    ${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
-	    ${NORMALFILES} ${DESTDIR}${TMACDIR})
-	(cd ${.CURDIR} && \
-	    ${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
-	    koi8-r.tmac hyphen.ru ${DESTDIR}${TMACDIR})
-.for f in ${STRIPFILES} ${SPECIALFILES}
-	${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
-	    $f-s ${DESTDIR}${TMACDIR}/$f
-.endfor
-.for f in ${MDOCFILES}
-	${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
-	    $f-s ${DESTDIR}${MDOCDIR}/$f
-.endfor
-.if !exists(${DESTDIR}${TMACDIR}/man.local)
-	${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
-	    ${DIST_DIR}/man.local ${DESTDIR}${TMACDIR}
-.endif
-
-.include <bsd.prog.mk>

Copied: stable/10/gnu/usr.bin/groff/tmac/fr.ISO8859-1.in (from r289637, stable/10/gnu/usr.bin/groff/tmac/fr.ISO8859-1)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/10/gnu/usr.bin/groff/tmac/fr.ISO8859-1.in	Tue Oct 20 18:20:38 2015	(r289638, copy of r289637, stable/10/gnu/usr.bin/groff/tmac/fr.ISO8859-1)
@@ -0,0 +1,140 @@
+.\" Copyright (c) 2002 Sebastien Gioria <gioria@FreeBSD.org>.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.\"     %beginstrip%
+.
+.\" .Dt localization
+.nr doc-volume-operating-system-ateol 1
+.ds doc-volume-ds-1 Manuel des commandes utilisateur
+.ds doc-volume-ds-2 Manuel des appels systèmes
+.ds doc-volume-ds-3 Manuel des fonctions de la librairie
+.ds doc-volume-ds-4 Manuel des interfaces du noyau
+.ds doc-volume-ds-5 Manuel des formats de fichier
+.ds doc-volume-ds-6 Manuel des jeux
+.ds doc-volume-ds-7 Manuel d'informations diverses
+.ds doc-volume-ds-8 Manuel de l'administrateur
+.ds doc-volume-ds-9 Manuel du développeur du noyau
+.
+.ds doc-volume-ds-USD   Documentation supplémentaire utilisateur
+.ds doc-volume-ds-PS1   Documentation supplémentaire du programmeur
+.ds doc-volume-ds-AMD   Documentation ancestrale
+.ds doc-volume-ds-SMM   Manuel de l'administrateur
+.ds doc-volume-ds-URM   Manuel de référence utilisateur
+.ds doc-volume-ds-PRM   Manuel du programmeur
+.ds doc-volume-ds-KM    Manuel du noyau
+.ds doc-volume-ds-IND   Index principal des manuels
+.ds doc-volume-ds-LOCAL Manuel local
+.ds doc-volume-ds-CON   Manuel des logiciels contribués
+.
+.\" .Os localization
+.ds doc-operating-system-ATT-7    7th\~Edition
+.ds doc-operating-system-BSD-3    3rd\~Distribution de Berkeley
+.ds doc-operating-system-BSD-4    4th\~Distribution de Berkeley
+.ds doc-operating-system-BSD-4.1  Distribution\~4.1 de Berkeley
+.ds doc-operating-system-BSD-4.2  Distribution\~4.2 de Berkeley
+.ds doc-operating-system-BSD-4.3  Distribution\~4.3 de Berkeley
+.ds doc-operating-system-BSD-4.3T Distribution 4.3-Tahoe de Berkeley
+.ds doc-operating-system-BSD-4.3R Distribution 4.3-Reno de Berkeley
+.
+.\" .Sh localization
+.ds doc-section-name        NOM
+.ds doc-section-synopsis    SYNOPSIS
+.ds doc-section-library     BIBLIOTHÈQUE
+.ds doc-section-description DESCRIPTION
+.ds doc-section-see-also    VOIR
+.ds doc-section-files       FICHIERS
+.ds doc-section-authors     AUTEURS
+.
+.\" .Lb localization
+.ds doc-str-Lb-libarm32    Bibliothèque de l'architecture ARM32 (libarm32, \-larm32)
+.ds doc-str-Lb-libc        Bibliothèque\~C Standard (libc, \-lc)
+.ds doc-str-Lb-libc_r      Bibliothèque\~C réentrante (libc_r, \-lc_r)
+.\" XXX ds doc-str-Lb-libcalendar Calendar Arithmetic Library (libcalendar, \-lcalendar)
+.\" XXX ds doc-str-Lb-libcam      Common Access Method User Library (libcam, \-lcam)
+.ds doc-str-Lb-libcipher   Bibliothèque de cryptage FreeSec (libcipher, \-lcipher)
+.ds doc-str-Lb-libcompat   Bibliothèque de compatibilité (libcompat, \-lcompat)
+.ds doc-str-Lb-libcrypt    Bibliothèque de cryptage (libcrypt, \-lcrypt)
+.ds doc-str-Lb-libcurses   Bibliothèque de Curses (libcurses, \-lcurses)
+.\" XXX ds doc-str-Lb-libdevinfo  Device and Resource Information Utility Library (libdevinfo, \-devinfo)
+.ds doc-str-Lb-libdevstat  Bibliothèque de statistiques des périphériques (libdevstat, \-ldevstat)
+.ds doc-str-Lb-libdisk     Bibliothèque d'accès à l'interface des labels de partitions (libdisk, \-ldisk)
+.ds doc-str-Lb-libedit     Bibliothèque de l'éditeur de ligne de commande (libedit, \-ledit)
+.ds doc-str-Lb-libfetch    Bibliothèque de transfert de fichier (libfetch, \-lfetch)
+.\" XXX ds doc-str-Lb-libgeom     Userland API Library for kernel GEOM subsystem (libgeom, \-lgeom)
+.ds doc-str-Lb-libi386     Bibliothèque de l'architecture i386 (libi386, \-li386)
+.ds doc-str-Lb-libipsec    Bibliothèque de contrôle de politique IPsec (libipsec, \-lipsec)
+.ds doc-str-Lb-libipx      Bibliothèque de support des conversions des adresses IPX (libipx, \-lipx)
+.ds doc-str-Lb-libkvm      Bibliothèque d'accès aux données du noyau (libkvm, \-lkvm)
+.ds doc-str-Lb-libm        Bibliothèque mathématique (libm, \-lm)
+.ds doc-str-Lb-libmd       Bibliothèque de support des signatures (MD4, MD5, etc.) (libmd, \-lmd)
+.ds doc-str-Lb-libmenu     Bibliothèque Curses des Menus (libmenu, \-lmenu)
+.ds doc-str-Lb-libnetgraph Bibliothèque utilisateur Netgraph (libnetgraph, \-lnetgraph)
+.ds doc-str-Lb-libossaudio Bibliothèque d'émulation audio OSS (libossaudio, \-lossaudio)
+.ds doc-str-Lb-libpam      Bibliothèque PAM (libpam, \-lpam)
+.ds doc-str-Lb-libposix    Bibliothèque de compatibilité \*[Px] (libposix, \-lposix)
+.ds doc-str-Lb-libresolv   Bibliothèque du résolveur DNS (libresolv, \-lresolv)
+.ds doc-str-Lb-librpcsvc   Bibliothèque des services RPC (librpcsvc, \-lrpcsvc)
+.ds doc-str-Lb-libtermcap  Bibliothèque d'accès aux terminaux (libtermcap, \-ltermcap)
+.\" XXX ds doc-str-Lb-libufs      UFS File System Access Library (libufs, \-lufs)
+.\" XXX ds doc-str-Lb-libugidfw   File System Firewall Interface Library (libugidfw, \-lugidfw)
+.ds doc-str-Lb-libusbhid   Bibliothèque d'accès aux routines USB HID (libusbhid, \-lusbhid)
+.ds doc-str-Lb-libutil     Bibliothèque des utilitaires système (libutil, \-lutil)
+.ds doc-str-Lb-libvgl      Bibliothèque graphique vidéo (libvgl, \-lvgl)
+.ds doc-str-Lb-libz        Bibliothèque de compression (libz, \-lz)
+.
+.\" .Rv localization
+.ds doc-str-Rv-std-prefix "La
+.ds doc-str-Rv-std-suffix "fonction retourne la valeur\~0 si tout c'est bien passé;
+.as doc-str-Rv-std-suffix " sinon la valeur \~-1 est retournée et
+.as doc-str-Rv-std-suffix " la variable globale \*[doc-Va-font]errno\f[P]
+.as doc-str-Rv-std-suffix " est positionnée pour indiquer l'erreur.
+.
+.ds doc-str-Rv-stds-prefix "Les
+.ds doc-str-Rv-stds-and    "et
+.ds doc-str-Rv-stds-suffix "fonctions retournent la valeur\~0 si tout c'est bien passé;
+.as doc-str-Rv-stds-suffix " sinon la valeur \~-1 est retournée et
+.as doc-str-Rv-stds-suffix " la variable globale \*[doc-Va-font]errno\f[P]
+.as doc-str-Rv-stds-suffix " est positionnée pour indiquer l'erreur.
+.
+.ds doc-str-Rv-std0 "Si tout c'est bien passé, la valeur\~0 est retournée;
+.as doc-str-Rv-std0 " sinon la valeur \~-1 est retournée et
+.as doc-str-Rv-std0 " la variable globale \*[doc-Va-font]errno\f[P]
+.as doc-str-Rv-std0 " est positionnée pour indiquer l'erreur.
+.
+.\" .Ex localization
+.ds doc-str-Ex-std-prefix "La commande
+.ds doc-str-Ex-std-suffix " retourne\~0 si tout c'est bien passé,
+.as doc-str-Ex-std-suffix " et\~>0 si une erreur survient.
+.
+.ds doc-str-Ex-stds-prefix "Les commandes
+.ds doc-str-Ex-stds-suffix "retournent\~0 si tout c'est bien passé,
+.as doc-str-Ex-stds-suffix " et\~>0 si une erreur survient.
+.
+.\" .Ar localization
+.ds doc-str-Ar-default "fichier\ .\|.\|.
+.
+.\" .%A localization
+.ds doc-str-dpra "et

Copied: stable/10/gnu/usr.bin/groff/tmac/mdoc.local.in (from r289637, stable/10/gnu/usr.bin/groff/tmac/mdoc.local)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/10/gnu/usr.bin/groff/tmac/mdoc.local.in	Tue Oct 20 18:20:38 2015	(r289638, copy of r289637, stable/10/gnu/usr.bin/groff/tmac/mdoc.local)
@@ -0,0 +1,80 @@
+.\" Copyright (c) 2001-2004 Ruslan Ermilov <ru@FreeBSD.org>.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.\"     %beginstrip%
+.
+.eo
+.
+.
+.ds doc-volume-operating-system FreeBSD
+.
+.\" FreeBSD .Lb values
+.ds doc-str-Lb-libarchive  Streaming Archive Library (libarchive, \-larchive)
+.ds doc-str-Lb-libbluetooth Bluetooth User Library (libbluetooth, \-lbluetooth)
+.ds doc-str-Lb-libcapsicum Capsicum Library (libcapsicum, \-lcapsicum)
+.ds doc-str-Lb-libcuse     Userland Character Device Library (libcuse, \-lcuse)
+.ds doc-str-Lb-libedit     Line Editor and History Library (libedit, \-ledit)
+.ds doc-str-Lb-libefi      EFI Runtime Services Library (libefi, \-lefi)
+.ds doc-str-Lb-libelf      ELF Parsing Library (libelf, \-lelf)
+.ds doc-str-Lb-libexecinfo Backtrace Access Library (libexecinfo, \-lexecinfo)
+.ds doc-str-Lb-libfetch    File Transfer Library (libfetch, \-lfetch)
+.ds doc-str-Lb-libnv       Name/value pairs library (libnv, \-lnv)
+.ds doc-str-Lb-libpmc      Performance Monitoring Counters Interface Library (libpmc, \-lpmc)
+.ds doc-str-Lb-libproc     Processor Monitoring and Analysis Library (libproc, \-lproc)
+.ds doc-str-Lb-libprocstat Process and Files Information Retrieval (libprocstat, \-lprocstat)
+.ds doc-str-Lb-librtld_db  Run-time Linker Debugging Library (librtld_db, \-lrtld_db)
+.ds doc-str-Lb-libsbuf     Safe String Composition Library (libsbuf, \-lsbuf)
+.ds doc-str-Lb-libstdthreads C11 Threads Library (libstdthreads, \-lstdthreads)
+.
+.\" Default .Os value
+.ds doc-default-operating-system FreeBSD\~10.2
+.
+.\" FreeBSD releases not found in doc-common
+.ds doc-operating-system-FreeBSD-7.4    7.4
+.ds doc-operating-system-FreeBSD-8.3    8.3
+.ds doc-operating-system-FreeBSD-8.4    8.4
+.ds doc-operating-system-FreeBSD-9.1    9.1
+.ds doc-operating-system-FreeBSD-9.2    9.2
+.ds doc-operating-system-FreeBSD-9.3    9.3
+.ds doc-operating-system-FreeBSD-10.0   10.0
+.ds doc-operating-system-FreeBSD-10.1   10.1
+.ds doc-operating-system-FreeBSD-10.2   10.2
+.ds doc-operating-system-FreeBSD-11.0   11.0
+.
+.\" Definitions for other *BSDs not (yet) in doc-common
+.ds doc-operating-system-NetBSD-7.0     7.0
+.
+.\" Definitions not (yet) in doc-syms
+.
+.ec
+.
+.\" Locale support
+.if d doc-locale \{\
+.  ie "\*[doc-locale]"ru.KOI8-R" \
+.    mso mdoc/ru.KOI8-R
+.  el \{ .if "\*[doc-locale]"fr.ISO8859-1" \
+.    mso mdoc/fr.ISO8859-1
+.\}\}

Copied: stable/10/gnu/usr.bin/groff/tmac/ru.KOI8-R.in (from r289637, stable/10/gnu/usr.bin/groff/tmac/ru.KOI8-R)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/10/gnu/usr.bin/groff/tmac/ru.KOI8-R.in	Tue Oct 20 18:20:38 2015	(r289638, copy of r289637, stable/10/gnu/usr.bin/groff/tmac/ru.KOI8-R)
@@ -0,0 +1,140 @@
+.\" Copyright (c) 2001-2003 Ruslan Ermilov <ru@FreeBSD.org>.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.\"     %beginstrip%
+.
+.\" ÌÏËÁÌÉÚÁÃÉÑ .Dt
+.nr doc-volume-operating-system-ateol 1
+.ds doc-volume-ds-1 óÐÒÁ×ÏÞÎÉË ÏÓÎÏ×ÎÙÈ ËÏÍÁÎÄ
+.ds doc-volume-ds-2 óÐÒÁ×ÏÞÎÉË ÓÉÓÔÅÍÎÙÈ ×ÙÚÏ×Ï×
+.ds doc-volume-ds-3 óÐÒÁ×ÏÞÎÉË ÂÉÂÌÉÏÔÅÞÎÙÈ ÆÕÎËÃÉÊ
+.ds doc-volume-ds-4 óÐÒÁ×ÏÞÎÉË ÉÎÔÅÒÆÅÊÓÏ× ÑÄÒÁ
+.ds doc-volume-ds-5 óÐÒÁ×ÏÞÎÉË ÆÏÒÍÁÔÏ× ÆÁÊÌÏ×
+.ds doc-volume-ds-6 óÐÒÁ×ÏÞÎÉË ÉÇÒ
+.ds doc-volume-ds-7 óÐÒÁ×ÏÞÎÉË ÒÁÚÎÏÊ ÉÎÆÏÒÍÁÃÉÉ
+.ds doc-volume-ds-8 óÐÒÁ×ÏÞÎÉË ÓÉÓÔÅÍÎÏÇÏ ÁÄÍÉÎÉÓÔÒÁÔÏÒÁ
+.ds doc-volume-ds-9 óÐÒÁ×ÏÞÎÉË ÒÁÚÒÁÂÏÔÞÉËÁ ÑÄÒÁ
+.
+.ds doc-volume-ds-USD   äÏÐÏÌÎÉÔÅÌØÎÙÅ ÄÏËÕÍÅÎÔÙ ÄÌÑ ÐÏÌØÚÏ×ÁÔÅÌÑ
+.ds doc-volume-ds-PS1   äÏÐÏÌÎÉÔÅÌØÎÙÅ ÄÏËÕÍÅÎÔÙ ÄÌÑ ÐÒÏÇÒÁÍÍÉÓÔÁ
+.ds doc-volume-ds-AMD   äÏËÕÍÅÎÔÙ ÕÎÁÓÌÅÄÏ×ÁÎÎÏÇÏ ÓÐÒÁ×ÏÞÎÉËÁ
+.ds doc-volume-ds-SMM   òÕËÏ×ÏÄÓÔ×Ï ÓÉÓÔÅÍÎÏÇÏ ÁÄÍÉÎÉÓÔÒÁÔÏÒÁ
+.ds doc-volume-ds-URM   óÐÒÁ×ÏÞÎÏÅ ÒÕËÏ×ÏÄÓÔ×Ï
+.ds doc-volume-ds-PRM   òÕËÏ×ÏÄÓÔ×Ï ÐÒÏÇÒÁÍÍÉÓÔÁ
+.ds doc-volume-ds-KM    òÕËÏ×ÏÄÓÔ×Ï ÐÏ ÑÄÒÕ
+.ds doc-volume-ds-IND   ïÓÎÏ×ÎÏÊ ÐÒÅÄÍÅÔÎÙÊ ÕËÁÚÁÔÅÌØ ÓÐÒÁ×ÏÞÎÉËÁ
+.ds doc-volume-ds-LOCAL ìÏËÁÌØÎÙÊ ÓÐÒÁ×ÏÞÎÉË
+.ds doc-volume-ds-CON   óÐÒÁ×ÏÞÎÉË ÐÏ ÄÏÐÏÌÎÉÔÅÌØÎÏÍÕ ðï
+.
+.\" ÌÏËÁÌÉÚÁÃÉÑ .Os
+.ds doc-operating-system-ATT-7    7Ñ\~ÒÅÄÁËÃÉÑ
+.ds doc-operating-system-BSD-3    3Ê\~ÄÉÓÔÒÉÂÕÔÉ× âÅÒËÌÉ
+.ds doc-operating-system-BSD-4    4Ê\~ÄÉÓÔÒÉÂÕÔÉ× âÅÒËÌÉ
+.ds doc-operating-system-BSD-4.1  4.1\~ÄÉÓÔÒÉÂÕÔÉ× âÅÒËÌÉ
+.ds doc-operating-system-BSD-4.2  4.2\~ÄÉÓÔÒÉÂÕÔÉ× âÅÒËÌÉ
+.ds doc-operating-system-BSD-4.3  4.3\~ÄÉÓÔÒÉÂÕÔÉ× âÅÒËÌÉ
+.ds doc-operating-system-BSD-4.3T 4.3-Tahoe ÄÉÓÔÒÉÂÕÔÉ× âÅÒËÌÉ
+.ds doc-operating-system-BSD-4.3R 4.3-Reno ÄÉÓÔÒÉÂÕÔÉ× âÅÒËÌÉ
+.
+.\" ÌÏËÁÌÉÚÁÃÉÑ .Sh
+.ds doc-section-name        îáú÷áîéå
+.ds doc-section-synopsis    óéîôáëóéó
+.ds doc-section-library     âéâìéïôåëá
+.ds doc-section-description ïðéóáîéå
+.ds doc-section-see-also    óíïôòé
+.ds doc-section-files       æáêìù
+.ds doc-section-authors     á÷ôïòù
+.
+.\" ÌÏËÁÌÉÚÁÃÉÑ .Lb (XXX)
+.ds doc-str-Lb-libarm32    âÉÂÌÉÏÔÅËÁ ÁÒÈÉÔÅËÔÕÒÙ ARM32 (libarm32, \-larm32)
+.ds doc-str-Lb-libc        óÔÁÎÄÁÒÔÎÁÑ ÂÉÂÌÉÏÔÅËÁ\~C (libc, \-lc)
+.ds doc-str-Lb-libc_r      òÅÅÎÔÅÒÁÂÅÌØÎÁÑ ÂÉÂÌÉÏÔÅËÁ\~C (libc_r, \-lc_r)
+.ds doc-str-Lb-libcalendar âÉÂÌÉÏÔÅËÁ ËÁÌÅÎÄÁÒÎÏÊ ÁÒÉÆÍÅÔÉËÉ (libcalendar, \-lcalendar)
+.ds doc-str-Lb-libcam      ðÏÌØÚÏ×ÁÔÅÌØÓËÁÑ ÂÉÂÌÉÏÔÅËÁ CAM (libcam, \-lcam)
+.ds doc-str-Lb-libcipher   âÉÂÌÉÏÔÅËÁ ËÒÉÐÔÏÇÒÁÆÉÉ FreeSec (libcipher, \-lcipher)
+.ds doc-str-Lb-libcompat   âÉÂÌÉÏÔÅËÁ ÓÏ×ÍÅÓÔÉÍÏÓÔÉ (libcompat, \-lcompat)
+.ds doc-str-Lb-libcrypt    âÉÂÌÉÏÔÅËÁ ËÒÉÐÔÏÇÒÁÆÉÉ (libcrypt, \-lcrypt)
+.\" XXX ds doc-str-Lb-libcurses   Curses Library (libcurses, \-lcurses)
+.\" XXX ds doc-str-Lb-libdevinfo  Device and Resource Information Utility Library (libdevinfo, \-ldevinfo)
+.ds doc-str-Lb-libdevstat  âÉÂÌÉÏÔÅËÁ ÓÔÁÔÉÓÔÉËÉ ÕÓÔÒÏÊÓÔ× (libdevstat, \-ldevstat)
+.\" XXX ds doc-str-Lb-libdisk     Interface to Slice and Partition Labels Library (libdisk, \-ldisk)
+.ds doc-str-Lb-libedit     âÉÂÌÉÏÔÅËÁ ÒÅÄÁËÔÏÒÁ ËÏÍÁÎÄÎÏÊ ÓÔÒÏËÉ (libedit, \-ledit)
+.ds doc-str-Lb-libfetch    âÉÂÌÉÏÔÅËÁ ÆÁÊÌÏ×ÏÊ ÐÅÒÅÄÁÞÉ (libfetch, \-lfetch)
+.ds doc-str-Lb-libgeom     ðÏÌØÚÏ×ÁÔÅÌØÓËÁÑ API ÂÉÂÌÉÏÔÅËÁ ÐÏÄÓÉÓÔÅÍÙ ÑÄÒÁ GEOM (libgeom, \-lgeom)
+.ds doc-str-Lb-libi386     âÉÂÌÉÏÔÅËÁ ÁÒÈÉÔÅËÔÕÒÙ i386 (libi386, \-li386)
+.ds doc-str-Lb-libipsec    âÉÂÌÉÏÔÅËÁ ÕÐÒÁ×ÌÅÎÉÑ IPsec Policy (libipsec, \-lipsec)
+.ds doc-str-Lb-libipx      âÉÂÌÉÏÔÅËÁ ÐÏÄÄÅÒÖËÉ ËÏÎ×ÅÒÓÉÉ ÁÄÒÅÓÏ× IPX (libipx, \-lipx)
+.ds doc-str-Lb-libkvm      âÉÂÌÉÏÔÅËÁ ÄÏÓÔÕÐÁ Ë ÄÁÎÎÙÍ ÑÄÒÁ (libkvm, \-lkvm)
+.ds doc-str-Lb-libm        âÉÂÌÉÏÔÅËÁ ÍÁÔÅÍÁÔÉÞÅÓËÉÈ ÆÕÎËÃÉÊ (libm, \-lm)
+.\" XXX ds doc-str-Lb-libmd       Message Digest (MD4, MD5, É Ô.Ä.) Support Library (libmd, \-lmd)
+.\" XXX ds doc-str-Lb-libmenu     Curses Menu Library (libmenu, \-lmenu)
+.ds doc-str-Lb-libnetgraph ðÏÌØÚÏ×ÁÔÅÌØÓËÁÑ ÂÉÂÌÉÏÔÅËÁ Netgraph (libnetgraph, \-lnetgraph)
+.ds doc-str-Lb-libossaudio âÉÂÌÉÏÔÅËÁ ÜÍÕÌÑÃÉÉ OSS Audio (libossaudio, \-lossaudio)
+.ds doc-str-Lb-libpam      âÉÂÌÉÏÔÅËÁ PAM (libpam, \-lpam)
+.ds doc-str-Lb-libposix    âÉÂÌÉÏÔÅËÁ \*[Px]\-ÓÏ×ÍÅÓÔÉÍÏÓÔÉ (libposix, \-lposix)
+.\" XXX ds doc-str-Lb-libresolv   DNS Resolver Library (libresolv, \-lresolv)
+.ds doc-str-Lb-librpcsvc   âÉÂÌÉÏÔÅËÁ ÓÌÕÖ RPC (librpcsvc, \-lrpcsvc)
+.ds doc-str-Lb-libtermcap  âÉÂÌÉÏÔÅËÁ ÄÏÓÔÕÐÁ Ë termcap (libtermcap, \-ltermcap)
+.ds doc-str-Lb-libufs      âÉÂÌÉÏÔÅËÁ ÄÏÓÔÕÐÁ Ë ÆÁÊÌÏ×ÏÊ ÓÉÓÔÅÍÅ UFS (libufs, \-lufs)
+.\" XXX ds doc-str-Lb-libugidfw   File System Firewall Interface Library (libugidfw, \-lugidfw)
+.ds doc-str-Lb-libusbhid   âÉÂÌÉÏÔÅËÁ ÆÕÎËÃÉÊ ÄÏÓÔÕÐÁ Ë USB HID (libusbhid, \-lusbhid)
+.ds doc-str-Lb-libutil     âÉÂÌÉÏÔÅËÁ ÓÉÓÔÅÍÎÙÈ ÕÔÉÌÉÔ (libutil, \-lutil)
+.ds doc-str-Lb-libvgl      âÉÂÌÉÏÔÅËÁ ×ÉÄÅÏ-ÇÒÁÆÉËÉ (libvgl, \-lvgl)
+.ds doc-str-Lb-libz        âÉÂÌÉÏÔÅËÁ ËÏÍÐÒÅÓÓÉÉ (libz, \-lz)
+.
+.\" ÌÏËÁÌÉÚÁÃÉÑ .Rv
+.ds doc-str-Rv-std-prefix "æÕÎËÃÉÑ
+.ds doc-str-Rv-std-suffix "×ÏÚ×ÒÁÝÁÅÔ\~0 × ÓÌÕÞÁÅ ÕÓÐÅÛÎÏÇÏ ÚÁ×ÅÒÛÅÎÉÑ;
+.as doc-str-Rv-std-suffix " × ÐÒÏÔÉ×ÎÏÍ ÓÌÕÞÁÅ ÏÎÁ ×ÏÚ×ÒÁÝÁÅÔ\~-1,
+.as doc-str-Rv-std-suffix " Á ËÏÄ ÏÛÉÂËÉ ÓÏÈÒÁÎÑÅÔÓÑ × ÇÌÏÂÁÌØÎÏÊ
+.as doc-str-Rv-std-suffix " ÐÅÒÅÍÅÎÎÏÊ \*[doc-Va-font]errno\f[P].
+.
+.ds doc-str-Rv-stds-prefix "æÕÎËÃÉÉ
+.ds doc-str-Rv-stds-and    "É
+.ds doc-str-Rv-stds-suffix "×ÏÚ×ÒÁÝÁÀÔ\~0 × ÓÌÕÞÁÅ ÕÓÐÅÛÎÏÇÏ ÚÁ×ÅÒÛÅÎÉÑ;
+.as doc-str-Rv-stds-suffix " × ÐÒÏÔÉ×ÎÏÍ ÓÌÕÞÁÅ ÏÎÉ ×ÏÚ×ÒÁÝÁÀÔ\~-1,
+.as doc-str-Rv-stds-suffix " Á ËÏÄ ÏÛÉÂËÉ ÓÏÈÒÁÎÑÅÔÓÑ × ÇÌÏÂÁÌØÎÏÊ
+.as doc-str-Rv-stds-suffix " ÐÅÒÅÍÅÎÎÏÊ \*[doc-Va-font]errno\f[P].
+.
+.ds doc-str-Rv-std0 "÷ ÓÌÕÞÁÅ ÕÓÐÅÛÎÏÇÏ ÚÁ×ÅÒÛÅÎÉÑ ×ÏÚ×ÒÁÝÁÅÔÓÑ\~0;
+.as doc-str-Rv-std0 " × ÐÒÏÔÉ×ÎÏÍ ÓÌÕÞÁÅ ×ÏÚ×ÒÁÝÁÅÔÓÑ\~-1,
+.as doc-str-Rv-std0 " Á ËÏÄ ÏÛÉÂËÉ ÓÏÈÒÁÎÑÅÔÓÑ × ÇÌÏÂÁÌØÎÏÊ
+.as doc-str-Rv-std0 " ÐÅÒÅÍÅÎÎÏÊ \*[doc-Va-font]errno\f[P].
+.
+.\" ÌÏËÁÌÉÚÁÃÉÑ .Ex
+.ds doc-str-Ex-std-prefix "õÔÉÌÉÔÁ
+.ds doc-str-Ex-std-suffix "×ÏÚ×ÒÁÝÁÅÔ\~0 × ÓÌÕÞÁÅ ÕÓÐÅÛÎÏÇÏ ÚÁ×ÅÒÛÅÎÉÑ
+.as doc-str-Ex-std-suffix " É\~>0 × ÓÌÕÞÁÅ ×ÏÚÎÉËÎÏ×ÅÎÉÑ ÏÛÉÂËÉ.
+.
+.ds doc-str-Ex-stds-prefix "õÔÉÌÉÔÙ
+.ds doc-str-Ex-stds-suffix "×ÏÚ×ÒÁÝÁÀÔ\~0 × ÓÌÕÞÁÅ ÕÓÐÅÛÎÏÇÏ ÚÁ×ÅÒÛÅÎÉÑ
+.as doc-str-Ex-stds-suffix " É\~>0 × ÓÌÕÞÁÅ ×ÏÚÎÉËÎÏ×ÅÎÉÑ ÏÛÉÂËÉ.
+.
+.\" ÌÏËÁÌÉÚÁÃÉÑ .Ar
+.ds doc-str-Ar-default "ÆÁÊÌ\ .\|.\|.
+.
+.\" ÌÏËÁÌÉÚÁÃÉÑ .%A
+.ds doc-str-dpra "É

From owner-svn-src-stable@freebsd.org  Tue Oct 20 18:23:16 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22476A1AF7B;
 Tue, 20 Oct 2015 18:23:16 +0000 (UTC)
 (envelope-from bdrewery@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id C44F1123C;
 Tue, 20 Oct 2015 18:23:15 +0000 (UTC)
 (envelope-from bdrewery@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9KINEAe022815;
 Tue, 20 Oct 2015 18:23:14 GMT (envelope-from bdrewery@FreeBSD.org)
Received: (from bdrewery@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KINEnN022814;
 Tue, 20 Oct 2015 18:23:14 GMT (envelope-from bdrewery@FreeBSD.org)
Message-Id: <201510201823.t9KINEnN022814@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to
 bdrewery@FreeBSD.org using -f
From: Bryan Drewery <bdrewery@FreeBSD.org>
Date: Tue, 20 Oct 2015 18:23:14 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289639 - stable/10/sbin/ipf/ipftest
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 20 Oct 2015 18:23:16 -0000

Author: bdrewery
Date: Tue Oct 20 18:23:14 2015
New Revision: 289639
URL: https://svnweb.freebsd.org/changeset/base/289639

Log:
  MFC r288477:
  
    META_MODE: For some reason meta mode cannot generate the intermediate tab.c
    files.  Split up all of the targets to be more clear on how they are
    generated to fix the problem.

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

Modified: stable/10/sbin/ipf/ipftest/Makefile
==============================================================================
--- stable/10/sbin/ipf/ipftest/Makefile	Tue Oct 20 18:20:38 2015	(r289638)
+++ stable/10/sbin/ipf/ipftest/Makefile	Tue Oct 20 18:23:14 2015	(r289639)
@@ -32,15 +32,19 @@ CLEANFILES+=	ipnat.tab.c ipnat.tab.h
 CLEANFILES+=	ippool_y.c ippool_l.c
 CLEANFILES+=	ippool.tab.c ippool.tab.h
 
-ipnat_y.c: ipnat_y.y
+ipnat.tab.c ipnat.tab.h: ipnat_y.y
 	${YACC} -b ipnat -d ${.ALLSRC}
+
+ipnat_y.c: ipnat.tab.c
 	sed -e 's/yy/ipnat_yy/g' \
 	    -e 's/y.tab.c/ipnat_y.c/' \
 	    -e s/\"ipnat_y.y\"/\"..\\/tools\\/ipnat_y.y\"/ \
 	    ipnat.tab.c > ${.TARGET}
+
+ipnat_y.h: ipnat.tab.h
 	sed -e 's/yy/ipnat_yy/g' \
 	    -e 's/y.tab.h/ipnat_y.h/' \
-	    ipnat.tab.h > ${.TARGET:.c=.h}
+	    ipnat.tab.h > ${.TARGET}
 
 ipnat_y.h: ipnat_y.c
 
@@ -54,13 +58,17 @@ ipnat_l.h: lexer.h
 	sed -e 's/yy/ipnat_yy/g' \
 	    ${.ALLSRC} > ${.TARGET}
 
-ippool_y.c: ippool_y.y
+ippool.tab.c ippool.tab.h: ippool_y.y
 	${YACC} -b ippool -d ${.ALLSRC}
+
+ippool_y.c: ippool.tab.c
 	sed -e 's/yy/ippool_yy/g' \
 	    -e 's/"ippool_y.y"/"..\/tools\/ippool_y.y"/' \
 	    ippool.tab.c > ${.TARGET}
+
+ippool_y.h: ippool.tab.h
 	sed -e 's/yy/ippool_yy/g' \
-	    ippool.tab.h > ${.TARGET:.c=.h}
+	    ippool.tab.h > ${.TARGET}
 
 ippool_y.h: ippool_y.c
 
@@ -74,13 +82,17 @@ ippool_l.h: lexer.h
 	sed -e 's/yy/ippool_yy/g' \
 	    ${.ALLSRC} > ${.TARGET}
 
-ipf_y.c: ipf_y.y
+ipf.tab.c ipf.tab.h: ipf_y.y
 	${YACC} -b ipf -d ${.ALLSRC}
+
+ipf_y.c: ipf.tab.c
 	sed -e 's/yy/ipf_yy/g' \
 	    -e 's/"ipf_y.y"/"..\/tools\/ipf_y.y"/' \
 		ipf.tab.c > ${.TARGET}
+
+ipf_y.h: ipf.tab.h
 	sed -e 's/yy/ipf_yy/g' \
-		ipf.tab.h > ${.TARGET:.c=.h}
+		ipf.tab.h > ${.TARGET}
 
 ipf_y.h: ipf_y.c
 

From owner-svn-src-stable@freebsd.org  Tue Oct 20 18:23:46 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4094CA1AFC6;
 Tue, 20 Oct 2015 18:23:46 +0000 (UTC)
 (envelope-from bdrewery@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id DEC06137C;
 Tue, 20 Oct 2015 18:23:45 +0000 (UTC)
 (envelope-from bdrewery@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9KINiab022875;
 Tue, 20 Oct 2015 18:23:44 GMT (envelope-from bdrewery@FreeBSD.org)
Received: (from bdrewery@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KINiK5022874;
 Tue, 20 Oct 2015 18:23:44 GMT (envelope-from bdrewery@FreeBSD.org)
Message-Id: <201510201823.t9KINiK5022874@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to
 bdrewery@FreeBSD.org using -f
From: Bryan Drewery <bdrewery@FreeBSD.org>
Date: Tue, 20 Oct 2015 18:23:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject: svn commit: r289640 - stable/9/sbin/ipf/ipftest
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 20 Oct 2015 18:23:46 -0000

Author: bdrewery
Date: Tue Oct 20 18:23:44 2015
New Revision: 289640
URL: https://svnweb.freebsd.org/changeset/base/289640

Log:
  MFC r288477:
  
    META_MODE: For some reason meta mode cannot generate the intermediate tab.c
    files.  Split up all of the targets to be more clear on how they are
    generated to fix the problem.

Modified:
  stable/9/sbin/ipf/ipftest/Makefile
Directory Properties:
  stable/9/sbin/ipf/   (props changed)

Modified: stable/9/sbin/ipf/ipftest/Makefile
==============================================================================
--- stable/9/sbin/ipf/ipftest/Makefile	Tue Oct 20 18:23:14 2015	(r289639)
+++ stable/9/sbin/ipf/ipftest/Makefile	Tue Oct 20 18:23:44 2015	(r289640)
@@ -25,15 +25,19 @@ CLEANFILES+=	ipnat.tab.c ipnat.tab.h
 CLEANFILES+=	ippool_y.c ippool_l.c
 CLEANFILES+=	ippool.tab.c ippool.tab.h
 
-ipnat_y.c: ipnat_y.y
+ipnat.tab.c ipnat.tab.h: ipnat_y.y
 	${YACC} -b ipnat -d ${.ALLSRC}
+
+ipnat_y.c: ipnat.tab.c
 	sed -e 's/yy/ipnat_yy/g' \
 	    -e 's/y.tab.c/ipnat_y.c/' \
 	    -e s/\"ipnat_y.y\"/\"..\\/tools\\/ipnat_y.y\"/ \
 	    ipnat.tab.c > ${.TARGET}
+
+ipnat_y.h: ipnat.tab.h
 	sed -e 's/yy/ipnat_yy/g' \
 	    -e 's/y.tab.h/ipnat_y.h/' \
-	    ipnat.tab.h > ${.TARGET:.c=.h}
+	    ipnat.tab.h > ${.TARGET}
 
 ipnat_y.h: ipnat_y.c
 
@@ -47,13 +51,17 @@ ipnat_l.h: lexer.h
 	sed -e 's/yy/ipnat_yy/g' \
 	    ${.ALLSRC} > ${.TARGET}
 
-ippool_y.c: ippool_y.y
+ippool.tab.c ippool.tab.h: ippool_y.y
 	${YACC} -b ippool -d ${.ALLSRC}
+
+ippool_y.c: ippool.tab.c
 	sed -e 's/yy/ippool_yy/g' \
 	    -e 's/"ippool_y.y"/"..\/tools\/ippool_y.y"/' \
 	    ippool.tab.c > ${.TARGET}
+
+ippool_y.h: ippool.tab.h
 	sed -e 's/yy/ippool_yy/g' \
-	    ippool.tab.h > ${.TARGET:.c=.h}
+	    ippool.tab.h > ${.TARGET}
 
 ippool_y.h: ippool_y.c
 
@@ -67,13 +75,17 @@ ippool_l.h: lexer.h
 	sed -e 's/yy/ippool_yy/g' \
 	    ${.ALLSRC} > ${.TARGET}
 
-ipf_y.c: ipf_y.y
+ipf.tab.c ipf.tab.h: ipf_y.y
 	${YACC} -b ipf -d ${.ALLSRC}
+
+ipf_y.c: ipf.tab.c
 	sed -e 's/yy/ipf_yy/g' \
 	    -e 's/"ipf_y.y"/"..\/tools\/ipf_y.y"/' \
 		ipf.tab.c > ${.TARGET}
+
+ipf_y.h: ipf.tab.h
 	sed -e 's/yy/ipf_yy/g' \
-		ipf.tab.h > ${.TARGET:.c=.h}
+		ipf.tab.h > ${.TARGET}
 
 ipf_y.h: ipf_y.c
 

From owner-svn-src-stable@freebsd.org  Tue Oct 20 18:35:53 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D022A1A47F;
 Tue, 20 Oct 2015 18:35:53 +0000 (UTC)
 (envelope-from bdrewery@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 653D170;
 Tue, 20 Oct 2015 18:35:53 +0000 (UTC)
 (envelope-from bdrewery@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9KIZqsG025863;
 Tue, 20 Oct 2015 18:35:52 GMT (envelope-from bdrewery@FreeBSD.org)
Received: (from bdrewery@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KIZqaE025862;
 Tue, 20 Oct 2015 18:35:52 GMT (envelope-from bdrewery@FreeBSD.org)
Message-Id: <201510201835.t9KIZqaE025862@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to
 bdrewery@FreeBSD.org using -f
From: Bryan Drewery <bdrewery@FreeBSD.org>
Date: Tue, 20 Oct 2015 18:35:52 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289641 - stable/10/usr.bin/truss
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 20 Oct 2015 18:35:53 -0000

Author: bdrewery
Date: Tue Oct 20 18:35:52 2015
New Revision: 289641
URL: https://svnweb.freebsd.org/changeset/base/289641

Log:
  MFC r288903:
  
    Fix crash if a process sends itself a SIGTRAP.  Just forward it as expected.
  
    This does not match head as the code was rewritten significantly there.
  
  Relnotes:	yes

Modified:
  stable/10/usr.bin/truss/setup.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/truss/setup.c
==============================================================================
--- stable/10/usr.bin/truss/setup.c	Tue Oct 20 18:23:44 2015	(r289640)
+++ stable/10/usr.bin/truss/setup.c	Tue Oct 20 18:35:52 2015	(r289641)
@@ -221,11 +221,9 @@ detach:
 				info->pr_why = S_SCX;
 				info->curthread->in_syscall = 0;
 				break;
-			} else {
-				errx(1,
-		   "pl_flags %x contains neither PL_FLAG_SCE nor PL_FLAG_SCX",
-				    lwpinfo.pl_flags);
 			}
+			/* We didn't send the SIGTRAP, just forward it. */
+			/* FALLTHROUGH */
 		default:
 			info->pr_why = S_SIG;
 			info->pr_data = WSTOPSIG(waitval);

From owner-svn-src-stable@freebsd.org  Tue Oct 20 18:37:44 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DB77A1A52E;
 Tue, 20 Oct 2015 18:37:44 +0000 (UTC)
 (envelope-from bdrewery@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 22C0A1F0;
 Tue, 20 Oct 2015 18:37:44 +0000 (UTC)
 (envelope-from bdrewery@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9KIbhuj026024;
 Tue, 20 Oct 2015 18:37:43 GMT (envelope-from bdrewery@FreeBSD.org)
Received: (from bdrewery@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KIbhva026023;
 Tue, 20 Oct 2015 18:37:43 GMT (envelope-from bdrewery@FreeBSD.org)
Message-Id: <201510201837.t9KIbhva026023@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to
 bdrewery@FreeBSD.org using -f
From: Bryan Drewery <bdrewery@FreeBSD.org>
Date: Tue, 20 Oct 2015 18:37:43 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject: svn commit: r289642 - stable/9/usr.bin/truss
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 20 Oct 2015 18:37:44 -0000

Author: bdrewery
Date: Tue Oct 20 18:37:42 2015
New Revision: 289642
URL: https://svnweb.freebsd.org/changeset/base/289642

Log:
  MFC r288903:
  
    Fix crash if a process sends itself a SIGTRAP.  Just forward it as expected.
  
    This does not match head as the code was rewritten significantly there.
  
  Relnotes:	yes

Modified:
  stable/9/usr.bin/truss/setup.c
Directory Properties:
  stable/9/usr.bin/truss/   (props changed)

Modified: stable/9/usr.bin/truss/setup.c
==============================================================================
--- stable/9/usr.bin/truss/setup.c	Tue Oct 20 18:35:52 2015	(r289641)
+++ stable/9/usr.bin/truss/setup.c	Tue Oct 20 18:37:42 2015	(r289642)
@@ -221,11 +221,9 @@ detach:
 				info->pr_why = S_SCX;
 				info->curthread->in_syscall = 0;
 				break;
-			} else {
-				errx(1,
-		   "pl_flags %x contains neither PL_FLAG_SCE nor PL_FLAG_SCX",
-				    lwpinfo.pl_flags);
 			}
+			/* We didn't send the SIGTRAP, just forward it. */
+			/* FALLTHROUGH */
 		default:
 			info->pr_why = S_SIG;
 			info->pr_data = WSTOPSIG(waitval);

From owner-svn-src-stable@freebsd.org  Tue Oct 20 21:20:36 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E1ABA1A516;
 Tue, 20 Oct 2015 21:20:36 +0000 (UTC) (envelope-from ian@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id C3C7DFB2;
 Tue, 20 Oct 2015 21:20:35 +0000 (UTC) (envelope-from ian@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9KLKZfQ078469;
 Tue, 20 Oct 2015 21:20:35 GMT (envelope-from ian@FreeBSD.org)
Received: (from ian@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KLKYjW078463;
 Tue, 20 Oct 2015 21:20:34 GMT (envelope-from ian@FreeBSD.org)
Message-Id: <201510202120.t9KLKYjW078463@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org
 using -f
From: Ian Lepore <ian@FreeBSD.org>
Date: Tue, 20 Oct 2015 21:20:34 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289666 - in stable/10/sys: arm/freescale/imx
 arm/freescale/vybrid arm/samsung/exynos dev/iicbus dev/pcf powerpc/mpc85xx
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 20 Oct 2015 21:20:36 -0000

Author: ian
Date: Tue Oct 20 21:20:34 2015
New Revision: 289666
URL: https://svnweb.freebsd.org/changeset/base/289666

Log:
  MFC r281828, r289083, r289084, r289091, r289093, r289095, r289097, r289098,
      r289104, r289105, r289118:  various i2c fixes...
  
    Fix numerous issues in iic(4) and iicbus(4):
    --Allow multiple open iic fds by storing addressing state in cdevpriv
    --Fix, as much as possible, the baked-in race conditions in the iic
    ioctl interface by requesting bus ownership on I2CSTART, releasing it on
    I2CSTOP/I2CRSTCARD, and requiring bus ownership by the current cdevpriv
    to use the I/O ioctls
    --Reduce internal iic buffer size and remove 1K read/write limit by
    iteratively calling iicbus_read/iicbus_write
    --Eliminate dynamic allocation in I2CWRITE/I2CREAD
    --Move handling of I2CRDWR to separate function and improve error handling
    --Add new I2CSADDR ioctl to store address in current cdevpriv so that
    I2CSTART is not needed for read(2)/write(2) to work
    --Redesign iicbus_request_bus() and iicbus_release_bus():
        --iicbus_request_bus() no longer falls through if the bus is already
    owned by the requesting device.  Multiple threads on the same device may
    want exclusive access.  Also, iicbus_release_bus() was never
    device-recursive anyway.
        --Previously, if IICBUS_CALLBACK failed in iicbus_release_bus(), but
    the following iicbus_poll() call succeeded, IICBUS_CALLBACK would not be
    issued again
        --Do not hold iicbus mtx during IICBUS_CALLBACK call.  There are
    several drivers that may sleep in IICBUS_CALLBACK, if IIC_WAIT is passed.
        --Do not loop in iicbus_request_bus if IICBUS_CALLBACK returns
    EWOULDBLOCK; instead pass that to the caller so that it can retry if so
    desired.
  
    Bugfix: Exit the transfer loop if any read or write operation fails.  Also,
    perform a stop operation on the bus if there was an error, otherwise the
    bus will remain hung forever.  Consistantly use 'if (error != 0)' style in
    the function.
  
    Mostly rewrite the imx i2c driver.  This started out as an attempt to fix
    one specific problem: the driver didn't check for ACK/NAK after writing a
    slave address byte to the bus, and some slaves signal that they are busy
    (such as when completing an internal write to flash memory) by sending a
    NAK in response to being addressed.
  
    Use IIC_EBUSBSY and IIC_BUSERR status values consistantly across all drivers.
    Make it clearer what each one means in the comments that define them.
  
    Add iic2errno(), a helper function to translate IIC_Exxxxx status values to
    errno values that are at least vaguely equivelent.  Also add a new status
    value, IIC_ERESOURCE, to indicate a failure to acquire memory or other
    required resources to complete a transaction.
  
    Return only IIC_Exxxx status values from iicbus-layer functions.  Most of
    these functions are thin wrappers around calling the hardware-layer driver,
    but some of them do sanity checks and return an error.
  
    Add a short name, IIC_INTRWAIT, for the common case (IIC_INTR | IIC_WAIT).
  
    Replace a local sx lock that allowed only one client at a time to access
    an eeprom device with iicbus_request/release_bus(), which achieves the
    same effect and also keeps other i2c slave drivers from clashing on the bus.

Modified:
  stable/10/sys/arm/freescale/imx/imx_i2c.c
  stable/10/sys/arm/freescale/vybrid/vf_i2c.c
  stable/10/sys/arm/samsung/exynos/exynos5_i2c.c
  stable/10/sys/dev/iicbus/icee.c
  stable/10/sys/dev/iicbus/iic.c
  stable/10/sys/dev/iicbus/iic.h
  stable/10/sys/dev/iicbus/iicbus_if.m
  stable/10/sys/dev/iicbus/iicoc.c
  stable/10/sys/dev/iicbus/iiconf.c
  stable/10/sys/dev/iicbus/iiconf.h
  stable/10/sys/dev/pcf/pcf.c
  stable/10/sys/powerpc/mpc85xx/i2c.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/freescale/imx/imx_i2c.c
==============================================================================
--- stable/10/sys/arm/freescale/imx/imx_i2c.c	Tue Oct 20 21:18:02 2015	(r289665)
+++ stable/10/sys/arm/freescale/imx/imx_i2c.c	Tue Oct 20 21:20:34 2015	(r289666)
@@ -1,6 +1,7 @@
 /*-
  * Copyright (C) 2008-2009 Semihalf, Michal Hajduk
  * Copyright (c) 2012, 2013 The FreeBSD Foundation
+ * Copyright (c) 2015 Ian Lepore <ian@FreeBSD.org>
  * All rights reserved.
  *
  * Portions of this software were developed by Oleksandr Rybalko
@@ -28,6 +29,19 @@
  * SUCH DAMAGE.
  */
 
+/*
+ * I2C driver for Freescale i.MX hardware.
+ *
+ * Note that the hardware is capable of running as both a master and a slave.
+ * This driver currently implements only master-mode operations.
+ *
+ * This driver supports multi-master i2c busses, by detecting bus arbitration
+ * loss and returning IIC_EBUSBSY status.  Notably, it does not do any kind of
+ * retries if some other master jumps onto the bus and interrupts one of our
+ * transfer cycles resulting in arbitration loss in mid-transfer.  The caller
+ * must handle retries in a way that makes sense for the slave being addressed.
+ */
+
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 
@@ -43,9 +57,6 @@ __FBSDID("$FreeBSD$");
 #include <machine/resource.h>
 #include <sys/rman.h>
 
-#include <sys/lock.h>
-#include <sys/mutex.h>
-
 #include <arm/freescale/imx/imx_ccmvar.h>
 
 #include <dev/iicbus/iiconf.h>
@@ -108,13 +119,6 @@ static struct clkdiv clkdiv_table[] = {
         { 2560, 0x1d }, { 3072, 0x1e }, { 3840, 0x1f }, {UINT_MAX, 0x1f} 
 };
 
-#ifdef  DEBUG
-#define debugf(fmt, args...) do { printf("%s(): ", __func__);		\
-		printf(fmt,##args); } while (0)
-#else
-#define debugf(fmt, args...)
-#endif
-
 static struct ofw_compat_data compat_data[] = {
 	{"fsl,imx6q-i2c",  1},
 	{"fsl,imx-i2c",	   1},
@@ -125,10 +129,8 @@ struct i2c_softc {
 	device_t		dev;
 	device_t		iicbus;
 	struct resource		*res;
-	struct mtx		mutex;
 	int			rid;
-	bus_space_handle_t	bsh;
-	bus_space_tag_t		bst;
+	sbintime_t		byte_time_sbt;
 };
 
 static phandle_t i2c_get_node(device_t, device_t);
@@ -158,7 +160,7 @@ static device_method_t i2c_methods[] = {
 	DEVMETHOD(iicbus_write,			i2c_write),
 	DEVMETHOD(iicbus_transfer,		iicbus_transfer_gen),
 
-	{ 0, 0 }
+	DEVMETHOD_END
 };
 
 static driver_t i2c_driver = {
@@ -184,14 +186,14 @@ static __inline void
 i2c_write_reg(struct i2c_softc *sc, bus_size_t off, uint8_t val)
 {
 
-	bus_space_write_1(sc->bst, sc->bsh, off, val);
+	bus_write_1(sc->res, off, val);
 }
 
 static __inline uint8_t
 i2c_read_reg(struct i2c_softc *sc, bus_size_t off)
 {
 
-	return (bus_space_read_1(sc->bst, sc->bsh, off));
+	return (bus_read_1(sc->res, off));
 }
 
 static __inline void
@@ -204,60 +206,77 @@ i2c_flag_set(struct i2c_softc *sc, bus_s
 	i2c_write_reg(sc, off, status);
 }
 
-/* Wait for transfer interrupt flag */
+/* Wait for bus to become busy or not-busy. */
 static int
-wait_for_iif(struct i2c_softc *sc)
+wait_for_busbusy(struct i2c_softc *sc, int wantbusy)
 {
-	int retry;
+	int retry, srb;
 
 	retry = 1000;
 	while (retry --) {
-		if (i2c_read_reg(sc, I2C_STATUS_REG) & I2CSR_MIF)
+		srb = i2c_read_reg(sc, I2C_STATUS_REG) & I2CSR_MBB;
+		if ((srb && wantbusy) || (!srb && !wantbusy))
 			return (IIC_NOERR);
-		DELAY(10);
+		DELAY(1);
 	}
-
 	return (IIC_ETIMEOUT);
 }
 
-/* Wait for free bus */
+/* Wait for transfer to complete, optionally check RXAK. */
 static int
-wait_for_nibb(struct i2c_softc *sc)
+wait_for_xfer(struct i2c_softc *sc, int checkack)
 {
-	int retry;
+	int retry, sr;
 
-	retry = 1000;
+	/*
+	 * Sleep for about the time it takes to transfer a byte (with precision
+	 * set to tolerate 5% oversleep).  We calculate the approximate byte
+	 * transfer time when we set the bus speed divisor.  Slaves are allowed
+	 * to do clock-stretching so the actual transfer time can be larger, but
+	 * this gets the bulk of the waiting out of the way without tying up the
+	 * processor the whole time.
+	 */
+	pause_sbt("imxi2c", sc->byte_time_sbt, sc->byte_time_sbt / 20, 0);
+
+	retry = 10000;
 	while (retry --) {
-		if ((i2c_read_reg(sc, I2C_STATUS_REG) & I2CSR_MBB) == 0)
-			return (IIC_NOERR);
-		DELAY(10);
+		sr = i2c_read_reg(sc, I2C_STATUS_REG);
+		if (sr & I2CSR_MIF) {
+                        if (sr & I2CSR_MAL) 
+				return (IIC_EBUSERR);
+			else if (checkack && (sr & I2CSR_RXAK))
+				return (IIC_ENOACK);
+			else
+				return (IIC_NOERR);
+		}
+		DELAY(1);
 	}
-
 	return (IIC_ETIMEOUT);
 }
 
-/* Wait for transfer complete+interrupt flag */
+/*
+ * Implement the error handling shown in the state diagram of the imx6 reference
+ * manual.  If there was an error, then:
+ *  - Clear master mode (MSTA and MTX).
+ *  - Wait for the bus to become free or for a timeout to happen.
+ *  - Disable the controller.
+ */
 static int
-wait_for_icf(struct i2c_softc *sc)
+i2c_error_handler(struct i2c_softc *sc, int error)
 {
-	int retry;
 
-	retry = 1000;
-	while (retry --) {
-
-		if ((i2c_read_reg(sc, I2C_STATUS_REG) &
-		    (I2CSR_MCF|I2CSR_MIF)) == (I2CSR_MCF|I2CSR_MIF))
-			return (IIC_NOERR);
-		DELAY(10);
+	if (error != 0) {
+		i2c_write_reg(sc, I2C_STATUS_REG, 0);
+		i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN);
+		wait_for_busbusy(sc, false);
+		i2c_write_reg(sc, I2C_CONTROL_REG, 0);
 	}
-
-	return (IIC_ETIMEOUT);
+	return (error);
 }
 
 static int
 i2c_probe(device_t dev)
 {
-	struct i2c_softc *sc;
 
 	if (!ofw_bus_status_okay(dev))
 		return (ENXIO);
@@ -265,23 +284,7 @@ i2c_probe(device_t dev)
 	if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0)
 		return (ENXIO);
 
-	sc = device_get_softc(dev);
-	sc->rid = 0;
-
-	sc->res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->rid,
-	    RF_ACTIVE);
-	if (sc->res == NULL) {
-		device_printf(dev, "could not allocate resources\n");
-		return (ENXIO);
-	}
-
-	sc->bst = rman_get_bustag(sc->res);
-	sc->bsh = rman_get_bushandle(sc->res);
-
-	/* Enable I2C */
-	i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN);
-	bus_release_resource(dev, SYS_RES_MEMORY, sc->rid, sc->res);
-	device_set_desc(dev, "Freescale i.MX I2C bus controller");
+	device_set_desc(dev, "Freescale i.MX I2C");
 
 	return (BUS_PROBE_DEFAULT);
 }
@@ -295,28 +298,21 @@ i2c_attach(device_t dev)
 	sc->dev = dev;
 	sc->rid = 0;
 
-	mtx_init(&sc->mutex, device_get_nameunit(dev), "I2C", MTX_DEF);
-
 	sc->res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->rid,
 	    RF_ACTIVE);
 	if (sc->res == NULL) {
 		device_printf(dev, "could not allocate resources");
-		mtx_destroy(&sc->mutex);
 		return (ENXIO);
 	}
 
-	sc->bst = rman_get_bustag(sc->res);
-	sc->bsh = rman_get_bushandle(sc->res);
-
 	sc->iicbus = device_add_child(dev, "iicbus", -1);
 	if (sc->iicbus == NULL) {
 		device_printf(dev, "could not add iicbus child");
-		mtx_destroy(&sc->mutex);
 		return (ENXIO);
 	}
 
 	bus_generic_attach(dev);
-	return (IIC_NOERR);
+	return (0);
 }
 
 static int
@@ -327,34 +323,20 @@ i2c_repeated_start(device_t dev, u_char 
 
 	sc = device_get_softc(dev);
 
-	mtx_lock(&sc->mutex);
-
-	i2c_write_reg(sc, I2C_ADDR_REG, slave);
 	if ((i2c_read_reg(sc, I2C_STATUS_REG) & I2CSR_MBB) == 0) {
-		mtx_unlock(&sc->mutex);
-		return (IIC_EBUSBSY);
+		return (IIC_EBUSERR);
 	}
 
-	/* Set repeated start condition */
-	DELAY(10);
+	/*
+	 * Set repeated start condition, delay (per reference manual, min 156nS)
+	 * before writing slave address, wait for ack after write.
+	 */
 	i2c_flag_set(sc, I2C_CONTROL_REG, I2CCR_RSTA);
-	DELAY(10);
-	/* Clear status */
+	DELAY(1);
 	i2c_write_reg(sc, I2C_STATUS_REG, 0x0);
-	/* Write target address - LSB is R/W bit */
 	i2c_write_reg(sc, I2C_DATA_REG, slave);
-
-	error = wait_for_iif(sc);
-
-	/* Clear status */
-	i2c_write_reg(sc, I2C_STATUS_REG, 0x0);
-
-	mtx_unlock(&sc->mutex);
-
-	if (error)
-		return (error);
-
-	return (IIC_NOERR);
+	error = wait_for_xfer(sc, true);
+	return (i2c_error_handler(sc, error));
 }
 
 static int
@@ -365,53 +347,30 @@ i2c_start(device_t dev, u_char slave, in
 
 	sc = device_get_softc(dev);
 
-	mtx_lock(&sc->mutex);
-	i2c_write_reg(sc, I2C_ADDR_REG, slave);
+	i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN);
+	DELAY(10); /* Delay for controller to sample bus state. */
 	if (i2c_read_reg(sc, I2C_STATUS_REG) & I2CSR_MBB) {
-		mtx_unlock(&sc->mutex);
-		return (IIC_EBUSBSY);
+		return (i2c_error_handler(sc, IIC_EBUSERR));
 	}
-
-	/* Set start condition */
-	i2c_write_reg(sc, I2C_CONTROL_REG,
-	    I2CCR_MEN | I2CCR_MSTA | I2CCR_TXAK);
-	DELAY(100);
-	i2c_write_reg(sc, I2C_CONTROL_REG,
-	    I2CCR_MEN | I2CCR_MSTA | I2CCR_MTX | I2CCR_TXAK);
-	/* Clear status */
-	i2c_write_reg(sc, I2C_STATUS_REG, 0x0);
-	/* Write target address - LSB is R/W bit */
+	i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN | I2CCR_MSTA | I2CCR_MTX);
+	if ((error = wait_for_busbusy(sc, true)) != IIC_NOERR)
+		return (i2c_error_handler(sc, error));
+	i2c_write_reg(sc, I2C_STATUS_REG, 0);
 	i2c_write_reg(sc, I2C_DATA_REG, slave);
-
-	error = wait_for_iif(sc);
-
-	mtx_unlock(&sc->mutex);
-	if (error)
-		return (error);
-
-	return (IIC_NOERR);
+	error = wait_for_xfer(sc, true);
+	return (i2c_error_handler(sc, error));
 }
 
-
 static int
 i2c_stop(device_t dev)
 {
 	struct i2c_softc *sc;
 
 	sc = device_get_softc(dev);
-	mtx_lock(&sc->mutex);
-	i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN | I2CCR_TXAK);
-	DELAY(100);
-	/* Reset controller if bus still busy after STOP */
-	if (wait_for_nibb(sc) == IIC_ETIMEOUT) {
-		i2c_write_reg(sc, I2C_CONTROL_REG, 0);
-		DELAY(1000);
-		i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN | I2CCR_TXAK);
-
-		i2c_write_reg(sc, I2C_STATUS_REG, 0x0);
-	}
-	mtx_unlock(&sc->mutex);
 
+	i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN);
+	wait_for_busbusy(sc, false);
+	i2c_write_reg(sc, I2C_CONTROL_REG, 0);
 	return (IIC_NOERR);
 }
 
@@ -434,19 +393,23 @@ i2c_reset(device_t dev, u_char speed, u_
 		if (clkdiv_table[i].divisor >= div)
 			break;
 	}
-	div = clkdiv_table[i].regcode;
 
-	mtx_lock(&sc->mutex);
-	i2c_write_reg(sc, I2C_CONTROL_REG, 0x0);
-	i2c_write_reg(sc, I2C_STATUS_REG, 0x0);
-	DELAY(1000);
+	/*
+	 * Calculate roughly how long it will take to transfer a byte (which
+	 * requires 9 clock cycles) at the new bus speed.  This value is used to
+	 * pause() while waiting for transfer-complete.  With a 66MHz IPG clock
+	 * and the actual i2c bus speeds that leads to, for nominal 100KHz and
+	 * 400KHz bus speeds the transfer times are roughly 104uS and 22uS.
+	 */
+	busfreq = ipgfreq / clkdiv_table[i].divisor;
+	sc->byte_time_sbt = SBT_1US * (9000000 / busfreq);
 
-	i2c_write_reg(sc, I2C_FDR_REG, (uint8_t)div);
-	i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN);
-	DELAY(1000);
+	/*
+	 * Disable the controller (do the reset), and set the new clock divisor.
+	 */
 	i2c_write_reg(sc, I2C_STATUS_REG, 0x0);
-	mtx_unlock(&sc->mutex);
-
+	i2c_write_reg(sc, I2C_CONTROL_REG, 0x0);
+	i2c_write_reg(sc, I2C_FDR_REG, (uint8_t)clkdiv_table[i].regcode);
 	return (IIC_NOERR);
 }
 
@@ -459,48 +422,42 @@ i2c_read(device_t dev, char *buf, int le
 	sc = device_get_softc(dev);
 	*read = 0;
 
-	mtx_lock(&sc->mutex);
-
 	if (len) {
 		if (len == 1)
 			i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN |
 			    I2CCR_MSTA | I2CCR_TXAK);
-
 		else
 			i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN |
 			    I2CCR_MSTA);
-
-		/* dummy read */
+                /* Dummy read to prime the receiver. */
+		i2c_write_reg(sc, I2C_STATUS_REG, 0x0);
 		i2c_read_reg(sc, I2C_DATA_REG);
-		DELAY(1000);
 	}
 
+	error = 0;
+	*read = 0;
 	while (*read < len) {
-		error = wait_for_icf(sc);
-		if (error) {
-			mtx_unlock(&sc->mutex);
-			return (error);
-		}
+		if ((error = wait_for_xfer(sc, false)) != IIC_NOERR)
+			break;
 		i2c_write_reg(sc, I2C_STATUS_REG, 0x0);
-		if ((*read == len - 2) && last) {
-			/* NO ACK on last byte */
-			i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN |
-			    I2CCR_MSTA | I2CCR_TXAK);
+		if (last) {
+			if (*read == len - 2) {
+				/* NO ACK on last byte */
+				i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN |
+				    I2CCR_MSTA | I2CCR_TXAK);
+			} else if (*read == len - 1) {
+				/* Transfer done, signal stop. */
+				i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN |
+				    I2CCR_TXAK);
+				wait_for_busbusy(sc, false);
+			}
 		}
-
-		if ((*read == len - 1) && last) {
-			/* Transfer done, remove master bit */
-			i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN |
-			    I2CCR_TXAK);
-		}
-
 		reg = i2c_read_reg(sc, I2C_DATA_REG);
 		*buf++ = reg;
 		(*read)++;
 	}
-	mtx_unlock(&sc->mutex);
 
-	return (IIC_NOERR);
+	return (i2c_error_handler(sc, error));
 }
 
 static int
@@ -510,22 +467,16 @@ i2c_write(device_t dev, const char *buf,
 	int error;
 
 	sc = device_get_softc(dev);
-	*sent = 0;
 
-	mtx_lock(&sc->mutex);
+	error = 0;
+	*sent = 0;
 	while (*sent < len) {
 		i2c_write_reg(sc, I2C_STATUS_REG, 0x0);
 		i2c_write_reg(sc, I2C_DATA_REG, *buf++);
-
-		error = wait_for_iif(sc);
-		if (error) {
-			mtx_unlock(&sc->mutex);
-			return (error);
-		}
-
+		if ((error = wait_for_xfer(sc, true)) != IIC_NOERR)
+			break;
 		(*sent)++;
 	}
-	mtx_unlock(&sc->mutex);
 
-	return (IIC_NOERR);
+	return (i2c_error_handler(sc, error));
 }

Modified: stable/10/sys/arm/freescale/vybrid/vf_i2c.c
==============================================================================
--- stable/10/sys/arm/freescale/vybrid/vf_i2c.c	Tue Oct 20 21:18:02 2015	(r289665)
+++ stable/10/sys/arm/freescale/vybrid/vf_i2c.c	Tue Oct 20 21:20:34 2015	(r289666)
@@ -233,7 +233,7 @@ i2c_repeated_start(device_t dev, u_char 
 
 	if ((READ1(sc, I2C_IBSR) & IBSR_IBB) == 0) {
 		mtx_unlock(&sc->mutex);
-		return (IIC_EBUSBSY);
+		return (IIC_EBUSERR);
 	}
 
 	/* Set repeated start condition */
@@ -276,7 +276,7 @@ i2c_start(device_t dev, u_char slave, in
 	if (READ1(sc, I2C_IBSR) & IBSR_IBB) {
 		mtx_unlock(&sc->mutex);
 		vf_i2c_dbg(sc, "cant i2c start: IIC_EBUSBSY\n");
-		return (IIC_EBUSBSY);
+		return (IIC_EBUSERR);
 	}
 
 	/* Set start condition */

Modified: stable/10/sys/arm/samsung/exynos/exynos5_i2c.c
==============================================================================
--- stable/10/sys/arm/samsung/exynos/exynos5_i2c.c	Tue Oct 20 21:18:02 2015	(r289665)
+++ stable/10/sys/arm/samsung/exynos/exynos5_i2c.c	Tue Oct 20 21:20:34 2015	(r289666)
@@ -265,8 +265,8 @@ i2c_start(device_t dev, u_char slave, in
 	error = wait_for_nibb(sc);
 	if (error) {
 		mtx_unlock(&sc->mutex);
-		DPRINTF("cant i2c start: IIC_EBUSBSY\n");
-		return (IIC_EBUSBSY);
+		DPRINTF("cant i2c start: IIC_EBUSERR\n");
+		return (IIC_EBUSERR);
 	}
 
 	reg = READ1(sc, I2CCON);

Modified: stable/10/sys/dev/iicbus/icee.c
==============================================================================
--- stable/10/sys/dev/iicbus/icee.c	Tue Oct 20 21:18:02 2015	(r289665)
+++ stable/10/sys/dev/iicbus/icee.c	Tue Oct 20 21:20:34 2015	(r289666)
@@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$");
 
 struct icee_softc {
 	device_t	sc_dev;		/* Myself */
-	struct sx	sc_lock;	/* basically a perimeter lock */
+	device_t	sc_busdev;	/* Parent bus */
 	struct cdev	*cdev;		/* user interface */
 	int		addr;
 	int		size;		/* How big am I? */
@@ -57,12 +57,6 @@ struct icee_softc {
 	int		wr_sz;		/* What's the write page size */
 };
 
-#define ICEE_LOCK(_sc)		sx_xlock(&(_sc)->sc_lock)
-#define	ICEE_UNLOCK(_sc)	sx_xunlock(&(_sc)->sc_lock)
-#define ICEE_LOCK_INIT(_sc)	sx_init(&_sc->sc_lock, "icee")
-#define ICEE_LOCK_DESTROY(_sc)	sx_destroy(&_sc->sc_lock);
-#define ICEE_ASSERT_LOCKED(_sc)	sx_assert(&_sc->sc_lock, SA_XLOCKED);
-#define ICEE_ASSERT_UNLOCKED(_sc) sx_assert(&_sc->sc_lock, SA_UNLOCKED);
 #define CDEV2SOFTC(dev)		((dev)->si_drv1)
 
 /* cdev routines */
@@ -84,7 +78,7 @@ static struct cdevsw icee_cdevsw =
 static int
 icee_probe(device_t dev)
 {
-	/* XXX really probe? -- not until we know the size... */
+
 	device_set_desc(dev, "I2C EEPROM");
 	return (BUS_PROBE_NOWILDCARD);
 }
@@ -97,6 +91,7 @@ icee_attach(device_t dev)
 	int dunit, err;
 
 	sc->sc_dev = dev;
+	sc->sc_busdev = device_get_parent(sc->sc_dev);
 	sc->addr = iicbus_get_addr(dev);
 	err = 0;
 	dname = device_get_name(dev);
@@ -117,8 +112,7 @@ icee_attach(device_t dev)
 		goto out;
 	}
 	sc->cdev->si_drv1 = sc;
-	ICEE_LOCK_INIT(sc);
-out:;
+out:
 	return (err);
 }
 
@@ -126,7 +120,7 @@ static int 
 icee_open(struct cdev *dev, int oflags, int devtype, struct thread *td)
 {
 
-    	return (0);
+	return (0);
 }
 
 static int
@@ -155,7 +149,9 @@ icee_read(struct cdev *dev, struct uio *
 		return (EIO);
 	if (sc->type != 8 && sc->type != 16)
 		return (EINVAL);
-	ICEE_LOCK(sc);
+	error = iicbus_request_bus(sc->sc_busdev, sc->sc_dev, IIC_INTRWAIT);
+	if (error!= 0)
+		return (iic2errno(error));
 	slave = error = 0;
 	while (uio->uio_resid > 0) {
 		if (uio->uio_offset >= sc->size)
@@ -180,13 +176,15 @@ icee_read(struct cdev *dev, struct uio *
 		for (i = 0; i < 2; i++)
 			msgs[i].slave = slave;
 		error = iicbus_transfer(sc->sc_dev, msgs, 2);
-		if (error)
+		if (error) {
+			error = iic2errno(error);
 			break;
+		}
 		error = uiomove(data, len, uio);
 		if (error)
 			break;
 	}
-	ICEE_UNLOCK(sc);
+	iicbus_release_bus(sc->sc_busdev, sc->sc_dev);
 	return (error);
 }
 
@@ -214,7 +212,10 @@ icee_write(struct cdev *dev, struct uio 
 		return (EIO);
 	if (sc->type != 8 && sc->type != 16)
 		return (EINVAL);
-	ICEE_LOCK(sc);
+
+	error = iicbus_request_bus(sc->sc_busdev, sc->sc_dev, IIC_INTRWAIT);
+	if (error!= 0)
+		return (iic2errno(error));
 	slave = error = 0;
 	while (uio->uio_resid > 0) {
 		if (uio->uio_offset >= sc->size)
@@ -239,22 +240,22 @@ icee_write(struct cdev *dev, struct uio 
 		if (error)
 			break;
 		error = iicbus_transfer(sc->sc_dev, wr, 1);
-		if (error)
+		if (error) {
+			error = iic2errno(error);
 			break;
-		// Now wait for the write to be done by trying to read
-		// the part.
+		}
+		/* Read after write to wait for write-done. */
 		waitlimit = 10000;
 		rd[0].slave = slave;
-		do 
-		{
-		    error = iicbus_transfer(sc->sc_dev, rd, 1);
+		do {
+			error = iicbus_transfer(sc->sc_dev, rd, 1);
 		} while (waitlimit-- > 0 && error != 0);
 		if (error) {
-		    printf("waiting for write failed %d\n", error);
-		    break;
+			error = iic2errno(error);
+			break;
 		}
 	}
-	ICEE_UNLOCK(sc);
+	iicbus_release_bus(sc->sc_busdev, sc->sc_dev);
 	return error;
 }
 

Modified: stable/10/sys/dev/iicbus/iic.c
==============================================================================
--- stable/10/sys/dev/iicbus/iic.c	Tue Oct 20 21:18:02 2015	(r289665)
+++ stable/10/sys/dev/iicbus/iic.c	Tue Oct 20 21:20:34 2015	(r289666)
@@ -37,6 +37,7 @@
 #include <sys/sx.h>
 #include <sys/systm.h>
 #include <sys/uio.h>
+#include <sys/errno.h>
 
 #include <dev/iicbus/iiconf.h>
 #include <dev/iicbus/iicbus.h>
@@ -44,28 +45,32 @@
 
 #include "iicbus_if.h"
 
-#define BUFSIZE 1024
-
 struct iic_softc {
-
 	device_t sc_dev;
-	u_char sc_addr;			/* 7 bit address on iicbus */
-	int sc_count;			/* >0 if device opened */
-
-	char sc_buffer[BUFSIZE];	/* output buffer */
-	char sc_inbuf[BUFSIZE];		/* input buffer */
-
 	struct cdev *sc_devnode;
-	struct sx sc_lock;
 };
 
-#define	IIC_LOCK(sc)			sx_xlock(&(sc)->sc_lock)
-#define	IIC_UNLOCK(sc)			sx_xunlock(&(sc)->sc_lock)
+struct iic_cdevpriv {
+	struct sx lock;
+	struct iic_softc *sc;
+	bool started;
+	uint8_t addr;
+};
+
+
+#define	IIC_LOCK(cdp)			sx_xlock(&(cdp)->lock)
+#define	IIC_UNLOCK(cdp)			sx_xunlock(&(cdp)->lock)
+
+static MALLOC_DEFINE(M_IIC, "iic", "I2C device data");
 
 static int iic_probe(device_t);
 static int iic_attach(device_t);
 static int iic_detach(device_t);
 static void iic_identify(driver_t *driver, device_t parent);
+static void iicdtor(void *data);
+static int iicuio_move(struct iic_cdevpriv *priv, struct uio *uio, int last);
+static int iicuio(struct cdev *dev, struct uio *uio, int ioflag);
+static int iicrdwr(struct iic_cdevpriv *priv, struct iic_rdwr_data *d, int flags);
 
 static devclass_t iic_devclass;
 
@@ -89,18 +94,13 @@ static driver_t iic_driver = {
 };
 
 static	d_open_t	iicopen;
-static	d_close_t	iicclose;
-static	d_write_t	iicwrite;
-static	d_read_t	iicread;
 static	d_ioctl_t	iicioctl;
 
 static struct cdevsw iic_cdevsw = {
 	.d_version =	D_VERSION,
-	.d_flags =	D_TRACKCLOSE,
 	.d_open =	iicopen,
-	.d_close =	iicclose,
-	.d_read =	iicread,
-	.d_write =	iicwrite,
+	.d_read =	iicuio,
+	.d_write =	iicuio,
 	.d_ioctl =	iicioctl,
 	.d_name =	"iic",
 };
@@ -127,16 +127,15 @@ iic_probe(device_t dev)
 static int
 iic_attach(device_t dev)
 {
-	struct iic_softc *sc = (struct iic_softc *)device_get_softc(dev);
+	struct iic_softc *sc;
 
+	sc = device_get_softc(dev);
 	sc->sc_dev = dev;
-	sx_init(&sc->sc_lock, "iic");
 	sc->sc_devnode = make_dev(&iic_cdevsw, device_get_unit(dev),
 			UID_ROOT, GID_WHEEL,
 			0600, "iic%d", device_get_unit(dev));
 	if (sc->sc_devnode == NULL) {
 		device_printf(dev, "failed to create character device\n");
-		sx_destroy(&sc->sc_lock);
 		return (ENXIO);
 	}
 	sc->sc_devnode->si_drv1 = sc;
@@ -147,11 +146,12 @@ iic_attach(device_t dev)
 static int
 iic_detach(device_t dev)
 {
-	struct iic_softc *sc = (struct iic_softc *)device_get_softc(dev);
+	struct iic_softc *sc;
+
+	sc = device_get_softc(dev);
 
 	if (sc->sc_devnode)
 		destroy_dev(sc->sc_devnode);
-	sx_destroy(&sc->sc_lock);
 
 	return (0);
 }
@@ -159,238 +159,331 @@ iic_detach(device_t dev)
 static int
 iicopen(struct cdev *dev, int flags, int fmt, struct thread *td)
 {
-	struct iic_softc *sc = dev->si_drv1;
+	struct iic_cdevpriv *priv;
+	int error;
 
-	IIC_LOCK(sc);
-	if (sc->sc_count > 0) {
-		IIC_UNLOCK(sc);
-		return (EBUSY);
-	}
+	priv = malloc(sizeof(*priv), M_IIC, M_WAITOK | M_ZERO);
 
-	sc->sc_count++;
-	IIC_UNLOCK(sc);
+	sx_init(&priv->lock, "iic");
+	priv->sc = dev->si_drv1;
 
-	return (0);
+	error = devfs_set_cdevpriv(priv, iicdtor); 
+	if (error != 0)
+		free(priv, M_IIC);
+
+	return (error);
 }
 
-static int
-iicclose(struct cdev *dev, int flags, int fmt, struct thread *td)
+static void
+iicdtor(void *data)
 {
-	struct iic_softc *sc = dev->si_drv1;
+	device_t iicdev, parent;
+	struct iic_cdevpriv *priv;
 
-	IIC_LOCK(sc);
-	if (!sc->sc_count) {
-		/* XXX: I don't think this can happen. */
-		IIC_UNLOCK(sc);
-		return (EINVAL);
-	}
+	priv = data;
+	KASSERT(priv != NULL, ("iic cdevpriv should not be NULL!"));
 
-	sc->sc_count--;
+	iicdev = priv->sc->sc_dev;
+	parent = device_get_parent(iicdev);
 
-	if (sc->sc_count < 0)
-		panic("%s: iic_count < 0!", __func__);
-	IIC_UNLOCK(sc);
+	if (priv->started) {
+		iicbus_stop(parent);
+		iicbus_reset(parent, IIC_UNKNOWN, 0, NULL);
+		iicbus_release_bus(parent, iicdev);
+	}
 
-	return (0);
+	sx_destroy(&priv->lock);
+	free(priv, M_IIC);
 }
 
 static int
-iicwrite(struct cdev *dev, struct uio * uio, int ioflag)
+iicuio_move(struct iic_cdevpriv *priv, struct uio *uio, int last)
 {
-	struct iic_softc *sc = dev->si_drv1;
-	device_t iicdev = sc->sc_dev;
-	int sent, error, count;
-
-	IIC_LOCK(sc);
-	if (!sc->sc_addr) {
-		IIC_UNLOCK(sc);
-		return (EINVAL);
+	device_t parent;
+	int error, num_bytes, transferred_bytes, written_bytes;
+	char buffer[128];
+
+	parent = device_get_parent(priv->sc->sc_dev);
+	error = 0;
+
+	/*
+	 * We can only transfer up to sizeof(buffer) bytes in 1 shot, so loop until
+	 * everything has been transferred.
+	*/
+	while ((error == 0) && (uio->uio_resid > 0)) {
+
+		num_bytes = MIN(uio->uio_resid, sizeof(buffer));
+		transferred_bytes = 0;
+
+		if (uio->uio_rw == UIO_WRITE) {
+			error = uiomove(buffer, num_bytes, uio);
+
+			while ((error == 0) && (transferred_bytes < num_bytes)) {
+				written_bytes = 0;
+				error = iicbus_write(parent, &buffer[transferred_bytes],
+				    num_bytes - transferred_bytes, &written_bytes, 0);
+				transferred_bytes += written_bytes;
+			}
+				
+		} else if (uio->uio_rw == UIO_READ) {
+			error = iicbus_read(parent, buffer,
+			    num_bytes, &transferred_bytes,
+			    ((uio->uio_resid <= sizeof(buffer)) ? last : 0), 0);
+			if (error == 0)
+				error = uiomove(buffer, transferred_bytes, uio);
+		}
 	}
 
-	if (sc->sc_count == 0) {
-		/* XXX: I don't think this can happen. */
-		IIC_UNLOCK(sc);
-		return (EINVAL);
-	}
+	return (error);
+}
 
-	error = iicbus_request_bus(device_get_parent(iicdev), iicdev,
-	    IIC_DONTWAIT);
-	if (error) {
-		IIC_UNLOCK(sc);
+static int
+iicuio(struct cdev *dev, struct uio *uio, int ioflag)
+{
+	device_t parent;
+	struct iic_cdevpriv *priv;
+	int error;
+	uint8_t addr;
+
+	priv = NULL;
+	error = devfs_get_cdevpriv((void**)&priv);
+
+	if (error != 0)
 		return (error);
+	KASSERT(priv != NULL, ("iic cdevpriv should not be NULL!"));
+
+	IIC_LOCK(priv);
+	if (priv->started || (priv->addr == 0)) {
+		IIC_UNLOCK(priv);
+		return (ENXIO);
 	}
+	parent = device_get_parent(priv->sc->sc_dev);
 
-	count = min(uio->uio_resid, BUFSIZE);
-	error = uiomove(sc->sc_buffer, count, uio);
-	if (error) {
-		IIC_UNLOCK(sc);
+	error = iicbus_request_bus(parent, priv->sc->sc_dev,
+	    (ioflag & O_NONBLOCK) ? IIC_DONTWAIT : (IIC_WAIT | IIC_INTR));
+	if (error != 0) {
+		IIC_UNLOCK(priv);
 		return (error);
 	}
 
-	error = iicbus_block_write(device_get_parent(iicdev), sc->sc_addr,
-					sc->sc_buffer, count, &sent);
+	if (uio->uio_rw == UIO_READ)
+		addr = priv->addr | LSB;
+	else
+		addr = priv->addr & ~LSB;
+
+	error = iicbus_start(parent, addr, 0);
+	if (error != 0)
+	{
+		iicbus_release_bus(parent, priv->sc->sc_dev);
+		IIC_UNLOCK(priv);
+		return (error);
+	}
 
-	iicbus_release_bus(device_get_parent(iicdev), iicdev);
-	IIC_UNLOCK(sc);
+	error = iicuio_move(priv, uio, IIC_LAST_READ);
 
+	iicbus_stop(parent);
+	iicbus_release_bus(parent, priv->sc->sc_dev);
+	IIC_UNLOCK(priv);
 	return (error);
 }
 
 static int
-iicread(struct cdev *dev, struct uio * uio, int ioflag)
+iicrdwr(struct iic_cdevpriv *priv, struct iic_rdwr_data *d, int flags)
 {
-	struct iic_softc *sc = dev->si_drv1;
-	device_t iicdev = sc->sc_dev;
-	int len, error = 0;
-	int bufsize;
-
-	IIC_LOCK(sc);
-	if (!sc->sc_addr) {
-		IIC_UNLOCK(sc);
-		return (EINVAL);
-	}
+	struct iic_msg *buf, *m;
+	void **usrbufs;
+	device_t iicdev, parent;
+	int error, i;
 
-	if (sc->sc_count == 0) {
-		/* XXX: I don't think this can happen. */
-		IIC_UNLOCK(sc);
-		return (EINVAL);
-	}
+	iicdev = priv->sc->sc_dev;
+	parent = device_get_parent(iicdev);
+	error = 0;
 
-	error = iicbus_request_bus(device_get_parent(iicdev), iicdev,
-	    IIC_DONTWAIT);
-	if (error) {
-		IIC_UNLOCK(sc);
-		return (error);
-	}
+	buf = malloc(sizeof(*d->msgs) * d->nmsgs, M_IIC, M_WAITOK);
 
-	/* max amount of data to read */
-	len = min(uio->uio_resid, BUFSIZE);
+	error = copyin(d->msgs, buf, sizeof(*d->msgs) * d->nmsgs);
 
-	error = iicbus_block_read(device_get_parent(iicdev), sc->sc_addr,
-	    sc->sc_inbuf, len, &bufsize);
-	if (error) {
-		IIC_UNLOCK(sc);
-		return (error);
+	/* Alloc kernel buffers for userland data, copyin write data */
+	usrbufs = malloc(sizeof(void *) * d->nmsgs, M_IIC, M_WAITOK | M_ZERO);
+
+	for (i = 0; i < d->nmsgs; i++) {
+		m = &(buf[i]);
+		usrbufs[i] = m->buf;
+
+		/*

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-stable@freebsd.org  Wed Oct 21 01:41:24 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36036A199BB;
 Wed, 21 Oct 2015 01:41:24 +0000 (UTC)
 (envelope-from bdrewery@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id C2734AF3;
 Wed, 21 Oct 2015 01:41:23 +0000 (UTC)
 (envelope-from bdrewery@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9L1fMaj069399;
 Wed, 21 Oct 2015 01:41:22 GMT (envelope-from bdrewery@FreeBSD.org)
Received: (from bdrewery@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9L1fMYH069398;
 Wed, 21 Oct 2015 01:41:22 GMT (envelope-from bdrewery@FreeBSD.org)
Message-Id: <201510210141.t9L1fMYH069398@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to
 bdrewery@FreeBSD.org using -f
From: Bryan Drewery <bdrewery@FreeBSD.org>
Date: Wed, 21 Oct 2015 01:41:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289672 - stable/10/sys/compat/linux
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 21 Oct 2015 01:41:24 -0000

Author: bdrewery
Date: Wed Oct 21 01:41:22 2015
New Revision: 289672
URL: https://svnweb.freebsd.org/changeset/base/289672

Log:
  MFC r288994:
  
    Remove redundant RFFPWAIT/vfork(2) handling in Linux fork(2) and clone(2)
    wrappers.

Modified:
  stable/10/sys/compat/linux/linux_fork.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/compat/linux/linux_fork.c
==============================================================================
--- stable/10/sys/compat/linux/linux_fork.c	Wed Oct 21 01:41:18 2015	(r289671)
+++ stable/10/sys/compat/linux/linux_fork.c	Wed Oct 21 01:41:22 2015	(r289672)
@@ -111,9 +111,8 @@ linux_vfork(struct thread *td, struct li
 		printf(ARGS(vfork, ""));
 #endif
 
-	/* Exclude RFPPWAIT */
-	if ((error = fork1(td, RFFDG | RFPROC | RFMEM | RFSTOPPED, 0, &p2,
-	    NULL, 0)) != 0)
+	if ((error = fork1(td, RFFDG | RFPROC | RFMEM | RFPPWAIT | RFSTOPPED,
+	    0, &p2, NULL, 0)) != 0)
 		return (error);
 
    	td->td_retval[0] = p2->p_pid;
@@ -122,10 +121,6 @@ linux_vfork(struct thread *td, struct li
 	if (error)
 		return (error);
 
-	PROC_LOCK(p2);
-	p2->p_flag |= P_PPWAIT;
-	PROC_UNLOCK(p2);
-
 	td2 = FIRST_THREAD_IN_PROC(p2);
 
 	/*
@@ -136,12 +131,6 @@ linux_vfork(struct thread *td, struct li
 	sched_add(td2, SRQ_BORING);
 	thread_unlock(td2);
 
-	/* wait for the children to exit, ie. emulate vfork */
-	PROC_LOCK(p2);
-	while (p2->p_flag & P_PPWAIT)
-		cv_wait(&p2->p_pwait, &p2->p_mtx);
-	PROC_UNLOCK(p2);
-
 	return (0);
 }
 
@@ -203,6 +192,9 @@ linux_clone(struct thread *td, struct li
 		if (args->parent_tidptr == NULL)
 			return (EINVAL);
 
+	if (args->flags & LINUX_CLONE_VFORK)
+		ff |= RFPPWAIT;
+
 	error = fork1(td, ff, 0, &p2, NULL, 0);
 	if (error)
 		return (error);
@@ -271,12 +263,6 @@ linux_clone(struct thread *td, struct li
 		    "stack %p sig = %d"), (int)p2->p_pid, args->stack,
 		    exit_signal);
 #endif
-	if (args->flags & LINUX_CLONE_VFORK) {
-	   	PROC_LOCK(p2);
-	   	p2->p_flag |= P_PPWAIT;
-	   	PROC_UNLOCK(p2);
-	}
-
 	/*
 	 * Make this runnable after we are finished with it.
 	 */
@@ -288,13 +274,5 @@ linux_clone(struct thread *td, struct li
 	td->td_retval[0] = p2->p_pid;
 	td->td_retval[1] = 0;
 
-	if (args->flags & LINUX_CLONE_VFORK) {
-		/* wait for the children to exit, ie. emulate vfork */
-		PROC_LOCK(p2);
-		while (p2->p_flag & P_PPWAIT)
-			cv_wait(&p2->p_pwait, &p2->p_mtx);
-		PROC_UNLOCK(p2);
-	}
-
 	return (0);
 }

From owner-svn-src-stable@freebsd.org  Wed Oct 21 01:45:20 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07FCAA19B5B;
 Wed, 21 Oct 2015 01:45:20 +0000 (UTC)
 (envelope-from bdrewery@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id ADF24E4B;
 Wed, 21 Oct 2015 01:45:19 +0000 (UTC)
 (envelope-from bdrewery@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9L1jIQA069738;
 Wed, 21 Oct 2015 01:45:18 GMT (envelope-from bdrewery@FreeBSD.org)
Received: (from bdrewery@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9L1jILm069737;
 Wed, 21 Oct 2015 01:45:18 GMT (envelope-from bdrewery@FreeBSD.org)
Message-Id: <201510210145.t9L1jILm069737@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to
 bdrewery@FreeBSD.org using -f
From: Bryan Drewery <bdrewery@FreeBSD.org>
Date: Wed, 21 Oct 2015 01:45:18 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject: svn commit: r289673 - stable/9/sys/compat/linux
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 21 Oct 2015 01:45:20 -0000

Author: bdrewery
Date: Wed Oct 21 01:45:18 2015
New Revision: 289673
URL: https://svnweb.freebsd.org/changeset/base/289673

Log:
  MFC r288994:
  
    Remove redundant RFFPWAIT/vfork(2) handling in Linux fork(2) and clone(2)
    wrappers.

Modified:
  stable/9/sys/compat/linux/linux_fork.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/compat/linux/linux_fork.c
==============================================================================
--- stable/9/sys/compat/linux/linux_fork.c	Wed Oct 21 01:41:22 2015	(r289672)
+++ stable/9/sys/compat/linux/linux_fork.c	Wed Oct 21 01:45:18 2015	(r289673)
@@ -110,9 +110,8 @@ linux_vfork(struct thread *td, struct li
 		printf(ARGS(vfork, ""));
 #endif
 
-	/* Exclude RFPPWAIT */
-	if ((error = fork1(td, RFFDG | RFPROC | RFMEM | RFSTOPPED, 0, &p2,
-	    NULL, 0)) != 0)
+	if ((error = fork1(td, RFFDG | RFPROC | RFMEM | RFPPWAIT | RFSTOPPED,
+	    0, &p2, NULL, 0)) != 0)
 		return (error);
 
    	td->td_retval[0] = p2->p_pid;
@@ -121,10 +120,6 @@ linux_vfork(struct thread *td, struct li
 	if (error)
 		return (error);
 
-	PROC_LOCK(p2);
-	p2->p_flag |= P_PPWAIT;
-	PROC_UNLOCK(p2);
-
 	td2 = FIRST_THREAD_IN_PROC(p2);
 
 	/*
@@ -135,12 +130,6 @@ linux_vfork(struct thread *td, struct li
 	sched_add(td2, SRQ_BORING);
 	thread_unlock(td2);
 
-	/* wait for the children to exit, ie. emulate vfork */
-	PROC_LOCK(p2);
-	while (p2->p_flag & P_PPWAIT)
-		cv_wait(&p2->p_pwait, &p2->p_mtx);
-	PROC_UNLOCK(p2);
-
 	return (0);
 }
 
@@ -202,6 +191,9 @@ linux_clone(struct thread *td, struct li
 		if (args->parent_tidptr == NULL)
 			return (EINVAL);
 
+	if (args->flags & LINUX_CLONE_VFORK)
+		ff |= RFPPWAIT;
+
 	error = fork1(td, ff, 0, &p2, NULL, 0);
 	if (error)
 		return (error);
@@ -270,12 +262,6 @@ linux_clone(struct thread *td, struct li
 		    "stack %p sig = %d"), (int)p2->p_pid, args->stack,
 		    exit_signal);
 #endif
-	if (args->flags & LINUX_CLONE_VFORK) {
-	   	PROC_LOCK(p2);
-	   	p2->p_flag |= P_PPWAIT;
-	   	PROC_UNLOCK(p2);
-	}
-
 	/*
 	 * Make this runnable after we are finished with it.
 	 */
@@ -287,13 +273,5 @@ linux_clone(struct thread *td, struct li
 	td->td_retval[0] = p2->p_pid;
 	td->td_retval[1] = 0;
 
-	if (args->flags & LINUX_CLONE_VFORK) {
-		/* wait for the children to exit, ie. emulate vfork */
-		PROC_LOCK(p2);
-		while (p2->p_flag & P_PPWAIT)
-			cv_wait(&p2->p_pwait, &p2->p_mtx);
-		PROC_UNLOCK(p2);
-	}
-
 	return (0);
 }

From owner-svn-src-stable@freebsd.org  Wed Oct 21 15:32:22 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE31AA1BF24;
 Wed, 21 Oct 2015 15:32:22 +0000 (UTC) (envelope-from kp@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 95CCE11D6;
 Wed, 21 Oct 2015 15:32:22 +0000 (UTC) (envelope-from kp@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9LFWLob011448;
 Wed, 21 Oct 2015 15:32:21 GMT (envelope-from kp@FreeBSD.org)
Received: (from kp@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LFWLgY011444;
 Wed, 21 Oct 2015 15:32:21 GMT (envelope-from kp@FreeBSD.org)
Message-Id: <201510211532.t9LFWLgY011444@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org
 using -f
From: Kristof Provost <kp@FreeBSD.org>
Date: Wed, 21 Oct 2015 15:32:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289703 - in stable/10/sys: net netpfil/pf
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 21 Oct 2015 15:32:23 -0000

Author: kp
Date: Wed Oct 21 15:32:21 2015
New Revision: 289703
URL: https://svnweb.freebsd.org/changeset/base/289703

Log:
  MFC r289316:
  
  pf: Fix TSO issues
  
  In certain configurations (mostly but not exclusively as a VM on Xen) pf
  produced packets with an invalid TCP checksum.
  
  The problem was that pf could only handle packets with a full checksum. The
  FreeBSD IP stack produces TCP packets with a pseudo-header checksum (only
  addresses, length and protocol).
  Certain network interfaces expect to see the pseudo-header checksum, so they
  end up producing packets with invalid checksums.
  
  To fix this stop calculating the full checksum and teach pf to only update TCP
  checksums if TSO is disabled or the change affects the pseudo-header checksum.
  
  PR:             154428, 193579, 198868
  Relnotes:       yes
  Sponsored by:   RootBSD

Modified:
  stable/10/sys/net/pfvar.h
  stable/10/sys/netpfil/pf/pf.c
  stable/10/sys/netpfil/pf/pf_ioctl.c
  stable/10/sys/netpfil/pf/pf_norm.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/net/pfvar.h
==============================================================================
--- stable/10/sys/net/pfvar.h	Wed Oct 21 15:31:26 2015	(r289702)
+++ stable/10/sys/net/pfvar.h	Wed Oct 21 15:32:21 2015	(r289703)
@@ -1554,6 +1554,8 @@ extern void			 pf_print_state(struct pf_
 extern void			 pf_print_flags(u_int8_t);
 extern u_int16_t		 pf_cksum_fixup(u_int16_t, u_int16_t, u_int16_t,
 				    u_int8_t);
+extern u_int16_t		 pf_proto_cksum_fixup(struct mbuf *, u_int16_t,
+				    u_int16_t, u_int16_t, u_int8_t);
 
 VNET_DECLARE(struct ifnet *,		 sync_ifp);
 #define	V_sync_ifp		 	 VNET(sync_ifp);
@@ -1583,6 +1585,9 @@ u_int32_t	pf_new_isn(struct pf_state *);
 void   *pf_pull_hdr(struct mbuf *, int, void *, int, u_short *, u_short *,
 	    sa_family_t);
 void	pf_change_a(void *, u_int16_t *, u_int32_t, u_int8_t);
+void	pf_change_proto_a(struct mbuf *, void *, u_int16_t *, u_int32_t,
+	    u_int8_t);
+void	pf_change_tcp_a(struct mbuf *, void *, u_int16_t *, u_int32_t);
 void	pf_send_deferred_syn(struct pf_state *);
 int	pf_match_addr(u_int8_t, struct pf_addr *, struct pf_addr *,
 	    struct pf_addr *, sa_family_t);

Modified: stable/10/sys/netpfil/pf/pf.c
==============================================================================
--- stable/10/sys/netpfil/pf/pf.c	Wed Oct 21 15:31:26 2015	(r289702)
+++ stable/10/sys/netpfil/pf/pf.c	Wed Oct 21 15:32:21 2015	(r289703)
@@ -203,7 +203,7 @@ static void		 pf_init_threshold(struct p
 static void		 pf_add_threshold(struct pf_threshold *);
 static int		 pf_check_threshold(struct pf_threshold *);
 
-static void		 pf_change_ap(struct pf_addr *, u_int16_t *,
+static void		 pf_change_ap(struct mbuf *, struct pf_addr *, u_int16_t *,
 			    u_int16_t *, u_int16_t *, struct pf_addr *,
 			    u_int16_t, u_int8_t, sa_family_t);
 static int		 pf_modulate_sack(struct mbuf *, int, struct pf_pdesc *,
@@ -1989,6 +1989,22 @@ pf_addr_wrap_neq(struct pf_addr_wrap *aw
 	}
 }
 
+/**
+ * Checksum updates are a little complicated because the checksum in the TCP/UDP
+ * header isn't always a full checksum. In some cases (i.e. output) it's a
+ * pseudo-header checksum, which is a partial checksum over src/dst IP
+ * addresses, protocol number and length.
+ *
+ * That means we have the following cases:
+ *  * Input or forwarding: we don't have TSO, the checksum fields are full
+ *  	checksums, we need to update the checksum whenever we change anything.
+ *  * Output (i.e. the checksum is a pseudo-header checksum):
+ *  	x The field being updated is src/dst address or affects the length of
+ *  	the packet. We need to update the pseudo-header checksum (note that this
+ *  	checksum is not ones' complement).
+ *  	x Some other field is being modified (e.g. src/dst port numbers): We
+ *  	don't have to update anything.
+ **/
 u_int16_t
 pf_cksum_fixup(u_int16_t cksum, u_int16_t old, u_int16_t new, u_int8_t udp)
 {
@@ -2004,9 +2020,20 @@ pf_cksum_fixup(u_int16_t cksum, u_int16_
 	return (l);
 }
 
+u_int16_t
+pf_proto_cksum_fixup(struct mbuf *m, u_int16_t cksum, u_int16_t old,
+        u_int16_t new, u_int8_t udp)
+{
+	if (m->m_pkthdr.csum_flags & (CSUM_DELAY_DATA | CSUM_DELAY_DATA_IPV6))
+		return (cksum);
+
+	return (pf_cksum_fixup(cksum, old, new, udp));
+}
+
 static void
-pf_change_ap(struct pf_addr *a, u_int16_t *p, u_int16_t *ic, u_int16_t *pc,
-    struct pf_addr *an, u_int16_t pn, u_int8_t u, sa_family_t af)
+pf_change_ap(struct mbuf *m, struct pf_addr *a, u_int16_t *p, u_int16_t *ic,
+        u_int16_t *pc, struct pf_addr *an, u_int16_t pn, u_int8_t u,
+        sa_family_t af)
 {
 	struct pf_addr	ao;
 	u_int16_t	po = *p;
@@ -2014,6 +2041,9 @@ pf_change_ap(struct pf_addr *a, u_int16_
 	PF_ACPY(&ao, a, af);
 	PF_ACPY(a, an, af);
 
+	if (m->m_pkthdr.csum_flags & (CSUM_DELAY_DATA | CSUM_DELAY_DATA_IPV6))
+		*pc = ~*pc;
+
 	*p = pn;
 
 	switch (af) {
@@ -2023,17 +2053,19 @@ pf_change_ap(struct pf_addr *a, u_int16_
 		    ao.addr16[0], an->addr16[0], 0),
 		    ao.addr16[1], an->addr16[1], 0);
 		*p = pn;
-		*pc = pf_cksum_fixup(pf_cksum_fixup(pf_cksum_fixup(*pc,
+
+		*pc = pf_cksum_fixup(pf_cksum_fixup(*pc,
 		    ao.addr16[0], an->addr16[0], u),
-		    ao.addr16[1], an->addr16[1], u),
-		    po, pn, u);
+		    ao.addr16[1], an->addr16[1], u);
+
+		*pc = pf_proto_cksum_fixup(m, *pc, po, pn, u);
 		break;
 #endif /* INET */
 #ifdef INET6
 	case AF_INET6:
 		*pc = pf_cksum_fixup(pf_cksum_fixup(pf_cksum_fixup(
 		    pf_cksum_fixup(pf_cksum_fixup(pf_cksum_fixup(
-		    pf_cksum_fixup(pf_cksum_fixup(pf_cksum_fixup(*pc,
+		    pf_cksum_fixup(pf_cksum_fixup(*pc,
 		    ao.addr16[0], an->addr16[0], u),
 		    ao.addr16[1], an->addr16[1], u),
 		    ao.addr16[2], an->addr16[2], u),
@@ -2041,13 +2073,20 @@ pf_change_ap(struct pf_addr *a, u_int16_
 		    ao.addr16[4], an->addr16[4], u),
 		    ao.addr16[5], an->addr16[5], u),
 		    ao.addr16[6], an->addr16[6], u),
-		    ao.addr16[7], an->addr16[7], u),
-		    po, pn, u);
+		    ao.addr16[7], an->addr16[7], u);
+
+		*pc = pf_proto_cksum_fixup(m, *pc, po, pn, u);
 		break;
 #endif /* INET6 */
 	}
-}
 
+	if (m->m_pkthdr.csum_flags & (CSUM_DELAY_DATA | 
+	    CSUM_DELAY_DATA_IPV6)) {
+		*pc = ~*pc;
+		if (! *pc)
+			*pc = 0xffff;
+	}
+}
 
 /* Changes a u_int32_t.  Uses a void * so there are no align restrictions */
 void
@@ -2061,6 +2100,19 @@ pf_change_a(void *a, u_int16_t *c, u_int
 	    ao % 65536, an % 65536, u);
 }
 
+void
+pf_change_proto_a(struct mbuf *m, void *a, u_int16_t *c, u_int32_t an, u_int8_t udp)
+{
+	u_int32_t	ao;
+
+	memcpy(&ao, a, sizeof(ao));
+	memcpy(a, &an, sizeof(u_int32_t));
+
+	*c = pf_proto_cksum_fixup(m,
+	    pf_proto_cksum_fixup(m, *c, ao / 65536, an / 65536, udp),
+	    ao % 65536, an % 65536, udp);
+}
+
 #ifdef INET6
 static void
 pf_change_a6(struct pf_addr *a, u_int16_t *c, struct pf_addr *an, u_int8_t u)
@@ -2206,12 +2258,10 @@ pf_modulate_sack(struct mbuf *m, int off
 				for (i = 2; i + TCPOLEN_SACK <= olen;
 				    i += TCPOLEN_SACK) {
 					memcpy(&sack, &opt[i], sizeof(sack));
-					pf_change_a(&sack.start, &th->th_sum,
-					    htonl(ntohl(sack.start) -
-					    dst->seqdiff), 0);
-					pf_change_a(&sack.end, &th->th_sum,
-					    htonl(ntohl(sack.end) -
-					    dst->seqdiff), 0);
+					pf_change_proto_a(m, &sack.start, &th->th_sum,
+					    htonl(ntohl(sack.start) - dst->seqdiff), 0);
+					pf_change_proto_a(m, &sack.end, &th->th_sum,
+					    htonl(ntohl(sack.end) - dst->seqdiff), 0);
 					memcpy(&opt[i], &sack, sizeof(sack));
 				}
 				copyback = 1;
@@ -3115,7 +3165,7 @@ pf_test_rule(struct pf_rule **rm, struct
 
 			if (PF_ANEQ(saddr, &nk->addr[pd->sidx], af) ||
 			    nk->port[pd->sidx] != sport) {
-				pf_change_ap(saddr, &th->th_sport, pd->ip_sum,
+				pf_change_ap(m, saddr, &th->th_sport, pd->ip_sum,
 				    &th->th_sum, &nk->addr[pd->sidx],
 				    nk->port[pd->sidx], 0, af);
 				pd->sport = &th->th_sport;
@@ -3124,7 +3174,7 @@ pf_test_rule(struct pf_rule **rm, struct
 
 			if (PF_ANEQ(daddr, &nk->addr[pd->didx], af) ||
 			    nk->port[pd->didx] != dport) {
-				pf_change_ap(daddr, &th->th_dport, pd->ip_sum,
+				pf_change_ap(m, daddr, &th->th_dport, pd->ip_sum,
 				    &th->th_sum, &nk->addr[pd->didx],
 				    nk->port[pd->didx], 0, af);
 				dport = th->th_dport;
@@ -3138,7 +3188,7 @@ pf_test_rule(struct pf_rule **rm, struct
 
 			if (PF_ANEQ(saddr, &nk->addr[pd->sidx], af) ||
 			    nk->port[pd->sidx] != sport) {
-				pf_change_ap(saddr, &pd->hdr.udp->uh_sport,
+				pf_change_ap(m, saddr, &pd->hdr.udp->uh_sport,
 				    pd->ip_sum, &pd->hdr.udp->uh_sum,
 				    &nk->addr[pd->sidx],
 				    nk->port[pd->sidx], 1, af);
@@ -3148,7 +3198,7 @@ pf_test_rule(struct pf_rule **rm, struct
 
 			if (PF_ANEQ(daddr, &nk->addr[pd->didx], af) ||
 			    nk->port[pd->didx] != dport) {
-				pf_change_ap(daddr, &pd->hdr.udp->uh_dport,
+				pf_change_ap(m, daddr, &pd->hdr.udp->uh_dport,
 				    pd->ip_sum, &pd->hdr.udp->uh_sum,
 				    &nk->addr[pd->didx],
 				    nk->port[pd->didx], 1, af);
@@ -3500,7 +3550,7 @@ pf_create_state(struct pf_rule *r, struc
 			if ((s->src.seqdiff = pf_tcp_iss(pd) - s->src.seqlo) ==
 			    0)
 				s->src.seqdiff = 1;
-			pf_change_a(&th->th_seq, &th->th_sum,
+			pf_change_proto_a(m, &th->th_seq, &th->th_sum,
 			    htonl(s->src.seqlo + s->src.seqdiff), 0);
 			*rewrite = 1;
 		} else
@@ -3824,9 +3874,9 @@ pf_tcp_track_full(struct pf_state_peer *
 			while ((src->seqdiff = arc4random() - seq) == 0)
 				;
 			ack = ntohl(th->th_ack) - dst->seqdiff;
-			pf_change_a(&th->th_seq, &th->th_sum, htonl(seq +
+			pf_change_proto_a(m, &th->th_seq, &th->th_sum, htonl(seq +
 			    src->seqdiff), 0);
-			pf_change_a(&th->th_ack, &th->th_sum, htonl(ack), 0);
+			pf_change_proto_a(m, &th->th_ack, &th->th_sum, htonl(ack), 0);
 			*copyback = 1;
 		} else {
 			ack = ntohl(th->th_ack);
@@ -3876,9 +3926,9 @@ pf_tcp_track_full(struct pf_state_peer *
 		ack = ntohl(th->th_ack) - dst->seqdiff;
 		if (src->seqdiff) {
 			/* Modulate sequence numbers */
-			pf_change_a(&th->th_seq, &th->th_sum, htonl(seq +
+			pf_change_proto_a(m, &th->th_seq, &th->th_sum, htonl(seq +
 			    src->seqdiff), 0);
-			pf_change_a(&th->th_ack, &th->th_sum, htonl(ack), 0);
+			pf_change_proto_a(m, &th->th_ack, &th->th_sum, htonl(ack), 0);
 			*copyback = 1;
 		}
 		end = seq + pd->p_len;
@@ -4332,14 +4382,14 @@ pf_test_state_tcp(struct pf_state **stat
 
 		if (PF_ANEQ(pd->src, &nk->addr[pd->sidx], pd->af) ||
 		    nk->port[pd->sidx] != th->th_sport)
-			pf_change_ap(pd->src, &th->th_sport, pd->ip_sum,
-			    &th->th_sum, &nk->addr[pd->sidx],
+			pf_change_ap(m, pd->src, &th->th_sport,
+			    pd->ip_sum, &th->th_sum, &nk->addr[pd->sidx],
 			    nk->port[pd->sidx], 0, pd->af);
 
 		if (PF_ANEQ(pd->dst, &nk->addr[pd->didx], pd->af) ||
 		    nk->port[pd->didx] != th->th_dport)
-			pf_change_ap(pd->dst, &th->th_dport, pd->ip_sum,
-			    &th->th_sum, &nk->addr[pd->didx],
+			pf_change_ap(m, pd->dst, &th->th_dport,
+			    pd->ip_sum, &th->th_sum, &nk->addr[pd->didx],
 			    nk->port[pd->didx], 0, pd->af);
 		copyback = 1;
 	}
@@ -4403,13 +4453,13 @@ pf_test_state_udp(struct pf_state **stat
 
 		if (PF_ANEQ(pd->src, &nk->addr[pd->sidx], pd->af) ||
 		    nk->port[pd->sidx] != uh->uh_sport)
-			pf_change_ap(pd->src, &uh->uh_sport, pd->ip_sum,
+			pf_change_ap(m, pd->src, &uh->uh_sport, pd->ip_sum,
 			    &uh->uh_sum, &nk->addr[pd->sidx],
 			    nk->port[pd->sidx], 1, pd->af);
 
 		if (PF_ANEQ(pd->dst, &nk->addr[pd->didx], pd->af) ||
 		    nk->port[pd->didx] != uh->uh_dport)
-			pf_change_ap(pd->dst, &uh->uh_dport, pd->ip_sum,
+			pf_change_ap(m, pd->dst, &uh->uh_dport, pd->ip_sum,
 			    &uh->uh_sum, &nk->addr[pd->didx],
 			    nk->port[pd->didx], 1, pd->af);
 		m_copyback(m, off, sizeof(*uh), (caddr_t)uh);

Modified: stable/10/sys/netpfil/pf/pf_ioctl.c
==============================================================================
--- stable/10/sys/netpfil/pf/pf_ioctl.c	Wed Oct 21 15:31:26 2015	(r289702)
+++ stable/10/sys/netpfil/pf/pf_ioctl.c	Wed Oct 21 15:32:21 2015	(r289703)
@@ -3560,12 +3560,6 @@ pf_check_out(void *arg, struct mbuf **m,
 {
 	int chk;
 
-	/* We need a proper CSUM befor we start (s. OpenBSD ip_output) */
-	if ((*m)->m_pkthdr.csum_flags & CSUM_DELAY_DATA) {
-		in_delayed_cksum(*m);
-		(*m)->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA;
-	}
-
 	chk = pf_test(PF_OUT, ifp, m, inp);
 	if (chk && *m) {
 		m_freem(*m);
@@ -3604,13 +3598,6 @@ pf_check6_out(void *arg, struct mbuf **m
 {
 	int chk;
 
-	/* We need a proper CSUM before we start (s. OpenBSD ip_output) */
-	if ((*m)->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) {
-		in6_delayed_cksum(*m,
-		    (*m)->m_pkthdr.len - sizeof(struct ip6_hdr),
-		    sizeof(struct ip6_hdr));
-		(*m)->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6;
-	}
 	CURVNET_SET(ifp->if_vnet);
 	chk = pf_test6(PF_OUT, ifp, m, inp);
 	CURVNET_RESTORE();

Modified: stable/10/sys/netpfil/pf/pf_norm.c
==============================================================================
--- stable/10/sys/netpfil/pf/pf_norm.c	Wed Oct 21 15:31:26 2015	(r289702)
+++ stable/10/sys/netpfil/pf/pf_norm.c	Wed Oct 21 15:32:21 2015	(r289703)
@@ -1680,13 +1680,14 @@ pf_normalize_tcp(int dir, struct pfi_kif
 		th->th_x2 = 0;
 		nv = *(u_int16_t *)(&th->th_ack + 1);
 
-		th->th_sum = pf_cksum_fixup(th->th_sum, ov, nv, 0);
+		th->th_sum = pf_proto_cksum_fixup(m, th->th_sum, ov, nv, 0);
 		rewrite = 1;
 	}
 
 	/* Remove urgent pointer, if TH_URG is not set */
 	if (!(flags & TH_URG) && th->th_urp) {
-		th->th_sum = pf_cksum_fixup(th->th_sum, th->th_urp, 0, 0);
+		th->th_sum = pf_proto_cksum_fixup(m, th->th_sum, th->th_urp,
+		    0, 0);
 		th->th_urp = 0;
 		rewrite = 1;
 	}
@@ -1887,7 +1888,7 @@ pf_normalize_tcp_stateful(struct mbuf *m
 					    (src->scrub->pfss_flags &
 					    PFSS_TIMESTAMP)) {
 						tsval = ntohl(tsval);
-						pf_change_a(&opt[2],
+						pf_change_proto_a(m, &opt[2],
 						    &th->th_sum,
 						    htonl(tsval +
 						    src->scrub->pfss_ts_mod),
@@ -1903,7 +1904,7 @@ pf_normalize_tcp_stateful(struct mbuf *m
 					    PFSS_TIMESTAMP)) {
 						tsecr = ntohl(tsecr)
 						    - dst->scrub->pfss_ts_mod;
-						pf_change_a(&opt[6],
+						pf_change_proto_a(m, &opt[6],
 						    &th->th_sum, htonl(tsecr),
 						    0);
 						copyback = 1;
@@ -2230,8 +2231,8 @@ pf_normalize_tcpopt(struct pf_rule *r, s
 		case TCPOPT_MAXSEG:
 			mss = (u_int16_t *)(optp + 2);
 			if ((ntohs(*mss)) > r->max_mss) {
-				th->th_sum = pf_cksum_fixup(th->th_sum,
-				    *mss, htons(r->max_mss), 0);
+				th->th_sum = pf_proto_cksum_fixup(m,
+				    th->th_sum, *mss, htons(r->max_mss), 0);
 				*mss = htons(r->max_mss);
 				rewrite = 1;
 			}

From owner-svn-src-stable@freebsd.org  Thu Oct 22 06:32:35 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E610A1C6EB;
 Thu, 22 Oct 2015 06:32:35 +0000 (UTC)
 (envelope-from bapt@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 07BD315C9;
 Thu, 22 Oct 2015 06:32:34 +0000 (UTC)
 (envelope-from bapt@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9M6WYOs076203;
 Thu, 22 Oct 2015 06:32:34 GMT (envelope-from bapt@FreeBSD.org)
Received: (from bapt@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9M6WYOt076202;
 Thu, 22 Oct 2015 06:32:34 GMT (envelope-from bapt@FreeBSD.org)
Message-Id: <201510220632.t9M6WYOt076202@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bapt set sender to
 bapt@FreeBSD.org using -f
From: Baptiste Daroussin <bapt@FreeBSD.org>
Date: Thu, 22 Oct 2015 06:32:34 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289740 - stable/10/usr.bin/getconf
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 22 Oct 2015 06:32:35 -0000

Author: bapt
Date: Thu Oct 22 06:32:33 2015
New Revision: 289740
URL: https://svnweb.freebsd.org/changeset/base/289740

Log:
  getconf(1): Fix typo. _POSIX_V6_LP64_OFFBIG -> _POSIX_V6_LPBIG_OFFBIG.
  
  Submitted by:	Sascha Wildner <saw@online.de>
  Obtained from:	DragonflyBSD

Modified:
  stable/10/usr.bin/getconf/sysconf.gperf
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/getconf/sysconf.gperf
==============================================================================
--- stable/10/usr.bin/getconf/sysconf.gperf	Thu Oct 22 05:32:45 2015	(r289739)
+++ stable/10/usr.bin/getconf/sysconf.gperf	Thu Oct 22 06:32:33 2015	(r289740)
@@ -121,7 +121,7 @@ _POSIX_VERSION, _SC_VERSION
 _POSIX_V6_ILP32_OFF32, _SC_V6_ILP32_OFF32
 _POSIX_V6_ILP32_OFFBIG, _SC_V6_ILP32_OFFBIG
 _POSIX_V6_LP64_OFF64, _SC_V6_LP64_OFF64
-_POSIX_V6_LP64_OFFBIG, _SC_V6_LP64_OFFBIG
+_POSIX_V6_LPBIG_OFFBIG, _SC_V6_LPBIG_OFFBIG
 _XOPEN_CRYPT, _SC_XOPEN_CRYPT
 _XOPEN_ENH_I18N, _SC_XOPEN_ENH_I18N
 _XOPEN_LEGACY, _SC_XOPEN_LEGACY

From owner-svn-src-stable@freebsd.org  Fri Oct 23 01:27:46 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id EAA18A1C1CE;
 Fri, 23 Oct 2015 01:27:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id AAB9C3E9;
 Fri, 23 Oct 2015 01:27:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N1Rj7x048156;
 Fri, 23 Oct 2015 01:27:45 GMT (envelope-from jhb@FreeBSD.org)
Received: (from jhb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N1Ri6h048146;
 Fri, 23 Oct 2015 01:27:44 GMT (envelope-from jhb@FreeBSD.org)
Message-Id: <201510230127.t9N1Ri6h048146@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org
 using -f
From: John Baldwin <jhb@FreeBSD.org>
Date: Fri, 23 Oct 2015 01:27:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289780 - in stable: 10/lib/libc/sys 10/sys/kern
 10/sys/sys 10/tests/sys/kern 9/lib/libc/sys 9/sys/kern 9/sys/sys
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Oct 2015 01:27:47 -0000

Author: jhb
Date: Fri Oct 23 01:27:44 2015
New Revision: 289780
URL: https://svnweb.freebsd.org/changeset/base/289780

Log:
  MFC 287386,288949,288993:
  Export current system call code and argument count for system call entry
  and exit events.  To preserve the ABI, the new fields are moved to the
  end of struct thread in these branches (unlike HEAD) and explicitly copied
  when new threads are created.  In addition, the new tests are only added
  in 10.
  
  r287386:
  Export current system call code and argument count for system call entry
  and exit events. procfs stop events for system call tracing report these
  values (argument count for system call entry and code for system call exit),
  but ptrace() does not provide this information. (Note that while the system
  call code can be determined in an ABI-specific manner during system call
  entry, it is not generally available during system call exit.)
  
  The values are exported via new fields at the end of struct ptrace_lwpinfo
  available via PT_LWPINFO.
  
  r288949:
  Fix various edge cases related to system call tracing.
  - Always set td_dbg_sc_* when P_TRACED is set on system call entry
    even if the debugger is not tracing system call entries.  This
    ensures the fields are valid when reporting other stops that
    occur at system call boundaries such as for PT_FOLLOW_FORKS or
    when only tracing system call exits.
  - Set TDB_SCX when reporting the stop for a new child process in
    fork_return().  This causes the event to be reported as a system
    call exit.
  - Report a system call exit event in fork_return() for new threads in
    a traced process.
  - Copy td_dbg_sc_* to new threads instead of zeroing.  This ensures
    that td_dbg_sc_code in particular will report the system call that
    created the new thread or process when it reports a system call
    exit event in fork_return().
  - Add new ptrace tests to verify that new child processes and threads
    report system call exit events with a valid pl_syscall_code via
    PT_LWPINFO.
  
  r288993:
  Document the recently added pl_syscall_* fields in struct ptrace_lwpinfo.

Modified:
  stable/10/lib/libc/sys/ptrace.2
  stable/10/sys/kern/kern_fork.c
  stable/10/sys/kern/kern_thr.c
  stable/10/sys/kern/subr_syscall.c
  stable/10/sys/kern/sys_process.c
  stable/10/sys/sys/proc.h
  stable/10/sys/sys/ptrace.h
  stable/10/tests/sys/kern/Makefile
  stable/10/tests/sys/kern/ptrace_test.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/9/lib/libc/sys/ptrace.2
  stable/9/sys/kern/kern_fork.c
  stable/9/sys/kern/kern_thr.c
  stable/9/sys/kern/subr_syscall.c
  stable/9/sys/kern/sys_process.c
  stable/9/sys/sys/proc.h
  stable/9/sys/sys/ptrace.h
Directory Properties:
  stable/9/lib/libc/   (props changed)
  stable/9/lib/libc/sys/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/sys/sys/   (props changed)

Modified: stable/10/lib/libc/sys/ptrace.2
==============================================================================
--- stable/10/lib/libc/sys/ptrace.2	Fri Oct 23 00:48:00 2015	(r289779)
+++ stable/10/lib/libc/sys/ptrace.2	Fri Oct 23 01:27:44 2015	(r289780)
@@ -2,7 +2,7 @@
 .\"	$NetBSD: ptrace.2,v 1.2 1995/02/27 12:35:37 cgd Exp $
 .\"
 .\" This file is in the public domain.
-.Dd July 3, 2015
+.Dd October 6, 2015
 .Dt PTRACE 2
 .Os
 .Sh NAME
@@ -307,6 +307,8 @@ struct ptrace_lwpinfo {
 	siginfo_t pl_siginfo;
 	char	pl_tdname[MAXCOMLEN + 1];
 	int	pl_child_pid;
+	u_int	pl_syscall_code;
+	u_int	pl_syscall_narg;
 };
 .Ed
 .Pp
@@ -395,6 +397,27 @@ stop when
 .Dv PL_FLAG_FORKED
 is set in
 .Va pl_flags .
+.It pl_syscall_code
+The ABI-specific identifier of the current system call.
+Note that for indirect system calls this field reports the indirected
+system call.
+Only valid when
+.Dv PL_FLAG_SCE
+or
+.Dv PL_FLAG_SCX
+is set in
+.Va pl_flags.
+.It pl_syscall_narg
+The number of arguments passed to the current system call not counting
+the system call identifier.
+Note that for indirect system calls this field reports the arguments
+passed to the indirected system call.
+Only valid when
+.Dv PL_FLAG_SCE
+or
+.Dv PL_FLAG_SCX
+is set in
+.Va pl_flags.
 .El
 .It PT_GETNUMLWPS
 This request returns the number of kernel threads associated with the

Modified: stable/10/sys/kern/kern_fork.c
==============================================================================
--- stable/10/sys/kern/kern_fork.c	Fri Oct 23 00:48:00 2015	(r289779)
+++ stable/10/sys/kern/kern_fork.c	Fri Oct 23 01:27:44 2015	(r289780)
@@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/proc.h>
 #include <sys/procdesc.h>
 #include <sys/pioctl.h>
+#include <sys/ptrace.h>
 #include <sys/racct.h>
 #include <sys/resourcevar.h>
 #include <sys/sched.h>
@@ -478,6 +479,8 @@ do_fork(struct thread *td, int flags, st
 	td2->td_sigstk = td->td_sigstk;
 	td2->td_flags = TDF_INMEM;
 	td2->td_lend_user_pri = PRI_MAX;
+	td2->td_dbg_sc_code = td->td_dbg_sc_code;
+	td2->td_dbg_sc_narg = td->td_dbg_sc_narg;
 
 #ifdef VIMAGE
 	td2->td_vnet = NULL;
@@ -1049,8 +1052,8 @@ fork_return(struct thread *td, struct tr
 {
 	struct proc *p, *dbg;
 
+	p = td->td_proc;
 	if (td->td_dbgflags & TDB_STOPATFORK) {
-		p = td->td_proc;
 		sx_xlock(&proctree_lock);
 		PROC_LOCK(p);
 		if ((p->p_pptr->p_flag & (P_TRACED | P_FOLLOWFORK)) ==
@@ -1067,9 +1070,9 @@ fork_return(struct thread *td, struct tr
 			    p->p_pid, p->p_oppid);
 			proc_reparent(p, dbg);
 			sx_xunlock(&proctree_lock);
-			td->td_dbgflags |= TDB_CHILD;
+			td->td_dbgflags |= TDB_CHILD | TDB_SCX;
 			ptracestop(td, SIGSTOP);
-			td->td_dbgflags &= ~TDB_CHILD;
+			td->td_dbgflags &= ~(TDB_CHILD | TDB_SCX);
 		} else {
 			/*
 			 * ... otherwise clear the request.
@@ -1079,6 +1082,18 @@ fork_return(struct thread *td, struct tr
 			cv_broadcast(&p->p_dbgwait);
 		}
 		PROC_UNLOCK(p);
+	} else if (p->p_flag & P_TRACED) {
+ 		/*
+		 * This is the start of a new thread in a traced
+		 * process.  Report a system call exit event.
+		 */
+		PROC_LOCK(p);
+		td->td_dbgflags |= TDB_SCX;
+		_STOPEVENT(p, S_SCX, td->td_dbg_sc_code);
+		if ((p->p_stops & S_PT_SCX) != 0)
+			ptracestop(td, SIGTRAP);
+		td->td_dbgflags &= ~TDB_SCX;
+		PROC_UNLOCK(p);
 	}
 
 	userret(td, frame);

Modified: stable/10/sys/kern/kern_thr.c
==============================================================================
--- stable/10/sys/kern/kern_thr.c	Fri Oct 23 00:48:00 2015	(r289779)
+++ stable/10/sys/kern/kern_thr.c	Fri Oct 23 01:27:44 2015	(r289780)
@@ -240,6 +240,8 @@ thread_create(struct thread *td, struct 
 	    __rangeof(struct thread, td_startcopy, td_endcopy));
 	newtd->td_proc = td->td_proc;
 	newtd->td_ucred = crhold(td->td_ucred);
+	newtd->td_dbg_sc_code = td->td_dbg_sc_code;
+	newtd->td_dbg_sc_narg = td->td_dbg_sc_narg;
 
 	error = initialize_thread(newtd, thunk);
 	if (error != 0) {

Modified: stable/10/sys/kern/subr_syscall.c
==============================================================================
--- stable/10/sys/kern/subr_syscall.c	Fri Oct 23 00:48:00 2015	(r289779)
+++ stable/10/sys/kern/subr_syscall.c	Fri Oct 23 01:27:44 2015	(r289780)
@@ -84,9 +84,12 @@ syscallenter(struct thread *td, struct s
 	if (error == 0) {
 
 		STOPEVENT(p, S_SCE, sa->narg);
-		if (p->p_flag & P_TRACED && p->p_stops & S_PT_SCE) {
+		if (p->p_flag & P_TRACED) {
 			PROC_LOCK(p);
-			ptracestop((td), SIGTRAP);
+			td->td_dbg_sc_code = sa->code;
+			td->td_dbg_sc_narg = sa->narg;
+			if (p->p_stops & S_PT_SCE)
+				ptracestop((td), SIGTRAP);
 			PROC_UNLOCK(p);
 		}
 		if (td->td_dbgflags & TDB_USERWR) {
@@ -95,6 +98,10 @@ syscallenter(struct thread *td, struct s
 			 * debugger modified registers or memory.
 			 */
 			error = (p->p_sysent->sv_fetch_syscall_args)(td, sa);
+			PROC_LOCK(p);
+			td->td_dbg_sc_code = sa->code;
+			td->td_dbg_sc_narg = sa->narg;
+			PROC_UNLOCK(p);
 #ifdef KTRACE
 			if (KTRPOINT(td, KTR_SYSCALL))
 				ktrsyscall(sa->code, sa->narg, sa->args);

Modified: stable/10/sys/kern/sys_process.c
==============================================================================
--- stable/10/sys/kern/sys_process.c	Fri Oct 23 00:48:00 2015	(r289779)
+++ stable/10/sys/kern/sys_process.c	Fri Oct 23 01:27:44 2015	(r289780)
@@ -96,6 +96,8 @@ struct ptrace_lwpinfo32 {
 	struct siginfo32 pl_siginfo;	/* siginfo for signal */
 	char	pl_tdname[MAXCOMLEN + 1];	/* LWP name. */
 	int	pl_child_pid;		/* New child pid */
+	u_int		pl_syscall_code;
+	u_int		pl_syscall_narg;
 };
 
 #endif
@@ -480,6 +482,8 @@ ptrace_lwpinfo_to32(const struct ptrace_
 	siginfo_to_siginfo32(&pl->pl_siginfo, &pl32->pl_siginfo);
 	strcpy(pl32->pl_tdname, pl->pl_tdname);
 	pl32->pl_child_pid = pl->pl_child_pid;
+	pl32->pl_syscall_code = pl->pl_syscall_code;
+	pl32->pl_syscall_narg = pl->pl_syscall_narg;
 }
 #endif /* COMPAT_FREEBSD32 */
 
@@ -1210,6 +1214,13 @@ kern_ptrace(struct thread *td, int req, 
 		pl->pl_sigmask = td2->td_sigmask;
 		pl->pl_siglist = td2->td_siglist;
 		strcpy(pl->pl_tdname, td2->td_name);
+		if ((td2->td_dbgflags & (TDB_SCE | TDB_SCX)) != 0) {
+			pl->pl_syscall_code = td2->td_dbg_sc_code;
+			pl->pl_syscall_narg = td2->td_dbg_sc_narg;
+		} else {
+			pl->pl_syscall_code = 0;
+			pl->pl_syscall_narg = 0;
+		}
 #ifdef COMPAT_FREEBSD32
 		if (wrap32)
 			ptrace_lwpinfo_to32(pl, pl32);

Modified: stable/10/sys/sys/proc.h
==============================================================================
--- stable/10/sys/sys/proc.h	Fri Oct 23 00:48:00 2015	(r289779)
+++ stable/10/sys/sys/proc.h	Fri Oct 23 01:27:44 2015	(r289780)
@@ -170,6 +170,7 @@ struct procdesc;
 struct racct;
 struct sbuf;
 struct sleepqueue;
+struct syscall_args;
 struct td_sched;
 struct thread;
 struct trapframe;
@@ -320,6 +321,8 @@ struct thread {
 	struct vm_page	**td_ma;	/* (k) uio pages held */
 	int		td_ma_cnt;	/* (k) size of *td_ma */
 	void		*td_su;		/* (k) FFS SU private */
+	u_int		td_dbg_sc_code;	/* (c) Syscall code to debugger. */
+	u_int		td_dbg_sc_narg;	/* (c) Syscall arg count to debugger.*/
 };
 
 struct mtx *thread_lock_block(struct thread *);
@@ -934,7 +937,6 @@ void	userret(struct thread *, struct tra
 
 void	cpu_exit(struct thread *);
 void	exit1(struct thread *, int) __dead2;
-struct syscall_args;
 int	cpu_fetch_syscall_args(struct thread *td, struct syscall_args *sa);
 void	cpu_fork(struct thread *, struct proc *, struct thread *, int);
 void	cpu_set_fork_handler(struct thread *, void (*)(void *), void *);

Modified: stable/10/sys/sys/ptrace.h
==============================================================================
--- stable/10/sys/sys/ptrace.h	Fri Oct 23 00:48:00 2015	(r289779)
+++ stable/10/sys/sys/ptrace.h	Fri Oct 23 01:27:44 2015	(r289780)
@@ -113,6 +113,8 @@ struct ptrace_lwpinfo {
 	struct __siginfo pl_siginfo;	/* siginfo for signal */
 	char		pl_tdname[MAXCOMLEN + 1]; /* LWP name */
 	int		pl_child_pid;	/* New child pid */
+	u_int		pl_syscall_code;
+	u_int		pl_syscall_narg;
 };
 
 /* Argument structure for PT_VM_ENTRY. */

Modified: stable/10/tests/sys/kern/Makefile
==============================================================================
--- stable/10/tests/sys/kern/Makefile	Fri Oct 23 00:48:00 2015	(r289779)
+++ stable/10/tests/sys/kern/Makefile	Fri Oct 23 01:27:44 2015	(r289780)
@@ -7,6 +7,7 @@ ATF_TESTS_C+=	ptrace_test
 ATF_TESTS_C+=	unix_seqpacket_test
 TEST_METADATA.unix_seqpacket_test+=	timeout="15"
 
+LDADD.ptrace_test+=			-lpthread
 LDADD.unix_seqpacket_test+=		-lpthread
 
 WARNS?=	5

Modified: stable/10/tests/sys/kern/ptrace_test.c
==============================================================================
--- stable/10/tests/sys/kern/ptrace_test.c	Fri Oct 23 00:48:00 2015	(r289779)
+++ stable/10/tests/sys/kern/ptrace_test.c	Fri Oct 23 01:27:44 2015	(r289780)
@@ -29,10 +29,12 @@ __FBSDID("$FreeBSD$");
 
 #include <sys/types.h>
 #include <sys/ptrace.h>
+#include <sys/syscall.h>
 #include <sys/sysctl.h>
 #include <sys/user.h>
 #include <sys/wait.h>
 #include <errno.h>
+#include <pthread.h>
 #include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -409,12 +411,15 @@ ATF_TC_BODY(ptrace__parent_sees_exit_aft
  * debugger is attached to it.
  */
 static __dead2 void
-follow_fork_parent(void)
+follow_fork_parent(bool use_vfork)
 {
 	pid_t fpid, wpid;
 	int status;
 
-	CHILD_REQUIRE((fpid = fork()) != -1);
+	if (use_vfork)
+		CHILD_REQUIRE((fpid = vfork()) != -1);
+	else
+		CHILD_REQUIRE((fpid = fork()) != -1);
 
 	if (fpid == 0)
 		/* Child */
@@ -434,7 +439,7 @@ follow_fork_parent(void)
  * child process.
  */
 static pid_t
-handle_fork_events(pid_t parent)
+handle_fork_events(pid_t parent, struct ptrace_lwpinfo *ppl)
 {
 	struct ptrace_lwpinfo pl;
 	bool fork_reported[2];
@@ -469,6 +474,8 @@ handle_fork_events(pid_t parent)
 				child = wpid;
 			else
 				ATF_REQUIRE(child == wpid);
+			if (ppl != NULL)
+				ppl[1] = pl;
 			fork_reported[1] = true;
 		} else {
 			ATF_REQUIRE(wpid == parent);
@@ -478,6 +485,8 @@ handle_fork_events(pid_t parent)
 				child = pl.pl_child_pid;
 			else
 				ATF_REQUIRE(child == pl.pl_child_pid);
+			if (ppl != NULL)
+				ppl[0] = pl;
 			fork_reported[0] = true;
 		}
 	}
@@ -499,7 +508,7 @@ ATF_TC_BODY(ptrace__follow_fork_both_att
 	ATF_REQUIRE((fpid = fork()) != -1);
 	if (fpid == 0) {
 		trace_me();
-		follow_fork_parent();
+		follow_fork_parent(false);
 	}
 
 	/* Parent process. */
@@ -516,7 +525,7 @@ ATF_TC_BODY(ptrace__follow_fork_both_att
 	/* Continue the child ignoring the SIGSTOP. */
 	ATF_REQUIRE(ptrace(PT_CONTINUE, children[0], (caddr_t)1, 0) != -1);
 
-	children[1] = handle_fork_events(children[0]);
+	children[1] = handle_fork_events(children[0], NULL);
 	ATF_REQUIRE(children[1] > 0);
 
 	ATF_REQUIRE(ptrace(PT_CONTINUE, children[0], (caddr_t)1, 0) != -1);
@@ -555,7 +564,7 @@ ATF_TC_BODY(ptrace__follow_fork_child_de
 	ATF_REQUIRE((fpid = fork()) != -1);
 	if (fpid == 0) {
 		trace_me();
-		follow_fork_parent();
+		follow_fork_parent(false);
 	}
 
 	/* Parent process. */
@@ -572,7 +581,7 @@ ATF_TC_BODY(ptrace__follow_fork_child_de
 	/* Continue the child ignoring the SIGSTOP. */
 	ATF_REQUIRE(ptrace(PT_CONTINUE, children[0], (caddr_t)1, 0) != -1);
 
-	children[1] = handle_fork_events(children[0]);
+	children[1] = handle_fork_events(children[0], NULL);
 	ATF_REQUIRE(children[1] > 0);
 
 	ATF_REQUIRE(ptrace(PT_CONTINUE, children[0], (caddr_t)1, 0) != -1);
@@ -606,7 +615,7 @@ ATF_TC_BODY(ptrace__follow_fork_parent_d
 	ATF_REQUIRE((fpid = fork()) != -1);
 	if (fpid == 0) {
 		trace_me();
-		follow_fork_parent();
+		follow_fork_parent(false);
 	}
 
 	/* Parent process. */
@@ -623,7 +632,7 @@ ATF_TC_BODY(ptrace__follow_fork_parent_d
 	/* Continue the child ignoring the SIGSTOP. */
 	ATF_REQUIRE(ptrace(PT_CONTINUE, children[0], (caddr_t)1, 0) != -1);
 
-	children[1] = handle_fork_events(children[0]);
+	children[1] = handle_fork_events(children[0], NULL);
 	ATF_REQUIRE(children[1] > 0);
 
 	ATF_REQUIRE(ptrace(PT_DETACH, children[0], (caddr_t)1, 0) != -1);
@@ -688,7 +697,7 @@ ATF_TC_BODY(ptrace__follow_fork_both_att
 	ATF_REQUIRE((fpid = fork()) != -1);
 	if (fpid == 0) {
 		attach_fork_parent(cpipe);
-		follow_fork_parent();
+		follow_fork_parent(false);
 	}
 
 	/* Parent process. */
@@ -715,7 +724,7 @@ ATF_TC_BODY(ptrace__follow_fork_both_att
 	/* Signal the fork parent to continue. */
 	close(cpipe[0]);
 
-	children[1] = handle_fork_events(children[0]);
+	children[1] = handle_fork_events(children[0], NULL);
 	ATF_REQUIRE(children[1] > 0);
 
 	ATF_REQUIRE(ptrace(PT_CONTINUE, children[0], (caddr_t)1, 0) != -1);
@@ -756,7 +765,7 @@ ATF_TC_BODY(ptrace__follow_fork_child_de
 	ATF_REQUIRE((fpid = fork()) != -1);
 	if (fpid == 0) {
 		attach_fork_parent(cpipe);
-		follow_fork_parent();
+		follow_fork_parent(false);
 	}
 
 	/* Parent process. */
@@ -783,7 +792,7 @@ ATF_TC_BODY(ptrace__follow_fork_child_de
 	/* Signal the fork parent to continue. */
 	close(cpipe[0]);
 
-	children[1] = handle_fork_events(children[0]);
+	children[1] = handle_fork_events(children[0], NULL);
 	ATF_REQUIRE(children[1] > 0);
 
 	ATF_REQUIRE(ptrace(PT_CONTINUE, children[0], (caddr_t)1, 0) != -1);
@@ -819,7 +828,7 @@ ATF_TC_BODY(ptrace__follow_fork_parent_d
 	ATF_REQUIRE((fpid = fork()) != -1);
 	if (fpid == 0) {
 		attach_fork_parent(cpipe);
-		follow_fork_parent();
+		follow_fork_parent(false);
 	}
 
 	/* Parent process. */
@@ -846,7 +855,7 @@ ATF_TC_BODY(ptrace__follow_fork_parent_d
 	/* Signal the fork parent to continue. */
 	close(cpipe[0]);
 
-	children[1] = handle_fork_events(children[0]);
+	children[1] = handle_fork_events(children[0], NULL);
 	ATF_REQUIRE(children[1] > 0);
 
 	ATF_REQUIRE(ptrace(PT_DETACH, children[0], (caddr_t)1, 0) != -1);
@@ -866,6 +875,223 @@ ATF_TC_BODY(ptrace__follow_fork_parent_d
 	ATF_REQUIRE(errno == ECHILD);
 }
 
+/*
+ * Verify that pl_syscall_code in struct ptrace_lwpinfo for a new
+ * child process created via fork() reports the correct value.
+ */
+ATF_TC_WITHOUT_HEAD(ptrace__new_child_pl_syscall_code_fork);
+ATF_TC_BODY(ptrace__new_child_pl_syscall_code_fork, tc)
+{
+	struct ptrace_lwpinfo pl[2];
+	pid_t children[2], fpid, wpid;
+	int status;
+
+	ATF_REQUIRE((fpid = fork()) != -1);
+	if (fpid == 0) {
+		trace_me();
+		follow_fork_parent(false);
+	}
+
+	/* Parent process. */
+	children[0] = fpid;
+
+	/* The first wait() should report the stop from SIGSTOP. */
+	wpid = waitpid(children[0], &status, 0);
+	ATF_REQUIRE(wpid == children[0]);
+	ATF_REQUIRE(WIFSTOPPED(status));
+	ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP);
+
+	ATF_REQUIRE(ptrace(PT_FOLLOW_FORK, children[0], NULL, 1) != -1);
+
+	/* Continue the child ignoring the SIGSTOP. */
+	ATF_REQUIRE(ptrace(PT_CONTINUE, children[0], (caddr_t)1, 0) != -1);
+
+	/* Wait for both halves of the fork event to get reported. */
+	children[1] = handle_fork_events(children[0], pl);
+	ATF_REQUIRE(children[1] > 0);
+
+	ATF_REQUIRE((pl[0].pl_flags & PL_FLAG_SCX) != 0);
+	ATF_REQUIRE((pl[1].pl_flags & PL_FLAG_SCX) != 0);
+	ATF_REQUIRE(pl[0].pl_syscall_code == SYS_fork);
+	ATF_REQUIRE(pl[0].pl_syscall_code == pl[1].pl_syscall_code);
+	ATF_REQUIRE(pl[0].pl_syscall_narg == pl[1].pl_syscall_narg);
+
+	ATF_REQUIRE(ptrace(PT_CONTINUE, children[0], (caddr_t)1, 0) != -1);
+	ATF_REQUIRE(ptrace(PT_CONTINUE, children[1], (caddr_t)1, 0) != -1);
+
+	/*
+	 * The child can't exit until the grandchild reports status, so the
+	 * grandchild should report its exit first to the debugger.
+	 */
+	wpid = wait(&status);
+	ATF_REQUIRE(wpid == children[1]);
+	ATF_REQUIRE(WIFEXITED(status));
+	ATF_REQUIRE(WEXITSTATUS(status) == 2);
+
+	wpid = wait(&status);
+	ATF_REQUIRE(wpid == children[0]);
+	ATF_REQUIRE(WIFEXITED(status));
+	ATF_REQUIRE(WEXITSTATUS(status) == 1);
+
+	wpid = wait(&status);
+	ATF_REQUIRE(wpid == -1);
+	ATF_REQUIRE(errno == ECHILD);
+}
+
+/*
+ * Verify that pl_syscall_code in struct ptrace_lwpinfo for a new
+ * child process created via vfork() reports the correct value.
+ */
+ATF_TC_WITHOUT_HEAD(ptrace__new_child_pl_syscall_code_vfork);
+ATF_TC_BODY(ptrace__new_child_pl_syscall_code_vfork, tc)
+{
+	struct ptrace_lwpinfo pl[2];
+	pid_t children[2], fpid, wpid;
+	int status;
+
+	ATF_REQUIRE((fpid = fork()) != -1);
+	if (fpid == 0) {
+		trace_me();
+		follow_fork_parent(true);
+	}
+
+	/* Parent process. */
+	children[0] = fpid;
+
+	/* The first wait() should report the stop from SIGSTOP. */
+	wpid = waitpid(children[0], &status, 0);
+	ATF_REQUIRE(wpid == children[0]);
+	ATF_REQUIRE(WIFSTOPPED(status));
+	ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP);
+
+	ATF_REQUIRE(ptrace(PT_FOLLOW_FORK, children[0], NULL, 1) != -1);
+
+	/* Continue the child ignoring the SIGSTOP. */
+	ATF_REQUIRE(ptrace(PT_CONTINUE, children[0], (caddr_t)1, 0) != -1);
+
+	/* Wait for both halves of the fork event to get reported. */
+	children[1] = handle_fork_events(children[0], pl);
+	ATF_REQUIRE(children[1] > 0);
+
+	ATF_REQUIRE((pl[0].pl_flags & PL_FLAG_SCX) != 0);
+	ATF_REQUIRE((pl[1].pl_flags & PL_FLAG_SCX) != 0);
+	ATF_REQUIRE(pl[0].pl_syscall_code == SYS_vfork);
+	ATF_REQUIRE(pl[0].pl_syscall_code == pl[1].pl_syscall_code);
+	ATF_REQUIRE(pl[0].pl_syscall_narg == pl[1].pl_syscall_narg);
+
+	ATF_REQUIRE(ptrace(PT_CONTINUE, children[0], (caddr_t)1, 0) != -1);
+	ATF_REQUIRE(ptrace(PT_CONTINUE, children[1], (caddr_t)1, 0) != -1);
+
+	/*
+	 * The child can't exit until the grandchild reports status, so the
+	 * grandchild should report its exit first to the debugger.
+	 */
+	wpid = wait(&status);
+	ATF_REQUIRE(wpid == children[1]);
+	ATF_REQUIRE(WIFEXITED(status));
+	ATF_REQUIRE(WEXITSTATUS(status) == 2);
+
+	wpid = wait(&status);
+	ATF_REQUIRE(wpid == children[0]);
+	ATF_REQUIRE(WIFEXITED(status));
+	ATF_REQUIRE(WEXITSTATUS(status) == 1);
+
+	wpid = wait(&status);
+	ATF_REQUIRE(wpid == -1);
+	ATF_REQUIRE(errno == ECHILD);
+}
+
+static void *
+simple_thread(void *arg __unused)
+{
+
+	pthread_exit(NULL);
+}
+
+/*
+ * Verify that pl_syscall_code in struct ptrace_lwpinfo for a new
+ * thread reports the correct value.
+ */
+ATF_TC_WITHOUT_HEAD(ptrace__new_child_pl_syscall_code_thread);
+ATF_TC_BODY(ptrace__new_child_pl_syscall_code_thread, tc)
+{
+	struct ptrace_lwpinfo pl;
+	pid_t fpid, wpid;
+	lwpid_t main;
+	int status;
+
+	ATF_REQUIRE((fpid = fork()) != -1);
+	if (fpid == 0) {
+		pthread_t thread;
+
+		trace_me();
+
+		CHILD_REQUIRE(pthread_create(&thread, NULL, simple_thread,
+			NULL) == 0);
+		CHILD_REQUIRE(pthread_join(thread, NULL) == 0);
+		exit(1);
+	}
+
+	/* The first wait() should report the stop from SIGSTOP. */
+	wpid = waitpid(fpid, &status, 0);
+	ATF_REQUIRE(wpid == fpid);
+	ATF_REQUIRE(WIFSTOPPED(status));
+	ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP);
+
+	ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl,
+	    sizeof(pl)) != -1);
+	main = pl.pl_lwpid;
+
+	/*
+	 * Continue the child ignoring the SIGSTOP and tracing all
+	 * system call exits.
+	 */
+	ATF_REQUIRE(ptrace(PT_TO_SCX, fpid, (caddr_t)1, 0) != -1);
+
+	/*
+	 * Wait for the new thread to arrive.  pthread_create() might
+	 * invoke any number of system calls.  For now we just wait
+	 * for the new thread to arrive and make sure it reports a
+	 * valid system call code.  If ptrace grows thread event
+	 * reporting then this test can be made more precise.
+	 */
+	for (;;) {
+		wpid = waitpid(fpid, &status, 0);
+		ATF_REQUIRE(wpid == fpid);
+		ATF_REQUIRE(WIFSTOPPED(status));
+		ATF_REQUIRE(WSTOPSIG(status) == SIGTRAP);
+		
+		ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl,
+		    sizeof(pl)) != -1);
+		ATF_REQUIRE((pl.pl_flags & PL_FLAG_SCX) != 0);
+		ATF_REQUIRE(pl.pl_syscall_code != 0);
+		if (pl.pl_lwpid != main)
+			/* New thread seen. */
+			break;
+
+		ATF_REQUIRE(ptrace(PT_CONTINUE, fpid, (caddr_t)1, 0) == 0);
+	}
+
+	/* Wait for the child to exit. */
+	ATF_REQUIRE(ptrace(PT_CONTINUE, fpid, (caddr_t)1, 0) == 0);
+	for (;;) {
+		wpid = waitpid(fpid, &status, 0);
+		ATF_REQUIRE(wpid == fpid);
+		if (WIFEXITED(status))
+			break;
+		
+		ATF_REQUIRE(WIFSTOPPED(status));
+		ATF_REQUIRE(WSTOPSIG(status) == SIGTRAP);
+		ATF_REQUIRE(ptrace(PT_CONTINUE, fpid, (caddr_t)1, 0) == 0);
+	}
+		
+	ATF_REQUIRE(WEXITSTATUS(status) == 1);
+
+	wpid = wait(&status);
+	ATF_REQUIRE(wpid == -1);
+	ATF_REQUIRE(errno == ECHILD);
+}
+
 ATF_TP_ADD_TCS(tp)
 {
 
@@ -881,6 +1107,9 @@ ATF_TP_ADD_TCS(tp)
 	    ptrace__follow_fork_child_detached_unrelated_debugger);
 	ATF_TP_ADD_TC(tp,
 	    ptrace__follow_fork_parent_detached_unrelated_debugger);
+	ATF_TP_ADD_TC(tp, ptrace__new_child_pl_syscall_code_fork);
+	ATF_TP_ADD_TC(tp, ptrace__new_child_pl_syscall_code_vfork);
+	ATF_TP_ADD_TC(tp, ptrace__new_child_pl_syscall_code_thread);
 
 	return (atf_no_error());
 }

From owner-svn-src-stable@freebsd.org  Fri Oct 23 01:27:47 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFB7EA1C1D6;
 Fri, 23 Oct 2015 01:27:47 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 8AFA13EB;
 Fri, 23 Oct 2015 01:27:47 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N1Rktx048171;
 Fri, 23 Oct 2015 01:27:46 GMT (envelope-from jhb@FreeBSD.org)
Received: (from jhb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N1RjQE048161;
 Fri, 23 Oct 2015 01:27:45 GMT (envelope-from jhb@FreeBSD.org)
Message-Id: <201510230127.t9N1RjQE048161@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org
 using -f
From: John Baldwin <jhb@FreeBSD.org>
Date: Fri, 23 Oct 2015 01:27:45 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject: svn commit: r289780 - in stable: 10/lib/libc/sys 10/sys/kern
 10/sys/sys 10/tests/sys/kern 9/lib/libc/sys 9/sys/kern 9/sys/sys
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Oct 2015 01:27:47 -0000

Author: jhb
Date: Fri Oct 23 01:27:44 2015
New Revision: 289780
URL: https://svnweb.freebsd.org/changeset/base/289780

Log:
  MFC 287386,288949,288993:
  Export current system call code and argument count for system call entry
  and exit events.  To preserve the ABI, the new fields are moved to the
  end of struct thread in these branches (unlike HEAD) and explicitly copied
  when new threads are created.  In addition, the new tests are only added
  in 10.
  
  r287386:
  Export current system call code and argument count for system call entry
  and exit events. procfs stop events for system call tracing report these
  values (argument count for system call entry and code for system call exit),
  but ptrace() does not provide this information. (Note that while the system
  call code can be determined in an ABI-specific manner during system call
  entry, it is not generally available during system call exit.)
  
  The values are exported via new fields at the end of struct ptrace_lwpinfo
  available via PT_LWPINFO.
  
  r288949:
  Fix various edge cases related to system call tracing.
  - Always set td_dbg_sc_* when P_TRACED is set on system call entry
    even if the debugger is not tracing system call entries.  This
    ensures the fields are valid when reporting other stops that
    occur at system call boundaries such as for PT_FOLLOW_FORKS or
    when only tracing system call exits.
  - Set TDB_SCX when reporting the stop for a new child process in
    fork_return().  This causes the event to be reported as a system
    call exit.
  - Report a system call exit event in fork_return() for new threads in
    a traced process.
  - Copy td_dbg_sc_* to new threads instead of zeroing.  This ensures
    that td_dbg_sc_code in particular will report the system call that
    created the new thread or process when it reports a system call
    exit event in fork_return().
  - Add new ptrace tests to verify that new child processes and threads
    report system call exit events with a valid pl_syscall_code via
    PT_LWPINFO.
  
  r288993:
  Document the recently added pl_syscall_* fields in struct ptrace_lwpinfo.

Modified:
  stable/9/lib/libc/sys/ptrace.2
  stable/9/sys/kern/kern_fork.c
  stable/9/sys/kern/kern_thr.c
  stable/9/sys/kern/subr_syscall.c
  stable/9/sys/kern/sys_process.c
  stable/9/sys/sys/proc.h
  stable/9/sys/sys/ptrace.h
Directory Properties:
  stable/9/lib/libc/   (props changed)
  stable/9/lib/libc/sys/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/sys/sys/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/lib/libc/sys/ptrace.2
  stable/10/sys/kern/kern_fork.c
  stable/10/sys/kern/kern_thr.c
  stable/10/sys/kern/subr_syscall.c
  stable/10/sys/kern/sys_process.c
  stable/10/sys/sys/proc.h
  stable/10/sys/sys/ptrace.h
  stable/10/tests/sys/kern/Makefile
  stable/10/tests/sys/kern/ptrace_test.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/9/lib/libc/sys/ptrace.2
==============================================================================
--- stable/9/lib/libc/sys/ptrace.2	Fri Oct 23 00:48:00 2015	(r289779)
+++ stable/9/lib/libc/sys/ptrace.2	Fri Oct 23 01:27:44 2015	(r289780)
@@ -2,7 +2,7 @@
 .\"	$NetBSD: ptrace.2,v 1.2 1995/02/27 12:35:37 cgd Exp $
 .\"
 .\" This file is in the public domain.
-.Dd February 7, 2013
+.Dd October 6, 2015
 .Dt PTRACE 2
 .Os
 .Sh NAME
@@ -307,6 +307,8 @@ struct ptrace_lwpinfo {
 	siginfo_t pl_siginfo;
 	char	pl_tdname[MAXCOMLEN + 1];
 	int	pl_child_pid;
+	u_int	pl_syscall_code;
+	u_int	pl_syscall_narg;
 };
 .Ed
 .Pp
@@ -395,6 +397,27 @@ stop when
 .Dv PL_FLAG_FORKED
 is set in
 .Va pl_flags .
+.It pl_syscall_code
+The ABI-specific identifier of the current system call.
+Note that for indirect system calls this field reports the indirected
+system call.
+Only valid when
+.Dv PL_FLAG_SCE
+or
+.Dv PL_FLAG_SCX
+is set in
+.Va pl_flags.
+.It pl_syscall_narg
+The number of arguments passed to the current system call not counting
+the system call identifier.
+Note that for indirect system calls this field reports the arguments
+passed to the indirected system call.
+Only valid when
+.Dv PL_FLAG_SCE
+or
+.Dv PL_FLAG_SCX
+is set in
+.Va pl_flags.
 .El
 .It PT_GETNUMLWPS
 This request returns the number of kernel threads associated with the

Modified: stable/9/sys/kern/kern_fork.c
==============================================================================
--- stable/9/sys/kern/kern_fork.c	Fri Oct 23 00:48:00 2015	(r289779)
+++ stable/9/sys/kern/kern_fork.c	Fri Oct 23 01:27:44 2015	(r289780)
@@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/proc.h>
 #include <sys/procdesc.h>
 #include <sys/pioctl.h>
+#include <sys/ptrace.h>
 #include <sys/racct.h>
 #include <sys/resourcevar.h>
 #include <sys/sched.h>
@@ -477,6 +478,8 @@ do_fork(struct thread *td, int flags, st
 	td2->td_sigmask = td->td_sigmask;
 	td2->td_flags = TDF_INMEM;
 	td2->td_lend_user_pri = PRI_MAX;
+	td2->td_dbg_sc_code = td->td_dbg_sc_code;
+	td2->td_dbg_sc_narg = td->td_dbg_sc_narg;
 
 #ifdef VIMAGE
 	td2->td_vnet = NULL;
@@ -1022,8 +1025,8 @@ fork_return(struct thread *td, struct tr
 {
 	struct proc *p, *dbg;
 
+	p = td->td_proc;
 	if (td->td_dbgflags & TDB_STOPATFORK) {
-		p = td->td_proc;
 		sx_xlock(&proctree_lock);
 		PROC_LOCK(p);
 		if ((p->p_pptr->p_flag & (P_TRACED | P_FOLLOWFORK)) ==
@@ -1040,9 +1043,9 @@ fork_return(struct thread *td, struct tr
 			    p->p_pid, p->p_oppid);
 			proc_reparent(p, dbg);
 			sx_xunlock(&proctree_lock);
-			td->td_dbgflags |= TDB_CHILD;
+			td->td_dbgflags |= TDB_CHILD | TDB_SCX;
 			ptracestop(td, SIGSTOP);
-			td->td_dbgflags &= ~TDB_CHILD;
+			td->td_dbgflags &= ~(TDB_CHILD | TDB_SCX);
 		} else {
 			/*
 			 * ... otherwise clear the request.
@@ -1052,6 +1055,18 @@ fork_return(struct thread *td, struct tr
 			cv_broadcast(&p->p_dbgwait);
 		}
 		PROC_UNLOCK(p);
+	} else if (p->p_flag & P_TRACED) {
+ 		/*
+		 * This is the start of a new thread in a traced
+		 * process.  Report a system call exit event.
+		 */
+		PROC_LOCK(p);
+		td->td_dbgflags |= TDB_SCX;
+		_STOPEVENT(p, S_SCX, td->td_dbg_sc_code);
+		if ((p->p_stops & S_PT_SCX) != 0)
+			ptracestop(td, SIGTRAP);
+		td->td_dbgflags &= ~TDB_SCX;
+		PROC_UNLOCK(p);
 	}
 
 	userret(td, frame);

Modified: stable/9/sys/kern/kern_thr.c
==============================================================================
--- stable/9/sys/kern/kern_thr.c	Fri Oct 23 00:48:00 2015	(r289779)
+++ stable/9/sys/kern/kern_thr.c	Fri Oct 23 01:27:44 2015	(r289780)
@@ -227,6 +227,8 @@ create_thread(struct thread *td, mcontex
 	    __rangeof(struct thread, td_startcopy, td_endcopy));
 	newtd->td_proc = td->td_proc;
 	newtd->td_ucred = crhold(td->td_ucred);
+	newtd->td_dbg_sc_code = td->td_dbg_sc_code;
+	newtd->td_dbg_sc_narg = td->td_dbg_sc_narg;
 
 	if (ctx != NULL) { /* old way to set user context */
 		error = set_mcontext(newtd, ctx);

Modified: stable/9/sys/kern/subr_syscall.c
==============================================================================
--- stable/9/sys/kern/subr_syscall.c	Fri Oct 23 00:48:00 2015	(r289779)
+++ stable/9/sys/kern/subr_syscall.c	Fri Oct 23 01:27:44 2015	(r289780)
@@ -85,9 +85,12 @@ syscallenter(struct thread *td, struct s
 
 	if (error == 0) {
 		STOPEVENT(p, S_SCE, sa->narg);
-		if (p->p_flag & P_TRACED && p->p_stops & S_PT_SCE) {
+		if (p->p_flag & P_TRACED) {
 			PROC_LOCK(p);
-			ptracestop((td), SIGTRAP);
+			td->td_dbg_sc_code = sa->code;
+			td->td_dbg_sc_narg = sa->narg;
+			if (p->p_stops & S_PT_SCE)
+				ptracestop((td), SIGTRAP);
 			PROC_UNLOCK(p);
 		}
 		if (td->td_dbgflags & TDB_USERWR) {
@@ -96,6 +99,10 @@ syscallenter(struct thread *td, struct s
 			 * debugger modified registers or memory.
 			 */
 			error = (p->p_sysent->sv_fetch_syscall_args)(td, sa);
+			PROC_LOCK(p);
+			td->td_dbg_sc_code = sa->code;
+			td->td_dbg_sc_narg = sa->narg;
+			PROC_UNLOCK(p);
 #ifdef KTRACE
 			if (KTRPOINT(td, KTR_SYSCALL))
 				ktrsyscall(sa->code, sa->narg, sa->args);

Modified: stable/9/sys/kern/sys_process.c
==============================================================================
--- stable/9/sys/kern/sys_process.c	Fri Oct 23 00:48:00 2015	(r289779)
+++ stable/9/sys/kern/sys_process.c	Fri Oct 23 01:27:44 2015	(r289780)
@@ -97,6 +97,8 @@ struct ptrace_lwpinfo32 {
 	struct siginfo32 pl_siginfo;	/* siginfo for signal */
 	char	pl_tdname[MAXCOMLEN + 1];	/* LWP name. */
 	int	pl_child_pid;		/* New child pid */
+	u_int		pl_syscall_code;
+	u_int		pl_syscall_narg;
 };
 
 #endif
@@ -483,6 +485,8 @@ ptrace_lwpinfo_to32(const struct ptrace_
 	siginfo_to_siginfo32(&pl->pl_siginfo, &pl32->pl_siginfo);
 	strcpy(pl32->pl_tdname, pl->pl_tdname);
 	pl32->pl_child_pid = pl->pl_child_pid;
+	pl32->pl_syscall_code = pl->pl_syscall_code;
+	pl32->pl_syscall_narg = pl->pl_syscall_narg;
 }
 #endif /* COMPAT_FREEBSD32 */
 
@@ -1212,6 +1216,13 @@ kern_ptrace(struct thread *td, int req, 
 		pl->pl_sigmask = td2->td_sigmask;
 		pl->pl_siglist = td2->td_siglist;
 		strcpy(pl->pl_tdname, td2->td_name);
+		if ((td2->td_dbgflags & (TDB_SCE | TDB_SCX)) != 0) {
+			pl->pl_syscall_code = td2->td_dbg_sc_code;
+			pl->pl_syscall_narg = td2->td_dbg_sc_narg;
+		} else {
+			pl->pl_syscall_code = 0;
+			pl->pl_syscall_narg = 0;
+		}
 #ifdef COMPAT_FREEBSD32
 		if (wrap32)
 			ptrace_lwpinfo_to32(pl, pl32);

Modified: stable/9/sys/sys/proc.h
==============================================================================
--- stable/9/sys/sys/proc.h	Fri Oct 23 00:48:00 2015	(r289779)
+++ stable/9/sys/sys/proc.h	Fri Oct 23 01:27:44 2015	(r289780)
@@ -170,6 +170,7 @@ struct procdesc;
 struct racct;
 struct sbuf;
 struct sleepqueue;
+struct syscall_args;
 struct td_sched;
 struct thread;
 struct trapframe;
@@ -317,6 +318,8 @@ struct thread {
 	int		td_ma_cnt;	/* (k) size of *td_ma */
 	struct rl_q_entry *td_rlqe;	/* (k) Associated range lock entry. */
 	u_int		td_vp_reserv;	/* (k) Count of reserved vnodes. */
+	u_int		td_dbg_sc_code;	/* (c) Syscall code to debugger. */
+	u_int		td_dbg_sc_narg;	/* (c) Syscall arg count to debugger.*/
 };
 
 struct mtx *thread_lock_block(struct thread *);
@@ -927,7 +930,6 @@ void	userret(struct thread *, struct tra
 
 void	cpu_exit(struct thread *);
 void	exit1(struct thread *, int) __dead2;
-struct syscall_args;
 int	cpu_fetch_syscall_args(struct thread *td, struct syscall_args *sa);
 void	cpu_fork(struct thread *, struct proc *, struct thread *, int);
 void	cpu_set_fork_handler(struct thread *, void (*)(void *), void *);

Modified: stable/9/sys/sys/ptrace.h
==============================================================================
--- stable/9/sys/sys/ptrace.h	Fri Oct 23 00:48:00 2015	(r289779)
+++ stable/9/sys/sys/ptrace.h	Fri Oct 23 01:27:44 2015	(r289780)
@@ -113,6 +113,8 @@ struct ptrace_lwpinfo {
 	struct __siginfo pl_siginfo;	/* siginfo for signal */
 	char		pl_tdname[MAXCOMLEN + 1]; /* LWP name */
 	int		pl_child_pid;	/* New child pid */
+	u_int		pl_syscall_code;
+	u_int		pl_syscall_narg;
 };
 
 /* Argument structure for PT_VM_ENTRY. */

From owner-svn-src-stable@freebsd.org  Fri Oct 23 07:25:15 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF3B1A1A85A;
 Fri, 23 Oct 2015 07:25:15 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id A6A03C31;
 Fri, 23 Oct 2015 07:25:15 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N7PE81064228;
 Fri, 23 Oct 2015 07:25:14 GMT (envelope-from avg@FreeBSD.org)
Received: (from avg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N7PEgu064227;
 Fri, 23 Oct 2015 07:25:14 GMT (envelope-from avg@FreeBSD.org)
Message-Id: <201510230725.t9N7PEgu064227@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org
 using -f
From: Andriy Gapon <avg@FreeBSD.org>
Date: Fri, 23 Oct 2015 07:25:14 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289784 - stable/10/sys/dev/drm2/radeon
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Oct 2015 07:25:16 -0000

Author: avg
Date: Fri Oct 23 07:25:14 2015
New Revision: 289784
URL: https://svnweb.freebsd.org/changeset/base/289784

Log:
  MFC r287673: radeon_suspend_kms: don't mess with pci state

Modified:
  stable/10/sys/dev/drm2/radeon/radeon_device.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/drm2/radeon/radeon_device.c
==============================================================================
--- stable/10/sys/dev/drm2/radeon/radeon_device.c	Fri Oct 23 05:03:34 2015	(r289783)
+++ stable/10/sys/dev/drm2/radeon/radeon_device.c	Fri Oct 23 07:25:14 2015	(r289784)
@@ -1342,14 +1342,10 @@ int radeon_suspend_kms(struct drm_device
 
 	radeon_agp_suspend(rdev);
 
-	pci_save_state(device_get_parent(dev->dev));
 #ifdef FREEBSD_WIP
 	if (state.event == PM_EVENT_SUSPEND) {
 		/* Shut down the device */
 		pci_disable_device(dev->pdev);
-#endif /* FREEBSD_WIP */
-		pci_set_powerstate(dev->dev, PCI_POWERSTATE_D3);
-#ifdef FREEBSD_WIP
 	}
 	console_lock();
 #endif /* FREEBSD_WIP */
@@ -1380,10 +1376,6 @@ int radeon_resume_kms(struct drm_device 
 
 #ifdef FREEBSD_WIP
 	console_lock();
-#endif /* FREEBSD_WIP */
-	pci_set_powerstate(device_get_parent(dev->dev), PCI_POWERSTATE_D0);
-	pci_restore_state(device_get_parent(dev->dev));
-#ifdef FREEBSD_WIP
 	if (pci_enable_device(dev->pdev)) {
 		console_unlock();
 		return -1;

From owner-svn-src-stable@freebsd.org  Fri Oct 23 07:29:38 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B688A1A9CF;
 Fri, 23 Oct 2015 07:29:38 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 25A781037;
 Fri, 23 Oct 2015 07:29:38 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N7TbxT064838;
 Fri, 23 Oct 2015 07:29:37 GMT (envelope-from avg@FreeBSD.org)
Received: (from avg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N7TbmS064837;
 Fri, 23 Oct 2015 07:29:37 GMT (envelope-from avg@FreeBSD.org)
Message-Id: <201510230729.t9N7TbmS064837@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org
 using -f
From: Andriy Gapon <avg@FreeBSD.org>
Date: Fri, 23 Oct 2015 07:29:37 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject: svn commit: r289785 - stable/9/sys/dev/drm2/radeon
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Oct 2015 07:29:38 -0000

Author: avg
Date: Fri Oct 23 07:29:37 2015
New Revision: 289785
URL: https://svnweb.freebsd.org/changeset/base/289785

Log:
  MFC r287673: radeon_suspend_kms: don't mess with pci state
  
  Patch adjusted for FREEBSD_WIP vs DUMBBELL_WIP.

Modified:
  stable/9/sys/dev/drm2/radeon/radeon_device.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/drm2/radeon/radeon_device.c
==============================================================================
--- stable/9/sys/dev/drm2/radeon/radeon_device.c	Fri Oct 23 07:25:14 2015	(r289784)
+++ stable/9/sys/dev/drm2/radeon/radeon_device.c	Fri Oct 23 07:29:37 2015	(r289785)
@@ -1316,14 +1316,10 @@ int radeon_suspend_kms(struct drm_device
 
 	radeon_agp_suspend(rdev);
 
-	pci_save_state(device_get_parent(rdev->dev));
 #ifdef DUMBBELL_WIP
 	if (state.event == PM_EVENT_SUSPEND) {
 		/* Shut down the device */
 		pci_disable_device(dev->pdev);
-#endif /* DUMBBELL_WIP */
-		pci_set_powerstate(dev->device, PCI_POWERSTATE_D3);
-#ifdef DUMBBELL_WIP
 	}
 	console_lock();
 #endif /* DUMBBELL_WIP */
@@ -1354,10 +1350,6 @@ int radeon_resume_kms(struct drm_device 
 
 #ifdef DUMBBELL_WIP
 	console_lock();
-#endif /* DUMBBELL_WIP */
-	pci_set_powerstate(dev->device, PCI_POWERSTATE_D0);
-	pci_restore_state(device_get_parent(rdev->dev));
-#ifdef DUMBBELL_WIP
 	if (pci_enable_device(dev->pdev)) {
 		console_unlock();
 		return -1;

From owner-svn-src-stable@freebsd.org  Fri Oct 23 07:31:06 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CEAAA1AA85;
 Fri, 23 Oct 2015 07:31:06 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id C823512AF;
 Fri, 23 Oct 2015 07:31:05 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N7V4v3067017;
 Fri, 23 Oct 2015 07:31:04 GMT (envelope-from avg@FreeBSD.org)
Received: (from avg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N7V43C067015;
 Fri, 23 Oct 2015 07:31:04 GMT (envelope-from avg@FreeBSD.org)
Message-Id: <201510230731.t9N7V43C067015@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org
 using -f
From: Andriy Gapon <avg@FreeBSD.org>
Date: Fri, 23 Oct 2015 07:31:04 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289786 - in stable/10/sys/cddl/dev/dtrace: amd64 powerpc
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Oct 2015 07:31:06 -0000

Author: avg
Date: Fri Oct 23 07:31:04 2015
New Revision: 289786
URL: https://svnweb.freebsd.org/changeset/base/289786

Log:
  MFC r288361: dtrace_getarg: remove stray return statement on amd64, powerpc

Modified:
  stable/10/sys/cddl/dev/dtrace/amd64/dtrace_isa.c
  stable/10/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cddl/dev/dtrace/amd64/dtrace_isa.c
==============================================================================
--- stable/10/sys/cddl/dev/dtrace/amd64/dtrace_isa.c	Fri Oct 23 07:29:37 2015	(r289785)
+++ stable/10/sys/cddl/dev/dtrace/amd64/dtrace_isa.c	Fri Oct 23 07:31:04 2015	(r289786)
@@ -448,7 +448,6 @@ load:
 	DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT);
 
 	return (val);
-	return (0);
 }
 
 int

Modified: stable/10/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c
==============================================================================
--- stable/10/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c	Fri Oct 23 07:29:37 2015	(r289785)
+++ stable/10/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c	Fri Oct 23 07:31:04 2015	(r289786)
@@ -425,7 +425,6 @@ load:
 	DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT);
 
 	return (val);
-	return (0);
 }
 
 int

From owner-svn-src-stable@freebsd.org  Fri Oct 23 07:32:16 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FDACA1ABCB;
 Fri, 23 Oct 2015 07:32:16 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 4B673151B;
 Fri, 23 Oct 2015 07:32:16 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N7WFWH067710;
 Fri, 23 Oct 2015 07:32:15 GMT (envelope-from avg@FreeBSD.org)
Received: (from avg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N7WFlQ067709;
 Fri, 23 Oct 2015 07:32:15 GMT (envelope-from avg@FreeBSD.org)
Message-Id: <201510230732.t9N7WFlQ067709@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org
 using -f
From: Andriy Gapon <avg@FreeBSD.org>
Date: Fri, 23 Oct 2015 07:32:15 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject: svn commit: r289787 - stable/9/sys/cddl/dev/dtrace/amd64
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Oct 2015 07:32:16 -0000

Author: avg
Date: Fri Oct 23 07:32:15 2015
New Revision: 289787
URL: https://svnweb.freebsd.org/changeset/base/289787

Log:
  MFC r288361: dtrace_getarg: remove stray return statement on amd64
  
  Note: no dtrace/powerpc in stable/9.

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

Modified: stable/9/sys/cddl/dev/dtrace/amd64/dtrace_isa.c
==============================================================================
--- stable/9/sys/cddl/dev/dtrace/amd64/dtrace_isa.c	Fri Oct 23 07:31:04 2015	(r289786)
+++ stable/9/sys/cddl/dev/dtrace/amd64/dtrace_isa.c	Fri Oct 23 07:32:15 2015	(r289787)
@@ -427,7 +427,6 @@ load:
 	DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT);
 
 	return (val);
-	return (0);
 }
 
 int

From owner-svn-src-stable@freebsd.org  Fri Oct 23 07:33:44 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2D1DA1AC44;
 Fri, 23 Oct 2015 07:33:44 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 8FEAD17DE;
 Fri, 23 Oct 2015 07:33:44 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N7XhWi067975;
 Fri, 23 Oct 2015 07:33:43 GMT (envelope-from avg@FreeBSD.org)
Received: (from avg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N7Xhdh067974;
 Fri, 23 Oct 2015 07:33:43 GMT (envelope-from avg@FreeBSD.org)
Message-Id: <201510230733.t9N7Xhdh067974@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org
 using -f
From: Andriy Gapon <avg@FreeBSD.org>
Date: Fri, 23 Oct 2015 07:33:43 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289788 - stable/10/sys/cddl/dev/sdt
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Oct 2015 07:33:44 -0000

Author: avg
Date: Fri Oct 23 07:33:43 2015
New Revision: 289788
URL: https://svnweb.freebsd.org/changeset/base/289788

Log:
  MFC r288364: sdt module does not seem to actually use any symbol from
  opensolaris module

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

Modified: stable/10/sys/cddl/dev/sdt/sdt.c
==============================================================================
--- stable/10/sys/cddl/dev/sdt/sdt.c	Fri Oct 23 07:32:15 2015	(r289787)
+++ stable/10/sys/cddl/dev/sdt/sdt.c	Fri Oct 23 07:33:43 2015	(r289788)
@@ -398,4 +398,3 @@ sdt_modevent(module_t mod __unused, int 
 DEV_MODULE(sdt, sdt_modevent, NULL);
 MODULE_VERSION(sdt, 1);
 MODULE_DEPEND(sdt, dtrace, 1, 1, 1);
-MODULE_DEPEND(sdt, opensolaris, 1, 1, 1);

From owner-svn-src-stable@freebsd.org  Fri Oct 23 07:33:56 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id DFE49A1ACA9;
 Fri, 23 Oct 2015 07:33:56 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id AC13E1936;
 Fri, 23 Oct 2015 07:33:56 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N7XtdQ068049;
 Fri, 23 Oct 2015 07:33:55 GMT (envelope-from avg@FreeBSD.org)
Received: (from avg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N7XtDh068048;
 Fri, 23 Oct 2015 07:33:55 GMT (envelope-from avg@FreeBSD.org)
Message-Id: <201510230733.t9N7XtDh068048@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org
 using -f
From: Andriy Gapon <avg@FreeBSD.org>
Date: Fri, 23 Oct 2015 07:33:55 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject: svn commit: r289789 - stable/9/sys/cddl/dev/sdt
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Oct 2015 07:33:57 -0000

Author: avg
Date: Fri Oct 23 07:33:55 2015
New Revision: 289789
URL: https://svnweb.freebsd.org/changeset/base/289789

Log:
  MFC r288364: sdt module does not seem to actually use any symbol from
  opensolaris module

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

Modified: stable/9/sys/cddl/dev/sdt/sdt.c
==============================================================================
--- stable/9/sys/cddl/dev/sdt/sdt.c	Fri Oct 23 07:33:43 2015	(r289788)
+++ stable/9/sys/cddl/dev/sdt/sdt.c	Fri Oct 23 07:33:55 2015	(r289789)
@@ -398,4 +398,3 @@ sdt_modevent(module_t mod __unused, int 
 DEV_MODULE(sdt, sdt_modevent, NULL);
 MODULE_VERSION(sdt, 1);
 MODULE_DEPEND(sdt, dtrace, 1, 1, 1);
-MODULE_DEPEND(sdt, opensolaris, 1, 1, 1);

From owner-svn-src-stable@freebsd.org  Fri Oct 23 07:35:50 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09E52A1AFAF;
 Fri, 23 Oct 2015 07:35:50 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id C6D3B1D76;
 Fri, 23 Oct 2015 07:35:49 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N7ZmCC068460;
 Fri, 23 Oct 2015 07:35:48 GMT (envelope-from avg@FreeBSD.org)
Received: (from avg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N7ZmYC068459;
 Fri, 23 Oct 2015 07:35:48 GMT (envelope-from avg@FreeBSD.org)
Message-Id: <201510230735.t9N7ZmYC068459@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org
 using -f
From: Andriy Gapon <avg@FreeBSD.org>
Date: Fri, 23 Oct 2015 07:35:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject: svn commit: r289792 - stable/9/sys/cddl/dev/sdt
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Oct 2015 07:35:50 -0000

Author: avg
Date: Fri Oct 23 07:35:48 2015
New Revision: 289792
URL: https://svnweb.freebsd.org/changeset/base/289792

Log:
  MFC r288365: sdt: static-ize couple of variables

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

Modified: stable/9/sys/cddl/dev/sdt/sdt.c
==============================================================================
--- stable/9/sys/cddl/dev/sdt/sdt.c	Fri Oct 23 07:35:39 2015	(r289791)
+++ stable/9/sys/cddl/dev/sdt/sdt.c	Fri Oct 23 07:35:48 2015	(r289792)
@@ -100,8 +100,8 @@ static dtrace_pops_t sdt_pops = {
 
 static TAILQ_HEAD(, sdt_provider) sdt_prov_list;
 
-eventhandler_tag	sdt_kld_load_tag;
-eventhandler_tag	sdt_kld_unload_try_tag;
+static eventhandler_tag	sdt_kld_load_tag;
+static eventhandler_tag	sdt_kld_unload_try_tag;
 
 static void
 sdt_create_provider(struct sdt_provider *prov)

From owner-svn-src-stable@freebsd.org  Fri Oct 23 07:35:40 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66961A1AF84;
 Fri, 23 Oct 2015 07:35:40 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 350D21C7E;
 Fri, 23 Oct 2015 07:35:40 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N7ZdX5068395;
 Fri, 23 Oct 2015 07:35:39 GMT (envelope-from avg@FreeBSD.org)
Received: (from avg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N7ZdL4068393;
 Fri, 23 Oct 2015 07:35:39 GMT (envelope-from avg@FreeBSD.org)
Message-Id: <201510230735.t9N7ZdL4068393@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org
 using -f
From: Andriy Gapon <avg@FreeBSD.org>
Date: Fri, 23 Oct 2015 07:35:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289791 - stable/10/sys/cddl/dev/sdt
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Oct 2015 07:35:40 -0000

Author: avg
Date: Fri Oct 23 07:35:39 2015
New Revision: 289791
URL: https://svnweb.freebsd.org/changeset/base/289791

Log:
  MFC r288365: sdt: static-ize couple of variables

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

Modified: stable/10/sys/cddl/dev/sdt/sdt.c
==============================================================================
--- stable/10/sys/cddl/dev/sdt/sdt.c	Fri Oct 23 07:34:57 2015	(r289790)
+++ stable/10/sys/cddl/dev/sdt/sdt.c	Fri Oct 23 07:35:39 2015	(r289791)
@@ -100,8 +100,8 @@ static dtrace_pops_t sdt_pops = {
 
 static TAILQ_HEAD(, sdt_provider) sdt_prov_list;
 
-eventhandler_tag	sdt_kld_load_tag;
-eventhandler_tag	sdt_kld_unload_try_tag;
+static eventhandler_tag	sdt_kld_load_tag;
+static eventhandler_tag	sdt_kld_unload_try_tag;
 
 static void
 sdt_create_provider(struct sdt_provider *prov)

From owner-svn-src-stable@freebsd.org  Fri Oct 23 07:37:46 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4181FA191EC;
 Fri, 23 Oct 2015 07:37:46 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 07D052E3;
 Fri, 23 Oct 2015 07:37:45 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N7biaU068874;
 Fri, 23 Oct 2015 07:37:44 GMT (envelope-from avg@FreeBSD.org)
Received: (from avg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N7bibS068873;
 Fri, 23 Oct 2015 07:37:44 GMT (envelope-from avg@FreeBSD.org)
Message-Id: <201510230737.t9N7bibS068873@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org
 using -f
From: Andriy Gapon <avg@FreeBSD.org>
Date: Fri, 23 Oct 2015 07:37:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289795 - stable/10/sys/sys
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Oct 2015 07:37:46 -0000

Author: avg
Date: Fri Oct 23 07:37:44 2015
New Revision: 289795
URL: https://svnweb.freebsd.org/changeset/base/289795

Log:
  MFC r288366: sdt.h: no need for argtype_list_head

Modified:
  stable/10/sys/sys/sdt.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/sys/sdt.h
==============================================================================
--- stable/10/sys/sys/sdt.h	Fri Oct 23 07:37:27 2015	(r289794)
+++ stable/10/sys/sys/sdt.h	Fri Oct 23 07:37:44 2015	(r289795)
@@ -398,7 +398,7 @@ struct sdt_probe {
 	struct sdt_provider *prov;	/* Ptr to the provider structure. */
 	TAILQ_ENTRY(sdt_probe)
 			probe_entry;	/* SDT probe list entry. */
-	TAILQ_HEAD(argtype_list_head, sdt_argtype) argtype_list;
+	TAILQ_HEAD(, sdt_argtype) argtype_list;
 	const char	*mod;
 	const char	*func;
 	const char	*name;

From owner-svn-src-stable@freebsd.org  Fri Oct 23 07:37:56 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46B62A19236;
 Fri, 23 Oct 2015 07:37:56 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 0EB8A656;
 Fri, 23 Oct 2015 07:37:55 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N7btWj068943;
 Fri, 23 Oct 2015 07:37:55 GMT (envelope-from avg@FreeBSD.org)
Received: (from avg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N7btvP068942;
 Fri, 23 Oct 2015 07:37:55 GMT (envelope-from avg@FreeBSD.org)
Message-Id: <201510230737.t9N7btvP068942@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org
 using -f
From: Andriy Gapon <avg@FreeBSD.org>
Date: Fri, 23 Oct 2015 07:37:55 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject: svn commit: r289796 - stable/9/sys/sys
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Oct 2015 07:37:56 -0000

Author: avg
Date: Fri Oct 23 07:37:54 2015
New Revision: 289796
URL: https://svnweb.freebsd.org/changeset/base/289796

Log:
  MFC r288366: sdt.h: no need for argtype_list_head

Modified:
  stable/9/sys/sys/sdt.h
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/sys/   (props changed)

Modified: stable/9/sys/sys/sdt.h
==============================================================================
--- stable/9/sys/sys/sdt.h	Fri Oct 23 07:37:44 2015	(r289795)
+++ stable/9/sys/sys/sdt.h	Fri Oct 23 07:37:54 2015	(r289796)
@@ -398,7 +398,7 @@ struct sdt_probe {
 	struct sdt_provider *prov;	/* Ptr to the provider structure. */
 	TAILQ_ENTRY(sdt_probe)
 			probe_entry;	/* SDT probe list entry. */
-	TAILQ_HEAD(argtype_list_head, sdt_argtype) argtype_list;
+	TAILQ_HEAD(, sdt_argtype) argtype_list;
 	const char	*mod;
 	const char	*func;
 	const char	*name;

From owner-svn-src-stable@freebsd.org  Fri Oct 23 07:40:46 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF633A19462;
 Fri, 23 Oct 2015 07:40:45 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id B7EABB28;
 Fri, 23 Oct 2015 07:40:45 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N7ei87069441;
 Fri, 23 Oct 2015 07:40:44 GMT (envelope-from avg@FreeBSD.org)
Received: (from avg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N7ehGp069426;
 Fri, 23 Oct 2015 07:40:43 GMT (envelope-from avg@FreeBSD.org)
Message-Id: <201510230740.t9N7ehGp069426@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org
 using -f
From: Andriy Gapon <avg@FreeBSD.org>
Date: Fri, 23 Oct 2015 07:40:43 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289798 - in stable/10/sys: compat/linux kern tools
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Oct 2015 07:40:46 -0000

Author: avg
Date: Fri Oct 23 07:40:43 2015
New Revision: 289798
URL: https://svnweb.freebsd.org/changeset/base/289798

Log:
  MFC r288336: save some bytes by using more concise SDT_PROBE<n>

Modified:
  stable/10/sys/compat/linux/linux_dtrace.h
  stable/10/sys/kern/kern_exec.c
  stable/10/sys/kern/kern_exit.c
  stable/10/sys/kern/kern_fork.c
  stable/10/sys/kern/kern_proc.c
  stable/10/sys/kern/kern_racct.c
  stable/10/sys/kern/kern_sig.c
  stable/10/sys/kern/kern_timeout.c
  stable/10/sys/kern/vfs_cache.c
  stable/10/sys/kern/vfs_lookup.c
  stable/10/sys/kern/vfs_syscalls.c
  stable/10/sys/tools/vnode_if.awk
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/compat/linux/linux_dtrace.h
==============================================================================
--- stable/10/sys/compat/linux/linux_dtrace.h	Fri Oct 23 07:38:34 2015	(r289797)
+++ stable/10/sys/compat/linux/linux_dtrace.h	Fri Oct 23 07:40:43 2015	(r289798)
@@ -82,7 +82,7 @@
     c, d, e, f)
 #define	LIN_SDT_PROBE4(a, b, c, d, e, f, g)	SDT_PROBE4(LINUX_DTRACE, a, b, \
     c, d, e, f, g)
-#define	_LIN_SDT_PROBE5(a, b, c, d, e, f, g, h, i)	SDT_PROBE(a, b, c, d, \
+#define	_LIN_SDT_PROBE5(a, b, c, d, e, f, g, h, i)	SDT_PROBE5(a, b, c, d, \
     e, f, g, h, i)
 #define	LIN_SDT_PROBE5(a, b, c, d, e, f, g, h)	_LIN_SDT_PROBE5(LINUX_DTRACE, \
     a, b, c, d, e, f, g, h)

Modified: stable/10/sys/kern/kern_exec.c
==============================================================================
--- stable/10/sys/kern/kern_exec.c	Fri Oct 23 07:38:34 2015	(r289797)
+++ stable/10/sys/kern/kern_exec.c	Fri Oct 23 07:40:43 2015	(r289798)
@@ -416,7 +416,7 @@ do_execve(td, args, mac_p)
 		    | AUDITVNODE1, UIO_SYSSPACE, args->fname, td);
 	}
 
-	SDT_PROBE(proc, kernel, , exec, args->fname, 0, 0, 0, 0 );
+	SDT_PROBE1(proc, kernel, , exec, args->fname);
 
 interpret:
 	if (args->fname != NULL) {
@@ -838,7 +838,7 @@ interpret:
 
 	vfs_mark_atime(imgp->vp, td->td_ucred);
 
-	SDT_PROBE(proc, kernel, , exec__success, args->fname, 0, 0, 0, 0);
+	SDT_PROBE1(proc, kernel, , exec__success, args->fname);
 
 	VOP_UNLOCK(imgp->vp, 0);
 done1:
@@ -909,7 +909,7 @@ exec_fail:
 	p->p_flag &= ~P_INEXEC;
 	PROC_UNLOCK(p);
 
-	SDT_PROBE(proc, kernel, , exec__failure, error, 0, 0, 0, 0);
+	SDT_PROBE1(proc, kernel, , exec__failure, error);
 
 done2:
 #ifdef MAC

Modified: stable/10/sys/kern/kern_exit.c
==============================================================================
--- stable/10/sys/kern/kern_exit.c	Fri Oct 23 07:38:34 2015	(r289797)
+++ stable/10/sys/kern/kern_exit.c	Fri Oct 23 07:40:43 2015	(r289798)
@@ -564,7 +564,7 @@ exit1(struct thread *td, int rv)
 		reason = CLD_DUMPED;
 	else if (WIFSIGNALED(rv))
 		reason = CLD_KILLED;
-	SDT_PROBE(proc, kernel, , exit, reason, 0, 0, 0, 0);
+	SDT_PROBE1(proc, kernel, , exit, reason);
 #endif
 
 	/*

Modified: stable/10/sys/kern/kern_fork.c
==============================================================================
--- stable/10/sys/kern/kern_fork.c	Fri Oct 23 07:38:34 2015	(r289797)
+++ stable/10/sys/kern/kern_fork.c	Fri Oct 23 07:40:43 2015	(r289798)
@@ -753,7 +753,7 @@ do_fork(struct thread *td, int flags, st
 	 * Tell any interested parties about the new process.
 	 */
 	knote_fork(&p1->p_klist, p2->p_pid);
-	SDT_PROBE(proc, kernel, , create, p2, p1, flags, 0, 0);
+	SDT_PROBE3(proc, kernel, , create, p2, p1, flags);
 
 	/*
 	 * Wait until debugger is attached to child.

Modified: stable/10/sys/kern/kern_proc.c
==============================================================================
--- stable/10/sys/kern/kern_proc.c	Fri Oct 23 07:38:34 2015	(r289797)
+++ stable/10/sys/kern/kern_proc.c	Fri Oct 23 07:40:43 2015	(r289798)
@@ -181,9 +181,9 @@ proc_ctor(void *mem, int size, void *arg
 	struct proc *p;
 
 	p = (struct proc *)mem;
-	SDT_PROBE(proc, kernel, ctor , entry, p, size, arg, flags, 0);
+	SDT_PROBE4(proc, kernel, ctor , entry, p, size, arg, flags);
 	EVENTHANDLER_INVOKE(process_ctor, p);
-	SDT_PROBE(proc, kernel, ctor , return, p, size, arg, flags, 0);
+	SDT_PROBE4(proc, kernel, ctor , return, p, size, arg, flags);
 	return (0);
 }
 
@@ -199,7 +199,7 @@ proc_dtor(void *mem, int size, void *arg
 	/* INVARIANTS checks go here */
 	p = (struct proc *)mem;
 	td = FIRST_THREAD_IN_PROC(p);
-	SDT_PROBE(proc, kernel, dtor, entry, p, size, arg, td, 0);
+	SDT_PROBE4(proc, kernel, dtor, entry, p, size, arg, td);
 	if (td != NULL) {
 #ifdef INVARIANTS
 		KASSERT((p->p_numthreads == 1),
@@ -212,7 +212,7 @@ proc_dtor(void *mem, int size, void *arg
 	EVENTHANDLER_INVOKE(process_dtor, p);
 	if (p->p_ksi != NULL)
 		KASSERT(! KSI_ONQ(p->p_ksi), ("SIGCHLD queue"));
-	SDT_PROBE(proc, kernel, dtor, return, p, size, arg, 0, 0);
+	SDT_PROBE3(proc, kernel, dtor, return, p, size, arg);
 }
 
 /*
@@ -224,7 +224,7 @@ proc_init(void *mem, int size, int flags
 	struct proc *p;
 
 	p = (struct proc *)mem;
-	SDT_PROBE(proc, kernel, init, entry, p, size, flags, 0, 0);
+	SDT_PROBE3(proc, kernel, init, entry, p, size, flags);
 	p->p_sched = (struct p_sched *)&p[1];
 	bzero(&p->p_mtx, sizeof(struct mtx));
 	mtx_init(&p->p_mtx, "process lock", NULL, MTX_DEF | MTX_DUPOK);
@@ -234,7 +234,7 @@ proc_init(void *mem, int size, int flags
 	TAILQ_INIT(&p->p_threads);	     /* all threads in proc */
 	EVENTHANDLER_INVOKE(process_init, p);
 	p->p_stats = pstats_alloc();
-	SDT_PROBE(proc, kernel, init, return, p, size, flags, 0, 0);
+	SDT_PROBE3(proc, kernel, init, return, p, size, flags);
 	return (0);
 }
 

Modified: stable/10/sys/kern/kern_racct.c
==============================================================================
--- stable/10/sys/kern/kern_racct.c	Fri Oct 23 07:38:34 2015	(r289797)
+++ stable/10/sys/kern/kern_racct.c	Fri Oct 23 07:40:43 2015	(r289798)
@@ -447,7 +447,7 @@ racct_create(struct racct **racctp)
 	if (!racct_enable)
 		return;
 
-	SDT_PROBE(racct, kernel, racct, create, racctp, 0, 0, 0, 0);
+	SDT_PROBE1(racct, kernel, racct, create, racctp);
 
 	KASSERT(*racctp == NULL, ("racct already allocated"));
 
@@ -462,7 +462,7 @@ racct_destroy_locked(struct racct **racc
 
 	ASSERT_RACCT_ENABLED();
 
-	SDT_PROBE(racct, kernel, racct, destroy, racctp, 0, 0, 0, 0);
+	SDT_PROBE1(racct, kernel, racct, destroy, racctp);
 
 	mtx_assert(&racct_lock, MA_OWNED);
 	KASSERT(racctp != NULL, ("NULL racctp"));
@@ -540,7 +540,7 @@ racct_add_locked(struct proc *p, int res
 
 	ASSERT_RACCT_ENABLED();
 
-	SDT_PROBE(racct, kernel, rusage, add, p, resource, amount, 0, 0);
+	SDT_PROBE3(racct, kernel, rusage, add, p, resource, amount);
 
 	/*
 	 * We need proc lock to dereference p->p_ucred.
@@ -550,8 +550,8 @@ racct_add_locked(struct proc *p, int res
 #ifdef RCTL
 	error = rctl_enforce(p, resource, amount);
 	if (error && RACCT_IS_DENIABLE(resource)) {
-		SDT_PROBE(racct, kernel, rusage, add__failure, p, resource,
-		    amount, 0, 0);
+		SDT_PROBE3(racct, kernel, rusage, add__failure, p, resource,
+		    amount);
 		return (error);
 	}
 #endif
@@ -586,8 +586,7 @@ racct_add_cred_locked(struct ucred *cred
 
 	ASSERT_RACCT_ENABLED();
 
-	SDT_PROBE(racct, kernel, rusage, add__cred, cred, resource, amount,
-	    0, 0);
+	SDT_PROBE3(racct, kernel, rusage, add__cred, cred, resource, amount);
 
 	racct_adjust_resource(cred->cr_ruidinfo->ui_racct, resource, amount);
 	for (pr = cred->cr_prison; pr != NULL; pr = pr->pr_parent)
@@ -625,7 +624,7 @@ racct_add_force(struct proc *p, int reso
 	if (!racct_enable)
 		return;
 
-	SDT_PROBE(racct, kernel, rusage, add__force, p, resource, amount, 0, 0);
+	SDT_PROBE3(racct, kernel, rusage, add__force, p, resource, amount);
 
 	/*
 	 * We need proc lock to dereference p->p_ucred.
@@ -649,7 +648,7 @@ racct_set_locked(struct proc *p, int res
 
 	ASSERT_RACCT_ENABLED();
 
-	SDT_PROBE(racct, kernel, rusage, set, p, resource, amount, 0, 0);
+	SDT_PROBE3(racct, kernel, rusage, set, p, resource, amount);
 
 	/*
 	 * We need proc lock to dereference p->p_ucred.
@@ -681,8 +680,8 @@ racct_set_locked(struct proc *p, int res
 	if (diff_proc > 0) {
 		error = rctl_enforce(p, resource, diff_proc);
 		if (error && RACCT_IS_DENIABLE(resource)) {
-			SDT_PROBE(racct, kernel, rusage, set__failure, p,
-			    resource, amount, 0, 0);
+			SDT_PROBE3(racct, kernel, rusage, set__failure, p,
+			    resource, amount);
 			return (error);
 		}
 	}
@@ -725,7 +724,7 @@ racct_set_force_locked(struct proc *p, i
 
 	ASSERT_RACCT_ENABLED();
 
-	SDT_PROBE(racct, kernel, rusage, set, p, resource, amount, 0, 0);
+	SDT_PROBE3(racct, kernel, rusage, set, p, resource, amount);
 
 	/*
 	 * We need proc lock to dereference p->p_ucred.
@@ -836,7 +835,7 @@ racct_sub(struct proc *p, int resource, 
 	if (!racct_enable)
 		return;
 
-	SDT_PROBE(racct, kernel, rusage, sub, p, resource, amount, 0, 0);
+	SDT_PROBE3(racct, kernel, rusage, sub, p, resource, amount);
 
 	/*
 	 * We need proc lock to dereference p->p_ucred.
@@ -863,8 +862,7 @@ racct_sub_cred_locked(struct ucred *cred
 
 	ASSERT_RACCT_ENABLED();
 
-	SDT_PROBE(racct, kernel, rusage, sub__cred, cred, resource, amount,
-	    0, 0);
+	SDT_PROBE3(racct, kernel, rusage, sub__cred, cred, resource, amount);
 
 #ifdef notyet
 	KASSERT(RACCT_CAN_DROP(resource),

Modified: stable/10/sys/kern/kern_sig.c
==============================================================================
--- stable/10/sys/kern/kern_sig.c	Fri Oct 23 07:38:34 2015	(r289797)
+++ stable/10/sys/kern/kern_sig.c	Fri Oct 23 07:40:43 2015	(r289798)
@@ -1291,7 +1291,7 @@ kern_sigtimedwait(struct thread *td, sig
 		reschedule_signals(p, new_block, 0);
 
 	if (error == 0) {
-		SDT_PROBE(proc, kernel, , signal__clear, sig, ksi, 0, 0, 0);
+		SDT_PROBE2(proc, kernel, , signal__clear, sig, ksi);
 
 		if (ksi->ksi_code == SI_TIMER)
 			itimer_accept(p, ksi->ksi_timerid, ksi);
@@ -2108,7 +2108,7 @@ tdsendsignal(struct proc *p, struct thre
 	} else
 		sigqueue = &td->td_sigqueue;
 
-	SDT_PROBE(proc, kernel, , signal__send, td, p, sig, 0, 0 );
+	SDT_PROBE3(proc, kernel, , signal__send, td, p, sig);
 
 	/*
 	 * If the signal is being ignored,
@@ -2119,7 +2119,7 @@ tdsendsignal(struct proc *p, struct thre
 	 */
 	mtx_lock(&ps->ps_mtx);
 	if (SIGISMEMBER(ps->ps_sigignore, sig)) {
-		SDT_PROBE(proc, kernel, , signal__discard, td, p, sig, 0, 0 );
+		SDT_PROBE3(proc, kernel, , signal__discard, td, p, sig);
 
 		mtx_unlock(&ps->ps_mtx);
 		if (ksi && (ksi->ksi_flags & KSI_INS))

Modified: stable/10/sys/kern/kern_timeout.c
==============================================================================
--- stable/10/sys/kern/kern_timeout.c	Fri Oct 23 07:38:34 2015	(r289797)
+++ stable/10/sys/kern/kern_timeout.c	Fri Oct 23 07:40:43 2015	(r289798)
@@ -681,9 +681,9 @@ softclock_call_cc(struct callout *c, str
 	sbt1 = sbinuptime();
 #endif
 	THREAD_NO_SLEEPING();
-	SDT_PROBE(callout_execute, kernel, , callout__start, c, 0, 0, 0, 0);
+	SDT_PROBE1(callout_execute, kernel, , callout__start, c);
 	c_func(c_arg);
-	SDT_PROBE(callout_execute, kernel, , callout__end, c, 0, 0, 0, 0);
+	SDT_PROBE1(callout_execute, kernel, , callout__end, c);
 	THREAD_SLEEPING_OK();
 #if defined(DIAGNOSTIC) || defined(CALLOUT_PROFILING)
 	sbt2 = sbinuptime();

Modified: stable/10/sys/kern/vfs_cache.c
==============================================================================
--- stable/10/sys/kern/vfs_cache.c	Fri Oct 23 07:38:34 2015	(r289797)
+++ stable/10/sys/kern/vfs_cache.c	Fri Oct 23 07:40:43 2015	(r289798)
@@ -420,11 +420,11 @@ cache_zap(ncp)
 	CTR2(KTR_VFS, "cache_zap(%p) vp %p", ncp, ncp->nc_vp);
 #ifdef KDTRACE_HOOKS
 	if (ncp->nc_vp != NULL) {
-		SDT_PROBE(vfs, namecache, zap, done, ncp->nc_dvp,
-		    nc_get_name(ncp), ncp->nc_vp, 0, 0);
+		SDT_PROBE3(vfs, namecache, zap, done, ncp->nc_dvp,
+		    nc_get_name(ncp), ncp->nc_vp);
 	} else {
-		SDT_PROBE(vfs, namecache, zap_negative, done, ncp->nc_dvp,
-		    nc_get_name(ncp), 0, 0, 0);
+		SDT_PROBE2(vfs, namecache, zap_negative, done, ncp->nc_dvp,
+		    nc_get_name(ncp));
 	}
 #endif
 	vp = NULL;
@@ -499,8 +499,7 @@ retry_wlocked:
 			CTR2(KTR_VFS, "cache_lookup(%p, %s) found via .",
 			    dvp, cnp->cn_nameptr);
 			dothits++;
-			SDT_PROBE(vfs, namecache, lookup, hit, dvp, ".",
-			    *vpp, 0, 0);
+			SDT_PROBE3(vfs, namecache, lookup, hit, dvp, ".", *vpp);
 			if (tsp != NULL)
 				timespecclear(tsp);
 			if (ticksp != NULL)
@@ -510,8 +509,8 @@ retry_wlocked:
 		if (cnp->cn_namelen == 2 && cnp->cn_nameptr[1] == '.') {
 			dotdothits++;
 			if (dvp->v_cache_dd == NULL) {
-				SDT_PROBE(vfs, namecache, lookup, miss, dvp,
-				    "..", NULL, 0, 0);
+				SDT_PROBE3(vfs, namecache, lookup, miss, dvp,
+				    "..", NULL);
 				goto unlock;
 			}
 			if ((cnp->cn_flags & MAKEENTRY) == 0) {
@@ -533,8 +532,8 @@ retry_wlocked:
 				goto negative_success;
 			CTR3(KTR_VFS, "cache_lookup(%p, %s) found %p via ..",
 			    dvp, cnp->cn_nameptr, *vpp);
-			SDT_PROBE(vfs, namecache, lookup, hit, dvp, "..",
-			    *vpp, 0, 0);
+			SDT_PROBE3(vfs, namecache, lookup, hit, dvp, "..",
+			    *vpp);
 			cache_out_ts(ncp, tsp, ticksp);
 			if ((ncp->nc_flag & (NCF_ISDOTDOT | NCF_DTS)) ==
 			    NCF_DTS && tsp != NULL)
@@ -555,8 +554,8 @@ retry_wlocked:
 
 	/* We failed to find an entry */
 	if (ncp == NULL) {
-		SDT_PROBE(vfs, namecache, lookup, miss, dvp, cnp->cn_nameptr,
-		    NULL, 0, 0);
+		SDT_PROBE3(vfs, namecache, lookup, miss, dvp, cnp->cn_nameptr,
+		    NULL);
 		if ((cnp->cn_flags & MAKEENTRY) == 0) {
 			nummisszap++;
 		} else {
@@ -584,8 +583,8 @@ retry_wlocked:
 		*vpp = ncp->nc_vp;
 		CTR4(KTR_VFS, "cache_lookup(%p, %s) found %p via ncp %p",
 		    dvp, cnp->cn_nameptr, *vpp, ncp);
-		SDT_PROBE(vfs, namecache, lookup, hit, dvp, nc_get_name(ncp),
-		    *vpp, 0, 0);
+		SDT_PROBE3(vfs, namecache, lookup, hit, dvp, nc_get_name(ncp),
+		    *vpp);
 		cache_out_ts(ncp, tsp, ticksp);
 		goto success;
 	}
@@ -616,8 +615,8 @@ negative_success:
 	nchstats.ncs_neghits++;
 	if (ncp->nc_flag & NCF_WHITE)
 		cnp->cn_flags |= ISWHITEOUT;
-	SDT_PROBE(vfs, namecache, lookup, hit__negative, dvp, nc_get_name(ncp),
-	    0, 0, 0);
+	SDT_PROBE2(vfs, namecache, lookup, hit__negative, dvp,
+	    nc_get_name(ncp));
 	cache_out_ts(ncp, tsp, ticksp);
 	CACHE_WUNLOCK();
 	return (ENOENT);
@@ -770,8 +769,7 @@ cache_enter_time(dvp, vp, cnp, tsp, dtsp
 				return;
 			}
 			dvp->v_cache_dd = NULL;
-			SDT_PROBE(vfs, namecache, enter, done, dvp, "..", vp,
-			    0, 0);
+			SDT_PROBE3(vfs, namecache, enter, done, dvp, "..", vp);
 			CACHE_WUNLOCK();
 			flag = NCF_ISDOTDOT;
 		}
@@ -891,12 +889,12 @@ cache_enter_time(dvp, vp, cnp, tsp, dtsp
 	 */
 	if (vp) {
 		TAILQ_INSERT_HEAD(&vp->v_cache_dst, ncp, nc_dst);
-		SDT_PROBE(vfs, namecache, enter, done, dvp, nc_get_name(ncp),
-		    vp, 0, 0);
+		SDT_PROBE3(vfs, namecache, enter, done, dvp, nc_get_name(ncp),
+		    vp);
 	} else {
 		TAILQ_INSERT_TAIL(&ncneg, ncp, nc_dst);
-		SDT_PROBE(vfs, namecache, enter_negative, done, dvp,
-		    nc_get_name(ncp), 0, 0, 0);
+		SDT_PROBE2(vfs, namecache, enter_negative, done, dvp,
+		    nc_get_name(ncp));
 	}
 	if (numneg * ncnegfactor > numcache) {
 		ncp = TAILQ_FIRST(&ncneg);
@@ -985,7 +983,7 @@ cache_purge(vp)
 {
 
 	CTR1(KTR_VFS, "cache_purge(%p)", vp);
-	SDT_PROBE(vfs, namecache, purge, done, vp, 0, 0, 0, 0);
+	SDT_PROBE1(vfs, namecache, purge, done, vp);
 	CACHE_WLOCK();
 	while (!LIST_EMPTY(&vp->v_cache_src))
 		cache_zap(LIST_FIRST(&vp->v_cache_src));
@@ -1010,7 +1008,7 @@ cache_purge_negative(vp)
 	struct namecache *cp, *ncp;
 
 	CTR1(KTR_VFS, "cache_purge_negative(%p)", vp);
-	SDT_PROBE(vfs, namecache, purge_negative, done, vp, 0, 0, 0, 0);
+	SDT_PROBE1(vfs, namecache, purge_negative, done, vp);
 	CACHE_WLOCK();
 	LIST_FOREACH_SAFE(cp, &vp->v_cache_src, nc_src, ncp) {
 		if (cp->nc_vp == NULL)
@@ -1030,7 +1028,7 @@ cache_purgevfs(mp)
 	struct namecache *ncp, *nnp;
 
 	/* Scan hash tables for applicable entries */
-	SDT_PROBE(vfs, namecache, purgevfs, done, mp, 0, 0, 0, 0);
+	SDT_PROBE1(vfs, namecache, purgevfs, done, mp);
 	CACHE_WLOCK();
 	for (ncpp = &nchashtbl[nchash]; ncpp >= nchashtbl; ncpp--) {
 		LIST_FOREACH_SAFE(ncp, ncpp, nc_hash, nnp) {
@@ -1252,14 +1250,14 @@ vn_vptocnp_locked(struct vnode **vp, str
 			vrele(*vp);
 			numfullpathfail4++;
 			error = ENOMEM;
-			SDT_PROBE(vfs, namecache, fullpath, return, error,
-			    vp, NULL, 0, 0);
+			SDT_PROBE3(vfs, namecache, fullpath, return, error,
+			    vp, NULL);
 			return (error);
 		}
 		*buflen -= ncp->nc_nlen;
 		memcpy(buf + *buflen, nc_get_name(ncp), ncp->nc_nlen);
-		SDT_PROBE(vfs, namecache, fullpath, hit, ncp->nc_dvp,
-		    nc_get_name(ncp), vp, 0, 0);
+		SDT_PROBE3(vfs, namecache, fullpath, hit, ncp->nc_dvp,
+		    nc_get_name(ncp), vp);
 		dvp = *vp;
 		*vp = ncp->nc_dvp;
 		vref(*vp);
@@ -1268,7 +1266,7 @@ vn_vptocnp_locked(struct vnode **vp, str
 		CACHE_RLOCK();
 		return (0);
 	}
-	SDT_PROBE(vfs, namecache, fullpath, miss, vp, 0, 0, 0, 0);
+	SDT_PROBE1(vfs, namecache, fullpath, miss, vp);
 
 	CACHE_RUNLOCK();
 	vn_lock(*vp, LK_SHARED | LK_RETRY);
@@ -1276,8 +1274,7 @@ vn_vptocnp_locked(struct vnode **vp, str
 	vput(*vp);
 	if (error) {
 		numfullpathfail2++;
-		SDT_PROBE(vfs, namecache, fullpath, return,  error, vp,
-		    NULL, 0, 0);
+		SDT_PROBE3(vfs, namecache, fullpath, return,  error, vp, NULL);
 		return (error);
 	}
 
@@ -1288,8 +1285,7 @@ vn_vptocnp_locked(struct vnode **vp, str
 		CACHE_RUNLOCK();
 		vrele(dvp);
 		error = ENOENT;
-		SDT_PROBE(vfs, namecache, fullpath, return, error, vp,
-		    NULL, 0, 0);
+		SDT_PROBE3(vfs, namecache, fullpath, return, error, vp, NULL);
 		return (error);
 	}
 	/*
@@ -1317,7 +1313,7 @@ vn_fullpath1(struct thread *td, struct v
 	error = 0;
 	slash_prefixed = 0;
 
-	SDT_PROBE(vfs, namecache, fullpath, entry, vp, 0, 0, 0, 0);
+	SDT_PROBE1(vfs, namecache, fullpath, entry, vp);
 	numfullpathcalls++;
 	vref(vp);
 	CACHE_RLOCK();
@@ -1339,8 +1335,8 @@ vn_fullpath1(struct thread *td, struct v
 				CACHE_RUNLOCK();
 				vrele(vp);
 				error = ENOENT;
-				SDT_PROBE(vfs, namecache, fullpath, return,
-				    error, vp, NULL, 0, 0);
+				SDT_PROBE3(vfs, namecache, fullpath, return,
+				    error, vp, NULL);
 				break;
 			}
 			vp1 = vp->v_mount->mnt_vnodecovered;
@@ -1356,8 +1352,8 @@ vn_fullpath1(struct thread *td, struct v
 			vrele(vp);
 			numfullpathfail1++;
 			error = ENOTDIR;
-			SDT_PROBE(vfs, namecache, fullpath, return,
-			    error, vp, NULL, 0, 0);
+			SDT_PROBE3(vfs, namecache, fullpath, return,
+			    error, vp, NULL);
 			break;
 		}
 		error = vn_vptocnp_locked(&vp, td->td_ucred, buf, &buflen);
@@ -1367,8 +1363,8 @@ vn_fullpath1(struct thread *td, struct v
 			CACHE_RUNLOCK();
 			vrele(vp);
 			error = ENOMEM;
-			SDT_PROBE(vfs, namecache, fullpath, return, error,
-			    startvp, NULL, 0, 0);
+			SDT_PROBE3(vfs, namecache, fullpath, return, error,
+			    startvp, NULL);
 			break;
 		}
 		buf[--buflen] = '/';
@@ -1381,8 +1377,8 @@ vn_fullpath1(struct thread *td, struct v
 			CACHE_RUNLOCK();
 			vrele(vp);
 			numfullpathfail4++;
-			SDT_PROBE(vfs, namecache, fullpath, return, ENOMEM,
-			    startvp, NULL, 0, 0);
+			SDT_PROBE3(vfs, namecache, fullpath, return, ENOMEM,
+			    startvp, NULL);
 			return (ENOMEM);
 		}
 		buf[--buflen] = '/';
@@ -1391,8 +1387,7 @@ vn_fullpath1(struct thread *td, struct v
 	CACHE_RUNLOCK();
 	vrele(vp);
 
-	SDT_PROBE(vfs, namecache, fullpath, return, 0, startvp, buf + buflen,
-	    0, 0);
+	SDT_PROBE3(vfs, namecache, fullpath, return, 0, startvp, buf + buflen);
 	*retbuf = buf + buflen;
 	return (0);
 }

Modified: stable/10/sys/kern/vfs_lookup.c
==============================================================================
--- stable/10/sys/kern/vfs_lookup.c	Fri Oct 23 07:38:34 2015	(r289797)
+++ stable/10/sys/kern/vfs_lookup.c	Fri Oct 23 07:40:43 2015	(r289798)
@@ -273,8 +273,8 @@ namei(struct nameidata *ndp)
 		if (ndp->ni_startdir != NULL)
 			vrele(ndp->ni_startdir);
 	}
-	SDT_PROBE(vfs, namei, lookup, entry, dp, cnp->cn_pnbuf,
-	    cnp->cn_flags, 0, 0);
+	SDT_PROBE3(vfs, namei, lookup, entry, dp, cnp->cn_pnbuf,
+	    cnp->cn_flags);
 	for (;;) {
 		/*
 		 * Check if root directory should replace current directory.
@@ -302,8 +302,7 @@ namei(struct nameidata *ndp)
 		error = lookup(ndp);
 		if (error) {
 			namei_cleanup_cnp(cnp);
-			SDT_PROBE(vfs, namei, lookup, return, error, NULL, 0,
-			    0, 0);
+			SDT_PROBE2(vfs, namei, lookup, return, error, NULL);
 			return (error);
 		}
 		/*
@@ -315,8 +314,7 @@ namei(struct nameidata *ndp)
 			} else
 				cnp->cn_flags |= HASBUF;
 
-			SDT_PROBE(vfs, namei, lookup, return, 0, ndp->ni_vp,
-			    0, 0, 0);
+			SDT_PROBE2(vfs, namei, lookup, return, 0, ndp->ni_vp);
 			return (0);
 		}
 		if (ndp->ni_loopcnt++ >= MAXSYMLINKS) {
@@ -377,7 +375,7 @@ namei(struct nameidata *ndp)
 	vput(ndp->ni_vp);
 	ndp->ni_vp = NULL;
 	vrele(ndp->ni_dvp);
-	SDT_PROBE(vfs, namei, lookup, return, error, NULL, 0, 0, 0);
+	SDT_PROBE2(vfs, namei, lookup, return, error, NULL);
 	return (error);
 }
 

Modified: stable/10/sys/kern/vfs_syscalls.c
==============================================================================
--- stable/10/sys/kern/vfs_syscalls.c	Fri Oct 23 07:38:34 2015	(r289797)
+++ stable/10/sys/kern/vfs_syscalls.c	Fri Oct 23 07:40:43 2015	(r289798)
@@ -2299,9 +2299,9 @@ kern_statat_vnhook(struct thread *td, in
 		return (error);
 	error = vn_stat(nd.ni_vp, &sb, td->td_ucred, NOCRED, td);
 	if (error == 0) {
-		SDT_PROBE(vfs, , stat, mode, path, sb.st_mode, 0, 0, 0);
+		SDT_PROBE2(vfs, , stat, mode, path, sb.st_mode);
 		if (S_ISREG(sb.st_mode))
-			SDT_PROBE(vfs, , stat, reg, path, pathseg, 0, 0, 0);
+			SDT_PROBE2(vfs, , stat, reg, path, pathseg);
 		if (__predict_false(hook != NULL))
 			hook(nd.ni_vp, &sb);
 	}

Modified: stable/10/sys/tools/vnode_if.awk
==============================================================================
--- stable/10/sys/tools/vnode_if.awk	Fri Oct 23 07:38:34 2015	(r289797)
+++ stable/10/sys/tools/vnode_if.awk	Fri Oct 23 07:40:43 2015	(r289798)
@@ -361,7 +361,7 @@ while ((getline < srcfile) > 0) {
 		printc("\t    vop->"name" == NULL && vop->vop_bypass == NULL)")
 		printc("\t\tvop = vop->vop_default;")
 		printc("\tVNASSERT(vop != NULL, a->a_" args[0]", (\"No "name"(%p, %p)\", a->a_" args[0]", a));")
-		printc("\tSDT_PROBE(vfs, vop, " name ", entry, a->a_" args[0] ", a, 0, 0, 0);\n");
+		printc("\tSDT_PROBE2(vfs, vop, " name ", entry, a->a_" args[0] ", a);\n");
 		for (i = 0; i < numargs; ++i)
 			add_debug_code(name, args[i], "Entry", "\t");
 		printc("\tKTR_START" ctrstr);
@@ -372,7 +372,7 @@ while ((getline < srcfile) > 0) {
 		printc("\telse")
 		printc("\t\trc = vop->vop_bypass(&a->a_gen);")
 		printc("\tVFS_EPILOGUE(a->a_" args[0]"->v_mount);")
-		printc("\tSDT_PROBE(vfs, vop, " name ", return, a->a_" args[0] ", a, rc, 0, 0);\n");
+		printc("\tSDT_PROBE3(vfs, vop, " name ", return, a->a_" args[0] ", a, rc);\n");
 		printc("\tif (rc == 0) {");
 		for (i = 0; i < numargs; ++i)
 			add_debug_code(name, args[i], "OK", "\t\t");

From owner-svn-src-stable@freebsd.org  Fri Oct 23 07:44:06 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BDDBA196D3;
 Fri, 23 Oct 2015 07:44:06 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 3208B1048;
 Fri, 23 Oct 2015 07:44:06 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N7i5Zw072507;
 Fri, 23 Oct 2015 07:44:05 GMT (envelope-from avg@FreeBSD.org)
Received: (from avg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N7i4kT072493;
 Fri, 23 Oct 2015 07:44:04 GMT (envelope-from avg@FreeBSD.org)
Message-Id: <201510230744.t9N7i4kT072493@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org
 using -f
From: Andriy Gapon <avg@FreeBSD.org>
Date: Fri, 23 Oct 2015 07:44:04 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject: svn commit: r289800 - in stable/9/sys: compat/linux kern tools
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Oct 2015 07:44:06 -0000

Author: avg
Date: Fri Oct 23 07:44:03 2015
New Revision: 289800
URL: https://svnweb.freebsd.org/changeset/base/289800

Log:
  MFC r288336: save some bytes by using more concise SDT_PROBE<n>

Modified:
  stable/9/sys/compat/linux/linux_dtrace.h
  stable/9/sys/kern/kern_exec.c
  stable/9/sys/kern/kern_exit.c
  stable/9/sys/kern/kern_fork.c
  stable/9/sys/kern/kern_proc.c
  stable/9/sys/kern/kern_racct.c
  stable/9/sys/kern/kern_sig.c
  stable/9/sys/kern/kern_timeout.c
  stable/9/sys/kern/vfs_cache.c
  stable/9/sys/kern/vfs_lookup.c
  stable/9/sys/kern/vfs_syscalls.c
  stable/9/sys/tools/vnode_if.awk
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/compat/linux/linux_dtrace.h
==============================================================================
--- stable/9/sys/compat/linux/linux_dtrace.h	Fri Oct 23 07:42:56 2015	(r289799)
+++ stable/9/sys/compat/linux/linux_dtrace.h	Fri Oct 23 07:44:03 2015	(r289800)
@@ -82,7 +82,7 @@
     c, d, e, f)
 #define	LIN_SDT_PROBE4(a, b, c, d, e, f, g)	SDT_PROBE4(LINUX_DTRACE, a, b, \
     c, d, e, f, g)
-#define	_LIN_SDT_PROBE5(a, b, c, d, e, f, g, h, i)	SDT_PROBE(a, b, c, d, \
+#define	_LIN_SDT_PROBE5(a, b, c, d, e, f, g, h, i)	SDT_PROBE5(a, b, c, d, \
     e, f, g, h, i)
 #define	LIN_SDT_PROBE5(a, b, c, d, e, f, g, h)	_LIN_SDT_PROBE5(LINUX_DTRACE, \
     a, b, c, d, e, f, g, h)

Modified: stable/9/sys/kern/kern_exec.c
==============================================================================
--- stable/9/sys/kern/kern_exec.c	Fri Oct 23 07:42:56 2015	(r289799)
+++ stable/9/sys/kern/kern_exec.c	Fri Oct 23 07:44:03 2015	(r289800)
@@ -426,7 +426,7 @@ do_execve(td, args, mac_p)
 		    | MPSAFE | AUDITVNODE1, UIO_SYSSPACE, args->fname, td);
 	}
 
-	SDT_PROBE(proc, kernel, , exec, args->fname, 0, 0, 0, 0 );
+	SDT_PROBE1(proc, kernel, , exec, args->fname);
 
 interpret:
 	if (args->fname != NULL) {
@@ -848,7 +848,7 @@ interpret:
 
 	vfs_mark_atime(imgp->vp, td->td_ucred);
 
-	SDT_PROBE(proc, kernel, , exec__success, args->fname, 0, 0, 0, 0);
+	SDT_PROBE1(proc, kernel, , exec__success, args->fname);
 
 done1:
 	/*
@@ -930,7 +930,7 @@ exec_fail:
 	p->p_flag &= ~P_INEXEC;
 	PROC_UNLOCK(p);
 
-	SDT_PROBE(proc, kernel, , exec__failure, error, 0, 0, 0, 0);
+	SDT_PROBE1(proc, kernel, , exec__failure, error);
 
 done2:
 #ifdef MAC

Modified: stable/9/sys/kern/kern_exit.c
==============================================================================
--- stable/9/sys/kern/kern_exit.c	Fri Oct 23 07:42:56 2015	(r289799)
+++ stable/9/sys/kern/kern_exit.c	Fri Oct 23 07:44:03 2015	(r289800)
@@ -533,7 +533,7 @@ exit1(struct thread *td, int rv)
 		reason = CLD_DUMPED;
 	else if (WIFSIGNALED(rv))
 		reason = CLD_KILLED;
-	SDT_PROBE(proc, kernel, , exit, reason, 0, 0, 0, 0);
+	SDT_PROBE1(proc, kernel, , exit, reason);
 #endif
 
 	/*

Modified: stable/9/sys/kern/kern_fork.c
==============================================================================
--- stable/9/sys/kern/kern_fork.c	Fri Oct 23 07:42:56 2015	(r289799)
+++ stable/9/sys/kern/kern_fork.c	Fri Oct 23 07:44:03 2015	(r289800)
@@ -742,7 +742,7 @@ do_fork(struct thread *td, int flags, st
 	 * Tell any interested parties about the new process.
 	 */
 	knote_fork(&p1->p_klist, p2->p_pid);
-	SDT_PROBE(proc, kernel, , create, p2, p1, flags, 0, 0);
+	SDT_PROBE3(proc, kernel, , create, p2, p1, flags);
 
 	/*
 	 * Wait until debugger is attached to child.

Modified: stable/9/sys/kern/kern_proc.c
==============================================================================
--- stable/9/sys/kern/kern_proc.c	Fri Oct 23 07:42:56 2015	(r289799)
+++ stable/9/sys/kern/kern_proc.c	Fri Oct 23 07:44:03 2015	(r289800)
@@ -180,9 +180,9 @@ proc_ctor(void *mem, int size, void *arg
 	struct proc *p;
 
 	p = (struct proc *)mem;
-	SDT_PROBE(proc, kernel, ctor , entry, p, size, arg, flags, 0);
+	SDT_PROBE4(proc, kernel, ctor , entry, p, size, arg, flags);
 	EVENTHANDLER_INVOKE(process_ctor, p);
-	SDT_PROBE(proc, kernel, ctor , return, p, size, arg, flags, 0);
+	SDT_PROBE4(proc, kernel, ctor , return, p, size, arg, flags);
 	return (0);
 }
 
@@ -198,7 +198,7 @@ proc_dtor(void *mem, int size, void *arg
 	/* INVARIANTS checks go here */
 	p = (struct proc *)mem;
 	td = FIRST_THREAD_IN_PROC(p);
-	SDT_PROBE(proc, kernel, dtor, entry, p, size, arg, td, 0);
+	SDT_PROBE4(proc, kernel, dtor, entry, p, size, arg, td);
 	if (td != NULL) {
 #ifdef INVARIANTS
 		KASSERT((p->p_numthreads == 1),
@@ -211,7 +211,7 @@ proc_dtor(void *mem, int size, void *arg
 	EVENTHANDLER_INVOKE(process_dtor, p);
 	if (p->p_ksi != NULL)
 		KASSERT(! KSI_ONQ(p->p_ksi), ("SIGCHLD queue"));
-	SDT_PROBE(proc, kernel, dtor, return, p, size, arg, 0, 0);
+	SDT_PROBE3(proc, kernel, dtor, return, p, size, arg);
 }
 
 /*
@@ -223,7 +223,7 @@ proc_init(void *mem, int size, int flags
 	struct proc *p;
 
 	p = (struct proc *)mem;
-	SDT_PROBE(proc, kernel, init, entry, p, size, flags, 0, 0);
+	SDT_PROBE3(proc, kernel, init, entry, p, size, flags);
 	p->p_sched = (struct p_sched *)&p[1];
 	bzero(&p->p_mtx, sizeof(struct mtx));
 	mtx_init(&p->p_mtx, "process lock", NULL, MTX_DEF | MTX_DUPOK);
@@ -233,7 +233,7 @@ proc_init(void *mem, int size, int flags
 	TAILQ_INIT(&p->p_threads);	     /* all threads in proc */
 	EVENTHANDLER_INVOKE(process_init, p);
 	p->p_stats = pstats_alloc();
-	SDT_PROBE(proc, kernel, init, return, p, size, flags, 0, 0);
+	SDT_PROBE3(proc, kernel, init, return, p, size, flags);
 	return (0);
 }
 

Modified: stable/9/sys/kern/kern_racct.c
==============================================================================
--- stable/9/sys/kern/kern_racct.c	Fri Oct 23 07:42:56 2015	(r289799)
+++ stable/9/sys/kern/kern_racct.c	Fri Oct 23 07:44:03 2015	(r289800)
@@ -432,7 +432,7 @@ void
 racct_create(struct racct **racctp)
 {
 
-	SDT_PROBE(racct, kernel, racct, create, racctp, 0, 0, 0, 0);
+	SDT_PROBE1(racct, kernel, racct, create, racctp);
 
 	KASSERT(*racctp == NULL, ("racct already allocated"));
 
@@ -445,7 +445,7 @@ racct_destroy_locked(struct racct **racc
 	int i;
 	struct racct *racct;
 
-	SDT_PROBE(racct, kernel, racct, destroy, racctp, 0, 0, 0, 0);
+	SDT_PROBE1(racct, kernel, racct, destroy, racctp);
 
 	mtx_assert(&racct_lock, MA_OWNED);
 	KASSERT(racctp != NULL, ("NULL racctp"));
@@ -517,7 +517,7 @@ racct_add_locked(struct proc *p, int res
 	int error;
 #endif
 
-	SDT_PROBE(racct, kernel, rusage, add, p, resource, amount, 0, 0);
+	SDT_PROBE3(racct, kernel, rusage, add, p, resource, amount);
 
 	/*
 	 * We need proc lock to dereference p->p_ucred.
@@ -527,8 +527,8 @@ racct_add_locked(struct proc *p, int res
 #ifdef RCTL
 	error = rctl_enforce(p, resource, amount);
 	if (error && RACCT_IS_DENIABLE(resource)) {
-		SDT_PROBE(racct, kernel, rusage, add__failure, p, resource,
-		    amount, 0, 0);
+		SDT_PROBE3(racct, kernel, rusage, add__failure, p, resource,
+		    amount);
 		return (error);
 	}
 #endif
@@ -558,8 +558,7 @@ racct_add_cred_locked(struct ucred *cred
 {
 	struct prison *pr;
 
-	SDT_PROBE(racct, kernel, rusage, add__cred, cred, resource, amount,
-	    0, 0);
+	SDT_PROBE3(racct, kernel, rusage, add__cred, cred, resource, amount);
 
 	racct_alloc_resource(cred->cr_ruidinfo->ui_racct, resource, amount);
 	for (pr = cred->cr_prison; pr != NULL; pr = pr->pr_parent)
@@ -591,7 +590,7 @@ void
 racct_add_force(struct proc *p, int resource, uint64_t amount)
 {
 
-	SDT_PROBE(racct, kernel, rusage, add__force, p, resource, amount, 0, 0);
+	SDT_PROBE3(racct, kernel, rusage, add__force, p, resource, amount);
 
 	/*
 	 * We need proc lock to dereference p->p_ucred.
@@ -613,7 +612,7 @@ racct_set_locked(struct proc *p, int res
 	int error;
 #endif
 
-	SDT_PROBE(racct, kernel, rusage, set, p, resource, amount, 0, 0);
+	SDT_PROBE3(racct, kernel, rusage, set, p, resource, amount);
 
 	/*
 	 * We need proc lock to dereference p->p_ucred.
@@ -645,8 +644,8 @@ racct_set_locked(struct proc *p, int res
 	if (diff_proc > 0) {
 		error = rctl_enforce(p, resource, diff_proc);
 		if (error && RACCT_IS_DENIABLE(resource)) {
-			SDT_PROBE(racct, kernel, rusage, set__failure, p,
-			    resource, amount, 0, 0);
+			SDT_PROBE3(racct, kernel, rusage, set__failure, p,
+			    resource, amount);
 			return (error);
 		}
 	}
@@ -684,7 +683,7 @@ racct_set_force_locked(struct proc *p, i
 	int64_t old_amount, decayed_amount;
 	int64_t diff_proc, diff_cred;
 
-	SDT_PROBE(racct, kernel, rusage, set, p, resource, amount, 0, 0);
+	SDT_PROBE3(racct, kernel, rusage, set, p, resource, amount);
 
 	/*
 	 * We need proc lock to dereference p->p_ucred.
@@ -780,7 +779,7 @@ void
 racct_sub(struct proc *p, int resource, uint64_t amount)
 {
 
-	SDT_PROBE(racct, kernel, rusage, sub, p, resource, amount, 0, 0);
+	SDT_PROBE3(racct, kernel, rusage, sub, p, resource, amount);
 
 	/*
 	 * We need proc lock to dereference p->p_ucred.
@@ -805,8 +804,7 @@ racct_sub_cred_locked(struct ucred *cred
 {
 	struct prison *pr;
 
-	SDT_PROBE(racct, kernel, rusage, sub__cred, cred, resource, amount,
-	    0, 0);
+	SDT_PROBE3(racct, kernel, rusage, sub__cred, cred, resource, amount);
 
 #ifdef notyet
 	KASSERT(RACCT_CAN_DROP(resource),

Modified: stable/9/sys/kern/kern_sig.c
==============================================================================
--- stable/9/sys/kern/kern_sig.c	Fri Oct 23 07:42:56 2015	(r289799)
+++ stable/9/sys/kern/kern_sig.c	Fri Oct 23 07:44:03 2015	(r289800)
@@ -1252,7 +1252,7 @@ kern_sigtimedwait(struct thread *td, sig
 		reschedule_signals(p, new_block, 0);
 
 	if (error == 0) {
-		SDT_PROBE(proc, kernel, , signal__clear, sig, ksi, 0, 0, 0);
+		SDT_PROBE2(proc, kernel, , signal__clear, sig, ksi);
 		
 		if (ksi->ksi_code == SI_TIMER)
 			itimer_accept(p, ksi->ksi_timerid, ksi);
@@ -2065,7 +2065,7 @@ tdsendsignal(struct proc *p, struct thre
 		sigqueue = &td->td_sigqueue;
 	}
 
-	SDT_PROBE(proc, kernel, , signal__send, td, p, sig, 0, 0 );
+	SDT_PROBE3(proc, kernel, , signal__send, td, p, sig);
 
 	/*
 	 * If the signal is being ignored,
@@ -2076,7 +2076,7 @@ tdsendsignal(struct proc *p, struct thre
 	 */
 	mtx_lock(&ps->ps_mtx);
 	if (SIGISMEMBER(ps->ps_sigignore, sig)) {
-		SDT_PROBE(proc, kernel, , signal__discard, td, p, sig, 0, 0 );
+		SDT_PROBE3(proc, kernel, , signal__discard, td, p, sig);
 
 		mtx_unlock(&ps->ps_mtx);
 		if (ksi && (ksi->ksi_flags & KSI_INS))

Modified: stable/9/sys/kern/kern_timeout.c
==============================================================================
--- stable/9/sys/kern/kern_timeout.c	Fri Oct 23 07:42:56 2015	(r289799)
+++ stable/9/sys/kern/kern_timeout.c	Fri Oct 23 07:44:03 2015	(r289800)
@@ -514,9 +514,9 @@ softclock_call_cc(struct callout *c, str
 	binuptime(&bt1);
 #endif
 	THREAD_NO_SLEEPING();
-	SDT_PROBE(callout_execute, kernel, , callout__start, c, 0, 0, 0, 0);
+	SDT_PROBE1(callout_execute, kernel, , callout__start, c);
 	c_func(c_arg);
-	SDT_PROBE(callout_execute, kernel, , callout__end, c, 0, 0, 0, 0);
+	SDT_PROBE1(callout_execute, kernel, , callout__end, c);
 	THREAD_SLEEPING_OK();
 #ifdef DIAGNOSTIC
 	binuptime(&bt2);

Modified: stable/9/sys/kern/vfs_cache.c
==============================================================================
--- stable/9/sys/kern/vfs_cache.c	Fri Oct 23 07:42:56 2015	(r289799)
+++ stable/9/sys/kern/vfs_cache.c	Fri Oct 23 07:44:03 2015	(r289800)
@@ -418,11 +418,11 @@ cache_zap(ncp)
 	CTR2(KTR_VFS, "cache_zap(%p) vp %p", ncp, ncp->nc_vp);
 #ifdef KDTRACE_HOOKS
 	if (ncp->nc_vp != NULL) {
-		SDT_PROBE(vfs, namecache, zap, done, ncp->nc_dvp,
-		    nc_get_name(ncp), ncp->nc_vp, 0, 0);
+		SDT_PROBE3(vfs, namecache, zap, done, ncp->nc_dvp,
+		    nc_get_name(ncp), ncp->nc_vp);
 	} else {
-		SDT_PROBE(vfs, namecache, zap_negative, done, ncp->nc_dvp,
-		    nc_get_name(ncp), 0, 0, 0);
+		SDT_PROBE2(vfs, namecache, zap_negative, done, ncp->nc_dvp,
+		    nc_get_name(ncp));
 	}
 #endif
 	vp = NULL;
@@ -497,8 +497,7 @@ retry_wlocked:
 			CTR2(KTR_VFS, "cache_lookup(%p, %s) found via .",
 			    dvp, cnp->cn_nameptr);
 			dothits++;
-			SDT_PROBE(vfs, namecache, lookup, hit, dvp, ".",
-			    *vpp, 0, 0);
+			SDT_PROBE3(vfs, namecache, lookup, hit, dvp, ".", *vpp);
 			if (tsp != NULL)
 				timespecclear(tsp);
 			if (ticksp != NULL)
@@ -508,8 +507,8 @@ retry_wlocked:
 		if (cnp->cn_namelen == 2 && cnp->cn_nameptr[1] == '.') {
 			dotdothits++;
 			if (dvp->v_cache_dd == NULL) {
-				SDT_PROBE(vfs, namecache, lookup, miss, dvp,
-				    "..", NULL, 0, 0);
+				SDT_PROBE3(vfs, namecache, lookup, miss, dvp,
+				    "..", NULL);
 				goto unlock;
 			}
 			if ((cnp->cn_flags & MAKEENTRY) == 0) {
@@ -531,8 +530,8 @@ retry_wlocked:
 				goto negative_success;
 			CTR3(KTR_VFS, "cache_lookup(%p, %s) found %p via ..",
 			    dvp, cnp->cn_nameptr, *vpp);
-			SDT_PROBE(vfs, namecache, lookup, hit, dvp, "..",
-			    *vpp, 0, 0);
+			SDT_PROBE3(vfs, namecache, lookup, hit, dvp, "..",
+			    *vpp);
 			cache_out_ts(ncp, tsp, ticksp);
 			if ((ncp->nc_flag & (NCF_ISDOTDOT | NCF_DTS)) ==
 			    NCF_DTS && tsp != NULL)
@@ -553,8 +552,8 @@ retry_wlocked:
 
 	/* We failed to find an entry */
 	if (ncp == NULL) {
-		SDT_PROBE(vfs, namecache, lookup, miss, dvp, cnp->cn_nameptr,
-		    NULL, 0, 0);
+		SDT_PROBE3(vfs, namecache, lookup, miss, dvp, cnp->cn_nameptr,
+		    NULL);
 		if ((cnp->cn_flags & MAKEENTRY) == 0) {
 			nummisszap++;
 		} else {
@@ -582,8 +581,8 @@ retry_wlocked:
 		*vpp = ncp->nc_vp;
 		CTR4(KTR_VFS, "cache_lookup(%p, %s) found %p via ncp %p",
 		    dvp, cnp->cn_nameptr, *vpp, ncp);
-		SDT_PROBE(vfs, namecache, lookup, hit, dvp, nc_get_name(ncp),
-		    *vpp, 0, 0);
+		SDT_PROBE3(vfs, namecache, lookup, hit, dvp, nc_get_name(ncp),
+		    *vpp);
 		cache_out_ts(ncp, tsp, ticksp);
 		goto success;
 	}
@@ -614,8 +613,8 @@ negative_success:
 	nchstats.ncs_neghits++;
 	if (ncp->nc_flag & NCF_WHITE)
 		cnp->cn_flags |= ISWHITEOUT;
-	SDT_PROBE(vfs, namecache, lookup, hit__negative, dvp, nc_get_name(ncp),
-	    0, 0, 0);
+	SDT_PROBE2(vfs, namecache, lookup, hit__negative, dvp,
+	    nc_get_name(ncp));
 	cache_out_ts(ncp, tsp, ticksp);
 	CACHE_WUNLOCK();
 	return (ENOENT);
@@ -768,8 +767,7 @@ cache_enter_time(dvp, vp, cnp, tsp, dtsp
 				return;
 			}
 			dvp->v_cache_dd = NULL;
-			SDT_PROBE(vfs, namecache, enter, done, dvp, "..", vp,
-			    0, 0);
+			SDT_PROBE3(vfs, namecache, enter, done, dvp, "..", vp);
 			CACHE_WUNLOCK();
 			flag = NCF_ISDOTDOT;
 		}
@@ -889,12 +887,12 @@ cache_enter_time(dvp, vp, cnp, tsp, dtsp
 	 */
 	if (vp) {
 		TAILQ_INSERT_HEAD(&vp->v_cache_dst, ncp, nc_dst);
-		SDT_PROBE(vfs, namecache, enter, done, dvp, nc_get_name(ncp),
-		    vp, 0, 0);
+		SDT_PROBE3(vfs, namecache, enter, done, dvp, nc_get_name(ncp),
+		    vp);
 	} else {
 		TAILQ_INSERT_TAIL(&ncneg, ncp, nc_dst);
-		SDT_PROBE(vfs, namecache, enter_negative, done, dvp,
-		    nc_get_name(ncp), 0, 0, 0);
+		SDT_PROBE2(vfs, namecache, enter_negative, done, dvp,
+		    nc_get_name(ncp));
 	}
 	if (numneg * ncnegfactor > numcache) {
 		ncp = TAILQ_FIRST(&ncneg);
@@ -945,7 +943,7 @@ cache_purge(vp)
 {
 
 	CTR1(KTR_VFS, "cache_purge(%p)", vp);
-	SDT_PROBE(vfs, namecache, purge, done, vp, 0, 0, 0, 0);
+	SDT_PROBE1(vfs, namecache, purge, done, vp);
 	CACHE_WLOCK();
 	while (!LIST_EMPTY(&vp->v_cache_src))
 		cache_zap(LIST_FIRST(&vp->v_cache_src));
@@ -970,7 +968,7 @@ cache_purge_negative(vp)
 	struct namecache *cp, *ncp;
 
 	CTR1(KTR_VFS, "cache_purge_negative(%p)", vp);
-	SDT_PROBE(vfs, namecache, purge_negative, done, vp, 0, 0, 0, 0);
+	SDT_PROBE1(vfs, namecache, purge_negative, done, vp);
 	CACHE_WLOCK();
 	LIST_FOREACH_SAFE(cp, &vp->v_cache_src, nc_src, ncp) {
 		if (cp->nc_vp == NULL)
@@ -990,7 +988,7 @@ cache_purgevfs(mp)
 	struct namecache *ncp, *nnp;
 
 	/* Scan hash tables for applicable entries */
-	SDT_PROBE(vfs, namecache, purgevfs, done, mp, 0, 0, 0, 0);
+	SDT_PROBE1(vfs, namecache, purgevfs, done, mp);
 	CACHE_WLOCK();
 	for (ncpp = &nchashtbl[nchash]; ncpp >= nchashtbl; ncpp--) {
 		LIST_FOREACH_SAFE(ncp, ncpp, nc_hash, nnp) {
@@ -1220,14 +1218,14 @@ vn_vptocnp_locked(struct vnode **vp, str
 			VFS_UNLOCK_GIANT(vfslocked);
 			numfullpathfail4++;
 			error = ENOMEM;
-			SDT_PROBE(vfs, namecache, fullpath, return, error,
-			    vp, NULL, 0, 0);
+			SDT_PROBE3(vfs, namecache, fullpath, return, error,
+			    vp, NULL);
 			return (error);
 		}
 		*buflen -= ncp->nc_nlen;
 		memcpy(buf + *buflen, nc_get_name(ncp), ncp->nc_nlen);
-		SDT_PROBE(vfs, namecache, fullpath, hit, ncp->nc_dvp,
-		    nc_get_name(ncp), vp, 0, 0);
+		SDT_PROBE3(vfs, namecache, fullpath, hit, ncp->nc_dvp,
+		    nc_get_name(ncp), vp);
 		dvp = *vp;
 		*vp = ncp->nc_dvp;
 		vref(*vp);
@@ -1238,7 +1236,7 @@ vn_vptocnp_locked(struct vnode **vp, str
 		CACHE_RLOCK();
 		return (0);
 	}
-	SDT_PROBE(vfs, namecache, fullpath, miss, vp, 0, 0, 0, 0);
+	SDT_PROBE1(vfs, namecache, fullpath, miss, vp);
 
 	CACHE_RUNLOCK();
 	vfslocked = VFS_LOCK_GIANT((*vp)->v_mount);
@@ -1248,8 +1246,7 @@ vn_vptocnp_locked(struct vnode **vp, str
 	VFS_UNLOCK_GIANT(vfslocked);
 	if (error) {
 		numfullpathfail2++;
-		SDT_PROBE(vfs, namecache, fullpath, return,  error, vp,
-		    NULL, 0, 0);
+		SDT_PROBE3(vfs, namecache, fullpath, return,  error, vp, NULL);
 		return (error);
 	}
 
@@ -1262,8 +1259,7 @@ vn_vptocnp_locked(struct vnode **vp, str
 		vrele(dvp);
 		VFS_UNLOCK_GIANT(vfslocked);
 		error = ENOENT;
-		SDT_PROBE(vfs, namecache, fullpath, return, error, vp,
-		    NULL, 0, 0);
+		SDT_PROBE3(vfs, namecache, fullpath, return, error, vp, NULL);
 		return (error);
 	}
 	/*
@@ -1291,7 +1287,7 @@ vn_fullpath1(struct thread *td, struct v
 	error = 0;
 	slash_prefixed = 0;
 
-	SDT_PROBE(vfs, namecache, fullpath, entry, vp, 0, 0, 0, 0);
+	SDT_PROBE1(vfs, namecache, fullpath, entry, vp);
 	numfullpathcalls++;
 	vref(vp);
 	CACHE_RLOCK();
@@ -1317,8 +1313,8 @@ vn_fullpath1(struct thread *td, struct v
 				vrele(vp);
 				VFS_UNLOCK_GIANT(vfslocked);
 				error = ENOENT;
-				SDT_PROBE(vfs, namecache, fullpath, return,
-				    error, vp, NULL, 0, 0);
+				SDT_PROBE3(vfs, namecache, fullpath, return,
+				    error, vp, NULL);
 				break;
 			}
 			vp1 = vp->v_mount->mnt_vnodecovered;
@@ -1338,8 +1334,8 @@ vn_fullpath1(struct thread *td, struct v
 			VFS_UNLOCK_GIANT(vfslocked);
 			numfullpathfail1++;
 			error = ENOTDIR;
-			SDT_PROBE(vfs, namecache, fullpath, return,
-			    error, vp, NULL, 0, 0);
+			SDT_PROBE3(vfs, namecache, fullpath, return,
+			    error, vp, NULL);
 			break;
 		}
 		error = vn_vptocnp_locked(&vp, td->td_ucred, buf, &buflen);
@@ -1351,8 +1347,8 @@ vn_fullpath1(struct thread *td, struct v
 			vrele(vp);
 			VFS_UNLOCK_GIANT(vfslocked);
 			error = ENOMEM;
-			SDT_PROBE(vfs, namecache, fullpath, return, error,
-			    startvp, NULL, 0, 0);
+			SDT_PROBE3(vfs, namecache, fullpath, return, error,
+			    startvp, NULL);
 			break;
 		}
 		buf[--buflen] = '/';
@@ -1367,8 +1363,8 @@ vn_fullpath1(struct thread *td, struct v
 			vrele(vp);
 			VFS_UNLOCK_GIANT(vfslocked);
 			numfullpathfail4++;
-			SDT_PROBE(vfs, namecache, fullpath, return, ENOMEM,
-			    startvp, NULL, 0, 0);
+			SDT_PROBE3(vfs, namecache, fullpath, return, ENOMEM,
+			    startvp, NULL);
 			return (ENOMEM);
 		}
 		buf[--buflen] = '/';
@@ -1379,8 +1375,7 @@ vn_fullpath1(struct thread *td, struct v
 	vrele(vp);
 	VFS_UNLOCK_GIANT(vfslocked);
 
-	SDT_PROBE(vfs, namecache, fullpath, return, 0, startvp, buf + buflen,
-	    0, 0);
+	SDT_PROBE3(vfs, namecache, fullpath, return, 0, startvp, buf + buflen);
 	*retbuf = buf + buflen;
 	return (0);
 }

Modified: stable/9/sys/kern/vfs_lookup.c
==============================================================================
--- stable/9/sys/kern/vfs_lookup.c	Fri Oct 23 07:42:56 2015	(r289799)
+++ stable/9/sys/kern/vfs_lookup.c	Fri Oct 23 07:44:03 2015	(r289800)
@@ -268,8 +268,8 @@ namei(struct nameidata *ndp)
 			VFS_UNLOCK_GIANT(vfslocked);
 		}
 	}
-	SDT_PROBE(vfs, namei, lookup, entry, dp, cnp->cn_pnbuf,
-	    cnp->cn_flags, 0, 0);
+	SDT_PROBE3(vfs, namei, lookup, entry, dp, cnp->cn_pnbuf,
+	    cnp->cn_flags);
 	vfslocked = VFS_LOCK_GIANT(dp->v_mount);
 	for (;;) {
 		/*
@@ -298,8 +298,7 @@ namei(struct nameidata *ndp)
 		error = lookup(ndp);
 		if (error) {
 			namei_cleanup_cnp(cnp);
-			SDT_PROBE(vfs, namei, lookup, return, error, NULL, 0,
-			    0, 0);
+			SDT_PROBE2(vfs, namei, lookup, return, error, NULL);
 			return (error);
 		}
 		vfslocked = (ndp->ni_cnd.cn_flags & GIANTHELD) != 0;
@@ -317,8 +316,7 @@ namei(struct nameidata *ndp)
 				VFS_UNLOCK_GIANT(vfslocked);
 			} else if (vfslocked)
 				ndp->ni_cnd.cn_flags |= GIANTHELD;
-			SDT_PROBE(vfs, namei, lookup, return, 0, ndp->ni_vp,
-			    0, 0, 0);
+			SDT_PROBE2(vfs, namei, lookup, return, 0, ndp->ni_vp);
 			return (0);
 		}
 		if (ndp->ni_loopcnt++ >= MAXSYMLINKS) {
@@ -380,7 +378,7 @@ namei(struct nameidata *ndp)
 	ndp->ni_vp = NULL;
 	vrele(ndp->ni_dvp);
 	VFS_UNLOCK_GIANT(vfslocked);
-	SDT_PROBE(vfs, namei, lookup, return, error, NULL, 0, 0, 0);
+	SDT_PROBE2(vfs, namei, lookup, return, error, NULL);
 	return (error);
 }
 

Modified: stable/9/sys/kern/vfs_syscalls.c
==============================================================================
--- stable/9/sys/kern/vfs_syscalls.c	Fri Oct 23 07:42:56 2015	(r289799)
+++ stable/9/sys/kern/vfs_syscalls.c	Fri Oct 23 07:44:03 2015	(r289800)
@@ -2430,9 +2430,9 @@ kern_statat_vnhook(struct thread *td, in
 	vfslocked = NDHASGIANT(&nd);
 	error = vn_stat(nd.ni_vp, &sb, td->td_ucred, NOCRED, td);
 	if (!error) {
-		SDT_PROBE(vfs, , stat, mode, path, sb.st_mode, 0, 0, 0);
+		SDT_PROBE2(vfs, , stat, mode, path, sb.st_mode);
 		if (S_ISREG(sb.st_mode))
-			SDT_PROBE(vfs, , stat, reg, path, pathseg, 0, 0, 0);
+			SDT_PROBE2(vfs, , stat, reg, path, pathseg);
 		if (__predict_false(hook != NULL))
 			hook(nd.ni_vp, &sb);
 	}

Modified: stable/9/sys/tools/vnode_if.awk
==============================================================================
--- stable/9/sys/tools/vnode_if.awk	Fri Oct 23 07:42:56 2015	(r289799)
+++ stable/9/sys/tools/vnode_if.awk	Fri Oct 23 07:44:03 2015	(r289800)
@@ -375,7 +375,7 @@ while ((getline < srcfile) > 0) {
 		printc("\t    vop->"name" == NULL && vop->vop_bypass == NULL)")
 		printc("\t\tvop = vop->vop_default;")
 		printc("\tVNASSERT(vop != NULL, a->a_" args[0]", (\"No "name"(%p, %p)\", a->a_" args[0]", a));")
-		printc("\tSDT_PROBE(vfs, vop, " name ", entry, a->a_" args[0] ", a, 0, 0, 0);\n");
+		printc("\tSDT_PROBE2(vfs, vop, " name ", entry, a->a_" args[0] ", a);\n");
 		for (i = 0; i < numargs; ++i)
 			add_debug_code(name, args[i], "Entry", "\t");
 		add_pre(name);
@@ -386,7 +386,7 @@ while ((getline < srcfile) > 0) {
 		printc("\t\trc = vop->vop_bypass(&a->a_gen);")
 		printc("\tVFS_EPILOGUE(a->a_" args[0]"->v_mount);")
 		printc(ctrstr);
-		printc("\tSDT_PROBE(vfs, vop, " name ", return, a->a_" args[0] ", a, rc, 0, 0);\n");
+		printc("\tSDT_PROBE3(vfs, vop, " name ", return, a->a_" args[0] ", a, rc);\n");
 		printc("\tif (rc == 0) {");
 		for (i = 0; i < numargs; ++i)
 			add_debug_code(name, args[i], "OK", "\t\t");

From owner-svn-src-stable@freebsd.org  Fri Oct 23 07:48:30 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01161A19789;
 Fri, 23 Oct 2015 07:48:30 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id A2F1F1213;
 Fri, 23 Oct 2015 07:48:29 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N7mSik073140;
 Fri, 23 Oct 2015 07:48:28 GMT (envelope-from avg@FreeBSD.org)
Received: (from avg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N7mSXb073139;
 Fri, 23 Oct 2015 07:48:28 GMT (envelope-from avg@FreeBSD.org)
Message-Id: <201510230748.t9N7mSXb073139@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org
 using -f
From: Andriy Gapon <avg@FreeBSD.org>
Date: Fri, 23 Oct 2015 07:48:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289801 - stable/10/cddl/contrib/opensolaris/common/avl
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Oct 2015 07:48:30 -0000

Author: avg
Date: Fri Oct 23 07:48:28 2015
New Revision: 289801
URL: https://svnweb.freebsd.org/changeset/base/289801

Log:
  MFC r288337: remove an extra copy of avl.c from illumos contrib code

Deleted:
  stable/10/cddl/contrib/opensolaris/common/avl/avl.c
Modified:
Directory Properties:
  stable/10/   (props changed)

From owner-svn-src-stable@freebsd.org  Fri Oct 23 07:48:41 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id EEC52A197DC;
 Fri, 23 Oct 2015 07:48:41 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 9ECAC134E;
 Fri, 23 Oct 2015 07:48:41 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N7medh073212;
 Fri, 23 Oct 2015 07:48:40 GMT (envelope-from avg@FreeBSD.org)
Received: (from avg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N7meWA073211;
 Fri, 23 Oct 2015 07:48:40 GMT (envelope-from avg@FreeBSD.org)
Message-Id: <201510230748.t9N7meWA073211@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org
 using -f
From: Andriy Gapon <avg@FreeBSD.org>
Date: Fri, 23 Oct 2015 07:48:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject: svn commit: r289802 - stable/9/cddl/contrib/opensolaris/common/avl
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Oct 2015 07:48:42 -0000

Author: avg
Date: Fri Oct 23 07:48:40 2015
New Revision: 289802
URL: https://svnweb.freebsd.org/changeset/base/289802

Log:
  MFC r288337: remove an extra copy of avl.c from illumos contrib code

Deleted:
  stable/9/cddl/contrib/opensolaris/common/avl/avl.c
Modified:
Directory Properties:
  stable/9/cddl/contrib/opensolaris/common/avl/   (props changed)

From owner-svn-src-stable@freebsd.org  Fri Oct 23 07:57:23 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F4D9A199C6;
 Fri, 23 Oct 2015 07:57:23 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 0D7691888;
 Fri, 23 Oct 2015 07:57:22 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N7vMgs076957;
 Fri, 23 Oct 2015 07:57:22 GMT (envelope-from avg@FreeBSD.org)
Received: (from avg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N7vMLB076956;
 Fri, 23 Oct 2015 07:57:22 GMT (envelope-from avg@FreeBSD.org)
Message-Id: <201510230757.t9N7vMLB076956@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org
 using -f
From: Andriy Gapon <avg@FreeBSD.org>
Date: Fri, 23 Oct 2015 07:57:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289803 - stable/10/sys/cddl/dev/sdt
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Oct 2015 07:57:23 -0000

Author: avg
Date: Fri Oct 23 07:57:21 2015
New Revision: 289803
URL: https://svnweb.freebsd.org/changeset/base/289803

Log:
  MFC r288362: sdt: start checking version field when parsing probe definitions

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

Modified: stable/10/sys/cddl/dev/sdt/sdt.c
==============================================================================
--- stable/10/sys/cddl/dev/sdt/sdt.c	Fri Oct 23 07:48:40 2015	(r289802)
+++ stable/10/sys/cddl/dev/sdt/sdt.c	Fri Oct 23 07:57:21 2015	(r289803)
@@ -142,6 +142,12 @@ sdt_create_probe(struct sdt_probe *probe
 	char *to;
 	size_t len;
 
+	if (probe->version != (int)sizeof(*probe)) {
+		printf("ignoring probe %p, version %u expected %u\n",
+		    probe, probe->version, (int)sizeof(*probe));
+		return;
+	}
+
 	TAILQ_FOREACH(prov, &sdt_prov_list, prov_entry)
 		if (strcmp(prov->name, probe->prov->name) == 0)
 			break;

From owner-svn-src-stable@freebsd.org  Fri Oct 23 07:57:35 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34F1EA19A04;
 Fri, 23 Oct 2015 07:57:35 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 02DD519BB;
 Fri, 23 Oct 2015 07:57:34 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N7vYRt077029;
 Fri, 23 Oct 2015 07:57:34 GMT (envelope-from avg@FreeBSD.org)
Received: (from avg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N7vYD5077028;
 Fri, 23 Oct 2015 07:57:34 GMT (envelope-from avg@FreeBSD.org)
Message-Id: <201510230757.t9N7vYD5077028@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org
 using -f
From: Andriy Gapon <avg@FreeBSD.org>
Date: Fri, 23 Oct 2015 07:57:34 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject: svn commit: r289804 - stable/9/sys/cddl/dev/sdt
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Oct 2015 07:57:35 -0000

Author: avg
Date: Fri Oct 23 07:57:33 2015
New Revision: 289804
URL: https://svnweb.freebsd.org/changeset/base/289804

Log:
  MFC r288362: sdt: start checking version field when parsing probe definitions

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

Modified: stable/9/sys/cddl/dev/sdt/sdt.c
==============================================================================
--- stable/9/sys/cddl/dev/sdt/sdt.c	Fri Oct 23 07:57:21 2015	(r289803)
+++ stable/9/sys/cddl/dev/sdt/sdt.c	Fri Oct 23 07:57:33 2015	(r289804)
@@ -142,6 +142,12 @@ sdt_create_probe(struct sdt_probe *probe
 	char *to;
 	size_t len;
 
+	if (probe->version != (int)sizeof(*probe)) {
+		printf("ignoring probe %p, version %u expected %u\n",
+		    probe, probe->version, (int)sizeof(*probe));
+		return;
+	}
+
 	TAILQ_FOREACH(prov, &sdt_prov_list, prov_entry)
 		if (strcmp(prov->name, probe->prov->name) == 0)
 			break;

From owner-svn-src-stable@freebsd.org  Fri Oct 23 08:01:47 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id E41DEA19DC0;
 Fri, 23 Oct 2015 08:01:47 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 91B361CF4;
 Fri, 23 Oct 2015 08:01:47 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N81kI1078270;
 Fri, 23 Oct 2015 08:01:46 GMT (envelope-from avg@FreeBSD.org)
Received: (from avg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N81k76078267;
 Fri, 23 Oct 2015 08:01:46 GMT (envelope-from avg@FreeBSD.org)
Message-Id: <201510230801.t9N81k76078267@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org
 using -f
From: Andriy Gapon <avg@FreeBSD.org>
Date: Fri, 23 Oct 2015 08:01:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289805 - in stable/10:
 cddl/contrib/opensolaris/lib/libzfs/common
 cddl/contrib/opensolaris/lib/libzpool/common
 sys/cddl/contrib/opensolaris/common/nvpair
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Oct 2015 08:01:48 -0000

Author: avg
Date: Fri Oct 23 08:01:46 2015
New Revision: 289805
URL: https://svnweb.freebsd.org/changeset/base/289805

Log:
  MFC r288340: define aok in libnvpair which is linked to all zfs
  libraries that need aok

Modified:
  stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c
  stable/10/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c
  stable/10/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c
==============================================================================
--- stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c	Fri Oct 23 07:57:33 2015	(r289804)
+++ stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c	Fri Oct 23 08:01:46 2015	(r289805)
@@ -55,7 +55,6 @@
 #include "zfs_prop.h"
 #include "zfeature_common.h"
 
-int aok;
 
 int
 libzfs_errno(libzfs_handle_t *hdl)

Modified: stable/10/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c
==============================================================================
--- stable/10/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c	Fri Oct 23 07:57:33 2015	(r289804)
+++ stable/10/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c	Fri Oct 23 08:01:46 2015	(r289805)
@@ -45,7 +45,9 @@
  * Emulation of kernel services in userland.
  */
 
+#ifndef __FreeBSD__
 int aok;
+#endif
 uint64_t physmem;
 vnode_t *rootdir = (vnode_t *)0xabcd1234;
 char hw_serial[HW_HOSTID_LEN];

Modified: stable/10/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c
==============================================================================
--- stable/10/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c	Fri Oct 23 07:57:33 2015	(r289804)
+++ stable/10/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c	Fri Oct 23 08:01:46 2015	(r289805)
@@ -44,6 +44,14 @@
 #endif
 #define	skip_whitespace(p)	while ((*(p) == ' ') || (*(p) == '\t')) p++
 
+#if defined(__FreeBSD__) && !defined(_KERNEL)
+/*
+ * libnvpair is the lowest commen denominator for ZFS related libraries,
+ * defining aok here makes it usable by all ZFS related libraries
+ */
+int aok;
+#endif
+
 /*
  * nvpair.c - Provides kernel & userland interfaces for manipulating
  *	name-value pairs.

From owner-svn-src-stable@freebsd.org  Fri Oct 23 08:05:00 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2C65A19E49;
 Fri, 23 Oct 2015 08:05:00 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 5C1611EBC;
 Fri, 23 Oct 2015 08:05:00 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N84x5q080649;
 Fri, 23 Oct 2015 08:04:59 GMT (envelope-from avg@FreeBSD.org)
Received: (from avg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N84x4b080646;
 Fri, 23 Oct 2015 08:04:59 GMT (envelope-from avg@FreeBSD.org)
Message-Id: <201510230804.t9N84x4b080646@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org
 using -f
From: Andriy Gapon <avg@FreeBSD.org>
Date: Fri, 23 Oct 2015 08:04:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject: svn commit: r289806 - in stable/9:
 cddl/contrib/opensolaris/lib/libzfs/common
 cddl/contrib/opensolaris/lib/libzpool/common
 sys/cddl/contrib/opensolaris/common/nvpair
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Oct 2015 08:05:00 -0000

Author: avg
Date: Fri Oct 23 08:04:59 2015
New Revision: 289806
URL: https://svnweb.freebsd.org/changeset/base/289806

Log:
  MFC r288340: define aok in libnvpair which is linked to all zfs
  libraries that need aok

Modified:
  stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c
  stable/9/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c
  stable/9/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c
Directory Properties:
  stable/9/cddl/contrib/opensolaris/   (props changed)
  stable/9/cddl/contrib/opensolaris/lib/libzfs/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c
==============================================================================
--- stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c	Fri Oct 23 08:01:46 2015	(r289805)
+++ stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c	Fri Oct 23 08:04:59 2015	(r289806)
@@ -55,7 +55,6 @@
 #include "zfs_prop.h"
 #include "zfeature_common.h"
 
-int aok;
 
 int
 libzfs_errno(libzfs_handle_t *hdl)

Modified: stable/9/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c
==============================================================================
--- stable/9/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c	Fri Oct 23 08:01:46 2015	(r289805)
+++ stable/9/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c	Fri Oct 23 08:04:59 2015	(r289806)
@@ -44,7 +44,9 @@
  * Emulation of kernel services in userland.
  */
 
+#ifndef __FreeBSD__
 int aok;
+#endif
 uint64_t physmem;
 vnode_t *rootdir = (vnode_t *)0xabcd1234;
 char hw_serial[HW_HOSTID_LEN];

Modified: stable/9/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c
==============================================================================
--- stable/9/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c	Fri Oct 23 08:01:46 2015	(r289805)
+++ stable/9/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c	Fri Oct 23 08:04:59 2015	(r289806)
@@ -44,6 +44,14 @@
 #endif
 #define	skip_whitespace(p)	while ((*(p) == ' ') || (*(p) == '\t')) p++
 
+#if defined(__FreeBSD__) && !defined(_KERNEL)
+/*
+ * libnvpair is the lowest commen denominator for ZFS related libraries,
+ * defining aok here makes it usable by all ZFS related libraries
+ */
+int aok;
+#endif
+
 /*
  * nvpair.c - Provides kernel & userland interfaces for manipulating
  *	name-value pairs.

From owner-svn-src-stable@freebsd.org  Fri Oct 23 08:12:02 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60319A1A144;
 Fri, 23 Oct 2015 08:12:02 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 2A3C035D;
 Fri, 23 Oct 2015 08:12:02 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N8C1fP084129;
 Fri, 23 Oct 2015 08:12:01 GMT (envelope-from avg@FreeBSD.org)
Received: (from avg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N8C1Yb084126;
 Fri, 23 Oct 2015 08:12:01 GMT (envelope-from avg@FreeBSD.org)
Message-Id: <201510230812.t9N8C1Yb084126@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org
 using -f
From: Andriy Gapon <avg@FreeBSD.org>
Date: Fri, 23 Oct 2015 08:12:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289807 - in stable/10/cddl/lib: libzfs libzfs_core
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Oct 2015 08:12:02 -0000

Author: avg
Date: Fri Oct 23 08:12:00 2015
New Revision: 289807
URL: https://svnweb.freebsd.org/changeset/base/289807

Log:
  MFC r284409: Fix circular dependency between libzfs and libzfs_core
  
  By bapt.

Modified:
  stable/10/cddl/lib/libzfs/Makefile
  stable/10/cddl/lib/libzfs_core/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/cddl/lib/libzfs/Makefile
==============================================================================
--- stable/10/cddl/lib/libzfs/Makefile	Fri Oct 23 08:04:59 2015	(r289806)
+++ stable/10/cddl/lib/libzfs/Makefile	Fri Oct 23 08:12:00 2015	(r289807)
@@ -37,7 +37,6 @@ SRCS+=	libzfs_changelist.c \
 	zfs_comutil.c \
 	zfs_deleg.c \
 	zfs_fletcher.c \
-	zfs_ioctl_compat.c \
 	zfs_namecheck.c \
 	zfs_prop.c \
 	zpool_prop.c \

Modified: stable/10/cddl/lib/libzfs_core/Makefile
==============================================================================
--- stable/10/cddl/lib/libzfs_core/Makefile	Fri Oct 23 08:04:59 2015	(r289806)
+++ stable/10/cddl/lib/libzfs_core/Makefile	Fri Oct 23 08:12:00 2015	(r289807)
@@ -11,7 +11,8 @@ DPADD=	${LIBNVPAIR}
 LDADD=	-lnvpair
 
 SRCS=	libzfs_core.c \
-	libzfs_core_compat.c
+	libzfs_core_compat.c \
+	zfs_ioctl_compat.c
 
 SRCS+=	libzfs_compat.c
 

From owner-svn-src-stable@freebsd.org  Fri Oct 23 08:12:45 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41A91A1A1E2;
 Fri, 23 Oct 2015 08:12:45 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 0C14878D;
 Fri, 23 Oct 2015 08:12:44 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N8Cik1084267;
 Fri, 23 Oct 2015 08:12:44 GMT (envelope-from avg@FreeBSD.org)
Received: (from avg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N8Chw0084264;
 Fri, 23 Oct 2015 08:12:43 GMT (envelope-from avg@FreeBSD.org)
Message-Id: <201510230812.t9N8Chw0084264@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org
 using -f
From: Andriy Gapon <avg@FreeBSD.org>
Date: Fri, 23 Oct 2015 08:12:43 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject: svn commit: r289808 - in stable/9/cddl/lib: libzfs libzfs_core
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Oct 2015 08:12:45 -0000

Author: avg
Date: Fri Oct 23 08:12:43 2015
New Revision: 289808
URL: https://svnweb.freebsd.org/changeset/base/289808

Log:
  MFC r284409: Fix circular dependency between libzfs and libzfs_core
  
  By bapt.

Modified:
  stable/9/cddl/lib/libzfs/Makefile
  stable/9/cddl/lib/libzfs_core/Makefile
Directory Properties:
  stable/9/cddl/lib/libzfs/   (props changed)
  stable/9/cddl/lib/libzfs_core/   (props changed)

Modified: stable/9/cddl/lib/libzfs/Makefile
==============================================================================
--- stable/9/cddl/lib/libzfs/Makefile	Fri Oct 23 08:12:00 2015	(r289807)
+++ stable/9/cddl/lib/libzfs/Makefile	Fri Oct 23 08:12:43 2015	(r289808)
@@ -33,7 +33,6 @@ SRCS+=	libzfs_changelist.c \
 	zfs_comutil.c \
 	zfs_deleg.c \
 	zfs_fletcher.c \
-	zfs_ioctl_compat.c \
 	zfs_namecheck.c \
 	zfs_prop.c \
 	zpool_prop.c \

Modified: stable/9/cddl/lib/libzfs_core/Makefile
==============================================================================
--- stable/9/cddl/lib/libzfs_core/Makefile	Fri Oct 23 08:12:00 2015	(r289807)
+++ stable/9/cddl/lib/libzfs_core/Makefile	Fri Oct 23 08:12:43 2015	(r289808)
@@ -11,7 +11,8 @@ DPADD=	${LIBNVPAIR}
 LDADD=	-lnvpair
 
 SRCS=	libzfs_core.c \
-	libzfs_core_compat.c
+	libzfs_core_compat.c \
+	zfs_ioctl_compat.c
 
 SRCS+=	libzfs_compat.c
 

From owner-svn-src-stable@freebsd.org  Fri Oct 23 08:15:54 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85C6AA1A32C;
 Fri, 23 Oct 2015 08:15:54 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 5258194E;
 Fri, 23 Oct 2015 08:15:54 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N8Fr7Q084743;
 Fri, 23 Oct 2015 08:15:53 GMT (envelope-from avg@FreeBSD.org)
Received: (from avg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N8Frxp084742;
 Fri, 23 Oct 2015 08:15:53 GMT (envelope-from avg@FreeBSD.org)
Message-Id: <201510230815.t9N8Frxp084742@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org
 using -f
From: Andriy Gapon <avg@FreeBSD.org>
Date: Fri, 23 Oct 2015 08:15:53 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289809 - stable/10/sys/cddl/dev/sdt
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Oct 2015 08:15:54 -0000

Author: avg
Date: Fri Oct 23 08:15:53 2015
New Revision: 289809
URL: https://svnweb.freebsd.org/changeset/base/289809

Log:
  MFC r288363: std: it is important that func name is never an empty string

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

Modified: stable/10/sys/cddl/dev/sdt/sdt.c
==============================================================================
--- stable/10/sys/cddl/dev/sdt/sdt.c	Fri Oct 23 08:12:43 2015	(r289808)
+++ stable/10/sys/cddl/dev/sdt/sdt.c	Fri Oct 23 08:15:53 2015	(r289809)
@@ -169,6 +169,8 @@ sdt_create_probe(struct sdt_probe *probe
 	 * in the C compiler, so we have to respect const vs non-const.
 	 */
 	strlcpy(func, probe->func, sizeof(func));
+	if (func[0] == '\0')
+		strcpy(func, "none");
 
 	from = probe->name;
 	to = name;

From owner-svn-src-stable@freebsd.org  Fri Oct 23 08:16:12 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0DE2CA1A381;
 Fri, 23 Oct 2015 08:16:12 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id CF79EA81;
 Fri, 23 Oct 2015 08:16:11 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N8GAZI084833;
 Fri, 23 Oct 2015 08:16:10 GMT (envelope-from avg@FreeBSD.org)
Received: (from avg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N8GAHI084832;
 Fri, 23 Oct 2015 08:16:10 GMT (envelope-from avg@FreeBSD.org)
Message-Id: <201510230816.t9N8GAHI084832@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org
 using -f
From: Andriy Gapon <avg@FreeBSD.org>
Date: Fri, 23 Oct 2015 08:16:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject: svn commit: r289810 - stable/9/sys/cddl/dev/sdt
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Oct 2015 08:16:12 -0000

Author: avg
Date: Fri Oct 23 08:16:10 2015
New Revision: 289810
URL: https://svnweb.freebsd.org/changeset/base/289810

Log:
  MFC r288363: std: it is important that func name is never an empty string

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

Modified: stable/9/sys/cddl/dev/sdt/sdt.c
==============================================================================
--- stable/9/sys/cddl/dev/sdt/sdt.c	Fri Oct 23 08:15:53 2015	(r289809)
+++ stable/9/sys/cddl/dev/sdt/sdt.c	Fri Oct 23 08:16:10 2015	(r289810)
@@ -169,6 +169,8 @@ sdt_create_probe(struct sdt_probe *probe
 	 * in the C compiler, so we have to respect const vs non-const.
 	 */
 	strlcpy(func, probe->func, sizeof(func));
+	if (func[0] == '\0')
+		strcpy(func, "none");
 
 	from = probe->name;
 	to = name;

From owner-svn-src-stable@freebsd.org  Fri Oct 23 08:35:19 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B0AFA1A948;
 Fri, 23 Oct 2015 08:35:19 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 27C1E1512;
 Fri, 23 Oct 2015 08:35:19 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N8ZI3d092451;
 Fri, 23 Oct 2015 08:35:18 GMT (envelope-from avg@FreeBSD.org)
Received: (from avg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N8ZHFl092447;
 Fri, 23 Oct 2015 08:35:17 GMT (envelope-from avg@FreeBSD.org)
Message-Id: <201510230835.t9N8ZHFl092447@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org
 using -f
From: Andriy Gapon <avg@FreeBSD.org>
Date: Fri, 23 Oct 2015 08:35:17 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289813 - in stable/10: .
 cddl/contrib/opensolaris/cmd/sgs cddl/usr.bin cddl/usr.bin/sgsmsg
 tools/build/mk
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Oct 2015 08:35:19 -0000

Author: avg
Date: Fri Oct 23 08:35:17 2015
New Revision: 289813
URL: https://svnweb.freebsd.org/changeset/base/289813

Log:
  MFC r288339: remove unused sgsmsg utility (originally imported from opensolaris)

Deleted:
  stable/10/cddl/contrib/opensolaris/cmd/sgs/
  stable/10/cddl/usr.bin/sgsmsg/
Modified:
  stable/10/Makefile.inc1
  stable/10/ObsoleteFiles.inc
  stable/10/cddl/usr.bin/Makefile
  stable/10/tools/build/mk/OptionalObsoleteFiles.inc
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/Makefile.inc1
==============================================================================
--- stable/10/Makefile.inc1	Fri Oct 23 08:26:45 2015	(r289812)
+++ stable/10/Makefile.inc1	Fri Oct 23 08:35:17 2015	(r289813)
@@ -1311,7 +1311,7 @@ ${_bt}-usr.bin/clang/tblgen: ${_bt}-lib/
     ((${BOOTSTRAPPING} < 1000034 && \
           !(${BOOTSTRAPPING} >= 901505 && ${BOOTSTRAPPING} < 999999)) \
       || (${MACHINE} != ${TARGET} || ${MACHINE_ARCH} != ${TARGET_ARCH}))
-_dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf lib/libelf \
+_dtrace_tools= cddl/lib/libctf lib/libelf \
     lib/libdwarf cddl/usr.bin/ctfconvert cddl/usr.bin/ctfmerge
 
 ${_bt}-cddl/usr.bin/ctfconvert: ${_bt}-lib/libelf ${_bt}-lib/libdwarf ${_bt}-cddl/lib/libctf

Modified: stable/10/ObsoleteFiles.inc
==============================================================================
--- stable/10/ObsoleteFiles.inc	Fri Oct 23 08:26:45 2015	(r289812)
+++ stable/10/ObsoleteFiles.inc	Fri Oct 23 08:35:17 2015	(r289813)
@@ -38,6 +38,8 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20151023: unused sgsmsg utility is removed
+OLD_FILES+=usr/bin/sgsmsg
 # 20150506
 OLD_FILES+=usr/share/man/man9/NDHASGIANT.9.gz
 # 20141223: remove in6_gif.h and in_gif.h

Modified: stable/10/cddl/usr.bin/Makefile
==============================================================================
--- stable/10/cddl/usr.bin/Makefile	Fri Oct 23 08:26:45 2015	(r289812)
+++ stable/10/cddl/usr.bin/Makefile	Fri Oct 23 08:35:17 2015	(r289813)
@@ -6,7 +6,6 @@ SUBDIR= \
 	ctfconvert \
 	ctfdump \
 	ctfmerge \
-	sgsmsg \
 	${_tests} \
 	${_zinject} \
 	${_zlook} \

Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc
==============================================================================
--- stable/10/tools/build/mk/OptionalObsoleteFiles.inc	Fri Oct 23 08:26:45 2015	(r289812)
+++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc	Fri Oct 23 08:35:17 2015	(r289813)
@@ -539,7 +539,6 @@ OLD_LIBS+=lib/libuutil.so.2
 OLD_FILES+=usr/bin/ctfconvert
 OLD_FILES+=usr/bin/ctfdump
 OLD_FILES+=usr/bin/ctfmerge
-OLD_FILES+=usr/bin/sgsmsg
 OLD_FILES+=usr/lib/dtrace/drti.o
 OLD_FILES+=usr/lib/dtrace/errno.d
 OLD_FILES+=usr/lib/dtrace/io.d

From owner-svn-src-stable@freebsd.org  Fri Oct 23 08:35:41 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16310A1A9BD;
 Fri, 23 Oct 2015 08:35:41 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id C991C17B3;
 Fri, 23 Oct 2015 08:35:40 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N8Zdj0092546;
 Fri, 23 Oct 2015 08:35:39 GMT (envelope-from avg@FreeBSD.org)
Received: (from avg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N8ZdnU092542;
 Fri, 23 Oct 2015 08:35:39 GMT (envelope-from avg@FreeBSD.org)
Message-Id: <201510230835.t9N8ZdnU092542@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org
 using -f
From: Andriy Gapon <avg@FreeBSD.org>
Date: Fri, 23 Oct 2015 08:35:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject: svn commit: r289814 - in stable/9: . cddl/contrib/opensolaris/cmd/sgs
 cddl/usr.bin cddl/usr.bin/sgsmsg tools/build/mk
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Oct 2015 08:35:41 -0000

Author: avg
Date: Fri Oct 23 08:35:39 2015
New Revision: 289814
URL: https://svnweb.freebsd.org/changeset/base/289814

Log:
  MFC r288339: remove unused sgsmsg utility (originally imported from opensolaris)

Deleted:
  stable/9/cddl/contrib/opensolaris/cmd/sgs/
  stable/9/cddl/usr.bin/sgsmsg/
Modified:
  stable/9/Makefile.inc1   (contents, props changed)
  stable/9/ObsoleteFiles.inc   (contents, props changed)
  stable/9/cddl/usr.bin/Makefile
  stable/9/tools/build/mk/OptionalObsoleteFiles.inc
Directory Properties:
  stable/9/   (props changed)
  stable/9/cddl/contrib/opensolaris/   (props changed)
  stable/9/tools/build/   (props changed)

Modified: stable/9/Makefile.inc1
==============================================================================
--- stable/9/Makefile.inc1	Fri Oct 23 08:35:17 2015	(r289813)
+++ stable/9/Makefile.inc1	Fri Oct 23 08:35:39 2015	(r289814)
@@ -1171,7 +1171,7 @@ ${_bt}-usr.bin/clang/tblgen: ${_bt}-lib/
     ((${BOOTSTRAPPING} < 1000034 && \
           !(${BOOTSTRAPPING} >= 901505 && ${BOOTSTRAPPING} < 999999)) \
       || (${MACHINE} != ${TARGET} || ${MACHINE_ARCH} != ${TARGET_ARCH}))
-_dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf lib/libelf \
+_dtrace_tools= cddl/lib/libctf lib/libelf \
     lib/libdwarf cddl/usr.bin/ctfconvert cddl/usr.bin/ctfmerge
 
 ${_bt}-cddl/usr.bin/ctfconvert: ${_bt}-lib/libelf ${_bt}-lib/libdwarf ${_bt}-cddl/lib/libctf

Modified: stable/9/ObsoleteFiles.inc
==============================================================================
--- stable/9/ObsoleteFiles.inc	Fri Oct 23 08:35:17 2015	(r289813)
+++ stable/9/ObsoleteFiles.inc	Fri Oct 23 08:35:39 2015	(r289814)
@@ -38,6 +38,8 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20151023: unused sgsmsg utility is removed
+OLD_FILES+=usr/bin/sgsmsg
 # 20140922: sleepq_calc_signal_retval.9 and sleepq_catch_signals.9 removed
 OLD_FILES+=usr/share/man/man9/sleepq_calc_signal_retval.9.gz
 OLD_FILES+=usr/share/man/man9/sleepq_catch_signals.9.gz

Modified: stable/9/cddl/usr.bin/Makefile
==============================================================================
--- stable/9/cddl/usr.bin/Makefile	Fri Oct 23 08:35:17 2015	(r289813)
+++ stable/9/cddl/usr.bin/Makefile	Fri Oct 23 08:35:39 2015	(r289814)
@@ -6,7 +6,6 @@ SUBDIR= \
 	ctfconvert \
 	ctfdump \
 	ctfmerge \
-	sgsmsg \
 	${_zinject} \
 	${_zlook} \
 	${_zstreamdump} \

Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc
==============================================================================
--- stable/9/tools/build/mk/OptionalObsoleteFiles.inc	Fri Oct 23 08:35:17 2015	(r289813)
+++ stable/9/tools/build/mk/OptionalObsoleteFiles.inc	Fri Oct 23 08:35:39 2015	(r289814)
@@ -678,7 +678,6 @@ OLD_LIBS+=lib/libuutil.so.2
 OLD_FILES+=usr/bin/ctfconvert
 OLD_FILES+=usr/bin/ctfdump
 OLD_FILES+=usr/bin/ctfmerge
-OLD_FILES+=usr/bin/sgsmsg
 OLD_FILES+=usr/lib/dtrace/drti.o
 OLD_FILES+=usr/lib/dtrace/errno.d
 OLD_FILES+=usr/lib/dtrace/psinfo.d

From owner-svn-src-stable@freebsd.org  Fri Oct 23 08:38:11 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9C62A1AAF5;
 Fri, 23 Oct 2015 08:38:11 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 84DB71A97;
 Fri, 23 Oct 2015 08:38:11 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N8cAhW092936;
 Fri, 23 Oct 2015 08:38:10 GMT (envelope-from avg@FreeBSD.org)
Received: (from avg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N8cA3S092935;
 Fri, 23 Oct 2015 08:38:10 GMT (envelope-from avg@FreeBSD.org)
Message-Id: <201510230838.t9N8cA3S092935@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org
 using -f
From: Andriy Gapon <avg@FreeBSD.org>
Date: Fri, 23 Oct 2015 08:38:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject: svn commit: r289815 -
 stable/9/sys/cddl/contrib/opensolaris/uts/common/sys
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Oct 2015 08:38:11 -0000

Author: avg
Date: Fri Oct 23 08:38:10 2015
New Revision: 289815
URL: https://svnweb.freebsd.org/changeset/base/289815

Log:
  MFC r284591: illums compat: use flsl/flsll for highbit/highbit64

Modified:
  stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h
==============================================================================
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h	Fri Oct 23 08:35:39 2015	(r289814)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h	Fri Oct 23 08:38:10 2015	(r289815)
@@ -32,6 +32,9 @@
 
 #include <sys/param.h>
 #include <sys/isa_defs.h>
+#if defined(__FreeBSD__) && defined(_KERNEL)
+#include <sys/libkern.h>
+#endif
 
 #ifdef	__cplusplus
 extern "C" {
@@ -382,6 +385,9 @@ extern unsigned char bcd_to_byte[256];
 static __inline int
 highbit(ulong_t i)
 {
+#if defined(__FreeBSD__) && defined(_KERNEL) && defined(HAVE_INLINE_FLSL)
+	return (flsl(i));
+#else
 	register int h = 1;
 
 	if (i == 0)
@@ -407,6 +413,7 @@ highbit(ulong_t i)
 		h += 1;
 	}
 	return (h);
+#endif
 }
 
 /*
@@ -416,6 +423,9 @@ highbit(ulong_t i)
 static __inline int
 highbit64(uint64_t i)
 {
+#if defined(__FreeBSD__) && defined(_KERNEL) && defined(HAVE_INLINE_FLSLL)
+	return (flsll(i));
+#else
 	int h = 1;
 
 	if (i == 0)
@@ -439,6 +449,7 @@ highbit64(uint64_t i)
 		h += 1;
 	}
 	return (h);
+#endif
 }
 
 #ifdef	__cplusplus

From owner-svn-src-stable@freebsd.org  Fri Oct 23 10:05:45 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A66FA1CE1C;
 Fri, 23 Oct 2015 10:05:45 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 6918E65E;
 Fri, 23 Oct 2015 10:05:45 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9NA5ich020505;
 Fri, 23 Oct 2015 10:05:44 GMT (envelope-from avg@FreeBSD.org)
Received: (from avg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NA5hwr020494;
 Fri, 23 Oct 2015 10:05:43 GMT (envelope-from avg@FreeBSD.org)
Message-Id: <201510231005.t9NA5hwr020494@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org
 using -f
From: Andriy Gapon <avg@FreeBSD.org>
Date: Fri, 23 Oct 2015 10:05:43 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289818 - in stable/10/sys: amd64/include conf
 i386/include
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Oct 2015 10:05:45 -0000

Author: avg
Date: Fri Oct 23 10:05:43 2015
New Revision: 289818
URL: https://svnweb.freebsd.org/changeset/base/289818

Log:
  MFC r261891: provide fast versions of ffsl and flsl for i386; ffsll and
  flsll for amd64

Modified:
  stable/10/sys/amd64/include/cpufunc.h
  stable/10/sys/conf/files
  stable/10/sys/conf/files.arm
  stable/10/sys/conf/files.i386
  stable/10/sys/conf/files.ia64
  stable/10/sys/conf/files.mips
  stable/10/sys/conf/files.pc98
  stable/10/sys/conf/files.powerpc
  stable/10/sys/conf/files.sparc64
  stable/10/sys/i386/include/cpufunc.h

Modified: stable/10/sys/amd64/include/cpufunc.h
==============================================================================
--- stable/10/sys/amd64/include/cpufunc.h	Fri Oct 23 08:53:32 2015	(r289817)
+++ stable/10/sys/amd64/include/cpufunc.h	Fri Oct 23 10:05:43 2015	(r289818)
@@ -154,6 +154,14 @@ ffsl(long mask)
 	return (mask == 0 ? mask : (int)bsfq((u_long)mask) + 1);
 }
 
+#define	HAVE_INLINE_FFSLL
+
+static __inline int
+ffsll(long long mask)
+{
+	return (ffsl((long)mask));
+}
+
 #define	HAVE_INLINE_FLS
 
 static __inline int
@@ -170,6 +178,14 @@ flsl(long mask)
 	return (mask == 0 ? mask : (int)bsrq((u_long)mask) + 1);
 }
 
+#define	HAVE_INLINE_FLSLL
+
+static __inline int
+flsll(long long mask)
+{
+	return (flsl((long)mask));
+}
+
 #endif /* _KERNEL */
 
 static __inline void

Modified: stable/10/sys/conf/files
==============================================================================
--- stable/10/sys/conf/files	Fri Oct 23 08:53:32 2015	(r289817)
+++ stable/10/sys/conf/files	Fri Oct 23 10:05:43 2015	(r289818)
@@ -3219,7 +3219,6 @@ libkern/asprintf.c		standard
 libkern/bcd.c			standard
 libkern/bsearch.c		standard
 libkern/crc32.c			standard
-libkern/flsll.c                 standard
 libkern/fnmatch.c		standard
 libkern/iconv.c			optional libiconv
 libkern/iconv_converter_if.m	optional libiconv

Modified: stable/10/sys/conf/files.arm
==============================================================================
--- stable/10/sys/conf/files.arm	Fri Oct 23 08:53:32 2015	(r289817)
+++ stable/10/sys/conf/files.arm	Fri Oct 23 10:05:43 2015	(r289818)
@@ -92,6 +92,7 @@ libkern/divdi3.c		standard
 libkern/ffsl.c			standard
 libkern/fls.c			standard
 libkern/flsl.c			standard
+libkern/flsll.c			standard
 libkern/lshrdi3.c		standard
 libkern/moddi3.c		standard
 libkern/qdivrem.c		standard

Modified: stable/10/sys/conf/files.i386
==============================================================================
--- stable/10/sys/conf/files.i386	Fri Oct 23 08:53:32 2015	(r289817)
+++ stable/10/sys/conf/files.i386	Fri Oct 23 10:05:43 2015	(r289818)
@@ -538,8 +538,7 @@ kern/imgact_aout.c		optional compat_aout
 kern/imgact_binmisc.c		optional imagact_binmisc
 kern/imgact_gzip.c		optional gzip
 libkern/divdi3.c		standard
-libkern/ffsl.c			standard
-libkern/flsl.c			standard
+libkern/flsll.c			standard
 libkern/memmove.c		standard
 libkern/memset.c		standard
 libkern/moddi3.c		standard

Modified: stable/10/sys/conf/files.ia64
==============================================================================
--- stable/10/sys/conf/files.ia64	Fri Oct 23 08:53:32 2015	(r289817)
+++ stable/10/sys/conf/files.ia64	Fri Oct 23 10:05:43 2015	(r289818)
@@ -121,6 +121,7 @@ libkern/bcmp.c			standard
 libkern/ffsl.c			standard
 libkern/fls.c			standard
 libkern/flsl.c			standard
+libkern/flsll.c			standard
 libkern/ia64/__divdi3.S		standard
 libkern/ia64/__divsi3.S		standard
 libkern/ia64/__moddi3.S		standard

Modified: stable/10/sys/conf/files.mips
==============================================================================
--- stable/10/sys/conf/files.mips	Fri Oct 23 08:53:32 2015	(r289817)
+++ stable/10/sys/conf/files.mips	Fri Oct 23 10:05:43 2015	(r289818)
@@ -56,6 +56,7 @@ kern/subr_dummy_vdso_tc.c		standard
 libkern/ffsl.c				standard
 libkern/fls.c				standard
 libkern/flsl.c				standard
+libkern/flsll.c				standard
 libkern/memmove.c			standard
 libkern/cmpdi2.c			optional	mips | mipsel
 libkern/ucmpdi2.c			optional	mips | mipsel

Modified: stable/10/sys/conf/files.pc98
==============================================================================
--- stable/10/sys/conf/files.pc98	Fri Oct 23 08:53:32 2015	(r289817)
+++ stable/10/sys/conf/files.pc98	Fri Oct 23 10:05:43 2015	(r289818)
@@ -210,8 +210,7 @@ kern/kern_clocksource.c		standard
 kern/imgact_aout.c		optional compat_aout
 kern/imgact_gzip.c		optional gzip
 libkern/divdi3.c		standard
-libkern/ffsl.c			standard
-libkern/flsl.c			standard
+libkern/flsll.c			standard
 libkern/memmove.c		standard
 libkern/memset.c		standard
 libkern/moddi3.c		standard

Modified: stable/10/sys/conf/files.powerpc
==============================================================================
--- stable/10/sys/conf/files.powerpc	Fri Oct 23 08:53:32 2015	(r289817)
+++ stable/10/sys/conf/files.powerpc	Fri Oct 23 10:05:43 2015	(r289818)
@@ -83,6 +83,7 @@ libkern/ffs.c			standard
 libkern/ffsl.c			standard
 libkern/fls.c			standard
 libkern/flsl.c			standard
+libkern/flsll.c			standard
 libkern/lshrdi3.c		optional	powerpc
 libkern/memmove.c		standard
 libkern/memset.c		standard

Modified: stable/10/sys/conf/files.sparc64
==============================================================================
--- stable/10/sys/conf/files.sparc64	Fri Oct 23 08:53:32 2015	(r289817)
+++ stable/10/sys/conf/files.sparc64	Fri Oct 23 10:05:43 2015	(r289818)
@@ -69,6 +69,7 @@ libkern/ffs.c			standard
 libkern/ffsl.c			standard
 libkern/fls.c			standard
 libkern/flsl.c			standard
+libkern/flsll.c			standard
 libkern/memmove.c		standard
 sparc64/central/central.c	optional	central
 sparc64/ebus/ebus.c		optional	ebus

Modified: stable/10/sys/i386/include/cpufunc.h
==============================================================================
--- stable/10/sys/i386/include/cpufunc.h	Fri Oct 23 08:53:32 2015	(r289817)
+++ stable/10/sys/i386/include/cpufunc.h	Fri Oct 23 10:05:43 2015	(r289818)
@@ -184,6 +184,14 @@ ffs(int mask)
 	 return (mask == 0 ? mask : (int)bsfl((u_int)mask) + 1);
 }
 
+#define	HAVE_INLINE_FFSL
+
+static __inline int
+ffsl(long mask)
+{
+	return (ffs((int)mask));
+}
+
 #define	HAVE_INLINE_FLS
 
 static __inline int
@@ -192,6 +200,14 @@ fls(int mask)
 	return (mask == 0 ? mask : (int)bsrl((u_int)mask) + 1);
 }
 
+#define	HAVE_INLINE_FLSL
+
+static __inline int
+flsl(long mask)
+{
+	return (fls((int)mask));
+}
+
 #endif /* _KERNEL */
 
 static __inline void

From owner-svn-src-stable@freebsd.org  Fri Oct 23 10:48:31 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DAD9A1B9B3;
 Fri, 23 Oct 2015 10:48:31 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 1D7AA1D77;
 Fri, 23 Oct 2015 10:48:31 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9NAmUuV032007;
 Fri, 23 Oct 2015 10:48:30 GMT (envelope-from avg@FreeBSD.org)
Received: (from avg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NAmTkY031998;
 Fri, 23 Oct 2015 10:48:29 GMT (envelope-from avg@FreeBSD.org)
Message-Id: <201510231048.t9NAmTkY031998@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org
 using -f
From: Andriy Gapon <avg@FreeBSD.org>
Date: Fri, 23 Oct 2015 10:48:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject: svn commit: r289820 - in stable/9/sys: amd64/include conf i386/include
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Oct 2015 10:48:31 -0000

Author: avg
Date: Fri Oct 23 10:48:29 2015
New Revision: 289820
URL: https://svnweb.freebsd.org/changeset/base/289820

Log:
  MFC r261891: provide fast versions of ffsl and flsl for i386; ffsll and
  flsll for amd64

Modified:
  stable/9/sys/amd64/include/cpufunc.h
  stable/9/sys/conf/files.arm
  stable/9/sys/conf/files.i386
  stable/9/sys/conf/files.ia64
  stable/9/sys/conf/files.mips
  stable/9/sys/conf/files.pc98
  stable/9/sys/conf/files.powerpc
  stable/9/sys/conf/files.sparc64
  stable/9/sys/i386/include/cpufunc.h
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/conf/   (props changed)

Modified: stable/9/sys/amd64/include/cpufunc.h
==============================================================================
--- stable/9/sys/amd64/include/cpufunc.h	Fri Oct 23 10:39:43 2015	(r289819)
+++ stable/9/sys/amd64/include/cpufunc.h	Fri Oct 23 10:48:29 2015	(r289820)
@@ -154,6 +154,14 @@ ffsl(long mask)
 	return (mask == 0 ? mask : (int)bsfq((u_long)mask) + 1);
 }
 
+#define	HAVE_INLINE_FFSLL
+
+static __inline int
+ffsll(long long mask)
+{
+	return (ffsl((long)mask));
+}
+
 #define	HAVE_INLINE_FLS
 
 static __inline int
@@ -170,6 +178,14 @@ flsl(long mask)
 	return (mask == 0 ? mask : (int)bsrq((u_long)mask) + 1);
 }
 
+#define	HAVE_INLINE_FLSLL
+
+static __inline int
+flsll(long long mask)
+{
+	return (flsl((long)mask));
+}
+
 #endif /* _KERNEL */
 
 static __inline void

Modified: stable/9/sys/conf/files.arm
==============================================================================
--- stable/9/sys/conf/files.arm	Fri Oct 23 10:39:43 2015	(r289819)
+++ stable/9/sys/conf/files.arm	Fri Oct 23 10:48:29 2015	(r289820)
@@ -68,6 +68,7 @@ libkern/divdi3.c		standard
 libkern/ffsl.c			standard
 libkern/fls.c			standard
 libkern/flsl.c			standard
+libkern/flsll.c			standard
 libkern/lshrdi3.c		standard
 libkern/memchr.c		optional	fdt
 libkern/moddi3.c		standard

Modified: stable/9/sys/conf/files.i386
==============================================================================
--- stable/9/sys/conf/files.i386	Fri Oct 23 10:39:43 2015	(r289819)
+++ stable/9/sys/conf/files.i386	Fri Oct 23 10:48:29 2015	(r289820)
@@ -522,8 +522,7 @@ kern/kern_clocksource.c		standard
 kern/imgact_aout.c		optional compat_aout
 kern/imgact_gzip.c		optional gzip
 libkern/divdi3.c		standard
-libkern/ffsl.c			standard
-libkern/flsl.c			standard
+libkern/flsll.c			standard
 libkern/memmove.c		standard
 libkern/memset.c		standard
 libkern/moddi3.c		standard

Modified: stable/9/sys/conf/files.ia64
==============================================================================
--- stable/9/sys/conf/files.ia64	Fri Oct 23 10:39:43 2015	(r289819)
+++ stable/9/sys/conf/files.ia64	Fri Oct 23 10:48:29 2015	(r289820)
@@ -126,6 +126,7 @@ libkern/bcmp.c			standard
 libkern/ffsl.c			standard
 libkern/fls.c			standard
 libkern/flsl.c			standard
+libkern/flsll.c			standard
 libkern/ia64/__divdi3.S		standard
 libkern/ia64/__divsi3.S		standard
 libkern/ia64/__moddi3.S		standard

Modified: stable/9/sys/conf/files.mips
==============================================================================
--- stable/9/sys/conf/files.mips	Fri Oct 23 10:39:43 2015	(r289819)
+++ stable/9/sys/conf/files.mips	Fri Oct 23 10:48:29 2015	(r289820)
@@ -77,6 +77,7 @@ libkern/divdi3.c		optional	isa_mips32
 libkern/ffsl.c			standard
 libkern/fls.c			standard
 libkern/flsl.c			standard
+libkern/flsll.c			standard
 libkern/lshrdi3.c		standard
 libkern/memmove.c		standard
 libkern/moddi3.c		optional	isa_mips32

Modified: stable/9/sys/conf/files.pc98
==============================================================================
--- stable/9/sys/conf/files.pc98	Fri Oct 23 10:39:43 2015	(r289819)
+++ stable/9/sys/conf/files.pc98	Fri Oct 23 10:48:29 2015	(r289820)
@@ -210,8 +210,7 @@ kern/kern_clocksource.c		standard
 kern/imgact_aout.c		optional compat_aout
 kern/imgact_gzip.c		optional gzip
 libkern/divdi3.c		standard
-libkern/ffsl.c			standard
-libkern/flsl.c			standard
+libkern/flsll.c			standard
 libkern/memmove.c		standard
 libkern/memset.c		standard
 libkern/moddi3.c		standard

Modified: stable/9/sys/conf/files.powerpc
==============================================================================
--- stable/9/sys/conf/files.powerpc	Fri Oct 23 10:39:43 2015	(r289819)
+++ stable/9/sys/conf/files.powerpc	Fri Oct 23 10:48:29 2015	(r289820)
@@ -70,6 +70,7 @@ libkern/ffs.c			standard
 libkern/ffsl.c			standard
 libkern/fls.c			standard
 libkern/flsl.c			standard
+libkern/flsll.c			standard
 libkern/lshrdi3.c		optional	powerpc
 libkern/memchr.c		optional	fdt
 libkern/memmove.c		standard

Modified: stable/9/sys/conf/files.sparc64
==============================================================================
--- stable/9/sys/conf/files.sparc64	Fri Oct 23 10:39:43 2015	(r289819)
+++ stable/9/sys/conf/files.sparc64	Fri Oct 23 10:48:29 2015	(r289820)
@@ -67,6 +67,7 @@ libkern/ffs.c			standard
 libkern/ffsl.c			standard
 libkern/fls.c			standard
 libkern/flsl.c			standard
+libkern/flsll.c			standard
 libkern/memmove.c		standard
 sparc64/central/central.c	optional	central
 sparc64/ebus/ebus.c		optional	ebus

Modified: stable/9/sys/i386/include/cpufunc.h
==============================================================================
--- stable/9/sys/i386/include/cpufunc.h	Fri Oct 23 10:39:43 2015	(r289819)
+++ stable/9/sys/i386/include/cpufunc.h	Fri Oct 23 10:48:29 2015	(r289820)
@@ -184,6 +184,14 @@ ffs(int mask)
 	 return (mask == 0 ? mask : (int)bsfl((u_int)mask) + 1);
 }
 
+#define	HAVE_INLINE_FFSL
+
+static __inline int
+ffsl(long mask)
+{
+	return (ffs((int)mask));
+}
+
 #define	HAVE_INLINE_FLS
 
 static __inline int
@@ -192,6 +200,14 @@ fls(int mask)
 	return (mask == 0 ? mask : (int)bsrl((u_int)mask) + 1);
 }
 
+#define	HAVE_INLINE_FLSL
+
+static __inline int
+flsl(long mask)
+{
+	return (fls((int)mask));
+}
+
 #endif /* _KERNEL */
 
 static __inline void

From owner-svn-src-stable@freebsd.org  Fri Oct 23 12:20:37 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BF2CA1CD32;
 Fri, 23 Oct 2015 12:20:37 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id CFE4DA48;
 Fri, 23 Oct 2015 12:20:36 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9NCKZLS059280;
 Fri, 23 Oct 2015 12:20:35 GMT (envelope-from avg@FreeBSD.org)
Received: (from avg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NCKZJF059279;
 Fri, 23 Oct 2015 12:20:35 GMT (envelope-from avg@FreeBSD.org)
Message-Id: <201510231220.t9NCKZJF059279@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org
 using -f
From: Andriy Gapon <avg@FreeBSD.org>
Date: Fri, 23 Oct 2015 12:20:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r289827 - stable/10
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Oct 2015 12:20:37 -0000

Author: avg
Date: Fri Oct 23 12:20:35 2015
New Revision: 289827
URL: https://svnweb.freebsd.org/changeset/base/289827

Log:
  mergeinfo for r289818 (MFC r261891 ...)

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

From owner-svn-src-stable@freebsd.org  Fri Oct 23 15:14:38 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8AD80A1D174;
 Fri, 23 Oct 2015 15:14:38 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 5FD7012EC;
 Fri, 23 Oct 2015 15:14:38 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9NFEbnZ012101;
 Fri, 23 Oct 2015 15:14:37 GMT (envelope-from avg@FreeBSD.org)
Received: (from avg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NFEb1a012099;
 Fri, 23 Oct 2015 15:14:37 GMT (envelope-from avg@FreeBSD.org)
Message-Id: <201510231514.t9NFEb1a012099@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org
 using -f
From: Andriy Gapon <avg@FreeBSD.org>
Date: Fri, 23 Oct 2015 15:14:37 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject: svn commit: r289832 - in stable/9/sys: libkern sys
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Oct 2015 15:14:38 -0000

Author: avg
Date: Fri Oct 23 15:14:37 2015
New Revision: 289832
URL: https://svnweb.freebsd.org/changeset/base/289832

Log:
  Partial MFC r253719: add flsll to libkern
  
  Original commit description:
    Fix watchdog pretimeout.
    ...
  
  Only flsll bits of that commit are needed.
  This should fix the build broken in r289820 for !amd64.
  
  Pointyhat to:	avg

Added:
  stable/9/sys/libkern/flsll.c
     - copied unchanged from r253719, head/sys/libkern/flsll.c
Modified:
  stable/9/sys/sys/libkern.h
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/sys/   (props changed)

Copied: stable/9/sys/libkern/flsll.c (from r253719, head/sys/libkern/flsll.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/9/sys/libkern/flsll.c	Fri Oct 23 15:14:37 2015	(r289832, copy of r253719, head/sys/libkern/flsll.c)
@@ -0,0 +1,47 @@
+/*-
+ * Copyright (c) 1990, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+#include <sys/libkern.h>
+__FBSDID("$FreeBSD$");
+
+/*
+ * Find Last Set bit
+ */
+int
+flsll(long long mask)
+{
+	int bit;
+
+	if (mask == 0)
+		return (0);
+	for (bit = 1; mask != 1; bit++)
+		mask = (unsigned long long)mask >> 1;
+	return (bit);
+}

Modified: stable/9/sys/sys/libkern.h
==============================================================================
--- stable/9/sys/sys/libkern.h	Fri Oct 23 15:08:16 2015	(r289831)
+++ stable/9/sys/sys/libkern.h	Fri Oct 23 15:14:37 2015	(r289832)
@@ -94,6 +94,10 @@ int	 fls(int);
 #ifndef	HAVE_INLINE_FLSL
 int	 flsl(long);
 #endif
+#ifndef	HAVE_INLINE_FLSLL
+int	 flsll(long long);
+#endif
+
 #define	bitcount64(x)	__bitcount64((uint64_t)(x))
 #define	bitcount32(x)	__bitcount32((uint32_t)(x))
 #define	bitcount16(x)	__bitcount16((uint16_t)(x))

From owner-svn-src-stable@freebsd.org  Sat Oct 24 19:05:21 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5719CA1D4DA;
 Sat, 24 Oct 2015 19:05:21 +0000 (UTC)
 (envelope-from avatar@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 1B2311907;
 Sat, 24 Oct 2015 19:05:21 +0000 (UTC)
 (envelope-from avatar@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9OJ5JTS030800;
 Sat, 24 Oct 2015 19:05:19 GMT (envelope-from avatar@FreeBSD.org)
Received: (from avatar@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9OJ5J4g030799;
 Sat, 24 Oct 2015 19:05:19 GMT (envelope-from avatar@FreeBSD.org)
Message-Id: <201510241905.t9OJ5J4g030799@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avatar set sender to
 avatar@FreeBSD.org using -f
From: Tai-hwa Liang <avatar@FreeBSD.org>
Date: Sat, 24 Oct 2015 19:05:19 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject: svn commit: r289885 - stable/8/sys/gnu/fs/reiserfs
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 24 Oct 2015 19:05:21 -0000

Author: avatar
Date: Sat Oct 24 19:05:19 2015
New Revision: 289885
URL: https://svnweb.freebsd.org/changeset/base/289885

Log:
  MFC r287698: Fixing a memory leak on module unloading.

Modified:
  stable/8/sys/gnu/fs/reiserfs/reiserfs_vfsops.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/gnu/   (props changed)

Modified: stable/8/sys/gnu/fs/reiserfs/reiserfs_vfsops.c
==============================================================================
--- stable/8/sys/gnu/fs/reiserfs/reiserfs_vfsops.c	Sat Oct 24 19:04:55 2015	(r289884)
+++ stable/8/sys/gnu/fs/reiserfs/reiserfs_vfsops.c	Sat Oct 24 19:05:19 2015	(r289885)
@@ -1050,6 +1050,7 @@ uint32_t find_hash_out(struct reiserfs_m
 		}
 	} while (0);
 
+	free(ip, M_REISERFSNODE);
 	pathrelse(&path);
 	return (hash);
 }

From owner-svn-src-stable@freebsd.org  Sat Oct 24 19:40:28 2015
Return-Path: <owner-svn-src-stable@freebsd.org>
Delivered-To: svn-src-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9AD27A1DEC9;
 Sat, 24 Oct 2015 19:40:28 +0000 (UTC)
 (envelope-from avatar@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 523A111A4;
 Sat, 24 Oct 2015 19:40:28 +0000 (UTC)
 (envelope-from avatar@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9OJeRfT039855;
 Sat, 24 Oct 2015 19:40:27 GMT (envelope-from avatar@FreeBSD.org)
Received: (from avatar@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9OJeRhr039854;
 Sat, 24 Oct 2015 19:40:27 GMT (envelope-from avatar@FreeBSD.org)
Message-Id: <201510241940.t9OJeRhr039854@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avatar set sender to
 avatar@FreeBSD.org using -f
From: Tai-hwa Liang <avatar@FreeBSD.org>
Date: Sat, 24 Oct 2015 19:40:27 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject: svn commit: r289889 - stable/7/sys/gnu/fs/reiserfs
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable>, 
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 24 Oct 2015 19:40:28 -0000

Author: avatar
Date: Sat Oct 24 19:40:27 2015
New Revision: 289889
URL: https://svnweb.freebsd.org/changeset/base/289889

Log:
  MFC r238980:
  
    Just like the other file systems found in /sys/fs, g_vfs_open()
  should be paried with g_vfs_close().  Though g_vfs_close() is a wrapper
  around g_wither_geom_close(), r206130 added the following test in
  g_vfs_open():
  
  	if (bo->bo_private != vp)
  		return (EBUSY);
  
    Which will cause a 'Device busy' error inside reiserfs_mountfs() if
  the same file system is re-mounted again after umount or mounting failure:
  
  	(case 1, /dev/ad4s3 is not a valid REISERFS partition)
  	# mount -t reiserfs -o ro /dev/ad4s3 /mnt
  	mount: /dev/ad4s3: Invalid argument
  	# mount -t msdosfs -o ro /dev/ad4s3 /mnt
  	mount: /dev/ad4s3: Device busy
  
  	(case 2, /dev/ad4s3 is a valid REISERFS partition)
  	# mount -t reiserfs -o ro /dev/ad4s3 /mnt
  	# umount /mnt
  	# mount -t reiserfs -o ro /dev/ad4s3 /mnt
  	mount: /dev/ad4s3: Device busy
  
    On the other hand, g_vfs_close() 'fixed' the above cases by doing an
  extra step to keep 'sc->sc_bo->bo_private' and 'cp->private' pointers
  synchronised.
  
  Reviewed by:	kib

Modified:
  stable/7/sys/gnu/fs/reiserfs/reiserfs_vfsops.c
Directory Properties:
  stable/7/sys/   (props changed)

Modified: stable/7/sys/gnu/fs/reiserfs/reiserfs_vfsops.c
==============================================================================
--- stable/7/sys/gnu/fs/reiserfs/reiserfs_vfsops.c	Sat Oct 24 19:40:03 2015	(r289888)
+++ stable/7/sys/gnu/fs/reiserfs/reiserfs_vfsops.c	Sat Oct 24 19:40:27 2015	(r289889)
@@ -223,7 +223,7 @@ reiserfs_unmount(struct mount *mp, int m
 
 	DROP_GIANT();
 	g_topology_lock();
-	g_wither_geom_close(rmp->rm_cp->geom, ENXIO);
+	g_vfs_close(rmp->rm_cp, td);
 	g_topology_unlock();
 	PICKUP_GIANT();
 	vrele(rmp->rm_devvp);
@@ -635,7 +635,7 @@ out:
 	if (cp != NULL) {
 		DROP_GIANT();
 		g_topology_lock();
-		g_wither_geom_close(cp->geom, ENXIO);
+		g_vfs_close(cp, td);
 		g_topology_unlock();
 		PICKUP_GIANT();
 	}