Index: sys/kern/kern_jail.c
===================================================================
--- sys/kern/kern_jail.c	(revision 358732)
+++ sys/kern/kern_jail.c	(working copy)
@@ -196,6 +196,7 @@
 	{"allow.read_msgbuf", "allow.noread_msgbuf", PR_ALLOW_READ_MSGBUF},
 	{"allow.unprivileged_proc_debug", "allow.nounprivileged_proc_debug",
 	 PR_ALLOW_UNPRIV_DEBUG},
+	{"allow.kmem_access", "allow.nokmem_access", PR_ALLOW_KMEM_ACCESS},
 };
 const size_t pr_flag_allow_size = sizeof(pr_flag_allow);
 
@@ -3327,6 +3328,27 @@
 		return (0);
 
 		/*
+		 * Allow access to /dev/io in a jail if the non-jailed admin
+		 * requests this and if /dev/io exists in the jail. This
+		 * allows Xorg to probe a card.
+		 */
+	case PRIV_IO:
+		if (cred->cr_prison->pr_allow & PR_ALLOW_KMEM_ACCESS)
+			return (0);
+		else
+			return (EPERM);
+
+		/*
+		 * Allow low level access to KMEM-like devices (e.g. to
+		 * allow Xorg to use DRI).
+		 */
+	case PRIV_KMEM_WRITE:
+		if (cred->cr_prison->pr_allow & PR_ALLOW_KMEM_ACCESS)
+			return (0);
+		else
+			return (EPERM);
+
+		/*
 		 * Allow jailed root to set loginclass.
 		 */
 	case PRIV_PROC_SETLOGINCLASS:
@@ -3760,6 +3782,8 @@
     "B", "Jail may lock (unlock) physical pages in memory");
 SYSCTL_JAIL_PARAM(_allow, reserved_ports, CTLTYPE_INT | CTLFLAG_RW,
     "B", "Jail may bind sockets to reserved ports");
+SYSCTL_JAIL_PARAM(_allow, kmem_access, CTLTYPE_INT | CTLFLAG_RW,
+    "B", "Jail may access kmem-like devices (io, dri) if they exist");
 SYSCTL_JAIL_PARAM(_allow, read_msgbuf, CTLTYPE_INT | CTLFLAG_RW,
     "B", "Jail may read the kernel message buffer");
 SYSCTL_JAIL_PARAM(_allow, unprivileged_proc_debug, CTLTYPE_INT | CTLFLAG_RW,
@@ -4138,7 +4162,7 @@
 		    : (f == jsf->new) ? "new"
 		    : "inherit");
 	}
-	db_printf(" allow           = 0x%x", pr->pr_allow);
+	db_printf(" allow           = 0x%lx", pr->pr_allow);
 	for (bf = pr_flag_allow;
 	     bf < pr_flag_allow + nitems(pr_flag_allow) && bf->flag != 0;
 	     bf++)
Index: sys/kern/kern_sig.c
===================================================================
--- sys/kern/kern_sig.c	(revision 358732)
+++ sys/kern/kern_sig.c	(working copy)
@@ -81,6 +81,7 @@
 #include <sys/sysent.h>
 #include <sys/syslog.h>
 #include <sys/sysproto.h>
+#include <sys/time.h>
 #include <sys/timers.h>
 #include <sys/unistd.h>
 #include <sys/wait.h>
@@ -3230,14 +3231,18 @@
 		 */
 		if (coredump(td) == 0)
 			sig |= WCOREFLAG;
-		if (kern_logsigexit)
+		if (kern_logsigexit) {
+			struct bintime now;
+
+			getbintime(&now);
 			log(LOG_INFO,
-			    "pid %d (%s), jid %d, uid %d: exited on "
-			    "signal %d%s\n", p->p_pid, p->p_comm,
+			    "%zd: pid %d (%s), jid %d, uid %d: exited on "
+			    "signal %d%s\n", now.sec, p->p_pid, p->p_comm,
 			    p->p_ucred->cr_prison->pr_id,
 			    td->td_ucred->cr_uid,
 			    sig &~ WCOREFLAG,
 			    sig & WCOREFLAG ? " (core dumped)" : "");
+		}
 	} else
 		PROC_UNLOCK(p);
 	exit1(td, 0, sig);
Index: sys/kern/subr_bus.c
===================================================================
--- sys/kern/subr_bus.c	(revision 358732)
+++ sys/kern/subr_bus.c	(working copy)
@@ -1794,7 +1794,7 @@
  * @param parent	the parent of the new device
  * @param name		the devclass name of the new device or @c NULL
  *			to leave the devclass unspecified
- * @parem unit		the unit number of the new device of @c -1 to
+ * @param unit		the unit number of the new device of @c -1 to
  *			leave the unit number unspecified
  *
  * @returns the new device
Index: sys/kern/uipc_socket.c
===================================================================
--- sys/kern/uipc_socket.c	(revision 358732)
+++ sys/kern/uipc_socket.c	(working copy)
@@ -601,10 +601,21 @@
 		overcount++;
 
 		if (ratecheck(&lastover, &overinterval)) {
-			log(LOG_DEBUG, "%s: pcb %p: Listen queue overflow: "
-			    "%i already in queue awaiting acceptance "
-			    "(%d occurrences)\n",
-			    __func__, head->so_pcb, head->sol_qlen, overcount);
+			if (head->so_cred <= 0) {
+				log(LOG_DEBUG, "%s: pcb %p: Listen queue overflow: "
+				    "%i already in queue awaiting acceptance "
+				    "(%d occurrences)\n",
+				    __func__, head->so_pcb, head->sol_qlen, overcount);
+			} else {
+				log(LOG_DEBUG, "%s: pcb %p: Listen queue overflow: "
+				    "%i already in queue awaiting acceptance "
+				    "(%d occurrences), euid %d, rgid %d, jail %s\n",
+				    __func__, head->so_pcb, head->sol_qlen, overcount,
+				    head->so_cred->cr_uid, head->so_cred->cr_rgid,
+				    head->so_cred->cr_prison ?
+				        head->so_cred->cr_prison->pr_name :
+				        "not_jailed");
+			}
 
 			overcount = 0;
 		}
