PERFORCE change 129472 for review

John Birrell jb at FreeBSD.org
Sat Nov 24 14:34:42 PST 2007


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

Change 129472 by jb at jb_freebsd1 on 2007/11/24 22:34:05

	IF7

Affected files ...

.. //depot/projects/dtrace7/src/Makefile#2 integrate
.. //depot/projects/dtrace7/src/ObsoleteFiles.inc#2 integrate
.. //depot/projects/dtrace7/src/etc/mtree/BSD.usr.dist#2 integrate
.. //depot/projects/dtrace7/src/etc/sendmail/freebsd.mc#2 integrate
.. //depot/projects/dtrace7/src/etc/sendmail/freebsd.submit.mc#2 integrate
.. //depot/projects/dtrace7/src/gnu/lib/libobjc/Makefile#2 integrate
.. //depot/projects/dtrace7/src/gnu/usr.bin/gdb/kgdb/kgdb.h#2 integrate
.. //depot/projects/dtrace7/src/gnu/usr.bin/gdb/kgdb/kthr.c#2 integrate
.. //depot/projects/dtrace7/src/gnu/usr.bin/gdb/kgdb/trgt_i386.c#2 integrate
.. //depot/projects/dtrace7/src/kerberos5/lib/Makefile.inc#2 integrate
.. //depot/projects/dtrace7/src/lib/libgssapi/Makefile#2 integrate
.. //depot/projects/dtrace7/src/lib/libsdp/search.c#2 integrate
.. //depot/projects/dtrace7/src/release/picobsd/bridge/PICOBSD#2 integrate
.. //depot/projects/dtrace7/src/release/picobsd/bridge/crunch.conf#2 integrate
.. //depot/projects/dtrace7/src/release/picobsd/build/Makefile.conf#2 integrate
.. //depot/projects/dtrace7/src/release/picobsd/build/picobsd#2 integrate
.. //depot/projects/dtrace7/src/release/picobsd/tinyware/login/Makefile#2 integrate
.. //depot/projects/dtrace7/src/sbin/geom/class/journal/gjournal.8#2 integrate
.. //depot/projects/dtrace7/src/sys/amd64/amd64/db_trace.c#2 integrate
.. //depot/projects/dtrace7/src/sys/amd64/amd64/exception.S#2 integrate
.. //depot/projects/dtrace7/src/sys/amd64/amd64/machdep.c#2 integrate
.. //depot/projects/dtrace7/src/sys/amd64/amd64/trap.c#2 integrate
.. //depot/projects/dtrace7/src/sys/boot/i386/cdboot/cdboot.s#2 integrate
.. //depot/projects/dtrace7/src/sys/boot/pc98/cdboot/cdboot.s#2 integrate
.. //depot/projects/dtrace7/src/sys/dev/an/if_an.c#2 integrate
.. //depot/projects/dtrace7/src/sys/dev/an/if_anreg.h#2 integrate
.. //depot/projects/dtrace7/src/sys/dev/ata/ata-all.h#2 integrate
.. //depot/projects/dtrace7/src/sys/dev/ata/ata-chipset.c#2 integrate
.. //depot/projects/dtrace7/src/sys/dev/ata/ata-dma.c#2 integrate
.. //depot/projects/dtrace7/src/sys/dev/ata/ata-pci.c#2 integrate
.. //depot/projects/dtrace7/src/sys/dev/ata/ata-pci.h#2 integrate
.. //depot/projects/dtrace7/src/sys/dev/ata/atapi-cd.c#2 integrate
.. //depot/projects/dtrace7/src/sys/dev/ata/atapi-fd.c#2 integrate
.. //depot/projects/dtrace7/src/sys/dev/ata/atapi-tape.c#2 integrate
.. //depot/projects/dtrace7/src/sys/dev/nfe/if_nfe.c#2 integrate
.. //depot/projects/dtrace7/src/sys/fs/tmpfs/tmpfs_vfsops.c#2 integrate
.. //depot/projects/dtrace7/src/sys/kern/kern_proc.c#3 integrate
.. //depot/projects/dtrace7/src/sys/net80211/ieee80211.h#2 integrate
.. //depot/projects/dtrace7/src/sys/netgraph/netgraph.h#2 integrate
.. //depot/projects/dtrace7/src/sys/netgraph/ng_base.c#2 integrate
.. //depot/projects/dtrace7/src/sys/netinet/tcp_syncache.c#2 integrate
.. //depot/projects/dtrace7/src/sys/netipsec/keysock.c#2 integrate
.. //depot/projects/dtrace7/src/sys/sys/mutex.h#2 integrate
.. //depot/projects/dtrace7/src/usr.bin/write/write.c#2 integrate
.. //depot/projects/dtrace7/src/usr.sbin/bluetooth/sdpcontrol/search.c#2 integrate
.. //depot/projects/dtrace7/src/usr.sbin/freebsd-update/freebsd-update.sh#2 integrate
.. //depot/projects/dtrace7/src/usr.sbin/wpa/hostapd/Makefile#2 integrate
.. //depot/projects/dtrace7/src/usr.sbin/wpa/wpa_supplicant/Makefile#2 integrate

Differences ...

==== //depot/projects/dtrace7/src/Makefile#2 (text+ko) ====

@@ -1,5 +1,5 @@
 #
-# $FreeBSD: src/Makefile,v 1.341 2007/05/16 08:46:35 des Exp $
+# $FreeBSD: src/Makefile,v 1.341.2.1 2007/11/22 01:33:08 delphij Exp $
 #
 # The user-driven targets are:
 #
@@ -147,14 +147,14 @@
 .if ${.CURDIR} == ${.OBJDIR} || ${.CURDIR}/obj == ${.OBJDIR}
 .if exists(${BW_CANONICALOBJDIR}/)
 	-rm -rf ${BW_CANONICALOBJDIR}/*
-	chflags -R 0 ${BW_CANONICALOBJDIR}
+	-chflags -R 0 ${BW_CANONICALOBJDIR}
 	rm -rf ${BW_CANONICALOBJDIR}/*
 .endif
 	#   To be safe in this case, fall back to a 'make cleandir'
 	${_+_}@cd ${.CURDIR}; ${_MAKE} cleandir
 .else
 	-rm -rf ${.OBJDIR}/*
-	chflags -R 0 ${.OBJDIR}
+	-chflags -R 0 ${.OBJDIR}
 	rm -rf ${.OBJDIR}/*
 .endif
 

==== //depot/projects/dtrace7/src/ObsoleteFiles.inc#2 (text+ko) ====

@@ -1,5 +1,5 @@
 #
-# $FreeBSD: src/ObsoleteFiles.inc,v 1.112.2.3 2007/10/30 11:40:26 bushman Exp $
+# $FreeBSD: src/ObsoleteFiles.inc,v 1.112.2.4 2007/11/22 21:25:17 delphij Exp $
 #
 # This file lists old files (OLD_FILES), libraries (OLD_LIBS) and
 # directories (OLD_DIRS) which should get removed at an update. Recently
@@ -3953,6 +3953,20 @@
 #  - usr/share/tmac/mm/locale
 #  - usr/share/tmac/mm/se_locale
 #  - var/yp/Makefile
+
+# 20071120: shared library version bump
+OLD_LIBS+=usr/lib/libasn1.so.8
+OLD_LIBS+=usr/lib/libgssapi.so.8
+OLD_LIBS+=usr/lib/libhdb.so.8
+OLD_LIBS+=usr/lib/libkadm5clnt.so.8
+OLD_LIBS+=usr/lib/libkadm5srv.so.8
+OLD_LIBS+=usr/lib/libkafs5.so.8
+OLD_LIBS+=usr/lib/libkrb5.so.8
+OLD_LIBS+=usr/lib/libobjc.so.2
+.if ${TARGET_ARCH} == "amd64"
+OLD_LIBS+=usr/lib32/libgssapi.so.8
+OLD_LIBS+=usr/lib32/libobjc.so.2
+.endif
 # 20070519: GCC 4.2
 OLD_LIBS+=usr/lib/libg2c.a
 OLD_LIBS+=usr/lib/libg2c.so

==== //depot/projects/dtrace7/src/etc/mtree/BSD.usr.dist#2 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/etc/mtree/BSD.usr.dist,v 1.329 2007/07/25 13:37:33 scottl Exp $
+# $FreeBSD: src/etc/mtree/BSD.usr.dist,v 1.329.2.1 2007/11/21 06:04:54 sam Exp $
 #
 # Please see the file src/etc/mtree/README before making changes to this file.
 #
@@ -212,6 +212,8 @@
             ..
             find_interface
             ..
+            hostapd
+            ..
             ibcs2
             ..
             ipfilter
@@ -304,6 +306,8 @@
             ..
             tcsh
             ..
+            wpa_supplicant
+            ..
         ..
         games
             fortune

==== //depot/projects/dtrace7/src/etc/sendmail/freebsd.mc#2 (text+ko) ====

@@ -44,7 +44,7 @@
 #
 
 divert(0)
-VERSIONID(`$FreeBSD: src/etc/sendmail/freebsd.mc,v 1.34 2007/04/23 22:23:54 gshapiro Exp $')
+VERSIONID(`$FreeBSD: src/etc/sendmail/freebsd.mc,v 1.34.2.1 2007/11/22 16:19:40 gshapiro Exp $')
 OSTYPE(freebsd6)
 DOMAIN(generic)
 

==== //depot/projects/dtrace7/src/etc/sendmail/freebsd.submit.mc#2 (text+ko) ====

@@ -16,7 +16,7 @@
 #
 
 divert(0)dnl
-VERSIONID(`$FreeBSD: src/etc/sendmail/freebsd.submit.mc,v 1.5 2007/04/23 22:23:54 gshapiro Exp $')
+VERSIONID(`$FreeBSD: src/etc/sendmail/freebsd.submit.mc,v 1.5.2.1 2007/11/22 16:19:40 gshapiro Exp $')
 define(`confCF_VERSION', `Submit')dnl
 define(`__OSTYPE__',`')dnl dirty hack to keep proto.m4 from complaining
 define(`_USE_DECNET_SYNTAX_', `1')dnl support DECnet

==== //depot/projects/dtrace7/src/gnu/lib/libobjc/Makefile#2 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/gnu/lib/libobjc/Makefile,v 1.31.2.1 2007/10/12 12:57:39 rafan Exp $
+# $FreeBSD: src/gnu/lib/libobjc/Makefile,v 1.31.2.2 2007/11/20 20:48:01 kensmith Exp $
 
 OBJCDIR=${.CURDIR}/../../../contrib/libobjc
 GCCDIR=	${.CURDIR}/../../../contrib/gcc
@@ -7,7 +7,7 @@
 .PATH: ${OBJCDIR}/objc ${OBJCDIR}
 
 LIB=		objc
-SHLIB_MAJOR=	2
+SHLIB_MAJOR=	3
 
 SRCS=	archive.c class.c encoding.c gc.c hash.c init.c linking.m misc.c \
 	nil_method.c NXConstStr.m Object.m objects.c Protocol.m sarray.c \

==== //depot/projects/dtrace7/src/gnu/usr.bin/gdb/kgdb/kgdb.h#2 (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/gnu/usr.bin/gdb/kgdb/kgdb.h,v 1.5 2007/05/19 03:23:43 kan Exp $
+ * $FreeBSD: src/gnu/usr.bin/gdb/kgdb/kgdb.h,v 1.5.2.1 2007/11/21 16:43:46 jhb Exp $
  */
 
 #ifndef _KGDB_H_
@@ -41,6 +41,7 @@
 	uintptr_t	pcb;
 	int		tid;
 	int		pid;
+	u_char		cpu;
 };
 
 extern struct kthr *curkthr;

==== //depot/projects/dtrace7/src/gnu/usr.bin/gdb/kgdb/kthr.c#2 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/gnu/usr.bin/gdb/kgdb/kthr.c,v 1.7 2007/03/01 13:55:15 kib Exp $");
+__FBSDID("$FreeBSD: src/gnu/usr.bin/gdb/kgdb/kthr.c,v 1.7.2.1 2007/11/21 16:43:46 jhb Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -129,6 +129,7 @@
 			kt->tid = td.td_tid;
 			kt->pid = p.p_pid;
 			kt->paddr = paddr;
+			kt->cpu = td.td_oncpu;
 			first = kt;
 			addr = (uintptr_t)TAILQ_NEXT(&td, td_plist);
 		}

==== //depot/projects/dtrace7/src/gnu/usr.bin/gdb/kgdb/trgt_i386.c#2 (text+ko) ====

@@ -25,11 +25,14 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/gnu/usr.bin/gdb/kgdb/trgt_i386.c,v 1.6 2007/03/01 13:56:08 kib Exp $");
+__FBSDID("$FreeBSD: src/gnu/usr.bin/gdb/kgdb/trgt_i386.c,v 1.6.2.1 2007/11/21 16:43:46 jhb Exp $");
 
-#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/proc.h>
 #include <machine/pcb.h>
 #include <machine/frame.h>
+#include <machine/segments.h>
+#include <machine/tss.h>
 #include <err.h>
 #include <kvm.h>
 #include <string.h>
@@ -71,6 +74,152 @@
 	fprintf_unfiltered(gdb_stderr, "XXX: %s\n", __func__);
 }
 
+struct kgdb_tss_cache {
+	CORE_ADDR	pc;
+	CORE_ADDR	sp;
+	CORE_ADDR	tss;
+};
+
+static int kgdb_trgt_tss_offset[15] = {
+	offsetof(struct i386tss, tss_eax),
+	offsetof(struct i386tss, tss_ecx),
+	offsetof(struct i386tss, tss_edx),
+	offsetof(struct i386tss, tss_ebx),
+	offsetof(struct i386tss, tss_esp),
+	offsetof(struct i386tss, tss_ebp),
+	offsetof(struct i386tss, tss_esi),
+	offsetof(struct i386tss, tss_edi),
+	offsetof(struct i386tss, tss_eip),
+	offsetof(struct i386tss, tss_eflags),
+	offsetof(struct i386tss, tss_cs),
+	offsetof(struct i386tss, tss_ss),
+	offsetof(struct i386tss, tss_ds),
+	offsetof(struct i386tss, tss_es),
+	offsetof(struct i386tss, tss_fs)
+};
+
+/*
+ * If the current thread is executing on a CPU, fetch the common_tss
+ * for that CPU.
+ *
+ * This is painful because 'struct pcpu' is variant sized, so we can't
+ * use it.  Instead, we lookup the GDT selector for this CPU and
+ * extract the base of the TSS from there.
+ */
+static CORE_ADDR
+kgdb_trgt_fetch_tss(void)
+{
+	struct kthr *kt;
+	struct segment_descriptor sd;
+	uintptr_t addr, cpu0prvpage, tss;
+
+	kt = kgdb_thr_lookup_tid(ptid_get_tid(inferior_ptid));
+	if (kt == NULL || kt->cpu == NOCPU)
+		return (0);
+
+	addr = kgdb_lookup("_gdt");
+	if (addr == 0)
+		return (0);
+	addr += (kt->cpu * NGDT + GPROC0_SEL) * sizeof(sd);
+	if (kvm_read(kvm, addr, &sd, sizeof(sd)) != sizeof(sd)) {
+		warnx("kvm_read: %s", kvm_geterr(kvm));
+		return (0);
+	}
+	if (sd.sd_type != SDT_SYS386BSY) {
+		warnx("descriptor is not a busy TSS");
+		return (0);
+	}
+	tss = sd.sd_hibase << 24 | sd.sd_lobase;
+
+	/*
+	 * In SMP kernels, the TSS is stored as part of the per-CPU
+	 * data.  On older kernels, the CPU0's private page
+	 * is stored at an address that isn't mapped in minidumps.
+	 * However, the data is mapped at the alternate cpu0prvpage
+	 * address.  Thus, if the TSS is at the invalid address,
+	 * change it to be relative to cpu0prvpage instead.
+	 */ 
+	if (trunc_page(tss) == 0xffc00000) {
+		addr = kgdb_lookup("_cpu0prvpage");
+		if (addr == 0)
+			return (0);
+		if (kvm_read(kvm, addr, &cpu0prvpage, sizeof(cpu0prvpage)) !=
+		    sizeof(cpu0prvpage)) {
+			warnx("kvm_read: %s", kvm_geterr(kvm));
+			return (0);
+		}
+		tss = cpu0prvpage + (tss & PAGE_MASK);
+	}
+	return ((CORE_ADDR)tss);
+}
+
+static struct kgdb_tss_cache *
+kgdb_trgt_tss_cache(struct frame_info *next_frame, void **this_cache)
+{
+	char buf[MAX_REGISTER_SIZE];
+	struct kgdb_tss_cache *cache;
+
+	cache = *this_cache;
+	if (cache == NULL) {
+		cache = FRAME_OBSTACK_ZALLOC(struct kgdb_tss_cache);
+		*this_cache = cache;
+		cache->pc = frame_func_unwind(next_frame);
+		frame_unwind_register(next_frame, SP_REGNUM, buf);
+		cache->sp = extract_unsigned_integer(buf,
+		    register_size(current_gdbarch, SP_REGNUM));
+		cache->tss = kgdb_trgt_fetch_tss();
+	}
+	return (cache);
+}
+
+static void
+kgdb_trgt_dblfault_this_id(struct frame_info *next_frame, void **this_cache,
+    struct frame_id *this_id)
+{
+	struct kgdb_tss_cache *cache;
+
+	cache = kgdb_trgt_tss_cache(next_frame, this_cache);
+	*this_id = frame_id_build(cache->sp, cache->pc);
+}
+
+static void
+kgdb_trgt_dblfault_prev_register(struct frame_info *next_frame,
+    void **this_cache, int regnum, int *optimizedp, enum lval_type *lvalp,
+    CORE_ADDR *addrp, int *realnump, void *valuep)
+{
+	char dummy_valuep[MAX_REGISTER_SIZE];
+	struct kgdb_tss_cache *cache;
+	int ofs, regsz;
+
+	regsz = register_size(current_gdbarch, regnum);
+
+	if (valuep == NULL)
+		valuep = dummy_valuep;
+	memset(valuep, 0, regsz);
+	*optimizedp = 0;
+	*addrp = 0;
+	*lvalp = not_lval;
+	*realnump = -1;
+
+	ofs = (regnum >= I386_EAX_REGNUM && regnum <= I386_FS_REGNUM)
+	    ? kgdb_trgt_tss_offset[regnum] : -1;
+	if (ofs == -1)
+		return;
+
+	cache = kgdb_trgt_tss_cache(next_frame, this_cache);
+	if (cache->tss == 0)
+		return;
+	*addrp = cache->tss + ofs;
+	*lvalp = lval_memory;
+	target_read_memory(*addrp, valuep, regsz);
+}
+
+static const struct frame_unwind kgdb_trgt_dblfault_unwind = {
+        UNKNOWN_FRAME,
+        &kgdb_trgt_dblfault_this_id,
+        &kgdb_trgt_dblfault_prev_register
+};
+
 struct kgdb_frame_cache {
 	int		intrframe;
 	CORE_ADDR	pc;
@@ -194,6 +343,8 @@
 	find_pc_partial_function(pc, &pname, NULL, NULL);
 	if (pname == NULL)
 		return (NULL);
+	if (strcmp(pname, "dblfault_handler") == 0)
+		return (&kgdb_trgt_dblfault_unwind);
 	if (strcmp(pname, "calltrap") == 0 ||
 	    (pname[0] == 'X' && pname[1] != '_'))
 		return (&kgdb_trgt_trapframe_unwind);

==== //depot/projects/dtrace7/src/kerberos5/lib/Makefile.inc#2 (text+ko) ====

@@ -1,5 +1,5 @@
-# $FreeBSD: src/kerberos5/lib/Makefile.inc,v 1.7 2005/07/22 17:18:58 kensmith Exp $
+# $FreeBSD: src/kerberos5/lib/Makefile.inc,v 1.7.2.1 2007/11/20 20:48:01 kensmith Exp $
 
-SHLIB_MAJOR?=	8
+SHLIB_MAJOR?=	9
 
 .include "../Makefile.inc"

==== //depot/projects/dtrace7/src/lib/libgssapi/Makefile#2 (text+ko) ====

@@ -1,7 +1,7 @@
-# $FreeBSD: src/lib/libgssapi/Makefile,v 1.2 2006/01/01 11:01:01 dfr Exp $
+# $FreeBSD: src/lib/libgssapi/Makefile,v 1.2.2.1 2007/11/20 20:48:01 kensmith Exp $
 
 LIB=		gssapi
-SHLIB_MAJOR=	8
+SHLIB_MAJOR=	9
 
 SRCS=
 SRCS+=		gss_utils.c

==== //depot/projects/dtrace7/src/lib/libsdp/search.c#2 (text+ko) ====

@@ -26,7 +26,7 @@
  * SUCH DAMAGE.
  *
  * $Id: search.c,v 1.2 2003/09/04 22:12:13 max Exp $
- * $FreeBSD: src/lib/libsdp/search.c,v 1.7 2004/12/09 18:57:12 emax Exp $
+ * $FreeBSD: src/lib/libsdp/search.c,v 1.7.10.1 2007/11/21 17:36:14 emax Exp $
  */
 
 #include <sys/uio.h>
@@ -204,15 +204,18 @@
 			return (-1);
 		}
 
+		rsp += xpdu.len;
+		ss->tid ++;
+
 		/* Save continuation state (if any) */
-		ss->cslen = rsp[xpdu.len];
+		ss->cslen = rsp[0];
 		if (ss->cslen > 0) {
 			if (ss->cslen > sizeof(ss->cs)) {
 				ss->error = ENOBUFS;
 				return (-1);
 			}
 
-			memcpy(ss->cs, rsp + xpdu.len + 1, ss->cslen);
+			memcpy(ss->cs, rsp + 1, ss->cslen);
 
 			/*
 			 * Ensure that we always have ss->imtu bytes
@@ -236,9 +239,6 @@
 				rsp = ss->rsp + offset;
 			}
 		}
-
-		rsp += xpdu.len;
-		ss->tid ++;
 	} while (ss->cslen > 0);
 
 	/*

==== //depot/projects/dtrace7/src/release/picobsd/bridge/PICOBSD#2 (text+ko) ====

@@ -1,5 +1,5 @@
 #
-# $FreeBSD: src/release/picobsd/bridge/PICOBSD,v 1.19 2006/09/18 06:34:51 marck Exp $
+# $FreeBSD: src/release/picobsd/bridge/PICOBSD,v 1.19.2.1 2007/11/21 07:20:10 luigi Exp $
 #
 # Line starting with #PicoBSD contains PicoBSD build parameters
 #marker         def_sz  init    MFS_inodes      floppy_inodes
@@ -7,7 +7,6 @@
 options MD_ROOT_SIZE=3200      # same as def_sz
 
 hints	"PICOBSD.hints"
-machine		i386
 cpu		I486_CPU
 cpu		I586_CPU
 cpu		I686_CPU

==== //depot/projects/dtrace7/src/release/picobsd/bridge/crunch.conf#2 (text+ko) ====

@@ -1,5 +1,5 @@
 #
-# $FreeBSD: src/release/picobsd/bridge/crunch.conf,v 1.21 2006/11/22 00:33:19 rodrigc Exp $
+# $FreeBSD: src/release/picobsd/bridge/crunch.conf,v 1.21.2.1 2007/11/21 07:20:10 luigi Exp $
 #
 # configuration file for "bridge" floppy.
 # Depending on your needs, almost surely you will need to
@@ -177,6 +177,6 @@
 libs -lufs     # used by mount
 ### ee uses ncurses instead of curses
 libs -ledit -lutil -lmd -lcrypt -lmp -lm -lkvm
-libs -lmytinfo -lz -lpcap -lwrap
+libs -lz -lpcap -lwrap
 libs -ltermcap -lgnuregex # -lcurses
 libs -lgeom

==== //depot/projects/dtrace7/src/release/picobsd/build/Makefile.conf#2 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/release/picobsd/build/Makefile.conf,v 1.18 2001/11/01 16:17:37 luigi Exp $
+# $FreeBSD: src/release/picobsd/build/Makefile.conf,v 1.18.24.1 2007/11/21 07:20:10 luigi Exp $
 #
 # Makefile for building PICOBSD kernels and running crunchgen
 #
@@ -9,6 +9,7 @@
 # When building a kernel, also need ${name} from the environment
 # and CONFIG may indicate an alternate config program
 
+BINMAKE?=make
 SRC?=/usr/src
 CONFIG?=config
 MODULES?=-DNO_MODULES	# do not build them as a default
@@ -38,11 +39,11 @@
 ${KERNFILE}: ${COMPILE} do_a_make_in_the_kernel_directory_anyways
 
 do_a_make_in_the_kernel_directory_anyways:
-	(cd ${COMPILE}; make KERNEL=kernel ${MODULES} )
+	(cd ${COMPILE}; ${BINMAKE} KERNEL=kernel ${MODULES} )
 
 ${COMPILE}: ${CONF}/${CONFFILE}
 	(cd ${CONF}; ${CONFIG} -d ${COMPILE} ${CONFFILE}; \
-	cd ${COMPILE}; make KERNEL=kernel ${MODULES} depend )
+	cd ${COMPILE}; ${BINMAKE} KERNEL=kernel ${MODULES} depend )
 
 ${CONF}/${CONFFILE}: PICOBSD
 	# -mkdir -p ${CONF}		# XXX not needed yet.

==== //depot/projects/dtrace7/src/release/picobsd/build/picobsd#2 (text+ko) ====

@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-# $FreeBSD: src/release/picobsd/build/picobsd,v 1.39 2006/05/17 09:33:06 phk Exp $
+# $FreeBSD: src/release/picobsd/build/picobsd,v 1.39.2.1 2007/11/21 07:20:10 luigi Exp $
 # This file requires sysutils/makefs to run
 #
 # The new PicoBSD build script. Invoked as
@@ -282,8 +282,9 @@
     if [ ${OSVERSION} -ge 500035 ] ; then
 	MAKEOBJDIRPREFIX=${l_objtree}
 	export MAKEOBJDIRPREFIX
+	eval "export BINMAKE=\"`cd ${SRC}; make -f Makefile -V BINMAKE`\""
 	log `cd ${SRC}; make -f Makefile.inc1 -V WMAKEENV`
-	eval export `cd ${SRC}; make -f Makefile.inc1 -V WMAKEENV`
+	eval export `cd ${SRC}; ${BINMAKE} -f Makefile.inc1 -V WMAKEENV`
     fi
     # create build directory and subtree
     mkdir -p ${BUILDDIR}/crunch
@@ -463,7 +464,7 @@
 		MODULES=""
 		export MODULES
 	fi
-	make -m ${SRC}/share/mk -v -f ${PICO_TREE}/build/Makefile.conf ) || \
+	${BINMAKE} -v -f ${PICO_TREE}/build/Makefile.conf ) || \
 	fail $? missing_kernel
 }
 
@@ -491,8 +492,8 @@
 
     excl=${MY_TREE}/floppy.tree.exclude
     if [ -f ${excl} ] ; then
+	log "Files excluded from generic tree: `echo;cat ${excl}`"
 	excl="--exclude-from ${excl}"
-	log "Files excluded from generic tree: `echo;cat ${excl}`"
     else
 	excl=""
     fi
@@ -561,13 +562,13 @@
     log "Making and installing crunch1 from `pwd` src ${SRC}..."
     a=${BUILDDIR}/crunch1.conf
     ( export BUILDDIR SRC MY_TREE PICO_OBJ ;
-	make -m ${SRC}/share/mk \
+	${BINMAKE} \
 		-v -f ${PICO_TREE}/build/Makefile.conf ${BUILDDIR}/crunch.mk )
     log "Libs are ${LIBS} "
     export SRC # used by crunch.mk
     # export LIBS CFLAGS
     log "Now make -f crunch.mk"
-    make -m ${SRC}/share/mk ${o_makeopts} -f ${BUILDDIR}/crunch.mk
+    ${BINMAKE} ${o_makeopts} -f ${BUILDDIR}/crunch.mk
     strip --remove-section=.note --remove-section=.comment crunch1
     mv crunch1 ${dst}/stand/crunch
     chmod 555 ${dst}/stand/crunch

==== //depot/projects/dtrace7/src/release/picobsd/tinyware/login/Makefile#2 (text+ko) ====

@@ -1,15 +1,15 @@
 # From:	@(#)Makefile	8.1 (Berkeley) 7/19/93
-# $FreeBSD: src/release/picobsd/tinyware/login/Makefile,v 1.5 2006/03/17 18:54:30 ru Exp $
+# $FreeBSD: src/release/picobsd/tinyware/login/Makefile,v 1.5.2.1 2007/11/21 07:20:11 luigi Exp $
 
 .include <bsd.own.mk>
 
 .PATH: ${.CURDIR}/../../../../usr.bin/login
 
 PROG=	login
-SRCS=	pico-login.c login_access.c login_fbtab.c
-MAN=	login.1 login.access.5
+SRCS=	pico-login.c login_fbtab.c
+MAN=	login.1
 
-CFLAGS+=-DLOGIN_ACCESS -DLOGALL
+CFLAGS+=-DLOGALL
 
 DPADD=	${LIBUTIL} ${LIBCRYPT}
 LDADD=	-lutil -lcrypt

==== //depot/projects/dtrace7/src/sbin/geom/class/journal/gjournal.8#2 (text+ko) ====

@@ -22,9 +22,9 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/sbin/geom/class/journal/gjournal.8,v 1.1 2007/01/29 22:12:22 pjd Exp $
+.\" $FreeBSD: src/sbin/geom/class/journal/gjournal.8,v 1.1.2.1 2007/11/20 07:32:54 ru Exp $
 .\"
-.Dd December 5, 2006
+.Dd November 14, 2007
 .Dt GJOURNAL 8
 .Os
 .Sh NAME
@@ -33,7 +33,7 @@
 .Sh SYNOPSIS
 .Nm
 .Cm label
-.Op Fl fhv
+.Op Fl cfhv
 .Op Fl s Ar jsize
 .Ar dataprov
 .Op Ar jprov
@@ -66,31 +66,31 @@
 The Journal and data may be stored on the same provider or on two separate
 providers.
 This is block level journaling, not file system level journaling, which means
-.Nm
-everything gets logged, e.g.: for file systems, it journals both data and
+everything gets logged, e.g.\& for file systems, it journals both data and
 metadata.
 The
 .Nm
 GEOM class can talk to file systems, which allows the use of
 .Nm
 for file system journaling and to keep file systems in a consistent state.
-At this time, only UFS file systems are supported.
+At this time, only UFS file system is supported.
 .Pp
-.\" XXX This next sentence needs fixed, it's a run on.
-To configure journaling via
+To configure journaling on the UFS file system using
+.Nm ,
+one should first create a
 .Nm
-for the UFS file system, one should create a gjournaled provider using the
+provider using the
 .Nm
-utility with the
-.Fl J
-flag for
+utility, then run
 .Xr newfs 8
 or
 .Xr tunefs 8
-which instructs UFS to cooperate with the
+on it with the
+.Fl J
+flag which instructs UFS to cooperate with the
 .Nm
 provider below.
-There are important differences in how gjournaled UFS works.
+There are important differences in how journaled UFS works.
 The most important one is that
 .Xr sync 2
 and
@@ -111,17 +111,17 @@
 When
 .Nm
 is configured on top of
-.Nm gmirror
+.Xr gmirror 8
 or
-.Nm graid3
+.Xr graid3 8
 providers, it also keeps them in a consistent state, thus
 automatic synchronization on power failure or system crash may be disabled
 on those providers.
 .Pp
 The
 .Nm
-utility uses on-disk metadata, stored in the provider's last sector, to store all needed
-information.
+utility uses on-disk metadata, stored in the provider's last sector,
+to store all needed information.
 This could be a problem when an existing file system is converted to use
 .Nm .
 .Pp
@@ -133,18 +133,20 @@
 Configures
 .Nm
 on the given provider(s).
-If only one provider is given, both data and journal is stored on the same
+If only one provider is given, both data and journal are stored on the same
 provider.
 If two providers are given, the first one will be used as data provider and the
 second will be used as the journal provider.
 .Pp
 Additional options include:
 .Bl -tag -width ".Fl s Ar jsize"
+.It Fl c
+Checksum journal records.
 .It Fl f
 May be used to convert an existing file system to use
 .Nm ,
-but only if the journal will be configured on a separate provider and if the last
-sector in the data provider is not used by the existing file system.
+but only if the journal will be configured on a separate provider and if the
+last sector in the data provider is not used by the existing file system.
 If
 .Nm
 detects that the last sector is used, it will refuse to overwrite it
@@ -155,7 +157,7 @@
 .Nm
 to overwrite the last sector.
 .It Fl h
-Hardcode provider names in meta-data.
+Hardcode provider names in metadata.
 .It Fl s Ar jsize
 Specifies size of the journal if only one provider is used for both data and
 journal.
@@ -166,7 +168,7 @@
 for small file systems (e.g.: only few gigabytes big).
 .El
 .It Cm clear
-Clear meta-data on the given providers.
+Clear metadata on the given providers.
 .It Cm stop
 Stop the given provider.
 .Pp
@@ -211,12 +213,15 @@
 mount -o async /dev/da0.journal /mnt
 .Ed
 .Pp
-Configure gjournaling on an existing file system, but only if
+Configure journaling on an existing file system, but only if
 .Nm
-allows this (i.e.: if the last sector is not already used by the file system):
+allows this (i.e., if the last sector is not already used by the file system):
 .Bd -literal -offset indent
 umount /dev/da0s1d
-gjournal label da0s1d da0s1e && tunefs -J enable -n disable && mount -o async /dev/da0s1d.journal /mnt || mount /dev/da0s1d /mnt
+gjournal label da0s1d da0s1e && \e
+    tunefs -J enable -n disable && \e
+    mount -o async /dev/da0s1d.journal /mnt || \e
+    mount /dev/da0s1d /mnt
 .Ed
 .Sh SEE ALSO
 .Xr geom 4 ,

==== //depot/projects/dtrace7/src/sys/amd64/amd64/db_trace.c#2 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_trace.c,v 1.80 2006/11/17 20:27:00 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_trace.c,v 1.80.2.1 2007/11/21 16:38:54 jhb Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -317,7 +317,8 @@
 	if (name != NULL) {
 		if (strcmp(name, "calltrap") == 0 ||
 		    strcmp(name, "fork_trampoline") == 0 ||
-		    strcmp(name, "nmi_calltrap") == 0)
+		    strcmp(name, "nmi_calltrap") == 0 ||
+		    strcmp(name, "Xdblfault") == 0)
 			frame_type = TRAP;
 		else if (strncmp(name, "Xatpic_intr", 11) == 0 ||
 		    strncmp(name, "Xapic_isr", 9) == 0 ||

==== //depot/projects/dtrace7/src/sys/amd64/amd64/exception.S#2 (text+ko) ====

@@ -27,7 +27,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/amd64/amd64/exception.S,v 1.129 2006/12/23 03:30:50 davidxu Exp $
+ * $FreeBSD: src/sys/amd64/amd64/exception.S,v 1.129.2.1 2007/11/21 16:38:54 jhb Exp $
  */
 
 #include "opt_atpic.h"
@@ -187,10 +187,28 @@
 IDTVEC(dblfault)
 	subq	$TF_ERR,%rsp
 	movq	$T_DOUBLEFLT,TF_TRAPNO(%rsp)
+	movq	$0,TF_ADDR(%rsp)
+	movq	$0,TF_ERR(%rsp)
+	movq	%rdi,TF_RDI(%rsp)
+	movq	%rsi,TF_RSI(%rsp)
+	movq	%rdx,TF_RDX(%rsp)
+	movq	%rcx,TF_RCX(%rsp)
+	movq	%r8,TF_R8(%rsp)
+	movq	%r9,TF_R9(%rsp)
+	movq	%rax,TF_RAX(%rsp)
+	movq	%rbx,TF_RBX(%rsp)
+	movq	%rbp,TF_RBP(%rsp)
+	movq	%r10,TF_R10(%rsp)
+	movq	%r11,TF_R11(%rsp)
+	movq	%r12,TF_R12(%rsp)
+	movq	%r13,TF_R13(%rsp)
+	movq	%r14,TF_R14(%rsp)
+	movq	%r15,TF_R15(%rsp)
 	testb	$SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */
 	jz	1f			/* already running with kernel GS.base */
 	swapgs
-1:	call	dblfault_handler
+1:	movq	%rsp, %rdi
+	call	dblfault_handler
 2:	hlt
 	jmp	2b
 

==== //depot/projects/dtrace7/src/sys/amd64/amd64/machdep.c#2 (text+ko) ====

@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.675 2007/06/06 07:35:07 davidxu Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.675.2.1 2007/11/21 16:38:54 jhb Exp $");
 
 #include "opt_atalk.h"
 #include "opt_atpic.h"
@@ -138,7 +138,6 @@
 CTASSERT(offsetof(struct pcpu, pc_curthread) == 0);
 
 extern u_int64_t hammer_time(u_int64_t, u_int64_t);
-extern void dblfault_handler(void);
 
 extern void printcpuinfo(void);	/* XXX header file */
 extern void identify_cpu(void);

==== //depot/projects/dtrace7/src/sys/amd64/amd64/trap.c#2 (text+ko) ====

@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.319 2007/07/26 15:32:54 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.319.2.1 2007/11/21 16:38:54 jhb Exp $");
 
 /*
  * AMD64 Trap and System call handling
@@ -96,10 +96,10 @@
 
 extern void trap(struct trapframe *frame);
 extern void syscall(struct trapframe *frame);
+void dblfault_handler(struct trapframe *frame);
 
 static int trap_pfault(struct trapframe *, int);
 static void trap_fatal(struct trapframe *, vm_offset_t);
-void dblfault_handler(void);
 
 #define MAX_TRAP_MSG		30
 static char *trap_msg[] = {
@@ -706,9 +706,12 @@
  * for example).
  */
 void
-dblfault_handler()
+dblfault_handler(struct trapframe *frame)
 {
 	printf("\nFatal double fault\n");
+	printf("rip = 0x%lx\n", frame->tf_rip);
+	printf("rsp = 0x%lx\n", frame->tf_rsp);
+	printf("rbp = 0x%lx\n", frame->tf_rbp);
 #ifdef SMP
 	/* two separate prints in case of a trap on an unmapped page */
 	printf("cpuid = %d; ", PCPU_GET(cpuid));

==== //depot/projects/dtrace7/src/sys/boot/i386/cdboot/cdboot.s#2 (text+ko) ====

@@ -27,7 +27,7 @@
 # SUCH DAMAGE.
 #
 
-# $FreeBSD: src/sys/boot/i386/cdboot/cdboot.s,v 1.17 2007/02/23 21:07:44 remko Exp $
+# $FreeBSD: src/sys/boot/i386/cdboot/cdboot.s,v 1.17.2.1 2007/11/21 16:22:04 jhb Exp $
 
 #
 # This program is a freestanding boot program to load an a.out binary
@@ -585,7 +585,7 @@
 msg_relocate:	.asciz	"Relocating the loader and the BTX\r\n"
 msg_jump:	.asciz	"Starting the BTX loader\r\n"
 msg_badread:	.ascii  "Read Error: 0x"
-hex_error:	.ascii	"00\r\n"
+hex_error:	.asciz	"00\r\n"
 msg_novd:	.asciz  "Could not find Primary Volume Descriptor\r\n"
 msg_lookup:	.asciz  "Looking up "
 msg_lookup2:	.asciz  "... "

==== //depot/projects/dtrace7/src/sys/boot/pc98/cdboot/cdboot.s#2 (text+ko) ====

@@ -28,7 +28,7 @@
 # SUCH DAMAGE.
 #
 
-# $FreeBSD: src/sys/boot/pc98/cdboot/cdboot.s,v 1.2 2007/03/04 04:53:17 nyan Exp $
+# $FreeBSD: src/sys/boot/pc98/cdboot/cdboot.s,v 1.2.2.1 2007/11/21 16:22:04 jhb Exp $
 
 #
 # Basically, we first create a set of boot arguments to pass to the loaded
@@ -789,7 +789,7 @@
 msg_relocate:	.asciz	"Relocating the loader and the BTX\r\n"
 msg_jump:	.asciz	"Starting the BTX loader\r\n"
 msg_badread:	.ascii  "Read Error: 0x"
-hex_error:	.ascii	"00\r\n"
+hex_error:	.asciz	"00\r\n"
 msg_novd:	.asciz  "Could not find Primary Volume Descriptor\r\n"
 msg_lookup:	.asciz  "Looking up "
 msg_lookup2:	.asciz  "... "

==== //depot/projects/dtrace7/src/sys/dev/an/if_an.c#2 (text+ko) ====

@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/an/if_an.c,v 1.84 2007/09/10 12:53:34 avatar Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/an/if_an.c,v 1.84.2.1 2007/11/21 06:37:40 avatar Exp $");
 
 /*
  * The Aironet 4500/4800 series cards come in PCMCIA, ISA and PCI form.
@@ -790,7 +790,7 @@
 	 */
 
 	ether_ifattach(ifp, sc->an_caps.an_oemaddr);
-	callout_handle_init(&sc->an_stat_ch);
+	callout_init_mtx(&sc->an_stat_ch, &sc->an_mtx, 0);
 
 	return(0);
 fail:;
@@ -818,6 +818,7 @@
 	AN_UNLOCK(sc);
 	ether_ifdetach(ifp);
 	bus_teardown_intr(dev, sc->irq_res, sc->irq_handle);
+	callout_drain(&sc->an_stat_ch);
 	if_free(ifp);
 	an_release_resources(dev);
 	mtx_destroy(&sc->an_mtx);
@@ -1142,6 +1143,8 @@
  * is important because we don't want to allow transmissions until
  * the NIC has synchronized to the current cell (either as the master
  * in an ad-hoc group, or as a station connected to an access point).
+ *
+ * Note that this function will be called via callout(9) with a lock held.
  */
 static void
 an_stats_update(void *xsc)
@@ -1150,12 +1153,17 @@
 	struct ifnet		*ifp;
 
 	sc = xsc;
-	AN_LOCK(sc);
+	if (sc->an_gone) {
+		return;
+	}
+
+	AN_LOCK_ASSERT(sc);
 	ifp = sc->an_ifp;
 
 	sc->an_status.an_type = AN_RID_STATUS;
 	sc->an_status.an_len = sizeof(struct an_ltv_status);
-	an_read_record(sc, (struct an_ltv_gen *)&sc->an_status);
+	if (an_read_record(sc, (struct an_ltv_gen *)&sc->an_status))
+		return;
 
 	if (sc->an_status.an_opmode & AN_STATUS_OPMODE_IN_SYNC)
 		sc->an_associated = 1;
@@ -1164,17 +1172,16 @@
 
 	/* Don't do this while we're transmitting */
 	if (ifp->if_drv_flags & IFF_DRV_OACTIVE) {
-		sc->an_stat_ch = timeout(an_stats_update, sc, hz);
-		AN_UNLOCK(sc);
+		callout_reset(&sc->an_stat_ch, hz, an_stats_update, sc);
 		return;
 	}

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


More information about the p4-projects mailing list