From owner-svn-src-stable-10@freebsd.org Sun Sep 20 20:11:09 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E8B1A05FB3; Sun, 20 Sep 2015 20:11:09 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E13A115D2; Sun, 20 Sep 2015 20:11:08 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [10.192.0.157] (unknown [178.20.49.58]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 69F971A6E6; Sun, 20 Sep 2015 22:10:58 +0200 (CEST) Subject: Re: svn commit: r287984 - stable/10/sys/contrib/ipfilter/netinet Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Content-Type: multipart/signed; boundary="Apple-Mail=_C35EA56D-30CD-4B12-9F41-DA377D5A81C6"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.5.1 From: Dimitry Andric In-Reply-To: <20150919065128.GA74689@FreeBSD.org> Date: Sun, 20 Sep 2015 22:10:49 +0200 Cc: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Message-Id: <86D28DF2-EF87-4D65-A1C7-849D4395463A@FreeBSD.org> References: <201509190358.t8J3wW6Y067793@repo.freebsd.org> <20150919065128.GA74689@FreeBSD.org> To: Alexey Dokuchaev X-Mailer: Apple Mail (2.2104) X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Sep 2015 20:11:09 -0000 --Apple-Mail=_C35EA56D-30CD-4B12-9F41-DA377D5A81C6 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 19 Sep 2015, at 08:51, Alexey Dokuchaev wrote: > > On Sat, Sep 19, 2015 at 03:58:32AM +0000, Cy Schubert wrote: ... botched commit message ... > > Every time I see this happen I wonder shall we forbid to execute "svn ci" > other than with -F or -m ? Can the difference between -F/-m and a "live edited" message be detected from the server? -Dimitry --Apple-Mail=_C35EA56D-30CD-4B12-9F41-DA377D5A81C6 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.28 iEYEARECAAYFAlX/EtAACgkQsF6jCi4glqMexACgg+TkcfBriWDlu6lG8zcWFnEs piwAnRwtR9HNlJ8jKjRzwiDlUbiublv4 =ZavX -----END PGP SIGNATURE----- --Apple-Mail=_C35EA56D-30CD-4B12-9F41-DA377D5A81C6-- From owner-svn-src-stable-10@freebsd.org Sun Sep 20 22:27:20 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2CBAEA06319; Sun, 20 Sep 2015 22:27:20 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org (repo.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 1D54F18E8; Sun, 20 Sep 2015 22:27:20 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8KMRJi7039260; Sun, 20 Sep 2015 22:27:19 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8KMRJF4039259; Sun, 20 Sep 2015 22:27:19 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201509202227.t8KMRJF4039259@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Sun, 20 Sep 2015 22:27:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288048 - stable/10/usr.sbin/inetd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Sep 2015 22:27:20 -0000 Author: hrs Date: Sun Sep 20 22:27:19 2015 New Revision: 288048 URL: https://svnweb.freebsd.org/changeset/base/288048 Log: MFC 281734-281736,287997-287998: - Fix a crash on a rpc entry when an IPv6 address is explicitly specified in -a flag. - Fix a bug that sockaddr_in was used where sockaddr_in6 should have been used. This was not actually harmful because offsetof(struct sockaddr_in, sin_port) is equal to offsetof(struct sockaddr_in6, sin6_port). - Remove unused union p_un. - Use NI_MAXHOST-long buffer for getnameinfo(). Although INET6_ADDRSTRLEN was designed to hold the longest IPv6 address in IPv4-mapped address format a long time ago, getnameinfo() can return scope identifier in addition to it. Modified: stable/10/usr.sbin/inetd/inetd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/inetd/inetd.c ============================================================================== --- stable/10/usr.sbin/inetd/inetd.c Sun Sep 20 21:39:55 2015 (r288047) +++ stable/10/usr.sbin/inetd/inetd.c Sun Sep 20 22:27:19 2015 (r288048) @@ -327,16 +327,7 @@ main(int argc, char **argv) struct request_info req; int denied; char *service = NULL; - union { - struct sockaddr peer_un; - struct sockaddr_in peer_un4; - struct sockaddr_in6 peer_un6; - struct sockaddr_storage peer_max; - } p_un; -#define peer p_un.peer_un -#define peer4 p_un.peer_un4 -#define peer6 p_un.peer_un6 -#define peermax p_un.peer_max + struct sockaddr_storage peer; int i; struct addrinfo hints, *res; const char *servname; @@ -656,24 +647,24 @@ main(int argc, char **argv) } else ctrl = sep->se_fd; if (dolog && !ISWRAP(sep)) { - char pname[INET6_ADDRSTRLEN] = "unknown"; + char pname[NI_MAXHOST] = "unknown"; socklen_t sl; - sl = sizeof peermax; + sl = sizeof(peer); if (getpeername(ctrl, (struct sockaddr *) - &peermax, &sl)) { - sl = sizeof peermax; + &peer, &sl)) { + sl = sizeof(peer); if (recvfrom(ctrl, buf, sizeof(buf), MSG_PEEK, - (struct sockaddr *)&peermax, + (struct sockaddr *)&peer, &sl) >= 0) { - getnameinfo((struct sockaddr *)&peermax, - peer.sa_len, + getnameinfo((struct sockaddr *)&peer, + peer.ss_len, pname, sizeof(pname), NULL, 0, NI_NUMERICHOST); } } else { - getnameinfo((struct sockaddr *)&peermax, - peer.sa_len, + getnameinfo((struct sockaddr *)&peer, + peer.ss_len, pname, sizeof(pname), NULL, 0, NI_NUMERICHOST); } @@ -1761,9 +1752,7 @@ more: strlen(sep->se_proto) + 1 - 4); sep->se_rpc = 1; sep->se_rpc_prog = sep->se_rpc_lowvers = - sep->se_rpc_lowvers = 0; - memcpy(&sep->se_ctrladdr4, bind_sa4, - sizeof(sep->se_ctrladdr4)); + sep->se_rpc_highvers = 0; if ((versp = strrchr(sep->se_service, '/'))) { *versp++ = '\0'; switch (sscanf(versp, "%u-%u", @@ -2108,7 +2097,7 @@ inetd_setproctitle(const char *a, int s) { socklen_t size; struct sockaddr_storage ss; - char buf[80], pbuf[INET6_ADDRSTRLEN]; + char buf[80], pbuf[NI_MAXHOST]; size = sizeof(ss); if (getpeername(s, (struct sockaddr *)&ss, &size) == 0) { @@ -2124,7 +2113,7 @@ int check_loop(const struct sockaddr *sa, const struct servtab *sep) { struct servtab *se2; - char pname[INET6_ADDRSTRLEN]; + char pname[NI_MAXHOST]; for (se2 = servtab; se2; se2 = se2->se_next) { if (!se2->se_bi || se2->se_socktype != SOCK_DGRAM) @@ -2138,8 +2127,8 @@ check_loop(const struct sockaddr *sa, co continue; #ifdef INET6 case AF_INET6: - if (((const struct sockaddr_in *)sa)->sin_port == - se2->se_ctrladdr4.sin_port) + if (((const struct sockaddr_in6 *)sa)->sin6_port == + se2->se_ctrladdr6.sin6_port) goto isloop; continue; #endif @@ -2338,7 +2327,7 @@ cpmip(const struct servtab *sep, int ctr } } if ((cnt * 60) / (CHTSIZE * CHTGRAN) > sep->se_maxcpm) { - char pname[INET6_ADDRSTRLEN]; + char pname[NI_MAXHOST]; getnameinfo((struct sockaddr *)&rss, ((struct sockaddr *)&rss)->sa_len, From owner-svn-src-stable-10@freebsd.org Mon Sep 21 03:03:58 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A3C3A06804; Mon, 21 Sep 2015 03:03:58 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org (repo.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 2AE2F1C57; Mon, 21 Sep 2015 03:03:58 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8L33wqE054239; Mon, 21 Sep 2015 03:03:58 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8L33wCA054238; Mon, 21 Sep 2015 03:03:58 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201509210303.t8L33wCA054238@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Mon, 21 Sep 2015 03:03:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288055 - stable/10/sbin/ifconfig X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Sep 2015 03:03:58 -0000 Author: hrs Date: Mon Sep 21 03:03:57 2015 New Revision: 288055 URL: https://svnweb.freebsd.org/changeset/base/288055 Log: Re-add deprecated options as no-op to prevent breakage of backward compatibility. Spotted by: ume Modified: stable/10/sbin/ifconfig/ifgif.c Modified: stable/10/sbin/ifconfig/ifgif.c ============================================================================== --- stable/10/sbin/ifconfig/ifgif.c Mon Sep 21 02:33:11 2015 (r288054) +++ stable/10/sbin/ifconfig/ifgif.c Mon Sep 21 03:03:57 2015 (r288055) @@ -74,6 +74,8 @@ setgifopts(const char *val, int d, int s { int opts; + if (d == 0) + return; ifr.ifr_data = (caddr_t)&opts; if (ioctl(s, GIFGOPTS, &ifr) == -1) { warn("ioctl(GIFGOPTS)"); @@ -92,8 +94,12 @@ setgifopts(const char *val, int d, int s } static struct cmd gif_cmds[] = { + DEF_CMD("accept_rev_ethip_ver", 0, setgifopts), + DEF_CMD("-accept_rev_ethip_ver",0, setgifopts), DEF_CMD("ignore_source", GIF_IGNORE_SOURCE, setgifopts), DEF_CMD("-ignore_source", -GIF_IGNORE_SOURCE, setgifopts), + DEF_CMD("send_rev_ethip_ver", 0, setgifopts), + DEF_CMD("-send_rev_ethip_ver", 0, setgifopts), }; static struct afswtch af_gif = { From owner-svn-src-stable-10@freebsd.org Mon Sep 21 18:32:44 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4038A057E5; Mon, 21 Sep 2015 18:32:44 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org (repo.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 C48821922; Mon, 21 Sep 2015 18:32:44 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8LIWieX060822; Mon, 21 Sep 2015 18:32:44 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8LIWiSA060821; Mon, 21 Sep 2015 18:32:44 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201509211832.t8LIWiSA060821@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Mon, 21 Sep 2015 18:32:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288072 - stable/10/sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Sep 2015 18:32:44 -0000 Author: hrs Date: Mon Sep 21 18:32:43 2015 New Revision: 288072 URL: https://svnweb.freebsd.org/changeset/base/288072 Log: Fix a panic in SIOCSLAGG and SIOCGLAGGOPTS. This was caused by a wrongly-MFC'd patch in r287723. Pointy hat to: hrs Modified: stable/10/sys/net/if_lagg.c Modified: stable/10/sys/net/if_lagg.c ============================================================================== --- stable/10/sys/net/if_lagg.c Mon Sep 21 17:31:11 2015 (r288071) +++ stable/10/sys/net/if_lagg.c Mon Sep 21 18:32:43 2015 (r288072) @@ -1063,7 +1063,8 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd sc->sc_detach(sc); else LAGG_WUNLOCK(sc); - } + } else + LAGG_WUNLOCK(sc); proto->ti_attach(sc); LAGG_WLOCK(sc); sc->sc_proto = proto->ti_proto; @@ -1187,9 +1188,6 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd break; } } - proto->ti_attach(sc); - LAGG_WLOCK(sc); - sc->sc_proto = proto->ti_proto; LAGG_WUNLOCK(sc); break; case SIOCGLAGGFLAGS: From owner-svn-src-stable-10@freebsd.org Tue Sep 22 00:43:07 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B619CA05BBC; Tue, 22 Sep 2015 00:43:07 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.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 9A3F510CE; Tue, 22 Sep 2015 00:43:07 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8M0h7BC034828; Tue, 22 Sep 2015 00:43:07 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8M0h6jQ034824; Tue, 22 Sep 2015 00:43:06 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201509220043.t8M0h6jQ034824@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Tue, 22 Sep 2015 00:43:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288079 - in stable/10/sys: kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2015 00:43:07 -0000 Author: mckusick Date: Tue Sep 22 00:43:05 2015 New Revision: 288079 URL: https://svnweb.freebsd.org/changeset/base/288079 Log: MFC of 281677: More accurately collect name-cache statistics in sysctl functions sysctl_debug_hashstat_nchash() and sysctl_debug_hashstat_rawnchash(). These changes are in preparation for allowing changes in the size of the vnode hash tables driven by increases and decreases in the maximum number of vnodes in the system. Reviewed by: kib@ Phabric: D2265 MFC of 287497: Track changes to kern.maxvnodes and appropriately increase or decrease the size of the name cache hash table (mapping file names to vnodes) and the vnode hash table (mapping mount point and inode number to vnode). An appropriate locking strategy is the key to changing hash table sizes while they are in active use. Reviewed by: kib Tested by: Peter Holm Differential Revision: https://reviews.freebsd.org/D2265 Modified: stable/10/sys/kern/vfs_cache.c stable/10/sys/kern/vfs_hash.c stable/10/sys/kern/vfs_subr.c stable/10/sys/sys/vnode.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/vfs_cache.c ============================================================================== --- stable/10/sys/kern/vfs_cache.c Mon Sep 21 22:34:16 2015 (r288078) +++ stable/10/sys/kern/vfs_cache.c Tue Sep 22 00:43:05 2015 (r288079) @@ -330,23 +330,27 @@ sysctl_debug_hashstat_rawnchash(SYSCTL_H int n_nchash; int count; +retry: n_nchash = nchash + 1; /* nchash is max index, not count */ if (!req->oldptr) return SYSCTL_OUT(req, 0, n_nchash * sizeof(int)); - - /* Scan hash tables for applicable entries */ - for (ncpp = nchashtbl; n_nchash > 0; n_nchash--, ncpp++) { - CACHE_RLOCK(); - count = 0; - LIST_FOREACH(ncp, ncpp, nc_hash) { - count++; - } + cntbuf = malloc(n_nchash * sizeof(int), M_TEMP, M_ZERO | M_WAITOK); + CACHE_RLOCK(); + if (n_nchash != nchash + 1) { CACHE_RUNLOCK(); - error = SYSCTL_OUT(req, &count, sizeof(count)); - if (error) - return (error); + free(cntbuf, M_TEMP); + goto retry; } - return (0); + /* Scan hash tables counting entries */ + for (ncpp = nchashtbl, i = 0; i < n_nchash; ncpp++, i++) + LIST_FOREACH(ncp, ncpp, nc_hash) + cntbuf[i]++; + CACHE_RUNLOCK(); + for (error = 0, i = 0; i < n_nchash; i++) + if ((error = SYSCTL_OUT(req, &cntbuf[i], sizeof(int))) != 0) + break; + free(cntbuf, M_TEMP); + return (error); } SYSCTL_PROC(_debug_hashstat, OID_AUTO, rawnchash, CTLTYPE_INT|CTLFLAG_RD| CTLFLAG_MPSAFE, 0, 0, sysctl_debug_hashstat_rawnchash, "S,int", @@ -935,6 +939,44 @@ nchinit(void *dummy __unused) } SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_SECOND, nchinit, NULL); +void +cache_changesize(int newmaxvnodes) +{ + struct nchashhead *new_nchashtbl, *old_nchashtbl; + u_long new_nchash, old_nchash; + struct namecache *ncp; + uint32_t hash; + int i; + + new_nchashtbl = hashinit(newmaxvnodes * 2, M_VFSCACHE, &new_nchash); + /* If same hash table size, nothing to do */ + if (nchash == new_nchash) { + free(new_nchashtbl, M_VFSCACHE); + return; + } + /* + * Move everything from the old hash table to the new table. + * None of the namecache entries in the table can be removed + * because to do so, they have to be removed from the hash table. + */ + CACHE_WLOCK(); + old_nchashtbl = nchashtbl; + old_nchash = nchash; + nchashtbl = new_nchashtbl; + nchash = new_nchash; + for (i = 0; i <= old_nchash; i++) { + while ((ncp = LIST_FIRST(&old_nchashtbl[i])) != NULL) { + hash = fnv_32_buf(nc_get_name(ncp), ncp->nc_nlen, + FNV1_32_INIT); + hash = fnv_32_buf(&ncp->nc_dvp, sizeof(ncp->nc_dvp), + hash); + LIST_REMOVE(ncp, nc_hash); + LIST_INSERT_HEAD(NCHHASH(hash), ncp, nc_hash); + } + } + CACHE_WUNLOCK(); + free(old_nchashtbl, M_VFSCACHE); +} /* * Invalidate all entries to a particular vnode. Modified: stable/10/sys/kern/vfs_hash.c ============================================================================== --- stable/10/sys/kern/vfs_hash.c Mon Sep 21 22:34:16 2015 (r288078) +++ stable/10/sys/kern/vfs_hash.c Tue Sep 22 00:43:05 2015 (r288079) @@ -160,3 +160,40 @@ vfs_hash_rehash(struct vnode *vp, u_int vp->v_hash = hash; mtx_unlock(&vfs_hash_mtx); } + +void +vfs_hash_changesize(int newmaxvnodes) +{ + struct vfs_hash_head *vfs_hash_newtbl, *vfs_hash_oldtbl; + u_long vfs_hash_newmask, vfs_hash_oldmask; + struct vnode *vp; + int i; + + vfs_hash_newtbl = hashinit(newmaxvnodes, M_VFS_HASH, + &vfs_hash_newmask); + /* If same hash table size, nothing to do */ + if (vfs_hash_mask == vfs_hash_newmask) { + free(vfs_hash_newtbl, M_VFS_HASH); + return; + } + /* + * Move everything from the old hash table to the new table. + * None of the vnodes in the table can be recycled because to + * do so, they have to be removed from the hash table. + */ + rw_wlock(&vfs_hash_lock); + vfs_hash_oldtbl = vfs_hash_tbl; + vfs_hash_oldmask = vfs_hash_mask; + vfs_hash_tbl = vfs_hash_newtbl; + vfs_hash_mask = vfs_hash_newmask; + for (i = 0; i <= vfs_hash_oldmask; i++) { + while ((vp = LIST_FIRST(&vfs_hash_oldtbl[i])) != NULL) { + LIST_REMOVE(vp, v_hashlist); + LIST_INSERT_HEAD( + vfs_hash_bucket(vp->v_mount, vp->v_hash), + vp, v_hashlist); + } + } + rw_wunlock(&vfs_hash_lock); + free(vfs_hash_oldtbl, M_VFS_HASH); +} Modified: stable/10/sys/kern/vfs_subr.c ============================================================================== --- stable/10/sys/kern/vfs_subr.c Mon Sep 21 22:34:16 2015 (r288078) +++ stable/10/sys/kern/vfs_subr.c Tue Sep 22 00:43:05 2015 (r288079) @@ -280,8 +280,25 @@ static enum { SYNCER_RUNNING, SYNCER_SHU * XXX desiredvnodes is historical cruft and should not exist. */ int desiredvnodes; -SYSCTL_INT(_kern, KERN_MAXVNODES, maxvnodes, CTLFLAG_RW, - &desiredvnodes, 0, "Maximum number of vnodes"); + +static int +sysctl_update_desiredvnodes(SYSCTL_HANDLER_ARGS) +{ + int error, old_desiredvnodes; + + old_desiredvnodes = desiredvnodes; + if ((error = sysctl_handle_int(oidp, arg1, arg2, req)) != 0) + return (error); + if (old_desiredvnodes != desiredvnodes) { + vfs_hash_changesize(desiredvnodes); + cache_changesize(desiredvnodes); + } + return (0); +} + +SYSCTL_PROC(_kern, KERN_MAXVNODES, maxvnodes, + CTLTYPE_INT | CTLFLAG_MPSAFE | CTLFLAG_RW, &desiredvnodes, 0, + sysctl_update_desiredvnodes, "I", "Maximum number of vnodes"); SYSCTL_ULONG(_kern, OID_AUTO, minvnodes, CTLFLAG_RW, &wantfreevnodes, 0, "Minimum number of vnodes (legacy)"); static int vnlru_nowhere; Modified: stable/10/sys/sys/vnode.h ============================================================================== --- stable/10/sys/sys/vnode.h Mon Sep 21 22:34:16 2015 (r288078) +++ stable/10/sys/sys/vnode.h Tue Sep 22 00:43:05 2015 (r288079) @@ -600,6 +600,7 @@ struct vnode; typedef int (*vn_get_ino_t)(struct mount *, void *, int, struct vnode **); /* cache_* may belong in namei.h. */ +void cache_changesize(int newhashsize); #define cache_enter(dvp, vp, cnp) \ cache_enter_time(dvp, vp, cnp, NULL, NULL) void cache_enter_time(struct vnode *dvp, struct vnode *vp, @@ -836,6 +837,7 @@ int fifo_printinfo(struct vnode *); /* vfs_hash.c */ typedef int vfs_hash_cmp_t(struct vnode *vp, void *arg); +void vfs_hash_changesize(int newhashsize); int vfs_hash_get(const struct mount *mp, u_int hash, int flags, struct thread *td, struct vnode **vpp, vfs_hash_cmp_t *fn, void *arg); u_int vfs_hash_index(struct vnode *vp); int vfs_hash_insert(struct vnode *vp, u_int hash, int flags, struct thread *td, struct vnode **vpp, vfs_hash_cmp_t *fn, void *arg); From owner-svn-src-stable-10@freebsd.org Tue Sep 22 00:45:17 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17833A05CF5; Tue, 22 Sep 2015 00:45:17 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.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 08097127D; Tue, 22 Sep 2015 00:45:17 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8M0jGps035010; Tue, 22 Sep 2015 00:45:16 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8M0jGMT035009; Tue, 22 Sep 2015 00:45:16 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201509220045.t8M0jGMT035009@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 22 Sep 2015 00:45:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288080 - stable/10/cddl/lib/libdtrace X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2015 00:45:17 -0000 Author: markj Date: Tue Sep 22 00:45:16 2015 New Revision: 288080 URL: https://svnweb.freebsd.org/changeset/base/288080 Log: MFC r287807: Remove an unneeded typedef of ip6_t from the DTrace ip provider library. PR: 203092 Modified: stable/10/cddl/lib/libdtrace/ip.d Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/lib/libdtrace/ip.d ============================================================================== --- stable/10/cddl/lib/libdtrace/ip.d Tue Sep 22 00:43:05 2015 (r288079) +++ stable/10/cddl/lib/libdtrace/ip.d Tue Sep 22 00:45:16 2015 (r288080) @@ -109,7 +109,6 @@ typedef struct ipv4info { * These values are NULL if the packet is not IPv6. */ typedef struct in6_addr in6_addr_t; -typedef struct ip6_hdr ip6_t; typedef struct ipv6info { uint8_t ipv6_ver; /* IP version (6) */ uint8_t ipv6_tclass; /* traffic class */ @@ -122,7 +121,7 @@ typedef struct ipv6info { in6_addr_t *ipv6_dst; /* destination address */ string ipv6_saddr; /* source address, string */ string ipv6_daddr; /* destination address, string */ - ip6_t *ipv6_hdr; /* pointer to raw header */ + struct ip6_hdr *ipv6_hdr; /* pointer to raw header */ } ipv6info_t; #pragma D binding "1.0" IPPROTO_IP @@ -281,5 +280,5 @@ translator ipv6info_t < struct ip6_hdr * ipv6_dst = p == NULL ? 0 : (in6_addr_t *)&p->ip6_dst; ipv6_saddr = p == NULL ? 0 : inet_ntoa6(&p->ip6_src); ipv6_daddr = p == NULL ? 0 : inet_ntoa6(&p->ip6_dst); - ipv6_hdr = (ip6_t *)p; + ipv6_hdr = p; }; From owner-svn-src-stable-10@freebsd.org Tue Sep 22 06:50:19 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41D5EA03C39 for ; Tue, 22 Sep 2015 06:50:19 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CEF7A1054 for ; Tue, 22 Sep 2015 06:50:18 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by wicge5 with SMTP id ge5so146328055wic.0 for ; Mon, 21 Sep 2015 23:50:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=cRgUPMzOX17iScqLH8c5pTpAcppIcvF650ktAibhxvk=; b=dfKP154f9eTe29t+VnqH7bEjlT65inoyaUYQKPWoAyfDbiTQEcK3x7FcsRKOHLR3as oQrjueRmgLZj41LeT515QVaF8slbUeaqDO6rXZoUnyWwSk3ZH3TRssLe3Vy547h/hom7 QFsGXeGzsb3ITlyF3kXOZu8Z0sw0CtWLTX8/5wNXpDnMMseQ/Fg/5JkavK00NCisuyj1 xV6M7tziwsCirxPuiEwpT3gij7lCpoPskpCxgFeCAm3oUjkdSB41vxPBBK9gNhJ0A08u bqPoXO65TqL+H2BH/eupfbbIPunloXRzTfgKalsHG/N0oRMiHJ9bYaHZeqcLMpyMgopK m8gw== X-Gm-Message-State: ALoCoQm3kcu/LLxkLha5hswoH6qArgUyK3wwOGLnOGXZmmVchqFZjVSfYz32tmFY28HaBSCwDTI9 MIME-Version: 1.0 X-Received: by 10.180.86.100 with SMTP id o4mr17104521wiz.59.1442904610699; Mon, 21 Sep 2015 23:50:10 -0700 (PDT) Received: by 10.194.240.226 with HTTP; Mon, 21 Sep 2015 23:50:10 -0700 (PDT) In-Reply-To: <201509220043.t8M0h6jQ034824@repo.freebsd.org> References: <201509220043.t8M0h6jQ034824@repo.freebsd.org> Date: Tue, 22 Sep 2015 08:50:10 +0200 Message-ID: Subject: Re: svn commit: r288079 - in stable/10/sys: kern sys From: Oliver Pinter To: Kirk McKusick Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2015 06:50:19 -0000 On 9/22/15, Kirk McKusick wrote: > Author: mckusick > Date: Tue Sep 22 00:43:05 2015 > New Revision: 288079 > URL: https://svnweb.freebsd.org/changeset/base/288079 > > Log: > MFC of 281677: > > More accurately collect name-cache statistics in sysctl functions > sysctl_debug_hashstat_nchash() and sysctl_debug_hashstat_rawnchash(). > These changes are in preparation for allowing changes in the size > of the vnode hash tables driven by increases and decreases in the > maximum number of vnodes in the system. > > Reviewed by: kib@ > Phabric: D2265 > > MFC of 287497: > > Track changes to kern.maxvnodes and appropriately increase or decrease > the size of the name cache hash table (mapping file names to vnodes) > and the vnode hash table (mapping mount point and inode number to vnode). > An appropriate locking strategy is the key to changing hash table sizes > while they are in active use. > > Reviewed by: kib > Tested by: Peter Holm > Differential Revision: https://reviews.freebsd.org/D2265 > > Modified: > stable/10/sys/kern/vfs_cache.c > stable/10/sys/kern/vfs_hash.c > stable/10/sys/kern/vfs_subr.c > stable/10/sys/sys/vnode.h > Directory Properties: > stable/10/ (props changed) > > Modified: stable/10/sys/kern/vfs_cache.c > ============================================================================== > --- stable/10/sys/kern/vfs_cache.c Mon Sep 21 22:34:16 2015 (r288078) > +++ stable/10/sys/kern/vfs_cache.c Tue Sep 22 00:43:05 2015 (r288079) > @@ -330,23 +330,27 @@ sysctl_debug_hashstat_rawnchash(SYSCTL_H > int n_nchash; > int count; > > +retry: > n_nchash = nchash + 1; /* nchash is max index, not count */ > if (!req->oldptr) > return SYSCTL_OUT(req, 0, n_nchash * sizeof(int)); > - > - /* Scan hash tables for applicable entries */ > - for (ncpp = nchashtbl; n_nchash > 0; n_nchash--, ncpp++) { > - CACHE_RLOCK(); > - count = 0; > - LIST_FOREACH(ncp, ncpp, nc_hash) { > - count++; > - } > + cntbuf = malloc(n_nchash * sizeof(int), M_TEMP, M_ZERO | M_WAITOK); > + CACHE_RLOCK(); > + if (n_nchash != nchash + 1) { > CACHE_RUNLOCK(); > - error = SYSCTL_OUT(req, &count, sizeof(count)); > - if (error) > - return (error); > + free(cntbuf, M_TEMP); > + goto retry; > } > - return (0); > + /* Scan hash tables counting entries */ > + for (ncpp = nchashtbl, i = 0; i < n_nchash; ncpp++, i++) > + LIST_FOREACH(ncp, ncpp, nc_hash) > + cntbuf[i]++; > + CACHE_RUNLOCK(); > + for (error = 0, i = 0; i < n_nchash; i++) > + if ((error = SYSCTL_OUT(req, &cntbuf[i], sizeof(int))) != 0) > + break; > + free(cntbuf, M_TEMP); > + return (error); > } > SYSCTL_PROC(_debug_hashstat, OID_AUTO, rawnchash, CTLTYPE_INT|CTLFLAG_RD| > CTLFLAG_MPSAFE, 0, 0, sysctl_debug_hashstat_rawnchash, "S,int", > @@ -935,6 +939,44 @@ nchinit(void *dummy __unused) > } > SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_SECOND, nchinit, NULL); > > +void > +cache_changesize(int newmaxvnodes) > +{ > + struct nchashhead *new_nchashtbl, *old_nchashtbl; > + u_long new_nchash, old_nchash; > + struct namecache *ncp; > + uint32_t hash; > + int i; > + > + new_nchashtbl = hashinit(newmaxvnodes * 2, M_VFSCACHE, &new_nchash); > + /* If same hash table size, nothing to do */ > + if (nchash == new_nchash) { > + free(new_nchashtbl, M_VFSCACHE); > + return; > + } > + /* > + * Move everything from the old hash table to the new table. > + * None of the namecache entries in the table can be removed > + * because to do so, they have to be removed from the hash table. > + */ > + CACHE_WLOCK(); > + old_nchashtbl = nchashtbl; > + old_nchash = nchash; > + nchashtbl = new_nchashtbl; > + nchash = new_nchash; > + for (i = 0; i <= old_nchash; i++) { > + while ((ncp = LIST_FIRST(&old_nchashtbl[i])) != NULL) { > + hash = fnv_32_buf(nc_get_name(ncp), ncp->nc_nlen, > + FNV1_32_INIT); > + hash = fnv_32_buf(&ncp->nc_dvp, sizeof(ncp->nc_dvp), > + hash); > + LIST_REMOVE(ncp, nc_hash); > + LIST_INSERT_HEAD(NCHHASH(hash), ncp, nc_hash); > + } > + } > + CACHE_WUNLOCK(); > + free(old_nchashtbl, M_VFSCACHE); > +} > > /* > * Invalidate all entries to a particular vnode. > > Modified: stable/10/sys/kern/vfs_hash.c > ============================================================================== > --- stable/10/sys/kern/vfs_hash.c Mon Sep 21 22:34:16 2015 (r288078) > +++ stable/10/sys/kern/vfs_hash.c Tue Sep 22 00:43:05 2015 (r288079) > @@ -160,3 +160,40 @@ vfs_hash_rehash(struct vnode *vp, u_int > vp->v_hash = hash; > mtx_unlock(&vfs_hash_mtx); > } > + > +void > +vfs_hash_changesize(int newmaxvnodes) > +{ > + struct vfs_hash_head *vfs_hash_newtbl, *vfs_hash_oldtbl; > + u_long vfs_hash_newmask, vfs_hash_oldmask; > + struct vnode *vp; > + int i; > + > + vfs_hash_newtbl = hashinit(newmaxvnodes, M_VFS_HASH, > + &vfs_hash_newmask); > + /* If same hash table size, nothing to do */ > + if (vfs_hash_mask == vfs_hash_newmask) { > + free(vfs_hash_newtbl, M_VFS_HASH); > + return; > + } > + /* > + * Move everything from the old hash table to the new table. > + * None of the vnodes in the table can be recycled because to > + * do so, they have to be removed from the hash table. > + */ > + rw_wlock(&vfs_hash_lock); > + vfs_hash_oldtbl = vfs_hash_tbl; > + vfs_hash_oldmask = vfs_hash_mask; > + vfs_hash_tbl = vfs_hash_newtbl; > + vfs_hash_mask = vfs_hash_newmask; > + for (i = 0; i <= vfs_hash_oldmask; i++) { > + while ((vp = LIST_FIRST(&vfs_hash_oldtbl[i])) != NULL) { > + LIST_REMOVE(vp, v_hashlist); > + LIST_INSERT_HEAD( > + vfs_hash_bucket(vp->v_mount, vp->v_hash), > + vp, v_hashlist); > + } > + } > + rw_wunlock(&vfs_hash_lock); > + free(vfs_hash_oldtbl, M_VFS_HASH); > +} > > Modified: stable/10/sys/kern/vfs_subr.c > ============================================================================== > --- stable/10/sys/kern/vfs_subr.c Mon Sep 21 22:34:16 2015 (r288078) > +++ stable/10/sys/kern/vfs_subr.c Tue Sep 22 00:43:05 2015 (r288079) > @@ -280,8 +280,25 @@ static enum { SYNCER_RUNNING, SYNCER_SHU > * XXX desiredvnodes is historical cruft and should not exist. > */ > int desiredvnodes; > -SYSCTL_INT(_kern, KERN_MAXVNODES, maxvnodes, CTLFLAG_RW, > - &desiredvnodes, 0, "Maximum number of vnodes"); > + > +static int > +sysctl_update_desiredvnodes(SYSCTL_HANDLER_ARGS) > +{ > + int error, old_desiredvnodes; > + > + old_desiredvnodes = desiredvnodes; > + if ((error = sysctl_handle_int(oidp, arg1, arg2, req)) != 0) > + return (error); > + if (old_desiredvnodes != desiredvnodes) { > + vfs_hash_changesize(desiredvnodes); > + cache_changesize(desiredvnodes); > + } > + return (0); > +} > + > +SYSCTL_PROC(_kern, KERN_MAXVNODES, maxvnodes, > + CTLTYPE_INT | CTLFLAG_MPSAFE | CTLFLAG_RW, &desiredvnodes, 0, > + sysctl_update_desiredvnodes, "I", "Maximum number of vnodes"); > SYSCTL_ULONG(_kern, OID_AUTO, minvnodes, CTLFLAG_RW, > &wantfreevnodes, 0, "Minimum number of vnodes (legacy)"); > static int vnlru_nowhere; > > Modified: stable/10/sys/sys/vnode.h > ============================================================================== > --- stable/10/sys/sys/vnode.h Mon Sep 21 22:34:16 2015 (r288078) > +++ stable/10/sys/sys/vnode.h Tue Sep 22 00:43:05 2015 (r288079) > @@ -600,6 +600,7 @@ struct vnode; > typedef int (*vn_get_ino_t)(struct mount *, void *, int, struct vnode **); > > /* cache_* may belong in namei.h. */ > +void cache_changesize(int newhashsize); > #define cache_enter(dvp, vp, cnp) \ > cache_enter_time(dvp, vp, cnp, NULL, NULL) > void cache_enter_time(struct vnode *dvp, struct vnode *vp, > @@ -836,6 +837,7 @@ int fifo_printinfo(struct vnode *); > /* vfs_hash.c */ > typedef int vfs_hash_cmp_t(struct vnode *vp, void *arg); > > +void vfs_hash_changesize(int newhashsize); > int vfs_hash_get(const struct mount *mp, u_int hash, int flags, struct > thread *td, struct vnode **vpp, vfs_hash_cmp_t *fn, void *arg); > u_int vfs_hash_index(struct vnode *vp); > int vfs_hash_insert(struct vnode *vp, u_int hash, int flags, struct thread > *td, struct vnode **vpp, vfs_hash_cmp_t *fn, void *arg); Seems like this commit breaks the build: --- vfs_hash.o --- /jenkins/workspace/HardenedBSD-10-STABLE-amd64/sys/kern/vfs_hash.c:184:2: error: implicit declaration of function 'rw_wlock' is invalid in C99 [-Werror,-Wimplicit-function-declaration] rw_wlock(&vfs_hash_lock); ^ /jenkins/workspace/HardenedBSD-10-STABLE-amd64/sys/kern/vfs_hash.c:184:12: error: use of undeclared identifier 'vfs_hash_lock'; did you mean 'vfs_hash_mask'? rw_wlock(&vfs_hash_lock); ^~~~~~~~~~~~~ vfs_hash_mask /jenkins/workspace/HardenedBSD-10-STABLE-amd64/sys/kern/vfs_hash.c:42:18: note: 'vfs_hash_mask' declared here static u_long vfs_hash_mask; ^ /jenkins/workspace/HardenedBSD-10-STABLE-amd64/sys/kern/vfs_hash.c:197:2: error: implicit declaration of function 'rw_wunlock' is invalid in C99 [-Werror,-Wimplicit-function-declaration] rw_wunlock(&vfs_hash_lock); ^ /jenkins/workspace/HardenedBSD-10-STABLE-amd64/sys/kern/vfs_hash.c:197:2: note: did you mean 'rw_wlock'? /jenkins/workspace/HardenedBSD-10-STABLE-amd64/sys/kern/vfs_hash.c:184:2: note: 'rw_wlock' declared here rw_wlock(&vfs_hash_lock); ^ /jenkins/workspace/HardenedBSD-10-STABLE-amd64/sys/kern/vfs_hash.c:197:14: error: use of undeclared identifier 'vfs_hash_lock'; did you mean 'vfs_hash_mask'? rw_wunlock(&vfs_hash_lock); ^~~~~~~~~~~~~ vfs_hash_mask /jenkins/workspace/HardenedBSD-10-STABLE-amd64/sys/kern/vfs_hash.c:42:18: note: 'vfs_hash_mask' declared here static u_long vfs_hash_mask; ^ 4 errors generated. *** [vfs_hash.o] Error code 1 make[2]: stopped in /usr/obj/jenkins/workspace/HardenedBSD-10-STABLE-amd64/sys/HARDENEDBSD --- vfs_export.o --- ctfconvert -L VERSION -g vfs_export.o http://jenkins.hardenedbsd.org:8180/jenkins/job/HardenedBSD-10-STABLE-amd64/99/console > _______________________________________________ > svn-src-stable-10@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10 > To unsubscribe, send any mail to > "svn-src-stable-10-unsubscribe@freebsd.org" > From owner-svn-src-stable-10@freebsd.org Tue Sep 22 06:55:46 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE0C4A0500D for ; Tue, 22 Sep 2015 06:55:46 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 61DDE156B for ; Tue, 22 Sep 2015 06:55:46 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by wicfx3 with SMTP id fx3so177072549wic.1 for ; Mon, 21 Sep 2015 23:55:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=NfS4/r/3NINz6BLJTumV7agGnvBZ45A1QyrGOTpwBFM=; b=TzGiAsVQIE9NTOgBLfTJjr8yibLqkBqUuDFuKLfarpfBbMLSDvo4o25Ev55YcyiVKl rege3VJOucxsQhT33peXWfilGGmv5Ipw0QKGihBjtUQ9g7eWHUkOB1r6bejGEjTs23eh ueLvq9k+lVhvTirY+kbOucCKhf9WTsTZYZaLhpnO+72zXU+5en43ceqhnDeaSnDw1CfO Y7TqVPV7zdm3crfv+gdOKwgoAhEuSeJoeKzGbgh/Cy7fdVRGLf+mqzUCmhCe/8ZMPfkF dq/3jQCi2RUOfmR7AxZfBRv/a/yoG6ve63hrY6d0tZ7v9VZMMAiL3pqgMdhAy+jDcw/+ V0AQ== X-Gm-Message-State: ALoCoQk3qljXj8K/YbCbKJvpdsoximoHPvBWZ60o1UgFiimNdjTS9M6IfyYgURuMhbpJEJnZWKgp MIME-Version: 1.0 X-Received: by 10.180.9.112 with SMTP id y16mr18809516wia.28.1442904938769; Mon, 21 Sep 2015 23:55:38 -0700 (PDT) Received: by 10.194.240.226 with HTTP; Mon, 21 Sep 2015 23:55:38 -0700 (PDT) In-Reply-To: References: <201509220043.t8M0h6jQ034824@repo.freebsd.org> Date: Tue, 22 Sep 2015 08:55:38 +0200 Message-ID: Subject: Re: svn commit: r288079 - in stable/10/sys: kern sys From: Oliver Pinter To: Kirk McKusick Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2015 06:55:46 -0000 On 9/22/15, Oliver Pinter wrote: > On 9/22/15, Kirk McKusick wrote: >> Author: mckusick >> Date: Tue Sep 22 00:43:05 2015 >> New Revision: 288079 >> URL: https://svnweb.freebsd.org/changeset/base/288079 >> >> Log: >> MFC of 281677: >> >> More accurately collect name-cache statistics in sysctl functions >> sysctl_debug_hashstat_nchash() and sysctl_debug_hashstat_rawnchash(). >> These changes are in preparation for allowing changes in the size >> of the vnode hash tables driven by increases and decreases in the >> maximum number of vnodes in the system. >> >> Reviewed by: kib@ >> Phabric: D2265 >> >> MFC of 287497: >> >> Track changes to kern.maxvnodes and appropriately increase or decrease >> the size of the name cache hash table (mapping file names to vnodes) >> and the vnode hash table (mapping mount point and inode number to >> vnode). >> An appropriate locking strategy is the key to changing hash table sizes >> while they are in active use. >> >> Reviewed by: kib >> Tested by: Peter Holm >> Differential Revision: https://reviews.freebsd.org/D2265 >> >> Modified: >> stable/10/sys/kern/vfs_cache.c >> stable/10/sys/kern/vfs_hash.c >> stable/10/sys/kern/vfs_subr.c >> stable/10/sys/sys/vnode.h >> Directory Properties: >> stable/10/ (props changed) >> >> Modified: stable/10/sys/kern/vfs_cache.c >> ============================================================================== >> --- stable/10/sys/kern/vfs_cache.c Mon Sep 21 22:34:16 2015 (r288078) >> +++ stable/10/sys/kern/vfs_cache.c Tue Sep 22 00:43:05 2015 (r288079) >> @@ -330,23 +330,27 @@ sysctl_debug_hashstat_rawnchash(SYSCTL_H >> int n_nchash; >> int count; >> >> +retry: >> n_nchash = nchash + 1; /* nchash is max index, not count */ >> if (!req->oldptr) >> return SYSCTL_OUT(req, 0, n_nchash * sizeof(int)); >> - >> - /* Scan hash tables for applicable entries */ >> - for (ncpp = nchashtbl; n_nchash > 0; n_nchash--, ncpp++) { >> - CACHE_RLOCK(); >> - count = 0; >> - LIST_FOREACH(ncp, ncpp, nc_hash) { >> - count++; >> - } >> + cntbuf = malloc(n_nchash * sizeof(int), M_TEMP, M_ZERO | M_WAITOK); >> + CACHE_RLOCK(); >> + if (n_nchash != nchash + 1) { >> CACHE_RUNLOCK(); >> - error = SYSCTL_OUT(req, &count, sizeof(count)); >> - if (error) >> - return (error); >> + free(cntbuf, M_TEMP); >> + goto retry; >> } >> - return (0); >> + /* Scan hash tables counting entries */ >> + for (ncpp = nchashtbl, i = 0; i < n_nchash; ncpp++, i++) >> + LIST_FOREACH(ncp, ncpp, nc_hash) >> + cntbuf[i]++; >> + CACHE_RUNLOCK(); >> + for (error = 0, i = 0; i < n_nchash; i++) >> + if ((error = SYSCTL_OUT(req, &cntbuf[i], sizeof(int))) != 0) >> + break; >> + free(cntbuf, M_TEMP); >> + return (error); >> } >> SYSCTL_PROC(_debug_hashstat, OID_AUTO, rawnchash, >> CTLTYPE_INT|CTLFLAG_RD| >> CTLFLAG_MPSAFE, 0, 0, sysctl_debug_hashstat_rawnchash, "S,int", >> @@ -935,6 +939,44 @@ nchinit(void *dummy __unused) >> } >> SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_SECOND, nchinit, NULL); >> >> +void >> +cache_changesize(int newmaxvnodes) >> +{ >> + struct nchashhead *new_nchashtbl, *old_nchashtbl; >> + u_long new_nchash, old_nchash; >> + struct namecache *ncp; >> + uint32_t hash; >> + int i; >> + >> + new_nchashtbl = hashinit(newmaxvnodes * 2, M_VFSCACHE, &new_nchash); >> + /* If same hash table size, nothing to do */ >> + if (nchash == new_nchash) { >> + free(new_nchashtbl, M_VFSCACHE); >> + return; >> + } >> + /* >> + * Move everything from the old hash table to the new table. >> + * None of the namecache entries in the table can be removed >> + * because to do so, they have to be removed from the hash table. >> + */ >> + CACHE_WLOCK(); >> + old_nchashtbl = nchashtbl; >> + old_nchash = nchash; >> + nchashtbl = new_nchashtbl; >> + nchash = new_nchash; >> + for (i = 0; i <= old_nchash; i++) { >> + while ((ncp = LIST_FIRST(&old_nchashtbl[i])) != NULL) { >> + hash = fnv_32_buf(nc_get_name(ncp), ncp->nc_nlen, >> + FNV1_32_INIT); >> + hash = fnv_32_buf(&ncp->nc_dvp, sizeof(ncp->nc_dvp), >> + hash); >> + LIST_REMOVE(ncp, nc_hash); >> + LIST_INSERT_HEAD(NCHHASH(hash), ncp, nc_hash); >> + } >> + } >> + CACHE_WUNLOCK(); >> + free(old_nchashtbl, M_VFSCACHE); >> +} >> >> /* >> * Invalidate all entries to a particular vnode. >> >> Modified: stable/10/sys/kern/vfs_hash.c >> ============================================================================== >> --- stable/10/sys/kern/vfs_hash.c Mon Sep 21 22:34:16 2015 (r288078) >> +++ stable/10/sys/kern/vfs_hash.c Tue Sep 22 00:43:05 2015 (r288079) >> @@ -160,3 +160,40 @@ vfs_hash_rehash(struct vnode *vp, u_int >> vp->v_hash = hash; >> mtx_unlock(&vfs_hash_mtx); >> } >> + >> +void >> +vfs_hash_changesize(int newmaxvnodes) >> +{ >> + struct vfs_hash_head *vfs_hash_newtbl, *vfs_hash_oldtbl; >> + u_long vfs_hash_newmask, vfs_hash_oldmask; >> + struct vnode *vp; >> + int i; >> + >> + vfs_hash_newtbl = hashinit(newmaxvnodes, M_VFS_HASH, >> + &vfs_hash_newmask); >> + /* If same hash table size, nothing to do */ >> + if (vfs_hash_mask == vfs_hash_newmask) { >> + free(vfs_hash_newtbl, M_VFS_HASH); >> + return; >> + } >> + /* >> + * Move everything from the old hash table to the new table. >> + * None of the vnodes in the table can be recycled because to >> + * do so, they have to be removed from the hash table. >> + */ >> + rw_wlock(&vfs_hash_lock); >> + vfs_hash_oldtbl = vfs_hash_tbl; >> + vfs_hash_oldmask = vfs_hash_mask; >> + vfs_hash_tbl = vfs_hash_newtbl; >> + vfs_hash_mask = vfs_hash_newmask; >> + for (i = 0; i <= vfs_hash_oldmask; i++) { >> + while ((vp = LIST_FIRST(&vfs_hash_oldtbl[i])) != NULL) { >> + LIST_REMOVE(vp, v_hashlist); >> + LIST_INSERT_HEAD( >> + vfs_hash_bucket(vp->v_mount, vp->v_hash), >> + vp, v_hashlist); >> + } >> + } >> + rw_wunlock(&vfs_hash_lock); >> + free(vfs_hash_oldtbl, M_VFS_HASH); >> +} >> >> Modified: stable/10/sys/kern/vfs_subr.c >> ============================================================================== >> --- stable/10/sys/kern/vfs_subr.c Mon Sep 21 22:34:16 2015 (r288078) >> +++ stable/10/sys/kern/vfs_subr.c Tue Sep 22 00:43:05 2015 (r288079) >> @@ -280,8 +280,25 @@ static enum { SYNCER_RUNNING, SYNCER_SHU >> * XXX desiredvnodes is historical cruft and should not exist. >> */ >> int desiredvnodes; >> -SYSCTL_INT(_kern, KERN_MAXVNODES, maxvnodes, CTLFLAG_RW, >> - &desiredvnodes, 0, "Maximum number of vnodes"); >> + >> +static int >> +sysctl_update_desiredvnodes(SYSCTL_HANDLER_ARGS) >> +{ >> + int error, old_desiredvnodes; >> + >> + old_desiredvnodes = desiredvnodes; >> + if ((error = sysctl_handle_int(oidp, arg1, arg2, req)) != 0) >> + return (error); >> + if (old_desiredvnodes != desiredvnodes) { >> + vfs_hash_changesize(desiredvnodes); >> + cache_changesize(desiredvnodes); >> + } >> + return (0); >> +} >> + >> +SYSCTL_PROC(_kern, KERN_MAXVNODES, maxvnodes, >> + CTLTYPE_INT | CTLFLAG_MPSAFE | CTLFLAG_RW, &desiredvnodes, 0, >> + sysctl_update_desiredvnodes, "I", "Maximum number of vnodes"); >> SYSCTL_ULONG(_kern, OID_AUTO, minvnodes, CTLFLAG_RW, >> &wantfreevnodes, 0, "Minimum number of vnodes (legacy)"); >> static int vnlru_nowhere; >> >> Modified: stable/10/sys/sys/vnode.h >> ============================================================================== >> --- stable/10/sys/sys/vnode.h Mon Sep 21 22:34:16 2015 (r288078) >> +++ stable/10/sys/sys/vnode.h Tue Sep 22 00:43:05 2015 (r288079) >> @@ -600,6 +600,7 @@ struct vnode; >> typedef int (*vn_get_ino_t)(struct mount *, void *, int, struct vnode >> **); >> >> /* cache_* may belong in namei.h. */ >> +void cache_changesize(int newhashsize); >> #define cache_enter(dvp, vp, cnp) \ >> cache_enter_time(dvp, vp, cnp, NULL, NULL) >> void cache_enter_time(struct vnode *dvp, struct vnode *vp, >> @@ -836,6 +837,7 @@ int fifo_printinfo(struct vnode *); >> /* vfs_hash.c */ >> typedef int vfs_hash_cmp_t(struct vnode *vp, void *arg); >> >> +void vfs_hash_changesize(int newhashsize); >> int vfs_hash_get(const struct mount *mp, u_int hash, int flags, struct >> thread *td, struct vnode **vpp, vfs_hash_cmp_t *fn, void *arg); >> u_int vfs_hash_index(struct vnode *vp); >> int vfs_hash_insert(struct vnode *vp, u_int hash, int flags, struct >> thread >> *td, struct vnode **vpp, vfs_hash_cmp_t *fn, void *arg); > > Seems like this commit breaks the build: > > --- vfs_hash.o --- > /jenkins/workspace/HardenedBSD-10-STABLE-amd64/sys/kern/vfs_hash.c:184:2: > error: implicit declaration of function 'rw_wlock' is invalid in C99 > [-Werror,-Wimplicit-function-declaration] > rw_wlock(&vfs_hash_lock); > ^ > /jenkins/workspace/HardenedBSD-10-STABLE-amd64/sys/kern/vfs_hash.c:184:12: > error: use of undeclared identifier 'vfs_hash_lock'; did you mean > 'vfs_hash_mask'? > rw_wlock(&vfs_hash_lock); > ^~~~~~~~~~~~~ > vfs_hash_mask > /jenkins/workspace/HardenedBSD-10-STABLE-amd64/sys/kern/vfs_hash.c:42:18: > note: 'vfs_hash_mask' declared here > static u_long vfs_hash_mask; > ^ > /jenkins/workspace/HardenedBSD-10-STABLE-amd64/sys/kern/vfs_hash.c:197:2: > error: implicit declaration of function 'rw_wunlock' is invalid in C99 > [-Werror,-Wimplicit-function-declaration] > rw_wunlock(&vfs_hash_lock); > ^ > /jenkins/workspace/HardenedBSD-10-STABLE-amd64/sys/kern/vfs_hash.c:197:2: > note: did you mean 'rw_wlock'? > /jenkins/workspace/HardenedBSD-10-STABLE-amd64/sys/kern/vfs_hash.c:184:2: > note: 'rw_wlock' declared here > rw_wlock(&vfs_hash_lock); > ^ > /jenkins/workspace/HardenedBSD-10-STABLE-amd64/sys/kern/vfs_hash.c:197:14: > error: use of undeclared identifier 'vfs_hash_lock'; did you mean > 'vfs_hash_mask'? > rw_wunlock(&vfs_hash_lock); > ^~~~~~~~~~~~~ > vfs_hash_mask > /jenkins/workspace/HardenedBSD-10-STABLE-amd64/sys/kern/vfs_hash.c:42:18: > note: 'vfs_hash_mask' declared here > static u_long vfs_hash_mask; > ^ > 4 errors generated. > *** [vfs_hash.o] Error code 1 > > make[2]: stopped in > /usr/obj/jenkins/workspace/HardenedBSD-10-STABLE-amd64/sys/HARDENEDBSD > --- vfs_export.o --- > ctfconvert -L VERSION -g vfs_export.o > > http://jenkins.hardenedbsd.org:8180/jenkins/job/HardenedBSD-10-STABLE-amd64/99/console The following commit is missing from MFC: commit 09f7a46ec71137e29d82d2f0811a7f81b6142266 Author: mjg Date: Tue Dec 30 21:40:45 2014 +0000 Convert vfs hash lock from a mutex to an rwlock. > >> _______________________________________________ >> svn-src-stable-10@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10 >> To unsubscribe, send any mail to >> "svn-src-stable-10-unsubscribe@freebsd.org" >> > From owner-svn-src-stable-10@freebsd.org Tue Sep 22 09:57:36 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94A83A06FA4; Tue, 22 Sep 2015 09:57:36 +0000 (UTC) (envelope-from garga@FreeBSD.org) Received: from repo.freebsd.org (repo.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 8530B1106; Tue, 22 Sep 2015 09:57:36 +0000 (UTC) (envelope-from garga@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8M9vaNO059809; Tue, 22 Sep 2015 09:57:36 GMT (envelope-from garga@FreeBSD.org) Received: (from garga@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8M9vasB059806; Tue, 22 Sep 2015 09:57:36 GMT (envelope-from garga@FreeBSD.org) Message-Id: <201509220957.t8M9vasB059806@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: garga set sender to garga@FreeBSD.org using -f From: Renato Botelho Date: Tue, 22 Sep 2015 09:57:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288101 - in stable/10/sys/dev/usb: . serial X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2015 09:57:36 -0000 Author: garga (ports committer) Date: Tue Sep 22 09:57:35 2015 New Revision: 288101 URL: https://svnweb.freebsd.org/changeset/base/288101 Log: MFC r287828: Add support for Sierra MC7355 card Submitted by: Jeremy Porter Approved by: loos Obtained from: pfSense Sponsored by: Rubicon Communications (Netgate) Modified: stable/10/sys/dev/usb/serial/u3g.c stable/10/sys/dev/usb/usbdevs Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/10/sys/dev/usb/serial/u3g.c Tue Sep 22 09:50:11 2015 (r288100) +++ stable/10/sys/dev/usb/serial/u3g.c Tue Sep 22 09:57:35 2015 (r288101) @@ -522,6 +522,7 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(SIERRA, MC5727_2, 0), U3G_DEV(SIERRA, MC5728, 0), U3G_DEV(SIERRA, MC7354, 0), + U3G_DEV(SIERRA, MC7355, 0), U3G_DEV(SIERRA, MC8700, 0), U3G_DEV(SIERRA, MC8755, 0), U3G_DEV(SIERRA, MC8755_2, 0), Modified: stable/10/sys/dev/usb/usbdevs ============================================================================== --- stable/10/sys/dev/usb/usbdevs Tue Sep 22 09:50:11 2015 (r288100) +++ stable/10/sys/dev/usb/usbdevs Tue Sep 22 09:57:35 2015 (r288101) @@ -4010,6 +4010,7 @@ product SIERRA E6892 0x6892 E6892 product SIERRA E6893 0x6893 E6893 product SIERRA MC8700 0x68A3 MC8700 product SIERRA MC7354 0x68C0 MC7354 +product SIERRA MC7355 0x9041 MC7355 product SIERRA AC313U 0x68aa Sierra Wireless AirCard 313U product SIERRA TRUINSTALL 0x0fff Aircard Tru Installer From owner-svn-src-stable-10@freebsd.org Tue Sep 22 10:31:48 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7911A062D4; Tue, 22 Sep 2015 10:31:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.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 D837F139F; Tue, 22 Sep 2015 10:31:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8MAVmwV076380; Tue, 22 Sep 2015 10:31:48 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8MAVmVw076379; Tue, 22 Sep 2015 10:31:48 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201509221031.t8MAVmVw076379@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 22 Sep 2015 10:31:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288103 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2015 10:31:49 -0000 Author: kib Date: Tue Sep 22 10:31:48 2015 New Revision: 288103 URL: https://svnweb.freebsd.org/changeset/base/288103 Log: The stable/10 branch uses mutex for vfs_hash. Fix build. Submitted by: Jukka Ukkonen Modified: stable/10/sys/kern/vfs_hash.c Modified: stable/10/sys/kern/vfs_hash.c ============================================================================== --- stable/10/sys/kern/vfs_hash.c Tue Sep 22 10:00:32 2015 (r288102) +++ stable/10/sys/kern/vfs_hash.c Tue Sep 22 10:31:48 2015 (r288103) @@ -181,7 +181,7 @@ vfs_hash_changesize(int newmaxvnodes) * None of the vnodes in the table can be recycled because to * do so, they have to be removed from the hash table. */ - rw_wlock(&vfs_hash_lock); + mtx_lock(&vfs_hash_mtx); vfs_hash_oldtbl = vfs_hash_tbl; vfs_hash_oldmask = vfs_hash_mask; vfs_hash_tbl = vfs_hash_newtbl; @@ -194,6 +194,6 @@ vfs_hash_changesize(int newmaxvnodes) vp, v_hashlist); } } - rw_wunlock(&vfs_hash_lock); + mtx_unlock(&vfs_hash_mtx); free(vfs_hash_oldtbl, M_VFS_HASH); } From owner-svn-src-stable-10@freebsd.org Tue Sep 22 10:48:29 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68641A06AC2; Tue, 22 Sep 2015 10:48:29 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from repo.freebsd.org (repo.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 3F0111DA8; Tue, 22 Sep 2015 10:48:29 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8MAmTl4082097; Tue, 22 Sep 2015 10:48:29 GMT (envelope-from jlh@FreeBSD.org) Received: (from jlh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8MAmTXb082096; Tue, 22 Sep 2015 10:48:29 GMT (envelope-from jlh@FreeBSD.org) Message-Id: <201509221048.t8MAmTXb082096@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jlh set sender to jlh@FreeBSD.org using -f From: Jeremie Le Hen Date: Tue, 22 Sep 2015 10:48:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288105 - stable/10/lib/libc/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2015 10:48:29 -0000 Author: jlh Date: Tue Sep 22 10:48:28 2015 New Revision: 288105 URL: https://svnweb.freebsd.org/changeset/base/288105 Log: Long overdue MFC r284377: NetBSD commit log: Use a constant array for the MIB. Newer LLVM decided that mib[] warranted stack protections, with the obvious crash after the setup was done. As a positive side effect, code size shrinks a bit. I'm not sure why this hasn't bitten us yes, but it is certainly possible and there are no real drawbacks to this change anyway. Submitted by: pfg Obtained from: NetBSD Modified: stable/10/lib/libc/sys/stack_protector.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/sys/stack_protector.c ============================================================================== --- stable/10/lib/libc/sys/stack_protector.c Tue Sep 22 10:45:50 2015 (r288104) +++ stable/10/lib/libc/sys/stack_protector.c Tue Sep 22 10:48:28 2015 (r288105) @@ -41,8 +41,8 @@ __FBSDID("$FreeBSD$"); #include #include "libc_private.h" -extern int __sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, - void *newp, size_t newlen); +extern int __sysctl(const int *name, u_int namelen, void *oldp, + size_t *oldlenp, void *newp, size_t newlen); long __stack_chk_guard[8] = {0, 0, 0, 0, 0, 0, 0, 0}; static void __guard_setup(void) __attribute__((__constructor__, __used__)); @@ -54,7 +54,7 @@ void __chk_fail(void); static void __guard_setup(void) { - int mib[2]; + static const int mib[2] = { CTL_KERN, KERN_ARND }; size_t len; int error; @@ -65,12 +65,9 @@ __guard_setup(void) if (error == 0 && __stack_chk_guard[0] != 0) return; - mib[0] = CTL_KERN; - mib[1] = KERN_ARND; - len = sizeof(__stack_chk_guard); - if (__sysctl(mib, 2, __stack_chk_guard, &len, NULL, 0) == -1 || - len != sizeof(__stack_chk_guard)) { + if (__sysctl(mib, nitems(mib), __stack_chk_guard, &len, NULL, 0) == + -1 || len != sizeof(__stack_chk_guard)) { /* If sysctl was unsuccessful, use the "terminator canary". */ ((unsigned char *)(void *)__stack_chk_guard)[0] = 0; ((unsigned char *)(void *)__stack_chk_guard)[1] = 0; From owner-svn-src-stable-10@freebsd.org Tue Sep 22 11:25:38 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34692A07BC9; Tue, 22 Sep 2015 11:25:38 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from repo.freebsd.org (repo.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 24BD51250; Tue, 22 Sep 2015 11:25:38 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8MBPcH3098466; Tue, 22 Sep 2015 11:25:38 GMT (envelope-from jlh@FreeBSD.org) Received: (from jlh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8MBPcXI098465; Tue, 22 Sep 2015 11:25:38 GMT (envelope-from jlh@FreeBSD.org) Message-Id: <201509221125.t8MBPcXI098465@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jlh set sender to jlh@FreeBSD.org using -f From: Jeremie Le Hen Date: Tue, 22 Sep 2015 11:25:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288106 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2015 11:25:38 -0000 Author: jlh Date: Tue Sep 22 11:25:37 2015 New Revision: 288106 URL: https://svnweb.freebsd.org/changeset/base/288106 Log: Long overdue MFC r284378: nit: Rename racct_alloc_resource to racct_adjust_resource. This is more accurate as the amount can be negative. Modified: stable/10/sys/kern/kern_racct.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_racct.c ============================================================================== --- stable/10/sys/kern/kern_racct.c Tue Sep 22 10:48:28 2015 (r288105) +++ stable/10/sys/kern/kern_racct.c Tue Sep 22 11:25:37 2015 (r288106) @@ -502,7 +502,7 @@ racct_destroy(struct racct **racct) * may be less than zero. */ static void -racct_alloc_resource(struct racct *racct, int resource, +racct_adjust_resource(struct racct *racct, int resource, uint64_t amount) { @@ -555,7 +555,7 @@ racct_add_locked(struct proc *p, int res return (error); } #endif - racct_alloc_resource(p->p_racct, resource, amount); + racct_adjust_resource(p->p_racct, resource, amount); racct_add_cred_locked(p->p_ucred, resource, amount); return (0); @@ -589,11 +589,11 @@ racct_add_cred_locked(struct ucred *cred SDT_PROBE(racct, kernel, rusage, add__cred, cred, resource, amount, 0, 0); - racct_alloc_resource(cred->cr_ruidinfo->ui_racct, resource, amount); + racct_adjust_resource(cred->cr_ruidinfo->ui_racct, resource, amount); for (pr = cred->cr_prison; pr != NULL; pr = pr->pr_parent) - racct_alloc_resource(pr->pr_prison_racct->prr_racct, resource, + racct_adjust_resource(pr->pr_prison_racct->prr_racct, resource, amount); - racct_alloc_resource(cred->cr_loginclass->lc_racct, resource, amount); + racct_adjust_resource(cred->cr_loginclass->lc_racct, resource, amount); } /* @@ -633,7 +633,7 @@ racct_add_force(struct proc *p, int reso PROC_LOCK_ASSERT(p, MA_OWNED); mtx_lock(&racct_lock); - racct_alloc_resource(p->p_racct, resource, amount); + racct_adjust_resource(p->p_racct, resource, amount); mtx_unlock(&racct_lock); racct_add_cred(p->p_ucred, resource, amount); } @@ -687,7 +687,7 @@ racct_set_locked(struct proc *p, int res } } #endif - racct_alloc_resource(p->p_racct, resource, diff_proc); + racct_adjust_resource(p->p_racct, resource, diff_proc); if (diff_cred > 0) racct_add_cred_locked(p->p_ucred, resource, diff_cred); else if (diff_cred < 0) @@ -749,7 +749,7 @@ racct_set_force_locked(struct proc *p, i } else diff_cred = diff_proc; - racct_alloc_resource(p->p_racct, resource, diff_proc); + racct_adjust_resource(p->p_racct, resource, diff_proc); if (diff_cred > 0) racct_add_cred_locked(p->p_ucred, resource, diff_cred); else if (diff_cred < 0) @@ -851,7 +851,7 @@ racct_sub(struct proc *p, int resource, "than allocated %jd for %s (pid %d)", __func__, amount, resource, (intmax_t)p->p_racct->r_resources[resource], p->p_comm, p->p_pid)); - racct_alloc_resource(p->p_racct, resource, -amount); + racct_adjust_resource(p->p_racct, resource, -amount); racct_sub_cred_locked(p->p_ucred, resource, amount); mtx_unlock(&racct_lock); } @@ -872,11 +872,11 @@ racct_sub_cred_locked(struct ucred *cred resource)); #endif - racct_alloc_resource(cred->cr_ruidinfo->ui_racct, resource, -amount); + racct_adjust_resource(cred->cr_ruidinfo->ui_racct, resource, -amount); for (pr = cred->cr_prison; pr != NULL; pr = pr->pr_parent) - racct_alloc_resource(pr->pr_prison_racct->prr_racct, resource, + racct_adjust_resource(pr->pr_prison_racct->prr_racct, resource, -amount); - racct_alloc_resource(cred->cr_loginclass->lc_racct, resource, -amount); + racct_adjust_resource(cred->cr_loginclass->lc_racct, resource, -amount); } /* From owner-svn-src-stable-10@freebsd.org Tue Sep 22 11:38:59 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA83EA05033; Tue, 22 Sep 2015 11:38:59 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from repo.freebsd.org (repo.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 B2F9118D7; Tue, 22 Sep 2015 11:38:59 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8MBcxjc002802; Tue, 22 Sep 2015 11:38:59 GMT (envelope-from jlh@FreeBSD.org) Received: (from jlh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8MBcxGK002801; Tue, 22 Sep 2015 11:38:59 GMT (envelope-from jlh@FreeBSD.org) Message-Id: <201509221138.t8MBcxGK002801@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jlh set sender to jlh@FreeBSD.org using -f From: Jeremie Le Hen Date: Tue, 22 Sep 2015 11:38:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288107 - stable/10/etc/defaults X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2015 11:38:59 -0000 Author: jlh Date: Tue Sep 22 11:38:58 2015 New Revision: 288107 URL: https://svnweb.freebsd.org/changeset/base/288107 Log: Long overdue MFC r285444: Allow again periodic scripts to be run from command-line. PR: 188109 Submitted by: Jason Unovitch Modified: stable/10/etc/defaults/periodic.conf Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/defaults/periodic.conf ============================================================================== --- stable/10/etc/defaults/periodic.conf Tue Sep 22 11:25:37 2015 (r288106) +++ stable/10/etc/defaults/periodic.conf Tue Sep 22 11:38:58 2015 (r288107) @@ -365,8 +365,12 @@ if [ -z "${source_periodic_confs_defined *) return 0 ;; esac ;; + '') + # Script run manually. + return 0 + ;; *) - echo "ASSERTION FAILED: Unexpected value for " \ + echo "ASSERTION FAILED: Unexpected value for" \ "\$PERIODIC: '$PERIODIC'" >&2 exit 127 ;; From owner-svn-src-stable-10@freebsd.org Tue Sep 22 14:33:44 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DE89A07291; Tue, 22 Sep 2015 14:33:44 +0000 (UTC) (envelope-from garga@FreeBSD.org) Received: from repo.freebsd.org (repo.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 6A56B1E58; Tue, 22 Sep 2015 14:33:44 +0000 (UTC) (envelope-from garga@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8MEXicj076018; Tue, 22 Sep 2015 14:33:44 GMT (envelope-from garga@FreeBSD.org) Received: (from garga@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8MEXi5x076017; Tue, 22 Sep 2015 14:33:44 GMT (envelope-from garga@FreeBSD.org) Message-Id: <201509221433.t8MEXi5x076017@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: garga set sender to garga@FreeBSD.org using -f From: Renato Botelho Date: Tue, 22 Sep 2015 14:33:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288109 - stable/10/sys/netinet6 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2015 14:33:44 -0000 Author: garga (ports committer) Date: Tue Sep 22 14:33:43 2015 New Revision: 288109 URL: https://svnweb.freebsd.org/changeset/base/288109 Log: Remove extra space introduced in r287734. This is a stable/10 only fix since original commit (r287094) is correct. Approved by: loos Sponsored by: Rubicon Communications (Netgate) Modified: stable/10/sys/netinet6/in6.c Modified: stable/10/sys/netinet6/in6.c ============================================================================== --- stable/10/sys/netinet6/in6.c Tue Sep 22 12:56:34 2015 (r288108) +++ stable/10/sys/netinet6/in6.c Tue Sep 22 14:33:43 2015 (r288109) @@ -2388,7 +2388,7 @@ in6if_do_dad(struct ifnet *ifp) * However, some interfaces can be up before the RUNNING * status. Additionaly, users may try to assign addresses * before the interface becomes up (or running). - * This function returns EAGAIN in that case. + * This function returns EAGAIN in that case. * The caller should mark "tentative" on the address instead of * performing DAD immediately. */ From owner-svn-src-stable-10@freebsd.org Tue Sep 22 15:30:17 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33581A06C0E; Tue, 22 Sep 2015 15:30:17 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-yk0-f173.google.com (mail-yk0-f173.google.com [209.85.160.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EBBE91303; Tue, 22 Sep 2015 15:30:16 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by ykdz138 with SMTP id z138so12770704ykd.2; Tue, 22 Sep 2015 08:30:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=9a97eO8be9tMRhBa7j9y9mZjK5u4LTVOnVqBU7XmbPw=; b=gemNmkrbPa0qvya1f2rrTywOE9rpvvGq7zLx48rTDE9rJGZ4tPbFYcDUl/PRTbvePF amC9AJFkMdNrLVi4aJRYdJr6ScdzQ9S1y5RKMLboOibDgCSKikFaVzGKf7AvsU3fqJlN tpFOiJESkJgRsz8NqPfaz9hlIur+8JXHxAEmK69DFfSwX4YC1CniknU99MvTjvvWEhGg Sc6y2lGHrncbbV78FzokbTQVA2kJQbnPazhtryipxLjue4LJHy95jnQScqGt2Txz9G30 1G9oBYHA0U3b3K9wDH32xttff7zu6055sKLHDypso+X33fokRGnmZb2ANbHkDo/4QPOw yA3Q== X-Received: by 10.170.199.196 with SMTP id q187mr22044825yke.22.1442935810589; Tue, 22 Sep 2015 08:30:10 -0700 (PDT) Received: from mail-yk0-f179.google.com (mail-yk0-f179.google.com. [209.85.160.179]) by smtp.gmail.com with ESMTPSA id s123sm1161434ywe.35.2015.09.22.08.30.10 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Sep 2015 08:30:10 -0700 (PDT) Received: by ykdg206 with SMTP id g206so12796503ykd.1; Tue, 22 Sep 2015 08:30:10 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.129.78.85 with SMTP id c82mr22088945ywb.133.1442935810175; Tue, 22 Sep 2015 08:30:10 -0700 (PDT) Reply-To: cem@FreeBSD.org Received: by 10.37.60.198 with HTTP; Tue, 22 Sep 2015 08:30:09 -0700 (PDT) In-Reply-To: References: <201509220043.t8M0h6jQ034824@repo.freebsd.org> Date: Tue, 22 Sep 2015 08:30:09 -0700 Message-ID: Subject: Re: svn commit: r288079 - in stable/10/sys: kern sys From: Conrad Meyer To: Oliver Pinter Cc: Kirk McKusick , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2015 15:30:17 -0000 On Mon, Sep 21, 2015 at 11:55 PM, Oliver Pinter wrote: > On 9/22/15, Oliver Pinter wrote: >> Seems like this commit breaks the build: >> >> --- vfs_hash.o --- >> /jenkins/workspace/HardenedBSD-10-STABLE-amd64/sys/kern/vfs_hash.c:184:2: >> error: implicit declaration of function 'rw_wlock' is invalid in C99 >> [-Werror,-Wimplicit-function-declaration] >> rw_wlock(&vfs_hash_lock); >> ^ >> ... > > The following commit is missing from MFC: > > commit 09f7a46ec71137e29d82d2f0811a7f81b6142266 > Author: mjg > Date: Tue Dec 30 21:40:45 2014 +0000 > > Convert vfs hash lock from a mutex to an rwlock. That's FreeBSD r276424, FWIW. Best, Conrad From owner-svn-src-stable-10@freebsd.org Tue Sep 22 22:07:43 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 639D6A07829; Tue, 22 Sep 2015 22:07:43 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.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 5394E1C45; Tue, 22 Sep 2015 22:07:43 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8MM7hg1066261; Tue, 22 Sep 2015 22:07:43 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8MM7hsF066260; Tue, 22 Sep 2015 22:07:43 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201509222207.t8MM7hsF066260@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 22 Sep 2015 22:07:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288133 - in stable: 10/contrib/gcclibs/libcpp 9/contrib/gcclibs/libcpp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2015 22:07:43 -0000 Author: dim Date: Tue Sep 22 22:07:42 2015 New Revision: 288133 URL: https://svnweb.freebsd.org/changeset/base/288133 Log: MFC r286699: In gcc's libcpp, stop using the INTTYPE_MAXIMUM() macro, which relies on undefined behavior. The code used this macro to avoid problems on some broken systems which define SSIZE_MAX incorrectly, but this is not needed on FreeBSD, obviously. Modified: stable/10/contrib/gcclibs/libcpp/files.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/contrib/gcclibs/libcpp/files.c Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/gcclibs/ (props changed) Modified: stable/10/contrib/gcclibs/libcpp/files.c ============================================================================== --- stable/10/contrib/gcclibs/libcpp/files.c Tue Sep 22 21:43:08 2015 (r288132) +++ stable/10/contrib/gcclibs/libcpp/files.c Tue Sep 22 22:07:42 2015 (r288133) @@ -567,7 +567,7 @@ read_file_guts (cpp_reader *pfile, _cpp_ SSIZE_MAX to be much smaller than the actual range of the type. Use INTTYPE_MAXIMUM unconditionally to ensure this does not bite us. */ - if (file->st.st_size > INTTYPE_MAXIMUM (ssize_t)) + if (file->st.st_size > SSIZE_MAX) { cpp_error (pfile, CPP_DL_ERROR, "%s is too large", file->path); return false; @@ -581,7 +581,7 @@ read_file_guts (cpp_reader *pfile, _cpp_ file->path); return false; } - else if (offset > INTTYPE_MAXIMUM (ssize_t) || (ssize_t)offset > size) + else if (offset > SSIZE_MAX || (ssize_t)offset > size) { cpp_error (pfile, CPP_DL_ERROR, "current position of %s is too large", file->path); From owner-svn-src-stable-10@freebsd.org Tue Sep 22 22:18:38 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C4BEA07D4D; Tue, 22 Sep 2015 22:18:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.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 2CB9D1319; Tue, 22 Sep 2015 22:18:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8MMIcKr070507; Tue, 22 Sep 2015 22:18:38 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8MMIc93070506; Tue, 22 Sep 2015 22:18:38 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201509222218.t8MMIc93070506@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 22 Sep 2015 22:18:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288134 - in stable: 10/sbin/ipfw 9/sbin/ipfw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2015 22:18:38 -0000 Author: dim Date: Tue Sep 22 22:18:36 2015 New Revision: 288134 URL: https://svnweb.freebsd.org/changeset/base/288134 Log: MFC r286702: In ipfw2, avoid left-shifting negative integers, which is undefined. While here, make some other arguments to htonl(3) unsigned too. Modified: stable/10/sbin/ipfw/ipfw2.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sbin/ipfw/ipfw2.c Directory Properties: stable/9/ (props changed) stable/9/sbin/ (props changed) stable/9/sbin/ipfw/ (props changed) Modified: stable/10/sbin/ipfw/ipfw2.c ============================================================================== --- stable/10/sbin/ipfw/ipfw2.c Tue Sep 22 22:07:42 2015 (r288133) +++ stable/10/sbin/ipfw/ipfw2.c Tue Sep 22 22:18:36 2015 (r288134) @@ -2268,14 +2268,14 @@ fill_ip(ipfw_insn_ip *cmd, char *av, int case '/': masklen = atoi(p); if (masklen == 0) - d[1] = htonl(0); /* mask */ + d[1] = htonl(0U); /* mask */ else if (masklen > 32) errx(EX_DATAERR, "bad width ``%s''", p); else - d[1] = htonl(~0 << (32 - masklen)); + d[1] = htonl(~0U << (32 - masklen)); break; case '{': /* no mask, assume /24 and put back the '{' */ - d[1] = htonl(~0 << (32 - 24)); + d[1] = htonl(~0U << (32 - 24)); *(--p) = md; break; @@ -2284,7 +2284,7 @@ fill_ip(ipfw_insn_ip *cmd, char *av, int /* FALLTHROUGH */ case 0: /* initialization value */ default: - d[1] = htonl(~0); /* force /32 */ + d[1] = htonl(~0U); /* force /32 */ break; } d[0] &= d[1]; /* mask base address with mask */ From owner-svn-src-stable-10@freebsd.org Tue Sep 22 22:27:46 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5A81A0624D; Tue, 22 Sep 2015 22:27:46 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.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 D60E01BCB; Tue, 22 Sep 2015 22:27:46 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8MMRk1G074593; Tue, 22 Sep 2015 22:27:46 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8MMRkh2074592; Tue, 22 Sep 2015 22:27:46 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201509222227.t8MMRkh2074592@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 22 Sep 2015 22:27:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288135 - in stable: 10/sys/dev/bxe 9/sys/dev/bxe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2015 22:27:47 -0000 Author: dim Date: Tue Sep 22 22:27:45 2015 New Revision: 288135 URL: https://svnweb.freebsd.org/changeset/base/288135 Log: MFC r286733: Avoid left-shifting negative signed values in bxe(4). Reviewed by: davidcs Modified: stable/10/sys/dev/bxe/ecore_hsi.h Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/dev/bxe/ecore_hsi.h Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/10/sys/dev/bxe/ecore_hsi.h ============================================================================== --- stable/10/sys/dev/bxe/ecore_hsi.h Tue Sep 22 22:18:36 2015 (r288134) +++ stable/10/sys/dev/bxe/ecore_hsi.h Tue Sep 22 22:27:45 2015 (r288135) @@ -2536,9 +2536,9 @@ struct shmem2_region { #define SHMEM_EEE_SUPPORTED_MASK 0x000f0000 #define SHMEM_EEE_SUPPORTED_SHIFT 16 #define SHMEM_EEE_ADV_STATUS_MASK 0x00f00000 - #define SHMEM_EEE_100M_ADV (1<<0) - #define SHMEM_EEE_1G_ADV (1<<1) - #define SHMEM_EEE_10G_ADV (1<<2) + #define SHMEM_EEE_100M_ADV (1U<<0) + #define SHMEM_EEE_1G_ADV (1U<<1) + #define SHMEM_EEE_10G_ADV (1U<<2) #define SHMEM_EEE_ADV_STATUS_SHIFT 20 #define SHMEM_EEE_LP_ADV_STATUS_MASK 0x0f000000 #define SHMEM_EEE_LP_ADV_STATUS_SHIFT 24 From owner-svn-src-stable-10@freebsd.org Tue Sep 22 22:35:44 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 282D4A067A2; Tue, 22 Sep 2015 22:35:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.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 187F21300; Tue, 22 Sep 2015 22:35:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8MMZhUQ078849; Tue, 22 Sep 2015 22:35:43 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8MMZhA8078848; Tue, 22 Sep 2015 22:35:43 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201509222235.t8MMZhA8078848@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 22 Sep 2015 22:35:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288136 - in stable: 10/lib/libz 9/lib/libz X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2015 22:35:44 -0000 Author: dim Date: Tue Sep 22 22:35:42 2015 New Revision: 288136 URL: https://svnweb.freebsd.org/changeset/base/288136 Log: MFC r287541: In libz's inflateMark(), avoid left-shifting a negative integer, which is undefined. Reviewed by: delphij Differential Revision: https://reviews.freebsd.org/D3344 Modified: stable/10/lib/libz/inflate.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/lib/libz/inflate.c Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libz/ (props changed) Modified: stable/10/lib/libz/inflate.c ============================================================================== --- stable/10/lib/libz/inflate.c Tue Sep 22 22:27:45 2015 (r288135) +++ stable/10/lib/libz/inflate.c Tue Sep 22 22:35:42 2015 (r288136) @@ -1504,7 +1504,7 @@ z_streamp strm; { struct inflate_state FAR *state; - if (strm == Z_NULL || strm->state == Z_NULL) return -1L << 16; + if (strm == Z_NULL || strm->state == Z_NULL) return -(1L << 16); state = (struct inflate_state FAR *)strm->state; return ((long)(state->back) << 16) + (state->mode == COPY ? state->length : From owner-svn-src-stable-10@freebsd.org Wed Sep 23 01:07:46 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95002A072CE; Wed, 23 Sep 2015 01:07:46 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.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 6BCDD162C; Wed, 23 Sep 2015 01:07:46 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8N17kvC040722; Wed, 23 Sep 2015 01:07:46 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8N17jRD040720; Wed, 23 Sep 2015 01:07:45 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201509230107.t8N17jRD040720@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 23 Sep 2015 01:07:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288139 - stable/10/usr.bin/w X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Sep 2015 01:07:46 -0000 Author: delphij Date: Wed Sep 23 01:07:45 2015 New Revision: 288139 URL: https://svnweb.freebsd.org/changeset/base/288139 Log: MFC r287590: w(1) is not setgid binary since r53279, so remove the setgid() call. Reviewed By: wollman Modified: stable/10/usr.bin/w/Makefile stable/10/usr.bin/w/w.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/w/Makefile ============================================================================== --- stable/10/usr.bin/w/Makefile Wed Sep 23 00:32:38 2015 (r288138) +++ stable/10/usr.bin/w/Makefile Wed Sep 23 01:07:45 2015 (r288139) @@ -6,8 +6,6 @@ SRCS= fmt.c pr_time.c proc_compare.c w.c MAN= w.1 uptime.1 DPADD= ${LIBKVM} ${LIBUTIL} LDADD= -lkvm -lutil -#BINGRP= kmem -#BINMODE=2555 LINKS= ${BINDIR}/w ${BINDIR}/uptime .PATH: ${.CURDIR}/../../bin/ps Modified: stable/10/usr.bin/w/w.c ============================================================================== --- stable/10/usr.bin/w/w.c Wed Sep 23 00:32:38 2015 (r288138) +++ stable/10/usr.bin/w/w.c Wed Sep 23 01:07:45 2015 (r288139) @@ -132,7 +132,7 @@ main(int argc, char *argv[]) struct kinfo_proc *dkp; struct stat *stp; time_t touched; - int ch, i, nentries, nusers, wcmd, longidle, longattime, dropgid; + int ch, i, nentries, nusers, wcmd, longidle, longattime; const char *memf, *nlistf, *p; char *x_suffix; char buf[MAXHOSTNAMELEN], errbuf[_POSIX2_LINE_MAX]; @@ -152,7 +152,6 @@ main(int argc, char *argv[]) p = "dhiflM:N:nsuw"; } - dropgid = 0; memf = _PATH_DEVNULL; nlistf = NULL; while ((ch = getopt(argc, argv, p)) != -1) @@ -169,11 +168,9 @@ main(int argc, char *argv[]) case 'M': header = 0; memf = optarg; - dropgid = 1; break; case 'N': nlistf = optarg; - dropgid = 1; break; case 'n': nflag = 1; @@ -193,13 +190,6 @@ main(int argc, char *argv[]) _res.retrans = 2; /* resolver timeout to 2 seconds per try */ _res.retry = 1; /* only try once.. */ - /* - * Discard setgid privileges if not the running kernel so that bad - * guys can't print interesting stuff from kernel memory. - */ - if (dropgid) - setgid(getgid()); - if ((kd = kvm_openfiles(nlistf, memf, NULL, O_RDONLY, errbuf)) == NULL) errx(1, "%s", errbuf); From owner-svn-src-stable-10@freebsd.org Wed Sep 23 04:13:31 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7B88A06F4F; Wed, 23 Sep 2015 04:13:31 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) by mx1.freebsd.org (Postfix) with ESMTP id 514DB1B02; Wed, 23 Sep 2015 04:13:30 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from cwfw.cwsent.com ([96.50.22.10]) by shaw.ca with SMTP id ebQnZ3UB7PdwXebQpZwXg5; Tue, 22 Sep 2015 22:13:24 -0600 X-Authority-Analysis: v=2.1 cv=av94c3tV c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=VxmjJ2MpAAAA:8 a=BWvPGDcYAAAA:8 a=kj9zAlcOel0A:10 a=ff-B7xzCdYMA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=FdiJfuS8XhdhmzdXu-8A:9 a=CjuIK1q_8ugA:10 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by cwfw.cwsent.com (Postfix) with ESMTP id 47D999BF0; Tue, 22 Sep 2015 20:31:41 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id t8N32E0i082749; Tue, 22 Sep 2015 20:02:14 -0700 (PDT) (envelope-from Cy.Schubert@komquats.com) Message-Id: <201509230302.t8N32E0i082749@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.komquats.com/ To: Alexey Dokuchaev cc: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r287984 - stable/10/sys/contrib/ipfilter/netinet In-Reply-To: Message from Alexey Dokuchaev of "Sat, 19 Sep 2015 06:51:28 -0000." <20150919065128.GA74689@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 22 Sep 2015 20:02:14 -0700 X-CMAE-Envelope: MS4wfH/ht+Oaed8ejZ+ET1V+Ipd1eXIodwSDNOUEGp9y5fEvjIV2gKnslY6OlLqmgIppJVe6xINaxmdXTgOgMXVwvUFsa5h/ra0RWdztZgBA8hSP1DN4yYnPg6KFDbZ8vlqinMCzTVv9iY4zdCVvBCeqo1Zs6f9Ed8Ae9xA1WGEjrubj0UkBprt8iSWigxjGNKO2Q8bK7xt56UxwUw9PkeAzantrb8CMnxdUYmewMxi7U8XmUzWtNQ20ukMd3zNQqKHEDirel8/Yr44YBZF2UWDqlHZ4phvDsIl1J2epR/lDgFj9yRVM2zo5XFuckFH+9ujmT2IFhy/1xdCy94rfJRpq44jVMQtrG0OCeO7RV9z4zyTH X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Sep 2015 04:13:31 -0000 In message <20150919065128.GA74689@FreeBSD.org>, Alexey Dokuchaev writes: > On Sat, Sep 19, 2015 at 03:58:32AM +0000, Cy Schubert wrote: > > New Revision: 287984 > > URL: https://svnweb.freebsd.org/changeset/base/287984 > > > > Log: > > MFC r287651, r287652, r287653. > > > > Fix mutex errors, fixup typos in comments. > > > > Obtained from: NetBSD r1.4. > > -This lie, anr those below, will be ignored-- > > [ template remants trimmed ] > > Every time I see this happen I wonder shall we forbid to execute "svn ci" > other than with -F or -m ? My apologies. After I pasted my commit message and deleted unnecessary lines I obviously missed something. Not good. -- Cheers, Cy Schubert or FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-stable-10@freebsd.org Wed Sep 23 05:14:48 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EAD30A06B05; Wed, 23 Sep 2015 05:14:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.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 DB0851561; Wed, 23 Sep 2015 05:14:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8N5EmTg044986; Wed, 23 Sep 2015 05:14:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8N5EmWr044985; Wed, 23 Sep 2015 05:14:48 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509230514.t8N5EmWr044985@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 23 Sep 2015 05:14:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288142 - stable/10/sys/cam/scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Sep 2015 05:14:49 -0000 Author: mav Date: Wed Sep 23 05:14:48 2015 New Revision: 288142 URL: https://svnweb.freebsd.org/changeset/base/288142 Log: MFC r287866: Fix fixed sense writing when passed more data then it can fit. Modified: stable/10/sys/cam/scsi/scsi_all.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/scsi/scsi_all.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_all.c Wed Sep 23 05:13:49 2015 (r288141) +++ stable/10/sys/cam/scsi/scsi_all.c Wed Sep 23 05:14:48 2015 (r288142) @@ -3803,8 +3803,6 @@ scsi_set_sense_data_va(struct scsi_sense */ sense->extra_len = 10; sense_len = (int)va_arg(ap, int); - len_to_copy = MIN(sense_len, SSD_EXTRA_MAX - - sense->extra_len); data = (uint8_t *)va_arg(ap, uint8_t *); switch (elem_type) { @@ -3822,10 +3820,14 @@ scsi_set_sense_data_va(struct scsi_sense uint8_t *data_dest; int i; - if (elem_type == SSD_ELEM_COMMAND) + if (elem_type == SSD_ELEM_COMMAND) { data_dest = &sense->cmd_spec_info[0]; - else { + len_to_copy = MIN(sense_len, + sizeof(sense->cmd_spec_info)); + } else { data_dest = &sense->info[0]; + len_to_copy = MIN(sense_len, + sizeof(sense->info)); /* * We're setting the info field, so * set the valid bit. From owner-svn-src-stable-10@freebsd.org Thu Sep 24 00:19:21 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9529A0534B; Thu, 24 Sep 2015 00:19:21 +0000 (UTC) (envelope-from mckusick@mckusick.com) Received: from chez.mckusick.com (chez.mckusick.com [IPv6:2001:5a8:4:7e72:d250:99ff:fe57:4030]) (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 CADFC1199; Thu, 24 Sep 2015 00:19:21 +0000 (UTC) (envelope-from mckusick@mckusick.com) Received: from chez.mckusick.com (localhost [IPv6:::1]) by chez.mckusick.com (8.15.2/8.14.9) with ESMTP id t8O0JKoW011139; Wed, 23 Sep 2015 17:19:21 -0700 (PDT) (envelope-from mckusick@mckusick.com) Message-Id: <201509240019.t8O0JKoW011139@chez.mckusick.com> From: Kirk McKusick To: Oliver Pinter , Conrad Meyer , Konstantin Belousov Subject: Re: svn commit: r288079 - in stable/10/sys: kern sys cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org In-reply-to: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <11137.1443053960.1@chez.mckusick.com> Date: Wed, 23 Sep 2015 17:19:20 -0700 X-Spam-Status: No, score=0.1 required=5.0 tests=MISSING_MID, UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on chez.mckusick.com X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Sep 2015 00:19:22 -0000 Sorry for the screwup on the build which thankfully kib fixed before I had awakened to read my @freebsd mail. Note to self, do not do checkins at the end of the day. I did go back to figure out how that screwup happened. I have just started using bhyve virtual machines to compile and test kernel updates. I have not been able to get subversion to work within the virtual machine, so have to do the merge on my base machine, copy the updated kernel into the virtual machine and do the build and test there. I discovered the lock issue and fixed it in the kernel source on the virtual machine. But I forgot to copy the updated file out of the virtual machine back to my base machine before doing the subversion checkin. Again my apologies. Kirk McKusick From owner-svn-src-stable-10@freebsd.org Thu Sep 24 00:50:19 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99508A062D9; Thu, 24 Sep 2015 00:50:19 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.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 7D87F1FD6; Thu, 24 Sep 2015 00:50:19 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8O0oJti032971; Thu, 24 Sep 2015 00:50:19 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8O0oI32032967; Thu, 24 Sep 2015 00:50:18 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201509240050.t8O0oI32032967@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 24 Sep 2015 00:50:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288163 - stable/10/usr.bin/systat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Sep 2015 00:50:19 -0000 Author: delphij Date: Thu Sep 24 00:50:17 2015 New Revision: 288163 URL: https://svnweb.freebsd.org/changeset/base/288163 Log: MFC r287633: - Avoid accessing window properties directly, instead, use accessors. This should be no-op for now, but allows the code to work if we move to NCURSES_OPAQUE. - Use calloc() instead of malloc+bzero. Modified: stable/10/usr.bin/systat/iostat.c stable/10/usr.bin/systat/netstat.c stable/10/usr.bin/systat/pigs.c stable/10/usr.bin/systat/vmstat.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/systat/iostat.c ============================================================================== --- stable/10/usr.bin/systat/iostat.c Thu Sep 24 00:22:48 2015 (r288162) +++ stable/10/usr.bin/systat/iostat.c Thu Sep 24 00:50:17 2015 (r288163) @@ -112,10 +112,8 @@ initiostat(void) if ((num_devices = devstat_getnumdevs(NULL)) < 0) return(0); - cur.dinfo = (struct devinfo *)malloc(sizeof(struct devinfo)); - last.dinfo = (struct devinfo *)malloc(sizeof(struct devinfo)); - bzero(cur.dinfo, sizeof(struct devinfo)); - bzero(last.dinfo, sizeof(struct devinfo)); + cur.dinfo = calloc(1, sizeof(struct devinfo)); + last.dinfo = calloc(1, sizeof(struct devinfo)); /* * This value for maxshowdevs (100) is bogus. I'm not sure exactly @@ -196,7 +194,7 @@ numlabels(int row) char tmpstr[10]; #define COLWIDTH 17 -#define DRIVESPERLINE ((wnd->_maxx - INSET) / COLWIDTH) +#define DRIVESPERLINE ((getmaxx(wnd) - 1 - INSET) / COLWIDTH) for (ndrives = 0, i = 0; i < num_devices; i++) if (dev_select[i].selected) ndrives++; @@ -204,7 +202,7 @@ numlabels(int row) /* * Deduct -regions for blank line after each scrolling region. */ - linesperregion = (wnd->_maxy - row - regions) / regions; + linesperregion = (getmaxy(wnd) - 1 - row - regions) / regions; /* * Minimum region contains space for two * label lines and one line of statistics. @@ -214,9 +212,9 @@ numlabels(int row) _col = INSET; for (i = 0; i < num_devices; i++) if (dev_select[i].selected) { - if (_col + COLWIDTH >= wnd->_maxx - INSET) { + if (_col + COLWIDTH >= getmaxx(wnd) - 1 - INSET) { _col = INSET, row += linesperregion + 1; - if (row > wnd->_maxy - (linesperregion + 1)) + if (row > getmaxy(wnd) - 1 - (linesperregion + 1)) break; } sprintf(tmpstr, "%s%d", dev_select[i].device_name, @@ -241,7 +239,7 @@ barlabels(int row) linesperregion = 2 + kbpt; for (i = 0; i < num_devices; i++) if (dev_select[i].selected) { - if (row > wnd->_maxy - linesperregion) + if (row > getmaxy(wnd) - 1 - linesperregion) break; sprintf(tmpstr, "%s%d", dev_select[i].device_name, dev_select[i].unit_number); @@ -276,7 +274,7 @@ showiostat(void) row += 2; for (i = 0; i < num_devices; i++) if (dev_select[i].selected) { - if (row > wnd->_maxy - linesperregion) + if (row > getmaxy(wnd) - linesperregion) break; row = devstats(row, INSET, i); } @@ -289,9 +287,9 @@ showiostat(void) winsertln(wnd); for (i = 0; i < num_devices; i++) if (dev_select[i].selected) { - if (_col + COLWIDTH >= wnd->_maxx - INSET) { + if (_col + COLWIDTH >= getmaxx(wnd) - 1 - INSET) { _col = INSET, row += linesperregion + 1; - if (row > wnd->_maxy - (linesperregion + 1)) + if (row > getmaxy(wnd) - 1 - (linesperregion + 1)) break; wmove(wnd, row + linesperregion, 0); wdeleteln(wnd); Modified: stable/10/usr.bin/systat/netstat.c ============================================================================== --- stable/10/usr.bin/systat/netstat.c Thu Sep 24 00:22:48 2015 (r288162) +++ stable/10/usr.bin/systat/netstat.c Thu Sep 24 00:50:17 2015 (r288163) @@ -85,7 +85,7 @@ static char *inetname(struct sockaddr *) static void inetprint(struct sockaddr *, const char *); #define streq(a,b) (strcmp(a,b)==0) -#define YMAX(w) ((w)->_maxy-1) +#define YMAX(w) (getmaxy(w)-2) WINDOW * opennetstat(void) Modified: stable/10/usr.bin/systat/pigs.c ============================================================================== --- stable/10/usr.bin/systat/pigs.c Thu Sep 24 00:22:48 2015 (r288162) +++ stable/10/usr.bin/systat/pigs.c Thu Sep 24 00:50:17 2015 (r288163) @@ -94,8 +94,8 @@ showpigs(void) qsort(pt, nproc, sizeof (struct p_times), compar); y = 1; i = nproc; - if (i > wnd->_maxy-1) - i = wnd->_maxy-1; + if (i > getmaxy(wnd)-2) + i = getmaxy(wnd)-2; for (k = 0; i > 0 && pt[k].pt_pctcpu > 0.01; i--, y++, k++) { uname = user_from_uid(pt[k].pt_kp->ki_uid, 0); pname = pt[k].pt_kp->ki_comm; Modified: stable/10/usr.bin/systat/vmstat.c ============================================================================== --- stable/10/usr.bin/systat/vmstat.c Thu Sep 24 00:22:48 2015 (r288162) +++ stable/10/usr.bin/systat/vmstat.c Thu Sep 24 00:50:17 2015 (r288163) @@ -205,12 +205,9 @@ initkre(void) return(0); } - cur.dinfo = (struct devinfo *)malloc(sizeof(struct devinfo)); - last.dinfo = (struct devinfo *)malloc(sizeof(struct devinfo)); - run.dinfo = (struct devinfo *)malloc(sizeof(struct devinfo)); - bzero(cur.dinfo, sizeof(struct devinfo)); - bzero(last.dinfo, sizeof(struct devinfo)); - bzero(run.dinfo, sizeof(struct devinfo)); + cur.dinfo = calloc(1, sizeof(struct devinfo)); + last.dinfo = calloc(1, sizeof(struct devinfo)); + run.dinfo = calloc(1, sizeof(struct devinfo)); if (dsinit(MAXDRIVES, &cur, &last, &run) != 1) return(0); From owner-svn-src-stable-10@freebsd.org Thu Sep 24 00:54:47 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC59AA0659E; Thu, 24 Sep 2015 00:54:47 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.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 D43401339; Thu, 24 Sep 2015 00:54:47 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8O0sl1f036283; Thu, 24 Sep 2015 00:54:47 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8O0slSh036281; Thu, 24 Sep 2015 00:54:47 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201509240054.t8O0slSh036281@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 24 Sep 2015 00:54:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288164 - stable/10/usr.bin/login X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Sep 2015 00:54:48 -0000 Author: delphij Date: Thu Sep 24 00:54:46 2015 New Revision: 288164 URL: https://svnweb.freebsd.org/changeset/base/288164 Log: MFC r287634: login.c doesn't really need libutil.h, don't include it. login_fbtab.c includes paths.h and pathnames.h, and pathnames.h includes paths.h. Eliminate the paths.h inclusion in login_fbtab.c. Modified: stable/10/usr.bin/login/login.c stable/10/usr.bin/login/login_fbtab.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/login/login.c ============================================================================== --- stable/10/usr.bin/login/login.c Thu Sep 24 00:50:17 2015 (r288163) +++ stable/10/usr.bin/login/login.c Thu Sep 24 00:54:46 2015 (r288164) @@ -63,7 +63,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: stable/10/usr.bin/login/login_fbtab.c ============================================================================== --- stable/10/usr.bin/login/login_fbtab.c Thu Sep 24 00:50:17 2015 (r288163) +++ stable/10/usr.bin/login/login_fbtab.c Thu Sep 24 00:54:46 2015 (r288164) @@ -65,7 +65,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -120,7 +119,7 @@ login_fbtab(char *tty, uid_t uid, gid_t /* login_protect - protect one device entry */ -void +static void login_protect(const char *table, char *pattern, int mask, uid_t uid, gid_t gid) { glob_t gl; From owner-svn-src-stable-10@freebsd.org Thu Sep 24 08:42:09 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 072D2A08681; Thu, 24 Sep 2015 08:42:09 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.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 EB48F1E5D; Thu, 24 Sep 2015 08:42:08 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8O8g89m028933; Thu, 24 Sep 2015 08:42:08 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8O8g8rp028932; Thu, 24 Sep 2015 08:42:08 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201509240842.t8O8g8rp028932@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Thu, 24 Sep 2015 08:42:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288167 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Sep 2015 08:42:09 -0000 Author: smh Date: Thu Sep 24 08:42:08 2015 New Revision: 288167 URL: https://svnweb.freebsd.org/changeset/base/288167 Log: MFC r287886: Fix kqueue write events for files > 2GB Sponsored by: Multiplay Modified: stable/10/sys/sys/vnode.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/vnode.h ============================================================================== --- stable/10/sys/sys/vnode.h Thu Sep 24 08:04:47 2015 (r288166) +++ stable/10/sys/sys/vnode.h Thu Sep 24 08:42:08 2015 (r288167) @@ -788,7 +788,8 @@ void vop_rename_fail(struct vop_rename_a #define VOP_WRITE_PRE(ap) \ struct vattr va; \ - int error, osize, ooffset, noffset; \ + int error; \ + off_t osize, ooffset, noffset; \ \ osize = ooffset = noffset = 0; \ if (!VN_KNLIST_EMPTY((ap)->a_vp)) { \ @@ -796,7 +797,7 @@ void vop_rename_fail(struct vop_rename_a if (error) \ return (error); \ ooffset = (ap)->a_uio->uio_offset; \ - osize = va.va_size; \ + osize = (off_t)va.va_size; \ } #define VOP_WRITE_POST(ap, ret) \ From owner-svn-src-stable-10@freebsd.org Thu Sep 24 12:44:03 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66F27A08787; Thu, 24 Sep 2015 12:44:03 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.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 57D8B1B38; Thu, 24 Sep 2015 12:44:03 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8OCi3fq028125; Thu, 24 Sep 2015 12:44:03 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8OCi2NL028123; Thu, 24 Sep 2015 12:44:02 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201509241244.t8OCi2NL028123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 24 Sep 2015 12:44:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288171 - in stable/10: sys/sys usr.bin/elfdump X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Sep 2015 12:44:03 -0000 Author: emaste Date: Thu Sep 24 12:44:02 2015 New Revision: 288171 URL: https://svnweb.freebsd.org/changeset/base/288171 Log: MFC r285841: Add RISC-V ELF machine type definition EM_RISCV is now officially registered as e_machine 243. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/sys/elf_common.h stable/10/usr.bin/elfdump/elfdump.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/elf_common.h ============================================================================== --- stable/10/sys/sys/elf_common.h Thu Sep 24 12:22:47 2015 (r288170) +++ stable/10/sys/sys/elf_common.h Thu Sep 24 12:44:02 2015 (r288171) @@ -238,6 +238,7 @@ typedef struct { #define EM_UNICORE 110 /* Microprocessor series from PKU-Unity Ltd. and MPRC of Peking University */ #define EM_AARCH64 183 /* AArch64 (64-bit ARM) */ +#define EM_RISCV 243 /* RISC-V */ /* Non-standard or deprecated. */ #define EM_486 6 /* Intel i486. */ Modified: stable/10/usr.bin/elfdump/elfdump.c ============================================================================== --- stable/10/usr.bin/elfdump/elfdump.c Thu Sep 24 12:22:47 2015 (r288170) +++ stable/10/usr.bin/elfdump/elfdump.c Thu Sep 24 12:44:02 2015 (r288171) @@ -271,6 +271,7 @@ e_machines(u_int mach) case EM_IA_64: return "EM_IA_64"; case EM_X86_64: return "EM_X86_64"; case EM_AARCH64:return "EM_AARCH64"; + case EM_RISCV: return "EM_RISCV"; } snprintf(machdesc, sizeof(machdesc), "(unknown machine) -- type 0x%x", mach); From owner-svn-src-stable-10@freebsd.org Thu Sep 24 12:47:32 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6297FA08930; Thu, 24 Sep 2015 12:47:32 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.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 53C6A1D18; Thu, 24 Sep 2015 12:47:32 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8OClWsd028330; Thu, 24 Sep 2015 12:47:32 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8OClWbJ028329; Thu, 24 Sep 2015 12:47:32 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201509241247.t8OClWbJ028329@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 24 Sep 2015 12:47:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288172 - stable/10/usr.bin/ar X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Sep 2015 12:47:32 -0000 Author: emaste Date: Thu Sep 24 12:47:31 2015 New Revision: 288172 URL: https://svnweb.freebsd.org/changeset/base/288172 Log: MFC r287327: ar: Deobfuscate a while loop Modified: stable/10/usr.bin/ar/ar.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/ar/ar.c ============================================================================== --- stable/10/usr.bin/ar/ar.c Thu Sep 24 12:44:02 2015 (r288171) +++ stable/10/usr.bin/ar/ar.c Thu Sep 24 12:47:31 2015 (r288172) @@ -141,7 +141,7 @@ main(int argc, char **argv) ranlib_usage(); bsdar->options |= AR_S; - for (;(bsdar->filename = *argv++) != NULL;) + while ((bsdar->filename = *argv++) != NULL) ar_mode_s(bsdar); exit(EX_OK); From owner-svn-src-stable-10@freebsd.org Thu Sep 24 12:54:51 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3FFE0A08EBE; Thu, 24 Sep 2015 12:54:51 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.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 30D54143F; Thu, 24 Sep 2015 12:54:51 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8OCspUm032266; Thu, 24 Sep 2015 12:54:51 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8OCsoeg032264; Thu, 24 Sep 2015 12:54:50 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201509241254.t8OCsoeg032264@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 24 Sep 2015 12:54:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288173 - in stable/10: sys/sys usr.bin/elfdump X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Sep 2015 12:54:51 -0000 Author: emaste Date: Thu Sep 24 12:54:50 2015 New Revision: 288173 URL: https://svnweb.freebsd.org/changeset/base/288173 Log: MFC r282916: Add ELF machine EM_IAMCU, 32-bit Intel MCU It is e_machine 6, which was previously reserved for 486. Modified: stable/10/sys/sys/elf_common.h stable/10/usr.bin/elfdump/elfdump.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/elf_common.h ============================================================================== --- stable/10/sys/sys/elf_common.h Thu Sep 24 12:47:31 2015 (r288172) +++ stable/10/sys/sys/elf_common.h Thu Sep 24 12:54:50 2015 (r288173) @@ -144,6 +144,7 @@ typedef struct { #define EM_386 3 /* Intel i386. */ #define EM_68K 4 /* Motorola 68000. */ #define EM_88K 5 /* Motorola 88000. */ +#define EM_IAMCU 6 /* Intel MCU. */ #define EM_860 7 /* Intel i860. */ #define EM_MIPS 8 /* MIPS R3000 Big-Endian only. */ #define EM_S370 9 /* IBM System/370. */ Modified: stable/10/usr.bin/elfdump/elfdump.c ============================================================================== --- stable/10/usr.bin/elfdump/elfdump.c Thu Sep 24 12:47:31 2015 (r288172) +++ stable/10/usr.bin/elfdump/elfdump.c Thu Sep 24 12:54:50 2015 (r288173) @@ -261,6 +261,7 @@ e_machines(u_int mach) case EM_386: return "EM_386"; case EM_68K: return "EM_68K"; case EM_88K: return "EM_88K"; + case EM_IAMCU: return "EM_IAMCU"; case EM_860: return "EM_860"; case EM_MIPS: return "EM_MIPS"; case EM_PPC: return "EM_PPC"; From owner-svn-src-stable-10@freebsd.org Thu Sep 24 13:06:21 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6B9AA077B8; Thu, 24 Sep 2015 13:06:20 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.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 CBD341B9D; Thu, 24 Sep 2015 13:06:20 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8OD6KVj036428; Thu, 24 Sep 2015 13:06:20 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8OD6KVX036427; Thu, 24 Sep 2015 13:06:20 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201509241306.t8OD6KVX036427@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 24 Sep 2015 13:06:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288174 - stable/10/usr.bin/vtfontcvt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Sep 2015 13:06:21 -0000 Author: emaste Date: Thu Sep 24 13:06:19 2015 New Revision: 288174 URL: https://svnweb.freebsd.org/changeset/base/288174 Log: MFC r287340: vtfontcvt: fix buffer overflow for non-default size .hex fonts And r287336 which introduced xmalloc. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.bin/vtfontcvt/vtfontcvt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/vtfontcvt/vtfontcvt.c ============================================================================== --- stable/10/usr.bin/vtfontcvt/vtfontcvt.c Thu Sep 24 12:54:50 2015 (r288173) +++ stable/10/usr.bin/vtfontcvt/vtfontcvt.c Thu Sep 24 13:06:19 2015 (r288174) @@ -96,6 +96,16 @@ usage(void) exit(1); } +static void * +xmalloc(size_t size) +{ + void *m; + + if ((m = malloc(size)) == NULL) + errx(1, "memory allocation failure"); + return (m); +} + static int add_mapping(struct glyph *gl, unsigned int c, unsigned int map_idx) { @@ -104,7 +114,7 @@ add_mapping(struct glyph *gl, unsigned i mapping_total++; - mp = malloc(sizeof *mp); + mp = xmalloc(sizeof *mp); mp->m_char = c; mp->m_glyph = gl; mp->m_length = 0; @@ -163,8 +173,8 @@ add_glyph(const uint8_t *bytes, unsigned } } - gl = malloc(sizeof *gl); - gl->g_data = malloc(wbytes * height); + gl = xmalloc(sizeof *gl); + gl->g_data = xmalloc(wbytes * height); memcpy(gl->g_data, bytes, wbytes * height); if (fallback) TAILQ_INSERT_HEAD(&glyphs[map_idx], gl, g_list); @@ -290,17 +300,26 @@ parse_hex(FILE *fp, unsigned int map_idx char *ln, *p; char fmt_str[8]; size_t length; - uint8_t bytes[wbytes * height], bytes_r[wbytes * height]; + uint8_t *bytes = NULL, *bytes_r = NULL; unsigned curchar = 0, i, line, chars_per_row, dwidth; + int rv = 0; while ((ln = fgetln(fp, &length)) != NULL) { ln[length - 1] = '\0'; if (strncmp(ln, "# Height: ", 10) == 0) { + if (bytes != NULL) + errx(1, "malformed input: Height tag after font data"); height = atoi(ln + 10); } else if (strncmp(ln, "# Width: ", 9) == 0) { + if (bytes != NULL) + errx(1, "malformed input: Width tag after font data"); set_width(atoi(ln + 9)); } else if (sscanf(ln, "%4x:", &curchar)) { + if (bytes == NULL) { + bytes = xmalloc(wbytes * height); + bytes_r = xmalloc(wbytes * height); + } p = ln + 5; chars_per_row = strlen(p) / height; dwidth = width; @@ -313,16 +332,23 @@ parse_hex(FILE *fp, unsigned int map_idx sscanf(p, fmt_str, &line); p += chars_per_row; if (parse_bitmap_line(bytes + i * wbytes, - bytes_r + i * wbytes, line, dwidth) != 0) - return (1); + bytes_r + i * wbytes, line, dwidth) != 0) { + rv = 1; + goto out; + } } if (add_char(curchar, map_idx, bytes, - dwidth == width * 2 ? bytes_r : NULL) != 0) - return (1); + dwidth == width * 2 ? bytes_r : NULL) != 0) { + rv = 1; + goto out; + } } } - return (0); +out: + free(bytes); + free(bytes_r); + return (rv); } static int From owner-svn-src-stable-10@freebsd.org Thu Sep 24 19:28:54 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61C1DA0742E; Thu, 24 Sep 2015 19:28:54 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.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 5187E1571; Thu, 24 Sep 2015 19:28:54 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8OJSsp7098236; Thu, 24 Sep 2015 19:28:54 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8OJSsOx098235; Thu, 24 Sep 2015 19:28:54 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201509241928.t8OJSsOx098235@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 24 Sep 2015 19:28:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288182 - stable/10/contrib/libcxxrt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Sep 2015 19:28:54 -0000 Author: emaste Date: Thu Sep 24 19:28:53 2015 New Revision: 288182 URL: https://svnweb.freebsd.org/changeset/base/288182 Log: MFC r284551: Import libcxxrt master e64e93f. This includes a number of demangler fixes obtained from upstream ELF Tool Chain. PR: 200913 Sponsored by: The FreeBSD Foundation Modified: stable/10/contrib/libcxxrt/libelftc_dem_gnu3.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/libcxxrt/libelftc_dem_gnu3.c ============================================================================== --- stable/10/contrib/libcxxrt/libelftc_dem_gnu3.c Thu Sep 24 18:53:20 2015 (r288181) +++ stable/10/contrib/libcxxrt/libelftc_dem_gnu3.c Thu Sep 24 19:28:53 2015 (r288182) @@ -59,7 +59,7 @@ struct vector_str { enum type_qualifier { TYPE_PTR, TYPE_REF, TYPE_CMX, TYPE_IMG, TYPE_EXT, TYPE_RST, TYPE_VAT, - TYPE_CST + TYPE_CST, TYPE_VEC }; struct vector_type_qualifier { @@ -397,6 +397,8 @@ static int cpp_demangle_read_array(struc static int cpp_demangle_read_encoding(struct cpp_demangle_data *); static int cpp_demangle_read_expr_primary(struct cpp_demangle_data *); static int cpp_demangle_read_expression(struct cpp_demangle_data *); +static int cpp_demangle_read_expression_flat(struct cpp_demangle_data *, + char **); static int cpp_demangle_read_expression_binary(struct cpp_demangle_data *, const char *, size_t); static int cpp_demangle_read_expression_unary(struct cpp_demangle_data *, @@ -408,8 +410,12 @@ static int cpp_demangle_read_function(st static int cpp_demangle_local_source_name(struct cpp_demangle_data *ddata); static int cpp_demangle_read_local_name(struct cpp_demangle_data *); static int cpp_demangle_read_name(struct cpp_demangle_data *); +static int cpp_demangle_read_name_flat(struct cpp_demangle_data *, + char**); static int cpp_demangle_read_nested_name(struct cpp_demangle_data *); static int cpp_demangle_read_number(struct cpp_demangle_data *, long *); +static int cpp_demangle_read_number_as_string(struct cpp_demangle_data *, + char **); static int cpp_demangle_read_nv_offset(struct cpp_demangle_data *); static int cpp_demangle_read_offset(struct cpp_demangle_data *); static int cpp_demangle_read_offset_number(struct cpp_demangle_data *); @@ -423,6 +429,8 @@ static int cpp_demangle_read_tmpl_arg(st static int cpp_demangle_read_tmpl_args(struct cpp_demangle_data *); static int cpp_demangle_read_tmpl_param(struct cpp_demangle_data *); static int cpp_demangle_read_type(struct cpp_demangle_data *, int); +static int cpp_demangle_read_type_flat(struct cpp_demangle_data *, + char **); static int cpp_demangle_read_uqname(struct cpp_demangle_data *); static int cpp_demangle_read_v_offset(struct cpp_demangle_data *); static char *decode_fp_to_double(const char *, size_t); @@ -601,17 +609,18 @@ cpp_demangle_push_fp(struct cpp_demangle fp = ddata->cur; while (*ddata->cur != 'E') ++ddata->cur; - ++ddata->cur; if ((f = decoder(fp, ddata->cur - fp)) == NULL) return (0); rtn = 0; if ((len = strlen(f)) > 0) - rtn = cpp_demangle_push_str(ddata, f, len); + rtn = cpp_demangle_push_str(ddata, f, len); free(f); + ++ddata->cur; + return (rtn); } @@ -695,7 +704,8 @@ cpp_demangle_push_type_qualifier(struct if (type_str != NULL) { if (!vector_str_push(&subst_v, "*", 1)) goto clean; - if (!cpp_demangle_push_subst_v(ddata, &subst_v)) + if (!cpp_demangle_push_subst_v(ddata, + &subst_v)) goto clean; } break; @@ -706,7 +716,8 @@ cpp_demangle_push_type_qualifier(struct if (type_str != NULL) { if (!vector_str_push(&subst_v, "&", 1)) goto clean; - if (!cpp_demangle_push_subst_v(ddata, &subst_v)) + if (!cpp_demangle_push_subst_v(ddata, + &subst_v)) goto clean; } break; @@ -717,7 +728,8 @@ cpp_demangle_push_type_qualifier(struct if (type_str != NULL) { if (!vector_str_push(&subst_v, " complex", 8)) goto clean; - if (!cpp_demangle_push_subst_v(ddata, &subst_v)) + if (!cpp_demangle_push_subst_v(ddata, + &subst_v)) goto clean; } break; @@ -726,23 +738,26 @@ cpp_demangle_push_type_qualifier(struct if (!cpp_demangle_push_str(ddata, " imaginary", 10)) goto clean; if (type_str != NULL) { - if (!vector_str_push(&subst_v, " imaginary", 10)) + if (!vector_str_push(&subst_v, " imaginary", + 10)) goto clean; - if (!cpp_demangle_push_subst_v(ddata, &subst_v)) + if (!cpp_demangle_push_subst_v(ddata, + &subst_v)) goto clean; } break; case TYPE_EXT: - if (e_idx > v->ext_name.size - 1) + if (v->ext_name.size == 0 || + e_idx > v->ext_name.size - 1) goto clean; - if ((e_len = strlen(v->ext_name.container[e_idx])) == 0) + if ((e_len = strlen(v->ext_name.container[e_idx])) == + 0) goto clean; - if ((buf = malloc(sizeof(char) * (e_len + 1))) == NULL) + if ((buf = malloc(e_len + 2)) == NULL) goto clean; - - memcpy(buf, " ", 1); - memcpy(buf + 1, v->ext_name.container[e_idx], e_len); + snprintf(buf, e_len + 2, " %s", + v->ext_name.container[e_idx]); if (!cpp_demangle_push_str(ddata, buf, e_len + 1)) { free(buf); @@ -755,7 +770,8 @@ cpp_demangle_push_type_qualifier(struct free(buf); goto clean; } - if (!cpp_demangle_push_subst_v(ddata, &subst_v)) { + if (!cpp_demangle_push_subst_v(ddata, + &subst_v)) { free(buf); goto clean; } @@ -770,7 +786,8 @@ cpp_demangle_push_type_qualifier(struct if (type_str != NULL) { if (!vector_str_push(&subst_v, " restrict", 9)) goto clean; - if (!cpp_demangle_push_subst_v(ddata, &subst_v)) + if (!cpp_demangle_push_subst_v(ddata, + &subst_v)) goto clean; } break; @@ -781,7 +798,8 @@ cpp_demangle_push_type_qualifier(struct if (type_str != NULL) { if (!vector_str_push(&subst_v, " volatile", 9)) goto clean; - if (!cpp_demangle_push_subst_v(ddata, &subst_v)) + if (!cpp_demangle_push_subst_v(ddata, + &subst_v)) goto clean; } break; @@ -792,11 +810,42 @@ cpp_demangle_push_type_qualifier(struct if (type_str != NULL) { if (!vector_str_push(&subst_v, " const", 6)) goto clean; - if (!cpp_demangle_push_subst_v(ddata, &subst_v)) + if (!cpp_demangle_push_subst_v(ddata, + &subst_v)) goto clean; } break; + case TYPE_VEC: + if (v->ext_name.size == 0 || + e_idx > v->ext_name.size - 1) + goto clean; + if ((e_len = strlen(v->ext_name.container[e_idx])) == + 0) + goto clean; + if ((buf = malloc(e_len + 12)) == NULL) + goto clean; + snprintf(buf, e_len + 12, " __vector(%s)", + v->ext_name.container[e_idx]); + if (!cpp_demangle_push_str(ddata, buf, e_len + 11)) { + free(buf); + goto clean; + } + if (type_str != NULL) { + if (!vector_str_push(&subst_v, buf, + e_len + 11)) { + free(buf); + goto clean; + } + if (!cpp_demangle_push_subst_v(ddata, + &subst_v)) { + free(buf); + goto clean; + } + } + free(buf); + ++e_idx; + break; }; --idx; } @@ -947,10 +996,14 @@ cpp_demangle_read_expr_primary(struct cp switch (*ddata->cur) { case 'b': + if (*(ddata->cur + 2) != 'E') + return (0); switch (*(++ddata->cur)) { case '0': + ddata->cur += 2; return (cpp_demangle_push_str(ddata, "false", 5)); case '1': + ddata->cur += 2; return (cpp_demangle_push_str(ddata, "true", 4)); default: return (0); @@ -999,7 +1052,8 @@ cpp_demangle_read_expr_primary(struct cp ++ddata->cur; } ++ddata->cur; - return (cpp_demangle_push_str(ddata, num, ddata->cur - num)); + return (cpp_demangle_push_str(ddata, num, + ddata->cur - num - 1)); default: return (0); @@ -1291,6 +1345,38 @@ cpp_demangle_read_expression(struct cpp_ } static int +cpp_demangle_read_expression_flat(struct cpp_demangle_data *ddata, char **str) +{ + struct vector_str *output; + size_t i, p_idx, idx, exp_len; + char *exp; + + output = ddata->push_head > 0 ? &ddata->output_tmp : + &ddata->output; + + p_idx = output->size; + + if (!cpp_demangle_read_expression(ddata)) + return (0); + + if ((exp = vector_str_substr(output, p_idx, output->size - 1, + &exp_len)) == NULL) + return (0); + + idx = output->size; + for (i = p_idx; i < idx; ++i) { + if (!vector_str_pop(output)) { + free(exp); + return (0); + } + } + + *str = exp; + + return (1); +} + +static int cpp_demangle_read_expression_binary(struct cpp_demangle_data *ddata, const char *name, size_t len) { @@ -1419,12 +1505,65 @@ cpp_demangle_read_function(struct cpp_de static int cpp_demangle_read_encoding(struct cpp_demangle_data *ddata) { + char *name, *type, *num_str; + long offset; + int rtn; if (ddata == NULL || *ddata->cur == '\0') return (0); /* special name */ switch (SIMPLE_HASH(*ddata->cur, *(ddata->cur + 1))) { + case SIMPLE_HASH('G', 'A'): + if (!cpp_demangle_push_str(ddata, "hidden alias for ", 17)) + return (0); + ddata->cur += 2; + if (*ddata->cur == '\0') + return (0); + return (cpp_demangle_read_encoding(ddata)); + + case SIMPLE_HASH('G', 'R'): + if (!cpp_demangle_push_str(ddata, "reference temporary #", 21)) + return (0); + ddata->cur += 2; + if (*ddata->cur == '\0') + return (0); + if (!cpp_demangle_read_name_flat(ddata, &name)) + return (0); + rtn = 0; + if (!cpp_demangle_read_number_as_string(ddata, &num_str)) + goto clean1; + if (!cpp_demangle_push_str(ddata, num_str, strlen(num_str))) + goto clean2; + if (!cpp_demangle_push_str(ddata, " for ", 5)) + goto clean2; + if (!cpp_demangle_push_str(ddata, name, strlen(name))) + goto clean2; + rtn = 1; + clean2: + free(num_str); + clean1: + free(name); + return (rtn); + + case SIMPLE_HASH('G', 'T'): + ddata->cur += 2; + if (*ddata->cur == '\0') + return (0); + switch (*ddata->cur) { + case 'n': + if (!cpp_demangle_push_str(ddata, + "non-transaction clone for ", 26)) + return (0); + case 't': + default: + if (!cpp_demangle_push_str(ddata, + "transaction clone for ", 22)) + return (0); + } + ++ddata->cur; + return (cpp_demangle_read_encoding(ddata)); + case SIMPLE_HASH('G', 'V'): /* sentry object for 1 time init */ if (!cpp_demangle_push_str(ddata, "guard variable for ", 20)) @@ -1446,14 +1585,49 @@ cpp_demangle_read_encoding(struct cpp_de return (0); return (cpp_demangle_read_encoding(ddata)); + case SIMPLE_HASH('T', 'C'): + /* construction vtable */ + if (!cpp_demangle_push_str(ddata, "construction vtable for ", + 24)) + return (0); + ddata->cur += 2; + if (*ddata->cur == '\0') + return (0); + if (!cpp_demangle_read_type_flat(ddata, &type)) + return (0); + rtn = 0; + if (!cpp_demangle_read_number(ddata, &offset)) + goto clean3; + if (*ddata->cur++ != '_') + goto clean3; + if (!cpp_demangle_read_type(ddata, 0)) + goto clean3; + if (!cpp_demangle_push_str(ddata, "-in-", 4)) + goto clean3; + if (!cpp_demangle_push_str(ddata, type, strlen(type))) + goto clean3; + rtn = 1; + clean3: + free(type); + return (rtn); + case SIMPLE_HASH('T', 'D'): /* typeinfo common proxy */ break; + case SIMPLE_HASH('T', 'F'): + /* typeinfo fn */ + if (!cpp_demangle_push_str(ddata, "typeinfo fn for ", 16)) + return (0); + ddata->cur += 2; + if (*ddata->cur == '\0') + return (0); + return (cpp_demangle_read_type(ddata, 0)); + case SIMPLE_HASH('T', 'h'): /* virtual function non-virtual override thunk */ - if (cpp_demangle_push_str(ddata, - "virtual function non-virtual override ", 38) == 0) + if (!cpp_demangle_push_str(ddata, + "virtual function non-virtual override ", 38)) return (0); ddata->cur += 2; if (*ddata->cur == '\0') @@ -1462,24 +1636,51 @@ cpp_demangle_read_encoding(struct cpp_de return (0); return (cpp_demangle_read_encoding(ddata)); + case SIMPLE_HASH('T', 'H'): + /* TLS init function */ + if (!cpp_demangle_push_str(ddata, "TLS init function for ", + 22)) + return (0); + ddata->cur += 2; + if (*ddata->cur == '\0') + return (0); + break; + case SIMPLE_HASH('T', 'I'): /* typeinfo structure */ - /* FALLTHROUGH */ + if (!cpp_demangle_push_str(ddata, "typeinfo for ", 13)) + return (0); + ddata->cur += 2; + if (*ddata->cur == '\0') + return (0); + return (cpp_demangle_read_type(ddata, 0)); + + case SIMPLE_HASH('T', 'J'): + /* java class */ + if (!cpp_demangle_push_str(ddata, "java Class for ", 15)) + return (0); + ddata->cur += 2; + if (*ddata->cur == '\0') + return (0); + return (cpp_demangle_read_type(ddata, 0)); + case SIMPLE_HASH('T', 'S'): /* RTTI name (NTBS) */ - if (!cpp_demangle_push_str(ddata, "typeinfo for ", 14)) + if (!cpp_demangle_push_str(ddata, "typeinfo name for ", 18)) return (0); ddata->cur += 2; if (*ddata->cur == '\0') return (0); - return (cpp_demangle_read_type(ddata, 1)); + return (cpp_demangle_read_type(ddata, 0)); case SIMPLE_HASH('T', 'T'): /* VTT table */ if (!cpp_demangle_push_str(ddata, "VTT for ", 8)) return (0); ddata->cur += 2; - return (cpp_demangle_read_type(ddata, 1)); + if (*ddata->cur == '\0') + return (0); + return (cpp_demangle_read_type(ddata, 0)); case SIMPLE_HASH('T', 'v'): /* virtual function virtual override thunk */ @@ -1500,7 +1701,17 @@ cpp_demangle_read_encoding(struct cpp_de ddata->cur += 2; if (*ddata->cur == '\0') return (0); - return (cpp_demangle_read_type(ddata, 1)); + return (cpp_demangle_read_type(ddata, 0)); + + case SIMPLE_HASH('T', 'W'): + /* TLS wrapper function */ + if (!cpp_demangle_push_str(ddata, "TLS wrapper function for ", + 25)) + return (0); + ddata->cur += 2; + if (*ddata->cur == '\0') + return (0); + break; }; return (cpp_demangle_read_name(ddata)); @@ -1618,6 +1829,38 @@ clean: } static int +cpp_demangle_read_name_flat(struct cpp_demangle_data *ddata, char **str) +{ + struct vector_str *output; + size_t i, p_idx, idx, name_len; + char *name; + + output = ddata->push_head > 0 ? &ddata->output_tmp : + &ddata->output; + + p_idx = output->size; + + if (!cpp_demangle_read_name(ddata)) + return (0); + + if ((name = vector_str_substr(output, p_idx, output->size - 1, + &name_len)) == NULL) + return (0); + + idx = output->size; + for (i = p_idx; i < idx; ++i) { + if (!vector_str_pop(output)) { + free(name); + return (0); + } + } + + *str = name; + + return (1); +} + +static int cpp_demangle_read_nested_name(struct cpp_demangle_data *ddata) { struct vector_str *output, v; @@ -1743,6 +1986,24 @@ cpp_demangle_read_number(struct cpp_dema } static int +cpp_demangle_read_number_as_string(struct cpp_demangle_data *ddata, char **str) +{ + long n; + + if (!cpp_demangle_read_number(ddata, &n)) { + *str = NULL; + return (0); + } + + if (asprintf(str, "%ld", n) < 0) { + *str = NULL; + return (0); + } + + return (1); +} + +static int cpp_demangle_read_nv_offset(struct cpp_demangle_data *ddata) { @@ -1877,11 +2138,11 @@ cpp_demangle_read_sname(struct cpp_deman len <= 0) return (0); - if (len == 12 && (memcmp("_GLOBAL__N_1", ddata->cur, 12) == 0)) + if (len == 12 && (memcmp("_GLOBAL__N_1", ddata->cur, 12) == 0)) err = cpp_demangle_push_str(ddata, "(anonymous namespace)", 21); else err = cpp_demangle_push_str(ddata, ddata->cur, len); - + if (err == 0) return (0); @@ -2232,7 +2493,7 @@ cpp_demangle_read_type(struct cpp_demang size_t p_idx, type_str_len; int extern_c, is_builtin; long len; - char *type_str; + char *type_str, *exp_str, *num_str; if (ddata == NULL) return (0); @@ -2274,7 +2535,7 @@ cpp_demangle_read_type(struct cpp_demang extern_c = 0; is_builtin = 1; p_idx = output->size; - type_str = NULL; + type_str = exp_str = num_str = NULL; again: /* builtin type */ switch (*ddata->cur) { @@ -2320,6 +2581,82 @@ again: ++ddata->cur; goto rtn; + case 'D': + ++ddata->cur; + switch (*ddata->cur) { + case 'd': + /* IEEE 754r decimal floating point (64 bits) */ + if (!cpp_demangle_push_str(ddata, "decimal64", 9)) + goto clean; + ++ddata->cur; + break; + case 'e': + /* IEEE 754r decimal floating point (128 bits) */ + if (!cpp_demangle_push_str(ddata, "decimal128", 10)) + goto clean; + ++ddata->cur; + break; + case 'f': + /* IEEE 754r decimal floating point (32 bits) */ + if (!cpp_demangle_push_str(ddata, "decimal32", 9)) + goto clean; + ++ddata->cur; + break; + case 'h': + /* IEEE 754r half-precision floating point (16 bits) */ + if (!cpp_demangle_push_str(ddata, "half", 4)) + goto clean; + ++ddata->cur; + break; + case 'i': + /* char32_t */ + if (!cpp_demangle_push_str(ddata, "char32_t", 8)) + goto clean; + ++ddata->cur; + break; + case 'n': + /* std::nullptr_t (i.e., decltype(nullptr)) */ + if (!cpp_demangle_push_str(ddata, "decltype(nullptr)", + 17)) + goto clean; + ++ddata->cur; + break; + case 's': + /* char16_t */ + if (!cpp_demangle_push_str(ddata, "char16_t", 8)) + goto clean; + ++ddata->cur; + break; + case 'v': + /* gcc vector_size extension. */ + ++ddata->cur; + if (*ddata->cur == '_') { + ++ddata->cur; + if (!cpp_demangle_read_expression_flat(ddata, + &exp_str)) + goto clean; + if (!vector_str_push(&v.ext_name, exp_str, + strlen(exp_str))) + goto clean; + } else { + if (!cpp_demangle_read_number_as_string(ddata, + &num_str)) + goto clean; + if (!vector_str_push(&v.ext_name, num_str, + strlen(num_str))) + goto clean; + } + if (*ddata->cur != '_') + goto clean; + ++ddata->cur; + if (!vector_type_qualifier_push(&v, TYPE_VEC)) + goto clean; + goto again; + default: + goto clean; + } + goto rtn; + case 'e': /* long double */ if (!cpp_demangle_push_str(ddata, "long double", 11)) @@ -2414,7 +2751,7 @@ again: case 'o': /* unsigned __int128 */ - if (!cpp_demangle_push_str(ddata, "unsigned _;int128", 17)) + if (!cpp_demangle_push_str(ddata, "unsigned __int128", 17)) goto clean; ++ddata->cur; goto rtn; @@ -2485,6 +2822,8 @@ again: if (!vector_str_push(&v.ext_name, ddata->cur, len)) return (0); ddata->cur += len; + if (!vector_type_qualifier_push(&v, TYPE_EXT)) + goto clean; goto again; case 'v': @@ -2549,6 +2888,8 @@ rtn: goto clean; free(type_str); + free(exp_str); + free(num_str); vector_type_qualifier_dest(&v); if (ddata->push_head > 0) { @@ -2580,11 +2921,45 @@ rtn: return (1); clean: free(type_str); + free(exp_str); + free(num_str); vector_type_qualifier_dest(&v); return (0); } +static int +cpp_demangle_read_type_flat(struct cpp_demangle_data *ddata, char **str) +{ + struct vector_str *output; + size_t i, p_idx, idx, type_len; + char *type; + + output = ddata->push_head > 0 ? &ddata->output_tmp : + &ddata->output; + + p_idx = output->size; + + if (!cpp_demangle_read_type(ddata, 0)) + return (0); + + if ((type = vector_str_substr(output, p_idx, output->size - 1, + &type_len)) == NULL) + return (0); + + idx = output->size; + for (i = p_idx; i < idx; ++i) { + if (!vector_str_pop(output)) { + free(type); + return (0); + } + } + + *str = type; + + return (1); +} + /* * read unqualified-name, unqualified name are operator-name, ctor-dtor-name, * source-name @@ -3008,39 +3383,38 @@ cpp_demangle_read_uqname(struct cpp_dema if (ELFTC_ISDIGIT(*ddata->cur) != 0) return (cpp_demangle_read_sname(ddata)); - - /* local source name */ - if (*ddata->cur == 'L') - return (cpp_demangle_local_source_name(ddata)); - - return (1); -} - -/* - * Read local source name. - * - * References: - * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31775 - * http://gcc.gnu.org/viewcvs?view=rev&revision=124467 - */ -static int -cpp_demangle_local_source_name(struct cpp_demangle_data *ddata) -{ - /* L */ - if (ddata == NULL || *ddata->cur != 'L') - return (0); - ++ddata->cur; - - /* source name */ - if (!cpp_demangle_read_sname(ddata)) - return (0); - - /* discriminator */ - if (*ddata->cur == '_') { - ++ddata->cur; - while (ELFTC_ISDIGIT(*ddata->cur) != 0) - ++ddata->cur; - } + /* local source name */ + if (*ddata->cur == 'L') + return (cpp_demangle_local_source_name(ddata)); + + return (1); +} + +/* + * Read local source name. + * + * References: + * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31775 + * http://gcc.gnu.org/viewcvs?view=rev&revision=124467 + */ +static int +cpp_demangle_local_source_name(struct cpp_demangle_data *ddata) +{ + /* L */ + if (ddata == NULL || *ddata->cur != 'L') + return (0); + ++ddata->cur; + + /* source name */ + if (!cpp_demangle_read_sname(ddata)) + return (0); + + /* discriminator */ + if (*ddata->cur == '_') { + ++ddata->cur; + while (ELFTC_ISDIGIT(*ddata->cur) != 0) + ++ddata->cur; + } return (1); } From owner-svn-src-stable-10@freebsd.org Thu Sep 24 19:32:09 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5AD2DA0777A; Thu, 24 Sep 2015 19:32:09 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.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 4B63A1A9A; Thu, 24 Sep 2015 19:32:09 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8OJW91X002178; Thu, 24 Sep 2015 19:32:09 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8OJW99d002177; Thu, 24 Sep 2015 19:32:09 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201509241932.t8OJW99d002177@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 24 Sep 2015 19:32:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288183 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Sep 2015 19:32:09 -0000 Author: emaste Date: Thu Sep 24 19:32:08 2015 New Revision: 288183 URL: https://svnweb.freebsd.org/changeset/base/288183 Log: MFC r256643: makesyscalls.sh: Error on failure to open specified config file Modified: stable/10/sys/kern/makesyscalls.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/makesyscalls.sh ============================================================================== --- stable/10/sys/kern/makesyscalls.sh Thu Sep 24 19:28:53 2015 (r288182) +++ stable/10/sys/kern/makesyscalls.sh Thu Sep 24 19:32:08 2015 (r288183) @@ -57,7 +57,7 @@ case $# in ;; esac -if [ -n "$2" -a -f "$2" ]; then +if [ -n "$2" ]; then . $2 fi From owner-svn-src-stable-10@freebsd.org Thu Sep 24 19:33:36 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13040A07856; Thu, 24 Sep 2015 19:33:36 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.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 DD9E81C09; Thu, 24 Sep 2015 19:33:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8OJXZVb002311; Thu, 24 Sep 2015 19:33:35 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8OJXZtt002310; Thu, 24 Sep 2015 19:33:35 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201509241933.t8OJXZtt002310@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 24 Sep 2015 19:33:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288184 - stable/10/contrib/binutils/gas X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Sep 2015 19:33:36 -0000 Author: emaste Date: Thu Sep 24 19:33:35 2015 New Revision: 288184 URL: https://svnweb.freebsd.org/changeset/base/288184 Log: MFC r256692: Fix .debug_line prologue header length calculation for 64-bit DWARF The header_length field is the number of bytes following the field to the first byte of the line number program. The hard-coded constants previously here (4 + 2 + 4) were correct only for 32-bit DWARF. Sponsored by: DARPA, AFRL Modified: stable/10/contrib/binutils/gas/dwarf2dbg.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/binutils/gas/dwarf2dbg.c ============================================================================== --- stable/10/contrib/binutils/gas/dwarf2dbg.c Thu Sep 24 19:32:08 2015 (r288183) +++ stable/10/contrib/binutils/gas/dwarf2dbg.c Thu Sep 24 19:33:35 2015 (r288184) @@ -1271,6 +1271,7 @@ out_debug_line (segT line_seg) symbolS *line_end; struct line_seg *s; enum dwarf2_format d2f; + int sizeof_initial_length; int sizeof_offset; subseg_set (line_seg, 0); @@ -1287,27 +1288,24 @@ out_debug_line (segT line_seg) d2f = DWARF2_FORMAT (); if (d2f == dwarf2_format_32bit) { - expr.X_add_number = -4; - emit_expr (&expr, 4); - sizeof_offset = 4; + sizeof_initial_length = sizeof_offset = 4; } else if (d2f == dwarf2_format_64bit) { - expr.X_add_number = -12; - out_four (-1); - emit_expr (&expr, 8); + sizeof_initial_length = 12; sizeof_offset = 8; + out_four (-1); } else if (d2f == dwarf2_format_64bit_irix) { - expr.X_add_number = -8; - emit_expr (&expr, 8); - sizeof_offset = 8; + sizeof_initial_length = sizeof_offset = 8; } else { as_fatal (_("internal error: unknown dwarf2 format")); } + expr.X_add_number = -sizeof_initial_length; + emit_expr (&expr, sizeof_offset); /* Version. */ out_two (2); @@ -1316,7 +1314,7 @@ out_debug_line (segT line_seg) expr.X_op = O_subtract; expr.X_add_symbol = prologue_end; expr.X_op_symbol = line_start; - expr.X_add_number = - (4 + 2 + 4); + expr.X_add_number = - (sizeof_initial_length + 2 + sizeof_offset); emit_expr (&expr, sizeof_offset); /* Parameters of the state machine. */ From owner-svn-src-stable-10@freebsd.org Thu Sep 24 19:37:35 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18EF1A07ADB; Thu, 24 Sep 2015 19:37:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.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 0975E1E42; Thu, 24 Sep 2015 19:37:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8OJbY0v002543; Thu, 24 Sep 2015 19:37:34 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8OJbYBD002542; Thu, 24 Sep 2015 19:37:34 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201509241937.t8OJbYBD002542@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 24 Sep 2015 19:37:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288185 - stable/10/games/grdc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Sep 2015 19:37:35 -0000 Author: emaste Date: Thu Sep 24 19:37:34 2015 New Revision: 288185 URL: https://svnweb.freebsd.org/changeset/base/288185 Log: MFC r283929: Correct grdc(1) 12-hour display between 12:00 and 13:00 PM starts at 12:00, not 13:00. PR: 194291, 200133 Submitted by: Nick Price Modified: stable/10/games/grdc/grdc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/games/grdc/grdc.c ============================================================================== --- stable/10/games/grdc/grdc.c Thu Sep 24 19:33:35 2015 (r288184) +++ stable/10/games/grdc/grdc.c Thu Sep 24 19:37:34 2015 (r288185) @@ -150,14 +150,14 @@ main(int argc, char *argv[]) set(tm->tm_min/10, 14); if (t12) { - if (tm->tm_hour > 12) { - tm->tm_hour -= 12; - mvaddstr(YBASE + 5, XBASE + 52, "PM"); - } else { + if (tm->tm_hour < 12) { if (tm->tm_hour == 0) tm->tm_hour = 12; - mvaddstr(YBASE + 5, XBASE + 52, "AM"); + } else { + if (tm->tm_hour > 12) + tm->tm_hour -= 12; + mvaddstr(YBASE + 5, XBASE + 52, "PM"); } } From owner-svn-src-stable-10@freebsd.org Thu Sep 24 19:53:25 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3BED0A08609; Thu, 24 Sep 2015 19:53:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.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 2CACA1CE8; Thu, 24 Sep 2015 19:53:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8OJrP1x010967; Thu, 24 Sep 2015 19:53:25 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8OJrPcg010966; Thu, 24 Sep 2015 19:53:25 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201509241953.t8OJrPcg010966@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 24 Sep 2015 19:53:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288187 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Sep 2015 19:53:25 -0000 Author: emaste Date: Thu Sep 24 19:53:24 2015 New Revision: 288187 URL: https://svnweb.freebsd.org/changeset/base/288187 Log: MFC r275903: Add AArch64 64-bit relocation values. Modified: stable/10/sys/sys/elf_common.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/elf_common.h ============================================================================== --- stable/10/sys/sys/elf_common.h Thu Sep 24 19:42:32 2015 (r288186) +++ stable/10/sys/sys/elf_common.h Thu Sep 24 19:53:24 2015 (r288187) @@ -649,6 +649,18 @@ typedef struct { #define R_386_TLS_TPOFF32 37 /* GOT entry of -ve static TLS offset */ #define R_386_IRELATIVE 42 /* PLT entry resolved indirectly at runtime */ +#define R_AARCH64_ABS64 257 /* Absolute offset */ +#define R_AARCH64_ABS32 258 /* Absolute, 32-bit overflow check */ +#define R_AARCH64_ABS16 259 /* Absolute, 16-bit overflow check */ +#define R_AARCH64_PREL64 260 /* PC relative */ +#define R_AARCH64_PREL32 261 /* PC relative, 32-bit overflow check */ +#define R_AARCH64_PREL16 262 /* PC relative, 16-bit overflow check */ +#define R_AARCH64_COPY 1024 /* Copy data from shared object */ +#define R_AARCH64_GLOB_DAT 1025 /* Set GOT entry to data address */ +#define R_AARCH64_JUMP_SLOT 1026 /* Set GOT entry to code address */ +#define R_AARCH64_RELATIVE 1027 /* Add load address of shared object */ +#define R_AARCH64_TLSDESC 1031 /* Identify the TLS descriptor */ + #define R_ARM_NONE 0 /* No relocation. */ #define R_ARM_PC24 1 #define R_ARM_ABS32 2 From owner-svn-src-stable-10@freebsd.org Thu Sep 24 19:59:33 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84587A08969; Thu, 24 Sep 2015 19:59:33 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.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 7505B1133; Thu, 24 Sep 2015 19:59:33 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8OJxXu5011444; Thu, 24 Sep 2015 19:59:33 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8OJxXMX011443; Thu, 24 Sep 2015 19:59:33 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201509241959.t8OJxXMX011443@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 24 Sep 2015 19:59:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288188 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Sep 2015 19:59:33 -0000 Author: emaste Date: Thu Sep 24 19:59:32 2015 New Revision: 288188 URL: https://svnweb.freebsd.org/changeset/base/288188 Log: MFC r281308: Add R_AARCH64_NONE, the null relocation. Modified: stable/10/sys/sys/elf_common.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/elf_common.h ============================================================================== --- stable/10/sys/sys/elf_common.h Thu Sep 24 19:53:24 2015 (r288187) +++ stable/10/sys/sys/elf_common.h Thu Sep 24 19:59:32 2015 (r288188) @@ -649,6 +649,7 @@ typedef struct { #define R_386_TLS_TPOFF32 37 /* GOT entry of -ve static TLS offset */ #define R_386_IRELATIVE 42 /* PLT entry resolved indirectly at runtime */ +#define R_AARCH64_NONE 0 /* No relocation */ #define R_AARCH64_ABS64 257 /* Absolute offset */ #define R_AARCH64_ABS32 258 /* Absolute, 32-bit overflow check */ #define R_AARCH64_ABS16 259 /* Absolute, 16-bit overflow check */ From owner-svn-src-stable-10@freebsd.org Thu Sep 24 20:00:21 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 178BBA089FD; Thu, 24 Sep 2015 20:00:21 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.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 0872912C0; Thu, 24 Sep 2015 20:00:21 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8OK0KDX011589; Thu, 24 Sep 2015 20:00:20 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8OK0KrI011588; Thu, 24 Sep 2015 20:00:20 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201509242000.t8OK0KrI011588@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 24 Sep 2015 20:00:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288189 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Sep 2015 20:00:21 -0000 Author: emaste Date: Thu Sep 24 20:00:20 2015 New Revision: 288189 URL: https://svnweb.freebsd.org/changeset/base/288189 Log: MFC r280858: Fill out arm64 dynamic relocation #defines Modified: stable/10/sys/sys/elf_common.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/elf_common.h ============================================================================== --- stable/10/sys/sys/elf_common.h Thu Sep 24 19:59:32 2015 (r288188) +++ stable/10/sys/sys/elf_common.h Thu Sep 24 20:00:20 2015 (r288189) @@ -660,7 +660,11 @@ typedef struct { #define R_AARCH64_GLOB_DAT 1025 /* Set GOT entry to data address */ #define R_AARCH64_JUMP_SLOT 1026 /* Set GOT entry to code address */ #define R_AARCH64_RELATIVE 1027 /* Add load address of shared object */ +#define R_AARCH64_TLS_DTPREL64 1028 +#define R_AARCH64_TLS_DTPMOD64 1029 +#define R_AARCH64_TLS_TPREL64 1030 #define R_AARCH64_TLSDESC 1031 /* Identify the TLS descriptor */ +#define R_AARCH64_IRELATIVE 1032 #define R_ARM_NONE 0 /* No relocation. */ #define R_ARM_PC24 1 From owner-svn-src-stable-10@freebsd.org Thu Sep 24 20:01:52 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E671FA08BB2; Thu, 24 Sep 2015 20:01:52 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.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 D47BA15B1; Thu, 24 Sep 2015 20:01:52 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8OK1qeL015290; Thu, 24 Sep 2015 20:01:52 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8OK1qMQ015289; Thu, 24 Sep 2015 20:01:52 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201509242001.t8OK1qMQ015289@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 24 Sep 2015 20:01:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288190 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Sep 2015 20:01:53 -0000 Author: emaste Date: Thu Sep 24 20:01:52 2015 New Revision: 288190 URL: https://svnweb.freebsd.org/changeset/base/288190 Log: MFC r279698: Update the ELFOSABI_* constants. Two new operating systems have been added in the meantime. ELFOSABI_FENIXOS that uses value 16 (published in the latest draft) and ELFOSABI_CLOUDABI that uses value 17 (to be published in the next draft). Modified: stable/10/sys/sys/elf_common.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/elf_common.h ============================================================================== --- stable/10/sys/sys/elf_common.h Thu Sep 24 20:00:20 2015 (r288189) +++ stable/10/sys/sys/elf_common.h Thu Sep 24 20:01:52 2015 (r288190) @@ -114,6 +114,8 @@ typedef struct { #define ELFOSABI_OPENVMS 13 /* Open VMS */ #define ELFOSABI_NSK 14 /* HP Non-Stop Kernel */ #define ELFOSABI_AROS 15 /* Amiga Research OS */ +#define ELFOSABI_FENIXOS 16 /* FenixOS */ +#define ELFOSABI_CLOUDABI 17 /* Nuxi CloudABI */ #define ELFOSABI_ARM 97 /* ARM */ #define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */ From owner-svn-src-stable-10@freebsd.org Thu Sep 24 20:03:01 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49B4AA08C2C; Thu, 24 Sep 2015 20:03:01 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.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 3A12818ED; Thu, 24 Sep 2015 20:03:01 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8OK317d015392; Thu, 24 Sep 2015 20:03:01 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8OK31fR015391; Thu, 24 Sep 2015 20:03:01 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201509242003.t8OK31fR015391@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 24 Sep 2015 20:03:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288191 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Sep 2015 20:03:01 -0000 Author: emaste Date: Thu Sep 24 20:03:00 2015 New Revision: 288191 URL: https://svnweb.freebsd.org/changeset/base/288191 Log: MFC r276636: add NT_PPC_VMX note type definition Modified: stable/10/sys/sys/elf_common.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/elf_common.h ============================================================================== --- stable/10/sys/sys/elf_common.h Thu Sep 24 20:01:52 2015 (r288190) +++ stable/10/sys/sys/elf_common.h Thu Sep 24 20:03:00 2015 (r288191) @@ -518,6 +518,7 @@ typedef struct { #define NT_PROCSTAT_OSREL 14 /* Procstat osreldate data. */ #define NT_PROCSTAT_PSSTRINGS 15 /* Procstat ps_strings data. */ #define NT_PROCSTAT_AUXV 16 /* Procstat auxv data. */ +#define NT_PPC_VMX 0x100 /* PowerPC Altivec/VMX registers */ #define NT_X86_XSTATE 0x202 /* x86 XSAVE extended state. */ /* Symbol Binding - ELFNN_ST_BIND - st_info */ From owner-svn-src-stable-10@freebsd.org Thu Sep 24 20:56:27 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E874A08D28; Thu, 24 Sep 2015 20:56:27 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.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 6F5E015A8; Thu, 24 Sep 2015 20:56:27 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8OKuRCb036628; Thu, 24 Sep 2015 20:56:27 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8OKuRwa036627; Thu, 24 Sep 2015 20:56:27 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201509242056.t8OKuRwa036627@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 24 Sep 2015 20:56:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288192 - stable/10/etc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Sep 2015 20:56:27 -0000 Author: emaste Date: Thu Sep 24 20:56:26 2015 New Revision: 288192 URL: https://svnweb.freebsd.org/changeset/base/288192 Log: MFC r279248: Unconditionally install debug directory hierarchy This avoids various failure modes (e.g., when building and installing a single binary with debug data on a system that otherwise does not have it enabled). It is also consistent with the way other directory hierarchies are handled (e.g. share/man). Modified: stable/10/etc/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/Makefile ============================================================================== --- stable/10/etc/Makefile Thu Sep 24 20:03:00 2015 (r288191) +++ stable/10/etc/Makefile Thu Sep 24 20:56:26 2015 (r288192) @@ -154,16 +154,13 @@ BIN1+= regdomain.xml # -rwxr-xr-x root:wheel, for the new cron root:wheel BIN2= netstart pccard_ether rc.suspend rc.resume -MTREE= BSD.include.dist BSD.root.dist BSD.usr.dist BSD.var.dist +MTREE= BSD.debug.dist BSD.include.dist BSD.root.dist BSD.usr.dist BSD.var.dist .if ${MK_TESTS} != "no" MTREE+= BSD.tests.dist .endif .if ${MK_SENDMAIL} != "no" MTREE+= BSD.sendmail.dist .endif -.if ${MK_DEBUG_FILES} != "no" -MTREE+= BSD.debug.dist -.endif PPPCNF= ppp.conf @@ -336,10 +333,8 @@ MTREE_CMD?= mtree MTREES= mtree/BSD.root.dist / \ mtree/BSD.var.dist /var \ mtree/BSD.usr.dist /usr \ - mtree/BSD.include.dist /usr/include -.if ${MK_DEBUG_FILES} != "no" -MTREES+= mtree/BSD.debug.dist /usr/lib -.endif + mtree/BSD.include.dist /usr/include \ + mtree/BSD.debug.dist /usr/lib .if ${MK_GROFF} != "no" MTREES+= mtree/BSD.groff.dist /usr .endif From owner-svn-src-stable-10@freebsd.org Thu Sep 24 21:01:35 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 75C89A0719B; Thu, 24 Sep 2015 21:01:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.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 669DD1BBC; Thu, 24 Sep 2015 21:01:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8OL1ZUJ040526; Thu, 24 Sep 2015 21:01:35 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8OL1ZRa040525; Thu, 24 Sep 2015 21:01:35 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201509242101.t8OL1ZRa040525@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 24 Sep 2015 21:01:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288193 - stable/10/share/man/man7 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Sep 2015 21:01:35 -0000 Author: emaste Date: Thu Sep 24 21:01:34 2015 New Revision: 288193 URL: https://svnweb.freebsd.org/changeset/base/288193 Log: MFC r274349: Add /usr/lib/debug directory to hier(7) The canonical standalone debug directory established by the GNU toolchain is /usr/lib/debug, and we use it when WITH_DEBUG_FILES is set. Mention it in the file system hierarchy page. Modified: stable/10/share/man/man7/hier.7 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man7/hier.7 ============================================================================== --- stable/10/share/man/man7/hier.7 Thu Sep 24 20:56:26 2015 (r288192) +++ stable/10/share/man/man7/hier.7 Thu Sep 24 21:01:34 2015 (r288193) @@ -32,7 +32,7 @@ .\" @(#)hier.7 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd January 14, 2015 +.Dd September 24, 2015 .Dt HIER 7 .Os .Sh NAME @@ -391,6 +391,8 @@ shared libraries for compatibility .It Pa aout/ a.out backward compatibility libraries .El +.It Pa debug/ +standalone debug data for the base system libraries and binaries .It Pa dtrace/ DTrace library scripts .It Pa engines/ From owner-svn-src-stable-10@freebsd.org Fri Sep 25 00:23:37 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45F82A08FDE; Fri, 25 Sep 2015 00:23:37 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.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 3327B1903; Fri, 25 Sep 2015 00:23:37 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8P0NbQr026116; Fri, 25 Sep 2015 00:23:37 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8P0Nap8026114; Fri, 25 Sep 2015 00:23:36 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201509250023.t8P0Nap8026114@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 25 Sep 2015 00:23:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288202 - stable/10/usr.bin/ar X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Sep 2015 00:23:37 -0000 Author: emaste Date: Fri Sep 25 00:23:36 2015 New Revision: 288202 URL: https://svnweb.freebsd.org/changeset/base/288202 Log: MFC r286010: ar: enable deterministic mode by default Ar cannot handle UIDs with more than 6 digits, and storing the mtime, uid, gid and mode provides little to negative value anyhow for ar's uses. Turn on deterministic (-D) mode by default; it can be disabled by the user with -U. Also MFC follow-on fixes in r286024 and r287324. PR: 196929 Relnotes: Yes Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.bin/ar/ar.1 stable/10/usr.bin/ar/ar.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/ar/ar.1 ============================================================================== --- stable/10/usr.bin/ar/ar.1 Fri Sep 25 00:07:31 2015 (r288201) +++ stable/10/usr.bin/ar/ar.1 Fri Sep 25 00:23:36 2015 (r288202) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 31, 2015 +.Dd September 24, 2015 .Dt AR 1 .Os .Sh NAME @@ -210,6 +210,7 @@ and 0644 instead of file mode from the m .Ar . This ensures that checksums on the resulting archives are reproducible when member contents are identical. +This option is enabled by default. If multiple .Fl D and Modified: stable/10/usr.bin/ar/ar.c ============================================================================== --- stable/10/usr.bin/ar/ar.c Fri Sep 25 00:07:31 2015 (r288201) +++ stable/10/usr.bin/ar/ar.c Fri Sep 25 00:23:36 2015 (r288202) @@ -100,10 +100,12 @@ main(int argc, char **argv) struct bsdar *bsdar, bsdar_storage; char *p; size_t len; - int i, opt; + int i, opt, Dflag, Uflag; bsdar = &bsdar_storage; memset(bsdar, 0, sizeof(*bsdar)); + Dflag = 0; + Uflag = 0; if ((bsdar->progname = getprogname()) == NULL) bsdar->progname = "ar"; @@ -120,10 +122,12 @@ main(int argc, char **argv) /* Ignored. */ break; case 'D': - bsdar->options |= AR_D; + Dflag = 1; + Uflag = 0; break; case 'U': - bsdar->options &= ~AR_D; + Uflag = 1; + Dflag = 0; break; case 'V': ranlib_version(); @@ -140,6 +144,9 @@ main(int argc, char **argv) if (*argv == NULL) ranlib_usage(); + /* Enable determinstic mode unless -U is set. */ + if (Uflag == 0) + bsdar->options |= AR_D; bsdar->options |= AR_S; while ((bsdar->filename = *argv++) != NULL) ar_mode_s(bsdar); @@ -180,7 +187,8 @@ main(int argc, char **argv) set_mode(bsdar, opt); break; case 'D': - bsdar->options |= AR_D; + Dflag = 1; + Uflag = 0; break; case 'f': case 'T': @@ -220,7 +228,8 @@ main(int argc, char **argv) set_mode(bsdar, opt); break; case 'U': - bsdar->options &= ~AR_D; + Uflag = 1; + Dflag = 0; break; case 'u': bsdar->options |= AR_U; @@ -273,6 +282,10 @@ main(int argc, char **argv) argv++; } + /* Set determinstic mode for -D, and by default without -U. */ + if (Dflag || (Uflag == 0 && (bsdar->mode == 'q' || bsdar->mode == 'r'))) + bsdar->options |= AR_D; + if (bsdar->options & AR_A) only_mode(bsdar, "-a", "mqr"); if (bsdar->options & AR_B) @@ -281,8 +294,10 @@ main(int argc, char **argv) only_mode(bsdar, "-c", "qr"); if (bsdar->options & AR_CC) only_mode(bsdar, "-C", "x"); - if (bsdar->options & AR_D) + if (Dflag) only_mode(bsdar, "-D", "qr"); + if (Uflag) + only_mode(bsdar, "-U", "qr"); if (bsdar->options & AR_O) only_mode(bsdar, "-o", "x"); if (bsdar->options & AR_SS) From owner-svn-src-stable-10@freebsd.org Fri Sep 25 01:17:25 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 705E7A095AC; Fri, 25 Sep 2015 01:17:25 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.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 606A81284; Fri, 25 Sep 2015 01:17:25 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8P1HPVU046504; Fri, 25 Sep 2015 01:17:25 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8P1HP0h046503; Fri, 25 Sep 2015 01:17:25 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201509250117.t8P1HP0h046503@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 25 Sep 2015 01:17:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288205 - stable/10/usr.sbin/gstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Sep 2015 01:17:25 -0000 Author: delphij Date: Fri Sep 25 01:17:24 2015 New Revision: 288205 URL: https://svnweb.freebsd.org/changeset/base/288205 Log: MFC r287650: Use strlcpy() in favor of strncpy() as it's defined to have a nul character at the end of string buffer, and the code context do expects this to behave correctly (e.g. strchr). Modified: stable/10/usr.sbin/gstat/gstat.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/gstat/gstat.c ============================================================================== --- stable/10/usr.sbin/gstat/gstat.c Fri Sep 25 01:05:44 2015 (r288204) +++ stable/10/usr.sbin/gstat/gstat.c Fri Sep 25 01:17:24 2015 (r288205) @@ -124,7 +124,7 @@ main(int argc, char **argv) if (regcomp(&f_re, optarg, REG_EXTENDED) != 0) errx(EX_USAGE, "Invalid filter - see re_format(7)"); - strncpy(f_s, optarg, sizeof(f_s)); + strlcpy(f_s, optarg, sizeof(f_s)); break; case 'o': flag_o = 1; @@ -216,7 +216,7 @@ main(int argc, char **argv) getyx(stdscr, cury, curx); getmaxyx(stdscr, maxy, maxx); } - strncpy(pf_s, f_s, sizeof(pf_s)); + strlcpy(pf_s, f_s, sizeof(pf_s)); max_flen = maxx - curx - 1; if ((int)strlen(f_s) > max_flen && max_flen >= 0) { if (max_flen > 3) @@ -406,7 +406,7 @@ main(int argc, char **argv) err(1, "el_gets"); if (line_len > 1) history(hist, &hist_ev, H_ENTER, line); - strncpy(tmp_f_s, line, sizeof(f_s)); + strlcpy(tmp_f_s, line, sizeof(f_s)); if ((p = strchr(tmp_f_s, '\n')) != NULL) *p = '\0'; /* @@ -423,7 +423,7 @@ main(int argc, char **argv) refresh(); sleep(1); } else { - strncpy(f_s, tmp_f_s, sizeof(f_s)); + strlcpy(f_s, tmp_f_s, sizeof(f_s)); f_re = tmp_f_re; } break; From owner-svn-src-stable-10@freebsd.org Fri Sep 25 03:54:11 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66CB8A06FD6; Fri, 25 Sep 2015 03:54:11 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org (repo.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 56FD71E36; Fri, 25 Sep 2015 03:54:11 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8P3sBGI012301; Fri, 25 Sep 2015 03:54:11 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8P3sBc0012300; Fri, 25 Sep 2015 03:54:11 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201509250354.t8P3sBc0012300@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Fri, 25 Sep 2015 03:54:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288209 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Sep 2015 03:54:11 -0000 Author: jpaetzel Date: Fri Sep 25 03:54:10 2015 New Revision: 288209 URL: https://svnweb.freebsd.org/changeset/base/288209 Log: MFC 288208 Fix typo. Sponsored by: iXsystems Modified: stable/10/usr.sbin/ctld/ctld.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/ctld.c ============================================================================== --- stable/10/usr.sbin/ctld/ctld.c Fri Sep 25 03:46:06 2015 (r288208) +++ stable/10/usr.sbin/ctld/ctld.c Fri Sep 25 03:54:10 2015 (r288209) @@ -1132,7 +1132,7 @@ valid_iscsi_name(const char *name) } } else { log_warnx("invalid target name \"%s\"; should start with " - "either \".iqn\", \"eui.\", or \"naa.\"", + "either \"iqn.\", \"eui.\", or \"naa.\"", name); } return (true); From owner-svn-src-stable-10@freebsd.org Fri Sep 25 22:08:21 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABDBBA09921; Fri, 25 Sep 2015 22:08:21 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.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 9C36F1986; Fri, 25 Sep 2015 22:08:21 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8PM8LUx074389; Fri, 25 Sep 2015 22:08:21 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8PM8LjN074388; Fri, 25 Sep 2015 22:08:21 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201509252208.t8PM8LjN074388@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 25 Sep 2015 22:08:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288236 - stable/10/usr.sbin/acpi/acpiconf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Sep 2015 22:08:21 -0000 Author: jkim Date: Fri Sep 25 22:08:20 2015 New Revision: 288236 URL: https://svnweb.freebsd.org/changeset/base/288236 Log: MFC: r267248, r267260, r267261, r267320 Document 'k' option for acpiconf(8). Modified: stable/10/usr.sbin/acpi/acpiconf/acpiconf.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/acpi/acpiconf/acpiconf.8 ============================================================================== --- stable/10/usr.sbin/acpi/acpiconf/acpiconf.8 Fri Sep 25 21:04:31 2015 (r288235) +++ stable/10/usr.sbin/acpi/acpiconf/acpiconf.8 Fri Sep 25 22:08:20 2015 (r288236) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 16, 2004 +.Dd June 10, 2014 .Dt ACPICONF 8 .Os .Sh NAME @@ -37,6 +37,7 @@ .Nm .Op Fl h .Op Fl i Ar batt +.Op Fl k Ar ack .Op Fl s Ar type .Sh DESCRIPTION The @@ -49,6 +50,9 @@ The following command-line options are r Displays a summary of available options. .It Fl i Ar batt Get design information about the specified battery. +.It Fl k Ar ack +Ack or abort a pending suspend request using the argument provided. +.Sy Most users should not use this option directly. .It Fl s Ar type Enters the specified sleep mode. Recognized types are From owner-svn-src-stable-10@freebsd.org Fri Sep 25 22:19:36 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D69BCA08086; Fri, 25 Sep 2015 22:19:36 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.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 C40CE1F3B; Fri, 25 Sep 2015 22:19:36 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8PMJaQq078499; Fri, 25 Sep 2015 22:19:36 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8PMJahi078498; Fri, 25 Sep 2015 22:19:36 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201509252219.t8PMJahi078498@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 25 Sep 2015 22:19:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288237 - stable/10/usr.sbin/acpi/acpiconf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Sep 2015 22:19:36 -0000 Author: jkim Date: Fri Sep 25 22:19:35 2015 New Revision: 288237 URL: https://svnweb.freebsd.org/changeset/base/288237 Log: MFC: r288116 Remove unsupported S5 (power off) state. Modified: stable/10/usr.sbin/acpi/acpiconf/acpiconf.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/acpi/acpiconf/acpiconf.8 ============================================================================== --- stable/10/usr.sbin/acpi/acpiconf/acpiconf.8 Fri Sep 25 22:08:20 2015 (r288236) +++ stable/10/usr.sbin/acpi/acpiconf/acpiconf.8 Fri Sep 25 22:19:35 2015 (r288237) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 10, 2014 +.Dd September 22, 2015 .Dt ACPICONF 8 .Os .Sh NAME @@ -62,11 +62,9 @@ Recognized types are (not implemented on most systems but similar to S1), .Cm 3 (the CPU context is lost and memory context is preserved), -.Cm 4 -(the CPU context is lost and memory context is stored to disk) and -.Cm 5 -(soft off). +.Cm 4 +(the CPU context is lost and memory context is stored to disk). Sleep states may also be given as S1, S2, etc. The supported states depend on BIOS implementation, including ACPI byte code (AML). From owner-svn-src-stable-10@freebsd.org Sat Sep 26 03:51:53 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7D46A0930B; Sat, 26 Sep 2015 03:51:53 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.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 D84F51EB8; Sat, 26 Sep 2015 03:51:53 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8Q3prmo024291; Sat, 26 Sep 2015 03:51:53 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8Q3pr92024290; Sat, 26 Sep 2015 03:51:53 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201509260351.t8Q3pr92024290@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sat, 26 Sep 2015 03:51:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288250 - stable/10/sys/contrib/ipfilter/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Sep 2015 03:51:54 -0000 Author: cy Date: Sat Sep 26 03:51:53 2015 New Revision: 288250 URL: https://svnweb.freebsd.org/changeset/base/288250 Log: MFC r287674, r287675. Fix ipfilter bug 3600459 NAT bucket count wrong. Obtained from: ipfilter cvs repo r1.48.2.25 Modified: stable/10/sys/contrib/ipfilter/netinet/ip_state.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/contrib/ipfilter/netinet/ip_state.c ============================================================================== --- stable/10/sys/contrib/ipfilter/netinet/ip_state.c Sat Sep 26 01:28:50 2015 (r288249) +++ stable/10/sys/contrib/ipfilter/netinet/ip_state.c Sat Sep 26 03:51:53 2015 (r288250) @@ -3646,7 +3646,8 @@ ipf_state_del(softc, is, why) is->is_me = NULL; is->is_ref--; } - if (is->is_ref > 1) { + is->is_ref--; + if (is->is_ref > 0) { int refs; is->is_ref--;