PERFORCE change 86488 for review

Peter Wemm peter at FreeBSD.org
Tue Nov 8 13:44:31 PST 2005


http://perforce.freebsd.org/chv.cgi?CH=86488

Change 86488 by peter at peter_daintree on 2005/11/08 21:43:50

	IFC @86479

Affected files ...

.. //depot/projects/hammer/etc/mtree/BSD.include.dist#36 integrate
.. //depot/projects/hammer/lib/libarchive/archive.h.in#8 integrate
.. //depot/projects/hammer/lib/libarchive/archive_entry.c#22 integrate
.. //depot/projects/hammer/lib/libarchive/archive_private.h#20 integrate
.. //depot/projects/hammer/lib/libarchive/archive_read_support_compression_compress.c#4 integrate
.. //depot/projects/hammer/lib/libarchive/archive_read_support_format_cpio.c#13 integrate
.. //depot/projects/hammer/lib/libarchive/archive_read_support_format_iso9660.c#8 integrate
.. //depot/projects/hammer/lib/libarchive/archive_read_support_format_tar.c#25 integrate
.. //depot/projects/hammer/lib/libarchive/archive_write_set_format_pax.c#24 integrate
.. //depot/projects/hammer/lib/libarchive/archive_write_set_format_ustar.c#11 integrate
.. //depot/projects/hammer/sys/arm/include/pcpu.h#3 integrate
.. //depot/projects/hammer/sys/conf/files.powerpc#14 integrate
.. //depot/projects/hammer/sys/contrib/pf/net/if_pflog.c#15 integrate
.. //depot/projects/hammer/sys/contrib/pf/net/if_pfsync.c#20 integrate
.. //depot/projects/hammer/sys/dev/pccbb/pccbbdevid.h#12 integrate
.. //depot/projects/hammer/sys/dev/rp/rp.c#19 integrate
.. //depot/projects/hammer/sys/dev/si/si_pci.c#6 integrate
.. //depot/projects/hammer/sys/kern/kern_exit.c#52 integrate
.. //depot/projects/hammer/sys/kern/kern_proc.c#49 integrate
.. //depot/projects/hammer/sys/kern/kern_sig.c#63 integrate
.. //depot/projects/hammer/sys/kern/kern_thread.c#83 integrate
.. //depot/projects/hammer/sys/kern/vfs_aio.c#36 integrate
.. //depot/projects/hammer/sys/kern/vfs_mount.c#58 integrate
.. //depot/projects/hammer/sys/modules/i2c/controllers/viapm/Makefile#2 integrate
.. //depot/projects/hammer/sys/net/if_bridge.c#16 integrate
.. //depot/projects/hammer/sys/net/if_bridgevar.h#4 integrate
.. //depot/projects/hammer/sys/net/if_clone.c#8 integrate
.. //depot/projects/hammer/sys/net/if_clone.h#3 integrate
.. //depot/projects/hammer/sys/net/if_disc.c#18 integrate
.. //depot/projects/hammer/sys/net/if_faith.c#22 integrate
.. //depot/projects/hammer/sys/net/if_gif.c#23 integrate
.. //depot/projects/hammer/sys/net/if_gre.c#28 integrate
.. //depot/projects/hammer/sys/net/if_ppp.c#24 integrate
.. //depot/projects/hammer/sys/net/if_stf.c#23 integrate
.. //depot/projects/hammer/sys/net/if_var.h#36 integrate
.. //depot/projects/hammer/sys/net/if_vlan.c#32 integrate
.. //depot/projects/hammer/sys/netgraph/ng_eiface.c#22 integrate
.. //depot/projects/hammer/sys/netinet/if_ether.c#28 integrate
.. //depot/projects/hammer/sys/netinet/ip_carp.c#16 integrate
.. //depot/projects/hammer/sys/powerpc/include/mmuvar.h#1 branch
.. //depot/projects/hammer/sys/powerpc/include/pmap.h#10 integrate
.. //depot/projects/hammer/sys/powerpc/powerpc/machdep.c#39 integrate
.. //depot/projects/hammer/sys/powerpc/powerpc/mmu_if.m#1 branch
.. //depot/projects/hammer/sys/powerpc/powerpc/mmu_oea.c#2 integrate
.. //depot/projects/hammer/sys/powerpc/powerpc/pmap_dispatch.c#1 branch
.. //depot/projects/hammer/sys/sys/mount.h#38 integrate
.. //depot/projects/hammer/sys/sys/proc.h#90 integrate
.. //depot/projects/hammer/sys/sys/signalvar.h#17 integrate
.. //depot/projects/hammer/sys/vm/vm_page.c#45 integrate
.. //depot/projects/hammer/tools/regression/sigqueue/Makefile#2 integrate
.. //depot/projects/hammer/tools/regression/sigqueue/sigqtest2/Makefile#1 branch
.. //depot/projects/hammer/tools/regression/sigqueue/sigqtest2/sigqtest2.c#1 branch
.. //depot/projects/hammer/usr.sbin/pkg_install/create/create.h#5 integrate
.. //depot/projects/hammer/usr.sbin/pkg_install/create/main.c#5 integrate
.. //depot/projects/hammer/usr.sbin/pkg_install/create/perform.c#7 integrate
.. //depot/projects/hammer/usr.sbin/pkg_install/create/pkg_create.1#11 integrate

Differences ...

==== //depot/projects/hammer/etc/mtree/BSD.include.dist#36 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/etc/mtree/BSD.include.dist,v 1.102 2005/10/03 07:09:40 scottl Exp $
+# $FreeBSD: src/etc/mtree/BSD.include.dist,v 1.103 2005/11/08 09:53:28 rwatson Exp $
 #
 # Please see the file src/etc/mtree/README before making changes to this file.
 #
@@ -48,8 +48,8 @@
         ..
         iicbus
         ..
-	lmc
-	..
+        lmc
+        ..
         ofw
         ..
         pbio

==== //depot/projects/hammer/lib/libarchive/archive.h.in#8 (text+ko) ====

@@ -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: src/lib/libarchive/archive.h.in,v 1.25 2005/10/13 05:51:38 kientzle Exp $
+ * $FreeBSD: src/lib/libarchive/archive.h.in,v 1.26 2005/11/08 07:41:03 kientzle Exp $
  */
 
 #ifndef ARCHIVE_H_INCLUDED
@@ -132,6 +132,10 @@
 #define	ARCHIVE_FORMAT_BASE_MASK		0xff0000U
 #define	ARCHIVE_FORMAT_CPIO			0x10000
 #define	ARCHIVE_FORMAT_CPIO_POSIX		(ARCHIVE_FORMAT_CPIO | 1)
+#define	ARCHIVE_FORMAT_CPIO_BIN_LE		(ARCHIVE_FORMAT_CPIO | 2)
+#define	ARCHIVE_FORMAT_CPIO_BIN_BE		(ARCHIVE_FORMAT_CPIO | 3)
+#define	ARCHIVE_FORMAT_CPIO_SVR4_NOCRC		(ARCHIVE_FORMAT_CPIO | 4)
+#define	ARCHIVE_FORMAT_CPIO_SVR4_CRC		(ARCHIVE_FORMAT_CPIO | 5)
 #define	ARCHIVE_FORMAT_SHAR			0x20000
 #define	ARCHIVE_FORMAT_SHAR_BASE		(ARCHIVE_FORMAT_SHAR | 1)
 #define	ARCHIVE_FORMAT_SHAR_DUMP		(ARCHIVE_FORMAT_SHAR | 2)

==== //depot/projects/hammer/lib/libarchive/archive_entry.c#22 (text+ko) ====

@@ -25,10 +25,17 @@
  */
 
 #include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_entry.c,v 1.32 2005/10/12 03:26:09 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_entry.c,v 1.33 2005/11/08 03:52:42 kientzle Exp $");
 
 #include <sys/stat.h>
 #include <sys/types.h>
+#ifdef MAJOR_IN_MKDEV
+#include <sys/mkdev.h>
+#else
+#ifdef MAJOR_IN_SYSMACROS
+#include <sys/sysmacros.h>
+#endif
+#endif
 #ifdef HAVE_EXT2FS_EXT2_FS_H
 #include <ext2fs/ext2_fs.h>	/* for Linux file flags */
 #endif

==== //depot/projects/hammer/lib/libarchive/archive_private.h#20 (text+ko) ====

@@ -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: src/lib/libarchive/archive_private.h,v 1.20 2005/09/24 21:15:00 kientzle Exp $
+ * $FreeBSD: src/lib/libarchive/archive_private.h,v 1.21 2005/11/08 07:44:39 kientzle Exp $
  */
 
 #ifndef ARCHIVE_PRIVATE_H_INCLUDED
@@ -157,7 +157,7 @@
 		int	(*read_data_skip)(struct archive *);
 		int	(*cleanup)(struct archive *);
 		void	 *format_data;	/* Format-specific data for readers. */
-	}	formats[4];
+	}	formats[8];
 	struct archive_format_descriptor	*format; /* Active format. */
 
 	/*

==== //depot/projects/hammer/lib/libarchive/archive_read_support_compression_compress.c#4 (text+ko) ====

@@ -65,7 +65,7 @@
 
 
 #include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_compression_compress.c,v 1.3 2004/10/17 23:40:10 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_compression_compress.c,v 1.4 2005/11/08 07:42:42 kientzle Exp $");
 
 #include <errno.h>
 #include <stdlib.h>
@@ -200,6 +200,7 @@
 		return (ARCHIVE_FATAL);
 	}
 	memset(state, 0, sizeof(*state));
+	a->compression_data = state;
 
 	state->uncompressed_buffer_size = 64 * 1024;
 	state->uncompressed_buffer = malloc(state->uncompressed_buffer_size);
@@ -217,12 +218,19 @@
 	state->avail_out = state->uncompressed_buffer_size;
 
 	code = getbits(a, state, 8);
-	if (code != 037)
+	if (code != 037) /* This should be impossible. */
 		goto fatal;
 
 	code = getbits(a, state, 8);
-	if (code != 0235)
+	if (code != 0235) {
+		/* This can happen if the library is receiving 1-byte
+		 * blocks and gzip and compress are both enabled.
+		 * You can't distinguish gzip and compress only from
+		 * the first byte. */
+		archive_set_error(a, ARCHIVE_ERRNO_FILE_FORMAT,
+		    "Compress signature did not match.");
 		goto fatal;
+	}
 
 	code = getbits(a, state, 8);
 	state->maxcode_bits = code & 0x1f;
@@ -242,8 +250,6 @@
 		state->suffix[code] = code;
 	}
 	next_code(a, state);
-	a->compression_data = state;
-
 	return (ARCHIVE_OK);
 
 fatal:
@@ -331,17 +337,19 @@
 finish(struct archive *a)
 {
 	struct private_data *state;
-	int ret;
+	int ret = ARCHIVE_OK;
 
 	state = a->compression_data;
-	ret = ARCHIVE_OK;
 
-	free(state->uncompressed_buffer);
-	free(state);
+	if (state != NULL) {
+		if (state->uncompressed_buffer != NULL)
+			free(state->uncompressed_buffer);
+		free(state);
+	}
 
 	a->compression_data = NULL;
 	if (a->client_closer != NULL)
-		(a->client_closer)(a, a->client_data);
+		ret = (a->client_closer)(a, a->client_data);
 
 	return (ret);
 }

==== //depot/projects/hammer/lib/libarchive/archive_read_support_format_cpio.c#13 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_cpio.c,v 1.14 2005/09/21 04:25:05 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_cpio.c,v 1.15 2005/11/08 07:41:03 kientzle Exp $");
 
 #include <sys/stat.h>
 
@@ -317,9 +317,6 @@
 	const struct cpio_newc_header *header;
 	size_t bytes;
 
-	a->archive_format = ARCHIVE_FORMAT_CPIO;
-	a->archive_format_name = "ASCII cpio (SVR4 with no CRC)";
-
 	/* Read fixed-size portion of header. */
 	bytes = (a->compression_read_ahead)(a, &h, sizeof(struct cpio_newc_header));
 	if (bytes < sizeof(struct cpio_newc_header))
@@ -328,6 +325,17 @@
 
 	/* Parse out hex fields into struct stat. */
 	header = h;
+
+	if (memcmp(header->c_magic, "070701", 6) == 0) {
+		a->archive_format = ARCHIVE_FORMAT_CPIO_SVR4_NOCRC;
+		a->archive_format_name = "ASCII cpio (SVR4 with no CRC)";
+	} else if (memcmp(header->c_magic, "070702", 6) == 0) {
+		a->archive_format = ARCHIVE_FORMAT_CPIO_SVR4_CRC;
+		a->archive_format_name = "ASCII cpio (SVR4 with CRC)";
+	} else {
+		/* TODO: Abort here? */
+	}
+
 	st->st_ino = atol16(header->c_ino, sizeof(header->c_ino));
 	st->st_mode = atol16(header->c_mode, sizeof(header->c_mode));
 	st->st_uid = atol16(header->c_uid, sizeof(header->c_uid));
@@ -360,7 +368,7 @@
 	const struct cpio_odc_header *header;
 	size_t bytes;
 
-	a->archive_format = ARCHIVE_FORMAT_CPIO;
+	a->archive_format = ARCHIVE_FORMAT_CPIO_POSIX;
 	a->archive_format_name = "POSIX octet-oriented cpio";
 
 	/* Read fixed-size portion of header. */
@@ -404,7 +412,7 @@
 	const struct cpio_bin_header *header;
 	size_t bytes;
 
-	a->archive_format = ARCHIVE_FORMAT_CPIO;
+	a->archive_format = ARCHIVE_FORMAT_CPIO_BIN_LE;
 	a->archive_format_name = "cpio (little-endian binary)";
 
 	/* Read fixed-size portion of header. */
@@ -441,7 +449,7 @@
 	const struct cpio_bin_header *header;
 	size_t bytes;
 
-	a->archive_format = ARCHIVE_FORMAT_CPIO;
+	a->archive_format = ARCHIVE_FORMAT_CPIO_BIN_BE;
 	a->archive_format_name = "cpio (big-endian binary)";
 
 	/* Read fixed-size portion of header. */

==== //depot/projects/hammer/lib/libarchive/archive_read_support_format_iso9660.c#8 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_iso9660.c,v 1.11 2005/11/06 23:38:01 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_iso9660.c,v 1.12 2005/11/08 07:41:03 kientzle Exp $");
 
 #include <sys/stat.h>
 
@@ -302,10 +302,7 @@
 
 	iso9660 = *(a->pformat_data);
 
-	if (iso9660->seenRockridge) {
-		a->archive_format = ARCHIVE_FORMAT_ISO9660_ROCKRIDGE;
-		a->archive_format_name = "ISO9660 with Rockridge extensions";
-	} else {
+	if (!a->archive_format) {
 		a->archive_format = ARCHIVE_FORMAT_ISO9660;
 		a->archive_format_name = "ISO9660";
 	}
@@ -402,6 +399,12 @@
 					continue;
 				child = parse_file_info(iso9660, file, dr);
 				add_entry(iso9660, child);
+				if (iso9660->seenRockridge) {
+					a->archive_format =
+					    ARCHIVE_FORMAT_ISO9660_ROCKRIDGE;
+					a->archive_format_name =
+					    "ISO9660 with Rockridge extensions";
+				}
 			}
 		}
 	}

==== //depot/projects/hammer/lib/libarchive/archive_read_support_format_tar.c#25 (text+ko) ====

@@ -25,9 +25,16 @@
  */
 
 #include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_tar.c,v 1.38 2005/10/12 15:38:45 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_tar.c,v 1.39 2005/11/08 03:52:42 kientzle Exp $");
 
 #include <sys/stat.h>
+#ifdef MAJOR_IN_MKDEV
+#include <sys/mkdev.h>
+#else
+#ifdef MAJOR_IN_SYSMACROS
+#include <sys/sysmacros.h>
+#endif
+#endif
 #include <errno.h>
 #include <stddef.h>
 /* #include <stdint.h> */ /* See archive_platform.h */

==== //depot/projects/hammer/lib/libarchive/archive_write_set_format_pax.c#24 (text+ko) ====

@@ -25,9 +25,16 @@
  */
 
 #include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_set_format_pax.c,v 1.31 2005/10/12 03:26:09 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_set_format_pax.c,v 1.32 2005/11/08 03:52:42 kientzle Exp $");
 
 #include <sys/stat.h>
+#ifdef MAJOR_IN_MKDEV
+#include <sys/mkdev.h>
+#else
+#ifdef MAJOR_IN_SYSMACROS
+#include <sys/sysmacros.h>
+#endif
+#endif
 #include <errno.h>
 #include <stdlib.h>
 #include <string.h>

==== //depot/projects/hammer/lib/libarchive/archive_write_set_format_ustar.c#11 (text+ko) ====

@@ -25,9 +25,16 @@
  */
 
 #include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_set_format_ustar.c,v 1.13 2005/09/21 04:25:06 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_set_format_ustar.c,v 1.14 2005/11/08 03:52:42 kientzle Exp $");
 
 #include <sys/stat.h>
+#ifdef MAJOR_IN_MKDEV
+#include <sys/mkdev.h>
+#else
+#ifdef MAJOR_IN_SYSMACROS
+#include <sys/sysmacros.h>
+#endif
+#endif
 #include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>

==== //depot/projects/hammer/sys/arm/include/pcpu.h#3 (text+ko) ====

@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  *
  *	from: FreeBSD: src/sys/i386/include/globaldata.h,v 1.27 2001/04/27
- * $FreeBSD: src/sys/arm/include/pcpu.h,v 1.2 2004/11/04 19:19:44 cognet Exp $
+ * $FreeBSD: src/sys/arm/include/pcpu.h,v 1.3 2005/11/08 13:01:29 cognet Exp $
  */
 
 #ifndef	_MACHINE_PCPU_H_
@@ -32,7 +32,6 @@
 
 #ifdef _KERNEL
 
-#include <machine/asmacros.h>
 #include <machine/frame.h>
 
 #define	ALT_STACK_SIZE	128

==== //depot/projects/hammer/sys/conf/files.powerpc#14 (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.powerpc,v 1.44 2005/06/12 00:47:21 marcel Exp $
+# $FreeBSD: src/sys/conf/files.powerpc,v 1.45 2005/11/08 06:48:08 grehan Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -45,12 +45,14 @@
 powerpc/powerpc/intr_machdep.c	standard
 powerpc/powerpc/locore.S	standard	no-obj
 powerpc/powerpc/machdep.c	standard
+powerpc/powerpc/mmu_if.m	standard
+powerpc/powerpc/mmu_oea.c	standard
 powerpc/powerpc/nexus.c		standard
 powerpc/powerpc/ofwmagic.S	standard
 powerpc/powerpc/ofw_machdep.c	standard
 powerpc/powerpc/openpic.c	standard
 powerpc/powerpc/pic_if.m	standard
-powerpc/powerpc/pmap.c		standard
+powerpc/powerpc/pmap_dispatch.c	standard
 powerpc/powerpc/sc_machdep.c	optional	sc
 powerpc/powerpc/setjmp.S	standard
 powerpc/powerpc/sigcode.S	standard

==== //depot/projects/hammer/sys/contrib/pf/net/if_pflog.c#15 (text+ko) ====

@@ -1,4 +1,4 @@
-/*	$FreeBSD: src/sys/contrib/pf/net/if_pflog.c,v 1.16 2005/10/12 19:52:15 thompsa Exp $	*/
+/*	$FreeBSD: src/sys/contrib/pf/net/if_pflog.c,v 1.17 2005/11/08 20:08:33 thompsa Exp $	*/
 /*	$OpenBSD: if_pflog.c,v 1.12 2004/05/19 17:50:51 dhartmei Exp $	*/
 
 /*
@@ -369,9 +369,6 @@
 
 	case MOD_UNLOAD:
 		if_clone_detach(&pflog_cloner);
-		while (!LIST_EMPTY(&pflog_list))
-			ifc_simple_destroy(&pflog_cloner,
-			    SCP2IFP(LIST_FIRST(&pflog_list)));
 		break;
 
 	default:

==== //depot/projects/hammer/sys/contrib/pf/net/if_pfsync.c#20 (text+ko) ====

@@ -1,4 +1,4 @@
-/*	$FreeBSD: src/sys/contrib/pf/net/if_pfsync.c,v 1.24 2005/10/12 19:52:15 thompsa Exp $	*/
+/*	$FreeBSD: src/sys/contrib/pf/net/if_pfsync.c,v 1.25 2005/11/08 20:08:33 thompsa Exp $	*/
 /*	$OpenBSD: if_pfsync.c,v 1.46 2005/02/20 15:58:38 mcbride Exp $	*/
 
 /*
@@ -1851,9 +1851,6 @@
 
 	case MOD_UNLOAD:
 		if_clone_detach(&pfsync_cloner);
-		while (!LIST_EMPTY(&pfsync_list))
-			ifc_simple_destroy(&pfsync_cloner, 
-			    SCP2IFP(LIST_FIRST(&pfsync_list)));
 		break;
 
 	default:

==== //depot/projects/hammer/sys/dev/pccbb/pccbbdevid.h#12 (text+ko) ====

@@ -22,7 +22,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/dev/pccbb/pccbbdevid.h,v 1.21 2005/09/29 20:41:04 imp Exp $
+ * $FreeBSD: src/sys/dev/pccbb/pccbbdevid.h,v 1.22 2005/11/08 15:42:12 imp Exp $
  */
 
 /* Vendor/Device IDs */
@@ -30,12 +30,12 @@
 #define	PCIC_ID_CLPD6832	0x11101013ul
 #define	PCIC_ID_CLPD6833	0x11131013ul
 #define	PCIC_ID_CLPD6834	0x11121013ul
-#define PCIC_ID_ENE_CB710	0x14111524ul
-#define PCIC_ID_ENE_CB720	0x14211524ul	/* ??? */
-#define PCIC_ID_ENE_CB1211	0x12111524ul	/* ??? */
-#define PCIC_ID_ENE_CB1225	0x12251524ul	/* ??? */
-#define PCIC_ID_ENE_CB1410	0x14101524ul
-#define PCIC_ID_ENE_CB1420	0x14201524ul
+#define	PCIC_ID_ENE_CB710	0x14111524ul
+#define	PCIC_ID_ENE_CB720	0x14211524ul	/* ??? */
+#define	PCIC_ID_ENE_CB1211	0x12111524ul	/* ??? */
+#define	PCIC_ID_ENE_CB1225	0x12251524ul	/* ??? */
+#define	PCIC_ID_ENE_CB1410	0x14101524ul
+#define	PCIC_ID_ENE_CB1420	0x14201524ul
 #define	PCIC_ID_INTEL_82092AA_0	0x12218086ul	/* 16bit I/O */
 #define	PCIC_ID_INTEL_82092AA_1	0x12228086ul	/* 16bit I/O */
 #define	PCIC_ID_OMEGA_82C094	0x1221119bul	/* 16bit I/O */
@@ -47,12 +47,12 @@
 #define	PCIC_ID_OZ6912		0x69721217ul	/* Also 6972 */
 #define	PCIC_ID_OZ6922		0x69251217ul
 #define	PCIC_ID_OZ6933		0x69331217ul
-#define PCIC_ID_OZ711EC1	0x71121217ul	/* O2Micro 711EC1/M1 */
-#define PCIC_ID_OZ711E1		0x71131217ul	/* O2Micro 711E1 */
+#define	PCIC_ID_OZ711EC1	0x71121217ul	/* O2Micro 711EC1/M1 */
+#define	PCIC_ID_OZ711E1		0x71131217ul	/* O2Micro 711E1 */
 #define	PCIC_ID_OZ711M1		0x71141217ul	/* O2Micro 711M1 */
-#define PCIC_ID_OZ711E2		0x71e21217ul
-#define PCIC_ID_OZ711M2		0x72121217ul
-#define PCIC_ID_OZ711M3		0x72231217ul
+#define	PCIC_ID_OZ711E2		0x71e21217ul
+#define	PCIC_ID_OZ711M2		0x72121217ul
+#define	PCIC_ID_OZ711M3		0x72231217ul
 #define	PCIC_ID_RICOH_RL5C465	0x04651180ul
 #define	PCIC_ID_RICOH_RL5C466	0x04661180ul
 #define	PCIC_ID_RICOH_RL5C475	0x04751180ul
@@ -78,25 +78,25 @@
 #define	PCIC_ID_TI1421		0xac53104cul	/* never sold */
 #define	PCIC_ID_TI1450		0xac1b104cul
 #define	PCIC_ID_TI1451		0xac52104cul
-#define PCIC_ID_TI1510		0xac56104cul
-#define PCIC_ID_TI1515		0xac58104cul
-#define PCIC_ID_TI1520		0xac55104cul
-#define PCIC_ID_TI1530		0xac57104cul
-#define PCIC_ID_TI1620		0xac54104cul
+#define	PCIC_ID_TI1510		0xac56104cul
+#define	PCIC_ID_TI1515		0xac58104cul
+#define	PCIC_ID_TI1520		0xac55104cul
+#define	PCIC_ID_TI1530		0xac57104cul
+#define	PCIC_ID_TI1620		0xac54104cul
 #define	PCIC_ID_TI4410		0xac41104cul
 #define	PCIC_ID_TI4450		0xac40104cul
 #define	PCIC_ID_TI4451		0xac42104cul
-#define PCIC_ID_TI4510		0xac44104cul
-#define PCIC_ID_TI4520		0xac46104cul
-#define PCIC_ID_TI6411		0x8031104cul	/* PCI[67]x[12]1 */
-#define PCIC_ID_TI6420		0xac8d104cul	/* PCI[67]x20 Smartcard dis */
-#define PCIC_ID_TI6420SC	0xac8e104cul	/* PCI[67]x20 Smartcard en */
-#define PCIC_ID_TI7410		0xac49104cul
-#define PCIC_ID_TI7510		0xac47104cul
-#define PCIC_ID_TI7610		0xac48104cul
-#define PCIC_ID_TI7610M		0xac4a104cul
-#define PCIC_ID_TI7610SD	0xac4b104cul
-#define PCIC_ID_TI7610MS	0xac4c104cul
+#define	PCIC_ID_TI4510		0xac44104cul
+#define	PCIC_ID_TI4520		0xac46104cul
+#define	PCIC_ID_TI6411		0x8031104cul	/* PCI[67]x[12]1 */
+#define	PCIC_ID_TI6420		0xac8d104cul	/* PCI[67]x20 Smartcard dis */
+#define	PCIC_ID_TI6420SC	0xac8e104cul	/* PCI[67]x20 Smartcard en */
+#define	PCIC_ID_TI7410		0xac49104cul
+#define	PCIC_ID_TI7510		0xac47104cul
+#define	PCIC_ID_TI7610		0xac48104cul
+#define	PCIC_ID_TI7610M		0xac4a104cul
+#define	PCIC_ID_TI7610SD	0xac4b104cul
+#define	PCIC_ID_TI7610MS	0xac4c104cul
 #define	PCIC_ID_TOPIC95		0x06031179ul
 #define	PCIC_ID_TOPIC95B	0x060a1179ul
 #define	PCIC_ID_TOPIC97		0x060f1179ul

==== //depot/projects/hammer/sys/dev/rp/rp.c#19 (text+ko) ====

@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/rp/rp.c,v 1.69 2005/10/16 20:35:05 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/rp/rp.c,v 1.70 2005/11/08 15:33:39 jhb Exp $");
 
 /* 
  * rp.c - for RocketPort FreeBSD
@@ -826,7 +826,7 @@
 			rp->rp_cts = (ChanStatus & CTS_ACT) != 0;
 			line = (unit << 5) | (aiop << 3) | chan;
 			rp_table(line) = rp;
-			ttycreate(tp, TS_CALLOUT, "R%r", port);
+			ttycreate(tp, TS_CALLOUT, "R%r%r", unit, port);
 		}
 	}
 

==== //depot/projects/hammer/sys/dev/si/si_pci.c#6 (text+ko) ====

@@ -19,7 +19,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/si/si_pci.c,v 1.7 2005/03/01 08:58:04 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/si/si_pci.c,v 1.8 2005/11/08 04:11:50 rodrigc Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -33,6 +33,7 @@
 #include <dev/si/sireg.h>
 #include <dev/si/sivar.h>
 
+#include <dev/pci/pcireg.h>
 #include <dev/pci/pcivar.h>
 
 static int

==== //depot/projects/hammer/sys/kern/kern_exit.c#52 (text+ko) ====

@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_exit.c,v 1.270 2005/11/01 17:13:05 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_exit.c,v 1.272 2005/11/08 17:11:03 csjp Exp $");
 
 #include "opt_compat.h"
 #include "opt_ktrace.h"
@@ -118,7 +118,7 @@
 	struct ucred *tracecred;
 #endif
 	struct plimit *plim;
-	int refcnt;
+	int locked, refcnt;
 
 	/*
 	 * Drop Giant if caller has it.  Eventually we should warn about
@@ -173,6 +173,11 @@
 	}
 
 	p->p_flag |= P_WEXIT;
+
+	PROC_LOCK(p->p_pptr);
+	sigqueue_take(p->p_ksi);
+	PROC_UNLOCK(p->p_pptr);
+
 	PROC_UNLOCK(p);
 
 	/* Are we a task leader? */
@@ -298,13 +303,13 @@
 		    vm_map_max(&vm->vm_map));
 	}
 
-	mtx_lock(&Giant);	
 	sx_xlock(&proctree_lock);
 	if (SESS_LEADER(p)) {
 		struct session *sp;
 
 		sp = p->p_session;
 		if (sp->s_ttyvp) {
+			locked = VFS_LOCK_GIANT(sp->s_ttyvp->v_mount);
 			/*
 			 * Controlling process.
 			 * Signal foreground pgrp,
@@ -350,6 +355,7 @@
 			 * that the session once had a controlling terminal.
 			 * (for logging and informational purposes)
 			 */
+			VFS_UNLOCK_GIANT(locked);
 		}
 		SESS_LOCK(p->p_session);
 		sp->s_leader = NULL;
@@ -358,7 +364,6 @@
 	fixjobc(p, p->p_pgrp, 0);
 	sx_xunlock(&proctree_lock);
 	(void)acct_process(td);
-	mtx_unlock(&Giant);	
 #ifdef KTRACE
 	/*
 	 * release trace file
@@ -373,9 +378,9 @@
 	mtx_unlock(&ktrace_mtx);
 	PROC_UNLOCK(p);
 	if (tracevp != NULL) {
-		mtx_lock(&Giant);
+		locked = VFS_LOCK_GIANT(tracevp->v_mount);
 		vrele(tracevp);
-		mtx_unlock(&Giant);
+		VFS_UNLOCK_GIANT(locked);
 	}
 	if (tracecred != NULL)
 		crfree(tracecred);
@@ -385,9 +390,9 @@
 	 */
 	if ((vtmp = p->p_textvp) != NULL) {
 		p->p_textvp = NULL;
-		mtx_lock(&Giant);	
+		locked = VFS_LOCK_GIANT(vtmp->v_mount);
 		vrele(vtmp);
-		mtx_unlock(&Giant);	
+		VFS_UNLOCK_GIANT(locked);
 	}
 
 	/*
@@ -480,8 +485,12 @@
 
 	if (p->p_pptr == initproc)
 		psignal(p->p_pptr, SIGCHLD);
-	else if (p->p_sigparent != 0)
-		psignal(p->p_pptr, p->p_sigparent);
+	else if (p->p_sigparent != 0) {
+		if (p->p_sigparent == SIGCHLD)
+			childproc_exited(p);
+		else	/* LINUX thread */
+			psignal(p->p_pptr, p->p_sigparent);
+	}
 	PROC_UNLOCK(p->p_pptr);
 
 	/*
@@ -659,6 +668,10 @@
 				calcru(p, &rusage->ru_utime, &rusage->ru_stime);
 			}
 
+			PROC_LOCK(q);
+			sigqueue_take(p->p_ksi);
+			PROC_UNLOCK(q);
+
 			/*
 			 * If we got the child via a ptrace 'attach',
 			 * we need to give it back to the old parent.
@@ -669,7 +682,7 @@
 				p->p_oppid = 0;
 				proc_reparent(p, t);
 				PROC_UNLOCK(p);
-				psignal(t, SIGCHLD);
+				tdsignal(t, NULL, SIGCHLD, p->p_ksi);
 				wakeup(t);
 				PROC_UNLOCK(t);
 				sx_xunlock(&proctree_lock);
@@ -751,6 +764,11 @@
 			if (status)
 				*status = W_STOPCODE(p->p_xstat);
 			PROC_UNLOCK(p);
+
+			PROC_LOCK(q);
+			sigqueue_take(p->p_ksi);
+			PROC_UNLOCK(q);
+
 			return (0);
 		}
 		mtx_unlock_spin(&sched_lock);
@@ -760,6 +778,10 @@
 			p->p_flag &= ~P_CONTINUED;
 			PROC_UNLOCK(p);
 
+			PROC_LOCK(q);
+			sigqueue_take(p->p_ksi);
+			PROC_UNLOCK(q);
+
 			if (status)
 				*status = SIGCONT;
 			return (0);

==== //depot/projects/hammer/sys/kern/kern_proc.c#49 (text+ko) ====

@@ -27,11 +27,11 @@
  * SUCH DAMAGE.
  *
  *	@(#)kern_proc.c	8.7 (Berkeley) 2/14/95
- * $FreeBSD: src/sys/kern/kern_proc.c,v 1.233 2005/10/24 20:15:23 jhb Exp $
+ * $FreeBSD: src/sys/kern/kern_proc.c,v 1.234 2005/11/08 09:09:26 davidxu Exp $
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_proc.c,v 1.233 2005/10/24 20:15:23 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_proc.c,v 1.234 2005/11/08 09:09:26 davidxu Exp $");
 
 #include "opt_ktrace.h"
 #include "opt_kstack_pages.h"
@@ -165,6 +165,8 @@
 	 */
 	if (((p->p_flag & P_KTHREAD) != 0) && (td->td_altkstack != 0))
 		vm_thread_dispose_altkstack(td);
+	if (p->p_ksi != NULL)
+		KASSERT(! KSI_ONQ(p->p_ksi), ("SIGCHLD queue"));
 }
 
 /*
@@ -204,6 +206,8 @@
 	ksegrp_free(FIRST_KSEGRP_IN_PROC(p));
 	thread_free(FIRST_THREAD_IN_PROC(p));
 	mtx_destroy(&p->p_mtx);
+	if (p->p_ksi != NULL)
+		ksiginfo_free(p->p_ksi);
 #else
 	panic("proc reclaimed");
 #endif

==== //depot/projects/hammer/sys/kern/kern_sig.c#63 (text+ko) ====

@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_sig.c,v 1.311 2005/11/04 09:39:17 davidxu Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_sig.c,v 1.312 2005/11/08 09:09:26 davidxu Exp $");
 
 #include "opt_compat.h"
 #include "opt_ktrace.h"
@@ -214,10 +214,15 @@
 }
 
 ksiginfo_t *
-ksiginfo_alloc(void)
+ksiginfo_alloc(int wait)
 {
+	int flags;
+
+	flags = M_ZERO;
+	if (! wait)
+		flags |= M_NOWAIT;
 	if (ksiginfo_zone != NULL)
-		return ((ksiginfo_t *)uma_zalloc(ksiginfo_zone, M_NOWAIT | M_ZERO));
+		return ((ksiginfo_t *)uma_zalloc(ksiginfo_zone, flags));
 	return (NULL);
 }
 
@@ -291,7 +296,7 @@
 	struct proc	*p;
 	sigqueue_t	*sq;
 
-	if ((sq = ksi->ksi_sigq) == NULL)
+	if (ksi == NULL || (sq = ksi->ksi_sigq) == NULL)
 		return;
 
 	p = sq->sq_proc;
@@ -331,10 +336,10 @@
 	if (__predict_false(ksiginfo_zone == NULL))
 		goto out_set_bit;
 	
-	if (p != NULL && p->p_pendingcnt > max_pending_per_proc) {
+	if (p != NULL && p->p_pendingcnt >= max_pending_per_proc) {
 		signal_overflow++;
 		ret = EAGAIN;
-	} else if ((ksi = ksiginfo_alloc()) == NULL) {
+	} else if ((ksi = ksiginfo_alloc(0)) == NULL) {
 		signal_alloc_fail++;
 		ret = EAGAIN;
 	} else {
@@ -2106,7 +2111,12 @@
 			return (ret);
 		}
 		sigqueue_delete_proc(p, SIGCONT);
-		p->p_flag &= ~P_CONTINUED;
+		if (p->p_flag & P_CONTINUED) {
+			p->p_flag &= ~P_CONTINUED;
+			PROC_LOCK(p->p_pptr);
+			sigqueue_take(p->p_ksi);
+			PROC_UNLOCK(p->p_pptr);
+		}
 	}
 
 	ret = sigqueue_add(sigqueue, sig, ksi);
@@ -2174,7 +2184,10 @@
 			 * Otherwise, process goes back to sleep state.
 			 */
 			p->p_flag &= ~P_STOPPED_SIG;
-			p->p_flag |= P_CONTINUED;
+			if (p->p_numthreads == p->p_suspcount) {
+				p->p_flag |= P_CONTINUED;
+				childproc_continued(p);
+			}
 			if (action == SIG_DFL) {
 				sigqueue_delete(sigqueue, sig);
 			} else if (action == SIG_CATCH) {
@@ -2249,12 +2262,19 @@
 				    (td0->td_flags & TDF_SINTR) &&
 				    !TD_IS_SUSPENDED(td0)) {
 					thread_suspend_one(td0);
-				} else if (td != td0) {
+				} else {
 					td0->td_flags |= TDF_ASTPENDING;
 				}
 			}
-			thread_stopped(p);
 			if (p->p_numthreads == p->p_suspcount) {
+				/*
+				 * only thread sending signal to another
+				 * process can reach here, if thread is sending
+				 * signal to its process, because thread does
+				 * not suspend itself here, p_numthreads
+				 * should never be equal to p_suspcount.
+				 */
+				thread_stopped(p);
 				mtx_unlock_spin(&sched_lock);
 				sigqueue_delete_proc(p, p->p_xstat);
 			} else
@@ -2646,7 +2666,9 @@
 		mtx_lock(&ps->ps_mtx);
 		if ((ps->ps_flag & PS_NOCLDSTOP) == 0) {
 			mtx_unlock(&ps->ps_mtx);
-			psignal(p->p_pptr, SIGCHLD);
+			childproc_stopped(p,
+				(p->p_flag & P_TRACED) ?
+					CLD_TRAPPED : CLD_STOPPED);
 		} else
 			mtx_unlock(&ps->ps_mtx);
 		PROC_UNLOCK(p->p_pptr);
@@ -2826,6 +2848,61 @@
 	/* NOTREACHED */
 }
 
+/*
+ * Send queued SIGCHLD to parent when child process is stopped
+ * or exited.
+ */
+void
+childproc_stopped(struct proc *p, int reason)
+{
+	PROC_LOCK_ASSERT(p, MA_OWNED);
+	PROC_LOCK_ASSERT(p->p_pptr, MA_OWNED);
+
+	if (p->p_ksi != NULL) {
+		p->p_ksi->ksi_signo  = SIGCHLD;
+		p->p_ksi->ksi_code   = reason;
+		p->p_ksi->ksi_status = p->p_xstat;
+		p->p_ksi->ksi_pid    = p->p_pid;
+		p->p_ksi->ksi_uid    = p->p_ucred->cr_ruid;
+		if (KSI_ONQ(p->p_ksi))
+			return;
+	}
+	tdsignal(p->p_pptr, NULL, SIGCHLD, p->p_ksi);
+}
+
+void
+childproc_continued(struct proc *p)
+{
+	PROC_LOCK_ASSERT(p, MA_OWNED);
+	PROC_LOCK_ASSERT(p->p_pptr, MA_NOTOWNED);
+
+	PROC_LOCK(p->p_pptr);
+	if (p->p_ksi != NULL) {
+		p->p_ksi->ksi_signo  = SIGCHLD;
+		p->p_ksi->ksi_code   = CLD_CONTINUED; 
+		p->p_ksi->ksi_status = SIGCONT;
+		p->p_ksi->ksi_pid    = p->p_pid;
+		p->p_ksi->ksi_uid    = p->p_ucred->cr_ruid;
+		if (KSI_ONQ(p->p_ksi))
+			return;
+	}
+	tdsignal(p->p_pptr, NULL, SIGCHLD, p->p_ksi);
+	PROC_UNLOCK(p->p_pptr);
+}
+
+void
+childproc_exited(struct proc *p)
+{
+	int reason;
+
+	reason = CLD_EXITED;
+	if (WCOREDUMP(p->p_xstat))
+		reason = CLD_DUMPED;
+	else if (WIFSIGNALED(p->p_xstat))
+		reason = CLD_KILLED;	
+	childproc_stopped(p, reason);
+}
+
 static char corefilename[MAXPATHLEN] = {"%N.core"};
 SYSCTL_STRING(_kern, OID_AUTO, corefile, CTLFLAG_RW, corefilename,
 	      sizeof(corefilename), "process corefile name format string");

==== //depot/projects/hammer/sys/kern/kern_thread.c#83 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_thread.c,v 1.221 2005/11/03 01:34:08 davidxu Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_thread.c,v 1.222 2005/11/08 09:09:26 davidxu Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -78,6 +78,12 @@
 struct mtx kse_zombie_lock;
 MTX_SYSINIT(kse_zombie_lock, &kse_zombie_lock, "kse zombie lock", MTX_SPIN);
 
+static int queue_sigchild = 0;
+SYSCTL_DECL(_kern_sigqueue);
+SYSCTL_INT(_kern_sigqueue, OID_AUTO, queue_sigchild, CTLFLAG_RD,
+    &queue_sigchild, 0, "queue SIGCHILD");
+TUNABLE_INT("kern.sigqueue.queue_sigchild", &queue_sigchild);
+
 static int
 sysctl_kse_virtual_cpu(SYSCTL_HANDLER_ARGS)
 {
@@ -278,6 +284,15 @@
 	TAILQ_INIT(&p->p_threads);	     /* all threads in proc */
 	TAILQ_INIT(&p->p_suspended);	     /* Threads suspended */
 	sigqueue_init(&p->p_sigqueue, p);
+	if (queue_sigchild) {
+		p->p_ksi = ksiginfo_alloc(1);
+		if (p->p_ksi != NULL) {
+			/* p_ksi may be null if ksiginfo zone is not ready */
+			p->p_ksi->ksi_flags = KSI_EXT | KSI_INS;
+		}

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


More information about the p4-projects mailing list