Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Sep 2006 17:16:29 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 105966 for review
Message-ID:  <200609111716.k8BHGTZl070190@repoman.freebsd.org>

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

Change 105966 by imp@imp_paco-paco on 2006/09/11 17:16:17

	IFC @105964

Affected files ...

.. //depot/projects/arm/src/crypto/openssl/crypto/rsa/rsa_sign.c#3 integrate
.. //depot/projects/arm/src/gnu/usr.bin/cc/cc_tools/Makefile#3 integrate
.. //depot/projects/arm/src/lib/libc/rpc/clnt_bcast.c#2 integrate
.. //depot/projects/arm/src/lib/libc/rpc/clnt_vc.c#2 integrate
.. //depot/projects/arm/src/lib/libc/rpc/getnetconfig.c#2 integrate
.. //depot/projects/arm/src/lib/libc/rpc/getnetpath.c#2 integrate
.. //depot/projects/arm/src/lib/libc/rpc/rpcb_clnt.c#2 integrate
.. //depot/projects/arm/src/lib/libc/rpc/rpcb_prot.c#2 integrate
.. //depot/projects/arm/src/lib/libc/rpc/svc_simple.c#2 integrate
.. //depot/projects/arm/src/lib/libc/rpc/svc_vc.c#2 integrate
.. //depot/projects/arm/src/lib/libc/sys/recv.2#2 integrate
.. //depot/projects/arm/src/release/Makefile#4 integrate
.. //depot/projects/arm/src/release/scripts/package-split.py#2 integrate
.. //depot/projects/arm/src/sbin/ipf/ipf/Makefile#2 integrate
.. //depot/projects/arm/src/sbin/ipf/ipftest/Makefile#2 integrate
.. //depot/projects/arm/src/sbin/ipf/ipmon/Makefile#2 integrate
.. //depot/projects/arm/src/sbin/ipf/ipnat/Makefile#2 integrate
.. //depot/projects/arm/src/sbin/ipf/ippool/Makefile#2 integrate
.. //depot/projects/arm/src/share/man/man5/src.conf.5#3 integrate
.. //depot/projects/arm/src/share/mk/bsd.lib.mk#3 integrate
.. //depot/projects/arm/src/share/mk/bsd.own.mk#3 integrate
.. //depot/projects/arm/src/share/mk/bsd.prog.mk#2 integrate
.. //depot/projects/arm/src/sys/amd64/linux32/linux32_sysvec.c#10 integrate
.. //depot/projects/arm/src/sys/compat/linux/linux_emul.c#4 integrate
.. //depot/projects/arm/src/sys/compat/linux/linux_file.c#6 integrate
.. //depot/projects/arm/src/sys/compat/linux/linux_futex.c#4 integrate
.. //depot/projects/arm/src/sys/dev/em/if_em.c#28 integrate
.. //depot/projects/arm/src/sys/dev/em/if_em.h#11 integrate
.. //depot/projects/arm/src/sys/dev/nfe/if_nfe.c#4 integrate
.. //depot/projects/arm/src/sys/dev/nfe/if_nfereg.h#3 integrate
.. //depot/projects/arm/src/sys/dev/sound/usb/uaudio.c#7 integrate
.. //depot/projects/arm/src/sys/dev/usb/usb_subr.c#10 integrate
.. //depot/projects/arm/src/sys/geom/geom_event.c#3 integrate
.. //depot/projects/arm/src/sys/geom/mirror/g_mirror.c#17 integrate
.. //depot/projects/arm/src/sys/geom/raid3/g_raid3.c#20 integrate
.. //depot/projects/arm/src/sys/i386/i386/busdma_machdep.c#9 integrate
.. //depot/projects/arm/src/sys/i386/i386/sys_machdep.c#4 integrate
.. //depot/projects/arm/src/sys/i386/linux/linux_sysvec.c#10 integrate
.. //depot/projects/arm/src/sys/kern/kern_ktr.c#5 integrate
.. //depot/projects/arm/src/sys/kern/tty.c#7 integrate
.. //depot/projects/arm/src/sys/kern/uipc_socket.c#22 integrate
.. //depot/projects/arm/src/sys/modules/Makefile#31 integrate
.. //depot/projects/arm/src/sys/netinet/ip_output.c#14 integrate
.. //depot/projects/arm/src/sys/security/audit/audit.c#10 integrate
.. //depot/projects/arm/src/sys/security/audit/audit_bsm.c#8 integrate
.. //depot/projects/arm/src/sys/sys/mac_policy.h#6 integrate
.. //depot/projects/arm/src/tools/build/options/WITHOUT_ASSERT_DEBUG#1 branch
.. //depot/projects/arm/src/tools/build/options/makeman#3 integrate

Differences ...

==== //depot/projects/arm/src/crypto/openssl/crypto/rsa/rsa_sign.c#3 (text+ko) ====

@@ -185,6 +185,23 @@
 		sig=d2i_X509_SIG(NULL,&p,(long)i);
 
 		if (sig == NULL) goto err;
+
+		/* Excess data can be used to create forgeries */
+		if(p != s+i)
+			{
+			RSAerr(RSA_F_RSA_VERIFY,RSA_R_BAD_SIGNATURE);
+			goto err;
+			}
+
+		/* Parameters to the signature algorithm can also be used to
+		   create forgeries */
+		if(sig->algor->parameter
+		   && sig->algor->parameter->type != V_ASN1_NULL)
+			{
+			RSAerr(RSA_F_RSA_VERIFY,RSA_R_BAD_SIGNATURE);
+			goto err;
+			}
+
 		sigtype=OBJ_obj2nid(sig->algor->algorithm);
 
 

==== //depot/projects/arm/src/gnu/usr.bin/cc/cc_tools/Makefile#3 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/gnu/usr.bin/cc/cc_tools/Makefile,v 1.82 2006/03/17 18:54:23 ru Exp $
+# $FreeBSD: src/gnu/usr.bin/cc/cc_tools/Makefile,v 1.83 2006/09/11 05:12:12 imp Exp $
 
 .include <bsd.own.mk>
 
@@ -49,7 +49,6 @@
 .ORDER: options.h options.c
 options.h options.c: opts.sh ${OPTION_FILES}
 	/bin/sh ${GCCDIR}/opts.sh mv options.c options.h ${OPTION_FILES}
-	
 
 GENSRCS+=	options.c options.h
 CLEANFILES+=	options.c options.h
@@ -154,7 +153,7 @@
 GENSRCS+=	tm-preds.h
 
 #-----------------------------------------------------------------------
-# Gengtype 
+# Gengtype
 
 gengtype-lex.c : gengtype-lex.l
 	${LEX} -t  ${.ALLSRC} | \
@@ -533,7 +532,7 @@
 gencodes.o: insn-modes.h genrtl.h
 genconfig.o: insn-modes.h genrtl.h
 print-rtl.o: insn-modes.h genrtl.h tm-preds.h tree-check.h
-read-rtl.o: insn-modes.h genrtl.h 
+read-rtl.o: insn-modes.h genrtl.h
 genattr.o: insn-modes.h genrtl.h
 genemit.o: insn-modes.h genrtl.h
 genflags.o: insn-modes.h genrtl.h

==== //depot/projects/arm/src/lib/libc/rpc/clnt_bcast.c#2 (text+ko) ====

@@ -37,7 +37,7 @@
 static char sccsid[] = "@(#)clnt_bcast.c 1.15 89/04/21 Copyr 1988 Sun Micro";
 #endif
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/rpc/clnt_bcast.c,v 1.8 2004/10/16 06:11:34 obrien Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/rpc/clnt_bcast.c,v 1.9 2006/09/09 22:14:42 mbr Exp $");
 
 
 /*
@@ -141,8 +141,10 @@
 	hints.ai_protocol = proto;
 	hints.ai_socktype = socktype;
 
-	if (getaddrinfo(NULL, "sunrpc", &hints, &res) != 0)
+	if (getaddrinfo(NULL, "sunrpc", &hints, &res) != 0) {
+		freeifaddrs(ifp);
 		return 0;
+	}
 
 	for (ifap = ifp; ifap != NULL; ifap = ifap->ifa_next) {
 		if (ifap->ifa_addr->sa_family != af ||
@@ -299,6 +301,7 @@
 	if (nettype == NULL)
 		nettype = "datagram_n";
 	if ((handle = __rpc_setconf(nettype)) == NULL) {
+		AUTH_DESTROY(sys_auth);
 		return (RPC_UNKNOWNPROTO);
 	}
 	while ((nconf = __rpc_getconf(handle)) != NULL) {

==== //depot/projects/arm/src/lib/libc/rpc/clnt_vc.c#2 (text+ko) ====

@@ -35,7 +35,7 @@
 static char sccsid3[] = "@(#)clnt_vc.c 1.19 89/03/16 Copyr 1988 Sun Micro";
 #endif
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/rpc/clnt_vc.c,v 1.19 2006/02/27 22:10:59 deischen Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/rpc/clnt_vc.c,v 1.20 2006/09/09 22:18:57 mbr Exp $");
  
 /*
  * clnt_tcp.c, Implements a TCP/IP based, client side RPC.
@@ -243,9 +243,9 @@
 		}
 	}
 	mutex_unlock(&clnt_fd_lock);
+	thr_sigsetmask(SIG_SETMASK, &(mask), NULL);
 	if (!__rpc_fd2sockinfo(fd, &si))
 		goto err;
-	thr_sigsetmask(SIG_SETMASK, &(mask), NULL);
 
 	ct->ct_closeit = FALSE;
 

==== //depot/projects/arm/src/lib/libc/rpc/getnetconfig.c#2 (text+ko) ====

@@ -34,7 +34,7 @@
 static char sccsid[] = "@(#)getnetconfig.c	1.12 91/12/19 SMI";
 #endif
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/rpc/getnetconfig.c,v 1.11 2004/10/16 06:11:34 obrien Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/rpc/getnetconfig.c,v 1.12 2006/09/09 22:21:15 mbr Exp $");
 
 /*
  * Copyright (c) 1989 by Sun Microsystems, Inc.
@@ -692,6 +692,7 @@
     p->nc_lookups = (char **)malloc((size_t)(p->nc_nlookups+1) * sizeof(char *));
     if (p->nc_lookups == NULL) {
 	free(p->nc_netid);
+	free(p);
 	return(NULL);
     }
     for (i=0; i < p->nc_nlookups; i++) {

==== //depot/projects/arm/src/lib/libc/rpc/getnetpath.c#2 (text+ko) ====

@@ -34,7 +34,7 @@
 static char sccsid[] = "@(#)getnetpath.c	1.11 91/12/19 SMI";
 #endif
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/rpc/getnetpath.c,v 1.5 2004/10/16 06:11:34 obrien Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/rpc/getnetpath.c,v 1.6 2006/09/09 22:22:39 mbr Exp $");
 
 /*
  * Copyright (c) 1989 by Sun Microsystems, Inc.
@@ -100,6 +100,7 @@
 	return (NULL);
     }
     if ((np_sessionp->nc_handlep = setnetconfig()) == NULL) {
+	free(np_sessionp);
 	syslog (LOG_ERR, "rpc: failed to open " NETCONFIG);
 	return (NULL);
     }

==== //depot/projects/arm/src/lib/libc/rpc/rpcb_clnt.c#2 (text+ko) ====

@@ -56,7 +56,7 @@
 static char sccsid[] = "@(#)rpcb_clnt.c 1.30 89/06/21 Copyr 1988 Sun Micro";
 #endif
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/rpc/rpcb_clnt.c,v 1.15 2006/02/27 22:10:59 deischen Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/rpc/rpcb_clnt.c,v 1.16 2006/09/09 22:26:47 mbr Exp $");
 
 /*
  * rpcb_clnt.c
@@ -239,11 +239,21 @@
 	ad_cache->ac_taddr = (struct netbuf *)malloc(sizeof (struct netbuf));
 	if (!ad_cache->ac_host || !ad_cache->ac_netid || !ad_cache->ac_taddr ||
 		(uaddr && !ad_cache->ac_uaddr)) {
-		return;
+		goto out;
 	}
 	ad_cache->ac_taddr->len = ad_cache->ac_taddr->maxlen = taddr->len;
 	ad_cache->ac_taddr->buf = (char *) malloc(taddr->len);
 	if (ad_cache->ac_taddr->buf == NULL) {
+out:
+		if (ad_cache->ac_host)
+			free(ad_cache->ac_host);
+		if (ad_cache->ac_netid)
+			free(ad_cache->ac_netid);
+		if (ad_cache->ac_uaddr)
+			free(ad_cache->ac_uaddr);
+		if (ad_cache->ac_taddr)
+			free(ad_cache->ac_taddr);
+		free(ad_cache);
 		return;
 	}
 	memcpy(ad_cache->ac_taddr->buf, taddr->buf, taddr->len);
@@ -1012,11 +1022,6 @@
 		}
 	}
 
-	if ((address == NULL) || (address->len == 0)) {
-		rpc_createerr.cf_stat = RPC_PROGNOTREGISTERED;
-		clnt_geterr(client, &rpc_createerr.cf_error);
-	}
-
 error:
 	if (client) {
 		CLNT_DESTROY(client);

==== //depot/projects/arm/src/lib/libc/rpc/rpcb_prot.c#2 (text+ko) ====

@@ -38,7 +38,7 @@
 static char sccsid[] = "@(#)rpcb_prot.c 1.9 89/04/21 Copyr 1984 Sun Micro";
 #endif
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/rpc/rpcb_prot.c,v 1.5 2004/10/16 06:11:35 obrien Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/rpc/rpcb_prot.c,v 1.6 2006/09/09 22:29:16 mbr Exp $");
 
 /*
  * rpcb_prot.c
@@ -129,7 +129,7 @@
 		 * the case of freeing we must remember the next object
 		 * before we free the current object ...
 		 */
-		if (freeing)
+		if (freeing && *rp)
 			next = (*rp)->rpcb_next;
 		if (! xdr_reference(xdrs, (caddr_t *)rp,
 		    (u_int)sizeof (rpcblist), (xdrproc_t)xdr_rpcb)) {
@@ -143,7 +143,7 @@
 			 * gets nulled out by the xdr_reference
 			 * but next itself survives.
 			 */
-		} else {
+		} else if (*rp) {
 			rp = &((*rp)->rpcb_next);
 		}
 	}
@@ -225,7 +225,7 @@
 				    (xdrproc_t)xdr_rpcb_entry)) {
 			return (FALSE);
 		}
-		if (freeing) {
+		if (freeing && *rp) {
 			next_copy = next;
 			rp = &next_copy;
 			/*
@@ -233,7 +233,7 @@
 			 * gets nulled out by the xdr_reference
 			 * but next itself survives.
 			 */
-		} else {
+		} else if (*rp) {
 			rp = &((*rp)->rpcb_entry_next);
 		}
 	}

==== //depot/projects/arm/src/lib/libc/rpc/svc_simple.c#2 (text+ko) ====

@@ -34,7 +34,7 @@
 
 /* #pragma ident	"@(#)svc_simple.c	1.18	94/04/24 SMI" */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/rpc/svc_simple.c,v 1.15 2006/02/27 22:10:59 deischen Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/rpc/svc_simple.c,v 1.16 2006/09/09 22:32:07 mbr Exp $");
 
 /*
  * svc_simple.c
@@ -165,6 +165,10 @@
 			if (((xdrbuf = malloc((unsigned)recvsz)) == NULL) ||
 				((netid = strdup(nconf->nc_netid)) == NULL)) {
 				warnx(rpc_reg_err, rpc_reg_msg, __no_mem_str);
+				if (xdrbuf != NULL)
+					free(xdrbuf);
+				if (netid != NULL)
+					free(netid);
 				SVC_DESTROY(svcxprt);
 				break;
 			}

==== //depot/projects/arm/src/lib/libc/rpc/svc_vc.c#2 (text+ko) ====

@@ -34,7 +34,7 @@
 static char *sccsid = "@(#)svc_tcp.c	2.2 88/08/01 4.0 RPCSRC";
 #endif
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/rpc/svc_vc.c,v 1.25 2006/02/27 22:10:59 deischen Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/rpc/svc_vc.c,v 1.26 2006/09/09 22:33:21 mbr Exp $");
 
 /*
  * svc_vc.c, Server side for Connection Oriented based RPC. 
@@ -135,13 +135,14 @@
 	struct sockaddr_storage sslocal;
 	socklen_t slen;
 
+	if (!__rpc_fd2sockinfo(fd, &si))
+		return NULL;
+
 	r = mem_alloc(sizeof(*r));
 	if (r == NULL) {
 		warnx("svc_vc_create: out of memory");
 		goto cleanup_svc_vc_create;
 	}
-	if (!__rpc_fd2sockinfo(fd, &si))
-		return NULL;
 	r->sendsize = __rpc_get_t_size(si.si_af, si.si_proto, (int)sendsize);
 	r->recvsize = __rpc_get_t_size(si.si_af, si.si_proto, (int)recvsize);
 	r->maxrec = __svc_maxrec;
@@ -177,6 +178,8 @@
 	xprt_register(xprt);
 	return (xprt);
 cleanup_svc_vc_create:
+	if (xprt)
+		mem_free(xprt, sizeof(*xprt));
 	if (r != NULL)
 		mem_free(r, sizeof(*r));
 	return (NULL);

==== //depot/projects/arm/src/lib/libc/sys/recv.2#2 (text+ko) ====

@@ -30,9 +30,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)recv.2	8.3 (Berkeley) 2/21/94
-.\" $FreeBSD: src/lib/libc/sys/recv.2,v 1.30 2006/03/05 10:32:15 brueffer Exp $
+.\" $FreeBSD: src/lib/libc/sys/recv.2,v 1.31 2006/09/10 20:41:33 brian Exp $
 .\"
-.Dd February 16, 2006
+.Dd September 10, 2006
 .Dt RECV 2
 .Os
 .Sh NAME
@@ -117,7 +117,7 @@
 .Pp
 The
 .Xr select 2
-system call may be used to determine when more data arrive.
+system call may be used to determine when more data arrives.
 .Pp
 The
 .Fa flags

==== //depot/projects/arm/src/release/Makefile#4 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/release/Makefile,v 1.913 2006/09/08 19:54:36 ru Exp $
+# $FreeBSD: src/release/Makefile,v 1.914 2006/09/11 13:15:09 ru Exp $
 #
 # make release [BUILDNAME=somename] CHROOTDIR=/some/dir CVSROOT=/cvs/dir \
 #     [RELEASETAG=tag]
@@ -587,7 +587,7 @@
 
 # Install the system into the various distributions.
 release.2:
-	cd ${.CURDIR}/../etc && make distrib-dirs DESTDIR=${RD}/trees/base
+	cd ${.CURDIR}/.. && ${CROSSMAKE} distrib-dirs DESTDIR=${RD}/trees/base
 	cd ${.CURDIR}/.. && ${CROSSMAKE} ${WORLD_FLAGS} distributeworld \
 	    DISTDIR=${RD}/trees
 	touch ${.TARGET}
@@ -611,7 +611,8 @@
 .if exists(${.CURDIR}/${TARGET}/${j}_crunch.conf)
 	rm -rf ${j}_crunch
 	mkdir ${j}_crunch
-	cd ${j}_crunch; ${WMAKEENV} crunchgen -o \
+	cd ${j}_crunch; ${WMAKEENV} MAKEFLAGS="-m ${.CURDIR}/../share/mk" \
+	    crunchgen -o \
 	    ${.CURDIR}/${TARGET}/${j}_crunch.conf
 	cd ${j}_crunch; ${WMAKE} -f ${j}_crunch.mk subclean
 	cd ${.CURDIR}/..; ${BINMAKE} -f Makefile.inc1 _build-tools

==== //depot/projects/arm/src/release/scripts/package-split.py#2 (text+ko) ====

@@ -7,7 +7,7 @@
 #
 # Usage: package-split.py <INDEX> <master INDEX>
 #
-# $FreeBSD: src/release/scripts/package-split.py,v 1.11 2006/03/17 02:05:46 kensmith Exp $
+# $FreeBSD: src/release/scripts/package-split.py,v 1.12 2006/09/09 07:25:40 kris Exp $
 
 import os
 import sys
@@ -60,7 +60,7 @@
             'emulators/mtools',
             'graphics/png',
             'graphics/xv',
-            'irc/xchat2',
+            'irc/xchat',
             'mail/exim',
             'mail/fetchmail',
             'mail/mutt',
@@ -70,7 +70,7 @@
             'mail/postfix',
             'net/cvsup-without-gui',
             'net/rsync',
-            'net/samba',
+            'net/samba3',
             'news/slrn',
             'news/tin',
             'print/a2ps-letter',

==== //depot/projects/arm/src/sbin/ipf/ipf/Makefile#2 (text+ko) ====

@@ -1,15 +1,15 @@
-# $FreeBSD: src/sbin/ipf/ipf/Makefile,v 1.5 2006/05/07 00:40:00 obrien Exp $
+# $FreeBSD: src/sbin/ipf/ipf/Makefile,v 1.6 2006/09/10 08:58:46 obrien Exp $
 
 PROG=		ipf
-SRCS=		ipf.c ipfcomp.c ipf_y.c ipf_l.c bpf_filter.c
+SRCS=		${GENHDRS} ipf.c ipfcomp.c ipf_y.c ipf_l.c bpf_filter.c
 MAN=		ipf.8 ipf.4 ipf.5 ipl.4
 MLINKS=		ipl.4 ipfilter.4 ipf.5 ipf.conf.5 ipf.5 ipf6.conf.5
 CFLAGS+=	-I. -DIPFILTER_BPF
 
-DPSRCS+=	ipf_l.h ipf_y.h
+GENHDRS=	ipf_l.h ipf_y.h
+DPSRCS+=	${GENHDRS}
 
-CLEANFILES+=	ipf_y.c ipf_y.h
-CLEANFILES+=	ipf_l.c ipf_l.h
+CLEANFILES+=	${GENHDRS} ipf_y.c ipf_l.c
 
 ipf_y.c: ipf_y.y
 	${YACC} -d ${.ALLSRC}

==== //depot/projects/arm/src/sbin/ipf/ipftest/Makefile#2 (text+ko) ====

@@ -1,7 +1,7 @@
-#	$FreeBSD: src/sbin/ipf/ipftest/Makefile,v 1.3 2005/04/28 16:26:34 darrenr Exp $
+#	$FreeBSD: src/sbin/ipf/ipftest/Makefile,v 1.4 2006/09/10 08:58:46 obrien Exp $
 
 PROG=		ipftest
-SRCS=		ipftest.c fil.c ip_frag.c ip_state.c ip_nat.c \
+SRCS=		${GENHDRS} ipftest.c fil.c ip_frag.c ip_state.c ip_nat.c \
 		ip_proxy.c ip_auth.c ip_htable.c ip_lookup.c \
 		ip_pool.c ip_scan.c ip_sync.c ip_rules.c \
 		ip_fil.c ip_log.c ippool_y.c ippool_l.c ipf_y.c \
@@ -13,16 +13,15 @@
 
 .PATH:		${.CURDIR}/../../../sys/contrib/ipfilter/netinet
 
-DPSRCS+=	ipnat_l.h ipnat_y.h ippool_l.h ippool_y.h ipf_l.h ipf_y.h
+GENHDRS=	ipnat_l.h ipnat_y.h ippool_l.h ippool_y.h ipf_l.h ipf_y.h
+DPSRCS+=	${GENHDRS}
 
-CLEANFILES+=	ipf_y.c ipf_y.h
-CLEANFILES+=	ipf_l.c ipf_l.h
+CLEANFILES+=	${GENHDRS} 
+CLEANFILES+=	ipf_y.c ipf_l.c
 CLEANFILES+=	ipf.tab.c ipf.tab.h
-CLEANFILES+=	ipnat_y.c ipnat_y.h
-CLEANFILES+=	ipnat_l.c ipnat_l.h
+CLEANFILES+=	ipnat_y.c ipnat_l.c
 CLEANFILES+=	ipnat.tab.c ipnat.tab.h
-CLEANFILES+=	ippool_y.c ippool_y.h
-CLEANFILES+=	ippool_l.c ippool_l.h
+CLEANFILES+=	ippool_y.c ippool_l.c
 CLEANFILES+=	ippool.tab.c ippool.tab.h
 
 ipnat_y.c: ipnat_y.y

==== //depot/projects/arm/src/sbin/ipf/ipmon/Makefile#2 (text+ko) ====

@@ -1,15 +1,15 @@
-#	$FreeBSD: src/sbin/ipf/ipmon/Makefile,v 1.2 2005/04/28 16:26:34 darrenr Exp $
+#	$FreeBSD: src/sbin/ipf/ipmon/Makefile,v 1.3 2006/09/10 08:58:47 obrien Exp $
 
 PROG=		ipmon
-SRCS=		ipmon.c ipmon_y.c ipmon_l.c
+SRCS=		${GENHDRS} ipmon.c ipmon_y.c ipmon_l.c
 MAN=		ipmon.8
 
 CFLAGS+=	-DLOGFAC=LOG_LOCAL0 -I.
 
-DPSRCS+=	ipmon_l.h ipmon_y.h
+GENHDRS+=	ipmon_l.h ipmon_y.h
+DPSRCS+=	${GENHDRS}
 
-CLEANFILES+=	ipmon_y.c ipmon_y.h
-CLEANFILES+=	ipmon_l.c ipmon_l.h
+CLEANFILES+=	${GENHDRS} ipmon_y.c ipmon_l.c
 
 ipmon_y.c: ipmon_y.y
 	${YACC} -d ${.ALLSRC}

==== //depot/projects/arm/src/sbin/ipf/ipnat/Makefile#2 (text+ko) ====

@@ -1,15 +1,15 @@
-#	$FreeBSD: src/sbin/ipf/ipnat/Makefile,v 1.2 2005/04/28 16:26:34 darrenr Exp $
+#	$FreeBSD: src/sbin/ipf/ipnat/Makefile,v 1.3 2006/09/10 08:58:47 obrien Exp $
 
 PROG=		ipnat
-SRCS=		ipnat.c ipnat_y.c ipnat_l.c
+SRCS=		${GENHDRS} ipnat.c ipnat_y.c ipnat_l.c
 MAN=		ipnat.8 ipnat.4 ipnat.5
 MLINKS=		ipnat.5 ipnat.conf.5
 CFLAGS+=	-I.
 
-DPSRCS+=	ipnat_l.h ipnat_y.h
+GENHDRS=	ipnat_l.h ipnat_y.h
+DPSRCS+=	${GENHDRS}
 
-CLEANFILES+=	ipnat_y.c ipnat_y.h
-CLEANFILES+=	ipnat_l.c ipnat_l.h
+CLEANFILES+=	${GENHDRS} ipnat_y.c ipnat_l.c
 
 ipnat_y.c: ipnat_y.y
 	${YACC} -d ${.ALLSRC}

==== //depot/projects/arm/src/sbin/ipf/ippool/Makefile#2 (text+ko) ====

@@ -1,14 +1,14 @@
-#	$FreeBSD: src/sbin/ipf/ippool/Makefile,v 1.2 2005/04/28 16:26:34 darrenr Exp $
+#	$FreeBSD: src/sbin/ipf/ippool/Makefile,v 1.3 2006/09/10 08:58:47 obrien Exp $
 
 PROG=		ippool
-SRCS=		ippool_y.c ippool_l.c kmem.c ippool.c
+SRCS=		${GENHDRS} ippool_y.c ippool_l.c kmem.c ippool.c
 MAN=		ippool.5 ippool.8
 CFLAGS+=	-I.
 
-DPSRCS+=	ippool_l.h ippool_y.h
+GENHDRS=	ippool_l.h ippool_y.h
+DPSRCS+=	${GENHDRS}
 
-CLEANFILES+=	ippool_y.c ippool_y.h
-CLEANFILES+=	ippool_l.c ippool_l.h
+CLEANFILES+=	${GENHDRS} ippool_y.c ippool_l.c
 
 ippool_y.c: ippool_y.y
 	${YACC} -d ${.ALLSRC}

==== //depot/projects/arm/src/share/man/man5/src.conf.5#3 (text) ====

@@ -1,7 +1,7 @@
 .\" DO NOT EDIT-- this file is automatically generated.
-.\" from FreeBSD: src/tools/build/options/makeman,v 1.5 2006/07/31 12:41:13 yar Exp
-.\" $FreeBSD: src/share/man/man5/src.conf.5,v 1.6 2006/07/31 14:13:25 yar Exp $
-.Dd July 31, 2006
+.\" from FreeBSD: src/tools/build/options/makeman,v 1.6 2006/09/11 13:39:44 ru Exp
+.\" $FreeBSD: src/share/man/man5/src.conf.5,v 1.7 2006/09/11 13:56:28 ru Exp $
+.Dd September 11, 2006
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -83,6 +83,11 @@
 .Xr acpiconf 8 ,
 .Xr acpidump 8
 and related programs.
+.It Va WITHOUT_ASSERT_DEBUG
+.\" from FreeBSD: src/tools/build/options/WITHOUT_ASSERT_DEBUG,v 1.1 2006/09/11 13:55:27 ru Exp
+Set to compile programs and libraries without the
+.Xr assert 3
+checks.
 .It Va WITHOUT_ATM
 .\" from FreeBSD: src/tools/build/options/WITHOUT_ATM,v 1.1 2006/03/21 07:50:49 ru Exp
 Set to not build

==== //depot/projects/arm/src/share/mk/bsd.lib.mk#3 (text+ko) ====

@@ -1,5 +1,5 @@
 #	from: @(#)bsd.lib.mk	5.26 (Berkeley) 5/2/91
-# $FreeBSD: src/share/mk/bsd.lib.mk,v 1.176 2006/08/25 23:50:05 imp Exp $
+# $FreeBSD: src/share/mk/bsd.lib.mk,v 1.177 2006/09/11 05:35:56 imp Exp $
 #
 
 .include <bsd.init.mk>
@@ -28,6 +28,10 @@
 CFLAGS+=	${CRUNCH_CFLAGS}
 .endif
 
+.if ${MK_ASSERT_DEBUG} == "no"
+CFLAGS+= -DNDEBUG
+.endif
+
 .if defined(DEBUG_FLAGS)
 CFLAGS+= ${DEBUG_FLAGS}
 .endif

==== //depot/projects/arm/src/share/mk/bsd.own.mk#3 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/share/mk/bsd.own.mk,v 1.55 2006/05/17 09:33:07 phk Exp $
+# $FreeBSD: src/share/mk/bsd.own.mk,v 1.56 2006/09/11 05:35:57 imp Exp $
 #
 # The include file <bsd.own.mk> set common variables for owner,
 # group, mode, and directories. Defaults are in brackets.
@@ -282,6 +282,7 @@
 #
 .for var in \
     ACPI \
+    ASSERT_DEBUG \
     ATM \
     AUDIT \
     AUTHPF \

==== //depot/projects/arm/src/share/mk/bsd.prog.mk#2 (text+ko) ====

@@ -1,5 +1,5 @@
 #	from: @(#)bsd.prog.mk	5.26 (Berkeley) 6/25/91
-# $FreeBSD: src/share/mk/bsd.prog.mk,v 1.147 2006/03/17 18:54:34 ru Exp $
+# $FreeBSD: src/share/mk/bsd.prog.mk,v 1.148 2006/09/11 05:35:57 imp Exp $
 
 .include <bsd.init.mk>
 
@@ -10,6 +10,10 @@
 CFLAGS+=${COPTS}
 .endif
 
+.if ${MK_ASSERT_DEBUG} == "no"
+CFLAGS+= -DNDEBUG
+.endif
+
 .if defined(DEBUG_FLAGS)
 CFLAGS+=${DEBUG_FLAGS}
 .endif

==== //depot/projects/arm/src/sys/amd64/linux32/linux32_sysvec.c#10 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_sysvec.c,v 1.23 2006/08/17 21:06:48 netchild Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_sysvec.c,v 1.24 2006/09/09 16:25:25 netchild Exp $");
 #include "opt_compat.h"
 
 #ifndef COMPAT_IA32
@@ -124,7 +124,7 @@
 static void	linux32_fixlimits(struct proc *p);
 
 extern LIST_HEAD(futex_list, futex) futex_list;
-extern struct mtx futex_mtx;
+extern struct sx futex_sx;
 
 static eventhandler_tag linux_exit_tag;
 static eventhandler_tag linux_schedtail_tag;
@@ -1080,7 +1080,7 @@
 			sx_init(&emul_lock, "emuldata lock");
 			sx_init(&emul_shared_lock, "emuldata->shared lock");
 			LIST_INIT(&futex_list);
-			mtx_init(&futex_mtx, "futex protection lock", NULL, MTX_DEF);
+			sx_init(&futex_sx, "futex protection lock");
 			linux_exit_tag = EVENTHANDLER_REGISTER(process_exit, linux_proc_exit,
 			      NULL, 1000);
 			linux_schedtail_tag = EVENTHANDLER_REGISTER(schedtail, linux_schedtail,
@@ -1110,7 +1110,7 @@
 				linux_device_unregister_handler(*ldhp);
 			sx_destroy(&emul_lock);
 			sx_destroy(&emul_shared_lock);
-			mtx_destroy(&futex_mtx);
+			sx_destroy(&futex_sx);
 			EVENTHANDLER_DEREGISTER(process_exit, linux_exit_tag);
 			EVENTHANDLER_DEREGISTER(schedtail, linux_schedtail_tag);
 			EVENTHANDLER_DEREGISTER(process_exec, linux_exec_tag);

==== //depot/projects/arm/src/sys/compat/linux/linux_emul.c#4 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/linux/linux_emul.c,v 1.5 2006/08/28 13:52:27 ssouhlal Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/linux/linux_emul.c,v 1.6 2006/09/09 16:55:55 netchild Exp $");
 
 #include "opt_compat.h"
 
@@ -101,6 +101,7 @@
 		   	panic("process not found in proc_init\n");
 		p->p_emuldata = em;
 		PROC_UNLOCK(p);
+		EMUL_LOCK(&emul_lock);
 	} else {
 		/* lookup the old one */
 		em = em_find(td->td_proc, EMUL_UNLOCKED);
@@ -129,14 +130,15 @@
 
 
 	if (child != 0) {
+		EMUL_UNLOCK(&emul_lock);
 	   	EMUL_SHARED_WLOCK(&emul_shared_lock);
    	   	LIST_INSERT_HEAD(&em->shared->threads, em, threads);
 	   	EMUL_SHARED_WUNLOCK(&emul_shared_lock);
 
 		p = pfind(child);
-		PROC_UNLOCK(p);
 		/* we might have a sleeping linux_schedtail */
 		wakeup(&p->p_emuldata);
+		PROC_UNLOCK(p);
 	} else
 	   	EMUL_UNLOCK(&emul_lock);
 

==== //depot/projects/arm/src/sys/compat/linux/linux_file.c#6 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/linux/linux_file.c,v 1.96 2006/07/11 20:52:07 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/linux/linux_file.c,v 1.97 2006/09/10 13:47:56 netchild Exp $");
 
 #include "opt_compat.h"
 #include "opt_mac.h"
@@ -45,6 +45,7 @@
 #include <sys/mount.h>
 #include <sys/mutex.h>
 #include <sys/proc.h>
+#include <sys/stat.h>
 #include <sys/syscallsubr.h>
 #include <sys/sysproto.h>
 #include <sys/tty.h>
@@ -495,6 +496,7 @@
 {
 	char *path;
 	int error;
+	struct stat st;
 
 	LCONVPATHEXIST(td, args->path, &path);
 
@@ -504,6 +506,11 @@
 #endif
 
 	error = kern_unlink(td, path, UIO_SYSSPACE);
+	if (error == EPERM)
+		/* Introduce POSIX noncompliant behaviour of Linux */
+		if (kern_stat(td, path, UIO_SYSSPACE, &st) == 0)
+			if (S_ISDIR(st.st_mode))
+				error = EISDIR;
 	LFREEPATH(path);
 	return (error);
 }

==== //depot/projects/arm/src/sys/compat/linux/linux_futex.c#4 (text+ko) ====

@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/linux/linux_futex.c,v 1.4 2006/08/26 10:36:16 netchild Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/linux/linux_futex.c,v 1.6 2006/09/09 16:25:25 netchild Exp $");
 #if 0
  __KERNEL_RCSID(1, "$NetBSD: linux_futex.c,v 1.5 2005/11/23 16:14:57 manu Exp $");
 #endif
@@ -47,6 +47,7 @@
 #include <sys/queue.h>
 #include <sys/lock.h>
 #include <sys/mutex.h>
+#include <sys/sx.h>
 #include <sys/malloc.h>
 
 #ifdef COMPAT_LINUX32
@@ -73,10 +74,10 @@
 };
 
 LIST_HEAD(futex_list, futex) futex_list;
-struct mtx futex_mtx;		/* this protects the LIST of futexes */
+struct sx futex_sx;		/* this protects the LIST of futexes */
 
-#define FUTEX_LOCK mtx_lock(&futex_mtx)
-#define FUTEX_UNLOCK mtx_unlock(&futex_mtx)
+#define FUTEX_LOCK sx_xlock(&futex_sx)
+#define FUTEX_UNLOCK sx_xunlock(&futex_sx)
 
 #define FUTEX_LOCKED	1
 #define FUTEX_UNLOCKED	0
@@ -302,9 +303,6 @@
 		ret = futex_wake(f, args->val, NULL);
 		futex_put(f);
 		if (op_ret > 0) {
-#ifdef	DEBUG
-		   	printf("second wakeup\n");
-#endif
 		   	op_ret = 0;
 		   	/*
 			 * Linux uses the address of the timespec parameter
@@ -346,16 +344,11 @@
 			return f;
 		}
 	}
-	if (locked == FUTEX_UNLOCKED)
-   	   	FUTEX_UNLOCK;
 
-	/* Not found, create it */
 	f = malloc(sizeof(*f), M_LINUX, M_WAITOK);
 	f->f_uaddr = uaddr;
 	f->f_refcount = 1;
 	TAILQ_INIT(&f->f_waiting_proc);
-	if (locked == FUTEX_UNLOCKED)
-   	   	FUTEX_LOCK;
 	LIST_INSERT_HEAD(&futex_list, f, f_list);
 	if (locked == FUTEX_UNLOCKED)
    	   	FUTEX_UNLOCK;
@@ -421,13 +414,13 @@
 	FUTEX_LOCK;
 	TAILQ_FOREACH(wp, &f->f_waiting_proc, wp_list) {
 		if (count <= n) {
-			wakeup(wp);
+			wakeup_one(wp);
 			count++;
 		} else {
 			if (newf != NULL) {
 				/* futex_put called after tsleep */
 				wp->wp_new_futex = futex_get(newf->f_uaddr, FUTEX_LOCKED);
-				wakeup(wp);
+				wakeup_one(wp);
 			}
 		}
 	}

==== //depot/projects/arm/src/sys/dev/em/if_em.c#28 (text+ko) ====

@@ -31,7 +31,7 @@
 
 ***************************************************************************/
 
-/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.139 2006/09/03 00:27:41 jmg Exp $*/
+/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.143 2006/09/10 19:23:27 pdeuskar Exp $*/
 
 #ifdef HAVE_KERNEL_OPTION_HEADERS
 #include "opt_device_polling.h"
@@ -72,6 +72,7 @@
 #include <netinet/tcp.h>
 #include <netinet/udp.h>
 
+#include <machine/in_cksum.h>
 #include <dev/pci/pcivar.h>
 #include <dev/pci/pcireg.h>
 #include <dev/em/if_em_hw.h>
@@ -86,7 +87,7 @@
  *  Driver version
  *********************************************************************/
 
-char em_driver_version[] = "Version - 6.1.4";
+char em_driver_version[] = "Version - 6.1.4 - TSO";
 
 
 /*********************************************************************
@@ -231,6 +232,8 @@
 		    struct mbuf *);
 static void	em_transmit_checksum_setup(struct adapter *, struct mbuf *,
 		    uint32_t *, uint32_t *);
+static boolean_t em_tso_setup(struct adapter *, struct mbuf *,
+		    uint32_t *, uint32_t *);
 static void	em_set_promisc(struct adapter *);
 static void	em_disable_promisc(struct adapter *);
 static void	em_set_multi(struct adapter *);
@@ -304,6 +307,7 @@
 
 #define E1000_TICKS_TO_USECS(ticks)	((1024 * (ticks) + 500) / 1000)
 #define E1000_USECS_TO_TICKS(usecs)	((1000 * (usecs) + 512) / 1024)
+#define M_TSO_LEN			66
 
 static int em_tx_int_delay_dflt = E1000_TICKS_TO_USECS(EM_TIDV);
 static int em_rx_int_delay_dflt = E1000_TICKS_TO_USECS(EM_RDTR);
@@ -907,6 +911,10 @@
 			ifp->if_capenable ^= IFCAP_HWCSUM;
 			reinit = 1;
 		}
+		if (mask & IFCAP_TSO) {
+			ifp->if_capenable ^= IFCAP_TSO;
+			reinit = 1;
+		}
 		if (mask & IFCAP_VLAN_HWTAGGING) {
 			ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING;
 			reinit = 1;
@@ -1075,11 +1083,12 @@
 	ifp->if_drv_flags |= IFF_DRV_RUNNING;
 	ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
 
+	ifp->if_hwassist = 0;
 	if (adapter->hw.mac_type >= em_82543) {
 		if (ifp->if_capenable & IFCAP_TXCSUM)
 			ifp->if_hwassist = EM_CHECKSUM_FEATURES;
-		else
-			ifp->if_hwassist = 0;
+		if (ifp->if_capenable & IFCAP_TSO)
+			ifp->if_hwassist |= EM_TCPSEG_FEATURES;
 	}
 
 	callout_reset(&adapter->timer, hz, em_local_timer, adapter);
@@ -1441,11 +1450,13 @@
 	struct m_tag		*mtag;
 	uint32_t		txd_upper, txd_lower, txd_used, txd_saved;
 	int			nsegs, i, j;
-	int			error;
+	int			error, do_tso, tso_desc = 0;
 
 	m_head = *m_headp;
 	current_tx_desc = NULL;
-	txd_used = txd_saved = 0;
+	txd_upper = txd_lower = txd_used = txd_saved = 0;
+
+	do_tso = ((m_head->m_pkthdr.csum_flags & CSUM_TSO) != 0);
 
 	/*
 	 * Force a cleanup if number of TX descriptors
@@ -1499,6 +1510,17 @@
 	}
 
 	/*
+	 * TSO workaround:
+	 *  If an mbuf is only header we need
+	 *     to pull 4 bytes of data into it.
+	 */
+	if (do_tso && (m_head->m_len <= M_TSO_LEN)) {
+		m_head = m_pullup(m_head, M_TSO_LEN + 4);
+		if (m_head == NULL)
+			return (ENOBUFS);
+	}
+
+	/*
 	 * Map the packet for DMA.
 	 */
 	tx_buffer = &adapter->tx_buffer_area[adapter->next_avail_tx_desc];
@@ -1536,24 +1558,42 @@
 		return (EIO);
 	}
 
-	if (nsegs > adapter->num_tx_desc_avail) {
+	/*
+	 * TSO Hardware workaround, if this packet is not
+	 * TSO, and is only a single descriptor long, and
+	 * it follows a TSO burst, then we need to add a
+	 * sentinel descriptor to prevent premature writeback.
+	 */
+	if ((do_tso == 0) && (adapter->tx_tso == TRUE)) {
+		if (nsegs == 1)
+			tso_desc = TRUE;
+		adapter->tx_tso = FALSE;
+	}
+
+	if (nsegs > adapter->num_tx_desc_avail - 2) {
 		adapter->no_tx_desc_avail2++;
 		bus_dmamap_unload(adapter->txtag, map);
 		return (ENOBUFS);
 	}
 
+	/* Do hardware assists */
 	m_head = *m_headp;
-	if (ifp->if_hwassist > 0)
-		em_transmit_checksum_setup(adapter,  m_head, &txd_upper, &txd_lower);
-	else
-		txd_upper = txd_lower = 0;
+	if ( ifp->if_hwassist > 0) {
+		if (em_tso_setup(adapter, m_head, &txd_upper, &txd_lower)) {
+			/* we need to make a final sentinel transmit desc */
+			tso_desc = TRUE;
+		} else

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



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