Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Mar 2013 16:30:17 +0000 (UTC)
From:      Attilio Rao <attilio@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r248560 - in user/attilio/vmobj-readlock: contrib/llvm/tools/clang/lib/Driver lib/libc/sys sbin/ipfw sbin/ldconfig sbin/shutdown share/man/man4 sys/arm/conf sys/arm/freescale sys/boot/f...
Message-ID:  <201303201630.r2KGUH2s098183@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: attilio
Date: Wed Mar 20 16:30:17 2013
New Revision: 248560
URL: http://svnweb.freebsd.org/changeset/base/248560

Log:
  Merge from vmcontention

Added:
  user/attilio/vmobj-readlock/sys/arm/conf/EFIKA_MX
     - copied unchanged from r248559, user/attilio/vmcontention/sys/arm/conf/EFIKA_MX
  user/attilio/vmobj-readlock/sys/arm/freescale/
     - copied from r248559, user/attilio/vmcontention/sys/arm/freescale/
  user/attilio/vmobj-readlock/sys/boot/fdt/dts/efikamx.dts
     - copied unchanged from r248559, user/attilio/vmcontention/sys/boot/fdt/dts/efikamx.dts
  user/attilio/vmobj-readlock/sys/boot/fdt/dts/imx51x.dtsi
     - copied unchanged from r248559, user/attilio/vmcontention/sys/boot/fdt/dts/imx51x.dtsi
  user/attilio/vmobj-readlock/sys/dev/ata/chipsets/ata-fsl.c
     - copied unchanged from r248559, user/attilio/vmcontention/sys/dev/ata/chipsets/ata-fsl.c
  user/attilio/vmobj-readlock/sys/dev/uart/uart_dev_imx.c
     - copied unchanged from r248559, user/attilio/vmcontention/sys/dev/uart/uart_dev_imx.c
  user/attilio/vmobj-readlock/sys/dev/uart/uart_dev_imx5xx.h
     - copied unchanged from r248559, user/attilio/vmcontention/sys/dev/uart/uart_dev_imx5xx.h
  user/attilio/vmobj-readlock/sys/dev/usb/controller/ehci_imx.c
     - copied unchanged from r248559, user/attilio/vmcontention/sys/dev/usb/controller/ehci_imx.c
Modified:
  user/attilio/vmobj-readlock/contrib/llvm/tools/clang/lib/Driver/Tools.cpp
  user/attilio/vmobj-readlock/lib/libc/sys/recv.2
  user/attilio/vmobj-readlock/lib/libc/sys/socket.2
  user/attilio/vmobj-readlock/lib/libc/sys/socketpair.2
  user/attilio/vmobj-readlock/sbin/ipfw/ipfw.8
  user/attilio/vmobj-readlock/sbin/ipfw/ipfw2.c
  user/attilio/vmobj-readlock/sbin/ipfw/ipfw2.h
  user/attilio/vmobj-readlock/sbin/ldconfig/ldconfig.c
  user/attilio/vmobj-readlock/sbin/shutdown/shutdown.8
  user/attilio/vmobj-readlock/share/man/man4/unix.4
  user/attilio/vmobj-readlock/sys/dev/ath/if_ath.c
  user/attilio/vmobj-readlock/sys/dev/ath/if_ath_beacon.c
  user/attilio/vmobj-readlock/sys/dev/ath/if_ath_rx.c
  user/attilio/vmobj-readlock/sys/dev/ath/if_ath_rx_edma.c
  user/attilio/vmobj-readlock/sys/dev/ath/if_ath_tx.c
  user/attilio/vmobj-readlock/sys/dev/ath/if_ath_tx_edma.c
  user/attilio/vmobj-readlock/sys/dev/ath/if_athvar.h
  user/attilio/vmobj-readlock/sys/dev/mii/rgephy.c
  user/attilio/vmobj-readlock/sys/dev/mii/rgephyreg.h
  user/attilio/vmobj-readlock/sys/dev/uart/uart.h
  user/attilio/vmobj-readlock/sys/dev/uart/uart_bus_fdt.c
  user/attilio/vmobj-readlock/sys/dev/usb/controller/xhci.c
  user/attilio/vmobj-readlock/sys/kern/uipc_socket.c
  user/attilio/vmobj-readlock/sys/kern/uipc_syscalls.c
  user/attilio/vmobj-readlock/sys/kern/uipc_usrreq.c
  user/attilio/vmobj-readlock/sys/net80211/ieee80211_freebsd.c
  user/attilio/vmobj-readlock/sys/netinet/ip_fw.h
  user/attilio/vmobj-readlock/sys/netpfil/ipfw/ip_fw2.c
  user/attilio/vmobj-readlock/sys/netpfil/ipfw/ip_fw_log.c
  user/attilio/vmobj-readlock/sys/netpfil/ipfw/ip_fw_sockopt.c
  user/attilio/vmobj-readlock/sys/sys/domain.h
  user/attilio/vmobj-readlock/sys/sys/socket.h
  user/attilio/vmobj-readlock/sys/vm/vnode_pager.c
Directory Properties:
  user/attilio/vmobj-readlock/   (props changed)
  user/attilio/vmobj-readlock/contrib/llvm/   (props changed)
  user/attilio/vmobj-readlock/contrib/llvm/tools/clang/   (props changed)
  user/attilio/vmobj-readlock/lib/libc/   (props changed)
  user/attilio/vmobj-readlock/sbin/   (props changed)
  user/attilio/vmobj-readlock/sbin/ipfw/   (props changed)
  user/attilio/vmobj-readlock/share/man/man4/   (props changed)
  user/attilio/vmobj-readlock/sys/   (props changed)
  user/attilio/vmobj-readlock/sys/boot/   (props changed)

Modified: user/attilio/vmobj-readlock/contrib/llvm/tools/clang/lib/Driver/Tools.cpp
==============================================================================
--- user/attilio/vmobj-readlock/contrib/llvm/tools/clang/lib/Driver/Tools.cpp	Wed Mar 20 16:27:58 2013	(r248559)
+++ user/attilio/vmobj-readlock/contrib/llvm/tools/clang/lib/Driver/Tools.cpp	Wed Mar 20 16:30:17 2013	(r248560)
@@ -5438,6 +5438,7 @@ void freebsd::Assemble::ConstructJob(Com
     switch(getToolChain().getTriple().getEnvironment()) {
     case llvm::Triple::GNUEABI:
     case llvm::Triple::EABI:
+      CmdArgs.push_back("-meabi=5");
       break;
 
     default:

Modified: user/attilio/vmobj-readlock/lib/libc/sys/recv.2
==============================================================================
--- user/attilio/vmobj-readlock/lib/libc/sys/recv.2	Wed Mar 20 16:27:58 2013	(r248559)
+++ user/attilio/vmobj-readlock/lib/libc/sys/recv.2	Wed Mar 20 16:30:17 2013	(r248560)
@@ -28,7 +28,7 @@
 .\"     @(#)recv.2	8.3 (Berkeley) 2/21/94
 .\" $FreeBSD$
 .\"
-.Dd September 12, 2012
+.Dd March 19, 2013
 .Dt RECV 2
 .Os
 .Sh NAME
@@ -121,11 +121,12 @@ argument to a
 function is formed by
 .Em or Ap ing
 one or more of the values:
-.Bl -column ".Dv MSG_DONTWAIT" -offset indent
+.Bl -column ".Dv MSG_CMSG_CLOEXEC" -offset indent
 .It Dv MSG_OOB Ta process out-of-band data
 .It Dv MSG_PEEK Ta peek at incoming message
 .It Dv MSG_WAITALL Ta wait for full request or error
 .It Dv MSG_DONTWAIT Ta do not block
+.It Dv MSG_CMSG_CLOEXEC Ta set received fds close-on-exec
 .El
 .Pp
 The
@@ -227,6 +228,10 @@ and
 .Fa cmsg_type
 set to
 .Dv SCM_RIGHTS .
+The close-on-exec flag on received descriptors is set according to the
+.Dv MSG_CMSG_CLOEXEC
+flag passed to
+.Fn recvmsg .
 .Pp
 Process credentials can also be passed as ancillary data for
 .Dv AF_UNIX

Modified: user/attilio/vmobj-readlock/lib/libc/sys/socket.2
==============================================================================
--- user/attilio/vmobj-readlock/lib/libc/sys/socket.2	Wed Mar 20 16:27:58 2013	(r248559)
+++ user/attilio/vmobj-readlock/lib/libc/sys/socket.2	Wed Mar 20 16:30:17 2013	(r248560)
@@ -28,7 +28,7 @@
 .\"     From: @(#)socket.2	8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd December 7, 2012
+.Dd March 19, 2013
 .Dt SOCKET 2
 .Os
 .Sh NAME
@@ -115,6 +115,15 @@ which is available only to the super-use
 which is planned,
 but not yet implemented, are not described here.
 .Pp
+Additionally, the following flags are allowed in the
+.Fa type
+argument:
+.Pp
+.Bd -literal -offset indent -compact
+SOCK_CLOEXEC	Set close-on-exec on the new descriptor,
+SOCK_NONBLOCK	Set non-blocking mode on the new socket
+.Ed
+.Pp
 The
 .Fa protocol
 argument

Modified: user/attilio/vmobj-readlock/lib/libc/sys/socketpair.2
==============================================================================
--- user/attilio/vmobj-readlock/lib/libc/sys/socketpair.2	Wed Mar 20 16:27:58 2013	(r248559)
+++ user/attilio/vmobj-readlock/lib/libc/sys/socketpair.2	Wed Mar 20 16:30:17 2013	(r248560)
@@ -28,7 +28,7 @@
 .\"     @(#)socketpair.2	8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd June 4, 1993
+.Dd March 19, 2013
 .Dt SOCKETPAIR 2
 .Os
 .Sh NAME
@@ -57,6 +57,14 @@ are returned in
 and
 .Fa sv Ns [1] .
 The two sockets are indistinguishable.
+.Pp
+The
+.Dv SOCK_CLOEXEC
+and
+.Dv SOCK_NONBLOCK
+flags in the
+.Fa type
+argument apply to both descriptors.
 .Sh RETURN VALUES
 .Rv -std socketpair
 .Sh ERRORS
@@ -79,6 +87,7 @@ process address space.
 .Sh SEE ALSO
 .Xr pipe 2 ,
 .Xr read 2 ,
+.Xr socket 2 ,
 .Xr write 2
 .Sh HISTORY
 The

Modified: user/attilio/vmobj-readlock/sbin/ipfw/ipfw.8
==============================================================================
--- user/attilio/vmobj-readlock/sbin/ipfw/ipfw.8	Wed Mar 20 16:27:58 2013	(r248559)
+++ user/attilio/vmobj-readlock/sbin/ipfw/ipfw.8	Wed Mar 20 16:30:17 2013	(r248560)
@@ -960,6 +960,61 @@ It is possible to use the
 keyword with setfib.
 If the tablearg value is not within the compiled range of fibs,
 the packet's fib is set to 0.
+.It Cm setdscp Ar DSCP | number | tablearg
+Set specified DiffServ codepoint for an IPv4/IPv6 packet.
+Processing continues at the next rule.
+Supported values are:
+.Pp
+.Cm CS0
+.Pq Dv 000000 ,
+.Cm CS1
+.Pq Dv 001000 ,
+.Cm CS2
+.Pq Dv 010000 ,
+.Cm CS3
+.Pq Dv 011000 ,
+.Cm CS4
+.Pq Dv 100000 ,
+.Cm CS5
+.Pq Dv 101000 ,
+.Cm CS6
+.Pq Dv 110000 ,
+.Cm CS7
+.Pq Dv 111000 ,
+.Cm AF11
+.Pq Dv 001010 ,
+.Cm AF12
+.Pq Dv 001100 ,
+.Cm AF13
+.Pq Dv 001110 ,
+.Cm AF21
+.Pq Dv 010010 ,
+.Cm AF22
+.Pq Dv 010100 ,
+.Cm AF23
+.Pq Dv 010110 ,
+.Cm AF31
+.Pq Dv 011010 ,
+.Cm AF32
+.Pq Dv 011100 ,
+.Cm AF33
+.Pq Dv 011110 ,
+.Cm AF41
+.Pq Dv 100010 ,
+.Cm AF42
+.Pq Dv 100100 ,
+.Cm AF43
+.Pq Dv 100110 ,
+.Cm EF
+.Pq Dv 101110 ,
+.Cm BE
+.Pq Dv 000000 .
+Additionally, DSCP value can be specified by number (0..64).
+It is also possible to use the
+.Cm tablearg
+keyword with setdscp.
+If the tablearg value is not within the 0..64 range, lower 6 bits of supplied
+value are used.
 .It Cm reass
 Queue and reassemble IP fragments.
 If the packet is not fragmented, counters are updated and
@@ -1454,6 +1509,17 @@ The supported IP types of service are:
 The absence of a particular type may be denoted
 with a
 .Ql \&! .
+.It Cm dscp spec Ns Op , Ns Ar spec
+Matches IPv4/IPv6 packets whose
+.Cm DS
+field value is contained in
+.Ar spec
+mask.
+Multiple values can be specified via 
+the comma separated list.
+Value can be one of keywords used in
+.Cm setdscp
+action or exact number.
 .It Cm ipttl Ar ttl-list
 Matches IPv4 packets whose time to live is included in
 .Ar ttl-list ,
@@ -2976,6 +3042,23 @@ configured on
 but coming in on
 .Li fxp1
 would be dropped.
+.Pp
+The
+.Cm setdscp
+option could be used to (re)mark user traffic,
+by adding the following to the appropriate place in ruleset:
+.Pp
+.Dl "ipfw add setdscp be ip from any to any dscp af11,af21"
+.Pp
+This rule drops all incoming packets that appear to be coming from another
+directly connected system but on the wrong interface.
+For example, a packet with a source address of
+.Li 192.168.0.0/24 ,
+configured on
+.Li fxp0 ,
+but coming in on
+.Li fxp1
+would be dropped.
 .Ss DYNAMIC RULES
 In order to protect a site from flood attacks involving fake
 TCP packets, it is safer to use dynamic rules:

Modified: user/attilio/vmobj-readlock/sbin/ipfw/ipfw2.c
==============================================================================
--- user/attilio/vmobj-readlock/sbin/ipfw/ipfw2.c	Wed Mar 20 16:27:58 2013	(r248559)
+++ user/attilio/vmobj-readlock/sbin/ipfw/ipfw2.c	Wed Mar 20 16:30:17 2013	(r248560)
@@ -167,6 +167,32 @@ static struct _s_x f_iptos[] = {
 	{ NULL,	0 }
 };
 
+static struct _s_x f_ipdscp[] = {
+	{ "af11", IPTOS_DSCP_AF11 >> 2 },	/* 001010 */
+	{ "af12", IPTOS_DSCP_AF12 >> 2 },	/* 001100 */
+	{ "af13", IPTOS_DSCP_AF13 >> 2 },	/* 001110 */
+	{ "af21", IPTOS_DSCP_AF21 >> 2 },	/* 010010 */
+	{ "af22", IPTOS_DSCP_AF22 >> 2 },	/* 010100 */
+	{ "af23", IPTOS_DSCP_AF23 >> 2 },	/* 010110 */
+	{ "af31", IPTOS_DSCP_AF31 >> 2 },	/* 011010 */
+	{ "af32", IPTOS_DSCP_AF32 >> 2 },	/* 011100 */
+	{ "af33", IPTOS_DSCP_AF33 >> 2 },	/* 011110 */
+	{ "af41", IPTOS_DSCP_AF41 >> 2 },	/* 100010 */
+	{ "af42", IPTOS_DSCP_AF42 >> 2 },	/* 100100 */
+	{ "af43", IPTOS_DSCP_AF43 >> 2 },	/* 100110 */
+	{ "be", IPTOS_DSCP_CS0 >> 2 }, 	/* 000000 */
+	{ "ef", IPTOS_DSCP_EF >> 2 },	/* 101110 */
+	{ "cs0", IPTOS_DSCP_CS0 >> 2 },	/* 000000 */
+	{ "cs1", IPTOS_DSCP_CS1 >> 2 },	/* 001000 */
+	{ "cs2", IPTOS_DSCP_CS2 >> 2 },	/* 010000 */
+	{ "cs3", IPTOS_DSCP_CS3 >> 2 },	/* 011000 */
+	{ "cs4", IPTOS_DSCP_CS4 >> 2 },	/* 100000 */
+	{ "cs5", IPTOS_DSCP_CS5 >> 2 },	/* 101000 */
+	{ "cs6", IPTOS_DSCP_CS6 >> 2 },	/* 110000 */
+	{ "cs7", IPTOS_DSCP_CS7 >> 2 },	/* 100000 */
+	{ NULL, 0 }
+};
+
 static struct _s_x limit_masks[] = {
 	{"all",		DYN_SRC_ADDR|DYN_SRC_PORT|DYN_DST_ADDR|DYN_DST_PORT},
 	{"src-addr",	DYN_SRC_ADDR},
@@ -237,6 +263,7 @@ static struct _s_x rule_actions[] = {
 	{ "nat",		TOK_NAT },
 	{ "reass",		TOK_REASS },
 	{ "setfib",		TOK_SETFIB },
+	{ "setdscp",		TOK_SETDSCP },
 	{ "call",		TOK_CALL },
 	{ "return",		TOK_RETURN },
 	{ NULL, 0 }	/* terminator */
@@ -714,6 +741,51 @@ fill_newports(ipfw_insn_u16 *cmd, char *
 	return (i);
 }
 
+/*
+ * Fill the body of the command with the list of DiffServ codepoints.
+ */
+static void
+fill_dscp(ipfw_insn *cmd, char *av, int cblen)
+{
+	uint32_t *low, *high;
+	char *s = av, *a;
+	int code;
+
+	cmd->opcode = O_DSCP;
+	cmd->len |= F_INSN_SIZE(ipfw_insn_u32) + 1;
+
+	CHECK_CMDLEN;
+
+	low = (uint32_t *)(cmd + 1);
+	high = low + 1;
+
+	*low = 0;
+	*high = 0;
+
+	while (s != NULL) {
+		a = strchr(s, ',');
+
+		if (a != NULL)
+			*a++ = '\0';
+
+		if (isalpha(*s)) {
+			if ((code = match_token(f_ipdscp, s)) == -1)
+				errx(EX_DATAERR, "Unknown DSCP code");
+		} else {
+			code = strtoul(s, NULL, 10);
+			if (code < 0 || code > 63)
+				errx(EX_DATAERR, "Invalid DSCP value");
+		}
+
+		if (code > 32)
+			*high |= 1 << (code - 32);
+		else
+			*low |= 1 << code;
+
+		s = a;
+	}
+}
+
 static struct _s_x icmpcodes[] = {
       { "net",			ICMP_UNREACH_NET },
       { "host",			ICMP_UNREACH_HOST },
@@ -972,6 +1044,32 @@ print_icmptypes(ipfw_insn_u32 *cmd)
 	}
 }
 
+static void
+print_dscp(ipfw_insn_u32 *cmd)
+{
+	int i, c;
+	uint32_t *v;
+	char sep= ' ';
+	const char *code;
+
+	printf(" dscp");
+	i = 0;
+	c = 0;
+	v = cmd->d;
+	while (i < 64) {
+		if (*v & (1 << i)) {
+			if ((code = match_value(f_ipdscp, i)) != NULL)
+				printf("%c%s", sep, code);
+			else
+				printf("%c%d", sep, i);
+			sep = ',';
+		}
+
+		if ((++i % 32) == 0)
+			v++;
+	}
+}
+
 /*
  * show_ipfw() prints the body of an ipfw rule.
  * Because the standard rule has at least proto src_ip dst_ip, we use
@@ -1205,6 +1303,17 @@ show_ipfw(struct ip_fw *rule, int pcwidt
 			PRINT_UINT_ARG("setfib ", cmd->arg1);
  			break;
 
+		case O_SETDSCP:
+		    {
+			const char *code;
+
+			if ((code = match_value(f_ipdscp, cmd->arg1)) != NULL)
+				printf("setdscp %s", code);
+			else
+				PRINT_UINT_ARG("setdscp ", cmd->arg1);
+		    }
+ 			break;
+
 		case O_REASS:
 			printf("reass");
 			break;
@@ -1500,6 +1609,10 @@ show_ipfw(struct ip_fw *rule, int pcwidt
 				printf(" ipprecedence %u", (cmd->arg1) >> 5 );
 				break;
 
+			case O_DSCP:
+				print_dscp((ipfw_insn_u32 *)cmd);
+	 			break;
+
 			case O_IPLEN:
 				if (F_LEN(cmd) == 1)
 				    printf(" iplen %u", cmd->arg1 );
@@ -3036,6 +3149,24 @@ chkarg:
 		break;
 	    }
 
+	case TOK_SETDSCP:
+	    {
+		int code;
+
+		action->opcode = O_SETDSCP;
+		NEED1("missing DSCP code");
+		if (_substrcmp(*av, "tablearg") == 0) {
+			action->arg1 = IP_FW_TABLEARG;
+		} else if (isalpha(*av[0])) {
+			if ((code = match_token(f_ipdscp, *av)) == -1)
+				errx(EX_DATAERR, "Unknown DSCP code");
+			action->arg1 = code;
+		} else
+		        action->arg1 = strtoul(*av, NULL, 10);
+		av++;
+		break;
+	    }
+
 	case TOK_REASS:
 		action->opcode = O_REASS;
 		break;
@@ -3448,6 +3579,12 @@ read_options:
 			av++;
 			break;
 
+		case TOK_DSCP:
+			NEED1("missing DSCP code");
+			fill_dscp(cmd, *av, cblen);
+			av++;
+			break;
+
 		case TOK_IPOPTS:
 			NEED1("missing argument for ipoptions");
 			fill_flags(cmd, O_IPOPT, f_ipopts, *av);
@@ -3985,10 +4122,9 @@ ipfw_table_handler(int ac, char *av[])
 	int do_add;
 	int is_all;
 	size_t len;
-	uint32_t a, mask;
+	uint32_t a;
 	uint32_t tables_max;
 
-	mask = 0;	// XXX uninitialized ?
 	len = sizeof(tables_max);
 	if (sysctlbyname("net.inet.ip.fw.tables_max", &tables_max, &len,
 	    NULL, 0) == -1) {

Modified: user/attilio/vmobj-readlock/sbin/ipfw/ipfw2.h
==============================================================================
--- user/attilio/vmobj-readlock/sbin/ipfw/ipfw2.h	Wed Mar 20 16:27:58 2013	(r248559)
+++ user/attilio/vmobj-readlock/sbin/ipfw/ipfw2.h	Wed Mar 20 16:30:17 2013	(r248560)
@@ -203,6 +203,7 @@ enum tokens {
 	TOK_SETFIB,
 	TOK_LOOKUP,
 	TOK_SOCKARG,
+	TOK_SETDSCP,
 };
 /*
  * the following macro returns an error message if we run out of

Modified: user/attilio/vmobj-readlock/sbin/ldconfig/ldconfig.c
==============================================================================
--- user/attilio/vmobj-readlock/sbin/ldconfig/ldconfig.c	Wed Mar 20 16:27:58 2013	(r248559)
+++ user/attilio/vmobj-readlock/sbin/ldconfig/ldconfig.c	Wed Mar 20 16:30:17 2013	(r248560)
@@ -97,6 +97,13 @@ static void		listhints(void);
 static int		readhints(void);
 static void		usage(void);
 
+/*
+ * Note on aout/a.out support.
+ * To properly support shared libraries for compat2x, which are a.out, we need
+ * to support a.out here.  As of 2013, bug reports are still coming in for this
+ * feature (on amd64 no less), so we know it is still in use.
+ */
+
 int
 main(int argc, char **argv)
 {

Modified: user/attilio/vmobj-readlock/sbin/shutdown/shutdown.8
==============================================================================
--- user/attilio/vmobj-readlock/sbin/shutdown/shutdown.8	Wed Mar 20 16:27:58 2013	(r248559)
+++ user/attilio/vmobj-readlock/sbin/shutdown/shutdown.8	Wed Mar 20 16:30:17 2013	(r248560)
@@ -28,7 +28,7 @@
 .\"     @(#)shutdown.8	8.2 (Berkeley) 4/27/95
 .\" $FreeBSD$
 .\"
-.Dd July 13, 2011
+.Dd March 19, 2013
 .Dt SHUTDOWN 8
 .Os
 .Sh NAME
@@ -189,6 +189,11 @@ tells
 .Xr login 1
 not to let anyone log in
 .El
+.Sh EXAMPLES
+Reboot the system in 30 minutes and display a warning message on the terminals
+of all users currently logged in:
+.Pp
+.Dl # shutdown -r +30 \&"System will reboot\&"
 .Sh COMPATIBILITY
 The hours and minutes in the second time format may be separated by
 a colon (``:'') for backward compatibility.

Modified: user/attilio/vmobj-readlock/share/man/man4/unix.4
==============================================================================
--- user/attilio/vmobj-readlock/share/man/man4/unix.4	Wed Mar 20 16:27:58 2013	(r248559)
+++ user/attilio/vmobj-readlock/share/man/man4/unix.4	Wed Mar 20 16:30:17 2013	(r248560)
@@ -32,7 +32,7 @@
 .\"     @(#)unix.4	8.1 (Berkeley) 6/9/93
 .\" $FreeBSD$
 .\"
-.Dd November 16, 2012
+.Dd March 19, 2013
 .Dt UNIX 4
 .Os
 .Sh NAME
@@ -153,13 +153,15 @@ plus the size of the array of file descr
 .Pp
 The received descriptor is a
 .Em duplicate
-of the sender's descriptor, as if it were created with a call to
-.Xr dup 2 .
-Per-process descriptor flags, set with
-.Xr fcntl 2 ,
-are
-.Em not
-passed to a receiver.
+of the sender's descriptor, as if it were created via
+.Li dup(fd)
+or
+.Li fcntl(fd, F_DUPFD_CLOEXEC, 0)
+depending on whether
+.Dv MSG_CMSG_CLOEXEC
+is passed in the
+.Xr recvmsg 2
+call.
 Descriptors that are awaiting delivery, or that are
 purposely not received, are automatically closed by the system
 when the destination socket is closed.

Copied: user/attilio/vmobj-readlock/sys/arm/conf/EFIKA_MX (from r248559, user/attilio/vmcontention/sys/arm/conf/EFIKA_MX)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/attilio/vmobj-readlock/sys/arm/conf/EFIKA_MX	Wed Mar 20 16:30:17 2013	(r248560, copy of r248559, user/attilio/vmcontention/sys/arm/conf/EFIKA_MX)
@@ -0,0 +1,177 @@
+# Kernel configuration for Efika MX Smarttop/Smartbook boards
+#
+# For more information on this file, please read the config(5) manual page,
+# and/or the handbook section on Kernel Configuration Files:
+#
+#    http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
+#
+# The handbook is also available locally in /usr/share/doc/handbook
+# if you've installed the doc distribution, otherwise always see the
+# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the
+# latest information.
+#
+# An exhaustive list of options and more detailed explanations of the
+# device lines is also present in the ../../conf/NOTES and NOTES files.
+# If you are in doubt as to the purpose or necessity of a line, check first
+# in NOTES.
+#
+# $FreeBSD$
+
+ident		EFIKA_MX
+
+include 	"../freescale/imx/std.imx"
+
+makeoptions 	WITHOUT_MODULES="ahc"
+
+makeoptions	DEBUG=-g		# Build kernel with gdb(1) debug symbols
+#options 	DEBUG
+
+options 	SCHED_4BSD		# 4BSD scheduler
+#options 	PREEMPTION		# Enable kernel thread preemption
+options 	INET			# InterNETworking
+#options 	INET6			# IPv6 communications protocols
+#options 	SCTP			# Stream Control Transmission Protocol
+options 	FFS			# Berkeley Fast Filesystem
+options 	SOFTUPDATES		# Enable FFS soft updates support
+options 	UFS_ACL			# Support for access control lists
+options 	UFS_DIRHASH		# Improve performance on big directories
+options 	UFS_GJOURNAL		# Enable gjournal-based UFS journaling
+#options 	MD_ROOT			# MD is a potential root device
+options 	NFSCL			# New Network Filesystem Client
+#options 	NFSD			# New Network Filesystem Server
+options 	NFSLOCKD		# Network Lock Manager
+options 	NFS_ROOT		# NFS usable as /, requires NFSCL
+options 	MSDOSFS			# MSDOS Filesystem
+options 	CD9660			# ISO 9660 Filesystem
+#options 	PROCFS			# Process filesystem (requires PSEUDOFS)
+options 	PSEUDOFS		# Pseudo-filesystem framework
+options 	TMPFS			# TMP Memory Filesystem
+options 	GEOM_PART_GPT		# GUID Partition Tables.
+options 	GEOM_LABEL		# Provides labelization
+#options 	COMPAT_FREEBSD5		# Compatible with FreeBSD5
+#options 	COMPAT_FREEBSD6		# Compatible with FreeBSD6
+#options 	COMPAT_FREEBSD7		# Compatible with FreeBSD7
+options 	SCSI_DELAY=5000		# Delay (in ms) before probing SCSI
+options 	KTRACE			# ktrace(1) support
+options 	SYSVSHM			# SYSV-style shared memory
+options 	SYSVMSG			# SYSV-style message queues
+options 	SYSVSEM			# SYSV-style semaphores
+options 	_KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
+options 	INCLUDE_CONFIG_FILE	# Include this file in kernel
+
+# required for netbooting
+#options 	BOOTP
+#options 	BOOTP_COMPAT
+#options 	BOOTP_NFSROOT
+#options 	BOOTP_NFSV3
+#options 	BOOTP_WIRED_TO=ue0
+#
+options 	ROOTDEVNAME=\"ufs:ada0s2a\"
+
+
+# kernel/memory size reduction
+#options 	MUTEX_NOINLINE
+#options 	NO_FFS_SNAPSHOT
+#options 	NO_SWAPPING
+#options 	NO_SYSCTL_DESCR
+#options 	RWLOCK_NOINLINE
+
+# Debugging support.  Always need this:
+options 	KDB			# Enable kernel debugger support.
+# For minimum debugger support (stable branch) use:
+#options 	KDB_TRACE		# Print a stack trace for a panic.
+# For full debugger support use this instead:
+options 	DDB			# Support DDB.
+#options 	GDB			# Support remote GDB.
+options 	DEADLKRES		# Enable the deadlock resolver
+options 	INVARIANTS		# Enable calls of extra sanity checking
+options 	INVARIANT_SUPPORT	# Extra sanity checks of internal structures, required by INVARIANTS
+options 	WITNESS			# Enable checks to detect deadlocks and cycles
+
+# The `bpf' device enables the Berkeley Packet Filter.
+# Be aware of the administrative consequences of enabling this!
+# Note that 'bpf' is required for DHCP.
+device		bpf		# Berkeley packet filter
+
+# Pseudo devices.
+device		loop		# Network loopback
+device		random		# Entropy device
+device		ether		# Ethernet support
+#device		vlan		# 802.1Q VLAN support
+#device		tun		# Packet tunnel.
+#device		md		# Memory "disks"
+#device		gif		# IPv6 and IPv4 tunneling
+#device		faith		# IPv6-to-IPv4 relaying (translation)
+#device		firmware	# firmware assist module
+
+# Serial (COM) ports
+device		uart		# Multi-uart driver
+options 	ALT_BREAK_TO_DEBUGGER
+
+device		ata
+device		atapci		# Only for helper functions
+device		imxata
+options 	ATA_CAM
+options 	ATA_STATIC_ID	# Static device numbering
+
+device		iomux		# IO Multiplexor
+
+device		gpio
+device		gpioled
+
+device		fsliic
+device		iic
+device		iicbus
+
+# SCSI peripherals
+device		scbus		# SCSI bus (required for SCSI)
+device		da		# Direct Access (disks)
+device		cd		# CD
+device		pass		# Passthrough device (direct SCSI access)
+
+# USB support
+#options 	USB_DEBUG	# enable debug msgs
+device		ehci		# OHCI USB interface
+device		usb		# USB Bus (required)
+device		umass		# Disks/Mass storage - Requires scbus and da
+device		uhid		# "Human Interface Devices"
+device		u3g
+
+# USB Ethernet, requires miibus
+device		miibus
+device		aue		# ADMtek USB Ethernet
+device		axe		# ASIX Electronics USB Ethernet
+device		cdce		# Generic USB over Ethernet
+device		cue		# CATC USB Ethernet
+device		kue		# Kawasaki LSI USB Ethernet
+device		rue		# RealTek RTL8150 USB Ethernet
+device		udav		# Davicom DM9601E USB
+
+# USB Wireless
+device		rum		# Ralink Technology RT2501USB wireless NICs
+
+# Watchdog timer.
+# WARNING: can't be disabled!!!
+device		imxwdt		# Watchdog
+
+# Wireless NIC cards
+device		wlan		# 802.11 support
+device		wlan_wep	# 802.11 WEP support
+device		wlan_ccmp	# 802.11 CCMP support
+device		wlan_tkip	# 802.11 TKIP support
+device		wlan_amrr	# AMRR transmit rate control algorithm
+
+# Flattened Device Tree
+options         FDT
+options         FDT_DTB_STATIC
+makeoptions     FDT_DTS_FILE=efikamx.dts
+
+# NOTE: serial console will be disabled if syscons enabled
+# Uncomment following lines for framebuffer/syscons support
+device		sc
+device		kbdmux
+options         SC_DFLT_FONT    # compile font in
+makeoptions     SC_DFLT_FONT=cp437
+device		ukbd		# Allow keyboard like HIDs to control console
+
+device		ums

Copied: user/attilio/vmobj-readlock/sys/boot/fdt/dts/efikamx.dts (from r248559, user/attilio/vmcontention/sys/boot/fdt/dts/efikamx.dts)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/attilio/vmobj-readlock/sys/boot/fdt/dts/efikamx.dts	Wed Mar 20 16:30:17 2013	(r248560, copy of r248559, user/attilio/vmcontention/sys/boot/fdt/dts/efikamx.dts)
@@ -0,0 +1,122 @@
+/*
+ * Copyright (c) 2012 The FreeBSD Foundation
+ * All rights reserved.
+ *
+ * This software was developed by Semihalf under sponsorship from
+ * the FreeBSD Foundation.
+ *
+ * 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.
+ *
+ * Freescale i.MX515 Device Tree Source.
+ *
+ * $FreeBSD$
+ */
+
+/dts-v1/;
+/include/ "imx51x.dtsi"
+
+/ {
+	model = "Genesi Efika MX";
+	compatible = "genesi,imx51-efikamx";
+
+	memory {
+		/* RAM 512M */
+		reg = <0x90000000 0x20000000>;
+	};
+
+	localbus@5e000000 {
+		ipu3@5e000000 {
+			status = "okay";
+		};
+	};
+
+	soc@70000000 {
+		aips@70000000 {
+			spba@70000000 {
+				esdhc@70004000 {
+					clock-frequency = <216000000>;
+					status = "okay";
+				};
+				esdhc@70008000 {
+					clock-frequency = <216000000>;
+					status = "okay";
+				};
+				SSI2: ssi@70014000 {
+					status = "okay";
+				};
+			};
+			timer@73fa0000 {
+				status = "okay";
+			};
+
+			/* UART1, console */
+			UART1: serial@73fbc000 {
+				status = "okay";
+				clock-frequency = <3000000>; /* XXX */
+			};
+
+			clock@73fd4000 {
+				status = "okay";
+			};
+			gpio@73f84000 {
+				status = "okay";
+			};
+			gpio@73f88000 {
+				status = "okay";
+			};
+			gpio@73f8c000 {
+				status = "okay";
+			};
+			gpio@73f90000 {
+				status = "okay";
+			};
+			wdog@73f98000 {
+				status = "okay";
+			};
+		};
+		aips@80000000 {
+			i2c@83fc4000 {
+				status = "okay";
+			};
+			i2c@83fc8000 {
+				status = "okay";
+			};
+			audmux@83fd4000 {
+				status = "okay";
+			};
+			ide@83fe0000 {
+				status = "okay";
+			};
+		};
+	};
+
+	aliases {
+		UART1 = &UART1;
+		SSI2 = &SSI2;
+	};
+
+	chosen {
+		bootargs = "-v";
+		stdin = "UART1";
+		stdout = "UART1";
+	};
+};

Copied: user/attilio/vmobj-readlock/sys/boot/fdt/dts/imx51x.dtsi (from r248559, user/attilio/vmcontention/sys/boot/fdt/dts/imx51x.dtsi)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/attilio/vmobj-readlock/sys/boot/fdt/dts/imx51x.dtsi	Wed Mar 20 16:30:17 2013	(r248560, copy of r248559, user/attilio/vmcontention/sys/boot/fdt/dts/imx51x.dtsi)
@@ -0,0 +1,590 @@
+/*
+ * Copyright (c) 2012 The FreeBSD Foundation
+ * All rights reserved.
+ *
+ * This software was developed by Semihalf under sponsorship from
+ * the FreeBSD Foundation.
+ *
+ * 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.
+ *
+ * Freescale i.MX515 Device Tree Source.
+ *
+ * $FreeBSD$
+ */
+
+/ {
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	aliases {
+		soc = &SOC;
+	};
+
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu@0 {
+			device_type = "cpu";
+			compatible = "ARM,MCIMX515";
+			reg = <0x0>;
+			d-cache-line-size = <32>;
+			i-cache-line-size = <32>;
+			d-cache-size = <0x8000>;
+			i-cache-size = <0x8000>;
+			/* TODO: describe L2 cache also */
+			timebase-frequency = <0>;
+			bus-frequency = <0>;
+			clock-frequency = <0>;
+		};
+	};
+
+	localbus@e0000000 {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		/* This reflects CPU decode windows setup. */
+		ranges;
+
+		tzic: tz-interrupt-controller@e0000000 {
+			compatible = "fsl,imx51-tzic", "fsl,tzic";
+			interrupt-controller;
+			#interrupt-cells = <1>;
+			reg = <0xe0000000 0x00004000>;
+		};
+		/*
+		 * 60000000 60000FFF 4K Debug ROM
+		 * 60001000 60001FFF 4K ETB
+		 * 60002000 60002FFF 4K ETM
+		 * 60003000 60003FFF 4K TPIU
+		 * 60004000 60004FFF 4K CTI0
+		 * 60005000 60005FFF 4K CTI1
+		 * 60006000 60006FFF 4K CTI2
+		 * 60007000 60007FFF 4K CTI3
+		 * 60008000 60008FFF 4K Cortex Debug Unit
+		 *
+		 * E0000000 E0003FFF 0x4000 TZIC
+		 */
+	};
+
+	SOC: soc@70000000 {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <1>;
+    		interrupt-parent = <&tzic>;
+		ranges = <0x70000000 0x70000000 0x14000000>;
+
+		aips@70000000 { /* AIPS1 */
+			compatible = "fsl,aips-bus", "simple-bus";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			interrupt-parent = <&tzic>;
+			ranges;
+
+			/* Required by many devices, so better to stay first */
+			/* 73FD4000 0x4000 CCM */
+			clock@73fd4000 {
+				compatible = "fsl,imx51-ccm";
+			/* 83F80000 0x4000 DPLLIP1 */
+			/* 83F84000 0x4000 DPLLIP2 */
+			/* 83F88000 0x4000 DPLLIP3 */
+				reg = <0x73fd4000 0x4000
+					0x83F80000 0x4000
+					0x83F84000 0x4000
+					0x83F88000 0x4000>;
+				interrupt-parent = <&tzic>;
+				interrupts = <71 72>;
+				status = "disabled";
+			};
+
+			/*
+			 * GPIO modules moved up - to have it attached for
+			 * drivers which rely on GPIO
+			 */
+			/* 73F84000 0x4000 GPIO1 */
+			gpio1: gpio@73f84000 {
+				compatible = "fsl,imx51-gpio", "fsl,imx31-gpio";
+				reg = <0x73f84000 0x4000>;
+				interrupt-parent = <&tzic>;
+				interrupts = <50 51 42 43 44 45 46 47 48 49>;
+				/* TODO: use <> also */
+				gpio-controller;
+				#gpio-cells = <2>;
+				interrupt-controller;
+				#interrupt-cells = <1>;
+			};
+
+			/* 73F88000 0x4000 GPIO2 */
+			gpio2: gpio@73f88000 {
+				compatible = "fsl,imx51-gpio", "fsl,imx31-gpio";
+				reg = <0x73f88000 0x4000>;
+				interrupt-parent = <&tzic>;
+				interrupts = <52 53>;
+				gpio-controller;
+				#gpio-cells = <2>;
+				interrupt-controller;
+				#interrupt-cells = <1>;
+			};
+
+			/* 73F8C000 0x4000 GPIO3 */
+			gpio3: gpio@73f8c000 {
+				compatible = "fsl,imx51-gpio", "fsl,imx31-gpio";
+				reg = <0x73f8c000 0x4000>;
+				interrupt-parent = <&tzic>;
+				interrupts = <54 55>;
+				gpio-controller;
+				#gpio-cells = <2>;
+				interrupt-controller;
+				#interrupt-cells = <1>;
+			};
+
+			/* 73F90000 0x4000 GPIO4 */
+			gpio4: gpio@73f90000 {
+				compatible = "fsl,imx51-gpio", "fsl,imx31-gpio";
+				reg = <0x73f90000 0x4000>;
+				interrupt-parent = <&tzic>;
+				interrupts = <56 57>;
+				gpio-controller;
+				#gpio-cells = <2>;
+				interrupt-controller;
+				#interrupt-cells = <1>;
+			};
+
+			spba@70000000 {
+				compatible = "fsl,spba-bus", "simple-bus";
+				#address-cells = <1>;
+				#size-cells = <1>;
+				interrupt-parent = <&tzic>;
+				ranges;
+
+				/* 70004000 0x4000 ESDHC 1 */
+				esdhc@70004000 {
+					compatible = "fsl,imx51-esdhc";
+					reg = <0x70004000 0x4000>;
+					interrupt-parent = <&tzic>; interrupts = <1>;
+					status = "disabled";
+				};
+
+				/* 70008000 0x4000 ESDHC 2 */

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



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