Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Aug 2007 12:34:38 GMT
From:      Xin LI <delphij@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 125213 for review
Message-ID:  <200708161234.l7GCYcxJ052554@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=125213

Change 125213 by delphij@tarsier on 2007/08/16 12:34:01

	IFC

Affected files ...

.. //depot/projects/delphij_fork/sys/amd64/conf/NOTES#2 integrate
.. //depot/projects/delphij_fork/sys/amd64/include/specialreg.h#2 integrate
.. //depot/projects/delphij_fork/sys/compat/freebsd32/freebsd32_proto.h#3 integrate
.. //depot/projects/delphij_fork/sys/compat/freebsd32/freebsd32_syscall.h#3 integrate
.. //depot/projects/delphij_fork/sys/compat/freebsd32/freebsd32_syscalls.c#3 integrate
.. //depot/projects/delphij_fork/sys/compat/freebsd32/freebsd32_sysent.c#3 integrate
.. //depot/projects/delphij_fork/sys/compat/freebsd32/syscalls.master#3 integrate
.. //depot/projects/delphij_fork/sys/conf/files.amd64#3 integrate
.. //depot/projects/delphij_fork/sys/conf/files.i386#3 integrate
.. //depot/projects/delphij_fork/sys/dev/coretemp/coretemp.c#1 branch
.. //depot/projects/delphij_fork/sys/fs/msdosfs/msdosfs_vfsops.c#6 integrate
.. //depot/projects/delphij_fork/sys/fs/tmpfs/tmpfs_vnops.c#5 integrate
.. //depot/projects/delphij_fork/sys/gnu/fs/ext2fs/ext2_vfsops.c#3 integrate
.. //depot/projects/delphij_fork/sys/i386/conf/NOTES#2 integrate
.. //depot/projects/delphij_fork/sys/i386/include/specialreg.h#2 integrate
.. //depot/projects/delphij_fork/sys/kern/init_sysent.c#3 integrate
.. //depot/projects/delphij_fork/sys/kern/kern_thr.c#2 integrate
.. //depot/projects/delphij_fork/sys/kern/syscalls.c#3 integrate
.. //depot/projects/delphij_fork/sys/kern/syscalls.master#3 integrate
.. //depot/projects/delphij_fork/sys/kern/systrace_args.c#3 integrate
.. //depot/projects/delphij_fork/sys/kern/vfs_mount.c#4 integrate
.. //depot/projects/delphij_fork/sys/modules/Makefile#5 integrate
.. //depot/projects/delphij_fork/sys/modules/coretemp/Makefile#1 branch
.. //depot/projects/delphij_fork/sys/netinet/sctp_asconf.c#6 integrate
.. //depot/projects/delphij_fork/sys/netinet/sctp_input.c#7 integrate
.. //depot/projects/delphij_fork/sys/netinet/sctp_output.c#6 integrate
.. //depot/projects/delphij_fork/sys/netinet/sctp_pcb.c#6 integrate
.. //depot/projects/delphij_fork/sys/netinet/sctp_timer.c#5 integrate
.. //depot/projects/delphij_fork/sys/netinet/sctp_usrreq.c#7 integrate
.. //depot/projects/delphij_fork/sys/netinet/sctputil.c#6 integrate
.. //depot/projects/delphij_fork/sys/netinet/tcp_subr.c#5 integrate
.. //depot/projects/delphij_fork/sys/sys/syscall.h#3 integrate
.. //depot/projects/delphij_fork/sys/sys/syscall.mk#3 integrate
.. //depot/projects/delphij_fork/sys/sys/sysproto.h#3 integrate
.. //depot/projects/delphij_fork/sys/sys/thr.h#2 integrate

Differences ...

==== //depot/projects/delphij_fork/sys/amd64/conf/NOTES#2 (text+ko) ====

@@ -4,7 +4,7 @@
 # This file contains machine dependent kernel configuration notes.  For
 # machine independent notes, look in /sys/conf/NOTES.
 #
-# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.68 2007/07/04 00:18:38 bz Exp $
+# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.69 2007/08/15 19:26:02 des Exp $
 #
 
 #
@@ -446,6 +446,13 @@
 #
 device		ichwd
 
+#
+# Temperature sensors:
+#
+# coretemp: on-die sensor on Intel Core and newer CPUs
+#
+device		coretemp
+
 #---------------------------------------------------------------------------
 # ISDN4BSD
 #

==== //depot/projects/delphij_fork/sys/amd64/include/specialreg.h#2 (text+ko) ====

@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  *	from: @(#)specialreg.h	7.1 (Berkeley) 5/9/91
- * $FreeBSD: src/sys/amd64/include/specialreg.h,v 1.39 2007/05/31 11:26:44 des Exp $
+ * $FreeBSD: src/sys/amd64/include/specialreg.h,v 1.40 2007/08/15 19:26:01 des Exp $
  */
 
 #ifndef _MACHINE_SPECIALREG_H_
@@ -179,6 +179,7 @@
 #define	MSR_BIOS_SIGN		0x08b
 #define	MSR_PERFCTR0		0x0c1
 #define	MSR_PERFCTR1		0x0c2
+#define	MSR_IA32_EXT_CONFIG	0x0ee	/* Undocumented. Core Solo/Duo only */
 #define	MSR_MTRRcap		0x0fe
 #define	MSR_BBL_CR_ADDR		0x116
 #define	MSR_BBL_CR_DECC		0x118

==== //depot/projects/delphij_fork/sys/compat/freebsd32/freebsd32_proto.h#3 (text+ko) ====

@@ -2,7 +2,7 @@
  * System call prototypes.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/compat/freebsd32/freebsd32_proto.h,v 1.77 2007/07/04 23:03:50 peter Exp $
+ * $FreeBSD: src/sys/compat/freebsd32/freebsd32_proto.h,v 1.78 2007/08/16 05:32:25 davidxu Exp $
  * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.90 2007/07/04 23:02:40 peter Exp 
  */
 

==== //depot/projects/delphij_fork/sys/compat/freebsd32/freebsd32_syscall.h#3 (text+ko) ====

@@ -2,7 +2,7 @@
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscall.h,v 1.75 2007/07/04 23:03:50 peter Exp $
+ * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscall.h,v 1.76 2007/08/16 05:32:25 davidxu Exp $
  * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.90 2007/07/04 23:02:40 peter Exp 
  */
 
@@ -337,4 +337,5 @@
 #define	FREEBSD32_SYS_freebsd32_lseek	478
 #define	FREEBSD32_SYS_freebsd32_truncate	479
 #define	FREEBSD32_SYS_freebsd32_ftruncate	480
-#define	FREEBSD32_SYS_MAXSYSCALL	481
+#define	FREEBSD32_SYS_thr_kill2	481
+#define	FREEBSD32_SYS_MAXSYSCALL	482

==== //depot/projects/delphij_fork/sys/compat/freebsd32/freebsd32_syscalls.c#3 (text+ko) ====

@@ -2,7 +2,7 @@
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscalls.c,v 1.66 2007/07/04 23:03:50 peter Exp $
+ * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscalls.c,v 1.67 2007/08/16 05:32:25 davidxu Exp $
  * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.90 2007/07/04 23:02:40 peter Exp 
  */
 
@@ -488,4 +488,5 @@
 	"freebsd32_lseek",			/* 478 = freebsd32_lseek */
 	"freebsd32_truncate",			/* 479 = freebsd32_truncate */
 	"freebsd32_ftruncate",			/* 480 = freebsd32_ftruncate */
+	"thr_kill2",			/* 481 = thr_kill2 */
 };

==== //depot/projects/delphij_fork/sys/compat/freebsd32/freebsd32_sysent.c#3 (text+ko) ====

@@ -2,7 +2,7 @@
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/compat/freebsd32/freebsd32_sysent.c,v 1.76 2007/07/04 23:03:50 peter Exp $
+ * $FreeBSD: src/sys/compat/freebsd32/freebsd32_sysent.c,v 1.77 2007/08/16 05:32:25 davidxu Exp $
  * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.90 2007/07/04 23:02:40 peter Exp 
  */
 
@@ -519,4 +519,5 @@
 	{ AS(freebsd32_lseek_args), (sy_call_t *)freebsd32_lseek, AUE_LSEEK, NULL, 0, 0 },	/* 478 = freebsd32_lseek */
 	{ AS(freebsd32_truncate_args), (sy_call_t *)freebsd32_truncate, AUE_TRUNCATE, NULL, 0, 0 },	/* 479 = freebsd32_truncate */
 	{ AS(freebsd32_ftruncate_args), (sy_call_t *)freebsd32_ftruncate, AUE_FTRUNCATE, NULL, 0, 0 },	/* 480 = freebsd32_ftruncate */
+	{ AS(thr_kill2_args), (sy_call_t *)thr_kill2, AUE_KILL, NULL, 0, 0 },	/* 481 = thr_kill2 */
 };

==== //depot/projects/delphij_fork/sys/compat/freebsd32/syscalls.master#3 (text+ko) ====

@@ -1,4 +1,4 @@
- $FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.90 2007/07/04 23:02:40 peter Exp $
+ $FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.91 2007/08/16 05:30:04 davidxu Exp $
 ;	from: @(#)syscalls.master	8.2 (Berkeley) 1/13/94
 ;	from: src/sys/kern/syscalls.master 1.107
 ;
@@ -794,3 +794,4 @@
 				    u_int32_t lengthlo, u_int32_t lengthhi); }
 480	AUE_FTRUNCATE	STD	{ int freebsd32_ftruncate(int fd, \
 				    u_int32_t lengthlo, u_int32_t lengthhi); }
+481	AUE_KILL	NOPROTO	{ int thr_kill2(pid_t pid, long id, int sig); }

==== //depot/projects/delphij_fork/sys/conf/files.amd64#3 (text+ko) ====

@@ -1,7 +1,7 @@
 # This file tells config what files go into building a kernel,
 # files marked standard are always included.
 #
-# $FreeBSD: src/sys/conf/files.amd64,v 1.106 2007/07/05 06:12:40 peter Exp $
+# $FreeBSD: src/sys/conf/files.amd64,v 1.107 2007/08/15 19:26:01 des Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -145,6 +145,7 @@
 dev/atkbdc/atkbdc_isa.c		optional	atkbdc isa
 dev/atkbdc/atkbdc_subr.c	optional	atkbdc
 dev/atkbdc/psm.c		optional	psm atkbdc
+dev/coretemp/coretemp.c		optional	coretemp
 # There are no systems with isa slots, so all ed isa entries should go..
 dev/ed/if_ed_3c503.c		optional	ed isa ed_3c503
 dev/ed/if_ed_isa.c		optional	ed isa

==== //depot/projects/delphij_fork/sys/conf/files.i386#3 (text+ko) ====

@@ -1,7 +1,7 @@
 # This file tells config what files go into building a kernel,
 # files marked standard are always included.
 #
-# $FreeBSD: src/sys/conf/files.i386,v 1.579 2007/07/05 06:12:40 peter Exp $
+# $FreeBSD: src/sys/conf/files.i386,v 1.580 2007/08/15 19:26:01 des Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -158,6 +158,7 @@
 dev/ce/if_ce.c			optional ce
 dev/ce/tau32-ddk.c		optional ce
 dev/cm/if_cm_isa.c		optional cm isa
+dev/coretemp/coretemp.c		optional coretemp
 dev/cp/cpddk.c			optional cp
 dev/cp/if_cp.c			optional cp
 dev/ctau/ctau.c			optional ctau

==== //depot/projects/delphij_fork/sys/fs/msdosfs/msdosfs_vfsops.c#6 (text+ko) ====

@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/fs/msdosfs/msdosfs_vfsops.c,v 1.173 2007/08/07 03:38:36 bde Exp $ */
+/* $FreeBSD: src/sys/fs/msdosfs/msdosfs_vfsops.c,v 1.174 2007/08/15 17:40:09 jhb Exp $ */
 /*	$NetBSD: msdosfs_vfsops.c,v 1.51 1997/11/17 15:36:58 ws Exp $	*/
 
 /*-
@@ -77,7 +77,7 @@
 /* List of mount options we support */
 static const char *msdosfs_opts[] = {
 	"from",
-	"atime", "export", "force", "sync",
+	"noatime", "export", "force", "sync",
 	"uid", "gid", "mask", "dirmask",
 	"shortname", "shortnames", "longname", "longnames", "nowin95", "win95",
 	"kiconv", "cs_win", "cs_dos", "cs_local", "large",

==== //depot/projects/delphij_fork/sys/fs/tmpfs/tmpfs_vnops.c#5 (text+ko) ====

@@ -41,7 +41,7 @@
  * tmpfs vnode interface.
  */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/fs/tmpfs/tmpfs_vnops.c,v 1.10 2007/08/10 11:00:30 delphij Exp $");
+__FBSDID("$FreeBSD: src/sys/fs/tmpfs/tmpfs_vnops.c,v 1.11 2007/08/16 11:00:07 delphij Exp $");
 
 #include <sys/param.h>
 #include <sys/fcntl.h>
@@ -1219,22 +1219,25 @@
 
 	startoff = uio->uio_offset;
 
-	switch (startoff) {
-	case TMPFS_DIRCOOKIE_DOT:
+	if (uio->uio_offset == TMPFS_DIRCOOKIE_DOT) {
 		error = tmpfs_dir_getdotdent(node, uio);
-		if (error == 0)
-			cnt++;
-		break;
-	case TMPFS_DIRCOOKIE_DOTDOT:
+		if (error != 0)
+			goto outok;
+		cnt++;
+	}
+
+	if (uio->uio_offset == TMPFS_DIRCOOKIE_DOTDOT) {
 		error = tmpfs_dir_getdotdotdent(node, uio);
-		if (error == 0)
-			cnt++;
-		break;
-	default:
-		error = tmpfs_dir_getdents(node, uio, &cnt);
-		MPASS(error >= -1);
+		if (error != 0)
+			goto outok;
+		cnt++;
 	}
 
+	error = tmpfs_dir_getdents(node, uio, &cnt);
+
+outok:
+	MPASS(error >= -1);
+
 	if (error == -1)
 		error = 0;
 

==== //depot/projects/delphij_fork/sys/gnu/fs/ext2fs/ext2_vfsops.c#3 (text+ko) ====

@@ -33,7 +33,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)ffs_vfsops.c	8.8 (Berkeley) 4/18/94
- * $FreeBSD: src/sys/gnu/fs/ext2fs/ext2_vfsops.c,v 1.164 2007/07/14 21:18:19 rodrigc Exp $
+ * $FreeBSD: src/sys/gnu/fs/ext2fs/ext2_vfsops.c,v 1.165 2007/08/15 17:40:09 jhb Exp $
  */
 
 /*-
@@ -118,8 +118,8 @@
 		    struct ext2_super_block * es, struct ext2_sb_info * fs);
 
 static const char *ext2_opts[] = { "from", "export", "union", "acls", "exec",
-    "atime", "union", "suiddir", "multilabel", "symfollow", "clusterr",
-    "clusterw", "force", NULL };
+    "noatime", "union", "suiddir", "multilabel", "nosymfollow",
+    "noclusterr", "noclusterw", "force", NULL };
  
 /*
  * VFS Operations.

==== //depot/projects/delphij_fork/sys/i386/conf/NOTES#2 (text+ko) ====

@@ -4,7 +4,7 @@
 # This file contains machine dependent kernel configuration notes.  For
 # machine independent notes, look in /sys/conf/NOTES.
 #
-# $FreeBSD: src/sys/i386/conf/NOTES,v 1.1243 2007/07/04 00:18:38 bz Exp $
+# $FreeBSD: src/sys/i386/conf/NOTES,v 1.1244 2007/08/15 19:26:03 des Exp $
 #
 
 #
@@ -853,6 +853,13 @@
 #
 device		ichwd
 
+#
+# Temperature sensors:
+#
+# coretemp: on-die sensor on Intel Core and newer CPUs
+#
+device		coretemp
+
 #---------------------------------------------------------------------------
 # ISDN4BSD
 #

==== //depot/projects/delphij_fork/sys/i386/include/specialreg.h#2 (text+ko) ====

@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  *	from: @(#)specialreg.h	7.1 (Berkeley) 5/9/91
- * $FreeBSD: src/sys/i386/include/specialreg.h,v 1.41 2007/05/31 11:26:45 des Exp $
+ * $FreeBSD: src/sys/i386/include/specialreg.h,v 1.42 2007/08/15 19:26:02 des Exp $
  */
 
 #ifndef _MACHINE_SPECIALREG_H_
@@ -176,6 +176,7 @@
 #define	MSR_BIOS_SIGN		0x08b
 #define	MSR_PERFCTR0		0x0c1
 #define	MSR_PERFCTR1		0x0c2
+#define	MSR_IA32_EXT_CONFIG	0x0ee	/* Undocumented. Core Solo/Duo only */
 #define	MSR_MTRRcap		0x0fe
 #define	MSR_BBL_CR_ADDR		0x116
 #define	MSR_BBL_CR_DECC		0x118

==== //depot/projects/delphij_fork/sys/kern/init_sysent.c#3 (text+ko) ====

@@ -2,7 +2,7 @@
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/kern/init_sysent.c,v 1.229 2007/07/04 22:49:54 peter Exp $
+ * $FreeBSD: src/sys/kern/init_sysent.c,v 1.230 2007/08/16 05:32:25 davidxu Exp $
  * created from FreeBSD: src/sys/kern/syscalls.master,v 1.232 2007/07/04 22:47:37 peter Exp 
  */
 
@@ -510,4 +510,5 @@
 	{ AS(lseek_args), (sy_call_t *)lseek, AUE_LSEEK, NULL, 0, 0 },	/* 478 = lseek */
 	{ AS(truncate_args), (sy_call_t *)truncate, AUE_TRUNCATE, NULL, 0, 0 },	/* 479 = truncate */
 	{ AS(ftruncate_args), (sy_call_t *)ftruncate, AUE_FTRUNCATE, NULL, 0, 0 },	/* 480 = ftruncate */
+	{ AS(thr_kill2_args), (sy_call_t *)thr_kill2, AUE_KILL, NULL, 0, 0 },	/* 481 = thr_kill2 */
 };

==== //depot/projects/delphij_fork/sys/kern/kern_thr.c#2 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_thr.c,v 1.61 2007/06/07 19:45:19 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_thr.c,v 1.62 2007/08/16 05:26:41 davidxu Exp $");
 
 #include "opt_compat.h"
 #include "opt_posix.h"
@@ -53,6 +53,8 @@
 
 #include <machine/frame.h>
 
+#include <security/audit/audit.h>
+
 #ifdef COMPAT_IA32
 
 extern struct sysentvec ia32_freebsd_sysvec;
@@ -337,6 +339,59 @@
 }
 
 int
+thr_kill2(struct thread *td, struct thr_kill2_args *uap)
+    /* pid_t pid, long id, int sig */
+{
+	struct thread *ttd;
+	struct proc *p;
+	int error;
+
+	AUDIT_ARG(signum, uap->sig);
+
+	if (uap->pid == td->td_proc->p_pid) {
+		p = td->td_proc;
+		PROC_LOCK(p);
+	} else if ((p = pfind(uap->pid)) == NULL) {
+		return (ESRCH);
+	}
+	AUDIT_ARG(process, p);
+
+	error = p_cansignal(td, p, uap->sig);
+	if (error == 0) {
+		if (uap->id == -1) {
+			if (uap->sig != 0 && !_SIG_VALID(uap->sig)) {
+				error = EINVAL;
+			} else {
+				error = ESRCH;
+				FOREACH_THREAD_IN_PROC(p, ttd) {
+					if (ttd != td) {
+						error = 0;
+						if (uap->sig == 0)
+							break;
+						tdsignal(p, ttd, uap->sig, NULL);
+					}
+				}
+			}
+		} else {
+			if (uap->id != td->td_tid)
+				ttd = thread_find(p, uap->id);
+			else
+				ttd = td;
+			if (ttd == NULL)
+				error = ESRCH;
+			else if (uap->sig == 0)
+				;
+			else if (!_SIG_VALID(uap->sig))
+				error = EINVAL;
+			else
+				tdsignal(p, ttd, uap->sig, NULL);
+		}
+	}
+	PROC_UNLOCK(p);
+	return (error);
+}
+
+int
 thr_suspend(struct thread *td, struct thr_suspend_args *uap)
 	/* const struct timespec *timeout */
 {

==== //depot/projects/delphij_fork/sys/kern/syscalls.c#3 (text+ko) ====

@@ -2,7 +2,7 @@
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/kern/syscalls.c,v 1.213 2007/07/04 22:49:55 peter Exp $
+ * $FreeBSD: src/sys/kern/syscalls.c,v 1.214 2007/08/16 05:32:26 davidxu Exp $
  * created from FreeBSD: src/sys/kern/syscalls.master,v 1.232 2007/07/04 22:47:37 peter Exp 
  */
 
@@ -488,4 +488,5 @@
 	"lseek",			/* 478 = lseek */
 	"truncate",			/* 479 = truncate */
 	"ftruncate",			/* 480 = ftruncate */
+	"thr_kill2",			/* 481 = thr_kill2 */
 };

==== //depot/projects/delphij_fork/sys/kern/syscalls.master#3 (text+ko) ====

@@ -1,4 +1,4 @@
- $FreeBSD: src/sys/kern/syscalls.master,v 1.232 2007/07/04 22:47:37 peter Exp $
+ $FreeBSD: src/sys/kern/syscalls.master,v 1.233 2007/08/16 05:26:41 davidxu Exp $
 ;	from: @(#)syscalls.master	8.2 (Berkeley) 1/13/94
 ;
 ; System call name/number master file.
@@ -846,5 +846,6 @@
 				    int whence); }
 479	AUE_TRUNCATE	STD	{ int truncate(char *path, off_t length); }
 480	AUE_FTRUNCATE	STD	{ int ftruncate(int fd, off_t length); }
+481	AUE_KILL	STD	{ int thr_kill2(pid_t pid, long id, int sig); }
 ; Please copy any additions and changes to the following compatability tables:
 ; sys/compat/freebsd32/syscalls.master

==== //depot/projects/delphij_fork/sys/kern/systrace_args.c#3 (text+ko) ====

@@ -2,7 +2,7 @@
  * System call argument to DTrace register array converstion.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/kern/systrace_args.c,v 1.13 2007/07/04 22:49:55 peter Exp $
+ * $FreeBSD: src/sys/kern/systrace_args.c,v 1.14 2007/08/16 05:32:26 davidxu Exp $
  * This file is part of the DTrace syscall provider.
  */
 
@@ -2862,6 +2862,15 @@
 		*n_args = 2;
 		break;
 	}
+	/* thr_kill2 */
+	case 481: {
+		struct thr_kill2_args *p = params;
+		iarg[0] = p->pid; /* pid_t */
+		iarg[1] = p->id; /* long */
+		iarg[2] = p->sig; /* int */
+		*n_args = 3;
+		break;
+	}
 	default:
 		*n_args = 0;
 		break;

==== //depot/projects/delphij_fork/sys/kern/vfs_mount.c#4 (text+ko) ====

@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/vfs_mount.c,v 1.263 2007/07/26 16:52:57 pjd Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/vfs_mount.c,v 1.264 2007/08/15 17:40:09 jhb Exp $");
 
 #include <sys/param.h>
 #include <sys/conf.h>
@@ -137,8 +137,8 @@
 	"rdonly",
 	"ro",
 	"rw",
-	"suid",
-	"exec",
+	"nosuid",
+	"noexec",
 	"update",
 	NULL
 };
@@ -638,16 +638,40 @@
 			fsflags &= ~MNT_ASYNC;
 		else if (strcmp(opt->name, "noatime") == 0)
 			fsflags |= MNT_NOATIME;
+		else if (strcmp(opt->name, "atime") == 0) {
+			free(opt->name, M_MOUNT);
+			opt->name = strdup("nonoatime", M_MOUNT);
+		}
 		else if (strcmp(opt->name, "noclusterr") == 0)
 			fsflags |= MNT_NOCLUSTERR;
+		else if (strcmp(opt->name, "clusterr") == 0) {
+			free(opt->name, M_MOUNT);
+			opt->name = strdup("nonoclusterr", M_MOUNT);
+		}
 		else if (strcmp(opt->name, "noclusterw") == 0)
 			fsflags |= MNT_NOCLUSTERW;
+		else if (strcmp(opt->name, "clusterw") == 0) {
+			free(opt->name, M_MOUNT);
+			opt->name = strdup("nonoclusterw", M_MOUNT);
+		}
 		else if (strcmp(opt->name, "noexec") == 0)
 			fsflags |= MNT_NOEXEC;
+		else if (strcmp(opt->name, "exec") == 0) {
+			free(opt->name, M_MOUNT);
+			opt->name = strdup("nonoexec", M_MOUNT);
+		}
 		else if (strcmp(opt->name, "nosuid") == 0)
 			fsflags |= MNT_NOSUID;
+		else if (strcmp(opt->name, "suid") == 0) {
+			free(opt->name, M_MOUNT);
+			opt->name = strdup("nonosuid", M_MOUNT);
+		}
 		else if (strcmp(opt->name, "nosymfollow") == 0)
 			fsflags |= MNT_NOSYMFOLLOW;
+		else if (strcmp(opt->name, "symfollow") == 0) {
+			free(opt->name, M_MOUNT);
+			opt->name = strdup("nonosymfollow", M_MOUNT);
+		}
 		else if (strcmp(opt->name, "noro") == 0) {
 			fsflags &= ~MNT_RDONLY;
 			has_noro = 1;
@@ -1760,26 +1784,47 @@
 vfs_filteropt(struct vfsoptlist *opts, const char **legal)
 {
 	struct vfsopt *opt;
-	const char **t, *p;
+	char errmsg[255];
+	const char **t, *p, *q;
+	int ret = 0;
 
 	TAILQ_FOREACH(opt, opts, link) {
 		p = opt->name;
+		q = NULL;
 		if (p[0] == 'n' && p[1] == 'o')
-			p += 2;
-		for(t = global_opts; *t != NULL; t++)
-			if (!strcmp(*t, p))
+			q = p + 2;
+		for(t = global_opts; *t != NULL; t++) {
+			if (strcmp(*t, p) == 0)
 				break;
+			if (q != NULL) {
+				if (strcmp(*t, q) == 0)
+					break;
+			}
+		}
 		if (*t != NULL)
 			continue;
-		for(t = legal; *t != NULL; t++)
-			if (!strcmp(*t, p))
+		for(t = legal; *t != NULL; t++) {
+			if (strcmp(*t, p) == 0)
 				break;
+			if (q != NULL) {
+				if (strcmp(*t, q) == 0)
+					break;
+			}
+		}
 		if (*t != NULL)
 			continue;
-		printf("mount option <%s> is unknown\n", p);
-		return (EINVAL);
+		sprintf(errmsg, "mount option <%s> is unknown", p);
+		printf("%s\n", errmsg);
+		ret = EINVAL;
+	}
+	if (ret != 0) {
+		TAILQ_FOREACH(opt, opts, link) {
+			if (strcmp(opt->name, "errmsg") == 0) {
+				strncpy((char *)opt->value, errmsg, opt->len);
+			}
+		}
 	}
-	return (0);
+	return (ret);
 }
 
 /*

==== //depot/projects/delphij_fork/sys/modules/Makefile#5 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/modules/Makefile,v 1.538 2007/07/24 16:58:18 scottl Exp $
+# $FreeBSD: src/sys/modules/Makefile,v 1.539 2007/08/15 19:26:02 des Exp $
 
 .include <bsd.own.mk>
 
@@ -54,6 +54,7 @@
 	coda \
 	coda5 \
 	${_coff} \
+	${_coretemp} \
 	${_cp} \
 	${_cpufreq} \
 	${_crypto} \
@@ -370,6 +371,7 @@
 _cbb=		cbb
 _ce=		ce
 _coff=		coff
+_coretemp=	coretemp
 _cp=		cp
 _cpufreq=	cpufreq
 _cs=		cs
@@ -489,6 +491,7 @@
 _cardbus=	cardbus
 _cbb=		cbb
 _ciss=		ciss
+_coretemp=	coretemp
 _cpufreq=	cpufreq
 _digi=		digi
 _drm=		drm

==== //depot/projects/delphij_fork/sys/netinet/sctp_asconf.c#6 (text+ko) ====

@@ -31,7 +31,7 @@
 /* $KAME: sctp_asconf.c,v 1.24 2005/03/06 16:04:16 itojun Exp $	 */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/netinet/sctp_asconf.c,v 1.23 2007/07/24 20:06:01 rrs Exp $");
+__FBSDID("$FreeBSD: src/sys/netinet/sctp_asconf.c,v 1.24 2007/08/16 01:51:22 rrs Exp $");
 #include <netinet/sctp_os.h>
 #include <netinet/sctp_var.h>
 #include <netinet/sctp_sysctl.h>
@@ -872,6 +872,47 @@
 }
 
 /*
+ * cleanup any cached source addresses that may be topologically
+ * incorrect after a new address has been added to this interface.
+ */
+static void
+sctp_asconf_nets_cleanup(struct sctp_tcb *stcb, struct sctp_ifn *ifn)
+{
+	struct sctp_nets *net;
+
+	/*
+	 * Ideally, we want to only clear cached routes and source addresses
+	 * that are topologically incorrect.  But since there is no easy way
+	 * to know whether the newly added address on the ifn would cause a
+	 * routing change (i.e. a new egress interface would be chosen)
+	 * without doing a new routing lookup and source address selection,
+	 * we will (for now) just flush any cached route using a different
+	 * ifn (and cached source addrs) and let output re-choose them
+	 * during the next send on that net.
+	 */
+	TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
+		/*
+		 * clear any cached route (and cached source address) if the
+		 * route's interface is NOT the same as the address change.
+		 * If it's the same interface, just clear the cached source
+		 * address.
+		 */
+		if (SCTP_ROUTE_HAS_VALID_IFN(&net->ro) &&
+		    SCTP_GET_IF_INDEX_FROM_ROUTE(&net->ro) != ifn->ifn_index) {
+			/* clear any cached route */
+			RTFREE(net->ro.ro_rt);
+			net->ro.ro_rt = NULL;
+		}
+		/* clear any cached source address */
+		if (net->src_addr_selected) {
+			sctp_free_ifa(net->ro._s_addr);
+			net->ro._s_addr = NULL;
+			net->src_addr_selected = 0;
+		}
+	}
+}
+
+/*
  * process an ADD/DELETE IP ack from peer.
  * addr: corresponding sctp_ifa to the address being added/deleted.
  * type: SCTP_ADD_IP_ADDRESS or SCTP_DEL_IP_ADDRESS.
@@ -883,8 +924,8 @@
 {
 	/*
 	 * do the necessary asoc list work- if we get a failure indication,
-	 * leave the address on the "do not use" asoc list if we get a
-	 * success indication, remove the address from the list
+	 * leave the address on the assoc's restricted list.  If we get a
+	 * success indication, remove the address from the restricted list.
 	 */
 	/*
 	 * Note: this will only occur for ADD_IP_ADDRESS, since
@@ -893,6 +934,12 @@
 	if (flag) {
 		/* success case, so remove from the restricted list */
 		sctp_del_local_addr_restricted(stcb, addr);
+
+		/*
+		 * clear any cached, topologically incorrect source
+		 * addresses
+		 */
+		sctp_asconf_nets_cleanup(stcb, addr->ifn_p);
 	}
 	/* else, leave it on the list */
 }

==== //depot/projects/delphij_fork/sys/netinet/sctp_input.c#7 (text+ko) ====

@@ -31,7 +31,7 @@
 /* $KAME: sctp_input.c,v 1.27 2005/03/06 16:04:17 itojun Exp $	 */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/netinet/sctp_input.c,v 1.55 2007/08/06 15:46:46 rrs Exp $");
+__FBSDID("$FreeBSD: src/sys/netinet/sctp_input.c,v 1.56 2007/08/16 01:51:22 rrs Exp $");
 
 #include <netinet/sctp_os.h>
 #include <netinet/sctp_var.h>
@@ -2186,16 +2186,13 @@
 				return (m);
 			}
 			oso = (*inp_p)->sctp_socket;
-			/*
-			 * We do this to keep the sockets side happy durin
-			 * the sonewcon ONLY.
-			 */
+			atomic_add_int(&(*stcb)->asoc.refcnt, 1);
 			SCTP_TCB_UNLOCK((*stcb));
 			so = sonewconn(oso, 0
 			    );
-			SCTP_INP_WLOCK((*stcb)->sctp_ep);
 			SCTP_TCB_LOCK((*stcb));
-			SCTP_INP_WUNLOCK((*stcb)->sctp_ep);
+			atomic_subtract_int(&(*stcb)->asoc.refcnt, 1);
+
 			if (so == NULL) {
 				struct mbuf *op_err;
 
@@ -3968,7 +3965,6 @@
 					SCTP_TCB_UNLOCK(locked_tcb);
 				}
 				return (NULL);
-
 			}
 			if (netp && *netp) {
 				int abort_flag = 0;

==== //depot/projects/delphij_fork/sys/netinet/sctp_output.c#6 (text+ko) ====

@@ -31,7 +31,7 @@
 /* $KAME: sctp_output.c,v 1.46 2005/03/06 16:04:17 itojun Exp $	 */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/netinet/sctp_output.c,v 1.48 2007/07/24 20:06:01 rrs Exp $");
+__FBSDID("$FreeBSD: src/sys/netinet/sctp_output.c,v 1.49 2007/08/16 01:51:22 rrs Exp $");
 
 #include <netinet/sctp_os.h>
 #include <sys/proc.h>
@@ -2692,11 +2692,11 @@
 	uint32_t ifn_index;
 	struct sctp_vrf *vrf;
 
-	/*
-	 * For boundall we can use any address in the association. If
-	 * non_asoc_addr_ok is set we can use any address (at least in
-	 * theory). So we look for preferred addresses first. If we find
-	 * one, we use it. Otherwise we next try to get an address on the
+	/*-
+	 * For boundall we can use any address in the association.
+	 * If non_asoc_addr_ok is set we can use any address (at least in
+	 * theory). So we look for preferred addresses first. If we find one,
+	 * we use it. Otherwise we next try to get an address on the
 	 * interface, which we should be able to do (unless non_asoc_addr_ok
 	 * is false and we are routed out that way). In these cases where we
 	 * can't use the address of the interface we go through all the
@@ -2898,43 +2898,51 @@
     struct sctp_nets *net,
     int non_asoc_addr_ok, uint32_t vrf_id)
 {
-
 	struct sockaddr_in *to = (struct sockaddr_in *)&ro->ro_dst;
 	struct sockaddr_in6 *to6 = (struct sockaddr_in6 *)&ro->ro_dst;
 	struct sctp_ifa *answer;
 	uint8_t dest_is_priv, dest_is_loop;
 	sa_family_t fam;
 
-	/*
+	/*-
 	 * Rules: - Find the route if needed, cache if I can. - Look at
 	 * interface address in route, Is it in the bound list. If so we
 	 * have the best source. - If not we must rotate amongst the
 	 * addresses.
-	 * 
+	 *
 	 * Cavets and issues
-	 * 
+	 *
 	 * Do we need to pay attention to scope. We can have a private address
 	 * or a global address we are sourcing or sending to. So if we draw
-	 * it out zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
-	 * For V4 ------------------------------------------ source     *
-	 * dest  *  result ----------------------------------------- <a>
-	 * Private    *    Global  *	NAT
-	 * ----------------------------------------- <b>  Private    *
-	 * Private *  No problem -----------------------------------------
-	 * <c>  Global     *    Private *  Huh, How will this work?
-	 * ----------------------------------------- <d>  Global     *
-	 * Global  *  No Problem ------------------------------------------
-	 * zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz For V6
-	 * ------------------------------------------ source     *      dest  *
-	 * result ----------------------------------------- <a>  Linklocal  *
-	 * Global  *	----------------------------------------- <b>
-	 * Linklocal  * Linklocal  *  No problem
-	 * ----------------------------------------- <c>  Global     *
-	 * Linklocal  *  Huh, How will this work?
-	 * ----------------------------------------- <d>  Global     *
-	 * Global  *  No Problem ------------------------------------------
+	 * it out
+	 * zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
+	 * For V4
+         *------------------------------------------
+	 *      source     *      dest  *  result
+	 * -----------------------------------------
+	 * <a>  Private    *    Global  *  NAT
+	 * -----------------------------------------
+	 * <b>  Private    *    Private *  No problem
+	 * -----------------------------------------
+         * <c>  Global     *    Private *  Huh, How will this work?
+	 * -----------------------------------------
+         * <d>  Global     *    Global  *  No Problem
+         *------------------------------------------
+	 * zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
+	 * For V6
+         *------------------------------------------
+	 *      source     *      dest  *  result
+	 * -----------------------------------------
+	 * <a>  Linklocal  *    Global  *
+	 * -----------------------------------------
+	 * <b>  Linklocal  * Linklocal  *  No problem
+	 * -----------------------------------------
+         * <c>  Global     * Linklocal  *  Huh, How will this work?
+	 * -----------------------------------------
+         * <d>  Global     *    Global  *  No Problem
+         *------------------------------------------
 	 * zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
-	 * 
+         *
 	 * And then we add to that what happens if there are multiple addresses
 	 * assigned to an interface. Remember the ifa on a ifn is a linked
 	 * list of addresses. So one interface can have more than one IP
@@ -2943,18 +2951,20 @@
 	 * one is best? And what about NAT's sending P->G may get you a NAT
 	 * translation, or should you select the G thats on the interface in
 	 * preference.
-	 * 
+	 *
 	 * Decisions:
-	 * 
-	 * - count the number of addresses on the interface. - if it is one, no
-	 * problem except case <c>. For <a> we will assume a NAT out there.
+	 *
+	 * - count the number of addresses on the interface.
+         * - if it is one, no problem except case <c>.
+         *   For <a> we will assume a NAT out there.
 	 * - if there are more than one, then we need to worry about scope P
-	 * or G. We should prefer G -> G and P -> P if possible. Then as a
-	 * secondary fall back to mixed types G->P being a last ditch one. -
-	 * The above all works for bound all, but bound specific we need to
-	 * use the same concept but instead only consider the bound
-	 * addresses. If the bound set is NOT assigned to the interface then
-	 * we must use rotation amongst the bound addresses..
+	 *   or G. We should prefer G -> G and P -> P if possible.
+	 *   Then as a secondary fall back to mixed types G->P being a last
+	 *   ditch one.
+         * - The above all works for bound all, but bound specific we need to
+	 *   use the same concept but instead only consider the bound
+	 *   addresses. If the bound set is NOT assigned to the interface then
+	 *   we must use rotation amongst the bound addresses..
 	 */
 	if (ro->ro_rt == NULL) {
 		/*
@@ -11535,7 +11545,6 @@
 			if ((net->flight_size > net->cwnd) &&
 			    (sctp_cmt_on_off == 0)) {
 				queue_only = 1;
-
 			} else if (asoc->ifp_had_enobuf) {
 				SCTP_STAT_INCR(sctps_ifnomemqueued);
 				if (net->flight_size > (net->mtu * 2)) {
@@ -11624,7 +11633,6 @@
 						sctp_chunk_output(inp,
 						    stcb,
 						    SCTP_OUTPUT_FROM_USR_SEND);
-
 					}
 				} else {
 					sctp_chunk_output(inp,
@@ -11835,7 +11843,6 @@
 	    (stcb->asoc.total_flight > 0) &&
 	    (un_sent < (int)(stcb->asoc.smallest_mtu - SCTP_MIN_OVERHEAD))
 	    ) {
-
 		/*-
 		 * Ok, Nagle is set on and we have data outstanding.
 		 * Don't send anything and let SACKs drive out the

==== //depot/projects/delphij_fork/sys/netinet/sctp_pcb.c#6 (text+ko) ====

@@ -31,7 +31,7 @@
 /* $KAME: sctp_pcb.c,v 1.38 2005/03/06 16:04:18 itojun Exp $	 */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/netinet/sctp_pcb.c,v 1.51 2007/07/24 20:06:01 rrs Exp $");
+__FBSDID("$FreeBSD: src/sys/netinet/sctp_pcb.c,v 1.52 2007/08/16 01:51:22 rrs Exp $");
 
 #include <netinet/sctp_os.h>
 #include <sys/proc.h>
@@ -1263,7 +1263,6 @@
 	/* Find the head of the ALLADDR chain */
 	if (have_lock == 0) {
 		SCTP_INP_INFO_RLOCK();
-
 	}
 	head = &sctppcbinfo.sctp_ephash[SCTP_PCBHASH_ALLADDR(lport,
 	    sctppcbinfo.hashmark)];
@@ -3785,7 +3784,7 @@
 					/* Held for PD-API clear that. */
 					sq->pdapi_aborted = 1;
 					sq->held_length = 0;
-					if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_PDAPIEVNT)) {
+					if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_PDAPIEVNT) && (so != NULL)) {
 						/*
 						 * Need to add a PD-API
 						 * aborted indication.
@@ -3917,7 +3916,6 @@
 	LIST_REMOVE(stcb, sctp_asocs);
 	sctp_add_vtag_to_timewait(inp, asoc->my_vtag, SCTP_TIME_WAIT);
 
-
 	/*
 	 * Now restop the timers to be sure - this is paranoia at is finest!
 	 */
@@ -3929,7 +3927,6 @@
 	(void)SCTP_OS_TIMER_STOP(&asoc->shut_guard_timer.timer);
 	(void)SCTP_OS_TIMER_STOP(&asoc->autoclose_timer.timer);
 	(void)SCTP_OS_TIMER_STOP(&asoc->delayed_event_timer.timer);
-
 	TAILQ_FOREACH(net, &asoc->nets, sctp_next) {
 		(void)SCTP_OS_TIMER_STOP(&net->fr_timer.timer);
 		(void)SCTP_OS_TIMER_STOP(&net->rxt_timer.timer);

==== //depot/projects/delphij_fork/sys/netinet/sctp_timer.c#5 (text+ko) ====

@@ -31,7 +31,7 @@
 /* $KAME: sctp_timer.c,v 1.29 2005/03/06 16:04:18 itojun Exp $	 */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/netinet/sctp_timer.c,v 1.25 2007/07/24 20:06:02 rrs Exp $");
+__FBSDID("$FreeBSD: src/sys/netinet/sctp_timer.c,v 1.26 2007/08/16 01:51:22 rrs Exp $");
 

>>> TRUNCATED FOR MAIL (1000 lines) <<<



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200708161234.l7GCYcxJ052554>