[Zrouter-src-freebsd] ZRouter.org: push to FreeBSD HEAD tree

zrouter-src-freebsd at zrouter.org zrouter-src-freebsd at zrouter.org
Fri Mar 2 15:39:01 UTC 2012


details:   http://zrouter.org/hg/FreeBSD/head//rev/b327ef2f7331
changeset: 379:b327ef2f7331
user:      ray at terran.dlink.ua
date:      Fri Mar 02 17:07:54 2012 +0200
description:
Update to FreeBSD-HEAD @232391

diffstat:

 head/sys/sys/_umtx.h       |   9 ++++++++-
 head/sys/sys/buf.h         |  11 +++++++----
 head/sys/sys/bus_dma.h     |   4 ++--
 head/sys/sys/cdefs.h       |   4 ++--
 head/sys/sys/conf.h        |   6 +++---
 head/sys/sys/diskmbr.h     |   3 ++-
 head/sys/sys/elf_common.h  |   6 +++++-
 head/sys/sys/jail.h        |  13 ++++++++++---
 head/sys/sys/malloc.h      |   4 ++--
 head/sys/sys/msgbuf.h      |   6 ++++--
 head/sys/sys/param.h       |   4 ++--
 head/sys/sys/pipe.h        |   6 +++++-
 head/sys/sys/pmc.h         |   3 ++-
 head/sys/sys/proc.h        |  18 ++++++++++++++----
 head/sys/sys/ptrace.h      |   9 ++-------
 head/sys/sys/rman.h        |   4 ++--
 head/sys/sys/socket.h      |   9 +++++++--
 head/sys/sys/sysctl.h      |   3 ++-
 head/sys/sys/systm.h       |   5 ++++-
 head/sys/sys/ttycom.h      |   4 ++--
 head/sys/sys/ttydefaults.h |   8 ++++----
 head/sys/sys/ucontext.h    |   4 ++--
 head/sys/sys/umtx.h        |   4 +++-
 head/sys/sys/vnode.h       |  21 ++++++++++++++-------
 24 files changed, 110 insertions(+), 58 deletions(-)

diffs (714 lines):

diff -r fc6cfb0dbf30 -r b327ef2f7331 head/sys/sys/_umtx.h
--- a/head/sys/sys/_umtx.h	Fri Mar 02 17:07:09 2012 +0200
+++ b/head/sys/sys/_umtx.h	Fri Mar 02 17:07:54 2012 +0200
@@ -23,7 +23,7 @@
  * (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$
+ * $FreeBSD: head/sys/sys/_umtx.h 232144 2012-02-25 02:12:17Z davidxu $
  *
  */
 
@@ -31,6 +31,7 @@
 #define	_SYS__UMTX_H_
 
 #include <sys/_types.h>
+#include <sys/_timespec.h>
 
 struct umtx {
 	volatile unsigned long	u_owner;	/* Owner of the mutex. */
@@ -64,4 +65,10 @@
 	__uint32_t		_flags;
 };
 
+struct _umtx_time {
+	struct timespec		_timeout;
+	__uint32_t		_flags;
+	__uint32_t		_clockid;
+};
+
 #endif /* !_SYS__UMTX_H_ */
diff -r fc6cfb0dbf30 -r b327ef2f7331 head/sys/sys/buf.h
--- a/head/sys/sys/buf.h	Fri Mar 02 17:07:09 2012 +0200
+++ b/head/sys/sys/buf.h	Fri Mar 02 17:07:54 2012 +0200
@@ -32,7 +32,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)buf.h	8.9 (Berkeley) 3/30/95
- * $FreeBSD: head/sys/sys/buf.h 225448 2011-09-08 12:56:26Z attilio $
+ * $FreeBSD: head/sys/sys/buf.h 232351 2012-03-01 18:45:25Z mckusick $
  */
 
 #ifndef _SYS_BUF_H_
@@ -479,10 +479,13 @@
 int	buf_dirty_count_severe(void);
 void	bremfree(struct buf *);
 void	bremfreef(struct buf *);	/* XXX Force bremfree, only for nfs. */
-int	bread(struct vnode *, daddr_t, int, struct ucred *, struct buf **);
+#define bread(vp, blkno, size, cred, bpp) \
+	    breadn_flags(vp, blkno, size, 0, 0, 0, cred, 0, bpp)
+#define breadn(vp, blkno, size, rablkno, rabsize, cnt, cred, bpp) \
+	    breadn_flags(vp, blkno, size, rablkno, rabsize, cnt, cred, 0, bpp)
+int	breadn_flags(struct vnode *, daddr_t, int, daddr_t *, int *, int,
+	    struct ucred *, int, struct buf **);
 void	breada(struct vnode *, daddr_t *, int *, int, struct ucred *);
-int	breadn(struct vnode *, daddr_t, int, daddr_t *, int *, int,
-	    struct ucred *, struct buf **);
 void	bdwrite(struct buf *);
 void	bawrite(struct buf *);
 void	bdirty(struct buf *);
diff -r fc6cfb0dbf30 -r b327ef2f7331 head/sys/sys/bus_dma.h
--- a/head/sys/sys/bus_dma.h	Fri Mar 02 17:07:09 2012 +0200
+++ b/head/sys/sys/bus_dma.h	Fri Mar 02 17:07:54 2012 +0200
@@ -67,7 +67,7 @@
  * (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$ */
+/* $FreeBSD: head/sys/sys/bus_dma.h 232356 2012-03-01 19:58:34Z jhb $ */
 
 #ifndef _BUS_DMA_H_
 #define _BUS_DMA_H_
@@ -169,7 +169,7 @@
  */
 /* XXX Should probably allow specification of alignment */
 int bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment,
-		       bus_size_t boundary, bus_addr_t lowaddr,
+		       bus_addr_t boundary, bus_addr_t lowaddr,
 		       bus_addr_t highaddr, bus_dma_filter_t *filtfunc,
 		       void *filtfuncarg, bus_size_t maxsize, int nsegments,
 		       bus_size_t maxsegsz, int flags, bus_dma_lock_t *lockfunc,
diff -r fc6cfb0dbf30 -r b327ef2f7331 head/sys/sys/cdefs.h
--- a/head/sys/sys/cdefs.h	Fri Mar 02 17:07:09 2012 +0200
+++ b/head/sys/sys/cdefs.h	Fri Mar 02 17:07:54 2012 +0200
@@ -30,7 +30,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
- * $FreeBSD: head/sys/sys/cdefs.h 230277 2012-01-17 20:21:31Z ed $
+ * $FreeBSD: head/sys/sys/cdefs.h 231714 2012-02-14 21:48:46Z dim $
  */
 
 #ifndef	_SYS_CDEFS_H_
@@ -468,7 +468,7 @@
  * Embed the rcs id of a source file in the resulting library.  Note that in
  * more recent ELF binutils, we use .ident allowing the ID to be stripped.
  * Usage:
- *	__FBSDID("$FreeBSD: head/sys/sys/cdefs.h 230277 2012-01-17 20:21:31Z ed $");
+ *	__FBSDID("$FreeBSD: head/sys/sys/cdefs.h 231714 2012-02-14 21:48:46Z dim $");
  */
 #ifndef	__FBSDID
 #if !defined(lint) && !defined(STRIP_FBSDID)
diff -r fc6cfb0dbf30 -r b327ef2f7331 head/sys/sys/conf.h
--- a/head/sys/sys/conf.h	Fri Mar 02 17:07:09 2012 +0200
+++ b/head/sys/sys/conf.h	Fri Mar 02 17:07:54 2012 +0200
@@ -34,7 +34,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)conf.h	8.5 (Berkeley) 1/9/95
- * $FreeBSD: head/sys/sys/conf.h 226500 2011-10-18 08:09:44Z ed $
+ * $FreeBSD: head/sys/sys/conf.h 231379 2012-02-10 12:40:50Z ed $
  */
 
 #ifndef _SYS_CONF_H_
@@ -78,7 +78,7 @@
 	LIST_HEAD(, cdev)	si_children;
 	LIST_ENTRY(cdev)	si_siblings;
 	struct cdev *si_parent;
-	char		*si_name;
+	void		*si_spare0;
 	void		*si_drv1, *si_drv2;
 	struct cdevsw	*si_devsw;
 	int		si_iosize_max;	/* maximum I/O size (for physio &al) */
@@ -87,7 +87,7 @@
 	union {
 		struct snapdata *__sid_snapdata;
 	} __si_u;
-	char		__si_namebuf[SPECNAMELEN + 1];
+	char		si_name[SPECNAMELEN + 1];
 };
 
 #define	si_snapdata	__si_u.__sid_snapdata
diff -r fc6cfb0dbf30 -r b327ef2f7331 head/sys/sys/diskmbr.h
--- a/head/sys/sys/diskmbr.h	Fri Mar 02 17:07:09 2012 +0200
+++ b/head/sys/sys/diskmbr.h	Fri Mar 02 17:07:54 2012 +0200
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)disklabel.h	8.2 (Berkeley) 7/10/94
- * $FreeBSD: head/sys/sys/diskmbr.h 230522 2012-01-25 03:37:39Z nwhitehorn $
+ * $FreeBSD: head/sys/sys/diskmbr.h 231367 2012-02-10 09:55:18Z ae $
  */
 
 #ifndef _SYS_DISKMBR_H_
@@ -49,6 +49,7 @@
 #define	DOSPTYP_FAT32	0x0b	/* FAT32 partition */
 #define	DOSPTYP_EXTLBA	0x0f	/* DOS extended partition */
 #define	DOSPTYP_PPCBOOT	0x41	/* PReP/CHRP boot partition */
+#define	DOSPTYP_LDM	0x42	/* Win2k dynamic extended partition */
 #define	DOSPTYP_386BSD	0xa5	/* 386BSD partition type */
 #define	DOSPTYP_LINSWP	0x82	/* Linux swap partition */
 #define	DOSPTYP_LINUX	0x83	/* Linux partition */
diff -r fc6cfb0dbf30 -r b327ef2f7331 head/sys/sys/elf_common.h
--- a/head/sys/sys/elf_common.h	Fri Mar 02 17:07:09 2012 +0200
+++ b/head/sys/sys/elf_common.h	Fri Mar 02 17:07:54 2012 +0200
@@ -24,7 +24,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: head/sys/sys/elf_common.h 230783 2012-01-30 19:50:13Z kib $
+ * $FreeBSD: head/sys/sys/elf_common.h 231617 2012-02-14 00:12:55Z gonzo $
  */
 
 #ifndef _SYS_ELF_COMMON_H_
@@ -633,6 +633,10 @@
 #define	R_ARM_THM_SWI8		14
 #define	R_ARM_XPC25		15
 #define	R_ARM_THM_XPC22		16
+/* TLS relocations */
+#define	R_ARM_TLS_DTPMOD32	17	/* ID of module containing symbol */
+#define	R_ARM_TLS_DTPOFF32	18	/* Offset in TLS block */
+#define	R_ARM_TLS_TPOFF32	19	/* Offset in static TLS block */
 #define	R_ARM_COPY		20	/* Copy data from shared object. */
 #define	R_ARM_GLOB_DAT		21	/* Set GOT entry to data address. */
 #define	R_ARM_JUMP_SLOT		22	/* Set GOT entry to code address. */
diff -r fc6cfb0dbf30 -r b327ef2f7331 head/sys/sys/jail.h
--- a/head/sys/sys/jail.h	Fri Mar 02 17:07:09 2012 +0200
+++ b/head/sys/sys/jail.h	Fri Mar 02 17:07:54 2012 +0200
@@ -24,7 +24,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: head/sys/sys/jail.h 221362 2011-05-03 07:32:58Z trasz $
+ * $FreeBSD: head/sys/sys/jail.h 232278 2012-02-29 00:30:18Z mm $
  */
 
 #ifndef _SYS_JAIL_H_
@@ -176,7 +176,8 @@
 	unsigned	 pr_allow;			/* (p) PR_ALLOW_* flags */
 	int		 pr_securelevel;		/* (p) securelevel */
 	int		 pr_enforce_statfs;		/* (p) statfs permission */
-	int		 pr_spare[5];
+	int		 pr_devfs_rsnum;		/* (p) devfs ruleset */
+	int		 pr_spare[4];
 	unsigned long	 pr_hostid;			/* (p) jail hostid */
 	char		 pr_name[MAXHOSTNAMELEN];	/* (p) admin jail name */
 	char		 pr_path[MAXPATHLEN];		/* (c) chroot path */
@@ -222,7 +223,11 @@
 #define	PR_ALLOW_MOUNT			0x0010
 #define	PR_ALLOW_QUOTAS			0x0020
 #define	PR_ALLOW_SOCKET_AF		0x0040
-#define	PR_ALLOW_ALL			0x007f
+#define	PR_ALLOW_MOUNT_DEVFS		0x0080
+#define	PR_ALLOW_MOUNT_NULLFS		0x0100
+#define	PR_ALLOW_MOUNT_ZFS		0x0200
+#define	PR_ALLOW_MOUNT_PROCFS		0x0400
+#define	PR_ALLOW_ALL			0x07ff
 
 /*
  * OSD methods
@@ -337,6 +342,8 @@
 	sysctl_jail_param, fmt, descr)
 #define	SYSCTL_JAIL_PARAM_NODE(module, descr)				\
     SYSCTL_NODE(_security_jail_param, OID_AUTO, module, 0, 0, descr)
+#define	SYSCTL_JAIL_PARAM_SUBNODE(parent, module, descr)		\
+    SYSCTL_NODE(_security_jail_param_##parent, OID_AUTO, module, 0, 0, descr)
 #define	SYSCTL_JAIL_PARAM_SYS_NODE(module, access, descr)		\
     SYSCTL_JAIL_PARAM_NODE(module, descr);				\
     SYSCTL_JAIL_PARAM(_##module, , CTLTYPE_INT | (access), "E,jailsys",	\
diff -r fc6cfb0dbf30 -r b327ef2f7331 head/sys/sys/malloc.h
--- a/head/sys/sys/malloc.h	Fri Mar 02 17:07:09 2012 +0200
+++ b/head/sys/sys/malloc.h	Fri Mar 02 17:07:54 2012 +0200
@@ -29,7 +29,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)malloc.h	8.5 (Berkeley) 5/3/95
- * $FreeBSD: head/sys/sys/malloc.h 230623 2012-01-27 20:18:31Z kmacy $
+ * $FreeBSD: head/sys/sys/malloc.h 232356 2012-03-01 19:58:34Z jhb $
  */
 
 #ifndef _SYS_MALLOC_H_
@@ -171,7 +171,7 @@
 void	contigfree(void *addr, unsigned long size, struct malloc_type *type);
 void	*contigmalloc(unsigned long size, struct malloc_type *type, int flags,
 	    vm_paddr_t low, vm_paddr_t high, unsigned long alignment,
-	    unsigned long boundary) __malloc_like;
+	    vm_paddr_t boundary) __malloc_like;
 void	free(void *addr, struct malloc_type *type);
 void	*malloc(unsigned long size, struct malloc_type *type, int flags) __malloc_like;
 void	malloc_init(void *);
diff -r fc6cfb0dbf30 -r b327ef2f7331 head/sys/sys/msgbuf.h
--- a/head/sys/sys/msgbuf.h	Fri Mar 02 17:07:09 2012 +0200
+++ b/head/sys/sys/msgbuf.h	Fri Mar 02 17:07:54 2012 +0200
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)msgbuf.h	8.1 (Berkeley) 6/2/93
- * $FreeBSD: head/sys/sys/msgbuf.h 226090 2011-10-07 06:00:00Z obrien $
+ * $FreeBSD: head/sys/sys/msgbuf.h 231814 2012-02-16 05:11:35Z eadler $
  */
 
 #ifndef _SYS_MSGBUF_H_
@@ -46,7 +46,9 @@
 	u_int	   msg_cksum;		/* checksum of contents */
 	u_int	   msg_seqmod;		/* range for sequence numbers */
 	int	   msg_lastpri;		/* saved priority value */
-	int	   msg_needsnl;		/* set when newline needed */
+	u_int   msg_flags;
+#define MSGBUF_NEEDNL		0x01	/* set when newline needed */
+#define MSGBUF_NEXT_NEW_LINE	0x02
 	struct mtx msg_lock;		/* mutex to protect the buffer */
 };
 
diff -r fc6cfb0dbf30 -r b327ef2f7331 head/sys/sys/param.h
--- a/head/sys/sys/param.h	Fri Mar 02 17:07:09 2012 +0200
+++ b/head/sys/sys/param.h	Fri Mar 02 17:07:54 2012 +0200
@@ -32,7 +32,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)param.h	8.3 (Berkeley) 4/4/95
- * $FreeBSD: head/sys/sys/param.h 230590 2012-01-26 18:09:28Z ken $
+ * $FreeBSD: head/sys/sys/param.h 232154 2012-02-25 11:03:13Z mm $
  */
 
 #ifndef _SYS_PARAM_H_
@@ -58,7 +58,7 @@
  *		in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 1000006	/* Master, propagated to newvers */
+#define __FreeBSD_version 1000009	/* Master, propagated to newvers */
 
 /*
  * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
diff -r fc6cfb0dbf30 -r b327ef2f7331 head/sys/sys/pipe.h
--- a/head/sys/sys/pipe.h	Fri Mar 02 17:07:09 2012 +0200
+++ b/head/sys/sys/pipe.h	Fri Mar 02 17:07:54 2012 +0200
@@ -18,7 +18,7 @@
  * 5. Modifications may be freely made to this file if the above conditions
  *    are met.
  *
- * $FreeBSD: head/sys/sys/pipe.h 226042 2011-10-05 16:56:06Z kib $
+ * $FreeBSD: head/sys/sys/pipe.h 232055 2012-02-23 18:37:30Z kmacy $
  */
 
 #ifndef _SYS_PIPE_H_
@@ -57,6 +57,7 @@
  * See sys_pipe.c for info on what these limits mean. 
  */
 extern long	maxpipekva;
+extern struct	fileops pipeops;
 
 /*
  * Pipe buffer information.
@@ -94,6 +95,7 @@
 #define PIPE_LWANT	0x200	/* Process wants exclusive access to pointers/data. */
 #define PIPE_DIRECTW	0x400	/* Pipe direct write active. */
 #define PIPE_DIRECTOK	0x800	/* Direct mode ok. */
+#define PIPE_NAMED	0x1000	/* Is a named pipe. */
 
 /*
  * Per-pipe data structure.
@@ -138,5 +140,7 @@
 #define PIPE_UNLOCK(pipe)	mtx_unlock(PIPE_MTX(pipe))
 #define PIPE_LOCK_ASSERT(pipe, type)  mtx_assert(PIPE_MTX(pipe), (type))
 
+void	pipe_dtor(struct pipe *dpipe);
+int	pipe_named_ctor(struct pipe **ppipe, struct thread *td);
 
 #endif /* !_SYS_PIPE_H_ */
diff -r fc6cfb0dbf30 -r b327ef2f7331 head/sys/sys/pmc.h
--- a/head/sys/sys/pmc.h	Fri Mar 02 17:07:09 2012 +0200
+++ b/head/sys/sys/pmc.h	Fri Mar 02 17:07:54 2012 +0200
@@ -27,7 +27,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: head/sys/sys/pmc.h 228869 2011-12-24 19:34:52Z jhibbits $
+ * $FreeBSD: head/sys/sys/pmc.h 232366 2012-03-01 21:23:26Z davide $
  */
 
 #ifndef _SYS_PMC_H_
@@ -86,6 +86,7 @@
 	__PMC_CPU(INTEL_ATOM,	0x8A,	"Intel Atom") \
 	__PMC_CPU(INTEL_COREI7, 0x8B,   "Intel Core i7") \
 	__PMC_CPU(INTEL_WESTMERE, 0x8C,   "Intel Westmere") \
+	__PMC_CPU(INTEL_SANDYBRIDGE, 0x8D,   "Intel Sandy Bridge") \
 	__PMC_CPU(INTEL_XSCALE,	0x100,	"Intel XScale") \
 	__PMC_CPU(MIPS_24K,     0x200,  "MIPS 24K")  \
 	__PMC_CPU(PPC_7450,     0x300,  "PowerPC MPC7450")
diff -r fc6cfb0dbf30 -r b327ef2f7331 head/sys/sys/proc.h
--- a/head/sys/sys/proc.h	Fri Mar 02 17:07:09 2012 +0200
+++ b/head/sys/sys/proc.h	Fri Mar 02 17:07:54 2012 +0200
@@ -32,7 +32,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)proc.h	8.15 (Berkeley) 5/19/95
- * $FreeBSD: head/sys/sys/proc.h 230643 2012-01-28 14:00:21Z attilio $
+ * $FreeBSD: head/sys/sys/proc.h 232240 2012-02-27 21:10:10Z kib $
  */
 
 #ifndef _SYS_PROC_H_
@@ -311,6 +311,7 @@
 	struct vnet	*td_vnet;	/* (k) Effective vnet. */
 	const char	*td_vnet_lpush;	/* (k) Debugging vnet push / pop. */
 	struct trapframe *td_intr_frame;/* (k) Frame of the current irq */
+	struct proc *td_rfppwait_p;	/* (k) The vforked child */
 };
 
 struct mtx *thread_lock_block(struct thread *);
@@ -384,6 +385,7 @@
 				      process */
 #define	TDB_STOPATFORK	0x00000080 /* Stop at the return from fork (child
 				      only) */
+#define	TDB_CHILD	0x00000100 /* New child indicator for ptrace() */
 
 /*
  * "Private" flags kept in td_pflags:
@@ -400,7 +402,7 @@
 #define	TDP_NOSLEEPING	0x00000100 /* Thread is not allowed to sleep on a sq. */
 #define	TDP_OWEUPC	0x00000200 /* Call addupc() at next AST. */
 #define	TDP_ITHREAD	0x00000400 /* Thread is an interrupt thread. */
-#define	TDP_UNUSED800	0x00000800 /* available. */
+#define	TDP_SYNCIO	0x00000800 /* Local override, disable async i/o. */
 #define	TDP_SCHED1	0x00001000 /* Reserved for scheduler private use */
 #define	TDP_SCHED2	0x00002000 /* Reserved for scheduler private use */
 #define	TDP_SCHED3	0x00004000 /* Reserved for scheduler private use */
@@ -414,6 +416,7 @@
 #define	TDP_CALLCHAIN	0x00400000 /* Capture thread's callchain */
 #define	TDP_IGNSUSP	0x00800000 /* Permission to ignore the MNTK_SUSPEND* */
 #define	TDP_AUDITREC	0x01000000 /* Audit record pending on thread */
+#define	TDP_RFPPWAIT	0x02000000 /* Handle RFPPWAIT on syscall exit */
 
 /*
  * Reasons that the current thread can not be run yet.
@@ -506,8 +509,6 @@
 /* The following fields are all zeroed upon creation in fork. */
 #define	p_startzero	p_oppid
 	pid_t		p_oppid;	/* (c + e) Save ppid in ptrace. XXX */
-	int		p_dbg_child;	/* (c + e) # of debugged children in
-							ptrace. */
 	struct vmspace	*p_vmspace;	/* (b) Address space. */
 	u_int		p_swtick;	/* (c) Tick when swapped in or out. */
 	struct itimerval p_realtimer;	/* (c) Alarm timer. */
@@ -575,6 +576,14 @@
 					   after fork. */
 	uint64_t	p_prev_runtime;	/* (c) Resource usage accounting. */
 	struct racct	*p_racct;	/* (b) Resource accounting. */
+	/*
+	 * An orphan is the child that has beed re-parented to the
+	 * debugger as a result of attaching to it.  Need to keep
+	 * track of them for parent to be able to collect the exit
+	 * status of what used to be children.
+	 */
+	LIST_ENTRY(proc) p_orphan;	/* (e) List of orphan processes. */
+	LIST_HEAD(, proc) p_orphans;	/* (e) Pointer to list of orphans. */
 };
 
 #define	p_session	p_pgrp->pg_session
@@ -613,6 +622,7 @@
 #define	P_HWPMC		0x800000 /* Process is using HWPMCs */
 
 #define	P_JAILED	0x1000000 /* Process is in jail. */
+#define	P_ORPHAN	0x2000000 /* Orphaned. */
 #define	P_INEXEC	0x4000000 /* Process is in execve(). */
 #define	P_STATCHILD	0x8000000 /* Child process stopped or exited. */
 #define	P_INMEM		0x10000000 /* Loaded into memory. */
diff -r fc6cfb0dbf30 -r b327ef2f7331 head/sys/sys/ptrace.h
--- a/head/sys/sys/ptrace.h	Fri Mar 02 17:07:09 2012 +0200
+++ b/head/sys/sys/ptrace.h	Fri Mar 02 17:07:54 2012 +0200
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)ptrace.h	8.2 (Berkeley) 1/4/94
- * $FreeBSD$
+ * $FreeBSD: head/sys/sys/ptrace.h 231521 2012-02-11 14:49:25Z kib $
  */
 
 #ifndef	_SYS_PTRACE_H_
@@ -107,6 +107,7 @@
 #define	PL_FLAG_EXEC	0x10	/* exec(2) succeeded */
 #define	PL_FLAG_SI	0x20	/* siginfo is valid */
 #define	PL_FLAG_FORKED	0x40	/* new child */
+#define	PL_FLAG_CHILD	0x80	/* I am from child */
 	sigset_t	pl_sigmask;	/* LWP signal mask */
 	sigset_t	pl_siglist;	/* LWP pending signal */
 	struct __siginfo pl_siginfo;	/* siginfo for signal */
@@ -130,12 +131,6 @@
 
 #ifdef _KERNEL
 
-#define	PTRACESTOP_SC(p, td, flag)				\
-	if ((p)->p_flag & P_TRACED && (p)->p_stops & (flag)) {	\
-		PROC_LOCK(p);					\
-		ptracestop((td), SIGTRAP);			\
-		PROC_UNLOCK(p);					\
-	}
 /*
  * The flags below are used for ptrace(2) tracing and have no relation
  * to procfs.  They are stored in struct proc's p_stops member.
diff -r fc6cfb0dbf30 -r b327ef2f7331 head/sys/sys/rman.h
--- a/head/sys/sys/rman.h	Fri Mar 02 17:07:09 2012 +0200
+++ b/head/sys/sys/rman.h	Fri Mar 02 17:07:54 2012 +0200
@@ -26,7 +26,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: head/sys/sys/rman.h 221220 2011-04-29 20:05:19Z jhb $
+ * $FreeBSD: head/sys/sys/rman.h 232237 2012-02-27 18:28:31Z jhb $
  */
 
 #ifndef _SYS_RMAN_H_
@@ -50,7 +50,7 @@
 
 #define	RF_ALIGNMENT_SHIFT	10 /* alignment size bit starts bit 10 */
 #define	RF_ALIGNMENT_MASK	(0x003F << RF_ALIGNMENT_SHIFT)
-				/* resource address alignemnt size bit mask */
+				/* resource address alignment size bit mask */
 #define	RF_ALIGNMENT_LOG2(x)	((x) << RF_ALIGNMENT_SHIFT)
 #define	RF_ALIGNMENT(x)		(((x) & RF_ALIGNMENT_MASK) >> RF_ALIGNMENT_SHIFT)
 
diff -r fc6cfb0dbf30 -r b327ef2f7331 head/sys/sys/socket.h
--- a/head/sys/sys/socket.h	Fri Mar 02 17:07:09 2012 +0200
+++ b/head/sys/sys/socket.h	Fri Mar 02 17:07:54 2012 +0200
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)socket.h	8.4 (Berkeley) 2/21/94
- * $FreeBSD: head/sys/sys/socket.h 220742 2011-04-17 16:04:39Z jilles $
+ * $FreeBSD: head/sys/sys/socket.h 232179 2012-02-26 13:55:43Z kib $
  */
 
 #ifndef _SYS_SOCKET_H_
@@ -138,6 +138,8 @@
 #define	SO_LISTENINCQLEN	0x1013	/* socket's incomplete queue length */
 #define	SO_SETFIB	0x1014		/* use this FIB to route */
 #define	SO_USER_COOKIE	0x1015		/* user cookie (dummynet etc.) */
+#define	SO_PROTOCOL	0x1016		/* get socket protocol (Linux name) */
+#define	SO_PROTOTYPE	SO_PROTOCOL	/* alias for SO_PROTOCOL (SunOS name) */
 #endif
 
 /*
@@ -396,7 +398,9 @@
 #define NET_RT_FLAGS	2		/* by flags, e.g. RESOLVING */
 #define NET_RT_IFLIST	3		/* survey interface list */
 #define	NET_RT_IFMALIST	4		/* return multicast address list */
-#define	NET_RT_MAXID	5
+#define	NET_RT_IFLISTL	5		/* Survey interface list, using 'l'en
+					 * versions of msghdr structs. */
+#define	NET_RT_MAXID	6
 
 #define CTL_NET_RT_NAMES { \
 	{ 0, 0 }, \
@@ -404,6 +408,7 @@
 	{ "flags", CTLTYPE_STRUCT }, \
 	{ "iflist", CTLTYPE_STRUCT }, \
 	{ "ifmalist", CTLTYPE_STRUCT }, \
+	{ "iflistl", CTLTYPE_STRUCT }, \
 }
 #endif /* __BSD_VISIBLE */
 
diff -r fc6cfb0dbf30 -r b327ef2f7331 head/sys/sys/sysctl.h
--- a/head/sys/sys/sysctl.h	Fri Mar 02 17:07:09 2012 +0200
+++ b/head/sys/sys/sysctl.h	Fri Mar 02 17:07:54 2012 +0200
@@ -30,7 +30,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)sysctl.h	8.1 (Berkeley) 6/2/93
- * $FreeBSD: head/sys/sys/sysctl.h 228046 2011-11-27 21:01:51Z trociny $
+ * $FreeBSD: head/sys/sys/sysctl.h 232181 2012-02-26 14:25:48Z trociny $
  */
 
 #ifndef _SYS_SYSCTL_H_
@@ -563,6 +563,7 @@
 #define	KERN_PROC_AUXV		36	/* get ELF auxiliary vector */
 #define	KERN_PROC_RLIMIT	37	/* process resource limits */
 #define	KERN_PROC_PS_STRINGS	38	/* get ps_strings location */
+#define	KERN_PROC_UMASK		39	/* process umask */
 
 /*
  * KERN_IPC identifiers
diff -r fc6cfb0dbf30 -r b327ef2f7331 head/sys/sys/systm.h
--- a/head/sys/sys/systm.h	Fri Mar 02 17:07:09 2012 +0200
+++ b/head/sys/sys/systm.h	Fri Mar 02 17:07:54 2012 +0200
@@ -32,7 +32,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)systm.h	8.7 (Berkeley) 3/29/95
- * $FreeBSD: head/sys/sys/systm.h 230643 2012-01-28 14:00:21Z attilio $
+ * $FreeBSD: head/sys/sys/systm.h 231949 2012-02-21 01:05:12Z kib $
  */
 
 #ifndef _SYS_SYSTM_H_
@@ -133,6 +133,9 @@
 
 extern const void *zero_region;	/* address space maps to a zeroed page	*/
 
+extern int iosize_max_clamp;
+#define	IOSIZE_MAX	(iosize_max_clamp ? INT_MAX : SSIZE_MAX)
+
 /*
  * General function declarations.
  */
diff -r fc6cfb0dbf30 -r b327ef2f7331 head/sys/sys/ttycom.h
--- a/head/sys/sys/ttycom.h	Fri Mar 02 17:07:09 2012 +0200
+++ b/head/sys/sys/ttycom.h	Fri Mar 02 17:07:54 2012 +0200
@@ -32,7 +32,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)ttycom.h	8.1 (Berkeley) 3/28/94
- * $FreeBSD$
+ * $FreeBSD: head/sys/sys/ttycom.h 231095 2012-02-06 18:15:46Z ed $
  */
 
 #ifndef	_SYS_TTYCOM_H_
@@ -105,7 +105,7 @@
 #define		TIOCM_SR	0020		/* secondary receive */
 #define		TIOCM_CTS	0040		/* clear to send */
 #define		TIOCM_DCD	0100		/* data carrier detect */
-#define		TIOCM_RI 	0200		/* ring indicate */
+#define		TIOCM_RI	0200		/* ring indicate */
 #define		TIOCM_DSR	0400		/* data set ready */
 #define		TIOCM_CD	TIOCM_DCD
 #define		TIOCM_CAR	TIOCM_DCD
diff -r fc6cfb0dbf30 -r b327ef2f7331 head/sys/sys/ttydefaults.h
--- a/head/sys/sys/ttydefaults.h	Fri Mar 02 17:07:09 2012 +0200
+++ b/head/sys/sys/ttydefaults.h	Fri Mar 02 17:07:54 2012 +0200
@@ -32,7 +32,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)ttydefaults.h	8.4 (Berkeley) 1/21/94
- * $FreeBSD$
+ * $FreeBSD: head/sys/sys/ttydefaults.h 231095 2012-02-06 18:15:46Z ed $
  */
 
 /*
@@ -79,9 +79,9 @@
 #define	CSTART		CTRL('Q')
 #define	CSTOP		CTRL('S')
 #define	CLNEXT		CTRL('V')
-#define	CDISCARD 	CTRL('O')
-#define	CWERASE 	CTRL('W')
-#define	CREPRINT 	CTRL('R')
+#define	CDISCARD	CTRL('O')
+#define	CWERASE		CTRL('W')
+#define	CREPRINT	CTRL('R')
 #define	CEOT		CEOF
 /* compat */
 #define	CBRK		CEOL
diff -r fc6cfb0dbf30 -r b327ef2f7331 head/sys/sys/ucontext.h
--- a/head/sys/sys/ucontext.h	Fri Mar 02 17:07:09 2012 +0200
+++ b/head/sys/sys/ucontext.h	Fri Mar 02 17:07:54 2012 +0200
@@ -25,7 +25,7 @@
  * (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: head/sys/sys/ucontext.h 230429 2012-01-21 18:00:28Z kib $
+ * $FreeBSD: head/sys/sys/ucontext.h 230864 2012-02-01 13:33:53Z kib $
  */
 
 #ifndef _SYS_UCONTEXT_H_
@@ -79,7 +79,7 @@
 int	swapcontext(ucontext_t *, const ucontext_t *);
 
 #if __BSD_VISIBLE
-size_t __getcontextx_size(void);
+int __getcontextx_size(void);
 int __fillcontextx(char *ctx);
 #endif
 
diff -r fc6cfb0dbf30 -r b327ef2f7331 head/sys/sys/umtx.h
--- a/head/sys/sys/umtx.h	Fri Mar 02 17:07:09 2012 +0200
+++ b/head/sys/sys/umtx.h	Fri Mar 02 17:07:54 2012 +0200
@@ -23,7 +23,7 @@
  * (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: head/sys/sys/umtx.h 228220 2011-12-03 12:33:17Z pho $
+ * $FreeBSD: head/sys/sys/umtx.h 232144 2012-02-25 02:12:17Z davidxu $
  *
  */
 
@@ -87,6 +87,8 @@
 #define	CVWAIT_ABSTIME		0x02
 #define	CVWAIT_CLOCKID		0x04
 
+#define	UMTX_ABSTIME		0x01
+
 #define	UMTX_CHECK_UNPARKING	CVWAIT_CHECK_UNPARKING
 
 #ifndef _KERNEL
diff -r fc6cfb0dbf30 -r b327ef2f7331 head/sys/sys/vnode.h
--- a/head/sys/sys/vnode.h	Fri Mar 02 17:07:09 2012 +0200
+++ b/head/sys/sys/vnode.h	Fri Mar 02 17:07:54 2012 +0200
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)vnode.h	8.7 (Berkeley) 2/4/94
- * $FreeBSD: head/sys/sys/vnode.h 230394 2012-01-20 20:02:01Z jhb $
+ * $FreeBSD: head/sys/sys/vnode.h 232317 2012-02-29 21:38:31Z trociny $
  */
 
 #ifndef _SYS_VNODE_H_
@@ -149,8 +149,8 @@
 	struct	lock *v_vnlock;			/* u pointer to vnode lock */
 	int	v_holdcnt;			/* i prevents recycling. */
 	int	v_usecount;			/* i ref count of users */
-	u_long	v_iflag;			/* i vnode flags (see below) */
-	u_long	v_vflag;			/* v vnode flags */
+	u_int	v_iflag;			/* i vnode flags (see below) */
+	u_int	v_vflag;			/* v vnode flags */
 	int	v_writecount;			/* v ref count of writers */
 
 	/*
@@ -538,6 +538,10 @@
  */
 #define VCALL(c) ((c)->a_desc->vdesc_call(c))
 
+#define DOINGASYNC(vp)	   					\
+	(((vp)->v_mount->mnt_kern_flag & MNTK_ASYNC) != 0 &&	\
+	 ((curthread->td_pflags & TDP_SYNCIO) == 0))
+
 /*
  * VMIO support inline
  */
@@ -582,9 +586,7 @@
 	cache_enter_time(dvp, vp, cnp, NULL)
 void	cache_enter_time(struct vnode *dvp, struct vnode *vp,
 	    struct componentname *cnp, struct timespec *tsp);
-#define	cache_lookup(dvp, vpp, cnp)					\
-	cache_lookup_times(dvp, vpp, cnp, NULL, NULL)
-int	cache_lookup_times(struct vnode *dvp, struct vnode **vpp,
+int	cache_lookup(struct vnode *dvp, struct vnode **vpp,
 	    struct componentname *cnp, struct timespec *tsp, int *ticksp);
 void	cache_purge(struct vnode *vp);
 void	cache_purge_negative(struct vnode *vp);
@@ -651,7 +653,7 @@
 int	vn_pollrecord(struct vnode *vp, struct thread *p, int events);
 int	vn_rdwr(enum uio_rw rw, struct vnode *vp, void *base,
 	    int len, off_t offset, enum uio_seg segflg, int ioflg,
-	    struct ucred *active_cred, struct ucred *file_cred, int *aresid,
+	    struct ucred *active_cred, struct ucred *file_cred, ssize_t *aresid,
 	    struct thread *td);
 int	vn_rdwr_inchunks(enum uio_rw rw, struct vnode *vp, void *base,
 	    size_t len, off_t offset, enum uio_seg segflg, int ioflg,
@@ -701,6 +703,9 @@
 int	vop_stdpoll(struct vop_poll_args *);
 int	vop_stdvptocnp(struct vop_vptocnp_args *ap);
 int	vop_stdvptofh(struct vop_vptofh_args *ap);
+int	vop_stdunp_bind(struct vop_unp_bind_args *ap);
+int	vop_stdunp_connect(struct vop_unp_connect_args *ap);
+int	vop_stdunp_detach(struct vop_unp_detach_args *ap);
 int	vop_eopnotsupp(struct vop_generic_args *ap);
 int	vop_ebadf(struct vop_generic_args *ap);
 int	vop_einval(struct vop_generic_args *ap);
@@ -791,6 +796,8 @@
 
 int vfs_unixify_accmode(accmode_t *accmode);
 
+void vfs_unp_reclaim(struct vnode *vp);
+
 int setfmode(struct thread *td, struct ucred *cred, struct vnode *vp, int mode);
 int setfown(struct thread *td, struct ucred *cred, struct vnode *vp, uid_t uid,
     gid_t gid);


More information about the Zrouter-src-freebsd mailing list