From owner-svn-src-releng@FreeBSD.ORG Sun Oct 12 00:34:19 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C081C711; Sun, 12 Oct 2014 00:34:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ACF48C6F; Sun, 12 Oct 2014 00:34:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9C0YJN4088734; Sun, 12 Oct 2014 00:34:19 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9C0YJi6088733; Sun, 12 Oct 2014 00:34:19 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201410120034.s9C0YJi6088733@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 12 Oct 2014 00:34:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r272975 - releng/10.1/usr.bin/find X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Oct 2014 00:34:19 -0000 Author: emaste Date: Sun Oct 12 00:34:18 2014 New Revision: 272975 URL: https://svnweb.freebsd.org/changeset/base/272975 Log: MFS r272922: Correct scale factor for T terabyte suffix PR: 194250 Approved by: re Modified: releng/10.1/usr.bin/find/function.c Directory Properties: releng/10.1/ (props changed) Modified: releng/10.1/usr.bin/find/function.c ============================================================================== --- releng/10.1/usr.bin/find/function.c Sat Oct 11 23:49:27 2014 (r272974) +++ releng/10.1/usr.bin/find/function.c Sun Oct 12 00:34:18 2014 (r272975) @@ -1500,7 +1500,7 @@ c_size(OPTION *option, char ***argvp) scale = 0x40000000LL; break; case 'T': /* terabytes 1<<40 */ - scale = 0x1000000000LL; + scale = 0x10000000000LL; break; case 'P': /* petabytes 1<<50 */ scale = 0x4000000000000LL; From owner-svn-src-releng@FreeBSD.ORG Sun Oct 12 10:40:00 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A9C5EE85; Sun, 12 Oct 2014 10:40:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 961C73F9; Sun, 12 Oct 2014 10:40:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9CAe0ht069975; Sun, 12 Oct 2014 10:40:00 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9CAe0hT069972; Sun, 12 Oct 2014 10:40:00 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201410121040.s9CAe0hT069972@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Sun, 12 Oct 2014 10:40:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r272981 - releng/10.1/sys/dev/hwpmc X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Oct 2014 10:40:00 -0000 Author: bz Date: Sun Oct 12 10:39:59 2014 New Revision: 272981 URL: https://svnweb.freebsd.org/changeset/base/272981 Log: MFS r272892 (r272713 in head): Since introducing the extra mapping in r250103 (head) for architectural performance events we have actually counted 'Branch Instruction Retired' when people asked for 'Unhalted core cycles' using the 'unhalted-core-cycles' event mask mnemonic. Reviewed by: jimharris Discussed with: gnn, rwatson Sponsored by: DARPA/AFRL Approved by: re (gjb) Modified: releng/10.1/sys/dev/hwpmc/hwpmc_core.c Directory Properties: releng/10.1/ (props changed) Modified: releng/10.1/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- releng/10.1/sys/dev/hwpmc/hwpmc_core.c Sun Oct 12 10:07:26 2014 (r272980) +++ releng/10.1/sys/dev/hwpmc/hwpmc_core.c Sun Oct 12 10:39:59 2014 (r272981) @@ -1796,7 +1796,7 @@ iap_is_event_architectural(enum pmc_even switch (pe) { case PMC_EV_IAP_ARCH_UNH_COR_CYC: ae = CORE_AE_UNHALTED_CORE_CYCLES; - *map = PMC_EV_IAP_EVENT_C4H_00H; + *map = PMC_EV_IAP_EVENT_3CH_00H; break; case PMC_EV_IAP_ARCH_INS_RET: ae = CORE_AE_INSTRUCTION_RETIRED; From owner-svn-src-releng@FreeBSD.ORG Sun Oct 12 17:07:17 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D20E36F4; Sun, 12 Oct 2014 17:07:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BCB13E44; Sun, 12 Oct 2014 17:07:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9CH7HXs058552; Sun, 12 Oct 2014 17:07:17 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9CH7GYK058546; Sun, 12 Oct 2014 17:07:16 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201410121707.s9CH7GYK058546@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 12 Oct 2014 17:07:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r272991 - in releng/10.1: share/man/man4 sys/netinet sys/netinet6 X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Oct 2014 17:07:17 -0000 Author: tuexen Date: Sun Oct 12 17:07:15 2014 New Revision: 272991 URL: https://svnweb.freebsd.org/changeset/base/272991 Log: MFC r272627: Checksum coverage values larger than 65535 for UDPLite are invalid. Check for this when the user calls setsockopt using UDPLITE_{SEND,RECV}CSCOV. MFC r272628: When plen != ulen, it should only be checked when this is UDP. MFC r272645: If the checksum coverage field in the UDPLITE header is the length of the complete UDPLITE packet, the packet has full checksum coverage. So fix the condition. MFC r272660: UDPLite requires a checksum. Therefore, discard a received packet if the checksum is 0. MFC r272661: The default for UDPLITE_RECV_CSCOV is zero. RFC 3828 recommend that this means full checksum coverage for received packets. If an application is willing to accept packets with partial coverage, it is expected to use the socket option and provide the minimum coverage it accepts. MFC r272662: Fix the checksum computation for UDPLite/IPv6. This requires the usage of a function computing the checksum only over a part of the function. Therefore introduce in6_cksum_partial() and implement in6_cksum() based on that. While there, ensure that the UDPLite packet contains at least enough bytes to contain the header. MFC r272663: Check for UDP/IPv6 packets that the length in the UDP header is at least the minimum. Make the check similar to the one for UDPLite/IPv6. MFC r272664: UDP/IPv6 and UDPLite/IPv6 require a checksum. So check for it. MFC r272754: Fix a bug introduced in https://svnweb.freebsd.org/base?view=revision&revision=272347 Approved by: re (gjb) Modified: releng/10.1/share/man/man4/udplite.4 releng/10.1/sys/netinet/udp_usrreq.c releng/10.1/sys/netinet6/in6.h releng/10.1/sys/netinet6/in6_cksum.c releng/10.1/sys/netinet6/udp6_usrreq.c Directory Properties: releng/10.1/ (props changed) Modified: releng/10.1/share/man/man4/udplite.4 ============================================================================== --- releng/10.1/share/man/man4/udplite.4 Sun Oct 12 17:03:47 2014 (r272990) +++ releng/10.1/share/man/man4/udplite.4 Sun Oct 12 17:07:15 2014 (r272991) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 7, 2014 +.Dd October 1, 2014 .Dt UDPLITE 4 .Os .Sh NAME @@ -55,16 +55,16 @@ and tested with .Bl -tag -width ".Dv UDPLITE_SEND_CSCOV" .It Dv UDPLITE_SEND_CSCOV This option sets the sender checksum coverage. -A value of zero indicates that the entire packet -is covered by the checksum. -A value of 1 to 7 must be discarded by the receiver. +A value of zero indicates that all sent packets will have +full checksum coverage. +A value of 8 to 65535 limits the checksum coverage of all sent packets +to the value given. .It Dv UDPLITE_RECV_CSCOV This option is the receiver-side analogue. -It is truly optional, i.e. not required to enable traffic -with partial checksum coverage. -Its function is that of a traffic filter: -when enabled, it instructs the kernel to drop -all packets which have a coverage less than this value. +A value of zero instructs the kernel to drop all received packets +not having full checksum coverage. +A value of 8 to 65535 instructs the kernel to drop all received +packets with a partial checksum coverage smaller than the value specified. .El .Sh ERRORS A socket operation may fail with one of the following errors returned: Modified: releng/10.1/sys/netinet/udp_usrreq.c ============================================================================== --- releng/10.1/sys/netinet/udp_usrreq.c Sun Oct 12 17:03:47 2014 (r272990) +++ releng/10.1/sys/netinet/udp_usrreq.c Sun Oct 12 17:07:15 2014 (r272991) @@ -434,9 +434,10 @@ udp_input(struct mbuf *m, int off) */ len = ntohs((u_short)uh->uh_ulen); ip_len = ntohs(ip->ip_len) - iphlen; - if (pr == IPPROTO_UDPLITE && len == 0) { + if (pr == IPPROTO_UDPLITE && (len == 0 || len == ip_len)) { /* Zero means checksum over the complete packet. */ - len = ip_len; + if (len == 0) + len = ip_len; cscov_partial = 0; } if (ip_len != len) { @@ -487,8 +488,16 @@ udp_input(struct mbuf *m, int off) m_freem(m); return; } - } else - UDPSTAT_INC(udps_nosum); + } else { + if (pr == IPPROTO_UDP) { + UDPSTAT_INC(udps_nosum); + } else { + /* UDPLite requires a checksum */ + /* XXX: What is the right UDPLite MIB counter here? */ + m_freem(m); + return; + } + } pcbinfo = get_inpcbinfo(pr); if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr)) || @@ -670,7 +679,7 @@ udp_input(struct mbuf *m, int off) struct udpcb *up; up = intoudpcb(inp); - if (up->u_rxcslen > len) { + if (up->u_rxcslen == 0 || up->u_rxcslen > len) { INP_RUNLOCK(inp); m_freem(m); return; @@ -1006,7 +1015,7 @@ udp_ctloutput(struct socket *so, struct INP_WLOCK(inp); up = intoudpcb(inp); KASSERT(up != NULL, ("%s: up == NULL", __func__)); - if (optval != 0 && optval < 8) { + if ((optval != 0 && optval < 8) || (optval > 65535)) { INP_WUNLOCK(inp); error = EINVAL; break; Modified: releng/10.1/sys/netinet6/in6.h ============================================================================== --- releng/10.1/sys/netinet6/in6.h Sun Oct 12 17:03:47 2014 (r272990) +++ releng/10.1/sys/netinet6/in6.h Sun Oct 12 17:07:15 2014 (r272991) @@ -641,6 +641,8 @@ struct ip6_hdr; int in6_cksum_pseudo(struct ip6_hdr *, uint32_t, uint8_t, uint16_t); int in6_cksum(struct mbuf *, u_int8_t, u_int32_t, u_int32_t); +int in6_cksum_partial(struct mbuf *, u_int8_t, u_int32_t, u_int32_t, + u_int32_t); int in6_localaddr(struct in6_addr *); int in6_localip(struct in6_addr *); int in6_addrscope(struct in6_addr *); Modified: releng/10.1/sys/netinet6/in6_cksum.c ============================================================================== --- releng/10.1/sys/netinet6/in6_cksum.c Sun Oct 12 17:03:47 2014 (r272990) +++ releng/10.1/sys/netinet6/in6_cksum.c Sun Oct 12 17:07:15 2014 (r272991) @@ -145,9 +145,11 @@ in6_cksum_pseudo(struct ip6_hdr *ip6, ui * off is an offset where TCP/UDP/ICMP6 header starts. * len is a total length of a transport segment. * (e.g. TCP header + TCP payload) + * cov is the number of bytes to be taken into account for the checksum */ int -in6_cksum(struct mbuf *m, u_int8_t nxt, u_int32_t off, u_int32_t len) +in6_cksum_partial(struct mbuf *m, u_int8_t nxt, u_int32_t off, + u_int32_t len, u_int32_t cov) { struct ip6_hdr *ip6; u_int16_t *w, scope; @@ -215,9 +217,9 @@ in6_cksum(struct mbuf *m, u_int8_t nxt, } w = (u_int16_t *)(mtod(m, u_char *) + off); mlen = m->m_len - off; - if (len < mlen) - mlen = len; - len -= mlen; + if (cov < mlen) + mlen = cov; + cov -= mlen; /* * Force to even boundary. */ @@ -273,7 +275,7 @@ in6_cksum(struct mbuf *m, u_int8_t nxt, * Lastly calculate a summary of the rest of mbufs. */ - for (;m && len; m = m->m_next) { + for (;m && cov; m = m->m_next) { if (m->m_len == 0) continue; w = mtod(m, u_int16_t *); @@ -290,12 +292,12 @@ in6_cksum(struct mbuf *m, u_int8_t nxt, sum += s_util.s; w = (u_int16_t *)((char *)w + 1); mlen = m->m_len - 1; - len--; + cov--; } else mlen = m->m_len; - if (len < mlen) - mlen = len; - len -= mlen; + if (cov < mlen) + mlen = cov; + cov -= mlen; /* * Force to even boundary. */ @@ -343,7 +345,7 @@ in6_cksum(struct mbuf *m, u_int8_t nxt, } else if (mlen == -1) s_util.c[0] = *(char *)w; } - if (len) + if (cov) panic("in6_cksum: out of data"); if (mlen == -1) { /* The last mbuf has odd # of bytes. Follow the @@ -355,3 +357,9 @@ in6_cksum(struct mbuf *m, u_int8_t nxt, REDUCE; return (~sum & 0xffff); } + +int +in6_cksum(struct mbuf *m, u_int8_t nxt, u_int32_t off, u_int32_t len) +{ + return (in6_cksum_partial(m, nxt, off, len, len)); +} Modified: releng/10.1/sys/netinet6/udp6_usrreq.c ============================================================================== --- releng/10.1/sys/netinet6/udp6_usrreq.c Sun Oct 12 17:03:47 2014 (r272990) +++ releng/10.1/sys/netinet6/udp6_usrreq.c Sun Oct 12 17:07:15 2014 (r272991) @@ -225,21 +225,26 @@ udp6_input(struct mbuf **mp, int *offp, nxt = ip6->ip6_nxt; cscov_partial = (nxt == IPPROTO_UDPLITE) ? 1 : 0; - if (nxt == IPPROTO_UDPLITE && ulen == 0) { + if (nxt == IPPROTO_UDPLITE) { /* Zero means checksum over the complete packet. */ - ulen = plen; - cscov_partial = 0; - } - if (plen != ulen) { - UDPSTAT_INC(udps_badlen); - goto badunlocked; - } - - /* - * Checksum extended UDP header and data. - */ - if (uh->uh_sum == 0) { - if (ulen > plen || ulen < sizeof(struct udphdr)) { + if (ulen == 0) + ulen = plen; + if (ulen == plen) + cscov_partial = 0; + if ((ulen < sizeof(struct udphdr)) || (ulen > plen)) { + /* XXX: What is the right UDPLite MIB counter? */ + goto badunlocked; + } + if (uh->uh_sum == 0) { + /* XXX: What is the right UDPLite MIB counter? */ + goto badunlocked; + } + } else { + if ((ulen < sizeof(struct udphdr)) || (plen != ulen)) { + UDPSTAT_INC(udps_badlen); + goto badunlocked; + } + if (uh->uh_sum == 0) { UDPSTAT_INC(udps_nosum); goto badunlocked; } @@ -254,7 +259,7 @@ udp6_input(struct mbuf **mp, int *offp, m->m_pkthdr.csum_data); uh_sum ^= 0xffff; } else - uh_sum = in6_cksum(m, nxt, off, ulen); + uh_sum = in6_cksum_partial(m, nxt, off, plen, ulen); if (uh_sum != 0) { UDPSTAT_INC(udps_badsum); @@ -478,7 +483,7 @@ udp6_input(struct mbuf **mp, int *offp, INP_RLOCK_ASSERT(inp); up = intoudpcb(inp); if (cscov_partial) { - if (up->u_rxcslen > ulen) { + if (up->u_rxcslen == 0 || up->u_rxcslen > ulen) { INP_RUNLOCK(inp); m_freem(m); return (IPPROTO_DONE); @@ -841,8 +846,8 @@ udp6_output(struct inpcb *inp, struct mb ip6->ip6_dst = *faddr; if (cscov_partial) { - if ((udp6->uh_sum = in6_cksum(m, 0, - sizeof(struct ip6_hdr), cscov)) == 0) + if ((udp6->uh_sum = in6_cksum_partial(m, nxt, + sizeof(struct ip6_hdr), plen, cscov)) == 0) udp6->uh_sum = 0xffff; } else { udp6->uh_sum = in6_cksum_pseudo(ip6, plen, nxt, 0); From owner-svn-src-releng@FreeBSD.ORG Sun Oct 12 18:53:46 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19BBFB1B; Sun, 12 Oct 2014 18:53:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05C9EA9F; Sun, 12 Oct 2014 18:53:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9CIrjNh011618; Sun, 12 Oct 2014 18:53:45 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9CIrjF5011617; Sun, 12 Oct 2014 18:53:45 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201410121853.s9CIrjF5011617@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sun, 12 Oct 2014 18:53:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273007 - releng/10.1/sys/vm X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Oct 2014 18:53:46 -0000 Author: alc Date: Sun Oct 12 18:53:45 2014 New Revision: 273007 URL: https://svnweb.freebsd.org/changeset/base/273007 Log: MFS: r272543 (r271351 on HEAD) Fix a boundary case error in vm_reserv_alloc_contig(). Approved by: re (kib) Modified: releng/10.1/sys/vm/vm_reserv.c Directory Properties: releng/10.1/ (props changed) Modified: releng/10.1/sys/vm/vm_reserv.c ============================================================================== --- releng/10.1/sys/vm/vm_reserv.c Sun Oct 12 18:01:52 2014 (r273006) +++ releng/10.1/sys/vm/vm_reserv.c Sun Oct 12 18:53:45 2014 (r273007) @@ -299,7 +299,7 @@ vm_reserv_populate(vm_reserv_t rv) /* * Allocates a contiguous set of physical pages of the given size "npages" - * from an existing or newly-created reservation. All of the physical pages + * from existing or newly created reservations. All of the physical pages * must be at or above the given physical address "low" and below the given * physical address "high". The given value "alignment" determines the * alignment of the first physical page in the set. If the given value @@ -371,8 +371,8 @@ vm_reserv_alloc_contig(vm_object_t objec /* * Could at least one reservation fit between the first index to the - * left that can be used and the first index to the right that cannot - * be used? + * left that can be used ("leftcap") and the first index to the right + * that cannot be used ("rightcap")? */ first = pindex - VM_RESERV_INDEX(object, pindex); if (mpred != NULL) { @@ -394,6 +394,13 @@ vm_reserv_alloc_contig(vm_object_t objec if (first + maxpages > rightcap) { if (maxpages == VM_LEVEL_0_NPAGES) return (NULL); + + /* + * At least one reservation will fit between "leftcap" + * and "rightcap". However, a reservation for the + * last of the requested pages will not fit. Reduce + * the size of the upcoming allocation accordingly. + */ allocpages = minpages; } } @@ -417,16 +424,23 @@ vm_reserv_alloc_contig(vm_object_t objec } /* - * Allocate and populate the new reservations. The alignment and - * boundary specified for this allocation may be different from the - * alignment and boundary specified for the requested pages. For - * instance, the specified index may not be the first page within the - * first new reservation. + * Allocate the physical pages. The alignment and boundary specified + * for this allocation may be different from the alignment and + * boundary specified for the requested pages. For instance, the + * specified index may not be the first page within the first new + * reservation. */ m = vm_phys_alloc_contig(allocpages, low, high, ulmax(alignment, VM_LEVEL_0_SIZE), boundary > VM_LEVEL_0_SIZE ? boundary : 0); if (m == NULL) return (NULL); + + /* + * The allocated physical pages always begin at a reservation + * boundary, but they do not always end at a reservation boundary. + * Initialize every reservation that is completely covered by the + * allocated physical pages. + */ m_ret = NULL; index = VM_RESERV_INDEX(object, pindex); do { @@ -456,7 +470,7 @@ vm_reserv_alloc_contig(vm_object_t objec m += VM_LEVEL_0_NPAGES; first += VM_LEVEL_0_NPAGES; allocpages -= VM_LEVEL_0_NPAGES; - } while (allocpages > 0); + } while (allocpages >= VM_LEVEL_0_NPAGES); return (m_ret); /* From owner-svn-src-releng@FreeBSD.ORG Mon Oct 13 14:52:55 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A389742F; Mon, 13 Oct 2014 14:52:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 855A8E18; Mon, 13 Oct 2014 14:52:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9DEqtRw087581; Mon, 13 Oct 2014 14:52:55 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9DEqs85087578; Mon, 13 Oct 2014 14:52:54 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201410131452.s9DEqs85087578@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 13 Oct 2014 14:52:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273039 - in releng/10.1: etc etc/defaults share/man/man5 X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Oct 2014 14:52:55 -0000 Author: bdrewery Date: Mon Oct 13 14:52:54 2014 New Revision: 273039 URL: https://svnweb.freebsd.org/changeset/base/273039 Log: MFS r272577,r272577: - Add $netif_ipexpand_max to specify the upper limit for the number of addresses generated by an address range specification. The default value is 2048. This can be increased by setting $netif_ipexpand_max in rc.conf. PR: 186841 Approved by: re (hrs) Modified: releng/10.1/etc/defaults/rc.conf releng/10.1/etc/network.subr releng/10.1/share/man/man5/rc.conf.5 Directory Properties: releng/10.1/ (props changed) Modified: releng/10.1/etc/defaults/rc.conf ============================================================================== --- releng/10.1/etc/defaults/rc.conf Mon Oct 13 14:48:49 2014 (r273038) +++ releng/10.1/etc/defaults/rc.conf Mon Oct 13 14:52:54 2014 (r273039) @@ -110,6 +110,7 @@ synchronous_dhclient="NO" # Start dhclie # interfaces during startup. defaultroute_delay="30" # Time to wait for a default route on a DHCP interface. defaultroute_carrier_delay="5" # Time to wait for carrier while waiting for a default route. +netif_ipexpand_max="2048" # Maximum number of IP addrs in a range spec. wpa_supplicant_program="/usr/sbin/wpa_supplicant" wpa_supplicant_flags="-s" # Extra flags to pass to wpa_supplicant wpa_supplicant_conf_file="/etc/wpa_supplicant.conf" Modified: releng/10.1/etc/network.subr ============================================================================== --- releng/10.1/etc/network.subr Mon Oct 13 14:48:49 2014 (r273038) +++ releng/10.1/etc/network.subr Mon Oct 13 14:52:54 2014 (r273039) @@ -25,9 +25,7 @@ # $FreeBSD$ # IFCONFIG_CMD="/sbin/ifconfig" - -# Maximum number of addresses expanded from a address range specification. -_IPEXPANDMAX=31 +: ${netif_ipexpand_max:=2048} # # Subroutines commonly used from network startup scripts. @@ -888,8 +886,8 @@ ifalias_expand_addr_inet() _ipcount=$_iplow while [ "$_ipcount" -le "$_iphigh" ]; do _retstr="${_retstr} ${_iphead}${_iphead:+.}${_ipcount}${_iptail:+.}${_iptail}${_plen:+/}${_plen}" - if [ $_ipcount -gt $(($_iplow + $_IPEXPANDMAX)) ]; then - warn "Range specification is too large (${_iphead}${_iphead:+.}${_iplow}${_iptail:+.}${_iptail}-${_iphead}${_iphead:+.}${_iphigh}${_iptail:+.}${_iptail}). ${_iphead}${_iphead:+.}${_iplow}${_iptail:+.}${_iptail}-${_iphead}${_iphead:+.}${_ipcount}${_iptail:+.}${_iptail} was processed." + if [ $_ipcount -gt $(($_iplow + $netif_ipexpand_max)) ]; then + warn "Range specification is too large (${_iphead}${_iphead:+.}${_iplow}${_iptail:+.}${_iptail}-${_iphead}${_iphead:+.}${_iphigh}${_iptail:+.}${_iptail}). ${_iphead}${_iphead:+.}${_iplow}${_iptail:+.}${_iptail}-${_iphead}${_iphead:+.}${_ipcount}${_iptail:+.}${_iptail} was processed. Increase \$netif_ipexpand_max in rc.conf." break else _ipcount=$(($_ipcount + 1)) @@ -978,9 +976,9 @@ ifalias_expand_addr_inet6() $_ipleft $_ipcount $_ipright \ ${_plen:+/}$_plen` _retstr="$_retstr $_r" - if [ $_ipcount -gt $(($_iplow + $_IPEXPANDMAX)) ] + if [ $_ipcount -gt $(($_iplow + $netif_ipexpand_max)) ] then - warn "Range specification is too large $(printf '(%s:%04x%s-%s:%04x%s)' $_ipleft $_iplow $_ipright $_ipleft $_iphigh $_ipright). $(printf '%s:%04x%s-%s:%04x%s' $_ipleft $_iplow $_ipright $_ipleft $_ipcount $_ipright) was processed." + warn "Range specification is too large $(printf '(%s:%x%s-%s:%x%s)' "$_ipleft" "$_iplow" "$_ipright" "$_ipleft" "$_iphigh" "$_ipright"). $(printf '%s:%x%s-%s:%x%s' "$_ipleft" "$_iplow" "$_ipright" "$_ipleft" "$_ipcount" "$_ipright") was processed. Increase \$netif_ipexpand_max in rc.conf." break else _ipcount=$(($_ipcount + 1)) Modified: releng/10.1/share/man/man5/rc.conf.5 ============================================================================== --- releng/10.1/share/man/man5/rc.conf.5 Mon Oct 13 14:48:49 2014 (r273038) +++ releng/10.1/share/man/man5/rc.conf.5 Mon Oct 13 14:52:54 2014 (r273039) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 27, 2014 +.Dd September 11, 2014 .Dt RC.CONF 5 .Os .Sh NAME @@ -1159,6 +1159,19 @@ or .Li inet6 2001:db8:1-f::1/64 . This notation allows address and prefix length part only, not the other address modifiers. +Note that the maximum number of the generated addresses from a range +specification is limited to an integer value specified in +.Va netif_ipexpand_max +in +.Xr rc.conf 5 +because a small typo can unexpectedly generate a large number of addresses. +The default value is +.Li 2048 . +It can be increased by adding the following line into +.Xr rc.conf 5 : +.Bd -literal +netif_ipexpand_max="4096" +.Ed .Pp In the case of .Li 192.0.2.5-23/24 , From owner-svn-src-releng@FreeBSD.ORG Tue Oct 14 12:40:54 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0BCA5FF1; Tue, 14 Oct 2014 12:40:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E9FDF897; Tue, 14 Oct 2014 12:40:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9ECer82011639; Tue, 14 Oct 2014 12:40:53 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9ECertF011637; Tue, 14 Oct 2014 12:40:53 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410141240.s9ECertF011637@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 14 Oct 2014 12:40:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273082 - in releng/10.1/release/doc: en_US.ISO8859-1/errata share/xml X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Oct 2014 12:40:54 -0000 Author: gjb Date: Tue Oct 14 12:40:52 2014 New Revision: 273082 URL: https://svnweb.freebsd.org/changeset/base/273082 Log: - Correct the FreeBSD release displayed on the 10.1-R errata page. - Trim stale errata items from 10.0-RELEASE, but keep the entry regarding FreeBSD/i386 on VirtualBox, as I am unsure if the underlying cause was identified and/or corrected. - Fix a few occurances of 'release.prev' macros that should be 'release.current'. [1] - Switch release.ent entities to reflect a release, and update versions where appropriate. Submitted by: pluknet [1] Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/10.1/release/doc/en_US.ISO8859-1/errata/article.xml releng/10.1/release/doc/share/xml/release.ent Modified: releng/10.1/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- releng/10.1/release/doc/en_US.ISO8859-1/errata/article.xml Tue Oct 14 12:29:24 2014 (r273081) +++ releng/10.1/release/doc/en_US.ISO8859-1/errata/article.xml Tue Oct 14 12:40:52 2014 (r273082) @@ -10,7 +10,7 @@ xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"> - &os; &release.prev; Errata + &os; &release.current; Errata The &os; Project @@ -31,7 +31,7 @@ - This document lists errata items for &os; &release.prev;, + This document lists errata items for &os; &release.current;, containing significant information discovered after the release or too late in the release cycle to be otherwise included in the release documentation. This information @@ -41,7 +41,7 @@ always be consulted before installing this version of &os;. - This errata document for &os; &release.prev; will be + This errata document for &os; &release.current; will be maintained until the release of &os; &release.next;. @@ -50,7 +50,7 @@ Introduction This errata document contains late-breaking - news about &os; &release.prev; Before installing this + news about &os; &release.current; before installing this version, it is important to consult this document to learn about any post-release discoveries or problems that may already have been found and fixed. @@ -91,148 +91,9 @@ - SA-13:14.openssh - - 19 November 2013 - - OpenSSH AES-GCM memory corruption - vulnerability - - - - SA-14:01.bsnmpd - - 14 January 2014 - - bsnmpd remote denial of service vulnerability - - - - SA-14:02.ntpd - - 14 January 2014 - - ntpd distributed reflection Denial of Service vulnerability - - - - SA-14:03.openssl - - 14 January 2014 - - OpenSSL multiple vulnerabilities - - - - SA-14:04.bind - - 14 January 2014 - - BIND remote denial of service vulnerability - - - - SA-14:05.nfsserver - - 8 April 2014 - - Deadlock in the NFS server - - - - SA-14:06.openssl - - 8 April 2014 - - OpenSSL multiple vulnerabilities - - - - SA-14:07.devfs - 30 April 2014 - Fix devfs rules not applied by default for - jails - - - - SA-14:08.tcp - 30 April 2014 - Fix TCP reassembly - vulnerability - - - - SA-14:09.openssl - 30 April 2014 - Fix OpenSSL use-after-free - vulnerability - - - - SA-14:10.openssl - 15 May 2014 - Fix OpenSSL NULL pointer deference - vulnerability - - - - SA-14:11.sendmail - 3 June 2014 - Fix sendmail improper close-on-exec flag - handling - - - - SA-14:13.pam - 3 June 2014 - Fix incorrect error handling in PAM policy - parser - - - - SA-14:14.openssl - 5 June 2014 - Multiple vulnerabilities - - - - SA-14:15.iconv - 24 June 2014 - NULL pointer dereference and out-of-bounds - array access - - - - SA-14:16.file - 24 June 2014 - Multiple vulnerabilities - - - - SA-14:17.kmem - 8 July 2014 - Kernel memory disclosure in control messages - and SCTP notifications - - - - SA-14:18.openssl - 9 September 2014 - Multiple vulnerabilities - - - - SA-14:19.tcp - 16 September 2014 - Denial of Service in TCP packet - processing. + No advisories. +   +   @@ -244,7 +105,7 @@ - &os;/&arch.i386; &release.prev; running as a guest + &os;/&arch.i386; &release.current; running as a guest operating system on VirtualBox can have a problem with disk I/O access. It depends on some specific hardware configuration and does not depend on a @@ -271,88 +132,6 @@ boot instability may be present on virtual machines running on other hypervisors, such as Xen or KVM. - - - A bug in Heimdal (an - implementation of Kerberos - authentication in &os; base system) has been fixed. It - could cause an interoperability issue between - Heimdal and the other - implementations including MIT - Kerberos. However, due to this fix, - Heimdal and some applications - which depend on it in the previous &os; releases do not work - with one in &release.prev; in certain cases. Errata Notice - for the supported releases to fix it will be - released. - - - - A bug in &man.killall.1; has been discovered. It - makes killall -INT to deliver - SIGTERM rather than the desired - SIGINT, and may cause blocking - behavior for scripts that uses it, as -I - means interactive. A workaround of this - would be to use -SIGINT instead. - This bug has been fixed on &os;-CURRENT and will be fixed - in &os; &release.current;. - - - - The &man.bxe.4; driver can cause packet corruption when - TSO (TCP Segmentation Offload) feature is enabled. This - feature is enabled by default and can be disabled by using a - parameter of &man.ifconfig.8;. It can - be specified in &man.rc.conf.5; like the following: - - ifconfig_bxe0="DHCP -tso" - - This bug has been fixed on &os; - &release.current;. - - - - Due to a minor incompatibility with &man.pkg.7; version - 1.2.x, &man.bsdconfig.8; will duplicate - the list of available packages for installation. This is - due to the PACKAGESITE environment - variable being set for backwards compatibility with older - versions of &man.pkg.7;. This affects generation of the - available package list only, and does not affect the - behavior when processing packages for installation. - - - - A regression in &man.pw.8; does not remove a user from - groups not specified in the provided group list when the - -G flag is used. This is expected to be - corrected in &os;-CURRENT and &os; &release.current;. - - - - &man.ipfw.8; fwd action can send - packets to the correct interface with a wrong link-layer - address when the route is updated. This bug has been fixed - on &os;-CURRENT and will be fixed in &os; - &release.current;. - - - - The &man.mount.udf.8; utility has a bug which prevents - it from mounting any UDF file system. This has been fixed - in &os;-CURRENT and &os; &release.current;. - - - - Updating LSI firmware on &man.mps.4; controllers with - the sas2flash utility may cause - the system to hang, or may cause the system to panic. This - is fixed in the stable/10 branch with - revisions r262553 and - r262575, and will be included in - &os; 10.1-RELEASE. - Modified: releng/10.1/release/doc/share/xml/release.ent ============================================================================== --- releng/10.1/release/doc/share/xml/release.ent Tue Oct 14 12:29:24 2014 (r273081) +++ releng/10.1/release/doc/share/xml/release.ent Tue Oct 14 12:40:52 2014 (r273082) @@ -6,7 +6,7 @@ - + - + - + - + - + @@ -34,10 +34,10 @@ or "release" --> - - + + - + From owner-svn-src-releng@FreeBSD.ORG Tue Oct 14 12:49:50 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 574CC296; Tue, 14 Oct 2014 12:49:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4374B8F2; Tue, 14 Oct 2014 12:49:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9ECnoAb014396; Tue, 14 Oct 2014 12:49:50 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9ECnomq014394; Tue, 14 Oct 2014 12:49:50 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410141249.s9ECnomq014394@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 14 Oct 2014 12:49:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273083 - releng/10.1/release/doc/en_US.ISO8859-1/readme X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Oct 2014 12:49:50 -0000 Author: gjb Date: Tue Oct 14 12:49:49 2014 New Revision: 273083 URL: https://svnweb.freebsd.org/changeset/base/273083 Log: Fix rendering of a URL. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/10.1/release/doc/en_US.ISO8859-1/readme/article.xml Modified: releng/10.1/release/doc/en_US.ISO8859-1/readme/article.xml ============================================================================== --- releng/10.1/release/doc/en_US.ISO8859-1/readme/article.xml Tue Oct 14 12:40:52 2014 (r273082) +++ releng/10.1/release/doc/en_US.ISO8859-1/readme/article.xml Tue Oct 14 12:49:49 2014 (r273083) @@ -349,8 +349,10 @@ other copies are kept updated on the Internet and should be consulted as the current errata for this release. These other copies of the errata are located at + the &url.base;/releases/ + xlink:href="&url.base;/releases/">&os; &release.current; + page (as well as any sites which keep up-to-date mirrors of this location). From owner-svn-src-releng@FreeBSD.ORG Tue Oct 14 16:11:24 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D9F2EE80; Tue, 14 Oct 2014 16:11:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5C7C125; Tue, 14 Oct 2014 16:11:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9EGBOxu015985; Tue, 14 Oct 2014 16:11:24 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9EGBOVJ015982; Tue, 14 Oct 2014 16:11:24 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201410141611.s9EGBOVJ015982@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Tue, 14 Oct 2014 16:11:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273098 - releng/10.1/usr.bin/mkimg X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Oct 2014 16:11:25 -0000 Author: marcel Date: Tue Oct 14 16:11:23 2014 New Revision: 273098 URL: https://svnweb.freebsd.org/changeset/base/273098 Log: MF10 r272774: Add 3 long options (--version, --formats & --schemes) for getting information about mkimg itself. mkimg version: 20140927 Requested by: gjb Approved by: re (marius) Relnotes: yes Modified: releng/10.1/usr.bin/mkimg/Makefile releng/10.1/usr.bin/mkimg/mkimg.1 releng/10.1/usr.bin/mkimg/mkimg.c Directory Properties: releng/10.1/ (props changed) Modified: releng/10.1/usr.bin/mkimg/Makefile ============================================================================== --- releng/10.1/usr.bin/mkimg/Makefile Tue Oct 14 15:37:19 2014 (r273097) +++ releng/10.1/usr.bin/mkimg/Makefile Tue Oct 14 16:11:23 2014 (r273098) @@ -4,6 +4,8 @@ PROG= mkimg SRCS= format.c image.c mkimg.c scheme.c MAN= mkimg.1 +MKIMG_VERSION=20140927 +CFLAGS+=-DMKIMG_VERSION=${MKIMG_VERSION} CFLAGS+=-DSPARSE_WRITE # List of formats to support Modified: releng/10.1/usr.bin/mkimg/mkimg.1 ============================================================================== --- releng/10.1/usr.bin/mkimg/mkimg.1 Tue Oct 14 15:37:19 2014 (r273097) +++ releng/10.1/usr.bin/mkimg/mkimg.1 Tue Oct 14 16:11:23 2014 (r273098) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 12, 2014 +.Dd September 27, 2014 .Dt MKIMG 1 .Os .Sh NAME @@ -44,6 +44,8 @@ .Fl s Ar scheme .Fl p Ar partition .Op Fl p Ar partition ... +.Nm +.Ar --formats | --schemes | --version .Sh DESCRIPTION The .Nm @@ -122,10 +124,32 @@ utility will generate predictable values .Nm utility will create images that are identical. .Pp -For a complete list of supported partitioning schemes or supported output -format, or for a detailed description of how to specify partitions, run the +A set of long options exist to query about the +.Nm +utilty itself. +Options in this set should be given by themselves because the +.Nm +utility exits immediately after providing the requested information. +The version of the +.Nm +utility is printed when the +.Ar --version +option is given. +The list of supported output formats is printed when the +.Ar --formats +option is given and the list of supported partitioning schemes is printed +when the +.Ar --schemes +option is given. +Both the format and scheme lists a space-separated lists for easy handling +in scripts. +.Pp +For a more descriptive list of supported partitioning schemes or supported +output format, or for a detailed description of how to specify partitions, +run the .Nm utility without any arguments. +This will print a usage message with all the necessary details. .Sh ENVIRONMENT .Bl -tag -width "TMPDIR" -compact .It Ev TMPDIR Modified: releng/10.1/usr.bin/mkimg/mkimg.c ============================================================================== --- releng/10.1/usr.bin/mkimg/mkimg.c Tue Oct 14 15:37:19 2014 (r273097) +++ releng/10.1/usr.bin/mkimg/mkimg.c Tue Oct 14 16:11:23 2014 (r273098) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -48,6 +49,17 @@ __FBSDID("$FreeBSD$"); #include "mkimg.h" #include "scheme.h" +#define LONGOPT_FORMATS 0x01000001 +#define LONGOPT_SCHEMES 0x01000002 +#define LONGOPT_VERSION 0x01000003 + +static struct option longopts[] = { + { "formats", no_argument, NULL, LONGOPT_FORMATS }, + { "schemes", no_argument, NULL, LONGOPT_SCHEMES }, + { "version", no_argument, NULL, LONGOPT_VERSION }, + { NULL, 0, NULL, 0 } +}; + struct partlisthead partlist = STAILQ_HEAD_INITIALIZER(partlist); u_int nparts = 0; @@ -61,15 +73,79 @@ u_int secsz = 512; u_int blksz = 0; static void -usage(const char *why) +print_formats(int usage) { struct mkimg_format *f, **f_iter; + const char *sep; + + if (usage) { + fprintf(stderr, " formats:\n"); + SET_FOREACH(f_iter, formats) { + f = *f_iter; + fprintf(stderr, "\t%s\t- %s\n", f->name, + f->description); + } + } else { + sep = ""; + SET_FOREACH(f_iter, formats) { + f = *f_iter; + printf("%s%s", sep, f->name); + sep = " "; + } + putchar('\n'); + } +} + +static void +print_schemes(int usage) +{ struct mkimg_scheme *s, **s_iter; + const char *sep; + + if (usage) { + fprintf(stderr, " schemes:\n"); + SET_FOREACH(s_iter, schemes) { + s = *s_iter; + fprintf(stderr, "\t%s\t- %s\n", s->name, + s->description); + } + } else { + sep = ""; + SET_FOREACH(s_iter, schemes) { + s = *s_iter; + printf("%s%s", sep, s->name); + sep = " "; + } + putchar('\n'); + } +} + +static void +print_version(void) +{ + u_int width; + +#ifdef __LP64__ + width = 64; +#else + width = 32; +#endif + printf("mkimg %u (%u-bit)\n", MKIMG_VERSION, width); +} + +static void +usage(const char *why) +{ warnx("error: %s", why); - fprintf(stderr, "\nusage: %s \n", getprogname()); + fputc('\n', stderr); + fprintf(stderr, "usage: %s \n", getprogname()); fprintf(stderr, " options:\n"); + fprintf(stderr, "\t--formats\t- list image formats\n"); + fprintf(stderr, "\t--schemes\t- list partition schemes\n"); + fprintf(stderr, "\t--version\t- show version information\n"); + fputc('\n', stderr); fprintf(stderr, "\t-b \t- file containing boot code\n"); fprintf(stderr, "\t-f \n"); fprintf(stderr, "\t-o \t- file to write image into\n"); @@ -81,20 +157,12 @@ usage(const char *why) fprintf(stderr, "\t-P \t- physical sector size\n"); fprintf(stderr, "\t-S \t- logical sector size\n"); fprintf(stderr, "\t-T \t- number of tracks to simulate\n"); - - fprintf(stderr, "\n formats:\n"); - SET_FOREACH(f_iter, formats) { - f = *f_iter; - fprintf(stderr, "\t%s\t- %s\n", f->name, f->description); - } - - fprintf(stderr, "\n schemes:\n"); - SET_FOREACH(s_iter, schemes) { - s = *s_iter; - fprintf(stderr, "\t%s\t- %s\n", s->name, s->description); - } - - fprintf(stderr, "\n partition specification:\n"); + fputc('\n', stderr); + print_formats(1); + fputc('\n', stderr); + print_schemes(1); + fputc('\n', stderr); + fprintf(stderr, " partition specification:\n"); fprintf(stderr, "\t[/]::\t- empty partition of given " "size\n"); fprintf(stderr, "\t[/]:=\t- partition content and size " @@ -366,7 +434,8 @@ main(int argc, char *argv[]) bcfd = -1; outfd = 1; /* Write to stdout by default */ - while ((c = getopt(argc, argv, "b:f:o:p:s:vyH:P:S:T:")) != -1) { + while ((c = getopt_long(argc, argv, "b:f:o:p:s:vyH:P:S:T:", + longopts, NULL)) != -1) { switch (c) { case 'b': /* BOOT CODE */ if (bcfd != -1) @@ -432,6 +501,18 @@ main(int argc, char *argv[]) if (error) errc(EX_DATAERR, error, "track size"); break; + case LONGOPT_FORMATS: + print_formats(0); + exit(EX_OK); + /*NOTREACHED*/ + case LONGOPT_SCHEMES: + print_schemes(0); + exit(EX_OK); + /*NOTREACHED*/ + case LONGOPT_VERSION: + print_version(); + exit(EX_OK); + /*NOTREACHED*/ default: usage("unknown option"); } From owner-svn-src-releng@FreeBSD.ORG Tue Oct 14 16:28:38 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ADF372E6; Tue, 14 Oct 2014 16:28:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99F7B27C; Tue, 14 Oct 2014 16:28:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9EGScOq024868; Tue, 14 Oct 2014 16:28:38 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9EGScwK024867; Tue, 14 Oct 2014 16:28:38 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201410141628.s9EGScwK024867@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 14 Oct 2014 16:28:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273099 - releng/10.1/sys/vm X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Oct 2014 16:28:38 -0000 Author: kib Date: Tue Oct 14 16:28:37 2014 New Revision: 273099 URL: https://svnweb.freebsd.org/changeset/base/273099 Log: MFC r272907: Make MAP_NOSYNC handling in the vm_fault() read-locked object path compatible with write-locked path. Approved by: re (marius) Modified: releng/10.1/sys/vm/vm_fault.c Directory Properties: releng/10.1/ (props changed) Modified: releng/10.1/sys/vm/vm_fault.c ============================================================================== --- releng/10.1/sys/vm/vm_fault.c Tue Oct 14 16:11:23 2014 (r273098) +++ releng/10.1/sys/vm/vm_fault.c Tue Oct 14 16:28:37 2014 (r273099) @@ -174,6 +174,70 @@ unlock_and_deallocate(struct faultstate } } +static void +vm_fault_dirty(vm_map_entry_t entry, vm_page_t m, vm_prot_t prot, + vm_prot_t fault_type, int fault_flags, boolean_t set_wd) +{ + boolean_t need_dirty; + + if (((prot & VM_PROT_WRITE) == 0 && + (fault_flags & VM_FAULT_DIRTY) == 0) || + (m->oflags & VPO_UNMANAGED) != 0) + return; + + VM_OBJECT_ASSERT_LOCKED(m->object); + + need_dirty = ((fault_type & VM_PROT_WRITE) != 0 && + (fault_flags & VM_FAULT_CHANGE_WIRING) == 0) || + (fault_flags & VM_FAULT_DIRTY) != 0; + + if (set_wd) + vm_object_set_writeable_dirty(m->object); + else + /* + * If two callers of vm_fault_dirty() with set_wd == + * FALSE, one for the map entry with MAP_ENTRY_NOSYNC + * flag set, other with flag clear, race, it is + * possible for the no-NOSYNC thread to see m->dirty + * != 0 and not clear VPO_NOSYNC. Take vm_page lock + * around manipulation of VPO_NOSYNC and + * vm_page_dirty() call, to avoid the race and keep + * m->oflags consistent. + */ + vm_page_lock(m); + + /* + * If this is a NOSYNC mmap we do not want to set VPO_NOSYNC + * if the page is already dirty to prevent data written with + * the expectation of being synced from not being synced. + * Likewise if this entry does not request NOSYNC then make + * sure the page isn't marked NOSYNC. Applications sharing + * data should use the same flags to avoid ping ponging. + */ + if ((entry->eflags & MAP_ENTRY_NOSYNC) != 0) { + if (m->dirty == 0) { + m->oflags |= VPO_NOSYNC; + } + } else { + m->oflags &= ~VPO_NOSYNC; + } + + /* + * If the fault is a write, we know that this page is being + * written NOW so dirty it explicitly to save on + * pmap_is_modified() calls later. + * + * Also tell the backing pager, if any, that it should remove + * any swap backing since the page is now dirty. + */ + if (need_dirty) + vm_page_dirty(m); + if (!set_wd) + vm_page_unlock(m); + if (need_dirty) + vm_pager_page_unswapped(m); +} + /* * TRYPAGER - used by vm_fault to calculate whether the pager for the * current object *might* contain the page. @@ -321,11 +385,8 @@ RetryFault:; vm_page_hold(m); vm_page_unlock(m); } - if ((fault_type & VM_PROT_WRITE) != 0 && - (m->oflags & VPO_UNMANAGED) == 0) { - vm_page_dirty(m); - vm_pager_page_unswapped(m); - } + vm_fault_dirty(fs.entry, m, prot, fault_type, fault_flags, + FALSE); VM_OBJECT_RUNLOCK(fs.first_object); if (!wired) vm_fault_prefault(&fs, vaddr, 0, 0); @@ -898,42 +959,7 @@ vnode_locked: if (hardfault) fs.entry->next_read = fs.pindex + faultcount - reqpage; - if (((prot & VM_PROT_WRITE) != 0 || - (fault_flags & VM_FAULT_DIRTY) != 0) && - (fs.m->oflags & VPO_UNMANAGED) == 0) { - vm_object_set_writeable_dirty(fs.object); - - /* - * If this is a NOSYNC mmap we do not want to set VPO_NOSYNC - * if the page is already dirty to prevent data written with - * the expectation of being synced from not being synced. - * Likewise if this entry does not request NOSYNC then make - * sure the page isn't marked NOSYNC. Applications sharing - * data should use the same flags to avoid ping ponging. - */ - if (fs.entry->eflags & MAP_ENTRY_NOSYNC) { - if (fs.m->dirty == 0) - fs.m->oflags |= VPO_NOSYNC; - } else { - fs.m->oflags &= ~VPO_NOSYNC; - } - - /* - * If the fault is a write, we know that this page is being - * written NOW so dirty it explicitly to save on - * pmap_is_modified() calls later. - * - * Also tell the backing pager, if any, that it should remove - * any swap backing since the page is now dirty. - */ - if (((fault_type & VM_PROT_WRITE) != 0 && - (fault_flags & VM_FAULT_CHANGE_WIRING) == 0) || - (fault_flags & VM_FAULT_DIRTY) != 0) { - vm_page_dirty(fs.m); - vm_pager_page_unswapped(fs.m); - } - } - + vm_fault_dirty(fs.entry, fs.m, prot, fault_type, fault_flags, TRUE); vm_page_assert_xbusied(fs.m); /* From owner-svn-src-releng@FreeBSD.ORG Tue Oct 14 17:13:49 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2D7C19F; Tue, 14 Oct 2014 17:13:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC6249E1; Tue, 14 Oct 2014 17:13:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9EHDnp1048547; Tue, 14 Oct 2014 17:13:49 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9EHDml9048541; Tue, 14 Oct 2014 17:13:48 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410141713.s9EHDml9048541@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 14 Oct 2014 17:13:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273101 - in releng/10.1: release release/amd64 release/i386 share/man/man7 X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Oct 2014 17:13:50 -0000 Author: gjb Date: Tue Oct 14 17:13:47 2014 New Revision: 273101 URL: https://svnweb.freebsd.org/changeset/base/273101 Log: MFstable10 r273080: MFC r272414: Merge the following revisions from ^/projects/release-vmimage: r272234, r272236, r272262, r272264, r272269, r272271, r272272, r272277, r272279, r272376, r272380, r272381, r272392, r272234, r272412: r272234: Initial commit to include virtual machine images as part of the FreeBSD release builds. This adds a make(1) environment variable requirement, WITH_VMIMAGES, which triggers the virtual machine image targets when not defined to an empty value. Relevant user-driven variables include: o VMFORMATS: The virtual machine image formats to create. Valid formats are provided by running 'mkimg --formats' o VMSIZE: The size of the resulting virtual machine image. Typical compression is roughly 140Mb, regardless of the target size (10GB, 15GB, 20GB, 40GB sizes have been tested with the same result). o VMBASE: The prefix of the virtual machine disk images. The VMBASE make(1) environment variable is suffixed with each format in VMFORMATS for each individual disk image, as well as '.img' for the source UFS filesystem passed to mkimg(1). This also includes a new script, mk-vmimage.sh, based on how the VM images for 10.0-RELEASE, 9.3-RELEASE, and 10.1-RELEASE were created (mk-vmimage.sh in ^/user/gjb/thermite/). With the order in which the stages need to occur, as well as sanity-checking error cases, it makes much more sense to execute a shell script called from make(1), using env(1) to set specific parameters for the target image than it does to do this in make(1) directly. r272236: Use VMBASE in place of a hard-coded filename in the CLEANFILES list. r272262: Remove a 'set -x' that snuck in during testing. r272264: release/Makefile: Connect the virtual machine image build to the release target if WITH_VMIMAGES is set to a non-empty value. release/release.sh: Add WITH_VMIMAGES to RELEASE_RMAKEFLAGS. release/release.conf.sample: Add commented entries for tuning the release build if the WITH_VMIMAGES make(1) environment variable is set to a non-empty value. r272269: release/Makefile: Include .OBJDIR in DESTDIR in the vm-base target. release/release.sh: Provide the full path to mddev. r272271: Fix UFS label for the root filesystem. r272272: Remove comments left in accidentally while testing, so the VM /etc/fstab is actually created. r272277: Remove the UFS label from the root filesystem since it is added by mkimg(1) as a gpt label, consistent with the fstab(5) entry. r272279: Comment cleanup in panic() message when mkimg(1) does not support the requested disk image format. r272376: Separate release/scripts/mk-vmimage.sh to machine-specific scripts, making it possible to mimic the functionality for non-x86 targets. Move echo output if MAKEFLAGS is empty outside of usage(). Remove TARGET/TARGET_ARCH evaluation. r272380: Avoid using env(1) to set values passed to mk-vmimage.sh, and instead pass the values as arguments to the script, making it easier to run this by hand, without 'make release'. Add usage_vm_base() and usage_vm_image() usage helpers. r272381: After evaluating WITH_VMIMAGES is non-empty, ensure the mk-vmimage.sh script exists before running it. r272392: Add WITH_COMPRESSED_VMIMAGES variable, which when set enables xz(1) compression of the virtual machine images. This is intentionally separate to allow more fine-grained tuning over which images are compressed, especially in cases where compressing 20GB sparse images can take hours. r272412: Document the new 'vm-image' target, and associated release.conf variables. r272413: Remove two stray comments added during the initial iterations of testing, no longer needed. Approved by: re (marius) Sponsored by: The FreeBSD Foundation Added: releng/10.1/release/amd64/mk-vmimage.sh - copied unchanged from r273080, stable/10/release/amd64/mk-vmimage.sh releng/10.1/release/i386/mk-vmimage.sh - copied unchanged from r273080, stable/10/release/i386/mk-vmimage.sh Modified: releng/10.1/release/Makefile releng/10.1/release/release.conf.sample releng/10.1/release/release.sh releng/10.1/share/man/man7/release.7 Directory Properties: releng/10.1/ (props changed) Modified: releng/10.1/release/Makefile ============================================================================== --- releng/10.1/release/Makefile Tue Oct 14 16:44:15 2014 (r273100) +++ releng/10.1/release/Makefile Tue Oct 14 17:13:47 2014 (r273101) @@ -23,6 +23,9 @@ # WITH_DVD: if set, generate dvd1.iso # WITH_COMPRESSED_IMAGES: if set, compress installation images with xz(1) # (uncompressed images are not removed) +# WITH_VMIMAGES: if set, build virtual machine images with the release +# WITH_COMPRESSED_VMIMAGES: if set, compress virtual machine disk images +# with xz(1) (extremely time consuming) # TARGET/TARGET_ARCH: architecture of built release # @@ -110,6 +113,11 @@ IMAGES+= uefi-dvd1.iso . endif .endif +VMTARGETS= vm-base vm-image +VMFORMATS?= vhd vmdk qcow2 raw +VMSIZE?= 20G +VMBASE?= vm + CLEANFILES= packagesystem *.txz MANIFEST system ${IMAGES} .if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES) . for I in ${IMAGES} @@ -119,7 +127,16 @@ CLEANFILES+= ${I}.xz .if defined(WITH_DVD) && !empty(WITH_DVD) CLEANFILES+= pkg-stage .endif +.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) +CLEANFILES+= ${VMBASE}.img +. for FORMAT in ${VMFORMATS} +CLEANFILES+= ${VMBASE}.${FORMAT} +. endfor +.endif CLEANDIRS= dist ftp release bootonly dvd +.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) +CLEANDIRS+= ${VMTARGETS} +.endif beforeclean: chflags -R noschg . .include @@ -297,6 +314,9 @@ ftp: packagesystem release: ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} obj ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${RELEASE_TARGETS} +.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) + ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${VMTARGETS} +.endif install: .if defined(DESTDIR) && !empty(DESTDIR) @@ -311,3 +331,44 @@ install: .endfor cd ${DESTDIR} && sha256 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA256 cd ${DESTDIR} && md5 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.MD5 +.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) + mkdir -p ${DESTDIR}/vmimages +. for FORMAT in ${VMFORMATS} + cp -p ${VMBASE}.${FORMAT} \ + ${DESTDIR}/vmimages/${OSRELEASE}.${FORMAT} +. endfor +. if defined(WITH_COMPRESSED_VMIMAGES) && !empty(WITH_COMPRESSED_VMIMAGES) +# This is very time consuming, so defer it after the images are moved to +# the DESTDIR. +. for FORMAT in ${VMFORMATS} + # Don't keep the originals. There is a copy in ${.OBJDIR} if needed. + ${XZCMD} ${DESTDIR}/vmimages/${OSRELEASE}.${FORMAT} +. endfor +. endif + cd ${DESTDIR}/vmimages && sha256 ${OSRELEASE}* > \ + ${DESTDIR}/vmimages/CHECKSUM.SHA256 + cd ${DESTDIR}/vmimages && md5 ${OSRELEASE}* > \ + ${DESTDIR}/vmimages/CHECKSUM.MD5 +.endif + +vm-base: +.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) +. if exists(${.CURDIR}/${TARGET}/mk-vmimage.sh) + env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + ${.CURDIR}/${TARGET}/mk-vmimage.sh ${.TARGET} \ + ${VMBASE}.img ${WORLDDIR} ${.OBJDIR}/${.TARGET} ${VMSIZE} +. endif +.endif + touch ${.TARGET} + +vm-image: vm-base +.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) +. if exists(${.CURDIR}/${TARGET}/mk-vmimage.sh) +. for FORMAT in ${VMFORMATS} + env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + ${.CURDIR}/${TARGET}/mk-vmimage.sh ${.TARGET} \ + ${VMBASE}.img ${FORMAT} ${VMBASE}.${FORMAT} +. endfor +. endif +.endif + touch ${.TARGET} Copied: releng/10.1/release/amd64/mk-vmimage.sh (from r273080, stable/10/release/amd64/mk-vmimage.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ releng/10.1/release/amd64/mk-vmimage.sh Tue Oct 14 17:13:47 2014 (r273101, copy of r273080, stable/10/release/amd64/mk-vmimage.sh) @@ -0,0 +1,188 @@ +#!/bin/sh +#- +# Copyright (c) 2014 The FreeBSD Foundation +# All rights reserved. +# +# This software was developed by Glen Barber 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. +# +# mk-vmimage.sh: Create virtual machine disk images in various formats. +# +# $FreeBSD$ +# + +PATH="/bin:/usr/bin:/sbin:/usr/sbin" +export PATH + +usage_vm_base() { + echo -n "$(basename ${0}) vm-base " + echo " " + return 0 +} + +usage_vm_image() { + echo -n "$(basename ${0}) vm-image " + echo " " + return 0 +} + +usage() { + echo "Usage:" + echo "$(basename ${0}) [vm-base|vm-image] [...]" + echo + usage_vm_base + echo + usage_vm_image + exit 1 +} + +panic() { + rc="${1}" + shift 1 + msg="${@}" + printf "${msg}\n" + if [ ! -z "${mddev}" ]; then + mdconfig -d -u ${mddev} + fi + # Do not allow one failure case to chain through any remaining image + # builds. + exit 0 +} + +vm_create_baseimage() { + # Creates the UFS root filesystem for the virtual machine disk, + # written to the formatted disk image with mkimg(1). + # + # Arguments: + # vm-base + + VMBASE="${1}" + WORLDDIR="${2}" + DESTDIR="${3}" + VMSIZE="${4}" + + if [ -z "${VMBASE}" -o -z "${WORLDDIR}" -o -z "${DESTDIR}" \ + -o -z "${VMSIZE}" ]; then + usage + fi + + i=0 + mkdir -p ${DESTDIR} + truncate -s ${VMSIZE} ${VMBASE} + mddev=$(mdconfig -f ${VMBASE}) + newfs -j /dev/${mddev} + mount /dev/${mddev} ${DESTDIR} + cd ${WORLDDIR} && \ + make DESTDIR=${DESTDIR} \ + installworld installkernel distribution || \ + panic 1 "\n\nCannot install the base system to ${DESTDIR}." + chroot ${DESTDIR} /usr/bin/newaliases + echo '# Custom /etc/fstab for FreeBSD VM images' \ + > ${DESTDIR}/etc/fstab + echo '/dev/gpt/rootfs / ufs rw 2 2' \ + >> ${DESTDIR}/etc/fstab + echo '/dev/gpt/swapfs none swap sw 0 0' \ + >> ${DESTDIR}/etc/fstab + sync + while ! umount ${DESTDIR}; do + i=$(( $i + 1 )) + if [ $i -ge 10 ]; then + # This should never happen. But, it has happened. + msg="Cannot umount(8) ${DESTDIR}\n" + msg="${msg}Something has gone horribly wrong." + panic 1 "${msg}" + fi + sleep 1 + done + + return 0 +} + +vm_create_vmdisk() { + # Creates the virtual machine disk image from the raw disk image. + # + # Arguments: + # vm-image " + + VMBASE="${1}" + FORMAT="${2}" + VMIMAGE="${3}" + + if [ -z "${VMBASE}" -o -z "${FORMAT}" -o -z "${VMIMAGE}" ]; then + usage + fi + + mkimg_version=$(mkimg --version 2>/dev/null | awk '{print $2}') + + # We need mkimg(1) '--version' output, at minimum, to be able to + # tell what virtual machine disk image formats are available. + # Bail if mkimg(1) reports an empty '--version' value. + if [ -z "${mkimg_version}" ]; then + msg="Cannot determine mkimg(1) version.\n" + msg="${msg}Cannot continue without a known mkimg(1) version." + panic 0 "${msg}" + fi + + if ! mkimg --formats 2>/dev/null | grep -q ${FORMAT}; then + panic 0 "'${FORMAT}' is not supported by this mkimg(1).\n" + fi + + case ${FORMAT} in + vhd) + mkimg_format=vhdf + ;; + *) + mkimg_format=${FORMAT} + ;; + esac + + mkimg -f ${mkimg_format} -s gpt \ + -b /boot/pmbr -p freebsd-boot/bootfs:=/boot/gptboot \ + -p freebsd-swap/swapfs::1G \ + -p freebsd-ufs/rootfs:=${VMBASE} \ + -o ${VMIMAGE} + + return 0 +} + +main() { + cmd="${1}" + shift 1 + + case ${cmd} in + vm-base) + eval vm_create_baseimage "$@" || return 0 + ;; + vm-image) + eval vm_create_vmdisk "$@" || return 0 + ;; + *|\?) + usage + ;; + esac + + return 0 +} + +main "$@" Copied: releng/10.1/release/i386/mk-vmimage.sh (from r273080, stable/10/release/i386/mk-vmimage.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ releng/10.1/release/i386/mk-vmimage.sh Tue Oct 14 17:13:47 2014 (r273101, copy of r273080, stable/10/release/i386/mk-vmimage.sh) @@ -0,0 +1,188 @@ +#!/bin/sh +#- +# Copyright (c) 2014 The FreeBSD Foundation +# All rights reserved. +# +# This software was developed by Glen Barber 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. +# +# mk-vmimage.sh: Create virtual machine disk images in various formats. +# +# $FreeBSD$ +# + +PATH="/bin:/usr/bin:/sbin:/usr/sbin" +export PATH + +usage_vm_base() { + echo -n "$(basename ${0}) vm-base " + echo " " + return 0 +} + +usage_vm_image() { + echo -n "$(basename ${0}) vm-image " + echo " " + return 0 +} + +usage() { + echo "Usage:" + echo "$(basename ${0}) [vm-base|vm-image] [...]" + echo + usage_vm_base + echo + usage_vm_image + exit 1 +} + +panic() { + rc="${1}" + shift 1 + msg="${@}" + printf "${msg}\n" + if [ ! -z "${mddev}" ]; then + mdconfig -d -u ${mddev} + fi + # Do not allow one failure case to chain through any remaining image + # builds. + exit 0 +} + +vm_create_baseimage() { + # Creates the UFS root filesystem for the virtual machine disk, + # written to the formatted disk image with mkimg(1). + # + # Arguments: + # vm-base + + VMBASE="${1}" + WORLDDIR="${2}" + DESTDIR="${3}" + VMSIZE="${4}" + + if [ -z "${VMBASE}" -o -z "${WORLDDIR}" -o -z "${DESTDIR}" \ + -o -z "${VMSIZE}" ]; then + usage + fi + + i=0 + mkdir -p ${DESTDIR} + truncate -s ${VMSIZE} ${VMBASE} + mddev=$(mdconfig -f ${VMBASE}) + newfs -j /dev/${mddev} + mount /dev/${mddev} ${DESTDIR} + cd ${WORLDDIR} && \ + make DESTDIR=${DESTDIR} \ + installworld installkernel distribution || \ + panic 1 "\n\nCannot install the base system to ${DESTDIR}." + chroot ${DESTDIR} /usr/bin/newaliases + echo '# Custom /etc/fstab for FreeBSD VM images' \ + > ${DESTDIR}/etc/fstab + echo '/dev/gpt/rootfs / ufs rw 2 2' \ + >> ${DESTDIR}/etc/fstab + echo '/dev/gpt/swapfs none swap sw 0 0' \ + >> ${DESTDIR}/etc/fstab + sync + while ! umount ${DESTDIR}; do + i=$(( $i + 1 )) + if [ $i -ge 10 ]; then + # This should never happen. But, it has happened. + msg="Cannot umount(8) ${DESTDIR}\n" + msg="${msg}Something has gone horribly wrong." + panic 1 "${msg}" + fi + sleep 1 + done + + return 0 +} + +vm_create_vmdisk() { + # Creates the virtual machine disk image from the raw disk image. + # + # Arguments: + # vm-image " + + VMBASE="${1}" + FORMAT="${2}" + VMIMAGE="${3}" + + if [ -z "${VMBASE}" -o -z "${FORMAT}" -o -z "${VMIMAGE}" ]; then + usage + fi + + mkimg_version=$(mkimg --version 2>/dev/null | awk '{print $2}') + + # We need mkimg(1) '--version' output, at minimum, to be able to + # tell what virtual machine disk image formats are available. + # Bail if mkimg(1) reports an empty '--version' value. + if [ -z "${mkimg_version}" ]; then + msg="Cannot determine mkimg(1) version.\n" + msg="${msg}Cannot continue without a known mkimg(1) version." + panic 0 "${msg}" + fi + + if ! mkimg --formats 2>/dev/null | grep -q ${FORMAT}; then + panic 0 "'${FORMAT}' is not supported by this mkimg(1).\n" + fi + + case ${FORMAT} in + vhd) + mkimg_format=vhdf + ;; + *) + mkimg_format=${FORMAT} + ;; + esac + + mkimg -f ${mkimg_format} -s gpt \ + -b /boot/pmbr -p freebsd-boot/bootfs:=/boot/gptboot \ + -p freebsd-swap/swapfs::1G \ + -p freebsd-ufs/rootfs:=${VMBASE} \ + -o ${VMIMAGE} + + return 0 +} + +main() { + cmd="${1}" + shift 1 + + case ${cmd} in + vm-base) + eval vm_create_baseimage "$@" || return 0 + ;; + vm-image) + eval vm_create_vmdisk "$@" || return 0 + ;; + *|\?) + usage + ;; + esac + + return 0 +} + +main "$@" Modified: releng/10.1/release/release.conf.sample ============================================================================== --- releng/10.1/release/release.conf.sample Tue Oct 14 16:44:15 2014 (r273100) +++ releng/10.1/release/release.conf.sample Tue Oct 14 17:13:47 2014 (r273101) @@ -72,3 +72,24 @@ PORTBRANCH="ports/head@rHEAD" ## as TARGET/TARGET_ARCH. #CHROOT_MAKEENV= +## Set to a non-empty value to build virtual machine images as part of the +## release build. +#WITH_VMIMAGES= + +## Set to a non-empty value to compress virtual machine images with xz(1) +## as part of the release build. +#WITH_COMPRESSED_VMIMAGES= + +## If WITH_VMIMAGES is set to a non-empty value, this is the name of the +## file to use for the installed userland/kernel. +#VMBASE="vm" + +## If WITH_VMIMAGES is set to a non-empty value, this is the size of the +## virtual machine disk filesystem. Valid size values are described in +## the truncate(1) manual page. +#VMSIZE="20G" + +## If WITH_VMIMAGES is set to a non-empty value, this is a list of disk +## image formats to create. Valid values are listed in the mkimg(1) +## manual page, as well as 'mkimg --formats' output. +#VMFORMATS="vhdf vmdk qcow2 raw" Modified: releng/10.1/release/release.sh ============================================================================== --- releng/10.1/release/release.sh Tue Oct 14 16:44:15 2014 (r273100) +++ releng/10.1/release/release.sh Tue Oct 14 17:13:47 2014 (r273101) @@ -85,6 +85,11 @@ NOPORTS= WITH_DVD= WITH_COMPRESSED_IMAGES= +# Set to non-empty value to build virtual machine images as part of +# the release. +WITH_VMIMAGES= +WITH_COMPRESSED_VMIMAGES= + usage() { echo "Usage: $0 [-c release.conf]" exit 1 @@ -168,7 +173,7 @@ CHROOT_DMAKEFLAGS="${CONF_FILES}" RELEASE_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${ARCH_FLAGS} ${CONF_FILES}" RELEASE_KMAKEFLAGS="${MAKE_FLAGS} ${KERNEL_FLAGS} KERNCONF=\"${KERNEL}\" ${ARCH_FLAGS} ${CONF_FILES}" RELEASE_RMAKEFLAGS="${ARCH_FLAGS} KERNCONF=\"${KERNEL}\" ${CONF_FILES} \ - ${DOCPORTS} WITH_DVD=${WITH_DVD}" + ${DOCPORTS} WITH_DVD=${WITH_DVD} WITH_VMIMAGES=${WITH_VMIMAGES}" # Force src checkout if configured FORCE_SRC_KEY= @@ -271,4 +276,5 @@ eval chroot ${CHROOTDIR} make -C /usr/sr eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \ release eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \ - install DESTDIR=/R WITH_COMPRESSED_IMAGES=${WITH_COMPRESSED_IMAGES} + install DESTDIR=/R WITH_COMPRESSED_IMAGES=${WITH_COMPRESSED_IMAGES} \ + WITH_COMPRESSED_VMIMAGES=${WITH_COMPRESSED_VMIMAGES} Modified: releng/10.1/share/man/man7/release.7 ============================================================================== --- releng/10.1/share/man/man7/release.7 Tue Oct 14 16:44:15 2014 (r273100) +++ releng/10.1/share/man/man7/release.7 Tue Oct 14 17:13:47 2014 (r273101) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 11, 2014 +.Dd October 2, 2014 .Dt RELEASE 7 .Os .Sh NAME @@ -351,6 +351,61 @@ Set to the target directory within to check out .Va ${UBOOTSRC}/${UBOOTBRANCH} . .El +.Sh VIRTUAL MACHINE DISK IMAGES +The following +.Fa release.conf +variables are relevant only to virtual machine disk image builds: +.Bl -tag -width Ev +.It Va WITH_VMIMAGES +Set to a non-null value to build virtual machine disk images as part +of the release build. +.Va WITH_VMIMAGES +may also be specified as an envirionment variable passed to +.Xr make 1 . +.Pp +The option requires +.Xr mkimg 1 +version 20140927 or later. +.It Va WITH_COMPRESSED_VMIMAGES +Set to a non-null value to compress the virtual machine disk images with +.Xr xz 1 +as part of the +.Cm install +.Xr make 1 +target. +Note that compressing virtual machine disk images may take a very long +time on some systems. +.It Va VMBASE +Set to change the name of the resulting virtual machine disk image file. +The default value is +.Va vm . +.It Va VMSIZE +Set to change the size of the virtual machine disk capacity. +The default value is +.Va 20G . +See +.Xr truncate 1 +for valid values. +.Pp +Virtual machine disk images are, by default, created as sparse images. +When +.Va WITH_COMPRESSED_VMIMAGES +is used, the resulting files compressed with +.Xr xz 1 +compress to roughly the same size, regardless of the specified disk image +size. +.It Va VMFORMATS +Set to the target virtual disk image format(s) to create. +By default, the +.Va vhdf , Va vmdk , Va qcow2 , +and +.Va raw +formats are created. +See +.Xr mkimg 1 +for valid format values +.Pq requires version 20140927 or later . +.El .Sh MAKEFILE TARGETS The release makefile .Pq Pa src/release/Makefile @@ -407,6 +462,14 @@ Creates a directory named .Pa ftp containing the distribution files used in network installations and suitable for upload to an FTP mirror. +.It Cm vm-image +Creates virtual machine disk images in various formats. +The +.Cm vm-image +target requires the +.Va WITH_VMIMAGES +.Xr make 1 +envirionment variable to be set to a non-null value. .El .Pp Major subtargets called by targets above: From owner-svn-src-releng@FreeBSD.ORG Tue Oct 14 19:01:12 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D1EDF2D4; Tue, 14 Oct 2014 19:01:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2AFB860; Tue, 14 Oct 2014 19:01:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9EJ1Cmq099467; Tue, 14 Oct 2014 19:01:12 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9EJ1Cie099465; Tue, 14 Oct 2014 19:01:12 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201410141901.s9EJ1Cie099465@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Tue, 14 Oct 2014 19:01:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273103 - releng/10.1/sys/dev/vt X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Oct 2014 19:01:13 -0000 Author: dumbbell Date: Tue Oct 14 19:01:11 2014 New Revision: 273103 URL: https://svnweb.freebsd.org/changeset/base/273103 Log: vt(4): Save/restore keyboard mode & LED states when switching window MF10: r273036 MFC: r272416 Add new functions to manipulate these mode & state, instead of calling kbdd_ioctl() everyhere. This fixes at least two bugs: 1. The state of the Scroll Lock LED and the state of scroll mode could be out-of-sync. For instance, if one enables scroll mode on window #1 and switches to window #2, the LED would remain on, but the window wouldn't be in scroll mode. Similarily, when switching between a console and an X.Org session, the LED states could be inconsistent with the real state. 2. When exiting from an X.Org session, the user could be unable to type anything. The workaround was to switch to another console window and come back. Differential Revision: https://reviews.freebsd.org/D821 Reviewed by: ray@ Approved by: re (marius), ray@ Tested by: kwm@ Modified: releng/10.1/sys/dev/vt/vt.h releng/10.1/sys/dev/vt/vt_core.c Directory Properties: releng/10.1/ (props changed) Modified: releng/10.1/sys/dev/vt/vt.h ============================================================================== --- releng/10.1/sys/dev/vt/vt.h Tue Oct 14 18:34:15 2014 (r273102) +++ releng/10.1/sys/dev/vt/vt.h Tue Oct 14 19:01:11 2014 (r273103) @@ -261,6 +261,7 @@ struct vt_window { unsigned int vw_number; /* (c) Window number. */ int vw_kbdmode; /* (?) Keyboard mode. */ int vw_prev_kbdmode;/* (?) Previous mode. */ + int vw_kbdstate; /* (?) Keyboard state. */ int vw_grabbed; /* (?) Grab count. */ char *vw_kbdsq; /* Escape sequence queue*/ unsigned int vw_flags; /* (d) Per-window flags. */ Modified: releng/10.1/sys/dev/vt/vt_core.c ============================================================================== --- releng/10.1/sys/dev/vt/vt_core.c Tue Oct 14 18:34:15 2014 (r273102) +++ releng/10.1/sys/dev/vt/vt_core.c Tue Oct 14 19:01:11 2014 (r273103) @@ -298,6 +298,97 @@ vt_switch_timer(void *arg) } static int +vt_save_kbd_mode(struct vt_window *vw, keyboard_t *kbd) +{ + int mode, ret; + + mode = 0; + ret = kbdd_ioctl(kbd, KDGKBMODE, (caddr_t)&mode); + if (ret == ENOIOCTL) + ret = ENODEV; + if (ret != 0) + return (ret); + + vw->vw_kbdmode = mode; + + return (0); +} + +static int +vt_update_kbd_mode(struct vt_window *vw, keyboard_t *kbd) +{ + int ret; + + ret = kbdd_ioctl(kbd, KDSKBMODE, (caddr_t)&vw->vw_kbdmode); + if (ret == ENOIOCTL) + ret = ENODEV; + + return (ret); +} + +static int +vt_save_kbd_state(struct vt_window *vw, keyboard_t *kbd) +{ + int state, ret; + + state = 0; + ret = kbdd_ioctl(kbd, KDGKBSTATE, (caddr_t)&state); + if (ret == ENOIOCTL) + ret = ENODEV; + if (ret != 0) + return (ret); + + vw->vw_kbdstate &= ~LOCK_MASK; + vw->vw_kbdstate |= state & LOCK_MASK; + + return (0); +} + +static int +vt_update_kbd_state(struct vt_window *vw, keyboard_t *kbd) +{ + int state, ret; + + state = vw->vw_kbdstate & LOCK_MASK; + ret = kbdd_ioctl(kbd, KDSKBSTATE, (caddr_t)&state); + if (ret == ENOIOCTL) + ret = ENODEV; + + return (ret); +} + +static int +vt_save_kbd_leds(struct vt_window *vw, keyboard_t *kbd) +{ + int leds, ret; + + leds = 0; + ret = kbdd_ioctl(kbd, KDGETLED, (caddr_t)&leds); + if (ret == ENOIOCTL) + ret = ENODEV; + if (ret != 0) + return (ret); + + vw->vw_kbdstate &= ~LED_MASK; + vw->vw_kbdstate |= leds & LED_MASK; + + return (0); +} + +static int +vt_update_kbd_leds(struct vt_window *vw, keyboard_t *kbd) +{ + int leds, ret; + + leds = vw->vw_kbdstate & LED_MASK; + ret = kbdd_ioctl(kbd, KDSETLED, (caddr_t)&leds); + if (ret == ENOIOCTL) + ret = ENODEV; + + return (ret); +} + +static int vt_window_preswitch(struct vt_window *vw, struct vt_window *curvw) { @@ -409,7 +500,11 @@ vt_window_switch(struct vt_window *vw) mtx_lock(&Giant); kbd = kbd_get_keyboard(vd->vd_keyboard); if (kbd != NULL) { - kbdd_ioctl(kbd, KDSKBMODE, (void *)&vw->vw_kbdmode); + if (curvw->vw_kbdmode == K_XLATE) + vt_save_kbd_state(curvw, kbd); + + vt_update_kbd_mode(vw, kbd); + vt_update_kbd_state(vw, kbd); } mtx_unlock(&Giant); DPRINTF(10, "%s(ttyv%d) done\n", __func__, vw->vw_number); @@ -602,7 +697,6 @@ static int vt_processkey(keyboard_t *kbd, struct vt_device *vd, int c) { struct vt_window *vw = vd->vd_curwindow; - int state = 0; #if VT_ALT_TO_ESC_HACK if (c & RELKEY) { @@ -665,10 +759,9 @@ vt_processkey(keyboard_t *kbd, struct vt vt_proc_window_switch(vw); return (0); case SLK: { - - kbdd_ioctl(kbd, KDGKBSTATE, (caddr_t)&state); + vt_save_kbd_state(vw, kbd); VT_LOCK(vd); - if (state & SLKED) { + if (vw->vw_kbdstate & SLKED) { /* Turn scrolling on. */ vw->vw_flags |= VWF_SCROLL; VTBUF_SLCK_ENABLE(&vw->vw_buf); @@ -1201,13 +1294,11 @@ vtterm_cngetc(struct terminal *tm) struct vt_window *vw = tm->tm_softc; struct vt_device *vd = vw->vw_device; keyboard_t *kbd; - int state; u_int c; if (vw->vw_kbdsq && *vw->vw_kbdsq) return (*vw->vw_kbdsq++); - state = 0; /* Make sure the splash screen is not there. */ if (vd->vd_flags & VDF_SPLASH) { /* Remove splash */ @@ -1223,8 +1314,8 @@ vtterm_cngetc(struct terminal *tm) return (-1); /* Force keyboard input mode to K_XLATE */ - c = K_XLATE; - kbdd_ioctl(kbd, KDSKBMODE, (void *)&c); + vw->vw_kbdmode = K_XLATE; + vt_update_kbd_mode(vw, kbd); /* Switch the keyboard to polling to make it work here. */ kbdd_poll(kbd, TRUE); @@ -1243,8 +1334,8 @@ vtterm_cngetc(struct terminal *tm) if (c & SPCLKEY) { switch (c) { case SPCLKEY | SLK: - kbdd_ioctl(kbd, KDGKBSTATE, (caddr_t)&state); - if (state & SLKED) { + vt_save_kbd_state(vw, kbd); + if (vw->vw_kbdstate & SLKED) { /* Turn scrolling on. */ vw->vw_flags |= VWF_SCROLL; VTBUF_SLCK_ENABLE(&vw->vw_buf); @@ -1311,7 +1402,7 @@ vtterm_cngrab(struct terminal *tm) /* We shall always use the keyboard in the XLATE mode here. */ vw->vw_prev_kbdmode = vw->vw_kbdmode; vw->vw_kbdmode = K_XLATE; - (void)kbdd_ioctl(kbd, KDSKBMODE, (caddr_t)&vw->vw_kbdmode); + vt_update_kbd_mode(vw, kbd); kbdd_poll(kbd, TRUE); } @@ -1336,7 +1427,7 @@ vtterm_cnungrab(struct terminal *tm) kbdd_poll(kbd, FALSE); vw->vw_kbdmode = vw->vw_prev_kbdmode; - (void)kbdd_ioctl(kbd, KDSKBMODE, (caddr_t)&vw->vw_kbdmode); + vt_update_kbd_mode(vw, kbd); kbdd_disable(kbd); } @@ -1890,12 +1981,8 @@ skip_thunk: case SETFKEY: case KDGKBINFO: case KDGKBTYPE: - case KDSKBSTATE: /* set keyboard state (locks) */ - case KDGKBSTATE: /* get keyboard state (locks) */ case KDGETREPEAT: /* get keyboard repeat & delay rates */ case KDSETREPEAT: /* set keyboard repeat & delay rates (new) */ - case KDSETLED: /* set keyboard LED status */ - case KDGETLED: /* get keyboard LED status */ case KBADDKBD: /* add/remove keyboard to/from mux */ case KBRELKBD: { error = 0; @@ -1915,18 +2002,101 @@ skip_thunk: } return (error); } + case KDGKBSTATE: { /* get keyboard state (locks) */ + error = 0; + + if (vw == vd->vd_curwindow) { + mtx_lock(&Giant); + kbd = kbd_get_keyboard(vd->vd_keyboard); + if (kbd != NULL) + error = vt_save_kbd_state(vw, kbd); + mtx_unlock(&Giant); + + if (error != 0) + return (error); + } + + *(int *)data = vw->vw_kbdstate & LOCK_MASK; + + return (error); + } + case KDSKBSTATE: { /* set keyboard state (locks) */ + int state; + + state = *(int *)data; + if (state & ~LOCK_MASK) + return (EINVAL); + + vw->vw_kbdstate &= ~LOCK_MASK; + vw->vw_kbdstate |= state; + + error = 0; + if (vw == vd->vd_curwindow) { + mtx_lock(&Giant); + kbd = kbd_get_keyboard(vd->vd_keyboard); + if (kbd != NULL) + error = vt_update_kbd_state(vw, kbd); + mtx_unlock(&Giant); + } + + return (error); + } + case KDGETLED: { /* get keyboard LED status */ + error = 0; + + if (vw == vd->vd_curwindow) { + mtx_lock(&Giant); + kbd = kbd_get_keyboard(vd->vd_keyboard); + if (kbd != NULL) + error = vt_save_kbd_leds(vw, kbd); + mtx_unlock(&Giant); + + if (error != 0) + return (error); + } + + *(int *)data = vw->vw_kbdstate & LED_MASK; + + return (error); + } + case KDSETLED: { /* set keyboard LED status */ + int leds; + + leds = *(int *)data; + if (leds & ~LED_MASK) + return (EINVAL); + + vw->vw_kbdstate &= ~LED_MASK; + vw->vw_kbdstate |= leds; + + error = 0; + if (vw == vd->vd_curwindow) { + mtx_lock(&Giant); + kbd = kbd_get_keyboard(vd->vd_keyboard); + if (kbd != NULL) + error = vt_update_kbd_leds(vw, kbd); + mtx_unlock(&Giant); + } + + return (error); + } case KDGKBMODE: { - int mode = -1; + error = 0; - mtx_lock(&Giant); - kbd = kbd_get_keyboard(vd->vd_keyboard); - if (kbd != NULL) { - kbdd_ioctl(kbd, KDGKBMODE, (void *)&mode); + if (vw == vd->vd_curwindow) { + mtx_lock(&Giant); + kbd = kbd_get_keyboard(vd->vd_keyboard); + if (kbd != NULL) + error = vt_save_kbd_mode(vw, kbd); + mtx_unlock(&Giant); + + if (error != 0) + return (error); } - mtx_unlock(&Giant); - DPRINTF(20, "mode %d, vw_kbdmode %d\n", mode, vw->vw_kbdmode); - *(int *)data = mode; - return (0); + + *(int *)data = vw->vw_kbdmode; + + return (error); } case KDSKBMODE: { int mode; @@ -1937,19 +2107,17 @@ skip_thunk: case K_RAW: case K_CODE: vw->vw_kbdmode = mode; - if (vw == vd->vd_curwindow) { - keyboard_t *kbd; - error = 0; + error = 0; + if (vw == vd->vd_curwindow) { mtx_lock(&Giant); kbd = kbd_get_keyboard(vd->vd_keyboard); - if (kbd != NULL) { - error = kbdd_ioctl(kbd, KDSKBMODE, - (void *)&mode); - } + if (kbd != NULL) + error = vt_update_kbd_mode(vw, kbd); mtx_unlock(&Giant); } - return (0); + + return (error); default: return (EINVAL); } @@ -1977,8 +2145,17 @@ skip_thunk: return (0); case CONS_GETINFO: { vid_info_t *vi = (vid_info_t *)data; + if (vi->size != sizeof(struct vid_info)) + return (EINVAL); + + if (vw == vd->vd_curwindow) { + kbd = kbd_get_keyboard(vd->vd_keyboard); + if (kbd != NULL) + vt_save_kbd_state(vw, kbd); + } vi->m_num = vd->vd_curwindow->vw_number + 1; + vi->mk_keylock = vw->vw_kbdstate & LOCK_MASK; /* XXX: other fields! */ return (0); } @@ -2093,13 +2270,14 @@ skip_thunk: (void *)vd, vt_kbdevent, vd); if (i >= 0) { if (vd->vd_keyboard != -1) { + vt_save_kbd_state(vd->vd_curwindow, kbd); kbd_release(kbd, (void *)vd); } kbd = kbd_get_keyboard(i); vd->vd_keyboard = i; - (void)kbdd_ioctl(kbd, KDSKBMODE, - (caddr_t)&vd->vd_curwindow->vw_kbdmode); + vt_update_kbd_mode(vd->vd_curwindow, kbd); + vt_update_kbd_state(vd->vd_curwindow, kbd); } else { error = EPERM; /* XXX */ } @@ -2115,6 +2293,7 @@ skip_thunk: mtx_unlock(&Giant); return (EINVAL); } + vt_save_kbd_state(vd->vd_curwindow, kbd); error = kbd_release(kbd, (void *)vd); if (error == 0) { vd->vd_keyboard = -1; From owner-svn-src-releng@FreeBSD.ORG Tue Oct 14 19:10:00 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E03EA522; Tue, 14 Oct 2014 19:10:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB4268D3; Tue, 14 Oct 2014 19:10:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9EJA0GG002364; Tue, 14 Oct 2014 19:10:00 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9EJA0Eu002363; Tue, 14 Oct 2014 19:10:00 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201410141910.s9EJA0Eu002363@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Tue, 14 Oct 2014 19:10:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273104 - releng/10.1/sys/dev/vt X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Oct 2014 19:10:01 -0000 Author: dumbbell Date: Tue Oct 14 19:10:00 2014 New Revision: 273104 URL: https://svnweb.freebsd.org/changeset/base/273104 Log: vt(4): Don't recalculate buffer size if we don't know screen size MF10: r273037 MFC: r272537 When the screen size is unknown, it's set to 0x0. We can't use that as the buffer size, otherwise, functions such as vtbuf_fill() will fail. This fixes a panic on RaspberryPi, where there's no vt(4) backend configured early in boot. PR: 193981 Tested by: danilo@ Approved by: re (marius) Modified: releng/10.1/sys/dev/vt/vt_core.c Directory Properties: releng/10.1/ (props changed) Modified: releng/10.1/sys/dev/vt/vt_core.c ============================================================================== --- releng/10.1/sys/dev/vt/vt_core.c Tue Oct 14 19:01:11 2014 (r273103) +++ releng/10.1/sys/dev/vt/vt_core.c Tue Oct 14 19:10:00 2014 (r273104) @@ -1269,7 +1269,8 @@ vtterm_cnprobe(struct terminal *tm, stru * that we have the real viewable size, fix it in the static * buffer. */ - vt_termsize(vd, vw->vw_font, &vw->vw_buf.vb_scr_size); + if (vd->vd_width != 0 && vd->vd_height != 0) + vt_termsize(vd, vw->vw_font, &vw->vw_buf.vb_scr_size); vtbuf_init_early(&vw->vw_buf); vt_winsize(vd, vw->vw_font, &wsz); From owner-svn-src-releng@FreeBSD.ORG Tue Oct 14 19:38:33 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ADEC7C9E; Tue, 14 Oct 2014 19:38:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 890DCBCA; Tue, 14 Oct 2014 19:38:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9EJcXIv016366; Tue, 14 Oct 2014 19:38:33 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9EJcW2d016362; Tue, 14 Oct 2014 19:38:32 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201410141938.s9EJcW2d016362@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 14 Oct 2014 19:38:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273106 - releng/10.1/sys/netinet X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Oct 2014 19:38:33 -0000 Author: tuexen Date: Tue Oct 14 19:38:31 2014 New Revision: 273106 URL: https://svnweb.freebsd.org/changeset/base/273106 Log: MF10 r273000 (r272750 in head) Ensure that the number of stream reported in srs_number_streams is consistent with the amount of data provided in the SCTP_RESET_STREAMS socket option. Thanks to Peter Bostroem from Google for drawing my attention to this part of the code. MF10 r273001 (r272751 in head): Ensure that the list of streams sent in a stream reset parameter fits in an mbuf-cluster. Thanks to Peter Bostroem for drawing my attention to this part of the code. MF10 r273002 (r272841 in head): Ensure that the flags field of sctp_tmit_chunks is initialized. Thanks to Peter Bostroem from Google for reporting the issue. Approved by: re (marius) Modified: releng/10.1/sys/netinet/sctp_input.c releng/10.1/sys/netinet/sctp_output.c releng/10.1/sys/netinet/sctp_output.h releng/10.1/sys/netinet/sctp_usrreq.c Directory Properties: releng/10.1/ (props changed) Modified: releng/10.1/sys/netinet/sctp_input.c ============================================================================== --- releng/10.1/sys/netinet/sctp_input.c Tue Oct 14 19:21:04 2014 (r273105) +++ releng/10.1/sys/netinet/sctp_input.c Tue Oct 14 19:38:31 2014 (r273106) @@ -4069,8 +4069,10 @@ __attribute__((noinline)) if (chk == NULL) { return (ret_code); } + chk->copy_by_ref = 0; chk->rec.chunk_id.id = SCTP_STREAM_RESET; chk->rec.chunk_id.can_take_data = 0; + chk->flags = 0; chk->asoc = &stcb->asoc; chk->no_fr_allowed = 0; chk->book_size = chk->send_size = sizeof(struct sctp_chunkhdr); Modified: releng/10.1/sys/netinet/sctp_output.c ============================================================================== --- releng/10.1/sys/netinet/sctp_output.c Tue Oct 14 19:21:04 2014 (r273105) +++ releng/10.1/sys/netinet/sctp_output.c Tue Oct 14 19:38:31 2014 (r273106) @@ -8932,16 +8932,11 @@ sctp_queue_op_err(struct sctp_tcb *stcb, return; } chk->send_size = 0; - mat = op_err; - while (mat != NULL) { + for (mat = op_err; mat != NULL; mat = SCTP_BUF_NEXT(mat)) { chk->send_size += SCTP_BUF_LEN(mat); - mat = SCTP_BUF_NEXT(mat); } - chk->rec.chunk_id.id = SCTP_OPERATION_ERROR; - chk->rec.chunk_id.can_take_data = 1; chk->sent = SCTP_DATAGRAM_UNSENT; chk->snd_count = 0; - chk->flags = 0; chk->asoc = &stcb->asoc; chk->data = op_err; chk->whoTo = NULL; @@ -9029,12 +9024,12 @@ sctp_send_cookie_echo(struct mbuf *m, return (-5); } chk->copy_by_ref = 0; - chk->send_size = plen; chk->rec.chunk_id.id = SCTP_COOKIE_ECHO; chk->rec.chunk_id.can_take_data = 0; + chk->flags = CHUNK_FLAGS_FRAGMENT_OK; + chk->send_size = plen; chk->sent = SCTP_DATAGRAM_UNSENT; chk->snd_count = 0; - chk->flags = CHUNK_FLAGS_FRAGMENT_OK; chk->asoc = &stcb->asoc; chk->data = cookie; chk->whoTo = net; @@ -9097,12 +9092,12 @@ sctp_send_heartbeat_ack(struct sctp_tcb return; } chk->copy_by_ref = 0; - chk->send_size = chk_length; chk->rec.chunk_id.id = SCTP_HEARTBEAT_ACK; chk->rec.chunk_id.can_take_data = 1; + chk->flags = 0; + chk->send_size = chk_length; chk->sent = SCTP_DATAGRAM_UNSENT; chk->snd_count = 0; - chk->flags = 0; chk->asoc = &stcb->asoc; chk->data = outchain; chk->whoTo = net; @@ -9134,12 +9129,12 @@ sctp_send_cookie_ack(struct sctp_tcb *st return; } chk->copy_by_ref = 0; - chk->send_size = sizeof(struct sctp_chunkhdr); chk->rec.chunk_id.id = SCTP_COOKIE_ACK; chk->rec.chunk_id.can_take_data = 1; + chk->flags = 0; + chk->send_size = sizeof(struct sctp_chunkhdr); chk->sent = SCTP_DATAGRAM_UNSENT; chk->snd_count = 0; - chk->flags = 0; chk->asoc = &stcb->asoc; chk->data = cookie_ack; if (chk->asoc->last_control_chunk_from != NULL) { @@ -9180,9 +9175,10 @@ sctp_send_shutdown_ack(struct sctp_tcb * return; } chk->copy_by_ref = 0; - chk->send_size = sizeof(struct sctp_chunkhdr); chk->rec.chunk_id.id = SCTP_SHUTDOWN_ACK; chk->rec.chunk_id.can_take_data = 1; + chk->flags = 0; + chk->send_size = sizeof(struct sctp_chunkhdr); chk->sent = SCTP_DATAGRAM_UNSENT; chk->snd_count = 0; chk->flags = 0; @@ -9223,9 +9219,10 @@ sctp_send_shutdown(struct sctp_tcb *stcb return; } chk->copy_by_ref = 0; - chk->send_size = sizeof(struct sctp_shutdown_chunk); chk->rec.chunk_id.id = SCTP_SHUTDOWN; chk->rec.chunk_id.can_take_data = 1; + chk->flags = 0; + chk->send_size = sizeof(struct sctp_shutdown_chunk); chk->sent = SCTP_DATAGRAM_UNSENT; chk->snd_count = 0; chk->flags = 0; @@ -9276,13 +9273,13 @@ sctp_send_asconf(struct sctp_tcb *stcb, return; } chk->copy_by_ref = 0; - chk->data = m_asconf; - chk->send_size = len; chk->rec.chunk_id.id = SCTP_ASCONF; chk->rec.chunk_id.can_take_data = 0; + chk->flags = CHUNK_FLAGS_FRAGMENT_OK; + chk->data = m_asconf; + chk->send_size = len; chk->sent = SCTP_DATAGRAM_UNSENT; chk->snd_count = 0; - chk->flags = CHUNK_FLAGS_FRAGMENT_OK; chk->asoc = &stcb->asoc; chk->whoTo = net; if (chk->whoTo) { @@ -9371,7 +9368,9 @@ sctp_send_asconf_ack(struct sctp_tcb *st return; } chk->copy_by_ref = 0; - + chk->rec.chunk_id.id = SCTP_ASCONF_ACK; + chk->rec.chunk_id.can_take_data = 1; + chk->flags = CHUNK_FLAGS_FRAGMENT_OK; chk->whoTo = net; if (chk->whoTo) { atomic_add_int(&chk->whoTo->ref_count, 1); @@ -9380,11 +9379,8 @@ sctp_send_asconf_ack(struct sctp_tcb *st chk->send_size = 0; /* Get size */ chk->send_size = ack->len; - chk->rec.chunk_id.id = SCTP_ASCONF_ACK; - chk->rec.chunk_id.can_take_data = 1; chk->sent = SCTP_DATAGRAM_UNSENT; chk->snd_count = 0; - chk->flags |= CHUNK_FLAGS_FRAGMENT_OK; /* XXX */ chk->asoc = &stcb->asoc; TAILQ_INSERT_TAIL(&chk->asoc->control_send_queue, chk, sctp_next); @@ -10264,6 +10260,7 @@ send_forward_tsn(struct sctp_tcb *stcb, chk->copy_by_ref = 0; chk->rec.chunk_id.id = SCTP_FORWARD_CUM_TSN; chk->rec.chunk_id.can_take_data = 0; + chk->flags = 0; chk->asoc = asoc; chk->whoTo = NULL; chk->data = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_NOWAIT, 1, MT_DATA); @@ -10497,6 +10494,7 @@ sctp_send_sack(struct sctp_tcb *stcb, in /* Clear our pkt counts */ asoc->data_pkts_seen = 0; + a_chk->flags = 0; a_chk->asoc = asoc; a_chk->snd_count = 0; a_chk->send_size = 0; /* fill in later */ @@ -11274,6 +11272,7 @@ sctp_send_hb(struct sctp_tcb *stcb, stru chk->copy_by_ref = 0; chk->rec.chunk_id.id = SCTP_HEARTBEAT_REQUEST; chk->rec.chunk_id.can_take_data = 1; + chk->flags = 0; chk->asoc = &stcb->asoc; chk->send_size = sizeof(struct sctp_heartbeat_chunk); @@ -11375,10 +11374,11 @@ sctp_send_ecn_echo(struct sctp_tcb *stcb if (chk == NULL) { return; } - chk->copy_by_ref = 0; SCTP_STAT_INCR(sctps_queue_upd_ecne); + chk->copy_by_ref = 0; chk->rec.chunk_id.id = SCTP_ECN_ECHO; chk->rec.chunk_id.can_take_data = 0; + chk->flags = 0; chk->asoc = &stcb->asoc; chk->send_size = sizeof(struct sctp_ecne_chunk); chk->data = sctp_get_mbuf_for_msg(chk->send_size, 0, M_NOWAIT, 1, MT_HEADER); @@ -11438,6 +11438,9 @@ sctp_send_packet_dropped(struct sctp_tcb return; } chk->copy_by_ref = 0; + chk->rec.chunk_id.id = SCTP_PACKET_DROPPED; + chk->rec.chunk_id.can_take_data = 1; + chk->flags = 0; len -= iphlen; chk->send_size = len; /* Validate that we do not have an ABORT in here. */ @@ -11524,8 +11527,6 @@ jump_out: } else { chk->whoTo = NULL; } - chk->rec.chunk_id.id = SCTP_PACKET_DROPPED; - chk->rec.chunk_id.can_take_data = 1; drp->ch.chunk_type = SCTP_PACKET_DROPPED; drp->ch.chunk_length = htons(chk->send_size); spc = SCTP_SB_LIMIT_RCV(stcb->sctp_socket); @@ -11591,6 +11592,7 @@ sctp_send_cwr(struct sctp_tcb *stcb, str chk->copy_by_ref = 0; chk->rec.chunk_id.id = SCTP_ECN_CWR; chk->rec.chunk_id.can_take_data = 1; + chk->flags = 0; chk->asoc = &stcb->asoc; chk->send_size = sizeof(struct sctp_cwr_chunk); chk->data = sctp_get_mbuf_for_msg(chk->send_size, 0, M_NOWAIT, 1, MT_HEADER); @@ -11853,7 +11855,7 @@ sctp_add_an_in_stream(struct sctp_tmit_c int sctp_send_str_reset_req(struct sctp_tcb *stcb, - int number_entries, uint16_t * list, + uint16_t number_entries, uint16_t * list, uint8_t send_out_req, uint8_t send_in_req, uint8_t send_tsn_req, @@ -11886,6 +11888,14 @@ sctp_send_str_reset_req(struct sctp_tcb SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTP_OUTPUT, EINVAL); return (EINVAL); } + if (number_entries > (MCLBYTES - + SCTP_MIN_OVERHEAD - + sizeof(struct sctp_chunkhdr) - + sizeof(struct sctp_stream_reset_out_request)) / + sizeof(uint16_t)) { + SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTP_OUTPUT, ENOMEM); + return (ENOMEM); + } sctp_alloc_a_chunk(stcb, chk); if (chk == NULL) { SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTP_OUTPUT, ENOMEM); @@ -11894,6 +11904,7 @@ sctp_send_str_reset_req(struct sctp_tcb chk->copy_by_ref = 0; chk->rec.chunk_id.id = SCTP_STREAM_RESET; chk->rec.chunk_id.can_take_data = 0; + chk->flags = 0; chk->asoc = &stcb->asoc; chk->book_size = sizeof(struct sctp_chunkhdr); chk->send_size = SCTP_SIZE32(chk->book_size); Modified: releng/10.1/sys/netinet/sctp_output.h ============================================================================== --- releng/10.1/sys/netinet/sctp_output.h Tue Oct 14 19:21:04 2014 (r273105) +++ releng/10.1/sys/netinet/sctp_output.h Tue Oct 14 19:38:31 2014 (r273106) @@ -181,8 +181,8 @@ sctp_add_stream_reset_result_tsn(struct uint32_t, uint32_t, uint32_t, uint32_t); int -sctp_send_str_reset_req(struct sctp_tcb *, int, uint16_t *, uint8_t, uint8_t, - uint8_t, uint8_t, uint16_t, uint16_t, uint8_t); +sctp_send_str_reset_req(struct sctp_tcb *, uint16_t, uint16_t *, uint8_t, + uint8_t, uint8_t, uint8_t, uint16_t, uint16_t, uint8_t); void sctp_send_abort(struct mbuf *, int, struct sockaddr *, struct sockaddr *, Modified: releng/10.1/sys/netinet/sctp_usrreq.c ============================================================================== --- releng/10.1/sys/netinet/sctp_usrreq.c Tue Oct 14 19:21:04 2014 (r273105) +++ releng/10.1/sys/netinet/sctp_usrreq.c Tue Oct 14 19:38:31 2014 (r273106) @@ -4431,6 +4431,12 @@ sctp_setopt(struct socket *so, int optna SCTP_TCB_UNLOCK(stcb); break; } + if (sizeof(struct sctp_reset_streams) + + strrst->srs_number_streams * sizeof(uint16_t) > optsize) { + error = EINVAL; + SCTP_TCB_UNLOCK(stcb); + break; + } if (stcb->asoc.stream_reset_outstanding) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EALREADY); error = EALREADY; From owner-svn-src-releng@FreeBSD.ORG Wed Oct 15 05:24:44 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 41A496D5; Wed, 15 Oct 2014 05:24:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D8F4D7D; Wed, 15 Oct 2014 05:24:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9F5Oix2016089; Wed, 15 Oct 2014 05:24:44 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9F5OitS016088; Wed, 15 Oct 2014 05:24:44 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410150524.s9F5OitS016088@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 15 Oct 2014 05:24:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273120 - releng/10.1/release/pkg_repos X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Oct 2014 05:24:44 -0000 Author: gjb Date: Wed Oct 15 05:24:43 2014 New Revision: 273120 URL: https://svnweb.freebsd.org/changeset/base/273120 Log: Update the pkg(8) repository configuration file for the dvd package set 10.1-RELEASE to use the release packages. This is a direct commit to releng/10.1. Approved by: re (rodrigc) Sponsored by: The FreeBSD Foundation Modified: releng/10.1/release/pkg_repos/release-dvd.conf Modified: releng/10.1/release/pkg_repos/release-dvd.conf ============================================================================== --- releng/10.1/release/pkg_repos/release-dvd.conf Wed Oct 15 05:22:48 2014 (r273119) +++ releng/10.1/release/pkg_repos/release-dvd.conf Wed Oct 15 05:24:43 2014 (r273120) @@ -1,6 +1,6 @@ # $FreeBSD$ release: { - url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest", + url: "pkg+http://pkg.FreeBSD.org/${ABI}/release_1", mirror_type: "srv", signature_type: "fingerprints", fingerprints: "/usr/share/keys/pkg", From owner-svn-src-releng@FreeBSD.ORG Wed Oct 15 06:31:08 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E4B5B1CB; Wed, 15 Oct 2014 06:31:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D02C85E6; Wed, 15 Oct 2014 06:31:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9F6V8gd047293; Wed, 15 Oct 2014 06:31:08 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9F6V87H047292; Wed, 15 Oct 2014 06:31:08 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201410150631.s9F6V87H047292@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Wed, 15 Oct 2014 06:31:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273122 - releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Oct 2014 06:31:09 -0000 Author: araujo (ports committer) Date: Wed Oct 15 06:31:08 2014 New Revision: 273122 URL: https://svnweb.freebsd.org/changeset/base/273122 Log: Make external NFS clients know when files have their attributes changed and avoid cache the file's state indefinitely. The va_filerev is what is sent to the client as the "change" attribute, the client is periodically fetching the attributes and without this option the attribute remains as some garbage value. Reported by: Kevin Buhr Reviewed by: delphij Approved by: re (gjb), delphij Obtained from: r272467 Modified: releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Oct 15 06:10:33 2014 (r273121) +++ releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Oct 15 06:31:08 2014 (r273122) @@ -2827,6 +2827,7 @@ zfs_getattr(vnode_t *vp, vattr_t *vap, i #endif vap->va_seq = zp->z_seq; vap->va_flags = 0; /* FreeBSD: Reset chflags(2) flags. */ + vap->va_filerev = zp->z_seq; /* * Add in any requested optional attributes and the create time. From owner-svn-src-releng@FreeBSD.ORG Wed Oct 15 16:54:20 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE2C8148; Wed, 15 Oct 2014 16:54:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C9B9CDE; Wed, 15 Oct 2014 16:54:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9FGsJHj041929; Wed, 15 Oct 2014 16:54:19 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9FGsIMF041920; Wed, 15 Oct 2014 16:54:18 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201410151654.s9FGsIMF041920@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 15 Oct 2014 16:54:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273137 - in releng/10.1/sys: kern sys X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Oct 2014 16:54:20 -0000 Author: mjg Date: Wed Oct 15 16:54:18 2014 New Revision: 273137 URL: https://svnweb.freebsd.org/changeset/base/273137 Log: MFC r273109: fget_unlocked currently reads 'fde' which is a structure consisting of serveral fields. In effect the read is inatomic and may result in obtaining file pointer with stale or incorrect capabilities. Example race is with dup2. Side effect is that capability checks can be circumvented. Fix the problem with introduction of sequence counters. MFC r269023,r272503,r272505,r272523,r272567,r272569,r272574: Prepare fget_unlocked for reading fd table only once. Some capsicum functions accept fdp + fd and lookup fde based on that. Add variants which accept fde. =============================== Add sequence counters with memory barriers. Current implementation is somewhat simplistic and hackish, will be improved later after possible memory barrier overhaul. =============================== Plug capability races. fp and appropriate capability lookups were not atomic, which could result in improper capabilities being checked. This could result either in protection bypass or in a spurious ENOTCAPABLE. Make fp + capability check atomic with the help of sequence counters. =============================== Put and #ifdef _KERNEL around the #include for opt_capsicum.h to hopefully allow the build to finish after r272505. =============================== filedesc: fix up breakage introduced in 272505 Include sequence counter supports incoditionally [1]. This fixes reprted build problems with e.g. nvidia driver due to missing opt_capsicum.h. Replace fishy looking sizeof with offsetof. Make fde_seq the last member in order to simplify calculations. =============================== Keep struct filedescent comments within 80-char limit. =============================== seq_t needs to be visible to userspace Approved by: re (kib) Added: releng/10.1/sys/sys/seq.h - copied unchanged from r273109, stable/10/sys/sys/seq.h Modified: releng/10.1/sys/kern/kern_descrip.c releng/10.1/sys/kern/sys_capability.c releng/10.1/sys/sys/capability.h releng/10.1/sys/sys/filedesc.h Directory Properties: releng/10.1/ (props changed) Modified: releng/10.1/sys/kern/kern_descrip.c ============================================================================== --- releng/10.1/sys/kern/kern_descrip.c Wed Oct 15 14:07:24 2014 (r273136) +++ releng/10.1/sys/kern/kern_descrip.c Wed Oct 15 16:54:18 2014 (r273137) @@ -304,11 +304,18 @@ _fdfree(struct filedesc *fdp, int fd, in struct filedescent *fde; fde = &fdp->fd_ofiles[fd]; +#ifdef CAPABILITIES + if (!last) + seq_write_begin(&fde->fde_seq); +#endif filecaps_free(&fde->fde_caps); if (last) return; - bzero(fde, sizeof(*fde)); + bzero(fde, fde_change_size); fdunused(fdp, fd); +#ifdef CAPABILITIES + seq_write_end(&fde->fde_seq); +#endif } static inline void @@ -899,13 +906,19 @@ do_dup(struct thread *td, int flags, int /* * Duplicate the source descriptor. */ +#ifdef CAPABILITIES + seq_write_begin(&newfde->fde_seq); +#endif filecaps_free(&newfde->fde_caps); - *newfde = *oldfde; + memcpy(newfde, oldfde, fde_change_size); filecaps_copy(&oldfde->fde_caps, &newfde->fde_caps); if ((flags & DUP_CLOEXEC) != 0) newfde->fde_flags = oldfde->fde_flags | UF_EXCLOSE; else newfde->fde_flags = oldfde->fde_flags & ~UF_EXCLOSE; +#ifdef CAPABILITIES + seq_write_end(&newfde->fde_seq); +#endif *retval = new; if (delfp != NULL) { @@ -1804,6 +1817,9 @@ finstall(struct thread *td, struct file } fhold(fp); fde = &fdp->fd_ofiles[*fd]; +#ifdef CAPABILITIES + seq_write_begin(&fde->fde_seq); +#endif fde->fde_file = fp; if ((flags & O_CLOEXEC) != 0) fde->fde_flags |= UF_EXCLOSE; @@ -1811,6 +1827,9 @@ finstall(struct thread *td, struct file filecaps_move(fcaps, &fde->fde_caps); else filecaps_fill(&fde->fde_caps); +#ifdef CAPABILITIES + seq_write_end(&fde->fde_seq); +#endif FILEDESC_XUNLOCK(fdp); return (0); } @@ -2336,9 +2355,13 @@ int fget_unlocked(struct filedesc *fdp, int fd, cap_rights_t *needrightsp, int needfcntl, struct file **fpp, cap_rights_t *haverightsp) { +#ifdef CAPABILITIES + struct filedescent fde; +#endif struct file *fp; u_int count; #ifdef CAPABILITIES + seq_t seq; cap_rights_t haverights; int error; #endif @@ -2358,17 +2381,27 @@ fget_unlocked(struct filedesc *fdp, int * due to preemption. */ for (;;) { +#ifdef CAPABILITIES + seq = seq_read(fd_seq(fdp, fd)); + fde = fdp->fd_ofiles[fd]; + if (!seq_consistent(fd_seq(fdp, fd), seq)) { + cpu_spinwait(); + continue; + } + fp = fde.fde_file; +#else fp = fdp->fd_ofiles[fd].fde_file; +#endif if (fp == NULL) return (EBADF); #ifdef CAPABILITIES - haverights = *cap_rights(fdp, fd); + haverights = *cap_rights_fde(&fde); if (needrightsp != NULL) { error = cap_check(&haverights, needrightsp); if (error != 0) return (error); if (cap_rights_is_set(needrightsp, CAP_FCNTL)) { - error = cap_fcntl_check(fdp, fd, needfcntl); + error = cap_fcntl_check_fde(&fde, needfcntl); if (error != 0) return (error); } @@ -2383,7 +2416,11 @@ fget_unlocked(struct filedesc *fdp, int */ if (atomic_cmpset_acq_int(&fp->f_count, count, count + 1) != 1) continue; +#ifdef CAPABILITIES + if (seq_consistent_nomb(fd_seq(fdp, fd), seq)) +#else if (fp == fdp->fd_ofiles[fd].fde_file) +#endif break; fdrop(fp, curthread); } @@ -2740,6 +2777,7 @@ int dupfdopen(struct thread *td, struct filedesc *fdp, int dfd, int mode, int openerror, int *indxp) { + struct filedescent *newfde, *oldfde; struct file *fp; int error, indx; @@ -2783,17 +2821,32 @@ dupfdopen(struct thread *td, struct file return (EACCES); } fhold(fp); - fdp->fd_ofiles[indx] = fdp->fd_ofiles[dfd]; - filecaps_copy(&fdp->fd_ofiles[dfd].fde_caps, - &fdp->fd_ofiles[indx].fde_caps); + newfde = &fdp->fd_ofiles[indx]; + oldfde = &fdp->fd_ofiles[dfd]; +#ifdef CAPABILITIES + seq_write_begin(&newfde->fde_seq); +#endif + memcpy(newfde, oldfde, fde_change_size); + filecaps_copy(&oldfde->fde_caps, &newfde->fde_caps); +#ifdef CAPABILITIES + seq_write_end(&newfde->fde_seq); +#endif break; case ENXIO: /* * Steal away the file pointer from dfd and stuff it into indx. */ - fdp->fd_ofiles[indx] = fdp->fd_ofiles[dfd]; - bzero(&fdp->fd_ofiles[dfd], sizeof(fdp->fd_ofiles[dfd])); + newfde = &fdp->fd_ofiles[indx]; + oldfde = &fdp->fd_ofiles[dfd]; +#ifdef CAPABILITIES + seq_write_begin(&newfde->fde_seq); +#endif + memcpy(newfde, oldfde, fde_change_size); + bzero(oldfde, fde_change_size); fdunused(fdp, dfd); +#ifdef CAPABILITIES + seq_write_end(&newfde->fde_seq); +#endif break; } FILEDESC_XUNLOCK(fdp); Modified: releng/10.1/sys/kern/sys_capability.c ============================================================================== --- releng/10.1/sys/kern/sys_capability.c Wed Oct 15 14:07:24 2014 (r273136) +++ releng/10.1/sys/kern/sys_capability.c Wed Oct 15 16:54:18 2014 (r273137) @@ -199,11 +199,19 @@ cap_rights_to_vmprot(cap_rights_t *havep * any other way, as we want to keep all capability permission evaluation in * this one file. */ + +cap_rights_t * +cap_rights_fde(struct filedescent *fde) +{ + + return (&fde->fde_rights); +} + cap_rights_t * cap_rights(struct filedesc *fdp, int fd) { - return (&fdp->fd_ofiles[fd].fde_rights); + return (cap_rights_fde(&fdp->fd_ofiles[fd])); } /* @@ -486,24 +494,31 @@ out: * Test whether a capability grants the given fcntl command. */ int -cap_fcntl_check(struct filedesc *fdp, int fd, int cmd) +cap_fcntl_check_fde(struct filedescent *fde, int cmd) { uint32_t fcntlcap; - KASSERT(fd >= 0 && fd < fdp->fd_nfiles, - ("%s: invalid fd=%d", __func__, fd)); - fcntlcap = (1 << cmd); KASSERT((CAP_FCNTL_ALL & fcntlcap) != 0, ("Unsupported fcntl=%d.", cmd)); - if ((fdp->fd_ofiles[fd].fde_fcntls & fcntlcap) != 0) + if ((fde->fde_fcntls & fcntlcap) != 0) return (0); return (ENOTCAPABLE); } int +cap_fcntl_check(struct filedesc *fdp, int fd, int cmd) +{ + + KASSERT(fd >= 0 && fd < fdp->fd_nfiles, + ("%s: invalid fd=%d", __func__, fd)); + + return (cap_fcntl_check_fde(&fdp->fd_ofiles[fd], cmd)); +} + +int sys_cap_fcntls_limit(struct thread *td, struct cap_fcntls_limit_args *uap) { struct filedesc *fdp; Modified: releng/10.1/sys/sys/capability.h ============================================================================== --- releng/10.1/sys/sys/capability.h Wed Oct 15 14:07:24 2014 (r273136) +++ releng/10.1/sys/sys/capability.h Wed Oct 15 16:54:18 2014 (r273137) @@ -343,6 +343,7 @@ bool cap_rights_contains(const cap_right #define IN_CAPABILITY_MODE(td) ((td->td_ucred->cr_flags & CRED_FLAG_CAPMODE) != 0) struct filedesc; +struct filedescent; /* * Test whether a capability grants the requested rights. @@ -357,9 +358,11 @@ u_char cap_rights_to_vmprot(cap_rights_t * For the purposes of procstat(1) and similar tools, allow kern_descrip.c to * extract the rights from a capability. */ +cap_rights_t *cap_rights_fde(struct filedescent *fde); cap_rights_t *cap_rights(struct filedesc *fdp, int fd); int cap_ioctl_check(struct filedesc *fdp, int fd, u_long cmd); +int cap_fcntl_check_fde(struct filedescent *fde, int cmd); int cap_fcntl_check(struct filedesc *fdp, int fd, int cmd); #else /* !_KERNEL */ Modified: releng/10.1/sys/sys/filedesc.h ============================================================================== --- releng/10.1/sys/sys/filedesc.h Wed Oct 15 14:07:24 2014 (r273136) +++ releng/10.1/sys/sys/filedesc.h Wed Oct 15 16:54:18 2014 (r273137) @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -50,14 +51,16 @@ struct filecaps { }; struct filedescent { - struct file *fde_file; /* file structure for open file */ - struct filecaps fde_caps; /* per-descriptor rights */ - uint8_t fde_flags; /* per-process open file flags */ + struct file *fde_file; /* file structure for open file */ + struct filecaps fde_caps; /* per-descriptor rights */ + uint8_t fde_flags; /* per-process open file flags */ + seq_t fde_seq; /* keep file and caps in sync */ }; #define fde_rights fde_caps.fc_rights #define fde_fcntls fde_caps.fc_fcntls #define fde_ioctls fde_caps.fc_ioctls #define fde_nioctls fde_caps.fc_nioctls +#define fde_change_size (offsetof(struct filedescent, fde_seq)) /* * This structure is used for the management of descriptors. It may be @@ -82,6 +85,7 @@ struct filedesc { int fd_holdleaderscount; /* block fdfree() for shared close() */ int fd_holdleaderswakeup; /* fdfree() needs wakeup */ }; +#define fd_seq(fdp, fd) (&(fdp)->fd_ofiles[(fd)].fde_seq) /* * Structure to keep track of (process leader, struct fildedesc) tuples. Copied: releng/10.1/sys/sys/seq.h (from r273109, stable/10/sys/sys/seq.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ releng/10.1/sys/sys/seq.h Wed Oct 15 16:54:18 2014 (r273137, copy of r273109, stable/10/sys/sys/seq.h) @@ -0,0 +1,146 @@ +/*- + * Copyright (c) 2014 Mateusz Guzik + * + * 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. + * + * $FreeBSD$ + */ + +#ifndef _SYS_SEQ_H_ +#define _SYS_SEQ_H_ + +#ifdef _KERNEL +#include +#endif +#include + +/* + * seq_t may be included in structs visible to userspace + */ +typedef uint32_t seq_t; + +#ifdef _KERNEL + +/* + * Typical usage: + * + * writers: + * lock_exclusive(&obj->lock); + * seq_write_begin(&obj->seq); + * ..... + * seq_write_end(&obj->seq); + * unlock_exclusive(&obj->unlock); + * + * readers: + * obj_t lobj; + * seq_t seq; + * + * for (;;) { + * seq = seq_read(&gobj->seq); + * lobj = gobj; + * if (seq_consistent(&gobj->seq, seq)) + * break; + * cpu_spinwait(); + * } + * foo(lobj); + */ + +/* A hack to get MPASS macro */ +#include + +#include + +/* + * This is a temporary hack until memory barriers are cleaned up. + * + * atomic_load_acq_int at least on amd64 provides a full memory barrier, + * in a way which affects perforance. + * + * Hack below covers all architectures and avoids most of the penalty at least + * on amd64. + */ +static __inline int +atomic_load_acq_rmb_int(volatile u_int *p) +{ + volatile u_int v; + + v = *p; + atomic_load_acq_int(&v); + return (v); +} + +static __inline bool +seq_in_modify(seq_t seqp) +{ + + return (seqp & 1); +} + +static __inline void +seq_write_begin(seq_t *seqp) +{ + + MPASS(!seq_in_modify(*seqp)); + atomic_add_acq_int(seqp, 1); +} + +static __inline void +seq_write_end(seq_t *seqp) +{ + + atomic_add_rel_int(seqp, 1); + MPASS(!seq_in_modify(*seqp)); +} + +static __inline seq_t +seq_read(seq_t *seqp) +{ + seq_t ret; + + for (;;) { + ret = atomic_load_acq_rmb_int(seqp); + if (seq_in_modify(ret)) { + cpu_spinwait(); + continue; + } + break; + } + + return (ret); +} + +static __inline seq_t +seq_consistent(seq_t *seqp, seq_t oldseq) +{ + + return (atomic_load_acq_rmb_int(seqp) == oldseq); +} + +static __inline seq_t +seq_consistent_nomb(seq_t *seqp, seq_t oldseq) +{ + + return (*seqp == oldseq); +} + +#endif /* _KERNEL */ +#endif /* _SYS_SEQ_H_ */ From owner-svn-src-releng@FreeBSD.ORG Thu Oct 16 08:39:45 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A2A77AE; Thu, 16 Oct 2014 08:39:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65D35E12; Thu, 16 Oct 2014 08:39:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9G8djRG089663; Thu, 16 Oct 2014 08:39:45 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9G8diBZ089660; Thu, 16 Oct 2014 08:39:44 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201410160839.s9G8diBZ089660@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Thu, 16 Oct 2014 08:39:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273162 - releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Oct 2014 08:39:45 -0000 Author: smh Date: Thu Oct 16 08:39:44 2014 New Revision: 273162 URL: https://svnweb.freebsd.org/changeset/base/273162 Log: MFS10 r272883 MFC r272474 Fix ZFS ZVOL deadlock and rename issues Approved by: re@ (delphij) Sponsored by: Multiplay Modified: releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Directory Properties: releng/10.1/ (props changed) Modified: releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Thu Oct 16 08:33:11 2014 (r273161) +++ releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Thu Oct 16 08:39:44 2014 (r273162) @@ -2257,6 +2257,9 @@ dsl_dataset_promote_sync(void *arg, dmu_ dsl_dir_t *odd = NULL; uint64_t oldnext_obj; int64_t delta; +#if defined(__FreeBSD__) && defined(_KERNEL) + char *oldname, *newname; +#endif VERIFY0(promote_hold(ddpa, dp, FTAG)); hds = ddpa->ddpa_clone; @@ -2322,6 +2325,14 @@ dsl_dataset_promote_sync(void *arg, dmu_ dd->dd_phys->dd_clones, origin_head->ds_object, tx)); } +#if defined(__FreeBSD__) && defined(_KERNEL) + /* Take the spa_namespace_lock early so zvol renames don't deadlock. */ + mutex_enter(&spa_namespace_lock); + + oldname = kmem_alloc(MAXPATHLEN, KM_SLEEP); + newname = kmem_alloc(MAXPATHLEN, KM_SLEEP); +#endif + /* move snapshots to this dir */ for (snap = list_head(&ddpa->shared_snaps); snap; snap = list_next(&ddpa->shared_snaps, snap)) { @@ -2356,6 +2367,12 @@ dsl_dataset_promote_sync(void *arg, dmu_ VERIFY0(dsl_dir_hold_obj(dp, dd->dd_object, NULL, ds, &ds->ds_dir)); +#if defined(__FreeBSD__) && defined(_KERNEL) + dsl_dataset_name(ds, newname); + zfsvfs_update_fromname(oldname, newname); + zvol_rename_minors(oldname, newname); +#endif + /* move any clone references */ if (ds->ds_phys->ds_next_clones_obj && spa_version(dp->dp_spa) >= SPA_VERSION_DIR_CLONES) { @@ -2393,6 +2410,12 @@ dsl_dataset_promote_sync(void *arg, dmu_ ASSERT(!dsl_prop_hascb(ds)); } +#if defined(__FreeBSD__) && defined(_KERNEL) + mutex_exit(&spa_namespace_lock); + + kmem_free(newname, MAXPATHLEN); + kmem_free(oldname, MAXPATHLEN); +#endif /* * Change space accounting. * Note, pa->*usedsnap and dd_used_breakdown[SNAP] will either Modified: releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Thu Oct 16 08:33:11 2014 (r273161) +++ releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Thu Oct 16 08:39:44 2014 (r273162) @@ -3541,6 +3541,7 @@ zfs_destroy_unmount_origin(const char *f static int zfs_ioc_destroy_snaps(const char *poolname, nvlist_t *innvl, nvlist_t *outnvl) { + int error, poollen; nvlist_t *snaps; nvpair_t *pair; boolean_t defer; @@ -3549,9 +3550,25 @@ zfs_ioc_destroy_snaps(const char *poolna return (SET_ERROR(EINVAL)); defer = nvlist_exists(innvl, "defer"); + poollen = strlen(poolname); for (pair = nvlist_next_nvpair(snaps, NULL); pair != NULL; pair = nvlist_next_nvpair(snaps, pair)) { - (void) zfs_unmount_snap(nvpair_name(pair)); + const char *name = nvpair_name(pair); + + /* + * The snap must be in the specified pool to prevent the + * invalid removal of zvol minors below. + */ + if (strncmp(name, poolname, poollen) != 0 || + (name[poollen] != '/' && name[poollen] != '@')) + return (SET_ERROR(EXDEV)); + + error = zfs_unmount_snap(name); + if (error != 0) + return (error); +#if defined(__FreeBSD__) + zvol_remove_minors(name); +#endif } return (dsl_destroy_snapshots_nvl(snaps, defer, outnvl)); @@ -3676,7 +3693,11 @@ zfs_ioc_destroy(zfs_cmd_t *zc) else err = dsl_destroy_head(zc->zc_name); if (zc->zc_objset_type == DMU_OST_ZVOL && err == 0) +#ifdef __FreeBSD__ + zvol_remove_minors(zc->zc_name); +#else (void) zvol_remove_minor(zc->zc_name); +#endif return (err); } Modified: releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Thu Oct 16 08:33:11 2014 (r273161) +++ releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Thu Oct 16 08:39:44 2014 (r273162) @@ -883,7 +883,8 @@ zvol_remove_minors(const char *name) LIST_FOREACH_SAFE(zv, &all_zvols, zv_links, tzv) { if (strcmp(zv->zv_name, name) == 0 || (strncmp(zv->zv_name, name, namelen) == 0 && - zv->zv_name[namelen] == '/')) { + strlen(zv->zv_name) > namelen && (zv->zv_name[namelen] == '/' || + zv->zv_name[namelen] == '@'))) { (void) zvol_remove_zv(zv); } } @@ -2571,9 +2572,10 @@ zvol_create_minors(const char *name) if (dmu_objset_type(os) == DMU_OST_ZVOL) { dsl_dataset_long_hold(os->os_dsl_dataset, FTAG); dsl_pool_rele(dmu_objset_pool(os), FTAG); - if ((error = zvol_create_minor(name)) == 0) + error = zvol_create_minor(name); + if (error == 0 || error == EEXIST) { error = zvol_create_snapshots(os, name); - else { + } else { printf("ZFS WARNING: Unable to create ZVOL %s (error=%d).\n", name, error); } @@ -2674,12 +2676,17 @@ zvol_rename_minors(const char *oldname, size_t oldnamelen, newnamelen; zvol_state_t *zv; char *namebuf; + boolean_t locked = B_FALSE; oldnamelen = strlen(oldname); newnamelen = strlen(newname); DROP_GIANT(); - mutex_enter(&spa_namespace_lock); + /* See comment in zvol_open(). */ + if (!MUTEX_HELD(&spa_namespace_lock)) { + mutex_enter(&spa_namespace_lock); + locked = B_TRUE; + } LIST_FOREACH(zv, &all_zvols, zv_links) { if (strcmp(zv->zv_name, oldname) == 0) { @@ -2694,7 +2701,8 @@ zvol_rename_minors(const char *oldname, } } - mutex_exit(&spa_namespace_lock); + if (locked) + mutex_exit(&spa_namespace_lock); PICKUP_GIANT(); } From owner-svn-src-releng@FreeBSD.ORG Thu Oct 16 09:34:34 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E6461FFF; Thu, 16 Oct 2014 09:34:34 +0000 (UTC) Received: from mx0.gentlemail.de (mx0.gentlemail.de [IPv6:2a00:e10:2800::a130]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7466474B; Thu, 16 Oct 2014 09:34:34 +0000 (UTC) Received: from mh0.gentlemail.de (mh0.gentlemail.de [IPv6:2a00:e10:2800::a135]) by mx0.gentlemail.de (8.14.5/8.14.5) with ESMTP id s9G9YUqW083081; Thu, 16 Oct 2014 11:34:31 +0200 (CEST) (envelope-from h.schmalzbauer@omnilan.de) Received: from titan.inop.mo1.omnilan.net (titan.inop.mo1.omnilan.net [IPv6:2001:a60:f0bb:1::3:1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mh0.gentlemail.de (Postfix) with ESMTPSA id 8D17137B1; Thu, 16 Oct 2014 11:34:30 +0200 (CEST) Message-ID: <543F9125.2020907@omnilan.de> Date: Thu, 16 Oct 2014 11:34:29 +0200 From: Harald Schmalzbauer Organization: OmniLAN User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; de-DE; rv:1.9.2.8) Gecko/20100906 Lightning/1.0b2 Thunderbird/3.1.2 MIME-Version: 1.0 To: Steven Hartland Subject: Re: svn commit: r273162 - releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs References: <201410160839.s9G8diBZ089660@svn.freebsd.org> In-Reply-To: <201410160839.s9G8diBZ089660@svn.freebsd.org> X-Enigmail-Version: 1.1.2 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig58E2A6B275357A0D74D3166E" X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (mx0.gentlemail.de [IPv6:2a00:e10:2800::a130]); Thu, 16 Oct 2014 11:34:31 +0200 (CEST) X-Milter: Spamilter (Reciever: mx0.gentlemail.de; Sender-ip: ; Sender-helo: mh0.gentlemail.de; ) Cc: svn-src-releng@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Oct 2014 09:34:35 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig58E2A6B275357A0D74D3166E Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Bez=FCglich Steven Hartland's Nachricht vom 16.10.2014 10:39 (localtime)= : > Author: smh > Date: Thu Oct 16 08:39:44 2014 > New Revision: 273162 > URL: https://svnweb.freebsd.org/changeset/base/273162 > > Log: > MFS10 r272883 > MFC r272474 > Fix ZFS ZVOL deadlock and rename issues Thanks, Can you please check if this is also missing for MFS->10.1: https://svnweb.freebsd.org/changeset/base/273057 Thanks, -Harry --------------enig58E2A6B275357A0D74D3166E Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAlQ/kSUACgkQLDqVQ9VXb8hnMQCfTQFXE+l9w/b7G4iiQ8o+bz9c YycAnialOOJMmkY1PqV7vaf/W00TQ/K8 =C+MM -----END PGP SIGNATURE----- --------------enig58E2A6B275357A0D74D3166E-- From owner-svn-src-releng@FreeBSD.ORG Thu Oct 16 10:24:04 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CF76A10A; Thu, 16 Oct 2014 10:24:04 +0000 (UTC) Received: from smtp1.multiplay.co.uk (smtp1.multiplay.co.uk [85.236.96.35]) by mx1.freebsd.org (Postfix) with ESMTP id 93218CCA; Thu, 16 Oct 2014 10:24:03 +0000 (UTC) Received: by smtp1.multiplay.co.uk (Postfix, from userid 65534) id 4A71420E7088E; Thu, 16 Oct 2014 10:24:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.multiplay.co.uk X-Spam-Level: ** X-Spam-Status: No, score=2.2 required=8.0 tests=AWL,BAYES_00,DOS_OE_TO_MX, FSL_HELO_NON_FQDN_1,RDNS_DYNAMIC,STOX_REPLY_TYPE autolearn=no version=3.3.1 Received: from r2d2 (82-69-141-170.dsl.in-addr.zen.co.uk [82.69.141.170]) by smtp1.multiplay.co.uk (Postfix) with ESMTPS id 0711220E70885; Thu, 16 Oct 2014 10:23:59 +0000 (UTC) Message-ID: From: "Steven Hartland" To: "Harald Schmalzbauer" References: <201410160839.s9G8diBZ089660@svn.freebsd.org> <543F9125.2020907@omnilan.de> Subject: Re: svn commit: r273162 - releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Date: Thu, 16 Oct 2014 11:23:59 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Cc: svn-src-releng@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Oct 2014 10:24:04 -0000 > Bezüglich Steven Hartland's Nachricht vom 16.10.2014 10:39 (localtime): > > Author: smh > > Date: Thu Oct 16 08:39:44 2014 > > New Revision: 273162 > > URL: https://svnweb.freebsd.org/changeset/base/273162 > > > > Log: > > MFS10 r272883 > > MFC r272474 > > Fix ZFS ZVOL deadlock and rename issues > > Thanks, > > Can you please check if this is also missing for MFS->10.1: > https://svnweb.freebsd.org/changeset/base/273057 Thanks for the reminder Harald I've requested this now. Regards Steve From owner-svn-src-releng@FreeBSD.ORG Thu Oct 16 15:44:48 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E69F5F8C; Thu, 16 Oct 2014 15:44:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B8517850; Thu, 16 Oct 2014 15:44:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9GFimRC095380; Thu, 16 Oct 2014 15:44:48 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9GFimTO095374; Thu, 16 Oct 2014 15:44:48 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410161544.s9GFimTO095374@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 16 Oct 2014 15:44:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273169 - in releng/10.1: . contrib/opie lib/libopie X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Oct 2014 15:44:49 -0000 Author: gjb Date: Thu Oct 16 15:44:47 2014 New Revision: 273169 URL: https://svnweb.freebsd.org/changeset/base/273169 Log: Revert r270120 (partial), r270122: Restore ABI compatibility with 10.0-RELEASE. Requested by: many Reviewed by: delphij, ache Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/10.1/ObsoleteFiles.inc releng/10.1/contrib/opie/opie.h releng/10.1/lib/libopie/Makefile Modified: releng/10.1/ObsoleteFiles.inc ============================================================================== --- releng/10.1/ObsoleteFiles.inc Thu Oct 16 15:36:04 2014 (r273168) +++ releng/10.1/ObsoleteFiles.inc Thu Oct 16 15:44:47 2014 (r273169) @@ -41,8 +41,8 @@ # 20140917: hv_kvpd rc.d script removed in favor of devd configuration OLD_FILES+=etc/rc.d/hv_kvpd # 20140814: libopie version bump -OLD_LIBS+=usr/lib/libopie.so.7 -OLD_LIBS+=usr/lib32/libopie.so.7 +OLD_LIBS+=usr/lib/libopie.so.8 +OLD_LIBS+=usr/lib32/libopie.so.8 # 20140811: otp-sha renamed to otp-sha1 OLD_FILES+=usr/bin/otp-sha OLD_FILES+=usr/share/man/man1/otp-sha.1.gz Modified: releng/10.1/contrib/opie/opie.h ============================================================================== --- releng/10.1/contrib/opie/opie.h Thu Oct 16 15:36:04 2014 (r273168) +++ releng/10.1/contrib/opie/opie.h Thu Oct 16 15:44:47 2014 (r273169) @@ -69,11 +69,11 @@ struct opie { /* Maximum length of a seed */ #define OPIE_SEED_MAX 16 -/* Max length of hash algorithm name (md4/md5/sha1) */ -#define OPIE_HASHNAME_MAX 4 +/* Max length of hash algorithm name (md4/md5) */ +#define OPIE_HASHNAME_MAX 3 -/* Maximum length of a challenge (otp-md? 9999 seed ext) */ -#define OPIE_CHALLENGE_MAX (4+OPIE_HASHNAME_MAX+1+4+1+OPIE_SEED_MAX+1+3) +/* Maximum length of a challenge (otp-md? 9999 seed) */ +#define OPIE_CHALLENGE_MAX (4+OPIE_HASHNAME_MAX+1+4+1+OPIE_SEED_MAX) /* Maximum length of a response that we allow */ #define OPIE_RESPONSE_MAX (9+1+19+1+9+OPIE_SEED_MAX+1+19+1+19+1+19) Modified: releng/10.1/lib/libopie/Makefile ============================================================================== --- releng/10.1/lib/libopie/Makefile Thu Oct 16 15:36:04 2014 (r273168) +++ releng/10.1/lib/libopie/Makefile Thu Oct 16 15:44:47 2014 (r273169) @@ -4,7 +4,7 @@ # OPIE_DIST?= ${.CURDIR}/../../contrib/opie DIST_DIR= ${OPIE_DIST}/${.CURDIR:T} -SHLIB_MAJOR= 8 +SHLIB_MAJOR= 7 KEYFILE?= \"/etc/opiekeys\" From owner-svn-src-releng@FreeBSD.ORG Thu Oct 16 21:39:05 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D4BE2760; Thu, 16 Oct 2014 21:39:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B65B2357; Thu, 16 Oct 2014 21:39:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9GLd5d3096131; Thu, 16 Oct 2014 21:39:05 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9GLd5V3096129; Thu, 16 Oct 2014 21:39:05 GMT (envelope-from des@FreeBSD.org) Message-Id: <201410162139.s9GLd5V3096129@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Thu, 16 Oct 2014 21:39:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273187 - in releng/10.1: lib/libcrypt usr.sbin/pw X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Oct 2014 21:39:06 -0000 Author: des Date: Thu Oct 16 21:39:04 2014 New Revision: 273187 URL: https://svnweb.freebsd.org/changeset/base/273187 Log: MFH (r272830): change the hardcoded default back to DES MFH (r272833): remove last vestige of MD5 password hashes Approved by: re (gjb) Modified: releng/10.1/lib/libcrypt/crypt.c releng/10.1/usr.sbin/pw/pw_user.c Directory Properties: releng/10.1/ (props changed) Modified: releng/10.1/lib/libcrypt/crypt.c ============================================================================== --- releng/10.1/lib/libcrypt/crypt.c Thu Oct 16 21:13:46 2014 (r273186) +++ releng/10.1/lib/libcrypt/crypt.c Thu Oct 16 21:39:04 2014 (r273187) @@ -37,24 +37,26 @@ __FBSDID("$FreeBSD$"); #include "crypt.h" /* - * List of supported crypt(3) formats. The first element in the list will - * be the default. + * List of supported crypt(3) formats. + * + * The default algorithm is the last entry in the list (second-to-last + * array element since the last is a sentinel). The reason for placing + * the default last rather than first is that DES needs to be at the + * bottom for the algorithm guessing logic in crypt(3) to work correctly, + * and it needs to be the default for backward compatibility. */ static const struct crypt_format { const char *const name; char *(*const func)(const char *, const char *); const char *const magic; } crypt_formats[] = { - /* default format */ - { "sha512", crypt_sha512, "$6$" }, - - /* other supported formats */ { "md5", crypt_md5, "$1$" }, #ifdef HAS_BLOWFISH { "blf", crypt_blowfish, "$2" }, #endif { "nth", crypt_nthash, "$3$" }, { "sha256", crypt_sha256, "$5$" }, + { "sha512", crypt_sha512, "$6$" }, #ifdef HAS_DES { "des", crypt_des, "_" }, #endif @@ -63,7 +65,8 @@ static const struct crypt_format { { NULL, NULL, NULL } }; -static const struct crypt_format *crypt_format = &crypt_formats[0]; +static const struct crypt_format *crypt_format = + &crypt_formats[(sizeof crypt_formats / sizeof *crypt_formats) - 2]; #define DES_SALT_ALPHABET \ "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" Modified: releng/10.1/usr.sbin/pw/pw_user.c ============================================================================== --- releng/10.1/usr.sbin/pw/pw_user.c Thu Oct 16 21:13:46 2014 (r273186) +++ releng/10.1/usr.sbin/pw/pw_user.c Thu Oct 16 21:39:04 2014 (r273187) @@ -615,7 +615,7 @@ pw_user(struct userconf * cnf, int mode, pwd->pw_dir = pw_homepolicy(cnf, args, pwd->pw_name); pwd->pw_shell = pw_shellpolicy(cnf, args, NULL); lc = login_getpwclass(pwd); - if (lc == NULL || login_setcryptfmt(lc, "md5", NULL) == NULL) + if (lc == NULL || login_setcryptfmt(lc, "sha512", NULL) == NULL) warn("setting crypt(3) format"); login_close(lc); pwd->pw_passwd = pw_password(cnf, args, pwd->pw_name); @@ -690,7 +690,7 @@ pw_user(struct userconf * cnf, int mode, } else { lc = login_getpwclass(pwd); if (lc == NULL || - login_setcryptfmt(lc, "md5", NULL) == NULL) + login_setcryptfmt(lc, "sha512", NULL) == NULL) warn("setting crypt(3) format"); login_close(lc); pwd->pw_passwd = pw_pwcrypt(line); From owner-svn-src-releng@FreeBSD.ORG Thu Oct 16 22:00:31 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5078D31D; Thu, 16 Oct 2014 22:00:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38E6C80A; Thu, 16 Oct 2014 22:00:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9GM0VDW007663; Thu, 16 Oct 2014 22:00:31 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9GM0Pg0007629; Thu, 16 Oct 2014 22:00:25 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410162200.s9GM0Pg0007629@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 16 Oct 2014 22:00:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273188 - in releng/10.1: etc etc/defaults etc/rc.d include/rpcsvc lib/libc/rpc lib/libc/xdr sbin/dump sbin/mdconfig sbin/ping6 sbin/route sbin/swapon sys/netinet sys/netinet6 usr.bin/n... X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Oct 2014 22:00:31 -0000 Author: hrs Date: Thu Oct 16 22:00:24 2014 New Revision: 273188 URL: https://svnweb.freebsd.org/changeset/base/273188 Log: MFS r272855, 266846: - Do not override sin6_scope_id in LLA when it is already set to non-zero. This fixes destination list in output of netstat -r. - Plug a memory leak. - Add RTM_VERSION check. - Fix a bug which can make sysctl() fail when -F is specified. - Increase WID_IF_DEFAULT() from 6 to 8 (the default for AF_INET6) because we have interfaces with longer names than 6 chars like epairN{a,b}. - Style fixes. MFS r272847: - Add rwlock to struct dadq. A panic could occur when a large number of addresses performed DAD at the same time. MFS r272850: - Replace Sun RPC license in TI-RPC library with a 3-clause BSD license, with the explicit permission of Sun Microsystems in 2009. - Replace Sun Industry Standards Source License for Sun RPC code with a 3-clause BSD license as specified by Oracle America, Inc. in 2010. This license change was approved by Wim Coekaerts, Senior Vice President, Linux and Virtualization at Oracle Corporation. - Replace Sun RPC license with a 3-clause BSD license. This license change was approved in 2010 by Wim Coekaerts, Senior Vice President, Linux and Virtualization at Oracle Corporation. - Replace Sun RPC license for TI-RPC library with a 3-clause BSD license, with the explicit permission of Sun Microsystems in 2009. The code in question in this file was copied from lib/libc/rpc/pmap_getport.c. MFS r272852,r272853: - Add relative specification in expiration time. - Add proto3 option for RTF_PROTO3. - Use %lu for members of struct rt_metrics. - Use long explicitly for the time difference. MFS r272854: - Return 0 if: 1. "-u N" specified, no -f, and mdN found, 2. no -u, "-f /pathname" specified, and mdN associated with /pathname found, 3. "-u N" specified, "-f /pathname" specified, and both of them found, 4. "-l" specified and no -f, 5. "-l" specified, "-f /pathname" specified, and /pathname found. otherwise return -1. MFS r272856: - Move configuration of IPv6 NDP flags to a point before handling ifconfig_IF. This fixes a race that a non-IPv4 interface can get an EUI64 LLA even if it has IFDISABLED nd6 flag at boot time. MFS r272857: - Cancel DAD for an ifa when the ifp has ND6_IFF_IFDISABLED as early as possible and do not clear IN6_IFF_TENTATIVE. If IFDISABLED was accidentally set after a DAD started, TENTATIVE could be cleared because no NA was received due to IFDISABLED, and as a result it could prevent DAD when manually clearing IFDISABLED after that. MFS r272858: - Fix an issue in range specification handling when a "-foo" is specified in ifconfig_IF_aliasN. MFS r272859: - Fix EtherIP. TOS field must be initialized when the inner protocol is PF_LINK, and multicast/broadcast flag should always be dropped because the outer protocol uses unicast even when the inner address is not for unicast. It had been broken since r236951 when gif_output() started to use IFQ_HANDOFF(). MFS r272860: - Recover sin6_scope_id of gateway addresses in riprecv() by using the if_index where a RIP packet was received. This fixes a bug which prevented gateway addresses in fe80::/64 from being added. MFS r272861: - Fix rc.d/gssd script to define the default values in a standard way. - Use a parameter argument in jls(8) instead of doing grep. MFS r272862, r272870: - Restructure rc.d scripts for kerberos5 daemons. MFS r272863: - Return false status only when adding a route is failed. It could erroneously return false due to an afexists() check loop in routing_start(). MFS r272864: - Use ipv6_prefer when at least one ifconfig_IF_ipv6 is configured. MFS r272865: - Fix a bug which prevented mount.fstab parameter from being converted when jail_JID_devfs_enable=NO. MFS r272866: - Fix header output when -P is specified and (ncpus - 1) != maxid. MFS r272867: - Fix a bug which could break extended attributes in a dump output. This occurred when a file was >892kB long and had a large data (>1kB) in the extended attributes. MFS r272868, r272869: - Make net.inet.ip.sourceroute, net.inet.ip.accept_sourceroute, and net.inet.ip.process_options vnet-aware. MFS r272871: - Revert changes in r269180. It could cause -c N option to enter an infinite loop if no reply packet is received. MFS r272874: - Resurrect set_rcvar() as a function to define a rc.conf variable. It defines a variable and its default value in load_rc_config() just after rc.conf is loaded. "rcvar" command shows the current and the default values. MFS r272960: - Do not add late flag when file= is specified because it has a bad side-effect. The specified file should exist before the fstab line. Approved by: re (gjb) Added: releng/10.1/etc/rc.d/ipropd_master - copied unchanged from r272862, stable/10/etc/rc.d/ipropd_master releng/10.1/etc/rc.d/ipropd_slave - copied, changed from r272862, stable/10/etc/rc.d/ipropd_slave releng/10.1/etc/rc.d/kdc - copied unchanged from r272862, stable/10/etc/rc.d/kdc Deleted: releng/10.1/etc/rc.d/kerberos releng/10.1/lib/libc/rpc/LICENSE Modified: releng/10.1/etc/defaults/rc.conf releng/10.1/etc/network.subr releng/10.1/etc/rc.d/Makefile releng/10.1/etc/rc.d/SERVERS releng/10.1/etc/rc.d/gssd releng/10.1/etc/rc.d/ip6addrctl releng/10.1/etc/rc.d/jail releng/10.1/etc/rc.d/kadmind releng/10.1/etc/rc.d/kfd releng/10.1/etc/rc.d/kpasswdd releng/10.1/etc/rc.d/routing releng/10.1/etc/rc.subr releng/10.1/include/rpcsvc/bootparam_prot.x releng/10.1/include/rpcsvc/key_prot.x releng/10.1/include/rpcsvc/klm_prot.x releng/10.1/include/rpcsvc/mount.x releng/10.1/include/rpcsvc/nfs_prot.x releng/10.1/include/rpcsvc/nis.x releng/10.1/include/rpcsvc/nis_callback.x releng/10.1/include/rpcsvc/nis_object.x releng/10.1/include/rpcsvc/nis_tags.h releng/10.1/include/rpcsvc/rex.x releng/10.1/include/rpcsvc/rnusers.x releng/10.1/include/rpcsvc/rstat.x releng/10.1/include/rpcsvc/sm_inter.x releng/10.1/include/rpcsvc/spray.x releng/10.1/include/rpcsvc/yp.x releng/10.1/include/rpcsvc/yppasswd.x releng/10.1/lib/libc/xdr/xdr.c releng/10.1/lib/libc/xdr/xdr_array.c releng/10.1/lib/libc/xdr/xdr_float.c releng/10.1/lib/libc/xdr/xdr_mem.c releng/10.1/lib/libc/xdr/xdr_rec.c releng/10.1/lib/libc/xdr/xdr_reference.c releng/10.1/lib/libc/xdr/xdr_sizeof.c releng/10.1/lib/libc/xdr/xdr_stdio.c releng/10.1/sbin/dump/traverse.c releng/10.1/sbin/mdconfig/mdconfig.c releng/10.1/sbin/ping6/ping6.c releng/10.1/sbin/route/keywords releng/10.1/sbin/route/route.8 releng/10.1/sbin/route/route.c releng/10.1/sbin/swapon/swapon.c releng/10.1/sys/netinet/in_gif.c releng/10.1/sys/netinet/ip_fastfwd.c releng/10.1/sys/netinet/ip_options.c releng/10.1/sys/netinet/ip_options.h releng/10.1/sys/netinet6/in6_gif.c releng/10.1/sys/netinet6/nd6_nbr.c releng/10.1/usr.bin/netstat/route.c releng/10.1/usr.bin/vmstat/vmstat.c releng/10.1/usr.sbin/route6d/route6d.c releng/10.1/usr.sbin/ypbind/yp_ping.c Directory Properties: releng/10.1/ (props changed) Modified: releng/10.1/etc/defaults/rc.conf ============================================================================== --- releng/10.1/etc/defaults/rc.conf Thu Oct 16 21:39:04 2014 (r273187) +++ releng/10.1/etc/defaults/rc.conf Thu Oct 16 22:00:24 2014 (r273188) @@ -277,17 +277,31 @@ local_unbound_enable="NO" # local cachin # # kerberos. Do not run the admin daemons on slave servers # -kerberos5_server_enable="NO" # Run a kerberos 5 master server (or NO). -kerberos5_server="/usr/libexec/kdc" # path to kerberos 5 KDC -kerberos5_server_flags="--detach" # Additional flags to the kerberos 5 server -kadmind5_server_enable="NO" # Run kadmind (or NO) -kadmind5_server="/usr/libexec/kadmind" # path to kerberos 5 admin daemon -kpasswdd_server_enable="NO" # Run kpasswdd (or NO) -kpasswdd_server="/usr/libexec/kpasswdd" # path to kerberos 5 passwd daemon +kdc_enable="NO" # Run a kerberos 5 KDC (or NO). +kdc_program="/usr/libexec/kdc" # path to kerberos 5 KDC +kdc_flags="" # Additional flags to the kerberos 5 KDC +kadmind_enable="NO" # Run kadmind (or NO) +kadmind_program="/usr/libexec/kadmind" # path to kadmind +kpasswdd_enable="NO" # Run kpasswdd (or NO) +kpasswdd_program="/usr/libexec/kpasswdd" # path to kpasswdd kfd_enable="NO" # Run kfd (or NO) kfd_program="/usr/libexec/kfd" # path to kerberos 5 kfd daemon +kfd_flags="" +ipropd_master_enable="NO" # Run Heimdal incremental propagation daemon + # (master daemon). +ipropd_master_program="/usr/libexec/ipropd-master" +ipropd_master_flags="" # Flags to ipropd-master. +ipropd_master_keytab="/etc/krb5.keytab" # keytab for ipropd-master. +ipropd_master_slaves="" # slave node names used for /var/heimdal/slaves. +ipropd_slave_enable="NO" # Run Heimdal incremental propagation daemon + # (slave daemon). +ipropd_slave_program="/usr/libexec/ipropd-slave" +ipropd_slave_flags="" # Flags to ipropd-slave. +ipropd_slave_keytab="/etc/krb5.keytab" # keytab for ipropd-slave. +ipropd_slave_master="" # master node name. gssd_enable="NO" # Run the gssd daemon (or NO). +gssd_program="/usr/sbin/gssd" # Path to gssd. gssd_flags="" # Flags for gssd. rwhod_enable="NO" # Run the rwho daemon (or NO). Modified: releng/10.1/etc/network.subr ============================================================================== --- releng/10.1/etc/network.subr Thu Oct 16 21:39:04 2014 (r273187) +++ releng/10.1/etc/network.subr Thu Oct 16 22:00:24 2014 (r273188) @@ -132,13 +132,6 @@ ifconfig_up() _cfg=0 fi - # ifconfig_IF - ifconfig_args=`ifconfig_getargs $1` - if [ -n "${ifconfig_args}" ]; then - eval ${IFCONFIG_CMD} $1 ${ifconfig_args} - _cfg=0 - fi - # inet6 specific if ! noafif $1 && afexists inet6; then if checkyesno ipv6_activate_all_interfaces; then @@ -174,7 +167,17 @@ ifconfig_up() if [ -n "${_ipv6_opts}" ]; then ${IFCONFIG_CMD} $1 inet6 ${_ipv6_opts} fi + fi + # ifconfig_IF + ifconfig_args=`ifconfig_getargs $1` + if [ -n "${ifconfig_args}" ]; then + eval ${IFCONFIG_CMD} $1 ${ifconfig_args} + _cfg=0 + fi + + # inet6 specific + if ! noafif $1 && afexists inet6; then # ifconfig_IF_ipv6 ifconfig_args=`ifconfig_getargs $1 ipv6` if [ -n "${ifconfig_args}" ]; then @@ -1040,7 +1043,7 @@ ifalias_af_common_handler() case $_c in ${_af}) case $_tmpargs in - ${_af}\ *-*) + ${_af}\ *[0-9a-fA-F]-*) ifalias_af_common_handler $_if $_af $_action \ `ifalias_expand_addr $_af $_action ${_tmpargs#${_af}\ }` ;; @@ -1058,7 +1061,7 @@ ifalias_af_common_handler() # Process the last component if any. if [ -n "$_tmpargs}" ]; then case $_tmpargs in - ${_af}\ *-*) + ${_af}\ *[0-9a-fA-F]-*) ifalias_af_common_handler $_if $_af $_action \ `ifalias_expand_addr $_af $_action ${_tmpargs#${_af}\ }` ;; Modified: releng/10.1/etc/rc.d/Makefile ============================================================================== --- releng/10.1/etc/rc.d/Makefile Thu Oct 16 21:39:04 2014 (r273187) +++ releng/10.1/etc/rc.d/Makefile Thu Oct 16 22:00:24 2014 (r273188) @@ -64,13 +64,15 @@ FILES= DAEMON \ ipfw \ ipmon \ ipnat \ + ipropd_master \ + ipropd_slave \ ipsec \ ${_ipxrouted} \ iscsictl \ iscsid \ jail \ kadmind \ - kerberos \ + kdc \ keyserv \ kfd \ kld \ Modified: releng/10.1/etc/rc.d/SERVERS ============================================================================== --- releng/10.1/etc/rc.d/SERVERS Thu Oct 16 21:39:04 2014 (r273187) +++ releng/10.1/etc/rc.d/SERVERS Thu Oct 16 22:00:24 2014 (r273188) @@ -4,7 +4,7 @@ # # PROVIDE: SERVERS -# REQUIRE: mountcritremote abi ldconfig savecore watchdogd +# REQUIRE: mountcritremote abi ldconfig savecore watchdogd kdc # This is a dummy dependency, for early-start servers relying on # some basic configuration. Modified: releng/10.1/etc/rc.d/gssd ============================================================================== --- releng/10.1/etc/rc.d/gssd Thu Oct 16 21:39:04 2014 (r273187) +++ releng/10.1/etc/rc.d/gssd Thu Oct 16 22:00:24 2014 (r273188) @@ -9,10 +9,8 @@ . /etc/rc.subr -name="gssd" +name=gssd +rcvar=gssd_enable load_rc_config $name -rcvar="gssd_enable" -command="${gssd:-/usr/sbin/${name}}" -eval ${name}_flags=\"${gssd_flags}\" run_rc_command "$1" Modified: releng/10.1/etc/rc.d/ip6addrctl ============================================================================== --- releng/10.1/etc/rc.d/ip6addrctl Thu Oct 16 21:39:04 2014 (r273187) +++ releng/10.1/etc/rc.d/ip6addrctl Thu Oct 16 22:00:24 2014 (r273188) @@ -75,6 +75,8 @@ ip6addrctl_start() else if checkyesno ipv6_activate_all_interfaces; then ip6addrctl_prefer_ipv6 + elif [ -n "$(list_vars ifconfig_\*_ipv6)" ]; then + ip6addrctl_prefer_ipv6 else ip6addrctl_prefer_ipv4 fi Copied: releng/10.1/etc/rc.d/ipropd_master (from r272862, stable/10/etc/rc.d/ipropd_master) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ releng/10.1/etc/rc.d/ipropd_master Thu Oct 16 22:00:24 2014 (r273188, copy of r272862, stable/10/etc/rc.d/ipropd_master) @@ -0,0 +1,40 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: ipropd_master +# REQUIRE: kdc +# KEYWORD: shutdown + +. /etc/rc.subr + +name=ipropd_master +rcvar=${name}_enable +required_files="$ipropd_master_keytab" +start_precmd=${name}_start_precmd +start_postcmd=${name}_start_postcmd + +ipropd_master_start_precmd() +{ + + if [ -z "$ipropd_master_slaves" ]; then + warn "\$ipropd_master_slaves is empty." + return 1 + fi + for _slave in $ipropd_master_slaves; do + echo $_slave + done > /var/heimdal/slaves || return 1 + command_args="$command_args \ + --keytab=\"$ipropd_master_keytab\" \ + --detach \ + " +} +ipropd_master_start_postcmd() +{ + + echo "${name}: slave nodes: $ipropd_master_slaves" +} + +load_rc_config $name +run_rc_command "$1" Copied and modified: releng/10.1/etc/rc.d/ipropd_slave (from r272862, stable/10/etc/rc.d/ipropd_slave) ============================================================================== --- stable/10/etc/rc.d/ipropd_slave Thu Oct 9 23:35:23 2014 (r272862, copy source) +++ releng/10.1/etc/rc.d/ipropd_slave Thu Oct 16 22:00:24 2014 (r273188) @@ -17,15 +17,15 @@ start_precmd=${name}_start_precmd ipropd_slave_start_precmd() { - if [ -z "$ipropd_slave_masters" ]; then - warn "\$ipropd_slave_masters is empty." + if [ -z "$ipropd_slave_master" ]; then + warn "\$ipropd_slave_master is empty." return 1 fi command_args=" \ $command_args \ --keytab=\"$ipropd_slave_keytab\" \ --detach \ - $ipropd_slave_masters" + $ipropd_slave_master" } load_rc_config $name Modified: releng/10.1/etc/rc.d/jail ============================================================================== --- releng/10.1/etc/rc.d/jail Thu Oct 16 21:39:04 2014 (r273187) +++ releng/10.1/etc/rc.d/jail Thu Oct 16 22:00:24 2014 (r273188) @@ -207,6 +207,10 @@ parse_options() extract_var $_j consolelog exec.consolelog - \ /var/log/jail_${_j}_console.log + if [ -r $_fstab ]; then + echo " mount.fstab = \"$_fstab\";" + fi + eval : \${jail_${_j}_devfs_enable:=${jail_devfs_enable:-NO}} if checkyesno jail_${_j}_devfs_enable; then echo " mount.devfs;" @@ -222,11 +226,7 @@ parse_options() ;; *) warn "devfs_ruleset must be an integer." ;; esac - if [ -r $_fstab ]; then - echo " mount.fstab = \"$_fstab\";" - fi fi - eval : \${jail_${_j}_fdescfs_enable:=${jail_fdescfs_enable:-NO}} if checkyesno jail_${_j}_fdescfs_enable; then echo " mount.fdescfs;" @@ -420,7 +420,7 @@ jail_status() jail_start() { - local _j _jid _jn _jl + local _j _jid _jl if [ $# = 0 ]; then return @@ -433,12 +433,10 @@ jail_start() command_args="-f $jail_conf -c" _tmp=`mktemp -t jail` || exit 3 if $command $rc_flags $command_args >> $_tmp 2>&1; then - $jail_jls -nq | while read IN; do - _jn=$(echo $IN | tr " " "\n" | grep ^name=) - _jid=$(echo $IN | tr " " "\n" | grep ^jid=) - echo -n " ${_jn#name=}" - echo "${_jid#jid=}" \ - > /var/run/jail_${_jn#name=}.id + $jail_jls jid name | while read IN; do + set -- $IN + echo -n " $2" + echo $1 > /var/run/jail_$2.id done else tail -1 $_tmp @@ -468,9 +466,8 @@ jail_start() sleep 1 for _j in $_jl; do echo -n " ${_hostname:-${_j}}" - if _jid=$($jail_jls -n -j $_j | tr " " "\n" | \ - grep ^jid=); then - echo "${_jid#jid=}" > /var/run/jail_${_j}.id + if _jid=$($jail_jls -j $_j jid); then + echo "$_jid" > /var/run/jail_${_j}.id else rm -f /var/run/jail_${_j}.id echo " cannot start jail " \ @@ -492,9 +489,8 @@ jail_start() if $command $rc_flags $command_args \ >> $_tmp 2>&1 /var/run/jail_${_j}.id + _jid=$($jail_jls -j $_j jid) + echo $_jid > /var/run/jail_${_j}.id else rm -f /var/run/jail_${_j}.id echo " cannot start jail " \ @@ -509,7 +505,7 @@ jail_start() jail_stop() { - local _j _jn + local _j if [ $# = 0 ]; then return @@ -520,16 +516,14 @@ jail_stop() command=$jail_program rc_flags=$jail_flags command_args="-f $jail_conf -r" - $jail_jls -nq | while read IN; do - _jn=$(echo $IN | tr " " "\n" | grep ^name=) - echo -n " ${_jn#name=}" + $jail_jls name | while read _j; do + echo -n " $_j" _tmp=`mktemp -t jail` || exit 3 - $command $rc_flags $command_args ${_jn#name=} \ - >> $_tmp 2>&1 - if $jail_jls -j ${_jn#name=} > /dev/null 2>&1; then + $command $rc_flags $command_args $_j >> $_tmp 2>&1 + if $jail_jls -j $_j > /dev/null 2>&1; then tail -1 $_tmp else - rm -f /var/run/jail_${_jn#name=}.id + rm -f /var/run/jail_${_j}.id fi rm -f $_tmp done Modified: releng/10.1/etc/rc.d/kadmind ============================================================================== --- releng/10.1/etc/rc.d/kadmind Thu Oct 16 21:39:04 2014 (r273187) +++ releng/10.1/etc/rc.d/kadmind Thu Oct 16 22:00:24 2014 (r273188) @@ -3,18 +3,26 @@ # $FreeBSD$ # -# PROVIDE: kadmin -# REQUIRE: kerberos -# BEFORE: DAEMON +# PROVIDE: kadmind +# REQUIRE: kdc +# KEYWORD: shutdown . /etc/rc.subr -name="kadmind5" -load_rc_config $name -rcvar="kadmind5_server_enable" -unset start_cmd -command="${kadmind5_server}" -command_args="&" -required_vars="kerberos5_server_enable" +name=kadmind +rcvar=${name}_enable +required_vars=kdc_enable +start_precmd=${name}_start_precmd + +set_rcvar_obsolete kadmind5_server_enable kadmind_enable +set_rcvar_obsolete kadmind5_server kadmind_program +set_rcvar_obsolete kerberos5_server_enable kdc_enable + +kadmind_start_precmd() +{ + command_args="$command_args &" +} + +load_rc_config $name run_rc_command "$1" Copied: releng/10.1/etc/rc.d/kdc (from r272862, stable/10/etc/rc.d/kdc) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ releng/10.1/etc/rc.d/kdc Thu Oct 16 22:00:24 2014 (r273188, copy of r272862, stable/10/etc/rc.d/kdc) @@ -0,0 +1,27 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: kdc +# REQUIRE: NETWORKING +# KEYWORD: shutdown + +. /etc/rc.subr + +name=kdc +rcvar=${name}_enable +start_precmd=${name}_start_precmd + +set_rcvar_obsolete kerberos5_server_enable kdc_enable +set_rcvar_obsolete kerberos5_server kdc_program +set_rcvar_obsolete kerberos5_server_flags kdc_flags + +kdc_start_precmd() +{ + + command_args="$command_args --detach" +} + +load_rc_config $name +run_rc_command "$1" Modified: releng/10.1/etc/rc.d/kfd ============================================================================== --- releng/10.1/etc/rc.d/kfd Thu Oct 16 21:39:04 2014 (r273187) +++ releng/10.1/etc/rc.d/kfd Thu Oct 16 22:00:24 2014 (r273188) @@ -10,8 +10,14 @@ . /etc/rc.subr name=kfd -rcvar=kfd_enable -load_rc_config $name -command_args="-i &" +rcvar=${name}_enable +start_precmd=${name}_start_precmd + +kfd_start_precmd() +{ + command_args="$command_args -i &" +} + +load_rc_config $name run_rc_command "$1" Modified: releng/10.1/etc/rc.d/kpasswdd ============================================================================== --- releng/10.1/etc/rc.d/kpasswdd Thu Oct 16 21:39:04 2014 (r273187) +++ releng/10.1/etc/rc.d/kpasswdd Thu Oct 16 22:00:24 2014 (r273188) @@ -4,17 +4,25 @@ # # PROVIDE: kpasswdd -# REQUIRE: kadmin -# BEFORE: DAEMON +# REQUIRE: kdc +# KEYWORD: shutdown . /etc/rc.subr -name="kpasswdd" -load_rc_config $name -rcvar="kpasswdd_server_enable" -unset start_cmd -command="${kpasswdd_server}" -command_args="&" -required_vars="kadmind5_server_enable" +name=kpasswdd +rcvar=${name}_enable +required_vars=kdc_enable +start_precmd=${name}_start_precmd + +set_rcvar_obsolete kpasswdd_server_enable kpasswdd_enable +set_rcvar_obsolete kpasswdd_server kpasswdd_program +set_rcvar_obsolete kerberos5_server_enable kdc_enable + +kpasswdd_start_precmd() +{ + command_args="$command_args &" +} + +load_rc_config $name run_rc_command "$1" Modified: releng/10.1/etc/rc.d/routing ============================================================================== --- releng/10.1/etc/rc.d/routing Thu Oct 16 21:39:04 2014 (r273187) +++ releng/10.1/etc/rc.d/routing Thu Oct 16 22:00:24 2014 (r273188) @@ -23,32 +23,33 @@ ROUTE_CMD="/sbin/route" routing_start() { - local _cmd _af _if _a + local _cmd _af _if _a _ret _cmd=$1 _af=$2 _if=$3 + _ret=0 case $_if in ""|[Aa][Ll][Ll]|[Aa][Nn][Yy]) _if="" ;; esac case $_af in - inet|inet6|ipx|atm) + ""|[Aa][Ll][Ll]|[Aa][Nn][Yy]) + for _a in inet inet6 atm; do + afexists $_a || continue + setroutes $_cmd $_a $_if || _ret=1 + done + ;; + *) if afexists $_af; then - setroutes $_cmd $_af $_if + setroutes $_cmd $_af $_if || _ret=1 else err 1 "Unsupported address family: $_af." fi - ;; - ""|[Aa][Ll][Ll]|[Aa][Nn][Yy]) - for _a in inet inet6 ipx atm; do - afexists $_a && setroutes $_cmd $_a $_if - done - ;; - *) - err 1 "Unsupported address family: $_af." - ;; + ;; esac + + return $_ret } routing_stop() @@ -62,17 +63,6 @@ routing_stop() esac case $_af in - inet|inet6|ipx|atm) - if afexists $_af; then - eval static_${_af} delete $_if - # When $_if is specified, do not flush routes. - if ! [ -n "$_if" ]; then - eval routing_stop_${_af} - fi - else - err 1 "Unsupported address family: $_af." - fi - ;; ""|[Aa][Ll][Ll]|[Aa][Nn][Yy]) for _a in inet inet6 ipx atm; do afexists $_a || continue @@ -82,10 +72,18 @@ routing_stop() eval routing_stop_${_a} fi done - ;; + ;; *) - err 1 "Unsupported address family: $_af." - ;; + if afexists $_af; then + eval static_${_af} delete $_if + # When $_if is specified, do not flush routes. + if ! [ -n "$_if" ]; then + eval routing_stop_${_af} + fi + else + err 1 "Unsupported address family: $_af." + fi + ;; esac } Modified: releng/10.1/etc/rc.subr ============================================================================== --- releng/10.1/etc/rc.subr Thu Oct 16 21:39:04 2014 (r273187) +++ releng/10.1/etc/rc.subr Thu Oct 16 22:00:24 2014 (r273188) @@ -68,6 +68,39 @@ list_vars() done; } } +# set_rcvar [var] [defval] [desc] +# +# Echo or define a rc.conf(5) variable name. Global variable +# $rcvars is used. +# +# If no argument is specified, echo "${name}_enable". +# +# If only a var is specified, echo "${var}_enable". +# +# If var and defval are specified, the ${var} is defined as +# rc.conf(5) variable and the default value is ${defvar}. An +# optional argument $desc can also be specified to add a +# description for that. +# +set_rcvar() +{ + local _var + + case $# in + 0) echo ${name}_enable ;; + 1) echo ${1}_enable ;; + *) + debug "set_rcvar: \$$1=$2 is added" \ + " as a rc.conf(5) variable." + _var=$1 + rcvars="${rcvars# } $_var" + eval ${_var}_defval=\"$2\" + shift 2 + eval ${_var}_desc=\"$*\" + ;; + esac +} + # set_rcvar_obsolete oldvar [newvar] [msg] # Define obsolete variable. # Global variable $rcvars_obsolete is used. @@ -76,7 +109,7 @@ set_rcvar_obsolete() { local _var _var=$1 - debug "rcvar_obsolete: \$$1(old) -> \$$2(new) is defined" + debug "set_rcvar_obsolete: \$$1(old) -> \$$2(new) is defined" rcvars_obsolete="${rcvars_obsolete# } $1" eval ${1}_newvar=\"$2\" @@ -1091,8 +1124,8 @@ $command $rc_flags $command_args" echo "" fi echo "#" - # Get unique vars in $rcvar - for _v in $rcvar; do + # Get unique vars in $rcvar $rcvars + for _v in $rcvar $rcvars; do case $v in $_v\ *|\ *$_v|*\ $_v\ *) ;; *) v="${v# } $_v" ;; @@ -1238,7 +1271,7 @@ run_rc_script() unset name command command_args command_interpreter \ extra_commands pidfile procname \ - rcvar rcvars_obsolete required_dirs required_files \ + rcvar rcvars rcvars_obsolete required_dirs required_files \ required_vars eval unset ${_arg}_cmd ${_arg}_precmd ${_arg}_postcmd @@ -1306,7 +1339,7 @@ load_rc_config() done # Set defaults if defined. - for _var in $rcvar; do + for _var in $rcvar $rcvars; do eval _defval=\$${_var}_defval if [ -n "$_defval" ]; then eval : \${$_var:=\$${_var}_defval} @@ -1966,6 +1999,22 @@ check_required_after() return 0 } +# check_jail mib +# Return true if security.jail.$mib exists and set to 1. + +check_jail() +{ + local _mib _v + + _mib=$1 + if _v=$(${SYSCTL_N} "security.jail.$_mib" 2> /dev/null); then + case $_v in + 1) return 0;; + esac + fi + return 1 +} + # check_kern_features mib # Return existence of kern.features.* sysctl MIB as true or # false. The result will be cached in $_rc_cache_kern_features_ Modified: releng/10.1/include/rpcsvc/bootparam_prot.x ============================================================================== --- releng/10.1/include/rpcsvc/bootparam_prot.x Thu Oct 16 21:39:04 2014 (r273187) +++ releng/10.1/include/rpcsvc/bootparam_prot.x Thu Oct 16 22:00:24 2014 (r273188) @@ -1,30 +1,32 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2010, Oracle America, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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. + * * Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 + * COPYRIGHT HOLDER 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. */ /* Modified: releng/10.1/include/rpcsvc/key_prot.x ============================================================================== --- releng/10.1/include/rpcsvc/key_prot.x Thu Oct 16 21:39:04 2014 (r273187) +++ releng/10.1/include/rpcsvc/key_prot.x Thu Oct 16 22:00:24 2014 (r273188) @@ -1,30 +1,32 @@ -%/* -% * Sun RPC is a product of Sun Microsystems, Inc. and is provided for -% * unrestricted use provided that this legend is included on all tape -% * media and as a part of the software program in whole or part. Users -% * may copy or modify Sun RPC without charge, but are not authorized -% * to license or distribute it to anyone else except as part of a product or -% * program developed by the user. +%/*- +% * Copyright (c) 2010, Oracle America, Inc. % * -% * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE -% * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR -% * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. +% * Redistribution and use in source and binary forms, with or without +% * modification, are permitted provided that the following conditions are +% * met: % * -% * Sun RPC is provided with no support and without any obligation on the -% * part of Sun Microsystems, Inc. to assist in its use, correction, -% * modification or enhancement. +% * * Redistributions of source code must retain the above copyright +% * notice, this list of conditions and the following disclaimer. +% * * 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. +% * * Neither the name of the "Oracle America, Inc." nor the names of its +% * contributors may be used to endorse or promote products derived +% * from this software without specific prior written permission. % * -% * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE -% * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC -% * OR ANY PART THEREOF. -% * -% * In no event will Sun Microsystems, Inc. be liable for any lost revenue -% * or profits or other special, indirect and consequential damages, even if -% * Sun has been advised of the possibility of such damages. -% * -% * Sun Microsystems, Inc. -% * 2550 Garcia Avenue -% * Mountain View, California 94043 +% * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 +% * COPYRIGHT HOLDER 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. % */ /* * Key server protocol definition Modified: releng/10.1/include/rpcsvc/klm_prot.x ============================================================================== --- releng/10.1/include/rpcsvc/klm_prot.x Thu Oct 16 21:39:04 2014 (r273187) +++ releng/10.1/include/rpcsvc/klm_prot.x Thu Oct 16 22:00:24 2014 (r273188) @@ -1,30 +1,32 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2010, Oracle America, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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. + * * Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 + * COPYRIGHT HOLDER 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. */ /* Modified: releng/10.1/include/rpcsvc/mount.x ============================================================================== --- releng/10.1/include/rpcsvc/mount.x Thu Oct 16 21:39:04 2014 (r273187) +++ releng/10.1/include/rpcsvc/mount.x Thu Oct 16 22:00:24 2014 (r273188) @@ -1,30 +1,32 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2010, Oracle America, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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. + * * Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 + * COPYRIGHT HOLDER 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. */ /* Modified: releng/10.1/include/rpcsvc/nfs_prot.x ============================================================================== --- releng/10.1/include/rpcsvc/nfs_prot.x Thu Oct 16 21:39:04 2014 (r273187) +++ releng/10.1/include/rpcsvc/nfs_prot.x Thu Oct 16 22:00:24 2014 (r273188) @@ -1,30 +1,32 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2010, Oracle America, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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. + * * Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 + * COPYRIGHT HOLDER 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 RPC_HDR Modified: releng/10.1/include/rpcsvc/nis.x ============================================================================== --- releng/10.1/include/rpcsvc/nis.x Thu Oct 16 21:39:04 2014 (r273187) +++ releng/10.1/include/rpcsvc/nis.x Thu Oct 16 22:00:24 2014 (r273188) @@ -1,31 +1,32 @@ -%/* -% * Sun RPC is a product of Sun Microsystems, Inc. and is provided for -% * unrestricted use provided that this legend is included on all tape -% * media and as a part of the software program in whole or part. Users -% * may copy or modify Sun RPC without charge, but are not authorized -% * to license or distribute it to anyone else except as part of a product or -% * program developed by the user or with the express written consent of -% * Sun Microsystems, Inc. -% * -% * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE -% * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR -% * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. -% * -% * Sun RPC is provided with no support and without any obligation on the -% * part of Sun Microsystems, Inc. to assist in its use, correction, -% * modification or enhancement. +%/*- +% * Copyright (c) 2010, Oracle America, Inc. % * -% * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE -% * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC -% * OR ANY PART THEREOF. +% * Redistribution and use in source and binary forms, with or without +% * modification, are permitted provided that the following conditions are +% * met: % * -% * In no event will Sun Microsystems, Inc. be liable for any lost revenue -% * or profits or other special, indirect and consequential damages, even if -% * Sun has been advised of the possibility of such damages. +% * * Redistributions of source code must retain the above copyright +% * notice, this list of conditions and the following disclaimer. +% * * 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. +% * * Neither the name of the "Oracle America, Inc." nor the names of its +% * contributors may be used to endorse or promote products derived +% * from this software without specific prior written permission. % * -% * Sun Microsystems, Inc. -% * 2550 Garcia Avenue -% * Mountain View, California 94043 +% * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 +% * COPYRIGHT HOLDER 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. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-releng@FreeBSD.ORG Thu Oct 16 22:07:44 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C905F791; Thu, 16 Oct 2014 22:07:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B4E5F862; Thu, 16 Oct 2014 22:07:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9GM7ivL010153; Thu, 16 Oct 2014 22:07:44 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9GM7iUa010152; Thu, 16 Oct 2014 22:07:44 GMT (envelope-from des@FreeBSD.org) Message-Id: <201410162207.s9GM7iUa010152@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Thu, 16 Oct 2014 22:07:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273190 - releng/10.1/usr.sbin/bsdinstall/scripts X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Oct 2014 22:07:44 -0000 Author: des Date: Thu Oct 16 22:07:43 2014 New Revision: 273190 URL: https://svnweb.freebsd.org/changeset/base/273190 Log: MFH (r272173): offer to enable local_unbound after installation Approved by: re (gjb) Modified: releng/10.1/usr.sbin/bsdinstall/scripts/services Directory Properties: releng/10.1/ (props changed) Modified: releng/10.1/usr.sbin/bsdinstall/scripts/services ============================================================================== --- releng/10.1/usr.sbin/bsdinstall/scripts/services Thu Oct 16 22:04:07 2014 (r273189) +++ releng/10.1/usr.sbin/bsdinstall/scripts/services Thu Oct 16 22:07:43 2014 (r273190) @@ -43,6 +43,7 @@ DAEMONS=$( dialog --backtitle "FreeBSD I --title "System Configuration" --nocancel --separate-output \ --checklist "Choose the services you would like to be started at boot:" \ 0 0 0 \ + local_unbound "Local caching validating resolver" ${local_unbound:-off} \ sshd "Secure shell daemon" ${sshd_enable:-off} \ moused "PS/2 mouse pointer on console" ${moused_enable:-off} \ ntpd "Synchronize system and network time" ${ntpd_enable:-off} \ From owner-svn-src-releng@FreeBSD.ORG Thu Oct 16 22:20:39 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C213D574; Thu, 16 Oct 2014 22:20:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE0BA9FD; Thu, 16 Oct 2014 22:20:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9GMKd0e015894; Thu, 16 Oct 2014 22:20:39 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9GMKd6D015893; Thu, 16 Oct 2014 22:20:39 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410162220.s9GMKd6D015893@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 16 Oct 2014 22:20:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273192 - releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Oct 2014 22:20:39 -0000 Author: delphij Date: Thu Oct 16 22:20:38 2014 New Revision: 273192 URL: https://svnweb.freebsd.org/changeset/base/273192 Log: MFS r273191: MFC r273060: Use write_psize instead of write_asize when doing vdev_space_update. Without this change the accounting of L2ARC usage would be wrong and give 16EB free space because the number became negative and overflows. Approved by: re (gjb) Modified: releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: releng/10.1/ (props changed) Modified: releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu Oct 16 22:12:23 2014 (r273191) +++ releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu Oct 16 22:20:38 2014 (r273192) @@ -5163,7 +5163,7 @@ l2arc_write_buffers(spa_t *spa, l2arc_de ARCSTAT_INCR(arcstat_l2_write_bytes, write_asize); ARCSTAT_INCR(arcstat_l2_size, write_sz); ARCSTAT_INCR(arcstat_l2_asize, write_asize); - vdev_space_update(dev->l2ad_vdev, write_asize, 0, 0); + vdev_space_update(dev->l2ad_vdev, write_psize, 0, 0); /* * Bump device hand to the device start if it is approaching the end. From owner-svn-src-releng@FreeBSD.ORG Thu Oct 16 23:03:05 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B3FFBB39; Thu, 16 Oct 2014 23:03:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 859FFDC2; Thu, 16 Oct 2014 23:03:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9GN35Wq038089; Thu, 16 Oct 2014 23:03:05 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9GN35t0038086; Thu, 16 Oct 2014 23:03:05 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201410162303.s9GN35t0038086@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 16 Oct 2014 23:03:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273196 - in releng/10.1/sys: net netpfil/pf X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Oct 2014 23:03:05 -0000 Author: glebius Date: Thu Oct 16 23:03:04 2014 New Revision: 273196 URL: https://svnweb.freebsd.org/changeset/base/273196 Log: Merge r273184, r273185 from stable/10: - Use rn_detachhead() instead of direct free(9) for radix tables. - Free radix mask entries on main radix destroy. PR: 194078 Approved by: re (gjb) Modified: releng/10.1/sys/net/radix.c releng/10.1/sys/netpfil/pf/pf_table.c Directory Properties: releng/10.1/ (props changed) Modified: releng/10.1/sys/net/radix.c ============================================================================== --- releng/10.1/sys/net/radix.c Thu Oct 16 22:44:30 2014 (r273195) +++ releng/10.1/sys/net/radix.c Thu Oct 16 23:03:04 2014 (r273196) @@ -1204,6 +1204,18 @@ rn_inithead(void **head, int off) return (1); } +static int +rn_freeentry(struct radix_node *rn, void *arg) +{ + struct radix_node_head * const rnh = arg; + struct radix_node *x; + + x = (struct radix_node *)rn_delete(rn + 2, NULL, rnh); + if (x != NULL) + Free(x); + return (0); +} + int rn_detachhead(void **head) { @@ -1214,6 +1226,7 @@ rn_detachhead(void **head) rnh = *head; + rn_walktree(rnh->rnh_masks, rn_freeentry, rnh->rnh_masks); rn_detachhead_internal((void **)&rnh->rnh_masks); rn_detachhead_internal(head); return (1); Modified: releng/10.1/sys/netpfil/pf/pf_table.c ============================================================================== --- releng/10.1/sys/netpfil/pf/pf_table.c Thu Oct 16 22:44:30 2014 (r273195) +++ releng/10.1/sys/netpfil/pf/pf_table.c Thu Oct 16 23:03:04 2014 (r273196) @@ -1854,11 +1854,11 @@ pfr_destroy_ktable(struct pfr_ktable *kt } if (kt->pfrkt_ip4 != NULL) { RADIX_NODE_HEAD_DESTROY(kt->pfrkt_ip4); - free((caddr_t)kt->pfrkt_ip4, M_RTABLE); + rn_detachhead((void **)&kt->pfrkt_ip4); } if (kt->pfrkt_ip6 != NULL) { RADIX_NODE_HEAD_DESTROY(kt->pfrkt_ip6); - free((caddr_t)kt->pfrkt_ip6, M_RTABLE); + rn_detachhead((void **)&kt->pfrkt_ip6); } if (kt->pfrkt_shadow != NULL) pfr_destroy_ktable(kt->pfrkt_shadow, flushaddr); From owner-svn-src-releng@FreeBSD.ORG Thu Oct 16 23:25:40 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C26138F; Thu, 16 Oct 2014 23:25:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 36993F9C; Thu, 16 Oct 2014 23:25:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9GNPeg5048004; Thu, 16 Oct 2014 23:25:40 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9GNPc5o047995; Thu, 16 Oct 2014 23:25:38 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410162325.s9GNPc5o047995@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 16 Oct 2014 23:25:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273199 - in releng/10.1/release: . amd64 i386 tools X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Oct 2014 23:25:40 -0000 Author: gjb Date: Thu Oct 16 23:25:38 2014 New Revision: 273199 URL: https://svnweb.freebsd.org/changeset/base/273199 Log: MFstable10 r273198: MFC r273093, r273096: r273093: Merge the following from ^/projects/release-vmimage: r272436, r272437, r272792: r272436: Remove the first argument to panic(), which was initially intended to be the exit code, however when a non-zero exit code was returned to release/Makefile, this would prevent any remaining (and possibly successful) stages from being attempted. r272437: If the vm-base target fails, prevent the vm-image target from being run since it cannot possibly succeed. r272792: Add /usr/local/bin and /usr/local/sbin to PATH, needed if third-party software needs to use utilities outside of the base system during post-install stages (indexinfo is one culprit). r273096: Merge the following from ^/projects/release-vmimage: r273076, r273077, r273079, r273095: r273076: Add a separate make(1) target to release/Makefile to build FreeBSD virtual machine disk images for use on the Microsoft Azure service. For now, this target is not directly connected to the build, however can be manually invoked. The 'vm-azure' target invokes {amd64,i386}/mk-azure.sh, which does the heavy lifting to produce proper VHDs. mk-azure.sh uses a configuration file, defaulting to tools/azure.conf if otherwise unset. r273077: Clear VM_RC_LIST. r273079: Fix signal list to trigger umount(8). r273095: Output an informational message when mkimg(1) runs, so it does not appear that the process has stopped while waiting for a 'y/n' response when waagent is deprovisioned. Relnotes: yes Approved by: re (delphij) Sponsored by: The FreeBSD Foundation Added: releng/10.1/release/amd64/mk-azure.sh - copied unchanged from r273198, stable/10/release/amd64/mk-azure.sh releng/10.1/release/i386/mk-azure.sh - copied unchanged from r273198, stable/10/release/i386/mk-azure.sh releng/10.1/release/tools/azure.conf - copied unchanged from r273198, stable/10/release/tools/azure.conf Modified: releng/10.1/release/Makefile releng/10.1/release/amd64/mk-vmimage.sh releng/10.1/release/i386/mk-vmimage.sh Directory Properties: releng/10.1/ (props changed) Modified: releng/10.1/release/Makefile ============================================================================== --- releng/10.1/release/Makefile Thu Oct 16 23:16:26 2014 (r273198) +++ releng/10.1/release/Makefile Thu Oct 16 23:25:38 2014 (r273199) @@ -117,6 +117,7 @@ VMTARGETS= vm-base vm-image VMFORMATS?= vhd vmdk qcow2 raw VMSIZE?= 20G VMBASE?= vm +AZURECONF?= ${.CURDIR}/tools/azure.conf CLEANFILES= packagesystem *.txz MANIFEST system ${IMAGES} .if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES) @@ -137,6 +138,12 @@ CLEANDIRS= dist ftp release bootonly dvd .if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) CLEANDIRS+= ${VMTARGETS} .endif +.if exists(${.CURDIR}/${TARGET}/mk-azure.sh) +CLEANFILES+= ${OSRELEASE}.vhd \ + ${OSRELEASE}.vhd.raw \ + azure.img +CLEANDIRS+= vm-azure +.endif beforeclean: chflags -R noschg . .include @@ -372,3 +379,11 @@ vm-image: vm-base . endif .endif touch ${.TARGET} + +vm-azure: +.if exists(${.CURDIR}/${TARGET}/mk-azure.sh) + env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} AZURECONF=${AZURECONF} \ + ${.CURDIR}/${TARGET}/mk-azure.sh ${.TARGET} azure.img \ + ${WORLDDIR} ${.TARGET} ${VMSIZE} ${OSRELEASE}.vhd +.endif + touch ${.TARGET} Copied: releng/10.1/release/amd64/mk-azure.sh (from r273198, stable/10/release/amd64/mk-azure.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ releng/10.1/release/amd64/mk-azure.sh Thu Oct 16 23:25:38 2014 (r273199, copy of r273198, stable/10/release/amd64/mk-azure.sh) @@ -0,0 +1,173 @@ +#!/bin/sh +#- +# Copyright (c) 2014 The FreeBSD Foundation +# All rights reserved. +# +# This software was developed by Glen Barber 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. +# +# mk-azure.sh: Create virtual machine disk images for Microsoft Azure +# +# $FreeBSD$ +# + +export PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin" + +usage() { + echo "Usage:" + echo -n "$(basename ${0}) vm-azure " + echo " " + exit 1 +} + +panic() { + msg="${@}" + printf "${msg}\n" + if [ ! -z "${mddev}" ]; then + mdconfig -d -u ${mddev} + fi + # Do not allow one failure case to chain through any remaining image + # builds. + exit 0 +} + +vm_create_azure() { + # Arguments: + # vm-azure + + VMBASE="${1}" + WORLDDIR="${2}" + DESTDIR="${3}" + VMSIZE="${4}" + VMIMAGE="${5}" + + if [ -z "${VMBASE}" -o -z "${WORLDDIR}" -o -z "${DESTDIR}" \ + -o -z "${VMSIZE}" -o -z "${VMIMAGE}" ]; then + usage + fi + + trap "umount ${DESTDIR}/dev ${DESTDIR}" INT QUIT TRAP ABRT TERM + + i=0 + mkdir -p ${DESTDIR} + truncate -s ${VMSIZE} ${VMBASE} + mddev=$(mdconfig -f ${VMBASE}) + newfs -j /dev/${mddev} + mkdir -p ${DESTDIR} + mount /dev/${mddev} ${DESTDIR} + make -C ${WORLDDIR} DESTDIR=$(realpath ${DESTDIR}) \ + installworld installkernel distribution || \ + panic 1 "\n\nCannot install the base system to ${DESTDIR}." + mount -t devfs devfs ${DESTDIR}/dev + chroot ${DESTDIR} /usr/bin/newaliases + echo '# Custom /etc/fstab for FreeBSD VM images' \ + > ${DESTDIR}/etc/fstab + echo '/dev/gpt/rootfs / ufs rw 2 2' \ + >> ${DESTDIR}/etc/fstab + # Although a swap partition is created, it is not used in Azure. + echo '#/dev/gpt/swapfs none swap sw 0 0' \ + >> ${DESTDIR}/etc/fstab + + chroot ${DESTDIR} /etc/rc.d/ldconfig forcestart + chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes /usr/sbin/pkg bootstrap -y + chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes /usr/sbin/pkg install -y \ + python python2 python27 py27-asn1 sudo bash + if [ ! -z "${VM_EXTRA_PACKAGES}" ]; then + chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes /usr/sbin/pkg install -y \ + ${VM_EXTRA_PACKAGES} + fi + + fetch -o ${DESTDIR}/usr/sbin/waagent \ + http://people.freebsd.org/~gjb/waagent + chmod +x ${DESTDIR}/usr/sbin/waagent + rm -f ${DESTDIR}/etc/resolv.conf + chroot ${DESTDIR} /usr/sbin/waagent -verbose -install + yes | chroot ${DESTDIR} /usr/sbin/waagent -deprovision + echo 'sshd_enable="YES"' > ${DESTDIR}/etc/rc.conf + echo 'ifconfig_hn0="SYNCDHCP"' >> ${DESTDIR}/etc/rc.conf + echo 'waagent_enable="YES"' >> ${DESTDIR}/etc/rc.conf + + echo 'console="comconsole vidconsole"' >> ${DESTDIR}/boot/loader.conf + echo 'comconsole_speed="115200"' >> ${DESTDIR}/boot/loader.conf + + if [ ! -z "${VM_RC_LIST}" ]; then + for _rcvar in ${VM_RC_LIST}; do + echo ${_rcvar}_enable="YES" >> ${DESTDIR}/etc/rc.conf + done + fi + + sync + + while ! umount ${DESTDIR}/dev ${DESTDIR}; do + i=$(( $i + 1 )) + if [ $i -ge 10 ]; then + # This should never happen. But, it has happened. + msg="Cannot umount(8) ${DESTDIR}\n" + msg="${msg}Something has gone horribly wrong." + panic 1 "${msg}" + fi + sleep 1 + done + + echo "Creating image... Please wait." + + mkimg -f vhdf -s gpt \ + -b /boot/pmbr -p freebsd-boot/bootfs:=/boot/gptboot \ + -p freebsd-swap/swapfs::1G \ + -p freebsd-ufs/rootfs:=${VMBASE} \ + -o ${VMIMAGE}.raw + + if [ ! -x "/usr/local/bin/qemu-img" ]; then + env ASSUME_ALWAYS_YES=yes pkg install -y emulators/qemu-devel + fi + + size=$(qemu-img info -f raw --output json ${VMIMAGE}.raw | awk '/virtual-size/ {print $2}' | tr -d ',') + size=$(( ( ${size} / ( 1024 * 1024 ) + 1 ) * ( 1024 * 1024 ) )) + qemu-img resize ${VMIMAGE}.raw ${size} + qemu-img convert -f raw -o subformat=fixed -O vpc ${VMIMAGE}.raw ${VMIMAGE} + + return 0 +} + +main() { + cmd="${1}" + shift 1 + + if [ -e "${AZURECONF}" -a ! -c "${AZURECONF}" ]; then + . ${AZURECONF} + fi + + case ${cmd} in + vm-azure) + eval vm_create_azure "$@" || return 0 + ;; + *|\?) + usage + ;; + esac + + return 0 +} + +main "$@" Modified: releng/10.1/release/amd64/mk-vmimage.sh ============================================================================== --- releng/10.1/release/amd64/mk-vmimage.sh Thu Oct 16 23:16:26 2014 (r273198) +++ releng/10.1/release/amd64/mk-vmimage.sh Thu Oct 16 23:25:38 2014 (r273199) @@ -32,7 +32,7 @@ # $FreeBSD$ # -PATH="/bin:/usr/bin:/sbin:/usr/sbin" +PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin" export PATH usage_vm_base() { @@ -58,16 +58,25 @@ usage() { } panic() { - rc="${1}" - shift 1 msg="${@}" printf "${msg}\n" if [ ! -z "${mddev}" ]; then mdconfig -d -u ${mddev} fi + case ${cmd} in + vm-base) + # If the vm-base target fails, the vm-image target + # cannot possibly succeed. Touch the .TARGET file + # so it is not attempted. + touch vm-image + ;; + *) + # FALLTHROUGH + ;; + esac # Do not allow one failure case to chain through any remaining image # builds. - exit 0 + return 1 } vm_create_baseimage() { @@ -96,7 +105,7 @@ vm_create_baseimage() { cd ${WORLDDIR} && \ make DESTDIR=${DESTDIR} \ installworld installkernel distribution || \ - panic 1 "\n\nCannot install the base system to ${DESTDIR}." + panic "\n\nCannot install the base system to ${DESTDIR}." chroot ${DESTDIR} /usr/bin/newaliases echo '# Custom /etc/fstab for FreeBSD VM images' \ > ${DESTDIR}/etc/fstab @@ -111,7 +120,7 @@ vm_create_baseimage() { # This should never happen. But, it has happened. msg="Cannot umount(8) ${DESTDIR}\n" msg="${msg}Something has gone horribly wrong." - panic 1 "${msg}" + panic "${msg}" fi sleep 1 done @@ -141,11 +150,11 @@ vm_create_vmdisk() { if [ -z "${mkimg_version}" ]; then msg="Cannot determine mkimg(1) version.\n" msg="${msg}Cannot continue without a known mkimg(1) version." - panic 0 "${msg}" + panic "${msg}" fi if ! mkimg --formats 2>/dev/null | grep -q ${FORMAT}; then - panic 0 "'${FORMAT}' is not supported by this mkimg(1).\n" + panic "'${FORMAT}' is not supported by this mkimg(1).\n" fi case ${FORMAT} in Copied: releng/10.1/release/i386/mk-azure.sh (from r273198, stable/10/release/i386/mk-azure.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ releng/10.1/release/i386/mk-azure.sh Thu Oct 16 23:25:38 2014 (r273199, copy of r273198, stable/10/release/i386/mk-azure.sh) @@ -0,0 +1,173 @@ +#!/bin/sh +#- +# Copyright (c) 2014 The FreeBSD Foundation +# All rights reserved. +# +# This software was developed by Glen Barber 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. +# +# mk-azure.sh: Create virtual machine disk images for Microsoft Azure +# +# $FreeBSD$ +# + +export PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin" + +usage() { + echo "Usage:" + echo -n "$(basename ${0}) vm-azure " + echo " " + exit 1 +} + +panic() { + msg="${@}" + printf "${msg}\n" + if [ ! -z "${mddev}" ]; then + mdconfig -d -u ${mddev} + fi + # Do not allow one failure case to chain through any remaining image + # builds. + exit 0 +} + +vm_create_azure() { + # Arguments: + # vm-azure + + VMBASE="${1}" + WORLDDIR="${2}" + DESTDIR="${3}" + VMSIZE="${4}" + VMIMAGE="${5}" + + if [ -z "${VMBASE}" -o -z "${WORLDDIR}" -o -z "${DESTDIR}" \ + -o -z "${VMSIZE}" -o -z "${VMIMAGE}" ]; then + usage + fi + + trap "umount ${DESTDIR}/dev ${DESTDIR}" INT QUIT TRAP ABRT TERM + + i=0 + mkdir -p ${DESTDIR} + truncate -s ${VMSIZE} ${VMBASE} + mddev=$(mdconfig -f ${VMBASE}) + newfs -j /dev/${mddev} + mkdir -p ${DESTDIR} + mount /dev/${mddev} ${DESTDIR} + make -C ${WORLDDIR} DESTDIR=$(realpath ${DESTDIR}) \ + installworld installkernel distribution || \ + panic 1 "\n\nCannot install the base system to ${DESTDIR}." + mount -t devfs devfs ${DESTDIR}/dev + chroot ${DESTDIR} /usr/bin/newaliases + echo '# Custom /etc/fstab for FreeBSD VM images' \ + > ${DESTDIR}/etc/fstab + echo '/dev/gpt/rootfs / ufs rw 2 2' \ + >> ${DESTDIR}/etc/fstab + # Although a swap partition is created, it is not used in Azure. + echo '#/dev/gpt/swapfs none swap sw 0 0' \ + >> ${DESTDIR}/etc/fstab + + chroot ${DESTDIR} /etc/rc.d/ldconfig forcestart + chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes /usr/sbin/pkg bootstrap -y + chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes /usr/sbin/pkg install -y \ + python python2 python27 py27-asn1 sudo bash + if [ ! -z "${VM_EXTRA_PACKAGES}" ]; then + chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes /usr/sbin/pkg install -y \ + ${VM_EXTRA_PACKAGES} + fi + + fetch -o ${DESTDIR}/usr/sbin/waagent \ + http://people.freebsd.org/~gjb/waagent + chmod +x ${DESTDIR}/usr/sbin/waagent + rm -f ${DESTDIR}/etc/resolv.conf + chroot ${DESTDIR} /usr/sbin/waagent -verbose -install + yes | chroot ${DESTDIR} /usr/sbin/waagent -deprovision + echo 'sshd_enable="YES"' > ${DESTDIR}/etc/rc.conf + echo 'ifconfig_hn0="SYNCDHCP"' >> ${DESTDIR}/etc/rc.conf + echo 'waagent_enable="YES"' >> ${DESTDIR}/etc/rc.conf + + echo 'console="comconsole vidconsole"' >> ${DESTDIR}/boot/loader.conf + echo 'comconsole_speed="115200"' >> ${DESTDIR}/boot/loader.conf + + if [ ! -z "${VM_RC_LIST}" ]; then + for _rcvar in ${VM_RC_LIST}; do + echo ${_rcvar}_enable="YES" >> ${DESTDIR}/etc/rc.conf + done + fi + + sync + + while ! umount ${DESTDIR}/dev ${DESTDIR}; do + i=$(( $i + 1 )) + if [ $i -ge 10 ]; then + # This should never happen. But, it has happened. + msg="Cannot umount(8) ${DESTDIR}\n" + msg="${msg}Something has gone horribly wrong." + panic 1 "${msg}" + fi + sleep 1 + done + + echo "Creating image... Please wait." + + mkimg -f vhdf -s gpt \ + -b /boot/pmbr -p freebsd-boot/bootfs:=/boot/gptboot \ + -p freebsd-swap/swapfs::1G \ + -p freebsd-ufs/rootfs:=${VMBASE} \ + -o ${VMIMAGE}.raw + + if [ ! -x "/usr/local/bin/qemu-img" ]; then + env ASSUME_ALWAYS_YES=yes pkg install -y emulators/qemu-devel + fi + + size=$(qemu-img info -f raw --output json ${VMIMAGE}.raw | awk '/virtual-size/ {print $2}' | tr -d ',') + size=$(( ( ${size} / ( 1024 * 1024 ) + 1 ) * ( 1024 * 1024 ) )) + qemu-img resize ${VMIMAGE}.raw ${size} + qemu-img convert -f raw -o subformat=fixed -O vpc ${VMIMAGE}.raw ${VMIMAGE} + + return 0 +} + +main() { + cmd="${1}" + shift 1 + + if [ -e "${AZURECONF}" -a ! -c "${AZURECONF}" ]; then + . ${AZURECONF} + fi + + case ${cmd} in + vm-azure) + eval vm_create_azure "$@" || return 0 + ;; + *|\?) + usage + ;; + esac + + return 0 +} + +main "$@" Modified: releng/10.1/release/i386/mk-vmimage.sh ============================================================================== --- releng/10.1/release/i386/mk-vmimage.sh Thu Oct 16 23:16:26 2014 (r273198) +++ releng/10.1/release/i386/mk-vmimage.sh Thu Oct 16 23:25:38 2014 (r273199) @@ -32,7 +32,7 @@ # $FreeBSD$ # -PATH="/bin:/usr/bin:/sbin:/usr/sbin" +PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin" export PATH usage_vm_base() { @@ -58,16 +58,25 @@ usage() { } panic() { - rc="${1}" - shift 1 msg="${@}" printf "${msg}\n" if [ ! -z "${mddev}" ]; then mdconfig -d -u ${mddev} fi + case ${cmd} in + vm-base) + # If the vm-base target fails, the vm-image target + # cannot possibly succeed. Touch the .TARGET file + # so it is not attempted. + touch vm-image + ;; + *) + # FALLTHROUGH + ;; + esac # Do not allow one failure case to chain through any remaining image # builds. - exit 0 + return 1 } vm_create_baseimage() { @@ -96,7 +105,7 @@ vm_create_baseimage() { cd ${WORLDDIR} && \ make DESTDIR=${DESTDIR} \ installworld installkernel distribution || \ - panic 1 "\n\nCannot install the base system to ${DESTDIR}." + panic "\n\nCannot install the base system to ${DESTDIR}." chroot ${DESTDIR} /usr/bin/newaliases echo '# Custom /etc/fstab for FreeBSD VM images' \ > ${DESTDIR}/etc/fstab @@ -111,7 +120,7 @@ vm_create_baseimage() { # This should never happen. But, it has happened. msg="Cannot umount(8) ${DESTDIR}\n" msg="${msg}Something has gone horribly wrong." - panic 1 "${msg}" + panic "${msg}" fi sleep 1 done @@ -141,11 +150,11 @@ vm_create_vmdisk() { if [ -z "${mkimg_version}" ]; then msg="Cannot determine mkimg(1) version.\n" msg="${msg}Cannot continue without a known mkimg(1) version." - panic 0 "${msg}" + panic "${msg}" fi if ! mkimg --formats 2>/dev/null | grep -q ${FORMAT}; then - panic 0 "'${FORMAT}' is not supported by this mkimg(1).\n" + panic "'${FORMAT}' is not supported by this mkimg(1).\n" fi case ${FORMAT} in Copied: releng/10.1/release/tools/azure.conf (from r273198, stable/10/release/tools/azure.conf) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ releng/10.1/release/tools/azure.conf Thu Oct 16 23:25:38 2014 (r273199, copy of r273198, stable/10/release/tools/azure.conf) @@ -0,0 +1,14 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# Set to a list of packages to install. +# Example: +#export VM_EXTRA_PACKAGES="www/apache24" +export VM_EXTRA_PACKAGES= + +# Set to a list of third-party software to enable in rc.conf(5). +# Example: +#export VM_RC_LIST="apache24" +export VM_RC_LIST= From owner-svn-src-releng@FreeBSD.ORG Fri Oct 17 13:35:57 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5080061F; Fri, 17 Oct 2014 13:35:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BDB18B0; Fri, 17 Oct 2014 13:35:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9HDZvHD052025; Fri, 17 Oct 2014 13:35:57 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9HDZvSi052024; Fri, 17 Oct 2014 13:35:57 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201410171335.s9HDZvSi052024@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Fri, 17 Oct 2014 13:35:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273215 - releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Oct 2014 13:35:57 -0000 Author: smh Date: Fri Oct 17 13:35:56 2014 New Revision: 273215 URL: https://svnweb.freebsd.org/changeset/base/273215 Log: MFS10 r273161 MFC r273158 Prevent ZFS leaking pool free space Approved by: re@ (gjb) Sponsored by: Multiplay Modified: releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Directory Properties: releng/10.1/ (props changed) Modified: releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Fri Oct 17 13:20:49 2014 (r273214) +++ releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Fri Oct 17 13:35:56 2014 (r273215) @@ -1468,13 +1468,6 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t * "traverse_dataset_destroyed()", err); } - /* - * If we didn't make progress, mark the async destroy as - * stalled, so that we will not initiate a spa_sync() on - * its behalf. - */ - scn->scn_async_stalled = (scn->scn_visited_this_txg == 0); - if (bptree_is_empty(dp->dp_meta_objset, dp->dp_bptree_obj)) { /* finished; deactivate async destroy feature */ spa_feature_decr(spa, SPA_FEATURE_ASYNC_DESTROY, tx); @@ -1487,6 +1480,14 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t * dp->dp_bptree_obj, tx)); dp->dp_bptree_obj = 0; scn->scn_async_destroying = B_FALSE; + } else { + /* + * If we didn't make progress, mark the async destroy as + * stalled, so that we will not initiate a spa_sync() on + * its behalf. + */ + scn->scn_async_stalled = + (scn->scn_visited_this_txg == 0); } } if (scn->scn_visited_this_txg) { From owner-svn-src-releng@FreeBSD.ORG Fri Oct 17 13:46:16 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C9345DEC; Fri, 17 Oct 2014 13:46:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B4B6B9C3; Fri, 17 Oct 2014 13:46:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9HDkGN2057366; Fri, 17 Oct 2014 13:46:16 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9HDkGQq057365; Fri, 17 Oct 2014 13:46:16 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201410171346.s9HDkGQq057365@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Fri, 17 Oct 2014 13:46:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273217 - releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Oct 2014 13:46:16 -0000 Author: smh Date: Fri Oct 17 13:46:16 2014 New Revision: 273217 URL: https://svnweb.freebsd.org/changeset/base/273217 Log: MFS10 r273057 MFC r272324 Fix a missed merge introduced in r272883 Approved by: re@ (gjb) Sponsored by: Multiplay Modified: releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: releng/10.1/ (props changed) Modified: releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri Oct 17 13:40:17 2014 (r273216) +++ releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri Oct 17 13:46:16 2014 (r273217) @@ -3662,7 +3662,6 @@ zfs_ioc_destroy_bookmarks(const char *po if (strncmp(name, poolname, poollen) != 0 || (name[poollen] != '/' && name[poollen] != '#')) return (SET_ERROR(EXDEV)); - (void) zvol_remove_minor(name); } error = dsl_bookmark_destroy(innvl, outnvl); From owner-svn-src-releng@FreeBSD.ORG Fri Oct 17 15:30:52 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53E2F974; Fri, 17 Oct 2014 15:30:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 400137D6; Fri, 17 Oct 2014 15:30:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9HFUq4S011710; Fri, 17 Oct 2014 15:30:52 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9HFUq7h011709; Fri, 17 Oct 2014 15:30:52 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410171530.s9HFUq7h011709@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 17 Oct 2014 15:30:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273222 - releng/10.1/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Oct 2014 15:30:52 -0000 Author: gjb Date: Fri Oct 17 15:30:51 2014 New Revision: 273222 URL: https://svnweb.freebsd.org/changeset/base/273222 Log: Document r272078, addition of /usr/lib32/compat to the default ld-elf32.so.1 search path. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Oct 17 15:29:47 2014 (r273221) +++ releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Oct 17 15:30:51 2014 (r273222) @@ -1349,6 +1349,13 @@ separate configuration files for services such as netif, for example, where each network interface can have a separate configuration file. + + The default &man.rc.conf.5;, + /etc/defaults/rc.conf, has been updated + to include /usr/lib32/compat in the + default ld-elf32.so.1 search + path. From owner-svn-src-releng@FreeBSD.ORG Fri Oct 17 15:30:54 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7FBE0A4A; Fri, 17 Oct 2014 15:30:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C5C47D7; Fri, 17 Oct 2014 15:30:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9HFUsnb011761; Fri, 17 Oct 2014 15:30:54 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9HFUs9T011760; Fri, 17 Oct 2014 15:30:54 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410171530.s9HFUs9T011760@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 17 Oct 2014 15:30:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273223 - releng/10.1/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Oct 2014 15:30:54 -0000 Author: gjb Date: Fri Oct 17 15:30:53 2014 New Revision: 273223 URL: https://svnweb.freebsd.org/changeset/base/273223 Log: Add a section for periodic(8) scripts. Document r272430, 110.clean-tmps: avoid crossing filesystem mount boundaries when cleaning /tmp. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Oct 17 15:30:51 2014 (r273222) +++ releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Oct 17 15:30:53 2014 (r273223) @@ -1357,6 +1357,15 @@ default ld-elf32.so.1 search path. + + + <filename>/etc/periodic</filename> Scripts + + The daily &man.periodic.8; script + 110.clean-tmps has been updated to + avoid crossing filesystem mount boundaries when cleaning + files in /tmp. + From owner-svn-src-releng@FreeBSD.ORG Fri Oct 17 15:30:56 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A71A3B6B; Fri, 17 Oct 2014 15:30:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 937327D8; Fri, 17 Oct 2014 15:30:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9HFUujH011810; Fri, 17 Oct 2014 15:30:56 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9HFUuHA011809; Fri, 17 Oct 2014 15:30:56 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410171530.s9HFUuHA011809@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 17 Oct 2014 15:30:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273224 - releng/10.1/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Oct 2014 15:30:56 -0000 Author: gjb Date: Fri Oct 17 15:30:55 2014 New Revision: 273224 URL: https://svnweb.freebsd.org/changeset/base/273224 Log: Document r272819, mkimg(1) QCOW and QCOW2 support. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Oct 17 15:30:53 2014 (r273223) +++ releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Oct 17 15:30:55 2014 (r273224) @@ -1308,6 +1308,9 @@ Support for adding empty partitions has been added to the &man.mkimg.1; utility. + Support for QCOW and QCOW2 disk image + formats has been added to the &man.mkimg.1; utility. + <filename>/etc/rc.d</filename> Scripts From owner-svn-src-releng@FreeBSD.ORG Fri Oct 17 15:31:00 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E7CE3D71; Fri, 17 Oct 2014 15:31:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D45927DA; Fri, 17 Oct 2014 15:31:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9HFV0qp011916; Fri, 17 Oct 2014 15:31:00 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9HFV0b9011915; Fri, 17 Oct 2014 15:31:00 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410171531.s9HFV0b9011915@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 17 Oct 2014 15:31:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273226 - releng/10.1/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Oct 2014 15:31:01 -0000 Author: gjb Date: Fri Oct 17 15:31:00 2014 New Revision: 273226 URL: https://svnweb.freebsd.org/changeset/base/273226 Log: Document r273101, support for building VM images as part of the release process. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Oct 17 15:30:58 2014 (r273225) +++ releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Oct 17 15:31:00 2014 (r273226) @@ -1518,6 +1518,14 @@ eliminating the need for a network connection or explicitly providing the path to the version included on the DVD installation medium. + + The + &os; Release Engineering build tools have been updated to + provide support for building virtual machine disk images as + part of the release build process using &man.mkimg.1;. The + disk image formats currently supported include QCOW2, VHD, + VMDK, and raw formats. See &man.release.7; for additional + information. From owner-svn-src-releng@FreeBSD.ORG Fri Oct 17 15:31:02 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EDAEBE54; Fri, 17 Oct 2014 15:31:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9A7C7DD; Fri, 17 Oct 2014 15:31:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9HFV2aA011970; Fri, 17 Oct 2014 15:31:02 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9HFV2EQ011969; Fri, 17 Oct 2014 15:31:02 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410171531.s9HFV2EQ011969@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 17 Oct 2014 15:31:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273227 - releng/10.1/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Oct 2014 15:31:03 -0000 Author: gjb Date: Fri Oct 17 15:31:02 2014 New Revision: 273227 URL: https://svnweb.freebsd.org/changeset/base/273227 Log: Document r273199, support for building VM images for the Microsoft Azure platform. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Oct 17 15:31:00 2014 (r273226) +++ releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Oct 17 15:31:02 2014 (r273227) @@ -1526,6 +1526,15 @@ disk image formats currently supported include QCOW2, VHD, VMDK, and raw formats. See &man.release.7; for additional information. + + The + &os; Release Engineering build tools have been updated to + provide support for building &os; virtual machine disk images + for the µsoft; Azure cloud hosting platform. This + functionality is not connected directly to the default + release &man.make.1; target, however can be + invoked by specifying the vm-azure target + directly. From owner-svn-src-releng@FreeBSD.ORG Fri Oct 17 15:31:05 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 07FDFE60; Fri, 17 Oct 2014 15:31:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E85BD7DE; Fri, 17 Oct 2014 15:31:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9HFV42c012015; Fri, 17 Oct 2014 15:31:04 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9HFV4ug012014; Fri, 17 Oct 2014 15:31:04 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410171531.s9HFV4ug012014@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 17 Oct 2014 15:31:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273228 - releng/10.1/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Oct 2014 15:31:05 -0000 Author: gjb Date: Fri Oct 17 15:31:04 2014 New Revision: 273228 URL: https://svnweb.freebsd.org/changeset/base/273228 Log: Rewrap a paragraph to conform to FDP style. Fix a wording nit while here. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Oct 17 15:31:02 2014 (r273227) +++ releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Oct 17 15:31:04 2014 (r273228) @@ -1013,9 +1013,9 @@ prints the output in a parsable format. The Blowfish password format - implementation has been updated. Support for $2b$ has - been added, allowing use of passwords greater than 256 - characters long. + implementation has been updated. Support for + $2b$ has been added, allowing use of passwords + greater than 256 characters long. The &man.iconv.3; library has been updated to match NetBSD, providing several bug fixes. @@ -1513,7 +1513,7 @@ class="directory">packages/ structure on the DVD installer. This allows the &man.pkg.7; bootstrap utility to properly locate the Latest/pkg.txz - file on the DVD when REPOS_DIR is set to + package on the DVD when REPOS_DIR is set to /dist/packages/repos, eliminating the need for a network connection or explicitly providing the path to the version included on the DVD From owner-svn-src-releng@FreeBSD.ORG Fri Oct 17 15:30:58 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC516C8F; Fri, 17 Oct 2014 15:30:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8AE37D9; Fri, 17 Oct 2014 15:30:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9HFUwxX011856; Fri, 17 Oct 2014 15:30:58 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9HFUwZr011855; Fri, 17 Oct 2014 15:30:58 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410171530.s9HFUwZr011855@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 17 Oct 2014 15:30:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273225 - releng/10.1/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Oct 2014 15:30:59 -0000 Author: gjb Date: Fri Oct 17 15:30:58 2014 New Revision: 273225 URL: https://svnweb.freebsd.org/changeset/base/273225 Log: Document r273098, options for displaying mkimg(1) internals Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Oct 17 15:30:55 2014 (r273224) +++ releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Oct 17 15:30:58 2014 (r273225) @@ -1311,6 +1311,43 @@ Support for QCOW and QCOW2 disk image formats has been added to the &man.mkimg.1; utility. + The &man.mkimg.1; utility has been + updated to include three options used to print information + about &man.mkimg.1; itself: + + + + + + + + Option + Output + + + + + + --version + The current version of the &man.mkimg.1; + utility + + + + --formats + The disk image file formats supported by + &man.mkimg.1; + + + + --schemes + The partition schemes supported by + &man.mkimg.1; + + + + + <filename>/etc/rc.d</filename> Scripts From owner-svn-src-releng@FreeBSD.ORG Fri Oct 17 15:34:28 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE90A238; Fri, 17 Oct 2014 15:34:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9AAC5809; Fri, 17 Oct 2014 15:34:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9HFYSHI013024; Fri, 17 Oct 2014 15:34:28 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9HFYSjH013022; Fri, 17 Oct 2014 15:34:28 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410171534.s9HFYSjH013022@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 17 Oct 2014 15:34:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273229 - releng/10.1/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Oct 2014 15:34:28 -0000 Author: gjb Date: Fri Oct 17 15:34:27 2014 New Revision: 273229 URL: https://svnweb.freebsd.org/changeset/base/273229 Log: Remove empty sections. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Oct 17 15:31:04 2014 (r273228) +++ releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Oct 17 15:34:27 2014 (r273229) @@ -471,15 +471,6 @@ Hardware Support -   - - - Multimedia Support - -   - - - Network Interface Support @@ -1536,13 +1527,6 @@ invoked by specifying the vm-azure target directly. - - - Documentation - -   - - From owner-svn-src-releng@FreeBSD.ORG Fri Oct 17 15:37:49 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6B6EC3B6; Fri, 17 Oct 2014 15:37:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 578BE835; Fri, 17 Oct 2014 15:37:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9HFbnj0013541; Fri, 17 Oct 2014 15:37:49 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9HFbntk013540; Fri, 17 Oct 2014 15:37:49 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410171537.s9HFbntk013540@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 17 Oct 2014 15:37:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273230 - releng/10.1/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Oct 2014 15:37:49 -0000 Author: gjb Date: Fri Oct 17 15:37:48 2014 New Revision: 273230 URL: https://svnweb.freebsd.org/changeset/base/273230 Log: Document the current version of pkg(8) for the release. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Oct 17 15:34:27 2014 (r273229) +++ releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Oct 17 15:37:48 2014 (r273230) @@ -1478,8 +1478,8 @@ Ports/Packages Collection Infrastructure -   - + The &man.pkg.8; package management utility has been + updated to version 1.3.8. From owner-svn-src-releng@FreeBSD.ORG Fri Oct 17 16:02:35 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 372CE90A; Fri, 17 Oct 2014 16:02:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 21DBFAF8; Fri, 17 Oct 2014 16:02:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9HG2Y82027738; Fri, 17 Oct 2014 16:02:34 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9HG2YQQ027737; Fri, 17 Oct 2014 16:02:34 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410171602.s9HG2YQQ027737@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 17 Oct 2014 16:02:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273231 - releng/10.1/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Oct 2014 16:02:35 -0000 Author: gjb Date: Fri Oct 17 16:02:34 2014 New Revision: 273231 URL: https://svnweb.freebsd.org/changeset/base/273231 Log: Fill in the security advisories section. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Oct 17 15:37:48 2014 (r273230) +++ releng/10.1/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Oct 17 16:02:34 2014 (r273231) @@ -123,7 +123,173 @@ Security Advisories -   + The following security advisories have been issued since + &os; &release.prev;: + + + + + + + + + Advisory + Date + Topic + + + + + + SA-13:14.openssh + 19 November 2013 + OpenSSH AES-GCM memory corruption + vulnerability + + + + SA-14:01.bsnmpd + 14 January 2014 + bsnmpd remote denial of service + vulnerability + + + + SA-14:02.ntpd + 14 January 2014 + ntpd distributed reflection Denial of + Service vulnerability + + + + SA-14:03.openssl + 14 January 2014 + OpenSSL multiple + vulnerabilities + + + + SA-14:04.bind + 14 January 2014 + BIND remote denial of service + vulnerability + + + + SA-14:05.nfsserver + 8 April 2014 + Deadlock in the NFS server + + + + SA-14:06.openssl + 8 April 2014 + OpenSSL multiple + vulnerabilities + + + + SA-14:07.devfs + 30 April 2014 + Fix devfs rules not applied by default for + jails + + + + SA-14:08.tcp + 30 April 2014 + Fix TCP reassembly + vulnerability + + + + SA-14:09.openssl + 30 April 2014 + Fix OpenSSL use-after-free + vulnerability + + + + SA-14:10.openssl + 15 May 2014 + Fix OpenSSL NULL pointer deference + vulnerability + + + + SA-14:11.sendmail + 3 June 2014 + Fix sendmail improper close-on-exec flag + handling + + + + SA-14:13.pam + 3 June 2014 + Fix incorrect error handling in PAM policy + parser + + + + SA-14:14.openssl + 5 June 2014 + Multiple vulnerabilities + + + + SA-14:15.iconv + 24 June 2014 + NULL pointer dereference and out-of-bounds + array access + + + + SA-14:16.file + 24 June 2014 + Multiple vulnerabilities + + + + SA-14:17.kmem + 8 July 2014 + Kernel memory disclosure in control + messages and SCTP notifications + + + + SA-14:18.openssl + 9 September 2014 + Multiple vulnerabilities + + + + SA-14:19.tcp + 16 September 2014 + Denial of Service in TCP packet + processing. + + + + From owner-svn-src-releng@FreeBSD.ORG Fri Oct 17 16:32:29 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5800C347; Fri, 17 Oct 2014 16:32:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3913EE1C; Fri, 17 Oct 2014 16:32:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9HGWSCh042755; Fri, 17 Oct 2014 16:32:28 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9HGWSXf042752; Fri, 17 Oct 2014 16:32:28 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201410171632.s9HGWSXf042752@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 17 Oct 2014 16:32:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273233 - in releng/10.1/contrib/binutils/bfd: . po X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Oct 2014 16:32:29 -0000 Author: emaste Date: Fri Oct 17 16:32:27 2014 New Revision: 273233 URL: https://svnweb.freebsd.org/changeset/base/273233 Log: MFS10 r273232 (HEAD r257302 by rea): binutils/bfd: fix printf-like format strings for "bfd *" arguments There is a special format argument '%B' that directly handles values of type 'bfd *', they must be used instead of '%s'. Manifestations of this bug can be seen in ld(1) error messages, for example, http://lists.freebsd.org/pipermail/freebsd-current/2013-August/043580.html http://lists.freebsd.org/pipermail/freebsd-current/2013-October/045404.html Approved by: re Modified: releng/10.1/contrib/binutils/bfd/elf32-score.c releng/10.1/contrib/binutils/bfd/elflink.c releng/10.1/contrib/binutils/bfd/po/bfd.pot Directory Properties: releng/10.1/ (props changed) Modified: releng/10.1/contrib/binutils/bfd/elf32-score.c ============================================================================== --- releng/10.1/contrib/binutils/bfd/elf32-score.c Fri Oct 17 16:23:36 2014 (r273232) +++ releng/10.1/contrib/binutils/bfd/elf32-score.c Fri Oct 17 16:32:27 2014 (r273233) @@ -2546,7 +2546,7 @@ _bfd_score_elf_check_relocs (bfd *abfd, } else if (r_symndx >= extsymoff + NUM_SHDR_ENTRIES (symtab_hdr)) { - (*_bfd_error_handler) (_("%s: Malformed reloc detected for section %s"), abfd, name); + (*_bfd_error_handler) (_("%B: Malformed reloc detected for section %s"), abfd, name); bfd_set_error (bfd_error_bad_value); return FALSE; } Modified: releng/10.1/contrib/binutils/bfd/elflink.c ============================================================================== --- releng/10.1/contrib/binutils/bfd/elflink.c Fri Oct 17 16:23:36 2014 (r273232) +++ releng/10.1/contrib/binutils/bfd/elflink.c Fri Oct 17 16:32:27 2014 (r273233) @@ -4357,8 +4357,8 @@ elf_link_add_object_symbols (bfd *abfd, if ((elf_dyn_lib_class (abfd) & DYN_NO_NEEDED) != 0) { (*_bfd_error_handler) - (_("%s: invalid DSO for symbol `%s' definition"), - abfd, name); + (_("%B: invalid DSO for symbol `%s' definition"), + abfd, name); bfd_set_error (bfd_error_bad_value); goto error_free_vers; } Modified: releng/10.1/contrib/binutils/bfd/po/bfd.pot ============================================================================== --- releng/10.1/contrib/binutils/bfd/po/bfd.pot Fri Oct 17 16:23:36 2014 (r273232) +++ releng/10.1/contrib/binutils/bfd/po/bfd.pot Fri Oct 17 16:32:27 2014 (r273233) @@ -1572,7 +1572,7 @@ msgstr "" #: elf32-score.c:2549 #, c-format -msgid "%s: Malformed reloc detected for section %s" +msgid "%B: Malformed reloc detected for section %s" msgstr "" #: elf32-score.c:2600 @@ -2440,7 +2440,7 @@ msgstr "" #: elflink.c:4309 #, c-format -msgid "%s: invalid DSO for symbol `%s' definition" +msgid "%B: invalid DSO for symbol `%s' definition" msgstr "" #: elflink.c:5535 From owner-svn-src-releng@FreeBSD.ORG Fri Oct 17 20:39:40 2014 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 01541367; Fri, 17 Oct 2014 20:39:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1B5BAF4; Fri, 17 Oct 2014 20:39:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9HKddo4059990; Fri, 17 Oct 2014 20:39:39 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9HKdd53059989; Fri, 17 Oct 2014 20:39:39 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201410172039.s9HKdd53059989@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 17 Oct 2014 20:39:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273240 - releng/10.1/usr.sbin/nscd X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Oct 2014 20:39:40 -0000 Author: jhb Date: Fri Oct 17 20:39:39 2014 New Revision: 273240 URL: https://svnweb.freebsd.org/changeset/base/273240 Log: MFS10 273238; Properly set the timeout in a query_state. The global query_timeout configuration value is an integer count of seconds, it is not a timeval. Using memcpy() to copy a timeval from it put garbage into the tv_usec field. PR: 194025 Approved by: re (gjb) Modified: releng/10.1/usr.sbin/nscd/query.c Directory Properties: releng/10.1/ (props changed) Modified: releng/10.1/usr.sbin/nscd/query.c ============================================================================== --- releng/10.1/usr.sbin/nscd/query.c Fri Oct 17 20:03:01 2014 (r273239) +++ releng/10.1/usr.sbin/nscd/query.c Fri Oct 17 20:39:39 2014 (r273240) @@ -1253,8 +1253,8 @@ init_query_state(int sockfd, size_t keve retval->read_func = query_socket_read; get_time_func(&retval->creation_time); - memcpy(&retval->timeout, &s_configuration->query_timeout, - sizeof(struct timeval)); + retval->timeout.tv_sec = s_configuration->query_timeout; + retval->timeout.tv_usec = 0; TRACE_OUT(init_query_state); return (retval);