svn commit: r248261 - in user/attilio/vmcontention: crypto/openssh lib/libc/gen lib/libc/net lib/libusb share/man/man4 sys/dev/sound/pci/hda sys/dev/usb sys/fs/nfs sys/fs/nfsclient sys/kern sys/mod...

Attilio Rao attilio at FreeBSD.org
Thu Mar 14 02:00:30 UTC 2013


Author: attilio
Date: Thu Mar 14 02:00:21 2013
New Revision: 248261
URL: http://svnweb.freebsd.org/changeset/base/248261

Log:
  MFC

Added:
  user/attilio/vmcontention/lib/libusb/libusb_global_linux.h
     - copied unchanged from r248260, head/lib/libusb/libusb_global_linux.h
Modified:
  user/attilio/vmcontention/crypto/openssh/session.c
  user/attilio/vmcontention/lib/libc/gen/Makefile.inc
  user/attilio/vmcontention/lib/libc/gen/getcontext.3
  user/attilio/vmcontention/lib/libc/net/nscachedcli.c
  user/attilio/vmcontention/lib/libusb/Makefile
  user/attilio/vmcontention/lib/libusb/libusb.h
  user/attilio/vmcontention/lib/libusb/libusb01.c
  user/attilio/vmcontention/lib/libusb/libusb10.c
  user/attilio/vmcontention/lib/libusb/libusb10.h
  user/attilio/vmcontention/lib/libusb/libusb10_desc.c
  user/attilio/vmcontention/lib/libusb/libusb10_io.c
  user/attilio/vmcontention/lib/libusb/libusb20.c
  user/attilio/vmcontention/lib/libusb/libusb20.h
  user/attilio/vmcontention/lib/libusb/libusb20_desc.c
  user/attilio/vmcontention/lib/libusb/libusb20_desc.h
  user/attilio/vmcontention/lib/libusb/libusb20_ugen20.c
  user/attilio/vmcontention/lib/libusb/usb.h
  user/attilio/vmcontention/share/man/man4/cas.4
  user/attilio/vmcontention/share/man/man4/sge.4
  user/attilio/vmcontention/share/man/man4/vinum.4
  user/attilio/vmcontention/sys/dev/sound/pci/hda/hdaa_patches.c
  user/attilio/vmcontention/sys/dev/sound/pci/hda/hdac.h
  user/attilio/vmcontention/sys/dev/usb/usb_device.c
  user/attilio/vmcontention/sys/dev/usb/usb_request.c
  user/attilio/vmcontention/sys/fs/nfs/nfsport.h
  user/attilio/vmcontention/sys/fs/nfsclient/nfs_clbio.c
  user/attilio/vmcontention/sys/fs/nfsclient/nfs_clvnops.c
  user/attilio/vmcontention/sys/kern/imgact_elf.c
  user/attilio/vmcontention/sys/kern/kern_et.c
  user/attilio/vmcontention/sys/modules/ath/Makefile
  user/attilio/vmcontention/sys/nfsclient/nfs_bio.c
  user/attilio/vmcontention/sys/nfsclient/nfs_vnops.c
  user/attilio/vmcontention/sys/nfsclient/nfsmount.h
  user/attilio/vmcontention/sys/rpc/clnt_rc.c
  user/attilio/vmcontention/sys/rpc/clnt_vc.c
  user/attilio/vmcontention/usr.bin/unifdef/unifdefall.sh
  user/attilio/vmcontention/usr.sbin/usbconfig/usbconfig.c
Directory Properties:
  user/attilio/vmcontention/   (props changed)
  user/attilio/vmcontention/crypto/openssh/   (props changed)
  user/attilio/vmcontention/lib/libc/   (props changed)
  user/attilio/vmcontention/share/man/man4/   (props changed)
  user/attilio/vmcontention/sys/   (props changed)

Modified: user/attilio/vmcontention/crypto/openssh/session.c
==============================================================================
--- user/attilio/vmcontention/crypto/openssh/session.c	Thu Mar 14 01:53:32 2013	(r248260)
+++ user/attilio/vmcontention/crypto/openssh/session.c	Thu Mar 14 02:00:21 2013	(r248261)
@@ -1533,6 +1533,12 @@ do_setusercontext(struct passwd *pw)
 			perror("unable to set user context (setuser)");
 			exit(1);
 		}
+
+		/*
+		 * FreeBSD's setusercontext() will not apply the user's
+		 * own umask setting unless running with the user's UID.
+		 */
+		setusercontext(lc, pw, pw->pw_uid, LOGIN_SETUMASK);
 #else
 		/* Permanently switch to the desired uid. */
 		permanently_set_uid(pw);

Modified: user/attilio/vmcontention/lib/libc/gen/Makefile.inc
==============================================================================
--- user/attilio/vmcontention/lib/libc/gen/Makefile.inc	Thu Mar 14 01:53:32 2013	(r248260)
+++ user/attilio/vmcontention/lib/libc/gen/Makefile.inc	Thu Mar 14 02:00:21 2013	(r248261)
@@ -361,6 +361,7 @@ MLINKS+=getcap.3 cgetcap.3 \
 	getcap.3 cgetstr.3 \
 	getcap.3 cgetustr.3
 MLINKS+=getcwd.3 getwd.3
+MLINKS+=getcontext.3 getcontextx.3
 MLINKS+=getcontext.3 setcontext.3
 MLINKS+=getdomainname.3 setdomainname.3
 MLINKS+=getfsent.3 endfsent.3 \

Modified: user/attilio/vmcontention/lib/libc/gen/getcontext.3
==============================================================================
--- user/attilio/vmcontention/lib/libc/gen/getcontext.3	Thu Mar 14 01:53:32 2013	(r248260)
+++ user/attilio/vmcontention/lib/libc/gen/getcontext.3	Thu Mar 14 02:00:21 2013	(r248261)
@@ -35,7 +35,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 26, 2011
+.Dd March 13, 2013
 .Dt GETCONTEXT 3
 .Os
 .Sh NAME
@@ -47,6 +47,8 @@
 .In ucontext.h
 .Ft int
 .Fn getcontext "ucontext_t *ucp"
+.Ft ucontext_t *
+.Fn getcontextx "void"
 .Ft int
 .Fn setcontext "const ucontext_t *ucp"
 .Sh DESCRIPTION

Modified: user/attilio/vmcontention/lib/libc/net/nscachedcli.c
==============================================================================
--- user/attilio/vmcontention/lib/libc/net/nscachedcli.c	Thu Mar 14 01:53:32 2013	(r248260)
+++ user/attilio/vmcontention/lib/libc/net/nscachedcli.c	Thu Mar 14 02:00:21 2013	(r248261)
@@ -75,9 +75,10 @@ safe_write(struct cached_connection_ *co
 		nevents = _kevent(connection->write_queue, NULL, 0, &eventlist,
 		    1, &timeout);
 		if ((nevents == 1) && (eventlist.filter == EVFILT_WRITE)) {
-			s_result = _write(connection->sockfd, data + result,
+			s_result = _sendto(connection->sockfd, data + result,
 			    eventlist.data < data_size - result ?
-			    eventlist.data : data_size - result);
+			    eventlist.data : data_size - result, MSG_NOSIGNAL,
+			    NULL, 0);
 			if (s_result == -1)
 				return (-1);
 			else
@@ -175,8 +176,8 @@ send_credentials(struct cached_connectio
 	nevents = _kevent(connection->write_queue, NULL, 0, &eventlist, 1,
 	    NULL);
 	if (nevents == 1 && eventlist.filter == EVFILT_WRITE) {
-		result = (_sendmsg(connection->sockfd, &cred_hdr, 0) == -1) ?
-		    -1 : 0;
+		result = (_sendmsg(connection->sockfd, &cred_hdr,
+		    MSG_NOSIGNAL) == -1) ?  -1 : 0;
 		EV_SET(&eventlist, connection->sockfd, EVFILT_WRITE, EV_ADD,
 		    0, 0, NULL);
 		_kevent(connection->write_queue, &eventlist, 1, NULL, 0, NULL);

Modified: user/attilio/vmcontention/lib/libusb/Makefile
==============================================================================
--- user/attilio/vmcontention/lib/libusb/Makefile	Thu Mar 14 01:53:32 2013	(r248260)
+++ user/attilio/vmcontention/lib/libusb/Makefile	Thu Mar 14 02:00:21 2013	(r248261)
@@ -37,6 +37,19 @@ SRCS+=		libusb10_io.c
 CFLAGS+=	-DCOMPAT_32BIT
 .endif
 
+#
+# Cross platform support
+#
+# Examples:
+# make LIBUSB_GLOBAL_INCLUDE_FILE=libusb_global_linux.h
+# make COMPAT_32BIT=YES LIBUSB_GLOBAL_INCLUDE_FILE=libusb_global_linux.h
+#
+.if defined(LIBUSB_GLOBAL_INCLUDE_FILE)
+CFLAGS+=	-DLIBUSB_GLOBAL_INCLUDE_FILE=\"${LIBUSB_GLOBAL_INCLUDE_FILE}\"
+CFLAGS+=	-DUSB_GLOBAL_INCLUDE_FILE=\"${LIBUSB_GLOBAL_INCLUDE_FILE}\"
+CFLAGS+=	-I ../../sys
+.endif
+
 .include <bsd.lib.mk>
 
 # LibUSB v1.0

Modified: user/attilio/vmcontention/lib/libusb/libusb.h
==============================================================================
--- user/attilio/vmcontention/lib/libusb/libusb.h	Thu Mar 14 01:53:32 2013	(r248260)
+++ user/attilio/vmcontention/lib/libusb/libusb.h	Thu Mar 14 02:00:21 2013	(r248261)
@@ -27,8 +27,11 @@
 #ifndef __LIBUSB_H__
 #define	__LIBUSB_H__
 
+#ifndef LIBUSB_GLOBAL_INCLUDE_FILE
+#include <stdint.h>
 #include <sys/time.h>
 #include <sys/types.h>
+#endif
 
 #ifdef __cplusplus
 extern	"C" {

Modified: user/attilio/vmcontention/lib/libusb/libusb01.c
==============================================================================
--- user/attilio/vmcontention/lib/libusb/libusb01.c	Thu Mar 14 01:53:32 2013	(r248260)
+++ user/attilio/vmcontention/lib/libusb/libusb01.c	Thu Mar 14 02:00:21 2013	(r248261)
@@ -28,11 +28,16 @@
  * This file contains the emulation layer for LibUSB v0.1 from sourceforge.
  */
 
-#include <sys/queue.h>
-
+#ifdef LIBUSB_GLOBAL_INCLUDE_FILE
+#include LIBUSB_GLOBAL_INCLUDE_FILE
+#else
 #include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <sys/queue.h>
+#endif
 
 #include "libusb20.h"
 #include "libusb20_desc.h"

Modified: user/attilio/vmcontention/lib/libusb/libusb10.c
==============================================================================
--- user/attilio/vmcontention/lib/libusb/libusb10.c	Thu Mar 14 01:53:32 2013	(r248260)
+++ user/attilio/vmcontention/lib/libusb/libusb10.c	Thu Mar 14 02:00:21 2013	(r248261)
@@ -25,17 +25,23 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/fcntl.h>
-#include <sys/ioctl.h>
-#include <sys/queue.h>
-
+#ifdef LIBUSB_GLOBAL_INCLUDE_FILE
+#include LIBUSB_GLOBAL_INCLUDE_FILE
+#else
 #include <assert.h>
 #include <errno.h>
 #include <poll.h>
 #include <pthread.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <unistd.h>
+#include <time.h>
+#include <sys/fcntl.h>
+#include <sys/ioctl.h>
+#include <sys/queue.h>
+#include <sys/endian.h>
+#endif
 
 #define	libusb_device_handle libusb20_device
 
@@ -1331,7 +1337,7 @@ failure:
 
 	/* make sure our event loop spins the done handler */
 	dummy = 0;
-	write(dev->ctx->ctrl_pipe[1], &dummy, sizeof(dummy));
+	err = write(dev->ctx->ctrl_pipe[1], &dummy, sizeof(dummy));
 }
 
 /* The following function must be called unlocked */

Modified: user/attilio/vmcontention/lib/libusb/libusb10.h
==============================================================================
--- user/attilio/vmcontention/lib/libusb/libusb10.h	Thu Mar 14 01:53:32 2013	(r248260)
+++ user/attilio/vmcontention/lib/libusb/libusb10.h	Thu Mar 14 02:00:21 2013	(r248261)
@@ -27,7 +27,9 @@
 #ifndef __LIBUSB10_H__
 #define	__LIBUSB10_H__
 
+#ifndef LIBUSB_GLOBAL_INCLUDE_FILE
 #include <sys/queue.h>
+#endif
 
 #define	GET_CONTEXT(ctx) (((ctx) == NULL) ? usbi_default_context : (ctx))
 #define	UNEXPORTED __attribute__((__visibility__("hidden")))

Modified: user/attilio/vmcontention/lib/libusb/libusb10_desc.c
==============================================================================
--- user/attilio/vmcontention/lib/libusb/libusb10_desc.c	Thu Mar 14 01:53:32 2013	(r248260)
+++ user/attilio/vmcontention/lib/libusb/libusb10_desc.c	Thu Mar 14 02:00:21 2013	(r248261)
@@ -24,10 +24,15 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/queue.h>
-
+#ifdef LIBUSB_GLOBAL_INCLUDE_FILE
+#include LIBUSB_GLOBAL_INCLUDE_FILE
+#else
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <sys/queue.h>
+#endif
 
 #define	libusb_device_handle libusb20_device
 

Modified: user/attilio/vmcontention/lib/libusb/libusb10_io.c
==============================================================================
--- user/attilio/vmcontention/lib/libusb/libusb10_io.c	Thu Mar 14 01:53:32 2013	(r248260)
+++ user/attilio/vmcontention/lib/libusb/libusb10_io.c	Thu Mar 14 02:00:21 2013	(r248261)
@@ -24,15 +24,20 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/queue.h>
-
+#ifdef LIBUSB_GLOBAL_INCLUDE_FILE
+#include LIBUSB_GLOBAL_INCLUDE_FILE
+#else
 #include <errno.h>
 #include <poll.h>
 #include <pthread.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <time.h>
 #include <unistd.h>
+#include <sys/queue.h>
+#include <sys/endian.h>
+#endif
 
 #define	libusb_device_handle libusb20_device
 

Modified: user/attilio/vmcontention/lib/libusb/libusb20.c
==============================================================================
--- user/attilio/vmcontention/lib/libusb/libusb20.c	Thu Mar 14 01:53:32 2013	(r248260)
+++ user/attilio/vmcontention/lib/libusb/libusb20.c	Thu Mar 14 02:00:21 2013	(r248261)
@@ -24,13 +24,17 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/queue.h>
-
+#ifdef LIBUSB_GLOBAL_INCLUDE_FILE
+#include LIBUSB_GLOBAL_INCLUDE_FILE
+#else
 #include <ctype.h>
 #include <poll.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <time.h>
+#include <sys/queue.h>
+#endif
 
 #include "libusb20.h"
 #include "libusb20_desc.h"

Modified: user/attilio/vmcontention/lib/libusb/libusb20.h
==============================================================================
--- user/attilio/vmcontention/lib/libusb/libusb20.h	Thu Mar 14 01:53:32 2013	(r248260)
+++ user/attilio/vmcontention/lib/libusb/libusb20.h	Thu Mar 14 02:00:21 2013	(r248261)
@@ -29,13 +29,9 @@
 #ifndef _LIBUSB20_H_
 #define	_LIBUSB20_H_
 
-#include <sys/endian.h>
-#include <sys/time.h>
-#include <sys/types.h>
-
+#ifndef LIBUSB_GLOBAL_INCLUDE_FILE
 #include <stdint.h>
-#include <string.h>
-#include <time.h>
+#endif
 
 #ifdef __cplusplus
 extern	"C" {

Modified: user/attilio/vmcontention/lib/libusb/libusb20_desc.c
==============================================================================
--- user/attilio/vmcontention/lib/libusb/libusb20_desc.c	Thu Mar 14 01:53:32 2013	(r248260)
+++ user/attilio/vmcontention/lib/libusb/libusb20_desc.c	Thu Mar 14 02:00:21 2013	(r248261)
@@ -24,11 +24,15 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/queue.h>
-
+#ifdef LIBUSB_GLOBAL_INCLUDE_FILE
+#include LIBUSB_GLOBAL_INCLUDE_FILE
+#else
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <time.h>
+#include <sys/queue.h>
+#endif
 
 #include "libusb20.h"
 #include "libusb20_desc.h"

Modified: user/attilio/vmcontention/lib/libusb/libusb20_desc.h
==============================================================================
--- user/attilio/vmcontention/lib/libusb/libusb20_desc.h	Thu Mar 14 01:53:32 2013	(r248260)
+++ user/attilio/vmcontention/lib/libusb/libusb20_desc.h	Thu Mar 14 02:00:21 2013	(r248261)
@@ -45,6 +45,10 @@
 #ifndef _LIBUSB20_DESC_H_
 #define	_LIBUSB20_DESC_H_
 
+#ifndef LIBUSB_GLOBAL_INCLUDE_FILE
+#include <stdint.h>
+#endif
+
 #ifdef __cplusplus
 extern	"C" {
 #endif

Modified: user/attilio/vmcontention/lib/libusb/libusb20_ugen20.c
==============================================================================
--- user/attilio/vmcontention/lib/libusb/libusb20_ugen20.c	Thu Mar 14 01:53:32 2013	(r248260)
+++ user/attilio/vmcontention/lib/libusb/libusb20_ugen20.c	Thu Mar 14 02:00:21 2013	(r248261)
@@ -24,24 +24,28 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/queue.h>
-#include <sys/types.h>
-
+#ifdef LIBUSB_GLOBAL_INCLUDE_FILE
+#include LIBUSB_GLOBAL_INCLUDE_FILE
+#else
 #include <errno.h>
 #include <fcntl.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
-
-#include "libusb20.h"
-#include "libusb20_desc.h"
-#include "libusb20_int.h"
+#include <time.h>
+#include <sys/queue.h>
+#include <sys/types.h>
+#endif
 
 #include <dev/usb/usb.h>
 #include <dev/usb/usbdi.h>
 #include <dev/usb/usb_ioctl.h>
 
+#include "libusb20.h"
+#include "libusb20_desc.h"
+#include "libusb20_int.h"
+
 static libusb20_init_backend_t ugen20_init_backend;
 static libusb20_open_device_t ugen20_open_device;
 static libusb20_close_device_t ugen20_close_device;

Copied: user/attilio/vmcontention/lib/libusb/libusb_global_linux.h (from r248260, head/lib/libusb/libusb_global_linux.h)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/attilio/vmcontention/lib/libusb/libusb_global_linux.h	Thu Mar 14 02:00:21 2013	(r248261, copy of r248260, head/lib/libusb/libusb_global_linux.h)
@@ -0,0 +1,69 @@
+/* $FreeBSD$ */
+/*-
+ * Copyright (c) 2013 Hans Petter Selasky. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _LIBUSB_GLOBAL_LINUX_H_
+#define	_LIBUSB_GLOBAL_LINUX_H_
+
+#define	_XOPEN_SOURCE
+#define	_BSD_SOURCE
+#define	_POSIX_SOURCE
+#define	_POSIX_C_SOURCE 200809
+
+#include <ctype.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <time.h>
+#include <unistd.h>
+#include <alloca.h>
+#include <string.h>
+#include <fcntl.h>
+#include <limits.h>
+#include <pthread.h>
+#include <sys/queue.h>
+#include <sys/ioctl.h>
+#include <sys/poll.h>
+#include <sys/time.h>
+#include <dev/usb/usb_endian.h>
+#include <dev/usb/usb_freebsd.h>
+
+#ifndef __aligned
+#define	__aligned(x) __attribute__((__aligned__(x)))
+#endif
+
+#ifndef __packed
+#define	__packed __attribute__((__packed__))
+#endif
+
+#ifndef strlcpy
+#define	strlcpy(d,s,len) do {			\
+    strncpy(d,s,len);				\
+    ((char *)d)[(len) - 1] = 0;			\
+} while (0)
+#endif
+
+#endif					/* _LIBUSB_GLOBAL_LINUX_H_ */

Modified: user/attilio/vmcontention/lib/libusb/usb.h
==============================================================================
--- user/attilio/vmcontention/lib/libusb/usb.h	Thu Mar 14 01:53:32 2013	(r248260)
+++ user/attilio/vmcontention/lib/libusb/usb.h	Thu Mar 14 02:00:21 2013	(r248261)
@@ -27,10 +27,11 @@
 #ifndef _LIBUSB20_COMPAT_01_H_
 #define	_LIBUSB20_COMPAT_01_H_
 
+#ifndef LIBUSB_GLOBAL_INCLUDE_FILE
+#include <stdint.h>
 #include <sys/param.h>
 #include <sys/endian.h>
-
-#include <stdint.h>
+#endif
 
 /* USB interface class codes */
 

Modified: user/attilio/vmcontention/share/man/man4/cas.4
==============================================================================
--- user/attilio/vmcontention/share/man/man4/cas.4	Thu Mar 14 01:53:32 2013	(r248260)
+++ user/attilio/vmcontention/share/man/man4/cas.4	Thu Mar 14 02:00:21 2013	(r248261)
@@ -44,7 +44,7 @@ Alternatively, to load the driver as a
 module at boot time, place the following line in
 .Xr loader.conf 5 :
 .Bd -literal -offset indent
-if_cas="YES"
+if_cas_load="YES"
 .Ed
 .Sh DESCRIPTION
 The

Modified: user/attilio/vmcontention/share/man/man4/sge.4
==============================================================================
--- user/attilio/vmcontention/share/man/man4/sge.4	Thu Mar 14 01:53:32 2013	(r248260)
+++ user/attilio/vmcontention/share/man/man4/sge.4	Thu Mar 14 02:00:21 2013	(r248261)
@@ -43,7 +43,7 @@ Alternatively, to load the driver as a
 module at boot time, place the following line in
 .Xr loader.conf 5 :
 .Bd -literal -offset indent
-if_sge="YES"
+if_sge_load="YES"
 .Ed
 .Sh DESCRIPTION
 The

Modified: user/attilio/vmcontention/share/man/man4/vinum.4
==============================================================================
--- user/attilio/vmcontention/share/man/man4/vinum.4	Thu Mar 14 01:53:32 2013	(r248260)
+++ user/attilio/vmcontention/share/man/man4/vinum.4	Thu Mar 14 02:00:21 2013	(r248261)
@@ -36,7 +36,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd May 16, 2002
+.Dd March 13, 2013
 .Dt VINUM 4
 .Os
 .Sh NAME
@@ -856,9 +856,6 @@ for its NetMAX product.
 .Sh AUTHORS
 .An Greg Lehey Aq grog at lemis.com .
 .Sh BUGS
-.Nm
-is a new product.
-Bugs can be expected.
 The configuration mechanism is not yet
 fully functional.
 If you have difficulties, please look at the section
@@ -876,8 +873,6 @@ kernel and test with the KLD module.
 Detection of differences between the version of the kernel and the KLD is not
 yet implemented.
 .Pp
-The RAID-5 functionality is new in
-.Fx 3.3 .
 Some problems have been
 reported with
 .Nm

Modified: user/attilio/vmcontention/sys/dev/sound/pci/hda/hdaa_patches.c
==============================================================================
--- user/attilio/vmcontention/sys/dev/sound/pci/hda/hdaa_patches.c	Thu Mar 14 01:53:32 2013	(r248260)
+++ user/attilio/vmcontention/sys/dev/sound/pci/hda/hdaa_patches.c	Thu Mar 14 02:00:21 2013	(r248261)
@@ -346,7 +346,8 @@ hdac_pin_patch(struct hdaa_widget *w)
 	} else if (id == HDA_CODEC_ALC269 &&
 	    (subid == LENOVO_X1CRBN_SUBVENDOR ||
 	    subid == LENOVO_T430_SUBVENDOR ||
-	    subid == LENOVO_T430S_SUBVENDOR)) {
+	    subid == LENOVO_T430S_SUBVENDOR ||
+	    subid == LENOVO_T530_SUBVENDOR)) {
 		switch (nid) {
 		case 21:
 			patch = "as=1 seq=15";

Modified: user/attilio/vmcontention/sys/dev/sound/pci/hda/hdac.h
==============================================================================
--- user/attilio/vmcontention/sys/dev/sound/pci/hda/hdac.h	Thu Mar 14 01:53:32 2013	(r248260)
+++ user/attilio/vmcontention/sys/dev/sound/pci/hda/hdac.h	Thu Mar 14 02:00:21 2013	(r248261)
@@ -228,6 +228,7 @@
 #define	LENOVO_T430_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x21f3)
 #define	LENOVO_T430S_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x21fb)
 #define	LENOVO_T520_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x21cf)
+#define	LENOVO_T530_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x21f6)
 #define LENOVO_ALL_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0xffff)
 
 /* Samsung */

Modified: user/attilio/vmcontention/sys/dev/usb/usb_device.c
==============================================================================
--- user/attilio/vmcontention/sys/dev/usb/usb_device.c	Thu Mar 14 01:53:32 2013	(r248260)
+++ user/attilio/vmcontention/sys/dev/usb/usb_device.c	Thu Mar 14 02:00:21 2013	(r248261)
@@ -1698,10 +1698,14 @@ usb_alloc_device(device_t parent_dev, st
 	err = usbd_setup_device_desc(udev, NULL);
 
 	if (err != 0) {
-		/* XXX try to re-enumerate the device */
+		/* try to enumerate two more times */
 		err = usbd_req_re_enumerate(udev, NULL);
-		if (err)
-			goto done;
+		if (err != 0) {
+			err = usbd_req_re_enumerate(udev, NULL);
+			if (err != 0) {
+				goto done;
+			}
+		}
 	}
 
 	/*

Modified: user/attilio/vmcontention/sys/dev/usb/usb_request.c
==============================================================================
--- user/attilio/vmcontention/sys/dev/usb/usb_request.c	Thu Mar 14 01:53:32 2013	(r248260)
+++ user/attilio/vmcontention/sys/dev/usb/usb_request.c	Thu Mar 14 02:00:21 2013	(r248261)
@@ -76,6 +76,11 @@ static int usb_no_cs_fail;
 SYSCTL_INT(_hw_usb, OID_AUTO, no_cs_fail, CTLFLAG_RW,
     &usb_no_cs_fail, 0, "USB clear stall failures are ignored, if set");
 
+static int usb_full_ddesc;
+
+SYSCTL_INT(_hw_usb, OID_AUTO, full_ddesc, CTLFLAG_RW,
+    &usb_full_ddesc, 0, "USB always read complete device descriptor, if set");
+
 #ifdef USB_DEBUG
 #ifdef USB_REQ_DEBUG
 /* The following structures are used in connection to fault injection. */
@@ -1002,7 +1007,7 @@ usbd_req_get_desc(struct usb_device *ude
 		USETW(req.wLength, min_len);
 
 		err = usbd_do_request_flags(udev, mtx, &req,
-		    desc, 0, NULL, 1000);
+		    desc, 0, NULL, 500 /* ms */);
 
 		if (err) {
 			if (!retries) {
@@ -1887,32 +1892,41 @@ usbd_setup_device_desc(struct usb_device
 	 */
 	switch (udev->speed) {
 	case USB_SPEED_FULL:
-	case USB_SPEED_LOW:
+		if (usb_full_ddesc != 0) {
+			/* get full device descriptor */
+			err = usbd_req_get_device_desc(udev, mtx, &udev->ddesc);
+			if (err == 0)
+				break;
+		}
+
+		/* get partial device descriptor, some devices crash on this */
 		err = usbd_req_get_desc(udev, mtx, NULL, &udev->ddesc,
 		    USB_MAX_IPACKET, USB_MAX_IPACKET, 0, UDESC_DEVICE, 0, 0);
-		if (err != 0) {
-			DPRINTFN(0, "getting device descriptor "
-			    "at addr %d failed, %s\n", udev->address,
-			    usbd_errstr(err));
-			return (err);
-		}
-		break;
-	default:
-		DPRINTF("Minimum MaxPacketSize is large enough "
-		    "to hold the complete device descriptor\n");
+		if (err != 0)
+			break;
+
+		/* get the full device descriptor */
+		err = usbd_req_get_device_desc(udev, mtx, &udev->ddesc);
 		break;
-	}
 
-	/* get the full device descriptor */
-	err = usbd_req_get_device_desc(udev, mtx, &udev->ddesc);
+	default:
+		DPRINTF("Minimum bMaxPacketSize is large enough "
+		    "to hold the complete device descriptor or "
+		    "only one bMaxPacketSize choice\n");
 
-	/* try one more time, if error */
-	if (err)
+		/* get the full device descriptor */
 		err = usbd_req_get_device_desc(udev, mtx, &udev->ddesc);
 
-	if (err) {
-		DPRINTF("addr=%d, getting full desc failed\n",
-		    udev->address);
+		/* try one more time, if error */
+		if (err != 0)
+			err = usbd_req_get_device_desc(udev, mtx, &udev->ddesc);
+		break;
+	}
+
+	if (err != 0) {
+		DPRINTFN(0, "getting device descriptor "
+		    "at addr %d failed, %s\n", udev->address,
+		    usbd_errstr(err));
 		return (err);
 	}
 

Modified: user/attilio/vmcontention/sys/fs/nfs/nfsport.h
==============================================================================
--- user/attilio/vmcontention/sys/fs/nfs/nfsport.h	Thu Mar 14 01:53:32 2013	(r248260)
+++ user/attilio/vmcontention/sys/fs/nfs/nfsport.h	Thu Mar 14 02:00:21 2013	(r248261)
@@ -981,13 +981,6 @@ struct nfsreq {
 #define	NFSVNO_DELEGOK(v)	(1)
 #endif
 
-/*
- * Define this as the flags argument for msleep() when catching signals
- * while holding a resource that other threads would block for, such as
- * a vnode lock.
- */
-#define	NFS_PCATCH	(PCATCH | PBDRY)
-
 #endif	/* _KERNEL */
 
 #endif	/* _NFS_NFSPORT_H */

Modified: user/attilio/vmcontention/sys/fs/nfsclient/nfs_clbio.c
==============================================================================
--- user/attilio/vmcontention/sys/fs/nfsclient/nfs_clbio.c	Thu Mar 14 01:53:32 2013	(r248260)
+++ user/attilio/vmcontention/sys/fs/nfsclient/nfs_clbio.c	Thu Mar 14 02:00:21 2013	(r248261)
@@ -1297,7 +1297,7 @@ nfs_getcacheblk(struct vnode *vp, daddr_
  		sigset_t oldset;
 
  		newnfs_set_sigmask(td, &oldset);
-		bp = getblk(vp, bn, size, NFS_PCATCH, 0, 0);
+		bp = getblk(vp, bn, size, PCATCH, 0, 0);
  		newnfs_restore_sigmask(td, &oldset);
 		while (bp == NULL) {
 			if (newnfs_sigintr(nmp, td))
@@ -1332,7 +1332,7 @@ ncl_vinvalbuf(struct vnode *vp, int flag
 	if ((nmp->nm_mountp->mnt_kern_flag & MNTK_UNMOUNTF))
 		intrflg = 1;
 	if (intrflg) {
-		slpflag = NFS_PCATCH;
+		slpflag = PCATCH;
 		slptimeo = 2 * hz;
 	} else {
 		slpflag = 0;
@@ -1413,7 +1413,7 @@ ncl_asyncio(struct nfsmount *nmp, struct
 	}
 again:
 	if (nmp->nm_flag & NFSMNT_INT)
-		slpflag = NFS_PCATCH;
+		slpflag = PCATCH;
 	gotiod = FALSE;
 
 	/*
@@ -1478,7 +1478,7 @@ again:
 					mtx_unlock(&ncl_iod_mutex);					
 					return (error2);
 				}
-				if (slpflag == NFS_PCATCH) {
+				if (slpflag == PCATCH) {
 					slpflag = 0;
 					slptimeo = 2 * hz;
 				}

Modified: user/attilio/vmcontention/sys/fs/nfsclient/nfs_clvnops.c
==============================================================================
--- user/attilio/vmcontention/sys/fs/nfsclient/nfs_clvnops.c	Thu Mar 14 01:53:32 2013	(r248260)
+++ user/attilio/vmcontention/sys/fs/nfsclient/nfs_clvnops.c	Thu Mar 14 02:00:21 2013	(r248261)
@@ -2660,7 +2660,7 @@ ncl_flush(struct vnode *vp, int waitfor,
 	if (called_from_renewthread != 0)
 		slptimeo = hz;
 	if (nmp->nm_flag & NFSMNT_INT)
-		slpflag = NFS_PCATCH;
+		slpflag = PCATCH;
 	if (!commit)
 		passone = 0;
 	bo = &vp->v_bufobj;
@@ -2866,7 +2866,7 @@ loop:
 				error = EINTR;
 				goto done;
 			}
-			if (slpflag & PCATCH) {
+			if (slpflag == PCATCH) {
 				slpflag = 0;
 				slptimeo = 2 * hz;
 			}
@@ -2912,7 +2912,7 @@ loop:
 			    error = newnfs_sigintr(nmp, td);
 			    if (error)
 				goto done;
-			    if (slpflag & PCATCH) {
+			    if (slpflag == PCATCH) {
 				slpflag = 0;
 				slptimeo = 2 * hz;
 			    }

Modified: user/attilio/vmcontention/sys/kern/imgact_elf.c
==============================================================================
--- user/attilio/vmcontention/sys/kern/imgact_elf.c	Thu Mar 14 01:53:32 2013	(r248260)
+++ user/attilio/vmcontention/sys/kern/imgact_elf.c	Thu Mar 14 02:00:21 2013	(r248261)
@@ -661,9 +661,8 @@ __elfN(load_file)(struct proc *p, const 
 	}
 
 	/* Only support headers that fit within first page for now      */
-	/*    (multiplication of two Elf_Half fields will not overflow) */
 	if ((hdr->e_phoff > PAGE_SIZE) ||
-	    (hdr->e_phentsize * hdr->e_phnum) > PAGE_SIZE - hdr->e_phoff) {
+	    (u_int)hdr->e_phentsize * hdr->e_phnum > PAGE_SIZE - hdr->e_phoff) {
 		error = ENOEXEC;
 		goto fail;
 	}
@@ -743,7 +742,7 @@ __CONCAT(exec_, __elfN(imgact))(struct i
 	 */
 
 	if ((hdr->e_phoff > PAGE_SIZE) ||
-	    (hdr->e_phoff + hdr->e_phentsize * hdr->e_phnum) > PAGE_SIZE) {
+	    (u_int)hdr->e_phentsize * hdr->e_phnum > PAGE_SIZE - hdr->e_phoff) {
 		/* Only support headers in first page for now */
 		return (ENOEXEC);
 	}
@@ -762,8 +761,8 @@ __CONCAT(exec_, __elfN(imgact))(struct i
 		case PT_INTERP:
 			/* Path to interpreter */
 			if (phdr[i].p_filesz > MAXPATHLEN ||
-			    phdr[i].p_offset >= PAGE_SIZE ||
-			    phdr[i].p_offset + phdr[i].p_filesz >= PAGE_SIZE)
+			    phdr[i].p_offset > PAGE_SIZE ||
+			    phdr[i].p_filesz > PAGE_SIZE - phdr[i].p_offset)
 				return (ENOEXEC);
 			interp = imgp->image_header + phdr[i].p_offset;
 			interp_name_len = phdr[i].p_filesz;
@@ -1553,9 +1552,8 @@ __elfN(parse_notes)(struct image_params 
 	const char *note_name;
 	int i;
 
-	if (pnote == NULL || pnote->p_offset >= PAGE_SIZE ||
-	    pnote->p_filesz > PAGE_SIZE ||
-	    pnote->p_offset + pnote->p_filesz >= PAGE_SIZE)
+	if (pnote == NULL || pnote->p_offset > PAGE_SIZE ||
+	    pnote->p_filesz > PAGE_SIZE - pnote->p_offset)
 		return (FALSE);
 
 	note = note0 = (const Elf_Note *)(imgp->image_header + pnote->p_offset);

Modified: user/attilio/vmcontention/sys/kern/kern_et.c
==============================================================================
--- user/attilio/vmcontention/sys/kern/kern_et.c	Thu Mar 14 01:53:32 2013	(r248260)
+++ user/attilio/vmcontention/sys/kern/kern_et.c	Thu Mar 14 02:00:21 2013	(r248261)
@@ -168,7 +168,7 @@ et_start(struct eventtimer *et, sbintime
 	KASSERT(period >= 0, ("et_start: negative period"));
 	KASSERT((et->et_flags & ET_FLAGS_PERIODIC) || period == 0,
 		("et_start: period specified for oneshot-only timer"));
-	KASSERT((et->et_flags & ET_FLAGS_ONESHOT) && period == 0,
+	KASSERT((et->et_flags & ET_FLAGS_ONESHOT) || period != 0,
 		("et_start: period not specified for periodic-only timer"));
 	if (period != 0) {
 		if (period < et->et_min_period)

Modified: user/attilio/vmcontention/sys/modules/ath/Makefile
==============================================================================
--- user/attilio/vmcontention/sys/modules/ath/Makefile	Thu Mar 14 01:53:32 2013	(r248260)
+++ user/attilio/vmcontention/sys/modules/ath/Makefile	Thu Mar 14 02:00:21 2013	(r248261)
@@ -162,3 +162,7 @@ CWARNFLAGS.ah_regdomain.c=	${NO_WSHIFT_C
 # XXX Work around clang warnings, until maintainer approves fix.
 CWARNFLAGS.if_ath.c=		${NO_WSOMETIMES_UNINITIALIZED}
 CWARNFLAGS+=			${CWARNFLAGS.${.IMPSRC:T}}
+
+# AR9300 HAL build overrides, as there's still some code to tidy up
+#CWARNFLAGS.ar9300_eeprom.c=	${NO_WCONSTANT_CONVERSION}
+#CWARNFLAGS.ar9300_reset.c=	${NO_WSOMETIMES_UNINITIALIZED}

Modified: user/attilio/vmcontention/sys/nfsclient/nfs_bio.c
==============================================================================
--- user/attilio/vmcontention/sys/nfsclient/nfs_bio.c	Thu Mar 14 01:53:32 2013	(r248260)
+++ user/attilio/vmcontention/sys/nfsclient/nfs_bio.c	Thu Mar 14 02:00:21 2013	(r248261)
@@ -1242,7 +1242,7 @@ nfs_getcacheblk(struct vnode *vp, daddr_
  		sigset_t oldset;
 
  		nfs_set_sigmask(td, &oldset);
-		bp = getblk(vp, bn, size, NFS_PCATCH, 0, 0);
+		bp = getblk(vp, bn, size, PCATCH, 0, 0);
  		nfs_restore_sigmask(td, &oldset);
 		while (bp == NULL) {
 			if (nfs_sigintr(nmp, td))
@@ -1275,7 +1275,7 @@ nfs_vinvalbuf(struct vnode *vp, int flag
 	if ((nmp->nm_flag & NFSMNT_INT) == 0)
 		intrflg = 0;
 	if (intrflg) {
-		slpflag = NFS_PCATCH;
+		slpflag = PCATCH;
 		slptimeo = 2 * hz;
 	} else {
 		slpflag = 0;
@@ -1354,7 +1354,7 @@ nfs_asyncio(struct nfsmount *nmp, struct
 	}
 again:
 	if (nmp->nm_flag & NFSMNT_INT)
-		slpflag = NFS_PCATCH;
+		slpflag = PCATCH;
 	gotiod = FALSE;
 
 	/*
@@ -1419,7 +1419,7 @@ again:
 					mtx_unlock(&nfs_iod_mtx);
 					return (error2);
 				}
-				if (slpflag == NFS_PCATCH) {
+				if (slpflag == PCATCH) {
 					slpflag = 0;
 					slptimeo = 2 * hz;
 				}

Modified: user/attilio/vmcontention/sys/nfsclient/nfs_vnops.c
==============================================================================
--- user/attilio/vmcontention/sys/nfsclient/nfs_vnops.c	Thu Mar 14 01:53:32 2013	(r248260)
+++ user/attilio/vmcontention/sys/nfsclient/nfs_vnops.c	Thu Mar 14 02:00:21 2013	(r248261)
@@ -2992,7 +2992,7 @@ nfs_flush(struct vnode *vp, int waitfor,
 	int bvecsize = 0, bveccount;
 
 	if (nmp->nm_flag & NFSMNT_INT)
-		slpflag = NFS_PCATCH;
+		slpflag = PCATCH;
 	if (!commit)
 		passone = 0;
 	bo = &vp->v_bufobj;
@@ -3190,7 +3190,7 @@ loop:
 				error = EINTR;
 				goto done;
 			}
-			if (slpflag & PCATCH) {
+			if (slpflag == PCATCH) {
 				slpflag = 0;
 				slptimeo = 2 * hz;
 			}
@@ -3228,7 +3228,7 @@ loop:
 			    error = nfs_sigintr(nmp, td);
 			    if (error)
 				goto done;
-			    if (slpflag & PCATCH) {
+			    if (slpflag == PCATCH) {
 				slpflag = 0;
 				slptimeo = 2 * hz;
 			    }

Modified: user/attilio/vmcontention/sys/nfsclient/nfsmount.h
==============================================================================
--- user/attilio/vmcontention/sys/nfsclient/nfsmount.h	Thu Mar 14 01:53:32 2013	(r248260)
+++ user/attilio/vmcontention/sys/nfsclient/nfsmount.h	Thu Mar 14 02:00:21 2013	(r248261)
@@ -125,8 +125,6 @@ struct	nfsmount {
 #define NFS_DEFAULT_NEGNAMETIMEO	60
 #endif
 
-#define	NFS_PCATCH	(PCATCH | PBDRY)
-
 #endif
 
 #endif

Modified: user/attilio/vmcontention/sys/rpc/clnt_rc.c
==============================================================================
--- user/attilio/vmcontention/sys/rpc/clnt_rc.c	Thu Mar 14 01:53:32 2013	(r248260)
+++ user/attilio/vmcontention/sys/rpc/clnt_rc.c	Thu Mar 14 02:00:21 2013	(r248261)
@@ -247,8 +247,7 @@ clnt_reconnect_call(
 			stat = clnt_reconnect_connect(cl);
 			if (stat == RPC_SYSTEMERROR) {
 				error = tsleep(&fake_wchan,
-				    rc->rc_intr ? PCATCH | PBDRY : 0, "rpccon",
-				    hz);
+				    rc->rc_intr ? PCATCH : 0, "rpccon", hz);
 				if (error == EINTR || error == ERESTART)
 					return (RPC_INTR);
 				tries++;

Modified: user/attilio/vmcontention/sys/rpc/clnt_vc.c
==============================================================================
--- user/attilio/vmcontention/sys/rpc/clnt_vc.c	Thu Mar 14 01:53:32 2013	(r248260)
+++ user/attilio/vmcontention/sys/rpc/clnt_vc.c	Thu Mar 14 02:00:21 2013	(r248261)
@@ -162,7 +162,7 @@ clnt_vc_create(
 		interrupted = 0;
 		sleep_flag = PSOCK;
 		if (intrflag != 0)
-			sleep_flag |= (PCATCH | PBDRY);
+			sleep_flag |= PCATCH;
 		while ((so->so_state & SS_ISCONNECTING)
 		    && so->so_error == 0) {
 			error = msleep(&so->so_timeo, SOCK_MTX(so),
@@ -470,7 +470,6 @@ call_again:
 		errp->re_errno = error;
 		switch (error) {
 		case EINTR:
-		case ERESTART:
 			stat = RPC_INTR;
 			break;
 		case EWOULDBLOCK:
@@ -704,7 +703,7 @@ clnt_vc_control(CLIENT *cl, u_int reques
 
 	case CLSET_INTERRUPTIBLE:
 		if (*(int *) info)
-			ct->ct_waitflag = PCATCH | PBDRY;
+			ct->ct_waitflag = PCATCH;
 		else
 			ct->ct_waitflag = 0;
 		break;

Modified: user/attilio/vmcontention/usr.bin/unifdef/unifdefall.sh
==============================================================================
--- user/attilio/vmcontention/usr.bin/unifdef/unifdefall.sh	Thu Mar 14 01:53:32 2013	(r248260)
+++ user/attilio/vmcontention/usr.bin/unifdef/unifdefall.sh	Thu Mar 14 02:00:21 2013	(r248261)
@@ -42,8 +42,7 @@ case "$@" in
 	shift
 esac
 
-basename=$(basename "$0")
-tmp=$(mktemp -d "${TMPDIR:-/tmp}/$basename.XXXXXXXXXX") || exit 2
+tmp=$(mktemp -d "${TMPDIR:-/tmp}/${0##*/}.XXXXXXXXXX") || exit 2
 trap 'rm -r "$tmp" || exit 2' EXIT
 
 export LC_ALL=C

Modified: user/attilio/vmcontention/usr.sbin/usbconfig/usbconfig.c
==============================================================================
--- user/attilio/vmcontention/usr.sbin/usbconfig/usbconfig.c	Thu Mar 14 01:53:32 2013	(r248260)
+++ user/attilio/vmcontention/usr.sbin/usbconfig/usbconfig.c	Thu Mar 14 02:00:21 2013	(r248261)
@@ -33,6 +33,7 @@
 #include <grp.h>
 #include <errno.h>
 #include <ctype.h>
+#include <sys/types.h>
 
 #include <libusb20_desc.h>
 #include <libusb20.h>


More information about the svn-src-user mailing list